@proyecto-viviana/solid-stately 0.2.7 → 0.3.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 (242) hide show
  1. package/README.md +30 -283
  2. package/dist/autocomplete/createAutocompleteState.d.ts +2 -2
  3. package/dist/autocomplete/index.d.ts +1 -1
  4. package/dist/calendar/createCalendarState.d.ts +22 -7
  5. package/dist/calendar/createDateFieldState.d.ts +30 -7
  6. package/dist/calendar/createDatePickerState.d.ts +60 -0
  7. package/dist/calendar/createRangeCalendarState.d.ts +27 -8
  8. package/dist/calendar/createTimeFieldState.d.ts +34 -7
  9. package/dist/calendar/index.d.ts +7 -6
  10. package/dist/checkbox/createCheckboxGroupState.d.ts +6 -6
  11. package/dist/checkbox/index.d.ts +1 -1
  12. package/dist/collections/ListCollection.d.ts +1 -1
  13. package/dist/collections/createListState.d.ts +8 -8
  14. package/dist/collections/createMenuState.d.ts +7 -7
  15. package/dist/collections/createSelectionState.d.ts +5 -5
  16. package/dist/collections/index.d.ts +5 -5
  17. package/dist/collections/types.d.ts +12 -12
  18. package/dist/color/Color.d.ts +1 -1
  19. package/dist/color/createColorAreaState.d.ts +4 -2
  20. package/dist/color/createColorFieldState.d.ts +38 -12
  21. package/dist/color/createColorSliderState.d.ts +9 -2
  22. package/dist/color/createColorWheelState.d.ts +13 -2
  23. package/dist/color/getColorChannels.d.ts +1 -1
  24. package/dist/color/index.d.ts +6 -6
  25. package/dist/color/types.d.ts +4 -4
  26. package/dist/combobox/createComboBoxState.d.ts +27 -13
  27. package/dist/combobox/index.d.ts +1 -1
  28. package/dist/data/createAsyncList.d.ts +4 -4
  29. package/dist/data/createListData.d.ts +2 -2
  30. package/dist/data/createTreeData.d.ts +6 -2
  31. package/dist/data/index.d.ts +3 -3
  32. package/dist/datepicker/index.d.ts +2 -4
  33. package/dist/disclosure/createDisclosureState.d.ts +2 -2
  34. package/dist/disclosure/index.d.ts +1 -1
  35. package/dist/dnd/createDragState.d.ts +2 -2
  36. package/dist/dnd/createDraggableCollectionState.d.ts +2 -2
  37. package/dist/dnd/createDropState.d.ts +2 -2
  38. package/dist/dnd/createDroppableCollectionState.d.ts +3 -3
  39. package/dist/dnd/index.d.ts +5 -5
  40. package/dist/dnd/types.d.ts +16 -16
  41. package/dist/form/createFormValidationState.d.ts +3 -3
  42. package/dist/form/index.d.ts +1 -1
  43. package/dist/grid/createGridState.d.ts +2 -2
  44. package/dist/grid/index.d.ts +2 -2
  45. package/dist/grid/types.d.ts +13 -11
  46. package/dist/index.d.ts +31 -30
  47. package/dist/index.js +7924 -7238
  48. package/dist/index.js.map +1 -1
  49. package/dist/menu/index.d.ts +2 -2
  50. package/dist/numberfield/createNumberFieldState.d.ts +2 -2
  51. package/dist/numberfield/index.d.ts +1 -1
  52. package/dist/overlays/createOverlayTriggerState.d.ts +2 -2
  53. package/dist/overlays/index.d.ts +1 -1
  54. package/dist/radio/createRadioGroupState.d.ts +7 -7
  55. package/dist/radio/index.d.ts +1 -1
  56. package/dist/searchfield/createSearchFieldState.d.ts +2 -2
  57. package/dist/searchfield/index.d.ts +2 -2
  58. package/dist/select/createSelectState.d.ts +8 -8
  59. package/dist/select/index.d.ts +1 -1
  60. package/dist/selection/index.d.ts +5 -5
  61. package/dist/slider/createSliderState.d.ts +3 -3
  62. package/dist/slider/index.d.ts +2 -2
  63. package/dist/steplist/createStepListState.d.ts +48 -0
  64. package/dist/steplist/index.d.ts +1 -0
  65. package/dist/table/TableCollection.d.ts +3 -3
  66. package/dist/table/createTableColumnResizeState.d.ts +54 -0
  67. package/dist/table/createTableState.d.ts +2 -2
  68. package/dist/table/index.d.ts +5 -3
  69. package/dist/table/types.d.ts +10 -10
  70. package/dist/tabs/createTabListState.d.ts +5 -5
  71. package/dist/tabs/index.d.ts +1 -1
  72. package/dist/textfield/createTextFieldState.d.ts +2 -2
  73. package/dist/textfield/index.d.ts +1 -1
  74. package/dist/toast/createToastState.d.ts +8 -2
  75. package/dist/toast/index.d.ts +1 -1
  76. package/dist/toggle/createToggleGroupState.d.ts +4 -4
  77. package/dist/toggle/createToggleState.d.ts +2 -2
  78. package/dist/toggle/index.d.ts +2 -2
  79. package/dist/tooltip/createTooltipTriggerState.d.ts +2 -2
  80. package/dist/tooltip/index.d.ts +1 -1
  81. package/dist/tree/TreeCollection.d.ts +2 -2
  82. package/dist/tree/createTreeState.d.ts +2 -2
  83. package/dist/tree/index.d.ts +3 -3
  84. package/dist/tree/types.d.ts +19 -13
  85. package/dist/utils/index.d.ts +1 -1
  86. package/dist/utils/reactivity.d.ts +1 -1
  87. package/package.json +29 -30
  88. package/src/autocomplete/createAutocompleteState.d.ts +19 -17
  89. package/src/autocomplete/createAutocompleteState.ts +24 -30
  90. package/src/autocomplete/index.d.ts +6 -2
  91. package/src/autocomplete/index.ts +1 -1
  92. package/src/calendar/createCalendarState.d.ts +139 -117
  93. package/src/calendar/createCalendarState.ts +221 -74
  94. package/src/calendar/createDateFieldState.d.ts +130 -95
  95. package/src/calendar/createDateFieldState.ts +263 -151
  96. package/src/calendar/createDatePickerState.ts +347 -0
  97. package/src/calendar/createRangeCalendarState.d.ts +154 -129
  98. package/src/calendar/createRangeCalendarState.ts +293 -79
  99. package/src/calendar/createTimeFieldState.d.ts +81 -79
  100. package/src/calendar/createTimeFieldState.ts +187 -108
  101. package/src/calendar/index.d.ts +80 -7
  102. package/src/calendar/index.ts +21 -12
  103. package/src/checkbox/createCheckboxGroupState.d.ts +57 -55
  104. package/src/checkbox/createCheckboxGroupState.ts +20 -29
  105. package/src/checkbox/index.d.ts +6 -2
  106. package/src/checkbox/index.ts +1 -1
  107. package/src/collections/ListCollection.d.ts +25 -22
  108. package/src/collections/ListCollection.ts +6 -6
  109. package/src/collections/createListState.d.ts +73 -58
  110. package/src/collections/createListState.ts +19 -18
  111. package/src/collections/createMenuState.d.ts +36 -31
  112. package/src/collections/createMenuState.ts +18 -12
  113. package/src/collections/createSelectionState.d.ts +78 -65
  114. package/src/collections/createSelectionState.ts +36 -32
  115. package/src/collections/index.d.ts +38 -6
  116. package/src/collections/index.ts +5 -10
  117. package/src/collections/types.d.ts +101 -101
  118. package/src/collections/types.ts +12 -12
  119. package/src/color/Color.d.ts +20 -5
  120. package/src/color/Color.ts +357 -254
  121. package/src/color/createColorAreaState.d.ts +67 -65
  122. package/src/color/createColorAreaState.ts +21 -13
  123. package/src/color/createColorFieldState.d.ts +46 -44
  124. package/src/color/createColorFieldState.ts +285 -149
  125. package/src/color/createColorSliderState.d.ts +58 -56
  126. package/src/color/createColorSliderState.ts +45 -14
  127. package/src/color/createColorWheelState.d.ts +42 -40
  128. package/src/color/createColorWheelState.ts +101 -64
  129. package/src/color/getColorChannels.ts +7 -5
  130. package/src/color/index.d.ts +36 -7
  131. package/src/color/index.ts +6 -9
  132. package/src/color/types.d.ts +68 -63
  133. package/src/color/types.ts +11 -19
  134. package/src/combobox/createComboBoxState.d.ts +107 -105
  135. package/src/combobox/createComboBoxState.ts +176 -89
  136. package/src/combobox/index.d.ts +10 -2
  137. package/src/combobox/index.ts +1 -1
  138. package/src/data/createAsyncList.ts +89 -63
  139. package/src/data/createListData.ts +67 -67
  140. package/src/data/createTreeData.ts +304 -91
  141. package/src/data/index.ts +3 -3
  142. package/src/datepicker/index.ts +6 -10
  143. package/src/disclosure/createDisclosureState.d.ts +47 -43
  144. package/src/disclosure/createDisclosureState.ts +7 -21
  145. package/src/disclosure/index.d.ts +10 -2
  146. package/src/disclosure/index.ts +1 -1
  147. package/src/dnd/createDragState.d.ts +51 -42
  148. package/src/dnd/createDragState.ts +12 -14
  149. package/src/dnd/createDraggableCollectionState.d.ts +52 -41
  150. package/src/dnd/createDraggableCollectionState.ts +14 -21
  151. package/src/dnd/createDropState.d.ts +64 -45
  152. package/src/dnd/createDropState.ts +22 -32
  153. package/src/dnd/createDroppableCollectionState.d.ts +88 -59
  154. package/src/dnd/createDroppableCollectionState.ts +40 -43
  155. package/src/dnd/index.d.ts +54 -6
  156. package/src/dnd/index.ts +5 -18
  157. package/src/dnd/types.d.ts +167 -156
  158. package/src/dnd/types.ts +20 -21
  159. package/src/form/createFormValidationState.d.ts +47 -45
  160. package/src/form/createFormValidationState.ts +30 -63
  161. package/src/form/index.d.ts +16 -2
  162. package/src/form/index.ts +1 -1
  163. package/src/grid/createGridState.d.ts +7 -4
  164. package/src/grid/createGridState.ts +44 -51
  165. package/src/grid/index.d.ts +3 -3
  166. package/src/grid/index.ts +2 -8
  167. package/src/grid/types.d.ts +136 -129
  168. package/src/grid/types.ts +20 -18
  169. package/src/index.d.ts +310 -26
  170. package/src/index.ts +48 -89
  171. package/src/menu/index.ts +2 -4
  172. package/src/numberfield/createNumberFieldState.d.ts +56 -54
  173. package/src/numberfield/createNumberFieldState.ts +26 -31
  174. package/src/numberfield/index.d.ts +6 -2
  175. package/src/numberfield/index.ts +1 -1
  176. package/src/overlays/createOverlayTriggerState.d.ts +22 -20
  177. package/src/overlays/createOverlayTriggerState.ts +3 -4
  178. package/src/overlays/index.d.ts +6 -2
  179. package/src/overlays/index.ts +1 -1
  180. package/src/radio/createRadioGroupState.d.ts +54 -52
  181. package/src/radio/createRadioGroupState.ts +27 -29
  182. package/src/radio/index.d.ts +7 -2
  183. package/src/radio/index.ts +1 -1
  184. package/src/searchfield/createSearchFieldState.d.ts +16 -14
  185. package/src/searchfield/createSearchFieldState.ts +5 -11
  186. package/src/searchfield/index.d.ts +3 -3
  187. package/src/searchfield/index.ts +2 -5
  188. package/src/select/createSelectState.d.ts +63 -61
  189. package/src/select/createSelectState.ts +27 -27
  190. package/src/select/index.d.ts +2 -2
  191. package/src/select/index.ts +1 -5
  192. package/src/selection/index.ts +6 -7
  193. package/src/slider/createSliderState.d.ts +60 -60
  194. package/src/slider/createSliderState.ts +55 -33
  195. package/src/slider/index.d.ts +3 -3
  196. package/src/slider/index.ts +2 -6
  197. package/src/ssr/index.d.ts +1 -1
  198. package/src/ssr/index.ts +2 -2
  199. package/src/steplist/createStepListState.ts +191 -0
  200. package/src/steplist/index.ts +5 -0
  201. package/src/table/TableCollection.d.ts +42 -40
  202. package/src/table/TableCollection.ts +61 -64
  203. package/src/table/createTableColumnResizeState.ts +242 -0
  204. package/src/table/createTableState.d.ts +7 -4
  205. package/src/table/createTableState.ts +10 -7
  206. package/src/table/index.d.ts +14 -4
  207. package/src/table/index.ts +10 -3
  208. package/src/table/types.d.ts +98 -92
  209. package/src/table/types.ts +17 -13
  210. package/src/tabs/createTabListState.d.ts +59 -57
  211. package/src/tabs/createTabListState.ts +24 -31
  212. package/src/tabs/index.d.ts +8 -2
  213. package/src/tabs/index.ts +1 -1
  214. package/src/textfield/createTextFieldState.d.ts +16 -14
  215. package/src/textfield/createTextFieldState.ts +7 -18
  216. package/src/textfield/index.d.ts +6 -2
  217. package/src/textfield/index.ts +1 -1
  218. package/src/toast/createToastState.d.ts +92 -86
  219. package/src/toast/createToastState.ts +48 -43
  220. package/src/toast/index.d.ts +12 -2
  221. package/src/toast/index.ts +1 -1
  222. package/src/toggle/createToggleGroupState.ts +11 -21
  223. package/src/toggle/createToggleState.d.ts +19 -19
  224. package/src/toggle/createToggleState.ts +2 -16
  225. package/src/toggle/index.d.ts +2 -2
  226. package/src/toggle/index.ts +2 -6
  227. package/src/tooltip/createTooltipTriggerState.d.ts +17 -17
  228. package/src/tooltip/createTooltipTriggerState.ts +12 -11
  229. package/src/tooltip/index.d.ts +7 -2
  230. package/src/tooltip/index.ts +1 -1
  231. package/src/tree/TreeCollection.d.ts +26 -23
  232. package/src/tree/TreeCollection.ts +29 -22
  233. package/src/tree/createTreeState.d.ts +7 -4
  234. package/src/tree/createTreeState.ts +39 -41
  235. package/src/tree/index.d.ts +10 -4
  236. package/src/tree/index.ts +3 -3
  237. package/src/tree/types.d.ts +131 -126
  238. package/src/tree/types.ts +22 -13
  239. package/src/utils/index.d.ts +2 -2
  240. package/src/utils/index.ts +1 -1
  241. package/src/utils/reactivity.d.ts +2 -2
  242. package/src/utils/reactivity.ts +3 -3
@@ -1,10 +1,39 @@
1
1
  /**
2
2
  * Color state management exports.
3
3
  */
4
- export type { Color, ColorFormat, ColorSpace, ColorChannel, ColorChannelRange, ColorAxes, } from './types';
5
- export { parseColor, normalizeColor, createRGBColor, createHSLColor, createHSBColor, } from './Color';
6
- export { createColorSliderState, type ColorSliderStateOptions, type ColorSliderState, } from './createColorSliderState';
7
- export { createColorAreaState, type ColorAreaStateOptions, type ColorAreaState, } from './createColorAreaState';
8
- export { createColorWheelState, type ColorWheelStateOptions, type ColorWheelState, } from './createColorWheelState';
9
- export { createColorFieldState, type ColorFieldStateOptions, type ColorFieldState, } from './createColorFieldState';
10
- //# sourceMappingURL=index.d.ts.map
4
+ export type {
5
+ Color,
6
+ ColorFormat,
7
+ ColorSpace,
8
+ ColorChannel,
9
+ ColorChannelRange,
10
+ ColorAxes,
11
+ } from "./types";
12
+ export {
13
+ parseColor,
14
+ normalizeColor,
15
+ createRGBColor,
16
+ createHSLColor,
17
+ createHSBColor,
18
+ } from "./Color";
19
+ export {
20
+ createColorSliderState,
21
+ type ColorSliderStateOptions,
22
+ type ColorSliderState,
23
+ } from "./createColorSliderState";
24
+ export {
25
+ createColorAreaState,
26
+ type ColorAreaStateOptions,
27
+ type ColorAreaState,
28
+ } from "./createColorAreaState";
29
+ export {
30
+ createColorWheelState,
31
+ type ColorWheelStateOptions,
32
+ type ColorWheelState,
33
+ } from "./createColorWheelState";
34
+ export {
35
+ createColorFieldState,
36
+ type ColorFieldStateOptions,
37
+ type ColorFieldState,
38
+ } from "./createColorFieldState";
39
+ //# sourceMappingURL=index.d.ts.map
@@ -2,7 +2,6 @@
2
2
  * Color state management exports.
3
3
  */
4
4
 
5
- // Types
6
5
  export type {
7
6
  Color,
8
7
  ColorFormat,
@@ -10,38 +9,36 @@ export type {
10
9
  ColorChannel,
11
10
  ColorChannelRange,
12
11
  ColorAxes,
13
- } from './types';
12
+ } from "./types";
14
13
 
15
- // Color class and utilities
16
14
  export {
17
15
  parseColor,
18
16
  normalizeColor,
19
17
  createRGBColor,
20
18
  createHSLColor,
21
19
  createHSBColor,
22
- } from './Color';
20
+ } from "./Color";
23
21
 
24
- // State hooks
25
22
  export {
26
23
  createColorSliderState,
27
24
  type ColorSliderStateOptions,
28
25
  type ColorSliderState,
29
- } from './createColorSliderState';
26
+ } from "./createColorSliderState";
30
27
 
31
28
  export {
32
29
  createColorAreaState,
33
30
  type ColorAreaStateOptions,
34
31
  type ColorAreaState,
35
- } from './createColorAreaState';
32
+ } from "./createColorAreaState";
36
33
 
37
34
  export {
38
35
  createColorWheelState,
39
36
  type ColorWheelStateOptions,
40
37
  type ColorWheelState,
41
- } from './createColorWheelState';
38
+ } from "./createColorWheelState";
42
39
 
43
40
  export {
44
41
  createColorFieldState,
45
42
  type ColorFieldStateOptions,
46
43
  type ColorFieldState,
47
- } from './createColorFieldState';
44
+ } from "./createColorFieldState";
@@ -5,102 +5,107 @@
5
5
  /**
6
6
  * Supported color formats.
7
7
  */
8
- export type ColorFormat = 'hex' | 'hexa' | 'rgb' | 'rgba' | 'hsl' | 'hsla' | 'hsb' | 'hsba';
8
+ export type ColorFormat = "hex" | "hexa" | "rgb" | "rgba" | "hsl" | "hsla" | "hsb" | "hsba";
9
9
  /**
10
10
  * Color spaces.
11
11
  */
12
- export type ColorSpace = 'rgb' | 'hsl' | 'hsb';
12
+ export type ColorSpace = "rgb" | "hsl" | "hsb";
13
13
  /**
14
14
  * Color channels.
15
15
  */
16
- export type ColorChannel = 'hue' | 'saturation' | 'brightness' | 'lightness' | 'red' | 'green' | 'blue' | 'alpha';
16
+ export type ColorChannel =
17
+ | "hue"
18
+ | "saturation"
19
+ | "brightness"
20
+ | "lightness"
21
+ | "red"
22
+ | "green"
23
+ | "blue"
24
+ | "alpha";
17
25
  /**
18
26
  * Range for a color channel.
19
27
  */
20
28
  export interface ColorChannelRange {
21
- /** Minimum value. */
22
- minValue: number;
23
- /** Maximum value. */
24
- maxValue: number;
25
- /** Step for keyboard increment. */
26
- step: number;
27
- /** Page step for larger increments. */
28
- pageSize: number;
29
+ /** Minimum value. */
30
+ minValue: number;
31
+ /** Maximum value. */
32
+ maxValue: number;
33
+ /** Step for keyboard increment. */
34
+ step: number;
35
+ /** Page step for larger increments. */
36
+ pageSize: number;
29
37
  }
30
38
  /**
31
39
  * Color axes for a color space.
32
40
  */
33
41
  export interface ColorAxes {
34
- /** X-axis channel. */
35
- xChannel: ColorChannel;
36
- /** Y-axis channel. */
37
- yChannel: ColorChannel;
38
- /** Z-axis channel (the one not on x or y). */
39
- zChannel: ColorChannel;
42
+ /** X-axis channel. */
43
+ xChannel: ColorChannel;
44
+ /** Y-axis channel. */
45
+ yChannel: ColorChannel;
46
+ /** Z-axis channel (the one not on x or y). */
47
+ zChannel: ColorChannel;
40
48
  }
41
49
  /**
42
50
  * Color interface representing a color value.
43
51
  */
44
52
  export interface Color {
45
- /** Convert to a different format. */
46
- toFormat(format: ColorFormat): Color;
47
- /** Convert to a CSS string. */
48
- toString(format?: ColorFormat | 'css'): string;
49
- /** Clone this color. */
50
- clone(): Color;
51
- /** Get the hex value as an integer. */
52
- toHexInt(): number;
53
- /** Get the value of a specific channel. */
54
- getChannelValue(channel: ColorChannel): number;
55
- /** Create a new color with a channel value changed. */
56
- withChannelValue(channel: ColorChannel, value: number): Color;
57
- /** Get the range for a channel. */
58
- getChannelRange(channel: ColorChannel): ColorChannelRange;
59
- /** Get the localized name of a channel. */
60
- getChannelName(channel: ColorChannel, locale: string): string;
61
- /** Get the format options for a channel. */
62
- getChannelFormatOptions(channel: ColorChannel): Intl.NumberFormatOptions;
63
- /** Format the value of a channel. */
64
- formatChannelValue(channel: ColorChannel, locale: string): string;
65
- /** Get the color space. */
66
- getColorSpace(): ColorSpace;
67
- /** Get the axes for a color space. */
68
- getColorSpaceAxes(xyChannels?: {
69
- xChannel?: ColorChannel;
70
- yChannel?: ColorChannel;
71
- }): ColorAxes;
72
- /** Get all channels for this color space. */
73
- getColorChannels(): [ColorChannel, ColorChannel, ColorChannel];
74
- /** Get a human-readable color name. */
75
- getColorName(locale: string): string;
76
- /** Get the hue name (e.g., "red", "blue"). */
77
- getHueName(locale: string): string;
53
+ /** Convert to a different format. */
54
+ toFormat(format: ColorFormat): Color;
55
+ /** Convert to a CSS string. */
56
+ toString(format?: ColorFormat | "css"): string;
57
+ /** Clone this color. */
58
+ clone(): Color;
59
+ /** Get the hex value as an integer. */
60
+ toHexInt(): number;
61
+ /** Get the value of a specific channel. */
62
+ getChannelValue(channel: ColorChannel): number;
63
+ /** Create a new color with a channel value changed. */
64
+ withChannelValue(channel: ColorChannel, value: number): Color;
65
+ /** Get the range for a channel. */
66
+ getChannelRange(channel: ColorChannel): ColorChannelRange;
67
+ /** Get the localized name of a channel. */
68
+ getChannelName(channel: ColorChannel, locale: string): string;
69
+ /** Get the format options for a channel. */
70
+ getChannelFormatOptions(channel: ColorChannel): Intl.NumberFormatOptions;
71
+ /** Format the value of a channel. */
72
+ formatChannelValue(channel: ColorChannel, locale: string): string;
73
+ /** Get the color space. */
74
+ getColorSpace(): ColorSpace;
75
+ /** Get the axes for a color space. */
76
+ getColorSpaceAxes(xyChannels?: { xChannel?: ColorChannel; yChannel?: ColorChannel }): ColorAxes;
77
+ /** Get all channels for this color space. */
78
+ getColorChannels(): [ColorChannel, ColorChannel, ColorChannel];
79
+ /** Get a human-readable color name. */
80
+ getColorName(locale: string): string;
81
+ /** Get the hue name (e.g., "red", "blue"). */
82
+ getHueName(locale: string): string;
78
83
  }
79
84
  /**
80
85
  * RGB color value.
81
86
  */
82
87
  export interface RGBColor {
83
- red: number;
84
- green: number;
85
- blue: number;
86
- alpha: number;
88
+ red: number;
89
+ green: number;
90
+ blue: number;
91
+ alpha: number;
87
92
  }
88
93
  /**
89
94
  * HSL color value.
90
95
  */
91
96
  export interface HSLColor {
92
- hue: number;
93
- saturation: number;
94
- lightness: number;
95
- alpha: number;
97
+ hue: number;
98
+ saturation: number;
99
+ lightness: number;
100
+ alpha: number;
96
101
  }
97
102
  /**
98
103
  * HSB color value.
99
104
  */
100
105
  export interface HSBColor {
101
- hue: number;
102
- saturation: number;
103
- brightness: number;
104
- alpha: number;
106
+ hue: number;
107
+ saturation: number;
108
+ brightness: number;
109
+ alpha: number;
105
110
  }
106
- //# sourceMappingURL=types.d.ts.map
111
+ //# sourceMappingURL=types.d.ts.map
@@ -6,33 +6,25 @@
6
6
  /**
7
7
  * Supported color formats.
8
8
  */
9
- export type ColorFormat =
10
- | 'hex'
11
- | 'hexa'
12
- | 'rgb'
13
- | 'rgba'
14
- | 'hsl'
15
- | 'hsla'
16
- | 'hsb'
17
- | 'hsba';
9
+ export type ColorFormat = "hex" | "hexa" | "rgb" | "rgba" | "hsl" | "hsla" | "hsb" | "hsba";
18
10
 
19
11
  /**
20
12
  * Color spaces.
21
13
  */
22
- export type ColorSpace = 'rgb' | 'hsl' | 'hsb';
14
+ export type ColorSpace = "rgb" | "hsl" | "hsb";
23
15
 
24
16
  /**
25
17
  * Color channels.
26
18
  */
27
19
  export type ColorChannel =
28
- | 'hue'
29
- | 'saturation'
30
- | 'brightness'
31
- | 'lightness'
32
- | 'red'
33
- | 'green'
34
- | 'blue'
35
- | 'alpha';
20
+ | "hue"
21
+ | "saturation"
22
+ | "brightness"
23
+ | "lightness"
24
+ | "red"
25
+ | "green"
26
+ | "blue"
27
+ | "alpha";
36
28
 
37
29
  /**
38
30
  * Range for a color channel.
@@ -67,7 +59,7 @@ export interface Color {
67
59
  /** Convert to a different format. */
68
60
  toFormat(format: ColorFormat): Color;
69
61
  /** Convert to a CSS string. */
70
- toString(format?: ColorFormat | 'css'): string;
62
+ toString(format?: ColorFormat | "css"): string;
71
63
  /** Clone this color. */
72
64
  clone(): Color;
73
65
  /** Get the hex value as an integer. */
@@ -5,113 +5,113 @@
5
5
  * ComboBox combines a text input with a dropdown list, allowing users to
6
6
  * either type to filter options or select from a list.
7
7
  */
8
- import { type Accessor } from 'solid-js';
9
- import { type MaybeAccessor } from '../utils';
10
- import type { Key, CollectionNode, Collection, FocusStrategy } from '../collections/types';
11
- export type MenuTriggerAction = 'focus' | 'input' | 'manual';
12
- export type { FocusStrategy } from '../collections/types';
8
+ import { type Accessor } from "solid-js";
9
+ import { type MaybeAccessor } from "../utils";
10
+ import type { Key, CollectionNode, Collection, FocusStrategy } from "../collections/types";
11
+ export type MenuTriggerAction = "focus" | "input" | "manual";
12
+ export type { FocusStrategy } from "../collections/types";
13
13
  export type FilterFn = (textValue: string, inputValue: string) => boolean;
14
14
  export interface ComboBoxStateProps<T = unknown> {
15
- /** The items to display in the combobox dropdown. */
16
- items: T[];
17
- /** Default items when uncontrolled. */
18
- defaultItems?: T[];
19
- /** Function to get the key for an item. */
20
- getKey?: (item: T) => Key;
21
- /** Function to get the text value for an item. */
22
- getTextValue?: (item: T) => string;
23
- /** Function to check if an item is disabled. */
24
- getDisabled?: (item: T) => boolean;
25
- /** Keys of disabled items. */
26
- disabledKeys?: Iterable<Key>;
27
- /** The currently selected key (controlled). */
28
- selectedKey?: Key | null;
29
- /** The default selected key (uncontrolled). */
30
- defaultSelectedKey?: Key | null;
31
- /** Handler called when the selection changes. */
32
- onSelectionChange?: (key: Key | null) => void;
33
- /** The current input value (controlled). */
34
- inputValue?: string;
35
- /** The default input value (uncontrolled). */
36
- defaultInputValue?: string;
37
- /** Handler called when the input value changes. */
38
- onInputChange?: (value: string) => void;
39
- /** Whether the combobox is open (controlled). */
40
- isOpen?: boolean;
41
- /** Whether the combobox is open by default (uncontrolled). */
42
- defaultOpen?: boolean;
43
- /** Handler called when the open state changes. */
44
- onOpenChange?: (isOpen: boolean, trigger?: MenuTriggerAction) => void;
45
- /** Whether the combobox is disabled. */
46
- isDisabled?: boolean;
47
- /** Whether the combobox is read-only. */
48
- isReadOnly?: boolean;
49
- /** Whether the combobox is required. */
50
- isRequired?: boolean;
51
- /** The filter function to use when filtering items. */
52
- defaultFilter?: FilterFn;
53
- /** Whether to allow the menu to open when there are no items. */
54
- allowsEmptyCollection?: boolean;
55
- /** Whether to allow custom values that don't match any option. */
56
- allowsCustomValue?: boolean;
57
- /** What triggers the menu to open. */
58
- menuTrigger?: MenuTriggerAction;
59
- /** Whether to close the menu on blur. */
60
- shouldCloseOnBlur?: boolean;
15
+ /** The items to display in the combobox dropdown. */
16
+ items?: T[];
17
+ /** Default items when uncontrolled. */
18
+ defaultItems?: T[];
19
+ /** Function to get the key for an item. */
20
+ getKey?: (item: T) => Key;
21
+ /** Function to get the text value for an item. */
22
+ getTextValue?: (item: T) => string;
23
+ /** Function to check if an item is disabled. */
24
+ getDisabled?: (item: T) => boolean;
25
+ /** Keys of disabled items. */
26
+ disabledKeys?: Iterable<Key>;
27
+ /** The currently selected key (controlled). */
28
+ selectedKey?: Key | null;
29
+ /** The default selected key (uncontrolled). */
30
+ defaultSelectedKey?: Key | null;
31
+ /** Handler called when the selection changes. */
32
+ onSelectionChange?: (key: Key | null) => void;
33
+ /** The current input value (controlled). */
34
+ inputValue?: string;
35
+ /** The default input value (uncontrolled). */
36
+ defaultInputValue?: string;
37
+ /** Handler called when the input value changes. */
38
+ onInputChange?: (value: string) => void;
39
+ /** Whether the combobox is open (controlled). */
40
+ isOpen?: boolean;
41
+ /** Whether the combobox is open by default (uncontrolled). */
42
+ defaultOpen?: boolean;
43
+ /** Handler called when the open state changes. */
44
+ onOpenChange?: (isOpen: boolean, trigger?: MenuTriggerAction) => void;
45
+ /** Whether the combobox is disabled. */
46
+ isDisabled?: boolean;
47
+ /** Whether the combobox is read-only. */
48
+ isReadOnly?: boolean;
49
+ /** Whether the combobox is required. */
50
+ isRequired?: boolean;
51
+ /** The filter function to use when filtering items. */
52
+ defaultFilter?: FilterFn;
53
+ /** Whether to allow the menu to open when there are no items. */
54
+ allowsEmptyCollection?: boolean;
55
+ /** Whether to allow custom values that don't match any option. */
56
+ allowsCustomValue?: boolean;
57
+ /** What triggers the menu to open. */
58
+ menuTrigger?: MenuTriggerAction;
59
+ /** Whether to close the menu on blur. */
60
+ shouldCloseOnBlur?: boolean;
61
61
  }
62
62
  export interface ComboBoxState<T = unknown> {
63
- /** The collection of items (may be filtered). */
64
- readonly collection: Accessor<Collection<T>>;
65
- /** Whether the combobox dropdown is open. */
66
- readonly isOpen: Accessor<boolean>;
67
- /** Open the combobox dropdown. */
68
- open(focusStrategy?: FocusStrategy | null, trigger?: MenuTriggerAction): void;
69
- /** Close the combobox dropdown. */
70
- close(): void;
71
- /** Toggle the combobox dropdown. */
72
- toggle(focusStrategy?: FocusStrategy | null, trigger?: MenuTriggerAction): void;
73
- /** The currently selected key. */
74
- readonly selectedKey: Accessor<Key | null>;
75
- /** The default selected key. */
76
- readonly defaultSelectedKey: Key | null;
77
- /** The currently selected item. */
78
- readonly selectedItem: Accessor<CollectionNode<T> | null>;
79
- /** Set the selected key. */
80
- setSelectedKey(key: Key | null): void;
81
- /** The current input value. */
82
- readonly inputValue: Accessor<string>;
83
- /** The default input value. */
84
- readonly defaultInputValue: string;
85
- /** Set the input value. */
86
- setInputValue(value: string): void;
87
- /** The currently focused key in the list. */
88
- readonly focusedKey: Accessor<Key | null>;
89
- /** Set the focused key. */
90
- setFocusedKey(key: Key | null): void;
91
- /** Whether the combobox input has focus. */
92
- readonly isFocused: Accessor<boolean>;
93
- /** Set whether the combobox has focus. */
94
- setFocused(isFocused: boolean): void;
95
- /** The focus strategy to use when opening. */
96
- readonly focusStrategy: Accessor<FocusStrategy | null>;
97
- /** Commit the current selection (select focused item or custom value). */
98
- commit(): void;
99
- /** Revert input to the selected item's text and close menu. */
100
- revert(): void;
101
- /** Whether a specific key is disabled. */
102
- isKeyDisabled(key: Key): boolean;
103
- /** Select a key and close the menu (for ListState compatibility). */
104
- select(key: Key): void;
105
- /** The selection mode (always 'single' for combobox). */
106
- readonly selectionMode: Accessor<'single'>;
107
- /** Check if a key is selected. */
108
- isSelected(key: Key): boolean;
109
- /** Whether the combobox is disabled. */
110
- readonly isDisabled: boolean;
111
- /** Whether the combobox is read-only. */
112
- readonly isReadOnly: boolean;
113
- /** Whether the combobox is required. */
114
- readonly isRequired: boolean;
63
+ /** The collection of items (may be filtered). */
64
+ readonly collection: Accessor<Collection<T>>;
65
+ /** Whether the combobox dropdown is open. */
66
+ readonly isOpen: Accessor<boolean>;
67
+ /** Open the combobox dropdown. */
68
+ open(focusStrategy?: FocusStrategy | null, trigger?: MenuTriggerAction): void;
69
+ /** Close the combobox dropdown. */
70
+ close(): void;
71
+ /** Toggle the combobox dropdown. */
72
+ toggle(focusStrategy?: FocusStrategy | null, trigger?: MenuTriggerAction): void;
73
+ /** The currently selected key. */
74
+ readonly selectedKey: Accessor<Key | null>;
75
+ /** The default selected key. */
76
+ readonly defaultSelectedKey: Key | null;
77
+ /** The currently selected item. */
78
+ readonly selectedItem: Accessor<CollectionNode<T> | null>;
79
+ /** Set the selected key. */
80
+ setSelectedKey(key: Key | null): void;
81
+ /** The current input value. */
82
+ readonly inputValue: Accessor<string>;
83
+ /** The default input value. */
84
+ readonly defaultInputValue: string;
85
+ /** Set the input value. */
86
+ setInputValue(value: string): void;
87
+ /** The currently focused key in the list. */
88
+ readonly focusedKey: Accessor<Key | null>;
89
+ /** Set the focused key. */
90
+ setFocusedKey(key: Key | null): void;
91
+ /** Whether the combobox input has focus. */
92
+ readonly isFocused: Accessor<boolean>;
93
+ /** Set whether the combobox has focus. */
94
+ setFocused(isFocused: boolean): void;
95
+ /** The focus strategy to use when opening. */
96
+ readonly focusStrategy: Accessor<FocusStrategy | null>;
97
+ /** Commit the current selection (select focused item or custom value). */
98
+ commit(): void;
99
+ /** Revert input to the selected item's text and close menu. */
100
+ revert(): void;
101
+ /** Whether a specific key is disabled. */
102
+ isKeyDisabled(key: Key): boolean;
103
+ /** Select a key and close the menu (for ListState compatibility). */
104
+ select(key: Key): void;
105
+ /** The selection mode (always 'single' for combobox). */
106
+ readonly selectionMode: Accessor<"single">;
107
+ /** Check if a key is selected. */
108
+ isSelected(key: Key): boolean;
109
+ /** Whether the combobox is disabled. */
110
+ readonly isDisabled: boolean;
111
+ /** Whether the combobox is read-only. */
112
+ readonly isReadOnly: boolean;
113
+ /** Whether the combobox is required. */
114
+ readonly isRequired: boolean;
115
115
  }
116
116
  /**
117
117
  * Default filter function that does case-insensitive "contains" matching.
@@ -121,5 +121,7 @@ export declare const defaultContainsFilter: FilterFn;
121
121
  * Creates state for a combobox component.
122
122
  * Combines list state with input value management and filtering.
123
123
  */
124
- export declare function createComboBoxState<T = unknown>(props: MaybeAccessor<ComboBoxStateProps<T>>): ComboBoxState<T>;
125
- //# sourceMappingURL=createComboBoxState.d.ts.map
124
+ export declare function createComboBoxState<T = unknown>(
125
+ props: MaybeAccessor<ComboBoxStateProps<T>>,
126
+ ): ComboBoxState<T>;
127
+ //# sourceMappingURL=createComboBoxState.d.ts.map