@karmo-co/drift-kit-reference 25.9.0 → 25.10.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.
|
@@ -6,7 +6,7 @@ A person, as their photo or their initials: the photo fades in once it has loade
|
|
|
6
6
|
## Anatomy (HTML)
|
|
7
7
|
|
|
8
8
|
```text
|
|
9
|
-
span.dk-component-avatar[data-name][data-size="24|40|48|<px>"]?[data-variant="solid"]?[data-hue]?
|
|
9
|
+
span.dk-component-avatar[data-name][data-size="24|40|48|<px>"]?[data-variant="solid|ringed"]?[data-hue]?
|
|
10
10
|
img? (the photo; the runtime sets data-loaded)
|
|
11
11
|
span.__initials (written by the runtime from data-name, unless written in it)
|
|
12
12
|
```
|
|
@@ -18,7 +18,7 @@ span.dk-component-avatar[data-name][data-size="24|40|48|<px>"]?[data-variant="so
|
|
|
18
18
|
| `data-hue` | `next1`, `next2`, `next3`, `next4`, `prev1`, `prev2`, `prev3`, `prev4`, `primary` |
|
|
19
19
|
| `data-loaded` | `error`, `false`, `true` |
|
|
20
20
|
| `data-size` | `24`, `40`, `48` |
|
|
21
|
-
| `data-variant` | `solid` |
|
|
21
|
+
| `data-variant` | `ringed`, `solid` |
|
|
22
22
|
|
|
23
23
|
## React
|
|
24
24
|
|
|
@@ -33,11 +33,11 @@ import { Avatar } from '@karmo-co/drift-kit/react';
|
|
|
33
33
|
| `src` | `string` | A photo. Until it decodes, and if it fails, the initials show. |
|
|
34
34
|
| `size` | `AvatarSize \| number` | 32 when absent. 24, 40 or 48, or any other number of pixels: the avatar is drawn at that size, its initials a quarter of it plus 4px (the step the named sizes follow, so 64 has 20px initials). |
|
|
35
35
|
| `hue` | `AvatarHue` | A category colour instead of primary, to tell people apart without photos. |
|
|
36
|
-
| `variant` | `'subtle' \| 'solid'` | Subtle when absent. |
|
|
36
|
+
| `variant` | `'subtle' \| 'solid' \| 'ringed'` | Subtle when absent. |
|
|
37
37
|
| `label` | `string` | A name for a screen reader, for an avatar that stands on its own. Without one it is decorative: the name is usually written beside it. |
|
|
38
38
|
| `href` | `string` | A link to the person: the avatar becomes an <a>, named by label or name, and steps through hover and press. |
|
|
39
39
|
| `onClick` | `(event: ReactMouseEvent<HTMLElement>) => void` | An action, an account menu say: the avatar becomes a <button>, named by label or name, and steps through hover and press. |
|
|
40
40
|
|
|
41
41
|
## Component tokens
|
|
42
42
|
|
|
43
|
-
`--dk-component-avatar-radius`, `--dk-component-avatar-24-size`, `--dk-component-avatar-24-font-size`, `--dk-component-avatar-32-size`, `--dk-component-avatar-32-font-size`, `--dk-component-avatar-40-size`, `--dk-component-avatar-40-font-size`, `--dk-component-avatar-48-size`, `--dk-component-avatar-48-font-size`, `--dk-component-avatar-font-family`, `--dk-component-avatar-font-weight`, `--dk-component-avatar-letter-spacing`, `--dk-component-avatar-subtle-surface`, `--dk-component-avatar-subtle-text`, `--dk-component-avatar-solid-surface`, `--dk-component-avatar-solid-text`, `--dk-component-avatar-ring`, `--dk-component-avatar-edge-mix`, `--dk-component-avatar-solid-mix-to`, `--dk-component-avatar-hover-mix`, `--dk-component-avatar-active-mix`, `--dk-component-avatar-photo-hover`, `--dk-component-avatar-photo-active`, `--dk-component-avatar-focus-ring`, `--dk-component-avatar-focus-ring-width`, `--dk-component-avatar-transition-duration`, `--dk-component-avatar-fade-duration`, `--dk-component-avatar-fade-easing`
|
|
43
|
+
`--dk-component-avatar-radius`, `--dk-component-avatar-24-size`, `--dk-component-avatar-24-font-size`, `--dk-component-avatar-32-size`, `--dk-component-avatar-32-font-size`, `--dk-component-avatar-40-size`, `--dk-component-avatar-40-font-size`, `--dk-component-avatar-48-size`, `--dk-component-avatar-48-font-size`, `--dk-component-avatar-font-family`, `--dk-component-avatar-font-weight`, `--dk-component-avatar-letter-spacing`, `--dk-component-avatar-subtle-surface`, `--dk-component-avatar-subtle-text`, `--dk-component-avatar-solid-surface`, `--dk-component-avatar-solid-text`, `--dk-component-avatar-ringed-surface`, `--dk-component-avatar-ringed-text`, `--dk-component-avatar-ringed-ring`, `--dk-component-avatar-ringed-ring-width`, `--dk-component-avatar-ring`, `--dk-component-avatar-edge-mix`, `--dk-component-avatar-solid-mix-to`, `--dk-component-avatar-hover-mix`, `--dk-component-avatar-active-mix`, `--dk-component-avatar-photo-hover`, `--dk-component-avatar-photo-active`, `--dk-component-avatar-focus-ring`, `--dk-component-avatar-focus-ring-width`, `--dk-component-avatar-transition-duration`, `--dk-component-avatar-fade-duration`, `--dk-component-avatar-fade-easing`
|
|
@@ -18,7 +18,9 @@ p|span.dk-component-body[data-size="xlarge|large|medium|small|xsmall"]?[data-wei
|
|
|
18
18
|
| `data-color` | `black`, `default`, `error`, `information`, `inverse`, `neutral`, `primary`, `success`, `warning`, `white` |
|
|
19
19
|
| `data-disabled` | (present or absent) |
|
|
20
20
|
| `data-emphasis` | `subtle` |
|
|
21
|
+
| `data-interactive` | (present or absent) |
|
|
21
22
|
| `data-nowrap` | (present or absent) |
|
|
23
|
+
| `data-pseudo-class` | `active`, `hover` |
|
|
22
24
|
| `data-size` | `large`, `medium`, `small`, `xlarge`, `xsmall` |
|
|
23
25
|
| `data-style` | `italic`, `normal`, `strikethrough`, `underline` |
|
|
24
26
|
| `data-trim` | `both`, `end`, `start` |
|
|
@@ -25,6 +25,8 @@ section.dk-component-box[data-variant][data-size][data-radius][data-tone][data-t
|
|
|
25
25
|
| `data-dividers` | `both`, `columns`, `rows` |
|
|
26
26
|
| `data-flush` | `phone` |
|
|
27
27
|
| `data-interactive` | (present or absent) |
|
|
28
|
+
| `data-interactive-fill` | `nested`, `raised` |
|
|
29
|
+
| `data-pseudo-class` | `active`, `hover` |
|
|
28
30
|
| `data-radius` | `large`, `medium`, `xlarge` |
|
|
29
31
|
| `data-size` | `large`, `small`, `xlarge`, `xsmall` |
|
|
30
32
|
| `data-span` | `full` |
|
|
@@ -19,6 +19,8 @@ span.dk-component-tag[data-status|data-hue][data-variant][data-size][data-caret]
|
|
|
19
19
|
|---|---|
|
|
20
20
|
| `data-caret` | (present or absent) |
|
|
21
21
|
| `data-hue` | `next1`, `next2`, `next3`, `next4`, `prev1`, `prev2`, `prev3`, `prev4`, `primary` |
|
|
22
|
+
| `data-interactive` | (present or absent) |
|
|
23
|
+
| `data-pseudo-class` | `active`, `hover` |
|
|
22
24
|
| `data-shape` | `circle` |
|
|
23
25
|
| `data-size` | `large`, `small`, `xsmall` |
|
|
24
26
|
| `data-status` | `error`, `information`, `primary`, `success`, `warning` |
|
package/manifest/index.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": 1,
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.10.0",
|
|
4
4
|
"built": "2026-11-11",
|
|
5
5
|
"components": [
|
|
6
6
|
{
|
|
@@ -1886,6 +1886,16 @@
|
|
|
1886
1886
|
"components": [],
|
|
1887
1887
|
"tokens": []
|
|
1888
1888
|
}
|
|
1889
|
+
},
|
|
1890
|
+
"25.10.0": {
|
|
1891
|
+
"added": {
|
|
1892
|
+
"components": [],
|
|
1893
|
+
"tokens": []
|
|
1894
|
+
},
|
|
1895
|
+
"removed": {
|
|
1896
|
+
"components": [],
|
|
1897
|
+
"tokens": []
|
|
1898
|
+
}
|
|
1889
1899
|
}
|
|
1890
1900
|
}
|
|
1891
1901
|
}
|
package/manifest/setup.md
CHANGED
|
@@ -68,47 +68,47 @@ Both scripts are deferred, and an icon script goes after `components.js`, which
|
|
|
68
68
|
|
|
69
69
|
```html
|
|
70
70
|
<!-- in the head -->
|
|
71
|
-
<link rel="stylesheet" href="https://storage.googleapis.com/drift-kit-public/25.
|
|
72
|
-
<script src="https://storage.googleapis.com/drift-kit-public/25.
|
|
73
|
-
<script src="https://storage.googleapis.com/drift-kit-public/25.
|
|
71
|
+
<link rel="stylesheet" href="https://storage.googleapis.com/drift-kit-public/25.10.0/drift-kit.css" integrity="sha384-oMRen8bmutcaTPhBr2pWzvVs7qoRzvPWoAKZv8D/q0fmpSBSxeqZkhcaNJsb+OtU" crossorigin="anonymous" />
|
|
72
|
+
<script src="https://storage.googleapis.com/drift-kit-public/25.10.0/components.js" integrity="sha384-mIFtdQRlF1gTwcRa0mUq2c2CIrtb91Zeid6pLYGp6Y3fb2MabDoQ3X6Etg6tG5WL" crossorigin="anonymous" defer></script>
|
|
73
|
+
<script src="https://storage.googleapis.com/drift-kit-public/25.10.0/drift-icons-<set>.js" integrity="<its integrity>" crossorigin="anonymous" defer></script>
|
|
74
74
|
<!-- the attributes go on the body -->
|
|
75
75
|
<body data-brand="karmo" data-theme="light">
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
| File | Address | Integrity |
|
|
79
79
|
|---|---|---|
|
|
80
|
-
| `drift-kit.css` | `https://storage.googleapis.com/drift-kit-public/25.
|
|
81
|
-
| `drift-kit.min.css` | `https://storage.googleapis.com/drift-kit-public/25.
|
|
82
|
-
| `components.js` | `https://storage.googleapis.com/drift-kit-public/25.
|
|
83
|
-
| `drift-icons-card.js` | `https://storage.googleapis.com/drift-kit-public/25.
|
|
84
|
-
| `drift-icons-coolicon.js` | `https://storage.googleapis.com/drift-kit-public/25.
|
|
85
|
-
| `drift-icons-feather.js` | `https://storage.googleapis.com/drift-kit-public/25.
|
|
86
|
-
| `drift-icons-flag-circle.js` | `https://storage.googleapis.com/drift-kit-public/25.
|
|
87
|
-
| `drift-icons-flag.js` | `https://storage.googleapis.com/drift-kit-public/25.
|
|
88
|
-
| `drift-icons-lucide.js` | `https://storage.googleapis.com/drift-kit-public/25.
|
|
89
|
-
| `drift-icons-social.js` | `https://storage.googleapis.com/drift-kit-public/25.
|
|
80
|
+
| `drift-kit.css` | `https://storage.googleapis.com/drift-kit-public/25.10.0/drift-kit.css` | `sha384-oMRen8bmutcaTPhBr2pWzvVs7qoRzvPWoAKZv8D/q0fmpSBSxeqZkhcaNJsb+OtU` |
|
|
81
|
+
| `drift-kit.min.css` | `https://storage.googleapis.com/drift-kit-public/25.10.0/drift-kit.min.css` | `sha384-6X66WpbLRNJVW4RFb/eYGEWbBVF94grtyhixm5Ev++tK5Lt0VaA6wP4DFT4zgVX8` |
|
|
82
|
+
| `components.js` | `https://storage.googleapis.com/drift-kit-public/25.10.0/components.js` | `sha384-mIFtdQRlF1gTwcRa0mUq2c2CIrtb91Zeid6pLYGp6Y3fb2MabDoQ3X6Etg6tG5WL` |
|
|
83
|
+
| `drift-icons-card.js` | `https://storage.googleapis.com/drift-kit-public/25.10.0/drift-icons-card.js` | `sha384-Dl18Pw11QQ+/KtbAzbjt1DdP6fJwFNn4kCykxtFsF+uEZtUfMIseQJ7s14OmqEmg` |
|
|
84
|
+
| `drift-icons-coolicon.js` | `https://storage.googleapis.com/drift-kit-public/25.10.0/drift-icons-coolicon.js` | `sha384-CfSMUCWuUL4AcPkDdPtAHpifYxAeW0OarhAAJ+7sNGvRJkzvUBege6vq8G3N6LTH` |
|
|
85
|
+
| `drift-icons-feather.js` | `https://storage.googleapis.com/drift-kit-public/25.10.0/drift-icons-feather.js` | `sha384-MFEltFi3gRSwgNdAMXGCYo+6Ri9iXLLWp4Gq3AeayzeliWAo3czd+pTTLAFHHU6s` |
|
|
86
|
+
| `drift-icons-flag-circle.js` | `https://storage.googleapis.com/drift-kit-public/25.10.0/drift-icons-flag-circle.js` | `sha384-gtU89vOz98Fbn0KZWzkHVQA4+kFhOFYoT/Dr43ljTskqkyGDMw1ihH1I7Zn25dzZ` |
|
|
87
|
+
| `drift-icons-flag.js` | `https://storage.googleapis.com/drift-kit-public/25.10.0/drift-icons-flag.js` | `sha384-VtM24IDkwASIVzD5hI+ijQYRXufYQbveKM0+wqaFSGZbrYZlodFlnvZOexhCpiH9` |
|
|
88
|
+
| `drift-icons-lucide.js` | `https://storage.googleapis.com/drift-kit-public/25.10.0/drift-icons-lucide.js` | `sha384-wLKQdccKZKGXZJ9kcU8XCKyNI79EGI/7NrBVmOAlE0DZNThpyW1SY6z4j3teJLB0` |
|
|
89
|
+
| `drift-icons-social.js` | `https://storage.googleapis.com/drift-kit-public/25.10.0/drift-icons-social.js` | `sha384-+hPy5fFjIqfIAmDN+WOwekTLu7NIFZvyzOwXUTAiBEQqnZ0/kXgd4frbSGOr/c8c` |
|
|
90
90
|
|
|
91
91
|
### In Claude chat and Cowork
|
|
92
92
|
|
|
93
93
|
Their previews load nothing from the bucket. There, link the same version from jsdelivr instead, with these addresses and integrity: the stylesheet is `drift-kit.min.css`, and the attributes still go on `<body>`.
|
|
94
94
|
|
|
95
95
|
```html
|
|
96
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
97
|
-
<script src="https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
96
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.10.0/drift-kit.min.css" integrity="sha384-6X66WpbLRNJVW4RFb/eYGEWbBVF94grtyhixm5Ev++tK5Lt0VaA6wP4DFT4zgVX8" crossorigin="anonymous" />
|
|
97
|
+
<script src="https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.10.0/components.js" integrity="sha384-EkxpP8foDxi+64liYemlkT26UWaZ9+OR6MVJ+bsxZJ9JFermGICWgHTTsHidIKtE" crossorigin="anonymous" defer></script>
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
| File | Address | Integrity |
|
|
101
101
|
|---|---|---|
|
|
102
|
-
| `components.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
103
|
-
| `drift-data-countries.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
104
|
-
| `drift-icons-card.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
105
|
-
| `drift-icons-coolicon.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
106
|
-
| `drift-icons-feather.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
107
|
-
| `drift-icons-flag-circle.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
108
|
-
| `drift-icons-flag.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
109
|
-
| `drift-icons-lucide.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
110
|
-
| `drift-icons-social.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
111
|
-
| `drift-kit.min.css` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.
|
|
102
|
+
| `components.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.10.0/components.js` | `sha384-EkxpP8foDxi+64liYemlkT26UWaZ9+OR6MVJ+bsxZJ9JFermGICWgHTTsHidIKtE` |
|
|
103
|
+
| `drift-data-countries.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.10.0/drift-data-countries.js` | `sha384-GttgZnsRDPioKDxlsEyQtUqCwO0ObYYdjdjKBBt9LWThZld3OnUBnZ9EScI41qIf` |
|
|
104
|
+
| `drift-icons-card.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.10.0/drift-icons-card.js` | `sha384-Dl18Pw11QQ+/KtbAzbjt1DdP6fJwFNn4kCykxtFsF+uEZtUfMIseQJ7s14OmqEmg` |
|
|
105
|
+
| `drift-icons-coolicon.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.10.0/drift-icons-coolicon.js` | `sha384-CfSMUCWuUL4AcPkDdPtAHpifYxAeW0OarhAAJ+7sNGvRJkzvUBege6vq8G3N6LTH` |
|
|
106
|
+
| `drift-icons-feather.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.10.0/drift-icons-feather.js` | `sha384-MFEltFi3gRSwgNdAMXGCYo+6Ri9iXLLWp4Gq3AeayzeliWAo3czd+pTTLAFHHU6s` |
|
|
107
|
+
| `drift-icons-flag-circle.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.10.0/drift-icons-flag-circle.js` | `sha384-gtU89vOz98Fbn0KZWzkHVQA4+kFhOFYoT/Dr43ljTskqkyGDMw1ihH1I7Zn25dzZ` |
|
|
108
|
+
| `drift-icons-flag.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.10.0/drift-icons-flag.js` | `sha384-VtM24IDkwASIVzD5hI+ijQYRXufYQbveKM0+wqaFSGZbrYZlodFlnvZOexhCpiH9` |
|
|
109
|
+
| `drift-icons-lucide.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.10.0/drift-icons-lucide.js` | `sha384-wLKQdccKZKGXZJ9kcU8XCKyNI79EGI/7NrBVmOAlE0DZNThpyW1SY6z4j3teJLB0` |
|
|
110
|
+
| `drift-icons-social.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.10.0/drift-icons-social.js` | `sha384-+hPy5fFjIqfIAmDN+WOwekTLu7NIFZvyzOwXUTAiBEQqnZ0/kXgd4frbSGOr/c8c` |
|
|
111
|
+
| `drift-kit.min.css` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.10.0/drift-kit.min.css` | `sha384-6X66WpbLRNJVW4RFb/eYGEWbBVF94grtyhixm5Ev++tK5Lt0VaA6wP4DFT4zgVX8` |
|
|
112
112
|
|
|
113
113
|
### Integrity for 23.4.0
|
|
114
114
|
|
|
@@ -140,5 +140,5 @@ The behaviour script initialises every component on the page when it loads. Mark
|
|
|
140
140
|
The kit class names the drift-critique capture script keys on, at this version. Pass them to it as `--kit '<this JSON>'` so its alignment and reduced-motion checks read this version's names.
|
|
141
141
|
|
|
142
142
|
```json
|
|
143
|
-
{"version":"25.
|
|
143
|
+
{"version":"25.10.0","field":".dk-component-input__field","trigger":".dk-component-select__trigger","button":".dk-component-button","iconButton":".dk-component-icon-button","spinners":[".dk-component-loading-spinner",".dk-component-button__spinner"],"componentPrefix":"dk-component-","fieldRoot":"dk-component-input"}
|
|
144
144
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@karmo-co/drift-kit-reference",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.10.0",
|
|
4
4
|
"description": "Reference documentation of Karmo's private Drift design system, for Karmo's Claude skills. Documentation only.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"drift-kit-ref": "bin/drift-kit-ref.js"
|