@cfasim-ui/components 0.6.4 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/MultiSelect/MultiSelect.d.ts +4 -6
- package/dist/NumberInput/NumberInput.d.ts +4 -5
- package/dist/{ParamEditorImpl-BD3kPsrQ.js → ParamEditorImpl-D0xZTyAN.js} +11 -11
- package/dist/SelectBox/SelectBox.d.ts +4 -5
- package/dist/SelectBox-CByXZfaC.js +569 -0
- package/dist/TextInput/TextInput.d.ts +4 -5
- package/dist/ToggleGroup/ToggleGroup.d.ts +4 -6
- package/dist/_internal/FieldLabel.d.ts +10 -0
- package/dist/_internal/field.d.ts +22 -0
- package/dist/index.css +1 -1
- package/dist/index.js +391 -732
- package/package.json +2 -2
- package/dist/SelectBox-Bg7Qhmy7.js +0 -219
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cfasim-ui/components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Vue 3 UI components for cfasim-ui",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"smol-toml": "^1.6.1",
|
|
39
39
|
"vue-codemirror": "^6.1.1",
|
|
40
40
|
"yaml": "^2.9.0",
|
|
41
|
-
"@cfasim-ui/shared": "0.
|
|
41
|
+
"@cfasim-ui/shared": "0.7.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"vue": "^3.5.0"
|
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
import { Fragment as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, createVNode as o, defineComponent as s, mergeModels as c, normalizeClass as l, normalizeStyle as u, openBlock as d, renderList as f, renderSlot as p, toDisplayString as m, unref as h, useModel as g, withCtx as _ } from "vue";
|
|
2
|
-
import { ComboboxAnchor as v, ComboboxContent as y, ComboboxEmpty as b, ComboboxInput as x, ComboboxItem as S, ComboboxItemIndicator as C, ComboboxPortal as w, ComboboxRoot as T, ComboboxTrigger as E, ComboboxViewport as D, Primitive as O, SelectContent as k, SelectItem as A, SelectItemIndicator as j, SelectItemText as M, SelectPortal as N, SelectRoot as P, SelectTrigger as F, SelectValue as I, SelectViewport as L, useId as R } from "reka-ui";
|
|
3
|
-
//#region src/Box/Box.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var z = ["role"], B = /* @__PURE__ */ s({
|
|
5
|
-
__name: "Box",
|
|
6
|
-
props: {
|
|
7
|
-
variant: {},
|
|
8
|
-
bgColor: {},
|
|
9
|
-
textColor: {},
|
|
10
|
-
role: {}
|
|
11
|
-
},
|
|
12
|
-
setup(e) {
|
|
13
|
-
return (t, n) => (d(), r("div", {
|
|
14
|
-
class: l(["box", e.variant ? `box-${e.variant}` : void 0]),
|
|
15
|
-
style: u({
|
|
16
|
-
backgroundColor: e.bgColor,
|
|
17
|
-
color: e.textColor
|
|
18
|
-
}),
|
|
19
|
-
role: e.role
|
|
20
|
-
}, [p(t.$slots, "default", {}, void 0, !0)], 14, z));
|
|
21
|
-
}
|
|
22
|
-
}), V = (e, t) => {
|
|
23
|
-
let n = e.__vccOpts || e;
|
|
24
|
-
for (let [e, r] of t) n[e] = r;
|
|
25
|
-
return n;
|
|
26
|
-
}, H = /* @__PURE__ */ V(B, [["__scopeId", "data-v-d7342c02"]]), U = /* @__PURE__ */ V(/* @__PURE__ */ s({
|
|
27
|
-
__name: "Button",
|
|
28
|
-
props: {
|
|
29
|
-
label: {},
|
|
30
|
-
variant: { default: "primary" },
|
|
31
|
-
asChild: { type: Boolean },
|
|
32
|
-
as: { default: "button" }
|
|
33
|
-
},
|
|
34
|
-
emits: ["click"],
|
|
35
|
-
setup(e) {
|
|
36
|
-
return (n, r) => (d(), t(h(O), {
|
|
37
|
-
class: "button",
|
|
38
|
-
"data-variant": e.variant,
|
|
39
|
-
as: e.as,
|
|
40
|
-
"as-child": e.asChild,
|
|
41
|
-
onClick: r[0] ||= (e) => n.$emit("click", e)
|
|
42
|
-
}, {
|
|
43
|
-
default: _(() => [p(n.$slots, "default", {}, () => [a(m(e.label), 1)], !0)]),
|
|
44
|
-
_: 3
|
|
45
|
-
}, 8, [
|
|
46
|
-
"data-variant",
|
|
47
|
-
"as",
|
|
48
|
-
"as-child"
|
|
49
|
-
]));
|
|
50
|
-
}
|
|
51
|
-
}), [["__scopeId", "data-v-250eab18"]]), W = { class: "select-box" }, G = ["id", "for"], K = /* @__PURE__ */ V(/* @__PURE__ */ s({
|
|
52
|
-
__name: "SelectBox",
|
|
53
|
-
props: /* @__PURE__ */ c({
|
|
54
|
-
label: {},
|
|
55
|
-
hideLabel: { type: Boolean },
|
|
56
|
-
ariaLabel: {},
|
|
57
|
-
options: {},
|
|
58
|
-
placeholder: {},
|
|
59
|
-
autocomplete: { type: Boolean }
|
|
60
|
-
}, {
|
|
61
|
-
modelValue: {},
|
|
62
|
-
modelModifiers: {}
|
|
63
|
-
}),
|
|
64
|
-
emits: ["update:modelValue"],
|
|
65
|
-
setup(s) {
|
|
66
|
-
let c = g(s, "modelValue"), u = s, p = R();
|
|
67
|
-
function O(e) {
|
|
68
|
-
return u.options.find((t) => t.value === e)?.label ?? "";
|
|
69
|
-
}
|
|
70
|
-
return (g, R) => (d(), r("div", W, [s.label ? (d(), r("label", {
|
|
71
|
-
key: 0,
|
|
72
|
-
id: `${h(p)}-label`,
|
|
73
|
-
for: s.autocomplete ? `${h(p)}-input` : void 0,
|
|
74
|
-
class: l(["select-label", { "visually-hidden": s.hideLabel }])
|
|
75
|
-
}, m(s.label), 11, G)) : n("", !0), s.autocomplete ? (d(), t(h(T), {
|
|
76
|
-
key: 1,
|
|
77
|
-
modelValue: c.value,
|
|
78
|
-
"onUpdate:modelValue": R[0] ||= (e) => c.value = e,
|
|
79
|
-
"open-on-click": "",
|
|
80
|
-
class: "select-combobox-root"
|
|
81
|
-
}, {
|
|
82
|
-
default: _(() => [o(h(v), { class: "select-anchor" }, {
|
|
83
|
-
default: _(() => [o(h(x), {
|
|
84
|
-
id: `${h(p)}-input`,
|
|
85
|
-
class: "select-input",
|
|
86
|
-
"display-value": O,
|
|
87
|
-
placeholder: s.placeholder,
|
|
88
|
-
"aria-labelledby": u.label ? `${h(p)}-label` : void 0,
|
|
89
|
-
"aria-label": u.label ? void 0 : u.ariaLabel
|
|
90
|
-
}, null, 8, [
|
|
91
|
-
"id",
|
|
92
|
-
"placeholder",
|
|
93
|
-
"aria-labelledby",
|
|
94
|
-
"aria-label"
|
|
95
|
-
]), o(h(E), {
|
|
96
|
-
class: "select-icon-button",
|
|
97
|
-
"aria-label": "Toggle options"
|
|
98
|
-
}, {
|
|
99
|
-
default: _(() => [...R[2] ||= [i("span", {
|
|
100
|
-
class: "select-icon",
|
|
101
|
-
"aria-hidden": "true"
|
|
102
|
-
}, [i("svg", {
|
|
103
|
-
width: "12",
|
|
104
|
-
height: "12",
|
|
105
|
-
viewBox: "0 0 12 12",
|
|
106
|
-
fill: "none",
|
|
107
|
-
stroke: "currentColor",
|
|
108
|
-
"stroke-width": "2",
|
|
109
|
-
"stroke-linecap": "round",
|
|
110
|
-
"stroke-linejoin": "round"
|
|
111
|
-
}, [i("path", { d: "M3 4.5L6 7.5L9 4.5" })])], -1)]]),
|
|
112
|
-
_: 1
|
|
113
|
-
})]),
|
|
114
|
-
_: 1
|
|
115
|
-
}), o(h(w), null, {
|
|
116
|
-
default: _(() => [o(h(y), {
|
|
117
|
-
class: "select-content select-content-autocomplete",
|
|
118
|
-
position: "popper",
|
|
119
|
-
"side-offset": 4,
|
|
120
|
-
"body-lock": !1
|
|
121
|
-
}, {
|
|
122
|
-
default: _(() => [o(h(D), { class: "select-viewport" }, {
|
|
123
|
-
default: _(() => [o(h(b), { class: "select-empty" }, {
|
|
124
|
-
default: _(() => [...R[3] ||= [a("No matches", -1)]]),
|
|
125
|
-
_: 1
|
|
126
|
-
}), (d(!0), r(e, null, f(s.options, (e) => (d(), t(h(S), {
|
|
127
|
-
key: e.value,
|
|
128
|
-
value: e.value,
|
|
129
|
-
class: "select-item"
|
|
130
|
-
}, {
|
|
131
|
-
default: _(() => [i("span", null, m(e.label), 1), o(h(C), { class: "select-indicator" }, {
|
|
132
|
-
default: _(() => [...R[4] ||= [i("svg", {
|
|
133
|
-
width: "12",
|
|
134
|
-
height: "12",
|
|
135
|
-
viewBox: "0 0 12 12",
|
|
136
|
-
fill: "none",
|
|
137
|
-
stroke: "currentColor",
|
|
138
|
-
"stroke-width": "2",
|
|
139
|
-
"stroke-linecap": "round",
|
|
140
|
-
"stroke-linejoin": "round"
|
|
141
|
-
}, [i("path", { d: "M2 6L5 9L10 3" })], -1)]]),
|
|
142
|
-
_: 1
|
|
143
|
-
})]),
|
|
144
|
-
_: 2
|
|
145
|
-
}, 1032, ["value"]))), 128))]),
|
|
146
|
-
_: 1
|
|
147
|
-
})]),
|
|
148
|
-
_: 1
|
|
149
|
-
})]),
|
|
150
|
-
_: 1
|
|
151
|
-
})]),
|
|
152
|
-
_: 1
|
|
153
|
-
}, 8, ["modelValue"])) : (d(), t(h(P), {
|
|
154
|
-
key: 2,
|
|
155
|
-
modelValue: c.value,
|
|
156
|
-
"onUpdate:modelValue": R[1] ||= (e) => c.value = e
|
|
157
|
-
}, {
|
|
158
|
-
default: _(() => [o(h(F), {
|
|
159
|
-
class: "select-trigger",
|
|
160
|
-
"aria-labelledby": u.label ? `${h(p)}-label` : void 0,
|
|
161
|
-
"aria-label": u.label ? void 0 : u.ariaLabel
|
|
162
|
-
}, {
|
|
163
|
-
default: _(() => [o(h(I), { placeholder: s.placeholder }, null, 8, ["placeholder"]), R[5] ||= i("span", {
|
|
164
|
-
class: "select-icon",
|
|
165
|
-
"aria-hidden": "true"
|
|
166
|
-
}, [i("svg", {
|
|
167
|
-
width: "12",
|
|
168
|
-
height: "12",
|
|
169
|
-
viewBox: "0 0 12 12",
|
|
170
|
-
fill: "none",
|
|
171
|
-
stroke: "currentColor",
|
|
172
|
-
"stroke-width": "2",
|
|
173
|
-
"stroke-linecap": "round",
|
|
174
|
-
"stroke-linejoin": "round"
|
|
175
|
-
}, [i("path", { d: "M3 4.5L6 7.5L9 4.5" })])], -1)]),
|
|
176
|
-
_: 1
|
|
177
|
-
}, 8, ["aria-labelledby", "aria-label"]), o(h(N), null, {
|
|
178
|
-
default: _(() => [o(h(k), {
|
|
179
|
-
class: "select-content",
|
|
180
|
-
position: "popper",
|
|
181
|
-
"side-offset": 4,
|
|
182
|
-
"body-lock": !1
|
|
183
|
-
}, {
|
|
184
|
-
default: _(() => [o(h(L), { class: "select-viewport" }, {
|
|
185
|
-
default: _(() => [(d(!0), r(e, null, f(s.options, (e) => (d(), t(h(A), {
|
|
186
|
-
key: e.value,
|
|
187
|
-
value: e.value,
|
|
188
|
-
class: "select-item"
|
|
189
|
-
}, {
|
|
190
|
-
default: _(() => [o(h(M), null, {
|
|
191
|
-
default: _(() => [a(m(e.label), 1)]),
|
|
192
|
-
_: 2
|
|
193
|
-
}, 1024), o(h(j), { class: "select-indicator" }, {
|
|
194
|
-
default: _(() => [...R[6] ||= [i("svg", {
|
|
195
|
-
width: "12",
|
|
196
|
-
height: "12",
|
|
197
|
-
viewBox: "0 0 12 12",
|
|
198
|
-
fill: "none",
|
|
199
|
-
stroke: "currentColor",
|
|
200
|
-
"stroke-width": "2",
|
|
201
|
-
"stroke-linecap": "round",
|
|
202
|
-
"stroke-linejoin": "round"
|
|
203
|
-
}, [i("path", { d: "M2 6L5 9L10 3" })], -1)]]),
|
|
204
|
-
_: 1
|
|
205
|
-
})]),
|
|
206
|
-
_: 2
|
|
207
|
-
}, 1032, ["value"]))), 128))]),
|
|
208
|
-
_: 1
|
|
209
|
-
})]),
|
|
210
|
-
_: 1
|
|
211
|
-
})]),
|
|
212
|
-
_: 1
|
|
213
|
-
})]),
|
|
214
|
-
_: 1
|
|
215
|
-
}, 8, ["modelValue"]))]));
|
|
216
|
-
}
|
|
217
|
-
}), [["__scopeId", "data-v-6210bde2"]]);
|
|
218
|
-
//#endregion
|
|
219
|
-
export { V as i, U as n, H as r, K as t };
|