@heymantle/litho 0.0.15 → 0.0.16
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/AI_COMPONENTS_GUIDE.md +28 -15
- package/AI_INTEGRATION_GUIDE.md +3 -3
- package/AI_PATTERNS_GUIDE.md +59 -25
- package/COMPONENT_QUICK_REFERENCE.md +3 -3
- package/dist/cjs/components/ActionList.js +33 -25
- package/dist/cjs/components/AnnouncementBar.js +115 -18
- package/dist/cjs/components/AnnouncementCard.js +269 -0
- package/dist/cjs/components/AppProvider.js +15 -2
- package/dist/cjs/components/Autocomplete.js +58 -36
- package/dist/cjs/components/Badge.js +28 -14
- package/dist/cjs/components/Banner.js +37 -27
- package/dist/cjs/components/Box.js +50 -38
- package/dist/cjs/components/Button.js +338 -109
- package/dist/cjs/components/ButtonGroup.js +27 -14
- package/dist/cjs/components/Card.js +311 -143
- package/dist/cjs/components/Checkbox.js +55 -47
- package/dist/cjs/components/CheckboxCard.js +222 -0
- package/dist/cjs/components/CheckboxCardGroup.js +384 -0
- package/dist/cjs/components/ChoiceList.js +21 -11
- package/dist/cjs/components/Code.js +22 -8
- package/dist/cjs/components/Collapsible.js +24 -11
- package/dist/cjs/components/ColorField.js +163 -38
- package/dist/cjs/components/ContextualSaveBar.js +13 -6
- package/dist/cjs/components/DatePicker.js +48 -37
- package/dist/cjs/components/Disclosure.js +35 -22
- package/dist/cjs/components/Divider.js +82 -18
- package/dist/cjs/components/DropZone.js +111 -37
- package/dist/cjs/components/EmptyState.js +18 -6
- package/dist/cjs/components/Filters.js +84 -36
- package/dist/cjs/components/FooterHelp.js +14 -4
- package/dist/cjs/components/Form.js +13 -2
- package/dist/cjs/components/Frame.js +57 -22
- package/dist/cjs/components/FrameSaveBar.js +37 -6
- package/dist/cjs/components/Grid.js +31 -15
- package/dist/cjs/components/HorizontalStack.js +38 -25
- package/dist/cjs/components/Icon.js +683 -61
- package/dist/cjs/components/Image.js +35 -22
- package/dist/cjs/components/InlineError.js +19 -10
- package/dist/cjs/components/Label.js +21 -12
- package/dist/cjs/components/Layout.js +33 -24
- package/dist/cjs/components/LayoutSection.js +84 -22
- package/dist/cjs/components/Link.js +35 -22
- package/dist/cjs/components/List.js +28 -12
- package/dist/cjs/components/Listbox.js +53 -31
- package/dist/cjs/components/Loading.js +14 -2
- package/dist/cjs/components/Modal.js +22 -40
- package/dist/cjs/components/Navigation.js +107 -36
- package/dist/cjs/components/Page.js +44 -31
- package/dist/cjs/components/Pagination.js +20 -5
- package/dist/cjs/components/Pane.js +67 -4
- package/dist/cjs/components/Popover.js +37 -21
- package/dist/cjs/components/PopoverManager.js +14 -1
- package/dist/cjs/components/ProgressBar.js +28 -15
- package/dist/cjs/components/RadioButton.js +32 -24
- package/dist/cjs/components/RadioButtonCard.js +92 -67
- package/dist/cjs/components/RadioButtonCardGroup.js +379 -0
- package/dist/cjs/components/RangeSlider.js +34 -26
- package/dist/cjs/components/ResourceList.js +28 -14
- package/dist/cjs/components/Select.js +38 -26
- package/dist/cjs/components/SkeletonText.js +33 -18
- package/dist/cjs/components/Spinner.js +24 -12
- package/dist/cjs/components/Stack.js +131 -71
- package/dist/cjs/components/TabNavigation.js +27 -1
- package/dist/cjs/components/Table.js +58 -18
- package/dist/cjs/components/Tabs.js +52 -23
- package/dist/cjs/components/Tag.js +37 -16
- package/dist/cjs/components/Text.js +32 -18
- package/dist/cjs/components/TextField.js +119 -69
- package/dist/cjs/components/Thumbnail.js +25 -11
- package/dist/cjs/components/TimePicker.js +22 -1
- package/dist/cjs/components/Tip.js +140 -25
- package/dist/cjs/components/ToastNotification.js +107 -34
- package/dist/cjs/components/ToastProvider.js +13 -3
- package/dist/cjs/components/Tooltip.js +50 -41
- package/dist/cjs/components/TopBar.js +83 -9
- package/dist/cjs/components/VerticalStack.js +31 -16
- package/dist/cjs/index.js +24 -0
- package/dist/cjs/stories/Autocomplete.stories.js +10 -10
- package/dist/cjs/stories/Checkbox.stories.js +6 -8
- package/dist/cjs/stories/CheckboxCardGroup.stories.js +459 -0
- package/dist/cjs/stories/Collapsible.stories.js +11 -11
- package/dist/cjs/stories/ColorField.stories.js +2 -3
- package/dist/cjs/stories/ComplexExamples.stories.js +48 -77
- package/dist/cjs/stories/ContextualSaveBar.stories.js +1 -1
- package/dist/cjs/stories/Divider.stories.js +15 -16
- package/dist/cjs/stories/DropZone.stories.js +3 -3
- package/dist/cjs/stories/FooterHelp.stories.js +3 -4
- package/dist/cjs/stories/Form.stories.js +2 -4
- package/dist/cjs/stories/Grid.stories.js +24 -33
- package/dist/cjs/stories/Icon.stories.js +22 -23
- package/dist/cjs/stories/Image.stories.js +12 -15
- package/dist/cjs/stories/InlineError.stories.js +0 -1
- package/dist/cjs/stories/Layout.stories.js +96 -2
- package/dist/cjs/stories/LayoutSection.stories.js +13 -18
- package/dist/cjs/stories/List.stories.js +24 -28
- package/dist/cjs/stories/Listbox.stories.js +2 -2
- package/dist/cjs/stories/Loading.stories.js +21 -25
- package/dist/cjs/stories/Modal.stories.js +0 -1
- package/dist/cjs/stories/Pagination.stories.js +4 -4
- package/dist/cjs/stories/Pane.stories.js +10 -18
- package/dist/cjs/stories/Popover.stories.js +7 -7
- package/dist/cjs/stories/PopoverManager.stories.js +9 -9
- package/dist/cjs/stories/ProgressBar.stories.js +8 -8
- package/dist/cjs/stories/RadioButton.stories.js +2 -2
- package/dist/cjs/stories/RadioButtonCard.stories.js +2 -2
- package/dist/cjs/stories/RadioButtonCardGroup.stories.js +502 -0
- package/dist/cjs/stories/RangeSlider.stories.js +1 -3
- package/dist/cjs/stories/ResourceList.stories.js +13 -13
- package/dist/cjs/stories/Spinner.stories.js +9 -9
- package/dist/cjs/stories/Stack.stories.js +233 -51
- package/dist/cjs/stories/Tabs.stories.js +2 -2
- package/dist/cjs/stories/Tag.stories.js +1 -1
- package/dist/cjs/stories/Thumbnail.stories.js +17 -18
- package/dist/cjs/stories/TimePicker.stories.js +0 -5
- package/dist/cjs/stories/Tip.stories.js +1 -1
- package/dist/esm/components/ActionList.js +33 -25
- package/dist/esm/components/AnnouncementBar.js +115 -18
- package/dist/esm/components/AnnouncementCard.js +254 -0
- package/dist/esm/components/AppProvider.js +15 -2
- package/dist/esm/components/Autocomplete.js +58 -36
- package/dist/esm/components/Badge.js +28 -14
- package/dist/esm/components/Banner.js +37 -27
- package/dist/esm/components/Box.js +50 -38
- package/dist/esm/components/Button.js +338 -109
- package/dist/esm/components/ButtonGroup.js +27 -14
- package/dist/esm/components/Card.js +300 -140
- package/dist/esm/components/Checkbox.js +55 -47
- package/dist/esm/components/CheckboxCard.js +207 -0
- package/dist/esm/components/CheckboxCardGroup.js +370 -0
- package/dist/esm/components/ChoiceList.js +21 -11
- package/dist/esm/components/Code.js +22 -8
- package/dist/esm/components/Collapsible.js +24 -11
- package/dist/esm/components/ColorField.js +165 -40
- package/dist/esm/components/ContextualSaveBar.js +13 -6
- package/dist/esm/components/DatePicker.js +48 -37
- package/dist/esm/components/Disclosure.js +35 -22
- package/dist/esm/components/Divider.js +78 -20
- package/dist/esm/components/DropZone.js +111 -37
- package/dist/esm/components/EmptyState.js +18 -6
- package/dist/esm/components/Filters.js +84 -36
- package/dist/esm/components/FooterHelp.js +14 -4
- package/dist/esm/components/Form.js +13 -2
- package/dist/esm/components/Frame.js +57 -22
- package/dist/esm/components/FrameSaveBar.js +37 -6
- package/dist/esm/components/Grid.js +31 -15
- package/dist/esm/components/HorizontalStack.js +38 -25
- package/dist/esm/components/Icon.js +681 -62
- package/dist/esm/components/Image.js +35 -22
- package/dist/esm/components/InlineError.js +19 -10
- package/dist/esm/components/Label.js +21 -12
- package/dist/esm/components/Layout.js +58 -25
- package/dist/esm/components/LayoutSection.js +84 -22
- package/dist/esm/components/Link.js +35 -22
- package/dist/esm/components/List.js +28 -12
- package/dist/esm/components/Listbox.js +53 -31
- package/dist/esm/components/Loading.js +14 -2
- package/dist/esm/components/Modal.js +69 -41
- package/dist/esm/components/Navigation.js +107 -36
- package/dist/esm/components/Page.js +44 -31
- package/dist/esm/components/Pagination.js +20 -5
- package/dist/esm/components/Pane.js +67 -4
- package/dist/esm/components/Popover.js +37 -21
- package/dist/esm/components/PopoverManager.js +14 -1
- package/dist/esm/components/ProgressBar.js +28 -15
- package/dist/esm/components/RadioButton.js +32 -24
- package/dist/esm/components/RadioButtonCard.js +92 -67
- package/dist/esm/components/RadioButtonCardGroup.js +364 -0
- package/dist/esm/components/RangeSlider.js +34 -26
- package/dist/esm/components/ResourceList.js +28 -14
- package/dist/esm/components/Select.js +38 -26
- package/dist/esm/components/SkeletonText.js +33 -18
- package/dist/esm/components/Spinner.js +24 -12
- package/dist/esm/components/Stack.js +131 -71
- package/dist/esm/components/TabNavigation.js +27 -1
- package/dist/esm/components/Table.js +58 -18
- package/dist/esm/components/Tabs.js +52 -23
- package/dist/esm/components/Tag.js +37 -16
- package/dist/esm/components/Text.js +32 -18
- package/dist/esm/components/TextField.js +119 -69
- package/dist/esm/components/Thumbnail.js +25 -11
- package/dist/esm/components/TimePicker.js +22 -1
- package/dist/esm/components/Tip.js +140 -25
- package/dist/esm/components/ToastNotification.js +107 -34
- package/dist/esm/components/ToastProvider.js +13 -3
- package/dist/esm/components/Tooltip.js +50 -41
- package/dist/esm/components/TopBar.js +83 -9
- package/dist/esm/components/VerticalStack.js +31 -16
- package/dist/esm/index.js +6 -0
- package/dist/esm/stories/Autocomplete.stories.js +10 -10
- package/dist/esm/stories/Checkbox.stories.js +6 -8
- package/dist/esm/stories/CheckboxCardGroup.stories.js +421 -0
- package/dist/esm/stories/Collapsible.stories.js +11 -11
- package/dist/esm/stories/ColorField.stories.js +2 -3
- package/dist/esm/stories/ComplexExamples.stories.js +48 -77
- package/dist/esm/stories/ContextualSaveBar.stories.js +1 -1
- package/dist/esm/stories/Divider.stories.js +15 -16
- package/dist/esm/stories/DropZone.stories.js +3 -3
- package/dist/esm/stories/FooterHelp.stories.js +3 -4
- package/dist/esm/stories/Form.stories.js +2 -4
- package/dist/esm/stories/Grid.stories.js +24 -33
- package/dist/esm/stories/Icon.stories.js +22 -23
- package/dist/esm/stories/Image.stories.js +12 -15
- package/dist/esm/stories/InlineError.stories.js +0 -1
- package/dist/esm/stories/Layout.stories.js +93 -2
- package/dist/esm/stories/LayoutSection.stories.js +13 -18
- package/dist/esm/stories/List.stories.js +24 -28
- package/dist/esm/stories/Listbox.stories.js +2 -2
- package/dist/esm/stories/Loading.stories.js +21 -25
- package/dist/esm/stories/Modal.stories.js +0 -1
- package/dist/esm/stories/Pagination.stories.js +4 -4
- package/dist/esm/stories/Pane.stories.js +10 -18
- package/dist/esm/stories/Popover.stories.js +7 -7
- package/dist/esm/stories/PopoverManager.stories.js +9 -9
- package/dist/esm/stories/ProgressBar.stories.js +8 -8
- package/dist/esm/stories/RadioButton.stories.js +2 -2
- package/dist/esm/stories/RadioButtonCard.stories.js +2 -2
- package/dist/esm/stories/RadioButtonCardGroup.stories.js +461 -0
- package/dist/esm/stories/RangeSlider.stories.js +1 -3
- package/dist/esm/stories/ResourceList.stories.js +13 -13
- package/dist/esm/stories/Spinner.stories.js +9 -9
- package/dist/esm/stories/Stack.stories.js +224 -51
- package/dist/esm/stories/Tabs.stories.js +2 -2
- package/dist/esm/stories/Tag.stories.js +1 -1
- package/dist/esm/stories/Thumbnail.stories.js +17 -18
- package/dist/esm/stories/TimePicker.stories.js +0 -5
- package/dist/esm/stories/Tip.stories.js +1 -1
- package/dist/types/components/ActionList.d.ts +1 -31
- package/dist/types/components/ActionList.d.ts.map +1 -1
- package/dist/types/components/AnnouncementBar.d.ts +1 -19
- package/dist/types/components/AnnouncementBar.d.ts.map +1 -1
- package/dist/types/components/AnnouncementCard.d.ts +3 -0
- package/dist/types/components/AnnouncementCard.d.ts.map +1 -0
- package/dist/types/components/AppProvider.d.ts +14 -1
- package/dist/types/components/AppProvider.d.ts.map +1 -1
- package/dist/types/components/Autocomplete.d.ts +1 -71
- package/dist/types/components/Autocomplete.d.ts.map +1 -1
- package/dist/types/components/Badge.d.ts +1 -19
- package/dist/types/components/Badge.d.ts.map +1 -1
- package/dist/types/components/Banner.d.ts +1 -37
- package/dist/types/components/Banner.d.ts.map +1 -1
- package/dist/types/components/Box.d.ts +1 -68
- package/dist/types/components/Box.d.ts.map +1 -1
- package/dist/types/components/Button.d.ts +1 -131
- package/dist/types/components/Button.d.ts.map +1 -1
- package/dist/types/components/ButtonGroup.d.ts +1 -22
- package/dist/types/components/ButtonGroup.d.ts.map +1 -1
- package/dist/types/components/Card.d.ts +54 -59
- package/dist/types/components/Card.d.ts.map +1 -1
- package/dist/types/components/Checkbox.d.ts +1 -63
- package/dist/types/components/Checkbox.d.ts.map +1 -1
- package/dist/types/components/CheckboxCard.d.ts +3 -0
- package/dist/types/components/CheckboxCard.d.ts.map +1 -0
- package/dist/types/components/CheckboxCardGroup.d.ts +3 -0
- package/dist/types/components/CheckboxCardGroup.d.ts.map +1 -0
- package/dist/types/components/ChoiceList.d.ts +1 -42
- package/dist/types/components/ChoiceList.d.ts.map +1 -1
- package/dist/types/components/Code.d.ts +1 -26
- package/dist/types/components/Code.d.ts.map +1 -1
- package/dist/types/components/Collapsible.d.ts +1 -15
- package/dist/types/components/Collapsible.d.ts.map +1 -1
- package/dist/types/components/ColorField.d.ts +13 -34
- package/dist/types/components/ColorField.d.ts.map +1 -1
- package/dist/types/components/ContextualSaveBar.d.ts +13 -6
- package/dist/types/components/ContextualSaveBar.d.ts.map +1 -1
- package/dist/types/components/DatePicker.d.ts +1 -64
- package/dist/types/components/DatePicker.d.ts.map +1 -1
- package/dist/types/components/Disclosure.d.ts +1 -25
- package/dist/types/components/Disclosure.d.ts.map +1 -1
- package/dist/types/components/Divider.d.ts +1 -19
- package/dist/types/components/Divider.d.ts.map +1 -1
- package/dist/types/components/DropZone.d.ts +1 -62
- package/dist/types/components/DropZone.d.ts.map +1 -1
- package/dist/types/components/EmptyState.d.ts +1 -50
- package/dist/types/components/EmptyState.d.ts.map +1 -1
- package/dist/types/components/Filters.d.ts +13 -68
- package/dist/types/components/Filters.d.ts.map +1 -1
- package/dist/types/components/FooterHelp.d.ts +14 -4
- package/dist/types/components/FooterHelp.d.ts.map +1 -1
- package/dist/types/components/Form.d.ts +13 -2
- package/dist/types/components/Form.d.ts.map +1 -1
- package/dist/types/components/Frame.d.ts +15 -36
- package/dist/types/components/Frame.d.ts.map +1 -1
- package/dist/types/components/FrameSaveBar.d.ts +3 -6
- package/dist/types/components/FrameSaveBar.d.ts.map +1 -1
- package/dist/types/components/Grid.d.ts +5 -21
- package/dist/types/components/Grid.d.ts.map +1 -1
- package/dist/types/components/HorizontalStack.d.ts +1 -34
- package/dist/types/components/HorizontalStack.d.ts.map +1 -1
- package/dist/types/components/Icon.d.ts +1 -41
- package/dist/types/components/Icon.d.ts.map +1 -1
- package/dist/types/components/Image.d.ts +1 -43
- package/dist/types/components/Image.d.ts.map +1 -1
- package/dist/types/components/InlineError.d.ts +1 -20
- package/dist/types/components/InlineError.d.ts.map +1 -1
- package/dist/types/components/Label.d.ts +1 -26
- package/dist/types/components/Label.d.ts.map +1 -1
- package/dist/types/components/Layout.d.ts +24 -15
- package/dist/types/components/Layout.d.ts.map +1 -1
- package/dist/types/components/LayoutSection.d.ts +1 -19
- package/dist/types/components/LayoutSection.d.ts.map +1 -1
- package/dist/types/components/Link.d.ts +1 -37
- package/dist/types/components/Link.d.ts.map +1 -1
- package/dist/types/components/List.d.ts +5 -17
- package/dist/types/components/List.d.ts.map +1 -1
- package/dist/types/components/Listbox.d.ts +1 -32
- package/dist/types/components/Listbox.d.ts.map +1 -1
- package/dist/types/components/Loading.d.ts +14 -2
- package/dist/types/components/Loading.d.ts.map +1 -1
- package/dist/types/components/Modal.d.ts +26 -35
- package/dist/types/components/Modal.d.ts.map +1 -1
- package/dist/types/components/Navigation.d.ts +1 -25
- package/dist/types/components/Navigation.d.ts.map +1 -1
- package/dist/types/components/Page.d.ts +1 -57
- package/dist/types/components/Page.d.ts.map +1 -1
- package/dist/types/components/Pagination.d.ts +13 -3
- package/dist/types/components/Pagination.d.ts.map +1 -1
- package/dist/types/components/Pane.d.ts +55 -3
- package/dist/types/components/Pane.d.ts.map +1 -1
- package/dist/types/components/Popover.d.ts +5 -37
- package/dist/types/components/Popover.d.ts.map +1 -1
- package/dist/types/components/PopoverManager.d.ts.map +1 -1
- package/dist/types/components/ProgressBar.d.ts +1 -22
- package/dist/types/components/ProgressBar.d.ts.map +1 -1
- package/dist/types/components/RadioButton.d.ts +1 -37
- package/dist/types/components/RadioButton.d.ts.map +1 -1
- package/dist/types/components/RadioButtonCard.d.ts +1 -39
- package/dist/types/components/RadioButtonCard.d.ts.map +1 -1
- package/dist/types/components/RadioButtonCardGroup.d.ts +3 -0
- package/dist/types/components/RadioButtonCardGroup.d.ts.map +1 -0
- package/dist/types/components/RangeSlider.d.ts +1 -42
- package/dist/types/components/RangeSlider.d.ts.map +1 -1
- package/dist/types/components/ResourceList.d.ts +5 -30
- package/dist/types/components/ResourceList.d.ts.map +1 -1
- package/dist/types/components/Select.d.ts +1 -46
- package/dist/types/components/Select.d.ts.map +1 -1
- package/dist/types/components/SkeletonText.d.ts +1 -26
- package/dist/types/components/SkeletonText.d.ts.map +1 -1
- package/dist/types/components/Spinner.d.ts +1 -16
- package/dist/types/components/Spinner.d.ts.map +1 -1
- package/dist/types/components/Stack.d.ts +1 -47
- package/dist/types/components/Stack.d.ts.map +1 -1
- package/dist/types/components/TabNavigation.d.ts.map +1 -1
- package/dist/types/components/Table.d.ts +13 -58
- package/dist/types/components/Table.d.ts.map +1 -1
- package/dist/types/components/Tabs.d.ts +3 -41
- package/dist/types/components/Tabs.d.ts.map +1 -1
- package/dist/types/components/Tag.d.ts +1 -24
- package/dist/types/components/Tag.d.ts.map +1 -1
- package/dist/types/components/Text.d.ts +1 -30
- package/dist/types/components/Text.d.ts.map +1 -1
- package/dist/types/components/TextField.d.ts +1 -109
- package/dist/types/components/TextField.d.ts.map +1 -1
- package/dist/types/components/Thumbnail.d.ts +1 -16
- package/dist/types/components/Thumbnail.d.ts.map +1 -1
- package/dist/types/components/TimePicker.d.ts +28 -1
- package/dist/types/components/TimePicker.d.ts.map +1 -1
- package/dist/types/components/Tip.d.ts +1 -21
- package/dist/types/components/Tip.d.ts.map +1 -1
- package/dist/types/components/ToastNotification.d.ts +1 -34
- package/dist/types/components/ToastNotification.d.ts.map +1 -1
- package/dist/types/components/ToastProvider.d.ts +13 -3
- package/dist/types/components/ToastProvider.d.ts.map +1 -1
- package/dist/types/components/Tooltip.d.ts +1 -54
- package/dist/types/components/Tooltip.d.ts.map +1 -1
- package/dist/types/components/TopBar.d.ts +1 -19
- package/dist/types/components/TopBar.d.ts.map +1 -1
- package/dist/types/components/VerticalStack.d.ts +1 -25
- package/dist/types/components/VerticalStack.d.ts.map +1 -1
- package/dist/types/index.d.ts +6 -0
- package/index.css +76 -14
- package/package.json +4 -3
|
@@ -10,6 +10,19 @@ function _array_with_holes(arr) {
|
|
|
10
10
|
function _array_without_holes(arr) {
|
|
11
11
|
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
12
12
|
}
|
|
13
|
+
function _define_property(obj, key, value) {
|
|
14
|
+
if (key in obj) {
|
|
15
|
+
Object.defineProperty(obj, key, {
|
|
16
|
+
value: value,
|
|
17
|
+
enumerable: true,
|
|
18
|
+
configurable: true,
|
|
19
|
+
writable: true
|
|
20
|
+
});
|
|
21
|
+
} else {
|
|
22
|
+
obj[key] = value;
|
|
23
|
+
}
|
|
24
|
+
return obj;
|
|
25
|
+
}
|
|
13
26
|
function _iterable_to_array(iter) {
|
|
14
27
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
15
28
|
}
|
|
@@ -43,6 +56,45 @@ function _non_iterable_rest() {
|
|
|
43
56
|
function _non_iterable_spread() {
|
|
44
57
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
45
58
|
}
|
|
59
|
+
function _object_spread(target) {
|
|
60
|
+
for(var i = 1; i < arguments.length; i++){
|
|
61
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
62
|
+
var ownKeys = Object.keys(source);
|
|
63
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
64
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
65
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
66
|
+
}));
|
|
67
|
+
}
|
|
68
|
+
ownKeys.forEach(function(key) {
|
|
69
|
+
_define_property(target, key, source[key]);
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
return target;
|
|
73
|
+
}
|
|
74
|
+
function ownKeys(object, enumerableOnly) {
|
|
75
|
+
var keys = Object.keys(object);
|
|
76
|
+
if (Object.getOwnPropertySymbols) {
|
|
77
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
78
|
+
if (enumerableOnly) {
|
|
79
|
+
symbols = symbols.filter(function(sym) {
|
|
80
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
keys.push.apply(keys, symbols);
|
|
84
|
+
}
|
|
85
|
+
return keys;
|
|
86
|
+
}
|
|
87
|
+
function _object_spread_props(target, source) {
|
|
88
|
+
source = source != null ? source : {};
|
|
89
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
90
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
91
|
+
} else {
|
|
92
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
93
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
return target;
|
|
97
|
+
}
|
|
46
98
|
function _sliced_to_array(arr, i) {
|
|
47
99
|
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
48
100
|
}
|
|
@@ -69,7 +121,51 @@ import SkeletonText from "./SkeletonText.js";
|
|
|
69
121
|
import Spinner from "./Spinner.js";
|
|
70
122
|
import Text from "./Text.js";
|
|
71
123
|
import { CancelMajor, CircleAlertMajor, FileMinor, ImageMajor, ImagesMajor, MagicMajor } from "@shopify/polaris-icons";
|
|
72
|
-
|
|
124
|
+
/**
|
|
125
|
+
* @component DropZone
|
|
126
|
+
*
|
|
127
|
+
* @description A file upload area that accepts drag-and-drop or click-to-browse file selection with type and size validation.
|
|
128
|
+
*
|
|
129
|
+
* @usage
|
|
130
|
+
* - DO: Use for file upload areas that accept drag-and-drop or click-to-browse.
|
|
131
|
+
* - DON'T: Use for non-file inputs.
|
|
132
|
+
*
|
|
133
|
+
* @accessibility
|
|
134
|
+
* - Supports keyboard activation; ensure a descriptive label is provided for the upload area.
|
|
135
|
+
*
|
|
136
|
+
* @alternative
|
|
137
|
+
* - If you need a simple file input, use a native `<input type="file">` with TextField styling.
|
|
138
|
+
*
|
|
139
|
+
* @param {Object} props - Component props.
|
|
140
|
+
* @param {string} [props.id] - The ID for the DropZone input.
|
|
141
|
+
* @param {string} [props.label] - Label for the DropZone.
|
|
142
|
+
* @param {boolean} [props.labelHidden] - Whether the label is hidden.
|
|
143
|
+
* @param {Object} [props.labelAction] - Action for the label, including `onAction` and `content`.
|
|
144
|
+
* @param {string} [props.tooltip] - Tooltip for the label.
|
|
145
|
+
* @param {string} [props.labelVariant] - Variant for the label styling.
|
|
146
|
+
* @param {string} [props.type="file"] - The type of files accepted (e.g., "file", "image").
|
|
147
|
+
* @param {string|string[]} [props.accept] - Accepted file types.
|
|
148
|
+
* @param {boolean} [props.allowMultiple=false] - Whether multiple files can be uploaded.
|
|
149
|
+
* @param {boolean} [props.showDropZoneWhenDisabled=true] - Whether the DropZone is shown when disabled.
|
|
150
|
+
* @param {boolean} [props.disabled] - Whether the DropZone is disabled.
|
|
151
|
+
* @param {Function} [props.onDrop] - Callback for when files are dropped.
|
|
152
|
+
* @param {Function} [props.onDropAccepted] - Callback for accepted files.
|
|
153
|
+
* @param {Function} [props.onDropRejected] - Callback for rejected files.
|
|
154
|
+
* @param {string} [props.helpText] - Help text displayed below the DropZone.
|
|
155
|
+
* @param {string} [props.error] - Error message to display.
|
|
156
|
+
* @param {boolean} [props.uploading=false] - Whether a file upload is in progress.
|
|
157
|
+
* @param {Array} [props.uploadedFiles=[]] - Array of uploaded files.
|
|
158
|
+
* @param {string} [props.uploadLabel="Drag and drop files or click to upload"] - Label for upload prompt.
|
|
159
|
+
* @param {string} [props.uploadingLabel="Uploading..."] - Label shown during file uploads.
|
|
160
|
+
* @param {string} [props.dragLabel="Release to upload"] - Label for the drag area.
|
|
161
|
+
* @param {boolean} [props.showFilePreview=true] - Whether file previews are displayed.
|
|
162
|
+
* @param {boolean} [props.previewLoading] - Whether file previews are loading.
|
|
163
|
+
* @param {number} [props.previewRows=2] - Number of preview rows to display.
|
|
164
|
+
* @param {Function} [props.onRemove] - Callback for removing a file.
|
|
165
|
+
* @param {Function} [props.onFilePreviewClick] - Callback for clicking a file preview.
|
|
166
|
+
* @param {string} [props.filename] - Name of the file being uploaded.
|
|
167
|
+
* @returns {JSX.Element} DropZone component.
|
|
168
|
+
*/ var normalizeDropZoneAccept = function(accept) {
|
|
73
169
|
if (!accept) return [];
|
|
74
170
|
return typeof accept === "string" ? [
|
|
75
171
|
accept
|
|
@@ -131,39 +227,7 @@ var dropZoneStyles = tv({
|
|
|
131
227
|
dragOver: false
|
|
132
228
|
}
|
|
133
229
|
});
|
|
134
|
-
|
|
135
|
-
* DropZone component for handling file uploads with previews.
|
|
136
|
-
*
|
|
137
|
-
* @param {Object} props - Component props.
|
|
138
|
-
* @param {string} [props.id] - The ID for the DropZone input.
|
|
139
|
-
* @param {string} [props.label] - Label for the DropZone.
|
|
140
|
-
* @param {boolean} [props.labelHidden] - Whether the label is hidden.
|
|
141
|
-
* @param {Object} [props.labelAction] - Action for the label, including `onAction` and `content`.
|
|
142
|
-
* @param {string} [props.tooltip] - Tooltip for the label.
|
|
143
|
-
* @param {string} [props.labelVariant] - Variant for the label styling.
|
|
144
|
-
* @param {string} [props.type="file"] - The type of files accepted (e.g., "file", "image").
|
|
145
|
-
* @param {string|string[]} [props.accept] - Accepted file types.
|
|
146
|
-
* @param {boolean} [props.allowMultiple=false] - Whether multiple files can be uploaded.
|
|
147
|
-
* @param {boolean} [props.showDropZoneWhenDisabled=true] - Whether the DropZone is shown when disabled.
|
|
148
|
-
* @param {boolean} [props.disabled] - Whether the DropZone is disabled.
|
|
149
|
-
* @param {Function} [props.onDrop] - Callback for when files are dropped.
|
|
150
|
-
* @param {Function} [props.onDropAccepted] - Callback for accepted files.
|
|
151
|
-
* @param {Function} [props.onDropRejected] - Callback for rejected files.
|
|
152
|
-
* @param {string} [props.helpText] - Help text displayed below the DropZone.
|
|
153
|
-
* @param {string} [props.error] - Error message to display.
|
|
154
|
-
* @param {boolean} [props.uploading=false] - Whether a file upload is in progress.
|
|
155
|
-
* @param {Array} [props.uploadedFiles=[]] - Array of uploaded files.
|
|
156
|
-
* @param {string} [props.uploadLabel="Drag and drop files or click to upload"] - Label for upload prompt.
|
|
157
|
-
* @param {string} [props.uploadingLabel="Uploading..."] - Label shown during file uploads.
|
|
158
|
-
* @param {string} [props.dragLabel="Release to upload"] - Label for the drag area.
|
|
159
|
-
* @param {boolean} [props.showFilePreview=true] - Whether file previews are displayed.
|
|
160
|
-
* @param {boolean} [props.previewLoading] - Whether file previews are loading.
|
|
161
|
-
* @param {number} [props.previewRows=2] - Number of preview rows to display.
|
|
162
|
-
* @param {Function} [props.onRemove] - Callback for removing a file.
|
|
163
|
-
* @param {Function} [props.onFilePreviewClick] - Callback for clicking a file preview.
|
|
164
|
-
* @param {string} [props.filename] - Name of the file being uploaded.
|
|
165
|
-
* @returns {JSX.Element} DropZone component.
|
|
166
|
-
*/ function DropZone() {
|
|
230
|
+
function DropZone() {
|
|
167
231
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
168
232
|
var id = props.id, label = props.label, labelHidden = props.labelHidden, labelAction = props.labelAction, tooltip = props.tooltip, labelVariant = props.labelVariant, _props_type = props.type, type = _props_type === void 0 ? "file" : _props_type, _accept = props.accept, _props_allowMultiple = props.allowMultiple, allowMultiple = _props_allowMultiple === void 0 ? false : _props_allowMultiple, _props_showDropZoneWhenDisabled = props.showDropZoneWhenDisabled, showDropZoneWhenDisabled = _props_showDropZoneWhenDisabled === void 0 ? true : _props_showDropZoneWhenDisabled, _disabled = props.disabled, onDrop = props.onDrop, onDropAccepted = props.onDropAccepted, onDropRejected = props.onDropRejected, helpText = props.helpText, error = props.error, _props_uploading = props.uploading, uploading = _props_uploading === void 0 ? false : _props_uploading, _props_uploadedFiles = props.uploadedFiles, uploadedFiles = _props_uploadedFiles === void 0 ? [] : _props_uploadedFiles, _props_uploadLabel = props.uploadLabel, uploadLabel = _props_uploadLabel === void 0 ? "Drag and drop files or click to upload" : _props_uploadLabel, _props_uploadingLabel = props.uploadingLabel, uploadingLabel = _props_uploadingLabel === void 0 ? "Uploading..." : _props_uploadingLabel, _props_dragLabel = props.dragLabel, dragLabel = _props_dragLabel === void 0 ? "Release to upload" : _props_dragLabel, tmp = props.showFilePreview, _showFilePreview = tmp === void 0 ? true : tmp, previewLoading = props.previewLoading, _props_previewRows = props.previewRows, previewRows = _props_previewRows === void 0 ? 2 : _props_previewRows, onRemove = props.onRemove, onFilePreviewClick = props.onFilePreviewClick, filename = props.filename;
|
|
169
233
|
var accept = normalizeDropZoneAccept(_accept);
|
|
@@ -491,11 +555,21 @@ var previewStyles = tv({
|
|
|
491
555
|
return /*#__PURE__*/ _jsxs("div", {
|
|
492
556
|
className: "flex justify-between items-center gap-2",
|
|
493
557
|
children: [
|
|
494
|
-
/*#__PURE__*/ _jsxs("div", {
|
|
558
|
+
/*#__PURE__*/ _jsxs("div", _object_spread_props(_object_spread({
|
|
495
559
|
className: previewClasses,
|
|
496
560
|
onClick: onClick ? function() {
|
|
497
561
|
return onClick(file);
|
|
498
|
-
} : undefined
|
|
562
|
+
} : undefined
|
|
563
|
+
}, onClick ? {
|
|
564
|
+
role: "button",
|
|
565
|
+
tabIndex: 0,
|
|
566
|
+
onKeyDown: function(e) {
|
|
567
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
568
|
+
e.preventDefault();
|
|
569
|
+
onClick(file);
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
} : {}), {
|
|
499
573
|
children: [
|
|
500
574
|
/*#__PURE__*/ _jsx(FileThumbnail, {
|
|
501
575
|
file: file
|
|
@@ -517,7 +591,7 @@ var previewStyles = tv({
|
|
|
517
591
|
]
|
|
518
592
|
})
|
|
519
593
|
]
|
|
520
|
-
}),
|
|
594
|
+
})),
|
|
521
595
|
onRemove && /*#__PURE__*/ _jsx(Button, {
|
|
522
596
|
size: "small",
|
|
523
597
|
icon: CancelMajor,
|
|
@@ -4,12 +4,21 @@ import Image from "./Image.js";
|
|
|
4
4
|
import Text from "./Text.js";
|
|
5
5
|
import ProgressBar from "./ProgressBar.js";
|
|
6
6
|
import { tv } from "tailwind-variants";
|
|
7
|
-
var styles = tv({
|
|
8
|
-
base: "Litho-EmptyState py-16 px-4 flex flex-col items-center text-center gap-6"
|
|
9
|
-
});
|
|
10
7
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
8
|
+
* @component EmptyState
|
|
9
|
+
*
|
|
10
|
+
* @description A placeholder component displayed when a resource list, table, or page has no content, with a heading, description, and call-to-action.
|
|
11
|
+
*
|
|
12
|
+
* @usage
|
|
13
|
+
* - DO: Display when a resource list, table, or page has no data to show.
|
|
14
|
+
* - DON'T: Use for error states (use `Banner` instead).
|
|
15
|
+
*
|
|
16
|
+
* @accessibility
|
|
17
|
+
* - Ensure the heading and action buttons are descriptive; decorative images should have empty alt text.
|
|
18
|
+
*
|
|
19
|
+
* @alternative
|
|
20
|
+
* - If you need to show an error or warning message, use `Banner` instead.
|
|
21
|
+
* - If you need a loading state, use `SkeletonText`.
|
|
13
22
|
*
|
|
14
23
|
* @param {Object} props - The properties to customize the EmptyState component.
|
|
15
24
|
* @param {string} [props.description] - Text description to display in the empty state.
|
|
@@ -33,7 +42,10 @@ var styles = tv({
|
|
|
33
42
|
* @param {number} [props.progress] - Progress value to display in the empty state.
|
|
34
43
|
*
|
|
35
44
|
* @returns {JSX.Element} The rendered EmptyState component.
|
|
36
|
-
*/
|
|
45
|
+
*/ var styles = tv({
|
|
46
|
+
base: "Litho-EmptyState py-16 px-4 flex flex-col items-center text-center gap-6"
|
|
47
|
+
});
|
|
48
|
+
function EmptyState() {
|
|
37
49
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
38
50
|
var description = props.description, icon = props.icon, iconSource = props.iconSource, primaryAction = props.primaryAction, secondaryAction = props.secondaryAction, title = props.title, _props_titleVariant = props.titleVariant, titleVariant = _props_titleVariant === void 0 ? "headingXl" : _props_titleVariant, _props_descriptionVariant = props.descriptionVariant, descriptionVariant = _props_descriptionVariant === void 0 ? "bodyLg" : _props_descriptionVariant, progress = props.progress, className = props.className;
|
|
39
51
|
var classes = styles();
|
|
@@ -122,33 +122,21 @@ import TextField from "./TextField.js";
|
|
|
122
122
|
import Tooltip from "./Tooltip.js";
|
|
123
123
|
import { CancelSmallMinor, CaretDownMinor, DeleteMinor, HorizontalDotsMinor, PlusMinor, SearchMajor, ChevronLeftMinor, ChevronRightMinor } from "@shopify/polaris-icons";
|
|
124
124
|
import { useDarkMode } from "./AppProvider.js";
|
|
125
|
-
var styles = tv({
|
|
126
|
-
base: "Litho-Filters flex items-center overflow-x-auto",
|
|
127
|
-
variants: {
|
|
128
|
-
showTextField: {
|
|
129
|
-
true: "justify-between",
|
|
130
|
-
false: ""
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
var filterContainerStyles = tv({
|
|
135
|
-
base: "Litho-FiltersContainer flex flex-wrap gap-1.5 items-center",
|
|
136
|
-
variants: {
|
|
137
|
-
showTextField: {
|
|
138
|
-
true: "p-2",
|
|
139
|
-
false: ""
|
|
140
|
-
},
|
|
141
|
-
padded: {
|
|
142
|
-
true: "p-2",
|
|
143
|
-
false: ""
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
125
|
/**
|
|
148
|
-
*
|
|
149
|
-
*
|
|
126
|
+
* @component Filters
|
|
127
|
+
*
|
|
128
|
+
* @description A filter management component that renders active filter pills and controls for filtering table or resource list data.
|
|
129
|
+
*
|
|
130
|
+
* @usage
|
|
131
|
+
* - DO: Use for filtering content in tables or resource lists with removable filter pills.
|
|
132
|
+
* - DON'T: Use for general-purpose tabs (use Tabs).
|
|
133
|
+
*
|
|
134
|
+
* @accessibility
|
|
135
|
+
* - Filter pills are keyboard accessible with remove actions; ensure each filter has a descriptive label.
|
|
136
|
+
*
|
|
137
|
+
* @alternative
|
|
138
|
+
* - If you need general-purpose tabs, use `Tabs`. If you need a search input, use `TextField`.
|
|
150
139
|
*
|
|
151
|
-
* @component
|
|
152
140
|
* @param {Object} props - The component props.
|
|
153
141
|
* @param {Array<{
|
|
154
142
|
* key: string,
|
|
@@ -177,7 +165,29 @@ var filterContainerStyles = tv({
|
|
|
177
165
|
* @param {boolean} [props.disableQueryField=false] - Whether the query text field is disabled.
|
|
178
166
|
* @param {string} [props.className] - Additional class names for the component.
|
|
179
167
|
* @returns {JSX.Element|null} The Filters component or null if no filters are available.
|
|
180
|
-
*/
|
|
168
|
+
*/ var styles = tv({
|
|
169
|
+
base: "Litho-Filters flex items-center overflow-x-auto",
|
|
170
|
+
variants: {
|
|
171
|
+
showTextField: {
|
|
172
|
+
true: "justify-between",
|
|
173
|
+
false: ""
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
var filterContainerStyles = tv({
|
|
178
|
+
base: "Litho-FiltersContainer flex flex-wrap gap-1.5 items-center",
|
|
179
|
+
variants: {
|
|
180
|
+
showTextField: {
|
|
181
|
+
true: "p-2",
|
|
182
|
+
false: ""
|
|
183
|
+
},
|
|
184
|
+
padded: {
|
|
185
|
+
true: "p-2",
|
|
186
|
+
false: ""
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
function Filters(props) {
|
|
181
191
|
var _filters_filter;
|
|
182
192
|
var _props_filters = props.filters, filters = _props_filters === void 0 ? [] : _props_filters, _props_appliedFilters = props.appliedFilters, appliedFilters = _props_appliedFilters === void 0 ? [] : _props_appliedFilters, onClearAll = props.onClearAll, _props_showTextField = props.showTextField, showTextField = _props_showTextField === void 0 ? false : _props_showTextField, _props_textFieldSubdued = props.textFieldSubdued, textFieldSubdued = _props_textFieldSubdued === void 0 ? false : _props_textFieldSubdued, _props_padded = props.padded, padded = _props_padded === void 0 ? false : _props_padded, queryValue = props.queryValue, onQueryChange = props.onQueryChange, onQueryBlur = props.onQueryBlur, onQueryFocus = props.onQueryFocus, onQueryClear = props.onQueryClear, _props_queryPlaceholder = props.queryPlaceholder, queryPlaceholder = _props_queryPlaceholder === void 0 ? "Search" : _props_queryPlaceholder, _props_ignorePromotedFiltersWhenRemoving = props.ignorePromotedFiltersWhenRemoving, ignorePromotedFiltersWhenRemoving = _props_ignorePromotedFiltersWhenRemoving === void 0 ? true : _props_ignorePromotedFiltersWhenRemoving, disableQueryField = props.disableQueryField, className = props.className;
|
|
183
193
|
var classes = styles({
|
|
@@ -442,9 +452,11 @@ var pillTextStyles = tv({
|
|
|
442
452
|
}
|
|
443
453
|
});
|
|
444
454
|
/**
|
|
445
|
-
* Filters.Pill
|
|
455
|
+
* @component Filters.Pill
|
|
456
|
+
*
|
|
457
|
+
* @usage
|
|
458
|
+
* - DO: Display active filter values as removable chips.
|
|
446
459
|
*
|
|
447
|
-
* @component
|
|
448
460
|
* @param {Object} props - The component props.
|
|
449
461
|
* @param {string} props.label - The label of the filter pill.
|
|
450
462
|
* @param {boolean} [props.applied=false] - Whether the pill represents an applied filter.
|
|
@@ -463,9 +475,19 @@ var pillTextStyles = tv({
|
|
|
463
475
|
var textClasses = pillTextStyles({
|
|
464
476
|
applied: applied
|
|
465
477
|
});
|
|
466
|
-
var content = /*#__PURE__*/ _jsx("div", {
|
|
478
|
+
var content = /*#__PURE__*/ _jsx("div", _object_spread_props(_object_spread({
|
|
467
479
|
className: classes,
|
|
468
|
-
onClick: onClick
|
|
480
|
+
onClick: onClick
|
|
481
|
+
}, onClick && {
|
|
482
|
+
role: "button",
|
|
483
|
+
tabIndex: disabled ? -1 : 0,
|
|
484
|
+
onKeyDown: function(e) {
|
|
485
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
486
|
+
e.preventDefault();
|
|
487
|
+
onClick();
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
}), {
|
|
469
491
|
children: destructive ? /*#__PURE__*/ _jsx(Icon, {
|
|
470
492
|
source: DeleteMinor,
|
|
471
493
|
color: "subdued"
|
|
@@ -485,7 +507,7 @@ var pillTextStyles = tv({
|
|
|
485
507
|
})
|
|
486
508
|
]
|
|
487
509
|
})
|
|
488
|
-
});
|
|
510
|
+
}));
|
|
489
511
|
if (destructive) {
|
|
490
512
|
return /*#__PURE__*/ _jsx(Tooltip, {
|
|
491
513
|
content: "Remove filters",
|
|
@@ -518,9 +540,11 @@ var rightGradientStyles = tv({
|
|
|
518
540
|
}
|
|
519
541
|
});
|
|
520
542
|
/**
|
|
521
|
-
* Filters.Tabs
|
|
543
|
+
* @component Filters.Tabs
|
|
544
|
+
*
|
|
545
|
+
* @usage
|
|
546
|
+
* - DO: Group filter pills with tab-based categories.
|
|
522
547
|
*
|
|
523
|
-
* @component
|
|
524
548
|
* @param {Object} props - The component props.
|
|
525
549
|
* @param {Array} props.tabs - The tabs to display.
|
|
526
550
|
* @param {Object} [props.insertBeforeTabs] - Tab to insert before the main tabs.
|
|
@@ -719,9 +743,11 @@ var tabActionIconStyles = tv({
|
|
|
719
743
|
base: "opacity-80"
|
|
720
744
|
});
|
|
721
745
|
/**
|
|
722
|
-
* Filters.Tab
|
|
746
|
+
* @component Filters.Tab
|
|
747
|
+
*
|
|
748
|
+
* @usage
|
|
749
|
+
* - DO: Use as an individual tab within Filters.Tabs.
|
|
723
750
|
*
|
|
724
|
-
* @component
|
|
725
751
|
* @param {Object} props - The component props.
|
|
726
752
|
* @param {React.ReactNode} [props.icon=HorizontalDotsMinor] - The icon displayed in the tab (default is a horizontal dots icon).
|
|
727
753
|
* @param {boolean} [props.selected=false] - Whether the tab is currently selected.
|
|
@@ -749,6 +775,15 @@ var tabActionIconStyles = tv({
|
|
|
749
775
|
return /*#__PURE__*/ _jsx("div", {
|
|
750
776
|
className: classes,
|
|
751
777
|
onClick: onClick,
|
|
778
|
+
role: "tab",
|
|
779
|
+
tabIndex: 0,
|
|
780
|
+
"aria-selected": selected,
|
|
781
|
+
onKeyDown: function(e) {
|
|
782
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
783
|
+
e.preventDefault();
|
|
784
|
+
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
785
|
+
}
|
|
786
|
+
},
|
|
752
787
|
children: /*#__PURE__*/ _jsxs("div", {
|
|
753
788
|
className: "flex flex-col items-start justify-start",
|
|
754
789
|
children: [
|
|
@@ -763,7 +798,20 @@ var tabActionIconStyles = tv({
|
|
|
763
798
|
}),
|
|
764
799
|
onAction && /*#__PURE__*/ _jsxs("div", {
|
|
765
800
|
className: actionClasses,
|
|
766
|
-
onClick:
|
|
801
|
+
onClick: function(e) {
|
|
802
|
+
e.stopPropagation();
|
|
803
|
+
onAction(e);
|
|
804
|
+
},
|
|
805
|
+
role: "button",
|
|
806
|
+
tabIndex: 0,
|
|
807
|
+
"aria-label": tooltip,
|
|
808
|
+
onKeyDown: function(e) {
|
|
809
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
810
|
+
e.preventDefault();
|
|
811
|
+
e.stopPropagation();
|
|
812
|
+
onAction(e);
|
|
813
|
+
}
|
|
814
|
+
},
|
|
767
815
|
children: [
|
|
768
816
|
!interactive && /*#__PURE__*/ _jsx("div", {
|
|
769
817
|
className: "min-h-full min-w-2 bg-linear-to-l from-surface-highest to-transparent"
|
|
@@ -2,11 +2,21 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import Icon from "./Icon.js";
|
|
3
3
|
import { CircleInformationMajor } from "@shopify/polaris-icons";
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* @component FooterHelp
|
|
6
|
+
*
|
|
7
|
+
* @description A bottom-of-page help component that displays a link to additional resources or documentation.
|
|
8
|
+
*
|
|
9
|
+
* @usage
|
|
10
|
+
* - DO: Place at the bottom of a page to provide contextual help links.
|
|
11
|
+
* - DON'T: Use in card footers or inline (use `Link` instead).
|
|
12
|
+
*
|
|
13
|
+
* @accessibility
|
|
14
|
+
* - Renders help text with a link; ensure the link text is descriptive for screen readers.
|
|
15
|
+
*
|
|
16
|
+
* @alternative
|
|
17
|
+
* - If you need an inline help link, use `Link` instead.
|
|
18
|
+
* - If you need contextual tips, use `Tip`.
|
|
8
19
|
*
|
|
9
|
-
* @component
|
|
10
20
|
* @param {Object} [props] - The props for the FooterHelp component.
|
|
11
21
|
* @param {React.ReactNode} [props.children] - The content to display next to the information icon.
|
|
12
22
|
* This is typically a text string or any valid React node.
|
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* @component Form
|
|
3
|
+
*
|
|
4
|
+
* @description A form wrapper that handles submit events and integrates with the contextual save bar for unsaved changes.
|
|
5
|
+
*
|
|
6
|
+
* @usage
|
|
7
|
+
* - DO: Wrap form fields to handle submission with Enter key and prevent default behavior.
|
|
8
|
+
* - DON'T: Use for non-form content.
|
|
9
|
+
*
|
|
10
|
+
* @accessibility
|
|
11
|
+
* - Renders a semantic `<form>` element; screen readers identify it as a form region.
|
|
12
|
+
*
|
|
13
|
+
* @alternative
|
|
14
|
+
* - If you need to manage form save state globally, use `ContextualSaveBar` alongside Form.
|
|
3
15
|
*
|
|
4
|
-
* @component
|
|
5
16
|
* @param {Object} [props={}] - The properties passed to the component.
|
|
6
17
|
* @param {string} [props.acceptCharset] - The character encoding that the form accepts.
|
|
7
18
|
* @param {string} [props.action] - The URL where the form data should be submitted.
|
|
@@ -56,7 +56,39 @@ import FrameSaveBar from "./FrameSaveBar.js";
|
|
|
56
56
|
import TopBar from "./TopBar.js";
|
|
57
57
|
import Popover from "./Popover.js";
|
|
58
58
|
import ActionList from "./ActionList.js";
|
|
59
|
-
|
|
59
|
+
/**
|
|
60
|
+
* @component Frame
|
|
61
|
+
*
|
|
62
|
+
* @description The root application layout shell that provides navigation sidebar, top bar, mobile nav, and contextual save bar slots.
|
|
63
|
+
*
|
|
64
|
+
* @usage
|
|
65
|
+
* - DO: Use as the root layout wrapper providing navigation sidebar, top bar, and main content area.
|
|
66
|
+
* - DON'T: Nest Frame inside another Frame.
|
|
67
|
+
*
|
|
68
|
+
* @accessibility
|
|
69
|
+
* - Frame establishes landmark regions (nav, main, header) for screen reader navigation.
|
|
70
|
+
*
|
|
71
|
+
* @alternative
|
|
72
|
+
* - If you need a simple page container without app shell chrome, use `Page` or `Layout`.
|
|
73
|
+
*
|
|
74
|
+
* @param {Object} props - Props for the Frame component.
|
|
75
|
+
* @param {React.ReactNode} props.navigation - Component to render as the navigation menu.
|
|
76
|
+
* @param {React.ReactNode} props.announcement - Component to render an announcement bar.
|
|
77
|
+
* @param {Object} props.logo - Logo configuration.
|
|
78
|
+
* @param {string} props.logo.url - URL for the logo link.
|
|
79
|
+
* @param {string} props.logo.source - Source for the logo image.
|
|
80
|
+
* @param {string} props.logo.accessibilityLabel - Accessibility label for the logo image.
|
|
81
|
+
* @param {number} props.logo.width - Width of the logo image.
|
|
82
|
+
* @param {boolean} props.showSearchTrigger - Whether to show the search trigger.
|
|
83
|
+
* @param {React.ReactNode} props.searchModal - Modal to render as the search modal.
|
|
84
|
+
* @param {function} props.onToggleSearch - Function to toggle the search modal.
|
|
85
|
+
* @param {boolean} [props.enableSearchShortcut=true] - Whether to register the Cmd+K keyboard shortcut for search.
|
|
86
|
+
* @param {string} [props.className] - Additional CSS classes for the Frame.
|
|
87
|
+
* @param {React.ReactNode} props.children - Content to render within the Frame.
|
|
88
|
+
* @param {boolean} [props.alwaysShowUserMenuInTopBar] - Whether to always show the user menu in the top bar.
|
|
89
|
+
* @param {React.ReactNode} [props.headerAccessory] - Accessory to render in the header.
|
|
90
|
+
* @returns {React.ReactElement} The rendered Frame component.
|
|
91
|
+
*/ var frameStyles = tv({
|
|
60
92
|
base: "Litho-Frame bg-surface-normal",
|
|
61
93
|
variants: {
|
|
62
94
|
paneIsOpen: {
|
|
@@ -147,26 +179,7 @@ var logoStyles = tv({
|
|
|
147
179
|
alwaysShowLogo: false
|
|
148
180
|
}
|
|
149
181
|
});
|
|
150
|
-
|
|
151
|
-
* Frame component that provides a layout structure with top bar, navigation, logo, and content.
|
|
152
|
-
* @param {Object} props - Props for the Frame component.
|
|
153
|
-
* @param {React.ReactNode} props.navigation - Component to render as the navigation menu.
|
|
154
|
-
* @param {React.ReactNode} props.announcement - Component to render an announcement bar.
|
|
155
|
-
* @param {Object} props.logo - Logo configuration.
|
|
156
|
-
* @param {string} props.logo.url - URL for the logo link.
|
|
157
|
-
* @param {string} props.logo.source - Source for the logo image.
|
|
158
|
-
* @param {string} props.logo.accessibilityLabel - Accessibility label for the logo image.
|
|
159
|
-
* @param {number} props.logo.width - Width of the logo image.
|
|
160
|
-
* @param {boolean} props.showSearchTrigger - Whether to show the search trigger.
|
|
161
|
-
* @param {React.ReactNode} props.searchModal - Modal to render as the search modal.
|
|
162
|
-
* @param {function} props.onToggleSearch - Function to toggle the search modal.
|
|
163
|
-
* @param {boolean} [props.enableSearchShortcut=true] - Whether to register the Cmd+K keyboard shortcut for search.
|
|
164
|
-
* @param {string} [props.className] - Additional CSS classes for the Frame.
|
|
165
|
-
* @param {React.ReactNode} props.children - Content to render within the Frame.
|
|
166
|
-
* @param {boolean} [props.alwaysShowUserMenuInTopBar] - Whether to always show the user menu in the top bar.
|
|
167
|
-
* @param {React.ReactNode} [props.headerAccessory] - Accessory to render in the header.
|
|
168
|
-
* @returns {React.ReactElement} The rendered Frame component.
|
|
169
|
-
*/ var Frame = function(param) {
|
|
182
|
+
var Frame = function(param) {
|
|
170
183
|
var navigation = param.navigation, announcement = param.announcement, logo = param.logo, children = param.children, className = param.className, userMenu = param.userMenu, moreActions = param.moreActions, _param_showSearchTrigger = param.showSearchTrigger, showSearchTrigger = _param_showSearchTrigger === void 0 ? true : _param_showSearchTrigger, _param_alwaysShowUserMenuInTopBar = param.alwaysShowUserMenuInTopBar, alwaysShowUserMenuInTopBar = _param_alwaysShowUserMenuInTopBar === void 0 ? false : _param_alwaysShowUserMenuInTopBar, _param_searchLabel = param.searchLabel, searchLabel = _param_searchLabel === void 0 ? "Search" : _param_searchLabel, _param_searchIcon = param.searchIcon, searchIcon = _param_searchIcon === void 0 ? /*#__PURE__*/ _jsx(Icon, {
|
|
171
184
|
source: SearchMajor,
|
|
172
185
|
color: "subdued"
|
|
@@ -200,6 +213,10 @@ var logoStyles = tv({
|
|
|
200
213
|
document.documentElement.style.setProperty("--litho-top-bar-height", "56px");
|
|
201
214
|
document.documentElement.style.setProperty("--litho-table-header-sticky-at", "56px");
|
|
202
215
|
}
|
|
216
|
+
} else {
|
|
217
|
+
document.documentElement.style.setProperty("--litho-header-offset", "0px");
|
|
218
|
+
document.documentElement.style.setProperty("--litho-top-bar-height", "56px");
|
|
219
|
+
document.documentElement.style.setProperty("--litho-table-header-sticky-at", "56px");
|
|
203
220
|
}
|
|
204
221
|
}, [
|
|
205
222
|
announcement
|
|
@@ -237,6 +254,15 @@ var logoStyles = tv({
|
|
|
237
254
|
onClick: function() {
|
|
238
255
|
return onToggleSearch();
|
|
239
256
|
},
|
|
257
|
+
role: "button",
|
|
258
|
+
tabIndex: 0,
|
|
259
|
+
"aria-label": searchLabel,
|
|
260
|
+
onKeyDown: function(e) {
|
|
261
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
262
|
+
e.preventDefault();
|
|
263
|
+
onToggleSearch();
|
|
264
|
+
}
|
|
265
|
+
},
|
|
240
266
|
children: [
|
|
241
267
|
searchIcon,
|
|
242
268
|
/*#__PURE__*/ _jsxs("div", {
|
|
@@ -259,7 +285,7 @@ var logoStyles = tv({
|
|
|
259
285
|
paneIsOpen: paneIsOpen
|
|
260
286
|
}), " ").concat(className),
|
|
261
287
|
children: /*#__PURE__*/ _jsxs("div", {
|
|
262
|
-
className: embedded ? "" : "@container",
|
|
288
|
+
className: embedded ? "" : "@container/main",
|
|
263
289
|
children: [
|
|
264
290
|
!contentIsFullPage && /*#__PURE__*/ _jsx("div", {
|
|
265
291
|
className: logoStyles({
|
|
@@ -370,6 +396,15 @@ var logoStyles = tv({
|
|
|
370
396
|
},
|
|
371
397
|
children: /*#__PURE__*/ _jsx("div", {
|
|
372
398
|
className: "fixed cursor-pointer top-2.5 @md:hidden p-2 rounded-full bg-tint-10 hover:bg-tint-12 dark:bg-tint-alt-10 dark:hover:bg-tint-alt-12 left-56.5",
|
|
399
|
+
role: "button",
|
|
400
|
+
tabIndex: 0,
|
|
401
|
+
"aria-label": "Close navigation",
|
|
402
|
+
onKeyDown: function(e) {
|
|
403
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
404
|
+
e.preventDefault();
|
|
405
|
+
setShowMobileNavigation(false);
|
|
406
|
+
}
|
|
407
|
+
},
|
|
373
408
|
children: /*#__PURE__*/ _jsx(Icon, {
|
|
374
409
|
source: CancelMajor,
|
|
375
410
|
color: "alternate"
|
|
@@ -55,7 +55,24 @@ import Icon from "./Icon.js";
|
|
|
55
55
|
import Tooltip from "./Tooltip.js";
|
|
56
56
|
import { ChevronUpMinor, ChevronDownMinor } from "@shopify/polaris-icons";
|
|
57
57
|
import { useFrame } from "./Frame.js";
|
|
58
|
-
|
|
58
|
+
/**
|
|
59
|
+
* @component FrameSaveBar
|
|
60
|
+
*
|
|
61
|
+
* @description A save bar component embedded within the Frame layout that displays save and discard actions for unsaved form changes.
|
|
62
|
+
*
|
|
63
|
+
* @usage
|
|
64
|
+
* - DO: Use within a Frame layout to show a contextual save bar that integrates with the app shell.
|
|
65
|
+
* - DON'T: Use without a Frame parent.
|
|
66
|
+
*
|
|
67
|
+
* @accessibility
|
|
68
|
+
* - Keyboard accessible save and discard actions; message text describes the unsaved context.
|
|
69
|
+
*
|
|
70
|
+
* @alternative
|
|
71
|
+
* - If you need a standalone save bar outside Frame, use `ContextualSaveBar`.
|
|
72
|
+
*
|
|
73
|
+
* @param {Object} props.logo - Logo configuration.
|
|
74
|
+
* @returns {JSX.Element} The rendered FrameSaveBar component
|
|
75
|
+
*/ var styles = tv({
|
|
59
76
|
base: "Litho-FrameSaveBar fixed top-[var(--litho-header-offset)] right-0 left-0 h-[var(--litho-header-height)] px-4 @md:px-5 flex items-center gap-2 bg-surface-alternate dark:bg-brand transition-opacity transition-transform duration-300 transform",
|
|
60
77
|
variants: {
|
|
61
78
|
visible: {
|
|
@@ -94,11 +111,7 @@ var toggleStyles = tv({
|
|
|
94
111
|
paneIsOpen: false
|
|
95
112
|
}
|
|
96
113
|
});
|
|
97
|
-
|
|
98
|
-
* FrameSaveBar component sisplays a save bar at the top of the screen with contextual save and discard actions.
|
|
99
|
-
* @param {Object} props.logo - Logo configuration.
|
|
100
|
-
* @returns {JSX.Element} The rendered FrameSaveBar component
|
|
101
|
-
*/ function FrameSaveBar(param) {
|
|
114
|
+
function FrameSaveBar(param) {
|
|
102
115
|
var logo = param.logo;
|
|
103
116
|
var darkMode = useDarkMode().darkMode;
|
|
104
117
|
var paneIsOpen = useFrame().paneIsOpen;
|
|
@@ -145,6 +158,15 @@ var toggleStyles = tv({
|
|
|
145
158
|
onClick: function() {
|
|
146
159
|
return setTucked(false);
|
|
147
160
|
},
|
|
161
|
+
role: "button",
|
|
162
|
+
tabIndex: 0,
|
|
163
|
+
"aria-label": "Show save bar",
|
|
164
|
+
onKeyDown: function(e) {
|
|
165
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
166
|
+
e.preventDefault();
|
|
167
|
+
setTucked(false);
|
|
168
|
+
}
|
|
169
|
+
},
|
|
148
170
|
children: /*#__PURE__*/ _jsx(Icon, {
|
|
149
171
|
source: ChevronDownMinor,
|
|
150
172
|
color: "FrameSaveBar"
|
|
@@ -192,6 +214,15 @@ var toggleStyles = tv({
|
|
|
192
214
|
onClick: function() {
|
|
193
215
|
return setTucked(true);
|
|
194
216
|
},
|
|
217
|
+
role: "button",
|
|
218
|
+
tabIndex: 0,
|
|
219
|
+
"aria-label": "Hide save bar",
|
|
220
|
+
onKeyDown: function(e) {
|
|
221
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
222
|
+
e.preventDefault();
|
|
223
|
+
setTucked(true);
|
|
224
|
+
}
|
|
225
|
+
},
|
|
195
226
|
children: /*#__PURE__*/ _jsx(Icon, {
|
|
196
227
|
source: ChevronUpMinor,
|
|
197
228
|
color: "FrameSaveBar"
|