@dnotrever2/super-kit 0.1.26 → 0.1.28
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/README.md +122 -81
- package/dist/Badge/Badge.d.ts +2 -1
- package/dist/Breadcrumb/Breadcrumb.d.ts +2 -1
- package/dist/Button/Button.d.ts +4 -1
- package/dist/Link/Link.d.ts +2 -1
- package/dist/Markers/Markers.d.ts +8 -3
- package/dist/Progress/Progress.d.ts +2 -1
- package/dist/Spinner/Spinner.d.ts +9 -4
- package/dist/Steps/Steps.d.ts +8 -3
- package/dist/super-kit.cjs +1 -1
- package/dist/super-kit.cjs.map +1 -1
- package/dist/super-kit.css +1 -1
- package/dist/super-kit.js +2487 -2242
- package/dist/super-kit.js.map +1 -1
- package/dist/types/index.d.ts +3 -0
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -23,7 +23,19 @@ npm install react react-dom
|
|
|
23
23
|
Import the global stylesheet once at your app's entry point. It provides all design tokens, base resets, and scrollbar utilities:
|
|
24
24
|
|
|
25
25
|
```ts
|
|
26
|
-
import "@dnotrever2/super-kit/
|
|
26
|
+
import "@dnotrever2/super-kit/styles.css";
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
To override colors or tokens in the consuming app, define the same CSS variables after the SuperKit stylesheet:
|
|
30
|
+
|
|
31
|
+
```css
|
|
32
|
+
@import "@dnotrever2/super-kit/styles.css";
|
|
33
|
+
|
|
34
|
+
:root {
|
|
35
|
+
--color-blue-1: #2563eb;
|
|
36
|
+
--color-blue-1-hover: #1d4ed8;
|
|
37
|
+
--color-blue-1-active: #1e40af;
|
|
38
|
+
}
|
|
27
39
|
```
|
|
28
40
|
|
|
29
41
|
> CSS modules are injected into the JS bundle by Vite — there is no separate `.css` output per component. Only the global stylesheet needs a manual import.
|
|
@@ -49,7 +61,7 @@ import { Accordion, Badge } from "@dnotrever2/super-kit";
|
|
|
49
61
|
},
|
|
50
62
|
{
|
|
51
63
|
value: "limits",
|
|
52
|
-
title: <>Usage limits <Badge variant="
|
|
64
|
+
title: <>Usage limits <Badge variant="yellow2" pill>3</Badge></>,
|
|
53
65
|
content: "Requests are throttled when the workspace reaches its quota."
|
|
54
66
|
}
|
|
55
67
|
]}
|
|
@@ -127,18 +139,18 @@ Status labels and tags.
|
|
|
127
139
|
```tsx
|
|
128
140
|
import { Badge } from "@dnotrever2/super-kit";
|
|
129
141
|
|
|
130
|
-
<Badge variant="
|
|
131
|
-
<Badge variant="
|
|
132
|
-
<Badge variant="
|
|
133
|
-
<Badge variant="
|
|
134
|
-
<Badge variant="
|
|
135
|
-
<Badge variant="
|
|
142
|
+
<Badge variant="green2">Deployed</Badge>
|
|
143
|
+
<Badge variant="red2" pill>Failed</Badge>
|
|
144
|
+
<Badge variant="red2" coloredText>Failed</Badge>
|
|
145
|
+
<Badge variant="red2" outline>Failed</Badge>
|
|
146
|
+
<Badge variant="blue2" label labelDirection="left">New</Badge>
|
|
147
|
+
<Badge variant="green2" indicator aria-label="Online" />
|
|
136
148
|
<Badge dismissable onDismiss={() => {}}>api-gateway</Badge>
|
|
137
149
|
```
|
|
138
150
|
|
|
139
151
|
| Prop | Type | Default |
|
|
140
152
|
| ------------- | ------------------------------------------------------------------------------------------------------------------------------- | --------------- |
|
|
141
|
-
| `variant` | `
|
|
153
|
+
| `variant` | `blue/green/yellow/red/gray` + `1/2/3`, optional `Soft` suffix, e.g. `"blue2Soft"` | `"gray2"` |
|
|
142
154
|
| `icon` | `ReactNode` | — |
|
|
143
155
|
| `pill` | `boolean` | `false` |
|
|
144
156
|
| `outline` | `boolean` | `false` |
|
|
@@ -149,7 +161,7 @@ import { Badge } from "@dnotrever2/super-kit";
|
|
|
149
161
|
| `dismissable` | `boolean` | `false` |
|
|
150
162
|
| `onDismiss` | `() => void` | — |
|
|
151
163
|
|
|
152
|
-
Badge variants match Button variants.
|
|
164
|
+
Badge variants match Button variants. Tones run from `1` lighter, `2` medium, and `3` darker. Use `coloredText` when the text should follow the badge variant color on a soft background. Outline badges use the variant color for the text. Use `pill` for the rounded shape. Use `indicator` for a small status dot; provide an accessible label with `aria-label`.
|
|
153
165
|
|
|
154
166
|
Badge also accepts native `<span>` attributes, including `className`, `style`, `id`, `title`, and `aria-*`. For one-off visual tweaks, use `style` or `className`; the internal CSS variables `--badge-bg`, `--badge-fg`, and `--badge-border` can be overridden for custom background, text, and border colors.
|
|
155
167
|
|
|
@@ -176,6 +188,7 @@ import { Breadcrumb } from "@dnotrever2/super-kit";
|
|
|
176
188
|
| `items` | `BreadcrumbItem[]` | required |
|
|
177
189
|
| `separator` | `ReactNode` | chevron icon |
|
|
178
190
|
| `label` | `string` | `"Breadcrumb"` |
|
|
191
|
+
| `colorCurrent` | `boolean` | `false` |
|
|
179
192
|
|
|
180
193
|
**BreadcrumbItem fields**
|
|
181
194
|
|
|
@@ -195,36 +208,38 @@ The last item is treated as the current page unless `current` is set explicitly.
|
|
|
195
208
|
|
|
196
209
|
### Button
|
|
197
210
|
|
|
198
|
-
Standard action button with
|
|
211
|
+
Standard action button with muted color-scale variants.
|
|
199
212
|
|
|
200
213
|
```tsx
|
|
201
214
|
import { Button, Spinner } from "@dnotrever2/super-kit";
|
|
202
215
|
|
|
203
|
-
<Button variant="
|
|
204
|
-
<Button variant="
|
|
205
|
-
<Button variant="
|
|
206
|
-
<Button variant="
|
|
207
|
-
<Button variant="
|
|
208
|
-
<Button variant="
|
|
209
|
-
<Button variant="
|
|
210
|
-
<Button variant="
|
|
211
|
-
<Button variant="
|
|
216
|
+
<Button variant="blue2" onClick={deploy}>Deploy</Button>
|
|
217
|
+
<Button variant="green2" icon={<CheckIcon />}>Approve</Button>
|
|
218
|
+
<Button variant="red2">Delete</Button>
|
|
219
|
+
<Button variant="red2Soft">Delete</Button>
|
|
220
|
+
<Button variant="blue2" outline>Configure</Button>
|
|
221
|
+
<Button variant="blue2" transparent>Deploy</Button>
|
|
222
|
+
<Button variant="blue2" rounded>Deploy</Button>
|
|
223
|
+
<Button variant="gray2Soft" icon={<SettingsIcon />} aria-label="Settings" />
|
|
224
|
+
<Button variant="blue2" disabled icon={<Spinner size="sm" onColor />}>
|
|
212
225
|
Loading...
|
|
213
226
|
</Button>
|
|
214
227
|
```
|
|
215
228
|
|
|
216
|
-
| Prop | Type
|
|
217
|
-
| ---------- |
|
|
218
|
-
| `variant` | `
|
|
219
|
-
| `size` | `"sm" \| "md" \| "lg"`
|
|
220
|
-
| `icon` | `ReactNode`
|
|
221
|
-
| `outline` | `boolean`
|
|
222
|
-
| `rounded` | `boolean`
|
|
223
|
-
| `coloredText` | `boolean`
|
|
224
|
-
| `transparent` | `boolean`
|
|
225
|
-
| `disabled` | `boolean`
|
|
226
|
-
|
|
227
|
-
|
|
229
|
+
| Prop | Type | Default |
|
|
230
|
+
| ---------- | ------------------------------------------------------------------------------------ | --------- |
|
|
231
|
+
| `variant` | `blue/green/yellow/red/gray` + `1/2/3`, optional `Soft` suffix, e.g. `"blue2Soft"` | `"gray2"` |
|
|
232
|
+
| `size` | `"sm" \| "md" \| "lg"` | `"md"` |
|
|
233
|
+
| `icon` | `ReactNode` | — |
|
|
234
|
+
| `outline` | `boolean` | `false` |
|
|
235
|
+
| `rounded` | `boolean` | `false` |
|
|
236
|
+
| `coloredText` | `boolean` | `false` |
|
|
237
|
+
| `transparent` | `boolean` | `false` |
|
|
238
|
+
| `disabled` | `boolean` | `false` |
|
|
239
|
+
|
|
240
|
+
Tones run from `1` lighter, `2` medium, and `3` darker. Every tone has a `Soft` variant, and the same soft color is reused by disabled and subdued appearances.
|
|
241
|
+
|
|
242
|
+
Normal buttons use the stronger tone background. Use `coloredText` when the text should follow the button variant color on a soft background. Use `transparent` when the button should start without a background and reveal the variant background on hover. Outline buttons use the variant color for the text and border.
|
|
228
243
|
To create a loading button, pass a `Spinner` as `icon`, use text such as `"Loading..."`, and set `disabled` to block interaction.
|
|
229
244
|
To create an icon button, pass only `icon` and no text. Provide an accessible label with `aria-label`.
|
|
230
245
|
|
|
@@ -394,23 +409,23 @@ Text link with variants aligned to Button and Badge colors.
|
|
|
394
409
|
```tsx
|
|
395
410
|
import { Link } from "@dnotrever2/super-kit";
|
|
396
411
|
|
|
397
|
-
<Link href="/docs" variant="
|
|
398
|
-
<Link href="/status" variant="
|
|
412
|
+
<Link href="/docs" variant="blue2">Documentation</Link>
|
|
413
|
+
<Link href="/status" variant="green2" underlined>Status</Link>
|
|
399
414
|
<Link href="https://example.com" target="_blank" noreferrer>
|
|
400
415
|
External docs
|
|
401
416
|
</Link>
|
|
402
|
-
<Link href="/danger-zone" variant="
|
|
417
|
+
<Link href="/danger-zone" variant="red2" opacity={0.72}>
|
|
403
418
|
Danger zone
|
|
404
419
|
</Link>
|
|
405
420
|
<Link href="/settings" disabled>Settings</Link>
|
|
406
421
|
```
|
|
407
422
|
|
|
408
|
-
| Prop | Type
|
|
409
|
-
| ------------- |
|
|
410
|
-
| `variant` | `
|
|
411
|
-
| `href` | `string`
|
|
412
|
-
| `target` | `HTMLAttributeAnchorTarget`
|
|
413
|
-
| `underlined` | `boolean`
|
|
423
|
+
| Prop | Type | Default |
|
|
424
|
+
| ------------- | -------------------------------------------------------------------------------------- | --------- |
|
|
425
|
+
| `variant` | `blue/green/yellow/red/gray` + `1/2/3`, optional `Soft` suffix, e.g. `"blue2Soft"` | `"blue2"` |
|
|
426
|
+
| `href` | `string` | — |
|
|
427
|
+
| `target` | `HTMLAttributeAnchorTarget` | — |
|
|
428
|
+
| `underlined` | `boolean` | `false` |
|
|
414
429
|
| `opacity` | `number` | `1` |
|
|
415
430
|
| `disabled` | `boolean` | `false` |
|
|
416
431
|
| `noreferrer` | `boolean` | `false` |
|
|
@@ -429,6 +444,7 @@ Form selection primitives: Checkbox, Radio, and Switch.
|
|
|
429
444
|
import { Checkbox, Radio, RadioGroup, Switch } from "@dnotrever2/super-kit";
|
|
430
445
|
|
|
431
446
|
<Checkbox label="Auto-deploy" checked={checked} onChange={setChecked} />
|
|
447
|
+
<Checkbox label="Auto-deploy" variant="green2" checked={checked} onChange={setChecked} />
|
|
432
448
|
<Checkbox label="Partial" indeterminate />
|
|
433
449
|
<Checkbox label="Required" isInvalid />
|
|
434
450
|
<Checkbox label="Disabled" disabled />
|
|
@@ -439,6 +455,7 @@ import { Checkbox, Radio, RadioGroup, Switch } from "@dnotrever2/super-kit";
|
|
|
439
455
|
</RadioGroup>
|
|
440
456
|
|
|
441
457
|
<Switch label="SSO required" checked={on} onChange={setOn} />
|
|
458
|
+
<Switch label="SSO required" variant="yellow2" checked={on} onChange={setOn} />
|
|
442
459
|
<Switch label="SSO required" thinTrack checked={on} onChange={setOn} />
|
|
443
460
|
```
|
|
444
461
|
|
|
@@ -447,6 +464,7 @@ import { Checkbox, Radio, RadioGroup, Switch } from "@dnotrever2/super-kit";
|
|
|
447
464
|
| Prop | Type |
|
|
448
465
|
| ---------------- | ---------------------------- |
|
|
449
466
|
| `label` | `ReactNode` |
|
|
467
|
+
| `variant` | `ColorVariant` |
|
|
450
468
|
| `checked` | `boolean` |
|
|
451
469
|
| `defaultChecked` | `boolean` |
|
|
452
470
|
| `indeterminate` | `boolean` (Checkbox only) |
|
|
@@ -460,6 +478,7 @@ import { Checkbox, Radio, RadioGroup, Switch } from "@dnotrever2/super-kit";
|
|
|
460
478
|
| Prop | Type |
|
|
461
479
|
| ---------- | ------------------------- |
|
|
462
480
|
| `label` | `ReactNode` |
|
|
481
|
+
| `variant` | `ColorVariant` |
|
|
463
482
|
| `value` | `string` |
|
|
464
483
|
| `checked` | `boolean` |
|
|
465
484
|
| `isInvalid` | `boolean` |
|
|
@@ -566,7 +585,7 @@ Anchored floating panel, controlled or uncontrolled.
|
|
|
566
585
|
import { Popover } from "@dnotrever2/super-kit";
|
|
567
586
|
|
|
568
587
|
<Popover
|
|
569
|
-
trigger={<Button variant="
|
|
588
|
+
trigger={<Button variant="gray2">Settings</Button>}
|
|
570
589
|
title="Connection"
|
|
571
590
|
side="bottom-start"
|
|
572
591
|
shadow
|
|
@@ -602,15 +621,15 @@ import { Progress } from "@dnotrever2/super-kit";
|
|
|
602
621
|
<Progress value={64} label="Deploy progress" showValue />
|
|
603
622
|
<Progress shape="circle" value={72} label="Deploy" />
|
|
604
623
|
<Progress indeterminate label="Publishing" showValue />
|
|
605
|
-
<Progress value={82} variant="
|
|
624
|
+
<Progress value={82} variant="green2" size="lg" />
|
|
606
625
|
```
|
|
607
626
|
|
|
608
|
-
| Prop | Type
|
|
609
|
-
| --------------- |
|
|
610
|
-
| `value` | `number`
|
|
611
|
-
| `max` | `number`
|
|
612
|
-
| `variant` | `
|
|
613
|
-
| `size` | `"sm" \| "md" \| "lg"`
|
|
627
|
+
| Prop | Type | Default |
|
|
628
|
+
| --------------- | -------------------------------------------------------------------------------------- | --------- |
|
|
629
|
+
| `value` | `number` | — |
|
|
630
|
+
| `max` | `number` | `100` |
|
|
631
|
+
| `variant` | `blue/green/yellow/red/gray` + `1/2/3`, optional `Soft` suffix, e.g. `"blue2Soft"` | `"blue2"` |
|
|
632
|
+
| `size` | `"sm" \| "md" \| "lg"` | `"md"` |
|
|
614
633
|
| `shape` | `"bar" \| "circle"` | `"bar"` |
|
|
615
634
|
| `label` | `ReactNode` | — |
|
|
616
635
|
| `valueLabel` | `string` | — |
|
|
@@ -636,7 +655,7 @@ import { PushButton, PushButtonGroup } from "@dnotrever2/super-kit";
|
|
|
636
655
|
<PushButton on={view === "list"} onClick={() => setView("list")}>List</PushButton>
|
|
637
656
|
<PushButton
|
|
638
657
|
on={view === "grid"}
|
|
639
|
-
badge={<Badge variant="
|
|
658
|
+
badge={<Badge variant="blue2" pill>2</Badge>}
|
|
640
659
|
onClick={() => setView("grid")}
|
|
641
660
|
>
|
|
642
661
|
Grid
|
|
@@ -767,7 +786,7 @@ import { Badge, Tabs } from "@dnotrever2/super-kit";
|
|
|
767
786
|
{ value: "overview", label: "Overview", content: <Overview /> },
|
|
768
787
|
{
|
|
769
788
|
value: "deployments",
|
|
770
|
-
label: <>Deployments <Badge variant="
|
|
789
|
+
label: <>Deployments <Badge variant="blue2" pill>4</Badge></>,
|
|
771
790
|
content: <Deployments />
|
|
772
791
|
},
|
|
773
792
|
{ value: "settings", label: "Settings", content: <Settings /> }
|
|
@@ -838,25 +857,26 @@ Loading indicator in three styles.
|
|
|
838
857
|
```tsx
|
|
839
858
|
import { Spinner } from "@dnotrever2/super-kit";
|
|
840
859
|
|
|
841
|
-
<Spinner
|
|
842
|
-
<Spinner
|
|
843
|
-
<Spinner
|
|
860
|
+
<Spinner type="ring" variant="blue3" size="md" />
|
|
861
|
+
<Spinner type="dots" variant="green2" />
|
|
862
|
+
<Spinner type="bar" variant="yellow2" />
|
|
844
863
|
|
|
845
|
-
// Inside a
|
|
846
|
-
<Button variant="
|
|
864
|
+
// Inside a blue button (light spinner on solid color background)
|
|
865
|
+
<Button variant="blue2" disabled icon={<Spinner size="sm" onColor />}>
|
|
847
866
|
Deploying
|
|
848
867
|
</Button>
|
|
849
868
|
|
|
850
|
-
// Subdued — when the
|
|
869
|
+
// Subdued — when the selected variant is too visually dominant
|
|
851
870
|
<Spinner muted />
|
|
852
871
|
```
|
|
853
872
|
|
|
854
873
|
| Prop | Type | Default |
|
|
855
874
|
| ---------- | --------------------------- | --------------------------------------------------------- |
|
|
856
|
-
| `
|
|
875
|
+
| `type` | `"ring" \| "dots" \| "bar"` | `"ring"` |
|
|
876
|
+
| `variant` | `ColorVariant` | `"blue3"` |
|
|
857
877
|
| `size` | `"sm" \| "md" \| "lg"` | `"md"` — ring only |
|
|
858
|
-
| `muted` | `boolean` | `false` — gray
|
|
859
|
-
| `
|
|
878
|
+
| `muted` | `boolean` | `false` — gray animation instead of the selected variant |
|
|
879
|
+
| `onColor` | `boolean` | `false` — white arc for use on solid color backgrounds |
|
|
860
880
|
|
|
861
881
|
---
|
|
862
882
|
|
|
@@ -873,11 +893,12 @@ const items = [
|
|
|
873
893
|
{ label: "Step 3", description: "Publish the release" }
|
|
874
894
|
];
|
|
875
895
|
|
|
876
|
-
<Steps items={items} currentStep={2} />
|
|
896
|
+
<Steps items={items} currentStep={2} variant="blue3" />
|
|
877
897
|
|
|
878
898
|
<Steps
|
|
879
899
|
items={items}
|
|
880
|
-
|
|
900
|
+
type="arrow"
|
|
901
|
+
variant="green2"
|
|
881
902
|
currentStep={2}
|
|
882
903
|
showNumbers={false}
|
|
883
904
|
/>
|
|
@@ -887,7 +908,8 @@ const items = [
|
|
|
887
908
|
| --------------- | ---------------------------- | ------------ |
|
|
888
909
|
| `items` | `StepItem[]` | required |
|
|
889
910
|
| `currentStep` | `number` | `1` |
|
|
890
|
-
| `
|
|
911
|
+
| `type` | `"line" \| "arrow"` | `"line"` |
|
|
912
|
+
| `variant` | `ColorVariant` | `"blue3"` |
|
|
891
913
|
| `size` | `"sm" \| "md" \| "lg"` | `"md"` |
|
|
892
914
|
| `clickable` | `boolean` | `false` |
|
|
893
915
|
| `showNumbers` | `boolean` | `true` |
|
|
@@ -972,7 +994,7 @@ function DeployButton() {
|
|
|
972
994
|
|
|
973
995
|
toast({
|
|
974
996
|
variant: "ok",
|
|
975
|
-
title: <>Deployed <Badge variant="
|
|
997
|
+
title: <>Deployed <Badge variant="green2" pill>live</Badge></>,
|
|
976
998
|
message: <span style={{ color: "var(--fg-1)", fontSize: 13, fontWeight: 600 }}>v2.4.1 is live</span>
|
|
977
999
|
});
|
|
978
1000
|
|
|
@@ -1031,19 +1053,19 @@ Hover/focus tooltip around a child element.
|
|
|
1031
1053
|
import { Tooltip } from "@dnotrever2/super-kit";
|
|
1032
1054
|
|
|
1033
1055
|
<Tooltip content="Deploy to production" side="top">
|
|
1034
|
-
<Button variant="
|
|
1056
|
+
<Button variant="blue2">Deploy</Button>
|
|
1035
1057
|
</Tooltip>
|
|
1036
1058
|
|
|
1037
1059
|
<Tooltip content="No delay" delay={0}>
|
|
1038
|
-
<Button variant="
|
|
1060
|
+
<Button variant="blue2">Deploy</Button>
|
|
1039
1061
|
</Tooltip>
|
|
1040
1062
|
|
|
1041
1063
|
<Tooltip content="Fixed top" side="top" dynamic={false}>
|
|
1042
|
-
<Button variant="
|
|
1064
|
+
<Button variant="blue2">Deploy</Button>
|
|
1043
1065
|
</Tooltip>
|
|
1044
1066
|
|
|
1045
1067
|
<Tooltip content="Cursor hint" cursor>
|
|
1046
|
-
<Button variant="
|
|
1068
|
+
<Button variant="blue2">Hover me</Button>
|
|
1047
1069
|
</Tooltip>
|
|
1048
1070
|
```
|
|
1049
1071
|
|
|
@@ -1077,6 +1099,21 @@ All tokens are CSS custom properties defined in `src/styles/index.css` and avail
|
|
|
1077
1099
|
| `--bg-2` | `#1f242c` — hover state |
|
|
1078
1100
|
| `--bg-3` | `#2a2f38` — popover / selected |
|
|
1079
1101
|
|
|
1102
|
+
### App Surfaces
|
|
1103
|
+
|
|
1104
|
+
| Token | Value |
|
|
1105
|
+
| ---------------------------------- | ----------- |
|
|
1106
|
+
| `--surface-topbar` | `#253047` |
|
|
1107
|
+
| `--surface-sidebar` | `#1b2838` |
|
|
1108
|
+
| `--surface-sidebar-hover` | `#253044` |
|
|
1109
|
+
| `--surface-sidebar-selected` | `#303c50` |
|
|
1110
|
+
| `--surface-sidebar-selected-hover` | `#3d4a60` |
|
|
1111
|
+
| `--surface-content` | `#2c3b52` |
|
|
1112
|
+
| `--surface-modal` | `#242d3d` |
|
|
1113
|
+
| `--surface-modal-dialog` | `#2a3345` |
|
|
1114
|
+
|
|
1115
|
+
`Modal` uses `--surface-modal` by default. Apps can use `--surface-modal-dialog` in their own dialog class when they need the dialog-specific background.
|
|
1116
|
+
|
|
1080
1117
|
### Foreground
|
|
1081
1118
|
|
|
1082
1119
|
| Token | Value |
|
|
@@ -1085,19 +1122,23 @@ All tokens are CSS custom properties defined in `src/styles/index.css` and avail
|
|
|
1085
1122
|
| `--fg-2` | `#aab2bd` — secondary text |
|
|
1086
1123
|
| `--fg-3` | `#6b7280` — muted / labels |
|
|
1087
1124
|
| `--fg-4` | `#4a505a` — placeholder |
|
|
1088
|
-
| `--fg-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
|
1096
|
-
|
|
|
1097
|
-
| `--
|
|
1098
|
-
| `--
|
|
1099
|
-
| `--
|
|
1100
|
-
| `--
|
|
1125
|
+
| `--fg-disabled` | disabled foreground |
|
|
1126
|
+
| `--fg-on-color` | `#ffffff` — text on solid color bg |
|
|
1127
|
+
|
|
1128
|
+
### Color Scale
|
|
1129
|
+
|
|
1130
|
+
Buttons, badges, links, and progress variants use the global color scale tokens:
|
|
1131
|
+
|
|
1132
|
+
| Token pattern | Purpose |
|
|
1133
|
+
| ------------- | ------- |
|
|
1134
|
+
| `--color-{blue|green|yellow|red|gray}-{1|2|3}` | Solid tone |
|
|
1135
|
+
| `--color-{color}-{tone}-hover` / `-active` | Solid interaction states |
|
|
1136
|
+
| `--color-{color}-{tone}-fg` | Text on solid tone |
|
|
1137
|
+
| `--color-{color}-{tone}-soft` | Soft background |
|
|
1138
|
+
| `--color-{color}-{tone}-soft-hover` / `-soft-active` | Soft interaction states |
|
|
1139
|
+
| `--color-{color}-{tone}-soft-fg` | Text/icon color for soft usage |
|
|
1140
|
+
| `--color-{color}-{tone}-outline` | Outline border |
|
|
1141
|
+
| `--color-{color}-{tone}-link-hover` | Link hover color |
|
|
1101
1142
|
|
|
1102
1143
|
### Typography
|
|
1103
1144
|
|
package/dist/Badge/Badge.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
|
|
2
|
+
import { ColorVariant } from '../types';
|
|
3
|
+
export type BadgeVariant = ColorVariant;
|
|
3
4
|
export type BadgeProps = HTMLAttributes<HTMLSpanElement> & {
|
|
4
5
|
variant?: BadgeVariant;
|
|
5
6
|
icon?: ReactNode;
|
|
@@ -12,8 +12,9 @@ export type BreadcrumbProps = HTMLAttributes<HTMLElement> & {
|
|
|
12
12
|
items: BreadcrumbItem[];
|
|
13
13
|
separator?: ReactNode;
|
|
14
14
|
label?: string;
|
|
15
|
+
colorCurrent?: boolean;
|
|
15
16
|
};
|
|
16
|
-
export declare function Breadcrumb({ items, separator, label, className, ...props }: BreadcrumbProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function Breadcrumb({ items, separator, label, colorCurrent, className, ...props }: BreadcrumbProps): import("react/jsx-runtime").JSX.Element;
|
|
17
18
|
export declare namespace Breadcrumb {
|
|
18
19
|
var displayName: string;
|
|
19
20
|
}
|
package/dist/Button/Button.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
|
|
2
|
+
import { ColorName, ColorTone, ColorVariant } from '../types';
|
|
3
|
+
export type ButtonColor = ColorName;
|
|
4
|
+
export type ButtonTone = ColorTone;
|
|
5
|
+
export type ButtonVariant = ColorVariant;
|
|
3
6
|
export type ButtonSize = "sm" | "md" | "lg";
|
|
4
7
|
export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
5
8
|
variant?: ButtonVariant;
|
package/dist/Link/Link.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AnchorHTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
|
|
2
|
+
import { ColorVariant } from '../types';
|
|
3
|
+
export type LinkVariant = ColorVariant;
|
|
3
4
|
export type LinkProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "aria-disabled"> & {
|
|
4
5
|
variant?: LinkVariant;
|
|
5
6
|
underlined?: boolean;
|
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
import { HTMLAttributes, InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { ColorVariant } from '../types';
|
|
3
|
+
export type MarkerVariant = ColorVariant;
|
|
2
4
|
export type CheckboxProps = Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "onChange"> & {
|
|
3
5
|
label?: ReactNode;
|
|
6
|
+
variant?: MarkerVariant;
|
|
4
7
|
checked?: boolean;
|
|
5
8
|
defaultChecked?: boolean;
|
|
6
9
|
indeterminate?: boolean;
|
|
7
10
|
isInvalid?: boolean;
|
|
8
11
|
onChange?: (checked: boolean) => void;
|
|
9
12
|
};
|
|
10
|
-
export declare function Checkbox({ label, checked, defaultChecked, indeterminate, isInvalid, disabled, onChange, className, ...props }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function Checkbox({ label, variant, checked, defaultChecked, indeterminate, isInvalid, disabled, onChange, className, ...props }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
11
14
|
export declare namespace Checkbox {
|
|
12
15
|
var displayName: string;
|
|
13
16
|
}
|
|
14
17
|
export type RadioProps = Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "onChange"> & {
|
|
15
18
|
label?: ReactNode;
|
|
19
|
+
variant?: MarkerVariant;
|
|
16
20
|
checked?: boolean;
|
|
17
21
|
isInvalid?: boolean;
|
|
18
22
|
onChange?: (value: string) => void;
|
|
19
23
|
};
|
|
20
|
-
export declare function Radio({ label, checked, isInvalid, disabled, onChange, value, className, ...props }: RadioProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function Radio({ label, variant, checked, isInvalid, disabled, onChange, value, className, ...props }: RadioProps): import("react/jsx-runtime").JSX.Element;
|
|
21
25
|
export declare namespace Radio {
|
|
22
26
|
var displayName: string;
|
|
23
27
|
}
|
|
@@ -30,13 +34,14 @@ export declare namespace RadioGroup {
|
|
|
30
34
|
}
|
|
31
35
|
export type SwitchProps = Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "onChange"> & {
|
|
32
36
|
label?: ReactNode;
|
|
37
|
+
variant?: MarkerVariant;
|
|
33
38
|
checked?: boolean;
|
|
34
39
|
defaultChecked?: boolean;
|
|
35
40
|
thinTrack?: boolean;
|
|
36
41
|
isInvalid?: boolean;
|
|
37
42
|
onChange?: (checked: boolean) => void;
|
|
38
43
|
};
|
|
39
|
-
export declare function Switch({ label, checked, defaultChecked, disabled, thinTrack, isInvalid, onChange, className, ...props }: SwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
export declare function Switch({ label, variant, checked, defaultChecked, disabled, thinTrack, isInvalid, onChange, className, ...props }: SwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
40
45
|
export declare namespace Switch {
|
|
41
46
|
var displayName: string;
|
|
42
47
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
|
|
2
|
+
import { ColorVariant } from '../types';
|
|
3
|
+
export type ProgressVariant = ColorVariant;
|
|
3
4
|
export type ProgressSize = "sm" | "md" | "lg";
|
|
4
5
|
export type ProgressShape = "bar" | "circle";
|
|
5
6
|
export type ProgressProps = HTMLAttributes<HTMLDivElement> & {
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
|
|
2
|
+
import { ColorVariant } from '../types';
|
|
3
|
+
export type SpinnerType = "ring" | "dots" | "bar";
|
|
4
|
+
export type SpinnerVariant = ColorVariant;
|
|
3
5
|
export type SpinnerSize = "sm" | "md" | "lg";
|
|
6
|
+
type LegacySpinnerVariant = SpinnerType;
|
|
4
7
|
export type SpinnerProps = HTMLAttributes<HTMLSpanElement> & {
|
|
5
|
-
variant?: SpinnerVariant;
|
|
8
|
+
variant?: SpinnerVariant | LegacySpinnerVariant;
|
|
9
|
+
type?: SpinnerType;
|
|
6
10
|
size?: SpinnerSize;
|
|
7
11
|
muted?: boolean;
|
|
8
|
-
|
|
12
|
+
onColor?: boolean;
|
|
9
13
|
};
|
|
10
|
-
export declare function Spinner({ variant, size, muted,
|
|
14
|
+
export declare function Spinner({ variant, type, size, muted, onColor, className, ...props }: SpinnerProps): import("react/jsx-runtime").JSX.Element;
|
|
11
15
|
export declare namespace Spinner {
|
|
12
16
|
var displayName: string;
|
|
13
17
|
}
|
|
18
|
+
export {};
|
package/dist/Steps/Steps.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
|
|
2
|
+
import { ColorVariant } from '../types';
|
|
3
|
+
export type StepsType = "line" | "arrow";
|
|
4
|
+
export type StepsVariant = ColorVariant;
|
|
3
5
|
export type StepsSize = "sm" | "md" | "lg";
|
|
6
|
+
type LegacyStepsVariant = StepsType;
|
|
4
7
|
export type StepItem = {
|
|
5
8
|
label: ReactNode;
|
|
6
9
|
description?: ReactNode;
|
|
@@ -12,14 +15,16 @@ export type StepItem = {
|
|
|
12
15
|
export type StepsProps = Omit<HTMLAttributes<HTMLOListElement>, "onChange"> & {
|
|
13
16
|
items: StepItem[];
|
|
14
17
|
currentStep?: number;
|
|
15
|
-
variant?: StepsVariant;
|
|
18
|
+
variant?: StepsVariant | LegacyStepsVariant;
|
|
19
|
+
type?: StepsType;
|
|
16
20
|
size?: StepsSize;
|
|
17
21
|
clickable?: boolean;
|
|
18
22
|
showNumbers?: boolean;
|
|
19
23
|
onStepChange?: (step: number) => void;
|
|
20
24
|
stepClassName?: string;
|
|
21
25
|
};
|
|
22
|
-
export declare function Steps({ items, currentStep, variant, size, clickable, showNumbers, onStepChange, stepClassName, className, ...props }: StepsProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare function Steps({ items, currentStep, variant, type, size, clickable, showNumbers, onStepChange, stepClassName, className, ...props }: StepsProps): import("react/jsx-runtime").JSX.Element;
|
|
23
27
|
export declare namespace Steps {
|
|
24
28
|
var displayName: string;
|
|
25
29
|
}
|
|
30
|
+
export {};
|