@atomic-ui/ui 0.13.1 → 0.13.2
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 +474 -3
- package/dist/base/FieldElement.d.ts +10 -0
- package/dist/{chunk-2BGOBD6Y.js → chunk-273AYERA.js} +2 -2
- package/dist/{chunk-EUOBFMWC.js → chunk-6IQIFKY6.js} +2 -2
- package/dist/{chunk-WEX5RKVC.js → chunk-BTACNWU6.js} +2 -2
- package/dist/{chunk-5OCDXZXG.js → chunk-C767LTJE.js} +3 -2
- package/dist/chunk-C767LTJE.js.map +1 -0
- package/dist/{chunk-RNFGIXJ7.js → chunk-CN4J5RS2.js} +2 -2
- package/dist/{chunk-SRXC6ZPM.js → chunk-DJLUWM3C.js} +10 -1
- package/dist/chunk-DJLUWM3C.js.map +1 -0
- package/dist/{chunk-F2MFV7RM.js → chunk-DKVLA7AF.js} +2 -2
- package/dist/{chunk-P5FAKEFK.js → chunk-GIIJ32FN.js} +2 -2
- package/dist/{chunk-LSEK5MEZ.js → chunk-H5HWJ2D4.js} +2 -2
- package/dist/{chunk-B2GWXXIW.js → chunk-JDKOHA3B.js} +2 -2
- package/dist/{chunk-G7CVRNY5.js → chunk-JX5RJRME.js} +5 -4
- package/dist/chunk-JX5RJRME.js.map +1 -0
- package/dist/{chunk-WT7MHYJR.js → chunk-KDU2POFS.js} +11 -5
- package/dist/chunk-KDU2POFS.js.map +1 -0
- package/dist/{chunk-EA3M6KPB.js → chunk-NCVBRUJM.js} +6 -1
- package/dist/chunk-NCVBRUJM.js.map +1 -0
- package/dist/{chunk-NZSKUEYS.js → chunk-VR543SMV.js} +2 -2
- package/dist/{chunk-QJBRENLI.js → chunk-WGFHYSXH.js} +7 -3
- package/dist/{chunk-QJBRENLI.js.map → chunk-WGFHYSXH.js.map} +1 -1
- package/dist/{chunk-PII4SJL5.js → chunk-X57BTN6V.js} +14 -2
- package/dist/chunk-X57BTN6V.js.map +1 -0
- package/dist/components/app-bar.d.ts +5 -4
- package/dist/components/app-bar.js +3 -3
- package/dist/components/app-ui.d.ts +4 -0
- package/dist/components/app-ui.js +2 -2
- package/dist/components/checkbox-group.d.ts +4 -0
- package/dist/components/checkbox-group.js +2 -2
- package/dist/components/checkbox.d.ts +4 -0
- package/dist/components/checkbox.js +2 -2
- package/dist/components/chip-group.d.ts +1 -0
- package/dist/components/chip-group.js +2 -2
- package/dist/components/chip.js +1 -1
- package/dist/components/date-input.d.ts +4 -0
- package/dist/components/date-input.js +2 -2
- package/dist/components/journey.d.ts +16 -0
- package/dist/components/journey.js +2 -2
- package/dist/components/navigation.d.ts +6 -0
- package/dist/components/navigation.js +5 -3
- package/dist/components/page.js +1 -1
- package/dist/components/radio-group.d.ts +4 -0
- package/dist/components/radio-group.js +2 -2
- package/dist/components/select.d.ts +4 -0
- package/dist/components/select.js +2 -2
- package/dist/components/switch.d.ts +8 -0
- package/dist/components/switch.js +2 -2
- package/dist/components/text-input.d.ts +4 -0
- package/dist/components/text-input.js +2 -2
- package/dist/components/textarea.d.ts +4 -0
- package/dist/components/textarea.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +19 -17
- package/dist/standalone/atomic-ui.js +149 -120
- package/dist/standalone/atomic-ui.js.map +3 -3
- package/package.json +2 -2
- package/dist/chunk-5OCDXZXG.js.map +0 -1
- package/dist/chunk-EA3M6KPB.js.map +0 -1
- package/dist/chunk-G7CVRNY5.js.map +0 -1
- package/dist/chunk-PII4SJL5.js.map +0 -1
- package/dist/chunk-SRXC6ZPM.js.map +0 -1
- package/dist/chunk-WT7MHYJR.js.map +0 -1
- /package/dist/{chunk-2BGOBD6Y.js.map → chunk-273AYERA.js.map} +0 -0
- /package/dist/{chunk-EUOBFMWC.js.map → chunk-6IQIFKY6.js.map} +0 -0
- /package/dist/{chunk-WEX5RKVC.js.map → chunk-BTACNWU6.js.map} +0 -0
- /package/dist/{chunk-RNFGIXJ7.js.map → chunk-CN4J5RS2.js.map} +0 -0
- /package/dist/{chunk-F2MFV7RM.js.map → chunk-DKVLA7AF.js.map} +0 -0
- /package/dist/{chunk-P5FAKEFK.js.map → chunk-GIIJ32FN.js.map} +0 -0
- /package/dist/{chunk-LSEK5MEZ.js.map → chunk-H5HWJ2D4.js.map} +0 -0
- /package/dist/{chunk-B2GWXXIW.js.map → chunk-JDKOHA3B.js.map} +0 -0
- /package/dist/{chunk-NZSKUEYS.js.map → chunk-VR543SMV.js.map} +0 -0
|
@@ -87,6 +87,10 @@ export declare abstract class FieldElement extends ImpaktElement {
|
|
|
87
87
|
type: StringConstructor;
|
|
88
88
|
attribute: string;
|
|
89
89
|
};
|
|
90
|
+
look: {
|
|
91
|
+
type: StringConstructor;
|
|
92
|
+
reflect: boolean;
|
|
93
|
+
};
|
|
90
94
|
};
|
|
91
95
|
label: string;
|
|
92
96
|
name: string;
|
|
@@ -105,6 +109,12 @@ export declare abstract class FieldElement extends ImpaktElement {
|
|
|
105
109
|
* so a partner can reword it, not so they can empty it.
|
|
106
110
|
*/
|
|
107
111
|
requiredText: string;
|
|
112
|
+
/**
|
|
113
|
+
* `default` takes the brand's field label; `site` is the mono uppercase label of the site's
|
|
114
|
+
* forms, as the G2 contact frame (20:1100) draws "NAME" and "MESSAGE" and as
|
|
115
|
+
* `impakt-chip-group look="site"` draws its own (#66).
|
|
116
|
+
*/
|
|
117
|
+
look: 'default' | 'site';
|
|
108
118
|
protected internals: ElementInternals | null;
|
|
109
119
|
constructor();
|
|
110
120
|
static styles: CSSResult[];
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
FieldElement,
|
|
6
6
|
fieldWidths
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-X57BTN6V.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-273AYERA.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FieldElement
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-X57BTN6V.js";
|
|
4
4
|
import {
|
|
5
5
|
targetSize,
|
|
6
6
|
touchTarget
|
|
@@ -89,4 +89,4 @@ customElements.define("impakt-checkbox", ImpaktCheckbox);
|
|
|
89
89
|
export {
|
|
90
90
|
ImpaktCheckbox
|
|
91
91
|
};
|
|
92
|
-
//# sourceMappingURL=chunk-
|
|
92
|
+
//# sourceMappingURL=chunk-6IQIFKY6.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
FieldElement,
|
|
3
3
|
fieldControl,
|
|
4
4
|
fieldWidths
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-X57BTN6V.js";
|
|
6
6
|
import {
|
|
7
7
|
visuallyHidden
|
|
8
8
|
} from "./chunk-72WNCCDC.js";
|
|
@@ -105,4 +105,4 @@ customElements.define("impakt-select", ImpaktSelect);
|
|
|
105
105
|
export {
|
|
106
106
|
ImpaktSelect
|
|
107
107
|
};
|
|
108
|
-
//# sourceMappingURL=chunk-
|
|
108
|
+
//# sourceMappingURL=chunk-BTACNWU6.js.map
|
|
@@ -61,8 +61,9 @@ 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
|
+
/* The edge is the border grey where the brand derives it, and ink under Noire (G2) (chip.outlined.edge, #69). */
|
|
64
65
|
/* 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")}; }
|
|
66
|
+
:host([look='outlined']) span.chip { border: ${t.borderThin} solid color-mix(in srgb, ${t.text} ${token("chip.outlined.edge", "0%")}, ${t.border}); background: ${t.surfaceCard}; letter-spacing: ${token("chip.outlined.tracking", "0.04em")}; }
|
|
66
67
|
:host([size='marketing']) span.chip { font-size: 11px; font-weight: ${fontWeight("medium")}; text-transform: uppercase; letter-spacing: 0.06em; }
|
|
67
68
|
/* Body: a 35px square box in the body face, for a row of tags such as a stack (G2 case study, 21:1493). */
|
|
68
69
|
: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; }
|
|
@@ -92,4 +93,4 @@ export {
|
|
|
92
93
|
toneOf,
|
|
93
94
|
ImpaktChip
|
|
94
95
|
};
|
|
95
|
-
//# sourceMappingURL=chunk-
|
|
96
|
+
//# sourceMappingURL=chunk-C767LTJE.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 /* The edge is the border grey where the brand derives it, and ink under Noire (G2) (chip.outlined.edge, #69). */\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 color-mix(in srgb, ${t.text} ${token('chip.outlined.edge', '0%')}, ${t.border}); 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,K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etSize,
|
|
6
6
|
touchTarget,
|
|
@@ -310,4 +310,4 @@ export {
|
|
|
310
310
|
ImpaktSwitch,
|
|
311
311
|
ImpaktSegmentedControl
|
|
312
312
|
};
|
|
313
|
-
//# sourceMappingURL=chunk-
|
|
313
|
+
//# sourceMappingURL=chunk-CN4J5RS2.js.map
|
|
@@ -228,6 +228,15 @@ var ImpaktAppBar = class extends ImpaktElement {
|
|
|
228
228
|
grid-template-areas: 'start end' 'pages pages';
|
|
229
229
|
padding-block: ${space(2)};
|
|
230
230
|
}
|
|
231
|
+
/* On its own row the track wraps rather than scrolls, so no page is cut off at the edge (#64). */
|
|
232
|
+
.pages {
|
|
233
|
+
overflow: visible;
|
|
234
|
+
}
|
|
235
|
+
.pages ul {
|
|
236
|
+
flex-wrap: wrap;
|
|
237
|
+
inline-size: fit-content;
|
|
238
|
+
max-inline-size: 100%;
|
|
239
|
+
}
|
|
231
240
|
}
|
|
232
241
|
@container (max-width: 30rem) {
|
|
233
242
|
.bar {
|
|
@@ -297,4 +306,4 @@ customElements.define("impakt-app-bar", ImpaktAppBar);
|
|
|
297
306
|
export {
|
|
298
307
|
ImpaktAppBar
|
|
299
308
|
};
|
|
300
|
-
//# sourceMappingURL=chunk-
|
|
309
|
+
//# sourceMappingURL=chunk-DJLUWM3C.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/app-bar.ts"],"sourcesContent":["/**\n * The frame every AI tool sits in: the app bar.\n */\nimport { css, html, nothing, type TemplateResult } from 'lit';\nimport { ImpaktElement } from '../base/ImpaktElement';\nimport { focusRing, touchTarget } from '../base/styles';\nimport { space, t, token } from '../base/tokens';\nimport { kit } from './tool-kit-tokens';\nimport type { MenuItem } from './app-ui';\nimport './app-ui';\n\nexport interface AppBarLink {\n label: string;\n href: string;\n /** The page that is showing. */\n current?: boolean;\n}\n\n/**\n * An item in the \"All tools\" switcher or the organisation menu. `group`,\n * `meta`, `current` and `disabled` are drawn by `impakt-menu`: the group's\n * heading (\"Tools\", \"Working in\", \"Account\"), a mono note on the right\n * (\"Open\", \"You are here\", \"Coming soon\"), the tool that is showing, and a\n * tool that cannot be opened yet.\n */\nexport type AppBarMenuItem = MenuItem & {\n group?: string;\n meta?: string;\n current?: boolean;\n disabled?: boolean;\n};\n\n/** The menu's parts, passed on under a prefix so a product can reach them from outside the bar. */\nconst MENU_PARTS = ['trigger', 'chevron', 'panel', 'header', 'list', 'group', 'group-label', 'item', 'current', 'label', 'meta'];\nconst exportPrefixed = (prefix: string): string => MENU_PARTS.map((part) => `${part}: ${prefix}-${part}`).join(', ');\nconst SWITCHER_PARTS = exportPrefixed('switcher');\nconst ORGANISATION_PARTS = exportPrefixed('organisation');\n\n/**\n * The bar at the top of every AI tool: the Impakt mark and the tool's name on\n * the left, the tool's own pages in the middle, and the way to other tools and\n * the organisation on the right.\n *\n * It is a `header` landmark, 56px tall. \"impakt\" links home; the tool's name\n * follows a \"/\". The tool's pages, when it has more than one, are a `nav`\n * drawn as a segmented track, and the page that is showing is marked with\n * `aria-current=\"page\"` as well as a dot, so it is never told by colour.\n *\n * On the right, the built-in \"All tools\" switcher is an `impakt-menu` of the\n * `switcher` items, grouped and annotated (Tools, Working in, Account). Put\n * your own controls in the `tools` slot to replace it, and put a language switch\n * or anything else before it in the `extra` slot. Then comes the organisation menu, from\n * `organisation-items`; or, when `signed-out`, a \"Sign in\" link in its place.\n *\n * **On a narrow screen the pages move to a second row** under the mark and\n * the menus, the full width of the bar, and the segmented track wraps onto\n * another line when they still do not fit, so every page stays in sight at 390\n * and at 320 (#64). Folding them away behind a button would hide where you\n * are, and a row that scrolls hides the pages past the edge with no sign that\n * they are there. The bar reflows to 320px without the page scrolling sideways.\n *\n * Figma: kit `33:361`, `33:365`; every tool screen, such as `36:431`, `36:642`,\n * `37:420`, `37:591`, `39:468`, `39:603`, `39:746`, `53:674`, `53:801`; signed\n * out `36:382`; dark `48:527`, `48:857`; the switcher open `53:960`, `53:800`.\n *\n * @category navigation\n * @icon menu\n * @slot tools - Replaces the built-in \"All tools\" switcher.\n * @slot extra - Before the \"All tools\" switcher, such as an `impakt-language-switch` (39:468).\n * @csspart bar - The header.\n * @csspart home - The link home.\n * @csspart pages - The tool's own pages.\n * @csspart sign-in - The sign-in link.\n * @csspart switcher-trigger - The \"All tools\" switcher's button.\n * @csspart switcher-chevron - The arrow on the switcher's button.\n * @csspart switcher-header - The box round the switcher's header, when it has one.\n * @csspart switcher-panel - The box the switcher opens, 340px wide as in `53:960`.\n * @csspart switcher-list - The switcher's list of items.\n * @csspart switcher-group - A group of the switcher's items, with its label.\n * @csspart switcher-group-label - A group's label in the switcher, such as \"Tools\".\n * @csspart switcher-item - An item in the switcher. The tool you are in is also `switcher-current`.\n * @csspart switcher-current - The switcher's item for the tool you are in.\n * @csspart switcher-label - An item's words in the switcher.\n * @csspart switcher-meta - An item's note in the switcher, such as \"Plans, team, billing\".\n * @csspart organisation-trigger - The organisation menu's button.\n * @csspart organisation-chevron - The arrow on the organisation menu's button.\n * @csspart organisation-panel - The box the organisation menu opens.\n * @csspart organisation-header - The box round the organisation menu's header, when it has one.\n * @csspart organisation-list - The organisation menu's list of items.\n * @csspart organisation-group - A group of the organisation menu's items, with its label.\n * @csspart organisation-group-label - A group's label in the organisation menu.\n * @csspart organisation-item - An item in the organisation menu. The page you are on is also `organisation-current`.\n * @csspart organisation-current - The organisation menu's item for the page you are on.\n * @csspart organisation-label - An item's words in the organisation menu.\n * @csspart organisation-meta - An item's note in the organisation menu.\n */\nexport class ImpaktAppBar extends ImpaktElement {\n static properties = {\n tool: { type: String },\n home: { type: String },\n brand: { type: String },\n links: { type: Array },\n pagesLabel: { type: String, attribute: 'pages-label' },\n switcher: { type: Array },\n switcherLabel: { type: String, attribute: 'switcher-label' },\n toolsHref: { type: String, attribute: 'tools-href' },\n organisation: { type: String },\n organisationItems: { type: Array, attribute: 'organisation-items' },\n organisationHref: { type: String, attribute: 'organisation-href' },\n signedOut: { type: Boolean, reflect: true, attribute: 'signed-out' },\n signInHref: { type: String, attribute: 'sign-in-href' },\n signInText: { type: String, attribute: 'sign-in-text' },\n };\n\n /** The tool's name, as it follows \"impakt /\": \"accessibility\". */\n declare tool: string;\n /** Where \"impakt\" leads. */\n declare home: string;\n /** The word beside the mark. */\n declare brand: string;\n /** The tool's own pages, drawn in the middle. */\n declare links: AppBarLink[];\n /** The name of the pages' navigation landmark. */\n declare pagesLabel: string;\n /** The \"All tools\" menu: the tools, where you are working, and the account. */\n declare switcher: AppBarMenuItem[];\n /** The switcher's button. */\n declare switcherLabel: string;\n /** With no `switcher` items, \"All tools\" is a link here instead. */\n declare toolsHref: string;\n /** The organisation's name on its menu button. */\n declare organisation: string;\n /** The organisation menu. */\n declare organisationItems: AppBarMenuItem[];\n /** With no `organisation-items`, the organisation is a link here instead. */\n declare organisationHref: string;\n /** Nobody is signed in: a \"Sign in\" link takes the organisation's place. */\n declare signedOut: boolean;\n declare signInHref: string;\n declare signInText: string;\n\n constructor() {\n super();\n this.tool = '';\n this.home = '/';\n this.brand = 'impakt';\n this.links = [];\n this.pagesLabel = 'Tool pages';\n this.switcher = [];\n this.switcherLabel = 'All tools';\n this.toolsHref = '';\n this.organisation = 'Your organisation';\n this.organisationItems = [];\n this.organisationHref = '';\n this.signedOut = false;\n this.signInHref = '/sign-in';\n this.signInText = 'Sign in';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n touchTarget('.home, .pages a, .sign-in, a.org, .all'),\n css`\n :host {\n display: block;\n container-type: inline-size;\n font-family: ${t.fontBody};\n font-size: ${kit.small};\n }\n .bar {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);\n grid-template-areas: 'start pages end';\n align-items: center;\n gap: ${space(2)} ${space(4)};\n min-block-size: 56px;\n padding: ${space(2)} ${space(4)};\n color: ${t.text};\n background: ${t.surfaceCard};\n border-block-end: 1px solid ${token('color.line.grid', 'light-dark(#DCDCD8, #1F1F1F)')};\n }\n .start {\n grid-area: start;\n display: flex;\n align-items: center;\n gap: ${space(2.5)};\n min-inline-size: 0;\n }\n .home {\n display: inline-flex;\n align-items: center;\n gap: ${space(2.5)};\n min-block-size: ${t.targetMin};\n color: inherit;\n text-decoration: none;\n }\n .home:hover .word {\n text-decoration: underline;\n text-underline-offset: 3px;\n }\n .mark {\n display: inline-grid;\n place-items: center;\n flex: none;\n inline-size: 28px;\n block-size: 28px;\n font-weight: ${kit.medium};\n color: ${kit.onInverse};\n background: ${kit.inverse};\n }\n .sep {\n color: ${t.textMuted};\n }\n .tool {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .pages {\n grid-area: pages;\n min-inline-size: 0;\n max-inline-size: 100%;\n overflow-x: auto;\n scrollbar-width: thin;\n }\n .pages ul {\n display: flex;\n inline-size: max-content;\n margin: 0;\n padding: 3px;\n list-style: none;\n background: ${t.surfaceSubtle};\n border: 1px solid ${kit.lineSoft};\n }\n .pages a {\n display: inline-flex;\n align-items: center;\n gap: ${space(1.5)};\n min-block-size: 28px;\n padding: 0 ${space(2.5)};\n font-weight: ${kit.regular};\n color: ${t.textMuted};\n text-decoration: none;\n white-space: nowrap;\n border: 1px solid transparent;\n }\n .pages a:hover {\n color: ${t.text};\n }\n .pages a[aria-current='page'] {\n color: ${t.text};\n background: ${t.surfaceCard};\n border-color: ${kit.lineSoft};\n }\n .dot {\n inline-size: 5px;\n block-size: 5px;\n border-radius: 50%;\n background: currentColor;\n }\n .end {\n grid-area: end;\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: flex-end;\n gap: ${space(2)} ${space(3)};\n min-inline-size: 0;\n }\n .all {\n color: ${t.textMuted};\n text-decoration: none;\n display: inline-flex;\n align-items: center;\n min-block-size: ${t.targetMin};\n }\n .all:hover {\n color: ${t.text};\n text-decoration: underline;\n }\n impakt-menu.switcher::part(trigger) {\n padding: ${space(1)} ${space(1)};\n font-family: ${t.fontBody};\n font-size: ${kit.small};\n font-weight: ${kit.regular};\n color: ${t.textMuted};\n background: transparent;\n border: 0;\n border-radius: 0;\n box-shadow: none;\n }\n impakt-menu.switcher::part(trigger):hover {\n color: ${t.text};\n }\n impakt-menu::part(chevron) {\n color: inherit;\n }\n /* The switcher's panel is 340 wide (53:960), so \"Your account\" and \"Plans, team, billing\" sit on one line.\n On a 390 screen that still leaves the 16px gutters; narrower than that it keeps to the gutters and the words may wrap. */\n impakt-menu.switcher::part(panel) {\n inline-size: min(21.25rem, calc(100vw - 2 * ${space(4)}));\n max-inline-size: none;\n }\n impakt-menu.org::part(trigger),\n a.org,\n .sign-in {\n display: inline-flex;\n align-items: center;\n gap: ${space(2)};\n padding: 9px 14px;\n font-family: ${t.fontBody};\n font-size: ${kit.small};\n font-weight: ${kit.medium};\n color: ${t.text};\n background: ${t.surfaceCard};\n border: 1px solid ${t.text};\n border-radius: 0;\n box-shadow: none;\n text-decoration: none;\n }\n impakt-menu.org::part(trigger):hover,\n a.org:hover,\n .sign-in:hover {\n background: ${t.surfaceSubtle};\n }\n @container (max-width: 56rem) {\n .bar {\n grid-template-columns: minmax(0, 1fr) auto;\n grid-template-areas: 'start end' 'pages pages';\n padding-block: ${space(2)};\n }\n /* On its own row the track wraps rather than scrolls, so no page is cut off at the edge (#64). */\n .pages {\n overflow: visible;\n }\n .pages ul {\n flex-wrap: wrap;\n inline-size: fit-content;\n max-inline-size: 100%;\n }\n }\n @container (max-width: 30rem) {\n .bar {\n grid-template-columns: minmax(0, 1fr);\n grid-template-areas: 'start' 'end' 'pages';\n padding-inline: ${space(4)};\n }\n .end {\n justify-content: flex-start;\n }\n }\n @media (forced-colors: active) {\n .pages a[aria-current='page'] {\n border-color: CanvasText;\n }\n .mark {\n border: 1px solid CanvasText;\n }\n }\n `,\n ];\n\n private renderPages(): TemplateResult | typeof nothing {\n if (!this.links.length) return nothing;\n return html`<nav class=\"pages\" part=\"pages\" aria-label=${this.pagesLabel}>\n <ul>\n ${this.links.map(\n (link) =>\n html`<li>\n <a href=${link.href} aria-current=${link.current ? 'page' : nothing}\n >${link.current ? html`<span class=\"dot\" aria-hidden=\"true\"></span>` : nothing}${link.label}</a\n >\n </li>`,\n )}\n </ul>\n </nav>`;\n }\n\n private renderSwitcher(): TemplateResult | typeof nothing {\n if (this.switcher.length)\n return html`<impakt-menu class=\"switcher\" exportparts=${SWITCHER_PARTS} edge=\"end\" trigger-look=\"text\" .label=${this.switcherLabel} .items=${this.switcher as MenuItem[]}></impakt-menu>`;\n if (this.toolsHref) return html`<a class=\"all\" href=${this.toolsHref}>${this.switcherLabel}</a>`;\n return nothing;\n }\n\n private renderAccount(): TemplateResult | typeof nothing {\n if (this.signedOut) return html`<a class=\"sign-in\" part=\"sign-in\" href=${this.signInHref}>${this.signInText}</a>`;\n if (this.organisationItems.length)\n return html`<impakt-menu class=\"org\" exportparts=${ORGANISATION_PARTS} edge=\"end\" trigger-look=\"text\" .label=${this.organisation} .items=${this.organisationItems as MenuItem[]}></impakt-menu>`;\n if (this.organisationHref) return html`<a class=\"org\" href=${this.organisationHref}>${this.organisation}</a>`;\n return nothing;\n }\n\n render(): TemplateResult {\n return html`<header class=\"bar\" part=\"bar\">\n <div class=\"start\">\n <a class=\"home\" part=\"home\" href=${this.home}><span class=\"mark\" aria-hidden=\"true\">i</span><span class=\"word\">${this.brand}</span></a>\n ${this.tool ? html`<span class=\"sep\" aria-hidden=\"true\">/</span><span class=\"tool\">${this.tool}</span>` : nothing}\n </div>\n ${this.renderPages()}\n <div class=\"end\">\n <slot name=\"extra\"></slot>\n <slot name=\"tools\">${this.renderSwitcher()}</slot>\n ${this.renderAccount()}\n </div>\n </header>`;\n }\n}\n\ncustomElements.define('impakt-app-bar', ImpaktAppBar);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-app-bar': ImpaktAppBar;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAGA,SAAS,KAAK,MAAM,eAAoC;AA8BxD,IAAM,aAAa,CAAC,WAAW,WAAW,SAAS,UAAU,QAAQ,SAAS,eAAe,QAAQ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
@@ -130,4 +130,4 @@ customElements.define("impakt-checkbox-group", ImpaktCheckboxGroup);
|
|
|
130
130
|
export {
|
|
131
131
|
ImpaktCheckboxGroup
|
|
132
132
|
};
|
|
133
|
-
//# sourceMappingURL=chunk-
|
|
133
|
+
//# sourceMappingURL=chunk-DKVLA7AF.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FieldElement
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-X57BTN6V.js";
|
|
4
4
|
import {
|
|
5
5
|
say
|
|
6
6
|
} from "./chunk-72WNCCDC.js";
|
|
@@ -137,4 +137,4 @@ customElements.define("impakt-date-input", ImpaktDateInput);
|
|
|
137
137
|
export {
|
|
138
138
|
ImpaktDateInput
|
|
139
139
|
};
|
|
140
|
-
//# sourceMappingURL=chunk-
|
|
140
|
+
//# sourceMappingURL=chunk-GIIJ32FN.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FieldElement
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-X57BTN6V.js";
|
|
4
4
|
import {
|
|
5
5
|
targetSize
|
|
6
6
|
} from "./chunk-72WNCCDC.js";
|
|
@@ -138,4 +138,4 @@ customElements.define("impakt-radio-group", ImpaktRadioGroup);
|
|
|
138
138
|
export {
|
|
139
139
|
ImpaktRadioGroup
|
|
140
140
|
};
|
|
141
|
-
//# sourceMappingURL=chunk-
|
|
141
|
+
//# sourceMappingURL=chunk-H5HWJ2D4.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
FieldElement,
|
|
3
3
|
fieldControl,
|
|
4
4
|
fieldWidths
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-X57BTN6V.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-JDKOHA3B.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-XX6JZW5N.js";
|
|
4
4
|
import {
|
|
5
5
|
FieldElement
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-X57BTN6V.js";
|
|
7
7
|
import {
|
|
8
8
|
space,
|
|
9
9
|
t
|
|
@@ -45,7 +45,8 @@ var ImpaktChipGroup = class extends FieldElement {
|
|
|
45
45
|
}
|
|
46
46
|
:host([look='site']) legend {
|
|
47
47
|
font-family: ${t.fontMono};
|
|
48
|
-
|
|
48
|
+
/* G2 Mono S is 11px (20:1100); the ramp's 2xs is 12px, so the size is set here, as the text fields' site label is. */
|
|
49
|
+
font-size: 0.6875rem;
|
|
49
50
|
font-weight: ${kit.medium};
|
|
50
51
|
text-transform: uppercase;
|
|
51
52
|
letter-spacing: 0.06em;
|
|
@@ -54,7 +55,7 @@ var ImpaktChipGroup = class extends FieldElement {
|
|
|
54
55
|
.chips {
|
|
55
56
|
display: flex;
|
|
56
57
|
flex-wrap: wrap;
|
|
57
|
-
gap: ${space(1.5)};
|
|
58
|
+
gap: var(--impakt-chip-group-gap, ${space(1.5)});
|
|
58
59
|
}
|
|
59
60
|
.chip {
|
|
60
61
|
position: relative;
|
|
@@ -198,4 +199,4 @@ customElements.define("impakt-chip-group", ImpaktChipGroup);
|
|
|
198
199
|
export {
|
|
199
200
|
ImpaktChipGroup
|
|
200
201
|
};
|
|
201
|
-
//# sourceMappingURL=chunk-
|
|
202
|
+
//# sourceMappingURL=chunk-JX5RJRME.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/chip-group.ts"],"sourcesContent":["/**\n * A choice made with square chips: one, or several.\n */\nimport { html, css, nothing, type TemplateResult } from 'lit';\nimport { FieldElement } from '../base/FieldElement';\nimport { space, t } from '../base/tokens';\nimport { kit } from './tool-kit-tokens';\n\nexport interface ChipOption {\n value: string;\n label: string;\n}\n\n/**\n * A short choice drawn as a row of square chips, such as \"What do you need\"\n * or \"Budget\" on a brief form, or the answers in an estimator.\n *\n * **Under each chip is a native control.** A single choice is a set of radios\n * and several is a set of checkboxes, so a single choice has the arrow keys,\n * Home and End and the right announcement without any script, and each\n * checkbox is its own tab stop, as it should be. The control lies over its\n * chip, invisible, so the whole chip is what is pressed and a screen reader\n * exploring by touch finds it where it is drawn.\n *\n * The question is a `legend` in a `fieldset`, because it is asked of the set.\n * `look=\"site\"` draws it in the site's form style: mono, uppercase, 11px.\n *\n * It joins its form like the other fields. A single choice submits its value;\n * several submit their values joined with commas, in the options' order.\n * `required` with nothing chosen makes the form invalid.\n *\n * Figma: site brief form `20:1157`; estimator `10:547`, `10:557`; mobile `15:945`.\n *\n * @category form\n * @icon checkbox\n * @csspart chip - Each chip.\n * @csspart fieldset - The fieldset.\n * @cssprop --impakt-chip-group-gap - The space between the chips, 6px unless set; the estimator sets 8px, as its frame does (`10:547`).\n */\nexport class ImpaktChipGroup extends FieldElement {\n static properties = {\n ...FieldElement.properties,\n options: { type: Array },\n values: { type: Array },\n multiple: { type: Boolean, reflect: true },\n look: { type: String, reflect: true },\n missingText: { type: String, attribute: 'missing-text' },\n };\n\n declare options: ChipOption[];\n /** What is chosen when `multiple` is set. */\n declare values: string[];\n /** Choose several, as checkboxes, rather than one, as radios. */\n declare multiple: boolean;\n /** `default` takes the product's field label; `site` is the mono uppercase label of the site's forms. */\n declare look: 'default' | 'site';\n /** What the browser says when a required choice is missing. */\n declare missingText: string;\n\n constructor() {\n super();\n this.options = [];\n this.values = [];\n this.multiple = false;\n this.look = 'default';\n this.missingText = 'Choose an option';\n }\n\n static styles = [\n ...FieldElement.styles,\n css`\n fieldset {\n border: 0;\n margin: 0;\n padding: 0;\n min-inline-size: 0;\n }\n legend {\n padding: 0;\n }\n :host([look='site']) legend {\n font-family: ${t.fontMono};\n /* G2 Mono S is 11px (20:1100); the ramp's 2xs is 12px, so the size is set here, as the text fields' site label is. */\n font-size: 0.6875rem;\n font-weight: ${kit.medium};\n text-transform: uppercase;\n letter-spacing: 0.06em;\n margin-block-end: ${space(2)};\n }\n .chips {\n display: flex;\n flex-wrap: wrap;\n gap: var(--impakt-chip-group-gap, ${space(1.5)});\n }\n .chip {\n position: relative;\n display: inline-flex;\n align-items: center;\n min-block-size: 35px;\n padding: 0 ${space(3)};\n font-family: ${t.fontBody};\n font-size: ${kit.small};\n color: ${t.text};\n background: ${t.surfaceCard};\n border: 1px solid ${t.text};\n border-radius: 0;\n cursor: pointer;\n }\n .chip input {\n position: absolute;\n inset: 0;\n inline-size: 100%;\n block-size: 100%;\n margin: 0;\n opacity: 0;\n cursor: inherit;\n }\n .chip:hover {\n background: ${t.surfaceSubtle};\n }\n .chip.on {\n color: ${kit.onInverse};\n background: ${kit.inverse};\n }\n .chip:has(input:focus-visible) {\n outline: 2px solid transparent;\n outline-offset: ${t.focusOffset};\n box-shadow: ${t.focusShadow};\n }\n :host([disabled]) .chip {\n opacity: 0.6;\n cursor: not-allowed;\n }\n :host([invalid]) .chip {\n border-color: ${t.danger};\n }\n @media (pointer: coarse) {\n .chip {\n min-block-size: 44px;\n }\n }\n @media (forced-colors: active) {\n .chip {\n border-color: ButtonText;\n }\n .chip.on {\n forced-color-adjust: none;\n color: HighlightText;\n background: Highlight;\n border-color: Highlight;\n }\n .chip:has(input:focus-visible) {\n outline-color: Highlight;\n }\n }\n `,\n ];\n\n protected renderLabel(): TemplateResult {\n return html`<legend class=\"label\" part=\"label\">\n ${this.label}${this.required ? html`<span class=\"required\"> (${this.requiredText})</span>` : nothing}\n </legend>`;\n }\n\n private chosen(value: string): boolean {\n return this.multiple ? this.values.includes(value) : this.value === value;\n }\n\n private choose(value: string, checked: boolean): void {\n if (this.multiple) {\n const next = checked ? [...this.values, value] : this.values.filter((v) => v !== value);\n this.values = this.options.filter((o) => next.includes(o.value)).map((o) => o.value);\n this.setFormValue(this.values.join(','));\n } else this.setFormValue(value);\n this.syncValidity();\n }\n\n private syncValidity(): void {\n const empty = this.multiple ? this.values.length === 0 : !this.value;\n try {\n if (this.required && empty) {\n const anchor = this.renderRoot?.querySelector?.('input') ?? undefined;\n this.internals?.setValidity({ valueMissing: true }, this.missingText, anchor as HTMLElement | undefined);\n } else this.internals?.setValidity({});\n } catch {\n // An engine without ElementInternals validity still has a working control.\n }\n }\n\n protected renderControl(): TemplateResult {\n const type = this.multiple ? 'checkbox' : 'radio';\n return html`<div class=\"chips\">\n ${this.options.map((option, i) => {\n const on = this.chosen(option.value);\n return html`<label class=\"chip ${on ? 'on' : ''}\" part=\"chip\">\n <input\n type=${type}\n id=${i === 0 ? this.controlId : this.id_(`opt-${i}`)}\n name=${this.uid}\n value=${option.value}\n .checked=${on}\n ?disabled=${this.disabled}\n ?required=${!this.multiple && this.required && i === 0}\n @change=${(e: Event) => this.choose(option.value, (e.target as HTMLInputElement).checked)}\n /><span>${option.label}</span>\n </label>`;\n })}\n </div>`;\n }\n\n render(): TemplateResult {\n return html`\n <fieldset part=\"fieldset\" aria-describedby=${this.describedBy} aria-invalid=${this.error ? 'true' : nothing}>\n ${this.renderLabel()}\n ${this.description ? html`<div class=\"description\" id=${this.id_('description')} part=\"description\">${this.description}</div>` : nothing}\n ${this.renderControl()}\n <div class=\"error\" id=${this.id_('error')} part=\"error\" aria-live=\"polite\">${this.error || nothing}</div>\n </fieldset>\n `;\n }\n\n firstUpdated(): void {\n const initial = this.multiple ? this.values.join(',') : this.value;\n this.internals?.setFormValue(initial || null);\n this.syncValidity();\n }\n\n updated(changed: Map<string, unknown>): void {\n if (changed.has('error')) this.toggleAttribute('invalid', Boolean(this.error));\n if (changed.has('required') || changed.has('multiple')) this.syncValidity();\n }\n\n /** A form reset clears the choice. */\n formResetCallback(): void {\n this.value = '';\n this.values = [];\n this.internals?.setFormValue(null);\n this.syncValidity();\n }\n}\n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K,CAAC;AAC7E,QAAI,QAAQ,IAAI,UAAU,KAAK,QAAQ,IAAI,UAAU,EAAG,MAAK,aAAa;AAAA,EAC5E;AAAA;AAAA,EAGA,oBAA0B;AACxB,SAAK,QAAQ;AACb,SAAK,SAAS,CAAC;AACf,SAAK,WAAW,aAAa,IAAI;AACjC,SAAK,aAAa;AAAA,EACpB;AACF;AAEA,eAAe,OAAO,qBAAqB,eAAe;","names":[]}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
+
F,
|
|
2
3
|
FieldElement,
|
|
3
4
|
fieldControl,
|
|
4
5
|
fieldWidths
|
|
5
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-X57BTN6V.js";
|
|
6
7
|
|
|
7
8
|
// packages/ui/src/components/textarea.ts
|
|
8
9
|
import { html, css, nothing } from "lit";
|
|
@@ -35,9 +36,13 @@ var ImpaktTextarea = class extends FieldElement {
|
|
|
35
36
|
fieldControl("textarea"),
|
|
36
37
|
css`
|
|
37
38
|
textarea {
|
|
38
|
-
/*
|
|
39
|
-
can be made bigger, and a fixed box is where that stops working.
|
|
40
|
-
|
|
39
|
+
/* Every brand but Impakt keeps the resize grip: 1.4.4 and 1.4.12 both assume text
|
|
40
|
+
can be made bigger, and a fixed box is where that stops working. The G2 textarea
|
|
41
|
+
(20:1100) draws no grip, so under Impakt the box grows with its words instead
|
|
42
|
+
(field.resize and field.sizing), never shorter than its rows (#66). */
|
|
43
|
+
resize: var(--impakt-field-resize, vertical);
|
|
44
|
+
field-sizing: var(--impakt-field-sizing, fixed);
|
|
45
|
+
min-block-size: calc(var(--impakt-textarea-rows, 4) * 1lh + 2 * ${F.paddingBlock} + 2px);
|
|
41
46
|
}
|
|
42
47
|
`
|
|
43
48
|
];
|
|
@@ -70,6 +75,7 @@ var ImpaktTextarea = class extends FieldElement {
|
|
|
70
75
|
part="textarea"
|
|
71
76
|
name=${this.name || nothing}
|
|
72
77
|
rows=${this.rows}
|
|
78
|
+
style=${`--impakt-textarea-rows: ${this.rows}`}
|
|
73
79
|
maxlength=${this.maxlength ?? nothing}
|
|
74
80
|
placeholder=${this.placeholder || nothing}
|
|
75
81
|
?disabled=${this.disabled}
|
|
@@ -95,4 +101,4 @@ customElements.define("impakt-textarea", ImpaktTextarea);
|
|
|
95
101
|
export {
|
|
96
102
|
ImpaktTextarea
|
|
97
103
|
};
|
|
98
|
-
//# sourceMappingURL=chunk-
|
|
104
|
+
//# sourceMappingURL=chunk-KDU2POFS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/textarea.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { F, FieldElement, fieldControl, fieldWidths } from '../base/FieldElement';\n\n/** Several lines of text — a delivery instruction, an additional note.\n *\n * @category form\n * @icon field\n */\nexport class ImpaktTextarea extends FieldElement {\n static properties = {\n ...FieldElement.properties,\n width: { type: String, reflect: true },\n rows: { type: Number },\n maxlength: { type: Number },\n fillFrom: { type: String, attribute: 'fill-from' },\n placeholder: { type: String },\n };\n\n declare rows: number;\n declare maxlength: number | undefined;\n /** `estimate` starts an empty box with the estimate a cost estimator sent on, so the visitor can edit it. */\n declare fillFrom: 'none' | 'estimate';\n /** An example of what to write. The label is still the field's name; a placeholder never replaces it. */\n declare placeholder: string;\n\n /** How wide the box is, to suit the answer. Full width on a phone whatever this says. */\n declare width: 'full' | 'lg' | 'md' | 'sm' | 'xs';\n\n constructor() {\n super();\n this.width = 'full';\n this.rows = 4;\n this.maxlength = undefined;\n this.fillFrom = 'none';\n this.placeholder = '';\n }\n\n static styles = [\n ...FieldElement.styles,\n fieldWidths,\n fieldControl('textarea'),\n css`\n textarea {\n /* Every brand but Impakt keeps the resize grip: 1.4.4 and 1.4.12 both assume text\n can be made bigger, and a fixed box is where that stops working. The G2 textarea\n (20:1100) draws no grip, so under Impakt the box grows with its words instead\n (field.resize and field.sizing), never shorter than its rows (#66). */\n resize: var(--impakt-field-resize, vertical);\n field-sizing: var(--impakt-field-sizing, fixed);\n min-block-size: calc(var(--impakt-textarea-rows, 4) * 1lh + 2 * ${F.paddingBlock} + 2px);\n }\n `,\n ];\n\n private filled = false;\n /** The estimate it was filled with, kept until the visitor edits it, so a binding that has not caught up yet cannot empty the box. */\n private filledText = '';\n\n /** @ignore */\n protected willUpdate(changed: Map<string, unknown>): void {\n super.willUpdate?.(changed as never);\n if (this.filledText && changed.has('value') && !this.value) this.value = this.filledText;\n }\n\n /** Fills the box once, when it is first asked to and is still empty. Props can arrive after the element joins the page. */\n private fill(): void {\n if (this.filled || this.fillFrom !== 'estimate') return;\n this.filled = true;\n if (this.value) return;\n let saved: string | null = null;\n try {\n saved = sessionStorage.getItem('impakt.estimate');\n } catch {\n saved = null;\n }\n if (saved) {\n this.filledText = saved;\n this.setFormValue(saved);\n }\n }\n\n protected renderControl(): TemplateResult {\n return html`\n <textarea\n id=${this.controlId}\n part=\"textarea\"\n name=${this.name || nothing}\n rows=${this.rows}\n style=${`--impakt-textarea-rows: ${this.rows}`}\n maxlength=${this.maxlength ?? nothing}\n placeholder=${this.placeholder || nothing}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n ?required=${this.required}\n aria-describedby=${this.describedBy}\n aria-invalid=${this.error ? 'true' : nothing}\n .value=${this.value}\n @input=${(e: Event) => {\n this.filledText = '';\n this.setFormValue((e.target as HTMLTextAreaElement).value);\n }}\n ></textarea>\n `;\n }\n\n updated(changed: Map<string, unknown>): void {\n if (changed.has('error')) this.toggleAttribute('invalid', Boolean(this.error));\n this.fill();\n }\n}\n\ncustomElements.define('impakt-textarea', ImpaktTextarea);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-textarea': ImpaktTextarea;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,MAAM,KAAK,eAAoC;AAQjD,IAAM,iBAAN,cAA6B,aAAa;AAAA,EAoB/C,cAAc;AACZ,UAAM;AAyBR,SAAQ,SAAS;AAEjB;AAAA,SAAQ,a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a,OAAO;AAAA,sBACvB,KAAK,eAAe,OAAO;AAAA,oBAC7B,KAAK,QAAQ;AAAA,oBACb,KAAK,QAAQ;AAAA,oBACb,KAAK,QAAQ;AAAA,2BACN,KAAK,WAAW;AAAA,uBACpB,KAAK,QAAQ,SAAS,OAAO;AAAA,iBACnC,KAAK,KAAK;AAAA,iBACV,CAAC,MAAa;AACrB,WAAK,aAAa;AAClB,WAAK,aAAc,EAAE,OAA+B,KAAK;AAAA,IAC3D,CAAC;AAAA;AAAA;AAAA,EAGP;AAAA,EAEA,QAAQ,SAAqC;AAC3C,QAAI,QAAQ,IAAI,OAAO,EAAG,MAAK,gBAAgB,WAAW,QAAQ,KAAK,KAAK,CAAC;AAC7E,SAAK,KAAK;AAAA,EACZ;AACF;AAEA,eAAe,OAAO,mBAAmB,cAAc;","names":[]}
|
|
@@ -17,6 +17,10 @@ import {
|
|
|
17
17
|
|
|
18
18
|
// packages/ui/src/components/navigation.ts
|
|
19
19
|
import { css, html, nothing } from "lit";
|
|
20
|
+
function linkCurrent(href, current = "") {
|
|
21
|
+
if (current) return href === current ? "page" : null;
|
|
22
|
+
return where(href);
|
|
23
|
+
}
|
|
20
24
|
function where(href) {
|
|
21
25
|
if (typeof location === "undefined" || !href || href.startsWith("#")) return null;
|
|
22
26
|
let path;
|
|
@@ -271,7 +275,8 @@ customElements.define("impakt-nav", ImpaktNav);
|
|
|
271
275
|
customElements.define("impakt-breadcrumbs", ImpaktBreadcrumbs);
|
|
272
276
|
|
|
273
277
|
export {
|
|
278
|
+
linkCurrent,
|
|
274
279
|
ImpaktNav,
|
|
275
280
|
ImpaktBreadcrumbs
|
|
276
281
|
};
|
|
277
|
-
//# sourceMappingURL=chunk-
|
|
282
|
+
//# sourceMappingURL=chunk-NCVBRUJM.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/**\n * Whether a link is the page the visitor is on, or a page above it. Given `current`, the href of\n * the page as the page itself names it, only that link is the page; otherwise it is worked out\n * from the address, and on a server, where there is no address, nothing is.\n */\nexport function linkCurrent(href: string, current = ''): 'page' | 'section' | null {\n if (current) return href === current ? 'page' : null;\n return where(href);\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;AAkBjD,SAAS,YAAY,MAAc,UAAU,IAA+B;AACjF,MAAI,QAAS,QAAO,SAAS,UAAU,SAAS;AAChD,SAAO,MAAM,IAAI;AACnB;AAGA,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,OAAO,EAAE,KAAK;AAAA,EAC5C,QAAQ;AACN,WAAO;AAAA,EACT;AACA,QAAM,OAAO,SAAS,SAAS,QAAQ,OAAO,EAAE,KAAK;AACrD,MAAI,SAAS,KAAM,QAAO;AAC1B,SAAO,SAAS,OAAO,KAAK,WAAW,GAAG,IAAI,GAAG,IAAI,YAAY;AACnE;AAiBO,IAAM,YAAN,cAAwB,cAAc;AAAA,EA4D3C,cAAc;AACZ,UAAM;AAVR;AAAA,SAAQ,WAAW;AAgGnB;AAAA,SAAQ,QAAQ;AArFd,SAAK,QAAQ,CAAC;AACd,SAAK,QAAQ;AACb,SAAK,WAAW;AAChB,SAAK,WAAW;AAChB,SAAK,OAAO;AACZ,SAAK,QAAQ;AACb,SAAK,OAAO;AACZ,SAAK,aAAa;AAClB,SAAK,aAAa;AAClB,SAAK,OAAO;AACZ,SAAK,UAAU;AAAA,EACjB;AAAA,EAxEA;AAAA,SAAO,aAAa;AAAA,MAClB,OAAO,EAA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;AAAA,iBACzJ,cAAc;AAAA;AAAA,IAE7B;AAAA;AAAA,EAEA,SAAyB;AACvB,UAAM,QAAQ,KAAK,SAAS,CAAC;AAC7B,WAAO,uBAAuB,KAAK,KAAK;AAAA,QACpC,MAAM;AAAA,MACN,CAAC,MAAM,MACL,WACE,MAAM,MAAM,SAAS,IAAI,iCAAiC,KAAK,KAAK,YAAY,eAAe,KAAK,IAAI,gBAAgB,KAAK,KAAK,MACpI;AAAA,IACJ,CAAC;AAAA;AAAA,EAEL;AACF;AAEA,eAAe,OAAO,cAAc,SAAS;AAC7C,eAAe,OAAO,sBAAsB,iBAAiB;","names":[]}
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-UNGAG44M.js";
|
|
4
4
|
import {
|
|
5
5
|
FieldElement
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-X57BTN6V.js";
|
|
7
7
|
import {
|
|
8
8
|
lockScroll,
|
|
9
9
|
unlockScroll
|
|
@@ -695,4 +695,4 @@ export {
|
|
|
695
695
|
ImpaktEmptyState,
|
|
696
696
|
ImpaktSlotPicker
|
|
697
697
|
};
|
|
698
|
-
//# sourceMappingURL=chunk-
|
|
698
|
+
//# sourceMappingURL=chunk-VR543SMV.js.map
|
|
@@ -192,10 +192,14 @@ var ImpaktSection = class extends ImpaktElement {
|
|
|
192
192
|
:host([tone='brand']) .band { --impakt-color-text-inverse: ${t.brand}; }
|
|
193
193
|
:host([tone='accent']) .band { --impakt-color-text-inverse: var(--impakt-solid-card); }
|
|
194
194
|
:host([tone='brand']) .band { background: ${t.brand}; color: ${t.onBrand}; --impakt-eyebrow: ${t.onBrand}; --impakt-color-surface-card: color-mix(in srgb, ${t.onBrand} 10%, transparent); --impakt-color-text-heading: ${t.onBrand}; --impakt-color-text-default: ${t.onBrand}; --impakt-color-text-muted: ${t.onBrand}; --impakt-color-text-link: ${t.onBrand}; --impakt-color-text-link-hover: ${t.onBrand}; }
|
|
195
|
-
/*
|
|
195
|
+
/*
|
|
196
|
+
* Ink and accent bands take their colours from the host, because the band repaints the text colour for what is inside it.
|
|
197
|
+
* A block that draws its own ink panel off a band, such as the process line, leaves it out on one (--impakt-band-panel,
|
|
198
|
+
* --impakt-band-panel-inset), so the band and its pattern show through.
|
|
199
|
+
*/
|
|
196
200
|
:host([tone='ink']) { --impakt-band: ${t.text}; --impakt-band-on: ${t.surfaceCard}; --impakt-band-muted: color-mix(in srgb, ${t.surfaceCard} 78%, ${t.text}); --impakt-solid-card: ${t.surfaceCard}; --impakt-solid-text: ${t.text}; --impakt-solid-heading: var(--impakt-color-text-heading, ${t.text}); --impakt-solid-muted: ${t.textMuted}; }
|
|
197
201
|
:host([tone='accent']) { --impakt-band: ${token("color.accent.default", "#ffd43b")}; --impakt-band-on: ${token("color.accent.on", "#1a1a1a")}; --impakt-band-muted: ${token("color.accent.on", "#1a1a1a")}; --impakt-solid-card: ${t.surfaceCard}; --impakt-solid-text: ${t.text}; --impakt-solid-heading: var(--impakt-color-text-heading, ${t.text}); --impakt-solid-muted: ${t.textMuted}; }
|
|
198
|
-
:host(:is([tone='ink'], [tone='accent'])) .band { background-color: var(--impakt-band); color: var(--impakt-band-on); --impakt-eyebrow: var(--impakt-band-muted); --impakt-color-surface-card: color-mix(in srgb, var(--impakt-band-on) 10%, transparent); --impakt-color-text-heading: var(--impakt-band-on); --impakt-color-text-default: var(--impakt-band-on); --impakt-color-text-muted: var(--impakt-band-muted); --impakt-color-text-link: var(--impakt-band-on); --impakt-color-text-link-hover: var(--impakt-band-on); }
|
|
202
|
+
:host(:is([tone='ink'], [tone='accent'])) .band { background-color: var(--impakt-band); color: var(--impakt-band-on); --impakt-band-panel: transparent; --impakt-band-panel-inset: 0px; --impakt-eyebrow: var(--impakt-band-muted); --impakt-color-surface-card: color-mix(in srgb, var(--impakt-band-on) 10%, transparent); --impakt-color-text-heading: var(--impakt-band-on); --impakt-color-text-default: var(--impakt-band-on); --impakt-color-text-muted: var(--impakt-band-muted); --impakt-color-text-link: var(--impakt-band-on); --impakt-color-text-link-hover: var(--impakt-band-on); }
|
|
199
203
|
/* On ink the cards are the raised ink with a darker rule (G2 ink-raised and line-inverse), not a wash. */
|
|
200
204
|
:host([tone='ink']) .band {
|
|
201
205
|
--impakt-color-text-inverse: var(--impakt-band);
|
|
@@ -238,4 +242,4 @@ export {
|
|
|
238
242
|
ImpaktPage,
|
|
239
243
|
ImpaktSection
|
|
240
244
|
};
|
|
241
|
-
//# sourceMappingURL=chunk-
|
|
245
|
+
//# sourceMappingURL=chunk-WGFHYSXH.js.map
|