@heymantle/litho 0.0.3 → 0.0.5
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/ActionList.js +50 -16
- package/dist/cjs/components/AnnouncementBar.js +10 -3
- package/dist/cjs/components/AppProvider.js +10 -1
- package/dist/cjs/components/Autocomplete.js +55 -22
- package/dist/cjs/components/Badge.js +2 -1
- package/dist/cjs/components/Banner.js +35 -31
- package/dist/cjs/components/Box.js +5 -3
- package/dist/cjs/components/Button.js +78 -18
- package/dist/cjs/components/Card.js +6 -45
- package/dist/cjs/components/Checkbox.js +16 -6
- package/dist/cjs/components/ChoiceList.js +7 -4
- package/dist/cjs/components/ColorField.js +10 -5
- package/dist/cjs/components/DatePicker.js +13 -8
- package/dist/cjs/components/DropZone.js +33 -18
- package/dist/cjs/components/EmptyState.js +17 -9
- package/dist/cjs/components/Filters.js +36 -23
- package/dist/cjs/components/FooterHelp.js +7 -2
- package/dist/cjs/components/Form.js +18 -3
- package/dist/cjs/components/Frame.js +48 -23
- package/dist/cjs/components/FrameSaveBar.js +21 -12
- package/dist/cjs/components/HorizontalStack.js +9 -2
- package/dist/cjs/components/Icon.js +1 -0
- package/dist/cjs/components/Layout.js +3 -3
- package/dist/cjs/components/LayoutSection.js +2 -2
- package/dist/cjs/components/Link.js +6 -2
- package/dist/cjs/components/List.js +4 -3
- package/dist/cjs/components/Listbox.js +9 -4
- package/dist/cjs/components/Modal.js +26 -17
- package/dist/cjs/components/Navigation.js +30 -20
- package/dist/cjs/components/Page.js +8 -3
- package/dist/cjs/components/Pagination.js +11 -4
- package/dist/cjs/components/Pane.js +168 -41
- package/dist/cjs/components/Popover.js +59 -6
- package/dist/cjs/components/RangeSlider.js +11 -4
- package/dist/cjs/components/ResourceList.js +9 -3
- package/dist/cjs/components/Select.js +2 -0
- package/dist/cjs/components/Stack.js +223 -0
- package/dist/cjs/components/Table.js +33 -20
- package/dist/cjs/components/Tabs.js +41 -11
- package/dist/cjs/components/Text.js +8 -5
- package/dist/cjs/components/TextField.js +23 -13
- package/dist/cjs/components/Thumbnail.js +7 -2
- package/dist/cjs/components/TimePicker.js +7 -2
- package/dist/cjs/components/Tip.js +10 -4
- package/dist/cjs/components/Tooltip.js +16 -8
- package/dist/cjs/components/TopBar.js +17 -9
- package/dist/cjs/components/VerticalStack.js +8 -2
- package/dist/cjs/dev/verify-publish.js +37 -4
- package/dist/cjs/index.js +4 -0
- package/dist/cjs/postcss.config.js +21 -0
- package/dist/cjs/stories/ActionList.stories.js +365 -0
- package/dist/cjs/stories/AnnouncementBar.stories.js +244 -0
- package/dist/cjs/stories/Autocomplete.stories.js +874 -0
- package/dist/cjs/stories/Badge.stories.js +183 -0
- package/dist/cjs/stories/Banner.stories.js +201 -0
- package/dist/cjs/stories/Box.stories.js +601 -0
- package/dist/cjs/stories/Button.stories.js +325 -0
- package/dist/cjs/stories/ButtonGroup.stories.js +404 -0
- package/dist/cjs/stories/Card.stories.js +278 -0
- package/dist/cjs/stories/Checkbox.stories.js +266 -0
- package/dist/cjs/stories/ChoiceList.stories.js +885 -0
- package/dist/cjs/stories/Collapsible.stories.js +917 -0
- package/dist/cjs/stories/ColorField.stories.js +887 -0
- package/dist/cjs/stories/ContextualSaveBar.stories.js +971 -0
- package/dist/cjs/stories/DatePicker.stories.js +584 -0
- package/dist/cjs/stories/Divider.stories.js +766 -0
- package/dist/cjs/stories/DropZone.stories.js +1210 -0
- package/dist/cjs/stories/EmptyState.stories.js +296 -0
- package/dist/cjs/stories/Filters.stories.js +1355 -0
- package/dist/cjs/stories/FooterHelp.stories.js +874 -0
- package/dist/cjs/stories/Form.stories.js +943 -0
- package/dist/cjs/stories/Grid.stories.js +1199 -0
- package/dist/cjs/stories/HorizontalStack.stories.js +1064 -0
- package/dist/cjs/stories/Icon.stories.js +599 -0
- package/dist/cjs/stories/Image.stories.js +883 -0
- package/dist/cjs/stories/InlineError.stories.js +711 -0
- package/dist/cjs/stories/Label.stories.js +665 -0
- package/dist/cjs/stories/Layout.stories.js +687 -0
- package/dist/cjs/stories/LayoutSection.stories.js +1275 -0
- package/dist/cjs/stories/Link.stories.js +425 -0
- package/dist/cjs/stories/List.stories.js +1048 -0
- package/dist/cjs/stories/Listbox.stories.js +824 -0
- package/dist/cjs/stories/Loading.stories.js +909 -0
- package/dist/cjs/stories/Modal.stories.js +363 -0
- package/dist/cjs/stories/Navigation.stories.js +605 -0
- package/dist/cjs/stories/Page.stories.js +327 -0
- package/dist/cjs/stories/Pagination.stories.js +438 -0
- package/dist/cjs/stories/Pane.stories.js +1550 -0
- package/dist/cjs/stories/Popover.stories.js +641 -0
- package/dist/cjs/stories/PopoverManager.stories.js +1233 -0
- package/dist/cjs/stories/ProgressBar.stories.js +513 -0
- package/dist/cjs/stories/RadioButton.stories.js +642 -0
- package/dist/cjs/stories/RadioButtonCard.stories.js +816 -0
- package/dist/cjs/stories/RangeSlider.stories.js +896 -0
- package/dist/cjs/stories/ResourceList.stories.js +1076 -0
- package/dist/cjs/stories/Select.stories.js +413 -0
- package/dist/cjs/stories/SkeletonText.stories.js +777 -0
- package/dist/cjs/stories/Spinner.stories.js +403 -0
- package/dist/cjs/stories/Stack.stories.js +1397 -0
- package/dist/cjs/stories/Table.stories.js +628 -0
- package/dist/cjs/stories/Tabs.stories.js +722 -0
- package/dist/cjs/stories/Tag.stories.js +628 -0
- package/dist/cjs/stories/Text.stories.js +262 -0
- package/dist/cjs/stories/TextField.stories.js +377 -0
- package/dist/cjs/stories/Thumbnail.stories.js +863 -0
- package/dist/cjs/stories/TimePicker.stories.js +967 -0
- package/dist/cjs/stories/Tip.stories.js +753 -0
- package/dist/cjs/stories/Tooltip.stories.js +357 -0
- package/dist/cjs/stories/TopBar.stories.js +157 -0
- package/dist/cjs/stories/VerticalStack.stories.js +1287 -0
- package/dist/cjs/tailwind.config.js +17 -0
- package/dist/cjs/utilities/transformers.js +66 -0
- package/dist/cjs/vite.config.js +35 -0
- package/dist/esm/components/ActionList.js +41 -12
- package/dist/esm/components/AnnouncementBar.js +3 -1
- package/dist/esm/components/AppProvider.js +10 -1
- package/dist/esm/components/Autocomplete.js +44 -16
- package/dist/esm/components/Badge.js +2 -2
- package/dist/esm/components/Banner.js +20 -21
- package/dist/esm/components/Box.js +5 -4
- package/dist/esm/components/Button.js +68 -13
- package/dist/esm/components/Card.js +6 -4
- package/dist/esm/components/Checkbox.js +6 -1
- package/dist/esm/components/ChoiceList.js +7 -4
- package/dist/esm/components/ColorField.js +3 -3
- package/dist/esm/components/DatePicker.js +6 -1
- package/dist/esm/components/DropZone.js +14 -4
- package/dist/esm/components/EmptyState.js +6 -3
- package/dist/esm/components/Filters.js +14 -6
- package/dist/esm/components/FooterHelp.js +1 -1
- package/dist/esm/components/Form.js +18 -3
- package/dist/esm/components/Frame.js +27 -15
- package/dist/esm/components/FrameSaveBar.js +10 -6
- package/dist/esm/components/HorizontalStack.js +9 -2
- package/dist/esm/components/Icon.js +1 -0
- package/dist/esm/components/InlineError.js +1 -1
- package/dist/esm/components/Layout.js +4 -4
- package/dist/esm/components/LayoutSection.js +2 -2
- package/dist/esm/components/Link.js +6 -2
- package/dist/esm/components/List.js +4 -3
- package/dist/esm/components/Listbox.js +4 -4
- package/dist/esm/components/Modal.js +8 -4
- package/dist/esm/components/Navigation.js +16 -11
- package/dist/esm/components/Page.js +9 -4
- package/dist/esm/components/Pagination.js +3 -1
- package/dist/esm/components/Pane.js +165 -43
- package/dist/esm/components/Popover.js +18 -6
- package/dist/esm/components/RangeSlider.js +3 -1
- package/dist/esm/components/ResourceList.js +2 -1
- package/dist/esm/components/Select.js +2 -0
- package/dist/esm/components/Stack.js +213 -0
- package/dist/esm/components/Table.js +17 -4
- package/dist/esm/components/Tabs.js +41 -11
- package/dist/esm/components/Text.js +8 -6
- package/dist/esm/components/TextField.js +6 -1
- package/dist/esm/components/Thumbnail.js +1 -1
- package/dist/esm/components/TimePicker.js +1 -1
- package/dist/esm/components/Tip.js +3 -2
- package/dist/esm/components/Tooltip.js +4 -1
- package/dist/esm/components/TopBar.js +7 -4
- package/dist/esm/components/VerticalStack.js +8 -2
- package/dist/esm/dev/verify-publish.js +37 -4
- package/dist/esm/index.js +1 -0
- package/dist/esm/postcss.config.js +6 -0
- package/dist/esm/stories/ActionList.stories.js +327 -0
- package/dist/esm/stories/AnnouncementBar.stories.js +212 -0
- package/dist/esm/stories/Autocomplete.stories.js +836 -0
- package/dist/esm/stories/Badge.stories.js +138 -0
- package/dist/esm/stories/Banner.stories.js +159 -0
- package/dist/esm/stories/Box.stories.js +560 -0
- package/dist/esm/stories/Button.stories.js +277 -0
- package/dist/esm/stories/ButtonGroup.stories.js +357 -0
- package/dist/esm/stories/Card.stories.js +240 -0
- package/dist/esm/stories/Checkbox.stories.js +219 -0
- package/dist/esm/stories/ChoiceList.stories.js +835 -0
- package/dist/esm/stories/Collapsible.stories.js +879 -0
- package/dist/esm/stories/ColorField.stories.js +846 -0
- package/dist/esm/stories/ContextualSaveBar.stories.js +939 -0
- package/dist/esm/stories/DatePicker.stories.js +537 -0
- package/dist/esm/stories/Divider.stories.js +722 -0
- package/dist/esm/stories/DropZone.stories.js +1166 -0
- package/dist/esm/stories/EmptyState.stories.js +246 -0
- package/dist/esm/stories/Filters.stories.js +1317 -0
- package/dist/esm/stories/FooterHelp.stories.js +818 -0
- package/dist/esm/stories/Form.stories.js +908 -0
- package/dist/esm/stories/Grid.stories.js +1152 -0
- package/dist/esm/stories/HorizontalStack.stories.js +1011 -0
- package/dist/esm/stories/Icon.stories.js +558 -0
- package/dist/esm/stories/Image.stories.js +836 -0
- package/dist/esm/stories/InlineError.stories.js +667 -0
- package/dist/esm/stories/Label.stories.js +612 -0
- package/dist/esm/stories/Layout.stories.js +649 -0
- package/dist/esm/stories/LayoutSection.stories.js +1234 -0
- package/dist/esm/stories/Link.stories.js +381 -0
- package/dist/esm/stories/List.stories.js +992 -0
- package/dist/esm/stories/Listbox.stories.js +780 -0
- package/dist/esm/stories/Loading.stories.js +859 -0
- package/dist/esm/stories/Modal.stories.js +322 -0
- package/dist/esm/stories/Navigation.stories.js +567 -0
- package/dist/esm/stories/Page.stories.js +280 -0
- package/dist/esm/stories/Pagination.stories.js +394 -0
- package/dist/esm/stories/Pane.stories.js +1512 -0
- package/dist/esm/stories/Popover.stories.js +609 -0
- package/dist/esm/stories/PopoverManager.stories.js +1201 -0
- package/dist/esm/stories/ProgressBar.stories.js +472 -0
- package/dist/esm/stories/RadioButton.stories.js +598 -0
- package/dist/esm/stories/RadioButtonCard.stories.js +772 -0
- package/dist/esm/stories/RangeSlider.stories.js +849 -0
- package/dist/esm/stories/ResourceList.stories.js +1038 -0
- package/dist/esm/stories/Select.stories.js +363 -0
- package/dist/esm/stories/SkeletonText.stories.js +718 -0
- package/dist/esm/stories/Spinner.stories.js +362 -0
- package/dist/esm/stories/Stack.stories.js +1338 -0
- package/dist/esm/stories/Table.stories.js +584 -0
- package/dist/esm/stories/Tabs.stories.js +684 -0
- package/dist/esm/stories/Tag.stories.js +581 -0
- package/dist/esm/stories/Text.stories.js +217 -0
- package/dist/esm/stories/TextField.stories.js +332 -0
- package/dist/esm/stories/Thumbnail.stories.js +810 -0
- package/dist/esm/stories/TimePicker.stories.js +911 -0
- package/dist/esm/stories/Tip.stories.js +706 -0
- package/dist/esm/stories/Tooltip.stories.js +313 -0
- package/dist/esm/stories/TopBar.stories.js +116 -0
- package/dist/esm/stories/VerticalStack.stories.js +1240 -0
- package/dist/esm/tailwind.config.js +7 -0
- package/dist/esm/utilities/transformers.js +47 -0
- package/dist/esm/vite.config.js +20 -0
- package/dist/types/components/ActionList.d.ts +122 -0
- package/dist/types/components/ActionList.d.ts.map +1 -0
- package/dist/types/components/AnnouncementBar.d.ts +21 -0
- package/dist/types/components/AnnouncementBar.d.ts.map +1 -0
- package/dist/types/components/AppProvider.d.ts +61 -0
- package/dist/types/components/AppProvider.d.ts.map +1 -0
- package/dist/types/components/Autocomplete.d.ts +135 -0
- package/dist/types/components/Autocomplete.d.ts.map +1 -0
- package/dist/types/components/Badge.d.ts +21 -0
- package/dist/types/components/Badge.d.ts.map +1 -0
- package/dist/types/components/Banner.d.ts +78 -0
- package/dist/types/components/Banner.d.ts.map +1 -0
- package/dist/types/components/Box.d.ts +70 -0
- package/dist/types/components/Box.d.ts.map +1 -0
- package/dist/types/components/Button.d.ts +133 -0
- package/dist/types/components/Button.d.ts.map +1 -0
- package/dist/types/components/ButtonGroup.d.ts +26 -0
- package/dist/types/components/ButtonGroup.d.ts.map +1 -0
- package/dist/types/components/Card.d.ts +141 -0
- package/dist/types/components/Card.d.ts.map +1 -0
- package/dist/types/components/Checkbox.d.ts +56 -0
- package/dist/types/components/Checkbox.d.ts.map +1 -0
- package/dist/types/components/ChoiceList.d.ts +69 -0
- package/dist/types/components/ChoiceList.d.ts.map +1 -0
- package/dist/types/components/Collapsible.d.ts +17 -0
- package/dist/types/components/Collapsible.d.ts.map +1 -0
- package/dist/types/components/ColorField.d.ts +36 -0
- package/dist/types/components/ColorField.d.ts.map +1 -0
- package/dist/types/components/ContextualSaveBar.d.ts +22 -0
- package/dist/types/components/ContextualSaveBar.d.ts.map +1 -0
- package/dist/types/components/DatePicker.d.ts +66 -0
- package/dist/types/components/DatePicker.d.ts.map +1 -0
- package/dist/types/components/Divider.d.ts +21 -0
- package/dist/types/components/Divider.d.ts.map +1 -0
- package/dist/types/components/DropZone.d.ts +108 -0
- package/dist/types/components/DropZone.d.ts.map +1 -0
- package/dist/types/components/EmptyState.d.ts +52 -0
- package/dist/types/components/EmptyState.d.ts.map +1 -0
- package/dist/types/components/Filters.d.ts +168 -0
- package/dist/types/components/Filters.d.ts.map +1 -0
- package/dist/types/components/FooterHelp.d.ts +21 -0
- package/dist/types/components/FooterHelp.d.ts.map +1 -0
- package/dist/types/components/Form.d.ts +39 -0
- package/dist/types/components/Form.d.ts.map +1 -0
- package/dist/types/components/Frame.d.ts +51 -0
- package/dist/types/components/Frame.d.ts.map +1 -0
- package/dist/types/components/FrameSaveBar.d.ts +8 -0
- package/dist/types/components/FrameSaveBar.d.ts.map +1 -0
- package/dist/types/components/Grid.d.ts +39 -0
- package/dist/types/components/Grid.d.ts.map +1 -0
- package/dist/types/components/HorizontalStack.d.ts +36 -0
- package/dist/types/components/HorizontalStack.d.ts.map +1 -0
- package/dist/types/components/Icon.d.ts +43 -0
- package/dist/types/components/Icon.d.ts.map +1 -0
- package/dist/types/components/Image.d.ts +45 -0
- package/dist/types/components/Image.d.ts.map +1 -0
- package/dist/types/components/InlineError.d.ts +22 -0
- package/dist/types/components/InlineError.d.ts.map +1 -0
- package/dist/types/components/Label.d.ts +28 -0
- package/dist/types/components/Label.d.ts.map +1 -0
- package/dist/types/components/Layout.d.ts +44 -0
- package/dist/types/components/Layout.d.ts.map +1 -0
- package/dist/types/components/LayoutSection.d.ts +24 -0
- package/dist/types/components/LayoutSection.d.ts.map +1 -0
- package/dist/types/components/Link.d.ts +38 -0
- package/dist/types/components/Link.d.ts.map +1 -0
- package/dist/types/components/List.d.ts +33 -0
- package/dist/types/components/List.d.ts.map +1 -0
- package/dist/types/components/Listbox.d.ts +34 -0
- package/dist/types/components/Listbox.d.ts.map +1 -0
- package/dist/types/components/Loading.d.ts +13 -0
- package/dist/types/components/Loading.d.ts.map +1 -0
- package/dist/types/components/Modal.d.ts +75 -0
- package/dist/types/components/Modal.d.ts.map +1 -0
- package/dist/types/components/Navigation.d.ts +105 -0
- package/dist/types/components/Navigation.d.ts.map +1 -0
- package/dist/types/components/Page.d.ts +59 -0
- package/dist/types/components/Page.d.ts.map +1 -0
- package/dist/types/components/Pagination.d.ts +39 -0
- package/dist/types/components/Pagination.d.ts.map +1 -0
- package/dist/types/components/Pane.d.ts +11 -0
- package/dist/types/components/Pane.d.ts.map +1 -0
- package/dist/types/components/Popover.d.ts +56 -0
- package/dist/types/components/Popover.d.ts.map +1 -0
- package/dist/types/components/PopoverManager.d.ts +3 -0
- package/dist/types/components/PopoverManager.d.ts.map +1 -0
- package/dist/types/components/ProgressBar.d.ts +24 -0
- package/dist/types/components/ProgressBar.d.ts.map +1 -0
- package/dist/types/components/RadioButton.d.ts +39 -0
- package/dist/types/components/RadioButton.d.ts.map +1 -0
- package/dist/types/components/RadioButtonCard.d.ts +41 -0
- package/dist/types/components/RadioButtonCard.d.ts.map +1 -0
- package/dist/types/components/RangeSlider.d.ts +44 -0
- package/dist/types/components/RangeSlider.d.ts.map +1 -0
- package/dist/types/components/ResourceList.d.ts +54 -0
- package/dist/types/components/ResourceList.d.ts.map +1 -0
- package/dist/types/components/Select.d.ts +48 -0
- package/dist/types/components/Select.d.ts.map +1 -0
- package/dist/types/components/SkeletonText.d.ts +28 -0
- package/dist/types/components/SkeletonText.d.ts.map +1 -0
- package/dist/types/components/Spinner.d.ts +18 -0
- package/dist/types/components/Spinner.d.ts.map +1 -0
- package/dist/types/components/Stack.d.ts +49 -0
- package/dist/types/components/Stack.d.ts.map +1 -0
- package/dist/types/components/Table.d.ts +197 -0
- package/dist/types/components/Table.d.ts.map +1 -0
- package/dist/types/components/Tabs.d.ts +43 -0
- package/dist/types/components/Tabs.d.ts.map +1 -0
- package/dist/types/components/Tag.d.ts +26 -0
- package/dist/types/components/Tag.d.ts.map +1 -0
- package/dist/types/components/Text.d.ts +32 -0
- package/dist/types/components/Text.d.ts.map +1 -0
- package/dist/types/components/TextField.d.ts +109 -0
- package/dist/types/components/TextField.d.ts.map +1 -0
- package/dist/types/components/Thumbnail.d.ts +18 -0
- package/dist/types/components/Thumbnail.d.ts.map +1 -0
- package/dist/types/components/TimePicker.d.ts +3 -0
- package/dist/types/components/TimePicker.d.ts.map +1 -0
- package/dist/types/components/Tip.d.ts +23 -0
- package/dist/types/components/Tip.d.ts.map +1 -0
- package/dist/types/components/Tooltip.d.ts +84 -0
- package/dist/types/components/Tooltip.d.ts.map +1 -0
- package/dist/types/components/TopBar.d.ts +43 -0
- package/dist/types/components/TopBar.d.ts.map +1 -0
- package/dist/types/components/VerticalStack.d.ts +27 -0
- package/dist/types/components/VerticalStack.d.ts.map +1 -0
- package/dist/types/index.d.ts +63 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/styles/Table.d.ts +1570 -0
- package/dist/types/styles/Table.d.ts.map +1 -0
- package/dist/types/utilities/dates.d.ts +46 -0
- package/dist/types/utilities/dates.d.ts.map +1 -0
- package/dist/types/utilities/transformers.d.ts +4 -0
- package/dist/types/utilities/transformers.d.ts.map +1 -0
- package/dist/types/utilities/useIndexResourceState.d.ts +21 -0
- package/dist/types/utilities/useIndexResourceState.d.ts.map +1 -0
- package/dist/types/utilities/useMounted.d.ts +2 -0
- package/dist/types/utilities/useMounted.d.ts.map +1 -0
- package/dist/types/utilities/useTableScrollState.d.ts +29 -0
- package/dist/types/utilities/useTableScrollState.d.ts.map +1 -0
- package/index.css +17 -0
- package/package.json +38 -7
|
@@ -1,21 +1,73 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
function _array_like_to_array(arr, len) {
|
|
3
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
4
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
5
|
+
return arr2;
|
|
6
|
+
}
|
|
7
|
+
function _array_with_holes(arr) {
|
|
8
|
+
if (Array.isArray(arr)) return arr;
|
|
9
|
+
}
|
|
10
|
+
function _iterable_to_array_limit(arr, i) {
|
|
11
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
12
|
+
if (_i == null) return;
|
|
13
|
+
var _arr = [];
|
|
14
|
+
var _n = true;
|
|
15
|
+
var _d = false;
|
|
16
|
+
var _s, _e;
|
|
17
|
+
try {
|
|
18
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
19
|
+
_arr.push(_s.value);
|
|
20
|
+
if (i && _arr.length === i) break;
|
|
21
|
+
}
|
|
22
|
+
} catch (err) {
|
|
23
|
+
_d = true;
|
|
24
|
+
_e = err;
|
|
25
|
+
} finally{
|
|
26
|
+
try {
|
|
27
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
28
|
+
} finally{
|
|
29
|
+
if (_d) throw _e;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return _arr;
|
|
33
|
+
}
|
|
34
|
+
function _non_iterable_rest() {
|
|
35
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
36
|
+
}
|
|
37
|
+
function _sliced_to_array(arr, i) {
|
|
38
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
39
|
+
}
|
|
40
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
41
|
+
if (!o) return;
|
|
42
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
43
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
44
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
45
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
46
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
47
|
+
}
|
|
2
48
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { CancelMajor } from "@shopify/polaris-icons";
|
|
49
|
+
import { CancelMajor, ArrowLeftMinor, MaximizeMajor, MinimizeMajor } from "@shopify/polaris-icons";
|
|
4
50
|
import { tv } from "tailwind-variants";
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
51
|
+
import { createContext, useContext, useEffect, Children, useState } from "react";
|
|
52
|
+
import Text from "./Text.js";
|
|
53
|
+
import Button from "./Button.js";
|
|
54
|
+
import Popover from "./Popover.js";
|
|
55
|
+
import ActionList from "./ActionList.js";
|
|
56
|
+
import { useFrame } from "./Frame.js";
|
|
8
57
|
var styles = tv({
|
|
9
|
-
base: "Litho-Pane hidden md:block fixed inset-0 w-full md:left-auto md:max-w-
|
|
58
|
+
base: "Litho-Pane hidden md:block fixed inset-0 w-full md:left-auto md:max-w-[var(--litho-pane-width)] block bg-surface-lowest shadow-pane-inner pointer-events-auto"
|
|
10
59
|
});
|
|
11
60
|
var innerStyles = tv({
|
|
12
|
-
base: "flex flex-col overflow-y-auto h-full"
|
|
61
|
+
base: "relative flex flex-col overflow-y-auto h-full"
|
|
62
|
+
});
|
|
63
|
+
var dragHandleStyles = tv({
|
|
64
|
+
base: "cursor-col-resize absolute top-0 left-0 w-1 h-full transition-colors duration-300 hover-delay hover:bg-tint-3"
|
|
13
65
|
});
|
|
14
66
|
var PaneContext = /*#__PURE__*/ createContext({});
|
|
15
67
|
function Pane() {
|
|
16
68
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
17
69
|
var open = props.open, onClose = props.onClose, children = props.children;
|
|
18
|
-
var setPaneIsOpen =
|
|
70
|
+
var setPaneIsOpen = useFrame().setPaneIsOpen;
|
|
19
71
|
var classes = styles();
|
|
20
72
|
useEffect(function() {
|
|
21
73
|
setPaneIsOpen(open);
|
|
@@ -51,47 +103,117 @@ function Pane() {
|
|
|
51
103
|
}
|
|
52
104
|
function Header() {
|
|
53
105
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
54
|
-
var
|
|
106
|
+
var title = props.title, subtitle = props.subtitle, _props_actions = props.actions, actions = _props_actions === void 0 ? [] : _props_actions, _props_showCloseButton = props.showCloseButton, showCloseButton = _props_showCloseButton === void 0 ? true : _props_showCloseButton, _props_bottomBorder = props.bottomBorder, bottomBorder = _props_bottomBorder === void 0 ? true : _props_bottomBorder, subHeader = props.subHeader, tmp = props.backAction, _backAction = tmp === void 0 ? null : tmp, _props_expanded = props.expanded, expanded = _props_expanded === void 0 ? false : _props_expanded, _props_onToggleExpand = props.onToggleExpand, onToggleExpand = _props_onToggleExpand === void 0 ? function() {} : _props_onToggleExpand, _props_allowExpand = props.allowExpand, allowExpand = _props_allowExpand === void 0 ? true : _props_allowExpand;
|
|
55
107
|
var onClose = useContext(PaneContext).onClose;
|
|
56
108
|
var showActionsOrClose = actions.length > 0 || showCloseButton;
|
|
57
|
-
var
|
|
109
|
+
var _useState = _sliced_to_array(useState(null), 2), showActionsPopover = _useState[0], setShowActionsPopover = _useState[1];
|
|
110
|
+
useEffect(function() {
|
|
111
|
+
var width = expanded ? 'var(--litho-pane-width-expanded)' : 'var(--litho-pane-width-default)';
|
|
112
|
+
document.documentElement.style.setProperty('--litho-pane-width', width);
|
|
113
|
+
}, [
|
|
114
|
+
expanded
|
|
115
|
+
]);
|
|
116
|
+
var backAction = _backAction ? /*#__PURE__*/ _jsx("div", {
|
|
117
|
+
className: "Litho-Page__Header--BackAction",
|
|
118
|
+
children: /*#__PURE__*/ _jsx(Button, {
|
|
119
|
+
plain: true,
|
|
120
|
+
icon: ArrowLeftMinor,
|
|
121
|
+
onClick: function() {
|
|
122
|
+
return _backAction === null || _backAction === void 0 ? void 0 : _backAction.onAction();
|
|
123
|
+
},
|
|
124
|
+
accessibilityLabel: _backAction === null || _backAction === void 0 ? void 0 : _backAction.accessibilityLabel
|
|
125
|
+
})
|
|
126
|
+
}) : null;
|
|
58
127
|
return /*#__PURE__*/ _jsxs("div", {
|
|
59
|
-
className: "
|
|
128
|
+
className: "Litho-Pane__Header",
|
|
60
129
|
children: [
|
|
61
|
-
/*#__PURE__*/
|
|
62
|
-
className: "
|
|
63
|
-
children: Children.map(children, function(child, index) {
|
|
64
|
-
return /*#__PURE__*/ _jsx("div", {
|
|
65
|
-
className: "flex col-span-2 items-center ".concat(childCount === 1 ? "col-span-5" : "", " ").concat(index > 0 ? "justify-center" : ""),
|
|
66
|
-
children: child
|
|
67
|
-
});
|
|
68
|
-
})
|
|
69
|
-
}),
|
|
70
|
-
showActionsOrClose && /*#__PURE__*/ _jsxs("div", {
|
|
71
|
-
className: "flex col-span-2 items-center justify-end",
|
|
130
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
131
|
+
className: "flex items-center justify-between min-h-14 px-2 border-edge-subdued ".concat(bottomBorder ? "border-b" : ""),
|
|
72
132
|
children: [
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
133
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
134
|
+
className: "flex items-center gap-2",
|
|
135
|
+
children: [
|
|
136
|
+
backAction,
|
|
137
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
138
|
+
children: [
|
|
139
|
+
title && typeof title === "string" ? /*#__PURE__*/ _jsx(Text, {
|
|
140
|
+
variant: "headingMd",
|
|
141
|
+
className: "!leading-5",
|
|
142
|
+
clampLines: 1,
|
|
143
|
+
children: title
|
|
144
|
+
}) : title,
|
|
145
|
+
subtitle && typeof subtitle === "string" ? /*#__PURE__*/ _jsx(Text, {
|
|
146
|
+
color: "subdued",
|
|
147
|
+
className: "!leading-4",
|
|
148
|
+
clampLines: 1,
|
|
149
|
+
children: subtitle
|
|
150
|
+
}) : subtitle
|
|
151
|
+
]
|
|
152
|
+
})
|
|
153
|
+
]
|
|
86
154
|
}),
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
155
|
+
showActionsOrClose && /*#__PURE__*/ _jsxs("div", {
|
|
156
|
+
className: "flex items-center justify-end",
|
|
157
|
+
children: [
|
|
158
|
+
actions.map(function(action, index) {
|
|
159
|
+
var showPopover = action.subActions || action.subSections;
|
|
160
|
+
var innerContent = /*#__PURE__*/ _jsx(Button, {
|
|
161
|
+
plain: !action.destructive,
|
|
162
|
+
onClick: showPopover ? function() {
|
|
163
|
+
return setShowActionsPopover(index);
|
|
164
|
+
} : action.onAction || action.onClick,
|
|
165
|
+
disabled: action.disabled,
|
|
166
|
+
icon: action.icon,
|
|
167
|
+
loading: action.loading,
|
|
168
|
+
external: action.external,
|
|
169
|
+
url: action.url,
|
|
170
|
+
destructive: action.destructive,
|
|
171
|
+
tooltip: action.tooltip && showActionsPopover !== index ? action.tooltip : undefined,
|
|
172
|
+
tooltipPosition: "below"
|
|
173
|
+
}, index);
|
|
174
|
+
if (showPopover) {
|
|
175
|
+
return /*#__PURE__*/ _jsx(Popover, {
|
|
176
|
+
active: showActionsPopover === index,
|
|
177
|
+
onClose: function() {
|
|
178
|
+
return setShowActionsPopover(null);
|
|
179
|
+
},
|
|
180
|
+
activator: innerContent,
|
|
181
|
+
preferredAlignment: "left",
|
|
182
|
+
children: /*#__PURE__*/ _jsx(ActionList, {
|
|
183
|
+
sections: action.subSections,
|
|
184
|
+
items: action.subActions,
|
|
185
|
+
onActionAnyItem: function() {
|
|
186
|
+
return setShowActionsPopover(null);
|
|
187
|
+
}
|
|
188
|
+
})
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
return innerContent;
|
|
192
|
+
}),
|
|
193
|
+
allowExpand && /*#__PURE__*/ _jsx("div", {
|
|
194
|
+
className: "hidden xl:block",
|
|
195
|
+
children: /*#__PURE__*/ _jsx(Button, {
|
|
196
|
+
plain: true,
|
|
197
|
+
icon: expanded ? MinimizeMajor : MaximizeMajor,
|
|
198
|
+
onClick: onToggleExpand,
|
|
199
|
+
tooltip: expanded ? "Minimize" : "Expand",
|
|
200
|
+
tooltipPosition: "below"
|
|
201
|
+
})
|
|
202
|
+
}),
|
|
203
|
+
showCloseButton && /*#__PURE__*/ _jsx(Button, {
|
|
204
|
+
plain: true,
|
|
205
|
+
icon: CancelMajor,
|
|
206
|
+
onClick: onClose,
|
|
207
|
+
tooltip: "Close",
|
|
208
|
+
tooltipPosition: "below"
|
|
209
|
+
})
|
|
210
|
+
]
|
|
93
211
|
})
|
|
94
212
|
]
|
|
213
|
+
}),
|
|
214
|
+
subHeader && /*#__PURE__*/ _jsx("div", {
|
|
215
|
+
className: "border-edge-subdued ".concat(bottomBorder ? "border-b" : ""),
|
|
216
|
+
children: subHeader
|
|
95
217
|
})
|
|
96
218
|
]
|
|
97
219
|
});
|
|
@@ -99,9 +221,9 @@ function Header() {
|
|
|
99
221
|
Pane.Header = Header;
|
|
100
222
|
function Content() {
|
|
101
223
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
102
|
-
var children = props.children;
|
|
224
|
+
var children = props.children, _props_padded = props.padded, padded = _props_padded === void 0 ? true : _props_padded, className = props.className;
|
|
103
225
|
return /*#__PURE__*/ _jsx("div", {
|
|
104
|
-
className: "flex-1 overflow-auto",
|
|
226
|
+
className: "Litho-Pane__Content flex-1 overflow-auto ".concat(padded ? "p-2" : "", " ").concat(className),
|
|
105
227
|
children: children
|
|
106
228
|
});
|
|
107
229
|
}
|
|
@@ -110,7 +232,7 @@ function Footer() {
|
|
|
110
232
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
111
233
|
var children = props.children, _props_topBorder = props.topBorder, topBorder = _props_topBorder === void 0 ? true : _props_topBorder;
|
|
112
234
|
return /*#__PURE__*/ _jsx("div", {
|
|
113
|
-
className: "min-h-
|
|
235
|
+
className: "Litho-Pane__Footer min-h-12 ".concat(topBorder ? "border-t border-edge-subdued" : ""),
|
|
114
236
|
children: children
|
|
115
237
|
});
|
|
116
238
|
}
|
|
@@ -98,7 +98,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
98
98
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
99
99
|
}
|
|
100
100
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
101
|
-
import { useEffect, useId, useMemo, useRef, useState, useLayoutEffect } from "react";
|
|
101
|
+
import React, { useEffect, useId, useMemo, useRef, useState, useLayoutEffect } from "react";
|
|
102
102
|
import { createPortal } from "react-dom";
|
|
103
103
|
import { tv } from "tailwind-variants";
|
|
104
104
|
import PopoverManager from "./PopoverManager.js";
|
|
@@ -133,13 +133,13 @@ var styles = tv({
|
|
|
133
133
|
* @param {boolean} [props.sectioned=false] - Whether the popover content is sectioned with padding.
|
|
134
134
|
* @param {string} [props.preferredAlignment="center"] - Preferred alignment for the popover (left, center, right).
|
|
135
135
|
* @param {string} [props.preferredPosition="below"] - Preferred position for the popover (above, below, cover).
|
|
136
|
-
* @param {boolean|string} [props.autofocusTarget=false] - Automatically focus on the first focusable element in the popover.
|
|
137
136
|
* @param {string} [props.className] - Additional class name for the popover.
|
|
138
137
|
* @param {string} [props.containerClassName] - Additional class name for the popover container.
|
|
139
138
|
* @returns {JSX.Element} The rendered popover component.
|
|
140
139
|
*/ function Popover() {
|
|
141
140
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
142
|
-
var
|
|
141
|
+
var activatorWrapper = props.activatorWrapper, _props_activatorDisplayType = props.activatorDisplayType, activatorDisplayType = _props_activatorDisplayType === void 0 ? "inline-block" : _props_activatorDisplayType, activator = props.activator, children = props.children, onClose = props.onClose, active = props.active, fixed = props.fixed, zIndexOverride = props.zIndexOverride, _props_sectioned = props.sectioned, sectioned = _props_sectioned === void 0 ? false : _props_sectioned, _props_preferredAlignment = props.preferredAlignment, preferredAlignment = _props_preferredAlignment === void 0 ? "center" : _props_preferredAlignment, _props_preferredPosition = props.preferredPosition, preferredPosition = _props_preferredPosition === void 0 ? "below" : _props_preferredPosition, _props_matchActivatorWidth = props.matchActivatorWidth, matchActivatorWidth = _props_matchActivatorWidth === void 0 ? false : _props_matchActivatorWidth, _props_maxWidth = props.maxWidth, maxWidth = _props_maxWidth === void 0 ? "default" : _props_maxWidth, className = props.className, containerClassName = props.containerClassName;
|
|
142
|
+
var ActivatorWrapper = activatorWrapper || "div";
|
|
143
143
|
var idValue = useId();
|
|
144
144
|
var idRef = useRef(idValue);
|
|
145
145
|
var initialWidthRef = useRef(null);
|
|
@@ -328,18 +328,30 @@ var styles = tv({
|
|
|
328
328
|
}
|
|
329
329
|
Popover.displayName = "Popover";
|
|
330
330
|
var sectionStyles = tv({
|
|
331
|
-
base: "Litho-Popover__Section border-b border-edge-default last:border-b-0"
|
|
331
|
+
base: "Litho-Popover__Section border-b border-edge-default last:border-b-0",
|
|
332
|
+
variants: {
|
|
333
|
+
padded: {
|
|
334
|
+
true: "p-3",
|
|
335
|
+
false: ""
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
defaultVariants: {
|
|
339
|
+
padded: false
|
|
340
|
+
}
|
|
332
341
|
});
|
|
333
342
|
/**
|
|
334
343
|
* Section component for use within the Popover.
|
|
335
344
|
*
|
|
336
345
|
* @param {Object} props - The component props.
|
|
337
346
|
* @param {React.ReactNode} [props.children] - The content of the section.
|
|
347
|
+
* @param {boolean} [props.padded=false] - Whether the section has padding.
|
|
338
348
|
* @returns {JSX.Element} The rendered section.
|
|
339
349
|
*/ function Section() {
|
|
340
350
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
341
|
-
var children = props.children, className = props.className;
|
|
342
|
-
var sectionClasses = sectionStyles(
|
|
351
|
+
var children = props.children, className = props.className, _props_padded = props.padded, padded = _props_padded === void 0 ? false : _props_padded;
|
|
352
|
+
var sectionClasses = sectionStyles({
|
|
353
|
+
padded: padded
|
|
354
|
+
});
|
|
343
355
|
return /*#__PURE__*/ _jsx("div", {
|
|
344
356
|
className: "".concat(sectionClasses).concat(className ? " ".concat(className) : ""),
|
|
345
357
|
children: children
|
|
@@ -47,7 +47,9 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
47
47
|
}
|
|
48
48
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
49
49
|
import { useId, useRef, useState, useEffect } from "react";
|
|
50
|
-
import
|
|
50
|
+
import Label from "./Label.js";
|
|
51
|
+
import Text from "./Text.js";
|
|
52
|
+
import TextField from "./TextField.js";
|
|
51
53
|
import { tv } from "tailwind-variants";
|
|
52
54
|
var rangeStyles = tv({
|
|
53
55
|
base: "Litho-RangeSlider__ActiveRange absolute left-0 top-1/2 -translate-y-1/2 rounded-l-full h-1 pointer-events-none",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { tv } from "tailwind-variants";
|
|
3
|
-
import
|
|
3
|
+
import Spinner from "./Spinner.js";
|
|
4
|
+
import VerticalStack from "./VerticalStack.js";
|
|
4
5
|
var styles = tv({
|
|
5
6
|
base: "Litho-ResourceList flex flex-col min-w-72",
|
|
6
7
|
variants: {
|
|
@@ -122,6 +122,8 @@ var contentStyles = tv({
|
|
|
122
122
|
* @param {function} props.onFocus - Callback for when the select gains focus.
|
|
123
123
|
* @param {function} props.onBlur - Callback for when the select loses focus.
|
|
124
124
|
* @param {boolean} [props.requiredIndicator] - Whether to show a required indicator next to the label.
|
|
125
|
+
* @param {string} [props.className] - Additional CSS classes to apply to the select container.
|
|
126
|
+
* @param {string} [props.contentClassName] - Additional CSS classes to apply to the select content area.
|
|
125
127
|
* @returns {JSX.Element} The rendered Select component.
|
|
126
128
|
*/ function Select() {
|
|
127
129
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
function _define_property(obj, key, value) {
|
|
3
|
+
if (key in obj) {
|
|
4
|
+
Object.defineProperty(obj, key, {
|
|
5
|
+
value: value,
|
|
6
|
+
enumerable: true,
|
|
7
|
+
configurable: true,
|
|
8
|
+
writable: true
|
|
9
|
+
});
|
|
10
|
+
} else {
|
|
11
|
+
obj[key] = value;
|
|
12
|
+
}
|
|
13
|
+
return obj;
|
|
14
|
+
}
|
|
15
|
+
function _object_spread(target) {
|
|
16
|
+
for(var i = 1; i < arguments.length; i++){
|
|
17
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
18
|
+
var ownKeys = Object.keys(source);
|
|
19
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
20
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
21
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
22
|
+
}));
|
|
23
|
+
}
|
|
24
|
+
ownKeys.forEach(function(key) {
|
|
25
|
+
_define_property(target, key, source[key]);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
return target;
|
|
29
|
+
}
|
|
30
|
+
function ownKeys(object, enumerableOnly) {
|
|
31
|
+
var keys = Object.keys(object);
|
|
32
|
+
if (Object.getOwnPropertySymbols) {
|
|
33
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
34
|
+
if (enumerableOnly) {
|
|
35
|
+
symbols = symbols.filter(function(sym) {
|
|
36
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
keys.push.apply(keys, symbols);
|
|
40
|
+
}
|
|
41
|
+
return keys;
|
|
42
|
+
}
|
|
43
|
+
function _object_spread_props(target, source) {
|
|
44
|
+
source = source != null ? source : {};
|
|
45
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
46
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
47
|
+
} else {
|
|
48
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
49
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
return target;
|
|
53
|
+
}
|
|
54
|
+
function _object_without_properties(source, excluded) {
|
|
55
|
+
if (source == null) return {};
|
|
56
|
+
var target = _object_without_properties_loose(source, excluded);
|
|
57
|
+
var key, i;
|
|
58
|
+
if (Object.getOwnPropertySymbols) {
|
|
59
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
60
|
+
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
61
|
+
key = sourceSymbolKeys[i];
|
|
62
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
63
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
64
|
+
target[key] = source[key];
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return target;
|
|
68
|
+
}
|
|
69
|
+
function _object_without_properties_loose(source, excluded) {
|
|
70
|
+
if (source == null) return {};
|
|
71
|
+
var target = {};
|
|
72
|
+
var sourceKeys = Object.keys(source);
|
|
73
|
+
var key, i;
|
|
74
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
75
|
+
key = sourceKeys[i];
|
|
76
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
77
|
+
target[key] = source[key];
|
|
78
|
+
}
|
|
79
|
+
return target;
|
|
80
|
+
}
|
|
81
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
82
|
+
import { tv } from "tailwind-variants";
|
|
83
|
+
var styles = tv({
|
|
84
|
+
base: "Litho-Stack flex",
|
|
85
|
+
variants: {
|
|
86
|
+
direction: {
|
|
87
|
+
vertical: "flex-col",
|
|
88
|
+
horizontal: "flex-row"
|
|
89
|
+
},
|
|
90
|
+
gap: {
|
|
91
|
+
// Semantic values (recommended)
|
|
92
|
+
none: "gap-0",
|
|
93
|
+
xs: "gap-1",
|
|
94
|
+
sm: "gap-2",
|
|
95
|
+
md: "gap-4",
|
|
96
|
+
lg: "gap-8",
|
|
97
|
+
// Numeric values (backwards compatibility)
|
|
98
|
+
"0": "gap-0",
|
|
99
|
+
"px": "gap-px",
|
|
100
|
+
"0.5": "gap-0.5",
|
|
101
|
+
"1": "gap-1",
|
|
102
|
+
"2": "gap-2",
|
|
103
|
+
"3": "gap-3",
|
|
104
|
+
"4": "gap-4",
|
|
105
|
+
"5": "gap-5",
|
|
106
|
+
"6": "gap-6",
|
|
107
|
+
"8": "gap-8",
|
|
108
|
+
"10": "gap-10"
|
|
109
|
+
},
|
|
110
|
+
align: {
|
|
111
|
+
start: "justify-start",
|
|
112
|
+
center: "justify-center",
|
|
113
|
+
end: "justify-end",
|
|
114
|
+
"space-between": "justify-between",
|
|
115
|
+
"space-evenly": "justify-evenly",
|
|
116
|
+
"space-around": "justify-around",
|
|
117
|
+
spaceBetween: "justify-between"
|
|
118
|
+
},
|
|
119
|
+
blockAlign: {
|
|
120
|
+
start: "items-start",
|
|
121
|
+
center: "items-center",
|
|
122
|
+
end: "items-end",
|
|
123
|
+
stretch: "items-stretch"
|
|
124
|
+
},
|
|
125
|
+
inlineAlign: {
|
|
126
|
+
start: "items-start",
|
|
127
|
+
center: "items-center",
|
|
128
|
+
end: "items-end",
|
|
129
|
+
stretch: "items-stretch"
|
|
130
|
+
},
|
|
131
|
+
wrap: {
|
|
132
|
+
true: "flex-wrap",
|
|
133
|
+
false: "flex-nowrap"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
defaultVariants: {
|
|
137
|
+
direction: "vertical",
|
|
138
|
+
gap: "md",
|
|
139
|
+
align: "start"
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
/**
|
|
143
|
+
* Stack Component
|
|
144
|
+
*
|
|
145
|
+
* A flexible stack component for creating vertical or horizontal layouts with customizable spacing and alignment.
|
|
146
|
+
* By default, creates a vertical stack with medium gap spacing.
|
|
147
|
+
*
|
|
148
|
+
* @param {Object} [props={}] - Component props.
|
|
149
|
+
* @param {string} [props.as='div'] - The HTML element to render. Defaults to `div`.
|
|
150
|
+
* @param {React.ReactNode} [props.children] - Child elements to render inside the stack.
|
|
151
|
+
* @param {boolean} [props.horizontal=false] - If true, renders a horizontal stack (flex-row). Defaults to vertical (flex-col).
|
|
152
|
+
* @param {('none'|'xs'|'sm'|'md'|'lg'|'0'|'px'|'0.5'|'1'|'2'|'3'|'4'|'5'|'6'|'8'|'10')} [props.gap='md'] - Spacing between children. Semantic options: 'none' (0), 'xs' (1), 'sm' (2), 'md' (4), 'lg' (8). Numeric options: '0', 'px', '0.5', '1', '2', '3', '4', '5', '6', '8', '10'. Defaults to 'md'.
|
|
153
|
+
* @param {string} [props.id] - Optional ID for the component.
|
|
154
|
+
* @param {string} [props.className] - Additional custom class names to apply to the component.
|
|
155
|
+
* @param {('start'|'center'|'end'|'space-between'|'space-evenly'|'space-around'|'spaceBetween')} [props.align='start'] - Main axis alignment. Controls horizontal alignment for horizontal stacks and vertical alignment for vertical stacks.
|
|
156
|
+
* @param {('start'|'center'|'end'|'stretch')} [props.blockAlign] - Cross-axis alignment for horizontal stacks (vertical alignment). Only applicable when horizontal=true.
|
|
157
|
+
* @param {('start'|'center'|'end'|'stretch')} [props.inlineAlign] - Cross-axis alignment for vertical stacks (horizontal alignment). Only applicable when horizontal=false.
|
|
158
|
+
* @param {boolean} [props.wrap=false] - Whether children should wrap to the next line if necessary. Defaults to false.
|
|
159
|
+
* @param {Object} [restProps] - Additional props passed to the root element.
|
|
160
|
+
*
|
|
161
|
+
* @returns {JSX.Element} The rendered Stack component.
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
* // Vertical stack (default)
|
|
165
|
+
* <Stack gap="sm" inlineAlign="center">
|
|
166
|
+
* <div>Item 1</div>
|
|
167
|
+
* <div>Item 2</div>
|
|
168
|
+
* </Stack>
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* // Horizontal stack
|
|
172
|
+
* <Stack horizontal gap="md" blockAlign="center" wrap={true}>
|
|
173
|
+
* <div>Item 1</div>
|
|
174
|
+
* <div>Item 2</div>
|
|
175
|
+
* </Stack>
|
|
176
|
+
*/ function Stack() {
|
|
177
|
+
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
178
|
+
var _props_as = props.as, as = _props_as === void 0 ? "div" : _props_as, children = props.children, _props_horizontal = props.horizontal, horizontal = _props_horizontal === void 0 ? false : _props_horizontal, _props_gap = props.gap, gap = _props_gap === void 0 ? "md" : _props_gap, id = props.id, className = props.className, align = props.align, blockAlign = props.blockAlign, inlineAlign = props.inlineAlign, _props_wrap = props.wrap, wrap = _props_wrap === void 0 ? false : _props_wrap, restProps = _object_without_properties(props, [
|
|
179
|
+
"as",
|
|
180
|
+
"children",
|
|
181
|
+
"horizontal",
|
|
182
|
+
"gap",
|
|
183
|
+
"id",
|
|
184
|
+
"className",
|
|
185
|
+
"align",
|
|
186
|
+
"blockAlign",
|
|
187
|
+
"inlineAlign",
|
|
188
|
+
"wrap"
|
|
189
|
+
]);
|
|
190
|
+
var direction = horizontal ? "horizontal" : "vertical";
|
|
191
|
+
// For horizontal stacks, use blockAlign for cross-axis
|
|
192
|
+
// For vertical stacks, use inlineAlign for cross-axis
|
|
193
|
+
var crossAxisAlign = horizontal ? blockAlign : inlineAlign;
|
|
194
|
+
var classes = styles(_object_spread_props(_object_spread({
|
|
195
|
+
direction: direction,
|
|
196
|
+
gap: gap,
|
|
197
|
+
align: align
|
|
198
|
+
}, horizontal && blockAlign ? {
|
|
199
|
+
blockAlign: blockAlign
|
|
200
|
+
} : {}, !horizontal && inlineAlign ? {
|
|
201
|
+
inlineAlign: inlineAlign
|
|
202
|
+
} : {}), {
|
|
203
|
+
wrap: wrap
|
|
204
|
+
}));
|
|
205
|
+
var Element = as;
|
|
206
|
+
return /*#__PURE__*/ _jsx(Element, _object_spread_props(_object_spread({
|
|
207
|
+
id: id,
|
|
208
|
+
className: "".concat(classes).concat(className ? " ".concat(className) : "")
|
|
209
|
+
}, restProps), {
|
|
210
|
+
children: children
|
|
211
|
+
}));
|
|
212
|
+
}
|
|
213
|
+
export default Stack;
|
|
@@ -145,7 +145,19 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
145
145
|
import { SortAscendingMajor, SortDescendingMajor } from "@shopify/polaris-icons";
|
|
146
146
|
import React, { Children, cloneElement, createContext, isValidElement, useCallback, useContext, useEffect, useId, useMemo, useRef, useState } from "react";
|
|
147
147
|
import { ModalContext } from "./Modal.js";
|
|
148
|
-
import
|
|
148
|
+
import ActionList from "./ActionList.js";
|
|
149
|
+
import Button from "./Button.js";
|
|
150
|
+
import ButtonGroup from "./ButtonGroup.js";
|
|
151
|
+
import Card from "./Card.js";
|
|
152
|
+
import Checkbox from "./Checkbox.js";
|
|
153
|
+
import EmptyState from "./EmptyState.js";
|
|
154
|
+
import Icon from "./Icon.js";
|
|
155
|
+
import Pagination from "./Pagination.js";
|
|
156
|
+
import Popover from "./Popover.js";
|
|
157
|
+
import SkeletonText from "./SkeletonText.js";
|
|
158
|
+
import Spinner from "./Spinner.js";
|
|
159
|
+
import Text from "./Text.js";
|
|
160
|
+
import Tooltip from "./Tooltip.js";
|
|
149
161
|
import { styles } from "../styles/Table.js";
|
|
150
162
|
import { SelectionType } from "../utilities/useIndexResourceState.js";
|
|
151
163
|
import { useMounted } from "../utilities/useMounted.js";
|
|
@@ -475,7 +487,8 @@ var TableWrapperContext = /*#__PURE__*/ createContext({});
|
|
|
475
487
|
alignment: alignment,
|
|
476
488
|
verticalAlign: verticalAlign,
|
|
477
489
|
tableIsSelectable: selectable,
|
|
478
|
-
headingStyle: headingStyle
|
|
490
|
+
headingStyle: headingStyle,
|
|
491
|
+
bordered: bordered
|
|
479
492
|
}),
|
|
480
493
|
style: {
|
|
481
494
|
width: width,
|
|
@@ -750,7 +763,7 @@ var TableWrapperContext = /*#__PURE__*/ createContext({});
|
|
|
750
763
|
ref: containerRef,
|
|
751
764
|
children: [
|
|
752
765
|
/*#__PURE__*/ _jsxs("div", {
|
|
753
|
-
className: "relative overflow-hidden",
|
|
766
|
+
className: "relative overflow-hidden ".concat(bordered ? "rounded-md" : ""),
|
|
754
767
|
children: [
|
|
755
768
|
loading ? /*#__PURE__*/ _jsx("div", {
|
|
756
769
|
className: "pt-9",
|
|
@@ -1014,7 +1027,7 @@ Table.Cell.displayName = "Table.Cell";
|
|
|
1014
1027
|
borderTop: true,
|
|
1015
1028
|
paddedHalf: paddedHalf,
|
|
1016
1029
|
children: /*#__PURE__*/ _jsxs("div", {
|
|
1017
|
-
className: "flex justify-start",
|
|
1030
|
+
className: "flex justify-start items-center gap-2",
|
|
1018
1031
|
children: [
|
|
1019
1032
|
/*#__PURE__*/ _jsx(Pagination, {
|
|
1020
1033
|
hasPrevious: hasPreviousPage,
|