@rak200/ui 0.2.1 → 0.2.3
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 +11 -1
- package/dist/button.js +1 -1
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +9 -1
- package/dist/tokens.js.map +1 -1
- package/package.json +12 -6
package/README.md
CHANGED
|
@@ -48,9 +48,19 @@ Every visual decision is a CSS custom property, so a host restyles the kit witho
|
|
|
48
48
|
}
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
+
## Playground
|
|
52
|
+
|
|
53
|
+
**[rak200.github.io/ui](https://rak200.github.io/ui/)** — every component, rendered, with its
|
|
54
|
+
variants and states side by side and an accessibility panel over each one.
|
|
55
|
+
|
|
56
|
+
It follows `master` rather than the latest release, so it can show a component a published version
|
|
57
|
+
does not contain. The commit it was built from is stamped in the sidebar, so you can always tell
|
|
58
|
+
which one you are looking at.
|
|
59
|
+
|
|
51
60
|
## Documentation
|
|
52
61
|
|
|
53
|
-
The reference lives in [docs/](docs/README.md) — one page per unit.
|
|
62
|
+
The reference lives in [docs/](docs/README.md) — one page per unit. The playground shows the
|
|
63
|
+
components; `docs/` is what describes them.
|
|
54
64
|
|
|
55
65
|
## Status
|
|
56
66
|
|
package/dist/button.js
CHANGED
|
@@ -51,7 +51,7 @@ export class UiButton extends LitElement {
|
|
|
51
51
|
/* A visible focus ring is not decoration: removing it is the single most common
|
|
52
52
|
way a component stops being usable by keyboard. */
|
|
53
53
|
button:focus-visible {
|
|
54
|
-
outline: 2px solid var(--ui-color-focus, #
|
|
54
|
+
outline: 2px solid var(--ui-color-focus, #b45309);
|
|
55
55
|
outline-offset: 2px;
|
|
56
56
|
}
|
|
57
57
|
|
package/dist/tokens.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,mEAAmE;AACnE,eAAO,MAAM,MAAM,0LAUT,CAAC;AAEX,kDAAkD;AAClD,MAAM,MAAM,KAAK,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5C;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,mEAAmE;AACnE,eAAO,MAAM,MAAM,0LAUT,CAAC;AAEX,kDAAkD;AAClD,MAAM,MAAM,KAAK,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5C;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAkBpD,CAAC;AAEF;;;GAGG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAIxC"}
|
package/dist/tokens.js
CHANGED
|
@@ -32,7 +32,15 @@ export const defaults = {
|
|
|
32
32
|
'--ui-color-accent-contrast': '#ffffff',
|
|
33
33
|
'--ui-color-surface': '#ffffff',
|
|
34
34
|
'--ui-color-text': '#1f2937',
|
|
35
|
-
|
|
35
|
+
// Amber-700 rather than the amber-500 this shipped with, and the change is a floor
|
|
36
|
+
// rather than a preference: a focus ring is the visual information that identifies a
|
|
37
|
+
// component's state, so WCAG 1.4.11 asks 3:1 against what it sits on. `#f59e0b`
|
|
38
|
+
// against the default surface is 2.15:1 — and `outline-offset` puts the surface on
|
|
39
|
+
// both sides of the ring, so the surface is what it is measured against, not the
|
|
40
|
+
// button underneath. This value is 5.02:1 there and 3.53:1 on a dark surface, so it
|
|
41
|
+
// clears the floor in either scheme. `tests/tokens.test.ts` holds the assertion,
|
|
42
|
+
// because no axe rule does.
|
|
43
|
+
'--ui-color-focus': '#b45309',
|
|
36
44
|
'--ui-color-danger': '#b91c1c',
|
|
37
45
|
'--ui-radius': '0.375rem',
|
|
38
46
|
'--ui-space': '0.5rem',
|
package/dist/tokens.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,mEAAmE;AACnE,MAAM,CAAC,MAAM,MAAM,GAAG;IAClB,mBAAmB;IACnB,4BAA4B;IAC5B,oBAAoB;IACpB,iBAAiB;IACjB,kBAAkB;IAClB,mBAAmB;IACnB,aAAa;IACb,YAAY;IACZ,WAAW;CACL,CAAC;AAKX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAoC;IACrD,mBAAmB,EAAE,SAAS;IAC9B,4BAA4B,EAAE,SAAS;IACvC,oBAAoB,EAAE,SAAS;IAC/B,iBAAiB,EAAE,SAAS;IAC5B,kBAAkB,EAAE,SAAS;IAC7B,mBAAmB,EAAE,SAAS;IAC9B,aAAa,EAAE,UAAU;IACzB,YAAY,EAAE,QAAQ;IACtB,WAAW,EAAE,uBAAuB;CACvC,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,eAAe;IAC3B,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEjF,OAAO,YAAY,IAAI,KAAK,CAAC;AACjC,CAAC"}
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,mEAAmE;AACnE,MAAM,CAAC,MAAM,MAAM,GAAG;IAClB,mBAAmB;IACnB,4BAA4B;IAC5B,oBAAoB;IACpB,iBAAiB;IACjB,kBAAkB;IAClB,mBAAmB;IACnB,aAAa;IACb,YAAY;IACZ,WAAW;CACL,CAAC;AAKX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAoC;IACrD,mBAAmB,EAAE,SAAS;IAC9B,4BAA4B,EAAE,SAAS;IACvC,oBAAoB,EAAE,SAAS;IAC/B,iBAAiB,EAAE,SAAS;IAC5B,mFAAmF;IACnF,qFAAqF;IACrF,gFAAgF;IAChF,mFAAmF;IACnF,iFAAiF;IACjF,oFAAoF;IACpF,iFAAiF;IACjF,4BAA4B;IAC5B,kBAAkB,EAAE,SAAS;IAC7B,mBAAmB,EAAE,SAAS;IAC9B,aAAa,EAAE,UAAU;IACzB,YAAY,EAAE,QAAQ;IACtB,WAAW,EAAE,uBAAuB;CACvC,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,eAAe;IAC3B,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEjF,OAAO,YAAY,IAAI,KAAK,CAAC;AACjC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rak200/ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Host-agnostic custom-element UI components for the rak200 ecosystem",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "rak200 <rak.ricardo@windowslive.com>",
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
"dist"
|
|
26
26
|
],
|
|
27
27
|
"sideEffects": [
|
|
28
|
-
"./dist/*.js"
|
|
28
|
+
"./dist/*.js",
|
|
29
|
+
"./src/*.ts"
|
|
29
30
|
],
|
|
30
31
|
"publishConfig": {
|
|
31
32
|
"access": "public"
|
|
@@ -37,17 +38,22 @@
|
|
|
37
38
|
"analyse": "tsc --noEmit && eslint .",
|
|
38
39
|
"test": "vitest run",
|
|
39
40
|
"coverage": "coverage-floor",
|
|
40
|
-
"scan": "
|
|
41
|
+
"scan": "rak200-scan",
|
|
41
42
|
"mutation": "stryker run",
|
|
42
|
-
"build": "tsc -p tsconfig.build.json"
|
|
43
|
+
"build": "tsc -p tsconfig.build.json",
|
|
44
|
+
"storybook": "storybook dev -p 6006",
|
|
45
|
+
"build-storybook": "storybook build"
|
|
43
46
|
},
|
|
44
47
|
"dependencies": {
|
|
45
48
|
"lit": "^3.3.3"
|
|
46
49
|
},
|
|
47
50
|
"devDependencies": {
|
|
48
|
-
"@rak200/coding-standard-ts": "github:rak200/coding-standard-ts#0.4.
|
|
51
|
+
"@rak200/coding-standard-ts": "github:rak200/coding-standard-ts#0.4.7",
|
|
52
|
+
"@storybook/addon-a11y": "^10.5.8",
|
|
53
|
+
"@storybook/web-components-vite": "^10.5.8",
|
|
49
54
|
"@types/node": "^26.1.2",
|
|
50
55
|
"@vitest/browser-playwright": "^4.1.10",
|
|
51
|
-
"axe-core": "^4.13.0"
|
|
56
|
+
"axe-core": "^4.13.0",
|
|
57
|
+
"storybook": "^10.5.8"
|
|
52
58
|
}
|
|
53
59
|
}
|