- Name
parts- Kind
- property
- Type
readonly ["root", "previous", "next", "label", "grid", "weekday", "day"]- Requirement
- required
DocsAPI referenceHeadlesscalendar
calendar headless API
The core connector and vanilla mount are always visible. Use the framework choice to inspect native composition, props, outputs, context and hooks for the selected adapter.
38 of 38
@grassroot/ui-headless-core/calendar
Core connector and vanilla API
calendarAnatomy
valuecalendarAnatomyts
export declare const calendarAnatomy: { readonly scope: "calendar"; readonly parts: readonly ["root", "previous", "next", "label", "grid", "weekday", "day"];};Name
Kind
Type
Requirement
partsproperty
readonly ["root", "previous", "next", "label", "grid", "weekday", "day"]required
scopeproperty
"calendar"required
- Name
scope- Kind
- property
- Type
"calendar"- Requirement
- required
CalendarApi
interfaceCalendarApits
interface CalendarApi { rootProps(): PartProps; previousProps(): PartProps; nextProps(): PartProps; labelProps(): PartProps; gridProps(): PartProps; weekdayProps(index: number): PartProps; dayProps(index: number): PartProps; days(): readonly CalendarDay[]; readonly value: string | null; readonly year: number; readonly month: number; destroy(): void;}Name
Kind
Type
Requirement
dayPropsmethod
(index: number) => PartPropsrequired
daysmethod
() => readonly CalendarDay[]required
destroymethod
() => voidrequired
gridPropsmethod
() => PartPropsrequired
labelPropsmethod
() => PartPropsrequired
monthproperty
numberrequired
nextPropsmethod
() => PartPropsrequired
previousPropsmethod
() => PartPropsrequired
rootPropsmethod
() => PartPropsrequired
valueproperty
string | nullrequired
weekdayPropsmethod
(index: number) => PartPropsrequired
yearproperty
numberrequired
- Name
dayProps- Kind
- method
- Type
(index: number) => PartProps- Requirement
- required
- Name
days- Kind
- method
- Type
() => readonly CalendarDay[]- Requirement
- required
- Name
destroy- Kind
- method
- Type
() => void- Requirement
- required
- Name
gridProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Name
labelProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Name
month- Kind
- property
- Type
number- Requirement
- required
- Name
nextProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Name
previousProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Name
rootProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Name
value- Kind
- property
- Type
string | null- Requirement
- required
- Name
weekdayProps- Kind
- method
- Type
(index: number) => PartProps- Requirement
- required
- Name
year- Kind
- property
- Type
number- Requirement
- required
CalendarChangeDetail
interfaceCalendarChangeDetailts
interface CalendarChangeDetail { readonly value: string; readonly reason: CalendarReason;}Name
Kind
Type
Requirement
reasonproperty
CalendarReasonrequired
valueproperty
stringrequired
- Name
reason- Kind
- property
- Type
CalendarReason- Requirement
- required
- Name
value- Kind
- property
- Type
string- Requirement
- required
CalendarConnectOptions
interfaceCalendarConnectOptionsts
interface CalendarConnectOptions { readonly ariaLabel?: string; readonly dayLabel?: (value: string) => string; readonly messages?: Partial<CalendarMessages>; readonly onValueChange?: (detail: CalendarChangeDetail) => void;}Name
Kind
Type
Requirement
ariaLabelproperty
stringoptional
dayLabelproperty
(value: string) => stringoptional
messagesproperty
Partial<CalendarMessages>optional
onValueChangeproperty
(detail: CalendarChangeDetail) => voidoptional
- Name
ariaLabel- Kind
- property
- Type
string- Requirement
- optional
- Name
dayLabel- Kind
- property
- Type
(value: string) => string- Requirement
- optional
- Name
messages- Kind
- property
- Type
Partial<CalendarMessages>- Requirement
- optional
- Name
onValueChange- Kind
- property
- Type
(detail: CalendarChangeDetail) => void- Requirement
- optional
calendarMessages
valuecalendarMessagests
export declare const calendarMessages: CalendarMessages;CalendarMessages
typeCalendarMessagests
type CalendarMessages = Pick<MessageTable, "rootLabel" | "previousMonthLabel" | "nextMonthLabel">;CalendarMount
interfaceCalendarMountts
interface CalendarMount { readonly service: CalendarService; readonly connector: CalendarApi; readonly root: HTMLElement; destroy(): void;}Name
Kind
Type
Requirement
connectorproperty
CalendarApirequired
destroymethod
() => voidrequired
rootproperty
HTMLElementrequired
serviceproperty
CalendarServicerequired
- Name
connector- Kind
- property
- Type
CalendarApi- Requirement
- required
- Name
destroy- Kind
- method
- Type
() => void- Requirement
- required
- Name
root- Kind
- property
- Type
HTMLElement- Requirement
- required
- Name
service- Kind
- property
- Type
CalendarService- Requirement
- required
CalendarPart
typeCalendarPartts
type CalendarPart = (typeof calendarAnatomy.parts)[number];CalendarService
typeCalendarServicets
type CalendarService = Service<CalendarInput, "ready", CalendarContext, CalendarEvent, CalendarCommand>;connectCalendar
functionconnectCalendarts
declare function connectCalendar(service: CalendarService, scope: PartScope, options?: CalendarConnectOptions): CalendarApi;Name
Kind
Type
Requirement
serviceparameter
CalendarServicerequired
scopeparameter
PartScoperequired
optionsparameter
CalendarConnectOptionsoptional
returnreturn value
CalendarApin/a
- Name
service- Kind
- parameter
- Type
CalendarService- Requirement
- required
- Name
scope- Kind
- parameter
- Type
PartScope- Requirement
- required
- Name
options- Kind
- parameter
- Type
CalendarConnectOptions- Requirement
- optional
- Name
return- Kind
- return value
- Type
CalendarApi- Requirement
- n/a
mountCalendar
functionmountCalendarts
declare function mountCalendar(container: HTMLElement, options?: MountCalendarOptions): CalendarMount;Name
Kind
Type
Requirement
containerparameter
HTMLElementrequired
optionsparameter
MountCalendarOptionsoptional
returnreturn value
CalendarMountn/a
- Name
container- Kind
- parameter
- Type
HTMLElement- Requirement
- required
- Name
options- Kind
- parameter
- Type
MountCalendarOptions- Requirement
- optional
- Name
return- Kind
- return value
- Type
CalendarMount- Requirement
- n/a
MountCalendarOptions
interfaceMountCalendarOptionsts
interface MountCalendarOptions extends CalendarInput, Pick<CalendarConnectOptions, "ariaLabel" | "messages"> { readonly onValueChange?: (detail: CalendarChangeDetail) => void;}Name
Kind
Type
Requirement
onValueChangeproperty
(detail: CalendarChangeDetail) => voidoptional
- Name
onValueChange- Kind
- property
- Type
(detail: CalendarChangeDetail) => void- Requirement
- optional
runCalendarCommand
functionrunCalendarCommandts
declare function runCalendarCommand(command: CalendarCommand, options?: CalendarConnectOptions): void;Name
Kind
Type
Requirement
commandparameter
CalendarCommandrequired
optionsparameter
CalendarConnectOptionsoptional
returnreturn value
voidn/a
- Name
command- Kind
- parameter
- Type
CalendarCommand- Requirement
- required
- Name
options- Kind
- parameter
- Type
CalendarConnectOptions- Requirement
- optional
- Name
return- Kind
- return value
- Type
void- Requirement
- n/a
Framework adapters
Each panel keeps its adapter's public vocabulary. React compound exports, Vue composables, standalone Angular declarations, Svelte components, and Solid hooks stay native to their framework.
React example follows below.
Vue example follows below.
Angular example follows below.
Svelte example follows below.
Solid example follows below.
React imports
@grassroot/ui-headless-react/calendarts
import { Root, RootProvider } from "@grassroot/ui-headless-react/calendar";Vue imports
@grassroot/ui-headless-vue/calendarts
<script setup lang="ts">import { Root, RootProvider } from "@grassroot/ui-headless-vue/calendar";</script>Angular imports
@grassroot/ui-headless-angular/calendarts
import { GrCalendarDay, GrCalendarRoot, GrCalendarRootProvider } from "@grassroot/ui-headless-angular/calendar";Svelte imports
@grassroot/ui-headless-svelte/calendarts
<script lang="ts"> import { Root } from "@grassroot/ui-headless-svelte/calendar";</script>Solid imports
@grassroot/ui-headless-solid/calendarts
import { Root, RootProvider } from "@grassroot/ui-headless-solid/calendar";@grassroot/ui-headless-react/calendar
React adapter
CalendarRootProps
interfaceCalendarRootPropsts
interface CalendarRootProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange">, CalendarInput { readonly id?: string; readonly ariaLabel?: string; readonly dayLabel?: (value: string) => string; readonly onValueChange?: (detail: { readonly value: string; readonly reason: string; }) => void; readonly monthLabel?: (year: number, month: number) => ReactNode; readonly weekdayLabels?: readonly ReactNode[];}Name
Kind
Type
Requirement
ariaLabelproperty
stringoptional
dayLabelproperty
(value: string) => stringoptional
idproperty
stringoptional
monthLabelproperty
(year: number, month: number) => ReactNodeoptional
onValueChangeproperty
(detail: {
readonly value: string;
readonly reason: string;
}) => voidoptional
weekdayLabelsproperty
readonly ReactNode[]optional
- Name
ariaLabel- Kind
- property
- Type
string- Requirement
- optional
- Name
dayLabel- Kind
- property
- Type
(value: string) => string- Requirement
- optional
- Name
id- Kind
- property
- Type
string- Requirement
- optional
- Name
monthLabel- Kind
- property
- Type
(year: number, month: number) => ReactNode- Requirement
- optional
- Name
onValueChange- Kind
- property
- Type
(detail: { readonly value: string; readonly reason: string; }) => void- Requirement
- optional
- Name
weekdayLabels- Kind
- property
- Type
readonly ReactNode[]- Requirement
- optional
CalendarRootProviderProps
interfaceCalendarRootProviderPropsts
interface CalendarRootProviderProps extends HTMLAttributes<HTMLDivElement> { readonly value: UseCalendarResult; readonly monthLabel?: (year: number, month: number) => ReactNode; readonly weekdayLabels?: readonly ReactNode[];}Name
Kind
Type
Requirement
monthLabelproperty
(year: number, month: number) => ReactNodeoptional
valueproperty
UseCalendarResultrequired
weekdayLabelsproperty
readonly ReactNode[]optional
- Name
monthLabel- Kind
- property
- Type
(year: number, month: number) => ReactNode- Requirement
- optional
- Name
value- Kind
- property
- Type
UseCalendarResult- Requirement
- required
- Name
weekdayLabels- Kind
- property
- Type
readonly ReactNode[]- Requirement
- optional
Root
valueRootts
export declare const Root: import("react").ForwardRefExoticComponent<CalendarRootProps & import("react").RefAttributes<HTMLDivElement>>;Name
Kind
Type
Requirement
propsparameter
Prequired
returnreturn value
ReactNoden/a
- Name
props- Kind
- parameter
- Type
P- Requirement
- required
- Name
return- Kind
- return value
- Type
ReactNode- Requirement
- n/a
RootProvider
valueRootProviderts
export declare const RootProvider: import("react").ForwardRefExoticComponent<CalendarRootProviderProps & import("react").RefAttributes<HTMLDivElement>>;Name
Kind
Type
Requirement
propsparameter
Prequired
returnreturn value
ReactNoden/a
- Name
props- Kind
- parameter
- Type
P- Requirement
- required
- Name
return- Kind
- return value
- Type
ReactNode- Requirement
- n/a
useCalendar
functionuseCalendarts
declare function useCalendar(input: CalendarInput, options?: UseCalendarOptions): UseCalendarResult;Name
Kind
Type
Requirement
inputparameter
CalendarInputrequired
optionsparameter
UseCalendarOptionsoptional
returnreturn value
UseCalendarResultn/a
- Name
input- Kind
- parameter
- Type
CalendarInput- Requirement
- required
- Name
options- Kind
- parameter
- Type
UseCalendarOptions- Requirement
- optional
- Name
return- Kind
- return value
- Type
UseCalendarResult- Requirement
- n/a
UseCalendarOptions
interfaceUseCalendarOptionsts
interface UseCalendarOptions { readonly id?: string; readonly ariaLabel?: string; readonly dayLabel?: (value: string) => string; readonly onValueChange?: (detail: { readonly value: string; readonly reason: string; }) => void;}Name
Kind
Type
Requirement
ariaLabelproperty
stringoptional
dayLabelproperty
(value: string) => stringoptional
idproperty
stringoptional
onValueChangeproperty
(detail: {
readonly value: string;
readonly reason: string;
}) => voidoptional
- Name
ariaLabel- Kind
- property
- Type
string- Requirement
- optional
- Name
dayLabel- Kind
- property
- Type
(value: string) => string- Requirement
- optional
- Name
id- Kind
- property
- Type
string- Requirement
- optional
- Name
onValueChange- Kind
- property
- Type
(detail: { readonly value: string; readonly reason: string; }) => void- Requirement
- optional
UseCalendarResult
interfaceUseCalendarResultts
interface UseCalendarResult { readonly service: CalendarService; readonly connector: CalendarApi; readonly snapshot: CalendarSnapshot;}Name
Kind
Type
Requirement
connectorproperty
CalendarApirequired
serviceproperty
CalendarServicerequired
snapshotproperty
CalendarSnapshotrequired
- Name
connector- Kind
- property
- Type
CalendarApi- Requirement
- required
- Name
service- Kind
- property
- Type
CalendarService- Requirement
- required
- Name
snapshot- Kind
- property
- Type
CalendarSnapshot- Requirement
- required
@grassroot/ui-headless-vue/calendar
Vue adapter
Root
valueRootts
export declare const Root: import("vue").DefineComponent<import("vue").ExtractPropTypes<{ value: PropType<string | null | undefined>; defaultValue: PropType<string | null | undefined>; today: StringConstructor; weekStartsOn: NumberConstructor; id: StringConstructor; ariaLabel: StringConstructor; dayLabel: PropType<(value: string) => string>; monthLabel: PropType<CalendarMonthLabel>; weekdayLabels: PropType<readonly unknown[]>;}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, { [key: string]: any;}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, { valueChange: (_detail: unknown) => true;}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ value: PropType<string | null | undefined>; defaultValue: PropType<string | null | undefined>; today: StringConstructor; weekStartsOn: NumberConstructor; id: StringConstructor; ariaLabel: StringConstructor; dayLabel: PropType<(value: string) => string>; monthLabel: PropType<CalendarMonthLabel>; weekdayLabels: PropType<readonly unknown[]>;}>> & Readonly<{ onValueChange?: ((_detail: unknown) => any) | undefined;}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;RootProvider
valueRootProviderts
export declare const RootProvider: import("vue").DefineComponent<import("vue").ExtractPropTypes<{ value: { type: PropType<UseCalendarResult>; required: true; }; monthLabel: PropType<CalendarMonthLabel>; weekdayLabels: PropType<readonly unknown[]>;}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, { [key: string]: any;}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ value: { type: PropType<UseCalendarResult>; required: true; }; monthLabel: PropType<CalendarMonthLabel>; weekdayLabels: PropType<readonly unknown[]>;}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;useCalendar
functionuseCalendarts
declare function useCalendar(input: () => CalendarInput, options?: () => CalendarOptions): UseCalendarResult;Name
Kind
Type
Requirement
inputparameter
() => CalendarInputrequired
optionsparameter
() => CalendarOptionsoptional
returnreturn value
UseCalendarResultn/a
- Name
input- Kind
- parameter
- Type
() => CalendarInput- Requirement
- required
- Name
options- Kind
- parameter
- Type
() => CalendarOptions- Requirement
- optional
- Name
return- Kind
- return value
- Type
UseCalendarResult- Requirement
- n/a
UseCalendarResult
interfaceUseCalendarResultts
interface UseCalendarResult { readonly service: CalendarService; readonly connector: CalendarApi; readonly snapshot: ShallowRef<CalendarSnapshot>;}Name
Kind
Type
Requirement
connectorproperty
CalendarApirequired
serviceproperty
CalendarServicerequired
snapshotproperty
ShallowRef<CalendarSnapshot>required
- Name
connector- Kind
- property
- Type
CalendarApi- Requirement
- required
- Name
service- Kind
- property
- Type
CalendarService- Requirement
- required
- Name
snapshot- Kind
- property
- Type
ShallowRef<CalendarSnapshot>- Requirement
- required
@grassroot/ui-headless-angular/calendar
Angular adapter
CalendarStore
interfaceCalendarStorets
export interface CalendarStore { readonly service: CalendarService; readonly connector: CalendarApi; readonly scope: PartScope; readonly version: WritableSignal<number>; start(): void; stop(): void; sync(input: Record<string, unknown>): void; syncOptions(options: Record<string, unknown>): void;}Name
Kind
Type
Requirement
connectorproperty
CalendarApirequired
scopeproperty
PartScoperequired
serviceproperty
CalendarServicerequired
startmethod
() => voidrequired
stopmethod
() => voidrequired
syncmethod
(input: Record<string, unknown>) => voidrequired
syncOptionsmethod
(options: Record<string, unknown>) => voidrequired
versionproperty
WritableSignal<number>required
- Name
connector- Kind
- property
- Type
CalendarApi- Requirement
- required
- Name
scope- Kind
- property
- Type
PartScope- Requirement
- required
- Name
service- Kind
- property
- Type
CalendarService- Requirement
- required
- Name
start- Kind
- method
- Type
() => void- Requirement
- required
- Name
stop- Kind
- method
- Type
() => void- Requirement
- required
- Name
sync- Kind
- method
- Type
(input: Record<string, unknown>) => void- Requirement
- required
- Name
syncOptions- Kind
- method
- Type
(options: Record<string, unknown>) => void- Requirement
- required
- Name
version- Kind
- property
- Type
WritableSignal<number>- Requirement
- required
createCalendarStore
functioncreateCalendarStorets
export declare function createCalendarStore(initial: Record<string, unknown>, options?: CalendarOptions): CalendarStore;Name
Kind
Type
Requirement
initialparameter
Record<string, unknown>required
optionsparameter
CalendarOptionsoptional
returnreturn value
CalendarStoren/a
- Name
initial- Kind
- parameter
- Type
Record<string, unknown>- Requirement
- required
- Name
options- Kind
- parameter
- Type
CalendarOptions- Requirement
- optional
- Name
return- Kind
- return value
- Type
CalendarStore- Requirement
- n/a
GrCalendarDay
classGrCalendarDayts
export declare class GrCalendarDay { static ɵfac: i0.ɵɵFactoryDeclaration<GrCalendarDay, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<GrCalendarDay, "[grCalendarDay]", never, {}, {}, never, never, true, never>;}Name
Kind
Type
Requirement
ɵdirproperty
i0.ɵɵDirectiveDeclaration<GrCalendarDay, "[grCalendarDay]", never, {}, {}, never, never, true, never>required
ɵfacproperty
i0.ɵɵFactoryDeclaration<GrCalendarDay, never>required
- Name
ɵdir- Kind
- property
- Type
i0.ɵɵDirectiveDeclaration<GrCalendarDay, "[grCalendarDay]", never, {}, {}, never, never, true, never>- Requirement
- required
- Name
ɵfac- Kind
- property
- Type
i0.ɵɵFactoryDeclaration<GrCalendarDay, never>- Requirement
- required
GrCalendarRoot
classGrCalendarRootts
export declare class GrCalendarRoot implements OnDestroy { readonly value: import("@angular/core").InputSignal<string | null | undefined>; readonly defaultValue: import("@angular/core").InputSignal<string | null | undefined>; readonly today: import("@angular/core").InputSignal<string | undefined>; readonly weekStartsOn: import("@angular/core").InputSignal<number | undefined>; readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>; readonly dayLabel: import("@angular/core").InputSignal<((value: string) => string) | undefined>; readonly monthLabel: import("@angular/core").InputSignal<((year: number, month: number) => string) | undefined>; readonly weekdayLabels: import("@angular/core").InputSignal<readonly string[] | undefined>; readonly valueChange: import("@angular/core").OutputEmitterRef<{ value: string; reason: string; }>; readonly store: CalendarStore; private readonly host; private readonly parts; private last; constructor(); private applyParts; private ensureGrid; private apply; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<GrCalendarRoot, never>; static ɵcmp: i0.ɵɵComponentDeclaration<GrCalendarRoot, "gr-calendar-root", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "defaultValue": { "alias": "defaultValue"; "required": false; "isSignal": true; }; "today": { "alias": "today"; "required": false; "isSignal": true; }; "weekStartsOn": { "alias": "weekStartsOn"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "dayLabel": { "alias": "dayLabel"; "required": false; "isSignal": true; }; "monthLabel": { "alias": "monthLabel"; "required": false; "isSignal": true; }; "weekdayLabels": { "alias": "weekdayLabels"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;}Name
Kind
Type
Requirement
applyproperty
anyrequired
applyPartsproperty
anyrequired
ariaLabelproperty
import("@angular/core").InputSignal<string | undefined>required
dayLabelproperty
import("@angular/core").InputSignal<((value: string) => string) | undefined>required
defaultValueproperty
import("@angular/core").InputSignal<string | null | undefined>required
ensureGridproperty
anyrequired
hostproperty
anyrequired
lastproperty
anyrequired
monthLabelproperty
import("@angular/core").InputSignal<((year: number, month: number) => string) | undefined>required
ngOnDestroymethod
() => voidrequired
ɵcmpproperty
i0.ɵɵComponentDeclaration<GrCalendarRoot, "gr-calendar-root", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "defaultValue": { "alias": "defaultValue"; "required": false; "isSignal": true; }; "today": { "alias": "today"; "required": false; "isSignal": true; }; "weekStartsOn": { "alias": "weekStartsOn"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "dayLabel": { "alias": "dayLabel"; "required": false; "isSignal": true; }; "monthLabel": { "alias": "monthLabel"; "required": false; "isSignal": true; }; "weekdayLabels": { "alias": "weekdayLabels"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; }, never, never, true, never>required
ɵfacproperty
i0.ɵɵFactoryDeclaration<GrCalendarRoot, never>required
partsproperty
anyrequired
storeproperty
CalendarStorerequired
- Name
apply- Kind
- property
- Type
any- Requirement
- required
- Name
applyParts- Kind
- property
- Type
any- Requirement
- required
- Name
ariaLabel- Kind
- property
- Type
import("@angular/core").InputSignal<string | undefined>- Requirement
- required
- Name
dayLabel- Kind
- property
- Type
import("@angular/core").InputSignal<((value: string) => string) | undefined>- Requirement
- required
- Name
defaultValue- Kind
- property
- Type
import("@angular/core").InputSignal<string | null | undefined>- Requirement
- required
- Name
ensureGrid- Kind
- property
- Type
any- Requirement
- required
- Name
host- Kind
- property
- Type
any- Requirement
- required
- Name
last- Kind
- property
- Type
any- Requirement
- required
- Name
monthLabel- Kind
- property
- Type
import("@angular/core").InputSignal<((year: number, month: number) => string) | undefined>- Requirement
- required
- Name
ngOnDestroy- Kind
- method
- Type
() => void- Requirement
- required
- Name
ɵcmp- Kind
- property
- Type
i0.ɵɵComponentDeclaration<GrCalendarRoot, "gr-calendar-root", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "defaultValue": { "alias": "defaultValue"; "required": false; "isSignal": true; }; "today": { "alias": "today"; "required": false; "isSignal": true; }; "weekStartsOn": { "alias": "weekStartsOn"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "dayLabel": { "alias": "dayLabel"; "required": false; "isSignal": true; }; "monthLabel": { "alias": "monthLabel"; "required": false; "isSignal": true; }; "weekdayLabels": { "alias": "weekdayLabels"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; }, never, never, true, never>- Requirement
- required
- Name
ɵfac- Kind
- property
- Type
i0.ɵɵFactoryDeclaration<GrCalendarRoot, never>- Requirement
- required
- Name
parts- Kind
- property
- Type
any- Requirement
- required
- Name
store- Kind
- property
- Type
CalendarStore- Requirement
- required
- Name
today- Kind
- property
- Type
import("@angular/core").InputSignal<string | undefined>- Requirement
- required
- Name
value- Kind
- property
- Type
import("@angular/core").InputSignal<string | null | undefined>- Requirement
- required
- Name
valueChange- Kind
- property
- Type
import("@angular/core").OutputEmitterRef<{ value: string; reason: string; }>- Requirement
- required
- Name
weekdayLabels- Kind
- property
- Type
import("@angular/core").InputSignal<readonly string[] | undefined>- Requirement
- required
- Name
weekStartsOn- Kind
- property
- Type
import("@angular/core").InputSignal<number | undefined>- Requirement
- required
GrCalendarRootProvider
classGrCalendarRootProviderts
export declare class GrCalendarRootProvider implements OnDestroy { private readonly store; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<GrCalendarRootProvider, never>; static ɵcmp: i0.ɵɵComponentDeclaration<GrCalendarRootProvider, "gr-calendar-root-provider", never, {}, {}, never, ["*"], true, never>;}Name
Kind
Type
Requirement
ngOnDestroymethod
() => voidrequired
ɵcmpproperty
i0.ɵɵComponentDeclaration<GrCalendarRootProvider, "gr-calendar-root-provider", never, {}, {}, never, ["*"], true, never>required
ɵfacproperty
i0.ɵɵFactoryDeclaration<GrCalendarRootProvider, never>required
storeproperty
anyrequired
- Name
ngOnDestroy- Kind
- method
- Type
() => void- Requirement
- required
- Name
ɵcmp- Kind
- property
- Type
i0.ɵɵComponentDeclaration<GrCalendarRootProvider, "gr-calendar-root-provider", never, {}, {}, never, ["*"], true, never>- Requirement
- required
- Name
ɵfac- Kind
- property
- Type
i0.ɵɵFactoryDeclaration<GrCalendarRootProvider, never>- Requirement
- required
- Name
store- Kind
- property
- Type
any- Requirement
- required
@grassroot/ui-headless-svelte/calendar
Svelte adapter
createCalendar
functioncreateCalendarts
export declare function createCalendar(input: () => CalendarInput, options?: UseCalendarOptions): UseCalendarResult;Name
Kind
Type
Requirement
inputparameter
() => CalendarInputrequired
optionsparameter
UseCalendarOptionsoptional
returnreturn value
UseCalendarResultn/a
- Name
input- Kind
- parameter
- Type
() => CalendarInput- Requirement
- required
- Name
options- Kind
- parameter
- Type
UseCalendarOptions- Requirement
- optional
- Name
return- Kind
- return value
- Type
UseCalendarResult- Requirement
- n/a
Root
valueRootts
export declare const Root: LegacyComponentType;Name
Kind
Type
Requirement
argsparameter
Parameters<Component<Record<string, any>>>optional
returnreturn value
ReturnType<Component<Record<string, any>, Record<string, any>>>n/a
- Name
args- Kind
- parameter
- Type
Parameters<Component<Record<string, any>>>- Requirement
- optional
- Name
return- Kind
- return value
- Type
ReturnType<Component<Record<string, any>, Record<string, any>>>- Requirement
- n/a
UseCalendarOptions
interfaceUseCalendarOptionsts
export interface UseCalendarOptions { id?: string; ariaLabel?: string; dayLabel?: (value: string) => string; onValueChange?: (detail: { value: string; reason: string; }) => void;}Name
Kind
Type
Requirement
ariaLabelproperty
stringoptional
dayLabelproperty
(value: string) => stringoptional
idproperty
stringoptional
onValueChangeproperty
(detail: {
value: string;
reason: string;
}) => voidoptional
- Name
ariaLabel- Kind
- property
- Type
string- Requirement
- optional
- Name
dayLabel- Kind
- property
- Type
(value: string) => string- Requirement
- optional
- Name
id- Kind
- property
- Type
string- Requirement
- optional
- Name
onValueChange- Kind
- property
- Type
(detail: { value: string; reason: string; }) => void- Requirement
- optional
UseCalendarResult
interfaceUseCalendarResultts
export interface UseCalendarResult { service: CalendarService; connector: CalendarApi; version: () => number;}Name
Kind
Type
Requirement
connectorproperty
CalendarApirequired
serviceproperty
CalendarServicerequired
versionproperty
() => numberrequired
- Name
connector- Kind
- property
- Type
CalendarApi- Requirement
- required
- Name
service- Kind
- property
- Type
CalendarService- Requirement
- required
- Name
version- Kind
- property
- Type
() => number- Requirement
- required
@grassroot/ui-headless-solid/calendar
Solid adapter
CalendarRootProps
interfaceCalendarRootPropsts
export interface CalendarRootProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, "onChange">, CalendarInput { id?: string; ariaLabel?: string; dayLabel?: (value: string) => string; onValueChange?: (detail: { value: string; reason: string; }) => void; monthLabel?: (year: number, month: number) => JSX.Element; weekdayLabels?: readonly JSX.Element[];}Name
Kind
Type
Requirement
ariaLabelproperty
stringoptional
dayLabelproperty
(value: string) => stringoptional
idproperty
stringoptional
monthLabelproperty
(year: number, month: number) => JSX.Elementoptional
onValueChangeproperty
(detail: {
value: string;
reason: string;
}) => voidoptional
weekdayLabelsproperty
readonly JSX.Element[]optional
- Name
ariaLabel- Kind
- property
- Type
string- Requirement
- optional
- Name
dayLabel- Kind
- property
- Type
(value: string) => string- Requirement
- optional
- Name
id- Kind
- property
- Type
string- Requirement
- optional
- Name
monthLabel- Kind
- property
- Type
(year: number, month: number) => JSX.Element- Requirement
- optional
- Name
onValueChange- Kind
- property
- Type
(detail: { value: string; reason: string; }) => void- Requirement
- optional
- Name
weekdayLabels- Kind
- property
- Type
readonly JSX.Element[]- Requirement
- optional
Root
functionRootts
export declare function Root(props: CalendarRootProps): JSX.Element;Name
Kind
Type
Requirement
propsparameter
CalendarRootPropsrequired
returnreturn value
JSX.Elementn/a
- Name
props- Kind
- parameter
- Type
CalendarRootProps- Requirement
- required
- Name
return- Kind
- return value
- Type
JSX.Element- Requirement
- n/a
RootProvider
functionRootProviderts
export declare function RootProvider(props: { value: UseCalendarResult;} & JSX.HTMLAttributes<HTMLDivElement>): JSX.Element;Name
Kind
Type
Requirement
propsparameter
{
value: UseCalendarResult;
} & JSX.HTMLAttributes<HTMLDivElement>required
returnreturn value
JSX.Elementn/a
- Name
props- Kind
- parameter
- Type
{ value: UseCalendarResult; } & JSX.HTMLAttributes<HTMLDivElement>- Requirement
- required
- Name
return- Kind
- return value
- Type
JSX.Element- Requirement
- n/a
useCalendar
functionuseCalendarts
export declare function useCalendar(input: () => CalendarInput, options?: UseCalendarOptions): UseCalendarResult;Name
Kind
Type
Requirement
inputparameter
() => CalendarInputrequired
optionsparameter
UseCalendarOptionsoptional
returnreturn value
UseCalendarResultn/a
- Name
input- Kind
- parameter
- Type
() => CalendarInput- Requirement
- required
- Name
options- Kind
- parameter
- Type
UseCalendarOptions- Requirement
- optional
- Name
return- Kind
- return value
- Type
UseCalendarResult- Requirement
- n/a
UseCalendarResult
interfaceUseCalendarResultts
export interface UseCalendarResult { readonly service: CalendarService; readonly connector: CalendarApi; readonly snapshot: Accessor<CalendarSnapshot>;}Name
Kind
Type
Requirement
connectorproperty
CalendarApirequired
serviceproperty
CalendarServicerequired
snapshotproperty
Accessor<CalendarSnapshot>required
- Name
connector- Kind
- property
- Type
CalendarApi- Requirement
- required
- Name
service- Kind
- property
- Type
CalendarService- Requirement
- required
- Name
snapshot- Kind
- property
- Type
Accessor<CalendarSnapshot>- Requirement
- required