@vielzeug/refine 1.5.4 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (329) hide show
  1. package/dist/accordion.cjs +1 -1
  2. package/dist/accordion.cjs.map +1 -1
  3. package/dist/accordion.js +30 -28
  4. package/dist/accordion.js.map +1 -1
  5. package/dist/button-group.cjs.map +1 -1
  6. package/dist/button-group.js.map +1 -1
  7. package/dist/button.cjs +1 -1
  8. package/dist/button.cjs.map +1 -1
  9. package/dist/button.js +1 -0
  10. package/dist/button.js.map +1 -1
  11. package/dist/checkbox-group.cjs +3 -3
  12. package/dist/checkbox-group.cjs.map +1 -1
  13. package/dist/checkbox-group.js +51 -58
  14. package/dist/checkbox-group.js.map +1 -1
  15. package/dist/combobox.cjs +29 -28
  16. package/dist/combobox.cjs.map +1 -1
  17. package/dist/combobox.js +201 -195
  18. package/dist/combobox.js.map +1 -1
  19. package/dist/content/card/card.css.cjs +1 -1
  20. package/dist/content/card/card.css.cjs.map +1 -1
  21. package/dist/content/card/card.css.js +1 -1
  22. package/dist/content/card/card.css.js.map +1 -1
  23. package/dist/content/chat-message/chat-message.css.cjs +1 -1
  24. package/dist/content/chat-message/chat-message.css.cjs.map +1 -1
  25. package/dist/content/chat-message/chat-message.css.js +1 -1
  26. package/dist/content/chat-message/chat-message.css.js.map +1 -1
  27. package/dist/content/icon/icon.d.ts.map +1 -1
  28. package/dist/content/index.d.ts +4 -0
  29. package/dist/content/index.d.ts.map +1 -1
  30. package/dist/content/list/_list-item-reveal.cjs +2 -0
  31. package/dist/content/list/_list-item-reveal.cjs.map +1 -0
  32. package/dist/content/list/_list-item-reveal.d.ts +25 -0
  33. package/dist/content/list/_list-item-reveal.d.ts.map +1 -0
  34. package/dist/content/list/_list-item-reveal.js +33 -0
  35. package/dist/content/list/_list-item-reveal.js.map +1 -0
  36. package/dist/content/list/list-item.css.cjs +2 -0
  37. package/dist/content/list/list-item.css.cjs.map +1 -0
  38. package/dist/content/list/list-item.css.js +6 -0
  39. package/dist/content/list/list-item.css.js.map +1 -0
  40. package/dist/content/list/list-item.d.ts +111 -0
  41. package/dist/content/list/list-item.d.ts.map +1 -0
  42. package/dist/content/list/list.css.cjs +2 -0
  43. package/dist/content/list/list.css.cjs.map +1 -0
  44. package/dist/content/list/list.css.js +6 -0
  45. package/dist/content/list/list.css.js.map +1 -0
  46. package/dist/content/list/list.d.ts +93 -0
  47. package/dist/content/list/list.d.ts.map +1 -0
  48. package/dist/custom-elements.json +6052 -5449
  49. package/dist/date-picker.cjs +2 -1
  50. package/dist/date-picker.cjs.map +1 -1
  51. package/dist/date-picker.js +2 -0
  52. package/dist/date-picker.js.map +1 -1
  53. package/dist/disclosure/tab-item/tab-item.d.ts.map +1 -1
  54. package/dist/disclosure/tab-panel/tab-panel.d.ts.map +1 -1
  55. package/dist/disclosure/tabs/tabs.d.ts.map +1 -1
  56. package/dist/drawer.cjs +1 -1
  57. package/dist/drawer.cjs.map +1 -1
  58. package/dist/drawer.js +47 -48
  59. package/dist/drawer.js.map +1 -1
  60. package/dist/file-input.cjs +111 -45
  61. package/dist/file-input.cjs.map +1 -1
  62. package/dist/file-input.js +216 -156
  63. package/dist/file-input.js.map +1 -1
  64. package/dist/headless/aria-reflection.cjs +2 -0
  65. package/dist/headless/aria-reflection.cjs.map +1 -0
  66. package/dist/headless/aria-reflection.d.ts +27 -0
  67. package/dist/headless/aria-reflection.d.ts.map +1 -0
  68. package/dist/headless/aria-reflection.js +18 -0
  69. package/dist/headless/aria-reflection.js.map +1 -0
  70. package/dist/headless/checkable.cjs +1 -1
  71. package/dist/headless/checkable.cjs.map +1 -1
  72. package/dist/headless/checkable.d.ts +2 -10
  73. package/dist/headless/checkable.d.ts.map +1 -1
  74. package/dist/headless/checkable.js +29 -29
  75. package/dist/headless/checkable.js.map +1 -1
  76. package/dist/headless/choice-field.cjs +1 -1
  77. package/dist/headless/choice-field.cjs.map +1 -1
  78. package/dist/headless/choice-field.d.ts +2 -7
  79. package/dist/headless/choice-field.d.ts.map +1 -1
  80. package/dist/headless/choice-field.js +37 -37
  81. package/dist/headless/choice-field.js.map +1 -1
  82. package/dist/headless/field-base.cjs +1 -1
  83. package/dist/headless/field-base.cjs.map +1 -1
  84. package/dist/headless/field-base.d.ts +17 -0
  85. package/dist/headless/field-base.d.ts.map +1 -1
  86. package/dist/headless/field-base.js +21 -6
  87. package/dist/headless/field-base.js.map +1 -1
  88. package/dist/headless/focus.cjs +1 -1
  89. package/dist/headless/focus.cjs.map +1 -1
  90. package/dist/headless/focus.d.ts +7 -0
  91. package/dist/headless/focus.d.ts.map +1 -1
  92. package/dist/headless/focus.js +6 -6
  93. package/dist/headless/focus.js.map +1 -1
  94. package/dist/headless/index.d.ts +4 -2
  95. package/dist/headless/index.d.ts.map +1 -1
  96. package/dist/headless/nav.cjs +1 -1
  97. package/dist/headless/nav.cjs.map +1 -1
  98. package/dist/headless/nav.d.ts +12 -0
  99. package/dist/headless/nav.d.ts.map +1 -1
  100. package/dist/headless/nav.js +68 -50
  101. package/dist/headless/nav.js.map +1 -1
  102. package/dist/headless/overlay.cjs +1 -1
  103. package/dist/headless/overlay.cjs.map +1 -1
  104. package/dist/headless/overlay.d.ts +2 -0
  105. package/dist/headless/overlay.d.ts.map +1 -1
  106. package/dist/headless/overlay.js +8 -5
  107. package/dist/headless/overlay.js.map +1 -1
  108. package/dist/headless/ref-callback.cjs +2 -0
  109. package/dist/headless/ref-callback.cjs.map +1 -0
  110. package/dist/headless/ref-callback.d.ts +26 -0
  111. package/dist/headless/ref-callback.d.ts.map +1 -0
  112. package/dist/headless/ref-callback.js +13 -0
  113. package/dist/headless/ref-callback.js.map +1 -0
  114. package/dist/headless/swipe.cjs +1 -1
  115. package/dist/headless/swipe.cjs.map +1 -1
  116. package/dist/headless/swipe.d.ts +2 -0
  117. package/dist/headless/swipe.d.ts.map +1 -1
  118. package/dist/headless/swipe.js +26 -21
  119. package/dist/headless/swipe.js.map +1 -1
  120. package/dist/headless.cjs +1 -1
  121. package/dist/headless.js +28 -26
  122. package/dist/icon.cjs +1 -1
  123. package/dist/icon.cjs.map +1 -1
  124. package/dist/icon.js +36 -38
  125. package/dist/icon.js.map +1 -1
  126. package/dist/index.cjs +1 -1
  127. package/dist/index.js +63 -61
  128. package/dist/input.cjs +29 -26
  129. package/dist/input.cjs.map +1 -1
  130. package/dist/input.js +91 -79
  131. package/dist/input.js.map +1 -1
  132. package/dist/inputs/button/button.css.cjs +1 -1
  133. package/dist/inputs/button/button.css.cjs.map +1 -1
  134. package/dist/inputs/button/button.css.js +1 -1
  135. package/dist/inputs/button/button.css.js.map +1 -1
  136. package/dist/inputs/button/button.d.ts +8 -0
  137. package/dist/inputs/button/button.d.ts.map +1 -1
  138. package/dist/inputs/checkbox/checkbox.css.cjs +1 -1
  139. package/dist/inputs/checkbox/checkbox.css.cjs.map +1 -1
  140. package/dist/inputs/checkbox/checkbox.css.js +1 -1
  141. package/dist/inputs/checkbox/checkbox.css.js.map +1 -1
  142. package/dist/inputs/combobox/combobox.d.ts +1 -0
  143. package/dist/inputs/combobox/combobox.d.ts.map +1 -1
  144. package/dist/inputs/date-picker/date-picker.css.cjs +1 -1
  145. package/dist/inputs/date-picker/date-picker.css.cjs.map +1 -1
  146. package/dist/inputs/date-picker/date-picker.css.js +1 -1
  147. package/dist/inputs/date-picker/date-picker.css.js.map +1 -1
  148. package/dist/inputs/date-picker/date-picker.d.ts +6 -0
  149. package/dist/inputs/date-picker/date-picker.d.ts.map +1 -1
  150. package/dist/inputs/file-input/file-input-upload.cjs +2 -0
  151. package/dist/inputs/file-input/file-input-upload.cjs.map +1 -0
  152. package/dist/inputs/file-input/file-input-upload.d.ts +76 -0
  153. package/dist/inputs/file-input/file-input-upload.d.ts.map +1 -0
  154. package/dist/inputs/file-input/file-input-upload.js +145 -0
  155. package/dist/inputs/file-input/file-input-upload.js.map +1 -0
  156. package/dist/inputs/file-input/file-input.css.cjs +1 -1
  157. package/dist/inputs/file-input/file-input.css.cjs.map +1 -1
  158. package/dist/inputs/file-input/file-input.css.js +1 -1
  159. package/dist/inputs/file-input/file-input.css.js.map +1 -1
  160. package/dist/inputs/file-input/file-input.d.ts +54 -1
  161. package/dist/inputs/file-input/file-input.d.ts.map +1 -1
  162. package/dist/inputs/input/input.css.cjs +1 -1
  163. package/dist/inputs/input/input.css.cjs.map +1 -1
  164. package/dist/inputs/input/input.css.js +1 -1
  165. package/dist/inputs/input/input.css.js.map +1 -1
  166. package/dist/inputs/input/input.d.ts +13 -0
  167. package/dist/inputs/input/input.d.ts.map +1 -1
  168. package/dist/inputs/message-composer/message-composer.css.cjs +1 -1
  169. package/dist/inputs/message-composer/message-composer.css.cjs.map +1 -1
  170. package/dist/inputs/message-composer/message-composer.css.js +1 -1
  171. package/dist/inputs/message-composer/message-composer.css.js.map +1 -1
  172. package/dist/inputs/message-composer/message-composer.d.ts +7 -0
  173. package/dist/inputs/message-composer/message-composer.d.ts.map +1 -1
  174. package/dist/inputs/number-input/number-input.css.cjs +1 -1
  175. package/dist/inputs/number-input/number-input.css.cjs.map +1 -1
  176. package/dist/inputs/number-input/number-input.css.js +1 -1
  177. package/dist/inputs/number-input/number-input.css.js.map +1 -1
  178. package/dist/inputs/number-input/number-input.d.ts +15 -0
  179. package/dist/inputs/number-input/number-input.d.ts.map +1 -1
  180. package/dist/inputs/otp-input/otp-input.css.cjs +1 -1
  181. package/dist/inputs/otp-input/otp-input.css.cjs.map +1 -1
  182. package/dist/inputs/otp-input/otp-input.css.js +1 -1
  183. package/dist/inputs/otp-input/otp-input.css.js.map +1 -1
  184. package/dist/inputs/radio/radio.d.ts.map +1 -1
  185. package/dist/inputs/select/select.d.ts +1 -0
  186. package/dist/inputs/select/select.d.ts.map +1 -1
  187. package/dist/inputs/shared/index.d.ts +1 -1
  188. package/dist/inputs/shared/index.d.ts.map +1 -1
  189. package/dist/inputs/shared/templates.cjs +26 -3
  190. package/dist/inputs/shared/templates.cjs.map +1 -1
  191. package/dist/inputs/shared/templates.d.ts +20 -0
  192. package/dist/inputs/shared/templates.d.ts.map +1 -1
  193. package/dist/inputs/shared/templates.js +29 -5
  194. package/dist/inputs/shared/templates.js.map +1 -1
  195. package/dist/inputs/switch/switch.css.cjs +1 -1
  196. package/dist/inputs/switch/switch.css.cjs.map +1 -1
  197. package/dist/inputs/switch/switch.css.js +1 -1
  198. package/dist/inputs/switch/switch.css.js.map +1 -1
  199. package/dist/inputs/switch/switch.d.ts.map +1 -1
  200. package/dist/inputs/textarea/textarea.css.cjs +1 -1
  201. package/dist/inputs/textarea/textarea.css.cjs.map +1 -1
  202. package/dist/inputs/textarea/textarea.css.js +1 -1
  203. package/dist/inputs/textarea/textarea.css.js.map +1 -1
  204. package/dist/inputs/textarea/textarea.d.ts +14 -0
  205. package/dist/inputs/textarea/textarea.d.ts.map +1 -1
  206. package/dist/inputs/time-picker/time-picker.css.cjs +1 -1
  207. package/dist/inputs/time-picker/time-picker.css.cjs.map +1 -1
  208. package/dist/inputs/time-picker/time-picker.css.js +1 -1
  209. package/dist/inputs/time-picker/time-picker.css.js.map +1 -1
  210. package/dist/inputs/time-picker/time-picker.d.ts +6 -0
  211. package/dist/inputs/time-picker/time-picker.d.ts.map +1 -1
  212. package/dist/list-item.cjs +22 -0
  213. package/dist/list-item.cjs.map +1 -0
  214. package/dist/list-item.js +91 -0
  215. package/dist/list-item.js.map +1 -0
  216. package/dist/list.cjs +2 -0
  217. package/dist/list.cjs.map +1 -0
  218. package/dist/list.js +64 -0
  219. package/dist/list.js.map +1 -0
  220. package/dist/menu.cjs +4 -4
  221. package/dist/menu.cjs.map +1 -1
  222. package/dist/menu.js +60 -59
  223. package/dist/menu.js.map +1 -1
  224. package/dist/message-composer.cjs +14 -20
  225. package/dist/message-composer.cjs.map +1 -1
  226. package/dist/message-composer.js +63 -64
  227. package/dist/message-composer.js.map +1 -1
  228. package/dist/number-input.cjs +5 -3
  229. package/dist/number-input.cjs.map +1 -1
  230. package/dist/number-input.js +8 -4
  231. package/dist/number-input.js.map +1 -1
  232. package/dist/otp-input.cjs +9 -9
  233. package/dist/otp-input.cjs.map +1 -1
  234. package/dist/otp-input.js +70 -62
  235. package/dist/otp-input.js.map +1 -1
  236. package/dist/overlay/menu/menu-item.css.cjs +1 -1
  237. package/dist/overlay/menu/menu-item.css.cjs.map +1 -1
  238. package/dist/overlay/menu/menu-item.css.js +1 -1
  239. package/dist/overlay/menu/menu-item.css.js.map +1 -1
  240. package/dist/overlay/menu/menu-separator.css.cjs +1 -1
  241. package/dist/overlay/menu/menu-separator.css.cjs.map +1 -1
  242. package/dist/overlay/menu/menu-separator.css.js +1 -1
  243. package/dist/overlay/menu/menu-separator.css.js.map +1 -1
  244. package/dist/overlay/menu/menu.css.cjs +1 -1
  245. package/dist/overlay/menu/menu.css.cjs.map +1 -1
  246. package/dist/overlay/menu/menu.css.js +1 -1
  247. package/dist/overlay/menu/menu.css.js.map +1 -1
  248. package/dist/overlay/shared/use-dialog.cjs +1 -1
  249. package/dist/overlay/shared/use-dialog.cjs.map +1 -1
  250. package/dist/overlay/shared/use-dialog.d.ts.map +1 -1
  251. package/dist/overlay/shared/use-dialog.js +7 -6
  252. package/dist/overlay/shared/use-dialog.js.map +1 -1
  253. package/dist/radio-group.cjs +3 -3
  254. package/dist/radio-group.cjs.map +1 -1
  255. package/dist/radio-group.js +64 -70
  256. package/dist/radio-group.js.map +1 -1
  257. package/dist/radio.cjs +4 -4
  258. package/dist/radio.cjs.map +1 -1
  259. package/dist/radio.js +58 -58
  260. package/dist/radio.js.map +1 -1
  261. package/dist/rating.cjs.map +1 -1
  262. package/dist/rating.js.map +1 -1
  263. package/dist/refine.cjs +426 -233
  264. package/dist/refine.cjs.map +1 -1
  265. package/dist/refine.iife.js +431 -238
  266. package/dist/refine.iife.js.map +1 -1
  267. package/dist/refine.js +452 -259
  268. package/dist/refine.js.map +1 -1
  269. package/dist/select.cjs +21 -21
  270. package/dist/select.cjs.map +1 -1
  271. package/dist/select.js +135 -127
  272. package/dist/select.js.map +1 -1
  273. package/dist/shared/size-presets.cjs +1 -1
  274. package/dist/shared/size-presets.cjs.map +1 -1
  275. package/dist/shared/size-presets.d.ts +74 -0
  276. package/dist/shared/size-presets.d.ts.map +1 -1
  277. package/dist/shared/size-presets.js +48 -1
  278. package/dist/shared/size-presets.js.map +1 -1
  279. package/dist/shared/types.d.ts +5 -0
  280. package/dist/shared/types.d.ts.map +1 -1
  281. package/dist/styles/index.cjs +1 -1
  282. package/dist/styles/index.cjs.map +1 -1
  283. package/dist/styles/index.d.ts +1 -0
  284. package/dist/styles/index.d.ts.map +1 -1
  285. package/dist/styles/index.js +5 -4
  286. package/dist/styles/index.js.map +1 -1
  287. package/dist/styles/mixins/field-variants.css.cjs +85 -0
  288. package/dist/styles/mixins/field-variants.css.cjs.map +1 -0
  289. package/dist/styles/mixins/field-variants.css.d.ts +66 -0
  290. package/dist/styles/mixins/field-variants.css.d.ts.map +1 -0
  291. package/dist/styles/mixins/field-variants.css.js +90 -0
  292. package/dist/styles/mixins/field-variants.css.js.map +1 -0
  293. package/dist/switch.cjs +3 -3
  294. package/dist/switch.cjs.map +1 -1
  295. package/dist/switch.js +38 -36
  296. package/dist/switch.js.map +1 -1
  297. package/dist/tab-item.cjs +8 -8
  298. package/dist/tab-item.cjs.map +1 -1
  299. package/dist/tab-item.js +38 -28
  300. package/dist/tab-item.js.map +1 -1
  301. package/dist/tab-panel.cjs +7 -7
  302. package/dist/tab-panel.cjs.map +1 -1
  303. package/dist/tab-panel.js +34 -26
  304. package/dist/tab-panel.js.map +1 -1
  305. package/dist/tabs.cjs +4 -4
  306. package/dist/tabs.cjs.map +1 -1
  307. package/dist/tabs.js +64 -60
  308. package/dist/tabs.js.map +1 -1
  309. package/dist/textarea.cjs +15 -18
  310. package/dist/textarea.cjs.map +1 -1
  311. package/dist/textarea.js +83 -74
  312. package/dist/textarea.js.map +1 -1
  313. package/dist/time-picker.cjs +34 -31
  314. package/dist/time-picker.cjs.map +1 -1
  315. package/dist/time-picker.js +121 -109
  316. package/dist/time-picker.js.map +1 -1
  317. package/package.json +21 -9
  318. package/dist/headless/dialog-focus.cjs +0 -2
  319. package/dist/headless/dialog-focus.cjs.map +0 -1
  320. package/dist/headless/dialog-focus.d.ts +0 -40
  321. package/dist/headless/dialog-focus.d.ts.map +0 -1
  322. package/dist/headless/dialog-focus.js +0 -22
  323. package/dist/headless/dialog-focus.js.map +0 -1
  324. package/dist/headless/focus-trap.cjs +0 -2
  325. package/dist/headless/focus-trap.cjs.map +0 -1
  326. package/dist/headless/focus-trap.d.ts +0 -45
  327. package/dist/headless/focus-trap.d.ts.map +0 -1
  328. package/dist/headless/focus-trap.js +0 -51
  329. package/dist/headless/focus-trap.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_list-item-reveal.js","names":[],"sources":["../../../src/content/list/_list-item-reveal.ts"],"sourcesContent":["import type { Readable } from '@vielzeug/ripple';\n\nimport type { ListItemRevealSide } from './list-item';\n\nimport { createSwipeControl, type SwipeControl, type SwipeControlDetail } from '../../headless';\n\n/** Drag distance (px) past which the action panel snaps fully open on release. */\nconst REVEAL_THRESHOLD = 64;\n/** Drag distance (px) past which the swipe auto-confirms the action — \"swiped all the way\". */\nconst CONFIRM_THRESHOLD = REVEAL_THRESHOLD * 3;\n/** Fraction of CONFIRM_THRESHOLD past which `data-confirming` warns the drag is about to fire. */\nconst CONFIRM_WARNING_RATIO = 0.85;\n\nexport type RevealStateOptions = {\n disabled: Readable<boolean>;\n hasActions: (side: ListItemRevealSide) => boolean;\n /** The full-swipe-through gesture fired — emit `confirm` and click the slot's own action. */\n onConfirm: (side: ListItemRevealSide) => void;\n};\n\n/**\n * The swipe-reveal-confirm gesture behind `ore-list-item`'s `actions-left`/`actions-right` slots\n * — isolated here since it's the one genuinely tricky part of the component (three distance\n * thresholds, inline style/attribute choreography during an active drag). Deliberately *not* a\n * `headless/` primitive: `createSwipeControl` itself already is one (shared with `ore-toast`),\n * but this two-stage reveal/confirm layer on top of it has exactly one consumer today —\n * generalizing it further would be speculative, not reusable.\n *\n * Only sets/clears the `revealed`/`data-dragging`/`data-confirming` attributes and `--_swipe-x`\n * style — it does not itself emit `reveal`/`conceal`. `ore-list-item` already watches `revealed`\n * for transitions (to cover *both* this gesture and a directly-set attribute uniformly), so this\n * module setting the attribute is enough to drive both that watcher and `list.css`'s\n * `[revealed]` styling.\n */\nexport function createRevealState(el: HTMLElement, options: RevealStateOptions): SwipeControl {\n const resolveSide = (detail: SwipeControlDetail): ListItemRevealSide => (detail.distance < 0 ? 'right' : 'left');\n\n // Inline `--_swipe-x` override during an active drag lets the row (and both action panels,\n // which read the same variable) follow the pointer 1:1 with no transition lag. Clearing it\n // hands control back to the `[revealed]`/`:focus-within` CSS rules in list-item.css, which\n // then animate normally via the CSS `transition`.\n const resetInline = (): void => {\n el.removeAttribute('data-dragging');\n el.removeAttribute('data-confirming');\n el.style.removeProperty('--_swipe-x');\n };\n\n return createSwipeControl({\n axis: () => 'x',\n // Do not capture the pointer — capture would steal clicks from action buttons revealed\n // mid-gesture (same reasoning as ore-toast's swipe-to-dismiss).\n captureTarget: () => null,\n disabled: options.disabled,\n onCancel: resetInline,\n // `threshold`/`distance`/`progress` are all wired to CONFIRM_THRESHOLD (the outer, rarer\n // gesture) — onCommit only fires once the swipe has gone all the way through.\n onCommit: (detail) => {\n const side = resolveSide(detail);\n\n resetInline();\n\n if (!options.hasActions(side)) return;\n\n el.removeAttribute('revealed');\n options.onConfirm(side);\n },\n onMove: (detail) => {\n const side = resolveSide(detail);\n\n if (!options.hasActions(side)) return;\n\n // Reveal follows the pointer up to REVEAL_THRESHOLD, then holds fully open while the\n // drag continues on toward CONFIRM_THRESHOLD (still tracked by `detail`/onCommit above).\n const revealProgress = Math.min(Math.abs(detail.distance) / REVEAL_THRESHOLD, 1);\n\n el.setAttribute('data-dragging', '');\n el.toggleAttribute('data-confirming', detail.progress >= CONFIRM_WARNING_RATIO);\n el.style.setProperty('--_swipe-x', String((side === 'left' ? 1 : -1) * revealProgress));\n },\n onRelease: (detail) => {\n const side = resolveSide(detail);\n\n resetInline();\n\n if (options.hasActions(side) && Math.abs(detail.distance) >= REVEAL_THRESHOLD) el.setAttribute('revealed', side);\n },\n threshold: () => CONFIRM_THRESHOLD,\n });\n}\n"],"mappings":";;AAOA,IAAM,IAAmB,IAEnB,IAAoB,IAAmB,GAEvC,IAAwB;AAuB9B,SAAgB,EAAkB,GAAiB,GAA2C;CAC5F,IAAM,KAAe,MAAoD,EAAO,WAAW,IAAI,UAAU,QAMnG,UAA0B;EAG9B,AAFA,EAAG,gBAAgB,eAAe,GAClC,EAAG,gBAAgB,iBAAiB,GACpC,EAAG,MAAM,eAAe,YAAY;CACtC;CAEA,OAAO,EAAmB;EACxB,YAAY;EAGZ,qBAAqB;EACrB,UAAU,EAAQ;EAClB,UAAU;EAGV,WAAW,MAAW;GACpB,IAAM,IAAO,EAAY,CAAM;GAE/B,EAAY,GAEP,EAAQ,WAAW,CAAI,MAE5B,EAAG,gBAAgB,UAAU,GAC7B,EAAQ,UAAU,CAAI;EACxB;EACA,SAAS,MAAW;GAClB,IAAM,IAAO,EAAY,CAAM;GAE/B,IAAI,CAAC,EAAQ,WAAW,CAAI,GAAG;GAI/B,IAAM,IAAiB,KAAK,IAAI,KAAK,IAAI,EAAO,QAAQ,IAAI,GAAkB,CAAC;GAI/E,AAFA,EAAG,aAAa,iBAAiB,EAAE,GACnC,EAAG,gBAAgB,mBAAmB,EAAO,YAAY,CAAqB,GAC9E,EAAG,MAAM,YAAY,cAAc,QAAQ,MAAS,SAAS,IAAI,MAAM,CAAc,CAAC;EACxF;EACA,YAAY,MAAW;GACrB,IAAM,IAAO,EAAY,CAAM;GAI/B,AAFA,EAAY,GAER,EAAQ,WAAW,CAAI,KAAK,KAAK,IAAI,EAAO,QAAQ,KAAK,KAAkB,EAAG,aAAa,YAAY,CAAI;EACjH;EACA,iBAAiB;CACnB,CAAC;AACH"}
@@ -0,0 +1,2 @@
1
+ var e=`@layer refine.base{:host{color:var(--color-contrast-700);--_actions-width:var(--list-item-actions-width,var(--size-24));display:block;position:relative;overflow:hidden}.row{z-index:1;box-sizing:border-box;gap:var(--_gap,var(--size-4));width:100%;min-height:var(--_min-height,var(--size-4));padding:var(--_padding,var(--size-2-5) var(--size-4));font-size:var(--_font-size,var(--text-sm));text-align:start;touch-action:pan-y;cursor:default;background:var(--list-item-bg,var(--color-canvas));transform:translateX(calc(var(--_swipe-x,0) * var(--_actions-width)));transition:var(--_motion-transition,transform var(--transition-fast), background var(--transition-fast));border:none;outline:none;align-items:center;display:flex;position:relative}.row:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){padding-right:var(--_padding-inline-end,var(--size-6))}.row:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){padding-left:var(--_padding-inline-end,var(--size-6))}.leading,.trailing{flex-shrink:0;align-items:center;display:flex}.content{gap:var(--size-0-5);flex-direction:column;flex:1;min-width:0;display:flex}.title{text-overflow:ellipsis;white-space:nowrap;display:block;overflow:hidden}.description{text-overflow:ellipsis;font-size:var(--text-xs);color:var(--color-contrast-400);white-space:nowrap;display:block;overflow:hidden}.description:empty{display:none}.row:hover{background:var(--list-item-hover-bg,var(--color-contrast-100))}.row:focus-visible{outline:var(--focus-ring);outline-offset:-2px}:host([selected]) .row{color:var(--color-primary);background:var(--list-item-selected-bg,color-mix(in oklch, var(--color-primary) 10%, transparent))}:host([disabled]){pointer-events:none;opacity:.6}.actions{width:var(--_actions-width);transition:var(--_motion-transition,transform var(--transition-fast));align-items:stretch;display:flex;position:absolute;top:0;bottom:0}.actions ::slotted(*){flex:1;height:100%}.actions-left{transform:translateX(calc((var(--_swipe-x,0) - 1) * 100%));left:0}.actions-right{transform:translateX(calc((var(--_swipe-x,0) + 1) * 100%));right:0}:host([revealed=left]){--_swipe-x:1}:host([revealed=right]){--_swipe-x:-1}:host:has(.actions-left:focus-within){--_swipe-x:1}:host:has(.actions-right:focus-within){--_swipe-x:-1}:host([data-dragging]) .row,:host([data-dragging]) .actions-left,:host([data-dragging]) .actions-right{transition:none}:host([data-confirming]) .actions-left,:host([data-confirming]) .actions-right{filter:saturate(1.4)brightness(.94)}}`;exports.default=e;
2
+ //# sourceMappingURL=list-item.css.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-item.css.cjs","names":[],"sources":["../../../src/content/list/list-item.css?inline"],"sourcesContent":["@layer refine.base {\n /* `--_gap` / `--_padding` / `--_font-size` are intentionally not emitted by any mixin in this\n component's own `styles` array — they're inherited from the parent `ore-list`'s\n `sizeVariantMixin(LIST_SIZE_PRESET)` call the same way `ore-menu-item` inherits\n `--_gap`/`--_font-size` from `ore-menu` (see `LIST_SIZE_PRESET`'s doc comment). The\n `var(..., fallback)` defaults below cover standalone use outside an `ore-list`. */\n :host {\n position: relative;\n display: block;\n overflow: hidden;\n color: var(--color-contrast-700);\n\n --_actions-width: var(--list-item-actions-width, var(--size-24));\n }\n\n /* ========================================\n Row\n ======================================== */\n\n .row {\n position: relative;\n z-index: 1;\n box-sizing: border-box;\n display: flex;\n gap: var(--_gap, var(--size-4));\n align-items: center;\n width: 100%;\n min-height: var(--_min-height, var(--size-4));\n padding: var(--_padding, var(--size-2-5) var(--size-4));\n padding-inline-end: var(--_padding-inline-end, var(--size-6));\n font-size: var(--_font-size, var(--text-sm));\n text-align: start;\n touch-action: pan-y;\n cursor: default;\n outline: none;\n background: var(--list-item-bg, var(--color-canvas));\n border: none;\n transform: translateX(calc(var(--_swipe-x, 0) * var(--_actions-width)));\n transition: var(--_motion-transition, transform var(--transition-fast), background var(--transition-fast));\n }\n\n .leading,\n .trailing {\n display: flex;\n flex-shrink: 0;\n align-items: center;\n }\n\n .content {\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: var(--size-0-5);\n min-width: 0;\n }\n\n .title {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .description {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--text-xs);\n color: var(--color-contrast-400);\n white-space: nowrap;\n }\n\n .description:empty {\n display: none;\n }\n\n .row:hover {\n background: var(--list-item-hover-bg, var(--color-contrast-100));\n }\n\n .row:focus-visible {\n outline: var(--focus-ring);\n outline-offset: -2px;\n }\n\n /* ========================================\n Selected / Disabled States\n ======================================== */\n\n :host([selected]) .row {\n color: var(--color-primary);\n background: var(--list-item-selected-bg, color-mix(in oklch, var(--color-primary) 10%, transparent));\n }\n\n :host([disabled]) {\n pointer-events: none;\n opacity: 0.6;\n }\n\n /* ========================================\n Swipe Action Panels\n ======================================== */\n\n .actions {\n position: absolute;\n inset-block: 0;\n display: flex;\n align-items: stretch;\n width: var(--_actions-width);\n transition: var(--_motion-transition, transform var(--transition-fast));\n }\n\n /* A single slotted action button fills the whole revealed panel — the common case (one big\n tappable target, e.g. a full-height \"Delete\" button) rather than a small icon-sized hit area.\n This stretches the slotted element's own light-DOM box, which is enough for plain elements\n (a native <button>, an <a>, ...). It is NOT enough on its own for `ore-button`: its visible\n surface is an inner `[part=\"button\"]` with a fixed height from its size preset, independent\n of its own host box size — pass `fullheight` on the `ore-button` itself too (see its own\n `fullheight` prop) to actually fill this panel edge-to-edge. */\n .actions ::slotted(*) {\n flex: 1;\n height: 100%;\n }\n\n .actions-left {\n left: 0;\n transform: translateX(calc((var(--_swipe-x, 0) - 1) * 100%));\n }\n\n .actions-right {\n right: 0;\n transform: translateX(calc((var(--_swipe-x, 0) + 1) * 100%));\n }\n\n /* `:host(:has(...))` (`:has()` as `:host()`'s functional argument) is invalid — `:host()`\n only accepts a compound selector and doesn't accept `:has()` inside it. The plain `:host`\n pseudo-class chained directly with `:has()` (no parentheses) is the valid form. Kept as\n separate rules (not grouped via a comma with the `[revealed]` rules) so a selector list\n doesn't silently drop the whole rule if either half were ever invalid again. */\n :host([revealed='left']) {\n --_swipe-x: 1;\n }\n\n :host([revealed='right']) {\n --_swipe-x: -1;\n }\n\n :host:has(.actions-left:focus-within) {\n --_swipe-x: 1;\n }\n\n :host:has(.actions-right:focus-within) {\n --_swipe-x: -1;\n }\n\n /* Suppress the transition while a drag is actively updating `--_swipe-x` inline so the row\n and action panels track the pointer 1:1 instead of lagging behind on every move event. */\n :host([data-dragging]) .row,\n :host([data-dragging]) .actions-left,\n :host([data-dragging]) .actions-right {\n transition: none;\n }\n\n /* Feedback that the drag has passed into \"swipe all the way through\" territory (close to\n CONFIRM_THRESHOLD) — set by list-item.ts's onMove once past ~85% of that distance, cleared\n on release/cancel/commit. Visual-only; the confirm itself fires from JS regardless of CSS. */\n :host([data-confirming]) .actions-left,\n :host([data-confirming]) .actions-right {\n filter: saturate(1.4) brightness(0.94);\n }\n}\n"],"mappings":""}
@@ -0,0 +1,6 @@
1
+ //#region src/content/list/list-item.css?inline
2
+ var e = "@layer refine.base{:host{color:var(--color-contrast-700);--_actions-width:var(--list-item-actions-width,var(--size-24));display:block;position:relative;overflow:hidden}.row{z-index:1;box-sizing:border-box;gap:var(--_gap,var(--size-4));width:100%;min-height:var(--_min-height,var(--size-4));padding:var(--_padding,var(--size-2-5) var(--size-4));font-size:var(--_font-size,var(--text-sm));text-align:start;touch-action:pan-y;cursor:default;background:var(--list-item-bg,var(--color-canvas));transform:translateX(calc(var(--_swipe-x,0) * var(--_actions-width)));transition:var(--_motion-transition,transform var(--transition-fast), background var(--transition-fast));border:none;outline:none;align-items:center;display:flex;position:relative}.row:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){padding-right:var(--_padding-inline-end,var(--size-6))}.row:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){padding-left:var(--_padding-inline-end,var(--size-6))}.leading,.trailing{flex-shrink:0;align-items:center;display:flex}.content{gap:var(--size-0-5);flex-direction:column;flex:1;min-width:0;display:flex}.title{text-overflow:ellipsis;white-space:nowrap;display:block;overflow:hidden}.description{text-overflow:ellipsis;font-size:var(--text-xs);color:var(--color-contrast-400);white-space:nowrap;display:block;overflow:hidden}.description:empty{display:none}.row:hover{background:var(--list-item-hover-bg,var(--color-contrast-100))}.row:focus-visible{outline:var(--focus-ring);outline-offset:-2px}:host([selected]) .row{color:var(--color-primary);background:var(--list-item-selected-bg,color-mix(in oklch, var(--color-primary) 10%, transparent))}:host([disabled]){pointer-events:none;opacity:.6}.actions{width:var(--_actions-width);transition:var(--_motion-transition,transform var(--transition-fast));align-items:stretch;display:flex;position:absolute;top:0;bottom:0}.actions ::slotted(*){flex:1;height:100%}.actions-left{transform:translateX(calc((var(--_swipe-x,0) - 1) * 100%));left:0}.actions-right{transform:translateX(calc((var(--_swipe-x,0) + 1) * 100%));right:0}:host([revealed=left]){--_swipe-x:1}:host([revealed=right]){--_swipe-x:-1}:host:has(.actions-left:focus-within){--_swipe-x:1}:host:has(.actions-right:focus-within){--_swipe-x:-1}:host([data-dragging]) .row,:host([data-dragging]) .actions-left,:host([data-dragging]) .actions-right{transition:none}:host([data-confirming]) .actions-left,:host([data-confirming]) .actions-right{filter:saturate(1.4)brightness(.94)}}";
3
+ //#endregion
4
+ export { e as default };
5
+
6
+ //# sourceMappingURL=list-item.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-item.css.js","names":[],"sources":["../../../src/content/list/list-item.css?inline"],"sourcesContent":["@layer refine.base {\n /* `--_gap` / `--_padding` / `--_font-size` are intentionally not emitted by any mixin in this\n component's own `styles` array — they're inherited from the parent `ore-list`'s\n `sizeVariantMixin(LIST_SIZE_PRESET)` call the same way `ore-menu-item` inherits\n `--_gap`/`--_font-size` from `ore-menu` (see `LIST_SIZE_PRESET`'s doc comment). The\n `var(..., fallback)` defaults below cover standalone use outside an `ore-list`. */\n :host {\n position: relative;\n display: block;\n overflow: hidden;\n color: var(--color-contrast-700);\n\n --_actions-width: var(--list-item-actions-width, var(--size-24));\n }\n\n /* ========================================\n Row\n ======================================== */\n\n .row {\n position: relative;\n z-index: 1;\n box-sizing: border-box;\n display: flex;\n gap: var(--_gap, var(--size-4));\n align-items: center;\n width: 100%;\n min-height: var(--_min-height, var(--size-4));\n padding: var(--_padding, var(--size-2-5) var(--size-4));\n padding-inline-end: var(--_padding-inline-end, var(--size-6));\n font-size: var(--_font-size, var(--text-sm));\n text-align: start;\n touch-action: pan-y;\n cursor: default;\n outline: none;\n background: var(--list-item-bg, var(--color-canvas));\n border: none;\n transform: translateX(calc(var(--_swipe-x, 0) * var(--_actions-width)));\n transition: var(--_motion-transition, transform var(--transition-fast), background var(--transition-fast));\n }\n\n .leading,\n .trailing {\n display: flex;\n flex-shrink: 0;\n align-items: center;\n }\n\n .content {\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: var(--size-0-5);\n min-width: 0;\n }\n\n .title {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .description {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--text-xs);\n color: var(--color-contrast-400);\n white-space: nowrap;\n }\n\n .description:empty {\n display: none;\n }\n\n .row:hover {\n background: var(--list-item-hover-bg, var(--color-contrast-100));\n }\n\n .row:focus-visible {\n outline: var(--focus-ring);\n outline-offset: -2px;\n }\n\n /* ========================================\n Selected / Disabled States\n ======================================== */\n\n :host([selected]) .row {\n color: var(--color-primary);\n background: var(--list-item-selected-bg, color-mix(in oklch, var(--color-primary) 10%, transparent));\n }\n\n :host([disabled]) {\n pointer-events: none;\n opacity: 0.6;\n }\n\n /* ========================================\n Swipe Action Panels\n ======================================== */\n\n .actions {\n position: absolute;\n inset-block: 0;\n display: flex;\n align-items: stretch;\n width: var(--_actions-width);\n transition: var(--_motion-transition, transform var(--transition-fast));\n }\n\n /* A single slotted action button fills the whole revealed panel — the common case (one big\n tappable target, e.g. a full-height \"Delete\" button) rather than a small icon-sized hit area.\n This stretches the slotted element's own light-DOM box, which is enough for plain elements\n (a native <button>, an <a>, ...). It is NOT enough on its own for `ore-button`: its visible\n surface is an inner `[part=\"button\"]` with a fixed height from its size preset, independent\n of its own host box size — pass `fullheight` on the `ore-button` itself too (see its own\n `fullheight` prop) to actually fill this panel edge-to-edge. */\n .actions ::slotted(*) {\n flex: 1;\n height: 100%;\n }\n\n .actions-left {\n left: 0;\n transform: translateX(calc((var(--_swipe-x, 0) - 1) * 100%));\n }\n\n .actions-right {\n right: 0;\n transform: translateX(calc((var(--_swipe-x, 0) + 1) * 100%));\n }\n\n /* `:host(:has(...))` (`:has()` as `:host()`'s functional argument) is invalid — `:host()`\n only accepts a compound selector and doesn't accept `:has()` inside it. The plain `:host`\n pseudo-class chained directly with `:has()` (no parentheses) is the valid form. Kept as\n separate rules (not grouped via a comma with the `[revealed]` rules) so a selector list\n doesn't silently drop the whole rule if either half were ever invalid again. */\n :host([revealed='left']) {\n --_swipe-x: 1;\n }\n\n :host([revealed='right']) {\n --_swipe-x: -1;\n }\n\n :host:has(.actions-left:focus-within) {\n --_swipe-x: 1;\n }\n\n :host:has(.actions-right:focus-within) {\n --_swipe-x: -1;\n }\n\n /* Suppress the transition while a drag is actively updating `--_swipe-x` inline so the row\n and action panels track the pointer 1:1 instead of lagging behind on every move event. */\n :host([data-dragging]) .row,\n :host([data-dragging]) .actions-left,\n :host([data-dragging]) .actions-right {\n transition: none;\n }\n\n /* Feedback that the drag has passed into \"swipe all the way through\" territory (close to\n CONFIRM_THRESHOLD) — set by list-item.ts's onMove once past ~85% of that distance, cleared\n on release/cancel/commit. Visual-only; the confirm itself fires from JS regardless of CSS. */\n :host([data-confirming]) .actions-left,\n :host([data-confirming]) .actions-right {\n filter: saturate(1.4) brightness(0.94);\n }\n}\n"],"mappings":""}
@@ -0,0 +1,111 @@
1
+ /** Which side's action panel is currently revealed on a list item. */
2
+ export type ListItemRevealSide = 'left' | 'right';
3
+ /** Events emitted by the list-item component */
4
+ export type OreListItemEvents = {
5
+ /** Emitted when the revealed action panel closes (gesture, tap, or programmatic). */
6
+ conceal: {
7
+ item: HTMLElement;
8
+ };
9
+ /**
10
+ * Emitted when a swipe crosses the full-swipe-through distance — the "swiped all the way"
11
+ * confirm gesture. Fired just before the slotted action's own click (if any).
12
+ */
13
+ confirm: {
14
+ item: HTMLElement;
15
+ side: ListItemRevealSide;
16
+ };
17
+ /** Emitted when the item becomes deselected. */
18
+ deselect: {
19
+ item: HTMLElement;
20
+ value: null | string;
21
+ };
22
+ /** Emitted when a swipe/focus reveals an action panel. */
23
+ reveal: {
24
+ item: HTMLElement;
25
+ side: ListItemRevealSide;
26
+ };
27
+ /** Emitted when the item becomes selected (only meaningful inside a `selectable` `ore-list`). */
28
+ select: {
29
+ item: HTMLElement;
30
+ value: null | string;
31
+ };
32
+ };
33
+ /** List-item component properties */
34
+ export type OreListItemProps = {
35
+ /** Disable this item — blocks pointer interaction, swipe actions, and selection */
36
+ disabled?: boolean;
37
+ /** Which action panel is revealed: 'left' | 'right' (absent = closed). Settable programmatically. */
38
+ revealed?: ListItemRevealSide;
39
+ /**
40
+ * Opaque value compared against the parent `selectable` `ore-list`'s own `value` to derive
41
+ * `selected` — required for selection to work. There's no separate `selected` prop: the parent
42
+ * list's `value` is the single source of truth, so this item's selected state can't drift from
43
+ * it. Also reported in `select`/`deselect`/the parent's `change` event.
44
+ */
45
+ value?: string;
46
+ };
47
+ /**
48
+ * A single row inside `ore-list`. Renders `leading`/default (title)/`description`/`trailing`
49
+ * content plus two off-canvas action panels (`actions-left`, `actions-right`) that a horizontal
50
+ * pointer/touch swipe reveals — useful for mobile-style row actions (archive, delete, …). An
51
+ * action panel only opens if it actually has slotted content; swiping the other direction is a
52
+ * no-op. Revealed actions stay reachable from the keyboard (Tab focus on a slotted action button
53
+ * reveals its panel via `:focus-within`, independent of any gesture).
54
+ *
55
+ * Swiping past the reveal distance snaps the panel fully open on release; swiping further still —
56
+ * past the full-swipe-through distance — auto-confirms that side's action immediately (fires
57
+ * `confirm` and clicks the slot's first element), the same "swipe all the way" shortcut as iOS
58
+ * Mail's delete gesture.
59
+ *
60
+ * Closing a revealed panel is deliberately one-directional: tap/click the row itself, tap outside
61
+ * the item, or open a different item's panel. Reverse-swiping an already-open item is not
62
+ * supported — see `ore-list`'s docs for the reasoning.
63
+ *
64
+ * @element ore-list-item
65
+ *
66
+ * @attr {boolean} disabled - Disable this item
67
+ * @attr {boolean} selected - Read-only reflected attribute: `true` when this item's `value` matches the parent `ore-list`'s `value`. Not independently settable.
68
+ * @attr {string} value - Opaque value compared against the parent list's `value` to derive `selected`; also reported in select/change events
69
+ * @attr {string} revealed - Which action panel is revealed: 'left' | 'right'
70
+ *
71
+ * @fires select - Item becomes selected. detail: { item: HTMLElement, value: string | null }
72
+ * @fires deselect - Item becomes deselected. detail: { item: HTMLElement, value: string | null }
73
+ * @fires reveal - An action panel opens. detail: { item: HTMLElement, side: 'left' | 'right' }
74
+ * @fires conceal - The revealed action panel closes. detail: { item: HTMLElement }
75
+ * @fires confirm - Swiped all the way through — fires before the slotted action's own click. detail: { item: HTMLElement, side: 'left' | 'right' }
76
+ *
77
+ * @slot leading - Content before the title (e.g. icon, avatar)
78
+ * @slot - Item title
79
+ * @slot description - Secondary line below the title
80
+ * @slot trailing - Content after the title (e.g. meta text, chevron)
81
+ * @slot actions-left - Buttons revealed by swiping right (or focusing into this slot)
82
+ * @slot actions-right - Buttons revealed by swiping left (or focusing into this slot)
83
+ *
84
+ * @cssprop --list-item-actions-width - Width of each action panel (default 6rem)
85
+ * @cssprop --list-item-bg - Row background color
86
+ * @cssprop --list-item-hover-bg - Row background on hover
87
+ * @cssprop --list-item-selected-bg - Row background when selected
88
+ * @part row - The row wrapper (focusable, swipeable)
89
+ * @part leading - The leading slot container
90
+ * @part content - The title + description container
91
+ * @part title - The title slot container
92
+ * @part description - The description slot container
93
+ * @part trailing - The trailing slot container
94
+ * @part actions-start - The left action panel container
95
+ * @part actions-end - The right action panel container
96
+ * @example
97
+ * ```html
98
+ * <ore-list-item>
99
+ * <ore-icon slot="leading" name="mail"></ore-icon>
100
+ * Inbox
101
+ * <span slot="trailing">12</span>
102
+ * </ore-list-item>
103
+ * <ore-list-item>
104
+ * Newsletter
105
+ * <span slot="description">From Acme Inc.</span>
106
+ * <ore-button slot="actions-right" color="error">Delete</ore-button>
107
+ * </ore-list-item>
108
+ * ```
109
+ */
110
+ export declare const LIST_ITEM_TAG: "ore-list-item";
111
+ //# sourceMappingURL=list-item.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-item.d.ts","sourceRoot":"","sources":["../../../src/content/list/list-item.ts"],"names":[],"mappings":"AASA,sEAAsE;AACtE,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,OAAO,CAAC;AAElD,gDAAgD;AAChD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,qFAAqF;IACrF,OAAO,EAAE;QAAE,IAAI,EAAE,WAAW,CAAA;KAAE,CAAC;IAC/B;;;OAGG;IACH,OAAO,EAAE;QAAE,IAAI,EAAE,WAAW,CAAC;QAAC,IAAI,EAAE,kBAAkB,CAAA;KAAE,CAAC;IACzD,gDAAgD;IAChD,QAAQ,EAAE;QAAE,IAAI,EAAE,WAAW,CAAC;QAAC,KAAK,EAAE,IAAI,GAAG,MAAM,CAAA;KAAE,CAAC;IACtD,0DAA0D;IAC1D,MAAM,EAAE;QAAE,IAAI,EAAE,WAAW,CAAC;QAAC,IAAI,EAAE,kBAAkB,CAAA;KAAE,CAAC;IACxD,iGAAiG;IACjG,MAAM,EAAE;QAAE,IAAI,EAAE,WAAW,CAAC;QAAC,KAAK,EAAE,IAAI,GAAG,MAAM,CAAA;KAAE,CAAC;CACrD,CAAC;AAEF,qCAAqC;AACrC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,mFAAmF;IACnF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qGAAqG;IACrG,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAMF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACH,eAAO,MAAM,aAAa,EAAG,eAAwB,CAAC"}
@@ -0,0 +1,2 @@
1
+ var e=`@layer refine.base{:host,::slotted(ore-list-item){display:block}:host([variant=bordered]){border:var(--border) solid var(--color-contrast-200);border-radius:var(--list-radius,var(--rounded-lg));overflow:hidden}:host([variant=bordered]) ::slotted(ore-list-item:not(:last-of-type)){border-bottom:var(--border) solid var(--color-contrast-200)}:host([variant=separated]){gap:var(--_gap,var(--size-2-5));flex-direction:column;display:flex}:host([variant=separated]) ::slotted(ore-list-item){border:var(--border) solid var(--color-contrast-200);border-radius:var(--list-radius,var(--rounded-lg));overflow:hidden}:host([disabled]){pointer-events:none;opacity:.6}}`;exports.default=e;
2
+ //# sourceMappingURL=list.css.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.css.cjs","names":[],"sources":["../../../src/content/list/list.css?inline"],"sourcesContent":["@layer refine.base {\n :host {\n display: block;\n }\n\n ::slotted(ore-list-item) {\n display: block;\n }\n\n /* ========================================\n Bordered Variant\n ======================================== */\n\n :host([variant='bordered']) {\n overflow: hidden;\n border: var(--border) solid var(--color-contrast-200);\n border-radius: var(--list-radius, var(--rounded-lg));\n }\n\n :host([variant='bordered']) ::slotted(ore-list-item:not(:last-of-type)) {\n border-bottom: var(--border) solid var(--color-contrast-200);\n }\n\n /* ========================================\n Separated Variant\n ======================================== */\n\n :host([variant='separated']) {\n display: flex;\n flex-direction: column;\n gap: var(--_gap, var(--size-2-5));\n }\n\n :host([variant='separated']) ::slotted(ore-list-item) {\n overflow: hidden;\n border: var(--border) solid var(--color-contrast-200);\n border-radius: var(--list-radius, var(--rounded-lg));\n }\n\n /* ========================================\n Disabled State\n ======================================== */\n\n :host([disabled]) {\n pointer-events: none;\n opacity: 0.6;\n }\n}\n"],"mappings":""}
@@ -0,0 +1,6 @@
1
+ //#region src/content/list/list.css?inline
2
+ var e = "@layer refine.base{:host,::slotted(ore-list-item){display:block}:host([variant=bordered]){border:var(--border) solid var(--color-contrast-200);border-radius:var(--list-radius,var(--rounded-lg));overflow:hidden}:host([variant=bordered]) ::slotted(ore-list-item:not(:last-of-type)){border-bottom:var(--border) solid var(--color-contrast-200)}:host([variant=separated]){gap:var(--_gap,var(--size-2-5));flex-direction:column;display:flex}:host([variant=separated]) ::slotted(ore-list-item){border:var(--border) solid var(--color-contrast-200);border-radius:var(--list-radius,var(--rounded-lg));overflow:hidden}:host([disabled]){pointer-events:none;opacity:.6}}";
3
+ //#endregion
4
+ export { e as default };
5
+
6
+ //# sourceMappingURL=list.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.css.js","names":[],"sources":["../../../src/content/list/list.css?inline"],"sourcesContent":["@layer refine.base {\n :host {\n display: block;\n }\n\n ::slotted(ore-list-item) {\n display: block;\n }\n\n /* ========================================\n Bordered Variant\n ======================================== */\n\n :host([variant='bordered']) {\n overflow: hidden;\n border: var(--border) solid var(--color-contrast-200);\n border-radius: var(--list-radius, var(--rounded-lg));\n }\n\n :host([variant='bordered']) ::slotted(ore-list-item:not(:last-of-type)) {\n border-bottom: var(--border) solid var(--color-contrast-200);\n }\n\n /* ========================================\n Separated Variant\n ======================================== */\n\n :host([variant='separated']) {\n display: flex;\n flex-direction: column;\n gap: var(--_gap, var(--size-2-5));\n }\n\n :host([variant='separated']) ::slotted(ore-list-item) {\n overflow: hidden;\n border: var(--border) solid var(--color-contrast-200);\n border-radius: var(--list-radius, var(--rounded-lg));\n }\n\n /* ========================================\n Disabled State\n ======================================== */\n\n :host([disabled]) {\n pointer-events: none;\n opacity: 0.6;\n }\n}\n"],"mappings":""}
@@ -0,0 +1,93 @@
1
+ import { type Readable } from '@vielzeug/ripple';
2
+ import type { ComponentSize } from '../../types';
3
+ /** Visual variant for `ore-list`. */
4
+ export type ListVariant = 'bordered' | 'plain' | 'separated';
5
+ /** Context provided by `ore-list` to its `ore-list-item` children. */
6
+ export type ListContext = {
7
+ /**
8
+ * Closes every other item's swipe-revealed action panel. Called directly by an item the moment
9
+ * its own `revealed` attribute transitions to non-null (gesture or direct attribute set) —
10
+ * replaces listening for a bubbled `reveal` event and re-deriving "is this actually my direct
11
+ * child" with a plain function call, the same shape as `select` below.
12
+ */
13
+ requestReveal: (item: HTMLElement) => void;
14
+ /**
15
+ * Selects `value` (or clears the selection when `undefined`) and fires `change`. Called
16
+ * directly by an activated item — mirrors `ore-radio-group`'s `RadioGroupContext.select()`.
17
+ * No sibling bookkeeping needed here: every item's `selected` is *derived* from `value`, so
18
+ * changing it here is the only thing that has to happen.
19
+ */
20
+ select: (value: string | undefined) => void;
21
+ selectable: Readable<boolean>;
22
+ /**
23
+ * Single source of truth for the current selection — `ore-list-item` never owns its own
24
+ * "selected" state; it's always derived by comparing its own `value` against this one (the
25
+ * same shape as `ore-radio-group`'s `RadioGroupContext.value`).
26
+ */
27
+ value: Readable<string | undefined>;
28
+ };
29
+ /** Injection key for the list context. */
30
+ export declare const LIST_CTX: import("@vielzeug/ore").InjectionKey<ListContext>;
31
+ /** Events emitted by the list component */
32
+ export type OreListEvents = {
33
+ /** Emitted when the selected value changes (only when `selectable` is set). */
34
+ change: {
35
+ value: null | string;
36
+ };
37
+ };
38
+ /** List component properties */
39
+ export type OreListProps = {
40
+ /** Disable the entire list — blocks pointer interaction and removes items from tab order */
41
+ disabled?: boolean;
42
+ /**
43
+ * Enables single-selection listbox behavior: clicking (or pressing Enter/Space on) an item
44
+ * selects it and deselects any previously-selected sibling. Arrow keys / Home / End move
45
+ * focus between items. Omit for a plain, non-interactive display list.
46
+ */
47
+ selectable?: boolean;
48
+ /** Size applied to all items (propagated via inherited CSS custom properties) */
49
+ size?: ComponentSize;
50
+ /**
51
+ * Selected item's `value` (only meaningful when `selectable`) — the single source of truth for
52
+ * selection. `ore-list-item` never owns its own selected state; set this directly, bind it for
53
+ * two-way control, or read it back from `change`.
54
+ */
55
+ value?: string;
56
+ /** Visual variant: 'plain' (default, no dividers) | 'bordered' (outer border + row dividers) | 'separated' (each item is its own card) */
57
+ variant?: ListVariant;
58
+ };
59
+ /**
60
+ * A vertical list container for `ore-list-item` children — plain display list by default, or a
61
+ * keyboard-navigable single-select listbox via `selectable`. Each item can independently reveal
62
+ * a left/right action panel via touch/pointer swipe (see `ore-list-item`'s `actions-left`/
63
+ * `actions-right` slots) — useful for mobile-style row actions (archive, delete, …).
64
+ *
65
+ * @element ore-list
66
+ * @element ore-list-item - Child element for each row
67
+ *
68
+ * @attr {boolean} disabled - Disable the entire list
69
+ * @attr {boolean} selectable - Enable single-selection listbox behavior with arrow-key navigation
70
+ * @attr {string} size - Size applied to all items: 'sm' | 'md' | 'lg'
71
+ * @attr {string} value - Selected item's value (only meaningful when `selectable`) — the single source of truth for selection
72
+ * @attr {string} variant - Visual variant: 'plain' | 'bordered' | 'separated'
73
+ *
74
+ * @fires change - Emitted when the selected value changes. detail: { value: string | null }
75
+ *
76
+ * @slot - `ore-list-item` elements
77
+ *
78
+ * @cssprop --list-radius - Border radius for the 'bordered'/'separated' variants
79
+ *
80
+ * @example
81
+ * ```html
82
+ * <ore-list variant="bordered">
83
+ * <ore-list-item>Inbox</ore-list-item>
84
+ * <ore-list-item>Drafts</ore-list-item>
85
+ * </ore-list>
86
+ * <ore-list selectable value="inbox">
87
+ * <ore-list-item value="inbox">Inbox</ore-list-item>
88
+ * <ore-list-item value="drafts">Drafts</ore-list-item>
89
+ * </ore-list>
90
+ * ```
91
+ */
92
+ export declare const LIST_TAG: "ore-list";
93
+ //# sourceMappingURL=list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/content/list/list.ts"],"names":[],"mappings":"AACA,OAAO,EAA2B,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAOjD,qCAAqC;AACrC,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,OAAO,GAAG,WAAW,CAAC;AAE7D,sEAAsE;AACtE,MAAM,MAAM,WAAW,GAAG;IACxB;;;;;OAKG;IACH,aAAa,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;IAC3C;;;;;OAKG;IACH,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAC5C,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC9B;;;;OAIG;IACH,KAAK,EAAE,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CACrC,CAAC;AACF,0CAA0C;AAC1C,eAAO,MAAM,QAAQ,mDAA4C,CAAC;AAElE,2CAA2C;AAC3C,MAAM,MAAM,aAAa,GAAG;IAC1B,+EAA+E;IAC/E,MAAM,EAAE;QAAE,KAAK,EAAE,IAAI,GAAG,MAAM,CAAA;KAAE,CAAC;CAClC,CAAC;AAEF,gCAAgC;AAChC,MAAM,MAAM,YAAY,GAAG;IACzB,4FAA4F;IAC5F,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iFAAiF;IACjF,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0IAA0I;IAC1I,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,QAAQ,EAAG,UAAmB,CAAC"}