@karmo-co/drift-kit-reference 25.20.0 → 25.22.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.
@@ -7,6 +7,7 @@ A button whose whole label is its icon. Same rungs as Button, so the two line up
7
7
 
8
8
  ```text
9
9
  button.dk-component-icon-button[data-variant="subtle|ghost|plain|raised|solid|inverse"]?[data-status="primary"]?[data-size="extra-small|small|medium|large"]?[aria-label][aria-pressed]?[data-pressed-glyph="fill"]?
10
+ span.dk-component-icon-button[aria-hidden="true"] (decorative: a picture of one on a card that is itself the control; no name, no focus)
10
11
  svg | i.dk-component-icon (the glyph)
11
12
  span.__label[hidden]? (optional; when present, hidden is
12
13
  required: words beside the glyph, drawn
@@ -32,8 +33,6 @@ import { IconButton } from '@karmo-co/drift-kit/react';
32
33
 
33
34
  | Prop | Type | Notes |
34
35
  |---|---|---|
35
- | `'aria-label'` | `string` | |
36
- | `'aria-labelledby'` | `string` | |
37
36
  | `icon` (required) | `ReactNode` | The glyph: one <svg>, an icon component, or an <i data-lucide>. The component sizes it to its rung. |
38
37
  | `variant` | `'subtle' \| 'ghost' \| 'plain' \| 'raised' \| 'solid' \| 'inverse'` | subtle when absent: a tint of the surface it sits on. ghost and plain are transparent at rest; raised lifts it on an elevation; solid is the primary fill; inverse is the opposite theme's surface. |
39
38
  | `size` | `'extra-small' \| 'small' \| 'medium' \| 'large'` | medium when absent. small, medium and large are Button's rungs and land on its heights, so the two line up in a row. |
@@ -31,6 +31,7 @@ import { Shield } from '@karmo-co/drift-kit/react';
31
31
  | `animation` | `'enter' \| 'error' \| 'success'` | Setting the same value again replays it, as in CL. |
32
32
  | `replayKey` | `string \| number` | Change it (a counter, an attempt number) to play the same state again: a second wrong code has the same animation as the first, and a prop set to its own value is not a change React can see. |
33
33
  | `label` | `string` | |
34
+ | `onAnimationComplete` | `(animation: ShieldAnimation) => void` | Called when an animation you set (not the mount's own) has played out, with its name: move on after the success pulse. Not called when a later one cut it short. |
34
35
 
35
36
  ## Component tokens
36
37
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schema": 1,
3
- "version": "25.20.0",
3
+ "version": "25.22.0",
4
4
  "built": "2026-11-19",
5
5
  "components": [
6
6
  {
@@ -2098,6 +2098,28 @@
2098
2098
  "components": [],
2099
2099
  "tokens": []
2100
2100
  }
2101
+ },
2102
+ "25.21.0": {
2103
+ "added": {
2104
+ "components": [],
2105
+ "tokens": [
2106
+ "--dk-motion-cascade-fallback-delay"
2107
+ ]
2108
+ },
2109
+ "removed": {
2110
+ "components": [],
2111
+ "tokens": []
2112
+ }
2113
+ },
2114
+ "25.22.0": {
2115
+ "added": {
2116
+ "components": [],
2117
+ "tokens": []
2118
+ },
2119
+ "removed": {
2120
+ "components": [],
2121
+ "tokens": []
2122
+ }
2101
2123
  }
2102
2124
  }
2103
2125
  }
package/manifest/setup.md CHANGED
@@ -69,47 +69,47 @@ Both scripts are deferred, and an icon script goes after `components.js`, which
69
69
 
70
70
  ```html
71
71
  <!-- in the head -->
72
- <link rel="stylesheet" href="https://storage.googleapis.com/drift-kit-public/25.20.0/drift-kit.css" integrity="sha384-q/3/loEbBTGHo1PbCIbKv1sZ3pUrJc1lBMs6yMqjojLwglEjdRmjaYMa43cuwcsm" crossorigin="anonymous" />
73
- <script src="https://storage.googleapis.com/drift-kit-public/25.20.0/components.js" integrity="sha384-DEASxC7loH/SoV3xQ8SwFMOsuiLq7spXLOA2YjtP+LivPbsx4Jmojas1JVzIz6KP" crossorigin="anonymous" defer></script>
74
- <script src="https://storage.googleapis.com/drift-kit-public/25.20.0/drift-icons-<set>.js" integrity="<its integrity>" crossorigin="anonymous" defer></script>
72
+ <link rel="stylesheet" href="https://storage.googleapis.com/drift-kit-public/25.22.0/drift-kit.css" integrity="sha384-UVtX30+x8K0slCs4trhvlPvRYwDaxWHPZsMdGOvrPGKFV0/wfRiA9ngtQcOQGIVM" crossorigin="anonymous" />
73
+ <script src="https://storage.googleapis.com/drift-kit-public/25.22.0/components.js" integrity="sha384-JllYtWdLgBZLjhptpEq00WZiWBKA2AghLJrZ8vUkaj51ScFSBQm6VhphAXcOgEXF" crossorigin="anonymous" defer></script>
74
+ <script src="https://storage.googleapis.com/drift-kit-public/25.22.0/drift-icons-<set>.js" integrity="<its integrity>" crossorigin="anonymous" defer></script>
75
75
  <!-- the attributes go on the body -->
76
76
  <body data-brand="karmo" data-theme="light">
77
77
  ```
78
78
 
79
79
  | File | Address | Integrity |
80
80
  |---|---|---|
81
- | `drift-kit.css` | `https://storage.googleapis.com/drift-kit-public/25.20.0/drift-kit.css` | `sha384-q/3/loEbBTGHo1PbCIbKv1sZ3pUrJc1lBMs6yMqjojLwglEjdRmjaYMa43cuwcsm` |
82
- | `drift-kit.min.css` | `https://storage.googleapis.com/drift-kit-public/25.20.0/drift-kit.min.css` | `sha384-6wHI3bytUCatNtDWq/QuKx+Tf+cMZ669WsBOqu/bMgiGK6JMf5ITpHLUy33tqGUN` |
83
- | `components.js` | `https://storage.googleapis.com/drift-kit-public/25.20.0/components.js` | `sha384-DEASxC7loH/SoV3xQ8SwFMOsuiLq7spXLOA2YjtP+LivPbsx4Jmojas1JVzIz6KP` |
84
- | `drift-icons-card.js` | `https://storage.googleapis.com/drift-kit-public/25.20.0/drift-icons-card.js` | `sha384-Dl18Pw11QQ+/KtbAzbjt1DdP6fJwFNn4kCykxtFsF+uEZtUfMIseQJ7s14OmqEmg` |
85
- | `drift-icons-coolicon.js` | `https://storage.googleapis.com/drift-kit-public/25.20.0/drift-icons-coolicon.js` | `sha384-CfSMUCWuUL4AcPkDdPtAHpifYxAeW0OarhAAJ+7sNGvRJkzvUBege6vq8G3N6LTH` |
86
- | `drift-icons-feather.js` | `https://storage.googleapis.com/drift-kit-public/25.20.0/drift-icons-feather.js` | `sha384-MFEltFi3gRSwgNdAMXGCYo+6Ri9iXLLWp4Gq3AeayzeliWAo3czd+pTTLAFHHU6s` |
87
- | `drift-icons-flag-circle.js` | `https://storage.googleapis.com/drift-kit-public/25.20.0/drift-icons-flag-circle.js` | `sha384-gtU89vOz98Fbn0KZWzkHVQA4+kFhOFYoT/Dr43ljTskqkyGDMw1ihH1I7Zn25dzZ` |
88
- | `drift-icons-flag.js` | `https://storage.googleapis.com/drift-kit-public/25.20.0/drift-icons-flag.js` | `sha384-VtM24IDkwASIVzD5hI+ijQYRXufYQbveKM0+wqaFSGZbrYZlodFlnvZOexhCpiH9` |
89
- | `drift-icons-lucide.js` | `https://storage.googleapis.com/drift-kit-public/25.20.0/drift-icons-lucide.js` | `sha384-wLKQdccKZKGXZJ9kcU8XCKyNI79EGI/7NrBVmOAlE0DZNThpyW1SY6z4j3teJLB0` |
90
- | `drift-icons-social.js` | `https://storage.googleapis.com/drift-kit-public/25.20.0/drift-icons-social.js` | `sha384-+hPy5fFjIqfIAmDN+WOwekTLu7NIFZvyzOwXUTAiBEQqnZ0/kXgd4frbSGOr/c8c` |
81
+ | `drift-kit.css` | `https://storage.googleapis.com/drift-kit-public/25.22.0/drift-kit.css` | `sha384-UVtX30+x8K0slCs4trhvlPvRYwDaxWHPZsMdGOvrPGKFV0/wfRiA9ngtQcOQGIVM` |
82
+ | `drift-kit.min.css` | `https://storage.googleapis.com/drift-kit-public/25.22.0/drift-kit.min.css` | `sha384-AEjm8Ox57gVbY7tZLJ35+qSCXvVbIRG/A4AlNDq8UfiZtEiKxTigGVwsDVirYEPg` |
83
+ | `components.js` | `https://storage.googleapis.com/drift-kit-public/25.22.0/components.js` | `sha384-JllYtWdLgBZLjhptpEq00WZiWBKA2AghLJrZ8vUkaj51ScFSBQm6VhphAXcOgEXF` |
84
+ | `drift-icons-card.js` | `https://storage.googleapis.com/drift-kit-public/25.22.0/drift-icons-card.js` | `sha384-Dl18Pw11QQ+/KtbAzbjt1DdP6fJwFNn4kCykxtFsF+uEZtUfMIseQJ7s14OmqEmg` |
85
+ | `drift-icons-coolicon.js` | `https://storage.googleapis.com/drift-kit-public/25.22.0/drift-icons-coolicon.js` | `sha384-CfSMUCWuUL4AcPkDdPtAHpifYxAeW0OarhAAJ+7sNGvRJkzvUBege6vq8G3N6LTH` |
86
+ | `drift-icons-feather.js` | `https://storage.googleapis.com/drift-kit-public/25.22.0/drift-icons-feather.js` | `sha384-MFEltFi3gRSwgNdAMXGCYo+6Ri9iXLLWp4Gq3AeayzeliWAo3czd+pTTLAFHHU6s` |
87
+ | `drift-icons-flag-circle.js` | `https://storage.googleapis.com/drift-kit-public/25.22.0/drift-icons-flag-circle.js` | `sha384-gtU89vOz98Fbn0KZWzkHVQA4+kFhOFYoT/Dr43ljTskqkyGDMw1ihH1I7Zn25dzZ` |
88
+ | `drift-icons-flag.js` | `https://storage.googleapis.com/drift-kit-public/25.22.0/drift-icons-flag.js` | `sha384-VtM24IDkwASIVzD5hI+ijQYRXufYQbveKM0+wqaFSGZbrYZlodFlnvZOexhCpiH9` |
89
+ | `drift-icons-lucide.js` | `https://storage.googleapis.com/drift-kit-public/25.22.0/drift-icons-lucide.js` | `sha384-wLKQdccKZKGXZJ9kcU8XCKyNI79EGI/7NrBVmOAlE0DZNThpyW1SY6z4j3teJLB0` |
90
+ | `drift-icons-social.js` | `https://storage.googleapis.com/drift-kit-public/25.22.0/drift-icons-social.js` | `sha384-+hPy5fFjIqfIAmDN+WOwekTLu7NIFZvyzOwXUTAiBEQqnZ0/kXgd4frbSGOr/c8c` |
91
91
 
92
92
  ### In Claude chat and Cowork
93
93
 
94
94
  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>`.
95
95
 
96
96
  ```html
97
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.20.0/drift-kit.min.css" integrity="sha384-6wHI3bytUCatNtDWq/QuKx+Tf+cMZ669WsBOqu/bMgiGK6JMf5ITpHLUy33tqGUN" crossorigin="anonymous" />
98
- <script src="https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.20.0/components.js" integrity="sha384-0AkpGlYR2L4992HOgHMBYFehC6NbufKDgxrjNm9rzt7E7orpI1m7Q5VKmlD5hpoc" crossorigin="anonymous" defer></script>
97
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.22.0/drift-kit.min.css" integrity="sha384-AEjm8Ox57gVbY7tZLJ35+qSCXvVbIRG/A4AlNDq8UfiZtEiKxTigGVwsDVirYEPg" crossorigin="anonymous" />
98
+ <script src="https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.22.0/components.js" integrity="sha384-8EfpRNOvlD+DLmN4bVSWrlyXCkLq4klBjTyq/3+OilC3DHLVozhgUPM1PfgWF7j8" crossorigin="anonymous" defer></script>
99
99
  ```
100
100
 
101
101
  | File | Address | Integrity |
102
102
  |---|---|---|
103
- | `components.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.20.0/components.js` | `sha384-0AkpGlYR2L4992HOgHMBYFehC6NbufKDgxrjNm9rzt7E7orpI1m7Q5VKmlD5hpoc` |
104
- | `drift-data-countries.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.20.0/drift-data-countries.js` | `sha384-GttgZnsRDPioKDxlsEyQtUqCwO0ObYYdjdjKBBt9LWThZld3OnUBnZ9EScI41qIf` |
105
- | `drift-icons-card.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.20.0/drift-icons-card.js` | `sha384-Dl18Pw11QQ+/KtbAzbjt1DdP6fJwFNn4kCykxtFsF+uEZtUfMIseQJ7s14OmqEmg` |
106
- | `drift-icons-coolicon.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.20.0/drift-icons-coolicon.js` | `sha384-CfSMUCWuUL4AcPkDdPtAHpifYxAeW0OarhAAJ+7sNGvRJkzvUBege6vq8G3N6LTH` |
107
- | `drift-icons-feather.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.20.0/drift-icons-feather.js` | `sha384-MFEltFi3gRSwgNdAMXGCYo+6Ri9iXLLWp4Gq3AeayzeliWAo3czd+pTTLAFHHU6s` |
108
- | `drift-icons-flag-circle.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.20.0/drift-icons-flag-circle.js` | `sha384-gtU89vOz98Fbn0KZWzkHVQA4+kFhOFYoT/Dr43ljTskqkyGDMw1ihH1I7Zn25dzZ` |
109
- | `drift-icons-flag.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.20.0/drift-icons-flag.js` | `sha384-VtM24IDkwASIVzD5hI+ijQYRXufYQbveKM0+wqaFSGZbrYZlodFlnvZOexhCpiH9` |
110
- | `drift-icons-lucide.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.20.0/drift-icons-lucide.js` | `sha384-wLKQdccKZKGXZJ9kcU8XCKyNI79EGI/7NrBVmOAlE0DZNThpyW1SY6z4j3teJLB0` |
111
- | `drift-icons-social.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.20.0/drift-icons-social.js` | `sha384-+hPy5fFjIqfIAmDN+WOwekTLu7NIFZvyzOwXUTAiBEQqnZ0/kXgd4frbSGOr/c8c` |
112
- | `drift-kit.min.css` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.20.0/drift-kit.min.css` | `sha384-6wHI3bytUCatNtDWq/QuKx+Tf+cMZ669WsBOqu/bMgiGK6JMf5ITpHLUy33tqGUN` |
103
+ | `components.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.22.0/components.js` | `sha384-8EfpRNOvlD+DLmN4bVSWrlyXCkLq4klBjTyq/3+OilC3DHLVozhgUPM1PfgWF7j8` |
104
+ | `drift-data-countries.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.22.0/drift-data-countries.js` | `sha384-GttgZnsRDPioKDxlsEyQtUqCwO0ObYYdjdjKBBt9LWThZld3OnUBnZ9EScI41qIf` |
105
+ | `drift-icons-card.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.22.0/drift-icons-card.js` | `sha384-Dl18Pw11QQ+/KtbAzbjt1DdP6fJwFNn4kCykxtFsF+uEZtUfMIseQJ7s14OmqEmg` |
106
+ | `drift-icons-coolicon.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.22.0/drift-icons-coolicon.js` | `sha384-CfSMUCWuUL4AcPkDdPtAHpifYxAeW0OarhAAJ+7sNGvRJkzvUBege6vq8G3N6LTH` |
107
+ | `drift-icons-feather.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.22.0/drift-icons-feather.js` | `sha384-MFEltFi3gRSwgNdAMXGCYo+6Ri9iXLLWp4Gq3AeayzeliWAo3czd+pTTLAFHHU6s` |
108
+ | `drift-icons-flag-circle.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.22.0/drift-icons-flag-circle.js` | `sha384-gtU89vOz98Fbn0KZWzkHVQA4+kFhOFYoT/Dr43ljTskqkyGDMw1ihH1I7Zn25dzZ` |
109
+ | `drift-icons-flag.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.22.0/drift-icons-flag.js` | `sha384-VtM24IDkwASIVzD5hI+ijQYRXufYQbveKM0+wqaFSGZbrYZlodFlnvZOexhCpiH9` |
110
+ | `drift-icons-lucide.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.22.0/drift-icons-lucide.js` | `sha384-wLKQdccKZKGXZJ9kcU8XCKyNI79EGI/7NrBVmOAlE0DZNThpyW1SY6z4j3teJLB0` |
111
+ | `drift-icons-social.js` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.22.0/drift-icons-social.js` | `sha384-+hPy5fFjIqfIAmDN+WOwekTLu7NIFZvyzOwXUTAiBEQqnZ0/kXgd4frbSGOr/c8c` |
112
+ | `drift-kit.min.css` | `https://cdn.jsdelivr.net/npm/@karmo-co/drift-kit-public@25.22.0/drift-kit.min.css` | `sha384-AEjm8Ox57gVbY7tZLJ35+qSCXvVbIRG/A4AlNDq8UfiZtEiKxTigGVwsDVirYEPg` |
113
113
 
114
114
  ### Integrity for 23.4.0
115
115
 
@@ -134,12 +134,12 @@ The behaviour script initialises every component on the page when it loads. Mark
134
134
 
135
135
  ## Theme from the address
136
136
 
137
- `data-theme-from="url"` on `<body>` (or `<html>`, which writes the body's theme as well, since the body's own `data-theme` would otherwise win) makes the behaviour script read `?theme=light` or `?theme=dark` from the address and write it as `data-theme` when the page loads; any other value, or none, leaves the page's own theme. Load `components.js` (or `kit/theme.js`) in `<head>` and the theme is on the body as it is parsed, before anything in it paints. A `[data-theme-toggle]` element flips the nearest `[data-theme-from]` element between the two on click; one that is not a button or a link is given `role="button"` and a tab stop, and Enter and Space flip it (`dk.theme.init(scope)` for one added later). `dk.theme.set(el, 'light' | 'dark')` sets one from script.
137
+ `data-theme-from="url"` on `<body>` (or `<html>`, which writes the body's theme as well, since the body's own `data-theme` would otherwise win) makes the behaviour script read `?theme=light` or `?theme=dark` from the address and write it as `data-theme` when the page loads; any other value, or none, leaves the page's own theme. Load `components.js` (or `kit/theme.js`) in `<head>` and the theme is on the body as it is parsed, before anything in it paints. A `[data-theme-toggle]` element flips the nearest `[data-theme-from]` element between the two on click; one that is not a button or a link is given `role="button"` and a tab stop, and Enter and Space flip it (`dk.theme.init(scope)` for one added later). `dk.theme.set(el, 'light' | 'dark')` sets one from script. `data-theme-from="system"` follows the device's `prefers-color-scheme` instead, written the same early way and again when the device changes, until a toggle sets one. In React, `<ThemeScript />` in `<head>` inlines this runtime for a server-rendered app; give `<html>` and `<body>` `suppressHydrationWarning`.
138
138
 
139
139
  ## Capture selectors
140
140
 
141
141
  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.
142
142
 
143
143
  ```json
144
- {"version":"25.20.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","icon":".dk-component-icon","card":".dk-component-card","symmetric":[".dk-component-tag",".dk-component-alert"]}
144
+ {"version":"25.22.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","icon":".dk-component-icon","card":".dk-component-card","symmetric":[".dk-component-tag",".dk-component-alert"]}
145
145
  ```
@@ -7,6 +7,7 @@ Declared values, light and dark. Reference a token by name; never copy its value
7
7
  | `--dk-motion-cascade-beat` | `100ms` | `100ms` |
8
8
  | `--dk-motion-cascade-duration` | `var(--dk-primitive-motion-duration-1200)` | `var(--dk-primitive-motion-duration-1200)` |
9
9
  | `--dk-motion-cascade-easing` | `var(--dk-primitive-motion-easing-sweep)` | `var(--dk-primitive-motion-easing-sweep)` |
10
+ | `--dk-motion-cascade-fallback-delay` | `var(--dk-primitive-motion-duration-3000)` | `var(--dk-primitive-motion-duration-3000)` |
10
11
  | `--dk-motion-cascade-max-beats` | `8` | `8` |
11
12
  | `--dk-motion-cascade-rise` | `24px` | `24px` |
12
13
  | `--dk-motion-chrome-cascade-beat` | `60ms` | `60ms` |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@karmo-co/drift-kit-reference",
3
- "version": "25.20.0",
3
+ "version": "25.22.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"