@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
|
@@ -3,10 +3,18 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
function _export(target, all) {
|
|
7
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
_export(exports, {
|
|
13
|
+
get default () {
|
|
9
14
|
return _default;
|
|
15
|
+
},
|
|
16
|
+
get useFrame () {
|
|
17
|
+
return useFrame;
|
|
10
18
|
}
|
|
11
19
|
});
|
|
12
20
|
var _jsxruntime = require("react/jsx-runtime");
|
|
@@ -14,7 +22,12 @@ var _react = require("react");
|
|
|
14
22
|
var _AppProvider = require("../components/AppProvider");
|
|
15
23
|
var _tailwindvariants = require("tailwind-variants");
|
|
16
24
|
var _polarisicons = require("@shopify/polaris-icons");
|
|
17
|
-
var
|
|
25
|
+
var _Button = /*#__PURE__*/ _interop_require_default(require("./Button"));
|
|
26
|
+
var _Icon = /*#__PURE__*/ _interop_require_default(require("./Icon"));
|
|
27
|
+
var _FrameSaveBar = /*#__PURE__*/ _interop_require_default(require("./FrameSaveBar"));
|
|
28
|
+
var _TopBar = /*#__PURE__*/ _interop_require_default(require("./TopBar"));
|
|
29
|
+
var _Popover = /*#__PURE__*/ _interop_require_default(require("./Popover"));
|
|
30
|
+
var _ActionList = /*#__PURE__*/ _interop_require_default(require("./ActionList"));
|
|
18
31
|
function _array_like_to_array(arr, len) {
|
|
19
32
|
if (len == null || len > arr.length) len = arr.length;
|
|
20
33
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
@@ -23,6 +36,11 @@ function _array_like_to_array(arr, len) {
|
|
|
23
36
|
function _array_with_holes(arr) {
|
|
24
37
|
if (Array.isArray(arr)) return arr;
|
|
25
38
|
}
|
|
39
|
+
function _interop_require_default(obj) {
|
|
40
|
+
return obj && obj.__esModule ? obj : {
|
|
41
|
+
default: obj
|
|
42
|
+
};
|
|
43
|
+
}
|
|
26
44
|
function _iterable_to_array_limit(arr, i) {
|
|
27
45
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
28
46
|
if (_i == null) return;
|
|
@@ -164,15 +182,18 @@ var logoStyles = (0, _tailwindvariants.tv)({
|
|
|
164
182
|
* @param {number} props.logo.width - Width of the logo image.
|
|
165
183
|
* @param {boolean} props.showSearchTrigger - Whether to show the search trigger.
|
|
166
184
|
* @param {React.ReactNode} props.searchModal - Modal to render as the search modal.
|
|
167
|
-
* @param {function} props.
|
|
185
|
+
* @param {function} props.onToggleSearch - Function to toggle the search modal.
|
|
168
186
|
* @param {string} [props.className] - Additional CSS classes for the Frame.
|
|
169
187
|
* @param {React.ReactNode} props.children - Content to render within the Frame.
|
|
170
188
|
* @param {boolean} [props.alwaysShowUserMenuInTopBar] - Whether to always show the user menu in the top bar.
|
|
171
189
|
* @param {React.ReactNode} [props.headerAccessory] - Accessory to render in the header.
|
|
172
190
|
* @returns {React.ReactElement} The rendered Frame component.
|
|
173
191
|
*/ var Frame = function(param) {
|
|
174
|
-
var navigation = param.navigation, announcement = param.announcement, logo = param.logo, children = param.children, className = param.className, userMenu = param.userMenu, moreActions = param.moreActions, _param_showSearchTrigger = param.showSearchTrigger, showSearchTrigger = _param_showSearchTrigger === void 0 ? true : _param_showSearchTrigger, _param_alwaysShowUserMenuInTopBar = param.alwaysShowUserMenuInTopBar, alwaysShowUserMenuInTopBar = _param_alwaysShowUserMenuInTopBar === void 0 ? false : _param_alwaysShowUserMenuInTopBar,
|
|
175
|
-
|
|
192
|
+
var navigation = param.navigation, announcement = param.announcement, logo = param.logo, children = param.children, className = param.className, userMenu = param.userMenu, moreActions = param.moreActions, _param_showSearchTrigger = param.showSearchTrigger, showSearchTrigger = _param_showSearchTrigger === void 0 ? true : _param_showSearchTrigger, _param_alwaysShowUserMenuInTopBar = param.alwaysShowUserMenuInTopBar, alwaysShowUserMenuInTopBar = _param_alwaysShowUserMenuInTopBar === void 0 ? false : _param_alwaysShowUserMenuInTopBar, _param_searchLabel = param.searchLabel, searchLabel = _param_searchLabel === void 0 ? "Search" : _param_searchLabel, _param_searchIcon = param.searchIcon, searchIcon = _param_searchIcon === void 0 ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_Icon.default, {
|
|
193
|
+
source: _polarisicons.SearchMajor,
|
|
194
|
+
color: "subdued"
|
|
195
|
+
}) : _param_searchIcon, searchModal = param.searchModal, onToggleSearch = param.onToggleSearch, headerAccessory = param.headerAccessory;
|
|
196
|
+
var darkMode = (0, _AppProvider.useDarkMode)().darkMode;
|
|
176
197
|
var _useContext = (0, _react.useContext)(_AppProvider.FrameContext), contentIsInIframe = _useContext.contentIsInIframe, contentIsFullPage = _useContext.contentIsFullPage, showMobileNavigation = _useContext.showMobileNavigation, setShowMobileNavigation = _useContext.setShowMobileNavigation, modalIsOpen = _useContext.modalIsOpen, paneIsOpen = _useContext.paneIsOpen, embedded = _useContext.embedded;
|
|
177
198
|
var _useState = _sliced_to_array((0, _react.useState)(""), 2), searchTriggerShortcutText = _useState[0], setSearchTriggerShortcutText = _useState[1];
|
|
178
199
|
(0, _react.useEffect)(function() {
|
|
@@ -209,7 +230,7 @@ var logoStyles = (0, _tailwindvariants.tv)({
|
|
|
209
230
|
var handleSearchShortcut = function(e) {
|
|
210
231
|
if ((e.metaKey || e.ctrlKey) && e.key === "k") {
|
|
211
232
|
e.preventDefault();
|
|
212
|
-
|
|
233
|
+
onToggleSearch();
|
|
213
234
|
}
|
|
214
235
|
};
|
|
215
236
|
window.addEventListener("keydown", handleSearchShortcut);
|
|
@@ -228,22 +249,19 @@ var logoStyles = (0, _tailwindvariants.tv)({
|
|
|
228
249
|
contentIsFullPage,
|
|
229
250
|
navigation
|
|
230
251
|
]);
|
|
231
|
-
var logoSource = darkMode ? logo.darkSource : logo.source;
|
|
252
|
+
var logoSource = logo ? darkMode ? logo === null || logo === void 0 ? void 0 : logo.darkSource : logo === null || logo === void 0 ? void 0 : logo.source : undefined;
|
|
232
253
|
var searchTrigger = showSearchTrigger ? /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
233
254
|
className: "w-full pl-2 pr-3 h-8 rounded-md flex items-center gap-2 cursor-pointer bg-tint-2 hover:bg-tint-3 active:bg-tint-4 dark:bg-tint-alt-2 dark:hover:bg-tint-alt-3 dark:active:bg-tint-alt-4",
|
|
234
255
|
onClick: function() {
|
|
235
|
-
return
|
|
256
|
+
return onToggleSearch();
|
|
236
257
|
},
|
|
237
258
|
children: [
|
|
238
|
-
|
|
239
|
-
source: _polarisicons.SearchMajor,
|
|
240
|
-
color: "subdued"
|
|
241
|
-
}),
|
|
259
|
+
searchIcon,
|
|
242
260
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
243
261
|
className: "flex-1 text-low flex items-center justify-between gap-1",
|
|
244
262
|
children: [
|
|
245
263
|
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
|
|
246
|
-
children:
|
|
264
|
+
children: searchLabel
|
|
247
265
|
}),
|
|
248
266
|
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
|
|
249
267
|
className: "text-xs text-lowest hidden @md:block",
|
|
@@ -267,13 +285,13 @@ var logoStyles = (0, _tailwindvariants.tv)({
|
|
|
267
285
|
modalIsOpen: modalIsOpen,
|
|
268
286
|
alwaysShowLogo: alwaysShowLogo
|
|
269
287
|
}),
|
|
270
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("a", {
|
|
288
|
+
children: logo && /*#__PURE__*/ (0, _jsxruntime.jsx)("a", {
|
|
271
289
|
href: logo.url,
|
|
272
290
|
className: "block py-1 px-2 relative -left-2 ".concat(logo.url ? " cursor-pointer" : ""),
|
|
273
291
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("img", {
|
|
274
292
|
src: logoSource,
|
|
275
293
|
alt: logo.accessibilityLabel,
|
|
276
|
-
style:
|
|
294
|
+
style: logo.width ? {
|
|
277
295
|
width: logo.width
|
|
278
296
|
} : undefined
|
|
279
297
|
})
|
|
@@ -281,7 +299,7 @@ var logoStyles = (0, _tailwindvariants.tv)({
|
|
|
281
299
|
}),
|
|
282
300
|
!contentIsFullPage && /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
283
301
|
children: [
|
|
284
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
302
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_FrameSaveBar.default, {
|
|
285
303
|
logo: logo
|
|
286
304
|
}),
|
|
287
305
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
@@ -290,7 +308,7 @@ var logoStyles = (0, _tailwindvariants.tv)({
|
|
|
290
308
|
}),
|
|
291
309
|
children: [
|
|
292
310
|
announcement,
|
|
293
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
311
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_TopBar.default, {
|
|
294
312
|
hasNavigation: !!navigation,
|
|
295
313
|
userMenu: userMenu,
|
|
296
314
|
headerAccessory: headerAccessory,
|
|
@@ -333,7 +351,7 @@ var logoStyles = (0, _tailwindvariants.tv)({
|
|
|
333
351
|
className: "truncate",
|
|
334
352
|
children: userMenu
|
|
335
353
|
}),
|
|
336
|
-
moreActions && /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
354
|
+
moreActions && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Popover.default, {
|
|
337
355
|
active: showMoreActionsPopover,
|
|
338
356
|
onClose: function() {
|
|
339
357
|
return setShowMoreActionsPopover(false);
|
|
@@ -341,7 +359,7 @@ var logoStyles = (0, _tailwindvariants.tv)({
|
|
|
341
359
|
preferredAlignment: "right",
|
|
342
360
|
preferredPosition: "above",
|
|
343
361
|
containerClassName: "shrink-0 whitespace-nowrap flex-none",
|
|
344
|
-
activator: /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
362
|
+
activator: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Button.default, {
|
|
345
363
|
icon: _polarisicons.QuestionMarkInverseMajor,
|
|
346
364
|
iconColor: "subdued",
|
|
347
365
|
plain: true,
|
|
@@ -349,7 +367,7 @@ var logoStyles = (0, _tailwindvariants.tv)({
|
|
|
349
367
|
return setShowMoreActionsPopover(!showMoreActionsPopover);
|
|
350
368
|
}
|
|
351
369
|
}),
|
|
352
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
370
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_ActionList.default, {
|
|
353
371
|
sections: moreActions,
|
|
354
372
|
onActionAnyItem: function() {
|
|
355
373
|
return setShowMoreActionsPopover(false);
|
|
@@ -370,7 +388,7 @@ var logoStyles = (0, _tailwindvariants.tv)({
|
|
|
370
388
|
},
|
|
371
389
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
372
390
|
className: "fixed cursor-pointer top-2.5 @md:hidden p-2 rounded-full bg-tint-10 hover:bg-tint-12 dark:bg-tint-alt-10 dark:hover:bg-tint-alt-12 left-56.5",
|
|
373
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
391
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Icon.default, {
|
|
374
392
|
source: _polarisicons.CancelMajor,
|
|
375
393
|
color: "alternate"
|
|
376
394
|
})
|
|
@@ -383,4 +401,11 @@ var logoStyles = (0, _tailwindvariants.tv)({
|
|
|
383
401
|
})
|
|
384
402
|
});
|
|
385
403
|
};
|
|
404
|
+
var useFrame = function() {
|
|
405
|
+
var context = (0, _react.useContext)(_AppProvider.FrameContext);
|
|
406
|
+
if (!context) {
|
|
407
|
+
throw new Error("useFrame must be used within a FrameProvider");
|
|
408
|
+
}
|
|
409
|
+
return context;
|
|
410
|
+
};
|
|
386
411
|
var _default = Frame;
|
|
@@ -13,8 +13,12 @@ var _jsxruntime = require("react/jsx-runtime");
|
|
|
13
13
|
var _react = require("react");
|
|
14
14
|
var _AppProvider = require("../components/AppProvider");
|
|
15
15
|
var _tailwindvariants = require("tailwind-variants");
|
|
16
|
-
var
|
|
16
|
+
var _Button = /*#__PURE__*/ _interop_require_default(require("./Button"));
|
|
17
|
+
var _Text = /*#__PURE__*/ _interop_require_default(require("./Text"));
|
|
18
|
+
var _Icon = /*#__PURE__*/ _interop_require_default(require("./Icon"));
|
|
19
|
+
var _Tooltip = /*#__PURE__*/ _interop_require_default(require("./Tooltip"));
|
|
17
20
|
var _polarisicons = require("@shopify/polaris-icons");
|
|
21
|
+
var _Frame = require("./Frame");
|
|
18
22
|
function _array_like_to_array(arr, len) {
|
|
19
23
|
if (len == null || len > arr.length) len = arr.length;
|
|
20
24
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
@@ -23,6 +27,11 @@ function _array_like_to_array(arr, len) {
|
|
|
23
27
|
function _array_with_holes(arr) {
|
|
24
28
|
if (Array.isArray(arr)) return arr;
|
|
25
29
|
}
|
|
30
|
+
function _interop_require_default(obj) {
|
|
31
|
+
return obj && obj.__esModule ? obj : {
|
|
32
|
+
default: obj
|
|
33
|
+
};
|
|
34
|
+
}
|
|
26
35
|
function _iterable_to_array_limit(arr, i) {
|
|
27
36
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
28
37
|
if (_i == null) return;
|
|
@@ -106,8 +115,8 @@ var toggleStyles = (0, _tailwindvariants.tv)({
|
|
|
106
115
|
* @returns {JSX.Element} The rendered FrameSaveBar component
|
|
107
116
|
*/ function FrameSaveBar(param) {
|
|
108
117
|
var logo = param.logo;
|
|
109
|
-
var darkMode = (0,
|
|
110
|
-
var paneIsOpen = (0,
|
|
118
|
+
var darkMode = (0, _AppProvider.useDarkMode)().darkMode;
|
|
119
|
+
var paneIsOpen = (0, _Frame.useFrame)().paneIsOpen;
|
|
111
120
|
var _useContext = (0, _react.useContext)(_AppProvider.FormContext), showGlobalContextualSaveBar = _useContext.showGlobalContextualSaveBar, message = _useContext.message, saveAction = _useContext.saveAction, discardAction = _useContext.discardAction;
|
|
112
121
|
var _useState = _sliced_to_array((0, _react.useState)(false), 2), visible = _useState[0], setVisible = _useState[1];
|
|
113
122
|
var _useState1 = _sliced_to_array((0, _react.useState)(false), 2), show = _useState1[0], setShow = _useState1[1];
|
|
@@ -133,7 +142,7 @@ var toggleStyles = (0, _tailwindvariants.tv)({
|
|
|
133
142
|
}, [
|
|
134
143
|
showGlobalContextualSaveBar
|
|
135
144
|
]);
|
|
136
|
-
var logoSource = darkMode ? logo.source : logo.darkSource;
|
|
145
|
+
var logoSource = logo ? darkMode ? logo === null || logo === void 0 ? void 0 : logo.source : logo === null || logo === void 0 ? void 0 : logo.darkSource : undefined;
|
|
137
146
|
if (!visible) return null;
|
|
138
147
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
139
148
|
children: [
|
|
@@ -142,7 +151,7 @@ var toggleStyles = (0, _tailwindvariants.tv)({
|
|
|
142
151
|
tucked: tucked,
|
|
143
152
|
paneIsOpen: paneIsOpen
|
|
144
153
|
}),
|
|
145
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
154
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Tooltip.default, {
|
|
146
155
|
content: "Show save bar",
|
|
147
156
|
position: "below",
|
|
148
157
|
alignment: "center",
|
|
@@ -151,7 +160,7 @@ var toggleStyles = (0, _tailwindvariants.tv)({
|
|
|
151
160
|
onClick: function() {
|
|
152
161
|
return setTucked(false);
|
|
153
162
|
},
|
|
154
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
163
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Icon.default, {
|
|
155
164
|
source: _polarisicons.ChevronDownMinor,
|
|
156
165
|
color: "FrameSaveBar"
|
|
157
166
|
})
|
|
@@ -167,7 +176,7 @@ var toggleStyles = (0, _tailwindvariants.tv)({
|
|
|
167
176
|
children: [
|
|
168
177
|
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
169
178
|
className: "hidden @md:block py-1 px-0.5 w-51.5",
|
|
170
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("img", {
|
|
179
|
+
children: logo && /*#__PURE__*/ (0, _jsxruntime.jsx)("img", {
|
|
171
180
|
src: logoSource,
|
|
172
181
|
alt: logo.accessibilityLabel,
|
|
173
182
|
style: (logo === null || logo === void 0 ? void 0 : logo.width) ? {
|
|
@@ -181,7 +190,7 @@ var toggleStyles = (0, _tailwindvariants.tv)({
|
|
|
181
190
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
182
191
|
className: "flex items-center gap-2 min-w-0",
|
|
183
192
|
children: [
|
|
184
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
193
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Text.default, {
|
|
185
194
|
variant: "headingMd",
|
|
186
195
|
color: "FrameSaveBar",
|
|
187
196
|
truncate: true,
|
|
@@ -189,7 +198,7 @@ var toggleStyles = (0, _tailwindvariants.tv)({
|
|
|
189
198
|
}),
|
|
190
199
|
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
191
200
|
className: "hidden @md:block",
|
|
192
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
201
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Tooltip.default, {
|
|
193
202
|
content: "Hide save bar",
|
|
194
203
|
position: "below",
|
|
195
204
|
alignment: "center",
|
|
@@ -198,7 +207,7 @@ var toggleStyles = (0, _tailwindvariants.tv)({
|
|
|
198
207
|
onClick: function() {
|
|
199
208
|
return setTucked(true);
|
|
200
209
|
},
|
|
201
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
210
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Icon.default, {
|
|
202
211
|
source: _polarisicons.ChevronUpMinor,
|
|
203
212
|
color: "FrameSaveBar"
|
|
204
213
|
})
|
|
@@ -210,7 +219,7 @@ var toggleStyles = (0, _tailwindvariants.tv)({
|
|
|
210
219
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
211
220
|
className: "flex items-center gap-2",
|
|
212
221
|
children: [
|
|
213
|
-
discardAction && /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
222
|
+
discardAction && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Button.default, {
|
|
214
223
|
primary: true,
|
|
215
224
|
onClick: discardAction.onAction,
|
|
216
225
|
loading: discardAction.loading,
|
|
@@ -219,7 +228,7 @@ var toggleStyles = (0, _tailwindvariants.tv)({
|
|
|
219
228
|
className: discardAction.loading || discardAction.disabled ? "border-transparent!" : undefined,
|
|
220
229
|
children: discardAction.content
|
|
221
230
|
}),
|
|
222
|
-
saveAction && /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
231
|
+
saveAction && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Button.default, {
|
|
223
232
|
highlight: true,
|
|
224
233
|
onClick: saveAction.onAction,
|
|
225
234
|
loading: saveAction.loading,
|
|
@@ -93,7 +93,13 @@ var styles = (0, _tailwindvariants.tv)({
|
|
|
93
93
|
base: "Litho-HorizontalStack flex flex-row",
|
|
94
94
|
variants: {
|
|
95
95
|
gap: {
|
|
96
|
-
none: "",
|
|
96
|
+
none: "gap-0",
|
|
97
|
+
// Semantic values (recommended)
|
|
98
|
+
xs: "gap-1",
|
|
99
|
+
sm: "gap-2",
|
|
100
|
+
md: "gap-4",
|
|
101
|
+
lg: "gap-8",
|
|
102
|
+
// Numeric values (backwards compatibility)
|
|
97
103
|
"0": "gap-0",
|
|
98
104
|
"px": "gap-px",
|
|
99
105
|
"0.5": "gap-0.5",
|
|
@@ -101,6 +107,7 @@ var styles = (0, _tailwindvariants.tv)({
|
|
|
101
107
|
"2": "gap-2",
|
|
102
108
|
"3": "gap-3",
|
|
103
109
|
"4": "gap-4",
|
|
110
|
+
"5": "gap-5",
|
|
104
111
|
"6": "gap-6",
|
|
105
112
|
"8": "gap-8",
|
|
106
113
|
"10": "gap-10"
|
|
@@ -136,7 +143,7 @@ var styles = (0, _tailwindvariants.tv)({
|
|
|
136
143
|
* @param {Object} [props={}] - Component props.
|
|
137
144
|
* @param {string} [props.as='div'] - The HTML element to render. Defaults to `div`.
|
|
138
145
|
* @param {React.ReactNode} [props.children] - Child elements to render inside the stack.
|
|
139
|
-
* @param {
|
|
146
|
+
* @param {('none'|'xs'|'sm'|'md'|'lg'|'0'|'px'|'0.5'|'1'|'2'|'3'|'4'|'5'|'6'|'8'|'10')} [props.gap] - Spacing between children. Semantic options: 'none', 'xs' (1), 'sm' (2), 'md' (4), 'lg' (8). Numeric options: '0', 'px', '0.5', '1', '2', '3', '4', '5', '6', '8', '10'.
|
|
140
147
|
* @param {string} [props.id] - Optional ID for the component.
|
|
141
148
|
* @param {string} [props.className] - Additional custom class names to apply to the component.
|
|
142
149
|
* @param {string} [props.align='start'] - Horizontal alignment of children. Options: 'start', 'center', 'end'.
|
|
@@ -20,9 +20,9 @@ _export(exports, {
|
|
|
20
20
|
var _jsxruntime = require("react/jsx-runtime");
|
|
21
21
|
var _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
22
22
|
var _tailwindvariants = require("tailwind-variants");
|
|
23
|
-
var _AppProvider = require("../components/AppProvider");
|
|
24
23
|
var _LayoutSection = /*#__PURE__*/ _interop_require_default(require("./LayoutSection"));
|
|
25
24
|
var _Text = /*#__PURE__*/ _interop_require_default(require("./Text"));
|
|
25
|
+
var _Frame = require("./Frame");
|
|
26
26
|
function _interop_require_default(obj) {
|
|
27
27
|
return obj && obj.__esModule ? obj : {
|
|
28
28
|
default: obj
|
|
@@ -106,7 +106,7 @@ var styles = (0, _tailwindvariants.tv)({
|
|
|
106
106
|
* @returns {JSX.Element} The rendered layout component.
|
|
107
107
|
*/ function Layout() {
|
|
108
108
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
109
|
-
var embedded = (0,
|
|
109
|
+
var embedded = (0, _Frame.useFrame)().embedded;
|
|
110
110
|
var children = props.children;
|
|
111
111
|
var analyzeChildren = function(children) {
|
|
112
112
|
var depth = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
@@ -195,7 +195,7 @@ var annotatedSectionStyles = (0, _tailwindvariants.tv)({
|
|
|
195
195
|
*/ function AnnotatedSection() {
|
|
196
196
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
197
197
|
var children = props.children, title = props.title, description = props.description;
|
|
198
|
-
var embedded = (0,
|
|
198
|
+
var embedded = (0, _Frame.useFrame)().embedded;
|
|
199
199
|
var annotatedSectionClasses = annotatedSectionStyles({
|
|
200
200
|
embedded: embedded
|
|
201
201
|
});
|
|
@@ -12,8 +12,8 @@ Object.defineProperty(exports, "default", {
|
|
|
12
12
|
var _jsxruntime = require("react/jsx-runtime");
|
|
13
13
|
var _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
14
14
|
var _tailwindvariants = require("tailwind-variants");
|
|
15
|
-
var _AppProvider = require("../components/AppProvider");
|
|
16
15
|
var _Layout = require("./Layout");
|
|
16
|
+
var _Frame = require("./Frame");
|
|
17
17
|
function _getRequireWildcardCache(nodeInterop) {
|
|
18
18
|
if (typeof WeakMap !== "function") return null;
|
|
19
19
|
var cacheBabelInterop = new WeakMap();
|
|
@@ -110,7 +110,7 @@ var sectionStyles = (0, _tailwindvariants.tv)({
|
|
|
110
110
|
*/ function Section() {
|
|
111
111
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
112
112
|
var children = props.children, _props_sidebar = props.sidebar, sidebar = _props_sidebar === void 0 ? false : _props_sidebar, className = props.className, sticky = props.sticky;
|
|
113
|
-
var embedded = (0,
|
|
113
|
+
var embedded = (0, _Frame.useFrame)().embedded;
|
|
114
114
|
var parentHasSidebar = (0, _react.useContext)(_Layout.LayoutContext).parentHasSidebar;
|
|
115
115
|
var sectionClasses = sectionStyles({
|
|
116
116
|
sidebar: sidebar,
|
|
@@ -101,11 +101,13 @@ var styles = (0, _tailwindvariants.tv)({
|
|
|
101
101
|
* @param {boolean} [props.removeUnderline=false] - If true, removes underline from the link.
|
|
102
102
|
* @param {string} [props.accessibilityLabel] - Optional aria-label for accessibility.
|
|
103
103
|
* @param {string} [props.dataPrimaryLink] - Optional data attribute for custom tracking.
|
|
104
|
-
*
|
|
104
|
+
* @param {Function} [props.onMouseEnter] - Optional mouse enter event handler for the link.
|
|
105
|
+
* @param {Function} [props.onMouseLeave] - Optional mouse leave event handler for the link.
|
|
106
|
+
*
|
|
105
107
|
* @returns {JSX.Element} Rendered link element.
|
|
106
108
|
*/ function Link() {
|
|
107
109
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
108
|
-
var url = props.url, children = props.children, onClick = props.onClick, external = props.external, target = props.target, _props_bold = props.bold, bold = _props_bold === void 0 ? false : _props_bold, _props_disabled = props.disabled, disabled = _props_disabled === void 0 ? false : _props_disabled, id = props.id, monochrome = props.monochrome, removeUnderline = props.removeUnderline, accessibilityLabel = props.accessibilityLabel, dataPrimaryLink = props.dataPrimaryLink, color = props.color, className = props.className;
|
|
110
|
+
var url = props.url, children = props.children, onClick = props.onClick, external = props.external, target = props.target, _props_bold = props.bold, bold = _props_bold === void 0 ? false : _props_bold, _props_disabled = props.disabled, disabled = _props_disabled === void 0 ? false : _props_disabled, id = props.id, monochrome = props.monochrome, removeUnderline = props.removeUnderline, accessibilityLabel = props.accessibilityLabel, dataPrimaryLink = props.dataPrimaryLink, color = props.color, className = props.className, onMouseEnter = props.onMouseEnter, onMouseLeave = props.onMouseLeave;
|
|
109
111
|
var classes = styles({
|
|
110
112
|
monochrome: monochrome,
|
|
111
113
|
removeUnderline: removeUnderline,
|
|
@@ -121,6 +123,8 @@ var styles = (0, _tailwindvariants.tv)({
|
|
|
121
123
|
id: id,
|
|
122
124
|
"aria-label": accessibilityLabel,
|
|
123
125
|
"data-primary-link": dataPrimaryLink,
|
|
126
|
+
onMouseEnter: onMouseEnter,
|
|
127
|
+
onMouseLeave: onMouseLeave,
|
|
124
128
|
children: children
|
|
125
129
|
});
|
|
126
130
|
}
|
|
@@ -14,13 +14,14 @@ var styles = (0, _tailwindvariants.tv)({
|
|
|
14
14
|
base: "Litho-List list-outside ml-5",
|
|
15
15
|
variants: {
|
|
16
16
|
type: {
|
|
17
|
+
none: "ml-0",
|
|
17
18
|
bullet: "list-disc",
|
|
18
19
|
number: "list-decimal"
|
|
19
20
|
},
|
|
20
21
|
spacing: {
|
|
21
|
-
loose: "space-y-
|
|
22
|
-
normal: "space-y-
|
|
23
|
-
tight: "space-y-
|
|
22
|
+
loose: "space-y-3",
|
|
23
|
+
normal: "space-y-2",
|
|
24
|
+
tight: "space-y-1"
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
27
|
});
|
|
@@ -10,11 +10,11 @@ Object.defineProperty(exports, "default", {
|
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
var _jsxruntime = require("react/jsx-runtime");
|
|
13
|
-
var _AppProvider = require("../components/AppProvider");
|
|
14
13
|
var _react = require("react");
|
|
15
14
|
var _polarisicons = require("@shopify/polaris-icons");
|
|
16
15
|
var _tailwindvariants = require("tailwind-variants");
|
|
17
|
-
var
|
|
16
|
+
var _Icon = /*#__PURE__*/ _interop_require_default(require("./Icon"));
|
|
17
|
+
var _Frame = require("./Frame");
|
|
18
18
|
function _array_like_to_array(arr, len) {
|
|
19
19
|
if (len == null || len > arr.length) len = arr.length;
|
|
20
20
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
@@ -23,6 +23,11 @@ function _array_like_to_array(arr, len) {
|
|
|
23
23
|
function _array_with_holes(arr) {
|
|
24
24
|
if (Array.isArray(arr)) return arr;
|
|
25
25
|
}
|
|
26
|
+
function _interop_require_default(obj) {
|
|
27
|
+
return obj && obj.__esModule ? obj : {
|
|
28
|
+
default: obj
|
|
29
|
+
};
|
|
30
|
+
}
|
|
26
31
|
function _iterable_to_array_limit(arr, i) {
|
|
27
32
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
28
33
|
if (_i == null) return;
|
|
@@ -118,7 +123,7 @@ var containerStyles = (0, _tailwindvariants.tv)({
|
|
|
118
123
|
*/ function Listbox() {
|
|
119
124
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
120
125
|
var options = props.options, _props_showIcon = props.showIcon, showIcon = _props_showIcon === void 0 ? false : _props_showIcon, _props_displayHorizontallyOnMobile = props.displayHorizontallyOnMobile, displayHorizontallyOnMobile = _props_displayHorizontallyOnMobile === void 0 ? false : _props_displayHorizontallyOnMobile, _props_icon = props.icon, icon = _props_icon === void 0 ? _polarisicons.MobileAcceptMajor : _props_icon;
|
|
121
|
-
var screenSizes = (0,
|
|
126
|
+
var screenSizes = (0, _Frame.useFrame)().screenSizes;
|
|
122
127
|
var _useState = _sliced_to_array((0, _react.useState)(null), 2), removeVisualFocus = _useState[0], setRemoveVisualFocus = _useState[1];
|
|
123
128
|
var handleKeyDown = function(e, index) {
|
|
124
129
|
if (!options.length) return;
|
|
@@ -198,7 +203,7 @@ var containerStyles = (0, _tailwindvariants.tv)({
|
|
|
198
203
|
}),
|
|
199
204
|
showIcon && /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
200
205
|
className: "w-5 h-5 pointer-events-none",
|
|
201
|
-
children: selected && /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
206
|
+
children: selected && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Icon.default, {
|
|
202
207
|
source: icon || _polarisicons.MobileAcceptMajor,
|
|
203
208
|
color: "link"
|
|
204
209
|
})
|
|
@@ -22,8 +22,12 @@ var _polarisicons = require("@shopify/polaris-icons");
|
|
|
22
22
|
var _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
23
23
|
var _reactdom = require("react-dom");
|
|
24
24
|
var _tailwindvariants = require("tailwind-variants");
|
|
25
|
-
var
|
|
26
|
-
var
|
|
25
|
+
var _Button = /*#__PURE__*/ _interop_require_default(require("./Button"));
|
|
26
|
+
var _Icon = /*#__PURE__*/ _interop_require_default(require("./Icon"));
|
|
27
|
+
var _Spinner = /*#__PURE__*/ _interop_require_default(require("./Spinner"));
|
|
28
|
+
var _Text = /*#__PURE__*/ _interop_require_default(require("./Text"));
|
|
29
|
+
var _Tooltip = /*#__PURE__*/ _interop_require_default(require("./Tooltip"));
|
|
30
|
+
var _Frame = require("./Frame");
|
|
27
31
|
function _array_like_to_array(arr, len) {
|
|
28
32
|
if (len == null || len > arr.length) len = arr.length;
|
|
29
33
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
@@ -32,6 +36,11 @@ function _array_like_to_array(arr, len) {
|
|
|
32
36
|
function _array_with_holes(arr) {
|
|
33
37
|
if (Array.isArray(arr)) return arr;
|
|
34
38
|
}
|
|
39
|
+
function _interop_require_default(obj) {
|
|
40
|
+
return obj && obj.__esModule ? obj : {
|
|
41
|
+
default: obj
|
|
42
|
+
};
|
|
43
|
+
}
|
|
35
44
|
function _getRequireWildcardCache(nodeInterop) {
|
|
36
45
|
if (typeof WeakMap !== "function") return null;
|
|
37
46
|
var cacheBabelInterop = new WeakMap();
|
|
@@ -194,7 +203,7 @@ var sectionStyles = (0, _tailwindvariants.tv)({
|
|
|
194
203
|
*/ function Modal() {
|
|
195
204
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
196
205
|
var children = props.children, title = props.title, subtitle = props.subtitle, open = props.open, onClose = props.onClose, sectioned = props.sectioned, primaryAction = props.primaryAction, secondaryAction = props.secondaryAction, _props_secondaryActions = props.secondaryActions, secondaryActions = _props_secondaryActions === void 0 ? [] : _props_secondaryActions, destructiveAction = props.destructiveAction, loading = props.loading, _props_size = props.size, size = _props_size === void 0 ? "default" : _props_size, leftAccessory = props.leftAccessory, _props_hideCloseButton = props.hideCloseButton, hideCloseButton = _props_hideCloseButton === void 0 ? false : _props_hideCloseButton, backAction = props.backAction, zIndexOverride = props.zIndexOverride;
|
|
197
|
-
var setModalIsOpen = (0,
|
|
206
|
+
var setModalIsOpen = (0, _Frame.useFrame)().setModalIsOpen;
|
|
198
207
|
var modalContentRef = (0, _react.useRef)(null);
|
|
199
208
|
var hasChildren = !!children;
|
|
200
209
|
var classes = styles({
|
|
@@ -264,7 +273,7 @@ var sectionStyles = (0, _tailwindvariants.tv)({
|
|
|
264
273
|
children: [
|
|
265
274
|
backAction && /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
266
275
|
className: "Litho-ModalHeader__BackAction pr-3",
|
|
267
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
276
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Button.default, {
|
|
268
277
|
plain: true,
|
|
269
278
|
onClick: backAction,
|
|
270
279
|
icon: _polarisicons.ArrowLeftMinor
|
|
@@ -273,19 +282,19 @@ var sectionStyles = (0, _tailwindvariants.tv)({
|
|
|
273
282
|
(title || subtitle) && /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
274
283
|
className: "flex flex-1 flex-col gap-0",
|
|
275
284
|
children: [
|
|
276
|
-
title && /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
285
|
+
title && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Text.default, {
|
|
277
286
|
variant: "headingLg",
|
|
278
287
|
fontWeight: "semibold",
|
|
279
288
|
children: title
|
|
280
289
|
}),
|
|
281
|
-
subtitle && /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
290
|
+
subtitle && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Text.default, {
|
|
282
291
|
variant: "bodyMd",
|
|
283
292
|
color: "subdued",
|
|
284
293
|
children: subtitle
|
|
285
294
|
})
|
|
286
295
|
]
|
|
287
296
|
}),
|
|
288
|
-
onClose && !hideCloseButton && /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
297
|
+
onClose && !hideCloseButton && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Button.default, {
|
|
289
298
|
plain: true,
|
|
290
299
|
icon: _polarisicons.CancelMajor,
|
|
291
300
|
onClick: onClose
|
|
@@ -296,7 +305,7 @@ var sectionStyles = (0, _tailwindvariants.tv)({
|
|
|
296
305
|
className: "Litho-ModalBody grow overflow-y-auto overscroll-contain",
|
|
297
306
|
children: loading ? /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
298
307
|
className: "flex justify-center items-center h-full py-12",
|
|
299
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
308
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Spinner.default, {})
|
|
300
309
|
}) : sectioned ? /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
301
310
|
className: sectionClasses,
|
|
302
311
|
children: children
|
|
@@ -308,7 +317,7 @@ var sectionStyles = (0, _tailwindvariants.tv)({
|
|
|
308
317
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
309
318
|
className: "flex gap-2",
|
|
310
319
|
children: [
|
|
311
|
-
destructiveAction && /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
320
|
+
destructiveAction && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Button.default, {
|
|
312
321
|
destructive: destructiveAction.destructive === false ? false : true,
|
|
313
322
|
onClick: destructiveAction.onAction,
|
|
314
323
|
loading: destructiveAction.loading,
|
|
@@ -327,7 +336,7 @@ var sectionStyles = (0, _tailwindvariants.tv)({
|
|
|
327
336
|
className: "flex gap-2",
|
|
328
337
|
children: [
|
|
329
338
|
(secondaryActions === null || secondaryActions === void 0 ? void 0 : secondaryActions.length) > 0 && secondaryActions.map(function(action) {
|
|
330
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
339
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_Button.default, {
|
|
331
340
|
onClick: action.onAction,
|
|
332
341
|
disabled: action.disabled,
|
|
333
342
|
url: action.url,
|
|
@@ -336,7 +345,7 @@ var sectionStyles = (0, _tailwindvariants.tv)({
|
|
|
336
345
|
children: action.content
|
|
337
346
|
}, action.content);
|
|
338
347
|
}),
|
|
339
|
-
secondaryAction && /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
348
|
+
secondaryAction && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Button.default, {
|
|
340
349
|
onClick: secondaryAction.onAction,
|
|
341
350
|
disabled: secondaryAction.disabled,
|
|
342
351
|
url: secondaryAction.url,
|
|
@@ -344,7 +353,7 @@ var sectionStyles = (0, _tailwindvariants.tv)({
|
|
|
344
353
|
tooltipAlignment: secondaryAction.tooltipAlignment,
|
|
345
354
|
children: secondaryAction.content || "Cancel"
|
|
346
355
|
}),
|
|
347
|
-
primaryAction && /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
356
|
+
primaryAction && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Button.default, {
|
|
348
357
|
primary: true,
|
|
349
358
|
icon: primaryAction.icon,
|
|
350
359
|
onClick: primaryAction.onAction,
|
|
@@ -400,16 +409,16 @@ var sectionStyles = (0, _tailwindvariants.tv)({
|
|
|
400
409
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
401
410
|
className: "flex items-center gap-2 min-h-8",
|
|
402
411
|
children: [
|
|
403
|
-
icon && typeof icon === "function" && /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
412
|
+
icon && typeof icon === "function" && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Icon.default, {
|
|
404
413
|
source: icon,
|
|
405
414
|
color: "subdued"
|
|
406
415
|
}),
|
|
407
416
|
icon && (typeof icon === "undefined" ? "undefined" : _type_of(icon)) === "object" && icon,
|
|
408
|
-
title && typeof title === "string" ? /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
417
|
+
title && typeof title === "string" ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_Text.default, {
|
|
409
418
|
variant: titleVariant,
|
|
410
419
|
children: title
|
|
411
420
|
}) : title,
|
|
412
|
-
tooltip && /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
421
|
+
tooltip && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Tooltip.default, {
|
|
413
422
|
content: tooltip,
|
|
414
423
|
preferredPosition: "above"
|
|
415
424
|
})
|
|
@@ -421,7 +430,7 @@ var sectionStyles = (0, _tailwindvariants.tv)({
|
|
|
421
430
|
}),
|
|
422
431
|
action && /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
423
432
|
className: "Litho-ModalSection__HeaderAction relative left-2",
|
|
424
|
-
children: action.content ? /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
433
|
+
children: action.content ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_Button.default, {
|
|
425
434
|
link: true,
|
|
426
435
|
onClick: action.onAction,
|
|
427
436
|
primary: action.primary,
|
|
@@ -435,7 +444,7 @@ var sectionStyles = (0, _tailwindvariants.tv)({
|
|
|
435
444
|
})
|
|
436
445
|
]
|
|
437
446
|
}),
|
|
438
|
-
description && /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
447
|
+
description && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Text.default, {
|
|
439
448
|
color: "subdued",
|
|
440
449
|
children: description
|
|
441
450
|
})
|