@mkbabb/glass-ui 10.1.3 → 11.0.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 (219) hide show
  1. package/MIGRATION.md +1024 -1461
  2. package/README.md +2 -2
  3. package/dist/DialogContent-DG5kseRQ.js +159 -0
  4. package/dist/DropdownMenuTrigger-uhSXgEfK.js +76 -0
  5. package/dist/{Surface-1nPoabc3.js → Surface-C7wq2j0A.js} +3 -0
  6. package/dist/aurora.css +1 -0
  7. package/dist/aurora.js +246 -2472
  8. package/dist/auroraImageSource-xNLDUjcy.js +30 -0
  9. package/dist/axes.js +8 -8
  10. package/dist/blob.css +1 -0
  11. package/dist/blob.js +57 -54
  12. package/dist/budget-CJfhLIIV.js +13 -0
  13. package/dist/button-CAKhiOZy.js +113 -0
  14. package/dist/button.js +1 -1
  15. package/dist/{card-ByyqRBvK.js → card-D_uXphvL.js} +4 -1
  16. package/dist/card.js +1 -1
  17. package/dist/carousel.js +3 -2
  18. package/dist/{checkbox-B1qn65se.js → checkbox-COLnvULu.js} +1 -0
  19. package/dist/checkbox.css +1 -0
  20. package/dist/checkbox.js +1 -1
  21. package/dist/{collapsible-DFzK29Oh.js → collapsible-Bd4Et730.js} +1 -0
  22. package/dist/collapsible.css +1 -0
  23. package/dist/collapsible.js +1 -1
  24. package/dist/color-HkUaTAJj.js +270 -0
  25. package/dist/{color.glsl-DTJhdekG.js → color.glsl-bFJm8k5R.js} +4 -16
  26. package/dist/color.wgsl-B-qDJ_OM.js +4 -0
  27. package/dist/{command-CatrAsrl.js → command-BsFOGZwB.js} +3 -2
  28. package/dist/command.css +1 -0
  29. package/dist/command.js +1 -1
  30. package/dist/component-styles.css +0 -1
  31. package/dist/components/_shared/axes.d.ts +7 -0
  32. package/dist/components/_shared/feedback/dot-ring.css +1 -1
  33. package/dist/components/_shared/overlay/focus-return.d.ts +9 -0
  34. package/dist/components/_shared/overlay/index.d.ts +3 -0
  35. package/dist/components/_shared/overlay/root-scroll-lock.d.ts +4 -0
  36. package/dist/components/_shared/overlay/sheet-width.d.ts +2 -0
  37. package/dist/components/_shared/shape/useBarShape.d.ts +4 -0
  38. package/dist/components/aurora/composables/auroraFallbackGround.d.ts +12 -0
  39. package/dist/components/aurora/constants/presets.d.ts +21 -0
  40. package/dist/components/aurora/index.d.ts +2 -2
  41. package/dist/components/button/styles.css +1 -1
  42. package/dist/components/dark-mode-toggle/dark-mode-toggle.css +1 -1
  43. package/dist/components/data-table/composables/useDataTableResponsive.d.ts +2 -0
  44. package/dist/components/deck/styles/capture.css +1 -1
  45. package/dist/components/dialog/DialogContent.vue.d.ts +2 -2
  46. package/dist/components/dialog/ModalOverlay.vue.d.ts +2 -2
  47. package/dist/components/dialog/ModalScrim.vue.d.ts +26 -0
  48. package/dist/components/dialog/styles.css +1 -1
  49. package/dist/components/dock/GlassDock.vue.d.ts +4 -1
  50. package/dist/components/dock/composables/useDockClickIntegrity.d.ts +4 -0
  51. package/dist/components/dock/composables/useDockShellProps.d.ts +34 -2
  52. package/dist/components/dock/composables/useDockState.d.ts +5 -0
  53. package/dist/components/dock/index.d.ts +1 -2
  54. package/dist/components/dock/styles/controls/icon-button.css +1 -1
  55. package/dist/components/dock/styles/controls/tab-button.css +1 -1
  56. package/dist/components/dock/styles/morph.css +1 -1
  57. package/dist/components/dock/styles/run.css +1 -1
  58. package/dist/components/dock/trigger.d.ts +1 -0
  59. package/dist/components/expandable-container/ExpandableContainer.vue.d.ts +30 -29
  60. package/dist/components/menu/ContextMenu.vue.d.ts +27 -0
  61. package/dist/components/menu/DropdownMenu.vue.d.ts +5 -23
  62. package/dist/components/menu/context.d.ts +18 -5
  63. package/dist/components/menu/family-click.d.ts +2 -0
  64. package/dist/components/menu/family-context.d.ts +2 -0
  65. package/dist/components/menu/index.d.ts +1 -1
  66. package/dist/components/sheet/SheetContent.vue.d.ts +2 -2
  67. package/dist/components/sortable-list/styles.css +1 -0
  68. package/dist/components/surface/Surface.vue.d.ts +4 -1
  69. package/dist/components/tabs/composables/useTabDragMorph.d.ts +4 -7
  70. package/dist/components/tabs/styles/segmented.css +1 -1
  71. package/dist/components/tabs/types.d.ts +7 -8
  72. package/dist/composables/dom/useResizeObserver.d.ts +3 -1
  73. package/dist/composables/glass/fieldPaint.d.ts +4 -0
  74. package/dist/composables/glass/useGlassBackdropLuminance.d.ts +7 -6
  75. package/dist/composables/glass/webgpu/useGpuSubstrate.d.ts +8 -0
  76. package/dist/composables/motion/core/motionTempo.d.ts +2 -1
  77. package/dist/composables/motion/morph/useDragMorph.d.ts +2 -2
  78. package/dist/composables/motion/morph/useSelectionGroup.d.ts +6 -25
  79. package/dist/composables/motion/morph/useSelectionIndicator.d.ts +8 -54
  80. package/dist/composables/motion/spring/useLiquidFlex.d.ts +3 -5
  81. package/dist/composables/motion/spring/useSpringMount.d.ts +0 -9
  82. package/dist/{configurator-CPxIo3q2.js → configurator-C1ZKEf1b.js} +7 -5
  83. package/dist/configurator.css +1 -0
  84. package/dist/configurator.js +1 -1
  85. package/dist/constants-DfrO-IaH.js +8 -0
  86. package/dist/constellation.css +1 -0
  87. package/dist/constellation.js +2 -1
  88. package/dist/control.css +1 -0
  89. package/dist/{control.css_vue_type_style_index_0_src_true_lang-BIdufaDG.js → control.css_vue_type_style_index_0_src_true_lang-D2hdtjs4.js} +1 -0
  90. package/dist/{createCanvasLifecycle-hJHobVTn.js → createCanvasLifecycle-DS0vEs_G.js} +76 -75
  91. package/dist/dark-mode-toggle.js +1 -1
  92. package/dist/{data-table-Cs93-uY7.js → data-table-lDykVYuo.js} +113 -107
  93. package/dist/data-table.css +1 -0
  94. package/dist/data-table.js +1 -1
  95. package/dist/{deck-Cm_VmyNL.js → deck-Bc-2mEKE.js} +1 -0
  96. package/dist/deck.js +1 -1
  97. package/dist/dialog.js +1 -1
  98. package/dist/dock-trigger.d.ts +1 -0
  99. package/dist/dock-trigger.js +88 -0
  100. package/dist/dock.js +677 -689
  101. package/dist/dom.js +1 -1
  102. package/dist/easing.js +4 -4
  103. package/dist/expandable-container-wS1awXGd.js +135 -0
  104. package/dist/expandable-container.css +1 -0
  105. package/dist/expandable-container.js +1 -1
  106. package/dist/{fading-scroll-CTeW3KNS.js → fading-scroll-D3Y20ibL.js} +2 -2
  107. package/dist/fading-scroll.js +1 -1
  108. package/dist/fieldPaint-Ci77oajZ.js +7 -0
  109. package/dist/fourier-field.css +1 -0
  110. package/dist/fourier-field.js +15 -13
  111. package/dist/glSetup-DMaDgrEj.js +577 -0
  112. package/dist/glass-ui.js +67 -66
  113. package/dist/handmark.css +1 -0
  114. package/dist/handmark.js +82 -71
  115. package/dist/index.css +1 -0
  116. package/dist/index.d.ts +1 -1
  117. package/dist/{input-eLZ_AU7l.js → input-BLF2pMHE.js} +1 -1
  118. package/dist/input.js +1 -1
  119. package/dist/{label-CE03H1KL.js → label-ryNPL7e6.js} +1 -0
  120. package/dist/label.css +1 -0
  121. package/dist/label.js +1 -1
  122. package/dist/labeled-field.css +1 -0
  123. package/dist/labeled-field.js +5 -4
  124. package/dist/{menu-DaYAZiVW.js → menu-C_l2Sslf.js} +162 -112
  125. package/dist/menu.js +3 -3
  126. package/dist/metric.js +1 -0
  127. package/dist/motion-core.js +138 -44
  128. package/dist/motion-lHDAQHEE.js +91 -0
  129. package/dist/motion.js +5 -5
  130. package/dist/motionTempo-DXdVbCWr.js +13 -0
  131. package/dist/music-staff.js +1 -0
  132. package/dist/{number-field-RP89046a.js → number-field-BXFUP49Z.js} +3 -2
  133. package/dist/number-field.css +1 -0
  134. package/dist/number-field.js +1 -1
  135. package/dist/pager-dots.css +1 -0
  136. package/dist/pager-dots.js +4 -3
  137. package/dist/participation-C5y5VZTN.js +52 -0
  138. package/dist/{popover-BdpoE4Ar.js → popover-DQUmwuAa.js} +3 -2
  139. package/dist/popover.js +1 -1
  140. package/dist/{progress-eVa-mc7J.js → progress-BUn0Bw7Z.js} +1 -0
  141. package/dist/progress.css +1 -0
  142. package/dist/progress.js +1 -1
  143. package/dist/{radio-group-B58Bz16F.js → radio-group-xdEy2tdi.js} +1 -0
  144. package/dist/radio-group.css +1 -0
  145. package/dist/radio-group.js +1 -1
  146. package/dist/root-scroll-lock-DJFrQhMa.js +22 -0
  147. package/dist/select-Dt5dXm87.js +309 -0
  148. package/dist/select.js +1 -1
  149. package/dist/{separator-D4EZM10u.js → separator-C4y9p_ky.js} +1 -0
  150. package/dist/separator.css +1 -0
  151. package/dist/separator.js +1 -1
  152. package/dist/sheet-DLqNUIZl.js +347 -0
  153. package/dist/sheet-width-DgXgJNa5.js +18 -0
  154. package/dist/sheet.js +2 -2
  155. package/dist/{slider-5uoY-cLG.js → slider-CZiKrWGg.js} +8 -8
  156. package/dist/slider.js +1 -1
  157. package/dist/sortable-list.js +2 -1
  158. package/dist/{status-dot-W4LFiJps.js → status-dot-BDZKcRxy.js} +2 -1
  159. package/dist/status-dot.css +1 -0
  160. package/dist/status-dot.js +1 -1
  161. package/dist/styles/components.css +1 -1
  162. package/dist/styles/glass/glass-capsule.css +1 -1
  163. package/dist/styles/glass/glass-chip.css +1 -1
  164. package/dist/styles/glass/mark.css +1 -1
  165. package/dist/styles/glass/overlay-plate.css +1 -1
  166. package/dist/styles/glass/surface-axis.css +1 -1
  167. package/dist/styles/index.css +1 -1
  168. package/dist/styles/theme/radius.css +1 -1
  169. package/dist/styles/tokens/color-radius.css +1 -1
  170. package/dist/styles/tokens/manifest.d.ts +1 -1
  171. package/dist/styles/tokens/scale-paper.css +1 -1
  172. package/dist/styles/utilities/base-misc.css +1 -1
  173. package/dist/surface.js +1 -1
  174. package/dist/{switch-BYUZ6g9G.js → switch-DLfGYU35.js} +1 -0
  175. package/dist/switch.css +1 -0
  176. package/dist/switch.js +1 -1
  177. package/dist/tabs-NgTRPGZx.js +229 -0
  178. package/dist/tabs.js +1 -1
  179. package/dist/textarea.js +1 -1
  180. package/dist/timeline.css +1 -0
  181. package/dist/timeline.js +4 -3
  182. package/dist/toggle-group-DgXcJGD6.js +129 -0
  183. package/dist/toggle-group.css +1 -0
  184. package/dist/toggle-group.js +1 -1
  185. package/dist/tokens.js +2 -0
  186. package/dist/{tooltip-CZVubnJf.js → tooltip-Do3qCw0r.js} +1 -1
  187. package/dist/tooltip.js +1 -1
  188. package/dist/typewriter.css +1 -0
  189. package/dist/typewriter.js +1 -0
  190. package/dist/uniformBridge-CJyy7NOn.js +150 -0
  191. package/dist/useBarShape-CmP35Z8o.js +24 -0
  192. package/dist/{useCanvas2D-CQRElMyE.js → useCanvas2D-Bhpwua98.js} +1 -1
  193. package/dist/{useDockCtaReceive-BSSgD6mu.js → useDockCtaReceive-Dn_-paqP.js} +1 -1
  194. package/dist/{useDragMorph-B363RUbF.js → useDragMorph-BEI74U0t.js} +51 -40
  195. package/dist/{color.wgsl-BTszLY39.js → useGpuSubstrate-Y5XAdU8d.js} +7 -7
  196. package/dist/{useLiquidPress-h1scrPtP.js → useLiquidPress-D5mjZC6U.js} +2 -2
  197. package/dist/{useResizeObserver-CdUlm2QZ.js → useResizeObserver-Bv3nN46q.js} +4 -7
  198. package/dist/useScrollChrome-DMP6kDI9.js +67 -0
  199. package/dist/useSelectionGroup-DAQv5Lb5.js +186 -0
  200. package/dist/{useSpring-9u2_shxV.js → useSpring-Aof0nTRt.js} +1 -1
  201. package/dist/useSpringMount-jgNkymRl.js +73 -0
  202. package/dist/wgpuSetup-CFuqd_RP.js +1278 -0
  203. package/package.json +8 -1
  204. package/dist/DialogContent-CwIBvou_.js +0 -157
  205. package/dist/DropdownMenuTrigger-CKRnhDSQ.js +0 -93
  206. package/dist/button-BOFTUPyU.js +0 -110
  207. package/dist/composables/motion/morph/eyeglass.d.ts +0 -141
  208. package/dist/expandable-container-CZUj9BzY.js +0 -142
  209. package/dist/glass-ui.css +0 -2
  210. package/dist/motion-BvV1_24p.js +0 -61
  211. package/dist/motionTempo-tscp92Nm.js +0 -7
  212. package/dist/participation-B7UFdgXB.js +0 -55
  213. package/dist/select-BiF0FCZf.js +0 -292
  214. package/dist/sheet-DmJxgAHc.js +0 -345
  215. package/dist/tabs-C5sC0fBE.js +0 -269
  216. package/dist/toggle-group-CC5b3o1R.js +0 -125
  217. package/dist/useScrollChrome-BJbWV32F.js +0 -162
  218. package/dist/useSelectionGroup-zsEwitF6.js +0 -291
  219. package/dist/useSpringMount-OA-0mTNv.js +0 -73
@@ -0,0 +1,309 @@
1
+ import { t as e } from "./class-names-FlXcvRRT.js";
2
+ import { t } from "./primitive-B2t2jdqM.js";
3
+ import { t as n } from "./selection-DqIULxRG.js";
4
+ import { t as r } from "./participation-C5y5VZTN.js";
5
+ import { t as i } from "./sheet-width-DgXgJNa5.js";
6
+ import { t as a } from "./rowClass-DYOXwxhO.js";
7
+ import { computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createSlots as d, createVNode as f, defineComponent as p, guardReactiveProps as m, mergeProps as h, normalizeClass as g, normalizeProps as _, openBlock as v, renderSlot as y, unref as b, useAttrs as x, withCtx as S } from "vue";
8
+ import { SelectContent as C, SelectGroup as w, SelectIcon as T, SelectItem as E, SelectItemIndicator as D, SelectItemText as O, SelectLabel as k, SelectPortal as A, SelectRoot as j, SelectScrollDownButton as M, SelectScrollUpButton as N, SelectSeparator as P, SelectTrigger as F, SelectValue as I, SelectViewport as L, injectSelectRootContext as R, useForwardProps as z } from "reka-ui";
9
+ import { ChevronDown as B, ChevronUp as V } from "@lucide/vue";
10
+ //#endregion
11
+ //#region src/components/select/Select.vue
12
+ var H = /* @__PURE__ */ p({
13
+ name: "Select",
14
+ inheritAttrs: !1,
15
+ __name: "Select",
16
+ props: {
17
+ modelValue: {},
18
+ defaultValue: {},
19
+ open: { type: Boolean },
20
+ defaultOpen: { type: Boolean },
21
+ nullableValue: {},
22
+ dir: {},
23
+ autocomplete: {},
24
+ disabled: { type: Boolean },
25
+ name: {},
26
+ required: { type: Boolean }
27
+ },
28
+ emits: ["update:modelValue", "update:open"],
29
+ setup(e, { emit: t }) {
30
+ let r = e, i = t, a = z(r);
31
+ function o(e) {
32
+ if (!n(e)) throw TypeError("[glass-ui] Select received a non-scalar value.");
33
+ i("update:modelValue", e);
34
+ }
35
+ return (e, t) => (v(), s(b(j), h({ "data-slot": "select" }, b(a), {
36
+ "onUpdate:modelValue": o,
37
+ "onUpdate:open": t[0] ||= (e) => i("update:open", e)
38
+ }), {
39
+ default: S(() => [y(e.$slots, "default")]),
40
+ _: 3
41
+ }, 16));
42
+ }
43
+ }), U = /* @__PURE__ */ p({
44
+ name: "SelectValue",
45
+ inheritAttrs: !1,
46
+ __name: "SelectValue",
47
+ props: {
48
+ placeholder: {},
49
+ class: { type: [
50
+ Boolean,
51
+ null,
52
+ String,
53
+ Object,
54
+ Array
55
+ ] }
56
+ },
57
+ setup(e) {
58
+ let n = e, r = x(), i = o(() => t(r));
59
+ return (e, t) => (v(), s(b(I), h(i.value, {
60
+ placeholder: n.placeholder,
61
+ class: n.class
62
+ }), d({ _: 2 }, [e.$slots.default ? {
63
+ name: "default",
64
+ fn: S((t) => [y(e.$slots, "default", _(m(t)))]),
65
+ key: "0"
66
+ } : void 0]), 1040, ["placeholder", "class"]));
67
+ }
68
+ }), W = /* @__PURE__ */ p({
69
+ name: "SelectTrigger",
70
+ inheritAttrs: !1,
71
+ __name: "SelectTrigger",
72
+ props: {
73
+ disabled: { type: Boolean },
74
+ class: { type: [
75
+ Boolean,
76
+ null,
77
+ String,
78
+ Object,
79
+ Array
80
+ ] }
81
+ },
82
+ setup(n) {
83
+ let r = n, i = x(), a = o(() => {
84
+ let { reference: e, ...n } = t(i);
85
+ return n;
86
+ });
87
+ return (t, n) => (v(), s(b(F), h({ "data-slot": "select-trigger" }, a.value, {
88
+ disabled: r.disabled,
89
+ class: b(e)("control-surface glass-control-edge glass-capsule-hover h-(--control-h-md)", "tap-squish focus-ring flex w-full cursor-pointer items-center justify-between rounded-pill px-3 py-2 text-dropdown placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-disabled [&>span]:line-clamp-1 transition-control aria-invalid:border-(--destructive) user-invalid:border-(--destructive) focus-visible:aria-invalid:shadow-(--invalid-ring) focus-visible:user-invalid:shadow-(--invalid-ring)", r.class)
90
+ }), {
91
+ default: S(() => [y(t.$slots, "default"), f(b(T), { "as-child": "" }, {
92
+ default: S(() => [f(b(B), { class: "transition-disclosure in-data-[state=open]:rotate-180 h-4 w-4 shrink-0 opacity-(--select-chevron-opacity)" })]),
93
+ _: 1
94
+ })]),
95
+ _: 3
96
+ }, 16, ["disabled", "class"]));
97
+ }
98
+ }), G = /* @__PURE__ */ p({
99
+ name: "SelectScrollButton",
100
+ inheritAttrs: !1,
101
+ __name: "SelectScrollButton",
102
+ props: {
103
+ direction: {},
104
+ class: { type: [
105
+ Boolean,
106
+ null,
107
+ String,
108
+ Object,
109
+ Array
110
+ ] }
111
+ },
112
+ setup(n) {
113
+ let r = n, i = x(), a = o(() => t(i)), c = o(() => e("flex min-h-11 cursor-default items-center justify-center", r.class));
114
+ return (e, t) => r.direction === "up" ? (v(), s(b(N), h({ key: 0 }, a.value, { class: c.value }), {
115
+ default: S(() => [y(e.$slots, "default", {}, () => [f(b(V), { class: "h-4 w-4" })])]),
116
+ _: 3
117
+ }, 16, ["class"])) : (v(), s(b(M), h({ key: 1 }, a.value, { class: c.value }), {
118
+ default: S(() => [y(e.$slots, "default", {}, () => [f(b(B), { class: "h-4 w-4" })])]),
119
+ _: 3
120
+ }, 16, ["class"]));
121
+ }
122
+ }), K = /* @__PURE__ */ p({
123
+ name: "SelectContent",
124
+ inheritAttrs: !1,
125
+ __name: "SelectContent",
126
+ props: {
127
+ class: { type: [
128
+ Boolean,
129
+ null,
130
+ String,
131
+ Object,
132
+ Array
133
+ ] },
134
+ side: { default: "bottom" },
135
+ sideOffset: { default: 4 },
136
+ align: { default: "start" },
137
+ alignOffset: { default: 0 }
138
+ },
139
+ emits: [
140
+ "closeAutoFocus",
141
+ "escapeKeyDown",
142
+ "pointerDownOutside"
143
+ ],
144
+ setup(t, { emit: n }) {
145
+ let a = t, c = n, l = x(), u = R(null), d = i(() => u?.open.value ?? !1), p = { getBoundingClientRect: () => new DOMRect(0, window.innerHeight, document.documentElement.clientWidth, 0) }, m = o(() => ({
146
+ ...l,
147
+ position: "popper",
148
+ bodyLock: !1,
149
+ collisionPadding: 16,
150
+ ...d.value ? {
151
+ reference: p,
152
+ side: "top",
153
+ sideOffset: 0,
154
+ align: "start",
155
+ alignOffset: 0,
156
+ avoidCollisions: !1
157
+ } : {
158
+ side: a.side,
159
+ sideOffset: a.sideOffset,
160
+ align: a.align,
161
+ alignOffset: a.alignOffset,
162
+ avoidCollisions: !0
163
+ }
164
+ })), _ = r({ close: () => {
165
+ u?.open.value && u.onOpenChange(!1);
166
+ } });
167
+ return (t, n) => (v(), s(b(A), null, {
168
+ default: S(() => [f(b(C), h({
169
+ ...m.value,
170
+ ...b(_).portalAttrs.value
171
+ }, {
172
+ "data-reveal": "menu",
173
+ "data-slot": "select-content",
174
+ "data-form": b(d) ? "sheet" : void 0,
175
+ "data-surface": b(d) ? "opaque" : void 0,
176
+ class: b(e)("relative z-popover min-w-(--overlay-min-width) overflow-hidden text-popover-foreground glass-reveal", b(d) ? "rounded-t-card" : "rounded-card", "glass-floating glass-field-portal", a.class),
177
+ onCloseAutoFocus: n[0] ||= (e) => c("closeAutoFocus", e),
178
+ onEscapeKeyDown: n[1] ||= (e) => c("escapeKeyDown", e),
179
+ onPointerDownOutside: n[2] ||= (e) => c("pointerDownOutside", e)
180
+ }), {
181
+ default: S(() => [
182
+ f(G, { direction: "up" }),
183
+ f(b(L), {
184
+ "data-slot": "select-viewport",
185
+ "data-fade-start": "",
186
+ "data-fade-end": "",
187
+ class: g(b(e)("fading-scroll fading-scroll--y w-full min-w-(--reka-select-trigger-width)"))
188
+ }, {
189
+ default: S(() => [y(t.$slots, "default")]),
190
+ _: 3
191
+ }, 8, ["class"]),
192
+ f(G, { direction: "down" })
193
+ ]),
194
+ _: 3
195
+ }, 16, [
196
+ "data-form",
197
+ "data-surface",
198
+ "class"
199
+ ])]),
200
+ _: 3
201
+ }));
202
+ }
203
+ }), q = /* @__PURE__ */ p({
204
+ name: "SelectGroup",
205
+ inheritAttrs: !1,
206
+ __name: "SelectGroup",
207
+ props: { class: { type: [
208
+ Boolean,
209
+ null,
210
+ String,
211
+ Object,
212
+ Array
213
+ ] } },
214
+ setup(n) {
215
+ let r = n, i = x(), a = o(() => t(i));
216
+ return (t, n) => (v(), s(b(w), h(a.value, { class: b(e)("p-1 w-full", r.class) }), {
217
+ default: S(() => [y(t.$slots, "default")]),
218
+ _: 3
219
+ }, 16, ["class"]));
220
+ }
221
+ }), J = {
222
+ key: 0,
223
+ "aria-hidden": "true",
224
+ class: "absolute start-2 flex h-3.5 w-3.5 items-center justify-center"
225
+ }, Y = { class: "flex flex-col gap-0.5 min-w-0" }, X = /* @__PURE__ */ p({
226
+ name: "SelectItem",
227
+ inheritAttrs: !1,
228
+ __name: "SelectItem",
229
+ props: {
230
+ value: {},
231
+ disabled: { type: Boolean },
232
+ textValue: {},
233
+ class: { type: [
234
+ Boolean,
235
+ null,
236
+ String,
237
+ Object,
238
+ Array
239
+ ] },
240
+ hideIndicator: { type: Boolean }
241
+ },
242
+ emits: ["select"],
243
+ setup(n, { emit: r }) {
244
+ let i = n, d = r, p = x(), m = o(() => t(p));
245
+ function g(e) {
246
+ d("select", e);
247
+ }
248
+ let _ = o(() => i.hideIndicator ? "none" : "start");
249
+ return (t, n) => (v(), s(b(E), h(m.value, {
250
+ value: i.value,
251
+ disabled: i.disabled,
252
+ "text-value": i.textValue,
253
+ class: b(e)(b(a)(_.value), i.class),
254
+ onSelect: g
255
+ }), {
256
+ default: S(() => [_.value === "none" ? c("", !0) : (v(), l("span", J, [f(b(D), null, {
257
+ default: S(() => [...n[0] ||= [u("span", { class: "inline-block w-2 h-2 rounded-pill bg-current" }, null, -1)]]),
258
+ _: 1
259
+ })])), u("div", Y, [f(b(O), null, {
260
+ default: S(() => [y(t.$slots, "default")]),
261
+ _: 3
262
+ }), y(t.$slots, "description")])]),
263
+ _: 3
264
+ }, 16, [
265
+ "value",
266
+ "disabled",
267
+ "text-value",
268
+ "class"
269
+ ]));
270
+ }
271
+ }), Z = /* @__PURE__ */ p({
272
+ name: "SelectLabel",
273
+ inheritAttrs: !1,
274
+ __name: "SelectLabel",
275
+ props: { class: { type: [
276
+ Boolean,
277
+ null,
278
+ String,
279
+ Object,
280
+ Array
281
+ ] } },
282
+ setup(n) {
283
+ let r = n, i = x(), a = o(() => {
284
+ let { for: e, ...n } = t(i);
285
+ return n;
286
+ });
287
+ return (t, n) => (v(), s(b(k), h(a.value, { class: b(e)("py-1 ps-7 pe-2 text-dropdown-secondary font-semibold", r.class) }), {
288
+ default: S(() => [y(t.$slots, "default")]),
289
+ _: 3
290
+ }, 16, ["class"]));
291
+ }
292
+ }), Q = /* @__PURE__ */ p({
293
+ name: "SelectSeparator",
294
+ inheritAttrs: !1,
295
+ __name: "SelectSeparator",
296
+ props: { class: { type: [
297
+ Boolean,
298
+ null,
299
+ String,
300
+ Object,
301
+ Array
302
+ ] } },
303
+ setup(n) {
304
+ let r = n, i = x(), a = o(() => t(i));
305
+ return (t, n) => (v(), s(b(P), h(a.value, { class: b(e)("glass-menu-divider -mx-1 my-1", r.class) }), null, 16, ["class"]));
306
+ }
307
+ });
308
+ //#endregion
309
+ export { K as a, U as c, q as i, H as l, Z as n, G as o, X as r, W as s, Q as t };
package/dist/select.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./select-BiF0FCZf.js";
1
+ import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./select-Dt5dXm87.js";
2
2
  export { r as Select, e as SelectContent, n as SelectGroup, o as SelectItem, i as SelectLabel, a as SelectScrollButton, c as SelectSeparator, s as SelectTrigger, t as SelectValue };
@@ -1,3 +1,4 @@
1
+ import "./separator.css";
1
2
  import { t as e } from "./class-names-FlXcvRRT.js";
2
3
  import { t } from "./primitive-B2t2jdqM.js";
3
4
  import { t as n } from "./_plugin-vue_export-helper-B3ysoDQm.js";
@@ -0,0 +1 @@
1
+ @layer theme, base, components, utilities;@layer components{.separator[data-v-64dda6b9],.separator-segment[data-v-64dda6b9]{background:color-mix(in oklab, var(--foreground) calc(var(--ink-seam) * 100%), transparent)}.separator[data-orientation=horizontal][data-v-64dda6b9]{block-size:1px;inline-size:100%}.separator[data-orientation=vertical][data-v-64dda6b9]{align-self:stretch;inline-size:1px}.separator-labelled[data-v-64dda6b9]{background:0 0;align-items:center;display:flex}.separator-labelled[data-orientation=horizontal][data-v-64dda6b9]{gap:.75rem;block-size:auto}.separator-labelled[data-orientation=vertical][data-v-64dda6b9]{flex-direction:column;align-self:auto;gap:.5rem;inline-size:max-content}.separator-segment[data-v-64dda6b9]{flex:auto}[data-orientation=horizontal]>.separator-segment[data-v-64dda6b9]{block-size:1px;min-inline-size:.75rem}[data-orientation=vertical]>.separator-segment[data-v-64dda6b9]{min-block-size:.75rem;inline-size:1px}.separator-label[data-v-64dda6b9]{color:var(--muted-foreground);font-family:var(--font-text);font-size:var(--control-label);line-height:var(--type-leading-caption);flex:none}}
package/dist/separator.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as e } from "./separator-D4EZM10u.js";
1
+ import { t as e } from "./separator-C4y9p_ky.js";
2
2
  export { e as Separator };
@@ -0,0 +1,347 @@
1
+ import { t as e } from "./class-names-FlXcvRRT.js";
2
+ import { t } from "./motionTempo-DXdVbCWr.js";
3
+ import { n } from "./springPresets-Cbe0Voqg.js";
4
+ import { t as r } from "./resolve-DdrNvBby.js";
5
+ import { t as i } from "./useSpringMount-jgNkymRl.js";
6
+ import { a, i as o, n as s, r as c, t as l } from "./motion-lHDAQHEE.js";
7
+ import { t as u } from "./shortcuts-DGGWNRNe.js";
8
+ import { t as d } from "./useMotionAxis-D-rtIhca.js";
9
+ import { computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createVNode as _, defineComponent as v, mergeProps as y, normalizeStyle as b, onScopeDispose as x, openBlock as S, ref as C, renderSlot as w, unref as T, watch as E, withCtx as D } from "vue";
10
+ import { DialogClose as O, DialogContent as k, DialogPortal as A, injectDialogRootContext as j, useForwardPropsEmits as M } from "reka-ui";
11
+ import { SpringProgress as N } from "@mkbabb/keyframes.js";
12
+ //#region src/components/sheet/detents/projection.ts
13
+ function P(e) {
14
+ return 2 * Math.PI / e;
15
+ }
16
+ function F(e) {
17
+ let t = P(e.response), n = e.dampingFraction * t;
18
+ return !Number.isFinite(n) || n <= 0 ? 0 : -Math.log(e.settleBand) / n;
19
+ }
20
+ function I(e, t) {
21
+ return e * F(t);
22
+ }
23
+ function L(e, t, n) {
24
+ return e + I(t, n);
25
+ }
26
+ function R(e, t) {
27
+ let n = t[0], r = Math.abs(e - n);
28
+ for (let i of t) {
29
+ let t = Math.abs(e - i);
30
+ t < r && (n = i, r = t);
31
+ }
32
+ return n;
33
+ }
34
+ function z(e, t, n, r) {
35
+ return R(L(e, t, r), [0, ...n]);
36
+ }
37
+ //#endregion
38
+ //#region src/components/sheet/detents/use.ts
39
+ var B = {
40
+ travel: "bloom",
41
+ rung: "dock"
42
+ }, V = "button, a[href], input, select, textarea, [contenteditable=true]", H = "[data-slot=\"sheet-detent-handle\"], [data-slot=\"dialog-header\"]";
43
+ function U(e, t) {
44
+ switch (e) {
45
+ case "bottom": return -t.clientY;
46
+ case "top": return t.clientY;
47
+ case "left": return t.clientX;
48
+ case "right": return -t.clientX;
49
+ }
50
+ }
51
+ function W(e) {
52
+ return typeof window > "u" ? 1 : (e === "left" || e === "right" ? window.innerWidth : window.innerHeight) || 1;
53
+ }
54
+ function G(e, t) {
55
+ let n = e instanceof Element ? e : null;
56
+ for (; n && n !== t;) {
57
+ if (n.scrollHeight > n.clientHeight && n.scrollTop > 0) return !1;
58
+ n = n.parentElement;
59
+ }
60
+ return !0;
61
+ }
62
+ function K(e) {
63
+ let { open: r, side: i, ladder: a, detent: o, requestClose: s } = e, c = C(0), l = C(r.value), u = C(!1), d = null, f = null, p = 1;
64
+ function m(e, t, r) {
65
+ let i = n(B[e]);
66
+ return d?.dispose(), d = new N({
67
+ response: i.response * p,
68
+ dampingFraction: i.dampingFraction,
69
+ initial: t,
70
+ initialVelocity: r,
71
+ respectReducedMotion: !0
72
+ }), f = e, d;
73
+ }
74
+ function h(e) {
75
+ c.value = e, !r.value && d?.target === 0 && d.settled && (l.value = !1);
76
+ }
77
+ function g(e, t) {
78
+ let n = c.value, r = d?.velocity ?? 0, i = d && f === t ? d : m(t, n, r);
79
+ i.target = e, i.play(h), e > 0 && (o.value = e);
80
+ }
81
+ function _(e) {
82
+ g(R(e, a()), "rung");
83
+ }
84
+ function v() {
85
+ let e = a(), t = o.value;
86
+ return typeof t == "number" && Number.isFinite(t) ? R(t, e) : e[e.length - 1];
87
+ }
88
+ let y = null, b = null, S = 0, w = 0, T = 0, D = 0, O = 0, k = 1;
89
+ function A(e) {
90
+ if (e.button !== 0 || y !== null) return;
91
+ let t = e.currentTarget;
92
+ if (!t) return;
93
+ let n = e.target instanceof Element ? e.target : null;
94
+ n && (n.closest(V) && !n.closest(H) || !n.closest(H) && !G(n, t) || (d?.stop(), b = t, y = e.pointerId, u.value = !0, k = W(i()), S = U(i(), e), T = S, D = e.timeStamp, w = c.value, O = 0, t.setPointerCapture?.(e.pointerId), t.addEventListener("pointermove", j), t.addEventListener("pointerup", M), t.addEventListener("pointercancel", M)));
95
+ }
96
+ function j(e) {
97
+ if (e.pointerId !== y) return;
98
+ let t = U(i(), e), n = (e.timeStamp - D) / 1e3;
99
+ n > 0 && (O = (t - T) / n / k), T = t, D = e.timeStamp;
100
+ let r = a(), o = r[r.length - 1];
101
+ c.value = Math.min(o, Math.max(0, w + (t - S) / k));
102
+ }
103
+ function M(e) {
104
+ if (e.pointerId !== y) return;
105
+ P();
106
+ let t = n(B.rung), r = z(c.value, O, a(), {
107
+ response: t.response * p,
108
+ dampingFraction: t.dampingFraction,
109
+ settleBand: t.settleBand
110
+ });
111
+ if (r === 0) {
112
+ s(), g(0, "travel");
113
+ return;
114
+ }
115
+ g(r, "rung");
116
+ }
117
+ function P() {
118
+ y === null || !b || (b.releasePointerCapture?.(y), b.removeEventListener("pointermove", j), b.removeEventListener("pointerup", M), b.removeEventListener("pointercancel", M), y = null, u.value = !1, b = null);
119
+ }
120
+ return E(r, (e) => {
121
+ if (e) {
122
+ l.value = !0, p = t(), d || (c.value = 0, m("travel", 0, 0)), g(v(), "travel");
123
+ return;
124
+ }
125
+ if (l.value) {
126
+ if (P(), !d) {
127
+ c.value = 0, l.value = !1;
128
+ return;
129
+ }
130
+ g(0, "travel"), d.settled && (l.value = !1);
131
+ }
132
+ }, {
133
+ immediate: !0,
134
+ flush: "sync"
135
+ }), E(o, (e) => {
136
+ if (!r.value || u.value || typeof e != "number" || !Number.isFinite(e)) return;
137
+ let t = R(e, a());
138
+ (!d || Math.abs(d.target - t) > .001) && g(t, "rung");
139
+ }), x(() => {
140
+ P(), d?.dispose(), d = null;
141
+ }), {
142
+ t: c,
143
+ present: l,
144
+ dragging: u,
145
+ snapTo: _,
146
+ onPointerdown: A
147
+ };
148
+ }
149
+ //#endregion
150
+ //#region src/components/sheet/SheetContent.vue?vue&type=script&setup=true&lang.ts
151
+ var q = [
152
+ "aria-orientation",
153
+ "aria-valuemin",
154
+ "aria-valuemax",
155
+ "aria-valuenow",
156
+ "aria-valuetext"
157
+ ], J = { "data-slot": "sheet-content-region" }, Y = [
158
+ "data-side",
159
+ "data-detents",
160
+ "data-modal"
161
+ ], X = "calc(var(--glass-veil-crown) + (var(--glass-veil-sheet) - var(--glass-veil-crown)) * clamp(0, var(--detent-t), 1))", Z = /* @__PURE__ */ v({
162
+ inheritAttrs: !1,
163
+ __name: "SheetContent",
164
+ props: {
165
+ forceMount: { type: Boolean },
166
+ disableOutsidePointerEvents: { type: Boolean },
167
+ class: { type: [
168
+ Boolean,
169
+ null,
170
+ String,
171
+ Object,
172
+ Array
173
+ ] },
174
+ surface: { default: "glass" },
175
+ side: { default: "right" },
176
+ detents: { default: void 0 },
177
+ detent: { default: void 0 },
178
+ motion: {},
179
+ scroll: {
180
+ type: Boolean,
181
+ default: !1
182
+ }
183
+ },
184
+ emits: [
185
+ "escapeKeyDown",
186
+ "pointerDownOutside",
187
+ "focusOutside",
188
+ "interactOutside",
189
+ "openAutoFocus",
190
+ "closeAutoFocus",
191
+ "update:detent"
192
+ ],
193
+ setup(t, { emit: n }) {
194
+ let v = t, x = n, N = f(() => {
195
+ let { class: e, surface: t, side: n, motion: r, scroll: i, detents: a, detent: o, forceMount: s, ...c } = v;
196
+ return c;
197
+ }), P = d(() => v.motion), F = f(() => P.resolved.value !== "off"), I = f(() => v.detents ? [...v.detents].sort((e, t) => e - t) : []), L = f(() => I.value.length > 0), R = {
198
+ top: "border-b",
199
+ bottom: "border-t",
200
+ left: "border-r",
201
+ right: "border-l"
202
+ }, z = f(() => e("fixed", R[v.side], r("floating"), v.class)), B = j();
203
+ u(() => B.open.value && B.modal.value);
204
+ let V = i({
205
+ open: f(() => !L.value && B.open.value),
206
+ preset: "panel"
207
+ }), H = C(v.detent ?? null);
208
+ E(() => v.detent, (e) => {
209
+ e !== void 0 && (H.value = e);
210
+ }), E(H, (e) => x("update:detent", e));
211
+ let U = K({
212
+ open: B.open,
213
+ side: () => v.side,
214
+ ladder: () => I.value.length > 0 ? I.value : [1],
215
+ detent: H,
216
+ requestClose: () => B.onOpenChange(!1)
217
+ }), W = f(() => {
218
+ if (F.value) return L.value ? { "--detent-t": String(U.t.value) } : {
219
+ translate: c(v.side, V.position.value),
220
+ transform: "none",
221
+ animation: "none",
222
+ transition: "none"
223
+ };
224
+ }), G = f(() => L.value ? U.present.value : V.present.value), Z = f(() => F.value ? G.value || B.open.value : v.forceMount), ee = f(() => v.surface === "glass" && (Z.value || B.open.value)), te = f(() => F.value && !B.open.value ? "" : void 0), ne = f(() => F.value ? L.value ? l(U.t.value) : s(V.position.value) : null), re = f(() => F.value ? G.value || B.open.value : void 0), Q = f(() => {
225
+ let e = I.value, t = U.dragging.value ? U.t.value : H.value ?? U.t.value, n = 0;
226
+ for (let r = 1; r < e.length; r += 1) Math.abs(e[r] - t) < Math.abs(e[n] - t) && (n = r);
227
+ return n;
228
+ }), ie = f(() => {
229
+ let e = I.value;
230
+ return `${Math.round((e[Q.value] ?? 1) * 100)}%, position ${Q.value + 1} of ${e.length}`;
231
+ }), ae = f(() => L.value ? { "--detent-t": String(U.t.value) } : void 0);
232
+ function oe(e) {
233
+ let t = I.value, n = t.length - 1, r = Q.value;
234
+ if (e.key === "Home") r = 0;
235
+ else if (e.key === "End") r = n;
236
+ else if (e.key === "ArrowUp" || e.key === "ArrowRight") r = Math.min(n, r + 1);
237
+ else if (e.key === "ArrowDown" || e.key === "ArrowLeft") r = Math.max(0, r - 1);
238
+ else return;
239
+ e.preventDefault(), U.snapTo(t[r]);
240
+ }
241
+ let $ = C(null), se = () => $.value?.closest("[data-slot=\"sheet-content\"]") ?? null;
242
+ E(() => B.open.value, (e) => {
243
+ if (!F.value || e !== !1) return;
244
+ let t = document.activeElement;
245
+ t && se()?.contains(t) && B.triggerElement.value?.focus({ preventScroll: !0 });
246
+ }, { flush: "sync" });
247
+ let ce = a(() => B.triggerElement.value), le = M(N, x), ue = f(() => ({
248
+ "--glass-veil-tier": L.value ? X : "var(--glass-veil-dialog)",
249
+ "--radius-ctx": "var(--radius-3xl)",
250
+ "--radius-inset": "var(--space-family)",
251
+ ...P.hostStyle.value ?? {},
252
+ ...W.value ?? {}
253
+ }));
254
+ return (e, t) => (S(), p(T(A), { "force-mount": Z.value }, {
255
+ default: D(() => [
256
+ _(o, {
257
+ opacity: ne.value,
258
+ "force-mount": re.value
259
+ }, null, 8, ["opacity", "force-mount"]),
260
+ _(T(k), y({
261
+ ...T(le),
262
+ ...e.$attrs,
263
+ inert: te.value
264
+ }, {
265
+ "aria-modal": T(B).modal.value ? "true" : void 0,
266
+ "force-mount": Z.value,
267
+ class: z.value,
268
+ style: ue.value,
269
+ "data-surface": v.surface,
270
+ "data-slot": "sheet-content",
271
+ onCloseAutoFocus: T(ce),
272
+ "data-side": v.side,
273
+ "data-modal": T(B).modal.value ? void 0 : "false",
274
+ "data-detents": L.value ? "" : void 0,
275
+ "data-dragging": T(U).dragging.value ? "" : void 0,
276
+ "data-scroll": v.scroll ? "" : void 0,
277
+ "data-motion": T(P).dataMotion.value,
278
+ onPointerdown: t[0] ||= (e) => L.value ? T(U).onPointerdown(e) : void 0
279
+ }), {
280
+ default: D(() => [
281
+ g("span", {
282
+ ref_key: "contentAnchorEl",
283
+ ref: $,
284
+ hidden: ""
285
+ }, null, 512),
286
+ _(T(O), { "data-slot": "dialog-close" }, {
287
+ default: D(() => [...t[1] ||= [g("svg", {
288
+ class: "w-4 h-4",
289
+ viewBox: "0 0 24 24",
290
+ fill: "none",
291
+ stroke: "currentColor",
292
+ "stroke-width": "2",
293
+ "stroke-linecap": "round",
294
+ "stroke-linejoin": "round",
295
+ "aria-hidden": "true"
296
+ }, [g("path", { d: "M18 6 6 18M6 6l12 12" })], -1), g("span", { class: "sr-only" }, "Close", -1)]]),
297
+ _: 1
298
+ }),
299
+ L.value ? (S(), h("div", {
300
+ key: 0,
301
+ "data-slot": "sheet-detent-handle",
302
+ role: "slider",
303
+ tabindex: "0",
304
+ "aria-label": "Sheet position",
305
+ "aria-orientation": v.side === "left" || v.side === "right" ? "horizontal" : "vertical",
306
+ "aria-valuemin": I.value[0],
307
+ "aria-valuemax": I.value[I.value.length - 1],
308
+ "aria-valuenow": I.value[Q.value],
309
+ "aria-valuetext": ie.value,
310
+ onKeydown: oe
311
+ }, [g("span", {
312
+ "data-slot": "sheet-detent-grip",
313
+ style: b(ae.value),
314
+ "aria-hidden": "true"
315
+ }, null, 4)], 40, q)) : m("", !0),
316
+ g("div", J, [w(e.$slots, "default")])
317
+ ]),
318
+ _: 3
319
+ }, 16, [
320
+ "aria-modal",
321
+ "force-mount",
322
+ "class",
323
+ "style",
324
+ "data-surface",
325
+ "onCloseAutoFocus",
326
+ "data-side",
327
+ "data-modal",
328
+ "data-detents",
329
+ "data-dragging",
330
+ "data-scroll",
331
+ "data-motion"
332
+ ]),
333
+ ee.value ? (S(), h("span", {
334
+ key: 0,
335
+ "data-slot": "glass-graded-halo",
336
+ "data-side": v.side,
337
+ "data-detents": L.value ? "" : void 0,
338
+ "data-modal": T(B).modal.value ? void 0 : "false",
339
+ "aria-hidden": "true"
340
+ }, null, 8, Y)) : m("", !0)
341
+ ]),
342
+ _: 3
343
+ }, 8, ["force-mount"]));
344
+ }
345
+ });
346
+ //#endregion
347
+ export { z as a, I as c, L as i, K as n, F as o, R as r, P as s, Z as t };
@@ -0,0 +1,18 @@
1
+ import { onBeforeUnmount as e, shallowRef as t, watch as n } from "vue";
2
+ //#region src/components/_shared/overlay/sheet-width.ts
3
+ var r = "(width < 30rem)";
4
+ function i(i) {
5
+ let a = t(!1), o = null, s = () => {
6
+ a.value = o?.matches ?? !1;
7
+ }, c = () => {
8
+ o?.removeEventListener("change", s), o = null;
9
+ };
10
+ return n(i, (e) => {
11
+ c(), e && typeof window < "u" && typeof window.matchMedia == "function" && (o = window.matchMedia(r), o.addEventListener("change", s)), s();
12
+ }, {
13
+ immediate: !0,
14
+ flush: "sync"
15
+ }), e(c), a;
16
+ }
17
+ //#endregion
18
+ export { i as t };