@vielzeug/refine 26.10.7 → 26.10.9

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 (326) hide show
  1. package/README.md +6 -0
  2. package/dist/accordion-item.cjs +2 -2
  3. package/dist/accordion-item.cjs.map +1 -1
  4. package/dist/accordion-item.js +6 -6
  5. package/dist/accordion-item.js.map +1 -1
  6. package/dist/accordion.cjs +2 -2
  7. package/dist/accordion.cjs.map +1 -1
  8. package/dist/accordion.js +2 -2
  9. package/dist/accordion.js.map +1 -1
  10. package/dist/alert.cjs +2 -2
  11. package/dist/alert.cjs.map +1 -1
  12. package/dist/alert.js +2 -2
  13. package/dist/alert.js.map +1 -1
  14. package/dist/avatar.cjs +3 -3
  15. package/dist/avatar.cjs.map +1 -1
  16. package/dist/avatar.js +2 -2
  17. package/dist/avatar.js.map +1 -1
  18. package/dist/badge.cjs +2 -2
  19. package/dist/badge.cjs.map +1 -1
  20. package/dist/badge.js +2 -2
  21. package/dist/badge.js.map +1 -1
  22. package/dist/box.cjs +2 -2
  23. package/dist/box.cjs.map +1 -1
  24. package/dist/box.js +2 -2
  25. package/dist/box.js.map +1 -1
  26. package/dist/button-group.cjs +2 -2
  27. package/dist/button-group.cjs.map +1 -1
  28. package/dist/button-group.js +2 -2
  29. package/dist/button-group.js.map +1 -1
  30. package/dist/button.cjs +9 -9
  31. package/dist/button.cjs.map +1 -1
  32. package/dist/button.js +8 -8
  33. package/dist/button.js.map +1 -1
  34. package/dist/card.cjs +2 -2
  35. package/dist/card.cjs.map +1 -1
  36. package/dist/card.js +2 -2
  37. package/dist/card.js.map +1 -1
  38. package/dist/carousel.cjs +6 -6
  39. package/dist/carousel.cjs.map +1 -1
  40. package/dist/carousel.js +6 -6
  41. package/dist/carousel.js.map +1 -1
  42. package/dist/chat-message.cjs +4 -4
  43. package/dist/chat-message.cjs.map +1 -1
  44. package/dist/chat-message.js +4 -4
  45. package/dist/chat-message.js.map +1 -1
  46. package/dist/checkbox-group.cjs +1 -1
  47. package/dist/checkbox-group.cjs.map +1 -1
  48. package/dist/checkbox-group.js +1 -1
  49. package/dist/checkbox-group.js.map +1 -1
  50. package/dist/checkbox.cjs +1 -1
  51. package/dist/checkbox.cjs.map +1 -1
  52. package/dist/checkbox.js +1 -1
  53. package/dist/checkbox.js.map +1 -1
  54. package/dist/chip.cjs +8 -8
  55. package/dist/chip.cjs.map +1 -1
  56. package/dist/chip.js +8 -8
  57. package/dist/chip.js.map +1 -1
  58. package/dist/combobox.cjs +8 -8
  59. package/dist/combobox.cjs.map +1 -1
  60. package/dist/combobox.js +11 -11
  61. package/dist/combobox.js.map +1 -1
  62. package/dist/content/avatar/avatar.d.ts +2 -1
  63. package/dist/content/avatar/avatar.d.ts.map +1 -1
  64. package/dist/content/card/card.d.ts +6 -3
  65. package/dist/content/card/card.d.ts.map +1 -1
  66. package/dist/content/carousel/carousel.d.ts +5 -3
  67. package/dist/content/carousel/carousel.d.ts.map +1 -1
  68. package/dist/content/chat-message/chat-message.d.ts +2 -1
  69. package/dist/content/chat-message/chat-message.d.ts.map +1 -1
  70. package/dist/content/copy-command/copy-command.d.ts +1 -1
  71. package/dist/content/copy-command/copy-command.d.ts.map +1 -1
  72. package/dist/content/keyboard-key/keyboard-key.d.ts +2 -1
  73. package/dist/content/keyboard-key/keyboard-key.d.ts.map +1 -1
  74. package/dist/content/list/list.d.ts +2 -1
  75. package/dist/content/list/list.d.ts.map +1 -1
  76. package/dist/content/marquee/marquee.d.ts +3 -2
  77. package/dist/content/marquee/marquee.d.ts.map +1 -1
  78. package/dist/content/pagination/pagination.d.ts +1 -1
  79. package/dist/content/pagination/pagination.d.ts.map +1 -1
  80. package/dist/content/qr-code/qr-code.d.ts +0 -41
  81. package/dist/content/qr-code/qr-code.d.ts.map +1 -1
  82. package/dist/content/separator/separator.d.ts +1 -1
  83. package/dist/content/separator/separator.d.ts.map +1 -1
  84. package/dist/content/stepper/step.d.ts +1 -1
  85. package/dist/content/stepper/step.d.ts.map +1 -1
  86. package/dist/content/table/table.d.ts +2 -1
  87. package/dist/content/table/table.d.ts.map +1 -1
  88. package/dist/content/text/text.d.ts +13 -6
  89. package/dist/content/text/text.d.ts.map +1 -1
  90. package/dist/cookie-banner.cjs +1 -1
  91. package/dist/cookie-banner.cjs.map +1 -1
  92. package/dist/cookie-banner.js +1 -1
  93. package/dist/cookie-banner.js.map +1 -1
  94. package/dist/copy-command.cjs +6 -6
  95. package/dist/copy-command.cjs.map +1 -1
  96. package/dist/copy-command.js +7 -7
  97. package/dist/copy-command.js.map +1 -1
  98. package/dist/core/checkable.cjs +1 -1
  99. package/dist/core/checkable.cjs.map +1 -1
  100. package/dist/core/checkable.d.ts +6 -7
  101. package/dist/core/checkable.d.ts.map +1 -1
  102. package/dist/core/checkable.js +1 -1
  103. package/dist/core/checkable.js.map +1 -1
  104. package/dist/core/choice-field.cjs +1 -1
  105. package/dist/core/choice-field.cjs.map +1 -1
  106. package/dist/core/choice-field.d.ts +6 -6
  107. package/dist/core/choice-field.d.ts.map +1 -1
  108. package/dist/core/choice-field.js +1 -1
  109. package/dist/core/choice-field.js.map +1 -1
  110. package/dist/core/text-field.cjs +1 -1
  111. package/dist/core/text-field.cjs.map +1 -1
  112. package/dist/core/text-field.d.ts +8 -8
  113. package/dist/core/text-field.d.ts.map +1 -1
  114. package/dist/core/text-field.js +1 -1
  115. package/dist/core/text-field.js.map +1 -1
  116. package/dist/counter.cjs +2 -2
  117. package/dist/counter.cjs.map +1 -1
  118. package/dist/counter.js +2 -2
  119. package/dist/counter.js.map +1 -1
  120. package/dist/custom-elements.json +378 -241
  121. package/dist/datagrid.cjs +47 -47
  122. package/dist/datagrid.cjs.map +1 -1
  123. package/dist/datagrid.js +51 -51
  124. package/dist/datagrid.js.map +1 -1
  125. package/dist/date-picker.cjs +9 -9
  126. package/dist/date-picker.cjs.map +1 -1
  127. package/dist/date-picker.js +11 -11
  128. package/dist/date-picker.js.map +1 -1
  129. package/dist/dialog.cjs +3 -3
  130. package/dist/dialog.cjs.map +1 -1
  131. package/dist/dialog.js +3 -3
  132. package/dist/dialog.js.map +1 -1
  133. package/dist/disclosure/accordion/accordion.d.ts +4 -2
  134. package/dist/disclosure/accordion/accordion.d.ts.map +1 -1
  135. package/dist/disclosure/accordion-item/accordion-item.d.ts +1 -1
  136. package/dist/disclosure/accordion-item/accordion-item.d.ts.map +1 -1
  137. package/dist/disclosure/tab-item/tab-item.d.ts +1 -1
  138. package/dist/disclosure/tab-item/tab-item.d.ts.map +1 -1
  139. package/dist/disclosure/tabs/tabs.d.ts +1 -1
  140. package/dist/disclosure/tabs/tabs.d.ts.map +1 -1
  141. package/dist/drawer.cjs +4 -4
  142. package/dist/drawer.cjs.map +1 -1
  143. package/dist/drawer.js +2 -2
  144. package/dist/drawer.js.map +1 -1
  145. package/dist/feedback/alert/alert.d.ts +2 -1
  146. package/dist/feedback/alert/alert.d.ts.map +1 -1
  147. package/dist/feedback/badge/badge.d.ts +7 -4
  148. package/dist/feedback/badge/badge.d.ts.map +1 -1
  149. package/dist/feedback/chip/chip.d.ts +7 -5
  150. package/dist/feedback/chip/chip.d.ts.map +1 -1
  151. package/dist/grid-item.cjs +2 -2
  152. package/dist/grid-item.cjs.map +1 -1
  153. package/dist/grid-item.js +2 -2
  154. package/dist/grid-item.js.map +1 -1
  155. package/dist/grid.cjs +2 -2
  156. package/dist/grid.cjs.map +1 -1
  157. package/dist/grid.js +2 -2
  158. package/dist/grid.js.map +1 -1
  159. package/dist/input.cjs +7 -7
  160. package/dist/input.cjs.map +1 -1
  161. package/dist/input.js +8 -8
  162. package/dist/input.js.map +1 -1
  163. package/dist/inputs/button/button.d.ts +3 -2
  164. package/dist/inputs/button/button.d.ts.map +1 -1
  165. package/dist/inputs/button-group/button-group.d.ts +1 -37
  166. package/dist/inputs/button-group/button-group.d.ts.map +1 -1
  167. package/dist/inputs/combobox/combobox.types.d.ts +2 -2
  168. package/dist/inputs/combobox/combobox.types.d.ts.map +1 -1
  169. package/dist/inputs/counter/counter.d.ts +3 -2
  170. package/dist/inputs/counter/counter.d.ts.map +1 -1
  171. package/dist/inputs/datagrid/datagrid-model.cjs +1 -1
  172. package/dist/inputs/datagrid/datagrid-model.cjs.map +1 -1
  173. package/dist/inputs/datagrid/datagrid-model.d.ts +2 -1
  174. package/dist/inputs/datagrid/datagrid-model.d.ts.map +1 -1
  175. package/dist/inputs/datagrid/datagrid-model.js +1 -1
  176. package/dist/inputs/datagrid/datagrid-model.js.map +1 -1
  177. package/dist/inputs/datagrid/datagrid.d.ts +4 -2
  178. package/dist/inputs/datagrid/datagrid.d.ts.map +1 -1
  179. package/dist/inputs/date-picker/date-picker.d.ts +3 -2
  180. package/dist/inputs/date-picker/date-picker.d.ts.map +1 -1
  181. package/dist/inputs/input/input.d.ts +5 -3
  182. package/dist/inputs/input/input.d.ts.map +1 -1
  183. package/dist/inputs/message-composer/message-composer.d.ts +3 -2
  184. package/dist/inputs/message-composer/message-composer.d.ts.map +1 -1
  185. package/dist/inputs/number-input/number-input.d.ts +1 -1
  186. package/dist/inputs/number-input/number-input.d.ts.map +1 -1
  187. package/dist/inputs/otp-input/otp-input.d.ts +3 -2
  188. package/dist/inputs/otp-input/otp-input.d.ts.map +1 -1
  189. package/dist/inputs/query-bar/query-bar.d.ts.map +1 -1
  190. package/dist/inputs/select/select.d.ts +2 -2
  191. package/dist/inputs/select/select.d.ts.map +1 -1
  192. package/dist/inputs/textarea/textarea.d.ts +4 -3
  193. package/dist/inputs/textarea/textarea.d.ts.map +1 -1
  194. package/dist/inputs/time-picker/time-picker.d.ts +2 -2
  195. package/dist/inputs/time-picker/time-picker.d.ts.map +1 -1
  196. package/dist/keyboard-key.cjs +3 -3
  197. package/dist/keyboard-key.cjs.map +1 -1
  198. package/dist/keyboard-key.js +3 -3
  199. package/dist/keyboard-key.js.map +1 -1
  200. package/dist/layout/box/box.d.ts +6 -3
  201. package/dist/layout/box/box.d.ts.map +1 -1
  202. package/dist/layout/grid/grid.d.ts +11 -6
  203. package/dist/layout/grid/grid.d.ts.map +1 -1
  204. package/dist/layout/grid-item/grid-item.d.ts +8 -4
  205. package/dist/layout/grid-item/grid-item.d.ts.map +1 -1
  206. package/dist/layout/navbar/navbar.d.ts +4 -2
  207. package/dist/layout/navbar/navbar.d.ts.map +1 -1
  208. package/dist/layout/sidebar/sidebar.d.ts +2 -1
  209. package/dist/layout/sidebar/sidebar.d.ts.map +1 -1
  210. package/dist/list-item.cjs +1 -1
  211. package/dist/list-item.cjs.map +1 -1
  212. package/dist/list-item.js +1 -1
  213. package/dist/list-item.js.map +1 -1
  214. package/dist/list.cjs +2 -2
  215. package/dist/list.cjs.map +1 -1
  216. package/dist/list.js +2 -2
  217. package/dist/list.js.map +1 -1
  218. package/dist/marquee.cjs +3 -3
  219. package/dist/marquee.cjs.map +1 -1
  220. package/dist/marquee.js +3 -3
  221. package/dist/marquee.js.map +1 -1
  222. package/dist/menu.cjs +3 -3
  223. package/dist/menu.cjs.map +1 -1
  224. package/dist/menu.js +3 -3
  225. package/dist/menu.js.map +1 -1
  226. package/dist/message-composer.cjs +10 -10
  227. package/dist/message-composer.cjs.map +1 -1
  228. package/dist/message-composer.js +7 -7
  229. package/dist/message-composer.js.map +1 -1
  230. package/dist/navbar.cjs +10 -10
  231. package/dist/navbar.cjs.map +1 -1
  232. package/dist/navbar.js +13 -13
  233. package/dist/navbar.js.map +1 -1
  234. package/dist/number-input.cjs +3 -3
  235. package/dist/number-input.cjs.map +1 -1
  236. package/dist/number-input.js +4 -4
  237. package/dist/number-input.js.map +1 -1
  238. package/dist/otp-input.cjs +4 -4
  239. package/dist/otp-input.cjs.map +1 -1
  240. package/dist/otp-input.js +4 -4
  241. package/dist/otp-input.js.map +1 -1
  242. package/dist/overlay/dialog/dialog.d.ts +7 -4
  243. package/dist/overlay/dialog/dialog.d.ts.map +1 -1
  244. package/dist/overlay/drawer/drawer.d.ts +4 -2
  245. package/dist/overlay/drawer/drawer.d.ts.map +1 -1
  246. package/dist/overlay/menu/menu.d.ts +2 -1
  247. package/dist/overlay/menu/menu.d.ts.map +1 -1
  248. package/dist/pagination.cjs +9 -9
  249. package/dist/pagination.cjs.map +1 -1
  250. package/dist/pagination.js +9 -9
  251. package/dist/pagination.js.map +1 -1
  252. package/dist/qr-code.cjs +2 -2
  253. package/dist/qr-code.cjs.map +1 -1
  254. package/dist/qr-code.js +2 -2
  255. package/dist/qr-code.js.map +1 -1
  256. package/dist/query-bar.cjs +7 -7
  257. package/dist/query-bar.cjs.map +1 -1
  258. package/dist/query-bar.js +8 -8
  259. package/dist/query-bar.js.map +1 -1
  260. package/dist/radio-group.cjs +1 -1
  261. package/dist/radio-group.cjs.map +1 -1
  262. package/dist/radio-group.js +1 -1
  263. package/dist/radio-group.js.map +1 -1
  264. package/dist/refine.cjs +123 -123
  265. package/dist/refine.cjs.map +1 -1
  266. package/dist/refine.iife.js +123 -123
  267. package/dist/refine.iife.js.map +1 -1
  268. package/dist/refine.js +124 -124
  269. package/dist/refine.js.map +1 -1
  270. package/dist/select.cjs +13 -13
  271. package/dist/select.cjs.map +1 -1
  272. package/dist/select.js +15 -15
  273. package/dist/select.js.map +1 -1
  274. package/dist/separator.cjs +4 -4
  275. package/dist/separator.cjs.map +1 -1
  276. package/dist/separator.js +4 -4
  277. package/dist/separator.js.map +1 -1
  278. package/dist/shared/prop-bundles.cjs +1 -1
  279. package/dist/shared/prop-bundles.cjs.map +1 -1
  280. package/dist/shared/prop-bundles.d.ts +7 -8
  281. package/dist/shared/prop-bundles.d.ts.map +1 -1
  282. package/dist/shared/prop-bundles.js +1 -1
  283. package/dist/shared/prop-bundles.js.map +1 -1
  284. package/dist/shared/types.cjs +2 -0
  285. package/dist/shared/types.cjs.map +1 -0
  286. package/dist/shared/types.d.ts +27 -9
  287. package/dist/shared/types.d.ts.map +1 -1
  288. package/dist/shared/types.js +2 -0
  289. package/dist/shared/types.js.map +1 -0
  290. package/dist/sidebar.cjs +7 -7
  291. package/dist/sidebar.cjs.map +1 -1
  292. package/dist/sidebar.js +4 -4
  293. package/dist/sidebar.js.map +1 -1
  294. package/dist/step.cjs +10 -10
  295. package/dist/step.cjs.map +1 -1
  296. package/dist/step.js +10 -10
  297. package/dist/step.js.map +1 -1
  298. package/dist/tab-item.cjs +4 -4
  299. package/dist/tab-item.cjs.map +1 -1
  300. package/dist/tab-item.js +5 -5
  301. package/dist/tab-item.js.map +1 -1
  302. package/dist/table.cjs +2 -2
  303. package/dist/table.cjs.map +1 -1
  304. package/dist/table.js +2 -2
  305. package/dist/table.js.map +1 -1
  306. package/dist/tabs.cjs +2 -2
  307. package/dist/tabs.cjs.map +1 -1
  308. package/dist/tabs.js +4 -4
  309. package/dist/tabs.js.map +1 -1
  310. package/dist/text.cjs +2 -2
  311. package/dist/text.cjs.map +1 -1
  312. package/dist/text.js +2 -2
  313. package/dist/text.js.map +1 -1
  314. package/dist/textarea.cjs +7 -7
  315. package/dist/textarea.cjs.map +1 -1
  316. package/dist/textarea.js +7 -7
  317. package/dist/textarea.js.map +1 -1
  318. package/dist/time-picker.cjs +7 -7
  319. package/dist/time-picker.cjs.map +1 -1
  320. package/dist/time-picker.js +7 -7
  321. package/dist/time-picker.js.map +1 -1
  322. package/dist/tooltip.cjs +1 -1
  323. package/dist/tooltip.cjs.map +1 -1
  324. package/dist/tooltip.js +1 -1
  325. package/dist/tooltip.js.map +1 -1
  326. package/package.json +13 -13
package/dist/separator.js CHANGED
@@ -1,5 +1,5 @@
1
- import{colorThemeMixin as e}from"./styles/mixins/theme.css.js";import t from"./content/separator/separator.css.js";import{define as n,html as r,prop as i}from"@vielzeug/ore";var a=`ore-separator`;n(a,{props:{color:i.string(),decorative:i.bool(!0),label:i.string(),orientation:i.oneOf([`horizontal`,`vertical`],`horizontal`)},setup(e){let roleAttr=()=>e.decorative.value?`none`:`separator`,ariaHidden=()=>e.decorative.value?`true`:null;return r`
2
- ${()=>e.label.value?r`
1
+ import{colorThemeMixin as e}from"./styles/mixins/theme.css.js";import{THEME_COLORS as t}from"./shared/types.js";import n from"./content/separator/separator.css.js";import{define as r,html as i,prop as a}from"@vielzeug/ore";var o=`ore-separator`;r(o,{props:{color:a.oneOf(t),decorative:a.bool(!0),label:a.string(),orientation:a.oneOf([`horizontal`,`vertical`],`horizontal`)},setup(e){let roleAttr=()=>e.decorative.value?`none`:`separator`,ariaHidden=()=>e.decorative.value?`true`:null;return i`
2
+ ${()=>e.label.value?i`
3
3
  <div class="separator-wrapper" part="wrapper">
4
4
  <hr
5
5
  class="separator"
@@ -15,7 +15,7 @@ import{colorThemeMixin as e}from"./styles/mixins/theme.css.js";import t from"./c
15
15
  aria-hidden="${ariaHidden}"
16
16
  aria-orientation="${()=>e.orientation.value}" />
17
17
  </div>
18
- `:r`
18
+ `:i`
19
19
  <hr
20
20
  class="separator"
21
21
  part="separator"
@@ -23,5 +23,5 @@ import{colorThemeMixin as e}from"./styles/mixins/theme.css.js";import t from"./c
23
23
  aria-hidden="${ariaHidden}"
24
24
  aria-orientation="${()=>e.orientation.value}" />
25
25
  `}
26
- `},styles:[e,t]});export{a as SEPARATOR_TAG};
26
+ `},styles:[e,n]});export{o as SEPARATOR_TAG};
27
27
  //# sourceMappingURL=separator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"separator.js","names":[],"sources":["../src/content/separator/separator.ts"],"sourcesContent":["import { define, html, prop } from '@vielzeug/ore';\nimport { colorThemeMixin } from '../../styles';\nimport type { ThemeColor } from '../../types';\nimport componentStyles from './separator.css?inline';\n\n/** Separator component properties */\nexport type OreSeparatorProps = {\n /** Theme color tint */\n color?: ThemeColor;\n /** Decorative only (default true): set to false for semantic separators */\n decorative?: boolean;\n /** Optional label text centered on the separator */\n label?: string;\n /** Orientation of the separator */\n orientation?: 'horizontal' | 'vertical';\n};\n\n/**\n * A simple visual divider between sections of content.\n *\n * @element ore-separator\n *\n * @attr {string} orientation - 'horizontal' (default) | 'vertical'\n * @attr {boolean} decorative - When true (default), aria-hidden is applied\n * @attr {string} label - Optional centered label text\n * @attr {string} color - Theme color: 'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'error'\n *\n * @cssprop --separator-color - Line color\n * @cssprop --separator-size - Line thickness\n * @cssprop --separator-spacing - Vertical margin\n *\n * @part wrapper - Root wrapper container.\n * @part separator - Separator element.\n * @part label - Label element.\n * @example\n * ```html\n * <ore-separator></ore-separator>\n * <ore-separator label=\"or\"></ore-separator>\n * <ore-separator orientation=\"vertical\"></ore-separator>\n * ```\n */\nexport const SEPARATOR_TAG = 'ore-separator' as const;\ndefine<OreSeparatorProps>(SEPARATOR_TAG, {\n props: {\n color: prop.string<ThemeColor>(),\n decorative: prop.bool(true),\n label: prop.string(),\n orientation: prop.oneOf(['horizontal', 'vertical'] as const, 'horizontal'),\n },\n setup(props) {\n const roleAttr = () => (props.decorative.value ? 'none' : 'separator');\n const ariaHidden = () => (props.decorative.value ? 'true' : null);\n\n return html`\n ${() =>\n props.label.value\n ? html`\n <div class=\"separator-wrapper\" part=\"wrapper\">\n <hr\n class=\"separator\"\n part=\"separator\"\n role=\"${roleAttr}\"\n aria-hidden=\"${ariaHidden}\"\n aria-orientation=\"${() => props.orientation.value}\" />\n <span class=\"separator-label\" part=\"label\">${() => props.label.value}</span>\n <hr\n class=\"separator\"\n part=\"separator\"\n role=\"${roleAttr}\"\n aria-hidden=\"${ariaHidden}\"\n aria-orientation=\"${() => props.orientation.value}\" />\n </div>\n `\n : html`\n <hr\n class=\"separator\"\n part=\"separator\"\n role=\"${roleAttr}\"\n aria-hidden=\"${ariaHidden}\"\n aria-orientation=\"${() => props.orientation.value}\" />\n `}\n `;\n },\n styles: [colorThemeMixin, componentStyles],\n});\n"],"mappings":"8KAyCA,IAAa,EAAgB,gBAC7B,EAA0B,EAAe,CACvC,MAAO,CACL,MAAO,EAAK,OAAmB,EAC/B,WAAY,EAAK,KAAK,EAAI,EAC1B,MAAO,EAAK,OAAO,EACnB,YAAa,EAAK,MAAM,CAAC,aAAc,UAAU,EAAY,YAAY,CAC3E,EACA,MAAM,EAAO,CACX,IAAM,aAAkB,EAAM,WAAW,MAAQ,OAAS,YACpD,eAAoB,EAAM,WAAW,MAAQ,OAAS,KAE5D,MAAO,EAAI;YAEP,EAAM,MAAM,MACR,CAAI;;;;;0BAKU,SAAS;iCACF,WAAW;0CACA,EAAM,YAAY,MAAM;iEACD,EAAM,MAAM,MAAM;;;;0BAI3D,SAAS;iCACF,WAAW;0CACA,EAAM,YAAY,MAAM;;cAGxD,CAAI;;;;wBAIQ,SAAS;+BACF,WAAW;wCACA,EAAM,YAAY,MAAM;cACpD;KAEZ,EACA,OAAQ,CAAC,EAAiB,CAAe,CAC3C,CAAC"}
1
+ {"version":3,"file":"separator.js","names":[],"sources":["../src/content/separator/separator.ts"],"sourcesContent":["import { define, html, prop } from '@vielzeug/ore';\nimport { colorThemeMixin } from '../../styles';\nimport { THEME_COLORS, type ThemeColor } from '../../types';\nimport componentStyles from './separator.css?inline';\n\n/** Separator component properties */\nexport type OreSeparatorProps = {\n /** Theme color tint */\n color?: ThemeColor;\n /** Decorative only (default true): set to false for semantic separators */\n decorative?: boolean;\n /** Optional label text centered on the separator */\n label?: string;\n /** Orientation of the separator */\n orientation?: 'horizontal' | 'vertical';\n};\n\n/**\n * A simple visual divider between sections of content.\n *\n * @element ore-separator\n *\n * @attr {string} orientation - 'horizontal' (default) | 'vertical'\n * @attr {boolean} decorative - When true (default), aria-hidden is applied\n * @attr {string} label - Optional centered label text\n * @attr {string} color - Theme color: 'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'error'\n *\n * @cssprop --separator-color - Line color\n * @cssprop --separator-size - Line thickness\n * @cssprop --separator-spacing - Vertical margin\n *\n * @part wrapper - Root wrapper container.\n * @part separator - Separator element.\n * @part label - Label element.\n * @example\n * ```html\n * <ore-separator></ore-separator>\n * <ore-separator label=\"or\"></ore-separator>\n * <ore-separator orientation=\"vertical\"></ore-separator>\n * ```\n */\nexport const SEPARATOR_TAG = 'ore-separator' as const;\ndefine<OreSeparatorProps>(SEPARATOR_TAG, {\n props: {\n color: prop.oneOf(THEME_COLORS),\n decorative: prop.bool(true),\n label: prop.string(),\n orientation: prop.oneOf(['horizontal', 'vertical'] as const, 'horizontal'),\n },\n setup(props) {\n const roleAttr = () => (props.decorative.value ? 'none' : 'separator');\n const ariaHidden = () => (props.decorative.value ? 'true' : null);\n\n return html`\n ${() =>\n props.label.value\n ? html`\n <div class=\"separator-wrapper\" part=\"wrapper\">\n <hr\n class=\"separator\"\n part=\"separator\"\n role=\"${roleAttr}\"\n aria-hidden=\"${ariaHidden}\"\n aria-orientation=\"${() => props.orientation.value}\" />\n <span class=\"separator-label\" part=\"label\">${() => props.label.value}</span>\n <hr\n class=\"separator\"\n part=\"separator\"\n role=\"${roleAttr}\"\n aria-hidden=\"${ariaHidden}\"\n aria-orientation=\"${() => props.orientation.value}\" />\n </div>\n `\n : html`\n <hr\n class=\"separator\"\n part=\"separator\"\n role=\"${roleAttr}\"\n aria-hidden=\"${ariaHidden}\"\n aria-orientation=\"${() => props.orientation.value}\" />\n `}\n `;\n },\n styles: [colorThemeMixin, componentStyles],\n});\n"],"mappings":"+NAyCA,IAAa,EAAgB,gBAC7B,EAA0B,EAAe,CACvC,MAAO,CACL,MAAO,EAAK,MAAM,CAAY,EAC9B,WAAY,EAAK,KAAK,EAAI,EAC1B,MAAO,EAAK,OAAO,EACnB,YAAa,EAAK,MAAM,CAAC,aAAc,UAAU,EAAY,YAAY,CAC3E,EACA,MAAM,EAAO,CACX,IAAM,aAAkB,EAAM,WAAW,MAAQ,OAAS,YACpD,eAAoB,EAAM,WAAW,MAAQ,OAAS,KAE5D,MAAO,EAAI;YAEP,EAAM,MAAM,MACR,CAAI;;;;;0BAKU,SAAS;iCACF,WAAW;0CACA,EAAM,YAAY,MAAM;iEACD,EAAM,MAAM,MAAM;;;;0BAI3D,SAAS;iCACF,WAAW;0CACA,EAAM,YAAY,MAAM;;cAGxD,CAAI;;;;wBAIQ,SAAS;+BACF,WAAW;wCACA,EAAM,YAAY,MAAM;cACpD;KAEZ,EACA,OAAQ,CAAC,EAAiB,CAAe,CAC3C,CAAC"}
@@ -1,2 +1,2 @@
1
- let e=require("@vielzeug/ore");var t={color:e.prop.string()},n={size:e.prop.string()},r={disabled:e.prop.bool(!1)},i={loading:e.prop.bool(!1)},a={rounded:e.prop.string()};e.prop.number();var o={...t,...n,...r,...i,...a};exports.commonProps=o,exports.disablableBundle=r,exports.loadableBundle=i,exports.roundableBundle=a,exports.sizableBundle=n,exports.themableBundle=t;
1
+ const e=require("./types.cjs");let t=require("@vielzeug/ore");var n={color:t.prop.oneOf(e.THEME_COLORS)},r={size:t.prop.oneOf(e.COMPONENT_SIZES)},i={disabled:t.prop.bool(!1)},a={loading:t.prop.bool(!1)},o={rounded:t.prop.oneOf(e.ROUNDED_SIZES)};t.prop.oneOf(e.ELEVATION_LEVELS);var s={...n,...r,...i,...a,...o};exports.commonProps=s,exports.disablableBundle=i,exports.loadableBundle=a,exports.roundableBundle=o,exports.sizableBundle=r,exports.themableBundle=n;
2
2
  //# sourceMappingURL=prop-bundles.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"prop-bundles.cjs","names":[],"sources":["../../src/shared/prop-bundles.ts"],"sourcesContent":["import { prop } from '@vielzeug/ore';\n\nimport type { ComponentSize, ElevationLevel, RoundedSize, ThemeColor } from './types';\n\n/** Prop bundle for components that support a theme colour. */\nexport const themableBundle = {\n color: prop.string<ThemeColor>(),\n};\n\n/** Prop bundle for components with discrete size variants. */\nexport const sizableBundle = {\n size: prop.string<ComponentSize>(),\n};\n\n/** Prop bundle for interactive components that can be disabled. */\nexport const disablableBundle = {\n disabled: prop.bool(false),\n};\n\n/** Prop bundle for components with a loading / busy state. */\nexport const loadableBundle = {\n loading: prop.bool(false),\n};\n\n/** Prop bundle for components with configurable border-radius. */\nexport const roundableBundle = {\n rounded: prop.string<RoundedSize>(),\n};\n\n/** Prop bundle for components with an elevation / box-shadow. */\nexport const elevatableBundle = {\n elevation: prop.number<ElevationLevel>(),\n};\n\n/**\n * Convenience bundle combining the five most common interactive-component props:\n * `color`, `size`, `disabled`, `loading`, and `rounded`.\n *\n * Use this single spread instead of five separate bundle spreads when a\n * component needs all of them.\n *\n * @example\n * ```ts\n * props: { ...commonProps, href: prop.string() }\n * ```\n */\nexport const commonProps = {\n ...themableBundle,\n ...sizableBundle,\n ...disablableBundle,\n ...loadableBundle,\n ...roundableBundle,\n};\n"],"mappings":"+BAKA,IAAa,EAAiB,CAC5B,MAAO,EAAA,KAAK,OAAmB,CACjC,EAGa,EAAgB,CAC3B,KAAM,EAAA,KAAK,OAAsB,CACnC,EAGa,EAAmB,CAC9B,SAAU,EAAA,KAAK,KAAK,EAAK,CAC3B,EAGa,EAAiB,CAC5B,QAAS,EAAA,KAAK,KAAK,EAAK,CAC1B,EAGa,EAAkB,CAC7B,QAAS,EAAA,KAAK,OAAoB,CACpC,EAIa,EAAA,KAAK,OAAuB,EAezC,IAAa,EAAc,CACzB,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,CACL"}
1
+ {"version":3,"file":"prop-bundles.cjs","names":[],"sources":["../../src/shared/prop-bundles.ts"],"sourcesContent":["import { prop } from '@vielzeug/ore';\n\nimport { COMPONENT_SIZES, ELEVATION_LEVELS, ROUNDED_SIZES, THEME_COLORS } from './types';\n\n/** Prop bundle for components that support a theme colour. */\nexport const themableBundle = {\n color: prop.oneOf(THEME_COLORS),\n};\n\n/** Prop bundle for components with discrete size variants. */\nexport const sizableBundle = {\n size: prop.oneOf(COMPONENT_SIZES),\n};\n\n/** Prop bundle for interactive components that can be disabled. */\nexport const disablableBundle = {\n disabled: prop.bool(false),\n};\n\n/** Prop bundle for components with a loading / busy state. */\nexport const loadableBundle = {\n loading: prop.bool(false),\n};\n\n/** Prop bundle for components with configurable border-radius. */\nexport const roundableBundle = {\n rounded: prop.oneOf(ROUNDED_SIZES),\n};\n\n/** Prop bundle for components with an elevation / box-shadow. */\nexport const elevatableBundle = {\n elevation: prop.oneOf(ELEVATION_LEVELS),\n};\n\n/**\n * Convenience bundle combining the five most common interactive-component props:\n * `color`, `size`, `disabled`, `loading`, and `rounded`.\n *\n * Use this single spread instead of five separate bundle spreads when a\n * component needs all of them.\n *\n * @example\n * ```ts\n * props: { ...commonProps, href: prop.string() }\n * ```\n */\nexport const commonProps = {\n ...themableBundle,\n ...sizableBundle,\n ...disablableBundle,\n ...loadableBundle,\n ...roundableBundle,\n};\n"],"mappings":"8DAKA,IAAa,EAAiB,CAC5B,MAAO,EAAA,KAAK,MAAM,EAAA,YAAY,CAChC,EAGa,EAAgB,CAC3B,KAAM,EAAA,KAAK,MAAM,EAAA,eAAe,CAClC,EAGa,EAAmB,CAC9B,SAAU,EAAA,KAAK,KAAK,EAAK,CAC3B,EAGa,EAAiB,CAC5B,QAAS,EAAA,KAAK,KAAK,EAAK,CAC1B,EAGa,EAAkB,CAC7B,QAAS,EAAA,KAAK,MAAM,EAAA,aAAa,CACnC,EAIa,EAAA,KAAK,MAAM,EAAA,gBAAgB,EAexC,IAAa,EAAc,CACzB,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,CACL"}
@@ -1,11 +1,10 @@
1
- import type { ComponentSize, ElevationLevel, RoundedSize, ThemeColor } from './types';
2
1
  /** Prop bundle for components that support a theme colour. */
3
2
  export declare const themableBundle: {
4
- color: import("@vielzeug/ore").PropDef<ThemeColor | undefined>;
3
+ color: import("@vielzeug/ore").PropDef<"primary" | "secondary" | "info" | "success" | "warning" | "error" | undefined>;
5
4
  };
6
5
  /** Prop bundle for components with discrete size variants. */
7
6
  export declare const sizableBundle: {
8
- size: import("@vielzeug/ore").PropDef<ComponentSize | undefined>;
7
+ size: import("@vielzeug/ore").PropDef<"sm" | "md" | "lg" | undefined>;
9
8
  };
10
9
  /** Prop bundle for interactive components that can be disabled. */
11
10
  export declare const disablableBundle: {
@@ -17,11 +16,11 @@ export declare const loadableBundle: {
17
16
  };
18
17
  /** Prop bundle for components with configurable border-radius. */
19
18
  export declare const roundableBundle: {
20
- rounded: import("@vielzeug/ore").PropDef<RoundedSize | undefined>;
19
+ rounded: import("@vielzeug/ore").PropDef<"sm" | "md" | "lg" | "none" | "xl" | "2xl" | "3xl" | "full" | undefined>;
21
20
  };
22
21
  /** Prop bundle for components with an elevation / box-shadow. */
23
22
  export declare const elevatableBundle: {
24
- elevation: import("@vielzeug/ore").PropDef<ElevationLevel | undefined>;
23
+ elevation: import("@vielzeug/ore").PropDef<0 | 2 | 1 | 3 | 5 | 4 | undefined>;
25
24
  };
26
25
  /**
27
26
  * Convenience bundle combining the five most common interactive-component props:
@@ -36,10 +35,10 @@ export declare const elevatableBundle: {
36
35
  * ```
37
36
  */
38
37
  export declare const commonProps: {
39
- rounded: import("@vielzeug/ore").PropDef<RoundedSize | undefined>;
38
+ rounded: import("@vielzeug/ore").PropDef<"sm" | "md" | "lg" | "none" | "xl" | "2xl" | "3xl" | "full" | undefined>;
40
39
  loading: import("@vielzeug/ore").PropDef<boolean>;
41
40
  disabled: import("@vielzeug/ore").PropDef<boolean>;
42
- size: import("@vielzeug/ore").PropDef<ComponentSize | undefined>;
43
- color: import("@vielzeug/ore").PropDef<ThemeColor | undefined>;
41
+ size: import("@vielzeug/ore").PropDef<"sm" | "md" | "lg" | undefined>;
42
+ color: import("@vielzeug/ore").PropDef<"primary" | "secondary" | "info" | "success" | "warning" | "error" | undefined>;
44
43
  };
45
44
  //# sourceMappingURL=prop-bundles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prop-bundles.d.ts","sourceRoot":"","sources":["../../src/shared/prop-bundles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEtF,8DAA8D;AAC9D,eAAO,MAAM,cAAc;;CAE1B,CAAC;AAEF,8DAA8D;AAC9D,eAAO,MAAM,aAAa;;CAEzB,CAAC;AAEF,mEAAmE;AACnE,eAAO,MAAM,gBAAgB;;CAE5B,CAAC;AAEF,8DAA8D;AAC9D,eAAO,MAAM,cAAc;;CAE1B,CAAC;AAEF,kEAAkE;AAClE,eAAO,MAAM,eAAe;;CAE3B,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,gBAAgB;;CAE5B,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,WAAW;;;;;;CAMvB,CAAC"}
1
+ {"version":3,"file":"prop-bundles.d.ts","sourceRoot":"","sources":["../../src/shared/prop-bundles.ts"],"names":[],"mappings":"AAIA,8DAA8D;AAC9D,eAAO,MAAM,cAAc;;CAE1B,CAAC;AAEF,8DAA8D;AAC9D,eAAO,MAAM,aAAa;;CAEzB,CAAC;AAEF,mEAAmE;AACnE,eAAO,MAAM,gBAAgB;;CAE5B,CAAC;AAEF,8DAA8D;AAC9D,eAAO,MAAM,cAAc;;CAE1B,CAAC;AAEF,kEAAkE;AAClE,eAAO,MAAM,eAAe;;CAE3B,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,gBAAgB;;CAE5B,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,WAAW;;;;;;CAMvB,CAAC"}
@@ -1,2 +1,2 @@
1
- import{prop as e}from"@vielzeug/ore";var t={color:e.string()},n={size:e.string()},r={disabled:e.bool(!1)},i={loading:e.bool(!1)},a={rounded:e.string()};e.number();var o={...t,...n,...r,...i,...a};export{o as commonProps,r as disablableBundle,i as loadableBundle,a as roundableBundle,n as sizableBundle,t as themableBundle};
1
+ import{COMPONENT_SIZES as e,ELEVATION_LEVELS as t,ROUNDED_SIZES as n,THEME_COLORS as r}from"./types.js";import{prop as i}from"@vielzeug/ore";var a={color:i.oneOf(r)},o={size:i.oneOf(e)},s={disabled:i.bool(!1)},c={loading:i.bool(!1)},l={rounded:i.oneOf(n)};i.oneOf(t);var u={...a,...o,...s,...c,...l};export{u as commonProps,s as disablableBundle,c as loadableBundle,l as roundableBundle,o as sizableBundle,a as themableBundle};
2
2
  //# sourceMappingURL=prop-bundles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"prop-bundles.js","names":[],"sources":["../../src/shared/prop-bundles.ts"],"sourcesContent":["import { prop } from '@vielzeug/ore';\n\nimport type { ComponentSize, ElevationLevel, RoundedSize, ThemeColor } from './types';\n\n/** Prop bundle for components that support a theme colour. */\nexport const themableBundle = {\n color: prop.string<ThemeColor>(),\n};\n\n/** Prop bundle for components with discrete size variants. */\nexport const sizableBundle = {\n size: prop.string<ComponentSize>(),\n};\n\n/** Prop bundle for interactive components that can be disabled. */\nexport const disablableBundle = {\n disabled: prop.bool(false),\n};\n\n/** Prop bundle for components with a loading / busy state. */\nexport const loadableBundle = {\n loading: prop.bool(false),\n};\n\n/** Prop bundle for components with configurable border-radius. */\nexport const roundableBundle = {\n rounded: prop.string<RoundedSize>(),\n};\n\n/** Prop bundle for components with an elevation / box-shadow. */\nexport const elevatableBundle = {\n elevation: prop.number<ElevationLevel>(),\n};\n\n/**\n * Convenience bundle combining the five most common interactive-component props:\n * `color`, `size`, `disabled`, `loading`, and `rounded`.\n *\n * Use this single spread instead of five separate bundle spreads when a\n * component needs all of them.\n *\n * @example\n * ```ts\n * props: { ...commonProps, href: prop.string() }\n * ```\n */\nexport const commonProps = {\n ...themableBundle,\n ...sizableBundle,\n ...disablableBundle,\n ...loadableBundle,\n ...roundableBundle,\n};\n"],"mappings":"qCAKA,IAAa,EAAiB,CAC5B,MAAO,EAAK,OAAmB,CACjC,EAGa,EAAgB,CAC3B,KAAM,EAAK,OAAsB,CACnC,EAGa,EAAmB,CAC9B,SAAU,EAAK,KAAK,EAAK,CAC3B,EAGa,EAAiB,CAC5B,QAAS,EAAK,KAAK,EAAK,CAC1B,EAGa,EAAkB,CAC7B,QAAS,EAAK,OAAoB,CACpC,EAIa,EAAK,OAAuB,EAezC,IAAa,EAAc,CACzB,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,CACL"}
1
+ {"version":3,"file":"prop-bundles.js","names":[],"sources":["../../src/shared/prop-bundles.ts"],"sourcesContent":["import { prop } from '@vielzeug/ore';\n\nimport { COMPONENT_SIZES, ELEVATION_LEVELS, ROUNDED_SIZES, THEME_COLORS } from './types';\n\n/** Prop bundle for components that support a theme colour. */\nexport const themableBundle = {\n color: prop.oneOf(THEME_COLORS),\n};\n\n/** Prop bundle for components with discrete size variants. */\nexport const sizableBundle = {\n size: prop.oneOf(COMPONENT_SIZES),\n};\n\n/** Prop bundle for interactive components that can be disabled. */\nexport const disablableBundle = {\n disabled: prop.bool(false),\n};\n\n/** Prop bundle for components with a loading / busy state. */\nexport const loadableBundle = {\n loading: prop.bool(false),\n};\n\n/** Prop bundle for components with configurable border-radius. */\nexport const roundableBundle = {\n rounded: prop.oneOf(ROUNDED_SIZES),\n};\n\n/** Prop bundle for components with an elevation / box-shadow. */\nexport const elevatableBundle = {\n elevation: prop.oneOf(ELEVATION_LEVELS),\n};\n\n/**\n * Convenience bundle combining the five most common interactive-component props:\n * `color`, `size`, `disabled`, `loading`, and `rounded`.\n *\n * Use this single spread instead of five separate bundle spreads when a\n * component needs all of them.\n *\n * @example\n * ```ts\n * props: { ...commonProps, href: prop.string() }\n * ```\n */\nexport const commonProps = {\n ...themableBundle,\n ...sizableBundle,\n ...disablableBundle,\n ...loadableBundle,\n ...roundableBundle,\n};\n"],"mappings":"6IAKA,IAAa,EAAiB,CAC5B,MAAO,EAAK,MAAM,CAAY,CAChC,EAGa,EAAgB,CAC3B,KAAM,EAAK,MAAM,CAAe,CAClC,EAGa,EAAmB,CAC9B,SAAU,EAAK,KAAK,EAAK,CAC3B,EAGa,EAAiB,CAC5B,QAAS,EAAK,KAAK,EAAK,CAC1B,EAGa,EAAkB,CAC7B,QAAS,EAAK,MAAM,CAAa,CACnC,EAIa,EAAK,MAAM,CAAgB,EAexC,IAAa,EAAc,CACzB,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,CACL"}
@@ -0,0 +1,2 @@
1
+ var e=[`sm`,`md`,`lg`],t=[`primary`,`secondary`,`info`,`success`,`warning`,`error`],n=[`solid`,`flat`,`bordered`,`outline`,`ghost`,`text`,`frost`],r=[`flat`,`solid`,`bordered`,`outline`,`ghost`],i=[`solid`,`flat`,`bordered`,`outline`,`ghost`,`text`],a=[`compact`,`cozy`,`comfortable`],o=[`none`,`sm`,`md`,`lg`,`xl`,`2xl`,`3xl`,`full`],s=[0,1,2,3,4,5],c=[`none`,`sm`,`md`,`lg`,`xl`],l=[`_blank`,`_self`,`_parent`,`_top`];exports.COMPONENT_SIZES=e,exports.DENSITY_LEVELS=a,exports.ELEVATION_LEVELS=s,exports.FIELD_VARIANTS=r,exports.INPUT_VARIANTS=i,exports.LINK_TARGETS=l,exports.PADDING_SIZES=c,exports.ROUNDED_SIZES=o,exports.THEME_COLORS=t,exports.VISUAL_VARIANTS=n;
2
+ //# sourceMappingURL=types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.cjs","names":[],"sources":["../../src/shared/types.ts"],"sourcesContent":["export type { PropsDef } from '@vielzeug/ore';\n\n// ── Primitive type aliases ────────────────────────────────────────────────────\n\n/** Form validity methods exposed on form-associated custom elements. */\nexport type FormValidityMethods = {\n checkValidity(): boolean;\n reportValidity(): boolean;\n setCustomValidity(message: string): void;\n};\n\n/** Component size variants */\nexport const COMPONENT_SIZES = ['sm', 'md', 'lg'] as const;\nexport type ComponentSize = (typeof COMPONENT_SIZES)[number];\n\n/** Semantic theme colors */\nexport const THEME_COLORS = ['primary', 'secondary', 'info', 'success', 'warning', 'error'] as const;\nexport type ThemeColor = (typeof THEME_COLORS)[number];\n\n/** Visual variant styles */\nexport const VISUAL_VARIANTS = ['solid', 'flat', 'bordered', 'outline', 'ghost', 'text', 'frost'] as const;\nexport type VisualVariant = (typeof VISUAL_VARIANTS)[number];\n\n/** Variant set accepted by text-field-style inputs (everything except `text` and `frost`). */\nexport const FIELD_VARIANTS = ['flat', 'solid', 'bordered', 'outline', 'ghost'] as const;\nexport type FieldVariant = (typeof FIELD_VARIANTS)[number];\n\n/** Variant set accepted by input/select-style fields (everything except `frost`). */\nexport const INPUT_VARIANTS = ['solid', 'flat', 'bordered', 'outline', 'ghost', 'text'] as const;\nexport type InputVariant = (typeof INPUT_VARIANTS)[number];\n\n/** Table/grid density levels */\nexport const DENSITY_LEVELS = ['compact', 'cozy', 'comfortable'] as const;\nexport type DensityLevel = (typeof DENSITY_LEVELS)[number];\n\n/** Border radius variants */\nexport const ROUNDED_SIZES = ['none', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', 'full'] as const;\nexport type RoundedSize = (typeof ROUNDED_SIZES)[number];\n\n/** Elevation/shadow depth levels */\nexport const ELEVATION_LEVELS = [0, 1, 2, 3, 4, 5] as const;\nexport type ElevationLevel = (typeof ELEVATION_LEVELS)[number];\n\n/** Internal spacing variants */\nexport const PADDING_SIZES = ['none', 'sm', 'md', 'lg', 'xl'] as const;\nexport type PaddingSize = (typeof PADDING_SIZES)[number];\n\n/** Button form-submission types */\nexport const BUTTON_TYPES = ['button', 'submit', 'reset'] as const;\nexport type ButtonType = (typeof BUTTON_TYPES)[number];\n\n/** Anchor browsing-context values */\nexport const LINK_TARGETS = ['_blank', '_self', '_parent', '_top'] as const;\nexport type LinkTarget = (typeof LINK_TARGETS)[number];\n\n/** Allowed HTML5 input type values for `<ore-input>` */\nexport const INPUT_TYPES = [\n 'text',\n 'email',\n 'password',\n 'number',\n 'tel',\n 'url',\n 'search',\n 'date',\n 'time',\n 'datetime-local',\n 'month',\n 'week',\n] as const;\nexport type InputType = (typeof INPUT_TYPES)[number];\n\n// ── Form element props ────────────────────────────────────────────────────────\n\n/** Props for form-associated elements */\nexport type FormElementProps = {\n name?: string;\n value?: string;\n};\n\n/** Props for checkable form-associated elements (checkbox, radio) */\nexport type CheckableProps = FormElementProps & {\n checked?: boolean;\n};\n\n/**\n * Adds type-safe `addEventListener` / `removeEventListener` overloads to a custom element type.\n *\n * ```ts\n * export interface OreInputEvents {\n * change: { value: string; originalEvent: Event };\n * }\n * type OreInputElement = HTMLElement & OreInputProps & AddEventListeners<OreInputEvents>;\n * ```\n */\nexport type AddEventListeners<T> = {\n addEventListener<K extends keyof T & string>(\n type: K,\n listener: (this: HTMLElement, ev: CustomEvent<T[K]>) => void,\n options?: boolean | AddEventListenerOptions,\n ): void;\n removeEventListener<K extends keyof T & string>(\n type: K,\n listener: (this: HTMLElement, ev: CustomEvent<T[K]>) => void,\n options?: boolean | EventListenerOptions,\n ): void;\n};\n\n// ── Derived form field prop types ─────────────────────────────────────────────\n\nexport type BaseFormProps = {\n color?: ThemeColor;\n disabled?: boolean;\n error?: string;\n fullwidth?: boolean;\n helper?: string;\n label?: string;\n 'label-placement'?: 'inset' | 'outside';\n name?: string;\n size?: ComponentSize;\n /**\n * Shows an inline green check icon inside the field to confirm the value has passed\n * validation. Ignored while `error` is set: an error always wins.\n */\n success?: boolean;\n};\n\ntype FieldVisualProps<TVariant extends VisualVariant> = {\n rounded?: RoundedSize | '';\n variant?: TVariant;\n};\n\nexport type TextFieldProps<TVariant extends VisualVariant> = BaseFormProps &\n FieldVisualProps<TVariant> & {\n placeholder?: string;\n readonly?: boolean;\n required?: boolean;\n value?: string;\n };\n\nexport type SelectableFieldProps<TVariant extends VisualVariant> = BaseFormProps &\n FieldVisualProps<TVariant> & {\n placeholder?: string;\n value?: string;\n };\n"],"mappings":"AAYA,IAAa,EAAkB,CAAC,KAAM,KAAM,IAAI,EAInC,EAAe,CAAC,UAAW,YAAa,OAAQ,UAAW,UAAW,OAAO,EAI7E,EAAkB,CAAC,QAAS,OAAQ,WAAY,UAAW,QAAS,OAAQ,OAAO,EAInF,EAAiB,CAAC,OAAQ,QAAS,WAAY,UAAW,OAAO,EAIjE,EAAiB,CAAC,QAAS,OAAQ,WAAY,UAAW,QAAS,MAAM,EAIzE,EAAiB,CAAC,UAAW,OAAQ,aAAa,EAIlD,EAAgB,CAAC,OAAQ,KAAM,KAAM,KAAM,KAAM,MAAO,MAAO,MAAM,EAIrE,EAAmB,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,CAAC,EAIpC,EAAgB,CAAC,OAAQ,KAAM,KAAM,KAAM,IAAI,EAQ/C,EAAe,CAAC,SAAU,QAAS,UAAW,MAAM"}
@@ -6,23 +6,41 @@ export type FormValidityMethods = {
6
6
  setCustomValidity(message: string): void;
7
7
  };
8
8
  /** Component size variants */
9
- export type ComponentSize = 'sm' | 'md' | 'lg';
9
+ export declare const COMPONENT_SIZES: readonly ["sm", "md", "lg"];
10
+ export type ComponentSize = (typeof COMPONENT_SIZES)[number];
10
11
  /** Semantic theme colors */
11
- export type ThemeColor = 'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'error';
12
+ export declare const THEME_COLORS: readonly ["primary", "secondary", "info", "success", "warning", "error"];
13
+ export type ThemeColor = (typeof THEME_COLORS)[number];
12
14
  /** Visual variant styles */
13
- export type VisualVariant = 'solid' | 'flat' | 'bordered' | 'outline' | 'ghost' | 'text' | 'frost';
15
+ export declare const VISUAL_VARIANTS: readonly ["solid", "flat", "bordered", "outline", "ghost", "text", "frost"];
16
+ export type VisualVariant = (typeof VISUAL_VARIANTS)[number];
17
+ /** Variant set accepted by text-field-style inputs (everything except `text` and `frost`). */
18
+ export declare const FIELD_VARIANTS: readonly ["flat", "solid", "bordered", "outline", "ghost"];
19
+ export type FieldVariant = (typeof FIELD_VARIANTS)[number];
20
+ /** Variant set accepted by input/select-style fields (everything except `frost`). */
21
+ export declare const INPUT_VARIANTS: readonly ["solid", "flat", "bordered", "outline", "ghost", "text"];
22
+ export type InputVariant = (typeof INPUT_VARIANTS)[number];
23
+ /** Table/grid density levels */
24
+ export declare const DENSITY_LEVELS: readonly ["compact", "cozy", "comfortable"];
25
+ export type DensityLevel = (typeof DENSITY_LEVELS)[number];
14
26
  /** Border radius variants */
15
- export type RoundedSize = 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full';
27
+ export declare const ROUNDED_SIZES: readonly ["none", "sm", "md", "lg", "xl", "2xl", "3xl", "full"];
28
+ export type RoundedSize = (typeof ROUNDED_SIZES)[number];
16
29
  /** Elevation/shadow depth levels */
17
- export type ElevationLevel = 0 | 1 | 2 | 3 | 4 | 5;
30
+ export declare const ELEVATION_LEVELS: readonly [0, 1, 2, 3, 4, 5];
31
+ export type ElevationLevel = (typeof ELEVATION_LEVELS)[number];
18
32
  /** Internal spacing variants */
19
- export type PaddingSize = 'none' | 'sm' | 'md' | 'lg' | 'xl';
33
+ export declare const PADDING_SIZES: readonly ["none", "sm", "md", "lg", "xl"];
34
+ export type PaddingSize = (typeof PADDING_SIZES)[number];
20
35
  /** Button form-submission types */
21
- export type ButtonType = 'button' | 'submit' | 'reset';
36
+ export declare const BUTTON_TYPES: readonly ["button", "submit", "reset"];
37
+ export type ButtonType = (typeof BUTTON_TYPES)[number];
22
38
  /** Anchor browsing-context values */
23
- export type LinkTarget = '_blank' | '_self' | '_parent' | '_top';
39
+ export declare const LINK_TARGETS: readonly ["_blank", "_self", "_parent", "_top"];
40
+ export type LinkTarget = (typeof LINK_TARGETS)[number];
24
41
  /** Allowed HTML5 input type values for `<ore-input>` */
25
- export type InputType = 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'search' | 'date' | 'time' | 'datetime-local' | 'month' | 'week';
42
+ export declare const INPUT_TYPES: readonly ["text", "email", "password", "number", "tel", "url", "search", "date", "time", "datetime-local", "month", "week"];
43
+ export type InputType = (typeof INPUT_TYPES)[number];
26
44
  /** Props for form-associated elements */
27
45
  export type FormElementProps = {
28
46
  name?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/shared/types.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAI9C,wEAAwE;AACxE,MAAM,MAAM,mBAAmB,GAAG;IAChC,aAAa,IAAI,OAAO,CAAC;IACzB,cAAc,IAAI,OAAO,CAAC;IAC1B,iBAAiB,CAAC,OA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AAC,QAAQ,SAAS,aAAa,IAAI;IACtD,OAAO,CAAC,EAAE,WAAW,GAAG,EAAE,CAAC;IAC3B,OAAO,CAAC,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,cAAc,CAAC,QAAQ,SAAS,aAAa,IAAI,aAAa,GACxE,gBAAgB,CAAC,QAAQ,CAAC,GAAG;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEJ,MAAM,MAAM,oBAAoB,CAAC,QAAQ,SAAS,aAAa,IAAI,aAAa,GAC9E,gBAAgB,CAAC,QAAQ,CAAC,GAAG;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC"}
@@ -0,0 +1,2 @@
1
+ var e=[`sm`,`md`,`lg`],t=[`primary`,`secondary`,`info`,`success`,`warning`,`error`],n=[`solid`,`flat`,`bordered`,`outline`,`ghost`,`text`,`frost`],r=[`flat`,`solid`,`bordered`,`outline`,`ghost`],i=[`solid`,`flat`,`bordered`,`outline`,`ghost`,`text`],a=[`compact`,`cozy`,`comfortable`],o=[`none`,`sm`,`md`,`lg`,`xl`,`2xl`,`3xl`,`full`],s=[0,1,2,3,4,5],c=[`none`,`sm`,`md`,`lg`,`xl`],l=[`_blank`,`_self`,`_parent`,`_top`];export{e as COMPONENT_SIZES,a as DENSITY_LEVELS,s as ELEVATION_LEVELS,r as FIELD_VARIANTS,i as INPUT_VARIANTS,l as LINK_TARGETS,c as PADDING_SIZES,o as ROUNDED_SIZES,t as THEME_COLORS,n as VISUAL_VARIANTS};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../src/shared/types.ts"],"sourcesContent":["export type { PropsDef } from '@vielzeug/ore';\n\n// ── Primitive type aliases ────────────────────────────────────────────────────\n\n/** Form validity methods exposed on form-associated custom elements. */\nexport type FormValidityMethods = {\n checkValidity(): boolean;\n reportValidity(): boolean;\n setCustomValidity(message: string): void;\n};\n\n/** Component size variants */\nexport const COMPONENT_SIZES = ['sm', 'md', 'lg'] as const;\nexport type ComponentSize = (typeof COMPONENT_SIZES)[number];\n\n/** Semantic theme colors */\nexport const THEME_COLORS = ['primary', 'secondary', 'info', 'success', 'warning', 'error'] as const;\nexport type ThemeColor = (typeof THEME_COLORS)[number];\n\n/** Visual variant styles */\nexport const VISUAL_VARIANTS = ['solid', 'flat', 'bordered', 'outline', 'ghost', 'text', 'frost'] as const;\nexport type VisualVariant = (typeof VISUAL_VARIANTS)[number];\n\n/** Variant set accepted by text-field-style inputs (everything except `text` and `frost`). */\nexport const FIELD_VARIANTS = ['flat', 'solid', 'bordered', 'outline', 'ghost'] as const;\nexport type FieldVariant = (typeof FIELD_VARIANTS)[number];\n\n/** Variant set accepted by input/select-style fields (everything except `frost`). */\nexport const INPUT_VARIANTS = ['solid', 'flat', 'bordered', 'outline', 'ghost', 'text'] as const;\nexport type InputVariant = (typeof INPUT_VARIANTS)[number];\n\n/** Table/grid density levels */\nexport const DENSITY_LEVELS = ['compact', 'cozy', 'comfortable'] as const;\nexport type DensityLevel = (typeof DENSITY_LEVELS)[number];\n\n/** Border radius variants */\nexport const ROUNDED_SIZES = ['none', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', 'full'] as const;\nexport type RoundedSize = (typeof ROUNDED_SIZES)[number];\n\n/** Elevation/shadow depth levels */\nexport const ELEVATION_LEVELS = [0, 1, 2, 3, 4, 5] as const;\nexport type ElevationLevel = (typeof ELEVATION_LEVELS)[number];\n\n/** Internal spacing variants */\nexport const PADDING_SIZES = ['none', 'sm', 'md', 'lg', 'xl'] as const;\nexport type PaddingSize = (typeof PADDING_SIZES)[number];\n\n/** Button form-submission types */\nexport const BUTTON_TYPES = ['button', 'submit', 'reset'] as const;\nexport type ButtonType = (typeof BUTTON_TYPES)[number];\n\n/** Anchor browsing-context values */\nexport const LINK_TARGETS = ['_blank', '_self', '_parent', '_top'] as const;\nexport type LinkTarget = (typeof LINK_TARGETS)[number];\n\n/** Allowed HTML5 input type values for `<ore-input>` */\nexport const INPUT_TYPES = [\n 'text',\n 'email',\n 'password',\n 'number',\n 'tel',\n 'url',\n 'search',\n 'date',\n 'time',\n 'datetime-local',\n 'month',\n 'week',\n] as const;\nexport type InputType = (typeof INPUT_TYPES)[number];\n\n// ── Form element props ────────────────────────────────────────────────────────\n\n/** Props for form-associated elements */\nexport type FormElementProps = {\n name?: string;\n value?: string;\n};\n\n/** Props for checkable form-associated elements (checkbox, radio) */\nexport type CheckableProps = FormElementProps & {\n checked?: boolean;\n};\n\n/**\n * Adds type-safe `addEventListener` / `removeEventListener` overloads to a custom element type.\n *\n * ```ts\n * export interface OreInputEvents {\n * change: { value: string; originalEvent: Event };\n * }\n * type OreInputElement = HTMLElement & OreInputProps & AddEventListeners<OreInputEvents>;\n * ```\n */\nexport type AddEventListeners<T> = {\n addEventListener<K extends keyof T & string>(\n type: K,\n listener: (this: HTMLElement, ev: CustomEvent<T[K]>) => void,\n options?: boolean | AddEventListenerOptions,\n ): void;\n removeEventListener<K extends keyof T & string>(\n type: K,\n listener: (this: HTMLElement, ev: CustomEvent<T[K]>) => void,\n options?: boolean | EventListenerOptions,\n ): void;\n};\n\n// ── Derived form field prop types ─────────────────────────────────────────────\n\nexport type BaseFormProps = {\n color?: ThemeColor;\n disabled?: boolean;\n error?: string;\n fullwidth?: boolean;\n helper?: string;\n label?: string;\n 'label-placement'?: 'inset' | 'outside';\n name?: string;\n size?: ComponentSize;\n /**\n * Shows an inline green check icon inside the field to confirm the value has passed\n * validation. Ignored while `error` is set: an error always wins.\n */\n success?: boolean;\n};\n\ntype FieldVisualProps<TVariant extends VisualVariant> = {\n rounded?: RoundedSize | '';\n variant?: TVariant;\n};\n\nexport type TextFieldProps<TVariant extends VisualVariant> = BaseFormProps &\n FieldVisualProps<TVariant> & {\n placeholder?: string;\n readonly?: boolean;\n required?: boolean;\n value?: string;\n };\n\nexport type SelectableFieldProps<TVariant extends VisualVariant> = BaseFormProps &\n FieldVisualProps<TVariant> & {\n placeholder?: string;\n value?: string;\n };\n"],"mappings":"AAYA,IAAa,EAAkB,CAAC,KAAM,KAAM,IAAI,EAInC,EAAe,CAAC,UAAW,YAAa,OAAQ,UAAW,UAAW,OAAO,EAI7E,EAAkB,CAAC,QAAS,OAAQ,WAAY,UAAW,QAAS,OAAQ,OAAO,EAInF,EAAiB,CAAC,OAAQ,QAAS,WAAY,UAAW,OAAO,EAIjE,EAAiB,CAAC,QAAS,OAAQ,WAAY,UAAW,QAAS,MAAM,EAIzE,EAAiB,CAAC,UAAW,OAAQ,aAAa,EAIlD,EAAgB,CAAC,OAAQ,KAAM,KAAM,KAAM,KAAM,MAAO,MAAO,MAAM,EAIrE,EAAmB,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,CAAC,EAIpC,EAAgB,CAAC,OAAQ,KAAM,KAAM,KAAM,IAAI,EAQ/C,EAAe,CAAC,SAAU,QAAS,UAAW,MAAM"}
package/dist/sidebar.cjs CHANGED
@@ -1,4 +1,4 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./styles/mixins/accessibility.css.cjs"),t=require("./icon.cjs"),n=require("./utils/link.cjs"),r=require("./overlay/shared/background-lock.cjs"),i=require("./layout/shared.cjs"),a=require("./layout/sidebar/sidebar.css.cjs"),o=require("./layout/sidebar/sidebar-group.css.cjs"),s=require("./layout/sidebar/sidebar-item.css.cjs");let c=require("@vielzeug/ripple"),l=require("@vielzeug/sentinel"),u=require("@vielzeug/ore"),d=require("@vielzeug/focus");var f=(0,u.createContext)(`SidebarContext`),p=`ore-sidebar`;(0,u.define)(p,{props:{"bottom-nav-at":u.prop.string(),"close-on-select":u.prop.bool(!1),"collapse-label":u.prop.string(`Collapse sidebar`),collapsed:u.prop.bool(!1),collapsible:u.prop.bool(!1),"container-breakpoints":u.prop.bool(!1),"default-collapsed":u.prop.bool(!1),drawer:u.prop.bool(!1),"drawer-close-label":u.prop.string(`Close sidebar`),"expand-label":u.prop.string(`Expand sidebar`),label:u.prop.string(`Sidebar navigation`),responsive:u.prop.string(),variant:u.prop.string()},setup(e){let t=(0,u.getHost)(),n=(0,u.useEmit)(),a=(0,u.useSlots)(),hasHeader=()=>a.has(`header`).value,hasFooter=()=>a.has(`footer`).value,hasLogo=()=>a.has(`logo`).value,o=(0,c.signal)(t.hasAttribute(`collapsed`)),s=(0,c.signal)(o.value?t.hasAttribute(`collapsed`):e[`default-collapsed`].value),p=(0,c.signal)(!1),m=(0,c.signal)(!1),h=(0,c.signal)([]),g=(0,c.signal)(!1),_=(0,c.signal)(!1),v=(0,c.signal)(i.parseMaxWidthPx(e.responsive.value)),y=(0,c.signal)(!!String(e.responsive.value??``).trim()),b=(0,c.signal)(!1),x=(0,c.signal)(!1),S=(0,c.signal)(i.parseMaxWidthPx(e[`bottom-nav-at`].value)),C=(0,c.signal)(!1),w=r.createBackgroundLock(),T=null,isCollapsed=()=>s.value,E=(0,c.computed)(()=>p.value?`bottom-nav`:s.value?`collapsed`:`default`),applyResponsiveState=()=>{let t=e[`container-breakpoints`].value,n=t?_.value:g.value||_.value,r=t?x.value:b.value||x.value;m.value||(p.value=r),!r&&!m.value&&setDrawerOpen(!1,`responsive`),y.value&&setCollapsed(n,`responsive`)},readBottomNavItems=()=>{if(e.drawer.value){h.value=[];return}let n=a.elements().value.filter(e=>e instanceof HTMLElement&&e.tagName.toLowerCase()===`ore-sidebar-item`),r=[...t.querySelectorAll(`ore-sidebar-item[bottom-nav]`)],i=(r.length>0?r:n).map((e,t)=>{let n=e,r=n.querySelector(`:scope > [slot="icon"]`)??n.querySelector(`[slot="icon"]`),i=r?.tagName.toLowerCase()===`ore-icon`?r.getAttribute(`name`):null,a=r?.querySelector(`ore-icon`)?.getAttribute(`name`)??null,o=(n.textContent??``).trim();return{active:n.hasAttribute(`active`),disabled:n.hasAttribute(`disabled`),href:n.getAttribute(`href`)??void 0,iconName:i??a??void 0,label:n.getAttribute(`bottom-nav-label`)?.trim()||o||`Item ${t+1}`,source:n}});h.value=i};(0,u.provide)(f,{closeDrawer:()=>setDrawerOpen(!1,`toggle`),closeOnSelect:e[`close-on-select`],collapsed:(0,c.computed)(()=>!p.value&&s.value),drawerOpen:(0,c.computed)(()=>m.value),mode:E,variant:e.variant});let setCollapsed=(e,t)=>{isCollapsed()!==e&&(o.value||(s.value=e),n(`collapsed-change`,{collapsed:e,source:t}))},setDrawerOpen=(r,i)=>{let a=!!r;a&&!p.value&&!e.drawer.value&&(p.value=!0),m.value!==a&&(a&&(T=(0,d.captureFocus)(),w.lock(t)),m.value=a,a?queueMicrotask(()=>t.shadowRoot?.querySelector(`nav`)?.focus()):(w.unlock(),applyResponsiveState(),queueMicrotask(()=>{T?.(),T=null})),n(`drawer-change`,{open:a,source:i}))},doToggle=()=>{setCollapsed(!isCollapsed(),`toggle`)},D=t;return D.setCollapsed=e=>setCollapsed(!!e,`api`),D.toggle=doToggle,D.openDrawer=()=>setDrawerOpen(!0,`api`),D.closeDrawer=()=>setDrawerOpen(!1,`api`),D.toggleDrawer=()=>setDrawerOpen(!m.value,`toggle`),(0,u.bind)({attr:{"data-bottom-nav":()=>p.value?!0:void 0,"data-collapsed":()=>isCollapsed()&&!p.value?!0:void 0,"data-drawer-open":()=>m.value?!0:void 0,"data-has-logo":()=>hasLogo()?!0:void 0,"data-preview-mode":()=>C.value?!0:void 0}}),(0,u.onMounted)(()=>{t.setAttribute(`data-no-transition`,``);let n=!1,unlockTransition=()=>{n||(n=!0,t.removeAttribute(`data-no-transition`))};requestAnimationFrame(()=>requestAnimationFrame(unlockTransition));let mediaCleanup,bottomNavCleanup,r=new Map,d=new MutationObserver(()=>{(t.hasAttribute(`collapsed`)||o.value)&&(o.value=!0,s.value=t.hasAttribute(`collapsed`))});d.observe(t,{attributeFilter:[`collapsed`],attributes:!0});let closeOnEscape=e=>{e.key===`Escape`&&m.value&&(e.preventDefault(),setDrawerOpen(!1,`toggle`))};t.addEventListener(`keydown`,closeOnEscape);let keepFocusInDrawer=e=>{if(!m.value)return;let n=e.target;n instanceof Node&&(t===n||t.contains(n))||t.shadowRoot?.querySelector(`nav`)?.focus()};document.addEventListener(`focusin`,keepFocusInDrawer),(0,c.watch)(e.responsive,n=>{mediaCleanup?.(),mediaCleanup=void 0;let r=String(n??``).trim();y.value=!!r,v.value=i.parseMaxWidthPx(r),g.value=!1;let a=i.readContainerWidth(t);if(_.value=a>0&&v.value!=null&&a<=v.value,applyResponsiveState(),!(e[`container-breakpoints`].value&&v.value!=null)&&r)try{let e=(0,l.createMediaQuery)(r),syncMedia=e=>{e&&(g.value=e.matches,applyResponsiveState())};syncMedia(e.getSnapshot());let t=(0,c.watch)((0,c.fromSubscribable)(e,{signal:e.disposalSignal}),syncMedia);mediaCleanup=()=>{t.dispose(),e.dispose()}}catch(e){if(!(e instanceof l.SentinelUnavailableError))throw e}},{immediate:!0}),(0,c.watch)(e[`bottom-nav-at`],n=>{bottomNavCleanup?.(),bottomNavCleanup=void 0;let r=String(n??``).trim();S.value=i.parseMaxWidthPx(r),b.value=!1;let a=i.readContainerWidth(t);if(x.value=a>0&&S.value!=null&&a<=S.value,applyResponsiveState(),!(e[`container-breakpoints`].value&&S.value!=null)&&r)try{let e=(0,l.createMediaQuery)(r),syncMedia=e=>{e&&(b.value=e.matches,applyResponsiveState())};syncMedia(e.getSnapshot());let t=(0,c.watch)((0,c.fromSubscribable)(e,{signal:e.disposalSignal}),syncMedia);bottomNavCleanup=()=>{t.dispose(),e.dispose()}}catch(e){if(!(e instanceof l.SentinelUnavailableError))throw e}},{immediate:!0}),(0,c.watch)(e.drawer,()=>{applyResponsiveState(),readBottomNavItems()});let f=typeof ResizeObserver==`function`?(()=>{let e=(0,l.createElementSize)(t);(0,u.onCleanup)(()=>e.dispose());let n=(0,c.fromSubscribable)(e,{signal:e.disposalSignal}),r=t.parentElement,a=i.resolveContainerElement(t),o=r?(0,l.createElementSize)(r):void 0,s=a&&a!==r?(0,l.createElementSize)(a):void 0;o&&(0,u.onCleanup)(()=>o.dispose()),s&&(0,u.onCleanup)(()=>s.dispose());let d=o?(0,c.fromSubscribable)(o,{signal:o.disposalSignal}):void 0,f=s?(0,c.fromSubscribable)(s,{signal:s.disposalSignal}):void 0,p,onResize=()=>{p!==void 0&&cancelAnimationFrame(p),p=requestAnimationFrame(()=>{let e=i.resolveContainerElement(t),n=i.readContainerWidth(t),r=_.value,a=x.value,o=e?.clientWidth??0;C.value=o>0&&o<window.innerWidth,_.value=n>0&&v.value!=null&&n<=v.value,x.value=n>0&&S.value!=null&&n<=S.value,(r!==_.value||a!==x.value)&&applyResponsiveState(),unlockTransition()})};return(0,c.watch)((0,c.computed)(()=>[n.value?.width,n.value?.height,d?.value?.width,d?.value?.height,f?.value?.width,f?.value?.height]),onResize)})():void 0,bindItemObservers=e=>{let t=new Set(e);for(let[e,n]of r)t.has(e)||(n.disconnect(),r.delete(e));for(let t of e){if(r.has(t))continue;let e=new MutationObserver(()=>{p.value&&readBottomNavItems()});e.observe(t,{attributeFilter:[`active`,`bottom-nav`,`bottom-nav-label`,`disabled`,`href`],attributes:!0,characterData:!0,childList:!0,subtree:!0}),r.set(t,e)}},syncBottomNavItems=()=>{bindItemObservers([...t.querySelectorAll(`ore-sidebar-item`)]),readBottomNavItems()};(0,c.watch)(a.elements(),syncBottomNavItems,{immediate:!0});let h=new MutationObserver(syncBottomNavItems);return h.observe(t,{childList:!0,subtree:!0}),()=>{d.disconnect(),h.disconnect(),t.removeEventListener(`keydown`,closeOnEscape),document.removeEventListener(`focusin`,keepFocusInDrawer),w.unlock(),mediaCleanup?.(),bottomNavCleanup?.(),f?.dispose();for(let e of r.values())e.disconnect();r.clear()}}),u.html`
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./styles/mixins/accessibility.css.cjs"),t=require("./icon.cjs"),n=require("./utils/link.cjs"),r=require("./overlay/shared/background-lock.cjs"),i=require("./layout/shared.cjs"),a=require("./layout/sidebar/sidebar.css.cjs"),o=require("./layout/sidebar/sidebar-group.css.cjs"),s=require("./layout/sidebar/sidebar-item.css.cjs");let c=require("@vielzeug/ripple"),l=require("@vielzeug/sentinel"),u=require("@vielzeug/ore"),d=require("@vielzeug/focus");var f=[`floating`,`inset`],p=(0,u.createContext)(`SidebarContext`),m=`ore-sidebar`;(0,u.define)(m,{props:{"bottom-nav-at":u.prop.string(),"close-on-select":u.prop.bool(!1),"collapse-label":u.prop.string(`Collapse sidebar`),collapsed:u.prop.bool(!1),collapsible:u.prop.bool(!1),"container-breakpoints":u.prop.bool(!1),"default-collapsed":u.prop.bool(!1),drawer:u.prop.bool(!1),"drawer-close-label":u.prop.string(`Close sidebar`),"expand-label":u.prop.string(`Expand sidebar`),label:u.prop.string(`Sidebar navigation`),responsive:u.prop.string(),variant:u.prop.oneOf(f)},setup(e){let t=(0,u.getHost)(),n=(0,u.useEmit)(),a=(0,u.useSlots)(),hasHeader=()=>a.has(`header`).value,hasFooter=()=>a.has(`footer`).value,hasLogo=()=>a.has(`logo`).value,o=(0,c.signal)(t.hasAttribute(`collapsed`)),s=(0,c.signal)(o.value?t.hasAttribute(`collapsed`):e[`default-collapsed`].value),f=(0,c.signal)(!1),m=(0,c.signal)(!1),h=(0,c.signal)([]),g=(0,c.signal)(!1),_=(0,c.signal)(!1),v=(0,c.signal)(i.parseMaxWidthPx(e.responsive.value)),y=(0,c.signal)(!!String(e.responsive.value??``).trim()),b=(0,c.signal)(!1),x=(0,c.signal)(!1),S=(0,c.signal)(i.parseMaxWidthPx(e[`bottom-nav-at`].value)),C=(0,c.signal)(!1),w=r.createBackgroundLock(),T=null,isCollapsed=()=>s.value,E=(0,c.computed)(()=>f.value?`bottom-nav`:s.value?`collapsed`:`default`),applyResponsiveState=()=>{let t=e[`container-breakpoints`].value,n=t?_.value:g.value||_.value,r=t?x.value:b.value||x.value;m.value||(f.value=r),!r&&!m.value&&setDrawerOpen(!1,`responsive`),y.value&&setCollapsed(n,`responsive`)},readBottomNavItems=()=>{if(e.drawer.value){h.value=[];return}let n=a.elements().value.filter(e=>e instanceof HTMLElement&&e.tagName.toLowerCase()===`ore-sidebar-item`),r=[...t.querySelectorAll(`ore-sidebar-item[bottom-nav]`)],i=(r.length>0?r:n).map((e,t)=>{let n=e,r=n.querySelector(`:scope > [slot="icon"]`)??n.querySelector(`[slot="icon"]`),i=r?.tagName.toLowerCase()===`ore-icon`?r.getAttribute(`name`):null,a=r?.querySelector(`ore-icon`)?.getAttribute(`name`)??null,o=(n.textContent??``).trim();return{active:n.hasAttribute(`active`),disabled:n.hasAttribute(`disabled`),href:n.getAttribute(`href`)??void 0,iconName:i??a??void 0,label:n.getAttribute(`bottom-nav-label`)?.trim()||o||`Item ${t+1}`,source:n}});h.value=i};(0,u.provide)(p,{closeDrawer:()=>setDrawerOpen(!1,`toggle`),closeOnSelect:e[`close-on-select`],collapsed:(0,c.computed)(()=>!f.value&&s.value),drawerOpen:(0,c.computed)(()=>m.value),mode:E,variant:e.variant});let setCollapsed=(e,t)=>{isCollapsed()!==e&&(o.value||(s.value=e),n(`collapsed-change`,{collapsed:e,source:t}))},setDrawerOpen=(r,i)=>{let a=!!r;a&&!f.value&&!e.drawer.value&&(f.value=!0),m.value!==a&&(a&&(T=(0,d.captureFocus)(),w.lock(t)),m.value=a,a?queueMicrotask(()=>t.shadowRoot?.querySelector(`nav`)?.focus()):(w.unlock(),applyResponsiveState(),queueMicrotask(()=>{T?.(),T=null})),n(`drawer-change`,{open:a,source:i}))},doToggle=()=>{setCollapsed(!isCollapsed(),`toggle`)},D=t;return D.setCollapsed=e=>setCollapsed(!!e,`api`),D.toggle=doToggle,D.openDrawer=()=>setDrawerOpen(!0,`api`),D.closeDrawer=()=>setDrawerOpen(!1,`api`),D.toggleDrawer=()=>setDrawerOpen(!m.value,`toggle`),(0,u.bind)({attr:{"data-bottom-nav":()=>f.value?!0:void 0,"data-collapsed":()=>isCollapsed()&&!f.value?!0:void 0,"data-drawer-open":()=>m.value?!0:void 0,"data-has-logo":()=>hasLogo()?!0:void 0,"data-preview-mode":()=>C.value?!0:void 0}}),(0,u.onMounted)(()=>{t.setAttribute(`data-no-transition`,``);let n=!1,unlockTransition=()=>{n||(n=!0,t.removeAttribute(`data-no-transition`))};requestAnimationFrame(()=>requestAnimationFrame(unlockTransition));let mediaCleanup,bottomNavCleanup,r=new Map,d=new MutationObserver(()=>{(t.hasAttribute(`collapsed`)||o.value)&&(o.value=!0,s.value=t.hasAttribute(`collapsed`))});d.observe(t,{attributeFilter:[`collapsed`],attributes:!0});let closeOnEscape=e=>{e.key===`Escape`&&m.value&&(e.preventDefault(),setDrawerOpen(!1,`toggle`))};t.addEventListener(`keydown`,closeOnEscape);let keepFocusInDrawer=e=>{if(!m.value)return;let n=e.target;n instanceof Node&&(t===n||t.contains(n))||t.shadowRoot?.querySelector(`nav`)?.focus()};document.addEventListener(`focusin`,keepFocusInDrawer),(0,c.watch)(e.responsive,n=>{mediaCleanup?.(),mediaCleanup=void 0;let r=String(n??``).trim();y.value=!!r,v.value=i.parseMaxWidthPx(r),g.value=!1;let a=i.readContainerWidth(t);if(_.value=a>0&&v.value!=null&&a<=v.value,applyResponsiveState(),!(e[`container-breakpoints`].value&&v.value!=null)&&r)try{let e=(0,l.createMediaQuery)(r),syncMedia=e=>{e&&(g.value=e.matches,applyResponsiveState())};syncMedia(e.getSnapshot());let t=(0,c.watch)((0,c.fromSubscribable)(e,{signal:e.disposalSignal}),syncMedia);mediaCleanup=()=>{t.dispose(),e.dispose()}}catch(e){if(!(e instanceof l.SentinelUnavailableError))throw e}},{immediate:!0}),(0,c.watch)(e[`bottom-nav-at`],n=>{bottomNavCleanup?.(),bottomNavCleanup=void 0;let r=String(n??``).trim();S.value=i.parseMaxWidthPx(r),b.value=!1;let a=i.readContainerWidth(t);if(x.value=a>0&&S.value!=null&&a<=S.value,applyResponsiveState(),!(e[`container-breakpoints`].value&&S.value!=null)&&r)try{let e=(0,l.createMediaQuery)(r),syncMedia=e=>{e&&(b.value=e.matches,applyResponsiveState())};syncMedia(e.getSnapshot());let t=(0,c.watch)((0,c.fromSubscribable)(e,{signal:e.disposalSignal}),syncMedia);bottomNavCleanup=()=>{t.dispose(),e.dispose()}}catch(e){if(!(e instanceof l.SentinelUnavailableError))throw e}},{immediate:!0}),(0,c.watch)(e.drawer,()=>{applyResponsiveState(),readBottomNavItems()});let p=typeof ResizeObserver==`function`?(()=>{let e=(0,l.createElementSize)(t);(0,u.onCleanup)(()=>e.dispose());let n=(0,c.fromSubscribable)(e,{signal:e.disposalSignal}),r=t.parentElement,a=i.resolveContainerElement(t),o=r?(0,l.createElementSize)(r):void 0,s=a&&a!==r?(0,l.createElementSize)(a):void 0;o&&(0,u.onCleanup)(()=>o.dispose()),s&&(0,u.onCleanup)(()=>s.dispose());let d=o?(0,c.fromSubscribable)(o,{signal:o.disposalSignal}):void 0,f=s?(0,c.fromSubscribable)(s,{signal:s.disposalSignal}):void 0,p,onResize=()=>{p!==void 0&&cancelAnimationFrame(p),p=requestAnimationFrame(()=>{let e=i.resolveContainerElement(t),n=i.readContainerWidth(t),r=_.value,a=x.value,o=e?.clientWidth??0;C.value=o>0&&o<window.innerWidth,_.value=n>0&&v.value!=null&&n<=v.value,x.value=n>0&&S.value!=null&&n<=S.value,(r!==_.value||a!==x.value)&&applyResponsiveState(),unlockTransition()})};return(0,c.watch)((0,c.computed)(()=>[n.value?.width,n.value?.height,d?.value?.width,d?.value?.height,f?.value?.width,f?.value?.height]),onResize)})():void 0,bindItemObservers=e=>{let t=new Set(e);for(let[e,n]of r)t.has(e)||(n.disconnect(),r.delete(e));for(let t of e){if(r.has(t))continue;let e=new MutationObserver(()=>{f.value&&readBottomNavItems()});e.observe(t,{attributeFilter:[`active`,`bottom-nav`,`bottom-nav-label`,`disabled`,`href`],attributes:!0,characterData:!0,childList:!0,subtree:!0}),r.set(t,e)}},syncBottomNavItems=()=>{bindItemObservers([...t.querySelectorAll(`ore-sidebar-item`)]),readBottomNavItems()};(0,c.watch)(a.elements(),syncBottomNavItems,{immediate:!0});let h=new MutationObserver(syncBottomNavItems);return h.observe(t,{childList:!0,subtree:!0}),()=>{d.disconnect(),h.disconnect(),t.removeEventListener(`keydown`,closeOnEscape),document.removeEventListener(`focusin`,keepFocusInDrawer),w.unlock(),mediaCleanup?.(),bottomNavCleanup?.(),p?.dispose();for(let e of r.values())e.disconnect();r.clear()}}),u.html`
2
2
  <button
3
3
  class="drawer-backdrop"
4
4
  part="drawer-backdrop"
@@ -8,10 +8,10 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=requi
8
8
  @click=${()=>setDrawerOpen(!1,`toggle`)}></button>
9
9
  <nav
10
10
  aria-label="${e.label}"
11
- aria-hidden=${()=>(p.value||e.drawer.value)&&!m.value?`true`:null}
11
+ aria-hidden=${()=>(f.value||e.drawer.value)&&!m.value?`true`:null}
12
12
  part="nav"
13
13
  tabindex="-1"
14
- ?inert=${()=>(p.value||e.drawer.value)&&!m.value}>
14
+ ?inert=${()=>(f.value||e.drawer.value)&&!m.value}>
15
15
  <div class="sidebar-header" part="header" ?hidden=${()=>!hasHeader()&&!e.collapsible.value}>
16
16
  <span class="sidebar-logo" ?hidden=${()=>!hasLogo()}>
17
17
  <slot name="logo"></slot>
@@ -43,7 +43,7 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=requi
43
43
  </div>
44
44
  </nav>
45
45
 
46
- <div class="bottom-bar" part="bottom-bar" ?hidden=${()=>!p.value}>
46
+ <div class="bottom-bar" part="bottom-bar" ?hidden=${()=>!f.value}>
47
47
  ${()=>h.value.map(e=>{let t=`bottom-tab${e.active?` bottom-tab-active`:``}`;return e.href&&!e.disabled?u.html`
48
48
  <a
49
49
  class="${t}"
@@ -70,7 +70,7 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=requi
70
70
  </button>
71
71
  `})}
72
72
  </div>
73
- `},styles:[e.coarsePointerMixin,e.reducedMotionMixin,a.default]});var m=`ore-sidebar-group`;(0,u.define)(m,{props:{collapsible:u.prop.bool(!1),"default-open":u.prop.bool(!0),label:u.prop.string(),open:{default:void 0,parse:e=>e==null?void 0:e===``||e===`true`,reflect:!1}},setup(e){let t=(0,u.useSlots)(),hasIcon=()=>t.has(`icon`).value,n=(0,u.inject)(f);(0,u.bind)({attr:{"sidebar-bottom-nav":()=>n?.mode.value===`bottom-nav`&&!n?.drawerOpen.value||void 0,"sidebar-collapsed":()=>n?.collapsed.value?!0:void 0}});let isControlled=()=>e.open.value!==void 0,r=(0,c.signal)(e[`default-open`].value),i=(0,c.computed)(()=>e.collapsible.value?isControlled()?e.open.value??!1:r.value:!0);return(0,c.watch)(e.open,e=>{e!==void 0&&(r.value=e)}),(0,u.bind)({attr:{open:()=>i.value?!0:void 0}}),u.html`
73
+ `},styles:[e.coarsePointerMixin,e.reducedMotionMixin,a.default]});var h=`ore-sidebar-group`;(0,u.define)(h,{props:{collapsible:u.prop.bool(!1),"default-open":u.prop.bool(!0),label:u.prop.string(),open:{default:void 0,parse:e=>e==null?void 0:e===``||e===`true`,reflect:!1}},setup(e){let t=(0,u.useSlots)(),hasIcon=()=>t.has(`icon`).value,n=(0,u.inject)(p);(0,u.bind)({attr:{"sidebar-bottom-nav":()=>n?.mode.value===`bottom-nav`&&!n?.drawerOpen.value||void 0,"sidebar-collapsed":()=>n?.collapsed.value?!0:void 0}});let isControlled=()=>e.open.value!==void 0,r=(0,c.signal)(e[`default-open`].value),i=(0,c.computed)(()=>e.collapsible.value?isControlled()?e.open.value??!1:r.value:!0);return(0,c.watch)(e.open,e=>{e!==void 0&&(r.value=e)}),(0,u.bind)({attr:{open:()=>i.value?!0:void 0}}),u.html`
74
74
  <details class="group" part="group" ?open=${i}>
75
75
  <summary
76
76
  class="group-header"
@@ -89,7 +89,7 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=requi
89
89
  <slot></slot>
90
90
  </div>
91
91
  </details>
92
- `},styles:[e.reducedMotionMixin,o.default]});var h=`ore-sidebar-item`;(0,u.define)(h,{props:{active:u.prop.bool(!1),"bottom-nav":u.prop.bool(!1),"bottom-nav-label":u.prop.string(),disabled:u.prop.bool(!1),href:u.prop.string(),label:u.prop.string(),rel:u.prop.string(),target:u.prop.string()},setup(e){let t=(0,u.useSlots)(),hasIcon=()=>t.has(`icon`).value,hasEnd=()=>t.has(`end`).value,r=(0,u.inject)(f);(0,u.bind)({attr:{"sidebar-bottom-nav":()=>r?.mode.value===`bottom-nav`&&!r?.drawerOpen.value||void 0,"sidebar-collapsed":()=>r?.collapsed.value?!0:void 0}});let isLink=()=>!!e.href.value&&!e.disabled.value,i=(0,c.computed)(()=>n.computeSafeRel(e.rel.value,e.target.value)),closeDrawerOnSelect=e=>{r?.closeOnSelect.value&&r.drawerOpen.value&&(e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||queueMicrotask(r.closeDrawer))},renderItemContent=()=>u.html`
92
+ `},styles:[e.reducedMotionMixin,o.default]});var g=`ore-sidebar-item`;(0,u.define)(g,{props:{active:u.prop.bool(!1),"bottom-nav":u.prop.bool(!1),"bottom-nav-label":u.prop.string(),disabled:u.prop.bool(!1),href:u.prop.string(),label:u.prop.string(),rel:u.prop.string(),target:u.prop.string()},setup(e){let t=(0,u.useSlots)(),hasIcon=()=>t.has(`icon`).value,hasEnd=()=>t.has(`end`).value,r=(0,u.inject)(p);(0,u.bind)({attr:{"sidebar-bottom-nav":()=>r?.mode.value===`bottom-nav`&&!r?.drawerOpen.value||void 0,"sidebar-collapsed":()=>r?.collapsed.value?!0:void 0}});let isLink=()=>!!e.href.value&&!e.disabled.value,i=(0,c.computed)(()=>n.computeSafeRel(e.rel.value,e.target.value)),closeDrawerOnSelect=e=>{r?.closeOnSelect.value&&r.drawerOpen.value&&(e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||queueMicrotask(r.closeDrawer))},renderItemContent=()=>u.html`
93
93
  <span class="item-icon" part="item-icon" ?hidden=${()=>!hasIcon()} aria-hidden="true">
94
94
  <slot name="icon"></slot>
95
95
  </span>
@@ -132,5 +132,5 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=requi
132
132
  ${renderItemContent()}
133
133
  </button>
134
134
  `}
135
- `},styles:[e.coarsePointerMixin,s.default]}),exports.ICON_TAG=t.ICON_TAG,exports.SIDEBAR_CTX=f,exports.SIDEBAR_GROUP_TAG=m,exports.SIDEBAR_ITEM_TAG=h,exports.SIDEBAR_TAG=p;
135
+ `},styles:[e.coarsePointerMixin,s.default]}),exports.ICON_TAG=t.ICON_TAG,exports.SIDEBAR_CTX=p,exports.SIDEBAR_GROUP_TAG=h,exports.SIDEBAR_ITEM_TAG=g,exports.SIDEBAR_TAG=m;
136
136
  //# sourceMappingURL=sidebar.cjs.map