@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,434 @@
|
|
|
1
|
+
/* ============================================
|
|
2
|
+
APP SIDEBAR — collapsible navigation
|
|
3
|
+
Collapsed: 64px icon-only rail
|
|
4
|
+
Expanded: 280px with labels, accordion, profile
|
|
5
|
+
============================================ */
|
|
6
|
+
|
|
7
|
+
/* ============================================
|
|
8
|
+
WRAPPER
|
|
9
|
+
============================================ */
|
|
10
|
+
.ds-app-sidebar {
|
|
11
|
+
position: fixed;
|
|
12
|
+
top: 0;
|
|
13
|
+
left: 0;
|
|
14
|
+
z-index: 100;
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
justify-content: space-between;
|
|
18
|
+
height: 100vh;
|
|
19
|
+
width: 64px;
|
|
20
|
+
padding: var(--padding-lg) 0;
|
|
21
|
+
background-color: var(--color-bg-page-primary);
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
transition: width var(--motion-duration-slow) var(--motion-ease-emphasized);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.ds-app-sidebar--expanded {
|
|
27
|
+
width: 280px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* ============================================
|
|
31
|
+
TOP SECTION — logo + nav
|
|
32
|
+
============================================ */
|
|
33
|
+
.ds-app-sidebar__top {
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
gap: var(--gap-xl);
|
|
37
|
+
overflow-y: auto;
|
|
38
|
+
overflow-x: hidden;
|
|
39
|
+
flex: 1;
|
|
40
|
+
min-height: 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* ============================================
|
|
44
|
+
LOGO ROW
|
|
45
|
+
============================================ */
|
|
46
|
+
.ds-app-sidebar__logo {
|
|
47
|
+
display: flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
justify-content: space-between;
|
|
50
|
+
height: 24px;
|
|
51
|
+
padding: 0 var(--padding-lg);
|
|
52
|
+
flex-shrink: 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.ds-app-sidebar__logo-inner {
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
gap: 0;
|
|
59
|
+
min-width: 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.ds-app-sidebar--expanded .ds-app-sidebar__logo-inner {
|
|
63
|
+
gap: var(--gap-lg);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.ds-app-sidebar__logo-icon {
|
|
67
|
+
width: 24px;
|
|
68
|
+
height: 24px;
|
|
69
|
+
flex-shrink: 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.ds-app-sidebar__logo-text {
|
|
73
|
+
font-family: var(--font-paragraph-em-family);
|
|
74
|
+
font-size: var(--font-paragraph-em-size);
|
|
75
|
+
font-weight: var(--font-paragraph-em-weight);
|
|
76
|
+
line-height: var(--font-paragraph-em-line-height);
|
|
77
|
+
letter-spacing: var(--font-paragraph-em-letter-spacing);
|
|
78
|
+
color: var(--color-text-primary);
|
|
79
|
+
white-space: nowrap;
|
|
80
|
+
width: 0;
|
|
81
|
+
overflow: hidden;
|
|
82
|
+
opacity: 0;
|
|
83
|
+
transition: opacity var(--motion-duration-base) var(--motion-ease-standard);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.ds-app-sidebar--expanded .ds-app-sidebar__logo-text {
|
|
87
|
+
width: auto;
|
|
88
|
+
opacity: 1;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.ds-app-sidebar__toggle {
|
|
92
|
+
display: flex;
|
|
93
|
+
align-items: center;
|
|
94
|
+
justify-content: center;
|
|
95
|
+
width: 0;
|
|
96
|
+
height: 24px;
|
|
97
|
+
flex-shrink: 0;
|
|
98
|
+
background: none;
|
|
99
|
+
border: none;
|
|
100
|
+
color: var(--color-icon-primary);
|
|
101
|
+
cursor: pointer;
|
|
102
|
+
padding: 0;
|
|
103
|
+
overflow: hidden;
|
|
104
|
+
opacity: 0;
|
|
105
|
+
transition: opacity var(--motion-duration-base) var(--motion-ease-standard);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.ds-app-sidebar--expanded .ds-app-sidebar__toggle {
|
|
109
|
+
width: 24px;
|
|
110
|
+
opacity: 1;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.ds-app-sidebar__toggle .material-symbols-rounded {
|
|
114
|
+
--icon-size: var(--icon-size-md);
|
|
115
|
+
transition: transform var(--motion-duration-slow) var(--motion-ease-standard);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* ============================================
|
|
119
|
+
NAV GROUP
|
|
120
|
+
============================================ */
|
|
121
|
+
.ds-app-sidebar__nav {
|
|
122
|
+
display: flex;
|
|
123
|
+
flex-direction: column;
|
|
124
|
+
gap: var(--gap-xs);
|
|
125
|
+
flex-shrink: 0;
|
|
126
|
+
align-items: center;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.ds-app-sidebar--expanded .ds-app-sidebar__nav {
|
|
130
|
+
align-items: stretch;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* Category label — only visible when expanded */
|
|
134
|
+
.ds-app-sidebar__category {
|
|
135
|
+
padding: 0 var(--padding-lg);
|
|
136
|
+
font-family: var(--font-paragraph-sm-family);
|
|
137
|
+
font-size: var(--font-paragraph-sm-size);
|
|
138
|
+
font-weight: var(--font-paragraph-sm-weight);
|
|
139
|
+
line-height: var(--font-paragraph-sm-line-height);
|
|
140
|
+
color: var(--color-text-tertiary);
|
|
141
|
+
white-space: nowrap;
|
|
142
|
+
opacity: 0;
|
|
143
|
+
height: 0;
|
|
144
|
+
overflow: hidden;
|
|
145
|
+
transition: opacity var(--motion-duration-base) var(--motion-ease-standard), height var(--motion-duration-base) var(--motion-ease-standard);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.ds-app-sidebar--expanded .ds-app-sidebar__category {
|
|
149
|
+
opacity: 1;
|
|
150
|
+
height: 20px;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* ============================================
|
|
154
|
+
NAV BUTTON
|
|
155
|
+
============================================ */
|
|
156
|
+
.ds-app-sidebar__btn {
|
|
157
|
+
display: flex;
|
|
158
|
+
align-items: center;
|
|
159
|
+
justify-content: center;
|
|
160
|
+
height: 40px;
|
|
161
|
+
padding: var(--padding-sm);
|
|
162
|
+
border-radius: var(--radius-full);
|
|
163
|
+
background: transparent;
|
|
164
|
+
border: none;
|
|
165
|
+
color: var(--color-text-primary);
|
|
166
|
+
cursor: pointer;
|
|
167
|
+
overflow: hidden;
|
|
168
|
+
text-align: left;
|
|
169
|
+
transition: background-color var(--motion-duration-fast) var(--motion-ease-standard), padding var(--motion-duration-slow) var(--motion-ease-emphasized);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.ds-app-sidebar--expanded .ds-app-sidebar__btn {
|
|
173
|
+
width: 100%;
|
|
174
|
+
padding: var(--padding-sm) var(--padding-lg);
|
|
175
|
+
justify-content: space-between;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.ds-app-sidebar__btn:hover {
|
|
179
|
+
background-color: var(--color-action-passive-bg-hover);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.ds-app-sidebar__btn--active {
|
|
183
|
+
background-color: var(--color-action-passive-bg-hover);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.ds-app-sidebar__btn-left {
|
|
187
|
+
display: flex;
|
|
188
|
+
align-items: center;
|
|
189
|
+
gap: 0;
|
|
190
|
+
min-width: 0;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.ds-app-sidebar--expanded .ds-app-sidebar__btn-left {
|
|
194
|
+
gap: 8px;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.ds-app-sidebar__btn-icon {
|
|
198
|
+
--icon-size: var(--icon-size-md);
|
|
199
|
+
color: var(--color-icon-primary);
|
|
200
|
+
flex-shrink: 0;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.ds-app-sidebar__btn-label {
|
|
204
|
+
font-family: var(--font-paragraph-em-family);
|
|
205
|
+
font-size: var(--font-paragraph-em-size);
|
|
206
|
+
font-weight: var(--font-paragraph-em-weight);
|
|
207
|
+
line-height: var(--font-paragraph-em-line-height);
|
|
208
|
+
letter-spacing: var(--font-paragraph-em-letter-spacing);
|
|
209
|
+
color: var(--color-text-primary);
|
|
210
|
+
white-space: nowrap;
|
|
211
|
+
width: 0;
|
|
212
|
+
overflow: hidden;
|
|
213
|
+
opacity: 0;
|
|
214
|
+
transition: opacity var(--motion-duration-base) var(--motion-ease-standard);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.ds-app-sidebar--expanded .ds-app-sidebar__btn-label {
|
|
218
|
+
width: auto;
|
|
219
|
+
opacity: 1;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.ds-app-sidebar__btn-chevron {
|
|
223
|
+
font-size: 24px;
|
|
224
|
+
color: var(--color-icon-secondary);
|
|
225
|
+
flex-shrink: 0;
|
|
226
|
+
width: 0;
|
|
227
|
+
overflow: hidden;
|
|
228
|
+
transition: transform var(--motion-duration-slow) var(--motion-ease-standard), opacity var(--motion-duration-base) var(--motion-ease-standard);
|
|
229
|
+
opacity: 0;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.ds-app-sidebar--expanded .ds-app-sidebar__btn-chevron {
|
|
233
|
+
width: auto;
|
|
234
|
+
opacity: 1;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.ds-app-sidebar__btn-chevron--open {
|
|
238
|
+
transform: rotate(90deg);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/* ============================================
|
|
242
|
+
SUB-ITEMS (accordion children)
|
|
243
|
+
============================================ */
|
|
244
|
+
.ds-app-sidebar__sub-items {
|
|
245
|
+
display: flex;
|
|
246
|
+
flex-direction: column;
|
|
247
|
+
overflow: hidden;
|
|
248
|
+
max-height: 0;
|
|
249
|
+
transition: max-height var(--motion-duration-slow) var(--motion-ease-emphasized);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.ds-app-sidebar__sub-items--open {
|
|
253
|
+
max-height: 500px;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.ds-app-sidebar__sub-item {
|
|
257
|
+
display: flex;
|
|
258
|
+
align-items: flex-start;
|
|
259
|
+
height: 40px;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.ds-app-sidebar__sub-line {
|
|
263
|
+
display: flex;
|
|
264
|
+
align-items: center;
|
|
265
|
+
justify-content: center;
|
|
266
|
+
width: 44px;
|
|
267
|
+
height: 100%;
|
|
268
|
+
flex-shrink: 0;
|
|
269
|
+
padding-left: 16px;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.ds-app-sidebar__sub-line::after {
|
|
273
|
+
content: '';
|
|
274
|
+
display: block;
|
|
275
|
+
width: 1px;
|
|
276
|
+
height: 100%;
|
|
277
|
+
background-color: var(--color-bg-container-border);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.ds-app-sidebar__sub-btn {
|
|
281
|
+
display: flex;
|
|
282
|
+
align-items: center;
|
|
283
|
+
gap: 8px;
|
|
284
|
+
height: 40px;
|
|
285
|
+
padding: var(--padding-sm);
|
|
286
|
+
border-radius: var(--radius-full);
|
|
287
|
+
background: transparent;
|
|
288
|
+
border: none;
|
|
289
|
+
color: var(--color-text-primary);
|
|
290
|
+
cursor: pointer;
|
|
291
|
+
flex: 1;
|
|
292
|
+
text-align: left;
|
|
293
|
+
overflow: hidden;
|
|
294
|
+
white-space: nowrap;
|
|
295
|
+
transition: background-color var(--motion-duration-fast) var(--motion-ease-standard);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.ds-app-sidebar__sub-btn:hover {
|
|
299
|
+
background-color: var(--color-action-passive-bg-hover);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.ds-app-sidebar__sub-btn--active {
|
|
303
|
+
background-color: var(--color-action-passive-bg-hover);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.ds-app-sidebar__sub-label {
|
|
307
|
+
font-family: var(--font-paragraph-em-family);
|
|
308
|
+
font-size: var(--font-paragraph-em-size);
|
|
309
|
+
font-weight: var(--font-paragraph-em-weight);
|
|
310
|
+
line-height: var(--font-paragraph-em-line-height);
|
|
311
|
+
letter-spacing: var(--font-paragraph-em-letter-spacing);
|
|
312
|
+
color: var(--color-text-primary);
|
|
313
|
+
white-space: nowrap;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/* ============================================
|
|
317
|
+
PROFILE
|
|
318
|
+
============================================ */
|
|
319
|
+
.ds-app-sidebar__profile {
|
|
320
|
+
display: flex;
|
|
321
|
+
align-items: center;
|
|
322
|
+
justify-content: center;
|
|
323
|
+
padding: 0;
|
|
324
|
+
flex-shrink: 0;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.ds-app-sidebar--expanded .ds-app-sidebar__profile {
|
|
328
|
+
justify-content: space-between;
|
|
329
|
+
padding: 0 var(--padding-lg);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.ds-app-sidebar__profile-left {
|
|
333
|
+
display: flex;
|
|
334
|
+
align-items: center;
|
|
335
|
+
gap: 0;
|
|
336
|
+
min-width: 0;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.ds-app-sidebar--expanded .ds-app-sidebar__profile-left {
|
|
340
|
+
gap: 10px;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.ds-app-sidebar__avatar {
|
|
344
|
+
width: 40px;
|
|
345
|
+
height: 40px;
|
|
346
|
+
border-radius: var(--radius-full);
|
|
347
|
+
background-color: var(--color-bg-container-secondary);
|
|
348
|
+
flex-shrink: 0;
|
|
349
|
+
overflow: hidden;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.ds-app-sidebar__avatar img {
|
|
353
|
+
width: 100%;
|
|
354
|
+
height: 100%;
|
|
355
|
+
object-fit: cover;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.ds-app-sidebar__profile-info {
|
|
359
|
+
display: flex;
|
|
360
|
+
flex-direction: column;
|
|
361
|
+
min-width: 0;
|
|
362
|
+
width: 0;
|
|
363
|
+
overflow: hidden;
|
|
364
|
+
opacity: 0;
|
|
365
|
+
transition: opacity var(--motion-duration-base) var(--motion-ease-standard);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.ds-app-sidebar--expanded .ds-app-sidebar__profile-info {
|
|
369
|
+
width: auto;
|
|
370
|
+
opacity: 1;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.ds-app-sidebar__profile-name {
|
|
374
|
+
font-family: var(--font-paragraph-em-family);
|
|
375
|
+
font-size: var(--font-paragraph-em-size);
|
|
376
|
+
font-weight: var(--font-paragraph-em-weight);
|
|
377
|
+
line-height: var(--font-paragraph-em-line-height);
|
|
378
|
+
letter-spacing: var(--font-paragraph-em-letter-spacing);
|
|
379
|
+
color: var(--color-text-primary);
|
|
380
|
+
white-space: nowrap;
|
|
381
|
+
overflow: hidden;
|
|
382
|
+
text-overflow: ellipsis;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.ds-app-sidebar__profile-email {
|
|
386
|
+
font-family: var(--font-paragraph-family);
|
|
387
|
+
font-size: var(--font-paragraph-size);
|
|
388
|
+
font-weight: var(--font-paragraph-weight);
|
|
389
|
+
line-height: var(--font-paragraph-line-height);
|
|
390
|
+
color: var(--color-text-tertiary);
|
|
391
|
+
white-space: nowrap;
|
|
392
|
+
overflow: hidden;
|
|
393
|
+
text-overflow: ellipsis;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
.ds-app-sidebar__profile-more {
|
|
397
|
+
display: flex;
|
|
398
|
+
align-items: center;
|
|
399
|
+
justify-content: center;
|
|
400
|
+
background: none;
|
|
401
|
+
border: none;
|
|
402
|
+
color: var(--color-icon-primary);
|
|
403
|
+
cursor: pointer;
|
|
404
|
+
padding: 0;
|
|
405
|
+
flex-shrink: 0;
|
|
406
|
+
width: 0;
|
|
407
|
+
overflow: hidden;
|
|
408
|
+
opacity: 0;
|
|
409
|
+
transition: opacity var(--motion-duration-base) var(--motion-ease-standard);
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
.ds-app-sidebar--expanded .ds-app-sidebar__profile-more {
|
|
413
|
+
width: auto;
|
|
414
|
+
opacity: 1;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
.ds-app-sidebar__profile-more .material-symbols-rounded {
|
|
418
|
+
--icon-size: var(--icon-size-md);
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
/* ============================================
|
|
422
|
+
RESPONSIVE
|
|
423
|
+
============================================ */
|
|
424
|
+
@media (max-width: 768px) {
|
|
425
|
+
.ds-app-sidebar {
|
|
426
|
+
width: 0;
|
|
427
|
+
padding: 0;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
.ds-app-sidebar--expanded {
|
|
431
|
+
width: 280px;
|
|
432
|
+
padding: var(--padding-lg) 0;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface AppSidebarSubItem {
|
|
3
|
+
/** Unique key for this sub-item */
|
|
4
|
+
key: string;
|
|
5
|
+
/** Display label */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Click handler */
|
|
8
|
+
onClick?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export interface AppSidebarItem {
|
|
11
|
+
/** Unique key for this item */
|
|
12
|
+
key: string;
|
|
13
|
+
/** Material Symbols icon name */
|
|
14
|
+
icon: string;
|
|
15
|
+
/** Display label (shown when expanded) */
|
|
16
|
+
label: string;
|
|
17
|
+
/** Click handler */
|
|
18
|
+
onClick?: () => void;
|
|
19
|
+
/** Sub-items — turns this into an accordion */
|
|
20
|
+
children?: AppSidebarSubItem[];
|
|
21
|
+
}
|
|
22
|
+
export interface AppSidebarSection {
|
|
23
|
+
/** Optional category label above the group */
|
|
24
|
+
category?: string;
|
|
25
|
+
/** Nav items in this section */
|
|
26
|
+
items: AppSidebarItem[];
|
|
27
|
+
}
|
|
28
|
+
export interface AppSidebarProfile {
|
|
29
|
+
/** User display name */
|
|
30
|
+
name: string;
|
|
31
|
+
/** User email */
|
|
32
|
+
email: string;
|
|
33
|
+
/** Avatar image URL */
|
|
34
|
+
avatarUrl?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface AppSidebarProps {
|
|
37
|
+
/** Navigation sections */
|
|
38
|
+
sections: AppSidebarSection[];
|
|
39
|
+
/** Profile data for the bottom section */
|
|
40
|
+
profile?: AppSidebarProfile;
|
|
41
|
+
/** Key of the currently active item */
|
|
42
|
+
activeKey?: string;
|
|
43
|
+
/** Key of the currently active sub-item */
|
|
44
|
+
activeSubKey?: string;
|
|
45
|
+
/** Whether sidebar starts expanded */
|
|
46
|
+
defaultExpanded?: boolean;
|
|
47
|
+
/** Controlled expanded state */
|
|
48
|
+
expanded?: boolean;
|
|
49
|
+
/** Callback when expand/collapse changes */
|
|
50
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
51
|
+
/** Callback when profile more button clicked */
|
|
52
|
+
onProfileMore?: () => void;
|
|
53
|
+
/** Additional CSS classes */
|
|
54
|
+
className?: string;
|
|
55
|
+
/** Logo element — defaults to built-in robr0 logo */
|
|
56
|
+
logo?: React.ReactNode;
|
|
57
|
+
/** Text shown next to logo when expanded */
|
|
58
|
+
logoText?: string;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* AppSidebar — a collapsible left-hand navigation rail.
|
|
62
|
+
*
|
|
63
|
+
* **Collapsed** (64 px): icon-only buttons, logo mark, avatar.
|
|
64
|
+
* **Expanded** (280 px): labels, category headings, accordion
|
|
65
|
+
* sub-items with tree-line connectors, and a profile section.
|
|
66
|
+
*/
|
|
67
|
+
export declare const AppSidebar: ({ sections, profile, activeKey, activeSubKey, defaultExpanded, expanded: controlledExpanded, onExpandedChange, onProfileMore, className, logo, logoText, }: AppSidebarProps) => React.JSX.Element;
|