@atomic-ui/ui 0.13.0 → 0.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +586 -3
- package/dist/base/FieldElement.d.ts +10 -0
- package/dist/{chunk-2BGOBD6Y.js → chunk-273AYERA.js} +2 -2
- package/dist/{chunk-EUOBFMWC.js → chunk-6IQIFKY6.js} +2 -2
- package/dist/{chunk-WEX5RKVC.js → chunk-BTACNWU6.js} +2 -2
- package/dist/{chunk-BGHAANTP.js → chunk-C767LTJE.js} +4 -2
- package/dist/chunk-C767LTJE.js.map +1 -0
- package/dist/{chunk-RNFGIXJ7.js → chunk-CN4J5RS2.js} +2 -2
- package/dist/{chunk-UBNCJROR.js → chunk-DJLUWM3C.js} +20 -5
- package/dist/chunk-DJLUWM3C.js.map +1 -0
- package/dist/{chunk-F2MFV7RM.js → chunk-DKVLA7AF.js} +2 -2
- package/dist/{chunk-MGDX7Z74.js → chunk-EIWICFXL.js} +4 -3
- package/dist/chunk-EIWICFXL.js.map +1 -0
- package/dist/{chunk-P5FAKEFK.js → chunk-GIIJ32FN.js} +2 -2
- package/dist/{chunk-LSEK5MEZ.js → chunk-H5HWJ2D4.js} +2 -2
- package/dist/{chunk-B2GWXXIW.js → chunk-JDKOHA3B.js} +2 -2
- package/dist/{chunk-G7CVRNY5.js → chunk-JX5RJRME.js} +5 -4
- package/dist/chunk-JX5RJRME.js.map +1 -0
- package/dist/{chunk-WT7MHYJR.js → chunk-KDU2POFS.js} +11 -5
- package/dist/chunk-KDU2POFS.js.map +1 -0
- package/dist/{chunk-EA3M6KPB.js → chunk-NCVBRUJM.js} +6 -1
- package/dist/chunk-NCVBRUJM.js.map +1 -0
- package/dist/{chunk-SY7NTW3U.js → chunk-VR543SMV.js} +18 -10
- package/dist/chunk-VR543SMV.js.map +1 -0
- package/dist/{chunk-QJBRENLI.js → chunk-WGFHYSXH.js} +7 -3
- package/dist/{chunk-QJBRENLI.js.map → chunk-WGFHYSXH.js.map} +1 -1
- package/dist/{chunk-PII4SJL5.js → chunk-X57BTN6V.js} +14 -2
- package/dist/chunk-X57BTN6V.js.map +1 -0
- package/dist/{chunk-RCZPRFHQ.js → chunk-ZOWOKIE4.js} +2 -2
- package/dist/chunk-ZOWOKIE4.js.map +1 -0
- package/dist/components/app-bar.d.ts +27 -4
- package/dist/components/app-bar.js +3 -3
- package/dist/components/app-ui.d.ts +12 -0
- package/dist/components/app-ui.js +2 -2
- package/dist/components/checkbox-group.d.ts +4 -0
- package/dist/components/checkbox-group.js +2 -2
- package/dist/components/checkbox.d.ts +4 -0
- package/dist/components/checkbox.js +2 -2
- package/dist/components/chip-group.d.ts +1 -0
- package/dist/components/chip-group.js +2 -2
- package/dist/components/chip.js +1 -1
- package/dist/components/date-input.d.ts +4 -0
- package/dist/components/date-input.js +2 -2
- package/dist/components/dialog.js +1 -1
- package/dist/components/journey.d.ts +16 -0
- package/dist/components/journey.js +2 -2
- package/dist/components/navigation.d.ts +6 -0
- package/dist/components/navigation.js +5 -3
- package/dist/components/page.js +1 -1
- package/dist/components/radio-group.d.ts +4 -0
- package/dist/components/radio-group.js +2 -2
- package/dist/components/rows.js +1 -1
- package/dist/components/select.d.ts +4 -0
- package/dist/components/select.js +2 -2
- package/dist/components/switch.d.ts +8 -0
- package/dist/components/switch.js +2 -2
- package/dist/components/text-input.d.ts +4 -0
- package/dist/components/text-input.js +2 -2
- package/dist/components/textarea.d.ts +4 -0
- package/dist/components/textarea.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +21 -19
- package/dist/standalone/atomic-ui.js +204 -169
- package/dist/standalone/atomic-ui.js.map +3 -3
- package/package.json +2 -2
- package/dist/chunk-BGHAANTP.js.map +0 -1
- package/dist/chunk-EA3M6KPB.js.map +0 -1
- package/dist/chunk-G7CVRNY5.js.map +0 -1
- package/dist/chunk-MGDX7Z74.js.map +0 -1
- package/dist/chunk-PII4SJL5.js.map +0 -1
- package/dist/chunk-RCZPRFHQ.js.map +0 -1
- package/dist/chunk-SY7NTW3U.js.map +0 -1
- package/dist/chunk-UBNCJROR.js.map +0 -1
- package/dist/chunk-WT7MHYJR.js.map +0 -1
- /package/dist/{chunk-2BGOBD6Y.js.map → chunk-273AYERA.js.map} +0 -0
- /package/dist/{chunk-EUOBFMWC.js.map → chunk-6IQIFKY6.js.map} +0 -0
- /package/dist/{chunk-WEX5RKVC.js.map → chunk-BTACNWU6.js.map} +0 -0
- /package/dist/{chunk-RNFGIXJ7.js.map → chunk-CN4J5RS2.js.map} +0 -0
- /package/dist/{chunk-F2MFV7RM.js.map → chunk-DKVLA7AF.js.map} +0 -0
- /package/dist/{chunk-P5FAKEFK.js.map → chunk-GIIJ32FN.js.map} +0 -0
- /package/dist/{chunk-LSEK5MEZ.js.map → chunk-H5HWJ2D4.js.map} +0 -0
- /package/dist/{chunk-B2GWXXIW.js.map → chunk-JDKOHA3B.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/dialog.ts"],"sourcesContent":["import { html, css, nothing, unsafeCSS, type TemplateResult } from 'lit';\nimport { ImpaktElement } from '../base/ImpaktElement';\nimport { focusRing, targetSize, touchTarget } from '../base/styles';\nimport { lockScroll, unlockScroll } from '../base/scroll-lock';\nimport { fontSize, space, t, token } from '../base/tokens';\n\n/**\n * The dialog's shape, from the brand (`dialog.*` in `@atomic-ui/design-tokens`). Each fallback is\n * the dialog every brand derives: no edge, a lifted shadow, the page dimmed and blurred behind and\n * a bold heading, with 20px round its content. The Impakt theme sets the G2 dialog over it.\n */\nconst D = {\n edgeWidth: token('dialog.edge-width', '0px'),\n backdrop: token('dialog.backdrop', 'color-mix(in srgb, var(--impakt-color-text-default, #1a1a1a) 30%, transparent)'),\n backdropBlur: token('dialog.backdrop-blur', '2px'),\n padding: token('dialog.padding', '20px'),\n /** On a phone the dialog keeps no more than 20px round its content. */\n phonePadding: unsafeCSS(`min(${token('dialog.padding', '20px')}, 20px)`),\n headingSize: token('dialog.heading.size', '1.25rem'),\n headingLineHeight: token('dialog.heading.line-height', '1.5'),\n headingTracking: token('dialog.heading.tracking', '0em'),\n headingWeight: token('dialog.heading.weight', '700'),\n};\n\n/**\n * A modal dialog — \"are you sure you want to leave this order?\".\n *\n * **It is a native `<dialog>` opened with `showModal()`, and that is the whole\n * design.** The platform then provides, correctly and in every browser: a\n * focus trap, Escape to close, the rest of the page made inert so a screen\n * reader cannot wander out of the dialog, rendering in the top layer so no\n * `z-index` can cover it, and focus returned to whatever opened it when it\n * closes.\n *\n * Every one of those is a thing hand-rolled modals get wrong. The focus trap\n * is the famous one, but inertness is the worse failure: a dialog that traps\n * the Tab key but leaves the background in the accessibility tree lets a\n * screen-reader user read straight past it into a page they cannot interact\n * with, and nothing on screen tells them that is what happened.\n *\n * What is left to get right is the labelling. `aria-labelledby` points at the\n * dialog's own heading, so it is announced by name on open rather than as\n * \"dialog\".\n *\n * Two things the platform leaves out are added. The page behind does not scroll\n * while the dialog is open, so a finger on the backdrop does not move the page\n * out from under it. And with `phone-full-screen` the dialog fills a phone's\n * screen, which suits a dialog holding a form; a short question is better left\n * as a box in the middle, which is the default.\n\n *\n * @category feedback\n * @icon dialog\n * @fires {CustomEvent<null>} impakt-close - When the dialog is closed.\n * @slot - The body of the dialog.\n * @slot footer - The dialog's actions, set at the end of a row along its foot, such as \"Cancel\" and \"Send\".\n * @slot actions - The same as `footer`, for a page that names it so.\n */\nexport class ImpaktDialog extends ImpaktElement {\n static properties = {\n open: { type: Boolean, reflect: true },\n heading: { type: String },\n closeLabel: { type: String, attribute: 'close-label' },\n dismissible: { type: Boolean },\n phoneFullScreen: { type: Boolean, reflect: true, attribute: 'phone-full-screen' },\n size: { type: String, reflect: true },\n eyebrow: { type: String },\n };\n\n declare open: boolean;\n declare heading: string;\n declare closeLabel: string;\n /** When false, Escape and the backdrop do not close it — a decision must be made. */\n declare dismissible: boolean;\n /** Fill the screen on a phone, for a dialog that holds a form or a long text. */\n declare phoneFullScreen: boolean;\n /** `md` is a short question, 32rem wide. `lg` is 720px, for a dialog that holds a form or a review (G2 frame 45:653). */\n declare size: 'md' | 'lg';\n /** A short line above the heading in the code face, such as \"Step 2 of 3\". It is read before the heading but is not part of the dialog's name. */\n declare eyebrow: string;\n\n constructor() {\n super();\n this.open = false;\n this.heading = '';\n this.closeLabel = 'Close';\n this.dismissible = true;\n this.phoneFullScreen = false;\n this.size = 'md';\n this.eyebrow = '';\n }\n\n static styles = [\n ...ImpaktElement.styles,\n focusRing,\n touchTarget('.close'),\n css`\n dialog {\n padding: 0;\n /* No edge and a lifted shadow, or under Noire an ink edge and no shadow (dialog.edge-width, shadow.dialog). */\n border: ${D.edgeWidth} solid ${t.text};\n border-radius: ${t.radius2xl};\n background: ${t.surfaceCard};\n color: ${t.text};\n box-shadow: var(--impakt-shadow-dialog, ${t.shadowXl}, 0 0 0 1px ${t.hairline});\n max-inline-size: min(32rem, calc(100vw - 2rem));\n /* 1.4.10 Reflow: a dialog taller than the viewport must scroll inside\n itself rather than clipping, at 320px and at 400% zoom alike. */\n max-block-size: calc(100vh - 2rem);\n overflow: auto;\n }\n /* The page behind, dimmed with the text colour and blurred, or under Noire the ink at half strength (dialog.backdrop). */\n dialog::backdrop {\n background: ${D.backdrop};\n backdrop-filter: blur(${D.backdropBlur});\n }\n :host([size='lg']) dialog {\n inline-size: 720px;\n max-inline-size: calc(100vw - 2rem);\n }\n .titles {\n display: flex;\n flex-direction: column;\n gap: ${space(2)};\n min-inline-size: 0;\n }\n .eyebrow {\n margin: 0;\n font-family: ${t.fontMono};\n font-size: ${fontSize('sm')};\n color: ${t.textMuted};\n }\n .foot {\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-end;\n gap: ${space(3)};\n border-block-start: ${t.borderThin} solid var(--impakt-color-line-soft, #dcdcd8);\n }\n .foot.empty {\n display: none;\n }\n .head {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: ${space(3)};\n padding: ${D.padding} ${D.padding} 0;\n }\n /* The heading: bold in the xl size, or under Noire (G2) about 32px, semibold and tight (dialog.heading.*). */\n .heading {\n margin: 0;\n font-family: ${t.fontHeading};\n font-size: ${D.headingSize};\n line-height: ${D.headingLineHeight};\n letter-spacing: ${D.headingTracking};\n font-weight: ${D.headingWeight};\n color: ${t.textHeading};\n }\n .body {\n padding: ${space(4)} ${D.padding} ${D.padding};\n }\n .foot {\n padding: ${space(5)} ${D.padding};\n }\n @media (max-width: 40rem) {\n .heading { font-size: min(${D.headingSize}, 1.5rem); }\n .head { padding: ${D.phonePadding} ${D.phonePadding} 0; }\n .body { padding: ${space(4)} ${D.phonePadding} ${D.phonePadding}; }\n .foot { padding: ${space(4)} ${D.phonePadding}; }\n }\n @media (max-width: 40rem) {\n :host([phone-full-screen]) dialog {\n inline-size: 100vw;\n max-inline-size: 100vw;\n block-size: 100dvh;\n max-block-size: 100dvh;\n margin: 0;\n border-radius: 0;\n }\n }\n .close {\n ${targetSize}\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n background: none;\n border: 0;\n border-radius: ${t.radius};\n font: inherit;\n font-size: ${fontSize('lg')};\n color: ${t.text};\n cursor: pointer;\n }\n `,\n ];\n\n private get dialog(): HTMLDialogElement | null {\n return this.renderRoot.querySelector('dialog');\n }\n\n updated(changed: Map<string, unknown>): void {\n if (!changed.has('open')) return;\n const dialog = this.dialog;\n if (!dialog) return;\n // happy-dom and older engines do not implement showModal. Falling back to\n // the `open` attribute renders a NON-modal dialog — no focus trap, no\n // inert background — so it is used only to keep tests and ancient browsers\n // from throwing, never as an equivalent.\n if (this.open) {\n if (typeof dialog.showModal === 'function') dialog.showModal();\n else dialog.setAttribute('open', '');\n lockScroll(this);\n } else {\n if (typeof dialog.close === 'function' && dialog.open) dialog.close();\n else dialog.removeAttribute('open');\n unlockScroll(this);\n }\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n unlockScroll(this);\n }\n\n private hasFooter = false;\n\n private onFooter(): void {\n const slots = Array.from(this.renderRoot.querySelectorAll<HTMLSlotElement>('slot[name=\"footer\"], slot[name=\"actions\"]'));\n const next = slots.some((slot) => slot.assignedElements({ flatten: true }).length > 0);\n if (next !== this.hasFooter) {\n this.hasFooter = next;\n this.requestUpdate();\n }\n }\n\n private close(): void {\n this.open = false;\n this.dispatchEvent(new CustomEvent('impakt-close', { bubbles: true, composed: true }));\n }\n\n render(): TemplateResult {\n return html`\n <dialog\n part=\"dialog\"\n aria-labelledby=${this.heading ? this.id_('heading') : nothing}\n @cancel=${(e: Event) => {\n // `cancel` fires on Escape. Blocking it is what makes a dialog\n // non-dismissible, and it is why `dismissible` exists rather than\n // leaving a caller to re-open on close.\n if (!this.dismissible) e.preventDefault();\n else this.close();\n }}\n @close=${() => {\n if (this.open) this.close();\n }}\n >\n <div class=\"head\" part=\"head\">\n <div class=\"titles\">\n ${this.eyebrow ? html`<p class=\"eyebrow\" part=\"eyebrow\">${this.eyebrow}</p>` : nothing}\n ${this.heading ? html`<h2 class=\"heading\" id=${this.id_('heading')} part=\"heading\">${this.heading}</h2>` : nothing}\n </div>\n ${\n this.dismissible\n ? html`<button class=\"close\" part=\"close\" type=\"button\" @click=${this.close}>\n <span aria-hidden=\"true\">×</span>\n <span class=\"sr-only\" style=\"position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)\">${this.closeLabel}</span>\n </button>`\n : nothing\n }\n </div>\n <div class=\"body\" part=\"body\"><slot></slot></div>\n <div class=\"foot ${this.hasFooter ? '' : 'empty'}\" part=\"footer\">\n <slot name=\"footer\" @slotchange=${this.onFooter}></slot><slot name=\"actions\" @slotchange=${this.onFooter}></slot>\n </div>\n </dialog>\n `;\n }\n}\n\ncustomElements.define('impakt-dialog', ImpaktDialog);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impakt-dialog': ImpaktDialog;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,SAAS,MAAM,KAAK,SAAS,iBAAsC;AAWnE,IAAM,IAAI;AAAA,EAC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CAAC;AAAA,iBACQ,MAAM;AACb,UAAI,KAAK,KAAM,MAAK,MAAM;AAAA,IAC5B,CAAC;AAAA;AAAA;AAAA;AAAA,cAIK,KAAK,UAAU,yCAAyC,KAAK,OAAO,SAAS,OAAO;AAAA,cACpF,KAAK,UAAU,8BAA8B,KAAK,IAAI,SAAS,CAAC,mBAAmB,KAAK,OAAO,UAAU,OAAO;AAAA;AAAA,YAGlH,KAAK,cACD,+DAA+D,KAAK,KAAK;AAAA;AAAA,4HAEmC,KAAK,UAAU;AAAA,2BAE3H,OACN;AAAA;AAAA;AAAA,2BAGiB,KAAK,YAAY,KAAK,OAAO;AAAA,4CACZ,KAAK,QAAQ,4CAA4C,KAAK,QAAQ;AAAA;AAAA;AAAA;AAAA,EAIhH;AACF;AAEA,eAAe,OAAO,iBAAiB,YAAY;","names":[]}
|
|
@@ -41,10 +41,11 @@ export type AppBarMenuItem = MenuItem & {
|
|
|
41
41
|
* `organisation-items`; or, when `signed-out`, a "Sign in" link in its place.
|
|
42
42
|
*
|
|
43
43
|
* **On a narrow screen the pages move to a second row** under the mark and
|
|
44
|
-
* the menus, the full width of the bar, and
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
44
|
+
* the menus, the full width of the bar, and the segmented track wraps onto
|
|
45
|
+
* another line when they still do not fit, so every page stays in sight at 390
|
|
46
|
+
* and at 320 (#64). Folding them away behind a button would hide where you
|
|
47
|
+
* are, and a row that scrolls hides the pages past the edge with no sign that
|
|
48
|
+
* they are there. The bar reflows to 320px without the page scrolling sideways.
|
|
48
49
|
*
|
|
49
50
|
* Figma: kit `33:361`, `33:365`; every tool screen, such as `36:431`, `36:642`,
|
|
50
51
|
* `37:420`, `37:591`, `39:468`, `39:603`, `39:746`, `53:674`, `53:801`; signed
|
|
@@ -58,6 +59,28 @@ export type AppBarMenuItem = MenuItem & {
|
|
|
58
59
|
* @csspart home - The link home.
|
|
59
60
|
* @csspart pages - The tool's own pages.
|
|
60
61
|
* @csspart sign-in - The sign-in link.
|
|
62
|
+
* @csspart switcher-trigger - The "All tools" switcher's button.
|
|
63
|
+
* @csspart switcher-chevron - The arrow on the switcher's button.
|
|
64
|
+
* @csspart switcher-header - The box round the switcher's header, when it has one.
|
|
65
|
+
* @csspart switcher-panel - The box the switcher opens, 340px wide as in `53:960`.
|
|
66
|
+
* @csspart switcher-list - The switcher's list of items.
|
|
67
|
+
* @csspart switcher-group - A group of the switcher's items, with its label.
|
|
68
|
+
* @csspart switcher-group-label - A group's label in the switcher, such as "Tools".
|
|
69
|
+
* @csspart switcher-item - An item in the switcher. The tool you are in is also `switcher-current`.
|
|
70
|
+
* @csspart switcher-current - The switcher's item for the tool you are in.
|
|
71
|
+
* @csspart switcher-label - An item's words in the switcher.
|
|
72
|
+
* @csspart switcher-meta - An item's note in the switcher, such as "Plans, team, billing".
|
|
73
|
+
* @csspart organisation-trigger - The organisation menu's button.
|
|
74
|
+
* @csspart organisation-chevron - The arrow on the organisation menu's button.
|
|
75
|
+
* @csspart organisation-panel - The box the organisation menu opens.
|
|
76
|
+
* @csspart organisation-header - The box round the organisation menu's header, when it has one.
|
|
77
|
+
* @csspart organisation-list - The organisation menu's list of items.
|
|
78
|
+
* @csspart organisation-group - A group of the organisation menu's items, with its label.
|
|
79
|
+
* @csspart organisation-group-label - A group's label in the organisation menu.
|
|
80
|
+
* @csspart organisation-item - An item in the organisation menu. The page you are on is also `organisation-current`.
|
|
81
|
+
* @csspart organisation-current - The organisation menu's item for the page you are on.
|
|
82
|
+
* @csspart organisation-label - An item's words in the organisation menu.
|
|
83
|
+
* @csspart organisation-meta - An item's note in the organisation menu.
|
|
61
84
|
*/
|
|
62
85
|
export declare class ImpaktAppBar extends ImpaktElement {
|
|
63
86
|
static properties: {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ImpaktAppBar
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-DJLUWM3C.js";
|
|
4
4
|
import "../chunk-XX6JZW5N.js";
|
|
5
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-VR543SMV.js";
|
|
6
6
|
import "../chunk-UNGAG44M.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-X57BTN6V.js";
|
|
8
8
|
import "../chunk-2YRTFWW2.js";
|
|
9
9
|
import "../chunk-5OYQZWP2.js";
|
|
10
10
|
import "../chunk-72WNCCDC.js";
|
|
@@ -166,6 +166,12 @@ export interface MenuItem {
|
|
|
166
166
|
* @csspart panel - The box that opens, holding the header and the items.
|
|
167
167
|
* @csspart header - The box round the header slot.
|
|
168
168
|
* @csspart list - The list of items.
|
|
169
|
+
* @csspart group - A group of items with its label, and the soft rule above it after the first.
|
|
170
|
+
* @csspart group-label - A group's label, in the code face.
|
|
171
|
+
* @csspart item - An item, a link or a button. The page you are on is also `current`.
|
|
172
|
+
* @csspart current - The item for the page you are on.
|
|
173
|
+
* @csspart label - An item's words.
|
|
174
|
+
* @csspart meta - An item's quiet note at the end, such as "Coming soon".
|
|
169
175
|
* @fires {CustomEvent<{ value: string }>} impakt-select - When an item without an address is chosen. The value is in detail.value.
|
|
170
176
|
*/
|
|
171
177
|
export declare class ImpaktMenu extends ImpaktElement {
|
|
@@ -208,6 +214,8 @@ export declare class ImpaktMenu extends ImpaktElement {
|
|
|
208
214
|
private get entries();
|
|
209
215
|
private get trigger();
|
|
210
216
|
private toggle;
|
|
217
|
+
/** However it was opened, by the button or by setting `open`, the list is kept on the screen. */
|
|
218
|
+
protected updated(changed: Map<string, unknown>): void;
|
|
211
219
|
/** Open towards the other edge when the list would run off the screen. */
|
|
212
220
|
private keepOnScreen;
|
|
213
221
|
private triggerKey;
|
|
@@ -452,6 +460,10 @@ export declare class ImpaktSlotPicker extends FieldElement {
|
|
|
452
460
|
type: StringConstructor;
|
|
453
461
|
attribute: string;
|
|
454
462
|
};
|
|
463
|
+
look: {
|
|
464
|
+
type: StringConstructor;
|
|
465
|
+
reflect: boolean;
|
|
466
|
+
};
|
|
455
467
|
};
|
|
456
468
|
days: SlotDay[];
|
|
457
469
|
dayLabel: string;
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
ImpaktSlotPicker,
|
|
9
9
|
ImpaktToast,
|
|
10
10
|
pageWindow
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-VR543SMV.js";
|
|
12
12
|
import "../chunk-UNGAG44M.js";
|
|
13
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-X57BTN6V.js";
|
|
14
14
|
import "../chunk-2YRTFWW2.js";
|
|
15
15
|
import "../chunk-5OYQZWP2.js";
|
|
16
16
|
import "../chunk-72WNCCDC.js";
|
|
@@ -31,6 +31,7 @@ export interface ChipOption {
|
|
|
31
31
|
* @icon checkbox
|
|
32
32
|
* @csspart chip - Each chip.
|
|
33
33
|
* @csspart fieldset - The fieldset.
|
|
34
|
+
* @cssprop --impakt-chip-group-gap - The space between the chips, 6px unless set; the estimator sets 8px, as its frame does (`10:547`).
|
|
34
35
|
*/
|
|
35
36
|
export declare class ImpaktChipGroup extends FieldElement {
|
|
36
37
|
static properties: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ImpaktChipGroup
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-JX5RJRME.js";
|
|
4
4
|
import "../chunk-XX6JZW5N.js";
|
|
5
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-X57BTN6V.js";
|
|
6
6
|
import "../chunk-72WNCCDC.js";
|
|
7
7
|
import "../chunk-JTCTQBAX.js";
|
|
8
8
|
export {
|
package/dist/components/chip.js
CHANGED
|
@@ -96,6 +96,10 @@ export declare class ImpaktAddressLookup extends FieldElement {
|
|
|
96
96
|
type: StringConstructor;
|
|
97
97
|
attribute: string;
|
|
98
98
|
};
|
|
99
|
+
look: {
|
|
100
|
+
type: StringConstructor;
|
|
101
|
+
reflect: boolean;
|
|
102
|
+
};
|
|
99
103
|
};
|
|
100
104
|
postcodeLabel: string;
|
|
101
105
|
findText: string;
|
|
@@ -226,6 +230,10 @@ export declare class ImpaktFileUpload extends FieldElement {
|
|
|
226
230
|
type: StringConstructor;
|
|
227
231
|
attribute: string;
|
|
228
232
|
};
|
|
233
|
+
look: {
|
|
234
|
+
type: StringConstructor;
|
|
235
|
+
reflect: boolean;
|
|
236
|
+
};
|
|
229
237
|
};
|
|
230
238
|
/** File types allowed, such as `.pdf,.jpg,.png`. Empty allows any. */
|
|
231
239
|
accept: string;
|
|
@@ -307,6 +315,10 @@ export declare class ImpaktMoneyInput extends FieldElement {
|
|
|
307
315
|
type: StringConstructor;
|
|
308
316
|
attribute: string;
|
|
309
317
|
};
|
|
318
|
+
look: {
|
|
319
|
+
type: StringConstructor;
|
|
320
|
+
reflect: boolean;
|
|
321
|
+
};
|
|
310
322
|
};
|
|
311
323
|
currency: string;
|
|
312
324
|
lowest: number | undefined;
|
|
@@ -381,6 +393,10 @@ export declare class ImpaktRangeInput extends FieldElement {
|
|
|
381
393
|
type: StringConstructor;
|
|
382
394
|
attribute: string;
|
|
383
395
|
};
|
|
396
|
+
look: {
|
|
397
|
+
type: StringConstructor;
|
|
398
|
+
reflect: boolean;
|
|
399
|
+
};
|
|
384
400
|
};
|
|
385
401
|
lowest: number;
|
|
386
402
|
highest: number;
|
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
ImpaktRangeInput,
|
|
7
7
|
ImpaktTaskList,
|
|
8
8
|
groupDigits
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-273AYERA.js";
|
|
10
10
|
import "../chunk-UNGAG44M.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-X57BTN6V.js";
|
|
12
12
|
import "../chunk-72WNCCDC.js";
|
|
13
13
|
import "../chunk-JTCTQBAX.js";
|
|
14
14
|
export {
|
|
@@ -5,6 +5,12 @@ export interface NavLink {
|
|
|
5
5
|
label: string;
|
|
6
6
|
href: string;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Whether a link is the page the visitor is on, or a page above it. Given `current`, the href of
|
|
10
|
+
* the page as the page itself names it, only that link is the page; otherwise it is worked out
|
|
11
|
+
* from the address, and on a server, where there is no address, nothing is.
|
|
12
|
+
*/
|
|
13
|
+
export declare function linkCurrent(href: string, current?: string): 'page' | 'section' | null;
|
|
8
14
|
/**
|
|
9
15
|
* The site's main navigation: a row of links that folds into a Menu button
|
|
10
16
|
* when there is not room for all of them, whatever the screen.
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ImpaktBreadcrumbs,
|
|
3
|
-
ImpaktNav
|
|
4
|
-
|
|
3
|
+
ImpaktNav,
|
|
4
|
+
linkCurrent
|
|
5
|
+
} from "../chunk-NCVBRUJM.js";
|
|
5
6
|
import "../chunk-5OYQZWP2.js";
|
|
6
7
|
import "../chunk-72WNCCDC.js";
|
|
7
8
|
import "../chunk-JTCTQBAX.js";
|
|
8
9
|
export {
|
|
9
10
|
ImpaktBreadcrumbs,
|
|
10
|
-
ImpaktNav
|
|
11
|
+
ImpaktNav,
|
|
12
|
+
linkCurrent
|
|
11
13
|
};
|
|
12
14
|
//# sourceMappingURL=navigation.js.map
|
package/dist/components/page.js
CHANGED
package/dist/components/rows.js
CHANGED
|
@@ -65,6 +65,10 @@ export declare class ImpaktSwitch extends FieldElement {
|
|
|
65
65
|
type: StringConstructor;
|
|
66
66
|
attribute: string;
|
|
67
67
|
};
|
|
68
|
+
look: {
|
|
69
|
+
type: StringConstructor;
|
|
70
|
+
reflect: boolean;
|
|
71
|
+
};
|
|
68
72
|
};
|
|
69
73
|
checked: boolean;
|
|
70
74
|
/** Keep the label for screen readers only, when the row around it already names the setting. */
|
|
@@ -143,6 +147,10 @@ export declare class ImpaktSegmentedControl extends FieldElement {
|
|
|
143
147
|
type: StringConstructor;
|
|
144
148
|
attribute: string;
|
|
145
149
|
};
|
|
150
|
+
look: {
|
|
151
|
+
type: StringConstructor;
|
|
152
|
+
reflect: boolean;
|
|
153
|
+
};
|
|
146
154
|
};
|
|
147
155
|
options: SegmentOption[];
|
|
148
156
|
/** Keep the question for screen readers only, when the words around it already ask it. */
|
|
@@ -70,6 +70,10 @@ export declare class ImpaktTextInput extends FieldElement {
|
|
|
70
70
|
type: StringConstructor;
|
|
71
71
|
attribute: string;
|
|
72
72
|
};
|
|
73
|
+
look: {
|
|
74
|
+
type: StringConstructor;
|
|
75
|
+
reflect: boolean;
|
|
76
|
+
};
|
|
73
77
|
};
|
|
74
78
|
/** `search` draws a search icon at the start and rounds the field, as a search box. */
|
|
75
79
|
type: 'text' | 'email' | 'tel' | 'number' | 'password' | 'date' | 'search';
|
package/dist/index.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export { ImpaktGrid } from './components/grid';
|
|
|
38
38
|
export { ImpaktHelp, type HelpKind } from './components/help';
|
|
39
39
|
export { ImpaktPage, ImpaktSection } from './components/page';
|
|
40
40
|
export { ImpaktIcon, ICONS, ICON_NAMES, iconSvg, type IconName } from './components/icon';
|
|
41
|
-
export { ImpaktNav, ImpaktBreadcrumbs, type NavLink } from './components/navigation';
|
|
41
|
+
export { ImpaktNav, ImpaktBreadcrumbs, linkCurrent, type NavLink } from './components/navigation';
|
|
42
42
|
export { ImpaktDivider, ImpaktSpacer, ImpaktVisuallyHidden, ImpaktTabs, type TabItem } from './components/blocks';
|
|
43
43
|
export { ImpaktFieldset } from './components/fieldset';
|
|
44
44
|
export { ImpaktDrawer, ImpaktToast, ImpaktMenu, ImpaktPagination, ImpaktAvatar, ImpaktAvatarGroup, ImpaktEmptyState, ImpaktSlotPicker, type MenuItem, type AvatarItem, type SlotDay, } from './components/app-ui';
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ImpaktSegmentedControl,
|
|
3
3
|
ImpaktSwitch
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CN4J5RS2.js";
|
|
5
5
|
import {
|
|
6
6
|
ImpaktTable
|
|
7
7
|
} from "./chunk-KE6WCXQP.js";
|
|
8
8
|
import {
|
|
9
9
|
ImpaktTextInput
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-JDKOHA3B.js";
|
|
11
11
|
import {
|
|
12
12
|
ImpaktTextarea
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-KDU2POFS.js";
|
|
14
14
|
import {
|
|
15
15
|
ImpaktToolCard
|
|
16
16
|
} from "./chunk-5PRB7P7N.js";
|
|
@@ -22,10 +22,10 @@ import {
|
|
|
22
22
|
ImpaktFilterChip,
|
|
23
23
|
ImpaktRow,
|
|
24
24
|
ImpaktStatTile
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-EIWICFXL.js";
|
|
26
26
|
import {
|
|
27
27
|
ImpaktSelect
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-BTACNWU6.js";
|
|
29
29
|
import {
|
|
30
30
|
ImpaktSource
|
|
31
31
|
} from "./chunk-QPOM7W3D.js";
|
|
@@ -46,12 +46,13 @@ import {
|
|
|
46
46
|
} from "./chunk-AYINRYNC.js";
|
|
47
47
|
import {
|
|
48
48
|
ImpaktBreadcrumbs,
|
|
49
|
-
ImpaktNav
|
|
50
|
-
|
|
49
|
+
ImpaktNav,
|
|
50
|
+
linkCurrent
|
|
51
|
+
} from "./chunk-NCVBRUJM.js";
|
|
51
52
|
import {
|
|
52
53
|
ImpaktPage,
|
|
53
54
|
ImpaktSection
|
|
54
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-WGFHYSXH.js";
|
|
55
56
|
import {
|
|
56
57
|
ImpaktPrice
|
|
57
58
|
} from "./chunk-EKPTMRBG.js";
|
|
@@ -60,7 +61,7 @@ import {
|
|
|
60
61
|
} from "./chunk-LP4RTYTL.js";
|
|
61
62
|
import {
|
|
62
63
|
ImpaktRadioGroup
|
|
63
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-H5HWJ2D4.js";
|
|
64
65
|
import {
|
|
65
66
|
ImpaktFieldset
|
|
66
67
|
} from "./chunk-F4IXELLK.js";
|
|
@@ -78,7 +79,7 @@ import {
|
|
|
78
79
|
ImpaktRangeInput,
|
|
79
80
|
ImpaktTaskList,
|
|
80
81
|
groupDigits
|
|
81
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-273AYERA.js";
|
|
82
83
|
import {
|
|
83
84
|
ImpaktLanguageSwitch
|
|
84
85
|
} from "./chunk-NHEU5FT6.js";
|
|
@@ -93,31 +94,31 @@ import {
|
|
|
93
94
|
} from "./chunk-K5QFVLCI.js";
|
|
94
95
|
import {
|
|
95
96
|
ImpaktCheckboxGroup
|
|
96
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-DKVLA7AF.js";
|
|
97
98
|
import {
|
|
98
99
|
ImpaktCheckbox
|
|
99
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-6IQIFKY6.js";
|
|
100
101
|
import {
|
|
101
102
|
ImpaktChecked
|
|
102
103
|
} from "./chunk-UFENSIWD.js";
|
|
103
104
|
import {
|
|
104
105
|
ImpaktChipGroup
|
|
105
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-JX5RJRME.js";
|
|
106
107
|
import {
|
|
107
108
|
CYCLE,
|
|
108
109
|
ImpaktChip,
|
|
109
110
|
TONE,
|
|
110
111
|
toneOf
|
|
111
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-C767LTJE.js";
|
|
112
113
|
import {
|
|
113
114
|
ImpaktCodeDiff
|
|
114
115
|
} from "./chunk-7UI3OBXL.js";
|
|
115
116
|
import {
|
|
116
117
|
ImpaktDateInput
|
|
117
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-GIIJ32FN.js";
|
|
118
119
|
import {
|
|
119
120
|
ImpaktDialog
|
|
120
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-ZOWOKIE4.js";
|
|
121
122
|
import {
|
|
122
123
|
ImpaktAccordion
|
|
123
124
|
} from "./chunk-2RC3QKYA.js";
|
|
@@ -131,7 +132,7 @@ import {
|
|
|
131
132
|
} from "./chunk-ZAWGJC4I.js";
|
|
132
133
|
import {
|
|
133
134
|
ImpaktAppBar
|
|
134
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-DJLUWM3C.js";
|
|
135
136
|
import "./chunk-XX6JZW5N.js";
|
|
136
137
|
import {
|
|
137
138
|
ImpaktAvatar,
|
|
@@ -142,14 +143,14 @@ import {
|
|
|
142
143
|
ImpaktPagination,
|
|
143
144
|
ImpaktSlotPicker,
|
|
144
145
|
ImpaktToast
|
|
145
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-VR543SMV.js";
|
|
146
147
|
import {
|
|
147
148
|
pageLocale
|
|
148
149
|
} from "./chunk-UNGAG44M.js";
|
|
149
150
|
import {
|
|
150
151
|
FieldElement,
|
|
151
152
|
fieldWidths
|
|
152
|
-
} from "./chunk-
|
|
153
|
+
} from "./chunk-X57BTN6V.js";
|
|
153
154
|
import {
|
|
154
155
|
lockScroll,
|
|
155
156
|
unlockScroll
|
|
@@ -290,6 +291,7 @@ export {
|
|
|
290
291
|
iconSvg,
|
|
291
292
|
isCurrent,
|
|
292
293
|
lineHeight,
|
|
294
|
+
linkCurrent,
|
|
293
295
|
lockScroll,
|
|
294
296
|
pageLocale,
|
|
295
297
|
reducedMotion,
|