@ark-ui/solid 3.4.1 → 3.6.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.
- package/README.md +3 -0
- package/dist/cjs/index.js +774 -37
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +654 -34
- package/dist/esm/index.js.map +1 -1
- package/dist/source/components/accordion/accordion.anatomy.js +1 -0
- package/dist/source/components/accordion/index.js +1 -0
- package/dist/source/components/avatar/avatar.anatomy.js +1 -0
- package/dist/source/components/avatar/index.js +1 -0
- package/dist/source/components/carousel/carousel-control.jsx +1 -1
- package/dist/source/components/carousel/carousel.anatomy.js +2 -0
- package/dist/source/components/carousel/index.js +1 -0
- package/dist/source/components/checkbox/checkbox-group.jsx +1 -1
- package/dist/source/components/checkbox/checkbox.anatomy.js +2 -0
- package/dist/source/components/checkbox/index.js +1 -0
- package/dist/source/components/clipboard/clipboard.anatomy.js +1 -0
- package/dist/source/components/clipboard/index.js +1 -0
- package/dist/source/components/collapsible/collapsible.anatomy.js +1 -0
- package/dist/source/components/collapsible/index.js +1 -0
- package/dist/source/components/color-picker/color-picker-value-text.jsx +3 -4
- package/dist/source/components/color-picker/color-picker-view.jsx +1 -1
- package/dist/source/components/color-picker/color-picker.anatomy.js +2 -0
- package/dist/source/components/color-picker/index.js +1 -0
- package/dist/source/components/combobox/combobox.anatomy.js +1 -0
- package/dist/source/components/combobox/index.js +1 -0
- package/dist/source/components/date-picker/date-picker-view.jsx +1 -1
- package/dist/source/components/date-picker/date-picker.anatomy.js +2 -0
- package/dist/source/components/date-picker/index.js +1 -0
- package/dist/source/components/dialog/dialog.anatomy.js +1 -0
- package/dist/source/components/dialog/index.js +1 -0
- package/dist/source/components/editable/editable.anatomy.js +1 -0
- package/dist/source/components/editable/index.js +1 -0
- package/dist/source/components/field/field.anatomy.js +3 -0
- package/dist/source/components/field/index.js +1 -0
- package/dist/source/components/field/use-field.js +6 -5
- package/dist/source/components/fieldset/fieldset-context.jsx +2 -0
- package/dist/source/components/fieldset/fieldset-error-text.jsx +11 -0
- package/dist/source/components/fieldset/fieldset-helper-text.jsx +8 -0
- package/dist/source/components/fieldset/fieldset-legend.jsx +8 -0
- package/dist/source/components/fieldset/fieldset-root-provider.jsx +11 -0
- package/dist/source/components/fieldset/fieldset-root.jsx +18 -0
- package/dist/source/components/fieldset/fieldset.anatomy.js +3 -0
- package/dist/source/components/fieldset/fieldset.jsx +6 -0
- package/dist/source/components/fieldset/index.js +9 -0
- package/dist/source/components/fieldset/use-fieldset-context.js +6 -0
- package/dist/source/components/fieldset/use-fieldset.js +65 -0
- package/dist/source/components/file-upload/file-upload.anatomy.js +1 -0
- package/dist/source/components/file-upload/index.js +1 -0
- package/dist/source/components/highlight/highlight.jsx +20 -0
- package/dist/source/components/highlight/index.js +2 -0
- package/dist/source/components/highlight/use-highlight.js +42 -0
- package/dist/source/components/hover-card/hover-card.anatomy.js +1 -0
- package/dist/source/components/hover-card/index.js +1 -0
- package/dist/source/components/index.js +3 -0
- package/dist/source/components/menu/index.js +1 -0
- package/dist/source/components/menu/menu.anatomy.js +1 -0
- package/dist/source/components/number-input/index.js +2 -0
- package/dist/source/components/number-input/number-input-value-text.jsx +8 -0
- package/dist/source/components/number-input/number-input.anatomy.js +1 -0
- package/dist/source/components/number-input/number-input.js +1 -0
- package/dist/source/components/pagination/index.js +1 -0
- package/dist/source/components/pagination/pagination.anatomy.js +1 -0
- package/dist/source/components/pin-input/index.js +1 -0
- package/dist/source/components/pin-input/pin-input.anatomy.js +1 -0
- package/dist/source/components/popover/index.js +1 -0
- package/dist/source/components/popover/popover.anatomy.js +1 -0
- package/dist/source/components/progress/index.js +1 -0
- package/dist/source/components/progress/progress.anatomy.js +1 -0
- package/dist/source/components/qr-code/index.js +1 -0
- package/dist/source/components/qr-code/qr-code.anatomy.js +1 -0
- package/dist/source/components/radio-group/index.js +1 -0
- package/dist/source/components/radio-group/radio-group.anatomy.js +1 -0
- package/dist/source/components/rating-group/index.js +1 -0
- package/dist/source/components/rating-group/rating-group.anatomy.js +1 -0
- package/dist/source/components/segment-group/index.js +1 -0
- package/dist/source/components/segment-group/segment-group-indicator.jsx +2 -2
- package/dist/source/components/segment-group/segment-group-item-control.jsx +2 -2
- package/dist/source/components/segment-group/segment-group-item-text.jsx +2 -2
- package/dist/source/components/segment-group/segment-group-item.jsx +2 -2
- package/dist/source/components/segment-group/segment-group-label.jsx +2 -2
- package/dist/source/components/segment-group/segment-group-root-provider.jsx +2 -2
- package/dist/source/components/segment-group/segment-group-root.jsx +2 -2
- package/dist/source/components/segment-group/segment-group.anatomy.js +3 -0
- package/dist/source/components/select/index.js +1 -0
- package/dist/source/components/select/select-hidden-select.jsx +1 -1
- package/dist/source/components/select/select-value-text.jsx +1 -2
- package/dist/source/components/select/select.anatomy.js +1 -0
- package/dist/source/components/signature-pad/index.js +1 -0
- package/dist/source/components/signature-pad/signature-pad.anatomy.js +1 -0
- package/dist/source/components/slider/index.js +1 -0
- package/dist/source/components/slider/slider.anatomy.js +1 -0
- package/dist/source/components/splitter/index.js +1 -0
- package/dist/source/components/splitter/splitter.anatomy.js +1 -0
- package/dist/source/components/switch/index.js +1 -0
- package/dist/source/components/switch/switch.anatomy.js +1 -0
- package/dist/source/components/tabs/index.js +1 -0
- package/dist/source/components/tabs/tabs.anatomy.js +1 -0
- package/dist/source/components/tags-input/index.js +1 -0
- package/dist/source/components/tags-input/tags-input.anatomy.js +1 -0
- package/dist/source/components/time-picker/index.js +16 -0
- package/dist/source/components/time-picker/time-picker-cell.jsx +18 -0
- package/dist/source/components/time-picker/time-picker-clear-trigger.jsx +8 -0
- package/dist/source/components/time-picker/time-picker-column.jsx +13 -0
- package/dist/source/components/time-picker/time-picker-content.jsx +13 -0
- package/dist/source/components/time-picker/time-picker-context.jsx +2 -0
- package/dist/source/components/time-picker/time-picker-control.jsx +8 -0
- package/dist/source/components/time-picker/time-picker-input.jsx +8 -0
- package/dist/source/components/time-picker/time-picker-label.jsx +8 -0
- package/dist/source/components/time-picker/time-picker-positioner.jsx +13 -0
- package/dist/source/components/time-picker/time-picker-root-provider.jsx +16 -0
- package/dist/source/components/time-picker/time-picker-root.jsx +39 -0
- package/dist/source/components/time-picker/time-picker-spacer.jsx +8 -0
- package/dist/source/components/time-picker/time-picker-trigger.jsx +8 -0
- package/dist/source/components/time-picker/time-picker.js +13 -0
- package/dist/source/components/time-picker/use-time-picker-column-props-context.js +5 -0
- package/dist/source/components/time-picker/use-time-picker-context.js +5 -0
- package/dist/source/components/time-picker/use-time-picker.js +23 -0
- package/dist/source/components/toast/index.js +1 -0
- package/dist/source/components/toast/toast.anatomy.js +1 -0
- package/dist/source/components/toggle-group/index.js +1 -0
- package/dist/source/components/toggle-group/toggle-group.anatomy.js +1 -0
- package/dist/source/components/tooltip/index.js +1 -0
- package/dist/source/components/tooltip/tooltip-root.jsx +1 -0
- package/dist/source/components/tooltip/tooltip.anatomy.js +1 -0
- package/dist/source/components/tree-view/index.js +1 -0
- package/dist/source/components/tree-view/tree-view.anatomy.js +1 -0
- package/dist/types/components/accordion/accordion.anatomy.d.ts +1 -0
- package/dist/types/components/accordion/index.d.ts +7 -6
- package/dist/types/components/avatar/avatar.anatomy.d.ts +1 -0
- package/dist/types/components/avatar/index.d.ts +1 -0
- package/dist/types/components/carousel/carousel.anatomy.d.ts +1 -0
- package/dist/types/components/carousel/index.d.ts +1 -0
- package/dist/types/components/checkbox/checkbox.anatomy.d.ts +1 -0
- package/dist/types/components/checkbox/index.d.ts +1 -0
- package/dist/types/components/clipboard/clipboard.anatomy.d.ts +1 -0
- package/dist/types/components/clipboard/index.d.ts +1 -0
- package/dist/types/components/collapsible/collapsible.anatomy.d.ts +1 -0
- package/dist/types/components/collapsible/index.d.ts +1 -0
- package/dist/types/components/color-picker/color-picker.anatomy.d.ts +1 -0
- package/dist/types/components/color-picker/index.d.ts +1 -0
- package/dist/types/components/combobox/combobox.anatomy.d.ts +1 -0
- package/dist/types/components/combobox/index.d.ts +1 -0
- package/dist/types/components/date-picker/date-picker.anatomy.d.ts +1 -0
- package/dist/types/components/date-picker/index.d.ts +1 -0
- package/dist/types/components/dialog/dialog-root.d.ts +1 -1
- package/dist/types/components/dialog/dialog.anatomy.d.ts +1 -0
- package/dist/types/components/dialog/index.d.ts +1 -0
- package/dist/types/components/editable/editable.anatomy.d.ts +1 -0
- package/dist/types/components/editable/index.d.ts +1 -0
- package/dist/types/components/field/field.anatomy.d.ts +2 -0
- package/dist/types/components/field/index.d.ts +1 -0
- package/dist/types/components/fieldset/fieldset-context.d.ts +6 -0
- package/dist/types/components/fieldset/fieldset-error-text.d.ts +6 -0
- package/dist/types/components/fieldset/fieldset-helper-text.d.ts +6 -0
- package/dist/types/components/fieldset/fieldset-legend.d.ts +6 -0
- package/dist/types/components/fieldset/fieldset-root-provider.d.ts +11 -0
- package/dist/types/components/fieldset/fieldset-root.d.ts +10 -0
- package/dist/types/components/fieldset/fieldset.anatomy.d.ts +2 -0
- package/dist/types/components/fieldset/fieldset.d.ts +6 -0
- package/dist/types/components/fieldset/index.d.ts +9 -0
- package/dist/types/components/fieldset/use-fieldset-context.d.ts +4 -0
- package/dist/types/components/fieldset/use-fieldset.d.ts +49 -0
- package/dist/types/components/file-upload/file-upload.anatomy.d.ts +1 -0
- package/dist/types/components/file-upload/index.d.ts +1 -0
- package/dist/types/components/highlight/highlight.d.ts +8 -0
- package/dist/types/components/highlight/index.d.ts +2 -0
- package/dist/types/components/highlight/use-highlight.d.ts +31 -0
- package/dist/types/components/hover-card/hover-card.anatomy.d.ts +1 -0
- package/dist/types/components/hover-card/index.d.ts +1 -0
- package/dist/types/components/index.d.ts +3 -0
- package/dist/types/components/menu/index.d.ts +1 -0
- package/dist/types/components/menu/menu.anatomy.d.ts +1 -0
- package/dist/types/components/number-input/index.d.ts +10 -8
- package/dist/types/components/number-input/number-input-value-text.d.ts +6 -0
- package/dist/types/components/number-input/number-input.anatomy.d.ts +1 -0
- package/dist/types/components/number-input/number-input.d.ts +9 -8
- package/dist/types/components/pagination/index.d.ts +1 -0
- package/dist/types/components/pagination/pagination.anatomy.d.ts +1 -0
- package/dist/types/components/pin-input/index.d.ts +1 -0
- package/dist/types/components/pin-input/pin-input.anatomy.d.ts +1 -0
- package/dist/types/components/popover/index.d.ts +1 -0
- package/dist/types/components/popover/popover.anatomy.d.ts +1 -0
- package/dist/types/components/progress/index.d.ts +1 -0
- package/dist/types/components/progress/progress.anatomy.d.ts +1 -0
- package/dist/types/components/qr-code/index.d.ts +1 -0
- package/dist/types/components/qr-code/qr-code.anatomy.d.ts +1 -0
- package/dist/types/components/radio-group/index.d.ts +1 -0
- package/dist/types/components/radio-group/radio-group.anatomy.d.ts +1 -0
- package/dist/types/components/rating-group/index.d.ts +1 -0
- package/dist/types/components/rating-group/rating-group.anatomy.d.ts +1 -0
- package/dist/types/components/segment-group/index.d.ts +1 -0
- package/dist/types/components/segment-group/segment-group.anatomy.d.ts +2 -0
- package/dist/types/components/select/index.d.ts +1 -0
- package/dist/types/components/select/select.anatomy.d.ts +1 -0
- package/dist/types/components/signature-pad/index.d.ts +1 -0
- package/dist/types/components/signature-pad/signature-pad.anatomy.d.ts +1 -0
- package/dist/types/components/slider/index.d.ts +1 -0
- package/dist/types/components/slider/slider.anatomy.d.ts +1 -0
- package/dist/types/components/splitter/index.d.ts +1 -0
- package/dist/types/components/splitter/splitter.anatomy.d.ts +1 -0
- package/dist/types/components/switch/index.d.ts +1 -0
- package/dist/types/components/switch/switch.anatomy.d.ts +1 -0
- package/dist/types/components/tabs/index.d.ts +1 -0
- package/dist/types/components/tabs/tabs.anatomy.d.ts +1 -0
- package/dist/types/components/tags-input/index.d.ts +1 -0
- package/dist/types/components/tags-input/tags-input.anatomy.d.ts +1 -0
- package/dist/types/components/time-picker/index.d.ts +17 -0
- package/dist/types/components/time-picker/time-picker-cell.d.ts +12 -0
- package/dist/types/components/time-picker/time-picker-clear-trigger.d.ts +7 -0
- package/dist/types/components/time-picker/time-picker-column.d.ts +8 -0
- package/dist/types/components/time-picker/time-picker-content.d.ts +7 -0
- package/dist/types/components/time-picker/time-picker-context.d.ts +6 -0
- package/dist/types/components/time-picker/time-picker-control.d.ts +7 -0
- package/dist/types/components/time-picker/time-picker-input.d.ts +7 -0
- package/dist/types/components/time-picker/time-picker-label.d.ts +7 -0
- package/dist/types/components/time-picker/time-picker-positioner.d.ts +6 -0
- package/dist/types/components/time-picker/time-picker-root-provider.d.ts +12 -0
- package/dist/types/components/time-picker/time-picker-root.d.ts +9 -0
- package/dist/types/components/time-picker/time-picker-spacer.d.ts +7 -0
- package/dist/types/components/time-picker/time-picker-trigger.d.ts +7 -0
- package/dist/types/components/time-picker/time-picker.d.ts +14 -0
- package/dist/types/components/time-picker/use-time-picker-column-props-context.d.ts +5 -0
- package/dist/types/components/time-picker/use-time-picker-context.d.ts +4 -0
- package/dist/types/components/time-picker/use-time-picker.d.ts +31 -0
- package/dist/types/components/toast/index.d.ts +2 -1
- package/dist/types/components/toast/toast.anatomy.d.ts +1 -0
- package/dist/types/components/toggle-group/index.d.ts +1 -0
- package/dist/types/components/toggle-group/toggle-group.anatomy.d.ts +1 -0
- package/dist/types/components/tooltip/index.d.ts +1 -0
- package/dist/types/components/tooltip/tooltip.anatomy.d.ts +1 -0
- package/dist/types/components/tree-view/index.d.ts +1 -0
- package/dist/types/components/tree-view/tree-view.anatomy.d.ts +1 -0
- package/package.json +61 -57
package/dist/cjs/index.js
CHANGED
|
@@ -6,7 +6,6 @@ var solid = require('@zag-js/solid');
|
|
|
6
6
|
var collapsible$1 = require('@zag-js/collapsible');
|
|
7
7
|
var accordion$1 = require('@zag-js/accordion');
|
|
8
8
|
var avatar$1 = require('@zag-js/avatar');
|
|
9
|
-
var anatomy = require('@ark-ui/anatomy');
|
|
10
9
|
var carousel$1 = require('@zag-js/carousel');
|
|
11
10
|
var checkbox$1 = require('@zag-js/checkbox');
|
|
12
11
|
var clipboard$1 = require('@zag-js/clipboard');
|
|
@@ -17,6 +16,7 @@ var datePicker$1 = require('@zag-js/date-picker');
|
|
|
17
16
|
var dialog$1 = require('@zag-js/dialog');
|
|
18
17
|
var editable$1 = require('@zag-js/editable');
|
|
19
18
|
var domQuery = require('@zag-js/dom-query');
|
|
19
|
+
var anatomy = require('@zag-js/anatomy');
|
|
20
20
|
var fileUpload$1 = require('@zag-js/file-upload');
|
|
21
21
|
var i18nUtils = require('@zag-js/i18n-utils');
|
|
22
22
|
var hoverCard$1 = require('@zag-js/hover-card');
|
|
@@ -36,6 +36,7 @@ var splitter$1 = require('@zag-js/splitter');
|
|
|
36
36
|
var zagSwitch = require('@zag-js/switch');
|
|
37
37
|
var tabs$1 = require('@zag-js/tabs');
|
|
38
38
|
var tagsInput$1 = require('@zag-js/tags-input');
|
|
39
|
+
var timePicker$1 = require('@zag-js/time-picker');
|
|
39
40
|
var toast$1 = require('@zag-js/toast');
|
|
40
41
|
var toggleGroup$1 = require('@zag-js/toggle-group');
|
|
41
42
|
var tooltip$1 = require('@zag-js/tooltip');
|
|
@@ -88,6 +89,7 @@ var splitter__namespace = /*#__PURE__*/_interopNamespaceDefault(splitter$1);
|
|
|
88
89
|
var zagSwitch__namespace = /*#__PURE__*/_interopNamespaceDefault(zagSwitch);
|
|
89
90
|
var tabs__namespace = /*#__PURE__*/_interopNamespaceDefault(tabs$1);
|
|
90
91
|
var tagsInput__namespace = /*#__PURE__*/_interopNamespaceDefault(tagsInput$1);
|
|
92
|
+
var timePicker__namespace = /*#__PURE__*/_interopNamespaceDefault(timePicker$1);
|
|
91
93
|
var toast__namespace = /*#__PURE__*/_interopNamespaceDefault(toast$1);
|
|
92
94
|
var toggleGroup__namespace = /*#__PURE__*/_interopNamespaceDefault(toggleGroup$1);
|
|
93
95
|
var tooltip__namespace = /*#__PURE__*/_interopNamespaceDefault(tooltip$1);
|
|
@@ -202,7 +204,7 @@ const [EnvironmentContextProvider, useEnvironmentContext] = createContext({
|
|
|
202
204
|
})
|
|
203
205
|
});
|
|
204
206
|
|
|
205
|
-
var _tmpl$$
|
|
207
|
+
var _tmpl$$6 = /*#__PURE__*/web.template(`<span hidden>`);
|
|
206
208
|
const EnvironmentProvider = props => {
|
|
207
209
|
const [spanRef, setSpanRef] = solidJs.createSignal();
|
|
208
210
|
const getRootNode = () => runIfFn(props.value) ?? spanRef()?.ownerDocument ?? document;
|
|
@@ -219,7 +221,7 @@ const EnvironmentProvider = props => {
|
|
|
219
221
|
return !props.value;
|
|
220
222
|
},
|
|
221
223
|
get children() {
|
|
222
|
-
var _el$ = _tmpl$$
|
|
224
|
+
var _el$ = _tmpl$$6();
|
|
223
225
|
web.use(setSpanRef, _el$);
|
|
224
226
|
return _el$;
|
|
225
227
|
}
|
|
@@ -531,8 +533,10 @@ const [CarouselProvider, useCarouselContext] = createContext({
|
|
|
531
533
|
|
|
532
534
|
const CarouselContext = props => props.children(useCarouselContext());
|
|
533
535
|
|
|
536
|
+
const carouselAnatomy = carousel$1.anatomy.extendWith('control');
|
|
537
|
+
|
|
534
538
|
const CarouselControl = props => {
|
|
535
|
-
const mergedProps = solid.mergeProps(() =>
|
|
539
|
+
const mergedProps = solid.mergeProps(() => carouselAnatomy.build().control.attrs, props);
|
|
536
540
|
return web.createComponent(ark.div, mergedProps);
|
|
537
541
|
};
|
|
538
542
|
|
|
@@ -650,6 +654,8 @@ const CheckboxControl = props => {
|
|
|
650
654
|
return web.createComponent(ark.div, mergedProps);
|
|
651
655
|
};
|
|
652
656
|
|
|
657
|
+
const checkboxAnatomy = checkbox$1.anatomy.extendWith('group');
|
|
658
|
+
|
|
653
659
|
function useControllableState(props) {
|
|
654
660
|
const [uncontrolledValue, setUncontrolledValue] = solidJs.createSignal(runIfFn(props.defaultValue));
|
|
655
661
|
const controlled = solidJs.createMemo(() => props.value?.() !== undefined);
|
|
@@ -731,7 +737,7 @@ const CheckboxGroup = props => {
|
|
|
731
737
|
get children() {
|
|
732
738
|
return web.createComponent(ark.div, web.mergeProps({
|
|
733
739
|
role: "group"
|
|
734
|
-
}, localProps, () =>
|
|
740
|
+
}, localProps, () => checkboxAnatomy.build().group.attrs));
|
|
735
741
|
}
|
|
736
742
|
});
|
|
737
743
|
};
|
|
@@ -781,17 +787,144 @@ const FieldSelect = props => {
|
|
|
781
787
|
return web.createComponent(ark.select, mergedProps);
|
|
782
788
|
};
|
|
783
789
|
|
|
784
|
-
const
|
|
785
|
-
|
|
790
|
+
const [FieldsetProvider, useFieldsetContext] = createContext({
|
|
791
|
+
hookName: 'useFieldsetContext',
|
|
792
|
+
providerName: '<FieldsetProvider />',
|
|
793
|
+
strict: false
|
|
794
|
+
});
|
|
795
|
+
|
|
796
|
+
const FieldsetContext = props => props.children(useFieldsetContext());
|
|
797
|
+
|
|
798
|
+
const FieldsetErrorText = props => {
|
|
799
|
+
const fieldset = useFieldsetContext();
|
|
800
|
+
const mergedProps = solid.mergeProps(() => fieldset().getErrorTextProps(), props);
|
|
801
|
+
return web.createComponent(solidJs.Show, {
|
|
802
|
+
get when() {
|
|
803
|
+
return fieldset().invalid;
|
|
804
|
+
},
|
|
805
|
+
get children() {
|
|
806
|
+
return web.createComponent(ark.span, mergedProps);
|
|
807
|
+
}
|
|
808
|
+
});
|
|
809
|
+
};
|
|
810
|
+
|
|
811
|
+
const FieldsetHelperText = props => {
|
|
812
|
+
const fieldset = useFieldsetContext();
|
|
813
|
+
const mergedProps = solid.mergeProps(() => fieldset().getHelperTextProps(), props);
|
|
814
|
+
return web.createComponent(ark.span, mergedProps);
|
|
815
|
+
};
|
|
816
|
+
|
|
817
|
+
const fieldsetAnatomy = anatomy.createAnatomy('fieldset').parts('root', 'errorText', 'helperText', 'legend');
|
|
818
|
+
const parts$2 = fieldsetAnatomy.build();
|
|
819
|
+
|
|
820
|
+
const useFieldset = props => {
|
|
786
821
|
const {
|
|
787
|
-
required = false,
|
|
788
822
|
disabled = false,
|
|
823
|
+
invalid = false
|
|
824
|
+
} = props;
|
|
825
|
+
let rootRef;
|
|
826
|
+
const id = props.id ?? solidJs.createUniqueId();
|
|
827
|
+
const errorTextId = `fieldset::${id}::error-text`;
|
|
828
|
+
const helperTextId = `fieldset::${id}::helper-text`;
|
|
829
|
+
const [hasErrorText, setHasErrorText] = solidJs.createSignal(false);
|
|
830
|
+
const [hasHelperText, setHasHelperText] = solidJs.createSignal(false);
|
|
831
|
+
solidJs.createEffect(() => {
|
|
832
|
+
return;
|
|
833
|
+
});
|
|
834
|
+
const labelIds = [];
|
|
835
|
+
if (hasErrorText() && invalid) labelIds.push(errorTextId);
|
|
836
|
+
if (hasHelperText()) labelIds.push(helperTextId);
|
|
837
|
+
const getRootProps = () => ({
|
|
838
|
+
...parts$2.root.attrs,
|
|
839
|
+
disabled,
|
|
840
|
+
'data-disabled': dataAttr$1(disabled),
|
|
841
|
+
'data-invalid': dataAttr$1(invalid),
|
|
842
|
+
'aria-describedby': labelIds.join(' ') || undefined
|
|
843
|
+
});
|
|
844
|
+
const getLegendProps = () => ({
|
|
845
|
+
...parts$2.legend.attrs,
|
|
846
|
+
'data-disabled': dataAttr$1(disabled),
|
|
847
|
+
'data-invalid': dataAttr$1(invalid)
|
|
848
|
+
});
|
|
849
|
+
const getHelperTextProps = () => ({
|
|
850
|
+
id: helperTextId,
|
|
851
|
+
...parts$2.helperText.attrs
|
|
852
|
+
});
|
|
853
|
+
const getErrorTextProps = () => ({
|
|
854
|
+
id: errorTextId,
|
|
855
|
+
...parts$2.errorText.attrs,
|
|
856
|
+
'aria-live': 'polite'
|
|
857
|
+
});
|
|
858
|
+
return solidJs.createMemo(() => ({
|
|
859
|
+
refs: {
|
|
860
|
+
rootRef
|
|
861
|
+
},
|
|
862
|
+
disabled,
|
|
863
|
+
invalid,
|
|
864
|
+
getRootProps,
|
|
865
|
+
getLegendProps,
|
|
866
|
+
getHelperTextProps,
|
|
867
|
+
getErrorTextProps
|
|
868
|
+
}));
|
|
869
|
+
};
|
|
870
|
+
const dataAttr$1 = condition => condition ? '' : undefined;
|
|
871
|
+
|
|
872
|
+
const FieldsetRoot = props => {
|
|
873
|
+
const [useFieldsetProps, localProps] = createSplitProps()(props, ['id', 'disabled', 'invalid']);
|
|
874
|
+
const fieldset = useFieldset(useFieldsetProps);
|
|
875
|
+
const mergedProps = solid.mergeProps(() => fieldset().getRootProps(), localProps);
|
|
876
|
+
return web.createComponent(FieldsetProvider, {
|
|
877
|
+
value: fieldset,
|
|
878
|
+
get children() {
|
|
879
|
+
return web.createComponent(ark.fieldset, mergedProps);
|
|
880
|
+
}
|
|
881
|
+
});
|
|
882
|
+
};
|
|
883
|
+
FieldsetRoot.displayName = 'FieldsetRoot';
|
|
884
|
+
|
|
885
|
+
const FieldsetRootProvider = props => {
|
|
886
|
+
const [{
|
|
887
|
+
value: fieldset
|
|
888
|
+
}, localProps] = createSplitProps()(props, ['value']);
|
|
889
|
+
const mergedProps = solid.mergeProps(() => fieldset().getRootProps(), localProps);
|
|
890
|
+
return web.createComponent(FieldsetProvider, {
|
|
891
|
+
value: fieldset,
|
|
892
|
+
get children() {
|
|
893
|
+
return web.createComponent(ark.fieldset, mergedProps);
|
|
894
|
+
}
|
|
895
|
+
});
|
|
896
|
+
};
|
|
897
|
+
|
|
898
|
+
const FieldsetLegend = props => {
|
|
899
|
+
const fieldset = useFieldsetContext();
|
|
900
|
+
const mergedProps = solid.mergeProps(() => fieldset().getLegendProps(), props);
|
|
901
|
+
return web.createComponent(ark.legend, mergedProps);
|
|
902
|
+
};
|
|
903
|
+
|
|
904
|
+
var fieldset = /*#__PURE__*/Object.freeze({
|
|
905
|
+
__proto__: null,
|
|
906
|
+
Context: FieldsetContext,
|
|
907
|
+
ErrorText: FieldsetErrorText,
|
|
908
|
+
HelperText: FieldsetHelperText,
|
|
909
|
+
Legend: FieldsetLegend,
|
|
910
|
+
Root: FieldsetRoot,
|
|
911
|
+
RootProvider: FieldsetRootProvider
|
|
912
|
+
});
|
|
913
|
+
|
|
914
|
+
const fieldAnatomy = anatomy.createAnatomy('field').parts('root', 'errorText', 'helperText', 'input', 'label', 'select', 'textarea');
|
|
915
|
+
const parts$1 = fieldAnatomy.build();
|
|
916
|
+
|
|
917
|
+
const useField = props => {
|
|
918
|
+
const fieldset = useFieldsetContext();
|
|
919
|
+
const {
|
|
920
|
+
disabled = Boolean(fieldset?.().disabled),
|
|
789
921
|
invalid = false,
|
|
790
|
-
readOnly = false
|
|
922
|
+
readOnly = false,
|
|
923
|
+
required = false
|
|
791
924
|
} = props;
|
|
792
925
|
const [hasErrorText, setHasErrorText] = solidJs.createSignal(false);
|
|
793
926
|
const [hasHelperText, setHasHelperText] = solidJs.createSignal(false);
|
|
794
|
-
const id = props.id ??
|
|
927
|
+
const id = props.id ?? solidJs.createUniqueId();
|
|
795
928
|
let rootRef;
|
|
796
929
|
const errorTextId = `field::${id}::error-text`;
|
|
797
930
|
const helperTextId = `field::${id}::helper-text`;
|
|
@@ -800,14 +933,14 @@ const useField = props => {
|
|
|
800
933
|
return;
|
|
801
934
|
});
|
|
802
935
|
const getRootProps = () => ({
|
|
803
|
-
...parts.root.attrs,
|
|
936
|
+
...parts$1.root.attrs,
|
|
804
937
|
role: 'group',
|
|
805
938
|
'data-disabled': dataAttr(disabled),
|
|
806
939
|
'data-invalid': dataAttr(invalid),
|
|
807
940
|
'data-readonly': dataAttr(readOnly)
|
|
808
941
|
});
|
|
809
942
|
const getLabelProps = () => ({
|
|
810
|
-
...parts.label.attrs,
|
|
943
|
+
...parts$1.label.attrs,
|
|
811
944
|
id: labelId,
|
|
812
945
|
'data-disabled': dataAttr(disabled),
|
|
813
946
|
'data-invalid': dataAttr(invalid),
|
|
@@ -829,23 +962,23 @@ const useField = props => {
|
|
|
829
962
|
});
|
|
830
963
|
const getInputProps = () => ({
|
|
831
964
|
...getControlProps(),
|
|
832
|
-
...parts.input.attrs
|
|
965
|
+
...parts$1.input.attrs
|
|
833
966
|
});
|
|
834
967
|
const getTextareaProps = () => ({
|
|
835
968
|
...getControlProps(),
|
|
836
|
-
...parts.textarea.attrs
|
|
969
|
+
...parts$1.textarea.attrs
|
|
837
970
|
});
|
|
838
971
|
const getSelectProps = () => ({
|
|
839
972
|
...getControlProps(),
|
|
840
|
-
...parts.select.attrs
|
|
973
|
+
...parts$1.select.attrs
|
|
841
974
|
});
|
|
842
975
|
const getHelperTextProps = () => ({
|
|
843
976
|
id: helperTextId,
|
|
844
|
-
...parts.helperText.attrs
|
|
977
|
+
...parts$1.helperText.attrs
|
|
845
978
|
});
|
|
846
979
|
const getErrorTextProps = () => ({
|
|
847
980
|
id: errorTextId,
|
|
848
|
-
...parts.errorText.attrs,
|
|
981
|
+
...parts$1.errorText.attrs,
|
|
849
982
|
'aria-live': 'polite'
|
|
850
983
|
});
|
|
851
984
|
return solidJs.createMemo(() => ({
|
|
@@ -1499,19 +1632,21 @@ const ColorPickerValueSwatch = props => {
|
|
|
1499
1632
|
};
|
|
1500
1633
|
|
|
1501
1634
|
const ColorPickerValueText = props => {
|
|
1502
|
-
const
|
|
1503
|
-
const mergedProps = solid.mergeProps(() =>
|
|
1635
|
+
const colorPicker = useColorPickerContext();
|
|
1636
|
+
const mergedProps = solid.mergeProps(() => colorPicker().getValueTextProps(), props);
|
|
1504
1637
|
return web.createComponent(ark.span, web.mergeProps(mergedProps, {
|
|
1505
1638
|
get children() {
|
|
1506
|
-
return
|
|
1639
|
+
return colorPicker().valueAsString || props.children;
|
|
1507
1640
|
}
|
|
1508
1641
|
}));
|
|
1509
1642
|
};
|
|
1510
1643
|
|
|
1644
|
+
const colorPickerAnatomy = colorPicker$1.anatomy.extendWith('view');
|
|
1645
|
+
|
|
1511
1646
|
const ColorPickerView = props => {
|
|
1512
1647
|
const api = useColorPickerContext();
|
|
1513
1648
|
const [formatProps, localProps] = createSplitProps()(props, ['format']);
|
|
1514
|
-
const mergedProps = solid.mergeProps(() =>
|
|
1649
|
+
const mergedProps = solid.mergeProps(() => colorPickerAnatomy.build().view.attrs, localProps);
|
|
1515
1650
|
return web.createComponent(ColorPickerFormatPropsProvider, {
|
|
1516
1651
|
value: formatProps,
|
|
1517
1652
|
get children() {
|
|
@@ -1858,7 +1993,7 @@ const DatePickerLabel = props => {
|
|
|
1858
1993
|
return web.createComponent(ark.label, mergedProps);
|
|
1859
1994
|
};
|
|
1860
1995
|
|
|
1861
|
-
var _tmpl$$
|
|
1996
|
+
var _tmpl$$5 = /*#__PURE__*/web.template(`<option>`);
|
|
1862
1997
|
const DatePickerMonthSelect = props => {
|
|
1863
1998
|
const api = useDatePickerContext();
|
|
1864
1999
|
const mergedProps = solid.mergeProps(() => api().getMonthSelectProps(), props);
|
|
@@ -1869,7 +2004,7 @@ const DatePickerMonthSelect = props => {
|
|
|
1869
2004
|
return api().getMonths();
|
|
1870
2005
|
},
|
|
1871
2006
|
children: month => (() => {
|
|
1872
|
-
var _el$ = _tmpl$$
|
|
2007
|
+
var _el$ = _tmpl$$5();
|
|
1873
2008
|
web.insert(_el$, () => month.label);
|
|
1874
2009
|
web.effect(() => _el$.value = month.value);
|
|
1875
2010
|
return _el$;
|
|
@@ -2105,10 +2240,12 @@ const DatePickerTrigger = props => {
|
|
|
2105
2240
|
return web.createComponent(ark.button, mergedProps);
|
|
2106
2241
|
};
|
|
2107
2242
|
|
|
2243
|
+
const datePickerAnatomy = datePicker$1.anatomy.extendWith('view');
|
|
2244
|
+
|
|
2108
2245
|
const DatePickerView = props => {
|
|
2109
2246
|
const [viewProps, localProps] = createSplitProps()(props, ['view']);
|
|
2110
2247
|
const api = useDatePickerContext();
|
|
2111
|
-
const mergedProps = solid.mergeProps(() =>
|
|
2248
|
+
const mergedProps = solid.mergeProps(() => datePickerAnatomy.build().view.attrs, localProps);
|
|
2112
2249
|
return web.createComponent(DatePickerViewProvider, {
|
|
2113
2250
|
value: viewProps,
|
|
2114
2251
|
get children() {
|
|
@@ -2135,7 +2272,7 @@ const DatePickerViewTrigger = props => {
|
|
|
2135
2272
|
return web.createComponent(ark.button, mergedProps);
|
|
2136
2273
|
};
|
|
2137
2274
|
|
|
2138
|
-
var _tmpl$$
|
|
2275
|
+
var _tmpl$$4 = /*#__PURE__*/web.template(`<option>`);
|
|
2139
2276
|
const DatePickerYearSelect = props => {
|
|
2140
2277
|
const api = useDatePickerContext();
|
|
2141
2278
|
const mergedProps = solid.mergeProps(() => api().getYearSelectProps(), props);
|
|
@@ -2149,7 +2286,7 @@ const DatePickerYearSelect = props => {
|
|
|
2149
2286
|
});
|
|
2150
2287
|
},
|
|
2151
2288
|
children: year => (() => {
|
|
2152
|
-
var _el$ = _tmpl$$
|
|
2289
|
+
var _el$ = _tmpl$$4();
|
|
2153
2290
|
_el$.value = year;
|
|
2154
2291
|
web.insert(_el$, year);
|
|
2155
2292
|
return _el$;
|
|
@@ -2679,6 +2816,78 @@ var format = /*#__PURE__*/Object.freeze({
|
|
|
2679
2816
|
Number: FormatNumber
|
|
2680
2817
|
});
|
|
2681
2818
|
|
|
2819
|
+
const escapeRegexp = term => term.replace(/[|\\{}()[\]^$+*?.-]/g, char => `\\${char}`);
|
|
2820
|
+
const buildRegex = (queryProp, flags) => {
|
|
2821
|
+
const query = queryProp.filter(Boolean).map(text => escapeRegexp(text));
|
|
2822
|
+
return new RegExp(`(${query.join('|')})`, flags);
|
|
2823
|
+
};
|
|
2824
|
+
const getRegexFlags = (ignoreCase = true, matchAll = true) => `${ignoreCase ? 'i' : ''}${matchAll ? 'g' : ''}`;
|
|
2825
|
+
const normalizeSpan = (spans, len) => {
|
|
2826
|
+
const result = [];
|
|
2827
|
+
const append = (start, end, match) => {
|
|
2828
|
+
if (end - start > 0) result.push({
|
|
2829
|
+
start,
|
|
2830
|
+
end,
|
|
2831
|
+
match
|
|
2832
|
+
});
|
|
2833
|
+
};
|
|
2834
|
+
if (spans.length === 0) {
|
|
2835
|
+
append(0, len, false);
|
|
2836
|
+
} else {
|
|
2837
|
+
let lastIndex = 0;
|
|
2838
|
+
for (const chunk of spans) {
|
|
2839
|
+
append(lastIndex, chunk.start, false);
|
|
2840
|
+
append(chunk.start, chunk.end, true);
|
|
2841
|
+
lastIndex = chunk.end;
|
|
2842
|
+
}
|
|
2843
|
+
append(lastIndex, len, false);
|
|
2844
|
+
}
|
|
2845
|
+
return result;
|
|
2846
|
+
};
|
|
2847
|
+
const highlightWords = props => {
|
|
2848
|
+
const flags = getRegexFlags(props.ignoreCase, props.matchAll);
|
|
2849
|
+
const regex = buildRegex(Array.isArray(props.query) ? props.query : [props.query], flags);
|
|
2850
|
+
const spans = [...props.text.matchAll(regex)].map(match => ({
|
|
2851
|
+
start: match.index || 0,
|
|
2852
|
+
end: (match.index || 0) + match[0].length
|
|
2853
|
+
}));
|
|
2854
|
+
return normalizeSpan(spans, props.text.length).map(chunk => ({
|
|
2855
|
+
text: props.text.slice(chunk.start, chunk.end),
|
|
2856
|
+
match: !!chunk.match
|
|
2857
|
+
}));
|
|
2858
|
+
};
|
|
2859
|
+
const useHighlight = props => {
|
|
2860
|
+
return solidJs.createMemo(() => highlightWords(props));
|
|
2861
|
+
};
|
|
2862
|
+
|
|
2863
|
+
var _tmpl$$3 = /*#__PURE__*/web.template(`<mark>`);
|
|
2864
|
+
const Highlight = props => {
|
|
2865
|
+
if (typeof props.text !== 'string') {
|
|
2866
|
+
throw new Error('[ark-ui/highlight] text must be a string');
|
|
2867
|
+
}
|
|
2868
|
+
const [highlightProps, localProps] = createSplitProps()(props, ['query', 'text', 'ignoreCase', 'matchAll']);
|
|
2869
|
+
const chunks = useHighlight(highlightProps);
|
|
2870
|
+
return web.createComponent(solidJs.For, {
|
|
2871
|
+
get each() {
|
|
2872
|
+
return chunks();
|
|
2873
|
+
},
|
|
2874
|
+
children: chunk => web.createComponent(solidJs.Show, {
|
|
2875
|
+
get when() {
|
|
2876
|
+
return chunk.match;
|
|
2877
|
+
},
|
|
2878
|
+
get fallback() {
|
|
2879
|
+
return chunk.text;
|
|
2880
|
+
},
|
|
2881
|
+
get children() {
|
|
2882
|
+
var _el$ = _tmpl$$3();
|
|
2883
|
+
web.spread(_el$, localProps, false, true);
|
|
2884
|
+
web.insert(_el$, () => chunk.text);
|
|
2885
|
+
return _el$;
|
|
2886
|
+
}
|
|
2887
|
+
})
|
|
2888
|
+
});
|
|
2889
|
+
};
|
|
2890
|
+
|
|
2682
2891
|
const [HoverCardProvider, useHoverCardContext] = createContext({
|
|
2683
2892
|
hookName: 'useHoverCardContext',
|
|
2684
2893
|
providerName: '<HoverCardProvider />'
|
|
@@ -3253,6 +3462,12 @@ const NumberInputScrubber = props => {
|
|
|
3253
3462
|
return web.createComponent(ark.div, mergedProps);
|
|
3254
3463
|
};
|
|
3255
3464
|
|
|
3465
|
+
const NumberInputValueText = props => {
|
|
3466
|
+
const numberInput = useNumberInputContext();
|
|
3467
|
+
const mergedProps = solid.mergeProps(() => numberInput().getValueTextProps(), props);
|
|
3468
|
+
return web.createComponent(ark.span, mergedProps);
|
|
3469
|
+
};
|
|
3470
|
+
|
|
3256
3471
|
var numberInput = /*#__PURE__*/Object.freeze({
|
|
3257
3472
|
__proto__: null,
|
|
3258
3473
|
Context: NumberInputContext,
|
|
@@ -3263,7 +3478,8 @@ var numberInput = /*#__PURE__*/Object.freeze({
|
|
|
3263
3478
|
Label: NumberInputLabel,
|
|
3264
3479
|
Root: NumberInputRoot,
|
|
3265
3480
|
RootProvider: NumberInputRootProvider,
|
|
3266
|
-
Scrubber: NumberInputScrubber
|
|
3481
|
+
Scrubber: NumberInputScrubber,
|
|
3482
|
+
ValueText: NumberInputValueText
|
|
3267
3483
|
});
|
|
3268
3484
|
|
|
3269
3485
|
const [PaginationProvider, usePaginationContext] = createContext({
|
|
@@ -4049,9 +4265,12 @@ const [SegmentGroupProvider, useSegmentGroupContext] = createContext({
|
|
|
4049
4265
|
|
|
4050
4266
|
const SegmentGroupContext = props => props.children(useSegmentGroupContext());
|
|
4051
4267
|
|
|
4268
|
+
const segmentGroupAnatomy = radio.anatomy.rename('segment-group');
|
|
4269
|
+
const parts = segmentGroupAnatomy.build();
|
|
4270
|
+
|
|
4052
4271
|
const SegmentGroupIndicator = props => {
|
|
4053
4272
|
const segmentGroup = useSegmentGroupContext();
|
|
4054
|
-
const mergedProps = solid.mergeProps(() => segmentGroup().getIndicatorProps(),
|
|
4273
|
+
const mergedProps = solid.mergeProps(() => segmentGroup().getIndicatorProps(), parts.indicator.attrs, props);
|
|
4055
4274
|
return web.createComponent(ark.div, mergedProps);
|
|
4056
4275
|
};
|
|
4057
4276
|
|
|
@@ -4068,7 +4287,7 @@ const [SegmentGroupItemPropsProvider, useSegmentGroupItemPropsContext] = createC
|
|
|
4068
4287
|
const SegmentGroupItem = props => {
|
|
4069
4288
|
const [itemProps, localProps] = createSplitProps()(props, ['value', 'disabled', 'invalid']);
|
|
4070
4289
|
const segmentGroup = useSegmentGroupContext();
|
|
4071
|
-
const mergedProps = solid.mergeProps(() => segmentGroup().getItemProps(itemProps),
|
|
4290
|
+
const mergedProps = solid.mergeProps(() => segmentGroup().getItemProps(itemProps), parts.item.attrs, localProps);
|
|
4072
4291
|
const itemState = solidJs.createMemo(() => segmentGroup().getItemState(itemProps));
|
|
4073
4292
|
return web.createComponent(SegmentGroupItemPropsProvider, {
|
|
4074
4293
|
value: itemProps,
|
|
@@ -4088,7 +4307,7 @@ const SegmentGroupItemContext = props => props.children(useSegmentGroupItemConte
|
|
|
4088
4307
|
const SegmentGroupItemControl = props => {
|
|
4089
4308
|
const segmentGroup = useSegmentGroupContext();
|
|
4090
4309
|
const itemProps = useSegmentGroupItemPropsContext();
|
|
4091
|
-
const mergedProps = solid.mergeProps(() => segmentGroup().getItemControlProps(itemProps),
|
|
4310
|
+
const mergedProps = solid.mergeProps(() => segmentGroup().getItemControlProps(itemProps), parts.itemControl.attrs, props);
|
|
4092
4311
|
return web.createComponent(ark.div, mergedProps);
|
|
4093
4312
|
};
|
|
4094
4313
|
|
|
@@ -4102,13 +4321,13 @@ const SegmentGroupItemHiddenInput = props => {
|
|
|
4102
4321
|
const SegmentGroupItemText = props => {
|
|
4103
4322
|
const segmentGroup = useSegmentGroupContext();
|
|
4104
4323
|
const itemProps = useSegmentGroupItemPropsContext();
|
|
4105
|
-
const mergedProps = solid.mergeProps(() => segmentGroup().getItemTextProps(itemProps),
|
|
4324
|
+
const mergedProps = solid.mergeProps(() => segmentGroup().getItemTextProps(itemProps), parts.itemText.attrs, props);
|
|
4106
4325
|
return web.createComponent(ark.span, mergedProps);
|
|
4107
4326
|
};
|
|
4108
4327
|
|
|
4109
4328
|
const SegmentGroupLabel = props => {
|
|
4110
4329
|
const segmentGroup = useSegmentGroupContext();
|
|
4111
|
-
const mergedProps = solid.mergeProps(() => segmentGroup().getLabelProps(),
|
|
4330
|
+
const mergedProps = solid.mergeProps(() => segmentGroup().getLabelProps(), parts.label.attrs, props);
|
|
4112
4331
|
return web.createComponent(ark.label, mergedProps);
|
|
4113
4332
|
};
|
|
4114
4333
|
|
|
@@ -4132,7 +4351,7 @@ const useSegmentGroup = props => {
|
|
|
4132
4351
|
const SegmentGroupRoot = props => {
|
|
4133
4352
|
const [useSegmentGroupProps, localProps] = createSplitProps()(props, ['defaultValue', 'disabled', 'form', 'id', 'ids', 'name', 'onValueChange', 'orientation', 'readOnly', 'value']);
|
|
4134
4353
|
const segmentGroup = useSegmentGroup(useSegmentGroupProps);
|
|
4135
|
-
const mergedProps = solid.mergeProps(() => segmentGroup().getRootProps(),
|
|
4354
|
+
const mergedProps = solid.mergeProps(() => segmentGroup().getRootProps(), parts.root.attrs, localProps);
|
|
4136
4355
|
return web.createComponent(SegmentGroupProvider, {
|
|
4137
4356
|
value: segmentGroup,
|
|
4138
4357
|
get children() {
|
|
@@ -4145,7 +4364,7 @@ const SegmentGroupRootProvider = props => {
|
|
|
4145
4364
|
const [{
|
|
4146
4365
|
value: segmentGroup
|
|
4147
4366
|
}, localProps] = createSplitProps()(props, ['value']);
|
|
4148
|
-
const mergedProps = solid.mergeProps(() => segmentGroup().getRootProps(),
|
|
4367
|
+
const mergedProps = solid.mergeProps(() => segmentGroup().getRootProps(), parts.root.attrs, localProps);
|
|
4149
4368
|
return web.createComponent(SegmentGroupProvider, {
|
|
4150
4369
|
value: segmentGroup,
|
|
4151
4370
|
get children() {
|
|
@@ -4224,7 +4443,7 @@ const SelectHiddenSelect = props => {
|
|
|
4224
4443
|
}
|
|
4225
4444
|
}), web.createComponent(solidJs.Index, {
|
|
4226
4445
|
get each() {
|
|
4227
|
-
return select().collection.
|
|
4446
|
+
return select().collection.items;
|
|
4228
4447
|
},
|
|
4229
4448
|
children: option => (() => {
|
|
4230
4449
|
var _el$2 = _tmpl$2$1();
|
|
@@ -4426,7 +4645,7 @@ const SelectTrigger = props => {
|
|
|
4426
4645
|
|
|
4427
4646
|
const SelectValueText = props => {
|
|
4428
4647
|
const select = useSelectContext();
|
|
4429
|
-
const mergedProps = solid.mergeProps(() =>
|
|
4648
|
+
const mergedProps = solid.mergeProps(() => select().getValueTextProps(), props);
|
|
4430
4649
|
return web.createComponent(ark.span, web.mergeProps(mergedProps, {
|
|
4431
4650
|
get children() {
|
|
4432
4651
|
return select().valueAsString || props.placeholder;
|
|
@@ -5186,6 +5405,374 @@ var tagsInput = /*#__PURE__*/Object.freeze({
|
|
|
5186
5405
|
RootProvider: TagsInputRootProvider
|
|
5187
5406
|
});
|
|
5188
5407
|
|
|
5408
|
+
const [TimePickerColumnPropsProvider, useTimePickerColumnPropsContext] = createContext({
|
|
5409
|
+
hookName: 'useTimePickerColumnPropsContext',
|
|
5410
|
+
providerName: '<TimePickerColumnPropsProvider />'
|
|
5411
|
+
});
|
|
5412
|
+
|
|
5413
|
+
const [TimePickerProvider, useTimePickerContext] = createContext({
|
|
5414
|
+
hookName: 'useTimePickerContext',
|
|
5415
|
+
providerName: '<TimePickerProvider />'
|
|
5416
|
+
});
|
|
5417
|
+
|
|
5418
|
+
const TimePickerCell = props => {
|
|
5419
|
+
const [cellProps, localProps] = createSplitProps()(props, ['value']);
|
|
5420
|
+
const timePicker = useTimePickerContext();
|
|
5421
|
+
const columnProps = useTimePickerColumnPropsContext();
|
|
5422
|
+
const unitToPropsMap = {
|
|
5423
|
+
hour: () => timePicker().getHourCellProps(cellProps),
|
|
5424
|
+
minute: () => timePicker().getMinuteCellProps(cellProps),
|
|
5425
|
+
second: () => timePicker().getSecondCellProps(cellProps),
|
|
5426
|
+
period: () => timePicker().getPeriodCellProps(cellProps)
|
|
5427
|
+
};
|
|
5428
|
+
const mergedProps = solid.mergeProps(() => unitToPropsMap[columnProps.unit](), localProps);
|
|
5429
|
+
return web.createComponent(ark.button, mergedProps);
|
|
5430
|
+
};
|
|
5431
|
+
|
|
5432
|
+
const TimePickerClearTrigger = props => {
|
|
5433
|
+
const timePicker = useTimePickerContext();
|
|
5434
|
+
const mergedProps = solid.mergeProps(() => timePicker().getClearTriggerProps(), props);
|
|
5435
|
+
return web.createComponent(ark.button, mergedProps);
|
|
5436
|
+
};
|
|
5437
|
+
|
|
5438
|
+
const TimePickerColumn = props => {
|
|
5439
|
+
const [columnProps, localProps] = createSplitProps()(props, ['unit']);
|
|
5440
|
+
const timePicker = useTimePickerContext();
|
|
5441
|
+
const mergedProps = solid.mergeProps(() => timePicker().getColumnProps(columnProps), localProps);
|
|
5442
|
+
return web.createComponent(TimePickerColumnPropsProvider, {
|
|
5443
|
+
value: columnProps,
|
|
5444
|
+
get children() {
|
|
5445
|
+
return web.createComponent(ark.div, mergedProps);
|
|
5446
|
+
}
|
|
5447
|
+
});
|
|
5448
|
+
};
|
|
5449
|
+
|
|
5450
|
+
const TimePickerContent = props => {
|
|
5451
|
+
const timePicker = useTimePickerContext();
|
|
5452
|
+
const presenceApi = usePresenceContext();
|
|
5453
|
+
const mergedProps = solid.mergeProps(() => timePicker().getContentProps(), () => presenceApi().presenceProps, props);
|
|
5454
|
+
return web.createComponent(solidJs.Show, {
|
|
5455
|
+
get when() {
|
|
5456
|
+
return !presenceApi().unmounted;
|
|
5457
|
+
},
|
|
5458
|
+
get children() {
|
|
5459
|
+
return web.createComponent(ark.div, mergedProps);
|
|
5460
|
+
}
|
|
5461
|
+
});
|
|
5462
|
+
};
|
|
5463
|
+
|
|
5464
|
+
const TimePickerContext = props => props.children(useTimePickerContext());
|
|
5465
|
+
|
|
5466
|
+
const TimePickerControl = props => {
|
|
5467
|
+
const timePicker = useTimePickerContext();
|
|
5468
|
+
const mergedProps = solid.mergeProps(() => timePicker().getControlProps(), props);
|
|
5469
|
+
return web.createComponent(ark.div, mergedProps);
|
|
5470
|
+
};
|
|
5471
|
+
|
|
5472
|
+
const TimePickerInput = props => {
|
|
5473
|
+
const timePicker = useTimePickerContext();
|
|
5474
|
+
const mergedProps = solid.mergeProps(() => timePicker().getInputProps(), props);
|
|
5475
|
+
return web.createComponent(ark.input, mergedProps);
|
|
5476
|
+
};
|
|
5477
|
+
|
|
5478
|
+
const TimePickerLabel = props => {
|
|
5479
|
+
const timePicker = useTimePickerContext();
|
|
5480
|
+
const mergedProps = solid.mergeProps(() => timePicker().getLabelProps(), props);
|
|
5481
|
+
return web.createComponent(ark.label, mergedProps);
|
|
5482
|
+
};
|
|
5483
|
+
|
|
5484
|
+
const TimePickerPositioner = props => {
|
|
5485
|
+
const timePicker = useTimePickerContext();
|
|
5486
|
+
const mergedProps = solid.mergeProps(() => timePicker().getPositionerProps(), props);
|
|
5487
|
+
const presenceApi = usePresenceContext();
|
|
5488
|
+
return web.createComponent(solidJs.Show, {
|
|
5489
|
+
get when() {
|
|
5490
|
+
return !presenceApi().unmounted;
|
|
5491
|
+
},
|
|
5492
|
+
get children() {
|
|
5493
|
+
return web.createComponent(ark.div, mergedProps);
|
|
5494
|
+
}
|
|
5495
|
+
});
|
|
5496
|
+
};
|
|
5497
|
+
|
|
5498
|
+
function $14e0f24ef4ac5c92$export$c19a80a9721b80f6(a, b) {
|
|
5499
|
+
return $14e0f24ef4ac5c92$var$timeToMs(a) - $14e0f24ef4ac5c92$var$timeToMs(b);
|
|
5500
|
+
}
|
|
5501
|
+
function $14e0f24ef4ac5c92$var$timeToMs(a) {
|
|
5502
|
+
return a.hour * 3600000 + a.minute * 60000 + a.second * 1000 + a.millisecond;
|
|
5503
|
+
}
|
|
5504
|
+
|
|
5505
|
+
function $735220c2d4774dd3$export$3e2544e88a25bff8(duration) {
|
|
5506
|
+
let inverseDuration = {};
|
|
5507
|
+
for(let key in duration)if (typeof duration[key] === 'number') inverseDuration[key] = -duration[key];
|
|
5508
|
+
return inverseDuration;
|
|
5509
|
+
}
|
|
5510
|
+
function $735220c2d4774dd3$export$e5d5e1c1822b6e56(value, fields) {
|
|
5511
|
+
let mutableValue = value.copy();
|
|
5512
|
+
if (fields.hour != null) mutableValue.hour = fields.hour;
|
|
5513
|
+
if (fields.minute != null) mutableValue.minute = fields.minute;
|
|
5514
|
+
if (fields.second != null) mutableValue.second = fields.second;
|
|
5515
|
+
if (fields.millisecond != null) mutableValue.millisecond = fields.millisecond;
|
|
5516
|
+
$735220c2d4774dd3$export$7555de1e070510cb(mutableValue);
|
|
5517
|
+
return mutableValue;
|
|
5518
|
+
}
|
|
5519
|
+
function $735220c2d4774dd3$var$balanceTime(time) {
|
|
5520
|
+
time.second += Math.floor(time.millisecond / 1000);
|
|
5521
|
+
time.millisecond = $735220c2d4774dd3$var$nonNegativeMod(time.millisecond, 1000);
|
|
5522
|
+
time.minute += Math.floor(time.second / 60);
|
|
5523
|
+
time.second = $735220c2d4774dd3$var$nonNegativeMod(time.second, 60);
|
|
5524
|
+
time.hour += Math.floor(time.minute / 60);
|
|
5525
|
+
time.minute = $735220c2d4774dd3$var$nonNegativeMod(time.minute, 60);
|
|
5526
|
+
let days = Math.floor(time.hour / 24);
|
|
5527
|
+
time.hour = $735220c2d4774dd3$var$nonNegativeMod(time.hour, 24);
|
|
5528
|
+
return days;
|
|
5529
|
+
}
|
|
5530
|
+
function $735220c2d4774dd3$export$7555de1e070510cb(time) {
|
|
5531
|
+
time.millisecond = Math.max(0, Math.min(time.millisecond, 1000));
|
|
5532
|
+
time.second = Math.max(0, Math.min(time.second, 59));
|
|
5533
|
+
time.minute = Math.max(0, Math.min(time.minute, 59));
|
|
5534
|
+
time.hour = Math.max(0, Math.min(time.hour, 23));
|
|
5535
|
+
}
|
|
5536
|
+
function $735220c2d4774dd3$var$nonNegativeMod(a, b) {
|
|
5537
|
+
let result = a % b;
|
|
5538
|
+
if (result < 0) result += b;
|
|
5539
|
+
return result;
|
|
5540
|
+
}
|
|
5541
|
+
function $735220c2d4774dd3$var$addTimeFields(time, duration) {
|
|
5542
|
+
time.hour += duration.hours || 0;
|
|
5543
|
+
time.minute += duration.minutes || 0;
|
|
5544
|
+
time.second += duration.seconds || 0;
|
|
5545
|
+
time.millisecond += duration.milliseconds || 0;
|
|
5546
|
+
return $735220c2d4774dd3$var$balanceTime(time);
|
|
5547
|
+
}
|
|
5548
|
+
function $735220c2d4774dd3$export$7ed87b6bc2506470(time, duration) {
|
|
5549
|
+
let res = time.copy();
|
|
5550
|
+
$735220c2d4774dd3$var$addTimeFields(res, duration);
|
|
5551
|
+
return res;
|
|
5552
|
+
}
|
|
5553
|
+
function $735220c2d4774dd3$export$fe34d3a381cd7501(time, duration) {
|
|
5554
|
+
return $735220c2d4774dd3$export$7ed87b6bc2506470(time, $735220c2d4774dd3$export$3e2544e88a25bff8(duration));
|
|
5555
|
+
}
|
|
5556
|
+
function $735220c2d4774dd3$export$dd02b3e0007dfe28(value, field, amount, options) {
|
|
5557
|
+
let mutable = value.copy();
|
|
5558
|
+
switch(field){
|
|
5559
|
+
case 'hour':
|
|
5560
|
+
{
|
|
5561
|
+
let hours = value.hour;
|
|
5562
|
+
let min = 0;
|
|
5563
|
+
let max = 23;
|
|
5564
|
+
if ((options === null || options === void 0 ? void 0 : options.hourCycle) === 12) {
|
|
5565
|
+
let isPM = hours >= 12;
|
|
5566
|
+
min = isPM ? 12 : 0;
|
|
5567
|
+
max = isPM ? 23 : 11;
|
|
5568
|
+
}
|
|
5569
|
+
mutable.hour = $735220c2d4774dd3$var$cycleValue(hours, amount, min, max, options === null || options === void 0 ? void 0 : options.round);
|
|
5570
|
+
break;
|
|
5571
|
+
}
|
|
5572
|
+
case 'minute':
|
|
5573
|
+
mutable.minute = $735220c2d4774dd3$var$cycleValue(value.minute, amount, 0, 59, options === null || options === void 0 ? void 0 : options.round);
|
|
5574
|
+
break;
|
|
5575
|
+
case 'second':
|
|
5576
|
+
mutable.second = $735220c2d4774dd3$var$cycleValue(value.second, amount, 0, 59, options === null || options === void 0 ? void 0 : options.round);
|
|
5577
|
+
break;
|
|
5578
|
+
case 'millisecond':
|
|
5579
|
+
mutable.millisecond = $735220c2d4774dd3$var$cycleValue(value.millisecond, amount, 0, 999, options === null || options === void 0 ? void 0 : options.round);
|
|
5580
|
+
break;
|
|
5581
|
+
default:
|
|
5582
|
+
throw new Error('Unsupported field ' + field);
|
|
5583
|
+
}
|
|
5584
|
+
return mutable;
|
|
5585
|
+
}
|
|
5586
|
+
function $735220c2d4774dd3$var$cycleValue(value, amount, min, max, round = false) {
|
|
5587
|
+
if (round) {
|
|
5588
|
+
value += Math.sign(amount);
|
|
5589
|
+
if (value < min) value = max;
|
|
5590
|
+
let div = Math.abs(amount);
|
|
5591
|
+
if (amount > 0) value = Math.ceil(value / div) * div;
|
|
5592
|
+
else value = Math.floor(value / div) * div;
|
|
5593
|
+
if (value > max) value = min;
|
|
5594
|
+
} else {
|
|
5595
|
+
value += amount;
|
|
5596
|
+
if (value < min) value = max - (min - value - 1);
|
|
5597
|
+
else if (value > max) value = min + (value - max - 1);
|
|
5598
|
+
}
|
|
5599
|
+
return value;
|
|
5600
|
+
}
|
|
5601
|
+
|
|
5602
|
+
/*
|
|
5603
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
5604
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
5605
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5606
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
5607
|
+
*
|
|
5608
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
5609
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
5610
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
5611
|
+
* governing permissions and limitations under the License.
|
|
5612
|
+
*/
|
|
5613
|
+
|
|
5614
|
+
|
|
5615
|
+
|
|
5616
|
+
const $fae977aafc393c5c$var$TIME_RE = /^(\d{2})(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/;
|
|
5617
|
+
function $fae977aafc393c5c$export$c9698ec7f05a07e1(value) {
|
|
5618
|
+
let m = value.match($fae977aafc393c5c$var$TIME_RE);
|
|
5619
|
+
if (!m) throw new Error('Invalid ISO 8601 time string: ' + value);
|
|
5620
|
+
return new ($35ea8db9cb2ccb90$export$680ea196effce5f)($fae977aafc393c5c$var$parseNumber(m[1], 0, 23), m[2] ? $fae977aafc393c5c$var$parseNumber(m[2], 0, 59) : 0, m[3] ? $fae977aafc393c5c$var$parseNumber(m[3], 0, 59) : 0, m[4] ? $fae977aafc393c5c$var$parseNumber(m[4], 0, Infinity) * 1000 : 0);
|
|
5621
|
+
}
|
|
5622
|
+
function $fae977aafc393c5c$var$parseNumber(value, min, max) {
|
|
5623
|
+
let val = Number(value);
|
|
5624
|
+
if (val < min || val > max) throw new RangeError(`Value out of range: ${min} <= ${val} <= ${max}`);
|
|
5625
|
+
return val;
|
|
5626
|
+
}
|
|
5627
|
+
function $fae977aafc393c5c$export$f59dee82248f5ad4(time) {
|
|
5628
|
+
return `${String(time.hour).padStart(2, '0')}:${String(time.minute).padStart(2, '0')}:${String(time.second).padStart(2, '0')}${time.millisecond ? String(time.millisecond / 1000).slice(1) : ''}`;
|
|
5629
|
+
}
|
|
5630
|
+
|
|
5631
|
+
function _check_private_redeclaration(obj, privateCollection) {
|
|
5632
|
+
if (privateCollection.has(obj)) {
|
|
5633
|
+
throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
5634
|
+
}
|
|
5635
|
+
}
|
|
5636
|
+
|
|
5637
|
+
function _class_private_field_init(obj, privateMap, value) {
|
|
5638
|
+
_check_private_redeclaration(obj, privateMap);
|
|
5639
|
+
privateMap.set(obj, value);
|
|
5640
|
+
}
|
|
5641
|
+
|
|
5642
|
+
var // This prevents TypeScript from allowing other types with the same fields to match.
|
|
5643
|
+
// @ts-ignore
|
|
5644
|
+
$35ea8db9cb2ccb90$var$_type1 = /*#__PURE__*/ new WeakMap();
|
|
5645
|
+
class $35ea8db9cb2ccb90$export$680ea196effce5f {
|
|
5646
|
+
/** Returns a copy of this time. */ copy() {
|
|
5647
|
+
return new $35ea8db9cb2ccb90$export$680ea196effce5f(this.hour, this.minute, this.second, this.millisecond);
|
|
5648
|
+
}
|
|
5649
|
+
/** Returns a new `Time` with the given duration added to it. */ add(duration) {
|
|
5650
|
+
return ($735220c2d4774dd3$export$7ed87b6bc2506470)(this, duration);
|
|
5651
|
+
}
|
|
5652
|
+
/** Returns a new `Time` with the given duration subtracted from it. */ subtract(duration) {
|
|
5653
|
+
return ($735220c2d4774dd3$export$fe34d3a381cd7501)(this, duration);
|
|
5654
|
+
}
|
|
5655
|
+
/** Returns a new `Time` with the given fields set to the provided values. Other fields will be constrained accordingly. */ set(fields) {
|
|
5656
|
+
return ($735220c2d4774dd3$export$e5d5e1c1822b6e56)(this, fields);
|
|
5657
|
+
}
|
|
5658
|
+
/**
|
|
5659
|
+
* Returns a new `Time` with the given field adjusted by a specified amount.
|
|
5660
|
+
* When the resulting value reaches the limits of the field, it wraps around.
|
|
5661
|
+
*/ cycle(field, amount, options) {
|
|
5662
|
+
return ($735220c2d4774dd3$export$dd02b3e0007dfe28)(this, field, amount, options);
|
|
5663
|
+
}
|
|
5664
|
+
/** Converts the time to an ISO 8601 formatted string. */ toString() {
|
|
5665
|
+
return ($fae977aafc393c5c$export$f59dee82248f5ad4)(this);
|
|
5666
|
+
}
|
|
5667
|
+
/** Compares this time with another. A negative result indicates that this time is before the given one, and a positive time indicates that it is after. */ compare(b) {
|
|
5668
|
+
return ($14e0f24ef4ac5c92$export$c19a80a9721b80f6)(this, b);
|
|
5669
|
+
}
|
|
5670
|
+
constructor(hour = 0, minute = 0, second = 0, millisecond = 0){
|
|
5671
|
+
(_class_private_field_init)(this, $35ea8db9cb2ccb90$var$_type1, {
|
|
5672
|
+
writable: true,
|
|
5673
|
+
value: void 0
|
|
5674
|
+
});
|
|
5675
|
+
this.hour = hour;
|
|
5676
|
+
this.minute = minute;
|
|
5677
|
+
this.second = second;
|
|
5678
|
+
this.millisecond = millisecond;
|
|
5679
|
+
($735220c2d4774dd3$export$7555de1e070510cb)(this);
|
|
5680
|
+
}
|
|
5681
|
+
}
|
|
5682
|
+
|
|
5683
|
+
const useTimePicker = (props = {}) => {
|
|
5684
|
+
const locale = useLocaleContext();
|
|
5685
|
+
const environment = useEnvironmentContext();
|
|
5686
|
+
const id = solidJs.createUniqueId();
|
|
5687
|
+
const context = solidJs.createMemo(() => ({
|
|
5688
|
+
id,
|
|
5689
|
+
dir: locale().dir,
|
|
5690
|
+
getRootNode: environment().getRootNode,
|
|
5691
|
+
open: props.defaultOpen,
|
|
5692
|
+
'open.controlled': props.open !== undefined,
|
|
5693
|
+
...props,
|
|
5694
|
+
value: props.defaultValue ? $fae977aafc393c5c$export$c9698ec7f05a07e1(props.defaultValue) : undefined,
|
|
5695
|
+
min: props.min ? $fae977aafc393c5c$export$c9698ec7f05a07e1(props.min) : undefined,
|
|
5696
|
+
max: props.max ? $fae977aafc393c5c$export$c9698ec7f05a07e1(props.max) : undefined
|
|
5697
|
+
}));
|
|
5698
|
+
const [state, send] = solid.useMachine(timePicker__namespace.machine(context()), {
|
|
5699
|
+
context
|
|
5700
|
+
});
|
|
5701
|
+
return solidJs.createMemo(() => timePicker__namespace.connect(state, send, solid.normalizeProps));
|
|
5702
|
+
};
|
|
5703
|
+
|
|
5704
|
+
const TimePickerRoot = props => {
|
|
5705
|
+
const [presenceProps, timePickerProps] = splitPresenceProps(props);
|
|
5706
|
+
const [useTimePickerProps, localProps] = createSplitProps()(timePickerProps, ['allowSeconds', 'defaultOpen', 'defaultValue', 'disableLayer', 'disabled', 'id', 'ids', 'locale', 'max', 'min', 'name', 'onFocusChange', 'onOpenChange', 'onValueChange', 'open', 'placeholder', 'positioning', 'readOnly', 'steps', 'value']);
|
|
5707
|
+
const timePicker = useTimePicker(useTimePickerProps);
|
|
5708
|
+
const apiPresence = usePresence(solid.mergeProps(presenceProps, () => ({
|
|
5709
|
+
present: timePicker().open
|
|
5710
|
+
})));
|
|
5711
|
+
const mergedProps = solid.mergeProps(() => timePicker().getRootProps(), localProps);
|
|
5712
|
+
return web.createComponent(TimePickerProvider, {
|
|
5713
|
+
value: timePicker,
|
|
5714
|
+
get children() {
|
|
5715
|
+
return web.createComponent(PresenceProvider, {
|
|
5716
|
+
value: apiPresence,
|
|
5717
|
+
get children() {
|
|
5718
|
+
return web.createComponent(ark.div, mergedProps);
|
|
5719
|
+
}
|
|
5720
|
+
});
|
|
5721
|
+
}
|
|
5722
|
+
});
|
|
5723
|
+
};
|
|
5724
|
+
|
|
5725
|
+
const TimePickerRootProvider = props => {
|
|
5726
|
+
const [presenceProps, timePickerProps] = splitPresenceProps(props);
|
|
5727
|
+
const [{
|
|
5728
|
+
value: timePicker
|
|
5729
|
+
}, localProps] = createSplitProps()(timePickerProps, ['value']);
|
|
5730
|
+
const apiPresence = usePresence(solid.mergeProps(presenceProps, () => ({
|
|
5731
|
+
present: timePicker().open
|
|
5732
|
+
})));
|
|
5733
|
+
const mergedProps = solid.mergeProps(() => timePicker().getRootProps(), localProps);
|
|
5734
|
+
return web.createComponent(TimePickerProvider, {
|
|
5735
|
+
value: timePicker,
|
|
5736
|
+
get children() {
|
|
5737
|
+
return web.createComponent(PresenceProvider, {
|
|
5738
|
+
value: apiPresence,
|
|
5739
|
+
get children() {
|
|
5740
|
+
return web.createComponent(ark.div, mergedProps);
|
|
5741
|
+
}
|
|
5742
|
+
});
|
|
5743
|
+
}
|
|
5744
|
+
});
|
|
5745
|
+
};
|
|
5746
|
+
|
|
5747
|
+
const TimePickerSpacer = props => {
|
|
5748
|
+
const timePicker = useTimePickerContext();
|
|
5749
|
+
const mergedProps = solid.mergeProps(() => timePicker().getSpacerProps(), props);
|
|
5750
|
+
return web.createComponent(ark.div, mergedProps);
|
|
5751
|
+
};
|
|
5752
|
+
|
|
5753
|
+
const TimePickerTrigger = props => {
|
|
5754
|
+
const timePicker = useTimePickerContext();
|
|
5755
|
+
const mergedProps = solid.mergeProps(() => timePicker().getTriggerProps(), props);
|
|
5756
|
+
return web.createComponent(ark.button, mergedProps);
|
|
5757
|
+
};
|
|
5758
|
+
|
|
5759
|
+
var timePicker = /*#__PURE__*/Object.freeze({
|
|
5760
|
+
__proto__: null,
|
|
5761
|
+
Cell: TimePickerCell,
|
|
5762
|
+
ClearTrigger: TimePickerClearTrigger,
|
|
5763
|
+
Column: TimePickerColumn,
|
|
5764
|
+
Content: TimePickerContent,
|
|
5765
|
+
Context: TimePickerContext,
|
|
5766
|
+
Control: TimePickerControl,
|
|
5767
|
+
Input: TimePickerInput,
|
|
5768
|
+
Label: TimePickerLabel,
|
|
5769
|
+
Positioner: TimePickerPositioner,
|
|
5770
|
+
Root: TimePickerRoot,
|
|
5771
|
+
RootProvider: TimePickerRootProvider,
|
|
5772
|
+
Spacer: TimePickerSpacer,
|
|
5773
|
+
Trigger: TimePickerTrigger
|
|
5774
|
+
});
|
|
5775
|
+
|
|
5189
5776
|
const createToaster = props => {
|
|
5190
5777
|
const machine = toast__namespace.group.machine({
|
|
5191
5778
|
id: '1',
|
|
@@ -5421,7 +6008,7 @@ const useTooltip = props => {
|
|
|
5421
6008
|
|
|
5422
6009
|
const TooltipRoot = props => {
|
|
5423
6010
|
const [presenceProps, tooltipProps] = splitPresenceProps(props);
|
|
5424
|
-
const [useTooltipProps, localProps] = createSplitProps()(tooltipProps, ['aria-label', 'closeDelay', 'closeOnEscape', 'closeOnPointerDown', 'closeOnScroll', 'defaultOpen', 'disabled', 'id', 'ids', 'interactive', 'onOpenChange', 'open', 'openDelay', 'positioning']);
|
|
6011
|
+
const [useTooltipProps, localProps] = createSplitProps()(tooltipProps, ['aria-label', 'closeDelay', 'closeOnClick', 'closeOnEscape', 'closeOnPointerDown', 'closeOnScroll', 'defaultOpen', 'disabled', 'id', 'ids', 'interactive', 'onOpenChange', 'open', 'openDelay', 'positioning']);
|
|
5425
6012
|
const api = useTooltip(useTooltipProps);
|
|
5426
6013
|
const apiPresence = usePresence(solid.mergeProps(presenceProps, () => ({
|
|
5427
6014
|
present: api().open
|
|
@@ -5677,6 +6264,122 @@ var treeView = /*#__PURE__*/Object.freeze({
|
|
|
5677
6264
|
Tree: TreeViewTree
|
|
5678
6265
|
});
|
|
5679
6266
|
|
|
6267
|
+
Object.defineProperty(exports, "collapsibleAnatomy", {
|
|
6268
|
+
enumerable: true,
|
|
6269
|
+
get: function () { return collapsible$1.anatomy; }
|
|
6270
|
+
});
|
|
6271
|
+
Object.defineProperty(exports, "accordionAnatomy", {
|
|
6272
|
+
enumerable: true,
|
|
6273
|
+
get: function () { return accordion$1.anatomy; }
|
|
6274
|
+
});
|
|
6275
|
+
Object.defineProperty(exports, "avatarAnatomy", {
|
|
6276
|
+
enumerable: true,
|
|
6277
|
+
get: function () { return avatar$1.anatomy; }
|
|
6278
|
+
});
|
|
6279
|
+
Object.defineProperty(exports, "clipboardAnatomy", {
|
|
6280
|
+
enumerable: true,
|
|
6281
|
+
get: function () { return clipboard$1.anatomy; }
|
|
6282
|
+
});
|
|
6283
|
+
Object.defineProperty(exports, "comboboxAnatomy", {
|
|
6284
|
+
enumerable: true,
|
|
6285
|
+
get: function () { return combobox$1.anatomy; }
|
|
6286
|
+
});
|
|
6287
|
+
Object.defineProperty(exports, "dialogAnatomy", {
|
|
6288
|
+
enumerable: true,
|
|
6289
|
+
get: function () { return dialog$1.anatomy; }
|
|
6290
|
+
});
|
|
6291
|
+
Object.defineProperty(exports, "editableAnatomy", {
|
|
6292
|
+
enumerable: true,
|
|
6293
|
+
get: function () { return editable$1.anatomy; }
|
|
6294
|
+
});
|
|
6295
|
+
Object.defineProperty(exports, "fileUploadAnatomy", {
|
|
6296
|
+
enumerable: true,
|
|
6297
|
+
get: function () { return fileUpload$1.anatomy; }
|
|
6298
|
+
});
|
|
6299
|
+
Object.defineProperty(exports, "hoverCardAnatomy", {
|
|
6300
|
+
enumerable: true,
|
|
6301
|
+
get: function () { return hoverCard$1.anatomy; }
|
|
6302
|
+
});
|
|
6303
|
+
Object.defineProperty(exports, "menuAnatomy", {
|
|
6304
|
+
enumerable: true,
|
|
6305
|
+
get: function () { return menu$1.anatomy; }
|
|
6306
|
+
});
|
|
6307
|
+
Object.defineProperty(exports, "numberInputAnatomy", {
|
|
6308
|
+
enumerable: true,
|
|
6309
|
+
get: function () { return numberInput$1.anatomy; }
|
|
6310
|
+
});
|
|
6311
|
+
Object.defineProperty(exports, "paginationAnatomy", {
|
|
6312
|
+
enumerable: true,
|
|
6313
|
+
get: function () { return pagination$1.anatomy; }
|
|
6314
|
+
});
|
|
6315
|
+
Object.defineProperty(exports, "pinInputAnatomy", {
|
|
6316
|
+
enumerable: true,
|
|
6317
|
+
get: function () { return pinInput$1.anatomy; }
|
|
6318
|
+
});
|
|
6319
|
+
Object.defineProperty(exports, "popoverAnatomy", {
|
|
6320
|
+
enumerable: true,
|
|
6321
|
+
get: function () { return popover$1.anatomy; }
|
|
6322
|
+
});
|
|
6323
|
+
Object.defineProperty(exports, "progressAnatomy", {
|
|
6324
|
+
enumerable: true,
|
|
6325
|
+
get: function () { return progress$1.anatomy; }
|
|
6326
|
+
});
|
|
6327
|
+
Object.defineProperty(exports, "qrCodeAnatomy", {
|
|
6328
|
+
enumerable: true,
|
|
6329
|
+
get: function () { return qrCode$1.anatomy; }
|
|
6330
|
+
});
|
|
6331
|
+
Object.defineProperty(exports, "radioGroupAnatomy", {
|
|
6332
|
+
enumerable: true,
|
|
6333
|
+
get: function () { return radio.anatomy; }
|
|
6334
|
+
});
|
|
6335
|
+
Object.defineProperty(exports, "ratingGroupAnatomy", {
|
|
6336
|
+
enumerable: true,
|
|
6337
|
+
get: function () { return rating.anatomy; }
|
|
6338
|
+
});
|
|
6339
|
+
Object.defineProperty(exports, "selectAnatomy", {
|
|
6340
|
+
enumerable: true,
|
|
6341
|
+
get: function () { return select$1.anatomy; }
|
|
6342
|
+
});
|
|
6343
|
+
Object.defineProperty(exports, "signaturePadAnatomy", {
|
|
6344
|
+
enumerable: true,
|
|
6345
|
+
get: function () { return signaturePad$1.anatomy; }
|
|
6346
|
+
});
|
|
6347
|
+
Object.defineProperty(exports, "sliderAnatomy", {
|
|
6348
|
+
enumerable: true,
|
|
6349
|
+
get: function () { return slider$1.anatomy; }
|
|
6350
|
+
});
|
|
6351
|
+
Object.defineProperty(exports, "splitterAnatomy", {
|
|
6352
|
+
enumerable: true,
|
|
6353
|
+
get: function () { return splitter$1.anatomy; }
|
|
6354
|
+
});
|
|
6355
|
+
Object.defineProperty(exports, "switchAnatomy", {
|
|
6356
|
+
enumerable: true,
|
|
6357
|
+
get: function () { return zagSwitch.anatomy; }
|
|
6358
|
+
});
|
|
6359
|
+
Object.defineProperty(exports, "tabsAnatomy", {
|
|
6360
|
+
enumerable: true,
|
|
6361
|
+
get: function () { return tabs$1.anatomy; }
|
|
6362
|
+
});
|
|
6363
|
+
Object.defineProperty(exports, "tagsInputAnatomy", {
|
|
6364
|
+
enumerable: true,
|
|
6365
|
+
get: function () { return tagsInput$1.anatomy; }
|
|
6366
|
+
});
|
|
6367
|
+
Object.defineProperty(exports, "toastAnatomy", {
|
|
6368
|
+
enumerable: true,
|
|
6369
|
+
get: function () { return toast$1.anatomy; }
|
|
6370
|
+
});
|
|
6371
|
+
Object.defineProperty(exports, "toggleGroupAnatomy", {
|
|
6372
|
+
enumerable: true,
|
|
6373
|
+
get: function () { return toggleGroup$1.anatomy; }
|
|
6374
|
+
});
|
|
6375
|
+
Object.defineProperty(exports, "tooltipAnatomy", {
|
|
6376
|
+
enumerable: true,
|
|
6377
|
+
get: function () { return tooltip$1.anatomy; }
|
|
6378
|
+
});
|
|
6379
|
+
Object.defineProperty(exports, "treeViewAnatomy", {
|
|
6380
|
+
enumerable: true,
|
|
6381
|
+
get: function () { return treeView$1.anatomy; }
|
|
6382
|
+
});
|
|
5680
6383
|
exports.Accordion = accordion;
|
|
5681
6384
|
exports.AccordionContext = AccordionContext;
|
|
5682
6385
|
exports.AccordionItem = AccordionItem;
|
|
@@ -5837,6 +6540,13 @@ exports.FieldRoot = FieldRoot;
|
|
|
5837
6540
|
exports.FieldRootProvider = FieldRootProvider;
|
|
5838
6541
|
exports.FieldSelect = FieldSelect;
|
|
5839
6542
|
exports.FieldTextarea = FieldTextarea;
|
|
6543
|
+
exports.Fieldset = fieldset;
|
|
6544
|
+
exports.FieldsetContext = FieldsetContext;
|
|
6545
|
+
exports.FieldsetErrorText = FieldsetErrorText;
|
|
6546
|
+
exports.FieldsetHelperText = FieldsetHelperText;
|
|
6547
|
+
exports.FieldsetLegend = FieldsetLegend;
|
|
6548
|
+
exports.FieldsetRoot = FieldsetRoot;
|
|
6549
|
+
exports.FieldsetRootProvider = FieldsetRootProvider;
|
|
5840
6550
|
exports.FileUpload = fileUpload;
|
|
5841
6551
|
exports.FileUploadContext = FileUploadContext;
|
|
5842
6552
|
exports.FileUploadDropzone = FileUploadDropzone;
|
|
@@ -5855,6 +6565,7 @@ exports.FileUploadTrigger = FileUploadTrigger;
|
|
|
5855
6565
|
exports.Format = format;
|
|
5856
6566
|
exports.FormatByte = FormatByte;
|
|
5857
6567
|
exports.FormatNumber = FormatNumber;
|
|
6568
|
+
exports.Highlight = Highlight;
|
|
5858
6569
|
exports.HoverCard = hoverCard;
|
|
5859
6570
|
exports.HoverCardArrow = HoverCardArrow;
|
|
5860
6571
|
exports.HoverCardArrowTip = HoverCardArrowTip;
|
|
@@ -5897,6 +6608,7 @@ exports.NumberInputLabel = NumberInputLabel;
|
|
|
5897
6608
|
exports.NumberInputRoot = NumberInputRoot;
|
|
5898
6609
|
exports.NumberInputRootProvider = NumberInputRootProvider;
|
|
5899
6610
|
exports.NumberInputScrubber = NumberInputScrubber;
|
|
6611
|
+
exports.NumberInputValueText = NumberInputValueText;
|
|
5900
6612
|
exports.Pagination = pagination;
|
|
5901
6613
|
exports.PaginationContext = PaginationContext;
|
|
5902
6614
|
exports.PaginationEllipsis = PaginationEllipsis;
|
|
@@ -6059,6 +6771,20 @@ exports.TagsInputItemText = TagsInputItemText;
|
|
|
6059
6771
|
exports.TagsInputLabel = TagsInputLabel;
|
|
6060
6772
|
exports.TagsInputRoot = TagsInputRoot;
|
|
6061
6773
|
exports.TagsInputRootProvider = TagsInputRootProvider;
|
|
6774
|
+
exports.TimePicker = timePicker;
|
|
6775
|
+
exports.TimePickerCell = TimePickerCell;
|
|
6776
|
+
exports.TimePickerClearTrigger = TimePickerClearTrigger;
|
|
6777
|
+
exports.TimePickerColumn = TimePickerColumn;
|
|
6778
|
+
exports.TimePickerContent = TimePickerContent;
|
|
6779
|
+
exports.TimePickerContext = TimePickerContext;
|
|
6780
|
+
exports.TimePickerControl = TimePickerControl;
|
|
6781
|
+
exports.TimePickerInput = TimePickerInput;
|
|
6782
|
+
exports.TimePickerLabel = TimePickerLabel;
|
|
6783
|
+
exports.TimePickerPositioner = TimePickerPositioner;
|
|
6784
|
+
exports.TimePickerRoot = TimePickerRoot;
|
|
6785
|
+
exports.TimePickerRootProvider = TimePickerRootProvider;
|
|
6786
|
+
exports.TimePickerSpacer = TimePickerSpacer;
|
|
6787
|
+
exports.TimePickerTrigger = TimePickerTrigger;
|
|
6062
6788
|
exports.Toast = toast;
|
|
6063
6789
|
exports.ToastActionTrigger = ToastActionTrigger;
|
|
6064
6790
|
exports.ToastCloseTrigger = ToastCloseTrigger;
|
|
@@ -6098,7 +6824,14 @@ exports.TreeViewRoot = TreeViewRoot;
|
|
|
6098
6824
|
exports.TreeViewRootProvider = TreeViewRootProvider;
|
|
6099
6825
|
exports.TreeViewTree = TreeViewTree;
|
|
6100
6826
|
exports.ark = ark;
|
|
6827
|
+
exports.carouselAnatomy = carouselAnatomy;
|
|
6828
|
+
exports.checkboxAnatomy = checkboxAnatomy;
|
|
6829
|
+
exports.colorPickerAnatomy = colorPickerAnatomy;
|
|
6101
6830
|
exports.createToaster = createToaster;
|
|
6831
|
+
exports.datePickerAnatomy = datePickerAnatomy;
|
|
6832
|
+
exports.fieldAnatomy = fieldAnatomy;
|
|
6833
|
+
exports.fieldsetAnatomy = fieldsetAnatomy;
|
|
6834
|
+
exports.segmentGroupAnatomy = segmentGroupAnatomy;
|
|
6102
6835
|
exports.splitPresenceProps = splitPresenceProps;
|
|
6103
6836
|
exports.useAccordion = useAccordion;
|
|
6104
6837
|
exports.useAccordionContext = useAccordionContext;
|
|
@@ -6128,8 +6861,10 @@ exports.useEditable = useEditable;
|
|
|
6128
6861
|
exports.useEditableContext = useEditableContext;
|
|
6129
6862
|
exports.useEnvironmentContext = useEnvironmentContext;
|
|
6130
6863
|
exports.useFieldContext = useFieldContext;
|
|
6864
|
+
exports.useFieldsetContext = useFieldsetContext;
|
|
6131
6865
|
exports.useFileUpload = useFileUpload;
|
|
6132
6866
|
exports.useFileUploadContext = useFileUploadContext;
|
|
6867
|
+
exports.useHighlight = useHighlight;
|
|
6133
6868
|
exports.useHoverCard = useHoverCard;
|
|
6134
6869
|
exports.useHoverCardContext = useHoverCardContext;
|
|
6135
6870
|
exports.useLocaleContext = useLocaleContext;
|
|
@@ -6175,6 +6910,8 @@ exports.useTabsContext = useTabsContext;
|
|
|
6175
6910
|
exports.useTagsInput = useTagsInput;
|
|
6176
6911
|
exports.useTagsInputContext = useTagsInputContext;
|
|
6177
6912
|
exports.useTagsInputItemContext = useTagsInputItemContext;
|
|
6913
|
+
exports.useTimePicker = useTimePicker;
|
|
6914
|
+
exports.useTimePickerContext = useTimePickerContext;
|
|
6178
6915
|
exports.useToastContext = useToastContext;
|
|
6179
6916
|
exports.useToggleGroup = useToggleGroup;
|
|
6180
6917
|
exports.useToggleGroupContext = useToggleGroupContext;
|