@atomic-ui/ui 0.5.0 → 0.7.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.
Files changed (77) hide show
  1. package/README.md +7 -7
  2. package/custom-elements.json +2641 -256
  3. package/dist/base/tone.d.ts +1 -1
  4. package/dist/{chunk-TAZZLOUY.js → chunk-2HWO5TFV.js} +2 -2
  5. package/dist/{chunk-FMSC7J7J.js → chunk-4ZQTXTPA.js} +1 -1
  6. package/dist/{chunk-FMSC7J7J.js.map → chunk-4ZQTXTPA.js.map} +1 -1
  7. package/dist/chunk-AMDTBUUL.js +299 -0
  8. package/dist/chunk-AMDTBUUL.js.map +1 -0
  9. package/dist/{chunk-EJD6LT7E.js → chunk-BNYILASW.js} +36 -4
  10. package/dist/chunk-BNYILASW.js.map +1 -0
  11. package/dist/{chunk-Q54FX3SY.js → chunk-INA53XXW.js} +2 -2
  12. package/dist/chunk-INA53XXW.js.map +1 -0
  13. package/dist/{chunk-ACQ4KYPR.js → chunk-KFAGXPIK.js} +2 -2
  14. package/dist/{chunk-ACQ4KYPR.js.map → chunk-KFAGXPIK.js.map} +1 -1
  15. package/dist/{chunk-SV77SN6P.js → chunk-MLRTPQQO.js} +39 -2
  16. package/dist/chunk-MLRTPQQO.js.map +1 -0
  17. package/dist/{chunk-ZS7RPXCT.js → chunk-NU34ZQFR.js} +4 -2
  18. package/dist/chunk-NU34ZQFR.js.map +1 -0
  19. package/dist/chunk-NUUX2SSN.js +263 -0
  20. package/dist/chunk-NUUX2SSN.js.map +1 -0
  21. package/dist/{chunk-HNZQ7LM4.js → chunk-OE6O3XQB.js} +78 -3
  22. package/dist/chunk-OE6O3XQB.js.map +1 -0
  23. package/dist/{chunk-WWYYNR3Z.js → chunk-RZWRAJCD.js} +7 -2
  24. package/dist/chunk-RZWRAJCD.js.map +1 -0
  25. package/dist/chunk-UF6KCRNT.js +316 -0
  26. package/dist/chunk-UF6KCRNT.js.map +1 -0
  27. package/dist/{chunk-Z45LY6BT.js → chunk-WH43U4IY.js} +37 -2
  28. package/dist/chunk-WH43U4IY.js.map +1 -0
  29. package/dist/{chunk-5Y3HYRCU.js → chunk-WS4AYRSL.js} +20 -2
  30. package/dist/chunk-WS4AYRSL.js.map +1 -0
  31. package/dist/{chunk-PANH23MF.js → chunk-XZQH2M5I.js} +2 -2
  32. package/dist/components/app-ui.d.ts +6 -1
  33. package/dist/components/app-ui.js +2 -2
  34. package/dist/components/badge.d.ts +7 -2
  35. package/dist/components/badge.js +2 -2
  36. package/dist/components/blocks.d.ts +27 -1
  37. package/dist/components/blocks.js +3 -1
  38. package/dist/components/button.d.ts +24 -3
  39. package/dist/components/button.js +2 -2
  40. package/dist/components/chip.js +1 -1
  41. package/dist/components/icon.d.ts +19 -1
  42. package/dist/components/icon.js +1 -1
  43. package/dist/components/link.d.ts +1 -1
  44. package/dist/components/link.js +2 -2
  45. package/dist/components/navigation.js +2 -2
  46. package/dist/components/progress.d.ts +11 -0
  47. package/dist/components/progress.js +1 -1
  48. package/dist/components/rows.d.ts +196 -0
  49. package/dist/components/rows.js +16 -0
  50. package/dist/components/rows.js.map +1 -0
  51. package/dist/components/shell.d.ts +166 -0
  52. package/dist/components/shell.js +17 -0
  53. package/dist/components/shell.js.map +1 -0
  54. package/dist/components/switch.d.ts +147 -0
  55. package/dist/components/switch.js +11 -0
  56. package/dist/components/switch.js.map +1 -0
  57. package/dist/components/table.js +2 -2
  58. package/dist/components/text-input.d.ts +14 -1
  59. package/dist/components/text-input.js +2 -1
  60. package/dist/components/textarea.js +1 -1
  61. package/dist/index.d.ts +6 -3
  62. package/dist/index.js +44 -16
  63. package/dist/standalone/atomic-ui.js +929 -285
  64. package/dist/standalone/atomic-ui.js.map +4 -4
  65. package/dist/standalone/index.html +1 -1
  66. package/package.json +2 -2
  67. package/specimen/index.html +1 -1
  68. package/dist/chunk-5Y3HYRCU.js.map +0 -1
  69. package/dist/chunk-EJD6LT7E.js.map +0 -1
  70. package/dist/chunk-HNZQ7LM4.js.map +0 -1
  71. package/dist/chunk-Q54FX3SY.js.map +0 -1
  72. package/dist/chunk-SV77SN6P.js.map +0 -1
  73. package/dist/chunk-WWYYNR3Z.js.map +0 -1
  74. package/dist/chunk-Z45LY6BT.js.map +0 -1
  75. package/dist/chunk-ZS7RPXCT.js.map +0 -1
  76. /package/dist/{chunk-TAZZLOUY.js.map → chunk-2HWO5TFV.js.map} +0 -0
  77. /package/dist/{chunk-PANH23MF.js.map → chunk-XZQH2M5I.js.map} +0 -0
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Standard custom elements, styled only from design tokens, built to WCAG 2.2 AA: the product components every Impakt product uses, and the shared base every element builds on.
4
4
 
5
- The blocks Strata builds sites from, such as the hero, the calculators, the site header and footer and the changelog blocks, are in [`@atomic-ui/strata`](../strata), which builds on this package. They moved there in 0.5.0, under the same tags.
5
+ The section blocks Impakt sites are built from, such as the hero, the calculators, the site header and footer and the changelog blocks, are in [`@atomic-ui/blocks`](../strata), which builds on this package. They moved there in 0.5.0, under the same tags.
6
6
 
7
7
  There is one implementation, in Lit. React, Vue and Angular get thin bindings rather than their own components, because an accessible component is mostly behaviour, such as focus management, roving tabindex and live-region timing, and behaviour written three times is wrong in three different ways ([ADR 0004](https://github.com/matthill8286/strata/blob/main/docs/decisions/0004-lit-plus-wrappers.md)).
8
8
 
@@ -21,7 +21,7 @@ A product with no build step copies one file, `atomic-ui.js`, into its `public`
21
21
  <impakt-button variant="primary">Save and continue</impakt-button>
22
22
  ```
23
23
 
24
- The file is `dist/standalone/atomic-ui.js`, also exported as `@atomic-ui/ui/standalone`. It is one minified ES module holding Lit and every element, and it defines every element when it loads. Its source map sits beside it. At 0.5.0 it is about 160 KB, or 40 KB gzipped. It also exports what this package exports, and Lit's `LitElement`, `html`, `css`, `svg`, `nothing`, `noChange`, `unsafeCSS` and `render`, so that `atomic-ui-strata.js` from `@atomic-ui/strata`, loaded after it from the same folder, imports the base, the product components and Lit from it instead of carrying a second copy. A product that uses the Strata blocks copies both files.
24
+ The file is `dist/standalone/atomic-ui.js`, also exported as `@atomic-ui/ui/standalone`. It is one minified ES module holding Lit and every element, and it defines every element when it loads. Its source map sits beside it. At 0.5.0 it is about 160 KB, or 40 KB gzipped. It also exports what this package exports, and Lit's `LitElement`, `html`, `css`, `svg`, `nothing`, `noChange`, `unsafeCSS` and `render`, so that `atomic-ui-blocks.js` from `@atomic-ui/blocks`, loaded after it from the same folder, imports the base, the product components and Lit from it instead of carrying a second copy. A product that uses the blocks copies both files.
25
25
 
26
26
  To copy it, build the design system and run `pnpm ui:copy ../impkt-tender` at the root, naming the product's folder. A second argument names a folder other than `public`. The first line of the copy names the version and the design system's commit. To update it, build again and run the same command. A product that installs this package from npm can run `npx impakt-ui-copy . public`.
27
27
 
@@ -38,7 +38,7 @@ The app installs this package and the bindings for its framework, and imports th
38
38
  <Table caption="Open cases" columns={columns} rows={rows} stack onSort={(e) => sortBy(e.detail)} />
39
39
  ```
40
40
 
41
- Each binding is thin, and each exists for a different reason. React needs typed events, and before React 19 it needed properties set rather than attributes. Vue needs the `.` prefix hidden and prop types. Angular needs `ControlValueAccessor` directives, without which a reactive form containing one of these controls silently never receives a value. The React and Vue bindings are generated from this package's manifest, so they cover every element. They are generated from `@atomic-ui/strata`'s manifest too, into a separate entry, `@atomic-ui/ui-react/strata` and `@atomic-ui/ui-vue/strata`.
41
+ Each binding is thin, and each exists for a different reason. React needs typed events, and before React 19 it needed properties set rather than attributes. Vue needs the `.` prefix hidden and prop types. Angular needs `ControlValueAccessor` directives, without which a reactive form containing one of these controls silently never receives a value. The React and Vue bindings are generated from this package's manifest, so they cover every element. They are generated from `@atomic-ui/blocks`'s manifest too, into a separate entry, `@atomic-ui/ui-react/blocks` and `@atomic-ui/ui-vue/blocks`.
42
42
 
43
43
  ### The tokens
44
44
 
@@ -66,7 +66,7 @@ Fifty-two elements.
66
66
  | Layout | `impakt-page`, `impakt-section`, `impakt-stack`, `impakt-grid`, `impakt-card`, `impakt-divider`, `impakt-spacer`, `impakt-visually-hidden` |
67
67
  | Type and media | `impakt-heading`, `impakt-text`, `impakt-list`, `impakt-price`, `impakt-icon`, `impakt-image`, `impakt-logo`, `impakt-document-link`, `impakt-avatar`, `impakt-avatar-group` |
68
68
 
69
- It also exports the shared base that `@atomic-ui/strata` and an app's own elements build on: `ImpaktElement` and `FieldElement`, the tokens (`t`, `token`, `space`, `type` and the rest), the style fragments that carry the accessibility guarantees (`focusRing`, `targetSize`, `touchTarget`, `visuallyHidden`, `hideOn`), the wording and locale lookups (`say`, `pageLocale`), the scroll lock, the icons, and the tones (`Tone`, `toneOf`) the chip shares with the changelog blocks.
69
+ It also exports the shared base that `@atomic-ui/blocks` and an app's own elements build on: `ImpaktElement` and `FieldElement`, the tokens (`t`, `token`, `space`, `type` and the rest), the style fragments that carry the accessibility guarantees (`focusRing`, `targetSize`, `touchTarget`, `visuallyHidden`, `hideOn`), the wording and locale lookups (`say`, `pageLocale`), the scroll lock, the icons, and the tones (`Tone`, `toneOf`) the chip shares with the changelog blocks.
70
70
 
71
71
  **A layout puts `impakt-page` at its root.** It gives a page the brand's page width (`layout.page-width`), its side margins on a phone, tablet and desktop (`layout.margin.*`), the header, main and footer landmarks, and a Skip to content link. Without it a page runs edge to edge. `impakt-section` is a band across the whole width of the screen with the content kept to the page width inside it. A product page with its own layout can leave both out.
72
72
 
@@ -109,9 +109,9 @@ These are the parts the products' app screens use most, and the browser suite ho
109
109
 
110
110
  Two suites, split by what each can honestly measure.
111
111
 
112
- `@atomic-ui/strata` runs the same two suites over its blocks.
112
+ `@atomic-ui/blocks` runs the same two suites over its blocks.
113
113
 
114
- **`pnpm --filter @atomic-ui/ui test`** runs in happy-dom, which has no layout engine. It checks what breaks in practice: roles, accessible names, the `describedby` relationships resolved to the text a screen reader would read, keyboard behaviour and form association. axe is restricted to the rules that mean anything without layout. Running the full rule set here would report passes for colour contrast and target size that axe never evaluated. It also checks that nothing in the 0.2.0 manifest has gone, apart from the 37 blocks that moved to `@atomic-ui/strata`, whose own test checks the two manifests together.
114
+ **`pnpm --filter @atomic-ui/ui test`** runs in happy-dom, which has no layout engine. It checks what breaks in practice: roles, accessible names, the `describedby` relationships resolved to the text a screen reader would read, keyboard behaviour and form association. axe is restricted to the rules that mean anything without layout. Running the full rule set here would report passes for colour contrast and target size that axe never evaluated. It also checks that nothing in the 0.2.0 manifest has gone, apart from the 37 blocks that moved to `@atomic-ui/blocks`, whose own test checks the two manifests together.
115
115
 
116
116
  **`pnpm --filter @atomic-ui/ui test:browser`** runs the real library in Chromium. It answers everything the first suite cannot:
117
117
 
@@ -128,7 +128,7 @@ Between the two, no criterion is reported as passing without being evaluated.
128
128
 
129
129
  ## The manifest
130
130
 
131
- `pnpm --filter @atomic-ui/ui manifest` writes `custom-elements.json`, and the package build runs it too. It is one of the two sources the CMS palette is generated from, with `@atomic-ui/strata`'s, and the React and Vue bindings are generated from it. It is checked in so it can be read from a fresh clone, and it is published, as `@atomic-ui/ui/custom-elements.json`. Strata's publish gate checks pages against it, so an element, attribute, property, event or slot can be added but never removed or renamed.
131
+ `pnpm --filter @atomic-ui/ui manifest` writes `custom-elements.json`, and the package build runs it too. It is one of the two sources the CMS palette is generated from, with `@atomic-ui/blocks`'s, and the React and Vue bindings are generated from it. It is checked in so it can be read from a fresh clone, and it is published, as `@atomic-ui/ui/custom-elements.json`. Strata's publish gate checks pages against it, so an element, attribute, property, event or slot can be added but never removed or renamed.
132
132
 
133
133
  Two tags the Custom Elements Manifest spec has no place for, `@category` and `@icon`, are captured by a plugin in `custom-elements-manifest.config.mjs`, so they live on the component rather than in a lookup table somewhere else. Each event's `@fires` tag names the type of its detail, which the bindings use for their event types.
134
134