@astryx-vue/core 0.1.3 → 0.2.1

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 (269) hide show
  1. package/dist/AlertDialog/index.js +1 -1
  2. package/dist/{AlertDialog-BylcA4vV.js → AlertDialog-ovx4cBjM.js} +1 -1
  3. package/dist/AppShell/index.js +1 -1
  4. package/dist/{AppShell-b0PWt9Fz.js → AppShell-1wNIEtK_.js} +2 -2
  5. package/dist/Avatar/index.d.ts +1 -1
  6. package/dist/Avatar/index.js +1 -1
  7. package/dist/Avatar-jmHInHwj.js +244 -0
  8. package/dist/AvatarGroup/index.d.ts +1 -1
  9. package/dist/AvatarGroup/index.js +1 -1
  10. package/dist/{AvatarGroup-CZcgAMjM.js → AvatarGroup-QyzSrpYA.js} +8 -7
  11. package/dist/Badge/index.d.ts +1 -1
  12. package/dist/Badge/index.js +1 -1
  13. package/dist/Badge-CjDQPF5g.js +30 -0
  14. package/dist/Banner/index.d.ts +1 -1
  15. package/dist/Breadcrumbs/index.d.ts +2 -2
  16. package/dist/Breadcrumbs/index.js +1 -1
  17. package/dist/{Breadcrumbs-C3YZFQ9w.js → Breadcrumbs-C97HmjkC.js} +45 -11
  18. package/dist/Button/index.d.ts +1 -1
  19. package/dist/ButtonGroup/index.d.ts +1 -1
  20. package/dist/Calendar/index.d.ts +2 -2
  21. package/dist/Calendar/index.js +1 -1
  22. package/dist/Calendar-DqC3EDN1.js +352 -0
  23. package/dist/Card/index.d.ts +1 -1
  24. package/dist/Carousel/index.d.ts +2 -0
  25. package/dist/Carousel/index.js +2 -0
  26. package/dist/Carousel-BGUnskjo.js +363 -0
  27. package/dist/Chat/index.js +1 -1
  28. package/dist/{Chat-C1aWl5V3.js → Chat-DCjXRiOF.js} +8 -8
  29. package/dist/CheckboxInput/index.d.ts +1 -1
  30. package/dist/CheckboxList/index.d.ts +1 -1
  31. package/dist/CheckboxList/index.js +1 -1
  32. package/dist/Citation/index.js +1 -1
  33. package/dist/{Citation-C1X0Rde8.js → Citation-DunoAqVH.js} +2 -2
  34. package/dist/ClickableCard/index.d.ts +1 -1
  35. package/dist/Code/index.d.ts +3 -2
  36. package/dist/Code/index.js +4 -2
  37. package/dist/Code-yb_KOFtJ.js +299 -0
  38. package/dist/{CodeBlock-BQdooQy2.js → CodeBlock-CAF-VJnh.js} +8 -2
  39. package/dist/Collapsible/index.js +1 -1
  40. package/dist/{Collapsible-BS9ctCQV.js → Collapsible-DvMiYJp7.js} +1 -1
  41. package/dist/CommandPalette/index.js +1 -1
  42. package/dist/{CommandPalette-u5h_E05P.js → CommandPalette-xfm9ldUI.js} +1 -1
  43. package/dist/ComplexSelector/index.d.ts +1 -1
  44. package/dist/ComplexSelector/index.js +1 -1
  45. package/dist/{ComplexSelector-BHmGWml0.js → ComplexSelector-B6lBTRhP.js} +2 -2
  46. package/dist/ContextMenu/index.d.ts +2 -2
  47. package/dist/ContextMenu/index.js +1 -1
  48. package/dist/{ContextMenu-dA-ppaRQ.js → ContextMenu-DUkED3Z3.js} +101 -63
  49. package/dist/DateInput/index.d.ts +2 -2
  50. package/dist/DateInput/index.js +1 -1
  51. package/dist/DateInput-Crcg-CCj.js +376 -0
  52. package/dist/DateRangeInput/index.d.ts +1 -1
  53. package/dist/DateRangeInput/index.js +1 -1
  54. package/dist/{DateRangeInput-fmQlr_A7.js → DateRangeInput-e9KSxBBK.js} +2 -2
  55. package/dist/DateTimeInput/index.d.ts +1 -1
  56. package/dist/DateTimeInput/index.js +1 -1
  57. package/dist/{DateTimeInput-Bs1JmcIp.js → DateTimeInput-fSOfuLex.js} +5 -3
  58. package/dist/DropdownMenu/index.d.ts +3 -2
  59. package/dist/DropdownMenu/index.js +3 -2
  60. package/dist/{DropdownMenu-B0gogrvG.js → DropdownMenu-8G0B1UND.js} +63 -16
  61. package/dist/DropdownMenu-XvW4BJob.js +164 -0
  62. package/dist/EmptyState/index.js +1 -1
  63. package/dist/{EmptyState-Bhlqgsg4.js → EmptyState-CUJdTYKV.js} +1 -1
  64. package/dist/FileInput/index.d.ts +1 -1
  65. package/dist/FileInput/index.js +1 -1
  66. package/dist/{FileInput-CmAfOpkA.js → FileInput-D-fchyQH.js} +2 -2
  67. package/dist/Icon/index.d.ts +4 -0
  68. package/dist/Icon/index.js +3 -0
  69. package/dist/Icon/plugin.d.ts +45 -0
  70. package/dist/Icon/plugin.js +177 -0
  71. package/dist/Icon-Bku25g_K.js +193 -0
  72. package/dist/Lightbox/index.d.ts +2 -0
  73. package/dist/Lightbox/index.js +2 -0
  74. package/dist/Lightbox-uuVGgHxW.js +384 -0
  75. package/dist/Link/index.d.ts +1 -1
  76. package/dist/Link/index.js +1 -1
  77. package/dist/Link-DqdQZ37C.js +141 -0
  78. package/dist/List/index.d.ts +1 -1
  79. package/dist/Markdown/index.js +1 -1
  80. package/dist/{Markdown-CwtLr3f_.js → Markdown-DLICa3db.js} +3 -3
  81. package/dist/MetadataList/index.d.ts +1 -1
  82. package/dist/MetadataList/index.js +1 -1
  83. package/dist/{MetadataList-DlXQTLog.js → MetadataList-h492rqEN.js} +1 -1
  84. package/dist/MobileNav/index.js +1 -1
  85. package/dist/{MobileNavToggle-CgQamG6E.js → MobileNavToggle-BMj3Wtuq.js} +1 -1
  86. package/dist/MoreMenu/index.d.ts +1 -1
  87. package/dist/MoreMenu/index.js +1 -1
  88. package/dist/{MoreMenu-BXL6Dqsu.js → MoreMenu-DkYi5az5.js} +2 -2
  89. package/dist/MultiSelector/index.d.ts +1 -1
  90. package/dist/MultiSelector/index.js +1 -1
  91. package/dist/{MultiSelector-DT8ZccMI.js → MultiSelector-C2IS-EaU.js} +2 -2
  92. package/dist/NavItem/index.d.ts +1 -1
  93. package/dist/NavMenu/index.d.ts +1 -1
  94. package/dist/NavMenu/index.js +1 -1
  95. package/dist/{NavMenuItem-mzNQESpB.js → NavMenuItem-B-k7olt5.js} +2 -1
  96. package/dist/NumberInput/index.d.ts +2 -2
  97. package/dist/NumberInput/index.js +1 -1
  98. package/dist/NumberInput-CjfAsFwj.js +210 -0
  99. package/dist/Outline/index.d.ts +2 -0
  100. package/dist/Outline/index.js +2 -0
  101. package/dist/Outline-BTmrtvXR.js +325 -0
  102. package/dist/OverflowList/index.d.ts +1 -1
  103. package/dist/OverflowList/index.js +1 -1
  104. package/dist/{OverflowList-zXg3g6fy.js → OverflowList-CRE8BE7V.js} +2 -2
  105. package/dist/Overlay/index.d.ts +1 -1
  106. package/dist/Pagination/index.d.ts +2 -2
  107. package/dist/Pagination/index.js +1 -1
  108. package/dist/{Pagination-DXfgMUKJ.js → Pagination-BpGXPmc7.js} +76 -22
  109. package/dist/Popover/index.d.ts +1 -1
  110. package/dist/ProgressBar/index.d.ts +1 -1
  111. package/dist/ProgressBar/index.js +1 -1
  112. package/dist/{ProgressBar-ChDp-7oe.js → ProgressBar-DO9Chic6.js} +31 -11
  113. package/dist/Radio/index.d.ts +1 -1
  114. package/dist/RadioList/index.d.ts +1 -1
  115. package/dist/Resizable/index.js +1 -1
  116. package/dist/{Resizable-BuGKvU9I.js → Resizable-CE8XQDL2.js} +1 -1
  117. package/dist/ScrollableArea/index.d.ts +1 -1
  118. package/dist/SegmentedControl/index.d.ts +1 -1
  119. package/dist/SelectableCard/index.d.ts +1 -1
  120. package/dist/Selector/index.d.ts +2 -2
  121. package/dist/Selector/index.js +1 -1
  122. package/dist/Selector-DkJOLZSR.js +468 -0
  123. package/dist/SideNav/index.d.ts +1 -1
  124. package/dist/SideNav/index.js +1 -1
  125. package/dist/{SideNav-Cdrigq2A.js → SideNav-DcDWBnXJ.js} +17 -17
  126. package/dist/Stepper/index.d.ts +1 -1
  127. package/dist/Stepper/index.js +1 -1
  128. package/dist/{Stepper-DxmLfh8O.js → Stepper-DZKaqEoz.js} +1 -1
  129. package/dist/Switch/index.d.ts +1 -1
  130. package/dist/TabList/index.d.ts +1 -1
  131. package/dist/TabList/index.js +1 -1
  132. package/dist/{TabList-C411uNQU.js → TabList-hm06QPiW.js} +10 -3
  133. package/dist/Table/index.js +1 -1
  134. package/dist/{Table-7qRmlIQd.js → Table-DwehtMap.js} +4 -4
  135. package/dist/Text/index.d.ts +3 -2
  136. package/dist/Text/index.js +1 -1
  137. package/dist/{Text-CKd7e3gK.js → Text-BHVghsWo.js} +12 -2
  138. package/dist/TextArea/index.d.ts +1 -1
  139. package/dist/TextArea/index.js +1 -1
  140. package/dist/{TextArea-Cv9UVbzS.js → TextArea-CPwSytdO.js} +12 -6
  141. package/dist/TextInput/index.d.ts +1 -1
  142. package/dist/Theme/index.d.ts +2 -0
  143. package/dist/Theme/index.js +2 -0
  144. package/dist/Theme-BuUiiJNr.js +429 -0
  145. package/dist/Thumbnail/index.js +1 -1
  146. package/dist/{Thumbnail-BWVzLLyI.js → Thumbnail-CAOYds8t.js} +11 -11
  147. package/dist/{TimeField-l3QzU6vC.js → TimeField-BGbxCoKU.js} +2 -2
  148. package/dist/TimeInput/index.d.ts +1 -1
  149. package/dist/TimeInput/index.js +1 -1
  150. package/dist/{TimeInput-OkgX-xbQ.js → TimeInput-DJP3l4ZS.js} +1 -1
  151. package/dist/Timer/index.d.ts +2 -0
  152. package/dist/Timer/index.js +2 -0
  153. package/dist/Timer-B7GV6hqd.js +134 -0
  154. package/dist/Timestamp/index.d.ts +1 -1
  155. package/dist/Timestamp/index.js +2 -1
  156. package/dist/{Timestamp-DUoP9ari.js → Timestamp-BzRp8uWc.js} +5 -122
  157. package/dist/Toast/index.d.ts +2 -2
  158. package/dist/Toast/index.js +1 -1
  159. package/dist/{Toast-BKXPvEMp.js → Toast-C2ML-bmi.js} +37 -7
  160. package/dist/ToggleButton/index.d.ts +1 -1
  161. package/dist/Token/index.d.ts +1 -1
  162. package/dist/Token/index.js +1 -1
  163. package/dist/{Token-C4KD0fZD.js → Token-CjocuhzE.js} +1 -1
  164. package/dist/Tokenizer/index.d.ts +1 -1
  165. package/dist/Tokenizer/index.js +1 -1
  166. package/dist/{Tokenizer-BA8sTMPZ.js → Tokenizer-mYES5SPM.js} +2 -2
  167. package/dist/Toolbar/index.d.ts +1 -1
  168. package/dist/TopNav/index.d.ts +1 -1
  169. package/dist/TopNav/index.js +1 -1
  170. package/dist/{TopNav-CZokS7E_.js → TopNav-C2t6JkZb.js} +4 -4
  171. package/dist/TreeList/index.d.ts +1 -1
  172. package/dist/TreeList/index.js +1 -1
  173. package/dist/{TreeList-CIbAGOMf.js → TreeList-THJ0KamE.js} +3 -3
  174. package/dist/Typeahead/index.d.ts +1 -1
  175. package/dist/Typeahead/index.js +1 -1
  176. package/dist/{Typeahead-DIw-K4aa.js → Typeahead-D7VnvRpK.js} +2 -2
  177. package/dist/{context-D6ECRdc5.js → context-DzcK4T_C.js} +58 -2
  178. package/dist/context-O2Vb8cJl.js +57 -0
  179. package/dist/formatInstant-BDWUIxS7.js +119 -0
  180. package/dist/index-1AZ4KZhg.d.ts +96 -0
  181. package/dist/index-3p2BDVHq.d.ts +31 -0
  182. package/dist/{index-BuubzuE8.d.ts → index-BDZCJ9ri.d.ts} +2 -2
  183. package/dist/{index-FEy8qFSD.d.ts → index-BHqRH7QW.d.ts} +2 -2
  184. package/dist/{index-CTolyeii.d.ts → index-BLOEjvaM.d.ts} +16 -2
  185. package/dist/index-BMrggCw-.d.ts +52 -0
  186. package/dist/{index-z4p2k9VR.d.ts → index-Bgv4ZmBl.d.ts} +20 -2
  187. package/dist/{index-BoRIw-bP.d.ts → index-Bt7ewoz2.d.ts} +32 -2
  188. package/dist/{index-CjtAH60j.d.ts → index-Bu0Zd1uw.d.ts} +1 -1
  189. package/dist/{index-uQrLBZfF.d.ts → index-Bu3oXIIS.d.ts} +24 -0
  190. package/dist/{index-CX97hlld.d.ts → index-CBym0hSq.d.ts} +2 -19
  191. package/dist/index-CJlBAXwj.d.ts +100 -0
  192. package/dist/{index-DT9S92sh.d.ts → index-CNjbOgty.d.ts} +15 -0
  193. package/dist/{index-gW0HW02U.d.ts → index-COxy6LEW.d.ts} +1 -1
  194. package/dist/index-CRizexSC.d.ts +147 -0
  195. package/dist/{index-DYChvBOM.d.ts → index-Clmz00IK.d.ts} +31 -0
  196. package/dist/index-Cm_TiLXU.d.ts +22 -0
  197. package/dist/index-Cn-sSds-.d.ts +68 -0
  198. package/dist/index-CsVS37na.d.ts +81 -0
  199. package/dist/{index-DRmb-oUa.d.ts → index-CuFLztiI.d.ts} +6 -1
  200. package/dist/{index-CT8KEpec.d.ts → index-D0TlUOtG.d.ts} +1 -1
  201. package/dist/{index-fa72tWIU.d.ts → index-D2bSSSBP.d.ts} +1 -1
  202. package/dist/{index-2u4l3wq8.d.ts → index-DAiGhkNZ.d.ts} +15 -2
  203. package/dist/{index-DGNqi2za.d.ts → index-DQAnGHu7.d.ts} +5 -5
  204. package/dist/{index-BfOtLyNH.d.ts → index-D_nYxnNv.d.ts} +1 -1
  205. package/dist/{index-Df2YvC8o.d.ts → index-DeOftUMq.d.ts} +191 -75
  206. package/dist/{index-DXDGk38y.d.ts → index-Dg3ZmwEg.d.ts} +11 -0
  207. package/dist/{index-BiMGXtD-.d.ts → index-DimuSES0.d.ts} +14 -1
  208. package/dist/{index-C_2Z65Rp.d.ts → index-DnEh-HA0.d.ts} +1 -1
  209. package/dist/{index-D-ZuubCK.d.ts → index-DnSrjbjP.d.ts} +1 -1
  210. package/dist/{index-mQ6EPmaG.d.ts → index-DsyKhauk.d.ts} +78 -9
  211. package/dist/{index-C6RecznD.d.ts → index-I4J7gwa1.d.ts} +51 -9
  212. package/dist/{index-utZGF4GR.d.ts → index-NOXYEdOI.d.ts} +1 -1
  213. package/dist/{index-B4OOtNP8.d.ts → index-Z_onS2lR.d.ts} +1 -1
  214. package/dist/{index-CVn0GBdB.d.ts → index-cG1E0U2s.d.ts} +1 -1
  215. package/dist/{index-DEeJowZf.d.ts → index-cGagYM1g.d.ts} +15 -2
  216. package/dist/{index-Ck8qy6Rf.d.ts → index-c_TaW8mM.d.ts} +24 -2
  217. package/dist/{index-Bqb_Fyju.d.ts → index-jdjcb3Js.d.ts} +2 -2
  218. package/dist/index.d.ts +78 -68
  219. package/dist/index.js +107 -96
  220. package/dist/locale/index.d.ts +1 -1
  221. package/dist/locale/index.js +1 -1
  222. package/dist/registry-B1ObuP--.d.ts +45 -0
  223. package/dist/registry-C7OZb0PJ.js +135 -0
  224. package/dist/syntaxTheme-Bcs1YMF7.d.ts +38 -0
  225. package/dist/syntaxTheme-ClpWALZX.js +75 -0
  226. package/dist/types-BKcxXW--.d.ts +114 -0
  227. package/dist/types-Bt-lSgYX.d.ts +65 -0
  228. package/dist/{index-B8MbfMwV.d.ts → types-DDAAT1Xd.d.ts} +36 -82
  229. package/package.json +30 -1
  230. package/styles/avatar.css +14 -0
  231. package/styles/badge.css +8 -0
  232. package/styles/breadcrumbs.css +6 -1
  233. package/styles/button.css +13 -0
  234. package/styles/calendar.css +16 -0
  235. package/styles/card.css +2 -0
  236. package/styles/carousel.css +120 -0
  237. package/styles/chat.css +5 -2
  238. package/styles/dropdown-menu.css +11 -0
  239. package/styles/heading.css +6 -2
  240. package/styles/icon.css +38 -8
  241. package/styles/lightbox.css +144 -0
  242. package/styles/link.css +5 -0
  243. package/styles/media-theme.css +51 -0
  244. package/styles/number-input.css +22 -0
  245. package/styles/outline.css +124 -0
  246. package/styles/pagination.css +45 -1
  247. package/styles/progress-bar.css +4 -0
  248. package/styles/selector.css +58 -0
  249. package/styles/tab-list.css +15 -0
  250. package/styles/text-area.css +17 -0
  251. package/styles/text-input.css +5 -0
  252. package/styles/text.css +63 -14
  253. package/styles/theme.css +29 -0
  254. package/styles/timer.css +34 -0
  255. package/styles/toast.css +7 -0
  256. package/styles/toolbar.css +11 -0
  257. package/styles.css +6 -0
  258. package/dist/Avatar-5s3HSrtN.js +0 -136
  259. package/dist/Badge-Ba0EwsTj.js +0 -19
  260. package/dist/Calendar-CYhGDT6f.js +0 -277
  261. package/dist/DateInput-D2ErjXYO.js +0 -250
  262. package/dist/Icon-5MdZQ18k.js +0 -86
  263. package/dist/Link-CprjOuTI.js +0 -92
  264. package/dist/NumberInput-DspJO6z6.js +0 -147
  265. package/dist/Selector-DlZpQh42.js +0 -325
  266. package/dist/index-BzqRns96.d.ts +0 -64
  267. package/dist/index-ZJyk8RtQ.d.ts +0 -68
  268. package/dist/{CheckboxList-EsIEXjK_.js → CheckboxList-BbCPiend.js} +1 -1
  269. package/dist/{index-4FM5lQdV.d.ts → index-BUXNRekN.d.ts} +1 -1
@@ -1,2 +1,2 @@
1
- import { t as _sfc_main } from "../DateInput-D2ErjXYO.js";
1
+ import { t as _sfc_main } from "../DateInput-Crcg-CCj.js";
2
2
  export { _sfc_main as DateInput };
@@ -0,0 +1,376 @@
1
+ import { t as useMediaQuery } from "./useMediaQuery-GMmgp28-.js";
2
+ import { a as useAstryxMessages, i as useAstryxLocale } from "./context-DzcK4T_C.js";
3
+ import { t as _sfc_main$1 } from "./FieldIcon--NTgW5IU.js";
4
+ import { t as _sfc_main$2 } from "./BottomSheet-Dg95HB1s.js";
5
+ import { t as _sfc_main$3 } from "./Calendar-DqC3EDN1.js";
6
+ import { t as _sfc_main$4 } from "./Field-8zRxzDHE.js";
7
+ import { t as _sfc_main$5 } from "./Popover-Crhk9PNP.js";
8
+ import { t as formatInstant } from "./formatInstant-BDWUIxS7.js";
9
+ import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, guardReactiveProps, normalizeClass, normalizeProps, openBlock, ref, renderSlot, resolveDynamicComponent, useId, useTemplateRef, watch, withCtx } from "vue";
10
+ import "../styles/date-input.css";
11
+ //#region src/DateInput/DateInput.vue
12
+ const _hoisted_1 = ["data-status", "data-presentation"];
13
+ const _hoisted_2 = [
14
+ "data-disabled",
15
+ "data-size",
16
+ "data-status"
17
+ ];
18
+ const _hoisted_3 = {
19
+ key: 0,
20
+ class: "astryx-date-input-prefix"
21
+ };
22
+ const _hoisted_4 = ["disabled", "aria-label"];
23
+ const _hoisted_5 = [
24
+ "id",
25
+ "value",
26
+ "placeholder",
27
+ "disabled",
28
+ "readonly",
29
+ "inputmode",
30
+ "aria-label",
31
+ "aria-labelledby",
32
+ "aria-describedby",
33
+ "aria-invalid",
34
+ "aria-controls",
35
+ "aria-expanded",
36
+ "title"
37
+ ];
38
+ const _hoisted_6 = ["aria-label"];
39
+ const _hoisted_7 = {
40
+ key: 2,
41
+ class: "astryx-date-input-suffix"
42
+ };
43
+ const _hoisted_8 = ["id"];
44
+ const _hoisted_9 = ["id"];
45
+ const _hoisted_10 = ["name", "value"];
46
+ const TOUCH_POINTER_QUERY = "(pointer: coarse)";
47
+ const _sfc_main = /*@__PURE__*/ defineComponent({
48
+ name: "AstryxDateInput",
49
+ __name: "DateInput",
50
+ props: {
51
+ id: {},
52
+ describedBy: {},
53
+ modelValue: { default: null },
54
+ placeholder: {},
55
+ min: {},
56
+ max: {},
57
+ isDateDisabled: {},
58
+ name: {},
59
+ label: {},
60
+ description: {},
61
+ isLabelHidden: { type: Boolean },
62
+ disabled: {
63
+ type: Boolean,
64
+ default: false
65
+ },
66
+ disabledReason: {},
67
+ clearable: {
68
+ type: Boolean,
69
+ default: false
70
+ },
71
+ clearLabel: {},
72
+ size: { default: "md" },
73
+ status: {},
74
+ statusVariant: { default: "attached" },
75
+ format: {
76
+ type: [String, Function],
77
+ default: "date_long"
78
+ },
79
+ presentation: { default: "popover" }
80
+ },
81
+ emits: ["update:modelValue", "change"],
82
+ setup(__props, { emit: __emit }) {
83
+ const props = __props;
84
+ const emit = __emit;
85
+ const PassThrough = defineComponent({
86
+ name: "DateInputPassThrough",
87
+ setup(_, { slots }) {
88
+ return () => slots.default?.({});
89
+ }
90
+ });
91
+ const generatedId = `astryx-date-input-${useId()}`;
92
+ const inputId = computed(() => props.id ?? generatedId);
93
+ const popupId = computed(() => `${inputId.value}-popup`);
94
+ const messages = useAstryxMessages();
95
+ const locale = useAstryxLocale();
96
+ const isCoarsePointer = useMediaQuery(TOUCH_POINTER_QUERY);
97
+ const resolvedPlaceholder = computed(() => props.placeholder ?? messages.value.dateInput.placeholder);
98
+ const resolvedClearLabel = computed(() => props.clearLabel ?? messages.value.dateInput.clear(props.label));
99
+ const dialogLabel = computed(() => props.label || messages.value.dateInput.dialogLabel);
100
+ const inputRef = useTemplateRef("inputRef");
101
+ const isOpen = ref(false);
102
+ const inputValue = ref("");
103
+ const modelValueRef = computed({
104
+ get: () => props.modelValue,
105
+ set: (value) => {
106
+ emit("update:modelValue", value);
107
+ emit("change", value);
108
+ }
109
+ });
110
+ function toIso(date) {
111
+ return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")}`;
112
+ }
113
+ function formatCommitted(date) {
114
+ if (!date) return "";
115
+ const iso = toIso(date);
116
+ const format = props.format;
117
+ if (typeof format === "function") return format(iso);
118
+ if (format === "system_date") return iso;
119
+ return formatInstant(date, format, locale.value);
120
+ }
121
+ function parseDate(str) {
122
+ if (!str.trim()) return null;
123
+ const match = str.match(/^(\d{4})-(\d{1,2})-(\d{1,2})$/);
124
+ if (match) {
125
+ const [, year, month, day] = match;
126
+ const date = new Date(Number(year), Number(month) - 1, Number(day));
127
+ if (!Number.isNaN(date.getTime()) && date.getFullYear() === Number(year) && date.getMonth() === Number(month) - 1 && date.getDate() === Number(day)) return date;
128
+ }
129
+ return null;
130
+ }
131
+ function syncDisplayValue() {
132
+ inputValue.value = formatCommitted(props.modelValue);
133
+ }
134
+ watch(() => [
135
+ props.modelValue,
136
+ props.format,
137
+ locale.value
138
+ ], syncDisplayValue, { immediate: true });
139
+ function resolvedStatus(status) {
140
+ if (status == null || status === "default") return void 0;
141
+ if (typeof status === "string") return { type: status };
142
+ return status;
143
+ }
144
+ const statusValue = computed(() => resolvedStatus(props.status));
145
+ const statusType = computed(() => statusValue.value?.type);
146
+ const useSheet = computed(() => {
147
+ if (props.presentation === "bottom-sheet") return true;
148
+ if (props.presentation === "adaptive-bottom-sheet") return isCoarsePointer.value;
149
+ return false;
150
+ });
151
+ const showsField = computed(() => {
152
+ if (props.isLabelHidden && !props.description && !statusValue.value?.message) return false;
153
+ return Boolean(props.label || props.description || statusValue.value?.message);
154
+ });
155
+ const shell = computed(() => showsField.value ? _sfc_main$4 : PassThrough);
156
+ const fieldBindings = computed(() => showsField.value ? {
157
+ label: props.label ?? "",
158
+ inputId: inputId.value,
159
+ description: props.description,
160
+ isLabelHidden: props.isLabelHidden || !props.label,
161
+ isDisabled: props.disabled,
162
+ status: statusValue.value,
163
+ statusVariant: props.statusVariant
164
+ } : {});
165
+ const toggleLabel = computed(() => isOpen.value ? messages.value.dateInput.closeCalendar : messages.value.dateInput.openCalendar);
166
+ function describedBy(fieldIds) {
167
+ return [props.describedBy, fieldIds].filter(Boolean).join(" ") || void 0;
168
+ }
169
+ function onInput(event) {
170
+ if (useSheet.value) return;
171
+ const target = event.target;
172
+ const value = target.value.trim();
173
+ inputValue.value = target.value;
174
+ const parsed = parseDate(value);
175
+ if (parsed) modelValueRef.value = parsed;
176
+ }
177
+ function onBlur() {
178
+ if (!parseDate(inputValue.value.trim())) syncDisplayValue();
179
+ }
180
+ function onOpenChange(open) {
181
+ if (!useSheet.value) isOpen.value = open;
182
+ }
183
+ function openCalendar() {
184
+ if (!props.disabled) isOpen.value = true;
185
+ }
186
+ function onToggleClick() {
187
+ if (useSheet.value) openCalendar();
188
+ }
189
+ function onInputKeyDown(event) {
190
+ if (props.disabled || isOpen.value) return;
191
+ if (event.key === "ArrowDown" || event.altKey && event.key === "ArrowDown") {
192
+ event.preventDefault();
193
+ openCalendar();
194
+ }
195
+ }
196
+ function onCalendarChange(date) {
197
+ modelValueRef.value = date;
198
+ isOpen.value = false;
199
+ inputRef.value?.blur();
200
+ }
201
+ function onClear(event) {
202
+ event.stopPropagation();
203
+ modelValueRef.value = null;
204
+ inputValue.value = "";
205
+ isOpen.value = false;
206
+ }
207
+ syncDisplayValue();
208
+ return (_ctx, _cache) => {
209
+ return openBlock(), createBlock(resolveDynamicComponent(shell.value), normalizeProps(guardReactiveProps(fieldBindings.value)), {
210
+ default: withCtx((field) => [createElementVNode("div", {
211
+ class: normalizeClass(["astryx-date-input", [statusType.value ? `status-${statusType.value}` : void 0, `size-${props.size}`]]),
212
+ "data-status": statusType.value,
213
+ "data-presentation": useSheet.value ? "bottom-sheet" : "popover"
214
+ }, [
215
+ createVNode(_sfc_main$5, {
216
+ "is-open": useSheet.value ? false : isOpen.value,
217
+ "is-enabled": !useSheet.value && !props.disabled,
218
+ placement: "below",
219
+ alignment: "start",
220
+ padding: 0,
221
+ width: 248,
222
+ "has-close-button": false,
223
+ "is-modal": false,
224
+ "has-auto-focus": true,
225
+ role: "dialog",
226
+ label: dialogLabel.value,
227
+ onOpenChange
228
+ }, {
229
+ content: withCtx(() => [!useSheet.value ? (openBlock(), createElementBlock("div", {
230
+ key: 0,
231
+ id: popupId.value
232
+ }, [createVNode(_sfc_main$3, {
233
+ "model-value": props.modelValue,
234
+ min: props.min,
235
+ max: props.max,
236
+ "is-date-disabled": props.isDateDisabled,
237
+ "onUpdate:modelValue": onCalendarChange
238
+ }, null, 8, [
239
+ "model-value",
240
+ "min",
241
+ "max",
242
+ "is-date-disabled"
243
+ ])], 8, _hoisted_8)) : createCommentVNode("v-if", true)]),
244
+ default: withCtx(() => [createElementVNode("div", {
245
+ class: "astryx-date-input-wrapper",
246
+ "data-disabled": props.disabled ? "true" : void 0,
247
+ "data-size": props.size,
248
+ "data-status": statusType.value
249
+ }, [
250
+ _ctx.$slots.prefix ? (openBlock(), createElementBlock("span", _hoisted_3, [renderSlot(_ctx.$slots, "prefix")])) : createCommentVNode("v-if", true),
251
+ createElementVNode("button", {
252
+ type: "button",
253
+ class: "astryx-date-input-toggle",
254
+ disabled: props.disabled,
255
+ "aria-label": toggleLabel.value,
256
+ onClick: onToggleClick
257
+ }, [..._cache[1] || (_cache[1] = [createElementVNode("svg", {
258
+ width: "16",
259
+ height: "16",
260
+ viewBox: "0 0 16 16",
261
+ fill: "none",
262
+ "aria-hidden": "true"
263
+ }, [
264
+ createElementVNode("rect", {
265
+ x: "3",
266
+ y: "4",
267
+ width: "10",
268
+ height: "9",
269
+ rx: "1",
270
+ stroke: "currentColor",
271
+ "stroke-width": "1.5"
272
+ }),
273
+ createElementVNode("path", {
274
+ d: "M3 6H13",
275
+ stroke: "currentColor",
276
+ "stroke-width": "1.5"
277
+ }),
278
+ createElementVNode("path", {
279
+ d: "M5 3V5M11 3V5",
280
+ stroke: "currentColor",
281
+ "stroke-width": "1.5",
282
+ "stroke-linecap": "round"
283
+ })
284
+ ], -1)])], 8, _hoisted_4),
285
+ createElementVNode("input", {
286
+ id: inputId.value,
287
+ ref_key: "inputRef",
288
+ ref: inputRef,
289
+ type: "text",
290
+ class: "astryx-date-input-field",
291
+ role: "combobox",
292
+ value: inputValue.value,
293
+ placeholder: resolvedPlaceholder.value,
294
+ disabled: props.disabled,
295
+ readonly: useSheet.value,
296
+ inputmode: useSheet.value ? "none" : void 0,
297
+ "aria-label": showsField.value ? void 0 : props.label,
298
+ "aria-labelledby": showsField.value ? field?.labelId : void 0,
299
+ "aria-describedby": describedBy(field?.describedBy),
300
+ "aria-invalid": statusType.value === "error" ? "true" : void 0,
301
+ "aria-controls": popupId.value,
302
+ "aria-expanded": isOpen.value,
303
+ "aria-haspopup": "dialog",
304
+ title: props.disabledReason,
305
+ autocomplete: "off",
306
+ onInput,
307
+ onBlur,
308
+ onClick: openCalendar,
309
+ onKeydown: onInputKeyDown
310
+ }, null, 40, _hoisted_5),
311
+ props.clearable && props.modelValue ? (openBlock(), createElementBlock("button", {
312
+ key: 1,
313
+ type: "button",
314
+ class: "astryx-date-input-clear",
315
+ "aria-label": resolvedClearLabel.value,
316
+ tabindex: "-1",
317
+ onClick: onClear
318
+ }, [..._cache[2] || (_cache[2] = [createElementVNode("svg", {
319
+ width: "16",
320
+ height: "16",
321
+ viewBox: "0 0 16 16",
322
+ fill: "none",
323
+ "aria-hidden": "true"
324
+ }, [createElementVNode("path", {
325
+ d: "M12 4L4 12M4 4L12 12",
326
+ stroke: "currentColor",
327
+ "stroke-width": "1.5",
328
+ "stroke-linecap": "round"
329
+ })], -1)])], 8, _hoisted_6)) : _ctx.$slots.suffix ? (openBlock(), createElementBlock("span", _hoisted_7, [renderSlot(_ctx.$slots, "suffix")])) : createCommentVNode("v-if", true),
330
+ statusType.value && props.statusVariant !== "tooltip" ? (openBlock(), createBlock(_sfc_main$1, {
331
+ key: 3,
332
+ type: statusType.value
333
+ }, null, 8, ["type"])) : createCommentVNode("v-if", true)
334
+ ], 8, _hoisted_2)]),
335
+ _: 2
336
+ }, 1032, [
337
+ "is-open",
338
+ "is-enabled",
339
+ "label"
340
+ ]),
341
+ useSheet.value ? (openBlock(), createBlock(_sfc_main$2, {
342
+ key: 0,
343
+ "is-open": isOpen.value,
344
+ "onUpdate:isOpen": _cache[0] || (_cache[0] = ($event) => isOpen.value = $event),
345
+ label: dialogLabel.value,
346
+ height: "hug",
347
+ padding: 0
348
+ }, {
349
+ default: withCtx(() => [createElementVNode("div", { id: popupId.value }, [createVNode(_sfc_main$3, {
350
+ "model-value": props.modelValue,
351
+ min: props.min,
352
+ max: props.max,
353
+ "is-date-disabled": props.isDateDisabled,
354
+ "onUpdate:modelValue": onCalendarChange
355
+ }, null, 8, [
356
+ "model-value",
357
+ "min",
358
+ "max",
359
+ "is-date-disabled"
360
+ ])], 8, _hoisted_9)]),
361
+ _: 1
362
+ }, 8, ["is-open", "label"])) : createCommentVNode("v-if", true),
363
+ props.name ? (openBlock(), createElementBlock("input", {
364
+ key: 1,
365
+ type: "hidden",
366
+ name: props.name,
367
+ value: props.modelValue ? toIso(props.modelValue) : ""
368
+ }, null, 8, _hoisted_10)) : createCommentVNode("v-if", true)
369
+ ], 10, _hoisted_1)]),
370
+ _: 3
371
+ }, 16);
372
+ };
373
+ }
374
+ });
375
+ //#endregion
376
+ export { _sfc_main as t };
@@ -1,2 +1,2 @@
1
- import { $n as DateRangeInputEmits, Qn as DateRange, Zn as _default, er as DateRangeInputProps, tr as DateRangePreset } from "../index-Df2YvC8o.js";
1
+ import { $n as DateRangeInputEmits, Qn as DateRange, Zn as _default, er as DateRangeInputProps, tr as DateRangePreset } from "../index-DeOftUMq.js";
2
2
  export { type DateRange, _default as DateRangeInput, type DateRangeInputEmits, type DateRangeInputProps, type DateRangePreset };
@@ -1,2 +1,2 @@
1
- import { t as _sfc_main } from "../DateRangeInput-fmQlr_A7.js";
1
+ import { t as _sfc_main } from "../DateRangeInput-e9KSxBBK.js";
2
2
  export { _sfc_main as DateRangeInput };
@@ -1,9 +1,9 @@
1
1
  import { a as todayISODate, c as formatDateRange, f as orderRange, l as isDayOutsideSpan, n as buildMonthGrid, o as applyRangeClick, p as resolveWeekStart, t as addMonths, u as isRangeWithinSpan } from "./useMonthGrid-CmJsZTcB.js";
2
- import { a as useAstryxMessages, i as useAstryxLocale } from "./context-D6ECRdc5.js";
2
+ import { a as useAstryxMessages, i as useAstryxLocale } from "./context-DzcK4T_C.js";
3
3
  import { n as weekdayNames, t as formatCalendarMonth } from "./locale-Cpk_nrLA.js";
4
4
  import { t as _sfc_main$2 } from "./FieldIcon--NTgW5IU.js";
5
5
  import { t as _sfc_main$3 } from "./IconButton-BNQuz9W_.js";
6
- import { t as _sfc_main$4 } from "./Icon-5MdZQ18k.js";
6
+ import { t as _sfc_main$4 } from "./Icon-Bku25g_K.js";
7
7
  import { t as _sfc_main$5 } from "./Field-8zRxzDHE.js";
8
8
  import { t as _sfc_main$6 } from "./Popover-Crhk9PNP.js";
9
9
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeModels, normalizeClass, openBlock, renderList, shallowRef, toDisplayString, unref, useId, useModel, withCtx } from "vue";
@@ -1,2 +1,2 @@
1
- import { Jn as DateTimeInputEmits, Xn as DateTimeInputSize, Yn as DateTimeInputProps, qn as _default } from "../index-Df2YvC8o.js";
1
+ import { Jn as DateTimeInputEmits, Xn as DateTimeInputSize, Yn as DateTimeInputProps, qn as _default } from "../index-DeOftUMq.js";
2
2
  export { _default as DateTimeInput, type DateTimeInputEmits, type DateTimeInputProps, type DateTimeInputSize };
@@ -1,2 +1,2 @@
1
- import { t as _sfc_main } from "../DateTimeInput-Bs1JmcIp.js";
1
+ import { t as _sfc_main } from "../DateTimeInput-fSOfuLex.js";
2
2
  export { _sfc_main as DateTimeInput };
@@ -1,9 +1,9 @@
1
- import { a as useAstryxMessages } from "./context-D6ECRdc5.js";
1
+ import { a as useAstryxMessages } from "./context-DzcK4T_C.js";
2
2
  import { t as _sfc_main$1 } from "./FieldIcon--NTgW5IU.js";
3
3
  import { t as _sfc_main$2 } from "./IconButton-BNQuz9W_.js";
4
4
  import { t as _sfc_main$3 } from "./Field-8zRxzDHE.js";
5
- import { t as _sfc_main$4 } from "./DateInput-D2ErjXYO.js";
6
- import { t as _sfc_main$5 } from "./TimeField-l3QzU6vC.js";
5
+ import { t as _sfc_main$4 } from "./DateInput-Crcg-CCj.js";
6
+ import { t as _sfc_main$5 } from "./TimeField-BGbxCoKU.js";
7
7
  import { computed, createBlock, createCommentVNode, createElementVNode, createVNode, defineComponent, mergeModels, openBlock, ref, unref, useId, useModel, watch, withCtx } from "vue";
8
8
  import "../styles/date-time-input.css";
9
9
  //#region src/DateTimeInput/DateTimeInput.vue
@@ -127,6 +127,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
127
127
  id: generatedId,
128
128
  "model-value": dateValue.value,
129
129
  label: unref(messages).dateTimeInput.dateLabel,
130
+ format: "system_date",
131
+ "is-label-hidden": "",
130
132
  placeholder: __props.placeholder,
131
133
  disabled: __props.isDisabled,
132
134
  size: __props.size,
@@ -1,2 +1,3 @@
1
- import { S as DropdownMenuTriggerProps, _ as DropdownMenuOption, a as DropdownMenuContextValue, b as DropdownMenuSize, c as DropdownMenuDividerData, d as DropdownMenuGroupSlots, f as DropdownMenuItemData, g as DropdownMenuItemVariant, h as DropdownMenuItemSlots, i as _default, l as DropdownMenuEmits, m as DropdownMenuItemProps, n as _default$2, o as useDropdownMenuContext, p as DropdownMenuItemEmits, r as _default$1, s as DropdownMenuButtonProps, t as _default$3, u as DropdownMenuGroupProps, v as DropdownMenuProps, x as DropdownMenuSlots, y as DropdownMenuSection } from "../index-B8MbfMwV.js";
2
- export { _default as DropdownMenu, type DropdownMenuButtonProps, type DropdownMenuContextValue, _default$1 as DropdownMenuDivider, type DropdownMenuDividerData, type DropdownMenuEmits, _default$2 as DropdownMenuGroup, type DropdownMenuGroupProps, type DropdownMenuGroupSlots, _default$3 as DropdownMenuItem, type DropdownMenuItemData, type DropdownMenuItemEmits, type DropdownMenuItemProps, type DropdownMenuItemSlots, type DropdownMenuItemVariant, type DropdownMenuOption, type DropdownMenuProps, type DropdownMenuSection, type DropdownMenuSize, type DropdownMenuSlots, type DropdownMenuTriggerProps, useDropdownMenuContext };
1
+ import { _ as DropdownMenuSubMenuProps, a as DropdownMenuGroupSlots, c as DropdownMenuItemProps, d as DropdownMenuOption, f as DropdownMenuPresentation, g as DropdownMenuSlots, h as DropdownMenuSize, i as DropdownMenuGroupProps, l as DropdownMenuItemSlots, m as DropdownMenuSection, n as DropdownMenuDividerData, o as DropdownMenuItemData, p as DropdownMenuProps, r as DropdownMenuEmits, s as DropdownMenuItemEmits, t as DropdownMenuButtonProps, u as DropdownMenuItemVariant, v as DropdownMenuSubMenuSlots, y as DropdownMenuTriggerProps } from "../types-DDAAT1Xd.js";
2
+ import { a as _default, i as _default$1, n as _default$3, o as DropdownMenuContextValue, r as _default$2, s as useDropdownMenuContext, t as _default$4 } from "../index-CJlBAXwj.js";
3
+ export { _default as DropdownMenu, type DropdownMenuButtonProps, type DropdownMenuContextValue, _default$1 as DropdownMenuDivider, type DropdownMenuDividerData, type DropdownMenuEmits, _default$2 as DropdownMenuGroup, type DropdownMenuGroupProps, type DropdownMenuGroupSlots, _default$3 as DropdownMenuItem, type DropdownMenuItemData, type DropdownMenuItemEmits, type DropdownMenuItemProps, type DropdownMenuItemSlots, type DropdownMenuItemVariant, type DropdownMenuOption, type DropdownMenuPresentation, type DropdownMenuProps, type DropdownMenuSection, type DropdownMenuSize, type DropdownMenuSlots, _default$4 as DropdownMenuSubMenu, type DropdownMenuSubMenuProps, type DropdownMenuSubMenuSlots, type DropdownMenuTriggerProps, useDropdownMenuContext };
@@ -1,2 +1,3 @@
1
- import { a as useDropdownMenuContext, i as _sfc_main$1, n as _sfc_main$3, r as _sfc_main$2, t as _sfc_main } from "../DropdownMenu-B0gogrvG.js";
2
- export { _sfc_main as DropdownMenu, _sfc_main$1 as DropdownMenuDivider, _sfc_main$2 as DropdownMenuGroup, _sfc_main$3 as DropdownMenuItem, useDropdownMenuContext };
1
+ import { a as _sfc_main$1, c as useDropdownMenuContext, i as _sfc_main$2, r as _sfc_main$3, t as _sfc_main } from "../DropdownMenu-8G0B1UND.js";
2
+ import { t as _sfc_main$4 } from "../DropdownMenu-XvW4BJob.js";
3
+ export { _sfc_main as DropdownMenu, _sfc_main$1 as DropdownMenuDivider, _sfc_main$2 as DropdownMenuGroup, _sfc_main$3 as DropdownMenuItem, _sfc_main$4 as DropdownMenuSubMenu, useDropdownMenuContext };
@@ -1,10 +1,12 @@
1
1
  import { t as _sfc_main$5 } from "./Button-DrqeomlE.js";
2
+ import { t as useMediaQuery } from "./useMediaQuery-GMmgp28-.js";
2
3
  import { t as useDismiss } from "./useDismiss-CAiHU6QD.js";
3
4
  import { t as useTypeahead } from "./useTypeahead-PAK8lMYz.js";
4
- import { t as _sfc_main$6 } from "./Icon-5MdZQ18k.js";
5
- import { t as _sfc_main$7 } from "./Divider-BtwnL18I.js";
6
- import { t as _sfc_main$8 } from "./Item-C1z6gXn8.js";
7
5
  import { t as usePositionedLayer } from "./usePositionedLayer-C1NBOsVT.js";
6
+ import { t as _sfc_main$6 } from "./BottomSheet-Dg95HB1s.js";
7
+ import { t as _sfc_main$7 } from "./Icon-Bku25g_K.js";
8
+ import { t as _sfc_main$8 } from "./Divider-BtwnL18I.js";
9
+ import { t as _sfc_main$9 } from "./Item-C1z6gXn8.js";
8
10
  import { Fragment, Teleport, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, guardReactiveProps, h, inject, mergeModels, mergeProps, nextTick, normalizeProps, onBeforeUnmount, onMounted, openBlock, provide, ref, renderSlot, shallowRef, toDisplayString, unref, useAttrs, useId, useModel, useSlots, vShow, watch, withCtx, withDirectives } from "vue";
9
11
  import "../styles/dropdown-menu.css";
10
12
  //#region src/DropdownMenu/context.ts
@@ -57,7 +59,7 @@ const _sfc_main$4 = /*@__PURE__*/ defineComponent({
57
59
  __name: "DropdownMenuDivider",
58
60
  setup(__props) {
59
61
  return (_ctx, _cache) => {
60
- return openBlock(), createBlock(_sfc_main$7, { class: "astryx-dropdown-menu-divider" });
62
+ return openBlock(), createBlock(_sfc_main$8, { class: "astryx-dropdown-menu-divider" });
61
63
  };
62
64
  }
63
65
  });
@@ -116,7 +118,7 @@ const _hoisted_2$1 = {
116
118
  key: 0,
117
119
  class: "astryx-item__start"
118
120
  };
119
- const _hoisted_3 = { class: "astryx-item__content" };
121
+ const _hoisted_3$1 = { class: "astryx-item__content" };
120
122
  const _hoisted_4 = {
121
123
  key: 0,
122
124
  class: "astryx-item__label"
@@ -220,14 +222,14 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
220
222
  onClick: handleClick,
221
223
  onPointermove: handlePointerMove
222
224
  }), [
223
- hasStart.value ? (openBlock(), createElementBlock("span", _hoisted_2$1, [renderSlot(_ctx.$slots, "icon", {}, () => [createVNode(_sfc_main$6, {
225
+ hasStart.value ? (openBlock(), createElementBlock("span", _hoisted_2$1, [renderSlot(_ctx.$slots, "icon", {}, () => [createVNode(_sfc_main$7, {
224
226
  color: iconColor.value,
225
227
  icon: __props.icon,
226
228
  size: "sm"
227
229
  }, null, 8, ["color", "icon"])])])) : createCommentVNode("v-if", true),
228
- createElementVNode("span", _hoisted_3, [hasLabel.value ? (openBlock(), createElementBlock("span", _hoisted_4, [renderSlot(_ctx.$slots, "label", {}, () => [createTextVNode(toDisplayString(__props.label), 1)])])) : createCommentVNode("v-if", true), hasDescription.value ? (openBlock(), createElementBlock("span", _hoisted_5, [renderSlot(_ctx.$slots, "description", {}, () => [createTextVNode(toDisplayString(__props.description), 1)])])) : createCommentVNode("v-if", true)]),
230
+ createElementVNode("span", _hoisted_3$1, [hasLabel.value ? (openBlock(), createElementBlock("span", _hoisted_4, [renderSlot(_ctx.$slots, "label", {}, () => [createTextVNode(toDisplayString(__props.label), 1)])])) : createCommentVNode("v-if", true), hasDescription.value ? (openBlock(), createElementBlock("span", _hoisted_5, [renderSlot(_ctx.$slots, "description", {}, () => [createTextVNode(toDisplayString(__props.description), 1)])])) : createCommentVNode("v-if", true)]),
229
231
  hasEnd.value ? (openBlock(), createElementBlock("span", _hoisted_6, [renderSlot(_ctx.$slots, "endContent")])) : createCommentVNode("v-if", true)
230
- ], 16, _hoisted_1$1)) : (openBlock(), createBlock(_sfc_main$8, mergeProps({ key: 1 }, unref(attrs), {
232
+ ], 16, _hoisted_1$1)) : (openBlock(), createBlock(_sfc_main$9, mergeProps({ key: 1 }, unref(attrs), {
231
233
  class: "astryx-dropdown-menu-item",
232
234
  role: "menuitem",
233
235
  "data-menu-size": menuSize.value,
@@ -243,7 +245,7 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
243
245
  }), createSlots({ _: 2 }, [
244
246
  hasStart.value ? {
245
247
  name: "startContent",
246
- fn: withCtx(() => [renderSlot(_ctx.$slots, "icon", {}, () => [createVNode(_sfc_main$6, {
248
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "icon", {}, () => [createVNode(_sfc_main$7, {
247
249
  color: iconColor.value,
248
250
  icon: __props.icon,
249
251
  size: "sm"
@@ -451,6 +453,11 @@ function useMenuFocus(options) {
451
453
  //#region src/DropdownMenu/DropdownMenu.vue
452
454
  const _hoisted_1 = ["data-open"];
453
455
  const _hoisted_2 = [
456
+ "id",
457
+ "aria-labelledby",
458
+ "aria-label"
459
+ ];
460
+ const _hoisted_3 = [
454
461
  "id",
455
462
  "aria-labelledby",
456
463
  "aria-label",
@@ -459,6 +466,7 @@ const _hoisted_2 = [
459
466
  const GAP = 4;
460
467
  const DEFAULT_MAX_WIDTH = 320;
461
468
  const DEFAULT_MAX_HEIGHT = "300px";
469
+ const COMPACT_TOUCH_QUERY = "(max-width: 639px) and (pointer: coarse) and (hover: none)";
462
470
  const _sfc_main = /*@__PURE__*/ defineComponent({
463
471
  name: "AstryxDropdownMenu",
464
472
  inheritAttrs: false,
@@ -470,6 +478,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
470
478
  menuWidth: {},
471
479
  menuMaxHeight: {},
472
480
  placement: { default: "below" },
481
+ presentation: { default: "popover" },
473
482
  alignment: { default: "start" },
474
483
  hasChevron: {
475
484
  type: Boolean,
@@ -506,7 +515,16 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
506
515
  const focusLastOnOpen = shallowRef(false);
507
516
  let openModality = "keyboard";
508
517
  let armedTriggerClickGuard = false;
518
+ const isCompactTouch = useMediaQuery(COMPACT_TOUCH_QUERY);
519
+ const isSheet = computed(() => props.presentation === "bottom-sheet" || props.presentation === "adaptive" && isCompactTouch.value);
520
+ const sheetOpen = computed({
521
+ get: () => isSheet.value && isOpen.value,
522
+ set: (open) => {
523
+ if (!open) closeMenu();
524
+ }
525
+ });
509
526
  const buttonProps = computed(() => props.button ?? {});
527
+ const sheetLabel = computed(() => typeof buttonProps.value.label === "string" ? buttonProps.value.label : "Menu");
510
528
  const menuSize = computed(() => buttonProps.value.size ?? "md");
511
529
  const isIconOnly = computed(() => buttonProps.value.isIconOnly === true);
512
530
  const hasChevron = computed(() => props.hasChevron && !isIconOnly.value);
@@ -548,9 +566,10 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
548
566
  gap: GAP
549
567
  });
550
568
  watch(isOpen, (nowOpen) => {
551
- layerIsOpen.value = nowOpen;
569
+ layerIsOpen.value = nowOpen && !isSheet.value;
552
570
  });
553
571
  const surfaceStyle = computed(() => {
572
+ if (isSheet.value) return {};
554
573
  const style = {
555
574
  "top": `${position.value.top}px`,
556
575
  "left": `${position.value.left}px`,
@@ -580,7 +599,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
580
599
  useDismiss({
581
600
  container: surfaceRef,
582
601
  trigger: anchorRef,
583
- isEnabled: computed(() => isOpen.value),
602
+ isEnabled: computed(() => isOpen.value && !isSheet.value),
584
603
  onDismiss: closeMenu
585
604
  });
586
605
  function emitOpenChange(next) {
@@ -608,7 +627,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
608
627
  return anchor.querySelector("button, a[href], [role=\"button\"], [tabindex]");
609
628
  }
610
629
  watch(isOpen, async (nowOpen) => {
611
- layerIsOpen.value = nowOpen;
630
+ layerIsOpen.value = nowOpen && !isSheet.value;
612
631
  if (nowOpen) {
613
632
  anchorWidth.value = anchorRef.value?.getBoundingClientRect().width ?? 0;
614
633
  await nextTick();
@@ -686,6 +705,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
686
705
  }));
687
706
  provide(dropdownMenuContextKey, {
688
707
  closeMenu,
708
+ isOpen,
689
709
  menuSize
690
710
  });
691
711
  onMounted(() => {
@@ -712,7 +732,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
712
732
  onKeydown: onTriggerKeydown
713
733
  }), createSlots({ _: 2 }, [hasChevron.value ? {
714
734
  name: "end",
715
- fn: withCtx(() => [createVNode(_sfc_main$6, {
735
+ fn: withCtx(() => [createVNode(_sfc_main$7, {
716
736
  color: "inherit",
717
737
  icon: "chevronDown",
718
738
  size: "sm"
@@ -722,7 +742,34 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
722
742
  "aria-controls",
723
743
  "aria-expanded",
724
744
  "tooltip"
725
- ]))], 8, _hoisted_1), (openBlock(), createBlock(Teleport, { to: "body" }, [createVNode(Transition, {
745
+ ]))], 8, _hoisted_1), isSheet.value ? (openBlock(), createBlock(_sfc_main$6, {
746
+ key: 0,
747
+ "is-open": sheetOpen.value,
748
+ "onUpdate:isOpen": _cache[0] || (_cache[0] = ($event) => sheetOpen.value = $event),
749
+ height: "hug",
750
+ label: sheetLabel.value,
751
+ padding: 2
752
+ }, {
753
+ default: withCtx(() => [createElementVNode("div", mergeProps({
754
+ id: surfaceId.value,
755
+ ref_key: "surfaceRef",
756
+ ref: surfaceRef
757
+ }, forwardedAttrs.value, {
758
+ "aria-labelledby": menuAriaLabelledBy.value,
759
+ "aria-label": menuAriaLabel.value,
760
+ class: ["astryx-dropdown-menu is-sheet", unref(attrs).class],
761
+ role: "menu",
762
+ tabindex: "-1",
763
+ onKeydown: onSurfaceKeydown
764
+ }), [__props.items != null ? (openBlock(), createBlock(unref(DropdownMenuItems), {
765
+ key: 0,
766
+ items: __props.items
767
+ }, null, 8, ["items"])) : renderSlot(_ctx.$slots, "default", {}, void 0, void 0, 1)], 16, _hoisted_2)]),
768
+ _: 3
769
+ }, 8, ["is-open", "label"])) : (openBlock(), createBlock(Teleport, {
770
+ key: 1,
771
+ to: "body"
772
+ }, [createVNode(Transition, {
726
773
  name: "astryx-dropdown-menu",
727
774
  persisted: ""
728
775
  }, {
@@ -742,11 +789,11 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
742
789
  }), [__props.items != null ? (openBlock(), createBlock(unref(DropdownMenuItems), {
743
790
  key: 0,
744
791
  items: __props.items
745
- }, null, 8, ["items"])) : renderSlot(_ctx.$slots, "default", {}, void 0, void 0, 1)], 16, _hoisted_2), [[vShow, isOpen.value]])]),
792
+ }, null, 8, ["items"])) : renderSlot(_ctx.$slots, "default", {}, void 0, void 0, 1)], 16, _hoisted_3), [[vShow, isOpen.value]])]),
746
793
  _: 3
747
794
  })]))], 64);
748
795
  };
749
796
  }
750
797
  });
751
798
  //#endregion
752
- export { useDropdownMenuContext as a, _sfc_main$4 as i, _sfc_main$1 as n, _sfc_main$2 as r, _sfc_main as t };
799
+ export { _sfc_main$4 as a, useDropdownMenuContext as c, _sfc_main$2 as i, useMenuFocus as n, MENU_ITEM_ROLES as o, _sfc_main$1 as r, activateMenuItem as s, _sfc_main as t };