@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
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export var transformStorySource = function(code) {
|
|
2
|
+
// Look for render function and extract its content
|
|
3
|
+
// This regex looks for render: () => and captures everything until the next comma or end of string
|
|
4
|
+
var renderMatch = code.match(/render:\s*\(\)\s*=>\s*([\s\S]*?)(?=,\s*parameters|,\s*args|$)/);
|
|
5
|
+
if (renderMatch) {
|
|
6
|
+
var jsxContent = renderMatch[1].trim();
|
|
7
|
+
// Handle different ways the JSX might end
|
|
8
|
+
// Remove trailing semicolon only if it's the very last character
|
|
9
|
+
if (jsxContent.endsWith(';')) {
|
|
10
|
+
jsxContent = jsxContent.slice(0, -1).trim();
|
|
11
|
+
}
|
|
12
|
+
// If the content is wrapped in parentheses, remove them
|
|
13
|
+
if (jsxContent.startsWith('(') && jsxContent.endsWith(')')) {
|
|
14
|
+
jsxContent = jsxContent.slice(1, -1).trim();
|
|
15
|
+
}
|
|
16
|
+
return jsxContent;
|
|
17
|
+
}
|
|
18
|
+
return code;
|
|
19
|
+
};
|
|
20
|
+
// Extract only specific components (e.g., only Box components)
|
|
21
|
+
export var extractComponents = function(componentName) {
|
|
22
|
+
return function(code) {
|
|
23
|
+
var componentRegex = new RegExp("<".concat(componentName, "[^>]*>[\\s\\S]*?<\\/").concat(componentName, ">"), 'g');
|
|
24
|
+
var matches = code.match(componentRegex);
|
|
25
|
+
if (matches) {
|
|
26
|
+
return matches.join('\n\n');
|
|
27
|
+
}
|
|
28
|
+
return code;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
// Extract render content and remove wrapper elements
|
|
32
|
+
export var extractRenderContent = function(code) {
|
|
33
|
+
var renderMatch = code.match(/render:\s*\(\)\s*=>\s*([\s\S]*?)(?=,\s*parameters|,\s*args|$)/);
|
|
34
|
+
if (renderMatch) {
|
|
35
|
+
var jsxContent = renderMatch[1].trim();
|
|
36
|
+
// Remove trailing semicolon
|
|
37
|
+
if (jsxContent.endsWith(';')) {
|
|
38
|
+
jsxContent = jsxContent.slice(0, -1).trim();
|
|
39
|
+
}
|
|
40
|
+
// Remove wrapper parentheses
|
|
41
|
+
if (jsxContent.startsWith('(') && jsxContent.endsWith(')')) {
|
|
42
|
+
jsxContent = jsxContent.slice(1, -1).trim();
|
|
43
|
+
}
|
|
44
|
+
return jsxContent;
|
|
45
|
+
}
|
|
46
|
+
return code;
|
|
47
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineConfig } from "vite";
|
|
2
|
+
import react from "@vitejs/plugin-react";
|
|
3
|
+
import tailwind from "@tailwindcss/postcss";
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
plugins: [
|
|
6
|
+
react()
|
|
7
|
+
],
|
|
8
|
+
esbuild: {
|
|
9
|
+
loader: 'jsx',
|
|
10
|
+
include: /src\/.*\.[jt]sx?$/,
|
|
11
|
+
exclude: []
|
|
12
|
+
},
|
|
13
|
+
optimizeDeps: {
|
|
14
|
+
esbuildOptions: {
|
|
15
|
+
loader: {
|
|
16
|
+
'.js': 'jsx'
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
});
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
export default ActionList;
|
|
2
|
+
export type SecondaryAction = {
|
|
3
|
+
/**
|
|
4
|
+
* - The icon to display for the secondary action.
|
|
5
|
+
*/
|
|
6
|
+
icon: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
|
7
|
+
/**
|
|
8
|
+
* - The tooltip to display for the secondary action.
|
|
9
|
+
*/
|
|
10
|
+
tooltip: string;
|
|
11
|
+
/**
|
|
12
|
+
* - The function to call when the secondary action is selected.
|
|
13
|
+
*/
|
|
14
|
+
onAction: Function;
|
|
15
|
+
};
|
|
16
|
+
export type ActionListSection = {
|
|
17
|
+
/**
|
|
18
|
+
* - The title of the section.
|
|
19
|
+
*/
|
|
20
|
+
title: string;
|
|
21
|
+
/**
|
|
22
|
+
* - The items to display in the section.
|
|
23
|
+
*/
|
|
24
|
+
items: Array<ActionListItem>;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* - An object representing an item in the action list.
|
|
28
|
+
*/
|
|
29
|
+
export type ActionListItem = {
|
|
30
|
+
/**
|
|
31
|
+
* - The text content of the action item.
|
|
32
|
+
*/
|
|
33
|
+
content: string;
|
|
34
|
+
/**
|
|
35
|
+
* - Whether the action item is disabled.
|
|
36
|
+
*/
|
|
37
|
+
disabled: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* - Whether the action item is destructive.
|
|
40
|
+
*/
|
|
41
|
+
destructive: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* - The icon to display for the action item.
|
|
44
|
+
*/
|
|
45
|
+
icon: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
|
46
|
+
/**
|
|
47
|
+
* - The function to call when the action item is selected.
|
|
48
|
+
*/
|
|
49
|
+
onAction: Function;
|
|
50
|
+
/**
|
|
51
|
+
* - The prefix to display for the action item.
|
|
52
|
+
*/
|
|
53
|
+
prefix: React.ReactNode;
|
|
54
|
+
/**
|
|
55
|
+
* - The image to display for the action item.
|
|
56
|
+
*/
|
|
57
|
+
imageUrl: string;
|
|
58
|
+
/**
|
|
59
|
+
* - The URL to navigate to when the action item is selected.
|
|
60
|
+
*/
|
|
61
|
+
url: string;
|
|
62
|
+
/**
|
|
63
|
+
* - The secondary action to display for the action item.
|
|
64
|
+
*/
|
|
65
|
+
secondaryAction: SecondaryAction;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* @typedef {Object} SecondaryAction
|
|
69
|
+
* @property {React.FunctionComponent<React.SVGProps<SVGSVGElement>>} icon - The icon to display for the secondary action.
|
|
70
|
+
* @property {string} tooltip - The tooltip to display for the secondary action.
|
|
71
|
+
* @property {function} onAction - The function to call when the secondary action is selected.
|
|
72
|
+
*/
|
|
73
|
+
/**
|
|
74
|
+
* @typedef {Object} ActionListSection
|
|
75
|
+
* @property {string} title - The title of the section.
|
|
76
|
+
* @property {Array<ActionListItem>} items - The items to display in the section.
|
|
77
|
+
*/
|
|
78
|
+
/**
|
|
79
|
+
* @typedef {Object} ActionListItem - An object representing an item in the action list.
|
|
80
|
+
* @property {string} content - The text content of the action item.
|
|
81
|
+
* @property {boolean} disabled - Whether the action item is disabled.
|
|
82
|
+
* @property {boolean} destructive - Whether the action item is destructive.
|
|
83
|
+
* @property {React.FunctionComponent<React.SVGProps<SVGSVGElement>>} icon - The icon to display for the action item.
|
|
84
|
+
* @property {function} onAction - The function to call when the action item is selected.
|
|
85
|
+
* @property {React.ReactNode} prefix - The prefix to display for the action item.
|
|
86
|
+
* @property {string} imageUrl - The image to display for the action item.
|
|
87
|
+
* @property {string} url - The URL to navigate to when the action item is selected.
|
|
88
|
+
* @property {SecondaryAction} secondaryAction - The secondary action to display for the action item.
|
|
89
|
+
*/
|
|
90
|
+
/**
|
|
91
|
+
* ActionList component renders a list of actionable items with optional sections.
|
|
92
|
+
* Supports keyboard navigation and action triggers on item selection.
|
|
93
|
+
*
|
|
94
|
+
* @component
|
|
95
|
+
* @param {Object} props - Component properties.
|
|
96
|
+
* @param {Array<{title: string, items: Array<ActionListItem>}>} [props.sections] - Sections containing items for the action list.
|
|
97
|
+
* @param {Array<ActionListItem>} [props.items] - List of items to render in the action list when no sections are provided.
|
|
98
|
+
* @param {string} [props.iconColor="subdued"] - Default color for icons in the action items.
|
|
99
|
+
* @param {function} [props.onActionAnyItem] - Callback function invoked whenever any action item is selected.
|
|
100
|
+
* @param {boolean} [props.fullWidth=false] - Whether to apply full width styling to the action list.
|
|
101
|
+
* @param {boolean} [props.padded=true] - Whether to apply padding to the action list.
|
|
102
|
+
* @param {string} [props.className] - Additional CSS classes to apply to the action list.
|
|
103
|
+
* @example
|
|
104
|
+
* const items = [{ content: 'Item 1', onAction: () => {} }];
|
|
105
|
+
* <ActionList items={items} />
|
|
106
|
+
*
|
|
107
|
+
* @returns {JSX.Element} The rendered ActionList component.
|
|
108
|
+
*/
|
|
109
|
+
declare function ActionList(props?: {
|
|
110
|
+
sections?: Array<{
|
|
111
|
+
title: string;
|
|
112
|
+
items: Array<ActionListItem>;
|
|
113
|
+
}>;
|
|
114
|
+
items?: Array<ActionListItem>;
|
|
115
|
+
iconColor?: string;
|
|
116
|
+
onActionAnyItem?: Function;
|
|
117
|
+
fullWidth?: boolean;
|
|
118
|
+
padded?: boolean;
|
|
119
|
+
className?: string;
|
|
120
|
+
}): JSX.Element;
|
|
121
|
+
import React from "react";
|
|
122
|
+
//# sourceMappingURL=ActionList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionList.d.ts","sourceRoot":"","sources":["../../../components/ActionList.js"],"names":[],"mappings":";;;;;UAoDc,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;;;;aACtD,MAAM;;;;;;;;;;WAMN,MAAM;;;;WACN,KAAK,CAAC,cAAc,CAAC;;;;;;;;;aAKrB,MAAM;;;;cACN,OAAO;;;;iBACP,OAAO;;;;UACP,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;;;;;;;;YAEtD,KAAK,CAAC,SAAS;;;;cACf,MAAM;;;;SACN,MAAM;;;;qBACN,eAAe;;AAvB7B;;;;;GAKG;AAEH;;;;GAIG;AAEH;;;;;;;;;;;GAWG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AAEH,oCAdG;IAAqE,QAAQ,GAArE,KAAK,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,CAAA;KAAC,CAAC;IACtB,KAAK,GAAnC,KAAK,CAAC,cAAc,CAAC;IACN,SAAS,GAAxB,MAAM;IACW,eAAe;IAChB,SAAS,GAAzB,OAAO;IACS,MAAM,GAAtB,OAAO;IACQ,SAAS,GAAxB,MAAM;CACd,GAIU,GAAG,CAAC,OAAO,CA0MvB;kBArSwC,OAAO"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export default AnnouncementBar;
|
|
2
|
+
/**
|
|
3
|
+
* AnnouncementBar Component
|
|
4
|
+
*
|
|
5
|
+
* @param {Object} props - Component properties.
|
|
6
|
+
* @param {Function} [props.onClick] - Click handler function.
|
|
7
|
+
* @param {string} props.content - Text content to be displayed.
|
|
8
|
+
* @param {string} [props.icon] - Icon source name.
|
|
9
|
+
* @param {"bounce"} [props.animateIcon] - Animation type for the icon.
|
|
10
|
+
* @param {boolean} [props.fixed] - Whether to fix the announcement bar to the top of the page.
|
|
11
|
+
*
|
|
12
|
+
* @returns {JSX.Element} AnnouncementBar component.
|
|
13
|
+
*/
|
|
14
|
+
declare function AnnouncementBar(props?: {
|
|
15
|
+
onClick?: Function;
|
|
16
|
+
content: string;
|
|
17
|
+
icon?: string;
|
|
18
|
+
animateIcon?: "bounce";
|
|
19
|
+
fixed?: boolean;
|
|
20
|
+
}): JSX.Element;
|
|
21
|
+
//# sourceMappingURL=AnnouncementBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnnouncementBar.d.ts","sourceRoot":"","sources":["../../../components/AnnouncementBar.js"],"names":[],"mappings":";AA0BA;;;;;;;;;;;GAWG;AACH,yCARG;IAAyB,OAAO;IACV,OAAO,EAArB,MAAM;IACS,IAAI,GAAnB,MAAM;IACW,WAAW,GAA5B,QAAQ;IACQ,KAAK,GAArB,OAAO;CAEf,GAAU,GAAG,CAAC,OAAO,CAsBvB"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {Object} DarkModeContextType
|
|
3
|
+
* @property {boolean} darkModeAvailable - Whether dark mode is available.
|
|
4
|
+
* @property {boolean} darkMode - Whether dark mode is enabled.
|
|
5
|
+
* @property {(darkMode: boolean) => void} toggleDarkMode - Toggle dark mode.
|
|
6
|
+
* @property {(darkModeAvailable: boolean) => void} setDarkModeAvailable - Set dark mode availability.
|
|
7
|
+
*/
|
|
8
|
+
export const DarkModeContext: React.Context<any>;
|
|
9
|
+
export function useDarkMode(): DarkModeContextType;
|
|
10
|
+
export const FrameContext: React.Context<{
|
|
11
|
+
embedded: boolean;
|
|
12
|
+
paneIsOpen: boolean;
|
|
13
|
+
setPaneIsOpen: () => void;
|
|
14
|
+
modalIsOpen: boolean;
|
|
15
|
+
setModalIsOpen: () => void;
|
|
16
|
+
showMobileNavigation: boolean;
|
|
17
|
+
contentIsInIframe: boolean;
|
|
18
|
+
contentIsFullPage: boolean;
|
|
19
|
+
setShowMobileNavigation: () => void;
|
|
20
|
+
setContentIsInIframe: () => void;
|
|
21
|
+
setContentIsFullPage: () => void;
|
|
22
|
+
}>;
|
|
23
|
+
export const FormContext: React.Context<any>;
|
|
24
|
+
export default AppProvider;
|
|
25
|
+
export type DarkModeContextType = {
|
|
26
|
+
/**
|
|
27
|
+
* - Whether dark mode is available.
|
|
28
|
+
*/
|
|
29
|
+
darkModeAvailable: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* - Whether dark mode is enabled.
|
|
32
|
+
*/
|
|
33
|
+
darkMode: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* - Toggle dark mode.
|
|
36
|
+
*/
|
|
37
|
+
toggleDarkMode: (darkMode: boolean) => void;
|
|
38
|
+
/**
|
|
39
|
+
* - Set dark mode availability.
|
|
40
|
+
*/
|
|
41
|
+
setDarkModeAvailable: (darkModeAvailable: boolean) => void;
|
|
42
|
+
};
|
|
43
|
+
import React from "react";
|
|
44
|
+
/**
|
|
45
|
+
* Provider component for managing global application state.
|
|
46
|
+
* @param {Object} props
|
|
47
|
+
* @param {React.ReactNode} props.children - The child components.
|
|
48
|
+
* @param {boolean} props.embedded - Whether the app is embedded.
|
|
49
|
+
* @param {boolean} props.darkModeAvailable - Whether dark mode is enabled.
|
|
50
|
+
* @param {string} props.darkModeStorageKey - Local storage key for dark mode preference.
|
|
51
|
+
* @param {(darkMode: boolean) => void} props.onDarkModeChange - Callback when dark mode changes.
|
|
52
|
+
* @returns {JSX.Element}
|
|
53
|
+
*/
|
|
54
|
+
declare function AppProvider({ children, embedded, darkModeAvailable: _darkModeAvailable, darkModeStorageKey, onDarkModeChange, }: {
|
|
55
|
+
children: React.ReactNode;
|
|
56
|
+
embedded: boolean;
|
|
57
|
+
darkModeAvailable: boolean;
|
|
58
|
+
darkModeStorageKey: string;
|
|
59
|
+
onDarkModeChange: (darkMode: boolean) => void;
|
|
60
|
+
}): JSX.Element;
|
|
61
|
+
//# sourceMappingURL=AppProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppProvider.d.ts","sourceRoot":"","sources":["../../../components/AppProvider.js"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,iDAAmD;AAK5C,+BAFM,mBAAmB,CAe/B;AAED;;;;;;;;;;;;GAYG;AACH,6CAA+C;;;;;;uBAtCjC,OAAO;;;;cACP,OAAO;;;;oBACP,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI;;;;0BAC3B,CAAC,iBAAiB,EAAE,OAAO,KAAK,IAAI;;kBAPoB,OAAO;AAgF7E;;;;;;;;;GASG;AACH,mIAPG;IAA+B,QAAQ,EAA/B,KAAK,CAAC,SAAS;IACA,QAAQ,EAAvB,OAAO;IACQ,iBAAiB,EAAhC,OAAO;IACO,kBAAkB,EAAhC,MAAM;IAC6B,gBAAgB,EAAnD,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI;CACnC,GAAU,GAAG,CAAC,OAAO,CAsGvB"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
export default Autocomplete;
|
|
2
|
+
export type AutocompleteOption = {
|
|
3
|
+
/**
|
|
4
|
+
* - The label to display for the option.
|
|
5
|
+
*/
|
|
6
|
+
label: string;
|
|
7
|
+
/**
|
|
8
|
+
* - The value to associate with the option.
|
|
9
|
+
*/
|
|
10
|
+
value: string;
|
|
11
|
+
/**
|
|
12
|
+
* - An optional title to display for the option.
|
|
13
|
+
*/
|
|
14
|
+
title?: string;
|
|
15
|
+
/**
|
|
16
|
+
* - Whether multiple options can be selected.
|
|
17
|
+
*/
|
|
18
|
+
allowMultiple?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* - The value of the option that is currently selected.
|
|
21
|
+
*/
|
|
22
|
+
selected?: string;
|
|
23
|
+
/**
|
|
24
|
+
* - The function to call when the option is selected.
|
|
25
|
+
*/
|
|
26
|
+
onSelect?: Function;
|
|
27
|
+
/**
|
|
28
|
+
* - An optional array of sub-options to display for the option.
|
|
29
|
+
*/
|
|
30
|
+
options?: Array<AutocompleteOption>;
|
|
31
|
+
};
|
|
32
|
+
export type AutocompleteEmptyState = {
|
|
33
|
+
/**
|
|
34
|
+
* - The content to display in the empty state.
|
|
35
|
+
*/
|
|
36
|
+
content: string;
|
|
37
|
+
/**
|
|
38
|
+
* - An optional icon to display in the empty state.
|
|
39
|
+
*/
|
|
40
|
+
icon: React.ReactNode;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* @typedef {Object} AutocompleteOption
|
|
44
|
+
* @property {string} label - The label to display for the option.
|
|
45
|
+
* @property {string} value - The value to associate with the option.
|
|
46
|
+
* @property {string} [title] - An optional title to display for the option.
|
|
47
|
+
* @property {boolean} [allowMultiple] - Whether multiple options can be selected.
|
|
48
|
+
* @property {string} [selected] - The value of the option that is currently selected.
|
|
49
|
+
* @property {function} [onSelect] - The function to call when the option is selected.
|
|
50
|
+
* @property {Array<AutocompleteOption>} [options] - An optional array of sub-options to display for the option.
|
|
51
|
+
*/
|
|
52
|
+
/**
|
|
53
|
+
* @typedef {Object} AutocompleteEmptyState
|
|
54
|
+
* @property {string} content - The content to display in the empty state.
|
|
55
|
+
* @property {React.ReactNode} icon - An optional icon to display in the empty state.
|
|
56
|
+
*/
|
|
57
|
+
/**
|
|
58
|
+
* Autocomplete component that provides a flexible dropdown menu with search and selection capabilities.
|
|
59
|
+
*
|
|
60
|
+
* @component
|
|
61
|
+
* @param {Object} props - The props for the Autocomplete component.
|
|
62
|
+
* @param {Array<AutocompleteOption>} props.options - The options to display in the dropdown.
|
|
63
|
+
* @param {Array<string>} props.selected - The currently selected option values.
|
|
64
|
+
* @param {"below"|"above"} [props.preferredPosition="below"] - The preferred position of the dropdown relative to the activator.
|
|
65
|
+
* @param {"left"|"center"|"right"} [props.preferredAlignment="left"] - The preferred alignment of the dropdown.
|
|
66
|
+
* @param {boolean} [props.allowMultiple=false] - Whether multiple options can be selected.
|
|
67
|
+
* @param {boolean} [props.loading=false] - Whether to show a loading spinner in the dropdown.
|
|
68
|
+
* @param {AutocompleteEmptyState} [props.emptyState] - The content to display when there are no options.
|
|
69
|
+
* @param {function(Array<string>)} props.onSelect - Callback fired when the selection changes. Receives the new selected values.
|
|
70
|
+
* @param {React.ReactNode} props.textField - The activator for the dropdown, typically a `TextField` component.
|
|
71
|
+
* @param {string} [props.className] - Additional class names to apply to the component.
|
|
72
|
+
* @param {function} [props.onClose] - Callback fired when the dropdown closes.
|
|
73
|
+
* @param {number} [props.zIndexOverride] - Custom z-index for the dropdown.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* <Autocomplete
|
|
77
|
+
* options={[{ label: "Option 1", value: "1" }, { label: "Option 2", value: "2" }]}
|
|
78
|
+
* selected={["1"]}
|
|
79
|
+
* allowMultiple
|
|
80
|
+
* onSelect={(selected) => console.log(selected)}
|
|
81
|
+
* textField={<Autocomplete.TextField placeholder="Search..." />}
|
|
82
|
+
* />
|
|
83
|
+
*/
|
|
84
|
+
declare function Autocomplete(props?: {
|
|
85
|
+
options: Array<AutocompleteOption>;
|
|
86
|
+
selected: Array<string>;
|
|
87
|
+
preferredPosition?: "below" | "above";
|
|
88
|
+
preferredAlignment?: "left" | "center" | "right";
|
|
89
|
+
allowMultiple?: boolean;
|
|
90
|
+
loading?: boolean;
|
|
91
|
+
emptyState?: AutocompleteEmptyState;
|
|
92
|
+
onSelect: (arg0: Array<string>) => any;
|
|
93
|
+
textField: React.ReactNode;
|
|
94
|
+
className?: string;
|
|
95
|
+
onClose?: Function;
|
|
96
|
+
zIndexOverride?: number;
|
|
97
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
98
|
+
declare namespace Autocomplete {
|
|
99
|
+
export let displayName: string;
|
|
100
|
+
export { AutocompleteTextField as TextField };
|
|
101
|
+
}
|
|
102
|
+
import React from "react";
|
|
103
|
+
/**
|
|
104
|
+
* Autocomplete TextField component used as an activator for the Autocomplete dropdown.
|
|
105
|
+
*
|
|
106
|
+
* @component
|
|
107
|
+
* @param {Object} props - The props for the AutocompleteTextField component.
|
|
108
|
+
* @param {function} [props.onTextFieldFocus] - Callback fired when the TextField gains focus.
|
|
109
|
+
* @param {function} [props.onFocus] - Callback fired when the TextField gains focus (native TextField event).
|
|
110
|
+
* @param {string} [props.placeholder] - Placeholder text for the TextField.
|
|
111
|
+
* @param {string} [props.value] - The current value of the TextField.
|
|
112
|
+
* @param {string} [props.label] - The label for the TextField.
|
|
113
|
+
* @param {string} [props.labelHidden] - Whether to hide the label.
|
|
114
|
+
* @param {function} [props.onChange] - Callback fired when the TextField value changes.
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* <Autocomplete.TextField
|
|
118
|
+
* placeholder="Search..."
|
|
119
|
+
* onTextFieldFocus={() => console.log("Focused")}
|
|
120
|
+
* />
|
|
121
|
+
*/
|
|
122
|
+
declare function AutocompleteTextField(props?: {
|
|
123
|
+
onTextFieldFocus?: Function;
|
|
124
|
+
onFocus?: Function;
|
|
125
|
+
placeholder?: string;
|
|
126
|
+
value?: string;
|
|
127
|
+
label?: string;
|
|
128
|
+
labelHidden?: string;
|
|
129
|
+
onChange?: Function;
|
|
130
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
131
|
+
declare namespace AutocompleteTextField {
|
|
132
|
+
let displayName_1: string;
|
|
133
|
+
export { displayName_1 as displayName };
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=Autocomplete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../components/Autocomplete.js"],"names":[],"mappings":";;;;;WAkCc,MAAM;;;;WACN,MAAM;;;;YACN,MAAM;;;;oBACN,OAAO;;;;eACP,MAAM;;;;;;;;cAEN,KAAK,CAAC,kBAAkB,CAAC;;;;;;aAKzB,MAAM;;;;UACN,KAAK,CAAC,SAAS;;AAd7B;;;;;;;;;GASG;AAEH;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,sCAvBG;IAAyC,OAAO,EAAxC,KAAK,CAAC,kBAAkB,CAAC;IACJ,QAAQ,EAA7B,KAAK,CAAC,MAAM,CAAC;IACW,iBAAiB,GAAzC,OAAO,GAAC,OAAO;IACiB,kBAAkB,GAAlD,MAAM,GAAC,QAAQ,GAAC,OAAO;IACP,aAAa,GAA7B,OAAO;IACS,OAAO,GAAvB,OAAO;IACwB,UAAU,GAAzC,sBAAsB;IACS,QAAQ,EAAvC,CAAS,IAAa,EAAb,KAAK,CAAC,MAAM,CAAC,QAAC;IACA,SAAS,EAAhC,KAAK,CAAC,SAAS;IACA,SAAS,GAAxB,MAAM;IACW,OAAO;IACT,cAAc,GAA7B,MAAM;CAEd,2CAoJF;;;;;kBArN6D,OAAO;AAwNrE;;;;;;;;;;;;;;;;;;GAkBG;AAEH,+CAfG;IAAyB,gBAAgB;IAChB,OAAO;IACT,WAAW,GAA1B,MAAM;IACS,KAAK,GAApB,MAAM;IACS,KAAK,GAApB,MAAM;IACS,WAAW,GAA1B,MAAM;IACW,QAAQ;CAEjC,2CAqBF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export default Badge;
|
|
2
|
+
/**
|
|
3
|
+
* A Badge component that renders a small, colored label with a status or progress indicator. The badge can be configured with different statuses, progress states, and sizes.
|
|
4
|
+
*
|
|
5
|
+
* @component
|
|
6
|
+
* @param {object} props - Component properties.
|
|
7
|
+
* @param {React.ReactNode} props.children - Content to display within the badge.
|
|
8
|
+
* @param {"complete" | "incomplete" | "partiallyComplete" | null} [props.progress] - Progress state of the badge.
|
|
9
|
+
* @param {boolean} [props.capitalize] - Capitalize the first letter of the badge.
|
|
10
|
+
* @param {"default" | "info" | "success" | "warning" | "critical" | "attention" | "highlight"} [props.status="default"] - Status variant to style the badge.
|
|
11
|
+
* @param {string} [props.className] - Additional CSS classes to apply to the badge.
|
|
12
|
+
* @returns {JSX.Element} - Rendered Badge component with optional progress indicator.
|
|
13
|
+
*/
|
|
14
|
+
declare function Badge(props?: {
|
|
15
|
+
children: React.ReactNode;
|
|
16
|
+
progress?: "complete" | "incomplete" | "partiallyComplete" | null;
|
|
17
|
+
capitalize?: boolean;
|
|
18
|
+
status?: "default" | "info" | "success" | "warning" | "critical" | "attention" | "highlight";
|
|
19
|
+
className?: string;
|
|
20
|
+
}): JSX.Element;
|
|
21
|
+
//# sourceMappingURL=Badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../components/Badge.js"],"names":[],"mappings":";AAkFA;;;;;;;;;;;GAWG;AACH,+BAPG;IAA+B,QAAQ,EAA/B,KAAK,CAAC,SAAS;IACgD,QAAQ,GAAvE,UAAU,GAAG,YAAY,GAAG,mBAAmB,GAAG,IAAI;IACtC,UAAU,GAA1B,OAAO;IACqF,MAAM,GAAlG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,WAAW;IACpE,SAAS,GAAxB,MAAM;CACd,GAAU,GAAG,CAAC,OAAO,CA4BvB"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
export default Banner;
|
|
2
|
+
export type BannerStatus = "neutral" | "critical" | "highlight" | "success" | "warning" | "info" | "caution" | "attention";
|
|
3
|
+
export type BannerAction = {
|
|
4
|
+
/**
|
|
5
|
+
* - The button label text
|
|
6
|
+
*/
|
|
7
|
+
content: string;
|
|
8
|
+
/**
|
|
9
|
+
* - Whether the button should have primary styling
|
|
10
|
+
*/
|
|
11
|
+
primary?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* - Whether the button is disabled
|
|
14
|
+
*/
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* - Whether to show a loading state
|
|
18
|
+
*/
|
|
19
|
+
loading?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* - Click handler for the action
|
|
22
|
+
*/
|
|
23
|
+
onAction?: Function;
|
|
24
|
+
/**
|
|
25
|
+
* - URL to navigate to when clicked (opens in new tab)
|
|
26
|
+
*/
|
|
27
|
+
url?: string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* @typedef {'neutral' | 'critical' | 'highlight' | 'success' | 'warning' | 'info' | 'caution' | 'attention'} BannerStatus
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* @typedef BannerAction
|
|
34
|
+
* @property {string} content - The button label text
|
|
35
|
+
* @property {boolean} [primary=false] - Whether the button should have primary styling
|
|
36
|
+
* @property {boolean} [disabled=false] - Whether the button is disabled
|
|
37
|
+
* @property {boolean} [loading=false] - Whether to show a loading state
|
|
38
|
+
* @property {Function} [onAction] - Click handler for the action
|
|
39
|
+
* @property {string} [url] - URL to navigate to when clicked (opens in new tab)
|
|
40
|
+
*/
|
|
41
|
+
/**
|
|
42
|
+
* A Banner component that displays a styled banner with customizable title, status, icon, actions, and dismiss functionality.
|
|
43
|
+
* The banner style and content change based on the provided props, allowing for various statuses and themes.
|
|
44
|
+
*
|
|
45
|
+
* @component
|
|
46
|
+
*
|
|
47
|
+
* @param {Object} props - The properties for configuring the Banner component.
|
|
48
|
+
* @param {string} [props.title] - The title text for the banner. If not provided, no title will be displayed.
|
|
49
|
+
* @param {BannerStatus} [props.status='neutral'] - The status of the banner, which determines its color and icon.
|
|
50
|
+
* @param {Function} [props.onDismiss] - Callback function to handle the banner's dismiss action.
|
|
51
|
+
* @param {React.ReactNode} [props.children] - Additional content to display within the banner.
|
|
52
|
+
* @param {BannerAction} [props.action] - Primary action configuration object
|
|
53
|
+
* @param {BannerAction} [props.secondaryAction] - Secondary action configuration object
|
|
54
|
+
* @param {FunctionComponent} [props.icon] - Custom icon to display on the banner. If not provided, a default icon is used based on the status.
|
|
55
|
+
* @param {boolean} [props.spinner] - Shows a spinner icon instead of a status icon when set to true.
|
|
56
|
+
*
|
|
57
|
+
* @returns {JSX.Element} The rendered Banner component.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* <Banner
|
|
61
|
+
* title="Warning"
|
|
62
|
+
* status="warning"
|
|
63
|
+
* onDismiss={() => console.log('Dismissed')}
|
|
64
|
+
* action={{ content: "Action", primary: true, onAction: () => console.log('Action clicked') }}
|
|
65
|
+
* secondaryAction={{ content: "Learn more", link: true, monochrome: true, url: "https://example.com" }}
|
|
66
|
+
* />
|
|
67
|
+
*/
|
|
68
|
+
declare function Banner(props?: {
|
|
69
|
+
title?: string;
|
|
70
|
+
status?: BannerStatus;
|
|
71
|
+
onDismiss?: Function;
|
|
72
|
+
children?: React.ReactNode;
|
|
73
|
+
action?: BannerAction;
|
|
74
|
+
secondaryAction?: BannerAction;
|
|
75
|
+
icon?: FunctionComponent;
|
|
76
|
+
spinner?: boolean;
|
|
77
|
+
}): JSX.Element;
|
|
78
|
+
//# sourceMappingURL=Banner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../components/Banner.js"],"names":[],"mappings":";2BAwEa,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,WAAW;;;;;aAK9F,MAAM;;;;cACN,OAAO;;;;eACP,OAAO;;;;cACP,OAAO;;;;;;;;UAEP,MAAM;;AAXpB;;GAEG;AAEH;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,gCArBG;IAAuB,KAAK,GAApB,MAAM;IACe,MAAM,GAA3B,YAAY;IACK,SAAS;IACF,QAAQ,GAAhC,KAAK,CAAC,SAAS;IACM,MAAM,GAA3B,YAAY;IACS,eAAe,GAApC,YAAY;IACc,IAAI,GAA9B,iBAAiB;IACD,OAAO,GAAvB,OAAO;CAEf,GAAU,GAAG,CAAC,OAAO,CAoJvB"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export default Box;
|
|
2
|
+
/**
|
|
3
|
+
* Renders a customizable Box component with various styling options.
|
|
4
|
+
*
|
|
5
|
+
* @component
|
|
6
|
+
* @param {Object} props - Properties to configure the Box component.
|
|
7
|
+
* @param {string} [props.as='div'] - The HTML element to render as. Defaults to `div`.
|
|
8
|
+
* @param {'default' | 'subdued'} [props.background] - Background color variant.
|
|
9
|
+
* @param {'default' | 'subdued'} [props.borderColor] - Border color variant.
|
|
10
|
+
* @param {'default' | 'sm' | 'lg' | 'full'} [props.borderRadius] - Border radius variant.
|
|
11
|
+
* @param {'none' | '0' | '1'} [props.borderBlockStartWidth] - Top border width variant.
|
|
12
|
+
* @param {'none' | '0' | '1'} [props.borderBlockEndWidth] - Bottom border width variant.
|
|
13
|
+
* @param {'none' | '0' | '1'} [props.borderInlineStartWidth] - Left border width variant.
|
|
14
|
+
* @param {'none' | '0' | '1'} [props.borderInlineEndWidth] - Right border width variant.
|
|
15
|
+
* @param {'none' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10'} [props.padding] - Padding for all sides.
|
|
16
|
+
* @param {'none' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10'} [props.paddingBlockStart] - Top padding.
|
|
17
|
+
* @param {'none' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10'} [props.paddingBlockEnd] - Bottom padding.
|
|
18
|
+
* @param {'none' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10'} [props.paddingInlineStart] - Left padding.
|
|
19
|
+
* @param {'none' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10'} [props.paddingInlineEnd] - Right padding.
|
|
20
|
+
* @param {'hidden' | 'scroll'} [props.overflow] - Overflow setting for all sides.
|
|
21
|
+
* @param {'hidden' | 'scroll'} [props.overflowX] - Overflow setting for x-axis.
|
|
22
|
+
* @param {'hidden' | 'scroll'} [props.overflowY] - Overflow setting for y-axis.
|
|
23
|
+
* @param {'relative' | 'absolute' | 'fixed' | 'sticky'} [props.position] - CSS positioning of the box.
|
|
24
|
+
* @param {React.ReactNode} [props.children] - Child elements to render inside the Box.
|
|
25
|
+
* @param {string} [props.id] - ID for the Box element.
|
|
26
|
+
* @param {number | string} [props.height] - CSS height of the Box.
|
|
27
|
+
* @param {number | string} [props.width] - CSS width of the Box.
|
|
28
|
+
* @param {number | string} [props.minHeight] - Minimum CSS height.
|
|
29
|
+
* @param {number | string} [props.maxHeight] - Maximum CSS height.
|
|
30
|
+
* @param {number | string} [props.minWidth] - Minimum CSS width.
|
|
31
|
+
* @param {number | string} [props.maxWidth] - Maximum CSS width.
|
|
32
|
+
* @param {number | string} [props.zIndex] - CSS z-index.
|
|
33
|
+
* @param {Object} [props.style] - Additional inline styles for the Box.
|
|
34
|
+
* @param {string} [props.className] - Additional CSS classes to apply to the Box.
|
|
35
|
+
* @param {Function} [props.onClick] - Click handler for the Box.
|
|
36
|
+
*
|
|
37
|
+
* @returns {JSX.Element} A rendered Box component with customized styling.
|
|
38
|
+
*/
|
|
39
|
+
declare function Box(props?: {
|
|
40
|
+
as?: string;
|
|
41
|
+
background?: "default" | "subdued";
|
|
42
|
+
borderColor?: "default" | "subdued";
|
|
43
|
+
borderRadius?: "default" | "sm" | "lg" | "full";
|
|
44
|
+
borderBlockStartWidth?: "none" | "0" | "1";
|
|
45
|
+
borderBlockEndWidth?: "none" | "0" | "1";
|
|
46
|
+
borderInlineStartWidth?: "none" | "0" | "1";
|
|
47
|
+
borderInlineEndWidth?: "none" | "0" | "1";
|
|
48
|
+
padding?: "none" | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10";
|
|
49
|
+
paddingBlockStart?: "none" | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10";
|
|
50
|
+
paddingBlockEnd?: "none" | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10";
|
|
51
|
+
paddingInlineStart?: "none" | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10";
|
|
52
|
+
paddingInlineEnd?: "none" | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10";
|
|
53
|
+
overflow?: "hidden" | "scroll";
|
|
54
|
+
overflowX?: "hidden" | "scroll";
|
|
55
|
+
overflowY?: "hidden" | "scroll";
|
|
56
|
+
position?: "relative" | "absolute" | "fixed" | "sticky";
|
|
57
|
+
children?: React.ReactNode;
|
|
58
|
+
id?: string;
|
|
59
|
+
height?: number | string;
|
|
60
|
+
width?: number | string;
|
|
61
|
+
minHeight?: number | string;
|
|
62
|
+
maxHeight?: number | string;
|
|
63
|
+
minWidth?: number | string;
|
|
64
|
+
maxWidth?: number | string;
|
|
65
|
+
zIndex?: number | string;
|
|
66
|
+
style?: any;
|
|
67
|
+
className?: string;
|
|
68
|
+
onClick?: Function;
|
|
69
|
+
}): JSX.Element;
|
|
70
|
+
//# sourceMappingURL=Box.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../components/Box.js"],"names":[],"mappings":";AAkIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoCE;AACF,6BAhCG;IAAuB,EAAE,GAAjB,MAAM;IACwB,UAAU,GAAxC,SAAS,GAAG,SAAS;IACS,WAAW,GAAzC,SAAS,GAAG,SAAS;IACoB,YAAY,GAArD,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM;IACL,qBAAqB,GAAhD,MAAM,GAAG,GAAG,GAAG,GAAG;IACS,mBAAmB,GAA9C,MAAM,GAAG,GAAG,GAAG,GAAG;IACS,sBAAsB,GAAjD,MAAM,GAAG,GAAG,GAAG,GAAG;IACS,oBAAoB,GAA/C,MAAM,GAAG,GAAG,GAAG,GAAG;IACgE,OAAO,GAAzF,MAAM,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI;IACS,iBAAiB,GAAnG,MAAM,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI;IACS,eAAe,GAAjG,MAAM,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI;IACS,kBAAkB,GAApG,MAAM,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI;IACS,gBAAgB,GAAlG,MAAM,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI;IAC7C,QAAQ,GAApC,QAAQ,GAAG,QAAQ;IACS,SAAS,GAArC,QAAQ,GAAG,QAAQ;IACS,SAAS,GAArC,QAAQ,GAAG,QAAQ;IACkC,QAAQ,GAA7D,UAAU,GAAG,UAAU,GAAG,OAAO,GAAG,QAAQ;IACpB,QAAQ,GAAhC,KAAK,CAAC,SAAS;IACA,EAAE,GAAjB,MAAM;IACkB,MAAM,GAA9B,MAAM,GAAG,MAAM;IACS,KAAK,GAA7B,MAAM,GAAG,MAAM;IACS,SAAS,GAAjC,MAAM,GAAG,MAAM;IACS,SAAS,GAAjC,MAAM,GAAG,MAAM;IACS,QAAQ,GAAhC,MAAM,GAAG,MAAM;IACS,QAAQ,GAAhC,MAAM,GAAG,MAAM;IACS,MAAM,GAA9B,MAAM,GAAG,MAAM;IACA,KAAK;IACL,SAAS,GAAxB,MAAM;IACW,OAAO;CAEhC,GAAU,GAAG,CAAC,OAAO,CA6EvB"}
|