@heymantle/litho 0.0.3 → 0.0.4
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 +33 -11
- 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 +34 -12
- package/dist/cjs/components/Card.js +5 -45
- package/dist/cjs/components/Checkbox.js +16 -6
- package/dist/cjs/components/ChoiceList.js +7 -4
- package/dist/cjs/components/ColorField.js +8 -3
- package/dist/cjs/components/DatePicker.js +13 -8
- package/dist/cjs/components/DropZone.js +33 -18
- package/dist/cjs/components/EmptyState.js +15 -7
- package/dist/cjs/components/Filters.js +32 -20
- package/dist/cjs/components/FooterHelp.js +7 -2
- package/dist/cjs/components/Form.js +18 -3
- package/dist/cjs/components/Frame.js +40 -15
- package/dist/cjs/components/FrameSaveBar.js +21 -12
- 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 +1 -0
- 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 +118 -35
- 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/Table.js +32 -19
- 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/dev/verify-publish.js +37 -4
- 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 +871 -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 +599 -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 +884 -0
- package/dist/cjs/stories/Collapsible.stories.js +905 -0
- package/dist/cjs/stories/ColorField.stories.js +883 -0
- package/dist/cjs/stories/ContextualSaveBar.stories.js +970 -0
- package/dist/cjs/stories/DatePicker.stories.js +584 -0
- package/dist/cjs/stories/Divider.stories.js +759 -0
- package/dist/cjs/stories/DropZone.stories.js +1205 -0
- package/dist/cjs/stories/EmptyState.stories.js +296 -0
- package/dist/cjs/stories/Filters.stories.js +1353 -0
- package/dist/cjs/stories/FooterHelp.stories.js +869 -0
- package/dist/cjs/stories/Form.stories.js +940 -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 +596 -0
- package/dist/cjs/stories/Image.stories.js +883 -0
- package/dist/cjs/stories/InlineError.stories.js +710 -0
- package/dist/cjs/stories/Label.stories.js +665 -0
- package/dist/cjs/stories/Layout.stories.js +685 -0
- package/dist/cjs/stories/LayoutSection.stories.js +1267 -0
- package/dist/cjs/stories/Link.stories.js +423 -0
- package/dist/cjs/stories/List.stories.js +1031 -0
- package/dist/cjs/stories/Listbox.stories.js +820 -0
- package/dist/cjs/stories/Loading.stories.js +900 -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 +318 -0
- package/dist/cjs/stories/Pagination.stories.js +438 -0
- package/dist/cjs/stories/Pane.stories.js +1535 -0
- package/dist/cjs/stories/Popover.stories.js +637 -0
- package/dist/cjs/stories/PopoverManager.stories.js +1225 -0
- package/dist/cjs/stories/ProgressBar.stories.js +506 -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 +892 -0
- package/dist/cjs/stories/ResourceList.stories.js +1067 -0
- package/dist/cjs/stories/Select.stories.js +413 -0
- package/dist/cjs/stories/SkeletonText.stories.js +776 -0
- package/dist/cjs/stories/Spinner.stories.js +396 -0
- package/dist/cjs/stories/Table.stories.js +628 -0
- package/dist/cjs/stories/Tabs.stories.js +723 -0
- package/dist/cjs/stories/Tag.stories.js +620 -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 +859 -0
- package/dist/cjs/stories/TimePicker.stories.js +966 -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 +155 -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 +21 -4
- 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 +24 -7
- package/dist/esm/components/Card.js +5 -4
- package/dist/esm/components/Checkbox.js +6 -1
- package/dist/esm/components/ChoiceList.js +7 -4
- package/dist/esm/components/ColorField.js +1 -1
- package/dist/esm/components/DatePicker.js +6 -1
- package/dist/esm/components/DropZone.js +14 -4
- package/dist/esm/components/EmptyState.js +4 -1
- package/dist/esm/components/Filters.js +10 -3
- package/dist/esm/components/FooterHelp.js +1 -1
- package/dist/esm/components/Form.js +18 -3
- package/dist/esm/components/Frame.js +18 -6
- package/dist/esm/components/FrameSaveBar.js +10 -6
- 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 +1 -0
- 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 +114 -36
- 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/Table.js +16 -3
- 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/dev/verify-publish.js +37 -4
- 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 +833 -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 +558 -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 +834 -0
- package/dist/esm/stories/Collapsible.stories.js +867 -0
- package/dist/esm/stories/ColorField.stories.js +842 -0
- package/dist/esm/stories/ContextualSaveBar.stories.js +938 -0
- package/dist/esm/stories/DatePicker.stories.js +537 -0
- package/dist/esm/stories/Divider.stories.js +715 -0
- package/dist/esm/stories/DropZone.stories.js +1161 -0
- package/dist/esm/stories/EmptyState.stories.js +246 -0
- package/dist/esm/stories/Filters.stories.js +1315 -0
- package/dist/esm/stories/FooterHelp.stories.js +813 -0
- package/dist/esm/stories/Form.stories.js +905 -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 +555 -0
- package/dist/esm/stories/Image.stories.js +836 -0
- package/dist/esm/stories/InlineError.stories.js +666 -0
- package/dist/esm/stories/Label.stories.js +612 -0
- package/dist/esm/stories/Layout.stories.js +647 -0
- package/dist/esm/stories/LayoutSection.stories.js +1226 -0
- package/dist/esm/stories/Link.stories.js +379 -0
- package/dist/esm/stories/List.stories.js +975 -0
- package/dist/esm/stories/Listbox.stories.js +776 -0
- package/dist/esm/stories/Loading.stories.js +850 -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 +276 -0
- package/dist/esm/stories/Pagination.stories.js +394 -0
- package/dist/esm/stories/Pane.stories.js +1497 -0
- package/dist/esm/stories/Popover.stories.js +605 -0
- package/dist/esm/stories/PopoverManager.stories.js +1193 -0
- package/dist/esm/stories/ProgressBar.stories.js +465 -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 +845 -0
- package/dist/esm/stories/ResourceList.stories.js +1029 -0
- package/dist/esm/stories/Select.stories.js +363 -0
- package/dist/esm/stories/SkeletonText.stories.js +717 -0
- package/dist/esm/stories/Spinner.stories.js +355 -0
- package/dist/esm/stories/Table.stories.js +584 -0
- package/dist/esm/stories/Tabs.stories.js +685 -0
- package/dist/esm/stories/Tag.stories.js +573 -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 +806 -0
- package/dist/esm/stories/TimePicker.stories.js +910 -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 +114 -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 +130 -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 +123 -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 +139 -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 +166 -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/Table.d.ts +197 -0
- package/dist/types/components/Table.d.ts.map +1 -0
- package/dist/types/components/Tabs.d.ts +41 -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 +62 -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 +6 -0
- package/package.json +37 -6
|
@@ -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
|
}
|
|
@@ -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
|
})
|
|
@@ -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, {
|