@heymantle/litho 0.0.3 → 0.0.5
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/dist/cjs/components/ActionList.js +50 -16
- package/dist/cjs/components/AnnouncementBar.js +10 -3
- package/dist/cjs/components/AppProvider.js +10 -1
- package/dist/cjs/components/Autocomplete.js +55 -22
- package/dist/cjs/components/Badge.js +2 -1
- package/dist/cjs/components/Banner.js +35 -31
- package/dist/cjs/components/Box.js +5 -3
- package/dist/cjs/components/Button.js +78 -18
- package/dist/cjs/components/Card.js +6 -45
- package/dist/cjs/components/Checkbox.js +16 -6
- package/dist/cjs/components/ChoiceList.js +7 -4
- package/dist/cjs/components/ColorField.js +10 -5
- package/dist/cjs/components/DatePicker.js +13 -8
- package/dist/cjs/components/DropZone.js +33 -18
- package/dist/cjs/components/EmptyState.js +17 -9
- package/dist/cjs/components/Filters.js +36 -23
- package/dist/cjs/components/FooterHelp.js +7 -2
- package/dist/cjs/components/Form.js +18 -3
- package/dist/cjs/components/Frame.js +48 -23
- package/dist/cjs/components/FrameSaveBar.js +21 -12
- package/dist/cjs/components/HorizontalStack.js +9 -2
- package/dist/cjs/components/Icon.js +1 -0
- package/dist/cjs/components/Layout.js +3 -3
- package/dist/cjs/components/LayoutSection.js +2 -2
- package/dist/cjs/components/Link.js +6 -2
- package/dist/cjs/components/List.js +4 -3
- package/dist/cjs/components/Listbox.js +9 -4
- package/dist/cjs/components/Modal.js +26 -17
- package/dist/cjs/components/Navigation.js +30 -20
- package/dist/cjs/components/Page.js +8 -3
- package/dist/cjs/components/Pagination.js +11 -4
- package/dist/cjs/components/Pane.js +168 -41
- package/dist/cjs/components/Popover.js +59 -6
- package/dist/cjs/components/RangeSlider.js +11 -4
- package/dist/cjs/components/ResourceList.js +9 -3
- package/dist/cjs/components/Select.js +2 -0
- package/dist/cjs/components/Stack.js +223 -0
- package/dist/cjs/components/Table.js +33 -20
- package/dist/cjs/components/Tabs.js +41 -11
- package/dist/cjs/components/Text.js +8 -5
- package/dist/cjs/components/TextField.js +23 -13
- package/dist/cjs/components/Thumbnail.js +7 -2
- package/dist/cjs/components/TimePicker.js +7 -2
- package/dist/cjs/components/Tip.js +10 -4
- package/dist/cjs/components/Tooltip.js +16 -8
- package/dist/cjs/components/TopBar.js +17 -9
- package/dist/cjs/components/VerticalStack.js +8 -2
- package/dist/cjs/dev/verify-publish.js +37 -4
- package/dist/cjs/index.js +4 -0
- package/dist/cjs/postcss.config.js +21 -0
- package/dist/cjs/stories/ActionList.stories.js +365 -0
- package/dist/cjs/stories/AnnouncementBar.stories.js +244 -0
- package/dist/cjs/stories/Autocomplete.stories.js +874 -0
- package/dist/cjs/stories/Badge.stories.js +183 -0
- package/dist/cjs/stories/Banner.stories.js +201 -0
- package/dist/cjs/stories/Box.stories.js +601 -0
- package/dist/cjs/stories/Button.stories.js +325 -0
- package/dist/cjs/stories/ButtonGroup.stories.js +404 -0
- package/dist/cjs/stories/Card.stories.js +278 -0
- package/dist/cjs/stories/Checkbox.stories.js +266 -0
- package/dist/cjs/stories/ChoiceList.stories.js +885 -0
- package/dist/cjs/stories/Collapsible.stories.js +917 -0
- package/dist/cjs/stories/ColorField.stories.js +887 -0
- package/dist/cjs/stories/ContextualSaveBar.stories.js +971 -0
- package/dist/cjs/stories/DatePicker.stories.js +584 -0
- package/dist/cjs/stories/Divider.stories.js +766 -0
- package/dist/cjs/stories/DropZone.stories.js +1210 -0
- package/dist/cjs/stories/EmptyState.stories.js +296 -0
- package/dist/cjs/stories/Filters.stories.js +1355 -0
- package/dist/cjs/stories/FooterHelp.stories.js +874 -0
- package/dist/cjs/stories/Form.stories.js +943 -0
- package/dist/cjs/stories/Grid.stories.js +1199 -0
- package/dist/cjs/stories/HorizontalStack.stories.js +1064 -0
- package/dist/cjs/stories/Icon.stories.js +599 -0
- package/dist/cjs/stories/Image.stories.js +883 -0
- package/dist/cjs/stories/InlineError.stories.js +711 -0
- package/dist/cjs/stories/Label.stories.js +665 -0
- package/dist/cjs/stories/Layout.stories.js +687 -0
- package/dist/cjs/stories/LayoutSection.stories.js +1275 -0
- package/dist/cjs/stories/Link.stories.js +425 -0
- package/dist/cjs/stories/List.stories.js +1048 -0
- package/dist/cjs/stories/Listbox.stories.js +824 -0
- package/dist/cjs/stories/Loading.stories.js +909 -0
- package/dist/cjs/stories/Modal.stories.js +363 -0
- package/dist/cjs/stories/Navigation.stories.js +605 -0
- package/dist/cjs/stories/Page.stories.js +327 -0
- package/dist/cjs/stories/Pagination.stories.js +438 -0
- package/dist/cjs/stories/Pane.stories.js +1550 -0
- package/dist/cjs/stories/Popover.stories.js +641 -0
- package/dist/cjs/stories/PopoverManager.stories.js +1233 -0
- package/dist/cjs/stories/ProgressBar.stories.js +513 -0
- package/dist/cjs/stories/RadioButton.stories.js +642 -0
- package/dist/cjs/stories/RadioButtonCard.stories.js +816 -0
- package/dist/cjs/stories/RangeSlider.stories.js +896 -0
- package/dist/cjs/stories/ResourceList.stories.js +1076 -0
- package/dist/cjs/stories/Select.stories.js +413 -0
- package/dist/cjs/stories/SkeletonText.stories.js +777 -0
- package/dist/cjs/stories/Spinner.stories.js +403 -0
- package/dist/cjs/stories/Stack.stories.js +1397 -0
- package/dist/cjs/stories/Table.stories.js +628 -0
- package/dist/cjs/stories/Tabs.stories.js +722 -0
- package/dist/cjs/stories/Tag.stories.js +628 -0
- package/dist/cjs/stories/Text.stories.js +262 -0
- package/dist/cjs/stories/TextField.stories.js +377 -0
- package/dist/cjs/stories/Thumbnail.stories.js +863 -0
- package/dist/cjs/stories/TimePicker.stories.js +967 -0
- package/dist/cjs/stories/Tip.stories.js +753 -0
- package/dist/cjs/stories/Tooltip.stories.js +357 -0
- package/dist/cjs/stories/TopBar.stories.js +157 -0
- package/dist/cjs/stories/VerticalStack.stories.js +1287 -0
- package/dist/cjs/tailwind.config.js +17 -0
- package/dist/cjs/utilities/transformers.js +66 -0
- package/dist/cjs/vite.config.js +35 -0
- package/dist/esm/components/ActionList.js +41 -12
- package/dist/esm/components/AnnouncementBar.js +3 -1
- package/dist/esm/components/AppProvider.js +10 -1
- package/dist/esm/components/Autocomplete.js +44 -16
- package/dist/esm/components/Badge.js +2 -2
- package/dist/esm/components/Banner.js +20 -21
- package/dist/esm/components/Box.js +5 -4
- package/dist/esm/components/Button.js +68 -13
- package/dist/esm/components/Card.js +6 -4
- package/dist/esm/components/Checkbox.js +6 -1
- package/dist/esm/components/ChoiceList.js +7 -4
- package/dist/esm/components/ColorField.js +3 -3
- package/dist/esm/components/DatePicker.js +6 -1
- package/dist/esm/components/DropZone.js +14 -4
- package/dist/esm/components/EmptyState.js +6 -3
- package/dist/esm/components/Filters.js +14 -6
- package/dist/esm/components/FooterHelp.js +1 -1
- package/dist/esm/components/Form.js +18 -3
- package/dist/esm/components/Frame.js +27 -15
- package/dist/esm/components/FrameSaveBar.js +10 -6
- package/dist/esm/components/HorizontalStack.js +9 -2
- package/dist/esm/components/Icon.js +1 -0
- package/dist/esm/components/InlineError.js +1 -1
- package/dist/esm/components/Layout.js +4 -4
- package/dist/esm/components/LayoutSection.js +2 -2
- package/dist/esm/components/Link.js +6 -2
- package/dist/esm/components/List.js +4 -3
- package/dist/esm/components/Listbox.js +4 -4
- package/dist/esm/components/Modal.js +8 -4
- package/dist/esm/components/Navigation.js +16 -11
- package/dist/esm/components/Page.js +9 -4
- package/dist/esm/components/Pagination.js +3 -1
- package/dist/esm/components/Pane.js +165 -43
- package/dist/esm/components/Popover.js +18 -6
- package/dist/esm/components/RangeSlider.js +3 -1
- package/dist/esm/components/ResourceList.js +2 -1
- package/dist/esm/components/Select.js +2 -0
- package/dist/esm/components/Stack.js +213 -0
- package/dist/esm/components/Table.js +17 -4
- package/dist/esm/components/Tabs.js +41 -11
- package/dist/esm/components/Text.js +8 -6
- package/dist/esm/components/TextField.js +6 -1
- package/dist/esm/components/Thumbnail.js +1 -1
- package/dist/esm/components/TimePicker.js +1 -1
- package/dist/esm/components/Tip.js +3 -2
- package/dist/esm/components/Tooltip.js +4 -1
- package/dist/esm/components/TopBar.js +7 -4
- package/dist/esm/components/VerticalStack.js +8 -2
- package/dist/esm/dev/verify-publish.js +37 -4
- package/dist/esm/index.js +1 -0
- package/dist/esm/postcss.config.js +6 -0
- package/dist/esm/stories/ActionList.stories.js +327 -0
- package/dist/esm/stories/AnnouncementBar.stories.js +212 -0
- package/dist/esm/stories/Autocomplete.stories.js +836 -0
- package/dist/esm/stories/Badge.stories.js +138 -0
- package/dist/esm/stories/Banner.stories.js +159 -0
- package/dist/esm/stories/Box.stories.js +560 -0
- package/dist/esm/stories/Button.stories.js +277 -0
- package/dist/esm/stories/ButtonGroup.stories.js +357 -0
- package/dist/esm/stories/Card.stories.js +240 -0
- package/dist/esm/stories/Checkbox.stories.js +219 -0
- package/dist/esm/stories/ChoiceList.stories.js +835 -0
- package/dist/esm/stories/Collapsible.stories.js +879 -0
- package/dist/esm/stories/ColorField.stories.js +846 -0
- package/dist/esm/stories/ContextualSaveBar.stories.js +939 -0
- package/dist/esm/stories/DatePicker.stories.js +537 -0
- package/dist/esm/stories/Divider.stories.js +722 -0
- package/dist/esm/stories/DropZone.stories.js +1166 -0
- package/dist/esm/stories/EmptyState.stories.js +246 -0
- package/dist/esm/stories/Filters.stories.js +1317 -0
- package/dist/esm/stories/FooterHelp.stories.js +818 -0
- package/dist/esm/stories/Form.stories.js +908 -0
- package/dist/esm/stories/Grid.stories.js +1152 -0
- package/dist/esm/stories/HorizontalStack.stories.js +1011 -0
- package/dist/esm/stories/Icon.stories.js +558 -0
- package/dist/esm/stories/Image.stories.js +836 -0
- package/dist/esm/stories/InlineError.stories.js +667 -0
- package/dist/esm/stories/Label.stories.js +612 -0
- package/dist/esm/stories/Layout.stories.js +649 -0
- package/dist/esm/stories/LayoutSection.stories.js +1234 -0
- package/dist/esm/stories/Link.stories.js +381 -0
- package/dist/esm/stories/List.stories.js +992 -0
- package/dist/esm/stories/Listbox.stories.js +780 -0
- package/dist/esm/stories/Loading.stories.js +859 -0
- package/dist/esm/stories/Modal.stories.js +322 -0
- package/dist/esm/stories/Navigation.stories.js +567 -0
- package/dist/esm/stories/Page.stories.js +280 -0
- package/dist/esm/stories/Pagination.stories.js +394 -0
- package/dist/esm/stories/Pane.stories.js +1512 -0
- package/dist/esm/stories/Popover.stories.js +609 -0
- package/dist/esm/stories/PopoverManager.stories.js +1201 -0
- package/dist/esm/stories/ProgressBar.stories.js +472 -0
- package/dist/esm/stories/RadioButton.stories.js +598 -0
- package/dist/esm/stories/RadioButtonCard.stories.js +772 -0
- package/dist/esm/stories/RangeSlider.stories.js +849 -0
- package/dist/esm/stories/ResourceList.stories.js +1038 -0
- package/dist/esm/stories/Select.stories.js +363 -0
- package/dist/esm/stories/SkeletonText.stories.js +718 -0
- package/dist/esm/stories/Spinner.stories.js +362 -0
- package/dist/esm/stories/Stack.stories.js +1338 -0
- package/dist/esm/stories/Table.stories.js +584 -0
- package/dist/esm/stories/Tabs.stories.js +684 -0
- package/dist/esm/stories/Tag.stories.js +581 -0
- package/dist/esm/stories/Text.stories.js +217 -0
- package/dist/esm/stories/TextField.stories.js +332 -0
- package/dist/esm/stories/Thumbnail.stories.js +810 -0
- package/dist/esm/stories/TimePicker.stories.js +911 -0
- package/dist/esm/stories/Tip.stories.js +706 -0
- package/dist/esm/stories/Tooltip.stories.js +313 -0
- package/dist/esm/stories/TopBar.stories.js +116 -0
- package/dist/esm/stories/VerticalStack.stories.js +1240 -0
- package/dist/esm/tailwind.config.js +7 -0
- package/dist/esm/utilities/transformers.js +47 -0
- package/dist/esm/vite.config.js +20 -0
- package/dist/types/components/ActionList.d.ts +122 -0
- package/dist/types/components/ActionList.d.ts.map +1 -0
- package/dist/types/components/AnnouncementBar.d.ts +21 -0
- package/dist/types/components/AnnouncementBar.d.ts.map +1 -0
- package/dist/types/components/AppProvider.d.ts +61 -0
- package/dist/types/components/AppProvider.d.ts.map +1 -0
- package/dist/types/components/Autocomplete.d.ts +135 -0
- package/dist/types/components/Autocomplete.d.ts.map +1 -0
- package/dist/types/components/Badge.d.ts +21 -0
- package/dist/types/components/Badge.d.ts.map +1 -0
- package/dist/types/components/Banner.d.ts +78 -0
- package/dist/types/components/Banner.d.ts.map +1 -0
- package/dist/types/components/Box.d.ts +70 -0
- package/dist/types/components/Box.d.ts.map +1 -0
- package/dist/types/components/Button.d.ts +133 -0
- package/dist/types/components/Button.d.ts.map +1 -0
- package/dist/types/components/ButtonGroup.d.ts +26 -0
- package/dist/types/components/ButtonGroup.d.ts.map +1 -0
- package/dist/types/components/Card.d.ts +141 -0
- package/dist/types/components/Card.d.ts.map +1 -0
- package/dist/types/components/Checkbox.d.ts +56 -0
- package/dist/types/components/Checkbox.d.ts.map +1 -0
- package/dist/types/components/ChoiceList.d.ts +69 -0
- package/dist/types/components/ChoiceList.d.ts.map +1 -0
- package/dist/types/components/Collapsible.d.ts +17 -0
- package/dist/types/components/Collapsible.d.ts.map +1 -0
- package/dist/types/components/ColorField.d.ts +36 -0
- package/dist/types/components/ColorField.d.ts.map +1 -0
- package/dist/types/components/ContextualSaveBar.d.ts +22 -0
- package/dist/types/components/ContextualSaveBar.d.ts.map +1 -0
- package/dist/types/components/DatePicker.d.ts +66 -0
- package/dist/types/components/DatePicker.d.ts.map +1 -0
- package/dist/types/components/Divider.d.ts +21 -0
- package/dist/types/components/Divider.d.ts.map +1 -0
- package/dist/types/components/DropZone.d.ts +108 -0
- package/dist/types/components/DropZone.d.ts.map +1 -0
- package/dist/types/components/EmptyState.d.ts +52 -0
- package/dist/types/components/EmptyState.d.ts.map +1 -0
- package/dist/types/components/Filters.d.ts +168 -0
- package/dist/types/components/Filters.d.ts.map +1 -0
- package/dist/types/components/FooterHelp.d.ts +21 -0
- package/dist/types/components/FooterHelp.d.ts.map +1 -0
- package/dist/types/components/Form.d.ts +39 -0
- package/dist/types/components/Form.d.ts.map +1 -0
- package/dist/types/components/Frame.d.ts +51 -0
- package/dist/types/components/Frame.d.ts.map +1 -0
- package/dist/types/components/FrameSaveBar.d.ts +8 -0
- package/dist/types/components/FrameSaveBar.d.ts.map +1 -0
- package/dist/types/components/Grid.d.ts +39 -0
- package/dist/types/components/Grid.d.ts.map +1 -0
- package/dist/types/components/HorizontalStack.d.ts +36 -0
- package/dist/types/components/HorizontalStack.d.ts.map +1 -0
- package/dist/types/components/Icon.d.ts +43 -0
- package/dist/types/components/Icon.d.ts.map +1 -0
- package/dist/types/components/Image.d.ts +45 -0
- package/dist/types/components/Image.d.ts.map +1 -0
- package/dist/types/components/InlineError.d.ts +22 -0
- package/dist/types/components/InlineError.d.ts.map +1 -0
- package/dist/types/components/Label.d.ts +28 -0
- package/dist/types/components/Label.d.ts.map +1 -0
- package/dist/types/components/Layout.d.ts +44 -0
- package/dist/types/components/Layout.d.ts.map +1 -0
- package/dist/types/components/LayoutSection.d.ts +24 -0
- package/dist/types/components/LayoutSection.d.ts.map +1 -0
- package/dist/types/components/Link.d.ts +38 -0
- package/dist/types/components/Link.d.ts.map +1 -0
- package/dist/types/components/List.d.ts +33 -0
- package/dist/types/components/List.d.ts.map +1 -0
- package/dist/types/components/Listbox.d.ts +34 -0
- package/dist/types/components/Listbox.d.ts.map +1 -0
- package/dist/types/components/Loading.d.ts +13 -0
- package/dist/types/components/Loading.d.ts.map +1 -0
- package/dist/types/components/Modal.d.ts +75 -0
- package/dist/types/components/Modal.d.ts.map +1 -0
- package/dist/types/components/Navigation.d.ts +105 -0
- package/dist/types/components/Navigation.d.ts.map +1 -0
- package/dist/types/components/Page.d.ts +59 -0
- package/dist/types/components/Page.d.ts.map +1 -0
- package/dist/types/components/Pagination.d.ts +39 -0
- package/dist/types/components/Pagination.d.ts.map +1 -0
- package/dist/types/components/Pane.d.ts +11 -0
- package/dist/types/components/Pane.d.ts.map +1 -0
- package/dist/types/components/Popover.d.ts +56 -0
- package/dist/types/components/Popover.d.ts.map +1 -0
- package/dist/types/components/PopoverManager.d.ts +3 -0
- package/dist/types/components/PopoverManager.d.ts.map +1 -0
- package/dist/types/components/ProgressBar.d.ts +24 -0
- package/dist/types/components/ProgressBar.d.ts.map +1 -0
- package/dist/types/components/RadioButton.d.ts +39 -0
- package/dist/types/components/RadioButton.d.ts.map +1 -0
- package/dist/types/components/RadioButtonCard.d.ts +41 -0
- package/dist/types/components/RadioButtonCard.d.ts.map +1 -0
- package/dist/types/components/RangeSlider.d.ts +44 -0
- package/dist/types/components/RangeSlider.d.ts.map +1 -0
- package/dist/types/components/ResourceList.d.ts +54 -0
- package/dist/types/components/ResourceList.d.ts.map +1 -0
- package/dist/types/components/Select.d.ts +48 -0
- package/dist/types/components/Select.d.ts.map +1 -0
- package/dist/types/components/SkeletonText.d.ts +28 -0
- package/dist/types/components/SkeletonText.d.ts.map +1 -0
- package/dist/types/components/Spinner.d.ts +18 -0
- package/dist/types/components/Spinner.d.ts.map +1 -0
- package/dist/types/components/Stack.d.ts +49 -0
- package/dist/types/components/Stack.d.ts.map +1 -0
- package/dist/types/components/Table.d.ts +197 -0
- package/dist/types/components/Table.d.ts.map +1 -0
- package/dist/types/components/Tabs.d.ts +43 -0
- package/dist/types/components/Tabs.d.ts.map +1 -0
- package/dist/types/components/Tag.d.ts +26 -0
- package/dist/types/components/Tag.d.ts.map +1 -0
- package/dist/types/components/Text.d.ts +32 -0
- package/dist/types/components/Text.d.ts.map +1 -0
- package/dist/types/components/TextField.d.ts +109 -0
- package/dist/types/components/TextField.d.ts.map +1 -0
- package/dist/types/components/Thumbnail.d.ts +18 -0
- package/dist/types/components/Thumbnail.d.ts.map +1 -0
- package/dist/types/components/TimePicker.d.ts +3 -0
- package/dist/types/components/TimePicker.d.ts.map +1 -0
- package/dist/types/components/Tip.d.ts +23 -0
- package/dist/types/components/Tip.d.ts.map +1 -0
- package/dist/types/components/Tooltip.d.ts +84 -0
- package/dist/types/components/Tooltip.d.ts.map +1 -0
- package/dist/types/components/TopBar.d.ts +43 -0
- package/dist/types/components/TopBar.d.ts.map +1 -0
- package/dist/types/components/VerticalStack.d.ts +27 -0
- package/dist/types/components/VerticalStack.d.ts.map +1 -0
- package/dist/types/index.d.ts +63 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/styles/Table.d.ts +1570 -0
- package/dist/types/styles/Table.d.ts.map +1 -0
- package/dist/types/utilities/dates.d.ts +46 -0
- package/dist/types/utilities/dates.d.ts.map +1 -0
- package/dist/types/utilities/transformers.d.ts +4 -0
- package/dist/types/utilities/transformers.d.ts.map +1 -0
- package/dist/types/utilities/useIndexResourceState.d.ts +21 -0
- package/dist/types/utilities/useIndexResourceState.d.ts.map +1 -0
- package/dist/types/utilities/useMounted.d.ts +2 -0
- package/dist/types/utilities/useMounted.d.ts.map +1 -0
- package/dist/types/utilities/useTableScrollState.d.ts +29 -0
- package/dist/types/utilities/useTableScrollState.d.ts.map +1 -0
- package/index.css +17 -0
- package/package.json +38 -7
|
@@ -128,9 +128,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
128
128
|
import React, { useContext, useMemo, useState } from "react";
|
|
129
129
|
import { tv } from "tailwind-variants";
|
|
130
130
|
import { ButtonGroupContext } from "./ButtonGroup.js";
|
|
131
|
-
import
|
|
131
|
+
import ActionList from "./ActionList.js";
|
|
132
|
+
import Icon from "./Icon.js";
|
|
133
|
+
import Popover from "./Popover.js";
|
|
134
|
+
import Spinner from "./Spinner.js";
|
|
135
|
+
import Tooltip from "./Tooltip.js";
|
|
132
136
|
import { CaretDownMinor } from "@shopify/polaris-icons";
|
|
133
|
-
import {
|
|
137
|
+
import { useDarkMode } from "./AppProvider.js";
|
|
134
138
|
var styles = tv({
|
|
135
139
|
base: "Litho-Button relative flex items-center justify-center rounded-md border border-transparent overflow-hidden",
|
|
136
140
|
variants: {
|
|
@@ -173,6 +177,7 @@ var styles = tv({
|
|
|
173
177
|
},
|
|
174
178
|
size: {
|
|
175
179
|
stepper: "min-h-3.5 rounded-sm",
|
|
180
|
+
mini: "min-h-5 min-w-5",
|
|
176
181
|
small: "min-h-7 min-w-7",
|
|
177
182
|
medium: "min-h-8",
|
|
178
183
|
large: "min-h-8"
|
|
@@ -188,6 +193,10 @@ var styles = tv({
|
|
|
188
193
|
bordered: {
|
|
189
194
|
true: "border-tint-2",
|
|
190
195
|
false: ""
|
|
196
|
+
},
|
|
197
|
+
naked: {
|
|
198
|
+
true: "border-none bg-transparent p-0 hover:bg-transparent w-auto justify-start",
|
|
199
|
+
false: ""
|
|
191
200
|
}
|
|
192
201
|
},
|
|
193
202
|
compoundVariants: [
|
|
@@ -312,6 +321,7 @@ var styles = tv({
|
|
|
312
321
|
destructive: false,
|
|
313
322
|
highlight: false,
|
|
314
323
|
pressed: false,
|
|
324
|
+
naked: false,
|
|
315
325
|
class: "bg-btn-secondary hover:bg-btn-secondary-low active:bg-btn-secondary-lower text-btn-secondary-fg hover:text-btn-secondary-fg-alt border-btn-secondary-border hover:border-btn-secondary-border-low active:border-btn-secondary-border-low\n dark:outline-hidden dark:border-transparent dark:shadow-btn-dark dark:border-t-tint-alt-3 dark:hover:border-t-tint-alt-2 dark:active:border-t-tint-alt-2"
|
|
316
326
|
},
|
|
317
327
|
{
|
|
@@ -323,6 +333,7 @@ var styles = tv({
|
|
|
323
333
|
destructive: false,
|
|
324
334
|
highlight: false,
|
|
325
335
|
pressed: true,
|
|
336
|
+
naked: false,
|
|
326
337
|
class: "bg-btn-secondary hover:bg-btn-secondary-low active:bg-btn-secondary-lower text-btn-secondary-fg hover:text-btn-secondary-fg-alt border-btn-secondary-border hover:border-btn-secondary-border-low active:border-btn-secondary-border-low\n dark:outline-hidden dark:border-tint-10 dark:shadow-btn-pressed-dark dark:hover:border-tint-10 dark:active:border-tint-10"
|
|
327
338
|
},
|
|
328
339
|
{
|
|
@@ -373,16 +384,19 @@ var styles = tv({
|
|
|
373
384
|
link: true,
|
|
374
385
|
disabled: false,
|
|
375
386
|
loading: false,
|
|
387
|
+
naked: false,
|
|
376
388
|
class: "bg-btn-link hover:bg-btn-link-low active:bg-btn-link-lower text-btn-link-fg hover:text-btn-link-fg-alt border-btn-link-border hover:border-btn-link-border-low active:border-btn-link-border-low"
|
|
377
389
|
},
|
|
378
390
|
{
|
|
379
391
|
link: true,
|
|
380
392
|
disabled: true,
|
|
393
|
+
naked: false,
|
|
381
394
|
class: "bg-btn-link-disabled text-btn-link-disabled-fg"
|
|
382
395
|
},
|
|
383
396
|
{
|
|
384
397
|
link: true,
|
|
385
398
|
loading: true,
|
|
399
|
+
naked: false,
|
|
386
400
|
class: "bg-btn-link-disabled text-btn-link-disabled-fg"
|
|
387
401
|
},
|
|
388
402
|
// Destructive buttons
|
|
@@ -445,12 +459,22 @@ var contentStyles = tv({
|
|
|
445
459
|
false: ""
|
|
446
460
|
},
|
|
447
461
|
size: {
|
|
462
|
+
mini: "p-0",
|
|
448
463
|
small: "py-0.5",
|
|
449
464
|
large: "py-3",
|
|
450
465
|
medium: "py-1"
|
|
466
|
+
},
|
|
467
|
+
naked: {
|
|
468
|
+
true: "px-2",
|
|
469
|
+
false: ""
|
|
451
470
|
}
|
|
452
471
|
},
|
|
453
472
|
compoundVariants: [
|
|
473
|
+
{
|
|
474
|
+
size: "mini",
|
|
475
|
+
iconOnly: true,
|
|
476
|
+
class: "!px-0"
|
|
477
|
+
},
|
|
454
478
|
{
|
|
455
479
|
size: "small",
|
|
456
480
|
iconOnly: true,
|
|
@@ -502,6 +526,7 @@ var contentStyles = tv({
|
|
|
502
526
|
hasIcon: false,
|
|
503
527
|
hasChildren: true,
|
|
504
528
|
disclosure: false,
|
|
529
|
+
naked: false,
|
|
505
530
|
class: "px-3"
|
|
506
531
|
},
|
|
507
532
|
{
|
|
@@ -551,6 +576,10 @@ var textStyles = tv({
|
|
|
551
576
|
highlight: {
|
|
552
577
|
true: "",
|
|
553
578
|
false: ""
|
|
579
|
+
},
|
|
580
|
+
naked: {
|
|
581
|
+
true: "",
|
|
582
|
+
false: ""
|
|
554
583
|
}
|
|
555
584
|
},
|
|
556
585
|
compoundVariants: [
|
|
@@ -577,6 +606,7 @@ var textStyles = tv({
|
|
|
577
606
|
primary: false,
|
|
578
607
|
plain: false,
|
|
579
608
|
link: false,
|
|
609
|
+
naked: false,
|
|
580
610
|
class: "text-btn-secondary-fg"
|
|
581
611
|
},
|
|
582
612
|
{
|
|
@@ -660,6 +690,11 @@ var textStyles = tv({
|
|
|
660
690
|
highlight: true,
|
|
661
691
|
disabled: true,
|
|
662
692
|
class: "text-btn-highlight-disabled-fg"
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
link: true,
|
|
696
|
+
naked: true,
|
|
697
|
+
class: "text-blue-700 underline"
|
|
663
698
|
}
|
|
664
699
|
],
|
|
665
700
|
defaultVariants: {
|
|
@@ -700,7 +735,8 @@ var connectedDisclosureStyles = tv({
|
|
|
700
735
|
* @param {string} [props.ariaDescribedBy] - ID of the element that describes the button.
|
|
701
736
|
* @param {boolean} [props.ariaChecked] - Whether the button is checked (for toggle buttons).
|
|
702
737
|
* @param {React.Component} [props.icon] - Icon component to display within the button.
|
|
703
|
-
* @param {
|
|
738
|
+
* @param {"default" | "primary" | "secondary" | "plain" | "link" | "destructive" | "highlight"} [props.iconColor='default'] - Color of the icon.
|
|
739
|
+
* @param {"default" | "sm" | "lg" | "xl"} [props.iconSize='default'] - Size of the icon.
|
|
704
740
|
* @param {boolean} [props.primary=false] - Whether to show the primary button style.
|
|
705
741
|
* @param {boolean} [props.highlight=false] - Whether to show the highlight button style.
|
|
706
742
|
* @param {boolean} [props.link=false] - Whether to show a link style.
|
|
@@ -708,12 +744,16 @@ var connectedDisclosureStyles = tv({
|
|
|
708
744
|
* @param {boolean} [props.disclosure=false] - Whether to show a disclosure arrow.
|
|
709
745
|
* @param {boolean} [props.disclosureRight=false] - Whether to show the disclosure on the right.
|
|
710
746
|
* @param {boolean} [props.plain=false] - Whether to show plain styling without background.
|
|
711
|
-
* @param {
|
|
747
|
+
* @param {boolean} [props.naked=false] - Whether to show the naked styling.
|
|
748
|
+
* @param {"small" | "medium" | "large" | "stepper"} [props.size='medium'] - Size of the button ('small', 'medium', 'large', 'stepper').
|
|
712
749
|
* @param {boolean} [props.fullWidth] - Whether the button should take full width.
|
|
713
|
-
* @param {
|
|
750
|
+
* @param {"left" | "center" | "right"} [props.align='center'] - Alignment of the button content ('left', 'center', 'right').
|
|
714
751
|
* @param {string} [props.tooltip] - Tooltip to show when hovering over the button.
|
|
752
|
+
* @param {"left" | "center" | "right"} [props.tooltipAlignment='right'] - Alignment of the tooltip ('left', 'center', 'right').
|
|
753
|
+
* @param {"above" | "below" | "left" | "right"} [props.tooltipPosition='above'] - Position of the tooltip ('above', 'below', 'left', 'right').
|
|
754
|
+
* @param {"inline-block" | "block" | "inline"} [props.tooltipDisplay='inline-block'] - Display type of the tooltip ('inline-block', 'block', 'inline').
|
|
715
755
|
* @param {Object} [props.connectedDisclosure] - Configuration for connected disclosure menu.
|
|
716
|
-
* @param {Array} [props.connectedDisclosure.actions] - Actions to show in the disclosure menu.
|
|
756
|
+
* @param {Array<import("./ActionList").ActionListItem>} [props.connectedDisclosure.actions] - Actions to show in the disclosure menu.
|
|
717
757
|
* @param {string} [props.className] - Additional CSS classes for the button.
|
|
718
758
|
* @param {string} [props.contentClassName] - Additional CSS classes for the button content.
|
|
719
759
|
* @param {boolean} [props.rounded] - Whether to show fully rounded corners.
|
|
@@ -723,12 +763,15 @@ var connectedDisclosureStyles = tv({
|
|
|
723
763
|
* @returns {JSX.Element} The rendered Button component.
|
|
724
764
|
*
|
|
725
765
|
* @example
|
|
766
|
+
* ```js
|
|
726
767
|
* // Basic button
|
|
727
768
|
* <Button onClick={() => console.log('Clicked')}>
|
|
728
769
|
* Click me
|
|
729
770
|
* </Button>
|
|
771
|
+
* ```
|
|
730
772
|
*
|
|
731
773
|
* @example
|
|
774
|
+
* ```js
|
|
732
775
|
* // Primary button with icon and loading state
|
|
733
776
|
* <Button
|
|
734
777
|
* primary
|
|
@@ -738,8 +781,10 @@ var connectedDisclosureStyles = tv({
|
|
|
738
781
|
* >
|
|
739
782
|
* Save changes
|
|
740
783
|
* </Button>
|
|
784
|
+
* ```
|
|
741
785
|
*
|
|
742
786
|
* @example
|
|
787
|
+
* ```js
|
|
743
788
|
* // Button with connected disclosure
|
|
744
789
|
* <Button
|
|
745
790
|
* connectedDisclosure={{
|
|
@@ -751,11 +796,12 @@ var connectedDisclosureStyles = tv({
|
|
|
751
796
|
* >
|
|
752
797
|
* More actions
|
|
753
798
|
* </Button>
|
|
799
|
+
* ```
|
|
754
800
|
*/ function Button() {
|
|
755
801
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
756
|
-
var darkMode =
|
|
802
|
+
var darkMode = useDarkMode().darkMode;
|
|
757
803
|
var _useState = _sliced_to_array(useState(false), 2), showConnectedDisclosurePopover = _useState[0], setShowConnectedDisclosurePopover = _useState[1];
|
|
758
|
-
var id = props.id, children = props.children, url = props.url, _props_disabled = props.disabled, disabled = _props_disabled === void 0 ? false : _props_disabled, external = props.external, target = props.target, submit = props.submit, _props_loading = props.loading, loading = _props_loading === void 0 ? false : _props_loading, _props_pressed = props.pressed, pressed = _props_pressed === void 0 ? false : _props_pressed, accessibilityLabel = props.accessibilityLabel, role = props.role, ariaControls = props.ariaControls, ariaExpanded = props.ariaExpanded, ariaDescribedBy = props.ariaDescribedBy, ariaChecked = props.ariaChecked, icon = props.icon, _iconColor = props.iconColor, _props_bordered = props.bordered, bordered = _props_bordered === void 0 ? false : _props_bordered, _props_primary = props.primary, primary = _props_primary === void 0 ? false : _props_primary, _props_highlight = props.highlight, highlight = _props_highlight === void 0 ? false : _props_highlight, _props_link = props.link, link = _props_link === void 0 ? false : _props_link, _props_destructive = props.destructive, destructive = _props_destructive === void 0 ? false : _props_destructive, _props_disclosure = props.disclosure, disclosure = _props_disclosure === void 0 ? false : _props_disclosure, _props_disclosureRight = props.disclosureRight, disclosureRight = _props_disclosureRight === void 0 ? false : _props_disclosureRight, _props_plain = props.plain, plain = _props_plain === void 0 ? false : _props_plain, _props_size = props.size, size = _props_size === void 0 ? "medium" : _props_size, fullWidth = props.fullWidth, _props_align = props.align, align = _props_align === void 0 ? "center" : _props_align, connectedDisclosure = props.connectedDisclosure, className = props.className, contentClassName = props.contentClassName, rounded = props.rounded, onClick = props.onClick, onMouseDown = props.onMouseDown, tooltip = props.tooltip, _props_tooltipAlignment = props.tooltipAlignment, tooltipAlignment = _props_tooltipAlignment === void 0 ? "right" : _props_tooltipAlignment, _props_tooltipPosition = props.tooltipPosition, tooltipPosition = _props_tooltipPosition === void 0 ? "above" : _props_tooltipPosition, shadow = props.shadow, restProps = _object_without_properties(props, [
|
|
804
|
+
var id = props.id, children = props.children, url = props.url, _props_disabled = props.disabled, disabled = _props_disabled === void 0 ? false : _props_disabled, external = props.external, target = props.target, submit = props.submit, _props_loading = props.loading, loading = _props_loading === void 0 ? false : _props_loading, _props_pressed = props.pressed, pressed = _props_pressed === void 0 ? false : _props_pressed, accessibilityLabel = props.accessibilityLabel, role = props.role, ariaControls = props.ariaControls, ariaExpanded = props.ariaExpanded, ariaDescribedBy = props.ariaDescribedBy, ariaChecked = props.ariaChecked, icon = props.icon, _iconColor = props.iconColor, _props_iconSize = props.iconSize, iconSize = _props_iconSize === void 0 ? "default" : _props_iconSize, _props_bordered = props.bordered, bordered = _props_bordered === void 0 ? false : _props_bordered, _props_primary = props.primary, primary = _props_primary === void 0 ? false : _props_primary, _props_highlight = props.highlight, highlight = _props_highlight === void 0 ? false : _props_highlight, _props_link = props.link, link = _props_link === void 0 ? false : _props_link, _props_destructive = props.destructive, destructive = _props_destructive === void 0 ? false : _props_destructive, _props_disclosure = props.disclosure, disclosure = _props_disclosure === void 0 ? false : _props_disclosure, _props_disclosureRight = props.disclosureRight, disclosureRight = _props_disclosureRight === void 0 ? false : _props_disclosureRight, _props_plain = props.plain, plain = _props_plain === void 0 ? false : _props_plain, _props_naked = props.naked, naked = _props_naked === void 0 ? false : _props_naked, _props_size = props.size, size = _props_size === void 0 ? "medium" : _props_size, fullWidth = props.fullWidth, _props_align = props.align, align = _props_align === void 0 ? "center" : _props_align, connectedDisclosure = props.connectedDisclosure, className = props.className, contentClassName = props.contentClassName, rounded = props.rounded, onClick = props.onClick, onMouseDown = props.onMouseDown, tooltip = props.tooltip, _props_tooltipAlignment = props.tooltipAlignment, tooltipAlignment = _props_tooltipAlignment === void 0 ? "right" : _props_tooltipAlignment, _props_tooltipPosition = props.tooltipPosition, tooltipPosition = _props_tooltipPosition === void 0 ? "above" : _props_tooltipPosition, _props_tooltipDisplay = props.tooltipDisplay, tooltipDisplay = _props_tooltipDisplay === void 0 ? "inline-block" : _props_tooltipDisplay, shadow = props.shadow, restProps = _object_without_properties(props, [
|
|
759
805
|
"id",
|
|
760
806
|
"children",
|
|
761
807
|
"url",
|
|
@@ -773,6 +819,7 @@ var connectedDisclosureStyles = tv({
|
|
|
773
819
|
"ariaChecked",
|
|
774
820
|
"icon",
|
|
775
821
|
"iconColor",
|
|
822
|
+
"iconSize",
|
|
776
823
|
"bordered",
|
|
777
824
|
"primary",
|
|
778
825
|
"highlight",
|
|
@@ -781,6 +828,7 @@ var connectedDisclosureStyles = tv({
|
|
|
781
828
|
"disclosure",
|
|
782
829
|
"disclosureRight",
|
|
783
830
|
"plain",
|
|
831
|
+
"naked",
|
|
784
832
|
"size",
|
|
785
833
|
"fullWidth",
|
|
786
834
|
"align",
|
|
@@ -793,6 +841,7 @@ var connectedDisclosureStyles = tv({
|
|
|
793
841
|
"tooltip",
|
|
794
842
|
"tooltipAlignment",
|
|
795
843
|
"tooltipPosition",
|
|
844
|
+
"tooltipDisplay",
|
|
796
845
|
"shadow"
|
|
797
846
|
]);
|
|
798
847
|
var hasIcon = !!icon;
|
|
@@ -830,14 +879,16 @@ var connectedDisclosureStyles = tv({
|
|
|
830
879
|
shadow: shadow,
|
|
831
880
|
darkMode: darkMode,
|
|
832
881
|
bordered: bordered,
|
|
833
|
-
align: align
|
|
882
|
+
align: align,
|
|
883
|
+
naked: naked
|
|
834
884
|
});
|
|
835
885
|
var contentClasses = contentStyles({
|
|
836
886
|
disclosure: disclosure,
|
|
837
887
|
hasIcon: hasIcon,
|
|
838
888
|
hasChildren: hasChildren,
|
|
839
889
|
size: size,
|
|
840
|
-
iconOnly: iconOnly
|
|
890
|
+
iconOnly: iconOnly,
|
|
891
|
+
naked: naked
|
|
841
892
|
});
|
|
842
893
|
var iconClasses = iconStyles();
|
|
843
894
|
var textClasses = textStyles({
|
|
@@ -848,7 +899,8 @@ var connectedDisclosureStyles = tv({
|
|
|
848
899
|
highlight: highlight,
|
|
849
900
|
pressed: pressed,
|
|
850
901
|
loading: loading,
|
|
851
|
-
disabled: disabled
|
|
902
|
+
disabled: disabled,
|
|
903
|
+
naked: naked
|
|
852
904
|
});
|
|
853
905
|
var connectedDisclosureClasses = connectedDisclosureStyles({
|
|
854
906
|
primary: primary,
|
|
@@ -896,7 +948,8 @@ var connectedDisclosureStyles = tv({
|
|
|
896
948
|
className: iconClasses,
|
|
897
949
|
children: /*#__PURE__*/ _jsx(Icon, {
|
|
898
950
|
source: memoizedIcon,
|
|
899
|
-
color: disabled ? "disabled" : _iconColor || iconColor
|
|
951
|
+
color: disabled ? "disabled" : _iconColor || iconColor,
|
|
952
|
+
size: iconSize
|
|
900
953
|
})
|
|
901
954
|
}),
|
|
902
955
|
hasChildren && /*#__PURE__*/ _jsx("span", {
|
|
@@ -907,7 +960,8 @@ var connectedDisclosureStyles = tv({
|
|
|
907
960
|
className: "Litho-Button__DisclosureIcon relative -left-0.5",
|
|
908
961
|
children: /*#__PURE__*/ _jsx(Icon, {
|
|
909
962
|
source: CaretDownMinor,
|
|
910
|
-
color: disabled ? "disabled" : _iconColor || iconColor
|
|
963
|
+
color: disabled ? "disabled" : _iconColor || iconColor,
|
|
964
|
+
size: iconSize
|
|
911
965
|
})
|
|
912
966
|
})
|
|
913
967
|
]
|
|
@@ -959,6 +1013,7 @@ var connectedDisclosureStyles = tv({
|
|
|
959
1013
|
content: tooltip,
|
|
960
1014
|
alignment: tooltipAlignment,
|
|
961
1015
|
preferredPosition: tooltipPosition,
|
|
1016
|
+
display: tooltipDisplay,
|
|
962
1017
|
children: showConnectedDisclosure ? contentWithDisclosure : content
|
|
963
1018
|
});
|
|
964
1019
|
}
|
|
@@ -4,14 +4,14 @@ function _type_of(obj) {
|
|
|
4
4
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
5
5
|
}
|
|
6
6
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
7
|
-
import React
|
|
7
|
+
import React from "react";
|
|
8
8
|
import { tv } from "tailwind-variants";
|
|
9
|
-
import { FrameContext } from "./AppProvider.js";
|
|
10
9
|
import Button from "./Button.js";
|
|
11
10
|
import Icon from "./Icon.js";
|
|
12
11
|
import Spinner from "./Spinner.js";
|
|
13
12
|
import Text from "./Text.js";
|
|
14
13
|
import Tooltip from "./Tooltip.js";
|
|
14
|
+
import { useFrame } from "./Frame.js";
|
|
15
15
|
var styles = tv({
|
|
16
16
|
base: "Litho-Card relative",
|
|
17
17
|
variants: {
|
|
@@ -173,7 +173,7 @@ var bodyStyles = tv({
|
|
|
173
173
|
* @returns {React.ReactElement} The rendered Card component.
|
|
174
174
|
*/ var Card = function(param) {
|
|
175
175
|
var _param_allowOverflow = param.allowOverflow, allowOverflow = _param_allowOverflow === void 0 ? false : _param_allowOverflow, _param_roundedOnMobile = param.roundedOnMobile, roundedOnMobile = _param_roundedOnMobile === void 0 ? false : _param_roundedOnMobile, children = param.children, hideOnPrint = param.hideOnPrint, title = param.title, _param_titleVariant = param.titleVariant, titleVariant = _param_titleVariant === void 0 ? "headingMd" : _param_titleVariant, description = param.description, icon = param.icon, tooltip = param.tooltip, _param_tooltipPreferredPosition = param.tooltipPreferredPosition, tooltipPreferredPosition = _param_tooltipPreferredPosition === void 0 ? "above" : _param_tooltipPreferredPosition, _param_outlined = param.outlined, outlined = _param_outlined === void 0 ? false : _param_outlined, _param_highlighted = param.highlighted, highlighted = _param_highlighted === void 0 ? false : _param_highlighted, _param_subdued = param.subdued, subdued = _param_subdued === void 0 ? false : _param_subdued, _param_alternate = param.alternate, alternate = _param_alternate === void 0 ? false : _param_alternate, _param_padded = param.padded, padded = _param_padded === void 0 ? false : _param_padded, _param_loading = param.loading, loading = _param_loading === void 0 ? false : _param_loading, _param_paddedHalf = param.paddedHalf, paddedHalf = _param_paddedHalf === void 0 ? false : _param_paddedHalf, _param_removeHeaderBottomPadding = param.removeHeaderBottomPadding, removeHeaderBottomPadding = _param_removeHeaderBottomPadding === void 0 ? false : _param_removeHeaderBottomPadding, onClick = param.onClick, _param_emptyState = param.emptyState, emptyState = _param_emptyState === void 0 ? {} : _param_emptyState, action = param.action, className = param.className, headerClassName = param.headerClassName, accessory = param.accessory, _param_fullHeightBody = param.fullHeightBody, fullHeightBody = _param_fullHeightBody === void 0 ? false : _param_fullHeightBody, _param_fullWidthOnMobile = param.fullWidthOnMobile, fullWidthOnMobile = _param_fullWidthOnMobile === void 0 ? true : _param_fullWidthOnMobile, _param_shadow = param.shadow, shadow = _param_shadow === void 0 ? "default" : _param_shadow;
|
|
176
|
-
var embedded =
|
|
176
|
+
var embedded = useFrame().embedded;
|
|
177
177
|
var showHeader = !!(title || action);
|
|
178
178
|
var isClickable = !!onClick;
|
|
179
179
|
var classes = styles({
|
|
@@ -198,7 +198,8 @@ var bodyStyles = tv({
|
|
|
198
198
|
var firstSectionDetected = false;
|
|
199
199
|
function process(child) {
|
|
200
200
|
if (/*#__PURE__*/ React.isValidElement(child)) {
|
|
201
|
-
|
|
201
|
+
var _child_type;
|
|
202
|
+
if (((_child_type = child.type) === null || _child_type === void 0 ? void 0 : _child_type.displayName) === "Card.Section" && !firstSectionDetected) {
|
|
202
203
|
firstSectionDetected = true;
|
|
203
204
|
return /*#__PURE__*/ React.cloneElement(child, {
|
|
204
205
|
isFirst: true,
|
|
@@ -516,6 +517,7 @@ var clickableRowStyles = tv({
|
|
|
516
517
|
* @param {Function} [props.onClick] - Click handler for the row.
|
|
517
518
|
* @param {string} [props.id] - ID to apply to the row element.
|
|
518
519
|
* @param {string} [props.url] - URL to open when the row is clicked.
|
|
520
|
+
* @param {string} [props.className] - Additional classes to apply to the row.
|
|
519
521
|
* @param {boolean} [props.disabled=false] - Disables interaction with the row.
|
|
520
522
|
*
|
|
521
523
|
* @returns {React.ReactElement} The rendered ClickableRow component.
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { tv } from "tailwind-variants";
|
|
3
|
-
import
|
|
3
|
+
import Icon from "./Icon.js";
|
|
4
|
+
import Label from "./Label.js";
|
|
5
|
+
import Text from "./Text.js";
|
|
4
6
|
import { TickMinor, MinusMajor } from "@shopify/polaris-icons";
|
|
5
7
|
var styles = tv({
|
|
6
8
|
base: "Litho-Checkbox group flex gap-2 py-1",
|
|
@@ -61,6 +63,9 @@ var checkboxStyles = tv({
|
|
|
61
63
|
* @param {boolean} [props.checked=false] - Indicates whether the checkbox is checked.
|
|
62
64
|
* @param {boolean} [props.disabled=false] - Indicates whether the checkbox is disabled.
|
|
63
65
|
* @param {string} [props.helpText] - Additional descriptive text for the checkbox.
|
|
66
|
+
* @param {React.ReactNode|import("./Tooltip").TooltipContentObject} [props.tooltip] - Tooltip content for the checkbox label.
|
|
67
|
+
* @param {boolean} [props.indeterminate=false] - Indicates whether the checkbox is in an indeterminate state (mixed/partial selection).
|
|
68
|
+
* @param {string} [props.className] - Additional CSS classes to apply to the checkbox container.
|
|
64
69
|
* @param {function} [props.onChange] - Callback function called when the checkbox state changes.
|
|
65
70
|
* @param {function} [props.onFocus] - Callback function called when the checkbox gains focus.
|
|
66
71
|
* @param {function} [props.onBlur] - Callback function called when the checkbox loses focus.
|
|
@@ -36,6 +36,12 @@ var styles = tv({
|
|
|
36
36
|
base: "Litho-ChoiceList flex flex-col gap-1"
|
|
37
37
|
});
|
|
38
38
|
/**
|
|
39
|
+
* @typedef {Object} ChoiceListItem
|
|
40
|
+
* @property {string} value - The value of the choice.
|
|
41
|
+
* @property {string} label - The display label of the choice.
|
|
42
|
+
* @property {boolean} [disabled=false] - Whether the choice is disabled.
|
|
43
|
+
* @property {React.ReactNode} [renderChildren] - A function that returns a React node to render as children of the choice.
|
|
44
|
+
*/ /**
|
|
39
45
|
* A ChoiceList component for rendering a list of selectable options.
|
|
40
46
|
*
|
|
41
47
|
* @component
|
|
@@ -44,10 +50,7 @@ var styles = tv({
|
|
|
44
50
|
* @param {string} [props.title] - The title of the choice list.
|
|
45
51
|
* @param {boolean} [props.titleHidden=false] - Whether to hide the title visually.
|
|
46
52
|
* @param {boolean} [props.allowMultiple=false] - Whether multiple selections are allowed.
|
|
47
|
-
* @param {Array} props.choices - The available choices for selection.
|
|
48
|
-
* @param {string} props.choices[].value - The value of the choice.
|
|
49
|
-
* @param {string} props.choices[].label - The display label of the choice.
|
|
50
|
-
* @param {boolean} [props.choices[].disabled=false] - Whether the choice is disabled.
|
|
53
|
+
* @param {Array<ChoiceListItem>} props.choices - The available choices for selection.
|
|
51
54
|
* @param {Array} props.selected - The currently selected values.
|
|
52
55
|
* @param {Function} props.onChange - Callback when the selection changes. Receives the updated array of selected values.
|
|
53
56
|
* @param {string} [props.error] - Error message to display, if any.
|
|
@@ -47,9 +47,9 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
47
47
|
}
|
|
48
48
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
49
49
|
import { useState } from "react";
|
|
50
|
-
import
|
|
50
|
+
import Sketch from "@uiw/react-color-sketch";
|
|
51
51
|
import { tv } from "tailwind-variants";
|
|
52
|
-
import
|
|
52
|
+
import Text from "./Text.js";
|
|
53
53
|
var colorContainer = tv({
|
|
54
54
|
base: "Litho-ColorField relative flex items-center gap-2 cursor-pointer px-1 py-1 rounded-md w-full-plus-2 -left-1",
|
|
55
55
|
variants: {
|
|
@@ -133,7 +133,7 @@ var colorCell = tv({
|
|
|
133
133
|
style: zIndexOverride ? {
|
|
134
134
|
zIndex: zIndexOverride
|
|
135
135
|
} : {},
|
|
136
|
-
children: /*#__PURE__*/ _jsx(
|
|
136
|
+
children: /*#__PURE__*/ _jsx(Sketch, {
|
|
137
137
|
color: value,
|
|
138
138
|
onChange: function(param) {
|
|
139
139
|
var hex = param.hex;
|
|
@@ -118,7 +118,12 @@ import { useEffect, useState } from "react";
|
|
|
118
118
|
import { tv } from "tailwind-variants";
|
|
119
119
|
import dayjs from "dayjs";
|
|
120
120
|
import ReactDatePicker from "react-datepicker";
|
|
121
|
-
import
|
|
121
|
+
import Icon from "./Icon.js";
|
|
122
|
+
import Listbox from "./Listbox.js";
|
|
123
|
+
import Popover from "./Popover.js";
|
|
124
|
+
import Text from "./Text.js";
|
|
125
|
+
import TextField from "./TextField.js";
|
|
126
|
+
import TimePicker from "./TimePicker.js";
|
|
122
127
|
import { CalendarMinor, CalendarTimeMinor, ChevronLeftMinor, ChevronRightMinor } from "@shopify/polaris-icons";
|
|
123
128
|
import { enUS } from "date-fns/locale";
|
|
124
129
|
import { NOW_TODAY, DAY_FORMAT, DAY_TIME_FORMAT, TIME_FORMAT, MONTHS, RANGE_PRESETS, HOURLY_RANGE_PRESETS, DATE_LOCALE_MAP, isValidDate } from "../utilities/dates.js";
|
|
@@ -60,7 +60,14 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
60
60
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
61
61
|
import { useEffect, useRef, useState } from "react";
|
|
62
62
|
import { tv } from "tailwind-variants";
|
|
63
|
-
import
|
|
63
|
+
import Button from "./Button.js";
|
|
64
|
+
import Icon from "./Icon.js";
|
|
65
|
+
import InlineError from "./InlineError.js";
|
|
66
|
+
import Label from "./Label.js";
|
|
67
|
+
import Link from "./Link.js";
|
|
68
|
+
import SkeletonText from "./SkeletonText.js";
|
|
69
|
+
import Spinner from "./Spinner.js";
|
|
70
|
+
import Text from "./Text.js";
|
|
64
71
|
import { CancelMajor, CircleAlertMajor, FileMinor, ImageMajor, ImagesMajor } from "@shopify/polaris-icons";
|
|
65
72
|
var dropZoneStyles = tv({
|
|
66
73
|
base: "Litho-DropZone w-full flex items-center justify-center p-4 border border-form-border border-dashed rounded-md focus:outline-hidden",
|
|
@@ -122,9 +129,12 @@ var dropZoneStyles = tv({
|
|
|
122
129
|
* @returns {JSX.Element} DropZone component.
|
|
123
130
|
*/ function DropZone() {
|
|
124
131
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
125
|
-
var id = props.id, label = props.label, labelHidden = props.labelHidden, labelAction = props.labelAction, tooltip = props.tooltip, labelVariant = props.labelVariant, _props_type = props.type, type = _props_type === void 0 ? "file" : _props_type,
|
|
126
|
-
|
|
127
|
-
|
|
132
|
+
var id = props.id, label = props.label, labelHidden = props.labelHidden, labelAction = props.labelAction, tooltip = props.tooltip, labelVariant = props.labelVariant, _props_type = props.type, type = _props_type === void 0 ? "file" : _props_type, _accept = props.accept, _props_allowMultiple = props.allowMultiple, allowMultiple = _props_allowMultiple === void 0 ? false : _props_allowMultiple, _props_showDropZoneWhenDisabled = props.showDropZoneWhenDisabled, showDropZoneWhenDisabled = _props_showDropZoneWhenDisabled === void 0 ? true : _props_showDropZoneWhenDisabled, _disabled = props.disabled, onDrop = props.onDrop, onDropAccepted = props.onDropAccepted, onDropRejected = props.onDropRejected, helpText = props.helpText, error = props.error, _props_uploading = props.uploading, uploading = _props_uploading === void 0 ? false : _props_uploading, _props_uploadedFiles = props.uploadedFiles, uploadedFiles = _props_uploadedFiles === void 0 ? [] : _props_uploadedFiles, _props_uploadLabel = props.uploadLabel, uploadLabel = _props_uploadLabel === void 0 ? "Drag and drop files or click to upload" : _props_uploadLabel, _props_uploadingLabel = props.uploadingLabel, uploadingLabel = _props_uploadingLabel === void 0 ? "Uploading..." : _props_uploadingLabel, _props_dragLabel = props.dragLabel, dragLabel = _props_dragLabel === void 0 ? "Release to upload" : _props_dragLabel, tmp = props.showFilePreview, _showFilePreview = tmp === void 0 ? true : tmp, previewLoading = props.previewLoading, _props_previewRows = props.previewRows, previewRows = _props_previewRows === void 0 ? 2 : _props_previewRows, onRemove = props.onRemove, onFilePreviewClick = props.onFilePreviewClick, filename = props.filename;
|
|
133
|
+
var accept = _accept ? typeof _accept === "string" ? [
|
|
134
|
+
_accept
|
|
135
|
+
] : _accept : [
|
|
136
|
+
"*/*"
|
|
137
|
+
];
|
|
128
138
|
var inputRef = useRef(null);
|
|
129
139
|
var _useState = _sliced_to_array(useState(false), 2), hasFocusWithin = _useState[0], setHasFocusWithin = _useState[1];
|
|
130
140
|
var _useState1 = _sliced_to_array(useState(false), 2), isDraggingOver = _useState1[0], setIsDraggingOver = _useState1[1];
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import Button from "./Button.js";
|
|
3
|
+
import Image from "./Image.js";
|
|
4
|
+
import Text from "./Text.js";
|
|
5
|
+
import ProgressBar from "./ProgressBar.js";
|
|
3
6
|
import { tv } from "tailwind-variants";
|
|
4
7
|
var styles = tv({
|
|
5
8
|
base: "Litho-EmptyState py-16 px-4 flex flex-col items-center text-center gap-6"
|
|
@@ -32,10 +35,10 @@ var styles = tv({
|
|
|
32
35
|
* @returns {JSX.Element} The rendered EmptyState component.
|
|
33
36
|
*/ function EmptyState() {
|
|
34
37
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
35
|
-
var description = props.description, icon = props.icon, iconSource = props.iconSource, primaryAction = props.primaryAction, secondaryAction = props.secondaryAction, title = props.title, _props_titleVariant = props.titleVariant, titleVariant = _props_titleVariant === void 0 ? "headingXl" : _props_titleVariant, _props_descriptionVariant = props.descriptionVariant, descriptionVariant = _props_descriptionVariant === void 0 ? "bodyLg" : _props_descriptionVariant, progress = props.progress;
|
|
38
|
+
var description = props.description, icon = props.icon, iconSource = props.iconSource, primaryAction = props.primaryAction, secondaryAction = props.secondaryAction, title = props.title, _props_titleVariant = props.titleVariant, titleVariant = _props_titleVariant === void 0 ? "headingXl" : _props_titleVariant, _props_descriptionVariant = props.descriptionVariant, descriptionVariant = _props_descriptionVariant === void 0 ? "bodyLg" : _props_descriptionVariant, progress = props.progress, className = props.className;
|
|
36
39
|
var classes = styles();
|
|
37
40
|
return /*#__PURE__*/ _jsxs("div", {
|
|
38
|
-
className: classes,
|
|
41
|
+
className: "".concat(classes).concat(className ? " ".concat(className) : ""),
|
|
39
42
|
children: [
|
|
40
43
|
iconSource && /*#__PURE__*/ _jsx("div", {
|
|
41
44
|
className: "flex items-center justify-center w-16 h-16",
|
|
@@ -112,9 +112,16 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
112
112
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
113
113
|
import React, { useContext, useEffect, useRef, useState } from "react";
|
|
114
114
|
import { tv } from "tailwind-variants";
|
|
115
|
-
import
|
|
115
|
+
import ActionList from "./ActionList.js";
|
|
116
|
+
import Button from "./Button.js";
|
|
117
|
+
import Icon from "./Icon.js";
|
|
118
|
+
import Link from "./Link.js";
|
|
119
|
+
import Popover from "./Popover.js";
|
|
120
|
+
import Text from "./Text.js";
|
|
121
|
+
import TextField from "./TextField.js";
|
|
122
|
+
import Tooltip from "./Tooltip.js";
|
|
116
123
|
import { CancelSmallMinor, CaretDownMinor, DeleteMinor, HorizontalDotsMinor, PlusMinor, SearchMajor, ChevronLeftMinor, ChevronRightMinor } from "@shopify/polaris-icons";
|
|
117
|
-
import {
|
|
124
|
+
import { useDarkMode } from "./AppProvider.js";
|
|
118
125
|
var styles = tv({
|
|
119
126
|
base: "Litho-Filters flex items-center",
|
|
120
127
|
variants: {
|
|
@@ -797,11 +804,11 @@ var tabActionIconStyles = tv({
|
|
|
797
804
|
* @param {boolean} [props.subdued=false] - Whether the text field appears subdued.
|
|
798
805
|
* @param {boolean} [props.disableQueryField=false] - Whether the text field is disabled.
|
|
799
806
|
* @param {boolean} [props.transparent=true] - Whether the text field has a transparent background.
|
|
807
|
+
* @param {string} [props.autoComplete="on"] - Whether the text field should autocomplete.
|
|
800
808
|
* @returns {JSX.Element} The text field component.
|
|
801
|
-
*/ Filters.TextField = function
|
|
802
|
-
var
|
|
803
|
-
var
|
|
804
|
-
var queryValue = props.queryValue, onQueryChange = props.onQueryChange, onQueryBlur = props.onQueryBlur, onQueryFocus = props.onQueryFocus, onQueryClear = props.onQueryClear, _props_queryPlaceholder = props.queryPlaceholder, queryPlaceholder = _props_queryPlaceholder === void 0 ? "Search" : _props_queryPlaceholder, disableQueryField = props.disableQueryField;
|
|
809
|
+
*/ Filters.TextField = function(props) {
|
|
810
|
+
var darkMode = useDarkMode().darkMode;
|
|
811
|
+
var queryValue = props.queryValue, onQueryChange = props.onQueryChange, onQueryBlur = props.onQueryBlur, onQueryFocus = props.onQueryFocus, onQueryClear = props.onQueryClear, _props_queryPlaceholder = props.queryPlaceholder, queryPlaceholder = _props_queryPlaceholder === void 0 ? "Search" : _props_queryPlaceholder, disableQueryField = props.disableQueryField, _props_autoComplete = props.autoComplete, autoComplete = _props_autoComplete === void 0 ? "on" : _props_autoComplete;
|
|
805
812
|
return /*#__PURE__*/ _jsx("div", {
|
|
806
813
|
className: "p-1",
|
|
807
814
|
children: /*#__PURE__*/ _jsx(TextField, {
|
|
@@ -814,6 +821,7 @@ var tabActionIconStyles = tv({
|
|
|
814
821
|
disabled: disableQueryField,
|
|
815
822
|
subdued: darkMode,
|
|
816
823
|
transparent: !darkMode,
|
|
824
|
+
autoComplete: autoComplete,
|
|
817
825
|
clearButton: true,
|
|
818
826
|
onClearButtonClick: onQueryClear
|
|
819
827
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import Icon from "./Icon.js";
|
|
3
3
|
import { CircleInformationMajor } from "@shopify/polaris-icons";
|
|
4
4
|
/**
|
|
5
5
|
* Renders a `FooterHelp` component, which provides additional information
|
|
@@ -1,11 +1,26 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* A reusable Form component.
|
|
2
|
+
* A reusable Form component that provides a structured HTML form with customizable attributes and submission handling.
|
|
3
3
|
*
|
|
4
|
+
* @component
|
|
4
5
|
* @param {Object} [props={}] - The properties passed to the component.
|
|
5
|
-
* @param {string} [props.
|
|
6
|
-
* @param {
|
|
6
|
+
* @param {string} [props.acceptCharset] - The character encoding that the form accepts.
|
|
7
|
+
* @param {string} [props.action] - The URL where the form data should be submitted.
|
|
8
|
+
* @param {string} [props.autoComplete] - Whether the form should have autocomplete enabled. Can be "on" or "off".
|
|
7
9
|
* @param {React.ReactNode} [props.children] - The child elements to be rendered inside the form.
|
|
10
|
+
* @param {string} [props.encType] - The encoding type for the form submission (e.g., "multipart/form-data", "application/x-www-form-urlencoded").
|
|
11
|
+
* @param {string} [props.method="post"] - The HTTP method for the form submission. Can be "get", "post", etc.
|
|
12
|
+
* @param {string} [props.name] - The name attribute for the form element.
|
|
13
|
+
* @param {boolean} [props.noValidate] - Whether to disable HTML5 form validation.
|
|
14
|
+
* @param {boolean} [props.preventDefault=true] - Whether to prevent the default form submission behavior.
|
|
15
|
+
* @param {string} [props.target] - The target window or frame for the form submission (e.g., "_blank", "_self").
|
|
16
|
+
* @param {Function} [props.onSubmit] - The function to call when the form is submitted. Receives the form event as a parameter.
|
|
8
17
|
* @returns {JSX.Element} The rendered form component.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* <Form onSubmit={(event) => console.log('Form submitted')}>
|
|
21
|
+
* <TextField label="Name" />
|
|
22
|
+
* <Button submit>Submit</Button>
|
|
23
|
+
* </Form>
|
|
9
24
|
*/ import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
25
|
function Form() {
|
|
11
26
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|