@react-fabric/core 1.0.0-beta.4 → 1.0.0-beta.41
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/{src/components/actionLabel/ActionLabel.module.css → css/components/_actionLabel.css} +4 -4
- package/{src/overlays/alert/Alert.module.css → css/components/_alert.css} +3 -3
- package/{src/components/animations/Animations.module.css → css/components/_animations.css} +9 -9
- package/{src/components/avatar/Avatar.module.css → css/components/_avatar.css} +11 -11
- package/{src/components/badge/Badge.module.css → css/components/_badge.css} +19 -17
- package/{src/components/breadcrumbs/Breadcrumbs.module.css → css/components/_breadcrumbs.css} +49 -44
- package/{src/components/button/Button.module.css → css/components/_button.css} +68 -78
- package/{src/components/card/Card.module.css → css/components/_card.css} +32 -28
- package/{src/components/chip/Chip.module.css → css/components/_chip.css} +15 -11
- package/{src/components/collapsable/Collapsable.module.css → css/components/_collapsable.css} +3 -3
- package/css/components/_divider.css +32 -0
- package/{src/components/dropdown/Dropdown.module.css → css/components/_dropdown.css} +2 -2
- package/{src/overlays/flyout/Flyout.module.css → css/components/_flyout.css} +6 -6
- package/{src/components/icon/Icon.module.css → css/components/_icon.css} +8 -5
- package/{src/components/media/Media.module.css → css/components/_media.css} +17 -17
- package/{src/components/menu/Menu.module.css → css/components/_menu.css} +15 -16
- package/{src/overlays/message/Message.module.css → css/components/_message.css} +2 -2
- package/{src/components/meter/Meter.module.css → css/components/_meter.css} +10 -10
- package/{src/overlays/modal/Modal.module.css → css/components/_modal.css} +6 -6
- package/{src/components/panel/Panel.module.css → css/components/_panel.css} +17 -17
- package/{src/components/progress/Progress.module.css → css/components/_progress.css} +7 -10
- package/{src/components/tabpanel/TabPanel.module.css → css/components/_tabPanel.css} +73 -84
- package/{src/overlays/toast/Toast.module.css → css/components/_toast.css} +2 -2
- package/css/components/_tooltip.css +29 -0
- package/{src/core/content/Content.module.css → css/components/index.css} +25 -18
- package/{src/core/aside/Aside.module.css → css/core/_aside.css} +42 -42
- package/{src/core/section/Section.module.css → css/core/_content.css} +5 -3
- package/{src/core/boundary/ErrorBoundary.module.css → css/core/_errorboundary.css} +9 -9
- package/{src/core/headfoot/HeadFoot.module.css → css/core/_headfoot.css} +4 -10
- package/{src/core/page/Page.module.css → css/core/_page.css} +10 -14
- package/{src/core/responsive/Responsive.module.css → css/core/_responsive.css} +10 -10
- package/css/core/_section.css +28 -0
- package/{src/core/theme/Theme.module.css → css/core/_theme.css} +3 -3
- package/{src/typography/Typography.module.css → css/core/_typography.css} +14 -12
- package/{src/core/viewport/Viewport.module.css → css/core/_viewport.css} +7 -3
- package/css/core/index.css +33 -0
- package/css/reset/_gradients.css +8 -8
- package/css/reset/_reset.css +41 -223
- package/css/reset/_text.css +14 -29
- package/css/reset/_theme.css +315 -32
- package/css/reset/index.css +4 -4
- package/css/styles.css +7 -6
- package/css/theme/_colors.css +320 -0
- package/css/theme/_utilities.css +530 -0
- package/css/theme/index.css +44 -0
- package/dist/cjs/components/actionLabel/ActionLabel.js +3 -3
- package/dist/cjs/components/animations/Animations.js +29 -18
- package/dist/cjs/components/avatar/Avatar.js +10 -13
- package/dist/cjs/components/avatar/AvatarGroup.js +3 -3
- package/dist/cjs/components/badge/Badge.js +5 -5
- package/dist/cjs/components/breadcrumbs/Breadcrumbs.js +10 -8
- package/dist/cjs/components/button/Button.js +18 -14
- package/dist/cjs/components/button/ButtonGroup.js +4 -3
- package/dist/cjs/components/button/ConfirmButton.js +7 -2
- package/dist/cjs/components/button/ToggleButtonGroup.js +3 -3
- package/dist/cjs/components/callout/Callout.js +15 -4
- package/dist/cjs/components/card/Card.js +8 -7
- package/dist/cjs/components/card/CardCover.js +10 -5
- package/dist/cjs/components/chip/Chip.js +11 -7
- package/dist/cjs/components/collapsable/Collapsable.js +5 -5
- package/dist/cjs/components/divider/Divider.js +10 -7
- package/dist/cjs/components/dropdown/Dropdown.js +5 -4
- package/dist/cjs/components/dropdown/DropdownTool.js +4 -3
- package/dist/cjs/components/empty/EmptyContent.js +6 -3
- package/dist/cjs/components/icon/Icon.js +15 -14
- package/dist/cjs/components/media/Media.js +116 -75
- package/dist/cjs/components/menu/ContextMenu.js +30 -10
- package/dist/cjs/components/menu/Menu.js +39 -20
- package/dist/cjs/components/menu/MenuItem.js +30 -16
- package/dist/cjs/components/meter/Meter.js +2 -3
- package/dist/cjs/components/navigator/Navigator.js +16 -9
- package/dist/cjs/components/panel/Panel.js +10 -9
- package/dist/cjs/components/panel/PanelGroup.js +1 -2
- package/dist/cjs/components/progress/ProgressBar.js +6 -5
- package/dist/cjs/components/progress/ProgressCircle.js +6 -4
- package/dist/cjs/components/tabpanel/Tab.js +58 -38
- package/dist/cjs/components/tabpanel/TabPanel.js +20 -16
- package/dist/cjs/core/aside/Aside.js +11 -10
- package/dist/cjs/core/boundary/ErrorBoundary.js +6 -7
- package/dist/cjs/core/boundary/ErrorIcon.js +1 -2
- package/dist/cjs/core/content/Content.js +9 -7
- package/dist/cjs/core/headfoot/HeadFoot.js +2 -20
- package/dist/cjs/core/page/Page.js +3 -3
- package/dist/cjs/core/responsive/Responsive.js +3 -4
- package/dist/cjs/core/section/Section.js +1 -2
- package/dist/cjs/core/theme/ThemeProvider.js +7 -8
- package/dist/cjs/core/viewport/Viewport.js +4 -2
- package/dist/cjs/hooks/useNavigator.js +6 -4
- package/dist/cjs/hotkeys/HotKeyLabel.js +1 -1
- package/dist/cjs/hotkeys/HotKeyWrapper.js +3 -1
- package/dist/cjs/index.js +6 -2
- package/dist/cjs/overlays/alert/Alert.js +19 -13
- package/dist/cjs/overlays/flyout/Flyout.js +49 -60
- package/dist/cjs/overlays/message/Message.js +6 -3
- package/dist/cjs/overlays/modal/Modal.js +11 -11
- package/dist/cjs/overlays/toast/Toast.js +17 -9
- package/dist/cjs/overlays/tooltip/Tooltip.js +20 -8
- package/dist/cjs/types/icons.js +4 -0
- package/dist/cjs/typography/Abbr.js +2 -3
- package/dist/cjs/typography/{Link.js → Anchor.js} +5 -4
- package/dist/cjs/typography/Mark.js +2 -3
- package/dist/cjs/typography/Text.js +3 -4
- package/dist/cjs/typography/Title.js +3 -3
- package/dist/cjs/utils/cloneElement.js +44 -0
- package/dist/cjs/utils/getColor.js +1 -18
- package/dist/esm/components/actionLabel/ActionLabel.js +3 -3
- package/dist/esm/components/animations/Animations.js +30 -19
- package/dist/esm/components/avatar/Avatar.js +11 -14
- package/dist/esm/components/avatar/AvatarGroup.js +3 -3
- package/dist/esm/components/badge/Badge.js +5 -5
- package/dist/esm/components/breadcrumbs/Breadcrumbs.js +10 -8
- package/dist/esm/components/button/Button.js +18 -14
- package/dist/esm/components/button/ButtonGroup.js +5 -4
- package/dist/esm/components/button/ConfirmButton.js +7 -2
- package/dist/esm/components/button/ToggleButtonGroup.js +4 -4
- package/dist/esm/components/callout/Callout.js +15 -4
- package/dist/esm/components/card/Card.js +8 -7
- package/dist/esm/components/card/CardCover.js +10 -5
- package/dist/esm/components/chip/Chip.js +12 -8
- package/dist/esm/components/collapsable/Collapsable.js +5 -5
- package/dist/esm/components/divider/Divider.js +11 -8
- package/dist/esm/components/dropdown/Dropdown.js +5 -4
- package/dist/esm/components/dropdown/DropdownTool.js +4 -3
- package/dist/esm/components/empty/EmptyContent.js +6 -3
- package/dist/esm/components/icon/Icon.js +15 -14
- package/dist/esm/components/media/Media.js +117 -76
- package/dist/esm/components/menu/ContextMenu.js +32 -12
- package/dist/esm/components/menu/Menu.js +41 -22
- package/dist/esm/components/menu/MenuItem.js +24 -10
- package/dist/esm/components/meter/Meter.js +2 -3
- package/dist/esm/components/navigator/Navigator.js +16 -9
- package/dist/esm/components/panel/Panel.js +10 -9
- package/dist/esm/components/panel/PanelGroup.js +1 -2
- package/dist/esm/components/progress/ProgressBar.js +6 -5
- package/dist/esm/components/progress/ProgressCircle.js +6 -4
- package/dist/esm/components/tabpanel/Tab.js +59 -39
- package/dist/esm/components/tabpanel/TabPanel.js +20 -16
- package/dist/esm/core/aside/Aside.js +11 -10
- package/dist/esm/core/boundary/ErrorBoundary.js +6 -7
- package/dist/esm/core/boundary/ErrorIcon.js +1 -2
- package/dist/esm/core/content/Content.js +9 -7
- package/dist/esm/core/headfoot/HeadFoot.js +2 -20
- package/dist/esm/core/page/Page.js +3 -3
- package/dist/esm/core/responsive/Responsive.js +3 -4
- package/dist/esm/core/section/Section.js +1 -2
- package/dist/esm/core/theme/ThemeProvider.js +7 -8
- package/dist/esm/core/viewport/Viewport.js +4 -2
- package/dist/esm/hooks/useNavigator.js +7 -5
- package/dist/esm/hotkeys/HotKeyLabel.js +1 -1
- package/dist/esm/hotkeys/HotKeyWrapper.js +3 -1
- package/dist/esm/index.js +3 -1
- package/dist/esm/overlays/alert/Alert.js +20 -14
- package/dist/esm/overlays/flyout/Flyout.js +52 -63
- package/dist/esm/overlays/message/Message.js +7 -4
- package/dist/esm/overlays/modal/Modal.js +12 -12
- package/dist/esm/overlays/toast/Toast.js +18 -10
- package/dist/esm/overlays/tooltip/Tooltip.js +20 -8
- package/dist/esm/types/icons.js +4 -0
- package/dist/esm/typography/Abbr.js +2 -3
- package/dist/esm/typography/{Link.js → Anchor.js} +6 -5
- package/dist/esm/typography/Mark.js +2 -3
- package/dist/esm/typography/Text.js +4 -5
- package/dist/esm/typography/Title.js +4 -4
- package/dist/esm/utils/cloneElement.js +44 -0
- package/dist/esm/utils/getColor.js +2 -16
- package/dist/types/components/actionLabel/ActionLabel.d.ts +2 -2
- package/dist/types/components/animations/Animations.d.ts +5 -5
- package/dist/types/components/avatar/Avatar.d.ts +3 -3
- package/dist/types/components/badge/Badge.d.ts +5 -1
- package/dist/types/components/breadcrumbs/Breadcrumbs.d.ts +2 -2
- package/dist/types/components/button/Button.d.ts +7 -5
- package/dist/types/components/button/ButtonGroup.d.ts +2 -2
- package/dist/types/components/button/ConfirmButton.d.ts +6 -1
- package/dist/types/components/callout/Callout.d.ts +2 -2
- package/dist/types/components/card/Card.d.ts +3 -3
- package/dist/types/components/chip/Chip.d.ts +3 -3
- package/dist/types/components/collapsable/Collapsable.d.ts +5 -1
- package/dist/types/components/divider/Divider.d.ts +7 -3
- package/dist/types/components/dropdown/DropdownTool.d.ts +2 -1
- package/dist/types/components/empty/EmptyContent.d.ts +6 -2
- package/dist/types/components/icon/Icon.d.ts +3 -3
- package/dist/types/components/media/Media.d.ts +2 -2
- package/dist/types/components/menu/ContextMenu.d.ts +2 -1
- package/dist/types/components/menu/MenuItem.d.ts +1 -1
- package/dist/types/components/menu/types.d.ts +2 -2
- package/dist/types/components/navigator/Navigator.d.ts +4 -4
- package/dist/types/components/progress/ProgressBar.d.ts +2 -2
- package/dist/types/components/progress/ProgressCircle.d.ts +2 -2
- package/dist/types/components/tabpanel/Tab.d.ts +5 -5
- package/dist/types/components/tabpanel/TabPanel.d.ts +10 -1
- package/dist/types/core/content/Content.d.ts +3 -2
- package/dist/types/core/headfoot/HeadFoot.d.ts +1 -9
- package/dist/types/core/responsive/Responsive.d.ts +1 -1
- package/dist/types/core/theme/ThemeProvider.d.ts +4 -4
- package/dist/types/hooks/useOverlayService.d.ts +3 -5
- package/dist/types/index.d.ts +3 -0
- package/dist/types/overlays/alert/Alert.d.ts +2 -2
- package/dist/types/overlays/flyout/Flyout.d.ts +3 -2
- package/dist/types/overlays/message/Message.d.ts +2 -2
- package/dist/types/overlays/modal/Modal.d.ts +4 -3
- package/dist/types/overlays/toast/Toast.d.ts +2 -2
- package/dist/types/overlays/tooltip/Tooltip.d.ts +1 -1
- package/dist/types/types/icons.d.ts +4 -0
- package/dist/types/types/index.d.ts +18 -6
- package/dist/types/typography/Abbr.d.ts +6 -2
- package/dist/types/typography/Anchor.d.ts +25 -0
- package/dist/types/typography/Mark.d.ts +2 -2
- package/dist/types/typography/index.d.ts +1 -1
- package/dist/types/utils/cloneElement.d.ts +2 -0
- package/dist/types/utils/getColor.d.ts +1 -4
- package/dist/types/utils/index.d.ts +1 -0
- package/package.json +7 -9
- package/src/components/actionLabel/ActionLabel.tsx +15 -6
- package/src/components/animations/Animations.tsx +29 -23
- package/src/components/avatar/Avatar.tsx +74 -88
- package/src/components/avatar/AvatarGroup.tsx +4 -4
- package/src/components/badge/Badge.tsx +11 -7
- package/src/components/breadcrumbs/Breadcrumbs.tsx +13 -9
- package/src/components/button/Button.tsx +27 -22
- package/src/components/button/ButtonGroup.tsx +7 -7
- package/src/components/button/ConfirmButton.tsx +15 -5
- package/src/components/button/ToggleButtonGroup.tsx +5 -5
- package/src/components/callout/Callout.tsx +26 -11
- package/src/components/card/Card.tsx +10 -7
- package/src/components/card/CardCover.tsx +11 -6
- package/src/components/chip/Chip.tsx +17 -13
- package/src/components/collapsable/Collapsable.tsx +9 -4
- package/src/components/divider/Divider.tsx +15 -10
- package/src/components/dropdown/Dropdown.tsx +5 -5
- package/src/components/dropdown/DropdownTool.tsx +5 -3
- package/src/components/empty/EmptyContent.tsx +17 -2
- package/src/components/icon/Icon.tsx +55 -67
- package/src/components/media/Media.tsx +141 -106
- package/src/components/menu/ContextMenu.tsx +36 -11
- package/src/components/menu/Menu.tsx +51 -30
- package/src/components/menu/MenuItem.tsx +19 -9
- package/src/components/menu/types.ts +2 -2
- package/src/components/meter/Meter.tsx +2 -3
- package/src/components/navigator/Navigator.tsx +19 -5
- package/src/components/panel/Panel.tsx +10 -9
- package/src/components/panel/PanelGroup.tsx +1 -2
- package/src/components/progress/ProgressBar.tsx +8 -9
- package/src/components/progress/ProgressCircle.tsx +6 -9
- package/src/components/tabpanel/Tab.tsx +81 -64
- package/src/components/tabpanel/TabPanel.tsx +34 -12
- package/src/core/aside/Aside.tsx +11 -10
- package/src/core/boundary/ErrorBoundary.tsx +8 -7
- package/src/core/boundary/ErrorIcon.tsx +1 -2
- package/src/core/content/Content.tsx +17 -12
- package/src/core/headfoot/HeadFoot.tsx +2 -35
- package/src/core/page/Page.tsx +3 -3
- package/src/core/responsive/Responsive.tsx +8 -7
- package/src/core/section/Section.tsx +1 -2
- package/src/core/theme/ThemeProvider.tsx +11 -12
- package/src/core/viewport/Viewport.tsx +1 -2
- package/src/hooks/useNavigator.tsx +10 -5
- package/src/hooks/useOverlayService.tsx +12 -6
- package/src/hotkeys/HotKeyLabel.tsx +1 -1
- package/src/hotkeys/HotKeyWrapper.tsx +3 -1
- package/src/index.ts +4 -0
- package/src/overlays/alert/Alert.tsx +25 -31
- package/src/overlays/flyout/Flyout.tsx +71 -84
- package/src/overlays/message/Message.tsx +10 -7
- package/src/overlays/modal/Modal.tsx +20 -15
- package/src/overlays/toast/Toast.tsx +18 -27
- package/src/overlays/tooltip/Tooltip.tsx +30 -9
- package/src/types/icons.ts +9 -0
- package/src/types/index.ts +251 -27
- package/src/typography/Abbr.tsx +15 -9
- package/src/typography/{Link.tsx → Anchor.tsx} +8 -13
- package/src/typography/Mark.tsx +4 -9
- package/src/typography/Text.tsx +4 -12
- package/src/typography/Title.tsx +2 -6
- package/src/typography/index.ts +1 -1
- package/src/utils/cloneElement.ts +44 -0
- package/src/utils/getColor.ts +1 -17
- package/src/utils/index.ts +1 -0
- package/css/index.js +0 -250
- package/css/tailwind/colors.ts +0 -158
- package/dist/cjs/components/actionLabel/ActionLabel.module.css +0 -1
- package/dist/cjs/components/animations/Animations.module.css +0 -1
- package/dist/cjs/components/avatar/Avatar.module.css +0 -1
- package/dist/cjs/components/badge/Badge.module.css +0 -1
- package/dist/cjs/components/breadcrumbs/Breadcrumbs.module.css +0 -1
- package/dist/cjs/components/button/Button.module.css +0 -1
- package/dist/cjs/components/card/Card.module.css +0 -1
- package/dist/cjs/components/chip/Chip.module.css +0 -1
- package/dist/cjs/components/collapsable/Collapsable.module.css +0 -1
- package/dist/cjs/components/dropdown/Dropdown.module.css +0 -1
- package/dist/cjs/components/icon/Icon.module.css +0 -1
- package/dist/cjs/components/media/Media.module.css +0 -1
- package/dist/cjs/components/menu/Menu.module.css +0 -1
- package/dist/cjs/components/meter/Meter.module.css +0 -1
- package/dist/cjs/components/panel/Panel.module.css +0 -1
- package/dist/cjs/components/progress/Progress.module.css +0 -1
- package/dist/cjs/components/tabpanel/TabPanel.module.css +0 -1
- package/dist/cjs/core/aside/Aside.module.css +0 -1
- package/dist/cjs/core/boundary/ErrorBoundary.module.css +0 -1
- package/dist/cjs/core/content/Content.module.css +0 -1
- package/dist/cjs/core/headfoot/HeadFoot.module.css +0 -1
- package/dist/cjs/core/page/Page.module.css +0 -1
- package/dist/cjs/core/responsive/Responsive.module.css +0 -1
- package/dist/cjs/core/section/Section.module.css +0 -1
- package/dist/cjs/core/theme/Theme.module.css +0 -1
- package/dist/cjs/core/viewport/Viewport.module.css +0 -1
- package/dist/cjs/overlays/alert/Alert.module.css +0 -1
- package/dist/cjs/overlays/flyout/Flyout.module.css +0 -1
- package/dist/cjs/overlays/message/Message.module.css +0 -1
- package/dist/cjs/overlays/modal/Modal.module.css +0 -1
- package/dist/cjs/overlays/toast/Toast.module.css +0 -1
- package/dist/cjs/overlays/tooltip/Tooltip.module.css +0 -1
- package/dist/cjs/typography/Typography.module.css +0 -1
- package/dist/esm/components/actionLabel/ActionLabel.module.css +0 -1
- package/dist/esm/components/animations/Animations.module.css +0 -1
- package/dist/esm/components/avatar/Avatar.module.css +0 -1
- package/dist/esm/components/badge/Badge.module.css +0 -1
- package/dist/esm/components/breadcrumbs/Breadcrumbs.module.css +0 -1
- package/dist/esm/components/button/Button.module.css +0 -1
- package/dist/esm/components/card/Card.module.css +0 -1
- package/dist/esm/components/chip/Chip.module.css +0 -1
- package/dist/esm/components/collapsable/Collapsable.module.css +0 -1
- package/dist/esm/components/dropdown/Dropdown.module.css +0 -1
- package/dist/esm/components/icon/Icon.module.css +0 -1
- package/dist/esm/components/media/Media.module.css +0 -1
- package/dist/esm/components/menu/Menu.module.css +0 -1
- package/dist/esm/components/meter/Meter.module.css +0 -1
- package/dist/esm/components/panel/Panel.module.css +0 -1
- package/dist/esm/components/progress/Progress.module.css +0 -1
- package/dist/esm/components/tabpanel/TabPanel.module.css +0 -1
- package/dist/esm/core/aside/Aside.module.css +0 -1
- package/dist/esm/core/boundary/ErrorBoundary.module.css +0 -1
- package/dist/esm/core/content/Content.module.css +0 -1
- package/dist/esm/core/headfoot/HeadFoot.module.css +0 -1
- package/dist/esm/core/page/Page.module.css +0 -1
- package/dist/esm/core/responsive/Responsive.module.css +0 -1
- package/dist/esm/core/section/Section.module.css +0 -1
- package/dist/esm/core/theme/Theme.module.css +0 -1
- package/dist/esm/core/viewport/Viewport.module.css +0 -1
- package/dist/esm/overlays/alert/Alert.module.css +0 -1
- package/dist/esm/overlays/flyout/Flyout.module.css +0 -1
- package/dist/esm/overlays/message/Message.module.css +0 -1
- package/dist/esm/overlays/modal/Modal.module.css +0 -1
- package/dist/esm/overlays/toast/Toast.module.css +0 -1
- package/dist/esm/overlays/tooltip/Tooltip.module.css +0 -1
- package/dist/esm/typography/Typography.module.css +0 -1
- package/dist/types/typography/Link.d.ts +0 -25
- package/src/overlays/tooltip/Tooltip.module.css +0 -53
|
@@ -8,9 +8,9 @@ export interface ThemeProps {
|
|
|
8
8
|
* branding css className
|
|
9
9
|
*
|
|
10
10
|
* .branding {
|
|
11
|
-
* --primary: #color;
|
|
12
|
-
* --accent: #color;
|
|
13
|
-
* --tint: #color;
|
|
11
|
+
* --color-primary: #color;
|
|
12
|
+
* --color-accent: #color;
|
|
13
|
+
* --color-tint: #color;
|
|
14
14
|
* }
|
|
15
15
|
*/
|
|
16
16
|
branding?: string;
|
|
@@ -29,7 +29,7 @@ export interface ThemeProps {
|
|
|
29
29
|
/**
|
|
30
30
|
* component rounding
|
|
31
31
|
*/
|
|
32
|
-
rounding?: "
|
|
32
|
+
rounding?: "sm" | "md" | "full";
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
35
|
* Theme override
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
type
|
|
3
|
-
|
|
4
|
-
[key: string]: AnyObject;
|
|
5
|
-
}>;
|
|
1
|
+
import { type ElementType, type ReactNode } from "react";
|
|
2
|
+
import { type ModalProps } from "../types";
|
|
3
|
+
type OverlayComponent = ElementType<ModalProps<AnyObject>>;
|
|
6
4
|
export declare const useOverlayService: (ModalOrFlyout: OverlayComponent) => [
|
|
7
5
|
Overlay: ReactNode | null,
|
|
8
6
|
openOverlay: (props?: KeyValue) => Promise<AnyObject>
|
package/dist/types/index.d.ts
CHANGED
|
@@ -15,5 +15,8 @@ export * from "./hooks/useResizeObserver";
|
|
|
15
15
|
export * from "./hooks/useStorage";
|
|
16
16
|
export { HotKey } from "./hotkeys/HotKey";
|
|
17
17
|
export { HotKeyLabel } from "./hotkeys/HotKeyLabel";
|
|
18
|
+
export { HotKeyWrapper } from "./hotkeys/HotKeyWrapper";
|
|
19
|
+
export { type ModalProps } from "./types";
|
|
18
20
|
export { CoreIcons } from "./types/icons";
|
|
21
|
+
export { cloneChildren } from "./utils";
|
|
19
22
|
export { ApplicationProvider, useApplicationContext, useGlobals, useNotificationService, } from "./context/Global";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { type
|
|
2
|
+
import { type ColorState, type Elements, type IconProps } from "../../types";
|
|
3
3
|
export interface AlertProps extends Omit<IconProps, "iconBg" | "iconColor"> {
|
|
4
4
|
/**
|
|
5
5
|
* toast type
|
|
@@ -16,7 +16,7 @@ export interface AlertProps extends Omit<IconProps, "iconBg" | "iconColor"> {
|
|
|
16
16
|
/**
|
|
17
17
|
* theme color
|
|
18
18
|
*/
|
|
19
|
-
color?:
|
|
19
|
+
color?: ColorState;
|
|
20
20
|
/**
|
|
21
21
|
* extra action button
|
|
22
22
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { type ElementType } from "react";
|
|
2
2
|
import { type AriaProps, type CallbackReturn, type ChildrenProp, type Elements, type IconProps, type TestProps } from "../../types";
|
|
3
|
-
export interface FlyoutProps extends AriaProps, TestProps, IconProps, ChildrenProp {
|
|
3
|
+
export interface FlyoutProps extends AriaProps, TestProps, Omit<IconProps, "icon">, ChildrenProp {
|
|
4
|
+
icon?: string | ElementType<IconProps>;
|
|
4
5
|
/**
|
|
5
6
|
* flyout alignment
|
|
6
7
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { type
|
|
2
|
+
import { type ColorState, type Elements, type IconProps } from "../../types";
|
|
3
3
|
export interface MessageProps extends Omit<IconProps, "iconBg" | "iconColor"> {
|
|
4
4
|
/**
|
|
5
5
|
* message title
|
|
@@ -12,7 +12,7 @@ export interface MessageProps extends Omit<IconProps, "iconBg" | "iconColor"> {
|
|
|
12
12
|
/**
|
|
13
13
|
* theme color
|
|
14
14
|
*/
|
|
15
|
-
color?:
|
|
15
|
+
color?: ColorState;
|
|
16
16
|
/**
|
|
17
17
|
* extra action button
|
|
18
18
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { type ElementType } from "react";
|
|
2
2
|
import { type AriaProps, type CallbackReturn, type ChildrenProp, type Elements, type IconProps, type TestProps } from "../../types";
|
|
3
|
-
export interface ModalProps extends AriaProps, TestProps, IconProps, ChildrenProp {
|
|
3
|
+
export interface ModalProps extends AriaProps, TestProps, Omit<IconProps, "icon">, ChildrenProp {
|
|
4
|
+
icon?: string | ElementType<IconProps>;
|
|
4
5
|
/**
|
|
5
6
|
* header className
|
|
6
7
|
*/
|
|
@@ -44,7 +45,7 @@ export interface ModalProps extends AriaProps, TestProps, IconProps, ChildrenPro
|
|
|
44
45
|
/**
|
|
45
46
|
* close handler
|
|
46
47
|
*/
|
|
47
|
-
onClose
|
|
48
|
+
onClose?: (...args: AnyObject) => void;
|
|
48
49
|
/**
|
|
49
50
|
* before close handler, return false to prevent close
|
|
50
51
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { type
|
|
2
|
+
import { type ColorState, type Elements, type IconProps } from "../../types";
|
|
3
3
|
export interface ToastProps extends Omit<IconProps, "iconBg" | "iconColor"> {
|
|
4
4
|
/**
|
|
5
5
|
* toast type
|
|
@@ -16,7 +16,7 @@ export interface ToastProps extends Omit<IconProps, "iconBg" | "iconColor"> {
|
|
|
16
16
|
/**
|
|
17
17
|
* theme color
|
|
18
18
|
*/
|
|
19
|
-
color?:
|
|
19
|
+
color?: ColorState;
|
|
20
20
|
/**
|
|
21
21
|
* extra action button
|
|
22
22
|
*/
|
|
@@ -15,4 +15,4 @@ export interface TooltipProps extends TooltipType, RefProp {
|
|
|
15
15
|
export declare const getTooltipProps: (tooltip?: string | TooltipType, innerRef?: AnyObject) => (TooltipType & {
|
|
16
16
|
ref: AnyObject;
|
|
17
17
|
}) | undefined;
|
|
18
|
-
export declare const Tooltip: ({ ref, children, color, content, open, copyContent, disabled, placement: _placement, ...rest }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const Tooltip: ({ ref, children, color, textColor, content, open, copyContent, disabled, placement: _placement, ...rest }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -38,6 +38,8 @@ export declare namespace CoreIcons {
|
|
|
38
38
|
const collapseActive = "M17,13H7V11H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z";
|
|
39
39
|
const expandAll = "M5.293 16.707l6 6c0.391 0.391 1.024 0.391 1.414 0l6-6c0.391-0.391 0.391-1.024 0-1.414s-1.024-0.391-1.414 0l-5.293 5.293-5.293-5.293c-0.391-0.391-1.024-0.391-1.414 0s-0.391 1.024 0 1.414zM18.707 7.293l-6-6c-0.391-0.391-1.024-0.391-1.414 0l-6 6c-0.391 0.391-0.391 1.024 0 1.414s1.024 0.391 1.414 0l5.293-5.293 5.293 5.293c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414z";
|
|
40
40
|
const colapseAll = "M18.707 21.293l-6-6c-0.391-0.391-1.024-0.391-1.414 0l-6 6c-0.391 0.391-0.391 1.024 0 1.414s1.024 0.391 1.414 0l5.293-5.293 5.293 5.293c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414zM5.293 2.707l6 6c0.391 0.391 1.024 0.391 1.414 0l6-6c0.391-0.391 0.391-1.024 0-1.414s-1.024-0.391-1.414 0l-5.293 5.293-5.293-5.293c-0.391-0.391-1.024-0.391-1.414 0s-0.391 1.024 0 1.414z";
|
|
41
|
+
const expandAllVar = "M13,9V15H16L12,19L8,15H11V9H8L12,5L16,9H13M4,2H20V4H4V2M4,20H20V22H4V20Z";
|
|
42
|
+
const colapseAllVar = "M4,12H20V14H4V12M4,9H20V11H4V9M16,4L12,8L8,4H11V1H13V4H16M8,19L12,15L16,19H13V22H11V19H8Z";
|
|
41
43
|
const folderClosed = "M20,18H4V8H20M20,6H12L10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6Z";
|
|
42
44
|
const folderOpen = "M6.1,10L4,18V8H21A2,2 0 0,0 19,6H12L10,4H4A2,2 0 0,0 2,6V18A2,2 0 0,0 4,20H19C19.9,20 20.7,19.4 20.9,18.5L23.2,10H6.1M19,18H6L7.6,12H20.6L19,18Z";
|
|
43
45
|
const zoomIn = "M16.041 15.856c-0.034 0.026-0.067 0.055-0.099 0.087s-0.060 0.064-0.087 0.099c-1.258 1.213-2.969 1.958-4.855 1.958-1.933 0-3.682-0.782-4.95-2.050s-2.050-3.017-2.050-4.95 0.782-3.682 2.050-4.95 3.017-2.050 4.95-2.050 3.682 0.782 4.95 2.050 2.050 3.017 2.050 4.95c0 1.886-0.745 3.597-1.959 4.856zM21.707 20.293l-3.675-3.675c1.231-1.54 1.968-3.493 1.968-5.618 0-2.485-1.008-4.736-2.636-6.364s-3.879-2.636-6.364-2.636-4.736 1.008-6.364 2.636-2.636 3.879-2.636 6.364 1.008 4.736 2.636 6.364 3.879 2.636 6.364 2.636c2.125 0 4.078-0.737 5.618-1.968l3.675 3.675c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414zM8 12h2v2c0 0.552 0.448 1 1 1s1-0.448 1-1v-2h2c0.552 0 1-0.448 1-1s-0.448-1-1-1h-2v-2c0-0.552-0.448-1-1-1s-1 0.448-1 1v2h-2c-0.552 0-1 0.448-1 1s0.448 1 1 1z";
|
|
@@ -105,6 +107,7 @@ export declare namespace CoreIcons {
|
|
|
105
107
|
const mic = "M12 2c0.553 0 1.051 0.223 1.414 0.586s0.586 0.861 0.586 1.414v8c0 0.553-0.223 1.051-0.586 1.414s-0.861 0.586-1.414 0.586-1.051-0.223-1.414-0.586-0.586-0.861-0.586-1.414v-8c0-0.553 0.223-1.051 0.586-1.414s0.861-0.586 1.414-0.586zM12 0c-1.104 0-2.106 0.449-2.828 1.172s-1.172 1.724-1.172 2.828v8c0 1.104 0.449 2.106 1.172 2.828s1.724 1.172 2.828 1.172 2.106-0.449 2.828-1.172 1.172-1.724 1.172-2.828v-8c0-1.104-0.449-2.106-1.172-2.828s-1.724-1.172-2.828-1.172zM8 24h8c0.552 0 1-0.448 1-1s-0.448-1-1-1h-3v-2.062c1.809-0.226 3.432-1.056 4.657-2.281 1.446-1.447 2.343-3.448 2.343-5.657v-2c0-0.552-0.448-1-1-1s-1 0.448-1 1v2c0 1.657-0.67 3.156-1.757 4.243s-2.586 1.757-4.243 1.757-3.156-0.67-4.243-1.757-1.757-2.586-1.757-4.243v-2c0-0.552-0.448-1-1-1s-1 0.448-1 1v2c0 2.209 0.897 4.21 2.343 5.657 1.225 1.225 2.847 2.055 4.657 2.281v2.062h-3c-0.552 0-1 0.448-1 1s0.448 1 1 1z";
|
|
106
108
|
const play = "M5.541 2.159c-0.153-0.1-0.34-0.159-0.541-0.159-0.552 0-1 0.448-1 1v18c-0.001 0.182 0.050 0.372 0.159 0.541 0.299 0.465 0.917 0.599 1.382 0.3l14-9c0.114-0.072 0.219-0.174 0.3-0.3 0.299-0.465 0.164-1.083-0.3-1.382zM6 4.832l11.151 7.168-11.151 7.168z";
|
|
107
109
|
const pause = "M6 3c-0.552 0-1 0.448-1 1v16c0 0.552 0.448 1 1 1h4c0.552 0 1-0.448 1-1v-16c0-0.552-0.448-1-1-1zM7 5h2v14h-2zM14 3c-0.552 0-1 0.448-1 1v16c0 0.552 0.448 1 1 1h4c0.552 0 1-0.448 1-1v-16c0-0.552-0.448-1-1-1zM15 5h2v14h-2z";
|
|
110
|
+
const stop = "M18,18H6V6H18V18Z";
|
|
108
111
|
const volumeOn = "M10 7.081v9.839l-3.375-2.7c-0.17-0.137-0.388-0.22-0.625-0.22h-3v-4h3c0.218 0.001 0.439-0.071 0.625-0.219zM10.375 4.219l-4.726 3.781h-3.649c-0.552 0-1 0.448-1 1v6c0 0.552 0.448 1 1 1h3.649l4.726 3.781c0.431 0.345 1.061 0.275 1.406-0.156 0.148-0.185 0.22-0.407 0.219-0.625v-14c0-0.552-0.448-1-1-1-0.237 0-0.455 0.083-0.625 0.219zM18.363 5.637c1.757 1.758 2.635 4.059 2.635 6.364 0 2.304-0.878 4.605-2.635 6.362-0.39 0.391-0.39 1.024 0 1.414s1.024 0.39 1.414 0c2.147-2.147 3.22-4.963 3.221-7.776s-1.074-5.63-3.221-7.778c-0.39-0.391-1.024-0.391-1.414 0s-0.391 1.024 0 1.414zM14.833 9.167c0.781 0.781 1.171 1.803 1.171 2.828s-0.39 2.047-1.171 2.828c-0.39 0.391-0.39 1.024 0 1.414s1.024 0.39 1.414 0c1.171-1.171 1.757-2.708 1.757-4.242s-0.586-3.071-1.757-4.242c-0.39-0.391-1.024-0.391-1.414 0s-0.391 1.024 0 1.414z";
|
|
109
112
|
const volumeOff = "M10 7.081v9.839l-3.375-2.7c-0.17-0.137-0.388-0.22-0.625-0.22h-3v-4h3c0.218 0.001 0.439-0.071 0.625-0.219zM10.375 4.219l-4.726 3.781h-3.649c-0.552 0-1 0.448-1 1v6c0 0.552 0.448 1 1 1h3.649l4.726 3.781c0.431 0.345 1.061 0.275 1.406-0.156 0.148-0.185 0.22-0.407 0.219-0.625v-14c0-0.552-0.448-1-1-1-0.237 0-0.455 0.083-0.625 0.219zM16.293 9.707l2.293 2.293-2.293 2.293c-0.391 0.391-0.391 1.024 0 1.414s1.024 0.391 1.414 0l2.293-2.293 2.293 2.293c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414l-2.293-2.293 2.293-2.293c0.391-0.391 0.391-1.024 0-1.414s-1.024-0.391-1.414 0l-2.293 2.293-2.293-2.293c-0.391-0.391-1.024-0.391-1.414 0s-0.391 1.024 0 1.414z";
|
|
110
113
|
const alignLeft = "M3,3H21V5H3V3M3,7H15V9H3V7M3,11H21V13H3V11M3,15H15V17H3V15M3,19H21V21H3V19Z";
|
|
@@ -152,6 +155,7 @@ export declare namespace CoreIcons {
|
|
|
152
155
|
const radioOn = "M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,7A5,5 0 0,0 7,12A5,5 0 0,0 12,17A5,5 0 0,0 17,12A5,5 0 0,0 12,7Z";
|
|
153
156
|
const colorSwatch = "M16 14V12H17.61C17.85 12.71 18 13.39 18 14H16M15.58 8C15.12 7.29 14.65 6.61 14.2 6H14V8H15.58M16 12V10H14V12H16M16 8.68V10H16.74C16.5 9.56 16.26 9.11 16 8.68M12 16V14H14V12H12V10H14V8H12V6H14V5.73C12.9 4.26 12 3.25 12 3.25S6 10 6 14C6 17.31 8.69 20 12 20V18H14V16H12M14 19.65C14.75 19.39 15.42 19 16 18.46V18H14V19.65M14 16H16V14H14V16M16 18H16.46C17 17.42 17.39 16.75 17.65 16H16V18Z";
|
|
154
157
|
const colorPicker = "M19.35,11.72L17.22,13.85L15.81,12.43L8.1,20.14L3.5,22L2,20.5L3.86,15.9L11.57,8.19L10.15,6.78L12.28,4.65L19.35,11.72M16.76,3C17.93,1.83 19.83,1.83 21,3C22.17,4.17 22.17,6.07 21,7.24L19.08,9.16L14.84,4.92L16.76,3M5.56,17.03L4.5,19.5L6.97,18.44L14.4,11L13,9.6L5.56,17.03Z";
|
|
158
|
+
const list = "M11 15H17V17H11V15M9 7H7V9H9V7M11 13H17V11H11V13M11 9H17V7H11V9M9 11H7V13H9V11M21 5V19C21 20.1 20.1 21 19 21H5C3.9 21 3 20.1 3 19V5C3 3.9 3.9 3 5 3H19C20.1 3 21 3.9 21 5M19 5H5V19H19V5M9 15H7V17H9V15Z";
|
|
155
159
|
/**
|
|
156
160
|
* alert icons
|
|
157
161
|
*/
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { type Placement } from "@floating-ui/react";
|
|
2
2
|
import { type JSXElementConstructor, type Ref } from "react";
|
|
3
|
+
export type ModalProps<P = unknown> = P & {
|
|
4
|
+
onClose: (...args: AnyObject) => void;
|
|
5
|
+
};
|
|
3
6
|
export type SizeType = "xs" | "sm" | "md" | "lg" | "xl";
|
|
4
7
|
export type SizeTypeWithZero = "xs" | "sm" | "md" | "lg" | "xl" | 0;
|
|
5
|
-
export type
|
|
6
|
-
export type
|
|
8
|
+
export type ColorState = "primary" | "accent" | "info" | "danger" | "success" | "warning";
|
|
9
|
+
export type ColorType = "primary-50" | "primary-100" | "primary-200" | "primary-300" | "primary-400" | "primary-500" | "primary-600" | "primary-700" | "primary-800" | "primary-900" | "primary-950" | "accent-50" | "accent-100" | "accent-200" | "accent-300" | "accent-400" | "accent-500" | "accent-600" | "accent-700" | "accent-800" | "accent-900" | "accent-950" | "info-50" | "info-100" | "info-200" | "info-300" | "info-400" | "info-500" | "info-600" | "info-700" | "info-800" | "info-900" | "info-950" | "danger-50" | "danger-100" | "danger-200" | "danger-300" | "danger-400" | "danger-500" | "danger-600" | "danger-700" | "danger-800" | "danger-900" | "danger-950" | "success-50" | "success-100" | "success-200" | "success-300" | "success-400" | "success-500" | "success-600" | "success-700" | "success-800" | "success-900" | "success-950" | "warning-50" | "warning-100" | "warning-200" | "warning-300" | "warning-400" | "warning-500" | "warning-600" | "warning-700" | "warning-800" | "warning-900" | "warning-950";
|
|
10
|
+
export type PaletteType = "scarlet-50" | "scarlet-100" | "scarlet-200" | "scarlet-300" | "scarlet-400" | "scarlet-500" | "scarlet-600" | "scarlet-700" | "scarlet-800" | "scarlet-900" | "scarlet-950" | "pumpkin-50" | "pumpkin-100" | "pumpkin-200" | "pumpkin-300" | "pumpkin-400" | "pumpkin-500" | "pumpkin-600" | "pumpkin-700" | "pumpkin-800" | "pumpkin-900" | "pumpkin-950" | "marigold-50" | "marigold-100" | "marigold-200" | "marigold-300" | "marigold-400" | "marigold-500" | "marigold-600" | "marigold-700" | "marigold-800" | "marigold-900" | "marigold-950" | "avacado-50" | "avacado-100" | "avacado-200" | "avacado-300" | "avacado-400" | "avacado-500" | "avacado-600" | "avacado-700" | "avacado-800" | "avacado-900" | "avacado-950" | "jade-50" | "jade-100" | "jade-200" | "jade-300" | "jade-400" | "jade-500" | "jade-600" | "jade-700" | "jade-800" | "jade-900" | "jade-950" | "denim-50" | "denim-100" | "denim-200" | "denim-300" | "denim-400" | "denim-500" | "denim-600" | "denim-700" | "denim-800" | "denim-900" | "denim-950" | "iris-50" | "iris-100" | "iris-200" | "iris-300" | "iris-400" | "iris-500" | "iris-600" | "iris-700" | "iris-800" | "iris-900" | "iris-950" | "lilac-50" | "lilac-100" | "lilac-200" | "lilac-300" | "lilac-400" | "lilac-500" | "lilac-600" | "lilac-700" | "lilac-800" | "lilac-900" | "lilac-950" | "coral-50" | "coral-100" | "coral-200" | "coral-300" | "coral-400" | "coral-500" | "coral-600" | "coral-700" | "coral-800" | "coral-900" | "coral-950" | "wood-50" | "wood-100" | "wood-200" | "wood-300" | "wood-400" | "wood-500" | "wood-600" | "wood-700" | "wood-800" | "wood-900" | "wood-950" | "silver-50" | "silver-100" | "silver-200" | "silver-300" | "silver-400" | "silver-500" | "silver-600" | "silver-700" | "silver-800" | "silver-900" | "silver-950" | "steel-50" | "steel-100" | "steel-200" | "steel-300" | "steel-400" | "steel-500" | "steel-600" | "steel-700" | "steel-800" | "steel-900" | "steel-950" | "olive-50" | "olive-100" | "olive-200" | "olive-300" | "olive-400" | "olive-500" | "olive-600" | "olive-700" | "olive-800" | "olive-900" | "olive-950" | "sand-50" | "sand-100" | "sand-200" | "sand-300" | "sand-400" | "sand-500" | "sand-600" | "sand-700" | "sand-800" | "sand-900" | "sand-950" | "tint-50" | "tint-100" | "tint-200" | "tint-300" | "tint-400" | "tint-500" | "tint-600" | "tint-700" | "tint-800" | "tint-900" | "tint-950";
|
|
7
11
|
export type ColorWithGrays = ColorType | "invert" | "dimmed" | "muted";
|
|
8
12
|
export declare const ThemeColors: string[];
|
|
9
13
|
export interface TooltipType {
|
|
@@ -14,7 +18,11 @@ export interface TooltipType {
|
|
|
14
18
|
/**
|
|
15
19
|
* tooltip color
|
|
16
20
|
*/
|
|
17
|
-
color?: ColorType;
|
|
21
|
+
color?: ColorType | PaletteType | string;
|
|
22
|
+
/**
|
|
23
|
+
* text color
|
|
24
|
+
*/
|
|
25
|
+
textColor?: ColorType | PaletteType | string;
|
|
18
26
|
/**
|
|
19
27
|
* tooltip placement
|
|
20
28
|
*/
|
|
@@ -54,7 +62,7 @@ export interface TestProps {
|
|
|
54
62
|
*/
|
|
55
63
|
"data-test-value"?: AnyObject;
|
|
56
64
|
}
|
|
57
|
-
export type Elements<T> = React.ReactElement<T> | React.
|
|
65
|
+
export type Elements<T> = React.ReactElement<T> | React.ReactNode;
|
|
58
66
|
export type AriaProps = React.AriaAttributes;
|
|
59
67
|
/**
|
|
60
68
|
* For wrapping components
|
|
@@ -84,11 +92,11 @@ export interface IconProps {
|
|
|
84
92
|
/**
|
|
85
93
|
* icon background color
|
|
86
94
|
*/
|
|
87
|
-
iconBg?: ColorType | string;
|
|
95
|
+
iconBg?: ColorType | PaletteType | string;
|
|
88
96
|
/**
|
|
89
97
|
* icon color
|
|
90
98
|
*/
|
|
91
|
-
iconColor?: ColorType | string;
|
|
99
|
+
iconColor?: ColorType | PaletteType | string;
|
|
92
100
|
}
|
|
93
101
|
export interface CollapseProps {
|
|
94
102
|
/**
|
|
@@ -138,3 +146,7 @@ export interface SizeObject {
|
|
|
138
146
|
width: number;
|
|
139
147
|
height: number;
|
|
140
148
|
}
|
|
149
|
+
export interface ScrollObject extends PositionObject, SizeObject {
|
|
150
|
+
scrollWidth?: number;
|
|
151
|
+
scrollHeight: number;
|
|
152
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { type ChildProp, type ColorType, type CssProp } from "../types";
|
|
2
|
+
import { type ChildProp, type ColorType, type CssProp, type PaletteType } from "../types";
|
|
3
3
|
export interface AbbrProps extends ChildProp<string>, CssProp {
|
|
4
4
|
/**
|
|
5
5
|
* content to copy using the tooltip copy action
|
|
@@ -10,7 +10,11 @@ export interface AbbrProps extends ChildProp<string>, CssProp {
|
|
|
10
10
|
*
|
|
11
11
|
* [textPart, tooltip, color (class name or color string)]
|
|
12
12
|
*/
|
|
13
|
-
abbr: Array<[
|
|
13
|
+
abbr: Array<[
|
|
14
|
+
textPart: string,
|
|
15
|
+
tooltip: string,
|
|
16
|
+
color?: ColorType | PaletteType | string
|
|
17
|
+
]>;
|
|
14
18
|
/**
|
|
15
19
|
* renderer callback
|
|
16
20
|
*/
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type MouseEventHandler } from "react";
|
|
2
|
+
import { type AriaProps, type ChildrenProp, type ColorType, type CssProp, type PaletteType, type PolymorphicProps, type RefProp, type SizeType } from "../types";
|
|
3
|
+
export interface AnchorProps extends ChildrenProp, CssProp, RefProp, AriaProps {
|
|
4
|
+
/**
|
|
5
|
+
* link background (CSS color / tailwind color)
|
|
6
|
+
*/
|
|
7
|
+
bg?: ColorType | PaletteType | string;
|
|
8
|
+
/**
|
|
9
|
+
* link color (CSS color / tailwind color)
|
|
10
|
+
*/
|
|
11
|
+
color?: ColorType | PaletteType | string;
|
|
12
|
+
/**
|
|
13
|
+
* link size
|
|
14
|
+
*/
|
|
15
|
+
size?: SizeType | number | string;
|
|
16
|
+
/**
|
|
17
|
+
* font family
|
|
18
|
+
*/
|
|
19
|
+
family?: "sans" | "serif" | "mono";
|
|
20
|
+
onClick?: MouseEventHandler;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Typography link component
|
|
24
|
+
*/
|
|
25
|
+
export declare const Anchor: <Tag extends import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> = "a">({ ref, as, children, className, bg, color, family, size, ...aria }: AnchorProps & PolymorphicProps<Tag>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { type ChildProp, type ColorType } from "../types";
|
|
2
|
+
import { type ChildProp, type ColorType, type PaletteType } from "../types";
|
|
3
3
|
export interface MarkProps extends ChildProp<string> {
|
|
4
4
|
/**
|
|
5
5
|
* texts to match and abbreviate within
|
|
6
6
|
*
|
|
7
7
|
* [textPart, color (class name or color string)]
|
|
8
8
|
*/
|
|
9
|
-
mark: Array<[textPart: string, color?: ColorType | string]>;
|
|
9
|
+
mark: Array<[textPart: string, color?: ColorType | PaletteType | string]>;
|
|
10
10
|
/**
|
|
11
11
|
* renderer callback
|
|
12
12
|
*/
|
|
@@ -1,4 +1 @@
|
|
|
1
|
-
export declare const getColor: (color: string) => string
|
|
2
|
-
export declare const getBgClass: (bg: string) => string | undefined;
|
|
3
|
-
export declare const getColorClass: (color: string) => string | undefined;
|
|
4
|
-
export declare const getBorderClass: (color: string) => string | undefined;
|
|
1
|
+
export declare const getColor: (color: string) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-fabric/core",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.41",
|
|
4
4
|
"description": "RUF: Core package",
|
|
5
5
|
"author": "Adarsh Pastakia <adarshpastakia@outlook.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,25 +36,23 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@floating-ui/react": "^0.26.24",
|
|
39
|
-
"@react-fabric/utilities": "^1.0.0-beta.
|
|
40
|
-
"@tailwindcss/
|
|
41
|
-
"@tailwindcss/forms": "^0.5.7",
|
|
42
|
-
"@tailwindcss/typography": "^0.5.13",
|
|
39
|
+
"@react-fabric/utilities": "^1.0.0-beta.41",
|
|
40
|
+
"@tailwindcss/postcss": "~4.0.14",
|
|
43
41
|
"boring-avatars": "^1.10.2",
|
|
44
42
|
"classnames": "^2.5.1",
|
|
45
43
|
"color": "^4.2.3",
|
|
46
44
|
"resize-observer-polyfill": "^1.5.1",
|
|
47
|
-
"tailwindcss": "^
|
|
45
|
+
"tailwindcss": "^4.0.14"
|
|
48
46
|
},
|
|
49
47
|
"peerDependencies": {
|
|
50
48
|
"i18next": "^23.15.1",
|
|
51
|
-
"react": "
|
|
52
|
-
"react-dom": "
|
|
49
|
+
"react": "^19.0.0",
|
|
50
|
+
"react-dom": "^19.0.0",
|
|
53
51
|
"react-i18next": "^15.0.2"
|
|
54
52
|
},
|
|
55
53
|
"engines": {
|
|
56
54
|
"node": ">=18.12.0",
|
|
57
55
|
"npm": ">=8.19.0"
|
|
58
56
|
},
|
|
59
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "bc737416d3c6a217a6b8c47291c3975a22722d80"
|
|
60
58
|
}
|
|
@@ -22,12 +22,20 @@
|
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
import classNames from "classnames";
|
|
25
|
-
import { type ReactElement
|
|
26
|
-
import {
|
|
25
|
+
import { useCallback, type ReactElement } from "react";
|
|
26
|
+
import {
|
|
27
|
+
type AriaProps,
|
|
28
|
+
type ChildProp,
|
|
29
|
+
type CssProp,
|
|
30
|
+
type TestProps,
|
|
31
|
+
} from "../../types";
|
|
27
32
|
import { ButtonGroup } from "../button/ButtonGroup";
|
|
28
|
-
import classes from "./ActionLabel.module.css";
|
|
29
33
|
|
|
30
|
-
export interface ActionLabelProps
|
|
34
|
+
export interface ActionLabelProps
|
|
35
|
+
extends AriaProps,
|
|
36
|
+
CssProp,
|
|
37
|
+
ChildProp,
|
|
38
|
+
TestProps {
|
|
31
39
|
/**
|
|
32
40
|
* action buttons aligment
|
|
33
41
|
*/
|
|
@@ -75,7 +83,7 @@ export const ActionLabel = ({
|
|
|
75
83
|
<div
|
|
76
84
|
className={classNames(
|
|
77
85
|
className,
|
|
78
|
-
|
|
86
|
+
"fabric-actionLabel",
|
|
79
87
|
"flex overflow-hidden gap-1 items-center cursor-default select-none",
|
|
80
88
|
)}
|
|
81
89
|
data-disabled={disabled}
|
|
@@ -83,8 +91,9 @@ export const ActionLabel = ({
|
|
|
83
91
|
>
|
|
84
92
|
<ButtonGroup
|
|
85
93
|
ref={calculateBasis}
|
|
94
|
+
data-inner-clickable
|
|
86
95
|
className={classNames(
|
|
87
|
-
|
|
96
|
+
"fabric-actions",
|
|
88
97
|
"overflow-hidden flex-content",
|
|
89
98
|
align === "end" && "order-2",
|
|
90
99
|
)}
|
|
@@ -30,19 +30,18 @@ import {
|
|
|
30
30
|
type CssProp,
|
|
31
31
|
type PaletteType,
|
|
32
32
|
} from "../../types";
|
|
33
|
-
import { getColor
|
|
34
|
-
import classes from "./Animations.module.css";
|
|
33
|
+
import { getColor } from "../../utils";
|
|
35
34
|
|
|
36
35
|
export interface AnimationProps extends CssProp, AriaProps {
|
|
37
36
|
type?: "info" | "check" | "cross" | "question" | "exclaim";
|
|
38
37
|
/**
|
|
39
38
|
* icon color
|
|
40
39
|
*/
|
|
41
|
-
color?: ColorType | PaletteType;
|
|
40
|
+
color?: ColorType | PaletteType | string;
|
|
42
41
|
/**
|
|
43
42
|
* icon mark color
|
|
44
43
|
*/
|
|
45
|
-
strokeColor?: ColorType | PaletteType;
|
|
44
|
+
strokeColor?: ColorType | PaletteType | string;
|
|
46
45
|
}
|
|
47
46
|
|
|
48
47
|
export const AnimationIndicator = ({
|
|
@@ -80,10 +79,9 @@ export const AnimationIndicator = ({
|
|
|
80
79
|
<svg
|
|
81
80
|
data-ref="animated-indicator"
|
|
82
81
|
className={classNames(
|
|
83
|
-
|
|
82
|
+
"fabric-checkAnimation",
|
|
84
83
|
className,
|
|
85
84
|
"inline-block rounded-full",
|
|
86
|
-
color && getColorClass(color),
|
|
87
85
|
)}
|
|
88
86
|
style={styles}
|
|
89
87
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -91,12 +89,14 @@ export const AnimationIndicator = ({
|
|
|
91
89
|
aria-hidden="true"
|
|
92
90
|
{...aria}
|
|
93
91
|
>
|
|
94
|
-
<circle className={
|
|
92
|
+
<circle className={"fabric-circlePart"} cx="26" cy="26" r="25" />
|
|
95
93
|
<path
|
|
96
|
-
className={classNames(
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
94
|
+
className={classNames("fabric-iconPart")}
|
|
95
|
+
style={{
|
|
96
|
+
color: strokeColor
|
|
97
|
+
? getColor(strokeColor)
|
|
98
|
+
: "var(--text-color-invert)",
|
|
99
|
+
}}
|
|
100
100
|
d={path}
|
|
101
101
|
/>
|
|
102
102
|
</svg>
|
|
@@ -104,10 +104,10 @@ export const AnimationIndicator = ({
|
|
|
104
104
|
};
|
|
105
105
|
|
|
106
106
|
export const AnimationBars = ({
|
|
107
|
-
color = "tint",
|
|
107
|
+
color = "tint-500",
|
|
108
108
|
size = "2rem",
|
|
109
109
|
}: {
|
|
110
|
-
color?: ColorType | string;
|
|
110
|
+
color?: ColorType | PaletteType | string;
|
|
111
111
|
size?: number | string;
|
|
112
112
|
}) => {
|
|
113
113
|
return (
|
|
@@ -118,12 +118,12 @@ export const AnimationBars = ({
|
|
|
118
118
|
>
|
|
119
119
|
<div
|
|
120
120
|
className={classNames(
|
|
121
|
-
"outline outline-tint-500/20 p-4 bg-
|
|
121
|
+
"outline outline-tint-500/20 p-4 bg-tint-50/50 backdrop-blur-sm rounded",
|
|
122
122
|
)}
|
|
123
123
|
>
|
|
124
124
|
<div
|
|
125
|
-
className={classNames(
|
|
126
|
-
style={{ width: size }}
|
|
125
|
+
className={classNames("fabric-bars")}
|
|
126
|
+
style={{ width: size, color: getColor(color) }}
|
|
127
127
|
/>
|
|
128
128
|
</div>
|
|
129
129
|
</div>
|
|
@@ -134,7 +134,7 @@ export const AnimationSpinner = ({
|
|
|
134
134
|
color = "tint-700",
|
|
135
135
|
size = "2rem",
|
|
136
136
|
}: {
|
|
137
|
-
color?: ColorType | string;
|
|
137
|
+
color?: ColorType | PaletteType | string;
|
|
138
138
|
size?: number | string;
|
|
139
139
|
}) => {
|
|
140
140
|
return (
|
|
@@ -142,15 +142,16 @@ export const AnimationSpinner = ({
|
|
|
142
142
|
className={classNames(
|
|
143
143
|
"absolute inset-0 z-10 flex justify-center items-center cursor-wait",
|
|
144
144
|
)}
|
|
145
|
+
data-ref="spinner"
|
|
145
146
|
>
|
|
146
147
|
<div
|
|
147
148
|
className={classNames(
|
|
148
|
-
"outline outline-tint-500/20 p-4 bg-
|
|
149
|
+
"outline outline-tint-500/20 p-4 bg-tint-50/50 backdrop-blur-sm rounded",
|
|
149
150
|
)}
|
|
150
151
|
>
|
|
151
152
|
<div
|
|
152
|
-
className={classNames(
|
|
153
|
-
style={{ width: size }}
|
|
153
|
+
className={classNames("fabric-spinner")}
|
|
154
|
+
style={{ width: size, color: getColor(color) }}
|
|
154
155
|
/>
|
|
155
156
|
</div>
|
|
156
157
|
</div>
|
|
@@ -161,18 +162,23 @@ export const Loading = () => {
|
|
|
161
162
|
return (
|
|
162
163
|
<div
|
|
163
164
|
className={classNames(
|
|
164
|
-
|
|
165
|
+
"fabric-loader",
|
|
165
166
|
"area-[loader] relative overflow-x-clip",
|
|
166
167
|
)}
|
|
168
|
+
data-ref="loading"
|
|
167
169
|
>
|
|
168
170
|
<div className="absolute z-10 py-px inset-x-0 top-0 after:h-0.5 after:block after:bg-primary-500" />
|
|
169
171
|
</div>
|
|
170
172
|
);
|
|
171
173
|
};
|
|
172
174
|
|
|
173
|
-
export const Skeleton = () => {
|
|
175
|
+
export const Skeleton = ({ className, ...rest }: CssProp) => {
|
|
174
176
|
return (
|
|
175
|
-
<div
|
|
177
|
+
<div
|
|
178
|
+
className={classNames(className, "p-2 animate-pulse flex gap-2 max-w-lg")}
|
|
179
|
+
data-ref="skeleton"
|
|
180
|
+
{...rest}
|
|
181
|
+
>
|
|
176
182
|
<div className="bg-tint-100 rounded aspect-square h-12" />
|
|
177
183
|
<div className="flex-1 flex flex-col gap-2">
|
|
178
184
|
<div className="bg-tint-100 h-3 rounded-full" />
|