@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
|
@@ -107,28 +107,23 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
107
107
|
}
|
|
108
108
|
return target;
|
|
109
109
|
}
|
|
110
|
-
var styles = (0, _tailwindvariants.tv)({
|
|
111
|
-
base: "Litho-Image",
|
|
112
|
-
variants: {
|
|
113
|
-
borderRadius: {
|
|
114
|
-
default: "",
|
|
115
|
-
none: "rounded-none",
|
|
116
|
-
xs: "rounded-xs",
|
|
117
|
-
sm: "rounded-sm",
|
|
118
|
-
md: "rounded-md",
|
|
119
|
-
lg: "rounded-lg",
|
|
120
|
-
full: "rounded-full",
|
|
121
|
-
max: "rounded-max"
|
|
122
|
-
},
|
|
123
|
-
rounded: {
|
|
124
|
-
true: "rounded-md"
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
110
|
/**
|
|
129
|
-
*
|
|
111
|
+
* @component Image
|
|
112
|
+
*
|
|
113
|
+
* @description Displays a responsive content image with optional rounded corners, srcset support, and load callbacks.
|
|
114
|
+
*
|
|
115
|
+
* @usage
|
|
116
|
+
* - DO: Use for content images with descriptive `alt` text and optional responsive `sourceSet`.
|
|
117
|
+
* - DON'T: Use for small avatars or product thumbnails; use `Thumbnail` for those cases.
|
|
118
|
+
*
|
|
119
|
+
* @accessibility
|
|
120
|
+
* - Always provide meaningful `alt` text describing the image content; use empty string for purely decorative images.
|
|
121
|
+
* - When using `sourceSet`, ensure all sources serve the same visual content at different resolutions.
|
|
122
|
+
*
|
|
123
|
+
* @alternative
|
|
124
|
+
* - If you need a small, fixed-size preview image, use `Thumbnail` instead.
|
|
125
|
+
* - If you need an icon graphic, use `Icon` with a Polaris icon source instead.
|
|
130
126
|
*
|
|
131
|
-
* @component
|
|
132
127
|
* @param {Object} props - Properties passed to the Image component.
|
|
133
128
|
* @param {string} [props.alt] - Alternative text for the image.
|
|
134
129
|
* @param {Array<{source: string, descriptor: string}>} [props.sourceSet] - Array of image sources and descriptors for responsive images.
|
|
@@ -139,7 +134,7 @@ var styles = (0, _tailwindvariants.tv)({
|
|
|
139
134
|
* @param {string} [props.className] - Additional classes to apply to the image.
|
|
140
135
|
* @param {('default'|'none'|'xs'|'sm'|'md'|'lg'|'full'|'max')} [props.borderRadius='default'] - The border radius variant for the image.
|
|
141
136
|
* @param {Object} [rest] - Any additional props passed to the underlying `<img>` element.
|
|
142
|
-
*
|
|
137
|
+
*
|
|
143
138
|
* @example
|
|
144
139
|
* <Image
|
|
145
140
|
* alt="Sample Image"
|
|
@@ -154,7 +149,25 @@ var styles = (0, _tailwindvariants.tv)({
|
|
|
154
149
|
* />
|
|
155
150
|
*
|
|
156
151
|
* @returns {JSX.Element} A styled image component with optional responsive support.
|
|
157
|
-
*/
|
|
152
|
+
*/ var styles = (0, _tailwindvariants.tv)({
|
|
153
|
+
base: "Litho-Image",
|
|
154
|
+
variants: {
|
|
155
|
+
borderRadius: {
|
|
156
|
+
default: "",
|
|
157
|
+
none: "rounded-none",
|
|
158
|
+
xs: "rounded-xs",
|
|
159
|
+
sm: "rounded-sm",
|
|
160
|
+
md: "rounded-md",
|
|
161
|
+
lg: "rounded-lg",
|
|
162
|
+
full: "rounded-full",
|
|
163
|
+
max: "rounded-max"
|
|
164
|
+
},
|
|
165
|
+
rounded: {
|
|
166
|
+
true: "rounded-md"
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
function Image() {
|
|
158
171
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
159
172
|
var alt = props.alt, sourceSet = props.sourceSet, source = props.source, crossOrigin = props.crossOrigin, onLoad = props.onLoad, rounded = props.rounded, className = props.className, borderRadius = props.borderRadius, rest = _object_without_properties(props, [
|
|
160
173
|
"alt",
|
|
@@ -17,25 +17,34 @@ function _interop_require_default(obj) {
|
|
|
17
17
|
default: obj
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
var styles = (0, _tailwindvariants.tv)({
|
|
21
|
-
base: "Litho-InlineError flex items-start justify-start gap-2"
|
|
22
|
-
});
|
|
23
20
|
/**
|
|
24
|
-
* InlineError
|
|
25
|
-
*
|
|
26
|
-
*
|
|
21
|
+
* @component InlineError
|
|
22
|
+
*
|
|
23
|
+
* @description A small error message component displayed inline below a form field to indicate validation errors.
|
|
24
|
+
*
|
|
25
|
+
* @usage
|
|
26
|
+
* - DO: Display field-level validation errors below or near form inputs.
|
|
27
|
+
* - DON'T: Use for page-level alerts (use Banner).
|
|
28
|
+
*
|
|
29
|
+
* @accessibility
|
|
30
|
+
* - Error text should be associated with the input via `aria-describedby` for screen reader announcement.
|
|
31
|
+
*
|
|
32
|
+
* @alternative
|
|
33
|
+
* - If you need a page-level error message, use `Banner` with status="critical". If you need a tooltip hint, use `Tooltip`.
|
|
27
34
|
*
|
|
28
|
-
* @component
|
|
29
35
|
* @param {Object} props - Component properties.
|
|
30
36
|
* @param {string} props.message - The error message to display.
|
|
31
37
|
* @param {string} props.fieldID - The ID of the field this error is associated with, used to generate an accessible ID for the error element.
|
|
32
38
|
*
|
|
33
39
|
* @returns {JSX.Element} A styled inline error message with an icon.
|
|
34
|
-
*
|
|
40
|
+
*
|
|
35
41
|
* @example
|
|
36
42
|
* <InlineError message="This field is required" fieldID="username" />
|
|
37
|
-
*
|
|
38
|
-
*/
|
|
43
|
+
*
|
|
44
|
+
*/ var styles = (0, _tailwindvariants.tv)({
|
|
45
|
+
base: "Litho-InlineError flex items-start justify-start gap-2"
|
|
46
|
+
});
|
|
47
|
+
function InlineError() {
|
|
39
48
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
40
49
|
var message = props.message, fieldID = props.fieldID, _props_icon = props.icon, icon = _props_icon === void 0 ? _polarisicons.CircleAlertMajor : _props_icon;
|
|
41
50
|
var classes = styles();
|
|
@@ -17,19 +17,20 @@ function _interop_require_default(obj) {
|
|
|
17
17
|
default: obj
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
var styles = (0, _tailwindvariants.tv)({
|
|
21
|
-
base: "Litho-Label flex items-center gap-1 text-highest",
|
|
22
|
-
variants: {
|
|
23
|
-
hidden: {
|
|
24
|
-
true: "sr-only"
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
20
|
/**
|
|
29
|
-
* Label
|
|
21
|
+
* @component Label
|
|
22
|
+
*
|
|
23
|
+
* @description A form label component that renders a styled label element associated with a form input.
|
|
24
|
+
*
|
|
25
|
+
* @usage
|
|
26
|
+
* - DO: Use to label form inputs when building custom form controls.
|
|
27
|
+
* - DON'T: Use for standalone text (use Text).
|
|
30
28
|
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
29
|
+
* @accessibility
|
|
30
|
+
* - Renders a `<label>` element with `htmlFor` association to its input; critical for screen reader input identification.
|
|
31
|
+
*
|
|
32
|
+
* @alternative
|
|
33
|
+
* - If you need standalone text, use `Text`. Most form components (TextField, Select) include labels built-in.
|
|
33
34
|
*
|
|
34
35
|
* @param {Object} props - The properties passed to the component.
|
|
35
36
|
* @param {React.ReactNode} props.children - The content to be displayed within the label.
|
|
@@ -41,7 +42,15 @@ var styles = (0, _tailwindvariants.tv)({
|
|
|
41
42
|
* @param {Object} [props.rest] - Additional props to be spread onto the label element.
|
|
42
43
|
*
|
|
43
44
|
* @returns {JSX.Element} The rendered label component with optional required indicator.
|
|
44
|
-
*/
|
|
45
|
+
*/ var styles = (0, _tailwindvariants.tv)({
|
|
46
|
+
base: "Litho-Label flex items-center gap-1 text-highest",
|
|
47
|
+
variants: {
|
|
48
|
+
hidden: {
|
|
49
|
+
true: "sr-only"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
function Label() {
|
|
45
54
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
46
55
|
var tmp = props.color, _color = tmp === void 0 ? "subdued" : tmp, children = props.children, _props_variant = props.variant, variant = _props_variant === void 0 ? "bodyMd" : _props_variant, _props_fontWeight = props.fontWeight, fontWeight = _props_fontWeight === void 0 ? "normal" : _props_fontWeight, id = props.id, hidden = props.hidden, className = props.className, requiredIndicator = props.requiredIndicator, _props_as = props.as, as = _props_as === void 0 ? "label" : _props_as, disabled = props.disabled, tooltip = props.tooltip;
|
|
47
56
|
var classes = styles({
|
|
@@ -71,7 +71,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
71
71
|
}
|
|
72
72
|
var LayoutContext = /*#__PURE__*/ (0, _react.createContext)();
|
|
73
73
|
var styles = (0, _tailwindvariants.tv)({
|
|
74
|
-
base: "Litho-Layout flex
|
|
74
|
+
base: "Litho-Layout flex w-full max-w-full",
|
|
75
75
|
variants: {
|
|
76
76
|
hasSidebarSection: {
|
|
77
77
|
true: ""
|
|
@@ -79,18 +79,36 @@ var styles = (0, _tailwindvariants.tv)({
|
|
|
79
79
|
reverseOnMobile: {
|
|
80
80
|
true: "flex-col-reverse @lg:flex-row",
|
|
81
81
|
false: "flex-col"
|
|
82
|
+
},
|
|
83
|
+
scrollSectionsIndependently: {
|
|
84
|
+
true: "pl-4 @lg:pl-5",
|
|
85
|
+
false: ""
|
|
82
86
|
}
|
|
83
87
|
},
|
|
84
88
|
compoundVariants: [
|
|
85
89
|
{
|
|
86
90
|
hasSidebarSection: true,
|
|
87
91
|
embedded: false,
|
|
88
|
-
|
|
92
|
+
scrollSectionsIndependently: false,
|
|
93
|
+
className: "gap-4 @lg:flex-row @lg:gap-5"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
hasSidebarSection: true,
|
|
97
|
+
embedded: true,
|
|
98
|
+
scrollSectionsIndependently: false,
|
|
99
|
+
className: "gap-4 @lg-embed:flex-row @lg-embed:items-start @lg-embed:gap-5"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
hasSidebarSection: true,
|
|
103
|
+
embedded: false,
|
|
104
|
+
scrollSectionsIndependently: true,
|
|
105
|
+
className: "@lg:flex-row"
|
|
89
106
|
},
|
|
90
107
|
{
|
|
91
108
|
hasSidebarSection: true,
|
|
92
109
|
embedded: true,
|
|
93
|
-
|
|
110
|
+
scrollSectionsIndependently: true,
|
|
111
|
+
className: "@lg-embed:flex-row @lg-embed:items-start"
|
|
94
112
|
},
|
|
95
113
|
{
|
|
96
114
|
reverseOnMobile: true,
|
|
@@ -101,24 +119,14 @@ var styles = (0, _tailwindvariants.tv)({
|
|
|
101
119
|
defaultVariants: {
|
|
102
120
|
hasSidebarSection: false,
|
|
103
121
|
embedded: false,
|
|
104
|
-
reverseOnMobile: false
|
|
122
|
+
reverseOnMobile: false,
|
|
123
|
+
scrollSectionsIndependently: false
|
|
105
124
|
}
|
|
106
125
|
});
|
|
107
|
-
|
|
108
|
-
* Layout component for structuring content.
|
|
109
|
-
*
|
|
110
|
-
* The `Layout` component organizes its children into a flexible and responsive layout.
|
|
111
|
-
* If no `Layout.Section` or `Layout.AnnotatedSection` children are found, it wraps the
|
|
112
|
-
* children inside a default `Layout.Section`.
|
|
113
|
-
*
|
|
114
|
-
* @param {Object} props - Component props.
|
|
115
|
-
* @param {React.ReactNode} props.children - The content to render inside the layout.
|
|
116
|
-
* @param {boolean} [props.reverseOnMobile] - If true, reverses the flex direction on mobile devices.
|
|
117
|
-
* @returns {JSX.Element} The rendered layout component.
|
|
118
|
-
*/ function Layout() {
|
|
126
|
+
function Layout() {
|
|
119
127
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
120
128
|
var embedded = (0, _Frame.useFrame)().embedded;
|
|
121
|
-
var children = props.children, reverseOnMobile = props.reverseOnMobile;
|
|
129
|
+
var children = props.children, reverseOnMobile = props.reverseOnMobile, _props_scrollSectionsIndependently = props.scrollSectionsIndependently, scrollSectionsIndependently = _props_scrollSectionsIndependently === void 0 ? false : _props_scrollSectionsIndependently;
|
|
122
130
|
var analyzeChildren = function(children) {
|
|
123
131
|
var depth = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
124
132
|
if (depth > 3) return {
|
|
@@ -165,17 +173,19 @@ var styles = (0, _tailwindvariants.tv)({
|
|
|
165
173
|
var classes = styles({
|
|
166
174
|
hasSidebarSection: hasSidebarSection,
|
|
167
175
|
embedded: embedded,
|
|
168
|
-
reverseOnMobile: reverseOnMobile
|
|
176
|
+
reverseOnMobile: reverseOnMobile,
|
|
177
|
+
scrollSectionsIndependently: scrollSectionsIndependently
|
|
169
178
|
});
|
|
170
179
|
var wrappedChildren = hasSection ? children : /*#__PURE__*/ (0, _jsxruntime.jsx)(Layout.Section, {
|
|
171
180
|
children: children
|
|
172
181
|
});
|
|
173
182
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(LayoutContext.Provider, {
|
|
174
183
|
value: {
|
|
175
|
-
parentHasSidebar: parentHasSidebar
|
|
184
|
+
parentHasSidebar: parentHasSidebar,
|
|
185
|
+
scrollSectionsIndependently: scrollSectionsIndependently
|
|
176
186
|
},
|
|
177
187
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
178
|
-
className: classes,
|
|
188
|
+
className: "".concat(classes).concat(scrollSectionsIndependently ? " Litho-Layout--scrollSectionsIndependently".concat(embedded ? " @lg-embed:max-h-[calc(100vh-var(--litho-top-bar-height))]" : " @lg:max-h-[calc(100vh-var(--litho-top-bar-height))]") : ""),
|
|
179
189
|
children: wrappedChildren
|
|
180
190
|
})
|
|
181
191
|
});
|
|
@@ -193,11 +203,10 @@ var annotatedSectionStyles = (0, _tailwindvariants.tv)({
|
|
|
193
203
|
}
|
|
194
204
|
});
|
|
195
205
|
/**
|
|
196
|
-
*
|
|
206
|
+
* @component Layout.AnnotatedSection
|
|
197
207
|
*
|
|
198
|
-
*
|
|
199
|
-
* -
|
|
200
|
-
* - Content: Displays the main content provided as children.
|
|
208
|
+
* @usage
|
|
209
|
+
* - DO: Use for settings pages where each section has a title and description alongside form content.
|
|
201
210
|
*
|
|
202
211
|
* @param {Object} props - Component props.
|
|
203
212
|
* @param {React.ReactNode} props.children - The main content of the section.
|
|
@@ -55,7 +55,30 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
55
55
|
}
|
|
56
56
|
return newObj;
|
|
57
57
|
}
|
|
58
|
-
|
|
58
|
+
/**
|
|
59
|
+
* @component Layout.Section
|
|
60
|
+
*
|
|
61
|
+
* @description A direct child of Layout that defines a content column, supporting primary, secondary, and full-width configurations.
|
|
62
|
+
*
|
|
63
|
+
* @usage
|
|
64
|
+
* - DO: Use as a direct child of `Layout` to define content regions.
|
|
65
|
+
* - DON'T: Use outside of a `Layout` parent.
|
|
66
|
+
*
|
|
67
|
+
* @accessibility
|
|
68
|
+
* - LayoutSection renders a semantic section; content structure is preserved for assistive technology.
|
|
69
|
+
*
|
|
70
|
+
* @alternative
|
|
71
|
+
* - If you need a standalone content section, use `Card` or `Box` instead.
|
|
72
|
+
*
|
|
73
|
+
* @param {Object} props - Component props.
|
|
74
|
+
* @param {React.ReactNode} props.children - The content to render inside the section.
|
|
75
|
+
* @param {boolean|"slim"} [props.sidebar=false] - Configures the section layout:
|
|
76
|
+
* - `true`: Makes it a sidebar with a 1/3 basis.
|
|
77
|
+
* - `"slim"`: Makes it a slim sidebar with a max width of 320px.
|
|
78
|
+
* - `false`: Allows it to grow.
|
|
79
|
+
* @params {boolean|integer} props.sticky - Specify whether the section becomes sticky or not
|
|
80
|
+
* @returns {JSX.Element} The rendered section component.
|
|
81
|
+
*/ var sectionStyles = (0, _tailwindvariants.tv)({
|
|
59
82
|
base: "Litho-Layout__Section",
|
|
60
83
|
variants: {
|
|
61
84
|
sidebar: {
|
|
@@ -65,58 +88,97 @@ var sectionStyles = (0, _tailwindvariants.tv)({
|
|
|
65
88
|
sibling: {
|
|
66
89
|
none: "w-full",
|
|
67
90
|
sidebar: "flex-1 basis-0 min-w-0"
|
|
91
|
+
},
|
|
92
|
+
scrollSectionsIndependently: {
|
|
93
|
+
true: "pt-4 pr-4 @lg:pr-5 @lg:pb-5",
|
|
94
|
+
false: ""
|
|
68
95
|
}
|
|
69
96
|
},
|
|
70
97
|
compoundVariants: [
|
|
98
|
+
{
|
|
99
|
+
scrollSectionsIndependently: true,
|
|
100
|
+
embedded: true,
|
|
101
|
+
className: "@lg-embed:overflow-y-auto pl-px"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
scrollSectionsIndependently: true,
|
|
105
|
+
embedded: false,
|
|
106
|
+
className: "@lg:overflow-y-auto pl-px"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
scrollSectionsIndependently: true,
|
|
110
|
+
sidebar: [
|
|
111
|
+
true,
|
|
112
|
+
"slim"
|
|
113
|
+
],
|
|
114
|
+
className: "ml-4"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
sidebar: true,
|
|
118
|
+
embedded: true,
|
|
119
|
+
scrollSectionsIndependently: false,
|
|
120
|
+
className: "@lg-embed:w-1/3 @lg-embed:max-w-120"
|
|
121
|
+
},
|
|
71
122
|
{
|
|
72
123
|
sidebar: true,
|
|
124
|
+
embedded: false,
|
|
125
|
+
scrollSectionsIndependently: false,
|
|
126
|
+
className: "@lg:w-1/3 @lg:max-w-80 @xl:max-w-120"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
sidebar: "slim",
|
|
73
130
|
embedded: true,
|
|
74
|
-
|
|
131
|
+
scrollSectionsIndependently: false,
|
|
132
|
+
className: "@lg-embed:w-1/3 @lg-embed:max-w-80"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
sidebar: "slim",
|
|
136
|
+
embedded: false,
|
|
137
|
+
scrollSectionsIndependently: false,
|
|
138
|
+
className: "@lg:w-1/3 @lg:max-w-80"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
sidebar: true,
|
|
142
|
+
embedded: true,
|
|
143
|
+
scrollSectionsIndependently: true,
|
|
144
|
+
className: "@lg-embed:w-1/3 @lg-embed:max-w-85 @xl-embed:max-w-125"
|
|
75
145
|
},
|
|
76
146
|
{
|
|
77
147
|
sidebar: true,
|
|
78
148
|
embedded: false,
|
|
79
|
-
|
|
149
|
+
scrollSectionsIndependently: true,
|
|
150
|
+
className: "@lg:w-1/3 @lg:max-w-85 @xl:max-w-125"
|
|
80
151
|
},
|
|
81
152
|
{
|
|
82
153
|
sidebar: "slim",
|
|
83
154
|
embedded: true,
|
|
84
|
-
|
|
155
|
+
scrollSectionsIndependently: true,
|
|
156
|
+
className: "@lg-embed:w-1/3 @lg-embed:max-w-85"
|
|
85
157
|
},
|
|
86
158
|
{
|
|
87
159
|
sidebar: "slim",
|
|
88
160
|
embedded: false,
|
|
89
|
-
|
|
161
|
+
scrollSectionsIndependently: true,
|
|
162
|
+
className: "@lg:w-1/3 @lg:max-w-85"
|
|
90
163
|
}
|
|
91
164
|
],
|
|
92
165
|
defaultVariants: {
|
|
93
166
|
sidebar: false,
|
|
94
|
-
embedded: false
|
|
167
|
+
embedded: false,
|
|
168
|
+
scrollSectionsIndependently: false
|
|
95
169
|
}
|
|
96
170
|
});
|
|
97
|
-
|
|
98
|
-
* Section component for flexible content grouping.
|
|
99
|
-
*
|
|
100
|
-
* The `Section` allows for configuring its layout, supporting sidebar and slim variants.
|
|
101
|
-
*
|
|
102
|
-
* @param {Object} props - Component props.
|
|
103
|
-
* @param {React.ReactNode} props.children - The content to render inside the section.
|
|
104
|
-
* @param {boolean|"slim"} [props.sidebar=false] - Configures the section layout:
|
|
105
|
-
* - `true`: Makes it a sidebar with a 1/3 basis.
|
|
106
|
-
* - `"slim"`: Makes it a slim sidebar with a max width of 320px.
|
|
107
|
-
* - `false`: Allows it to grow.
|
|
108
|
-
* @params {boolean|integer} props.sticky - Specify whether the section becomes sticky or not
|
|
109
|
-
* @returns {JSX.Element} The rendered section component.
|
|
110
|
-
*/ function Section() {
|
|
171
|
+
function Section() {
|
|
111
172
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
112
173
|
var children = props.children, _props_sidebar = props.sidebar, sidebar = _props_sidebar === void 0 ? false : _props_sidebar, className = props.className, sticky = props.sticky;
|
|
113
174
|
var embedded = (0, _Frame.useFrame)().embedded;
|
|
114
|
-
var
|
|
175
|
+
var _useContext = (0, _react.useContext)(_Layout.LayoutContext), parentHasSidebar = _useContext.parentHasSidebar, scrollSectionsIndependently = _useContext.scrollSectionsIndependently;
|
|
115
176
|
var sectionClasses = sectionStyles({
|
|
116
177
|
sidebar: sidebar,
|
|
117
178
|
sticky: sticky,
|
|
118
179
|
sibling: sidebar ? undefined : parentHasSidebar ? "sidebar" : "none",
|
|
119
|
-
embedded: embedded
|
|
180
|
+
embedded: embedded,
|
|
181
|
+
scrollSectionsIndependently: scrollSectionsIndependently
|
|
120
182
|
});
|
|
121
183
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
122
184
|
className: "".concat(sectionClasses).concat(className ? " ".concat(className) : ""),
|
|
@@ -16,7 +16,40 @@ function _interop_require_default(obj) {
|
|
|
16
16
|
default: obj
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
/**
|
|
20
|
+
* @component Link
|
|
21
|
+
*
|
|
22
|
+
* @description An inline navigation element that renders as an anchor tag for linking to internal or external URLs.
|
|
23
|
+
*
|
|
24
|
+
* @usage
|
|
25
|
+
* - DO: Use for inline text navigation to other pages or external URLs.
|
|
26
|
+
* - DON'T: Use for actions that don't navigate (use Button).
|
|
27
|
+
*
|
|
28
|
+
* @accessibility
|
|
29
|
+
* - Renders as `<a>` tag; ensure link text is descriptive. External links should indicate they open in a new tab.
|
|
30
|
+
*
|
|
31
|
+
* @alternative
|
|
32
|
+
* - If you need to trigger an action (not navigation), use `Button` with `link` variant.
|
|
33
|
+
* - If you need a button styled as a link, use `Button` with `plain` prop.
|
|
34
|
+
*
|
|
35
|
+
* @param {Object} props - Props for the Link component.
|
|
36
|
+
* @param {string} props.url - The URL the link points to.
|
|
37
|
+
* @param {React.ReactNode} props.children - Content to display within the link.
|
|
38
|
+
* @param {Function} [props.onClick] - Optional click event handler for the link.
|
|
39
|
+
* @param {boolean} [props.external=false] - If true, opens the link in a new tab.
|
|
40
|
+
* @param {boolean} [props.insight=false] - If true, set the color and iconColor to insight
|
|
41
|
+
* @param {string} [props.target] - Optional target attribute for specifying where to open the link.
|
|
42
|
+
* @param {string} [props.id] - Optional id attribute for the link.
|
|
43
|
+
* @param {boolean} [props.monochrome=false] - If true, applies monochrome color scheme.
|
|
44
|
+
* @param {boolean} [props.removeUnderline=false] - If true, removes underline from the link.
|
|
45
|
+
* @param {string} [props.accessibilityLabel] - Optional aria-label for accessibility.
|
|
46
|
+
* @param {string} [props.dataPrimaryLink] - Optional data attribute for custom tracking.
|
|
47
|
+
* @param {Function} [props.onMouseEnter] - Optional mouse enter event handler for the link.
|
|
48
|
+
* @param {Function} [props.onMouseLeave] - Optional mouse leave event handler for the link.
|
|
49
|
+
* @param {React.ReactNode} [props.icon] - Optional icon to display within the link.
|
|
50
|
+
*
|
|
51
|
+
* @returns {JSX.Element} Rendered link element.
|
|
52
|
+
*/ var styles = (0, _tailwindvariants.tv)({
|
|
20
53
|
base: "Litho-Link cursor-pointer hover:underline",
|
|
21
54
|
variants: {
|
|
22
55
|
monochrome: {
|
|
@@ -103,27 +136,7 @@ var styles = (0, _tailwindvariants.tv)({
|
|
|
103
136
|
color: "link"
|
|
104
137
|
}
|
|
105
138
|
});
|
|
106
|
-
|
|
107
|
-
* Renders an accessible link with customizable styling based on variants.
|
|
108
|
-
*
|
|
109
|
-
* @param {Object} props - Props for the Link component.
|
|
110
|
-
* @param {string} props.url - The URL the link points to.
|
|
111
|
-
* @param {React.ReactNode} props.children - Content to display within the link.
|
|
112
|
-
* @param {Function} [props.onClick] - Optional click event handler for the link.
|
|
113
|
-
* @param {boolean} [props.external=false] - If true, opens the link in a new tab.
|
|
114
|
-
* @param {boolean} [props.insight=false] - If true, set the color and iconColor to insight
|
|
115
|
-
* @param {string} [props.target] - Optional target attribute for specifying where to open the link.
|
|
116
|
-
* @param {string} [props.id] - Optional id attribute for the link.
|
|
117
|
-
* @param {boolean} [props.monochrome=false] - If true, applies monochrome color scheme.
|
|
118
|
-
* @param {boolean} [props.removeUnderline=false] - If true, removes underline from the link.
|
|
119
|
-
* @param {string} [props.accessibilityLabel] - Optional aria-label for accessibility.
|
|
120
|
-
* @param {string} [props.dataPrimaryLink] - Optional data attribute for custom tracking.
|
|
121
|
-
* @param {Function} [props.onMouseEnter] - Optional mouse enter event handler for the link.
|
|
122
|
-
* @param {Function} [props.onMouseLeave] - Optional mouse leave event handler for the link.
|
|
123
|
-
* @param {React.ReactNode} [props.icon] - Optional icon to display within the link.
|
|
124
|
-
*
|
|
125
|
-
* @returns {JSX.Element} Rendered link element.
|
|
126
|
-
*/ function Link() {
|
|
139
|
+
function Link() {
|
|
127
140
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
128
141
|
var url = props.url, children = props.children, onClick = props.onClick, external = props.external, target = props.target, _props_bold = props.bold, bold = _props_bold === void 0 ? false : _props_bold, _props_disabled = props.disabled, disabled = _props_disabled === void 0 ? false : _props_disabled, _props_insight = props.insight, insight = _props_insight === void 0 ? false : _props_insight, id = props.id, monochrome = props.monochrome, removeUnderline = props.removeUnderline, accessibilityLabel = props.accessibilityLabel, dataPrimaryLink = props.dataPrimaryLink, _color = props.color, className = props.className, onMouseEnter = props.onMouseEnter, onMouseLeave = props.onMouseLeave, icon = props.icon, _iconColor = props.iconColor, _props_iconSize = props.iconSize, iconSize = _props_iconSize === void 0 ? "sm" : _props_iconSize;
|
|
129
142
|
var hasIcon = icon !== undefined;
|
|
@@ -10,7 +10,29 @@ Object.defineProperty(exports, "default", {
|
|
|
10
10
|
});
|
|
11
11
|
var _jsxruntime = require("react/jsx-runtime");
|
|
12
12
|
var _tailwindvariants = require("tailwind-variants");
|
|
13
|
-
|
|
13
|
+
/**
|
|
14
|
+
* @component List
|
|
15
|
+
*
|
|
16
|
+
* @description A semantic list component that renders ordered or unordered lists with consistent spacing and bullet/number styling.
|
|
17
|
+
*
|
|
18
|
+
* @usage
|
|
19
|
+
* - DO: Display structured text content as bulleted or numbered lists.
|
|
20
|
+
* - DON'T: Use for interactive item lists (use ResourceList).
|
|
21
|
+
*
|
|
22
|
+
* @accessibility
|
|
23
|
+
* - Renders semantic `<ul>` or `<ol>` elements; screen readers announce list structure and item count.
|
|
24
|
+
*
|
|
25
|
+
* @alternative
|
|
26
|
+
* - If you need interactive items with actions, use `ResourceList`.
|
|
27
|
+
* - If you need a data table, use `Table`.
|
|
28
|
+
*
|
|
29
|
+
* @param {Object} props - Component props.
|
|
30
|
+
* @param {React.ReactNode} props.children - The list items to render inside the list.
|
|
31
|
+
* @param {'normal' | 'loose' | 'tight'} [props.spacing='normal'] - Controls vertical spacing between list items.
|
|
32
|
+
* @param {'bullet' | 'number'} [props.type='bullet'] - Determines list type: bullet (unordered) or number (ordered).
|
|
33
|
+
* @param {string} [props.className] - Additional class names to apply to the list container.
|
|
34
|
+
* @returns {JSX.Element} The rendered List component.
|
|
35
|
+
*/ var styles = (0, _tailwindvariants.tv)({
|
|
14
36
|
base: "Litho-List list-outside ml-5",
|
|
15
37
|
variants: {
|
|
16
38
|
type: {
|
|
@@ -25,16 +47,7 @@ var styles = (0, _tailwindvariants.tv)({
|
|
|
25
47
|
}
|
|
26
48
|
}
|
|
27
49
|
});
|
|
28
|
-
|
|
29
|
-
* List component for rendering unordered or ordered lists.
|
|
30
|
-
*
|
|
31
|
-
* @param {Object} props - Component props.
|
|
32
|
-
* @param {React.ReactNode} props.children - The list items to render inside the list.
|
|
33
|
-
* @param {'normal' | 'loose' | 'tight'} [props.spacing='normal'] - Controls vertical spacing between list items.
|
|
34
|
-
* @param {'bullet' | 'number'} [props.type='bullet'] - Determines list type: bullet (unordered) or number (ordered).
|
|
35
|
-
* @param {string} [props.className] - Additional class names to apply to the list container.
|
|
36
|
-
* @returns {JSX.Element} The rendered List component.
|
|
37
|
-
*/ function List() {
|
|
50
|
+
function List() {
|
|
38
51
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
39
52
|
var children = props.children, _props_spacing = props.spacing, spacing = _props_spacing === void 0 ? 'normal' : _props_spacing, _props_type = props.type, type = _props_type === void 0 ? 'bullet' : _props_type, className = props.className;
|
|
40
53
|
var classes = styles({
|
|
@@ -51,7 +64,10 @@ var itemStyles = (0, _tailwindvariants.tv)({
|
|
|
51
64
|
base: "Litho-ListItem text-left leading-4"
|
|
52
65
|
});
|
|
53
66
|
/**
|
|
54
|
-
*
|
|
67
|
+
* @component List.Item
|
|
68
|
+
*
|
|
69
|
+
* @usage
|
|
70
|
+
* - DO: Use as direct children of List for each list entry.
|
|
55
71
|
*
|
|
56
72
|
* @param {Object} props - Component props.
|
|
57
73
|
* @param {React.ReactNode} props.children - The content of the list item.
|