@atomic-ui/ui 0.12.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/custom-elements.json +39 -1
  2. package/dist/base/FieldElement.d.ts +20 -2
  3. package/dist/{chunk-2WHOBIOY.js → chunk-2BGOBD6Y.js} +2 -2
  4. package/dist/{chunk-FLAUZU7Y.js → chunk-2RC3QKYA.js} +84 -27
  5. package/dist/chunk-2RC3QKYA.js.map +1 -0
  6. package/dist/{chunk-UYTIJCCW.js → chunk-B2GWXXIW.js} +2 -2
  7. package/dist/{chunk-CFCFKLTN.js → chunk-EA3M6KPB.js} +11 -1
  8. package/dist/chunk-EA3M6KPB.js.map +1 -0
  9. package/dist/{chunk-R6YMSJR7.js → chunk-EFP7PJ6C.js} +68 -25
  10. package/dist/chunk-EFP7PJ6C.js.map +1 -0
  11. package/dist/{chunk-5IGBH4GL.js → chunk-EUOBFMWC.js} +2 -2
  12. package/dist/{chunk-FZWUQC42.js → chunk-F2MFV7RM.js} +2 -2
  13. package/dist/{chunk-3GPGDERO.js → chunk-G7CVRNY5.js} +2 -2
  14. package/dist/{chunk-2TNF7O43.js → chunk-LSEK5MEZ.js} +2 -2
  15. package/dist/{chunk-DXLEYNID.js → chunk-LVBYNQ45.js} +5 -3
  16. package/dist/chunk-LVBYNQ45.js.map +1 -0
  17. package/dist/{chunk-BAITBJUC.js → chunk-MGDX7Z74.js} +50 -18
  18. package/dist/chunk-MGDX7Z74.js.map +1 -0
  19. package/dist/{chunk-5HCWL2YD.js → chunk-P5FAKEFK.js} +2 -2
  20. package/dist/{chunk-HSXLSJVG.js → chunk-PII4SJL5.js} +32 -16
  21. package/dist/chunk-PII4SJL5.js.map +1 -0
  22. package/dist/{chunk-ALFE35FS.js → chunk-QJBRENLI.js} +3 -3
  23. package/dist/{chunk-ALFE35FS.js.map → chunk-QJBRENLI.js.map} +1 -1
  24. package/dist/{chunk-LXVPWTSY.js → chunk-RCZPRFHQ.js} +37 -21
  25. package/dist/chunk-RCZPRFHQ.js.map +1 -0
  26. package/dist/{chunk-3KAFK24X.js → chunk-RNFGIXJ7.js} +2 -2
  27. package/dist/{chunk-SOYKSPPX.js → chunk-SY7NTW3U.js} +2 -2
  28. package/dist/{chunk-P3BPW446.js → chunk-UBNCJROR.js} +3 -3
  29. package/dist/{chunk-P3BPW446.js.map → chunk-UBNCJROR.js.map} +1 -1
  30. package/dist/{chunk-F3NHPQU5.js → chunk-WEX5RKVC.js} +37 -7
  31. package/dist/chunk-WEX5RKVC.js.map +1 -0
  32. package/dist/{chunk-CQT3VPYK.js → chunk-WT7MHYJR.js} +2 -2
  33. package/dist/components/accordion.js +1 -1
  34. package/dist/components/app-bar.js +3 -3
  35. package/dist/components/app-ui.js +2 -2
  36. package/dist/components/button.js +1 -1
  37. package/dist/components/checkbox-group.js +2 -2
  38. package/dist/components/checkbox.js +2 -2
  39. package/dist/components/chip-group.js +2 -2
  40. package/dist/components/date-input.js +2 -2
  41. package/dist/components/dialog.js +1 -1
  42. package/dist/components/journey.js +2 -2
  43. package/dist/components/layout.js +1 -1
  44. package/dist/components/navigation.js +1 -1
  45. package/dist/components/page.js +1 -1
  46. package/dist/components/radio-group.js +2 -2
  47. package/dist/components/rows.js +1 -1
  48. package/dist/components/select.d.ts +6 -0
  49. package/dist/components/select.js +2 -2
  50. package/dist/components/switch.js +2 -2
  51. package/dist/components/text-input.js +2 -2
  52. package/dist/components/textarea.js +2 -2
  53. package/dist/index.js +20 -20
  54. package/dist/server.d.ts +42 -0
  55. package/dist/server.js +26 -0
  56. package/dist/server.js.map +1 -0
  57. package/dist/standalone/atomic-ui.js +880 -775
  58. package/dist/standalone/atomic-ui.js.map +3 -3
  59. package/package.json +6 -2
  60. package/dist/chunk-BAITBJUC.js.map +0 -1
  61. package/dist/chunk-CFCFKLTN.js.map +0 -1
  62. package/dist/chunk-DXLEYNID.js.map +0 -1
  63. package/dist/chunk-F3NHPQU5.js.map +0 -1
  64. package/dist/chunk-FLAUZU7Y.js.map +0 -1
  65. package/dist/chunk-HSXLSJVG.js.map +0 -1
  66. package/dist/chunk-LXVPWTSY.js.map +0 -1
  67. package/dist/chunk-R6YMSJR7.js.map +0 -1
  68. /package/dist/{chunk-2WHOBIOY.js.map → chunk-2BGOBD6Y.js.map} +0 -0
  69. /package/dist/{chunk-UYTIJCCW.js.map → chunk-B2GWXXIW.js.map} +0 -0
  70. /package/dist/{chunk-5IGBH4GL.js.map → chunk-EUOBFMWC.js.map} +0 -0
  71. /package/dist/{chunk-FZWUQC42.js.map → chunk-F2MFV7RM.js.map} +0 -0
  72. /package/dist/{chunk-3GPGDERO.js.map → chunk-G7CVRNY5.js.map} +0 -0
  73. /package/dist/{chunk-2TNF7O43.js.map → chunk-LSEK5MEZ.js.map} +0 -0
  74. /package/dist/{chunk-5HCWL2YD.js.map → chunk-P5FAKEFK.js.map} +0 -0
  75. /package/dist/{chunk-3KAFK24X.js.map → chunk-RNFGIXJ7.js.map} +0 -0
  76. /package/dist/{chunk-SOYKSPPX.js.map → chunk-SY7NTW3U.js.map} +0 -0
  77. /package/dist/{chunk-CQT3VPYK.js.map → chunk-WT7MHYJR.js.map} +0 -0
@@ -16222,6 +16222,18 @@
16222
16222
  "attribute": "width",
16223
16223
  "reflects": true
16224
16224
  },
16225
+ {
16226
+ "kind": "field",
16227
+ "name": "size",
16228
+ "privacy": "public",
16229
+ "type": {
16230
+ "text": "'md' | 'sm'"
16231
+ },
16232
+ "description": "`sm` is a compact 32px box for a filter in a toolbar, such as \"Page: All pages\" above a list. It still meets the 24px target size.",
16233
+ "default": "'md'",
16234
+ "attribute": "size",
16235
+ "reflects": true
16236
+ },
16225
16237
  {
16226
16238
  "kind": "method",
16227
16239
  "name": "renderControl",
@@ -16575,6 +16587,15 @@
16575
16587
  "default": "false",
16576
16588
  "fieldName": "hideLabel"
16577
16589
  },
16590
+ {
16591
+ "name": "size",
16592
+ "type": {
16593
+ "text": "'md' | 'sm'"
16594
+ },
16595
+ "description": "`sm` is a compact 32px box for a filter in a toolbar, such as \"Page: All pages\" above a list. It still meets the 24px target size.",
16596
+ "default": "'md'",
16597
+ "fieldName": "size"
16598
+ },
16578
16599
  {
16579
16600
  "name": "label",
16580
16601
  "type": {
@@ -20986,6 +21007,15 @@
20986
21007
  "default": "css` :host { --impakt-field-width: 100%; } :host([width='xs']) { --impakt-field-width: 8ch; } :host([width='sm']) { --impakt-field-width: 14ch; } :host([width='md']) { --impakt-field-width: 24ch; } :host([width='lg']) { --impakt-field-width: 40ch; } `",
20987
21008
  "description": "How wide a single-line control is, from what it holds: a postcode is short,\nan email address is long. A width that matches the answer is a hint about\nwhat to type (1.3.5 is about the purpose, this is about the size). Applied by\nthe controls that take a `width`, through `--impakt-field-width`."
20988
21009
  },
21010
+ {
21011
+ "kind": "variable",
21012
+ "name": "F",
21013
+ "type": {
21014
+ "text": "object"
21015
+ },
21016
+ "default": "{ height: token('field.height', '44px'), paddingBlock: token('field.padding-block', '10px'), paddingInline: token('field.padding-inline', '12px'), lineHeight: token('field.line-height', 'normal'), radius: token('field.radius', '8px'), edge: token('field.edge', '0%'), focusEdge: token('field.focus-edge', '0%'), focusHalo: token('field.focus-halo', '6px'), }",
21017
+ "description": "The field's shape, from the brand (`field.*` in `@atomic-ui/design-tokens`). Each fallback is\nthe shape every brand derives: a 44px box with the grey border that darkens when pointed at,\nand the brand's halo round the focus ring. The Impakt theme sets the G2 Noire shape over it:\na 50px box with an ink edge and the plain focus ring (frames 33:492 and 36:398).\n\nAn edge is how much of the text colour it takes, mixed here rather than on the root, so a\nband that repaints the text colour repaints the edge with it."
21018
+ },
20989
21019
  {
20990
21020
  "kind": "function",
20991
21021
  "name": "fieldControl",
@@ -21002,7 +21032,7 @@
21002
21032
  }
21003
21033
  }
21004
21034
  ],
21005
- "description": "The box a single control is drawn in, shared by the text input, the select and\nthe textarea so they match: a 1px ink border, no shadow, and on focus the\nlocked two-band ring rather than a wide halo (G2 Noire, frames 33:492 and 36:398).\nA product can still set `--impakt-shadow-field` or `--impakt-color-field-border`."
21035
+ "description": "The box a single control is drawn in, shared by the text input, the select and\nthe textarea so they match, in the brand's field shape (`F` above).\nA product can still set `--impakt-shadow-field` or `--impakt-color-field-border`."
21006
21036
  },
21007
21037
  {
21008
21038
  "kind": "class",
@@ -21354,6 +21384,14 @@
21354
21384
  "module": "src/base/FieldElement.ts"
21355
21385
  }
21356
21386
  },
21387
+ {
21388
+ "kind": "js",
21389
+ "name": "F",
21390
+ "declaration": {
21391
+ "name": "F",
21392
+ "module": "src/base/FieldElement.ts"
21393
+ }
21394
+ },
21357
21395
  {
21358
21396
  "kind": "js",
21359
21397
  "name": "fieldControl",
@@ -22,10 +22,28 @@ import { ImpaktElement } from './ImpaktElement';
22
22
  * the controls that take a `width`, through `--impakt-field-width`.
23
23
  */
24
24
  export declare const fieldWidths: CSSResult;
25
+ /**
26
+ * The field's shape, from the brand (`field.*` in `@atomic-ui/design-tokens`). Each fallback is
27
+ * the shape every brand derives: a 44px box with the grey border that darkens when pointed at,
28
+ * and the brand's halo round the focus ring. The Impakt theme sets the G2 Noire shape over it:
29
+ * a 50px box with an ink edge and the plain focus ring (frames 33:492 and 36:398).
30
+ *
31
+ * An edge is how much of the text colour it takes, mixed here rather than on the root, so a
32
+ * band that repaints the text colour repaints the edge with it.
33
+ */
34
+ export declare const F: {
35
+ height: CSSResult;
36
+ paddingBlock: CSSResult;
37
+ paddingInline: CSSResult;
38
+ lineHeight: CSSResult;
39
+ radius: CSSResult;
40
+ edge: CSSResult;
41
+ focusEdge: CSSResult;
42
+ focusHalo: CSSResult;
43
+ };
25
44
  /**
26
45
  * The box a single control is drawn in, shared by the text input, the select and
27
- * the textarea so they match: a 1px ink border, no shadow, and on focus the
28
- * locked two-band ring rather than a wide halo (G2 Noire, frames 33:492 and 36:398).
46
+ * the textarea so they match, in the brand's field shape (`F` above).
29
47
  * A product can still set `--impakt-shadow-field` or `--impakt-color-field-border`.
30
48
  */
31
49
  export declare const fieldControl: (selector: string) => CSSResult;
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  FieldElement,
6
6
  fieldWidths
7
- } from "./chunk-HSXLSJVG.js";
7
+ } from "./chunk-PII4SJL5.js";
8
8
  import {
9
9
  ImpaktElement,
10
10
  focusRing,
@@ -557,4 +557,4 @@ export {
557
557
  ImpaktRangeInput,
558
558
  ImpaktTaskList
559
559
  };
560
- //# sourceMappingURL=chunk-2WHOBIOY.js.map
560
+ //# sourceMappingURL=chunk-2BGOBD6Y.js.map
@@ -14,11 +14,31 @@ import {
14
14
  fontSize,
15
15
  fontWeight,
16
16
  space,
17
- t
17
+ t,
18
+ token
18
19
  } from "./chunk-JTCTQBAX.js";
19
20
 
20
21
  // packages/ui/src/components/accordion.ts
21
22
  import { html, css, nothing, unsafeCSS } from "lit";
23
+ var A = {
24
+ edge: token("accordion.edge", "15%"),
25
+ topEdgeWidth: token("accordion.top-edge-width", "0px"),
26
+ questionSize: token("accordion.question.size", "1rem"),
27
+ questionLineHeight: token("accordion.question.line-height", "1.5"),
28
+ questionTracking: token("accordion.question.tracking", "0em"),
29
+ questionPadding: token("accordion.question.padding", "12px"),
30
+ hoverInk: token("accordion.hover-ink", "0%"),
31
+ hoverLine: token("accordion.hover-line", "none"),
32
+ plus: token("accordion.plus", "none"),
33
+ chevron: token("accordion.chevron", "inline-block"),
34
+ markerSize: token("accordion.marker.size", "18px"),
35
+ markerStroke: token("accordion.marker.stroke", "2px"),
36
+ answerSpace: token("accordion.answer.space", "16px"),
37
+ answerPull: token("accordion.answer.pull", "0px"),
38
+ answerInk: token("accordion.answer.ink", "100%"),
39
+ answerLineHeight: token("accordion.answer.line-height", "1.5"),
40
+ answerWidth: token("accordion.answer.width", "none")
41
+ };
22
42
  var LINE_SOFT = unsafeCSS("var(--impakt-color-line-soft, #dcdcd8)");
23
43
  var ImpaktAccordion = class extends ImpaktElement {
24
44
  static {
@@ -55,13 +75,17 @@ var ImpaktAccordion = class extends ImpaktElement {
55
75
  css`
56
76
  :host {
57
77
  display: block;
58
- border-block-start: ${t.borderThin} solid ${t.text};
78
+ border-block-start: ${A.topEdgeWidth} solid ${t.text};
59
79
  }
80
+ /* Rows with a faint rule, or under Noire an ink one (accordion.edge), mixed here so a band that repaints the text repaints it. */
60
81
  .item {
61
- border-block-end: ${t.borderThin} solid ${t.text};
82
+ border-block-end: ${t.borderThin} solid color-mix(in srgb, ${t.text} ${A.edge}, transparent);
62
83
  }
63
84
  /* The heading row. The button is stretched over it, so the whole row opens the panel, the status included. */
64
85
  .head {
86
+ /* The question's padding and size, read by the button and by the marker beside it, so the marker sits on the question's first line. */
87
+ --q-pad: ${A.questionPadding};
88
+ --q-size: ${A.questionSize};
65
89
  position: relative;
66
90
  display: flex;
67
91
  align-items: center;
@@ -80,14 +104,14 @@ var ImpaktAccordion = class extends ImpaktElement {
80
104
  column-gap: ${space(4)};
81
105
  row-gap: ${space(1)};
82
106
  inline-size: 100%;
83
- padding: ${space(8)} 0;
107
+ padding: var(--q-pad) 0;
84
108
  background: none;
85
109
  border: 0;
86
110
  font: inherit;
87
- /* G2 heading S: 24/1.15, -2.5%, semibold. */
88
- font-size: var(--impakt-type-heading-s-size, 1.5rem);
89
- line-height: 1.15;
90
- letter-spacing: -0.025em;
111
+ /* The question in body type, or under Noire (G2) heading S: 24/1.15, -2.5%, semibold. */
112
+ font-size: var(--q-size);
113
+ line-height: ${A.questionLineHeight};
114
+ letter-spacing: ${A.questionTracking};
91
115
  font-weight: ${fontWeight("semibold")};
92
116
  color: ${t.text};
93
117
  text-align: start;
@@ -104,8 +128,11 @@ var ImpaktAccordion = class extends ImpaktElement {
104
128
  button:focus-visible::after {
105
129
  box-shadow: ${t.focusShadow};
106
130
  }
131
+ button:hover {
132
+ color: color-mix(in srgb, ${t.text} ${A.hoverInk}, ${t.link});
133
+ }
107
134
  button:hover .q {
108
- text-decoration: underline;
135
+ text-decoration-line: ${A.hoverLine};
109
136
  text-decoration-thickness: 1px;
110
137
  text-underline-offset: 0.15em;
111
138
  }
@@ -130,11 +157,18 @@ var ImpaktAccordion = class extends ImpaktElement {
130
157
  .marker {
131
158
  position: relative;
132
159
  flex: none;
133
- inline-size: 18px;
134
- block-size: 18px;
135
- /* Centred on the question's first line, not sat on its baseline. */
160
+ inline-size: ${A.markerSize};
161
+ block-size: ${A.markerSize};
162
+ /* Centred on the question's first line (#51): below the button's padding, in the middle of the question's line box. */
163
+ font-size: var(--q-size);
164
+ line-height: ${A.questionLineHeight};
136
165
  align-self: flex-start;
137
- margin-block-start: calc((1lh - 18px) / 2);
166
+ margin-block-start: calc(var(--q-pad) + (1lh - ${A.markerSize}) / 2);
167
+ }
168
+ /* In the issues look the marker is inside the button, on the button's own line. */
169
+ :host([look='issues']) .marker {
170
+ align-self: center;
171
+ margin-block-start: 0;
138
172
  }
139
173
  .marker::before,
140
174
  .marker::after {
@@ -144,18 +178,41 @@ var ImpaktAccordion = class extends ImpaktElement {
144
178
  }
145
179
  .marker::before {
146
180
  inset-inline: 0;
147
- inset-block-start: calc(50% - 1px);
148
- block-size: 2px;
181
+ inset-block-start: calc(50% - ${A.markerStroke} / 2);
182
+ block-size: ${A.markerStroke};
149
183
  }
150
184
  .marker::after {
151
185
  inset-block: 0;
152
- inset-inline-start: calc(50% - 1px);
153
- inline-size: 2px;
186
+ inset-inline-start: calc(50% - ${A.markerStroke} / 2);
187
+ inline-size: ${A.markerStroke};
154
188
  transition: transform 120ms ease-in-out;
155
189
  }
156
190
  .item.open .marker::after {
157
191
  transform: scaleY(0);
158
192
  }
193
+ /* The brand's marker: a "+" (accordion.plus) or a chevron that turns to point down when open (accordion.chevron). */
194
+ .marker::before,
195
+ .marker::after {
196
+ display: ${A.plus};
197
+ }
198
+ .chev {
199
+ display: ${A.chevron};
200
+ position: absolute;
201
+ inset: 0;
202
+ line-height: 18px;
203
+ text-align: center;
204
+ transition: transform 120ms ease-in-out;
205
+ }
206
+ .item.open .chev {
207
+ transform: rotate(90deg);
208
+ }
209
+ :host([look='issues']) .marker::before,
210
+ :host([look='issues']) .marker::after {
211
+ display: block;
212
+ }
213
+ :host([look='issues']) .chev {
214
+ display: none;
215
+ }
159
216
  @media (forced-colors: active) {
160
217
  .marker::before,
161
218
  .marker::after {
@@ -171,12 +228,12 @@ var ImpaktAccordion = class extends ImpaktElement {
171
228
  display: none;
172
229
  }
173
230
  .panel {
174
- max-inline-size: 48rem;
175
- margin-block-start: calc(-1 * ${space(4)});
176
- padding-block-end: ${space(8)};
231
+ max-inline-size: ${A.answerWidth};
232
+ margin-block-start: ${A.answerPull};
233
+ padding-block-end: ${A.answerSpace};
177
234
  font-size: ${fontSize("md")};
178
- line-height: 1.6;
179
- color: ${t.textMuted};
235
+ line-height: ${A.answerLineHeight};
236
+ color: color-mix(in srgb, ${t.text} ${A.answerInk}, ${t.textMuted});
180
237
  }
181
238
  /*
182
239
  * Issues (frames 36:716, 36:430): rows divided by soft rules, each a code, a small "+" and the finding in
@@ -268,9 +325,9 @@ var ImpaktAccordion = class extends ImpaktElement {
268
325
  border-block-end: ${t.borderThin} solid ${LINE_SOFT};
269
326
  }
270
327
  @media (max-width: 40rem) {
271
- button {
272
- padding-block: ${space(6)};
273
- font-size: 1.25rem;
328
+ .head {
329
+ --q-pad: min(${A.questionPadding}, ${space(6)});
330
+ --q-size: min(${A.questionSize}, 1.25rem);
274
331
  }
275
332
  :host([look='issues']) button {
276
333
  padding-block: ${space(4)};
@@ -319,7 +376,7 @@ var ImpaktAccordion = class extends ImpaktElement {
319
376
  ${item.tags?.length ? html`<span class="pills" part="pills">
320
377
  ${statusPill(item.status, item.statusTone)}${item.tags.map((tag) => statusPill(tag.label, tag.tone ?? "neutral", "tag"))}
321
378
  </span>` : statusPill(item.status, item.statusTone)}
322
- ${issues ? nothing : html`<span class="marker" aria-hidden="true"></span>`}
379
+ ${issues ? nothing : html`<span class="marker" aria-hidden="true"><span class="chev">›</span></span>`}
323
380
  </div>
324
381
  <div
325
382
  id=${panelId}
@@ -342,4 +399,4 @@ customElements.define("impakt-accordion", ImpaktAccordion);
342
399
  export {
343
400
  ImpaktAccordion
344
401
  };
345
- //# sourceMappingURL=chunk-FLAUZU7Y.js.map
402
+ //# sourceMappingURL=chunk-2RC3QKYA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/accordion.ts"],"sourcesContent":["import { html, css, nothing, unsafeCSS, type TemplateResult } from 'lit';\nimport { onServer } from '../base/server';\nimport { ImpaktElement } from '../base/ImpaktElement';\nimport { focusRing, targetSize } from '../base/styles';\nimport { fontSize, fontWeight, space, t, token } from '../base/tokens';\nimport { statusPill, statusPillStyles, type StatusTone } from './status-pill-style';\n\n/**\n * The accordion's shape, from the brand (`accordion.*` in `@atomic-ui/design-tokens`). Each\n * fallback is the accordion every brand derives: rows with a faint rule, the question in body\n * type and a chevron that turns. The Impakt theme sets the G2 rows over it: ink rules, the\n * question in heading S, a \"+\" that turns to \"−\", and the answer in muted text.\n */\nconst A = {\n edge: token('accordion.edge', '15%'),\n topEdgeWidth: token('accordion.top-edge-width', '0px'),\n questionSize: token('accordion.question.size', '1rem'),\n questionLineHeight: token('accordion.question.line-height', '1.5'),\n questionTracking: token('accordion.question.tracking', '0em'),\n questionPadding: token('accordion.question.padding', '12px'),\n hoverInk: token('accordion.hover-ink', '0%'),\n hoverLine: token('accordion.hover-line', 'none'),\n plus: token('accordion.plus', 'none'),\n chevron: token('accordion.chevron', 'inline-block'),\n markerSize: token('accordion.marker.size', '18px'),\n markerStroke: token('accordion.marker.stroke', '2px'),\n answerSpace: token('accordion.answer.space', '16px'),\n answerPull: token('accordion.answer.pull', '0px'),\n answerInk: token('accordion.answer.ink', '100%'),\n answerLineHeight: token('accordion.answer.line-height', '1.5'),\n answerWidth: token('accordion.answer.width', 'none'),\n};\n\n/** The G2 soft rule between findings, until the theme carries it. */\nconst LINE_SOFT = unsafeCSS('var(--impakt-color-line-soft, #dcdcd8)');\n\nexport interface AccordionItem {\n id: string;\n heading: string;\n body: string;\n /** A short code before the heading, in the code face, such as \"01\" or \"WCAG 1.4.3\". It is part of the button's name. */\n meta?: string;\n /** A status after the heading, drawn as a pill, such as \"Fixed\". It is outside the button, so its name stays the question. */\n status?: string;\n /** The status's tone. */\n statusTone?: StatusTone;\n /** More pills after the status, such as \"Found by the model\" or \"WCAG 1.1.1\". Each one is words, so none rests on its dot. */\n tags?: Array<{ label: string; tone?: StatusTone }>;\n}\n\n/**\n * Disclosure sections — frequently asked questions, \"what does this mean?\".\n *\n * **Each header is a button inside a heading.** The heading is what lets a\n * screen-reader user jump between sections without tabbing through every\n * paragraph; the button is what makes the section openable. One without the\n * other is a common half-implementation: all-headings cannot be operated,\n * all-buttons cannot be navigated.\n *\n * `headingLevel` is a property because the right level depends on what is\n * above the accordion on the page, and guessing produces exactly the skipped\n * levels that 1.3.1 is about.\n *\n * **Panels are hidden, not unmounted.** `hidden` keeps the content in the\n * accessibility tree's structure and lets in-page search find it when opened,\n * and it means `aria-controls` always points at an element that exists.\n *\n * **A panel can hold more than words.** `body` is plain text, which is what a\n * composition can author safely. Content rendered elsewhere, such as an FAQ\n * answer with links and a list, is slotted instead: a child with\n * `slot=\"panel-<item id>\"` replaces that item's body. The slot sits inside the\n * panel, so the region, its label and its `hidden` state are unchanged, and a\n * panel with nothing slotted still shows its body.\n *\n * **Without script every panel is open.** A page built to finished HTML may load\n * no script at all, and a closed panel there could never be opened. So an\n * accordion drawn on the server has every panel open and its markers hidden: the\n * questions and answers read as a plain list. When the script loads it closes\n * the panels that `open` does not name, and the buttons work.\n *\n * @category content\n * @icon accordion\n */\nexport class ImpaktAccordion extends ImpaktElement {\n static properties = {\n items: { type: Array },\n headingLevel: { type: Number, attribute: 'heading-level' },\n open: { type: Array },\n multiple: { type: Boolean },\n look: { type: String, reflect: true },\n enhanced: { state: true },\n };\n\n declare items: AccordionItem[];\n declare headingLevel: number;\n /** Ids currently expanded. */\n declare open: string[];\n /** When false, opening one closes the others. */\n declare multiple: boolean;\n /**\n * `plain` is the site's questions: a \"+\" at the end that turns to \"−\" when\n * open. `issues` is a list of findings in a tool: the \"+\" at the start and an\n * open panel drawn as an inset soft panel with an ink border.\n */\n declare look: 'plain' | 'issues';\n /** Whether the script is running here, so the panels can be closed and opened. */\n declare private enhanced: boolean;\n\n constructor() {\n super();\n this.items = [];\n this.headingLevel = 3;\n this.open = [];\n this.multiple = true;\n this.look = 'plain';\n this.enhanced = false;\n }\n\n connectedCallback(): void {\n // Drawn here from nothing, the panels start as `open` says. Drawn on the server first, the\n // first draw here must match what the server sent, with every panel open, and firstUpdated\n // then closes them.\n if (!onServer && !this.shadowRoot) this.enhanced = true;\n super.connectedCallback();\n }\n\n protected firstUpdated(): void {\n this.enhanced = true;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n statusPillStyles,\n css`\n :host {\n display: block;\n border-block-start: ${A.topEdgeWidth} solid ${t.text};\n }\n /* Rows with a faint rule, or under Noire an ink one (accordion.edge), mixed here so a band that repaints the text repaints it. */\n .item {\n border-block-end: ${t.borderThin} solid color-mix(in srgb, ${t.text} ${A.edge}, transparent);\n }\n /* The heading row. The button is stretched over it, so the whole row opens the panel, the status included. */\n .head {\n /* The question's padding and size, read by the button and by the marker beside it, so the marker sits on the question's first line. */\n --q-pad: ${A.questionPadding};\n --q-size: ${A.questionSize};\n position: relative;\n display: flex;\n align-items: center;\n gap: ${space(4)};\n }\n .h {\n flex: 1;\n min-inline-size: 0;\n margin: 0;\n }\n button {\n ${targetSize}\n display: flex;\n align-items: baseline;\n flex-wrap: wrap;\n column-gap: ${space(4)};\n row-gap: ${space(1)};\n inline-size: 100%;\n padding: var(--q-pad) 0;\n background: none;\n border: 0;\n font: inherit;\n /* The question in body type, or under Noire (G2) heading S: 24/1.15, -2.5%, semibold. */\n font-size: var(--q-size);\n line-height: ${A.questionLineHeight};\n letter-spacing: ${A.questionTracking};\n font-weight: ${fontWeight('semibold')};\n color: ${t.text};\n text-align: start;\n cursor: pointer;\n }\n button::after {\n content: '';\n position: absolute;\n inset: 0;\n }\n button:focus-visible {\n box-shadow: none;\n }\n button:focus-visible::after {\n box-shadow: ${t.focusShadow};\n }\n button:hover {\n color: color-mix(in srgb, ${t.text} ${A.hoverInk}, ${t.link});\n }\n button:hover .q {\n text-decoration-line: ${A.hoverLine};\n text-decoration-thickness: 1px;\n text-underline-offset: 0.15em;\n }\n .meta {\n font-family: ${t.fontMono};\n font-size: ${fontSize('sm')};\n font-weight: 400;\n letter-spacing: normal;\n color: ${t.textMuted};\n }\n .status-pill {\n flex: none;\n }\n .pills {\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-end;\n gap: ${space(2)};\n max-inline-size: 50%;\n }\n /* A plus that turns to a minus: two bars, the upright one hidden when open. Drawn, not typed, so it is the same in every face. */\n .marker {\n position: relative;\n flex: none;\n inline-size: ${A.markerSize};\n block-size: ${A.markerSize};\n /* Centred on the question's first line (#51): below the button's padding, in the middle of the question's line box. */\n font-size: var(--q-size);\n line-height: ${A.questionLineHeight};\n align-self: flex-start;\n margin-block-start: calc(var(--q-pad) + (1lh - ${A.markerSize}) / 2);\n }\n /* In the issues look the marker is inside the button, on the button's own line. */\n :host([look='issues']) .marker {\n align-self: center;\n margin-block-start: 0;\n }\n .marker::before,\n .marker::after {\n content: '';\n position: absolute;\n background: ${t.text};\n }\n .marker::before {\n inset-inline: 0;\n inset-block-start: calc(50% - ${A.markerStroke} / 2);\n block-size: ${A.markerStroke};\n }\n .marker::after {\n inset-block: 0;\n inset-inline-start: calc(50% - ${A.markerStroke} / 2);\n inline-size: ${A.markerStroke};\n transition: transform 120ms ease-in-out;\n }\n .item.open .marker::after {\n transform: scaleY(0);\n }\n /* The brand's marker: a \"+\" (accordion.plus) or a chevron that turns to point down when open (accordion.chevron). */\n .marker::before,\n .marker::after {\n display: ${A.plus};\n }\n .chev {\n display: ${A.chevron};\n position: absolute;\n inset: 0;\n line-height: 18px;\n text-align: center;\n transition: transform 120ms ease-in-out;\n }\n .item.open .chev {\n transform: rotate(90deg);\n }\n :host([look='issues']) .marker::before,\n :host([look='issues']) .marker::after {\n display: block;\n }\n :host([look='issues']) .chev {\n display: none;\n }\n @media (forced-colors: active) {\n .marker::before,\n .marker::after {\n background: CanvasText;\n }\n }\n /* With no script the element is never defined: the buttons cannot work, so they do not look as if they do. */\n :host(:not(:defined)) button {\n cursor: default;\n pointer-events: none;\n }\n :host(:not(:defined)) .marker {\n display: none;\n }\n .panel {\n max-inline-size: ${A.answerWidth};\n margin-block-start: ${A.answerPull};\n padding-block-end: ${A.answerSpace};\n font-size: ${fontSize('md')};\n line-height: ${A.answerLineHeight};\n color: color-mix(in srgb, ${t.text} ${A.answerInk}, ${t.textMuted});\n }\n /*\n * Issues (frames 36:716, 36:430): rows divided by soft rules, each a code, a small \"+\" and the finding in\n * body type. An open finding becomes an inset soft box with an ink edge: the code above the heading, the\n * heading in heading S, the status at the top right, and the panel under them, with no marker.\n */\n :host([look='issues']) {\n border-block-start: 0;\n }\n :host([look='issues']) .item {\n border-block-end: ${t.borderThin} solid ${LINE_SOFT};\n }\n /* The finding keeps at least 16rem; on a narrow screen the status wraps under it, at the end, rather than squeezing it. */\n :host([look='issues']) .head {\n flex-wrap: wrap;\n gap: ${space(2)} ${space(4)};\n }\n :host([look='issues']) .h {\n flex: 1 1 16rem;\n }\n :host([look='issues']) .head > :is(.status-pill, .pills) {\n margin-inline-start: auto;\n }\n :host([look='issues']) button {\n align-items: center;\n column-gap: ${space(3)};\n padding-block: ${space(5)};\n font-size: 1.25rem;\n line-height: 1.2;\n letter-spacing: -0.01em;\n font-weight: ${fontWeight('regular')};\n }\n :host([look='issues']) .meta {\n margin-inline-end: ${space(1)};\n }\n :host([look='issues']) .marker {\n inline-size: 12px;\n block-size: 12px;\n }\n :host([look='issues']) .marker::before {\n inset-block-start: calc(50% - 0.75px);\n block-size: 1.5px;\n }\n :host([look='issues']) .marker::after {\n inset-inline-start: calc(50% - 0.75px);\n inline-size: 1.5px;\n }\n :host([look='issues']) .item.open {\n margin-block: ${space(4)};\n padding: ${space(6)};\n background: ${t.surfaceSubtle};\n border: ${t.borderThin} solid ${t.text};\n }\n :host([look='issues']) .item.open .head {\n align-items: flex-start;\n }\n :host([look='issues']) .item.open button {\n flex-direction: column;\n align-items: flex-start;\n row-gap: ${space(2)};\n padding-block: 0;\n font-size: var(--impakt-type-heading-s-size, 1.5rem);\n line-height: 1.15;\n letter-spacing: -0.025em;\n font-weight: ${fontWeight('semibold')};\n }\n :host([look='issues']) .item.open .meta {\n letter-spacing: normal;\n font-weight: 400;\n }\n :host([look='issues']) .item.open .marker {\n display: none;\n }\n :host([look='issues']) .panel {\n max-inline-size: none;\n margin: ${space(4)} 0 0;\n padding: 0;\n color: ${t.text};\n }\n :host([look='issues']) .panel[hidden] {\n display: none;\n }\n /* Without script every finding is open and has no marker; it reads as a list, not as boxes. */\n :host([look='issues']:not(:defined)) .item.open {\n margin: 0;\n padding: ${space(5)} 0;\n background: none;\n border: 0;\n border-block-end: ${t.borderThin} solid ${LINE_SOFT};\n }\n @media (max-width: 40rem) {\n .head {\n --q-pad: min(${A.questionPadding}, ${space(6)});\n --q-size: min(${A.questionSize}, 1.25rem);\n }\n :host([look='issues']) button {\n padding-block: ${space(4)};\n font-size: 1.125rem;\n }\n :host([look='issues']) .item.open {\n padding: ${space(4)};\n }\n :host([look='issues']) .item.open button {\n padding-block: 0;\n font-size: 1.25rem;\n }\n }\n `,\n ];\n\n private toggle(id: string): void {\n const isOpen = this.open.includes(id);\n if (isOpen) this.open = this.open.filter((o) => o !== id);\n else this.open = this.multiple ? [...this.open, id] : [id];\n }\n\n render(): TemplateResult {\n // In the issues look the \"+\" sits between the code and the finding, so it is inside the button.\n const issues = this.look === 'issues';\n return html`\n ${this.items.map((item) => {\n const expanded = !this.enhanced || this.open.includes(item.id);\n const panelId = this.id_(`panel-${item.id}`);\n const buttonId = this.id_(`button-${item.id}`);\n return html`\n <div class=\"item ${expanded ? 'open' : ''}\" part=\"item\">\n <div class=\"head\" part=\"head\">\n <div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>\n <button\n id=${buttonId}\n part=\"header\"\n type=\"button\"\n aria-expanded=${expanded ? 'true' : 'false'}\n aria-controls=${panelId}\n @click=${() => this.toggle(item.id)}\n >\n ${item.meta ? html`<span class=\"meta\" part=\"meta\">${item.meta}</span>` : nothing}\n ${issues ? html`<span class=\"marker\" aria-hidden=\"true\"></span>` : nothing}\n <span class=\"q\">${item.heading}</span>\n </button>\n </div>\n ${\n item.tags?.length\n ? html`<span class=\"pills\" part=\"pills\">\n ${statusPill(item.status, item.statusTone)}${item.tags.map((tag) => statusPill(tag.label, tag.tone ?? 'neutral', 'tag'))}\n </span>`\n : statusPill(item.status, item.statusTone)\n }\n ${issues ? nothing : html`<span class=\"marker\" aria-hidden=\"true\"><span class=\"chev\">›</span></span>`}\n </div>\n <div\n id=${panelId}\n class=\"panel\"\n part=\"panel\"\n role=\"region\"\n aria-labelledby=${buttonId}\n ?hidden=${!expanded}\n >\n <slot name=${`panel-${item.id}`}>${item.body}</slot>\n </div>\n </div>\n `;\n })}\n `;\n }\n}\n\ncustomElements.define('impakt-accordion', ImpaktAccordion);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-accordion': ImpaktAccordion;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,MAAM,KAAK,SAAS,iBAAsC;AAanE,IAAM,IAAI;AAAA,EACR,MAAM,MAAM,kBAAkB,KAAK;AAAA,EACnC,cAAc,MAAM,4BAA4B,KAAK;AAAA,EACrD,cAAc,MAAM,2BAA2B,MAAM;AAAA,EACrD,oBAAoB,MAAM,kCAAkC,KAAK;AAAA,EACjE,kBAAkB,MAAM,+BAA+B,KAAK;AAAA,EAC5D,iBAAiB,MAAM,8BAA8B,MAAM;AAAA,EAC3D,UAAU,MAAM,uBAAuB,IAAI;AAAA,EAC3C,WAAW,MAAM,wBAAwB,MAAM;AAAA,EAC/C,MAAM,MAAM,kBAAkB,MAAM;AAAA,EACpC,SAAS,MA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AAY,OAAO;AAAA,oBAC9E,SAAS,wDAAwD,OAAO;AAAA,oCACxD,KAAK,OAAO;AAAA;AAAA;AAAA,gBAIhC,KAAK,MAAM,SACP;AAAA,sBACE,WAAW,KAAK,QAAQ,KAAK,UAAU,CAAC,GAAG,KAAK,KAAK,IAAI,CAAC,QAAQ,WAAW,IAAI,OAAO,IAAI,QAAQ,WAAW,KAAK,CAAC,CAAC;AAAA,6BAExH,WAAW,KAAK,QAAQ,KAAK,UAAU,CAC7C;AAAA,gBACE,SAAS,UAAU,gFAAgF;AAAA;AAAA;AAAA,mBAGhG,OAAO;AAAA;AAAA;AAAA;AAAA,gCAIM,QAAQ;AAAA,wBAChB,CAAC,QAAQ;AAAA;AAAA,2BAEN,SAAS,KAAK,EAAE,EAAE,IAAI,KAAK,IAAI;AAAA;AAAA;AAAA;AAAA,IAIpD,CAAC,CAAC;AAAA;AAAA,EAEN;AACF;AAEA,eAAe,OAAO,oBAAoB,eAAe;","names":[]}
@@ -2,7 +2,7 @@ import {
2
2
  FieldElement,
3
3
  fieldControl,
4
4
  fieldWidths
5
- } from "./chunk-HSXLSJVG.js";
5
+ } from "./chunk-PII4SJL5.js";
6
6
  import {
7
7
  iconSvg
8
8
  } from "./chunk-5OYQZWP2.js";
@@ -106,4 +106,4 @@ customElements.define("impakt-text-input", ImpaktTextInput);
106
106
  export {
107
107
  ImpaktTextInput
108
108
  };
109
- //# sourceMappingURL=chunk-UYTIJCCW.js.map
109
+ //# sourceMappingURL=chunk-B2GWXXIW.js.map
@@ -130,6 +130,16 @@ var ImpaktNav = class extends ImpaktElement {
130
130
  :host([fold='narrow']) li a { display: flex; padding: ${space(4)} 0; font-family: ${t.fontHeading}; font-size: ${fontSize("2xl")}; font-weight: ${fontWeight("semibold")}; letter-spacing: -0.02em; }
131
131
  :host([fold='narrow']) .action { display: flex; ${targetSize} align-items: center; justify-content: center; margin-block-start: auto; padding: ${space(3)} ${space(4)}; background: ${t.surfaceCard}; color: ${t.text}; font-weight: ${fontWeight("semibold")}; text-decoration: none; border-radius: ${t.radius}; }
132
132
  :host([fold='narrow']) .action:hover { text-decoration: underline; }
133
+ /*
134
+ * The tabs look, folded: the whole-screen menu is ink, so the tab track's paper and the current tab's white box
135
+ * are left off, and the tabs are drawn as the menu's large links. The current page keeps its dot and is
136
+ * underlined, so it is marked by more than colour (1.4.1).
137
+ */
138
+ :host([fold='narrow'][look='tabs']) ul { padding: 0; background: transparent; border: 0; }
139
+ :host([fold='narrow'][look='tabs']) li a { min-block-size: 0; gap: ${space(3)}; align-items: center; padding: ${space(4)} 0; color: inherit; background: transparent; box-shadow: none; }
140
+ :host([fold='narrow'][look='tabs']) li a:hover { background: transparent; text-decoration: underline; text-underline-offset: 0.25em; }
141
+ :host([fold='narrow'][look='tabs']) li a[aria-current] { background: transparent; box-shadow: none; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.35em; }
142
+ :host([fold='narrow'][look='tabs']) li a[aria-current]::before { inline-size: 8px; block-size: 8px; }
133
143
  }
134
144
  `
135
145
  ];
@@ -264,4 +274,4 @@ export {
264
274
  ImpaktNav,
265
275
  ImpaktBreadcrumbs
266
276
  };
267
- //# sourceMappingURL=chunk-CFCFKLTN.js.map
277
+ //# sourceMappingURL=chunk-EA3M6KPB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/navigation.ts"],"sourcesContent":["import { css, html, nothing, type TemplateResult } from 'lit';\nimport { ImpaktElement } from '../base/ImpaktElement';\nimport { say } from '../base/say';\nimport { focusRing, targetSize, visuallyHidden } from '../base/styles';\nimport { fontSize, fontWeight, space, t } from '../base/tokens';\nimport { iconSvg } from './icon';\n\n/** One link in a navigation or a trail. */\nexport interface NavLink {\n label: string;\n href: string;\n}\n\n/** Whether a link is the page the visitor is on, or a page above it. */\nfunction where(href: string): 'page' | 'section' | null {\n // A link to a place on this page, or to nowhere yet (\"#\"), is not where the reader is.\n if (typeof location === 'undefined' || !href || href.startsWith('#')) return null;\n let path: string;\n try {\n const url = new URL(href, location.href);\n // A link to another site is never where the reader is, even when its path matches, as a\n // product at app.example.com linking back to example.com/ would otherwise mark that link.\n if (url.origin !== location.origin) return null;\n path = url.pathname.replace(/\\/$/, '') || '/';\n } catch {\n return null;\n }\n const here = location.pathname.replace(/\\/$/, '') || '/';\n if (path === here) return 'page';\n return path !== '/' && here.startsWith(`${path}/`) ? 'section' : null;\n}\n\n/**\n * The site's main navigation: a row of links that folds into a Menu button\n * when there is not room for all of them, whatever the screen.\n *\n * **The page you are on is marked in words as well as colour.** Its link\n * carries `aria-current=\"page\"`, which a screen reader announces, and an\n * underline, so it does not rely on colour alone (1.4.1).\n *\n * **The menu is a disclosure, not a pop-up.** The Menu button says whether the\n * list is open (`aria-expanded`), the links follow it in the reading order, and\n * Escape closes it and returns focus to the button.\n *\n * @category action\n * @icon menu\n */\nexport class ImpaktNav extends ImpaktElement {\n static properties = {\n links: { type: Array },\n label: { type: String },\n menuText: { type: String, attribute: 'menu-text' },\n menuLook: { type: String, reflect: true, attribute: 'menu-look' },\n size: { type: String, reflect: true },\n align: { type: String, reflect: true },\n fold: { type: String, reflect: true },\n actionText: { type: String, attribute: 'action-text' },\n actionHref: { type: String, attribute: 'action-href' },\n look: { type: String, reflect: true },\n current: { type: String },\n };\n /** The links, in order. */\n declare links: NavLink[];\n /** What the navigation is called for a screen reader, such as \"Main\". */\n declare label: string;\n /** The words on the button that opens the links on a narrow screen. */\n declare menuText: string;\n /**\n * The Menu button: `button` with its words, or `icon`, a round button with\n * only the icon, the words kept as its name for screen readers.\n */\n declare menuLook: 'button' | 'icon';\n /** `sm` sets the links a step smaller and closer, as a site header's are. */\n declare size: 'md' | 'sm';\n /** Where the links sit along the row. */\n declare align: 'start' | 'center' | 'end';\n /**\n * How the links fold behind the Menu button. `measure` folds them when they do not fit, which\n * needs script. `narrow` folds them when the container around the nav is 40rem wide or less,\n * which is decided in CSS, and the Menu button then opens a whole-screen menu with no script at\n * all. `narrow` is for a page that may be drawn on a server and shown without script. It needs a\n * size container around the nav, and `impakt-site-header` is one.\n */\n declare fold: 'measure' | 'narrow';\n /** With `fold=\"narrow\"`: an action shown at the foot of the whole-screen menu, for a header that hides its own button on a narrow screen. */\n declare actionText: string;\n /** Where that action goes. */\n declare actionHref: string;\n /**\n * `links` is a row of words. `tabs` is the G2 site header's file tabs: a\n * bordered group on the soft surface, each tab 42px tall, and the page you\n * are on a white tab with a dot before it (frame 9:264). The current tab is\n * still `aria-current`, so it is not said by colour alone.\n */\n declare look: 'links' | 'tabs';\n /** The href of the link to mark as the page you are on, for when the page's address cannot say it (a preview, or `#` links). Unset, it is worked out from the address. */\n declare current: string;\n /** Whether the menu is open on a narrow screen. Not a setting: it is the visitor's. */\n private menuOpen = false;\n private get open(): boolean {\n return this.menuOpen;\n }\n private set open(next: boolean) {\n this.menuOpen = next;\n this.requestUpdate();\n }\n\n constructor() {\n super();\n this.links = [];\n this.label = 'Main';\n this.menuText = 'Menu';\n this.menuLook = 'button';\n this.size = 'md';\n this.align = 'end';\n this.fold = 'measure';\n this.actionText = '';\n this.actionHref = '';\n this.look = 'links';\n this.current = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n /* It grows to fill a row it sits in, because it measures itself to decide when to fold. */\n :host { display: block; flex: 1 1 8rem; min-inline-size: 0; }\n nav { display: flex; flex-direction: column; position: relative; }\n li { flex: none; }\n ul { list-style: none; margin: 0; padding: 0; display: flex; gap: ${space(1)} ${space(6)}; align-items: center; justify-content: flex-end; }\n :host([align='start']) ul { justify-content: flex-start; }\n :host([align='center']) ul { justify-content: center; }\n a { ${targetSize} display: inline-flex; align-items: center; padding: ${space(2)} ${space(1)}; color: inherit; font-weight: ${fontWeight('semibold')}; text-decoration: none; border-radius: ${t.radiusSm}; }\n a:hover { text-decoration: underline; text-underline-offset: 0.25em; }\n a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.35em; }\n .toggle { display: none; ${targetSize} align-items: center; gap: ${space(2)}; align-self: flex-end; padding: ${space(2)} ${space(3)}; font: inherit; font-weight: ${fontWeight('semibold')}; color: inherit; background: transparent; border: ${t.borderThin} solid currentColor; border-radius: ${t.radius}; cursor: pointer; }\n /* When they do not fit, the links fold behind a Menu button and open as a panel under it. */\n :host([folded]) { flex: 0 0 auto; }\n :host([folded]) .toggle { display: inline-flex; }\n :host([menu-look='icon']) .toggle { inline-size: 44px; block-size: 44px; padding: 0; justify-content: center; border: 0; border-radius: 50%; background: ${t.brand}; color: ${t.onBrand}; }\n :host([menu-look='icon']) .toggle .words { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }\n :host([size='sm']) ul { column-gap: ${space(6)}; }\n :host([size='sm']) a { padding-inline: 0; font-size: ${fontSize('sm')}; font-weight: ${fontWeight('medium')}; }\n :host([size='sm'][folded]) a { padding-inline: ${space(3)}; }\n :host([folded]) ul { display: none; position: absolute; inset-block-start: calc(100% + ${space(2)}); inset-inline-end: 0; z-index: 30; flex-direction: column; align-items: stretch; gap: 0; min-inline-size: 14rem; padding: ${space(2)}; background: ${t.surfaceCard}; color: ${t.text}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; box-shadow: 0 8px 24px rgb(0 0 0 / 14%); }\n :host([folded]) ul.open { display: flex; }\n :host([folded]) li { text-align: start; }\n :host([folded]) a { display: flex; padding: ${space(3)} ${space(3)}; }\n /* Tabs: a bordered group on the soft surface; the current tab is white with a dot before it. */\n :host([look='tabs']) ul { gap: 0; padding: 3px; background: ${t.surfaceSubtle}; border: ${t.borderThin} solid var(--impakt-color-line-soft, #dcdcd8); }\n :host([look='tabs']) a { min-block-size: 42px; gap: ${space(2)}; padding: 0 ${space(4)}; font-size: ${fontSize('sm')}; font-weight: ${fontWeight('regular')}; border-radius: 0; }\n :host([look='tabs']) a:hover { text-decoration: none; background: ${t.wash}; }\n :host([look='tabs']) a[aria-current] { text-decoration: none; background: ${t.surfaceCard}; box-shadow: inset 0 0 0 1px var(--impakt-color-line-soft, #dcdcd8); }\n :host([look='tabs']) a[aria-current]::before { content: ''; flex: none; inline-size: 6px; block-size: 6px; border-radius: 50%; background: currentColor; }\n @media (forced-colors: active) { :host([look='tabs']) a[aria-current] { outline: 1px solid CanvasText; } }\n :host([look='tabs'][folded]) ul { padding: ${space(2)}; }\n /* With no script the element is never defined, so it cannot measure itself and fold. The links\n wrap onto more lines instead, so they are never cut off or drawn over what is beside them. */\n :host(:not(:defined)) ul { flex-wrap: wrap; row-gap: 0; }\n /*\n * fold=\"narrow\": the fold is decided here, by the width of the container around the nav, so it\n * is the same before the script runs, after it, and without it. The Menu button opens the\n * panel as a popover, which the browser does by itself. On a wide screen the panel is not a box\n * at all, and its links sit in the row as they always did.\n */\n :host([fold='narrow']) .panel { display: contents; color: inherit; }\n :host([fold='narrow']) .close, :host([fold='narrow']) .action { display: none; }\n @container (max-width: 40rem) {\n :host([fold='narrow']) { flex: 0 0 auto; }\n :host([fold='narrow']) .toggle { display: inline-flex; }\n :host([fold='narrow']) .panel { display: none; }\n :host([fold='narrow']) .panel:popover-open { display: flex; flex-direction: column; gap: ${space(6)}; position: fixed; inset: 0; box-sizing: border-box; inline-size: 100%; block-size: 100%; max-inline-size: none; max-block-size: none; margin: 0; padding: ${space(3)} ${space(4)} calc(${space(6)} + env(safe-area-inset-bottom)); border: 0; overflow: auto; overscroll-behavior: contain; background: ${t.text}; color: ${t.surfaceCard}; }\n :host([fold='narrow']) .close { display: inline-flex; ${targetSize} align-items: center; gap: ${space(2)}; align-self: flex-end; padding: ${space(2)} ${space(3)}; font: inherit; font-weight: ${fontWeight('semibold')}; color: inherit; background: transparent; border: ${t.borderThin} solid currentColor; border-radius: ${t.radius}; cursor: pointer; }\n :host([fold='narrow']) ul { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; }\n :host([fold='narrow']) li { border-block-end: ${t.borderThin} solid color-mix(in srgb, currentColor 22%, transparent); }\n :host([fold='narrow']) li a { display: flex; padding: ${space(4)} 0; font-family: ${t.fontHeading}; font-size: ${fontSize('2xl')}; font-weight: ${fontWeight('semibold')}; letter-spacing: -0.02em; }\n :host([fold='narrow']) .action { display: flex; ${targetSize} align-items: center; justify-content: center; margin-block-start: auto; padding: ${space(3)} ${space(4)}; background: ${t.surfaceCard}; color: ${t.text}; font-weight: ${fontWeight('semibold')}; text-decoration: none; border-radius: ${t.radius}; }\n :host([fold='narrow']) .action:hover { text-decoration: underline; }\n /*\n * The tabs look, folded: the whole-screen menu is ink, so the tab track's paper and the current tab's white box\n * are left off, and the tabs are drawn as the menu's large links. The current page keeps its dot and is\n * underlined, so it is marked by more than colour (1.4.1).\n */\n :host([fold='narrow'][look='tabs']) ul { padding: 0; background: transparent; border: 0; }\n :host([fold='narrow'][look='tabs']) li a { min-block-size: 0; gap: ${space(3)}; align-items: center; padding: ${space(4)} 0; color: inherit; background: transparent; box-shadow: none; }\n :host([fold='narrow'][look='tabs']) li a:hover { background: transparent; text-decoration: underline; text-underline-offset: 0.25em; }\n :host([fold='narrow'][look='tabs']) li a[aria-current] { background: transparent; box-shadow: none; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.35em; }\n :host([fold='narrow'][look='tabs']) li a[aria-current]::before { inline-size: 8px; block-size: 8px; }\n }\n `,\n ];\n\n /** The width the links need in one row. Measured once for each set of links, and again while folded it cannot be read. */\n private needs = 0;\n private resize?: ResizeObserver;\n\n private fit(): void {\n // With fold=\"narrow\" the fold is CSS's to decide, and nothing is measured.\n if (this.fold === 'narrow') {\n this.removeAttribute('folded');\n return;\n }\n // An element the server drew waits for the element around it before it draws here, and the\n // screen can report a size in that wait. There is nothing to measure until it has drawn.\n if (!this.hasUpdated) return;\n const room = this.getBoundingClientRect().width;\n if (room <= 0) return;\n if (!this.needs) {\n this.removeAttribute('folded');\n const items = Array.from(this.renderRoot.querySelectorAll('li'));\n const gap = Number.parseFloat(getComputedStyle(this.renderRoot.querySelector('ul')!).columnGap) || 0;\n this.needs = items.reduce((total, item) => total + item.getBoundingClientRect().width, 0) + gap * Math.max(0, items.length - 1);\n }\n const fold = this.needs > room;\n this.toggleAttribute('folded', fold);\n if (!fold && this.menuOpen) this.open = false;\n }\n\n protected updated(changed: Map<string, unknown>): void {\n if (changed.has('links') || changed.has('fold')) {\n this.needs = 0;\n this.fit();\n }\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n if (typeof ResizeObserver === 'function') {\n this.resize = new ResizeObserver(() => this.fit());\n this.resize.observe(this);\n }\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.resize?.disconnect();\n }\n\n private toggle(): void {\n this.open = !this.open;\n }\n\n private onKey(event: KeyboardEvent): void {\n if (event.key !== 'Escape' || !this.open) return;\n this.open = false;\n this.renderRoot.querySelector<HTMLButtonElement>('.toggle')?.focus();\n }\n\n /**\n * fold=\"narrow\": the Menu button and the panel are tied by `popovertarget`, so the browser opens\n * and closes the panel, moves on to it with Tab, and closes it on Escape, with no script. The\n * browser also tells a screen reader whether it is open.\n */\n private renderNarrow(): TemplateResult {\n const panel = this.id_('panel');\n return html`<nav aria-label=${this.label || nothing} part=\"nav\">\n <button class=\"toggle\" type=\"button\" popovertarget=${panel}>${iconSvg(this.menuLook === 'icon' ? 'menu-two' : 'menu')}<span class=\"words\">${this.menuText}</span></button>\n <div id=${panel} class=\"panel\" popover=\"auto\" part=\"panel\">\n <button class=\"close\" type=\"button\" popovertarget=${panel} popovertargetaction=\"hide\">${iconSvg('close')}<span>${say('Close')}</span></button>\n <ul part=\"list\">\n ${(this.links ?? []).map((link) => {\n const current = this.current ? (link.href === this.current ? 'page' : null) : where(link.href);\n return html`<li><a href=${link.href} aria-current=${current === 'page' ? 'page' : current === 'section' ? 'true' : nothing} part=\"link\">${link.label}</a></li>`;\n })}\n </ul>\n ${this.actionText ? html`<a class=\"action\" href=${this.actionHref || '#'} part=\"action\">${this.actionText}</a>` : nothing}\n </div>\n </nav>`;\n }\n\n render(): TemplateResult {\n if (this.fold === 'narrow') return this.renderNarrow();\n const list = this.id_('links');\n return html`<nav aria-label=${this.label || nothing} part=\"nav\" @keydown=${this.onKey}>\n <button class=\"toggle\" type=\"button\" aria-expanded=${this.open ? 'true' : 'false'} aria-controls=${list} @click=${this.toggle}>${iconSvg(this.open ? 'close' : this.menuLook === 'icon' ? 'menu-two' : 'menu')}<span class=\"words\">${this.menuText}</span></button>\n <ul id=${list} class=${this.open ? 'open' : ''} part=\"list\">\n ${(this.links ?? []).map((link) => {\n const current = this.current ? (link.href === this.current ? 'page' : null) : where(link.href);\n return html`<li><a href=${link.href} aria-current=${current === 'page' ? 'page' : current === 'section' ? 'true' : nothing} part=\"link\">${link.label}</a></li>`;\n })}\n </ul>\n </nav>`;\n }\n}\n\n/**\n * Where the page sits in the site, as a trail of links back to the top: Home,\n * then Developments, then this page.\n *\n * The last item is the page itself. It is not a link, and it carries\n * `aria-current=\"page\"`. The separators are drawn, not written, so a screen\n * reader reads the trail as a list rather than a string of slashes.\n *\n * @category action\n * @icon breadcrumbs\n */\nexport class ImpaktBreadcrumbs extends ImpaktElement {\n static properties = {\n items: { type: Array },\n label: { type: String },\n look: { type: String, reflect: true },\n };\n /** `default` is the body face with links. `mono` is the code face at 14px, muted, as the G2 tools' trail is (frame 34:602). */\n declare look: 'default' | 'mono';\n /** The trail, from the top of the site down to this page. */\n declare items: NavLink[];\n /** What the trail is called for a screen reader. */\n declare label: string;\n\n constructor() {\n super();\n this.items = [];\n this.label = 'Breadcrumb';\n this.look = 'default';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host { display: block; font-size: ${fontSize('sm')}; }\n ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: ${space(1)}; }\n li { display: inline-flex; align-items: center; gap: ${space(1)}; }\n li + li::before { content: ''; inline-size: 0.45em; block-size: 0.45em; border-block-start: 1.5px solid ${t.textMuted}; border-inline-end: 1.5px solid ${t.textMuted}; transform: rotate(45deg); margin-inline: ${space(1)} ${space(2)}; }\n a { color: ${t.link}; text-decoration: underline; text-underline-offset: 0.2em; border-radius: ${t.radiusSm}; }\n a:hover { color: ${t.linkHover}; }\n [aria-current] { color: ${t.textMuted}; }\n :host([look='mono']) { font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; color: ${t.textMuted}; }\n /* The G2 trail (34:602): \"Home / Tools / Accessibility\", a slash between, the links underlined only on hover. A trail is its own list, not a link in a sentence, so it needs no underline to be told apart (1.4.1). */\n :host([look='mono']) a { color: ${t.textMuted}; text-decoration: none; }\n :host([look='mono']) a:hover { color: ${t.text}; text-decoration: underline; text-decoration-thickness: 1px; }\n :host([look='mono']) [aria-current] { color: ${t.text}; }\n :host([look='mono']) li + li::before { content: '/'; inline-size: auto; block-size: auto; border: 0; transform: none; margin-inline: ${space(1)}; color: ${t.textMuted}; }\n .sr-only { ${visuallyHidden} }\n `,\n ];\n\n render(): TemplateResult {\n const items = this.items ?? [];\n return html`<nav aria-label=${this.label} part=\"nav\"><ol>\n ${items.map(\n (item, i) =>\n html`<li>${\n i === items.length - 1 ? html`<span aria-current=\"page\">${item.label}</span>` : html`<a href=${item.href} part=\"link\">${item.label}</a>`\n }</li>`,\n )}\n </ol></nav>`;\n }\n}\n\ncustomElements.define('impakt-nav', ImpaktNav);\ncustomElements.define('impakt-breadcrumbs', ImpaktBreadcrumbs);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-nav': ImpaktNav;\n 'impakt-breadcrumbs': ImpaktBreadcrumbs;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,SAAS,KAAK,MAAM,eAAoC;AAcxD,SAAS,MAAM,MAAyC;AAEtD,MAAI,OAAO,aAAa,eAAe,CAAC,QAAQ,KAAK,WAAW,GAAG,EAAG,QAAO;AAC7E,MAAI;AACJ,MAAI;AACF,UAAM,MAAM,IAAI,IAAI,MAAM,SAAS,IAAI;AAGvC,QAAI,IAAI,WAAW,SAAS,OAAQ,QAAO;AAC3C,WAAO,IAAI,SAAS,QAAQ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