@yamada-ui/react 2.2.3 → 2.2.4-dev-20260706063021
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/dist/cjs/components/accordion/accordion.cjs +1 -0
- package/dist/cjs/components/accordion/namespace.cjs +13 -0
- package/dist/cjs/components/action-bar/namespace.cjs +7 -0
- package/dist/cjs/components/alert/namespace.cjs +7 -0
- package/dist/cjs/components/alpha-slider/alpha-slider.cjs +1 -0
- package/dist/cjs/components/alpha-slider/namespace.cjs +6 -0
- package/dist/cjs/components/autocomplete/namespace.cjs +6 -0
- package/dist/cjs/components/avatar/namespace.cjs +4 -0
- package/dist/cjs/components/blockquote/namespace.cjs +7 -0
- package/dist/cjs/components/breadcrumb/namespace.cjs +5 -0
- package/dist/cjs/components/button/namespace.cjs +7 -0
- package/dist/cjs/components/calendar/namespace.cjs +10 -0
- package/dist/cjs/components/card/namespace.cjs +6 -0
- package/dist/cjs/components/carousel/namespace.cjs +9 -0
- package/dist/cjs/components/chart/area-chart.namespace.cjs +14 -0
- package/dist/cjs/components/chart/bar-chart.namespace.cjs +13 -0
- package/dist/cjs/components/chart/composed-chart.namespace.cjs +15 -0
- package/dist/cjs/components/chart/donut-chart.namespace.cjs +10 -0
- package/dist/cjs/components/chart/line-chart.namespace.cjs +13 -0
- package/dist/cjs/components/chart/pie-chart.namespace.cjs +10 -0
- package/dist/cjs/components/chart/polar-chart.cjs.map +1 -1
- package/dist/cjs/components/chart/radar-chart.namespace.cjs +13 -0
- package/dist/cjs/components/chart/radial-chart.namespace.cjs +13 -0
- package/dist/cjs/components/chart/use-cartesian-chart.cjs +1 -3
- package/dist/cjs/components/chart/use-cartesian-chart.cjs.map +1 -1
- package/dist/cjs/components/checkbox/checkbox-group.cjs +1 -0
- package/dist/cjs/components/checkbox/namespace.cjs +4 -0
- package/dist/cjs/components/checkbox-card/checkbox-card-group.cjs +1 -0
- package/dist/cjs/components/checkbox-card/checkbox-card-group.namespace.cjs +7 -0
- package/dist/cjs/components/checkbox-card/checkbox-card.namespace.cjs +6 -0
- package/dist/cjs/components/circle-progress/namespace.cjs +4 -0
- package/dist/cjs/components/color-selector/namespace.cjs +10 -0
- package/dist/cjs/components/color-swatch/color-swatch.cjs +1 -0
- package/dist/cjs/components/container/namespace.cjs +6 -0
- package/dist/cjs/components/data-list/namespace.cjs +6 -0
- package/dist/cjs/components/date-picker/use-date-picker.cjs +1 -1
- package/dist/cjs/components/drawer/drawer.cjs +1 -0
- package/dist/cjs/components/drawer/namespace.cjs +13 -0
- package/dist/cjs/components/dropzone/namespace.cjs +16 -0
- package/dist/cjs/components/editable/namespace.cjs +12 -0
- package/dist/cjs/components/empty-state/namespace.cjs +7 -0
- package/dist/cjs/components/field/field.cjs +1 -0
- package/dist/cjs/components/field/namespace.cjs +6 -0
- package/dist/cjs/components/fieldset/namespace.cjs +8 -0
- package/dist/cjs/components/focus-lock/focus-lock.cjs +1 -1
- package/dist/cjs/components/form/namespace.cjs +10 -0
- package/dist/cjs/components/format/namespace.cjs +17 -0
- package/dist/cjs/components/hue-slider/namespace.cjs +6 -0
- package/dist/cjs/components/icon/icons/ad-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/ad-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/banknote-check-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/banknote-check-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/bone-fracture-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/bone-fracture-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/clock-arrow-left-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/clock-arrow-left-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/clock-arrow-right-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/clock-arrow-right-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/database-arrow-down-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/database-arrow-down-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/database-arrow-up-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/database-arrow-up-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/database-check-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/database-check-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/database-minus-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/database-minus-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/database-plus-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/database-plus-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/database-x-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/database-x-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/eye-dashed-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/eye-dashed-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/index.cjs +87 -0
- package/dist/cjs/components/icon/icons/index.cjs.map +1 -1
- package/dist/cjs/components/icon/icons/list-sort-ascending-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/list-sort-ascending-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/list-sort-descending-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/list-sort-descending-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/pencil-sparkles-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/pencil-sparkles-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/phi-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/phi-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/podium-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/podium-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/save-check-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/save-check-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/save-pen-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/save-pen-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/save-plus-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/save-plus-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/star-check-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/star-check-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/star-minus-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/star-minus-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/star-plus-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/star-plus-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/star-x-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/star-x-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/summary-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/summary-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/tag-plus-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/tag-plus-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/tag-x-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/tag-x-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/user-round-arrow-left-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/user-round-arrow-left-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/icons/wrench-off-icon.cjs +14 -0
- package/dist/cjs/components/icon/icons/wrench-off-icon.cjs.map +1 -0
- package/dist/cjs/components/icon/index.cjs +58 -0
- package/dist/cjs/components/input/namespace.cjs +7 -0
- package/dist/cjs/components/link-box/namespace.cjs +4 -0
- package/dist/cjs/components/list/namespace.cjs +5 -0
- package/dist/cjs/components/loading/namespace.cjs +8 -0
- package/dist/cjs/components/menu/namespace.cjs +17 -0
- package/dist/cjs/components/modal/modal.cjs +1 -0
- package/dist/cjs/components/modal/namespace.cjs +12 -0
- package/dist/cjs/components/native-accordion/namespace.cjs +7 -0
- package/dist/cjs/components/native-popover/namespace.cjs +10 -0
- package/dist/cjs/components/native-select/namespace.cjs +6 -0
- package/dist/cjs/components/native-table/namespace.cjs +12 -0
- package/dist/cjs/components/notice/notice.cjs +2 -0
- package/dist/cjs/components/pagination/namespace.cjs +10 -0
- package/dist/cjs/components/pin-input/namespace.cjs +7 -0
- package/dist/cjs/components/popover/namespace.cjs +10 -0
- package/dist/cjs/components/qr-code/namespace.cjs +6 -0
- package/dist/cjs/components/radio/namespace.cjs +4 -0
- package/dist/cjs/components/radio/radio-group.cjs +1 -0
- package/dist/cjs/components/radio-card/radio-card-group.cjs +1 -0
- package/dist/cjs/components/radio-card/radio-card-group.namespace.cjs +7 -0
- package/dist/cjs/components/radio-card/radio-card.namespace.cjs +6 -0
- package/dist/cjs/components/reorder/namespace.cjs +9 -0
- package/dist/cjs/components/resizable/namespace.cjs +8 -0
- package/dist/cjs/components/resizable/use-resizable.cjs +1 -0
- package/dist/cjs/components/saturation-slider/namespace.cjs +5 -0
- package/dist/cjs/components/segmented-control/namespace.cjs +9 -0
- package/dist/cjs/components/select/namespace.cjs +7 -0
- package/dist/cjs/components/sidebar/namespace.cjs +30 -0
- package/dist/cjs/components/slider/namespace.cjs +9 -0
- package/dist/cjs/components/stat/namespace.cjs +8 -0
- package/dist/cjs/components/steps/namespace.cjs +21 -0
- package/dist/cjs/components/tabs/namespace.cjs +15 -0
- package/dist/cjs/components/timeline/namespace.cjs +9 -0
- package/dist/cjs/components/toggle/namespace.cjs +4 -0
- package/dist/cjs/components/tree/namespace.cjs +10 -0
- package/dist/cjs/components/tree/use-tree.cjs +1 -1
- package/dist/cjs/components/tree/use-tree.cjs.map +1 -1
- package/dist/cjs/core/components/props.cjs +1 -1
- package/dist/cjs/core/components/props.cjs.map +1 -1
- package/dist/cjs/core/css/styles.cjs.map +1 -1
- package/dist/cjs/core/css/utils.cjs +1 -1
- package/dist/cjs/core/css/utils.cjs.map +1 -1
- package/dist/cjs/core/system/styled.cjs +1 -1
- package/dist/cjs/core/system/use-system-color-mode.cjs.map +1 -1
- package/dist/cjs/hooks/use-breakpoint/use-breakpoint.cjs.map +1 -1
- package/dist/cjs/hooks/use-combobox/index.cjs +1 -1
- package/dist/cjs/index.cjs +87 -0
- package/dist/cjs/providers/i18n-provider/i18n-provider.cjs +1 -1
- package/dist/cjs/utils/children.cjs +1 -1
- package/dist/esm/components/accordion/accordion.js +1 -1
- package/dist/esm/components/accordion/namespace.js +1 -1
- package/dist/esm/components/action-bar/namespace.js +1 -1
- package/dist/esm/components/alert/namespace.js +1 -1
- package/dist/esm/components/alpha-slider/alpha-slider.js +1 -1
- package/dist/esm/components/alpha-slider/namespace.js +1 -1
- package/dist/esm/components/autocomplete/namespace.js +1 -1
- package/dist/esm/components/avatar/namespace.js +1 -1
- package/dist/esm/components/blockquote/namespace.js +1 -1
- package/dist/esm/components/breadcrumb/namespace.js +1 -1
- package/dist/esm/components/button/namespace.js +1 -1
- package/dist/esm/components/calendar/namespace.js +1 -1
- package/dist/esm/components/card/namespace.js +1 -1
- package/dist/esm/components/carousel/namespace.js +1 -1
- package/dist/esm/components/chart/area-chart.namespace.js +1 -1
- package/dist/esm/components/chart/bar-chart.namespace.js +1 -1
- package/dist/esm/components/chart/composed-chart.namespace.js +1 -1
- package/dist/esm/components/chart/donut-chart.namespace.js +1 -1
- package/dist/esm/components/chart/line-chart.namespace.js +1 -1
- package/dist/esm/components/chart/pie-chart.namespace.js +1 -1
- package/dist/esm/components/chart/polar-chart.js.map +1 -1
- package/dist/esm/components/chart/radar-chart.namespace.js +1 -1
- package/dist/esm/components/chart/radial-chart.namespace.js +1 -1
- package/dist/esm/components/chart/use-cartesian-chart.js +1 -3
- package/dist/esm/components/chart/use-cartesian-chart.js.map +1 -1
- package/dist/esm/components/checkbox/checkbox-group.js +1 -1
- package/dist/esm/components/checkbox/namespace.js +1 -1
- package/dist/esm/components/checkbox-card/checkbox-card-group.js +1 -1
- package/dist/esm/components/checkbox-card/checkbox-card-group.namespace.js +1 -1
- package/dist/esm/components/checkbox-card/checkbox-card.namespace.js +1 -1
- package/dist/esm/components/circle-progress/namespace.js +1 -1
- package/dist/esm/components/color-selector/namespace.js +1 -1
- package/dist/esm/components/color-swatch/color-swatch.js +1 -1
- package/dist/esm/components/container/namespace.js +1 -1
- package/dist/esm/components/data-list/namespace.js +1 -1
- package/dist/esm/components/drawer/drawer.js +1 -1
- package/dist/esm/components/drawer/namespace.js +1 -1
- package/dist/esm/components/dropzone/namespace.js +1 -1
- package/dist/esm/components/editable/namespace.js +1 -1
- package/dist/esm/components/empty-state/namespace.js +1 -1
- package/dist/esm/components/field/field.js +1 -1
- package/dist/esm/components/field/namespace.js +1 -1
- package/dist/esm/components/fieldset/namespace.js +1 -1
- package/dist/esm/components/form/namespace.js +1 -1
- package/dist/esm/components/format/namespace.js +1 -1
- package/dist/esm/components/hue-slider/namespace.js +1 -1
- package/dist/esm/components/icon/icons/ad-icon.js +14 -0
- package/dist/esm/components/icon/icons/ad-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/banknote-check-icon.js +14 -0
- package/dist/esm/components/icon/icons/banknote-check-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/bone-fracture-icon.js +14 -0
- package/dist/esm/components/icon/icons/bone-fracture-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/clock-arrow-left-icon.js +14 -0
- package/dist/esm/components/icon/icons/clock-arrow-left-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/clock-arrow-right-icon.js +14 -0
- package/dist/esm/components/icon/icons/clock-arrow-right-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/database-arrow-down-icon.js +14 -0
- package/dist/esm/components/icon/icons/database-arrow-down-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/database-arrow-up-icon.js +14 -0
- package/dist/esm/components/icon/icons/database-arrow-up-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/database-check-icon.js +14 -0
- package/dist/esm/components/icon/icons/database-check-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/database-minus-icon.js +14 -0
- package/dist/esm/components/icon/icons/database-minus-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/database-plus-icon.js +14 -0
- package/dist/esm/components/icon/icons/database-plus-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/database-x-icon.js +14 -0
- package/dist/esm/components/icon/icons/database-x-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/eye-dashed-icon.js +14 -0
- package/dist/esm/components/icon/icons/eye-dashed-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/index.js +59 -1
- package/dist/esm/components/icon/icons/index.js.map +1 -1
- package/dist/esm/components/icon/icons/list-sort-ascending-icon.js +14 -0
- package/dist/esm/components/icon/icons/list-sort-ascending-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/list-sort-descending-icon.js +14 -0
- package/dist/esm/components/icon/icons/list-sort-descending-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/pencil-sparkles-icon.js +14 -0
- package/dist/esm/components/icon/icons/pencil-sparkles-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/phi-icon.js +14 -0
- package/dist/esm/components/icon/icons/phi-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/podium-icon.js +14 -0
- package/dist/esm/components/icon/icons/podium-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/save-check-icon.js +14 -0
- package/dist/esm/components/icon/icons/save-check-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/save-pen-icon.js +14 -0
- package/dist/esm/components/icon/icons/save-pen-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/save-plus-icon.js +14 -0
- package/dist/esm/components/icon/icons/save-plus-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/star-check-icon.js +14 -0
- package/dist/esm/components/icon/icons/star-check-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/star-minus-icon.js +14 -0
- package/dist/esm/components/icon/icons/star-minus-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/star-plus-icon.js +14 -0
- package/dist/esm/components/icon/icons/star-plus-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/star-x-icon.js +14 -0
- package/dist/esm/components/icon/icons/star-x-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/summary-icon.js +14 -0
- package/dist/esm/components/icon/icons/summary-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/tag-plus-icon.js +14 -0
- package/dist/esm/components/icon/icons/tag-plus-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/tag-x-icon.js +14 -0
- package/dist/esm/components/icon/icons/tag-x-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/user-round-arrow-left-icon.js +14 -0
- package/dist/esm/components/icon/icons/user-round-arrow-left-icon.js.map +1 -0
- package/dist/esm/components/icon/icons/wrench-off-icon.js +14 -0
- package/dist/esm/components/icon/icons/wrench-off-icon.js.map +1 -0
- package/dist/esm/components/icon/index.js +30 -1
- package/dist/esm/components/input/namespace.js +1 -1
- package/dist/esm/components/link-box/namespace.js +1 -1
- package/dist/esm/components/list/namespace.js +1 -1
- package/dist/esm/components/loading/namespace.js +1 -1
- package/dist/esm/components/menu/namespace.js +1 -1
- package/dist/esm/components/modal/modal.js +1 -1
- package/dist/esm/components/modal/namespace.js +1 -1
- package/dist/esm/components/native-accordion/namespace.js +1 -1
- package/dist/esm/components/native-popover/namespace.js +1 -1
- package/dist/esm/components/native-select/namespace.js +1 -1
- package/dist/esm/components/native-table/namespace.js +1 -1
- package/dist/esm/components/notice/notice.js +1 -1
- package/dist/esm/components/pagination/namespace.js +1 -1
- package/dist/esm/components/pin-input/namespace.js +1 -1
- package/dist/esm/components/popover/namespace.js +1 -1
- package/dist/esm/components/qr-code/namespace.js +1 -1
- package/dist/esm/components/radio/namespace.js +1 -1
- package/dist/esm/components/radio/radio-group.js +1 -1
- package/dist/esm/components/radio-card/radio-card-group.js +1 -1
- package/dist/esm/components/radio-card/radio-card-group.namespace.js +1 -1
- package/dist/esm/components/radio-card/radio-card.namespace.js +1 -1
- package/dist/esm/components/reorder/namespace.js +1 -1
- package/dist/esm/components/resizable/namespace.js +1 -1
- package/dist/esm/components/saturation-slider/namespace.js +1 -1
- package/dist/esm/components/segmented-control/namespace.js +1 -1
- package/dist/esm/components/select/namespace.js +1 -1
- package/dist/esm/components/sidebar/namespace.js +1 -1
- package/dist/esm/components/slider/namespace.js +1 -1
- package/dist/esm/components/stat/namespace.js +1 -1
- package/dist/esm/components/steps/namespace.js +1 -1
- package/dist/esm/components/tabs/namespace.js +1 -1
- package/dist/esm/components/timeline/namespace.js +1 -1
- package/dist/esm/components/toggle/namespace.js +1 -1
- package/dist/esm/components/tree/namespace.js +1 -1
- package/dist/esm/components/tree/use-tree.js +1 -1
- package/dist/esm/components/tree/use-tree.js.map +1 -1
- package/dist/esm/core/components/props.js +1 -1
- package/dist/esm/core/components/props.js.map +1 -1
- package/dist/esm/core/css/styles.js.map +1 -1
- package/dist/esm/core/css/utils.js +1 -1
- package/dist/esm/core/css/utils.js.map +1 -1
- package/dist/esm/core/system/use-system-color-mode.js.map +1 -1
- package/dist/esm/hooks/use-breakpoint/use-breakpoint.js.map +1 -1
- package/dist/esm/index.js +59 -1
- package/dist/types/components/accordion/namespace.d.ts +1 -1
- package/dist/types/components/action-bar/namespace.d.ts +1 -1
- package/dist/types/components/alert/namespace.d.ts +1 -1
- package/dist/types/components/alpha-slider/namespace.d.ts +1 -1
- package/dist/types/components/autocomplete/namespace.d.ts +1 -1
- package/dist/types/components/avatar/namespace.d.ts +1 -1
- package/dist/types/components/blockquote/namespace.d.ts +1 -1
- package/dist/types/components/breadcrumb/namespace.d.ts +1 -1
- package/dist/types/components/button/namespace.d.ts +1 -1
- package/dist/types/components/calendar/calendar.style.d.ts +2 -2
- package/dist/types/components/calendar/namespace.d.ts +1 -1
- package/dist/types/components/card/namespace.d.ts +1 -1
- package/dist/types/components/carousel/namespace.d.ts +1 -1
- package/dist/types/components/chart/area-chart.namespace.d.ts +1 -1
- package/dist/types/components/chart/bar-chart.namespace.d.ts +1 -1
- package/dist/types/components/chart/cartesian-chart.d.ts +1 -1
- package/dist/types/components/chart/composed-chart.namespace.d.ts +1 -1
- package/dist/types/components/chart/donut-chart.namespace.d.ts +1 -1
- package/dist/types/components/chart/line-chart.namespace.d.ts +1 -1
- package/dist/types/components/chart/pie-chart.namespace.d.ts +1 -1
- package/dist/types/components/chart/polar-chart.d.ts +4 -4
- package/dist/types/components/chart/polar-chart.style.d.ts +1 -1
- package/dist/types/components/chart/radar-chart.namespace.d.ts +1 -1
- package/dist/types/components/chart/radial-chart.namespace.d.ts +1 -1
- package/dist/types/components/chart/use-cartesian-chart.d.ts +1 -2
- package/dist/types/components/checkbox/checkbox-group.d.ts +1 -1
- package/dist/types/components/checkbox/namespace.d.ts +1 -1
- package/dist/types/components/checkbox-card/checkbox-card-group.d.ts +1 -1
- package/dist/types/components/checkbox-card/checkbox-card-group.namespace.d.ts +1 -1
- package/dist/types/components/checkbox-card/checkbox-card.namespace.d.ts +1 -1
- package/dist/types/components/circle-progress/namespace.d.ts +1 -1
- package/dist/types/components/color-selector/namespace.d.ts +1 -1
- package/dist/types/components/container/namespace.d.ts +1 -1
- package/dist/types/components/data-list/namespace.d.ts +1 -1
- package/dist/types/components/drawer/namespace.d.ts +1 -1
- package/dist/types/components/dropzone/namespace.d.ts +1 -1
- package/dist/types/components/editable/namespace.d.ts +1 -1
- package/dist/types/components/empty-state/namespace.d.ts +1 -1
- package/dist/types/components/field/namespace.d.ts +1 -1
- package/dist/types/components/fieldset/namespace.d.ts +1 -1
- package/dist/types/components/form/namespace.d.ts +1 -1
- package/dist/types/components/format/format-date-time.style.d.ts +1 -1
- package/dist/types/components/format/namespace.d.ts +1 -1
- package/dist/types/components/hue-slider/namespace.d.ts +1 -1
- package/dist/types/components/icon/icon.d.ts +1 -1
- package/dist/types/components/icon/icons/ad-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/banknote-check-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/bone-fracture-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/clock-arrow-left-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/clock-arrow-right-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/database-arrow-down-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/database-arrow-up-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/database-check-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/database-minus-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/database-plus-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/database-x-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/eye-dashed-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/index.d.ts +31 -2
- package/dist/types/components/icon/icons/index.types.d.ts +1 -1
- package/dist/types/components/icon/icons/list-sort-ascending-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/list-sort-descending-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/pencil-sparkles-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/phi-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/podium-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/save-check-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/save-pen-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/save-plus-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/star-check-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/star-minus-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/star-plus-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/star-x-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/summary-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/tag-plus-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/tag-x-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/user-round-arrow-left-icon.d.ts +13 -0
- package/dist/types/components/icon/icons/wrench-off-icon.d.ts +13 -0
- package/dist/types/components/icon/index.d.ts +30 -1
- package/dist/types/components/input/namespace.d.ts +1 -1
- package/dist/types/components/link-box/namespace.d.ts +1 -1
- package/dist/types/components/list/namespace.d.ts +1 -1
- package/dist/types/components/loading/loading.d.ts +1 -1
- package/dist/types/components/loading/namespace.d.ts +1 -1
- package/dist/types/components/menu/namespace.d.ts +1 -1
- package/dist/types/components/modal/namespace.d.ts +1 -1
- package/dist/types/components/native-accordion/namespace.d.ts +1 -1
- package/dist/types/components/native-popover/namespace.d.ts +1 -1
- package/dist/types/components/native-select/namespace.d.ts +1 -1
- package/dist/types/components/native-table/namespace.d.ts +1 -1
- package/dist/types/components/notice/notice.style.d.ts +1 -1
- package/dist/types/components/pagination/namespace.d.ts +1 -1
- package/dist/types/components/pin-input/namespace.d.ts +1 -1
- package/dist/types/components/popover/namespace.d.ts +1 -1
- package/dist/types/components/qr-code/namespace.d.ts +1 -1
- package/dist/types/components/radio/namespace.d.ts +1 -1
- package/dist/types/components/radio/radio-group.d.ts +1 -1
- package/dist/types/components/radio-card/radio-card-group.d.ts +1 -1
- package/dist/types/components/radio-card/radio-card-group.namespace.d.ts +1 -1
- package/dist/types/components/radio-card/radio-card.namespace.d.ts +1 -1
- package/dist/types/components/reorder/namespace.d.ts +1 -1
- package/dist/types/components/resizable/namespace.d.ts +1 -1
- package/dist/types/components/ripple/ripple.style.d.ts +1 -1
- package/dist/types/components/saturation-slider/namespace.d.ts +1 -1
- package/dist/types/components/segmented-control/namespace.d.ts +1 -1
- package/dist/types/components/select/namespace.d.ts +1 -1
- package/dist/types/components/sidebar/namespace.d.ts +1 -1
- package/dist/types/components/sidebar/sidebar.d.ts +1 -1
- package/dist/types/components/slider/namespace.d.ts +1 -1
- package/dist/types/components/snacks/use-snacks.d.ts +1 -1
- package/dist/types/components/stat/namespace.d.ts +1 -1
- package/dist/types/components/steps/namespace.d.ts +1 -1
- package/dist/types/components/table/table.d.ts +1 -1
- package/dist/types/components/tabs/namespace.d.ts +1 -1
- package/dist/types/components/timeline/namespace.d.ts +1 -1
- package/dist/types/components/toggle/namespace.d.ts +1 -1
- package/dist/types/components/tree/namespace.d.ts +1 -1
- package/dist/types/core/css/styles.d.ts +136 -49
- package/dist/types/index.d.ts +31 -2
- package/dist/types/providers/i18n-provider/intl/en-US.d.ts +1 -1
- package/dist/types/providers/i18n-provider/intl/index.d.ts +1 -1
- package/package.json +8 -8
|
@@ -9,6 +9,6 @@ var namespace_exports = /* @__PURE__ */ __exportAll({
|
|
|
9
9
|
usePropsContext: () => useListPropsContext
|
|
10
10
|
});
|
|
11
11
|
//#endregion
|
|
12
|
-
export { namespace_exports };
|
|
12
|
+
export { ListItemIcon as Icon, ListItem as Item, ListPropsContext as PropsContext, ListRoot as Root, namespace_exports, useListPropsContext as usePropsContext };
|
|
13
13
|
|
|
14
14
|
//# sourceMappingURL=namespace.js.map
|
|
@@ -19,6 +19,6 @@ var namespace_exports = /* @__PURE__ */ __exportAll({
|
|
|
19
19
|
Suspense: () => Suspense
|
|
20
20
|
});
|
|
21
21
|
//#endregion
|
|
22
|
-
export { namespace_exports };
|
|
22
|
+
export { Audio, Circles, Dots, Grid, Oval, Puff, Rings, Suspense, namespace_exports };
|
|
23
23
|
|
|
24
24
|
//# sourceMappingURL=namespace.js.map
|
|
@@ -21,6 +21,6 @@ var namespace_exports = /* @__PURE__ */ __exportAll({
|
|
|
21
21
|
usePropsContext: () => useMenuPropsContext
|
|
22
22
|
});
|
|
23
23
|
//#endregion
|
|
24
|
-
export { namespace_exports };
|
|
24
|
+
export { MenuAnchor as Anchor, MenuCommand as Command, MenuContent as Content, MenuContextTrigger as ContextTrigger, MenuFooter as Footer, MenuGroup as Group, MenuHeader as Header, MenuIndicator as Indicator, MenuItem as Item, MenuLabel as Label, MenuOptionGroup as OptionGroup, MenuOptionItem as OptionItem, MenuPropsContext as PropsContext, MenuRoot as Root, MenuSeparator as Separator, MenuTrigger as Trigger, namespace_exports, useMenuPropsContext as usePropsContext };
|
|
25
25
|
|
|
26
26
|
//# sourceMappingURL=namespace.js.map
|
|
@@ -175,6 +175,6 @@ const ModalFooter = withContext("footer", "footer")(void 0, (props) => {
|
|
|
175
175
|
return { ...getFooterProps(props) };
|
|
176
176
|
});
|
|
177
177
|
//#endregion
|
|
178
|
-
export { ModalBody, ModalCloseButton, ModalCloseTrigger, ModalContent, ModalFooter, ModalHeader, ModalOpenTrigger, ModalOverlay, ModalPropsContext, ModalRoot, ModalTitle, useModalPropsContext };
|
|
178
|
+
export { ModalBody, ModalCloseButton, ModalCloseTrigger, ModalContent, ModalFooter, ModalHeader, ModalOpenTrigger, ModalOverlay, ModalPropsContext, ModalRoot, ModalTitle, ShorthandModalContent, useModalPropsContext };
|
|
179
179
|
|
|
180
180
|
//# sourceMappingURL=modal.js.map
|
|
@@ -16,6 +16,6 @@ var namespace_exports = /* @__PURE__ */ __exportAll({
|
|
|
16
16
|
usePropsContext: () => useModalPropsContext
|
|
17
17
|
});
|
|
18
18
|
//#endregion
|
|
19
|
-
export { namespace_exports };
|
|
19
|
+
export { ModalBody as Body, ModalCloseButton as CloseButton, ModalCloseTrigger as CloseTrigger, ModalContent as Content, ModalFooter as Footer, ModalHeader as Header, ModalOpenTrigger as OpenTrigger, ModalOverlay as Overlay, ModalPropsContext as PropsContext, ModalRoot as Root, ModalTitle as Title, namespace_exports, useModalPropsContext as usePropsContext };
|
|
20
20
|
|
|
21
21
|
//# sourceMappingURL=namespace.js.map
|
|
@@ -11,6 +11,6 @@ var namespace_exports = /* @__PURE__ */ __exportAll({
|
|
|
11
11
|
usePropsContext: () => useNativeAccordionPropsContext
|
|
12
12
|
});
|
|
13
13
|
//#endregion
|
|
14
|
-
export { namespace_exports };
|
|
14
|
+
export { NativeAccordionButton as Button, NativeAccordionIcon as Icon, NativeAccordionItem as Item, NativeAccordionPanel as Panel, NativeAccordionPropsContext as PropsContext, NativeAccordionRoot as Root, namespace_exports, useNativeAccordionPropsContext as usePropsContext };
|
|
15
15
|
|
|
16
16
|
//# sourceMappingURL=namespace.js.map
|
|
@@ -14,6 +14,6 @@ var namespace_exports = /* @__PURE__ */ __exportAll({
|
|
|
14
14
|
usePropsContext: () => useNativePopoverPropsContext
|
|
15
15
|
});
|
|
16
16
|
//#endregion
|
|
17
|
-
export { namespace_exports };
|
|
17
|
+
export { NativePopoverAnchor as Anchor, NativePopoverBody as Body, NativePopoverCloseTrigger as CloseTrigger, NativePopoverContent as Content, NativePopoverFooter as Footer, NativePopoverHeader as Header, NativePopoverPropsContext as PropsContext, NativePopoverRoot as Root, NativePopoverTrigger as Trigger, namespace_exports, useNativePopoverPropsContext as usePropsContext };
|
|
18
18
|
|
|
19
19
|
//# sourceMappingURL=namespace.js.map
|
|
@@ -10,6 +10,6 @@ var namespace_exports = /* @__PURE__ */ __exportAll({
|
|
|
10
10
|
usePropsContext: () => useNativeSelectPropsContext
|
|
11
11
|
});
|
|
12
12
|
//#endregion
|
|
13
|
-
export { namespace_exports };
|
|
13
|
+
export { NativeSelectGroup as Group, NativeSelectOption as Option, NativeSelectPropsContext as PropsContext, NativeSelectRoot as Root, NativeSelectSeparator as Separator, namespace_exports, useNativeSelectPropsContext as usePropsContext };
|
|
14
14
|
|
|
15
15
|
//# sourceMappingURL=namespace.js.map
|
|
@@ -16,6 +16,6 @@ var namespace_exports = /* @__PURE__ */ __exportAll({
|
|
|
16
16
|
usePropsContext: () => useNativeTablePropsContext
|
|
17
17
|
});
|
|
18
18
|
//#endregion
|
|
19
|
-
export { namespace_exports };
|
|
19
|
+
export { Caption, Col, Colgroup, NativeTablePropsContext as PropsContext, NativeTableRoot as Root, Tbody, Td, Tfoot, Th, Thead, Tr, namespace_exports, useNativeTablePropsContext as usePropsContext };
|
|
20
20
|
|
|
21
21
|
//# sourceMappingURL=namespace.js.map
|
|
@@ -90,6 +90,6 @@ const NoticeItem = withContext(({ id, variant = "plain", closable, closeStrategi
|
|
|
90
90
|
const NoticeContent = withContext("div", "content")();
|
|
91
91
|
const NoticeCloseButton = withContext(CloseButton, "closeButton")();
|
|
92
92
|
//#endregion
|
|
93
|
-
export { NoticeItem, NoticeRoot, PLACEMENT_MAP };
|
|
93
|
+
export { NoticeCloseButton, NoticeContent, NoticeItem, NoticeRoot, PLACEMENT_MAP };
|
|
94
94
|
|
|
95
95
|
//# sourceMappingURL=notice.js.map
|
|
@@ -14,6 +14,6 @@ var namespace_exports = /* @__PURE__ */ __exportAll({
|
|
|
14
14
|
usePropsContext: () => usePaginationPropsContext
|
|
15
15
|
});
|
|
16
16
|
//#endregion
|
|
17
|
-
export { namespace_exports };
|
|
17
|
+
export { PaginationEndTrigger as EndTrigger, PaginationItem as Item, PaginationItems as Items, PaginationNextTrigger as NextTrigger, PaginationPrevTrigger as PrevTrigger, PaginationPropsContext as PropsContext, PaginationRoot as Root, PaginationStartTrigger as StartTrigger, PaginationText as Text, namespace_exports, usePaginationPropsContext as usePropsContext };
|
|
18
18
|
|
|
19
19
|
//# sourceMappingURL=namespace.js.map
|
|
@@ -12,6 +12,6 @@ var namespace_exports = /* @__PURE__ */ __exportAll({
|
|
|
12
12
|
usePropsContext: () => usePinInputPropsContext
|
|
13
13
|
});
|
|
14
14
|
//#endregion
|
|
15
|
-
export { namespace_exports };
|
|
15
|
+
export { PinInputDescendantsContext as DescendantsContext, PinInputField as Field, PinInputPropsContext as PropsContext, PinInputRoot as Root, namespace_exports, usePinInputDescendant as useDescendant, usePinInputDescendants as useDescendants, usePinInputPropsContext as usePropsContext };
|
|
16
16
|
|
|
17
17
|
//# sourceMappingURL=namespace.js.map
|
|
@@ -14,6 +14,6 @@ var namespace_exports = /* @__PURE__ */ __exportAll({
|
|
|
14
14
|
usePropsContext: () => usePopoverPropsContext
|
|
15
15
|
});
|
|
16
16
|
//#endregion
|
|
17
|
-
export { namespace_exports };
|
|
17
|
+
export { PopoverAnchor as Anchor, PopoverBody as Body, PopoverCloseTrigger as CloseTrigger, PopoverContent as Content, PopoverFooter as Footer, PopoverHeader as Header, PopoverPropsContext as PropsContext, PopoverRoot as Root, PopoverTrigger as Trigger, namespace_exports, usePopoverPropsContext as usePropsContext };
|
|
18
18
|
|
|
19
19
|
//# sourceMappingURL=namespace.js.map
|
|
@@ -10,6 +10,6 @@ var namespace_exports = /* @__PURE__ */ __exportAll({
|
|
|
10
10
|
usePropsContext: () => useQrCodePropsContext
|
|
11
11
|
});
|
|
12
12
|
//#endregion
|
|
13
|
-
export { namespace_exports };
|
|
13
|
+
export { QrCodeFrame as Frame, QrCodeOverlay as Overlay, QrCodePattern as Pattern, QrCodePropsContext as PropsContext, QrCodeRoot as Root, namespace_exports, useQrCodePropsContext as usePropsContext };
|
|
14
14
|
|
|
15
15
|
//# sourceMappingURL=namespace.js.map
|
|
@@ -9,6 +9,6 @@ var namespace_exports = /* @__PURE__ */ __exportAll({
|
|
|
9
9
|
usePropsContext: () => useRadioPropsContext
|
|
10
10
|
});
|
|
11
11
|
//#endregion
|
|
12
|
-
export { namespace_exports };
|
|
12
|
+
export { Radio as Item, RadioPropsContext as PropsContext, RadioGroupRoot as Root, namespace_exports, useRadioPropsContext as usePropsContext };
|
|
13
13
|
|
|
14
14
|
//# sourceMappingURL=namespace.js.map
|
|
@@ -7,6 +7,6 @@ var radio_card_group_namespace_exports = /* @__PURE__ */ __exportAll({
|
|
|
7
7
|
Root: () => RadioCardGroupRoot
|
|
8
8
|
});
|
|
9
9
|
//#endregion
|
|
10
|
-
export { radio_card_group_namespace_exports };
|
|
10
|
+
export { radio_card_namespace_exports as Item, RadioCardGroupRoot as Root, radio_card_group_namespace_exports };
|
|
11
11
|
|
|
12
12
|
//# sourceMappingURL=radio-card-group.namespace.js.map
|
|
@@ -10,6 +10,6 @@ var radio_card_namespace_exports = /* @__PURE__ */ __exportAll({
|
|
|
10
10
|
usePropsContext: () => useRadioCardPropsContext
|
|
11
11
|
});
|
|
12
12
|
//#endregion
|
|
13
|
-
export { radio_card_namespace_exports };
|
|
13
|
+
export { RadioCardAddon as Addon, RadioCardDescription as Description, RadioCardLabel as Label, RadioCardPropsContext as PropsContext, RadioCardRoot as Root, radio_card_namespace_exports, useRadioCardPropsContext as usePropsContext };
|
|
14
14
|
|
|
15
15
|
//# sourceMappingURL=radio-card.namespace.js.map
|
|
@@ -14,6 +14,6 @@ var namespace_exports = /* @__PURE__ */ __exportAll({
|
|
|
14
14
|
usePropsContext: () => useReorderPropsContext
|
|
15
15
|
});
|
|
16
16
|
//#endregion
|
|
17
|
-
export { namespace_exports };
|
|
17
|
+
export { ReorderContext as Context, ReorderItem as Item, ReorderItemContext as ItemContext, ReorderPropsContext as PropsContext, ReorderRoot as Root, ReorderTrigger as Trigger, namespace_exports, useReorderContext as useContext, useReorderItemContext as useItemContext, useReorderPropsContext as usePropsContext };
|
|
18
18
|
|
|
19
19
|
//# sourceMappingURL=namespace.js.map
|
|
@@ -13,6 +13,6 @@ var namespace_exports = /* @__PURE__ */ __exportAll({
|
|
|
13
13
|
usePropsContext: () => useResizablePropsContext
|
|
14
14
|
});
|
|
15
15
|
//#endregion
|
|
16
|
-
export { namespace_exports };
|
|
16
|
+
export { ResizableContext as Context, ResizableItem as Item, ResizablePropsContext as PropsContext, ResizableRoot as Root, ResizableTrigger as Trigger, namespace_exports, useResizableContext as useContext, useResizableLayout as useLayout, useResizablePropsContext as usePropsContext };
|
|
17
17
|
|
|
18
18
|
//# sourceMappingURL=namespace.js.map
|
|
@@ -9,6 +9,6 @@ var namespace_exports = /* @__PURE__ */ __exportAll({
|
|
|
9
9
|
usePropsContext: () => useSaturationSliderPropsContext
|
|
10
10
|
});
|
|
11
11
|
//#endregion
|
|
12
|
-
export { namespace_exports };
|
|
12
|
+
export { SaturationSliderPropsContext as PropsContext, SaturationSliderRoot as Root, SaturationSliderThumb as Thumb, SaturationSliderTrack as Track, namespace_exports, useSaturationSliderPropsContext as usePropsContext };
|
|
13
13
|
|
|
14
14
|
//# sourceMappingURL=namespace.js.map
|
|
@@ -14,6 +14,6 @@ var namespace_exports = /* @__PURE__ */ __exportAll({
|
|
|
14
14
|
usePropsContext: () => useSegmentedControlPropsContext
|
|
15
15
|
});
|
|
16
16
|
//#endregion
|
|
17
|
-
export { namespace_exports };
|
|
17
|
+
export { SegmentedControlContext as Context, SegmentedControlDescendantsContext as DescendantsContext, SegmentedControlItem as Item, SegmentedControlPropsContext as PropsContext, SegmentedControlRoot as Root, namespace_exports, useSegmentedControlContext as useContext, useSegmentedControlDescendant as useDescendant, useSegmentedControlDescendants as useDescendants, useSegmentedControlPropsContext as usePropsContext };
|
|
18
18
|
|
|
19
19
|
//# sourceMappingURL=namespace.js.map
|
|
@@ -11,6 +11,6 @@ var namespace_exports = /* @__PURE__ */ __exportAll({
|
|
|
11
11
|
usePropsContext: () => useSelectPropsContext
|
|
12
12
|
});
|
|
13
13
|
//#endregion
|
|
14
|
-
export { namespace_exports };
|
|
14
|
+
export { SelectGroup as Group, SelectLabel as Label, SelectOption as Option, SelectPropsContext as PropsContext, SelectRoot as Root, SelectSeparator as Separator, namespace_exports, useSelectPropsContext as usePropsContext };
|
|
15
15
|
|
|
16
16
|
//# sourceMappingURL=namespace.js.map
|
|
@@ -35,6 +35,6 @@ var namespace_exports = /* @__PURE__ */ __exportAll({
|
|
|
35
35
|
usePropsContext: () => useSidebarPropsContext
|
|
36
36
|
});
|
|
37
37
|
//#endregion
|
|
38
|
-
export { namespace_exports };
|
|
38
|
+
export { SidebarContent as Content, SidebarContext as Context, SidebarDescendantsContext as DescendantsContext, SidebarFooter as Footer, SidebarGroup as Group, SidebarGroupContent as GroupContent, SidebarGroupLabel as GroupLabel, SidebarHandle as Handle, SidebarHeader as Header, SidebarItem as Item, SidebarItemContent as ItemContent, SidebarItemContext as ItemContext, SidebarItemEndElement as ItemEndElement, SidebarItemIndicator as ItemIndicator, SidebarItemLabel as ItemLabel, SidebarItemLink as ItemLink, SidebarItemStartElement as ItemStartElement, SidebarItemTrigger as ItemTrigger, SidebarMainPanel as MainPanel, SidebarMenu as Menu, SidebarMenuButton as MenuButton, SidebarPropsContext as PropsContext, SidebarRoot as Root, SidebarSidePanel as SidePanel, SidebarTrigger as Trigger, namespace_exports, useSidebarContext as useContext, useSidebarDescendant as useDescendant, useSidebarDescendants as useDescendants, useSidebarItemContext as useItemContext, useSidebarPropsContext as usePropsContext };
|
|
39
39
|
|
|
40
40
|
//# sourceMappingURL=namespace.js.map
|
|
@@ -13,6 +13,6 @@ var namespace_exports = /* @__PURE__ */ __exportAll({
|
|
|
13
13
|
usePropsContext: () => useSliderPropsContext
|
|
14
14
|
});
|
|
15
15
|
//#endregion
|
|
16
|
-
export { namespace_exports };
|
|
16
|
+
export { SliderMark as Mark, SliderMarks as Marks, SliderPropsContext as PropsContext, SliderRange as Range, SliderRoot as Root, SliderThumb as Thumb, SliderThumbs as Thumbs, SliderTrack as Track, namespace_exports, useSliderPropsContext as usePropsContext };
|
|
17
17
|
|
|
18
18
|
//# sourceMappingURL=namespace.js.map
|
|
@@ -12,6 +12,6 @@ var namespace_exports = /* @__PURE__ */ __exportAll({
|
|
|
12
12
|
usePropsContext: () => useStatPropsContext
|
|
13
13
|
});
|
|
14
14
|
//#endregion
|
|
15
|
-
export { namespace_exports };
|
|
15
|
+
export { StatHelperMessage as HelperMessage, StatIcon as Icon, StatLabel as Label, StatPropsContext as PropsContext, StatRoot as Root, StatUnit as Unit, StatValue as Value, namespace_exports, useStatPropsContext as usePropsContext };
|
|
16
16
|
|
|
17
17
|
//# sourceMappingURL=namespace.js.map
|
|
@@ -26,6 +26,6 @@ var namespace_exports = /* @__PURE__ */ __exportAll({
|
|
|
26
26
|
usePropsContext: () => useStepsPropsContext
|
|
27
27
|
});
|
|
28
28
|
//#endregion
|
|
29
|
-
export { namespace_exports };
|
|
29
|
+
export { StepsCompletedContent as CompletedContent, StepsContent as Content, StepsContents as Contents, StepsContext as Context, StepsDescendantsContext as DescendantsContext, StepsDescription as Description, StepsIndicator as Indicator, StepsItem as Item, StepsList as List, StepsNextTrigger as NextTrigger, StepsNumber as Number, StepsPrevTrigger as PrevTrigger, StepsPropsContext as PropsContext, StepsRoot as Root, StepsSeparator as Separator, StepsTitle as Title, namespace_exports, useStepsContext as useContext, useStepsDescendant as useDescendant, useStepsDescendants as useDescendants, useStepsItemContext as useItemContext, useStepsPropsContext as usePropsContext };
|
|
30
30
|
|
|
31
31
|
//# sourceMappingURL=namespace.js.map
|
|
@@ -20,6 +20,6 @@ var namespace_exports = /* @__PURE__ */ __exportAll({
|
|
|
20
20
|
usePropsContext: () => useTabsPropsContext
|
|
21
21
|
});
|
|
22
22
|
//#endregion
|
|
23
|
-
export { namespace_exports };
|
|
23
|
+
export { TabsContext as Context, TabDescendantsContext as DescendantsContext, TabsList as List, TabsPanel as Panel, TabPanelDescendantsContext as PanelDescendantsContext, TabsPanels as Panels, TabsPropsContext as PropsContext, TabsRoot as Root, TabsTab as Tab, namespace_exports, useTabsContext as useContext, useTabDescendant as useDescendant, useTabDescendants as useDescendants, useTabPanelDescendant as usePanelDescendant, useTabPanelDescendants as usePanelDescendants, useTabsPropsContext as usePropsContext };
|
|
24
24
|
|
|
25
25
|
//# sourceMappingURL=namespace.js.map
|
|
@@ -13,6 +13,6 @@ var namespace_exports = /* @__PURE__ */ __exportAll({
|
|
|
13
13
|
usePropsContext: () => useTimelinePropsContext
|
|
14
14
|
});
|
|
15
15
|
//#endregion
|
|
16
|
-
export { namespace_exports };
|
|
16
|
+
export { TimelineConnector as Connector, TimelineContent as Content, TimelineDescription as Description, TimelineIndicator as Indicator, TimelineItem as Item, TimelinePropsContext as PropsContext, TimelineRoot as Root, TimelineTitle as Title, namespace_exports, useTimelinePropsContext as usePropsContext };
|
|
17
17
|
|
|
18
18
|
//# sourceMappingURL=namespace.js.map
|
|
@@ -9,6 +9,6 @@ var namespace_exports = /* @__PURE__ */ __exportAll({
|
|
|
9
9
|
usePropsContext: () => useTogglePropsContext
|
|
10
10
|
});
|
|
11
11
|
//#endregion
|
|
12
|
-
export { namespace_exports };
|
|
12
|
+
export { Toggle as Item, TogglePropsContext as PropsContext, ToggleGroupRoot as Root, namespace_exports, useTogglePropsContext as usePropsContext };
|
|
13
13
|
|
|
14
14
|
//# sourceMappingURL=namespace.js.map
|
|
@@ -15,6 +15,6 @@ var namespace_exports = /* @__PURE__ */ __exportAll({
|
|
|
15
15
|
usePropsContext: () => useTreePropsContext
|
|
16
16
|
});
|
|
17
17
|
//#endregion
|
|
18
|
-
export { namespace_exports };
|
|
18
|
+
export { TreeContext as Context, TreeDescendantsContext as DescendantsContext, TreeItem as Item, TreePropsContext as PropsContext, TreeRoot as Root, namespace_exports, useTreeContext as useContext, useTreeDescendant as useDescendant, useTreeDescendants as useDescendants, useTreeItemContext as useItemContext, useTreePropsContext as usePropsContext };
|
|
19
19
|
|
|
20
20
|
//# sourceMappingURL=namespace.js.map
|
|
@@ -378,7 +378,7 @@ const useTreeItem = ({ asyncChildren, children: childrenProp, defaultOpen, disab
|
|
|
378
378
|
if (!ev.target.checked) parentTarget.push(...parentValues);
|
|
379
379
|
target.push(...parentTarget);
|
|
380
380
|
}
|
|
381
|
-
if (ev.target.checked) return [
|
|
381
|
+
if (ev.target.checked) return [.../* @__PURE__ */ new Set([...prev, ...target])];
|
|
382
382
|
else return prev.filter((prevValue) => !target.includes(prevValue));
|
|
383
383
|
});
|
|
384
384
|
}, [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-tree.js","names":["createContext"],"sources":["../../../../src/components/tree/use-tree.ts"],"sourcesContent":["\"use client\"\n\nimport type {\n ChangeEvent,\n KeyboardEvent,\n MouseEvent,\n ReactNode,\n RefObject,\n SetStateAction,\n} from \"react\"\nimport type { HTMLProps, PropGetter } from \"../../core\"\nimport type { Descendant, Descendants } from \"../../hooks/use-descendants\"\nimport type { UseDisclosureProps } from \"../../hooks/use-disclosure\"\nimport type { UseCheckboxProps } from \"../checkbox\"\nimport { Children, useCallback, useRef, useState } from \"react\"\nimport { mergeProps } from \"../../core\"\nimport { useAsyncCallback } from \"../../hooks/use-async-callback\"\nimport { useControllableState } from \"../../hooks/use-controllable-state\"\nimport { createDescendants } from \"../../hooks/use-descendants\"\nimport { useDisclosure } from \"../../hooks/use-disclosure\"\nimport {\n ariaAttr,\n assignRef,\n createContext,\n cx,\n dataAttr,\n filterEmpty,\n handlerAll,\n isArray,\n isInputElement,\n isUndefined,\n match,\n mergeRefs,\n runKeyAction,\n setAttribute,\n useIds,\n useSafeLayoutEffect,\n} from \"../../utils\"\n\nexport interface TreeControl {\n collapse: () => void\n expand: () => void\n}\n\ninterface TreeDescendantProps {\n expanded: boolean\n group: boolean\n id: string\n value: string\n query?: string\n}\n\nconst {\n DescendantsContext: TreeDescendantsContext,\n useDescendant: useTreeDescendant,\n useDescendants: useTreeDescendants,\n} = createDescendants<HTMLElement, TreeDescendantProps>()\n\nexport { TreeDescendantsContext, useTreeDescendant, useTreeDescendants }\n\ninterface TreeContext extends Omit<\n UseTreeReturn,\n \"descendants\" | \"getRootProps\"\n> {}\n\nconst [TreeContext, useTreeContext] = createContext<TreeContext>({\n name: \"TreeContext\",\n})\n\nexport { TreeContext, useTreeContext }\n\ninterface TreeItemContext extends Pick<\n UseTreeItemReturn,\n | \"branchOpen\"\n | \"groupOpen\"\n | \"level\"\n | \"onGroupClose\"\n | \"onGroupOpen\"\n | \"onGroupToggle\"\n | \"value\"\n> {}\n\nconst [TreeItemContext, useTreeItemContext] = createContext<TreeItemContext>({\n name: \"TreeItemContext\",\n strict: false,\n})\n\nexport { TreeItemContext, useTreeItemContext }\n\nexport interface UseTreeProps<\n Multiple extends boolean = false,\n> extends HTMLProps<\"ul\"> {\n /**\n * If `true`, the tree will allow checkable items.\n *\n * @default false\n */\n checkable?: boolean\n /**\n * The checked value of the tree.\n */\n checkedValue?: string[]\n /**\n * Ref of the tree callbacks.\n */\n controlRef?: RefObject<null | TreeControl>\n /**\n * The initial checked value of the tree.\n */\n defaultCheckedValue?: string[]\n /**\n * The initial expanded value of the tree.\n */\n defaultExpandedValue?: string[]\n /**\n * The initial selected value of the tree.\n */\n defaultSelectedValue?: Multiple extends true ? string[] : string\n /**\n * The expanded value of the tree.\n */\n expandedValue?: string[]\n /**\n * If `true`, the tree will allow multiple selection.\n *\n * @default false\n */\n multiple?: Multiple\n /**\n * The selected value of the tree.\n */\n selectedValue?: Multiple extends true ? string[] : string\n /**\n * The callback invoked when checked value changes.\n */\n onCheckedChange?: (value: string[]) => void\n /**\n * The callback invoked when expanded value changes.\n */\n onExpandedChange?: (value: string[]) => void\n /**\n * The callback invoked when selected value changes.\n */\n onSelectedChange?: (value: Multiple extends true ? string[] : string) => void\n}\n\nexport const useTree = <Multiple extends boolean = false>({\n checkable = false,\n checkedValue: checkedValueProp,\n children,\n controlRef,\n defaultCheckedValue = [],\n defaultExpandedValue = [],\n defaultSelectedValue,\n expandedValue: expandedValueProp,\n multiple,\n selectedValue: selectedValueProp,\n onCheckedChange: onCheckedChangeProp,\n onExpandedChange: onExpandedChangeProp,\n onSelectedChange: onSelectedChangeProp,\n ...rest\n}: UseTreeProps<Multiple> = {}) => {\n type MaybeSelectedValue = Multiple extends true ? string[] : string\n\n const [selectedValue, setSelectedValue] = useControllableState({\n defaultValue:\n defaultSelectedValue ?? ((multiple ? [] : \"\") as MaybeSelectedValue),\n value: selectedValueProp,\n onChange: onSelectedChangeProp,\n })\n const [checkedValue, onCheckedChange] = useControllableState({\n defaultValue: defaultCheckedValue,\n value: checkedValueProp,\n onChange: onCheckedChangeProp,\n })\n const [expandedValue, setExpandedValue] = useControllableState({\n defaultValue: defaultExpandedValue,\n value: expandedValueProp,\n onChange: onExpandedChangeProp,\n })\n const descendants = useTreeDescendants()\n const activeDescendant = useRef<Descendant<\n HTMLElement,\n TreeDescendantProps\n > | null>(null)\n const searchRef = useRef<{ value: string; omitValue?: string }>({\n omitValue: undefined,\n value: \"\",\n })\n const timeoutRef = useRef<any>(null)\n\n const onExpandAll = useCallback(() => {\n const values = descendants.enabledValues()\n const group = values.filter(({ group }) => group)\n const value = group.map(({ value }) => value)\n\n setExpandedValue(value)\n }, [descendants, setExpandedValue])\n\n const onCollapseAll = useCallback(() => {\n setExpandedValue([])\n }, [setExpandedValue])\n\n const onActiveDescendant = useCallback(\n (\n descendant?: Descendant<HTMLElement, TreeDescendantProps>,\n shouldFocus = true,\n ) => {\n if (!descendant) return\n\n descendants.values().forEach(({ node }) => {\n node.tabIndex = -1\n })\n\n activeDescendant.current = descendant\n descendant.node.tabIndex = 0\n\n if (shouldFocus) descendant.node.focus()\n },\n [descendants],\n )\n\n const onSearch = useCallback(\n (value: string, omitValue: string) => {\n clearTimeout(timeoutRef.current)\n\n searchRef.current.value += value\n\n if (!searchRef.current.omitValue) searchRef.current.omitValue = omitValue\n\n timeoutRef.current = setTimeout(() => {\n searchRef.current = { omitValue: undefined, value: \"\" }\n }, 400)\n\n const values = descendants\n .enabledValues({ expanded: true })\n .filter(\n (descendant) =>\n !isUndefined(descendant.value) &&\n descendant.value !== searchRef.current.omitValue,\n )\n const descendant = values.find(({ query, value }) =>\n match(query ?? value, searchRef.current.value, \"startsWith\"),\n )\n\n if (descendant) onActiveDescendant(descendant)\n },\n [descendants, onActiveDescendant],\n )\n\n const onSelectedChange = useCallback(\n (value: SetStateAction<string | string[]>) => {\n setSelectedValue(value as SetStateAction<MaybeSelectedValue>)\n },\n [setSelectedValue],\n )\n\n const onExpandedChange = useCallback(\n (value: string) => {\n setExpandedValue((prev) => {\n if (prev.includes(value))\n return prev.filter((prevValue) => prevValue !== value)\n else return [...prev, value]\n })\n },\n [setExpandedValue],\n )\n\n useSafeLayoutEffect(() => {\n const value = isArray(selectedValue) ? selectedValue.at(0) : selectedValue\n const expandedDescendants = descendants.enabledValues({ expanded: true })\n\n if (value) {\n const descendant = expandedDescendants.find(\n (descendant) => value === descendant.value,\n )\n\n if (descendant) onActiveDescendant(descendant, false)\n else onActiveDescendant(expandedDescendants.at(0), false)\n } else {\n onActiveDescendant(expandedDescendants.at(0), false)\n }\n }, [children])\n\n assignRef(controlRef, { collapse: onCollapseAll, expand: onExpandAll })\n\n const getRootProps: PropGetter<\"ul\"> = useCallback(\n (props) =>\n mergeProps(\n {\n \"aria-multiselectable\": ariaAttr(multiple || checkable),\n children,\n role: \"tree\",\n },\n rest,\n props,\n )(),\n [multiple, checkable, rest, children],\n )\n\n return {\n activeDescendant,\n checkable,\n checkedValue,\n descendants,\n expandedValue,\n multiple,\n selectedValue,\n getRootProps,\n onActiveDescendant,\n onCheckedChange,\n onCollapseAll,\n onExpandAll,\n onExpandedChange,\n onSearch,\n onSelectedChange,\n }\n}\n\nexport type UseTreeReturn = ReturnType<typeof useTree>\n\nconst getRootDescendant =\n (descendants: Descendants<HTMLElement, TreeDescendantProps>) =>\n (value: string) => {\n const segments = value.split(\"/\")\n\n if (segments.length <= 1) return\n\n const rootValue = segments.at(0)\n\n return descendants.enabledValues().find(({ value }) => value === rootValue)\n }\n\nconst getParentDescendant =\n (descendants: Descendants<HTMLElement, TreeDescendantProps>) =>\n (value: string) => {\n const segments = value.split(\"/\")\n\n if (segments.length <= 1) return\n\n const parentValue = segments.slice(0, -1).join(\"/\")\n\n return descendants\n .enabledValues()\n .find(({ value }) => value === parentValue)\n }\n\nconst getChildDescendants =\n (descendants: Descendants<HTMLElement, TreeDescendantProps>) =>\n (value: string) => {\n const children = descendants\n .enabledValues()\n .filter((descendant) => descendant.value.startsWith(value + \"/\"))\n const values = children\n .map(({ value }) => value)\n .filter((value) => !isUndefined(value))\n\n return { children, values }\n }\n\nconst getParentValues = (value: string) => {\n const segments = value.split(\"/\")\n\n return segments\n .reduce<string[]>((prev, current) => {\n const prevValue = prev.at(-1)\n return prevValue ? [...prev, [prevValue, current].join(\"/\")] : [current]\n }, [])\n .toReversed()\n}\n\nconst getCheckbox = (node?: HTMLElement) => {\n const el = node?.querySelector(\"input[type='checkbox']\")\n\n return isInputElement(el) ? el : null\n}\n\nconst getAllChecked = (\n descendants: Descendant<HTMLElement, TreeDescendantProps>[],\n trulyValues?: string[],\n falsyValues?: string[],\n) => {\n const checked = descendants.map(({ node, value }) => {\n if (value && trulyValues?.includes(value)) return true\n if (value && falsyValues?.includes(value)) return false\n\n const checkbox = getCheckbox(node)\n\n return !!checkbox?.checked\n })\n\n const allChecked = !!checked.length && checked.every(Boolean)\n const indeterminate = checked.some(Boolean) && !allChecked\n\n return { allChecked, checked, indeterminate }\n}\n\nconst getRangeValues =\n (descendants: Descendants<HTMLElement, TreeDescendantProps>) =>\n (start: string, end: string) => {\n const values = descendants.enabledValues()\n const [startIndex, endIndex] = [\n values.findIndex((descendant) => descendant.value === start),\n values.findIndex((descendant) => descendant.value === end),\n ].sort((a, b) => a - b)\n\n return values\n .slice(startIndex, endIndex! + 1)\n .map(({ value }) => value)\n .filter((value) => !isUndefined(value))\n .sort((a, b) => {\n if (a === start && b !== start) return -1\n if (a !== start && b === start) return 1\n\n return 0\n })\n }\n\nexport interface UseTreeItemProps\n extends HTMLProps<\"div\">, Omit<UseDisclosureProps, \"timing\"> {\n /**\n * If `true`, the tree item will be disabled.\n *\n * @default false\n */\n disabled?: boolean\n /**\n * The query to search for in the tree item.\n */\n query?: string\n /**\n * The value of the item.\n */\n value?: string\n /**\n * If provided, the tree item will be rendered as an async tree item.\n */\n asyncChildren?: () => Promise<ReactNode>\n}\n\nexport const useTreeItem = ({\n asyncChildren,\n children: childrenProp,\n defaultOpen,\n disabled = false,\n open: openProp,\n query,\n value: valueProp,\n onClose: onCloseProp,\n onOpen: onOpenProp,\n ...rest\n}: UseTreeItemProps = {}) => {\n const context = useTreeItemContext()\n const {\n activeDescendant,\n checkable,\n checkedValue,\n expandedValue,\n multiple,\n selectedValue,\n onActiveDescendant,\n onCheckedChange,\n onCollapseAll,\n onExpandAll,\n onExpandedChange,\n onSearch,\n onSelectedChange,\n } = useTreeContext()\n const [children, setChildren] = useState<ReactNode>(childrenProp)\n const [indeterminate, setIndeterminate] = useState(false)\n const [itemId, labelId, checkboxId] = useIds()\n const initialAsyncRef = useRef(false)\n const async = !!asyncChildren\n const group = async || Children.count(children) > 0\n const level: number = (context?.level ?? 0) + 1\n const value: string = filterEmpty([context?.value, valueProp]).join(\"/\")\n const nested = !!context?.value\n const selected = isArray(selectedValue)\n ? !!value && selectedValue.includes(value)\n : !!value && selectedValue === value\n const checked = !!value && checkedValue.includes(value)\n const defaultExpanded = !!value && expandedValue.includes(value)\n const {\n open: groupOpen,\n onClose,\n onOpen,\n } = useDisclosure({\n defaultOpen: defaultOpen ?? defaultExpanded,\n open: openProp,\n onClose: onCloseProp,\n onOpen: onOpenProp,\n })\n const branchOpen: boolean[] = nested\n ? [...context.branchOpen, groupOpen]\n : [groupOpen]\n const { descendants, register } = useTreeDescendant({\n id: itemId!,\n disabled,\n expanded: branchOpen.slice(0, -1).every(Boolean),\n group,\n query,\n value,\n })\n\n const [groupLoading, onGroupChildren] = useAsyncCallback(async () => {\n const children = await asyncChildren?.()\n\n setChildren(children)\n }, [asyncChildren])\n\n const onSelect = useCallback(\n (\n ev: (\n | Partial<KeyboardEvent<HTMLElement>>\n | Partial<MouseEvent<HTMLElement>>\n ) & { value?: string } = {},\n ) => {\n const selectedValue = ev.value ?? value\n\n if (disabled || !selectedValue) return\n\n if (multiple)\n onSelectedChange((prev) => {\n if (!isArray(prev)) return prev\n\n if (ev.ctrlKey || ev.metaKey) {\n if (prev.includes(selectedValue))\n return prev.filter((prevValue) => prevValue !== selectedValue)\n else return [...prev, selectedValue]\n } else if (ev.shiftKey && prev[0]) {\n if (prev[0] === selectedValue) return prev\n\n return getRangeValues(descendants)(prev[0], selectedValue)\n } else {\n return [selectedValue]\n }\n })\n else onSelectedChange(selectedValue)\n },\n [descendants, disabled, multiple, onSelectedChange, value],\n )\n\n const onGroupOpen = useCallback(() => {\n if (disabled || !value) return\n\n if (async && !initialAsyncRef.current) {\n initialAsyncRef.current = true\n\n onGroupChildren()\n .then(() => {\n onOpen()\n onExpandedChange(value)\n })\n .catch(() => {\n initialAsyncRef.current = false\n })\n } else {\n onOpen()\n onExpandedChange(value)\n }\n }, [disabled, async, onGroupChildren, onOpen, onExpandedChange, value])\n\n const onGroupClose = useCallback(() => {\n if (disabled || !value) return\n\n onClose()\n onExpandedChange(value)\n }, [disabled, onClose, onExpandedChange, value])\n\n const onGroupToggle = useCallback(() => {\n if (groupOpen) onGroupClose()\n else onGroupOpen()\n }, [groupOpen, onGroupClose, onGroupOpen])\n\n const onKeyDown = useCallback(\n (ev: KeyboardEvent<HTMLElement>) => {\n if (disabled || !value) return\n\n runKeyAction(ev, {\n a: () => {\n if (!multiple || !(ev.ctrlKey || ev.metaKey)) return\n\n const values = descendants\n .enabledValues()\n .map(({ value }) => value)\n .filter((value) => !isUndefined(value))\n\n onSelectedChange(values)\n },\n ArrowDown: () => {\n if ((ev.ctrlKey || ev.metaKey) && ev.shiftKey) {\n onExpandAll()\n } else {\n const descendant = descendants.enabledNextValue(\n activeDescendant.current,\n false,\n { expanded: true },\n )\n\n onActiveDescendant(descendant)\n\n if (descendant && ev.shiftKey && multiple)\n onSelect({ ctrlKey: true, value: descendant.value })\n }\n },\n ArrowLeft: () => {\n if (group && groupOpen) {\n onGroupClose()\n } else if (nested) {\n const descendant = getParentDescendant(descendants)(value)\n\n onActiveDescendant(descendant)\n }\n },\n ArrowRight: () => {\n if (!group) return\n\n if (groupOpen) {\n const descendant = descendants.enabledNextValue(\n activeDescendant.current,\n false,\n { expanded: true },\n )\n\n onActiveDescendant(descendant)\n } else {\n if (!groupLoading) onGroupOpen()\n }\n },\n ArrowUp: () => {\n if ((ev.ctrlKey || ev.metaKey) && ev.shiftKey) {\n onCollapseAll()\n\n if (!nested) return\n\n const descendant = getRootDescendant(descendants)(value)\n\n onActiveDescendant(descendant)\n } else {\n const descendant = descendants.enabledPrevValue(\n activeDescendant.current,\n false,\n { expanded: true },\n )\n\n onActiveDescendant(descendant)\n\n if (descendant && ev.shiftKey && multiple)\n onSelect({ ctrlKey: true, value: descendant.value })\n }\n },\n End: () => {\n const descendant = descendants\n .enabledValues({ expanded: true })\n .at(-1)\n\n onActiveDescendant(descendant)\n },\n Enter: () => {\n if (group) onGroupToggle()\n\n onSelect(ev)\n },\n Home: () => {\n const descendant = descendants.enabledValues({ expanded: true }).at(0)\n\n onActiveDescendant(descendant)\n },\n Space: () => {\n if (group) onGroupToggle()\n\n onSelect(ev)\n },\n })\n\n if (ev.key.length !== 1) return\n if (ev.ctrlKey || ev.metaKey || ev.altKey) return\n\n ev.preventDefault()\n\n onSearch(ev.key, query ?? value)\n },\n [\n activeDescendant,\n descendants,\n disabled,\n group,\n groupLoading,\n groupOpen,\n multiple,\n nested,\n onActiveDescendant,\n onCollapseAll,\n onExpandAll,\n onGroupClose,\n onGroupOpen,\n onGroupToggle,\n onSearch,\n onSelect,\n onSelectedChange,\n query,\n value,\n ],\n )\n\n const onItemClick = useCallback(\n (ev: MouseEvent<HTMLLIElement>) => {\n ev.stopPropagation()\n\n if (disabled || !value) return\n\n if (group && !groupLoading)\n if (!ev.ctrlKey && !ev.metaKey && !ev.shiftKey) onGroupToggle()\n\n onSelect(ev)\n },\n [disabled, group, groupLoading, onGroupToggle, onSelect, value],\n )\n\n const onCheckboxChange = useCallback(\n (ev: ChangeEvent<HTMLInputElement>) => {\n if (disabled || !value) return\n\n ev.stopPropagation()\n\n if (group) setIndeterminate(false)\n\n onCheckedChange((prev) => {\n const target = [value]\n\n if (group) {\n const { values } = getChildDescendants(descendants)(value)\n\n target.push(...values)\n }\n\n if (nested) {\n const parentValues = getParentValues(context.value)\n const parentTarget: string[] = []\n\n parentValues.forEach((parentValue) => {\n const { children } = getChildDescendants(descendants)(parentValue)\n const { allChecked } = getAllChecked(\n children,\n [...parentTarget, ...(ev.target.checked ? target : [])],\n !ev.target.checked ? target : [],\n )\n\n if (allChecked) parentTarget.push(parentValue)\n })\n\n if (!ev.target.checked) parentTarget.push(...parentValues)\n\n target.push(...parentTarget)\n }\n\n if (ev.target.checked) return [...new Set([...prev, ...target])]\n else return prev.filter((prevValue) => !target.includes(prevValue))\n })\n },\n [disabled, group, onCheckedChange, value, nested, descendants, context],\n )\n\n useSafeLayoutEffect(() => {\n if (defaultExpanded)\n if (async && !initialAsyncRef.current) {\n initialAsyncRef.current = true\n\n onGroupChildren()\n .then(() => {\n onOpen()\n })\n .catch(() => {\n initialAsyncRef.current = false\n })\n } else {\n onOpen()\n }\n else onClose()\n }, [async, defaultExpanded, onClose, onGroupChildren, onOpen])\n\n useSafeLayoutEffect(() => {\n if (!group || !checkable) return\n\n const { children } = getChildDescendants(descendants)(value)\n const { indeterminate } = getAllChecked(children)\n\n setIndeterminate(indeterminate)\n }, [checkedValue])\n\n useSafeLayoutEffect(() => {\n if (!checkable) return\n\n const { node } = getParentDescendant(descendants)(value) ?? {}\n const checkbox = getCheckbox(node)\n\n if (!checkbox) return\n\n const cleanup = setAttribute(checkbox, \"aria-controls\", checkboxId)\n\n return cleanup\n }, [checkable, descendants])\n\n const getItemProps: PropGetter<\"li\"> = useCallback(\n ({ ref, \"aria-labelledby\": ariaLabelledby, ...props } = {}) => ({\n id: itemId,\n ref: mergeRefs(ref, register),\n \"aria-disabled\": ariaAttr(disabled),\n \"aria-labelledby\": cx(ariaLabelledby, labelId),\n \"aria-level\": level,\n \"aria-selected\": ariaAttr(selected),\n \"data-disabled\": dataAttr(disabled),\n role: \"treeitem\",\n tabIndex: -1,\n ...props,\n onClick: handlerAll(props.onClick, onItemClick),\n onKeyDown: handlerAll(props.onKeyDown, onKeyDown),\n }),\n [\n itemId,\n register,\n disabled,\n labelId,\n level,\n selected,\n onItemClick,\n onKeyDown,\n ],\n )\n\n const getGroupItemProps: PropGetter<\"li\"> = useCallback(\n (props = {}) => getItemProps({ \"aria-expanded\": groupOpen, ...props }),\n [getItemProps, groupOpen],\n )\n\n const getIndicatorProps: PropGetter<\"svg\"> = useCallback(\n (props) => ({\n \"aria-disabled\": ariaAttr(disabled),\n \"aria-expanded\": groupOpen,\n \"aria-hidden\": true,\n \"data-disabled\": dataAttr(disabled),\n \"data-loading\": dataAttr(groupLoading),\n \"data-selected\": dataAttr(selected),\n role: \"presentation\",\n ...props,\n }),\n [disabled, groupOpen, selected, groupLoading],\n )\n\n const getCheckboxProps: PropGetter<UseCheckboxProps> = useCallback(\n ({ \"aria-labelledby\": ariaLabelledby, ...props } = {}) => ({\n id: checkboxId,\n \"aria-labelledby\": cx(ariaLabelledby, labelId),\n \"data-selected\": dataAttr(selected),\n checked,\n disabled,\n indeterminate,\n tabIndex: -1,\n ...props,\n onChange: handlerAll(props.onChange, onCheckboxChange),\n }),\n [\n checkboxId,\n labelId,\n selected,\n checked,\n disabled,\n indeterminate,\n onCheckboxChange,\n ],\n )\n\n const getGroupProps: PropGetter<\"ul\"> = useCallback(\n ({ \"aria-labelledby\": ariaLabelledby, ...props } = {}) => ({\n \"aria-busy\": ariaAttr(groupLoading),\n \"aria-labelledby\": cx(ariaLabelledby, labelId),\n \"data-disabled\": dataAttr(disabled),\n role: \"group\",\n ...props,\n }),\n [labelId, disabled, groupLoading],\n )\n\n const getLabelProps: PropGetter<\"span\"> = useCallback(\n (props = {}) => ({ id: labelId, ...props }),\n [labelId],\n )\n\n return {\n branchOpen,\n checked,\n children,\n disabled,\n group,\n groupLoading,\n groupOpen,\n indeterminate,\n level,\n props: rest,\n selected,\n value,\n getCheckboxProps,\n getGroupItemProps,\n getGroupProps,\n getIndicatorProps,\n getItemProps,\n getLabelProps,\n onGroupClose,\n onGroupOpen,\n onGroupToggle,\n }\n}\n\nexport type UseTreeItemReturn = ReturnType<typeof useTreeItem>\n"],"mappings":";;;;;;;;;;;;;AAoDA,MAAM,EACJ,oBAAoB,wBACpB,eAAe,mBACf,gBAAgB,uBACd,kBAAoD;AASxD,MAAM,CAAC,aAAa,kBAAkBA,gBAA2B,EAC/D,MAAM,cACR,CAAC;AAeD,MAAM,CAAC,iBAAiB,sBAAsBA,gBAA+B;CAC3E,MAAM;CACN,QAAQ;AACV,CAAC;AA6DD,MAAa,WAA6C,EACxD,YAAY,OACZ,cAAc,kBACd,UACA,YACA,sBAAsB,CAAC,GACvB,uBAAuB,CAAC,GACxB,sBACA,eAAe,mBACf,UACA,eAAe,mBACf,iBAAiB,qBACjB,kBAAkB,sBAClB,kBAAkB,sBAClB,GAAG,SACuB,CAAC,MAAM;CAGjC,MAAM,CAAC,eAAe,oBAAoB,qBAAqB;EAC7D,cACE,yBAA0B,WAAW,CAAC,IAAI;EAC5C,OAA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AAM;GACN,GAAG;EACL,IACA;GAAC;GAAS;GAAU;EAAY,CAuBpB;EACZ;EACA;EACA,eAvBwC,aACvC,QAAQ,CAAC,OAAO;GAAE,IAAI;GAAS,GAAG;EAAM,IACzC,CAAC,OAAO,CAqBI;EACZ;EACA;EACA;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"use-tree.js","names":["createContext"],"sources":["../../../../src/components/tree/use-tree.ts"],"sourcesContent":["\"use client\"\n\nimport type {\n ChangeEvent,\n KeyboardEvent,\n MouseEvent,\n ReactNode,\n RefObject,\n SetStateAction,\n} from \"react\"\nimport type { HTMLProps, PropGetter } from \"../../core\"\nimport type { Descendant, Descendants } from \"../../hooks/use-descendants\"\nimport type { UseDisclosureProps } from \"../../hooks/use-disclosure\"\nimport type { UseCheckboxProps } from \"../checkbox\"\nimport { Children, useCallback, useRef, useState } from \"react\"\nimport { mergeProps } from \"../../core\"\nimport { useAsyncCallback } from \"../../hooks/use-async-callback\"\nimport { useControllableState } from \"../../hooks/use-controllable-state\"\nimport { createDescendants } from \"../../hooks/use-descendants\"\nimport { useDisclosure } from \"../../hooks/use-disclosure\"\nimport {\n ariaAttr,\n assignRef,\n createContext,\n cx,\n dataAttr,\n filterEmpty,\n handlerAll,\n isArray,\n isInputElement,\n isUndefined,\n match,\n mergeRefs,\n runKeyAction,\n setAttribute,\n useIds,\n useSafeLayoutEffect,\n} from \"../../utils\"\n\nexport interface TreeControl {\n collapse: () => void\n expand: () => void\n}\n\ninterface TreeDescendantProps {\n expanded: boolean\n group: boolean\n id: string\n value: string\n query?: string\n}\n\nconst {\n DescendantsContext: TreeDescendantsContext,\n useDescendant: useTreeDescendant,\n useDescendants: useTreeDescendants,\n} = createDescendants<HTMLElement, TreeDescendantProps>()\n\nexport { TreeDescendantsContext, useTreeDescendant, useTreeDescendants }\n\ninterface TreeContext extends Omit<\n UseTreeReturn,\n \"descendants\" | \"getRootProps\"\n> {}\n\nconst [TreeContext, useTreeContext] = createContext<TreeContext>({\n name: \"TreeContext\",\n})\n\nexport { TreeContext, useTreeContext }\n\ninterface TreeItemContext extends Pick<\n UseTreeItemReturn,\n | \"branchOpen\"\n | \"groupOpen\"\n | \"level\"\n | \"onGroupClose\"\n | \"onGroupOpen\"\n | \"onGroupToggle\"\n | \"value\"\n> {}\n\nconst [TreeItemContext, useTreeItemContext] = createContext<TreeItemContext>({\n name: \"TreeItemContext\",\n strict: false,\n})\n\nexport { TreeItemContext, useTreeItemContext }\n\nexport interface UseTreeProps<\n Multiple extends boolean = false,\n> extends HTMLProps<\"ul\"> {\n /**\n * If `true`, the tree will allow checkable items.\n *\n * @default false\n */\n checkable?: boolean\n /**\n * The checked value of the tree.\n */\n checkedValue?: string[]\n /**\n * Ref of the tree callbacks.\n */\n controlRef?: RefObject<null | TreeControl>\n /**\n * The initial checked value of the tree.\n */\n defaultCheckedValue?: string[]\n /**\n * The initial expanded value of the tree.\n */\n defaultExpandedValue?: string[]\n /**\n * The initial selected value of the tree.\n */\n defaultSelectedValue?: Multiple extends true ? string[] : string\n /**\n * The expanded value of the tree.\n */\n expandedValue?: string[]\n /**\n * If `true`, the tree will allow multiple selection.\n *\n * @default false\n */\n multiple?: Multiple\n /**\n * The selected value of the tree.\n */\n selectedValue?: Multiple extends true ? string[] : string\n /**\n * The callback invoked when checked value changes.\n */\n onCheckedChange?: (value: string[]) => void\n /**\n * The callback invoked when expanded value changes.\n */\n onExpandedChange?: (value: string[]) => void\n /**\n * The callback invoked when selected value changes.\n */\n onSelectedChange?: (value: Multiple extends true ? string[] : string) => void\n}\n\nexport const useTree = <Multiple extends boolean = false>({\n checkable = false,\n checkedValue: checkedValueProp,\n children,\n controlRef,\n defaultCheckedValue = [],\n defaultExpandedValue = [],\n defaultSelectedValue,\n expandedValue: expandedValueProp,\n multiple,\n selectedValue: selectedValueProp,\n onCheckedChange: onCheckedChangeProp,\n onExpandedChange: onExpandedChangeProp,\n onSelectedChange: onSelectedChangeProp,\n ...rest\n}: UseTreeProps<Multiple> = {}) => {\n type MaybeSelectedValue = Multiple extends true ? string[] : string\n\n const [selectedValue, setSelectedValue] = useControllableState({\n defaultValue:\n defaultSelectedValue ?? ((multiple ? [] : \"\") as MaybeSelectedValue),\n value: selectedValueProp,\n onChange: onSelectedChangeProp,\n })\n const [checkedValue, onCheckedChange] = useControllableState({\n defaultValue: defaultCheckedValue,\n value: checkedValueProp,\n onChange: onCheckedChangeProp,\n })\n const [expandedValue, setExpandedValue] = useControllableState({\n defaultValue: defaultExpandedValue,\n value: expandedValueProp,\n onChange: onExpandedChangeProp,\n })\n const descendants = useTreeDescendants()\n const activeDescendant = useRef<Descendant<\n HTMLElement,\n TreeDescendantProps\n > | null>(null)\n const searchRef = useRef<{ value: string; omitValue?: string }>({\n omitValue: undefined,\n value: \"\",\n })\n const timeoutRef = useRef<any>(null)\n\n const onExpandAll = useCallback(() => {\n const values = descendants.enabledValues()\n const group = values.filter(({ group }) => group)\n const value = group.map(({ value }) => value)\n\n setExpandedValue(value)\n }, [descendants, setExpandedValue])\n\n const onCollapseAll = useCallback(() => {\n setExpandedValue([])\n }, [setExpandedValue])\n\n const onActiveDescendant = useCallback(\n (\n descendant?: Descendant<HTMLElement, TreeDescendantProps>,\n shouldFocus = true,\n ) => {\n if (!descendant) return\n\n descendants.values().forEach(({ node }) => {\n node.tabIndex = -1\n })\n\n activeDescendant.current = descendant\n descendant.node.tabIndex = 0\n\n if (shouldFocus) descendant.node.focus()\n },\n [descendants],\n )\n\n const onSearch = useCallback(\n (value: string, omitValue: string) => {\n clearTimeout(timeoutRef.current)\n\n searchRef.current.value += value\n\n if (!searchRef.current.omitValue) searchRef.current.omitValue = omitValue\n\n timeoutRef.current = setTimeout(() => {\n searchRef.current = { omitValue: undefined, value: \"\" }\n }, 400)\n\n const values = descendants\n .enabledValues({ expanded: true })\n .filter(\n (descendant) =>\n !isUndefined(descendant.value) &&\n descendant.value !== searchRef.current.omitValue,\n )\n const descendant = values.find(({ query, value }) =>\n match(query ?? value, searchRef.current.value, \"startsWith\"),\n )\n\n if (descendant) onActiveDescendant(descendant)\n },\n [descendants, onActiveDescendant],\n )\n\n const onSelectedChange = useCallback(\n (value: SetStateAction<string | string[]>) => {\n setSelectedValue(value as SetStateAction<MaybeSelectedValue>)\n },\n [setSelectedValue],\n )\n\n const onExpandedChange = useCallback(\n (value: string) => {\n setExpandedValue((prev) => {\n if (prev.includes(value))\n return prev.filter((prevValue) => prevValue !== value)\n else return [...prev, value]\n })\n },\n [setExpandedValue],\n )\n\n useSafeLayoutEffect(() => {\n const value = isArray(selectedValue) ? selectedValue.at(0) : selectedValue\n const expandedDescendants = descendants.enabledValues({ expanded: true })\n\n if (value) {\n const descendant = expandedDescendants.find(\n (descendant) => value === descendant.value,\n )\n\n if (descendant) onActiveDescendant(descendant, false)\n else onActiveDescendant(expandedDescendants.at(0), false)\n } else {\n onActiveDescendant(expandedDescendants.at(0), false)\n }\n }, [children])\n\n assignRef(controlRef, { collapse: onCollapseAll, expand: onExpandAll })\n\n const getRootProps: PropGetter<\"ul\"> = useCallback(\n (props) =>\n mergeProps(\n {\n \"aria-multiselectable\": ariaAttr(multiple || checkable),\n children,\n role: \"tree\",\n },\n rest,\n props,\n )(),\n [multiple, checkable, rest, children],\n )\n\n return {\n activeDescendant,\n checkable,\n checkedValue,\n descendants,\n expandedValue,\n multiple,\n selectedValue,\n getRootProps,\n onActiveDescendant,\n onCheckedChange,\n onCollapseAll,\n onExpandAll,\n onExpandedChange,\n onSearch,\n onSelectedChange,\n }\n}\n\nexport type UseTreeReturn = ReturnType<typeof useTree>\n\nconst getRootDescendant =\n (descendants: Descendants<HTMLElement, TreeDescendantProps>) =>\n (value: string) => {\n const segments = value.split(\"/\")\n\n if (segments.length <= 1) return\n\n const rootValue = segments.at(0)\n\n return descendants.enabledValues().find(({ value }) => value === rootValue)\n }\n\nconst getParentDescendant =\n (descendants: Descendants<HTMLElement, TreeDescendantProps>) =>\n (value: string) => {\n const segments = value.split(\"/\")\n\n if (segments.length <= 1) return\n\n const parentValue = segments.slice(0, -1).join(\"/\")\n\n return descendants\n .enabledValues()\n .find(({ value }) => value === parentValue)\n }\n\nconst getChildDescendants =\n (descendants: Descendants<HTMLElement, TreeDescendantProps>) =>\n (value: string) => {\n const children = descendants\n .enabledValues()\n .filter((descendant) => descendant.value.startsWith(value + \"/\"))\n const values = children\n .map(({ value }) => value)\n .filter((value) => !isUndefined(value))\n\n return { children, values }\n }\n\nconst getParentValues = (value: string) => {\n const segments = value.split(\"/\")\n\n return segments\n .reduce<string[]>((prev, current) => {\n const prevValue = prev.at(-1)\n return prevValue ? [...prev, [prevValue, current].join(\"/\")] : [current]\n }, [])\n .toReversed()\n}\n\nconst getCheckbox = (node?: HTMLElement) => {\n const el = node?.querySelector(\"input[type='checkbox']\")\n\n return isInputElement(el) ? el : null\n}\n\nconst getAllChecked = (\n descendants: Descendant<HTMLElement, TreeDescendantProps>[],\n trulyValues?: string[],\n falsyValues?: string[],\n) => {\n const checked = descendants.map(({ node, value }) => {\n if (value && trulyValues?.includes(value)) return true\n if (value && falsyValues?.includes(value)) return false\n\n const checkbox = getCheckbox(node)\n\n return !!checkbox?.checked\n })\n\n const allChecked = !!checked.length && checked.every(Boolean)\n const indeterminate = checked.some(Boolean) && !allChecked\n\n return { allChecked, checked, indeterminate }\n}\n\nconst getRangeValues =\n (descendants: Descendants<HTMLElement, TreeDescendantProps>) =>\n (start: string, end: string) => {\n const values = descendants.enabledValues()\n const [startIndex, endIndex] = [\n values.findIndex((descendant) => descendant.value === start),\n values.findIndex((descendant) => descendant.value === end),\n ].sort((a, b) => a - b)\n\n return values\n .slice(startIndex, endIndex! + 1)\n .map(({ value }) => value)\n .filter((value) => !isUndefined(value))\n .sort((a, b) => {\n if (a === start && b !== start) return -1\n if (a !== start && b === start) return 1\n\n return 0\n })\n }\n\nexport interface UseTreeItemProps\n extends HTMLProps<\"div\">, Omit<UseDisclosureProps, \"timing\"> {\n /**\n * If `true`, the tree item will be disabled.\n *\n * @default false\n */\n disabled?: boolean\n /**\n * The query to search for in the tree item.\n */\n query?: string\n /**\n * The value of the item.\n */\n value?: string\n /**\n * If provided, the tree item will be rendered as an async tree item.\n */\n asyncChildren?: () => Promise<ReactNode>\n}\n\nexport const useTreeItem = ({\n asyncChildren,\n children: childrenProp,\n defaultOpen,\n disabled = false,\n open: openProp,\n query,\n value: valueProp,\n onClose: onCloseProp,\n onOpen: onOpenProp,\n ...rest\n}: UseTreeItemProps = {}) => {\n const context = useTreeItemContext()\n const {\n activeDescendant,\n checkable,\n checkedValue,\n expandedValue,\n multiple,\n selectedValue,\n onActiveDescendant,\n onCheckedChange,\n onCollapseAll,\n onExpandAll,\n onExpandedChange,\n onSearch,\n onSelectedChange,\n } = useTreeContext()\n const [children, setChildren] = useState<ReactNode>(childrenProp)\n const [indeterminate, setIndeterminate] = useState(false)\n const [itemId, labelId, checkboxId] = useIds()\n const initialAsyncRef = useRef(false)\n const async = !!asyncChildren\n const group = async || Children.count(children) > 0\n const level: number = (context?.level ?? 0) + 1\n const value: string = filterEmpty([context?.value, valueProp]).join(\"/\")\n const nested = !!context?.value\n const selected = isArray(selectedValue)\n ? !!value && selectedValue.includes(value)\n : !!value && selectedValue === value\n const checked = !!value && checkedValue.includes(value)\n const defaultExpanded = !!value && expandedValue.includes(value)\n const {\n open: groupOpen,\n onClose,\n onOpen,\n } = useDisclosure({\n defaultOpen: defaultOpen ?? defaultExpanded,\n open: openProp,\n onClose: onCloseProp,\n onOpen: onOpenProp,\n })\n const branchOpen: boolean[] = nested\n ? [...context.branchOpen, groupOpen]\n : [groupOpen]\n const { descendants, register } = useTreeDescendant({\n id: itemId!,\n disabled,\n expanded: branchOpen.slice(0, -1).every(Boolean),\n group,\n query,\n value,\n })\n\n const [groupLoading, onGroupChildren] = useAsyncCallback(async () => {\n const children = await asyncChildren?.()\n\n setChildren(children)\n }, [asyncChildren])\n\n const onSelect = useCallback(\n (\n ev: (\n | Partial<KeyboardEvent<HTMLElement>>\n | Partial<MouseEvent<HTMLElement>>\n ) & { value?: string } = {},\n ) => {\n const selectedValue = ev.value ?? value\n\n if (disabled || !selectedValue) return\n\n if (multiple)\n onSelectedChange((prev) => {\n if (!isArray(prev)) return prev\n\n if (ev.ctrlKey || ev.metaKey) {\n if (prev.includes(selectedValue))\n return prev.filter((prevValue) => prevValue !== selectedValue)\n else return [...prev, selectedValue]\n } else if (ev.shiftKey && prev[0]) {\n if (prev[0] === selectedValue) return prev\n\n return getRangeValues(descendants)(prev[0], selectedValue)\n } else {\n return [selectedValue]\n }\n })\n else onSelectedChange(selectedValue)\n },\n [descendants, disabled, multiple, onSelectedChange, value],\n )\n\n const onGroupOpen = useCallback(() => {\n if (disabled || !value) return\n\n if (async && !initialAsyncRef.current) {\n initialAsyncRef.current = true\n\n onGroupChildren()\n .then(() => {\n onOpen()\n onExpandedChange(value)\n })\n .catch(() => {\n initialAsyncRef.current = false\n })\n } else {\n onOpen()\n onExpandedChange(value)\n }\n }, [disabled, async, onGroupChildren, onOpen, onExpandedChange, value])\n\n const onGroupClose = useCallback(() => {\n if (disabled || !value) return\n\n onClose()\n onExpandedChange(value)\n }, [disabled, onClose, onExpandedChange, value])\n\n const onGroupToggle = useCallback(() => {\n if (groupOpen) onGroupClose()\n else onGroupOpen()\n }, [groupOpen, onGroupClose, onGroupOpen])\n\n const onKeyDown = useCallback(\n (ev: KeyboardEvent<HTMLElement>) => {\n if (disabled || !value) return\n\n runKeyAction(ev, {\n a: () => {\n if (!multiple || !(ev.ctrlKey || ev.metaKey)) return\n\n const values = descendants\n .enabledValues()\n .map(({ value }) => value)\n .filter((value) => !isUndefined(value))\n\n onSelectedChange(values)\n },\n ArrowDown: () => {\n if ((ev.ctrlKey || ev.metaKey) && ev.shiftKey) {\n onExpandAll()\n } else {\n const descendant = descendants.enabledNextValue(\n activeDescendant.current,\n false,\n { expanded: true },\n )\n\n onActiveDescendant(descendant)\n\n if (descendant && ev.shiftKey && multiple)\n onSelect({ ctrlKey: true, value: descendant.value })\n }\n },\n ArrowLeft: () => {\n if (group && groupOpen) {\n onGroupClose()\n } else if (nested) {\n const descendant = getParentDescendant(descendants)(value)\n\n onActiveDescendant(descendant)\n }\n },\n ArrowRight: () => {\n if (!group) return\n\n if (groupOpen) {\n const descendant = descendants.enabledNextValue(\n activeDescendant.current,\n false,\n { expanded: true },\n )\n\n onActiveDescendant(descendant)\n } else {\n if (!groupLoading) onGroupOpen()\n }\n },\n ArrowUp: () => {\n if ((ev.ctrlKey || ev.metaKey) && ev.shiftKey) {\n onCollapseAll()\n\n if (!nested) return\n\n const descendant = getRootDescendant(descendants)(value)\n\n onActiveDescendant(descendant)\n } else {\n const descendant = descendants.enabledPrevValue(\n activeDescendant.current,\n false,\n { expanded: true },\n )\n\n onActiveDescendant(descendant)\n\n if (descendant && ev.shiftKey && multiple)\n onSelect({ ctrlKey: true, value: descendant.value })\n }\n },\n End: () => {\n const descendant = descendants\n .enabledValues({ expanded: true })\n .at(-1)\n\n onActiveDescendant(descendant)\n },\n Enter: () => {\n if (group) onGroupToggle()\n\n onSelect(ev)\n },\n Home: () => {\n const descendant = descendants.enabledValues({ expanded: true }).at(0)\n\n onActiveDescendant(descendant)\n },\n Space: () => {\n if (group) onGroupToggle()\n\n onSelect(ev)\n },\n })\n\n if (ev.key.length !== 1) return\n if (ev.ctrlKey || ev.metaKey || ev.altKey) return\n\n ev.preventDefault()\n\n onSearch(ev.key, query ?? value)\n },\n [\n activeDescendant,\n descendants,\n disabled,\n group,\n groupLoading,\n groupOpen,\n multiple,\n nested,\n onActiveDescendant,\n onCollapseAll,\n onExpandAll,\n onGroupClose,\n onGroupOpen,\n onGroupToggle,\n onSearch,\n onSelect,\n onSelectedChange,\n query,\n value,\n ],\n )\n\n const onItemClick = useCallback(\n (ev: MouseEvent<HTMLLIElement>) => {\n ev.stopPropagation()\n\n if (disabled || !value) return\n\n if (group && !groupLoading)\n if (!ev.ctrlKey && !ev.metaKey && !ev.shiftKey) onGroupToggle()\n\n onSelect(ev)\n },\n [disabled, group, groupLoading, onGroupToggle, onSelect, value],\n )\n\n const onCheckboxChange = useCallback(\n (ev: ChangeEvent<HTMLInputElement>) => {\n if (disabled || !value) return\n\n ev.stopPropagation()\n\n if (group) setIndeterminate(false)\n\n onCheckedChange((prev) => {\n const target = [value]\n\n if (group) {\n const { values } = getChildDescendants(descendants)(value)\n\n target.push(...values)\n }\n\n if (nested) {\n const parentValues = getParentValues(context.value)\n const parentTarget: string[] = []\n\n parentValues.forEach((parentValue) => {\n const { children } = getChildDescendants(descendants)(parentValue)\n const { allChecked } = getAllChecked(\n children,\n [...parentTarget, ...(ev.target.checked ? target : [])],\n !ev.target.checked ? target : [],\n )\n\n if (allChecked) parentTarget.push(parentValue)\n })\n\n if (!ev.target.checked) parentTarget.push(...parentValues)\n\n target.push(...parentTarget)\n }\n\n if (ev.target.checked) return [...new Set([...prev, ...target])]\n else return prev.filter((prevValue) => !target.includes(prevValue))\n })\n },\n [disabled, group, onCheckedChange, value, nested, descendants, context],\n )\n\n useSafeLayoutEffect(() => {\n if (defaultExpanded)\n if (async && !initialAsyncRef.current) {\n initialAsyncRef.current = true\n\n onGroupChildren()\n .then(() => {\n onOpen()\n })\n .catch(() => {\n initialAsyncRef.current = false\n })\n } else {\n onOpen()\n }\n else onClose()\n }, [async, defaultExpanded, onClose, onGroupChildren, onOpen])\n\n useSafeLayoutEffect(() => {\n if (!group || !checkable) return\n\n const { children } = getChildDescendants(descendants)(value)\n const { indeterminate } = getAllChecked(children)\n\n setIndeterminate(indeterminate)\n }, [checkedValue])\n\n useSafeLayoutEffect(() => {\n if (!checkable) return\n\n const { node } = getParentDescendant(descendants)(value) ?? {}\n const checkbox = getCheckbox(node)\n\n if (!checkbox) return\n\n const cleanup = setAttribute(checkbox, \"aria-controls\", checkboxId)\n\n return cleanup\n }, [checkable, descendants])\n\n const getItemProps: PropGetter<\"li\"> = useCallback(\n ({ ref, \"aria-labelledby\": ariaLabelledby, ...props } = {}) => ({\n id: itemId,\n ref: mergeRefs(ref, register),\n \"aria-disabled\": ariaAttr(disabled),\n \"aria-labelledby\": cx(ariaLabelledby, labelId),\n \"aria-level\": level,\n \"aria-selected\": ariaAttr(selected),\n \"data-disabled\": dataAttr(disabled),\n role: \"treeitem\",\n tabIndex: -1,\n ...props,\n onClick: handlerAll(props.onClick, onItemClick),\n onKeyDown: handlerAll(props.onKeyDown, onKeyDown),\n }),\n [\n itemId,\n register,\n disabled,\n labelId,\n level,\n selected,\n onItemClick,\n onKeyDown,\n ],\n )\n\n const getGroupItemProps: PropGetter<\"li\"> = useCallback(\n (props = {}) => getItemProps({ \"aria-expanded\": groupOpen, ...props }),\n [getItemProps, groupOpen],\n )\n\n const getIndicatorProps: PropGetter<\"svg\"> = useCallback(\n (props) => ({\n \"aria-disabled\": ariaAttr(disabled),\n \"aria-expanded\": groupOpen,\n \"aria-hidden\": true,\n \"data-disabled\": dataAttr(disabled),\n \"data-loading\": dataAttr(groupLoading),\n \"data-selected\": dataAttr(selected),\n role: \"presentation\",\n ...props,\n }),\n [disabled, groupOpen, selected, groupLoading],\n )\n\n const getCheckboxProps: PropGetter<UseCheckboxProps> = useCallback(\n ({ \"aria-labelledby\": ariaLabelledby, ...props } = {}) => ({\n id: checkboxId,\n \"aria-labelledby\": cx(ariaLabelledby, labelId),\n \"data-selected\": dataAttr(selected),\n checked,\n disabled,\n indeterminate,\n tabIndex: -1,\n ...props,\n onChange: handlerAll(props.onChange, onCheckboxChange),\n }),\n [\n checkboxId,\n labelId,\n selected,\n checked,\n disabled,\n indeterminate,\n onCheckboxChange,\n ],\n )\n\n const getGroupProps: PropGetter<\"ul\"> = useCallback(\n ({ \"aria-labelledby\": ariaLabelledby, ...props } = {}) => ({\n \"aria-busy\": ariaAttr(groupLoading),\n \"aria-labelledby\": cx(ariaLabelledby, labelId),\n \"data-disabled\": dataAttr(disabled),\n role: \"group\",\n ...props,\n }),\n [labelId, disabled, groupLoading],\n )\n\n const getLabelProps: PropGetter<\"span\"> = useCallback(\n (props = {}) => ({ id: labelId, ...props }),\n [labelId],\n )\n\n return {\n branchOpen,\n checked,\n children,\n disabled,\n group,\n groupLoading,\n groupOpen,\n indeterminate,\n level,\n props: rest,\n selected,\n value,\n getCheckboxProps,\n getGroupItemProps,\n getGroupProps,\n getIndicatorProps,\n getItemProps,\n getLabelProps,\n onGroupClose,\n onGroupOpen,\n onGroupToggle,\n }\n}\n\nexport type UseTreeItemReturn = ReturnType<typeof useTreeItem>\n"],"mappings":";;;;;;;;;;;;;AAoDA,MAAM,EACJ,oBAAoB,wBACpB,eAAe,mBACf,gBAAgB,uBACd,kBAAoD;AASxD,MAAM,CAAC,aAAa,kBAAkBA,gBAA2B,EAC/D,MAAM,cACR,CAAC;AAeD,MAAM,CAAC,iBAAiB,sBAAsBA,gBAA+B;CAC3E,MAAM;CACN,QAAQ;AACV,CAAC;AA6DD,MAAa,WAA6C,EACxD,YAAY,OACZ,cAAc,kBACd,UACA,YACA,sBAAsB,CAAC,GACvB,uBAAuB,CAAC,GACxB,sBACA,eAAe,mBACf,UACA,eAAe,mBACf,iBAAiB,qBACjB,kBAAkB,sBAClB,kBAAkB,sBAClB,GAAG,SACuB,CAAC,MAAM;CAGjC,MAAM,CAAC,eAAe,oBAAoB,qBAAqB;EAC7D,cACE,yBAA0B,WAAW,CAAC,IAAI;EAC5C,OAAO;EACP,UAAU;CACZ,CAAC;CACD,MAAM,CAAC,cAAc,mBAAmB,qBAAqB;EAC3D,cAAc;EACd,OAAO;EACP,UAAU;CACZ,CAAC;CACD,MAAM,CAAC,eAAe,oBAAoB,qBAAqB;EAC7D,cAAc;EACd,OAAO;EACP,UAAU;CACZ,CAAC;CACD,MAAM,cAAc,mBAAmB;CACvC,MAAM,mBAAmB,OAGf,IAAI;CACd,MAAM,YAAY,OAA8C;EAC9D,WAAW,KAAA;EACX,OAAO;CACT,CAAC;CACD,MAAM,aAAa,OAAY,IAAI;CAEnC,MAAM,cAAc,kBAAkB;EAKpC,iBAJe,YAAY,cACR,CAAC,CAAC,QAAQ,EAAE,YAA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CAA0B,QAAQ;EAClC,iBAAA,GAAA,cAAA,SAAA,CAAyB,YAAY;EACrC,kBAAA,GAAA,cAAA,SAAA,CAA0B,QAAQ;EAClC,MAAM;EACN,GAAG;CACL,IACA;EAAC;EAAU;EAAW;EAAU;CAAY,CAC9C;CAyCA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,OAAO;EACP;EACA;EACA,kBApDqD,aACpD,EAAE,mBAAmB,gBAAgB,GAAG,UAAU,CAAC,OAAO;GACzD,IAAI;GACJ,oBAAA,GAAA,cAAA,GAAA,CAAsB,gBAAgB,OAAO;GAC7C,kBAAA,GAAA,cAAA,SAAA,CAA0B,QAAQ;GAClC;GACA;GACA;GACA,UAAU;GACV,GAAG;GACH,WAAA,GAAA,cAAA,WAAA,CAAqB,MAAM,UAAU,gBAAgB;EACvD,IACA;GACE;GACA;GACA;GACA;GACA;GACA;GACA;EACF,CAgCe;EACf;EACA,eA/BsC,aACrC,EAAE,mBAAmB,gBAAgB,GAAG,UAAU,CAAC,OAAO;GACzD,cAAA,GAAA,cAAA,SAAA,CAAsB,YAAY;GAClC,oBAAA,GAAA,cAAA,GAAA,CAAsB,gBAAgB,OAAO;GAC7C,kBAAA,GAAA,cAAA,SAAA,CAA0B,QAAQ;GAClC,MAAM;GACN,GAAG;EACL,IACA;GAAC;GAAS;GAAU;EAAY,CAuBpB;EACZ;EACA;EACA,eAvBwC,aACvC,QAAQ,CAAC,OAAO;GAAE,IAAI;GAAS,GAAG;EAAM,IACzC,CAAC,OAAO,CAqBI;EACZ;EACA;EACA;CACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.js","names":[],"sources":["../../../../src/core/components/props.ts"],"sourcesContent":["import type { Dict, Merge } from \"../../utils\"\nimport { useMemo } from \"react\"\nimport isEqual from \"react-fast-compare\"\nimport {\n cx,\n handlerAll,\n isArray,\n isEmptyObject,\n isFunction,\n isObject,\n isUndefined,\n merge,\n mergeRefs,\n omitObject,\n splitObject,\n} from \"../../utils\"\nimport { conditionProperties, styleProperties, vendorProperties } from \"../css\"\n\ntype Optionalize<Y> = [Extract<Y, undefined>] extends [never]\n ? Y\n : Partial<Exclude<Y, undefined>>\n\ntype MergeAll<Y extends (Dict | undefined)[]> = Y extends [infer M]\n ? Optionalize<M>\n : Y extends [infer D, ...infer H]\n ? H extends (Dict | undefined)[]\n ? Merge<Optionalize<D>, MergeAll<H>>\n : Optionalize<D>\n : never\n\nfunction isEvent(key: string) {\n return /^on[A-Z]/.test(key)\n}\n\nexport const cssProps = new Set<string>([\n ...conditionProperties,\n ...styleProperties,\n ...vendorProperties,\n])\n\nexport type ShouldForwardProp = (prop: string) => boolean\n\nexport function createShouldForwardProp(\n forwardProps: string[] = [],\n): ShouldForwardProp {\n return function (prop: string): boolean {\n if (forwardProps.includes(prop)) return true\n\n if (prop.startsWith(\"--\")) return false\n\n return !cssProps.has(prop)\n }\n}\n\ninterface MergePropsOptions {\n mergeClassName?: boolean\n mergeCSS?: boolean\n mergeEvent?: boolean\n mergeRef?: boolean\n mergeStyle?: boolean\n}\n\nexport function mergeProps<Y extends Dict>(\n ...args: Y[]\n): (options?: MergePropsOptions) => Y\nexport function mergeProps<Y extends (Dict | undefined)[]>(\n ...args: Y\n): (options?: MergePropsOptions) => MergeAll<Y>\nexport function mergeProps(...args: (Dict | undefined)[]) {\n return function ({\n mergeClassName = true,\n mergeCSS = true,\n mergeEvent = true,\n mergeRef = true,\n mergeStyle = true,\n }: MergePropsOptions = {}) {\n let result: Dict = {}\n\n for (const props of args) {\n if (isUndefined(props)) continue\n\n for (const key in result) {\n if (mergeRef && key === \"ref\") {\n result[key] = mergeRefs(result[key], props[key])\n\n continue\n }\n\n if (\n mergeEvent &&\n isEvent(key) &&\n isFunction(result[key]) &&\n isFunction(props[key])\n ) {\n result[key] = handlerAll(result[key], props[key])\n\n continue\n }\n\n if (mergeClassName && (key === \"className\" || key === \"class\")) {\n result[key] = cx(result[key], props[key])\n\n continue\n }\n\n if (mergeStyle && key === \"style\") {\n result[key] = merge(result[key] ?? {}, props[key] ?? {})\n\n continue\n }\n\n if (mergeCSS && key === \"css\") {\n if (isArray(result[key])) {\n result[key].push(props[key])\n } else {\n result[key] ??= []\n\n result[key] = [result[key], props[key]]\n }\n\n continue\n }\n\n result[key] = !isUndefined(props[key]) ? props[key] : result[key]\n }\n\n for (const key in props)\n if (isUndefined(result[key])) result[key] = props[key]\n }\n\n return result as any\n }\n}\n\ntype CallbackProps<Y extends Dict = Dict> = (props: Y) => Y\n\ntype PropsOrCallback<Y extends Dict = Dict> = CallbackProps<Y> | Y\n\nexport function chainProps<Y extends Dict = Dict>(\n ...props: PropsOrCallback<Y>[]\n) {\n return function (options: MergePropsOptions = {}) {\n if (!props.length) return (a: Y) => a\n\n if (props.length === 1)\n return function (b: Y) {\n const a = props[0] ?? {}\n const c = isFunction(a) ? a(b) : mergeProps(a, b)(options)\n\n return c\n } as CallbackProps<Y>\n\n return props.reduce(function (a, b) {\n return function (c: Y = {} as Y) {\n const d = isFunction(a) ? a(c) : mergeProps(a, c)(options)\n const f = isFunction(b) ? b(d) : mergeProps(b, d)(options)\n\n return f\n }\n }) as CallbackProps<Y>\n }\n}\n\nexport function isEqualProps<\n Y extends Dict,\n M extends Dict,\n D extends keyof M | keyof Y,\n>(a: Y, b: M, omitKeys: D[] = []) {\n return isEqual(\n omitObject(a, omitKeys as (keyof Y)[]),\n omitObject(b, omitKeys as (keyof M)[]),\n )\n}\n\nexport function useSplitProps<Y extends Dict, M extends keyof Y>(\n props: Y,\n keys: M[] | readonly M[],\n) {\n return useMemo(() => splitObject<Y, M>(props, keys), [props, keys])\n}\n\nexport function extractProps(props: Dict, keys: readonly string[] | string[]) {\n let result: Dict = {}\n\n Object.entries(props).forEach(([key, value]) => {\n if (!cssProps.has(key)) return\n\n if (keys.includes(key)) {\n result = merge(result, { [key]: value })\n } else if (isObject(value)) {\n value = extractProps(value, keys)\n\n if (isEmptyObject(value)) return\n\n result = merge(result, { [key]: value })\n }\n })\n\n return result\n}\n\nexport function useExtractProps(\n props: Dict,\n keys: readonly string[] | string[],\n) {\n return useMemo(() => extractProps(props, keys), [props, keys])\n}\n"],"mappings":";;;;;;;AA8BA,SAAS,QAAQ,KAAa;CAC5B,OAAO,WAAW,KAAK,GAAG;AAC5B;AAEA,MAAa,
|
|
1
|
+
{"version":3,"file":"props.js","names":[],"sources":["../../../../src/core/components/props.ts"],"sourcesContent":["import type { Dict, Merge } from \"../../utils\"\nimport { useMemo } from \"react\"\nimport isEqual from \"react-fast-compare\"\nimport {\n cx,\n handlerAll,\n isArray,\n isEmptyObject,\n isFunction,\n isObject,\n isUndefined,\n merge,\n mergeRefs,\n omitObject,\n splitObject,\n} from \"../../utils\"\nimport { conditionProperties, styleProperties, vendorProperties } from \"../css\"\n\ntype Optionalize<Y> = [Extract<Y, undefined>] extends [never]\n ? Y\n : Partial<Exclude<Y, undefined>>\n\ntype MergeAll<Y extends (Dict | undefined)[]> = Y extends [infer M]\n ? Optionalize<M>\n : Y extends [infer D, ...infer H]\n ? H extends (Dict | undefined)[]\n ? Merge<Optionalize<D>, MergeAll<H>>\n : Optionalize<D>\n : never\n\nfunction isEvent(key: string) {\n return /^on[A-Z]/.test(key)\n}\n\nexport const cssProps = new Set<string>([\n ...conditionProperties,\n ...styleProperties,\n ...vendorProperties,\n])\n\nexport type ShouldForwardProp = (prop: string) => boolean\n\nexport function createShouldForwardProp(\n forwardProps: string[] = [],\n): ShouldForwardProp {\n return function (prop: string): boolean {\n if (forwardProps.includes(prop)) return true\n\n if (prop.startsWith(\"--\")) return false\n\n return !cssProps.has(prop)\n }\n}\n\ninterface MergePropsOptions {\n mergeClassName?: boolean\n mergeCSS?: boolean\n mergeEvent?: boolean\n mergeRef?: boolean\n mergeStyle?: boolean\n}\n\nexport function mergeProps<Y extends Dict>(\n ...args: Y[]\n): (options?: MergePropsOptions) => Y\nexport function mergeProps<Y extends (Dict | undefined)[]>(\n ...args: Y\n): (options?: MergePropsOptions) => MergeAll<Y>\nexport function mergeProps(...args: (Dict | undefined)[]) {\n return function ({\n mergeClassName = true,\n mergeCSS = true,\n mergeEvent = true,\n mergeRef = true,\n mergeStyle = true,\n }: MergePropsOptions = {}) {\n let result: Dict = {}\n\n for (const props of args) {\n if (isUndefined(props)) continue\n\n for (const key in result) {\n if (mergeRef && key === \"ref\") {\n result[key] = mergeRefs(result[key], props[key])\n\n continue\n }\n\n if (\n mergeEvent &&\n isEvent(key) &&\n isFunction(result[key]) &&\n isFunction(props[key])\n ) {\n result[key] = handlerAll(result[key], props[key])\n\n continue\n }\n\n if (mergeClassName && (key === \"className\" || key === \"class\")) {\n result[key] = cx(result[key], props[key])\n\n continue\n }\n\n if (mergeStyle && key === \"style\") {\n result[key] = merge(result[key] ?? {}, props[key] ?? {})\n\n continue\n }\n\n if (mergeCSS && key === \"css\") {\n if (isArray(result[key])) {\n result[key].push(props[key])\n } else {\n result[key] ??= []\n\n result[key] = [result[key], props[key]]\n }\n\n continue\n }\n\n result[key] = !isUndefined(props[key]) ? props[key] : result[key]\n }\n\n for (const key in props)\n if (isUndefined(result[key])) result[key] = props[key]\n }\n\n return result as any\n }\n}\n\ntype CallbackProps<Y extends Dict = Dict> = (props: Y) => Y\n\ntype PropsOrCallback<Y extends Dict = Dict> = CallbackProps<Y> | Y\n\nexport function chainProps<Y extends Dict = Dict>(\n ...props: PropsOrCallback<Y>[]\n) {\n return function (options: MergePropsOptions = {}) {\n if (!props.length) return (a: Y) => a\n\n if (props.length === 1)\n return function (b: Y) {\n const a = props[0] ?? {}\n const c = isFunction(a) ? a(b) : mergeProps(a, b)(options)\n\n return c\n } as CallbackProps<Y>\n\n return props.reduce(function (a, b) {\n return function (c: Y = {} as Y) {\n const d = isFunction(a) ? a(c) : mergeProps(a, c)(options)\n const f = isFunction(b) ? b(d) : mergeProps(b, d)(options)\n\n return f\n }\n }) as CallbackProps<Y>\n }\n}\n\nexport function isEqualProps<\n Y extends Dict,\n M extends Dict,\n D extends keyof M | keyof Y,\n>(a: Y, b: M, omitKeys: D[] = []) {\n return isEqual(\n omitObject(a, omitKeys as (keyof Y)[]),\n omitObject(b, omitKeys as (keyof M)[]),\n )\n}\n\nexport function useSplitProps<Y extends Dict, M extends keyof Y>(\n props: Y,\n keys: M[] | readonly M[],\n) {\n return useMemo(() => splitObject<Y, M>(props, keys), [props, keys])\n}\n\nexport function extractProps(props: Dict, keys: readonly string[] | string[]) {\n let result: Dict = {}\n\n Object.entries(props).forEach(([key, value]) => {\n if (!cssProps.has(key)) return\n\n if (keys.includes(key)) {\n result = merge(result, { [key]: value })\n } else if (isObject(value)) {\n value = extractProps(value, keys)\n\n if (isEmptyObject(value)) return\n\n result = merge(result, { [key]: value })\n }\n })\n\n return result\n}\n\nexport function useExtractProps(\n props: Dict,\n keys: readonly string[] | string[],\n) {\n return useMemo(() => extractProps(props, keys), [props, keys])\n}\n"],"mappings":";;;;;;;AA8BA,SAAS,QAAQ,KAAa;CAC5B,OAAO,WAAW,KAAK,GAAG;AAC5B;AAEA,MAAa,2BAAW,IAAI,IAAY;CACtC,GAAG;CACH,GAAG;CACH,GAAG;AACL,CAAC;AAID,SAAgB,wBACd,eAAyB,CAAC,GACP;CACnB,OAAO,SAAU,MAAuB;EACtC,IAAI,aAAa,SAAS,IAAI,GAAG,OAAO;EAExC,IAAI,KAAK,WAAW,IAAI,GAAG,OAAO;EAElC,OAAO,CAAC,SAAS,IAAI,IAAI;CAC3B;AACF;AAgBA,SAAgB,WAAW,GAAG,MAA4B;CACxD,OAAO,SAAU,EACf,iBAAiB,MACjB,WAAW,MACX,aAAa,MACb,WAAW,MACX,aAAa,SACQ,CAAC,GAAG;EACzB,IAAI,SAAe,CAAC;EAEpB,KAAK,MAAM,SAAS,MAAM;GACxB,KAAA,GAAA,cAAA,YAAA,CAAgB,KAAK,GAAG;GAExB,KAAK,MAAM,OAAO,QAAQ;IACxB,IAAI,YAAY,QAAQ,OAAO;KAC7B,OAAO,OAAO,UAAU,O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