@atomic-ui/ui 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-WC5KO6KZ.js → chunk-4YAA7EML.js} +5 -6
- package/dist/{chunk-WC5KO6KZ.js.map → chunk-4YAA7EML.js.map} +1 -1
- package/dist/{chunk-5NBYZ5UC.js → chunk-6HZA6A3L.js} +11 -13
- package/dist/{chunk-5NBYZ5UC.js.map → chunk-6HZA6A3L.js.map} +1 -1
- package/dist/{chunk-4P3FLJZG.js → chunk-7T34CRBF.js} +9 -11
- package/dist/{chunk-4P3FLJZG.js.map → chunk-7T34CRBF.js.map} +1 -1
- package/dist/{chunk-3LFXWUOU.js → chunk-AC6G7X3G.js} +11 -13
- package/dist/{chunk-3LFXWUOU.js.map → chunk-AC6G7X3G.js.map} +1 -1
- package/dist/{chunk-SHGQMQXS.js → chunk-BOLZMDAS.js} +10 -12
- package/dist/{chunk-SHGQMQXS.js.map → chunk-BOLZMDAS.js.map} +1 -1
- package/dist/{chunk-BM73FVQ4.js → chunk-BUWE6XGX.js} +11 -12
- package/dist/{chunk-BM73FVQ4.js.map → chunk-BUWE6XGX.js.map} +1 -1
- package/dist/{chunk-M3WQZDWU.js → chunk-GEBLDC2J.js} +14 -16
- package/dist/{chunk-M3WQZDWU.js.map → chunk-GEBLDC2J.js.map} +1 -1
- package/dist/{chunk-26CSJMXY.js → chunk-GU4UQKJP.js} +8 -10
- package/dist/{chunk-26CSJMXY.js.map → chunk-GU4UQKJP.js.map} +1 -1
- package/dist/{chunk-PV4GMCP6.js → chunk-HJ2V635J.js} +10 -12
- package/dist/{chunk-PV4GMCP6.js.map → chunk-HJ2V635J.js.map} +1 -1
- package/dist/{chunk-VF6PNIPS.js → chunk-IHEEUM3M.js} +14 -16
- package/dist/{chunk-VF6PNIPS.js.map → chunk-IHEEUM3M.js.map} +1 -1
- package/dist/chunk-J5KAMJ2N.js +138 -0
- package/dist/chunk-J5KAMJ2N.js.map +1 -0
- package/dist/{chunk-CNFIYRPA.js → chunk-KAU3V65B.js} +9 -11
- package/dist/{chunk-CNFIYRPA.js.map → chunk-KAU3V65B.js.map} +1 -1
- package/dist/{chunk-TWCXYY4Z.js → chunk-KC6RKWO6.js} +6 -8
- package/dist/{chunk-TWCXYY4Z.js.map → chunk-KC6RKWO6.js.map} +1 -1
- package/dist/{chunk-OZNQ4GAR.js → chunk-MNCM7YOY.js} +8 -10
- package/dist/chunk-MNCM7YOY.js.map +1 -0
- package/dist/{chunk-43V4RFK4.js → chunk-NEWN44LO.js} +12 -14
- package/dist/{chunk-43V4RFK4.js.map → chunk-NEWN44LO.js.map} +1 -1
- package/dist/{chunk-UTL446G6.js → chunk-SSNCGJ5W.js} +8 -10
- package/dist/{chunk-UTL446G6.js.map → chunk-SSNCGJ5W.js.map} +1 -1
- package/dist/{chunk-VKQGLSDT.js → chunk-T4HSPWA7.js} +7 -9
- package/dist/{chunk-VKQGLSDT.js.map → chunk-T4HSPWA7.js.map} +1 -1
- package/dist/{chunk-WAB4TRB2.js → chunk-T63FI4ET.js} +20 -22
- package/dist/{chunk-WAB4TRB2.js.map → chunk-T63FI4ET.js.map} +1 -1
- package/dist/{chunk-O72RTRIJ.js → chunk-TOTVL3YH.js} +9 -11
- package/dist/{chunk-O72RTRIJ.js.map → chunk-TOTVL3YH.js.map} +1 -1
- package/dist/{chunk-QAKFGIOO.js → chunk-TRLEYGGH.js} +10 -12
- package/dist/{chunk-QAKFGIOO.js.map → chunk-TRLEYGGH.js.map} +1 -1
- package/dist/{chunk-YXHT3ZJU.js → chunk-XEN5NV55.js} +9 -11
- package/dist/{chunk-YXHT3ZJU.js.map → chunk-XEN5NV55.js.map} +1 -1
- package/dist/{chunk-RYJQKKJ4.js → chunk-Z4KZG2E3.js} +18 -20
- package/dist/{chunk-RYJQKKJ4.js.map → chunk-Z4KZG2E3.js.map} +1 -1
- package/dist/components/accordion.js +2 -2
- package/dist/components/alert.js +2 -2
- package/dist/components/button.d.ts +1 -0
- package/dist/components/button.js +2 -2
- package/dist/components/checkbox-group.js +3 -3
- package/dist/components/checkbox.js +3 -3
- package/dist/components/date-input.js +3 -3
- package/dist/components/dialog.js +2 -2
- package/dist/components/grid.js +2 -2
- package/dist/components/help.js +2 -2
- package/dist/components/layout.js +2 -2
- package/dist/components/link.js +2 -2
- package/dist/components/media.js +2 -2
- package/dist/components/price.js +2 -2
- package/dist/components/progress.js +2 -2
- package/dist/components/radio-group.js +3 -3
- package/dist/components/select.js +3 -3
- package/dist/components/summary-list.js +2 -2
- package/dist/components/table.js +2 -2
- package/dist/components/text-input.js +3 -3
- package/dist/components/textarea.js +3 -3
- package/dist/index.js +22 -22
- package/package.json +2 -2
- package/dist/chunk-G6X62CFC.js +0 -713
- package/dist/chunk-G6X62CFC.js.map +0 -1
- package/dist/chunk-OZNQ4GAR.js.map +0 -1
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
-
A,
|
|
3
2
|
ImpktElement,
|
|
4
|
-
b,
|
|
5
3
|
focusRing,
|
|
6
|
-
i,
|
|
7
4
|
t,
|
|
8
5
|
visuallyHidden
|
|
9
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-J5KAMJ2N.js";
|
|
10
7
|
|
|
11
8
|
// packages/ui/src/components/link.ts
|
|
9
|
+
import { html, css, nothing } from "lit";
|
|
12
10
|
var ImpktLink = class extends ImpktElement {
|
|
13
11
|
static {
|
|
14
12
|
this.properties = {
|
|
@@ -27,7 +25,7 @@ var ImpktLink = class extends ImpktElement {
|
|
|
27
25
|
this.styles = [
|
|
28
26
|
...ImpktElement.styles,
|
|
29
27
|
focusRing,
|
|
30
|
-
|
|
28
|
+
css`
|
|
31
29
|
:host {
|
|
32
30
|
display: inline;
|
|
33
31
|
}
|
|
@@ -47,14 +45,14 @@ var ImpktLink = class extends ImpktElement {
|
|
|
47
45
|
];
|
|
48
46
|
}
|
|
49
47
|
render() {
|
|
50
|
-
return
|
|
48
|
+
return html`
|
|
51
49
|
<a
|
|
52
50
|
part="link"
|
|
53
|
-
href=${this.href ||
|
|
54
|
-
target=${this.external ? "_blank" :
|
|
55
|
-
rel=${this.external ? "noopener noreferrer" :
|
|
51
|
+
href=${this.href || nothing}
|
|
52
|
+
target=${this.external ? "_blank" : nothing}
|
|
53
|
+
rel=${this.external ? "noopener noreferrer" : nothing}
|
|
56
54
|
>
|
|
57
|
-
<slot></slot>${this.external ?
|
|
55
|
+
<slot></slot>${this.external ? html`<span class="sr-only"> (${this.externalText})</span>` : nothing}
|
|
58
56
|
</a>
|
|
59
57
|
`;
|
|
60
58
|
}
|
|
@@ -64,4 +62,4 @@ customElements.define("impkt-link", ImpktLink);
|
|
|
64
62
|
export {
|
|
65
63
|
ImpktLink
|
|
66
64
|
};
|
|
67
|
-
//# sourceMappingURL=chunk-
|
|
65
|
+
//# sourceMappingURL=chunk-KAU3V65B.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/link.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { ImpktElement } from '../base/ImpktElement';\nimport { focusRing, visuallyHidden } from '../base/styles';\nimport { t } from '../base/tokens';\n\n/**\n * A link.\n *\n * **A new tab is always announced.** When `external` is set, the accessible\n * name gains \"opens in a new tab\" — not as a tooltip, which no screen reader\n * reads, and not as an icon alone, which carries no text. An unannounced new\n * tab breaks the back button for someone who cannot see that the window\n * changed, and that is what 3.2.5 is about.\n *\n * **It is underlined.** 1.4.1 Use of Colour: a link distinguished from body\n * text only by being a different colour is not distinguished at all for a\n * reader who cannot tell the two colours apart.\n\n *\n * @category action\n * @icon link\n * @slot - The link text.\n */\nexport class ImpktLink extends ImpktElement {\n static properties = {\n href: { type: String },\n external: { type: Boolean, reflect: true },\n externalText: { type: String, attribute: 'external-text' },\n };\n\n declare href: string;\n declare external: boolean;\n declare externalText: string;\n\n constructor() {\n super();\n this.href = '';\n this.external = false;\n this.externalText = 'opens in a new tab';\n }\n\n static styles = [\n ...ImpktElement.styles,\n focusRing,\n css`\n :host {\n display: inline;\n }\n a {\n color: ${t.link};\n text-decoration: underline;\n text-underline-offset: 0.2em;\n border-radius: ${t.radiusSm};\n }\n a:hover {\n color: ${t.linkHover};\n }\n .sr-only {\n ${visuallyHidden}\n }\n `,\n ];\n\n render(): TemplateResult {\n return html`\n <a\n part=\"link\"\n href=${this.href || nothing}\n target=${this.external ? '_blank' : nothing}\n rel=${this.external ? 'noopener noreferrer' : nothing}\n >\n <slot></slot>${this.external ? html`<span class=\"sr-only\"> (${this.externalText})</span>` : nothing}\n </a>\n `;\n }\n}\n\ncustomElements.define('impkt-link', ImpktLink);\n\ndeclare global {\n interface HTMLElementTagNameMap { 'impkt-link': ImpktLink }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/components/link.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { ImpktElement } from '../base/ImpktElement';\nimport { focusRing, visuallyHidden } from '../base/styles';\nimport { t } from '../base/tokens';\n\n/**\n * A link.\n *\n * **A new tab is always announced.** When `external` is set, the accessible\n * name gains \"opens in a new tab\" — not as a tooltip, which no screen reader\n * reads, and not as an icon alone, which carries no text. An unannounced new\n * tab breaks the back button for someone who cannot see that the window\n * changed, and that is what 3.2.5 is about.\n *\n * **It is underlined.** 1.4.1 Use of Colour: a link distinguished from body\n * text only by being a different colour is not distinguished at all for a\n * reader who cannot tell the two colours apart.\n\n *\n * @category action\n * @icon link\n * @slot - The link text.\n */\nexport class ImpktLink extends ImpktElement {\n static properties = {\n href: { type: String },\n external: { type: Boolean, reflect: true },\n externalText: { type: String, attribute: 'external-text' },\n };\n\n declare href: string;\n declare external: boolean;\n declare externalText: string;\n\n constructor() {\n super();\n this.href = '';\n this.external = false;\n this.externalText = 'opens in a new tab';\n }\n\n static styles = [\n ...ImpktElement.styles,\n focusRing,\n css`\n :host {\n display: inline;\n }\n a {\n color: ${t.link};\n text-decoration: underline;\n text-underline-offset: 0.2em;\n border-radius: ${t.radiusSm};\n }\n a:hover {\n color: ${t.linkHover};\n }\n .sr-only {\n ${visuallyHidden}\n }\n `,\n ];\n\n render(): TemplateResult {\n return html`\n <a\n part=\"link\"\n href=${this.href || nothing}\n target=${this.external ? '_blank' : nothing}\n rel=${this.external ? 'noopener noreferrer' : nothing}\n >\n <slot></slot>${this.external ? html`<span class=\"sr-only\"> (${this.externalText})</span>` : nothing}\n </a>\n `;\n }\n}\n\ncustomElements.define('impkt-link', ImpktLink);\n\ndeclare global {\n interface HTMLElementTagNameMap { 'impkt-link': ImpktLink }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,MAAM,KAAK,eAAoC;AAuBjD,IAAM,YAAN,cAAwB,aAAa;AAAA,EAC1C;AAAA,SAAO,aAAa;AAAA,MAClB,MAAM,EAAE,MAAM,OAAO;AAAA,MACrB,UAAU,EAAE,MAAM,SAAS,SAAS,KAAK;AAAA,MACzC,cAAc,EAAE,MAAM,QAAQ,WAAW,gBAAgB;AAAA,IAC3D;AAAA;AAAA,EAMA,cAAc;AACZ,UAAM;AACN,SAAK,OAAO;AACZ,SAAK,WAAW;AAChB,SAAK,eAAe;AAAA,EACtB;AAAA,EAEA;AAAA,SAAO,SAAS;AAAA,MACd,GAAG,aAAa;AAAA,MAChB;AAAA,MACA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAKa,EAAE,IAAI;AAAA;AAAA;AAAA,yBAGE,EAAE,QAAQ;AAAA;AAAA;AAAA,iBAGlB,EAAE,SAAS;AAAA;AAAA;AAAA,UAGlB,cAAc;AAAA;AAAA;AAAA,IAGtB;AAAA;AAAA,EAEA,SAAyB;AACvB,WAAO;AAAA;AAAA;AAAA,eAGI,KAAK,QAAQ,OAAO;AAAA,iBAClB,KAAK,WAAW,WAAW,OAAO;AAAA,cACrC,KAAK,WAAW,wBAAwB,OAAO;AAAA;AAAA,uBAEtC,KAAK,WAAW,+BAA+B,KAAK,YAAY,aAAa,OAAO;AAAA;AAAA;AAAA,EAGzG;AACF;AAEA,eAAe,OAAO,cAAc,SAAS;","names":[]}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
-
A,
|
|
3
2
|
ImpktElement,
|
|
4
|
-
b,
|
|
5
3
|
fontSize,
|
|
6
4
|
fontWeight,
|
|
7
|
-
i,
|
|
8
5
|
space,
|
|
9
6
|
t
|
|
10
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-J5KAMJ2N.js";
|
|
11
8
|
|
|
12
9
|
// packages/ui/src/components/price.ts
|
|
10
|
+
import { html, css, nothing } from "lit";
|
|
13
11
|
var ImpktPrice = class extends ImpktElement {
|
|
14
12
|
static {
|
|
15
13
|
this.properties = {
|
|
@@ -33,7 +31,7 @@ var ImpktPrice = class extends ImpktElement {
|
|
|
33
31
|
static {
|
|
34
32
|
this.styles = [
|
|
35
33
|
...ImpktElement.styles,
|
|
36
|
-
|
|
34
|
+
css`
|
|
37
35
|
:host {
|
|
38
36
|
display: inline-flex;
|
|
39
37
|
align-items: baseline;
|
|
@@ -69,9 +67,9 @@ var ImpktPrice = class extends ImpktElement {
|
|
|
69
67
|
}
|
|
70
68
|
}
|
|
71
69
|
render() {
|
|
72
|
-
return
|
|
70
|
+
return html`
|
|
73
71
|
<span class="amount" part="amount">${this.formatted}</span>
|
|
74
|
-
${this.period ?
|
|
72
|
+
${this.period ? html`<span class="period" part="period">${this.period}</span>` : nothing}
|
|
75
73
|
`;
|
|
76
74
|
}
|
|
77
75
|
};
|
|
@@ -80,4 +78,4 @@ customElements.define("impkt-price", ImpktPrice);
|
|
|
80
78
|
export {
|
|
81
79
|
ImpktPrice
|
|
82
80
|
};
|
|
83
|
-
//# sourceMappingURL=chunk-
|
|
81
|
+
//# sourceMappingURL=chunk-KC6RKWO6.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/price.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { ImpktElement } from '../base/ImpktElement';\nimport { fontSize, fontWeight, space, t } from '../base/tokens';\n\n/**\n * A money amount.\n *\n * This component exists because of a decision taken in the content model: a\n * binding names a source and cannot compute\n * ([ADR 0003](../../../../docs/decisions/0003-binding-expressions.md)). The\n * consequence is that formatting lives here, where the locale and the currency\n * are known, rather than in authored content — so there is one place that\n * decides what \"£24.99\" looks like, and nobody writes a format string into a\n * CMS field.\n *\n * **The amount is one text node.** Splitting the pounds and the pence into\n * separate elements for typographic effect makes some screen readers read them\n * as two numbers, and \"twenty-four ninety-nine\" becomes \"twenty four, ninety\n * nine\". The visual emphasis is done with CSS over one node instead.\n *\n * **Minor units in, major units out.** `amount` is in pence, because a price\n * that arrives from a pricing API as a float has already lost money to binary\n * rounding before it reaches the screen.\n\n *\n * @category content\n * @icon price\n */\nexport class ImpktPrice extends ImpktElement {\n static properties = {\n amount: { type: Number },\n currency: { type: String },\n locale: { type: String },\n period: { type: String },\n size: { type: String, reflect: true },\n pending: { type: String },\n };\n\n /** In minor units — pence, cents. */\n declare amount: number | undefined;\n declare currency: string;\n declare locale: string;\n /** \"a month\", \"a year\". Read after the amount. */\n declare period: string;\n declare size: 'md' | 'lg' | 'xl';\n /** Shown while there is no amount yet. A price takes seconds to arrive. */\n declare pending: string;\n\n constructor() {\n super();\n this.amount = undefined;\n this.currency = 'GBP';\n this.locale = 'en-GB';\n this.period = '';\n this.size = 'xl';\n this.pending = '—';\n }\n\n static styles = [\n ...ImpktElement.styles,\n css`\n :host {\n display: inline-flex;\n align-items: baseline;\n gap: ${space(1)};\n color: ${t.text};\n }\n .amount {\n font-family: ${t.fontHeading};\n font-weight: ${fontWeight('bold')};\n /* Tabular figures so a price does not reflow as the digits change,\n which otherwise makes a recalculating price jitter. */\n font-variant-numeric: tabular-nums;\n }\n :host([size='md']) .amount { font-size: ${fontSize('lg')}; }\n :host([size='lg']) .amount { font-size: ${fontSize('2xl')}; }\n :host([size='xl']) .amount { font-size: ${fontSize('3xl')}; }\n .period {\n font-size: ${fontSize('sm')};\n color: ${t.textMuted};\n }\n `,\n ];\n\n private get formatted(): string {\n if (this.amount === undefined || Number.isNaN(this.amount)) return this.pending;\n try {\n return new Intl.NumberFormat(this.locale, {\n style: 'currency',\n currency: this.currency,\n }).format(this.amount / 100);\n } catch {\n // An unknown currency or locale must not take the page down. The number\n // is still the most useful thing on the screen.\n return (this.amount / 100).toFixed(2);\n }\n }\n\n render(): TemplateResult {\n return html`\n <span class=\"amount\" part=\"amount\">${this.formatted}</span>\n ${this.period ? html`<span class=\"period\" part=\"period\">${this.period}</span>` : nothing}\n `;\n }\n}\n\ncustomElements.define('impkt-price', ImpktPrice);\n\ndeclare global {\n interface HTMLElementTagNameMap { 'impkt-price': ImpktPrice }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/components/price.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { ImpktElement } from '../base/ImpktElement';\nimport { fontSize, fontWeight, space, t } from '../base/tokens';\n\n/**\n * A money amount.\n *\n * This component exists because of a decision taken in the content model: a\n * binding names a source and cannot compute\n * ([ADR 0003](../../../../docs/decisions/0003-binding-expressions.md)). The\n * consequence is that formatting lives here, where the locale and the currency\n * are known, rather than in authored content — so there is one place that\n * decides what \"£24.99\" looks like, and nobody writes a format string into a\n * CMS field.\n *\n * **The amount is one text node.** Splitting the pounds and the pence into\n * separate elements for typographic effect makes some screen readers read them\n * as two numbers, and \"twenty-four ninety-nine\" becomes \"twenty four, ninety\n * nine\". The visual emphasis is done with CSS over one node instead.\n *\n * **Minor units in, major units out.** `amount` is in pence, because a price\n * that arrives from a pricing API as a float has already lost money to binary\n * rounding before it reaches the screen.\n\n *\n * @category content\n * @icon price\n */\nexport class ImpktPrice extends ImpktElement {\n static properties = {\n amount: { type: Number },\n currency: { type: String },\n locale: { type: String },\n period: { type: String },\n size: { type: String, reflect: true },\n pending: { type: String },\n };\n\n /** In minor units — pence, cents. */\n declare amount: number | undefined;\n declare currency: string;\n declare locale: string;\n /** \"a month\", \"a year\". Read after the amount. */\n declare period: string;\n declare size: 'md' | 'lg' | 'xl';\n /** Shown while there is no amount yet. A price takes seconds to arrive. */\n declare pending: string;\n\n constructor() {\n super();\n this.amount = undefined;\n this.currency = 'GBP';\n this.locale = 'en-GB';\n this.period = '';\n this.size = 'xl';\n this.pending = '—';\n }\n\n static styles = [\n ...ImpktElement.styles,\n css`\n :host {\n display: inline-flex;\n align-items: baseline;\n gap: ${space(1)};\n color: ${t.text};\n }\n .amount {\n font-family: ${t.fontHeading};\n font-weight: ${fontWeight('bold')};\n /* Tabular figures so a price does not reflow as the digits change,\n which otherwise makes a recalculating price jitter. */\n font-variant-numeric: tabular-nums;\n }\n :host([size='md']) .amount { font-size: ${fontSize('lg')}; }\n :host([size='lg']) .amount { font-size: ${fontSize('2xl')}; }\n :host([size='xl']) .amount { font-size: ${fontSize('3xl')}; }\n .period {\n font-size: ${fontSize('sm')};\n color: ${t.textMuted};\n }\n `,\n ];\n\n private get formatted(): string {\n if (this.amount === undefined || Number.isNaN(this.amount)) return this.pending;\n try {\n return new Intl.NumberFormat(this.locale, {\n style: 'currency',\n currency: this.currency,\n }).format(this.amount / 100);\n } catch {\n // An unknown currency or locale must not take the page down. The number\n // is still the most useful thing on the screen.\n return (this.amount / 100).toFixed(2);\n }\n }\n\n render(): TemplateResult {\n return html`\n <span class=\"amount\" part=\"amount\">${this.formatted}</span>\n ${this.period ? html`<span class=\"period\" part=\"period\">${this.period}</span>` : nothing}\n `;\n }\n}\n\ncustomElements.define('impkt-price', ImpktPrice);\n\ndeclare global {\n interface HTMLElementTagNameMap { 'impkt-price': ImpktPrice }\n}\n"],"mappings":";;;;;;;;;AAAA,SAAS,MAAM,KAAK,eAAoC;AA4BjD,IAAM,aAAN,cAAyB,aAAa;AAAA,EAC3C;AAAA,SAAO,aAAa;AAAA,MAClB,QAAQ,EAAE,MAAM,OAAO;AAAA,MACvB,UAAU,EAAE,MAAM,OAAO;AAAA,MACzB,QAAQ,E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 -1,18 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
|
-
A,
|
|
3
2
|
ImpktElement,
|
|
4
|
-
b,
|
|
5
3
|
focusRing,
|
|
6
4
|
fontSize,
|
|
7
5
|
fontWeight,
|
|
8
|
-
i,
|
|
9
6
|
space,
|
|
10
7
|
t,
|
|
11
8
|
targetSize,
|
|
12
9
|
visuallyHidden
|
|
13
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-J5KAMJ2N.js";
|
|
14
11
|
|
|
15
12
|
// packages/ui/src/components/button.ts
|
|
13
|
+
import { html, css, nothing } from "lit";
|
|
16
14
|
var ImpktButton = class extends ImpktElement {
|
|
17
15
|
constructor() {
|
|
18
16
|
super();
|
|
@@ -46,7 +44,7 @@ var ImpktButton = class extends ImpktElement {
|
|
|
46
44
|
this.styles = [
|
|
47
45
|
...ImpktElement.styles,
|
|
48
46
|
focusRing,
|
|
49
|
-
|
|
47
|
+
css`
|
|
50
48
|
:host {
|
|
51
49
|
display: inline-block;
|
|
52
50
|
}
|
|
@@ -135,18 +133,18 @@ var ImpktButton = class extends ImpktElement {
|
|
|
135
133
|
if (this.type === "reset") this.internals?.form?.reset();
|
|
136
134
|
}
|
|
137
135
|
render() {
|
|
138
|
-
return
|
|
136
|
+
return html`
|
|
139
137
|
<button
|
|
140
138
|
class=${this.variant}
|
|
141
139
|
type="button"
|
|
142
140
|
part="button"
|
|
143
141
|
?disabled=${this.disabled}
|
|
144
|
-
aria-disabled=${this.busy ? "true" :
|
|
145
|
-
aria-busy=${this.busy ? "true" :
|
|
142
|
+
aria-disabled=${this.busy ? "true" : nothing}
|
|
143
|
+
aria-busy=${this.busy ? "true" : nothing}
|
|
146
144
|
@click=${this.onClick}
|
|
147
145
|
>
|
|
148
146
|
<slot></slot>
|
|
149
|
-
${this.busy ?
|
|
147
|
+
${this.busy ? html`<span class="sr-only">${this.busyLabel}</span>` : nothing}
|
|
150
148
|
</button>
|
|
151
149
|
`;
|
|
152
150
|
}
|
|
@@ -156,4 +154,4 @@ customElements.define("impkt-button", ImpktButton);
|
|
|
156
154
|
export {
|
|
157
155
|
ImpktButton
|
|
158
156
|
};
|
|
159
|
-
//# sourceMappingURL=chunk-
|
|
157
|
+
//# sourceMappingURL=chunk-MNCM7YOY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/button.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { ImpktElement } from '../base/ImpktElement';\nimport { focusRing, targetSize, visuallyHidden } from '../base/styles';\nimport { fontSize, fontWeight, space, t } from '../base/tokens';\n\n/**\n * A button.\n *\n * Two decisions carry the accessibility weight here.\n *\n * **A busy button is not a disabled button.** While an action is in flight the\n * control keeps its place in the tab order and reports `aria-disabled`, rather\n * than taking the native `disabled` attribute. A natively disabled element is\n * removed from the tab order, so a keyboard user who had just activated it\n * loses their focus position to the top of the document — at precisely the\n * moment something is happening that they need to be told about. Activation is\n * blocked in the handler instead.\n *\n * **It renders a real `<button>`.** A `<div role=\"button\">` needs Enter and\n * Space handling, a tabindex, and a disabled story, and it will still not\n * submit a form. The native element already has all of that, correctly, in\n * every browser and every assistive technology.\n\n *\n * @category action\n * @icon button\n * @slot - The button label.\n * @fires click - When the button is pressed. Not while it is busy or disabled.\n */\nexport class ImpktButton extends ImpktElement {\n static formAssociated = true;\n\n static properties = {\n variant: { type: String, reflect: true },\n type: { type: String },\n disabled: { type: Boolean, reflect: true },\n busy: { type: Boolean, reflect: true },\n busyLabel: { type: String, attribute: 'busy-label' },\n full: { type: Boolean, reflect: true },\n };\n\n declare variant: 'primary' | 'secondary' | 'ghost';\n declare type: 'button' | 'submit' | 'reset';\n declare disabled: boolean;\n declare busy: boolean;\n /** Announced when the button becomes busy. Says what is happening, not that something is. */\n declare busyLabel: string;\n declare full: boolean;\n\n private internals: ElementInternals | null = null;\n\n constructor() {\n super();\n this.variant = 'primary';\n this.type = 'button';\n this.disabled = false;\n this.busy = false;\n this.busyLabel = 'Working';\n this.full = false;\n try {\n this.internals = this.attachInternals();\n } catch {\n this.internals = null;\n }\n }\n\n static styles = [\n ...ImpktElement.styles,\n focusRing,\n css`\n :host {\n display: inline-block;\n }\n :host([full]) {\n display: block;\n }\n button {\n ${targetSize}\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: ${space(2)};\n inline-size: 100%;\n padding: ${space(3)} ${space(5)};\n font-family: inherit;\n font-size: ${fontSize('md')};\n font-weight: ${fontWeight('semibold')};\n line-height: 1.2;\n border-radius: ${t.radius};\n border: ${t.borderThick} solid transparent;\n cursor: pointer;\n transition: background-color 120ms ease-in-out, border-color 120ms ease-in-out;\n }\n /* The cursor is the only thing that changes while busy. Moving or\n recolouring a control the moment it is pressed is how a user loses it. */\n button[aria-disabled='true'] {\n cursor: progress;\n }\n :host([disabled]) button {\n cursor: not-allowed;\n opacity: 0.55;\n }\n\n button.primary {\n background: ${t.brand};\n color: ${t.onBrand};\n }\n button.primary:hover:not([aria-disabled='true']) {\n background: ${t.brandHover};\n }\n button.primary:active:not([aria-disabled='true']) {\n background: ${t.brandActive};\n }\n\n button.secondary {\n background: transparent;\n color: ${t.link};\n border-color: currentColor;\n }\n button.secondary:hover:not([aria-disabled='true']) {\n background: ${t.brandSubtle};\n }\n\n button.ghost {\n background: transparent;\n color: ${t.link};\n border-color: transparent;\n text-decoration: underline;\n }\n button.ghost:hover:not([aria-disabled='true']) {\n background: ${t.brandSubtle};\n }\n\n .sr-only {\n ${visuallyHidden}\n }\n\n /* Windows High Contrast Mode drops background and border colours, so a\n button styled only by background becomes invisible. A forced-colors\n border puts the boundary back. */\n @media (forced-colors: active) {\n button {\n border-color: ButtonBorder;\n }\n }\n `,\n ];\n\n private onClick(event: MouseEvent): void {\n if (this.disabled || this.busy) {\n event.preventDefault();\n event.stopImmediatePropagation();\n return;\n }\n // A shadow-rooted button does not submit the outer form by itself, because\n // the click never reaches it. `requestSubmit` rather than `submit` so that\n // native validation and the submit event both still run.\n if (this.type === 'submit') this.internals?.form?.requestSubmit();\n if (this.type === 'reset') this.internals?.form?.reset();\n }\n\n render(): TemplateResult {\n return html`\n <button\n class=${this.variant}\n type=\"button\"\n part=\"button\"\n ?disabled=${this.disabled}\n aria-disabled=${this.busy ? 'true' : nothing}\n aria-busy=${this.busy ? 'true' : nothing}\n @click=${this.onClick}\n >\n <slot></slot>\n ${this.busy ? html`<span class=\"sr-only\">${this.busyLabel}</span>` : nothing}\n </button>\n `;\n }\n}\n\ncustomElements.define('impkt-button', ImpktButton);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impkt-button': ImpktButton;\n }\n}\n"],"mappings":";;;;;;;;;;;;AAAA,SAAS,MAAM,KAAK,eAAoC;AA6BjD,IAAM,cAAN,cAA0B,aAAa;AAAA,EAsB5C,cAAc;AACZ,UAAM;AAHR,SAAQ,YAAqC;AAI3C,SAAK,UAAU;AACf,SAAK,OAAO;AACZ,SAAK,WAAW;AAChB,SAAK,OAAO;AACZ,SAAK,YAAY;AACjB,SAAK,OAAO;AACZ,QAAI;AACF,WAAK,YAAY,KAAK,gBAAgB;AAAA,IACxC,QAAQ;AACN,WAAK,YAAY;AAAA,IACnB;AAAA,EACF;AAAA,EAlCA;AAAA,SAAO,iBAAiB;AAAA;AAAA,EAExB;AAAA,SAAO,aAAa;AAAA,MAClB,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MACvC,MAAM,EAAE,MAAM,OAAO;AAAA,MACrB,UAAU,EAAE,MAAM,SAAS,SAAS,KAAK;AAAA,MACzC,MAAM,EAAE,MAAM,SAAS,SAAS,KAAK;AAAA,MACrC,WAAW,EAAE,MAAM,QAAQ,WAAW,aAAa;AAAA,MACnD,MAAM,EAAE,MAAM,SAAS,SAAS,KAAK;AAAA,IACvC;AAAA;AAAA,EA2BA;AAAA,SAAO,SAAS;AAAA,MACd,GAAG,aAAa;AAAA,MAChB;AAAA,MACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UAQM,UAAU;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AAK,OAAO,6BAA6B,KAAK,SAAS,YAAY,OAAO;AAAA;AAAA;AAAA,EAGlF;AACF;AAEA,eAAe,OAAO,gBAAgB,WAAW;","names":[]}
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FieldElement
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6HZA6A3L.js";
|
|
4
4
|
import {
|
|
5
|
-
A,
|
|
6
|
-
b,
|
|
7
5
|
fontSize,
|
|
8
|
-
i,
|
|
9
6
|
space,
|
|
10
7
|
t
|
|
11
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-J5KAMJ2N.js";
|
|
12
9
|
|
|
13
10
|
// packages/ui/src/components/text-input.ts
|
|
11
|
+
import { html, css, nothing } from "lit";
|
|
14
12
|
var ImpktTextInput = class extends FieldElement {
|
|
15
13
|
static {
|
|
16
14
|
this.properties = {
|
|
@@ -33,7 +31,7 @@ var ImpktTextInput = class extends FieldElement {
|
|
|
33
31
|
static {
|
|
34
32
|
this.styles = [
|
|
35
33
|
...FieldElement.styles,
|
|
36
|
-
|
|
34
|
+
css`
|
|
37
35
|
input {
|
|
38
36
|
inline-size: 100%;
|
|
39
37
|
min-block-size: 44px;
|
|
@@ -62,22 +60,22 @@ var ImpktTextInput = class extends FieldElement {
|
|
|
62
60
|
];
|
|
63
61
|
}
|
|
64
62
|
renderControl() {
|
|
65
|
-
return
|
|
63
|
+
return html`
|
|
66
64
|
<input
|
|
67
65
|
id=${this.controlId}
|
|
68
66
|
part="input"
|
|
69
67
|
type=${this.type}
|
|
70
|
-
name=${this.name ||
|
|
68
|
+
name=${this.name || nothing}
|
|
71
69
|
.value=${this.value}
|
|
72
|
-
placeholder=${this.placeholder ||
|
|
73
|
-
autocomplete=${this.autocomplete ||
|
|
74
|
-
inputmode=${this.inputmode ||
|
|
75
|
-
maxlength=${this.maxlength ??
|
|
70
|
+
placeholder=${this.placeholder || nothing}
|
|
71
|
+
autocomplete=${this.autocomplete || nothing}
|
|
72
|
+
inputmode=${this.inputmode || nothing}
|
|
73
|
+
maxlength=${this.maxlength ?? nothing}
|
|
76
74
|
?disabled=${this.disabled}
|
|
77
75
|
?readonly=${this.readonly}
|
|
78
76
|
?required=${this.required}
|
|
79
77
|
aria-describedby=${this.describedBy}
|
|
80
|
-
aria-invalid=${this.error ? "true" :
|
|
78
|
+
aria-invalid=${this.error ? "true" : nothing}
|
|
81
79
|
@input=${(e) => this.setFormValue(e.target.value)}
|
|
82
80
|
/>
|
|
83
81
|
`;
|
|
@@ -91,4 +89,4 @@ customElements.define("impkt-text-input", ImpktTextInput);
|
|
|
91
89
|
export {
|
|
92
90
|
ImpktTextInput
|
|
93
91
|
};
|
|
94
|
-
//# sourceMappingURL=chunk-
|
|
92
|
+
//# sourceMappingURL=chunk-NEWN44LO.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/text-input.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { FieldElement } from '../base/FieldElement';\nimport { fontSize, space, t } from '../base/tokens';\n\n/**\n * A single-line text field.\n *\n * `inputmode` and `autocomplete` are first-class properties rather than\n * afterthoughts. 1.3.5 Identify Input Purpose is a Level AA criterion that\n * autofill satisfies directly, and it is the single cheapest accessibility win\n * in a checkout journey — a form that fills itself is a form that someone with a\n * motor impairment can actually finish.\n\n *\n * @category form\n * @icon field\n */\nexport class ImpktTextInput extends FieldElement {\n static properties = {\n ...FieldElement.properties,\n type: { type: String },\n placeholder: { type: String },\n autocomplete: { type: String },\n inputmode: { type: String },\n maxlength: { type: Number },\n };\n\n declare type: 'text' | 'email' | 'tel' | 'number' | 'password' | 'date';\n declare placeholder: string;\n /** A token from the HTML autofill list — `given-name`, `postal-code`, `tel`. */\n declare autocomplete: string;\n declare inputmode: string;\n declare maxlength: number | undefined;\n\n constructor() {\n super();\n this.type = 'text';\n this.placeholder = '';\n this.autocomplete = '';\n this.inputmode = '';\n this.maxlength = undefined;\n }\n\n static styles = [\n ...FieldElement.styles,\n css`\n input {\n inline-size: 100%;\n min-block-size: 44px;\n padding: ${space(3)};\n font-family: inherit;\n font-size: ${fontSize('md')};\n color: ${t.text};\n background: ${t.surfaceCard};\n border: ${t.borderThin} solid ${t.border};\n border-radius: ${t.radius};\n }\n input::placeholder {\n color: ${t.textPlaceholder};\n }\n input:disabled {\n background: ${t.surfaceInset};\n cursor: not-allowed;\n }\n /* The border thickens as well as reddening. Colour alone would carry the\n error, which 1.4.1 forbids — and the message below says it in words. */\n :host([invalid]) input {\n border-color: ${t.danger};\n border-width: ${t.borderThick};\n }\n `,\n ];\n\n protected renderControl(): TemplateResult {\n return html`\n <input\n id=${this.controlId}\n part=\"input\"\n type=${this.type}\n name=${this.name || nothing}\n .value=${this.value}\n placeholder=${this.placeholder || nothing}\n autocomplete=${this.autocomplete || nothing}\n inputmode=${this.inputmode || nothing}\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.setFormValue((e.target as HTMLInputElement).value)}\n />\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('impkt-text-input', ImpktTextInput);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impkt-text-input': ImpktTextInput;\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/components/text-input.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { FieldElement } from '../base/FieldElement';\nimport { fontSize, space, t } from '../base/tokens';\n\n/**\n * A single-line text field.\n *\n * `inputmode` and `autocomplete` are first-class properties rather than\n * afterthoughts. 1.3.5 Identify Input Purpose is a Level AA criterion that\n * autofill satisfies directly, and it is the single cheapest accessibility win\n * in a checkout journey — a form that fills itself is a form that someone with a\n * motor impairment can actually finish.\n\n *\n * @category form\n * @icon field\n */\nexport class ImpktTextInput extends FieldElement {\n static properties = {\n ...FieldElement.properties,\n type: { type: String },\n placeholder: { type: String },\n autocomplete: { type: String },\n inputmode: { type: String },\n maxlength: { type: Number },\n };\n\n declare type: 'text' | 'email' | 'tel' | 'number' | 'password' | 'date';\n declare placeholder: string;\n /** A token from the HTML autofill list — `given-name`, `postal-code`, `tel`. */\n declare autocomplete: string;\n declare inputmode: string;\n declare maxlength: number | undefined;\n\n constructor() {\n super();\n this.type = 'text';\n this.placeholder = '';\n this.autocomplete = '';\n this.inputmode = '';\n this.maxlength = undefined;\n }\n\n static styles = [\n ...FieldElement.styles,\n css`\n input {\n inline-size: 100%;\n min-block-size: 44px;\n padding: ${space(3)};\n font-family: inherit;\n font-size: ${fontSize('md')};\n color: ${t.text};\n background: ${t.surfaceCard};\n border: ${t.borderThin} solid ${t.border};\n border-radius: ${t.radius};\n }\n input::placeholder {\n color: ${t.textPlaceholder};\n }\n input:disabled {\n background: ${t.surfaceInset};\n cursor: not-allowed;\n }\n /* The border thickens as well as reddening. Colour alone would carry the\n error, which 1.4.1 forbids — and the message below says it in words. */\n :host([invalid]) input {\n border-color: ${t.danger};\n border-width: ${t.borderThick};\n }\n `,\n ];\n\n protected renderControl(): TemplateResult {\n return html`\n <input\n id=${this.controlId}\n part=\"input\"\n type=${this.type}\n name=${this.name || nothing}\n .value=${this.value}\n placeholder=${this.placeholder || nothing}\n autocomplete=${this.autocomplete || nothing}\n inputmode=${this.inputmode || nothing}\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.setFormValue((e.target as HTMLInputElement).value)}\n />\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('impkt-text-input', ImpktTextInput);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AK,aAAa,OAAO;AAAA,oBACzB,KAAK,aAAa,OAAO;AAAA,oBACzB,KAAK,QAAQ;AAAA,oBACb,KAAK,QAAQ;AAAA,oBACb,KAAK,QAAQ;AAAA,2BACN,KAAK,WAAW;AAAA,uBACpB,KAAK,QAAQ,SAAS,OAAO;AAAA,iBACnC,CAAC,MAAa,KAAK,aAAc,EAAE,OAA4B,KAAK,CAAC;AAAA;AAAA;AAAA,EAGpF;AAAA,EAEA,QAAQ,SAAqC;AAC3C,QAAI,QAAQ,IAAI,OAAO,EAAG,MAAK,gBAAgB,WAAW,QAAQ,KAAK,KAAK,CAAC;AAAA,EAC/E;AACF;AAEA,eAAe,OAAO,oBAAoB,cAAc;","names":[]}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
-
A,
|
|
3
2
|
ImpktElement,
|
|
4
|
-
b,
|
|
5
3
|
fontSize,
|
|
6
4
|
fontWeight,
|
|
7
|
-
i,
|
|
8
5
|
space,
|
|
9
6
|
t
|
|
10
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-J5KAMJ2N.js";
|
|
11
8
|
|
|
12
9
|
// packages/ui/src/components/alert.ts
|
|
10
|
+
import { html, css, nothing } from "lit";
|
|
13
11
|
var ImpktAlert = class _ImpktAlert extends ImpktElement {
|
|
14
12
|
static {
|
|
15
13
|
this.properties = {
|
|
@@ -35,7 +33,7 @@ var ImpktAlert = class _ImpktAlert extends ImpktElement {
|
|
|
35
33
|
static {
|
|
36
34
|
this.styles = [
|
|
37
35
|
...ImpktElement.styles,
|
|
38
|
-
|
|
36
|
+
css`
|
|
39
37
|
:host {
|
|
40
38
|
display: block;
|
|
41
39
|
margin-block-end: ${space(4)};
|
|
@@ -84,16 +82,16 @@ var ImpktAlert = class _ImpktAlert extends ImpktElement {
|
|
|
84
82
|
}
|
|
85
83
|
render() {
|
|
86
84
|
const word = this.toneLabel || _ImpktAlert.TONE_WORDS[this.tone];
|
|
87
|
-
return
|
|
85
|
+
return html`
|
|
88
86
|
<div
|
|
89
87
|
class="alert"
|
|
90
88
|
part="alert"
|
|
91
89
|
role=${this.tone === "danger" ? "alert" : "status"}
|
|
92
|
-
aria-label=${this.heading ?
|
|
90
|
+
aria-label=${this.heading ? nothing : word}
|
|
93
91
|
>
|
|
94
|
-
${this.heading ?
|
|
92
|
+
${this.heading ? html`<div class="heading" part="heading">
|
|
95
93
|
<span class="tone-word">${word}:</span> ${this.heading}
|
|
96
|
-
</div>` :
|
|
94
|
+
</div>` : nothing}
|
|
97
95
|
<slot></slot>
|
|
98
96
|
</div>
|
|
99
97
|
`;
|
|
@@ -104,4 +102,4 @@ customElements.define("impkt-alert", ImpktAlert);
|
|
|
104
102
|
export {
|
|
105
103
|
ImpktAlert
|
|
106
104
|
};
|
|
107
|
-
//# sourceMappingURL=chunk-
|
|
105
|
+
//# sourceMappingURL=chunk-SSNCGJ5W.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/alert.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { ImpktElement } from '../base/ImpktElement';\nimport { fontSize, fontWeight, space, t } from '../base/tokens';\n\nexport type AlertTone = 'info' | 'success' | 'warning' | 'danger';\n\n/**\n * A notice.\n *\n * **The role depends on the tone, and that is a real distinction.** `alert`\n * interrupts whatever a screen reader is saying; `status` waits for a pause.\n * A failed payment earns the interruption. \"Your basket has been saved\" does\n * not, and using `alert` for it is how users learn to tune the live region\n * out — at which point the one that mattered is also lost.\n *\n * **The tone is never carried by colour alone.** Each tone ships a word, in\n * the accessible name, because 1.4.1 Use of Colour says a red border is not a\n * message and because a red border is invisible in forced-colours mode.\n\n *\n * @category feedback\n * @icon alert\n * @slot - The body of the notice.\n */\nexport class ImpktAlert extends ImpktElement {\n static properties = {\n tone: { type: String, reflect: true },\n heading: { type: String },\n toneLabel: { type: String, attribute: 'tone-label' },\n };\n\n declare tone: AlertTone;\n declare heading: string;\n /** Overrides the default word for the tone, for translation. */\n declare toneLabel: string;\n\n constructor() {\n super();\n this.tone = 'info';\n this.heading = '';\n this.toneLabel = '';\n }\n\n private static readonly TONE_WORDS: Record<AlertTone, string> = {\n info: 'Information',\n success: 'Success',\n warning: 'Warning',\n danger: 'Error',\n };\n\n static styles = [\n ...ImpktElement.styles,\n css`\n :host {\n display: block;\n margin-block-end: ${space(4)};\n }\n .alert {\n padding: ${space(4)};\n border-radius: ${t.radius};\n border-inline-start: 4px solid;\n font-size: ${fontSize('md')};\n }\n .heading {\n font-weight: ${fontWeight('semibold')};\n margin-block-end: ${space(1)};\n }\n :host([tone='info']) .alert {\n background: ${t.infoSubtle};\n border-color: ${t.info};\n color: ${t.text};\n }\n :host([tone='success']) .alert {\n background: ${t.successSubtle};\n border-color: ${t.success};\n color: ${t.text};\n }\n :host([tone='warning']) .alert {\n background: ${t.warningSubtle};\n border-color: ${t.warning};\n color: ${t.text};\n }\n :host([tone='danger']) .alert {\n background: ${t.dangerSubtle};\n border-color: ${t.danger};\n color: ${t.text};\n }\n /* Colour is the only signal left in forced-colours mode, and it is gone.\n The border keeps the boundary; the tone word in the label carries the\n meaning. */\n @media (forced-colors: active) {\n .alert {\n border: 1px solid CanvasText;\n border-inline-start-width: 4px;\n }\n }\n `,\n ];\n\n render(): TemplateResult {\n const word = this.toneLabel || ImpktAlert.TONE_WORDS[this.tone];\n return html`\n <div\n class=\"alert\"\n part=\"alert\"\n role=${this.tone === 'danger' ? 'alert' : 'status'}\n aria-label=${this.heading ? nothing : word}\n >\n ${this.heading\n ? html`<div class=\"heading\" part=\"heading\">\n <span class=\"tone-word\">${word}:</span> ${this.heading}\n </div>`\n : nothing}\n <slot></slot>\n </div>\n `;\n }\n}\n\ncustomElements.define('impkt-alert', ImpktAlert);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impkt-alert': ImpktAlert;\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/components/alert.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { ImpktElement } from '../base/ImpktElement';\nimport { fontSize, fontWeight, space, t } from '../base/tokens';\n\nexport type AlertTone = 'info' | 'success' | 'warning' | 'danger';\n\n/**\n * A notice.\n *\n * **The role depends on the tone, and that is a real distinction.** `alert`\n * interrupts whatever a screen reader is saying; `status` waits for a pause.\n * A failed payment earns the interruption. \"Your basket has been saved\" does\n * not, and using `alert` for it is how users learn to tune the live region\n * out — at which point the one that mattered is also lost.\n *\n * **The tone is never carried by colour alone.** Each tone ships a word, in\n * the accessible name, because 1.4.1 Use of Colour says a red border is not a\n * message and because a red border is invisible in forced-colours mode.\n\n *\n * @category feedback\n * @icon alert\n * @slot - The body of the notice.\n */\nexport class ImpktAlert extends ImpktElement {\n static properties = {\n tone: { type: String, reflect: true },\n heading: { type: String },\n toneLabel: { type: String, attribute: 'tone-label' },\n };\n\n declare tone: AlertTone;\n declare heading: string;\n /** Overrides the default word for the tone, for translation. */\n declare toneLabel: string;\n\n constructor() {\n super();\n this.tone = 'info';\n this.heading = '';\n this.toneLabel = '';\n }\n\n private static readonly TONE_WORDS: Record<AlertTone, string> = {\n info: 'Information',\n success: 'Success',\n warning: 'Warning',\n danger: 'Error',\n };\n\n static styles = [\n ...ImpktElement.styles,\n css`\n :host {\n display: block;\n margin-block-end: ${space(4)};\n }\n .alert {\n padding: ${space(4)};\n border-radius: ${t.radius};\n border-inline-start: 4px solid;\n font-size: ${fontSize('md')};\n }\n .heading {\n font-weight: ${fontWeight('semibold')};\n margin-block-end: ${space(1)};\n }\n :host([tone='info']) .alert {\n background: ${t.infoSubtle};\n border-color: ${t.info};\n color: ${t.text};\n }\n :host([tone='success']) .alert {\n background: ${t.successSubtle};\n border-color: ${t.success};\n color: ${t.text};\n }\n :host([tone='warning']) .alert {\n background: ${t.warningSubtle};\n border-color: ${t.warning};\n color: ${t.text};\n }\n :host([tone='danger']) .alert {\n background: ${t.dangerSubtle};\n border-color: ${t.danger};\n color: ${t.text};\n }\n /* Colour is the only signal left in forced-colours mode, and it is gone.\n The border keeps the boundary; the tone word in the label carries the\n meaning. */\n @media (forced-colors: active) {\n .alert {\n border: 1px solid CanvasText;\n border-inline-start-width: 4px;\n }\n }\n `,\n ];\n\n render(): TemplateResult {\n const word = this.toneLabel || ImpktAlert.TONE_WORDS[this.tone];\n return html`\n <div\n class=\"alert\"\n part=\"alert\"\n role=${this.tone === 'danger' ? 'alert' : 'status'}\n aria-label=${this.heading ? nothing : word}\n >\n ${this.heading\n ? html`<div class=\"heading\" part=\"heading\">\n <span class=\"tone-word\">${word}:</span> ${this.heading}\n </div>`\n : nothing}\n <slot></slot>\n </div>\n `;\n }\n}\n\ncustomElements.define('impkt-alert', ImpktAlert);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impkt-alert': ImpktAlert;\n }\n}\n"],"mappings":";;;;;;;;;AAAA,SAAS,MAAM,KAAK,eAAoC;AAwBjD,IAAM,aAAN,MAAM,oBAAmB,aAAa;AAAA,EAC3C;AAAA,SAAO,aAAa;AAAA,MAClB,MAAM,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MACpC,SAAS,EAAE,MAAM,OAAO;AAAA,MACxB,WAAW,EAAE,MAAM,QAAQ,WAAW,aAAa;AAAA,IACrD;AAAA;AAAA,EAOA,cAAc;AACZ,UAAM;AACN,SAAK,OAAO;AACZ,SAAK,UAAU;AACf,SAAK,YAAY;AAAA,EACnB;AAAA,EAEA;AAAA,SAAwB,aAAwC;AAAA,MAC9D,MAAM;AAAA,MACN,SAAS;AAAA,MACT,SAAS;AAAA,MACT,QAAQ;AAAA,IACV;AAAA;AAAA,EAEA;AAAA,SAAO,SAAS;AAAA,MACd,GAAG,aAAa;AAAA,MAChB;AAAA;AAAA;AAAA,4BAGwB,MAAM,CAAC,CAAC;AAAA;AAAA;AAAA,mBAGjB,MAAM,CAAC,CAAC;AAAA,yBACF,EAAE,MAAM;AAAA;AAAA,qBAEZ,SAAS,IAAI,CAAC;AAAA;AAAA;AAAA,uBAGZ,WAAW,UAAU,CAAC;AAAA,4BACjB,MAAM,CAAC,CAAC;AAAA;AAAA;AAAA,sBAGd,EAAE,UAAU;AAAA,wBACV,EAAE,IAAI;AAAA,iBACb,EAAE,IAAI;AAAA;AAAA;AAAA,sBAGD,EAAE,aAAa;AAAA,wBACb,EAAE,OAAO;AAAA,iBAChB,EAAE,IAAI;AAAA;AAAA;AAAA,sBAGD,EAAE,aAAa;AAAA,wBACb,EAAE,OAAO;AAAA,iBAChB,EAAE,IAAI;AAAA;AAAA;AAAA,sBAGD,EAAE,YAAY;AAAA,wBACZ,EAAE,MAAM;AAAA,iBACf,EAAE,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAYrB;AAAA;AAAA,EAEA,SAAyB;AACvB,UAAM,OAAO,KAAK,aAAa,YAAW,WAAW,KAAK,IAAI;AAC9D,WAAO;AAAA;AAAA;AAAA;AAAA,eAII,KAAK,SAAS,WAAW,UAAU,QAAQ;AAAA,qBACrC,KAAK,UAAU,UAAU,IAAI;AAAA;AAAA,UAExC,KAAK,UACH;AAAA,wCAC4B,IAAI,YAAY,KAAK,OAAO;AAAA,sBAExD,OAAO;AAAA;AAAA;AAAA;AAAA,EAIjB;AACF;AAEA,eAAe,OAAO,eAAe,UAAU;","names":[]}
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
|
-
A,
|
|
3
2
|
ImpktElement,
|
|
4
|
-
b,
|
|
5
3
|
focusRing,
|
|
6
4
|
fontSize,
|
|
7
5
|
fontWeight,
|
|
8
|
-
i,
|
|
9
6
|
space,
|
|
10
7
|
t,
|
|
11
8
|
targetSize
|
|
12
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-J5KAMJ2N.js";
|
|
13
10
|
|
|
14
11
|
// packages/ui/src/components/accordion.ts
|
|
12
|
+
import { html, css, nothing } from "lit";
|
|
15
13
|
var ImpktAccordion = class extends ImpktElement {
|
|
16
14
|
static {
|
|
17
15
|
this.properties = {
|
|
@@ -32,7 +30,7 @@ var ImpktAccordion = class extends ImpktElement {
|
|
|
32
30
|
this.styles = [
|
|
33
31
|
...ImpktElement.styles,
|
|
34
32
|
focusRing,
|
|
35
|
-
|
|
33
|
+
css`
|
|
36
34
|
:host {
|
|
37
35
|
display: block;
|
|
38
36
|
}
|
|
@@ -79,12 +77,12 @@ var ImpktAccordion = class extends ImpktElement {
|
|
|
79
77
|
else this.open = this.multiple ? [...this.open, id] : [id];
|
|
80
78
|
}
|
|
81
79
|
render() {
|
|
82
|
-
return
|
|
80
|
+
return html`
|
|
83
81
|
${this.items.map((item) => {
|
|
84
82
|
const expanded = this.open.includes(item.id);
|
|
85
83
|
const panelId = this.id_(`panel-${item.id}`);
|
|
86
84
|
const buttonId = this.id_(`button-${item.id}`);
|
|
87
|
-
return
|
|
85
|
+
return html`
|
|
88
86
|
<div class="item" part="item">
|
|
89
87
|
<div role="heading" aria-level=${this.headingLevel}>
|
|
90
88
|
<button
|
|
@@ -112,7 +110,7 @@ var ImpktAccordion = class extends ImpktElement {
|
|
|
112
110
|
</div>
|
|
113
111
|
`;
|
|
114
112
|
})}
|
|
115
|
-
${this.items.length === 0 ?
|
|
113
|
+
${this.items.length === 0 ? nothing : nothing}
|
|
116
114
|
`;
|
|
117
115
|
}
|
|
118
116
|
};
|
|
@@ -121,4 +119,4 @@ customElements.define("impkt-accordion", ImpktAccordion);
|
|
|
121
119
|
export {
|
|
122
120
|
ImpktAccordion
|
|
123
121
|
};
|
|
124
|
-
//# sourceMappingURL=chunk-
|
|
122
|
+
//# sourceMappingURL=chunk-T4HSPWA7.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/accordion.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { ImpktElement } from '../base/ImpktElement';\nimport { focusRing, targetSize } from '../base/styles';\nimport { fontSize, fontWeight, space, t } from '../base/tokens';\n\nexport interface AccordionItem {\n id: string;\n heading: string;\n body: string;\n}\n\n/**\n * Disclosure sections — frequently asked questions, \"what does this mean?\".\n *\n * **Each header is a button inside a heading.** The heading is what lets a\n * screen-reader user jump between sections without tabbing through every\n * paragraph; the button is what makes the section openable. One without the\n * other is a common half-implementation: all-headings cannot be operated,\n * all-buttons cannot be navigated.\n *\n * `headingLevel` is a property because the right level depends on what is\n * above the accordion on the page, and guessing produces exactly the skipped\n * levels that 1.3.1 is about.\n *\n * **Panels are hidden, not unmounted.** `hidden` keeps the content in the\n * accessibility tree's structure and lets in-page search find it when opened,\n * and it means `aria-controls` always points at an element that exists.\n *\n * **A panel can hold more than words.** `body` is plain text, which is what a\n * composition can author safely. Content rendered elsewhere, such as an FAQ\n * answer with links and a list, is slotted instead: a child with\n * `slot=\"panel-<item id>\"` replaces that item's body. The slot sits inside the\n * panel, so the region, its label and its `hidden` state are unchanged, and a\n * panel with nothing slotted still shows its body.\n *\n * @category content\n * @icon accordion\n */\nexport class ImpktAccordion extends ImpktElement {\n static properties = {\n items: { type: Array },\n headingLevel: { type: Number, attribute: 'heading-level' },\n open: { type: Array },\n multiple: { type: Boolean },\n };\n\n declare items: AccordionItem[];\n declare headingLevel: number;\n /** Ids currently expanded. */\n declare open: string[];\n /** When false, opening one closes the others. */\n declare multiple: boolean;\n\n constructor() {\n super();\n this.items = [];\n this.headingLevel = 3;\n this.open = [];\n this.multiple = true;\n }\n\n static styles = [\n ...ImpktElement.styles,\n focusRing,\n css`\n :host {\n display: block;\n }\n .item {\n border-block-end: ${t.borderThin} solid ${t.border};\n }\n button {\n ${targetSize}\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: ${space(3)};\n inline-size: 100%;\n padding: ${space(3)} 0;\n background: none;\n border: 0;\n font: inherit;\n font-size: ${fontSize('md')};\n font-weight: ${fontWeight('semibold')};\n color: ${t.text};\n text-align: start;\n cursor: pointer;\n }\n button:hover {\n color: ${t.link};\n }\n .marker {\n flex: none;\n transition: transform 120ms ease-in-out;\n }\n button[aria-expanded='true'] .marker {\n transform: rotate(90deg);\n }\n .panel {\n padding-block-end: ${space(4)};\n font-size: ${fontSize('md')};\n }\n `,\n ];\n\n private toggle(id: string): void {\n const isOpen = this.open.includes(id);\n if (isOpen) this.open = this.open.filter((o) => o !== id);\n else this.open = this.multiple ? [...this.open, id] : [id];\n }\n\n render(): TemplateResult {\n return html`\n ${this.items.map((item) => {\n const expanded = this.open.includes(item.id);\n const panelId = this.id_(`panel-${item.id}`);\n const buttonId = this.id_(`button-${item.id}`);\n return html`\n <div class=\"item\" part=\"item\">\n <div role=\"heading\" aria-level=${this.headingLevel}>\n <button\n id=${buttonId}\n part=\"header\"\n type=\"button\"\n aria-expanded=${expanded ? 'true' : 'false'}\n aria-controls=${panelId}\n @click=${() => this.toggle(item.id)}\n >\n <span>${item.heading}</span>\n <span class=\"marker\" aria-hidden=\"true\">›</span>\n </button>\n </div>\n <div\n id=${panelId}\n class=\"panel\"\n part=\"panel\"\n role=\"region\"\n aria-labelledby=${buttonId}\n ?hidden=${!expanded}\n >\n <slot name=${`panel-${item.id}`}>${item.body}</slot>\n </div>\n </div>\n `;\n })}\n ${this.items.length === 0 ? nothing : nothing}\n `;\n }\n}\n\ncustomElements.define('impkt-accordion', ImpktAccordion);\n\ndeclare global {\n interface HTMLElementTagNameMap { 'impkt-accordion': ImpktAccordion }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/components/accordion.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { ImpktElement } from '../base/ImpktElement';\nimport { focusRing, targetSize } from '../base/styles';\nimport { fontSize, fontWeight, space, t } from '../base/tokens';\n\nexport interface AccordionItem {\n id: string;\n heading: string;\n body: string;\n}\n\n/**\n * Disclosure sections — frequently asked questions, \"what does this mean?\".\n *\n * **Each header is a button inside a heading.** The heading is what lets a\n * screen-reader user jump between sections without tabbing through every\n * paragraph; the button is what makes the section openable. One without the\n * other is a common half-implementation: all-headings cannot be operated,\n * all-buttons cannot be navigated.\n *\n * `headingLevel` is a property because the right level depends on what is\n * above the accordion on the page, and guessing produces exactly the skipped\n * levels that 1.3.1 is about.\n *\n * **Panels are hidden, not unmounted.** `hidden` keeps the content in the\n * accessibility tree's structure and lets in-page search find it when opened,\n * and it means `aria-controls` always points at an element that exists.\n *\n * **A panel can hold more than words.** `body` is plain text, which is what a\n * composition can author safely. Content rendered elsewhere, such as an FAQ\n * answer with links and a list, is slotted instead: a child with\n * `slot=\"panel-<item id>\"` replaces that item's body. The slot sits inside the\n * panel, so the region, its label and its `hidden` state are unchanged, and a\n * panel with nothing slotted still shows its body.\n *\n * @category content\n * @icon accordion\n */\nexport class ImpktAccordion extends ImpktElement {\n static properties = {\n items: { type: Array },\n headingLevel: { type: Number, attribute: 'heading-level' },\n open: { type: Array },\n multiple: { type: Boolean },\n };\n\n declare items: AccordionItem[];\n declare headingLevel: number;\n /** Ids currently expanded. */\n declare open: string[];\n /** When false, opening one closes the others. */\n declare multiple: boolean;\n\n constructor() {\n super();\n this.items = [];\n this.headingLevel = 3;\n this.open = [];\n this.multiple = true;\n }\n\n static styles = [\n ...ImpktElement.styles,\n focusRing,\n css`\n :host {\n display: block;\n }\n .item {\n border-block-end: ${t.borderThin} solid ${t.border};\n }\n button {\n ${targetSize}\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: ${space(3)};\n inline-size: 100%;\n padding: ${space(3)} 0;\n background: none;\n border: 0;\n font: inherit;\n font-size: ${fontSize('md')};\n font-weight: ${fontWeight('semibold')};\n color: ${t.text};\n text-align: start;\n cursor: pointer;\n }\n button:hover {\n color: ${t.link};\n }\n .marker {\n flex: none;\n transition: transform 120ms ease-in-out;\n }\n button[aria-expanded='true'] .marker {\n transform: rotate(90deg);\n }\n .panel {\n padding-block-end: ${space(4)};\n font-size: ${fontSize('md')};\n }\n `,\n ];\n\n private toggle(id: string): void {\n const isOpen = this.open.includes(id);\n if (isOpen) this.open = this.open.filter((o) => o !== id);\n else this.open = this.multiple ? [...this.open, id] : [id];\n }\n\n render(): TemplateResult {\n return html`\n ${this.items.map((item) => {\n const expanded = this.open.includes(item.id);\n const panelId = this.id_(`panel-${item.id}`);\n const buttonId = this.id_(`button-${item.id}`);\n return html`\n <div class=\"item\" part=\"item\">\n <div role=\"heading\" aria-level=${this.headingLevel}>\n <button\n id=${buttonId}\n part=\"header\"\n type=\"button\"\n aria-expanded=${expanded ? 'true' : 'false'}\n aria-controls=${panelId}\n @click=${() => this.toggle(item.id)}\n >\n <span>${item.heading}</span>\n <span class=\"marker\" aria-hidden=\"true\">›</span>\n </button>\n </div>\n <div\n id=${panelId}\n class=\"panel\"\n part=\"panel\"\n role=\"region\"\n aria-labelledby=${buttonId}\n ?hidden=${!expanded}\n >\n <slot name=${`panel-${item.id}`}>${item.body}</slot>\n </div>\n </div>\n `;\n })}\n ${this.items.length === 0 ? nothing : nothing}\n `;\n }\n}\n\ncustomElements.define('impkt-accordion', ImpktAccordion);\n\ndeclare global {\n interface HTMLElementTagNameMap { 'impkt-accordion': ImpktAccordion }\n}\n"],"mappings":";;;;;;;;;;;AAAA,SAAS,MAAM,KAAK,eAAoC;AAsCjD,IAAM,iBAAN,cAA6B,aAAa;AAAA,EAC/C;AAAA,SAAO,aAAa;AAAA,MAClB,OAAO,EAAE,MAAM,MAAM;AAAA,MACrB,cAAc,EAAE,MAAM,QAAQ,WAAW,gBAAgB;AAAA,MACzD,MAAM,EAAE,MAAM,MAAM;AAAA,MACpB,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC5B;AAAA;AAAA,EASA,cAAc;AACZ,UAAM;AACN,SAAK,QAAQ,CAAC;AACd,SAAK,eAAe;AACpB,SAAK,OAAO,CAAC;AACb,SAAK,WAAW;AAAA,EAClB;AAAA,EAEA;AAAA,SAAO,SAAS;AAAA,MACd,GAAG,aAAa;AAAA,MAChB;AAAA,MACA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAKwB,EAAE,UAAU,UAAU,EAAE,MAAM;AAAA;AAAA;AAAA,UAGhD,UAAU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E,IAAI,KAAK,IAAI;AAAA;AAAA;AAAA;AAAA,IAIpD,CAAC,CAAC;AAAA,QACA,KAAK,MAAM,WAAW,IAAI,UAAU,OAAO;AAAA;AAAA,EAEjD;AACF;AAEA,eAAe,OAAO,mBAAmB,cAAc;","names":[]}
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FieldElement
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6HZA6A3L.js";
|
|
4
4
|
import {
|
|
5
|
-
A,
|
|
6
|
-
b,
|
|
7
5
|
fontSize,
|
|
8
|
-
i,
|
|
9
6
|
space,
|
|
10
7
|
t,
|
|
11
8
|
targetSize
|
|
12
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-J5KAMJ2N.js";
|
|
13
10
|
|
|
14
11
|
// packages/ui/src/components/radio-group.ts
|
|
12
|
+
import { html, css, nothing } from "lit";
|
|
15
13
|
var ImpktRadioGroup = class extends FieldElement {
|
|
16
14
|
static {
|
|
17
15
|
this.properties = {
|
|
@@ -26,7 +24,7 @@ var ImpktRadioGroup = class extends FieldElement {
|
|
|
26
24
|
static {
|
|
27
25
|
this.styles = [
|
|
28
26
|
...FieldElement.styles,
|
|
29
|
-
|
|
27
|
+
css`
|
|
30
28
|
fieldset {
|
|
31
29
|
border: 0;
|
|
32
30
|
margin: 0;
|
|
@@ -76,16 +74,16 @@ var ImpktRadioGroup = class extends FieldElement {
|
|
|
76
74
|
];
|
|
77
75
|
}
|
|
78
76
|
renderLabel() {
|
|
79
|
-
return
|
|
80
|
-
${this.label}${this.required ?
|
|
77
|
+
return html`<legend class="label" part="label">
|
|
78
|
+
${this.label}${this.required ? html`<span class="required"> (${this.requiredText})</span>` : nothing}
|
|
81
79
|
</legend>`;
|
|
82
80
|
}
|
|
83
81
|
renderControl() {
|
|
84
|
-
return
|
|
85
|
-
${this.options.map((option,
|
|
86
|
-
const id = this.id_(`opt-${
|
|
87
|
-
const descId = option.description ? this.id_(`opt-${
|
|
88
|
-
return
|
|
82
|
+
return html`
|
|
83
|
+
${this.options.map((option, i) => {
|
|
84
|
+
const id = this.id_(`opt-${i}`);
|
|
85
|
+
const descId = option.description ? this.id_(`opt-${i}-desc`) : void 0;
|
|
86
|
+
return html`
|
|
89
87
|
<label class="option" part="option" for=${id}>
|
|
90
88
|
<input
|
|
91
89
|
type="radio"
|
|
@@ -94,13 +92,13 @@ var ImpktRadioGroup = class extends FieldElement {
|
|
|
94
92
|
value=${option.value}
|
|
95
93
|
.checked=${this.value === option.value}
|
|
96
94
|
?disabled=${this.disabled}
|
|
97
|
-
?required=${this.required &&
|
|
98
|
-
aria-describedby=${descId ??
|
|
95
|
+
?required=${this.required && i === 0}
|
|
96
|
+
aria-describedby=${descId ?? nothing}
|
|
99
97
|
@change=${() => this.setFormValue(option.value)}
|
|
100
98
|
/>
|
|
101
99
|
<span>
|
|
102
100
|
<span class="option-text">${option.label}</span>
|
|
103
|
-
${option.description ?
|
|
101
|
+
${option.description ? html`<span class="option-description" id=${descId}>${option.description}</span>` : nothing}
|
|
104
102
|
</span>
|
|
105
103
|
</label>
|
|
106
104
|
`;
|
|
@@ -112,19 +110,19 @@ var ImpktRadioGroup = class extends FieldElement {
|
|
|
112
110
|
* than relying on the base class's flat order.
|
|
113
111
|
*/
|
|
114
112
|
render() {
|
|
115
|
-
return
|
|
113
|
+
return html`
|
|
116
114
|
<fieldset
|
|
117
115
|
part="fieldset"
|
|
118
116
|
aria-describedby=${this.describedBy}
|
|
119
|
-
aria-invalid=${this.error ? "true" :
|
|
117
|
+
aria-invalid=${this.error ? "true" : nothing}
|
|
120
118
|
>
|
|
121
119
|
${this.renderLabel()}
|
|
122
|
-
${this.description ?
|
|
120
|
+
${this.description ? html`<div class="description" id=${this.id_("description")} part="description">
|
|
123
121
|
${this.description}
|
|
124
|
-
</div>` :
|
|
122
|
+
</div>` : nothing}
|
|
125
123
|
${this.renderControl()}
|
|
126
124
|
<div class="error" id=${this.id_("error")} part="error" aria-live="polite">
|
|
127
|
-
${this.error ||
|
|
125
|
+
${this.error || nothing}
|
|
128
126
|
</div>
|
|
129
127
|
</fieldset>
|
|
130
128
|
`;
|
|
@@ -138,4 +136,4 @@ customElements.define("impkt-radio-group", ImpktRadioGroup);
|
|
|
138
136
|
export {
|
|
139
137
|
ImpktRadioGroup
|
|
140
138
|
};
|
|
141
|
-
//# sourceMappingURL=chunk-
|
|
139
|
+
//# sourceMappingURL=chunk-T63FI4ET.js.map
|
|
@@ -1 +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 ImpktRadioGroup 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('impkt-radio-group', ImpktRadioGroup);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impkt-radio-group': ImpktRadioGroup;\n }\n}\n"],"mappings":"
|
|
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 ImpktRadioGroup 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('impkt-radio-group', ImpktRadioGroup);\n\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