@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
|
@@ -32,6 +32,19 @@ function _array_with_holes(arr) {
|
|
|
32
32
|
function _array_without_holes(arr) {
|
|
33
33
|
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
34
34
|
}
|
|
35
|
+
function _define_property(obj, key, value) {
|
|
36
|
+
if (key in obj) {
|
|
37
|
+
Object.defineProperty(obj, key, {
|
|
38
|
+
value: value,
|
|
39
|
+
enumerable: true,
|
|
40
|
+
configurable: true,
|
|
41
|
+
writable: true
|
|
42
|
+
});
|
|
43
|
+
} else {
|
|
44
|
+
obj[key] = value;
|
|
45
|
+
}
|
|
46
|
+
return obj;
|
|
47
|
+
}
|
|
35
48
|
function _interop_require_default(obj) {
|
|
36
49
|
return obj && obj.__esModule ? obj : {
|
|
37
50
|
default: obj
|
|
@@ -70,6 +83,45 @@ function _non_iterable_rest() {
|
|
|
70
83
|
function _non_iterable_spread() {
|
|
71
84
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
72
85
|
}
|
|
86
|
+
function _object_spread(target) {
|
|
87
|
+
for(var i = 1; i < arguments.length; i++){
|
|
88
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
89
|
+
var ownKeys = Object.keys(source);
|
|
90
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
91
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
92
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
93
|
+
}));
|
|
94
|
+
}
|
|
95
|
+
ownKeys.forEach(function(key) {
|
|
96
|
+
_define_property(target, key, source[key]);
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
return target;
|
|
100
|
+
}
|
|
101
|
+
function ownKeys(object, enumerableOnly) {
|
|
102
|
+
var keys = Object.keys(object);
|
|
103
|
+
if (Object.getOwnPropertySymbols) {
|
|
104
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
105
|
+
if (enumerableOnly) {
|
|
106
|
+
symbols = symbols.filter(function(sym) {
|
|
107
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
keys.push.apply(keys, symbols);
|
|
111
|
+
}
|
|
112
|
+
return keys;
|
|
113
|
+
}
|
|
114
|
+
function _object_spread_props(target, source) {
|
|
115
|
+
source = source != null ? source : {};
|
|
116
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
117
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
118
|
+
} else {
|
|
119
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
120
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
return target;
|
|
124
|
+
}
|
|
73
125
|
function _sliced_to_array(arr, i) {
|
|
74
126
|
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
75
127
|
}
|
|
@@ -84,7 +136,51 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
84
136
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
85
137
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
86
138
|
}
|
|
87
|
-
|
|
139
|
+
/**
|
|
140
|
+
* @component DropZone
|
|
141
|
+
*
|
|
142
|
+
* @description A file upload area that accepts drag-and-drop or click-to-browse file selection with type and size validation.
|
|
143
|
+
*
|
|
144
|
+
* @usage
|
|
145
|
+
* - DO: Use for file upload areas that accept drag-and-drop or click-to-browse.
|
|
146
|
+
* - DON'T: Use for non-file inputs.
|
|
147
|
+
*
|
|
148
|
+
* @accessibility
|
|
149
|
+
* - Supports keyboard activation; ensure a descriptive label is provided for the upload area.
|
|
150
|
+
*
|
|
151
|
+
* @alternative
|
|
152
|
+
* - If you need a simple file input, use a native `<input type="file">` with TextField styling.
|
|
153
|
+
*
|
|
154
|
+
* @param {Object} props - Component props.
|
|
155
|
+
* @param {string} [props.id] - The ID for the DropZone input.
|
|
156
|
+
* @param {string} [props.label] - Label for the DropZone.
|
|
157
|
+
* @param {boolean} [props.labelHidden] - Whether the label is hidden.
|
|
158
|
+
* @param {Object} [props.labelAction] - Action for the label, including `onAction` and `content`.
|
|
159
|
+
* @param {string} [props.tooltip] - Tooltip for the label.
|
|
160
|
+
* @param {string} [props.labelVariant] - Variant for the label styling.
|
|
161
|
+
* @param {string} [props.type="file"] - The type of files accepted (e.g., "file", "image").
|
|
162
|
+
* @param {string|string[]} [props.accept] - Accepted file types.
|
|
163
|
+
* @param {boolean} [props.allowMultiple=false] - Whether multiple files can be uploaded.
|
|
164
|
+
* @param {boolean} [props.showDropZoneWhenDisabled=true] - Whether the DropZone is shown when disabled.
|
|
165
|
+
* @param {boolean} [props.disabled] - Whether the DropZone is disabled.
|
|
166
|
+
* @param {Function} [props.onDrop] - Callback for when files are dropped.
|
|
167
|
+
* @param {Function} [props.onDropAccepted] - Callback for accepted files.
|
|
168
|
+
* @param {Function} [props.onDropRejected] - Callback for rejected files.
|
|
169
|
+
* @param {string} [props.helpText] - Help text displayed below the DropZone.
|
|
170
|
+
* @param {string} [props.error] - Error message to display.
|
|
171
|
+
* @param {boolean} [props.uploading=false] - Whether a file upload is in progress.
|
|
172
|
+
* @param {Array} [props.uploadedFiles=[]] - Array of uploaded files.
|
|
173
|
+
* @param {string} [props.uploadLabel="Drag and drop files or click to upload"] - Label for upload prompt.
|
|
174
|
+
* @param {string} [props.uploadingLabel="Uploading..."] - Label shown during file uploads.
|
|
175
|
+
* @param {string} [props.dragLabel="Release to upload"] - Label for the drag area.
|
|
176
|
+
* @param {boolean} [props.showFilePreview=true] - Whether file previews are displayed.
|
|
177
|
+
* @param {boolean} [props.previewLoading] - Whether file previews are loading.
|
|
178
|
+
* @param {number} [props.previewRows=2] - Number of preview rows to display.
|
|
179
|
+
* @param {Function} [props.onRemove] - Callback for removing a file.
|
|
180
|
+
* @param {Function} [props.onFilePreviewClick] - Callback for clicking a file preview.
|
|
181
|
+
* @param {string} [props.filename] - Name of the file being uploaded.
|
|
182
|
+
* @returns {JSX.Element} DropZone component.
|
|
183
|
+
*/ var normalizeDropZoneAccept = function(accept) {
|
|
88
184
|
if (!accept) return [];
|
|
89
185
|
return typeof accept === "string" ? [
|
|
90
186
|
accept
|
|
@@ -146,39 +242,7 @@ var dropZoneStyles = (0, _tailwindvariants.tv)({
|
|
|
146
242
|
dragOver: false
|
|
147
243
|
}
|
|
148
244
|
});
|
|
149
|
-
|
|
150
|
-
* DropZone component for handling file uploads with previews.
|
|
151
|
-
*
|
|
152
|
-
* @param {Object} props - Component props.
|
|
153
|
-
* @param {string} [props.id] - The ID for the DropZone input.
|
|
154
|
-
* @param {string} [props.label] - Label for the DropZone.
|
|
155
|
-
* @param {boolean} [props.labelHidden] - Whether the label is hidden.
|
|
156
|
-
* @param {Object} [props.labelAction] - Action for the label, including `onAction` and `content`.
|
|
157
|
-
* @param {string} [props.tooltip] - Tooltip for the label.
|
|
158
|
-
* @param {string} [props.labelVariant] - Variant for the label styling.
|
|
159
|
-
* @param {string} [props.type="file"] - The type of files accepted (e.g., "file", "image").
|
|
160
|
-
* @param {string|string[]} [props.accept] - Accepted file types.
|
|
161
|
-
* @param {boolean} [props.allowMultiple=false] - Whether multiple files can be uploaded.
|
|
162
|
-
* @param {boolean} [props.showDropZoneWhenDisabled=true] - Whether the DropZone is shown when disabled.
|
|
163
|
-
* @param {boolean} [props.disabled] - Whether the DropZone is disabled.
|
|
164
|
-
* @param {Function} [props.onDrop] - Callback for when files are dropped.
|
|
165
|
-
* @param {Function} [props.onDropAccepted] - Callback for accepted files.
|
|
166
|
-
* @param {Function} [props.onDropRejected] - Callback for rejected files.
|
|
167
|
-
* @param {string} [props.helpText] - Help text displayed below the DropZone.
|
|
168
|
-
* @param {string} [props.error] - Error message to display.
|
|
169
|
-
* @param {boolean} [props.uploading=false] - Whether a file upload is in progress.
|
|
170
|
-
* @param {Array} [props.uploadedFiles=[]] - Array of uploaded files.
|
|
171
|
-
* @param {string} [props.uploadLabel="Drag and drop files or click to upload"] - Label for upload prompt.
|
|
172
|
-
* @param {string} [props.uploadingLabel="Uploading..."] - Label shown during file uploads.
|
|
173
|
-
* @param {string} [props.dragLabel="Release to upload"] - Label for the drag area.
|
|
174
|
-
* @param {boolean} [props.showFilePreview=true] - Whether file previews are displayed.
|
|
175
|
-
* @param {boolean} [props.previewLoading] - Whether file previews are loading.
|
|
176
|
-
* @param {number} [props.previewRows=2] - Number of preview rows to display.
|
|
177
|
-
* @param {Function} [props.onRemove] - Callback for removing a file.
|
|
178
|
-
* @param {Function} [props.onFilePreviewClick] - Callback for clicking a file preview.
|
|
179
|
-
* @param {string} [props.filename] - Name of the file being uploaded.
|
|
180
|
-
* @returns {JSX.Element} DropZone component.
|
|
181
|
-
*/ function DropZone() {
|
|
245
|
+
function DropZone() {
|
|
182
246
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
183
247
|
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;
|
|
184
248
|
var accept = normalizeDropZoneAccept(_accept);
|
|
@@ -506,11 +570,21 @@ var previewStyles = (0, _tailwindvariants.tv)({
|
|
|
506
570
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
507
571
|
className: "flex justify-between items-center gap-2",
|
|
508
572
|
children: [
|
|
509
|
-
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
573
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", _object_spread_props(_object_spread({
|
|
510
574
|
className: previewClasses,
|
|
511
575
|
onClick: onClick ? function() {
|
|
512
576
|
return onClick(file);
|
|
513
|
-
} : undefined
|
|
577
|
+
} : undefined
|
|
578
|
+
}, onClick ? {
|
|
579
|
+
role: "button",
|
|
580
|
+
tabIndex: 0,
|
|
581
|
+
onKeyDown: function(e) {
|
|
582
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
583
|
+
e.preventDefault();
|
|
584
|
+
onClick(file);
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
} : {}), {
|
|
514
588
|
children: [
|
|
515
589
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(FileThumbnail, {
|
|
516
590
|
file: file
|
|
@@ -532,7 +606,7 @@ var previewStyles = (0, _tailwindvariants.tv)({
|
|
|
532
606
|
]
|
|
533
607
|
})
|
|
534
608
|
]
|
|
535
|
-
}),
|
|
609
|
+
})),
|
|
536
610
|
onRemove && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Button.default, {
|
|
537
611
|
size: "small",
|
|
538
612
|
icon: _polarisicons.CancelMajor,
|
|
@@ -19,12 +19,21 @@ function _interop_require_default(obj) {
|
|
|
19
19
|
default: obj
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
var styles = (0, _tailwindvariants.tv)({
|
|
23
|
-
base: "Litho-EmptyState py-16 px-4 flex flex-col items-center text-center gap-6"
|
|
24
|
-
});
|
|
25
22
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
23
|
+
* @component EmptyState
|
|
24
|
+
*
|
|
25
|
+
* @description A placeholder component displayed when a resource list, table, or page has no content, with a heading, description, and call-to-action.
|
|
26
|
+
*
|
|
27
|
+
* @usage
|
|
28
|
+
* - DO: Display when a resource list, table, or page has no data to show.
|
|
29
|
+
* - DON'T: Use for error states (use `Banner` instead).
|
|
30
|
+
*
|
|
31
|
+
* @accessibility
|
|
32
|
+
* - Ensure the heading and action buttons are descriptive; decorative images should have empty alt text.
|
|
33
|
+
*
|
|
34
|
+
* @alternative
|
|
35
|
+
* - If you need to show an error or warning message, use `Banner` instead.
|
|
36
|
+
* - If you need a loading state, use `SkeletonText`.
|
|
28
37
|
*
|
|
29
38
|
* @param {Object} props - The properties to customize the EmptyState component.
|
|
30
39
|
* @param {string} [props.description] - Text description to display in the empty state.
|
|
@@ -48,7 +57,10 @@ var styles = (0, _tailwindvariants.tv)({
|
|
|
48
57
|
* @param {number} [props.progress] - Progress value to display in the empty state.
|
|
49
58
|
*
|
|
50
59
|
* @returns {JSX.Element} The rendered EmptyState component.
|
|
51
|
-
*/
|
|
60
|
+
*/ var styles = (0, _tailwindvariants.tv)({
|
|
61
|
+
base: "Litho-EmptyState py-16 px-4 flex flex-col items-center text-center gap-6"
|
|
62
|
+
});
|
|
63
|
+
function EmptyState() {
|
|
52
64
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
53
65
|
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;
|
|
54
66
|
var classes = styles();
|
|
@@ -178,33 +178,21 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
178
178
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
179
179
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
180
180
|
}
|
|
181
|
-
var styles = (0, _tailwindvariants.tv)({
|
|
182
|
-
base: "Litho-Filters flex items-center overflow-x-auto",
|
|
183
|
-
variants: {
|
|
184
|
-
showTextField: {
|
|
185
|
-
true: "justify-between",
|
|
186
|
-
false: ""
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
});
|
|
190
|
-
var filterContainerStyles = (0, _tailwindvariants.tv)({
|
|
191
|
-
base: "Litho-FiltersContainer flex flex-wrap gap-1.5 items-center",
|
|
192
|
-
variants: {
|
|
193
|
-
showTextField: {
|
|
194
|
-
true: "p-2",
|
|
195
|
-
false: ""
|
|
196
|
-
},
|
|
197
|
-
padded: {
|
|
198
|
-
true: "p-2",
|
|
199
|
-
false: ""
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
});
|
|
203
181
|
/**
|
|
204
|
-
*
|
|
205
|
-
*
|
|
182
|
+
* @component Filters
|
|
183
|
+
*
|
|
184
|
+
* @description A filter management component that renders active filter pills and controls for filtering table or resource list data.
|
|
185
|
+
*
|
|
186
|
+
* @usage
|
|
187
|
+
* - DO: Use for filtering content in tables or resource lists with removable filter pills.
|
|
188
|
+
* - DON'T: Use for general-purpose tabs (use Tabs).
|
|
189
|
+
*
|
|
190
|
+
* @accessibility
|
|
191
|
+
* - Filter pills are keyboard accessible with remove actions; ensure each filter has a descriptive label.
|
|
192
|
+
*
|
|
193
|
+
* @alternative
|
|
194
|
+
* - If you need general-purpose tabs, use `Tabs`. If you need a search input, use `TextField`.
|
|
206
195
|
*
|
|
207
|
-
* @component
|
|
208
196
|
* @param {Object} props - The component props.
|
|
209
197
|
* @param {Array<{
|
|
210
198
|
* key: string,
|
|
@@ -233,7 +221,29 @@ var filterContainerStyles = (0, _tailwindvariants.tv)({
|
|
|
233
221
|
* @param {boolean} [props.disableQueryField=false] - Whether the query text field is disabled.
|
|
234
222
|
* @param {string} [props.className] - Additional class names for the component.
|
|
235
223
|
* @returns {JSX.Element|null} The Filters component or null if no filters are available.
|
|
236
|
-
*/
|
|
224
|
+
*/ var styles = (0, _tailwindvariants.tv)({
|
|
225
|
+
base: "Litho-Filters flex items-center overflow-x-auto",
|
|
226
|
+
variants: {
|
|
227
|
+
showTextField: {
|
|
228
|
+
true: "justify-between",
|
|
229
|
+
false: ""
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
var filterContainerStyles = (0, _tailwindvariants.tv)({
|
|
234
|
+
base: "Litho-FiltersContainer flex flex-wrap gap-1.5 items-center",
|
|
235
|
+
variants: {
|
|
236
|
+
showTextField: {
|
|
237
|
+
true: "p-2",
|
|
238
|
+
false: ""
|
|
239
|
+
},
|
|
240
|
+
padded: {
|
|
241
|
+
true: "p-2",
|
|
242
|
+
false: ""
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
function Filters(props) {
|
|
237
247
|
var _filters_filter;
|
|
238
248
|
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;
|
|
239
249
|
var classes = styles({
|
|
@@ -498,9 +508,11 @@ var pillTextStyles = (0, _tailwindvariants.tv)({
|
|
|
498
508
|
}
|
|
499
509
|
});
|
|
500
510
|
/**
|
|
501
|
-
* Filters.Pill
|
|
511
|
+
* @component Filters.Pill
|
|
512
|
+
*
|
|
513
|
+
* @usage
|
|
514
|
+
* - DO: Display active filter values as removable chips.
|
|
502
515
|
*
|
|
503
|
-
* @component
|
|
504
516
|
* @param {Object} props - The component props.
|
|
505
517
|
* @param {string} props.label - The label of the filter pill.
|
|
506
518
|
* @param {boolean} [props.applied=false] - Whether the pill represents an applied filter.
|
|
@@ -519,9 +531,19 @@ var pillTextStyles = (0, _tailwindvariants.tv)({
|
|
|
519
531
|
var textClasses = pillTextStyles({
|
|
520
532
|
applied: applied
|
|
521
533
|
});
|
|
522
|
-
var content = /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
534
|
+
var content = /*#__PURE__*/ (0, _jsxruntime.jsx)("div", _object_spread_props(_object_spread({
|
|
523
535
|
className: classes,
|
|
524
|
-
onClick: onClick
|
|
536
|
+
onClick: onClick
|
|
537
|
+
}, onClick && {
|
|
538
|
+
role: "button",
|
|
539
|
+
tabIndex: disabled ? -1 : 0,
|
|
540
|
+
onKeyDown: function(e) {
|
|
541
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
542
|
+
e.preventDefault();
|
|
543
|
+
onClick();
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
}), {
|
|
525
547
|
children: destructive ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_Icon.default, {
|
|
526
548
|
source: _polarisicons.DeleteMinor,
|
|
527
549
|
color: "subdued"
|
|
@@ -541,7 +563,7 @@ var pillTextStyles = (0, _tailwindvariants.tv)({
|
|
|
541
563
|
})
|
|
542
564
|
]
|
|
543
565
|
})
|
|
544
|
-
});
|
|
566
|
+
}));
|
|
545
567
|
if (destructive) {
|
|
546
568
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_Tooltip.default, {
|
|
547
569
|
content: "Remove filters",
|
|
@@ -574,9 +596,11 @@ var rightGradientStyles = (0, _tailwindvariants.tv)({
|
|
|
574
596
|
}
|
|
575
597
|
});
|
|
576
598
|
/**
|
|
577
|
-
* Filters.Tabs
|
|
599
|
+
* @component Filters.Tabs
|
|
600
|
+
*
|
|
601
|
+
* @usage
|
|
602
|
+
* - DO: Group filter pills with tab-based categories.
|
|
578
603
|
*
|
|
579
|
-
* @component
|
|
580
604
|
* @param {Object} props - The component props.
|
|
581
605
|
* @param {Array} props.tabs - The tabs to display.
|
|
582
606
|
* @param {Object} [props.insertBeforeTabs] - Tab to insert before the main tabs.
|
|
@@ -775,9 +799,11 @@ var tabActionIconStyles = (0, _tailwindvariants.tv)({
|
|
|
775
799
|
base: "opacity-80"
|
|
776
800
|
});
|
|
777
801
|
/**
|
|
778
|
-
* Filters.Tab
|
|
802
|
+
* @component Filters.Tab
|
|
803
|
+
*
|
|
804
|
+
* @usage
|
|
805
|
+
* - DO: Use as an individual tab within Filters.Tabs.
|
|
779
806
|
*
|
|
780
|
-
* @component
|
|
781
807
|
* @param {Object} props - The component props.
|
|
782
808
|
* @param {React.ReactNode} [props.icon=HorizontalDotsMinor] - The icon displayed in the tab (default is a horizontal dots icon).
|
|
783
809
|
* @param {boolean} [props.selected=false] - Whether the tab is currently selected.
|
|
@@ -805,6 +831,15 @@ var tabActionIconStyles = (0, _tailwindvariants.tv)({
|
|
|
805
831
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
806
832
|
className: classes,
|
|
807
833
|
onClick: onClick,
|
|
834
|
+
role: "tab",
|
|
835
|
+
tabIndex: 0,
|
|
836
|
+
"aria-selected": selected,
|
|
837
|
+
onKeyDown: function(e) {
|
|
838
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
839
|
+
e.preventDefault();
|
|
840
|
+
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
841
|
+
}
|
|
842
|
+
},
|
|
808
843
|
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
809
844
|
className: "flex flex-col items-start justify-start",
|
|
810
845
|
children: [
|
|
@@ -819,7 +854,20 @@ var tabActionIconStyles = (0, _tailwindvariants.tv)({
|
|
|
819
854
|
}),
|
|
820
855
|
onAction && /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
821
856
|
className: actionClasses,
|
|
822
|
-
onClick:
|
|
857
|
+
onClick: function(e) {
|
|
858
|
+
e.stopPropagation();
|
|
859
|
+
onAction(e);
|
|
860
|
+
},
|
|
861
|
+
role: "button",
|
|
862
|
+
tabIndex: 0,
|
|
863
|
+
"aria-label": tooltip,
|
|
864
|
+
onKeyDown: function(e) {
|
|
865
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
866
|
+
e.preventDefault();
|
|
867
|
+
e.stopPropagation();
|
|
868
|
+
onAction(e);
|
|
869
|
+
}
|
|
870
|
+
},
|
|
823
871
|
children: [
|
|
824
872
|
!interactive && /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
825
873
|
className: "min-h-full min-w-2 bg-linear-to-l from-surface-highest to-transparent"
|
|
@@ -17,11 +17,21 @@ function _interop_require_default(obj) {
|
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
20
|
+
* @component FooterHelp
|
|
21
|
+
*
|
|
22
|
+
* @description A bottom-of-page help component that displays a link to additional resources or documentation.
|
|
23
|
+
*
|
|
24
|
+
* @usage
|
|
25
|
+
* - DO: Place at the bottom of a page to provide contextual help links.
|
|
26
|
+
* - DON'T: Use in card footers or inline (use `Link` instead).
|
|
27
|
+
*
|
|
28
|
+
* @accessibility
|
|
29
|
+
* - Renders help text with a link; ensure the link text is descriptive for screen readers.
|
|
30
|
+
*
|
|
31
|
+
* @alternative
|
|
32
|
+
* - If you need an inline help link, use `Link` instead.
|
|
33
|
+
* - If you need contextual tips, use `Tip`.
|
|
23
34
|
*
|
|
24
|
-
* @component
|
|
25
35
|
* @param {Object} [props] - The props for the FooterHelp component.
|
|
26
36
|
* @param {React.ReactNode} [props.children] - The content to display next to the information icon.
|
|
27
37
|
* 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.
|
|
@@ -79,7 +79,39 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
79
79
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
80
80
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
81
81
|
}
|
|
82
|
-
|
|
82
|
+
/**
|
|
83
|
+
* @component Frame
|
|
84
|
+
*
|
|
85
|
+
* @description The root application layout shell that provides navigation sidebar, top bar, mobile nav, and contextual save bar slots.
|
|
86
|
+
*
|
|
87
|
+
* @usage
|
|
88
|
+
* - DO: Use as the root layout wrapper providing navigation sidebar, top bar, and main content area.
|
|
89
|
+
* - DON'T: Nest Frame inside another Frame.
|
|
90
|
+
*
|
|
91
|
+
* @accessibility
|
|
92
|
+
* - Frame establishes landmark regions (nav, main, header) for screen reader navigation.
|
|
93
|
+
*
|
|
94
|
+
* @alternative
|
|
95
|
+
* - If you need a simple page container without app shell chrome, use `Page` or `Layout`.
|
|
96
|
+
*
|
|
97
|
+
* @param {Object} props - Props for the Frame component.
|
|
98
|
+
* @param {React.ReactNode} props.navigation - Component to render as the navigation menu.
|
|
99
|
+
* @param {React.ReactNode} props.announcement - Component to render an announcement bar.
|
|
100
|
+
* @param {Object} props.logo - Logo configuration.
|
|
101
|
+
* @param {string} props.logo.url - URL for the logo link.
|
|
102
|
+
* @param {string} props.logo.source - Source for the logo image.
|
|
103
|
+
* @param {string} props.logo.accessibilityLabel - Accessibility label for the logo image.
|
|
104
|
+
* @param {number} props.logo.width - Width of the logo image.
|
|
105
|
+
* @param {boolean} props.showSearchTrigger - Whether to show the search trigger.
|
|
106
|
+
* @param {React.ReactNode} props.searchModal - Modal to render as the search modal.
|
|
107
|
+
* @param {function} props.onToggleSearch - Function to toggle the search modal.
|
|
108
|
+
* @param {boolean} [props.enableSearchShortcut=true] - Whether to register the Cmd+K keyboard shortcut for search.
|
|
109
|
+
* @param {string} [props.className] - Additional CSS classes for the Frame.
|
|
110
|
+
* @param {React.ReactNode} props.children - Content to render within the Frame.
|
|
111
|
+
* @param {boolean} [props.alwaysShowUserMenuInTopBar] - Whether to always show the user menu in the top bar.
|
|
112
|
+
* @param {React.ReactNode} [props.headerAccessory] - Accessory to render in the header.
|
|
113
|
+
* @returns {React.ReactElement} The rendered Frame component.
|
|
114
|
+
*/ var frameStyles = (0, _tailwindvariants.tv)({
|
|
83
115
|
base: "Litho-Frame bg-surface-normal",
|
|
84
116
|
variants: {
|
|
85
117
|
paneIsOpen: {
|
|
@@ -170,26 +202,7 @@ var logoStyles = (0, _tailwindvariants.tv)({
|
|
|
170
202
|
alwaysShowLogo: false
|
|
171
203
|
}
|
|
172
204
|
});
|
|
173
|
-
|
|
174
|
-
* Frame component that provides a layout structure with top bar, navigation, logo, and content.
|
|
175
|
-
* @param {Object} props - Props for the Frame component.
|
|
176
|
-
* @param {React.ReactNode} props.navigation - Component to render as the navigation menu.
|
|
177
|
-
* @param {React.ReactNode} props.announcement - Component to render an announcement bar.
|
|
178
|
-
* @param {Object} props.logo - Logo configuration.
|
|
179
|
-
* @param {string} props.logo.url - URL for the logo link.
|
|
180
|
-
* @param {string} props.logo.source - Source for the logo image.
|
|
181
|
-
* @param {string} props.logo.accessibilityLabel - Accessibility label for the logo image.
|
|
182
|
-
* @param {number} props.logo.width - Width of the logo image.
|
|
183
|
-
* @param {boolean} props.showSearchTrigger - Whether to show the search trigger.
|
|
184
|
-
* @param {React.ReactNode} props.searchModal - Modal to render as the search modal.
|
|
185
|
-
* @param {function} props.onToggleSearch - Function to toggle the search modal.
|
|
186
|
-
* @param {boolean} [props.enableSearchShortcut=true] - Whether to register the Cmd+K keyboard shortcut for search.
|
|
187
|
-
* @param {string} [props.className] - Additional CSS classes for the Frame.
|
|
188
|
-
* @param {React.ReactNode} props.children - Content to render within the Frame.
|
|
189
|
-
* @param {boolean} [props.alwaysShowUserMenuInTopBar] - Whether to always show the user menu in the top bar.
|
|
190
|
-
* @param {React.ReactNode} [props.headerAccessory] - Accessory to render in the header.
|
|
191
|
-
* @returns {React.ReactElement} The rendered Frame component.
|
|
192
|
-
*/ var Frame = function(param) {
|
|
205
|
+
var Frame = function(param) {
|
|
193
206
|
var navigation = param.navigation, announcement = param.announcement, logo = param.logo, children = param.children, className = param.className, userMenu = param.userMenu, moreActions = param.moreActions, _param_showSearchTrigger = param.showSearchTrigger, showSearchTrigger = _param_showSearchTrigger === void 0 ? true : _param_showSearchTrigger, _param_alwaysShowUserMenuInTopBar = param.alwaysShowUserMenuInTopBar, alwaysShowUserMenuInTopBar = _param_alwaysShowUserMenuInTopBar === void 0 ? false : _param_alwaysShowUserMenuInTopBar, _param_searchLabel = param.searchLabel, searchLabel = _param_searchLabel === void 0 ? "Search" : _param_searchLabel, _param_searchIcon = param.searchIcon, searchIcon = _param_searchIcon === void 0 ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_Icon.default, {
|
|
194
207
|
source: _polarisicons.SearchMajor,
|
|
195
208
|
color: "subdued"
|
|
@@ -223,6 +236,10 @@ var logoStyles = (0, _tailwindvariants.tv)({
|
|
|
223
236
|
document.documentElement.style.setProperty("--litho-top-bar-height", "56px");
|
|
224
237
|
document.documentElement.style.setProperty("--litho-table-header-sticky-at", "56px");
|
|
225
238
|
}
|
|
239
|
+
} else {
|
|
240
|
+
document.documentElement.style.setProperty("--litho-header-offset", "0px");
|
|
241
|
+
document.documentElement.style.setProperty("--litho-top-bar-height", "56px");
|
|
242
|
+
document.documentElement.style.setProperty("--litho-table-header-sticky-at", "56px");
|
|
226
243
|
}
|
|
227
244
|
}, [
|
|
228
245
|
announcement
|
|
@@ -260,6 +277,15 @@ var logoStyles = (0, _tailwindvariants.tv)({
|
|
|
260
277
|
onClick: function() {
|
|
261
278
|
return onToggleSearch();
|
|
262
279
|
},
|
|
280
|
+
role: "button",
|
|
281
|
+
tabIndex: 0,
|
|
282
|
+
"aria-label": searchLabel,
|
|
283
|
+
onKeyDown: function(e) {
|
|
284
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
285
|
+
e.preventDefault();
|
|
286
|
+
onToggleSearch();
|
|
287
|
+
}
|
|
288
|
+
},
|
|
263
289
|
children: [
|
|
264
290
|
searchIcon,
|
|
265
291
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
@@ -282,7 +308,7 @@ var logoStyles = (0, _tailwindvariants.tv)({
|
|
|
282
308
|
paneIsOpen: paneIsOpen
|
|
283
309
|
}), " ").concat(className),
|
|
284
310
|
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
285
|
-
className: embedded ? "" : "@container",
|
|
311
|
+
className: embedded ? "" : "@container/main",
|
|
286
312
|
children: [
|
|
287
313
|
!contentIsFullPage && /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
288
314
|
className: logoStyles({
|
|
@@ -393,6 +419,15 @@ var logoStyles = (0, _tailwindvariants.tv)({
|
|
|
393
419
|
},
|
|
394
420
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
395
421
|
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",
|
|
422
|
+
role: "button",
|
|
423
|
+
tabIndex: 0,
|
|
424
|
+
"aria-label": "Close navigation",
|
|
425
|
+
onKeyDown: function(e) {
|
|
426
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
427
|
+
e.preventDefault();
|
|
428
|
+
setShowMobileNavigation(false);
|
|
429
|
+
}
|
|
430
|
+
},
|
|
396
431
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Icon.default, {
|
|
397
432
|
source: _polarisicons.CancelMajor,
|
|
398
433
|
color: "alternate"
|
|
@@ -70,7 +70,24 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
70
70
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
71
71
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
72
72
|
}
|
|
73
|
-
|
|
73
|
+
/**
|
|
74
|
+
* @component FrameSaveBar
|
|
75
|
+
*
|
|
76
|
+
* @description A save bar component embedded within the Frame layout that displays save and discard actions for unsaved form changes.
|
|
77
|
+
*
|
|
78
|
+
* @usage
|
|
79
|
+
* - DO: Use within a Frame layout to show a contextual save bar that integrates with the app shell.
|
|
80
|
+
* - DON'T: Use without a Frame parent.
|
|
81
|
+
*
|
|
82
|
+
* @accessibility
|
|
83
|
+
* - Keyboard accessible save and discard actions; message text describes the unsaved context.
|
|
84
|
+
*
|
|
85
|
+
* @alternative
|
|
86
|
+
* - If you need a standalone save bar outside Frame, use `ContextualSaveBar`.
|
|
87
|
+
*
|
|
88
|
+
* @param {Object} props.logo - Logo configuration.
|
|
89
|
+
* @returns {JSX.Element} The rendered FrameSaveBar component
|
|
90
|
+
*/ var styles = (0, _tailwindvariants.tv)({
|
|
74
91
|
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",
|
|
75
92
|
variants: {
|
|
76
93
|
visible: {
|
|
@@ -109,11 +126,7 @@ var toggleStyles = (0, _tailwindvariants.tv)({
|
|
|
109
126
|
paneIsOpen: false
|
|
110
127
|
}
|
|
111
128
|
});
|
|
112
|
-
|
|
113
|
-
* FrameSaveBar component sisplays a save bar at the top of the screen with contextual save and discard actions.
|
|
114
|
-
* @param {Object} props.logo - Logo configuration.
|
|
115
|
-
* @returns {JSX.Element} The rendered FrameSaveBar component
|
|
116
|
-
*/ function FrameSaveBar(param) {
|
|
129
|
+
function FrameSaveBar(param) {
|
|
117
130
|
var logo = param.logo;
|
|
118
131
|
var darkMode = (0, _AppProvider.useDarkMode)().darkMode;
|
|
119
132
|
var paneIsOpen = (0, _Frame.useFrame)().paneIsOpen;
|
|
@@ -160,6 +173,15 @@ var toggleStyles = (0, _tailwindvariants.tv)({
|
|
|
160
173
|
onClick: function() {
|
|
161
174
|
return setTucked(false);
|
|
162
175
|
},
|
|
176
|
+
role: "button",
|
|
177
|
+
tabIndex: 0,
|
|
178
|
+
"aria-label": "Show save bar",
|
|
179
|
+
onKeyDown: function(e) {
|
|
180
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
181
|
+
e.preventDefault();
|
|
182
|
+
setTucked(false);
|
|
183
|
+
}
|
|
184
|
+
},
|
|
163
185
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Icon.default, {
|
|
164
186
|
source: _polarisicons.ChevronDownMinor,
|
|
165
187
|
color: "FrameSaveBar"
|
|
@@ -207,6 +229,15 @@ var toggleStyles = (0, _tailwindvariants.tv)({
|
|
|
207
229
|
onClick: function() {
|
|
208
230
|
return setTucked(true);
|
|
209
231
|
},
|
|
232
|
+
role: "button",
|
|
233
|
+
tabIndex: 0,
|
|
234
|
+
"aria-label": "Hide save bar",
|
|
235
|
+
onKeyDown: function(e) {
|
|
236
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
237
|
+
e.preventDefault();
|
|
238
|
+
setTucked(true);
|
|
239
|
+
}
|
|
240
|
+
},
|
|
210
241
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Icon.default, {
|
|
211
242
|
source: _polarisicons.ChevronUpMinor,
|
|
212
243
|
color: "FrameSaveBar"
|