@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
|
@@ -9,11 +9,12 @@ Object.defineProperty(exports, "default", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
var _jsxruntime = require("react/jsx-runtime");
|
|
12
|
-
var _react = require("react");
|
|
13
|
-
var _AppProvider = require("../components/AppProvider");
|
|
14
12
|
var _tailwindvariants = require("tailwind-variants");
|
|
15
|
-
var
|
|
13
|
+
var _Badge = /*#__PURE__*/ _interop_require_default(require("./Badge"));
|
|
14
|
+
var _Icon = /*#__PURE__*/ _interop_require_default(require("./Icon"));
|
|
15
|
+
var _Text = /*#__PURE__*/ _interop_require_default(require("./Text"));
|
|
16
16
|
var _polarisicons = require("@shopify/polaris-icons");
|
|
17
|
+
var _Frame = require("./Frame");
|
|
17
18
|
function _define_property(obj, key, value) {
|
|
18
19
|
if (key in obj) {
|
|
19
20
|
Object.defineProperty(obj, key, {
|
|
@@ -27,6 +28,11 @@ function _define_property(obj, key, value) {
|
|
|
27
28
|
}
|
|
28
29
|
return obj;
|
|
29
30
|
}
|
|
31
|
+
function _interop_require_default(obj) {
|
|
32
|
+
return obj && obj.__esModule ? obj : {
|
|
33
|
+
default: obj
|
|
34
|
+
};
|
|
35
|
+
}
|
|
30
36
|
function _object_spread(target) {
|
|
31
37
|
for(var i = 1; i < arguments.length; i++){
|
|
32
38
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
@@ -79,7 +85,7 @@ var titleStyles = (0, _tailwindvariants.tv)({
|
|
|
79
85
|
*/ function Navigation() {
|
|
80
86
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
81
87
|
var breadcrumb = props.breadcrumb, sections = props.sections, footerLinks = props.footerLinks;
|
|
82
|
-
var setShowMobileNavigation = (0,
|
|
88
|
+
var setShowMobileNavigation = (0, _Frame.useFrame)().setShowMobileNavigation;
|
|
83
89
|
var classes = styles(props);
|
|
84
90
|
var sectionClasses = sectionStyles(props);
|
|
85
91
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
@@ -93,7 +99,8 @@ var titleStyles = (0, _tailwindvariants.tv)({
|
|
|
93
99
|
label: breadcrumb.content || "Back",
|
|
94
100
|
onAction: breadcrumb.onAction,
|
|
95
101
|
icon: _polarisicons.ChevronLeftMinor,
|
|
96
|
-
keepNavigationOpen: breadcrumb.keepNavigationOpen
|
|
102
|
+
keepNavigationOpen: breadcrumb.keepNavigationOpen,
|
|
103
|
+
accessory: breadcrumb.accessory
|
|
97
104
|
})
|
|
98
105
|
}),
|
|
99
106
|
sections && sections.map(function(section, index) {
|
|
@@ -116,7 +123,7 @@ var titleStyles = (0, _tailwindvariants.tv)({
|
|
|
116
123
|
section.title && /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
117
124
|
className: titleClasses,
|
|
118
125
|
onClick: handleTitleClick,
|
|
119
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
126
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Text.default, {
|
|
120
127
|
color: section.title.selected ? "link" : "normal",
|
|
121
128
|
fontWeight: "medium",
|
|
122
129
|
variant: "bodySm",
|
|
@@ -180,11 +187,12 @@ var linkStyles = (0, _tailwindvariants.tv)({
|
|
|
180
187
|
* @param {boolean} [props.disclosure] - Whether the link has a disclosure icon.
|
|
181
188
|
* @param {string} [props.iconDisplay] - Icon display style (e.g., "block", "inline").
|
|
182
189
|
* @param {boolean} [props.keepNavigationOpen] - Whether to keep the navigation open.
|
|
190
|
+
* @param {React.ReactNode} [props.accessory] - Optional accessory to render.
|
|
183
191
|
* @returns {JSX.Element} The rendered Link component.
|
|
184
192
|
*/ function Link() {
|
|
185
193
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
186
|
-
var selected = props.selected, highlight = props.highlight, subLinks = props.subLinks, showSubLinksAsRegularLinks = props.showSubLinksAsRegularLinks, showDividerAbove = props.showDividerAbove, showDividerBelow = props.showDividerBelow, onAction = props.onAction, source = props.source, icon = props.icon, label = props.label, badge = props.badge, external = props.external, expanded = props.expanded, _props_iconDisplay = props.iconDisplay, iconDisplay = _props_iconDisplay === void 0 ? "block" : _props_iconDisplay, _props_keepNavigationOpen = props.keepNavigationOpen, keepNavigationOpen = _props_keepNavigationOpen === void 0 ? false : _props_keepNavigationOpen, _props_onlyShowOnMobile = props.onlyShowOnMobile, onlyShowOnMobile = _props_onlyShowOnMobile === void 0 ? false : _props_onlyShowOnMobile, _props_disclosure = props.disclosure, disclosure = _props_disclosure === void 0 ? false : _props_disclosure;
|
|
187
|
-
var setShowMobileNavigation = (0,
|
|
194
|
+
var selected = props.selected, highlight = props.highlight, subLinks = props.subLinks, showSubLinksAsRegularLinks = props.showSubLinksAsRegularLinks, showDividerAbove = props.showDividerAbove, showDividerBelow = props.showDividerBelow, onAction = props.onAction, source = props.source, icon = props.icon, label = props.label, badge = props.badge, external = props.external, expanded = props.expanded, _props_iconDisplay = props.iconDisplay, iconDisplay = _props_iconDisplay === void 0 ? "block" : _props_iconDisplay, _props_keepNavigationOpen = props.keepNavigationOpen, keepNavigationOpen = _props_keepNavigationOpen === void 0 ? false : _props_keepNavigationOpen, _props_onlyShowOnMobile = props.onlyShowOnMobile, onlyShowOnMobile = _props_onlyShowOnMobile === void 0 ? false : _props_onlyShowOnMobile, _props_disclosure = props.disclosure, disclosure = _props_disclosure === void 0 ? false : _props_disclosure, accessory = props.accessory;
|
|
195
|
+
var setShowMobileNavigation = (0, _Frame.useFrame)().setShowMobileNavigation;
|
|
188
196
|
var subLinkIsSelected = subLinks === null || subLinks === void 0 ? void 0 : subLinks.some(function(subLink) {
|
|
189
197
|
return subLink.selected;
|
|
190
198
|
});
|
|
@@ -219,12 +227,12 @@ var linkStyles = (0, _tailwindvariants.tv)({
|
|
|
219
227
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
220
228
|
className: "flex items-center gap-2 truncate",
|
|
221
229
|
children: [
|
|
222
|
-
source ? source : icon ? /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
230
|
+
source ? source : icon ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_Icon.default, {
|
|
223
231
|
source: icon,
|
|
224
232
|
color: linkSelected ? "link" : "subdued",
|
|
225
233
|
display: iconDisplay
|
|
226
234
|
}) : null,
|
|
227
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
235
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Text.default, {
|
|
228
236
|
fontWeight: "medium",
|
|
229
237
|
color: linkSelected ? "link" : subLinkIsSelected || grandChildLinkIsSelected ? "default" : "normal",
|
|
230
238
|
truncate: true,
|
|
@@ -232,17 +240,17 @@ var linkStyles = (0, _tailwindvariants.tv)({
|
|
|
232
240
|
})
|
|
233
241
|
]
|
|
234
242
|
}),
|
|
235
|
-
badge ? /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
243
|
+
badge ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_Badge.default, {
|
|
236
244
|
status: badge.status,
|
|
237
245
|
children: badge.label
|
|
238
|
-
}) : external ? /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
246
|
+
}) : external ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_Icon.default, {
|
|
239
247
|
source: _polarisicons.ExternalMinor,
|
|
240
248
|
color: "subdued"
|
|
241
|
-
}) : disclosure ? /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
249
|
+
}) : disclosure ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_Icon.default, {
|
|
242
250
|
source: _polarisicons.ChevronRightMinor,
|
|
243
251
|
color: "subdued",
|
|
244
252
|
className: "opacity-50"
|
|
245
|
-
}) : null
|
|
253
|
+
}) : accessory ? accessory : null
|
|
246
254
|
]
|
|
247
255
|
}),
|
|
248
256
|
(expanded || selected || subLinkIsSelected || grandChildLinkIsSelected) && !disclosure && subLinks && /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
@@ -286,15 +294,16 @@ var subLinkStyles = (0, _tailwindvariants.tv)({
|
|
|
286
294
|
* @param {string} [props.badge.status] - Badge status (e.g., "success", "warning").
|
|
287
295
|
* @param {string} [props.badge.label] - Badge label.
|
|
288
296
|
* @param {boolean} [props.keepNavigationOpen] - Whether to keep the navigation open.
|
|
297
|
+
* @param {React.ReactNode} [props.accessory] - Optional accessory to render.
|
|
289
298
|
* @returns {JSX.Element} The rendered SubLink component.
|
|
290
299
|
*/ function SubLink() {
|
|
291
300
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
292
|
-
var selected = props.selected, onAction = props.onAction, label = props.label, badge = props.badge, _props_keepNavigationOpen = props.keepNavigationOpen, keepNavigationOpen = _props_keepNavigationOpen === void 0 ? false : _props_keepNavigationOpen;
|
|
301
|
+
var selected = props.selected, onAction = props.onAction, label = props.label, badge = props.badge, _props_keepNavigationOpen = props.keepNavigationOpen, keepNavigationOpen = _props_keepNavigationOpen === void 0 ? false : _props_keepNavigationOpen, accessory = props.accessory;
|
|
293
302
|
var subLinkClasses = subLinkStyles({
|
|
294
303
|
selected: selected,
|
|
295
304
|
hasAction: !!onAction
|
|
296
305
|
});
|
|
297
|
-
var setShowMobileNavigation = (0,
|
|
306
|
+
var setShowMobileNavigation = (0, _Frame.useFrame)().setShowMobileNavigation;
|
|
298
307
|
var handleClick = function() {
|
|
299
308
|
onAction === null || onAction === void 0 ? void 0 : onAction();
|
|
300
309
|
if (!keepNavigationOpen) {
|
|
@@ -308,22 +317,23 @@ var subLinkStyles = (0, _tailwindvariants.tv)({
|
|
|
308
317
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
309
318
|
className: "flex items-center gap-2",
|
|
310
319
|
children: [
|
|
311
|
-
selected && /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
320
|
+
selected && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Icon.default, {
|
|
312
321
|
source: _polarisicons.ChevronRightMinor,
|
|
313
322
|
color: "subdued",
|
|
314
323
|
className: "opacity-50"
|
|
315
324
|
}),
|
|
316
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
325
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Text.default, {
|
|
317
326
|
fontWeight: selected ? "medium" : "normal",
|
|
318
327
|
color: selected ? "default" : "normal",
|
|
319
328
|
children: label
|
|
320
329
|
})
|
|
321
330
|
]
|
|
322
331
|
}),
|
|
323
|
-
badge && /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
332
|
+
badge && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Badge.default, {
|
|
324
333
|
status: badge.status,
|
|
325
334
|
children: badge.label
|
|
326
|
-
})
|
|
335
|
+
}),
|
|
336
|
+
accessory
|
|
327
337
|
]
|
|
328
338
|
});
|
|
329
339
|
}
|
|
@@ -12,12 +12,12 @@ 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("./AppProvider");
|
|
16
15
|
var _Text = /*#__PURE__*/ _interop_require_default(require("./Text"));
|
|
17
16
|
var _Button = /*#__PURE__*/ _interop_require_default(require("./Button"));
|
|
18
17
|
var _Popover = /*#__PURE__*/ _interop_require_default(require("./Popover"));
|
|
19
18
|
var _ActionList = /*#__PURE__*/ _interop_require_default(require("./ActionList"));
|
|
20
19
|
var _polarisicons = require("@shopify/polaris-icons");
|
|
20
|
+
var _Frame = require("./Frame");
|
|
21
21
|
function _array_like_to_array(arr, len) {
|
|
22
22
|
if (len == null || len > arr.length) len = arr.length;
|
|
23
23
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
@@ -248,7 +248,9 @@ var contentStyles = (0, _tailwindvariants.tv)({
|
|
|
248
248
|
});
|
|
249
249
|
/**
|
|
250
250
|
* Page component that provides a structured layout with a header, primary and secondary actions, and content.
|
|
251
|
-
*
|
|
251
|
+
*
|
|
252
|
+
* @component
|
|
253
|
+
*
|
|
252
254
|
* @param {Object} props - Props for the component.
|
|
253
255
|
* @param {string|React.ReactNode} props.title - The title of the page. Can be a string or React element.
|
|
254
256
|
* @param {string|React.ReactNode} props.subtitle - The subtitle of the page. Can be a string or React element.
|
|
@@ -257,6 +259,8 @@ var contentStyles = (0, _tailwindvariants.tv)({
|
|
|
257
259
|
* @param {string} [props.backAction.accessibilityLabel] - Accessibility label for the back action button.
|
|
258
260
|
* @param {boolean} [props.narrowWidth=false] - Whether to use a narrow width layout.
|
|
259
261
|
* @param {boolean} [props.fullWidth=false] - Whether to use a full-width layout.
|
|
262
|
+
* @param {boolean} [props.showTitleInTopBar=true] - Whether to show the title in the top bar area.
|
|
263
|
+
* @param {boolean} [props.wrapInContentContainer=true] - Whether to wrap the content in a container with padding.
|
|
260
264
|
* @param {Object} [props.primaryAction] - Configuration for the primary action button.
|
|
261
265
|
* @param {Function} [props.primaryAction.onAction] - Callback when the primary action is triggered.
|
|
262
266
|
* @param {boolean} [props.primaryAction.loading] - Whether the primary action button is in a loading state.
|
|
@@ -274,7 +278,7 @@ var contentStyles = (0, _tailwindvariants.tv)({
|
|
|
274
278
|
*/ function Page() {
|
|
275
279
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
276
280
|
var title = props.title, subtitle = props.subtitle, _props_showTitleInTopBar = props.showTitleInTopBar, showTitleInTopBar = _props_showTitleInTopBar === void 0 ? true : _props_showTitleInTopBar, tmp = props.backAction, _backAction = tmp === void 0 ? null : tmp, children = props.children, narrowWidth = props.narrowWidth, fullWidth = props.fullWidth, primaryAction = props.primaryAction, _props_secondaryActions = props.secondaryActions, secondaryActions = _props_secondaryActions === void 0 ? [] : _props_secondaryActions, titleMetadata = props.titleMetadata, _props_moreActionsLabel = props.moreActionsLabel, moreActionsLabel = _props_moreActionsLabel === void 0 ? "Actions" : _props_moreActionsLabel, _props_wrapInContentContainer = props.wrapInContentContainer, wrapInContentContainer = _props_wrapInContentContainer === void 0 ? true : _props_wrapInContentContainer, footerActions = props.footerActions, className = props.className;
|
|
277
|
-
var paneIsOpen = (0,
|
|
281
|
+
var paneIsOpen = (0, _Frame.useFrame)().paneIsOpen;
|
|
278
282
|
var detailsRef = (0, _react.useRef)(null);
|
|
279
283
|
var classes = styles({
|
|
280
284
|
narrowWidth: narrowWidth,
|
|
@@ -433,6 +437,7 @@ var contentStyles = (0, _tailwindvariants.tv)({
|
|
|
433
437
|
activator: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Button.default, {
|
|
434
438
|
plain: true,
|
|
435
439
|
disclosure: true,
|
|
440
|
+
icon: action.icon,
|
|
436
441
|
onClick: function() {
|
|
437
442
|
return togglePopover(index);
|
|
438
443
|
},
|
|
@@ -10,7 +10,9 @@ Object.defineProperty(exports, "default", {
|
|
|
10
10
|
});
|
|
11
11
|
var _jsxruntime = require("react/jsx-runtime");
|
|
12
12
|
var _polarisicons = require("@shopify/polaris-icons");
|
|
13
|
-
var
|
|
13
|
+
var _Button = /*#__PURE__*/ _interop_require_default(require("./Button"));
|
|
14
|
+
var _ButtonGroup = /*#__PURE__*/ _interop_require_default(require("./ButtonGroup"));
|
|
15
|
+
var _Tooltip = /*#__PURE__*/ _interop_require_default(require("./Tooltip"));
|
|
14
16
|
function _define_property(obj, key, value) {
|
|
15
17
|
if (key in obj) {
|
|
16
18
|
Object.defineProperty(obj, key, {
|
|
@@ -24,6 +26,11 @@ function _define_property(obj, key, value) {
|
|
|
24
26
|
}
|
|
25
27
|
return obj;
|
|
26
28
|
}
|
|
29
|
+
function _interop_require_default(obj) {
|
|
30
|
+
return obj && obj.__esModule ? obj : {
|
|
31
|
+
default: obj
|
|
32
|
+
};
|
|
33
|
+
}
|
|
27
34
|
function _object_spread(target) {
|
|
28
35
|
for(var i = 1; i < arguments.length; i++){
|
|
29
36
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
@@ -69,15 +76,15 @@ function _object_spread(target) {
|
|
|
69
76
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
70
77
|
var hasNext = props.hasNext, hasPrevious = props.hasPrevious, nextURL = props.nextURL, previousURL = props.previousURL, onNext = props.onNext, onPrevious = props.onPrevious, nextTooltip = props.nextTooltip, previousTooltip = props.previousTooltip;
|
|
71
78
|
var renderButtonWithTooltip = function(tooltip, buttonProps) {
|
|
72
|
-
var button = /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
73
|
-
return tooltip ? /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
79
|
+
var button = /*#__PURE__*/ (0, _jsxruntime.jsx)(_Button.default, _object_spread({}, buttonProps));
|
|
80
|
+
return tooltip ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_Tooltip.default, {
|
|
74
81
|
content: tooltip,
|
|
75
82
|
children: button
|
|
76
83
|
}) : button;
|
|
77
84
|
};
|
|
78
85
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
79
86
|
className: "Litho-Pagination",
|
|
80
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(
|
|
87
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_ButtonGroup.default, {
|
|
81
88
|
segmented: true,
|
|
82
89
|
children: [
|
|
83
90
|
renderButtonWithTooltip(previousTooltip, {
|
|
@@ -12,20 +12,77 @@ Object.defineProperty(exports, "default", {
|
|
|
12
12
|
var _jsxruntime = require("react/jsx-runtime");
|
|
13
13
|
var _polarisicons = require("@shopify/polaris-icons");
|
|
14
14
|
var _tailwindvariants = require("tailwind-variants");
|
|
15
|
-
var _AppProvider = require("./AppProvider");
|
|
16
15
|
var _react = require("react");
|
|
17
|
-
var
|
|
16
|
+
var _Text = /*#__PURE__*/ _interop_require_default(require("./Text"));
|
|
17
|
+
var _Button = /*#__PURE__*/ _interop_require_default(require("./Button"));
|
|
18
|
+
var _Popover = /*#__PURE__*/ _interop_require_default(require("./Popover"));
|
|
19
|
+
var _ActionList = /*#__PURE__*/ _interop_require_default(require("./ActionList"));
|
|
20
|
+
var _Frame = require("./Frame");
|
|
21
|
+
function _array_like_to_array(arr, len) {
|
|
22
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
23
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
24
|
+
return arr2;
|
|
25
|
+
}
|
|
26
|
+
function _array_with_holes(arr) {
|
|
27
|
+
if (Array.isArray(arr)) return arr;
|
|
28
|
+
}
|
|
29
|
+
function _interop_require_default(obj) {
|
|
30
|
+
return obj && obj.__esModule ? obj : {
|
|
31
|
+
default: obj
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function _iterable_to_array_limit(arr, i) {
|
|
35
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
36
|
+
if (_i == null) return;
|
|
37
|
+
var _arr = [];
|
|
38
|
+
var _n = true;
|
|
39
|
+
var _d = false;
|
|
40
|
+
var _s, _e;
|
|
41
|
+
try {
|
|
42
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
43
|
+
_arr.push(_s.value);
|
|
44
|
+
if (i && _arr.length === i) break;
|
|
45
|
+
}
|
|
46
|
+
} catch (err) {
|
|
47
|
+
_d = true;
|
|
48
|
+
_e = err;
|
|
49
|
+
} finally{
|
|
50
|
+
try {
|
|
51
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
52
|
+
} finally{
|
|
53
|
+
if (_d) throw _e;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return _arr;
|
|
57
|
+
}
|
|
58
|
+
function _non_iterable_rest() {
|
|
59
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
60
|
+
}
|
|
61
|
+
function _sliced_to_array(arr, i) {
|
|
62
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
63
|
+
}
|
|
64
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
65
|
+
if (!o) return;
|
|
66
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
67
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
68
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
69
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
70
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
71
|
+
}
|
|
18
72
|
var styles = (0, _tailwindvariants.tv)({
|
|
19
|
-
base: "Litho-Pane hidden md:block fixed inset-0 w-full md:left-auto md:max-w-
|
|
73
|
+
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"
|
|
20
74
|
});
|
|
21
75
|
var innerStyles = (0, _tailwindvariants.tv)({
|
|
22
|
-
base: "flex flex-col overflow-y-auto h-full"
|
|
76
|
+
base: "relative flex flex-col overflow-y-auto h-full"
|
|
77
|
+
});
|
|
78
|
+
var dragHandleStyles = (0, _tailwindvariants.tv)({
|
|
79
|
+
base: "cursor-col-resize absolute top-0 left-0 w-1 h-full transition-colors duration-300 hover-delay hover:bg-tint-3"
|
|
23
80
|
});
|
|
24
81
|
var PaneContext = /*#__PURE__*/ (0, _react.createContext)({});
|
|
25
82
|
function Pane() {
|
|
26
83
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
27
84
|
var open = props.open, onClose = props.onClose, children = props.children;
|
|
28
|
-
var setPaneIsOpen = (0,
|
|
85
|
+
var setPaneIsOpen = (0, _Frame.useFrame)().setPaneIsOpen;
|
|
29
86
|
var classes = styles();
|
|
30
87
|
(0, _react.useEffect)(function() {
|
|
31
88
|
setPaneIsOpen(open);
|
|
@@ -61,47 +118,117 @@ function Pane() {
|
|
|
61
118
|
}
|
|
62
119
|
function Header() {
|
|
63
120
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
64
|
-
var
|
|
121
|
+
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;
|
|
65
122
|
var onClose = (0, _react.useContext)(PaneContext).onClose;
|
|
66
123
|
var showActionsOrClose = actions.length > 0 || showCloseButton;
|
|
67
|
-
var
|
|
124
|
+
var _useState = _sliced_to_array((0, _react.useState)(null), 2), showActionsPopover = _useState[0], setShowActionsPopover = _useState[1];
|
|
125
|
+
(0, _react.useEffect)(function() {
|
|
126
|
+
var width = expanded ? 'var(--litho-pane-width-expanded)' : 'var(--litho-pane-width-default)';
|
|
127
|
+
document.documentElement.style.setProperty('--litho-pane-width', width);
|
|
128
|
+
}, [
|
|
129
|
+
expanded
|
|
130
|
+
]);
|
|
131
|
+
var backAction = _backAction ? /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
132
|
+
className: "Litho-Page__Header--BackAction",
|
|
133
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Button.default, {
|
|
134
|
+
plain: true,
|
|
135
|
+
icon: _polarisicons.ArrowLeftMinor,
|
|
136
|
+
onClick: function() {
|
|
137
|
+
return _backAction === null || _backAction === void 0 ? void 0 : _backAction.onAction();
|
|
138
|
+
},
|
|
139
|
+
accessibilityLabel: _backAction === null || _backAction === void 0 ? void 0 : _backAction.accessibilityLabel
|
|
140
|
+
})
|
|
141
|
+
}) : null;
|
|
68
142
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
69
|
-
className: "
|
|
143
|
+
className: "Litho-Pane__Header",
|
|
70
144
|
children: [
|
|
71
|
-
/*#__PURE__*/ (0, _jsxruntime.
|
|
72
|
-
className: "
|
|
73
|
-
children: _react.Children.map(children, function(child, index) {
|
|
74
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
75
|
-
className: "flex col-span-2 items-center ".concat(childCount === 1 ? "col-span-5" : "", " ").concat(index > 0 ? "justify-center" : ""),
|
|
76
|
-
children: child
|
|
77
|
-
});
|
|
78
|
-
})
|
|
79
|
-
}),
|
|
80
|
-
showActionsOrClose && /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
81
|
-
className: "flex col-span-2 items-center justify-end",
|
|
145
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
146
|
+
className: "flex items-center justify-between min-h-14 px-2 border-edge-subdued ".concat(bottomBorder ? "border-b" : ""),
|
|
82
147
|
children: [
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
148
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
149
|
+
className: "flex items-center gap-2",
|
|
150
|
+
children: [
|
|
151
|
+
backAction,
|
|
152
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
153
|
+
children: [
|
|
154
|
+
title && typeof title === "string" ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_Text.default, {
|
|
155
|
+
variant: "headingMd",
|
|
156
|
+
className: "!leading-5",
|
|
157
|
+
clampLines: 1,
|
|
158
|
+
children: title
|
|
159
|
+
}) : title,
|
|
160
|
+
subtitle && typeof subtitle === "string" ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_Text.default, {
|
|
161
|
+
color: "subdued",
|
|
162
|
+
className: "!leading-4",
|
|
163
|
+
clampLines: 1,
|
|
164
|
+
children: subtitle
|
|
165
|
+
}) : subtitle
|
|
166
|
+
]
|
|
167
|
+
})
|
|
168
|
+
]
|
|
96
169
|
}),
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
170
|
+
showActionsOrClose && /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
171
|
+
className: "flex items-center justify-end",
|
|
172
|
+
children: [
|
|
173
|
+
actions.map(function(action, index) {
|
|
174
|
+
var showPopover = action.subActions || action.subSections;
|
|
175
|
+
var innerContent = /*#__PURE__*/ (0, _jsxruntime.jsx)(_Button.default, {
|
|
176
|
+
plain: !action.destructive,
|
|
177
|
+
onClick: showPopover ? function() {
|
|
178
|
+
return setShowActionsPopover(index);
|
|
179
|
+
} : action.onAction || action.onClick,
|
|
180
|
+
disabled: action.disabled,
|
|
181
|
+
icon: action.icon,
|
|
182
|
+
loading: action.loading,
|
|
183
|
+
external: action.external,
|
|
184
|
+
url: action.url,
|
|
185
|
+
destructive: action.destructive,
|
|
186
|
+
tooltip: action.tooltip && showActionsPopover !== index ? action.tooltip : undefined,
|
|
187
|
+
tooltipPosition: "below"
|
|
188
|
+
}, index);
|
|
189
|
+
if (showPopover) {
|
|
190
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_Popover.default, {
|
|
191
|
+
active: showActionsPopover === index,
|
|
192
|
+
onClose: function() {
|
|
193
|
+
return setShowActionsPopover(null);
|
|
194
|
+
},
|
|
195
|
+
activator: innerContent,
|
|
196
|
+
preferredAlignment: "left",
|
|
197
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_ActionList.default, {
|
|
198
|
+
sections: action.subSections,
|
|
199
|
+
items: action.subActions,
|
|
200
|
+
onActionAnyItem: function() {
|
|
201
|
+
return setShowActionsPopover(null);
|
|
202
|
+
}
|
|
203
|
+
})
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
return innerContent;
|
|
207
|
+
}),
|
|
208
|
+
allowExpand && /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
209
|
+
className: "hidden xl:block",
|
|
210
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Button.default, {
|
|
211
|
+
plain: true,
|
|
212
|
+
icon: expanded ? _polarisicons.MinimizeMajor : _polarisicons.MaximizeMajor,
|
|
213
|
+
onClick: onToggleExpand,
|
|
214
|
+
tooltip: expanded ? "Minimize" : "Expand",
|
|
215
|
+
tooltipPosition: "below"
|
|
216
|
+
})
|
|
217
|
+
}),
|
|
218
|
+
showCloseButton && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Button.default, {
|
|
219
|
+
plain: true,
|
|
220
|
+
icon: _polarisicons.CancelMajor,
|
|
221
|
+
onClick: onClose,
|
|
222
|
+
tooltip: "Close",
|
|
223
|
+
tooltipPosition: "below"
|
|
224
|
+
})
|
|
225
|
+
]
|
|
103
226
|
})
|
|
104
227
|
]
|
|
228
|
+
}),
|
|
229
|
+
subHeader && /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
230
|
+
className: "border-edge-subdued ".concat(bottomBorder ? "border-b" : ""),
|
|
231
|
+
children: subHeader
|
|
105
232
|
})
|
|
106
233
|
]
|
|
107
234
|
});
|
|
@@ -109,9 +236,9 @@ function Header() {
|
|
|
109
236
|
Pane.Header = Header;
|
|
110
237
|
function Content() {
|
|
111
238
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
112
|
-
var children = props.children;
|
|
239
|
+
var children = props.children, _props_padded = props.padded, padded = _props_padded === void 0 ? true : _props_padded, className = props.className;
|
|
113
240
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
114
|
-
className: "flex-1 overflow-auto",
|
|
241
|
+
className: "Litho-Pane__Content flex-1 overflow-auto ".concat(padded ? "p-2" : "", " ").concat(className),
|
|
115
242
|
children: children
|
|
116
243
|
});
|
|
117
244
|
}
|
|
@@ -120,7 +247,7 @@ function Footer() {
|
|
|
120
247
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
121
248
|
var children = props.children, _props_topBorder = props.topBorder, topBorder = _props_topBorder === void 0 ? true : _props_topBorder;
|
|
122
249
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
123
|
-
className: "min-h-
|
|
250
|
+
className: "Litho-Pane__Footer min-h-12 ".concat(topBorder ? "border-t border-edge-subdued" : ""),
|
|
124
251
|
children: children
|
|
125
252
|
});
|
|
126
253
|
}
|
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "default", {
|
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
var _jsxruntime = require("react/jsx-runtime");
|
|
13
|
-
var _react = require("react");
|
|
13
|
+
var _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
14
14
|
var _reactdom = require("react-dom");
|
|
15
15
|
var _tailwindvariants = require("tailwind-variants");
|
|
16
16
|
var _PopoverManager = /*#__PURE__*/ _interop_require_default(require("./PopoverManager"));
|
|
@@ -40,6 +40,47 @@ function _interop_require_default(obj) {
|
|
|
40
40
|
default: obj
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
44
|
+
if (typeof WeakMap !== "function") return null;
|
|
45
|
+
var cacheBabelInterop = new WeakMap();
|
|
46
|
+
var cacheNodeInterop = new WeakMap();
|
|
47
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
48
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
49
|
+
})(nodeInterop);
|
|
50
|
+
}
|
|
51
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
52
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
53
|
+
return obj;
|
|
54
|
+
}
|
|
55
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
56
|
+
return {
|
|
57
|
+
default: obj
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
61
|
+
if (cache && cache.has(obj)) {
|
|
62
|
+
return cache.get(obj);
|
|
63
|
+
}
|
|
64
|
+
var newObj = {
|
|
65
|
+
__proto__: null
|
|
66
|
+
};
|
|
67
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
68
|
+
for(var key in obj){
|
|
69
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
70
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
71
|
+
if (desc && (desc.get || desc.set)) {
|
|
72
|
+
Object.defineProperty(newObj, key, desc);
|
|
73
|
+
} else {
|
|
74
|
+
newObj[key] = obj[key];
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
newObj.default = obj;
|
|
79
|
+
if (cache) {
|
|
80
|
+
cache.set(obj, newObj);
|
|
81
|
+
}
|
|
82
|
+
return newObj;
|
|
83
|
+
}
|
|
43
84
|
function _iterable_to_array_limit(arr, i) {
|
|
44
85
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
45
86
|
if (_i == null) return;
|
|
@@ -148,13 +189,13 @@ var styles = (0, _tailwindvariants.tv)({
|
|
|
148
189
|
* @param {boolean} [props.sectioned=false] - Whether the popover content is sectioned with padding.
|
|
149
190
|
* @param {string} [props.preferredAlignment="center"] - Preferred alignment for the popover (left, center, right).
|
|
150
191
|
* @param {string} [props.preferredPosition="below"] - Preferred position for the popover (above, below, cover).
|
|
151
|
-
* @param {boolean|string} [props.autofocusTarget=false] - Automatically focus on the first focusable element in the popover.
|
|
152
192
|
* @param {string} [props.className] - Additional class name for the popover.
|
|
153
193
|
* @param {string} [props.containerClassName] - Additional class name for the popover container.
|
|
154
194
|
* @returns {JSX.Element} The rendered popover component.
|
|
155
195
|
*/ function Popover() {
|
|
156
196
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
157
|
-
var
|
|
197
|
+
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;
|
|
198
|
+
var ActivatorWrapper = activatorWrapper || "div";
|
|
158
199
|
var idValue = (0, _react.useId)();
|
|
159
200
|
var idRef = (0, _react.useRef)(idValue);
|
|
160
201
|
var initialWidthRef = (0, _react.useRef)(null);
|
|
@@ -343,18 +384,30 @@ var styles = (0, _tailwindvariants.tv)({
|
|
|
343
384
|
}
|
|
344
385
|
Popover.displayName = "Popover";
|
|
345
386
|
var sectionStyles = (0, _tailwindvariants.tv)({
|
|
346
|
-
base: "Litho-Popover__Section border-b border-edge-default last:border-b-0"
|
|
387
|
+
base: "Litho-Popover__Section border-b border-edge-default last:border-b-0",
|
|
388
|
+
variants: {
|
|
389
|
+
padded: {
|
|
390
|
+
true: "p-3",
|
|
391
|
+
false: ""
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
defaultVariants: {
|
|
395
|
+
padded: false
|
|
396
|
+
}
|
|
347
397
|
});
|
|
348
398
|
/**
|
|
349
399
|
* Section component for use within the Popover.
|
|
350
400
|
*
|
|
351
401
|
* @param {Object} props - The component props.
|
|
352
402
|
* @param {React.ReactNode} [props.children] - The content of the section.
|
|
403
|
+
* @param {boolean} [props.padded=false] - Whether the section has padding.
|
|
353
404
|
* @returns {JSX.Element} The rendered section.
|
|
354
405
|
*/ function Section() {
|
|
355
406
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
356
|
-
var children = props.children, className = props.className;
|
|
357
|
-
var sectionClasses = sectionStyles(
|
|
407
|
+
var children = props.children, className = props.className, _props_padded = props.padded, padded = _props_padded === void 0 ? false : _props_padded;
|
|
408
|
+
var sectionClasses = sectionStyles({
|
|
409
|
+
padded: padded
|
|
410
|
+
});
|
|
358
411
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
359
412
|
className: "".concat(sectionClasses).concat(className ? " ".concat(className) : ""),
|
|
360
413
|
children: children
|