@atomic-ui/ui 0.2.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/README.md +88 -105
  2. package/custom-elements.json +6370 -15469
  3. package/dist/base/FieldElement.d.ts +14 -3
  4. package/dist/base/{ImpktElement.d.ts → ImpaktElement.d.ts} +2 -2
  5. package/dist/base/scroll-lock.d.ts +2 -0
  6. package/dist/base/styles.d.ts +31 -5
  7. package/dist/base/tokens.d.ts +1 -1
  8. package/dist/base/tone.d.ts +20 -0
  9. package/dist/chunk-2YRTFWW2.js +26 -0
  10. package/dist/chunk-2YRTFWW2.js.map +1 -0
  11. package/dist/{chunk-7BSZPUE3.js → chunk-3EF4T242.js} +7 -7
  12. package/dist/chunk-3EF4T242.js.map +1 -0
  13. package/dist/{chunk-KFD4O7VA.js → chunk-5Y3HYRCU.js} +7 -7
  14. package/dist/chunk-5Y3HYRCU.js.map +1 -0
  15. package/dist/{chunk-7AJN2TIS.js → chunk-5ZQVL3V2.js} +29 -12
  16. package/dist/chunk-5ZQVL3V2.js.map +1 -0
  17. package/dist/{chunk-NCASAXQT.js → chunk-A7YBFS4H.js} +15 -15
  18. package/dist/chunk-A7YBFS4H.js.map +1 -0
  19. package/dist/{chunk-E2VBUWJ4.js → chunk-ACQ4KYPR.js} +9 -9
  20. package/dist/chunk-ACQ4KYPR.js.map +1 -0
  21. package/dist/{chunk-OMJMUFOW.js → chunk-DE3INTHZ.js} +6 -6
  22. package/dist/chunk-DE3INTHZ.js.map +1 -0
  23. package/dist/chunk-EJD6LT7E.js +161 -0
  24. package/dist/chunk-EJD6LT7E.js.map +1 -0
  25. package/dist/{chunk-XJXCTGDR.js → chunk-EJSX4WCD.js} +9 -9
  26. package/dist/chunk-EJSX4WCD.js.map +1 -0
  27. package/dist/chunk-FMSC7J7J.js +76 -0
  28. package/dist/chunk-FMSC7J7J.js.map +1 -0
  29. package/dist/{chunk-R67PDFKE.js → chunk-FWR6SEIA.js} +33 -33
  30. package/dist/chunk-FWR6SEIA.js.map +1 -0
  31. package/dist/{chunk-FFCIY7NM.js → chunk-GJPHQLLN.js} +8 -8
  32. package/dist/chunk-GJPHQLLN.js.map +1 -0
  33. package/dist/{chunk-OLLZFNO6.js → chunk-HNBG2POR.js} +7 -7
  34. package/dist/chunk-HNBG2POR.js.map +1 -0
  35. package/dist/{chunk-E3XJK7MY.js → chunk-HNZQ7LM4.js} +13 -11
  36. package/dist/chunk-HNZQ7LM4.js.map +1 -0
  37. package/dist/{chunk-3IQ73WNW.js → chunk-I54DOEZB.js} +9 -7
  38. package/dist/chunk-I54DOEZB.js.map +1 -0
  39. package/dist/{chunk-QB2KMV6S.js → chunk-PANH23MF.js} +12 -12
  40. package/dist/chunk-PANH23MF.js.map +1 -0
  41. package/dist/{chunk-UCHJCUYI.js → chunk-PYVUQNFQ.js} +39 -13
  42. package/dist/chunk-PYVUQNFQ.js.map +1 -0
  43. package/dist/{chunk-GQDUHZE3.js → chunk-Q54FX3SY.js} +8 -8
  44. package/dist/chunk-Q54FX3SY.js.map +1 -0
  45. package/dist/{chunk-WFKSOM6O.js → chunk-QBORJTS4.js} +68 -44
  46. package/dist/chunk-QBORJTS4.js.map +1 -0
  47. package/dist/{chunk-TGT7J4EG.js → chunk-RXX4CN5J.js} +7 -7
  48. package/dist/chunk-RXX4CN5J.js.map +1 -0
  49. package/dist/{chunk-XEJMFFIM.js → chunk-SV77SN6P.js} +8 -8
  50. package/dist/chunk-SV77SN6P.js.map +1 -0
  51. package/dist/chunk-TAZZLOUY.js +328 -0
  52. package/dist/chunk-TAZZLOUY.js.map +1 -0
  53. package/dist/{chunk-7OXTZJR4.js → chunk-TRZO5CHU.js} +7 -7
  54. package/dist/chunk-TRZO5CHU.js.map +1 -0
  55. package/dist/{chunk-EDSZI227.js → chunk-UPOTBKKK.js} +12 -9
  56. package/dist/chunk-UPOTBKKK.js.map +1 -0
  57. package/dist/{chunk-26O27BQS.js → chunk-WP5WJ4V5.js} +6 -6
  58. package/dist/chunk-WP5WJ4V5.js.map +1 -0
  59. package/dist/{chunk-YD6IZ2C5.js → chunk-WS5AUJ35.js} +7 -7
  60. package/dist/chunk-WS5AUJ35.js.map +1 -0
  61. package/dist/{chunk-HYPPG4NF.js → chunk-WWYYNR3Z.js} +93 -53
  62. package/dist/chunk-WWYYNR3Z.js.map +1 -0
  63. package/dist/{chunk-NKTMMJYD.js → chunk-XU2XODVH.js} +9 -8
  64. package/dist/chunk-XU2XODVH.js.map +1 -0
  65. package/dist/{chunk-D6C7XEY4.js → chunk-YR6T73GY.js} +24 -12
  66. package/dist/chunk-YR6T73GY.js.map +1 -0
  67. package/dist/{chunk-OB7WULFK.js → chunk-YYYQPKQ7.js} +24 -24
  68. package/dist/chunk-YYYQPKQ7.js.map +1 -0
  69. package/dist/{chunk-FJRHZA3C.js → chunk-Z45LY6BT.js} +9 -9
  70. package/dist/chunk-Z45LY6BT.js.map +1 -0
  71. package/dist/{chunk-6YYAOKNI.js → chunk-ZQBEFP2O.js} +7 -7
  72. package/dist/chunk-ZQBEFP2O.js.map +1 -0
  73. package/dist/chunk-ZS7RPXCT.js +47 -0
  74. package/dist/chunk-ZS7RPXCT.js.map +1 -0
  75. package/dist/components/accordion.d.ts +3 -3
  76. package/dist/components/accordion.js +4 -4
  77. package/dist/components/alert.d.ts +3 -3
  78. package/dist/components/alert.js +4 -4
  79. package/dist/components/app-ui.d.ts +47 -31
  80. package/dist/components/app-ui.js +21 -20
  81. package/dist/components/badge.d.ts +37 -0
  82. package/dist/components/badge.js +9 -0
  83. package/dist/components/blocks.d.ts +37 -74
  84. package/dist/components/blocks.js +10 -13
  85. package/dist/components/button.d.ts +3 -3
  86. package/dist/components/button.js +5 -5
  87. package/dist/components/checkbox-group.d.ts +2 -2
  88. package/dist/components/checkbox-group.js +5 -5
  89. package/dist/components/checkbox.d.ts +2 -2
  90. package/dist/components/checkbox.js +5 -5
  91. package/dist/components/chip.d.ts +58 -0
  92. package/dist/components/chip.js +8 -0
  93. package/dist/components/date-input.d.ts +2 -2
  94. package/dist/components/date-input.js +5 -5
  95. package/dist/components/dialog.d.ts +18 -3
  96. package/dist/components/dialog.js +5 -4
  97. package/dist/components/fieldset.d.ts +3 -3
  98. package/dist/components/fieldset.js +4 -4
  99. package/dist/components/grid.d.ts +3 -3
  100. package/dist/components/grid.js +4 -4
  101. package/dist/components/help.d.ts +3 -3
  102. package/dist/components/help.js +4 -4
  103. package/dist/components/icon.d.ts +3 -3
  104. package/dist/components/icon.js +4 -4
  105. package/dist/components/journey.d.ts +30 -16
  106. package/dist/components/journey.js +15 -15
  107. package/dist/components/layout.d.ts +9 -9
  108. package/dist/components/layout.js +10 -10
  109. package/dist/components/link.d.ts +3 -3
  110. package/dist/components/link.js +5 -5
  111. package/dist/components/list.d.ts +3 -3
  112. package/dist/components/list.js +4 -4
  113. package/dist/components/media.d.ts +8 -8
  114. package/dist/components/media.js +8 -8
  115. package/dist/components/navigation.d.ts +5 -5
  116. package/dist/components/navigation.js +7 -7
  117. package/dist/components/page.d.ts +5 -5
  118. package/dist/components/page.js +6 -6
  119. package/dist/components/price.d.ts +3 -3
  120. package/dist/components/price.js +4 -4
  121. package/dist/components/progress.d.ts +3 -3
  122. package/dist/components/progress.js +4 -4
  123. package/dist/components/radio-group.d.ts +2 -2
  124. package/dist/components/radio-group.js +5 -5
  125. package/dist/components/select.d.ts +2 -2
  126. package/dist/components/select.js +5 -5
  127. package/dist/components/summary-list.d.ts +3 -3
  128. package/dist/components/summary-list.js +4 -4
  129. package/dist/components/table.d.ts +97 -5
  130. package/dist/components/table.js +6 -4
  131. package/dist/components/text-input.d.ts +2 -2
  132. package/dist/components/text-input.js +5 -5
  133. package/dist/components/textarea.d.ts +2 -2
  134. package/dist/components/textarea.js +5 -5
  135. package/dist/index.d.ts +47 -40
  136. package/dist/index.js +206 -269
  137. package/dist/standalone/atomic-ui.js +1928 -0
  138. package/dist/standalone/atomic-ui.js.map +7 -0
  139. package/dist/standalone/index.html +173 -0
  140. package/package.json +19 -7
  141. package/scripts/copy-to-product.mjs +52 -0
  142. package/specimen/index.html +173 -0
  143. package/dist/chunk-26O27BQS.js.map +0 -1
  144. package/dist/chunk-2CFVV2NZ.js +0 -494
  145. package/dist/chunk-2CFVV2NZ.js.map +0 -1
  146. package/dist/chunk-3IQ73WNW.js.map +0 -1
  147. package/dist/chunk-4X723QBD.js +0 -361
  148. package/dist/chunk-4X723QBD.js.map +0 -1
  149. package/dist/chunk-6YYAOKNI.js.map +0 -1
  150. package/dist/chunk-7AJN2TIS.js.map +0 -1
  151. package/dist/chunk-7BSZPUE3.js.map +0 -1
  152. package/dist/chunk-7OXTZJR4.js.map +0 -1
  153. package/dist/chunk-7XEPNEVQ.js +0 -264
  154. package/dist/chunk-7XEPNEVQ.js.map +0 -1
  155. package/dist/chunk-D6C7XEY4.js.map +0 -1
  156. package/dist/chunk-E2VBUWJ4.js.map +0 -1
  157. package/dist/chunk-E3XJK7MY.js.map +0 -1
  158. package/dist/chunk-EDSZI227.js.map +0 -1
  159. package/dist/chunk-FFCIY7NM.js.map +0 -1
  160. package/dist/chunk-FJRHZA3C.js.map +0 -1
  161. package/dist/chunk-GQDUHZE3.js.map +0 -1
  162. package/dist/chunk-HYPPG4NF.js.map +0 -1
  163. package/dist/chunk-J4JULXUG.js +0 -249
  164. package/dist/chunk-J4JULXUG.js.map +0 -1
  165. package/dist/chunk-KFD4O7VA.js.map +0 -1
  166. package/dist/chunk-MVEFM5QI.js +0 -195
  167. package/dist/chunk-MVEFM5QI.js.map +0 -1
  168. package/dist/chunk-NCASAXQT.js.map +0 -1
  169. package/dist/chunk-NKTMMJYD.js.map +0 -1
  170. package/dist/chunk-OB7WULFK.js.map +0 -1
  171. package/dist/chunk-OHDPGIJ3.js +0 -428
  172. package/dist/chunk-OHDPGIJ3.js.map +0 -1
  173. package/dist/chunk-OLLZFNO6.js.map +0 -1
  174. package/dist/chunk-OMJMUFOW.js.map +0 -1
  175. package/dist/chunk-QB2KMV6S.js.map +0 -1
  176. package/dist/chunk-R67PDFKE.js.map +0 -1
  177. package/dist/chunk-RZSZQMSE.js +0 -236
  178. package/dist/chunk-RZSZQMSE.js.map +0 -1
  179. package/dist/chunk-TGT7J4EG.js.map +0 -1
  180. package/dist/chunk-UCHJCUYI.js.map +0 -1
  181. package/dist/chunk-UHLRXI6J.js +0 -453
  182. package/dist/chunk-UHLRXI6J.js.map +0 -1
  183. package/dist/chunk-UNVL3CNM.js +0 -725
  184. package/dist/chunk-UNVL3CNM.js.map +0 -1
  185. package/dist/chunk-WDDWWCHN.js +0 -104
  186. package/dist/chunk-WDDWWCHN.js.map +0 -1
  187. package/dist/chunk-WFKSOM6O.js.map +0 -1
  188. package/dist/chunk-XEJMFFIM.js.map +0 -1
  189. package/dist/chunk-XJXCTGDR.js.map +0 -1
  190. package/dist/chunk-YD6IZ2C5.js.map +0 -1
  191. package/dist/chunk-YK5QI57J.js +0 -396
  192. package/dist/chunk-YK5QI57J.js.map +0 -1
  193. package/dist/components/changelog.d.ts +0 -386
  194. package/dist/components/changelog.js +0 -25
  195. package/dist/components/estimator.d.ts +0 -246
  196. package/dist/components/estimator.js +0 -16
  197. package/dist/components/marketing.d.ts +0 -370
  198. package/dist/components/marketing.js +0 -21
  199. package/dist/components/marketing.js.map +0 -1
  200. package/dist/components/organisms.d.ts +0 -559
  201. package/dist/components/organisms.js +0 -25
  202. package/dist/components/organisms.js.map +0 -1
  203. package/dist/components/property.d.ts +0 -389
  204. package/dist/components/property.js +0 -20
  205. package/dist/components/property.js.map +0 -1
  206. package/dist/components/scene.d.ts +0 -138
  207. package/dist/components/scene.js +0 -8
  208. package/dist/components/scene.js.map +0 -1
  209. package/dist/components/scrubber.d.ts +0 -86
  210. package/dist/components/scrubber.js +0 -8
  211. package/dist/components/scrubber.js.map +0 -1
  212. package/dist/components/selling.d.ts +0 -407
  213. package/dist/components/selling.js +0 -25
  214. package/dist/components/selling.js.map +0 -1
  215. package/dist/components/site.d.ts +0 -283
  216. package/dist/components/site.js +0 -20
  217. package/dist/components/site.js.map +0 -1
  218. /package/dist/components/{changelog.js.map → badge.js.map} +0 -0
  219. /package/dist/components/{estimator.js.map → chip.js.map} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/layout.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { ImpktElement } from '../base/ImpktElement';\nimport { visuallyHidden as hiddenStyle } from '../base/styles';\nimport { fontSize, fontWeight, lineHeight, space, spaceAround, t, type } from '../base/tokens';\n\n/**\n * Layout and typography primitives.\n *\n * These are the components a composition is mostly made of, and they are\n * deliberately dull. Their one job is that spacing, type and colour come from\n * tokens, so that a page built in the CMS cannot contain a hard-coded 13px.\n */\n\n/** Vertical rhythm. Every gap is a spacing token, never a number.\n *\n * @category layout\n * @icon stack\n * @slot - The things being stacked.\n */\nexport class ImpktStack extends ImpktElement {\n static properties = {\n gap: { type: String, reflect: true },\n align: { type: String, reflect: true },\n direction: { type: String, reflect: true },\n justify: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare gap: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n /** How the items line up across the stack. */\n declare align: 'stretch' | 'start' | 'center' | 'end';\n /** Down the page, or along a row that wraps when it runs out of room, such as a row of buttons. */\n declare direction: 'vertical' | 'horizontal';\n /** Where the items sit along a row. */\n declare justify: 'start' | 'center' | 'end' | 'between';\n /** Space before the stack, from the spacing scale. */\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n /** Space after the stack, from the spacing scale. */\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.gap = 'md';\n this.align = 'stretch';\n this.direction = 'vertical';\n this.justify = 'start';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpktElement.styles,\n spaceAround,\n css`\n :host {\n display: flex;\n flex-direction: column;\n }\n :host([gap='none']) { gap: 0; }\n :host([gap='xs']) { gap: ${space(1)}; }\n :host([align='start']) { align-items: flex-start; }\n :host([align='center']) { align-items: center; text-align: center; }\n :host([align='end']) { align-items: flex-end; }\n :host([direction='horizontal']) { flex-direction: row; flex-wrap: wrap; align-items: center; }\n :host([direction='horizontal'][align='start']) { align-items: flex-start; }\n :host([direction='horizontal'][align='end']) { align-items: flex-end; }\n :host([direction='horizontal'][align='center']) { text-align: start; }\n :host([justify='center']) { justify-content: center; }\n :host([justify='end']) { justify-content: flex-end; }\n :host([justify='between']) { justify-content: space-between; }\n :host([gap='sm']) { gap: ${space(2)}; }\n :host([gap='md']) { gap: ${space(4)}; }\n :host([gap='lg']) { gap: ${space(6)}; }\n :host([gap='xl']) { gap: ${space(8)}; }\n `,\n ];\n\n render(): TemplateResult {\n return html`<slot></slot>`;\n }\n}\n\n/** A surface. What text is read against, and what contrast is measured from.\n *\n * @category layout\n * @icon card\n * @slot - What sits on the card.\n */\nexport class ImpktCard extends ImpktElement {\n static properties = {\n tone: { type: String, reflect: true },\n padding: { type: String, reflect: true },\n imageSrc: { type: String, attribute: 'image-src' },\n imageAlt: { type: String, attribute: 'image-alt' },\n ratio: { type: String, reflect: true },\n badge: { type: String },\n raised: { type: Boolean, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n /** The card's surface. Text on a brand card takes the brand's text colour. */\n declare tone: 'default' | 'subtle' | 'brand' | 'outline' | 'plain';\n /** Space inside the card. */\n declare padding: 'none' | 'sm' | 'md' | 'lg';\n /** A picture across the top of the card. */\n declare imageSrc: string;\n /** What the picture shows. Leave empty only when it is decoration. */\n declare imageAlt: string;\n /** A short label on the picture, such as \"3 left\". */\n declare badge: string;\n /** The picture's shape. */\n declare ratio: '16:9' | '4:3' | '3:2' | '1:1';\n /** Lifted off the page with a soft shadow and no edge, as a form that floats beside its words is. */\n declare raised: boolean;\n /** Space before the card, from the spacing scale. */\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n /** Space after the card, from the spacing scale. */\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.tone = 'default';\n this.padding = 'lg';\n this.imageSrc = '';\n this.imageAlt = '';\n this.ratio = '16:9';\n this.badge = '';\n this.raised = false;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [\n ...ImpktElement.styles,\n spaceAround,\n css`\n :host {\n display: flex;\n flex-direction: column;\n background: ${t.surfaceCard};\n border: ${t.borderThin} solid ${t.hairline};\n border-radius: ${t.radiusXl};\n box-shadow: ${t.shadowSm};\n overflow: hidden;\n --ratio: 16 / 9;\n }\n :host([tone='subtle']) { background: ${t.surfaceSubtle}; border-color: transparent; box-shadow: none; }\n :host([tone='brand']) { background: ${t.brand}; border-color: transparent; color: ${t.onBrand}; --impkt-eyebrow: ${t.onBrand}; --impkt-color-surface-card: color-mix(in srgb, ${t.onBrand} 10%, transparent); --impkt-color-text-heading: ${t.onBrand}; --impkt-color-text-default: ${t.onBrand}; --impkt-color-text-muted: ${t.onBrand}; --impkt-color-text-link: ${t.onBrand}; }\n :host([tone='outline']) { background: transparent; box-shadow: none; border-color: ${t.rule}; }\n :host([raised]) { border-color: transparent; box-shadow: 0 24px 60px rgb(16 19 23 / 12%), 0 2px 6px rgb(16 19 23 / 6%); border-radius: ${t.radius2xl}; }\n :host([tone='plain']) { background: transparent; border-color: transparent; border-radius: 0; box-shadow: none; }\n :host([ratio='4:3']) { --ratio: 4 / 3; }\n :host([ratio='3:2']) { --ratio: 3 / 2; }\n :host([ratio='1:1']) { --ratio: 1 / 1; }\n .body { padding: ${space(6)}; flex: 1; display: flex; flex-direction: column; }\n :host([padding='none']) .body { padding: 0; }\n :host([padding='sm']) .body { padding: ${space(3)}; }\n :host([padding='md']) .body { padding: ${space(4)}; }\n :host([tone='plain']) .body { padding-inline: 0; }\n img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; }\n .picture { position: relative; }\n .tag { position: absolute; inset-block-start: ${space(4)}; inset-inline-start: ${space(4)}; padding: ${space(1.5)} ${space(3)}; font-size: ${fontSize('sm')}; color: ${t.text}; background: ${t.surfaceCard}; border-radius: 999px; }\n @media (forced-colors: active) { :host { border-color: CanvasText; } }\n `,\n ];\n\n render(): TemplateResult {\n return html`${this.imageSrc ? html`<div class=\"picture\"><img src=${this.imageSrc} alt=${this.imageAlt} part=\"image\" />${this.badge ? html`<span class=\"tag\">${this.badge}</span>` : nothing}</div>` : nothing}<div class=\"body\" part=\"body\"><slot></slot></div>`;\n }\n}\n\n/**\n * A heading.\n *\n * `level` is required and renders the matching `<h1>`–`<h6>`, because heading\n * level is document structure rather than appearance: a screen-reader user\n * navigates by it, and a page whose levels skip is a page they cannot skim.\n * Size is a separate property, so a visually small `<h2>` needs no lie about\n * its level — which is the usual reason levels end up wrong.\n\n *\n * @category typography\n * @icon heading\n * @role heading\n * @slot - The heading text.\n */\nexport class ImpktHeading extends ImpktElement {\n static properties = {\n level: { type: Number, reflect: true },\n size: { type: String, reflect: true },\n eyebrow: { type: String, reflect: true },\n align: { type: String, reflect: true },\n screenReaderOnly: { type: Boolean, reflect: true, attribute: 'screen-reader-only' },\n };\n\n declare level: 1 | 2 | 3 | 4 | 5 | 6;\n declare size: '5xl' | '4xl' | '3xl' | '2xl' | 'xl' | 'lg' | 'md' | 'sm';\n /** A short label above the heading, such as \"Why Larkfield\". Part of the heading, read before it. */\n declare eyebrow: string;\n declare align: 'start' | 'center';\n /**\n * Read by screen readers and search engines, but not drawn: for a heading\n * whose words are already in a picture, such as a hero drawn as artwork.\n * The page still has its heading; nobody sees it twice. An eyebrow still shows.\n */\n declare screenReaderOnly: boolean;\n\n constructor() {\n super();\n this.level = 2;\n this.size = 'xl';\n this.eyebrow = '';\n this.align = 'start';\n this.screenReaderOnly = false;\n }\n\n static styles = [\n ...ImpktElement.styles,\n css`\n :host {\n display: block;\n color: ${t.textHeading};\n font-family: ${t.fontHeading};\n font-weight: ${fontWeight('bold')};\n line-height: ${lineHeight('tight')};\n }\n :host([size='5xl']) { ${type('5xl')} letter-spacing: ${t.trackingTight}; }\n :host([size='4xl']) { ${type('4xl')} letter-spacing: ${t.trackingTight}; }\n :host([size='3xl']) { ${type('3xl')} letter-spacing: ${t.trackingTight}; }\n :host([size='2xl']) { ${type('2xl')} letter-spacing: ${t.trackingTight}; }\n :host([size='xl']) { ${type('xl')} }\n :host([size='lg']) { ${type('lg')} }\n :host([size='md']) { ${type('md')} }\n :host([size='sm']) { ${type('sm')} }\n .h { text-wrap: balance; }\n .h {\n margin: 0;\n font: inherit;\n color: inherit;\n }\n :host([align='center']) { text-align: center; }\n /* Only the words go: an eyebrow over a heading drawn as a picture still shows. */\n :host([screen-reader-only]) .words { ${hiddenStyle} }\n :host([screen-reader-only]:not([eyebrow])) { ${hiddenStyle} }\n .eyebrow {\n display: block;\n margin-block-end: ${space(2)};\n color: var(--impkt-eyebrow, var(--impkt-color-text-eyebrow, ${t.brand}));\n font-family: var(--impkt-font-family-eyebrow, ${t.fontBody});\n font-size: var(--impkt-font-size-eyebrow, ${fontSize('sm')});\n font-weight: var(--impkt-font-weight-eyebrow, ${fontWeight('semibold')});\n letter-spacing: 0.06em;\n text-transform: uppercase;\n }\n `,\n ];\n\n render(): TemplateResult {\n // A `role=\"heading\"` with `aria-level` rather than six branches of\n // template. The native element would be marginally better; this is the one\n // place where Lit's lack of a dynamic tag makes the explicit role the\n // honest trade, and the role is fully supported.\n return html`<div class=\"h\" role=\"heading\" aria-level=${this.level} part=\"heading\">\n ${this.eyebrow ? html`<span class=\"eyebrow\" part=\"eyebrow\">${this.eyebrow}<span style=\"position:absolute;inline-size:1px;block-size:1px;overflow:hidden;clip-path:inset(50%)\">: </span></span>` : nothing}<span class=\"words\"><slot></slot></span>\n </div>`;\n }\n}\n\n/** A paragraph.\n *\n * @category typography\n * @icon text\n * @slot - The paragraph text.\n */\nexport class ImpktText extends ImpktElement {\n static properties = {\n size: { type: String, reflect: true },\n tone: { type: String, reflect: true },\n align: { type: String, reflect: true },\n look: { type: String, reflect: true },\n };\n\n declare size: 'sm' | 'md' | 'lg' | 'xl';\n declare tone: 'default' | 'muted';\n declare align: 'start' | 'center';\n /** `code` sets the words in the brand's monospace face on a faint panel, for a line like \"base: main ← compare: you/idea\". */\n declare look: 'prose' | 'code';\n\n constructor() {\n super();\n this.size = 'md';\n this.tone = 'default';\n this.align = 'start';\n this.look = 'prose';\n }\n\n static styles = [\n ...ImpktElement.styles,\n css`\n :host {\n display: block;\n /* 1.4.8 asks for 1.5 within a paragraph, and it is the default here\n rather than an option, because body text is what it is about. */\n line-height: ${lineHeight('normal')};\n /* 1.4.12 Text Spacing: a user stylesheet must be able to widen this\n without clipping, which a max-width in ch units survives and a\n fixed pixel height does not. */\n max-inline-size: 70ch;\n }\n :host([size='sm']) { ${type('sm')} }\n :host([size='md']) { ${type('md')} }\n :host([size='lg']) { ${type('lg')} }\n :host([size='xl']) { ${type('xl')} }\n p { text-wrap: pretty; }\n :host([tone='muted']) { color: ${t.textMuted}; }\n :host([align='center']) { text-align: center; margin-inline: auto; }\n :host([look='code']) { font-family: ${t.fontMono}; ${type('sm')} padding: ${space(2)} ${space(3)}; border-radius: ${t.radius}; background: color-mix(in srgb, currentColor 6%, transparent); max-inline-size: none; }\n p {\n margin: 0;\n }\n `,\n ];\n\n render(): TemplateResult {\n return html`<p part=\"text\"><slot></slot></p>`;\n }\n}\n\ncustomElements.define('impkt-stack', ImpktStack);\ncustomElements.define('impkt-card', ImpktCard);\ncustomElements.define('impkt-heading', ImpktHeading);\ncustomElements.define('impkt-text', ImpktText);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impkt-stack': ImpktStack;\n 'impkt-card': ImpktCard;\n 'impkt-heading': ImpktHeading;\n 'impkt-text': ImpktText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,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,oBAAoB,EAAE,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,IAKhI;AAAA;AAAA,EAEA,SAAyB;AACvB,WAAO;AAAA,EACT;AACF;AAEA,eAAe,OAAO,eAAe,UAAU;AAC/C,eAAe,OAAO,cAAc,SAAS;AAC7C,eAAe,OAAO,iBAAiB,YAAY;AACnD,eAAe,OAAO,cAAc,SAAS;","names":[]}
@@ -1,428 +0,0 @@
1
- import {
2
- pageLocale
3
- } from "./chunk-3IGNZTJU.js";
4
- import {
5
- iconSvg
6
- } from "./chunk-KFD4O7VA.js";
7
- import {
8
- ImpktElement,
9
- focusRing,
10
- fontWeight,
11
- say,
12
- space,
13
- spaceAround,
14
- t,
15
- targetSize,
16
- type
17
- } from "./chunk-D6C7XEY4.js";
18
-
19
- // packages/ui/src/components/property.ts
20
- import { css, html, nothing } from "lit";
21
- var ImpktSitePlan = class extends ImpktElement {
22
- static {
23
- this.properties = {
24
- imageSrc: { type: String, attribute: "image-src" },
25
- imageAlt: { type: String, attribute: "image-alt" },
26
- plots: { type: Array },
27
- hint: { type: String },
28
- selectedPlot: { type: String, attribute: "selected-plot" },
29
- panel: { type: String, reflect: true },
30
- plotWord: { type: String, attribute: "plot-word" },
31
- actionText: { type: String, attribute: "action-text" },
32
- availableText: { type: String, attribute: "available-text" },
33
- reservedText: { type: String, attribute: "reserved-text" },
34
- soldText: { type: String, attribute: "sold-text" },
35
- spaceAbove: { type: String, reflect: true, attribute: "space-above" },
36
- spaceBelow: { type: String, reflect: true, attribute: "space-below" }
37
- };
38
- }
39
- constructor() {
40
- super();
41
- this.imageSrc = "";
42
- this.imageAlt = "";
43
- this.plots = [];
44
- this.hint = "Choose a plot to see its price and availability.";
45
- this.selectedPlot = "";
46
- this.panel = "beside";
47
- this.plotWord = "Plot";
48
- this.actionText = "View this home";
49
- this.availableText = "Available";
50
- this.reservedText = "Reserved";
51
- this.soldText = "Sold";
52
- this.spaceAbove = "none";
53
- this.spaceBelow = "none";
54
- }
55
- static {
56
- this.styles = [...ImpktElement.styles, focusRing, spaceAround, css`
57
- :host { display: block; container-type: inline-size; }
58
- .wrap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: ${space(6)}; align-items: start; }
59
- .plan { position: relative; overflow: hidden; border-radius: ${t.radius2xl}; background: ${t.surfaceSubtle}; box-shadow: ${t.shadowMd}; line-height: 0; }
60
- .plan img { inline-size: 100%; block-size: auto; }
61
- .pin { position: absolute; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; inline-size: 34px; block-size: 34px; margin: -17px 0 0 -17px; padding: 0; font: inherit; ${type("xs")} line-height: 1; font-weight: ${fontWeight("bold")}; color: ${t.onBrand}; background: ${t.brand}; border: 2px solid ${t.surfaceCard}; border-radius: 50%; box-shadow: ${t.shadowMd}; cursor: pointer; transition: transform 120ms ease-in-out; }
62
- .pin:hover { transform: scale(1.12); }
63
- .pin.reserved { color: ${t.text}; background: ${t.warningSubtle}; border-color: ${t.warning}; border-style: dashed; }
64
- .pin.sold { color: ${t.textMuted}; background: ${t.surfaceCard}; border-color: ${t.border}; border-radius: ${t.radius}; }
65
- .pin[aria-pressed='true'] { transform: scale(1.22); box-shadow: ${t.shadowLg}, 0 0 0 3px ${t.brand}; }
66
- .panel { display: flex; flex-direction: column; gap: ${space(3)}; padding: ${space(6)}; background: ${t.surfaceCard}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowSm}, 0 0 0 1px color-mix(in srgb, ${t.text} 6%, transparent); }
67
- .hint { margin: 0; color: ${t.textMuted}; }
68
- .name { margin: 0; font-family: ${t.fontHeading}; ${type("2xl")} font-weight: ${fontWeight("bold")}; color: ${t.textHeading}; }
69
- .sub { margin: 0; color: ${t.textMuted}; }
70
- .price { margin: 0; ${type("xl")} font-weight: ${fontWeight("semibold")}; }
71
- .status { align-self: flex-start; padding: ${space(0.5)} ${space(2.5)}; ${type("xs")} font-weight: ${fontWeight("semibold")}; color: ${t.successText}; background: ${t.successSubtle}; border-radius: 999px; }
72
- .status.reserved { color: ${t.warningText}; background: ${t.warningSubtle}; }
73
- .status.sold { color: ${t.textMuted}; background: ${t.surfaceSubtle}; }
74
- .go { ${targetSize} display: inline-flex; align-items: center; justify-content: center; gap: ${space(2)}; padding: ${space(2)} ${space(4)}; ${type("sm")} font-weight: ${fontWeight("semibold")}; color: ${t.onBrand}; text-decoration: none; background: ${t.brand}; border-radius: ${t.radiusLg}; }
75
- .go:hover { background: ${t.brandHover}; }
76
- .legend { display: flex; flex-wrap: wrap; gap: ${space(4)}; margin: ${space(3)} 0 0; padding: 0; list-style: none; ${type("sm")} color: ${t.textMuted}; }
77
- .legend li { display: inline-flex; align-items: center; gap: ${space(2)}; }
78
- .key { box-sizing: border-box; inline-size: 14px; block-size: 14px; background: ${t.brand}; border: 2px solid ${t.surfaceCard}; border-radius: 50%; outline: 1px solid color-mix(in srgb, currentColor 55%, transparent); }
79
- .key.reserved { background: ${t.warningSubtle}; border: 2px dashed ${t.warning}; }
80
- .key.sold { background: ${t.surfaceCard}; border: 2px solid ${t.border}; border-radius: 3px; }
81
- :host { --plan-card: var(--impkt-solid-card, ${t.surfaceCard}); --plan-text: var(--impkt-solid-text, ${t.text}); --plan-heading: var(--impkt-solid-heading, ${t.text}); --plan-muted: var(--impkt-solid-muted, ${t.textMuted}); }
82
- :host([panel='over']) .panel { background: var(--plan-card); color: var(--plan-text); --impkt-color-surface-card: var(--plan-card); --impkt-color-text-default: var(--plan-text); --impkt-color-text-heading: var(--plan-heading); --impkt-color-text-muted: var(--plan-muted); }
83
- @container (min-width: 44.01rem) { :host([panel='over']) .wrap { position: relative; grid-template-columns: minmax(0, 1fr); } :host([panel='over']) .panel { position: absolute; inset-block-start: 32%; inset-inline-end: ${space(8)}; inline-size: 22.5rem; box-sizing: border-box; box-shadow: ${t.shadowXl}; } }
84
- @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } }
85
- `];
86
- }
87
- willUpdate(changed) {
88
- if ((changed.has("selectedPlot") || changed.has("plots")) && this.selectedPlot && !this.chosen) this.chosen = this.plots.find((p) => String(p.number) === this.selectedPlot);
89
- }
90
- word(status) {
91
- return status === "sold" ? this.soldText : status === "reserved" ? this.reservedText : this.availableText;
92
- }
93
- choose(plot) {
94
- this.chosen = plot;
95
- this.requestUpdate();
96
- this.dispatchEvent(new CustomEvent("impkt-select", { detail: { plot }, bubbles: true, composed: true }));
97
- }
98
- renderPanel() {
99
- const plot = this.chosen;
100
- if (!plot) return html`<p class="hint">${this.hint}</p>`;
101
- const status = plot.status ?? "available";
102
- return html`<span class="status ${status}">${this.word(status)}</span>
103
- <p class="name">${this.plotWord} ${plot.number}</p>
104
- ${plot.name || plot.beds ? html`<p class="sub">${[plot.name, plot.beds].filter(Boolean).join(" \xB7 ")}</p>` : nothing}
105
- ${plot.price ? html`<p class="price">${plot.price}</p>` : nothing}
106
- ${plot.href && status !== "sold" ? html`<a class="go" href=${plot.href}>${this.actionText}${iconSvg("arrow-right", "16px")}</a>` : nothing}`;
107
- }
108
- render() {
109
- return html`<div class="wrap" part="wrap">
110
- <div>
111
- <div class="plan" part="plan">
112
- <img src=${this.imageSrc} alt=${this.imageAlt} />
113
- ${this.plots.map((plot) => {
114
- const status = plot.status ?? "available";
115
- const name = [`${this.plotWord} ${plot.number}`, plot.name, this.word(status), plot.price].filter(Boolean).join(", ");
116
- return html`<button class="pin ${status}" type="button" style="left:${Number(plot.x)}%;top:${Number(plot.y)}%" aria-label=${name} aria-pressed=${String(this.chosen === plot)} @click=${() => this.choose(plot)}>${plot.number}</button>`;
117
- })}
118
- </div>
119
- <ul class="legend">
120
- <li><span class="key"></span>${this.availableText}</li>
121
- <li><span class="key reserved"></span>${this.reservedText}</li>
122
- <li><span class="key sold"></span>${this.soldText}</li>
123
- </ul>
124
- </div>
125
- <div class="panel" part="panel" aria-live="polite">${this.renderPanel()}</div>
126
- </div>`;
127
- }
128
- };
129
- function monthlyPayment(loan, annualRate, years) {
130
- const months = years * 12;
131
- if (loan <= 0 || months <= 0) return 0;
132
- const rate = annualRate / 100 / 12;
133
- return rate === 0 ? loan / months : loan * rate / (1 - (1 + rate) ** -months);
134
- }
135
- var ImpktMortgageCalculator = class extends ImpktElement {
136
- static {
137
- this.properties = {
138
- heading: { type: String },
139
- price: { type: Number },
140
- depositPercent: { type: Number, attribute: "deposit-percent" },
141
- rate: { type: Number },
142
- years: { type: Number },
143
- currency: { type: String },
144
- smallPrint: { type: String, attribute: "small-print" },
145
- headingLevel: { type: Number, attribute: "heading-level" },
146
- spaceAbove: { type: String, reflect: true, attribute: "space-above" },
147
- spaceBelow: { type: String, reflect: true, attribute: "space-below" }
148
- };
149
- }
150
- constructor() {
151
- super();
152
- this.heading = "What would it cost each month?";
153
- this.price = 385e3;
154
- this.depositPercent = 10;
155
- this.rate = 4.5;
156
- this.years = 30;
157
- this.currency = "GBP";
158
- this.smallPrint = "This is an estimate, not a mortgage offer. Your home may be repossessed if you do not keep up repayments on your mortgage.";
159
- this.headingLevel = 2;
160
- this.spaceAbove = "none";
161
- this.spaceBelow = "none";
162
- }
163
- static {
164
- this.styles = [...ImpktElement.styles, focusRing, spaceAround, css`
165
- :host { display: block; container-type: inline-size; }
166
- .wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); overflow: hidden; background: ${t.surfaceCard}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowMd}, 0 0 0 1px color-mix(in srgb, ${t.text} 6%, transparent); }
167
- .inputs { display: flex; flex-direction: column; gap: ${space(5)}; padding: ${space(8)}; }
168
- .h { margin: 0; font-family: ${t.fontHeading}; ${type("2xl")} font-weight: ${fontWeight("bold")}; color: ${t.textHeading}; }
169
- label { display: flex; justify-content: space-between; gap: ${space(3)}; ${type("sm")} font-weight: ${fontWeight("semibold")}; margin-block-end: ${space(1.5)}; }
170
- .read { font-weight: ${fontWeight("regular")}; color: ${t.textMuted}; }
171
- input[type='number'] { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${space(2)} ${space(3)}; font: inherit; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; }
172
- input[type='range'] { inline-size: 100%; min-block-size: 24px; margin: 0; accent-color: ${t.brand}; }
173
- .two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(4)}; }
174
- .result { display: flex; flex-direction: column; justify-content: center; gap: ${space(2)}; padding: ${space(8)}; color: ${t.onBrand}; background: ${t.brand}; }
175
- .caption { margin: 0; ${type("sm")} opacity: 0.85; }
176
- output { display: block; font-family: ${t.fontHeading}; ${type("4xl")} font-weight: ${fontWeight("bold")}; }
177
- dl { display: grid; gap: ${space(2)}; margin: ${space(4)} 0 0; padding-block-start: ${space(4)}; border-block-start: 1px solid color-mix(in srgb, ${t.onBrand} 25%, transparent); ${type("sm")} }
178
- dl div { display: flex; justify-content: space-between; gap: ${space(3)}; }
179
- dt { opacity: 0.85; }
180
- dd { margin: 0; font-weight: ${fontWeight("semibold")}; }
181
- .small { grid-column: 1 / -1; margin: 0; padding: ${space(4)} ${space(8)}; ${type("xs")} color: ${t.textMuted}; background: ${t.surfaceSubtle}; }
182
- @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .inputs, .result { padding: ${space(5)}; } .small { padding: ${space(4)} ${space(5)}; } }
183
- `];
184
- }
185
- money(amount) {
186
- try {
187
- return new Intl.NumberFormat(pageLocale(this), { style: "currency", currency: this.currency, maximumFractionDigits: 0 }).format(amount);
188
- } catch {
189
- return String(Math.round(amount));
190
- }
191
- }
192
- field(key) {
193
- return (event) => {
194
- this[key] = Number(event.target.value) || 0;
195
- };
196
- }
197
- render() {
198
- const deposit = this.price * this.depositPercent / 100;
199
- const loan = Math.max(this.price - deposit, 0);
200
- const monthly = monthlyPayment(loan, this.rate, this.years);
201
- return html`<div class="wrap" part="wrap">
202
- <div class="inputs">
203
- ${this.heading ? html`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}
204
- <div><label for=${this.id_("price")}>${say("Home price")}</label><input id=${this.id_("price")} type="number" min="0" step="1000" inputmode="numeric" .value=${String(this.price)} @input=${this.field("price")} /></div>
205
- <div><label for=${this.id_("deposit")}>${say("Deposit")} <span class="read">${this.depositPercent}% · ${this.money(deposit)}</span></label><input id=${this.id_("deposit")} type="range" min="5" max="60" step="1" .value=${String(this.depositPercent)} @input=${this.field("depositPercent")} /></div>
206
- <div class="two">
207
- <div><label for=${this.id_("years")}>${say("Term")} <span class="read">${say("{years} years", { years: this.years })}</span></label><input id=${this.id_("years")} type="range" min="5" max="40" step="1" .value=${String(this.years)} @input=${this.field("years")} /></div>
208
- <div><label for=${this.id_("rate")}>${say("Interest rate (%)")}</label><input id=${this.id_("rate")} type="number" min="0" max="20" step="0.05" inputmode="decimal" .value=${String(this.rate)} @input=${this.field("rate")} /></div>
209
- </div>
210
- </div>
211
- <div class="result">
212
- <p class="caption">${say("Estimated monthly repayment")}</p>
213
- <output for=${`${this.id_("price")} ${this.id_("deposit")} ${this.id_("years")} ${this.id_("rate")}`}>${this.money(monthly)}</output>
214
- <dl>
215
- <div><dt>${say("You would borrow")}</dt><dd>${this.money(loan)}</dd></div>
216
- <div><dt>${say("Total repayable")}</dt><dd>${this.money(monthly * this.years * 12)}</dd></div>
217
- </dl>
218
- </div>
219
- ${this.smallPrint ? html`<p class="small">${this.smallPrint}</p>` : nothing}
220
- </div>`;
221
- }
222
- };
223
- var ImpktBeforeAfter = class extends ImpktElement {
224
- static {
225
- this.properties = {
226
- beforeSrc: { type: String, attribute: "before-src" },
227
- beforeAlt: { type: String, attribute: "before-alt" },
228
- afterSrc: { type: String, attribute: "after-src" },
229
- afterAlt: { type: String, attribute: "after-alt" },
230
- beforeLabel: { type: String, attribute: "before-label" },
231
- afterLabel: { type: String, attribute: "after-label" },
232
- label: { type: String },
233
- position: { type: Number },
234
- spaceAbove: { type: String, reflect: true, attribute: "space-above" },
235
- spaceBelow: { type: String, reflect: true, attribute: "space-below" }
236
- };
237
- }
238
- constructor() {
239
- super();
240
- this.beforeSrc = "";
241
- this.beforeAlt = "";
242
- this.afterSrc = "";
243
- this.afterAlt = "";
244
- this.beforeLabel = "Before";
245
- this.afterLabel = "After";
246
- this.label = "Compare the two pictures";
247
- this.position = 50;
248
- this.spaceAbove = "none";
249
- this.spaceBelow = "none";
250
- }
251
- static {
252
- this.styles = [...ImpktElement.styles, focusRing, spaceAround, css`
253
- .frame { position: relative; overflow: hidden; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowLg}; line-height: 0; --at: 50%; }
254
- img { display: block; inline-size: 100%; block-size: auto; }
255
- .after { position: absolute; inset: 0; block-size: 100%; object-fit: cover; clip-path: inset(0 0 0 var(--at)); }
256
- .tag { position: absolute; inset-block-start: ${space(3)}; padding: ${space(1)} ${space(3)}; ${type("xs")} line-height: 1.4; font-weight: ${fontWeight("semibold")}; color: ${t.text}; background: ${t.surfaceCard}; border-radius: 999px; box-shadow: ${t.shadowSm}; }
257
- .tag.b { inset-inline-start: ${space(3)}; }
258
- .tag.a { inset-inline-end: ${space(3)}; }
259
- .line { position: absolute; inset-block: 0; inset-inline-start: var(--at); inline-size: 2px; margin-inline-start: -1px; background: ${t.surfaceCard}; pointer-events: none; }
260
- .grip { position: absolute; inset-block-start: 50%; inset-inline-start: 50%; display: flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; margin: -22px 0 0 -22px; color: ${t.text}; background: ${t.surfaceCard}; border-radius: 50%; box-shadow: ${t.shadowMd}; }
261
- input { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
262
- .frame:has(input:focus-visible) .grip { box-shadow: ${t.focusShadow}; }
263
- `];
264
- }
265
- render() {
266
- return html`<div class="frame" part="frame" style="--at:${this.position}%">
267
- <img src=${this.beforeSrc} alt=${this.beforeAlt} />
268
- <img class="after" src=${this.afterSrc} alt=${this.afterAlt} />
269
- <span class="tag b" aria-hidden="true">${this.beforeLabel}</span>
270
- <span class="tag a" aria-hidden="true">${this.afterLabel}</span>
271
- <span class="line"><span class="grip">${iconSvg("arrow-left", "14px")}${iconSvg("arrow-right", "14px")}</span></span>
272
- <input type="range" min="0" max="100" aria-label=${this.label} .value=${String(this.position)} @input=${(e) => {
273
- this.position = Number(e.target.value);
274
- }} />
275
- </div>`;
276
- }
277
- };
278
- var ImpktStickyBar = class extends ImpktElement {
279
- constructor() {
280
- super();
281
- this.shown = false;
282
- this.check = () => {
283
- const shown = window.scrollY >= this.revealAfter;
284
- if (shown === this.shown) return;
285
- this.shown = shown;
286
- this.requestUpdate();
287
- this.clearance(shown);
288
- };
289
- this.label = "Quick actions";
290
- this.heading = "";
291
- this.lead = "";
292
- this.showOn = "phones";
293
- this.revealAfter = 400;
294
- }
295
- static {
296
- this.properties = {
297
- label: { type: String },
298
- heading: { type: String },
299
- lead: { type: String },
300
- showOn: { type: String, reflect: true, attribute: "show-on" },
301
- revealAfter: { type: Number, attribute: "reveal-after" }
302
- };
303
- }
304
- static {
305
- this.styles = [...ImpktElement.styles, focusRing, css`
306
- :host { display: block; }
307
- .bar { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 900; display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; padding: ${space(3)} ${space(4)} calc(${space(3)} + env(safe-area-inset-bottom)); background: ${t.surfaceCard}; box-shadow: ${t.shadowXl}, 0 -1px 0 color-mix(in srgb, ${t.text} 8%, transparent); transform: translateY(110%); visibility: hidden; transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), visibility 220ms; }
308
- .bar.on { transform: none; visibility: visible; }
309
- .spacer { block-size: 5rem; }
310
- .h { font-family: ${t.fontHeading}; ${type("md")} font-weight: ${fontWeight("bold")}; color: ${t.textHeading}; }
311
- .t { ${type("xs")} color: ${t.textMuted}; }
312
- .words { min-inline-size: 0; }
313
- .actions { display: flex; flex: none; gap: ${space(2)}; }
314
- @media (min-width: 48rem) { :host([show-on='phones']) { display: none; } }
315
- `];
316
- }
317
- /** Leaves room for the bar when the browser scrolls something into view. */
318
- clearance(on) {
319
- const visible = on && getComputedStyle(this).display !== "none";
320
- const height = visible ? `${this.renderRoot.querySelector(".bar")?.getBoundingClientRect().height ?? 80}px` : "";
321
- const root = document.documentElement.style;
322
- root.scrollPaddingBlockEnd = height;
323
- if (height) root.setProperty("--impkt-bottom-bar", height);
324
- else root.removeProperty("--impkt-bottom-bar");
325
- }
326
- connectedCallback() {
327
- super.connectedCallback();
328
- window.addEventListener("scroll", this.check, { passive: true });
329
- this.check();
330
- }
331
- disconnectedCallback() {
332
- super.disconnectedCallback();
333
- window.removeEventListener("scroll", this.check);
334
- this.clearance(false);
335
- }
336
- render() {
337
- return html`<div class="spacer"></div>
338
- <section class="bar ${this.shown ? "on" : ""}" part="bar" aria-label=${this.label}>
339
- <div class="words">
340
- ${this.heading ? html`<div class="h">${this.heading}</div>` : nothing}
341
- ${this.lead ? html`<div class="t">${this.lead}</div>` : nothing}
342
- </div>
343
- <div class="actions"><slot name="actions"></slot></div>
344
- </section>`;
345
- }
346
- };
347
- var ImpktLocationCard = class extends ImpktElement {
348
- static {
349
- this.properties = {
350
- heading: { type: String },
351
- address: { type: String },
352
- hours: { type: String },
353
- phone: { type: String },
354
- mapSrc: { type: String, attribute: "map-src" },
355
- mapAlt: { type: String, attribute: "map-alt" },
356
- directionsText: { type: String, attribute: "directions-text" },
357
- directionsHref: { type: String, attribute: "directions-href" },
358
- nearby: { type: Array },
359
- headingLevel: { type: Number, attribute: "heading-level" },
360
- spaceAbove: { type: String, reflect: true, attribute: "space-above" },
361
- spaceBelow: { type: String, reflect: true, attribute: "space-below" }
362
- };
363
- }
364
- constructor() {
365
- super();
366
- this.heading = "";
367
- this.address = "";
368
- this.hours = "";
369
- this.phone = "";
370
- this.mapSrc = "";
371
- this.mapAlt = "";
372
- this.directionsText = "Get directions";
373
- this.directionsHref = "";
374
- this.nearby = [];
375
- this.headingLevel = 2;
376
- this.spaceAbove = "none";
377
- this.spaceBelow = "none";
378
- }
379
- static {
380
- this.styles = [...ImpktElement.styles, focusRing, spaceAround, css`
381
- :host { display: block; container-type: inline-size; }
382
- .wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; background: ${t.surfaceCard}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowMd}, 0 0 0 1px color-mix(in srgb, ${t.text} 6%, transparent); }
383
- .wrap.solo { grid-template-columns: minmax(0, 1fr); }
384
- .map { min-block-size: 16rem; background: ${t.surfaceSubtle}; }
385
- .map img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
386
- .info { display: flex; flex-direction: column; gap: ${space(3)}; padding: ${space(8)}; }
387
- .h { margin: 0; font-family: ${t.fontHeading}; ${type("2xl")} font-weight: ${fontWeight("bold")}; color: ${t.textHeading}; }
388
- .row { display: flex; gap: ${space(3)}; margin: 0; white-space: pre-line; }
389
- .row svg { flex: none; margin-block-start: ${space(0.5)}; color: ${t.brand}; }
390
- a { color: ${t.link}; }
391
- ul { display: grid; gap: ${space(1.5)}; margin: ${space(1)} 0; padding: ${space(3)} 0 0; list-style: none; border-block-start: 1px solid color-mix(in srgb, ${t.text} 10%, transparent); ${type("sm")} }
392
- li { display: flex; justify-content: space-between; gap: ${space(3)}; }
393
- li span:last-child { color: ${t.textMuted}; text-align: end; }
394
- .go { ${targetSize} align-self: flex-start; display: inline-flex; align-items: center; gap: ${space(2)}; padding: ${space(2)} ${space(4)}; ${type("sm")} font-weight: ${fontWeight("semibold")}; color: ${t.onBrand}; text-decoration: none; background: ${t.brand}; border-radius: ${t.radiusLg}; }
395
- .go:hover { background: ${t.brandHover}; }
396
- @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .info { padding: ${space(5)}; } }
397
- `];
398
- }
399
- render() {
400
- const directions = this.directionsHref || (this.address ? `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(this.address)}` : "");
401
- return html`<div class="wrap ${this.mapSrc ? "" : "solo"}" part="wrap">
402
- ${this.mapSrc ? html`<div class="map"><img src=${this.mapSrc} alt=${this.mapAlt} /></div>` : nothing}
403
- <div class="info">
404
- ${this.heading ? html`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}
405
- ${this.address ? html`<p class="row">${iconSvg("map-pin", "20px")}<span>${this.address}</span></p>` : nothing}
406
- ${this.hours ? html`<p class="row">${iconSvg("clock", "20px")}<span>${this.hours}</span></p>` : nothing}
407
- ${this.phone ? html`<p class="row">${iconSvg("phone", "20px")}<a href=${`tel:${this.phone.replace(/\s+/g, "")}`}>${this.phone}</a></p>` : nothing}
408
- ${this.nearby.length ? html`<ul>${this.nearby.map((item) => html`<li><span>${item.place}</span><span>${item.distance}</span></li>`)}</ul>` : nothing}
409
- ${directions ? html`<a class="go" href=${directions}>${this.directionsText}${iconSvg("arrow-right", "16px")}</a>` : nothing}
410
- </div>
411
- </div>`;
412
- }
413
- };
414
- customElements.define("impkt-site-plan", ImpktSitePlan);
415
- customElements.define("impkt-mortgage-calculator", ImpktMortgageCalculator);
416
- customElements.define("impkt-before-after", ImpktBeforeAfter);
417
- customElements.define("impkt-sticky-bar", ImpktStickyBar);
418
- customElements.define("impkt-location-card", ImpktLocationCard);
419
-
420
- export {
421
- ImpktSitePlan,
422
- monthlyPayment,
423
- ImpktMortgageCalculator,
424
- ImpktBeforeAfter,
425
- ImpktStickyBar,
426
- ImpktLocationCard
427
- };
428
- //# sourceMappingURL=chunk-OHDPGIJ3.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/property.ts"],"sourcesContent":["import { css, html, nothing, type TemplateResult } from 'lit';\nimport { say } from '../base/say';\nimport { pageLocale } from '../base/locale';\nimport { ImpktElement } from '../base/ImpktElement';\nimport { focusRing, targetSize } from '../base/styles';\nimport { fontWeight, space, spaceAround, t, type } from '../base/tokens';\nimport { iconSvg } from './icon';\n\nexport interface SitePlot {\n id?: string;\n /** What is printed on the pin, such as 14. */\n number: string;\n /** The house type, such as The Hawthorn. */\n name?: string;\n status: 'available' | 'reserved' | 'sold';\n price?: string;\n beds?: string;\n /** How far across the plan the pin sits, from 0 to 100. */\n x: number | string;\n /** How far down the plan the pin sits, from 0 to 100. */\n y: number | string;\n href?: string;\n}\n\n/**\n * A drawing of the development with a pin on every plot. Choose a pin to see\n * whether it is available, what it costs and where to go next.\n *\n * Every pin is a button named in full, such as \"Plot 14, The Hawthorn,\n * Available, £385,000\". Status is shown by the pin's shape as well as its\n * colour, so it does not rely on colour alone (1.4.1).\n *\n * @category content\n * @icon map\n * @fires impkt-select - When a plot is chosen. The plot is in detail.plot.\n */\nexport class ImpktSitePlan extends ImpktElement {\n static properties = {\n imageSrc: { type: String, attribute: 'image-src' },\n imageAlt: { type: String, attribute: 'image-alt' },\n plots: { type: Array },\n hint: { type: String },\n selectedPlot: { type: String, attribute: 'selected-plot' },\n panel: { type: String, reflect: true },\n plotWord: { type: String, attribute: 'plot-word' },\n actionText: { type: String, attribute: 'action-text' },\n availableText: { type: String, attribute: 'available-text' },\n reservedText: { type: String, attribute: 'reserved-text' },\n soldText: { type: String, attribute: 'sold-text' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare imageSrc: string;\n declare imageAlt: string;\n declare plots: SitePlot[];\n /** The number of the plot shown first. */\n declare selectedPlot: string;\n /** The details beside the plan, or floating over it. */\n declare panel: 'beside' | 'over';\n /** What is said before a plot is chosen. */\n declare hint: string;\n declare plotWord: string;\n declare actionText: string;\n declare availableText: string;\n declare reservedText: string;\n declare soldText: string;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n private chosen: SitePlot | undefined;\n\n constructor() {\n super();\n this.imageSrc = '';\n this.imageAlt = '';\n this.plots = [];\n this.hint = 'Choose a plot to see its price and availability.';\n this.selectedPlot = '';\n this.panel = 'beside';\n this.plotWord = 'Plot';\n this.actionText = 'View this home';\n this.availableText = 'Available';\n this.reservedText = 'Reserved';\n this.soldText = 'Sold';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpktElement.styles, focusRing, spaceAround, css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: ${space(6)}; align-items: start; }\n .plan { position: relative; overflow: hidden; border-radius: ${t.radius2xl}; background: ${t.surfaceSubtle}; box-shadow: ${t.shadowMd}; line-height: 0; }\n .plan img { inline-size: 100%; block-size: auto; }\n .pin { position: absolute; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; inline-size: 34px; block-size: 34px; margin: -17px 0 0 -17px; padding: 0; font: inherit; ${type('xs')} line-height: 1; font-weight: ${fontWeight('bold')}; color: ${t.onBrand}; background: ${t.brand}; border: 2px solid ${t.surfaceCard}; border-radius: 50%; box-shadow: ${t.shadowMd}; cursor: pointer; transition: transform 120ms ease-in-out; }\n .pin:hover { transform: scale(1.12); }\n .pin.reserved { color: ${t.text}; background: ${t.warningSubtle}; border-color: ${t.warning}; border-style: dashed; }\n .pin.sold { color: ${t.textMuted}; background: ${t.surfaceCard}; border-color: ${t.border}; border-radius: ${t.radius}; }\n .pin[aria-pressed='true'] { transform: scale(1.22); box-shadow: ${t.shadowLg}, 0 0 0 3px ${t.brand}; }\n .panel { display: flex; flex-direction: column; gap: ${space(3)}; padding: ${space(6)}; background: ${t.surfaceCard}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowSm}, 0 0 0 1px color-mix(in srgb, ${t.text} 6%, transparent); }\n .hint { margin: 0; color: ${t.textMuted}; }\n .name { margin: 0; font-family: ${t.fontHeading}; ${type('2xl')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n .sub { margin: 0; color: ${t.textMuted}; }\n .price { margin: 0; ${type('xl')} font-weight: ${fontWeight('semibold')}; }\n .status { align-self: flex-start; padding: ${space(0.5)} ${space(2.5)}; ${type('xs')} font-weight: ${fontWeight('semibold')}; color: ${t.successText}; background: ${t.successSubtle}; border-radius: 999px; }\n .status.reserved { color: ${t.warningText}; background: ${t.warningSubtle}; }\n .status.sold { color: ${t.textMuted}; background: ${t.surfaceSubtle}; }\n .go { ${targetSize} display: inline-flex; align-items: center; justify-content: center; gap: ${space(2)}; padding: ${space(2)} ${space(4)}; ${type('sm')} font-weight: ${fontWeight('semibold')}; color: ${t.onBrand}; text-decoration: none; background: ${t.brand}; border-radius: ${t.radiusLg}; }\n .go:hover { background: ${t.brandHover}; }\n .legend { display: flex; flex-wrap: wrap; gap: ${space(4)}; margin: ${space(3)} 0 0; padding: 0; list-style: none; ${type('sm')} color: ${t.textMuted}; }\n .legend li { display: inline-flex; align-items: center; gap: ${space(2)}; }\n .key { box-sizing: border-box; inline-size: 14px; block-size: 14px; background: ${t.brand}; border: 2px solid ${t.surfaceCard}; border-radius: 50%; outline: 1px solid color-mix(in srgb, currentColor 55%, transparent); }\n .key.reserved { background: ${t.warningSubtle}; border: 2px dashed ${t.warning}; }\n .key.sold { background: ${t.surfaceCard}; border: 2px solid ${t.border}; border-radius: 3px; }\n :host { --plan-card: var(--impkt-solid-card, ${t.surfaceCard}); --plan-text: var(--impkt-solid-text, ${t.text}); --plan-heading: var(--impkt-solid-heading, ${t.text}); --plan-muted: var(--impkt-solid-muted, ${t.textMuted}); }\n :host([panel='over']) .panel { background: var(--plan-card); color: var(--plan-text); --impkt-color-surface-card: var(--plan-card); --impkt-color-text-default: var(--plan-text); --impkt-color-text-heading: var(--plan-heading); --impkt-color-text-muted: var(--plan-muted); }\n @container (min-width: 44.01rem) { :host([panel='over']) .wrap { position: relative; grid-template-columns: minmax(0, 1fr); } :host([panel='over']) .panel { position: absolute; inset-block-start: 32%; inset-inline-end: ${space(8)}; inline-size: 22.5rem; box-sizing: border-box; box-shadow: ${t.shadowXl}; } }\n @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } }\n `];\n\n willUpdate(changed: Map<string, unknown>): void {\n if ((changed.has('selectedPlot') || changed.has('plots')) && this.selectedPlot && !this.chosen) this.chosen = this.plots.find((p) => String(p.number) === this.selectedPlot);\n }\n\n private word(status: string): string {\n return status === 'sold' ? this.soldText : status === 'reserved' ? this.reservedText : this.availableText;\n }\n\n private choose(plot: SitePlot): void {\n this.chosen = plot;\n this.requestUpdate();\n this.dispatchEvent(new CustomEvent('impkt-select', { detail: { plot }, bubbles: true, composed: true }));\n }\n\n private renderPanel(): TemplateResult {\n const plot = this.chosen;\n if (!plot) return html`<p class=\"hint\">${this.hint}</p>`;\n const status = plot.status ?? 'available';\n return html`<span class=\"status ${status}\">${this.word(status)}</span>\n <p class=\"name\">${this.plotWord} ${plot.number}</p>\n ${plot.name || plot.beds ? html`<p class=\"sub\">${[plot.name, plot.beds].filter(Boolean).join(' · ')}</p>` : nothing}\n ${plot.price ? html`<p class=\"price\">${plot.price}</p>` : nothing}\n ${plot.href && status !== 'sold' ? html`<a class=\"go\" href=${plot.href}>${this.actionText}${iconSvg('arrow-right', '16px')}</a>` : nothing}`;\n }\n\n render(): TemplateResult {\n return html`<div class=\"wrap\" part=\"wrap\">\n <div>\n <div class=\"plan\" part=\"plan\">\n <img src=${this.imageSrc} alt=${this.imageAlt} />\n ${this.plots.map((plot) => {\n const status = plot.status ?? 'available';\n const name = [`${this.plotWord} ${plot.number}`, plot.name, this.word(status), plot.price].filter(Boolean).join(', ');\n return html`<button class=\"pin ${status}\" type=\"button\" style=\"left:${Number(plot.x)}%;top:${Number(plot.y)}%\" aria-label=${name} aria-pressed=${String(this.chosen === plot)} @click=${() => this.choose(plot)}>${plot.number}</button>`;\n })}\n </div>\n <ul class=\"legend\">\n <li><span class=\"key\"></span>${this.availableText}</li>\n <li><span class=\"key reserved\"></span>${this.reservedText}</li>\n <li><span class=\"key sold\"></span>${this.soldText}</li>\n </ul>\n </div>\n <div class=\"panel\" part=\"panel\" aria-live=\"polite\">${this.renderPanel()}</div>\n </div>`;\n }\n}\n\n/** The monthly repayment on a loan. A rate of nothing is the loan split evenly. */\nexport function monthlyPayment(loan: number, annualRate: number, years: number): number {\n const months = years * 12;\n if (loan <= 0 || months <= 0) return 0;\n const rate = annualRate / 100 / 12;\n return rate === 0 ? loan / months : (loan * rate) / (1 - (1 + rate) ** -months);\n}\n\n/**\n * What a home would cost each month, worked out as the sliders move.\n *\n * The result is an estimate and the warning under it is on by default, because\n * UK rules expect it wherever repayments are shown. Change the words for other\n * markets, but check with whoever signs off your financial promotions first.\n *\n * @category form\n * @icon pound\n */\nexport class ImpktMortgageCalculator extends ImpktElement {\n static properties = {\n heading: { type: String },\n price: { type: Number },\n depositPercent: { type: Number, attribute: 'deposit-percent' },\n rate: { type: Number },\n years: { type: Number },\n currency: { type: String },\n smallPrint: { type: String, attribute: 'small-print' },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare price: number;\n declare depositPercent: number;\n declare rate: number;\n declare years: number;\n /** The three-letter currency code, such as GBP. */\n declare currency: string;\n declare smallPrint: string;\n declare headingLevel: 2 | 3;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.heading = 'What would it cost each month?';\n this.price = 385000;\n this.depositPercent = 10;\n this.rate = 4.5;\n this.years = 30;\n this.currency = 'GBP';\n this.smallPrint = 'This is an estimate, not a mortgage offer. Your home may be repossessed if you do not keep up repayments on your mortgage.';\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpktElement.styles, focusRing, spaceAround, css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); overflow: hidden; background: ${t.surfaceCard}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowMd}, 0 0 0 1px color-mix(in srgb, ${t.text} 6%, transparent); }\n .inputs { display: flex; flex-direction: column; gap: ${space(5)}; padding: ${space(8)}; }\n .h { margin: 0; font-family: ${t.fontHeading}; ${type('2xl')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n label { display: flex; justify-content: space-between; gap: ${space(3)}; ${type('sm')} font-weight: ${fontWeight('semibold')}; margin-block-end: ${space(1.5)}; }\n .read { font-weight: ${fontWeight('regular')}; color: ${t.textMuted}; }\n input[type='number'] { box-sizing: border-box; inline-size: 100%; min-block-size: 44px; padding: ${space(2)} ${space(3)}; font: inherit; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; }\n input[type='range'] { inline-size: 100%; min-block-size: 24px; margin: 0; accent-color: ${t.brand}; }\n .two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${space(4)}; }\n .result { display: flex; flex-direction: column; justify-content: center; gap: ${space(2)}; padding: ${space(8)}; color: ${t.onBrand}; background: ${t.brand}; }\n .caption { margin: 0; ${type('sm')} opacity: 0.85; }\n output { display: block; font-family: ${t.fontHeading}; ${type('4xl')} font-weight: ${fontWeight('bold')}; }\n dl { display: grid; gap: ${space(2)}; margin: ${space(4)} 0 0; padding-block-start: ${space(4)}; border-block-start: 1px solid color-mix(in srgb, ${t.onBrand} 25%, transparent); ${type('sm')} }\n dl div { display: flex; justify-content: space-between; gap: ${space(3)}; }\n dt { opacity: 0.85; }\n dd { margin: 0; font-weight: ${fontWeight('semibold')}; }\n .small { grid-column: 1 / -1; margin: 0; padding: ${space(4)} ${space(8)}; ${type('xs')} color: ${t.textMuted}; background: ${t.surfaceSubtle}; }\n @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .inputs, .result { padding: ${space(5)}; } .small { padding: ${space(4)} ${space(5)}; } }\n `];\n\n private money(amount: number): string {\n try {\n return new Intl.NumberFormat(pageLocale(this), { style: 'currency', currency: this.currency, maximumFractionDigits: 0 }).format(amount);\n } catch {\n return String(Math.round(amount));\n }\n }\n\n private field(key: 'price' | 'depositPercent' | 'rate' | 'years'): (event: Event) => void {\n return (event) => { this[key] = Number((event.target as HTMLInputElement).value) || 0; };\n }\n\n render(): TemplateResult {\n const deposit = (this.price * this.depositPercent) / 100;\n const loan = Math.max(this.price - deposit, 0);\n const monthly = monthlyPayment(loan, this.rate, this.years);\n return html`<div class=\"wrap\" part=\"wrap\">\n <div class=\"inputs\">\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n <div><label for=${this.id_('price')}>${say('Home price')}</label><input id=${this.id_('price')} type=\"number\" min=\"0\" step=\"1000\" inputmode=\"numeric\" .value=${String(this.price)} @input=${this.field('price')} /></div>\n <div><label for=${this.id_('deposit')}>${say('Deposit')} <span class=\"read\">${this.depositPercent}% · ${this.money(deposit)}</span></label><input id=${this.id_('deposit')} type=\"range\" min=\"5\" max=\"60\" step=\"1\" .value=${String(this.depositPercent)} @input=${this.field('depositPercent')} /></div>\n <div class=\"two\">\n <div><label for=${this.id_('years')}>${say('Term')} <span class=\"read\">${say('{years} years', { years: this.years })}</span></label><input id=${this.id_('years')} type=\"range\" min=\"5\" max=\"40\" step=\"1\" .value=${String(this.years)} @input=${this.field('years')} /></div>\n <div><label for=${this.id_('rate')}>${say('Interest rate (%)')}</label><input id=${this.id_('rate')} type=\"number\" min=\"0\" max=\"20\" step=\"0.05\" inputmode=\"decimal\" .value=${String(this.rate)} @input=${this.field('rate')} /></div>\n </div>\n </div>\n <div class=\"result\">\n <p class=\"caption\">${say('Estimated monthly repayment')}</p>\n <output for=${`${this.id_('price')} ${this.id_('deposit')} ${this.id_('years')} ${this.id_('rate')}`}>${this.money(monthly)}</output>\n <dl>\n <div><dt>${say('You would borrow')}</dt><dd>${this.money(loan)}</dd></div>\n <div><dt>${say('Total repayable')}</dt><dd>${this.money(monthly * this.years * 12)}</dd></div>\n </dl>\n </div>\n ${this.smallPrint ? html`<p class=\"small\">${this.smallPrint}</p>` : nothing}\n </div>`;\n }\n}\n\n/**\n * Two pictures of one place with a handle to drag between them: a bare plot\n * and the finished street, a shell and the fitted kitchen.\n *\n * The handle is a native range control, so it works with a finger, a mouse and\n * the arrow keys, and a screen reader hears how far across it is. Both pictures\n * need descriptions, because they are the content.\n *\n * @category content\n * @icon image\n */\nexport class ImpktBeforeAfter extends ImpktElement {\n static properties = {\n beforeSrc: { type: String, attribute: 'before-src' },\n beforeAlt: { type: String, attribute: 'before-alt' },\n afterSrc: { type: String, attribute: 'after-src' },\n afterAlt: { type: String, attribute: 'after-alt' },\n beforeLabel: { type: String, attribute: 'before-label' },\n afterLabel: { type: String, attribute: 'after-label' },\n label: { type: String },\n position: { type: Number },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare beforeSrc: string;\n declare beforeAlt: string;\n declare afterSrc: string;\n declare afterAlt: string;\n declare beforeLabel: string;\n declare afterLabel: string;\n /** The name of the handle for a screen reader. */\n declare label: string;\n /** How far across the handle starts, from 0 to 100. */\n declare position: number;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.beforeSrc = '';\n this.beforeAlt = '';\n this.afterSrc = '';\n this.afterAlt = '';\n this.beforeLabel = 'Before';\n this.afterLabel = 'After';\n this.label = 'Compare the two pictures';\n this.position = 50;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpktElement.styles, focusRing, spaceAround, css`\n .frame { position: relative; overflow: hidden; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowLg}; line-height: 0; --at: 50%; }\n img { display: block; inline-size: 100%; block-size: auto; }\n .after { position: absolute; inset: 0; block-size: 100%; object-fit: cover; clip-path: inset(0 0 0 var(--at)); }\n .tag { position: absolute; inset-block-start: ${space(3)}; padding: ${space(1)} ${space(3)}; ${type('xs')} line-height: 1.4; font-weight: ${fontWeight('semibold')}; color: ${t.text}; background: ${t.surfaceCard}; border-radius: 999px; box-shadow: ${t.shadowSm}; }\n .tag.b { inset-inline-start: ${space(3)}; }\n .tag.a { inset-inline-end: ${space(3)}; }\n .line { position: absolute; inset-block: 0; inset-inline-start: var(--at); inline-size: 2px; margin-inline-start: -1px; background: ${t.surfaceCard}; pointer-events: none; }\n .grip { position: absolute; inset-block-start: 50%; inset-inline-start: 50%; display: flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; margin: -22px 0 0 -22px; color: ${t.text}; background: ${t.surfaceCard}; border-radius: 50%; box-shadow: ${t.shadowMd}; }\n input { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }\n .frame:has(input:focus-visible) .grip { box-shadow: ${t.focusShadow}; }\n `];\n\n render(): TemplateResult {\n return html`<div class=\"frame\" part=\"frame\" style=\"--at:${this.position}%\">\n <img src=${this.beforeSrc} alt=${this.beforeAlt} />\n <img class=\"after\" src=${this.afterSrc} alt=${this.afterAlt} />\n <span class=\"tag b\" aria-hidden=\"true\">${this.beforeLabel}</span>\n <span class=\"tag a\" aria-hidden=\"true\">${this.afterLabel}</span>\n <span class=\"line\"><span class=\"grip\">${iconSvg('arrow-left', '14px')}${iconSvg('arrow-right', '14px')}</span></span>\n <input type=\"range\" min=\"0\" max=\"100\" aria-label=${this.label} .value=${String(this.position)} @input=${(e: Event) => { this.position = Number((e.target as HTMLInputElement).value); }} />\n </div>`;\n }\n}\n\n/**\n * A bar fixed to the bottom of the screen that keeps the one thing to do in\n * reach, such as booking a viewing.\n *\n * It appears once the visitor has scrolled, keeps a space for itself at the end\n * of the page, and tells the browser to scroll focused controls clear of it so\n * it never covers what the keyboard is on (2.4.11).\n *\n * @category navigation\n * @icon bar\n * @slot actions - The button or link to keep in reach.\n */\nexport class ImpktStickyBar extends ImpktElement {\n static properties = {\n label: { type: String },\n heading: { type: String },\n lead: { type: String },\n showOn: { type: String, reflect: true, attribute: 'show-on' },\n revealAfter: { type: Number, attribute: 'reveal-after' },\n };\n /** The name of this region for a screen reader. */\n declare label: string;\n declare heading: string;\n declare lead: string;\n declare showOn: 'phones' | 'all';\n /** How many pixels the visitor scrolls before it appears. */\n declare revealAfter: number;\n\n private shown = false;\n\n constructor() {\n super();\n this.label = 'Quick actions';\n this.heading = '';\n this.lead = '';\n this.showOn = 'phones';\n this.revealAfter = 400;\n }\n\n static styles = [...ImpktElement.styles, focusRing, css`\n :host { display: block; }\n .bar { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 900; display: flex; align-items: center; justify-content: space-between; gap: ${space(4)}; padding: ${space(3)} ${space(4)} calc(${space(3)} + env(safe-area-inset-bottom)); background: ${t.surfaceCard}; box-shadow: ${t.shadowXl}, 0 -1px 0 color-mix(in srgb, ${t.text} 8%, transparent); transform: translateY(110%); visibility: hidden; transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), visibility 220ms; }\n .bar.on { transform: none; visibility: visible; }\n .spacer { block-size: 5rem; }\n .h { font-family: ${t.fontHeading}; ${type('md')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n .t { ${type('xs')} color: ${t.textMuted}; }\n .words { min-inline-size: 0; }\n .actions { display: flex; flex: none; gap: ${space(2)}; }\n @media (min-width: 48rem) { :host([show-on='phones']) { display: none; } }\n `];\n\n private check = (): void => {\n const shown = window.scrollY >= this.revealAfter;\n if (shown === this.shown) return;\n this.shown = shown;\n this.requestUpdate();\n this.clearance(shown);\n };\n\n /** Leaves room for the bar when the browser scrolls something into view. */\n private clearance(on: boolean): void {\n const visible = on && getComputedStyle(this).display !== 'none';\n const height = visible ? `${this.renderRoot.querySelector('.bar')?.getBoundingClientRect().height ?? 80}px` : '';\n const root = document.documentElement.style;\n root.scrollPaddingBlockEnd = height;\n // The toast reads this to sit above the bar rather than on its button.\n if (height) root.setProperty('--impkt-bottom-bar', height);\n else root.removeProperty('--impkt-bottom-bar');\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n window.addEventListener('scroll', this.check, { passive: true });\n this.check();\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n window.removeEventListener('scroll', this.check);\n this.clearance(false);\n }\n\n render(): TemplateResult {\n return html`<div class=\"spacer\"></div>\n <section class=\"bar ${this.shown ? 'on' : ''}\" part=\"bar\" aria-label=${this.label}>\n <div class=\"words\">\n ${this.heading ? html`<div class=\"h\">${this.heading}</div>` : nothing}\n ${this.lead ? html`<div class=\"t\">${this.lead}</div>` : nothing}\n </div>\n <div class=\"actions\"><slot name=\"actions\"></slot></div>\n </section>`;\n }\n}\n\nexport interface NearbyItem {\n id?: string;\n place: string;\n /** How far, in words: 8 minutes by train. */\n distance: string;\n}\n\n/**\n * Where a place is and how to get there: a map picture, the address, opening\n * hours, travel times and a link for directions.\n *\n * The map is a picture you supply, not an embedded map. An embed loads a third\n * party's cookies before the visitor has agreed to anything.\n *\n * @category content\n * @icon map-pin\n * @role heading\n */\nexport class ImpktLocationCard extends ImpktElement {\n static properties = {\n heading: { type: String },\n address: { type: String },\n hours: { type: String },\n phone: { type: String },\n mapSrc: { type: String, attribute: 'map-src' },\n mapAlt: { type: String, attribute: 'map-alt' },\n directionsText: { type: String, attribute: 'directions-text' },\n directionsHref: { type: String, attribute: 'directions-href' },\n nearby: { type: Array },\n headingLevel: { type: Number, attribute: 'heading-level' },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare heading: string;\n declare address: string;\n declare hours: string;\n declare phone: string;\n declare mapSrc: string;\n declare mapAlt: string;\n declare directionsText: string;\n /** Leave empty and the link searches a map for the address. */\n declare directionsHref: string;\n declare nearby: NearbyItem[];\n declare headingLevel: 2 | 3;\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n constructor() {\n super();\n this.heading = '';\n this.address = '';\n this.hours = '';\n this.phone = '';\n this.mapSrc = '';\n this.mapAlt = '';\n this.directionsText = 'Get directions';\n this.directionsHref = '';\n this.nearby = [];\n this.headingLevel = 2;\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n\n static styles = [...ImpktElement.styles, focusRing, spaceAround, css`\n :host { display: block; container-type: inline-size; }\n .wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; background: ${t.surfaceCard}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowMd}, 0 0 0 1px color-mix(in srgb, ${t.text} 6%, transparent); }\n .wrap.solo { grid-template-columns: minmax(0, 1fr); }\n .map { min-block-size: 16rem; background: ${t.surfaceSubtle}; }\n .map img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }\n .info { display: flex; flex-direction: column; gap: ${space(3)}; padding: ${space(8)}; }\n .h { margin: 0; font-family: ${t.fontHeading}; ${type('2xl')} font-weight: ${fontWeight('bold')}; color: ${t.textHeading}; }\n .row { display: flex; gap: ${space(3)}; margin: 0; white-space: pre-line; }\n .row svg { flex: none; margin-block-start: ${space(0.5)}; color: ${t.brand}; }\n a { color: ${t.link}; }\n ul { display: grid; gap: ${space(1.5)}; margin: ${space(1)} 0; padding: ${space(3)} 0 0; list-style: none; border-block-start: 1px solid color-mix(in srgb, ${t.text} 10%, transparent); ${type('sm')} }\n li { display: flex; justify-content: space-between; gap: ${space(3)}; }\n li span:last-child { color: ${t.textMuted}; text-align: end; }\n .go { ${targetSize} align-self: flex-start; display: inline-flex; align-items: center; gap: ${space(2)}; padding: ${space(2)} ${space(4)}; ${type('sm')} font-weight: ${fontWeight('semibold')}; color: ${t.onBrand}; text-decoration: none; background: ${t.brand}; border-radius: ${t.radiusLg}; }\n .go:hover { background: ${t.brandHover}; }\n @container (max-width: 44rem) { .wrap { grid-template-columns: minmax(0, 1fr); } .info { padding: ${space(5)}; } }\n `];\n\n render(): TemplateResult {\n const directions = this.directionsHref || (this.address ? `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(this.address)}` : '');\n return html`<div class=\"wrap ${this.mapSrc ? '' : 'solo'}\" part=\"wrap\">\n ${this.mapSrc ? html`<div class=\"map\"><img src=${this.mapSrc} alt=${this.mapAlt} /></div>` : nothing}\n <div class=\"info\">\n ${this.heading ? html`<div class=\"h\" role=\"heading\" aria-level=${this.headingLevel}>${this.heading}</div>` : nothing}\n ${this.address ? html`<p class=\"row\">${iconSvg('map-pin', '20px')}<span>${this.address}</span></p>` : nothing}\n ${this.hours ? html`<p class=\"row\">${iconSvg('clock', '20px')}<span>${this.hours}</span></p>` : nothing}\n ${this.phone ? html`<p class=\"row\">${iconSvg('phone', '20px')}<a href=${`tel:${this.phone.replace(/\\s+/g, '')}`}>${this.phone}</a></p>` : nothing}\n ${this.nearby.length ? html`<ul>${this.nearby.map((item) => html`<li><span>${item.place}</span><span>${item.distance}</span></li>`)}</ul>` : nothing}\n ${directions ? html`<a class=\"go\" href=${directions}>${this.directionsText}${iconSvg('arrow-right', '16px')}</a>` : nothing}\n </div>\n </div>`;\n }\n}\n\ncustomElements.define('impkt-site-plan', ImpktSitePlan);\ncustomElements.define('impkt-mortgage-calculator', ImpktMortgageCalculator);\ncustomElements.define('impkt-before-after', ImpktBeforeAfter);\ncustomElements.define('impkt-sticky-bar', ImpktStickyBar);\ncustomElements.define('impkt-location-card', ImpktLocationCard);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impkt-site-plan': ImpktSitePlan; 'impkt-mortgage-calculator': ImpktMortgageCalculator; 'impkt-before-after': ImpktBeforeAfter;\n 'impkt-sticky-bar': ImpktStickyBar; 'impkt-location-card': ImpktLocationCard;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,SAAS,KAAK,MAAM,eAAoC;AAoCjD,I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UAC/I,KAAK,OAAO,SAAS,WAAW,KAAK,OAAO,IAAI,CAAC,SAAS,iBAAiB,KAAK,KAAK,gBAAgB,KAAK,QAAQ,cAAc,CAAC,UAAU,OAAO;AAAA,UAClJ,aAAa,0BAA0B,UAAU,IAAI,KAAK,cAAc,GAAG,QAAQ,eAAe,MAAM,CAAC,SAAS,OAAO;AAAA;AAAA;AAAA,EAGjI;AACF;AAEA,eAAe,OAAO,mBAAmB,aAAa;AACtD,eAAe,OAAO,6BAA6B,uBAAuB;AAC1E,eAAe,OAAO,sBAAsB,gBAAgB;AAC5D,eAAe,OAAO,oBAAoB,cAAc;AACxD,eAAe,OAAO,uBAAuB,iBAAiB;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/price.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { pageLocale } from '../base/locale';\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](https://github.com/matthill8286/strata/blob/main/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 prefix: { 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 /** \"From\", \"Guide\". Read before the amount. */\n declare prefix: 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 = '';\n this.prefix = '';\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 || pageLocale(this), {\n style: 'currency',\n currency: this.currency,\n // A house price reads as £385,000. Pence only mean something on small amounts.\n ...(this.amount >= 100000 && this.amount % 100 === 0 ? { minimumFractionDigits: 0, maximumFractionDigits: 0 } : {}),\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 ${this.prefix ? html`<span class=\"period\" part=\"prefix\">${this.prefix}</span>` : nothing}\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 HTM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AK;AAAA;AAAA,QAEf,GAAI,KAAK,UAAU,OAAU,KAAK,SAAS,QAAQ,IAAI,EAAE,uBAAuB,GAAG,uBAAuB,EAAE,IAAI,CAAC;AAAA,MACnH,CAAC,EAAE,OAAO,KAAK,SAAS,GAAG;AAAA,IAC7B,QAAQ;AAGN,cAAQ,KAAK,SAAS,KAAK,QAAQ,CAAC;AAAA,IACtC;AAAA,EACF;AAAA,EAEA,SAAyB;AACvB,WAAO;AAAA,QACH,KAAK,SAAS,0CAA0C,KAAK,MAAM,YAAY,OAAO;AAAA,2CACnD,KAAK,SAAS;AAAA,QACjD,KAAK,SAAS,0CAA0C,KAAK,MAAM,YAAY,OAAO;AAAA;AAAA,EAE5F;AACF;AAEA,eAAe,OAAO,eAAe,UAAU;","names":[]}
@@ -1 +0,0 @@
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":";;;;;;;;;;;AAAA,SAAS,MAAM,KAAK,eAAoC;AAgCjD,IAAM,kBAAN,cAA8B,aAAa;AAAA,EAChD;AAAA,SAAO,aAAa;AAAA,MAClB,GAAG,aAAa;AAAA,MAChB,SAAS,EAAE,MAAM,MAAM;AAAA,IACzB;AAAA;AAAA,EAIA,cAAc;AACZ,UAAM;AACN,SAAK,UAAU,CAAC;AAAA,EAClB;AAAA,EAEA;AAAA,SAAO,SAAS;AAAA,MACd,GAAG,aAAa;AAAA,MAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAaW,MAAM,CAAC,CAAC;AAAA,mBACJ,MAAM,CAAC,CAAC;AAAA,kBACT,EAAE,UAAU,UAAU,EAAE,MAAM;AAAA,yBACvB,EAAE,MAAM;AAAA,4BACL,MAAM,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA,sBAId,EAAE,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA,UAK3B,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA,wBAKI,EAAE,KAAK;AAAA;AAAA;AAAA;AAAA,qBAIV,SAAS,IAAI,CAAC;AAAA;AAAA;AAAA;AAAA,qBAId,SAAS,IAAI,CAAC;AAAA,iBAClB,EAAE,SAAS;AAAA,8BACE,MAAM,CAAC,CAAC;AAAA;AAAA;AAAA,wBAG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