@heymantle/litho 0.0.3 → 0.0.4
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 +33 -11
- 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 +34 -12
- package/dist/cjs/components/Card.js +5 -45
- package/dist/cjs/components/Checkbox.js +16 -6
- package/dist/cjs/components/ChoiceList.js +7 -4
- package/dist/cjs/components/ColorField.js +8 -3
- package/dist/cjs/components/DatePicker.js +13 -8
- package/dist/cjs/components/DropZone.js +33 -18
- package/dist/cjs/components/EmptyState.js +15 -7
- package/dist/cjs/components/Filters.js +32 -20
- package/dist/cjs/components/FooterHelp.js +7 -2
- package/dist/cjs/components/Form.js +18 -3
- package/dist/cjs/components/Frame.js +40 -15
- package/dist/cjs/components/FrameSaveBar.js +21 -12
- 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 +1 -0
- 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 +118 -35
- 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/Table.js +32 -19
- 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/dev/verify-publish.js +37 -4
- 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 +871 -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 +599 -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 +884 -0
- package/dist/cjs/stories/Collapsible.stories.js +905 -0
- package/dist/cjs/stories/ColorField.stories.js +883 -0
- package/dist/cjs/stories/ContextualSaveBar.stories.js +970 -0
- package/dist/cjs/stories/DatePicker.stories.js +584 -0
- package/dist/cjs/stories/Divider.stories.js +759 -0
- package/dist/cjs/stories/DropZone.stories.js +1205 -0
- package/dist/cjs/stories/EmptyState.stories.js +296 -0
- package/dist/cjs/stories/Filters.stories.js +1353 -0
- package/dist/cjs/stories/FooterHelp.stories.js +869 -0
- package/dist/cjs/stories/Form.stories.js +940 -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 +596 -0
- package/dist/cjs/stories/Image.stories.js +883 -0
- package/dist/cjs/stories/InlineError.stories.js +710 -0
- package/dist/cjs/stories/Label.stories.js +665 -0
- package/dist/cjs/stories/Layout.stories.js +685 -0
- package/dist/cjs/stories/LayoutSection.stories.js +1267 -0
- package/dist/cjs/stories/Link.stories.js +423 -0
- package/dist/cjs/stories/List.stories.js +1031 -0
- package/dist/cjs/stories/Listbox.stories.js +820 -0
- package/dist/cjs/stories/Loading.stories.js +900 -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 +318 -0
- package/dist/cjs/stories/Pagination.stories.js +438 -0
- package/dist/cjs/stories/Pane.stories.js +1535 -0
- package/dist/cjs/stories/Popover.stories.js +637 -0
- package/dist/cjs/stories/PopoverManager.stories.js +1225 -0
- package/dist/cjs/stories/ProgressBar.stories.js +506 -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 +892 -0
- package/dist/cjs/stories/ResourceList.stories.js +1067 -0
- package/dist/cjs/stories/Select.stories.js +413 -0
- package/dist/cjs/stories/SkeletonText.stories.js +776 -0
- package/dist/cjs/stories/Spinner.stories.js +396 -0
- package/dist/cjs/stories/Table.stories.js +628 -0
- package/dist/cjs/stories/Tabs.stories.js +723 -0
- package/dist/cjs/stories/Tag.stories.js +620 -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 +859 -0
- package/dist/cjs/stories/TimePicker.stories.js +966 -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 +155 -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 +21 -4
- 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 +24 -7
- package/dist/esm/components/Card.js +5 -4
- package/dist/esm/components/Checkbox.js +6 -1
- package/dist/esm/components/ChoiceList.js +7 -4
- package/dist/esm/components/ColorField.js +1 -1
- package/dist/esm/components/DatePicker.js +6 -1
- package/dist/esm/components/DropZone.js +14 -4
- package/dist/esm/components/EmptyState.js +4 -1
- package/dist/esm/components/Filters.js +10 -3
- package/dist/esm/components/FooterHelp.js +1 -1
- package/dist/esm/components/Form.js +18 -3
- package/dist/esm/components/Frame.js +18 -6
- package/dist/esm/components/FrameSaveBar.js +10 -6
- 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 +1 -0
- 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 +114 -36
- 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/Table.js +16 -3
- 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/dev/verify-publish.js +37 -4
- 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 +833 -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 +558 -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 +834 -0
- package/dist/esm/stories/Collapsible.stories.js +867 -0
- package/dist/esm/stories/ColorField.stories.js +842 -0
- package/dist/esm/stories/ContextualSaveBar.stories.js +938 -0
- package/dist/esm/stories/DatePicker.stories.js +537 -0
- package/dist/esm/stories/Divider.stories.js +715 -0
- package/dist/esm/stories/DropZone.stories.js +1161 -0
- package/dist/esm/stories/EmptyState.stories.js +246 -0
- package/dist/esm/stories/Filters.stories.js +1315 -0
- package/dist/esm/stories/FooterHelp.stories.js +813 -0
- package/dist/esm/stories/Form.stories.js +905 -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 +555 -0
- package/dist/esm/stories/Image.stories.js +836 -0
- package/dist/esm/stories/InlineError.stories.js +666 -0
- package/dist/esm/stories/Label.stories.js +612 -0
- package/dist/esm/stories/Layout.stories.js +647 -0
- package/dist/esm/stories/LayoutSection.stories.js +1226 -0
- package/dist/esm/stories/Link.stories.js +379 -0
- package/dist/esm/stories/List.stories.js +975 -0
- package/dist/esm/stories/Listbox.stories.js +776 -0
- package/dist/esm/stories/Loading.stories.js +850 -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 +276 -0
- package/dist/esm/stories/Pagination.stories.js +394 -0
- package/dist/esm/stories/Pane.stories.js +1497 -0
- package/dist/esm/stories/Popover.stories.js +605 -0
- package/dist/esm/stories/PopoverManager.stories.js +1193 -0
- package/dist/esm/stories/ProgressBar.stories.js +465 -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 +845 -0
- package/dist/esm/stories/ResourceList.stories.js +1029 -0
- package/dist/esm/stories/Select.stories.js +363 -0
- package/dist/esm/stories/SkeletonText.stories.js +717 -0
- package/dist/esm/stories/Spinner.stories.js +355 -0
- package/dist/esm/stories/Table.stories.js +584 -0
- package/dist/esm/stories/Tabs.stories.js +685 -0
- package/dist/esm/stories/Tag.stories.js +573 -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 +806 -0
- package/dist/esm/stories/TimePicker.stories.js +910 -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 +114 -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 +130 -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 +123 -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 +139 -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 +166 -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/Table.d.ts +197 -0
- package/dist/types/components/Table.d.ts.map +1 -0
- package/dist/types/components/Tabs.d.ts +41 -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 +62 -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 +6 -0
- package/package.json +37 -6
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
export default Button;
|
|
2
|
+
/**
|
|
3
|
+
* A Button component that renders a customizable button or link with various styles and states.
|
|
4
|
+
* The button can be configured with different variants, sizes, and can include icons, loading states,
|
|
5
|
+
* and connected disclosure actions.
|
|
6
|
+
*
|
|
7
|
+
* @component
|
|
8
|
+
*
|
|
9
|
+
* @param {Object} props - The properties for configuring the Button component.
|
|
10
|
+
* @param {string} [props.id] - Unique identifier for the button.
|
|
11
|
+
* @param {React.ReactNode} [props.children] - The content to display within the button.
|
|
12
|
+
* @param {string} [props.url] - URL to navigate to when clicked. If provided, renders as an anchor tag.
|
|
13
|
+
* @param {boolean} [props.disabled=false] - Whether the button is disabled.
|
|
14
|
+
* @param {boolean} [props.external] - Whether the URL should open in a new tab.
|
|
15
|
+
* @param {string} [props.target] - Target attribute for the anchor tag when URL is provided.
|
|
16
|
+
* @param {boolean} [props.submit] - Whether the button should act as a form submit button.
|
|
17
|
+
* @param {boolean} [props.loading=false] - Whether to show a loading spinner.
|
|
18
|
+
* @param {boolean} [props.pressed=false] - Whether the button appears pressed.
|
|
19
|
+
* @param {string} [props.accessibilityLabel] - Accessible label for screen readers.
|
|
20
|
+
* @param {string} [props.role] - ARIA role for the button.
|
|
21
|
+
* @param {string} [props.ariaControls] - ID of the element controlled by the button.
|
|
22
|
+
* @param {boolean} [props.ariaExpanded] - Whether the controlled element is expanded.
|
|
23
|
+
* @param {string} [props.ariaDescribedBy] - ID of the element that describes the button.
|
|
24
|
+
* @param {boolean} [props.ariaChecked] - Whether the button is checked (for toggle buttons).
|
|
25
|
+
* @param {React.Component} [props.icon] - Icon component to display within the button.
|
|
26
|
+
* @param {"default" | "primary" | "secondary" | "plain" | "link" | "destructive" | "highlight"} [props.iconColor='default'] - Color of the icon.
|
|
27
|
+
* @param {boolean} [props.primary=false] - Whether to show the primary button style.
|
|
28
|
+
* @param {boolean} [props.highlight=false] - Whether to show the highlight button style.
|
|
29
|
+
* @param {boolean} [props.link=false] - Whether to show a link style.
|
|
30
|
+
* @param {boolean} [props.destructive=false] - Whether to show destructive styling.
|
|
31
|
+
* @param {boolean} [props.disclosure=false] - Whether to show a disclosure arrow.
|
|
32
|
+
* @param {boolean} [props.disclosureRight=false] - Whether to show the disclosure on the right.
|
|
33
|
+
* @param {boolean} [props.plain=false] - Whether to show plain styling without background.
|
|
34
|
+
* @param {"small" | "medium" | "large" | "stepper"} [props.size='medium'] - Size of the button ('small', 'medium', 'large', 'stepper').
|
|
35
|
+
* @param {boolean} [props.fullWidth] - Whether the button should take full width.
|
|
36
|
+
* @param {"left" | "center" | "right"} [props.align='center'] - Alignment of the button content ('left', 'center', 'right').
|
|
37
|
+
* @param {string} [props.tooltip] - Tooltip to show when hovering over the button.
|
|
38
|
+
* @param {Object} [props.connectedDisclosure] - Configuration for connected disclosure menu.
|
|
39
|
+
* @param {Array<import("./ActionList").ActionListItem>} [props.connectedDisclosure.actions] - Actions to show in the disclosure menu.
|
|
40
|
+
* @param {string} [props.className] - Additional CSS classes for the button.
|
|
41
|
+
* @param {string} [props.contentClassName] - Additional CSS classes for the button content.
|
|
42
|
+
* @param {boolean} [props.rounded] - Whether to show fully rounded corners.
|
|
43
|
+
* @param {Function} [props.onClick] - Callback when the button is clicked.
|
|
44
|
+
* @param {Function} [props.onMouseDown] - Callback when the mouse is pressed on the button.
|
|
45
|
+
*
|
|
46
|
+
* @returns {JSX.Element} The rendered Button component.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```js
|
|
50
|
+
* // Basic button
|
|
51
|
+
* <Button onClick={() => console.log('Clicked')}>
|
|
52
|
+
* Click me
|
|
53
|
+
* </Button>
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```js
|
|
58
|
+
* // Primary button with icon and loading state
|
|
59
|
+
* <Button
|
|
60
|
+
* primary
|
|
61
|
+
* loading={isLoading}
|
|
62
|
+
* icon={SaveMinor}
|
|
63
|
+
* onClick={handleSave}
|
|
64
|
+
* >
|
|
65
|
+
* Save changes
|
|
66
|
+
* </Button>
|
|
67
|
+
* ```
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```js
|
|
71
|
+
* // Button with connected disclosure
|
|
72
|
+
* <Button
|
|
73
|
+
* connectedDisclosure={{
|
|
74
|
+
* actions: [
|
|
75
|
+
* { content: 'Option 1', onAction: () => {} },
|
|
76
|
+
* { content: 'Option 2', onAction: () => {} }
|
|
77
|
+
* ]
|
|
78
|
+
* }}
|
|
79
|
+
* >
|
|
80
|
+
* More actions
|
|
81
|
+
* </Button>
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
declare function Button(props?: {
|
|
85
|
+
id?: string;
|
|
86
|
+
children?: React.ReactNode;
|
|
87
|
+
url?: string;
|
|
88
|
+
disabled?: boolean;
|
|
89
|
+
external?: boolean;
|
|
90
|
+
target?: string;
|
|
91
|
+
submit?: boolean;
|
|
92
|
+
loading?: boolean;
|
|
93
|
+
pressed?: boolean;
|
|
94
|
+
accessibilityLabel?: string;
|
|
95
|
+
role?: string;
|
|
96
|
+
ariaControls?: string;
|
|
97
|
+
ariaExpanded?: boolean;
|
|
98
|
+
ariaDescribedBy?: string;
|
|
99
|
+
ariaChecked?: boolean;
|
|
100
|
+
icon?: React.Component;
|
|
101
|
+
iconColor?: "default" | "primary" | "secondary" | "plain" | "link" | "destructive" | "highlight";
|
|
102
|
+
primary?: boolean;
|
|
103
|
+
highlight?: boolean;
|
|
104
|
+
link?: boolean;
|
|
105
|
+
destructive?: boolean;
|
|
106
|
+
disclosure?: boolean;
|
|
107
|
+
disclosureRight?: boolean;
|
|
108
|
+
plain?: boolean;
|
|
109
|
+
size?: "small" | "medium" | "large" | "stepper";
|
|
110
|
+
fullWidth?: boolean;
|
|
111
|
+
align?: "left" | "center" | "right";
|
|
112
|
+
tooltip?: string;
|
|
113
|
+
connectedDisclosure?: {
|
|
114
|
+
actions?: Array<import("./ActionList").ActionListItem>;
|
|
115
|
+
};
|
|
116
|
+
className?: string;
|
|
117
|
+
contentClassName?: string;
|
|
118
|
+
rounded?: boolean;
|
|
119
|
+
onClick?: Function;
|
|
120
|
+
onMouseDown?: Function;
|
|
121
|
+
}): JSX.Element;
|
|
122
|
+
import React from "react";
|
|
123
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../components/Button.js"],"names":[],"mappings":";AAqfA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiFG;AAEH,gCA3EG;IAAuB,EAAE,GAAjB,MAAM;IACkB,QAAQ,GAAhC,KAAK,CAAC,SAAS;IACA,GAAG,GAAlB,MAAM;IACU,QAAQ,GAAxB,OAAO;IACS,QAAQ,GAAxB,OAAO;IACQ,MAAM,GAArB,MAAM;IACU,MAAM,GAAtB,OAAO;IACS,OAAO,GAAvB,OAAO;IACS,OAAO,GAAvB,OAAO;IACQ,kBAAkB,GAAjC,MAAM;IACS,IAAI,GAAnB,MAAM;IACS,YAAY,GAA3B,MAAM;IACU,YAAY,GAA5B,OAAO;IACQ,eAAe,GAA9B,MAAM;IACU,WAAW,GAA3B,OAAO;IACiB,IAAI,GAA5B,KAAK,CAAC,SAAS;IAC8E,SAAS,GAAtG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,MAAM,GAAG,aAAa,GAAG,WAAW;IACpE,OAAO,GAAvB,OAAO;IACS,SAAS,GAAzB,OAAO;IACS,IAAI,GAApB,OAAO;IACS,WAAW,GAA3B,OAAO;IACS,UAAU,GAA1B,OAAO;IACS,eAAe,GAA/B,OAAO;IACS,KAAK,GAArB,OAAO;IAC0C,IAAI,GAArD,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS;IACxB,SAAS,GAAzB,OAAO;IAC6B,KAAK,GAAzC,MAAM,GAAG,QAAQ,GAAG,OAAO;IACZ,OAAO,GAAtB,MAAM;IACS,mBAAmB,GAC1C;QAAiF,OAAO,GAAhF,KAAK,CAAC,OAAO,cAAc,EAAE,cAAc,CAAC;KACpD;IAAuB,SAAS,GAAxB,MAAM;IACS,gBAAgB,GAA/B,MAAM;IACU,OAAO,GAAvB,OAAO;IACU,OAAO;IACP,WAAW;CAEpC,GAAU,GAAG,CAAC,OAAO,CAiQvB;kBAhyBoD,OAAO"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export const ButtonGroupContext: React.Context<boolean>;
|
|
2
|
+
export default ButtonGroup;
|
|
3
|
+
import React from "react";
|
|
4
|
+
/**
|
|
5
|
+
* ButtonGroup Component
|
|
6
|
+
*
|
|
7
|
+
* @param {object} props - The properties object.
|
|
8
|
+
* @param {React.ReactNode} [props.children] - The child components to be rendered inside the button group.
|
|
9
|
+
* @param {boolean} [props.segmented=false] - Determines whether the button group has segmented styling.
|
|
10
|
+
* @param {string} [props.id] - The unique identifier for the button group.
|
|
11
|
+
* @param {string} [props.className] - Additional class names to be added to the button group.
|
|
12
|
+
* @param {boolean} [props.fullWidth=false] - Determines if the button group spans the full width of the container.
|
|
13
|
+
* @param {boolean} [props.noWrap=false] - Determines if the buttons inside the group do not wrap.
|
|
14
|
+
* @param {object} [props.restProps] - Additional props to be spread onto the container element.
|
|
15
|
+
* @returns {JSX.Element} The rendered ButtonGroup component.
|
|
16
|
+
*/
|
|
17
|
+
declare function ButtonGroup(props?: {
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
segmented?: boolean;
|
|
20
|
+
id?: string;
|
|
21
|
+
className?: string;
|
|
22
|
+
fullWidth?: boolean;
|
|
23
|
+
noWrap?: boolean;
|
|
24
|
+
restProps?: object;
|
|
25
|
+
}): JSX.Element;
|
|
26
|
+
//# sourceMappingURL=ButtonGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonGroup.d.ts","sourceRoot":"","sources":["../../../components/ButtonGroup.js"],"names":[],"mappings":"AAqBA,wDAAuD;;kBAnBlB,OAAO;AAqB5C;;;;;;;;;;;;GAYG;AAEH,qCAVG;IAAgC,QAAQ,GAAhC,KAAK,CAAC,SAAS;IACC,SAAS,GAAzB,OAAO;IACQ,EAAE,GAAjB,MAAM;IACS,SAAS,GAAxB,MAAM;IACU,SAAS,GAAzB,OAAO;IACS,MAAM,GAAtB,OAAO;IACQ,SAAS,GAAxB,MAAM;CACd,GAAU,GAAG,CAAC,OAAO,CA+BvB"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
export default Card;
|
|
2
|
+
/**
|
|
3
|
+
* Card component for creating styled containers with optional headers, actions, and children.
|
|
4
|
+
*
|
|
5
|
+
* @component
|
|
6
|
+
* @param {Object} props - Props for the Card component.
|
|
7
|
+
* @param {boolean} [props.allowOverflow=false] - Allows content to overflow the Card boundaries.
|
|
8
|
+
* @param {React.ReactNode} [props.children] - Child elements to render inside the Card.
|
|
9
|
+
* @param {boolean} [props.hideOnPrint] - Hides the Card when printing.
|
|
10
|
+
* @param {string|React.ReactNode} [props.title] - Title of the Card.
|
|
11
|
+
* @param {string} [props.titleVariant='headingMd'] - Typography variant for the Card title.
|
|
12
|
+
* @param {string} [props.description] - Description of the Card.
|
|
13
|
+
* @param {React.ElementType|Object} [props.icon] - Icon to render alongside the title.
|
|
14
|
+
* @param {React.ReactNode|import("./Tooltip").TooltipContentObject} [props.tooltip] - Tooltip content for the title.
|
|
15
|
+
* @param {string} [props.tooltipPreferredPosition='above'] - Preferred position for the tooltip.
|
|
16
|
+
* @param {boolean} [props.outlined=false] - Applies outlined styling to the Card.
|
|
17
|
+
* @param {string} [props.shadow='default'] - Applies a shadow to the Card. Can be 'default', or 'none'.
|
|
18
|
+
* @param {boolean} [props.highlighted=false] - Applies highlighted styling to the Card.
|
|
19
|
+
* @param {boolean} [props.subdued=false] - Applies subdued styling to the Card.
|
|
20
|
+
* @param {boolean} [props.alternate=false] - Applies alternate styling to the Card.
|
|
21
|
+
* @param {boolean} [props.padded=false] - Adds padding to the Card body.
|
|
22
|
+
* @param {boolean} [props.loading=false] - Shows a loading spinner in place of the title.
|
|
23
|
+
* @param {boolean} [props.paddedHalf=false] - Adds half padding to the Card body.
|
|
24
|
+
* @param {boolean} [props.removeHeaderBottomPadding=false] - Removes bottom padding from the header.
|
|
25
|
+
* @param {Function} [props.onClick] - Click handler for the Card, making it clickable.
|
|
26
|
+
* @param {Object} [props.emptyState={}] - Configures the empty state of the Card.
|
|
27
|
+
* @param {Object} [props.action] - Action button or configuration to render in the Card header.
|
|
28
|
+
* @param {string} [props.className] - Additional classes to apply to the Card.
|
|
29
|
+
* @param {string} [props.headerClassName] - Additional classes to apply to the Card header.
|
|
30
|
+
* @param {React.ReactNode} [props.accessory] - Accessory element to render in the header.
|
|
31
|
+
* @param {boolean} [props.fullWidthOnMobile=true] - Makes the Card full width on mobile.
|
|
32
|
+
* @param {boolean} [props.roundedOnMobile=false] - Makes the Card rounded on mobile.
|
|
33
|
+
* @returns {React.ReactElement} The rendered Card component.
|
|
34
|
+
*/
|
|
35
|
+
declare function Card({ allowOverflow, roundedOnMobile, children, hideOnPrint, title, titleVariant, description, icon, tooltip, tooltipPreferredPosition, outlined, highlighted, subdued, alternate, padded, loading, paddedHalf, removeHeaderBottomPadding, onClick, emptyState, action, className, headerClassName, accessory, fullHeightBody, fullWidthOnMobile, shadow, }: {
|
|
36
|
+
allowOverflow?: boolean;
|
|
37
|
+
children?: React.ReactNode;
|
|
38
|
+
hideOnPrint?: boolean;
|
|
39
|
+
title?: string | React.ReactNode;
|
|
40
|
+
titleVariant?: string;
|
|
41
|
+
description?: string;
|
|
42
|
+
icon?: React.ElementType | any;
|
|
43
|
+
tooltip?: React.ReactNode | import("./Tooltip").TooltipContentObject;
|
|
44
|
+
tooltipPreferredPosition?: string;
|
|
45
|
+
outlined?: boolean;
|
|
46
|
+
shadow?: string;
|
|
47
|
+
highlighted?: boolean;
|
|
48
|
+
subdued?: boolean;
|
|
49
|
+
alternate?: boolean;
|
|
50
|
+
padded?: boolean;
|
|
51
|
+
loading?: boolean;
|
|
52
|
+
paddedHalf?: boolean;
|
|
53
|
+
removeHeaderBottomPadding?: boolean;
|
|
54
|
+
onClick?: Function;
|
|
55
|
+
emptyState?: any;
|
|
56
|
+
action?: any;
|
|
57
|
+
className?: string;
|
|
58
|
+
headerClassName?: string;
|
|
59
|
+
accessory?: React.ReactNode;
|
|
60
|
+
fullWidthOnMobile?: boolean;
|
|
61
|
+
roundedOnMobile?: boolean;
|
|
62
|
+
}): React.ReactElement;
|
|
63
|
+
declare namespace Card {
|
|
64
|
+
/**
|
|
65
|
+
* Section component for dividing the Card into segments.
|
|
66
|
+
*
|
|
67
|
+
* @component
|
|
68
|
+
* @param {Object} props - Props for the Section component.
|
|
69
|
+
* @param {string|React.ReactNode} [props.title] - Title of the Section.
|
|
70
|
+
* @param {string} [props.titleVariant='headingSm'] - Typography variant for the Section title.
|
|
71
|
+
* @param {Object} [props.action] - Action button or configuration to render in the Section header.
|
|
72
|
+
* @param {React.ReactNode} [props.children] - Child elements to render inside the Section.
|
|
73
|
+
* @param {boolean} [props.padded=true] - Adds padding to the Section body.
|
|
74
|
+
* @param {boolean} [props.paddedHalf=false] - Adds half padding to the Section body.
|
|
75
|
+
* @param {boolean} [props.isFirst=false] - Indicates whether this is the first Section in the Card.
|
|
76
|
+
* @param {boolean} [props.cardHasHeader=false] - Indicates whether the Card has a header.
|
|
77
|
+
* @param {boolean} [props.borderBottom=true] - Adds a bottom border to the Section.
|
|
78
|
+
* @param {boolean} [props.borderTop=false] - Adds a top border to the Section.
|
|
79
|
+
* @param {boolean} [props.subdued=false] - Applies subdued styling to the Section.
|
|
80
|
+
* @param {string} [props.headerGap='0'] - Gap between items in the Section header.
|
|
81
|
+
* @param {string} [props.gap='0'] - Gap between items in the Section body.
|
|
82
|
+
* @param {React.ElementType|Object} [props.icon] - Icon to render alongside the title.
|
|
83
|
+
* @param {string} [props.tooltip] - Tooltip content for the title.
|
|
84
|
+
* @param {string} [props.description] - Description text for the Section.
|
|
85
|
+
* @param {React.ReactNode} [props.accessory] - Accessory element to render in the Section header.
|
|
86
|
+
* @param {Object} [props.emptyState={}] - Configures the empty state of the Section.
|
|
87
|
+
*
|
|
88
|
+
* @returns {React.ReactElement} The rendered Section component.
|
|
89
|
+
*/
|
|
90
|
+
function Section({ title, titleVariant, action, children, padded, paddedHalf, isFirst, cardHasHeader, borderBottom, borderTop, subdued, headerGap, gap, icon, tooltip, description, accessory, emptyState, className, }: {
|
|
91
|
+
title?: string | React.ReactNode;
|
|
92
|
+
titleVariant?: string;
|
|
93
|
+
action?: any;
|
|
94
|
+
children?: React.ReactNode;
|
|
95
|
+
padded?: boolean;
|
|
96
|
+
paddedHalf?: boolean;
|
|
97
|
+
isFirst?: boolean;
|
|
98
|
+
cardHasHeader?: boolean;
|
|
99
|
+
borderBottom?: boolean;
|
|
100
|
+
borderTop?: boolean;
|
|
101
|
+
subdued?: boolean;
|
|
102
|
+
headerGap?: string;
|
|
103
|
+
gap?: string;
|
|
104
|
+
icon?: React.ElementType | any;
|
|
105
|
+
tooltip?: string;
|
|
106
|
+
description?: string;
|
|
107
|
+
accessory?: React.ReactNode;
|
|
108
|
+
emptyState?: any;
|
|
109
|
+
}): React.ReactElement;
|
|
110
|
+
namespace Section {
|
|
111
|
+
let displayName: string;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* ClickableRow component for creating clickable rows inside the Card.
|
|
115
|
+
*
|
|
116
|
+
* @component
|
|
117
|
+
* @param {Object} props - Props for the ClickableRow component.
|
|
118
|
+
* @param {React.ReactNode} [props.children] - Child elements to render inside the row.
|
|
119
|
+
* @param {Function} [props.onClick] - Click handler for the row.
|
|
120
|
+
* @param {string} [props.id] - ID to apply to the row element.
|
|
121
|
+
* @param {string} [props.url] - URL to open when the row is clicked.
|
|
122
|
+
* @param {boolean} [props.disabled=false] - Disables interaction with the row.
|
|
123
|
+
*
|
|
124
|
+
* @returns {React.ReactElement} The rendered ClickableRow component.
|
|
125
|
+
*/
|
|
126
|
+
function ClickableRow({ children, onClick, id, url, disabled, className }: {
|
|
127
|
+
children?: React.ReactNode;
|
|
128
|
+
onClick?: Function;
|
|
129
|
+
id?: string;
|
|
130
|
+
url?: string;
|
|
131
|
+
disabled?: boolean;
|
|
132
|
+
}): React.ReactElement;
|
|
133
|
+
namespace ClickableRow {
|
|
134
|
+
let displayName_1: string;
|
|
135
|
+
export { displayName_1 as displayName };
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
import React from "react";
|
|
139
|
+
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../components/Card.js"],"names":[],"mappings":";AA8IA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,+WA7BG;IAAwB,aAAa,GAA7B,OAAO;IACiB,QAAQ,GAAhC,KAAK,CAAC,SAAS;IACC,WAAW,GAA3B,OAAO;IACwB,KAAK,GAApC,MAAM,GAAC,KAAK,CAAC,SAAS;IACP,YAAY,GAA3B,MAAM;IACS,WAAW,GAA1B,MAAM;IAC2B,IAAI,GAArC,KAAK,CAAC,WAAW,MAAO;IACyC,OAAO,GAAxE,KAAK,CAAC,SAAS,GAAC,OAAO,WAAW,EAAE,oBAAoB;IACzC,wBAAwB,GAAvC,MAAM;IACU,QAAQ,GAAxB,OAAO;IACQ,MAAM,GAArB,MAAM;IACU,WAAW,GAA3B,OAAO;IACS,OAAO,GAAvB,OAAO;IACS,SAAS,GAAzB,OAAO;IACS,MAAM,GAAtB,OAAO;IACS,OAAO,GAAvB,OAAO;IACS,UAAU,GAA1B,OAAO;IACS,yBAAyB,GAAzC,OAAO;IACU,OAAO;IACT,UAAU;IACV,MAAM;IACN,SAAS,GAAxB,MAAM;IACS,eAAe,GAA9B,MAAM;IACkB,SAAS,GAAjC,KAAK,CAAC,SAAS;IACC,iBAAiB,GAAjC,OAAO;IACS,eAAe,GAA/B,OAAO;CACf,GAAU,KAAK,CAAC,YAAY,CAoJ9B;;IA2FD;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IAEH,yNAtBG;QAAuC,KAAK,GAApC,MAAM,GAAC,KAAK,CAAC,SAAS;QACP,YAAY,GAA3B,MAAM;QACS,MAAM;QACG,QAAQ,GAAhC,KAAK,CAAC,SAAS;QACC,MAAM,GAAtB,OAAO;QACS,UAAU,GAA1B,OAAO;QACS,OAAO,GAAvB,OAAO;QACS,aAAa,GAA7B,OAAO;QACS,YAAY,GAA5B,OAAO;QACS,SAAS,GAAzB,OAAO;QACS,OAAO,GAAvB,OAAO;QACQ,SAAS,GAAxB,MAAM;QACS,GAAG,GAAlB,MAAM;QAC2B,IAAI,GAArC,KAAK,CAAC,WAAW,MAAO;QACT,OAAO,GAAtB,MAAM;QACS,WAAW,GAA1B,MAAM;QACkB,SAAS,GAAjC,KAAK,CAAC,SAAS;QACA,UAAU;KAEjC,GAAU,KAAK,CAAC,YAAY,CAyF9B;;;;IAYD;;;;;;;;;;;;OAYG;IACH,2EARG;QAAgC,QAAQ,GAAhC,KAAK,CAAC,SAAS;QACE,OAAO;QACT,EAAE,GAAjB,MAAM;QACS,GAAG,GAAlB,MAAM;QACU,QAAQ,GAAxB,OAAO;KAEf,GAAU,KAAK,CAAC,YAAY,CAgB9B;;;;;;kBAljBiB,OAAO"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export default Checkbox;
|
|
2
|
+
/**
|
|
3
|
+
* Checkbox Component
|
|
4
|
+
*
|
|
5
|
+
* A custom checkbox component with support for labels, help text, and extensive styling using Tailwind Variants (tv).
|
|
6
|
+
*
|
|
7
|
+
* @component
|
|
8
|
+
*
|
|
9
|
+
* @param {Object} props - Props for the Checkbox component.
|
|
10
|
+
* @param {string} [props.label] - The text label for the checkbox.
|
|
11
|
+
* @param {boolean} [props.labelHidden=false] - If true, hides the label visually but keeps it available for screen readers.
|
|
12
|
+
* @param {string} [props.id] - The unique identifier for the checkbox input.
|
|
13
|
+
* @param {string} [props.name] - The name attribute for the checkbox input.
|
|
14
|
+
* @param {string} [props.value] - The value attribute for the checkbox input.
|
|
15
|
+
* @param {string} [props.error] - An error message associated with the checkbox, if any.
|
|
16
|
+
* @param {boolean} [props.checked=false] - Indicates whether the checkbox is checked.
|
|
17
|
+
* @param {boolean} [props.disabled=false] - Indicates whether the checkbox is disabled.
|
|
18
|
+
* @param {string} [props.helpText] - Additional descriptive text for the checkbox.
|
|
19
|
+
* @param {React.ReactNode|import("./Tooltip").TooltipContentObject} [props.tooltip] - Tooltip content for the checkbox label.
|
|
20
|
+
* @param {boolean} [props.indeterminate=false] - Indicates whether the checkbox is in an indeterminate state (mixed/partial selection).
|
|
21
|
+
* @param {string} [props.className] - Additional CSS classes to apply to the checkbox container.
|
|
22
|
+
* @param {function} [props.onChange] - Callback function called when the checkbox state changes.
|
|
23
|
+
* @param {function} [props.onFocus] - Callback function called when the checkbox gains focus.
|
|
24
|
+
* @param {function} [props.onBlur] - Callback function called when the checkbox loses focus.
|
|
25
|
+
*
|
|
26
|
+
* @returns {JSX.Element} The rendered Checkbox component.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* <Checkbox
|
|
30
|
+
* label="Accept Terms"
|
|
31
|
+
* id="accept-terms"
|
|
32
|
+
* name="terms"
|
|
33
|
+
* checked={true}
|
|
34
|
+
* disabled={false}
|
|
35
|
+
* helpText="You must accept the terms to proceed."
|
|
36
|
+
* onChange={(e) => console.log('Checkbox changed:', e.target.checked)}
|
|
37
|
+
* />
|
|
38
|
+
*/
|
|
39
|
+
declare function Checkbox(props?: {
|
|
40
|
+
label?: string;
|
|
41
|
+
labelHidden?: boolean;
|
|
42
|
+
id?: string;
|
|
43
|
+
name?: string;
|
|
44
|
+
value?: string;
|
|
45
|
+
error?: string;
|
|
46
|
+
checked?: boolean;
|
|
47
|
+
disabled?: boolean;
|
|
48
|
+
helpText?: string;
|
|
49
|
+
tooltip?: React.ReactNode | import("./Tooltip").TooltipContentObject;
|
|
50
|
+
indeterminate?: boolean;
|
|
51
|
+
className?: string;
|
|
52
|
+
onChange?: Function;
|
|
53
|
+
onFocus?: Function;
|
|
54
|
+
onBlur?: Function;
|
|
55
|
+
}): JSX.Element;
|
|
56
|
+
//# sourceMappingURL=Checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../components/Checkbox.js"],"names":[],"mappings":";AAsDA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,kCA9BG;IAAuB,KAAK,GAApB,MAAM;IACU,WAAW,GAA3B,OAAO;IACQ,EAAE,GAAjB,MAAM;IACS,IAAI,GAAnB,MAAM;IACS,KAAK,GAApB,MAAM;IACS,KAAK,GAApB,MAAM;IACU,OAAO,GAAvB,OAAO;IACS,QAAQ,GAAxB,OAAO;IACQ,QAAQ,GAAvB,MAAM;IAC2D,OAAO,GAAxE,KAAK,CAAC,SAAS,GAAC,OAAO,WAAW,EAAE,oBAAoB;IACxC,aAAa,GAA7B,OAAO;IACQ,SAAS,GAAxB,MAAM;IACW,QAAQ;IACR,OAAO;IACP,MAAM;CAE/B,GAAU,GAAG,CAAC,OAAO,CAuHvB"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export default ChoiceList;
|
|
2
|
+
export type ChoiceListItem = {
|
|
3
|
+
/**
|
|
4
|
+
* - The value of the choice.
|
|
5
|
+
*/
|
|
6
|
+
value: string;
|
|
7
|
+
/**
|
|
8
|
+
* - The display label of the choice.
|
|
9
|
+
*/
|
|
10
|
+
label: string;
|
|
11
|
+
/**
|
|
12
|
+
* - Whether the choice is disabled.
|
|
13
|
+
*/
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* - A function that returns a React node to render as children of the choice.
|
|
17
|
+
*/
|
|
18
|
+
renderChildren?: React.ReactNode;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* @typedef {Object} ChoiceListItem
|
|
22
|
+
* @property {string} value - The value of the choice.
|
|
23
|
+
* @property {string} label - The display label of the choice.
|
|
24
|
+
* @property {boolean} [disabled=false] - Whether the choice is disabled.
|
|
25
|
+
* @property {React.ReactNode} [renderChildren] - A function that returns a React node to render as children of the choice.
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* A ChoiceList component for rendering a list of selectable options.
|
|
29
|
+
*
|
|
30
|
+
* @component
|
|
31
|
+
*
|
|
32
|
+
* @param {Object} props - The properties object.
|
|
33
|
+
* @param {string} [props.title] - The title of the choice list.
|
|
34
|
+
* @param {boolean} [props.titleHidden=false] - Whether to hide the title visually.
|
|
35
|
+
* @param {boolean} [props.allowMultiple=false] - Whether multiple selections are allowed.
|
|
36
|
+
* @param {Array<ChoiceListItem>} props.choices - The available choices for selection.
|
|
37
|
+
* @param {Array} props.selected - The currently selected values.
|
|
38
|
+
* @param {Function} props.onChange - Callback when the selection changes. Receives the updated array of selected values.
|
|
39
|
+
* @param {string} [props.error] - Error message to display, if any.
|
|
40
|
+
* @param {boolean} [props.disabled=false] - Whether the entire choice list is disabled.
|
|
41
|
+
* @param {string} [props.name] - The name attribute for the choice inputs (used for grouping radio buttons).
|
|
42
|
+
*
|
|
43
|
+
* @returns {JSX.Element} A rendered choice list component.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* <ChoiceList
|
|
47
|
+
* title="Select your options"
|
|
48
|
+
* allowMultiple={true}
|
|
49
|
+
* choices={[
|
|
50
|
+
* { value: "option1", label: "Option 1" },
|
|
51
|
+
* { value: "option2", label: "Option 2" },
|
|
52
|
+
* ]}
|
|
53
|
+
* selected={["option1"]}
|
|
54
|
+
* onChange={(selected) => console.log(selected)}
|
|
55
|
+
* error="Please select at least one option."
|
|
56
|
+
* />
|
|
57
|
+
*/
|
|
58
|
+
declare function ChoiceList(props?: {
|
|
59
|
+
title?: string;
|
|
60
|
+
titleHidden?: boolean;
|
|
61
|
+
allowMultiple?: boolean;
|
|
62
|
+
choices: Array<ChoiceListItem>;
|
|
63
|
+
selected: any[];
|
|
64
|
+
onChange: Function;
|
|
65
|
+
error?: string;
|
|
66
|
+
disabled?: boolean;
|
|
67
|
+
name?: string;
|
|
68
|
+
}): JSX.Element;
|
|
69
|
+
//# sourceMappingURL=ChoiceList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChoiceList.d.ts","sourceRoot":"","sources":["../../../components/ChoiceList.js"],"names":[],"mappings":";;;;;WAgBc,MAAM;;;;WACN,MAAM;;;;eACN,OAAO;;;;qBACP,KAAK,CAAC,SAAS;;AAL7B;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,oCAzBG;IAAuB,KAAK,GAApB,MAAM;IACU,WAAW,GAA3B,OAAO;IACS,aAAa,GAA7B,OAAO;IACsB,OAAO,EAApC,KAAK,CAAC,cAAc,CAAC;IACR,QAAQ;IACL,QAAQ;IACT,KAAK,GAApB,MAAM;IACU,QAAQ,GAAxB,OAAO;IACQ,IAAI,GAAnB,MAAM;CAEd,GAAU,GAAG,CAAC,OAAO,CAmFvB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export default Collapsible;
|
|
2
|
+
/**
|
|
3
|
+
* Collapsible Component
|
|
4
|
+
*
|
|
5
|
+
* @component
|
|
6
|
+
* @param {Object} props - Properties passed to component.
|
|
7
|
+
* @param {boolean} props.open - If true, the collapsible is open (expanded); otherwise, it's closed (collapsed).
|
|
8
|
+
* @param {React.ReactNode} props.children - Content displayed inside the collapsible component.
|
|
9
|
+
* @param {string} [props.className] - Additional CSS classes to append to the generated styles.
|
|
10
|
+
* @returns {JSX.Element} A collapsible container that shows or hides its children based on the `open` state.
|
|
11
|
+
*/
|
|
12
|
+
declare function Collapsible(props?: {
|
|
13
|
+
open: boolean;
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
className?: string;
|
|
16
|
+
}): JSX.Element;
|
|
17
|
+
//# sourceMappingURL=Collapsible.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Collapsible.d.ts","sourceRoot":"","sources":["../../../components/Collapsible.js"],"names":[],"mappings":";AAYA;;;;;;;;;GASG;AAEH,qCANG;IAAuB,IAAI,EAAnB,OAAO;IACgB,QAAQ,EAA/B,KAAK,CAAC,SAAS;IACA,SAAS,GAAxB,MAAM;CACd,GAAU,GAAG,CAAC,OAAO,CAWvB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export default ColorField;
|
|
2
|
+
/**
|
|
3
|
+
* ColorField component provides a UI for selecting colors using the SketchPicker.
|
|
4
|
+
* It displays the currently selected color and allows toggling a color picker popover.
|
|
5
|
+
* Useful for choosing solid colors in forms or design tools.
|
|
6
|
+
*
|
|
7
|
+
* @component
|
|
8
|
+
* @example
|
|
9
|
+
* <ColorField
|
|
10
|
+
* label="Primary Color"
|
|
11
|
+
* name="primary"
|
|
12
|
+
* value="#ff0000"
|
|
13
|
+
* onChange={(newColor) => setColor(newColor)}
|
|
14
|
+
* zIndexOverride={100}
|
|
15
|
+
* presetColors={['#ff0000', '#00ff00', '#0000ff']}
|
|
16
|
+
* />
|
|
17
|
+
*
|
|
18
|
+
* @param {Object} props - Component props
|
|
19
|
+
* @param {string} props.label - The label displayed above the color value
|
|
20
|
+
* @param {string} props.name - The name associated with the color field, used as a key
|
|
21
|
+
* @param {string} props.value - The currently selected color value; can be a hex string or CSS variable
|
|
22
|
+
* @param {function} props.onChange - Callback function that receives the new color value when changed
|
|
23
|
+
* @param {number} [props.zIndexOverride] - Optional z-index value to override the default popover z-index
|
|
24
|
+
* @param {string[]} [props.presetColors=[]] - Optional array of preset colors shown in the picker
|
|
25
|
+
*
|
|
26
|
+
* @returns {JSX.Element} A color picker field with label and current value preview
|
|
27
|
+
*/
|
|
28
|
+
declare function ColorField({ label, name, value: _value, onChange, zIndexOverride, presetColors, }: {
|
|
29
|
+
label: string;
|
|
30
|
+
name: string;
|
|
31
|
+
value: string;
|
|
32
|
+
onChange: Function;
|
|
33
|
+
zIndexOverride?: number;
|
|
34
|
+
presetColors?: string[];
|
|
35
|
+
}): JSX.Element;
|
|
36
|
+
//# sourceMappingURL=ColorField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColorField.d.ts","sourceRoot":"","sources":["../../../components/ColorField.js"],"names":[],"mappings":";AAoBA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,qGAVG;IAAsB,KAAK,EAAnB,MAAM;IACQ,IAAI,EAAlB,MAAM;IACQ,KAAK,EAAnB,MAAM;IACU,QAAQ;IACT,cAAc,GAA7B,MAAM;IACW,YAAY,GAA7B,MAAM,EAAE;CAEhB,GAAU,GAAG,CAAC,OAAO,CA8DvB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export default ContextualSaveBar;
|
|
2
|
+
/**
|
|
3
|
+
* ContextualSaveBar Component
|
|
4
|
+
*
|
|
5
|
+
* This component manages and displays a global contextual save bar with custom save and discard actions.
|
|
6
|
+
* It uses the `FormContext` to control the visibility and configuration of the save bar.
|
|
7
|
+
* When mounted, it sets the provided message, save action, and discard action.
|
|
8
|
+
* When unmounted, it cleans up by resetting these values.
|
|
9
|
+
*
|
|
10
|
+
* @component
|
|
11
|
+
* @param {Object} props - Component properties.
|
|
12
|
+
* @param {Object} [props.saveAction] - The action for the "Save" button. Contains `onAction`, `loading`, `accessibilityLabel`, and `disabled`.
|
|
13
|
+
* @param {Object} [props.discardAction] - The action for the "Discard" button. Contains `onAction`, `loading`, `accessibilityLabel`, and `disabled`.
|
|
14
|
+
* @param {string} [props.message="Unsaved changes"] - The message to display on the contextual save bar.
|
|
15
|
+
* @returns {null} This component does not render anything; it only manages the save bar state.
|
|
16
|
+
*/
|
|
17
|
+
declare function ContextualSaveBar({ saveAction, discardAction, message, }: {
|
|
18
|
+
saveAction?: any;
|
|
19
|
+
discardAction?: any;
|
|
20
|
+
message?: string;
|
|
21
|
+
}): null;
|
|
22
|
+
//# sourceMappingURL=ContextualSaveBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContextualSaveBar.d.ts","sourceRoot":"","sources":["../../../components/ContextualSaveBar.js"],"names":[],"mappings":";AAKA;;;;;;;;;;;;;;GAcG;AACH,4EALG;IAAuB,UAAU;IACV,aAAa;IACb,OAAO,GAAtB,MAAM;CACd,GAAU,IAAI,CAqChB"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export default DatePicker;
|
|
2
|
+
/**
|
|
3
|
+
* DatePicker component for selecting dates and date ranges.
|
|
4
|
+
*
|
|
5
|
+
* @param {Object} props - Component properties.
|
|
6
|
+
* @param {string} [props.label] - Label for the DatePicker.
|
|
7
|
+
* @param {Object|null} [props.labelAction] - Action button for the label.
|
|
8
|
+
* @param {function} [props.onBlur] - Callback function for when the field loses focus.
|
|
9
|
+
* @param {string} [props.placeholder="Select date..."] - Placeholder text.
|
|
10
|
+
* @param {string} [props.displayFormat] - Date format for displaying the value.
|
|
11
|
+
* @param {string} [props.helpText] - Help text displayed under the field.
|
|
12
|
+
* @param {JSX.Element|null} [props.suffix=null] - Icon or text displayed at the end of the input.
|
|
13
|
+
* @param {boolean} [props.isClearable=false] - Whether the input can be cleared.
|
|
14
|
+
* @param {string|null} [props.tooltip] - Tooltip text for the field.
|
|
15
|
+
* @param {string} [props.locale="en-US"] - Locale used for formatting.
|
|
16
|
+
* @param {Object|string|Date|null} [props.value] - Current value of the DatePicker.
|
|
17
|
+
* @param {boolean} [props.allowRange=false] - Whether date range selection is enabled.
|
|
18
|
+
* @param {JSX.Element|null} [props.activator] - Custom activator for the popover.
|
|
19
|
+
* @param {Date|string|null} [props.disableDatesAfter] - Dates after this value are disabled.
|
|
20
|
+
* @param {Date|string|null} [props.disableDatesBefore] - Dates before this value are disabled.
|
|
21
|
+
* @param {function} [props.onChange] - Callback function called when the date changes.
|
|
22
|
+
* @param {boolean} [props.multiMonth=false] - Whether multiple months are shown.
|
|
23
|
+
* @param {boolean} [props.disabled=false] - Whether the DatePicker is disabled.
|
|
24
|
+
* @param {boolean} [props.showTimePicker=false] - Whether a time picker is displayed.
|
|
25
|
+
* @param {boolean} [props.autoFocus=false] - Whether the input is focused automatically.
|
|
26
|
+
* @param {Date|null} [props.maxDate] - Maximum selectable date.
|
|
27
|
+
* @param {Date|null} [props.minDate] - Minimum selectable date.
|
|
28
|
+
* @param {boolean} [props.inline=false] - Whether the calendar is displayed inline.
|
|
29
|
+
* @param {string} [props.preferredAlignment="left"] - Alignment of the popover.
|
|
30
|
+
* @param {string} [props.preferredPosition="below"] - Position of the popover.
|
|
31
|
+
* @param {boolean} [props.includeHourlyPresets=false] - Whether hourly (last 30 minutes, last hour) presets are included.
|
|
32
|
+
* @param {Array} [props.customPresets=[]] - Custom presets to include.
|
|
33
|
+
* @param {JSX.Element|null} [props.footer] - An optional footer component to display at the bottom of the DatePicker.
|
|
34
|
+
* @returns {JSX.Element} The rendered DatePicker component.
|
|
35
|
+
*/
|
|
36
|
+
declare function DatePicker(props?: {
|
|
37
|
+
label?: string;
|
|
38
|
+
labelAction?: any | null;
|
|
39
|
+
onBlur?: Function;
|
|
40
|
+
placeholder?: string;
|
|
41
|
+
displayFormat?: string;
|
|
42
|
+
helpText?: string;
|
|
43
|
+
suffix?: JSX.Element | null;
|
|
44
|
+
isClearable?: boolean;
|
|
45
|
+
tooltip?: string | null;
|
|
46
|
+
locale?: string;
|
|
47
|
+
value?: any | string | Date | null;
|
|
48
|
+
allowRange?: boolean;
|
|
49
|
+
activator?: JSX.Element | null;
|
|
50
|
+
disableDatesAfter?: Date | string | null;
|
|
51
|
+
disableDatesBefore?: Date | string | null;
|
|
52
|
+
onChange?: Function;
|
|
53
|
+
multiMonth?: boolean;
|
|
54
|
+
disabled?: boolean;
|
|
55
|
+
showTimePicker?: boolean;
|
|
56
|
+
autoFocus?: boolean;
|
|
57
|
+
maxDate?: Date | null;
|
|
58
|
+
minDate?: Date | null;
|
|
59
|
+
inline?: boolean;
|
|
60
|
+
preferredAlignment?: string;
|
|
61
|
+
preferredPosition?: string;
|
|
62
|
+
includeHourlyPresets?: boolean;
|
|
63
|
+
customPresets?: any[];
|
|
64
|
+
footer?: JSX.Element | null;
|
|
65
|
+
}): JSX.Element;
|
|
66
|
+
//# sourceMappingURL=DatePicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../components/DatePicker.js"],"names":[],"mappings":";AAqJA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,oCA/BG;IAAuB,KAAK,GAApB,MAAM;IACc,WAAW,GAA/B,MAAO,IAAI;IACM,MAAM;IACR,WAAW,GAA1B,MAAM;IACS,aAAa,GAA5B,MAAM;IACS,QAAQ,GAAvB,MAAM;IACmB,MAAM,GAA/B,GAAG,CAAC,OAAO,GAAC,IAAI;IACA,WAAW,GAA3B,OAAO;IACa,OAAO,GAA3B,MAAM,GAAC,IAAI;IACI,MAAM,GAArB,MAAM;IAC0B,KAAK,GAArC,MAAO,MAAM,GAAC,IAAI,GAAC,IAAI;IACP,UAAU,GAA1B,OAAO;IACkB,SAAS,GAAlC,GAAG,CAAC,OAAO,GAAC,IAAI;IACS,iBAAiB,GAA1C,IAAI,GAAC,MAAM,GAAC,IAAI;IACS,kBAAkB,GAA3C,IAAI,GAAC,MAAM,GAAC,IAAI;IACC,QAAQ;IACT,UAAU,GAA1B,OAAO;IACS,QAAQ,GAAxB,OAAO;IACS,cAAc,GAA9B,OAAO;IACS,SAAS,GAAzB,OAAO;IACW,OAAO,GAAzB,IAAI,GAAC,IAAI;IACS,OAAO,GAAzB,IAAI,GAAC,IAAI;IACO,MAAM,GAAtB,OAAO;IACQ,kBAAkB,GAAjC,MAAM;IACS,iBAAiB,GAAhC,MAAM;IACU,oBAAoB,GAApC,OAAO;IACO,aAAa;IACF,MAAM,GAA/B,GAAG,CAAC,OAAO,GAAC,IAAI;CACxB,GAAU,GAAG,CAAC,OAAO,CAgVvB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export default Divider;
|
|
2
|
+
/**
|
|
3
|
+
* Renders a divider element with customizable color variants.
|
|
4
|
+
*
|
|
5
|
+
* @component
|
|
6
|
+
* @param {Object} props - Component properties.
|
|
7
|
+
* @param {'default' | 'subdued'} [props.color='default'] - The color variant to apply to the divider.
|
|
8
|
+
* @returns {JSX.Element} A styled `<div>` element serving as a divider.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* // Renders a default color divider
|
|
12
|
+
* <Divider />
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* // Renders a subdued color divider
|
|
16
|
+
* <Divider color="subdued" />
|
|
17
|
+
*/
|
|
18
|
+
declare function Divider(props?: {
|
|
19
|
+
color?: "default" | "subdued";
|
|
20
|
+
}): JSX.Element;
|
|
21
|
+
//# sourceMappingURL=Divider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../components/Divider.js"],"names":[],"mappings":";AAeA;;;;;;;;;;;;;;;GAeG;AAEH,iCAZG;IAAsC,KAAK,GAAnC,SAAS,GAAG,SAAS;CAC7B,GAAU,GAAG,CAAC,OAAO,CAqBvB"}
|