@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
|
@@ -1,10 +1,58 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
function _array_like_to_array(arr, len) {
|
|
3
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
4
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
5
|
+
return arr2;
|
|
6
|
+
}
|
|
7
|
+
function _array_with_holes(arr) {
|
|
8
|
+
if (Array.isArray(arr)) return arr;
|
|
9
|
+
}
|
|
10
|
+
function _iterable_to_array_limit(arr, i) {
|
|
11
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
12
|
+
if (_i == null) return;
|
|
13
|
+
var _arr = [];
|
|
14
|
+
var _n = true;
|
|
15
|
+
var _d = false;
|
|
16
|
+
var _s, _e;
|
|
17
|
+
try {
|
|
18
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
19
|
+
_arr.push(_s.value);
|
|
20
|
+
if (i && _arr.length === i) break;
|
|
21
|
+
}
|
|
22
|
+
} catch (err) {
|
|
23
|
+
_d = true;
|
|
24
|
+
_e = err;
|
|
25
|
+
} finally{
|
|
26
|
+
try {
|
|
27
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
28
|
+
} finally{
|
|
29
|
+
if (_d) throw _e;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return _arr;
|
|
33
|
+
}
|
|
34
|
+
function _non_iterable_rest() {
|
|
35
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
36
|
+
}
|
|
37
|
+
function _sliced_to_array(arr, i) {
|
|
38
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
39
|
+
}
|
|
40
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
41
|
+
if (!o) return;
|
|
42
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
43
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
44
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
45
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
46
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
47
|
+
}
|
|
2
48
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
49
|
import { CancelMajor } from "@shopify/polaris-icons";
|
|
4
50
|
import { tv } from "tailwind-variants";
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
51
|
+
import { createContext, useContext, useEffect, Children, useState } from "react";
|
|
52
|
+
import Button from "./Button.js";
|
|
53
|
+
import Popover from "./Popover.js";
|
|
54
|
+
import ActionList from "./ActionList.js";
|
|
55
|
+
import { useFrame } from "./Frame.js";
|
|
8
56
|
var styles = tv({
|
|
9
57
|
base: "Litho-Pane hidden md:block fixed inset-0 w-full md:left-auto md:max-w-100 block bg-surface-highest shadow-card-strong pointer-events-auto"
|
|
10
58
|
});
|
|
@@ -15,7 +63,7 @@ var PaneContext = /*#__PURE__*/ createContext({});
|
|
|
15
63
|
function Pane() {
|
|
16
64
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
17
65
|
var open = props.open, onClose = props.onClose, children = props.children;
|
|
18
|
-
var setPaneIsOpen =
|
|
66
|
+
var setPaneIsOpen = useFrame().setPaneIsOpen;
|
|
19
67
|
var classes = styles();
|
|
20
68
|
useEffect(function() {
|
|
21
69
|
setPaneIsOpen(open);
|
|
@@ -51,47 +99,77 @@ function Pane() {
|
|
|
51
99
|
}
|
|
52
100
|
function Header() {
|
|
53
101
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
54
|
-
var children = props.children, _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;
|
|
102
|
+
var children = props.children, _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;
|
|
55
103
|
var onClose = useContext(PaneContext).onClose;
|
|
56
104
|
var showActionsOrClose = actions.length > 0 || showCloseButton;
|
|
57
105
|
var childCount = Children.count(children);
|
|
106
|
+
var _useState = _sliced_to_array(useState(null), 2), showActionsPopover = _useState[0], setShowActionsPopover = _useState[1];
|
|
58
107
|
return /*#__PURE__*/ _jsxs("div", {
|
|
59
|
-
className: "grid grid-cols-12 min-h-14 pl-4 pr-3 border-edge-subdued ".concat(bottomBorder ? "border-b" : ""),
|
|
60
108
|
children: [
|
|
61
|
-
/*#__PURE__*/
|
|
62
|
-
className: "grid grid-cols-
|
|
63
|
-
children: Children.map(children, function(child, index) {
|
|
64
|
-
return /*#__PURE__*/ _jsx("div", {
|
|
65
|
-
className: "flex col-span-2 items-center ".concat(childCount === 1 ? "col-span-5" : "", " ").concat(index > 0 ? "justify-center" : ""),
|
|
66
|
-
children: child
|
|
67
|
-
});
|
|
68
|
-
})
|
|
69
|
-
}),
|
|
70
|
-
showActionsOrClose && /*#__PURE__*/ _jsxs("div", {
|
|
71
|
-
className: "flex col-span-2 items-center justify-end",
|
|
109
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
110
|
+
className: "grid grid-cols-12 min-h-14 px-2 border-edge-subdued ".concat(bottomBorder ? "border-b" : ""),
|
|
72
111
|
children: [
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
url: action.url,
|
|
82
|
-
destructive: action.destructive,
|
|
83
|
-
tooltip: action.tooltip,
|
|
84
|
-
tooltipPosition: "below"
|
|
85
|
-
}, index);
|
|
112
|
+
/*#__PURE__*/ _jsx("div", {
|
|
113
|
+
className: "grid grid-cols-5 col-span-10",
|
|
114
|
+
children: Children.map(children, function(child, index) {
|
|
115
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
116
|
+
className: "flex col-span-2 items-center ".concat(childCount === 1 ? "col-span-5" : "", " ").concat(index > 0 ? "justify-center" : ""),
|
|
117
|
+
children: child
|
|
118
|
+
});
|
|
119
|
+
})
|
|
86
120
|
}),
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
121
|
+
showActionsOrClose && /*#__PURE__*/ _jsxs("div", {
|
|
122
|
+
className: "flex col-span-2 items-center justify-end",
|
|
123
|
+
children: [
|
|
124
|
+
actions.map(function(action, index) {
|
|
125
|
+
var showPopover = action.subActions || action.subSections;
|
|
126
|
+
var innerContent = /*#__PURE__*/ _jsx(Button, {
|
|
127
|
+
plain: !action.destructive,
|
|
128
|
+
onClick: showPopover ? function() {
|
|
129
|
+
return setShowActionsPopover(index);
|
|
130
|
+
} : action.onAction || action.onClick,
|
|
131
|
+
disabled: action.disabled,
|
|
132
|
+
icon: action.icon,
|
|
133
|
+
loading: action.loading,
|
|
134
|
+
external: action.external,
|
|
135
|
+
url: action.url,
|
|
136
|
+
destructive: action.destructive,
|
|
137
|
+
tooltip: action.tooltip && showActionsPopover !== index ? action.tooltip : undefined,
|
|
138
|
+
tooltipPosition: "below"
|
|
139
|
+
}, index);
|
|
140
|
+
if (showPopover) {
|
|
141
|
+
return /*#__PURE__*/ _jsx(Popover, {
|
|
142
|
+
active: showActionsPopover === index,
|
|
143
|
+
onClose: function() {
|
|
144
|
+
return setShowActionsPopover(null);
|
|
145
|
+
},
|
|
146
|
+
activator: innerContent,
|
|
147
|
+
preferredAlignment: "left",
|
|
148
|
+
children: /*#__PURE__*/ _jsx(ActionList, {
|
|
149
|
+
sections: action.subSections,
|
|
150
|
+
items: action.subActions,
|
|
151
|
+
onActionAnyItem: function() {
|
|
152
|
+
return setShowActionsPopover(null);
|
|
153
|
+
}
|
|
154
|
+
})
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
return innerContent;
|
|
158
|
+
}),
|
|
159
|
+
showCloseButton && /*#__PURE__*/ _jsx(Button, {
|
|
160
|
+
plain: true,
|
|
161
|
+
icon: CancelMajor,
|
|
162
|
+
onClick: onClose,
|
|
163
|
+
tooltip: "Close",
|
|
164
|
+
tooltipPosition: "below"
|
|
165
|
+
})
|
|
166
|
+
]
|
|
93
167
|
})
|
|
94
168
|
]
|
|
169
|
+
}),
|
|
170
|
+
subHeader && /*#__PURE__*/ _jsx("div", {
|
|
171
|
+
className: "border-edge-subdued ".concat(bottomBorder ? "border-b" : ""),
|
|
172
|
+
children: subHeader
|
|
95
173
|
})
|
|
96
174
|
]
|
|
97
175
|
});
|
|
@@ -98,7 +98,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
98
98
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
99
99
|
}
|
|
100
100
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
101
|
-
import { useEffect, useId, useMemo, useRef, useState, useLayoutEffect } from "react";
|
|
101
|
+
import React, { useEffect, useId, useMemo, useRef, useState, useLayoutEffect } from "react";
|
|
102
102
|
import { createPortal } from "react-dom";
|
|
103
103
|
import { tv } from "tailwind-variants";
|
|
104
104
|
import PopoverManager from "./PopoverManager.js";
|
|
@@ -133,13 +133,13 @@ var styles = tv({
|
|
|
133
133
|
* @param {boolean} [props.sectioned=false] - Whether the popover content is sectioned with padding.
|
|
134
134
|
* @param {string} [props.preferredAlignment="center"] - Preferred alignment for the popover (left, center, right).
|
|
135
135
|
* @param {string} [props.preferredPosition="below"] - Preferred position for the popover (above, below, cover).
|
|
136
|
-
* @param {boolean|string} [props.autofocusTarget=false] - Automatically focus on the first focusable element in the popover.
|
|
137
136
|
* @param {string} [props.className] - Additional class name for the popover.
|
|
138
137
|
* @param {string} [props.containerClassName] - Additional class name for the popover container.
|
|
139
138
|
* @returns {JSX.Element} The rendered popover component.
|
|
140
139
|
*/ function Popover() {
|
|
141
140
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
142
|
-
var
|
|
141
|
+
var activatorWrapper = props.activatorWrapper, _props_activatorDisplayType = props.activatorDisplayType, activatorDisplayType = _props_activatorDisplayType === void 0 ? "inline-block" : _props_activatorDisplayType, activator = props.activator, children = props.children, onClose = props.onClose, active = props.active, fixed = props.fixed, zIndexOverride = props.zIndexOverride, _props_sectioned = props.sectioned, sectioned = _props_sectioned === void 0 ? false : _props_sectioned, _props_preferredAlignment = props.preferredAlignment, preferredAlignment = _props_preferredAlignment === void 0 ? "center" : _props_preferredAlignment, _props_preferredPosition = props.preferredPosition, preferredPosition = _props_preferredPosition === void 0 ? "below" : _props_preferredPosition, _props_matchActivatorWidth = props.matchActivatorWidth, matchActivatorWidth = _props_matchActivatorWidth === void 0 ? false : _props_matchActivatorWidth, _props_maxWidth = props.maxWidth, maxWidth = _props_maxWidth === void 0 ? "default" : _props_maxWidth, className = props.className, containerClassName = props.containerClassName;
|
|
142
|
+
var ActivatorWrapper = activatorWrapper || "div";
|
|
143
143
|
var idValue = useId();
|
|
144
144
|
var idRef = useRef(idValue);
|
|
145
145
|
var initialWidthRef = useRef(null);
|
|
@@ -328,18 +328,30 @@ var styles = tv({
|
|
|
328
328
|
}
|
|
329
329
|
Popover.displayName = "Popover";
|
|
330
330
|
var sectionStyles = tv({
|
|
331
|
-
base: "Litho-Popover__Section border-b border-edge-default last:border-b-0"
|
|
331
|
+
base: "Litho-Popover__Section border-b border-edge-default last:border-b-0",
|
|
332
|
+
variants: {
|
|
333
|
+
padded: {
|
|
334
|
+
true: "p-3",
|
|
335
|
+
false: ""
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
defaultVariants: {
|
|
339
|
+
padded: false
|
|
340
|
+
}
|
|
332
341
|
});
|
|
333
342
|
/**
|
|
334
343
|
* Section component for use within the Popover.
|
|
335
344
|
*
|
|
336
345
|
* @param {Object} props - The component props.
|
|
337
346
|
* @param {React.ReactNode} [props.children] - The content of the section.
|
|
347
|
+
* @param {boolean} [props.padded=false] - Whether the section has padding.
|
|
338
348
|
* @returns {JSX.Element} The rendered section.
|
|
339
349
|
*/ function Section() {
|
|
340
350
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
341
|
-
var children = props.children, className = props.className;
|
|
342
|
-
var sectionClasses = sectionStyles(
|
|
351
|
+
var children = props.children, className = props.className, _props_padded = props.padded, padded = _props_padded === void 0 ? false : _props_padded;
|
|
352
|
+
var sectionClasses = sectionStyles({
|
|
353
|
+
padded: padded
|
|
354
|
+
});
|
|
343
355
|
return /*#__PURE__*/ _jsx("div", {
|
|
344
356
|
className: "".concat(sectionClasses).concat(className ? " ".concat(className) : ""),
|
|
345
357
|
children: children
|
|
@@ -47,7 +47,9 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
47
47
|
}
|
|
48
48
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
49
49
|
import { useId, useRef, useState, useEffect } from "react";
|
|
50
|
-
import
|
|
50
|
+
import Label from "./Label.js";
|
|
51
|
+
import Text from "./Text.js";
|
|
52
|
+
import TextField from "./TextField.js";
|
|
51
53
|
import { tv } from "tailwind-variants";
|
|
52
54
|
var rangeStyles = tv({
|
|
53
55
|
base: "Litho-RangeSlider__ActiveRange absolute left-0 top-1/2 -translate-y-1/2 rounded-l-full h-1 pointer-events-none",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { tv } from "tailwind-variants";
|
|
3
|
-
import
|
|
3
|
+
import Spinner from "./Spinner.js";
|
|
4
|
+
import VerticalStack from "./VerticalStack.js";
|
|
4
5
|
var styles = tv({
|
|
5
6
|
base: "Litho-ResourceList flex flex-col min-w-72",
|
|
6
7
|
variants: {
|
|
@@ -122,6 +122,8 @@ var contentStyles = tv({
|
|
|
122
122
|
* @param {function} props.onFocus - Callback for when the select gains focus.
|
|
123
123
|
* @param {function} props.onBlur - Callback for when the select loses focus.
|
|
124
124
|
* @param {boolean} [props.requiredIndicator] - Whether to show a required indicator next to the label.
|
|
125
|
+
* @param {string} [props.className] - Additional CSS classes to apply to the select container.
|
|
126
|
+
* @param {string} [props.contentClassName] - Additional CSS classes to apply to the select content area.
|
|
125
127
|
* @returns {JSX.Element} The rendered Select component.
|
|
126
128
|
*/ function Select() {
|
|
127
129
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
@@ -145,7 +145,19 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
145
145
|
import { SortAscendingMajor, SortDescendingMajor } from "@shopify/polaris-icons";
|
|
146
146
|
import React, { Children, cloneElement, createContext, isValidElement, useCallback, useContext, useEffect, useId, useMemo, useRef, useState } from "react";
|
|
147
147
|
import { ModalContext } from "./Modal.js";
|
|
148
|
-
import
|
|
148
|
+
import ActionList from "./ActionList.js";
|
|
149
|
+
import Button from "./Button.js";
|
|
150
|
+
import ButtonGroup from "./ButtonGroup.js";
|
|
151
|
+
import Card from "./Card.js";
|
|
152
|
+
import Checkbox from "./Checkbox.js";
|
|
153
|
+
import EmptyState from "./EmptyState.js";
|
|
154
|
+
import Icon from "./Icon.js";
|
|
155
|
+
import Pagination from "./Pagination.js";
|
|
156
|
+
import Popover from "./Popover.js";
|
|
157
|
+
import SkeletonText from "./SkeletonText.js";
|
|
158
|
+
import Spinner from "./Spinner.js";
|
|
159
|
+
import Text from "./Text.js";
|
|
160
|
+
import Tooltip from "./Tooltip.js";
|
|
149
161
|
import { styles } from "../styles/Table.js";
|
|
150
162
|
import { SelectionType } from "../utilities/useIndexResourceState.js";
|
|
151
163
|
import { useMounted } from "../utilities/useMounted.js";
|
|
@@ -475,7 +487,8 @@ var TableWrapperContext = /*#__PURE__*/ createContext({});
|
|
|
475
487
|
alignment: alignment,
|
|
476
488
|
verticalAlign: verticalAlign,
|
|
477
489
|
tableIsSelectable: selectable,
|
|
478
|
-
headingStyle: headingStyle
|
|
490
|
+
headingStyle: headingStyle,
|
|
491
|
+
bordered: bordered
|
|
479
492
|
}),
|
|
480
493
|
style: {
|
|
481
494
|
width: width,
|
|
@@ -750,7 +763,7 @@ var TableWrapperContext = /*#__PURE__*/ createContext({});
|
|
|
750
763
|
ref: containerRef,
|
|
751
764
|
children: [
|
|
752
765
|
/*#__PURE__*/ _jsxs("div", {
|
|
753
|
-
className: "relative overflow-hidden",
|
|
766
|
+
className: "relative overflow-hidden ".concat(bordered ? "rounded-md" : ""),
|
|
754
767
|
children: [
|
|
755
768
|
loading ? /*#__PURE__*/ _jsx("div", {
|
|
756
769
|
className: "pt-9",
|
|
@@ -128,7 +128,7 @@ var styles = tv({
|
|
|
128
128
|
"btn-secondary-fg": "text-btn-secondary-fg",
|
|
129
129
|
"tab-active-fg": "text-tab-active-fg",
|
|
130
130
|
"tab-active-fg-low": "text-tab-active-fg-low",
|
|
131
|
-
|
|
131
|
+
FrameSaveBar: "text-alternate dark:text-black"
|
|
132
132
|
},
|
|
133
133
|
truncate: {
|
|
134
134
|
true: "truncate",
|
|
@@ -231,10 +231,11 @@ var styles = tv({
|
|
|
231
231
|
* @param {string} [props.as] - Element type (e.g., 'p' or 'span').
|
|
232
232
|
* @param {number} [props.clampLines] - Number of lines to clamp.
|
|
233
233
|
* @param {boolean} [props.strike] - Whether to strike through the text.
|
|
234
|
+
* @param {React.ReactNode} [props.children] - The content to be displayed within the text component. Defaults to an empty string.
|
|
234
235
|
* @returns {JSX.Element} Rendered text component with applied styles.
|
|
235
236
|
*/ function Text() {
|
|
236
237
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
237
|
-
var alignment = props.alignment, as = props.as, className = props.className, color = props.color, fontWeight = props.fontWeight, truncate = props.truncate, variant = props.variant, visuallyHidden = props.visuallyHidden, clampLines = props.clampLines, strike = props.strike, rest = _object_without_properties(props, [
|
|
238
|
+
var alignment = props.alignment, as = props.as, className = props.className, color = props.color, fontWeight = props.fontWeight, truncate = props.truncate, variant = props.variant, visuallyHidden = props.visuallyHidden, clampLines = props.clampLines, strike = props.strike, children = props.children, rest = _object_without_properties(props, [
|
|
238
239
|
"alignment",
|
|
239
240
|
"as",
|
|
240
241
|
"className",
|
|
@@ -244,7 +245,8 @@ var styles = tv({
|
|
|
244
245
|
"variant",
|
|
245
246
|
"visuallyHidden",
|
|
246
247
|
"clampLines",
|
|
247
|
-
"strike"
|
|
248
|
+
"strike",
|
|
249
|
+
"children"
|
|
248
250
|
]);
|
|
249
251
|
var classes = styles({
|
|
250
252
|
alignment: alignment,
|
|
@@ -256,10 +258,10 @@ var styles = tv({
|
|
|
256
258
|
clampLines: clampLines,
|
|
257
259
|
strike: strike
|
|
258
260
|
});
|
|
259
|
-
var Element = as || (visuallyHidden ?
|
|
261
|
+
var Element = as || (visuallyHidden ? "span" : "p");
|
|
260
262
|
return /*#__PURE__*/ _jsx(Element, _object_spread_props(_object_spread({}, rest), {
|
|
261
|
-
className: "".concat(classes).concat(className ? " ".concat(className) :
|
|
263
|
+
className: "".concat(classes).concat(className ? " ".concat(className) : ""),
|
|
264
|
+
children: children
|
|
262
265
|
}));
|
|
263
266
|
}
|
|
264
|
-
;
|
|
265
267
|
export default Text;
|
|
@@ -49,7 +49,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
49
49
|
import { CancelSmallMinor, CaretDownMinor, CaretUpMinor, CircleAlertMajor } from "@shopify/polaris-icons";
|
|
50
50
|
import React, { useEffect, useId, useMemo, useRef, useState } from "react";
|
|
51
51
|
import { tv } from "tailwind-variants";
|
|
52
|
-
import
|
|
52
|
+
import Button from "./Button.js";
|
|
53
|
+
import Icon from "./Icon.js";
|
|
54
|
+
import InlineError from "./InlineError.js";
|
|
55
|
+
import Label from "./Label.js";
|
|
56
|
+
import Link from "./Link.js";
|
|
57
|
+
import Text from "./Text.js";
|
|
53
58
|
var styles = tv({
|
|
54
59
|
base: "Litho-TextField group relative rounded-md border min-h-8 cursor-text",
|
|
55
60
|
variants: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { tv } from "tailwind-variants";
|
|
3
|
-
import
|
|
3
|
+
import Icon from "./Icon.js";
|
|
4
4
|
import { ImageMajor } from "@shopify/polaris-icons";
|
|
5
5
|
var imageContainerStyles = tv({
|
|
6
6
|
base: "relative flex items-center justify-center overflow-hidden rounded-lg border border-tint-4 bg-surface-higher group",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import TextField from "./TextField.js";
|
|
3
3
|
function TimePicker() {
|
|
4
4
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
5
5
|
var _props_label = props.label, label = _props_label === void 0 ? "Time:" : _props_label, _props_labelInline = props.labelInline, labelInline = _props_labelInline === void 0 ? true : _props_labelInline, value = props.value, onChange = props.onChange;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React, { cloneElement, isValidElement, useMemo } from "react";
|
|
3
3
|
import { tv } from "tailwind-variants";
|
|
4
|
-
import
|
|
4
|
+
import Icon from "./Icon.js";
|
|
5
5
|
import { AlertMinor, CancelMinor, InfoMinor } from "@shopify/polaris-icons";
|
|
6
6
|
var styles = tv({
|
|
7
7
|
base: "Litho-Tip relative flex rounded-md p-2",
|
|
@@ -118,8 +118,9 @@ var statusHelpers = {
|
|
|
118
118
|
var processedChildren = useMemo(function() {
|
|
119
119
|
var processChildren = function(children) {
|
|
120
120
|
return React.Children.toArray(children).map(function(child) {
|
|
121
|
+
var _child_type;
|
|
121
122
|
if (!/*#__PURE__*/ isValidElement(child)) return child;
|
|
122
|
-
if (child.type.displayName === "Link") {
|
|
123
|
+
if (((_child_type = child.type) === null || _child_type === void 0 ? void 0 : _child_type.displayName) === "Link") {
|
|
123
124
|
return /*#__PURE__*/ cloneElement(child, {
|
|
124
125
|
color: status
|
|
125
126
|
});
|
|
@@ -81,7 +81,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
81
81
|
import React, { useEffect, useRef, useState } from "react";
|
|
82
82
|
import { createPortal } from "react-dom";
|
|
83
83
|
import { tv } from "tailwind-variants";
|
|
84
|
-
import
|
|
84
|
+
import Text from "./Text.js";
|
|
85
|
+
import VerticalStack from "./VerticalStack.js";
|
|
86
|
+
import List from "./List.js";
|
|
87
|
+
import Icon from "./Icon.js";
|
|
85
88
|
import { CircleInformationMajor } from "@shopify/polaris-icons";
|
|
86
89
|
var styles = tv({
|
|
87
90
|
base: "Litho-TooltipContainer relative w-auto h-auto",
|
|
@@ -46,11 +46,14 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
46
46
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
47
47
|
}
|
|
48
48
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
49
|
-
import {
|
|
50
|
-
import { FrameContext } from "./AppProvider.js";
|
|
49
|
+
import { useState } from "react";
|
|
51
50
|
import { MobileHamburgerMajor } from "@shopify/polaris-icons";
|
|
52
51
|
import { tv } from "tailwind-variants";
|
|
53
|
-
import
|
|
52
|
+
import ActionList from "./ActionList.js";
|
|
53
|
+
import Button from "./Button.js";
|
|
54
|
+
import Popover from "./Popover.js";
|
|
55
|
+
import Text from "./Text.js";
|
|
56
|
+
import { useFrame } from "./Frame.js";
|
|
54
57
|
var styles = tv({
|
|
55
58
|
base: "Litho-TopBar flex items-center h-[var(--litho-header-height)] border-b border-edge-subdued dark:border-edge-alt-subdued"
|
|
56
59
|
});
|
|
@@ -68,7 +71,7 @@ var styles = tv({
|
|
|
68
71
|
*/ function TopBar() {
|
|
69
72
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
70
73
|
var hasNavigation = props.hasNavigation, userMenu = props.userMenu, searchTrigger = props.searchTrigger, alwaysShowUserMenuInTopBar = props.alwaysShowUserMenuInTopBar, headerAccessory = props.headerAccessory;
|
|
71
|
-
var setShowMobileNavigation =
|
|
74
|
+
var setShowMobileNavigation = useFrame().setShowMobileNavigation;
|
|
72
75
|
var classes = styles();
|
|
73
76
|
return /*#__PURE__*/ _jsxs("div", {
|
|
74
77
|
className: classes,
|
|
@@ -18,25 +18,58 @@ function _templateObject() {
|
|
|
18
18
|
};
|
|
19
19
|
return data;
|
|
20
20
|
}
|
|
21
|
+
function _templateObject1() {
|
|
22
|
+
var data = _tagged_template_literal([
|
|
23
|
+
"npm view @heymantle/litho dist.shasum"
|
|
24
|
+
]);
|
|
25
|
+
_templateObject1 = function _templateObject() {
|
|
26
|
+
return data;
|
|
27
|
+
};
|
|
28
|
+
return data;
|
|
29
|
+
}
|
|
30
|
+
function _templateObject2() {
|
|
31
|
+
var data = _tagged_template_literal([
|
|
32
|
+
"npm run build && npm pack --dry-run"
|
|
33
|
+
]);
|
|
34
|
+
_templateObject2 = function _templateObject() {
|
|
35
|
+
return data;
|
|
36
|
+
};
|
|
37
|
+
return data;
|
|
38
|
+
}
|
|
21
39
|
import semver from "semver";
|
|
22
40
|
var packageJson = JSON.parse(fs.readFileSync("package.json", "utf8"));
|
|
23
41
|
var currentVersion = packageJson.version;
|
|
24
42
|
var npmVersion = await $(_templateObject()).text();
|
|
43
|
+
var npmShaSum = await $(_templateObject1()).text();
|
|
44
|
+
var packResult = await $(_templateObject2()).text();
|
|
45
|
+
var localShaSum = packResult.match(/shasum\: (.*)\n/)[1];
|
|
46
|
+
if (npmShaSum === localShaSum) {
|
|
47
|
+
var continuePublish = await question("NPM and local shasums match. Continue with publish? (y/n) ", {
|
|
48
|
+
choices: [
|
|
49
|
+
"y",
|
|
50
|
+
"n"
|
|
51
|
+
]
|
|
52
|
+
});
|
|
53
|
+
if (continuePublish === "n") {
|
|
54
|
+
process.exit(0);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
25
57
|
if (semver.gte(npmVersion, currentVersion)) {
|
|
26
|
-
var shouldIncrement = await question("npm version is greater than package.json version. Increment local version? (y/n)", {
|
|
58
|
+
var shouldIncrement = await question("npm version is greater than package.json version. Increment local version? (y/n) ", {
|
|
27
59
|
choices: [
|
|
28
60
|
"y",
|
|
29
61
|
"n"
|
|
30
62
|
]
|
|
31
63
|
});
|
|
32
64
|
if (shouldIncrement === "y") {
|
|
33
|
-
var
|
|
65
|
+
var defaultVersionType = "patch";
|
|
66
|
+
var versionType = await question("Which type of release is this (default: patch)? (patch/minor/major) ", {
|
|
34
67
|
choices: [
|
|
35
68
|
"patch",
|
|
36
69
|
"minor",
|
|
37
70
|
"major"
|
|
38
71
|
]
|
|
39
|
-
});
|
|
72
|
+
}) || defaultVersionType;
|
|
40
73
|
if (![
|
|
41
74
|
"patch",
|
|
42
75
|
"minor",
|
|
@@ -48,7 +81,7 @@ if (semver.gte(npmVersion, currentVersion)) {
|
|
|
48
81
|
var newVersion = semver.inc(currentVersion, versionType);
|
|
49
82
|
packageJson.version = newVersion;
|
|
50
83
|
await fs.writeFile("package.json", JSON.stringify(packageJson, null, 2));
|
|
51
|
-
echo("Incremented version to ".concat(newVersion));
|
|
84
|
+
echo("Incremented version to ".concat(newVersion, ". Remember to commit and push the version update."));
|
|
52
85
|
process.exit(0);
|
|
53
86
|
} else {
|
|
54
87
|
echo("Cannot publish if npm version is greater or equal to local version");
|