@atomic-ui/ui 0.12.1 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +130 -1
- package/dist/base/FieldElement.d.ts +20 -2
- package/dist/{chunk-2WHOBIOY.js → chunk-2BGOBD6Y.js} +2 -2
- package/dist/{chunk-FLAUZU7Y.js → chunk-2RC3QKYA.js} +84 -27
- package/dist/chunk-2RC3QKYA.js.map +1 -0
- package/dist/{chunk-BGHAANTP.js → chunk-5OCDXZXG.js} +3 -2
- package/dist/chunk-5OCDXZXG.js.map +1 -0
- package/dist/{chunk-UYTIJCCW.js → chunk-B2GWXXIW.js} +2 -2
- package/dist/{chunk-CFCFKLTN.js → chunk-EA3M6KPB.js} +11 -1
- package/dist/chunk-EA3M6KPB.js.map +1 -0
- package/dist/{chunk-R6YMSJR7.js → chunk-EFP7PJ6C.js} +68 -25
- package/dist/chunk-EFP7PJ6C.js.map +1 -0
- package/dist/{chunk-BAYSDP44.js → chunk-EIWICFXL.js} +51 -18
- package/dist/chunk-EIWICFXL.js.map +1 -0
- package/dist/{chunk-5IGBH4GL.js → chunk-EUOBFMWC.js} +2 -2
- package/dist/{chunk-FZWUQC42.js → chunk-F2MFV7RM.js} +2 -2
- package/dist/{chunk-3GPGDERO.js → chunk-G7CVRNY5.js} +2 -2
- package/dist/{chunk-2TNF7O43.js → chunk-LSEK5MEZ.js} +2 -2
- package/dist/{chunk-DXLEYNID.js → chunk-LVBYNQ45.js} +5 -3
- package/dist/chunk-LVBYNQ45.js.map +1 -0
- package/dist/{chunk-SOYKSPPX.js → chunk-NZSKUEYS.js} +18 -10
- package/dist/chunk-NZSKUEYS.js.map +1 -0
- package/dist/{chunk-5HCWL2YD.js → chunk-P5FAKEFK.js} +2 -2
- package/dist/{chunk-HSXLSJVG.js → chunk-PII4SJL5.js} +32 -16
- package/dist/chunk-PII4SJL5.js.map +1 -0
- package/dist/{chunk-ALFE35FS.js → chunk-QJBRENLI.js} +3 -3
- package/dist/{chunk-ALFE35FS.js.map → chunk-QJBRENLI.js.map} +1 -1
- package/dist/{chunk-3KAFK24X.js → chunk-RNFGIXJ7.js} +2 -2
- package/dist/{chunk-UBNCJROR.js → chunk-SRXC6ZPM.js} +11 -5
- package/dist/chunk-SRXC6ZPM.js.map +1 -0
- package/dist/{chunk-4MMRBNW7.js → chunk-WEX5RKVC.js} +10 -6
- package/dist/chunk-WEX5RKVC.js.map +1 -0
- package/dist/{chunk-CQT3VPYK.js → chunk-WT7MHYJR.js} +2 -2
- package/dist/{chunk-LXVPWTSY.js → chunk-ZOWOKIE4.js} +37 -21
- package/dist/chunk-ZOWOKIE4.js.map +1 -0
- package/dist/components/accordion.js +1 -1
- package/dist/components/app-bar.d.ts +22 -0
- package/dist/components/app-bar.js +3 -3
- package/dist/components/app-ui.d.ts +8 -0
- package/dist/components/app-ui.js +2 -2
- package/dist/components/button.js +1 -1
- package/dist/components/checkbox-group.js +2 -2
- package/dist/components/checkbox.js +2 -2
- package/dist/components/chip-group.js +2 -2
- package/dist/components/chip.js +1 -1
- package/dist/components/date-input.js +2 -2
- package/dist/components/dialog.js +1 -1
- package/dist/components/journey.js +2 -2
- package/dist/components/layout.js +1 -1
- package/dist/components/navigation.js +1 -1
- package/dist/components/page.js +1 -1
- package/dist/components/radio-group.js +2 -2
- package/dist/components/rows.js +1 -1
- package/dist/components/select.js +2 -2
- package/dist/components/switch.js +2 -2
- package/dist/components/text-input.js +2 -2
- package/dist/components/textarea.js +2 -2
- package/dist/index.js +21 -21
- package/dist/server.d.ts +42 -0
- package/dist/server.js +26 -0
- package/dist/server.js.map +1 -0
- package/dist/standalone/atomic-ui.js +833 -746
- package/dist/standalone/atomic-ui.js.map +3 -3
- package/package.json +6 -2
- package/dist/chunk-4MMRBNW7.js.map +0 -1
- package/dist/chunk-BAYSDP44.js.map +0 -1
- package/dist/chunk-BGHAANTP.js.map +0 -1
- package/dist/chunk-CFCFKLTN.js.map +0 -1
- package/dist/chunk-DXLEYNID.js.map +0 -1
- package/dist/chunk-FLAUZU7Y.js.map +0 -1
- package/dist/chunk-HSXLSJVG.js.map +0 -1
- package/dist/chunk-LXVPWTSY.js.map +0 -1
- package/dist/chunk-R6YMSJR7.js.map +0 -1
- package/dist/chunk-SOYKSPPX.js.map +0 -1
- package/dist/chunk-UBNCJROR.js.map +0 -1
- /package/dist/{chunk-2WHOBIOY.js.map → chunk-2BGOBD6Y.js.map} +0 -0
- /package/dist/{chunk-UYTIJCCW.js.map → chunk-B2GWXXIW.js.map} +0 -0
- /package/dist/{chunk-5IGBH4GL.js.map → chunk-EUOBFMWC.js.map} +0 -0
- /package/dist/{chunk-FZWUQC42.js.map → chunk-F2MFV7RM.js.map} +0 -0
- /package/dist/{chunk-3GPGDERO.js.map → chunk-G7CVRNY5.js.map} +0 -0
- /package/dist/{chunk-2TNF7O43.js.map → chunk-LSEK5MEZ.js.map} +0 -0
- /package/dist/{chunk-5HCWL2YD.js.map → chunk-P5FAKEFK.js.map} +0 -0
- /package/dist/{chunk-3KAFK24X.js.map → chunk-RNFGIXJ7.js.map} +0 -0
- /package/dist/{chunk-CQT3VPYK.js.map → chunk-WT7MHYJR.js.map} +0 -0
package/custom-elements.json
CHANGED
|
@@ -456,6 +456,94 @@
|
|
|
456
456
|
{
|
|
457
457
|
"description": "The sign-in link.",
|
|
458
458
|
"name": "sign-in"
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
"description": "The \"All tools\" switcher's button.",
|
|
462
|
+
"name": "switcher-trigger"
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
"description": "The arrow on the switcher's button.",
|
|
466
|
+
"name": "switcher-chevron"
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
"description": "The box round the switcher's header, when it has one.",
|
|
470
|
+
"name": "switcher-header"
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
"description": "The box the switcher opens, 340px wide as in `53:960`.",
|
|
474
|
+
"name": "switcher-panel"
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
"description": "The switcher's list of items.",
|
|
478
|
+
"name": "switcher-list"
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
"description": "A group of the switcher's items, with its label.",
|
|
482
|
+
"name": "switcher-group"
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
"description": "A group's label in the switcher, such as \"Tools\".",
|
|
486
|
+
"name": "switcher-group-label"
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
"description": "An item in the switcher. The tool you are in is also `switcher-current`.",
|
|
490
|
+
"name": "switcher-item"
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
"description": "The switcher's item for the tool you are in.",
|
|
494
|
+
"name": "switcher-current"
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
"description": "An item's words in the switcher.",
|
|
498
|
+
"name": "switcher-label"
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
"description": "An item's note in the switcher, such as \"Plans, team, billing\".",
|
|
502
|
+
"name": "switcher-meta"
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
"description": "The organisation menu's button.",
|
|
506
|
+
"name": "organisation-trigger"
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
"description": "The arrow on the organisation menu's button.",
|
|
510
|
+
"name": "organisation-chevron"
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
"description": "The box the organisation menu opens.",
|
|
514
|
+
"name": "organisation-panel"
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
"description": "The box round the organisation menu's header, when it has one.",
|
|
518
|
+
"name": "organisation-header"
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
"description": "The organisation menu's list of items.",
|
|
522
|
+
"name": "organisation-list"
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
"description": "A group of the organisation menu's items, with its label.",
|
|
526
|
+
"name": "organisation-group"
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"description": "A group's label in the organisation menu.",
|
|
530
|
+
"name": "organisation-group-label"
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
"description": "An item in the organisation menu. The page you are on is also `organisation-current`.",
|
|
534
|
+
"name": "organisation-item"
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
"description": "The organisation menu's item for the page you are on.",
|
|
538
|
+
"name": "organisation-current"
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
"description": "An item's words in the organisation menu.",
|
|
542
|
+
"name": "organisation-label"
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
"description": "An item's note in the organisation menu.",
|
|
546
|
+
"name": "organisation-meta"
|
|
459
547
|
}
|
|
460
548
|
],
|
|
461
549
|
"slots": [
|
|
@@ -1289,6 +1377,30 @@
|
|
|
1289
1377
|
{
|
|
1290
1378
|
"description": "The list of items.",
|
|
1291
1379
|
"name": "list"
|
|
1380
|
+
},
|
|
1381
|
+
{
|
|
1382
|
+
"description": "A group of items with its label, and the soft rule above it after the first.",
|
|
1383
|
+
"name": "group"
|
|
1384
|
+
},
|
|
1385
|
+
{
|
|
1386
|
+
"description": "A group's label, in the code face.",
|
|
1387
|
+
"name": "group-label"
|
|
1388
|
+
},
|
|
1389
|
+
{
|
|
1390
|
+
"description": "An item, a link or a button. The page you are on is also `current`.",
|
|
1391
|
+
"name": "item"
|
|
1392
|
+
},
|
|
1393
|
+
{
|
|
1394
|
+
"description": "The item for the page you are on.",
|
|
1395
|
+
"name": "current"
|
|
1396
|
+
},
|
|
1397
|
+
{
|
|
1398
|
+
"description": "An item's words.",
|
|
1399
|
+
"name": "label"
|
|
1400
|
+
},
|
|
1401
|
+
{
|
|
1402
|
+
"description": "An item's quiet note at the end, such as \"Coming soon\".",
|
|
1403
|
+
"name": "meta"
|
|
1292
1404
|
}
|
|
1293
1405
|
],
|
|
1294
1406
|
"slots": [
|
|
@@ -21007,6 +21119,15 @@
|
|
|
21007
21119
|
"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; } `",
|
|
21008
21120
|
"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`."
|
|
21009
21121
|
},
|
|
21122
|
+
{
|
|
21123
|
+
"kind": "variable",
|
|
21124
|
+
"name": "F",
|
|
21125
|
+
"type": {
|
|
21126
|
+
"text": "object"
|
|
21127
|
+
},
|
|
21128
|
+
"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'), }",
|
|
21129
|
+
"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."
|
|
21130
|
+
},
|
|
21010
21131
|
{
|
|
21011
21132
|
"kind": "function",
|
|
21012
21133
|
"name": "fieldControl",
|
|
@@ -21023,7 +21144,7 @@
|
|
|
21023
21144
|
}
|
|
21024
21145
|
}
|
|
21025
21146
|
],
|
|
21026
|
-
"description": "The box a single control is drawn in, shared by the text input, the select and\nthe textarea so they match
|
|
21147
|
+
"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`."
|
|
21027
21148
|
},
|
|
21028
21149
|
{
|
|
21029
21150
|
"kind": "class",
|
|
@@ -21375,6 +21496,14 @@
|
|
|
21375
21496
|
"module": "src/base/FieldElement.ts"
|
|
21376
21497
|
}
|
|
21377
21498
|
},
|
|
21499
|
+
{
|
|
21500
|
+
"kind": "js",
|
|
21501
|
+
"name": "F",
|
|
21502
|
+
"declaration": {
|
|
21503
|
+
"name": "F",
|
|
21504
|
+
"module": "src/base/FieldElement.ts"
|
|
21505
|
+
}
|
|
21506
|
+
},
|
|
21378
21507
|
{
|
|
21379
21508
|
"kind": "js",
|
|
21380
21509
|
"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
|
|
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-
|
|
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-
|
|
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: ${
|
|
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:
|
|
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(--
|
|
89
|
-
line-height:
|
|
90
|
-
letter-spacing:
|
|
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:
|
|
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:
|
|
134
|
-
block-size:
|
|
135
|
-
/* Centred on the question's first line,
|
|
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 -
|
|
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% -
|
|
148
|
-
block-size:
|
|
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% -
|
|
153
|
-
inline-size:
|
|
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:
|
|
175
|
-
margin-block-start:
|
|
176
|
-
padding-block-end: ${
|
|
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:
|
|
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
|
-
|
|
272
|
-
|
|
273
|
-
|
|
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-
|
|
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,MA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AA;AAAA,kCAGG,WAAW,SAAS,OAAO;AAAA,kCAC3B,OAAO;AAAA,2BACd,MAAM,KAAK,OAAO,KAAK,EAAE,CAAC;AAAA;AAAA,oBAEjC,KAAK,OAAO,sCAAsC,KAAK,IAAI,YAAY,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":[]}
|
|
@@ -61,7 +61,8 @@ var ImpaktChip = class extends ImpaktElement {
|
|
|
61
61
|
:host { display: inline-flex; flex: none; }
|
|
62
62
|
span.chip { display: inline-flex; align-items: center; gap: ${space(1.5)}; padding: 3px ${space(2.5)}; border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999)); font-family: ${MONO}; font-size: ${fontSize("xs")}; line-height: 1.2; white-space: nowrap; }
|
|
63
63
|
:host([look='filled']) span.chip { border-radius: ${t.radius}; background: color-mix(in srgb, currentColor 7%, transparent); }
|
|
64
|
-
|
|
64
|
+
/* Spaced 0.04em where the brand derives it, and not at all under Noire (G2) (chip.outlined.tracking). */
|
|
65
|
+
:host([look='outlined']) span.chip { border: ${t.borderThin} solid ${t.text}; background: ${t.surfaceCard}; letter-spacing: ${token("chip.outlined.tracking", "0.04em")}; }
|
|
65
66
|
:host([size='marketing']) span.chip { font-size: 11px; font-weight: ${fontWeight("medium")}; text-transform: uppercase; letter-spacing: 0.06em; }
|
|
66
67
|
/* Body: a 35px square box in the body face, for a row of tags such as a stack (G2 case study, 21:1493). */
|
|
67
68
|
:host([size='body']) span.chip { box-sizing: border-box; min-block-size: 35px; padding: ${space(1.5)} ${space(3)}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radius}; font-family: ${t.fontBody}; font-size: 14px; line-height: 1.2; }
|
|
@@ -91,4 +92,4 @@ export {
|
|
|
91
92
|
toneOf,
|
|
92
93
|
ImpaktChip
|
|
93
94
|
};
|
|
94
|
-
//# sourceMappingURL=chunk-
|
|
95
|
+
//# sourceMappingURL=chunk-5OCDXZXG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/chip.ts","../src/base/tone.ts"],"sourcesContent":["/**\n * A short label: a branch, a status with its dot, or a code such as a commit\n * hash.\n */\nimport { css, html, nothing, type TemplateResult } from 'lit';\nimport { ImpaktElement } from '../base/ImpaktElement';\nimport { hideOn } from '../base/styles';\nimport { fontSize, fontWeight, space, t, token } from '../base/tokens';\nimport { toneOf, type Tone } from '../base/tone';\n\n/** Code-like labels: a branch, a hash, a commit message. */\nconst MONO = t.fontMono;\n\n/**\n * A short label: a branch name with its icon, a status with its dot, or a\n * code such as a commit hash. It says something; it does nothing.\n *\n * @category content\n * @icon badge\n */\nexport class ImpaktChip extends ImpaktElement {\n static properties = {\n label: { type: String },\n meta: { type: String },\n icon: { type: String, reflect: true },\n tone: { type: String },\n look: { type: String, reflect: true },\n size: { type: String, reflect: true },\n hideOn: { type: String, reflect: true, attribute: 'hide-on' },\n };\n declare label: string;\n /** A code after the label, quieter, such as a hash. */\n declare meta: string;\n /** A coloured dot, a branch, or nothing before the label. */\n declare icon: 'none' | 'dot' | 'branch';\n /** The dot's colour: a named tone, or 1 to 5 for the brand's chart colours. */\n declare tone: Tone;\n /** `outlined` on the card colour, `filled` with a faint wash, or `plain` words in the code face. */\n declare look: 'outlined' | 'filled' | 'plain';\n /**\n * `md` is the chip in a line of text. `marketing` sets the words in\n * capitals at 11px with 6% tracking, as the site's labels are. `lg` is a\n * studio tool tag: a square 49px box with an ink border, the label in\n * Archivo at 20px and the meta in capitals in the code face (frame 21:1152).\n */\n declare size: 'md' | 'marketing' | 'body' | 'lg';\n declare hideOn: 'never' | 'phone' | 'wide';\n\n constructor() {\n super();\n this.label = '';\n this.meta = '';\n this.icon = 'none';\n this.tone = 'success';\n this.look = 'filled';\n this.size = 'md';\n this.hideOn = 'never';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n hideOn,\n css`\n :host { display: inline-flex; flex: none; }\n span.chip { display: inline-flex; align-items: center; gap: ${space(1.5)}; padding: 3px ${space(2.5)}; border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999)); font-family: ${MONO}; font-size: ${fontSize('xs')}; line-height: 1.2; white-space: nowrap; }\n :host([look='filled']) span.chip { border-radius: ${t.radius}; background: color-mix(in srgb, currentColor 7%, transparent); }\n /* Spaced 0.04em where the brand derives it, and not at all under Noire (G2) (chip.outlined.tracking). */\n :host([look='outlined']) span.chip { border: ${t.borderThin} solid ${t.text}; background: ${t.surfaceCard}; letter-spacing: ${token('chip.outlined.tracking', '0.04em')}; }\n :host([size='marketing']) span.chip { font-size: 11px; font-weight: ${fontWeight('medium')}; text-transform: uppercase; letter-spacing: 0.06em; }\n /* Body: a 35px square box in the body face, for a row of tags such as a stack (G2 case study, 21:1493). */\n :host([size='body']) span.chip { box-sizing: border-box; min-block-size: 35px; padding: ${space(1.5)} ${space(3)}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radius}; font-family: ${t.fontBody}; font-size: 14px; line-height: 1.2; }\n :host([size='lg']) span.chip { box-sizing: border-box; min-block-size: 49px; gap: ${space(3)}; padding: ${space(2)} ${space(4)}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radius}; font-family: ${t.fontBody}; font-size: 20px; line-height: 1.2; }\n :host([size='lg']) .meta { font-family: ${MONO}; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; opacity: 1; color: ${t.textMuted}; }\n :host([look='plain']) span.chip { padding: 0; }\n .dot { flex: none; inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--tone); }\n /* Yellow means \"needs your attention\": the accent, with an ink stroke so it shows on white. */\n .dot.warn { background: ${token('color.accent.default', '#ffd43b')}; box-shadow: 0 0 0 1px ${t.text}; }\n @media (forced-colors: active) { .dot, .dot.warn { background: CanvasText; } }\n svg { inline-size: 12px; block-size: 12px; }\n .meta { opacity: 0.72; text-transform: none; }\n :host([look='plain']) .label { opacity: 0.72; }\n `,\n ];\n\n render(): TemplateResult {\n const icon =\n this.icon === 'dot'\n ? html`<span class=\"dot ${this.tone === 'warning' ? 'warn' : ''}\" aria-hidden=\"true\"></span>`\n : this.icon === 'branch'\n ? html`<svg viewBox=\"0 0 14 14\" aria-hidden=\"true\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"><circle cx=\"3.5\" cy=\"3\" r=\"1.5\"/><circle cx=\"3.5\" cy=\"11\" r=\"1.5\"/><circle cx=\"10.5\" cy=\"4.5\" r=\"1.5\"/><path d=\"M3.5 4.5v5M10.5 6c0 2.5-3 2.5-6 4\"/></svg>`\n : nothing;\n return html`<span class=\"chip\" part=\"chip\" style=${`--tone:${toneOf(this.tone, 0)}`}>${icon}<span class=\"label\">${this.label}</span>${this.meta ? html` <span class=\"meta\">${this.meta}</span>` : nothing}</span>`;\n }\n}\n\ncustomElements.define('impakt-chip', ImpaktChip);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-chip': ImpaktChip;\n }\n}\n","/**\n * Colours named by what they are in the brand, for a line, a lane, a dot or a\n * stripe. A tone is a brand token, never a hex value, so a partner's brand\n * restyles everything drawn with one.\n *\n * It is shared: `impakt-chip` here and the changelog, site and estimator blocks\n * in `@atomic-ui/blocks` all colour themselves with it.\n */\n\n/** A colour for a line or a lane, named by what it is in the brand. */\nexport type NamedTone = 'brand' | 'accent' | 'info' | 'success' | 'warning' | 'danger';\n/** A named tone, or 1 to 5 for the brand's chart colours in order. */\nexport type Tone = NamedTone | 1 | 2 | 3 | 4 | 5;\nexport const TONE: Record<NamedTone, string> = {\n brand: 'var(--impakt-color-brand-default, #1f4ed8)',\n accent: 'var(--impakt-color-accent-default, #c8a15a)',\n info: 'var(--impakt-color-status-info-default, #1f4ed8)',\n success: 'var(--impakt-color-status-success-default, #047857)',\n warning: 'var(--impakt-color-status-warning-default, #b45309)',\n danger: 'var(--impakt-color-status-danger-default, #c8102e)',\n};\n/** When an item names no tone, lanes take these in turn. */\nexport const CYCLE: NamedTone[] = ['success', 'info', 'warning', 'accent', 'danger', 'brand'];\n/**\n * A named tone, or for an item that names none, the brand's chart colour for its\n * place (color.chart.1 to 5), falling back to the status colours in turn.\n */\nexport const toneOf = (tone: Tone | undefined, i: number): string => {\n if (typeof tone === 'number') return `var(--impakt-color-chart-${tone}, ${TONE[CYCLE[(tone - 1) % CYCLE.length]!]})`;\n if (tone && tone in TONE) return TONE[tone];\n return `var(--impakt-color-chart-${(i % 5) + 1}, ${TONE[CYCLE[i % CYCLE.length]!]})`;\n};\n"],"mappings":";;;;;;;;;;;;;AAIA,SAAS,KAAK,MAAM,eAAoC;;;ACSjD,IAAM,OAAkC;AAAA,EAC7C,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AACV;AAEO,IAAM,QAAqB,CAAC,WAAW,QAAQ,WAAW,UAAU,UAAU,OAAO;AAKrF,IAAM,SAAS,CAAC,MAAwB,MAAsB;AACnE,MAAI,OAAO,SAAS,SAAU,QAAO,4BAA4B,IAAI,KAAK,KAAK,OAAO,OAAO,KAAK,MAAM,MAAM,CAAE,CAAC;AACjH,MAAI,QAAQ,QAAQ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H,MAAM,CAAC,CAAC,cAAc,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,aAAa,EAAE,UAAU,UAAU,EAAE,IAAI,oBAAoB,EAAE,MAAM,kBAAkB,EAAE,QAAQ;AAAA,8CACrL,IAAI,4FAA4F,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA,8BAI3H,MAAM,wBAAwB,SAAS,CAAC,2BAA2B,EAAE,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMrG;AAAA;AAAA,EAEA,SAAyB;AACvB,UAAM,OACJ,KAAK,SAAS,QACV,wBAAwB,KAAK,SAAS,YAAY,SAAS,EAAE,iCAC7D,KAAK,SAAS,WACZ,oQACA;AACR,WAAO,4CAA4C,UAAU,OAAO,KAAK,MAAM,CAAC,CAAC,EAAE,IAAI,IAAI,uBAAuB,KAAK,KAAK,UAAU,KAAK,OAAO,2BAA2B,KAAK,IAAI,YAAY,OAAO;AAAA,EAC3M;AACF;AAEA,eAAe,OAAO,eAAe,UAAU;","names":[]}
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
FieldElement,
|
|
3
3
|
fieldControl,
|
|
4
4
|
fieldWidths
|
|
5
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
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,KAA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