@mhmo91/schmancy 0.10.19 → 0.10.21

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 (371) hide show
  1. package/custom-elements.json +0 -62
  2. package/dist/agent/{overlay.confirm-body-D3jQyXgA.js → overlay.confirm-body-DXus8d-w.js} +1 -1
  3. package/dist/agent/{overlay.confirm-body-D3jQyXgA.js.map → overlay.confirm-body-DXus8d-w.js.map} +1 -1
  4. package/dist/agent/schmancy.agent.js +2043 -2083
  5. package/dist/agent/schmancy.agent.js.map +1 -1
  6. package/dist/agent/schmancy.manifest.json +1 -48
  7. package/dist/area-Cbkt0NX4.cjs +21 -0
  8. package/dist/area-Cbkt0NX4.cjs.map +1 -0
  9. package/dist/{area-BIipuSyO.js → area-Ddk7P5wD.js} +101 -131
  10. package/dist/area-Ddk7P5wD.js.map +1 -0
  11. package/dist/area.cjs +1 -1
  12. package/dist/area.js +1 -1
  13. package/dist/{autocomplete-B8CE5vGw.cjs → autocomplete-CfBFDSc3.cjs} +1 -1
  14. package/dist/{autocomplete-B8CE5vGw.cjs.map → autocomplete-CfBFDSc3.cjs.map} +1 -1
  15. package/dist/{autocomplete-Mrb3koUN.js → autocomplete-Ds3Q2cwR.js} +2 -2
  16. package/dist/{autocomplete-Mrb3koUN.js.map → autocomplete-Ds3Q2cwR.js.map} +1 -1
  17. package/dist/autocomplete.cjs +1 -1
  18. package/dist/autocomplete.js +1 -1
  19. package/dist/avatar.cjs +1 -1
  20. package/dist/avatar.js +1 -1
  21. package/dist/badge.cjs +1 -1
  22. package/dist/badge.js +1 -1
  23. package/dist/{boat-CNWIQPA1.js → boat-BF5P6p_f.js} +1 -1
  24. package/dist/{boat-CNWIQPA1.js.map → boat-BF5P6p_f.js.map} +1 -1
  25. package/dist/{boat-OatK_MGh.cjs → boat-BPN8HLzZ.cjs} +1 -1
  26. package/dist/{boat-OatK_MGh.cjs.map → boat-BPN8HLzZ.cjs.map} +1 -1
  27. package/dist/boat.cjs +1 -1
  28. package/dist/boat.js +1 -1
  29. package/dist/breadcrumb.cjs +1 -1
  30. package/dist/breadcrumb.js +1 -1
  31. package/dist/{busy-Cetzws-m.js → busy-BuACDJy6.js} +1 -1
  32. package/dist/{busy-Cetzws-m.js.map → busy-BuACDJy6.js.map} +1 -1
  33. package/dist/{busy-CMKX4oQf.cjs → busy-C7ejPa-Q.cjs} +1 -1
  34. package/dist/{busy-CMKX4oQf.cjs.map → busy-C7ejPa-Q.cjs.map} +1 -1
  35. package/dist/busy.cjs +1 -1
  36. package/dist/busy.js +1 -1
  37. package/dist/button.cjs +15 -9
  38. package/dist/button.cjs.map +1 -1
  39. package/dist/button.js +15 -9
  40. package/dist/button.js.map +1 -1
  41. package/dist/{card-8VXoo2C_.cjs → card-BIzaLuEg.cjs} +1 -1
  42. package/dist/{card-8VXoo2C_.cjs.map → card-BIzaLuEg.cjs.map} +1 -1
  43. package/dist/{card-D2k3dRL0.js → card-CgQwXO8L.js} +1 -1
  44. package/dist/{card-D2k3dRL0.js.map → card-CgQwXO8L.js.map} +1 -1
  45. package/dist/card.cjs +1 -1
  46. package/dist/card.js +1 -1
  47. package/dist/{checkbox-Cq5wzeaY.cjs → checkbox-BAqE3sTx.cjs} +1 -1
  48. package/dist/{checkbox-Cq5wzeaY.cjs.map → checkbox-BAqE3sTx.cjs.map} +1 -1
  49. package/dist/{checkbox-8hNsBejz.js → checkbox-BNdg57Om.js} +1 -1
  50. package/dist/{checkbox-8hNsBejz.js.map → checkbox-BNdg57Om.js.map} +1 -1
  51. package/dist/checkbox.cjs +1 -1
  52. package/dist/checkbox.js +1 -1
  53. package/dist/{chips-Dx_WvOGk.cjs → chips-DS3y4Lbn.cjs} +2 -4
  54. package/dist/chips-DS3y4Lbn.cjs.map +1 -0
  55. package/dist/{chips-D1kJrbzo.js → chips-DnqLaOb1.js} +3 -5
  56. package/dist/chips-DnqLaOb1.js.map +1 -0
  57. package/dist/chips.cjs +1 -1
  58. package/dist/chips.js +2 -2
  59. package/dist/connectivity.cjs +1 -1
  60. package/dist/connectivity.js +1 -1
  61. package/dist/content-drawer.cjs +1 -1
  62. package/dist/content-drawer.js +1 -1
  63. package/dist/{date-range-H903Vt_r.cjs → date-range-CsJfjbmi.cjs} +1 -1
  64. package/dist/{date-range-H903Vt_r.cjs.map → date-range-CsJfjbmi.cjs.map} +1 -1
  65. package/dist/{date-range-Dv-DM6mB.js → date-range-aPSmSBhk.js} +2 -2
  66. package/dist/{date-range-Dv-DM6mB.js.map → date-range-aPSmSBhk.js.map} +1 -1
  67. package/dist/{date-range-inline-Bvs2ZvEY.cjs → date-range-inline-CAa0_4EI.cjs} +1 -1
  68. package/dist/{date-range-inline-Bvs2ZvEY.cjs.map → date-range-inline-CAa0_4EI.cjs.map} +1 -1
  69. package/dist/{date-range-inline-TWWnTZlw.js → date-range-inline-PeRt1iIF.js} +1 -1
  70. package/dist/{date-range-inline-TWWnTZlw.js.map → date-range-inline-PeRt1iIF.js.map} +1 -1
  71. package/dist/date-range-inline.cjs +1 -1
  72. package/dist/date-range-inline.js +1 -1
  73. package/dist/date-range.cjs +1 -1
  74. package/dist/date-range.js +1 -1
  75. package/dist/delay.cjs +1 -1
  76. package/dist/delay.js +1 -1
  77. package/dist/{details-CwSDur6j.cjs → details-BnXbDpt7.cjs} +2 -2
  78. package/dist/details-BnXbDpt7.cjs.map +1 -0
  79. package/dist/{details-Cpg8sH2F.js → details-BpFjVclg.js} +2 -2
  80. package/dist/details-BpFjVclg.js.map +1 -0
  81. package/dist/details.cjs +1 -1
  82. package/dist/details.js +1 -1
  83. package/dist/directives.cjs +3 -3
  84. package/dist/directives.cjs.map +1 -1
  85. package/dist/directives.js +290 -203
  86. package/dist/directives.js.map +1 -1
  87. package/dist/{divider-BNdVLE0H.cjs → divider-B84lt1A3.cjs} +1 -1
  88. package/dist/{divider-BNdVLE0H.cjs.map → divider-B84lt1A3.cjs.map} +1 -1
  89. package/dist/{divider-Be833gGZ.js → divider-D8cBBkdG.js} +1 -1
  90. package/dist/{divider-Be833gGZ.js.map → divider-D8cBBkdG.js.map} +1 -1
  91. package/dist/divider.cjs +1 -1
  92. package/dist/divider.js +1 -1
  93. package/dist/dropdown.cjs +1 -1
  94. package/dist/dropdown.js +1 -1
  95. package/dist/{expand-CtoffNNj.js → expand-BJiKggfg.js} +2 -2
  96. package/dist/{expand-CtoffNNj.js.map → expand-BJiKggfg.js.map} +1 -1
  97. package/dist/{expand-BP6RLzHw.cjs → expand-DK-O37-j.cjs} +1 -1
  98. package/dist/{expand-BP6RLzHw.cjs.map → expand-DK-O37-j.cjs.map} +1 -1
  99. package/dist/expand.cjs +1 -1
  100. package/dist/expand.js +1 -1
  101. package/dist/{float-KmbhaQHA.js → float-B4FDN40h.js} +1 -1
  102. package/dist/{float-KmbhaQHA.js.map → float-B4FDN40h.js.map} +1 -1
  103. package/dist/{float-CfbQM_2v.cjs → float-RWR6Q1Hh.cjs} +1 -1
  104. package/dist/{float-CfbQM_2v.cjs.map → float-RWR6Q1Hh.cjs.map} +1 -1
  105. package/dist/float.cjs +1 -1
  106. package/dist/float.js +1 -1
  107. package/dist/{form-8IcmP8uV.js → form-Bz5WamuM.js} +8 -8
  108. package/dist/{form-8IcmP8uV.js.map → form-Bz5WamuM.js.map} +1 -1
  109. package/dist/{form-CuBIrKOA.cjs → form-PioZDvzA.cjs} +1 -1
  110. package/dist/{form-CuBIrKOA.cjs.map → form-PioZDvzA.cjs.map} +1 -1
  111. package/dist/form.cjs +1 -1
  112. package/dist/form.js +6 -6
  113. package/dist/handover/agent-runtime-followups.md +1 -1
  114. package/dist/handover/agent-runtime-v1.md +3 -3
  115. package/dist/{icons-D7df1ysG.js → icons-BgUbHwy8.js} +1 -1
  116. package/dist/{icons-D7df1ysG.js.map → icons-BgUbHwy8.js.map} +1 -1
  117. package/dist/{icons-BJld4JHp.cjs → icons-morK4hHz.cjs} +1 -1
  118. package/dist/{icons-BJld4JHp.cjs.map → icons-morK4hHz.cjs.map} +1 -1
  119. package/dist/icons.cjs +1 -1
  120. package/dist/icons.js +1 -1
  121. package/dist/{iframe-GT6D8l5Z.cjs → iframe-BXe1TPx1.cjs} +1 -1
  122. package/dist/{iframe-GT6D8l5Z.cjs.map → iframe-BXe1TPx1.cjs.map} +1 -1
  123. package/dist/{iframe-DAbgW9tT.js → iframe-CByrVlZy.js} +1 -1
  124. package/dist/{iframe-DAbgW9tT.js.map → iframe-CByrVlZy.js.map} +1 -1
  125. package/dist/iframe.cjs +1 -1
  126. package/dist/iframe.js +1 -1
  127. package/dist/index.cjs +1 -1
  128. package/dist/index.js +55 -56
  129. package/dist/{input-BE9wEEw4.cjs → input-BY9OCQWr.cjs} +1 -1
  130. package/dist/{input-BE9wEEw4.cjs.map → input-BY9OCQWr.cjs.map} +1 -1
  131. package/dist/{input-DC6ap_uN.js → input-Q0fm34Co.js} +2 -2
  132. package/dist/{input-DC6ap_uN.js.map → input-Q0fm34Co.js.map} +1 -1
  133. package/dist/{input-chip-MsiMu-b5.cjs → input-chip-BwNf3GD0.cjs} +1 -1
  134. package/dist/{input-chip-MsiMu-b5.cjs.map → input-chip-BwNf3GD0.cjs.map} +1 -1
  135. package/dist/{input-chip-c5n547tg.js → input-chip-CytUirVS.js} +1 -1
  136. package/dist/{input-chip-c5n547tg.js.map → input-chip-CytUirVS.js.map} +1 -1
  137. package/dist/input.cjs +1 -1
  138. package/dist/input.js +1 -1
  139. package/dist/json.cjs +1 -1
  140. package/dist/json.js +2 -2
  141. package/dist/kbd.cjs +1 -1
  142. package/dist/kbd.js +1 -1
  143. package/dist/layout.cjs +26 -1
  144. package/dist/layout.cjs.map +1 -0
  145. package/dist/layout.js +115 -2
  146. package/dist/layout.js.map +1 -0
  147. package/dist/{lightbox-CNX9Eg3U.js → lightbox-Ckvn5YNF.js} +1 -1
  148. package/dist/{lightbox-CNX9Eg3U.js.map → lightbox-Ckvn5YNF.js.map} +1 -1
  149. package/dist/{lightbox-HqJBBjAT.cjs → lightbox-p2E0oVR0.cjs} +1 -1
  150. package/dist/{lightbox-HqJBBjAT.cjs.map → lightbox-p2E0oVR0.cjs.map} +1 -1
  151. package/dist/lightbox.cjs +1 -1
  152. package/dist/lightbox.js +1 -1
  153. package/dist/{list-C76Pb-c1.js → list-CsrPVvmm.js} +1 -1
  154. package/dist/{list-C76Pb-c1.js.map → list-CsrPVvmm.js.map} +1 -1
  155. package/dist/{list-bhyuQSyO.cjs → list-r57UFHu3.cjs} +1 -1
  156. package/dist/{list-bhyuQSyO.cjs.map → list-r57UFHu3.cjs.map} +1 -1
  157. package/dist/list.cjs +1 -1
  158. package/dist/list.js +1 -1
  159. package/dist/{menu-BqKQ-s0C.cjs → menu-BOZ2iwed.cjs} +1 -1
  160. package/dist/{menu-BqKQ-s0C.cjs.map → menu-BOZ2iwed.cjs.map} +1 -1
  161. package/dist/{menu-C5ksITpG.js → menu-CxE16xur.js} +2 -2
  162. package/dist/{menu-C5ksITpG.js.map → menu-CxE16xur.js.map} +1 -1
  163. package/dist/menu.cjs +1 -1
  164. package/dist/menu.js +1 -1
  165. package/dist/mixins-DTCHPEd4.cjs +254 -0
  166. package/dist/{mixins-Du9HMrIG.cjs.map → mixins-DTCHPEd4.cjs.map} +1 -1
  167. package/dist/mixins-pU53qf6R.js +636 -0
  168. package/dist/{mixins-DCVXqL1Q.js.map → mixins-pU53qf6R.js.map} +1 -1
  169. package/dist/mixins.cjs +1 -1
  170. package/dist/mixins.js +1 -1
  171. package/dist/nav-drawer.cjs +1 -1
  172. package/dist/nav-drawer.js +1 -1
  173. package/dist/navigation-bar.cjs +1 -1
  174. package/dist/navigation-bar.js +1 -1
  175. package/dist/navigation-rail.cjs +1 -1
  176. package/dist/navigation-rail.js +1 -1
  177. package/dist/{notification-DR3gvWt8.cjs → notification-58tkVys8.cjs} +1 -1
  178. package/dist/{notification-DR3gvWt8.cjs.map → notification-58tkVys8.cjs.map} +1 -1
  179. package/dist/{notification-eZxtr3NN.js → notification-CgTBiAdf.js} +2 -2
  180. package/dist/{notification-eZxtr3NN.js.map → notification-CgTBiAdf.js.map} +1 -1
  181. package/dist/notification.cjs +1 -1
  182. package/dist/notification.js +1 -1
  183. package/dist/{option-BDOKUqTy.cjs → option-61YE3gub.cjs} +1 -1
  184. package/dist/{option-BDOKUqTy.cjs.map → option-61YE3gub.cjs.map} +1 -1
  185. package/dist/{option-CBEHYG4U.js → option-Bicf6xpI.js} +1 -1
  186. package/dist/{option-CBEHYG4U.js.map → option-Bicf6xpI.js.map} +1 -1
  187. package/dist/option.cjs +1 -1
  188. package/dist/option.js +1 -1
  189. package/dist/{overlay-DG6EeyKt.cjs → overlay-B3gKPWhu.cjs} +2 -2
  190. package/dist/overlay-B3gKPWhu.cjs.map +1 -0
  191. package/dist/{overlay-oxM9OLXP.js → overlay-D3mdWOLS.js} +12 -11
  192. package/dist/overlay-D3mdWOLS.js.map +1 -0
  193. package/dist/overlay.cjs +1 -1
  194. package/dist/{overlay.confirm-body-D_P2e7l6.js → overlay.confirm-body-Czi6cMZq.js} +1 -1
  195. package/dist/{overlay.confirm-body-D_P2e7l6.js.map → overlay.confirm-body-Czi6cMZq.js.map} +1 -1
  196. package/dist/{overlay.confirm-body-78e1WrN9.cjs → overlay.confirm-body-yr0HzS_d.cjs} +1 -1
  197. package/dist/{overlay.confirm-body-78e1WrN9.cjs.map → overlay.confirm-body-yr0HzS_d.cjs.map} +1 -1
  198. package/dist/overlay.js +3 -3
  199. package/dist/{overlay.service-C8NwO4Bx.js → overlay.service-BfZf3xoD.js} +2 -2
  200. package/dist/{overlay.service-C8NwO4Bx.js.map → overlay.service-BfZf3xoD.js.map} +1 -1
  201. package/dist/{overlay.service-DQkGPUY7.cjs → overlay.service-DNs3AWqp.cjs} +1 -1
  202. package/dist/{overlay.service-DQkGPUY7.cjs.map → overlay.service-DNs3AWqp.cjs.map} +1 -1
  203. package/dist/{progress-CMSst_2U.cjs → progress-D8XZJVl5.cjs} +1 -1
  204. package/dist/{progress-CMSst_2U.cjs.map → progress-D8XZJVl5.cjs.map} +1 -1
  205. package/dist/{progress-C4kDZfb7.js → progress-Zqx-S9NZ.js} +1 -1
  206. package/dist/{progress-C4kDZfb7.js.map → progress-Zqx-S9NZ.js.map} +1 -1
  207. package/dist/progress.cjs +1 -1
  208. package/dist/progress.js +1 -1
  209. package/dist/radio-group-D9MU1Mxz.js +71 -0
  210. package/dist/radio-group-D9MU1Mxz.js.map +1 -0
  211. package/dist/radio-group-bl8K4Gls.cjs +19 -0
  212. package/dist/radio-group-bl8K4Gls.cjs.map +1 -0
  213. package/dist/radio-group.cjs +1 -1
  214. package/dist/radio-group.js +1 -1
  215. package/dist/range.cjs +1 -1
  216. package/dist/range.js +1 -1
  217. package/dist/{rxjs-utils-Cs6XGwF6.js.map → rxjs-utils-BK8VMe3K.js.map} +1 -1
  218. package/dist/{rxjs-utils-Dsj75cJy.cjs.map → rxjs-utils-DhOKenkS.cjs.map} +1 -1
  219. package/dist/rxjs-utils.cjs +1 -1
  220. package/dist/rxjs-utils.js +1 -1
  221. package/dist/{select-UU2pB67h.js → select-CMwkl-D6.js} +3 -3
  222. package/dist/select-CMwkl-D6.js.map +1 -0
  223. package/dist/select-COIfVtZl.cjs +56 -0
  224. package/dist/select-COIfVtZl.cjs.map +1 -0
  225. package/dist/select.cjs +1 -1
  226. package/dist/select.js +1 -1
  227. package/dist/skeleton.cjs +1 -1
  228. package/dist/skeleton.js +1 -1
  229. package/dist/skills/SKILL.md +18 -2
  230. package/dist/skills/area.md +13 -0
  231. package/dist/skills/overlay.md +13 -0
  232. package/dist/skills/page.md +71 -29
  233. package/dist/skills/schmancy/SKILL.md +18 -2
  234. package/dist/skills/schmancy/area.md +13 -0
  235. package/dist/skills/schmancy/overlay.md +13 -0
  236. package/dist/skills/schmancy/page.md +71 -29
  237. package/dist/slider.cjs +1 -1
  238. package/dist/slider.js +1 -1
  239. package/dist/{splash-screen-BvaDkvJU.cjs → splash-screen-2hxq8Sft.cjs} +1 -1
  240. package/dist/{splash-screen-BvaDkvJU.cjs.map → splash-screen-2hxq8Sft.cjs.map} +1 -1
  241. package/dist/{splash-screen-ChMkAPLU.js → splash-screen-xrMNpzkm.js} +1 -1
  242. package/dist/{splash-screen-ChMkAPLU.js.map → splash-screen-xrMNpzkm.js.map} +1 -1
  243. package/dist/splash-screen.cjs +1 -1
  244. package/dist/splash-screen.js +1 -1
  245. package/dist/{src-DnunCC4X.js → src-CHd-U-w4.js} +34 -35
  246. package/dist/{src-DnunCC4X.js.map → src-CHd-U-w4.js.map} +1 -1
  247. package/dist/{src-BIlD63Cz.cjs → src-ggWtvpDr.cjs} +1 -1
  248. package/dist/{src-BIlD63Cz.cjs.map → src-ggWtvpDr.cjs.map} +1 -1
  249. package/dist/steps.cjs +1 -1
  250. package/dist/steps.js +1 -1
  251. package/dist/{surface-DCRy-EyT.js → surface-3nnvlxeE.js} +1 -1
  252. package/dist/{surface-DCRy-EyT.js.map → surface-3nnvlxeE.js.map} +1 -1
  253. package/dist/{surface-DWwQDX9r.cjs → surface-BkQ44Wuo.cjs} +1 -1
  254. package/dist/{surface-DWwQDX9r.cjs.map → surface-BkQ44Wuo.cjs.map} +1 -1
  255. package/dist/surface.cjs +1 -1
  256. package/dist/surface.js +1 -1
  257. package/dist/switch.cjs +1 -1
  258. package/dist/switch.js +1 -1
  259. package/dist/table.cjs +1 -1
  260. package/dist/table.js +1 -1
  261. package/dist/{tabs-CkDNLbiS.js → tabs-CnLIe8nE.js} +1 -1
  262. package/dist/{tabs-CkDNLbiS.js.map → tabs-CnLIe8nE.js.map} +1 -1
  263. package/dist/{tabs-lxQHWEb7.cjs → tabs-Dql0rcqZ.cjs} +1 -1
  264. package/dist/{tabs-lxQHWEb7.cjs.map → tabs-Dql0rcqZ.cjs.map} +1 -1
  265. package/dist/tabs.cjs +1 -1
  266. package/dist/tabs.js +1 -1
  267. package/dist/teleport.cjs +1 -1
  268. package/dist/teleport.js +1 -1
  269. package/dist/{textarea-DkfGmRSI.js → textarea-BAogS_Ff.js} +1 -1
  270. package/dist/{textarea-DkfGmRSI.js.map → textarea-BAogS_Ff.js.map} +1 -1
  271. package/dist/{textarea-CNa4dSvF.cjs → textarea-CGD6lAEe.cjs} +1 -1
  272. package/dist/{textarea-CNa4dSvF.cjs.map → textarea-CGD6lAEe.cjs.map} +1 -1
  273. package/dist/textarea.cjs +1 -1
  274. package/dist/textarea.js +1 -1
  275. package/dist/{theme-CNWRYdfn.js → theme-CUK0HrS3.js} +1 -1
  276. package/dist/{theme-CNWRYdfn.js.map → theme-CUK0HrS3.js.map} +1 -1
  277. package/dist/{theme-CMyXTDht.cjs → theme-DKrrQ-ic.cjs} +1 -1
  278. package/dist/{theme-CMyXTDht.cjs.map → theme-DKrrQ-ic.cjs.map} +1 -1
  279. package/dist/{theme-button-CixloLin.js → theme-button-Bb8qW2IH.js} +1 -1
  280. package/dist/{theme-button-CixloLin.js.map → theme-button-Bb8qW2IH.js.map} +1 -1
  281. package/dist/{theme-button-kMhsX5Oe.cjs → theme-button-CmTwFm3l.cjs} +1 -1
  282. package/dist/{theme-button-kMhsX5Oe.cjs.map → theme-button-CmTwFm3l.cjs.map} +1 -1
  283. package/dist/theme-button.cjs +1 -1
  284. package/dist/theme-button.js +1 -1
  285. package/dist/theme.cjs +1 -1
  286. package/dist/theme.js +2 -2
  287. package/dist/tree.cjs +1 -1
  288. package/dist/tree.js +1 -1
  289. package/dist/typography.cjs +1 -1
  290. package/dist/typography.js +1 -1
  291. package/dist/{utils-DXE5fBBd.js.map → utils-Cxg0Kfy5.js.map} +1 -1
  292. package/dist/{utils-C-Q8ePtG.cjs.map → utils-aCJYAGUr.cjs.map} +1 -1
  293. package/dist/utils.cjs +1 -1
  294. package/dist/utils.js +1 -1
  295. package/dist/visually-hidden.cjs +1 -1
  296. package/dist/visually-hidden.js +1 -1
  297. package/dist/{window-qaGFMn_4.cjs → window-BbWlaPZv.cjs} +1 -1
  298. package/dist/{window-qaGFMn_4.cjs.map → window-BbWlaPZv.cjs.map} +1 -1
  299. package/dist/{window-BcvDNi9D.js → window-DuDAQa6y.js} +1 -1
  300. package/dist/{window-BcvDNi9D.js.map → window-DuDAQa6y.js.map} +1 -1
  301. package/dist/window.cjs +1 -1
  302. package/dist/window.js +1 -1
  303. package/package.json +1 -1
  304. package/skills/schmancy/SKILL.md +18 -2
  305. package/skills/schmancy/area.md +13 -0
  306. package/skills/schmancy/overlay.md +13 -0
  307. package/skills/schmancy/page.md +71 -29
  308. package/src/CLAUDE.md +20 -0
  309. package/src/area/area.component.ts +168 -343
  310. package/src/button/button.ts +8 -5
  311. package/src/button/icon-button.ts +8 -5
  312. package/src/chips/filter-chip.ts +1 -3
  313. package/src/details/details.ts +1 -1
  314. package/src/directives/fill.ts +137 -0
  315. package/src/directives/index.ts +2 -0
  316. package/src/directives/overflow-within.ts +186 -0
  317. package/src/form/fields/radio-group/radio-button.ts +22 -44
  318. package/src/form/fields/radio-group/radio-group.ts +20 -75
  319. package/src/form/fields/select/select.ts +3 -2
  320. package/src/index.ts +0 -1
  321. package/src/overlay/index.ts +1 -0
  322. package/src/overlay/overlay.component.ts +38 -39
  323. package/src/overlay/overlay.positioning.ts +10 -2
  324. package/src/overlay/overlay.types.ts +10 -3
  325. package/src/state/schmancy-state.html +897 -0
  326. package/src/state/schmancy-state.md +981 -0
  327. package/types/src/area/area.component.d.ts +0 -15
  328. package/types/src/button/icon-button.d.ts +1 -1
  329. package/types/src/directives/fill.d.ts +46 -0
  330. package/types/src/directives/index.d.ts +2 -0
  331. package/types/src/directives/overflow-within.d.ts +77 -0
  332. package/types/src/form/fields/radio-group/radio-button.d.ts +2 -5
  333. package/types/src/form/fields/radio-group/radio-group.d.ts +2 -10
  334. package/types/src/index.d.ts +0 -1
  335. package/types/src/overlay/index.d.ts +1 -1
  336. package/types/src/overlay/overlay.positioning.d.ts +9 -1
  337. package/types/src/overlay/overlay.types.d.ts +9 -3
  338. package/dist/area-BIipuSyO.js.map +0 -1
  339. package/dist/area-C-EMiNEE.cjs +0 -12
  340. package/dist/area-C-EMiNEE.cjs.map +0 -1
  341. package/dist/chips-D1kJrbzo.js.map +0 -1
  342. package/dist/chips-Dx_WvOGk.cjs.map +0 -1
  343. package/dist/details-Cpg8sH2F.js.map +0 -1
  344. package/dist/details-CwSDur6j.cjs.map +0 -1
  345. package/dist/mixins-DCVXqL1Q.js +0 -636
  346. package/dist/mixins-Du9HMrIG.cjs +0 -254
  347. package/dist/overlay-DG6EeyKt.cjs.map +0 -1
  348. package/dist/overlay-oxM9OLXP.js.map +0 -1
  349. package/dist/page.cjs +0 -20
  350. package/dist/page.cjs.map +0 -1
  351. package/dist/page.js +0 -74
  352. package/dist/page.js.map +0 -1
  353. package/dist/radio-group-DB9D2ZkA.js +0 -108
  354. package/dist/radio-group-DB9D2ZkA.js.map +0 -1
  355. package/dist/radio-group-dVUvYFq7.cjs +0 -40
  356. package/dist/radio-group-dVUvYFq7.cjs.map +0 -1
  357. package/dist/scroll-C1klVgSQ.js +0 -115
  358. package/dist/scroll-C1klVgSQ.js.map +0 -1
  359. package/dist/scroll-S-bXF2u6.cjs +0 -26
  360. package/dist/scroll-S-bXF2u6.cjs.map +0 -1
  361. package/dist/select-UU2pB67h.js.map +0 -1
  362. package/dist/select-fu_-rZyn.cjs +0 -56
  363. package/dist/select-fu_-rZyn.cjs.map +0 -1
  364. package/src/page/index.ts +0 -1
  365. package/src/page/page.ts +0 -137
  366. package/types/src/page/index.d.ts +0 -1
  367. package/types/src/page/page.d.ts +0 -37
  368. /package/dist/{rxjs-utils-Cs6XGwF6.js → rxjs-utils-BK8VMe3K.js} +0 -0
  369. /package/dist/{rxjs-utils-Dsj75cJy.cjs → rxjs-utils-DhOKenkS.cjs} +0 -0
  370. /package/dist/{utils-DXE5fBBd.js → utils-Cxg0Kfy5.js} +0 -0
  371. /package/dist/{utils-C-Q8ePtG.cjs → utils-aCJYAGUr.cjs} +0 -0
@@ -16,13 +16,16 @@ import { ButtonVariant } from './button'
16
16
  export class SchmnacyIconButton extends SchmancyElement {
17
17
  static styles = [css`
18
18
  :host {
19
- display: inline-block;
20
- width: fit-content;
19
+ display: inline-flex;
21
20
  border-radius: 9999px;
22
21
  transition:
23
22
  box-shadow 300ms cubic-bezier(0.34, 1.56, 0.64, 1),
24
23
  transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
25
24
  }
25
+ :host([width="full"]) {
26
+ display: flex;
27
+ width: 100%;
28
+ }
26
29
  :host(:hover:not([disabled])) {
27
30
  box-shadow: 0 2px 12px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 18%, transparent);
28
31
  }
@@ -71,7 +74,7 @@ export class SchmnacyIconButton extends SchmancyElement {
71
74
  * @type {'full' | 'auto'}
72
75
  * @default 'auto'
73
76
  */
74
- @property()
77
+ @property({ reflect: true })
75
78
  public width: 'full' | 'auto' = 'auto'
76
79
 
77
80
  /**
@@ -189,7 +192,7 @@ export class SchmnacyIconButton extends SchmancyElement {
189
192
  event.stopPropagation()
190
193
  }
191
194
 
192
- protected firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {
195
+ protected firstUpdated(_changedProperties: PropertyValueMap<unknown> | Map<PropertyKey, unknown>): void {
193
196
  // Add any first-update logic here if needed.
194
197
  }
195
198
 
@@ -210,7 +213,7 @@ export class SchmnacyIconButton extends SchmancyElement {
210
213
  effectiveVariant === 'filled' ||
211
214
  effectiveVariant === 'filled tonal'),
212
215
  'hover:shadow-sm': !this.disabled && effectiveVariant === 'elevated',
213
- 'w-full text-center': this.width === 'full',
216
+ 'flex-1 text-center': this.width === 'full',
214
217
  'bg-surface-low text-primary-default shadow-xs': effectiveVariant === 'elevated',
215
218
  'bg-transparent text-primary-default border-1 border-outline': effectiveVariant === 'outlined',
216
219
  'bg-primary-default text-primary-on': effectiveVariant === 'filled',
@@ -22,10 +22,8 @@ import { magnetic } from '../directives/magnetic'
22
22
  export class SchmancyFilterChip extends SchmancyElement {
23
23
  static styles = [css`
24
24
  :host {
25
- display: inline-block;
25
+ display: inline-flex;
26
26
  outline: none;
27
- width: fit-content;
28
- min-width: fit-content;
29
27
  border-radius: 0.5rem;
30
28
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
31
29
  }
@@ -216,7 +216,7 @@ export default class SchmancyDetails extends SurfaceMixin(SchmancyElement) {
216
216
 
217
217
  const detailsClasses = this.classMap({
218
218
  'w-full rounded-xl transition-shadow duration-200 ease-out': true,
219
- 'overflow-hidden': !this.overlay,
219
+ 'overflow-visible': !this.overlay,
220
220
  'overflow-visible relative': this.overlay,
221
221
  })
222
222
 
@@ -0,0 +1,137 @@
1
+ import { AsyncDirective, directive } from 'lit/async-directive.js'
2
+ import { ElementPart, PartType } from 'lit/directive.js'
3
+ import { EMPTY, Subject, combineLatest, fromEvent, merge, timer } from 'rxjs'
4
+ import { debounceTime, distinctUntilChanged, filter, map, startWith, switchMap, takeUntil, tap } from 'rxjs/operators'
5
+ import { theme } from '../theme/theme.service'
6
+ import { fromResizeObserver } from './layout'
7
+
8
+ /**
9
+ * fill directive — anchors an element to the viewport in both dimensions
10
+ * and contains overflow within its viewport-anchored box.
11
+ *
12
+ * The element's `getBoundingClientRect()` top/left are subtracted from the
13
+ * visual viewport size; the remaining pixels are applied as inline `height`
14
+ * and `width`. `overflow: hidden` ensures children cannot visually escape
15
+ * the box; inner scroll containers (apply `overflowWithin()` on the
16
+ * appropriate cell) handle scrolling.
17
+ *
18
+ * Layout is the consumer's responsibility — apply Tailwind classes
19
+ * (`grid grid-cols-[auto_1fr] grid-rows-[1fr]`, `flex`, etc.) on the same
20
+ * element to express the layout. The directive provides the definite-pixel
21
+ * box; the consumer decides how it's divided.
22
+ *
23
+ * Cascade-independent — measurement is taken in viewport coordinates
24
+ * rather than computed from CSS, so the directive works regardless of
25
+ * what the element's ancestors declare.
26
+ *
27
+ * Reactive sources: window/visualViewport resize + scroll, orientation
28
+ * change, iOS keyboard focus-out, parent/element ResizeObserver, theme
29
+ * fullscreen toggle, theme bottom offset (safe-area / nav-bar reservation).
30
+ *
31
+ * @example sidebar + main
32
+ * <app-shell
33
+ * ${fill()}
34
+ * class="grid grid-cols-[auto_1fr] grid-rows-[1fr]"
35
+ * >
36
+ * <app-rail></app-rail>
37
+ * <app-content></app-content>
38
+ * </app-shell>
39
+ */
40
+ class Fill extends AsyncDirective {
41
+ private element: HTMLElement | null = null
42
+ private disconnecting$ = new Subject<void>()
43
+
44
+ private apply(bottomOffset: number, isFullscreen: boolean) {
45
+ if (!this.element) return
46
+ const vv = window.visualViewport
47
+ const vh = vv?.height ?? window.innerHeight
48
+ const vw = vv?.width ?? window.innerWidth
49
+ const rect = this.element.getBoundingClientRect()
50
+ const height = Math.max(0, vh - rect.top)
51
+ const width = Math.max(0, vw - rect.left)
52
+ const padding = isFullscreen ? 0 : bottomOffset
53
+ const s = this.element.style
54
+ s.boxSizing = 'border-box'
55
+ s.height = `${height}px`
56
+ s.width = `${width}px`
57
+ s.paddingBottom = `${padding}px`
58
+ s.minHeight = '0'
59
+ s.minWidth = '0'
60
+ s.overflow = 'hidden'
61
+ }
62
+
63
+ private subscribe() {
64
+ if (!this.element) return
65
+
66
+ const windowResize$ = fromEvent(window, 'resize', { passive: true })
67
+ const viewportEvents$ = window.visualViewport
68
+ ? merge(
69
+ fromEvent(window.visualViewport, 'resize', { passive: true }),
70
+ fromEvent(window.visualViewport, 'scroll', { passive: true }),
71
+ )
72
+ : windowResize$
73
+ const orientation$ = fromEvent(window, 'orientationchange')
74
+ const focusOut$ = fromEvent(document, 'focusout', { passive: true }).pipe(
75
+ switchMap(() => timer(100)),
76
+ )
77
+ const elementResize$ = fromResizeObserver(this.element)
78
+ const parentResize$ = this.element.parentElement
79
+ ? fromResizeObserver(this.element.parentElement)
80
+ : EMPTY
81
+
82
+ combineLatest([
83
+ merge(
84
+ windowResize$,
85
+ viewportEvents$,
86
+ orientation$,
87
+ focusOut$,
88
+ elementResize$,
89
+ parentResize$,
90
+ ).pipe(debounceTime(16), startWith(null)),
91
+ theme.bottomOffset$,
92
+ theme.fullscreen$,
93
+ ])
94
+ .pipe(
95
+ filter(() => {
96
+ const vv = window.visualViewport
97
+ return vv ? Math.abs(vv.scale - 1) <= 0.01 : true
98
+ }),
99
+ map(([, bottomOffset, isFullscreen]) => ({ bottomOffset, isFullscreen })),
100
+ distinctUntilChanged(
101
+ (a, b) => a.bottomOffset === b.bottomOffset && a.isFullscreen === b.isFullscreen,
102
+ ),
103
+ tap(({ bottomOffset, isFullscreen }) => this.apply(bottomOffset, isFullscreen)),
104
+ takeUntil(this.disconnecting$),
105
+ )
106
+ .subscribe()
107
+ }
108
+
109
+ render() {
110
+ return
111
+ }
112
+
113
+ override update(part: ElementPart) {
114
+ if (part.type !== PartType.ELEMENT) {
115
+ throw new Error('fill directive can only be used on elements')
116
+ }
117
+ const el = part.element as HTMLElement
118
+ if (this.element !== el) {
119
+ this.element = el
120
+ this.subscribe()
121
+ }
122
+ }
123
+
124
+ protected override disconnected() {
125
+ this.disconnecting$.next()
126
+ this.element = null
127
+ }
128
+
129
+ protected override reconnected() {
130
+ if (this.element) {
131
+ this.disconnecting$ = new Subject<void>()
132
+ this.subscribe()
133
+ }
134
+ }
135
+ }
136
+
137
+ export const fill = directive(Fill)
@@ -5,6 +5,7 @@ export * from './cursor-glow';
5
5
  export * from './cycle-text';
6
6
  export * from './depth-of-field';
7
7
  export * from './drag';
8
+ export * from './fill';
8
9
  export * from './gravity';
9
10
  export * from './intersect';
10
11
  export * from './layout';
@@ -16,3 +17,4 @@ export * from './nebula';
16
17
  export * from './reduced-motion';
17
18
  export * from './reveal';
18
19
  export * from './ripple';
20
+ export * from './overflow-within';
@@ -0,0 +1,186 @@
1
+ import { noChange } from 'lit'
2
+ import { AsyncDirective, directive } from 'lit/async-directive.js'
3
+ import { ElementPart, PartType } from 'lit/directive.js'
4
+ import { Subject, debounceTime, filter, fromEvent, takeUntil } from 'rxjs'
5
+
6
+ /**
7
+ * Detail payload for the directive's enriched `scroll` event.
8
+ */
9
+ export interface OverflowWithinEvent
10
+ extends CustomEvent<{
11
+ scrollTop: number
12
+ scrollHeight: number
13
+ clientHeight: number
14
+ scrollLeft: number
15
+ scrollWidth: number
16
+ clientWidth: number
17
+ e: Event
18
+ }> {}
19
+
20
+ /**
21
+ * Detail payload for the global `@schmancy:scrollTo` command.
22
+ */
23
+ export interface OverflowWithinCommandEvent
24
+ extends CustomEvent<{
25
+ name: string
26
+ action: 'scrollTo'
27
+ top: number
28
+ left?: number
29
+ }> {}
30
+
31
+ export interface OverflowWithinOptions {
32
+ /** Hide native scrollbars while keeping scroll behavior intact. */
33
+ hide?: boolean
34
+ /** Which axis can scroll. Default `'both'`. */
35
+ direction?: 'vertical' | 'horizontal' | 'both'
36
+ /**
37
+ * Optional name for cross-component control via the global
38
+ * `@schmancy:scrollTo` event.
39
+ */
40
+ name?: string
41
+ /** Debounce in ms for the dispatched `scroll` event. Default `10`. */
42
+ debounce?: number
43
+ }
44
+
45
+ const SCROLLBAR_HIDE_CLASS = 'schmancy-overflow-within-hidden'
46
+ let stylesheetInstalled = false
47
+
48
+ function installHideStylesheet() {
49
+ if (stylesheetInstalled) return
50
+ stylesheetInstalled = true
51
+ const sheet = new CSSStyleSheet()
52
+ sheet.replaceSync(
53
+ `.${SCROLLBAR_HIDE_CLASS} { scrollbar-width: none; -ms-overflow-style: none; }
54
+ .${SCROLLBAR_HIDE_CLASS}::-webkit-scrollbar { display: none; }`,
55
+ )
56
+ document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet]
57
+ }
58
+
59
+ /**
60
+ * overflowWithin directive — turns any element into a contained overflow
61
+ * boundary. Content stays *within* the element; what overflows scrolls
62
+ * inside, can't escape (overscroll contained, rubber-band suppressed).
63
+ *
64
+ * - Overflow per `direction` axis
65
+ * - Smooth scroll-behavior
66
+ * - Overscroll containment (no rubber-band escape)
67
+ * - Optional hidden scrollbar via a document-level stylesheet
68
+ * - Debounced enriched `scroll` event
69
+ * - Global `@schmancy:scrollTo` command listener (when `name` is set)
70
+ * - min-height / min-width 0 so the container can clip inside grid/flex cells
71
+ *
72
+ * Apply at the element where overflow should be contained; the consumer's
73
+ * layout grid/flex container can itself be the overflow boundary — no
74
+ * wrapper element needed.
75
+ *
76
+ * @example
77
+ * render() {
78
+ * return html`
79
+ * <div class="grid grid-rows-[auto_1fr]" ${overflowWithin({ hide: true })}>
80
+ * <header>...</header>
81
+ * <section>...scrollable content...</section>
82
+ * </div>
83
+ * `
84
+ * }
85
+ */
86
+ class OverflowWithinDirective extends AsyncDirective {
87
+ private element: HTMLElement | null = null
88
+ private disconnecting$ = new Subject<void>()
89
+ private currentName?: string
90
+
91
+ render(_options?: OverflowWithinOptions) {
92
+ return noChange
93
+ }
94
+
95
+ override update(part: ElementPart, [options = {}]: [OverflowWithinOptions?]) {
96
+ if (part.type !== PartType.ELEMENT) {
97
+ throw new Error('overflowWithin directive can only be used on elements')
98
+ }
99
+ const el = part.element as HTMLElement
100
+ const { hide = false, direction = 'both', name, debounce = 10 } = options
101
+
102
+ const s = el.style
103
+ s.minHeight = '0'
104
+ s.minWidth = '0'
105
+ s.boxSizing = 'border-box'
106
+ s.overflowY = direction === 'horizontal' ? 'hidden' : 'auto'
107
+ s.overflowX = direction === 'vertical' ? 'hidden' : 'auto'
108
+ s.scrollBehavior = 'smooth'
109
+ s.overscrollBehavior = 'contain'
110
+
111
+ if (hide) {
112
+ installHideStylesheet()
113
+ el.classList.add(SCROLLBAR_HIDE_CLASS)
114
+ } else {
115
+ el.classList.remove(SCROLLBAR_HIDE_CLASS)
116
+ }
117
+
118
+ const isNewElement = this.element !== el
119
+ const isNameChange = this.currentName !== name
120
+
121
+ if (isNewElement) {
122
+ this.element = el
123
+ this.subscribe(debounce, name)
124
+ } else if (isNameChange) {
125
+ // resubscribe with new name binding
126
+ this.disconnecting$.next()
127
+ this.disconnecting$ = new Subject<void>()
128
+ this.subscribe(debounce, name)
129
+ }
130
+ this.currentName = name
131
+
132
+ return noChange
133
+ }
134
+
135
+ private subscribe(debounce: number, name: string | undefined) {
136
+ if (!this.element) return
137
+ const el = this.element
138
+
139
+ fromEvent(el, 'scroll', { passive: true })
140
+ .pipe(debounceTime(debounce), takeUntil(this.disconnecting$))
141
+ .subscribe((e) => {
142
+ el.dispatchEvent(
143
+ new CustomEvent('scroll', {
144
+ detail: {
145
+ scrollTop: el.scrollTop,
146
+ scrollHeight: el.scrollHeight,
147
+ clientHeight: el.clientHeight,
148
+ scrollLeft: el.scrollLeft,
149
+ scrollWidth: el.scrollWidth,
150
+ clientWidth: el.clientWidth,
151
+ e,
152
+ },
153
+ bubbles: true,
154
+ composed: true,
155
+ }) as OverflowWithinEvent,
156
+ )
157
+ })
158
+
159
+ if (name !== undefined) {
160
+ fromEvent<OverflowWithinCommandEvent>(window, '@schmancy:scrollTo')
161
+ .pipe(
162
+ filter((evt) => evt.detail.name === name && evt.detail.action === 'scrollTo'),
163
+ takeUntil(this.disconnecting$),
164
+ )
165
+ .subscribe((evt) => {
166
+ const options: ScrollToOptions = { behavior: 'smooth', top: evt.detail.top }
167
+ if (typeof evt.detail.left === 'number') options.left = evt.detail.left
168
+ el.scrollTo(options)
169
+ })
170
+ }
171
+ }
172
+
173
+ protected override disconnected() {
174
+ this.disconnecting$.next()
175
+ this.element = null
176
+ }
177
+
178
+ protected override reconnected() {
179
+ if (this.element) {
180
+ this.disconnecting$ = new Subject<void>()
181
+ this.subscribe(10, this.currentName)
182
+ }
183
+ }
184
+ }
185
+
186
+ export const overflowWithin = directive(OverflowWithinDirective)
@@ -1,7 +1,6 @@
1
1
  import { SchmancyElement } from '@mixins/index'
2
2
  import { html } from 'lit'
3
3
  import { customElement, property } from 'lit/decorators.js'
4
- import { FormFieldMixin } from '@mixins/formField.mixin'
5
4
  import { fromEvent, takeUntil } from 'rxjs'
6
5
 
7
6
  /**
@@ -13,62 +12,41 @@ import { fromEvent, takeUntil } from 'rxjs'
13
12
  * @prop {boolean} disabled - Whether the radio button is disabled
14
13
  */
15
14
  @customElement('schmancy-radio-button')
16
- export class RadioButton extends FormFieldMixin(SchmancyElement) {
17
- @property({ type: String }) override value = ''
15
+ export class RadioButton extends SchmancyElement {
16
+ @property({ type: String }) value = ''
18
17
  @property({ type: Boolean, reflect: true }) checked = false
19
- @property({ type: Boolean }) override disabled = false
20
- @property({ type: String }) override name = ''
18
+ @property({ type: Boolean }) disabled = false
19
+ @property({ type: String }) name = ''
21
20
 
22
21
  connectedCallback() {
23
22
  super.connectedCallback()
24
- // Listen for click events
25
23
  fromEvent<MouseEvent>(this, 'click')
26
24
  .pipe(takeUntil(this.disconnecting))
27
- .subscribe(this.handleClick)
25
+ .subscribe(this._handleClick)
28
26
  }
29
27
 
30
- disconnectedCallback() {
31
- super.disconnectedCallback()
32
- // Event listeners are automatically cleaned up via takeUntil(this.disconnecting)
33
- }
34
-
35
- private handleClick() {
28
+ private _handleClick = () => {
36
29
  if (this.disabled) return
37
-
38
- // Find parent radio-group if exists
39
- const radioGroup = this.closest('schmancy-radio-group')
40
- if (radioGroup) {
41
- // Let the radio-group handle the change
42
- const event = new CustomEvent('radio-button-click', {
43
- detail: { value: this.value },
44
- bubbles: true,
45
- composed: true,
46
- })
47
- this.dispatchEvent(event)
48
- } else {
49
- // Standalone usage
50
- this.checked = true
51
- this.emitChange({ value: this.value })
52
- }
30
+ this.dispatchEvent(new CustomEvent('radio-button-click', {
31
+ detail: { value: this.value },
32
+ bubbles: true,
33
+ composed: true,
34
+ }))
53
35
  }
54
36
 
55
37
  render() {
56
38
  return html`
57
- <label class="relative flex items-start cursor-pointer">
58
- <div class="flex items-center h-6">
59
- <input
60
- type="radio"
61
- class="h-4 w-4 text-primary-default focus:ring-primary-container border-outline"
62
- .value=${this.value}
63
- .checked=${this.checked}
64
- .disabled=${this.disabled}
65
- .name=${this.name}
66
- @change=${() => {}}
67
- />
68
- </div>
69
- <div class="ml-3">
70
- <slot name="label"></slot>
71
- </div>
39
+ <label class="flex items-center gap-3 cursor-pointer">
40
+ <input
41
+ type="radio"
42
+ class="h-4 w-4 text-primary-default focus:ring-primary-container border-outline"
43
+ .value=${this.value}
44
+ .checked=${this.checked}
45
+ .disabled=${this.disabled}
46
+ .name=${this.name}
47
+ @change=${() => {}}
48
+ />
49
+ <slot></slot>
72
50
  </label>
73
51
  `
74
52
  }
@@ -1,104 +1,49 @@
1
1
  import { html, unsafeCSS } from 'lit'
2
2
  import { customElement, property } from 'lit/decorators.js'
3
- import { Subject, fromEvent, takeUntil } from 'rxjs'
3
+ import { fromEvent, takeUntil } from 'rxjs'
4
4
  import style from './radio-group.scss?inline'
5
5
  import { SchmancyElement } from '@mixins/index'
6
6
  import { when } from 'lit/directives/when.js'
7
7
  import { FormFieldMixin } from '@mixins/formField.mixin'
8
+ import type { RadioButton } from './radio-button.ts'
9
+
10
+ export type SchmancyRadioGroupChangeEvent = CustomEvent<{ value: string }>
8
11
 
9
- export type SchmancyRadioGroupOption = {
10
- label: string
11
- value: string
12
- }
13
- export type SchmancyRadioGroupChangeEvent = CustomEvent<{
14
- value: string
15
- }>
16
12
  @customElement('schmancy-radio-group')
17
13
  export class RadioGroup extends FormFieldMixin(SchmancyElement) {
18
- static styles = [unsafeCSS(style)];
14
+ static styles = [unsafeCSS(style)]
19
15
  @property({ type: String }) override label = ''
20
16
  @property({ type: String }) override name = ''
21
17
  @property({ type: String }) override value = ''
22
- @property({ type: Array }) options: SchmancyRadioGroupOption[] = []
23
- @property({ type: Boolean }) override required: boolean = false
24
- private selection$ = new Subject<string>()
18
+ @property({ type: Boolean }) override required = false
25
19
 
26
20
  connectedCallback() {
27
21
  super.connectedCallback()
28
- this.selection$.pipe(takeUntil(this.disconnecting)).subscribe(value => {
29
- this.value = value
30
- this.emitChange({ value })
31
- // Update all child radio buttons
32
- this.updateChildRadioButtons()
33
- })
34
-
35
- // Listen for radio button clicks from children
36
22
  fromEvent<CustomEvent>(this, 'radio-button-click')
37
23
  .pipe(takeUntil(this.disconnecting))
38
- .subscribe((e: CustomEvent) => {
39
- this.selection$.next(e.detail.value)
24
+ .subscribe((e: CustomEvent<{ value: string }>) => {
25
+ this.value = e.detail.value
26
+ this.emitChange({ value: e.detail.value })
27
+ this._syncChildren()
40
28
  })
41
29
  }
42
30
 
43
- disconnectedCallback() {
44
- super.disconnectedCallback()
45
- // Subscriptions are automatically cleaned up via takeUntil(this.disconnecting)
46
- this.selection$?.complete()
31
+ updated(changed: Map<string, unknown>) {
32
+ super.updated(changed)
33
+ if (changed.has('value')) this._syncChildren()
47
34
  }
48
-
49
- private handleSelection(value: string) {
50
- this.selection$.next(value)
51
- }
52
-
53
- private updateChildRadioButtons() {
54
- // Update child radio buttons checked state
55
- const radioButtons = this.querySelectorAll('schmancy-radio-button')
56
- radioButtons.forEach(button => {
57
- const buttonValue = button.getAttribute('value')
58
- if (buttonValue === this.value) {
59
- button.setAttribute('checked', '')
60
- } else {
61
- button.removeAttribute('checked')
62
- }
35
+
36
+ private _syncChildren() {
37
+ this.querySelectorAll<RadioButton>('schmancy-radio-button').forEach(btn => {
38
+ btn.checked = btn.value === this.value
63
39
  })
64
40
  }
65
-
66
- // For backwards compatibility with direct option setting
67
- updated(changedProperties: Map<string, unknown>) {
68
- super.updated(changedProperties)
69
- if (changedProperties.has('value')) {
70
- this.updateChildRadioButtons()
71
- }
72
- }
73
41
 
74
42
  render() {
75
- // Check if we have any slotted radio buttons
76
- const hasSlottedContent = this.childElementCount > 0
77
-
78
43
  return html`
79
- <div class="grid gap-4">
80
- ${when(this.label, () => html` <label class="text-base font-semibold text-surface-on">${this.label}</label> `)}
81
-
82
- ${hasSlottedContent ?
83
- html`<slot></slot>` :
84
- this.options?.map(option => html`
85
- <div class="flex items-center">
86
- <input
87
- .required=${this.required}
88
- id=${option.value}
89
- class="h-4 w-4 border-outline text-primary-default focus:ring-primary-default"
90
- type="radio"
91
- name=${this.name}
92
- .value=${option.value}
93
- .checked=${option.value === this.value}
94
- @change=${() => this.handleSelection(option.value)}
95
- />
96
- <label for=${option.value} class="ml-3 block text-sm font-medium leading-6 text-surface-on">
97
- ${option.label || option.value}
98
- </label>
99
- </div>
100
- `)
101
- }
44
+ <div role="radiogroup" aria-label=${this.label} aria-required=${this.required} class="grid gap-2">
45
+ ${when(this.label, () => html`<schmancy-typography type="label" token="lg">${this.label}</schmancy-typography>`)}
46
+ <slot></slot>
102
47
  </div>
103
48
  `
104
49
  }
@@ -52,10 +52,11 @@ export class SchmancySelect extends SchmancyFormField() {
52
52
  @property({ type: String, reflect: true })
53
53
  override get value(): string | string[] {
54
54
  return this.multi
55
- ? this._selectedValues$.value
56
- : this._selectedValue$.value
55
+ ? (this._selectedValues$?.value ?? [])
56
+ : (this._selectedValue$?.value ?? '')
57
57
  }
58
58
  override set value(val: string | string[]) {
59
+ if (!this._selectedValue$ || !this._selectedValues$) return
59
60
  if (this.multi) {
60
61
  const values = Array.isArray(val)
61
62
  ? val
package/src/index.ts CHANGED
@@ -43,7 +43,6 @@ export * from './option';
43
43
  // inside a federated context, the build-time check passes only if
44
44
  // `show` is reachable from the main barrel.
45
45
  export * from './overlay';
46
- export * from './page';
47
46
  export * from './progress';
48
47
  export * from './form/fields/radio-group';
49
48
  export * from './form/fields/range';
@@ -11,5 +11,6 @@ export type {
11
11
  OverlayPromptOptions,
12
12
  ShowFn,
13
13
  ShowOptions,
14
+ TemplateFactory,
14
15
  } from './overlay.types'
15
16
  export { lazy } from '../area/lazy'