@atomic-ui/ui 0.1.1 → 0.1.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.
Files changed (75) hide show
  1. package/dist/base/tokens.d.ts +6 -0
  2. package/dist/{chunk-TRLEYGGH.js → chunk-2RBYVWZT.js} +2 -2
  3. package/dist/{chunk-SSNCGJ5W.js → chunk-3OSL2HMN.js} +2 -2
  4. package/dist/{chunk-KAU3V65B.js → chunk-4KFHQBH2.js} +2 -2
  5. package/dist/chunk-4Y3HJBJY.js +73 -0
  6. package/dist/chunk-4Y3HJBJY.js.map +1 -0
  7. package/dist/{chunk-J5KAMJ2N.js → chunk-5NUF7ZQA.js} +21 -10
  8. package/dist/chunk-5NUF7ZQA.js.map +1 -0
  9. package/dist/{chunk-T4HSPWA7.js → chunk-6MLXFFH4.js} +2 -2
  10. package/dist/{chunk-GU4UQKJP.js → chunk-6UDDZQDK.js} +2 -2
  11. package/dist/{chunk-NEWN44LO.js → chunk-A4CJ2F3J.js} +3 -3
  12. package/dist/{chunk-GEBLDC2J.js → chunk-CGMDIZPO.js} +3 -3
  13. package/dist/{chunk-IHEEUM3M.js → chunk-DIZCGSJA.js} +2 -2
  14. package/dist/{chunk-BUWE6XGX.js → chunk-GGODB3GY.js} +23 -3
  15. package/dist/chunk-GGODB3GY.js.map +1 -0
  16. package/dist/{chunk-BOLZMDAS.js → chunk-HWNY6U5F.js} +2 -2
  17. package/dist/{chunk-AC6G7X3G.js → chunk-IBTOZOGI.js} +2 -2
  18. package/dist/{chunk-HJ2V635J.js → chunk-LFOWTFMR.js} +3 -3
  19. package/dist/{chunk-XEN5NV55.js → chunk-MAMBT7BZ.js} +3 -3
  20. package/dist/{chunk-T63FI4ET.js → chunk-OBCSDZHP.js} +3 -3
  21. package/dist/{chunk-Z4KZG2E3.js → chunk-PDXOPY22.js} +3 -3
  22. package/dist/{chunk-7T34CRBF.js → chunk-QYHWR6C5.js} +3 -3
  23. package/dist/{chunk-TOTVL3YH.js → chunk-S3EQO33M.js} +2 -2
  24. package/dist/{chunk-BBWMRF5N.js → chunk-TIKX5POO.js} +2 -2
  25. package/dist/chunk-TIKX5POO.js.map +1 -0
  26. package/dist/{chunk-KC6RKWO6.js → chunk-TZD7IVVQ.js} +2 -2
  27. package/dist/{chunk-6HZA6A3L.js → chunk-ZXCSQ6MK.js} +2 -2
  28. package/dist/components/accordion.js +2 -2
  29. package/dist/components/alert.js +2 -2
  30. package/dist/components/button.d.ts +1 -0
  31. package/dist/components/button.js +2 -2
  32. package/dist/components/checkbox-group.js +3 -3
  33. package/dist/components/checkbox.js +3 -3
  34. package/dist/components/date-input.js +3 -3
  35. package/dist/components/dialog.js +2 -2
  36. package/dist/components/grid.d.ts +39 -1
  37. package/dist/components/grid.js +2 -2
  38. package/dist/components/help.js +2 -2
  39. package/dist/components/layout.d.ts +31 -0
  40. package/dist/components/layout.js +2 -2
  41. package/dist/components/link.js +2 -2
  42. package/dist/components/media.js +2 -2
  43. package/dist/components/price.js +2 -2
  44. package/dist/components/progress.js +2 -2
  45. package/dist/components/radio-group.js +3 -3
  46. package/dist/components/select.js +3 -3
  47. package/dist/components/summary-list.js +2 -2
  48. package/dist/components/table.js +2 -2
  49. package/dist/components/text-input.js +3 -3
  50. package/dist/components/textarea.js +3 -3
  51. package/dist/index.js +22 -22
  52. package/package.json +2 -2
  53. package/dist/chunk-4YAA7EML.js +0 -43
  54. package/dist/chunk-4YAA7EML.js.map +0 -1
  55. package/dist/chunk-BBWMRF5N.js.map +0 -1
  56. package/dist/chunk-BUWE6XGX.js.map +0 -1
  57. package/dist/chunk-J5KAMJ2N.js.map +0 -1
  58. /package/dist/{chunk-TRLEYGGH.js.map → chunk-2RBYVWZT.js.map} +0 -0
  59. /package/dist/{chunk-SSNCGJ5W.js.map → chunk-3OSL2HMN.js.map} +0 -0
  60. /package/dist/{chunk-KAU3V65B.js.map → chunk-4KFHQBH2.js.map} +0 -0
  61. /package/dist/{chunk-T4HSPWA7.js.map → chunk-6MLXFFH4.js.map} +0 -0
  62. /package/dist/{chunk-GU4UQKJP.js.map → chunk-6UDDZQDK.js.map} +0 -0
  63. /package/dist/{chunk-NEWN44LO.js.map → chunk-A4CJ2F3J.js.map} +0 -0
  64. /package/dist/{chunk-GEBLDC2J.js.map → chunk-CGMDIZPO.js.map} +0 -0
  65. /package/dist/{chunk-IHEEUM3M.js.map → chunk-DIZCGSJA.js.map} +0 -0
  66. /package/dist/{chunk-BOLZMDAS.js.map → chunk-HWNY6U5F.js.map} +0 -0
  67. /package/dist/{chunk-AC6G7X3G.js.map → chunk-IBTOZOGI.js.map} +0 -0
  68. /package/dist/{chunk-HJ2V635J.js.map → chunk-LFOWTFMR.js.map} +0 -0
  69. /package/dist/{chunk-XEN5NV55.js.map → chunk-MAMBT7BZ.js.map} +0 -0
  70. /package/dist/{chunk-T63FI4ET.js.map → chunk-OBCSDZHP.js.map} +0 -0
  71. /package/dist/{chunk-Z4KZG2E3.js.map → chunk-PDXOPY22.js.map} +0 -0
  72. /package/dist/{chunk-7T34CRBF.js.map → chunk-QYHWR6C5.js.map} +0 -0
  73. /package/dist/{chunk-TOTVL3YH.js.map → chunk-S3EQO33M.js.map} +0 -0
  74. /package/dist/{chunk-KC6RKWO6.js.map → chunk-TZD7IVVQ.js.map} +0 -0
  75. /package/dist/{chunk-6HZA6A3L.js.map → chunk-ZXCSQ6MK.js.map} +0 -0
@@ -7,7 +7,7 @@ import {
7
7
  space,
8
8
  t,
9
9
  visuallyHidden
10
- } from "./chunk-J5KAMJ2N.js";
10
+ } from "./chunk-5NUF7ZQA.js";
11
11
 
12
12
  // packages/ui/src/base/FieldElement.ts
13
13
  import { html, css, nothing } from "lit";
@@ -159,4 +159,4 @@ var FieldElement = class extends ImpktElement {
159
159
  export {
160
160
  FieldElement
161
161
  };
162
- //# sourceMappingURL=chunk-6HZA6A3L.js.map
162
+ //# sourceMappingURL=chunk-ZXCSQ6MK.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ImpktAccordion
3
- } from "../chunk-T4HSPWA7.js";
4
- import "../chunk-J5KAMJ2N.js";
3
+ } from "../chunk-6MLXFFH4.js";
4
+ import "../chunk-5NUF7ZQA.js";
5
5
  export {
6
6
  ImpktAccordion
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ImpktAlert
3
- } from "../chunk-SSNCGJ5W.js";
4
- import "../chunk-J5KAMJ2N.js";
3
+ } from "../chunk-3OSL2HMN.js";
4
+ import "../chunk-5NUF7ZQA.js";
5
5
  export {
6
6
  ImpktAlert
7
7
  };
@@ -22,6 +22,7 @@ import { ImpktElement } from '../base/ImpktElement';
22
22
  * @category action
23
23
  * @icon button
24
24
  * @slot - The button label.
25
+ * @fires click - When the button is pressed. Not while it is busy or disabled.
25
26
  */
26
27
  export declare class ImpktButton extends ImpktElement {
27
28
  static formAssociated: boolean;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ImpktButton
3
- } from "../chunk-BBWMRF5N.js";
4
- import "../chunk-J5KAMJ2N.js";
3
+ } from "../chunk-TIKX5POO.js";
4
+ import "../chunk-5NUF7ZQA.js";
5
5
  export {
6
6
  ImpktButton
7
7
  };
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  ImpktCheckboxGroup
3
- } from "../chunk-Z4KZG2E3.js";
4
- import "../chunk-6HZA6A3L.js";
5
- import "../chunk-J5KAMJ2N.js";
3
+ } from "../chunk-PDXOPY22.js";
4
+ import "../chunk-ZXCSQ6MK.js";
5
+ import "../chunk-5NUF7ZQA.js";
6
6
  export {
7
7
  ImpktCheckboxGroup
8
8
  };
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  ImpktCheckbox
3
- } from "../chunk-HJ2V635J.js";
4
- import "../chunk-6HZA6A3L.js";
5
- import "../chunk-J5KAMJ2N.js";
3
+ } from "../chunk-LFOWTFMR.js";
4
+ import "../chunk-ZXCSQ6MK.js";
5
+ import "../chunk-5NUF7ZQA.js";
6
6
  export {
7
7
  ImpktCheckbox
8
8
  };
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  ImpktDateInput
3
- } from "../chunk-GEBLDC2J.js";
4
- import "../chunk-6HZA6A3L.js";
5
- import "../chunk-J5KAMJ2N.js";
3
+ } from "../chunk-CGMDIZPO.js";
4
+ import "../chunk-ZXCSQ6MK.js";
5
+ import "../chunk-5NUF7ZQA.js";
6
6
  export {
7
7
  ImpktDateInput
8
8
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ImpktDialog
3
- } from "../chunk-TOTVL3YH.js";
4
- import "../chunk-J5KAMJ2N.js";
3
+ } from "../chunk-S3EQO33M.js";
4
+ import "../chunk-5NUF7ZQA.js";
5
5
  export {
6
6
  ImpktDialog
7
7
  };
@@ -3,6 +3,10 @@ import { ImpktElement } from '../base/ImpktElement';
3
3
  * A responsive row with named column slots. Child order stays inside each
4
4
  * column; changing a page's visual grid never reorders its reading sequence.
5
5
  *
6
+ * Gutters come from the brand's layout, so every grid for a partner keeps the
7
+ * same rhythm. Where the columns stack is a choice, because a three-column
8
+ * row of cards may work on a tablet where two columns of long text do not.
9
+ *
6
10
  * @category layout
7
11
  * @icon columns
8
12
  * @slot column-1 - First column.
@@ -16,13 +20,47 @@ export declare class ImpktGrid extends ImpktElement {
16
20
  type: StringConstructor;
17
21
  reflect: boolean;
18
22
  };
23
+ widths: {
24
+ type: StringConstructor;
25
+ reflect: boolean;
26
+ };
19
27
  gap: {
20
28
  type: StringConstructor;
21
29
  reflect: boolean;
22
30
  };
31
+ stackOn: {
32
+ type: StringConstructor;
33
+ reflect: boolean;
34
+ attribute: string;
35
+ };
36
+ align: {
37
+ type: StringConstructor;
38
+ reflect: boolean;
39
+ };
40
+ spaceAbove: {
41
+ type: StringConstructor;
42
+ reflect: boolean;
43
+ attribute: string;
44
+ };
45
+ spaceBelow: {
46
+ type: StringConstructor;
47
+ reflect: boolean;
48
+ attribute: string;
49
+ };
23
50
  };
24
51
  columns: 'one' | 'two' | 'three' | 'four' | 'sidebar-left' | 'sidebar-right';
25
- gap: 'sm' | 'md' | 'lg';
52
+ /** How wide each column is against the others. Applies when it has as many parts as there are columns. */
53
+ widths: 'equal' | '2:1' | '1:2' | '3:1' | '1:3' | '1:2:1' | '2:1:1' | '1:1:2';
54
+ /** The space between columns, from the brand's gutters. */
55
+ gap: 'none' | 'sm' | 'md' | 'lg';
56
+ /** The screens on which the columns stack, one above another, in column order. */
57
+ stackOn: 'phone' | 'tablet' | 'never';
58
+ /** How columns of different heights line up. */
59
+ align: 'stretch' | 'start' | 'center' | 'end';
60
+ /** Space before the grid, from the spacing scale. */
61
+ spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl';
62
+ /** Space after the grid, from the spacing scale. */
63
+ spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl';
26
64
  constructor();
27
65
  static styles: import("lit").CSSResult[];
28
66
  render(): import("lit").TemplateResult<1>;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ImpktGrid
3
- } from "../chunk-4YAA7EML.js";
4
- import "../chunk-J5KAMJ2N.js";
3
+ } from "../chunk-4Y3HJBJY.js";
4
+ import "../chunk-5NUF7ZQA.js";
5
5
  export {
6
6
  ImpktGrid
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ImpktHelp
3
- } from "../chunk-AC6G7X3G.js";
4
- import "../chunk-J5KAMJ2N.js";
3
+ } from "../chunk-IBTOZOGI.js";
4
+ import "../chunk-5NUF7ZQA.js";
5
5
  export {
6
6
  ImpktHelp
7
7
  };
@@ -19,8 +19,22 @@ export declare class ImpktStack extends ImpktElement {
19
19
  type: StringConstructor;
20
20
  reflect: boolean;
21
21
  };
22
+ spaceAbove: {
23
+ type: StringConstructor;
24
+ reflect: boolean;
25
+ attribute: string;
26
+ };
27
+ spaceBelow: {
28
+ type: StringConstructor;
29
+ reflect: boolean;
30
+ attribute: string;
31
+ };
22
32
  };
23
33
  gap: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
34
+ /** Space before the stack, from the spacing scale. */
35
+ spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl';
36
+ /** Space after the stack, from the spacing scale. */
37
+ spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl';
24
38
  constructor();
25
39
  static styles: import("lit").CSSResult[];
26
40
  render(): TemplateResult;
@@ -32,6 +46,23 @@ export declare class ImpktStack extends ImpktElement {
32
46
  * @slot - What sits on the card.
33
47
  */
34
48
  export declare class ImpktCard extends ImpktElement {
49
+ static properties: {
50
+ spaceAbove: {
51
+ type: StringConstructor;
52
+ reflect: boolean;
53
+ attribute: string;
54
+ };
55
+ spaceBelow: {
56
+ type: StringConstructor;
57
+ reflect: boolean;
58
+ attribute: string;
59
+ };
60
+ };
61
+ /** Space before the card, from the spacing scale. */
62
+ spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl';
63
+ /** Space after the card, from the spacing scale. */
64
+ spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl';
65
+ constructor();
35
66
  static styles: import("lit").CSSResult[];
36
67
  render(): TemplateResult;
37
68
  }
@@ -3,8 +3,8 @@ import {
3
3
  ImpktHeading,
4
4
  ImpktStack,
5
5
  ImpktText
6
- } from "../chunk-BUWE6XGX.js";
7
- import "../chunk-J5KAMJ2N.js";
6
+ } from "../chunk-GGODB3GY.js";
7
+ import "../chunk-5NUF7ZQA.js";
8
8
  export {
9
9
  ImpktCard,
10
10
  ImpktHeading,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ImpktLink
3
- } from "../chunk-KAU3V65B.js";
4
- import "../chunk-J5KAMJ2N.js";
3
+ } from "../chunk-4KFHQBH2.js";
4
+ import "../chunk-5NUF7ZQA.js";
5
5
  export {
6
6
  ImpktLink
7
7
  };
@@ -2,8 +2,8 @@ import {
2
2
  ImpktDocumentLink,
3
3
  ImpktImage,
4
4
  ImpktLogo
5
- } from "../chunk-IHEEUM3M.js";
6
- import "../chunk-J5KAMJ2N.js";
5
+ } from "../chunk-DIZCGSJA.js";
6
+ import "../chunk-5NUF7ZQA.js";
7
7
  export {
8
8
  ImpktDocumentLink,
9
9
  ImpktImage,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ImpktPrice
3
- } from "../chunk-KC6RKWO6.js";
4
- import "../chunk-J5KAMJ2N.js";
3
+ } from "../chunk-TZD7IVVQ.js";
4
+ import "../chunk-5NUF7ZQA.js";
5
5
  export {
6
6
  ImpktPrice
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ImpktProgress
3
- } from "../chunk-BOLZMDAS.js";
4
- import "../chunk-J5KAMJ2N.js";
3
+ } from "../chunk-HWNY6U5F.js";
4
+ import "../chunk-5NUF7ZQA.js";
5
5
  export {
6
6
  ImpktProgress
7
7
  };
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  ImpktRadioGroup
3
- } from "../chunk-T63FI4ET.js";
4
- import "../chunk-6HZA6A3L.js";
5
- import "../chunk-J5KAMJ2N.js";
3
+ } from "../chunk-OBCSDZHP.js";
4
+ import "../chunk-ZXCSQ6MK.js";
5
+ import "../chunk-5NUF7ZQA.js";
6
6
  export {
7
7
  ImpktRadioGroup
8
8
  };
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  ImpktSelect
3
- } from "../chunk-XEN5NV55.js";
4
- import "../chunk-6HZA6A3L.js";
5
- import "../chunk-J5KAMJ2N.js";
3
+ } from "../chunk-MAMBT7BZ.js";
4
+ import "../chunk-ZXCSQ6MK.js";
5
+ import "../chunk-5NUF7ZQA.js";
6
6
  export {
7
7
  ImpktSelect
8
8
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ImpktSummaryList
3
- } from "../chunk-GU4UQKJP.js";
4
- import "../chunk-J5KAMJ2N.js";
3
+ } from "../chunk-6UDDZQDK.js";
4
+ import "../chunk-5NUF7ZQA.js";
5
5
  export {
6
6
  ImpktSummaryList
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ImpktTable
3
- } from "../chunk-TRLEYGGH.js";
4
- import "../chunk-J5KAMJ2N.js";
3
+ } from "../chunk-2RBYVWZT.js";
4
+ import "../chunk-5NUF7ZQA.js";
5
5
  export {
6
6
  ImpktTable
7
7
  };
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  ImpktTextInput
3
- } from "../chunk-NEWN44LO.js";
4
- import "../chunk-6HZA6A3L.js";
5
- import "../chunk-J5KAMJ2N.js";
3
+ } from "../chunk-A4CJ2F3J.js";
4
+ import "../chunk-ZXCSQ6MK.js";
5
+ import "../chunk-5NUF7ZQA.js";
6
6
  export {
7
7
  ImpktTextInput
8
8
  };
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  ImpktTextarea
3
- } from "../chunk-7T34CRBF.js";
4
- import "../chunk-6HZA6A3L.js";
5
- import "../chunk-J5KAMJ2N.js";
3
+ } from "../chunk-QYHWR6C5.js";
4
+ import "../chunk-ZXCSQ6MK.js";
5
+ import "../chunk-5NUF7ZQA.js";
6
6
  export {
7
7
  ImpktTextarea
8
8
  };
package/dist/index.js CHANGED
@@ -1,71 +1,71 @@
1
1
  import {
2
2
  ImpktSelect
3
- } from "./chunk-XEN5NV55.js";
3
+ } from "./chunk-MAMBT7BZ.js";
4
4
  import {
5
5
  ImpktSummaryList
6
- } from "./chunk-GU4UQKJP.js";
6
+ } from "./chunk-6UDDZQDK.js";
7
7
  import {
8
8
  ImpktTable
9
- } from "./chunk-TRLEYGGH.js";
9
+ } from "./chunk-2RBYVWZT.js";
10
10
  import {
11
11
  ImpktTextInput
12
- } from "./chunk-NEWN44LO.js";
12
+ } from "./chunk-A4CJ2F3J.js";
13
13
  import {
14
14
  ImpktTextarea
15
- } from "./chunk-7T34CRBF.js";
15
+ } from "./chunk-QYHWR6C5.js";
16
16
  import {
17
17
  ImpktGrid
18
- } from "./chunk-4YAA7EML.js";
18
+ } from "./chunk-4Y3HJBJY.js";
19
19
  import {
20
20
  ImpktHelp
21
- } from "./chunk-AC6G7X3G.js";
21
+ } from "./chunk-IBTOZOGI.js";
22
22
  import {
23
23
  ImpktCard,
24
24
  ImpktHeading,
25
25
  ImpktStack,
26
26
  ImpktText
27
- } from "./chunk-BUWE6XGX.js";
27
+ } from "./chunk-GGODB3GY.js";
28
28
  import {
29
29
  ImpktLink
30
- } from "./chunk-KAU3V65B.js";
30
+ } from "./chunk-4KFHQBH2.js";
31
31
  import {
32
32
  ImpktDocumentLink,
33
33
  ImpktImage,
34
34
  ImpktLogo
35
- } from "./chunk-IHEEUM3M.js";
35
+ } from "./chunk-DIZCGSJA.js";
36
36
  import {
37
37
  ImpktPrice
38
- } from "./chunk-KC6RKWO6.js";
38
+ } from "./chunk-TZD7IVVQ.js";
39
39
  import {
40
40
  ImpktProgress
41
- } from "./chunk-BOLZMDAS.js";
41
+ } from "./chunk-HWNY6U5F.js";
42
42
  import {
43
43
  ImpktRadioGroup
44
- } from "./chunk-T63FI4ET.js";
44
+ } from "./chunk-OBCSDZHP.js";
45
45
  import {
46
46
  ImpktAccordion
47
- } from "./chunk-T4HSPWA7.js";
47
+ } from "./chunk-6MLXFFH4.js";
48
48
  import {
49
49
  ImpktAlert
50
- } from "./chunk-SSNCGJ5W.js";
50
+ } from "./chunk-3OSL2HMN.js";
51
51
  import {
52
52
  ImpktButton
53
- } from "./chunk-BBWMRF5N.js";
53
+ } from "./chunk-TIKX5POO.js";
54
54
  import {
55
55
  ImpktCheckboxGroup
56
- } from "./chunk-Z4KZG2E3.js";
56
+ } from "./chunk-PDXOPY22.js";
57
57
  import {
58
58
  ImpktCheckbox
59
- } from "./chunk-HJ2V635J.js";
59
+ } from "./chunk-LFOWTFMR.js";
60
60
  import {
61
61
  ImpktDateInput
62
- } from "./chunk-GEBLDC2J.js";
62
+ } from "./chunk-CGMDIZPO.js";
63
63
  import {
64
64
  FieldElement
65
- } from "./chunk-6HZA6A3L.js";
65
+ } from "./chunk-ZXCSQ6MK.js";
66
66
  import {
67
67
  ImpktDialog
68
- } from "./chunk-TOTVL3YH.js";
68
+ } from "./chunk-S3EQO33M.js";
69
69
  import {
70
70
  ImpktElement,
71
71
  fontSize,
@@ -74,7 +74,7 @@ import {
74
74
  space,
75
75
  t,
76
76
  token
77
- } from "./chunk-J5KAMJ2N.js";
77
+ } from "./chunk-5NUF7ZQA.js";
78
78
  export {
79
79
  FieldElement,
80
80
  ImpktAccordion,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atomic-ui/ui",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "The Impkt component library: standard custom elements, styled only from design tokens, built to WCAG 2.2 AA.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "lit": "^3.3.3",
20
- "@atomic-ui/design-tokens": "0.1.1"
20
+ "@atomic-ui/design-tokens": "0.1.3"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@types/node": "^20.14.0",
@@ -1,43 +0,0 @@
1
- import {
2
- ImpktElement,
3
- space
4
- } from "./chunk-J5KAMJ2N.js";
5
-
6
- // packages/ui/src/components/grid.ts
7
- import { css, html } from "lit";
8
- var ImpktGrid = class extends ImpktElement {
9
- static {
10
- this.properties = { columns: { type: String, reflect: true }, gap: { type: String, reflect: true } };
11
- }
12
- constructor() {
13
- super();
14
- this.columns = "two";
15
- this.gap = "md";
16
- }
17
- static {
18
- this.styles = [...ImpktElement.styles, css`
19
- :host { display: block; min-inline-size: 0; container-type: inline-size; }
20
- .columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(4)}; }
21
- :host([gap='sm']) .columns { gap: ${space(2)}; }
22
- :host([gap='lg']) .columns { gap: ${space(6)}; }
23
- :host([columns='one']) .columns { grid-template-columns: minmax(0, 1fr); }
24
- :host([columns='three']) .columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
25
- :host([columns='four']) .columns { grid-template-columns: repeat(4, minmax(0, 1fr)); }
26
- :host([columns='sidebar-left']) .columns { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
27
- :host([columns='sidebar-right']) .columns { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
28
- .column { min-inline-size: 0; overflow-wrap: anywhere; }
29
- ::slotted(*) { max-inline-size: 100%; }
30
- @container (max-width: 40rem) { .columns { grid-template-columns: minmax(0, 1fr) !important; } }
31
- `];
32
- }
33
- render() {
34
- const count = this.columns === "one" ? 1 : this.columns === "three" ? 3 : this.columns === "four" ? 4 : 2;
35
- return html`<div class="columns" part="row">${Array.from({ length: count }, (_, i) => html`<div class="column" part="column"><slot name=${`column-${i + 1}`}></slot></div>`)}</div>`;
36
- }
37
- };
38
- customElements.define("impkt-grid", ImpktGrid);
39
-
40
- export {
41
- ImpktGrid
42
- };
43
- //# sourceMappingURL=chunk-4YAA7EML.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/grid.ts"],"sourcesContent":["import { css, html } from 'lit';\nimport { ImpktElement } from '../base/ImpktElement';\nimport { space } from '../base/tokens';\n\n/**\n * A responsive row with named column slots. Child order stays inside each\n * column; changing a page's visual grid never reorders its reading sequence.\n *\n * @category layout\n * @icon columns\n * @slot column-1 - First column.\n * @slot column-2 - Second column.\n * @slot column-3 - Third column.\n * @slot column-4 - Fourth column.\n */\nexport class ImpktGrid extends ImpktElement {\n static properties = { columns: { type: String, reflect: true }, gap: { type: String, reflect: true } };\n declare columns: 'one' | 'two' | 'three' | 'four' | 'sidebar-left' | 'sidebar-right';\n declare gap: 'sm' | 'md' | 'lg';\n constructor() { super(); this.columns = 'two'; this.gap = 'md'; }\n static styles = [...ImpktElement.styles, css`\n :host { display: block; min-inline-size: 0; container-type: inline-size; }\n .columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(4)}; }\n :host([gap='sm']) .columns { gap: ${space(2)}; }\n :host([gap='lg']) .columns { gap: ${space(6)}; }\n :host([columns='one']) .columns { grid-template-columns: minmax(0, 1fr); }\n :host([columns='three']) .columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }\n :host([columns='four']) .columns { grid-template-columns: repeat(4, minmax(0, 1fr)); }\n :host([columns='sidebar-left']) .columns { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }\n :host([columns='sidebar-right']) .columns { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }\n .column { min-inline-size: 0; overflow-wrap: anywhere; }\n ::slotted(*) { max-inline-size: 100%; }\n @container (max-width: 40rem) { .columns { grid-template-columns: minmax(0, 1fr) !important; } }\n `];\n render() {\n const count = this.columns === 'one' ? 1 : this.columns === 'three' ? 3 : this.columns === 'four' ? 4 : 2;\n return html`<div class=\"columns\" part=\"row\">${Array.from({ length: count }, (_, i) => html`<div class=\"column\" part=\"column\"><slot name=${`column-${i+1}`}></slot></div>`)}</div>`;\n }\n}\ncustomElements.define('impkt-grid', ImpktGrid);\ndeclare global { interface HTMLElementTagNameMap { 'impkt-grid': ImpktGrid } }\n"],"mappings":";;;;;;AAAA,SAAS,KAAK,YAAY;AAenB,IAAM,YAAN,cAAwB,aAAa;AAAA,EAC1C;AAAA,SAAO,aAAa,EAAE,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK,GAAG,KAAK,EAAE,MAAM,QAAQ,SAAS,KAAK,EAAE;AAAA;AAAA,EAGrG,cAAc;AAAE,UAAM;AAAG,SAAK,UAAU;AAAO,SAAK,MAAM;AAAA,EAAM;AAAA,EAChE;AAAA,SAAO,SAAS,CAAC,GAAG,aAAa,QAAQ;AAAA;AAAA,uFAE4C,MAAM,CAAC,CAAC;AAAA,wCACvD,MAAM,CAAC,CAAC;AAAA,wCACR,MAAM,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAS7C;AAAA;AAAA,EACD,SAAS;AACP,UAAM,QAAQ,KAAK,YAAY,QAAQ,IAAI,KAAK,YAAY,UAAU,IAAI,KAAK,YAAY,SAAS,IAAI;AACxG,WAAO,uCAAuC,MAAM,KAAK,EAAE,QAAQ,MAAM,GAAG,CAAC,GAAG,MAAM,oDAAoD,UAAU,IAAE,CAAC,EAAE,gBAAgB,CAAC;AAAA,EAC5K;AACF;AACA,eAAe,OAAO,cAAc,SAAS;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/button.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { ImpktElement } from '../base/ImpktElement';\nimport { focusRing, targetSize, visuallyHidden } from '../base/styles';\nimport { fontSize, fontWeight, space, t } from '../base/tokens';\n\n/**\n * A button.\n *\n * Two decisions carry the accessibility weight here.\n *\n * **A busy button is not a disabled button.** While an action is in flight the\n * control keeps its place in the tab order and reports `aria-disabled`, rather\n * than taking the native `disabled` attribute. A natively disabled element is\n * removed from the tab order, so a keyboard user who had just activated it\n * loses their focus position to the top of the document — at precisely the\n * moment something is happening that they need to be told about. Activation is\n * blocked in the handler instead.\n *\n * **It renders a real `<button>`.** A `<div role=\"button\">` needs Enter and\n * Space handling, a tabindex, and a disabled story, and it will still not\n * submit a form. The native element already has all of that, correctly, in\n * every browser and every assistive technology.\n\n *\n * @category action\n * @icon button\n * @slot - The button label.\n */\nexport class ImpktButton extends ImpktElement {\n static formAssociated = true;\n\n static properties = {\n variant: { type: String, reflect: true },\n type: { type: String },\n disabled: { type: Boolean, reflect: true },\n busy: { type: Boolean, reflect: true },\n busyLabel: { type: String, attribute: 'busy-label' },\n full: { type: Boolean, reflect: true },\n };\n\n declare variant: 'primary' | 'secondary' | 'ghost';\n declare type: 'button' | 'submit' | 'reset';\n declare disabled: boolean;\n declare busy: boolean;\n /** Announced when the button becomes busy. Says what is happening, not that something is. */\n declare busyLabel: string;\n declare full: boolean;\n\n private internals: ElementInternals | null = null;\n\n constructor() {\n super();\n this.variant = 'primary';\n this.type = 'button';\n this.disabled = false;\n this.busy = false;\n this.busyLabel = 'Working';\n this.full = false;\n try {\n this.internals = this.attachInternals();\n } catch {\n this.internals = null;\n }\n }\n\n static styles = [\n ...ImpktElement.styles,\n focusRing,\n css`\n :host {\n display: inline-block;\n }\n :host([full]) {\n display: block;\n }\n button {\n ${targetSize}\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: ${space(2)};\n inline-size: 100%;\n padding: ${space(3)} ${space(5)};\n font-family: inherit;\n font-size: ${fontSize('md')};\n font-weight: ${fontWeight('semibold')};\n line-height: 1.2;\n border-radius: ${t.radius};\n border: ${t.borderThick} solid transparent;\n cursor: pointer;\n transition: background-color 120ms ease-in-out, border-color 120ms ease-in-out;\n }\n /* The cursor is the only thing that changes while busy. Moving or\n recolouring a control the moment it is pressed is how a user loses it. */\n button[aria-disabled='true'] {\n cursor: progress;\n }\n :host([disabled]) button {\n cursor: not-allowed;\n opacity: 0.55;\n }\n\n button.primary {\n background: ${t.brand};\n color: ${t.onBrand};\n }\n button.primary:hover:not([aria-disabled='true']) {\n background: ${t.brandHover};\n }\n button.primary:active:not([aria-disabled='true']) {\n background: ${t.brandActive};\n }\n\n button.secondary {\n background: transparent;\n color: ${t.link};\n border-color: currentColor;\n }\n button.secondary:hover:not([aria-disabled='true']) {\n background: ${t.brandSubtle};\n }\n\n button.ghost {\n background: transparent;\n color: ${t.link};\n border-color: transparent;\n text-decoration: underline;\n }\n button.ghost:hover:not([aria-disabled='true']) {\n background: ${t.brandSubtle};\n }\n\n .sr-only {\n ${visuallyHidden}\n }\n\n /* Windows High Contrast Mode drops background and border colours, so a\n button styled only by background becomes invisible. A forced-colors\n border puts the boundary back. */\n @media (forced-colors: active) {\n button {\n border-color: ButtonBorder;\n }\n }\n `,\n ];\n\n private onClick(event: MouseEvent): void {\n if (this.disabled || this.busy) {\n event.preventDefault();\n event.stopImmediatePropagation();\n return;\n }\n // A shadow-rooted button does not submit the outer form by itself, because\n // the click never reaches it. `requestSubmit` rather than `submit` so that\n // native validation and the submit event both still run.\n if (this.type === 'submit') this.internals?.form?.requestSubmit();\n if (this.type === 'reset') this.internals?.form?.reset();\n }\n\n render(): TemplateResult {\n return html`\n <button\n class=${this.variant}\n type=\"button\"\n part=\"button\"\n ?disabled=${this.disabled}\n aria-disabled=${this.busy ? 'true' : nothing}\n aria-busy=${this.busy ? 'true' : nothing}\n @click=${this.onClick}\n >\n <slot></slot>\n ${this.busy ? html`<span class=\"sr-only\">${this.busyLabel}</span>` : nothing}\n </button>\n `;\n }\n}\n\ncustomElements.define('impkt-button', ImpktButton);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impkt-button': ImpktButton;\n }\n}\n"],"mappings":";;;;;;;;;;;;AAAA,SAAS,MAAM,KAAK,eAAoC;AA4BjD,IAAM,cAAN,cAA0B,aAAa;AAAA,EAsB5C,cAAc;AACZ,UAAM;AAHR,SAAQ,YAAqC;AAI3C,SAAK,UAAU;AACf,SAAK,OAAO;AACZ,SAAK,WAAW;AAChB,SAAK,OAAO;AACZ,SAAK,YAAY;AACjB,SAAK,OAAO;AACZ,QAAI;AACF,WAAK,YAAY,KAAK,gBAAgB;AAAA,IACxC,QAAQ;AACN,WAAK,YAAY;AAAA,IACnB;AAAA,EACF;AAAA,EAlCA;AAAA,SAAO,iBAAiB;AAAA;AAAA,EAExB;AAAA,SAAO,aAAa;AAAA,MAClB,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MACvC,MAAM,EAAE,MAAM,OAAO;AAAA,MACrB,UAAU,EAAE,MAAM,SAAS,SAAS,KAAK;AAAA,MACzC,MAAM,EAAE,MAAM,SAAS,SAAS,KAAK;AAAA,MACrC,WAAW,EAAE,MAAM,QAAQ,WAAW,aAAa;AAAA,MACnD,MAAM,EAAE,MAAM,SAAS,SAAS,KAAK;AAAA,IACvC;AAAA;AAAA,EA2BA;AAAA,SAAO,SAAS;AAAA,MACd,GAAG,aAAa;AAAA,MAChB;AAAA,MACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UAQM,UAAU;AAAA;AAAA;AAAA;AAAA,eAIL,MAAM,CAAC,CAAC;AAAA;AAAA,mBAEJ,MAAM,CAAC,CAAC,IAAI,MAAM,CAA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AW;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/layout.ts"],"sourcesContent":["import { html, css, type TemplateResult } from 'lit';\nimport { ImpktElement } from '../base/ImpktElement';\nimport { fontSize, fontWeight, lineHeight, space, t } from '../base/tokens';\n\n/**\n * Layout and typography primitives.\n *\n * These are the components a composition is mostly made of, and they are\n * deliberately dull. Their one job is that spacing, type and colour come from\n * tokens, so that a page built in the CMS cannot contain a hard-coded 13px.\n */\n\n/** Vertical rhythm. Every gap is a spacing token, never a number.\n *\n * @category layout\n * @icon stack\n * @slot - The things being stacked.\n */\nexport class ImpktStack extends ImpktElement {\n static properties = { gap: { type: String, reflect: true } };\n declare gap: 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n constructor() {\n super();\n this.gap = 'md';\n }\n\n static styles = [\n ...ImpktElement.styles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n }\n :host([gap='xs']) { gap: ${space(1)}; }\n :host([gap='sm']) { gap: ${space(2)}; }\n :host([gap='md']) { gap: ${space(4)}; }\n :host([gap='lg']) { gap: ${space(6)}; }\n :host([gap='xl']) { gap: ${space(8)}; }\n `,\n ];\n\n render(): TemplateResult {\n return html`<slot></slot>`;\n }\n}\n\n/** A surface. What text is read against, and what contrast is measured from.\n *\n * @category layout\n * @icon card\n * @slot - What sits on the card.\n */\nexport class ImpktCard extends ImpktElement {\n static styles = [\n ...ImpktElement.styles,\n css`\n :host {\n display: block;\n background: ${t.surfaceCard};\n border: ${t.borderThin} solid ${t.border};\n border-radius: ${t.radiusLg};\n padding: ${space(6)};\n }\n `,\n ];\n\n render(): TemplateResult {\n return html`<slot></slot>`;\n }\n}\n\n/**\n * A heading.\n *\n * `level` is required and renders the matching `<h1>`–`<h6>`, because heading\n * level is document structure rather than appearance: a screen-reader user\n * navigates by it, and a page whose levels skip is a page they cannot skim.\n * Size is a separate property, so a visually small `<h2>` needs no lie about\n * its level — which is the usual reason levels end up wrong.\n\n *\n * @category typography\n * @icon heading\n * @role heading\n * @slot - The heading text.\n */\nexport class ImpktHeading extends ImpktElement {\n static properties = {\n level: { type: Number, reflect: true },\n size: { type: String, reflect: true },\n };\n\n declare level: 1 | 2 | 3 | 4 | 5 | 6;\n declare size: '3xl' | '2xl' | 'xl' | 'lg' | 'md';\n\n constructor() {\n super();\n this.level = 2;\n this.size = 'xl';\n }\n\n static styles = [\n ...ImpktElement.styles,\n css`\n :host {\n display: block;\n color: ${t.textHeading};\n font-family: ${t.fontHeading};\n font-weight: ${fontWeight('bold')};\n line-height: ${lineHeight('tight')};\n }\n :host([size='3xl']) { font-size: ${fontSize('3xl')}; }\n :host([size='2xl']) { font-size: ${fontSize('2xl')}; }\n :host([size='xl']) { font-size: ${fontSize('xl')}; }\n :host([size='lg']) { font-size: ${fontSize('lg')}; }\n :host([size='md']) { font-size: ${fontSize('md')}; }\n .h {\n margin: 0;\n font: inherit;\n color: inherit;\n }\n `,\n ];\n\n render(): TemplateResult {\n // A `role=\"heading\"` with `aria-level` rather than six branches of\n // template. The native element would be marginally better; this is the one\n // place where Lit's lack of a dynamic tag makes the explicit role the\n // honest trade, and the role is fully supported.\n return html`<div class=\"h\" role=\"heading\" aria-level=${this.level} part=\"heading\">\n <slot></slot>\n </div>`;\n }\n}\n\n/** A paragraph.\n *\n * @category typography\n * @icon text\n * @slot - The paragraph text.\n */\nexport class ImpktText extends ImpktElement {\n static properties = {\n size: { type: String, reflect: true },\n tone: { type: String, reflect: true },\n };\n\n declare size: 'sm' | 'md' | 'lg';\n declare tone: 'default' | 'muted';\n\n constructor() {\n super();\n this.size = 'md';\n this.tone = 'default';\n }\n\n static styles = [\n ...ImpktElement.styles,\n css`\n :host {\n display: block;\n /* 1.4.8 asks for 1.5 within a paragraph, and it is the default here\n rather than an option, because body text is what it is about. */\n line-height: ${lineHeight('normal')};\n /* 1.4.12 Text Spacing: a user stylesheet must be able to widen this\n without clipping, which a max-width in ch units survives and a\n fixed pixel height does not. */\n max-inline-size: 70ch;\n }\n :host([size='sm']) { font-size: ${fontSize('sm')}; }\n :host([size='md']) { font-size: ${fontSize('md')}; }\n :host([size='lg']) { font-size: ${fontSize('lg')}; }\n :host([tone='muted']) { color: ${t.textMuted}; }\n p {\n margin: 0;\n }\n `,\n ];\n\n render(): TemplateResult {\n return html`<p part=\"text\"><slot></slot></p>`;\n }\n}\n\ncustomElements.define('impkt-stack', ImpktStack);\ncustomElements.define('impkt-card', ImpktCard);\ncustomElements.define('impkt-heading', ImpktHeading);\ncustomElements.define('impkt-text', ImpktText);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impkt-stack': ImpktStack;\n 'impkt-card': ImpktCard;\n 'impkt-heading': ImpktHeading;\n 'impkt-text': ImpktText;\n }\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAS,MAAM,WAAgC;AAkBxC,IAAM,aAAN,cAAyB,aAAa;AAAA,EAC3C;AAAA,SAAO,aAAa,EAAE,KAAK,EAAE,MAAM,QAAQ,SAAS,KAAK,EAAE;AAAA;AAAA,EAG3D,cAAc;AACZ,UAAM;AACN,SAAK,MAAM;AAAA,EACb;AAAA,EAEA;AAAA,SAAO,SAAS;AAAA,MACd,GAAG,aAAa;AAAA,MAChB;AAAA;AAAA;AAAA;AAAA;AAAA,iCAK6B,MAAM,CAAC,CAAC;AAAA,iCACR,MAAM,CAAC,CAAC;AAAA,iCACR,MAAM,CAAC,CAAC;AAAA,iCACR,MAAM,CAAC,CAAC;AAAA,iCACR,MAAM,CAAC,CAAC;AAAA;AAAA,IAEvC;AAAA;AAAA,EAEA,SAAyB;AACvB,WAAO;AAAA,EACT;AACF;AAQO,IAAM,YAAN,cAAwB,aAAa;AAAA,EAC1C;AAAA,SAAO,SAAS;AAAA,MACd,GAAG,aAAa;AAAA,MAChB;AAAA;AAAA;AAAA,sBAGkB,EAAE,WAAW;AAAA,kBACjB,EAAE,UAAU,UAAU,EAAE,MAAM;AAAA,yBACvB,EAAE,QAAQ;AAAA,mBAChB,MAAM,CAAC,CAAC;AAAA;AAAA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,IAAI,CAAC;AAAA,wCACd,SAAS,IAAI,CAAC;AAAA,wCACd,SAAS,IAAI,CAAC;AAAA,uCACf,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA,IAKhD;AAAA;AAAA,EAEA,SAAyB;AACvB,WAAO;AAAA,EACT;AACF;AAEA,eAAe,OAAO,eAAe,UAAU;AAC/C,eAAe,OAAO,cAAc,SAAS;AAC7C,eAAe,OAAO,iBAAiB,YAAY;AACnD,eAAe,OAAO,cAAc,SAAS;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/base/tokens.ts","../src/base/styles.ts","../src/base/ImpktElement.ts"],"sourcesContent":["/**\n * Token helpers.\n *\n * Components never name a colour, a size or a radius. They name a token, and a\n * brand decides what it holds — which is what makes a rebrand a content\n * publish rather than a rebuild\n * ([ADR 0005](../../../../docs/decisions/0005-design-tokens.md)).\n *\n * Every reference carries a fallback so that a component dropped onto a page\n * with no token stylesheet still renders something legible. An unstyled\n * component is indistinguishable from a broken one, and the fallback is what\n * keeps a missing stylesheet a visible annoyance rather than a blank screen.\n *\n * These return `CSSResult` rather than strings. Lit's `css` tag refuses plain\n * interpolated strings, which is a deliberate guard against injecting\n * attacker-controlled text into a stylesheet; `unsafeCSS` is the documented\n * way past it and is safe here because every value is a literal in this file,\n * never anything authored or fetched.\n */\nimport { unsafeCSS, type CSSResult } from 'lit';\n\n/** `color.brand.default` → `var(--impkt-color-brand-default, <fallback>)`. */\nexport const token = (path: string, fallback: string): CSSResult =>\n unsafeCSS(`var(--impkt-${path.replace(/\\./g, '-')}, ${fallback})`);\n\nexport const t = {\n brand: token('color.brand.default', '#1f4ed8'),\n brandHover: token('color.brand.hover', '#1b45be'),\n brandActive: token('color.brand.active', '#183ba4'),\n brandSubtle: token('color.brand.subtle', '#e4eafa'),\n onBrand: token('color.text.on-brand', '#ffffff'),\n\n surfaceCard: token('color.surface.card', '#ffffff'),\n surfaceInset: token('color.surface.inset', '#f4f4f4'),\n surfaceSubtle: token('color.surface.subtle', '#e4eafa'),\n\n text: token('color.text.default', '#1a1a1a'),\n textMuted: token('color.text.muted', '#717171'),\n textPlaceholder: token('color.text.placeholder', '#767676'),\n textHeading: token('color.text.heading', '#1f4ed8'),\n link: token('color.text.link', '#1f4ed8'),\n linkHover: token('color.text.link-hover', '#193ead'),\n\n border: token('color.border.default', '#929292'),\n borderStrong: token('color.border.strong', '#818181'),\n\n danger: token('color.status.danger.default', '#c8102e'),\n dangerText: token('color.status.danger.text', '#c8102e'),\n dangerSubtle: token('color.status.danger.subtle', '#f8e2e6'),\n warning: token('color.status.warning.default', '#b45309'),\n warningText: token('color.status.warning.text', '#b45309'),\n warningSubtle: token('color.status.warning.subtle', '#f6eae1'),\n success: token('color.status.success.default', '#047857'),\n successText: token('color.status.success.text', '#047857'),\n successSubtle: token('color.status.success.subtle', '#e0f0ea'),\n info: token('color.status.info.default', '#1f4ed8'),\n infoText: token('color.status.info.text', '#1f4ed8'),\n infoSubtle: token('color.status.info.subtle', '#e4eafa'),\n\n fontBody: token('font.family.body', 'system-ui, sans-serif'),\n fontHeading: token('font.family.heading', 'system-ui, sans-serif'),\n\n focusShadow: token('focus.ring.shadow', '0 0 0 2px #ffffff, 0 0 0 4px #1a1a1a'),\n focusOffset: token('focus.ring.offset', '2px'),\n\n targetMin: token('target.min', '24px'),\n\n radiusSm: token('radius.sm', '2px'),\n radius: token('radius.md', '4px'),\n radiusLg: token('radius.lg', '8px'),\n\n borderThin: token('border.width.thin', '1px'),\n borderThick: token('border.width.thick', '2px'),\n} as const;\n\n/** `space.3` → the custom property. Spacing is always a token, never a number. */\nexport const space = (step: number): CSSResult => token(`space.${step}`, `${step * 4}px`);\n/** `font.size.lg` → the custom property. */\nexport const fontSize = (name: string): CSSResult => token(`font.size.${name}`, '1rem');\nexport const lineHeight = (name: string): CSSResult => token(`font.line-height.${name}`, '1.5');\nexport const fontWeight = (name: string): CSSResult => token(`font.weight.${name}`, '400');\n","/**\n * Shared style fragments.\n *\n * Three of these carry an accessibility guarantee and are therefore not\n * negotiable per component: the focus ring, the minimum target size and the\n * reduced-motion rule. A component that wants its own focus treatment is a\n * component that will get it subtly wrong on one brand, so there is one.\n */\nimport { css } from 'lit';\nimport { t } from './tokens';\n\n/**\n * The focus ring.\n *\n * `:focus-visible` rather than `:focus`, so a mouse click on a button does not\n * draw a ring the user did not ask for while keyboard focus still does.\n *\n * The ring is two-tone — a light inner band inside a dark outer one — drawn\n * with `box-shadow` and a transparent `outline` behind it. The outline is not\n * decoration: it is what survives Windows High Contrast Mode, where box-shadow\n * is dropped entirely and a shadow-only ring disappears for exactly the users\n * who most need it.\n *\n * The colours come from locked tokens a brand cannot reach\n * ([ADR 0010](../../../../docs/decisions/0010-what-a-brand-may-set.md)).\n */\nexport const focusRing = css`\n :host(:focus-visible),\n :host(:not([disabled])) :focus-visible {\n outline: 2px solid transparent;\n outline-offset: ${t.focusOffset};\n box-shadow: ${t.focusShadow};\n }\n`;\n\n/**\n * WCAG 2.2, 2.5.8 Target Size (Minimum): 24 by 24 CSS pixels.\n *\n * Applied as a minimum rather than a fixed size so a control grows with its\n * content and never shrinks below the floor. It reads the locked token, which\n * is deliberately outside the spacing scale — otherwise a brand tightening its\n * spacing unit would shrink every tap target with it.\n */\nexport const targetSize = css`\n min-block-size: ${t.targetMin};\n min-inline-size: ${t.targetMin};\n`;\n\n/**\n * Visible to a screen reader, invisible on screen.\n *\n * `clip-path` with a 1px box rather than `display: none` or `visibility:\n * hidden`, both of which remove the text from the accessibility tree — which\n * is the one thing this must not do.\n */\nexport const visuallyHidden = css`\n position: absolute;\n inline-size: 1px;\n block-size: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n`;\n\n/**\n * 2.3.3 Animation from Interactions, and plain decency.\n *\n * `0.01ms` rather than `0` because a zero-duration transition does not fire a\n * `transitionend` event in every engine, and components that wait for one hang.\n */\nexport const reducedMotion = css`\n @media (prefers-reduced-motion: reduce) {\n :host,\n :host *,\n :host *::before,\n :host *::after {\n animation-duration: 0.01ms !important;\n animation-iteration-count: 1 !important;\n transition-duration: 0.01ms !important;\n scroll-behavior: auto !important;\n }\n }\n`;\n\n/** The base every component starts from. */\nexport const base = css`\n :host {\n box-sizing: border-box;\n font-family: ${t.fontBody};\n color: ${t.text};\n }\n :host([hidden]) {\n display: none !important;\n }\n *,\n *::before,\n *::after {\n box-sizing: inherit;\n }\n`;\n","import { LitElement, css } from 'lit';\nimport { base, reducedMotion } from './styles';\n\nlet counter = 0;\n\n/**\n * The base every Impkt component extends.\n *\n * It carries the two style fragments that are not a per-component choice — the\n * reset and the reduced-motion rule — and a stable id generator for the ARIA\n * wiring. It deliberately carries nothing else: a base class that grows\n * behaviour becomes the place every component's exceptions are negotiated.\n */\nexport class ImpktElement extends LitElement {\n static styles = [base, reducedMotion, css``];\n\n /**\n * A unique id for this instance, for `aria-describedby` and friends.\n *\n * Generated once in the constructor rather than in `render`, because an id\n * that changes between renders breaks the relationship it exists to express\n * — and it breaks it silently, since the markup still looks correct.\n */\n protected readonly uid = `impkt-${(counter += 1)}`;\n\n protected id_(part: string): string {\n return `${this.uid}-${part}`;\n }\n}\n"],"mappings":";AAmBA,SAAS,iBAAiC;AAGnC,IAAM,QAAQ,CAAC,MAAc,aAClC,UAAU,eAAe,KAAK,QAAQ,OAAO,GAAG,CAAC,KAAK,QAAQ,GAAG;AAE5D,IAAM,IAAI;AAAA,EACf,OAAO,MAAM,uBAAuB,SAAS;AAAA,EAC7C,YAAY,MAAM,qBAAqB,SAAS;AAAA,EAChD,aAAa,MAAM,sBAAsB,SAAS;AAAA,EAClD,aAAa,MAAM,sBAAsB,SAAS;AAAA,EAClD,SAAS,MAAM,uBAAuB,SAAS;AAAA,EAE/C,aAAa,MAAM,sBAAsB,SAAS;AAAA,EAClD,cAAc,MAAM,uBAAuB,SAAS;AAAA,EACpD,eAAe,MAAM,wBAAwB,SAAS;AAAA,EAEtD,MAAM,MAAM,sBAAs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