@atomic-ui/ui 0.12.0 → 0.12.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.
@@ -16222,6 +16222,18 @@
16222
16222
  "attribute": "width",
16223
16223
  "reflects": true
16224
16224
  },
16225
+ {
16226
+ "kind": "field",
16227
+ "name": "size",
16228
+ "privacy": "public",
16229
+ "type": {
16230
+ "text": "'md' | 'sm'"
16231
+ },
16232
+ "description": "`sm` is a compact 32px box for a filter in a toolbar, such as \"Page: All pages\" above a list. It still meets the 24px target size.",
16233
+ "default": "'md'",
16234
+ "attribute": "size",
16235
+ "reflects": true
16236
+ },
16225
16237
  {
16226
16238
  "kind": "method",
16227
16239
  "name": "renderControl",
@@ -16575,6 +16587,15 @@
16575
16587
  "default": "false",
16576
16588
  "fieldName": "hideLabel"
16577
16589
  },
16590
+ {
16591
+ "name": "size",
16592
+ "type": {
16593
+ "text": "'md' | 'sm'"
16594
+ },
16595
+ "description": "`sm` is a compact 32px box for a filter in a toolbar, such as \"Page: All pages\" above a list. It still meets the 24px target size.",
16596
+ "default": "'md'",
16597
+ "fieldName": "size"
16598
+ },
16578
16599
  {
16579
16600
  "name": "label",
16580
16601
  "type": {
@@ -21,7 +21,8 @@ var ImpaktSelect = class extends FieldElement {
21
21
  width: { type: String, reflect: true },
22
22
  options: { type: Array },
23
23
  placeholder: { type: String },
24
- hideLabel: { type: Boolean, attribute: "hide-label", reflect: true }
24
+ hideLabel: { type: Boolean, attribute: "hide-label", reflect: true },
25
+ size: { type: String, reflect: true }
25
26
  };
26
27
  }
27
28
  constructor() {
@@ -30,6 +31,7 @@ var ImpaktSelect = class extends FieldElement {
30
31
  this.options = [];
31
32
  this.placeholder = "Choose an option";
32
33
  this.hideLabel = false;
34
+ this.size = "md";
33
35
  }
34
36
  static {
35
37
  this.styles = [
@@ -40,6 +42,30 @@ var ImpaktSelect = class extends FieldElement {
40
42
  :host([hide-label]) .label {
41
43
  ${visuallyHidden}
42
44
  }
45
+ /* A compact box sits inline, in a toolbar, so it has none of a form field's spacing under it. */
46
+ :host([size='sm']) {
47
+ margin-block-end: 0;
48
+ }
49
+ /* A compact box is as wide as its longest option, as a filter in a toolbar is. */
50
+ :host([size='sm']) .box {
51
+ inline-size: max-content;
52
+ max-inline-size: 100%;
53
+ }
54
+ :host([size='sm']) select {
55
+ inline-size: auto;
56
+ min-block-size: 32px;
57
+ padding-block: 4px;
58
+ padding-inline-start: 10px;
59
+ font-size: 14px;
60
+ }
61
+ /* Nothing under a compact box until there is an error to show, so it lines up with the chips beside it. */
62
+ :host([size='sm']) .error:empty {
63
+ margin: 0;
64
+ }
65
+ :host([size='sm']) .caret {
66
+ inset-inline-end: 10px;
67
+ font-size: 12px;
68
+ }
43
69
  /* The browser's own arrow is replaced by a small "▾", drawn beside the box's end and hidden from screen readers. */
44
70
  .box { position: relative; display: block; inline-size: min(100%, var(--impakt-field-width)); }
45
71
  select { inline-size: 100%; appearance: none; -webkit-appearance: none; padding-inline-end: ${space(9)}; cursor: pointer; }
@@ -75,4 +101,4 @@ customElements.define("impakt-select", ImpaktSelect);
75
101
  export {
76
102
  ImpaktSelect
77
103
  };
78
- //# sourceMappingURL=chunk-F3NHPQU5.js.map
104
+ //# sourceMappingURL=chunk-4MMRBNW7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/select.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { FieldElement, fieldControl, fieldWidths } from '../base/FieldElement';\nimport { visuallyHidden } from '../base/styles';\nimport { fontSize, space, t } from '../base/tokens';\n\nexport interface SelectOption {\n value: string;\n label: string;\n}\n\n/**\n * A dropdown.\n *\n * A native `<select>`, because the alternative is a listbox widget that has to\n * reimplement type-ahead, keyboard selection, and the platform's own picker on\n * touch — and whose main advantage is that the arrow can be restyled. On a\n * phone, native wins outright: it opens the system control that the user\n * already knows how to drive.\n *\n * The empty first option carries a real label rather than being blank, so a\n * screen reader announces a choice to make rather than silence.\n\n *\n * @category form\n * @icon select\n */\nexport class ImpaktSelect extends FieldElement {\n static properties = {\n ...FieldElement.properties,\n width: { type: String, reflect: true },\n options: { type: Array },\n placeholder: { type: String },\n hideLabel: { type: Boolean, attribute: 'hide-label', reflect: true },\n size: { type: String, reflect: true },\n };\n\n declare options: SelectOption[];\n /**\n * Keep the label for screen readers only, for a picker whose purpose is\n * plain from where it sits, such as a filter above a table or a role in a\n * team row. The label stays its accessible name.\n */\n declare hideLabel: boolean;\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 /** `sm` is a compact 32px box for a filter in a toolbar, such as \"Page: All pages\" above a list. It still meets the 24px target size. */\n declare size: 'md' | 'sm';\n\n constructor() {\n super();\n this.width = 'full';\n this.options = [];\n this.placeholder = 'Choose an option';\n this.hideLabel = false;\n this.size = 'md';\n }\n\n static styles = [\n ...FieldElement.styles,\n fieldWidths,\n fieldControl('select'),\n css`\n :host([hide-label]) .label {\n ${visuallyHidden}\n }\n /* A compact box sits inline, in a toolbar, so it has none of a form field's spacing under it. */\n :host([size='sm']) {\n margin-block-end: 0;\n }\n /* A compact box is as wide as its longest option, as a filter in a toolbar is. */\n :host([size='sm']) .box {\n inline-size: max-content;\n max-inline-size: 100%;\n }\n :host([size='sm']) select {\n inline-size: auto;\n min-block-size: 32px;\n padding-block: 4px;\n padding-inline-start: 10px;\n font-size: 14px;\n }\n /* Nothing under a compact box until there is an error to show, so it lines up with the chips beside it. */\n :host([size='sm']) .error:empty {\n margin: 0;\n }\n :host([size='sm']) .caret {\n inset-inline-end: 10px;\n font-size: 12px;\n }\n /* The browser's own arrow is replaced by a small \"▾\", drawn beside the box's end and hidden from screen readers. */\n .box { position: relative; display: block; inline-size: min(100%, var(--impakt-field-width)); }\n select { inline-size: 100%; appearance: none; -webkit-appearance: none; padding-inline-end: ${space(9)}; cursor: pointer; }\n .caret { position: absolute; inset-inline-end: ${space(3.5)}; inset-block-start: 50%; transform: translateY(-50%); font-size: ${fontSize('sm')}; line-height: 1; color: ${t.text}; pointer-events: none; }\n /* A forced colours mode draws the box in the system colours; the caret takes the text colour. */\n @media (forced-colors: active) { .caret { color: CanvasText; } }\n `,\n ];\n\n protected renderControl(): TemplateResult {\n return html`\n <span class=\"box\" part=\"box\"><select\n id=${this.controlId}\n part=\"select\"\n name=${this.name || nothing}\n ?disabled=${this.disabled}\n ?required=${this.required}\n aria-describedby=${this.describedBy}\n aria-invalid=${this.error ? 'true' : nothing}\n @change=${(e: Event) => this.setFormValue((e.target as HTMLSelectElement).value)}\n >\n <option value=\"\" ?selected=${!this.value}>${this.placeholder}</option>\n ${this.options.map((o) => html`<option value=${o.value} ?selected=${this.value === o.value}>${o.label}</option>`)}\n </select><span class=\"caret\" aria-hidden=\"true\">▾</span></span>\n `;\n }\n\n updated(changed: Map<string, unknown>): void {\n if (changed.has('error')) this.toggleAttribute('invalid', Boolean(this.error));\n }\n}\n\ncustomElements.define('impakt-select', ImpaktSelect);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-select': ImpaktSelect;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA,SAAS,MAAM,KAAK,eAAoC;AA0BjD,IAAM,eAAN,cAA2B,aAAa;AAAA,EAC7C;AAAA,SAAO,aAAa;AAAA,MAClB,GAAG,aAAa;AAAA,MAChB,OAAO,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MACrC,SAAS,EAAE,MAAM,MAAM;AAAA,MACvB,aAAa,EAAE,MAAM,OAAO;AAAA,MAC5B,WAAW,EAAE,MAAM,SAAS,WAAW,cAAc,SAAS,KAAK;AAAA,MACnE,MAAM,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,IACtC;AAAA;AAAA,EAgBA,cAAc;AACZ,UAAM;AACN,SAAK,QAAQ;AACb,SAAK,UAAU,CAAC;AAChB,SAAK,cAAc;AACnB,SAAK,YAAY;AACjB,SAAK,OAAO;AAAA,EACd;AAAA,EAEA;AAAA,SAAO,SAAS;AAAA,MACd,GAAG,aAAa;AAAA,MAChB;AAAA,MACA,aAAa,QAAQ;AAAA,MACrB;AAAA;AAAA,UAEM,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oGA4B4E,MAAM,CAAC,CAAC;AAAA,uDACrD,MAAM,GAAG,CAAC,qEAAqE,SAAS,IAAI,CAAC,4BAA4B,EAAE,IAAI;AAAA;AAAA;AAAA;AAAA,IAIpL;AAAA;AAAA,EAEU,gBAAgC;AACxC,WAAO;AAAA;AAAA,aAEE,KAAK,SAAS;AAAA;AAAA,eAEZ,KAAK,QAAQ,OAAO;AAAA,oBACf,KAAK,QAAQ;AAAA,oBACb,KAAK,QAAQ;AAAA,2BACN,KAAK,WAAW;AAAA,uBACpB,KAAK,QAAQ,SAAS,OAAO;AAAA,kBAClC,CAAC,MAAa,KAAK,aAAc,EAAE,OAA6B,KAAK,CAAC;AAAA;AAAA,qCAEnD,CAAC,KAAK,KAAK,IAAI,KAAK,WAAW;AAAA,UAC1D,KAAK,QAAQ,IAAI,CAAC,MAAM,qBAAqB,EAAE,KAAK,cAAc,KAAK,UAAU,EAAE,KAAK,IAAI,EAAE,KAAK,WAAW,CAAC;AAAA;AAAA;AAAA,EAGvH;AAAA,EAEA,QAAQ,SAAqC;AAC3C,QAAI,QAAQ,IAAI,OAAO,EAAG,MAAK,gBAAgB,WAAW,QAAQ,KAAK,KAAK,CAAC;AAAA,EAC/E;AACF;AAEA,eAAe,OAAO,iBAAiB,YAAY;","names":[]}
@@ -222,7 +222,7 @@ var ImpaktRow = class extends ImpaktElement {
222
222
  <div class="start ${this.filled.start ? "" : "empty"}"><slot name="start" @slotchange=${this.onSlot}></slot></div>
223
223
  <div class="text">${title}${this.meta ? html`<span class="meta" part="meta">${this.meta}</span>` : nothing}</div>
224
224
  <div class="end ${this.filled.end ? "" : "empty"}"><slot name="end" @slotchange=${this.onSlot}></slot></div>
225
- ${this.href ? html`<span class="chevron" aria-hidden="true">${iconSvg("chevron-right", "20px")}</span>` : nothing}
225
+ ${this.href && !this.selected ? html`<span class="chevron" aria-hidden="true">${iconSvg("chevron-right", "20px")}</span>` : nothing}
226
226
  </div>`;
227
227
  }
228
228
  };
@@ -304,4 +304,4 @@ export {
304
304
  ImpaktRow,
305
305
  ImpaktFilterChip
306
306
  };
307
- //# sourceMappingURL=chunk-BAITBJUC.js.map
307
+ //# sourceMappingURL=chunk-BAYSDP44.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/rows.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { ImpaktElement } from '../base/ImpaktElement';\nimport { focusRing, targetSize, touchTarget, visuallyHidden } from '../base/styles';\nimport { fontSize, fontWeight, space, t, token } from '../base/tokens';\nimport { pageLocale } from '../base/locale';\nimport { iconSvg } from './icon';\nimport { statusPill, statusPillStyles, type StatusTone } from './status-pill-style';\n\n/** The colour that reads on the text colour, which a toned band sets; the card otherwise. */\nconst INVERSE = token('color.text.inverse', 'var(--impakt-solid-card, var(--impakt-color-surface-card, #ffffff))');\n\n/** The light weight large numbers are set in, 300 when the theme does not say. */\nconst LIGHT = token('font.weight.light', '300');\n\n/**\n * A count with its name: \"UK 4\", \"Active import jobs 12\". A dashboard shows a\n * row of them.\n *\n * **The name comes before the number in the reading order.** A screen reader\n * says \"UK, 4\", which makes sense heard on its own; \"4, UK\" does not. With\n * `href` the whole tile is one link, named by the label, the value and the\n * caption together.\n *\n * **It is the G2 summary tile** (frames 33:451, 36:473, 37:469, 39:770): white,\n * a 1px ink border, the label in the code face, the figure large and tight\n * (a word works as the figure too, such as \"First audit\"), the note under it,\n * and under the note an optional status pill, such as \"All proven\". The\n * status is words, so it does not rest on its dot's colour.\n *\n * @category content\n * @icon badge\n */\nexport class ImpaktStatTile extends ImpaktElement {\n static properties = {\n label: { type: String },\n value: { type: String },\n caption: { type: String },\n href: { type: String },\n tone: { type: String, reflect: true },\n size: { type: String, reflect: true },\n status: { type: String },\n statusTone: { type: String, attribute: 'status-tone' },\n };\n /** What is counted, such as \"UK\" or \"Active import jobs\". */\n declare label: string;\n /** The count or figure, such as \"4\". */\n declare value: string;\n /** A line under the figure, such as \"3 arriving in the next two weeks\". */\n declare caption: string;\n /** Where the tile goes when it is pressed, such as the list it counts. */\n declare href: string;\n /** `plain` is a quiet tile on a card; `brand` is the one figure a screen leads with. */\n declare tone: 'plain' | 'brand';\n /** `lg` sets the figure larger, for the lead figure. */\n declare size: 'md' | 'lg';\n /** A status under the note, drawn as a pill, such as \"All proven\". */\n declare status: string;\n /** The status's tone. */\n declare statusTone: StatusTone;\n\n constructor() {\n super();\n this.label = '';\n this.value = '';\n this.caption = '';\n this.href = '';\n this.tone = 'plain';\n this.size = 'md';\n this.status = '';\n this.statusTone = 'neutral';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n statusPillStyles,\n css`\n :host { display: block; }\n .tile {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: ${space(2.5)};\n block-size: 100%;\n padding: ${space(5)};\n border: ${t.borderThin} solid ${t.text};\n border-radius: ${t.radius};\n background: ${t.surfaceCard};\n color: ${t.text};\n text-decoration: none;\n }\n a.tile:hover { background: color-mix(in srgb, ${t.surfaceCard}, ${t.text} 4%); }\n .label { font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; font-weight: ${fontWeight('regular')}; color: ${t.textMuted}; }\n /* G2: Archivo SemiBold 52/1.04, -4%. A word fits as well as a number. */\n .value { font-size: var(--impakt-type-stat-size, 3.25rem); line-height: 1.04; letter-spacing: -0.04em; font-weight: ${fontWeight('semibold')}; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }\n .caption { font-size: ${fontSize('sm')}; line-height: 1.45; color: ${t.textMuted}; }\n :host([size='lg']) .tile { min-block-size: 200px; padding: ${space(6)}; }\n :host([size='lg']) .value { margin-block-start: auto; font-size: 64px; line-height: 1; font-weight: ${LIGHT}; }\n :host([tone='brand']) .tile { background: ${t.brand}; color: ${t.onBrand}; border-color: ${t.brand}; }\n :host([tone='brand']) a.tile:hover { background: ${t.brandHover}; }\n :host([tone='brand']) .label, :host([tone='brand']) .caption { color: ${t.onBrand}; }\n @media (max-width: 40rem) { .value { font-size: 2.5rem; } }\n @media (forced-colors: active) { .tile { border: 1px solid CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n const inner = html`\n <span class=\"label\" part=\"label\">${this.label}</span>\n <span class=\"value\" part=\"value\">${this.value}</span>\n ${this.caption ? html`<span class=\"caption\" part=\"caption\">${this.caption}</span>` : nothing}\n ${statusPill(this.status, this.statusTone)}\n `;\n return this.href ? html`<a class=\"tile\" href=${this.href} part=\"tile\">${inner}</a>` : html`<div class=\"tile\" part=\"tile\">${inner}</div>`;\n }\n}\n\n/**\n * A date as a small block of month and day: \"DEC 2\". It sits at the start of a\n * row, beside what happens on that date.\n *\n * **The full date is what a screen reader hears.** The short month and day are\n * hidden from it, and the date is read in full in the page's language, such as\n * \"2 December 2026\", because \"DEC 2\" said aloud is ambiguous.\n *\n * @category content\n * @icon calendar\n */\nexport class ImpaktDateTile extends ImpaktElement {\n static properties = {\n date: { type: String },\n tone: { type: String, reflect: true },\n };\n /** The date, as YYYY-MM-DD. */\n declare date: string;\n /** `brand` is filled with the brand colour; `plain` is a quiet tile. */\n declare tone: 'brand' | 'plain';\n\n constructor() {\n super();\n this.date = '';\n this.tone = 'brand';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: inline-block; flex: none; }\n time {\n position: relative;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n inline-size: 48px;\n block-size: 52px;\n border-radius: ${t.radiusLg};\n background: ${t.brand};\n color: ${t.onBrand};\n line-height: 1;\n }\n :host([tone='plain']) time { background: ${t.surfaceInset}; color: ${t.text}; }\n .month { font-size: 10px; font-weight: ${fontWeight('medium')}; letter-spacing: ${t.trackingWide}; text-transform: uppercase; }\n .day { margin-block-start: ${space(1)}; font-size: 20px; font-weight: ${fontWeight('medium')}; font-variant-numeric: tabular-nums; }\n .sr-only { ${visuallyHidden} }\n @media (forced-colors: active) { time { border: 1px solid CanvasText; } }\n `,\n ];\n\n private parts(): { month: string; day: string; full: string } | null {\n const match = /^(\\d{4})-(\\d{2})-(\\d{2})$/.exec(this.date ?? '');\n if (!match) return null;\n // Noon UTC, so no time zone moves the date to the day before or after.\n const when = new Date(Date.UTC(Number(match[1]), Number(match[2]) - 1, Number(match[3]), 12));\n if (Number.isNaN(when.getTime())) return null;\n const locale = pageLocale(this);\n const say = (options: Intl.DateTimeFormatOptions) => new Intl.DateTimeFormat(locale, { ...options, timeZone: 'UTC' }).format(when);\n return { month: say({ month: 'short' }).replace('.', ''), day: say({ day: 'numeric' }), full: say({ day: 'numeric', month: 'long', year: 'numeric' }) };\n }\n\n render(): TemplateResult {\n const parts = this.parts();\n if (!parts) return html`${nothing}`;\n return html`<time datetime=${this.date} part=\"tile\">\n <span class=\"month\" aria-hidden=\"true\">${parts.month}</span>\n <span class=\"day\" aria-hidden=\"true\">${parts.day}</span>\n <span class=\"sr-only\">${parts.full}</span>\n </time>`;\n }\n}\n\n/**\n * One line in a list: a title, a line of detail under it, and room at the\n * start and the end. It is the task with its tick, the job that needs\n * attention, the delivery with its date, the setting with its arrow.\n *\n * **With `href` the whole row is one target, without nesting controls in a\n * link.** The title is the link, and it is stretched over the row, so the row\n * can be pressed anywhere. Anything in the `end` slot, such as a button, sits\n * above the stretched link and stays its own control, because a button inside\n * a link is two controls a screen reader cannot tell apart (4.1.2).\n *\n * A chevron is drawn at the end of a row that is a link, as the sign that it\n * goes somewhere. Put rows in an element with `role=\"list\"` and give each\n * `role=\"listitem\"` when they are a list, so a screen reader says how many\n * there are.\n *\n * @category content\n * @icon list\n * @slot start - Before the title: a dot, a date tile, a checkbox.\n * @slot end - After the title: a badge, a button.\n */\nexport class ImpaktRow extends ImpaktElement {\n static properties = {\n heading: { type: String },\n meta: { type: String },\n href: { type: String },\n divided: { type: Boolean, reflect: true },\n muted: { type: Boolean, reflect: true },\n selected: { type: Boolean, reflect: true },\n };\n /** The row's title. */\n declare heading: string;\n /** The line of detail under the title, such as \"CY-2026-00421 · Due 20 Nov 2026\". */\n declare meta: string;\n /** Where the row goes when it is pressed. */\n declare href: string;\n /** Draw a hairline above the row, for rows stacked on a card. */\n declare divided: boolean;\n /** Set the title quieter, for something finished, such as a done task. */\n declare muted: boolean;\n /**\n * The row being shown, such as the open case in a list beside it: an ink\n * fill with the words turned over (the paper in dark), and `aria-current`\n * on the row so it is not said by colour alone (frame 37:656).\n */\n declare selected: boolean;\n\n constructor() {\n super();\n this.selected = false;\n this.heading = '';\n this.meta = '';\n this.href = '';\n this.divided = false;\n this.muted = false;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host { display: block; }\n :host([divided]) .row { border-block-start: ${t.borderThin} solid ${t.hairline}; }\n .row { position: relative; display: flex; align-items: center; gap: ${space(3)}; padding-block: ${space(3)}; }\n .text { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: ${space(0.5)}; }\n .title { font-size: ${fontSize('md')}; font-weight: ${fontWeight('medium')}; color: ${t.text}; }\n :host([muted]) .title { color: ${t.textMuted}; font-weight: ${fontWeight('regular')}; }\n /* The meta is a label: the code face where the brand sets its labels in one, as G2 does (36:452, 37:646). */\n .meta { font-family: ${t.fontEyebrow}; font-size: ${fontSize('sm')}; color: ${t.textMuted}; }\n a { color: inherit; text-decoration: none; }\n /* The link is stretched over the row, so the row is one target. */\n a::after { content: ''; position: absolute; inset: 0; border-radius: ${t.radius}; }\n a:focus-visible { outline: none; }\n a:focus-visible::after { box-shadow: ${t.focusShadow}; }\n .row:has(a):hover .title { text-decoration: underline; text-underline-offset: 0.2em; }\n .start, .end { flex: none; display: flex; align-items: center; gap: ${space(2)}; }\n .start.empty, .end.empty { display: none; }\n /* Controls at the end stay pressable above the stretched link. */\n .end { position: relative; z-index: 1; }\n .chevron { flex: none; color: ${t.textMuted}; }\n :host([selected]) .row { padding-inline: ${space(4)}; background: ${t.text}; --impakt-color-text-default: ${INVERSE}; --impakt-color-text-muted: color-mix(in srgb, ${INVERSE} 72%, ${t.text}); --impakt-color-text-inverse: ${t.text}; }\n :host([selected]) :is(.title, .meta, .chevron) { color: ${INVERSE}; }\n :host([selected]) .meta, :host([selected]) .chevron { color: color-mix(in srgb, ${INVERSE} 72%, ${t.text}); }\n @media (forced-colors: active) { :host([selected]) .row { outline: 2px solid Highlight; } }\n `,\n ];\n\n private filled = { start: false, end: false };\n\n private onSlot(event: Event): void {\n const slot = event.target as HTMLSlotElement;\n const name = slot.name as 'start' | 'end';\n this.filled = {\n ...this.filled,\n [name]: slot.assignedNodes({ flatten: true }).some((n) => n.nodeType === Node.ELEMENT_NODE || (n.textContent ?? '').trim() !== ''),\n };\n this.requestUpdate();\n }\n\n render(): TemplateResult {\n const title = this.href\n ? html`<a class=\"title\" href=${this.href} part=\"link\">${this.heading}</a>`\n : html`<span class=\"title\" part=\"title\">${this.heading}</span>`;\n return html`<div class=\"row\" part=\"row\" aria-current=${this.selected ? 'true' : nothing}>\n <div class=\"start ${this.filled.start ? '' : 'empty'}\"><slot name=\"start\" @slotchange=${this.onSlot}></slot></div>\n <div class=\"text\">${title}${this.meta ? html`<span class=\"meta\" part=\"meta\">${this.meta}</span>` : nothing}</div>\n <div class=\"end ${this.filled.end ? '' : 'empty'}\"><slot name=\"end\" @slotchange=${this.onSlot}></slot></div>\n ${this.href ? html`<span class=\"chevron\" aria-hidden=\"true\">${iconSvg('chevron-right', '20px')}</span>` : nothing}\n </div>`;\n }\n}\n\n/**\n * A pressable filter: \"UK 4\", \"Completed 27\". A row of them narrows a list.\n *\n * **It is a toggle button.** It carries `aria-pressed`, so a screen reader says\n * whether the filter is on, and it is filled when it is on, so that does not\n * rest on colour alone (1.4.1). When only one filter in a row can be on, the\n * app turns the others off when it hears `impakt-change`.\n *\n * The count is read with the label. Set `count-label` when the number needs its\n * noun to make sense aloud, such as \"4 jobs\".\n *\n * @category action\n * @icon badge\n * @fires {CustomEvent<{ pressed: boolean }>} impakt-change - When the filter is turned on or off.\n */\nexport class ImpaktFilterChip extends ImpaktElement {\n static properties = {\n label: { type: String },\n count: { type: Number },\n countLabel: { type: String, attribute: 'count-label' },\n pressed: { type: Boolean, reflect: true },\n disabled: { type: Boolean, reflect: true },\n };\n declare label: string;\n /** How many things the filter would show. Left out when not set. */\n declare count: number | undefined;\n /** The count in words for a screen reader, such as \"4 jobs\". The number alone when empty. */\n declare countLabel: string;\n declare pressed: boolean;\n declare disabled: boolean;\n\n constructor() {\n super();\n this.label = '';\n this.count = undefined;\n this.countLabel = '';\n this.pressed = false;\n this.disabled = false;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n touchTarget('button'),\n css`\n :host { display: inline-block; }\n /* The containing block for the words kept for screen readers, so a control scrolled out of a row cannot widen the page. */\n button {\n ${targetSize}\n position: relative;\n display: inline-flex;\n align-items: center;\n gap: ${space(2)};\n min-block-size: 35px;\n padding: 0 ${space(3.5)};\n font: inherit;\n font-size: ${fontSize('sm')};\n font-weight: ${fontWeight('regular')};\n color: ${t.text};\n background: ${t.surfaceCard};\n border: ${t.borderThin} solid ${t.text};\n border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999));\n cursor: pointer;\n white-space: nowrap;\n }\n button:hover:not(:disabled) { background: ${t.surfaceInset}; }\n button[aria-pressed='true'] { background: ${t.text}; color: ${INVERSE}; border-color: ${t.text}; }\n button:disabled { cursor: not-allowed; opacity: 0.5; }\n .count { font-variant-numeric: tabular-nums; color: ${t.textMuted}; }\n button[aria-pressed='true'] .count { color: inherit; opacity: 0.8; }\n .sr-only { ${visuallyHidden} }\n @media (forced-colors: active) { button[aria-pressed='true'] { border: 2px solid Highlight; } }\n `,\n ];\n\n private toggle(): void {\n if (this.disabled) return;\n this.pressed = !this.pressed;\n this.dispatchEvent(new CustomEvent('impakt-change', { detail: { pressed: this.pressed }, bubbles: true, composed: true }));\n }\n\n render(): TemplateResult {\n const hasCount = typeof this.count === 'number' && !Number.isNaN(this.count);\n return html`<button type=\"button\" part=\"button\" aria-pressed=${this.pressed ? 'true' : 'false'} ?disabled=${this.disabled} @click=${this.toggle}>\n <span>${this.label}</span>\n ${\n hasCount\n ? this.countLabel\n ? html`<span class=\"count\" aria-hidden=\"true\">${this.count}</span><span class=\"sr-only\">${this.countLabel}</span>`\n : html`<span class=\"count\">${this.count}</span>`\n : nothing\n }\n </button>`;\n }\n}\n\ncustomElements.define('impakt-stat-tile', ImpaktStatTile);\ncustomElements.define('impakt-date-tile', ImpaktDateTile);\ncustomElements.define('impakt-row', ImpaktRow);\ncustomElements.define('impakt-filter-chip', ImpaktFilterChip);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-stat-tile': ImpaktStatTile;\n 'impakt-date-tile': ImpaktDateTile;\n 'impakt-row': ImpaktRow;\n 'impakt-filter-chip': ImpaktFilterChip;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,MAAM,KAAK,eAAoC;AASxD,IAAM,UAAU,MAAM,sBAAsB,qEAAqE;AAGjH,IAAM,QAAQ,MAAM,qBAAqB,KAAK;AAoBvC,IAAM,iBAAN,cAA6B,cAAc;AAAA,EAChD;AAAA,SAAO,aAAa;AAAA,MAClB,OAAO,EAAE,MAAM,OAAO;AAAA,MACtB,OAAO,EAAE,MAAM,OAAO;AAAA,MACtB,SAAS,EAAE,MAAM,OAAO;AAAA,MACxB,MAAM,EAAE,MAAM,OAAO;AAAA,MACrB,MAAM,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MACpC,MAAM,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MACpC,QAAQ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K,CAAC,CAAC;AAAA,EAC3H;AAAA,EAEA,SAAyB;AACvB,UAAM,WAAW,OAAO,KAAK,UAAU,YAAY,CAAC,OAAO,MAAM,KAAK,KAAK;AAC3E,WAAO,wDAAwD,KAAK,UAAU,SAAS,OAAO,cAAc,KAAK,QAAQ,WAAW,KAAK,MAAM;AAAA,cACrI,KAAK,KAAK;AAAA,QAEhB,WACI,KAAK,aACH,8CAA8C,KAAK,KAAK,gCAAgC,KAAK,UAAU,YACvG,2BAA2B,KAAK,KAAK,YACvC,OACN;AAAA;AAAA,EAEJ;AACF;AAEA,eAAe,OAAO,oBAAoB,cAAc;AACxD,eAAe,OAAO,oBAAoB,cAAc;AACxD,eAAe,OAAO,cAAc,SAAS;AAC7C,eAAe,OAAO,sBAAsB,gBAAgB;","names":[]}
1
+ {"version":3,"sources":["../src/components/rows.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { ImpaktElement } from '../base/ImpaktElement';\nimport { focusRing, targetSize, touchTarget, visuallyHidden } from '../base/styles';\nimport { fontSize, fontWeight, space, t, token } from '../base/tokens';\nimport { pageLocale } from '../base/locale';\nimport { iconSvg } from './icon';\nimport { statusPill, statusPillStyles, type StatusTone } from './status-pill-style';\n\n/** The colour that reads on the text colour, which a toned band sets; the card otherwise. */\nconst INVERSE = token('color.text.inverse', 'var(--impakt-solid-card, var(--impakt-color-surface-card, #ffffff))');\n\n/** The light weight large numbers are set in, 300 when the theme does not say. */\nconst LIGHT = token('font.weight.light', '300');\n\n/**\n * A count with its name: \"UK 4\", \"Active import jobs 12\". A dashboard shows a\n * row of them.\n *\n * **The name comes before the number in the reading order.** A screen reader\n * says \"UK, 4\", which makes sense heard on its own; \"4, UK\" does not. With\n * `href` the whole tile is one link, named by the label, the value and the\n * caption together.\n *\n * **It is the G2 summary tile** (frames 33:451, 36:473, 37:469, 39:770): white,\n * a 1px ink border, the label in the code face, the figure large and tight\n * (a word works as the figure too, such as \"First audit\"), the note under it,\n * and under the note an optional status pill, such as \"All proven\". The\n * status is words, so it does not rest on its dot's colour.\n *\n * @category content\n * @icon badge\n */\nexport class ImpaktStatTile extends ImpaktElement {\n static properties = {\n label: { type: String },\n value: { type: String },\n caption: { type: String },\n href: { type: String },\n tone: { type: String, reflect: true },\n size: { type: String, reflect: true },\n status: { type: String },\n statusTone: { type: String, attribute: 'status-tone' },\n };\n /** What is counted, such as \"UK\" or \"Active import jobs\". */\n declare label: string;\n /** The count or figure, such as \"4\". */\n declare value: string;\n /** A line under the figure, such as \"3 arriving in the next two weeks\". */\n declare caption: string;\n /** Where the tile goes when it is pressed, such as the list it counts. */\n declare href: string;\n /** `plain` is a quiet tile on a card; `brand` is the one figure a screen leads with. */\n declare tone: 'plain' | 'brand';\n /** `lg` sets the figure larger, for the lead figure. */\n declare size: 'md' | 'lg';\n /** A status under the note, drawn as a pill, such as \"All proven\". */\n declare status: string;\n /** The status's tone. */\n declare statusTone: StatusTone;\n\n constructor() {\n super();\n this.label = '';\n this.value = '';\n this.caption = '';\n this.href = '';\n this.tone = 'plain';\n this.size = 'md';\n this.status = '';\n this.statusTone = 'neutral';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n statusPillStyles,\n css`\n :host { display: block; }\n .tile {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: ${space(2.5)};\n block-size: 100%;\n padding: ${space(5)};\n border: ${t.borderThin} solid ${t.text};\n border-radius: ${t.radius};\n background: ${t.surfaceCard};\n color: ${t.text};\n text-decoration: none;\n }\n a.tile:hover { background: color-mix(in srgb, ${t.surfaceCard}, ${t.text} 4%); }\n .label { font-family: ${t.fontMono}; font-size: ${fontSize('sm')}; font-weight: ${fontWeight('regular')}; color: ${t.textMuted}; }\n /* G2: Archivo SemiBold 52/1.04, -4%. A word fits as well as a number. */\n .value { font-size: var(--impakt-type-stat-size, 3.25rem); line-height: 1.04; letter-spacing: -0.04em; font-weight: ${fontWeight('semibold')}; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }\n .caption { font-size: ${fontSize('sm')}; line-height: 1.45; color: ${t.textMuted}; }\n :host([size='lg']) .tile { min-block-size: 200px; padding: ${space(6)}; }\n :host([size='lg']) .value { margin-block-start: auto; font-size: 64px; line-height: 1; font-weight: ${LIGHT}; }\n :host([tone='brand']) .tile { background: ${t.brand}; color: ${t.onBrand}; border-color: ${t.brand}; }\n :host([tone='brand']) a.tile:hover { background: ${t.brandHover}; }\n :host([tone='brand']) .label, :host([tone='brand']) .caption { color: ${t.onBrand}; }\n @media (max-width: 40rem) { .value { font-size: 2.5rem; } }\n @media (forced-colors: active) { .tile { border: 1px solid CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n const inner = html`\n <span class=\"label\" part=\"label\">${this.label}</span>\n <span class=\"value\" part=\"value\">${this.value}</span>\n ${this.caption ? html`<span class=\"caption\" part=\"caption\">${this.caption}</span>` : nothing}\n ${statusPill(this.status, this.statusTone)}\n `;\n return this.href ? html`<a class=\"tile\" href=${this.href} part=\"tile\">${inner}</a>` : html`<div class=\"tile\" part=\"tile\">${inner}</div>`;\n }\n}\n\n/**\n * A date as a small block of month and day: \"DEC 2\". It sits at the start of a\n * row, beside what happens on that date.\n *\n * **The full date is what a screen reader hears.** The short month and day are\n * hidden from it, and the date is read in full in the page's language, such as\n * \"2 December 2026\", because \"DEC 2\" said aloud is ambiguous.\n *\n * @category content\n * @icon calendar\n */\nexport class ImpaktDateTile extends ImpaktElement {\n static properties = {\n date: { type: String },\n tone: { type: String, reflect: true },\n };\n /** The date, as YYYY-MM-DD. */\n declare date: string;\n /** `brand` is filled with the brand colour; `plain` is a quiet tile. */\n declare tone: 'brand' | 'plain';\n\n constructor() {\n super();\n this.date = '';\n this.tone = 'brand';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host { display: inline-block; flex: none; }\n time {\n position: relative;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n inline-size: 48px;\n block-size: 52px;\n border-radius: ${t.radiusLg};\n background: ${t.brand};\n color: ${t.onBrand};\n line-height: 1;\n }\n :host([tone='plain']) time { background: ${t.surfaceInset}; color: ${t.text}; }\n .month { font-size: 10px; font-weight: ${fontWeight('medium')}; letter-spacing: ${t.trackingWide}; text-transform: uppercase; }\n .day { margin-block-start: ${space(1)}; font-size: 20px; font-weight: ${fontWeight('medium')}; font-variant-numeric: tabular-nums; }\n .sr-only { ${visuallyHidden} }\n @media (forced-colors: active) { time { border: 1px solid CanvasText; } }\n `,\n ];\n\n private parts(): { month: string; day: string; full: string } | null {\n const match = /^(\\d{4})-(\\d{2})-(\\d{2})$/.exec(this.date ?? '');\n if (!match) return null;\n // Noon UTC, so no time zone moves the date to the day before or after.\n const when = new Date(Date.UTC(Number(match[1]), Number(match[2]) - 1, Number(match[3]), 12));\n if (Number.isNaN(when.getTime())) return null;\n const locale = pageLocale(this);\n const say = (options: Intl.DateTimeFormatOptions) => new Intl.DateTimeFormat(locale, { ...options, timeZone: 'UTC' }).format(when);\n return { month: say({ month: 'short' }).replace('.', ''), day: say({ day: 'numeric' }), full: say({ day: 'numeric', month: 'long', year: 'numeric' }) };\n }\n\n render(): TemplateResult {\n const parts = this.parts();\n if (!parts) return html`${nothing}`;\n return html`<time datetime=${this.date} part=\"tile\">\n <span class=\"month\" aria-hidden=\"true\">${parts.month}</span>\n <span class=\"day\" aria-hidden=\"true\">${parts.day}</span>\n <span class=\"sr-only\">${parts.full}</span>\n </time>`;\n }\n}\n\n/**\n * One line in a list: a title, a line of detail under it, and room at the\n * start and the end. It is the task with its tick, the job that needs\n * attention, the delivery with its date, the setting with its arrow.\n *\n * **With `href` the whole row is one target, without nesting controls in a\n * link.** The title is the link, and it is stretched over the row, so the row\n * can be pressed anywhere. Anything in the `end` slot, such as a button, sits\n * above the stretched link and stays its own control, because a button inside\n * a link is two controls a screen reader cannot tell apart (4.1.2).\n *\n * A chevron is drawn at the end of a row that is a link, as the sign that it\n * goes somewhere. Put rows in an element with `role=\"list\"` and give each\n * `role=\"listitem\"` when they are a list, so a screen reader says how many\n * there are.\n *\n * @category content\n * @icon list\n * @slot start - Before the title: a dot, a date tile, a checkbox.\n * @slot end - After the title: a badge, a button.\n */\nexport class ImpaktRow extends ImpaktElement {\n static properties = {\n heading: { type: String },\n meta: { type: String },\n href: { type: String },\n divided: { type: Boolean, reflect: true },\n muted: { type: Boolean, reflect: true },\n selected: { type: Boolean, reflect: true },\n };\n /** The row's title. */\n declare heading: string;\n /** The line of detail under the title, such as \"CY-2026-00421 · Due 20 Nov 2026\". */\n declare meta: string;\n /** Where the row goes when it is pressed. */\n declare href: string;\n /** Draw a hairline above the row, for rows stacked on a card. */\n declare divided: boolean;\n /** Set the title quieter, for something finished, such as a done task. */\n declare muted: boolean;\n /**\n * The row being shown, such as the open case in a list beside it: an ink\n * fill with the words turned over (the paper in dark), and `aria-current`\n * on the row so it is not said by colour alone (frame 37:656).\n */\n declare selected: boolean;\n\n constructor() {\n super();\n this.selected = false;\n this.heading = '';\n this.meta = '';\n this.href = '';\n this.divided = false;\n this.muted = false;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host { display: block; }\n :host([divided]) .row { border-block-start: ${t.borderThin} solid ${t.hairline}; }\n .row { position: relative; display: flex; align-items: center; gap: ${space(3)}; padding-block: ${space(3)}; }\n .text { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: ${space(0.5)}; }\n .title { font-size: ${fontSize('md')}; font-weight: ${fontWeight('medium')}; color: ${t.text}; }\n :host([muted]) .title { color: ${t.textMuted}; font-weight: ${fontWeight('regular')}; }\n /* The meta is a label: the code face where the brand sets its labels in one, as G2 does (36:452, 37:646). */\n .meta { font-family: ${t.fontEyebrow}; font-size: ${fontSize('sm')}; color: ${t.textMuted}; }\n a { color: inherit; text-decoration: none; }\n /* The link is stretched over the row, so the row is one target. */\n a::after { content: ''; position: absolute; inset: 0; border-radius: ${t.radius}; }\n a:focus-visible { outline: none; }\n a:focus-visible::after { box-shadow: ${t.focusShadow}; }\n .row:has(a):hover .title { text-decoration: underline; text-underline-offset: 0.2em; }\n .start, .end { flex: none; display: flex; align-items: center; gap: ${space(2)}; }\n .start.empty, .end.empty { display: none; }\n /* Controls at the end stay pressable above the stretched link. */\n .end { position: relative; z-index: 1; }\n .chevron { flex: none; color: ${t.textMuted}; }\n :host([selected]) .row { padding-inline: ${space(4)}; background: ${t.text}; --impakt-color-text-default: ${INVERSE}; --impakt-color-text-muted: color-mix(in srgb, ${INVERSE} 72%, ${t.text}); --impakt-color-text-inverse: ${t.text}; }\n :host([selected]) :is(.title, .meta, .chevron) { color: ${INVERSE}; }\n :host([selected]) .meta, :host([selected]) .chevron { color: color-mix(in srgb, ${INVERSE} 72%, ${t.text}); }\n @media (forced-colors: active) { :host([selected]) .row { outline: 2px solid Highlight; } }\n `,\n ];\n\n private filled = { start: false, end: false };\n\n private onSlot(event: Event): void {\n const slot = event.target as HTMLSlotElement;\n const name = slot.name as 'start' | 'end';\n this.filled = {\n ...this.filled,\n [name]: slot.assignedNodes({ flatten: true }).some((n) => n.nodeType === Node.ELEMENT_NODE || (n.textContent ?? '').trim() !== ''),\n };\n this.requestUpdate();\n }\n\n render(): TemplateResult {\n const title = this.href\n ? html`<a class=\"title\" href=${this.href} part=\"link\">${this.heading}</a>`\n : html`<span class=\"title\" part=\"title\">${this.heading}</span>`;\n return html`<div class=\"row\" part=\"row\" aria-current=${this.selected ? 'true' : nothing}>\n <div class=\"start ${this.filled.start ? '' : 'empty'}\"><slot name=\"start\" @slotchange=${this.onSlot}></slot></div>\n <div class=\"text\">${title}${this.meta ? html`<span class=\"meta\" part=\"meta\">${this.meta}</span>` : nothing}</div>\n <div class=\"end ${this.filled.end ? '' : 'empty'}\"><slot name=\"end\" @slotchange=${this.onSlot}></slot></div>\n ${this.href && !this.selected ? html`<span class=\"chevron\" aria-hidden=\"true\">${iconSvg('chevron-right', '20px')}</span>` : nothing}\n </div>`;\n }\n}\n\n/**\n * A pressable filter: \"UK 4\", \"Completed 27\". A row of them narrows a list.\n *\n * **It is a toggle button.** It carries `aria-pressed`, so a screen reader says\n * whether the filter is on, and it is filled when it is on, so that does not\n * rest on colour alone (1.4.1). When only one filter in a row can be on, the\n * app turns the others off when it hears `impakt-change`.\n *\n * The count is read with the label. Set `count-label` when the number needs its\n * noun to make sense aloud, such as \"4 jobs\".\n *\n * @category action\n * @icon badge\n * @fires {CustomEvent<{ pressed: boolean }>} impakt-change - When the filter is turned on or off.\n */\nexport class ImpaktFilterChip extends ImpaktElement {\n static properties = {\n label: { type: String },\n count: { type: Number },\n countLabel: { type: String, attribute: 'count-label' },\n pressed: { type: Boolean, reflect: true },\n disabled: { type: Boolean, reflect: true },\n };\n declare label: string;\n /** How many things the filter would show. Left out when not set. */\n declare count: number | undefined;\n /** The count in words for a screen reader, such as \"4 jobs\". The number alone when empty. */\n declare countLabel: string;\n declare pressed: boolean;\n declare disabled: boolean;\n\n constructor() {\n super();\n this.label = '';\n this.count = undefined;\n this.countLabel = '';\n this.pressed = false;\n this.disabled = false;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n touchTarget('button'),\n css`\n :host { display: inline-block; }\n /* The containing block for the words kept for screen readers, so a control scrolled out of a row cannot widen the page. */\n button {\n ${targetSize}\n position: relative;\n display: inline-flex;\n align-items: center;\n gap: ${space(2)};\n min-block-size: 35px;\n padding: 0 ${space(3.5)};\n font: inherit;\n font-size: ${fontSize('sm')};\n font-weight: ${fontWeight('regular')};\n color: ${t.text};\n background: ${t.surfaceCard};\n border: ${t.borderThin} solid ${t.text};\n border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999));\n cursor: pointer;\n white-space: nowrap;\n }\n button:hover:not(:disabled) { background: ${t.surfaceInset}; }\n button[aria-pressed='true'] { background: ${t.text}; color: ${INVERSE}; border-color: ${t.text}; }\n button:disabled { cursor: not-allowed; opacity: 0.5; }\n .count { font-variant-numeric: tabular-nums; color: ${t.textMuted}; }\n button[aria-pressed='true'] .count { color: inherit; opacity: 0.8; }\n .sr-only { ${visuallyHidden} }\n @media (forced-colors: active) { button[aria-pressed='true'] { border: 2px solid Highlight; } }\n `,\n ];\n\n private toggle(): void {\n if (this.disabled) return;\n this.pressed = !this.pressed;\n this.dispatchEvent(new CustomEvent('impakt-change', { detail: { pressed: this.pressed }, bubbles: true, composed: true }));\n }\n\n render(): TemplateResult {\n const hasCount = typeof this.count === 'number' && !Number.isNaN(this.count);\n return html`<button type=\"button\" part=\"button\" aria-pressed=${this.pressed ? 'true' : 'false'} ?disabled=${this.disabled} @click=${this.toggle}>\n <span>${this.label}</span>\n ${\n hasCount\n ? this.countLabel\n ? html`<span class=\"count\" aria-hidden=\"true\">${this.count}</span><span class=\"sr-only\">${this.countLabel}</span>`\n : html`<span class=\"count\">${this.count}</span>`\n : nothing\n }\n </button>`;\n }\n}\n\ncustomElements.define('impakt-stat-tile', ImpaktStatTile);\ncustomElements.define('impakt-date-tile', ImpaktDateTile);\ncustomElements.define('impakt-row', ImpaktRow);\ncustomElements.define('impakt-filter-chip', ImpaktFilterChip);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-stat-tile': ImpaktStatTile;\n 'impakt-date-tile': ImpaktDateTile;\n 'impakt-row': ImpaktRow;\n 'impakt-filter-chip': ImpaktFilterChip;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,MAAM,KAAK,eAAoC;AASxD,IAAM,UAAU,MAAM,sBAAsB,qEAAqE;AAGjH,IAAM,QAAQ,MAAM,qBAAqB,KAAK;AAoBvC,IAAM,iBAAN,cAA6B,cAAc;AAAA,EAChD;AAAA,SAAO,aAAa;AAAA,MAClB,OAAO,EAAE,MAAM,OAAO;AAAA,MACtB,OAAO,EAAE,MAAM,OAAO;AAAA,MACtB,SAAS,EAAE,MAAM,OAAO;AAAA,MACxB,MAAM,EAAE,MAAM,OAAO;AAAA,MACrB,MAAM,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MAC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AAY,iBAAiB,EAAE,QAAQ,EAAE,SAAS,KAAK,QAAQ,GAAG,SAAS,MAAM,UAAU,KAAK,CAAC,CAAC;AAAA,EAC3H;AAAA,EAEA,SAAyB;AACvB,UAAM,WAAW,OAAO,KAAK,UAAU,YAAY,CAAC,OAAO,MAAM,KAAK,KAAK;AAC3E,WAAO,wDAAwD,KAAK,UAAU,SAAS,OAAO,cAAc,KAAK,QAAQ,WAAW,KAAK,MAAM;AAAA,cACrI,KAAK,KAAK;AAAA,QAEhB,WACI,KAAK,aACH,8CAA8C,KAAK,KAAK,gCAAgC,KAAK,UAAU,YACvG,2BAA2B,KAAK,KAAK,YACvC,OACN;AAAA;AAAA,EAEJ;AACF;AAEA,eAAe,OAAO,oBAAoB,cAAc;AACxD,eAAe,OAAO,oBAAoB,cAAc;AACxD,eAAe,OAAO,cAAc,SAAS;AAC7C,eAAe,OAAO,sBAAsB,gBAAgB;","names":[]}
@@ -260,14 +260,14 @@ var ImpaktAppBar = class extends ImpaktElement {
260
260
  }
261
261
  renderSwitcher() {
262
262
  if (this.switcher.length)
263
- return html`<impakt-menu class="switcher" edge="end" .label=${this.switcherLabel} .items=${this.switcher}></impakt-menu>`;
263
+ return html`<impakt-menu class="switcher" edge="end" trigger-look="text" .label=${this.switcherLabel} .items=${this.switcher}></impakt-menu>`;
264
264
  if (this.toolsHref) return html`<a class="all" href=${this.toolsHref}>${this.switcherLabel}</a>`;
265
265
  return nothing;
266
266
  }
267
267
  renderAccount() {
268
268
  if (this.signedOut) return html`<a class="sign-in" part="sign-in" href=${this.signInHref}>${this.signInText}</a>`;
269
269
  if (this.organisationItems.length)
270
- return html`<impakt-menu class="org" edge="end" .label=${this.organisation} .items=${this.organisationItems}></impakt-menu>`;
270
+ return html`<impakt-menu class="org" edge="end" trigger-look="text" .label=${this.organisation} .items=${this.organisationItems}></impakt-menu>`;
271
271
  if (this.organisationHref) return html`<a class="org" href=${this.organisationHref}>${this.organisation}</a>`;
272
272
  return nothing;
273
273
  }
@@ -291,4 +291,4 @@ customElements.define("impakt-app-bar", ImpaktAppBar);
291
291
  export {
292
292
  ImpaktAppBar
293
293
  };
294
- //# sourceMappingURL=chunk-P3BPW446.js.map
294
+ //# sourceMappingURL=chunk-UBNCJROR.js.map
@@ -1 +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/**\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 scroll sideways if they still do\n * not fit. Folding them away behind a button would hide where you are; a row\n * that scrolls keeps the current page in view and every page one swipe or one\n * Tab away. 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 */\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 320 wide (53:960), so \"Your account\" and its note sit on one line. */\n impakt-menu.switcher::part(panel) {\n min-inline-size: min(20rem, calc(100vw - 2 * ${space(4)}));\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 }\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\" edge=\"end\" .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\" edge=\"end\" .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;AAgEjD,IAAM,eAAN,cAA2B,cAAc;AAAA,EAC9C;AAAA,SAAO,aAAa;AAAA,MAClB,MAAM,EAAE,MAAM,OAAO;AAAA,MACrB,MAAM,EAAE,MAAM,OAAO;AAAA,MACrB,OAAO,EAAE,MAAM,OAAO;AAAA,MACtB,OAAO,EAAE,MAAM,MAAM;AAAA,MACrB,YAAY,EAAE,MAAM,QAAQ,WAAW,cAAc;AAAA,MACrD,UAAU,EAAE,MAAM,MAAM;AAAA,MACxB,eAAe,EAAE,MAAM,QAAQ,WAAW,iBAAiB;AAAA,MAC3D,WAAW,EAAE,MAAM,QAAQ,WAAW,aAAa;AAAA,MACnD,cAAc,EAAE,MAAM,OAAO;AAAA,MAC7B,mBAAmB,EAAE,MAAM,OAAO,WAAW,qBAAqB;AAAA,MAClE,kBAAkB,EAAE,MAAM,QAAQ,WAAW,oBAAoB;AAAA,MACjE,WAAW,EAAE,MAAM,SAAS,SAAS,MAAM,WAAW,aAAa;AAAA,MACnE,YAAY,EAAE,MAAM,QAAQ,WAAW,eAAe;AAAA,MACtD,YAAY,EAAE,MAAM,QAAQ,WAAW,eAAe;AAAA,IACxD;AAAA;AAAA,EA6BA,cAAc;AACZ,UAAM;AACN,SAAK,OAAO;AACZ,SAAK,OAAO;AACZ,SAAK,QAAQ;AACb,SAAK,QAAQ,CAAC;AACd,SA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;AAAA;AAAA;AAAA,IAelC;AAAA;AAAA,EAEQ,cAA+C;AACrD,QAAI,CAAC,KAAK,MAAM,OAAQ,QAAO;AAC/B,WAAO,kDAAkD,KAAK,UAAU;AAAA;AAAA,UAElE,KAAK,MAAM;AAAA,MACX,CAAC,SACC;AAAA,wBACY,KAAK,IAAI,iBAAiB,KAAK,UAAU,SAAS,OAAO;AAAA,mBAC9D,KAAK,UAAU,qDAAqD,OAAO,GAAG,KAAK,KAAK;AAAA;AAAA;AAAA,IAGnG,CAAC;AAAA;AAAA;AAAA,EAGP;AAAA,EAEQ,iBAAkD;AACxD,QAAI,KAAK,SAAS;AAChB,aAAO,uDAAuD,KAAK,aAAa,WAAW,KAAK,QAAsB;AACxH,QAAI,KAAK,UAAW,QAAO,2BAA2B,KAAK,SAAS,IAAI,KAAK,aAAa;AAC1F,WAAO;AAAA,EACT;AAAA,EAEQ,gBAAiD;AACvD,QAAI,KAAK,UAAW,QAAO,8CAA8C,KAAK,UAAU,IAAI,KAAK,UAAU;AAC3G,QAAI,KAAK,kBAAkB;AACzB,aAAO,kDAAkD,KAAK,YAAY,WAAW,KAAK,iBAA+B;AAC3H,QAAI,KAAK,iBAAkB,QAAO,2BAA2B,KAAK,gBAAgB,IAAI,KAAK,YAAY;AACvG,WAAO;AAAA,EACT;AAAA,EAEA,SAAyB;AACvB,WAAO;AAAA;AAAA,2CAEgC,KAAK,IAAI,qEAAqE,KAAK,KAAK;AAAA,UACzH,KAAK,OAAO,uEAAuE,KAAK,IAAI,YAAY,OAAO;AAAA;AAAA,QAEjH,KAAK,YAAY,CAAC;AAAA;AAAA;AAAA,6BAGG,KAAK,eAAe,CAAC;AAAA,UACxC,KAAK,cAAc,CAAC;AAAA;AAAA;AAAA,EAG5B;AACF;AAEA,eAAe,OAAO,kBAAkB,YAAY;","names":[]}
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/**\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 scroll sideways if they still do\n * not fit. Folding them away behind a button would hide where you are; a row\n * that scrolls keeps the current page in view and every page one swipe or one\n * Tab away. 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 */\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 320 wide (53:960), so \"Your account\" and its note sit on one line. */\n impakt-menu.switcher::part(panel) {\n min-inline-size: min(20rem, calc(100vw - 2 * ${space(4)}));\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 }\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\" 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\" 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('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C9D,KAAK,UAAU,qDAAqD,OAAO,GAAG,KAAK,KAAK;AAAA;AAAA;AAAA,IAGnG,CAAC;AAAA;AAAA;AAAA,EAGP;AAAA,EAEQ,iBAAkD;AACxD,QAAI,KAAK,SAAS;AAChB,aAAO,2EAA2E,KAAK,aAAa,WAAW,KAAK,QAAsB;AAC5I,QAAI,KAAK,UAAW,QAAO,2BAA2B,KAAK,SAAS,IAAI,KAAK,aAAa;AAC1F,WAAO;AAAA,EACT;AAAA,EAEQ,gBAAiD;AACvD,QAAI,KAAK,UAAW,QAAO,8CAA8C,KAAK,UAAU,IAAI,KAAK,UAAU;AAC3G,QAAI,KAAK,kBAAkB;AACzB,aAAO,sEAAsE,KAAK,YAAY,WAAW,KAAK,iBAA+B;AAC/I,QAAI,KAAK,iBAAkB,QAAO,2BAA2B,KAAK,gBAAgB,IAAI,KAAK,YAAY;AACvG,WAAO;AAAA,EACT;AAAA,EAEA,SAAyB;AACvB,WAAO;AAAA;AAAA,2CAEgC,KAAK,IAAI,qEAAqE,KAAK,KAAK;AAAA,UACzH,KAAK,OAAO,uEAAuE,KAAK,IAAI,YAAY,OAAO;AAAA;AAAA,QAEjH,KAAK,YAAY,CAAC;AAAA;AAAA;AAAA,6BAGG,KAAK,eAAe,CAAC;AAAA,UACxC,KAAK,cAAc,CAAC;AAAA;AAAA;AAAA,EAG5B;AACF;AAEA,eAAe,OAAO,kBAAkB,YAAY;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ImpaktAppBar
3
- } from "../chunk-P3BPW446.js";
3
+ } from "../chunk-UBNCJROR.js";
4
4
  import "../chunk-XX6JZW5N.js";
5
5
  import "../chunk-SOYKSPPX.js";
6
6
  import "../chunk-UNGAG44M.js";
@@ -3,7 +3,7 @@ import {
3
3
  ImpaktFilterChip,
4
4
  ImpaktRow,
5
5
  ImpaktStatTile
6
- } from "../chunk-BAITBJUC.js";
6
+ } from "../chunk-BAYSDP44.js";
7
7
  import "../chunk-6CDQSHVW.js";
8
8
  import "../chunk-ZUQ3DOG2.js";
9
9
  import "../chunk-XX6JZW5N.js";
@@ -37,6 +37,10 @@ export declare class ImpaktSelect extends FieldElement {
37
37
  attribute: string;
38
38
  reflect: boolean;
39
39
  };
40
+ size: {
41
+ type: StringConstructor;
42
+ reflect: boolean;
43
+ };
40
44
  label: {
41
45
  type: StringConstructor;
42
46
  };
@@ -79,6 +83,8 @@ export declare class ImpaktSelect extends FieldElement {
79
83
  placeholder: string;
80
84
  /** How wide the box is, to suit the answer. Full width on a phone whatever this says. */
81
85
  width: 'full' | 'lg' | 'md' | 'sm' | 'xs';
86
+ /** `sm` is a compact 32px box for a filter in a toolbar, such as "Page: All pages" above a list. It still meets the 24px target size. */
87
+ size: 'md' | 'sm';
82
88
  constructor();
83
89
  static styles: import("lit").CSSResult[];
84
90
  protected renderControl(): TemplateResult;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ImpaktSelect
3
- } from "../chunk-F3NHPQU5.js";
3
+ } from "../chunk-4MMRBNW7.js";
4
4
  import "../chunk-HSXLSJVG.js";
5
5
  import "../chunk-72WNCCDC.js";
6
6
  import "../chunk-JTCTQBAX.js";
package/dist/index.js CHANGED
@@ -22,10 +22,10 @@ import {
22
22
  ImpaktFilterChip,
23
23
  ImpaktRow,
24
24
  ImpaktStatTile
25
- } from "./chunk-BAITBJUC.js";
25
+ } from "./chunk-BAYSDP44.js";
26
26
  import {
27
27
  ImpaktSelect
28
- } from "./chunk-F3NHPQU5.js";
28
+ } from "./chunk-4MMRBNW7.js";
29
29
  import {
30
30
  ImpaktSource
31
31
  } from "./chunk-QPOM7W3D.js";
@@ -131,7 +131,7 @@ import {
131
131
  } from "./chunk-ZAWGJC4I.js";
132
132
  import {
133
133
  ImpaktAppBar
134
- } from "./chunk-P3BPW446.js";
134
+ } from "./chunk-UBNCJROR.js";
135
135
  import "./chunk-XX6JZW5N.js";
136
136
  import {
137
137
  ImpaktAvatar,