@atomic-ui/ui 0.6.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +2641 -256
- package/dist/{chunk-TAZZLOUY.js → chunk-2HWO5TFV.js} +2 -2
- package/dist/chunk-AMDTBUUL.js +299 -0
- package/dist/chunk-AMDTBUUL.js.map +1 -0
- package/dist/{chunk-EJD6LT7E.js → chunk-BMJFSUP3.js} +37 -5
- package/dist/chunk-BMJFSUP3.js.map +1 -0
- package/dist/{chunk-Q54FX3SY.js → chunk-INA53XXW.js} +2 -2
- package/dist/chunk-INA53XXW.js.map +1 -0
- package/dist/{chunk-SV77SN6P.js → chunk-MLRTPQQO.js} +39 -2
- package/dist/chunk-MLRTPQQO.js.map +1 -0
- package/dist/{chunk-ZS7RPXCT.js → chunk-NU34ZQFR.js} +4 -2
- package/dist/chunk-NU34ZQFR.js.map +1 -0
- package/dist/{chunk-HNZQ7LM4.js → chunk-OE6O3XQB.js} +78 -3
- package/dist/chunk-OE6O3XQB.js.map +1 -0
- package/dist/chunk-ON3QWAFV.js +266 -0
- package/dist/chunk-ON3QWAFV.js.map +1 -0
- package/dist/{chunk-WWYYNR3Z.js → chunk-RZWRAJCD.js} +7 -2
- package/dist/chunk-RZWRAJCD.js.map +1 -0
- package/dist/chunk-UF6KCRNT.js +316 -0
- package/dist/chunk-UF6KCRNT.js.map +1 -0
- package/dist/{chunk-Z45LY6BT.js → chunk-WH43U4IY.js} +37 -2
- package/dist/chunk-WH43U4IY.js.map +1 -0
- package/dist/{chunk-5Y3HYRCU.js → chunk-WS4AYRSL.js} +20 -2
- package/dist/chunk-WS4AYRSL.js.map +1 -0
- package/dist/{chunk-PANH23MF.js → chunk-XZQH2M5I.js} +2 -2
- package/dist/components/app-ui.d.ts +6 -1
- package/dist/components/app-ui.js +2 -2
- package/dist/components/badge.d.ts +7 -2
- package/dist/components/badge.js +2 -2
- package/dist/components/blocks.d.ts +27 -1
- package/dist/components/blocks.js +3 -1
- package/dist/components/button.d.ts +24 -3
- package/dist/components/button.js +2 -2
- package/dist/components/icon.d.ts +19 -1
- package/dist/components/icon.js +1 -1
- package/dist/components/link.d.ts +1 -1
- package/dist/components/link.js +2 -2
- package/dist/components/navigation.js +2 -2
- package/dist/components/progress.d.ts +11 -0
- package/dist/components/progress.js +1 -1
- package/dist/components/rows.d.ts +196 -0
- package/dist/components/rows.js +16 -0
- package/dist/components/rows.js.map +1 -0
- package/dist/components/shell.d.ts +166 -0
- package/dist/components/shell.js +17 -0
- package/dist/components/shell.js.map +1 -0
- package/dist/components/switch.d.ts +147 -0
- package/dist/components/switch.js +11 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/table.js +2 -2
- package/dist/components/text-input.d.ts +14 -1
- package/dist/components/text-input.js +2 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +43 -15
- package/dist/standalone/atomic-ui.js +932 -285
- package/dist/standalone/atomic-ui.js.map +4 -4
- package/package.json +2 -2
- package/dist/chunk-5Y3HYRCU.js.map +0 -1
- package/dist/chunk-EJD6LT7E.js.map +0 -1
- package/dist/chunk-HNZQ7LM4.js.map +0 -1
- package/dist/chunk-Q54FX3SY.js.map +0 -1
- package/dist/chunk-SV77SN6P.js.map +0 -1
- package/dist/chunk-WWYYNR3Z.js.map +0 -1
- package/dist/chunk-Z45LY6BT.js.map +0 -1
- package/dist/chunk-ZS7RPXCT.js.map +0 -1
- /package/dist/{chunk-TAZZLOUY.js.map → chunk-2HWO5TFV.js.map} +0 -0
- /package/dist/{chunk-PANH23MF.js.map → chunk-XZQH2M5I.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/icon.ts"],"sourcesContent":["import { css, html, nothing, svg, type SVGTemplateResult, type TemplateResult } from 'lit';\nimport { ImpaktElement } from '../base/ImpaktElement';\nimport { t } from '../base/tokens';\n\n/**\n * The icons the library draws, each on a 24 by 24 grid in strokes of the\n * current text colour. Kept to a set the components need and editors reach\n * for, so an icon always matches the line weight of the ones beside it.\n */\nexport const ICONS = {\n 'arrow-right': svg`<path d=\"M5 12h14M13 6l6 6-6 6\"/>`,\n 'arrow-left': svg`<path d=\"M19 12H5M11 6l-6 6 6 6\"/>`,\n 'chevron-right': svg`<path d=\"M9 6l6 6-6 6\"/>`,\n 'chevron-down': svg`<path d=\"M6 9l6 6 6-6\"/>`,\n check: svg`<path d=\"M5 12.5l4.5 4.5L19 7\"/>`,\n close: svg`<path d=\"M6 6l12 12M18 6L6 18\"/>`,\n menu: svg`<path d=\"M4 7h16M4 12h16M4 17h16\"/>`,\n /** Two lines: a menu drawn quieter, as a round icon button. */\n 'menu-two': svg`<path d=\"M5 9.5h14M5 14.5h14\"/>`,\n plus: svg`<path d=\"M12 5v14M5 12h14\"/>`,\n minus: svg`<path d=\"M5 12h14\"/>`,\n search: svg`<circle cx=\"11\" cy=\"11\" r=\"6.5\"/><path d=\"M16 16l4 4\"/>`,\n external: svg`<path d=\"M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5\"/>`,\n download: svg`<path d=\"M12 4v11M7 10l5 5 5-5M5 20h14\"/>`,\n home: svg`<path d=\"M4 11l8-7 8 7M6 9.5V20h12V9.5\"/><path d=\"M10 20v-6h4v6\"/>`,\n phone: svg`<path d=\"M7 3.5h3l1.5 4-2 1.5a11 11 0 0 0 5.5 5.5l1.5-2 4 1.5v3a2 2 0 0 1-2 2A16 16 0 0 1 5 5.5a2 2 0 0 1 2-2z\"/>`,\n mail: svg`<rect x=\"3.5\" y=\"5.5\" width=\"17\" height=\"13\" rx=\"1.5\"/><path d=\"M4 7l8 6 8-6\"/>`,\n 'map-pin': svg`<path d=\"M12 21s-6.5-6-6.5-11a6.5 6.5 0 0 1 13 0c0 5-6.5 11-6.5 11z\"/><circle cx=\"12\" cy=\"10\" r=\"2.5\"/>`,\n calendar: svg`<rect x=\"4\" y=\"5.5\" width=\"16\" height=\"14.5\" rx=\"1.5\"/><path d=\"M4 10h16M8.5 3.5v4M15.5 3.5v4\"/>`,\n clock: svg`<circle cx=\"12\" cy=\"12\" r=\"8.5\"/><path d=\"M12 7.5V12l3 2\"/>`,\n user: svg`<circle cx=\"12\" cy=\"8.5\" r=\"3.5\"/><path d=\"M5 20a7 7 0 0 1 14 0\"/>`,\n star: svg`<path d=\"M12 4l2.4 5 5.4.6-4 3.7 1.1 5.4L12 16l-4.9 2.7 1.1-5.4-4-3.7 5.4-.6z\"/>`,\n heart: svg`<path d=\"M12 19.5s-7.5-4.6-7.5-10A4 4 0 0 1 12 7a4 4 0 0 1 7.5 2.5c0 5.4-7.5 10-7.5 10z\"/>`,\n shield: svg`<path d=\"M12 3.5l7 2.5v5.5c0 4.5-3 7.8-7 9-4-1.2-7-4.5-7-9V6z\"/><path d=\"M9 12l2 2 4-4\"/>`,\n leaf: svg`<path d=\"M5 19c0-8 5-13 14-14 0 9-5 14-13 14z\"/><path d=\"M5 19l7-7\"/>`,\n sun: svg`<circle cx=\"12\" cy=\"12\" r=\"3.5\"/><path d=\"M12 3v2M12 19v2M3 12h2M19 12h2M5.6 5.6L7 7M17 17l1.4 1.4M5.6 18.4L7 17M17 7l1.4-1.4\"/>`,\n bolt: svg`<path d=\"M13 3L5 13.5h6L10 21l8-10.5h-6z\"/>`,\n key: svg`<circle cx=\"8\" cy=\"15\" r=\"3.5\"/><path d=\"M10.5 12.5L19 4M16 7l2.5 2.5M14 9l2 2\"/>`,\n info: svg`<circle cx=\"12\" cy=\"12\" r=\"8.5\"/><path d=\"M12 11v5.5M12 7.5v.5\"/>`,\n warning: svg`<path d=\"M12 4l9 15.5H3z\"/><path d=\"M12 10v4M12 16.5v.5\"/>`,\n document: svg`<path d=\"M6 3.5h8l4 4V20a.5.5 0 0 1-.5.5h-11A.5.5 0 0 1 6 20z\"/><path d=\"M14 3.5V8h4M9 13h6M9 16.5h6\"/>`,\n pound: svg`<path d=\"M16 6.5a3.5 3.5 0 0 0-6.5 1.8V20M7 13h7M7 20h10\"/>`,\n chat: svg`<path d=\"M4.5 5.5h15v10h-9l-4 3.5v-3.5h-2z\"/>`,\n /** Product navigation and actions, drawn to Lucide's shapes so they sit beside its line weight. */\n grid: svg`<rect x=\"3\" y=\"3\" width=\"7\" height=\"7\" rx=\"1\"/><rect x=\"14\" y=\"3\" width=\"7\" height=\"7\" rx=\"1\"/><rect x=\"14\" y=\"14\" width=\"7\" height=\"7\" rx=\"1\"/><rect x=\"3\" y=\"14\" width=\"7\" height=\"7\" rx=\"1\"/>`,\n clipboard: svg`<rect x=\"8\" y=\"2\" width=\"8\" height=\"4\" rx=\"1\"/><path d=\"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2M12 11h4M12 16h4M8 11h.01M8 16h.01\"/>`,\n 'map-pinned': svg`<path d=\"M18 8c0 3.6-3.9 7.4-5.4 8.8a1 1 0 0 1-1.2 0C9.9 15.4 6 11.6 6 8a6 6 0 0 1 12 0\"/><circle cx=\"12\" cy=\"8\" r=\"2\"/><path d=\"M8.7 14H5a1 1 0 0 0-.9.7l-2 6A1 1 0 0 0 3 22h18a1 1 0 0 0 .9-1.3l-2-6a1 1 0 0 0-.9-.7h-3.7\"/>`,\n users: svg`<path d=\"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2\"/><circle cx=\"9\" cy=\"7\" r=\"4\"/><path d=\"M22 21v-2a4 4 0 0 0-3-3.9M16 3.1a4 4 0 0 1 0 7.8\"/>`,\n radio: svg`<path d=\"M4.9 19.1C1 15.2 1 8.8 4.9 4.9M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5M19.1 4.9C23 8.8 23 15.1 19.1 19\"/><circle cx=\"12\" cy=\"12\" r=\"2\"/>`,\n settings: svg`<path d=\"M12.2 2h-.4a2 2 0 0 0-2 2v.2a2 2 0 0 1-1 1.7l-.4.3a2 2 0 0 1-2 0l-.2-.1a2 2 0 0 0-2.7.7l-.2.4a2 2 0 0 0 .7 2.7l.2.1a2 2 0 0 1 1 1.7v.5a2 2 0 0 1-1 1.8l-.2.1a2 2 0 0 0-.7 2.7l.2.4a2 2 0 0 0 2.7.7l.2-.1a2 2 0 0 1 2 0l.4.3a2 2 0 0 1 1 1.7v.2a2 2 0 0 0 2 2h.4a2 2 0 0 0 2-2v-.2a2 2 0 0 1 1-1.7l.4-.3a2 2 0 0 1 2 0l.2.1a2 2 0 0 0 2.7-.7l.2-.4a2 2 0 0 0-.7-2.7l-.2-.1a2 2 0 0 1-1-1.8v-.5a2 2 0 0 1 1-1.7l.2-.1a2 2 0 0 0 .7-2.7l-.2-.4a2 2 0 0 0-2.7-.7l-.2.1a2 2 0 0 1-2 0l-.4-.3a2 2 0 0 1-1-1.7V4a2 2 0 0 0-2-2z\"/><circle cx=\"12\" cy=\"12\" r=\"3\"/>`,\n 'log-out': svg`<path d=\"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9\"/>`,\n 'arrow-up-right': svg`<path d=\"M7 7h10v10M7 17L17 7\"/>`,\n more: svg`<circle cx=\"5\" cy=\"12\" r=\"1\"/><circle cx=\"12\" cy=\"12\" r=\"1\"/><circle cx=\"19\" cy=\"12\" r=\"1\"/>`,\n upload: svg`<path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12\"/>`,\n image: svg`<rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\"/><circle cx=\"9\" cy=\"9\" r=\"2\"/><path d=\"M21 15l-3.1-3.1a2 2 0 0 0-2.8 0L6 21\"/>`,\n lock: svg`<rect x=\"3\" y=\"11\" width=\"18\" height=\"11\" rx=\"2\"/><path d=\"M7 11V7a5 5 0 0 1 10 0v4\"/>`,\n eye: svg`<path d=\"M2.1 12.3a1 1 0 0 1 0-.7 10.8 10.8 0 0 1 19.8 0 1 1 0 0 1 0 .7 10.8 10.8 0 0 1-19.8 0\"/><circle cx=\"12\" cy=\"12\" r=\"3\"/>`,\n trash: svg`<path d=\"M3 6h18M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2M10 11v6M14 11v6\"/>`,\n pencil: svg`<path d=\"M21.2 6.8a1 1 0 0 0-4-4L3.8 16.2a2 2 0 0 0-.5.8L2 21.4a.5.5 0 0 0 .6.6l4.4-1.3a2 2 0 0 0 .8-.5zM15 5l4 4\"/>`,\n 'qr-code': svg`<rect x=\"3\" y=\"3\" width=\"5\" height=\"5\" rx=\"1\"/><rect x=\"16\" y=\"3\" width=\"5\" height=\"5\" rx=\"1\"/><rect x=\"3\" y=\"16\" width=\"5\" height=\"5\" rx=\"1\"/><path d=\"M21 16h-3a2 2 0 0 0-2 2v3M21 21v.01M12 7v3a2 2 0 0 1-2 2H7M3 12h.01M12 3h.01M12 16v.01M16 12h1M21 12v.01M12 21v-1\"/>`,\n battery: svg`<rect x=\"2\" y=\"7\" width=\"16\" height=\"10\" rx=\"2\"/><path d=\"M22 11v2M6 11v2M10 11v2\"/>`,\n} as const satisfies Record<string, SVGTemplateResult>;\n\nexport type IconName = keyof typeof ICONS;\nexport const ICON_NAMES = Object.keys(ICONS) as IconName[];\n\n/** An icon as markup, for components that draw one beside their own words. Always decorative. */\nexport function iconSvg(name: string | undefined, size = '1.25em'): TemplateResult | typeof nothing {\n const shape = name ? ICONS[name as IconName] : undefined;\n if (!shape) return nothing;\n return html`<svg class=\"icon\" viewBox=\"0 0 24 24\" width=${size} height=${size} fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">${shape}</svg>`;\n}\n\n/**\n * A small picture that stands for something: a phone beside a number, a tick\n * beside a benefit.\n *\n * **An icon is decorative unless it is labelled.** With no `label` it is\n * hidden from screen readers, because the words beside it already say what it\n * means. Give it a label only when it stands alone and carries meaning (1.1.1).\n *\n * @category media\n * @icon star\n */\nexport class ImpaktIcon extends ImpaktElement {\n static properties = {\n name: { type: String, reflect: true },\n label: { type: String },\n size: { type: String, reflect: true },\n tone: { type: String, reflect: true },\n };\n /** Which icon. */\n declare name: 'arrow-right' | 'arrow-left' | 'chevron-right' | 'chevron-down' | 'check' | 'close' | 'menu' | 'plus' | 'minus' | 'search' | 'external' | 'download' | 'home' | 'phone' | 'mail' | 'map-pin' | 'calendar' | 'clock' | 'user' | 'star' | 'heart' | 'shield' | 'leaf' | 'sun' | 'bolt' | 'key' | 'info' | 'warning' | 'document' | 'pound' | 'chat' | 'grid' | 'clipboard' | 'map-pinned' | 'users' | 'radio' | 'settings' | 'log-out' | 'arrow-up-right' | 'more' | 'upload' | 'image' | 'lock' | 'eye' | 'trash' | 'pencil' | 'qr-code' | 'battery';\n /** What the icon means, when it stands alone. Leave empty when words beside it say the same. */\n declare label: string;\n declare size: 'sm' | 'md' | 'lg' | 'xl';\n /** The icon's colour. */\n declare tone: 'inherit' | 'brand' | 'muted';\n\n constructor() {\n super();\n this.name = 'star';\n this.label = '';\n this.size = 'md';\n this.tone = 'inherit';\n }\n\n static styles = [...ImpaktElement.styles, css`\n :host { display: inline-flex; vertical-align: middle; line-height: 0; }\n :host([tone='brand']) { color: ${t.brand}; }\n :host([tone='muted']) { color: ${t.textMuted}; }\n @media (forced-colors: active) { :host { color: CanvasText; } }\n `];\n\n render(): TemplateResult {\n const size = { sm: '16px', md: '24px', lg: '32px', xl: '48px' }[this.size] ?? '24px';\n const drawn = iconSvg(this.name, size);\n return this.label ? html`<span role=\"img\" aria-label=${this.label}>${drawn}</span>` : html`${drawn}`;\n }\n}\n\ncustomElements.define('impakt-icon', ImpaktIcon);\ndeclare global { interface HTMLElementTagNameMap { 'impakt-icon': ImpaktIcon } }\n"],"mappings":";;;;;;AAAA,SAAS,KAAK,MAAM,SAAS,WAAwD;AAS9E,IAAM,QAAQ;AAAA,EACnB,eAAe;AAAA,EACf,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,OAAO;AAAA,EACP,OAAO;AAAA,EACP,MAAM;AAAA;AAAA,EAEN,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,UAAU;AAAA,EACV,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,WAAW;AAAA,EACX,UAAU;AAAA,EACV,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,KAAK;AAAA,EACL,MAAM;AAAA,EACN,KAAK;AAAA,EACL,MAAM;AAAA,EACN,SAAS;AAAA,EACT,UAAU;AAAA,EACV,OAAO;AAAA,EACP,MAAM;AAAA;AAAA,EAEN,MAAM;AAAA,EACN,WAAW;AAAA,EACX,cAAc;AAAA,EACd,OAAO;AAAA,EACP,OAAO;AAAA,EACP,UAAU;AAAA,EACV,WAAW;AAAA,EACX,kBAAkB;AAAA,EAClB,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,MAAM;AAAA,EACN,KAAK;AAAA,EACL,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,SAAS;AACX;AAGO,IAAM,aAAa,OAAO,KAAK,KAAK;AAGpC,SAAS,QAAQ,MAA0B,OAAO,UAA2C;AAClG,QAAM,QAAQ,OAAO,MAAM,IAAgB,IAAI;AAC/C,MAAI,CAAC,MAAO,QAAO;AACnB,SAAO,mDAAmD,IAAI,WAAW,IAAI,8IAA8I,KAAK;AAClO;AAaO,IAAM,aAAN,cAAyB,cAAc;AAAA,EAC5C;AAAA,SAAO,aAAa;AAAA,MAClB,MAAM,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MACpC,OAAO,EAAE,MAAM,OAAO;AAAA,MACtB,MAAM,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MACpC,MAAM,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,IACtC;AAAA;AAAA,EASA,cAAc;AACZ,UAAM;AACN,SAAK,OAAO;AACZ,SAAK,QAAQ;AACb,SAAK,OAAO;AACZ,SAAK,OAAO;AAAA,EACd;AAAA,EAEA;AAAA,SAAO,SAAS,CAAC,GAAG,cAAc,QAAQ;AAAA;AAAA,qCAEP,EAAE,KAAK;AAAA,qCACP,EAAE,SAAS;AAAA;AAAA,GAE7C;AAAA;AAAA,EAED,SAAyB;AACvB,UAAM,OAAO,EAAE,IAAI,QAAQ,IAAI,QAAQ,IAAI,QAAQ,IAAI,OAAO,EAAE,KAAK,IAAI,KAAK;AAC9E,UAAM,QAAQ,QAAQ,KAAK,MAAM,IAAI;AACrC,WAAO,KAAK,QAAQ,mCAAmC,KAAK,KAAK,IAAI,KAAK,YAAY,OAAO,KAAK;AAAA,EACpG;AACF;AAEA,eAAe,OAAO,eAAe,UAAU;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
iconSvg
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WS4AYRSL.js";
|
|
4
4
|
import {
|
|
5
5
|
ImpaktElement,
|
|
6
6
|
focusRing,
|
|
@@ -173,4 +173,4 @@ export {
|
|
|
173
173
|
ImpaktNav,
|
|
174
174
|
ImpaktBreadcrumbs
|
|
175
175
|
};
|
|
176
|
-
//# sourceMappingURL=chunk-
|
|
176
|
+
//# sourceMappingURL=chunk-XZQH2M5I.js.map
|
|
@@ -10,6 +10,10 @@ import { ImpaktElement } from '../base/ImpaktElement';
|
|
|
10
10
|
* slide is a decoration and stops for anyone who has asked for reduced motion.
|
|
11
11
|
* On a phone it fills the screen.
|
|
12
12
|
*
|
|
13
|
+
* With `side="bottom"` it is a sheet that rises from the bottom edge, as a
|
|
14
|
+
* phone's dialogs do: as wide as the screen, as tall as its content up to
|
|
15
|
+
* nine tenths of the screen, with its top corners rounded.
|
|
16
|
+
*
|
|
13
17
|
* @category feedback
|
|
14
18
|
* @icon drawer
|
|
15
19
|
* @slot - The body of the panel.
|
|
@@ -36,7 +40,8 @@ export declare class ImpaktDrawer extends ImpaktElement {
|
|
|
36
40
|
};
|
|
37
41
|
open: boolean;
|
|
38
42
|
heading: string;
|
|
39
|
-
|
|
43
|
+
/** Which edge it comes in from. `bottom` is a sheet, for a phone. */
|
|
44
|
+
side: 'left' | 'right' | 'bottom';
|
|
40
45
|
closeLabel: string;
|
|
41
46
|
constructor();
|
|
42
47
|
static styles: import("lit").CSSResult[];
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
ImpaktSlotPicker,
|
|
9
9
|
ImpaktToast,
|
|
10
10
|
pageWindow
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-RZWRAJCD.js";
|
|
12
12
|
import "../chunk-3IGNZTJU.js";
|
|
13
13
|
import "../chunk-2YRTFWW2.js";
|
|
14
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-WS4AYRSL.js";
|
|
15
15
|
import "../chunk-5ZQVL3V2.js";
|
|
16
16
|
import "../chunk-YR6T73GY.js";
|
|
17
17
|
export {
|
|
@@ -23,9 +23,14 @@ export declare class ImpaktBadge extends ImpaktElement {
|
|
|
23
23
|
type: StringConstructor;
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
|
-
|
|
26
|
+
/**
|
|
27
|
+
* Its colour. `inverse` is the text colour as a fill, for a label that has to
|
|
28
|
+
* stand out on a photo or a light card. `solid` is the brand as a fill, for
|
|
29
|
+
* the one label on a screen that matters most.
|
|
30
|
+
*/
|
|
31
|
+
tone: 'neutral' | 'brand' | 'success' | 'warning' | 'danger' | 'info' | 'inverse' | 'solid';
|
|
27
32
|
/** An icon before the words. */
|
|
28
|
-
icon: 'none' | 'arrow-right' | 'arrow-left' | 'chevron-right' | 'chevron-down' | 'check' | 'close' | 'menu' | 'plus' | 'minus' | 'search' | 'external' | 'download' | 'home' | 'phone' | 'mail' | 'map-pin' | 'calendar' | 'clock' | 'user' | 'star' | 'heart' | 'shield' | 'leaf' | 'sun' | 'bolt' | 'key' | 'info' | 'warning' | 'document' | 'pound' | 'chat';
|
|
33
|
+
icon: 'none' | 'arrow-right' | 'arrow-left' | 'chevron-right' | 'chevron-down' | 'check' | 'close' | 'menu' | 'plus' | 'minus' | 'search' | 'external' | 'download' | 'home' | 'phone' | 'mail' | 'map-pin' | 'calendar' | 'clock' | 'user' | 'star' | 'heart' | 'shield' | 'leaf' | 'sun' | 'bolt' | 'key' | 'info' | 'warning' | 'document' | 'pound' | 'chat' | 'grid' | 'clipboard' | 'map-pinned' | 'users' | 'radio' | 'settings' | 'log-out' | 'arrow-up-right' | 'more' | 'upload' | 'image' | 'lock' | 'eye' | 'trash' | 'pencil' | 'qr-code' | 'battery';
|
|
29
34
|
constructor();
|
|
30
35
|
static styles: import("lit").CSSResult[];
|
|
31
36
|
render(): TemplateResult;
|
package/dist/components/badge.js
CHANGED
|
@@ -63,7 +63,13 @@ export interface TabItem {
|
|
|
63
63
|
id: string;
|
|
64
64
|
label: string;
|
|
65
65
|
/** The panel's words. A child with `slot` set to the tab's id is shown instead, for anything richer. */
|
|
66
|
-
body
|
|
66
|
+
body?: string;
|
|
67
|
+
/** A number shown on the tab, such as the open tasks behind it. */
|
|
68
|
+
count?: number;
|
|
69
|
+
/** The count in words for a screen reader, such as "2 overdue tasks". The number alone when empty. */
|
|
70
|
+
countLabel?: string;
|
|
71
|
+
/** Where the tab goes. When every tab has one, the tabs are links to pages, not panels. */
|
|
72
|
+
href?: string;
|
|
67
73
|
}
|
|
68
74
|
/**
|
|
69
75
|
* Panels of content behind a row of tabs, one shown at a time: the floor plans
|
|
@@ -83,10 +89,22 @@ export interface TabItem {
|
|
|
83
89
|
*
|
|
84
90
|
* A panel shows its item's `body`, or a child whose `slot` is the item's id.
|
|
85
91
|
*
|
|
92
|
+
* **Tabs that go to pages are links.** When every item has an `href`, such as
|
|
93
|
+
* a job's Overview, Money and Notes, each of which has its own address, the
|
|
94
|
+
* tabs are drawn the same but are a `nav` of links, the current one marked
|
|
95
|
+
* `aria-current="page"`, with no panels. A row of links is not the ARIA tabs
|
|
96
|
+
* pattern, and announcing it as one would promise arrow keys and panels that
|
|
97
|
+
* are not there. They send `impakt-navigate` like the side navigation, so an
|
|
98
|
+
* app can route without a reload.
|
|
99
|
+
*
|
|
100
|
+
* `look="pill"` draws the tabs as pills in a rounded bar, with the chosen one
|
|
101
|
+
* filled, as a product's workspace tabs are.
|
|
102
|
+
*
|
|
86
103
|
* @category content
|
|
87
104
|
* @icon tabs
|
|
88
105
|
* @slot - A child with `slot` set to a tab's id is that tab's panel.
|
|
89
106
|
* @fires {CustomEvent<{ value: string }>} impakt-change - When another tab is chosen.
|
|
107
|
+
* @fires {CustomEvent<{ href: string; id: string }>} impakt-navigate - When a tab that is a link is followed. Cancel it to route in the app.
|
|
90
108
|
*/
|
|
91
109
|
export declare class ImpaktTabs extends ImpaktElement {
|
|
92
110
|
static properties: {
|
|
@@ -105,6 +123,10 @@ export declare class ImpaktTabs extends ImpaktElement {
|
|
|
105
123
|
reflect: boolean;
|
|
106
124
|
attribute: string;
|
|
107
125
|
};
|
|
126
|
+
look: {
|
|
127
|
+
type: StringConstructor;
|
|
128
|
+
reflect: boolean;
|
|
129
|
+
};
|
|
108
130
|
};
|
|
109
131
|
items: TabItem[];
|
|
110
132
|
/** The id of the tab shown first. The first tab when it is empty. */
|
|
@@ -113,8 +135,12 @@ export declare class ImpaktTabs extends ImpaktElement {
|
|
|
113
135
|
label: string;
|
|
114
136
|
/** On a narrow screen, lay more than four tabs out in two rows rather than scroll them. */
|
|
115
137
|
twoRows: boolean;
|
|
138
|
+
/** `line` underlines the chosen tab; `pill` fills it, in a rounded bar. */
|
|
139
|
+
look: 'line' | 'pill';
|
|
116
140
|
constructor();
|
|
117
141
|
static styles: import("lit").CSSResult[];
|
|
142
|
+
private countOf;
|
|
143
|
+
private get linked();
|
|
118
144
|
private current;
|
|
119
145
|
private choose;
|
|
120
146
|
private onKey;
|
|
@@ -23,6 +23,12 @@ import { ImpaktElement } from '../base/ImpaktElement';
|
|
|
23
23
|
* `<a>` styled as a button, so it opens in a new tab, shows its address and is
|
|
24
24
|
* announced as a link, which is what it is.
|
|
25
25
|
*
|
|
26
|
+
* **An icon-only button still has a name.** With `icon` set and no words, the
|
|
27
|
+
* button shows the icon alone and `label` becomes its accessible name, so a
|
|
28
|
+
* screen reader says "Back" rather than "button". Without a `label` an
|
|
29
|
+
* icon-only button is not rendered as icon-only, because it would be nameless
|
|
30
|
+
* (4.1.2).
|
|
31
|
+
*
|
|
26
32
|
* @category action
|
|
27
33
|
* @icon button
|
|
28
34
|
* @slot - The button label.
|
|
@@ -79,10 +85,21 @@ export declare class ImpaktButton extends ImpaktElement {
|
|
|
79
85
|
href: {
|
|
80
86
|
type: StringConstructor;
|
|
81
87
|
};
|
|
88
|
+
icon: {
|
|
89
|
+
type: StringConstructor;
|
|
90
|
+
};
|
|
91
|
+
label: {
|
|
92
|
+
type: StringConstructor;
|
|
93
|
+
};
|
|
82
94
|
};
|
|
83
95
|
/** Leave it out on a phone, where a header has no room for it. */
|
|
84
96
|
hideOn: 'never' | 'phone';
|
|
85
|
-
|
|
97
|
+
/**
|
|
98
|
+
* How much the button asks for attention. `dark` is the strong second
|
|
99
|
+
* choice on a light page, `subtle` a quiet filled one, and `danger` an
|
|
100
|
+
* action that removes or cancels something.
|
|
101
|
+
*/
|
|
102
|
+
variant: 'primary' | 'secondary' | 'ghost' | 'dark' | 'subtle' | 'danger';
|
|
86
103
|
type: 'button' | 'submit' | 'reset';
|
|
87
104
|
disabled: boolean;
|
|
88
105
|
busy: boolean;
|
|
@@ -93,11 +110,15 @@ export declare class ImpaktButton extends ImpaktElement {
|
|
|
93
110
|
fullOnPhone: boolean;
|
|
94
111
|
size: 'sm' | 'md' | 'lg';
|
|
95
112
|
/** An icon before the words, such as phone or calendar. */
|
|
96
|
-
iconBefore: 'none' | 'arrow-right' | 'arrow-left' | 'chevron-right' | 'chevron-down' | 'check' | 'close' | 'menu' | 'plus' | 'minus' | 'search' | 'external' | 'download' | 'home' | 'phone' | 'mail' | 'map-pin' | 'calendar' | 'clock' | 'user' | 'star' | 'heart' | 'shield' | 'leaf' | 'sun' | 'bolt' | 'key' | 'info' | 'warning' | 'document' | 'pound' | 'chat';
|
|
113
|
+
iconBefore: 'none' | 'arrow-right' | 'arrow-left' | 'chevron-right' | 'chevron-down' | 'check' | 'close' | 'menu' | 'plus' | 'minus' | 'search' | 'external' | 'download' | 'home' | 'phone' | 'mail' | 'map-pin' | 'calendar' | 'clock' | 'user' | 'star' | 'heart' | 'shield' | 'leaf' | 'sun' | 'bolt' | 'key' | 'info' | 'warning' | 'document' | 'pound' | 'chat' | 'grid' | 'clipboard' | 'map-pinned' | 'users' | 'radio' | 'settings' | 'log-out' | 'arrow-up-right' | 'more' | 'upload' | 'image' | 'lock' | 'eye' | 'trash' | 'pencil' | 'qr-code' | 'battery';
|
|
97
114
|
/** An icon after the words, such as arrow-right. */
|
|
98
|
-
iconAfter: 'none' | 'arrow-right' | 'arrow-left' | 'chevron-right' | 'chevron-down' | 'check' | 'close' | 'menu' | 'plus' | 'minus' | 'search' | 'external' | 'download' | 'home' | 'phone' | 'mail' | 'map-pin' | 'calendar' | 'clock' | 'user' | 'star' | 'heart' | 'shield' | 'leaf' | 'sun' | 'bolt' | 'key' | 'info' | 'warning' | 'document' | 'pound' | 'chat';
|
|
115
|
+
iconAfter: 'none' | 'arrow-right' | 'arrow-left' | 'chevron-right' | 'chevron-down' | 'check' | 'close' | 'menu' | 'plus' | 'minus' | 'search' | 'external' | 'download' | 'home' | 'phone' | 'mail' | 'map-pin' | 'calendar' | 'clock' | 'user' | 'star' | 'heart' | 'shield' | 'leaf' | 'sun' | 'bolt' | 'key' | 'info' | 'warning' | 'document' | 'pound' | 'chat' | 'grid' | 'clipboard' | 'map-pinned' | 'users' | 'radio' | 'settings' | 'log-out' | 'arrow-up-right' | 'more' | 'upload' | 'image' | 'lock' | 'eye' | 'trash' | 'pencil' | 'qr-code' | 'battery';
|
|
99
116
|
/** Where the button goes, when it opens a page rather than doing something here. */
|
|
100
117
|
href: string;
|
|
118
|
+
/** Draws the button as this icon alone, a round button. Needs `label`. */
|
|
119
|
+
icon: 'none' | 'arrow-right' | 'arrow-left' | 'chevron-right' | 'chevron-down' | 'check' | 'close' | 'menu' | 'plus' | 'minus' | 'search' | 'external' | 'download' | 'home' | 'phone' | 'mail' | 'map-pin' | 'calendar' | 'clock' | 'user' | 'star' | 'heart' | 'shield' | 'leaf' | 'sun' | 'bolt' | 'key' | 'info' | 'warning' | 'document' | 'pound' | 'chat' | 'grid' | 'clipboard' | 'map-pinned' | 'users' | 'radio' | 'settings' | 'log-out' | 'arrow-up-right' | 'more' | 'upload' | 'image' | 'lock' | 'eye' | 'trash' | 'pencil' | 'qr-code' | 'battery';
|
|
120
|
+
/** The accessible name of an icon-only button, such as "Back" or "More actions". */
|
|
121
|
+
label: string;
|
|
101
122
|
private internals;
|
|
102
123
|
constructor();
|
|
103
124
|
static styles: import("lit").CSSResult[];
|
|
@@ -39,6 +39,24 @@ export declare const ICONS: {
|
|
|
39
39
|
readonly document: TemplateResult<2>;
|
|
40
40
|
readonly pound: TemplateResult<2>;
|
|
41
41
|
readonly chat: TemplateResult<2>;
|
|
42
|
+
/** Product navigation and actions, drawn to Lucide's shapes so they sit beside its line weight. */
|
|
43
|
+
readonly grid: TemplateResult<2>;
|
|
44
|
+
readonly clipboard: TemplateResult<2>;
|
|
45
|
+
readonly 'map-pinned': TemplateResult<2>;
|
|
46
|
+
readonly users: TemplateResult<2>;
|
|
47
|
+
readonly radio: TemplateResult<2>;
|
|
48
|
+
readonly settings: TemplateResult<2>;
|
|
49
|
+
readonly 'log-out': TemplateResult<2>;
|
|
50
|
+
readonly 'arrow-up-right': TemplateResult<2>;
|
|
51
|
+
readonly more: TemplateResult<2>;
|
|
52
|
+
readonly upload: TemplateResult<2>;
|
|
53
|
+
readonly image: TemplateResult<2>;
|
|
54
|
+
readonly lock: TemplateResult<2>;
|
|
55
|
+
readonly eye: TemplateResult<2>;
|
|
56
|
+
readonly trash: TemplateResult<2>;
|
|
57
|
+
readonly pencil: TemplateResult<2>;
|
|
58
|
+
readonly 'qr-code': TemplateResult<2>;
|
|
59
|
+
readonly battery: TemplateResult<2>;
|
|
42
60
|
};
|
|
43
61
|
export type IconName = keyof typeof ICONS;
|
|
44
62
|
export declare const ICON_NAMES: IconName[];
|
|
@@ -74,7 +92,7 @@ export declare class ImpaktIcon extends ImpaktElement {
|
|
|
74
92
|
};
|
|
75
93
|
};
|
|
76
94
|
/** Which icon. */
|
|
77
|
-
name: 'arrow-right' | 'arrow-left' | 'chevron-right' | 'chevron-down' | 'check' | 'close' | 'menu' | 'plus' | 'minus' | 'search' | 'external' | 'download' | 'home' | 'phone' | 'mail' | 'map-pin' | 'calendar' | 'clock' | 'user' | 'star' | 'heart' | 'shield' | 'leaf' | 'sun' | 'bolt' | 'key' | 'info' | 'warning' | 'document' | 'pound' | 'chat';
|
|
95
|
+
name: 'arrow-right' | 'arrow-left' | 'chevron-right' | 'chevron-down' | 'check' | 'close' | 'menu' | 'plus' | 'minus' | 'search' | 'external' | 'download' | 'home' | 'phone' | 'mail' | 'map-pin' | 'calendar' | 'clock' | 'user' | 'star' | 'heart' | 'shield' | 'leaf' | 'sun' | 'bolt' | 'key' | 'info' | 'warning' | 'document' | 'pound' | 'chat' | 'grid' | 'clipboard' | 'map-pinned' | 'users' | 'radio' | 'settings' | 'log-out' | 'arrow-up-right' | 'more' | 'upload' | 'image' | 'lock' | 'eye' | 'trash' | 'pencil' | 'qr-code' | 'battery';
|
|
78
96
|
/** What the icon means, when it stands alone. Leave empty when words beside it say the same. */
|
|
79
97
|
label: string;
|
|
80
98
|
size: 'sm' | 'md' | 'lg' | 'xl';
|
package/dist/components/icon.js
CHANGED
|
@@ -45,7 +45,7 @@ export declare class ImpaktLink extends ImpaktElement {
|
|
|
45
45
|
/** In a sentence, or on its own line as a call to action, bolder and with an arrow. */
|
|
46
46
|
variant: 'inline' | 'standalone';
|
|
47
47
|
/** An icon after the words. A standalone link has an arrow unless it says otherwise. */
|
|
48
|
-
icon: 'none' | 'arrow-right' | 'arrow-left' | 'chevron-right' | 'chevron-down' | 'check' | 'close' | 'menu' | 'plus' | 'minus' | 'search' | 'external' | 'download' | 'home' | 'phone' | 'mail' | 'map-pin' | 'calendar' | 'clock' | 'user' | 'star' | 'heart' | 'shield' | 'leaf' | 'sun' | 'bolt' | 'key' | 'info' | 'warning' | 'document' | 'pound' | 'chat';
|
|
48
|
+
icon: 'none' | 'arrow-right' | 'arrow-left' | 'chevron-right' | 'chevron-down' | 'check' | 'close' | 'menu' | 'plus' | 'minus' | 'search' | 'external' | 'download' | 'home' | 'phone' | 'mail' | 'map-pin' | 'calendar' | 'clock' | 'user' | 'star' | 'heart' | 'shield' | 'leaf' | 'sun' | 'bolt' | 'key' | 'info' | 'warning' | 'document' | 'pound' | 'chat' | 'grid' | 'clipboard' | 'map-pinned' | 'users' | 'radio' | 'settings' | 'log-out' | 'arrow-up-right' | 'more' | 'upload' | 'image' | 'lock' | 'eye' | 'trash' | 'pencil' | 'qr-code' | 'battery';
|
|
49
49
|
constructor();
|
|
50
50
|
static styles: import("lit").CSSResult[];
|
|
51
51
|
render(): TemplateResult;
|
package/dist/components/link.js
CHANGED
|
@@ -34,11 +34,22 @@ export declare class ImpaktProgress extends ImpaktElement {
|
|
|
34
34
|
label: {
|
|
35
35
|
type: StringConstructor;
|
|
36
36
|
};
|
|
37
|
+
look: {
|
|
38
|
+
type: StringConstructor;
|
|
39
|
+
reflect: boolean;
|
|
40
|
+
};
|
|
37
41
|
};
|
|
38
42
|
steps: ProgressStep[];
|
|
39
43
|
/** The id of the step being shown. */
|
|
40
44
|
current: string;
|
|
41
45
|
label: string;
|
|
46
|
+
/**
|
|
47
|
+
* `steps` is the full indicator. `bars` is a compact one for a card: short
|
|
48
|
+
* rounded bars, the done steps in the text colour and the current one in the
|
|
49
|
+
* brand, with small names under them. The current step is also set in a
|
|
50
|
+
* heavier weight, so it does not rest on colour alone.
|
|
51
|
+
*/
|
|
52
|
+
look: 'steps' | 'bars';
|
|
42
53
|
constructor();
|
|
43
54
|
static styles: import("lit").CSSResult[];
|
|
44
55
|
render(): TemplateResult;
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { type TemplateResult } from 'lit';
|
|
2
|
+
import { ImpaktElement } from '../base/ImpaktElement';
|
|
3
|
+
/**
|
|
4
|
+
* A count with its name: "UK 4", "Active import jobs 12". A dashboard shows a
|
|
5
|
+
* row of them.
|
|
6
|
+
*
|
|
7
|
+
* **The name comes before the number in the reading order.** A screen reader
|
|
8
|
+
* says "UK, 4", which makes sense heard on its own; "4, UK" does not. With
|
|
9
|
+
* `href` the whole tile is one link, named by the label, the value and the
|
|
10
|
+
* caption together.
|
|
11
|
+
*
|
|
12
|
+
* @category content
|
|
13
|
+
* @icon badge
|
|
14
|
+
*/
|
|
15
|
+
export declare class ImpaktStatTile extends ImpaktElement {
|
|
16
|
+
static properties: {
|
|
17
|
+
label: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
};
|
|
20
|
+
value: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
};
|
|
23
|
+
caption: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
};
|
|
26
|
+
href: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
};
|
|
29
|
+
tone: {
|
|
30
|
+
type: StringConstructor;
|
|
31
|
+
reflect: boolean;
|
|
32
|
+
};
|
|
33
|
+
size: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
reflect: boolean;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
/** What is counted, such as "UK" or "Active import jobs". */
|
|
39
|
+
label: string;
|
|
40
|
+
/** The count or figure, such as "4". */
|
|
41
|
+
value: string;
|
|
42
|
+
/** A line under the figure, such as "3 arriving in the next two weeks". */
|
|
43
|
+
caption: string;
|
|
44
|
+
/** Where the tile goes when it is pressed, such as the list it counts. */
|
|
45
|
+
href: string;
|
|
46
|
+
/** `plain` is a quiet tile on a card; `brand` is the one figure a screen leads with. */
|
|
47
|
+
tone: 'plain' | 'brand';
|
|
48
|
+
/** `lg` sets the figure larger, for the lead figure. */
|
|
49
|
+
size: 'md' | 'lg';
|
|
50
|
+
constructor();
|
|
51
|
+
static styles: import("lit").CSSResult[];
|
|
52
|
+
render(): TemplateResult;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* A date as a small block of month and day: "DEC 2". It sits at the start of a
|
|
56
|
+
* row, beside what happens on that date.
|
|
57
|
+
*
|
|
58
|
+
* **The full date is what a screen reader hears.** The short month and day are
|
|
59
|
+
* hidden from it, and the date is read in full in the page's language, such as
|
|
60
|
+
* "2 December 2026", because "DEC 2" said aloud is ambiguous.
|
|
61
|
+
*
|
|
62
|
+
* @category content
|
|
63
|
+
* @icon calendar
|
|
64
|
+
*/
|
|
65
|
+
export declare class ImpaktDateTile extends ImpaktElement {
|
|
66
|
+
static properties: {
|
|
67
|
+
date: {
|
|
68
|
+
type: StringConstructor;
|
|
69
|
+
};
|
|
70
|
+
tone: {
|
|
71
|
+
type: StringConstructor;
|
|
72
|
+
reflect: boolean;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
/** The date, as YYYY-MM-DD. */
|
|
76
|
+
date: string;
|
|
77
|
+
/** `brand` is filled with the brand colour; `plain` is a quiet tile. */
|
|
78
|
+
tone: 'brand' | 'plain';
|
|
79
|
+
constructor();
|
|
80
|
+
static styles: import("lit").CSSResult[];
|
|
81
|
+
private parts;
|
|
82
|
+
render(): TemplateResult;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* One line in a list: a title, a line of detail under it, and room at the
|
|
86
|
+
* start and the end. It is the task with its tick, the job that needs
|
|
87
|
+
* attention, the delivery with its date, the setting with its arrow.
|
|
88
|
+
*
|
|
89
|
+
* **With `href` the whole row is one target, without nesting controls in a
|
|
90
|
+
* link.** The title is the link, and it is stretched over the row, so the row
|
|
91
|
+
* can be pressed anywhere. Anything in the `end` slot, such as a button, sits
|
|
92
|
+
* above the stretched link and stays its own control, because a button inside
|
|
93
|
+
* a link is two controls a screen reader cannot tell apart (4.1.2).
|
|
94
|
+
*
|
|
95
|
+
* A chevron is drawn at the end of a row that is a link, as the sign that it
|
|
96
|
+
* goes somewhere. Put rows in an element with `role="list"` and give each
|
|
97
|
+
* `role="listitem"` when they are a list, so a screen reader says how many
|
|
98
|
+
* there are.
|
|
99
|
+
*
|
|
100
|
+
* @category content
|
|
101
|
+
* @icon list
|
|
102
|
+
* @slot start - Before the title: a dot, a date tile, a checkbox.
|
|
103
|
+
* @slot end - After the title: a badge, a button.
|
|
104
|
+
*/
|
|
105
|
+
export declare class ImpaktRow extends ImpaktElement {
|
|
106
|
+
static properties: {
|
|
107
|
+
heading: {
|
|
108
|
+
type: StringConstructor;
|
|
109
|
+
};
|
|
110
|
+
meta: {
|
|
111
|
+
type: StringConstructor;
|
|
112
|
+
};
|
|
113
|
+
href: {
|
|
114
|
+
type: StringConstructor;
|
|
115
|
+
};
|
|
116
|
+
divided: {
|
|
117
|
+
type: BooleanConstructor;
|
|
118
|
+
reflect: boolean;
|
|
119
|
+
};
|
|
120
|
+
muted: {
|
|
121
|
+
type: BooleanConstructor;
|
|
122
|
+
reflect: boolean;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
/** The row's title. */
|
|
126
|
+
heading: string;
|
|
127
|
+
/** The line of detail under the title, such as "CY-2026-00421 · Due 20 Nov 2026". */
|
|
128
|
+
meta: string;
|
|
129
|
+
/** Where the row goes when it is pressed. */
|
|
130
|
+
href: string;
|
|
131
|
+
/** Draw a hairline above the row, for rows stacked on a card. */
|
|
132
|
+
divided: boolean;
|
|
133
|
+
/** Set the title quieter, for something finished, such as a done task. */
|
|
134
|
+
muted: boolean;
|
|
135
|
+
constructor();
|
|
136
|
+
static styles: import("lit").CSSResult[];
|
|
137
|
+
private filled;
|
|
138
|
+
private onSlot;
|
|
139
|
+
render(): TemplateResult;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* A pressable filter: "UK 4", "Completed 27". A row of them narrows a list.
|
|
143
|
+
*
|
|
144
|
+
* **It is a toggle button.** It carries `aria-pressed`, so a screen reader says
|
|
145
|
+
* whether the filter is on, and it is filled when it is on, so that does not
|
|
146
|
+
* rest on colour alone (1.4.1). When only one filter in a row can be on, the
|
|
147
|
+
* app turns the others off when it hears `impakt-change`.
|
|
148
|
+
*
|
|
149
|
+
* The count is read with the label. Set `count-label` when the number needs its
|
|
150
|
+
* noun to make sense aloud, such as "4 jobs".
|
|
151
|
+
*
|
|
152
|
+
* @category action
|
|
153
|
+
* @icon badge
|
|
154
|
+
* @fires {CustomEvent<{ pressed: boolean }>} impakt-change - When the filter is turned on or off.
|
|
155
|
+
*/
|
|
156
|
+
export declare class ImpaktFilterChip extends ImpaktElement {
|
|
157
|
+
static properties: {
|
|
158
|
+
label: {
|
|
159
|
+
type: StringConstructor;
|
|
160
|
+
};
|
|
161
|
+
count: {
|
|
162
|
+
type: NumberConstructor;
|
|
163
|
+
};
|
|
164
|
+
countLabel: {
|
|
165
|
+
type: StringConstructor;
|
|
166
|
+
attribute: string;
|
|
167
|
+
};
|
|
168
|
+
pressed: {
|
|
169
|
+
type: BooleanConstructor;
|
|
170
|
+
reflect: boolean;
|
|
171
|
+
};
|
|
172
|
+
disabled: {
|
|
173
|
+
type: BooleanConstructor;
|
|
174
|
+
reflect: boolean;
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
label: string;
|
|
178
|
+
/** How many things the filter would show. Left out when not set. */
|
|
179
|
+
count: number | undefined;
|
|
180
|
+
/** The count in words for a screen reader, such as "4 jobs". The number alone when empty. */
|
|
181
|
+
countLabel: string;
|
|
182
|
+
pressed: boolean;
|
|
183
|
+
disabled: boolean;
|
|
184
|
+
constructor();
|
|
185
|
+
static styles: import("lit").CSSResult[];
|
|
186
|
+
private toggle;
|
|
187
|
+
render(): TemplateResult;
|
|
188
|
+
}
|
|
189
|
+
declare global {
|
|
190
|
+
interface HTMLElementTagNameMap {
|
|
191
|
+
'impakt-stat-tile': ImpaktStatTile;
|
|
192
|
+
'impakt-date-tile': ImpaktDateTile;
|
|
193
|
+
'impakt-row': ImpaktRow;
|
|
194
|
+
'impakt-filter-chip': ImpaktFilterChip;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ImpaktDateTile,
|
|
3
|
+
ImpaktFilterChip,
|
|
4
|
+
ImpaktRow,
|
|
5
|
+
ImpaktStatTile
|
|
6
|
+
} from "../chunk-ON3QWAFV.js";
|
|
7
|
+
import "../chunk-3IGNZTJU.js";
|
|
8
|
+
import "../chunk-WS4AYRSL.js";
|
|
9
|
+
import "../chunk-YR6T73GY.js";
|
|
10
|
+
export {
|
|
11
|
+
ImpaktDateTile,
|
|
12
|
+
ImpaktFilterChip,
|
|
13
|
+
ImpaktRow,
|
|
14
|
+
ImpaktStatTile
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=rows.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|