@astryx-vue/core 0.1.0 → 0.1.3

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 (280) hide show
  1. package/README.md +1 -1
  2. package/dist/AppShell/index.d.ts +2 -0
  3. package/dist/AppShell/index.js +2 -0
  4. package/dist/AppShell-b0PWt9Fz.js +249 -0
  5. package/dist/AspectRatio/index.d.ts +2 -0
  6. package/dist/AspectRatio/index.js +2 -0
  7. package/dist/AspectRatio-Bij7e-tq.js +40 -0
  8. package/dist/AvatarGroup/index.d.ts +1 -1
  9. package/dist/Banner/index.d.ts +1 -1
  10. package/dist/BottomSheet/index.d.ts +1 -1
  11. package/dist/Button/index.d.ts +1 -1
  12. package/dist/ButtonGroup/index.d.ts +1 -1
  13. package/dist/Calendar/index.js +1 -1
  14. package/dist/{Calendar-DpYFXwgb.js → Calendar-CYhGDT6f.js} +2 -1
  15. package/dist/Chat/index.js +1 -1
  16. package/dist/{Chat-Bfd-YPAK.js → Chat-C1aWl5V3.js} +2 -2
  17. package/dist/CheckboxInput/index.d.ts +1 -1
  18. package/dist/CheckboxInput/index.js +1 -1
  19. package/dist/{CheckboxInput-C86o3XoG.js → CheckboxInput-CMsEE1_4.js} +4 -2
  20. package/dist/CheckboxList/index.d.ts +2 -0
  21. package/dist/CheckboxList/index.js +2 -0
  22. package/dist/CheckboxList-EsIEXjK_.js +174 -0
  23. package/dist/Citation/index.js +1 -1
  24. package/dist/{Citation-DaDd1teb.js → Citation-C1X0Rde8.js} +2 -2
  25. package/dist/ClickableCard/index.d.ts +2 -0
  26. package/dist/ClickableCard/index.js +2 -0
  27. package/dist/ClickableCard-Bhds4RRe.js +112 -0
  28. package/dist/Code/index.js +1 -1
  29. package/dist/{CodeBlock-CK-NWM_1.js → CodeBlock-BQdooQy2.js} +1 -1
  30. package/dist/Collapsible/index.d.ts +2 -2
  31. package/dist/Collapsible/index.js +2 -2
  32. package/dist/Collapsible-BS9ctCQV.js +192 -0
  33. package/dist/CommandPalette/index.d.ts +2 -0
  34. package/dist/CommandPalette/index.js +2 -0
  35. package/dist/CommandPalette-u5h_E05P.js +489 -0
  36. package/dist/ComplexSelector/index.d.ts +2 -0
  37. package/dist/ComplexSelector/index.js +2 -0
  38. package/dist/ComplexSelector-BHmGWml0.js +293 -0
  39. package/dist/ContextMenu/index.d.ts +1 -1
  40. package/dist/ContextMenu/index.js +1 -1
  41. package/dist/{ContextMenu-BJh99Exj.js → ContextMenu-dA-ppaRQ.js} +284 -12
  42. package/dist/DateInput/index.d.ts +1 -1
  43. package/dist/DateInput/index.js +1 -1
  44. package/dist/{DateInput-zJAdXByM.js → DateInput-D2ErjXYO.js} +18 -10
  45. package/dist/DateRangeInput/index.d.ts +2 -0
  46. package/dist/DateRangeInput/index.js +2 -0
  47. package/dist/DateRangeInput-fmQlr_A7.js +385 -0
  48. package/dist/DateTimeInput/index.d.ts +2 -0
  49. package/dist/DateTimeInput/index.js +2 -0
  50. package/dist/DateTimeInput-Bs1JmcIp.js +196 -0
  51. package/dist/Divider/index.d.ts +1 -1
  52. package/dist/DropdownMenu/index.d.ts +1 -1
  53. package/dist/DropdownMenu/index.js +1 -1
  54. package/dist/{DropdownMenu-C3j2zaEn.js → DropdownMenu-B0gogrvG.js} +2 -2
  55. package/dist/Field/index.d.ts +2 -2
  56. package/dist/Field/index.js +3 -4
  57. package/dist/{Field-VlTBsIEo.js → Field-8zRxzDHE.js} +11 -3
  58. package/dist/{FieldLabel-B1NRyQlS.js → FieldLabel-DmmJyX7w.js} +6 -1
  59. package/dist/FieldStatus/index.d.ts +2 -0
  60. package/dist/FieldStatus/index.js +2 -0
  61. package/dist/FileInput/index.d.ts +2 -0
  62. package/dist/FileInput/index.js +2 -0
  63. package/dist/FileInput-CmAfOpkA.js +238 -0
  64. package/dist/FormLayout/index.d.ts +2 -0
  65. package/dist/FormLayout/index.js +2 -0
  66. package/dist/FormLayout-D47FjiOq.js +40 -0
  67. package/dist/HoverCard/index.d.ts +1 -1
  68. package/dist/{Icon-B6qNgBP9.js → Icon-5MdZQ18k.js} +10 -2
  69. package/dist/Layout/index.d.ts +2 -0
  70. package/dist/Layout/index.js +3 -0
  71. package/dist/Layout-Bed3kP0M.js +56 -0
  72. package/dist/LayoutPanel-C34uOq3e.js +358 -0
  73. package/dist/List/index.d.ts +1 -1
  74. package/dist/Markdown/index.d.ts +1 -1
  75. package/dist/Markdown/index.js +1 -1
  76. package/dist/{Markdown-DyKIwAL_.js → Markdown-CwtLr3f_.js} +2 -2
  77. package/dist/MetadataList/index.d.ts +2 -0
  78. package/dist/MetadataList/index.js +2 -0
  79. package/dist/MetadataList-DlXQTLog.js +124 -0
  80. package/dist/MobileNav/index.d.ts +1 -1
  81. package/dist/MobileNav/index.js +1 -1
  82. package/dist/{MobileNavToggle-BK2iRJF-.js → MobileNavToggle-CgQamG6E.js} +19 -12
  83. package/dist/MoreMenu/index.d.ts +1 -1
  84. package/dist/MoreMenu/index.js +1 -1
  85. package/dist/{MoreMenu-BjUsVWWk.js → MoreMenu-BXL6Dqsu.js} +2 -2
  86. package/dist/MultiSelector/index.d.ts +1 -1
  87. package/dist/MultiSelector/index.js +1 -1
  88. package/dist/{MultiSelector-CKTbTj1A.js → MultiSelector-DT8ZccMI.js} +3 -3
  89. package/dist/NavItem/index.d.ts +1 -1
  90. package/dist/NavMenu/index.d.ts +1 -1
  91. package/dist/NumberInput/index.d.ts +1 -1
  92. package/dist/NumberInput/index.js +1 -1
  93. package/dist/{NumberInput-DU3_rw7z.js → NumberInput-DspJO6z6.js} +1 -1
  94. package/dist/OverflowList/index.d.ts +1 -1
  95. package/dist/OverflowList/index.js +1 -1
  96. package/dist/{OverflowList-B2T5UtiQ.js → OverflowList-zXg3g6fy.js} +1 -1
  97. package/dist/Overlay/index.d.ts +1 -1
  98. package/dist/Pagination/index.js +1 -1
  99. package/dist/{Pagination-qCgNwwhr.js → Pagination-DXfgMUKJ.js} +2 -2
  100. package/dist/Popover/index.d.ts +2 -1
  101. package/dist/Radio/index.d.ts +2 -2
  102. package/dist/Radio/index.js +2 -2
  103. package/dist/{Radio-BioQfwHQ.js → RadioGroup-BqjdSCfJ.js} +21 -88
  104. package/dist/RadioList/index.d.ts +2 -0
  105. package/dist/RadioList/index.js +2 -0
  106. package/dist/RadioList-DI8ujXcT.js +122 -0
  107. package/dist/Resizable/index.d.ts +2 -0
  108. package/dist/Resizable/index.js +2 -0
  109. package/dist/Resizable-BuGKvU9I.js +261 -0
  110. package/dist/ScrollableArea/index.d.ts +2 -0
  111. package/dist/ScrollableArea/index.js +2 -0
  112. package/dist/ScrollableArea-DQDYjnxO.js +78 -0
  113. package/dist/Section/index.d.ts +2 -0
  114. package/dist/Section/index.js +2 -0
  115. package/dist/Section-C48Wqfc7.js +68 -0
  116. package/dist/SegmentedControl/index.d.ts +1 -1
  117. package/dist/SelectableCard/index.d.ts +2 -0
  118. package/dist/SelectableCard/index.js +2 -0
  119. package/dist/SelectableCard-Bj5s_tIN.js +108 -0
  120. package/dist/Selector/index.d.ts +1 -1
  121. package/dist/Selector/index.js +1 -1
  122. package/dist/{Selector-C6sPJMtH.js → Selector-DlZpQh42.js} +1 -1
  123. package/dist/SideNav/index.d.ts +1 -1
  124. package/dist/SideNav/index.js +2 -1
  125. package/dist/{SideNav-D9lnn-sM.js → SideNav-Cdrigq2A.js} +49 -27
  126. package/dist/Slider/index.js +1 -1
  127. package/dist/{Slider-DTnWxtnb.js → Slider-D8h_RKcF.js} +1 -1
  128. package/dist/Stack/index.d.ts +1 -1
  129. package/dist/Stepper/index.d.ts +2 -0
  130. package/dist/Stepper/index.js +2 -0
  131. package/dist/Stepper-DxmLfh8O.js +423 -0
  132. package/dist/Switch/index.d.ts +1 -1
  133. package/dist/Switch/index.js +1 -1
  134. package/dist/{Switch-CNdnr5TP.js → Switch-SesQzPGZ.js} +4 -2
  135. package/dist/TabList/index.d.ts +2 -2
  136. package/dist/TabList/index.js +2 -2
  137. package/dist/TabList-C411uNQU.js +380 -0
  138. package/dist/Table/index.d.ts +3 -0
  139. package/dist/Table/index.js +2 -0
  140. package/dist/Table-7qRmlIQd.js +967 -0
  141. package/dist/Text/index.d.ts +1 -1
  142. package/dist/TextArea/index.d.ts +1 -1
  143. package/dist/TextArea/index.js +1 -1
  144. package/dist/{TextArea-BL0NuB99.js → TextArea-Cv9UVbzS.js} +5 -3
  145. package/dist/TextInput/index.d.ts +1 -1
  146. package/dist/TextInput/index.js +1 -1
  147. package/dist/{TextInput-B0IKC7g5.js → TextInput-BasnjVvy.js} +5 -3
  148. package/dist/Thumbnail/index.d.ts +2 -0
  149. package/dist/Thumbnail/index.js +2 -0
  150. package/dist/Thumbnail-BWVzLLyI.js +163 -0
  151. package/dist/TimeField-l3QzU6vC.js +214 -0
  152. package/dist/TimeInput/index.d.ts +2 -0
  153. package/dist/TimeInput/index.js +2 -0
  154. package/dist/TimeInput-OkgX-xbQ.js +121 -0
  155. package/dist/Timestamp/index.d.ts +2 -0
  156. package/dist/Timestamp/index.js +2 -0
  157. package/dist/Timestamp-DUoP9ari.js +465 -0
  158. package/dist/ToggleButton/index.d.ts +1 -1
  159. package/dist/Token/index.js +1 -1
  160. package/dist/{Token-Ctf9jekS.js → Token-C4KD0fZD.js} +1 -1
  161. package/dist/Tokenizer/index.d.ts +1 -1
  162. package/dist/Tokenizer/index.js +1 -1
  163. package/dist/{Tokenizer-D5MPgau0.js → Tokenizer-BA8sTMPZ.js} +3 -3
  164. package/dist/Toolbar/index.d.ts +1 -1
  165. package/dist/Tooltip/index.d.ts +1 -1
  166. package/dist/TopNav/index.d.ts +1 -1
  167. package/dist/TopNav/index.js +1 -1
  168. package/dist/{TopNav-CjbMCbkC.js → TopNav-CZokS7E_.js} +57 -31
  169. package/dist/TreeList/index.d.ts +2 -0
  170. package/dist/TreeList/index.js +2 -0
  171. package/dist/TreeList-CIbAGOMf.js +506 -0
  172. package/dist/Typeahead/index.d.ts +1 -1
  173. package/dist/Typeahead/index.js +1 -1
  174. package/dist/{Typeahead-BMoU3hfx.js → Typeahead-DIw-K4aa.js} +3 -3
  175. package/dist/composables/index.d.ts +3 -2
  176. package/dist/composables/index.js +8 -2
  177. package/dist/composables-CVfjp9h4.js +502 -0
  178. package/dist/context-BjNya0v8.js +19 -0
  179. package/dist/context-Cfjh8te1.js +29 -0
  180. package/dist/{locale-56lkR7OK.js → context-D6ECRdc5.js} +267 -18
  181. package/dist/index-1uRMrk63.d.ts +54 -0
  182. package/dist/{index-Dw21t7Uf.d.ts → index-2u4l3wq8.d.ts} +2 -2
  183. package/dist/{index-CvLlWLIZ.d.ts → index-B4OOtNP8.d.ts} +4 -4
  184. package/dist/{index-_1-uvr27.d.ts → index-B8MbfMwV.d.ts} +1 -1
  185. package/dist/{index-MPcg1Pm4.d.ts → index-BKr7yvVv.d.ts} +1 -1
  186. package/dist/index-Be1czg3M.d.ts +167 -0
  187. package/dist/{index-Dbmgcm8a.d.ts → index-BeR-1LgF.d.ts} +2 -0
  188. package/dist/{index-CnVbMebA.d.ts → index-Bqb_Fyju.d.ts} +3 -3
  189. package/dist/index-BrJzFA5X.d.ts +38 -0
  190. package/dist/{index-BDZCJ9ri.d.ts → index-BuubzuE8.d.ts} +2 -2
  191. package/dist/index-By2mSzUA.d.ts +67 -0
  192. package/dist/{index-HV6W3xCx.d.ts → index-Byar3h1e.d.ts} +1 -1
  193. package/dist/{index-BQuN_dWR.d.ts → index-BzqRns96.d.ts} +1 -1
  194. package/dist/{index-BkIgRYGz.d.ts → index-C5p2NeCr.d.ts} +2 -2
  195. package/dist/{index-Cc2HGODZ.d.ts → index-C6RecznD.d.ts} +3 -3
  196. package/dist/{index-BSRk8MFK.d.ts → index-C8wDPDcP.d.ts} +1 -1
  197. package/dist/index-CDdRQQF3.d.ts +170 -0
  198. package/dist/index-COqjznX0.d.ts +47 -0
  199. package/dist/{index-Cz9ZHVf6.d.ts → index-CT8KEpec.d.ts} +2 -2
  200. package/dist/{index-CxspvLBl.d.ts → index-CTolyeii.d.ts} +1 -1
  201. package/dist/index-CVn0GBdB.d.ts +115 -0
  202. package/dist/index-CX97hlld.d.ts +158 -0
  203. package/dist/index-C_2Z65Rp.d.ts +67 -0
  204. package/dist/index-CjtAH60j.d.ts +38 -0
  205. package/dist/index-CtlkhQ55.d.ts +36 -0
  206. package/dist/{index-JeZ0YTyd.d.ts → index-D-ZuubCK.d.ts} +4 -4
  207. package/dist/index-DA52oIdw.d.ts +171 -0
  208. package/dist/{index-C8NW9xre.d.ts → index-DGNqi2za.d.ts} +7 -7
  209. package/dist/{index-CCA4R0Mf.d.ts → index-DT9S92sh.d.ts} +31 -6
  210. package/dist/index-DXSs3rwa.d.ts +252 -0
  211. package/dist/{index-C0S2Xzoi.d.ts → index-DYChvBOM.d.ts} +135 -0
  212. package/dist/index-Da7Jm8Ht.d.ts +10 -0
  213. package/dist/{index-CaHXYQ_E.d.ts → index-Df2YvC8o.d.ts} +717 -147
  214. package/dist/{index-DjOdQv5B.d.ts → index-DfgHJE7H.d.ts} +1 -1
  215. package/dist/{index-CPhDtlv-.d.ts → index-FEy8qFSD.d.ts} +3 -3
  216. package/dist/{index-DBcbfStA.d.ts → index-SMh42NI8.d.ts} +182 -2
  217. package/dist/{index-Cdi82rTW.d.ts → index-ZJyk8RtQ.d.ts} +6 -2
  218. package/dist/{index-BeJqhW4l.d.ts → index-fa72tWIU.d.ts} +3 -3
  219. package/dist/{index-COxy6LEW.d.ts → index-gW0HW02U.d.ts} +1 -1
  220. package/dist/{index-BQa836Vz.d.ts → index-iBLzInje.d.ts} +6 -14
  221. package/dist/{index-BhYFxnjV.d.ts → index-kaKBOZSU.d.ts} +2 -2
  222. package/dist/index-nKlTsNfV.d.ts +42 -0
  223. package/dist/index-utZGF4GR.d.ts +79 -0
  224. package/dist/index.d.ts +76 -59
  225. package/dist/index.js +119 -78
  226. package/dist/locale/index.d.ts +1 -1
  227. package/dist/locale/index.js +2 -1
  228. package/dist/locale-Cpk_nrLA.js +18 -0
  229. package/dist/size-BuTzpgnR.d.ts +14 -0
  230. package/dist/size-xcIqExkS.js +79 -0
  231. package/dist/{index-Cp0NlzQv.d.ts → types-Db3Owy8Q.d.ts} +1 -36
  232. package/dist/types-JktRxujg.d.ts +107 -0
  233. package/dist/useAppShellMobile-DTsyuAJ4.js +19 -0
  234. package/dist/useClickableContainer-DyNpnSEa.js +112 -0
  235. package/dist/useFileSelection-BPtaegqK.js +58 -0
  236. package/dist/useMonthGrid-CmJsZTcB.js +139 -0
  237. package/dist/useResizable-CeESZS1v.d.ts +72 -0
  238. package/dist/useScrollableArea-DDk_CluT.js +172 -0
  239. package/dist/useTimeValue-DWk6oTAZ.js +113 -0
  240. package/package.json +97 -1
  241. package/styles/app-shell.css +151 -0
  242. package/styles/aspect-ratio.css +49 -0
  243. package/styles/bordered-control.css +87 -0
  244. package/styles/calendar.css +8 -2
  245. package/styles/card.css +5 -1
  246. package/styles/checkbox-list.css +15 -0
  247. package/styles/clickable-card.css +101 -0
  248. package/styles/collapsible.css +37 -0
  249. package/styles/command-palette.css +183 -0
  250. package/styles/complex-selector.css +114 -0
  251. package/styles/date-range-input.css +163 -0
  252. package/styles/date-time-input.css +40 -0
  253. package/styles/field.css +14 -3
  254. package/styles/file-input.css +87 -0
  255. package/styles/form-layout.css +31 -0
  256. package/styles/heading.css +19 -17
  257. package/styles/icon.css +32 -0
  258. package/styles/layout.css +280 -0
  259. package/styles/metadata-list.css +107 -0
  260. package/styles/number-input.css +6 -0
  261. package/styles/radio.css +32 -0
  262. package/styles/resize-handle.css +128 -0
  263. package/styles/scrollable-area.css +50 -0
  264. package/styles/section.css +60 -0
  265. package/styles/selector.css +10 -0
  266. package/styles/side-nav.css +26 -0
  267. package/styles/stepper.css +357 -0
  268. package/styles/tab-menu.css +91 -0
  269. package/styles/table.css +256 -0
  270. package/styles/text-area.css +6 -1
  271. package/styles/text-input.css +6 -0
  272. package/styles/thumbnail.css +151 -0
  273. package/styles/time-input.css +51 -0
  274. package/styles/timestamp.css +93 -0
  275. package/styles/tree-list.css +229 -0
  276. package/styles.css +23 -0
  277. package/dist/Collapsible-ByXCGhT8.js +0 -102
  278. package/dist/TabList-LV1U4ZD6.js +0 -184
  279. package/dist/composables-Dq9RS33w.js +0 -111
  280. package/dist/index-TnaIHsCS.d.ts +0 -87
@@ -0,0 +1,261 @@
1
+ import { a as useAstryxMessages } from "./context-D6ECRdc5.js";
2
+ import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, defineComponent, mergeProps, normalizeStyle, onBeforeUnmount, openBlock, ref, renderSlot, useAttrs, useTemplateRef } from "vue";
3
+ import "../styles/resize-handle.css";
4
+ //#region src/Resizable/ResizeHandle.vue
5
+ const _hoisted_1 = [
6
+ "aria-orientation",
7
+ "aria-valuenow",
8
+ "aria-valuemin",
9
+ "aria-valuemax",
10
+ "aria-valuetext",
11
+ "aria-label",
12
+ "aria-disabled",
13
+ "tabindex",
14
+ "data-direction",
15
+ "data-position",
16
+ "data-divider",
17
+ "data-disabled",
18
+ "data-active",
19
+ "data-resizing"
20
+ ];
21
+ const _hoisted_2 = ["data-hidden"];
22
+ const _sfc_main = /*@__PURE__*/ defineComponent({
23
+ name: "AstryxResizeHandle",
24
+ inheritAttrs: false,
25
+ __name: "ResizeHandle",
26
+ props: {
27
+ direction: { default: "horizontal" },
28
+ position: { default: "inline" },
29
+ isReversed: {
30
+ type: Boolean,
31
+ default: false
32
+ },
33
+ isDisabled: {
34
+ type: Boolean,
35
+ default: false
36
+ },
37
+ hasDivider: {
38
+ type: Boolean,
39
+ default: false
40
+ },
41
+ isAlwaysVisible: {
42
+ type: Boolean,
43
+ default: true
44
+ },
45
+ pillPlacement: { default: "auto" },
46
+ label: {},
47
+ resizable: {}
48
+ },
49
+ setup(__props, { expose: __expose }) {
50
+ const props = __props;
51
+ const attrs = useAttrs();
52
+ const messages = useAstryxMessages();
53
+ const root = useTemplateRef("root");
54
+ const dragging = ref(false);
55
+ const hovered = ref(false);
56
+ const focused = ref(false);
57
+ let drag = null;
58
+ __expose({ element: root });
59
+ const label = computed(() => props.label || messages.value.layout.resizeHandle);
60
+ const sign = computed(() => props.isReversed ? -1 : 1);
61
+ const collapsed = computed(() => props.resizable?._isCollapsed ?? false);
62
+ const active = computed(() => hovered.value || focused.value || dragging.value);
63
+ const pillSide = computed(() => resolveSide(props.pillPlacement, props.isReversed, collapsed.value));
64
+ const forwardedAttrs = computed(() => Object.fromEntries(Object.entries(attrs).filter(([key]) => key !== "class" && key !== "style" && key !== "onKeydown")));
65
+ const rootClass = computed(() => ["astryx-resize-handle", attrs.class]);
66
+ const rootStyle = computed(() => attrs.style);
67
+ const ariaNow = computed(() => {
68
+ const resizable = props.resizable;
69
+ if (resizable == null) return void 0;
70
+ return collapsed.value ? Math.max(resizable._size, resizable._minSizePx) : resizable._size;
71
+ });
72
+ const ariaMax = computed(() => {
73
+ const max = props.resizable?._maxSizePx;
74
+ return max != null && max !== Number.POSITIVE_INFINITY ? max : void 0;
75
+ });
76
+ const ariaText = computed(() => collapsed.value && props.resizable ? messages.value.layout.collapsed : void 0);
77
+ const pillStyle = computed(() => offsetStyle(props.direction, pillSide.value, true));
78
+ const hitStyle = computed(() => offsetStyle(props.direction, pillSide.value, false));
79
+ function resolveSide(placement, reversed, isCollapsed) {
80
+ if (placement !== "auto") return placement;
81
+ const panelSide = reversed ? "end" : "start";
82
+ if (isCollapsed) return panelSide === "start" ? "end" : "start";
83
+ return panelSide;
84
+ }
85
+ function offsetStyle(direction, side, pill) {
86
+ const dir = side === "center" ? 0 : side === "start" ? -1 : 1;
87
+ const gap = "var(--astryx-spacing-1, 4px)";
88
+ if (direction === "horizontal") {
89
+ if (side === "center") return {
90
+ insetInlineStart: "50%",
91
+ transform: "translateX(-50%)"
92
+ };
93
+ if (pill) return {
94
+ insetInlineStart: "0",
95
+ transform: `translate(calc(${dir} * (100% + ${gap})), -50%)`
96
+ };
97
+ return {
98
+ insetInlineStart: "0",
99
+ transform: `translateX(calc(${dir} * (3px + ${gap}) - 6.5px))`
100
+ };
101
+ }
102
+ if (side === "center") return {
103
+ insetBlockStart: "50%",
104
+ transform: "translateY(-50%)"
105
+ };
106
+ if (pill) return {
107
+ top: "0",
108
+ transform: `translate(-50%, calc(${dir} * (100% + ${gap})))`
109
+ };
110
+ return {
111
+ insetBlockStart: "0",
112
+ transform: `translateY(calc(${dir} * (3px + ${gap}) - 6.5px))`
113
+ };
114
+ }
115
+ function rtlMultiplier() {
116
+ if (props.direction !== "horizontal" || root.value == null) return 1;
117
+ return getComputedStyle(root.value).direction === "rtl" ? -1 : 1;
118
+ }
119
+ function clearDrag() {
120
+ drag = null;
121
+ dragging.value = false;
122
+ document.body.style.cursor = "";
123
+ document.body.style.userSelect = "";
124
+ }
125
+ let frame = 0;
126
+ let pendingDelta = 0;
127
+ function flushMove() {
128
+ if (frame) {
129
+ cancelAnimationFrame(frame);
130
+ frame = 0;
131
+ }
132
+ props.resizable?._onResizeMove(pendingDelta);
133
+ }
134
+ function pointerDown(event) {
135
+ if (props.isDisabled || props.resizable == null || drag) return;
136
+ event.preventDefault();
137
+ event.stopPropagation();
138
+ const target = event.currentTarget;
139
+ if (target instanceof HTMLElement) target.setPointerCapture?.(event.pointerId);
140
+ drag = {
141
+ pointerId: event.pointerId,
142
+ start: props.direction === "horizontal" ? event.clientX : event.clientY,
143
+ rtl: rtlMultiplier()
144
+ };
145
+ dragging.value = true;
146
+ pendingDelta = 0;
147
+ document.body.style.cursor = props.direction === "horizontal" ? "col-resize" : "row-resize";
148
+ document.body.style.userSelect = "none";
149
+ props.resizable._onResizeStart();
150
+ }
151
+ function pointerMove(event) {
152
+ if (drag == null || drag.pointerId !== event.pointerId || props.resizable == null) return;
153
+ pendingDelta = ((props.direction === "horizontal" ? event.clientX : event.clientY) - drag.start) * drag.rtl * sign.value;
154
+ if (frame) return;
155
+ frame = requestAnimationFrame(() => {
156
+ frame = 0;
157
+ props.resizable?._onResizeMove(pendingDelta);
158
+ });
159
+ }
160
+ function pointerUp(event) {
161
+ if (drag?.pointerId !== event.pointerId) return;
162
+ flushMove();
163
+ clearDrag();
164
+ props.resizable?._onResizeEnd();
165
+ }
166
+ function pointerCancel(event) {
167
+ if (drag?.pointerId !== event.pointerId) return;
168
+ if (frame) {
169
+ cancelAnimationFrame(frame);
170
+ frame = 0;
171
+ }
172
+ clearDrag();
173
+ props.resizable?._onResizeCancel?.();
174
+ }
175
+ function keydown(event) {
176
+ const resizable = props.resizable;
177
+ if (props.isDisabled || resizable == null) return;
178
+ const step = event.shiftKey ? 50 : 10;
179
+ const rtl = rtlMultiplier();
180
+ const move = (delta) => {
181
+ resizable._onResizeStart();
182
+ resizable._onResizeMove(delta);
183
+ resizable._onResizeEnd();
184
+ };
185
+ if (event.key === "ArrowRight" || event.key === "ArrowDown") {
186
+ event.preventDefault();
187
+ move(step * rtl * sign.value);
188
+ } else if (event.key === "ArrowLeft" || event.key === "ArrowUp") {
189
+ event.preventDefault();
190
+ move(-step * rtl * sign.value);
191
+ } else if (event.key === "Home") {
192
+ event.preventDefault();
193
+ move(resizable._minSizePx - resizable._size);
194
+ } else if (event.key === "End" && resizable._maxSizePx !== Number.POSITIVE_INFINITY) {
195
+ event.preventDefault();
196
+ move(resizable._maxSizePx - resizable._size);
197
+ } else if (event.key === "Enter" && resizable._collapsible) {
198
+ event.preventDefault();
199
+ move(resizable._isCollapsed ? resizable._minSizePx : -resizable._size);
200
+ }
201
+ }
202
+ function doubleClick() {
203
+ const resizable = props.resizable;
204
+ if (props.isDisabled || resizable == null || !resizable._collapsible) return;
205
+ resizable._onResizeStart();
206
+ resizable._onResizeMove(resizable._isCollapsed ? resizable._minSizePx : -resizable._size);
207
+ resizable._onResizeEnd();
208
+ }
209
+ onBeforeUnmount(() => {
210
+ if (frame) {
211
+ cancelAnimationFrame(frame);
212
+ frame = 0;
213
+ }
214
+ if (drag) clearDrag();
215
+ });
216
+ return (_ctx, _cache) => {
217
+ return openBlock(), createElementBlock(Fragment, null, [createCommentVNode(" eslint-disable-next-line vue-a11y/no-static-element-interactions -- role=separator 加 tabindex 就是键盘控件;方向键、Home、End、Enter 都在这个元素上。 "), createElementVNode("div", mergeProps({
218
+ ref_key: "root",
219
+ ref: root
220
+ }, forwardedAttrs.value, {
221
+ class: rootClass.value,
222
+ style: rootStyle.value,
223
+ role: "separator",
224
+ "aria-orientation": __props.direction === "horizontal" ? "vertical" : "horizontal",
225
+ "aria-valuenow": ariaNow.value,
226
+ "aria-valuemin": __props.resizable?._minSizePx,
227
+ "aria-valuemax": ariaMax.value,
228
+ "aria-valuetext": ariaText.value,
229
+ "aria-label": label.value,
230
+ "aria-disabled": __props.isDisabled || void 0,
231
+ tabindex: __props.isDisabled ? -1 : 0,
232
+ "data-direction": __props.direction,
233
+ "data-position": __props.position,
234
+ "data-divider": __props.hasDivider || void 0,
235
+ "data-disabled": __props.isDisabled || void 0,
236
+ "data-active": active.value || void 0,
237
+ "data-resizing": dragging.value || void 0,
238
+ onKeydown: keydown,
239
+ onDblclick: doubleClick,
240
+ onFocus: _cache[2] || (_cache[2] = ($event) => focused.value = true),
241
+ onBlur: _cache[3] || (_cache[3] = ($event) => focused.value = false)
242
+ }), [createElementVNode("div", {
243
+ class: "astryx-resize-handle__hit",
244
+ style: normalizeStyle(hitStyle.value),
245
+ onPointerdown: pointerDown,
246
+ onPointermove: pointerMove,
247
+ onPointerup: pointerUp,
248
+ onPointercancel: pointerCancel,
249
+ onLostpointercapture: pointerCancel,
250
+ onPointerenter: _cache[0] || (_cache[0] = ($event) => hovered.value = true),
251
+ onPointerleave: _cache[1] || (_cache[1] = ($event) => hovered.value = dragging.value)
252
+ }, null, 36), renderSlot(_ctx.$slots, "default", {}, () => [createElementVNode("div", {
253
+ class: "astryx-resize-handle-pill",
254
+ "data-hidden": __props.isAlwaysVisible ? void 0 : true,
255
+ style: normalizeStyle(pillStyle.value)
256
+ }, null, 12, _hoisted_2)])], 16, _hoisted_1)], 2112);
257
+ };
258
+ }
259
+ });
260
+ //#endregion
261
+ export { _sfc_main as t };
@@ -0,0 +1,2 @@
1
+ import { in as ScrollableAreaSlots, nn as _default, rn as ScrollableAreaProps } from "../index-Df2YvC8o.js";
2
+ export { _default as ScrollableArea, type ScrollableAreaProps, type ScrollableAreaSlots };
@@ -0,0 +1,2 @@
1
+ import { t as _sfc_main } from "../ScrollableArea-DQDYjnxO.js";
2
+ export { _sfc_main as ScrollableArea };
@@ -0,0 +1,78 @@
1
+ import { t as useScrollableArea } from "./useScrollableArea-DDk_CluT.js";
2
+ import { i as spacingVariable, n as resolvePadding, t as formatSize } from "./size-xcIqExkS.js";
3
+ import { computed, createElementBlock, createElementVNode, defineComponent, mergeProps, normalizeStyle, openBlock, renderSlot, unref, useAttrs } from "vue";
4
+ import "../styles/scrollable-area.css";
5
+ //#region src/ScrollableArea/ScrollableArea.vue
6
+ const _hoisted_1 = ["data-axis", "data-full-bleed"];
7
+ const _sfc_main = /*@__PURE__*/ defineComponent({
8
+ name: "AstryxScrollableArea",
9
+ inheritAttrs: false,
10
+ __name: "ScrollableArea",
11
+ props: {
12
+ axis: { default: "block" },
13
+ label: {},
14
+ role: { default: "group" },
15
+ overscroll: { default: "allow" },
16
+ width: {},
17
+ height: {},
18
+ maxWidth: {},
19
+ minHeight: {},
20
+ stickyContainment: { default: "whenScrollable" },
21
+ isFullBleed: {
22
+ type: Boolean,
23
+ default: false
24
+ },
25
+ padding: { default: 0 },
26
+ paddingInline: {},
27
+ paddingInlineStart: {},
28
+ paddingInlineEnd: {},
29
+ paddingBlock: {},
30
+ paddingBlockStart: {},
31
+ paddingBlockEnd: {}
32
+ },
33
+ setup(__props) {
34
+ const props = __props;
35
+ const attrs = useAttrs();
36
+ const scroll = useScrollableArea(props);
37
+ const forwardedAttrs = computed(() => Object.fromEntries(Object.entries(attrs).filter(([key]) => key !== "class" && key !== "style")));
38
+ const rootClass = computed(() => ["astryx-scrollable-area", attrs.class]);
39
+ const rootStyle = computed(() => [
40
+ attrs.style,
41
+ {
42
+ width: formatSize(props.width),
43
+ height: formatSize(props.height),
44
+ maxWidth: formatSize(props.maxWidth),
45
+ minHeight: formatSize(props.minHeight)
46
+ },
47
+ scroll.viewportStyle.value
48
+ ]);
49
+ const contentStyle = computed(() => {
50
+ const padding = resolvePadding(props, props.padding ?? 0);
51
+ if (padding == null) return {};
52
+ return {
53
+ "--_pad-inline-start": spacingVariable(padding.inlineStart),
54
+ "--_pad-inline-end": spacingVariable(padding.inlineEnd),
55
+ "--_pad-block-start": spacingVariable(padding.blockStart),
56
+ "--_pad-block-end": spacingVariable(padding.blockEnd)
57
+ };
58
+ });
59
+ return (_ctx, _cache) => {
60
+ return openBlock(), createElementBlock("div", mergeProps({ ref: unref(scroll).viewport }, {
61
+ ...forwardedAttrs.value,
62
+ ...unref(scroll).viewportAttrs.value
63
+ }, {
64
+ class: rootClass.value,
65
+ style: rootStyle.value,
66
+ "data-axis": __props.axis,
67
+ "data-full-bleed": __props.isFullBleed || void 0
68
+ }), [createElementVNode("div", {
69
+ ref: unref(scroll).content,
70
+ class: "astryx-scrollable-area__content",
71
+ "data-scroll-content": "",
72
+ style: normalizeStyle(contentStyle.value)
73
+ }, [renderSlot(_ctx.$slots, "default")], 4)], 16, _hoisted_1);
74
+ };
75
+ }
76
+ });
77
+ //#endregion
78
+ export { _sfc_main as t };
@@ -0,0 +1,2 @@
1
+ import { a as SectionVariant, i as SectionSlots, n as SectionDivider, r as SectionProps, t as _default } from "../index-nKlTsNfV.js";
2
+ export { _default as Section, type SectionDivider, type SectionProps, type SectionSlots, type SectionVariant };
@@ -0,0 +1,2 @@
1
+ import { t as _sfc_main } from "../Section-C48Wqfc7.js";
2
+ export { _sfc_main as Section };
@@ -0,0 +1,68 @@
1
+ import { r as spacingEdgeVars, t as formatSize } from "./size-xcIqExkS.js";
2
+ import { computed, createElementBlock, createElementVNode, defineComponent, mergeProps, normalizeStyle, openBlock, renderSlot, useAttrs, useTemplateRef } from "vue";
3
+ import "../styles/section.css";
4
+ //#region src/Section/Section.vue
5
+ const _hoisted_1 = [
6
+ "data-variant",
7
+ "data-divider-top",
8
+ "data-divider-bottom",
9
+ "data-divider-start",
10
+ "data-divider-end"
11
+ ];
12
+ const _sfc_main = /*@__PURE__*/ defineComponent({
13
+ name: "AstryxSection",
14
+ inheritAttrs: false,
15
+ __name: "Section",
16
+ props: {
17
+ variant: { default: "section" },
18
+ width: {},
19
+ height: {},
20
+ maxWidth: {},
21
+ minHeight: {},
22
+ dividers: {},
23
+ padding: {},
24
+ paddingInline: {},
25
+ paddingInlineStart: {},
26
+ paddingInlineEnd: {},
27
+ paddingBlock: {},
28
+ paddingBlockStart: {},
29
+ paddingBlockEnd: {}
30
+ },
31
+ setup(__props, { expose: __expose }) {
32
+ const props = __props;
33
+ const attrs = useAttrs();
34
+ const root = useTemplateRef("root");
35
+ __expose({ element: root });
36
+ const forwardedAttrs = computed(() => Object.fromEntries(Object.entries(attrs).filter(([key]) => key !== "class" && key !== "style")));
37
+ const rootClass = computed(() => ["astryx-section", attrs.class]);
38
+ const rootStyle = computed(() => [attrs.style, {
39
+ width: formatSize(props.width),
40
+ height: formatSize(props.height),
41
+ maxWidth: formatSize(props.maxWidth),
42
+ minHeight: formatSize(props.minHeight)
43
+ }]);
44
+ const innerStyle = computed(() => spacingEdgeVars("--_section", props));
45
+ function hasDivider(edge) {
46
+ return props.dividers?.includes(edge) ? true : void 0;
47
+ }
48
+ return (_ctx, _cache) => {
49
+ return openBlock(), createElementBlock("div", mergeProps({
50
+ ref_key: "root",
51
+ ref: root
52
+ }, forwardedAttrs.value, {
53
+ class: rootClass.value,
54
+ style: rootStyle.value
55
+ }), [createElementVNode("div", {
56
+ class: "astryx-section__inner",
57
+ "data-variant": __props.variant,
58
+ "data-divider-top": hasDivider("top"),
59
+ "data-divider-bottom": hasDivider("bottom"),
60
+ "data-divider-start": hasDivider("start"),
61
+ "data-divider-end": hasDivider("end"),
62
+ style: normalizeStyle(innerStyle.value)
63
+ }, [renderSlot(_ctx.$slots, "default")], 12, _hoisted_1)], 16);
64
+ };
65
+ }
66
+ });
67
+ //#endregion
68
+ export { _sfc_main as t };
@@ -1,2 +1,2 @@
1
- import { a as SegmentedControlItemProps, c as SegmentedControlProps, i as SegmentedControlEmits, l as SegmentedControlSize, n as _default, o as SegmentedControlItemSlots, r as SegmentedControlContextValue, s as SegmentedControlLayout, t as _default$1, u as SegmentedControlSlots } from "../index-COxy6LEW.js";
1
+ import { a as SegmentedControlItemProps, c as SegmentedControlProps, i as SegmentedControlEmits, l as SegmentedControlSize, n as _default, o as SegmentedControlItemSlots, r as SegmentedControlContextValue, s as SegmentedControlLayout, t as _default$1, u as SegmentedControlSlots } from "../index-gW0HW02U.js";
2
2
  export { _default as SegmentedControl, type SegmentedControlContextValue, type SegmentedControlEmits, _default$1 as SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlItemSlots, type SegmentedControlLayout, type SegmentedControlProps, type SegmentedControlSize, type SegmentedControlSlots };
@@ -0,0 +1,2 @@
1
+ import { $t as SelectableCardEmits, Qt as _default, en as SelectableCardProps, tn as SelectableCardSlots } from "../index-Df2YvC8o.js";
2
+ export { _default as SelectableCard, _default as default, type SelectableCardEmits, type SelectableCardProps, type SelectableCardSlots };
@@ -0,0 +1,2 @@
1
+ import { n as _sfc_main, t as SelectableCard_default } from "../SelectableCard-Bj5s_tIN.js";
2
+ export { _sfc_main as SelectableCard, SelectableCard_default as default };
@@ -0,0 +1,108 @@
1
+ import { t as _sfc_main$1 } from "./VisuallyHidden-C7NN3VEP.js";
2
+ import { n as useClickableContainer } from "./useClickableContainer-DyNpnSEa.js";
3
+ import { t as _sfc_main$2 } from "./Card-HAjZQg2s.js";
4
+ import { computed, createBlock, createVNode, defineComponent, mergeModels, openBlock, renderSlot, useModel, useTemplateRef, withCtx } from "vue";
5
+ import "../styles/clickable-card.css";
6
+ //#region src/SelectableCard/SelectableCard.vue
7
+ const _sfc_main = /*@__PURE__*/ defineComponent({
8
+ name: "AstryxSelectableCard",
9
+ __name: "SelectableCard",
10
+ props: /*@__PURE__*/ mergeModels({
11
+ label: {},
12
+ isSelected: { type: Boolean },
13
+ isDisabled: {
14
+ type: Boolean,
15
+ default: false
16
+ },
17
+ variant: { default: "default" },
18
+ elevation: { default: "none" },
19
+ padding: {},
20
+ width: {},
21
+ height: {},
22
+ maxWidth: {}
23
+ }, {
24
+ "isSelected": {
25
+ type: Boolean,
26
+ required: true
27
+ },
28
+ "isSelectedModifiers": {}
29
+ }),
30
+ emits: /*@__PURE__*/ mergeModels(["change"], ["update:isSelected"]),
31
+ setup(__props, { emit: __emit }) {
32
+ const props = __props;
33
+ const emit = __emit;
34
+ const isSelected = useModel(__props, "isSelected");
35
+ const cardRef = useTemplateRef("card");
36
+ const interactiveRef = useTemplateRef("interactive");
37
+ const containerRef = computed(() => cardRef.value?.element ?? null);
38
+ const controlRef = computed(() => interactiveRef.value?.element ?? null);
39
+ function commit(next) {
40
+ isSelected.value = next;
41
+ emit("change", next);
42
+ }
43
+ const handlers = useClickableContainer({
44
+ containerRef,
45
+ interactiveRef: controlRef,
46
+ get disabled() {
47
+ return props.isDisabled;
48
+ },
49
+ onClick() {
50
+ commit(!isSelected.value);
51
+ }
52
+ });
53
+ function onSurfaceClick(event) {
54
+ if (props.isDisabled) return;
55
+ handlers.onClick(event);
56
+ }
57
+ function onKeyDown(event) {
58
+ if (props.isDisabled || event.key !== "Enter") return;
59
+ event.preventDefault();
60
+ commit(!isSelected.value);
61
+ }
62
+ return (_ctx, _cache) => {
63
+ return openBlock(), createBlock(_sfc_main$2, {
64
+ ref: "card",
65
+ class: "astryx-clickable-card astryx-selectable-card",
66
+ "data-disabled": __props.isDisabled || void 0,
67
+ "data-selected": isSelected.value || void 0,
68
+ elevation: __props.elevation,
69
+ height: __props.height,
70
+ "max-width": __props.maxWidth,
71
+ padding: __props.padding,
72
+ variant: __props.variant,
73
+ width: __props.width,
74
+ onClick: onSurfaceClick
75
+ }, {
76
+ default: withCtx(() => [createVNode(_sfc_main$1, {
77
+ ref: "interactive",
78
+ as: "input",
79
+ "aria-label": __props.label,
80
+ checked: isSelected.value,
81
+ disabled: __props.isDisabled,
82
+ type: "checkbox",
83
+ onChange: _cache[0] || (_cache[0] = ($event) => commit($event.target.checked)),
84
+ onKeydown: onKeyDown
85
+ }, null, 8, [
86
+ "aria-label",
87
+ "checked",
88
+ "disabled"
89
+ ]), renderSlot(_ctx.$slots, "default")]),
90
+ _: 3
91
+ }, 8, [
92
+ "data-disabled",
93
+ "data-selected",
94
+ "elevation",
95
+ "height",
96
+ "max-width",
97
+ "padding",
98
+ "variant",
99
+ "width"
100
+ ]);
101
+ };
102
+ }
103
+ });
104
+ //#endregion
105
+ //#region src/SelectableCard/index.ts
106
+ var SelectableCard_default = _sfc_main;
107
+ //#endregion
108
+ export { _sfc_main as n, SelectableCard_default as t };
@@ -1,2 +1,2 @@
1
- import { a as SelectorSize, i as SelectorProps, n as SelectorEmits, o as SelectorSlots, r as SelectorOption, s as SelectorStatus, t as _default } from "../index-Cc2HGODZ.js";
1
+ import { a as SelectorSize, i as SelectorProps, n as SelectorEmits, o as SelectorSlots, r as SelectorOption, s as SelectorStatus, t as _default } from "../index-C6RecznD.js";
2
2
  export { _default as Selector, type SelectorEmits, type SelectorOption, type SelectorProps, type SelectorSize, type SelectorSlots, type SelectorStatus };
@@ -1,2 +1,2 @@
1
- import { t as _sfc_main } from "../Selector-C6sPJMtH.js";
1
+ import { t as _sfc_main } from "../Selector-DlZpQh42.js";
2
2
  export { _sfc_main as Selector };
@@ -1,6 +1,6 @@
1
1
  import { t as useCombobox } from "./useCombobox-CTo5C-gc.js";
2
2
  import { t as useDismiss } from "./useDismiss-CAiHU6QD.js";
3
- import { a as useAstryxMessages } from "./locale-56lkR7OK.js";
3
+ import { a as useAstryxMessages } from "./context-D6ECRdc5.js";
4
4
  import { t as usePositionedLayer } from "./usePositionedLayer-C1NBOsVT.js";
5
5
  import { Fragment, Teleport, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, nextTick, normalizeClass, normalizeStyle, onMounted, openBlock, ref, renderList, renderSlot, toDisplayString, unref, useId, useSlots, useTemplateRef, vShow, watch, withDirectives, withKeys, withModifiers } from "vue";
6
6
  import "../styles/visually-hidden-utility.css";
@@ -1,2 +1,2 @@
1
- import { At as SideNavItemEmits, Ct as _default$2, Dt as SideNavCollapsible, Et as SideNavCollapseButtonProps, Ft as useSideNavCollapse, Mt as SideNavProps, Nt as SideNavSectionProps, Ot as SideNavEmits, Pt as SideNavCollapseContext, St as _default$3, Tt as _default, jt as SideNavItemProps, kt as SideNavHeadingProps, wt as _default$1, xt as _default$4 } from "../index-CaHXYQ_E.js";
1
+ import { Bt as _default$1, Gt as SideNavHeadingProps, Ht as SideNavCollapseButtonProps, Jt as SideNavProps, Kt as SideNavItemEmits, Lt as _default$4, Rt as _default$3, Ut as SideNavCollapsible, Vt as _default, Wt as SideNavEmits, Xt as SideNavCollapseContext, Yt as SideNavSectionProps, Zt as useSideNavCollapse, qt as SideNavItemProps, zt as _default$2 } from "../index-Df2YvC8o.js";
2
2
  export { _default as SideNav, _default$1 as SideNavCollapseButton, type SideNavCollapseButtonProps, type SideNavCollapseContext, type SideNavCollapsible, type SideNavEmits, _default$2 as SideNavHeading, type SideNavHeadingProps, _default$3 as SideNavItem, type SideNavItemEmits, type SideNavItemProps, type SideNavProps, _default$4 as SideNavSection, type SideNavSectionProps, useSideNavCollapse };
@@ -1,2 +1,3 @@
1
- import { a as _sfc_main$1, i as _sfc_main, n as _sfc_main$3, o as useSideNavCollapse, r as _sfc_main$2, t as _sfc_main$4 } from "../SideNav-D9lnn-sM.js";
1
+ import { r as useSideNavCollapse } from "../context-BjNya0v8.js";
2
+ import { a as _sfc_main$1, i as _sfc_main, n as _sfc_main$3, r as _sfc_main$2, t as _sfc_main$4 } from "../SideNav-Cdrigq2A.js";
2
3
  export { _sfc_main as SideNav, _sfc_main$1 as SideNavCollapseButton, _sfc_main$2 as SideNavHeading, _sfc_main$3 as SideNavItem, _sfc_main$4 as SideNavSection, useSideNavCollapse };