@heliosgraphics/ui 2.0.0-alpha.93 → 2.0.0-alpha.94
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/components/Breadcrumb/Breadcrumb.tsx +25 -23
- package/components/Button/Button.tsx +172 -174
- package/components/Checkbox/Checkbox.tsx +54 -60
- package/components/Confirm/Confirm.tsx +1 -1
- package/components/Dialog/Dialog.meta.ts +4 -0
- package/components/Dialog/Dialog.tsx +11 -2
- package/components/Dialog/Dialog.types.ts +1 -0
- package/components/Donut/Donut.tsx +1 -0
- package/components/Dropdown/Dropdown.tsx +6 -1
- package/components/Flex/Flex.meta.ts +2 -0
- package/components/Flex/Flex.tsx +2 -3
- package/components/Flex/Flex.types.ts +3 -1
- package/components/Flex/Flex.utils.ts +36 -1
- package/components/Flex/index.ts +0 -2
- package/components/Heading/Heading.tsx +3 -3
- package/components/Icon/Icon.tsx +3 -3
- package/components/Input/Input.tsx +5 -2
- package/components/Layout/components/LayoutAside/components/LayoutAsideContent/LayoutAsideContent.tsx +0 -2
- package/components/Layout/components/LayoutAside/components/LayoutAsideFooter/LayoutAsideFooter.tsx +0 -2
- package/components/Loading/Loading.tsx +8 -4
- package/components/Masonry/Masonry.meta.ts +1 -5
- package/components/Masonry/Masonry.tsx +27 -14
- package/components/Masonry/Masonry.types.ts +4 -4
- package/components/Overlay/Overlay.tsx +1 -1
- package/components/Pie/Pie.tsx +1 -0
- package/components/Progress/Progress.meta.ts +4 -0
- package/components/Progress/Progress.tsx +8 -2
- package/components/Progress/Progress.types.ts +1 -0
- package/components/Radio/Radio.tsx +57 -63
- package/components/Range/Range.meta.ts +26 -0
- package/components/Range/Range.module.css +68 -0
- package/components/Range/Range.tsx +47 -0
- package/components/Range/Range.types.ts +13 -0
- package/components/Range/index.ts +1 -0
- package/components/Select/Select.meta.ts +4 -0
- package/components/Select/Select.tsx +2 -0
- package/components/Select/Select.types.ts +1 -0
- package/components/Separator/Separator.tsx +25 -20
- package/components/Separator/components/VerticalSeparator/VerticalSeparator.tsx +1 -1
- package/components/Setup/Setup.tsx +0 -13
- package/components/Setup/css/feat.responsive.css +402 -0
- package/components/Slider/Slider.meta.ts +4 -0
- package/components/Slider/Slider.tsx +2 -2
- package/components/Slider/Slider.types.ts +1 -0
- package/components/Spacer/Spacer.tsx +3 -3
- package/components/Tabs/Tabs.tsx +14 -3
- package/components/Text/Text.tsx +3 -3
- package/components/Tile/Tile.tsx +10 -1
- package/components/Tooltip/Tooltip.tsx +3 -1
- package/components/Tooltip/Tooltip.types.ts +1 -0
- package/components/Tooltip/components/TooltipContent/TooltipContent.tsx +9 -2
- package/components/Tooltip/components/TooltipTrigger/TooltipTrigger.tsx +2 -2
- package/constants/components.ts +2 -0
- package/globals.d.ts +12 -0
- package/index.ts +1 -0
- package/package.json +6 -5
|
@@ -14,6 +14,7 @@ export const Select: FC<SelectProps> = ({
|
|
|
14
14
|
isLabelHidden,
|
|
15
15
|
isSmall,
|
|
16
16
|
isDisabled,
|
|
17
|
+
isRequired,
|
|
17
18
|
items,
|
|
18
19
|
label,
|
|
19
20
|
}) => {
|
|
@@ -35,6 +36,7 @@ export const Select: FC<SelectProps> = ({
|
|
|
35
36
|
id={htmlFor}
|
|
36
37
|
value={selectedValue}
|
|
37
38
|
disabled={isDisabled}
|
|
39
|
+
required={isRequired}
|
|
38
40
|
aria-label={isLabelHidden ? label : undefined}
|
|
39
41
|
>
|
|
40
42
|
{items?.map((item) => {
|
|
@@ -3,27 +3,32 @@ import { VerticalSeparator } from "./components/VerticalSeparator"
|
|
|
3
3
|
import styles from "./Separator.module.css"
|
|
4
4
|
import { getClasses } from "@heliosgraphics/utils"
|
|
5
5
|
import type { SeparatorProps } from "./Separator.types"
|
|
6
|
-
import {
|
|
6
|
+
import type { FC } from "react"
|
|
7
7
|
|
|
8
|
-
export const Separator: FC<SeparatorProps> =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
export const Separator: FC<SeparatorProps> = ({
|
|
9
|
+
className,
|
|
10
|
+
emphasis = "primary",
|
|
11
|
+
isVertical,
|
|
12
|
+
height,
|
|
13
|
+
lineStyle = "solid",
|
|
14
|
+
width,
|
|
15
|
+
}) => {
|
|
16
|
+
const separatorClasses: string = getClasses(className, {
|
|
17
|
+
[styles.separatorPrimary]: emphasis === "primary",
|
|
18
|
+
[styles.separatorSecondary]: emphasis === "secondary",
|
|
19
|
+
[styles.separatorTertiary]: emphasis === "tertiary",
|
|
20
|
+
})
|
|
15
21
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
const separatorProps: SeparatorProps = {
|
|
23
|
+
className: separatorClasses,
|
|
24
|
+
emphasis,
|
|
25
|
+
...(isVertical !== undefined && { isVertical }),
|
|
26
|
+
...(height !== undefined && { height }),
|
|
27
|
+
lineStyle,
|
|
28
|
+
...(width !== undefined && { width }),
|
|
29
|
+
}
|
|
24
30
|
|
|
25
|
-
|
|
31
|
+
if (isVertical) return <VerticalSeparator {...separatorProps} />
|
|
26
32
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
)
|
|
33
|
+
return <HorizontalSeparator {...separatorProps} />
|
|
34
|
+
}
|
|
@@ -16,5 +16,5 @@ export const VerticalSeparator: FC<VerticalSeparatorProps> = ({ height, classNam
|
|
|
16
16
|
height: height ? `${height ?? 0}px` : "auto",
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
return <HRMarkup style={verticalStyle} className={hrClassNames} />
|
|
19
|
+
return <HRMarkup style={verticalStyle} className={hrClassNames} aria-orientation="vertical" />
|
|
20
20
|
}
|
|
@@ -1,22 +1,9 @@
|
|
|
1
1
|
import "./Setup.components.css"
|
|
2
2
|
|
|
3
3
|
import type { FC } from "react"
|
|
4
|
-
import type { HeliosFixedThemeType } from "../../types/themes"
|
|
5
4
|
import type { SetupLinkProps, SetupProps } from "./Setup.types"
|
|
6
5
|
import { code } from "./Setup.utils"
|
|
7
6
|
|
|
8
|
-
declare global {
|
|
9
|
-
interface Window {
|
|
10
|
-
__theme: HeliosFixedThemeType
|
|
11
|
-
__onThemeChange: ((theme: HeliosFixedThemeType) => void) | undefined
|
|
12
|
-
__setPreferredTheme: (theme: HeliosFixedThemeType) => void
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
var __theme: HeliosFixedThemeType
|
|
16
|
-
var __onThemeChange: ((theme: HeliosFixedThemeType) => void) | undefined
|
|
17
|
-
var __setPreferredTheme: (theme: HeliosFixedThemeType) => void
|
|
18
|
-
}
|
|
19
|
-
|
|
20
7
|
export const Setup: FC<SetupProps> = ({ theme = "system", fixedTheme }) => {
|
|
21
8
|
const preconnectLinks: Array<SetupLinkProps> = [
|
|
22
9
|
{ id: "rsms", rel: "preconnect", href: "https://rsms.me/", crossOrigin: "anonymous" },
|
|
@@ -91,6 +91,207 @@
|
|
|
91
91
|
.tablet\:radius-max {
|
|
92
92
|
border-radius: 9999px !important;
|
|
93
93
|
}
|
|
94
|
+
|
|
95
|
+
.tablet\:gap-0 {
|
|
96
|
+
gap: 0 !important;
|
|
97
|
+
}
|
|
98
|
+
.tablet\:gap-px {
|
|
99
|
+
gap: var(--space-px) !important;
|
|
100
|
+
}
|
|
101
|
+
.tablet\:gap-1 {
|
|
102
|
+
gap: var(--space-1) !important;
|
|
103
|
+
}
|
|
104
|
+
.tablet\:gap-2 {
|
|
105
|
+
gap: var(--space-2) !important;
|
|
106
|
+
}
|
|
107
|
+
.tablet\:gap-3 {
|
|
108
|
+
gap: var(--space-3) !important;
|
|
109
|
+
}
|
|
110
|
+
.tablet\:gap-4 {
|
|
111
|
+
gap: var(--space-4) !important;
|
|
112
|
+
}
|
|
113
|
+
.tablet\:gap-5 {
|
|
114
|
+
gap: var(--space-5) !important;
|
|
115
|
+
}
|
|
116
|
+
.tablet\:gap-6 {
|
|
117
|
+
gap: var(--space-6) !important;
|
|
118
|
+
}
|
|
119
|
+
.tablet\:gap-7 {
|
|
120
|
+
gap: var(--space-7) !important;
|
|
121
|
+
}
|
|
122
|
+
.tablet\:gap-8 {
|
|
123
|
+
gap: var(--space-8) !important;
|
|
124
|
+
}
|
|
125
|
+
.tablet\:gap-9 {
|
|
126
|
+
gap: var(--space-9) !important;
|
|
127
|
+
}
|
|
128
|
+
.tablet\:gap-10 {
|
|
129
|
+
gap: var(--space-10) !important;
|
|
130
|
+
}
|
|
131
|
+
.tablet\:gap-11 {
|
|
132
|
+
gap: var(--space-11) !important;
|
|
133
|
+
}
|
|
134
|
+
.tablet\:gap-12 {
|
|
135
|
+
gap: var(--space-12) !important;
|
|
136
|
+
}
|
|
137
|
+
.tablet\:gap-13 {
|
|
138
|
+
gap: var(--space-13) !important;
|
|
139
|
+
}
|
|
140
|
+
.tablet\:gap-14 {
|
|
141
|
+
gap: var(--space-14) !important;
|
|
142
|
+
}
|
|
143
|
+
.tablet\:gap-15 {
|
|
144
|
+
gap: var(--space-15) !important;
|
|
145
|
+
}
|
|
146
|
+
.tablet\:gap-16 {
|
|
147
|
+
gap: var(--space-16) !important;
|
|
148
|
+
}
|
|
149
|
+
.tablet\:gap-24 {
|
|
150
|
+
gap: var(--space-24) !important;
|
|
151
|
+
}
|
|
152
|
+
.tablet\:gap-32 {
|
|
153
|
+
gap: var(--space-32) !important;
|
|
154
|
+
}
|
|
155
|
+
.tablet\:gap-40 {
|
|
156
|
+
gap: var(--space-40) !important;
|
|
157
|
+
}
|
|
158
|
+
.tablet\:gap-48 {
|
|
159
|
+
gap: var(--space-48) !important;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.tablet\:px-0 {
|
|
163
|
+
padding-inline: 0 !important;
|
|
164
|
+
}
|
|
165
|
+
.tablet\:px-px {
|
|
166
|
+
padding-inline: var(--space-px) !important;
|
|
167
|
+
}
|
|
168
|
+
.tablet\:px-1 {
|
|
169
|
+
padding-inline: var(--space-1) !important;
|
|
170
|
+
}
|
|
171
|
+
.tablet\:px-2 {
|
|
172
|
+
padding-inline: var(--space-2) !important;
|
|
173
|
+
}
|
|
174
|
+
.tablet\:px-3 {
|
|
175
|
+
padding-inline: var(--space-3) !important;
|
|
176
|
+
}
|
|
177
|
+
.tablet\:px-4 {
|
|
178
|
+
padding-inline: var(--space-4) !important;
|
|
179
|
+
}
|
|
180
|
+
.tablet\:px-5 {
|
|
181
|
+
padding-inline: var(--space-5) !important;
|
|
182
|
+
}
|
|
183
|
+
.tablet\:px-6 {
|
|
184
|
+
padding-inline: var(--space-6) !important;
|
|
185
|
+
}
|
|
186
|
+
.tablet\:px-7 {
|
|
187
|
+
padding-inline: var(--space-7) !important;
|
|
188
|
+
}
|
|
189
|
+
.tablet\:px-8 {
|
|
190
|
+
padding-inline: var(--space-8) !important;
|
|
191
|
+
}
|
|
192
|
+
.tablet\:px-9 {
|
|
193
|
+
padding-inline: var(--space-9) !important;
|
|
194
|
+
}
|
|
195
|
+
.tablet\:px-10 {
|
|
196
|
+
padding-inline: var(--space-10) !important;
|
|
197
|
+
}
|
|
198
|
+
.tablet\:px-11 {
|
|
199
|
+
padding-inline: var(--space-11) !important;
|
|
200
|
+
}
|
|
201
|
+
.tablet\:px-12 {
|
|
202
|
+
padding-inline: var(--space-12) !important;
|
|
203
|
+
}
|
|
204
|
+
.tablet\:px-13 {
|
|
205
|
+
padding-inline: var(--space-13) !important;
|
|
206
|
+
}
|
|
207
|
+
.tablet\:px-14 {
|
|
208
|
+
padding-inline: var(--space-14) !important;
|
|
209
|
+
}
|
|
210
|
+
.tablet\:px-15 {
|
|
211
|
+
padding-inline: var(--space-15) !important;
|
|
212
|
+
}
|
|
213
|
+
.tablet\:px-16 {
|
|
214
|
+
padding-inline: var(--space-16) !important;
|
|
215
|
+
}
|
|
216
|
+
.tablet\:px-24 {
|
|
217
|
+
padding-inline: var(--space-24) !important;
|
|
218
|
+
}
|
|
219
|
+
.tablet\:px-32 {
|
|
220
|
+
padding-inline: var(--space-32) !important;
|
|
221
|
+
}
|
|
222
|
+
.tablet\:px-40 {
|
|
223
|
+
padding-inline: var(--space-40) !important;
|
|
224
|
+
}
|
|
225
|
+
.tablet\:px-48 {
|
|
226
|
+
padding-inline: var(--space-48) !important;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.tablet\:py-0 {
|
|
230
|
+
padding-block: 0 !important;
|
|
231
|
+
}
|
|
232
|
+
.tablet\:py-px {
|
|
233
|
+
padding-block: var(--space-px) !important;
|
|
234
|
+
}
|
|
235
|
+
.tablet\:py-1 {
|
|
236
|
+
padding-block: var(--space-1) !important;
|
|
237
|
+
}
|
|
238
|
+
.tablet\:py-2 {
|
|
239
|
+
padding-block: var(--space-2) !important;
|
|
240
|
+
}
|
|
241
|
+
.tablet\:py-3 {
|
|
242
|
+
padding-block: var(--space-3) !important;
|
|
243
|
+
}
|
|
244
|
+
.tablet\:py-4 {
|
|
245
|
+
padding-block: var(--space-4) !important;
|
|
246
|
+
}
|
|
247
|
+
.tablet\:py-5 {
|
|
248
|
+
padding-block: var(--space-5) !important;
|
|
249
|
+
}
|
|
250
|
+
.tablet\:py-6 {
|
|
251
|
+
padding-block: var(--space-6) !important;
|
|
252
|
+
}
|
|
253
|
+
.tablet\:py-7 {
|
|
254
|
+
padding-block: var(--space-7) !important;
|
|
255
|
+
}
|
|
256
|
+
.tablet\:py-8 {
|
|
257
|
+
padding-block: var(--space-8) !important;
|
|
258
|
+
}
|
|
259
|
+
.tablet\:py-9 {
|
|
260
|
+
padding-block: var(--space-9) !important;
|
|
261
|
+
}
|
|
262
|
+
.tablet\:py-10 {
|
|
263
|
+
padding-block: var(--space-10) !important;
|
|
264
|
+
}
|
|
265
|
+
.tablet\:py-11 {
|
|
266
|
+
padding-block: var(--space-11) !important;
|
|
267
|
+
}
|
|
268
|
+
.tablet\:py-12 {
|
|
269
|
+
padding-block: var(--space-12) !important;
|
|
270
|
+
}
|
|
271
|
+
.tablet\:py-13 {
|
|
272
|
+
padding-block: var(--space-13) !important;
|
|
273
|
+
}
|
|
274
|
+
.tablet\:py-14 {
|
|
275
|
+
padding-block: var(--space-14) !important;
|
|
276
|
+
}
|
|
277
|
+
.tablet\:py-15 {
|
|
278
|
+
padding-block: var(--space-15) !important;
|
|
279
|
+
}
|
|
280
|
+
.tablet\:py-16 {
|
|
281
|
+
padding-block: var(--space-16) !important;
|
|
282
|
+
}
|
|
283
|
+
.tablet\:py-24 {
|
|
284
|
+
padding-block: var(--space-24) !important;
|
|
285
|
+
}
|
|
286
|
+
.tablet\:py-32 {
|
|
287
|
+
padding-block: var(--space-32) !important;
|
|
288
|
+
}
|
|
289
|
+
.tablet\:py-40 {
|
|
290
|
+
padding-block: var(--space-40) !important;
|
|
291
|
+
}
|
|
292
|
+
.tablet\:py-48 {
|
|
293
|
+
padding-block: var(--space-48) !important;
|
|
294
|
+
}
|
|
94
295
|
}
|
|
95
296
|
|
|
96
297
|
@media (min-width: 0) and (max-width: 640px) {
|
|
@@ -184,5 +385,206 @@
|
|
|
184
385
|
.mobile\:radius-max {
|
|
185
386
|
border-radius: 9999px !important;
|
|
186
387
|
}
|
|
388
|
+
|
|
389
|
+
.mobile\:gap-0 {
|
|
390
|
+
gap: 0 !important;
|
|
391
|
+
}
|
|
392
|
+
.mobile\:gap-px {
|
|
393
|
+
gap: var(--space-px) !important;
|
|
394
|
+
}
|
|
395
|
+
.mobile\:gap-1 {
|
|
396
|
+
gap: var(--space-1) !important;
|
|
397
|
+
}
|
|
398
|
+
.mobile\:gap-2 {
|
|
399
|
+
gap: var(--space-2) !important;
|
|
400
|
+
}
|
|
401
|
+
.mobile\:gap-3 {
|
|
402
|
+
gap: var(--space-3) !important;
|
|
403
|
+
}
|
|
404
|
+
.mobile\:gap-4 {
|
|
405
|
+
gap: var(--space-4) !important;
|
|
406
|
+
}
|
|
407
|
+
.mobile\:gap-5 {
|
|
408
|
+
gap: var(--space-5) !important;
|
|
409
|
+
}
|
|
410
|
+
.mobile\:gap-6 {
|
|
411
|
+
gap: var(--space-6) !important;
|
|
412
|
+
}
|
|
413
|
+
.mobile\:gap-7 {
|
|
414
|
+
gap: var(--space-7) !important;
|
|
415
|
+
}
|
|
416
|
+
.mobile\:gap-8 {
|
|
417
|
+
gap: var(--space-8) !important;
|
|
418
|
+
}
|
|
419
|
+
.mobile\:gap-9 {
|
|
420
|
+
gap: var(--space-9) !important;
|
|
421
|
+
}
|
|
422
|
+
.mobile\:gap-10 {
|
|
423
|
+
gap: var(--space-10) !important;
|
|
424
|
+
}
|
|
425
|
+
.mobile\:gap-11 {
|
|
426
|
+
gap: var(--space-11) !important;
|
|
427
|
+
}
|
|
428
|
+
.mobile\:gap-12 {
|
|
429
|
+
gap: var(--space-12) !important;
|
|
430
|
+
}
|
|
431
|
+
.mobile\:gap-13 {
|
|
432
|
+
gap: var(--space-13) !important;
|
|
433
|
+
}
|
|
434
|
+
.mobile\:gap-14 {
|
|
435
|
+
gap: var(--space-14) !important;
|
|
436
|
+
}
|
|
437
|
+
.mobile\:gap-15 {
|
|
438
|
+
gap: var(--space-15) !important;
|
|
439
|
+
}
|
|
440
|
+
.mobile\:gap-16 {
|
|
441
|
+
gap: var(--space-16) !important;
|
|
442
|
+
}
|
|
443
|
+
.mobile\:gap-24 {
|
|
444
|
+
gap: var(--space-24) !important;
|
|
445
|
+
}
|
|
446
|
+
.mobile\:gap-32 {
|
|
447
|
+
gap: var(--space-32) !important;
|
|
448
|
+
}
|
|
449
|
+
.mobile\:gap-40 {
|
|
450
|
+
gap: var(--space-40) !important;
|
|
451
|
+
}
|
|
452
|
+
.mobile\:gap-48 {
|
|
453
|
+
gap: var(--space-48) !important;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
.mobile\:px-0 {
|
|
457
|
+
padding-inline: 0 !important;
|
|
458
|
+
}
|
|
459
|
+
.mobile\:px-px {
|
|
460
|
+
padding-inline: var(--space-px) !important;
|
|
461
|
+
}
|
|
462
|
+
.mobile\:px-1 {
|
|
463
|
+
padding-inline: var(--space-1) !important;
|
|
464
|
+
}
|
|
465
|
+
.mobile\:px-2 {
|
|
466
|
+
padding-inline: var(--space-2) !important;
|
|
467
|
+
}
|
|
468
|
+
.mobile\:px-3 {
|
|
469
|
+
padding-inline: var(--space-3) !important;
|
|
470
|
+
}
|
|
471
|
+
.mobile\:px-4 {
|
|
472
|
+
padding-inline: var(--space-4) !important;
|
|
473
|
+
}
|
|
474
|
+
.mobile\:px-5 {
|
|
475
|
+
padding-inline: var(--space-5) !important;
|
|
476
|
+
}
|
|
477
|
+
.mobile\:px-6 {
|
|
478
|
+
padding-inline: var(--space-6) !important;
|
|
479
|
+
}
|
|
480
|
+
.mobile\:px-7 {
|
|
481
|
+
padding-inline: var(--space-7) !important;
|
|
482
|
+
}
|
|
483
|
+
.mobile\:px-8 {
|
|
484
|
+
padding-inline: var(--space-8) !important;
|
|
485
|
+
}
|
|
486
|
+
.mobile\:px-9 {
|
|
487
|
+
padding-inline: var(--space-9) !important;
|
|
488
|
+
}
|
|
489
|
+
.mobile\:px-10 {
|
|
490
|
+
padding-inline: var(--space-10) !important;
|
|
491
|
+
}
|
|
492
|
+
.mobile\:px-11 {
|
|
493
|
+
padding-inline: var(--space-11) !important;
|
|
494
|
+
}
|
|
495
|
+
.mobile\:px-12 {
|
|
496
|
+
padding-inline: var(--space-12) !important;
|
|
497
|
+
}
|
|
498
|
+
.mobile\:px-13 {
|
|
499
|
+
padding-inline: var(--space-13) !important;
|
|
500
|
+
}
|
|
501
|
+
.mobile\:px-14 {
|
|
502
|
+
padding-inline: var(--space-14) !important;
|
|
503
|
+
}
|
|
504
|
+
.mobile\:px-15 {
|
|
505
|
+
padding-inline: var(--space-15) !important;
|
|
506
|
+
}
|
|
507
|
+
.mobile\:px-16 {
|
|
508
|
+
padding-inline: var(--space-16) !important;
|
|
509
|
+
}
|
|
510
|
+
.mobile\:px-24 {
|
|
511
|
+
padding-inline: var(--space-24) !important;
|
|
512
|
+
}
|
|
513
|
+
.mobile\:px-32 {
|
|
514
|
+
padding-inline: var(--space-32) !important;
|
|
515
|
+
}
|
|
516
|
+
.mobile\:px-40 {
|
|
517
|
+
padding-inline: var(--space-40) !important;
|
|
518
|
+
}
|
|
519
|
+
.mobile\:px-48 {
|
|
520
|
+
padding-inline: var(--space-48) !important;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.mobile\:py-0 {
|
|
524
|
+
padding-block: 0 !important;
|
|
525
|
+
}
|
|
526
|
+
.mobile\:py-px {
|
|
527
|
+
padding-block: var(--space-px) !important;
|
|
528
|
+
}
|
|
529
|
+
.mobile\:py-1 {
|
|
530
|
+
padding-block: var(--space-1) !important;
|
|
531
|
+
}
|
|
532
|
+
.mobile\:py-2 {
|
|
533
|
+
padding-block: var(--space-2) !important;
|
|
534
|
+
}
|
|
535
|
+
.mobile\:py-3 {
|
|
536
|
+
padding-block: var(--space-3) !important;
|
|
537
|
+
}
|
|
538
|
+
.mobile\:py-4 {
|
|
539
|
+
padding-block: var(--space-4) !important;
|
|
540
|
+
}
|
|
541
|
+
.mobile\:py-5 {
|
|
542
|
+
padding-block: var(--space-5) !important;
|
|
543
|
+
}
|
|
544
|
+
.mobile\:py-6 {
|
|
545
|
+
padding-block: var(--space-6) !important;
|
|
546
|
+
}
|
|
547
|
+
.mobile\:py-7 {
|
|
548
|
+
padding-block: var(--space-7) !important;
|
|
549
|
+
}
|
|
550
|
+
.mobile\:py-8 {
|
|
551
|
+
padding-block: var(--space-8) !important;
|
|
552
|
+
}
|
|
553
|
+
.mobile\:py-9 {
|
|
554
|
+
padding-block: var(--space-9) !important;
|
|
555
|
+
}
|
|
556
|
+
.mobile\:py-10 {
|
|
557
|
+
padding-block: var(--space-10) !important;
|
|
558
|
+
}
|
|
559
|
+
.mobile\:py-11 {
|
|
560
|
+
padding-block: var(--space-11) !important;
|
|
561
|
+
}
|
|
562
|
+
.mobile\:py-12 {
|
|
563
|
+
padding-block: var(--space-12) !important;
|
|
564
|
+
}
|
|
565
|
+
.mobile\:py-13 {
|
|
566
|
+
padding-block: var(--space-13) !important;
|
|
567
|
+
}
|
|
568
|
+
.mobile\:py-14 {
|
|
569
|
+
padding-block: var(--space-14) !important;
|
|
570
|
+
}
|
|
571
|
+
.mobile\:py-15 {
|
|
572
|
+
padding-block: var(--space-15) !important;
|
|
573
|
+
}
|
|
574
|
+
.mobile\:py-16 {
|
|
575
|
+
padding-block: var(--space-16) !important;
|
|
576
|
+
}
|
|
577
|
+
.mobile\:py-24 {
|
|
578
|
+
padding-block: var(--space-24) !important;
|
|
579
|
+
}
|
|
580
|
+
.mobile\:py-32 {
|
|
581
|
+
padding-block: var(--space-32) !important;
|
|
582
|
+
}
|
|
583
|
+
.mobile\:py-40 {
|
|
584
|
+
padding-block: var(--space-40) !important;
|
|
585
|
+
}
|
|
586
|
+
.mobile\:py-48 {
|
|
587
|
+
padding-block: var(--space-48) !important;
|
|
588
|
+
}
|
|
187
589
|
}
|
|
188
590
|
}
|
|
@@ -3,11 +3,11 @@ import styles from "./Slider.module.css"
|
|
|
3
3
|
import type { FC } from "react"
|
|
4
4
|
import type { SliderProps } from "./Slider.types"
|
|
5
5
|
|
|
6
|
-
export const Slider: FC<SliderProps> = ({ items }) => {
|
|
6
|
+
export const Slider: FC<SliderProps> = ({ "aria-label": ariaLabel, items }) => {
|
|
7
7
|
const sliderClasses: string = getClasses(styles.slider, "flex")
|
|
8
8
|
|
|
9
9
|
return (
|
|
10
|
-
<ul className={sliderClasses} data-ui-component="Slider">
|
|
10
|
+
<ul className={sliderClasses} role="list" aria-label={ariaLabel} data-ui-component="Slider">
|
|
11
11
|
{items?.map((item, index) => (
|
|
12
12
|
<li key={`slider-${index}`}>{item}</li>
|
|
13
13
|
))}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { FC } from "react"
|
|
2
2
|
import type { SpacerProps } from "./Spacer.types"
|
|
3
3
|
|
|
4
|
-
export const Spacer: FC<SpacerProps> =
|
|
4
|
+
export const Spacer: FC<SpacerProps> = ({ gap }) => {
|
|
5
5
|
return <div style={{ height: `${gap ?? 0}px` }} data-ui-component="Spacer" />
|
|
6
|
-
}
|
|
6
|
+
}
|
package/components/Tabs/Tabs.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import { useId, useState, type FC, type KeyboardEvent } from "react"
|
|
3
|
+
import { useId, useRef, useState, type FC, type KeyboardEvent } from "react"
|
|
4
4
|
import type { TabsProps } from "./Tabs.types"
|
|
5
5
|
import styles from "./Tabs.module.css"
|
|
6
6
|
import { Text } from "../Text"
|
|
@@ -8,16 +8,24 @@ import { Text } from "../Text"
|
|
|
8
8
|
export const Tabs: FC<TabsProps> = ({ active: activeNumber, items, sections }) => {
|
|
9
9
|
const [active, setActive] = useState(activeNumber || 0)
|
|
10
10
|
const tabsId: string = useId()
|
|
11
|
+
const tabRefs = useRef<(HTMLDivElement | null)[]>([])
|
|
11
12
|
|
|
12
13
|
if (!items || !sections) return null
|
|
13
14
|
|
|
14
15
|
const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>, index: number): void => {
|
|
16
|
+
let nextIndex: number | null = null
|
|
17
|
+
|
|
15
18
|
if (event.key === "ArrowRight") {
|
|
16
19
|
event.preventDefault()
|
|
17
|
-
|
|
20
|
+
nextIndex = (index + 1) % items.length
|
|
18
21
|
} else if (event.key === "ArrowLeft") {
|
|
19
22
|
event.preventDefault()
|
|
20
|
-
|
|
23
|
+
nextIndex = (index - 1 + items.length) % items.length
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (nextIndex !== null) {
|
|
27
|
+
setActive(nextIndex)
|
|
28
|
+
tabRefs.current[nextIndex]?.focus()
|
|
21
29
|
}
|
|
22
30
|
}
|
|
23
31
|
|
|
@@ -27,6 +35,9 @@ export const Tabs: FC<TabsProps> = ({ active: activeNumber, items, sections }) =
|
|
|
27
35
|
{items.map((tab, index) => (
|
|
28
36
|
<div
|
|
29
37
|
key={tab}
|
|
38
|
+
ref={(el) => {
|
|
39
|
+
tabRefs.current[index] = el
|
|
40
|
+
}}
|
|
30
41
|
role="tab"
|
|
31
42
|
tabIndex={active === index ? 0 : -1}
|
|
32
43
|
aria-selected={active === index}
|
package/components/Text/Text.tsx
CHANGED
|
@@ -4,12 +4,12 @@ import { getTypographyUtility } from "./Text.utils"
|
|
|
4
4
|
import { P } from "./components/P"
|
|
5
5
|
import { Small } from "./components/Small"
|
|
6
6
|
import { Tiny } from "./components/Tiny"
|
|
7
|
-
import {
|
|
7
|
+
import type { FC } from "react"
|
|
8
8
|
import styles from "./Text.module.css"
|
|
9
9
|
import type { TextProps } from "./Text.types"
|
|
10
10
|
import { Micro } from "./components/Micro"
|
|
11
11
|
|
|
12
|
-
export const Text: FC<TextProps> =
|
|
12
|
+
export const Text: FC<TextProps> = (props) => {
|
|
13
13
|
const textClasses: string = getClasses(props.className, styles.text, {
|
|
14
14
|
[styles.textPrimary]: props.emphasis === "primary",
|
|
15
15
|
[styles.textSecondary]: props.emphasis === "secondary",
|
|
@@ -54,4 +54,4 @@ export const Text: FC<TextProps> = memo((props) => {
|
|
|
54
54
|
default:
|
|
55
55
|
return <Div {...baseTextProps} />
|
|
56
56
|
}
|
|
57
|
-
}
|
|
57
|
+
}
|
package/components/Tile/Tile.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import { Icon } from "../Icon"
|
|
|
4
4
|
import { Text } from "../Text"
|
|
5
5
|
import { Flex } from "../Flex"
|
|
6
6
|
import styles from "./Tile.module.css"
|
|
7
|
-
import { type FC } from "react"
|
|
7
|
+
import { type FC, type KeyboardEvent } from "react"
|
|
8
8
|
import type { TileProps } from "./Tile.types"
|
|
9
9
|
import type { HeliosColorType } from "../../types/colors"
|
|
10
10
|
|
|
@@ -19,8 +19,16 @@ export const Tile: FC<TileProps> = ({
|
|
|
19
19
|
isRound,
|
|
20
20
|
appearance = "light",
|
|
21
21
|
}) => {
|
|
22
|
+
const isClickable: boolean = !!onClick
|
|
22
23
|
const isLarge: boolean = size > 64
|
|
23
24
|
|
|
25
|
+
const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>): void => {
|
|
26
|
+
if ((event.key === "Enter" || event.key === " ") && onClick) {
|
|
27
|
+
event.preventDefault()
|
|
28
|
+
onClick(event as unknown as React.MouseEvent<HTMLDivElement>)
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
24
32
|
const resolvedColor: HeliosColorType = color
|
|
25
33
|
|
|
26
34
|
const tileColorClasses: Array<string> = getColorClasses(resolvedColor, appearance)
|
|
@@ -33,6 +41,7 @@ export const Tile: FC<TileProps> = ({
|
|
|
33
41
|
return (
|
|
34
42
|
<Flex
|
|
35
43
|
{...(onClick && { onClick })}
|
|
44
|
+
{...(isClickable && { role: "button" as const, tabIndex: 0, onKeyDown: handleKeyDown })}
|
|
36
45
|
className={tileClasses}
|
|
37
46
|
data-ui-component="Tile"
|
|
38
47
|
isCentered={true}
|
|
@@ -24,6 +24,7 @@ const TooltipComponent: FC<TooltipProps> = ({ children = null, position = "botto
|
|
|
24
24
|
const triggerRef = useRef<HTMLDivElement | null>(null)
|
|
25
25
|
const popoverRef = useRef<HTMLDivElement | null>(null)
|
|
26
26
|
const id: string = useId()
|
|
27
|
+
const tooltipId: string = `tooltip-${id.replace(/:/g, "")}`
|
|
27
28
|
const anchorName: string = `--tooltip-${id.replace(/:/g, "")}`
|
|
28
29
|
|
|
29
30
|
const positionClass: string | undefined = POSITION_CLASS_MAP[position]
|
|
@@ -85,9 +86,10 @@ const TooltipComponent: FC<TooltipProps> = ({ children = null, position = "botto
|
|
|
85
86
|
popoverRef,
|
|
86
87
|
tooltipClasses,
|
|
87
88
|
anchorName,
|
|
89
|
+
tooltipId,
|
|
88
90
|
isOpen,
|
|
89
91
|
}),
|
|
90
|
-
[tooltipClasses, anchorName, isOpen],
|
|
92
|
+
[tooltipClasses, anchorName, tooltipId, isOpen],
|
|
91
93
|
)
|
|
92
94
|
|
|
93
95
|
return (
|