@react-fabric/core 1.0.0-beta.61 → 1.0.0-beta.63
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/css/components/_animations.css +7 -11
- package/css/components/_avatar.css +5 -5
- package/css/components/_badge.css +2 -1
- package/css/components/_breadcrumbs.css +7 -5
- package/css/components/_button.css +49 -9
- package/css/components/_card.css +9 -17
- package/css/components/_chip.css +0 -4
- package/css/components/_dropdown.css +1 -0
- package/css/components/_flyout.css +1 -1
- package/css/components/_media.css +2 -14
- package/css/components/_menu.css +1 -1
- package/css/components/_modal.css +3 -3
- package/css/components/_progress.css +1 -1
- package/css/components/_stepper.css +2 -1
- package/css/components/_tabPanel.css +4 -4
- package/css/core/_aside.css +3 -3
- package/css/core/_errorboundary.css +2 -10
- package/css/core/_page.css +1 -1
- package/css/core/_responsive.css +8 -0
- package/css/core/_theme.css +1 -1
- package/css/core/_viewport.css +1 -5
- package/css/reset/_reset.css +42 -43
- package/css/reset/_theme.css +214 -201
- package/css/styles.css +5 -0
- package/css/theme/_colors.css +14 -0
- package/css/theme/_utilities.css +103 -225
- package/css/theme/index.css +4 -6
- package/dist/cjs/components/actionLabel/ActionLabel.js +1 -1
- package/dist/cjs/components/animations/Animations.js +7 -7
- package/dist/cjs/components/avatar/Avatar.js +1 -1
- package/dist/cjs/components/avatar/AvatarGroup.js +1 -1
- package/dist/cjs/components/badge/Badge.js +5 -27
- package/dist/cjs/components/breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/cjs/components/button/Button.js +8 -6
- package/dist/cjs/components/button/ButtonGroup.js +1 -1
- package/dist/cjs/components/button/ConfirmButton.js +7 -6
- package/dist/cjs/components/button/ToggleButtonGroup.js +1 -1
- package/dist/cjs/components/callout/Callout.js +8 -7
- package/dist/cjs/components/card/Card.js +3 -3
- package/dist/cjs/components/card/CardCover.js +1 -1
- package/dist/cjs/components/card/FlipContent.js +2 -2
- package/dist/cjs/components/chip/Chip.js +8 -7
- package/dist/cjs/components/collapsable/Collapsable.js +4 -3
- package/dist/cjs/components/divider/Divider.js +2 -2
- package/dist/cjs/components/dropdown/Dropdown.js +28 -14
- package/dist/cjs/components/empty/EmptyContent.js +1 -1
- package/dist/cjs/components/icon/Icon.js +26 -40
- package/dist/cjs/components/media/Media.js +13 -13
- package/dist/cjs/components/menu/ContextMenu.js +23 -13
- package/dist/cjs/components/menu/Menu.js +19 -14
- package/dist/cjs/components/menu/MenuItem.js +5 -4
- package/dist/cjs/components/meter/Meter.js +1 -1
- package/dist/cjs/components/navigator/Navigator.js +6 -6
- package/dist/cjs/components/panel/Panel.js +6 -4
- package/dist/cjs/components/panel/PanelGroup.js +3 -3
- package/dist/cjs/components/panel/PanelStack.js +5 -5
- package/dist/cjs/components/progress/ProgressBar.js +2 -2
- package/dist/cjs/components/progress/ProgressCircle.js +2 -2
- package/dist/cjs/components/tabpanel/Tab.js +6 -4
- package/dist/cjs/components/tabpanel/TabPanel.js +7 -6
- package/dist/cjs/context/Global.js +2 -55
- package/dist/cjs/context/NotificationCenter.js +38 -39
- package/dist/cjs/context/context.js +59 -0
- package/dist/cjs/core/aside/Aside.js +9 -7
- package/dist/cjs/core/boundary/ErrorBoundary.js +2 -4
- package/dist/cjs/core/page/Page.js +4 -1
- package/dist/cjs/core/responsive/Responsive.js +3 -2
- package/dist/cjs/core/theme/ThemeProvider.js +5 -4
- package/dist/cjs/core/viewport/Viewport.js +1 -1
- package/dist/cjs/hooks/useContextMenu.js +103 -0
- package/dist/cjs/hooks/useIsDark.js +6 -4
- package/dist/cjs/hooks/useNavigator.js +11 -10
- package/dist/cjs/hooks/useOverlayService.js +27 -38
- package/dist/cjs/hooks/usePropToggle.js +2 -2
- package/dist/cjs/hooks/useResize.js +8 -6
- package/dist/cjs/hooks/useResizeObserver.js +5 -5
- package/dist/cjs/hooks/useStepper.js +2 -6
- package/dist/cjs/hotkeys/HotKey.js +2 -2
- package/dist/cjs/hotkeys/HotKeyWrapper.js +8 -13
- package/dist/cjs/hotkeys/commons.js +1 -1
- package/dist/cjs/hotkeys/context.js +36 -0
- package/dist/cjs/i18n/index.js +4 -4
- package/dist/cjs/index.js +10 -5
- package/dist/cjs/overlays/alert/Alert.js +6 -5
- package/dist/cjs/overlays/flyout/Flyout.js +8 -6
- package/dist/cjs/overlays/message/Message.js +5 -5
- package/dist/cjs/overlays/modal/Modal.js +5 -3
- package/dist/cjs/overlays/toast/Toast.js +4 -4
- package/dist/cjs/overlays/tooltip/Tooltip.js +2 -16
- package/dist/cjs/typography/Abbr.js +4 -5
- package/dist/cjs/typography/Anchor.js +2 -2
- package/dist/cjs/typography/Copy.js +2 -2
- package/dist/cjs/typography/Mark.js +2 -4
- package/dist/cjs/typography/Text.js +4 -4
- package/dist/cjs/typography/Title.js +2 -2
- package/dist/cjs/utils/cloneElement.js +4 -4
- package/dist/cjs/utils/getBadgeProps.js +51 -0
- package/dist/cjs/utils/getIconProps.js +42 -0
- package/dist/cjs/utils/getTooltipProps.js +45 -0
- package/dist/esm/components/actionLabel/ActionLabel.js +1 -1
- package/dist/esm/components/animations/Animations.js +7 -7
- package/dist/esm/components/avatar/Avatar.js +1 -1
- package/dist/esm/components/avatar/AvatarGroup.js +1 -1
- package/dist/esm/components/badge/Badge.js +7 -28
- package/dist/esm/components/breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/esm/components/button/Button.js +9 -7
- package/dist/esm/components/button/ButtonGroup.js +3 -3
- package/dist/esm/components/button/ConfirmButton.js +8 -7
- package/dist/esm/components/button/ToggleButtonGroup.js +3 -3
- package/dist/esm/components/callout/Callout.js +8 -7
- package/dist/esm/components/card/Card.js +4 -4
- package/dist/esm/components/card/CardCover.js +1 -1
- package/dist/esm/components/card/FlipContent.js +2 -2
- package/dist/esm/components/chip/Chip.js +9 -8
- package/dist/esm/components/collapsable/Collapsable.js +4 -3
- package/dist/esm/components/divider/Divider.js +2 -2
- package/dist/esm/components/dropdown/Dropdown.js +30 -16
- package/dist/esm/components/empty/EmptyContent.js +1 -1
- package/dist/esm/components/icon/Icon.js +28 -41
- package/dist/esm/components/media/Media.js +13 -13
- package/dist/esm/components/menu/ContextMenu.js +24 -14
- package/dist/esm/components/menu/Menu.js +22 -17
- package/dist/esm/components/menu/MenuItem.js +6 -5
- package/dist/esm/components/meter/Meter.js +1 -1
- package/dist/esm/components/navigator/Navigator.js +7 -7
- package/dist/esm/components/panel/Panel.js +6 -4
- package/dist/esm/components/panel/PanelGroup.js +4 -4
- package/dist/esm/components/panel/PanelStack.js +6 -6
- package/dist/esm/components/progress/ProgressBar.js +2 -2
- package/dist/esm/components/progress/ProgressCircle.js +2 -2
- package/dist/esm/components/tabpanel/Tab.js +6 -4
- package/dist/esm/components/tabpanel/TabPanel.js +8 -7
- package/dist/esm/context/Global.js +3 -52
- package/dist/esm/context/NotificationCenter.js +38 -39
- package/dist/esm/context/context.js +56 -0
- package/dist/esm/core/aside/Aside.js +10 -8
- package/dist/esm/core/boundary/ErrorBoundary.js +1 -3
- package/dist/esm/core/page/Page.js +4 -1
- package/dist/esm/core/responsive/Responsive.js +3 -2
- package/dist/esm/core/theme/ThemeProvider.js +4 -3
- package/dist/esm/core/viewport/Viewport.js +1 -1
- package/dist/esm/hooks/useContextMenu.js +103 -0
- package/dist/esm/hooks/useIsDark.js +7 -5
- package/dist/esm/hooks/useNavigator.js +12 -11
- package/dist/esm/hooks/useOverlayService.js +28 -39
- package/dist/esm/hooks/usePropToggle.js +3 -3
- package/dist/esm/hooks/useResize.js +9 -7
- package/dist/esm/hooks/useResizeObserver.js +6 -6
- package/dist/esm/hooks/useStepper.js +2 -6
- package/dist/esm/hotkeys/HotKey.js +1 -1
- package/dist/esm/hotkeys/HotKeyWrapper.js +9 -12
- package/dist/esm/hotkeys/commons.js +1 -1
- package/dist/esm/hotkeys/context.js +35 -0
- package/dist/esm/i18n/index.js +2 -2
- package/dist/esm/index.js +8 -4
- package/dist/esm/overlays/alert/Alert.js +7 -6
- package/dist/esm/overlays/flyout/Flyout.js +9 -7
- package/dist/esm/overlays/message/Message.js +6 -6
- package/dist/esm/overlays/modal/Modal.js +6 -4
- package/dist/esm/overlays/toast/Toast.js +5 -5
- package/dist/esm/overlays/tooltip/Tooltip.js +4 -17
- package/dist/esm/typography/Abbr.js +4 -5
- package/dist/esm/typography/Anchor.js +2 -2
- package/dist/esm/typography/Copy.js +3 -3
- package/dist/esm/typography/Mark.js +2 -4
- package/dist/esm/typography/Text.js +5 -5
- package/dist/esm/typography/Title.js +2 -2
- package/dist/esm/utils/cloneElement.js +4 -4
- package/dist/esm/utils/getBadgeProps.js +51 -0
- package/dist/esm/utils/getIconProps.js +42 -0
- package/dist/esm/utils/getTooltipProps.js +45 -0
- package/dist/types/components/actionLabel/ActionLabel.d.ts +1 -1
- package/dist/types/components/animations/Animations.d.ts +6 -6
- package/dist/types/components/avatar/Avatar.d.ts +1 -1
- package/dist/types/components/avatar/AvatarGroup.d.ts +1 -1
- package/dist/types/components/badge/Badge.d.ts +2 -10
- package/dist/types/components/breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/types/components/button/Button.d.ts +1 -1
- package/dist/types/components/button/ButtonGroup.d.ts +1 -1
- package/dist/types/components/button/ConfirmButton.d.ts +1 -1
- package/dist/types/components/button/ToggleButtonGroup.d.ts +1 -1
- package/dist/types/components/callout/Callout.d.ts +7 -3
- package/dist/types/components/card/Card.d.ts +2 -2
- package/dist/types/components/card/CardCover.d.ts +1 -1
- package/dist/types/components/card/FlipContent.d.ts +1 -1
- package/dist/types/components/chip/Chip.d.ts +1 -1
- package/dist/types/components/collapsable/Collapsable.d.ts +1 -1
- package/dist/types/components/divider/Divider.d.ts +1 -1
- package/dist/types/components/dropdown/Dropdown.d.ts +7 -3
- package/dist/types/components/dropdown/DropdownTool.d.ts +1 -1
- package/dist/types/components/empty/EmptyContent.d.ts +3 -3
- package/dist/types/components/icon/Icon.d.ts +3 -4
- package/dist/types/components/index.d.ts +3 -3
- package/dist/types/components/media/Media.d.ts +2 -2
- package/dist/types/components/menu/ContextMenu.d.ts +1 -1
- package/dist/types/components/menu/Menu.d.ts +1 -1
- package/dist/types/components/menu/types.d.ts +6 -1
- package/dist/types/components/meter/Meter.d.ts +1 -1
- package/dist/types/components/navigator/Navigator.d.ts +7 -1
- package/dist/types/components/panel/Panel.d.ts +2 -2
- package/dist/types/components/panel/PanelGroup.d.ts +1 -1
- package/dist/types/components/panel/PanelStack.d.ts +1 -1
- package/dist/types/components/progress/ProgressBar.d.ts +1 -1
- package/dist/types/components/progress/ProgressCircle.d.ts +1 -1
- package/dist/types/components/tabpanel/Tab.d.ts +1 -1
- package/dist/types/components/tabpanel/TabPanel.d.ts +1 -1
- package/dist/types/context/Global.d.ts +0 -82
- package/dist/types/context/context.d.ts +85 -0
- package/dist/types/core/aside/Aside.d.ts +2 -2
- package/dist/types/core/responsive/Responsive.d.ts +5 -1
- package/dist/types/core/theme/ThemeProvider.d.ts +2 -2
- package/dist/types/hooks/useContextMenu.d.ts +10 -0
- package/dist/types/hooks/useOverlayService.d.ts +3 -5
- package/dist/types/hotkeys/HotKeyWrapper.d.ts +0 -9
- package/dist/types/hotkeys/context.d.ts +9 -0
- package/dist/types/index.d.ts +4 -2
- package/dist/types/overlays/alert/Alert.d.ts +2 -2
- package/dist/types/overlays/flyout/Flyout.d.ts +2 -2
- package/dist/types/overlays/message/Message.d.ts +2 -2
- package/dist/types/overlays/modal/Modal.d.ts +2 -2
- package/dist/types/overlays/toast/Toast.d.ts +2 -2
- package/dist/types/overlays/tooltip/Tooltip.d.ts +0 -3
- package/dist/types/types/index.d.ts +2 -2
- package/dist/types/typography/Abbr.d.ts +4 -8
- package/dist/types/typography/Anchor.d.ts +1 -1
- package/dist/types/typography/Copy.d.ts +1 -1
- package/dist/types/typography/Mark.d.ts +2 -2
- package/dist/types/typography/Text.d.ts +1 -1
- package/dist/types/typography/Title.d.ts +1 -1
- package/dist/types/utils/getBadgeProps.d.ts +9 -0
- package/dist/types/utils/getIconProps.d.ts +2 -0
- package/dist/types/utils/getTooltipProps.d.ts +4 -0
- package/dist/types/utils/index.d.ts +3 -0
- package/package.json +14 -15
- package/src/components/actionLabel/ActionLabel.tsx +1 -1
- package/src/components/animations/Animations.tsx +6 -6
- package/src/components/avatar/Avatar.tsx +1 -1
- package/src/components/avatar/AvatarGroup.tsx +1 -1
- package/src/components/badge/Badge.tsx +8 -46
- package/src/components/breadcrumbs/Breadcrumbs.tsx +1 -1
- package/src/components/button/Button.tsx +24 -52
- package/src/components/button/ButtonGroup.tsx +1 -1
- package/src/components/button/ConfirmButton.tsx +23 -20
- package/src/components/button/ToggleButtonGroup.tsx +1 -1
- package/src/components/callout/Callout.tsx +14 -19
- package/src/components/card/Card.tsx +9 -11
- package/src/components/card/CardCover.tsx +1 -1
- package/src/components/card/FlipContent.tsx +2 -2
- package/src/components/chip/Chip.tsx +16 -33
- package/src/components/collapsable/Collapsable.tsx +2 -2
- package/src/components/divider/Divider.tsx +1 -1
- package/src/components/dropdown/Dropdown.tsx +60 -73
- package/src/components/dropdown/DropdownTool.tsx +1 -1
- package/src/components/empty/EmptyContent.tsx +3 -3
- package/src/components/icon/Icon.tsx +27 -54
- package/src/components/index.ts +5 -4
- package/src/components/media/Media.tsx +3 -3
- package/src/components/menu/ContextMenu.tsx +30 -30
- package/src/components/menu/Menu.tsx +35 -63
- package/src/components/menu/MenuItem.tsx +9 -28
- package/src/components/menu/types.ts +6 -1
- package/src/components/meter/Meter.tsx +1 -1
- package/src/components/navigator/Navigator.tsx +13 -11
- package/src/components/panel/Panel.tsx +13 -54
- package/src/components/panel/PanelGroup.tsx +3 -4
- package/src/components/panel/PanelStack.tsx +20 -25
- package/src/components/progress/ProgressBar.tsx +2 -2
- package/src/components/progress/ProgressCircle.tsx +2 -2
- package/src/components/tabpanel/Tab.tsx +9 -28
- package/src/components/tabpanel/TabPanel.tsx +13 -15
- package/src/context/Global.tsx +18 -125
- package/src/context/NotificationCenter.tsx +0 -1
- package/src/context/context.ts +100 -0
- package/src/core/aside/Aside.tsx +18 -55
- package/src/core/boundary/ErrorBoundary.tsx +8 -37
- package/src/core/page/Page.tsx +3 -5
- package/src/core/responsive/Responsive.tsx +10 -34
- package/src/core/theme/ThemeProvider.tsx +5 -8
- package/src/core/viewport/Viewport.tsx +1 -1
- package/src/hooks/useContextMenu.tsx +131 -0
- package/src/hooks/useIsDark.ts +7 -5
- package/src/hooks/useNavigator.tsx +8 -12
- package/src/hooks/useOverlayService.tsx +22 -17
- package/src/hooks/usePropToggle.ts +3 -3
- package/src/hooks/useResize.ts +14 -17
- package/src/hooks/useResizeObserver.ts +21 -21
- package/src/hooks/useStepper.tsx +1 -1
- package/src/hotkeys/HotKey.tsx +1 -1
- package/src/hotkeys/HotKeyWrapper.tsx +81 -105
- package/src/hotkeys/commons.ts +2 -0
- package/src/hotkeys/context.ts +32 -0
- package/src/i18n/index.ts +2 -2
- package/src/index.ts +4 -7
- package/src/overlays/alert/Alert.tsx +12 -16
- package/src/overlays/flyout/Flyout.tsx +32 -69
- package/src/overlays/message/Message.tsx +11 -15
- package/src/overlays/modal/Modal.tsx +23 -57
- package/src/overlays/toast/Toast.tsx +16 -15
- package/src/overlays/tooltip/Tooltip.tsx +6 -29
- package/src/types/global.d.ts +12 -0
- package/src/types/index.ts +2 -2
- package/src/typography/Abbr.tsx +11 -39
- package/src/typography/Anchor.tsx +1 -1
- package/src/typography/Copy.tsx +4 -4
- package/src/typography/Mark.tsx +2 -3
- package/src/typography/Text.tsx +8 -6
- package/src/typography/Title.tsx +1 -1
- package/src/utils/getBadgeProps.ts +45 -0
- package/src/utils/getIconProps.ts +35 -0
- package/src/utils/getTooltipProps.ts +38 -0
- package/src/utils/index.ts +3 -0
- /package/dist/cjs/i18n/{ar.json.js → ar/core.json.js} +0 -0
- /package/dist/cjs/i18n/{en.json.js → en/core.json.js} +0 -0
- /package/dist/esm/i18n/{ar.json.js → ar/core.json.js} +0 -0
- /package/dist/esm/i18n/{en.json.js → en/core.json.js} +0 -0
- /package/src/i18n/{ar.json → ar/core.json} +0 -0
- /package/src/i18n/{en.json → en/core.json} +0 -0
package/css/theme/_utilities.css
CHANGED
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
@variant dark (&:where([data-color-scheme="dark"], [data-color-scheme="dark"] *));
|
|
41
41
|
|
|
42
42
|
@utility area-* {
|
|
43
|
-
grid-area: --value([
|
|
43
|
+
grid-area: --value([*]);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
@utility area-content {
|
|
@@ -93,20 +93,6 @@
|
|
|
93
93
|
font-variant: small-caps;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
@utility scroll-hide {
|
|
97
|
-
&::-webkit-scrollbar {
|
|
98
|
-
width: 0;
|
|
99
|
-
height: 0;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
@utility scroll-thin {
|
|
104
|
-
&::-webkit-scrollbar {
|
|
105
|
-
width: 3px;
|
|
106
|
-
height: 3px;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
96
|
@utility sectioned {
|
|
111
97
|
display: grid;
|
|
112
98
|
grid-template: "head head head" auto "side-s content side-e" 1fr "foot foot foot" auto / auto 1fr auto;
|
|
@@ -115,7 +101,7 @@
|
|
|
115
101
|
@utility scroll-snap-start {
|
|
116
102
|
scroll-snap-type: both proximity;
|
|
117
103
|
|
|
118
|
-
|
|
104
|
+
> * {
|
|
119
105
|
scroll-snap-align: start;
|
|
120
106
|
}
|
|
121
107
|
}
|
|
@@ -123,7 +109,7 @@
|
|
|
123
109
|
@utility scroll-snap-center {
|
|
124
110
|
scroll-snap-type: both proximity;
|
|
125
111
|
|
|
126
|
-
|
|
112
|
+
> * {
|
|
127
113
|
scroll-snap-align: center;
|
|
128
114
|
}
|
|
129
115
|
}
|
|
@@ -131,13 +117,13 @@
|
|
|
131
117
|
@utility scroll-snap-end {
|
|
132
118
|
scroll-snap-type: both proximity;
|
|
133
119
|
|
|
134
|
-
|
|
120
|
+
> * {
|
|
135
121
|
scroll-snap-align: end;
|
|
136
122
|
}
|
|
137
123
|
}
|
|
138
124
|
|
|
139
125
|
@utility break-words {
|
|
140
|
-
word-break: break
|
|
126
|
+
word-break: word-break;
|
|
141
127
|
}
|
|
142
128
|
|
|
143
129
|
@utility outline-thin {
|
|
@@ -152,46 +138,30 @@
|
|
|
152
138
|
color: var(--color-accent-600);
|
|
153
139
|
text-decoration: underline dotted;
|
|
154
140
|
|
|
155
|
-
|
|
141
|
+
:hover {
|
|
156
142
|
text-decoration: underline solid;
|
|
157
143
|
}
|
|
158
144
|
}
|
|
159
145
|
|
|
160
146
|
@utility bg-odd {
|
|
161
|
-
background-color: color-mix(
|
|
162
|
-
in oklab,
|
|
163
|
-
var(--fabric-bg) 99%,
|
|
164
|
-
var(--color-tint)
|
|
165
|
-
);
|
|
147
|
+
background-color: color-mix(in oklab, var(--fabric-bg) 99%, var(--color-tint));
|
|
166
148
|
}
|
|
167
149
|
|
|
168
150
|
@utility bg-even {
|
|
169
|
-
background-color: color-mix(
|
|
170
|
-
in oklab,
|
|
171
|
-
var(--fabric-bg) 92%,
|
|
172
|
-
var(--color-tint)
|
|
173
|
-
);
|
|
151
|
+
background-color: color-mix(in oklab, var(--fabric-bg) 92%, var(--color-tint));
|
|
174
152
|
}
|
|
175
153
|
|
|
176
154
|
@utility bg-alternate {
|
|
177
|
-
|
|
178
|
-
background-color: color-mix(
|
|
179
|
-
in oklab,
|
|
180
|
-
var(--fabric-bg) 92%,
|
|
181
|
-
var(--color-tint)
|
|
182
|
-
);
|
|
155
|
+
> :nth-child(even) {
|
|
156
|
+
background-color: color-mix(in oklab, var(--fabric-bg) 92%, var(--color-tint));
|
|
183
157
|
}
|
|
184
158
|
|
|
185
|
-
|
|
186
|
-
background-color: color-mix(
|
|
187
|
-
in oklab,
|
|
188
|
-
var(--fabric-bg) 99%,
|
|
189
|
-
var(--color-tint)
|
|
190
|
-
);
|
|
159
|
+
> :nth-child(odd) {
|
|
160
|
+
background-color: color-mix(in oklab, var(--fabric-bg) 99%, var(--color-tint));
|
|
191
161
|
}
|
|
192
162
|
}
|
|
193
163
|
|
|
194
|
-
@utility bg-
|
|
164
|
+
@utility bg-default {
|
|
195
165
|
background-color: var(--bg-color-base);
|
|
196
166
|
}
|
|
197
167
|
|
|
@@ -223,7 +193,7 @@
|
|
|
223
193
|
background-color: var(--bg-color-invert);
|
|
224
194
|
}
|
|
225
195
|
|
|
226
|
-
@utility text-
|
|
196
|
+
@utility text-default {
|
|
227
197
|
color: var(--text-color-base);
|
|
228
198
|
}
|
|
229
199
|
|
|
@@ -251,20 +221,20 @@
|
|
|
251
221
|
color: var(--text-color-invert);
|
|
252
222
|
}
|
|
253
223
|
|
|
254
|
-
@utility border-
|
|
224
|
+
@utility border-default {
|
|
255
225
|
border-color: var(--border-color-base);
|
|
256
226
|
}
|
|
257
227
|
|
|
258
|
-
@utility border-
|
|
259
|
-
border-color: var(--border-color-
|
|
228
|
+
@utility border-bright {
|
|
229
|
+
border-color: var(--border-color-bright);
|
|
260
230
|
}
|
|
261
231
|
|
|
262
|
-
@utility border-
|
|
263
|
-
border-color: var(--border-color-
|
|
232
|
+
@utility border-soft {
|
|
233
|
+
border-color: var(--border-color-soft);
|
|
264
234
|
}
|
|
265
235
|
|
|
266
236
|
@utility border-gray {
|
|
267
|
-
border-color: var(--color-
|
|
237
|
+
border-color: var(--border-color-gray);
|
|
268
238
|
}
|
|
269
239
|
|
|
270
240
|
@utility border-dark {
|
|
@@ -275,16 +245,16 @@
|
|
|
275
245
|
border-color: var(--border-color-light);
|
|
276
246
|
}
|
|
277
247
|
|
|
278
|
-
@utility outline-
|
|
248
|
+
@utility outline-default {
|
|
279
249
|
outline-color: var(--border-color-base);
|
|
280
250
|
}
|
|
281
251
|
|
|
282
|
-
@utility outline-
|
|
283
|
-
outline-color: var(--border-color-
|
|
252
|
+
@utility outline-bright {
|
|
253
|
+
outline-color: var(--border-color-bright);
|
|
284
254
|
}
|
|
285
255
|
|
|
286
|
-
@utility outline-
|
|
287
|
-
outline-color: var(--border-color-
|
|
256
|
+
@utility outline-soft {
|
|
257
|
+
outline-color: var(--border-color-soft);
|
|
288
258
|
}
|
|
289
259
|
|
|
290
260
|
@utility outline-gray {
|
|
@@ -299,16 +269,16 @@
|
|
|
299
269
|
outline-color: var(--border-color-light);
|
|
300
270
|
}
|
|
301
271
|
|
|
302
|
-
@utility stroke-
|
|
272
|
+
@utility stroke-default {
|
|
303
273
|
stroke: var(--border-color-base);
|
|
304
274
|
}
|
|
305
275
|
|
|
306
|
-
@utility stroke-
|
|
307
|
-
stroke: var(--border-color-
|
|
276
|
+
@utility stroke-bright {
|
|
277
|
+
stroke: var(--border-color-bright);
|
|
308
278
|
}
|
|
309
279
|
|
|
310
|
-
@utility stroke-
|
|
311
|
-
stroke: var(--border-color-
|
|
280
|
+
@utility stroke-soft {
|
|
281
|
+
stroke: var(--border-color-soft);
|
|
312
282
|
}
|
|
313
283
|
|
|
314
284
|
@utility stroke-gray {
|
|
@@ -323,7 +293,7 @@
|
|
|
323
293
|
stroke: var(--border-color-light);
|
|
324
294
|
}
|
|
325
295
|
|
|
326
|
-
@utility fill-
|
|
296
|
+
@utility fill-default {
|
|
327
297
|
fill: var(--bg-color-base);
|
|
328
298
|
}
|
|
329
299
|
|
|
@@ -351,12 +321,8 @@
|
|
|
351
321
|
fill: var(--bg-color-invert);
|
|
352
322
|
}
|
|
353
323
|
|
|
354
|
-
@utility
|
|
355
|
-
|
|
356
|
-
--gutter: calc(var(--spacing) * --value(integer));
|
|
357
|
-
|
|
358
|
-
gap: 0 !important;
|
|
359
|
-
}
|
|
324
|
+
@utility gutter-* {
|
|
325
|
+
--gutter: calc(var(--spacing) * --value(integer));
|
|
360
326
|
}
|
|
361
327
|
|
|
362
328
|
@utility span-* {
|
|
@@ -364,178 +330,90 @@
|
|
|
364
330
|
}
|
|
365
331
|
|
|
366
332
|
@utility grid-cols-repeat-* {
|
|
367
|
-
grid-template-columns: repeat(
|
|
368
|
-
|
|
369
|
-
minmax(min(--value([ *]), 100%), 1fr)
|
|
370
|
-
);
|
|
371
|
-
grid-template-columns: repeat(
|
|
372
|
-
auto-fill,
|
|
373
|
-
minmax(min(calc(var(--spacing) * --value(integer)), 100%), 1fr)
|
|
374
|
-
);
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
@media (min-width: theme(screens.xs)) {
|
|
378
|
-
.hide-xs {
|
|
379
|
-
@apply hidden;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
@media (max-width: theme(screens.sm)) {
|
|
383
|
-
.hide-xs-only {
|
|
384
|
-
@apply hidden;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
.show-sm-only,
|
|
388
|
-
.show-md-only,
|
|
389
|
-
.show-lg-only,
|
|
390
|
-
.show-xl-only,
|
|
391
|
-
.show-2xl-only {
|
|
392
|
-
@apply hidden;
|
|
393
|
-
}
|
|
394
|
-
}
|
|
333
|
+
grid-template-columns: repeat(auto-fill, minmax(min(--value([*]), 100%), 1fr));
|
|
334
|
+
grid-template-columns: repeat(auto-fill, minmax(min(calc(var(--spacing) * --value(integer)), 100%), 1fr));
|
|
395
335
|
}
|
|
396
336
|
|
|
397
|
-
@media (
|
|
398
|
-
.hide-sm {
|
|
399
|
-
@apply hidden;
|
|
400
|
-
}
|
|
337
|
+
@variant not-2xs (@media (width >= theme(--breakpoint-xs)));
|
|
401
338
|
|
|
402
|
-
|
|
403
|
-
.hide-sm-only {
|
|
404
|
-
@apply hidden;
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
.show-xs-only,
|
|
408
|
-
.show-md-only,
|
|
409
|
-
.show-lg-only,
|
|
410
|
-
.show-xl-only,
|
|
411
|
-
.show-2xl-only {
|
|
412
|
-
@apply hidden;
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
}
|
|
339
|
+
@variant not-xs (@media ((width < theme(--breakpoint-xs)) or (width >= theme(--breakpoint-sm))));
|
|
416
340
|
|
|
417
|
-
@media (
|
|
418
|
-
.hide-md {
|
|
419
|
-
@apply hidden;
|
|
420
|
-
}
|
|
341
|
+
@variant not-sm (@media ((width < theme(--breakpoint-sm)) or (width >= theme(--breakpoint-md))));
|
|
421
342
|
|
|
422
|
-
|
|
423
|
-
.hide-md-only {
|
|
424
|
-
@apply hidden;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
.show-xs-only,
|
|
428
|
-
.show-sm-only,
|
|
429
|
-
.show-lg-only,
|
|
430
|
-
.show-xl-only,
|
|
431
|
-
.show-2xl-only {
|
|
432
|
-
@apply hidden;
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
}
|
|
343
|
+
@variant not-md (@media ((width < theme(--breakpoint-md)) or (width >= theme(--breakpoint-lg))));
|
|
436
344
|
|
|
437
|
-
@media (
|
|
438
|
-
.hide-lg {
|
|
439
|
-
@apply hidden;
|
|
440
|
-
}
|
|
345
|
+
@variant not-lg (@media ((width < theme(--breakpoint-lg)) or (width >= theme(--breakpoint-xl))));
|
|
441
346
|
|
|
442
|
-
|
|
443
|
-
.hide-lg-only {
|
|
444
|
-
@apply hidden;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
.show-xs-only,
|
|
448
|
-
.show-sm-only,
|
|
449
|
-
.show-md-only,
|
|
450
|
-
.show-xl-only,
|
|
451
|
-
.show-2xl-only {
|
|
452
|
-
@apply hidden;
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
}
|
|
347
|
+
@variant not-xl (@media ((width < theme(--breakpoint-xl)) or (width >= theme(--breakpoint-2xl))));
|
|
456
348
|
|
|
457
|
-
@media (
|
|
458
|
-
.hide-xl {
|
|
459
|
-
@apply hidden;
|
|
460
|
-
}
|
|
349
|
+
@variant not-2xl (@media (width < theme(--breakpoint-2xl)));
|
|
461
350
|
|
|
462
|
-
|
|
463
|
-
.hide-xl-only {
|
|
464
|
-
@apply hidden;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
.show-xs-only,
|
|
468
|
-
.show-sm-only,
|
|
469
|
-
.show-md-only,
|
|
470
|
-
.show-lg-only,
|
|
471
|
-
.show-2xl-only {
|
|
472
|
-
@apply hidden;
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
}
|
|
351
|
+
@variant only-2xs (@media ((width >= 0) and (width < theme(--breakpoint-xs))));
|
|
476
352
|
|
|
477
|
-
@media (
|
|
478
|
-
.hide-2xl,
|
|
479
|
-
.hide-2xl-only {
|
|
480
|
-
@apply hidden;
|
|
481
|
-
}
|
|
353
|
+
@variant only-xs (@media ((width >= theme(--breakpoint-xs)) and (width < theme(--breakpoint-sm))));
|
|
482
354
|
|
|
483
|
-
|
|
484
|
-
.show-sm-only,
|
|
485
|
-
.show-md-only,
|
|
486
|
-
.show-lg-only,
|
|
487
|
-
.show-xl-only {
|
|
488
|
-
@apply hidden;
|
|
489
|
-
}
|
|
490
|
-
}
|
|
355
|
+
@variant only-sm (@media ((width >= theme(--breakpoint-sm)) and (width < theme(--breakpoint-md))));
|
|
491
356
|
|
|
492
|
-
@media (
|
|
493
|
-
.show-xs,
|
|
494
|
-
.show-sm,
|
|
495
|
-
.show-md,
|
|
496
|
-
.show-lg,
|
|
497
|
-
.show-xl,
|
|
498
|
-
.show-2xl {
|
|
499
|
-
@apply hidden;
|
|
500
|
-
}
|
|
501
|
-
}
|
|
357
|
+
@variant only-md (@media ((width >= theme(--breakpoint-md)) and (width < theme(--breakpoint-lg))));
|
|
502
358
|
|
|
503
|
-
@media (
|
|
504
|
-
.show-sm,
|
|
505
|
-
.show-md,
|
|
506
|
-
.show-lg,
|
|
507
|
-
.show-xl,
|
|
508
|
-
.show-2xl {
|
|
509
|
-
@apply hidden;
|
|
510
|
-
}
|
|
511
|
-
}
|
|
359
|
+
@variant only-lg (@media ((width >= theme(--breakpoint-lg)) and (width < theme(--breakpoint-xl))));
|
|
512
360
|
|
|
513
|
-
@media (
|
|
514
|
-
.show-md,
|
|
515
|
-
.show-lg,
|
|
516
|
-
.show-xl,
|
|
517
|
-
.show-2xl {
|
|
518
|
-
@apply hidden;
|
|
519
|
-
}
|
|
520
|
-
}
|
|
361
|
+
@variant only-xl (@media ((width >= theme(--breakpoint-xl)) and (width < theme(--breakpoint-2xl))));
|
|
521
362
|
|
|
522
|
-
@media (
|
|
523
|
-
.show-lg,
|
|
524
|
-
.show-xl,
|
|
525
|
-
.show-2xl {
|
|
526
|
-
@apply hidden;
|
|
527
|
-
}
|
|
528
|
-
}
|
|
363
|
+
@variant only-2xl (@media (width >= theme(--breakpoint-2xl)));
|
|
529
364
|
|
|
530
|
-
@
|
|
531
|
-
.show-xl,
|
|
532
|
-
.show-2xl {
|
|
533
|
-
@apply hidden;
|
|
534
|
-
}
|
|
535
|
-
}
|
|
365
|
+
@variant @not-4xs (@container (width >= theme(--container-3xs)));
|
|
536
366
|
|
|
537
|
-
@
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
367
|
+
@variant @not-3xs (@container ((width < theme(--container-3xs)) or (width >= theme(--container-2xs))));
|
|
368
|
+
|
|
369
|
+
@variant @not-2xs (@container ((width < theme(--container-2xs)) or (width >= theme(--container-xs))));
|
|
370
|
+
|
|
371
|
+
@variant @not-xs (@container ((width < theme(--container-xs)) or (width >= theme(--container-sm))));
|
|
372
|
+
|
|
373
|
+
@variant @not-sm (@container ((width < theme(--container-sm)) or (width >= theme(--container-md))));
|
|
374
|
+
|
|
375
|
+
@variant @not-md (@container ((width < theme(--container-md)) or (width >= theme(--container-lg))));
|
|
376
|
+
|
|
377
|
+
@variant @not-lg (@container ((width < theme(--container-lg)) or (width >= theme(--container-xl))));
|
|
378
|
+
|
|
379
|
+
@variant @not-xl (@container ((width < theme(--container-xl)) or (width >= theme(--container-2xl))));
|
|
380
|
+
|
|
381
|
+
@variant @not-2xl (@container ((width < theme(--container-2xl)) or (width >= theme(--container-3xl))));
|
|
382
|
+
|
|
383
|
+
@variant @not-3xl (@container ((width < theme(--container-3xl)) or (width >= theme(--container-4xl))));
|
|
384
|
+
|
|
385
|
+
@variant @not-4xl (@container ((width < theme(--container-4xl)) or (width >= theme(--container-5xl))));
|
|
386
|
+
|
|
387
|
+
@variant @not-5xl (@container ((width < theme(--container-5xl)) or (width >= theme(--container-6xl))));
|
|
388
|
+
|
|
389
|
+
@variant @not-6xl (@container ((width < theme(--container-6xl)) or (width >= theme(--container-7xl))));
|
|
390
|
+
|
|
391
|
+
@variant @not-7xl (@container (width < theme(--container-7xl)));
|
|
392
|
+
|
|
393
|
+
@variant @only-4xs (@container ((width >= 0) and (width < theme(--container-3xs))));
|
|
394
|
+
|
|
395
|
+
@variant @only-3xs (@container ((width >= theme(--container-3xs)) and (width < theme(--container-2xs))));
|
|
396
|
+
|
|
397
|
+
@variant @only-2xs (@container ((width >= theme(--container-2xs)) and (width < theme(--container-xs))));
|
|
398
|
+
|
|
399
|
+
@variant @only-xs (@container ((width >= theme(--container-xs)) and (width < theme(--container-sm))));
|
|
400
|
+
|
|
401
|
+
@variant @only-sm (@container ((width >= theme(--container-sm)) and (width < theme(--container-md))));
|
|
402
|
+
|
|
403
|
+
@variant @only-md (@container ((width >= theme(--container-md)) and (width < theme(--container-lg))));
|
|
404
|
+
|
|
405
|
+
@variant @only-lg (@container ((width >= theme(--container-lg)) and (width < theme(--container-xl))));
|
|
406
|
+
|
|
407
|
+
@variant @only-xl (@container ((width >= theme(--container-xl)) and (width < theme(--container-2xl))));
|
|
408
|
+
|
|
409
|
+
@variant @only-2xl (@container ((width >= theme(--container-2xl)) and (width < theme(--container-3xl))));
|
|
410
|
+
|
|
411
|
+
@variant @only-3xl (@container ((width >= theme(--container-3xl)) and (width < theme(--container-4xl))));
|
|
412
|
+
|
|
413
|
+
@variant @only-4xl (@container ((width >= theme(--container-4xl)) and (width < theme(--container-5xl))));
|
|
414
|
+
|
|
415
|
+
@variant @only-5xl (@container ((width >= theme(--container-5xl)) and (width < theme(--container-6xl))));
|
|
416
|
+
|
|
417
|
+
@variant @only-6xl (@container ((width >= theme(--container-6xl)) and (width < theme(--container-7xl))));
|
|
418
|
+
|
|
419
|
+
@variant @only-7xl (@container (width >= theme(--container-7xl)));
|
package/css/theme/index.css
CHANGED
|
@@ -25,12 +25,10 @@
|
|
|
25
25
|
@import "./_utilities.css";
|
|
26
26
|
|
|
27
27
|
@theme static {
|
|
28
|
-
--font-sans:
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
--font-
|
|
32
|
-
--font-mono: "Noto Sans Mono", Menlo, Monaco, Consolas, "Liberation Mono",
|
|
33
|
-
"Courier New", monospace;
|
|
28
|
+
--font-sans:
|
|
29
|
+
"Noto Sans Kufi Arabic", "Noto Sans", "Noto Color Emoji", Arial, sans-serif;
|
|
30
|
+
--font-serif: "Noto Serif", Times, serif;
|
|
31
|
+
--font-mono: "Noto Sans Mono", Menlo, Monaco, Consolas, monospace;
|
|
34
32
|
}
|
|
35
33
|
|
|
36
34
|
@theme static {
|
|
@@ -19,7 +19,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
19
19
|
* It supports custom alignment, disabled states, and can be easily styled with additional CSS classes.
|
|
20
20
|
*
|
|
21
21
|
* @param {ActionLabelProps} props - The properties for the ActionLabel component.
|
|
22
|
-
* @returns {
|
|
22
|
+
* @returns {React.ReactElement} The rendered ActionLabel component.
|
|
23
23
|
*
|
|
24
24
|
* @example
|
|
25
25
|
* ```jsx
|
|
@@ -6,8 +6,8 @@ var classNames = require('classnames');
|
|
|
6
6
|
var react = require('react');
|
|
7
7
|
var useEffectDebugger = require('../../hooks/useEffectDebugger.js');
|
|
8
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
-
var getColor = require('../../utils/getColor.js');
|
|
10
9
|
require('@react-fabric/utilities');
|
|
10
|
+
var getColor = require('../../utils/getColor.js');
|
|
11
11
|
|
|
12
12
|
var _excluded = ["className", "color", "strokeColor", "type"],
|
|
13
13
|
_excluded2 = ["className"];
|
|
@@ -20,7 +20,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
20
20
|
* It also allows customization of the icon color and stroke color.
|
|
21
21
|
*
|
|
22
22
|
* @param {AnimationProps} props - The properties for the AnimationIndicator component.
|
|
23
|
-
* @returns {
|
|
23
|
+
* @returns {React.ReactElement} The rendered AnimationIndicator component.
|
|
24
24
|
*
|
|
25
25
|
* @example
|
|
26
26
|
* ```jsx
|
|
@@ -91,7 +91,7 @@ var AnimationIndicator = function AnimationIndicator(_ref) {
|
|
|
91
91
|
* @param {number | string} [props.size="2rem"] - The size of the loader icon.
|
|
92
92
|
* @param {string} props.icon - The icon to be displayed as the loader.
|
|
93
93
|
* @param {"sm" | "md" | "lg"} [props.maskBlur] - The blur effect for the background mask.
|
|
94
|
-
* @returns {
|
|
94
|
+
* @returns {React.ReactElement} The rendered AnimationLoader component.
|
|
95
95
|
*/
|
|
96
96
|
var AnimationLoader = function AnimationLoader(_ref2) {
|
|
97
97
|
var _ref2$color = _ref2.color,
|
|
@@ -123,7 +123,7 @@ var AnimationLoader = function AnimationLoader(_ref2) {
|
|
|
123
123
|
* @param {Object} props - The properties for the LoadingBars component.
|
|
124
124
|
* @param {ColorType | PaletteType | string} [props.color="tint-500"] - The color of the bars.
|
|
125
125
|
* @param {number | string} [props.size="2rem"] - The size of the bars.
|
|
126
|
-
* @returns {
|
|
126
|
+
* @returns {React.ReactElement} The rendered LoadingBars component.
|
|
127
127
|
*
|
|
128
128
|
* @example
|
|
129
129
|
* ```jsx
|
|
@@ -146,7 +146,7 @@ var LoadingBars = function LoadingBars(props) {
|
|
|
146
146
|
* @param {Object} props - The properties for the LoadingSpinner component.
|
|
147
147
|
* @param {ColorType | PaletteType | string} [props.color="tint-700"] - The color of the spinner.
|
|
148
148
|
* @param {number | string} [props.size="2rem"] - The size of the spinner.
|
|
149
|
-
* @returns {
|
|
149
|
+
* @returns {React.ReactElement} The rendered LoadingSpinner component.
|
|
150
150
|
*
|
|
151
151
|
* @example
|
|
152
152
|
* ```jsx
|
|
@@ -168,7 +168,7 @@ var LoadingSpinner = function LoadingSpinner(props) {
|
|
|
168
168
|
* providing a visual placeholder for content that is being loaded.
|
|
169
169
|
*
|
|
170
170
|
* @param {CssProp} props - The properties for the Skeleton component.
|
|
171
|
-
* @returns {
|
|
171
|
+
* @returns {React.ReactElement} The rendered Skeleton component.
|
|
172
172
|
*
|
|
173
173
|
* @example
|
|
174
174
|
* ```jsx
|
|
@@ -214,7 +214,7 @@ var Skeleton = function Skeleton(_ref3) {
|
|
|
214
214
|
* A component that displays a loading animation with a top border.
|
|
215
215
|
* It is typically used to indicate that content is being loaded in pages and page sections.
|
|
216
216
|
*
|
|
217
|
-
* @returns {
|
|
217
|
+
* @returns {React.ReactElement} The rendered Loading component.
|
|
218
218
|
*/
|
|
219
219
|
var LoadingLine = function LoadingLine() {
|
|
220
220
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
@@ -29,7 +29,7 @@ var SizeMap = {
|
|
|
29
29
|
* It uses the Boring Avatars library for generating fallback avatars based on the user's name.
|
|
30
30
|
*
|
|
31
31
|
* @param {AvatarProps} props - The properties for the Avatar component.
|
|
32
|
-
* @returns {
|
|
32
|
+
* @returns {React.ReactElement} The rendered Avatar component.
|
|
33
33
|
*
|
|
34
34
|
* @example
|
|
35
35
|
* ```jsx
|
|
@@ -25,7 +25,7 @@ var SizeMap = {
|
|
|
25
25
|
* It automatically calculates the number of additional avatars based on the `totalCount` prop and the number of children provided.
|
|
26
26
|
*
|
|
27
27
|
* @param {AvatarGroupProps} props - The properties for the AvatarGroup component.
|
|
28
|
-
* @returns {
|
|
28
|
+
* @returns {React.ReactElement} The rendered AvatarGroup component.
|
|
29
29
|
*
|
|
30
30
|
* @example
|
|
31
31
|
* ```jsx
|
|
@@ -5,34 +5,13 @@ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProp
|
|
|
5
5
|
var utilities = require('@react-fabric/utilities');
|
|
6
6
|
var classNames = require('classnames');
|
|
7
7
|
var react = require('react');
|
|
8
|
-
var Icon = require('../icon/Icon.js');
|
|
9
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
+
var getIconProps = require('../../utils/getIconProps.js');
|
|
10
|
+
var Icon = require('../icon/Icon.js');
|
|
10
11
|
|
|
11
12
|
var _excluded = ["ref", "className", "value", "max", "ping", "block", "inline", "placement", "children", "forButton", "icon"];
|
|
12
13
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
14
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14
|
-
/**
|
|
15
|
-
* Utility function to get badge properties from a badge value or object.
|
|
16
|
-
* It checks if the badge is an object and returns its properties,
|
|
17
|
-
*
|
|
18
|
-
* @param {string | number | BadgeType} badge - The badge value or object.
|
|
19
|
-
* @returns {AnyObject} An object containing badge properties.
|
|
20
|
-
*/
|
|
21
|
-
var getBadgeProps = function getBadgeProps(badge) {
|
|
22
|
-
if (utilities.isObject(badge) && ! /*#__PURE__*/react.isValidElement(badge)) {
|
|
23
|
-
return Object.assign({
|
|
24
|
-
forButton: true,
|
|
25
|
-
placement: ""
|
|
26
|
-
}, badge);
|
|
27
|
-
} else {
|
|
28
|
-
return {
|
|
29
|
-
value: badge,
|
|
30
|
-
forButton: true,
|
|
31
|
-
placement: ""
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
|
|
36
15
|
/**
|
|
37
16
|
* A component that displays a badge with a value, icon, and optional ping animation.
|
|
38
17
|
* It can be used to indicate notifications, messages, or other important information.
|
|
@@ -40,7 +19,7 @@ var getBadgeProps = function getBadgeProps(badge) {
|
|
|
40
19
|
* It can also wrap children elements, allowing for flexible usage in buttons or other components.
|
|
41
20
|
*
|
|
42
21
|
* @param {BadgeProps} props - The properties for the Badge component.
|
|
43
|
-
* @returns {
|
|
22
|
+
* @returns {React.ReactElement} The rendered Badge component.
|
|
44
23
|
*
|
|
45
24
|
* @example
|
|
46
25
|
* ```jsx
|
|
@@ -67,7 +46,7 @@ var Badge = function Badge(_ref) {
|
|
|
67
46
|
icon = _ref.icon,
|
|
68
47
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
69
48
|
var label = react.useMemo(function () {
|
|
70
|
-
if (
|
|
49
|
+
if (/*#__PURE__*/react.isValidElement(value)) {
|
|
71
50
|
return value;
|
|
72
51
|
}
|
|
73
52
|
if (!utilities.isNil(value)) {
|
|
@@ -96,10 +75,9 @@ var Badge = function Badge(_ref) {
|
|
|
96
75
|
children: [label && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
97
76
|
className: "p-1",
|
|
98
77
|
children: label
|
|
99
|
-
}), icon && /*#__PURE__*/jsxRuntime.jsx(Icon.Icon, _objectSpread({},
|
|
78
|
+
}), icon && /*#__PURE__*/jsxRuntime.jsx(Icon.Icon, _objectSpread({}, getIconProps.getIconProps(icon)))]
|
|
100
79
|
})]
|
|
101
80
|
});
|
|
102
81
|
};
|
|
103
82
|
|
|
104
83
|
exports.Badge = Badge;
|
|
105
|
-
exports.getBadgeProps = getBadgeProps;
|
|
@@ -19,7 +19,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
19
19
|
* It automatically manages the display of overflow items when there are too many links to fit in the available space, providing a dropdown for additional links.
|
|
20
20
|
*
|
|
21
21
|
* @param {BreadcrumbProps} props - The properties for the Breadcrumbs component.
|
|
22
|
-
* @returns {
|
|
22
|
+
* @returns {React.ReactElement} The rendered Breadcrumbs component.
|
|
23
23
|
*
|
|
24
24
|
* @example
|
|
25
25
|
* ```jsx
|