@lilydesignsystem/web-components-headless-identifiers 0.0.0-stage → 0.1.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.
package/index.md ADDED
@@ -0,0 +1,33 @@
1
+ # Lily Design System™ Web Components headless identifiers
2
+
3
+ `@lilydesignsystem/web-components-headless-identifiers`: the 164 national personal identifier components of the Lily Design System catalog for Web Components, an `-input` and
4
+ a `-view` for each of 82 identifier types across more than 50 countries (health numbers, national identity numbers, tax
5
+ numbers, passports). It is the add-on to [`@lilydesignsystem/web-components-headless`](../lily-design-system-web-components-headless/), which
6
+ has the other 473 components.
7
+
8
+ ```sh
9
+ pnpm add @lilydesignsystem/web-components-headless-identifiers
10
+ ```
11
+
12
+ ```html
13
+ <script type="module">
14
+ // Importing the package registers every element.
15
+ import "@lilydesignsystem/web-components-headless-identifiers";
16
+ </script>
17
+
18
+ <lily-united-kingdom-national-health-service-number-input
19
+ label="NHS number"
20
+ name="nhs"
21
+ ></lily-united-kingdom-national-health-service-number-input>
22
+ ```
23
+
24
+ Like the headless library it is unstyled: semantic HTML, ARIA and behaviour only. Each input renders
25
+ `autocomplete="off"` and `spellcheck="false"`, so the browser neither saves the value nor sends it to a spellchecker.
26
+ The formats, normalisation and validation rules are in [spec/national-identifiers](../spec/national-identifiers/index.md).
27
+
28
+ Why a separate package: [spec/headless-identifiers](../spec/headless-identifiers/index.md). Spec:
29
+ [spec/index.md](spec/index.md). Agents: [AGENTS.md](AGENTS.md).
30
+
31
+ ---
32
+
33
+ Lily™ and Lily Design System™ are trademarks.
package/package.json CHANGED
@@ -1,6 +1,74 @@
1
1
  {
2
2
  "name": "@lilydesignsystem/web-components-headless-identifiers",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "engines": {
5
+ "node": ">=26"
6
+ },
7
+ "description": "Headless, accessible, unstyled Web Components components for national personal identifiers (164: an input and a view for each of 82 identifier types across 50+ countries), the add-on to @lilydesignsystem/web-components-headless.",
8
+ "type": "module",
9
+ "main": "./dist/index.js",
10
+ "module": "./dist/index.js",
11
+ "types": "./dist/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.js"
16
+ },
17
+ "./solid": {
18
+ "types": "./solid.d.ts"
19
+ }
20
+ },
21
+ "files": [
22
+ "dist",
23
+ "solid.d.ts",
24
+ "index.md",
25
+ "README.md"
26
+ ],
27
+ "scripts": {
28
+ "build": "node build.mjs",
29
+ "prepublishOnly": "node build.mjs",
30
+ "test": "vitest run",
31
+ "test:watch": "vitest",
32
+ "test:ui": "vitest --ui",
33
+ "storybook": "storybook dev -p 6006",
34
+ "build-storybook": "storybook build",
35
+ "check": "tsc --noEmit"
36
+ },
37
+ "devDependencies": {
38
+ "@storybook/web-components-vite": "^10.6.5",
39
+ "@testing-library/user-event": "^14.6.8",
40
+ "@vitest/ui": "^5.0.5",
41
+ "axe-core": "4.13.0",
42
+ "jsdom": "^30.1.3",
43
+ "storybook": "^10.6.5",
44
+ "tsup": "^9.0.0",
45
+ "typescript": "^5.9.3",
46
+ "vite": "^8.3.5",
47
+ "vitest": "^5.0.5"
48
+ },
49
+ "keywords": [
50
+ "lily",
51
+ "design",
52
+ "system",
53
+ "web-components",
54
+ "custom-elements",
55
+ "headless",
56
+ "accessibility",
57
+ "wcag",
58
+ "aria",
59
+ "a11y",
60
+ "national-identifier",
61
+ "healthcare"
62
+ ],
63
+ "author": "Joel Parker Henderson <joel@joelparkerhenderson.com>",
64
+ "license": "MIT OR Apache-2.0 OR GPL-2.0-only OR GPL-3.0-only OR BSD-3-Clause",
65
+ "repository": {
66
+ "type": "git",
67
+ "url": "git+https://github.com/LilyDesignSystem/lily-design-system.git",
68
+ "directory": "lily-design-system-web-components-headless-identifiers"
69
+ },
70
+ "homepage": "https://lilydesignsystem.com/",
71
+ "bugs": {
72
+ "url": "https://github.com/LilyDesignSystem/lily-design-system/issues"
73
+ }
74
+ }
package/solid.d.ts ADDED
@@ -0,0 +1,39 @@
1
+ // Solid JSX typings for the Lily Web Components catalog.
2
+ //
3
+ // import "@lilydesignsystem/web-components-headless/solid";
4
+ //
5
+ // Every `lily-*` element is accepted, with any attribute: the typings do not
6
+ // check one element's attribute names (a misspelt `lable` is not an error).
7
+ // `ref`, `class`, `classList`, `id` and `slot` are typed.
8
+ // The attribute names of each element are documented in its component file
9
+ // and in components/{slug}/index.md, not duplicated here.
10
+ import "solid-js";
11
+
12
+ type LilyAttribute = string | number | boolean | undefined;
13
+
14
+ interface LilyElementProps {
15
+ ref?: HTMLElement | ((el: HTMLElement) => void);
16
+ class?: string;
17
+ classList?: Record<string, boolean | undefined>;
18
+ children?: unknown;
19
+ id?: string;
20
+ slot?: string;
21
+ // Lily attributes that are not presence-based booleans.
22
+ [attribute: `attr:${string}`]: LilyAttribute;
23
+ [property: `prop:${string}`]: unknown;
24
+ [event: `on:${string}`]: ((event: Event) => void) | undefined;
25
+ [data: `data-${string}`]: LilyAttribute;
26
+ [aria: `aria-${string}`]: LilyAttribute;
27
+ // Plain attributes of the element (label, value, open, …).
28
+ [attribute: string]: unknown;
29
+ }
30
+
31
+ declare module "solid-js" {
32
+ namespace JSX {
33
+ interface IntrinsicElements {
34
+ [element: `lily-${string}`]: LilyElementProps;
35
+ }
36
+ }
37
+ }
38
+
39
+ export {};