@ark-ui/solid 0.8.1 → 0.9.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 (156) hide show
  1. package/CHANGELOG.md +12 -2
  2. package/accordion/accordion-context.d.ts +4 -21
  3. package/accordion/index.cjs +4 -0
  4. package/accordion/index.d.ts +2 -0
  5. package/accordion/index.mjs +2 -0
  6. package/accordion/use-accordion.d.ts +3 -11
  7. package/avatar/avatar-context.d.ts +4 -20
  8. package/avatar/index.cjs +2 -0
  9. package/avatar/index.d.ts +1 -0
  10. package/avatar/index.mjs +1 -0
  11. package/avatar/use-avatar.d.ts +3 -11
  12. package/carousel/carousel-context.d.ts +4 -59
  13. package/carousel/carousel-indicator-group.cjs +16 -0
  14. package/carousel/carousel-indicator-group.d.ts +4 -0
  15. package/carousel/carousel-indicator-group.mjs +12 -0
  16. package/carousel/carousel-indicator.cjs +18 -0
  17. package/carousel/carousel-indicator.d.ts +6 -0
  18. package/carousel/carousel-indicator.mjs +14 -0
  19. package/carousel/carousel-slide.d.ts +1 -1
  20. package/carousel/index.cjs +6 -0
  21. package/carousel/index.d.ts +3 -0
  22. package/carousel/index.mjs +3 -0
  23. package/carousel/use-carousel.d.ts +3 -31
  24. package/checkbox/checkbox-context.d.ts +4 -27
  25. package/checkbox/index.cjs +2 -0
  26. package/checkbox/index.d.ts +2 -1
  27. package/checkbox/index.mjs +1 -0
  28. package/checkbox/use-checkbox.d.ts +3 -15
  29. package/color-picker/color-picker-context.d.ts +4 -42
  30. package/color-picker/index.cjs +6 -0
  31. package/color-picker/index.d.ts +3 -0
  32. package/color-picker/index.mjs +3 -0
  33. package/color-picker/use-color-picker.d.ts +3 -22
  34. package/combobox/combobox-clear-trigger.cjs +16 -0
  35. package/combobox/combobox-clear-trigger.d.ts +4 -0
  36. package/combobox/combobox-clear-trigger.mjs +12 -0
  37. package/combobox/combobox-context.d.ts +4 -55
  38. package/combobox/combobox-option-group.cjs +16 -0
  39. package/combobox/combobox-option-group.d.ts +6 -0
  40. package/combobox/combobox-option-group.mjs +12 -0
  41. package/combobox/index.cjs +6 -0
  42. package/combobox/index.d.ts +3 -0
  43. package/combobox/index.mjs +3 -0
  44. package/combobox/use-combobox.d.ts +3 -28
  45. package/date-picker/date-picker-context.d.ts +4 -254
  46. package/date-picker/date-picker-grid.d.ts +1 -1
  47. package/date-picker/date-picker-view-trigger.d.ts +1 -1
  48. package/date-picker/index.cjs +6 -0
  49. package/date-picker/index.d.ts +3 -0
  50. package/date-picker/index.mjs +3 -0
  51. package/date-picker/use-date-picker.d.ts +3 -128
  52. package/dialog/dialog-context.d.ts +4 -24
  53. package/dialog/index.cjs +2 -0
  54. package/dialog/index.d.ts +1 -0
  55. package/dialog/index.mjs +1 -0
  56. package/dialog/use-dialog.d.ts +3 -13
  57. package/editable/editable-context.d.ts +4 -38
  58. package/editable/index.cjs +2 -0
  59. package/editable/index.d.ts +1 -0
  60. package/editable/index.mjs +1 -0
  61. package/editable/use-editable.d.ts +3 -20
  62. package/hover-card/hover-card-context.d.ts +4 -23
  63. package/hover-card/index.cjs +2 -0
  64. package/hover-card/index.d.ts +1 -0
  65. package/hover-card/index.mjs +1 -0
  66. package/hover-card/use-hover-card.d.ts +3 -12
  67. package/index.cjs +72 -0
  68. package/index.mjs +36 -0
  69. package/menu/index.cjs +2 -0
  70. package/menu/index.d.ts +1 -0
  71. package/menu/index.mjs +1 -0
  72. package/number-input/index.cjs +2 -0
  73. package/number-input/index.d.ts +1 -0
  74. package/number-input/index.mjs +1 -0
  75. package/number-input/number-input-context.d.ts +4 -44
  76. package/number-input/use-number-input.d.ts +3 -23
  77. package/package.json +48 -48
  78. package/pagination/index.cjs +2 -0
  79. package/pagination/index.d.ts +1 -0
  80. package/pagination/index.mjs +1 -0
  81. package/pagination/pagination-context.d.ts +4 -45
  82. package/pagination/pagination-ellipsis.d.ts +1 -1
  83. package/pagination/use-pagination.d.ts +3 -24
  84. package/pin-input/index.cjs +2 -0
  85. package/pin-input/index.d.ts +1 -0
  86. package/pin-input/index.mjs +1 -0
  87. package/pin-input/pin-input-context.d.ts +4 -32
  88. package/pin-input/use-pin-input.d.ts +3 -17
  89. package/popover/index.cjs +2 -0
  90. package/popover/index.d.ts +1 -0
  91. package/popover/index.mjs +1 -0
  92. package/popover/popover-context.d.ts +4 -33
  93. package/popover/use-popover.d.ts +3 -17
  94. package/pressable/use-pressable.d.ts +3 -5
  95. package/radio-group/index.cjs +4 -0
  96. package/radio-group/index.d.ts +2 -0
  97. package/radio-group/index.mjs +2 -0
  98. package/radio-group/radio-context.d.ts +11 -2
  99. package/radio-group/radio-group-context.d.ts +4 -49
  100. package/radio-group/use-radio-group.d.ts +3 -26
  101. package/range-slider/index.cjs +2 -0
  102. package/range-slider/index.d.ts +1 -0
  103. package/range-slider/index.mjs +1 -0
  104. package/range-slider/range-slider-context.d.ts +4 -58
  105. package/range-slider/use-range-slider.d.ts +3 -30
  106. package/rating-group/index.cjs +4 -0
  107. package/rating-group/index.d.ts +2 -0
  108. package/rating-group/index.mjs +2 -0
  109. package/rating-group/rating-group-context.d.ts +4 -31
  110. package/rating-group/use-rating-group.d.ts +3 -16
  111. package/segment-group/index.cjs +4 -0
  112. package/segment-group/index.d.ts +2 -0
  113. package/segment-group/index.mjs +2 -0
  114. package/segment-group/segment-context.d.ts +11 -2
  115. package/segment-group/segment-group-context.d.ts +4 -49
  116. package/segment-group/use-segment-group.d.ts +3 -26
  117. package/select/index.cjs +2 -0
  118. package/select/index.d.ts +1 -0
  119. package/select/index.mjs +1 -0
  120. package/select/select-context.d.ts +4 -50
  121. package/select/use-select.d.ts +3 -26
  122. package/slider/index.cjs +2 -0
  123. package/slider/index.d.ts +1 -0
  124. package/slider/index.mjs +1 -0
  125. package/slider/slider-context.d.ts +4 -48
  126. package/slider/use-slider.d.ts +3 -25
  127. package/splitter/index.cjs +2 -0
  128. package/splitter/index.d.ts +1 -0
  129. package/splitter/index.mjs +1 -0
  130. package/splitter/splitter-context.d.ts +4 -46
  131. package/splitter/use-splitter.d.ts +4 -25
  132. package/switch/index.cjs +2 -0
  133. package/switch/index.d.ts +1 -0
  134. package/switch/index.mjs +1 -0
  135. package/switch/switch-context.d.ts +4 -24
  136. package/switch/use-switch.d.ts +3 -13
  137. package/tabs/index.cjs +2 -0
  138. package/tabs/index.d.ts +1 -0
  139. package/tabs/index.mjs +1 -0
  140. package/tabs/tabs-context.d.ts +4 -29
  141. package/tabs/use-tabs.d.ts +3 -15
  142. package/tags-input/index.cjs +2 -0
  143. package/tags-input/index.d.ts +1 -0
  144. package/tags-input/index.mjs +1 -0
  145. package/tags-input/tags-input-context.d.ts +4 -49
  146. package/tags-input/use-tags-input.d.ts +3 -26
  147. package/toast/index.cjs +2 -0
  148. package/toast/index.d.ts +1 -0
  149. package/toast/index.mjs +1 -0
  150. package/toast/toast-item-context.d.ts +4 -35
  151. package/toast/use-toast-item.d.ts +3 -18
  152. package/tooltip/index.cjs +2 -0
  153. package/tooltip/index.d.ts +1 -0
  154. package/tooltip/index.mjs +1 -0
  155. package/tooltip/tooltip-context.d.ts +4 -33
  156. package/tooltip/use-tooltip.d.ts +3 -17
@@ -1,5 +1,6 @@
1
1
  export { ColorPicker, type ColorPickerProps } from './color-picker';
2
2
  export { ColorPickerArea, type ColorPickerAreaProps } from './color-picker-area';
3
+ export { useColorPickerAreaContext } from './color-picker-area-context';
3
4
  export { ColorPickerAreaGradient, type ColorPickerAreaGradientProps, } from './color-picker-area-gradient';
4
5
  export { ColorPickerAreaThumb, type ColorPickerAreaThumbProps } from './color-picker-area-thumb';
5
6
  export { ColorPickerChannelInput, type ColorPickerChannelInputProps, } from './color-picker-channel-input';
@@ -7,8 +8,10 @@ export { ColorPickerChannelSliderBackground, type ColorPickerChannelSliderBackgr
7
8
  export { ColorPickerChannelSliderThumb, type ColorPickerChannelSliderThumbProps, } from './color-picker-channel-slider-thumb';
8
9
  export { ColorPickerChannelSliderTrack, type ColorPickerChannelSliderTrackProps, } from './color-picker-channel-slider-track';
9
10
  export { ColorPickerContent, type ColorPickerContentProps } from './color-picker-content';
11
+ export { useColorPickerContext } from './color-picker-context';
10
12
  export { ColorPickerEyeDropperTrigger, type ColorPickerEyeDropperTriggerProps, } from './color-picker-eye-dropper-trigger';
11
13
  export { ColorPickerSwatch, type ColorPickerSwatchProps } from './color-picker-swatch';
12
14
  export { ColorPickerSwatchBackground, type ColorPickerSwatchBackgroundProps, } from './color-picker-swatch-background';
15
+ export { useColorPickerSwatchContext } from './color-picker-swatch-context';
13
16
  export { ColorPickerSwatchGroup, type ColorPickerSwatchGroupProps, } from './color-picker-swatch-group';
14
17
  export { colorPickerAnatomy } from './color-picker.anatomy';
@@ -1,5 +1,6 @@
1
1
  export { ColorPicker } from './color-picker.mjs';
2
2
  export { ColorPickerArea } from './color-picker-area.mjs';
3
+ export { useColorPickerAreaContext } from './color-picker-area-context.mjs';
3
4
  export { ColorPickerAreaGradient } from './color-picker-area-gradient.mjs';
4
5
  export { ColorPickerAreaThumb } from './color-picker-area-thumb.mjs';
5
6
  export { ColorPickerChannelInput } from './color-picker-channel-input.mjs';
@@ -7,8 +8,10 @@ export { ColorPickerChannelSliderBackground } from './color-picker-channel-slide
7
8
  export { ColorPickerChannelSliderThumb } from './color-picker-channel-slider-thumb.mjs';
8
9
  export { ColorPickerChannelSliderTrack } from './color-picker-channel-slider-track.mjs';
9
10
  export { ColorPickerContent } from './color-picker-content.mjs';
11
+ export { useColorPickerContext } from './color-picker-context.mjs';
10
12
  export { ColorPickerEyeDropperTrigger } from './color-picker-eye-dropper-trigger.mjs';
11
13
  export { ColorPickerSwatch } from './color-picker-swatch.mjs';
12
14
  export { ColorPickerSwatchBackground } from './color-picker-swatch-background.mjs';
15
+ export { useColorPickerSwatchContext } from './color-picker-swatch-context.mjs';
13
16
  export { ColorPickerSwatchGroup } from './color-picker-swatch-group.mjs';
14
17
  export { colorPickerAnatomy } from './color-picker.anatomy.mjs';
@@ -1,26 +1,7 @@
1
- import type { ColorFormat, ColorChannelInputProps } from '@zag-js/color-picker/dist/color-picker.types';
2
- import type { Accessor, JSX } from 'solid-js';
1
+ import type { PropTypes } from '@zag-js/solid';
2
+ import type { Accessor } from 'solid-js';
3
3
  import * as colorPicker from '@zag-js/color-picker';
4
4
  import { type Optional } from '../types';
5
5
  export type UseColorPickerProps = Optional<colorPicker.Context, 'id'>;
6
6
  export type UseColorPickerReturn = ReturnType<typeof useColorPicker>;
7
- export declare const useColorPicker: (props: UseColorPickerProps) => Accessor<{
8
- isDragging: boolean;
9
- value: string;
10
- valueAsColor: colorPicker.Color;
11
- channels: [colorPicker.ColorChannel, colorPicker.ColorChannel, colorPicker.ColorChannel];
12
- setColor(value: string | colorPicker.Color): void;
13
- setChannelValue(channel: colorPicker.ColorChannel, value: number): void;
14
- setFormat(format: ColorFormat): void;
15
- contentProps: JSX.HTMLAttributes<any>;
16
- getAreaProps(props: colorPicker.ColorAreaProps): JSX.HTMLAttributes<any>;
17
- getAreaGradientProps(props: colorPicker.ColorAreaProps): JSX.HTMLAttributes<any>;
18
- getAreaThumbProps(props: colorPicker.ColorAreaProps): JSX.HTMLAttributes<any>;
19
- getChannelSliderTrackProps(props: colorPicker.ColorChannelProps): JSX.HTMLAttributes<any>;
20
- getChannelSliderBackgroundProps(props: colorPicker.ColorChannelProps): JSX.HTMLAttributes<any>;
21
- getChannelSliderThumbProps(props: colorPicker.ColorChannelProps): JSX.HTMLAttributes<any>;
22
- getChannelInputProps(props: ColorChannelInputProps): JSX.InputHTMLAttributes<HTMLInputElement>;
23
- eyeDropperTriggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
24
- getSwatchBackgroundProps(props: colorPicker.ColorSwatchProps): JSX.HTMLAttributes<any>;
25
- getSwatchProps(props: colorPicker.ColorSwatchProps): JSX.HTMLAttributes<any>;
26
- }>;
7
+ export declare const useColorPicker: (props: UseColorPickerProps) => Accessor<colorPicker.PublicApi<PropTypes>>;
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+
5
+ const web = require('solid-js/web');
6
+ const solid = require('@zag-js/solid');
7
+ const factory = require('../factory.cjs');
8
+ const comboboxContext = require('./combobox-context.cjs');
9
+
10
+ const ComboboxClearTrigger = props => {
11
+ const combobox = comboboxContext.useComboboxContext();
12
+ const clearTriggerProps = solid.mergeProps(() => combobox().clearTriggerProps, props);
13
+ return web.createComponent(factory.ark.button, clearTriggerProps);
14
+ };
15
+
16
+ exports.ComboboxClearTrigger = ComboboxClearTrigger;
@@ -0,0 +1,4 @@
1
+ import type { JSX } from 'solid-js';
2
+ import { type HTMLArkProps } from '../factory';
3
+ export type ComboboxClearTriggerProps = HTMLArkProps<'button'>;
4
+ export declare const ComboboxClearTrigger: (props: ComboboxClearTriggerProps) => JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { createComponent } from 'solid-js/web';
2
+ import { mergeProps } from '@zag-js/solid';
3
+ import { ark } from '../factory.mjs';
4
+ import { useComboboxContext } from './combobox-context.mjs';
5
+
6
+ const ComboboxClearTrigger = props => {
7
+ const combobox = useComboboxContext();
8
+ const clearTriggerProps = mergeProps(() => combobox().clearTriggerProps, props);
9
+ return createComponent(ark.button, clearTriggerProps);
10
+ };
11
+
12
+ export { ComboboxClearTrigger };
@@ -1,58 +1,7 @@
1
- import type { OptionData, OptionProps, OptionGroupProps } from '@zag-js/combobox';
2
- import type { Accessor, JSX } from 'solid-js';
1
+ import type { PropTypes } from '@zag-js/solid';
2
+ import type { PublicApi } from '@zag-js/combobox';
3
+ import type { Accessor } from 'solid-js';
3
4
  import type { ContextProviderComponent } from 'solid-js/types/reactive/signal';
4
5
  import { type UseComboboxReturn } from './use-combobox';
5
6
  export type ComboboxContext = UseComboboxReturn;
6
- export declare const ComboboxProvider: ContextProviderComponent<Accessor<{
7
- isFocused: boolean;
8
- isOpen: boolean;
9
- isInputValueEmpty: boolean;
10
- inputValue: string;
11
- focusedOption: OptionData | null;
12
- selectedValue: string | undefined;
13
- setValue(value: string | OptionData): void;
14
- setInputValue(value: string): void;
15
- clearValue(): void;
16
- focus(): void;
17
- rootProps: JSX.HTMLAttributes<any>;
18
- labelProps: JSX.LabelHTMLAttributes<HTMLLabelElement>;
19
- controlProps: JSX.HTMLAttributes<any>;
20
- positionerProps: JSX.HTMLAttributes<any>;
21
- inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;
22
- triggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
23
- contentProps: JSX.HTMLAttributes<any>;
24
- clearTriggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
25
- getOptionState(props: OptionProps): {
26
- disabled: boolean | undefined;
27
- focused: boolean;
28
- checked: boolean;
29
- };
30
- getOptionProps(props: OptionProps): JSX.HTMLAttributes<any>;
31
- getOptionGroupProps(props: OptionGroupProps): JSX.HTMLAttributes<any>;
32
- }>>, useComboboxContext: () => Accessor<{
33
- isFocused: boolean;
34
- isOpen: boolean;
35
- isInputValueEmpty: boolean;
36
- inputValue: string;
37
- focusedOption: OptionData | null;
38
- selectedValue: string | undefined;
39
- setValue(value: string | OptionData): void;
40
- setInputValue(value: string): void;
41
- clearValue(): void;
42
- focus(): void;
43
- rootProps: JSX.HTMLAttributes<any>;
44
- labelProps: JSX.LabelHTMLAttributes<HTMLLabelElement>;
45
- controlProps: JSX.HTMLAttributes<any>;
46
- positionerProps: JSX.HTMLAttributes<any>;
47
- inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;
48
- triggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
49
- contentProps: JSX.HTMLAttributes<any>;
50
- clearTriggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
51
- getOptionState(props: OptionProps): {
52
- disabled: boolean | undefined;
53
- focused: boolean;
54
- checked: boolean;
55
- };
56
- getOptionProps(props: OptionProps): JSX.HTMLAttributes<any>;
57
- getOptionGroupProps(props: OptionGroupProps): JSX.HTMLAttributes<any>;
58
- }>;
7
+ export declare const ComboboxProvider: ContextProviderComponent<Accessor<PublicApi<PropTypes>>>, useComboboxContext: () => Accessor<PublicApi<PropTypes>>;
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+
5
+ const web = require('solid-js/web');
6
+ const solid = require('@zag-js/solid');
7
+ const factory = require('../factory.cjs');
8
+ const comboboxContext = require('./combobox-context.cjs');
9
+
10
+ const ComboboxOptionGroup = props => {
11
+ const combobox = comboboxContext.useComboboxContext();
12
+ const contentProps = solid.mergeProps(() => combobox().contentProps, props);
13
+ return web.createComponent(factory.ark.ul, contentProps);
14
+ };
15
+
16
+ exports.ComboboxOptionGroup = ComboboxOptionGroup;
@@ -0,0 +1,6 @@
1
+ import type { JSX } from 'solid-js';
2
+ import type { OptionGroupProps } from '@zag-js/combobox';
3
+ import { type HTMLArkProps } from '../factory';
4
+ import type { Assign } from '../types';
5
+ export type ComboboxOptionGroupProps = Assign<HTMLArkProps<'ul'>, OptionGroupProps>;
6
+ export declare const ComboboxOptionGroup: (props: ComboboxOptionGroupProps) => JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { createComponent } from 'solid-js/web';
2
+ import { mergeProps } from '@zag-js/solid';
3
+ import { ark } from '../factory.mjs';
4
+ import { useComboboxContext } from './combobox-context.mjs';
5
+
6
+ const ComboboxOptionGroup = props => {
7
+ const combobox = useComboboxContext();
8
+ const contentProps = mergeProps(() => combobox().contentProps, props);
9
+ return createComponent(ark.ul, contentProps);
10
+ };
11
+
12
+ export { ComboboxOptionGroup };
@@ -3,11 +3,14 @@
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
5
  const combobox = require('./combobox.cjs');
6
+ const comboboxClearTrigger = require('./combobox-clear-trigger.cjs');
6
7
  const comboboxContent = require('./combobox-content.cjs');
8
+ const comboboxContext = require('./combobox-context.cjs');
7
9
  const comboboxControl = require('./combobox-control.cjs');
8
10
  const comboboxInput = require('./combobox-input.cjs');
9
11
  const comboboxLabel = require('./combobox-label.cjs');
10
12
  const comboboxOption = require('./combobox-option.cjs');
13
+ const comboboxOptionGroup = require('./combobox-option-group.cjs');
11
14
  const comboboxPositioner = require('./combobox-positioner.cjs');
12
15
  const comboboxTrigger = require('./combobox-trigger.cjs');
13
16
  const combobox$1 = require('@zag-js/combobox');
@@ -15,11 +18,14 @@ const combobox$1 = require('@zag-js/combobox');
15
18
 
16
19
 
17
20
  exports.Combobox = combobox.Combobox;
21
+ exports.ComboboxClearTrigger = comboboxClearTrigger.ComboboxClearTrigger;
18
22
  exports.ComboboxContent = comboboxContent.ComboboxContent;
23
+ exports.useComboboxContext = comboboxContext.useComboboxContext;
19
24
  exports.ComboboxControl = comboboxControl.ComboboxControl;
20
25
  exports.ComboboxInput = comboboxInput.ComboboxInput;
21
26
  exports.ComboboxLabel = comboboxLabel.ComboboxLabel;
22
27
  exports.ComboboxOption = comboboxOption.ComboboxOption;
28
+ exports.ComboboxOptionGroup = comboboxOptionGroup.ComboboxOptionGroup;
23
29
  exports.ComboboxPositioner = comboboxPositioner.ComboboxPositioner;
24
30
  exports.ComboboxTrigger = comboboxTrigger.ComboboxTrigger;
25
31
  Object.defineProperty(exports, 'comboboxAnatomy', {
@@ -1,9 +1,12 @@
1
1
  export { Combobox, type ComboboxProps } from './combobox';
2
+ export { ComboboxClearTrigger, type ComboboxClearTriggerProps } from './combobox-clear-trigger';
2
3
  export { ComboboxContent, type ComboboxContentProps } from './combobox-content';
4
+ export { useComboboxContext } from './combobox-context';
3
5
  export { ComboboxControl, type ComboboxControlProps } from './combobox-control';
4
6
  export { ComboboxInput, type ComboboxInputProps } from './combobox-input';
5
7
  export { ComboboxLabel, type ComboboxLabelProps } from './combobox-label';
6
8
  export { ComboboxOption, type ComboboxOptionProps } from './combobox-option';
9
+ export { ComboboxOptionGroup, type ComboboxOptionGroupProps } from './combobox-option-group';
7
10
  export { ComboboxPositioner, type ComboboxPositionerProps } from './combobox-positioner';
8
11
  export { ComboboxTrigger, type ComboboxTriggerProps } from './combobox-trigger';
9
12
  export { comboboxAnatomy } from './combobox.anatomy';
@@ -1,9 +1,12 @@
1
1
  export { Combobox } from './combobox.mjs';
2
+ export { ComboboxClearTrigger } from './combobox-clear-trigger.mjs';
2
3
  export { ComboboxContent } from './combobox-content.mjs';
4
+ export { useComboboxContext } from './combobox-context.mjs';
3
5
  export { ComboboxControl } from './combobox-control.mjs';
4
6
  export { ComboboxInput } from './combobox-input.mjs';
5
7
  export { ComboboxLabel } from './combobox-label.mjs';
6
8
  export { ComboboxOption } from './combobox-option.mjs';
9
+ export { ComboboxOptionGroup } from './combobox-option-group.mjs';
7
10
  export { ComboboxPositioner } from './combobox-positioner.mjs';
8
11
  export { ComboboxTrigger } from './combobox-trigger.mjs';
9
12
  export { anatomy as comboboxAnatomy } from '@zag-js/combobox';
@@ -1,32 +1,7 @@
1
- import type { Accessor, JSX } from 'solid-js';
1
+ import type { PropTypes } from '@zag-js/solid';
2
+ import type { Accessor } from 'solid-js';
2
3
  import * as combobox from '@zag-js/combobox';
3
4
  import { type Optional } from '../types';
4
5
  export type UseComboboxProps = Optional<combobox.Context, 'id'>;
5
6
  export type UseComboboxReturn = ReturnType<typeof useCombobox>;
6
- export declare const useCombobox: (props: UseComboboxProps) => Accessor<{
7
- isFocused: boolean;
8
- isOpen: boolean;
9
- isInputValueEmpty: boolean;
10
- inputValue: string;
11
- focusedOption: combobox.OptionData | null;
12
- selectedValue: string | undefined;
13
- setValue(value: string | combobox.OptionData): void;
14
- setInputValue(value: string): void;
15
- clearValue(): void;
16
- focus(): void;
17
- rootProps: JSX.HTMLAttributes<any>;
18
- labelProps: JSX.LabelHTMLAttributes<HTMLLabelElement>;
19
- controlProps: JSX.HTMLAttributes<any>;
20
- positionerProps: JSX.HTMLAttributes<any>;
21
- inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;
22
- triggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
23
- contentProps: JSX.HTMLAttributes<any>;
24
- clearTriggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
25
- getOptionState(props: combobox.OptionProps): {
26
- disabled: boolean | undefined;
27
- focused: boolean;
28
- checked: boolean;
29
- };
30
- getOptionProps(props: combobox.OptionProps): JSX.HTMLAttributes<any>;
31
- getOptionGroupProps(props: combobox.OptionGroupProps): JSX.HTMLAttributes<any>;
32
- }>;
7
+ export declare const useCombobox: (props: UseComboboxProps) => Accessor<combobox.PublicApi<PropTypes>>;
@@ -1,257 +1,7 @@
1
- import type { matchView } from '@zag-js/date-picker/dist/date-picker.utils';
2
- import type { DateView, DateValue, CalendarDate, CalendarDateTime, ZonedDateTime, GridProps, DayCellProps, CellProps, ViewProps } from '@zag-js/date-picker';
3
- import type { Accessor, JSX } from 'solid-js';
1
+ import type { PropTypes } from '@zag-js/solid';
2
+ import type { PublicApi } from '@zag-js/date-picker';
3
+ import type { Accessor } from 'solid-js';
4
4
  import type { ContextProviderComponent } from 'solid-js/types/reactive/signal';
5
5
  import { type UseDatePickerReturn } from './use-date-picker';
6
6
  export type DatePickerContext = UseDatePickerReturn;
7
- export declare const DatePickerProvider: ContextProviderComponent<Accessor<{
8
- isFocused: boolean;
9
- isOpen: boolean | undefined;
10
- view: DateView;
11
- matchView: typeof matchView;
12
- getDaysInWeek(weekIndex: number, from?: DateValue | undefined): DateValue[];
13
- getOffset(months: number): {
14
- amount: number;
15
- visibleRange: {
16
- start: CalendarDate | CalendarDateTime | ZonedDateTime;
17
- end: CalendarDate | CalendarDateTime | ZonedDateTime;
18
- };
19
- weeks: DateValue[][];
20
- };
21
- getMonthDays(from?: DateValue | undefined): DateValue[][];
22
- isUnavailable(date: DateValue): boolean;
23
- readonly weeks: DateValue[][];
24
- weekDays: {
25
- value: CalendarDate | CalendarDateTime | ZonedDateTime;
26
- short: string;
27
- long: string;
28
- narrow: string;
29
- }[];
30
- visibleRangeText: {
31
- start: string;
32
- end: string;
33
- formatted: string;
34
- };
35
- value: DateValue[];
36
- valueAsDate: Date[];
37
- valueAsString: string[];
38
- focusedValue: DateValue;
39
- focusedValueAsDate: Date;
40
- focusedValueAsString: string;
41
- selectToday(): void;
42
- setValue(values: CalendarDate[]): void;
43
- setFocusedValue(value: CalendarDate): void;
44
- clearValue(): void;
45
- open(): void;
46
- close(): void;
47
- focusMonth(month: number): void;
48
- focusYear(year: number): void;
49
- visibleRange: {
50
- start: DateValue;
51
- end: DateValue;
52
- };
53
- getYears(): {
54
- label: string;
55
- value: number;
56
- }[];
57
- getYearsGrid(props?: {
58
- columns?: number | undefined;
59
- } | undefined): {
60
- label: string;
61
- value: number;
62
- }[][];
63
- getDecade(): {
64
- start: number | undefined;
65
- end: number | undefined;
66
- };
67
- getMonths(props?: {
68
- format?: "short" | "long" | undefined;
69
- } | undefined): {
70
- label: string;
71
- value: number;
72
- }[];
73
- getMonthsGrid(props?: {
74
- columns?: number | undefined;
75
- format?: "short" | "long" | undefined;
76
- } | undefined): {
77
- label: string;
78
- value: number;
79
- }[][];
80
- format(value: CalendarDate, opts?: Intl.DateTimeFormatOptions | undefined): string;
81
- setView(view: DateView): void;
82
- goToNext(): void;
83
- goToPrev(): void;
84
- controlProps: JSX.HTMLAttributes<any>;
85
- contentProps: JSX.HTMLAttributes<any>;
86
- getGridProps(props?: GridProps | undefined): JSX.HTMLAttributes<any>;
87
- getDayCellState(props: DayCellProps): {
88
- isInvalid: boolean;
89
- isDisabled: boolean;
90
- isSelected: boolean;
91
- isUnavailable: boolean;
92
- isOutsideRange: boolean;
93
- isInRange: boolean;
94
- isFirstInRange: boolean;
95
- isLastInRange: boolean;
96
- isToday: boolean;
97
- isWeekend: boolean;
98
- formattedDate: string;
99
- readonly isFocused: boolean;
100
- readonly ariaLabel: string;
101
- readonly isSelectable: boolean;
102
- };
103
- getDayCellProps(props: DayCellProps): JSX.HTMLAttributes<any>;
104
- getDayCellTriggerProps(props: DayCellProps): JSX.HTMLAttributes<any>;
105
- getMonthCellState(props: CellProps): {
106
- isFocused: boolean;
107
- isSelectable: boolean;
108
- isSelected: boolean;
109
- valueText: string;
110
- readonly isDisabled: boolean;
111
- };
112
- getMonthCellProps(props: CellProps): JSX.HTMLAttributes<any>;
113
- getMonthCellTriggerProps(props: CellProps): JSX.HTMLAttributes<any>;
114
- getYearCellState(props: CellProps): {
115
- isFocused: boolean;
116
- isSelectable: boolean;
117
- isSelected: boolean;
118
- valueText: string;
119
- readonly isDisabled: boolean;
120
- };
121
- getYearCellProps(props: CellProps): JSX.HTMLAttributes<any>;
122
- getYearCellTriggerProps(props: CellProps): JSX.HTMLAttributes<any>;
123
- getNextTriggerProps(props?: ViewProps | undefined): JSX.ButtonHTMLAttributes<HTMLButtonElement>;
124
- getPrevTriggerProps(props?: ViewProps | undefined): JSX.ButtonHTMLAttributes<HTMLButtonElement>;
125
- getHeaderProps(props?: ViewProps | undefined): JSX.HTMLAttributes<any>;
126
- clearTriggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
127
- triggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
128
- getViewTriggerProps(props?: ViewProps | undefined): JSX.ButtonHTMLAttributes<HTMLButtonElement>;
129
- inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;
130
- monthSelectProps: JSX.SelectHTMLAttributes<HTMLSelectElement>;
131
- yearSelectProps: JSX.SelectHTMLAttributes<HTMLSelectElement>;
132
- }>>, useDatePickerContext: () => Accessor<{
133
- isFocused: boolean;
134
- isOpen: boolean | undefined;
135
- view: DateView;
136
- matchView: typeof matchView;
137
- getDaysInWeek(weekIndex: number, from?: DateValue | undefined): DateValue[];
138
- getOffset(months: number): {
139
- amount: number;
140
- visibleRange: {
141
- start: CalendarDate | CalendarDateTime | ZonedDateTime;
142
- end: CalendarDate | CalendarDateTime | ZonedDateTime;
143
- };
144
- weeks: DateValue[][];
145
- };
146
- getMonthDays(from?: DateValue | undefined): DateValue[][];
147
- isUnavailable(date: DateValue): boolean;
148
- readonly weeks: DateValue[][];
149
- weekDays: {
150
- value: CalendarDate | CalendarDateTime | ZonedDateTime;
151
- short: string;
152
- long: string;
153
- narrow: string;
154
- }[];
155
- visibleRangeText: {
156
- start: string;
157
- end: string;
158
- formatted: string;
159
- };
160
- value: DateValue[];
161
- valueAsDate: Date[];
162
- valueAsString: string[];
163
- focusedValue: DateValue;
164
- focusedValueAsDate: Date;
165
- focusedValueAsString: string;
166
- selectToday(): void;
167
- setValue(values: CalendarDate[]): void;
168
- setFocusedValue(value: CalendarDate): void;
169
- clearValue(): void;
170
- open(): void;
171
- close(): void;
172
- focusMonth(month: number): void;
173
- focusYear(year: number): void;
174
- visibleRange: {
175
- start: DateValue;
176
- end: DateValue;
177
- };
178
- getYears(): {
179
- label: string;
180
- value: number;
181
- }[];
182
- getYearsGrid(props?: {
183
- columns?: number | undefined;
184
- } | undefined): {
185
- label: string;
186
- value: number;
187
- }[][];
188
- getDecade(): {
189
- start: number | undefined;
190
- end: number | undefined;
191
- };
192
- getMonths(props?: {
193
- format?: "short" | "long" | undefined;
194
- } | undefined): {
195
- label: string;
196
- value: number;
197
- }[];
198
- getMonthsGrid(props?: {
199
- columns?: number | undefined;
200
- format?: "short" | "long" | undefined;
201
- } | undefined): {
202
- label: string;
203
- value: number;
204
- }[][];
205
- format(value: CalendarDate, opts?: Intl.DateTimeFormatOptions | undefined): string;
206
- setView(view: DateView): void;
207
- goToNext(): void;
208
- goToPrev(): void;
209
- controlProps: JSX.HTMLAttributes<any>;
210
- contentProps: JSX.HTMLAttributes<any>;
211
- getGridProps(props?: GridProps | undefined): JSX.HTMLAttributes<any>;
212
- getDayCellState(props: DayCellProps): {
213
- isInvalid: boolean;
214
- isDisabled: boolean;
215
- isSelected: boolean;
216
- isUnavailable: boolean;
217
- isOutsideRange: boolean;
218
- isInRange: boolean;
219
- isFirstInRange: boolean;
220
- isLastInRange: boolean;
221
- isToday: boolean;
222
- isWeekend: boolean;
223
- formattedDate: string;
224
- readonly isFocused: boolean;
225
- readonly ariaLabel: string;
226
- readonly isSelectable: boolean;
227
- };
228
- getDayCellProps(props: DayCellProps): JSX.HTMLAttributes<any>;
229
- getDayCellTriggerProps(props: DayCellProps): JSX.HTMLAttributes<any>;
230
- getMonthCellState(props: CellProps): {
231
- isFocused: boolean;
232
- isSelectable: boolean;
233
- isSelected: boolean;
234
- valueText: string;
235
- readonly isDisabled: boolean;
236
- };
237
- getMonthCellProps(props: CellProps): JSX.HTMLAttributes<any>;
238
- getMonthCellTriggerProps(props: CellProps): JSX.HTMLAttributes<any>;
239
- getYearCellState(props: CellProps): {
240
- isFocused: boolean;
241
- isSelectable: boolean;
242
- isSelected: boolean;
243
- valueText: string;
244
- readonly isDisabled: boolean;
245
- };
246
- getYearCellProps(props: CellProps): JSX.HTMLAttributes<any>;
247
- getYearCellTriggerProps(props: CellProps): JSX.HTMLAttributes<any>;
248
- getNextTriggerProps(props?: ViewProps | undefined): JSX.ButtonHTMLAttributes<HTMLButtonElement>;
249
- getPrevTriggerProps(props?: ViewProps | undefined): JSX.ButtonHTMLAttributes<HTMLButtonElement>;
250
- getHeaderProps(props?: ViewProps | undefined): JSX.HTMLAttributes<any>;
251
- clearTriggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
252
- triggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
253
- getViewTriggerProps(props?: ViewProps | undefined): JSX.ButtonHTMLAttributes<HTMLButtonElement>;
254
- inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;
255
- monthSelectProps: JSX.SelectHTMLAttributes<HTMLSelectElement>;
256
- yearSelectProps: JSX.SelectHTMLAttributes<HTMLSelectElement>;
257
- }>;
7
+ export declare const DatePickerProvider: ContextProviderComponent<Accessor<PublicApi<PropTypes>>>, useDatePickerContext: () => Accessor<PublicApi<PropTypes>>;
@@ -1,5 +1,5 @@
1
1
  import type { JSX } from 'solid-js';
2
- import type { GridProps } from '@zag-js/date-picker/dist/date-picker.types';
2
+ import type { GridProps } from '@zag-js/date-picker';
3
3
  import { type HTMLArkProps } from '../factory';
4
4
  import type { Assign } from '../types';
5
5
  export type DatePickerGridProps = Assign<HTMLArkProps<'div'>, GridProps>;
@@ -1,5 +1,5 @@
1
1
  import type { JSX } from 'solid-js';
2
- import type { ViewProps } from '@zag-js/date-picker/dist/date-picker.types';
2
+ import type { ViewProps } from '@zag-js/date-picker';
3
3
  import { type HTMLArkProps } from '../factory';
4
4
  import type { Assign } from '../types';
5
5
  export type DatePickerViewTriggerProps = Assign<HTMLArkProps<'button'>, ViewProps>;
@@ -3,11 +3,14 @@
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
5
  const datePicker = require('./date-picker.cjs');
6
+ const datePickerCellContext = require('./date-picker-cell-context.cjs');
6
7
  const datePickerClearTrigger = require('./date-picker-clear-trigger.cjs');
7
8
  const datePickerColumnHeader = require('./date-picker-column-header.cjs');
8
9
  const datePickerContent = require('./date-picker-content.cjs');
10
+ const datePickerContext = require('./date-picker-context.cjs');
9
11
  const datePickerControl = require('./date-picker-control.cjs');
10
12
  const datePickerDayCell = require('./date-picker-day-cell.cjs');
13
+ const datePickerDayCellContext = require('./date-picker-day-cell-context.cjs');
11
14
  const datePickerDayCellTrigger = require('./date-picker-day-cell-trigger.cjs');
12
15
  const datePickerGrid = require('./date-picker-grid.cjs');
13
16
  const datePickerInput = require('./date-picker-input.cjs');
@@ -29,11 +32,14 @@ const datePicker_anatomy = require('./date-picker.anatomy.cjs');
29
32
 
30
33
 
31
34
  exports.DatePicker = datePicker.DatePicker;
35
+ exports.useDatePickerCellContext = datePickerCellContext.useDatePickerCellContext;
32
36
  exports.DatePickerClearTrigger = datePickerClearTrigger.DatePickerClearTrigger;
33
37
  exports.DatePickerColumnHeader = datePickerColumnHeader.DatePickerColumnHeader;
34
38
  exports.DatePickerContent = datePickerContent.DatePickerContent;
39
+ exports.useDatePickerContext = datePickerContext.useDatePickerContext;
35
40
  exports.DatePickerControl = datePickerControl.DatePickerControl;
36
41
  exports.DatePickerDayCell = datePickerDayCell.DatePickerDayCell;
42
+ exports.useDatePickerDayCellContext = datePickerDayCellContext.useDatePickerDayCellContext;
37
43
  exports.DatePickerDayCellTrigger = datePickerDayCellTrigger.DatePickerDayCellTrigger;
38
44
  exports.DatePickerGrid = datePickerGrid.DatePickerGrid;
39
45
  exports.DatePickerInput = datePickerInput.DatePickerInput;
@@ -1,9 +1,12 @@
1
1
  export { DatePicker, type DatePickerProps } from './date-picker';
2
+ export { useDatePickerCellContext } from './date-picker-cell-context';
2
3
  export { DatePickerClearTrigger, type DatePickerClearTriggerProps, } from './date-picker-clear-trigger';
3
4
  export { DatePickerColumnHeader, type DatePickerColumnHeaderProps, } from './date-picker-column-header';
4
5
  export { DatePickerContent, type DatePickerContentProps } from './date-picker-content';
6
+ export { useDatePickerContext } from './date-picker-context';
5
7
  export { DatePickerControl, type DatePickerControlProps } from './date-picker-control';
6
8
  export { DatePickerDayCell, type DatePickerDayCellProps } from './date-picker-day-cell';
9
+ export { useDatePickerDayCellContext } from './date-picker-day-cell-context';
7
10
  export { DatePickerDayCellTrigger, type DatePickerDayCellTriggerProps, } from './date-picker-day-cell-trigger';
8
11
  export { DatePickerGrid, type DatePickerGridProps } from './date-picker-grid';
9
12
  export { DatePickerInput, type DatePickerInputProps } from './date-picker-input';
@@ -1,9 +1,12 @@
1
1
  export { DatePicker } from './date-picker.mjs';
2
+ export { useDatePickerCellContext } from './date-picker-cell-context.mjs';
2
3
  export { DatePickerClearTrigger } from './date-picker-clear-trigger.mjs';
3
4
  export { DatePickerColumnHeader } from './date-picker-column-header.mjs';
4
5
  export { DatePickerContent } from './date-picker-content.mjs';
6
+ export { useDatePickerContext } from './date-picker-context.mjs';
5
7
  export { DatePickerControl } from './date-picker-control.mjs';
6
8
  export { DatePickerDayCell } from './date-picker-day-cell.mjs';
9
+ export { useDatePickerDayCellContext } from './date-picker-day-cell-context.mjs';
7
10
  export { DatePickerDayCellTrigger } from './date-picker-day-cell-trigger.mjs';
8
11
  export { DatePickerGrid } from './date-picker-grid.mjs';
9
12
  export { DatePickerInput } from './date-picker-input.mjs';