@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
|
@@ -401,7 +401,6 @@ var SchedulingForm = {
|
|
|
401
401
|
children: [
|
|
402
402
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_Grid.default, {
|
|
403
403
|
columns: 2,
|
|
404
|
-
gap: "4",
|
|
405
404
|
children: [
|
|
406
405
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_TimePicker.default, {
|
|
407
406
|
label: "Start time",
|
|
@@ -421,7 +420,6 @@ var SchedulingForm = {
|
|
|
421
420
|
}),
|
|
422
421
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_Grid.default, {
|
|
423
422
|
columns: 2,
|
|
424
|
-
gap: "4",
|
|
425
423
|
children: [
|
|
426
424
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_TimePicker.default, {
|
|
427
425
|
label: "Break start",
|
|
@@ -559,7 +557,6 @@ var EventPlanning = {
|
|
|
559
557
|
}),
|
|
560
558
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_Grid.default, {
|
|
561
559
|
columns: 2,
|
|
562
|
-
gap: "4",
|
|
563
560
|
children: [
|
|
564
561
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_TimePicker.default, {
|
|
565
562
|
label: "Start time",
|
|
@@ -645,7 +642,6 @@ var AppointmentBooking = {
|
|
|
645
642
|
children: [
|
|
646
643
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_Grid.default, {
|
|
647
644
|
columns: 2,
|
|
648
|
-
gap: "4",
|
|
649
645
|
children: [
|
|
650
646
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_Stack.default, {
|
|
651
647
|
gap: "sm",
|
|
@@ -827,7 +823,6 @@ var RestaurantReservation = {
|
|
|
827
823
|
children: [
|
|
828
824
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_Grid.default, {
|
|
829
825
|
columns: "2fr 1fr",
|
|
830
|
-
gap: "4",
|
|
831
826
|
children: [
|
|
832
827
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_TimePicker.default, {
|
|
833
828
|
label: "Preferred time",
|
|
@@ -342,7 +342,7 @@ var DismissibleTips = {
|
|
|
342
342
|
!Object.values(visibleTips).some(Boolean) && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Box.default, {
|
|
343
343
|
padding: "2",
|
|
344
344
|
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Stack.default, {
|
|
345
|
-
|
|
345
|
+
align: "center",
|
|
346
346
|
children: [
|
|
347
347
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Text.default, {
|
|
348
348
|
style: {
|
|
@@ -6,7 +6,36 @@ import Icon from "./Icon.js";
|
|
|
6
6
|
import Text from "./Text.js";
|
|
7
7
|
import Tooltip from "./Tooltip.js";
|
|
8
8
|
import { MobileHorizontalDotsMajor } from "@shopify/polaris-icons";
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* @component ActionList
|
|
11
|
+
*
|
|
12
|
+
* @description A vertical list of actionable items typically displayed inside a Popover for dropdown menus and contextual actions.
|
|
13
|
+
*
|
|
14
|
+
* @usage
|
|
15
|
+
* - DO: Display a list of actions inside a Popover dropdown menu.
|
|
16
|
+
* - DON'T: Use as a standalone visible list (use List or ResourceList).
|
|
17
|
+
*
|
|
18
|
+
* @accessibility
|
|
19
|
+
* - Renders as a list of buttons; each action item is keyboard navigable.
|
|
20
|
+
*
|
|
21
|
+
* @alternative
|
|
22
|
+
* - If you need a visible list of content, use `List`.
|
|
23
|
+
* - If you need a selectable list, use `Listbox`.
|
|
24
|
+
*
|
|
25
|
+
* @param {Object} props - Component properties.
|
|
26
|
+
* @param {Array<{title: string, items: Array<ActionListItem>}>} [props.sections] - Sections containing items for the action list.
|
|
27
|
+
* @param {Array<ActionListItem>} [props.items] - List of items to render in the action list when no sections are provided.
|
|
28
|
+
* @param {string} [props.iconColor="subdued"] - Default color for icons in the action items.
|
|
29
|
+
* @param {function} [props.onActionAnyItem] - Callback function invoked whenever any action item is selected.
|
|
30
|
+
* @param {boolean} [props.fullWidth=false] - Whether to apply full width styling to the action list.
|
|
31
|
+
* @param {boolean} [props.padded=true] - Whether to apply padding to the action list.
|
|
32
|
+
* @param {string} [props.className] - Additional CSS classes to apply to the action list.
|
|
33
|
+
* @example
|
|
34
|
+
* const items = [{ content: 'Item 1', onAction: () => {} }];
|
|
35
|
+
* <ActionList items={items} />
|
|
36
|
+
*
|
|
37
|
+
* @returns {JSX.Element} The rendered ActionList component.
|
|
38
|
+
*/ var styles = tv({
|
|
10
39
|
base: "Litho-ActionList",
|
|
11
40
|
variants: {
|
|
12
41
|
fullWidth: {
|
|
@@ -64,28 +93,12 @@ var itemStyles = tv({
|
|
|
64
93
|
* @property {string} imageUrl - The image to display for the action item.
|
|
65
94
|
* @property {string} url - The URL to navigate to when the action item is selected.
|
|
66
95
|
* @property {SecondaryAction} secondaryAction - The secondary action to display for the action item.
|
|
67
|
-
*/ /**
|
|
68
|
-
* ActionList component renders a list of actionable items with optional sections.
|
|
69
|
-
* Supports keyboard navigation and action triggers on item selection.
|
|
70
|
-
*
|
|
71
|
-
* @component
|
|
72
|
-
* @param {Object} props - Component properties.
|
|
73
|
-
* @param {Array<{title: string, items: Array<ActionListItem>}>} [props.sections] - Sections containing items for the action list.
|
|
74
|
-
* @param {Array<ActionListItem>} [props.items] - List of items to render in the action list when no sections are provided.
|
|
75
|
-
* @param {string} [props.iconColor="subdued"] - Default color for icons in the action items.
|
|
76
|
-
* @param {function} [props.onActionAnyItem] - Callback function invoked whenever any action item is selected.
|
|
77
|
-
* @param {boolean} [props.fullWidth=false] - Whether to apply full width styling to the action list.
|
|
78
|
-
* @param {boolean} [props.padded=true] - Whether to apply padding to the action list.
|
|
79
|
-
* @param {string} [props.className] - Additional CSS classes to apply to the action list.
|
|
80
|
-
* @example
|
|
81
|
-
* const items = [{ content: 'Item 1', onAction: () => {} }];
|
|
82
|
-
* <ActionList items={items} />
|
|
83
|
-
*
|
|
84
|
-
* @returns {JSX.Element} The rendered ActionList component.
|
|
85
96
|
*/ function ActionList() {
|
|
86
97
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
87
98
|
var sections = props.sections, _props_padded = props.padded, padded = _props_padded === void 0 ? true : _props_padded, tmp = props.items, initialItems = tmp === void 0 ? [] : tmp, tmp1 = props.iconColor, _iconColor = tmp1 === void 0 ? "subdued" : tmp1, onActionAnyItem = props.onActionAnyItem, className = props.className, _props_fullWidth = props.fullWidth, fullWidth = _props_fullWidth === void 0 ? false : _props_fullWidth;
|
|
88
|
-
|
|
99
|
+
// Always use index-based keys to avoid duplicate key issues when
|
|
100
|
+
// multiple sections have empty or identical titles
|
|
101
|
+
var sectionTitleAsKeys = false;
|
|
89
102
|
var items = initialItems || (sections ? sections.flatMap(function(section) {
|
|
90
103
|
return section.items;
|
|
91
104
|
}) : []);
|
|
@@ -128,11 +141,6 @@ var itemStyles = tv({
|
|
|
128
141
|
padded: padded
|
|
129
142
|
});
|
|
130
143
|
var isSectioned = sections && sections.length > 0;
|
|
131
|
-
if (isSectioned) {
|
|
132
|
-
sectionTitleAsKeys = sections.every(function(section) {
|
|
133
|
-
return Object.prototype.hasOwnProperty.call(section, "title");
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
144
|
var ActionListItem = function(param) {
|
|
137
145
|
var item = param.item, index = param.index;
|
|
138
146
|
var content = item.content, description = item.description, disabled = item.disabled, destructive = item.destructive, icon = item.icon, onAction = item.onAction, prefix = item.prefix, imageUrl = item.imageUrl, url = item.url, secondaryAction = item.secondaryAction;
|
|
@@ -1,8 +1,86 @@
|
|
|
1
|
+
function _define_property(obj, key, value) {
|
|
2
|
+
if (key in obj) {
|
|
3
|
+
Object.defineProperty(obj, key, {
|
|
4
|
+
value: value,
|
|
5
|
+
enumerable: true,
|
|
6
|
+
configurable: true,
|
|
7
|
+
writable: true
|
|
8
|
+
});
|
|
9
|
+
} else {
|
|
10
|
+
obj[key] = value;
|
|
11
|
+
}
|
|
12
|
+
return obj;
|
|
13
|
+
}
|
|
14
|
+
function _object_spread(target) {
|
|
15
|
+
for(var i = 1; i < arguments.length; i++){
|
|
16
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
17
|
+
var ownKeys = Object.keys(source);
|
|
18
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
19
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
20
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
23
|
+
ownKeys.forEach(function(key) {
|
|
24
|
+
_define_property(target, key, source[key]);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return target;
|
|
28
|
+
}
|
|
29
|
+
function ownKeys(object, enumerableOnly) {
|
|
30
|
+
var keys = Object.keys(object);
|
|
31
|
+
if (Object.getOwnPropertySymbols) {
|
|
32
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
33
|
+
if (enumerableOnly) {
|
|
34
|
+
symbols = symbols.filter(function(sym) {
|
|
35
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
keys.push.apply(keys, symbols);
|
|
39
|
+
}
|
|
40
|
+
return keys;
|
|
41
|
+
}
|
|
42
|
+
function _object_spread_props(target, source) {
|
|
43
|
+
source = source != null ? source : {};
|
|
44
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
45
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
46
|
+
} else {
|
|
47
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
48
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
return target;
|
|
52
|
+
}
|
|
1
53
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
54
|
import { tv } from "tailwind-variants";
|
|
3
55
|
import Text from "./Text.js";
|
|
4
56
|
import Icon from "./Icon.js";
|
|
5
|
-
|
|
57
|
+
import { CancelSmallMinor } from "@shopify/polaris-icons";
|
|
58
|
+
/**
|
|
59
|
+
* @component AnnouncementBar
|
|
60
|
+
*
|
|
61
|
+
* @description A full-width banner displayed at the top of the application for global announcements and promotions.
|
|
62
|
+
*
|
|
63
|
+
* @usage
|
|
64
|
+
* - DO: Display global announcements, promotions, or system-wide messages.
|
|
65
|
+
* - DON'T: Use for page-specific messages (use Banner).
|
|
66
|
+
*
|
|
67
|
+
* @accessibility
|
|
68
|
+
* - Ensure the announcement text is descriptive; provide a dismiss action for user control.
|
|
69
|
+
*
|
|
70
|
+
* @alternative
|
|
71
|
+
* - If you need page-specific messaging, use `Banner`.
|
|
72
|
+
* - If you need a contextual hint, use `Tip`.
|
|
73
|
+
*
|
|
74
|
+
* @param {Object} props - Component properties.
|
|
75
|
+
* @param {Function} [props.onClick] - Click handler function.
|
|
76
|
+
* @param {string} props.content - Text content to be displayed.
|
|
77
|
+
* @param {string} [props.icon] - Icon source name.
|
|
78
|
+
* @param {"bounce"} [props.animateIcon] - Animation type for the icon.
|
|
79
|
+
* @param {boolean} [props.fixed] - Whether to fix the announcement bar to the top of the page.
|
|
80
|
+
* @param {Function} [props.onDismiss] - Callback to dismiss the announcement bar. Renders a close button when provided.
|
|
81
|
+
*
|
|
82
|
+
* @returns {JSX.Element} AnnouncementBar component.
|
|
83
|
+
*/ var styles = tv({
|
|
6
84
|
base: "Litho-AnnouncementBar text-center p-2 min-h-10 flex items-center justify-center bg-brand",
|
|
7
85
|
variants: {
|
|
8
86
|
fixed: {
|
|
@@ -22,28 +100,27 @@ var iconContainerStyles = tv({
|
|
|
22
100
|
}
|
|
23
101
|
}
|
|
24
102
|
});
|
|
25
|
-
|
|
26
|
-
* AnnouncementBar Component
|
|
27
|
-
*
|
|
28
|
-
* @param {Object} props - Component properties.
|
|
29
|
-
* @param {Function} [props.onClick] - Click handler function.
|
|
30
|
-
* @param {string} props.content - Text content to be displayed.
|
|
31
|
-
* @param {string} [props.icon] - Icon source name.
|
|
32
|
-
* @param {"bounce"} [props.animateIcon] - Animation type for the icon.
|
|
33
|
-
* @param {boolean} [props.fixed] - Whether to fix the announcement bar to the top of the page.
|
|
34
|
-
*
|
|
35
|
-
* @returns {JSX.Element} AnnouncementBar component.
|
|
36
|
-
*/ function AnnouncementBar() {
|
|
103
|
+
function AnnouncementBar() {
|
|
37
104
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
38
|
-
var onClick = props.onClick, content = props.content, icon = props.icon, animateIcon = props.animateIcon, _props_fixed = props.fixed, fixed = _props_fixed === void 0 ? false : _props_fixed;
|
|
39
|
-
return /*#__PURE__*/ _jsx("div", {
|
|
105
|
+
var onClick = props.onClick, content = props.content, icon = props.icon, animateIcon = props.animateIcon, _props_fixed = props.fixed, fixed = _props_fixed === void 0 ? false : _props_fixed, onDismiss = props.onDismiss;
|
|
106
|
+
return /*#__PURE__*/ _jsx("div", _object_spread_props(_object_spread({
|
|
40
107
|
className: styles({
|
|
41
108
|
fixed: fixed,
|
|
42
109
|
interactive: !!onClick
|
|
43
110
|
}),
|
|
44
|
-
onClick: onClick
|
|
111
|
+
onClick: onClick
|
|
112
|
+
}, onClick ? {
|
|
113
|
+
role: "button",
|
|
114
|
+
tabIndex: 0,
|
|
115
|
+
onKeyDown: function(e) {
|
|
116
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
117
|
+
e.preventDefault();
|
|
118
|
+
onClick(e);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
} : {}), {
|
|
45
122
|
children: /*#__PURE__*/ _jsxs("div", {
|
|
46
|
-
className: "flex items-center justify-center gap-4",
|
|
123
|
+
className: "flex items-center justify-center gap-4 w-full relative",
|
|
47
124
|
children: [
|
|
48
125
|
/*#__PURE__*/ _jsx(Text, {
|
|
49
126
|
fontWeight: "medium",
|
|
@@ -57,9 +134,29 @@ var iconContainerStyles = tv({
|
|
|
57
134
|
children: /*#__PURE__*/ _jsx(Icon, {
|
|
58
135
|
source: icon
|
|
59
136
|
})
|
|
137
|
+
}),
|
|
138
|
+
onDismiss && /*#__PURE__*/ _jsx("div", {
|
|
139
|
+
className: "absolute right-0 p-1 cursor-pointer rounded-md hover:bg-brand-low",
|
|
140
|
+
onClick: function(e) {
|
|
141
|
+
e.stopPropagation();
|
|
142
|
+
onDismiss();
|
|
143
|
+
},
|
|
144
|
+
role: "button",
|
|
145
|
+
tabIndex: 0,
|
|
146
|
+
"aria-label": "Dismiss announcement",
|
|
147
|
+
onKeyDown: function(e) {
|
|
148
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
149
|
+
e.preventDefault();
|
|
150
|
+
e.stopPropagation();
|
|
151
|
+
onDismiss();
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
children: /*#__PURE__*/ _jsx(Icon, {
|
|
155
|
+
source: CancelSmallMinor
|
|
156
|
+
})
|
|
60
157
|
})
|
|
61
158
|
]
|
|
62
159
|
})
|
|
63
|
-
});
|
|
160
|
+
}));
|
|
64
161
|
}
|
|
65
162
|
export default AnnouncementBar;
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { tv } from "tailwind-variants";
|
|
4
|
+
import Button from "./Button.js";
|
|
5
|
+
import Card from "./Card.js";
|
|
6
|
+
import Icon from "./Icon.js";
|
|
7
|
+
import Stack from "./Stack.js";
|
|
8
|
+
import Text from "./Text.js";
|
|
9
|
+
import Tooltip from "./Tooltip.js";
|
|
10
|
+
import { CancelMinor } from "@shopify/polaris-icons";
|
|
11
|
+
/**
|
|
12
|
+
* @component AnnouncementCard
|
|
13
|
+
*
|
|
14
|
+
* @description A promotional card that displays a title, description, decorative icon, and action buttons. Used for feature announcements, onboarding prompts, and contextual promotions.
|
|
15
|
+
*
|
|
16
|
+
* @usage
|
|
17
|
+
* - DO: Use for feature announcements, onboarding prompts, or promotional content within a page.
|
|
18
|
+
* - DON'T: Use for alerts or critical messages (use Banner). Don't use for global announcements (use AnnouncementBar).
|
|
19
|
+
*
|
|
20
|
+
* @accessibility
|
|
21
|
+
* - The icon (or image when imageUrl is set) is purely decorative. Title and description convey the full message.
|
|
22
|
+
* - Action buttons are keyboard accessible via the Litho Button component.
|
|
23
|
+
* - Dismiss button includes an aria-label for screen readers.
|
|
24
|
+
*
|
|
25
|
+
* @alternative
|
|
26
|
+
* - If you need a contextual alert with status styling, use `Banner`.
|
|
27
|
+
* - If you need a global top-of-page announcement, use `AnnouncementBar`.
|
|
28
|
+
* - If you need a subtle inline hint, use `Tip`.
|
|
29
|
+
*
|
|
30
|
+
* @param {Object} props - Props for the AnnouncementCard component.
|
|
31
|
+
* @param {string|React.ReactNode} [props.title=null] - The announcement heading.
|
|
32
|
+
* @param {string|React.ReactNode} [props.description=null] - Supporting text below the title.
|
|
33
|
+
* @param {string} [props.imageUrl=null] - Optional image URL. When set, shown in place of the icon with 3/2 aspect ratio. Displayed on md+ screens only.
|
|
34
|
+
* @param {"0"|"1"|"2"|"3"|"4"} [props.imagePadding="0"] - Padding around the image (maps to p-0, p-1, p-2, p-3, p-4). Only applies when imageUrl is set.
|
|
35
|
+
* @param {"cover"|"contain"} [props.imageDisplay="cover"] - How the image fits within its container. Only applies when imageUrl is set.
|
|
36
|
+
* @param {React.ElementType|string} [props.icon=null] - A decorative icon. Pass a Polaris icon (e.g., MagicMajor), a Lucide icon component (e.g., Cable from lucide-react), or a string for dynamic Lucide loading (e.g., "cable"). Icon is automatically colored based on the tint prop. Displayed on md+ screens only. Ignored when imageUrl is set.
|
|
37
|
+
* @param {"info"|"success"|"critical"|"attention"|"warning"|"insight"|"highlight"|"neutral"|string} [props.tint="info"] - Color tint for the icon and image container background. Pass a named variant or a hex color (e.g. "#f0f0f0").
|
|
38
|
+
* @param {Object} [props.primaryAction=null] - Primary action button configuration.
|
|
39
|
+
* @param {string} [props.primaryAction.content] - Button label text.
|
|
40
|
+
* @param {Function} [props.primaryAction.onAction] - Click handler.
|
|
41
|
+
* @param {boolean} [props.primaryAction.loading=false] - Loading state.
|
|
42
|
+
* @param {boolean} [props.primaryAction.disabled=false] - Disabled state.
|
|
43
|
+
* @param {boolean} [props.primaryAction.destructive=false] - Destructive styling.
|
|
44
|
+
* @param {React.Component} [props.primaryAction.icon] - Button icon.
|
|
45
|
+
* @param {string} [props.primaryAction.url] - URL to open on click.
|
|
46
|
+
* @param {boolean} [props.primaryAction.external=false] - Open URL in new tab.
|
|
47
|
+
* @param {Object} [props.secondaryAction=null] - Secondary action button configuration (same shape as primaryAction).
|
|
48
|
+
* @param {Function} [props.onDismiss=null] - Callback when the dismiss button is clicked. When provided, renders a close button.
|
|
49
|
+
* @param {React.ReactNode|import("./Tooltip").TooltipContentObject} [props.tooltip=null] - Tooltip content for the title. When set, shows an info icon next to the title that displays the tooltip on hover.
|
|
50
|
+
* @param {string} [props.tooltipPreferredPosition='above'] - Preferred position for the tooltip.
|
|
51
|
+
* @param {React.ReactNode} [props.children=null] - Optional content rendered below the description. Image and icon are still shown when children are passed.
|
|
52
|
+
* @returns {React.ReactElement} The rendered AnnouncementCard component.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* import { Cable } from "lucide-react";
|
|
56
|
+
* import { MagicMajor } from "@shopify/polaris-icons";
|
|
57
|
+
*
|
|
58
|
+
* // With a Lucide icon
|
|
59
|
+
* <AnnouncementCard
|
|
60
|
+
* title="Try our new feature"
|
|
61
|
+
* description="Get started with the new integration tools."
|
|
62
|
+
* icon={Cable}
|
|
63
|
+
* tint="highlight"
|
|
64
|
+
* primaryAction={{ content: "Learn more", onAction: () => {} }}
|
|
65
|
+
* />
|
|
66
|
+
*
|
|
67
|
+
* // With a Polaris icon
|
|
68
|
+
* <AnnouncementCard
|
|
69
|
+
* title="Try our new feature"
|
|
70
|
+
* icon={MagicMajor}
|
|
71
|
+
* tint="insight"
|
|
72
|
+
* primaryAction={{ content: "Learn more", onAction: () => {} }}
|
|
73
|
+
* />
|
|
74
|
+
*
|
|
75
|
+
* // With a dynamic Lucide string
|
|
76
|
+
* <AnnouncementCard
|
|
77
|
+
* title="Try our new feature"
|
|
78
|
+
* icon="cable"
|
|
79
|
+
* tint="info"
|
|
80
|
+
* primaryAction={{ content: "Learn more", onAction: () => {} }}
|
|
81
|
+
* />
|
|
82
|
+
*/ var TINT_BG_CLASSES = {
|
|
83
|
+
info: "bg-info-alt",
|
|
84
|
+
success: "bg-success-alt",
|
|
85
|
+
critical: "bg-critical-alt",
|
|
86
|
+
attention: "bg-attention-alt",
|
|
87
|
+
warning: "bg-attention-alt",
|
|
88
|
+
insight: "bg-insight-alt",
|
|
89
|
+
highlight: "bg-highlight-alt",
|
|
90
|
+
neutral: "bg-neutral-alt",
|
|
91
|
+
custom: ""
|
|
92
|
+
};
|
|
93
|
+
var iconContainerStyles = tv({
|
|
94
|
+
base: "w-24 h-24 rounded-xl flex items-center justify-center flex-shrink-0",
|
|
95
|
+
variants: {
|
|
96
|
+
tint: TINT_BG_CLASSES
|
|
97
|
+
},
|
|
98
|
+
defaultVariants: {
|
|
99
|
+
tint: "info"
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
var imageContainerStyles = tv({
|
|
103
|
+
base: "aspect-[3/2] rounded-xl overflow-hidden",
|
|
104
|
+
variants: {
|
|
105
|
+
tint: TINT_BG_CLASSES,
|
|
106
|
+
padding: {
|
|
107
|
+
"0": "p-0",
|
|
108
|
+
"1": "p-1",
|
|
109
|
+
"2": "p-2",
|
|
110
|
+
"3": "p-3",
|
|
111
|
+
"4": "p-4"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
defaultVariants: {
|
|
115
|
+
tint: "info",
|
|
116
|
+
padding: "0"
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
var IMAGE_DISPLAY_CLASSES = {
|
|
120
|
+
cover: "object-cover",
|
|
121
|
+
contain: "object-contain"
|
|
122
|
+
};
|
|
123
|
+
var TINT_ICON_COLORS = {
|
|
124
|
+
info: "info-alt-icon",
|
|
125
|
+
success: "success-alt-icon",
|
|
126
|
+
critical: "critical-alt-icon",
|
|
127
|
+
attention: "attention-alt-icon",
|
|
128
|
+
warning: "warning-alt-icon",
|
|
129
|
+
insight: "insight-alt-icon",
|
|
130
|
+
highlight: "highlight-alt-icon",
|
|
131
|
+
neutral: "neutral-alt-icon"
|
|
132
|
+
};
|
|
133
|
+
var renderAction = function(action) {
|
|
134
|
+
var plain = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
135
|
+
if (!action) return null;
|
|
136
|
+
return /*#__PURE__*/ _jsx(Button, {
|
|
137
|
+
plain: plain,
|
|
138
|
+
disabled: action.disabled,
|
|
139
|
+
loading: action.loading,
|
|
140
|
+
destructive: action.destructive,
|
|
141
|
+
icon: action.icon,
|
|
142
|
+
url: action.url,
|
|
143
|
+
external: action.external,
|
|
144
|
+
onClick: action.onAction,
|
|
145
|
+
children: action.content
|
|
146
|
+
});
|
|
147
|
+
};
|
|
148
|
+
function AnnouncementCard() {
|
|
149
|
+
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
150
|
+
var _props_title = props.title, title = _props_title === void 0 ? null : _props_title, _props_titleGap = props.titleGap, titleGap = _props_titleGap === void 0 ? "xs" : _props_titleGap, _props_description = props.description, description = _props_description === void 0 ? null : _props_description, _props_imageUrl = props.imageUrl, imageUrl = _props_imageUrl === void 0 ? null : _props_imageUrl, _props_imagePadding = props.imagePadding, imagePadding = _props_imagePadding === void 0 ? "0" : _props_imagePadding, _props_imageDisplay = props.imageDisplay, imageDisplay = _props_imageDisplay === void 0 ? "cover" : _props_imageDisplay, _props_icon = props.icon, icon = _props_icon === void 0 ? null : _props_icon, _props_tint = props.tint, tint = _props_tint === void 0 ? "info" : _props_tint, _props_primaryAction = props.primaryAction, primaryAction = _props_primaryAction === void 0 ? null : _props_primaryAction, _props_secondaryAction = props.secondaryAction, secondaryAction = _props_secondaryAction === void 0 ? null : _props_secondaryAction, _props_onDismiss = props.onDismiss, onDismiss = _props_onDismiss === void 0 ? null : _props_onDismiss, _props_tooltip = props.tooltip, tooltip = _props_tooltip === void 0 ? null : _props_tooltip, _props_tooltipPreferredPosition = props.tooltipPreferredPosition, tooltipPreferredPosition = _props_tooltipPreferredPosition === void 0 ? "above" : _props_tooltipPreferredPosition, _props_children = props.children, children = _props_children === void 0 ? null : _props_children;
|
|
151
|
+
var hasActions = !!(primaryAction || secondaryAction);
|
|
152
|
+
var isTintHex = typeof tint === "string" && tint.startsWith("#");
|
|
153
|
+
var resolvedTint = isTintHex ? "custom" : tint;
|
|
154
|
+
var tintStyle = isTintHex ? {
|
|
155
|
+
backgroundColor: tint
|
|
156
|
+
} : undefined;
|
|
157
|
+
var _IMAGE_DISPLAY_CLASSES_imageDisplay;
|
|
158
|
+
return /*#__PURE__*/ _jsx(Card, {
|
|
159
|
+
padded: true,
|
|
160
|
+
children: /*#__PURE__*/ _jsxs("div", {
|
|
161
|
+
className: "relative group/announcement-card",
|
|
162
|
+
children: [
|
|
163
|
+
onDismiss && /*#__PURE__*/ _jsx("div", {
|
|
164
|
+
className: "absolute top-0 right-0 group-hover/announcement-card:block hidden opacity-70 hover:opacity-100",
|
|
165
|
+
children: /*#__PURE__*/ _jsx(Button, {
|
|
166
|
+
plain: true,
|
|
167
|
+
icon: CancelMinor,
|
|
168
|
+
onClick: onDismiss,
|
|
169
|
+
tooltip: "Dismiss",
|
|
170
|
+
"aria-label": "Dismiss",
|
|
171
|
+
size: "small"
|
|
172
|
+
})
|
|
173
|
+
}),
|
|
174
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
175
|
+
horizontal: "md",
|
|
176
|
+
justify: "between",
|
|
177
|
+
align: "stretch",
|
|
178
|
+
gap: "6",
|
|
179
|
+
children: [
|
|
180
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
181
|
+
justify: "between",
|
|
182
|
+
fullWidth: true,
|
|
183
|
+
children: [
|
|
184
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
185
|
+
gap: titleGap,
|
|
186
|
+
children: [
|
|
187
|
+
title != null && /*#__PURE__*/ _jsxs("div", {
|
|
188
|
+
className: "flex items-center gap-2",
|
|
189
|
+
children: [
|
|
190
|
+
typeof title === "string" ? /*#__PURE__*/ _jsx(Text, {
|
|
191
|
+
variant: "headingMd",
|
|
192
|
+
fontWeight: "medium",
|
|
193
|
+
children: title
|
|
194
|
+
}) : title,
|
|
195
|
+
tooltip && /*#__PURE__*/ _jsx(Tooltip, {
|
|
196
|
+
content: tooltip,
|
|
197
|
+
preferredPosition: tooltipPreferredPosition
|
|
198
|
+
})
|
|
199
|
+
]
|
|
200
|
+
}),
|
|
201
|
+
description != null && (typeof description === "string" ? /*#__PURE__*/ _jsx(Text, {
|
|
202
|
+
color: "subdued",
|
|
203
|
+
children: description
|
|
204
|
+
}) : description),
|
|
205
|
+
children
|
|
206
|
+
]
|
|
207
|
+
}),
|
|
208
|
+
hasActions && /*#__PURE__*/ _jsxs("div", {
|
|
209
|
+
className: "flex gap-2",
|
|
210
|
+
children: [
|
|
211
|
+
renderAction(primaryAction),
|
|
212
|
+
renderAction(secondaryAction, true)
|
|
213
|
+
]
|
|
214
|
+
})
|
|
215
|
+
]
|
|
216
|
+
}),
|
|
217
|
+
imageUrl && /*#__PURE__*/ _jsx("div", {
|
|
218
|
+
className: "hidden md:block w-36 flex-shrink-0",
|
|
219
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
220
|
+
className: imageContainerStyles({
|
|
221
|
+
tint: resolvedTint,
|
|
222
|
+
padding: imagePadding
|
|
223
|
+
}),
|
|
224
|
+
style: tintStyle,
|
|
225
|
+
children: /*#__PURE__*/ _jsx("img", {
|
|
226
|
+
src: imageUrl,
|
|
227
|
+
alt: "",
|
|
228
|
+
className: "w-full h-full rounded-xl ".concat((_IMAGE_DISPLAY_CLASSES_imageDisplay = IMAGE_DISPLAY_CLASSES[imageDisplay]) !== null && _IMAGE_DISPLAY_CLASSES_imageDisplay !== void 0 ? _IMAGE_DISPLAY_CLASSES_imageDisplay : IMAGE_DISPLAY_CLASSES.cover)
|
|
229
|
+
})
|
|
230
|
+
})
|
|
231
|
+
}),
|
|
232
|
+
!imageUrl && icon && /*#__PURE__*/ _jsx("div", {
|
|
233
|
+
className: "hidden md:block",
|
|
234
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
235
|
+
className: iconContainerStyles({
|
|
236
|
+
tint: resolvedTint
|
|
237
|
+
}),
|
|
238
|
+
style: tintStyle,
|
|
239
|
+
children: /*#__PURE__*/ _jsx(Icon, {
|
|
240
|
+
source: icon,
|
|
241
|
+
color: TINT_ICON_COLORS[tint] || TINT_ICON_COLORS.info,
|
|
242
|
+
size: 12,
|
|
243
|
+
strokeWidth: 1,
|
|
244
|
+
opacity: 70
|
|
245
|
+
})
|
|
246
|
+
})
|
|
247
|
+
})
|
|
248
|
+
]
|
|
249
|
+
})
|
|
250
|
+
]
|
|
251
|
+
})
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
export default AnnouncementCard;
|
|
@@ -90,7 +90,20 @@ var screenSizes = typeof window !== "undefined" ? {
|
|
|
90
90
|
"2xl": parseInt(getComputedStyle(document.documentElement).getPropertyValue("--breakpoint-2xl"), 10)
|
|
91
91
|
} : {};
|
|
92
92
|
/**
|
|
93
|
-
*
|
|
93
|
+
* @component AppProvider
|
|
94
|
+
*
|
|
95
|
+
* @description The root context provider that initializes dark mode, frame state, and form context for the entire Litho application.
|
|
96
|
+
*
|
|
97
|
+
* @usage
|
|
98
|
+
* - DO: Wrap your entire application to provide dark mode, frame, and form context.
|
|
99
|
+
* - DON'T: Use multiple AppProviders in the same tree.
|
|
100
|
+
*
|
|
101
|
+
* @accessibility
|
|
102
|
+
* - AppProvider manages the `data-theme` attribute on `<html>` for dark mode; ensures consistent theming for all components.
|
|
103
|
+
*
|
|
104
|
+
* @alternative
|
|
105
|
+
* - If you only need toast notifications, use `ToastProvider` independently.
|
|
106
|
+
*
|
|
94
107
|
* @param {Object} props
|
|
95
108
|
* @param {React.ReactNode} props.children - The child components.
|
|
96
109
|
* @param {boolean} props.embedded - Whether the app is embedded.
|
|
@@ -184,7 +197,7 @@ var screenSizes = typeof window !== "undefined" ? {
|
|
|
184
197
|
setDiscardAction: setDiscardAction
|
|
185
198
|
},
|
|
186
199
|
children: /*#__PURE__*/ _jsx("div", {
|
|
187
|
-
className: "app-wrapper ".concat(embedded ? "@container" : ""),
|
|
200
|
+
className: "app-wrapper ".concat(embedded ? "@container/main" : ""),
|
|
188
201
|
children: children
|
|
189
202
|
})
|
|
190
203
|
})
|