@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
|
@@ -119,42 +119,21 @@ import Spinner from "./Spinner.js";
|
|
|
119
119
|
import Text from "./Text.js";
|
|
120
120
|
import Icon from "./Icon.js";
|
|
121
121
|
import { SearchMinor } from "@shopify/polaris-icons";
|
|
122
|
-
var styles = tv({
|
|
123
|
-
base: "Litho-Autocomplete flex flex-col"
|
|
124
|
-
});
|
|
125
|
-
function attachPropToTextField(children, prop) {
|
|
126
|
-
return React.Children.map(children, function(child) {
|
|
127
|
-
if (/*#__PURE__*/ isValidElement(child)) {
|
|
128
|
-
var _child_type, _child_props;
|
|
129
|
-
if (((_child_type = child.type) === null || _child_type === void 0 ? void 0 : _child_type.displayName) === "Autocomplete.TextField") {
|
|
130
|
-
return /*#__PURE__*/ cloneElement(child, prop);
|
|
131
|
-
}
|
|
132
|
-
if ((_child_props = child.props) === null || _child_props === void 0 ? void 0 : _child_props.children) {
|
|
133
|
-
return /*#__PURE__*/ cloneElement(child, {
|
|
134
|
-
children: attachPropToTextField(child.props.children, prop)
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
return child;
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
122
|
/**
|
|
142
|
-
* @
|
|
143
|
-
*
|
|
144
|
-
* @
|
|
145
|
-
*
|
|
146
|
-
* @
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
* @
|
|
154
|
-
|
|
155
|
-
* Autocomplete component that provides a flexible dropdown menu with search and selection capabilities.
|
|
123
|
+
* @component Autocomplete
|
|
124
|
+
*
|
|
125
|
+
* @description A searchable text input with a dropdown suggestions list for selecting from filtered options.
|
|
126
|
+
*
|
|
127
|
+
* @usage
|
|
128
|
+
* - DO: Use for selecting from a large list with search/filter capability.
|
|
129
|
+
* - DON'T: Use for short static lists. Instead, use Select (when list is more than 7 items, or dynamic but doesn't need search) or ChoiceList (when list is less than 7 items and static).
|
|
130
|
+
*
|
|
131
|
+
* @accessibility
|
|
132
|
+
* - Implements combobox pattern with `aria-expanded` and `aria-activedescendant`; keyboard navigable.
|
|
133
|
+
*
|
|
134
|
+
* @alternative
|
|
135
|
+
* - If the option list is short and static, use `Select`. If you need a custom dropdown, use `Listbox`.
|
|
156
136
|
*
|
|
157
|
-
* @component
|
|
158
137
|
* @param {Object} props - The props for the Autocomplete component.
|
|
159
138
|
* @param {Array<AutocompleteOption>} props.options - The options to display in the dropdown.
|
|
160
139
|
* @param {Array<string>} props.selected - The currently selected option values.
|
|
@@ -184,7 +163,7 @@ function attachPropToTextField(children, prop) {
|
|
|
184
163
|
* <Autocomplete
|
|
185
164
|
* options={[
|
|
186
165
|
* {
|
|
187
|
-
* label: <Stack horizontal gap="xs"
|
|
166
|
+
* label: <Stack horizontal gap="xs" align="center"><span>Premium</span><Badge>New</Badge></Stack>,
|
|
188
167
|
* value: "premium"
|
|
189
168
|
* }
|
|
190
169
|
* ]}
|
|
@@ -192,7 +171,39 @@ function attachPropToTextField(children, prop) {
|
|
|
192
171
|
* onSelect={(selected) => console.log(selected)}
|
|
193
172
|
* textField={<Autocomplete.TextField placeholder="Search..." />}
|
|
194
173
|
* />
|
|
195
|
-
*/
|
|
174
|
+
*/ var styles = tv({
|
|
175
|
+
base: "Litho-Autocomplete flex flex-col"
|
|
176
|
+
});
|
|
177
|
+
/**
|
|
178
|
+
* @typedef {Object} AutocompleteOption
|
|
179
|
+
* @property {string|React.ReactNode} label - The label to display for the option. Can be a string or a React element (e.g., text with a badge).
|
|
180
|
+
* @property {string} value - The value to associate with the option.
|
|
181
|
+
* @property {string} [title] - An optional title to display for the option.
|
|
182
|
+
* @property {boolean} [allowMultiple] - Whether multiple options can be selected.
|
|
183
|
+
* @property {string} [selected] - The value of the option that is currently selected.
|
|
184
|
+
* @property {function} [onSelect] - The function to call when the option is selected.
|
|
185
|
+
* @property {Array<AutocompleteOption>} [options] - An optional array of sub-options to display for the option.
|
|
186
|
+
*/ /**
|
|
187
|
+
* @typedef {Object} AutocompleteEmptyState
|
|
188
|
+
* @property {string} content - The content to display in the empty state.
|
|
189
|
+
* @property {React.ReactNode} icon - An optional icon to display in the empty state.
|
|
190
|
+
*/ function attachPropToTextField(children, prop) {
|
|
191
|
+
return React.Children.map(children, function(child) {
|
|
192
|
+
if (/*#__PURE__*/ isValidElement(child)) {
|
|
193
|
+
var _child_type, _child_props;
|
|
194
|
+
if (((_child_type = child.type) === null || _child_type === void 0 ? void 0 : _child_type.displayName) === "Autocomplete.TextField") {
|
|
195
|
+
return /*#__PURE__*/ cloneElement(child, prop);
|
|
196
|
+
}
|
|
197
|
+
if ((_child_props = child.props) === null || _child_props === void 0 ? void 0 : _child_props.children) {
|
|
198
|
+
return /*#__PURE__*/ cloneElement(child, {
|
|
199
|
+
children: attachPropToTextField(child.props.children, prop)
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
return child;
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
function Autocomplete() {
|
|
196
207
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
197
208
|
var options = props.options, selected = props.selected, _props_preferredPosition = props.preferredPosition, preferredPosition = _props_preferredPosition === void 0 ? "below" : _props_preferredPosition, _props_preferredAlignment = props.preferredAlignment, preferredAlignment = _props_preferredAlignment === void 0 ? "left" : _props_preferredAlignment, allowMultiple = props.allowMultiple, loading = props.loading, emptyState = props.emptyState, onSelect = props.onSelect, textField = props.textField, className = props.className, zIndexOverride = props.zIndexOverride;
|
|
198
209
|
var classes = styles();
|
|
@@ -236,6 +247,17 @@ function attachPropToTextField(children, prop) {
|
|
|
236
247
|
]);
|
|
237
248
|
setShowOptionsPopover && setShowOptionsPopover(false);
|
|
238
249
|
},
|
|
250
|
+
role: "option",
|
|
251
|
+
tabIndex: 0,
|
|
252
|
+
onKeyDown: function(e) {
|
|
253
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
254
|
+
e.preventDefault();
|
|
255
|
+
onSelect([
|
|
256
|
+
option.value
|
|
257
|
+
]);
|
|
258
|
+
setShowOptionsPopover && setShowOptionsPopover(false);
|
|
259
|
+
}
|
|
260
|
+
},
|
|
239
261
|
children: option.label
|
|
240
262
|
});
|
|
241
263
|
};
|
|
@@ -1,7 +1,32 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { tv } from "tailwind-variants";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @component Badge
|
|
5
|
+
*
|
|
6
|
+
* @description A small status indicator that displays a short label with a color-coded background to convey state like success, warning, or attention.
|
|
7
|
+
*
|
|
8
|
+
* @usage
|
|
9
|
+
* - DO: Convey status (success, warning, critical) on list items or table rows.
|
|
10
|
+
* - DON'T: Use for interactive or clickable elements (use Button or Tag).
|
|
11
|
+
* - DON'T: Overuse. Badges have a lot of visual weight, so use them sparingly. Consider using a Text component if content doesn't need to be prioritized over other content.
|
|
12
|
+
*
|
|
13
|
+
* @accessibility
|
|
14
|
+
* - Badge content is read as inline text; ensure status text is descriptive.
|
|
15
|
+
* - Do not rely on color alone to convey meaning.
|
|
16
|
+
*
|
|
17
|
+
* @alternative
|
|
18
|
+
* - If you need a removable label, use `Tag`.
|
|
19
|
+
* - If you need a full-sentence status message, use `Banner`.
|
|
20
|
+
*
|
|
21
|
+
* @param {object} props - Component properties.
|
|
22
|
+
* @param {React.ReactNode} props.children - Content to display within the badge.
|
|
23
|
+
* @param {"complete" | "incomplete" | "partiallyComplete" | null} [props.progress] - Progress state of the badge.
|
|
24
|
+
* @param {boolean} [props.capitalize] - Capitalize the first letter of the badge.
|
|
25
|
+
* @param {"default" | "info" | "success" | "warning" | "critical" | "attention" | "highlight"} [props.status="default"] - Status variant to style the badge.
|
|
26
|
+
* @param {string} [props.className] - Additional CSS classes to apply to the badge.
|
|
27
|
+
* @returns {JSX.Element} - Rendered Badge component with optional progress indicator.
|
|
28
|
+
*/ var styles = tv({
|
|
29
|
+
base: "Litho-Badge inline-flex items-center gap-1.5 text-sm rounded-full leading-normal min-h-5",
|
|
5
30
|
variants: {
|
|
6
31
|
status: {
|
|
7
32
|
info: "bg-info-alt text-info-alt-fg",
|
|
@@ -186,18 +211,7 @@ var progressBadgeStyles = tv({
|
|
|
186
211
|
progress: "null"
|
|
187
212
|
}
|
|
188
213
|
});
|
|
189
|
-
|
|
190
|
-
* A Badge component that renders a small, colored label with a status or progress indicator. The badge can be configured with different statuses, progress states, and sizes.
|
|
191
|
-
*
|
|
192
|
-
* @component
|
|
193
|
-
* @param {object} props - Component properties.
|
|
194
|
-
* @param {React.ReactNode} props.children - Content to display within the badge.
|
|
195
|
-
* @param {"complete" | "incomplete" | "partiallyComplete" | null} [props.progress] - Progress state of the badge.
|
|
196
|
-
* @param {boolean} [props.capitalize] - Capitalize the first letter of the badge.
|
|
197
|
-
* @param {"default" | "info" | "success" | "warning" | "critical" | "attention" | "highlight"} [props.status="default"] - Status variant to style the badge.
|
|
198
|
-
* @param {string} [props.className] - Additional CSS classes to apply to the badge.
|
|
199
|
-
* @returns {JSX.Element} - Rendered Badge component with optional progress indicator.
|
|
200
|
-
*/ function Badge() {
|
|
214
|
+
function Badge() {
|
|
201
215
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
202
216
|
var children = props.children, progress = props.progress, status = props.status, capitalize = props.capitalize, className = props.className;
|
|
203
217
|
var classes = styles({
|
|
@@ -6,7 +6,43 @@ import Text from "./Text.js";
|
|
|
6
6
|
import Button from "./Button.js";
|
|
7
7
|
import Link from "./Link.js";
|
|
8
8
|
import { CancelMinor, CircleAlertMajor, CircleInformationMajor, MagicMajor, TickMinor } from "@shopify/polaris-icons";
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* @component Banner
|
|
11
|
+
*
|
|
12
|
+
* @description A contextual message bar that displays informational, success, warning, or critical notices with optional actions and dismiss functionality.
|
|
13
|
+
*
|
|
14
|
+
* @usage
|
|
15
|
+
* - DO: Display important contextual messages at the top of a page or section (info, success, warning, critical).
|
|
16
|
+
* - DON'T: Use for transient notifications (use ToastNotification).
|
|
17
|
+
*
|
|
18
|
+
* @accessibility
|
|
19
|
+
* - Banner uses `role="status"` or appropriate ARIA role based on status; ensure the message text is descriptive.
|
|
20
|
+
*
|
|
21
|
+
* @alternative
|
|
22
|
+
* - If you need a brief, auto-dismissing notification, use `ToastNotification`.
|
|
23
|
+
* - If you need a contextual hint, use `Tip`.
|
|
24
|
+
*
|
|
25
|
+
* @param {Object} props - The properties for configuring the Banner component.
|
|
26
|
+
* @param {string} [props.title] - The title text for the banner. If not provided, no title will be displayed.
|
|
27
|
+
* @param {BannerStatus} [props.status='neutral'] - The status of the banner, which determines its color and icon.
|
|
28
|
+
* @param {Function} [props.onDismiss] - Callback function to handle the banner's dismiss action.
|
|
29
|
+
* @param {React.ReactNode} [props.children] - Additional content to display within the banner.
|
|
30
|
+
* @param {BannerAction} [props.action] - Primary action configuration object
|
|
31
|
+
* @param {BannerAction} [props.secondaryAction] - Secondary action configuration object
|
|
32
|
+
* @param {FunctionComponent} [props.icon] - Custom icon to display on the banner. If not provided, a default icon is used based on the status.
|
|
33
|
+
* @param {boolean} [props.spinner] - Shows a spinner icon instead of a status icon when set to true.
|
|
34
|
+
*
|
|
35
|
+
* @returns {JSX.Element} The rendered Banner component.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* <Banner
|
|
39
|
+
* title="Warning"
|
|
40
|
+
* status="warning"
|
|
41
|
+
* onDismiss={() => console.log('Dismissed')}
|
|
42
|
+
* action={{ content: "Action", primary: true, onAction: () => console.log('Action clicked') }}
|
|
43
|
+
* secondaryAction={{ content: "Learn more", link: true, monochrome: true, url: "https://example.com" }}
|
|
44
|
+
* />
|
|
45
|
+
*/ var styles = tv({
|
|
10
46
|
base: "Litho-Banner relative rounded-md shadow-card bg-surface-highest outline outline-tint-3"
|
|
11
47
|
});
|
|
12
48
|
var headerStyles = tv({
|
|
@@ -97,32 +133,6 @@ var STATUS_STYLES = {
|
|
|
97
133
|
* @property {boolean} [loading=false] - Whether to show a loading state
|
|
98
134
|
* @property {Function} [onAction] - Click handler for the action
|
|
99
135
|
* @property {string} [url] - URL to navigate to when clicked (opens in new tab)
|
|
100
|
-
*/ /**
|
|
101
|
-
* A Banner component that displays a styled banner with customizable title, status, icon, actions, and dismiss functionality.
|
|
102
|
-
* The banner style and content change based on the provided props, allowing for various statuses and themes.
|
|
103
|
-
*
|
|
104
|
-
* @component
|
|
105
|
-
*
|
|
106
|
-
* @param {Object} props - The properties for configuring the Banner component.
|
|
107
|
-
* @param {string} [props.title] - The title text for the banner. If not provided, no title will be displayed.
|
|
108
|
-
* @param {BannerStatus} [props.status='neutral'] - The status of the banner, which determines its color and icon.
|
|
109
|
-
* @param {Function} [props.onDismiss] - Callback function to handle the banner's dismiss action.
|
|
110
|
-
* @param {React.ReactNode} [props.children] - Additional content to display within the banner.
|
|
111
|
-
* @param {BannerAction} [props.action] - Primary action configuration object
|
|
112
|
-
* @param {BannerAction} [props.secondaryAction] - Secondary action configuration object
|
|
113
|
-
* @param {FunctionComponent} [props.icon] - Custom icon to display on the banner. If not provided, a default icon is used based on the status.
|
|
114
|
-
* @param {boolean} [props.spinner] - Shows a spinner icon instead of a status icon when set to true.
|
|
115
|
-
*
|
|
116
|
-
* @returns {JSX.Element} The rendered Banner component.
|
|
117
|
-
*
|
|
118
|
-
* @example
|
|
119
|
-
* <Banner
|
|
120
|
-
* title="Warning"
|
|
121
|
-
* status="warning"
|
|
122
|
-
* onDismiss={() => console.log('Dismissed')}
|
|
123
|
-
* action={{ content: "Action", primary: true, onAction: () => console.log('Action clicked') }}
|
|
124
|
-
* secondaryAction={{ content: "Learn more", link: true, monochrome: true, url: "https://example.com" }}
|
|
125
|
-
* />
|
|
126
136
|
*/ function Banner() {
|
|
127
137
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
128
138
|
var _props_title = props.title, title = _props_title === void 0 ? null : _props_title, _props_status = props.status, status = _props_status === void 0 ? "neutral" : _props_status, _props_onDismiss = props.onDismiss, onDismiss = _props_onDismiss === void 0 ? null : _props_onDismiss, _props_children = props.children, children = _props_children === void 0 ? null : _props_children, _props_action = props.action, action = _props_action === void 0 ? null : _props_action, _props_secondaryAction = props.secondaryAction, secondaryAction = _props_secondaryAction === void 0 ? null : _props_secondaryAction, _props_icon = props.icon, icon = _props_icon === void 0 ? null : _props_icon, _props_spinner = props.spinner, spinner = _props_spinner === void 0 ? false : _props_spinner;
|
|
@@ -28,7 +28,55 @@ function _object_spread(target) {
|
|
|
28
28
|
}
|
|
29
29
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
30
30
|
import { tv } from "tailwind-variants";
|
|
31
|
-
|
|
31
|
+
/**
|
|
32
|
+
* @component Box
|
|
33
|
+
*
|
|
34
|
+
* @description A flexible container component with configurable padding, background, border radius, shadow, and overflow properties.
|
|
35
|
+
*
|
|
36
|
+
* @usage
|
|
37
|
+
* - DO: Use as a flexible container for padding, spacing, and background styling.
|
|
38
|
+
* - DON'T: Use for page-level layout (use `Layout` instead).
|
|
39
|
+
*
|
|
40
|
+
* @accessibility
|
|
41
|
+
* - Box renders a generic div by default; use the `as` prop for semantic HTML elements when appropriate.
|
|
42
|
+
*
|
|
43
|
+
* @alternative
|
|
44
|
+
* - If you need a bordered card, use `Card`.
|
|
45
|
+
* - If you need flex layout, use `Stack`.
|
|
46
|
+
*
|
|
47
|
+
* @param {Object} props - Properties to configure the Box component.
|
|
48
|
+
* @param {string} [props.as='div'] - The HTML element to render as. Defaults to `div`.
|
|
49
|
+
* @param {'default' | 'subdued'} [props.background] - Background color variant.
|
|
50
|
+
* @param {'default' | 'subdued'} [props.borderColor] - Border color variant.
|
|
51
|
+
* @param {'default' | 'sm' | 'lg' | 'full'} [props.borderRadius] - Border radius variant.
|
|
52
|
+
* @param {'none' | '0' | '1'} [props.borderBlockStartWidth] - Top border width variant.
|
|
53
|
+
* @param {'none' | '0' | '1'} [props.borderBlockEndWidth] - Bottom border width variant.
|
|
54
|
+
* @param {'none' | '0' | '1'} [props.borderInlineStartWidth] - Left border width variant.
|
|
55
|
+
* @param {'none' | '0' | '1'} [props.borderInlineEndWidth] - Right border width variant.
|
|
56
|
+
* @param {'none' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10'} [props.padding] - Padding for all sides.
|
|
57
|
+
* @param {'none' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10'} [props.paddingBlockStart] - Top padding.
|
|
58
|
+
* @param {'none' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10'} [props.paddingBlockEnd] - Bottom padding.
|
|
59
|
+
* @param {'none' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10'} [props.paddingInlineStart] - Left padding.
|
|
60
|
+
* @param {'none' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10'} [props.paddingInlineEnd] - Right padding.
|
|
61
|
+
* @param {'hidden' | 'scroll'} [props.overflow] - Overflow setting for all sides.
|
|
62
|
+
* @param {'hidden' | 'scroll'} [props.overflowX] - Overflow setting for x-axis.
|
|
63
|
+
* @param {'hidden' | 'scroll'} [props.overflowY] - Overflow setting for y-axis.
|
|
64
|
+
* @param {'relative' | 'absolute' | 'fixed' | 'sticky'} [props.position] - CSS positioning of the box.
|
|
65
|
+
* @param {React.ReactNode} [props.children] - Child elements to render inside the Box.
|
|
66
|
+
* @param {string} [props.id] - ID for the Box element.
|
|
67
|
+
* @param {number | string} [props.height] - CSS height of the Box.
|
|
68
|
+
* @param {number | string} [props.width] - CSS width of the Box.
|
|
69
|
+
* @param {number | string} [props.minHeight] - Minimum CSS height.
|
|
70
|
+
* @param {number | string} [props.maxHeight] - Maximum CSS height.
|
|
71
|
+
* @param {number | string} [props.minWidth] - Minimum CSS width.
|
|
72
|
+
* @param {number | string} [props.maxWidth] - Maximum CSS width.
|
|
73
|
+
* @param {number | string} [props.zIndex] - CSS z-index.
|
|
74
|
+
* @param {Object} [props.style] - Additional inline styles for the Box.
|
|
75
|
+
* @param {string} [props.className] - Additional CSS classes to apply to the Box.
|
|
76
|
+
* @param {Function} [props.onClick] - Click handler for the Box.
|
|
77
|
+
*
|
|
78
|
+
* @returns {JSX.Element} A rendered Box component with customized styling.
|
|
79
|
+
*/ var styles = tv({
|
|
32
80
|
base: "Litho-Box",
|
|
33
81
|
variants: {
|
|
34
82
|
background: {
|
|
@@ -155,43 +203,7 @@ var styles = tv({
|
|
|
155
203
|
}
|
|
156
204
|
}
|
|
157
205
|
});
|
|
158
|
-
|
|
159
|
-
* Renders a customizable Box component with various styling options.
|
|
160
|
-
*
|
|
161
|
-
* @component
|
|
162
|
-
* @param {Object} props - Properties to configure the Box component.
|
|
163
|
-
* @param {string} [props.as='div'] - The HTML element to render as. Defaults to `div`.
|
|
164
|
-
* @param {'default' | 'subdued'} [props.background] - Background color variant.
|
|
165
|
-
* @param {'default' | 'subdued'} [props.borderColor] - Border color variant.
|
|
166
|
-
* @param {'default' | 'sm' | 'lg' | 'full'} [props.borderRadius] - Border radius variant.
|
|
167
|
-
* @param {'none' | '0' | '1'} [props.borderBlockStartWidth] - Top border width variant.
|
|
168
|
-
* @param {'none' | '0' | '1'} [props.borderBlockEndWidth] - Bottom border width variant.
|
|
169
|
-
* @param {'none' | '0' | '1'} [props.borderInlineStartWidth] - Left border width variant.
|
|
170
|
-
* @param {'none' | '0' | '1'} [props.borderInlineEndWidth] - Right border width variant.
|
|
171
|
-
* @param {'none' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10'} [props.padding] - Padding for all sides.
|
|
172
|
-
* @param {'none' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10'} [props.paddingBlockStart] - Top padding.
|
|
173
|
-
* @param {'none' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10'} [props.paddingBlockEnd] - Bottom padding.
|
|
174
|
-
* @param {'none' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10'} [props.paddingInlineStart] - Left padding.
|
|
175
|
-
* @param {'none' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10'} [props.paddingInlineEnd] - Right padding.
|
|
176
|
-
* @param {'hidden' | 'scroll'} [props.overflow] - Overflow setting for all sides.
|
|
177
|
-
* @param {'hidden' | 'scroll'} [props.overflowX] - Overflow setting for x-axis.
|
|
178
|
-
* @param {'hidden' | 'scroll'} [props.overflowY] - Overflow setting for y-axis.
|
|
179
|
-
* @param {'relative' | 'absolute' | 'fixed' | 'sticky'} [props.position] - CSS positioning of the box.
|
|
180
|
-
* @param {React.ReactNode} [props.children] - Child elements to render inside the Box.
|
|
181
|
-
* @param {string} [props.id] - ID for the Box element.
|
|
182
|
-
* @param {number | string} [props.height] - CSS height of the Box.
|
|
183
|
-
* @param {number | string} [props.width] - CSS width of the Box.
|
|
184
|
-
* @param {number | string} [props.minHeight] - Minimum CSS height.
|
|
185
|
-
* @param {number | string} [props.maxHeight] - Maximum CSS height.
|
|
186
|
-
* @param {number | string} [props.minWidth] - Minimum CSS width.
|
|
187
|
-
* @param {number | string} [props.maxWidth] - Maximum CSS width.
|
|
188
|
-
* @param {number | string} [props.zIndex] - CSS z-index.
|
|
189
|
-
* @param {Object} [props.style] - Additional inline styles for the Box.
|
|
190
|
-
* @param {string} [props.className] - Additional CSS classes to apply to the Box.
|
|
191
|
-
* @param {Function} [props.onClick] - Click handler for the Box.
|
|
192
|
-
*
|
|
193
|
-
* @returns {JSX.Element} A rendered Box component with customized styling.
|
|
194
|
-
*/ var Box = function() {
|
|
206
|
+
var Box = function() {
|
|
195
207
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
196
208
|
var _props_as = props.as, as = _props_as === void 0 ? 'div' : _props_as, background = props.background, borderColor = props.borderColor, borderBlockStartWidth = props.borderBlockStartWidth, borderBlockEndWidth = props.borderBlockEndWidth, borderInlineStartWidth = props.borderInlineStartWidth, borderInlineEndWidth = props.borderInlineEndWidth, borderRadius = props.borderRadius, children = props.children, id = props.id, height = props.height, width = props.width, minHeight = props.minHeight, maxHeight = props.maxHeight, minWidth = props.minWidth, maxWidth = props.maxWidth, overflow = props.overflow, overflowX = props.overflowX, overflowY = props.overflowY, padding = props.padding, paddingBlockStart = props.paddingBlockStart, paddingBlockEnd = props.paddingBlockEnd, paddingInlineStart = props.paddingInlineStart, paddingInlineEnd = props.paddingInlineEnd, position = props.position, zIndex = props.zIndex, onClick = props.onClick, style = props.style, className = props.className;
|
|
197
209
|
var classes = styles({
|