@atomic-ui/ui 0.10.1 → 0.12.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 (208) hide show
  1. package/custom-elements.json +9839 -6255
  2. package/dist/base/FieldElement.d.ts +10 -3
  3. package/dist/{chunk-YWP2Z3JN.js → chunk-2TNF7O43.js} +7 -5
  4. package/dist/{chunk-YWP2Z3JN.js.map → chunk-2TNF7O43.js.map} +1 -1
  5. package/dist/{chunk-FKUBEVCU.js → chunk-2WHOBIOY.js} +11 -9
  6. package/dist/{chunk-FKUBEVCU.js.map → chunk-2WHOBIOY.js.map} +1 -1
  7. package/dist/{chunk-26BO3W56.js → chunk-3BWCD5U5.js} +5 -3
  8. package/dist/{chunk-26BO3W56.js.map → chunk-3BWCD5U5.js.map} +1 -1
  9. package/dist/chunk-3GPGDERO.js +201 -0
  10. package/dist/chunk-3GPGDERO.js.map +1 -0
  11. package/dist/{chunk-3T7J66Z2.js → chunk-3KAFK24X.js} +13 -11
  12. package/dist/chunk-3KAFK24X.js.map +1 -0
  13. package/dist/{chunk-5OJAJA3U.js → chunk-5HCWL2YD.js} +6 -4
  14. package/dist/{chunk-5OJAJA3U.js.map → chunk-5HCWL2YD.js.map} +1 -1
  15. package/dist/{chunk-AG4EP3OY.js → chunk-5IGBH4GL.js} +8 -6
  16. package/dist/{chunk-AG4EP3OY.js.map → chunk-5IGBH4GL.js.map} +1 -1
  17. package/dist/{chunk-AL4IUSML.js → chunk-5OYQZWP2.js} +5 -3
  18. package/dist/{chunk-AL4IUSML.js.map → chunk-5OYQZWP2.js.map} +1 -1
  19. package/dist/chunk-5PRB7P7N.js +167 -0
  20. package/dist/chunk-5PRB7P7N.js.map +1 -0
  21. package/dist/chunk-6CDQSHVW.js +21 -0
  22. package/dist/chunk-6CDQSHVW.js.map +1 -0
  23. package/dist/{chunk-MLKNZL5J.js → chunk-6J22I7F6.js} +14 -12
  24. package/dist/chunk-6J22I7F6.js.map +1 -0
  25. package/dist/chunk-72WNCCDC.js +136 -0
  26. package/dist/chunk-72WNCCDC.js.map +1 -0
  27. package/dist/chunk-7UI3OBXL.js +104 -0
  28. package/dist/chunk-7UI3OBXL.js.map +1 -0
  29. package/dist/{chunk-D6NET2VB.js → chunk-ALFE35FS.js} +30 -3
  30. package/dist/chunk-ALFE35FS.js.map +1 -0
  31. package/dist/chunk-AYINRYNC.js +184 -0
  32. package/dist/chunk-AYINRYNC.js.map +1 -0
  33. package/dist/{chunk-2D2IMQII.js → chunk-BAITBJUC.js} +51 -29
  34. package/dist/chunk-BAITBJUC.js.map +1 -0
  35. package/dist/{chunk-2EP3IV3G.js → chunk-BGHAANTP.js} +22 -8
  36. package/dist/chunk-BGHAANTP.js.map +1 -0
  37. package/dist/{chunk-OJO62KRX.js → chunk-CFCFKLTN.js} +85 -10
  38. package/dist/chunk-CFCFKLTN.js.map +1 -0
  39. package/dist/{chunk-UFPI4I2Y.js → chunk-CQT3VPYK.js} +8 -29
  40. package/dist/chunk-CQT3VPYK.js.map +1 -0
  41. package/dist/{chunk-AURT72IC.js → chunk-DXLEYNID.js} +13 -7
  42. package/dist/chunk-DXLEYNID.js.map +1 -0
  43. package/dist/{chunk-L4CIBOGK.js → chunk-EKPTMRBG.js} +5 -3
  44. package/dist/{chunk-L4CIBOGK.js.map → chunk-EKPTMRBG.js.map} +1 -1
  45. package/dist/{chunk-7UWJXPR3.js → chunk-F3NHPQU5.js} +17 -36
  46. package/dist/chunk-F3NHPQU5.js.map +1 -0
  47. package/dist/{chunk-Z2EWQMTR.js → chunk-F4IXELLK.js} +5 -3
  48. package/dist/{chunk-Z2EWQMTR.js.map → chunk-F4IXELLK.js.map} +1 -1
  49. package/dist/{chunk-APQEXM4I.js → chunk-FJHPGOGS.js} +5 -3
  50. package/dist/{chunk-APQEXM4I.js.map → chunk-FJHPGOGS.js.map} +1 -1
  51. package/dist/chunk-FLAUZU7Y.js +345 -0
  52. package/dist/chunk-FLAUZU7Y.js.map +1 -0
  53. package/dist/{chunk-3NEWOO2P.js → chunk-FZWUQC42.js} +7 -5
  54. package/dist/{chunk-3NEWOO2P.js.map → chunk-FZWUQC42.js.map} +1 -1
  55. package/dist/{chunk-ONED3PUB.js → chunk-HSXLSJVG.js} +54 -8
  56. package/dist/chunk-HSXLSJVG.js.map +1 -0
  57. package/dist/{chunk-V7EB7Q2M.js → chunk-JTCTQBAX.js} +2 -131
  58. package/dist/chunk-JTCTQBAX.js.map +1 -0
  59. package/dist/{chunk-ZL3JFUIE.js → chunk-K5QFVLCI.js} +7 -5
  60. package/dist/{chunk-ZL3JFUIE.js.map → chunk-K5QFVLCI.js.map} +1 -1
  61. package/dist/{chunk-DN5YZFSG.js → chunk-KE6WCXQP.js} +55 -9
  62. package/dist/chunk-KE6WCXQP.js.map +1 -0
  63. package/dist/chunk-LBHTXY7K.js +75 -0
  64. package/dist/chunk-LBHTXY7K.js.map +1 -0
  65. package/dist/{chunk-OZGKK3N5.js → chunk-LP4RTYTL.js} +88 -9
  66. package/dist/chunk-LP4RTYTL.js.map +1 -0
  67. package/dist/{chunk-MOO63SHZ.js → chunk-LXVPWTSY.js} +80 -23
  68. package/dist/chunk-LXVPWTSY.js.map +1 -0
  69. package/dist/{chunk-JNLKM3JT.js → chunk-N6EEW2GF.js} +6 -4
  70. package/dist/{chunk-JNLKM3JT.js.map → chunk-N6EEW2GF.js.map} +1 -1
  71. package/dist/chunk-NHEU5FT6.js +115 -0
  72. package/dist/chunk-NHEU5FT6.js.map +1 -0
  73. package/dist/chunk-P3BPW446.js +294 -0
  74. package/dist/chunk-P3BPW446.js.map +1 -0
  75. package/dist/chunk-QPOM7W3D.js +104 -0
  76. package/dist/chunk-QPOM7W3D.js.map +1 -0
  77. package/dist/{chunk-FU3CEHBS.js → chunk-R6PBY3YN.js} +6 -4
  78. package/dist/{chunk-FU3CEHBS.js.map → chunk-R6PBY3YN.js.map} +1 -1
  79. package/dist/{chunk-TJOYBDKS.js → chunk-R6YMSJR7.js} +65 -36
  80. package/dist/chunk-R6YMSJR7.js.map +1 -0
  81. package/dist/{chunk-ZEIV5X3U.js → chunk-SOYKSPPX.js} +73 -23
  82. package/dist/chunk-SOYKSPPX.js.map +1 -0
  83. package/dist/{chunk-NKMJMVZP.js → chunk-T52CUOCJ.js} +5 -3
  84. package/dist/{chunk-NKMJMVZP.js.map → chunk-T52CUOCJ.js.map} +1 -1
  85. package/dist/chunk-UFENSIWD.js +135 -0
  86. package/dist/chunk-UFENSIWD.js.map +1 -0
  87. package/dist/{chunk-A4M3A4SZ.js → chunk-UYTIJCCW.js} +10 -42
  88. package/dist/chunk-UYTIJCCW.js.map +1 -0
  89. package/dist/chunk-XX6JZW5N.js +36 -0
  90. package/dist/chunk-XX6JZW5N.js.map +1 -0
  91. package/dist/{chunk-2ZF3J7OO.js → chunk-XXSZL5CY.js} +17 -5
  92. package/dist/chunk-XXSZL5CY.js.map +1 -0
  93. package/dist/{chunk-6PMA6NHE.js → chunk-Y55FNQHS.js} +5 -3
  94. package/dist/{chunk-6PMA6NHE.js.map → chunk-Y55FNQHS.js.map} +1 -1
  95. package/dist/chunk-ZAWGJC4I.js +176 -0
  96. package/dist/chunk-ZAWGJC4I.js.map +1 -0
  97. package/dist/chunk-ZUQ3DOG2.js +110 -0
  98. package/dist/chunk-ZUQ3DOG2.js.map +1 -0
  99. package/dist/components/accordion.d.ts +22 -0
  100. package/dist/components/accordion.js +6 -2
  101. package/dist/components/alert.d.ts +22 -1
  102. package/dist/components/alert.js +3 -2
  103. package/dist/components/app-bar.d.ts +153 -0
  104. package/dist/components/app-bar.js +15 -0
  105. package/dist/components/app-bar.js.map +1 -0
  106. package/dist/components/app-ui.d.ts +29 -2
  107. package/dist/components/app-ui.js +5 -4
  108. package/dist/components/badge.d.ts +17 -1
  109. package/dist/components/badge.js +4 -3
  110. package/dist/components/blocks.js +5 -4
  111. package/dist/components/button.d.ts +18 -2
  112. package/dist/components/button.js +4 -3
  113. package/dist/components/checkbox-group.js +4 -3
  114. package/dist/components/checkbox.js +4 -3
  115. package/dist/components/checked.d.ts +77 -0
  116. package/dist/components/checked.js +10 -0
  117. package/dist/components/checked.js.map +1 -0
  118. package/dist/components/chip-group.d.ts +113 -0
  119. package/dist/components/chip-group.js +11 -0
  120. package/dist/components/chip-group.js.map +1 -0
  121. package/dist/components/chip.d.ts +11 -0
  122. package/dist/components/chip.js +3 -2
  123. package/dist/components/code-diff.d.ts +77 -0
  124. package/dist/components/code-diff.js +10 -0
  125. package/dist/components/code-diff.js.map +1 -0
  126. package/dist/components/date-input.js +4 -3
  127. package/dist/components/dialog.d.ts +15 -0
  128. package/dist/components/dialog.js +3 -2
  129. package/dist/components/fieldset.js +3 -2
  130. package/dist/components/grid.js +3 -2
  131. package/dist/components/help.js +3 -2
  132. package/dist/components/icon.js +3 -2
  133. package/dist/components/journey.js +4 -3
  134. package/dist/components/language-switch.d.ts +59 -0
  135. package/dist/components/language-switch.js +10 -0
  136. package/dist/components/language-switch.js.map +1 -0
  137. package/dist/components/layout.d.ts +8 -2
  138. package/dist/components/layout.js +3 -2
  139. package/dist/components/link.js +4 -3
  140. package/dist/components/list.js +3 -2
  141. package/dist/components/media.js +3 -2
  142. package/dist/components/meter.d.ts +112 -0
  143. package/dist/components/meter.js +13 -0
  144. package/dist/components/meter.js.map +1 -0
  145. package/dist/components/navigation.d.ts +52 -0
  146. package/dist/components/navigation.js +4 -3
  147. package/dist/components/page.d.ts +13 -8
  148. package/dist/components/page.js +3 -2
  149. package/dist/components/price.js +3 -2
  150. package/dist/components/progress.d.ts +16 -2
  151. package/dist/components/progress.js +3 -2
  152. package/dist/components/radio-group.js +4 -3
  153. package/dist/components/redaction.d.ts +51 -0
  154. package/dist/components/redaction.js +10 -0
  155. package/dist/components/redaction.js.map +1 -0
  156. package/dist/components/rows.d.ts +28 -0
  157. package/dist/components/rows.js +7 -3
  158. package/dist/components/select.js +4 -3
  159. package/dist/components/shell.js +4 -3
  160. package/dist/components/source.d.ts +68 -0
  161. package/dist/components/source.js +10 -0
  162. package/dist/components/source.js.map +1 -0
  163. package/dist/components/status-pill-style.d.ts +16 -0
  164. package/dist/components/status-pill-style.js +15 -0
  165. package/dist/components/status-pill-style.js.map +1 -0
  166. package/dist/components/status.d.ts +66 -0
  167. package/dist/components/status.js +10 -0
  168. package/dist/components/status.js.map +1 -0
  169. package/dist/components/summary-list.js +3 -2
  170. package/dist/components/switch.js +4 -3
  171. package/dist/components/table.d.ts +19 -0
  172. package/dist/components/table.js +4 -3
  173. package/dist/components/text-input.js +5 -4
  174. package/dist/components/textarea.d.ts +5 -0
  175. package/dist/components/textarea.js +4 -3
  176. package/dist/components/tool-card.d.ts +107 -0
  177. package/dist/components/tool-card.js +11 -0
  178. package/dist/components/tool-card.js.map +1 -0
  179. package/dist/components/tool-kit-tokens.d.ts +25 -0
  180. package/dist/components/tool-kit-tokens.js +8 -0
  181. package/dist/components/tool-kit-tokens.js.map +1 -0
  182. package/dist/index.d.ts +11 -0
  183. package/dist/index.js +116 -70
  184. package/dist/standalone/atomic-ui.js +2047 -733
  185. package/dist/standalone/atomic-ui.js.map +4 -4
  186. package/package.json +2 -2
  187. package/dist/chunk-2D2IMQII.js.map +0 -1
  188. package/dist/chunk-2EP3IV3G.js.map +0 -1
  189. package/dist/chunk-2ZF3J7OO.js.map +0 -1
  190. package/dist/chunk-3T7J66Z2.js.map +0 -1
  191. package/dist/chunk-7UWJXPR3.js.map +0 -1
  192. package/dist/chunk-A4M3A4SZ.js.map +0 -1
  193. package/dist/chunk-AURT72IC.js.map +0 -1
  194. package/dist/chunk-AYKYHZGQ.js +0 -108
  195. package/dist/chunk-AYKYHZGQ.js.map +0 -1
  196. package/dist/chunk-D6NET2VB.js.map +0 -1
  197. package/dist/chunk-DN5YZFSG.js.map +0 -1
  198. package/dist/chunk-MLKNZL5J.js.map +0 -1
  199. package/dist/chunk-MOO63SHZ.js.map +0 -1
  200. package/dist/chunk-OJO62KRX.js.map +0 -1
  201. package/dist/chunk-ONED3PUB.js.map +0 -1
  202. package/dist/chunk-OZGKK3N5.js.map +0 -1
  203. package/dist/chunk-QU3U2CS2.js +0 -144
  204. package/dist/chunk-QU3U2CS2.js.map +0 -1
  205. package/dist/chunk-TJOYBDKS.js.map +0 -1
  206. package/dist/chunk-UFPI4I2Y.js.map +0 -1
  207. package/dist/chunk-V7EB7Q2M.js.map +0 -1
  208. package/dist/chunk-ZEIV5X3U.js.map +0 -1
@@ -0,0 +1,75 @@
1
+ import {
2
+ kit
3
+ } from "./chunk-XX6JZW5N.js";
4
+ import {
5
+ ImpaktElement,
6
+ visuallyHidden
7
+ } from "./chunk-72WNCCDC.js";
8
+ import {
9
+ t
10
+ } from "./chunk-JTCTQBAX.js";
11
+
12
+ // packages/ui/src/components/redaction.ts
13
+ import { css, html } from "lit";
14
+ var ImpaktRedaction = class extends ImpaktElement {
15
+ static {
16
+ this.properties = {
17
+ label: { type: String },
18
+ look: { type: String, reflect: true },
19
+ redactedText: { type: String, attribute: "redacted-text" }
20
+ };
21
+ }
22
+ constructor() {
23
+ super();
24
+ this.label = "";
25
+ this.look = "solid";
26
+ this.redactedText = "Redacted";
27
+ }
28
+ static {
29
+ this.styles = [
30
+ ...ImpaktElement.styles,
31
+ css`
32
+ :host {
33
+ display: inline;
34
+ }
35
+ .tag {
36
+ position: relative;
37
+ display: inline-block;
38
+ padding: 1px 8px;
39
+ font-family: ${t.fontMono};
40
+ font-size: ${kit.small};
41
+ font-weight: ${kit.medium};
42
+ line-height: 1.4;
43
+ white-space: nowrap;
44
+ color: ${kit.onInverse};
45
+ background: ${kit.inverse};
46
+ border: 1px solid ${kit.inverse};
47
+ border-radius: 0;
48
+ user-select: none;
49
+ }
50
+ :host([look='outline']) .tag {
51
+ color: ${t.text};
52
+ background: ${t.surfaceCard};
53
+ border-color: ${t.text};
54
+ }
55
+ .visually-hidden {
56
+ ${visuallyHidden}
57
+ }
58
+ @media (forced-colors: active) {
59
+ .tag {
60
+ border-color: CanvasText;
61
+ }
62
+ }
63
+ `
64
+ ];
65
+ }
66
+ render() {
67
+ return html`<span class="tag" part="tag"><span class="visually-hidden">${this.redactedText}: </span>${this.label}</span>`;
68
+ }
69
+ };
70
+ customElements.define("impakt-redaction", ImpaktRedaction);
71
+
72
+ export {
73
+ ImpaktRedaction
74
+ };
75
+ //# sourceMappingURL=chunk-LBHTXY7K.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/redaction.ts"],"sourcesContent":["/**\n * An inline tag that stands in for withheld text.\n */\nimport { css, html, type TemplateResult } from 'lit';\nimport { ImpaktElement } from '../base/ImpaktElement';\nimport { visuallyHidden } from '../base/styles';\nimport { t } from '../base/tokens';\nimport { kit } from './tool-kit-tokens';\n\n/**\n * Stands in for text that has been withheld, such as a third party's name or a\n * phone number, and says what kind of thing it was.\n *\n * **It never holds the original.** There is no property, attribute or slot for\n * the withheld value, so it cannot reach the page, the accessibility tree or a\n * copy and paste. It takes only `label`, the kind of thing removed, and a\n * screen reader hears \"Redacted: Phone number\".\n *\n * `look=\"outline\"` is the quieter tag for a list of redactions beside the text.\n *\n * Figma: Subject Access `37:656`; dark `48:756`.\n *\n * @category content\n * @icon text\n * @csspart tag - The tag.\n */\nexport class ImpaktRedaction extends ImpaktElement {\n static properties = {\n label: { type: String },\n look: { type: String, reflect: true },\n redactedText: { type: String, attribute: 'redacted-text' },\n };\n\n /** What kind of thing was withheld: \"Third party name\", \"Phone number\". */\n declare label: string;\n /** `solid` in running text, `outline` in a list. */\n declare look: 'solid' | 'outline';\n /** The word a screen reader hears first. */\n declare redactedText: string;\n\n constructor() {\n super();\n this.label = '';\n this.look = 'solid';\n this.redactedText = 'Redacted';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host {\n display: inline;\n }\n .tag {\n position: relative;\n display: inline-block;\n padding: 1px 8px;\n font-family: ${t.fontMono};\n font-size: ${kit.small};\n font-weight: ${kit.medium};\n line-height: 1.4;\n white-space: nowrap;\n color: ${kit.onInverse};\n background: ${kit.inverse};\n border: 1px solid ${kit.inverse};\n border-radius: 0;\n user-select: none;\n }\n :host([look='outline']) .tag {\n color: ${t.text};\n background: ${t.surfaceCard};\n border-color: ${t.text};\n }\n .visually-hidden {\n ${visuallyHidden}\n }\n @media (forced-colors: active) {\n .tag {\n border-color: CanvasText;\n }\n }\n `,\n ];\n\n render(): TemplateResult {\n return html`<span class=\"tag\" part=\"tag\"><span class=\"visually-hidden\">${this.redactedText}: </span>${this.label}</span>`;\n }\n}\n\ncustomElements.define('impakt-redaction', ImpaktRedaction);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-redaction': ImpaktRedaction;\n }\n}\n"],"mappings":";;;;;;;;;;;;AAGA,SAAS,KAAK,YAAiC;AAuBxC,IAAM,kBAAN,cAA8B,cAAc;AAAA,EACjD;AAAA,SAAO,aAAa;AAAA,MAClB,OAAO,EAAE,MAAM,OAAO;AAAA,MACtB,MAAM,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MACpC,cAAc,EAAE,MAAM,QAAQ,WAAW,gBAAgB;AAAA,IAC3D;AAAA;AAAA,EASA,cAAc;AACZ,UAAM;AACN,SAAK,QAAQ;AACb,SAAK,OAAO;AACZ,SAAK,eAAe;AAAA,EACtB;AAAA,EAEA;AAAA,SAAO,SAAS;AAAA,MACd,GAAG,cAAc;AAAA,MACjB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAQmB,EAAE,QAAQ;AAAA,qBACZ,IAAI,KAAK;AAAA,uBACP,IAAI,MAAM;AAAA;AAAA;AAAA,iBAGhB,IAAI,SAAS;AAAA,sBACR,IAAI,OAAO;AAAA,4BACL,IAAI,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,iBAKtB,EAAE,IAAI;AAAA,sBACD,EAAE,WAAW;AAAA,wBACX,EAAE,IAAI;AAAA;AAAA;AAAA,UAGpB,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQtB;AAAA;AAAA,EAEA,SAAyB;AACvB,WAAO,kEAAkE,KAAK,YAAY,YAAY,KAAK,KAAK;AAAA,EAClH;AACF;AAEA,eAAe,OAAO,oBAAoB,eAAe;","names":[]}
@@ -1,15 +1,19 @@
1
1
  import {
2
2
  ImpaktElement,
3
+ focusRing,
4
+ say,
5
+ visuallyHidden
6
+ } from "./chunk-72WNCCDC.js";
7
+ import {
3
8
  fontSize,
4
9
  fontWeight,
5
- say,
6
10
  space,
7
- t,
8
- visuallyHidden
9
- } from "./chunk-V7EB7Q2M.js";
11
+ t
12
+ } from "./chunk-JTCTQBAX.js";
10
13
 
11
14
  // packages/ui/src/components/progress.ts
12
- import { html, css, nothing } from "lit";
15
+ import { html, css, nothing, unsafeCSS } from "lit";
16
+ var LINE_SOFT = unsafeCSS("var(--impakt-color-line-soft, #dcdcd8)");
13
17
  var ImpaktProgress = class extends ImpaktElement {
14
18
  static {
15
19
  this.properties = {
@@ -17,7 +21,8 @@ var ImpaktProgress = class extends ImpaktElement {
17
21
  current: { type: String },
18
22
  label: { type: String },
19
23
  look: { type: String, reflect: true },
20
- hideLabels: { type: Boolean, attribute: "hide-labels", reflect: true }
24
+ hideLabels: { type: Boolean, attribute: "hide-labels", reflect: true },
25
+ doneText: { type: String, attribute: "done-text" }
21
26
  };
22
27
  }
23
28
  constructor() {
@@ -27,10 +32,12 @@ var ImpaktProgress = class extends ImpaktElement {
27
32
  this.label = "Progress";
28
33
  this.look = "steps";
29
34
  this.hideLabels = false;
35
+ this.doneText = "";
30
36
  }
31
37
  static {
32
38
  this.styles = [
33
39
  ...ImpaktElement.styles,
40
+ focusRing,
34
41
  css`
35
42
  :host {
36
43
  display: block;
@@ -84,7 +91,7 @@ var ImpaktProgress = class extends ImpaktElement {
84
91
  inset-inline: 0;
85
92
  inset-block-start: 0;
86
93
  block-size: 5px;
87
- border-radius: 999px;
94
+ border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999));
88
95
  background: ${t.border};
89
96
  }
90
97
  :host([look='bars']) li[data-state='done']::before {
@@ -100,19 +107,91 @@ var ImpaktProgress = class extends ImpaktElement {
100
107
  :host([hide-labels]) .name {
101
108
  ${visuallyHidden}
102
109
  }
110
+ /* Stages: numbered names on a soft rule, the current one underlined in the ink. */
111
+ :host([look='stages']) nav {
112
+ overflow-x: auto;
113
+ scrollbar-width: thin;
114
+ }
115
+ :host([look='stages']) ol {
116
+ gap: ${space(8)};
117
+ inline-size: max-content;
118
+ min-inline-size: 100%;
119
+ box-shadow: inset 0 -1px 0 ${LINE_SOFT};
120
+ }
121
+ :host([look='stages']) li {
122
+ flex: none;
123
+ padding: 0;
124
+ border: 0;
125
+ font-size: ${fontSize("md")};
126
+ font-weight: ${fontWeight("regular")};
127
+ color: ${t.textMuted};
128
+ white-space: nowrap;
129
+ }
130
+ :host([look='stages']) .stage {
131
+ display: inline-flex;
132
+ align-items: baseline;
133
+ gap: ${space(2)};
134
+ min-block-size: 24px;
135
+ padding-block: ${space(3)};
136
+ border-block-end: 3px solid transparent;
137
+ color: inherit;
138
+ text-decoration: none;
139
+ }
140
+ :host([look='stages']) .num {
141
+ font-family: ${t.fontMono};
142
+ font-size: ${fontSize("sm")};
143
+ }
144
+ :host([look='stages']) li[data-state='done'] .num {
145
+ color: ${t.text};
146
+ }
147
+ :host([look='stages']) li[data-state='current'] {
148
+ color: ${t.text};
149
+ }
150
+ :host([look='stages']) li[data-state='current'] .stage {
151
+ border-block-end-color: ${t.text};
152
+ }
153
+ :host([look='stages']) a.stage:hover .name {
154
+ text-decoration: underline;
155
+ text-underline-offset: 0.2em;
156
+ }
157
+ @media (forced-colors: active) {
158
+ :host([look='stages']) li[data-state='current'] .stage { border-block-end-color: CanvasText; }
159
+ }
103
160
  /* Below 30rem the labels stop fitting; the position in words is the part
104
161
  that has to survive, so the list collapses to bars and the current
105
162
  step's name. */
106
163
  @media (max-width: 30rem) {
107
- li:not([data-state='current']) .name {
164
+ :host(:not([look='stages'])) li:not([data-state='current']) .name {
108
165
  ${visuallyHidden}
109
166
  }
110
167
  }
111
168
  `
112
169
  ];
113
170
  }
171
+ renderStages(index) {
172
+ const done = this.doneText || say("done");
173
+ const linked = this.steps.some((step) => step.href);
174
+ return html`
175
+ <nav part="nav" aria-label=${this.label} tabindex=${linked ? nothing : "0"}>
176
+ <ol part="list">
177
+ ${this.steps.map((step, i) => {
178
+ const state = i < index ? "done" : i === index ? "current" : "todo";
179
+ const n = String(i + 1).padStart(2, "0");
180
+ const inner = html`<span class="num" part="step-number">${state === "done" ? html`<span aria-hidden="true">✓ </span>` : nothing}${n}</span>
181
+ <span class="name" part="step-label">${step.label}</span>${state === "done" ? html`<span class="sr-only">, ${done}</span>` : nothing}`;
182
+ return html`
183
+ <li part="step step-${state}" data-state=${state}>
184
+ ${step.href ? html`<a class="stage" href=${step.href} aria-current=${state === "current" ? "step" : nothing}>${inner}</a>` : html`<span class="stage" aria-current=${state === "current" ? "step" : nothing}>${inner}</span>`}
185
+ </li>
186
+ `;
187
+ })}
188
+ </ol>
189
+ </nav>
190
+ `;
191
+ }
114
192
  render() {
115
193
  const index = this.steps.findIndex((s) => s.id === this.current);
194
+ if (this.look === "stages") return this.renderStages(index);
116
195
  return html`
117
196
  <nav part="nav" aria-label=${this.label}>
118
197
  <ol part="list">
@@ -135,4 +214,4 @@ customElements.define("impakt-progress", ImpaktProgress);
135
214
  export {
136
215
  ImpaktProgress
137
216
  };
138
- //# sourceMappingURL=chunk-OZGKK3N5.js.map
217
+ //# sourceMappingURL=chunk-LP4RTYTL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/progress.ts"],"sourcesContent":["import { html, css, nothing, unsafeCSS, type TemplateResult } from 'lit';\nimport { say } from '../base/say';\nimport { ImpaktElement } from '../base/ImpaktElement';\nimport { visuallyHidden } from '../base/styles';\nimport { fontSize, fontWeight, space, t } from '../base/tokens';\nimport { focusRing } from '../base/styles';\n\nexport interface ProgressStep {\n id: string;\n /** The step's name. A count may follow it, such as \"Documents 3\". */\n label: string;\n /** Where the step goes, in the `stages` look, when the stages are pages a person can move between. */\n href?: string;\n}\n\n/** The G2 soft rule, until the theme carries it. */\nconst LINE_SOFT = unsafeCSS('var(--impakt-color-line-soft, #dcdcd8)');\n\n/**\n * Where the customer is in a journey.\n *\n * **It is not a `progressbar`.** That role is for a task completing — a file\n * uploading, a price calculating — and it carries `aria-valuenow`. A journey\n * indicator is navigation: an ordered list of named steps with\n * `aria-current=\"step\"` on the one you are on. Using `progressbar` here\n * announces a percentage and loses the step names, which are the only useful\n * part.\n *\n * **The position is said in words.** \"Step 2 of 5\" is visually hidden and read\n * aloud, because the visual design communicates position through colour and a\n * filled bar, and neither is available to a screen-reader user — nor to anyone\n * who cannot distinguish the filled colour from the empty one, which is 1.4.1.\n\n *\n * @category content\n * @icon progress\n */\nexport class ImpaktProgress extends ImpaktElement {\n static properties = {\n steps: { type: Array },\n current: { type: String },\n label: { type: String },\n look: { type: String, reflect: true },\n hideLabels: { type: Boolean, attribute: 'hide-labels', reflect: true },\n doneText: { type: String, attribute: 'done-text' },\n };\n\n declare steps: ProgressStep[];\n /** The id of the step being shown. */\n declare current: string;\n declare label: string;\n /**\n * `steps` is the full indicator. `bars` is a compact one for a card: short\n * rounded bars, the done steps in the text colour and the current one in the\n * brand, with small names under them. The current step is also set in a\n * heavier weight, so it does not rest on colour alone. `stages` is the G2\n * stage stepper in a tool: each stage a two-digit number in the code face and\n * a name, the done ones marked \"✓\" and said \"done\", the current one\n * underlined in the ink, and each a link when it has `href` (frames 33:471,\n * 36:709, 37:456, 39:500, 39:640). It scrolls sideways when it does not fit.\n */\n declare look: 'steps' | 'bars' | 'stages';\n /** How a done stage is said to a screen reader in the `stages` look, after its name. */\n declare doneText: string;\n /**\n * Draw the bars or steps alone, for a card too small for the names. The\n * names and \"Step 2 of 5\" are still read aloud. Each step is also a `step`\n * part, with `step-done`, `step-current` or `step-todo`, and its name is the\n * `step-label` part, for finer styling.\n */\n declare hideLabels: boolean;\n\n constructor() {\n super();\n this.steps = [];\n this.current = '';\n this.label = 'Progress';\n this.look = 'steps';\n this.hideLabels = false;\n this.doneText = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host {\n display: block;\n margin-block-end: ${space(5)};\n }\n ol {\n display: flex;\n gap: ${space(2)};\n list-style: none;\n margin: 0;\n padding: 0;\n }\n li {\n flex: 1;\n font-size: ${fontSize('sm')};\n color: ${t.textMuted};\n padding-block-start: ${space(2)};\n border-block-start: 4px solid ${t.border};\n }\n li[data-state='done'] {\n color: ${t.text};\n border-block-start-color: ${t.brand};\n }\n li[data-state='current'] {\n color: ${t.text};\n font-weight: ${fontWeight('semibold')};\n border-block-start-color: ${t.brand};\n }\n .sr-only {\n ${visuallyHidden}\n }\n :host([look='bars']) {\n margin-block-end: 0;\n }\n :host([look='bars']) ol {\n gap: ${space(1.5)};\n }\n :host([look='bars']) li {\n position: relative;\n padding-block-start: ${space(3)};\n border: 0;\n font-size: 12px;\n min-inline-size: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n :host([look='bars']) li::before {\n content: '';\n position: absolute;\n inset-inline: 0;\n inset-block-start: 0;\n block-size: 5px;\n border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999));\n background: ${t.border};\n }\n :host([look='bars']) li[data-state='done']::before {\n background: ${t.text};\n }\n :host([look='bars']) li[data-state='current']::before {\n background: ${t.brand};\n }\n @media (forced-colors: active) {\n :host([look='bars']) li::before { background: GrayText; }\n :host([look='bars']) li[data-state='done']::before, :host([look='bars']) li[data-state='current']::before { background: CanvasText; }\n }\n :host([hide-labels]) .name {\n ${visuallyHidden}\n }\n /* Stages: numbered names on a soft rule, the current one underlined in the ink. */\n :host([look='stages']) nav {\n overflow-x: auto;\n scrollbar-width: thin;\n }\n :host([look='stages']) ol {\n gap: ${space(8)};\n inline-size: max-content;\n min-inline-size: 100%;\n box-shadow: inset 0 -1px 0 ${LINE_SOFT};\n }\n :host([look='stages']) li {\n flex: none;\n padding: 0;\n border: 0;\n font-size: ${fontSize('md')};\n font-weight: ${fontWeight('regular')};\n color: ${t.textMuted};\n white-space: nowrap;\n }\n :host([look='stages']) .stage {\n display: inline-flex;\n align-items: baseline;\n gap: ${space(2)};\n min-block-size: 24px;\n padding-block: ${space(3)};\n border-block-end: 3px solid transparent;\n color: inherit;\n text-decoration: none;\n }\n :host([look='stages']) .num {\n font-family: ${t.fontMono};\n font-size: ${fontSize('sm')};\n }\n :host([look='stages']) li[data-state='done'] .num {\n color: ${t.text};\n }\n :host([look='stages']) li[data-state='current'] {\n color: ${t.text};\n }\n :host([look='stages']) li[data-state='current'] .stage {\n border-block-end-color: ${t.text};\n }\n :host([look='stages']) a.stage:hover .name {\n text-decoration: underline;\n text-underline-offset: 0.2em;\n }\n @media (forced-colors: active) {\n :host([look='stages']) li[data-state='current'] .stage { border-block-end-color: CanvasText; }\n }\n /* Below 30rem the labels stop fitting; the position in words is the part\n that has to survive, so the list collapses to bars and the current\n step's name. */\n @media (max-width: 30rem) {\n :host(:not([look='stages'])) li:not([data-state='current']) .name {\n ${visuallyHidden}\n }\n }\n `,\n ];\n\n private renderStages(index: number): TemplateResult {\n const done = this.doneText || say('done');\n // A row that scrolls must be reachable by keyboard. With links it is; without, the row itself takes focus.\n const linked = this.steps.some((step) => step.href);\n return html`\n <nav part=\"nav\" aria-label=${this.label} tabindex=${linked ? nothing : '0'}>\n <ol part=\"list\">\n ${this.steps.map((step, i) => {\n const state = i < index ? 'done' : i === index ? 'current' : 'todo';\n const n = String(i + 1).padStart(2, '0');\n const inner = html`<span class=\"num\" part=\"step-number\">${state === 'done' ? html`<span aria-hidden=\"true\">✓ </span>` : nothing}${n}</span>\n <span class=\"name\" part=\"step-label\">${step.label}</span>${state === 'done' ? html`<span class=\"sr-only\">, ${done}</span>` : nothing}`;\n return html`\n <li part=\"step step-${state}\" data-state=${state}>\n ${\n step.href\n ? html`<a class=\"stage\" href=${step.href} aria-current=${state === 'current' ? 'step' : nothing}>${inner}</a>`\n : html`<span class=\"stage\" aria-current=${state === 'current' ? 'step' : nothing}>${inner}</span>`\n }\n </li>\n `;\n })}\n </ol>\n </nav>\n `;\n }\n\n render(): TemplateResult {\n const index = this.steps.findIndex((s) => s.id === this.current);\n if (this.look === 'stages') return this.renderStages(index);\n return html`\n <nav part=\"nav\" aria-label=${this.label}>\n <ol part=\"list\">\n ${this.steps.map((step, i) => {\n const state = i < index ? 'done' : i === index ? 'current' : 'todo';\n return html`\n <li part=\"step step-${state}\" data-state=${state} aria-current=${state === 'current' ? 'step' : nothing}>\n ${\n state === 'current'\n ? html`<span class=\"sr-only\">${say('Step {step} of {steps}:', { step: i + 1, steps: this.steps.length })} </span>`\n : nothing\n }\n <span class=\"name\" part=\"step-label\">${step.label}</span>\n </li>\n `;\n })}\n </ol>\n </nav>\n `;\n }\n}\n\ncustomElements.define('impakt-progress', ImpaktProgress);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-progress': ImpaktProgress;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAS,MAAM,KAAK,SAAS,iBAAsC;AAgBnE,IAAM,YAAY,UAAU,wCAAwC;AAqB7D,IAAM,iBAAN,cAA6B,cAAc;AAAA,EAChD;AAAA,SAAO,aAAa;AAAA,MAClB,OAAO,EAAE,MAAM,MAAM;AAAA,MACrB,SAAS,EAAE,MAAM,OAAO;AAAA,MACxB,OAAO,EAAE,MAAM,OAAO;AAAA,MACtB,MAAM,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MACpC,YAAY,EAAE,MAAM,SAAS,WAAW,eAAe,SAAS,KAAK;AAAA,MACrE,UAAU,EAAE,MAAM,QAAQ,WAAW,YAAY;AAAA,IACnD;AAAA;AAAA,EA2BA,cAAc;AACZ,UAAM;AACN,SAAK,QAAQ,CAAC;AACd,SAAK,UAAU;AACf,SAAK,QAAQ;AACb,SAAK,OAAO;AACZ,SAAK,aAAa;AAClB,SAAK,WAAW;AAAA,EAClB;AAAA,EAEA;AAAA,SAAO,SAAS;AAAA,M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K,MAAM,IAAI,CAAC,MAAM,MAAM;AAC5B,YAAM,QAAQ,IAAI,QAAQ,SAAS,MAAM,QAAQ,YAAY;AAC7D,aAAO;AAAA,oCACiB,KAAK,gBAAgB,KAAK,iBAAiB,UAAU,YAAY,SAAS,OAAO;AAAA,kBAEnG,UAAU,YACN,6BAA6B,IAAI,2BAA2B,EAAE,MAAM,IAAI,GAAG,OAAO,KAAK,MAAM,OAAO,CAAC,CAAC,aACtG,OACN;AAAA,uDACuC,KAAK,KAAK;AAAA;AAAA;AAAA,IAGvD,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA,EAIV;AACF;AAEA,eAAe,OAAO,mBAAmB,cAAc;","names":[]}
@@ -5,33 +5,40 @@ import {
5
5
  import {
6
6
  ImpaktElement,
7
7
  focusRing,
8
+ targetSize,
9
+ touchTarget
10
+ } from "./chunk-72WNCCDC.js";
11
+ import {
8
12
  fontSize,
9
13
  fontWeight,
10
14
  space,
11
- t,
12
- targetSize,
13
- touchTarget
14
- } from "./chunk-V7EB7Q2M.js";
15
+ t
16
+ } from "./chunk-JTCTQBAX.js";
15
17
 
16
18
  // packages/ui/src/components/dialog.ts
17
19
  import { html, css, nothing } from "lit";
18
20
  var ImpaktDialog = class extends ImpaktElement {
19
- static {
20
- this.properties = {
21
- open: { type: Boolean, reflect: true },
22
- heading: { type: String },
23
- closeLabel: { type: String, attribute: "close-label" },
24
- dismissible: { type: Boolean },
25
- phoneFullScreen: { type: Boolean, reflect: true, attribute: "phone-full-screen" }
26
- };
27
- }
28
21
  constructor() {
29
22
  super();
23
+ this.hasFooter = false;
30
24
  this.open = false;
31
25
  this.heading = "";
32
26
  this.closeLabel = "Close";
33
27
  this.dismissible = true;
34
28
  this.phoneFullScreen = false;
29
+ this.size = "md";
30
+ this.eyebrow = "";
31
+ }
32
+ static {
33
+ this.properties = {
34
+ open: { type: Boolean, reflect: true },
35
+ heading: { type: String },
36
+ closeLabel: { type: String, attribute: "close-label" },
37
+ dismissible: { type: Boolean },
38
+ phoneFullScreen: { type: Boolean, reflect: true, attribute: "phone-full-screen" },
39
+ size: { type: String, reflect: true },
40
+ eyebrow: { type: String }
41
+ };
35
42
  }
36
43
  static {
37
44
  this.styles = [
@@ -41,11 +48,11 @@ var ImpaktDialog = class extends ImpaktElement {
41
48
  css`
42
49
  dialog {
43
50
  padding: 0;
44
- border: 0;
51
+ border: ${t.borderThin} solid ${t.text};
45
52
  border-radius: ${t.radius2xl};
46
53
  background: ${t.surfaceCard};
47
54
  color: ${t.text};
48
- box-shadow: ${t.shadowXl}, 0 0 0 1px ${t.hairline};
55
+ box-shadow: var(--impakt-shadow-dialog, none);
49
56
  max-inline-size: min(32rem, calc(100vw - 2rem));
50
57
  /* 1.4.10 Reflow: a dialog taller than the viewport must scroll inside
51
58
  itself rather than clipping, at 320px and at 400% zoom alike. */
@@ -53,25 +60,61 @@ var ImpaktDialog = class extends ImpaktElement {
53
60
  overflow: auto;
54
61
  }
55
62
  dialog::backdrop {
56
- background: color-mix(in srgb, ${t.text} 30%, transparent);
57
- backdrop-filter: blur(2px);
63
+ /* The ink at half strength. The text colour is the paper in dark, so the backdrop is the ink there too. */
64
+ background: rgb(17 17 17 / 0.5);
65
+ }
66
+ :host([size='lg']) dialog {
67
+ inline-size: 720px;
68
+ max-inline-size: calc(100vw - 2rem);
69
+ }
70
+ .titles {
71
+ display: flex;
72
+ flex-direction: column;
73
+ gap: ${space(2)};
74
+ min-inline-size: 0;
75
+ }
76
+ .eyebrow {
77
+ margin: 0;
78
+ font-family: ${t.fontMono};
79
+ font-size: ${fontSize("sm")};
80
+ color: ${t.textMuted};
81
+ }
82
+ .foot {
83
+ display: flex;
84
+ flex-wrap: wrap;
85
+ justify-content: flex-end;
86
+ gap: ${space(3)};
87
+ padding: ${space(5)} ${space(6)};
88
+ border-block-start: ${t.borderThin} solid var(--impakt-color-line-soft, #dcdcd8);
89
+ }
90
+ .foot.empty {
91
+ display: none;
58
92
  }
59
93
  .head {
60
94
  display: flex;
61
95
  align-items: flex-start;
62
96
  justify-content: space-between;
63
97
  gap: ${space(3)};
64
- padding: ${space(5)} ${space(5)} 0;
98
+ padding: ${space(6)} ${space(6)} 0;
65
99
  }
100
+ /* G2: about 32px, semibold, tight. */
66
101
  .heading {
67
102
  margin: 0;
68
103
  font-family: ${t.fontHeading};
69
- font-size: ${fontSize("xl")};
70
- font-weight: ${fontWeight("bold")};
104
+ font-size: var(--impakt-type-heading-m-size, 2rem);
105
+ line-height: 1.1;
106
+ letter-spacing: -0.03em;
107
+ font-weight: ${fontWeight("semibold")};
71
108
  color: ${t.textHeading};
72
109
  }
73
110
  .body {
74
- padding: ${space(4)} ${space(5)} ${space(5)};
111
+ padding: ${space(4)} ${space(6)} ${space(6)};
112
+ }
113
+ @media (max-width: 40rem) {
114
+ .heading { font-size: 1.5rem; }
115
+ .head { padding: ${space(5)} ${space(5)} 0; }
116
+ .body { padding: ${space(4)} ${space(5)} ${space(5)}; }
117
+ .foot { padding: ${space(4)} ${space(5)}; }
75
118
  }
76
119
  @media (max-width: 40rem) {
77
120
  :host([phone-full-screen]) dialog {
@@ -121,6 +164,14 @@ var ImpaktDialog = class extends ImpaktElement {
121
164
  super.disconnectedCallback();
122
165
  unlockScroll(this);
123
166
  }
167
+ onFooter() {
168
+ const slots = Array.from(this.renderRoot.querySelectorAll('slot[name="footer"], slot[name="actions"]'));
169
+ const next = slots.some((slot) => slot.assignedElements({ flatten: true }).length > 0);
170
+ if (next !== this.hasFooter) {
171
+ this.hasFooter = next;
172
+ this.requestUpdate();
173
+ }
174
+ }
124
175
  close() {
125
176
  this.open = false;
126
177
  this.dispatchEvent(new CustomEvent("impakt-close", { bubbles: true, composed: true }));
@@ -139,13 +190,19 @@ var ImpaktDialog = class extends ImpaktElement {
139
190
  }}
140
191
  >
141
192
  <div class="head">
142
- ${this.heading ? html`<h2 class="heading" id=${this.id_("heading")} part="heading">${this.heading}</h2>` : nothing}
193
+ <div class="titles">
194
+ ${this.eyebrow ? html`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>` : nothing}
195
+ ${this.heading ? html`<h2 class="heading" id=${this.id_("heading")} part="heading">${this.heading}</h2>` : nothing}
196
+ </div>
143
197
  ${this.dismissible ? html`<button class="close" part="close" type="button" @click=${this.close}>
144
198
  <span aria-hidden="true">×</span>
145
199
  <span class="sr-only" style="position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)">${this.closeLabel}</span>
146
200
  </button>` : nothing}
147
201
  </div>
148
202
  <div class="body" part="body"><slot></slot></div>
203
+ <div class="foot ${this.hasFooter ? "" : "empty"}" part="footer">
204
+ <slot name="footer" @slotchange=${this.onFooter}></slot><slot name="actions" @slotchange=${this.onFooter}></slot>
205
+ </div>
149
206
  </dialog>
150
207
  `;
151
208
  }
@@ -155,4 +212,4 @@ customElements.define("impakt-dialog", ImpaktDialog);
155
212
  export {
156
213
  ImpaktDialog
157
214
  };
158
- //# sourceMappingURL=chunk-MOO63SHZ.js.map
215
+ //# sourceMappingURL=chunk-LXVPWTSY.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/dialog.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { ImpaktElement } from '../base/ImpaktElement';\nimport { focusRing, targetSize, touchTarget } from '../base/styles';\nimport { lockScroll, unlockScroll } from '../base/scroll-lock';\nimport { fontSize, fontWeight, space, t } from '../base/tokens';\n\n/**\n * A modal dialog — \"are you sure you want to leave this order?\".\n *\n * **It is a native `<dialog>` opened with `showModal()`, and that is the whole\n * design.** The platform then provides, correctly and in every browser: a\n * focus trap, Escape to close, the rest of the page made inert so a screen\n * reader cannot wander out of the dialog, rendering in the top layer so no\n * `z-index` can cover it, and focus returned to whatever opened it when it\n * closes.\n *\n * Every one of those is a thing hand-rolled modals get wrong. The focus trap\n * is the famous one, but inertness is the worse failure: a dialog that traps\n * the Tab key but leaves the background in the accessibility tree lets a\n * screen-reader user read straight past it into a page they cannot interact\n * with, and nothing on screen tells them that is what happened.\n *\n * What is left to get right is the labelling. `aria-labelledby` points at the\n * dialog's own heading, so it is announced by name on open rather than as\n * \"dialog\".\n *\n * Two things the platform leaves out are added. The page behind does not scroll\n * while the dialog is open, so a finger on the backdrop does not move the page\n * out from under it. And with `phone-full-screen` the dialog fills a phone's\n * screen, which suits a dialog holding a form; a short question is better left\n * as a box in the middle, which is the default.\n\n *\n * @category feedback\n * @icon dialog\n * @fires {CustomEvent<null>} impakt-close - When the dialog is closed.\n * @slot - The body of the dialog.\n * @slot footer - The dialog's actions, set at the end of a row along its foot, such as \"Cancel\" and \"Send\".\n * @slot actions - The same as `footer`, for a page that names it so.\n */\nexport class ImpaktDialog extends ImpaktElement {\n static properties = {\n open: { type: Boolean, reflect: true },\n heading: { type: String },\n closeLabel: { type: String, attribute: 'close-label' },\n dismissible: { type: Boolean },\n phoneFullScreen: { type: Boolean, reflect: true, attribute: 'phone-full-screen' },\n size: { type: String, reflect: true },\n eyebrow: { type: String },\n };\n\n declare open: boolean;\n declare heading: string;\n declare closeLabel: string;\n /** When false, Escape and the backdrop do not close it — a decision must be made. */\n declare dismissible: boolean;\n /** Fill the screen on a phone, for a dialog that holds a form or a long text. */\n declare phoneFullScreen: boolean;\n /** `md` is a short question, 32rem wide. `lg` is 720px, for a dialog that holds a form or a review (G2 frame 45:653). */\n declare size: 'md' | 'lg';\n /** A short line above the heading in the code face, such as \"Step 2 of 3\". It is read before the heading but is not part of the dialog's name. */\n declare eyebrow: string;\n\n constructor() {\n super();\n this.open = false;\n this.heading = '';\n this.closeLabel = 'Close';\n this.dismissible = true;\n this.phoneFullScreen = false;\n this.size = 'md';\n this.eyebrow = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n touchTarget('.close'),\n css`\n dialog {\n padding: 0;\n border: ${t.borderThin} solid ${t.text};\n border-radius: ${t.radius2xl};\n background: ${t.surfaceCard};\n color: ${t.text};\n box-shadow: var(--impakt-shadow-dialog, none);\n max-inline-size: min(32rem, calc(100vw - 2rem));\n /* 1.4.10 Reflow: a dialog taller than the viewport must scroll inside\n itself rather than clipping, at 320px and at 400% zoom alike. */\n max-block-size: calc(100vh - 2rem);\n overflow: auto;\n }\n dialog::backdrop {\n /* The ink at half strength. The text colour is the paper in dark, so the backdrop is the ink there too. */\n background: rgb(17 17 17 / 0.5);\n }\n :host([size='lg']) dialog {\n inline-size: 720px;\n max-inline-size: calc(100vw - 2rem);\n }\n .titles {\n display: flex;\n flex-direction: column;\n gap: ${space(2)};\n min-inline-size: 0;\n }\n .eyebrow {\n margin: 0;\n font-family: ${t.fontMono};\n font-size: ${fontSize('sm')};\n color: ${t.textMuted};\n }\n .foot {\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-end;\n gap: ${space(3)};\n padding: ${space(5)} ${space(6)};\n border-block-start: ${t.borderThin} solid var(--impakt-color-line-soft, #dcdcd8);\n }\n .foot.empty {\n display: none;\n }\n .head {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: ${space(3)};\n padding: ${space(6)} ${space(6)} 0;\n }\n /* G2: about 32px, semibold, tight. */\n .heading {\n margin: 0;\n font-family: ${t.fontHeading};\n font-size: var(--impakt-type-heading-m-size, 2rem);\n line-height: 1.1;\n letter-spacing: -0.03em;\n font-weight: ${fontWeight('semibold')};\n color: ${t.textHeading};\n }\n .body {\n padding: ${space(4)} ${space(6)} ${space(6)};\n }\n @media (max-width: 40rem) {\n .heading { font-size: 1.5rem; }\n .head { padding: ${space(5)} ${space(5)} 0; }\n .body { padding: ${space(4)} ${space(5)} ${space(5)}; }\n .foot { padding: ${space(4)} ${space(5)}; }\n }\n @media (max-width: 40rem) {\n :host([phone-full-screen]) dialog {\n inline-size: 100vw;\n max-inline-size: 100vw;\n block-size: 100dvh;\n max-block-size: 100dvh;\n margin: 0;\n border-radius: 0;\n }\n }\n .close {\n ${targetSize}\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n background: none;\n border: 0;\n border-radius: ${t.radius};\n font: inherit;\n font-size: ${fontSize('lg')};\n color: ${t.text};\n cursor: pointer;\n }\n `,\n ];\n\n private get dialog(): HTMLDialogElement | null {\n return this.renderRoot.querySelector('dialog');\n }\n\n updated(changed: Map<string, unknown>): void {\n if (!changed.has('open')) return;\n const dialog = this.dialog;\n if (!dialog) return;\n // happy-dom and older engines do not implement showModal. Falling back to\n // the `open` attribute renders a NON-modal dialog — no focus trap, no\n // inert background — so it is used only to keep tests and ancient browsers\n // from throwing, never as an equivalent.\n if (this.open) {\n if (typeof dialog.showModal === 'function') dialog.showModal();\n else dialog.setAttribute('open', '');\n lockScroll(this);\n } else {\n if (typeof dialog.close === 'function' && dialog.open) dialog.close();\n else dialog.removeAttribute('open');\n unlockScroll(this);\n }\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n unlockScroll(this);\n }\n\n private hasFooter = false;\n\n private onFooter(): void {\n const slots = Array.from(this.renderRoot.querySelectorAll<HTMLSlotElement>('slot[name=\"footer\"], slot[name=\"actions\"]'));\n const next = slots.some((slot) => slot.assignedElements({ flatten: true }).length > 0);\n if (next !== this.hasFooter) {\n this.hasFooter = next;\n this.requestUpdate();\n }\n }\n\n private close(): void {\n this.open = false;\n this.dispatchEvent(new CustomEvent('impakt-close', { bubbles: true, composed: true }));\n }\n\n render(): TemplateResult {\n return html`\n <dialog\n part=\"dialog\"\n aria-labelledby=${this.heading ? this.id_('heading') : nothing}\n @cancel=${(e: Event) => {\n // `cancel` fires on Escape. Blocking it is what makes a dialog\n // non-dismissible, and it is why `dismissible` exists rather than\n // leaving a caller to re-open on close.\n if (!this.dismissible) e.preventDefault();\n else this.close();\n }}\n @close=${() => {\n if (this.open) this.close();\n }}\n >\n <div class=\"head\">\n <div class=\"titles\">\n ${this.eyebrow ? html`<p class=\"eyebrow\" part=\"eyebrow\">${this.eyebrow}</p>` : nothing}\n ${this.heading ? html`<h2 class=\"heading\" id=${this.id_('heading')} part=\"heading\">${this.heading}</h2>` : nothing}\n </div>\n ${\n this.dismissible\n ? html`<button class=\"close\" part=\"close\" type=\"button\" @click=${this.close}>\n <span aria-hidden=\"true\">×</span>\n <span class=\"sr-only\" style=\"position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)\">${this.closeLabel}</span>\n </button>`\n : nothing\n }\n </div>\n <div class=\"body\" part=\"body\"><slot></slot></div>\n <div class=\"foot ${this.hasFooter ? '' : 'empty'}\" part=\"footer\">\n <slot name=\"footer\" @slotchange=${this.onFooter}></slot><slot name=\"actions\" @slotchange=${this.onFooter}></slot>\n </div>\n </dialog>\n `;\n }\n}\n\ncustomElements.define('impakt-dialog', ImpaktDialog);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-dialog': ImpaktDialog;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,SAAS,MAAM,KAAK,eAAoC;AAwCjD,IAAM,eAAN,cAA2B,cAAc;AAAA,EAuB9C,cAAc;AACZ,UAAM;AA4IR,SAAQ,YAAY;AA3IlB,SAAK,OAAO;AACZ,SAAK,UAAU;AACf,SAAK,aAAa;AAClB,SAAK,cAAc;AACnB,SAAK,kBAAkB;AACvB,SAAK,OAAO;AACZ,SAAK,UAAU;AAAA,EACjB;AAAA,EA/BA;AAAA,SAAO,aAAa;AAAA,MAClB,MAAM,EAAE,MAAM,SAAS,SAAS,KAAK;AAAA,MACrC,SAAS,EAAE,MAAM,OAAO;AAAA,MACxB,YAAY,EAAE,MAAM,QAAQ,WAAW,cAAc;AAAA,MACrD,aAAa,EAAE,MAAM,QAAQ;AAAA,MAC7B,iBAAiB,EAAE,MAAM,SAAS,SAAS,MAAM,WAAW,oBAAoB;AAAA,MAChF,MAAM,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MACpC,SAAS,EAAE,MAAM,OAAO;AAAA,IAC1B;AAAA;AAAA,EAyBA;AAAA,SAAO,SAAS;AAAA,MACd,GAAG,cAAc;AAAA,MACjB;AAAA,MACA,YAAY,QAAQ;AAAA,MACpB;AAAA;AAAA;AAAA,kBAGc,EAAE,U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;AAAA,iBACQ,MAAM;AACb,UAAI,KAAK,KAAM,MAAK,MAAM;AAAA,IAC5B,CAAC;AAAA;AAAA;AAAA;AAAA,cAIK,KAAK,UAAU,yCAAyC,KAAK,OAAO,SAAS,OAAO;AAAA,cACpF,KAAK,UAAU,8BAA8B,KAAK,IAAI,SAAS,CAAC,mBAAmB,KAAK,OAAO,UAAU,OAAO;AAAA;AAAA,YAGlH,KAAK,cACD,+DAA+D,KAAK,KAAK;AAAA;AAAA,4HAEmC,KAAK,UAAU;AAAA,2BAE3H,OACN;AAAA;AAAA;AAAA,2BAGiB,KAAK,YAAY,KAAK,OAAO;AAAA,4CACZ,KAAK,QAAQ,4CAA4C,KAAK,QAAQ;AAAA;AAAA;AAAA;AAAA,EAIhH;AACF;AAEA,eAAe,OAAO,iBAAiB,YAAY;","names":[]}
@@ -1,16 +1,18 @@
1
1
  import {
2
2
  iconSvg
3
- } from "./chunk-AL4IUSML.js";
3
+ } from "./chunk-5OYQZWP2.js";
4
4
  import {
5
5
  ImpaktElement,
6
6
  focusRing,
7
+ targetSize
8
+ } from "./chunk-72WNCCDC.js";
9
+ import {
7
10
  fontSize,
8
11
  fontWeight,
9
12
  space,
10
13
  t,
11
- targetSize,
12
14
  token
13
- } from "./chunk-V7EB7Q2M.js";
15
+ } from "./chunk-JTCTQBAX.js";
14
16
 
15
17
  // packages/ui/src/components/shell.ts
16
18
  import { html, css, nothing, unsafeCSS } from "lit";
@@ -329,4 +331,4 @@ export {
329
331
  ImpaktTabBar,
330
332
  ImpaktAppShell
331
333
  };
332
- //# sourceMappingURL=chunk-JNLKM3JT.js.map
334
+ //# sourceMappingURL=chunk-N6EEW2GF.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/shell.ts"],"sourcesContent":["import { html, css, nothing, unsafeCSS, type TemplateResult } from 'lit';\nimport { ImpaktElement } from '../base/ImpaktElement';\nimport { focusRing, targetSize } from '../base/styles';\nimport { fontSize, fontWeight, space, t, token } from '../base/tokens';\nimport { iconSvg } from './icon';\n\n/** One destination in a product's navigation. */\nexport interface ShellNavItem {\n /** A stable name for the destination, sent back with `impakt-navigate`. */\n id?: string;\n label: string;\n href: string;\n /** An icon from `impakt-icon`'s set, such as `grid` or `users`. */\n icon?: string;\n}\n\n/** The phone layout starts below this width. Desktop and phone only; there is no tablet layout. */\nconst PHONE = unsafeCSS('48rem');\n\n/** Normalise a path so `/jobs/` and `/jobs` compare equal. */\nfunction pathOf(href: string): string | null {\n if (!href || href.startsWith('#')) return null;\n try {\n const base = typeof location === 'undefined' ? 'http://localhost/' : location.href;\n return new URL(href, base).pathname.replace(/\\/$/, '') || '/';\n } catch {\n return null;\n }\n}\n\n/**\n * Whether an item is where the person is. `current` is the path the app's\n * router reports. Without it the browser's address is used, which is right\n * for a site and stale in a single-page app that never reloads.\n *\n * An item is current on its own path and on the paths below it, so Jobs stays\n * marked on `/jobs/123`. The root item, `/`, is current only on `/`.\n */\nexport function isCurrent(href: string, current: string): boolean {\n const path = pathOf(href);\n if (!path) return false;\n const here = pathOf(current || (typeof location === 'undefined' ? '' : location.pathname));\n if (!here) return false;\n if (path === here) return true;\n return path !== '/' && here.startsWith(`${path}/`);\n}\n\n/**\n * Tell the app a navigation link was followed, so a single-page app can route\n * without a reload. The event is cancelable: an app that calls\n * `preventDefault()` on it takes over, and the browser does not follow the\n * link. A click with a modifier key, or with any button but the main one, is\n * left to the browser, so \"open in a new tab\" keeps working.\n */\nexport function announceNavigate(host: HTMLElement, event: MouseEvent, item: { href: string; id?: string }): void {\n if (event.defaultPrevented || event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;\n const go = new CustomEvent('impakt-navigate', {\n detail: { href: item.href, id: item.id ?? item.href },\n bubbles: true,\n composed: true,\n cancelable: true,\n });\n if (!host.dispatchEvent(go)) event.preventDefault();\n}\n\n/**\n * A product's main navigation down the side of the screen: an icon and a word\n * for each place, with a footer slot for an action that belongs at the bottom,\n * such as Sign out.\n *\n * **The place you are on is marked in words as well as colour.** Its link\n * carries `aria-current=\"page\"`, which a screen reader announces, and it is\n * filled, so it does not rely on a colour change alone (1.4.1).\n *\n * **Every item has a word.** The icons are decorative and hidden from screen\n * readers, because an icon alone is a guess for anyone who has not learned the\n * product.\n *\n * **It works with an app's router.** Set `current` to the router's path, and\n * cancel `impakt-navigate` to route without a reload.\n *\n * @category action\n * @icon menu\n * @slot footer - An action pinned to the bottom of the side, such as Sign out.\n * @fires {CustomEvent<{ href: string; id: string }>} impakt-navigate - When an item is followed. Cancel it to route in the app instead of the browser.\n */\nexport class ImpaktSideNav extends ImpaktElement {\n static properties = {\n items: { type: Array },\n label: { type: String },\n current: { type: String },\n };\n /** The places, in order. */\n declare items: ShellNavItem[];\n /** What the navigation is called for a screen reader, such as \"Main\". */\n declare label: string;\n /** The path the person is on, from the app's router. Leave empty to use the address bar. */\n declare current: string;\n\n constructor() {\n super();\n this.items = [];\n this.label = 'Main';\n this.current = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host { display: flex; flex-direction: column; gap: ${space(5)}; block-size: 100%; }\n .card { padding: ${space(2)}; border-radius: ${t.radiusXl}; background: ${t.surfaceCard}; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${space(0.5)}; }\n a {\n ${targetSize}\n display: flex;\n align-items: center;\n gap: ${space(3)};\n min-block-size: 44px;\n padding: 0 ${space(3.5)};\n border-radius: ${t.radiusLg};\n color: ${t.text};\n font-size: ${fontSize('md')};\n font-weight: ${fontWeight('medium')};\n text-decoration: none;\n transition: background-color 120ms ease-in-out, color 120ms ease-in-out;\n }\n a:hover { background: ${t.surfaceInset}; }\n a[aria-current='page'] { background: ${t.text}; color: ${t.surfaceCard}; }\n .icon { flex: none; }\n .footer { margin-block-start: auto; }\n .footer.empty { display: none; }\n @media (prefers-reduced-motion: reduce) { a { transition: none; } }\n @media (forced-colors: active) { a[aria-current='page'] { border: 2px solid Highlight; } }\n `,\n ];\n\n private footerFilled = false;\n\n private onFooter(event: Event): void {\n const slot = event.target as HTMLSlotElement;\n this.footerFilled = slot.assignedNodes({ flatten: true }).some((n) => n.nodeType === Node.ELEMENT_NODE || (n.textContent ?? '').trim() !== '');\n this.requestUpdate();\n }\n\n render(): TemplateResult {\n return html`\n <nav class=\"card\" aria-label=${this.label} part=\"nav\">\n <ul part=\"list\">\n ${this.items.map(\n (item) => html`\n <li>\n <a\n href=${item.href}\n part=\"link\"\n aria-current=${isCurrent(item.href, this.current) ? 'page' : nothing}\n @click=${(e: MouseEvent) => announceNavigate(this, e, item)}\n >${iconSvg(item.icon, '20px')}<span>${item.label}</span></a>\n </li>\n `,\n )}\n </ul>\n </nav>\n <div class=\"card footer ${this.footerFilled ? '' : 'empty'}\" part=\"footer\"><slot name=\"footer\" @slotchange=${this.onFooter}></slot></div>\n `;\n }\n}\n\n/**\n * A product's main navigation along the bottom of a phone screen: four or five\n * places, each an icon above a word.\n *\n * It follows the same rules as `impakt-side-nav`: the current place carries\n * `aria-current=\"page\"` and is filled, every item has a word, and\n * `impakt-navigate` lets an app route without a reload. Each item is at least\n * 48px tall, above the 24px floor of 2.5.8, because it is pressed with a thumb.\n *\n * @category action\n * @icon menu\n * @fires {CustomEvent<{ href: string; id: string }>} impakt-navigate - When an item is followed. Cancel it to route in the app instead of the browser.\n */\nexport class ImpaktTabBar extends ImpaktElement {\n static properties = {\n items: { type: Array },\n label: { type: String },\n current: { type: String },\n };\n /** The places, in order. Four or five fit a phone. */\n declare items: ShellNavItem[];\n /** What the navigation is called for a screen reader, such as \"Main\". */\n declare label: string;\n /** The path the person is on, from the app's router. Leave empty to use the address bar. */\n declare current: string;\n\n constructor() {\n super();\n this.items = [];\n this.label = 'Main';\n this.current = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host { display: block; }\n nav { padding: ${space(1.5)}; border-radius: ${t.radiusXl}; background: ${t.text}; box-shadow: ${t.shadowLg}; }\n ul { list-style: none; margin: 0; padding: 0; display: flex; gap: ${space(1)}; }\n li { flex: 1 1 0; min-inline-size: 0; }\n a {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: ${space(1)};\n min-block-size: 50px;\n padding: ${space(1)};\n border-radius: ${t.radiusLg};\n /* The resting items are a blend of the card and text colours that keeps 4.5:1 on the bar. */\n color: color-mix(in srgb, ${t.surfaceCard} 74%, ${t.text});\n font-size: 11px;\n font-weight: ${fontWeight('medium')};\n line-height: 1.25;\n text-decoration: none;\n text-align: center;\n }\n a:hover { color: ${t.surfaceCard}; }\n a[aria-current='page'] { background: color-mix(in srgb, ${t.text}, ${t.surfaceCard} 16%); color: ${t.surfaceCard}; }\n span.word { max-inline-size: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n @media (forced-colors: active) { a[aria-current='page'] { border: 2px solid Highlight; } }\n `,\n ];\n\n render(): TemplateResult {\n return html`\n <nav aria-label=${this.label} part=\"nav\">\n <ul part=\"list\">\n ${this.items.map(\n (item) => html`\n <li>\n <a\n href=${item.href}\n part=\"link\"\n aria-current=${isCurrent(item.href, this.current) ? 'page' : nothing}\n @click=${(e: MouseEvent) => announceNavigate(this, e, item)}\n >${iconSvg(item.icon, '22px')}<span class=\"word\">${item.label}</span></a>\n </li>\n `,\n )}\n </ul>\n </nav>\n `;\n }\n}\n\n/**\n * The frame a signed-in product sits in, on a desktop and on a phone.\n *\n * On a desktop it is a rounded frame on a darker canvas, with the brand and\n * the side navigation on the left, a top bar along the top and the page's\n * content below it. On a phone the side navigation and the top bar step aside:\n * the page's own header sits on a dark band, the content rises over it on a\n * light sheet, and the tab bar floats at the bottom.\n *\n * **It gives the page its landmarks.** The content is the `main` landmark, the\n * top bar is a `header`, and a Skip to content link is the first thing a\n * keyboard reaches. The navigation elements bring their own `nav` landmarks.\n *\n * **Both navigations are in the page; only one is shown.** The side\n * navigation is hidden on a phone and the tab bar on a desktop, with\n * `display: none`, so a screen reader meets the one that is on screen.\n *\n * @category layout\n * @icon layout\n * @slot - The page's content.\n * @slot brand - The product's logo, at the top of the side.\n * @slot nav - The side navigation, an `impakt-side-nav`.\n * @slot workspace - The start of the top bar, such as the workspace's name.\n * @slot search - The middle of the top bar, such as a search field.\n * @slot actions - The end of the top bar: the main action and the account.\n * @slot phone-header - The page's header on a phone, on the dark band above the content.\n * @slot tab-bar - The phone navigation, an `impakt-tab-bar`.\n */\nexport class ImpaktAppShell extends ImpaktElement {\n static properties = {\n skipText: { type: String, attribute: 'skip-text' },\n topBarLabel: { type: String, attribute: 'top-bar-label' },\n };\n /** The words of the link that skips to the content. */\n declare skipText: string;\n /** What the top bar is called for a screen reader. Leave empty when there is only one top bar, as there usually is. */\n declare topBarLabel: string;\n\n constructor() {\n super();\n this.skipText = 'Skip to content';\n this.topBarLabel = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host {\n display: block;\n min-block-size: 100svh;\n background: var(--impakt-shell-canvas, ${t.surfaceInset});\n color: ${t.text};\n /* The text and card colours, kept before the phone header turns them round. */\n --impakt-shell-ink: ${t.text};\n --impakt-shell-paper: ${t.surfaceCard};\n }\n .frame {\n position: relative;\n box-sizing: border-box;\n display: grid;\n grid-template-columns: var(--impakt-shell-side, 190px) minmax(0, 1fr);\n grid-template-rows: auto 1fr;\n grid-template-areas: 'brand top' 'side main';\n gap: ${space(5)};\n min-block-size: calc(100svh - 2 * ${space(5)});\n margin: ${space(5)};\n padding: ${space(5)};\n border-radius: var(--impakt-shell-radius, 36px);\n background: ${token('color.surface.page', '#f2f5f4')};\n }\n .brand { grid-area: brand; display: flex; align-items: center; min-block-size: 52px; }\n .side { grid-area: side; display: flex; flex-direction: column; min-block-size: 0; }\n .side ::slotted(*) { flex: 1; }\n header { grid-area: top; display: flex; align-items: center; gap: ${space(5)}; min-inline-size: 0; }\n .workspace { flex: none; }\n .search { flex: 1 1 auto; display: flex; justify-content: center; min-inline-size: 0; }\n .search ::slotted(*) { inline-size: min(100%, 420px); }\n .actions { flex: none; display: flex; align-items: center; gap: ${space(3)}; }\n main { grid-area: main; min-inline-size: 0; }\n main:focus { outline: none; }\n .phone-header, .tab-bar { display: none; }\n .skip {\n position: absolute;\n inset-inline-start: ${space(2)};\n inset-block-start: ${space(2)};\n z-index: 20;\n padding: ${space(2)} ${space(4)};\n background: ${t.surfaceCard};\n color: ${t.link};\n border-radius: ${t.radius};\n transform: translateY(-200%);\n }\n .skip:not(:focus) { clip-path: inset(50%); }\n .skip:focus { transform: none; }\n\n @media (max-width: ${PHONE}) {\n :host { background: ${t.text}; }\n .frame {\n display: flex;\n flex-direction: column;\n margin: 0;\n padding: 0;\n border-radius: 0;\n min-block-size: 100svh;\n background: transparent;\n }\n .brand, .side, header { display: none; }\n /* The page's header sits on the dark band, so the elements slotted into it\n are given the card colour as their text colour. Custom properties\n inherit through the slot, so an impakt-heading or impakt-text there\n reads light without being told. */\n .phone-header {\n display: block;\n padding: calc(${space(4)} + env(safe-area-inset-top)) ${space(5)} ${space(10)};\n color: var(--impakt-shell-paper);\n --impakt-color-text-default: var(--impakt-shell-paper);\n --impakt-color-text-heading: var(--impakt-shell-paper);\n --impakt-color-text-muted: color-mix(in srgb, var(--impakt-shell-paper) 74%, var(--impakt-shell-ink));\n --impakt-color-link: var(--impakt-shell-paper);\n }\n main {\n position: relative;\n flex: 1;\n margin-block-start: calc(-1 * ${space(6)});\n /* Room for the floating tab bar, so the last of the content can scroll clear of it. */\n padding: ${space(4)} ${space(4)} calc(96px + env(safe-area-inset-bottom));\n border-radius: 28px 28px 0 0;\n background: ${token('color.surface.page', '#f2f5f4')};\n }\n .tab-bar {\n display: block;\n position: fixed;\n z-index: 10;\n inset-inline: ${space(4)};\n inset-block-end: calc(${space(3)} + env(safe-area-inset-bottom));\n }\n }\n `,\n ];\n\n private skip(event: Event): void {\n event.preventDefault();\n const main = this.renderRoot.querySelector('main');\n main?.focus();\n main?.scrollIntoView();\n }\n\n render(): TemplateResult {\n return html`\n <div class=\"frame\" part=\"frame\">\n <a class=\"skip\" href=\"#content\" part=\"skip\" @click=${this.skip}>${this.skipText}</a>\n <div class=\"brand\" part=\"brand\"><slot name=\"brand\"></slot></div>\n <div class=\"side\" part=\"side\"><slot name=\"nav\"></slot></div>\n <header aria-label=${this.topBarLabel || nothing} part=\"top-bar\">\n <div class=\"workspace\"><slot name=\"workspace\"></slot></div>\n <div class=\"search\"><slot name=\"search\"></slot></div>\n <div class=\"actions\"><slot name=\"actions\"></slot></div>\n </header>\n <div class=\"phone-header\" part=\"phone-header\"><slot name=\"phone-header\"></slot></div>\n <main id=\"content\" tabindex=\"-1\" part=\"main\"><slot></slot></main>\n <div class=\"tab-bar\" part=\"tab-bar\"><slot name=\"tab-bar\"></slot></div>\n </div>\n `;\n }\n}\n\ncustomElements.define('impakt-side-nav', ImpaktSideNav);\ncustomElements.define('impakt-tab-bar', ImpaktTabBar);\ncustomElements.define('impakt-app-shell', ImpaktAppShell);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-side-nav': ImpaktSideNav;\n 'impakt-tab-bar': ImpaktTabBar;\n 'impakt-app-shell': ImpaktAppShell;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA,SAAS,MAAM,KAAK,SAAS,iBAAsC;AAiBnE,IAAM,QAAQ,UAAU,OAAO;AAG/B,SAAS,OAAO,MAA6B;AAC3C,MAAI,CAAC,QAAQ,KAAK,WAAW,GAAG,EAAG,QAAO;AAC1C,MAAI;AACF,UAAM,OAAO,OAAO,aAAa,cAAc,sBAAsB,SAAS;AAC9E,WAAO,IAAI,IAAI,MAAM,IAAI,EAAE,SAAS,QAAQ,OAAO,EAAE,KAAK;AAAA,EAC5D,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAUO,SAAS,UAAU,MAAc,SAA0B;AAChE,QAAM,OAAO,OAAO,IAAI;AACxB,MAAI,CAAC,KAAM,QAAO;AAClB,QAAM,OAAO,OAAO,YAAY,OAAO,aAAa,cAAc,KAAK,SAAS,SAAS;AACzF,MAAI,CAAC,KAAM,QAAO;AA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K,OAAoB;AAC/B,UAAM,eAAe;AACrB,UAAM,OAAO,KAAK,WAAW,cAAc,MAAM;AACjD,UAAM,MAAM;AACZ,UAAM,eAAe;AAAA,EACvB;AAAA,EAEA,SAAyB;AACvB,WAAO;AAAA;AAAA,6DAEkD,KAAK,IAAI,IAAI,KAAK,QAAQ;AAAA;AAAA;AAAA,6BAG1D,KAAK,eAAe,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUtD;AACF;AAEA,eAAe,OAAO,mBAAmB,aAAa;AACtD,eAAe,OAAO,kBAAkB,YAAY;AACpD,eAAe,OAAO,oBAAoB,cAAc;","names":[]}
1
+ {"version":3,"sources":["../src/components/shell.ts"],"sourcesContent":["import { html, css, nothing, unsafeCSS, type TemplateResult } from 'lit';\nimport { ImpaktElement } from '../base/ImpaktElement';\nimport { focusRing, targetSize } from '../base/styles';\nimport { fontSize, fontWeight, space, t, token } from '../base/tokens';\nimport { iconSvg } from './icon';\n\n/** One destination in a product's navigation. */\nexport interface ShellNavItem {\n /** A stable name for the destination, sent back with `impakt-navigate`. */\n id?: string;\n label: string;\n href: string;\n /** An icon from `impakt-icon`'s set, such as `grid` or `users`. */\n icon?: string;\n}\n\n/** The phone layout starts below this width. Desktop and phone only; there is no tablet layout. */\nconst PHONE = unsafeCSS('48rem');\n\n/** Normalise a path so `/jobs/` and `/jobs` compare equal. */\nfunction pathOf(href: string): string | null {\n if (!href || href.startsWith('#')) return null;\n try {\n const base = typeof location === 'undefined' ? 'http://localhost/' : location.href;\n return new URL(href, base).pathname.replace(/\\/$/, '') || '/';\n } catch {\n return null;\n }\n}\n\n/**\n * Whether an item is where the person is. `current` is the path the app's\n * router reports. Without it the browser's address is used, which is right\n * for a site and stale in a single-page app that never reloads.\n *\n * An item is current on its own path and on the paths below it, so Jobs stays\n * marked on `/jobs/123`. The root item, `/`, is current only on `/`.\n */\nexport function isCurrent(href: string, current: string): boolean {\n const path = pathOf(href);\n if (!path) return false;\n const here = pathOf(current || (typeof location === 'undefined' ? '' : location.pathname));\n if (!here) return false;\n if (path === here) return true;\n return path !== '/' && here.startsWith(`${path}/`);\n}\n\n/**\n * Tell the app a navigation link was followed, so a single-page app can route\n * without a reload. The event is cancelable: an app that calls\n * `preventDefault()` on it takes over, and the browser does not follow the\n * link. A click with a modifier key, or with any button but the main one, is\n * left to the browser, so \"open in a new tab\" keeps working.\n */\nexport function announceNavigate(host: HTMLElement, event: MouseEvent, item: { href: string; id?: string }): void {\n if (event.defaultPrevented || event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;\n const go = new CustomEvent('impakt-navigate', {\n detail: { href: item.href, id: item.id ?? item.href },\n bubbles: true,\n composed: true,\n cancelable: true,\n });\n if (!host.dispatchEvent(go)) event.preventDefault();\n}\n\n/**\n * A product's main navigation down the side of the screen: an icon and a word\n * for each place, with a footer slot for an action that belongs at the bottom,\n * such as Sign out.\n *\n * **The place you are on is marked in words as well as colour.** Its link\n * carries `aria-current=\"page\"`, which a screen reader announces, and it is\n * filled, so it does not rely on a colour change alone (1.4.1).\n *\n * **Every item has a word.** The icons are decorative and hidden from screen\n * readers, because an icon alone is a guess for anyone who has not learned the\n * product.\n *\n * **It works with an app's router.** Set `current` to the router's path, and\n * cancel `impakt-navigate` to route without a reload.\n *\n * @category action\n * @icon menu\n * @slot footer - An action pinned to the bottom of the side, such as Sign out.\n * @fires {CustomEvent<{ href: string; id: string }>} impakt-navigate - When an item is followed. Cancel it to route in the app instead of the browser.\n */\nexport class ImpaktSideNav extends ImpaktElement {\n static properties = {\n items: { type: Array },\n label: { type: String },\n current: { type: String },\n };\n /** The places, in order. */\n declare items: ShellNavItem[];\n /** What the navigation is called for a screen reader, such as \"Main\". */\n declare label: string;\n /** The path the person is on, from the app's router. Leave empty to use the address bar. */\n declare current: string;\n\n constructor() {\n super();\n this.items = [];\n this.label = 'Main';\n this.current = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host { display: flex; flex-direction: column; gap: ${space(5)}; block-size: 100%; }\n .card { padding: ${space(2)}; border-radius: ${t.radiusXl}; background: ${t.surfaceCard}; }\n ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${space(0.5)}; }\n a {\n ${targetSize}\n display: flex;\n align-items: center;\n gap: ${space(3)};\n min-block-size: 44px;\n padding: 0 ${space(3.5)};\n border-radius: ${t.radiusLg};\n color: ${t.text};\n font-size: ${fontSize('md')};\n font-weight: ${fontWeight('medium')};\n text-decoration: none;\n transition: background-color 120ms ease-in-out, color 120ms ease-in-out;\n }\n a:hover { background: ${t.surfaceInset}; }\n a[aria-current='page'] { background: ${t.text}; color: ${t.surfaceCard}; }\n .icon { flex: none; }\n .footer { margin-block-start: auto; }\n .footer.empty { display: none; }\n @media (prefers-reduced-motion: reduce) { a { transition: none; } }\n @media (forced-colors: active) { a[aria-current='page'] { border: 2px solid Highlight; } }\n `,\n ];\n\n private footerFilled = false;\n\n private onFooter(event: Event): void {\n const slot = event.target as HTMLSlotElement;\n this.footerFilled = slot.assignedNodes({ flatten: true }).some((n) => n.nodeType === Node.ELEMENT_NODE || (n.textContent ?? '').trim() !== '');\n this.requestUpdate();\n }\n\n render(): TemplateResult {\n return html`\n <nav class=\"card\" aria-label=${this.label} part=\"nav\">\n <ul part=\"list\">\n ${this.items.map(\n (item) => html`\n <li>\n <a\n href=${item.href}\n part=\"link\"\n aria-current=${isCurrent(item.href, this.current) ? 'page' : nothing}\n @click=${(e: MouseEvent) => announceNavigate(this, e, item)}\n >${iconSvg(item.icon, '20px')}<span>${item.label}</span></a>\n </li>\n `,\n )}\n </ul>\n </nav>\n <div class=\"card footer ${this.footerFilled ? '' : 'empty'}\" part=\"footer\"><slot name=\"footer\" @slotchange=${this.onFooter}></slot></div>\n `;\n }\n}\n\n/**\n * A product's main navigation along the bottom of a phone screen: four or five\n * places, each an icon above a word.\n *\n * It follows the same rules as `impakt-side-nav`: the current place carries\n * `aria-current=\"page\"` and is filled, every item has a word, and\n * `impakt-navigate` lets an app route without a reload. Each item is at least\n * 48px tall, above the 24px floor of 2.5.8, because it is pressed with a thumb.\n *\n * @category action\n * @icon menu\n * @fires {CustomEvent<{ href: string; id: string }>} impakt-navigate - When an item is followed. Cancel it to route in the app instead of the browser.\n */\nexport class ImpaktTabBar extends ImpaktElement {\n static properties = {\n items: { type: Array },\n label: { type: String },\n current: { type: String },\n };\n /** The places, in order. Four or five fit a phone. */\n declare items: ShellNavItem[];\n /** What the navigation is called for a screen reader, such as \"Main\". */\n declare label: string;\n /** The path the person is on, from the app's router. Leave empty to use the address bar. */\n declare current: string;\n\n constructor() {\n super();\n this.items = [];\n this.label = 'Main';\n this.current = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host { display: block; }\n nav { padding: ${space(1.5)}; border-radius: ${t.radiusXl}; background: ${t.text}; box-shadow: ${t.shadowLg}; }\n ul { list-style: none; margin: 0; padding: 0; display: flex; gap: ${space(1)}; }\n li { flex: 1 1 0; min-inline-size: 0; }\n a {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: ${space(1)};\n min-block-size: 50px;\n padding: ${space(1)};\n border-radius: ${t.radiusLg};\n /* The resting items are a blend of the card and text colours that keeps 4.5:1 on the bar. */\n color: color-mix(in srgb, ${t.surfaceCard} 74%, ${t.text});\n font-size: 11px;\n font-weight: ${fontWeight('medium')};\n line-height: 1.25;\n text-decoration: none;\n text-align: center;\n }\n a:hover { color: ${t.surfaceCard}; }\n a[aria-current='page'] { background: color-mix(in srgb, ${t.text}, ${t.surfaceCard} 16%); color: ${t.surfaceCard}; }\n span.word { max-inline-size: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n @media (forced-colors: active) { a[aria-current='page'] { border: 2px solid Highlight; } }\n `,\n ];\n\n render(): TemplateResult {\n return html`\n <nav aria-label=${this.label} part=\"nav\">\n <ul part=\"list\">\n ${this.items.map(\n (item) => html`\n <li>\n <a\n href=${item.href}\n part=\"link\"\n aria-current=${isCurrent(item.href, this.current) ? 'page' : nothing}\n @click=${(e: MouseEvent) => announceNavigate(this, e, item)}\n >${iconSvg(item.icon, '22px')}<span class=\"word\">${item.label}</span></a>\n </li>\n `,\n )}\n </ul>\n </nav>\n `;\n }\n}\n\n/**\n * The frame a signed-in product sits in, on a desktop and on a phone.\n *\n * On a desktop it is a rounded frame on a darker canvas, with the brand and\n * the side navigation on the left, a top bar along the top and the page's\n * content below it. On a phone the side navigation and the top bar step aside:\n * the page's own header sits on a dark band, the content rises over it on a\n * light sheet, and the tab bar floats at the bottom.\n *\n * **It gives the page its landmarks.** The content is the `main` landmark, the\n * top bar is a `header`, and a Skip to content link is the first thing a\n * keyboard reaches. The navigation elements bring their own `nav` landmarks.\n *\n * **Both navigations are in the page; only one is shown.** The side\n * navigation is hidden on a phone and the tab bar on a desktop, with\n * `display: none`, so a screen reader meets the one that is on screen.\n *\n * @category layout\n * @icon layout\n * @slot - The page's content.\n * @slot brand - The product's logo, at the top of the side.\n * @slot nav - The side navigation, an `impakt-side-nav`.\n * @slot workspace - The start of the top bar, such as the workspace's name.\n * @slot search - The middle of the top bar, such as a search field.\n * @slot actions - The end of the top bar: the main action and the account.\n * @slot phone-header - The page's header on a phone, on the dark band above the content.\n * @slot tab-bar - The phone navigation, an `impakt-tab-bar`.\n */\nexport class ImpaktAppShell extends ImpaktElement {\n static properties = {\n skipText: { type: String, attribute: 'skip-text' },\n topBarLabel: { type: String, attribute: 'top-bar-label' },\n };\n /** The words of the link that skips to the content. */\n declare skipText: string;\n /** What the top bar is called for a screen reader. Leave empty when there is only one top bar, as there usually is. */\n declare topBarLabel: string;\n\n constructor() {\n super();\n this.skipText = 'Skip to content';\n this.topBarLabel = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host {\n display: block;\n min-block-size: 100svh;\n background: var(--impakt-shell-canvas, ${t.surfaceInset});\n color: ${t.text};\n /* The text and card colours, kept before the phone header turns them round. */\n --impakt-shell-ink: ${t.text};\n --impakt-shell-paper: ${t.surfaceCard};\n }\n .frame {\n position: relative;\n box-sizing: border-box;\n display: grid;\n grid-template-columns: var(--impakt-shell-side, 190px) minmax(0, 1fr);\n grid-template-rows: auto 1fr;\n grid-template-areas: 'brand top' 'side main';\n gap: ${space(5)};\n min-block-size: calc(100svh - 2 * ${space(5)});\n margin: ${space(5)};\n padding: ${space(5)};\n border-radius: var(--impakt-shell-radius, 36px);\n background: ${token('color.surface.page', '#f2f5f4')};\n }\n .brand { grid-area: brand; display: flex; align-items: center; min-block-size: 52px; }\n .side { grid-area: side; display: flex; flex-direction: column; min-block-size: 0; }\n .side ::slotted(*) { flex: 1; }\n header { grid-area: top; display: flex; align-items: center; gap: ${space(5)}; min-inline-size: 0; }\n .workspace { flex: none; }\n .search { flex: 1 1 auto; display: flex; justify-content: center; min-inline-size: 0; }\n .search ::slotted(*) { inline-size: min(100%, 420px); }\n .actions { flex: none; display: flex; align-items: center; gap: ${space(3)}; }\n main { grid-area: main; min-inline-size: 0; }\n main:focus { outline: none; }\n .phone-header, .tab-bar { display: none; }\n .skip {\n position: absolute;\n inset-inline-start: ${space(2)};\n inset-block-start: ${space(2)};\n z-index: 20;\n padding: ${space(2)} ${space(4)};\n background: ${t.surfaceCard};\n color: ${t.link};\n border-radius: ${t.radius};\n transform: translateY(-200%);\n }\n .skip:not(:focus) { clip-path: inset(50%); }\n .skip:focus { transform: none; }\n\n @media (max-width: ${PHONE}) {\n :host { background: ${t.text}; }\n .frame {\n display: flex;\n flex-direction: column;\n margin: 0;\n padding: 0;\n border-radius: 0;\n min-block-size: 100svh;\n background: transparent;\n }\n .brand, .side, header { display: none; }\n /* The page's header sits on the dark band, so the elements slotted into it\n are given the card colour as their text colour. Custom properties\n inherit through the slot, so an impakt-heading or impakt-text there\n reads light without being told. */\n .phone-header {\n display: block;\n padding: calc(${space(4)} + env(safe-area-inset-top)) ${space(5)} ${space(10)};\n color: var(--impakt-shell-paper);\n --impakt-color-text-default: var(--impakt-shell-paper);\n --impakt-color-text-heading: var(--impakt-shell-paper);\n --impakt-color-text-muted: color-mix(in srgb, var(--impakt-shell-paper) 74%, var(--impakt-shell-ink));\n --impakt-color-link: var(--impakt-shell-paper);\n }\n main {\n position: relative;\n flex: 1;\n margin-block-start: calc(-1 * ${space(6)});\n /* Room for the floating tab bar, so the last of the content can scroll clear of it. */\n padding: ${space(4)} ${space(4)} calc(96px + env(safe-area-inset-bottom));\n border-radius: 28px 28px 0 0;\n background: ${token('color.surface.page', '#f2f5f4')};\n }\n .tab-bar {\n display: block;\n position: fixed;\n z-index: 10;\n inset-inline: ${space(4)};\n inset-block-end: calc(${space(3)} + env(safe-area-inset-bottom));\n }\n }\n `,\n ];\n\n private skip(event: Event): void {\n event.preventDefault();\n const main = this.renderRoot.querySelector('main');\n main?.focus();\n main?.scrollIntoView();\n }\n\n render(): TemplateResult {\n return html`\n <div class=\"frame\" part=\"frame\">\n <a class=\"skip\" href=\"#content\" part=\"skip\" @click=${this.skip}>${this.skipText}</a>\n <div class=\"brand\" part=\"brand\"><slot name=\"brand\"></slot></div>\n <div class=\"side\" part=\"side\"><slot name=\"nav\"></slot></div>\n <header aria-label=${this.topBarLabel || nothing} part=\"top-bar\">\n <div class=\"workspace\"><slot name=\"workspace\"></slot></div>\n <div class=\"search\"><slot name=\"search\"></slot></div>\n <div class=\"actions\"><slot name=\"actions\"></slot></div>\n </header>\n <div class=\"phone-header\" part=\"phone-header\"><slot name=\"phone-header\"></slot></div>\n <main id=\"content\" tabindex=\"-1\" part=\"main\"><slot></slot></main>\n <div class=\"tab-bar\" part=\"tab-bar\"><slot name=\"tab-bar\"></slot></div>\n </div>\n `;\n }\n}\n\ncustomElements.define('impakt-side-nav', ImpaktSideNav);\ncustomElements.define('impakt-tab-bar', ImpaktTabBar);\ncustomElements.define('impakt-app-shell', ImpaktAppShell);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-side-nav': ImpaktSideNav;\n 'impakt-tab-bar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