@magmonium/one 0.4.47 → 0.4.48

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 (190) hide show
  1. package/assets/i18n/af.json +53 -11
  2. package/assets/i18n/am.json +61 -15
  3. package/assets/i18n/ar.json +59 -27
  4. package/assets/i18n/as.json +56 -16
  5. package/assets/i18n/az.json +56 -14
  6. package/assets/i18n/ba.json +50 -11
  7. package/assets/i18n/be.json +53 -12
  8. package/assets/i18n/bg.json +54 -13
  9. package/assets/i18n/bn.json +64 -13
  10. package/assets/i18n/br.json +51 -10
  11. package/assets/i18n/brx.json +50 -1
  12. package/assets/i18n/bs.json +55 -14
  13. package/assets/i18n/ca.json +53 -11
  14. package/assets/i18n/ceb.json +57 -14
  15. package/assets/i18n/cnr.json +54 -12
  16. package/assets/i18n/co.json +56 -14
  17. package/assets/i18n/cs.json +54 -11
  18. package/assets/i18n/cy.json +49 -11
  19. package/assets/i18n/da.json +54 -11
  20. package/assets/i18n/de.json +50 -21
  21. package/assets/i18n/doi.json +55 -13
  22. package/assets/i18n/el.json +55 -14
  23. package/assets/i18n/en.json +2 -2
  24. package/assets/i18n/eo.json +55 -12
  25. package/assets/i18n/es.json +51 -24
  26. package/assets/i18n/et.json +50 -8
  27. package/assets/i18n/eu.json +54 -12
  28. package/assets/i18n/fa.json +53 -12
  29. package/assets/i18n/fi.json +53 -11
  30. package/assets/i18n/fr.json +54 -24
  31. package/assets/i18n/fy.json +56 -12
  32. package/assets/i18n/ga.json +50 -11
  33. package/assets/i18n/gd.json +52 -13
  34. package/assets/i18n/gl.json +56 -12
  35. package/assets/i18n/gu.json +64 -13
  36. package/assets/i18n/ha.json +58 -13
  37. package/assets/i18n/haw.json +48 -12
  38. package/assets/i18n/he.json +51 -10
  39. package/assets/i18n/hi.json +61 -26
  40. package/assets/i18n/hmn.json +53 -12
  41. package/assets/i18n/hr.json +54 -11
  42. package/assets/i18n/hu.json +54 -13
  43. package/assets/i18n/hy.json +59 -12
  44. package/assets/i18n/id.json +48 -9
  45. package/assets/i18n/ie.json +48 -2
  46. package/assets/i18n/ig.json +50 -9
  47. package/assets/i18n/ilo.json +40 -9
  48. package/assets/i18n/is.json +53 -11
  49. package/assets/i18n/it.json +50 -21
  50. package/assets/i18n/iw.json +51 -10
  51. package/assets/i18n/ja.json +56 -26
  52. package/assets/i18n/jw.json +48 -10
  53. package/assets/i18n/ka.json +54 -10
  54. package/assets/i18n/kk.json +49 -10
  55. package/assets/i18n/km.json +53 -12
  56. package/assets/i18n/kn.json +62 -11
  57. package/assets/i18n/ko.json +53 -22
  58. package/assets/i18n/kok.json +53 -11
  59. package/assets/i18n/ks.json +49 -1
  60. package/assets/i18n/ku.json +52 -13
  61. package/assets/i18n/ky.json +52 -12
  62. package/assets/i18n/la.json +52 -9
  63. package/assets/i18n/lb.json +54 -9
  64. package/assets/i18n/lo.json +50 -9
  65. package/assets/i18n/lt.json +55 -10
  66. package/assets/i18n/lv.json +54 -9
  67. package/assets/i18n/ma.json +54 -1
  68. package/assets/i18n/mai.json +50 -10
  69. package/assets/i18n/me.json +49 -0
  70. package/assets/i18n/mg.json +55 -10
  71. package/assets/i18n/mi.json +55 -12
  72. package/assets/i18n/mk.json +52 -8
  73. package/assets/i18n/ml.json +59 -8
  74. package/assets/i18n/mn.json +54 -10
  75. package/assets/i18n/mni.json +52 -0
  76. package/assets/i18n/mr.json +61 -10
  77. package/assets/i18n/ms.json +52 -8
  78. package/assets/i18n/mt.json +54 -10
  79. package/assets/i18n/my.json +54 -11
  80. package/assets/i18n/ne.json +53 -10
  81. package/assets/i18n/nl.json +51 -22
  82. package/assets/i18n/no.json +52 -9
  83. package/assets/i18n/ny.json +53 -11
  84. package/assets/i18n/or.json +61 -9
  85. package/assets/i18n/pa.json +61 -9
  86. package/assets/i18n/pl.json +48 -20
  87. package/assets/i18n/ps.json +50 -8
  88. package/assets/i18n/pt.json +50 -20
  89. package/assets/i18n/rm.json +50 -1
  90. package/assets/i18n/ro.json +52 -10
  91. package/assets/i18n/ru.json +50 -20
  92. package/assets/i18n/sa.json +54 -11
  93. package/assets/i18n/sat.json +55 -11
  94. package/assets/i18n/sc.json +50 -1
  95. package/assets/i18n/sd.json +48 -10
  96. package/assets/i18n/si.json +50 -12
  97. package/assets/i18n/sk.json +48 -9
  98. package/assets/i18n/sl.json +46 -7
  99. package/assets/i18n/sm.json +52 -12
  100. package/assets/i18n/sn.json +48 -9
  101. package/assets/i18n/so.json +50 -11
  102. package/assets/i18n/sq.json +57 -9
  103. package/assets/i18n/sr.json +49 -11
  104. package/assets/i18n/st.json +47 -10
  105. package/assets/i18n/su.json +49 -11
  106. package/assets/i18n/sv.json +44 -6
  107. package/assets/i18n/sw.json +33 -10
  108. package/assets/i18n/ta.json +61 -10
  109. package/assets/i18n/te.json +62 -11
  110. package/assets/i18n/tg.json +50 -11
  111. package/assets/i18n/th.json +51 -12
  112. package/assets/i18n/tl.json +51 -9
  113. package/assets/i18n/tr.json +49 -23
  114. package/assets/i18n/uk.json +47 -9
  115. package/assets/i18n/ur.json +54 -11
  116. package/assets/i18n/uz.json +49 -11
  117. package/assets/i18n/vi.json +47 -7
  118. package/assets/i18n/xh.json +50 -13
  119. package/assets/i18n/yi.json +51 -11
  120. package/assets/i18n/yo.json +51 -11
  121. package/assets/i18n/zh.json +52 -25
  122. package/assets/i18n/zu.json +48 -10
  123. package/assets/icons/svg.json +1 -0
  124. package/assets/icons/wrench.svg +3 -0
  125. package/assets/index.json +1 -1
  126. package/assets/modal/authenticate.json +1 -1
  127. package/fesm2022/{magmonium-one-attribute-value-C1lqou2L.mjs → magmonium-one-attribute-value-DnctyCKp.mjs} +3 -3
  128. package/fesm2022/{magmonium-one-attribute-value-C1lqou2L.mjs.map → magmonium-one-attribute-value-DnctyCKp.mjs.map} +1 -1
  129. package/fesm2022/{magmonium-one-base-checkbox-CIxAiA4Q.mjs → magmonium-one-base-checkbox-D3Z1FTXU.mjs} +2 -2
  130. package/fesm2022/{magmonium-one-base-checkbox-CIxAiA4Q.mjs.map → magmonium-one-base-checkbox-D3Z1FTXU.mjs.map} +1 -1
  131. package/fesm2022/{magmonium-one-base-dropdown-XpTWe4Ii.mjs → magmonium-one-base-dropdown-DIaimBpG.mjs} +10 -10
  132. package/fesm2022/{magmonium-one-base-dropdown-XpTWe4Ii.mjs.map → magmonium-one-base-dropdown-DIaimBpG.mjs.map} +1 -1
  133. package/fesm2022/{magmonium-one-base-input-C1Ek0Ezm.mjs → magmonium-one-base-input-CZyIcKrn.mjs} +2 -2
  134. package/fesm2022/{magmonium-one-base-input-C1Ek0Ezm.mjs.map → magmonium-one-base-input-CZyIcKrn.mjs.map} +1 -1
  135. package/fesm2022/{magmonium-one-base-text-Di2V2ojp.mjs → magmonium-one-base-text-6T8KrJbz.mjs} +2 -2
  136. package/fesm2022/{magmonium-one-base-text-Di2V2ojp.mjs.map → magmonium-one-base-text-6T8KrJbz.mjs.map} +1 -1
  137. package/fesm2022/{magmonium-one-button-DZ4wCJgb.mjs → magmonium-one-button-BKGxIBhw.mjs} +7 -7
  138. package/fesm2022/{magmonium-one-button-DZ4wCJgb.mjs.map → magmonium-one-button-BKGxIBhw.mjs.map} +1 -1
  139. package/fesm2022/{magmonium-one-checkbox-R-hPZrCa.mjs → magmonium-one-checkbox-D1W18OGo.mjs} +5 -5
  140. package/fesm2022/{magmonium-one-checkbox-R-hPZrCa.mjs.map → magmonium-one-checkbox-D1W18OGo.mjs.map} +1 -1
  141. package/fesm2022/{magmonium-one-color-utl-DI5p24iQ.mjs → magmonium-one-color-utl-DklqRa3m.mjs} +38 -13
  142. package/fesm2022/magmonium-one-color-utl-DklqRa3m.mjs.map +1 -0
  143. package/fesm2022/{magmonium-one-directives-B93p5bAL.mjs → magmonium-one-directives-R099YTUd.mjs} +217 -217
  144. package/fesm2022/magmonium-one-directives-R099YTUd.mjs.map +1 -0
  145. package/fesm2022/{magmonium-one-group-B7YeUd1u.mjs → magmonium-one-group-Blvejahi.mjs} +7 -7
  146. package/fesm2022/{magmonium-one-group-B7YeUd1u.mjs.map → magmonium-one-group-Blvejahi.mjs.map} +1 -1
  147. package/fesm2022/{magmonium-one-header-DUiBhPUP.mjs → magmonium-one-header-qoXWebFN.mjs} +4 -4
  148. package/fesm2022/{magmonium-one-header-DUiBhPUP.mjs.map → magmonium-one-header-qoXWebFN.mjs.map} +1 -1
  149. package/fesm2022/{magmonium-one-icon-C3jwzbb2.mjs → magmonium-one-icon-Ce44a1mo.mjs} +5 -4
  150. package/fesm2022/magmonium-one-icon-Ce44a1mo.mjs.map +1 -0
  151. package/fesm2022/{magmonium-one-image-editor-BRTk8i4O.mjs → magmonium-one-image-editor-DKiscgQU.mjs} +4 -4
  152. package/fesm2022/{magmonium-one-image-editor-BRTk8i4O.mjs.map → magmonium-one-image-editor-DKiscgQU.mjs.map} +1 -1
  153. package/fesm2022/{magmonium-one-label-D_rU82nD.mjs → magmonium-one-label-lYMBMB7p.mjs} +2 -2
  154. package/fesm2022/{magmonium-one-label-D_rU82nD.mjs.map → magmonium-one-label-lYMBMB7p.mjs.map} +1 -1
  155. package/fesm2022/{magmonium-one-m-ref-CEms7B6-.mjs → magmonium-one-m-ref-DVe-WAYR.mjs} +2 -2
  156. package/fesm2022/{magmonium-one-m-ref-CEms7B6-.mjs.map → magmonium-one-m-ref-DVe-WAYR.mjs.map} +1 -1
  157. package/fesm2022/{magmonium-one-menu-cO34OcJc.mjs → magmonium-one-menu-DcqfcU1p.mjs} +6 -6
  158. package/fesm2022/{magmonium-one-menu-cO34OcJc.mjs.map → magmonium-one-menu-DcqfcU1p.mjs.map} +1 -1
  159. package/fesm2022/{magmonium-one-multi-range-Bq3_3NHg.mjs → magmonium-one-multi-range-m86SzSZO.mjs} +3 -3
  160. package/fesm2022/{magmonium-one-multi-range-Bq3_3NHg.mjs.map → magmonium-one-multi-range-m86SzSZO.mjs.map} +1 -1
  161. package/fesm2022/{magmonium-one-options-asset-BMd7W0Mk.mjs → magmonium-one-options-asset-CIKSNq4B.mjs} +2 -2
  162. package/fesm2022/{magmonium-one-options-asset-BMd7W0Mk.mjs.map → magmonium-one-options-asset-CIKSNq4B.mjs.map} +1 -1
  163. package/fesm2022/{magmonium-one-otp-V2tFztLx.mjs → magmonium-one-otp-BrR0mijm.mjs} +5 -5
  164. package/fesm2022/{magmonium-one-otp-V2tFztLx.mjs.map → magmonium-one-otp-BrR0mijm.mjs.map} +1 -1
  165. package/fesm2022/{magmonium-one-password-IdllPMUw.mjs → magmonium-one-password-CKIAFzs9.mjs} +6 -6
  166. package/fesm2022/{magmonium-one-password-IdllPMUw.mjs.map → magmonium-one-password-CKIAFzs9.mjs.map} +1 -1
  167. package/fesm2022/{magmonium-one-radio-BAL3-3j5.mjs → magmonium-one-radio-6oN9j_F6.mjs} +3 -3
  168. package/fesm2022/{magmonium-one-radio-BAL3-3j5.mjs.map → magmonium-one-radio-6oN9j_F6.mjs.map} +1 -1
  169. package/fesm2022/{magmonium-one-range-Cf7yUnhN.mjs → magmonium-one-range-BmimLpG6.mjs} +4 -4
  170. package/fesm2022/{magmonium-one-range-Cf7yUnhN.mjs.map → magmonium-one-range-BmimLpG6.mjs.map} +1 -1
  171. package/fesm2022/{magmonium-one-selector-DAEI_0JX.mjs → magmonium-one-selector-CLSwVQCJ.mjs} +4 -4
  172. package/fesm2022/{magmonium-one-selector-DAEI_0JX.mjs.map → magmonium-one-selector-CLSwVQCJ.mjs.map} +1 -1
  173. package/fesm2022/{magmonium-one-size-converter-BOBD8nHy.mjs → magmonium-one-size-converter-DFIowQHO.mjs} +13 -2
  174. package/fesm2022/magmonium-one-size-converter-DFIowQHO.mjs.map +1 -0
  175. package/fesm2022/{magmonium-one-text-BnTkYLJe.mjs → magmonium-one-text-evdqwPEz.mjs} +6 -6
  176. package/fesm2022/{magmonium-one-text-BnTkYLJe.mjs.map → magmonium-one-text-evdqwPEz.mjs.map} +1 -1
  177. package/fesm2022/{magmonium-one-text-output-BZU61QIF.mjs → magmonium-one-text-output-BnS5Skz-.mjs} +4 -4
  178. package/fesm2022/{magmonium-one-text-output-BZU61QIF.mjs.map → magmonium-one-text-output-BnS5Skz-.mjs.map} +1 -1
  179. package/fesm2022/magmonium-one-theme-DPBeYB-G.mjs +1 -0
  180. package/fesm2022/{magmonium-one-toggle-V_YnZXx5.mjs → magmonium-one-toggle-BIoiSggh.mjs} +3 -3
  181. package/fesm2022/{magmonium-one-toggle-V_YnZXx5.mjs.map → magmonium-one-toggle-BIoiSggh.mjs.map} +1 -1
  182. package/fesm2022/magmonium-one.mjs +10691 -10487
  183. package/fesm2022/magmonium-one.mjs.map +1 -1
  184. package/package.json +1 -1
  185. package/types/magmonium-one.d.ts +95 -21
  186. package/fesm2022/magmonium-one-color-utl-DI5p24iQ.mjs.map +0 -1
  187. package/fesm2022/magmonium-one-directives-B93p5bAL.mjs.map +0 -1
  188. package/fesm2022/magmonium-one-icon-C3jwzbb2.mjs.map +0 -1
  189. package/fesm2022/magmonium-one-size-converter-BOBD8nHy.mjs.map +0 -1
  190. package/fesm2022/magmonium-one-theme-DYvNIWmo.mjs +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"magmonium-one-base-dropdown-XpTWe4Ii.mjs","names":[],"sources":["../../../../libs/one/src/lib/shared/ui/input/ui/dropdown/dropdown-box.ts","../../../../libs/one/src/lib/shared/ui/input/ui/dropdown/base-dropdown.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n effect,\n ElementRef,\n inject,\n input,\n output,\n} from '@angular/core';\nimport { TranslatePipe } from '../../../../pipe/translate';\nimport { DropdownOption, DropdownValue } from '../../model/input';\n\n@Component({\n selector: 'm-dropdown-box',\n imports: [TranslatePipe],\n template: `\n <ul class=\"dropdown-box\" role=\"listbox\">\n @for (option of options(); track option.value; let i = $index) {\n @let selectedState = isSelected(option.value);\n <li\n class=\"dropdown-box__option\"\n [class.dropdown-box__option--selected]=\"selectedState\"\n [class.dropdown-box__option--disabled]=\"option.disabled\"\n [class.dropdown-box__option--active]=\"i === activeIndex()\"\n role=\"option\"\n [attr.aria-selected]=\"selectedState\"\n [attr.data-value]=\"option.value\"\n (click)=\"selectOption(option)\"\n (keydown.enter)=\"selectOption(option)\"\n tabindex=\"0\"\n >\n <!-- A group header is a row, never a choice: no box to tick. -->\n @if (multiple() && !option.disabled) {\n <input\n type=\"checkbox\"\n class=\"dropdown-box__checkbox\"\n [checked]=\"selectedState\"\n tabindex=\"-1\"\n (click)=\"$event.preventDefault()\"\n />\n }\n @if (option.noTranslate) {\n {{ option.label }}\n } @else {\n {{ option.label | translate }}\n }\n </li>\n } @empty {\n <li class=\"dropdown-box__empty\">\n {{ 'no-results-found' | translate }}\n </li>\n }\n </ul>\n `,\n styleUrl: './dropdown-box.sass',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DropdownBoxComponent {\n readonly options = input<DropdownOption<DropdownValue>[]>([]);\n /** The values ticked, as a list whichever Field drew the panel. */\n readonly selected = input<readonly DropdownValue[]>([]);\n readonly multiple = input<boolean>(false);\n readonly activeIndex = input<number>(-1);\n readonly action = output<DropdownOption<DropdownValue>>();\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n // Keep the keyboard-active option in view as ↑/↓ walk a scrolled list.\n constructor() {\n effect(() => {\n const index = this.activeIndex();\n if (index < 0) return;\n this.host.nativeElement\n .querySelectorAll('.dropdown-box__option')\n [index]?.scrollIntoView?.({ block: 'nearest' });\n });\n }\n\n protected readonly isSelected = (value: DropdownValue): boolean =>\n this.selected().includes(value);\n\n // Only emit a selection event for enabled options.\n protected readonly selectOption = (\n option: DropdownOption<DropdownValue>\n ): void => {\n if (option.disabled) return;\n this.action.emit(option);\n };\n}\n","import {\n computed,\n Directive,\n ElementRef,\n inject,\n input,\n inputBinding,\n linkedSignal,\n model,\n outputBinding,\n Signal,\n signal,\n viewChild,\n} from '@angular/core';\nimport { ValidationError, WithOptionalFieldTree } from '@angular/forms/signals';\nimport { LabelComponent } from '../label';\nimport { TextOutputComponent } from '../../../text-output';\nimport { BaseInputComponent } from '../../lib/base-input';\nimport { Button } from '../../../button/type/button';\nimport { ButtonComponent } from '../../../button/ui/button';\nimport { TranslateService } from '../../../../services';\nimport { SelectorConfig, SelectorDirective } from '../../../../directives';\nimport { Direction } from '../../../../directives/selector/selector-type';\nimport { DropdownBoxComponent } from './dropdown-box';\nimport {\n DropdownInput,\n DropdownOption,\n DropdownValue,\n TextInput,\n} from '../../model/input';\nimport { TextInputComponent } from '../text/text';\nimport { assetOptions } from '../../lib/options-asset';\n\n/** The trigger both option Fields draw: a searchable text input and a chevron. */\nexport const DROPDOWN_TEMPLATE = `\n @if (config(); as dropdown) {\n @if (dropdown.label) {\n <m-label\n [for]=\"dropdown.name ?? ''\"\n [placeholder]=\"dropdown.label\"\n [params]=\"dropdown.params\"\n [required]=\"required()\"\n [disabled]=\"disabled()\"\n />\n }\n <div\n class=\"trigger-wrap\"\n #wrapper\n [mSelector]=\"selectorConfig()\"\n [disabled]=\"disabled() || readonly() || !!config()?.readonly\"\n (opened)=\"onOpened()\"\n (closed)=\"onClosed()\"\n (focusin)=\"isFocused.set(true)\"\n (focusout)=\"isFocused.set(false)\"\n >\n <m-text-input\n [config]=\"triggerInputConfig()\"\n [value]=\"displayValue()\"\n [disabled]=\"disabled()\"\n [invalid]=\"invalid()\"\n [hideErrors]=\"true\"\n [(touched)]=\"touched\"\n [focused]=\"focused()\"\n (valueChange)=\"onInput($event)\"\n (click)=\"preventToggleWhenOpen($event)\"\n (keydown.space)=\"$event.stopPropagation()\"\n (keydown.enter)=\"onEnter($event)\"\n (keydown.arrowdown)=\"onArrow($event, 1)\"\n (keydown.arrowup)=\"onArrow($event, -1)\"\n (keydown.tab)=\"$event.stopPropagation()\"\n />\n <m-button [disabled]=\"disabled()\" [config]=\"chevron()\" />\n </div>\n @if (showErrors()) {\n @for (error of errors(); track $index) {\n <m-text-output\n variant=\"footer\"\n color=\"error\"\n [label]=\"error.message\"\n />\n }\n }\n }\n`;\n\nexport const DROPDOWN_IMPORTS = [\n LabelComponent,\n TextOutputComponent,\n TextInputComponent,\n ButtonComponent,\n SelectorDirective,\n];\n\n/**\n * Everything a Dropdown and a Multiselect share: the options, the search, the\n * keyboard walk and the panel. What differs is only what the Field holds — one\n * value or a list — so a subclass says which values are selected and what a\n * pick does to them.\n */\n@Directive()\nexport abstract class BaseDropdownComponent extends BaseInputComponent<DropdownInput> {\n public override config = input<Partial<DropdownInput> | undefined>();\n public override required = input<boolean>(false);\n public override disabled = input<boolean>(false);\n public override invalid = input<boolean>(false);\n public override touched = model<boolean>(false);\n public override focused = input<boolean>(false);\n public override errors = input<readonly WithOptionalFieldTree<ValidationError>[]>(\n []\n );\n public override showErrors = computed(() => this.touched() && this.invalid());\n\n readonly options = input<\n DropdownOption<DropdownValue>[] | Signal<DropdownOption<DropdownValue>[]>\n >();\n readonly dir = input<Direction>();\n readonly toggle = model(false);\n readonly searchTerm = signal('');\n readonly isFocused = signal(false);\n readonly chevron = computed(\n () =>\n <Button>{\n icon: this.toggle() ? 'chevron-up' : 'chevron-down',\n one: true,\n variant: 'ghost',\n // In-Field control, never the form's submit — without this the Button\n // reads as the submit control and greys out while the form is invalid.\n type: 'button',\n // Chevron tracks the trigger's border like the text input's own icon:\n // red while the Field shows errors, focus tint while focused, border at rest.\n color: this.showErrors()\n ? 'error'\n : this.isFocused()\n ? 'focus'\n : 'border',\n // The trigger input is the Field's tab stop; the chevron only repeats\n // what clicking that input already does, so Tab walks past it.\n tabindex: -1,\n }\n );\n\n /** The values the Field holds now, as a list whichever kind it is. */\n protected abstract readonly selectedValues: Signal<readonly DropdownValue[]>;\n /** Whether the panel ticks rows and stays open across picks. */\n protected abstract readonly multiple: boolean;\n /** What picking `option` does to the Field's value. */\n protected abstract selectOption(option: DropdownOption<DropdownValue>): void;\n\n protected readonly triggerInputConfig = computed(() => {\n const dropdown = this.config() as DropdownInput | undefined;\n return <Partial<TextInput>>{\n name: dropdown?.name,\n icon: dropdown?.icon,\n one: dropdown?.one,\n placeholder: this.placeholderText(),\n readonly: this.readonly() || !!dropdown?.readonly,\n };\n });\n\n protected readonly dropdownOptions = computed(\n (): DropdownOption<DropdownValue>[] => {\n const runtimeOptions = this.options();\n const source =\n runtimeOptions ?? (this.config() as DropdownInput | undefined)?.options;\n if (typeof source === 'function') return source();\n if (source?.length) return source;\n return this.assetOptions();\n }\n );\n\n private readonly translateService = inject(TranslateService);\n\n protected readonly assetOptions = assetOptions(\n () => (this.config() as DropdownInput | undefined)?.optionsAsset\n );\n\n /** An option's text: authored as it stands, a key translated. */\n private readonly optionLabel = (\n option?: DropdownOption<DropdownValue>\n ): string => {\n if (!option?.label) return '';\n return option.noTranslate\n ? option.label\n : this.translateService.translate(option.label);\n };\n\n protected readonly filteredOptions = computed(\n (): DropdownOption<DropdownValue>[] => {\n const search = this.searchTerm().toLowerCase();\n if (!search) return this.dropdownOptions();\n return this.dropdownOptions().filter((o) => {\n const label = this.optionLabel(o).toLowerCase();\n return (\n label.includes(search) ||\n String(o.value).toLowerCase().includes(search)\n );\n });\n }\n );\n\n /** The option ↑/↓ point at while the panel is open; -1 is none. Reset as the search narrows the list. */\n protected readonly activeIndex = linkedSignal<\n DropdownOption<DropdownValue>[],\n number\n >({\n source: this.filteredOptions,\n computation: (options) =>\n this.searchTerm() ? this.nextEnabled(options, -1, 1) : -1,\n });\n\n /** The enabled option `step` rows past `from`, wrapping; `from` itself when none. */\n private readonly nextEnabled = (\n options: DropdownOption<DropdownValue>[],\n from: number,\n step: 1 | -1\n ): number => {\n for (let i = 1; i <= options.length; i++) {\n const index =\n (((from + step * i) % options.length) + options.length) %\n options.length;\n if (!options[index].disabled) return index;\n }\n return from;\n };\n\n /** One pick reads as its option's label, several as a count. */\n private readonly selectionLabel = computed((): string => {\n const values = this.selectedValues();\n if (values.length === 0) return '';\n if (values.length === 1) {\n return this.optionLabel(\n this.dropdownOptions().find((o) => o.value === values[0])\n );\n }\n const translation = this.translateService.translate(\n `selected?count=${values.length}`\n );\n return translation.includes('selected')\n ? `${values.length} Selected`\n : translation;\n });\n\n protected readonly displayValue = computed((): string =>\n this.toggle() ? this.searchTerm() : this.selectionLabel()\n );\n\n protected readonly placeholderText = computed((): string => {\n if (this.toggle()) {\n const label = this.selectionLabel();\n if (label) return label;\n }\n const placeholder = (this.config() as DropdownInput | undefined)\n ?.placeholder;\n return placeholder ? this.translateService.translate(placeholder) : '';\n });\n\n private readonly wrapperRef =\n viewChild<ElementRef<HTMLDivElement>>('wrapper');\n\n protected readonly selectorConfig = computed<\n SelectorConfig<DropdownBoxComponent>\n >(() => ({\n component: DropdownBoxComponent,\n base: 'm-dropdown-input',\n matchTriggerWidth: true,\n toggle: true,\n dir: this.dir(),\n bindings: [\n inputBinding('options', this.filteredOptions),\n inputBinding('selected', this.selectedValues),\n inputBinding('multiple', () => this.multiple),\n inputBinding('activeIndex', this.activeIndex),\n outputBinding<DropdownOption<DropdownValue>>('action', (option) =>\n this.selectOption(option)\n ),\n ],\n }));\n\n /** Shuts the panel after a pick, the way a click on the trigger would. */\n protected readonly closePanel = (): void => {\n this.toggle.set(false);\n this.searchTerm.set('');\n setTimeout(() => this.wrapperRef()?.nativeElement.click(), 0);\n };\n\n protected readonly onOpened = (): void => {\n this.toggle.set(true);\n this.searchTerm.set('');\n const current = this.selectedValues()[0];\n this.activeIndex.set(\n this.filteredOptions().findIndex((o) => o.value === current)\n );\n };\n\n // Focus stays in the trigger input (it is the search box), so ↑/↓ move the\n // active option rather than DOM focus. Closed, ArrowDown bubbles on to\n // SelectorDirective, which opens the panel.\n protected readonly onArrow = (event: Event, step: 1 | -1): void => {\n if (!this.toggle()) return;\n event.preventDefault();\n this.activeIndex.update((index) =>\n this.nextEnabled(this.filteredOptions(), index, step)\n );\n };\n\n // Enter never reaches SelectorDirective (it would toggle the panel); open,\n // it picks the active option.\n protected readonly onEnter = (event: Event): void => {\n event.stopPropagation();\n if (!this.toggle()) return;\n event.preventDefault();\n const option = this.filteredOptions()[this.activeIndex()];\n if (option && !option.disabled) this.selectOption(option);\n };\n\n protected readonly onClosed = (): void => {\n this.toggle.set(false);\n this.searchTerm.set('');\n };\n\n protected readonly onInput = (value: string): void => {\n this.searchTerm.set(value);\n };\n\n protected readonly preventToggleWhenOpen = (event: Event): void => {\n if (this.toggle() || this.readonly() || this.config()?.readonly) {\n event.stopPropagation();\n }\n };\n}\n"],"mappings":";;;;;;;;;;;AAyDA,IAAa,uBAAb,MAAa,qBAAoB;CACtB,UAAU,MAAuC,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAEpD,WAAW,MAAgC,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAC9C,WAAW,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAChC,cAAc,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAC/B,SAAS,OAAM;CAEP,OAAO,OAAgC,UAAU;CAGlE,cAAA;EACE,aAAY;GACV,MAAM,QAAQ,KAAK,YAAW;GAC9B,IAAI,QAAQ,GAAG;GACf,KAAK,KAAK,cACP,iBAAiB,uBAAuB,CAAC,CACzC,MAAM,EAAE,iBAAiB,EAAE,OAAO,UAAS,CAAE;EAClD,CAAC;CACH;CAEmB,cAAc,UAC/B,KAAK,SAAQ,CAAE,CAAC,SAAS,KAAK;CAGb,gBACjB,WACQ;EACR,IAAI,OAAO,UAAU;EACrB,KAAK,OAAO,KAAK,MAAM;CACzB;CA9BW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAoB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAApB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAoB,cAAA;EAAA,UAAA;EAAA,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;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,QAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,GAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,cAAA;EAAA,CAAA;EAAA,YAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,WAAS,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
1
+ {"version":3,"file":"magmonium-one-base-dropdown-DIaimBpG.mjs","names":[],"sources":["../../../../libs/one/src/lib/shared/ui/input/ui/dropdown/dropdown-box.ts","../../../../libs/one/src/lib/shared/ui/input/ui/dropdown/base-dropdown.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n effect,\n ElementRef,\n inject,\n input,\n output,\n} from '@angular/core';\nimport { TranslatePipe } from '../../../../pipe/translate';\nimport { DropdownOption, DropdownValue } from '../../model/input';\n\n@Component({\n selector: 'm-dropdown-box',\n imports: [TranslatePipe],\n template: `\n <ul class=\"dropdown-box\" role=\"listbox\">\n @for (option of options(); track option.value; let i = $index) {\n @let selectedState = isSelected(option.value);\n <li\n class=\"dropdown-box__option\"\n [class.dropdown-box__option--selected]=\"selectedState\"\n [class.dropdown-box__option--disabled]=\"option.disabled\"\n [class.dropdown-box__option--active]=\"i === activeIndex()\"\n role=\"option\"\n [attr.aria-selected]=\"selectedState\"\n [attr.data-value]=\"option.value\"\n (click)=\"selectOption(option)\"\n (keydown.enter)=\"selectOption(option)\"\n tabindex=\"0\"\n >\n <!-- A group header is a row, never a choice: no box to tick. -->\n @if (multiple() && !option.disabled) {\n <input\n type=\"checkbox\"\n class=\"dropdown-box__checkbox\"\n [checked]=\"selectedState\"\n tabindex=\"-1\"\n (click)=\"$event.preventDefault()\"\n />\n }\n @if (option.noTranslate) {\n {{ option.label }}\n } @else {\n {{ option.label | translate }}\n }\n </li>\n } @empty {\n <li class=\"dropdown-box__empty\">\n {{ 'no-results-found' | translate }}\n </li>\n }\n </ul>\n `,\n styleUrl: './dropdown-box.sass',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DropdownBoxComponent {\n readonly options = input<DropdownOption<DropdownValue>[]>([]);\n /** The values ticked, as a list whichever Field drew the panel. */\n readonly selected = input<readonly DropdownValue[]>([]);\n readonly multiple = input<boolean>(false);\n readonly activeIndex = input<number>(-1);\n readonly action = output<DropdownOption<DropdownValue>>();\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n // Keep the keyboard-active option in view as ↑/↓ walk a scrolled list.\n constructor() {\n effect(() => {\n const index = this.activeIndex();\n if (index < 0) return;\n this.host.nativeElement\n .querySelectorAll('.dropdown-box__option')\n [index]?.scrollIntoView?.({ block: 'nearest' });\n });\n }\n\n protected readonly isSelected = (value: DropdownValue): boolean =>\n this.selected().includes(value);\n\n // Only emit a selection event for enabled options.\n protected readonly selectOption = (\n option: DropdownOption<DropdownValue>\n ): void => {\n if (option.disabled) return;\n this.action.emit(option);\n };\n}\n","import {\n computed,\n Directive,\n ElementRef,\n inject,\n input,\n inputBinding,\n linkedSignal,\n model,\n outputBinding,\n Signal,\n signal,\n viewChild,\n} from '@angular/core';\nimport { ValidationError, WithOptionalFieldTree } from '@angular/forms/signals';\nimport { LabelComponent } from '../label';\nimport { TextOutputComponent } from '../../../text-output';\nimport { BaseInputComponent } from '../../lib/base-input';\nimport { Button } from '../../../button/type/button';\nimport { ButtonComponent } from '../../../button/ui/button';\nimport { TranslateService } from '../../../../services';\nimport { SelectorConfig, SelectorDirective } from '../../../../directives';\nimport { Direction } from '../../../../directives/selector/selector-type';\nimport { DropdownBoxComponent } from './dropdown-box';\nimport {\n DropdownInput,\n DropdownOption,\n DropdownValue,\n TextInput,\n} from '../../model/input';\nimport { TextInputComponent } from '../text/text';\nimport { assetOptions } from '../../lib/options-asset';\n\n/** The trigger both option Fields draw: a searchable text input and a chevron. */\nexport const DROPDOWN_TEMPLATE = `\n @if (config(); as dropdown) {\n @if (dropdown.label) {\n <m-label\n [for]=\"dropdown.name ?? ''\"\n [placeholder]=\"dropdown.label\"\n [params]=\"dropdown.params\"\n [required]=\"required()\"\n [disabled]=\"disabled()\"\n />\n }\n <div\n class=\"trigger-wrap\"\n #wrapper\n [mSelector]=\"selectorConfig()\"\n [disabled]=\"disabled() || readonly() || !!config()?.readonly\"\n (opened)=\"onOpened()\"\n (closed)=\"onClosed()\"\n (focusin)=\"isFocused.set(true)\"\n (focusout)=\"isFocused.set(false)\"\n >\n <m-text-input\n [config]=\"triggerInputConfig()\"\n [value]=\"displayValue()\"\n [disabled]=\"disabled()\"\n [invalid]=\"invalid()\"\n [hideErrors]=\"true\"\n [(touched)]=\"touched\"\n [focused]=\"focused()\"\n (valueChange)=\"onInput($event)\"\n (click)=\"preventToggleWhenOpen($event)\"\n (keydown.space)=\"$event.stopPropagation()\"\n (keydown.enter)=\"onEnter($event)\"\n (keydown.arrowdown)=\"onArrow($event, 1)\"\n (keydown.arrowup)=\"onArrow($event, -1)\"\n (keydown.tab)=\"$event.stopPropagation()\"\n />\n <m-button [disabled]=\"disabled()\" [config]=\"chevron()\" />\n </div>\n @if (showErrors()) {\n @for (error of errors(); track $index) {\n <m-text-output\n variant=\"footer\"\n color=\"error\"\n [label]=\"error.message\"\n />\n }\n }\n }\n`;\n\nexport const DROPDOWN_IMPORTS = [\n LabelComponent,\n TextOutputComponent,\n TextInputComponent,\n ButtonComponent,\n SelectorDirective,\n];\n\n/**\n * Everything a Dropdown and a Multiselect share: the options, the search, the\n * keyboard walk and the panel. What differs is only what the Field holds — one\n * value or a list — so a subclass says which values are selected and what a\n * pick does to them.\n */\n@Directive()\nexport abstract class BaseDropdownComponent extends BaseInputComponent<DropdownInput> {\n public override config = input<Partial<DropdownInput> | undefined>();\n public override required = input<boolean>(false);\n public override disabled = input<boolean>(false);\n public override invalid = input<boolean>(false);\n public override touched = model<boolean>(false);\n public override focused = input<boolean>(false);\n public override errors = input<readonly WithOptionalFieldTree<ValidationError>[]>(\n []\n );\n public override showErrors = computed(() => this.touched() && this.invalid());\n\n readonly options = input<\n DropdownOption<DropdownValue>[] | Signal<DropdownOption<DropdownValue>[]>\n >();\n readonly dir = input<Direction>();\n readonly toggle = model(false);\n readonly searchTerm = signal('');\n readonly isFocused = signal(false);\n readonly chevron = computed(\n () =>\n <Button>{\n icon: this.toggle() ? 'chevron-up' : 'chevron-down',\n one: true,\n variant: 'ghost',\n // In-Field control, never the form's submit — without this the Button\n // reads as the submit control and greys out while the form is invalid.\n type: 'button',\n // Chevron tracks the trigger's border like the text input's own icon:\n // red while the Field shows errors, focus tint while focused, border at rest.\n color: this.showErrors()\n ? 'error'\n : this.isFocused()\n ? 'focus'\n : 'border',\n // The trigger input is the Field's tab stop; the chevron only repeats\n // what clicking that input already does, so Tab walks past it.\n tabindex: -1,\n }\n );\n\n /** The values the Field holds now, as a list whichever kind it is. */\n protected abstract readonly selectedValues: Signal<readonly DropdownValue[]>;\n /** Whether the panel ticks rows and stays open across picks. */\n protected abstract readonly multiple: boolean;\n /** What picking `option` does to the Field's value. */\n protected abstract selectOption(option: DropdownOption<DropdownValue>): void;\n\n protected readonly triggerInputConfig = computed(() => {\n const dropdown = this.config() as DropdownInput | undefined;\n return <Partial<TextInput>>{\n name: dropdown?.name,\n icon: dropdown?.icon,\n one: dropdown?.one,\n placeholder: this.placeholderText(),\n readonly: this.readonly() || !!dropdown?.readonly,\n };\n });\n\n protected readonly dropdownOptions = computed(\n (): DropdownOption<DropdownValue>[] => {\n const runtimeOptions = this.options();\n const source =\n runtimeOptions ?? (this.config() as DropdownInput | undefined)?.options;\n if (typeof source === 'function') return source();\n if (source?.length) return source;\n return this.assetOptions();\n }\n );\n\n private readonly translateService = inject(TranslateService);\n\n protected readonly assetOptions = assetOptions(\n () => (this.config() as DropdownInput | undefined)?.optionsAsset\n );\n\n /** An option's text: authored as it stands, a key translated. */\n private readonly optionLabel = (\n option?: DropdownOption<DropdownValue>\n ): string => {\n if (!option?.label) return '';\n return option.noTranslate\n ? option.label\n : this.translateService.translate(option.label);\n };\n\n protected readonly filteredOptions = computed(\n (): DropdownOption<DropdownValue>[] => {\n const search = this.searchTerm().toLowerCase();\n if (!search) return this.dropdownOptions();\n return this.dropdownOptions().filter((o) => {\n const label = this.optionLabel(o).toLowerCase();\n return (\n label.includes(search) ||\n String(o.value).toLowerCase().includes(search)\n );\n });\n }\n );\n\n /** The option ↑/↓ point at while the panel is open; -1 is none. Reset as the search narrows the list. */\n protected readonly activeIndex = linkedSignal<\n DropdownOption<DropdownValue>[],\n number\n >({\n source: this.filteredOptions,\n computation: (options) =>\n this.searchTerm() ? this.nextEnabled(options, -1, 1) : -1,\n });\n\n /** The enabled option `step` rows past `from`, wrapping; `from` itself when none. */\n private readonly nextEnabled = (\n options: DropdownOption<DropdownValue>[],\n from: number,\n step: 1 | -1\n ): number => {\n for (let i = 1; i <= options.length; i++) {\n const index =\n (((from + step * i) % options.length) + options.length) %\n options.length;\n if (!options[index].disabled) return index;\n }\n return from;\n };\n\n /** One pick reads as its option's label, several as a count. */\n private readonly selectionLabel = computed((): string => {\n const values = this.selectedValues();\n if (values.length === 0) return '';\n if (values.length === 1) {\n return this.optionLabel(\n this.dropdownOptions().find((o) => o.value === values[0])\n );\n }\n const translation = this.translateService.translate(\n `selected?count=${values.length}`\n );\n return translation.includes('selected')\n ? `${values.length} Selected`\n : translation;\n });\n\n protected readonly displayValue = computed((): string =>\n this.toggle() ? this.searchTerm() : this.selectionLabel()\n );\n\n protected readonly placeholderText = computed((): string => {\n if (this.toggle()) {\n const label = this.selectionLabel();\n if (label) return label;\n }\n const placeholder = (this.config() as DropdownInput | undefined)\n ?.placeholder;\n return placeholder ? this.translateService.translate(placeholder) : '';\n });\n\n private readonly wrapperRef =\n viewChild<ElementRef<HTMLDivElement>>('wrapper');\n\n protected readonly selectorConfig = computed<\n SelectorConfig<DropdownBoxComponent>\n >(() => ({\n component: DropdownBoxComponent,\n base: 'm-dropdown-input',\n matchTriggerWidth: true,\n toggle: true,\n dir: this.dir(),\n bindings: [\n inputBinding('options', this.filteredOptions),\n inputBinding('selected', this.selectedValues),\n inputBinding('multiple', () => this.multiple),\n inputBinding('activeIndex', this.activeIndex),\n outputBinding<DropdownOption<DropdownValue>>('action', (option) =>\n this.selectOption(option)\n ),\n ],\n }));\n\n /** Shuts the panel after a pick, the way a click on the trigger would. */\n protected readonly closePanel = (): void => {\n this.toggle.set(false);\n this.searchTerm.set('');\n setTimeout(() => this.wrapperRef()?.nativeElement.click(), 0);\n };\n\n protected readonly onOpened = (): void => {\n this.toggle.set(true);\n this.searchTerm.set('');\n const current = this.selectedValues()[0];\n this.activeIndex.set(\n this.filteredOptions().findIndex((o) => o.value === current)\n );\n };\n\n // Focus stays in the trigger input (it is the search box), so ↑/↓ move the\n // active option rather than DOM focus. Closed, ArrowDown bubbles on to\n // SelectorDirective, which opens the panel.\n protected readonly onArrow = (event: Event, step: 1 | -1): void => {\n if (!this.toggle()) return;\n event.preventDefault();\n this.activeIndex.update((index) =>\n this.nextEnabled(this.filteredOptions(), index, step)\n );\n };\n\n // Enter never reaches SelectorDirective (it would toggle the panel); open,\n // it picks the active option.\n protected readonly onEnter = (event: Event): void => {\n event.stopPropagation();\n if (!this.toggle()) return;\n event.preventDefault();\n const option = this.filteredOptions()[this.activeIndex()];\n if (option && !option.disabled) this.selectOption(option);\n };\n\n protected readonly onClosed = (): void => {\n this.toggle.set(false);\n this.searchTerm.set('');\n };\n\n protected readonly onInput = (value: string): void => {\n this.searchTerm.set(value);\n };\n\n protected readonly preventToggleWhenOpen = (event: Event): void => {\n if (this.toggle() || this.readonly() || this.config()?.readonly) {\n event.stopPropagation();\n }\n };\n}\n"],"mappings":";;;;;;;;;;;AAyDA,IAAa,uBAAb,MAAa,qBAAoB;CACtB,UAAU,MAAuC,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA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,CAAA"}
@@ -1,4 +1,4 @@
1
- import { i as resolveSize } from "./magmonium-one-size-converter-BOBD8nHy.mjs";
1
+ import { i as resolveSize } from "./magmonium-one-size-converter-DFIowQHO.mjs";
2
2
  import * as i0 from "@angular/core";
3
3
  import { Directive, ElementRef, computed, effect, inject, input, model } from "@angular/core";
4
4
  var BaseInputComponent = class BaseInputComponent {
@@ -180,4 +180,4 @@ i0.ɵɵngDeclareClassMetadata({
180
180
  });
181
181
  export { BaseInputComponent as t };
182
182
 
183
- //# sourceMappingURL=magmonium-one-base-input-C1Ek0Ezm.mjs.map
183
+ //# sourceMappingURL=magmonium-one-base-input-CZyIcKrn.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"magmonium-one-base-input-C1Ek0Ezm.mjs","names":[],"sources":["../../../../libs/one/src/lib/shared/ui/input/lib/base-input.ts"],"sourcesContent":["import {\n Directive,\n ElementRef,\n effect,\n inject,\n input,\n model,\n computed,\n InputSignal,\n ModelSignal,\n} from '@angular/core';\nimport { ValidationError, WithOptionalFieldTree } from '@angular/forms/signals';\nimport { Size } from '../../../enum/scaling/size';\nimport { Input } from '../model/input';\nimport { resolveSize } from '../../../functions/size/size-converter';\n\n@Directive({})\nexport class BaseInputComponent<T extends Input = Input> {\n public focused: InputSignal<boolean> = input<boolean>(false);\n public errors: InputSignal<readonly WithOptionalFieldTree<ValidationError>[]> =\n input<readonly WithOptionalFieldTree<ValidationError>[]>([]);\n public config: InputSignal<Partial<T> | undefined> = input<\n Partial<T> | undefined\n >();\n public required: InputSignal<boolean> = input<boolean>(false);\n public disabled: InputSignal<boolean> = input<boolean>(false);\n public invalid: InputSignal<boolean> = input<boolean>(false);\n public touched: ModelSignal<boolean> = model<boolean>(false);\n public readonly: InputSignal<boolean> = input<boolean>(false);\n\n protected readonly elementRef = inject(ElementRef);\n\n // SectionFormItem stamps Size onto config; inputs scale via CSS var\n // so size changes update without destroying the field. Uses CSS var because\n // host may have display: contents, but CSS vars still inherit to children.\n private readonly applyConfigSize = effect(() => {\n const configWithSize = this.config() as Partial<Input> & { size?: Size };\n const size = configWithSize?.size;\n const el = this.elementRef.nativeElement as HTMLElement;\n if (size) {\n const resolved = resolveSize(size);\n el.style.setProperty('--input-size', resolved);\n // Some input variants declare their own font-size on the rendered\n // control. Keep the actual input text synchronized with the size that\n // drives its geometry instead of relying only on inherited variables.\n el.style.fontSize = resolved;\n } else {\n el.style.removeProperty('--input-size');\n el.style.removeProperty('font-size');\n }\n });\n\n public showErrors = computed(() => \n (this.touched() === true || this.touched() + '' === 'true') && \n (this.invalid() === true || this.invalid() + '' === 'true')\n );\n}\n"],"mappings":";;;AAiBA,IAAa,qBAAb,MAAa,mBAAkB;CACtB,UAAgC,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CACrD,SACL,MAAyD,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CACvD,SAA8C,MAElD,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CACI,WAAiC,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CACtD,WAAiC,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CACtD,UAAgC,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CACrD,UAAgC,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CACrD,WAAiC,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAE1C,aAAa,OAAO,UAAU;CAKhC,kBAAkB,aAAY;EAE7C,MAAM,OADiB,KAAK,OACf,CAAA,EAAgB;EAC7B,MAAM,KAA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;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,UAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,SAAA,EAAA,SAAA,gBAAA;EAAA,UAAA;CAAA,CAAA;;AAAlB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAkB,YAAA,CAAA;EAD9B,MAAA;EAAU,MAAA,CAAA,CAAA,CAAE"}
1
+ {"version":3,"file":"magmonium-one-base-input-CZyIcKrn.mjs","names":[],"sources":["../../../../libs/one/src/lib/shared/ui/input/lib/base-input.ts"],"sourcesContent":["import {\n Directive,\n ElementRef,\n effect,\n inject,\n input,\n model,\n computed,\n InputSignal,\n ModelSignal,\n} from '@angular/core';\nimport { ValidationError, WithOptionalFieldTree } from '@angular/forms/signals';\nimport { Size } from '../../../enum/scaling/size';\nimport { Input } from '../model/input';\nimport { resolveSize } from '../../../functions/size/size-converter';\n\n@Directive({})\nexport class BaseInputComponent<T extends Input = Input> {\n public focused: InputSignal<boolean> = input<boolean>(false);\n public errors: InputSignal<readonly WithOptionalFieldTree<ValidationError>[]> =\n input<readonly WithOptionalFieldTree<ValidationError>[]>([]);\n public config: InputSignal<Partial<T> | undefined> = input<\n Partial<T> | undefined\n >();\n public required: InputSignal<boolean> = input<boolean>(false);\n public disabled: InputSignal<boolean> = input<boolean>(false);\n public invalid: InputSignal<boolean> = input<boolean>(false);\n public touched: ModelSignal<boolean> = model<boolean>(false);\n public readonly: InputSignal<boolean> = input<boolean>(false);\n\n protected readonly elementRef = inject(ElementRef);\n\n // SectionFormItem stamps Size onto config; inputs scale via CSS var\n // so size changes update without destroying the field. Uses CSS var because\n // host may have display: contents, but CSS vars still inherit to children.\n private readonly applyConfigSize = effect(() => {\n const configWithSize = this.config() as Partial<Input> & { size?: Size };\n const size = configWithSize?.size;\n const el = this.elementRef.nativeElement as HTMLElement;\n if (size) {\n const resolved = resolveSize(size);\n el.style.setProperty('--input-size', resolved);\n // Some input variants declare their own font-size on the rendered\n // control. Keep the actual input text synchronized with the size that\n // drives its geometry instead of relying only on inherited variables.\n el.style.fontSize = resolved;\n } else {\n el.style.removeProperty('--input-size');\n el.style.removeProperty('font-size');\n }\n });\n\n public showErrors = computed(() => \n (this.touched() === true || this.touched() + '' === 'true') && \n (this.invalid() === true || this.invalid() + '' === 'true')\n );\n}\n"],"mappings":";;;AAiBA,IAAa,qBAAb,MAAa,mBAAkB;CACtB,UAAgC,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CACrD,SACL,MAAyD,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CACvD,SAA8C,MAElD,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CACI,WAAiC,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CACtD,WAAiC,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CACtD,UAAgC,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CACrD,UAAgC,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CACrD,WAAiC,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAE1C,aAAa,OAAO,UAAU;CAKhC,kBAAkB,aAAY;EAE7C,MAAM,OADiB,KAAK,OACf,CAAA,EAAgB;EAC7B,MAAM,KAAK,KAAK,WAAW;EAC3B,IAAI,MAAM;GACR,MAAM,WAAW,YAAY,IAAI;GACjC,GAAG,MAAM,YAAY,gBAAgB,QAAQ;GAI7C,GAAG,MAAM,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AA,SAAA,EAAA,SAAA,gBAAA;EAAA,UAAA;CAAA,CAAA;;AAAlB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAkB,YAAA,CAAA;EAD9B,MAAA;EAAU,MAAA,CAAA,CAAA,CAAE"}
@@ -1,4 +1,4 @@
1
- import { t as BaseInputComponent } from "./magmonium-one-base-input-C1Ek0Ezm.mjs";
1
+ import { t as BaseInputComponent } from "./magmonium-one-base-input-CZyIcKrn.mjs";
2
2
  import * as i0 from "@angular/core";
3
3
  import { DOCUMENT, Directive, afterRenderEffect, computed, inject, model, signal, viewChild } from "@angular/core";
4
4
  function classListSignal(element) {
@@ -115,4 +115,4 @@ i0.ɵɵngDeclareClassMetadata({
115
115
  });
116
116
  export { getScrollParent as i, activeElementWithin as n, classListSignal as r, BaseTextInputComponent as t };
117
117
 
118
- //# sourceMappingURL=magmonium-one-base-text-Di2V2ojp.mjs.map
118
+ //# sourceMappingURL=magmonium-one-base-text-6T8KrJbz.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"magmonium-one-base-text-Di2V2ojp.mjs","names":[],"sources":["../../../../libs/one/src/lib/shared/functions/dom/element.ts","../../../../libs/one/src/lib/shared/ui/input/ui/text/base-text.ts"],"sourcesContent":["import { Signal, signal } from '@angular/core';\n\nexport function classListSignal(element: Element): Signal<string[]> {\n const classSignal = signal<string[]>(Array.from(element.classList));\n const observer = new MutationObserver(() => {\n classSignal.set(Array.from(element.classList));\n });\n observer.observe(element, { attributes: true, attributeFilter: ['class'] });\n return classSignal;\n}\n\n/**\n * Which element in `node`'s own root holds the caret — the document for a node\n * in the light DOM, the nearest shadow root for a node inside one — or null when\n * nothing there does.\n *\n * `document.activeElement` is the wrong question for anything that may be\n * mounted in a shadow root, and every Screen of an app loaded under m-ui is: the\n * Web Component wrapper gives the app's root `ViewEncapsulation.ShadowDom`, so\n * the app renders in one. Asked from inside, the document answers with the\n * shadow **host** — an ancestor of whoever is asking — and `contains` does not\n * walk across the boundary, so `node.contains(document.activeElement)` reads\n * false however well `node` holds the focus. The Section's search bar, asking\n * the document whether its own freshly-focused input still holds the caret,\n * therefore closes itself on the very click that opened it: the toggle is\n * destroyed, the input mounts, the deferred check sees the host instead of the\n * input, and `close` is called.\n *\n * Null is the honest answer for \"no caret has been placed here\", which is what\n * a caller guarding against stealing one is asking.\n */\nexport function activeElementWithin(node: Node): Element | null {\n const root = node.getRootNode() as Document | ShadowRoot;\n return root.activeElement ?? null;\n}\n\nexport function getScrollParent(node: Node | null): HTMLElement | Window {\n if (!node || node === document) return window;\n if (node instanceof ShadowRoot) {\n return getScrollParent(node.host);\n }\n if (node instanceof HTMLElement) {\n if (node.classList.contains('scroll__inner')) return node;\n const style = window.getComputedStyle(node);\n const overflow = style.overflowY || style.overflow || '';\n const isScrollable =\n overflow.includes('scroll') ||\n (overflow.includes('auto') && node.scrollHeight > node.clientHeight);\n if (isScrollable) return node;\n }\n return getScrollParent(node.parentNode);\n}\n","import {\n afterRenderEffect,\n computed,\n Directive,\n DOCUMENT,\n ElementRef,\n inject,\n model,\n ModelSignal,\n signal,\n viewChild,\n} from '@angular/core';\nimport { FormValueControl } from '@angular/forms/signals';\nimport { Input, TextInput } from '../../model/input';\nimport { BaseInputComponent } from '../../lib/base-input';\nimport { activeElementWithin } from '../../../../functions/dom/element';\n\n@Directive({})\nexport class BaseTextInputComponent<T extends Input = TextInput>\n extends BaseInputComponent<T>\n implements FormValueControl<string>\n{\n public value = model<string>() as ModelSignal<string>;\n\n private inputElement =\n viewChild<ElementRef<HTMLInputElement>>('inputElement');\n\n private readonly document = inject(DOCUMENT);\n\n /** The element this field has already claimed the caret for, once. */\n private autofocused: HTMLInputElement | undefined;\n\n constructor() {\n super();\n afterRenderEffect(() => {\n const element = this.inputElement();\n if (!this.focused() || !element) return;\n\n const node = element.nativeElement;\n // Once per element. A form that re-renders — an inspector rebuilt on\n // every store change — mounts a fresh input each time, and a focus per\n // mount is a focus per keystroke somewhere else on the screen.\n if (this.autofocused === node) return;\n\n // And never out of a surface the User is already working in. Same rule\n // the form makes for its own first field: a caret that has been placed\n // is theirs, not the next form's to take. Asked of the field's own root,\n // never of the document: inside a shadow root — where every field of an\n // app loaded under m-ui renders — the document answers with the shadow\n // host, so every field read as \"somebody else has the caret\" and not one\n // of them ever took it.\n const active = activeElementWithin(node);\n if (active && active !== this.document.body && active !== node) return;\n\n this.autofocused = node;\n node.focus();\n });\n }\n\n public readonly isFocused = signal(false);\n\n // Icon tracks the wrapper's border: =input-wrapper paints $error on error,\n // the focus tint on focus, and the border color at rest.\n public readonly iconColor = computed(() => {\n if (this.showErrors()) return 'error';\n if (this.isFocused()) return 'focus';\n return 'border';\n });\n\n protected readonly setValue = (value: string) => {\n this.value.set(value);\n this.touched.set(true);\n };\n}\n"],"mappings":";;;AAEA,SAAgB,gBAAgB,SAAgB;CAC9C,MAAM,cAAc,OAAiB,MAAM,KAAK,QAAQ,SAAS,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAInE,IAHqB,uBAAsB;EACzC,YAAY,IAAI,MAAM,KAAK,QAAQ,SAAS,CAAC;CAC/C,CACA,CAAA,CAAS,QAAQ,SAAS;EAAE,YAAY;EAAM,iBAAiB,CAAC,OAAO;CAAC,CAAE;CAC1E,OAAO;AACT;AAsBA,SAAgB,oBAAoB,MAAU;CAE5C,OADa,KAAK,YACX,CAAA,CAAK,iBAAiB;AAC/B;AAEA,SAAgB,gBAAgB,MAAiB;CAC/C,IAAI,CAAC,QAAQ,SAAS,UAAU,OAAO;CACvC,IAAI,gBAAgB,YAClB,OAAO,gBAAgB,KAAK,IAAI;CAElC,IAAI,gBAAgB,aAAa;EAC/B,IAAI,KAAK,UAAU,SAAS,eAAe,GAAG,OAAO;EACrD,MAAM,QAAQ,OAAO,iBAAiB,IAAI;EAC1C,MAAM,WAAW,MAAM,aAAa,MAAM,YAAY;EAItD,IAFE,SAAS,SAAS,QAAQ,KAC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A;GAAA,YAAA;GAAA,mBAAA;EAAA,EAAA;EAAA,SAAA,EAAA,OAAA,cAAA;EAAA,aAAA,CAAA;GAAA,cAAA;GAAA,OAAA;GAAA,WAAA,CAAA,cAAA;GAAA,aAAA;GAAA,UAAA;EAAA,CAAA;EAAA,iBAAA;EAAA,UAAA;CAAA,CAAA;;AAAtB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAsB,YAAA,CAAA;EADlC,MAAA;EAAU,MAAA,CAAA,CAAA,CAAE;CAQ+B,CAAA;CAAA,sBAAA,CAAA;CAAA,gBAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,GAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,aAAA;EAAA,CAAA;EAAA,cAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,gBAAc,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
1
+ {"version":3,"file":"magmonium-one-base-text-6T8KrJbz.mjs","names":[],"sources":["../../../../libs/one/src/lib/shared/functions/dom/element.ts","../../../../libs/one/src/lib/shared/ui/input/ui/text/base-text.ts"],"sourcesContent":["import { Signal, signal } from '@angular/core';\n\nexport function classListSignal(element: Element): Signal<string[]> {\n const classSignal = signal<string[]>(Array.from(element.classList));\n const observer = new MutationObserver(() => {\n classSignal.set(Array.from(element.classList));\n });\n observer.observe(element, { attributes: true, attributeFilter: ['class'] });\n return classSignal;\n}\n\n/**\n * Which element in `node`'s own root holds the caret — the document for a node\n * in the light DOM, the nearest shadow root for a node inside one — or null when\n * nothing there does.\n *\n * `document.activeElement` is the wrong question for anything that may be\n * mounted in a shadow root, and every Screen of an app loaded under m-ui is: the\n * Web Component wrapper gives the app's root `ViewEncapsulation.ShadowDom`, so\n * the app renders in one. Asked from inside, the document answers with the\n * shadow **host** — an ancestor of whoever is asking — and `contains` does not\n * walk across the boundary, so `node.contains(document.activeElement)` reads\n * false however well `node` holds the focus. The Section's search bar, asking\n * the document whether its own freshly-focused input still holds the caret,\n * therefore closes itself on the very click that opened it: the toggle is\n * destroyed, the input mounts, the deferred check sees the host instead of the\n * input, and `close` is called.\n *\n * Null is the honest answer for \"no caret has been placed here\", which is what\n * a caller guarding against stealing one is asking.\n */\nexport function activeElementWithin(node: Node): Element | null {\n const root = node.getRootNode() as Document | ShadowRoot;\n return root.activeElement ?? null;\n}\n\nexport function getScrollParent(node: Node | null): HTMLElement | Window {\n if (!node || node === document) return window;\n if (node instanceof ShadowRoot) {\n return getScrollParent(node.host);\n }\n if (node instanceof HTMLElement) {\n if (node.classList.contains('scroll__inner')) return node;\n const style = window.getComputedStyle(node);\n const overflow = style.overflowY || style.overflow || '';\n const isScrollable =\n overflow.includes('scroll') ||\n (overflow.includes('auto') && node.scrollHeight > node.clientHeight);\n if (isScrollable) return node;\n }\n return getScrollParent(node.parentNode);\n}\n","import {\n afterRenderEffect,\n computed,\n Directive,\n DOCUMENT,\n ElementRef,\n inject,\n model,\n ModelSignal,\n signal,\n viewChild,\n} from '@angular/core';\nimport { FormValueControl } from '@angular/forms/signals';\nimport { Input, TextInput } from '../../model/input';\nimport { BaseInputComponent } from '../../lib/base-input';\nimport { activeElementWithin } from '../../../../functions/dom/element';\n\n@Directive({})\nexport class BaseTextInputComponent<T extends Input = TextInput>\n extends BaseInputComponent<T>\n implements FormValueControl<string>\n{\n public value = model<string>() as ModelSignal<string>;\n\n private inputElement =\n viewChild<ElementRef<HTMLInputElement>>('inputElement');\n\n private readonly document = inject(DOCUMENT);\n\n /** The element this field has already claimed the caret for, once. */\n private autofocused: HTMLInputElement | undefined;\n\n constructor() {\n super();\n afterRenderEffect(() => {\n const element = this.inputElement();\n if (!this.focused() || !element) return;\n\n const node = element.nativeElement;\n // Once per element. A form that re-renders — an inspector rebuilt on\n // every store change — mounts a fresh input each time, and a focus per\n // mount is a focus per keystroke somewhere else on the screen.\n if (this.autofocused === node) return;\n\n // And never out of a surface the User is already working in. Same rule\n // the form makes for its own first field: a caret that has been placed\n // is theirs, not the next form's to take. Asked of the field's own root,\n // never of the document: inside a shadow root — where every field of an\n // app loaded under m-ui renders — the document answers with the shadow\n // host, so every field read as \"somebody else has the caret\" and not one\n // of them ever took it.\n const active = activeElementWithin(node);\n if (active && active !== this.document.body && active !== node) return;\n\n this.autofocused = node;\n node.focus();\n });\n }\n\n public readonly isFocused = signal(false);\n\n // Icon tracks the wrapper's border: =input-wrapper paints $error on error,\n // the focus tint on focus, and the border color at rest.\n public readonly iconColor = computed(() => {\n if (this.showErrors()) return 'error';\n if (this.isFocused()) return 'focus';\n return 'border';\n });\n\n protected readonly setValue = (value: string) => {\n this.value.set(value);\n this.touched.set(true);\n };\n}\n"],"mappings":";;;AAEA,SAAgB,gBAAgB,SAAgB;CAC9C,MAAM,cAAc,OAAiB,MAAM,KAAK,QAAQ,SAAS,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAInE,IAHqB,uBAAsB;EACzC,YAAY,IAAI,MAAM,KAAK,QAAQ,SAAS,CAAC;CAC/C,CACA,CAAA,CAAS,QAAQ,SAAS;EAAE,YAAY;EAAM,iBAAiB,CAAC,OAAO;CAAC,CAAE;CAC1E,OAAO;AACT;AAsBA,SAAgB,oBAAoB,MAAU;CAE5C,OADa,KAAK,YACX,CAAA,CAAK,iBAAiB;AAC/B;AAEA,SAAgB,gBAAgB,MAAiB;CAC/C,IAAI,CAAC,QAAQ,SAAS,UAAU,OAAO;CACvC,IAAI,gBAAgB,YAClB,OAAO,gBAAgB,KAAK,IAAI;CAElC,IAAI,gBAAgB,aAAa;EAC/B,IAAI,KAAK,UAAU,SAAS,eAAe,GAAG,OAAO;EACrD,MAAM,QAAQ,OAAO,iBAAiB,IAAI;EAC1C,MAAM,WAAW,MAAM,aAAa,MAAM,YAAY;EAItD,IAFE,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GAAA,YAAA;GAAA,UAAA;GAAA,YAAA;GAAA,mBAAA;EAAA,EAAA;EAAA,SAAA,EAAA,OAAA,cAAA;EAAA,aAAA,CAAA;GAAA,cAAA;GAAA,OAAA;GAAA,WAAA,CAAA,cAAA;GAAA,aAAA;GAAA,UAAA;EAAA,CAAA;EAAA,iBAAA;EAAA,UAAA;CAAA,CAAA;;AAAtB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAsB,YAAA,CAAA;EADlC,MAAA;EAAU,MAAA,CAAA,CAAA,CAAE;CAQ+B,CAAA;CAAA,sBAAA,CAAA;CAAA,gBAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,GAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,aAAA;EAAA,CAAA;EAAA,cAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,gBAAc,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
@@ -1,9 +1,9 @@
1
- import { K as NAV_STORE_REF, c as TranslatePipe, v as HttpService } from "./magmonium-one-size-converter-BOBD8nHy.mjs";
2
- import { n as resolvePallet } from "./magmonium-one-color-utl-DI5p24iQ.mjs";
3
- import "./magmonium-one-theme-DYvNIWmo.mjs";
4
- import { r as IconComponent } from "./magmonium-one-icon-C3jwzbb2.mjs";
5
- import { n as toAttrNumber, r as ConfigComponent, t as toAttrBool } from "./magmonium-one-attribute-value-C1lqou2L.mjs";
6
- import { t as MRefDirective } from "./magmonium-one-m-ref-CEms7B6-.mjs";
1
+ import { c as TranslatePipe, q as NAV_STORE_REF, v as HttpService } from "./magmonium-one-size-converter-DFIowQHO.mjs";
2
+ import { n as resolvePallet } from "./magmonium-one-color-utl-DklqRa3m.mjs";
3
+ import "./magmonium-one-theme-DPBeYB-G.mjs";
4
+ import { r as IconComponent } from "./magmonium-one-icon-Ce44a1mo.mjs";
5
+ import { n as toAttrNumber, r as ConfigComponent, t as toAttrBool } from "./magmonium-one-attribute-value-DnctyCKp.mjs";
6
+ import { t as MRefDirective } from "./magmonium-one-m-ref-DVe-WAYR.mjs";
7
7
  import * as i0 from "@angular/core";
8
8
  import { ChangeDetectionStrategy, Component, InjectionToken, ViewEncapsulation, computed, effect, forwardRef, inject, input, model, output, signal, viewChild } from "@angular/core";
9
9
  import { RouterModule } from "@angular/router";
@@ -1280,4 +1280,4 @@ i0.ɵɵngDeclareClassMetadata({
1280
1280
  });
1281
1281
  export { isButtonName as a, formatBadgeCount as c, deriveGroupClass as i, shouldShowBadge as l, SECTION_FORM_CONTEXT as n, ReactiveElementComponent as o, ImgComponent as r, BadgeComponent as s, ButtonComponent as t };
1282
1282
 
1283
- //# sourceMappingURL=magmonium-one-button-DZ4wCJgb.mjs.map
1283
+ //# sourceMappingURL=magmonium-one-button-BKGxIBhw.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"magmonium-one-button-DZ4wCJgb.mjs","names":[],"sources":["../../../../libs/one/src/lib/shared/ui/badge/lib/badge.ts","../../../../libs/one/src/lib/shared/ui/badge/ui/badge.ts","../../../../libs/one/src/lib/shared/lib/components/reactive-element.ts","../../../../libs/one/src/lib/shared/ui/button/lib/function/button.ts","../../../../libs/one/src/lib/shared/ui/button/lib/function/group.ts","../../../../libs/one/src/lib/shared/ui/img/img.ts","../../../../libs/one/src/lib/shared/ui/form/lib/section-form-context.token.ts","../../../../libs/one/src/lib/shared/ui/button/ui/button.ts","../../../../libs/one/src/lib/shared/ui/button/ui/button.html"],"sourcesContent":["import { Badge } from '../type/badge';\n\nexport const getBadgeClasses = (config: Badge | undefined): string => {\n if (!config) return 'badge';\n\n const classes = ['badge'];\n\n if (config.variant) {\n classes.push(`badge--${config.variant}`);\n }\n\n if (config.position && config.position !== 'static') {\n classes.push(`badge--${config.position}`);\n }\n\n if (config.animation && config.animation !== 'none') {\n classes.push(`badge--${config.animation}`);\n }\n\n return classes.join(' ');\n};\n\nexport const formatBadgeCount = (\n count: number | undefined,\n maxCount = 99\n): string => {\n if (count === undefined || count <= 0) return '';\n if (count > maxCount) return `${maxCount}+`;\n return count.toString();\n};\n\nexport const shouldShowBadge = (count: number | undefined): boolean =>\n count !== undefined && count > 0;\n\nexport const formatCount = formatBadgeCount;\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n model,\n} from '@angular/core';\nimport { ConfigComponent } from '../../../lib/components/config-component';\nimport { Badge } from '../type';\nimport { getBadgeClasses } from '../lib';\nimport { IconComponent } from '../../icon/ui/icon';\n\n@Component({\n selector: 'm-badge',\n imports: [IconComponent],\n template: `\n <span [class]=\"classes()\">\n @if (iconConfig(); as icon) {\n <m-icon [config]=\"icon\" />\n }\n <ng-content />\n @if (config()?.ping) {\n <span class=\"badge__ping\"></span>\n }\n </span>\n `,\n styleUrls: ['./badge.sass'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BadgeComponent extends ConfigComponent<Badge> {\n override readonly subFolder = 'badges';\n override config = model<Partial<Badge>>();\n\n protected readonly classes = computed(() => getBadgeClasses(this.config()));\n\n protected readonly iconConfig = computed(() => {\n const iconName = this.config()?.icon;\n if (!iconName) return undefined;\n const variant = this.config()?.variant;\n\n let color = '';\n if (variant === 'saas') {\n color = 'mm';\n } else if (variant === 'minimal') {\n color = 'textSecondary';\n } else {\n color = this.pallet()?.contrastColor || '';\n }\n\n return {\n name: iconName,\n color,\n };\n });\n}\n","import { effect, ElementRef, signal } from '@angular/core';\nimport { ConfigComponent } from './config-component';\nimport { Config } from '../../type/config/config-type';\n\n/**\n * Base class that provides reactive classList functionality for components with viewChild elements.\n * Extends ConfigComponent to inherit config management and color service functionality.\n */\nexport abstract class ReactiveElementComponent<\n T extends Config,\n> extends ConfigComponent<T> {\n /**\n * Abstract property that child classes must implement to specify which element to observe.\n * Should return the viewChild ElementRef that contains the DOM element to observe.\n */\n protected abstract element(): ElementRef | undefined;\n\n /**\n * Reactive signal containing the current classList of the observed element.\n * Updates automatically when the DOM element's classes change.\n */\n protected readonly classList = signal<string[]>([]);\n\n /**\n * MutationObserver instance for observing class changes.\n * Automatically managed by the component lifecycle.\n */\n private observer: MutationObserver | null = null;\n\n constructor() {\n super();\n\n // Set up reactive classList observation\n effect(() => {\n const el = this.element()?.nativeElement;\n\n // Cleanup previous observer\n if (this.observer) {\n this.observer.disconnect();\n this.observer = null;\n }\n\n if (!el) {\n this.classList.set([]);\n return;\n }\n\n // Set initial classList\n this.classList.set(Array.from(el.classList));\n\n // Set up MutationObserver for reactivity\n this.observer = new MutationObserver(() => {\n this.classList.set(Array.from(el.classList));\n });\n\n this.observer.observe(el, {\n attributes: true,\n attributeFilter: ['class'],\n });\n });\n }\n\n /**\n * Check if the element has a specific CSS class.\n * @param className - The class name to check for\n * @returns True if the element has the class, false otherwise\n */\n protected hasClass(className: string): boolean {\n return this.classList().includes(className);\n }\n\n /**\n * Toggle a CSS class on the element.\n * @param className - The class name to toggle\n * @param force - Optional boolean to force add (true) or remove (false)\n */\n protected toggleClass(className: string, force?: boolean): void {\n const el = this.element()?.nativeElement;\n if (!el) return;\n\n if (force !== undefined) {\n el.classList.toggle(className, force);\n } else {\n el.classList.toggle(className);\n }\n }\n\n /**\n * Add one or more CSS classes to the element.\n * @param classNames - The class names to add\n */\n protected addClass(...classNames: string[]): void {\n const el = this.element()?.nativeElement;\n if (!el) return;\n\n el.classList.add(...classNames);\n }\n\n /**\n * Remove one or more CSS classes from the element.\n * @param classNames - The class names to remove\n */\n protected removeClass(...classNames: string[]): void {\n const el = this.element()?.nativeElement;\n if (!el) return;\n\n el.classList.remove(...classNames);\n }\n\n /**\n * Replace one CSS class with another.\n * @param oldClass - The class to remove\n * @param newClass - The class to add\n */\n protected replaceClass(oldClass: string, newClass: string): void {\n const el = this.element()?.nativeElement;\n if (!el) return;\n\n el.classList.replace(oldClass, newClass);\n }\n\n /**\n * Set the complete classList, replacing all existing classes.\n * @param classNames - The new class names to set\n */\n protected setClassList(classNames: string[]): void {\n const el = this.element()?.nativeElement;\n if (!el) return;\n\n el.className = classNames.join(' ');\n }\n}\n","import { Button } from '../../type/button';\n\nexport function deriveButtonClass(button?: Button): string {\n if (!button) {\n return '';\n }\n const classList: string[] = [];\n if (button.icon || button.imgSrc) {\n if (!button.label || button.iconOnly) {\n classList.push('only-icon');\n }\n classList.push(button.isRightIcon ? 'with-right-icon' : 'with-left-icon');\n }\n if (button.variant === 'primary') {\n classList.push('primary');\n }\n if (button.variant === 'ghost') {\n classList.push('ghost');\n }\n if (button.variant === 'tab') {\n classList.push('tab');\n }\n if (button.fullWidth) {\n classList.push('full-width');\n }\n if (button.stacked) {\n classList.push('stacked');\n }\n if (button.badge) {\n classList.push('has-badge');\n }\n if (button.nonClickable) {\n classList.push('read-only');\n }\n return classList.join(' ');\n}\n\nexport function isButtonName(name: string, button?: Button): boolean {\n if (!button) {\n return false;\n }\n return button.name === name || button.label === name;\n}\n","import { ButtonGroup } from '../../type/button';\n\nexport function deriveGroupClass(group?: Partial<ButtonGroup>): string {\n if (!group) {\n return '';\n }\n const classList: string[] = [];\n classList.push(group?.vertical ? 'vertical' : 'horizontal');\n\n // Handle center for backward compatibility\n if (group?.center) {\n classList.push('center');\n }\n\n // Handle new align property (takes precedence over center)\n if (group?.align) {\n classList.push(`align-${group.align}`);\n }\n\n if (group?.primary) {\n classList.push('is-primary');\n }\n\n return classList.join(' ');\n}\n","import {\n Component,\n ChangeDetectionStrategy,\n inject,\n input,\n signal,\n effect,\n computed,\n} from '@angular/core';\nimport { NgOptimizedImage, IMAGE_LOADER, ImageLoaderConfig } from '@angular/common';\nimport { HttpService } from '../../services/http';\n\n@Component({\n selector: 'm-img',\n\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgOptimizedImage],\n host: {\n // The box is the container's: 100% wide and tall unless a caller names\n // width/height figures, which land as inline px on this element.\n '[style.width.px]': 'boxWidth()',\n '[style.height.px]': 'boxHeight()',\n },\n providers: [\n {\n provide: IMAGE_LOADER,\n useValue: (config: ImageLoaderConfig) => {\n const src = config.src;\n if (src.includes('iiif.archive.org')) {\n const match = src.match(/(\\/full\\/)([^/]+)(\\/0\\/)/);\n if (match && config.width) {\n return src.replace(/(\\/full\\/)[^/]+(\\/0\\/)/, `$1${config.width},$2`);\n }\n }\n return src;\n },\n },\n ],\n template: `\n <div\n class=\"m-img\"\n [class.m-img--loaded]=\"status() === 'loaded'\"\n [class.m-img--error]=\"showFallback()\"\n [class.m-img--fill]=\"fill()\"\n [class.m-img--priority]=\"priority()\"\n [class.m-img--sized]=\"isSized()\"\n >\n @if (showFallback()) {\n <div class=\"m-img__fallback\" role=\"img\" [attr.aria-label]=\"alt()\">\n <svg viewBox=\"0 0 320 240\" fill=\"none\" preserveAspectRatio=\"xMidYMid slice\">\n <circle cx=\"112\" cy=\"92\" r=\"22\" fill=\"currentColor\" />\n <path d=\"M40 200l72-72 56 56 40-40 72 72z\" fill=\"currentColor\" />\n </svg>\n </div>\n } @else if (isDataUri()) {\n <img\n class=\"m-img__img\"\n [src]=\"effectiveSrc()!\"\n [alt]=\"alt()\"\n (load)=\"onLoad()\"\n (error)=\"onError()\"\n [width]=\"widthAttr()\"\n [height]=\"heightAttr()\"\n referrerpolicy=\"no-referrer\"\n />\n } @else {\n <img\n class=\"m-img__img\"\n [ngSrc]=\"effectiveSrc()!\"\n [alt]=\"alt()\"\n [priority]=\"priority()\"\n (load)=\"onLoad()\"\n (error)=\"onError()\"\n [fill]=\"fill()\"\n [width]=\"widthAttr()\"\n [height]=\"heightAttr()\"\n [ngSrcset]=\"autoNgSrcset()!\"\n [sizes]=\"sizes() || undefined\"\n decoding=\"async\"\n referrerpolicy=\"no-referrer\"\n />\n }\n @if (status() === 'loading' && !priority()) {\n <div class=\"m-img__skeleton\"></div>\n }\n </div>\n `,\n styleUrl: './img.sass',\n})\nexport class ImgComponent {\n readonly #httpService = inject(HttpService);\n\n readonly src = input<string | null | undefined>();\n readonly data = input<string | null | undefined>();\n readonly dataType = input<string>('image/jpeg');\n readonly alt = input.required<string>();\n readonly priority = input<boolean>(false);\n readonly fill = input<boolean>(true);\n // Unset rather than defaulted: `1200 × 1800` is the reservation\n // NgOptimizedImage needs, and a picture drawn 1200px wide because nobody\n // named a width is not the same thing. `attrWidth`/`attrHeight` carry that\n // default onto the tag; these two say whether anyone actually asked.\n readonly width = input<number | undefined>(undefined);\n readonly height = input<number | undefined>(undefined);\n readonly remote = input<string | undefined>();\n readonly ngSrcset = input<string | undefined>();\n readonly sizes = input<string | undefined>();\n\n readonly attrWidth = computed(() => this.width() ?? 1200);\n readonly attrHeight = computed(() => this.height() ?? 1800);\n\n // On the tag only when the picture is not filling its box — a filling\n // picture is sized by its box, the others carry the reservation figures.\n readonly widthAttr = computed(() => (this.fill() ? undefined : this.attrWidth()));\n readonly heightAttr = computed(() => (this.fill() ? undefined : this.attrHeight()));\n\n // Null unless the picture is drawn at a size it was told: a filling picture\n // takes its size from the box around it, and an unnamed figure leaves the\n // stylesheet's `width: 100%` in charge.\n readonly boxWidth = computed(() =>\n this.fill() ? null : (this.width() ?? null)\n );\n readonly boxHeight = computed(() =>\n this.fill() ? null : (this.height() ?? null)\n );\n\n // Both figures named means a box of exactly that shape, which the picture\n // has to cover rather than letter-box inside.\n readonly isSized = computed(\n () => this.boxWidth() !== null && this.boxHeight() !== null\n );\n\n readonly autoNgSrcset = computed(() => {\n const custom = this.ngSrcset();\n if (custom !== undefined) return custom;\n\n const src = this.effectiveSrc();\n if (src && src.includes('iiif.archive.org')) {\n return this.fill() ? '480w, 768w, 960w, 1200w, 1920w, 2048w' : '1x, 2x';\n }\n\n return undefined;\n });\n\n // --- State ---\n // One signal rather than a loaded/error pair: the three states are\n // exclusive, and two booleans could say both or neither.\n readonly status = signal<'loading' | 'loaded' | 'error'>('loading');\n\n readonly effectiveSrc = computed(() => {\n const d = this.data();\n if (d) return `data:${this.dataType()};base64,${d}`;\n const src = this.src();\n const remote = this.remote();\n if (\n src &&\n remote &&\n !src.startsWith('http') &&\n !src.startsWith('data:') &&\n !src.startsWith('blob:')\n ) {\n return this.#httpService.buildWcAssetUrl(remote, src);\n }\n return src;\n });\n\n // The one stand-in this component draws, for every case that has no picture\n // to show: a load that failed, a url nobody set, and design mode, where a\n // picture is placed on the canvas long before it points anywhere.\n readonly showFallback = computed(\n () => this.status() === 'error' || !this.effectiveSrc()\n );\n\n readonly isDataUri = computed(() => {\n const s = this.effectiveSrc();\n return !!s && (s.startsWith('data:') || s.startsWith('blob:'));\n });\n\n constructor() {\n effect(() => {\n // A source change starts the wait over.\n const source = this.effectiveSrc();\n this.status.set(source ? 'loading' : 'error');\n });\n }\n\n onLoad() {\n this.status.set('loaded');\n }\n\n onError() {\n this.status.set('error');\n }\n}\n","import { InjectionToken, Signal } from '@angular/core';\nimport { FieldTree } from '@angular/forms/signals';\nimport { FieldPatterns } from './field-patterns';\n\n/**\n * Published by `<m-section-form>` for projected `<m-section-form-item>`s.\n * Each item looks up `form()[name]` and binds `FormField` so its value writes\n * to that key — not via a `name` input on the inner TextInputComponent.\n *\n * The form context carries form state and field registration for projected\n * items. Sizing is inherited through the section/form host CSS variables.\n *\n * Projected Buttons read it when their `isSubmit` flag is true. That Button\n * locks on `blocked` and fires `submit` on click rather than relying on a\n * native `type=\"submit\"` — content projection can put it inside an app\n * wrapper, where the native path no longer reaches the `<form>` ancestor.\n */\nexport interface SectionFormContext {\n readonly form: Signal<FieldTree<Record<string, unknown>> | null>;\n /**\n * Announces a key, and whether the Field on that key is required. The flag is\n * what turns `required` written on a tag into a validator on the FieldTree —\n * without it the attribute only reaches the native input, which a `novalidate`\n * form ignores, so nothing would ever be invalid (ADR 0010).\n *\n * `value` is the Field's own value, written on its tag: what the key starts\n * on when the form's `data` holds nothing for it.\n */\n readonly registerField: (\n name: string,\n required?: boolean,\n patterns?: FieldPatterns,\n value?: unknown\n ) => void;\n /**\n * An item has mounted its control. Content projection gives the form no\n * render hook of its own, so this is what tells it the DOM is finally\n * complete enough to pick the field that takes the caret.\n */\n readonly fieldMounted: () => void;\n /**\n * An item has started loading its control's chunk. Every control arrives\n * through a dynamic import, and the chunks resolve in whatever order the\n * loader finishes them — so a `password` below an `otp` can put its input in\n * the DOM first. The form waits for the count to fall back to zero before it\n * reads document order for the caret.\n */\n readonly fieldPending: () => void;\n /** That load ended — mounted, superseded, or failed. Always paired with `fieldPending`. */\n readonly fieldSettled: () => void;\n /** Drops a destroyed item's rules, so a removed Field stops blocking. */\n readonly releaseField: (name: string) => void;\n /** Invalid or disabled — every submit control is locked while true. */\n readonly blocked: Signal<boolean>;\n /** Emits the form's `submit` output with the whole merged data. No-op while blocked. */\n readonly submit: () => void;\n /**\n * Bumped every time the form writes values the User did not type — a `data`\n * restamp, a `reset()` after submit. A projected item observing its own\n * field's value signal cannot tell those moves from a keystroke, so the\n * form says so: a move under an unchanged version is the User's, and the\n * only move a Field's `dataChange` announces (libs/one ADR 0032).\n */\n readonly dataVersion: Signal<number>;\n}\n\nexport const SECTION_FORM_CONTEXT = new InjectionToken<SectionFormContext>(\n 'SECTION_FORM_CONTEXT'\n);\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n forwardRef,\n inject,\n input,\n model,\n output,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { IconComponent } from '../../icon';\nimport { BadgeComponent } from '../../badge';\nimport { ReactiveElementComponent } from '../../../lib/components/reactive-element';\nimport { TranslatePipe } from '../../../pipe/translate';\nimport { Button } from '../type/button';\nimport { deriveButtonClass } from '../lib';\nimport { formatBadgeCount } from '../../badge';\nimport {\n toAttrBool,\n toAttrNumber,\n} from '../../../functions/config/attribute-value';\nimport { MRefDirective } from '../../../directives/m-ref/m-ref';\nimport { NAV_STORE_REF } from '../../../config/tokens';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { ImgComponent } from '../../img/img';\n\nimport { resolvePallet } from '../../../lib/theme';\nimport { ThemeColor } from '@magmonium/cli';\nimport { SECTION_FORM_CONTEXT } from '../../form/lib/section-form-context.token';\n\n@Component({\n selector: 'm-button,m-one-button',\n templateUrl: './button.html',\n imports: [\n forwardRef(() => TranslatePipe),\n forwardRef(() => IconComponent),\n forwardRef(() => BadgeComponent),\n RouterModule,\n MRefDirective,\n forwardRef(() => NgTemplateOutlet),\n forwardRef(() => ImgComponent),\n ],\n styleUrls: ['./button.sass'],\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ButtonComponent extends ReactiveElementComponent<Button> {\n override config = model<Partial<Button>>();\n color = input<string | keyof ThemeColor | undefined>();\n labelClass = input<string | undefined>();\n fullWidth = input<boolean | string | undefined>();\n // NavRef — a NavId. The store reads the NavKind off that node to decide\n // route vs panel, so the Button never picks a link kind (ADR 0014).\n nav = input<string | undefined>();\n navParams = input<Record<string, string | number> | undefined>();\n href = input<string | undefined>();\n disabled = input<boolean | undefined>();\n variant = input<'primary' | 'ghost' | 'secondary' | 'tab' | undefined>();\n override name = input<string | undefined>();\n override baseUrl = input<string | undefined>();\n override one = input<boolean | undefined>();\n override remote = input<string | undefined>();\n override subFolder = 'buttons';\n // The rest of what a `buttons/<name>.yml` carries, so a one-off Button needs\n // no file (ADR 0010). `badge` is absent on purpose — it is an object, and an\n // object literal in markup is a lint error, so a badged Button still names\n // an asset or takes a bound config.\n label = input<string | undefined>();\n noTranslate = input<boolean | string | undefined>();\n // A Record, so it never rides as a literal attribute (ADR 0010) — it arrives\n // bound, from the page member holding every dynamic message value.\n params = input<Record<string, string> | undefined>();\n // When true, render a non-native element (div) instead of a <button>.\n // Use this when consumers explicitly need to avoid native <button> tags.\n noNative = input<boolean | string | undefined>();\n icon = input<string | undefined>();\n isRightIcon = input<boolean | string | undefined>();\n iconOnly = input<boolean | string | undefined>();\n stacked = input<boolean | string | undefined>();\n imgSrc = input<string | undefined>();\n nonClickable = input<boolean | string | undefined>();\n inverted = input<boolean | string | undefined>();\n isSubmit = input<boolean | string | undefined>();\n tabindex = input<number | string | undefined>();\n readonly clicked = output<Button | undefined>();\n button = viewChild<ElementRef>('button');\n protected element = this.button;\n protected readonly className = computed(() =>\n deriveButtonClass(this.config())\n );\n private readonly navRef = inject(NAV_STORE_REF, { optional: true });\n\n // Present only for a Button projected into an `m-section-form`. Absent\n // everywhere else, so every Button outside one behaves exactly as before.\n private readonly sectionForm = inject(SECTION_FORM_CONTEXT, {\n optional: true,\n });\n\n // Only an explicitly marked Button inside a Section Form submits it. A\n // navigating Button is excluded: its click already goes somewhere, and\n // submitting on the way out would save a form the User was leaving.\n // A form on a visual editor's Canvas is a picture of a form, and its empty\n // fields make it invalid from the first render — a submit that locked on\n // that would show the designer a greyed-out Button they never configured.\n protected readonly isFormSubmit = computed(() => {\n if (!this.sectionForm || this.isDesignMode) return false;\n const config = this.config();\n if (config?.nav || config?.href) return false;\n return config?.isSubmit === true;\n });\n\n // The form's own lock, on top of whatever the config already disables: an\n // invalid or disabled form has nothing to submit, so its submit control says\n // so rather than swallowing the click.\n protected readonly isDisabled = computed(\n () =>\n this.config()?.disabled === true ||\n (this.isFormSubmit() && !!this.sectionForm?.blocked())\n );\n // A NavRef pointing at a Murl node reads as selected when it is the open\n // panel. Compared by NavId — there is no link string left to normalise.\n private readonly isMurlActive = computed(() => {\n const nav = this.config()?.nav;\n if (!nav) return false;\n if (!this.navRef?.murl()?.length) return false;\n return this.navRef.id() === nav;\n });\n private readonly isPrimary = computed(() =>\n this.variant() === 'primary' ||\n this.config()?.variant === 'primary' ||\n this.hasClass('primary')\n );\n private readonly colorInput = computed(() =>\n this.color() || this.config()?.color || 'mm'\n );\n private readonly buttonColor = computed(() => {\n const color = this.colorInput();\n const isPrimary = this.isPrimary();\n if (isPrimary && color === 'inverseText') {\n return resolvePallet('mm', this.themeStore.color()).color;\n }\n const pallet = resolvePallet(color, this.themeStore.color());\n return isPrimary ? pallet.contrastColor : pallet.color;\n });\n\n constructor() {\n super();\n effect(() => {\n const isPrimary = this.isPrimary();\n const colorInput = this.colorInput();\n const el = this.elementRef.nativeElement;\n if (isPrimary && colorInput === 'inverseText') {\n el.style.setProperty('--m-button-color-contrast', this.buttonColor());\n el.style.setProperty('--m-one-button-color-contrast', this.buttonColor());\n }\n });\n }\n\n protected readonly buttonIcon = computed(() => {\n const name = this.config()?.icon;\n if (!name) {\n return undefined;\n }\n return {\n name: this.config()?.icon,\n color: this.buttonColor(),\n baseUrl: this.baseUrl(),\n remote: this.remote() ?? this.config()?.remote,\n };\n });\n private overrideProperty = computed<Partial<Button>>(() => {\n const button = {} as Partial<Button>;\n // The rest of what a `buttons/<name>.yml` carries, so a one-off Button\n // needs no file (ADR 0010). An omitted attribute is skipped rather than\n // written as undefined — writing it would blank whatever the asset set.\n const put = (key: keyof Button, value: unknown): void => {\n if (value !== undefined) (button as Record<string, unknown>)[key] = value;\n };\n put('label', this.label());\n put('icon', this.icon());\n put('imgSrc', this.imgSrc());\n put('tabindex', toAttrNumber(this.tabindex()));\n put('noTranslate', toAttrBool(this.noTranslate()));\n put('params', this.params());\n put('isRightIcon', toAttrBool(this.isRightIcon()));\n put('iconOnly', toAttrBool(this.iconOnly()));\n put('stacked', toAttrBool(this.stacked()));\n put('nonClickable', toAttrBool(this.nonClickable()));\n put('inverted', toAttrBool(this.inverted()));\n put('isSubmit', toAttrBool(this.isSubmit()));\n\n if (this.color()) {\n button['color'] = this.color();\n }\n if (this.labelClass()) {\n button['labelClass'] = this.labelClass();\n }\n if (typeof this.fullWidth() !== 'undefined') {\n button['fullWidth'] = toAttrBool(this.fullWidth());\n }\n if (this.nav()) {\n button['nav'] = this.nav();\n }\n if (this.navParams()) {\n button['navParams'] = this.navParams();\n }\n if (this.href()) {\n button['href'] = this.href();\n }\n if (typeof this.disabled() !== 'undefined') {\n button['disabled'] = this.disabled();\n }\n if (this.variant()) {\n button['variant'] = this.variant();\n }\n\n // Force primary and clear ghost if the color is 'inverse' or 'inverseText', unless explicitly ghost or secondary\n const finalColor = button.color || this.config()?.color;\n const isExplicitGhost =\n button.variant === 'ghost' || this.config()?.variant === 'ghost';\n const isExplicitSecondary =\n button.variant === 'secondary' ||\n (this.config()?.variant as string) === 'secondary';\n if (\n (finalColor === 'inverse' || finalColor === 'inverseText') &&\n !isExplicitGhost &&\n !isExplicitSecondary\n ) {\n button['color'] = 'inverseText';\n button['variant'] = 'primary';\n } else if (finalColor === 'inverse') {\n button['color'] = 'inverseText';\n }\n\n if (this.config()?.nav || this.nav()) {\n button['variant'] = this.isMurlActive() ? undefined : 'ghost';\n }\n\n return button;\n });\n\n protected override resolveComponentOverrides(): Partial<Button> {\n return this.overrideProperty();\n }\n\n public onClick() {\n if (this.isFormSubmit()) {\n // Called rather than left to a native `type=\"submit\"`: the `<form>` is\n // only an ancestor while nothing re-projects this Button out of it.\n this.sectionForm?.submit();\n }\n this.clicked.emit(this.config());\n }\n\n protected readonly formatBadgeCount = (count: number, max = 99): string =>\n formatBadgeCount(count, max);\n\n}\n","@if (config(); as config) {\n <!-- One branch for every in-app target: `mRef` names a NavId and the store\n reads the NavKind off that node to decide route vs panel (ADR 0014). -->\n @if (config.nav) {\n @if (!noNative()) {\n <button\n type=\"button\"\n class=\"{{ className() }}\"\n [attr.data-testid]=\"config.name + '-btn'\"\n [attr.tabindex]=\"config.tabindex\"\n [disabled]=\"config.disabled\"\n [mRef]=\"config.nav\"\n [mRefParams]=\"config.navParams\"\n [attr.aria-label]=\"config.noTranslate ? config.label : (config.label | translate: config.params)\"\n mRefLinkActive=\"tab\"\n (keydown.enter)=\"onClick()\"\n (click)=\"onClick()\"\n #button\n >\n <ng-container *ngTemplateOutlet=\"buttonContent; context: { button: config }\"></ng-container>\n </button>\n } @else {\n <div\n role=\"button\"\n [attr.tabindex]=\"config.tabindex ?? 0\"\n class=\"non-native {{ className() }}\"\n [attr.data-testid]=\"config.name + '-btn'\"\n [attr.aria-label]=\"config.noTranslate ? config.label : (config.label | translate: config.params)\"\n [attr.aria-disabled]=\"config.disabled ? 'true' : 'false'\"\n (keydown.enter)=\"onClick()\"\n (click)=\"onClick()\"\n #button\n >\n <ng-container *ngTemplateOutlet=\"buttonContent; context: { button: config }\"></ng-container>\n </div>\n }\n } @else if (config.href) {\n <a\n class=\"{{ className() }}\"\n [attr.data-testid]=\"config.name + '-btn'\"\n [attr.tabindex]=\"config.tabindex\"\n [href]=\"config.href\"\n [attr.aria-label]=\"config.noTranslate ? config.label : (config.label | translate: config.params)\"\n (click)=\"onClick()\"\n #button\n >\n <ng-container *ngTemplateOutlet=\"buttonContent; context: { button: config }\"></ng-container>\n </a>\n } @else {\n @if (!noNative()) {\n <button\n type=\"button\"\n class=\"{{ className() }}\"\n [attr.data-testid]=\"config.name + '-btn'\"\n [attr.tabindex]=\"config.tabindex\"\n [disabled]=\"isDisabled()\"\n [attr.aria-label]=\"config.noTranslate ? config.label : (config.label | translate: config.params)\"\n (keydown.enter)=\"onClick()\"\n (click)=\"onClick()\"\n #button\n >\n <ng-container *ngTemplateOutlet=\"buttonContent; context: { button: config }\"></ng-container>\n </button>\n } @else {\n <div\n role=\"button\"\n [attr.tabindex]=\"config.tabindex ?? 0\"\n class=\"non-native {{ className() }}\"\n [attr.data-testid]=\"config.name + '-btn'\"\n [attr.aria-label]=\"config.noTranslate ? config.label : (config.label | translate: config.params)\"\n [attr.aria-disabled]=\"isDisabled() ? 'true' : 'false'\"\n (keydown.enter)=\"onClick()\"\n (click)=\"onClick()\"\n #button\n >\n <ng-container *ngTemplateOutlet=\"buttonContent; context: { button: config }\"></ng-container>\n </div>\n }\n }\n}\n\n<ng-template #buttonContent let-button=\"button\">\n @if (button.imgSrc) {\n <div class=\"button-icon button-icon--img\">\n <m-img [src]=\"button.imgSrc\" [remote]=\"button.remote\" [alt]=\"button.label || button.name || ''\" />\n @if (button.badge && button.badge.count) {\n <m-badge\n [config]=\"{ variant: button.badge.variant ?? 'danger', position: 'absolute' }\"\n >{{ formatBadgeCount(button.badge.count) }}</m-badge\n >\n }\n </div>\n } @else if (buttonIcon(); as icon) {\n <div class=\"button-icon\">\n @if (isFromOne()) {\n <m-one-icon [config]=\"icon\" />\n } @else {\n <m-icon [config]=\"icon\" />\n }\n @if (button.badge && button.badge.count) {\n <m-badge\n [config]=\"{ variant: button.badge.variant ?? 'danger', position: 'absolute' }\"\n >{{ formatBadgeCount(button.badge.count) }}</m-badge\n >\n }\n </div>\n }\n @if (button.label && !button.iconOnly) {\n <span class=\"button-label {{ button.labelClass || '' }}\">\n {{ button.noTranslate ? button.label : (button.label | translate: button.params) }}\n </span>\n }\n @if (!buttonIcon() && button.badge && button.badge.count) {\n <m-badge [config]=\"{ variant: button.badge.variant ?? 'danger', position: 'static' }\">{{\n formatBadgeCount(button.badge.count)\n }}</m-badge>\n }\n</ng-template>\n"],"mappings":";;;;;;;;;;AAEA,MAAa,mBAAmB,WAAqC;CACnE,IAAI,CAAC,QAAQ,OAAO;CAEpB,MAAM,UAAU,CAAC,OAAO;CAExB,IAAI,OAAO,SACT,QAAQ,KAAK,UAAU,OAAO,SAAS;CAGzC,IAAI,OAAO,YAAY,OAAO,aAAa,UACzC,QAAQ,KAAK,UAAU,OAAO,UAAU;CAG1C,IAAI,OAAO,aAAa,OAAO,cAAc,QAC3C,QAAQ,KAAK,UAAU,OAAO,WAAW;CAG3C,OAAO,QAAQ,KAAK,GAAG;AACzB;AAEA,MAAa,oBACX,OACA,WAAW,OACD;CACV,IAAI,UAAU,UAAa,SAAS,GAAG,OAAO;CAC9C,IAAI,QAAQ,UAAU,OAAO,GAAG,SAAQ;CACxC,OAAO,MAAM,SAAQ;AACvB;AAEA,MAAa,mBAAmB,UAC9B,UAAU,UAAa,QAAQ;ACJjC,IAAa,iBAAb,MAAa,uBAAuB,gBAAsB;CACtC,YAAY;CACrB,SAAS,MAAuB,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CAEtB,UAAU,eAAe,gBAAgB,KAAK,OAAM,CAAE,GAAE,GAAA,YAAA,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,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,SAAA;EAAA,CAAA;EAAA,QAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,UAAQ,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
1
+ {"version":3,"file":"magmonium-one-button-BKGxIBhw.mjs","names":[],"sources":["../../../../libs/one/src/lib/shared/ui/badge/lib/badge.ts","../../../../libs/one/src/lib/shared/ui/badge/ui/badge.ts","../../../../libs/one/src/lib/shared/lib/components/reactive-element.ts","../../../../libs/one/src/lib/shared/ui/button/lib/function/button.ts","../../../../libs/one/src/lib/shared/ui/button/lib/function/group.ts","../../../../libs/one/src/lib/shared/ui/img/img.ts","../../../../libs/one/src/lib/shared/ui/form/lib/section-form-context.token.ts","../../../../libs/one/src/lib/shared/ui/button/ui/button.ts","../../../../libs/one/src/lib/shared/ui/button/ui/button.html"],"sourcesContent":["import { Badge } from '../type/badge';\n\nexport const getBadgeClasses = (config: Badge | undefined): string => {\n if (!config) return 'badge';\n\n const classes = ['badge'];\n\n if (config.variant) {\n classes.push(`badge--${config.variant}`);\n }\n\n if (config.position && config.position !== 'static') {\n classes.push(`badge--${config.position}`);\n }\n\n if (config.animation && config.animation !== 'none') {\n classes.push(`badge--${config.animation}`);\n }\n\n return classes.join(' ');\n};\n\nexport const formatBadgeCount = (\n count: number | undefined,\n maxCount = 99\n): string => {\n if (count === undefined || count <= 0) return '';\n if (count > maxCount) return `${maxCount}+`;\n return count.toString();\n};\n\nexport const shouldShowBadge = (count: number | undefined): boolean =>\n count !== undefined && count > 0;\n\nexport const formatCount = formatBadgeCount;\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n model,\n} from '@angular/core';\nimport { ConfigComponent } from '../../../lib/components/config-component';\nimport { Badge } from '../type';\nimport { getBadgeClasses } from '../lib';\nimport { IconComponent } from '../../icon/ui/icon';\n\n@Component({\n selector: 'm-badge',\n imports: [IconComponent],\n template: `\n <span [class]=\"classes()\">\n @if (iconConfig(); as icon) {\n <m-icon [config]=\"icon\" />\n }\n <ng-content />\n @if (config()?.ping) {\n <span class=\"badge__ping\"></span>\n }\n </span>\n `,\n styleUrls: ['./badge.sass'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BadgeComponent extends ConfigComponent<Badge> {\n override readonly subFolder = 'badges';\n override config = model<Partial<Badge>>();\n\n protected readonly classes = computed(() => getBadgeClasses(this.config()));\n\n protected readonly iconConfig = computed(() => {\n const iconName = this.config()?.icon;\n if (!iconName) return undefined;\n const variant = this.config()?.variant;\n\n let color = '';\n if (variant === 'saas') {\n color = 'mm';\n } else if (variant === 'minimal') {\n color = 'textSecondary';\n } else {\n color = this.pallet()?.contrastColor || '';\n }\n\n return {\n name: iconName,\n color,\n };\n });\n}\n","import { effect, ElementRef, signal } from '@angular/core';\nimport { ConfigComponent } from './config-component';\nimport { Config } from '../../type/config/config-type';\n\n/**\n * Base class that provides reactive classList functionality for components with viewChild elements.\n * Extends ConfigComponent to inherit config management and color service functionality.\n */\nexport abstract class ReactiveElementComponent<\n T extends Config,\n> extends ConfigComponent<T> {\n /**\n * Abstract property that child classes must implement to specify which element to observe.\n * Should return the viewChild ElementRef that contains the DOM element to observe.\n */\n protected abstract element(): ElementRef | undefined;\n\n /**\n * Reactive signal containing the current classList of the observed element.\n * Updates automatically when the DOM element's classes change.\n */\n protected readonly classList = signal<string[]>([]);\n\n /**\n * MutationObserver instance for observing class changes.\n * Automatically managed by the component lifecycle.\n */\n private observer: MutationObserver | null = null;\n\n constructor() {\n super();\n\n // Set up reactive classList observation\n effect(() => {\n const el = this.element()?.nativeElement;\n\n // Cleanup previous observer\n if (this.observer) {\n this.observer.disconnect();\n this.observer = null;\n }\n\n if (!el) {\n this.classList.set([]);\n return;\n }\n\n // Set initial classList\n this.classList.set(Array.from(el.classList));\n\n // Set up MutationObserver for reactivity\n this.observer = new MutationObserver(() => {\n this.classList.set(Array.from(el.classList));\n });\n\n this.observer.observe(el, {\n attributes: true,\n attributeFilter: ['class'],\n });\n });\n }\n\n /**\n * Check if the element has a specific CSS class.\n * @param className - The class name to check for\n * @returns True if the element has the class, false otherwise\n */\n protected hasClass(className: string): boolean {\n return this.classList().includes(className);\n }\n\n /**\n * Toggle a CSS class on the element.\n * @param className - The class name to toggle\n * @param force - Optional boolean to force add (true) or remove (false)\n */\n protected toggleClass(className: string, force?: boolean): void {\n const el = this.element()?.nativeElement;\n if (!el) return;\n\n if (force !== undefined) {\n el.classList.toggle(className, force);\n } else {\n el.classList.toggle(className);\n }\n }\n\n /**\n * Add one or more CSS classes to the element.\n * @param classNames - The class names to add\n */\n protected addClass(...classNames: string[]): void {\n const el = this.element()?.nativeElement;\n if (!el) return;\n\n el.classList.add(...classNames);\n }\n\n /**\n * Remove one or more CSS classes from the element.\n * @param classNames - The class names to remove\n */\n protected removeClass(...classNames: string[]): void {\n const el = this.element()?.nativeElement;\n if (!el) return;\n\n el.classList.remove(...classNames);\n }\n\n /**\n * Replace one CSS class with another.\n * @param oldClass - The class to remove\n * @param newClass - The class to add\n */\n protected replaceClass(oldClass: string, newClass: string): void {\n const el = this.element()?.nativeElement;\n if (!el) return;\n\n el.classList.replace(oldClass, newClass);\n }\n\n /**\n * Set the complete classList, replacing all existing classes.\n * @param classNames - The new class names to set\n */\n protected setClassList(classNames: string[]): void {\n const el = this.element()?.nativeElement;\n if (!el) return;\n\n el.className = classNames.join(' ');\n }\n}\n","import { Button } from '../../type/button';\n\nexport function deriveButtonClass(button?: Button): string {\n if (!button) {\n return '';\n }\n const classList: string[] = [];\n if (button.icon || button.imgSrc) {\n if (!button.label || button.iconOnly) {\n classList.push('only-icon');\n }\n classList.push(button.isRightIcon ? 'with-right-icon' : 'with-left-icon');\n }\n if (button.variant === 'primary') {\n classList.push('primary');\n }\n if (button.variant === 'ghost') {\n classList.push('ghost');\n }\n if (button.variant === 'tab') {\n classList.push('tab');\n }\n if (button.fullWidth) {\n classList.push('full-width');\n }\n if (button.stacked) {\n classList.push('stacked');\n }\n if (button.badge) {\n classList.push('has-badge');\n }\n if (button.nonClickable) {\n classList.push('read-only');\n }\n return classList.join(' ');\n}\n\nexport function isButtonName(name: string, button?: Button): boolean {\n if (!button) {\n return false;\n }\n return button.name === name || button.label === name;\n}\n","import { ButtonGroup } from '../../type/button';\n\nexport function deriveGroupClass(group?: Partial<ButtonGroup>): string {\n if (!group) {\n return '';\n }\n const classList: string[] = [];\n classList.push(group?.vertical ? 'vertical' : 'horizontal');\n\n // Handle center for backward compatibility\n if (group?.center) {\n classList.push('center');\n }\n\n // Handle new align property (takes precedence over center)\n if (group?.align) {\n classList.push(`align-${group.align}`);\n }\n\n if (group?.primary) {\n classList.push('is-primary');\n }\n\n return classList.join(' ');\n}\n","import {\n Component,\n ChangeDetectionStrategy,\n inject,\n input,\n signal,\n effect,\n computed,\n} from '@angular/core';\nimport { NgOptimizedImage, IMAGE_LOADER, ImageLoaderConfig } from '@angular/common';\nimport { HttpService } from '../../services/http';\n\n@Component({\n selector: 'm-img',\n\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgOptimizedImage],\n host: {\n // The box is the container's: 100% wide and tall unless a caller names\n // width/height figures, which land as inline px on this element.\n '[style.width.px]': 'boxWidth()',\n '[style.height.px]': 'boxHeight()',\n },\n providers: [\n {\n provide: IMAGE_LOADER,\n useValue: (config: ImageLoaderConfig) => {\n const src = config.src;\n if (src.includes('iiif.archive.org')) {\n const match = src.match(/(\\/full\\/)([^/]+)(\\/0\\/)/);\n if (match && config.width) {\n return src.replace(/(\\/full\\/)[^/]+(\\/0\\/)/, `$1${config.width},$2`);\n }\n }\n return src;\n },\n },\n ],\n template: `\n <div\n class=\"m-img\"\n [class.m-img--loaded]=\"status() === 'loaded'\"\n [class.m-img--error]=\"showFallback()\"\n [class.m-img--fill]=\"fill()\"\n [class.m-img--priority]=\"priority()\"\n [class.m-img--sized]=\"isSized()\"\n >\n @if (showFallback()) {\n <div class=\"m-img__fallback\" role=\"img\" [attr.aria-label]=\"alt()\">\n <svg viewBox=\"0 0 320 240\" fill=\"none\" preserveAspectRatio=\"xMidYMid slice\">\n <circle cx=\"112\" cy=\"92\" r=\"22\" fill=\"currentColor\" />\n <path d=\"M40 200l72-72 56 56 40-40 72 72z\" fill=\"currentColor\" />\n </svg>\n </div>\n } @else if (isDataUri()) {\n <img\n class=\"m-img__img\"\n [src]=\"effectiveSrc()!\"\n [alt]=\"alt()\"\n (load)=\"onLoad()\"\n (error)=\"onError()\"\n [width]=\"widthAttr()\"\n [height]=\"heightAttr()\"\n referrerpolicy=\"no-referrer\"\n />\n } @else {\n <img\n class=\"m-img__img\"\n [ngSrc]=\"effectiveSrc()!\"\n [alt]=\"alt()\"\n [priority]=\"priority()\"\n (load)=\"onLoad()\"\n (error)=\"onError()\"\n [fill]=\"fill()\"\n [width]=\"widthAttr()\"\n [height]=\"heightAttr()\"\n [ngSrcset]=\"autoNgSrcset()!\"\n [sizes]=\"sizes() || undefined\"\n decoding=\"async\"\n referrerpolicy=\"no-referrer\"\n />\n }\n @if (status() === 'loading' && !priority()) {\n <div class=\"m-img__skeleton\"></div>\n }\n </div>\n `,\n styleUrl: './img.sass',\n})\nexport class ImgComponent {\n readonly #httpService = inject(HttpService);\n\n readonly src = input<string | null | undefined>();\n readonly data = input<string | null | undefined>();\n readonly dataType = input<string>('image/jpeg');\n readonly alt = input.required<string>();\n readonly priority = input<boolean>(false);\n readonly fill = input<boolean>(true);\n // Unset rather than defaulted: `1200 × 1800` is the reservation\n // NgOptimizedImage needs, and a picture drawn 1200px wide because nobody\n // named a width is not the same thing. `attrWidth`/`attrHeight` carry that\n // default onto the tag; these two say whether anyone actually asked.\n readonly width = input<number | undefined>(undefined);\n readonly height = input<number | undefined>(undefined);\n readonly remote = input<string | undefined>();\n readonly ngSrcset = input<string | undefined>();\n readonly sizes = input<string | undefined>();\n\n readonly attrWidth = computed(() => this.width() ?? 1200);\n readonly attrHeight = computed(() => this.height() ?? 1800);\n\n // On the tag only when the picture is not filling its box — a filling\n // picture is sized by its box, the others carry the reservation figures.\n readonly widthAttr = computed(() => (this.fill() ? undefined : this.attrWidth()));\n readonly heightAttr = computed(() => (this.fill() ? undefined : this.attrHeight()));\n\n // Null unless the picture is drawn at a size it was told: a filling picture\n // takes its size from the box around it, and an unnamed figure leaves the\n // stylesheet's `width: 100%` in charge.\n readonly boxWidth = computed(() =>\n this.fill() ? null : (this.width() ?? null)\n );\n readonly boxHeight = computed(() =>\n this.fill() ? null : (this.height() ?? null)\n );\n\n // Both figures named means a box of exactly that shape, which the picture\n // has to cover rather than letter-box inside.\n readonly isSized = computed(\n () => this.boxWidth() !== null && this.boxHeight() !== null\n );\n\n readonly autoNgSrcset = computed(() => {\n const custom = this.ngSrcset();\n if (custom !== undefined) return custom;\n\n const src = this.effectiveSrc();\n if (src && src.includes('iiif.archive.org')) {\n return this.fill() ? '480w, 768w, 960w, 1200w, 1920w, 2048w' : '1x, 2x';\n }\n\n return undefined;\n });\n\n // --- State ---\n // One signal rather than a loaded/error pair: the three states are\n // exclusive, and two booleans could say both or neither.\n readonly status = signal<'loading' | 'loaded' | 'error'>('loading');\n\n readonly effectiveSrc = computed(() => {\n const d = this.data();\n if (d) return `data:${this.dataType()};base64,${d}`;\n const src = this.src();\n const remote = this.remote();\n if (\n src &&\n remote &&\n !src.startsWith('http') &&\n !src.startsWith('data:') &&\n !src.startsWith('blob:')\n ) {\n return this.#httpService.buildWcAssetUrl(remote, src);\n }\n return src;\n });\n\n // The one stand-in this component draws, for every case that has no picture\n // to show: a load that failed, a url nobody set, and design mode, where a\n // picture is placed on the canvas long before it points anywhere.\n readonly showFallback = computed(\n () => this.status() === 'error' || !this.effectiveSrc()\n );\n\n readonly isDataUri = computed(() => {\n const s = this.effectiveSrc();\n return !!s && (s.startsWith('data:') || s.startsWith('blob:'));\n });\n\n constructor() {\n effect(() => {\n // A source change starts the wait over.\n const source = this.effectiveSrc();\n this.status.set(source ? 'loading' : 'error');\n });\n }\n\n onLoad() {\n this.status.set('loaded');\n }\n\n onError() {\n this.status.set('error');\n }\n}\n","import { InjectionToken, Signal } from '@angular/core';\nimport { FieldTree } from '@angular/forms/signals';\nimport { FieldPatterns } from './field-patterns';\n\n/**\n * Published by `<m-section-form>` for projected `<m-section-form-item>`s.\n * Each item looks up `form()[name]` and binds `FormField` so its value writes\n * to that key — not via a `name` input on the inner TextInputComponent.\n *\n * The form context carries form state and field registration for projected\n * items. Sizing is inherited through the section/form host CSS variables.\n *\n * Projected Buttons read it when their `isSubmit` flag is true. That Button\n * locks on `blocked` and fires `submit` on click rather than relying on a\n * native `type=\"submit\"` — content projection can put it inside an app\n * wrapper, where the native path no longer reaches the `<form>` ancestor.\n */\nexport interface SectionFormContext {\n readonly form: Signal<FieldTree<Record<string, unknown>> | null>;\n /**\n * Announces a key, and whether the Field on that key is required. The flag is\n * what turns `required` written on a tag into a validator on the FieldTree —\n * without it the attribute only reaches the native input, which a `novalidate`\n * form ignores, so nothing would ever be invalid (ADR 0010).\n *\n * `value` is the Field's own value, written on its tag: what the key starts\n * on when the form's `data` holds nothing for it.\n */\n readonly registerField: (\n name: string,\n required?: boolean,\n patterns?: FieldPatterns,\n value?: unknown\n ) => void;\n /**\n * An item has mounted its control. Content projection gives the form no\n * render hook of its own, so this is what tells it the DOM is finally\n * complete enough to pick the field that takes the caret.\n */\n readonly fieldMounted: () => void;\n /**\n * An item has started loading its control's chunk. Every control arrives\n * through a dynamic import, and the chunks resolve in whatever order the\n * loader finishes them — so a `password` below an `otp` can put its input in\n * the DOM first. The form waits for the count to fall back to zero before it\n * reads document order for the caret.\n */\n readonly fieldPending: () => void;\n /** That load ended — mounted, superseded, or failed. Always paired with `fieldPending`. */\n readonly fieldSettled: () => void;\n /** Drops a destroyed item's rules, so a removed Field stops blocking. */\n readonly releaseField: (name: string) => void;\n /** Invalid or disabled — every submit control is locked while true. */\n readonly blocked: Signal<boolean>;\n /** Emits the form's `submit` output with the whole merged data. No-op while blocked. */\n readonly submit: () => void;\n /**\n * Bumped every time the form writes values the User did not type — a `data`\n * restamp, a `reset()` after submit. A projected item observing its own\n * field's value signal cannot tell those moves from a keystroke, so the\n * form says so: a move under an unchanged version is the User's, and the\n * only move a Field's `dataChange` announces (libs/one ADR 0032).\n */\n readonly dataVersion: Signal<number>;\n}\n\nexport const SECTION_FORM_CONTEXT = new InjectionToken<SectionFormContext>(\n 'SECTION_FORM_CONTEXT'\n);\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n forwardRef,\n inject,\n input,\n model,\n output,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { IconComponent } from '../../icon';\nimport { BadgeComponent } from '../../badge';\nimport { ReactiveElementComponent } from '../../../lib/components/reactive-element';\nimport { TranslatePipe } from '../../../pipe/translate';\nimport { Button } from '../type/button';\nimport { deriveButtonClass } from '../lib';\nimport { formatBadgeCount } from '../../badge';\nimport {\n toAttrBool,\n toAttrNumber,\n} from '../../../functions/config/attribute-value';\nimport { MRefDirective } from '../../../directives/m-ref/m-ref';\nimport { NAV_STORE_REF } from '../../../config/tokens';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { ImgComponent } from '../../img/img';\n\nimport { resolvePallet } from '../../../lib/theme';\nimport { ThemeColor } from '@magmonium/cli';\nimport { SECTION_FORM_CONTEXT } from '../../form/lib/section-form-context.token';\n\n@Component({\n selector: 'm-button,m-one-button',\n templateUrl: './button.html',\n imports: [\n forwardRef(() => TranslatePipe),\n forwardRef(() => IconComponent),\n forwardRef(() => BadgeComponent),\n RouterModule,\n MRefDirective,\n forwardRef(() => NgTemplateOutlet),\n forwardRef(() => ImgComponent),\n ],\n styleUrls: ['./button.sass'],\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ButtonComponent extends ReactiveElementComponent<Button> {\n override config = model<Partial<Button>>();\n color = input<string | keyof ThemeColor | undefined>();\n labelClass = input<string | undefined>();\n fullWidth = input<boolean | string | undefined>();\n // NavRef — a NavId. The store reads the NavKind off that node to decide\n // route vs panel, so the Button never picks a link kind (ADR 0014).\n nav = input<string | undefined>();\n navParams = input<Record<string, string | number> | undefined>();\n href = input<string | undefined>();\n disabled = input<boolean | undefined>();\n variant = input<'primary' | 'ghost' | 'secondary' | 'tab' | undefined>();\n override name = input<string | undefined>();\n override baseUrl = input<string | undefined>();\n override one = input<boolean | undefined>();\n override remote = input<string | undefined>();\n override subFolder = 'buttons';\n // The rest of what a `buttons/<name>.yml` carries, so a one-off Button needs\n // no file (ADR 0010). `badge` is absent on purpose — it is an object, and an\n // object literal in markup is a lint error, so a badged Button still names\n // an asset or takes a bound config.\n label = input<string | undefined>();\n noTranslate = input<boolean | string | undefined>();\n // A Record, so it never rides as a literal attribute (ADR 0010) — it arrives\n // bound, from the page member holding every dynamic message value.\n params = input<Record<string, string> | undefined>();\n // When true, render a non-native element (div) instead of a <button>.\n // Use this when consumers explicitly need to avoid native <button> tags.\n noNative = input<boolean | string | undefined>();\n icon = input<string | undefined>();\n isRightIcon = input<boolean | string | undefined>();\n iconOnly = input<boolean | string | undefined>();\n stacked = input<boolean | string | undefined>();\n imgSrc = input<string | undefined>();\n nonClickable = input<boolean | string | undefined>();\n inverted = input<boolean | string | undefined>();\n isSubmit = input<boolean | string | undefined>();\n tabindex = input<number | string | undefined>();\n readonly clicked = output<Button | undefined>();\n button = viewChild<ElementRef>('button');\n protected element = this.button;\n protected readonly className = computed(() =>\n deriveButtonClass(this.config())\n );\n private readonly navRef = inject(NAV_STORE_REF, { optional: true });\n\n // Present only for a Button projected into an `m-section-form`. Absent\n // everywhere else, so every Button outside one behaves exactly as before.\n private readonly sectionForm = inject(SECTION_FORM_CONTEXT, {\n optional: true,\n });\n\n // Only an explicitly marked Button inside a Section Form submits it. A\n // navigating Button is excluded: its click already goes somewhere, and\n // submitting on the way out would save a form the User was leaving.\n // A form on a visual editor's Canvas is a picture of a form, and its empty\n // fields make it invalid from the first render — a submit that locked on\n // that would show the designer a greyed-out Button they never configured.\n protected readonly isFormSubmit = computed(() => {\n if (!this.sectionForm || this.isDesignMode) return false;\n const config = this.config();\n if (config?.nav || config?.href) return false;\n return config?.isSubmit === true;\n });\n\n // The form's own lock, on top of whatever the config already disables: an\n // invalid or disabled form has nothing to submit, so its submit control says\n // so rather than swallowing the click.\n protected readonly isDisabled = computed(\n () =>\n this.config()?.disabled === true ||\n (this.isFormSubmit() && !!this.sectionForm?.blocked())\n );\n // A NavRef pointing at a Murl node reads as selected when it is the open\n // panel. Compared by NavId — there is no link string left to normalise.\n private readonly isMurlActive = computed(() => {\n const nav = this.config()?.nav;\n if (!nav) return false;\n if (!this.navRef?.murl()?.length) return false;\n return this.navRef.id() === nav;\n });\n private readonly isPrimary = computed(() =>\n this.variant() === 'primary' ||\n this.config()?.variant === 'primary' ||\n this.hasClass('primary')\n );\n private readonly colorInput = computed(() =>\n this.color() || this.config()?.color || 'mm'\n );\n private readonly buttonColor = computed(() => {\n const color = this.colorInput();\n const isPrimary = this.isPrimary();\n if (isPrimary && color === 'inverseText') {\n return resolvePallet('mm', this.themeStore.color()).color;\n }\n const pallet = resolvePallet(color, this.themeStore.color());\n return isPrimary ? pallet.contrastColor : pallet.color;\n });\n\n constructor() {\n super();\n effect(() => {\n const isPrimary = this.isPrimary();\n const colorInput = this.colorInput();\n const el = this.elementRef.nativeElement;\n if (isPrimary && colorInput === 'inverseText') {\n el.style.setProperty('--m-button-color-contrast', this.buttonColor());\n el.style.setProperty('--m-one-button-color-contrast', this.buttonColor());\n }\n });\n }\n\n protected readonly buttonIcon = computed(() => {\n const name = this.config()?.icon;\n if (!name) {\n return undefined;\n }\n return {\n name: this.config()?.icon,\n color: this.buttonColor(),\n baseUrl: this.baseUrl(),\n remote: this.remote() ?? this.config()?.remote,\n };\n });\n private overrideProperty = computed<Partial<Button>>(() => {\n const button = {} as Partial<Button>;\n // The rest of what a `buttons/<name>.yml` carries, so a one-off Button\n // needs no file (ADR 0010). An omitted attribute is skipped rather than\n // written as undefined — writing it would blank whatever the asset set.\n const put = (key: keyof Button, value: unknown): void => {\n if (value !== undefined) (button as Record<string, unknown>)[key] = value;\n };\n put('label', this.label());\n put('icon', this.icon());\n put('imgSrc', this.imgSrc());\n put('tabindex', toAttrNumber(this.tabindex()));\n put('noTranslate', toAttrBool(this.noTranslate()));\n put('params', this.params());\n put('isRightIcon', toAttrBool(this.isRightIcon()));\n put('iconOnly', toAttrBool(this.iconOnly()));\n put('stacked', toAttrBool(this.stacked()));\n put('nonClickable', toAttrBool(this.nonClickable()));\n put('inverted', toAttrBool(this.inverted()));\n put('isSubmit', toAttrBool(this.isSubmit()));\n\n if (this.color()) {\n button['color'] = this.color();\n }\n if (this.labelClass()) {\n button['labelClass'] = this.labelClass();\n }\n if (typeof this.fullWidth() !== 'undefined') {\n button['fullWidth'] = toAttrBool(this.fullWidth());\n }\n if (this.nav()) {\n button['nav'] = this.nav();\n }\n if (this.navParams()) {\n button['navParams'] = this.navParams();\n }\n if (this.href()) {\n button['href'] = this.href();\n }\n if (typeof this.disabled() !== 'undefined') {\n button['disabled'] = this.disabled();\n }\n if (this.variant()) {\n button['variant'] = this.variant();\n }\n\n // Force primary and clear ghost if the color is 'inverse' or 'inverseText', unless explicitly ghost or secondary\n const finalColor = button.color || this.config()?.color;\n const isExplicitGhost =\n button.variant === 'ghost' || this.config()?.variant === 'ghost';\n const isExplicitSecondary =\n button.variant === 'secondary' ||\n (this.config()?.variant as string) === 'secondary';\n if (\n (finalColor === 'inverse' || finalColor === 'inverseText') &&\n !isExplicitGhost &&\n !isExplicitSecondary\n ) {\n button['color'] = 'inverseText';\n button['variant'] = 'primary';\n } else if (finalColor === 'inverse') {\n button['color'] = 'inverseText';\n }\n\n if (this.config()?.nav || this.nav()) {\n button['variant'] = this.isMurlActive() ? undefined : 'ghost';\n }\n\n return button;\n });\n\n protected override resolveComponentOverrides(): Partial<Button> {\n return this.overrideProperty();\n }\n\n public onClick() {\n if (this.isFormSubmit()) {\n // Called rather than left to a native `type=\"submit\"`: the `<form>` is\n // only an ancestor while nothing re-projects this Button out of it.\n this.sectionForm?.submit();\n }\n this.clicked.emit(this.config());\n }\n\n protected readonly formatBadgeCount = (count: number, max = 99): string =>\n formatBadgeCount(count, max);\n\n}\n","@if (config(); as config) {\n <!-- One branch for every in-app target: `mRef` names a NavId and the store\n reads the NavKind off that node to decide route vs panel (ADR 0014). -->\n @if (config.nav) {\n @if (!noNative()) {\n <button\n type=\"button\"\n class=\"{{ className() }}\"\n [attr.data-testid]=\"config.name + '-btn'\"\n [attr.tabindex]=\"config.tabindex\"\n [disabled]=\"config.disabled\"\n [mRef]=\"config.nav\"\n [mRefParams]=\"config.navParams\"\n [attr.aria-label]=\"config.noTranslate ? config.label : (config.label | translate: config.params)\"\n mRefLinkActive=\"tab\"\n (keydown.enter)=\"onClick()\"\n (click)=\"onClick()\"\n #button\n >\n <ng-container *ngTemplateOutlet=\"buttonContent; context: { button: config }\"></ng-container>\n </button>\n } @else {\n <div\n role=\"button\"\n [attr.tabindex]=\"config.tabindex ?? 0\"\n class=\"non-native {{ className() }}\"\n [attr.data-testid]=\"config.name + '-btn'\"\n [attr.aria-label]=\"config.noTranslate ? config.label : (config.label | translate: config.params)\"\n [attr.aria-disabled]=\"config.disabled ? 'true' : 'false'\"\n (keydown.enter)=\"onClick()\"\n (click)=\"onClick()\"\n #button\n >\n <ng-container *ngTemplateOutlet=\"buttonContent; context: { button: config }\"></ng-container>\n </div>\n }\n } @else if (config.href) {\n <a\n class=\"{{ className() }}\"\n [attr.data-testid]=\"config.name + '-btn'\"\n [attr.tabindex]=\"config.tabindex\"\n [href]=\"config.href\"\n [attr.aria-label]=\"config.noTranslate ? config.label : (config.label | translate: config.params)\"\n (click)=\"onClick()\"\n #button\n >\n <ng-container *ngTemplateOutlet=\"buttonContent; context: { button: config }\"></ng-container>\n </a>\n } @else {\n @if (!noNative()) {\n <button\n type=\"button\"\n class=\"{{ className() }}\"\n [attr.data-testid]=\"config.name + '-btn'\"\n [attr.tabindex]=\"config.tabindex\"\n [disabled]=\"isDisabled()\"\n [attr.aria-label]=\"config.noTranslate ? config.label : (config.label | translate: config.params)\"\n (keydown.enter)=\"onClick()\"\n (click)=\"onClick()\"\n #button\n >\n <ng-container *ngTemplateOutlet=\"buttonContent; context: { button: config }\"></ng-container>\n </button>\n } @else {\n <div\n role=\"button\"\n [attr.tabindex]=\"config.tabindex ?? 0\"\n class=\"non-native {{ className() }}\"\n [attr.data-testid]=\"config.name + '-btn'\"\n [attr.aria-label]=\"config.noTranslate ? config.label : (config.label | translate: config.params)\"\n [attr.aria-disabled]=\"isDisabled() ? 'true' : 'false'\"\n (keydown.enter)=\"onClick()\"\n (click)=\"onClick()\"\n #button\n >\n <ng-container *ngTemplateOutlet=\"buttonContent; context: { button: config }\"></ng-container>\n </div>\n }\n }\n}\n\n<ng-template #buttonContent let-button=\"button\">\n @if (button.imgSrc) {\n <div class=\"button-icon button-icon--img\">\n <m-img [src]=\"button.imgSrc\" [remote]=\"button.remote\" [alt]=\"button.label || button.name || ''\" />\n @if (button.badge && button.badge.count) {\n <m-badge\n [config]=\"{ variant: button.badge.variant ?? 'danger', position: 'absolute' }\"\n >{{ formatBadgeCount(button.badge.count) }}</m-badge\n >\n }\n </div>\n } @else if (buttonIcon(); as icon) {\n <div class=\"button-icon\">\n @if (isFromOne()) {\n <m-one-icon [config]=\"icon\" />\n } @else {\n <m-icon [config]=\"icon\" />\n }\n @if (button.badge && button.badge.count) {\n <m-badge\n [config]=\"{ variant: button.badge.variant ?? 'danger', position: 'absolute' }\"\n >{{ formatBadgeCount(button.badge.count) }}</m-badge\n >\n }\n </div>\n }\n @if (button.label && !button.iconOnly) {\n <span class=\"button-label {{ button.labelClass || '' }}\">\n {{ button.noTranslate ? button.label : (button.label | translate: button.params) }}\n </span>\n }\n @if (!buttonIcon() && button.badge && button.badge.count) {\n <m-badge [config]=\"{ variant: button.badge.variant ?? 'danger', position: 'static' }\">{{\n formatBadgeCount(button.badge.count)\n }}</m-badge>\n }\n</ng-template>\n"],"mappings":";;;;;;;;;;AAEA,MAAa,mBAAmB,WAAqC;CACnE,IAAI,CAAC,QAAQ,OAAO;CAEpB,MAAM,UAAU,CAAC,OAAO;CAExB,IAAI,OAAO,SACT,QAAQ,KAAK,UAAU,OAAO,SAAS;CAGzC,IAAI,OAAO,YAAY,OAAO,aAAa,UACzC,QAAQ,KAAK,UAAU,OAAO,UAAU;CAG1C,IAAI,OAAO,aAAa,OAAO,cAAc,QAC3C,QAAQ,KAAK,UAAU,OAAO,WAAW;CAG3C,OAAO,QAAQ,KAAK,GAAG;AACzB;AAEA,MAAa,oBACX,OACA,WAAW,OACD;CACV,IAAI,UAAU,UAAa,SAAS,GAAG,OAAO;CAC9C,IAAI,QAAQ,UAAU,OAAO,GAAG,SAAQ;CACxC,OAAO,MAAM,SAAQ;AACvB;AAEA,MAAa,mBAAmB,UAC9B,UAAU,UAAa,QAAQ;ACJjC,IAAa,iBAAb,MAAa,uBAAuB,gBAAsB;CACtC,YAAY;CACrB,SAAS,MAAuB,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CAEtB,UAAU,eAAe,gBAAgB,KAAK,OAAM,CAAE,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA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A,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,SAAA;EAAA,CAAA;EAAA,QAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,UAAQ,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
@@ -1,8 +1,8 @@
1
1
  import { t as __exportAll } from "./magmonium-one-rolldown-runtime-DpJrqANO.mjs";
2
- import { t as LabelComponent } from "./magmonium-one-label-D_rU82nD.mjs";
3
- import { t as toAttrBool } from "./magmonium-one-attribute-value-C1lqou2L.mjs";
4
- import { t as TextOutputComponent } from "./magmonium-one-text-output-BZU61QIF.mjs";
5
- import { t as BaseCheckboxInputComponent } from "./magmonium-one-base-checkbox-CIxAiA4Q.mjs";
2
+ import { t as LabelComponent } from "./magmonium-one-label-lYMBMB7p.mjs";
3
+ import { t as toAttrBool } from "./magmonium-one-attribute-value-DnctyCKp.mjs";
4
+ import { t as TextOutputComponent } from "./magmonium-one-text-output-BnS5Skz-.mjs";
5
+ import { t as BaseCheckboxInputComponent } from "./magmonium-one-base-checkbox-D3Z1FTXU.mjs";
6
6
  import * as i0 from "@angular/core";
7
7
  import { ChangeDetectionStrategy, Component, InjectionToken, computed, input, model } from "@angular/core";
8
8
  const PLACED_CHECKBOX = new InjectionToken("PLACED_CHECKBOX");
@@ -362,4 +362,4 @@ i0.ɵɵngDeclareClassMetadata({
362
362
  });
363
363
  export { checkbox_exports as n, PLACED_CHECKBOX as r, CheckboxInputComponent as t };
364
364
 
365
- //# sourceMappingURL=magmonium-one-checkbox-R-hPZrCa.mjs.map
365
+ //# sourceMappingURL=magmonium-one-checkbox-D1W18OGo.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"magmonium-one-checkbox-R-hPZrCa.mjs","names":[],"sources":["../../../../libs/one/src/lib/shared/ui/input/lib/placed-checkbox.token.ts","../../../../libs/one/src/lib/shared/ui/input/ui/checkbox/checkbox.ts"],"sourcesContent":["import { InjectionToken, Signal } from '@angular/core';\nimport { DropdownOption } from '../model/input';\n\n/**\n * An `m-checkbox` placed between a SectionFormItem's tags as one option of its\n * CheckboxGroup (libs/one ADR 0039). Provided by the checkbox itself so the\n * item can collect its children without importing the checkbox chunk it only\n * lazy-loads. `undefined` until the checkbox names a `value`.\n */\nexport type PlacedCheckbox = {\n readonly option: Signal<DropdownOption | undefined>;\n};\n\nexport const PLACED_CHECKBOX = new InjectionToken<PlacedCheckbox>(\n 'PLACED_CHECKBOX'\n);\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n model,\n ModelSignal,\n} from '@angular/core';\nimport { BaseCheckboxInputComponent } from './base-checkbox';\nimport { LabelComponent } from '../label';\nimport { TextOutputComponent } from '../../../text-output';\nimport { ValidationError, WithOptionalFieldTree } from '@angular/forms/signals';\nimport { DropdownOption, Input } from '../../model/input';\nimport {\n PLACED_CHECKBOX,\n PlacedCheckbox,\n} from '../../lib/placed-checkbox.token';\nimport { toAttrBool } from '../../../../functions/config/attribute-value';\n\n@Component({\n selector: 'm-checkbox',\n template: `\n @if (config(); as checkbox) {\n <div class=\"checkbox\">\n <input\n [checked]=\"checked()\"\n #inputElement\n [class.error]=\"showErrors()\"\n [disabled]=\"disabled()\"\n (change)=\"onChange($event)\"\n type=\"checkbox\"\n [id]=\"checkbox.name\"\n />\n @if (labelText(); as text) {\n <m-label\n [for]=\"checkbox.name\"\n [placeholder]=\"text\"\n [params]=\"checkbox.params\"\n [noTranslate]=\"isNoTranslate()\"\n [required]=\"required()\"\n [disabled]=\"disabled()\"\n />\n }\n </div>\n @if (showErrors()) {\n @for (error of errors(); track $index) {\n <m-text-output\n variant=\"footer\"\n color=\"error\"\n [label]=\"error.message\"\n />\n }\n }\n }\n `,\n imports: [LabelComponent, TextOutputComponent],\n styleUrl: './checkbox.sass',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n { provide: PLACED_CHECKBOX, useExisting: CheckboxInputComponent },\n ],\n})\nexport class CheckboxInputComponent\n extends BaseCheckboxInputComponent\n implements PlacedCheckbox\n{\n public override value = undefined;\n public override checked = model<boolean>(false) as ModelSignal<boolean>;\n public override config = input<Partial<Input> | undefined>();\n public override required = input<boolean>(false);\n public override disabled = input<boolean>(false);\n public override invalid = input<boolean>(false);\n public override touched = model<boolean>(false);\n public override focused = input<boolean>(false);\n public override errors = input<readonly WithOptionalFieldTree<ValidationError>[]>(\n []\n );\n public override showErrors = computed(() => this.touched() && this.invalid());\n\n // What a checkbox placed inside a CheckboxGroup's SectionFormItem says about\n // the option it stands for, written on its own tag (ADR 0010, ADR 0039).\n // `value` is the attribute because it is the option's value; the member is\n // named apart because FormCheckboxControl pins `value` itself to undefined —\n // a checkbox control's value is `checked`.\n /* eslint-disable @angular-eslint/no-input-rename */\n public readonly optionValue = input<string | undefined>(undefined, {\n alias: 'value',\n });\n /* eslint-enable @angular-eslint/no-input-rename */\n public readonly label = input<string | undefined>();\n public readonly noTranslate = input<boolean | string | undefined>();\n\n protected readonly labelText = computed(\n () => this.label() ?? this.config()?.label\n );\n protected readonly isNoTranslate = computed(\n () => toAttrBool(this.noTranslate()) === true\n );\n\n public readonly option = computed((): DropdownOption | undefined => {\n const value = this.optionValue();\n if (!value) return undefined;\n return {\n value,\n label: this.label() ?? value,\n disabled: this.disabled() || undefined,\n noTranslate: this.isNoTranslate() || undefined,\n };\n });\n\n protected onChange(event: Event): void {\n const target = event.target as HTMLInputElement;\n this.setValue(target?.checked ?? false);\n }\n}\n"],"mappings":";;;;;;;AAaA,MAAa,kBAAkB,IAAI,eACjC,iBAAiB;;ACgDnB,IAAa,yBAAb,MAAa,+BACH,2BAA0B;CAGlB,QAAQ;CACR,UAAU,MAAe,KAAK;CAC9B,SAAS,MAAmC,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CAC5C,WAAW,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAChC,WAAW,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAChC,UAAU,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAC/B,UAAU,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAC/B,UAAU,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAC/B,SAAS,MACvB,CAAA,GACD,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CACe,aAAa,eAAe,KAAK,QAAO,KAAM,KAAK,QAAO,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CAQ7D,cAAc,MAA0B,QAAS;EAAA,GAAA,YAAA,EAAA,WAAA,cAAA,+BAAA,CAAA;EAC/D,OAAO;CAAO,CAAA;CAGA,QAAQ,MAA2B,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CACnC,cAAc,MAAqC,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAEhD,YAAY,eAC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mB;GAAC,iBAE7B,wBAAwB;GAAM,WACpC,CACT;IAAE,SAAS;IAAiB,aAAW;GAAwB,CAChE;GAAA,QAAA,CAAA,oljBAAA;EAAA,CAAA"}
1
+ {"version":3,"file":"magmonium-one-checkbox-D1W18OGo.mjs","names":[],"sources":["../../../../libs/one/src/lib/shared/ui/input/lib/placed-checkbox.token.ts","../../../../libs/one/src/lib/shared/ui/input/ui/checkbox/checkbox.ts"],"sourcesContent":["import { InjectionToken, Signal } from '@angular/core';\nimport { DropdownOption } from '../model/input';\n\n/**\n * An `m-checkbox` placed between a SectionFormItem's tags as one option of its\n * CheckboxGroup (libs/one ADR 0039). Provided by the checkbox itself so the\n * item can collect its children without importing the checkbox chunk it only\n * lazy-loads. `undefined` until the checkbox names a `value`.\n */\nexport type PlacedCheckbox = {\n readonly option: Signal<DropdownOption | undefined>;\n};\n\nexport const PLACED_CHECKBOX = new InjectionToken<PlacedCheckbox>(\n 'PLACED_CHECKBOX'\n);\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n model,\n ModelSignal,\n} from '@angular/core';\nimport { BaseCheckboxInputComponent } from './base-checkbox';\nimport { LabelComponent } from '../label';\nimport { TextOutputComponent } from '../../../text-output';\nimport { ValidationError, WithOptionalFieldTree } from '@angular/forms/signals';\nimport { DropdownOption, Input } from '../../model/input';\nimport {\n PLACED_CHECKBOX,\n PlacedCheckbox,\n} from '../../lib/placed-checkbox.token';\nimport { toAttrBool } from '../../../../functions/config/attribute-value';\n\n@Component({\n selector: 'm-checkbox',\n template: `\n @if (config(); as checkbox) {\n <div class=\"checkbox\">\n <input\n [checked]=\"checked()\"\n #inputElement\n [class.error]=\"showErrors()\"\n [disabled]=\"disabled()\"\n (change)=\"onChange($event)\"\n type=\"checkbox\"\n [id]=\"checkbox.name\"\n />\n @if (labelText(); as text) {\n <m-label\n [for]=\"checkbox.name\"\n [placeholder]=\"text\"\n [params]=\"checkbox.params\"\n [noTranslate]=\"isNoTranslate()\"\n [required]=\"required()\"\n [disabled]=\"disabled()\"\n />\n }\n </div>\n @if (showErrors()) {\n @for (error of errors(); track $index) {\n <m-text-output\n variant=\"footer\"\n color=\"error\"\n [label]=\"error.message\"\n />\n }\n }\n }\n `,\n imports: [LabelComponent, TextOutputComponent],\n styleUrl: './checkbox.sass',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n { provide: PLACED_CHECKBOX, useExisting: CheckboxInputComponent },\n ],\n})\nexport class CheckboxInputComponent\n extends BaseCheckboxInputComponent\n implements PlacedCheckbox\n{\n public override value = undefined;\n public override checked = model<boolean>(false) as ModelSignal<boolean>;\n public override config = input<Partial<Input> | undefined>();\n public override required = input<boolean>(false);\n public override disabled = input<boolean>(false);\n public override invalid = input<boolean>(false);\n public override touched = model<boolean>(false);\n public override focused = input<boolean>(false);\n public override errors = input<readonly WithOptionalFieldTree<ValidationError>[]>(\n []\n );\n public override showErrors = computed(() => this.touched() && this.invalid());\n\n // What a checkbox placed inside a CheckboxGroup's SectionFormItem says about\n // the option it stands for, written on its own tag (ADR 0010, ADR 0039).\n // `value` is the attribute because it is the option's value; the member is\n // named apart because FormCheckboxControl pins `value` itself to undefined —\n // a checkbox control's value is `checked`.\n /* eslint-disable @angular-eslint/no-input-rename */\n public readonly optionValue = input<string | undefined>(undefined, {\n alias: 'value',\n });\n /* eslint-enable @angular-eslint/no-input-rename */\n public readonly label = input<string | undefined>();\n public readonly noTranslate = input<boolean | string | undefined>();\n\n protected readonly labelText = computed(\n () => this.label() ?? this.config()?.label\n );\n protected readonly isNoTranslate = computed(\n () => toAttrBool(this.noTranslate()) === true\n );\n\n public readonly option = computed((): DropdownOption | undefined => {\n const value = this.optionValue();\n if (!value) return undefined;\n return {\n value,\n label: this.label() ?? value,\n disabled: this.disabled() || undefined,\n noTranslate: this.isNoTranslate() || undefined,\n };\n });\n\n protected onChange(event: Event): void {\n const target = event.target as HTMLInputElement;\n this.setValue(target?.checked ?? false);\n }\n}\n"],"mappings":";;;;;;;AAaA,MAA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