@trellixio/roaster-react 1.1.1 → 2.0.0
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/README.md +31 -17
- package/cjs/components/ActionCard/ActionCard.js +20 -4
- package/cjs/components/ActionCard/ActionCard.js.map +1 -1
- package/cjs/components/ActionCard/ActionCardGroup.js +42 -0
- package/cjs/components/ActionCard/ActionCardGroup.js.map +1 -0
- package/cjs/components/ActionList/ActionList.context.js.map +1 -1
- package/cjs/components/ActionList/ActionList.js +20 -23
- package/cjs/components/ActionList/ActionList.js.map +1 -1
- package/cjs/components/ActionList/components/ActionListDivider.js +6 -3
- package/cjs/components/ActionList/components/ActionListDivider.js.map +1 -1
- package/cjs/components/ActionList/components/ActionListDropdown.js +30 -15
- package/cjs/components/ActionList/components/ActionListDropdown.js.map +1 -1
- package/cjs/components/ActionList/components/ActionListGroup.js +25 -4
- package/cjs/components/ActionList/components/ActionListGroup.js.map +1 -1
- package/cjs/components/ActionList/components/ActionListItem.js +54 -4
- package/cjs/components/ActionList/components/ActionListItem.js.map +1 -1
- package/cjs/components/ActionList/components/ActionListSearch.js +67 -0
- package/cjs/components/ActionList/components/ActionListSearch.js.map +1 -0
- package/cjs/components/ActionList/components/ActionListSubmenu.js +125 -0
- package/cjs/components/ActionList/components/ActionListSubmenu.js.map +1 -0
- package/cjs/components/ActionList/components/ActionListSwitchItem.js +64 -0
- package/cjs/components/ActionList/components/ActionListSwitchItem.js.map +1 -0
- package/cjs/components/ActionList/components/ActionListTrigger.js +2 -36
- package/cjs/components/ActionList/components/ActionListTrigger.js.map +1 -1
- package/cjs/components/Alert/Alert.js +19 -2
- package/cjs/components/Alert/Alert.js.map +1 -1
- package/cjs/components/AppFrame/AppFrame.js +56 -0
- package/cjs/components/AppFrame/AppFrame.js.map +1 -0
- package/cjs/components/Avatar/Avatar.js +31 -8
- package/cjs/components/Avatar/Avatar.js.map +1 -1
- package/cjs/components/BlockCard/BlockCard.js +98 -4
- package/cjs/components/BlockCard/BlockCard.js.map +1 -1
- package/cjs/components/Button/Button.js +36 -15
- package/cjs/components/Button/Button.js.map +1 -1
- package/cjs/components/ButtonIcon/ButtonIcon.js +8 -9
- package/cjs/components/ButtonIcon/ButtonIcon.js.map +1 -1
- package/cjs/components/Chart/Chart.js +185 -0
- package/cjs/components/Chart/Chart.js.map +1 -0
- package/cjs/components/Checkbox/Checkbox.js +65 -38
- package/cjs/components/Checkbox/Checkbox.js.map +1 -1
- package/cjs/components/Checkbox/CheckboxGroup/CheckboxGroup.context.js.map +1 -1
- package/cjs/components/Checkbox/CheckboxGroup/CheckboxGroup.js +45 -11
- package/cjs/components/Checkbox/CheckboxGroup/CheckboxGroup.js.map +1 -1
- package/cjs/components/Checkbox/ChoiceText.js +49 -0
- package/cjs/components/Checkbox/ChoiceText.js.map +1 -0
- package/cjs/components/ColorField/ColorField.js +69 -18
- package/cjs/components/ColorField/ColorField.js.map +1 -1
- package/cjs/components/DatePicker/DatePicker.js +86 -48
- package/cjs/components/DatePicker/DatePicker.js.map +1 -1
- package/cjs/components/DatePicker/components/Calendar/Calendar.js +65 -35
- package/cjs/components/DatePicker/components/Calendar/Calendar.js.map +1 -1
- package/cjs/components/DatePicker/components/Day/Day.js +16 -31
- package/cjs/components/DatePicker/components/Day/Day.js.map +1 -1
- package/cjs/components/DatePicker/components/Month/Month.js +92 -29
- package/cjs/components/DatePicker/components/Month/Month.js.map +1 -1
- package/cjs/components/DatePicker/components/MonthGrid/MonthGrid.js +97 -0
- package/cjs/components/DatePicker/components/MonthGrid/MonthGrid.js.map +1 -0
- package/cjs/components/DatePicker/components/Weekday/Weekday.js +3 -15
- package/cjs/components/DatePicker/components/Weekday/Weekday.js.map +1 -1
- package/cjs/components/DatePicker/utils/index.js +43 -25
- package/cjs/components/DatePicker/utils/index.js.map +1 -1
- package/cjs/components/DescriptiveList/DescriptiveList.js +14 -5
- package/cjs/components/DescriptiveList/DescriptiveList.js.map +1 -1
- package/cjs/components/DescriptiveList/DescriptiveListItem.js +15 -3
- package/cjs/components/DescriptiveList/DescriptiveListItem.js.map +1 -1
- package/cjs/components/DropdownCard/DropdownCard.context.js.map +1 -1
- package/cjs/components/DropdownCard/DropdownCard.js +17 -22
- package/cjs/components/DropdownCard/DropdownCard.js.map +1 -1
- package/cjs/components/DropdownCard/components/DropdownCardActions.js +5 -3
- package/cjs/components/DropdownCard/components/DropdownCardActions.js.map +1 -1
- package/cjs/components/DropdownCard/components/DropdownCardContent.js +5 -3
- package/cjs/components/DropdownCard/components/DropdownCardContent.js.map +1 -1
- package/cjs/components/DropdownCard/components/DropdownCardDropdown.js +18 -13
- package/cjs/components/DropdownCard/components/DropdownCardDropdown.js.map +1 -1
- package/cjs/components/DropdownCard/components/DropdownCardTabs.js +136 -0
- package/cjs/components/DropdownCard/components/DropdownCardTabs.js.map +1 -0
- package/cjs/components/DropdownCard/components/DropdownCardTrigger.js +2 -34
- package/cjs/components/DropdownCard/components/DropdownCardTrigger.js.map +1 -1
- package/cjs/components/Field/Field.js +27 -0
- package/cjs/components/Field/Field.js.map +1 -0
- package/cjs/components/FileField/FileField.js +64 -24
- package/cjs/components/FileField/FileField.js.map +1 -1
- package/cjs/components/FormActions/FormActions.js +27 -0
- package/cjs/components/FormActions/FormActions.js.map +1 -0
- package/cjs/components/HyperlinkCard/HyperlinkCard.js +22 -6
- package/cjs/components/HyperlinkCard/HyperlinkCard.js.map +1 -1
- package/cjs/components/Icon/Icon.js +10 -12
- package/cjs/components/Icon/Icon.js.map +1 -1
- package/cjs/components/IconBadge/IconBadge.js +40 -0
- package/cjs/components/IconBadge/IconBadge.js.map +1 -0
- package/cjs/components/Loader/Loader.js +35 -2
- package/cjs/components/Loader/Loader.js.map +1 -1
- package/cjs/components/Modal/Modal.js +91 -4
- package/cjs/components/Modal/Modal.js.map +1 -1
- package/cjs/components/Modal/ModalProvider/ModalProviderFooter.js +7 -4
- package/cjs/components/Modal/ModalProvider/ModalProviderFooter.js.map +1 -1
- package/cjs/components/Modal/ModalProvider/index.js +16 -17
- package/cjs/components/Modal/ModalProvider/index.js.map +1 -1
- package/cjs/components/Modal/utils/reducer.js +4 -1
- package/cjs/components/Modal/utils/reducer.js.map +1 -1
- package/cjs/components/Modal/utils/useModal.js +1 -1
- package/cjs/components/Modal/utils/useModal.js.map +1 -1
- package/cjs/components/Page/Breadcrumbs.js +43 -0
- package/cjs/components/Page/Breadcrumbs.js.map +1 -0
- package/cjs/components/Page/Page.js +73 -8
- package/cjs/components/Page/Page.js.map +1 -1
- package/cjs/components/Pagination/Pagination.js +23 -12
- package/cjs/components/Pagination/Pagination.js.map +1 -1
- package/cjs/components/Progress/Progress.js +48 -3
- package/cjs/components/Progress/Progress.js.map +1 -1
- package/cjs/components/Radio/Radio.js +35 -25
- package/cjs/components/Radio/Radio.js.map +1 -1
- package/cjs/components/Radio/RadioGroup/RadioGroup.context.js.map +1 -1
- package/cjs/components/Radio/RadioGroup/RadioGroup.js +37 -24
- package/cjs/components/Radio/RadioGroup/RadioGroup.js.map +1 -1
- package/cjs/components/RangeField/RangeField.js +31 -27
- package/cjs/components/RangeField/RangeField.js.map +1 -1
- package/cjs/components/Select/Select.js +75 -31
- package/cjs/components/Select/Select.js.map +1 -1
- package/cjs/components/Sidebar/Sidebar.js +122 -110
- package/cjs/components/Sidebar/Sidebar.js.map +1 -1
- package/cjs/components/Sidebar/components/Back.js +38 -0
- package/cjs/components/Sidebar/components/Back.js.map +1 -0
- package/cjs/components/Sidebar/components/Menu.js +17 -6
- package/cjs/components/Sidebar/components/Menu.js.map +1 -1
- package/cjs/components/Sidebar/components/MenuItem.js +37 -6
- package/cjs/components/Sidebar/components/MenuItem.js.map +1 -1
- package/cjs/components/Sidebar/components/Section.js +15 -3
- package/cjs/components/Sidebar/components/Section.js.map +1 -1
- package/cjs/components/Sidebar/components/SubMenu.js +15 -2
- package/cjs/components/Sidebar/components/SubMenu.js.map +1 -1
- package/cjs/components/Spinner/Spinner.js +20 -2
- package/cjs/components/Spinner/Spinner.js.map +1 -1
- package/cjs/components/StatCard/StatCard.js +47 -10
- package/cjs/components/StatCard/StatCard.js.map +1 -1
- package/cjs/components/Switch/Switch.js +42 -20
- package/cjs/components/Switch/Switch.js.map +1 -1
- package/cjs/components/Table/Table.js +95 -31
- package/cjs/components/Table/Table.js.map +1 -1
- package/cjs/components/Table/components/Checkbox/index.js +8 -8
- package/cjs/components/Table/components/Checkbox/index.js.map +1 -1
- package/cjs/components/Table/components/TableBody.js +3 -3
- package/cjs/components/Table/components/TableBody.js.map +1 -1
- package/cjs/components/Table/components/TableCell.js +3 -4
- package/cjs/components/Table/components/TableCell.js.map +1 -1
- package/cjs/components/Table/components/TableGroup.js +30 -0
- package/cjs/components/Table/components/TableGroup.js.map +1 -0
- package/cjs/components/Table/components/TableHead.js +19 -16
- package/cjs/components/Table/components/TableHead.js.map +1 -1
- package/cjs/components/Table/components/TableHeadCell.js +23 -5
- package/cjs/components/Table/components/TableHeadCell.js.map +1 -1
- package/cjs/components/Table/components/TablePagination.js +6 -16
- package/cjs/components/Table/components/TablePagination.js.map +1 -1
- package/cjs/components/Table/components/TableProvider/TableProvider.js +4 -4
- package/cjs/components/Table/components/TableProvider/TableProvider.js.map +1 -1
- package/cjs/components/Table/components/TableRow.js +12 -9
- package/cjs/components/Table/components/TableRow.js.map +1 -1
- package/cjs/components/Table/labels.js +34 -0
- package/cjs/components/Table/labels.js.map +1 -0
- package/cjs/components/Table/utils/rows/context.js.map +1 -1
- package/cjs/components/Table/utils/table/context.js.map +1 -1
- package/cjs/components/Table/utils/table/hooks.js +3 -3
- package/cjs/components/Table/utils/table/hooks.js.map +1 -1
- package/cjs/components/Table/utils/table/types.js +0 -7
- package/cjs/components/Table/utils/table/types.js.map +1 -1
- package/cjs/components/Table/utils/useSelectableResourceState/index.js +4 -5
- package/cjs/components/Table/utils/useSelectableResourceState/index.js.map +1 -1
- package/cjs/components/Tag/Tag.js +36 -5
- package/cjs/components/Tag/Tag.js.map +1 -1
- package/cjs/components/Tag/TagGroup.js +3 -2
- package/cjs/components/Tag/TagGroup.js.map +1 -1
- package/cjs/components/TextField/TextField.js +41 -38
- package/cjs/components/TextField/TextField.js.map +1 -1
- package/cjs/components/Textarea/Textarea.js +10 -26
- package/cjs/components/Textarea/Textarea.js.map +1 -1
- package/cjs/components/Thumbnail/Thumbnail.js +22 -8
- package/cjs/components/Thumbnail/Thumbnail.js.map +1 -1
- package/cjs/components/Timeline/Timeline.js +40 -0
- package/cjs/components/Timeline/Timeline.js.map +1 -0
- package/cjs/components/Timeline/TimelineGroup.js +42 -0
- package/cjs/components/Timeline/TimelineGroup.js.map +1 -0
- package/cjs/components/Timeline/TimelineItem.js +38 -0
- package/cjs/components/Timeline/TimelineItem.js.map +1 -0
- package/cjs/components/Toast/Toast.js +18 -2
- package/cjs/components/Toast/Toast.js.map +1 -1
- package/cjs/components/Toast/Toasts.context.js +31 -3
- package/cjs/components/Toast/Toasts.context.js.map +1 -1
- package/cjs/components/Toast/ToastsContainer/index.js +43 -19
- package/cjs/components/Toast/ToastsContainer/index.js.map +1 -1
- package/cjs/components/Toast/ToastsProvider/index.js +11 -15
- package/cjs/components/Toast/ToastsProvider/index.js.map +1 -1
- package/cjs/components/Toast/store.js +49 -0
- package/cjs/components/Toast/store.js.map +1 -0
- package/cjs/components/Tooltip/Tooltip.js +34 -53
- package/cjs/components/Tooltip/Tooltip.js.map +1 -1
- package/cjs/components/Tooltip/TooltipCallout.js +60 -0
- package/cjs/components/Tooltip/TooltipCallout.js.map +1 -0
- package/cjs/components/Tooltip/useTooltip.js +11 -45
- package/cjs/components/Tooltip/useTooltip.js.map +1 -1
- package/cjs/components/Visualizer/Visualizer.js +70 -10
- package/cjs/components/Visualizer/Visualizer.js.map +1 -1
- package/cjs/index.js +68 -66
- package/cjs/index.js.map +1 -1
- package/cjs/tokens/tokens.js +1532 -0
- package/cjs/tokens/tokens.js.map +1 -0
- package/cjs/utils/Slot/index.js +52 -0
- package/cjs/utils/Slot/index.js.map +1 -0
- package/cjs/utils/classNames/index.js +3 -3
- package/cjs/utils/classNames/index.js.map +1 -1
- package/cjs/utils/getElementRef/index.js +16 -0
- package/cjs/utils/getElementRef/index.js.map +1 -0
- package/cjs/utils/guid/index.js.map +1 -1
- package/cjs/utils/toPercent/index.js +9 -0
- package/cjs/utils/toPercent/index.js.map +1 -0
- package/cjs/utils/useControllableState/index.js +39 -0
- package/cjs/utils/useControllableState/index.js.map +1 -0
- package/cjs/utils/useDropdown/DropdownTrigger.js +33 -0
- package/cjs/utils/useDropdown/DropdownTrigger.js.map +1 -0
- package/cjs/utils/useDropdown/index.js +54 -23
- package/cjs/utils/useDropdown/index.js.map +1 -1
- package/cjs/utils/useImageFallback/index.js +26 -0
- package/cjs/utils/useImageFallback/index.js.map +1 -0
- package/cjs/utils/useUid/index.js.map +1 -1
- package/esm/components/ActionCard/ActionCard.js +20 -4
- package/esm/components/ActionCard/ActionCard.js.map +1 -1
- package/esm/components/ActionCard/ActionCardGroup.js +26 -0
- package/esm/components/ActionCard/ActionCardGroup.js.map +1 -0
- package/esm/components/ActionList/ActionList.context.js.map +1 -1
- package/esm/components/ActionList/ActionList.js +21 -11
- package/esm/components/ActionList/ActionList.js.map +1 -1
- package/esm/components/ActionList/components/ActionListDivider.js +6 -3
- package/esm/components/ActionList/components/ActionListDivider.js.map +1 -1
- package/esm/components/ActionList/components/ActionListDropdown.js +31 -16
- package/esm/components/ActionList/components/ActionListDropdown.js.map +1 -1
- package/esm/components/ActionList/components/ActionListGroup.js +24 -3
- package/esm/components/ActionList/components/ActionListGroup.js.map +1 -1
- package/esm/components/ActionList/components/ActionListItem.js +53 -3
- package/esm/components/ActionList/components/ActionListItem.js.map +1 -1
- package/esm/components/ActionList/components/ActionListSearch.js +52 -0
- package/esm/components/ActionList/components/ActionListSearch.js.map +1 -0
- package/esm/components/ActionList/components/ActionListSubmenu.js +110 -0
- package/esm/components/ActionList/components/ActionListSubmenu.js.map +1 -0
- package/esm/components/ActionList/components/ActionListSwitchItem.js +49 -0
- package/esm/components/ActionList/components/ActionListSwitchItem.js.map +1 -0
- package/esm/components/ActionList/components/ActionListTrigger.js +2 -23
- package/esm/components/ActionList/components/ActionListTrigger.js.map +1 -1
- package/esm/components/Alert/Alert.js +19 -2
- package/esm/components/Alert/Alert.js.map +1 -1
- package/esm/components/AppFrame/AppFrame.js +37 -0
- package/esm/components/AppFrame/AppFrame.js.map +1 -0
- package/esm/components/Avatar/Avatar.js +31 -8
- package/esm/components/Avatar/Avatar.js.map +1 -1
- package/esm/components/BlockCard/BlockCard.js +98 -4
- package/esm/components/BlockCard/BlockCard.js.map +1 -1
- package/esm/components/Button/Button.js +36 -15
- package/esm/components/Button/Button.js.map +1 -1
- package/esm/components/ButtonIcon/ButtonIcon.js +8 -9
- package/esm/components/ButtonIcon/ButtonIcon.js.map +1 -1
- package/esm/components/Chart/Chart.js +170 -0
- package/esm/components/Chart/Chart.js.map +1 -0
- package/esm/components/Checkbox/Checkbox.js +64 -37
- package/esm/components/Checkbox/Checkbox.js.map +1 -1
- package/esm/components/Checkbox/CheckboxGroup/CheckboxGroup.context.js.map +1 -1
- package/esm/components/Checkbox/CheckboxGroup/CheckboxGroup.js +45 -11
- package/esm/components/Checkbox/CheckboxGroup/CheckboxGroup.js.map +1 -1
- package/esm/components/Checkbox/ChoiceText.js +33 -0
- package/esm/components/Checkbox/ChoiceText.js.map +1 -0
- package/esm/components/ColorField/ColorField.js +69 -18
- package/esm/components/ColorField/ColorField.js.map +1 -1
- package/esm/components/DatePicker/DatePicker.js +86 -48
- package/esm/components/DatePicker/DatePicker.js.map +1 -1
- package/esm/components/DatePicker/components/Calendar/Calendar.js +60 -18
- package/esm/components/DatePicker/components/Calendar/Calendar.js.map +1 -1
- package/esm/components/DatePicker/components/Day/Day.js +18 -20
- package/esm/components/DatePicker/components/Day/Day.js.map +1 -1
- package/esm/components/DatePicker/components/Month/Month.js +93 -30
- package/esm/components/DatePicker/components/Month/Month.js.map +1 -1
- package/esm/components/DatePicker/components/MonthGrid/MonthGrid.js +82 -0
- package/esm/components/DatePicker/components/MonthGrid/MonthGrid.js.map +1 -0
- package/esm/components/DatePicker/components/Weekday/Weekday.js +4 -3
- package/esm/components/DatePicker/components/Weekday/Weekday.js.map +1 -1
- package/esm/components/DatePicker/utils/index.js +37 -25
- package/esm/components/DatePicker/utils/index.js.map +1 -1
- package/esm/components/DescriptiveList/DescriptiveList.js +14 -5
- package/esm/components/DescriptiveList/DescriptiveList.js.map +1 -1
- package/esm/components/DescriptiveList/DescriptiveListItem.js +15 -3
- package/esm/components/DescriptiveList/DescriptiveListItem.js.map +1 -1
- package/esm/components/DropdownCard/DropdownCard.context.js.map +1 -1
- package/esm/components/DropdownCard/DropdownCard.js +18 -10
- package/esm/components/DropdownCard/DropdownCard.js.map +1 -1
- package/esm/components/DropdownCard/components/DropdownCardActions.js +5 -3
- package/esm/components/DropdownCard/components/DropdownCardActions.js.map +1 -1
- package/esm/components/DropdownCard/components/DropdownCardContent.js +5 -3
- package/esm/components/DropdownCard/components/DropdownCardContent.js.map +1 -1
- package/esm/components/DropdownCard/components/DropdownCardDropdown.js +19 -14
- package/esm/components/DropdownCard/components/DropdownCardDropdown.js.map +1 -1
- package/esm/components/DropdownCard/components/DropdownCardTabs.js +118 -0
- package/esm/components/DropdownCard/components/DropdownCardTabs.js.map +1 -0
- package/esm/components/DropdownCard/components/DropdownCardTrigger.js +2 -21
- package/esm/components/DropdownCard/components/DropdownCardTrigger.js.map +1 -1
- package/esm/components/Field/Field.js +24 -0
- package/esm/components/Field/Field.js.map +1 -0
- package/esm/components/FileField/FileField.js +64 -24
- package/esm/components/FileField/FileField.js.map +1 -1
- package/esm/components/FormActions/FormActions.js +12 -0
- package/esm/components/FormActions/FormActions.js.map +1 -0
- package/esm/components/HyperlinkCard/HyperlinkCard.js +10 -7
- package/esm/components/HyperlinkCard/HyperlinkCard.js.map +1 -1
- package/esm/components/Icon/Icon.js +10 -12
- package/esm/components/Icon/Icon.js.map +1 -1
- package/esm/components/IconBadge/IconBadge.js +25 -0
- package/esm/components/IconBadge/IconBadge.js.map +1 -0
- package/esm/components/Loader/Loader.js +24 -4
- package/esm/components/Loader/Loader.js.map +1 -1
- package/esm/components/Modal/Modal.js +90 -3
- package/esm/components/Modal/Modal.js.map +1 -1
- package/esm/components/Modal/ModalProvider/ModalProviderFooter.js +7 -4
- package/esm/components/Modal/ModalProvider/ModalProviderFooter.js.map +1 -1
- package/esm/components/Modal/ModalProvider/index.js +16 -17
- package/esm/components/Modal/ModalProvider/index.js.map +1 -1
- package/esm/components/Modal/utils/reducer.js +4 -1
- package/esm/components/Modal/utils/reducer.js.map +1 -1
- package/esm/components/Modal/utils/useModal.js +1 -1
- package/esm/components/Modal/utils/useModal.js.map +1 -1
- package/esm/components/Page/Breadcrumbs.js +28 -0
- package/esm/components/Page/Breadcrumbs.js.map +1 -0
- package/esm/components/Page/Page.js +73 -9
- package/esm/components/Page/Page.js.map +1 -1
- package/esm/components/Pagination/Pagination.js +23 -12
- package/esm/components/Pagination/Pagination.js.map +1 -1
- package/esm/components/Progress/Progress.js +35 -3
- package/esm/components/Progress/Progress.js.map +1 -1
- package/esm/components/Radio/Radio.js +35 -25
- package/esm/components/Radio/Radio.js.map +1 -1
- package/esm/components/Radio/RadioGroup/RadioGroup.context.js.map +1 -1
- package/esm/components/Radio/RadioGroup/RadioGroup.js +37 -24
- package/esm/components/Radio/RadioGroup/RadioGroup.js.map +1 -1
- package/esm/components/RangeField/RangeField.js +31 -27
- package/esm/components/RangeField/RangeField.js.map +1 -1
- package/esm/components/Select/Select.js +75 -31
- package/esm/components/Select/Select.js.map +1 -1
- package/esm/components/Sidebar/Sidebar.js +121 -109
- package/esm/components/Sidebar/Sidebar.js.map +1 -1
- package/esm/components/Sidebar/components/Back.js +23 -0
- package/esm/components/Sidebar/components/Back.js.map +1 -0
- package/esm/components/Sidebar/components/Menu.js +5 -7
- package/esm/components/Sidebar/components/Menu.js.map +1 -1
- package/esm/components/Sidebar/components/MenuItem.js +25 -7
- package/esm/components/Sidebar/components/MenuItem.js.map +1 -1
- package/esm/components/Sidebar/components/Section.js +4 -5
- package/esm/components/Sidebar/components/Section.js.map +1 -1
- package/esm/components/Sidebar/components/SubMenu.js +4 -4
- package/esm/components/Sidebar/components/SubMenu.js.map +1 -1
- package/esm/components/Spinner/Spinner.js +9 -4
- package/esm/components/Spinner/Spinner.js.map +1 -1
- package/esm/components/StatCard/StatCard.js +46 -10
- package/esm/components/StatCard/StatCard.js.map +1 -1
- package/esm/components/Switch/Switch.js +42 -20
- package/esm/components/Switch/Switch.js.map +1 -1
- package/esm/components/Table/Table.js +95 -31
- package/esm/components/Table/Table.js.map +1 -1
- package/esm/components/Table/components/Checkbox/index.js +8 -8
- package/esm/components/Table/components/Checkbox/index.js.map +1 -1
- package/esm/components/Table/components/TableBody.js +3 -3
- package/esm/components/Table/components/TableBody.js.map +1 -1
- package/esm/components/Table/components/TableCell.js +3 -4
- package/esm/components/Table/components/TableCell.js.map +1 -1
- package/esm/components/Table/components/TableGroup.js +15 -0
- package/esm/components/Table/components/TableGroup.js.map +1 -0
- package/esm/components/Table/components/TableHead.js +19 -16
- package/esm/components/Table/components/TableHead.js.map +1 -1
- package/esm/components/Table/components/TableHeadCell.js +23 -6
- package/esm/components/Table/components/TableHeadCell.js.map +1 -1
- package/esm/components/Table/components/TablePagination.js +6 -3
- package/esm/components/Table/components/TablePagination.js.map +1 -1
- package/esm/components/Table/components/TableProvider/TableProvider.js +5 -5
- package/esm/components/Table/components/TableProvider/TableProvider.js.map +1 -1
- package/esm/components/Table/components/TableRow.js +11 -8
- package/esm/components/Table/components/TableRow.js.map +1 -1
- package/esm/components/Table/labels.js +18 -0
- package/esm/components/Table/labels.js.map +1 -0
- package/esm/components/Table/utils/rows/context.js.map +1 -1
- package/esm/components/Table/utils/table/context.js.map +1 -1
- package/esm/components/Table/utils/table/hooks.js +4 -4
- package/esm/components/Table/utils/table/hooks.js.map +1 -1
- package/esm/components/Table/utils/table/types.js +1 -7
- package/esm/components/Table/utils/table/types.js.map +1 -1
- package/esm/components/Table/utils/useSelectableResourceState/index.js +4 -5
- package/esm/components/Table/utils/useSelectableResourceState/index.js.map +1 -1
- package/esm/components/Tag/Tag.js +36 -5
- package/esm/components/Tag/Tag.js.map +1 -1
- package/esm/components/Tag/TagGroup.js +3 -2
- package/esm/components/Tag/TagGroup.js.map +1 -1
- package/esm/components/TextField/TextField.js +41 -38
- package/esm/components/TextField/TextField.js.map +1 -1
- package/esm/components/Textarea/Textarea.js +10 -26
- package/esm/components/Textarea/Textarea.js.map +1 -1
- package/esm/components/Thumbnail/Thumbnail.js +22 -8
- package/esm/components/Thumbnail/Thumbnail.js.map +1 -1
- package/esm/components/Timeline/Timeline.js +25 -0
- package/esm/components/Timeline/Timeline.js.map +1 -0
- package/esm/components/Timeline/TimelineGroup.js +27 -0
- package/esm/components/Timeline/TimelineGroup.js.map +1 -0
- package/esm/components/Timeline/TimelineItem.js +23 -0
- package/esm/components/Timeline/TimelineItem.js.map +1 -0
- package/esm/components/Toast/Toast.js +18 -2
- package/esm/components/Toast/Toast.js.map +1 -1
- package/esm/components/Toast/Toasts.context.js +17 -4
- package/esm/components/Toast/Toasts.context.js.map +1 -1
- package/esm/components/Toast/ToastsContainer/index.js +44 -20
- package/esm/components/Toast/ToastsContainer/index.js.map +1 -1
- package/esm/components/Toast/ToastsProvider/index.js +10 -14
- package/esm/components/Toast/ToastsProvider/index.js.map +1 -1
- package/esm/components/Toast/store.js +47 -0
- package/esm/components/Toast/store.js.map +1 -0
- package/esm/components/Tooltip/Tooltip.js +34 -53
- package/esm/components/Tooltip/Tooltip.js.map +1 -1
- package/esm/components/Tooltip/TooltipCallout.js +45 -0
- package/esm/components/Tooltip/TooltipCallout.js.map +1 -0
- package/esm/components/Tooltip/useTooltip.js +12 -33
- package/esm/components/Tooltip/useTooltip.js.map +1 -1
- package/esm/components/Visualizer/Visualizer.js +69 -9
- package/esm/components/Visualizer/Visualizer.js.map +1 -1
- package/esm/index.js +31 -27
- package/esm/index.js.map +1 -1
- package/esm/tokens/tokens.js +1530 -0
- package/esm/tokens/tokens.js.map +1 -0
- package/esm/utils/Slot/index.js +37 -0
- package/esm/utils/Slot/index.js.map +1 -0
- package/esm/utils/classNames/index.js +3 -3
- package/esm/utils/classNames/index.js.map +1 -1
- package/esm/utils/getElementRef/index.js +14 -0
- package/esm/utils/getElementRef/index.js.map +1 -0
- package/esm/utils/guid/index.js.map +1 -1
- package/esm/utils/toPercent/index.js +7 -0
- package/esm/utils/toPercent/index.js.map +1 -0
- package/esm/utils/useControllableState/index.js +24 -0
- package/esm/utils/useControllableState/index.js.map +1 -0
- package/esm/utils/useDropdown/DropdownTrigger.js +18 -0
- package/esm/utils/useDropdown/DropdownTrigger.js.map +1 -0
- package/esm/utils/useDropdown/index.js +55 -25
- package/esm/utils/useDropdown/index.js.map +1 -1
- package/esm/utils/useImageFallback/index.js +11 -0
- package/esm/utils/useImageFallback/index.js.map +1 -0
- package/esm/utils/useUid/index.js.map +1 -1
- package/fonts/dm-sans/LICENSE +93 -0
- package/fonts/dm-sans/dm-sans-latin-400-italic.woff2 +0 -0
- package/fonts/dm-sans/dm-sans-latin-400-normal.woff2 +0 -0
- package/fonts/dm-sans/dm-sans-latin-700-italic.woff2 +0 -0
- package/fonts/dm-sans/dm-sans-latin-700-normal.woff2 +0 -0
- package/fonts/inter/LICENSE +93 -0
- package/fonts/inter/inter-latin-opsz-italic.woff2 +0 -0
- package/fonts/inter/inter-latin-opsz-normal.woff2 +0 -0
- package/fonts/roboto-mono/LICENSE +93 -0
- package/fonts/roboto-mono/roboto-mono-latin-wght-normal.woff2 +0 -0
- package/lib/components/ActionCard/ActionCard.d.ts +14 -13
- package/lib/components/ActionCard/ActionCard.d.ts.map +1 -1
- package/lib/components/ActionCard/ActionCardGroup.d.ts +22 -0
- package/lib/components/ActionCard/ActionCardGroup.d.ts.map +1 -0
- package/lib/components/ActionCard/index.d.ts +1 -0
- package/lib/components/ActionCard/index.d.ts.map +1 -1
- package/lib/components/ActionList/ActionList.context.d.ts +6 -3
- package/lib/components/ActionList/ActionList.context.d.ts.map +1 -1
- package/lib/components/ActionList/ActionList.d.ts +18 -18
- package/lib/components/ActionList/ActionList.d.ts.map +1 -1
- package/lib/components/ActionList/components/ActionListDivider.d.ts +4 -5
- package/lib/components/ActionList/components/ActionListDivider.d.ts.map +1 -1
- package/lib/components/ActionList/components/ActionListDropdown.d.ts +4 -1
- package/lib/components/ActionList/components/ActionListDropdown.d.ts.map +1 -1
- package/lib/components/ActionList/components/ActionListGroup.d.ts +7 -5
- package/lib/components/ActionList/components/ActionListGroup.d.ts.map +1 -1
- package/lib/components/ActionList/components/ActionListItem.d.ts +32 -7
- package/lib/components/ActionList/components/ActionListItem.d.ts.map +1 -1
- package/lib/components/ActionList/components/ActionListSearch.d.ts +21 -0
- package/lib/components/ActionList/components/ActionListSearch.d.ts.map +1 -0
- package/lib/components/ActionList/components/ActionListSubmenu.d.ts +22 -0
- package/lib/components/ActionList/components/ActionListSubmenu.d.ts.map +1 -0
- package/lib/components/ActionList/components/ActionListSwitchItem.d.ts +17 -0
- package/lib/components/ActionList/components/ActionListSwitchItem.d.ts.map +1 -0
- package/lib/components/ActionList/components/ActionListTrigger.d.ts +4 -6
- package/lib/components/ActionList/components/ActionListTrigger.d.ts.map +1 -1
- package/lib/components/Alert/Alert.d.ts +25 -11
- package/lib/components/Alert/Alert.d.ts.map +1 -1
- package/lib/components/AppFrame/AppFrame.d.ts +48 -0
- package/lib/components/AppFrame/AppFrame.d.ts.map +1 -0
- package/lib/components/AppFrame/index.d.ts +3 -0
- package/lib/components/AppFrame/index.d.ts.map +1 -0
- package/lib/components/Avatar/Avatar.d.ts +20 -8
- package/lib/components/Avatar/Avatar.d.ts.map +1 -1
- package/lib/components/BlockCard/BlockCard.d.ts +77 -11
- package/lib/components/BlockCard/BlockCard.d.ts.map +1 -1
- package/lib/components/BlockCard/index.d.ts +1 -1
- package/lib/components/BlockCard/index.d.ts.map +1 -1
- package/lib/components/Button/Button.d.ts +45 -26
- package/lib/components/Button/Button.d.ts.map +1 -1
- package/lib/components/ButtonIcon/ButtonIcon.d.ts +18 -17
- package/lib/components/ButtonIcon/ButtonIcon.d.ts.map +1 -1
- package/lib/components/Chart/Chart.d.ts +142 -0
- package/lib/components/Chart/Chart.d.ts.map +1 -0
- package/lib/components/Chart/index.d.ts +3 -0
- package/lib/components/Chart/index.d.ts.map +1 -0
- package/lib/components/Checkbox/Checkbox.d.ts +25 -33
- package/lib/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/Checkbox/CheckboxGroup/CheckboxGroup.context.d.ts +2 -0
- package/lib/components/Checkbox/CheckboxGroup/CheckboxGroup.context.d.ts.map +1 -1
- package/lib/components/Checkbox/CheckboxGroup/CheckboxGroup.d.ts +23 -5
- package/lib/components/Checkbox/CheckboxGroup/CheckboxGroup.d.ts.map +1 -1
- package/lib/components/Checkbox/ChoiceText.d.ts +17 -0
- package/lib/components/Checkbox/ChoiceText.d.ts.map +1 -0
- package/lib/components/Checkbox/index.d.ts +0 -1
- package/lib/components/Checkbox/index.d.ts.map +1 -1
- package/lib/components/ColorField/ColorField.d.ts +15 -13
- package/lib/components/ColorField/ColorField.d.ts.map +1 -1
- package/lib/components/ColorField/index.d.ts +1 -1
- package/lib/components/ColorField/index.d.ts.map +1 -1
- package/lib/components/DatePicker/DatePicker.d.ts +13 -5
- package/lib/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/lib/components/DatePicker/components/Calendar/Calendar.d.ts +24 -3
- package/lib/components/DatePicker/components/Calendar/Calendar.d.ts.map +1 -1
- package/lib/components/DatePicker/components/Day/Day.d.ts +11 -10
- package/lib/components/DatePicker/components/Day/Day.d.ts.map +1 -1
- package/lib/components/DatePicker/components/Month/Month.d.ts +21 -17
- package/lib/components/DatePicker/components/Month/Month.d.ts.map +1 -1
- package/lib/components/DatePicker/components/MonthGrid/MonthGrid.d.ts +32 -0
- package/lib/components/DatePicker/components/MonthGrid/MonthGrid.d.ts.map +1 -0
- package/lib/components/DatePicker/components/MonthGrid/index.d.ts +3 -0
- package/lib/components/DatePicker/components/MonthGrid/index.d.ts.map +1 -0
- package/lib/components/DatePicker/components/Weekday/Weekday.d.ts +4 -3
- package/lib/components/DatePicker/components/Weekday/Weekday.d.ts.map +1 -1
- package/lib/components/DatePicker/components/index.d.ts +1 -0
- package/lib/components/DatePicker/components/index.d.ts.map +1 -1
- package/lib/components/DatePicker/utils/index.d.ts +339 -17
- package/lib/components/DatePicker/utils/index.d.ts.map +1 -1
- package/lib/components/DatePicker/utils/types.d.ts +4 -2
- package/lib/components/DatePicker/utils/types.d.ts.map +1 -1
- package/lib/components/DescriptiveList/DescriptiveList.d.ts +10 -11
- package/lib/components/DescriptiveList/DescriptiveList.d.ts.map +1 -1
- package/lib/components/DescriptiveList/DescriptiveListItem.d.ts +10 -4
- package/lib/components/DescriptiveList/DescriptiveListItem.d.ts.map +1 -1
- package/lib/components/DropdownCard/DropdownCard.context.d.ts +5 -2
- package/lib/components/DropdownCard/DropdownCard.context.d.ts.map +1 -1
- package/lib/components/DropdownCard/DropdownCard.d.ts +15 -13
- package/lib/components/DropdownCard/DropdownCard.d.ts.map +1 -1
- package/lib/components/DropdownCard/components/DropdownCardActions.d.ts +4 -3
- package/lib/components/DropdownCard/components/DropdownCardActions.d.ts.map +1 -1
- package/lib/components/DropdownCard/components/DropdownCardContent.d.ts +4 -3
- package/lib/components/DropdownCard/components/DropdownCardContent.d.ts.map +1 -1
- package/lib/components/DropdownCard/components/DropdownCardDropdown.d.ts +12 -3
- package/lib/components/DropdownCard/components/DropdownCardDropdown.d.ts.map +1 -1
- package/lib/components/DropdownCard/components/DropdownCardTabs.d.ts +44 -0
- package/lib/components/DropdownCard/components/DropdownCardTabs.d.ts.map +1 -0
- package/lib/components/DropdownCard/components/DropdownCardTrigger.d.ts +4 -6
- package/lib/components/DropdownCard/components/DropdownCardTrigger.d.ts.map +1 -1
- package/lib/components/DropdownCard/components/index.d.ts +1 -0
- package/lib/components/DropdownCard/components/index.d.ts.map +1 -1
- package/lib/components/Field/Field.d.ts +47 -0
- package/lib/components/Field/Field.d.ts.map +1 -0
- package/lib/components/Field/index.d.ts +3 -0
- package/lib/components/Field/index.d.ts.map +1 -0
- package/lib/components/FileField/FileField.d.ts +20 -11
- package/lib/components/FileField/FileField.d.ts.map +1 -1
- package/lib/components/FileField/index.d.ts +1 -1
- package/lib/components/FileField/index.d.ts.map +1 -1
- package/lib/components/FormActions/FormActions.d.ts +9 -0
- package/lib/components/FormActions/FormActions.d.ts.map +1 -0
- package/lib/components/FormActions/index.d.ts +3 -0
- package/lib/components/FormActions/index.d.ts.map +1 -0
- package/lib/components/HyperlinkCard/HyperlinkCard.d.ts +11 -8
- package/lib/components/HyperlinkCard/HyperlinkCard.d.ts.map +1 -1
- package/lib/components/Icon/Icon.d.ts +14 -13
- package/lib/components/Icon/Icon.d.ts.map +1 -1
- package/lib/components/IconBadge/IconBadge.d.ts +24 -0
- package/lib/components/IconBadge/IconBadge.d.ts.map +1 -0
- package/lib/components/IconBadge/index.d.ts +3 -0
- package/lib/components/IconBadge/index.d.ts.map +1 -0
- package/lib/components/Loader/Loader.d.ts +17 -6
- package/lib/components/Loader/Loader.d.ts.map +1 -1
- package/lib/components/Loader/index.d.ts +1 -1
- package/lib/components/Loader/index.d.ts.map +1 -1
- package/lib/components/Modal/Modal.d.ts +4 -6
- package/lib/components/Modal/Modal.d.ts.map +1 -1
- package/lib/components/Modal/ModalProvider/ModalProviderFooter.d.ts.map +1 -1
- package/lib/components/Modal/ModalProvider/index.d.ts.map +1 -1
- package/lib/components/Modal/index.d.ts +1 -1
- package/lib/components/Modal/index.d.ts.map +1 -1
- package/lib/components/Modal/types/index.d.ts +36 -15
- package/lib/components/Modal/types/index.d.ts.map +1 -1
- package/lib/components/Modal/utils/index.d.ts +0 -1
- package/lib/components/Modal/utils/index.d.ts.map +1 -1
- package/lib/components/Modal/utils/reducer.d.ts +286 -6
- package/lib/components/Modal/utils/reducer.d.ts.map +1 -1
- package/lib/components/Modal/utils/useModal.d.ts +3 -2
- package/lib/components/Modal/utils/useModal.d.ts.map +1 -1
- package/lib/components/Page/Breadcrumbs.d.ts +20 -0
- package/lib/components/Page/Breadcrumbs.d.ts.map +1 -0
- package/lib/components/Page/Page.d.ts +61 -27
- package/lib/components/Page/Page.d.ts.map +1 -1
- package/lib/components/Page/index.d.ts +3 -1
- package/lib/components/Page/index.d.ts.map +1 -1
- package/lib/components/Pagination/Pagination.d.ts +22 -20
- package/lib/components/Pagination/Pagination.d.ts.map +1 -1
- package/lib/components/Pagination/index.d.ts +1 -1
- package/lib/components/Pagination/index.d.ts.map +1 -1
- package/lib/components/Progress/Progress.d.ts +29 -6
- package/lib/components/Progress/Progress.d.ts.map +1 -1
- package/lib/components/Progress/index.d.ts +1 -1
- package/lib/components/Progress/index.d.ts.map +1 -1
- package/lib/components/Radio/Radio.d.ts +19 -33
- package/lib/components/Radio/Radio.d.ts.map +1 -1
- package/lib/components/Radio/RadioGroup/RadioGroup.context.d.ts +2 -0
- package/lib/components/Radio/RadioGroup/RadioGroup.context.d.ts.map +1 -1
- package/lib/components/Radio/RadioGroup/RadioGroup.d.ts +22 -18
- package/lib/components/Radio/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/lib/components/RangeField/RangeField.d.ts +8 -15
- package/lib/components/RangeField/RangeField.d.ts.map +1 -1
- package/lib/components/Select/Select.d.ts +45 -43
- package/lib/components/Select/Select.d.ts.map +1 -1
- package/lib/components/Sidebar/Sidebar.d.ts +48 -25
- package/lib/components/Sidebar/Sidebar.d.ts.map +1 -1
- package/lib/components/Sidebar/components/Back.d.ts +14 -0
- package/lib/components/Sidebar/components/Back.d.ts.map +1 -0
- package/lib/components/Sidebar/components/Menu.d.ts +9 -14
- package/lib/components/Sidebar/components/Menu.d.ts.map +1 -1
- package/lib/components/Sidebar/components/MenuItem.d.ts +18 -15
- package/lib/components/Sidebar/components/MenuItem.d.ts.map +1 -1
- package/lib/components/Sidebar/components/Section.d.ts +6 -6
- package/lib/components/Sidebar/components/Section.d.ts.map +1 -1
- package/lib/components/Sidebar/components/SubMenu.d.ts +6 -8
- package/lib/components/Sidebar/components/SubMenu.d.ts.map +1 -1
- package/lib/components/Sidebar/index.d.ts +1 -1
- package/lib/components/Sidebar/index.d.ts.map +1 -1
- package/lib/components/Spinner/Spinner.d.ts +12 -5
- package/lib/components/Spinner/Spinner.d.ts.map +1 -1
- package/lib/components/Spinner/index.d.ts +1 -1
- package/lib/components/Spinner/index.d.ts.map +1 -1
- package/lib/components/StatCard/StatCard.d.ts +31 -11
- package/lib/components/StatCard/StatCard.d.ts.map +1 -1
- package/lib/components/StatCard/index.d.ts +1 -1
- package/lib/components/StatCard/index.d.ts.map +1 -1
- package/lib/components/Switch/Switch.d.ts +14 -15
- package/lib/components/Switch/Switch.d.ts.map +1 -1
- package/lib/components/Table/Table.d.ts +54 -25
- package/lib/components/Table/Table.d.ts.map +1 -1
- package/lib/components/Table/Table.types.d.ts +1 -1
- package/lib/components/Table/Table.types.d.ts.map +1 -1
- package/lib/components/Table/components/Checkbox/index.d.ts +7 -3
- package/lib/components/Table/components/Checkbox/index.d.ts.map +1 -1
- package/lib/components/Table/components/TableBody.d.ts +2 -2
- package/lib/components/Table/components/TableBody.d.ts.map +1 -1
- package/lib/components/Table/components/TableCell.d.ts +7 -3
- package/lib/components/Table/components/TableCell.d.ts.map +1 -1
- package/lib/components/Table/components/TableGroup.d.ts +16 -0
- package/lib/components/Table/components/TableGroup.d.ts.map +1 -0
- package/lib/components/Table/components/TableHead.d.ts +8 -2
- package/lib/components/Table/components/TableHead.d.ts.map +1 -1
- package/lib/components/Table/components/TableHeadCell.d.ts +24 -5
- package/lib/components/Table/components/TableHeadCell.d.ts.map +1 -1
- package/lib/components/Table/components/TablePagination.d.ts +3 -1
- package/lib/components/Table/components/TablePagination.d.ts.map +1 -1
- package/lib/components/Table/components/TableProvider/TableProvider.d.ts +1 -2
- package/lib/components/Table/components/TableProvider/TableProvider.d.ts.map +1 -1
- package/lib/components/Table/components/TableRow.d.ts +8 -2
- package/lib/components/Table/components/TableRow.d.ts.map +1 -1
- package/lib/components/Table/index.d.ts +3 -3
- package/lib/components/Table/index.d.ts.map +1 -1
- package/lib/components/Table/labels.d.ts +23 -0
- package/lib/components/Table/labels.d.ts.map +1 -0
- package/lib/components/Table/utils/table/types.d.ts +6 -11
- package/lib/components/Table/utils/table/types.d.ts.map +1 -1
- package/lib/components/Table/utils/useSelectableResourceState/index.d.ts +1 -2
- package/lib/components/Table/utils/useSelectableResourceState/index.d.ts.map +1 -1
- package/lib/components/Tag/Tag.d.ts +42 -15
- package/lib/components/Tag/Tag.d.ts.map +1 -1
- package/lib/components/Tag/TagGroup.d.ts +3 -3
- package/lib/components/Tag/TagGroup.d.ts.map +1 -1
- package/lib/components/Tag/index.d.ts +1 -1
- package/lib/components/Tag/index.d.ts.map +1 -1
- package/lib/components/TextField/TextField.d.ts +11 -27
- package/lib/components/TextField/TextField.d.ts.map +1 -1
- package/lib/components/Textarea/Textarea.d.ts +10 -26
- package/lib/components/Textarea/Textarea.d.ts.map +1 -1
- package/lib/components/Thumbnail/Thumbnail.d.ts +11 -7
- package/lib/components/Thumbnail/Thumbnail.d.ts.map +1 -1
- package/lib/components/Timeline/Timeline.d.ts +26 -0
- package/lib/components/Timeline/Timeline.d.ts.map +1 -0
- package/lib/components/Timeline/TimelineGroup.d.ts +15 -0
- package/lib/components/Timeline/TimelineGroup.d.ts.map +1 -0
- package/lib/components/Timeline/TimelineItem.d.ts +19 -0
- package/lib/components/Timeline/TimelineItem.d.ts.map +1 -0
- package/lib/components/Timeline/index.d.ts +5 -0
- package/lib/components/Timeline/index.d.ts.map +1 -0
- package/lib/components/Toast/Toast.d.ts +20 -10
- package/lib/components/Toast/Toast.d.ts.map +1 -1
- package/lib/components/Toast/Toasts.context.d.ts +15 -2
- package/lib/components/Toast/Toasts.context.d.ts.map +1 -1
- package/lib/components/Toast/ToastsContainer/index.d.ts.map +1 -1
- package/lib/components/Toast/ToastsProvider/index.d.ts +1 -3
- package/lib/components/Toast/ToastsProvider/index.d.ts.map +1 -1
- package/lib/components/Toast/index.d.ts +3 -5
- package/lib/components/Toast/index.d.ts.map +1 -1
- package/lib/components/Toast/store.d.ts +30 -0
- package/lib/components/Toast/store.d.ts.map +1 -0
- package/lib/components/Toast/types.d.ts +8 -5
- package/lib/components/Toast/types.d.ts.map +1 -1
- package/lib/components/Tooltip/Tooltip.d.ts +29 -23
- package/lib/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/lib/components/Tooltip/TooltipCallout.d.ts +31 -0
- package/lib/components/Tooltip/TooltipCallout.d.ts.map +1 -0
- package/lib/components/Tooltip/useTooltip.d.ts +16 -27
- package/lib/components/Tooltip/useTooltip.d.ts.map +1 -1
- package/lib/components/Visualizer/Visualizer.d.ts +19 -8
- package/lib/components/Visualizer/Visualizer.d.ts.map +1 -1
- package/lib/components/Visualizer/index.d.ts +1 -1
- package/lib/components/Visualizer/index.d.ts.map +1 -1
- package/lib/index.d.ts +134 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/showcase/chartData.d.ts +29 -0
- package/lib/showcase/chartData.d.ts.map +1 -0
- package/lib/tokens/tokens.d.ts +1528 -0
- package/lib/tokens/tokens.d.ts.map +1 -0
- package/lib/types.d.ts +4 -29
- package/lib/types.d.ts.map +1 -1
- package/lib/utils/Slot/index.d.ts +11 -0
- package/lib/utils/Slot/index.d.ts.map +1 -0
- package/lib/utils/classNames/index.d.ts +3 -1
- package/lib/utils/classNames/index.d.ts.map +1 -1
- package/lib/utils/getElementRef/index.d.ts +9 -0
- package/lib/utils/getElementRef/index.d.ts.map +1 -0
- package/lib/utils/index.d.ts +4 -7
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/toPercent/index.d.ts +3 -0
- package/lib/utils/toPercent/index.d.ts.map +1 -0
- package/lib/utils/useControllableState/index.d.ts +19 -0
- package/lib/utils/useControllableState/index.d.ts.map +1 -0
- package/lib/utils/useDropdown/DropdownTrigger.d.ts +12 -0
- package/lib/utils/useDropdown/DropdownTrigger.d.ts.map +1 -0
- package/lib/utils/useDropdown/index.d.ts +30 -6
- package/lib/utils/useDropdown/index.d.ts.map +1 -1
- package/lib/utils/useImageFallback/index.d.ts +15 -0
- package/lib/utils/useImageFallback/index.d.ts.map +1 -0
- package/package.json +19 -11
- package/theme.css +1 -1
- package/theme.css.d.ts +2 -0
- package/cjs/components/ActionList/useDropdown.js +0 -47
- package/cjs/components/ActionList/useDropdown.js.map +0 -1
- package/cjs/components/Modal/utils/events.js +0 -19
- package/cjs/components/Modal/utils/events.js.map +0 -1
- package/cjs/components/Toast/ToastsProvider/useToastsState/useToastsState.js +0 -55
- package/cjs/components/Toast/ToastsProvider/useToastsState/useToastsState.js.map +0 -1
- package/cjs/components/Toast/events.js +0 -20
- package/cjs/components/Toast/events.js.map +0 -1
- package/cjs/components/Visualizer/Visualizer.context.js +0 -12
- package/cjs/components/Visualizer/Visualizer.context.js.map +0 -1
- package/cjs/components/Visualizer/VisualizerMobileOpener.js +0 -28
- package/cjs/components/Visualizer/VisualizerMobileOpener.js.map +0 -1
- package/cjs/utils/createUseExternalEvents/index.js +0 -32
- package/cjs/utils/createUseExternalEvents/index.js.map +0 -1
- package/cjs/utils/useIsomorphicEffect/index.js +0 -22
- package/cjs/utils/useIsomorphicEffect/index.js.map +0 -1
- package/cjs/utils/useQueue/index.js +0 -36
- package/cjs/utils/useQueue/index.js.map +0 -1
- package/cjs/utils/useUncontrolled/index.js +0 -25
- package/cjs/utils/useUncontrolled/index.js.map +0 -1
- package/esm/components/ActionList/useDropdown.js +0 -45
- package/esm/components/ActionList/useDropdown.js.map +0 -1
- package/esm/components/Modal/utils/events.js +0 -13
- package/esm/components/Modal/utils/events.js.map +0 -1
- package/esm/components/Toast/ToastsProvider/useToastsState/useToastsState.js +0 -51
- package/esm/components/Toast/ToastsProvider/useToastsState/useToastsState.js.map +0 -1
- package/esm/components/Toast/events.js +0 -12
- package/esm/components/Toast/events.js.map +0 -1
- package/esm/components/Visualizer/Visualizer.context.js +0 -9
- package/esm/components/Visualizer/Visualizer.context.js.map +0 -1
- package/esm/components/Visualizer/VisualizerMobileOpener.js +0 -13
- package/esm/components/Visualizer/VisualizerMobileOpener.js.map +0 -1
- package/esm/utils/createUseExternalEvents/index.js +0 -30
- package/esm/utils/createUseExternalEvents/index.js.map +0 -1
- package/esm/utils/useIsomorphicEffect/index.js +0 -7
- package/esm/utils/useIsomorphicEffect/index.js.map +0 -1
- package/esm/utils/useQueue/index.js +0 -34
- package/esm/utils/useQueue/index.js.map +0 -1
- package/esm/utils/useUncontrolled/index.js +0 -23
- package/esm/utils/useUncontrolled/index.js.map +0 -1
- package/lib/components/ActionList/useDropdown.d.ts +0 -57
- package/lib/components/ActionList/useDropdown.d.ts.map +0 -1
- package/lib/components/CodeBlock/CodeBlock.d.ts +0 -16
- package/lib/components/CodeBlock/CodeBlock.d.ts.map +0 -1
- package/lib/components/CodeBlock/index.d.ts +0 -2
- package/lib/components/CodeBlock/index.d.ts.map +0 -1
- package/lib/components/Modal/utils/events.d.ts +0 -9
- package/lib/components/Modal/utils/events.d.ts.map +0 -1
- package/lib/components/Toast/ToastsProvider/useToastsState/useToastsState.d.ts +0 -13
- package/lib/components/Toast/ToastsProvider/useToastsState/useToastsState.d.ts.map +0 -1
- package/lib/components/Toast/events.d.ts +0 -37
- package/lib/components/Toast/events.d.ts.map +0 -1
- package/lib/components/Visualizer/Visualizer.context.d.ts +0 -14
- package/lib/components/Visualizer/Visualizer.context.d.ts.map +0 -1
- package/lib/components/Visualizer/VisualizerMobileOpener.d.ts +0 -7
- package/lib/components/Visualizer/VisualizerMobileOpener.d.ts.map +0 -1
- package/lib/components/index.d.ts +0 -36
- package/lib/components/index.d.ts.map +0 -1
- package/lib/utils/createUseExternalEvents/index.d.ts +0 -14
- package/lib/utils/createUseExternalEvents/index.d.ts.map +0 -1
- package/lib/utils/useDidUpdate/index.d.ts +0 -30
- package/lib/utils/useDidUpdate/index.d.ts.map +0 -1
- package/lib/utils/useEventListener/index.d.ts +0 -7
- package/lib/utils/useEventListener/index.d.ts.map +0 -1
- package/lib/utils/useForceUpdate/index.d.ts +0 -28
- package/lib/utils/useForceUpdate/index.d.ts.map +0 -1
- package/lib/utils/useIsomorphicEffect/index.d.ts +0 -21
- package/lib/utils/useIsomorphicEffect/index.d.ts.map +0 -1
- package/lib/utils/useQueue/index.d.ts +0 -65
- package/lib/utils/useQueue/index.d.ts.map +0 -1
- package/lib/utils/useUncontrolled/index.d.ts +0 -38
- package/lib/utils/useUncontrolled/index.d.ts.map +0 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
5
|
var React = require('react');
|
|
5
6
|
var index = require('../../utils/classNames/index.js');
|
|
6
7
|
|
|
@@ -17,11 +18,104 @@ function _interopNamespaceDefault(e) {
|
|
|
17
18
|
|
|
18
19
|
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
19
20
|
|
|
20
|
-
const
|
|
21
|
-
const {
|
|
22
|
-
|
|
21
|
+
const BlockCardBase = React__namespace.forwardRef((props, ref) => {
|
|
22
|
+
const {
|
|
23
|
+
title,
|
|
24
|
+
label,
|
|
25
|
+
headingLevel = 2,
|
|
26
|
+
description,
|
|
27
|
+
figure,
|
|
28
|
+
figureSize = "medium",
|
|
29
|
+
children,
|
|
30
|
+
actions,
|
|
31
|
+
raised,
|
|
32
|
+
compact,
|
|
33
|
+
plain,
|
|
34
|
+
className,
|
|
35
|
+
...others
|
|
36
|
+
} = props;
|
|
37
|
+
const Heading = `h${headingLevel}`;
|
|
38
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
39
|
+
"article",
|
|
40
|
+
{
|
|
41
|
+
...others,
|
|
42
|
+
ref,
|
|
43
|
+
className: index.classNames(
|
|
44
|
+
"roaster-block-card",
|
|
45
|
+
{
|
|
46
|
+
"roaster-block-card--raised": raised,
|
|
47
|
+
"roaster-block-card--compact": compact,
|
|
48
|
+
"roaster-block-card--plain": plain
|
|
49
|
+
},
|
|
50
|
+
className
|
|
51
|
+
),
|
|
52
|
+
children: [
|
|
53
|
+
(title || label || description || figure != null || actions) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "roaster-block-card__header", children: [
|
|
54
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
55
|
+
title && /* @__PURE__ */ jsxRuntime.jsx(Heading, { className: "roaster-block-card__title", children: title }),
|
|
56
|
+
label && /* @__PURE__ */ jsxRuntime.jsx(Heading, { className: "roaster-block-card__label", children: label }),
|
|
57
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "roaster-block-card__description", children: description }),
|
|
58
|
+
figure != null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
59
|
+
"p",
|
|
60
|
+
{
|
|
61
|
+
className: index.classNames("roaster-block-card__figure", {
|
|
62
|
+
"roaster-block-card__figure--large": figureSize === "large"
|
|
63
|
+
}),
|
|
64
|
+
children: figure
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
] }),
|
|
68
|
+
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "roaster-block-card__actions", children: actions })
|
|
69
|
+
] }),
|
|
70
|
+
children
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
});
|
|
75
|
+
BlockCardBase.displayName = "BlockCard";
|
|
76
|
+
const BlockCardSection = React__namespace.forwardRef(({ className, ...others }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ...others, ref, className: index.classNames("roaster-block-card__section", className) }));
|
|
77
|
+
BlockCardSection.displayName = "BlockCard.Section";
|
|
78
|
+
const BlockCardStats = React__namespace.forwardRef(
|
|
79
|
+
({ ruled, className, ...others }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
80
|
+
"dl",
|
|
81
|
+
{
|
|
82
|
+
...others,
|
|
83
|
+
ref,
|
|
84
|
+
className: index.classNames("roaster-block-card__stats", { "roaster-block-card__section": ruled }, className)
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
);
|
|
88
|
+
BlockCardStats.displayName = "BlockCard.Stats";
|
|
89
|
+
const BlockCardStat = React__namespace.forwardRef(
|
|
90
|
+
({ term, icon, children, ...others }, ref) => /* @__PURE__ */ jsxRuntime.jsxs("div", { ...others, ref, children: [
|
|
91
|
+
/* @__PURE__ */ jsxRuntime.jsxs("dt", { children: [
|
|
92
|
+
icon,
|
|
93
|
+
term
|
|
94
|
+
] }),
|
|
95
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { children })
|
|
96
|
+
] })
|
|
97
|
+
);
|
|
98
|
+
BlockCardStat.displayName = "BlockCard.Stat";
|
|
99
|
+
const BlockCardList = React__namespace.forwardRef(({ className, ...others }, ref) => /* @__PURE__ */ jsxRuntime.jsx("ul", { ...others, ref, className: index.classNames("roaster-block-card__list", className) }));
|
|
100
|
+
BlockCardList.displayName = "BlockCard.List";
|
|
101
|
+
const BlockCardItem = React__namespace.forwardRef(
|
|
102
|
+
({ children, avatar, end, className, ...others }, ref) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs("a", { ...others, ref, className: index.classNames("roaster-block-card__item", className), children: [
|
|
103
|
+
avatar,
|
|
104
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children }),
|
|
105
|
+
end != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "roaster-block-card__end", children: end })
|
|
106
|
+
] }) })
|
|
107
|
+
);
|
|
108
|
+
BlockCardItem.displayName = "BlockCard.Item";
|
|
109
|
+
const BlockCardFooter = React__namespace.forwardRef(({ className, ...others }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ...others, ref, className: index.classNames("roaster-block-card__footer", className) }));
|
|
110
|
+
BlockCardFooter.displayName = "BlockCard.Footer";
|
|
111
|
+
const BlockCard = Object.assign(BlockCardBase, {
|
|
112
|
+
Section: BlockCardSection,
|
|
113
|
+
Stats: BlockCardStats,
|
|
114
|
+
Stat: BlockCardStat,
|
|
115
|
+
List: BlockCardList,
|
|
116
|
+
Item: BlockCardItem,
|
|
117
|
+
Footer: BlockCardFooter
|
|
23
118
|
});
|
|
24
|
-
BlockCard.displayName = "BlockCard";
|
|
25
119
|
|
|
26
120
|
exports.BlockCard = BlockCard;
|
|
27
121
|
//# sourceMappingURL=BlockCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockCard.js","sources":["../../../../src/components/BlockCard/BlockCard.tsx"],"sourcesContent":["import * as React from 'react';\nimport { classNames } from '@/utils';\n\nexport interface BlockCardProps {\n /** The child elements to be rendered within the BlockCard (required) */\n children: React.ReactNode;\n /** The title of the BlockCard (optional) */\n title?: React.ReactNode;\n /** The description of the BlockCard (optional) */\n description?: React.ReactNode;\n /** The action elements to be rendered at top right of the BlockCard (optional) */\n actions?: React.ReactNode;\n /** CSS class name(s) to be applied to the BlockCard root element (optional) */\n className?: string;\n /** The inline style object to be applied to the card element (optional) */\n style?: React.CSSProperties;\n}\n\n/**\n * A white card that groups related content, with an optional title, description and actions in its header.\n */\nexport const BlockCard = React.forwardRef<HTMLDivElement, BlockCardProps>((props, ref) => {\n const { title, description, children, actions, className, style } = props;\n\n return (\n <article ref={ref} className={classNames('card-block', className)} style={style}>\n {(title || description || actions) && (\n <div className=\"title-wrapper\">\n <div>\n {title && <h4>{title}</h4>}\n {description && <p className=\"text-secondary\">{description}</p>}\n </div>\n {actions && <div className=\"items-group\">{actions}</div>}\n </div>\n )}\n\n {children}\n </article>\n );\n});\n\nBlockCard.displayName = 'BlockCard';\n"],"names":["React","classNames"],"mappings":";;;;;;;;;;;;;;;;;;;AAEY,MAAC,SAAS,GAAGA,gBAAK,CAAC,UAAU,CAAC,CAAC,KAAK,EAAE,GAAG,KAAK;AAC1D,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,KAAK;AAC3E,EAAE,uBAAuBA,gBAAK,CAAC,aAAa,CAAC,SAAS,EAAE,EAAE,GAAG,EAAE,SAAS,EAAEC,gBAAU,CAAC,YAAY,EAAE,SAAS,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,IAAI,WAAW,IAAI,OAAO,qBAAqBD,gBAAK,CAAC,aAAa,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,kBAAkBA,gBAAK,CAAC,aAAa,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,oBAAoBA,gBAAK,CAAC,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE,WAAW,oBAAoBA,gBAAK,CAAC,aAAa,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,EAAE,WAAW,CAAC,CAAC,EAAE,OAAO,oBAAoBA,gBAAK,CAAC,aAAa,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,aAAa,EAAE,EAAE,OAAO,CAAC,CAAC,EAAE,QAAQ,CAAC;AAC1iB,CAAC;AACD,SAAS,CAAC,WAAW,GAAG,WAAW;;"}
|
|
1
|
+
{"version":3,"file":"BlockCard.js","sources":["../../../../src/components/BlockCard/BlockCard.tsx"],"sourcesContent":["import * as React from 'react';\nimport { classNames } from '@/utils';\n\n/** Every native `<article>` prop (`id`, `aria-*`, `data-*`, ...) is accepted and forwarded to it. */\nexport interface BlockCardProps extends Omit<React.ComponentPropsWithoutRef<'article'>, 'title'> {\n /** The content of the card: its own parts (`BlockCard.Section`, `Stats`, `List`, `Footer`) or anything else. */\n children: React.ReactNode;\n /** The title, in the header. */\n title?: React.ReactNode;\n /**\n * A quiet name, in place of the title, for a card that leads with its figure, such as an account's balance on a\n * dashboard. A link in it keeps the text's color.\n */\n label?: React.ReactNode;\n /**\n * The heading level of the title or the label. It looks the same at any level.\n * @defaultValue 2\n */\n headingLevel?: 2 | 3 | 4;\n /** A line under the title. */\n description?: React.ReactNode;\n /** The amount the card leads with, under its label, its cents in a `<sup>`: `<>$12,505<sup>.87</sup></>`. */\n figure?: React.ReactNode;\n /**\n * `large` for the page's main figure.\n * @defaultValue 'medium'\n */\n figureSize?: 'medium' | 'large';\n /** Buttons at the end of the header. */\n actions?: React.ReactNode;\n /** The shadow of a clickable card, on a card the page sets apart (the theme may give other cards none). */\n raised?: boolean;\n /**\n * A small card, such as one in a page's side column: less room, smaller text, a quiet title, and a descriptive list\n * in it without a frame.\n */\n compact?: boolean;\n /** No frame at all, such as a section of a page's side column. */\n plain?: boolean;\n}\n\nconst BlockCardBase = React.forwardRef<HTMLElement, BlockCardProps>((props, ref) => {\n const {\n title,\n label,\n headingLevel = 2,\n description,\n figure,\n figureSize = 'medium',\n children,\n actions,\n raised,\n compact,\n plain,\n className,\n ...others\n } = props;\n const Heading = `h${headingLevel}` as 'h2' | 'h3' | 'h4';\n\n return (\n <article\n {...others}\n ref={ref}\n className={classNames(\n 'roaster-block-card',\n {\n 'roaster-block-card--raised': raised,\n 'roaster-block-card--compact': compact,\n 'roaster-block-card--plain': plain,\n },\n className\n )}\n >\n {(title || label || description || figure != null || actions) && (\n <div className=\"roaster-block-card__header\">\n <div>\n {title && <Heading className=\"roaster-block-card__title\">{title}</Heading>}\n {label && <Heading className=\"roaster-block-card__label\">{label}</Heading>}\n {description && <p className=\"roaster-block-card__description\">{description}</p>}\n {figure != null && (\n <p\n className={classNames('roaster-block-card__figure', {\n 'roaster-block-card__figure--large': figureSize === 'large',\n })}\n >\n {figure}\n </p>\n )}\n </div>\n {actions && <div className=\"roaster-block-card__actions\">{actions}</div>}\n </div>\n )}\n\n {children}\n </article>\n );\n});\n\nBlockCardBase.displayName = 'BlockCard';\n\n/** Every native `<div>` prop is accepted and forwarded to it. */\nexport type BlockCardSectionProps = React.ComponentPropsWithoutRef<'div'>;\n\n/** A part of the card ruled off from the next, such as a usage bar and its legend. */\nconst BlockCardSection = React.forwardRef<HTMLDivElement, BlockCardSectionProps>(({ className, ...others }, ref) => (\n <div {...others} ref={ref} className={classNames('roaster-block-card__section', className)} />\n));\nBlockCardSection.displayName = 'BlockCard.Section';\n\n/** Every native `<dl>` prop is accepted and forwarded to it. */\nexport interface BlockCardStatsProps extends React.ComponentPropsWithoutRef<'dl'> {\n /** The figures: `BlockCard.Stat`. */\n children: React.ReactNode;\n /** Ruled off from what follows, as a `BlockCard.Section` is. */\n ruled?: boolean;\n}\n\n/** Figures side by side, each a term over its value, as many columns as figures. */\nconst BlockCardStats = React.forwardRef<HTMLDListElement, BlockCardStatsProps>(\n ({ ruled, className, ...others }, ref) => (\n <dl\n {...others}\n ref={ref}\n className={classNames('roaster-block-card__stats', { 'roaster-block-card__section': ruled }, className)}\n />\n )\n);\nBlockCardStats.displayName = 'BlockCard.Stats';\n\n/** Every native `<div>` prop is accepted and forwarded to the term and its value's wrapper. */\nexport interface BlockCardStatProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> {\n /** What the figure is, such as \"Overdue\". */\n term: React.ReactNode;\n /** An icon before the term. */\n icon?: React.ReactNode;\n /** The figure, such as \"4 · $950.00\". A link in it reads as the figure. */\n children: React.ReactNode;\n}\n\n/** One figure of `BlockCard.Stats`: its term over its value. */\nconst BlockCardStat = React.forwardRef<HTMLDivElement, BlockCardStatProps>(\n ({ term, icon, children, ...others }, ref) => (\n <div {...others} ref={ref}>\n <dt>\n {icon}\n {term}\n </dt>\n <dd>{children}</dd>\n </div>\n )\n);\nBlockCardStat.displayName = 'BlockCard.Stat';\n\n/** Every native `<ul>` prop is accepted and forwarded to it. */\nexport interface BlockCardListProps extends React.ComponentPropsWithoutRef<'ul'> {\n /** The rows: `BlockCard.Item`. */\n children: React.ReactNode;\n}\n\n/** The things the card leads to, such as accounts or top recipients, a little wider than its content. */\nconst BlockCardList = React.forwardRef<HTMLUListElement, BlockCardListProps>(({ className, ...others }, ref) => (\n <ul {...others} ref={ref} className={classNames('roaster-block-card__list', className)} />\n));\nBlockCardList.displayName = 'BlockCard.List';\n\n/** Every native `<a>` prop (`href`, ...) is accepted and forwarded to the row's link. */\nexport interface BlockCardItemProps extends React.ComponentPropsWithoutRef<'a'> {\n /** The row's name. */\n children: React.ReactNode;\n /** Its picture, first: an `Avatar` (`size=\"small\"`). */\n avatar?: React.ReactNode;\n /** What ends the row, such as an amount, its cents in a `<sup>`. */\n end?: React.ReactNode;\n}\n\n/** A row of `BlockCard.List`: a link with an avatar, a name and what ends it. */\nconst BlockCardItem = React.forwardRef<HTMLAnchorElement, BlockCardItemProps>(\n ({ children, avatar, end, className, ...others }, ref) => (\n <li>\n <a {...others} ref={ref} className={classNames('roaster-block-card__item', className)}>\n {avatar}\n <span>{children}</span>\n {end != null && <span className=\"roaster-block-card__end\">{end}</span>}\n </a>\n </li>\n )\n);\nBlockCardItem.displayName = 'BlockCard.Item';\n\n/** Every native `<div>` prop is accepted and forwarded to it. */\nexport type BlockCardFooterProps = React.ComponentPropsWithoutRef<'div'>;\n\n/** The card's last band, ruled off across its width, such as an average and its small chart. */\nconst BlockCardFooter = React.forwardRef<HTMLDivElement, BlockCardFooterProps>(({ className, ...others }, ref) => (\n <div {...others} ref={ref} className={classNames('roaster-block-card__footer', className)} />\n));\nBlockCardFooter.displayName = 'BlockCard.Footer';\n\n/**\n * A white card that groups related content, with an optional header: a title (an `<h2>` by default) or a quiet\n * label, a description, a figure and actions. Its parts lay out a dashboard's card: `BlockCard.Section`, `Stats`\n * (of `Stat`), `List` (of `Item`) and `Footer`. A `Chart` that ends it reaches its edges.\n */\nexport const BlockCard = Object.assign(BlockCardBase, {\n Section: BlockCardSection,\n Stats: BlockCardStats,\n Stat: BlockCardStat,\n List: BlockCardList,\n Item: BlockCardItem,\n Footer: BlockCardFooter,\n});\n"],"names":["React","jsxs","classNames","jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,MAAM,aAAa,GAAGA,gBAAK,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G,EAAE;AACtG,GAAG,EAAE,CAAC,EAAE;AACR,CAAC;AACD,aAAa,CAAC,WAAW,GAAG,gBAAgB;AAC5C,MAAM,eAAe,GAAGH,gBAAK,CAAC,UAAU,CAAC,CAAC,EAAE,SAAS,EAAE,GAAG,MAAM,EAAE,EAAE,GAAG,qBAAqBG,cAAG,CAAC,KAAK,EAAE,EAAE,GAAG,MAAM,EAAE,GAAG,EAAE,SAAS,EAAED,gBAAU,CAAC,4BAA4B,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC;AAC3L,eAAe,CAAC,WAAW,GAAG,kBAAkB;AACpC,MAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE;AACtD,EAAE,OAAO,EAAE,gBAAgB;AAC3B,EAAE,KAAK,EAAE,cAAc;AACvB,EAAE,IAAI,EAAE,aAAa;AACrB,EAAE,IAAI,EAAE,aAAa;AACrB,EAAE,IAAI,EAAE,aAAa;AACrB,EAAE,MAAM,EAAE;AACV,CAAC;;"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
5
|
var React = require('react');
|
|
6
|
+
var Icon = require('../Icon/Icon.js');
|
|
5
7
|
var index = require('../../utils/classNames/index.js');
|
|
8
|
+
var index$1 = require('../../utils/Slot/index.js');
|
|
6
9
|
|
|
7
10
|
function _interopNamespaceDefault(e) {
|
|
8
11
|
var n = Object.create(null);
|
|
@@ -20,29 +23,47 @@ var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
|
20
23
|
const Button = React__namespace.forwardRef((props, ref) => {
|
|
21
24
|
const {
|
|
22
25
|
children,
|
|
23
|
-
submit,
|
|
24
26
|
variant = "primary",
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
tone,
|
|
28
|
+
size = "medium",
|
|
29
|
+
iconOnly,
|
|
30
|
+
caret,
|
|
31
|
+
fullWidth,
|
|
32
|
+
flush,
|
|
33
|
+
row,
|
|
34
|
+
loading,
|
|
35
|
+
asChild,
|
|
27
36
|
className,
|
|
28
|
-
style,
|
|
29
37
|
onClick,
|
|
30
|
-
|
|
38
|
+
type = "button",
|
|
31
39
|
...others
|
|
32
40
|
} = props;
|
|
33
|
-
|
|
34
|
-
"button",
|
|
41
|
+
const classes = index.classNames(
|
|
42
|
+
"roaster-button",
|
|
43
|
+
`roaster-button--${variant}`,
|
|
44
|
+
tone && `roaster-button--${tone}`,
|
|
35
45
|
{
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
className: index.classNames("button", variant, color, { disabled, icon: isIconButton }, className)
|
|
46
|
+
"roaster-button--small": size === "small",
|
|
47
|
+
"roaster-button--large": size === "large",
|
|
48
|
+
"roaster-button--icon-only": iconOnly,
|
|
49
|
+
"roaster-button--full-width": fullWidth,
|
|
50
|
+
"roaster-button--flush": flush,
|
|
51
|
+
"roaster-button--row": row
|
|
43
52
|
},
|
|
44
|
-
|
|
53
|
+
className
|
|
45
54
|
);
|
|
55
|
+
const loadingProps = loading ? { "aria-busy": true, "aria-disabled": true } : {};
|
|
56
|
+
const handleClick = (event) => {
|
|
57
|
+
if (loading) event.preventDefault();
|
|
58
|
+
else onClick?.(event);
|
|
59
|
+
};
|
|
60
|
+
if (asChild) {
|
|
61
|
+
return /* @__PURE__ */ jsxRuntime.jsx(index$1.Slot, { ...others, ...loadingProps, ref, className: classes, onClick: handleClick, children });
|
|
62
|
+
}
|
|
63
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("button", { ...others, ...loadingProps, ref, type, className: classes, onClick: handleClick, children: [
|
|
64
|
+
children,
|
|
65
|
+
caret && /* @__PURE__ */ jsxRuntime.jsx(Icon.Icon, { name: "chevron-down", className: "roaster-button__caret" })
|
|
66
|
+
] });
|
|
46
67
|
});
|
|
47
68
|
Button.displayName = "Button";
|
|
48
69
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../../../src/components/Button/Button.tsx"],"sourcesContent":["import * as React from 'react';\nimport { classNames } from '@/utils';\n\n/** Every native `<button>` prop (`
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../../../src/components/Button/Button.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Icon } from '../Icon';\nimport { classNames, Slot } from '@/utils';\n\n/** Every native `<button>` prop (`type`, `name`, `aria-*`, ...) is accepted and forwarded to it. */\nexport interface ButtonProps extends React.ComponentPropsWithoutRef<'button'> {\n /** The button's content: its text, and an `Icon` if any. */\n children: React.ReactNode;\n /**\n * The look of the button:\n * - `primary`: filled, for the main action\n * - `secondary`: for other actions: outlined in coffee, filled in Azoth\n * - `plain`: a link-like text button\n * - `ghost`: no background or border, such as an icon in a toolbar\n * - `chip`: a filter or a toggle, such as the filters above a table; `aria-pressed` turns it on. It looks like\n * `secondary` in the coffee theme\n * @defaultValue 'primary'\n */\n variant?: 'primary' | 'secondary' | 'plain' | 'ghost' | 'chip';\n /**\n * A status color: `success` for positive actions, `danger` for destructive ones. `neutral`, for a `plain` button: a\n * quiet action in the text's secondary color, such as one under a form.\n */\n tone?: 'success' | 'danger' | 'neutral';\n /**\n * `large` for the buttons of full-page flows and a few prominent calls to action. Buttons in a modal's footer and in\n * `FormActions` are large without it. `small` for smaller text, such as a quiet action under a field. The sizes look\n * the same in the coffee theme.\n * @defaultValue 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n /** A square button holding only an icon. Name it with `aria-label`. */\n iconOnly?: boolean;\n /** A chevron after the text, for a button that opens a menu, such as a filter chip. Not with `asChild`. */\n caret?: boolean;\n /** Takes the whole width of its container. */\n fullWidth?: boolean;\n /** Its label lines up with the text before it, its padding hanging out of its place, such as a period picker. */\n flush?: boolean;\n /**\n * A value in a column of rows, such as a property in a page's side column: its icon nearer the start, its text cut\n * short with an ellipsis when it doesn't fit.\n */\n row?: boolean;\n /** Shows a spinner in place of the content, and ignores clicks, while an action runs. */\n loading?: boolean;\n /**\n * Render the element your child is, such as a link (`<Button asChild><a href=\"/new\">New</a></Button>`), with the\n * button's look.\n */\n asChild?: boolean;\n}\n\n/**\n * A button in the primary, secondary, plain, ghost or chip style, optionally in the success, danger or (plain) neutral\n * tone, and in the small, medium or large size. It is\n * `type=\"button\"` unless you say otherwise, so it never submits a form by accident.\n */\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>((props, ref) => {\n const {\n children,\n variant = 'primary',\n tone,\n size = 'medium',\n iconOnly,\n caret,\n fullWidth,\n flush,\n row,\n loading,\n asChild,\n className,\n onClick,\n type = 'button',\n ...others\n } = props;\n\n const classes = classNames(\n 'roaster-button',\n `roaster-button--${variant}`,\n tone && `roaster-button--${tone}`,\n {\n 'roaster-button--small': size === 'small',\n 'roaster-button--large': size === 'large',\n 'roaster-button--icon-only': iconOnly,\n 'roaster-button--full-width': fullWidth,\n 'roaster-button--flush': flush,\n 'roaster-button--row': row,\n },\n className\n );\n const loadingProps = loading ? { 'aria-busy': true, 'aria-disabled': true } : {};\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n // A loading button stays focusable, so a click can still reach it from the keyboard.\n if (loading) event.preventDefault();\n else onClick?.(event);\n };\n\n if (asChild) {\n return (\n <Slot {...others} {...loadingProps} ref={ref as React.Ref<HTMLElement>} className={classes} onClick={handleClick}>\n {children}\n </Slot>\n );\n }\n return (\n <button {...others} {...loadingProps} ref={ref} type={type} className={classes} onClick={handleClick}>\n {children}\n {caret && <Icon name=\"chevron-down\" className=\"roaster-button__caret\" />}\n </button>\n );\n});\n\nButton.displayName = 'Button';\n"],"names":["React","classNames","jsx","Slot","jsxs","Icon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAKY,MAAC,MAAM,GAAGA,gBAAK,CAAC,UAAU,CAAC,CAAC,KAAK,EAAE,GAAG,KAAK;AACvD,EAAE,MAAM;AACR,IAAI,QAAQ;AACZ,IAAI,OAAO,GAAG,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AAE,EAAE,GAAG,MAAM,EAAE,GAAG,YAAY,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE;AACrI,IAAI,QAAQ;AACZ,IAAI,KAAK,oBAAoBF,cAAG,CAACG,SAAI,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,SAAS,EAAE,uBAAuB,EAAE;AACnG,GAAG,EAAE,CAAC;AACN,CAAC;AACD,MAAM,CAAC,WAAW,GAAG,QAAQ;;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
5
|
var React = require('react');
|
|
5
6
|
var index = require('../../utils/classNames/index.js');
|
|
6
7
|
|
|
@@ -18,18 +19,16 @@ function _interopNamespaceDefault(e) {
|
|
|
18
19
|
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
19
20
|
|
|
20
21
|
const ButtonIcon = React__namespace.forwardRef((props, ref) => {
|
|
21
|
-
const { children,
|
|
22
|
-
return /* @__PURE__ */
|
|
22
|
+
const { children, size = "small", className, type = "button", ...others } = props;
|
|
23
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
23
24
|
"button",
|
|
24
25
|
{
|
|
26
|
+
...others,
|
|
25
27
|
ref,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
className: index.classNames("button-icon", variant, { disabled }, className)
|
|
31
|
-
},
|
|
32
|
-
children
|
|
28
|
+
type,
|
|
29
|
+
className: index.classNames("roaster-icon-button", { "roaster-icon-button--medium": size === "medium" }, className),
|
|
30
|
+
children
|
|
31
|
+
}
|
|
33
32
|
);
|
|
34
33
|
});
|
|
35
34
|
ButtonIcon.displayName = "ButtonIcon";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonIcon.js","sources":["../../../../src/components/ButtonIcon/ButtonIcon.tsx"],"sourcesContent":["import * as React from 'react';\nimport { classNames } from '@/utils';\n\
|
|
1
|
+
{"version":3,"file":"ButtonIcon.js","sources":["../../../../src/components/ButtonIcon/ButtonIcon.tsx"],"sourcesContent":["import * as React from 'react';\nimport { classNames } from '@/utils';\n\ninterface ButtonIconBaseProps extends Omit<React.ComponentPropsWithoutRef<'button'>, 'aria-label' | 'aria-labelledby'> {\n /** The icon, such as `<Icon name=\"xmark\" />`. */\n children: React.ReactNode;\n /**\n * The size of the icon: `small` (alerts, toasts, tags) or `medium` (modals).\n * @defaultValue 'small'\n */\n size?: 'small' | 'medium';\n}\n\n/**\n * A small icon-only button, such as the close button of an alert, a tag or a modal. It has no text, so it needs a\n * name: `aria-label`, or `aria-labelledby` pointing at text on the page. Every native `<button>` prop is accepted.\n */\nexport type ButtonIconProps = ButtonIconBaseProps &\n ({ 'aria-label': string; 'aria-labelledby'?: string } | { 'aria-label'?: string; 'aria-labelledby': string });\n\n/** A small icon-only button, such as the close button of an alert, a tag or a modal. Name it with `aria-label`. */\nexport const ButtonIcon = React.forwardRef<HTMLButtonElement, ButtonIconProps>((props, ref) => {\n const { children, size = 'small', className, type = 'button', ...others } = props;\n\n return (\n <button\n {...others}\n ref={ref}\n type={type}\n className={classNames('roaster-icon-button', { 'roaster-icon-button--medium': size === 'medium' }, className)}\n >\n {children}\n </button>\n );\n});\n\nButtonIcon.displayName = 'ButtonIcon';\n"],"names":["React","jsx","classNames"],"mappings":";;;;;;;;;;;;;;;;;;;;AAIY,MAAC,UAAU,GAAGA,gBAAK,CAAC,UAAU,CAAC,CAAC,KAAK,EAAE,GAAG,KAAK;AAC3D,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,GAAG,OAAO,EAAE,SAAS,EAAE,IAAI,GAAG,QAAQ,EAAE,GAAG,MAAM,EAAE,GAAG,KAAK;AACnF,EAAE,uBAAuBC,cAAG;AAC5B,IAAI,QAAQ;AACZ,IAAI;AACJ,MAAM,GAAG,MAAM;AACf,MAAM,GAAG;AACT,MAAM,IAAI;AACV,MAAM,SAAS,EAAEC,gBAAU,CAAC,qBAAqB,EAAE,EAAE,6BAA6B,EAAE,IAAI,KAAK,QAAQ,EAAE,EAAE,SAAS,CAAC;AACnH,MAAM;AACN;AACA,GAAG;AACH,CAAC;AACD,UAAU,CAAC,WAAW,GAAG,YAAY;;"}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var index = require('../../utils/classNames/index.js');
|
|
7
|
+
|
|
8
|
+
function _interopNamespaceDefault(e) {
|
|
9
|
+
var n = Object.create(null);
|
|
10
|
+
if (e) {
|
|
11
|
+
for (var k in e) {
|
|
12
|
+
n[k] = e[k];
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
n.default = e;
|
|
16
|
+
return Object.freeze(n);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
20
|
+
|
|
21
|
+
const seriesClass = (series) => series && `roaster-chart__series--${series}`;
|
|
22
|
+
const ChartBase = React__namespace.forwardRef(
|
|
23
|
+
({ children, size = "medium", bleed, grid = "dots", className, ...others }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
24
|
+
"figure",
|
|
25
|
+
{
|
|
26
|
+
...others,
|
|
27
|
+
ref,
|
|
28
|
+
className: index.classNames(
|
|
29
|
+
"roaster-chart",
|
|
30
|
+
{
|
|
31
|
+
"roaster-chart--large": size === "large",
|
|
32
|
+
"roaster-chart--bleed": bleed,
|
|
33
|
+
"roaster-chart--grid-lines": grid === "lines"
|
|
34
|
+
},
|
|
35
|
+
className
|
|
36
|
+
),
|
|
37
|
+
children
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
);
|
|
41
|
+
ChartBase.displayName = "Chart";
|
|
42
|
+
const ChartHeader = React__namespace.forwardRef(({ className, ...others }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ...others, ref, className: index.classNames("roaster-chart__header", className) }));
|
|
43
|
+
ChartHeader.displayName = "Chart.Header";
|
|
44
|
+
const ChartPlot = React__namespace.forwardRef(({ inline, className, ...others }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
45
|
+
"svg",
|
|
46
|
+
{
|
|
47
|
+
role: "img",
|
|
48
|
+
...others,
|
|
49
|
+
ref,
|
|
50
|
+
className: index.classNames("roaster-chart__plot", { "roaster-chart__plot--inline": inline }, className)
|
|
51
|
+
}
|
|
52
|
+
));
|
|
53
|
+
ChartPlot.displayName = "Chart.Plot";
|
|
54
|
+
const ChartSeriesGroup = React__namespace.forwardRef(
|
|
55
|
+
({ series, className, ...others }, ref) => /* @__PURE__ */ jsxRuntime.jsx("g", { ...others, ref, className: index.classNames(seriesClass(series), className) })
|
|
56
|
+
);
|
|
57
|
+
ChartSeriesGroup.displayName = "Chart.Series";
|
|
58
|
+
const ChartFill = React__namespace.forwardRef(
|
|
59
|
+
({ series, direction = "down", className, ...others }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
60
|
+
"linearGradient",
|
|
61
|
+
{
|
|
62
|
+
x1: "0",
|
|
63
|
+
x2: "0",
|
|
64
|
+
y1: direction === "down" ? "0" : "1",
|
|
65
|
+
y2: direction === "down" ? "1" : "0",
|
|
66
|
+
...others,
|
|
67
|
+
ref,
|
|
68
|
+
className: index.classNames("roaster-chart__fill", seriesClass(series), className),
|
|
69
|
+
children: [
|
|
70
|
+
/* @__PURE__ */ jsxRuntime.jsx("stop", { className: "roaster-chart__stop", offset: "0" }),
|
|
71
|
+
/* @__PURE__ */ jsxRuntime.jsx("stop", { className: "roaster-chart__stop roaster-chart__stop--end", offset: "1" })
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
);
|
|
76
|
+
ChartFill.displayName = "Chart.Fill";
|
|
77
|
+
const ChartLine = React__namespace.forwardRef(({ series, bold, className, ...others }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
78
|
+
"path",
|
|
79
|
+
{
|
|
80
|
+
...others,
|
|
81
|
+
ref,
|
|
82
|
+
className: index.classNames("roaster-chart__line", { "roaster-chart__line--bold": bold }, seriesClass(series), className)
|
|
83
|
+
}
|
|
84
|
+
));
|
|
85
|
+
ChartLine.displayName = "Chart.Line";
|
|
86
|
+
const ChartArea = React__namespace.forwardRef(({ series, className, ...others }, ref) => /* @__PURE__ */ jsxRuntime.jsx("path", { ...others, ref, className: index.classNames("roaster-chart__area", seriesClass(series), className) }));
|
|
87
|
+
ChartArea.displayName = "Chart.Area";
|
|
88
|
+
const ChartBar = React__namespace.forwardRef(
|
|
89
|
+
({ series, edge = "none", edgeWidth = 1, className, ...others }, ref) => {
|
|
90
|
+
const bar = /* @__PURE__ */ jsxRuntime.jsx(
|
|
91
|
+
"rect",
|
|
92
|
+
{
|
|
93
|
+
...others,
|
|
94
|
+
ref,
|
|
95
|
+
className: index.classNames("roaster-chart__bar", edge === "none" && seriesClass(series), className)
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
if (edge === "none") return bar;
|
|
99
|
+
const { x, y = 0, width, height = 0 } = others;
|
|
100
|
+
const edgeY = edge === "top" ? Number(y) : Number(y) + Number(height) - edgeWidth;
|
|
101
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("g", { className: seriesClass(series), children: [
|
|
102
|
+
bar,
|
|
103
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { className: "roaster-chart__edge", x, y: edgeY, width, height: edgeWidth })
|
|
104
|
+
] });
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
ChartBar.displayName = "Chart.Bar";
|
|
108
|
+
const ChartPoint = React__namespace.forwardRef(
|
|
109
|
+
({ series, r = 3, className, ...others }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
110
|
+
"circle",
|
|
111
|
+
{
|
|
112
|
+
...others,
|
|
113
|
+
r,
|
|
114
|
+
ref,
|
|
115
|
+
className: index.classNames("roaster-chart__point", seriesClass(series), className)
|
|
116
|
+
}
|
|
117
|
+
)
|
|
118
|
+
);
|
|
119
|
+
ChartPoint.displayName = "Chart.Point";
|
|
120
|
+
const ChartGrid = React__namespace.forwardRef(({ className, ...others }, ref) => /* @__PURE__ */ jsxRuntime.jsx("line", { ...others, ref, className: index.classNames("roaster-chart__grid", className) }));
|
|
121
|
+
ChartGrid.displayName = "Chart.Grid";
|
|
122
|
+
const ChartBaseline = React__namespace.forwardRef(({ className, ...others }, ref) => /* @__PURE__ */ jsxRuntime.jsx("line", { ...others, ref, className: index.classNames("roaster-chart__baseline", className) }));
|
|
123
|
+
ChartBaseline.displayName = "Chart.Baseline";
|
|
124
|
+
const ChartLabel = React__namespace.forwardRef(
|
|
125
|
+
({ variant = "default", className, ...others }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
126
|
+
"text",
|
|
127
|
+
{
|
|
128
|
+
...others,
|
|
129
|
+
ref,
|
|
130
|
+
className: index.classNames(
|
|
131
|
+
"roaster-chart__label",
|
|
132
|
+
{ [`roaster-chart__label--${variant}`]: variant !== "default" },
|
|
133
|
+
className
|
|
134
|
+
)
|
|
135
|
+
}
|
|
136
|
+
)
|
|
137
|
+
);
|
|
138
|
+
ChartLabel.displayName = "Chart.Label";
|
|
139
|
+
const ChartTick = React__namespace.forwardRef(({ className, ...others }, ref) => /* @__PURE__ */ jsxRuntime.jsx("line", { ...others, ref, className: index.classNames("roaster-chart__tick", className) }));
|
|
140
|
+
ChartTick.displayName = "Chart.Tick";
|
|
141
|
+
const ChartMarker = React__namespace.forwardRef(({ className, ...others }, ref) => /* @__PURE__ */ jsxRuntime.jsx("line", { ...others, ref, className: index.classNames("roaster-chart__marker", className) }));
|
|
142
|
+
ChartMarker.displayName = "Chart.Marker";
|
|
143
|
+
const ChartRange = React__namespace.forwardRef(({ rx = 4, className, ...others }, ref) => /* @__PURE__ */ jsxRuntime.jsx("rect", { ...others, rx, ref, className: index.classNames("roaster-chart__range", className) }));
|
|
144
|
+
ChartRange.displayName = "Chart.Range";
|
|
145
|
+
const ChartHandle = React__namespace.forwardRef(({ rx = 2.5, className, ...others }, ref) => /* @__PURE__ */ jsxRuntime.jsx("rect", { ...others, rx, ref, className: index.classNames("roaster-chart__handle", className) }));
|
|
146
|
+
ChartHandle.displayName = "Chart.Handle";
|
|
147
|
+
const ChartRangeLabel = React__namespace.forwardRef(
|
|
148
|
+
({ children, textX, textY, rx = 2, className, ...others }, ref) => /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
149
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { ...others, rx, ref, className: index.classNames("roaster-chart__range-label", className) }),
|
|
150
|
+
/* @__PURE__ */ jsxRuntime.jsx("text", { className: "roaster-chart__range-text", x: textX, y: textY, children })
|
|
151
|
+
] })
|
|
152
|
+
);
|
|
153
|
+
ChartRangeLabel.displayName = "Chart.RangeLabel";
|
|
154
|
+
const ChartLegend = React__namespace.forwardRef(({ className, ...others }, ref) => /* @__PURE__ */ jsxRuntime.jsx("ul", { ...others, ref, className: index.classNames("roaster-chart__legend", className) }));
|
|
155
|
+
ChartLegend.displayName = "Chart.Legend";
|
|
156
|
+
const ChartLegendItem = React__namespace.forwardRef(
|
|
157
|
+
({ children, series, swatch = true, ...others }, ref) => /* @__PURE__ */ jsxRuntime.jsxs("li", { ...others, ref, children: [
|
|
158
|
+
children,
|
|
159
|
+
swatch && /* @__PURE__ */ jsxRuntime.jsx("span", { className: index.classNames("roaster-chart__key", seriesClass(series)) })
|
|
160
|
+
] })
|
|
161
|
+
);
|
|
162
|
+
ChartLegendItem.displayName = "Chart.LegendItem";
|
|
163
|
+
const Chart = Object.assign(ChartBase, {
|
|
164
|
+
Header: ChartHeader,
|
|
165
|
+
Plot: ChartPlot,
|
|
166
|
+
Series: ChartSeriesGroup,
|
|
167
|
+
Fill: ChartFill,
|
|
168
|
+
Line: ChartLine,
|
|
169
|
+
Area: ChartArea,
|
|
170
|
+
Bar: ChartBar,
|
|
171
|
+
Point: ChartPoint,
|
|
172
|
+
Grid: ChartGrid,
|
|
173
|
+
Baseline: ChartBaseline,
|
|
174
|
+
Label: ChartLabel,
|
|
175
|
+
Tick: ChartTick,
|
|
176
|
+
Marker: ChartMarker,
|
|
177
|
+
Range: ChartRange,
|
|
178
|
+
Handle: ChartHandle,
|
|
179
|
+
RangeLabel: ChartRangeLabel,
|
|
180
|
+
Legend: ChartLegend,
|
|
181
|
+
LegendItem: ChartLegendItem
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
exports.Chart = Chart;
|
|
185
|
+
//# sourceMappingURL=Chart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chart.js","sources":["../../../../src/components/Chart/Chart.tsx"],"sourcesContent":["import * as React from 'react';\nimport { classNames } from '@/utils';\n\n/**\n * A series other than the chart's first: `neutral` stays quiet (money out against money in), `negative` is below\n * zero, `secondary` stands beside the first (pending against posted).\n */\nexport type ChartSeries = 'neutral' | 'negative' | 'secondary';\n\n/** The part of every shape's props that picks its series. */\nexport interface ChartSeriesProps {\n /** The series it belongs to. Leave it out for the chart's first series, in its own color. */\n series?: ChartSeries;\n}\n\nconst seriesClass = (series?: ChartSeries) => series && `roaster-chart__series--${series}`;\n\n/** Every native `<figure>` prop (`id`, `aria-*`, `data-*`, ...) is accepted and forwarded to it. */\nexport interface ChartProps extends React.ComponentPropsWithoutRef<'figure'> {\n /** The chart: a `Chart.Header`, a `Chart.Plot`, a `Chart.Legend`. */\n children: React.ReactNode;\n /**\n * `large` fills part of a page, its labels a step larger.\n * @defaultValue 'medium'\n */\n size?: 'medium' | 'large';\n /** In a full-width page, reaches the window's edges, ruled off under it, such as a time axis over a report. */\n bleed?: boolean;\n /**\n * How the `Chart.Grid` lines are drawn: dotted, or `lines`, dashed (draw one for each axis label).\n * @defaultValue 'dots'\n */\n grid?: 'dots' | 'lines';\n}\n\nconst ChartBase = React.forwardRef<HTMLElement, ChartProps>(\n ({ children, size = 'medium', bleed, grid = 'dots', className, ...others }, ref) => (\n <figure\n {...others}\n ref={ref}\n className={classNames(\n 'roaster-chart',\n {\n 'roaster-chart--large': size === 'large',\n 'roaster-chart--bleed': bleed,\n 'roaster-chart--grid-lines': grid === 'lines',\n },\n className\n )}\n >\n {children}\n </figure>\n )\n);\nChartBase.displayName = 'Chart';\n\n/** Every native `<div>` prop is accepted and forwarded to it. */\nexport type ChartHeaderProps = React.ComponentPropsWithoutRef<'div'>;\n\n/** A row over the plot: the period it shows, and its totals. */\nconst ChartHeader = React.forwardRef<HTMLDivElement, ChartHeaderProps>(({ className, ...others }, ref) => (\n <div {...others} ref={ref} className={classNames('roaster-chart__header', className)} />\n));\nChartHeader.displayName = 'Chart.Header';\n\n/** Every native `<svg>` prop (`viewBox`, `role`, `aria-label`, ...) is accepted and forwarded to it. */\nexport interface ChartPlotProps extends React.ComponentPropsWithoutRef<'svg'> {\n /** The shapes: lines, areas, bars, points, the grid and the labels, in the viewBox's coordinates. */\n children: React.ReactNode;\n /** At the size of its `width` and `height`, such as a small chart beside a figure. Otherwise it fills the width. */\n inline?: boolean;\n}\n\n/**\n * The SVG the chart draws in, at its viewBox's size, scaling with the chart's width. Name it, as an image, with\n * `aria-label`: it has `role=\"img\"`.\n */\nconst ChartPlot = React.forwardRef<SVGSVGElement, ChartPlotProps>(({ inline, className, ...others }, ref) => (\n <svg\n role=\"img\"\n {...others}\n ref={ref}\n className={classNames('roaster-chart__plot', { 'roaster-chart__plot--inline': inline }, className)}\n />\n));\nChartPlot.displayName = 'Chart.Plot';\n\n/** Every native `<g>` prop is accepted and forwarded to it. */\nexport interface ChartSeriesGroupProps extends React.ComponentPropsWithoutRef<'g'>, ChartSeriesProps {}\n\n/** A group of shapes in one series, such as money out's bars. */\nconst ChartSeriesGroup = React.forwardRef<SVGGElement, ChartSeriesGroupProps>(\n ({ series, className, ...others }, ref) => (\n <g {...others} ref={ref} className={classNames(seriesClass(series), className)} />\n )\n);\nChartSeriesGroup.displayName = 'Chart.Series';\n\n/** Every native `<linearGradient>` prop is accepted and forwarded to it. */\nexport interface ChartFillProps\n extends Omit<React.ComponentPropsWithoutRef<'linearGradient'>, 'children'>, ChartSeriesProps {\n /** The fill's id, which an area or a bar names in its `fill`: `fill=\"url(#balance-fill)\"`. */\n id: string;\n /**\n * Which way it fades: from the series' color at the top to almost nothing at the bottom (`down`), or the other way\n * (`up`, such as for bars below zero).\n * @defaultValue 'down'\n */\n direction?: 'down' | 'up';\n}\n\n/** A fill that fades, for areas and bars: put it in the plot's `<defs>`. */\nconst ChartFill = React.forwardRef<SVGLinearGradientElement, ChartFillProps>(\n ({ series, direction = 'down', className, ...others }, ref) => (\n <linearGradient\n x1=\"0\"\n x2=\"0\"\n y1={direction === 'down' ? '0' : '1'}\n y2={direction === 'down' ? '1' : '0'}\n {...others}\n ref={ref}\n className={classNames('roaster-chart__fill', seriesClass(series), className)}\n >\n <stop className=\"roaster-chart__stop\" offset=\"0\" />\n <stop className=\"roaster-chart__stop roaster-chart__stop--end\" offset=\"1\" />\n </linearGradient>\n )\n);\nChartFill.displayName = 'Chart.Fill';\n\n/** Every native `<path>` prop (`d`, ...) is accepted and forwarded to it. */\nexport interface ChartLineProps extends React.ComponentPropsWithoutRef<'path'>, ChartSeriesProps {\n /** A thicker line, such as a net change over bars. */\n bold?: boolean;\n}\n\n/** A series' line. Draw its path (`d`) by hand or with a library such as d3-shape. */\nconst ChartLine = React.forwardRef<SVGPathElement, ChartLineProps>(({ series, bold, className, ...others }, ref) => (\n <path\n {...others}\n ref={ref}\n className={classNames('roaster-chart__line', { 'roaster-chart__line--bold': bold }, seriesClass(series), className)}\n />\n));\nChartLine.displayName = 'Chart.Line';\n\n/** Every native `<path>` prop (`d`, `fill`, ...) is accepted and forwarded to it. */\nexport interface ChartAreaProps extends React.ComponentPropsWithoutRef<'path'>, ChartSeriesProps {}\n\n/** The area under a series' line: a flat tint, or the `Chart.Fill` named in its `fill`. */\nconst ChartArea = React.forwardRef<SVGPathElement, ChartAreaProps>(({ series, className, ...others }, ref) => (\n <path {...others} ref={ref} className={classNames('roaster-chart__area', seriesClass(series), className)} />\n));\nChartArea.displayName = 'Chart.Area';\n\n/** Every native `<rect>` prop (`x`, `y`, `width`, `height`, `fill`, ...) is accepted and forwarded to the bar. */\nexport interface ChartBarProps extends React.ComponentPropsWithoutRef<'rect'>, ChartSeriesProps {\n /**\n * A line along the bar's end, in the series' color: at its `top` (a bar above zero), at its `bottom` (below zero),\n * or none.\n * @defaultValue 'none'\n */\n edge?: 'top' | 'bottom' | 'none';\n /**\n * The edge's thickness, in the viewBox's units.\n * @defaultValue 1\n */\n edgeWidth?: number;\n}\n\n/** A bar: a flat tint, or the `Chart.Fill` named in its `fill`, with an optional edge at its end. */\nconst ChartBar = React.forwardRef<SVGRectElement, ChartBarProps>(\n ({ series, edge = 'none', edgeWidth = 1, className, ...others }, ref) => {\n const bar = (\n <rect\n {...others}\n ref={ref}\n className={classNames('roaster-chart__bar', edge === 'none' && seriesClass(series), className)}\n />\n );\n if (edge === 'none') return bar;\n const { x, y = 0, width, height = 0 } = others;\n const edgeY = edge === 'top' ? Number(y) : Number(y) + Number(height) - edgeWidth;\n return (\n <g className={seriesClass(series)}>\n {bar}\n <rect className=\"roaster-chart__edge\" x={x} y={edgeY} width={width} height={edgeWidth} />\n </g>\n );\n }\n);\nChartBar.displayName = 'Chart.Bar';\n\n/** Every native `<circle>` prop (`cx`, `cy`, `r`, ...) is accepted and forwarded to it. */\nexport interface ChartPointProps extends React.ComponentPropsWithoutRef<'circle'>, ChartSeriesProps {}\n\n/** A data point on a series' line. */\nconst ChartPoint = React.forwardRef<SVGCircleElement, ChartPointProps>(\n ({ series, r = 3, className, ...others }, ref) => (\n <circle\n {...others}\n r={r}\n ref={ref}\n className={classNames('roaster-chart__point', seriesClass(series), className)}\n />\n )\n);\nChartPoint.displayName = 'Chart.Point';\n\n/** Every native `<line>` prop (`x1`, `x2`, `y1`, `y2`, ...) is accepted and forwarded to it. */\nexport type ChartGridProps = React.ComponentPropsWithoutRef<'line'>;\n\n/** A dotted line of the grid. */\nconst ChartGrid = React.forwardRef<SVGLineElement, ChartGridProps>(({ className, ...others }, ref) => (\n <line {...others} ref={ref} className={classNames('roaster-chart__grid', className)} />\n));\nChartGrid.displayName = 'Chart.Grid';\n\n/** Every native `<line>` prop is accepted and forwarded to it. */\nexport type ChartBaselineProps = React.ComponentPropsWithoutRef<'line'>;\n\n/** The line at zero. */\nconst ChartBaseline = React.forwardRef<SVGLineElement, ChartBaselineProps>(({ className, ...others }, ref) => (\n <line {...others} ref={ref} className={classNames('roaster-chart__baseline', className)} />\n));\nChartBaseline.displayName = 'Chart.Baseline';\n\n/** Every native `<text>` prop (`x`, `y`, `textAnchor`, ...) is accepted and forwarded to it. */\nexport interface ChartLabelProps extends React.ComponentPropsWithoutRef<'text'> {\n /**\n * `strong` names the period, such as a month under its bars; `muted` is outside the selected range.\n * @defaultValue 'default'\n */\n variant?: 'default' | 'strong' | 'muted';\n}\n\n/** An axis label. */\nconst ChartLabel = React.forwardRef<SVGTextElement, ChartLabelProps>(\n ({ variant = 'default', className, ...others }, ref) => (\n <text\n {...others}\n ref={ref}\n className={classNames(\n 'roaster-chart__label',\n { [`roaster-chart__label--${variant}`]: variant !== 'default' },\n className\n )}\n />\n )\n);\nChartLabel.displayName = 'Chart.Label';\n\n/** Every native `<line>` prop is accepted and forwarded to it. */\nexport type ChartTickProps = React.ComponentPropsWithoutRef<'line'>;\n\n/** A step on a time axis, such as a week; draw a month taller. */\nconst ChartTick = React.forwardRef<SVGLineElement, ChartTickProps>(({ className, ...others }, ref) => (\n <line {...others} ref={ref} className={classNames('roaster-chart__tick', className)} />\n));\nChartTick.displayName = 'Chart.Tick';\n\n/** Every native `<line>` prop is accepted and forwarded to it. */\nexport type ChartMarkerProps = React.ComponentPropsWithoutRef<'line'>;\n\n/** A moment on a time axis, such as today. */\nconst ChartMarker = React.forwardRef<SVGLineElement, ChartMarkerProps>(({ className, ...others }, ref) => (\n <line {...others} ref={ref} className={classNames('roaster-chart__marker', className)} />\n));\nChartMarker.displayName = 'Chart.Marker';\n\n/** Every native `<rect>` prop is accepted and forwarded to it. */\nexport type ChartRangeProps = React.ComponentPropsWithoutRef<'rect'>;\n\n/** The selected span of a time axis. */\nconst ChartRange = React.forwardRef<SVGRectElement, ChartRangeProps>(({ rx = 4, className, ...others }, ref) => (\n <rect {...others} rx={rx} ref={ref} className={classNames('roaster-chart__range', className)} />\n));\nChartRange.displayName = 'Chart.Range';\n\n/** Every native `<rect>` prop is accepted and forwarded to it. */\nexport type ChartHandleProps = React.ComponentPropsWithoutRef<'rect'>;\n\n/** A handle at one end of the selected span. */\nconst ChartHandle = React.forwardRef<SVGRectElement, ChartHandleProps>(({ rx = 2.5, className, ...others }, ref) => (\n <rect {...others} rx={rx} ref={ref} className={classNames('roaster-chart__handle', className)} />\n));\nChartHandle.displayName = 'Chart.Handle';\n\n/** Every native `<rect>` prop (its box) is accepted and forwarded to the label's background. */\nexport interface ChartRangeLabelProps extends Omit<React.ComponentPropsWithoutRef<'rect'>, 'children'> {\n /** The text, such as the dates of the span. */\n children: React.ReactNode;\n /** The text's start and baseline. */\n textX: number;\n textY: number;\n}\n\n/** The selected span's name, on a solid label over it. */\nconst ChartRangeLabel = React.forwardRef<SVGRectElement, ChartRangeLabelProps>(\n ({ children, textX, textY, rx = 2, className, ...others }, ref) => (\n <g>\n <rect {...others} rx={rx} ref={ref} className={classNames('roaster-chart__range-label', className)} />\n <text className=\"roaster-chart__range-text\" x={textX} y={textY}>\n {children}\n </text>\n </g>\n )\n);\nChartRangeLabel.displayName = 'Chart.RangeLabel';\n\n/** Every native `<ul>` prop is accepted and forwarded to it. */\nexport type ChartLegendProps = React.ComponentPropsWithoutRef<'ul'>;\n\n/** What the series are: `Chart.LegendItem`s, after the plot. The last one goes to the end, such as what's left. */\nconst ChartLegend = React.forwardRef<HTMLUListElement, ChartLegendProps>(({ className, ...others }, ref) => (\n <ul {...others} ref={ref} className={classNames('roaster-chart__legend', className)} />\n));\nChartLegend.displayName = 'Chart.Legend';\n\n/** Every native `<li>` prop is accepted and forwarded to it. */\nexport interface ChartLegendItemProps extends React.ComponentPropsWithoutRef<'li'>, ChartSeriesProps {\n /** The series' name, or a figure such as what's left. */\n children: React.ReactNode;\n /**\n * The series' color mark after the name. Turn it off for an item that is no series, such as what's left.\n * @defaultValue true\n */\n swatch?: boolean;\n}\n\n/** A series' name, with its color mark. */\nconst ChartLegendItem = React.forwardRef<HTMLLIElement, ChartLegendItemProps>(\n ({ children, series, swatch = true, ...others }, ref) => (\n <li {...others} ref={ref}>\n {children}\n {swatch && <span className={classNames('roaster-chart__key', seriesClass(series))} />}\n </li>\n )\n);\nChartLegendItem.displayName = 'Chart.LegendItem';\n\n/**\n * The look of a chart the app draws as SVG, by hand or with a library such as d3-shape: series as lines, areas, bars\n * and points, a dotted grid, axis labels, a time axis with a selected span, a header and a legend. Each part is the\n * SVG element it names, with its class; the app gives it its coordinates.\n */\nexport const Chart = Object.assign(ChartBase, {\n Header: ChartHeader,\n Plot: ChartPlot,\n Series: ChartSeriesGroup,\n Fill: ChartFill,\n Line: ChartLine,\n Area: ChartArea,\n Bar: ChartBar,\n Point: ChartPoint,\n Grid: ChartGrid,\n Baseline: ChartBaseline,\n Label: ChartLabel,\n Tick: ChartTick,\n Marker: ChartMarker,\n Range: ChartRange,\n Handle: ChartHandle,\n RangeLabel: ChartRangeLabel,\n Legend: ChartLegend,\n LegendItem: ChartLegendItem,\n});\n"],"names":["React","jsx","classNames","jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,MAAM,WAAW,GAAG,CAAC,MAAM,KAAK,MAAM,IAAI,CAAC,uBAAuB,EAAE,MAAM,CAAC,CAAC;AAC5E,MAAM,SAAS,GAAGA,gBAAK,CAAC,UAAU;AAClC,EAAE,CAAC,EAAE,QAAQ,EAA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