@scalar/components 0.12.45 → 0.12.46
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.
- package/dist/components/ScalarCombobox/ScalarCombobox.stories.d.ts +12 -0
- package/dist/components/ScalarCombobox/ScalarCombobox.stories.d.ts.map +1 -1
- package/dist/components/ScalarCombobox/ScalarCombobox.vue.js +2 -1
- package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.vue.d.ts +12 -0
- package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.vue.d.ts.map +1 -1
- package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.vue.js +6 -5
- package/dist/components/ScalarCombobox/ScalarComboboxPopover.vue.js +1 -0
- package/dist/components/ScalarDropdown/ScalarDropdown.stories.d.ts +48 -0
- package/dist/components/ScalarDropdown/ScalarDropdown.stories.d.ts.map +1 -1
- package/dist/components/ScalarDropdown/ScalarDropdown.vue.d.ts.map +1 -1
- package/dist/components/ScalarDropdown/ScalarDropdown.vue.js +17 -15
- package/dist/components/ScalarFloating/ScalarFloating.vue.d.ts.map +1 -1
- package/dist/components/ScalarFloating/ScalarFloating.vue.js +21 -20
- package/dist/components/ScalarFloating/types.d.ts +5 -0
- package/dist/components/ScalarFloating/types.d.ts.map +1 -1
- package/dist/components/ScalarListbox/ScalarListbox.stories.d.ts +12 -0
- package/dist/components/ScalarListbox/ScalarListbox.stories.d.ts.map +1 -1
- package/dist/components/ScalarListbox/ScalarListbox.vue.js +4 -3
- package/dist/components/ScalarPopover/ScalarPopover.stories.d.ts +48 -0
- package/dist/components/ScalarPopover/ScalarPopover.stories.d.ts.map +1 -1
- package/dist/components/ScalarPopover/ScalarPopover.vue.js +5 -4
- package/package.json +3 -3
|
@@ -19,6 +19,9 @@ declare const meta: {
|
|
|
19
19
|
placement: {
|
|
20
20
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
21
21
|
};
|
|
22
|
+
targetRef: {
|
|
23
|
+
type: import("vue").PropType<HTMLElement>;
|
|
24
|
+
};
|
|
22
25
|
isOpen: {
|
|
23
26
|
type: import("vue").PropType<boolean>;
|
|
24
27
|
};
|
|
@@ -46,6 +49,9 @@ declare const meta: {
|
|
|
46
49
|
placement: {
|
|
47
50
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
48
51
|
};
|
|
52
|
+
targetRef: {
|
|
53
|
+
type: import("vue").PropType<HTMLElement>;
|
|
54
|
+
};
|
|
49
55
|
isOpen: {
|
|
50
56
|
type: import("vue").PropType<boolean>;
|
|
51
57
|
};
|
|
@@ -78,6 +84,9 @@ declare const meta: {
|
|
|
78
84
|
placement: {
|
|
79
85
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
80
86
|
};
|
|
87
|
+
targetRef: {
|
|
88
|
+
type: import("vue").PropType<HTMLElement>;
|
|
89
|
+
};
|
|
81
90
|
isOpen: {
|
|
82
91
|
type: import("vue").PropType<boolean>;
|
|
83
92
|
};
|
|
@@ -107,6 +116,9 @@ declare const meta: {
|
|
|
107
116
|
placement: {
|
|
108
117
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
109
118
|
};
|
|
119
|
+
targetRef: {
|
|
120
|
+
type: import("vue").PropType<HTMLElement>;
|
|
121
|
+
};
|
|
110
122
|
isOpen: {
|
|
111
123
|
type: import("vue").PropType<boolean>;
|
|
112
124
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarCombobox.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCombobox/ScalarCombobox.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAMrD,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAElD,QAAA,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"ScalarCombobox.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCombobox/ScalarCombobox.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAMrD,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAElD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAY6B,CAAA;AAEvC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAqClC,eAAO,MAAM,IAAI,EAAE,KA0BlB,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,KA0BpB,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KA0BzB,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,KA0B/B,CAAA"}
|
|
@@ -9,12 +9,13 @@ const B = /* @__PURE__ */ a({
|
|
|
9
9
|
placeholder: {},
|
|
10
10
|
placement: {},
|
|
11
11
|
resize: { type: Boolean },
|
|
12
|
+
targetRef: {},
|
|
12
13
|
isOpen: { type: Boolean },
|
|
13
14
|
teleport: { type: [Boolean, String] }
|
|
14
15
|
},
|
|
15
16
|
emits: ["update:modelValue"],
|
|
16
17
|
setup(u) {
|
|
17
|
-
return (e,
|
|
18
|
+
return (e, f) => (r(), n(i, {
|
|
18
19
|
isOpen: e.isOpen,
|
|
19
20
|
placement: e.placement ?? "bottom-start",
|
|
20
21
|
resize: e.resize,
|
|
@@ -18,6 +18,9 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOp
|
|
|
18
18
|
placement: {
|
|
19
19
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
20
20
|
};
|
|
21
|
+
targetRef: {
|
|
22
|
+
type: import("vue").PropType<HTMLElement>;
|
|
23
|
+
};
|
|
21
24
|
isOpen: {
|
|
22
25
|
type: import("vue").PropType<boolean>;
|
|
23
26
|
};
|
|
@@ -65,6 +68,9 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOp
|
|
|
65
68
|
placement: {
|
|
66
69
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
67
70
|
};
|
|
71
|
+
targetRef: {
|
|
72
|
+
type: import("vue").PropType<HTMLElement>;
|
|
73
|
+
};
|
|
68
74
|
isOpen: {
|
|
69
75
|
type: import("vue").PropType<boolean>;
|
|
70
76
|
};
|
|
@@ -85,6 +91,9 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOp
|
|
|
85
91
|
placement: {
|
|
86
92
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
87
93
|
};
|
|
94
|
+
targetRef: {
|
|
95
|
+
type: import("vue").PropType<HTMLElement>;
|
|
96
|
+
};
|
|
88
97
|
isOpen: {
|
|
89
98
|
type: import("vue").PropType<boolean>;
|
|
90
99
|
};
|
|
@@ -136,6 +145,9 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOp
|
|
|
136
145
|
placement: {
|
|
137
146
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
138
147
|
};
|
|
148
|
+
targetRef: {
|
|
149
|
+
type: import("vue").PropType<HTMLElement>;
|
|
150
|
+
};
|
|
139
151
|
isOpen: {
|
|
140
152
|
type: import("vue").PropType<boolean>;
|
|
141
153
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarComboboxMultiselect.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCombobox/ScalarComboboxMultiselect.vue"],"names":[],"mappings":"AA4DA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAGxD,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AA+BlD,iBAAS,cAAc;qBA+EM,GAAG;qBACF,GAAG;EAkBhC;AACD,QAAA,MAAM,eAAe;aA7HR,MAAM,EAAE,GAAG,WAAW,EAAE;iBACpB,MAAM,EAAE;kBACP,MAAM;kBACN,OAAO
|
|
1
|
+
{"version":3,"file":"ScalarComboboxMultiselect.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCombobox/ScalarComboboxMultiselect.vue"],"names":[],"mappings":"AA4DA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAGxD,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AA+BlD,iBAAS,cAAc;qBA+EM,GAAG;qBACF,GAAG;EAkBhC;AACD,QAAA,MAAM,eAAe;aA7HR,MAAM,EAAE,GAAG,WAAW,EAAE;iBACpB,MAAM,EAAE;kBACP,MAAM;kBACN,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAbzB,KApBqC,eAoBrC,KAnBc,uBAmBd,KAlBK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAkBL,KApBqC,eAoBrC,KAnBc,uBAmBd,KAlBK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA4BQ,MAAM,EAAE,GAAG,WAAW,EAAE;iBACpB,MAAM,EAAE;kBACP,MAAM;kBACN,OAAO;;;;UAkIvB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as d, ref as u, openBlock as t, createBlock as p, withCtx as n, createElementVNode as f, createCommentVNode as a, createElementBlock as b, renderSlot as
|
|
1
|
+
import { defineComponent as d, ref as u, openBlock as t, createBlock as p, withCtx as n, createElementVNode as f, createCommentVNode as a, createElementBlock as b, renderSlot as r } from "vue";
|
|
2
2
|
import c from "./ScalarComboboxOptions.vue.js";
|
|
3
3
|
import V from "./ScalarComboboxPopover.vue.js";
|
|
4
4
|
const y = { class: "divide-1 divide-y" }, v = {
|
|
@@ -13,13 +13,14 @@ const y = { class: "divide-1 divide-y" }, v = {
|
|
|
13
13
|
isDeletable: { type: Boolean },
|
|
14
14
|
placement: {},
|
|
15
15
|
resize: { type: Boolean },
|
|
16
|
+
targetRef: {},
|
|
16
17
|
isOpen: { type: Boolean },
|
|
17
18
|
teleport: { type: [Boolean, String] }
|
|
18
19
|
},
|
|
19
20
|
emits: ["update:modelValue", "delete"],
|
|
20
|
-
setup(B, { expose:
|
|
21
|
+
setup(B, { expose: i }) {
|
|
21
22
|
const s = u(null);
|
|
22
|
-
return
|
|
23
|
+
return i({ comboboxPopoverRef: s }), (e, o) => (t(), p(V, {
|
|
23
24
|
ref_key: "comboboxPopoverRef",
|
|
24
25
|
ref: s,
|
|
25
26
|
isOpen: e.isOpen,
|
|
@@ -41,12 +42,12 @@ const y = { class: "divide-1 divide-y" }, v = {
|
|
|
41
42
|
"onUpdate:modelValue": o[1] || (o[1] = (l) => e.$emit("update:modelValue", l))
|
|
42
43
|
}, null, 8, ["isDeletable", "modelValue", "open", "options", "placeholder"])) : a("", !0),
|
|
43
44
|
e.$slots.actions ? (t(), b("div", v, [
|
|
44
|
-
|
|
45
|
+
r(e.$slots, "actions")
|
|
45
46
|
])) : a("", !0)
|
|
46
47
|
])
|
|
47
48
|
]),
|
|
48
49
|
default: n(() => [
|
|
49
|
-
|
|
50
|
+
r(e.$slots, "default")
|
|
50
51
|
]),
|
|
51
52
|
_: 3
|
|
52
53
|
}, 8, ["isOpen", "placement", "resize", "teleport"]));
|
|
@@ -8,6 +8,9 @@ declare const meta: {
|
|
|
8
8
|
placement: {
|
|
9
9
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
10
10
|
};
|
|
11
|
+
targetRef: {
|
|
12
|
+
type: import("vue").PropType<HTMLElement>;
|
|
13
|
+
};
|
|
11
14
|
isOpen: {
|
|
12
15
|
type: import("vue").PropType<boolean>;
|
|
13
16
|
};
|
|
@@ -29,6 +32,9 @@ declare const meta: {
|
|
|
29
32
|
placement: {
|
|
30
33
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
31
34
|
};
|
|
35
|
+
targetRef: {
|
|
36
|
+
type: import("vue").PropType<HTMLElement>;
|
|
37
|
+
};
|
|
32
38
|
isOpen: {
|
|
33
39
|
type: import("vue").PropType<boolean>;
|
|
34
40
|
};
|
|
@@ -60,6 +66,9 @@ declare const meta: {
|
|
|
60
66
|
placement: {
|
|
61
67
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
62
68
|
};
|
|
69
|
+
targetRef: {
|
|
70
|
+
type: import("vue").PropType<HTMLElement>;
|
|
71
|
+
};
|
|
63
72
|
isOpen: {
|
|
64
73
|
type: import("vue").PropType<boolean>;
|
|
65
74
|
};
|
|
@@ -88,6 +97,9 @@ declare const meta: {
|
|
|
88
97
|
placement: {
|
|
89
98
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
90
99
|
};
|
|
100
|
+
targetRef: {
|
|
101
|
+
type: import("vue").PropType<HTMLElement>;
|
|
102
|
+
};
|
|
91
103
|
isOpen: {
|
|
92
104
|
type: import("vue").PropType<boolean>;
|
|
93
105
|
};
|
|
@@ -129,6 +141,9 @@ declare const meta: {
|
|
|
129
141
|
placement: {
|
|
130
142
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
131
143
|
};
|
|
144
|
+
targetRef: {
|
|
145
|
+
type: import("vue").PropType<HTMLElement>;
|
|
146
|
+
};
|
|
132
147
|
isOpen: {
|
|
133
148
|
type: import("vue").PropType<boolean>;
|
|
134
149
|
};
|
|
@@ -150,6 +165,9 @@ declare const meta: {
|
|
|
150
165
|
placement: {
|
|
151
166
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
152
167
|
};
|
|
168
|
+
targetRef: {
|
|
169
|
+
type: import("vue").PropType<HTMLElement>;
|
|
170
|
+
};
|
|
153
171
|
isOpen: {
|
|
154
172
|
type: import("vue").PropType<boolean>;
|
|
155
173
|
};
|
|
@@ -181,6 +199,9 @@ declare const meta: {
|
|
|
181
199
|
placement: {
|
|
182
200
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
183
201
|
};
|
|
202
|
+
targetRef: {
|
|
203
|
+
type: import("vue").PropType<HTMLElement>;
|
|
204
|
+
};
|
|
184
205
|
isOpen: {
|
|
185
206
|
type: import("vue").PropType<boolean>;
|
|
186
207
|
};
|
|
@@ -209,6 +230,9 @@ declare const meta: {
|
|
|
209
230
|
placement: {
|
|
210
231
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
211
232
|
};
|
|
233
|
+
targetRef: {
|
|
234
|
+
type: import("vue").PropType<HTMLElement>;
|
|
235
|
+
};
|
|
212
236
|
isOpen: {
|
|
213
237
|
type: import("vue").PropType<boolean>;
|
|
214
238
|
};
|
|
@@ -241,6 +265,9 @@ declare const meta: {
|
|
|
241
265
|
placement: {
|
|
242
266
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
243
267
|
};
|
|
268
|
+
targetRef: {
|
|
269
|
+
type: import("vue").PropType<HTMLElement>;
|
|
270
|
+
};
|
|
244
271
|
isOpen: {
|
|
245
272
|
type: import("vue").PropType<boolean>;
|
|
246
273
|
};
|
|
@@ -262,6 +289,9 @@ declare const meta: {
|
|
|
262
289
|
placement: {
|
|
263
290
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
264
291
|
};
|
|
292
|
+
targetRef: {
|
|
293
|
+
type: import("vue").PropType<HTMLElement>;
|
|
294
|
+
};
|
|
265
295
|
isOpen: {
|
|
266
296
|
type: import("vue").PropType<boolean>;
|
|
267
297
|
};
|
|
@@ -293,6 +323,9 @@ declare const meta: {
|
|
|
293
323
|
placement: {
|
|
294
324
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
295
325
|
};
|
|
326
|
+
targetRef: {
|
|
327
|
+
type: import("vue").PropType<HTMLElement>;
|
|
328
|
+
};
|
|
296
329
|
isOpen: {
|
|
297
330
|
type: import("vue").PropType<boolean>;
|
|
298
331
|
};
|
|
@@ -321,6 +354,9 @@ declare const meta: {
|
|
|
321
354
|
placement: {
|
|
322
355
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
323
356
|
};
|
|
357
|
+
targetRef: {
|
|
358
|
+
type: import("vue").PropType<HTMLElement>;
|
|
359
|
+
};
|
|
324
360
|
isOpen: {
|
|
325
361
|
type: import("vue").PropType<boolean>;
|
|
326
362
|
};
|
|
@@ -562,6 +598,9 @@ declare const meta: {
|
|
|
562
598
|
placement: {
|
|
563
599
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
564
600
|
};
|
|
601
|
+
targetRef: {
|
|
602
|
+
type: import("vue").PropType<HTMLElement>;
|
|
603
|
+
};
|
|
565
604
|
isOpen: {
|
|
566
605
|
type: import("vue").PropType<boolean>;
|
|
567
606
|
};
|
|
@@ -583,6 +622,9 @@ declare const meta: {
|
|
|
583
622
|
placement: {
|
|
584
623
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
585
624
|
};
|
|
625
|
+
targetRef: {
|
|
626
|
+
type: import("vue").PropType<HTMLElement>;
|
|
627
|
+
};
|
|
586
628
|
isOpen: {
|
|
587
629
|
type: import("vue").PropType<boolean>;
|
|
588
630
|
};
|
|
@@ -614,6 +656,9 @@ declare const meta: {
|
|
|
614
656
|
placement: {
|
|
615
657
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
616
658
|
};
|
|
659
|
+
targetRef: {
|
|
660
|
+
type: import("vue").PropType<HTMLElement>;
|
|
661
|
+
};
|
|
617
662
|
isOpen: {
|
|
618
663
|
type: import("vue").PropType<boolean>;
|
|
619
664
|
};
|
|
@@ -642,6 +687,9 @@ declare const meta: {
|
|
|
642
687
|
placement: {
|
|
643
688
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
644
689
|
};
|
|
690
|
+
targetRef: {
|
|
691
|
+
type: import("vue").PropType<HTMLElement>;
|
|
692
|
+
};
|
|
645
693
|
isOpen: {
|
|
646
694
|
type: import("vue").PropType<boolean>;
|
|
647
695
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarDropdown.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarDropdown/ScalarDropdown.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAOrD,QAAA,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"ScalarDropdown.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarDropdown/ScalarDropdown.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAOrD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqC6B,CAAA;AAEvC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,IAAI,EAAE,KAAU,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarDropdown.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarDropdown/ScalarDropdown.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScalarDropdown.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarDropdown/ScalarDropdown.vue"],"names":[],"mappings":"AAgDA,OAAO,EAAE,KAAK,eAAe,EAAkB,MAAM,mBAAmB,CAAA;AAuBxE,iBAAS,cAAc;qBAqGO,GAAG;mBACL,GAAG;EAkB9B;AACD,QAAA,MAAM,eAAe;aA3IN,OAAO;iBACH,OAAO;;;;;aADX,OAAO;iBACH,OAAO;;;;;YADX,OAAO;gBACH,OAAO;MAgJxB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,56 +1,58 @@
|
|
|
1
|
-
import { defineComponent as p, openBlock as
|
|
2
|
-
import { Menu as d, MenuItems as c, MenuButton as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as p, openBlock as o, createBlock as s, unref as a, withCtx as t, createVNode as l, mergeProps as f, renderSlot as r, createCommentVNode as m, createElementVNode as u } from "vue";
|
|
2
|
+
import { Menu as d, MenuItems as c, MenuButton as g } from "@headlessui/vue";
|
|
3
|
+
import y from "../ScalarFloating/ScalarFloating.vue.js";
|
|
4
|
+
const B = /* @__PURE__ */ u("div", { class: "absolute inset-0 -z-1 rounded bg-b-1 shadow-lg brightness-lifted" }, null, -1), R = /* @__PURE__ */ p({
|
|
5
5
|
inheritAttrs: !1,
|
|
6
6
|
__name: "ScalarDropdown",
|
|
7
7
|
props: {
|
|
8
8
|
placement: {},
|
|
9
9
|
resize: { type: Boolean },
|
|
10
|
+
targetRef: {},
|
|
10
11
|
isOpen: { type: Boolean },
|
|
11
12
|
teleport: { type: [Boolean, String] },
|
|
12
13
|
static: { type: Boolean, default: !1 },
|
|
13
14
|
staticOpen: { type: Boolean, default: !0 }
|
|
14
15
|
},
|
|
15
16
|
setup(h) {
|
|
16
|
-
return (e, O) => (
|
|
17
|
-
default: t(({ open:
|
|
18
|
-
l(
|
|
19
|
-
isOpen: e.static ? e.staticOpen :
|
|
17
|
+
return (e, O) => (o(), s(a(d), null, {
|
|
18
|
+
default: t(({ open: n }) => [
|
|
19
|
+
l(a(y), {
|
|
20
|
+
isOpen: e.static ? e.staticOpen : n ?? e.isOpen,
|
|
20
21
|
placement: e.placement ?? "bottom-start",
|
|
21
22
|
resize: e.resize,
|
|
23
|
+
targetRef: e.targetRef,
|
|
22
24
|
teleport: e.teleport
|
|
23
25
|
}, {
|
|
24
26
|
floating: t(({ width: i }) => [
|
|
25
|
-
l(
|
|
27
|
+
l(a(c), f({ class: "relative flex w-56 flex-col p-0.75" }, e.$attrs, {
|
|
26
28
|
static: e.static,
|
|
27
29
|
style: { width: i }
|
|
28
30
|
}), {
|
|
29
31
|
default: t(() => [
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
r(e.$slots, "items"),
|
|
33
|
+
B
|
|
32
34
|
]),
|
|
33
35
|
_: 2
|
|
34
36
|
}, 1040, ["static", "style"])
|
|
35
37
|
]),
|
|
36
38
|
default: t(() => [
|
|
37
|
-
e.static ?
|
|
39
|
+
e.static ? m("", !0) : (o(), s(a(g), {
|
|
38
40
|
key: 0,
|
|
39
41
|
as: "template"
|
|
40
42
|
}, {
|
|
41
43
|
default: t(() => [
|
|
42
|
-
|
|
44
|
+
r(e.$slots, "default")
|
|
43
45
|
]),
|
|
44
46
|
_: 3
|
|
45
47
|
}))
|
|
46
48
|
]),
|
|
47
49
|
_: 2
|
|
48
|
-
}, 1032, ["isOpen", "placement", "resize", "teleport"])
|
|
50
|
+
}, 1032, ["isOpen", "placement", "resize", "targetRef", "teleport"])
|
|
49
51
|
]),
|
|
50
52
|
_: 3
|
|
51
53
|
}));
|
|
52
54
|
}
|
|
53
55
|
});
|
|
54
56
|
export {
|
|
55
|
-
|
|
57
|
+
R as default
|
|
56
58
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarFloating.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarFloating/ScalarFloating.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScalarFloating.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarFloating/ScalarFloating.vue"],"names":[],"mappings":"AAiGA,OAAO,EACL,KAAK,cAAc,EAMpB,MAAM,kBAAkB,CAAA;AAGzB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAkE9C,iBAAS,cAAc;IAzDrB,kEAAkE;eACvD,GAAG;IACd,2BAA2B;oBACX;QACd,4FAA4F;QAC5F,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,6FAA6F;QAC7F,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,gDAAgD;QAChD,IAAI,CAAC,EAAE,cAAc,CAAA;KACtB,GAAG,GAAG;;IAVP,kEAAkE;eACvD,GAAG;IACd,2BAA2B;oBACX;QACd,4FAA4F;QAC5F,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,6FAA6F;QAC7F,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,gDAAgD;QAChD,IAAI,CAAC,EAAE,cAAc,CAAA;KACtB,GAAG,GAAG;EAiHR;AACD,QAAA,MAAM,eAAe,2SAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as w, ref as d, computed as
|
|
1
|
+
import { defineComponent as w, ref as d, computed as o, openBlock as p, createElementBlock as R, Fragment as z, createElementVNode as r, normalizeClass as S, renderSlot as f, createBlock as b, Teleport as k, normalizeStyle as B, unref as m, createCommentVNode as C } from "vue";
|
|
2
2
|
import { getSideAxis as c } from "@floating-ui/utils";
|
|
3
3
|
import { useFloating as E, autoUpdate as F, offset as _, flip as $, shift as A } from "@floating-ui/vue";
|
|
4
4
|
import { useResizeWithTarget as N } from "./useResizeWithTarget.js";
|
|
@@ -8,41 +8,42 @@ const O = { class: "scalar-app" }, H = /* @__PURE__ */ w({
|
|
|
8
8
|
props: {
|
|
9
9
|
placement: {},
|
|
10
10
|
resize: { type: Boolean },
|
|
11
|
+
targetRef: {},
|
|
11
12
|
middleware: {},
|
|
12
13
|
isOpen: { type: Boolean },
|
|
13
14
|
teleport: { type: [Boolean, String] }
|
|
14
15
|
},
|
|
15
16
|
setup(u) {
|
|
16
|
-
const
|
|
17
|
+
const t = u, n = d(null), a = d(null), i = o(
|
|
17
18
|
() => {
|
|
18
|
-
var e,
|
|
19
|
-
return (((
|
|
19
|
+
var e, l;
|
|
20
|
+
return (t.targetRef || ((l = (e = a.value) == null ? void 0 : e.children) == null ? void 0 : l[0]) || a.value) ?? void 0;
|
|
20
21
|
}
|
|
21
22
|
), s = N(i, {
|
|
22
|
-
enabled:
|
|
23
|
-
}), g =
|
|
24
|
-
() => c(
|
|
25
|
-
), h =
|
|
26
|
-
() => c(
|
|
23
|
+
enabled: o(() => t.resize)
|
|
24
|
+
}), g = o(
|
|
25
|
+
() => c(t.placement || "bottom") === "y" ? s.width.value : void 0
|
|
26
|
+
), h = o(
|
|
27
|
+
() => c(t.placement || "bottom") === "x" ? s.height.value : void 0
|
|
27
28
|
), { floatingStyles: v, middlewareData: y } = E(i, n, {
|
|
28
|
-
placement:
|
|
29
|
+
placement: o(() => t.placement),
|
|
29
30
|
whileElementsMounted: F,
|
|
30
|
-
middleware:
|
|
31
|
+
middleware: o(() => [
|
|
31
32
|
_(5),
|
|
32
33
|
$(),
|
|
33
34
|
A(),
|
|
34
|
-
...
|
|
35
|
+
...t.middleware ?? []
|
|
35
36
|
])
|
|
36
37
|
});
|
|
37
|
-
return (e,
|
|
38
|
+
return (e, l) => (p(), R(z, null, [
|
|
38
39
|
r("div", {
|
|
39
40
|
ref_key: "wrapperRef",
|
|
40
|
-
ref:
|
|
41
|
-
class:
|
|
41
|
+
ref: a,
|
|
42
|
+
class: S({ contents: !!e.$slots.default })
|
|
42
43
|
}, [
|
|
43
|
-
|
|
44
|
+
f(e.$slots, "default")
|
|
44
45
|
], 2),
|
|
45
|
-
e.isOpen ? (p(), k
|
|
46
|
+
e.isOpen ? (p(), b(k, {
|
|
46
47
|
key: 0,
|
|
47
48
|
disabled: !e.teleport,
|
|
48
49
|
to: typeof e.teleport == "string" ? e.teleport : "body"
|
|
@@ -52,10 +53,10 @@ const O = { class: "scalar-app" }, H = /* @__PURE__ */ w({
|
|
|
52
53
|
ref_key: "floatingRef",
|
|
53
54
|
ref: n,
|
|
54
55
|
class: "relative z-overlay",
|
|
55
|
-
style:
|
|
56
|
+
style: B(m(v))
|
|
56
57
|
}, [
|
|
57
|
-
|
|
58
|
-
data:
|
|
58
|
+
f(e.$slots, "floating", {
|
|
59
|
+
data: m(y),
|
|
59
60
|
height: h.value,
|
|
60
61
|
width: g.value
|
|
61
62
|
})
|
|
@@ -10,6 +10,11 @@ export type FloatingOptions = {
|
|
|
10
10
|
* If enabled it will set `width` slot prop of the floating slot
|
|
11
11
|
*/
|
|
12
12
|
resize?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Override the targetRef, useful if we are not passing a button
|
|
15
|
+
* into the slot but is controlled from an external button
|
|
16
|
+
*/
|
|
17
|
+
targetRef?: HTMLElement;
|
|
13
18
|
/**
|
|
14
19
|
* Floating UI Middleware to be passed to Floating UI
|
|
15
20
|
* @see https://floating-ui.com/docs/computePosition#middleware
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarFloating/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarFloating/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAG7D,MAAM,MAAM,eAAe,GAAG;IAC5B;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;;OAGG;IACH,SAAS,CAAC,EAAE,WAAW,CAAA;IACvB;;;OAGG;IACH,UAAU,CAAC,EAAE,UAAU,EAAE,CAAA;IACzB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;CAC5B,CAAA"}
|
|
@@ -16,6 +16,9 @@ declare const meta: {
|
|
|
16
16
|
placement: {
|
|
17
17
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
18
18
|
};
|
|
19
|
+
targetRef: {
|
|
20
|
+
type: import("vue").PropType<HTMLElement>;
|
|
21
|
+
};
|
|
19
22
|
isOpen: {
|
|
20
23
|
type: import("vue").PropType<boolean>;
|
|
21
24
|
};
|
|
@@ -50,6 +53,9 @@ declare const meta: {
|
|
|
50
53
|
placement: {
|
|
51
54
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
52
55
|
};
|
|
56
|
+
targetRef: {
|
|
57
|
+
type: import("vue").PropType<HTMLElement>;
|
|
58
|
+
};
|
|
53
59
|
isOpen: {
|
|
54
60
|
type: import("vue").PropType<boolean>;
|
|
55
61
|
};
|
|
@@ -91,6 +97,9 @@ declare const meta: {
|
|
|
91
97
|
placement: {
|
|
92
98
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
93
99
|
};
|
|
100
|
+
targetRef: {
|
|
101
|
+
type: import("vue").PropType<HTMLElement>;
|
|
102
|
+
};
|
|
94
103
|
isOpen: {
|
|
95
104
|
type: import("vue").PropType<boolean>;
|
|
96
105
|
};
|
|
@@ -129,6 +138,9 @@ declare const meta: {
|
|
|
129
138
|
placement: {
|
|
130
139
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
131
140
|
};
|
|
141
|
+
targetRef: {
|
|
142
|
+
type: import("vue").PropType<HTMLElement>;
|
|
143
|
+
};
|
|
132
144
|
isOpen: {
|
|
133
145
|
type: import("vue").PropType<boolean>;
|
|
134
146
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarListbox.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarListbox/ScalarListbox.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAKrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAErC,QAAA,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"ScalarListbox.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarListbox/ScalarListbox.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAKrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAErC,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAY4B,CAAA;AAEtC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,IAAI,EAAE,KAkClB,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as b, openBlock as n, createBlock as u, unref as t, normalizeClass as s, withCtx as a, createVNode as r, mergeProps as
|
|
1
|
+
import { defineComponent as b, openBlock as n, createBlock as u, unref as t, normalizeClass as s, withCtx as a, createVNode as r, mergeProps as g, createElementBlock as y, Fragment as v, renderList as x, createElementVNode as o, toDisplayString as h, renderSlot as B } from "vue";
|
|
2
2
|
import { Listbox as V, ListboxOptions as k, ListboxOption as z, ListboxButton as w } from "@headlessui/vue";
|
|
3
3
|
import { cva as L, cx as O } from "../../cva.js";
|
|
4
4
|
import S from "../ScalarFloating/ScalarFloating.vue.js";
|
|
@@ -14,6 +14,7 @@ const $ = /* @__PURE__ */ o("div", { class: "absolute inset-0 -z-1 rounded bg-b-
|
|
|
14
14
|
id: {},
|
|
15
15
|
placement: {},
|
|
16
16
|
resize: { type: Boolean },
|
|
17
|
+
targetRef: {},
|
|
17
18
|
isOpen: { type: Boolean },
|
|
18
19
|
teleport: { type: [Boolean, String] }
|
|
19
20
|
},
|
|
@@ -51,12 +52,12 @@ const $ = /* @__PURE__ */ o("div", { class: "absolute inset-0 -z-1 rounded bg-b-
|
|
|
51
52
|
teleport: e.teleport
|
|
52
53
|
}, {
|
|
53
54
|
floating: a(({ width: f }) => [
|
|
54
|
-
r(t(k),
|
|
55
|
+
r(t(k), g({
|
|
55
56
|
class: "relative flex w-40 flex-col rounded border p-0.75",
|
|
56
57
|
style: { width: f }
|
|
57
58
|
}, e.$attrs), {
|
|
58
59
|
default: a(() => [
|
|
59
|
-
(n(!0),
|
|
60
|
+
(n(!0), y(v, null, x(e.options, (l) => (n(), u(t(z), {
|
|
60
61
|
key: l.id,
|
|
61
62
|
as: "template",
|
|
62
63
|
disabled: l.disabled,
|
|
@@ -8,6 +8,9 @@ declare const meta: {
|
|
|
8
8
|
placement: {
|
|
9
9
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
10
10
|
};
|
|
11
|
+
targetRef: {
|
|
12
|
+
type: import("vue").PropType<HTMLElement>;
|
|
13
|
+
};
|
|
11
14
|
isOpen: {
|
|
12
15
|
type: import("vue").PropType<boolean>;
|
|
13
16
|
};
|
|
@@ -21,6 +24,9 @@ declare const meta: {
|
|
|
21
24
|
placement: {
|
|
22
25
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
23
26
|
};
|
|
27
|
+
targetRef: {
|
|
28
|
+
type: import("vue").PropType<HTMLElement>;
|
|
29
|
+
};
|
|
24
30
|
isOpen: {
|
|
25
31
|
type: import("vue").PropType<boolean>;
|
|
26
32
|
};
|
|
@@ -41,6 +47,9 @@ declare const meta: {
|
|
|
41
47
|
placement: {
|
|
42
48
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
43
49
|
};
|
|
50
|
+
targetRef: {
|
|
51
|
+
type: import("vue").PropType<HTMLElement>;
|
|
52
|
+
};
|
|
44
53
|
isOpen: {
|
|
45
54
|
type: import("vue").PropType<boolean>;
|
|
46
55
|
};
|
|
@@ -58,6 +67,9 @@ declare const meta: {
|
|
|
58
67
|
placement: {
|
|
59
68
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
60
69
|
};
|
|
70
|
+
targetRef: {
|
|
71
|
+
type: import("vue").PropType<HTMLElement>;
|
|
72
|
+
};
|
|
61
73
|
isOpen: {
|
|
62
74
|
type: import("vue").PropType<boolean>;
|
|
63
75
|
};
|
|
@@ -88,6 +100,9 @@ declare const meta: {
|
|
|
88
100
|
placement: {
|
|
89
101
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
90
102
|
};
|
|
103
|
+
targetRef: {
|
|
104
|
+
type: import("vue").PropType<HTMLElement>;
|
|
105
|
+
};
|
|
91
106
|
isOpen: {
|
|
92
107
|
type: import("vue").PropType<boolean>;
|
|
93
108
|
};
|
|
@@ -101,6 +116,9 @@ declare const meta: {
|
|
|
101
116
|
placement: {
|
|
102
117
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
103
118
|
};
|
|
119
|
+
targetRef: {
|
|
120
|
+
type: import("vue").PropType<HTMLElement>;
|
|
121
|
+
};
|
|
104
122
|
isOpen: {
|
|
105
123
|
type: import("vue").PropType<boolean>;
|
|
106
124
|
};
|
|
@@ -121,6 +139,9 @@ declare const meta: {
|
|
|
121
139
|
placement: {
|
|
122
140
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
123
141
|
};
|
|
142
|
+
targetRef: {
|
|
143
|
+
type: import("vue").PropType<HTMLElement>;
|
|
144
|
+
};
|
|
124
145
|
isOpen: {
|
|
125
146
|
type: import("vue").PropType<boolean>;
|
|
126
147
|
};
|
|
@@ -138,6 +159,9 @@ declare const meta: {
|
|
|
138
159
|
placement: {
|
|
139
160
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
140
161
|
};
|
|
162
|
+
targetRef: {
|
|
163
|
+
type: import("vue").PropType<HTMLElement>;
|
|
164
|
+
};
|
|
141
165
|
isOpen: {
|
|
142
166
|
type: import("vue").PropType<boolean>;
|
|
143
167
|
};
|
|
@@ -159,6 +183,9 @@ declare const meta: {
|
|
|
159
183
|
placement: {
|
|
160
184
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
161
185
|
};
|
|
186
|
+
targetRef: {
|
|
187
|
+
type: import("vue").PropType<HTMLElement>;
|
|
188
|
+
};
|
|
162
189
|
isOpen: {
|
|
163
190
|
type: import("vue").PropType<boolean>;
|
|
164
191
|
};
|
|
@@ -172,6 +199,9 @@ declare const meta: {
|
|
|
172
199
|
placement: {
|
|
173
200
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
174
201
|
};
|
|
202
|
+
targetRef: {
|
|
203
|
+
type: import("vue").PropType<HTMLElement>;
|
|
204
|
+
};
|
|
175
205
|
isOpen: {
|
|
176
206
|
type: import("vue").PropType<boolean>;
|
|
177
207
|
};
|
|
@@ -192,6 +222,9 @@ declare const meta: {
|
|
|
192
222
|
placement: {
|
|
193
223
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
194
224
|
};
|
|
225
|
+
targetRef: {
|
|
226
|
+
type: import("vue").PropType<HTMLElement>;
|
|
227
|
+
};
|
|
195
228
|
isOpen: {
|
|
196
229
|
type: import("vue").PropType<boolean>;
|
|
197
230
|
};
|
|
@@ -209,6 +242,9 @@ declare const meta: {
|
|
|
209
242
|
placement: {
|
|
210
243
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
211
244
|
};
|
|
245
|
+
targetRef: {
|
|
246
|
+
type: import("vue").PropType<HTMLElement>;
|
|
247
|
+
};
|
|
212
248
|
isOpen: {
|
|
213
249
|
type: import("vue").PropType<boolean>;
|
|
214
250
|
};
|
|
@@ -393,6 +429,9 @@ declare const meta: {
|
|
|
393
429
|
placement: {
|
|
394
430
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
395
431
|
};
|
|
432
|
+
targetRef: {
|
|
433
|
+
type: import("vue").PropType<HTMLElement>;
|
|
434
|
+
};
|
|
396
435
|
isOpen: {
|
|
397
436
|
type: import("vue").PropType<boolean>;
|
|
398
437
|
};
|
|
@@ -406,6 +445,9 @@ declare const meta: {
|
|
|
406
445
|
placement: {
|
|
407
446
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
408
447
|
};
|
|
448
|
+
targetRef: {
|
|
449
|
+
type: import("vue").PropType<HTMLElement>;
|
|
450
|
+
};
|
|
409
451
|
isOpen: {
|
|
410
452
|
type: import("vue").PropType<boolean>;
|
|
411
453
|
};
|
|
@@ -426,6 +468,9 @@ declare const meta: {
|
|
|
426
468
|
placement: {
|
|
427
469
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
428
470
|
};
|
|
471
|
+
targetRef: {
|
|
472
|
+
type: import("vue").PropType<HTMLElement>;
|
|
473
|
+
};
|
|
429
474
|
isOpen: {
|
|
430
475
|
type: import("vue").PropType<boolean>;
|
|
431
476
|
};
|
|
@@ -443,6 +488,9 @@ declare const meta: {
|
|
|
443
488
|
placement: {
|
|
444
489
|
type: import("vue").PropType<import("@floating-ui/vue").Placement>;
|
|
445
490
|
};
|
|
491
|
+
targetRef: {
|
|
492
|
+
type: import("vue").PropType<HTMLElement>;
|
|
493
|
+
};
|
|
446
494
|
isOpen: {
|
|
447
495
|
type: import("vue").PropType<boolean>;
|
|
448
496
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarPopover.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarPopover/ScalarPopover.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAKrD,QAAA,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"ScalarPopover.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarPopover/ScalarPopover.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAKrD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiC4B,CAAA;AAEtC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,IAAI,EAAE,KAAU,CAAA"}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { defineComponent as i, openBlock as f, createBlock as d, unref as o, withCtx as t, createVNode as r, mergeProps as l, renderSlot as s, createElementVNode as m } from "vue";
|
|
2
2
|
import { Popover as u, PopoverPanel as c, PopoverButton as _ } from "@headlessui/vue";
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import g from "../ScalarFloating/ScalarFloating.vue.js";
|
|
4
|
+
const v = /* @__PURE__ */ m("div", { class: "absolute inset-0 -z-1 rounded bg-b-1 shadow-lg brightness-lifted" }, null, -1), b = /* @__PURE__ */ i({
|
|
5
5
|
inheritAttrs: !1,
|
|
6
6
|
__name: "ScalarPopover",
|
|
7
7
|
props: {
|
|
8
8
|
placement: {},
|
|
9
9
|
resize: { type: Boolean },
|
|
10
|
+
targetRef: {},
|
|
10
11
|
isOpen: { type: Boolean },
|
|
11
12
|
teleport: { type: [Boolean, String] }
|
|
12
13
|
},
|
|
13
14
|
setup(h) {
|
|
14
15
|
return (e, B) => (f(), d(o(u), { as: "template" }, {
|
|
15
16
|
default: t(({ open: p }) => [
|
|
16
|
-
r(o(
|
|
17
|
+
r(o(g), l(e.$props, {
|
|
17
18
|
isOpen: p ?? e.isOpen,
|
|
18
19
|
teleport: e.teleport
|
|
19
20
|
}), {
|
|
@@ -24,7 +25,7 @@ const g = /* @__PURE__ */ m("div", { class: "absolute inset-0 -z-1 rounded bg-b-
|
|
|
24
25
|
}, e.$attrs), {
|
|
25
26
|
default: t(() => [
|
|
26
27
|
s(e.$slots, "popover"),
|
|
27
|
-
|
|
28
|
+
v
|
|
28
29
|
]),
|
|
29
30
|
_: 2
|
|
30
31
|
}, 1040, ["style"])
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"url": "https://github.com/scalar/scalar.git",
|
|
11
11
|
"directory": "packages/components"
|
|
12
12
|
},
|
|
13
|
-
"version": "0.12.
|
|
13
|
+
"version": "0.12.46",
|
|
14
14
|
"engines": {
|
|
15
15
|
"node": ">=18"
|
|
16
16
|
},
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
"vite-plugin-dts": "^3.6.3",
|
|
71
71
|
"vite-svg-loader": "^5.1.0",
|
|
72
72
|
"vitest": "^1.6.0",
|
|
73
|
-
"@scalar/
|
|
73
|
+
"@scalar/themes": "0.9.30",
|
|
74
74
|
"@scalar/use-toasts": "0.7.6",
|
|
75
|
-
"@scalar/
|
|
75
|
+
"@scalar/build-tooling": "0.1.10"
|
|
76
76
|
},
|
|
77
77
|
"scripts": {
|
|
78
78
|
"build": "pnpm typegen:icons && pnpm build-only",
|