@proyecto-viviana/solid-stately 0.1.5 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/dist/index.js +226 -504
  2. package/dist/index.jsx +6407 -0
  3. package/package.json +3 -5
  4. package/dist/index.js.map +0 -1
  5. package/src/autocomplete/createAutocompleteState.d.ts +0 -46
  6. package/src/autocomplete/createAutocompleteState.d.ts.map +0 -1
  7. package/src/autocomplete/createAutocompleteState.ts +0 -90
  8. package/src/autocomplete/index.d.ts +0 -2
  9. package/src/autocomplete/index.d.ts.map +0 -1
  10. package/src/autocomplete/index.ts +0 -5
  11. package/src/calendar/createCalendarState.d.ts +0 -130
  12. package/src/calendar/createCalendarState.d.ts.map +0 -1
  13. package/src/calendar/createCalendarState.ts +0 -461
  14. package/src/calendar/createDateFieldState.d.ts +0 -110
  15. package/src/calendar/createDateFieldState.d.ts.map +0 -1
  16. package/src/calendar/createDateFieldState.ts +0 -562
  17. package/src/calendar/createRangeCalendarState.d.ts +0 -146
  18. package/src/calendar/createRangeCalendarState.d.ts.map +0 -1
  19. package/src/calendar/createRangeCalendarState.ts +0 -535
  20. package/src/calendar/createTimeFieldState.d.ts +0 -95
  21. package/src/calendar/createTimeFieldState.d.ts.map +0 -1
  22. package/src/calendar/createTimeFieldState.ts +0 -483
  23. package/src/calendar/index.d.ts +0 -7
  24. package/src/calendar/index.d.ts.map +0 -1
  25. package/src/calendar/index.ts +0 -81
  26. package/src/checkbox/createCheckboxGroupState.d.ts +0 -71
  27. package/src/checkbox/createCheckboxGroupState.d.ts.map +0 -1
  28. package/src/checkbox/createCheckboxGroupState.ts +0 -193
  29. package/src/checkbox/index.d.ts +0 -2
  30. package/src/checkbox/index.d.ts.map +0 -1
  31. package/src/checkbox/index.ts +0 -5
  32. package/src/collections/ListCollection.d.ts +0 -37
  33. package/src/collections/ListCollection.d.ts.map +0 -1
  34. package/src/collections/ListCollection.ts +0 -146
  35. package/src/collections/createListState.d.ts +0 -79
  36. package/src/collections/createListState.d.ts.map +0 -1
  37. package/src/collections/createListState.ts +0 -264
  38. package/src/collections/createMenuState.d.ts +0 -50
  39. package/src/collections/createMenuState.d.ts.map +0 -1
  40. package/src/collections/createMenuState.ts +0 -106
  41. package/src/collections/createSelectionState.d.ts +0 -76
  42. package/src/collections/createSelectionState.d.ts.map +0 -1
  43. package/src/collections/createSelectionState.ts +0 -336
  44. package/src/collections/index.d.ts +0 -6
  45. package/src/collections/index.d.ts.map +0 -1
  46. package/src/collections/index.ts +0 -46
  47. package/src/collections/types.d.ts +0 -147
  48. package/src/collections/types.d.ts.map +0 -1
  49. package/src/collections/types.ts +0 -169
  50. package/src/color/Color.d.ts +0 -28
  51. package/src/color/Color.d.ts.map +0 -1
  52. package/src/color/Color.ts +0 -951
  53. package/src/color/createColorAreaState.d.ts +0 -76
  54. package/src/color/createColorAreaState.d.ts.map +0 -1
  55. package/src/color/createColorAreaState.ts +0 -293
  56. package/src/color/createColorFieldState.d.ts +0 -55
  57. package/src/color/createColorFieldState.d.ts.map +0 -1
  58. package/src/color/createColorFieldState.ts +0 -292
  59. package/src/color/createColorSliderState.d.ts +0 -67
  60. package/src/color/createColorSliderState.d.ts.map +0 -1
  61. package/src/color/createColorSliderState.ts +0 -241
  62. package/src/color/createColorWheelState.d.ts +0 -51
  63. package/src/color/createColorWheelState.d.ts.map +0 -1
  64. package/src/color/createColorWheelState.ts +0 -211
  65. package/src/color/index.d.ts +0 -10
  66. package/src/color/index.d.ts.map +0 -1
  67. package/src/color/index.ts +0 -47
  68. package/src/color/types.d.ts +0 -106
  69. package/src/color/types.d.ts.map +0 -1
  70. package/src/color/types.ts +0 -127
  71. package/src/combobox/createComboBoxState.d.ts +0 -125
  72. package/src/combobox/createComboBoxState.d.ts.map +0 -1
  73. package/src/combobox/createComboBoxState.ts +0 -703
  74. package/src/combobox/index.d.ts +0 -5
  75. package/src/combobox/index.d.ts.map +0 -1
  76. package/src/combobox/index.ts +0 -13
  77. package/src/disclosure/createDisclosureState.d.ts +0 -64
  78. package/src/disclosure/createDisclosureState.d.ts.map +0 -1
  79. package/src/disclosure/createDisclosureState.ts +0 -193
  80. package/src/disclosure/index.d.ts +0 -2
  81. package/src/disclosure/index.d.ts.map +0 -1
  82. package/src/disclosure/index.ts +0 -9
  83. package/src/dnd/createDragState.d.ts +0 -59
  84. package/src/dnd/createDragState.d.ts.map +0 -1
  85. package/src/dnd/createDragState.ts +0 -153
  86. package/src/dnd/createDraggableCollectionState.d.ts +0 -57
  87. package/src/dnd/createDraggableCollectionState.d.ts.map +0 -1
  88. package/src/dnd/createDraggableCollectionState.ts +0 -165
  89. package/src/dnd/createDropState.d.ts +0 -61
  90. package/src/dnd/createDropState.d.ts.map +0 -1
  91. package/src/dnd/createDropState.ts +0 -212
  92. package/src/dnd/createDroppableCollectionState.d.ts +0 -78
  93. package/src/dnd/createDroppableCollectionState.d.ts.map +0 -1
  94. package/src/dnd/createDroppableCollectionState.ts +0 -357
  95. package/src/dnd/index.d.ts +0 -11
  96. package/src/dnd/index.d.ts.map +0 -1
  97. package/src/dnd/index.ts +0 -76
  98. package/src/dnd/types.d.ts +0 -264
  99. package/src/dnd/types.d.ts.map +0 -1
  100. package/src/dnd/types.ts +0 -317
  101. package/src/form/createFormValidationState.d.ts +0 -100
  102. package/src/form/createFormValidationState.d.ts.map +0 -1
  103. package/src/form/createFormValidationState.ts +0 -389
  104. package/src/form/index.d.ts +0 -2
  105. package/src/form/index.d.ts.map +0 -1
  106. package/src/form/index.ts +0 -15
  107. package/src/grid/createGridState.d.ts +0 -12
  108. package/src/grid/createGridState.d.ts.map +0 -1
  109. package/src/grid/createGridState.ts +0 -327
  110. package/src/grid/index.d.ts +0 -7
  111. package/src/grid/index.d.ts.map +0 -1
  112. package/src/grid/index.ts +0 -13
  113. package/src/grid/types.d.ts +0 -156
  114. package/src/grid/types.d.ts.map +0 -1
  115. package/src/grid/types.ts +0 -179
  116. package/src/index.d.ts +0 -26
  117. package/src/index.d.ts.map +0 -1
  118. package/src/index.ts +0 -383
  119. package/src/numberfield/createNumberFieldState.d.ts +0 -65
  120. package/src/numberfield/createNumberFieldState.d.ts.map +0 -1
  121. package/src/numberfield/createNumberFieldState.ts +0 -383
  122. package/src/numberfield/index.d.ts +0 -2
  123. package/src/numberfield/index.d.ts.map +0 -1
  124. package/src/numberfield/index.ts +0 -5
  125. package/src/overlays/createOverlayTriggerState.d.ts +0 -32
  126. package/src/overlays/createOverlayTriggerState.d.ts.map +0 -1
  127. package/src/overlays/createOverlayTriggerState.ts +0 -67
  128. package/src/overlays/index.d.ts +0 -2
  129. package/src/overlays/index.d.ts.map +0 -1
  130. package/src/overlays/index.ts +0 -5
  131. package/src/radio/createRadioGroupState.d.ts +0 -77
  132. package/src/radio/createRadioGroupState.d.ts.map +0 -1
  133. package/src/radio/createRadioGroupState.ts +0 -201
  134. package/src/radio/index.d.ts +0 -2
  135. package/src/radio/index.d.ts.map +0 -1
  136. package/src/radio/index.ts +0 -6
  137. package/src/searchfield/createSearchFieldState.d.ts +0 -25
  138. package/src/searchfield/createSearchFieldState.d.ts.map +0 -1
  139. package/src/searchfield/createSearchFieldState.ts +0 -62
  140. package/src/searchfield/index.d.ts +0 -3
  141. package/src/searchfield/index.d.ts.map +0 -1
  142. package/src/searchfield/index.ts +0 -5
  143. package/src/select/createSelectState.d.ts +0 -73
  144. package/src/select/createSelectState.d.ts.map +0 -1
  145. package/src/select/createSelectState.ts +0 -181
  146. package/src/select/index.d.ts +0 -2
  147. package/src/select/index.d.ts.map +0 -1
  148. package/src/select/index.ts +0 -5
  149. package/src/slider/createSliderState.d.ts +0 -72
  150. package/src/slider/createSliderState.d.ts.map +0 -1
  151. package/src/slider/createSliderState.ts +0 -211
  152. package/src/slider/index.d.ts +0 -3
  153. package/src/slider/index.d.ts.map +0 -1
  154. package/src/slider/index.ts +0 -6
  155. package/src/ssr/index.d.ts +0 -28
  156. package/src/ssr/index.d.ts.map +0 -1
  157. package/src/ssr/index.ts +0 -41
  158. package/src/table/TableCollection.d.ts +0 -52
  159. package/src/table/TableCollection.d.ts.map +0 -1
  160. package/src/table/TableCollection.ts +0 -388
  161. package/src/table/createTableState.d.ts +0 -12
  162. package/src/table/createTableState.d.ts.map +0 -1
  163. package/src/table/createTableState.ts +0 -127
  164. package/src/table/index.d.ts +0 -8
  165. package/src/table/index.d.ts.map +0 -1
  166. package/src/table/index.ts +0 -18
  167. package/src/table/types.d.ts +0 -139
  168. package/src/table/types.d.ts.map +0 -1
  169. package/src/table/types.ts +0 -150
  170. package/src/tabs/createTabListState.d.ts +0 -68
  171. package/src/tabs/createTabListState.d.ts.map +0 -1
  172. package/src/tabs/createTabListState.ts +0 -240
  173. package/src/tabs/index.d.ts +0 -2
  174. package/src/tabs/index.d.ts.map +0 -1
  175. package/src/tabs/index.ts +0 -7
  176. package/src/textfield/createTextFieldState.d.ts +0 -30
  177. package/src/textfield/createTextFieldState.d.ts.map +0 -1
  178. package/src/textfield/createTextFieldState.ts +0 -75
  179. package/src/textfield/index.d.ts +0 -2
  180. package/src/textfield/index.d.ts.map +0 -1
  181. package/src/textfield/index.ts +0 -5
  182. package/src/toast/createToastState.d.ts +0 -118
  183. package/src/toast/createToastState.d.ts.map +0 -1
  184. package/src/toast/createToastState.ts +0 -316
  185. package/src/toast/index.d.ts +0 -2
  186. package/src/toast/index.d.ts.map +0 -1
  187. package/src/toast/index.ts +0 -11
  188. package/src/toggle/createToggleState.d.ts +0 -34
  189. package/src/toggle/createToggleState.d.ts.map +0 -1
  190. package/src/toggle/createToggleState.ts +0 -94
  191. package/src/toggle/index.d.ts +0 -2
  192. package/src/toggle/index.d.ts.map +0 -1
  193. package/src/toggle/index.ts +0 -5
  194. package/src/tooltip/createTooltipTriggerState.d.ts +0 -39
  195. package/src/tooltip/createTooltipTriggerState.d.ts.map +0 -1
  196. package/src/tooltip/createTooltipTriggerState.ts +0 -183
  197. package/src/tooltip/index.d.ts +0 -2
  198. package/src/tooltip/index.d.ts.map +0 -1
  199. package/src/tooltip/index.ts +0 -6
  200. package/src/tree/TreeCollection.d.ts +0 -40
  201. package/src/tree/TreeCollection.d.ts.map +0 -1
  202. package/src/tree/TreeCollection.ts +0 -175
  203. package/src/tree/createTreeState.d.ts +0 -14
  204. package/src/tree/createTreeState.d.ts.map +0 -1
  205. package/src/tree/createTreeState.ts +0 -392
  206. package/src/tree/index.d.ts +0 -7
  207. package/src/tree/index.d.ts.map +0 -1
  208. package/src/tree/index.ts +0 -13
  209. package/src/tree/types.d.ts +0 -157
  210. package/src/tree/types.d.ts.map +0 -1
  211. package/src/tree/types.ts +0 -174
  212. package/src/utils/index.d.ts +0 -2
  213. package/src/utils/index.d.ts.map +0 -1
  214. package/src/utils/index.ts +0 -1
  215. package/src/utils/reactivity.d.ts +0 -28
  216. package/src/utils/reactivity.d.ts.map +0 -1
  217. package/src/utils/reactivity.ts +0 -36
@@ -1,46 +0,0 @@
1
- /**
2
- * createAutocompleteState - State management for autocomplete components
3
- *
4
- * Based on @react-stately/autocomplete useAutocompleteState.
5
- */
6
- import { type Accessor } from 'solid-js';
7
- export interface AutocompleteState {
8
- /** The current value of the autocomplete input. */
9
- inputValue: Accessor<string>;
10
- /** Sets the value of the autocomplete input. */
11
- setInputValue(value: string): void;
12
- /** The id of the current aria-activedescendant of the autocomplete input. */
13
- focusedNodeId: Accessor<string | null>;
14
- /** Sets the id of the current aria-activedescendant of the autocomplete input. */
15
- setFocusedNodeId(value: string | null): void;
16
- }
17
- export interface AutocompleteStateOptions {
18
- /** The value of the autocomplete input (controlled). */
19
- inputValue?: string;
20
- /** The default value of the autocomplete input (uncontrolled). */
21
- defaultInputValue?: string;
22
- /** Handler that is called when the autocomplete input value changes. */
23
- onInputChange?: (value: string) => void;
24
- }
25
- /**
26
- * Provides state management for an autocomplete component.
27
- *
28
- * @example
29
- * ```tsx
30
- * const state = createAutocompleteState({
31
- * defaultInputValue: '',
32
- * onInputChange: (value) => console.log('Input changed:', value),
33
- * });
34
- *
35
- * // Access current input value
36
- * console.log(state.inputValue());
37
- *
38
- * // Update input value
39
- * state.setInputValue('new value');
40
- *
41
- * // Track focused node for aria-activedescendant
42
- * state.setFocusedNodeId('item-1');
43
- * ```
44
- */
45
- export declare function createAutocompleteState(props?: AutocompleteStateOptions): AutocompleteState;
46
- //# sourceMappingURL=createAutocompleteState.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createAutocompleteState.d.ts","sourceRoot":"","sources":["createAutocompleteState.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAgB,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAA;AAMtD,MAAM,WAAW,iBAAiB;IAChC,mDAAmD;IACnD,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAA;IAC5B,gDAAgD;IAChD,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IAClC,6EAA6E;IAC7E,aAAa,EAAE,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IACtC,kFAAkF;IAClF,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;CAC7C;AAED,MAAM,WAAW,wBAAwB;IACvC,wDAAwD;IACxD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,kEAAkE;IAClE,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,wEAAwE;IACxE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CACxC;AAMD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,GAAE,wBAA6B,GACnC,iBAAiB,CA+BnB"}
@@ -1,90 +0,0 @@
1
- /**
2
- * createAutocompleteState - State management for autocomplete components
3
- *
4
- * Based on @react-stately/autocomplete useAutocompleteState.
5
- */
6
-
7
- import { createSignal, type Accessor } from 'solid-js'
8
-
9
- // ============================================
10
- // TYPES
11
- // ============================================
12
-
13
- export interface AutocompleteState {
14
- /** The current value of the autocomplete input. */
15
- inputValue: Accessor<string>
16
- /** Sets the value of the autocomplete input. */
17
- setInputValue(value: string): void
18
- /** The id of the current aria-activedescendant of the autocomplete input. */
19
- focusedNodeId: Accessor<string | null>
20
- /** Sets the id of the current aria-activedescendant of the autocomplete input. */
21
- setFocusedNodeId(value: string | null): void
22
- }
23
-
24
- export interface AutocompleteStateOptions {
25
- /** The value of the autocomplete input (controlled). */
26
- inputValue?: string
27
- /** The default value of the autocomplete input (uncontrolled). */
28
- defaultInputValue?: string
29
- /** Handler that is called when the autocomplete input value changes. */
30
- onInputChange?: (value: string) => void
31
- }
32
-
33
- // ============================================
34
- // CREATE AUTOCOMPLETE STATE
35
- // ============================================
36
-
37
- /**
38
- * Provides state management for an autocomplete component.
39
- *
40
- * @example
41
- * ```tsx
42
- * const state = createAutocompleteState({
43
- * defaultInputValue: '',
44
- * onInputChange: (value) => console.log('Input changed:', value),
45
- * });
46
- *
47
- * // Access current input value
48
- * console.log(state.inputValue());
49
- *
50
- * // Update input value
51
- * state.setInputValue('new value');
52
- *
53
- * // Track focused node for aria-activedescendant
54
- * state.setFocusedNodeId('item-1');
55
- * ```
56
- */
57
- export function createAutocompleteState(
58
- props: AutocompleteStateOptions = {}
59
- ): AutocompleteState {
60
- const {
61
- inputValue: controlledInputValue,
62
- defaultInputValue = '',
63
- onInputChange,
64
- } = props
65
-
66
- // Track focused node ID for aria-activedescendant
67
- const [focusedNodeId, setFocusedNodeId] = createSignal<string | null>(null)
68
-
69
- // Handle controlled vs uncontrolled input value
70
- const isControlled = controlledInputValue !== undefined
71
- const [uncontrolledValue, setUncontrolledValue] = createSignal(defaultInputValue)
72
-
73
- const inputValue: Accessor<string> = () => {
74
- return isControlled ? controlledInputValue : uncontrolledValue()
75
- }
76
-
77
- const setInputValue = (value: string) => {
78
- if (!isControlled) {
79
- setUncontrolledValue(value)
80
- }
81
- onInputChange?.(value)
82
- }
83
-
84
- return {
85
- inputValue,
86
- setInputValue,
87
- focusedNodeId,
88
- setFocusedNodeId,
89
- }
90
- }
@@ -1,2 +0,0 @@
1
- export { createAutocompleteState, type AutocompleteState, type AutocompleteStateOptions, } from './createAutocompleteState';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,GAC9B,MAAM,2BAA2B,CAAA"}
@@ -1,5 +0,0 @@
1
- export {
2
- createAutocompleteState,
3
- type AutocompleteState,
4
- type AutocompleteStateOptions,
5
- } from './createAutocompleteState'
@@ -1,130 +0,0 @@
1
- /**
2
- * CalendarState for Solid-Stately
3
- *
4
- * Provides state management for calendar components.
5
- * Based on @react-stately/calendar useCalendarState
6
- */
7
- import { type Accessor } from 'solid-js';
8
- import { type CalendarDate, type DateValue } from '@internationalized/date';
9
- import { type MaybeAccessor } from '../utils';
10
- export type ValidationState = 'valid' | 'invalid';
11
- export interface CalendarStateProps<T extends DateValue = DateValue> {
12
- /** The current value (controlled). */
13
- value?: MaybeAccessor<T | null>;
14
- /** The default value (uncontrolled). */
15
- defaultValue?: T | null;
16
- /** Handler called when the value changes. */
17
- onChange?: (value: T) => void;
18
- /** The minimum allowed date. */
19
- minValue?: MaybeAccessor<DateValue | undefined>;
20
- /** The maximum allowed date. */
21
- maxValue?: MaybeAccessor<DateValue | undefined>;
22
- /** Whether the calendar is disabled. */
23
- isDisabled?: MaybeAccessor<boolean>;
24
- /** Whether the calendar is read-only. */
25
- isReadOnly?: MaybeAccessor<boolean>;
26
- /** Whether dates outside the visible range are automatically focused. */
27
- autoFocus?: boolean;
28
- /** The date that is focused when the calendar first mounts. */
29
- focusedValue?: MaybeAccessor<DateValue | undefined>;
30
- /** The default focused date (uncontrolled). */
31
- defaultFocusedValue?: DateValue;
32
- /** Handler called when the focused date changes. */
33
- onFocusChange?: (date: CalendarDate) => void;
34
- /** The locale to use for formatting. */
35
- locale?: string;
36
- /** Callback that is called for each date in the calendar to determine if it is unavailable. */
37
- isDateUnavailable?: (date: DateValue) => boolean;
38
- /** The number of months to display at once. */
39
- visibleMonths?: number;
40
- /** Whether to automatically focus the calendar when it is mounted. */
41
- autoFocusOnMount?: boolean;
42
- /** Controls which days are disabled. */
43
- isDateDisabled?: (date: DateValue) => boolean;
44
- /** Validation state. */
45
- validationState?: MaybeAccessor<ValidationState | undefined>;
46
- /** Error message. */
47
- errorMessage?: string;
48
- /** The first day of the week (0 = Sunday, 1 = Monday, etc.). */
49
- firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
50
- }
51
- export interface CalendarState<T extends DateValue = DateValue> {
52
- /** The currently selected date. */
53
- value: Accessor<T | null>;
54
- /** Sets the selected date. */
55
- setValue: (value: T | null) => void;
56
- /** The currently focused date. */
57
- focusedDate: Accessor<CalendarDate>;
58
- /** Sets the focused date. */
59
- setFocusedDate: (date: CalendarDate) => void;
60
- /** Whether the calendar is disabled. */
61
- isDisabled: Accessor<boolean>;
62
- /** Whether the calendar is read-only. */
63
- isReadOnly: Accessor<boolean>;
64
- /** The visible date range (first and last day of visible month(s)). */
65
- visibleRange: Accessor<{
66
- start: CalendarDate;
67
- end: CalendarDate;
68
- }>;
69
- /** The timezone used for date calculations. */
70
- timeZone: string;
71
- /** The validation state. */
72
- validationState: Accessor<ValidationState | undefined>;
73
- /** Whether a date is selected. */
74
- isSelected: (date: DateValue) => boolean;
75
- /** Whether a date is focused. */
76
- isCellFocused: (date: DateValue) => boolean;
77
- /** Whether a date is unavailable. */
78
- isCellUnavailable: (date: DateValue) => boolean;
79
- /** Whether a date is disabled. */
80
- isCellDisabled: (date: DateValue) => boolean;
81
- /** Whether a date is outside the visible range. */
82
- isOutsideVisibleRange: (date: DateValue) => boolean;
83
- /** Whether a date is invalid. */
84
- isInvalid: (date: DateValue) => boolean;
85
- /** Moves focus to the previous page (month). */
86
- focusPreviousPage: () => void;
87
- /** Moves focus to the next page (month). */
88
- focusNextPage: () => void;
89
- /** Moves focus to the previous section (year). */
90
- focusPreviousSection: () => void;
91
- /** Moves focus to the next section (year). */
92
- focusNextSection: () => void;
93
- /** Moves focus to the previous day. */
94
- focusPreviousDay: () => void;
95
- /** Moves focus to the next day. */
96
- focusNextDay: () => void;
97
- /** Moves focus to the previous week. */
98
- focusPreviousWeek: () => void;
99
- /** Moves focus to the next week. */
100
- focusNextWeek: () => void;
101
- /** Moves focus to the start of the month. */
102
- focusPageStart: () => void;
103
- /** Moves focus to the end of the month. */
104
- focusPageEnd: () => void;
105
- /** Selects the focused date. */
106
- selectFocusedDate: () => void;
107
- /** Selects a specific date. */
108
- selectDate: (date: CalendarDate) => void;
109
- /** Whether focus is currently within the calendar. */
110
- isFocused: Accessor<boolean>;
111
- /** Sets whether focus is within the calendar. */
112
- setFocused: (focused: boolean) => void;
113
- /** Gets the dates for a week in the visible range. */
114
- getDatesInWeek: (weekIndex: number, monthStartDate?: CalendarDate) => (CalendarDate | null)[];
115
- /** Gets the number of weeks in a month. */
116
- getWeeksInMonth: (date?: CalendarDate) => number;
117
- /** The week day headers. */
118
- weekDays: Accessor<string[]>;
119
- /** The title for the calendar (formatted month and year). */
120
- title: Accessor<string>;
121
- /** The number of visible months. */
122
- visibleMonths: number;
123
- /** Whether the calendar is paginating (for animations). */
124
- isPaginating: Accessor<boolean>;
125
- }
126
- /**
127
- * Provides state management for a calendar component.
128
- */
129
- export declare function createCalendarState<T extends DateValue = CalendarDate>(props?: CalendarStateProps<T>): CalendarState<T>;
130
- //# sourceMappingURL=createCalendarState.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createCalendarState.d.ts","sourceRoot":"","sources":["createCalendarState.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAA4B,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AACnE,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,SAAS,EAYf,MAAM,yBAA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