@atomic-ui/ui 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -33
- package/custom-elements.json +5986 -15880
- package/dist/base/FieldElement.d.ts +4 -4
- package/dist/base/{ImpktElement.d.ts → ImpaktElement.d.ts} +2 -2
- package/dist/base/styles.d.ts +7 -0
- package/dist/base/tokens.d.ts +1 -1
- package/dist/base/tone.d.ts +20 -0
- package/dist/{chunk-3RE4H2XO.js → chunk-3EF4T242.js} +7 -7
- package/dist/chunk-3EF4T242.js.map +1 -0
- package/dist/{chunk-NKMVICB5.js → chunk-5Y3HYRCU.js} +7 -7
- package/dist/chunk-5Y3HYRCU.js.map +1 -0
- package/dist/{chunk-ZOTAAYO5.js → chunk-5ZQVL3V2.js} +19 -12
- package/dist/chunk-5ZQVL3V2.js.map +1 -0
- package/dist/{chunk-4OYHT4BN.js → chunk-A7YBFS4H.js} +15 -15
- package/dist/chunk-A7YBFS4H.js.map +1 -0
- package/dist/{chunk-WGPB3QQU.js → chunk-ACQ4KYPR.js} +9 -9
- package/dist/chunk-ACQ4KYPR.js.map +1 -0
- package/dist/{chunk-DAH7RLW3.js → chunk-DE3INTHZ.js} +6 -6
- package/dist/chunk-DE3INTHZ.js.map +1 -0
- package/dist/{chunk-HXINWP3V.js → chunk-EJD6LT7E.js} +20 -83
- package/dist/chunk-EJD6LT7E.js.map +1 -0
- package/dist/{chunk-P6GDMZK4.js → chunk-EJSX4WCD.js} +9 -9
- package/dist/chunk-EJSX4WCD.js.map +1 -0
- package/dist/chunk-FMSC7J7J.js +76 -0
- package/dist/chunk-FMSC7J7J.js.map +1 -0
- package/dist/{chunk-46BYUQ5A.js → chunk-FWR6SEIA.js} +33 -33
- package/dist/chunk-FWR6SEIA.js.map +1 -0
- package/dist/{chunk-CUUBAETM.js → chunk-GJPHQLLN.js} +8 -8
- package/dist/chunk-GJPHQLLN.js.map +1 -0
- package/dist/{chunk-R7FKGFW6.js → chunk-HNBG2POR.js} +7 -7
- package/dist/chunk-HNBG2POR.js.map +1 -0
- package/dist/{chunk-DKZ425AM.js → chunk-HNZQ7LM4.js} +11 -11
- package/dist/chunk-HNZQ7LM4.js.map +1 -0
- package/dist/{chunk-55DK75QF.js → chunk-I54DOEZB.js} +6 -6
- package/dist/chunk-I54DOEZB.js.map +1 -0
- package/dist/{chunk-J2FACXYI.js → chunk-PANH23MF.js} +12 -12
- package/dist/chunk-PANH23MF.js.map +1 -0
- package/dist/{chunk-KKJEEKL2.js → chunk-PYVUQNFQ.js} +8 -8
- package/dist/chunk-PYVUQNFQ.js.map +1 -0
- package/dist/{chunk-RWWRTURA.js → chunk-Q54FX3SY.js} +8 -8
- package/dist/chunk-Q54FX3SY.js.map +1 -0
- package/dist/{chunk-AUVIOU5G.js → chunk-QBORJTS4.js} +36 -36
- package/dist/chunk-QBORJTS4.js.map +1 -0
- package/dist/{chunk-5QSTXIPG.js → chunk-RXX4CN5J.js} +7 -7
- package/dist/chunk-RXX4CN5J.js.map +1 -0
- package/dist/{chunk-XPCU4KUY.js → chunk-SV77SN6P.js} +7 -7
- package/dist/chunk-SV77SN6P.js.map +1 -0
- package/dist/{chunk-FVCM4WHD.js → chunk-TAZZLOUY.js} +10 -10
- package/dist/chunk-TAZZLOUY.js.map +1 -0
- package/dist/{chunk-KMCGX76Y.js → chunk-TRZO5CHU.js} +7 -7
- package/dist/chunk-TRZO5CHU.js.map +1 -0
- package/dist/{chunk-F4YQWKK2.js → chunk-UPOTBKKK.js} +7 -7
- package/dist/chunk-UPOTBKKK.js.map +1 -0
- package/dist/{chunk-APJ5JGRW.js → chunk-WP5WJ4V5.js} +6 -6
- package/dist/chunk-WP5WJ4V5.js.map +1 -0
- package/dist/{chunk-TCXKZDMR.js → chunk-WS5AUJ35.js} +7 -7
- package/dist/chunk-WS5AUJ35.js.map +1 -0
- package/dist/{chunk-7P4Z4CLK.js → chunk-WWYYNR3Z.js} +50 -49
- package/dist/chunk-WWYYNR3Z.js.map +1 -0
- package/dist/{chunk-RYBY35QE.js → chunk-XU2XODVH.js} +6 -6
- package/dist/chunk-XU2XODVH.js.map +1 -0
- package/dist/{chunk-3KO55PZK.js → chunk-YR6T73GY.js} +18 -11
- package/dist/chunk-YR6T73GY.js.map +1 -0
- package/dist/{chunk-IOBSIAHB.js → chunk-YYYQPKQ7.js} +24 -24
- package/dist/chunk-YYYQPKQ7.js.map +1 -0
- package/dist/{chunk-PO6FCAIS.js → chunk-Z45LY6BT.js} +9 -9
- package/dist/chunk-Z45LY6BT.js.map +1 -0
- package/dist/{chunk-DJEZW7AC.js → chunk-ZQBEFP2O.js} +7 -7
- package/dist/chunk-ZQBEFP2O.js.map +1 -0
- package/dist/chunk-ZS7RPXCT.js +47 -0
- package/dist/chunk-ZS7RPXCT.js.map +1 -0
- package/dist/components/accordion.d.ts +3 -3
- package/dist/components/accordion.js +4 -4
- package/dist/components/alert.d.ts +3 -3
- package/dist/components/alert.js +4 -4
- package/dist/components/app-ui.d.ts +25 -25
- package/dist/components/app-ui.js +21 -21
- package/dist/components/badge.d.ts +37 -0
- package/dist/components/badge.js +9 -0
- package/dist/components/blocks.d.ts +10 -73
- package/dist/components/blocks.js +10 -13
- package/dist/components/button.d.ts +3 -3
- package/dist/components/button.js +5 -5
- package/dist/components/checkbox-group.d.ts +2 -2
- package/dist/components/checkbox-group.js +5 -5
- package/dist/components/checkbox.d.ts +2 -2
- package/dist/components/checkbox.js +5 -5
- package/dist/components/chip.d.ts +58 -0
- package/dist/components/chip.js +8 -0
- package/dist/components/date-input.d.ts +2 -2
- package/dist/components/date-input.js +5 -5
- package/dist/components/dialog.d.ts +4 -4
- package/dist/components/dialog.js +4 -4
- package/dist/components/fieldset.d.ts +3 -3
- package/dist/components/fieldset.js +4 -4
- package/dist/components/grid.d.ts +3 -3
- package/dist/components/grid.js +4 -4
- package/dist/components/help.d.ts +3 -3
- package/dist/components/help.js +4 -4
- package/dist/components/icon.d.ts +3 -3
- package/dist/components/icon.js +4 -4
- package/dist/components/journey.d.ts +18 -18
- package/dist/components/journey.js +15 -15
- package/dist/components/layout.d.ts +9 -9
- package/dist/components/layout.js +10 -10
- package/dist/components/link.d.ts +3 -3
- package/dist/components/link.js +5 -5
- package/dist/components/list.d.ts +3 -3
- package/dist/components/list.js +4 -4
- package/dist/components/media.d.ts +8 -8
- package/dist/components/media.js +8 -8
- package/dist/components/navigation.d.ts +5 -5
- package/dist/components/navigation.js +7 -7
- package/dist/components/page.d.ts +5 -5
- package/dist/components/page.js +6 -6
- package/dist/components/price.d.ts +3 -3
- package/dist/components/price.js +4 -4
- package/dist/components/progress.d.ts +3 -3
- package/dist/components/progress.js +4 -4
- package/dist/components/radio-group.d.ts +2 -2
- package/dist/components/radio-group.js +5 -5
- package/dist/components/select.d.ts +2 -2
- package/dist/components/select.js +5 -5
- package/dist/components/summary-list.d.ts +3 -3
- package/dist/components/summary-list.js +4 -4
- package/dist/components/table.d.ts +6 -6
- package/dist/components/table.js +5 -5
- package/dist/components/text-input.d.ts +2 -2
- package/dist/components/text-input.js +5 -5
- package/dist/components/textarea.d.ts +2 -2
- package/dist/components/textarea.js +5 -5
- package/dist/index.d.ts +47 -40
- package/dist/index.js +206 -270
- package/dist/standalone/atomic-ui.js +796 -2002
- package/dist/standalone/atomic-ui.js.map +4 -4
- package/dist/standalone/index.html +51 -52
- package/package.json +4 -4
- package/specimen/index.html +51 -52
- package/dist/chunk-37PA72FC.js +0 -725
- package/dist/chunk-37PA72FC.js.map +0 -1
- package/dist/chunk-3KO55PZK.js.map +0 -1
- package/dist/chunk-3RE4H2XO.js.map +0 -1
- package/dist/chunk-46BYUQ5A.js.map +0 -1
- package/dist/chunk-4OYHT4BN.js.map +0 -1
- package/dist/chunk-55DK75QF.js.map +0 -1
- package/dist/chunk-5QSTXIPG.js.map +0 -1
- package/dist/chunk-7P4Z4CLK.js.map +0 -1
- package/dist/chunk-APJ5JGRW.js.map +0 -1
- package/dist/chunk-AUVIOU5G.js.map +0 -1
- package/dist/chunk-CUUBAETM.js.map +0 -1
- package/dist/chunk-DAH7RLW3.js.map +0 -1
- package/dist/chunk-DJEZW7AC.js.map +0 -1
- package/dist/chunk-DKZ425AM.js.map +0 -1
- package/dist/chunk-F4YQWKK2.js.map +0 -1
- package/dist/chunk-FVCM4WHD.js.map +0 -1
- package/dist/chunk-GBRML4RF.js +0 -264
- package/dist/chunk-GBRML4RF.js.map +0 -1
- package/dist/chunk-HXINWP3V.js.map +0 -1
- package/dist/chunk-IOBSIAHB.js.map +0 -1
- package/dist/chunk-IZOTGWWI.js +0 -361
- package/dist/chunk-IZOTGWWI.js.map +0 -1
- package/dist/chunk-J2FACXYI.js.map +0 -1
- package/dist/chunk-KKJEEKL2.js.map +0 -1
- package/dist/chunk-KMCGX76Y.js.map +0 -1
- package/dist/chunk-NKMVICB5.js.map +0 -1
- package/dist/chunk-OFLMG6RN.js +0 -428
- package/dist/chunk-OFLMG6RN.js.map +0 -1
- package/dist/chunk-P6GDMZK4.js.map +0 -1
- package/dist/chunk-PO6FCAIS.js.map +0 -1
- package/dist/chunk-PWLZFGS3.js +0 -494
- package/dist/chunk-PWLZFGS3.js.map +0 -1
- package/dist/chunk-QJIB36DM.js +0 -249
- package/dist/chunk-QJIB36DM.js.map +0 -1
- package/dist/chunk-R7FKGFW6.js.map +0 -1
- package/dist/chunk-RWWRTURA.js.map +0 -1
- package/dist/chunk-RYBY35QE.js.map +0 -1
- package/dist/chunk-S7F5VKWU.js +0 -453
- package/dist/chunk-S7F5VKWU.js.map +0 -1
- package/dist/chunk-T5W3FDSF.js +0 -396
- package/dist/chunk-T5W3FDSF.js.map +0 -1
- package/dist/chunk-TCXKZDMR.js.map +0 -1
- package/dist/chunk-WGPB3QQU.js.map +0 -1
- package/dist/chunk-XPCU4KUY.js.map +0 -1
- package/dist/chunk-YRYZUYY7.js +0 -236
- package/dist/chunk-YRYZUYY7.js.map +0 -1
- package/dist/chunk-ZOTAAYO5.js.map +0 -1
- package/dist/components/changelog.d.ts +0 -386
- package/dist/components/changelog.js +0 -25
- package/dist/components/estimator.d.ts +0 -246
- package/dist/components/estimator.js +0 -16
- package/dist/components/marketing.d.ts +0 -370
- package/dist/components/marketing.js +0 -21
- package/dist/components/marketing.js.map +0 -1
- package/dist/components/organisms.d.ts +0 -559
- package/dist/components/organisms.js +0 -25
- package/dist/components/organisms.js.map +0 -1
- package/dist/components/property.d.ts +0 -389
- package/dist/components/property.js +0 -20
- package/dist/components/property.js.map +0 -1
- package/dist/components/scene.d.ts +0 -138
- package/dist/components/scene.js +0 -8
- package/dist/components/scene.js.map +0 -1
- package/dist/components/scrubber.d.ts +0 -86
- package/dist/components/scrubber.js +0 -8
- package/dist/components/scrubber.js.map +0 -1
- package/dist/components/selling.d.ts +0 -409
- package/dist/components/selling.js +0 -25
- package/dist/components/selling.js.map +0 -1
- package/dist/components/site.d.ts +0 -283
- package/dist/components/site.js +0 -20
- package/dist/components/site.js.map +0 -1
- /package/dist/components/{changelog.js.map → badge.js.map} +0 -0
- /package/dist/components/{estimator.js.map → chip.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { nothing, type TemplateResult } from 'lit';
|
|
2
|
-
import {
|
|
2
|
+
import { ImpaktElement } from './ImpaktElement';
|
|
3
3
|
/**
|
|
4
4
|
* The shared anatomy of a form control: a label, an optional description, a
|
|
5
5
|
* control, and an error.
|
|
@@ -19,15 +19,15 @@ import { ImpktElement } from './ImpktElement';
|
|
|
19
19
|
* How wide a single-line control is, from what it holds: a postcode is short,
|
|
20
20
|
* an email address is long. A width that matches the answer is a hint about
|
|
21
21
|
* what to type (1.3.5 is about the purpose, this is about the size). Applied by
|
|
22
|
-
* the controls that take a `width`, through `--
|
|
22
|
+
* the controls that take a `width`, through `--impakt-field-width`.
|
|
23
23
|
*/
|
|
24
24
|
export declare const fieldWidths: import("lit").CSSResult;
|
|
25
25
|
/**
|
|
26
26
|
* The base of every form control.
|
|
27
27
|
*
|
|
28
|
-
* @fires {CustomEvent<{ value: string }>}
|
|
28
|
+
* @fires {CustomEvent<{ value: string }>} impakt-change - When the answer changes. The answer is in detail.value.
|
|
29
29
|
*/
|
|
30
|
-
export declare abstract class FieldElement extends
|
|
30
|
+
export declare abstract class FieldElement extends ImpaktElement {
|
|
31
31
|
/** Form controls participate in a `<form>` like native ones. */
|
|
32
32
|
static formAssociated: boolean;
|
|
33
33
|
static properties: {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
/**
|
|
3
|
-
* The base every
|
|
3
|
+
* The base every Impakt component extends.
|
|
4
4
|
*
|
|
5
5
|
* It carries the two style fragments that are not a per-component choice — the
|
|
6
6
|
* reset and the reduced-motion rule — and a stable id generator for the ARIA
|
|
7
7
|
* wiring. It deliberately carries nothing else: a base class that grows
|
|
8
8
|
* behaviour becomes the place every component's exceptions are negotiated.
|
|
9
9
|
*/
|
|
10
|
-
export declare class
|
|
10
|
+
export declare class ImpaktElement extends LitElement {
|
|
11
11
|
static styles: import("lit").CSSResult[];
|
|
12
12
|
/**
|
|
13
13
|
* A unique id for this instance, for `aria-describedby` and friends.
|
package/dist/base/styles.d.ts
CHANGED
|
@@ -59,3 +59,10 @@ export declare const base: CSSResult;
|
|
|
59
59
|
* Pass the selectors that are the controls, inside the component's shadow root.
|
|
60
60
|
*/
|
|
61
61
|
export declare const touchTarget: (selector: string) => CSSResult;
|
|
62
|
+
/**
|
|
63
|
+
* `hide-on`: an element left out on a phone, or on anything wider, so a phone's
|
|
64
|
+
* header is built from the same pieces as a wide one. The width is the one the
|
|
65
|
+
* nav folds at. A component that offers `hideOn` reflects it as `hide-on` and
|
|
66
|
+
* adds this to its styles.
|
|
67
|
+
*/
|
|
68
|
+
export declare const hideOn: CSSResult;
|
package/dist/base/tokens.d.ts
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* never anything authored or fetched.
|
|
19
19
|
*/
|
|
20
20
|
import { type CSSResult } from 'lit';
|
|
21
|
-
/** `color.brand.default` → `var(--
|
|
21
|
+
/** `color.brand.default` → `var(--impakt-color-brand-default, <fallback>)`. */
|
|
22
22
|
export declare const token: (path: string, fallback: string) => CSSResult;
|
|
23
23
|
export declare const t: {
|
|
24
24
|
readonly brand: CSSResult;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Colours named by what they are in the brand, for a line, a lane, a dot or a
|
|
3
|
+
* stripe. A tone is a brand token, never a hex value, so a partner's brand
|
|
4
|
+
* restyles everything drawn with one.
|
|
5
|
+
*
|
|
6
|
+
* It is shared: `impakt-chip` here and the changelog, site and estimator blocks
|
|
7
|
+
* in `@atomic-ui/strata` all colour themselves with it.
|
|
8
|
+
*/
|
|
9
|
+
/** A colour for a line or a lane, named by what it is in the brand. */
|
|
10
|
+
export type NamedTone = 'brand' | 'accent' | 'info' | 'success' | 'warning' | 'danger';
|
|
11
|
+
/** A named tone, or 1 to 5 for the brand's chart colours in order. */
|
|
12
|
+
export type Tone = NamedTone | 1 | 2 | 3 | 4 | 5;
|
|
13
|
+
export declare const TONE: Record<NamedTone, string>;
|
|
14
|
+
/** When an item names no tone, lanes take these in turn. */
|
|
15
|
+
export declare const CYCLE: NamedTone[];
|
|
16
|
+
/**
|
|
17
|
+
* A named tone, or for an item that names none, the brand's chart colour for its
|
|
18
|
+
* place (color.chart.1 to 5), falling back to the status colours in turn.
|
|
19
|
+
*/
|
|
20
|
+
export declare const toneOf: (tone: Tone | undefined, i: number) => string;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
ImpaktElement,
|
|
3
3
|
fontWeight,
|
|
4
4
|
space,
|
|
5
5
|
spaceAround,
|
|
6
6
|
t,
|
|
7
7
|
type
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-YR6T73GY.js";
|
|
9
9
|
|
|
10
10
|
// packages/ui/src/components/list.ts
|
|
11
11
|
import { css, html } from "lit";
|
|
12
|
-
var
|
|
12
|
+
var ImpaktList = class extends ImpaktElement {
|
|
13
13
|
static {
|
|
14
14
|
this.properties = {
|
|
15
15
|
items: { type: Array },
|
|
@@ -28,7 +28,7 @@ var ImpktList = class extends ImpktElement {
|
|
|
28
28
|
this.spaceBelow = "none";
|
|
29
29
|
}
|
|
30
30
|
static {
|
|
31
|
-
this.styles = [...
|
|
31
|
+
this.styles = [...ImpaktElement.styles, spaceAround, css`
|
|
32
32
|
:host { display: block; }
|
|
33
33
|
ul, ol { list-style: none; margin: 0; padding: 0; display: grid; gap: ${space(3)}; counter-reset: point; }
|
|
34
34
|
li { position: relative; padding-inline-start: ${space(7)}; ${type("md")} text-wrap: pretty; counter-increment: point; }
|
|
@@ -45,9 +45,9 @@ var ImpktList = class extends ImpktElement {
|
|
|
45
45
|
return this.look === "number" ? html`<ol part="list">${items}</ol>` : html`<ul part="list" role="list">${items}</ul>`;
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
|
-
customElements.define("
|
|
48
|
+
customElements.define("impakt-list", ImpaktList);
|
|
49
49
|
|
|
50
50
|
export {
|
|
51
|
-
|
|
51
|
+
ImpaktList
|
|
52
52
|
};
|
|
53
|
-
//# sourceMappingURL=chunk-
|
|
53
|
+
//# sourceMappingURL=chunk-3EF4T242.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/list.ts"],"sourcesContent":["import { css, html, type TemplateResult } from 'lit';\nimport { ImpaktElement } from '../base/ImpaktElement';\nimport { fontWeight, space, spaceAround, t, type } from '../base/tokens';\n\n/**\n * A list of short points: what a phase delivers, what a plan includes, the\n * steps of an argument in an article. A bullet, a tick or a number marks each\n * one; the marks are drawn, so a screen reader hears a plain list.\n *\n * @category content\n * @icon list\n */\nexport class ImpaktList extends ImpaktElement {\n static properties = {\n items: { type: Array },\n look: { type: String, reflect: true },\n size: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n\n /** The points, in order. */\n declare items: string[];\n /** `bullet` for points, `check` for what is included, `number` when the order matters. */\n declare look: 'bullet' | 'check' | 'number';\n declare size: 'sm' | 'md' | 'lg';\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.items = [];\n this.look = 'bullet';\n this.size = 'md';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpaktElement.styles, spaceAround, css`\n :host { display: block; }\n ul, ol { list-style: none; margin: 0; padding: 0; display: grid; gap: ${space(3)}; counter-reset: point; }\n li { position: relative; padding-inline-start: ${space(7)}; ${type('md')} text-wrap: pretty; counter-increment: point; }\n :host([size='sm']) li { ${type('sm')} }\n :host([size='lg']) li { ${type('lg')} }\n li::before { content: ''; position: absolute; inset-inline-start: 4px; inset-block-start: 0.6em; inline-size: 7px; block-size: 7px; border-radius: 2px; background: ${t.brand}; }\n :host([look='check']) li::before { content: '✓'; inset-inline-start: 0; inset-block-start: 0; inline-size: auto; block-size: auto; background: none; color: ${t.success}; font-weight: ${fontWeight('bold')}; }\n :host([look='number']) li::before { content: counter(point, decimal-leading-zero); inset-inline-start: 0; inset-block-start: 0.2em; inline-size: auto; block-size: auto; background: none; font-family: ${t.fontMono}; font-size: 0.75em; color: ${t.textMuted}; }\n @media (forced-colors: active) { li::before { background: CanvasText; } :host([look='check']) li::before, :host([look='number']) li::before { background: none; color: CanvasText; } }\n `];\n\n render(): TemplateResult {\n const items = (this.items ?? []).map((item) => html`<li part=\"item\">${item}</li>`);\n return this.look === 'number' ? html`<ol part=\"list\">${items}</ol>` : html`<ul part=\"list\" role=\"list\">${items}</ul>`;\n }\n}\n\ncustomElements.define('impakt-list', ImpaktList);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-list': ImpaktList;\n }\n}\n"],"mappings":";;;;;;;;;;AAAA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
|
5
5
|
|
|
6
6
|
// packages/ui/src/components/icon.ts
|
|
7
7
|
import { css, html, nothing, svg } from "lit";
|
|
@@ -46,7 +46,7 @@ function iconSvg(name, size = "1.25em") {
|
|
|
46
46
|
if (!shape) return nothing;
|
|
47
47
|
return html`<svg class="icon" viewBox="0 0 24 24" width=${size} height=${size} fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">${shape}</svg>`;
|
|
48
48
|
}
|
|
49
|
-
var
|
|
49
|
+
var ImpaktIcon = class extends ImpaktElement {
|
|
50
50
|
static {
|
|
51
51
|
this.properties = {
|
|
52
52
|
name: { type: String, reflect: true },
|
|
@@ -63,7 +63,7 @@ var ImpktIcon = class extends ImpktElement {
|
|
|
63
63
|
this.tone = "inherit";
|
|
64
64
|
}
|
|
65
65
|
static {
|
|
66
|
-
this.styles = [...
|
|
66
|
+
this.styles = [...ImpaktElement.styles, css`
|
|
67
67
|
:host { display: inline-flex; vertical-align: middle; line-height: 0; }
|
|
68
68
|
:host([tone='brand']) { color: ${t.brand}; }
|
|
69
69
|
:host([tone='muted']) { color: ${t.textMuted}; }
|
|
@@ -76,12 +76,12 @@ var ImpktIcon = class extends ImpktElement {
|
|
|
76
76
|
return this.label ? html`<span role="img" aria-label=${this.label}>${drawn}</span>` : html`${drawn}`;
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
|
-
customElements.define("
|
|
79
|
+
customElements.define("impakt-icon", ImpaktIcon);
|
|
80
80
|
|
|
81
81
|
export {
|
|
82
82
|
ICONS,
|
|
83
83
|
ICON_NAMES,
|
|
84
84
|
iconSvg,
|
|
85
|
-
|
|
85
|
+
ImpaktIcon
|
|
86
86
|
};
|
|
87
|
-
//# sourceMappingURL=chunk-
|
|
87
|
+
//# sourceMappingURL=chunk-5Y3HYRCU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/icon.ts"],"sourcesContent":["import { css, html, nothing, svg, type SVGTemplateResult, type TemplateResult } from 'lit';\nimport { ImpaktElement } from '../base/ImpaktElement';\nimport { t } from '../base/tokens';\n\n/**\n * The icons the library draws, each on a 24 by 24 grid in strokes of the\n * current text colour. Kept to a set the components need and editors reach\n * for, so an icon always matches the line weight of the ones beside it.\n */\nexport const ICONS = {\n 'arrow-right': svg`<path d=\"M5 12h14M13 6l6 6-6 6\"/>`,\n 'arrow-left': svg`<path d=\"M19 12H5M11 6l-6 6 6 6\"/>`,\n 'chevron-right': svg`<path d=\"M9 6l6 6-6 6\"/>`,\n 'chevron-down': svg`<path d=\"M6 9l6 6 6-6\"/>`,\n check: svg`<path d=\"M5 12.5l4.5 4.5L19 7\"/>`,\n close: svg`<path d=\"M6 6l12 12M18 6L6 18\"/>`,\n menu: svg`<path d=\"M4 7h16M4 12h16M4 17h16\"/>`,\n /** Two lines: a menu drawn quieter, as a round icon button. */\n 'menu-two': svg`<path d=\"M5 9.5h14M5 14.5h14\"/>`,\n plus: svg`<path d=\"M12 5v14M5 12h14\"/>`,\n minus: svg`<path d=\"M5 12h14\"/>`,\n search: svg`<circle cx=\"11\" cy=\"11\" r=\"6.5\"/><path d=\"M16 16l4 4\"/>`,\n external: svg`<path d=\"M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5\"/>`,\n download: svg`<path d=\"M12 4v11M7 10l5 5 5-5M5 20h14\"/>`,\n home: svg`<path d=\"M4 11l8-7 8 7M6 9.5V20h12V9.5\"/><path d=\"M10 20v-6h4v6\"/>`,\n phone: svg`<path d=\"M7 3.5h3l1.5 4-2 1.5a11 11 0 0 0 5.5 5.5l1.5-2 4 1.5v3a2 2 0 0 1-2 2A16 16 0 0 1 5 5.5a2 2 0 0 1 2-2z\"/>`,\n mail: svg`<rect x=\"3.5\" y=\"5.5\" width=\"17\" height=\"13\" rx=\"1.5\"/><path d=\"M4 7l8 6 8-6\"/>`,\n 'map-pin': svg`<path d=\"M12 21s-6.5-6-6.5-11a6.5 6.5 0 0 1 13 0c0 5-6.5 11-6.5 11z\"/><circle cx=\"12\" cy=\"10\" r=\"2.5\"/>`,\n calendar: svg`<rect x=\"4\" y=\"5.5\" width=\"16\" height=\"14.5\" rx=\"1.5\"/><path d=\"M4 10h16M8.5 3.5v4M15.5 3.5v4\"/>`,\n clock: svg`<circle cx=\"12\" cy=\"12\" r=\"8.5\"/><path d=\"M12 7.5V12l3 2\"/>`,\n user: svg`<circle cx=\"12\" cy=\"8.5\" r=\"3.5\"/><path d=\"M5 20a7 7 0 0 1 14 0\"/>`,\n star: svg`<path d=\"M12 4l2.4 5 5.4.6-4 3.7 1.1 5.4L12 16l-4.9 2.7 1.1-5.4-4-3.7 5.4-.6z\"/>`,\n heart: svg`<path d=\"M12 19.5s-7.5-4.6-7.5-10A4 4 0 0 1 12 7a4 4 0 0 1 7.5 2.5c0 5.4-7.5 10-7.5 10z\"/>`,\n shield: svg`<path d=\"M12 3.5l7 2.5v5.5c0 4.5-3 7.8-7 9-4-1.2-7-4.5-7-9V6z\"/><path d=\"M9 12l2 2 4-4\"/>`,\n leaf: svg`<path d=\"M5 19c0-8 5-13 14-14 0 9-5 14-13 14z\"/><path d=\"M5 19l7-7\"/>`,\n sun: svg`<circle cx=\"12\" cy=\"12\" r=\"3.5\"/><path d=\"M12 3v2M12 19v2M3 12h2M19 12h2M5.6 5.6L7 7M17 17l1.4 1.4M5.6 18.4L7 17M17 7l1.4-1.4\"/>`,\n bolt: svg`<path d=\"M13 3L5 13.5h6L10 21l8-10.5h-6z\"/>`,\n key: svg`<circle cx=\"8\" cy=\"15\" r=\"3.5\"/><path d=\"M10.5 12.5L19 4M16 7l2.5 2.5M14 9l2 2\"/>`,\n info: svg`<circle cx=\"12\" cy=\"12\" r=\"8.5\"/><path d=\"M12 11v5.5M12 7.5v.5\"/>`,\n warning: svg`<path d=\"M12 4l9 15.5H3z\"/><path d=\"M12 10v4M12 16.5v.5\"/>`,\n document: svg`<path d=\"M6 3.5h8l4 4V20a.5.5 0 0 1-.5.5h-11A.5.5 0 0 1 6 20z\"/><path d=\"M14 3.5V8h4M9 13h6M9 16.5h6\"/>`,\n pound: svg`<path d=\"M16 6.5a3.5 3.5 0 0 0-6.5 1.8V20M7 13h7M7 20h10\"/>`,\n chat: svg`<path d=\"M4.5 5.5h15v10h-9l-4 3.5v-3.5h-2z\"/>`,\n} as const satisfies Record<string, SVGTemplateResult>;\n\nexport type IconName = keyof typeof ICONS;\nexport const ICON_NAMES = Object.keys(ICONS) as IconName[];\n\n/** An icon as markup, for components that draw one beside their own words. Always decorative. */\nexport function iconSvg(name: string | undefined, size = '1.25em'): TemplateResult | typeof nothing {\n const shape = name ? ICONS[name as IconName] : undefined;\n if (!shape) return nothing;\n return html`<svg class=\"icon\" viewBox=\"0 0 24 24\" width=${size} height=${size} fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">${shape}</svg>`;\n}\n\n/**\n * A small picture that stands for something: a phone beside a number, a tick\n * beside a benefit.\n *\n * **An icon is decorative unless it is labelled.** With no `label` it is\n * hidden from screen readers, because the words beside it already say what it\n * means. Give it a label only when it stands alone and carries meaning (1.1.1).\n *\n * @category media\n * @icon star\n */\nexport class ImpaktIcon extends ImpaktElement {\n static properties = {\n name: { type: String, reflect: true },\n label: { type: String },\n size: { type: String, reflect: true },\n tone: { type: String, reflect: true },\n };\n /** Which icon. */\n declare name: 'arrow-right' | 'arrow-left' | 'chevron-right' | 'chevron-down' | 'check' | 'close' | 'menu' | 'plus' | 'minus' | 'search' | 'external' | 'download' | 'home' | 'phone' | 'mail' | 'map-pin' | 'calendar' | 'clock' | 'user' | 'star' | 'heart' | 'shield' | 'leaf' | 'sun' | 'bolt' | 'key' | 'info' | 'warning' | 'document' | 'pound' | 'chat';\n /** What the icon means, when it stands alone. Leave empty when words beside it say the same. */\n declare label: string;\n declare size: 'sm' | 'md' | 'lg' | 'xl';\n /** The icon's colour. */\n declare tone: 'inherit' | 'brand' | 'muted';\n\n constructor() {\n super();\n this.name = 'star';\n this.label = '';\n this.size = 'md';\n this.tone = 'inherit';\n }\n\n static styles = [...ImpaktElement.styles, css`\n :host { display: inline-flex; vertical-align: middle; line-height: 0; }\n :host([tone='brand']) { color: ${t.brand}; }\n :host([tone='muted']) { color: ${t.textMuted}; }\n @media (forced-colors: active) { :host { color: CanvasText; } }\n `];\n\n render(): TemplateResult {\n const size = { sm: '16px', md: '24px', lg: '32px', xl: '48px' }[this.size] ?? '24px';\n const drawn = iconSvg(this.name, size);\n return this.label ? html`<span role=\"img\" aria-label=${this.label}>${drawn}</span>` : html`${drawn}`;\n }\n}\n\ncustomElements.define('impakt-icon', ImpaktIcon);\ndeclare global { interface HTMLElementTagNameMap { 'impakt-icon': ImpaktIcon } }\n"],"mappings":";;;;;;AAAA,SAAS,KAAK,MAAM,SAAS,WAAwD;AAS9E,IAAM,QAAQ;AAAA,EACnB,eAAe;AAAA,EACf,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,OAAO;AAAA,EACP,OAAO;AAAA,EACP,MAAM;AAAA;AAAA,EAEN,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,UAAU;AAAA,EACV,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,WAAW;AAAA,EACX,UAAU;AAAA,EACV,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,KAAK;AAAA,EACL,MAAM;AAAA,EACN,KAAK;AAAA,EACL,MAAM;AAAA,EACN,SAAS;AAAA,EACT,UAAU;AAAA,EACV,OAAO;AAAA,EACP,MAAM;AACR;AAGO,IAAM,aAAa,OAAO,KAAK,KAAK;AAGpC,SAAS,QAAQ,MA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js";
|
|
11
11
|
|
|
12
12
|
// packages/ui/src/base/FieldElement.ts
|
|
13
13
|
import { html, css, nothing } from "lit";
|
|
14
14
|
var fieldWidths = css`
|
|
15
|
-
:host { --
|
|
16
|
-
:host([width='xs']) { --
|
|
17
|
-
:host([width='sm']) { --
|
|
18
|
-
:host([width='md']) { --
|
|
19
|
-
:host([width='lg']) { --
|
|
15
|
+
:host { --impakt-field-width: 100%; }
|
|
16
|
+
:host([width='xs']) { --impakt-field-width: 8ch; }
|
|
17
|
+
:host([width='sm']) { --impakt-field-width: 14ch; }
|
|
18
|
+
:host([width='md']) { --impakt-field-width: 24ch; }
|
|
19
|
+
:host([width='lg']) { --impakt-field-width: 40ch; }
|
|
20
20
|
`;
|
|
21
|
-
var FieldElement = class extends
|
|
21
|
+
var FieldElement = class extends ImpaktElement {
|
|
22
22
|
constructor() {
|
|
23
23
|
super();
|
|
24
24
|
this.internals = null;
|
|
@@ -56,7 +56,7 @@ var FieldElement = class extends ImpktElement {
|
|
|
56
56
|
}
|
|
57
57
|
static {
|
|
58
58
|
this.styles = [
|
|
59
|
-
...
|
|
59
|
+
...ImpaktElement.styles,
|
|
60
60
|
focusRing,
|
|
61
61
|
css`
|
|
62
62
|
:host {
|
|
@@ -95,8 +95,15 @@ var FieldElement = class extends ImpktElement {
|
|
|
95
95
|
.visually-hidden {
|
|
96
96
|
${visuallyHidden}
|
|
97
97
|
}
|
|
98
|
-
|
|
98
|
+
/*
|
|
99
|
+
* Only the control is dimmed. Dimming the whole host took the question,
|
|
100
|
+
* the hint and the error below 4.5:1, and a disabled field still has to
|
|
101
|
+
* say what it is and why it cannot be changed. The native disabled
|
|
102
|
+
* control itself is exempt from the contrast criterion.
|
|
103
|
+
*/
|
|
104
|
+
:host([disabled]) :is(input, select, textarea, button) {
|
|
99
105
|
opacity: 0.6;
|
|
106
|
+
cursor: not-allowed;
|
|
100
107
|
}
|
|
101
108
|
`
|
|
102
109
|
];
|
|
@@ -169,7 +176,7 @@ var FieldElement = class extends ImpktElement {
|
|
|
169
176
|
setFormValue(value) {
|
|
170
177
|
this.value = value;
|
|
171
178
|
this.internals?.setFormValue(value);
|
|
172
|
-
this.dispatchEvent(new CustomEvent("
|
|
179
|
+
this.dispatchEvent(new CustomEvent("impakt-change", { detail: { value }, bubbles: true, composed: true }));
|
|
173
180
|
}
|
|
174
181
|
};
|
|
175
182
|
|
|
@@ -177,4 +184,4 @@ export {
|
|
|
177
184
|
fieldWidths,
|
|
178
185
|
FieldElement
|
|
179
186
|
};
|
|
180
|
-
//# sourceMappingURL=chunk-
|
|
187
|
+
//# sourceMappingURL=chunk-5ZQVL3V2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/base/FieldElement.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { ImpaktElement } from './ImpaktElement';\nimport { focusRing, visuallyHidden } from './styles';\nimport { fontSize, fontWeight, lineHeight, space, t } from './tokens';\n\n/**\n * The shared anatomy of a form control: a label, an optional description, a\n * control, and an error.\n *\n * This exists because the ARIA wiring between those four is where accessible\n * forms actually fail, and it fails the same way every time — a description\n * that is never announced, an error that appears silently, a label that points\n * at nothing. Written once, it is right once.\n *\n * Everything is rendered inside this component's own shadow root, including\n * the native control. That is not an implementation detail: `aria-describedby`\n * cannot cross a shadow boundary, so a component that slotted the input from\n * outside could not describe it. Keeping the whole relationship in one tree is\n * what makes the wiring work at all.\n */\n/**\n * How wide a single-line control is, from what it holds: a postcode is short,\n * an email address is long. A width that matches the answer is a hint about\n * what to type (1.3.5 is about the purpose, this is about the size). Applied by\n * the controls that take a `width`, through `--impakt-field-width`.\n */\nexport const fieldWidths = css`\n :host { --impakt-field-width: 100%; }\n :host([width='xs']) { --impakt-field-width: 8ch; }\n :host([width='sm']) { --impakt-field-width: 14ch; }\n :host([width='md']) { --impakt-field-width: 24ch; }\n :host([width='lg']) { --impakt-field-width: 40ch; }\n`;\n\n/**\n * The base of every form control.\n *\n * @fires {CustomEvent<{ value: string }>} impakt-change - When the answer changes. The answer is in detail.value.\n */\nexport abstract class FieldElement extends ImpaktElement {\n /** Form controls participate in a `<form>` like native ones. */\n static formAssociated = true;\n\n static properties = {\n label: { type: String },\n name: { type: String },\n value: { type: String },\n description: { type: String },\n error: { type: String },\n required: { type: Boolean, reflect: true },\n disabled: { type: Boolean, reflect: true },\n readonly: { type: Boolean, reflect: true },\n requiredText: { type: String, attribute: 'required-text' },\n };\n\n declare label: string;\n declare name: string;\n declare value: string;\n declare description: string;\n declare error: string;\n declare required: boolean;\n declare disabled: boolean;\n declare readonly: boolean;\n /**\n * How \"you must answer this\" is said.\n *\n * Words, not an asterisk. 3.3.2 asks for labels or instructions, and an\n * asterisk is neither until a legend explains it — which puts the\n * explanation somewhere other than the field it explains. It is a property\n * so a partner can reword it, not so they can empty it.\n */\n declare requiredText: string;\n\n protected internals: ElementInternals | null = null;\n\n constructor() {\n super();\n this.label = '';\n this.name = '';\n this.value = '';\n this.description = '';\n this.error = '';\n this.required = false;\n this.disabled = false;\n this.readonly = false;\n this.requiredText = 'required';\n // happy-dom and older engines do not implement attachInternals. A control\n // that cannot associate with a form is still a usable control, so this\n // degrades rather than throwing on construction.\n try {\n this.internals = this.attachInternals();\n } catch {\n this.internals = null;\n }\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n css`\n :host {\n display: block;\n margin-block-end: ${space(4)};\n }\n .label {\n display: block;\n font-size: ${fontSize('sm')};\n font-weight: ${fontWeight('semibold')};\n line-height: ${lineHeight('normal')};\n margin-block-end: ${space(1)};\n color: ${t.text};\n }\n .required {\n font-weight: ${fontWeight('regular')};\n color: ${t.textMuted};\n }\n .description {\n font-size: ${fontSize('sm')};\n line-height: ${lineHeight('normal')};\n color: ${t.textMuted};\n margin-block-end: ${space(2)};\n }\n .error {\n font-size: ${fontSize('sm')};\n line-height: ${lineHeight('normal')};\n color: ${t.dangerText};\n margin-block-start: ${space(1)};\n display: flex;\n gap: ${space(1)};\n }\n .error:empty {\n display: none;\n }\n .visually-hidden {\n ${visuallyHidden}\n }\n /*\n * Only the control is dimmed. Dimming the whole host took the question,\n * the hint and the error below 4.5:1, and a disabled field still has to\n * say what it is and why it cannot be changed. The native disabled\n * control itself is exempt from the contrast criterion.\n */\n :host([disabled]) :is(input, select, textarea, button) {\n opacity: 0.6;\n cursor: not-allowed;\n }\n `,\n ];\n\n protected get controlId(): string {\n return this.id_('control');\n }\n\n /**\n * What the control points `aria-describedby` at.\n *\n * The error id is included only while there is an error. A describedby that\n * always names an empty element trains a screen-reader user to expect\n * nothing after the description, and then the one time it matters they have\n * already learned to ignore it.\n */\n protected get describedBy(): string | typeof nothing {\n const ids = [\n this.description ? this.id_('description') : '',\n this.error ? this.id_('error') : '',\n ].filter(Boolean);\n return ids.length ? ids.join(' ') : nothing;\n }\n\n /**\n * Focusing the element focuses its control, so `el.focus()` from an app, a\n * React ref or the error summary's link lands where someone can type, rather\n * than on a host that cannot take focus and so silently does nothing.\n */\n focus(options?: FocusOptions): void {\n const control = this.renderRoot?.querySelector<HTMLElement>(`#${this.controlId}`)\n ?? this.renderRoot?.querySelector<HTMLElement>('input, select, textarea, button');\n if (control) control.focus(options);\n else super.focus(options);\n }\n\n /** Subclasses render the control itself; everything round it is here. */\n protected abstract renderControl(): TemplateResult;\n\n /**\n * `<label for>` by default. A group of controls — radios, checkboxes —\n * cannot use one, because `for` names a single control, so those override\n * this and render a `<fieldset>` and `<legend>` instead.\n */\n protected renderLabel(): TemplateResult {\n return html`\n <label class=\"label\" for=${this.controlId} part=\"label\">\n ${this.label}${this.required\n ? html`<span class=\"required\"> (${this.requiredText})</span>`\n : nothing}\n </label>\n `;\n }\n\n render(): TemplateResult {\n return html`\n ${this.renderLabel()}\n ${this.description\n ? html`<div class=\"description\" id=${this.id_('description')} part=\"description\">\n ${this.description}\n </div>`\n : nothing}\n ${this.renderControl()}\n <!--\n The error region is always present, even when empty. A live region\n inserted at the same moment as its content is announced unreliably\n across screen readers; one that already exists and is then filled is\n announced consistently. \"polite\" rather than \"assertive\" because a\n validation message should not interrupt what is being read.\n -->\n <div\n class=\"error\"\n id=${this.id_('error')}\n part=\"error\"\n aria-live=\"polite\"\n >\n ${this.error || nothing}\n </div>\n `;\n }\n\n /** Keep the form value in step with the control. */\n protected setFormValue(value: string): void {\n this.value = value;\n this.internals?.setFormValue(value);\n this.dispatchEvent(new CustomEvent('impakt-change', { detail: { value }, bubbles: true, composed: true }));\n }\n}\n"],"mappings":";;;;;;;;;;;;AAAA,SAAS,MAAM,KAAK,eAAoC;AA0BjD,IAAM,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAapB,IAAe,eAAf,cAAoC,cAAc;AAAA,EAoCvD,cAAc;AACZ,UAAM;AAHR,SAAU,YAAqC;AAI7C,SAAK,QAAQ;AACb,SAAK,OAAO;AACZ,SAAK,QAAQ;AACb,SAAK,cAAc;AACnB,SAAK,QAAQ;AACb,SAAK,WAAW;AAChB,SAAK,WAAW;AAChB,SAAK,WAAW;AAChB,SAAK,eAAe;AAIpB,QAAI;AACF,WAAK,YAAY,KAAK,gBAAgB;AAAA,IACxC,QAAQ;AACN,WAAK,YAAY;AAAA,IACnB;AAAA,EACF;AAAA,EArDA;AAAA;AAAA,SAAO,iBAAiB;AAAA;AAAA,EAExB;AAAA,SAAO,aAAa;AAAA,MAClB,OAAO,EAAE,MAAM,OAAO;AAAA,MACtB,MAAM,EAAE,MAAM,OAAO;AAAA,MACrB,OAAO,EAAE,MAAM,OAAO;AAAA,MACtB,aAAa,EAAE,MAAM,OAAO;AAAA,MAC5B,OAAO,EAAE,MAAM,OAAO;AAAA,MACtB,UAAU,EAAE,MAAM,SAAS,SAAS,KAAK;AAAA,MACzC,UAAU,EAAE,MAAM,SAAS,SAAS,KAAK;AAAA,MACzC,UAAU,EAAE,MAAM,SAAS,SAAS,KAAK;AAAA,MACzC,cAAc,EAAE,MAAM,QAAQ,WAAW,gBAAgB;AAAA,IAC3D;AAAA;AAAA,EA2CA;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,KAAK,SAAS,EAAE,KAC3E,KAAK,YAAY,cAA2B,iCAAiC;AAClF,QAAI,QAAS,SAAQ,MAAM,OAAO;AAAA,QAC7B,OAAM,MAAM,OAAO;AAAA,EAC1B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUU,cAA8B;AACtC,WAAO;AAAA,iCACsB,KAAK,SAAS;AAAA,UACrC,KAAK,KAAK,GAAG,KAAK,WAChB,gCAAgC,KAAK,YAAY,aACjD,OAAO;AAAA;AAAA;AAAA,EAGjB;AAAA,EAEA,SAAyB;AACvB,WAAO;AAAA,QACH,KAAK,YAAY,CAAC;AAAA,QAClB,KAAK,cACH,mCAAmC,KAAK,IAAI,aAAa,CAAC;AAAA,cACtD,KAAK,WAAW;AAAA,oBAEpB,OAAO;AAAA,QACT,KAAK,cAAc,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAUf,KAAK,IAAI,OAAO,CAAC;AAAA;AAAA;AAAA;AAAA,UAIpB,KAAK,SAAS,OAAO;AAAA;AAAA;AAAA,EAG7B;AAAA;AAAA,EAGU,aAAa,OAAqB;AAC1C,SAAK,QAAQ;AACb,SAAK,WAAW,aAAa,KAAK;AAClC,SAAK,cAAc,IAAI,YAAY,iBAAiB,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,MAAM,UAAU,KAAK,CAAC,CAAC;AAAA,EAC3G;AACF;","names":[]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
ImpaktElement,
|
|
3
3
|
t
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YR6T73GY.js";
|
|
5
5
|
|
|
6
6
|
// packages/ui/src/components/media.ts
|
|
7
7
|
import { html, css, nothing } from "lit";
|
|
8
|
-
var
|
|
8
|
+
var ImpaktImage = class extends ImpaktElement {
|
|
9
9
|
static {
|
|
10
10
|
this.properties = {
|
|
11
11
|
src: { type: String },
|
|
@@ -37,7 +37,7 @@ var ImpktImage = class extends ImpktElement {
|
|
|
37
37
|
}
|
|
38
38
|
static {
|
|
39
39
|
this.styles = [
|
|
40
|
-
...
|
|
40
|
+
...ImpaktElement.styles,
|
|
41
41
|
css`
|
|
42
42
|
@media (max-width: 40rem) { :host([hide-on='phone']) { display: none; } }
|
|
43
43
|
@media (min-width: 40.0625rem) { :host([hide-on='wide']) { display: none; } }
|
|
@@ -76,7 +76,7 @@ var ImpktImage = class extends ImpktElement {
|
|
|
76
76
|
`;
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
|
-
var
|
|
79
|
+
var ImpaktLogo = class extends ImpaktElement {
|
|
80
80
|
static {
|
|
81
81
|
this.properties = {
|
|
82
82
|
src: { type: String },
|
|
@@ -96,7 +96,7 @@ var ImpktLogo = class extends ImpktElement {
|
|
|
96
96
|
}
|
|
97
97
|
static {
|
|
98
98
|
this.styles = [
|
|
99
|
-
...
|
|
99
|
+
...ImpaktElement.styles,
|
|
100
100
|
css`
|
|
101
101
|
:host {
|
|
102
102
|
display: inline-block;
|
|
@@ -113,7 +113,7 @@ var ImpktLogo = class extends ImpktElement {
|
|
|
113
113
|
return html`<img part="logo" src=${src} alt=${this.alt} style="height: ${this.height}px" />`;
|
|
114
114
|
}
|
|
115
115
|
};
|
|
116
|
-
var
|
|
116
|
+
var ImpaktDocumentLink = class extends ImpaktElement {
|
|
117
117
|
static {
|
|
118
118
|
this.properties = {
|
|
119
119
|
href: { type: String },
|
|
@@ -131,7 +131,7 @@ var ImpktDocumentLink = class extends ImpktElement {
|
|
|
131
131
|
}
|
|
132
132
|
static {
|
|
133
133
|
this.styles = [
|
|
134
|
-
...
|
|
134
|
+
...ImpaktElement.styles,
|
|
135
135
|
css`
|
|
136
136
|
:host {
|
|
137
137
|
display: block;
|
|
@@ -166,13 +166,13 @@ var ImpktDocumentLink = class extends ImpktElement {
|
|
|
166
166
|
`;
|
|
167
167
|
}
|
|
168
168
|
};
|
|
169
|
-
customElements.define("
|
|
170
|
-
customElements.define("
|
|
171
|
-
customElements.define("
|
|
169
|
+
customElements.define("impakt-image", ImpaktImage);
|
|
170
|
+
customElements.define("impakt-logo", ImpaktLogo);
|
|
171
|
+
customElements.define("impakt-document-link", ImpaktDocumentLink);
|
|
172
172
|
|
|
173
173
|
export {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
174
|
+
ImpaktImage,
|
|
175
|
+
ImpaktLogo,
|
|
176
|
+
ImpaktDocumentLink
|
|
177
177
|
};
|
|
178
|
-
//# sourceMappingURL=chunk-
|
|
178
|
+
//# sourceMappingURL=chunk-A7YBFS4H.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/media.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { ImpaktElement } from '../base/ImpaktElement';\nimport { t } from '../base/tokens';\n\n/**\n * An image.\n *\n * `alt` is required and may be the empty string, which is a decision rather\n * than laxity: an empty alt is the correct and only way to mark an image as\n * decorative, and a missing alt is a different thing entirely — it leaves a\n * screen reader to read the file name. Making the property required forces the\n * author to say which they meant.\n *\n * `width` and `height` are the intrinsic pixel size. Without them the browser\n * cannot reserve space and the page jumps as each image loads, which is a\n * usability problem for everyone and a serious one for anyone using a screen\n * magnifier, who loses their place entirely.\n\n *\n * @category media\n * @icon image\n * @role image\n */\nexport class ImpaktImage extends ImpaktElement {\n static properties = {\n src: { type: String },\n alt: { type: String },\n decorative: { type: Boolean, reflect: true },\n width: { type: Number },\n height: { type: Number },\n focalX: { type: Number, attribute: 'focal-x' },\n focalY: { type: Number, attribute: 'focal-y' },\n loading: { type: String },\n ratio: { type: String, reflect: true },\n rounded: { type: String, reflect: true },\n hideOn: { type: String, reflect: true, attribute: 'hide-on' },\n };\n\n /**\n * Leave it out on a phone, or on anything wider, for a picture drawn twice:\n * once for a wide screen and once for a narrow one. Never both.\n */\n declare hideOn: 'never' | 'phone' | 'wide';\n declare src: string;\n declare alt: string;\n /**\n * This image says nothing a reader needs.\n *\n * An empty `alt` is the correct way to mark a decorative image AND what a\n * missing one looks like, so the two are indistinguishable to anything\n * downstream — which is why the commonest accessibility failure on the web\n * survives every automated check. Only the author knows which they meant,\n * so this is where they say it, and the publish gate holds them to it.\n */\n declare decorative: boolean;\n declare width: number | undefined;\n declare height: number | undefined;\n /** The fraction of the image that must survive a crop. */\n declare focalX: number;\n declare focalY: number;\n declare loading: 'lazy' | 'eager';\n /** The picture's shape. It is cropped to fit, keeping the focal point in view. */\n declare ratio: 'natural' | '16:9' | '4:3' | '3:2' | '1:1';\n /** How round the corners are. */\n declare rounded: 'none' | 'sm' | 'lg' | 'full';\n\n constructor() {\n super();\n this.hideOn = 'never';\n this.ratio = 'natural';\n this.rounded = 'none';\n this.src = '';\n this.alt = '';\n this.decorative = false;\n this.width = undefined;\n this.height = undefined;\n this.focalX = 0.5;\n this.focalY = 0.5;\n this.loading = 'lazy';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n @media (max-width: 40rem) { :host([hide-on='phone']) { display: none; } }\n @media (min-width: 40.0625rem) { :host([hide-on='wide']) { display: none; } }\n :host {\n display: block;\n }\n img {\n display: block;\n max-inline-size: 100%;\n block-size: auto;\n object-fit: cover;\n }\n :host(:not([ratio='natural'])) img { inline-size: 100%; }\n :host([ratio='16:9']) img { aspect-ratio: 16 / 9; }\n :host([ratio='4:3']) img { aspect-ratio: 4 / 3; }\n :host([ratio='3:2']) img { aspect-ratio: 3 / 2; }\n :host([ratio='1:1']) img { aspect-ratio: 1 / 1; }\n :host([rounded='sm']) img { border-radius: ${t.radius}; }\n :host([rounded='lg']) img { border-radius: ${t.radiusLg}; }\n :host([rounded='full']) img { border-radius: 50%; }\n `,\n ];\n\n render(): TemplateResult {\n return html`\n <img\n part=\"image\"\n src=${this.src}\n alt=${this.decorative ? '' : this.alt}\n role=${this.decorative ? 'presentation' : nothing}\n width=${this.width ?? nothing}\n height=${this.height ?? nothing}\n loading=${this.loading}\n style=\"object-position: ${this.focalX * 100}% ${this.focalY * 100}%\"\n />\n `;\n }\n}\n\n/**\n * The partner's logo.\n *\n * Separate from `impakt-image` for one reason: it is the most prominent image on\n * every page and its alt text is the brand name, so it should not be possible\n * to ship it with an empty alt by copying a decorative image. `src` and `alt`\n * come from the brand's assets.\n *\n * `on-dark` picks the dark-surface variant where the brand supplies one. A\n * logo that disappears into a dark footer is not a styling problem, it is a\n * missing piece of information.\n\n *\n * @category media\n * @icon logo\n */\nexport class ImpaktLogo extends ImpaktElement {\n static properties = {\n src: { type: String },\n srcDark: { type: String, attribute: 'src-dark' },\n alt: { type: String },\n onDark: { type: Boolean, attribute: 'on-dark', reflect: true },\n height: { type: Number },\n };\n\n declare src: string;\n declare srcDark: string;\n declare alt: string;\n declare onDark: boolean;\n declare height: number;\n\n constructor() {\n super();\n this.src = '';\n this.srcDark = '';\n this.alt = '';\n this.onDark = false;\n this.height = 32;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host {\n display: inline-block;\n }\n img {\n display: block;\n inline-size: auto;\n }\n `,\n ];\n\n render(): TemplateResult {\n const src = this.onDark && this.srcDark ? this.srcDark : this.src;\n return html`<img part=\"logo\" src=${src} alt=${this.alt} style=\"height: ${this.height}px\" />`;\n }\n}\n\n/**\n * A downloadable document — terms of service, a product sheet, a price list.\n *\n * The file type and size are part of the accessible name, not decoration\n * beside it. A list of links all named \"Download\" fails 2.4.4 Link Purpose,\n * and a reader tabbing between them cannot tell which document they are on.\n\n *\n * @category media\n * @icon document\n */\nexport class ImpaktDocumentLink extends ImpaktElement {\n static properties = {\n href: { type: String },\n label: { type: String },\n fileType: { type: String, attribute: 'file-type' },\n byteSize: { type: Number, attribute: 'byte-size' },\n };\n\n declare href: string;\n declare label: string;\n declare fileType: string;\n declare byteSize: number | undefined;\n\n constructor() {\n super();\n this.href = '';\n this.label = '';\n this.fileType = '';\n this.byteSize = undefined;\n }\n\n static styles = [\n ...ImpaktElement.styles,\n css`\n :host {\n display: block;\n }\n a {\n color: ${t.link};\n text-decoration: underline;\n text-underline-offset: 0.2em;\n display: inline-flex;\n gap: 0.5ch;\n align-items: baseline;\n min-block-size: ${t.targetMin};\n }\n .meta {\n color: ${t.textMuted};\n }\n `,\n ];\n\n /** \"240 KB\". Rounded, because the exact byte count helps nobody. */\n private get size(): string {\n if (!this.byteSize) return '';\n const kb = this.byteSize / 1024;\n return kb >= 1024 ? `${(kb / 1024).toFixed(1)} MB` : `${Math.round(kb)} KB`;\n }\n\n render(): TemplateResult {\n const meta = [this.fileType, this.size].filter(Boolean).join(', ');\n return html`\n <a part=\"link\" href=${this.href || nothing} download>\n <span>${this.label}</span>${meta ? html`<span class=\"meta\">(${meta})</span>` : nothing}\n </a>\n `;\n }\n}\n\ncustomElements.define('impakt-image', ImpaktImage);\ncustomElements.define('impakt-logo', ImpaktLogo);\ncustomElements.define('impakt-document-link', ImpaktDocumentLink);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-image': ImpaktImage;\n 'impakt-logo': ImpaktLogo;\n 'impakt-document-link': ImpaktDocumentLink;\n }\n}\n"],"mappings":";;;;;;AAAA,SAAS,MAAM,KAAK,eAAoC;AAuBjD,IAAM,cAAN,cAA0B,cAAc;AAAA,EAC7C;AAAA,SAAO,aAAa;AAAA,MAClB,KAAK,EAAE,MAAM,OAAO;AAAA,MACpB,KAAK,EAAE,MAAM,OAAO;AAAA,MACpB,YAAY,EAAE,MAAM,SAAS,SAAS,KAAK;AAAA,MAC3C,OAAO,EAAE,MAAM,OAAO;AAAA,MACtB,QAAQ,EAAE,MAAM,OAAO;AAAA,MACvB,QAAQ,EAAE,MAAM,QAAQ,WAAW,UAAU;AAAA,MAC7C,QAAQ,EAAE,MAAM,QAAQ,WAAW,UAAU;AAAA,MAC7C,SAAS,EAAE,MAAM,OAAO;AAAA,MACxB,OAAO,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MACrC,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MACvC,QAAQ,EAA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AE,OAAO,OAAO,EAAE,KAAK,IAAI;AACjE,WAAO;AAAA,4BACiB,KAAK,QAAQ,OAAO;AAAA,gBAChC,KAAK,KAAK,UAAU,OAAO,2BAA2B,IAAI,aAAa,OAAO;AAAA;AAAA;AAAA,EAG5F;AACF;AAEA,eAAe,OAAO,gBAAgB,WAAW;AACjD,eAAe,OAAO,eAAe,UAAU;AAC/C,eAAe,OAAO,wBAAwB,kBAAkB;","names":[]}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FieldElement,
|
|
3
3
|
fieldWidths
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5ZQVL3V2.js";
|
|
5
5
|
import {
|
|
6
6
|
fontSize,
|
|
7
7
|
space,
|
|
8
8
|
t
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YR6T73GY.js";
|
|
10
10
|
|
|
11
11
|
// packages/ui/src/components/textarea.ts
|
|
12
12
|
import { html, css, nothing } from "lit";
|
|
13
|
-
var
|
|
13
|
+
var ImpaktTextarea = class extends FieldElement {
|
|
14
14
|
constructor() {
|
|
15
15
|
super();
|
|
16
16
|
this.filled = false;
|
|
@@ -36,15 +36,15 @@ var ImpktTextarea = class extends FieldElement {
|
|
|
36
36
|
fieldWidths,
|
|
37
37
|
css`
|
|
38
38
|
textarea {
|
|
39
|
-
inline-size: min(100%, var(--
|
|
39
|
+
inline-size: min(100%, var(--impakt-field-width));
|
|
40
40
|
padding: ${space(2.5)} ${space(3)};
|
|
41
41
|
font-family: inherit;
|
|
42
42
|
font-size: ${fontSize("md")};
|
|
43
43
|
color: ${t.text};
|
|
44
|
-
background: var(--
|
|
44
|
+
background: var(--impakt-color-field-surface, ${t.surfaceCard});
|
|
45
45
|
border: ${t.borderThin} solid ${t.border};
|
|
46
46
|
border-radius: ${t.radiusLg};
|
|
47
|
-
box-shadow: var(--
|
|
47
|
+
box-shadow: var(--impakt-shadow-field, ${t.shadowXs});
|
|
48
48
|
transition: border-color 120ms ease-in-out, box-shadow 120ms ease-in-out;
|
|
49
49
|
/* Resizing is left on deliberately. 1.4.4 and 1.4.12 both assume text
|
|
50
50
|
can be made bigger, and a fixed box is where that stops working. */
|
|
@@ -110,9 +110,9 @@ var ImpktTextarea = class extends FieldElement {
|
|
|
110
110
|
this.fill();
|
|
111
111
|
}
|
|
112
112
|
};
|
|
113
|
-
customElements.define("
|
|
113
|
+
customElements.define("impakt-textarea", ImpaktTextarea);
|
|
114
114
|
|
|
115
115
|
export {
|
|
116
|
-
|
|
116
|
+
ImpaktTextarea
|
|
117
117
|
};
|
|
118
|
-
//# sourceMappingURL=chunk-
|
|
118
|
+
//# sourceMappingURL=chunk-ACQ4KYPR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/textarea.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { FieldElement, fieldWidths } from '../base/FieldElement';\nimport { fontSize, space, t } from '../base/tokens';\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 };\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\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 }\n\n static styles = [\n ...FieldElement.styles,\n fieldWidths,\n css`\n textarea {\n inline-size: min(100%, var(--impakt-field-width));\n padding: ${space(2.5)} ${space(3)};\n font-family: inherit;\n font-size: ${fontSize('md')};\n color: ${t.text};\n background: var(--impakt-color-field-surface, ${t.surfaceCard});\n border: ${t.borderThin} solid ${t.border};\n border-radius: ${t.radiusLg};\n box-shadow: var(--impakt-shadow-field, ${t.shadowXs});\n transition: border-color 120ms ease-in-out, box-shadow 120ms ease-in-out;\n /* Resizing is left on deliberately. 1.4.4 and 1.4.12 both assume text\n can be made bigger, and a fixed box is where that stops working. */\n resize: vertical;\n }\n textarea:hover:not(:disabled) {\n border-color: ${t.borderStrong};\n }\n textarea:focus-visible {\n border-color: ${t.brand};\n box-shadow: ${t.focusShadow}, 0 0 0 6px ${t.brandHalo};\n }\n :host([invalid]) textarea {\n border-color: ${t.danger};\n border-width: ${t.borderThick};\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 { saved = sessionStorage.getItem('strata.estimate'); } catch { saved = null; }\n if (saved) { this.filledText = saved; this.setFormValue(saved); }\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 maxlength=${this.maxlength ?? 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 @input=${(e: Event) => { this.filledText = ''; this.setFormValue((e.target as HTMLTextAreaElement).value); }}\n >${this.value}</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\nd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js";
|
|
10
10
|
|
|
11
11
|
// packages/ui/src/components/radio-group.ts
|
|
12
12
|
import { html, css, nothing } from "lit";
|
|
13
|
-
var
|
|
13
|
+
var ImpaktRadioGroup = class extends FieldElement {
|
|
14
14
|
static {
|
|
15
15
|
this.properties = {
|
|
16
16
|
...FieldElement.properties,
|
|
@@ -131,9 +131,9 @@ var ImpktRadioGroup = class extends FieldElement {
|
|
|
131
131
|
if (changed.has("error")) this.toggleAttribute("invalid", Boolean(this.error));
|
|
132
132
|
}
|
|
133
133
|
};
|
|
134
|
-
customElements.define("
|
|
134
|
+
customElements.define("impakt-radio-group", ImpaktRadioGroup);
|
|
135
135
|
|
|
136
136
|
export {
|
|
137
|
-
|
|
137
|
+
ImpaktRadioGroup
|
|
138
138
|
};
|
|
139
|
-
//# sourceMappingURL=chunk-
|
|
139
|
+
//# sourceMappingURL=chunk-DE3INTHZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/radio-group.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { FieldElement } from '../base/FieldElement';\nimport { targetSize } from '../base/styles';\nimport { fontSize, space, t } from '../base/tokens';\n\nexport interface RadioOption {\n value: string;\n label: string;\n description?: string;\n}\n\n/**\n * A choose-one group.\n *\n * **It renders native radios, and that is the whole design.** A group of\n * `<input type=\"radio\">` sharing a name already has roving tabindex, arrow-key\n * navigation that wraps, Home and End, selection-follows-focus, and the right\n * announcement in every screen reader — all of it, correctly, with no\n * JavaScript. Hand-rolling that is the single most commonly attempted and most\n * commonly botched widget in any design system, and every version of it is a\n * worse version of what the platform ships.\n *\n * Because the radios share one shadow root, their `name` scopes to this\n * component and cannot collide with another group on the page.\n *\n * The label is a `<legend>` inside a `<fieldset>`, not a `<label for>`:\n * `for` names one control, and the question here is asked of the set.\n\n *\n * @category form\n * @icon radio\n */\nexport class ImpaktRadioGroup extends FieldElement {\n static properties = {\n ...FieldElement.properties,\n options: { type: Array },\n };\n\n declare options: RadioOption[];\n\n constructor() {\n super();\n this.options = [];\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 .option {\n display: flex;\n align-items: flex-start;\n gap: ${space(3)};\n padding: ${space(3)};\n border: ${t.borderThin} solid ${t.border};\n border-radius: ${t.radius};\n margin-block-end: ${space(2)};\n cursor: pointer;\n }\n .option:hover {\n background: ${t.surfaceSubtle};\n }\n /* The whole row is the target, not the 20px dot — 2.5.8 is a floor and\n a comfortable target is the actual goal. */\n .option input {\n ${targetSize}\n inline-size: 20px;\n block-size: 20px;\n margin: 0;\n flex: none;\n accent-color: ${t.brand};\n }\n .option-text {\n display: block;\n font-size: ${fontSize('md')};\n }\n .option-description {\n display: block;\n font-size: ${fontSize('sm')};\n color: ${t.textMuted};\n margin-block-start: ${space(1)};\n }\n :host([invalid]) .option {\n border-color: ${t.danger};\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 protected renderControl(): TemplateResult {\n return html`\n ${this.options.map((option, i) => {\n const id = this.id_(`opt-${i}`);\n const descId = option.description ? this.id_(`opt-${i}-desc`) : undefined;\n return html`\n <label class=\"option\" part=\"option\" for=${id}>\n <input\n type=\"radio\"\n id=${id}\n name=${this.uid}\n value=${option.value}\n .checked=${this.value === option.value}\n ?disabled=${this.disabled}\n ?required=${this.required && i === 0}\n aria-describedby=${descId ?? nothing}\n @change=${() => this.setFormValue(option.value)}\n />\n <span>\n <span class=\"option-text\">${option.label}</span>\n ${option.description\n ? html`<span class=\"option-description\" id=${descId!}>${option.description}</span>`\n : nothing}\n </span>\n </label>\n `;\n })}\n `;\n }\n\n /**\n * The fieldset wraps everything, so the whole field is rebuilt here rather\n * than relying on the base class's flat order.\n */\n render(): TemplateResult {\n return html`\n <fieldset\n part=\"fieldset\"\n aria-describedby=${this.describedBy}\n aria-invalid=${this.error ? 'true' : nothing}\n >\n ${this.renderLabel()}\n ${this.description\n ? html`<div class=\"description\" id=${this.id_('description')} part=\"description\">\n ${this.description}\n </div>`\n : nothing}\n ${this.renderControl()}\n <div class=\"error\" id=${this.id_('error')} part=\"error\" aria-live=\"polite\">\n ${this.error || nothing}\n </div>\n </fieldset>\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-radio-group', ImpaktRadioGroup);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-radio-group': ImpaktRadioGroup;\n }\n}\n"],"mappings":";;;;;;;;;;;AAAA,SAAS,MAAM,KAAK,eAAoC;AAgCjD,IAAM,mBAAN,cAA+B,aAAa;AAAA,EACjD;AAAA,SAAO,aAAa;AAAA,MAClB,GAAG,aAAa;AAAA,MAChB,SAAS,EAAE,MAAM,MAAM;AAAA,IACzB;AAAA;AAAA,EAIA,cAAc;AACZ,UAAM;AACN,SAAK,UAAU,CAAC;AAAA,EAClB;AAAA,EAEA;AAAA,SAAO,SAAS;AAAA,MACd,GAAG,aAAa;AAAA,MAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAaW,MAAM,CAAC,CAAC;AAAA,mBACJ,MAAM,CAAC,CAAC;AAAA,kBACT,EAAE,UAAU,UAAU,EAAE,MAAM;AAAA,yBACvB,EAAE,MAAM;AAAA,4BACL,MAAM,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA,sBAId,EAAE,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA,UAK3B,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA,wBAKI,EAAE,KAAK;AAAA;AAAA;AAAA;AAAA,qBAIV,SAAS,IAAI,CAAC;AAAA;AAAA;AAAA;AAAA,qBAId,SAAS,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