@robr0/design-system 0.1.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/LICENSE +21 -0
- package/README.md +127 -0
- package/charts.d.ts +14 -0
- package/charts.js +20 -0
- package/components/Accordion/Accordion.css +119 -0
- package/components/Accordion/Accordion.d.ts +24 -0
- package/components/Accordion/Accordion.js +76 -0
- package/components/Alert/Alert.css +252 -0
- package/components/Alert/Alert.d.ts +24 -0
- package/components/Alert/Alert.js +53 -0
- package/components/AlertDialog/AlertDialog.css +131 -0
- package/components/AlertDialog/AlertDialog.d.ts +29 -0
- package/components/AlertDialog/AlertDialog.js +143 -0
- package/components/AppLayout/AppLayout.css +52 -0
- package/components/AppLayout/AppLayout.d.ts +27 -0
- package/components/AppLayout/AppLayout.js +45 -0
- package/components/AppSidebar/AppSidebar.css +434 -0
- package/components/AppSidebar/AppSidebar.d.ts +67 -0
- package/components/AppSidebar/AppSidebar.js +272 -0
- package/components/Avatar/Avatar.css +133 -0
- package/components/Avatar/Avatar.d.ts +20 -0
- package/components/Avatar/Avatar.js +56 -0
- package/components/Avatar/demoAvatars.d.ts +14 -0
- package/components/Avatar/demoAvatars.js +16 -0
- package/components/Badge/Badge.css +68 -0
- package/components/Badge/Badge.d.ts +13 -0
- package/components/Badge/Badge.js +15 -0
- package/components/Breadcrumb/Breadcrumb.css +92 -0
- package/components/Breadcrumb/Breadcrumb.d.ts +19 -0
- package/components/Breadcrumb/Breadcrumb.js +39 -0
- package/components/Button/Button.css +381 -0
- package/components/Button/Button.d.ts +39 -0
- package/components/Button/Button.js +71 -0
- package/components/ButtonGroup/ButtonGroup.css +39 -0
- package/components/ButtonGroup/ButtonGroup.d.ts +13 -0
- package/components/ButtonGroup/ButtonGroup.js +37 -0
- package/components/Card/Card.css +169 -0
- package/components/Card/Card.d.ts +30 -0
- package/components/Card/Card.js +90 -0
- package/components/Carousel/Carousel.css +112 -0
- package/components/Carousel/Carousel.d.ts +25 -0
- package/components/Carousel/Carousel.js +126 -0
- package/components/Chart/AreaChart.d.ts +36 -0
- package/components/Chart/AreaChart.js +99 -0
- package/components/Chart/BarChart.d.ts +34 -0
- package/components/Chart/BarChart.js +107 -0
- package/components/Chart/Chart.css +176 -0
- package/components/Chart/LineChart.d.ts +34 -0
- package/components/Chart/LineChart.js +90 -0
- package/components/Chart/PieChart.d.ts +34 -0
- package/components/Chart/PieChart.js +106 -0
- package/components/Chart/RadarChart.d.ts +34 -0
- package/components/Chart/RadarChart.js +91 -0
- package/components/Chart/RadialChart.d.ts +37 -0
- package/components/Chart/RadialChart.js +119 -0
- package/components/Chart/ScatterChart.d.ts +36 -0
- package/components/Chart/ScatterChart.js +109 -0
- package/components/Chart/StackedBarChart.d.ts +34 -0
- package/components/Chart/StackedBarChart.js +111 -0
- package/components/Chart/Treemap.d.ts +33 -0
- package/components/Chart/Treemap.js +109 -0
- package/components/Checkbox/Checkbox.css +164 -0
- package/components/Checkbox/Checkbox.d.ts +45 -0
- package/components/Checkbox/Checkbox.js +125 -0
- package/components/Chip/Chip.css +195 -0
- package/components/Chip/Chip.d.ts +27 -0
- package/components/Chip/Chip.js +80 -0
- package/components/CircularButton/CircularButton.css +206 -0
- package/components/CircularButton/CircularButton.d.ts +30 -0
- package/components/CircularButton/CircularButton.js +54 -0
- package/components/CodeBlock/CodeBlock.css +180 -0
- package/components/CodeBlock/CodeBlock.d.ts +23 -0
- package/components/CodeBlock/CodeBlock.js +85 -0
- package/components/ColourSwatch/ColourSwatch.css +88 -0
- package/components/ColourSwatch/ColourSwatch.d.ts +34 -0
- package/components/ColourSwatch/ColourSwatch.js +42 -0
- package/components/Combobox/Combobox.css +411 -0
- package/components/Combobox/Combobox.d.ts +73 -0
- package/components/Combobox/Combobox.js +312 -0
- package/components/CommandPalette/CommandPalette.css +310 -0
- package/components/CommandPalette/CommandPalette.d.ts +60 -0
- package/components/CommandPalette/CommandPalette.js +263 -0
- package/components/ContactCard/ContactCard.css +123 -0
- package/components/ContactCard/ContactCard.d.ts +23 -0
- package/components/ContactCard/ContactCard.js +78 -0
- package/components/ContributionGraph/ContributionGraph.css +142 -0
- package/components/ContributionGraph/ContributionGraph.d.ts +26 -0
- package/components/ContributionGraph/ContributionGraph.js +125 -0
- package/components/DateInput/DateInput.css +163 -0
- package/components/DateInput/DateInput.d.ts +43 -0
- package/components/DateInput/DateInput.js +69 -0
- package/components/DatePicker/DatePicker.css +198 -0
- package/components/DatePicker/DatePicker.d.ts +22 -0
- package/components/DatePicker/DatePicker.js +170 -0
- package/components/Dialog/Dialog.css +176 -0
- package/components/Dialog/Dialog.d.ts +28 -0
- package/components/Dialog/Dialog.js +132 -0
- package/components/Divider/Divider.css +100 -0
- package/components/Divider/Divider.d.ts +18 -0
- package/components/Divider/Divider.js +31 -0
- package/components/Drawer/Drawer.css +262 -0
- package/components/Drawer/Drawer.d.ts +30 -0
- package/components/Drawer/Drawer.js +134 -0
- package/components/Dropdown/Dropdown.css +300 -0
- package/components/Dropdown/Dropdown.d.ts +48 -0
- package/components/Dropdown/Dropdown.js +196 -0
- package/components/DropdownMenu/DropdownMenu.css +303 -0
- package/components/DropdownMenu/DropdownMenu.d.ts +42 -0
- package/components/DropdownMenu/DropdownMenu.js +322 -0
- package/components/EmptyState/EmptyState.css +115 -0
- package/components/EmptyState/EmptyState.d.ts +27 -0
- package/components/EmptyState/EmptyState.js +32 -0
- package/components/EntityCard/EntityCard.css +69 -0
- package/components/EntityCard/EntityCard.d.ts +18 -0
- package/components/EntityCard/EntityCard.js +26 -0
- package/components/Figure/Figure.css +61 -0
- package/components/Figure/Figure.d.ts +17 -0
- package/components/Figure/Figure.js +35 -0
- package/components/FileInput/FileInput.css +308 -0
- package/components/FileInput/FileInput.d.ts +54 -0
- package/components/FileInput/FileInput.js +177 -0
- package/components/Input/Input.css +193 -0
- package/components/Input/Input.d.ts +40 -0
- package/components/Input/Input.js +71 -0
- package/components/Instructions/Instructions.css +216 -0
- package/components/Instructions/Instructions.d.ts +28 -0
- package/components/Instructions/Instructions.js +32 -0
- package/components/LinkList/LinkList.css +71 -0
- package/components/LinkList/LinkList.d.ts +20 -0
- package/components/LinkList/LinkList.js +41 -0
- package/components/MotionSwatch/MotionSwatch.css +176 -0
- package/components/MotionSwatch/MotionSwatch.d.ts +25 -0
- package/components/MotionSwatch/MotionSwatch.js +74 -0
- package/components/Nav/Nav.css +51 -0
- package/components/Nav/Nav.d.ts +19 -0
- package/components/Nav/Nav.js +26 -0
- package/components/Pagination/Pagination.css +126 -0
- package/components/Pagination/Pagination.d.ts +22 -0
- package/components/Pagination/Pagination.js +83 -0
- package/components/Popover/Popover.css +99 -0
- package/components/Popover/Popover.d.ts +28 -0
- package/components/Popover/Popover.js +102 -0
- package/components/ProgressBar/ProgressBar.css +60 -0
- package/components/ProgressBar/ProgressBar.d.ts +16 -0
- package/components/ProgressBar/ProgressBar.js +27 -0
- package/components/Quote/Quote.css +79 -0
- package/components/Quote/Quote.d.ts +18 -0
- package/components/Quote/Quote.js +26 -0
- package/components/RadioButton/RadioButton.css +132 -0
- package/components/RadioButton/RadioButton.d.ts +43 -0
- package/components/RadioButton/RadioButton.js +77 -0
- package/components/SectionTitle/SectionTitle.css +37 -0
- package/components/SectionTitle/SectionTitle.d.ts +10 -0
- package/components/SectionTitle/SectionTitle.js +17 -0
- package/components/SegmentedControl/SegmentedControl.css +129 -0
- package/components/SegmentedControl/SegmentedControl.d.ts +33 -0
- package/components/SegmentedControl/SegmentedControl.js +91 -0
- package/components/SelectionCard/SelectionCard.css +251 -0
- package/components/SelectionCard/SelectionCard.d.ts +26 -0
- package/components/SelectionCard/SelectionCard.js +85 -0
- package/components/Skeleton/Skeleton.css +79 -0
- package/components/Skeleton/Skeleton.d.ts +16 -0
- package/components/Skeleton/Skeleton.js +30 -0
- package/components/Slider/Slider.css +86 -0
- package/components/Slider/Slider.d.ts +25 -0
- package/components/Slider/Slider.js +46 -0
- package/components/SpacingSwatch/SpacingSwatch.css +108 -0
- package/components/SpacingSwatch/SpacingSwatch.d.ts +20 -0
- package/components/SpacingSwatch/SpacingSwatch.js +50 -0
- package/components/Spinner/Spinner.css +73 -0
- package/components/Spinner/Spinner.d.ts +14 -0
- package/components/Spinner/Spinner.js +42 -0
- package/components/Stat/Stat.css +78 -0
- package/components/Stat/Stat.d.ts +19 -0
- package/components/Stat/Stat.js +30 -0
- package/components/Table/Table.css +186 -0
- package/components/Table/Table.d.ts +45 -0
- package/components/Table/Table.js +65 -0
- package/components/Tabs/Tabs.css +140 -0
- package/components/Tabs/Tabs.d.ts +28 -0
- package/components/Tabs/Tabs.js +77 -0
- package/components/Textarea/Textarea.css +152 -0
- package/components/Textarea/Textarea.d.ts +40 -0
- package/components/Textarea/Textarea.js +74 -0
- package/components/Timeline/Timeline.css +339 -0
- package/components/Timeline/Timeline.d.ts +63 -0
- package/components/Timeline/Timeline.js +69 -0
- package/components/Toast/Toast.css +342 -0
- package/components/Toast/Toast.d.ts +63 -0
- package/components/Toast/Toast.js +213 -0
- package/components/ToggleGroup/ToggleGroup.css +84 -0
- package/components/ToggleGroup/ToggleGroup.d.ts +30 -0
- package/components/ToggleGroup/ToggleGroup.js +53 -0
- package/components/ToggleSwitch/ToggleSwitch.css +139 -0
- package/components/ToggleSwitch/ToggleSwitch.d.ts +23 -0
- package/components/ToggleSwitch/ToggleSwitch.js +50 -0
- package/components/Tooltip/Tooltip.css +122 -0
- package/components/Tooltip/Tooltip.d.ts +21 -0
- package/components/Tooltip/Tooltip.js +63 -0
- package/components/TypographySwatch/TypographySwatch.css +81 -0
- package/components/TypographySwatch/TypographySwatch.d.ts +24 -0
- package/components/TypographySwatch/TypographySwatch.js +40 -0
- package/components/registry.d.ts +20 -0
- package/components/registry.js +7 -0
- package/components/registry.json +67 -0
- package/components/registry.json.d.ts +70 -0
- package/components/registry.json.js +8 -0
- package/fonts/MaterialSymbolsRounded-VariableFont_FILL,GRAD,opsz,wght.woff2 +0 -0
- package/fonts/material-symbols.css +94 -0
- package/index.d.ts +62 -0
- package/index.js +123 -0
- package/package.json +63 -0
- package/tokens/registry.d.ts +22 -0
- package/tokens/registry.js +14 -0
- package/tokens/registry.json +203 -0
- package/tokens/registry.json.d.ts +206 -0
- package/tokens/registry.json.js +8 -0
- package/tokens/tokens-dark.css +119 -0
- package/tokens/tokens-light.css +159 -0
- package/tokens/tokens-motion.css +68 -0
- package/tokens/tokens-primitives.css +176 -0
- package/tokens/tokens-typography.css +116 -0
- package/tokens/tokens.css +11 -0
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import React, { useState, useCallback } from "react";
|
|
3
|
+
import "./AppSidebar.css";
|
|
4
|
+
import "../../fonts/material-symbols.css";
|
|
5
|
+
function DefaultLogo() {
|
|
6
|
+
return /* @__PURE__ */ jsxs(
|
|
7
|
+
"svg",
|
|
8
|
+
{
|
|
9
|
+
width: "24",
|
|
10
|
+
height: "24",
|
|
11
|
+
viewBox: "0 0 24 24",
|
|
12
|
+
fill: "none",
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
+
"aria-hidden": "true",
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ jsx(
|
|
17
|
+
"path",
|
|
18
|
+
{
|
|
19
|
+
fillRule: "evenodd",
|
|
20
|
+
clipRule: "evenodd",
|
|
21
|
+
d: "M18.0309 14.98C18.6612 14.8653 19.2184 14.6623 19.7208 14.3712C20.214 14.08 20.6343 13.7358 20.9814 13.3211C21.3285 12.9063 21.5934 12.4387 21.776 11.9269C21.9587 11.4062 22.05 10.8592 22.05 10.2856C22.05 9.22672 21.8034 8.35314 21.3011 7.67368C20.8078 6.99423 20.1775 6.45596 19.4103 6.05889C18.6429 5.6618 17.7935 5.37943 16.8618 5.22942C15.9301 5.07059 15.0258 5 14.158 5L0 5C0 5 1.7355 8.8561 6.49444 8.8561C11.2534 8.8561 14.5417 8.8561 14.5417 8.8561C15.3638 8.8561 16.0123 8.99729 16.4691 9.28849C16.9257 9.57968 17.1541 10.0121 17.1541 10.5856C17.1541 11.1062 16.8983 11.5122 16.3959 11.8033C15.8936 12.1033 15.2725 12.2445 14.5417 12.2445C14.5417 12.2445 7.84631 12.2445 4.28395 12.2445C0.876885 12.2445 1.18745 15.5535 1.18745 15.5535L1.18745 19.8244C1.18745 19.8244 5.93725 19.8068 5.93725 15.9065H13.2263C16.9714 21.2627 23 19.8244 23 19.8244L18.0309 14.98Z",
|
|
22
|
+
fill: "url(#sidebar_paint0)"
|
|
23
|
+
}
|
|
24
|
+
),
|
|
25
|
+
/* @__PURE__ */ jsx(
|
|
26
|
+
"path",
|
|
27
|
+
{
|
|
28
|
+
opacity: "0.4",
|
|
29
|
+
fillRule: "evenodd",
|
|
30
|
+
clipRule: "evenodd",
|
|
31
|
+
d: "M8 8.69492C12.0901 8.69492 14.6165 8.70339 14.6165 8.70339C16.5233 8.76271 16.9046 9.10173 17 9.5C17 6.11865 13.0434 5 11.0795 5C9.11546 5 8 5 8 5V8.69492Z",
|
|
32
|
+
fill: "url(#sidebar_paint1)"
|
|
33
|
+
}
|
|
34
|
+
),
|
|
35
|
+
/* @__PURE__ */ jsx(
|
|
36
|
+
"path",
|
|
37
|
+
{
|
|
38
|
+
opacity: "0.5",
|
|
39
|
+
fillRule: "evenodd",
|
|
40
|
+
clipRule: "evenodd",
|
|
41
|
+
d: "M14.2646 5.38135C14.2646 5.38135 13.2763 5 12.3696 5C10.5018 5 9.44108 5 9.44108 5L1 5C1 5 2.72267 6.89831 7.44641 6.89831L13.4213 6.90678C17.3472 6.90678 17.9094 9.61018 18 10C18 7.5678 16.0507 6.04237 14.2646 5.38135Z",
|
|
42
|
+
fill: "url(#sidebar_paint2)"
|
|
43
|
+
}
|
|
44
|
+
),
|
|
45
|
+
/* @__PURE__ */ jsx(
|
|
46
|
+
"path",
|
|
47
|
+
{
|
|
48
|
+
opacity: "0.4",
|
|
49
|
+
fillRule: "evenodd",
|
|
50
|
+
clipRule: "evenodd",
|
|
51
|
+
d: "M13 12.5C11.9827 12.5 10.372 12.5 9 12.5C6.30269 12.5 6 15.5 6 15.5H13V12.5Z",
|
|
52
|
+
fill: "url(#sidebar_paint3)"
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
/* @__PURE__ */ jsx(
|
|
56
|
+
"path",
|
|
57
|
+
{
|
|
58
|
+
opacity: "0.5",
|
|
59
|
+
fillRule: "evenodd",
|
|
60
|
+
clipRule: "evenodd",
|
|
61
|
+
d: "M6 13C4.69445 13 5.42838 13 4.39805 13C1.76576 13 2.0057 15.6193 2.0057 15.6193L2.0057 19C2.0057 19 3.57237 17.7218 3.57237 16.206C3.57237 14.6904 3.95346 13 6 13Z",
|
|
62
|
+
fill: "url(#sidebar_paint4)"
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
/* @__PURE__ */ jsx(
|
|
66
|
+
"path",
|
|
67
|
+
{
|
|
68
|
+
opacity: "0.5",
|
|
69
|
+
fillRule: "evenodd",
|
|
70
|
+
clipRule: "evenodd",
|
|
71
|
+
d: "M17.947 15C17.947 15 17.4185 15.1645 16 15C18.392 20.0731 23 19.9999 23 19.9999L17.947 15Z",
|
|
72
|
+
fill: "url(#sidebar_paint5)"
|
|
73
|
+
}
|
|
74
|
+
),
|
|
75
|
+
/* @__PURE__ */ jsxs("defs", { children: [
|
|
76
|
+
/* @__PURE__ */ jsxs("linearGradient", { id: "sidebar_paint0", x1: "3.83825", y1: "15.8618", x2: "13.4908", y2: "5.78849", gradientUnits: "userSpaceOnUse", children: [
|
|
77
|
+
/* @__PURE__ */ jsx("stop", { stopColor: "#2980B9" }),
|
|
78
|
+
/* @__PURE__ */ jsx("stop", { offset: "0.5484", stopColor: "#2980B9" }),
|
|
79
|
+
/* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#34495E" })
|
|
80
|
+
] }),
|
|
81
|
+
/* @__PURE__ */ jsxs("linearGradient", { id: "sidebar_paint1", x1: "9.8045", y1: "7.5", x2: "16.6666", y2: "7.5", gradientUnits: "userSpaceOnUse", children: [
|
|
82
|
+
/* @__PURE__ */ jsx("stop", { stopColor: "#2980B9" }),
|
|
83
|
+
/* @__PURE__ */ jsx("stop", { offset: "0.5484", stopColor: "#2980B9" }),
|
|
84
|
+
/* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#34495E" })
|
|
85
|
+
] }),
|
|
86
|
+
/* @__PURE__ */ jsxs("linearGradient", { id: "sidebar_paint2", x1: "0.874018", y1: "7.27631", x2: "9.44862", y2: "8.80891", gradientUnits: "userSpaceOnUse", children: [
|
|
87
|
+
/* @__PURE__ */ jsx("stop", { stopColor: "#2980B9" }),
|
|
88
|
+
/* @__PURE__ */ jsx("stop", { offset: "0.5484", stopColor: "#2980B9" }),
|
|
89
|
+
/* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#34495E" })
|
|
90
|
+
] }),
|
|
91
|
+
/* @__PURE__ */ jsxs("linearGradient", { id: "sidebar_paint3", x1: "14.3715", y1: "14", x2: "7.79961", y2: "14", gradientUnits: "userSpaceOnUse", children: [
|
|
92
|
+
/* @__PURE__ */ jsx("stop", { stopColor: "#2980B9" }),
|
|
93
|
+
/* @__PURE__ */ jsx("stop", { offset: "0.5484", stopColor: "#2980B9" }),
|
|
94
|
+
/* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#34495E" })
|
|
95
|
+
] }),
|
|
96
|
+
/* @__PURE__ */ jsxs("linearGradient", { id: "sidebar_paint4", x1: "4", y1: "18.7627", x2: "4", y2: "15.6662", gradientUnits: "userSpaceOnUse", children: [
|
|
97
|
+
/* @__PURE__ */ jsx("stop", { stopColor: "#2980B9" }),
|
|
98
|
+
/* @__PURE__ */ jsx("stop", { offset: "0.5484", stopColor: "#2980B9" }),
|
|
99
|
+
/* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#34495E" })
|
|
100
|
+
] }),
|
|
101
|
+
/* @__PURE__ */ jsxs("linearGradient", { id: "sidebar_paint5", x1: "21.5356", y1: "19.143", x2: "19.9551", y2: "16.6911", gradientUnits: "userSpaceOnUse", children: [
|
|
102
|
+
/* @__PURE__ */ jsx("stop", { stopColor: "#2980B9" }),
|
|
103
|
+
/* @__PURE__ */ jsx("stop", { offset: "0.5484", stopColor: "#2980B9" }),
|
|
104
|
+
/* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#34495E" })
|
|
105
|
+
] })
|
|
106
|
+
] })
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
const AppSidebar = ({
|
|
112
|
+
sections,
|
|
113
|
+
profile,
|
|
114
|
+
activeKey,
|
|
115
|
+
activeSubKey,
|
|
116
|
+
defaultExpanded = false,
|
|
117
|
+
expanded: controlledExpanded,
|
|
118
|
+
onExpandedChange,
|
|
119
|
+
onProfileMore,
|
|
120
|
+
className = "",
|
|
121
|
+
logo,
|
|
122
|
+
logoText = "robr0"
|
|
123
|
+
}) => {
|
|
124
|
+
const baseClass = "ds-app-sidebar";
|
|
125
|
+
const [internalExpanded, setInternalExpanded] = useState(defaultExpanded);
|
|
126
|
+
const isExpanded = controlledExpanded ?? internalExpanded;
|
|
127
|
+
const toggleExpanded = useCallback(() => {
|
|
128
|
+
const next = !isExpanded;
|
|
129
|
+
setInternalExpanded(next);
|
|
130
|
+
onExpandedChange?.(next);
|
|
131
|
+
}, [isExpanded, onExpandedChange]);
|
|
132
|
+
const [openKeys, setOpenKeys] = useState(/* @__PURE__ */ new Set());
|
|
133
|
+
const toggleAccordion = useCallback((key) => {
|
|
134
|
+
setOpenKeys((prev) => {
|
|
135
|
+
const next = new Set(prev);
|
|
136
|
+
if (next.has(key)) {
|
|
137
|
+
next.delete(key);
|
|
138
|
+
} else {
|
|
139
|
+
next.add(key);
|
|
140
|
+
}
|
|
141
|
+
return next;
|
|
142
|
+
});
|
|
143
|
+
}, []);
|
|
144
|
+
const classes = [
|
|
145
|
+
baseClass,
|
|
146
|
+
isExpanded ? `${baseClass}--expanded` : "",
|
|
147
|
+
className
|
|
148
|
+
].filter(Boolean).join(" ");
|
|
149
|
+
return /* @__PURE__ */ jsxs("nav", { className: classes, "aria-label": "App navigation", children: [
|
|
150
|
+
/* @__PURE__ */ jsxs("div", { className: `${baseClass}__top`, children: [
|
|
151
|
+
/* @__PURE__ */ jsxs("div", { className: `${baseClass}__logo`, children: [
|
|
152
|
+
/* @__PURE__ */ jsxs(
|
|
153
|
+
"div",
|
|
154
|
+
{
|
|
155
|
+
className: `${baseClass}__logo-inner`,
|
|
156
|
+
onClick: !isExpanded ? toggleExpanded : void 0,
|
|
157
|
+
role: !isExpanded ? "button" : void 0,
|
|
158
|
+
tabIndex: !isExpanded ? 0 : void 0,
|
|
159
|
+
"aria-label": !isExpanded ? "Expand sidebar" : void 0,
|
|
160
|
+
onKeyDown: !isExpanded ? (e) => {
|
|
161
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
162
|
+
e.preventDefault();
|
|
163
|
+
toggleExpanded();
|
|
164
|
+
}
|
|
165
|
+
} : void 0,
|
|
166
|
+
style: !isExpanded ? { cursor: "pointer" } : void 0,
|
|
167
|
+
children: [
|
|
168
|
+
/* @__PURE__ */ jsx("span", { className: `${baseClass}__logo-icon`, children: logo || /* @__PURE__ */ jsx(DefaultLogo, {}) }),
|
|
169
|
+
/* @__PURE__ */ jsx("span", { className: `${baseClass}__logo-text`, children: logoText })
|
|
170
|
+
]
|
|
171
|
+
}
|
|
172
|
+
),
|
|
173
|
+
/* @__PURE__ */ jsx(
|
|
174
|
+
"button",
|
|
175
|
+
{
|
|
176
|
+
className: `${baseClass}__toggle`,
|
|
177
|
+
onClick: toggleExpanded,
|
|
178
|
+
"aria-label": isExpanded ? "Collapse sidebar" : "Expand sidebar",
|
|
179
|
+
children: /* @__PURE__ */ jsx("span", { className: "material-symbols-rounded", children: isExpanded ? "left_panel_close" : "left_panel_open" })
|
|
180
|
+
}
|
|
181
|
+
)
|
|
182
|
+
] }),
|
|
183
|
+
sections.map((section, si) => /* @__PURE__ */ jsxs("div", { className: `${baseClass}__nav`, children: [
|
|
184
|
+
section.category && /* @__PURE__ */ jsx("div", { className: `${baseClass}__category`, children: section.category }),
|
|
185
|
+
section.items.map((item) => {
|
|
186
|
+
const hasChildren = item.children && item.children.length > 0;
|
|
187
|
+
const isOpen = openKeys.has(item.key);
|
|
188
|
+
const isActive = activeKey === item.key;
|
|
189
|
+
return /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
190
|
+
/* @__PURE__ */ jsxs(
|
|
191
|
+
"button",
|
|
192
|
+
{
|
|
193
|
+
className: [
|
|
194
|
+
`${baseClass}__btn`,
|
|
195
|
+
isActive ? `${baseClass}__btn--active` : ""
|
|
196
|
+
].filter(Boolean).join(" "),
|
|
197
|
+
onClick: () => {
|
|
198
|
+
if (hasChildren && isExpanded) {
|
|
199
|
+
toggleAccordion(item.key);
|
|
200
|
+
}
|
|
201
|
+
item.onClick?.();
|
|
202
|
+
},
|
|
203
|
+
"aria-expanded": hasChildren ? isOpen : void 0,
|
|
204
|
+
title: !isExpanded ? item.label : void 0,
|
|
205
|
+
children: [
|
|
206
|
+
/* @__PURE__ */ jsxs("span", { className: `${baseClass}__btn-left`, children: [
|
|
207
|
+
/* @__PURE__ */ jsx("span", { className: `${baseClass}__btn-icon material-symbols-rounded`, children: item.icon }),
|
|
208
|
+
/* @__PURE__ */ jsx("span", { className: `${baseClass}__btn-label`, children: item.label })
|
|
209
|
+
] }),
|
|
210
|
+
hasChildren && /* @__PURE__ */ jsx(
|
|
211
|
+
"span",
|
|
212
|
+
{
|
|
213
|
+
className: [
|
|
214
|
+
`${baseClass}__btn-chevron material-symbols-rounded`,
|
|
215
|
+
isOpen ? `${baseClass}__btn-chevron--open` : ""
|
|
216
|
+
].filter(Boolean).join(" "),
|
|
217
|
+
children: "chevron_right"
|
|
218
|
+
}
|
|
219
|
+
)
|
|
220
|
+
]
|
|
221
|
+
}
|
|
222
|
+
),
|
|
223
|
+
hasChildren && /* @__PURE__ */ jsx(
|
|
224
|
+
"div",
|
|
225
|
+
{
|
|
226
|
+
className: [
|
|
227
|
+
`${baseClass}__sub-items`,
|
|
228
|
+
isOpen && isExpanded ? `${baseClass}__sub-items--open` : ""
|
|
229
|
+
].filter(Boolean).join(" "),
|
|
230
|
+
children: item.children.map((sub) => /* @__PURE__ */ jsxs("div", { className: `${baseClass}__sub-item`, children: [
|
|
231
|
+
/* @__PURE__ */ jsx("div", { className: `${baseClass}__sub-line` }),
|
|
232
|
+
/* @__PURE__ */ jsx(
|
|
233
|
+
"button",
|
|
234
|
+
{
|
|
235
|
+
className: [
|
|
236
|
+
`${baseClass}__sub-btn`,
|
|
237
|
+
activeSubKey === sub.key ? `${baseClass}__sub-btn--active` : ""
|
|
238
|
+
].filter(Boolean).join(" "),
|
|
239
|
+
onClick: sub.onClick,
|
|
240
|
+
children: /* @__PURE__ */ jsx("span", { className: `${baseClass}__sub-label`, children: sub.label })
|
|
241
|
+
}
|
|
242
|
+
)
|
|
243
|
+
] }, sub.key))
|
|
244
|
+
}
|
|
245
|
+
)
|
|
246
|
+
] }, item.key);
|
|
247
|
+
})
|
|
248
|
+
] }, si))
|
|
249
|
+
] }),
|
|
250
|
+
profile && /* @__PURE__ */ jsxs("div", { className: `${baseClass}__profile`, children: [
|
|
251
|
+
/* @__PURE__ */ jsxs("div", { className: `${baseClass}__profile-left`, children: [
|
|
252
|
+
/* @__PURE__ */ jsx("div", { className: `${baseClass}__avatar`, children: profile.avatarUrl && /* @__PURE__ */ jsx("img", { src: profile.avatarUrl, alt: profile.name }) }),
|
|
253
|
+
/* @__PURE__ */ jsxs("div", { className: `${baseClass}__profile-info`, children: [
|
|
254
|
+
/* @__PURE__ */ jsx("span", { className: `${baseClass}__profile-name`, children: profile.name }),
|
|
255
|
+
/* @__PURE__ */ jsx("span", { className: `${baseClass}__profile-email`, children: profile.email })
|
|
256
|
+
] })
|
|
257
|
+
] }),
|
|
258
|
+
/* @__PURE__ */ jsx(
|
|
259
|
+
"button",
|
|
260
|
+
{
|
|
261
|
+
className: `${baseClass}__profile-more`,
|
|
262
|
+
onClick: onProfileMore,
|
|
263
|
+
"aria-label": "Profile options",
|
|
264
|
+
children: /* @__PURE__ */ jsx("span", { className: "material-symbols-rounded", children: "more_horiz" })
|
|
265
|
+
}
|
|
266
|
+
)
|
|
267
|
+
] })
|
|
268
|
+
] });
|
|
269
|
+
};
|
|
270
|
+
export {
|
|
271
|
+
AppSidebar
|
|
272
|
+
};
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/* ============================================
|
|
2
|
+
AVATAR COMPONENT
|
|
3
|
+
User profile image with initials fallback
|
|
4
|
+
============================================ */
|
|
5
|
+
|
|
6
|
+
.ds-avatar {
|
|
7
|
+
position: relative;
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
border-radius: var(--radius-full); /* 999px */
|
|
12
|
+
background-color: var(--color-bg-container-secondary);
|
|
13
|
+
flex-shrink: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* ============================================
|
|
17
|
+
SIZES
|
|
18
|
+
============================================ */
|
|
19
|
+
|
|
20
|
+
.ds-avatar--sm {
|
|
21
|
+
width: 32px;
|
|
22
|
+
height: 32px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.ds-avatar--md {
|
|
26
|
+
width: 40px;
|
|
27
|
+
height: 40px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.ds-avatar--lg {
|
|
31
|
+
width: 56px;
|
|
32
|
+
height: 56px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* ============================================
|
|
36
|
+
IMAGE
|
|
37
|
+
============================================ */
|
|
38
|
+
|
|
39
|
+
.ds-avatar__image {
|
|
40
|
+
width: 100%;
|
|
41
|
+
height: 100%;
|
|
42
|
+
object-fit: cover;
|
|
43
|
+
display: block;
|
|
44
|
+
border-radius: var(--radius-full);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* ============================================
|
|
48
|
+
INITIALS FALLBACK
|
|
49
|
+
============================================ */
|
|
50
|
+
|
|
51
|
+
.ds-avatar__initials {
|
|
52
|
+
font-family: var(--font-paragraph-em-family);
|
|
53
|
+
font-weight: var(--font-paragraph-em-weight);
|
|
54
|
+
color: var(--color-text-primary);
|
|
55
|
+
line-height: 1;
|
|
56
|
+
user-select: none;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.ds-avatar--sm .ds-avatar__initials {
|
|
60
|
+
font-size: 12px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.ds-avatar--md .ds-avatar__initials {
|
|
64
|
+
font-size: 14px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.ds-avatar--lg .ds-avatar__initials {
|
|
68
|
+
font-size: 18px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* ============================================
|
|
72
|
+
ICON FALLBACK
|
|
73
|
+
============================================ */
|
|
74
|
+
|
|
75
|
+
.ds-avatar__icon {
|
|
76
|
+
color: var(--color-icon-secondary);
|
|
77
|
+
line-height: 1;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.ds-avatar--sm .ds-avatar__icon {
|
|
81
|
+
--icon-size: var(--icon-size-sm);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.ds-avatar--md .ds-avatar__icon {
|
|
85
|
+
--icon-size: var(--icon-size-md);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.ds-avatar--lg .ds-avatar__icon {
|
|
89
|
+
--icon-size: var(--icon-size-lg);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* ============================================
|
|
93
|
+
STATUS INDICATOR
|
|
94
|
+
============================================ */
|
|
95
|
+
|
|
96
|
+
.ds-avatar__status {
|
|
97
|
+
position: absolute;
|
|
98
|
+
bottom: 0;
|
|
99
|
+
right: 0;
|
|
100
|
+
border-radius: var(--radius-full);
|
|
101
|
+
border: 2px solid var(--color-bg-page-primary);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.ds-avatar--sm .ds-avatar__status {
|
|
105
|
+
width: 10px;
|
|
106
|
+
height: 10px;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.ds-avatar--md .ds-avatar__status {
|
|
110
|
+
width: 12px;
|
|
111
|
+
height: 12px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.ds-avatar--lg .ds-avatar__status {
|
|
115
|
+
width: 14px;
|
|
116
|
+
height: 14px;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.ds-avatar__status--online {
|
|
120
|
+
background-color: var(--color-status-positive-border);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.ds-avatar__status--away {
|
|
124
|
+
background-color: var(--color-status-warning-border);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.ds-avatar__status--offline {
|
|
128
|
+
background-color: var(--color-bg-container-border);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.ds-avatar__status--busy {
|
|
132
|
+
background-color: var(--color-status-error-border);
|
|
133
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface AvatarProps {
|
|
2
|
+
/** Image source URL */
|
|
3
|
+
src?: string;
|
|
4
|
+
/** Alt text for the image */
|
|
5
|
+
alt?: string;
|
|
6
|
+
/** User's name — used for initials fallback */
|
|
7
|
+
name?: string;
|
|
8
|
+
/** Avatar size */
|
|
9
|
+
size?: 'sm' | 'md' | 'lg';
|
|
10
|
+
/** Online status indicator */
|
|
11
|
+
status?: 'online' | 'away' | 'offline' | 'busy';
|
|
12
|
+
/** Additional CSS classes */
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Avatar component for user profile images.
|
|
17
|
+
* Falls back to initials derived from the name prop,
|
|
18
|
+
* or a person icon when neither image nor name is provided.
|
|
19
|
+
*/
|
|
20
|
+
export declare const Avatar: ({ src, alt, name, size, status, className, }: AvatarProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import "./Avatar.css";
|
|
4
|
+
import "../../fonts/material-symbols.css";
|
|
5
|
+
const Avatar = ({
|
|
6
|
+
src,
|
|
7
|
+
alt,
|
|
8
|
+
name,
|
|
9
|
+
size = "md",
|
|
10
|
+
status,
|
|
11
|
+
className = ""
|
|
12
|
+
}) => {
|
|
13
|
+
const [imgError, setImgError] = useState(false);
|
|
14
|
+
const baseClass = "ds-avatar";
|
|
15
|
+
const sizeClass = `${baseClass}--${size}`;
|
|
16
|
+
const classes = [baseClass, sizeClass, className].filter(Boolean).join(" ");
|
|
17
|
+
const getInitials = (fullName) => {
|
|
18
|
+
const parts = fullName.trim().split(/\s+/);
|
|
19
|
+
if (parts.length === 1) return parts[0][0].toUpperCase();
|
|
20
|
+
return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();
|
|
21
|
+
};
|
|
22
|
+
const showImage = src && !imgError;
|
|
23
|
+
const showInitials = !showImage && name;
|
|
24
|
+
const showIcon = !showImage && !name;
|
|
25
|
+
const label = alt || name || "User avatar";
|
|
26
|
+
return /* @__PURE__ */ jsxs("span", { className: classes, role: "img", "aria-label": label, children: [
|
|
27
|
+
showImage && /* @__PURE__ */ jsx(
|
|
28
|
+
"img",
|
|
29
|
+
{
|
|
30
|
+
className: `${baseClass}__image`,
|
|
31
|
+
src,
|
|
32
|
+
alt: alt || name || "",
|
|
33
|
+
onError: () => setImgError(true)
|
|
34
|
+
}
|
|
35
|
+
),
|
|
36
|
+
showInitials && /* @__PURE__ */ jsx("span", { className: `${baseClass}__initials`, "aria-hidden": "true", children: getInitials(name) }),
|
|
37
|
+
showIcon && /* @__PURE__ */ jsx(
|
|
38
|
+
"span",
|
|
39
|
+
{
|
|
40
|
+
className: `${baseClass}__icon material-symbols-rounded`,
|
|
41
|
+
"aria-hidden": "true",
|
|
42
|
+
children: "person"
|
|
43
|
+
}
|
|
44
|
+
),
|
|
45
|
+
status && /* @__PURE__ */ jsx(
|
|
46
|
+
"span",
|
|
47
|
+
{
|
|
48
|
+
className: `${baseClass}__status ${baseClass}__status--${status}`,
|
|
49
|
+
"aria-label": status
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
] });
|
|
53
|
+
};
|
|
54
|
+
export {
|
|
55
|
+
Avatar
|
|
56
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Self-contained demo avatar portraits for docs and stories.
|
|
3
|
+
*
|
|
4
|
+
* The Avatar showcase (website page + Storybook stories) needs sample photos to
|
|
5
|
+
* demonstrate the image state. Pointing at a third-party host (e.g. pravatar.cc)
|
|
6
|
+
* made the docs depend on an external service — when it was rate-limited or
|
|
7
|
+
* blocked, every avatar rendered as a broken image with alt text bleeding
|
|
8
|
+
* through the circle. These inline SVG data URIs render the same everywhere with
|
|
9
|
+
* no network request, so the docs stay self-contained.
|
|
10
|
+
*/
|
|
11
|
+
/** Distinct demo portraits so multiple avatars in a row read as different people. */
|
|
12
|
+
export declare const demoAvatar1: string;
|
|
13
|
+
export declare const demoAvatar2: string;
|
|
14
|
+
export declare const demoAvatar3: string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const portrait = (bg, accent) => {
|
|
2
|
+
const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96">
|
|
3
|
+
<rect width="96" height="96" fill="${bg}"/>
|
|
4
|
+
<circle cx="48" cy="38" r="17" fill="${accent}"/>
|
|
5
|
+
<path d="M18 84c0-16.6 13.4-30 30-30s30 13.4 30 30z" fill="${accent}"/>
|
|
6
|
+
</svg>`;
|
|
7
|
+
return `data:image/svg+xml;utf8,${encodeURIComponent(svg)}`;
|
|
8
|
+
};
|
|
9
|
+
const demoAvatar1 = portrait("#0F6C8C", "#8FD3E8");
|
|
10
|
+
const demoAvatar2 = portrait("#C05B8B", "#F3C6DC");
|
|
11
|
+
const demoAvatar3 = portrait("#4E7A3A", "#C7E6B2");
|
|
12
|
+
export {
|
|
13
|
+
demoAvatar1,
|
|
14
|
+
demoAvatar2,
|
|
15
|
+
demoAvatar3
|
|
16
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/* ============================================
|
|
2
|
+
BADGE COMPONENT
|
|
3
|
+
Small inline status labels
|
|
4
|
+
============================================ */
|
|
5
|
+
|
|
6
|
+
.ds-badge {
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
font-family: var(--font-paragraph-sm-em-family);
|
|
10
|
+
font-size: var(--font-paragraph-sm-em-size);
|
|
11
|
+
font-weight: var(--font-paragraph-sm-em-weight);
|
|
12
|
+
line-height: var(--font-paragraph-sm-em-line-height);
|
|
13
|
+
letter-spacing: var(--font-paragraph-sm-em-letter-spacing);
|
|
14
|
+
padding: var(--padding-xxxs) var(--padding-sm); /* Figma: 2px 8px */
|
|
15
|
+
border: var(--border-xs) solid transparent;
|
|
16
|
+
border-radius: var(--radius-xs); /* Figma: 4px */
|
|
17
|
+
white-space: nowrap;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* ============================================
|
|
21
|
+
VARIANT — INFO
|
|
22
|
+
============================================ */
|
|
23
|
+
|
|
24
|
+
.ds-badge--info {
|
|
25
|
+
background-color: var(--color-status-info-bg);
|
|
26
|
+
border-color: var(--color-status-info-border);
|
|
27
|
+
color: var(--color-status-info-text);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* ============================================
|
|
31
|
+
VARIANT — POSITIVE
|
|
32
|
+
============================================ */
|
|
33
|
+
|
|
34
|
+
.ds-badge--positive {
|
|
35
|
+
background-color: var(--color-status-positive-bg);
|
|
36
|
+
border-color: var(--color-status-positive-border);
|
|
37
|
+
color: var(--color-status-positive-text);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* ============================================
|
|
41
|
+
VARIANT — WARNING
|
|
42
|
+
============================================ */
|
|
43
|
+
|
|
44
|
+
.ds-badge--warning {
|
|
45
|
+
background-color: var(--color-status-warning-bg);
|
|
46
|
+
border-color: var(--color-status-warning-border);
|
|
47
|
+
color: var(--color-status-warning-text);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* ============================================
|
|
51
|
+
VARIANT — ERROR
|
|
52
|
+
============================================ */
|
|
53
|
+
|
|
54
|
+
.ds-badge--error {
|
|
55
|
+
background-color: var(--color-status-error-bg);
|
|
56
|
+
border-color: var(--color-status-error-border);
|
|
57
|
+
color: var(--color-status-error-text);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* ============================================
|
|
61
|
+
VARIANT — NEUTRAL
|
|
62
|
+
============================================ */
|
|
63
|
+
|
|
64
|
+
.ds-badge--neutral {
|
|
65
|
+
background-color: var(--color-status-neutral-bg);
|
|
66
|
+
border-color: var(--color-status-neutral-border);
|
|
67
|
+
color: var(--color-status-neutral-text);
|
|
68
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface BadgeProps {
|
|
2
|
+
/** Badge label text */
|
|
3
|
+
label: string;
|
|
4
|
+
/** Badge variant determines colour */
|
|
5
|
+
variant?: 'info' | 'positive' | 'warning' | 'error' | 'neutral';
|
|
6
|
+
/** Additional CSS classes */
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Badge component for small inline status labels.
|
|
11
|
+
* Supports info, positive, warning, error, and neutral variants.
|
|
12
|
+
*/
|
|
13
|
+
export declare const Badge: ({ label, variant, className, }: BadgeProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import "./Badge.css";
|
|
3
|
+
const Badge = ({
|
|
4
|
+
label,
|
|
5
|
+
variant = "neutral",
|
|
6
|
+
className = ""
|
|
7
|
+
}) => {
|
|
8
|
+
const baseClass = "ds-badge";
|
|
9
|
+
const variantClass = `${baseClass}--${variant}`;
|
|
10
|
+
const classes = [baseClass, variantClass, className].filter(Boolean).join(" ");
|
|
11
|
+
return /* @__PURE__ */ jsx("span", { className: classes, role: "status", children: label });
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
Badge
|
|
15
|
+
};
|