@scalar/components 0.14.37 → 0.14.38
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/ScalarCheckboxInput/ScalarCheckbox.vue.d.ts +23 -0
- package/dist/components/ScalarCheckboxInput/ScalarCheckbox.vue.d.ts.map +1 -0
- package/dist/components/ScalarCheckboxInput/ScalarCheckbox.vue.js +27 -0
- package/dist/components/ScalarCheckboxInput/ScalarCheckbox.vue2.js +4 -0
- package/dist/components/ScalarCheckboxInput/ScalarCheckboxGroup.vue.d.ts +21 -0
- package/dist/components/ScalarCheckboxInput/ScalarCheckboxGroup.vue.d.ts.map +1 -0
- package/dist/components/ScalarCheckboxInput/ScalarCheckboxGroup.vue.js +37 -0
- package/dist/components/ScalarCheckboxInput/ScalarCheckboxGroup.vue2.js +4 -0
- package/dist/components/ScalarCheckboxInput/ScalarCheckboxInput.vue.d.ts +33 -0
- package/dist/components/ScalarCheckboxInput/ScalarCheckboxInput.vue.d.ts.map +1 -0
- package/dist/components/ScalarCheckboxInput/ScalarCheckboxInput.vue.js +45 -0
- package/dist/components/ScalarCheckboxInput/ScalarCheckboxInput.vue2.js +4 -0
- package/dist/components/ScalarCheckboxInput/ScalarCheckboxRadioGroup.vue.d.ts +21 -0
- package/dist/components/ScalarCheckboxInput/ScalarCheckboxRadioGroup.vue.d.ts.map +1 -0
- package/dist/components/ScalarCheckboxInput/ScalarCheckboxRadioGroup.vue.js +38 -0
- package/dist/components/ScalarCheckboxInput/ScalarCheckboxRadioGroup.vue2.js +4 -0
- package/dist/components/ScalarCheckboxInput/index.d.ts +6 -0
- package/dist/components/ScalarCheckboxInput/index.d.ts.map +1 -0
- package/dist/components/ScalarCheckboxInput/types.d.ts +7 -0
- package/dist/components/ScalarCheckboxInput/types.d.ts.map +1 -0
- package/dist/components/ScalarFileUpload/ScalarFileUpload.vue.d.ts +1 -1
- package/dist/components/ScalarForm/ScalarFormInput.vue.d.ts +28 -0
- package/dist/components/ScalarForm/ScalarFormInput.vue.d.ts.map +1 -0
- package/dist/components/ScalarForm/ScalarFormInput.vue.js +39 -0
- package/dist/components/ScalarForm/ScalarFormInput.vue2.js +4 -0
- package/dist/components/ScalarForm/ScalarFormInputGroup.vue.d.ts +39 -0
- package/dist/components/ScalarForm/ScalarFormInputGroup.vue.d.ts.map +1 -0
- package/dist/components/ScalarForm/ScalarFormInputGroup.vue.js +23 -0
- package/dist/components/ScalarForm/ScalarFormInputGroup.vue2.js +4 -0
- package/dist/components/ScalarForm/ScalarFormSection.vue.js +5 -5
- package/dist/components/ScalarForm/index.d.ts +3 -1
- package/dist/components/ScalarForm/index.d.ts.map +1 -1
- package/dist/components/ScalarForm/useFormGroups.d.ts +18 -0
- package/dist/components/ScalarForm/useFormGroups.d.ts.map +1 -0
- package/dist/components/ScalarForm/useFormGroups.js +9 -0
- package/dist/components/ScalarListbox/ScalarListboxInput.vue.d.ts +24 -0
- package/dist/components/ScalarListbox/ScalarListboxInput.vue.d.ts.map +1 -0
- package/dist/components/ScalarListbox/ScalarListboxInput.vue.js +26 -0
- package/dist/components/ScalarListbox/ScalarListboxInput.vue2.js +4 -0
- package/dist/components/ScalarListbox/index.d.ts +2 -1
- package/dist/components/ScalarListbox/index.d.ts.map +1 -1
- package/dist/components/ScalarMarkdown/ScalarMarkdown.vue.d.ts.map +1 -1
- package/dist/components/ScalarMarkdown/samples/index.d.ts +1 -1
- package/dist/components/ScalarMarkdown/samples/tables.d.ts +1 -1
- package/dist/components/ScalarMarkdown/samples/tables.d.ts.map +1 -1
- package/dist/components/ScalarTextArea/ScalarTextArea.vue.d.ts.map +1 -1
- package/dist/components/ScalarTextArea/ScalarTextArea.vue.js +27 -28
- package/dist/components/ScalarTextInput/ScalarTextInput.vue.d.ts +4 -0
- package/dist/components/ScalarTextInput/ScalarTextInput.vue.d.ts.map +1 -1
- package/dist/components/ScalarTextInput/ScalarTextInput.vue.js +53 -44
- package/dist/components/ScalarToggle/ScalarToggle.vue.d.ts +5 -3
- package/dist/components/ScalarToggle/ScalarToggle.vue.d.ts.map +1 -1
- package/dist/components/ScalarToggle/ScalarToggle.vue.js +24 -22
- package/dist/components/ScalarToggle/ScalarToggleGroup.vue.d.ts +21 -0
- package/dist/components/ScalarToggle/ScalarToggleGroup.vue.d.ts.map +1 -0
- package/dist/components/ScalarToggle/ScalarToggleGroup.vue.js +35 -0
- package/dist/components/ScalarToggle/ScalarToggleGroup.vue2.js +4 -0
- package/dist/components/ScalarToggle/ScalarToggleInput.vue.d.ts +28 -0
- package/dist/components/ScalarToggle/ScalarToggleInput.vue.d.ts.map +1 -0
- package/dist/components/ScalarToggle/ScalarToggleInput.vue.js +36 -0
- package/dist/components/ScalarToggle/ScalarToggleInput.vue2.js +4 -0
- package/dist/components/ScalarToggle/index.d.ts +2 -0
- package/dist/components/ScalarToggle/index.d.ts.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +184 -166
- package/dist/style.css +1 -1
- package/package.json +6 -6
- package/dist/components/ScalarCheckbox/ScalarCheckbox.vue.d.ts +0 -26
- package/dist/components/ScalarCheckbox/ScalarCheckbox.vue.d.ts.map +0 -1
- package/dist/components/ScalarCheckbox/index.d.ts +0 -2
- package/dist/components/ScalarCheckbox/index.d.ts.map +0 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ScalarCheckboxType } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Scalar checkbox base component
|
|
4
|
+
*
|
|
5
|
+
* Provides a styled visual checkbox but not the underlying input element.
|
|
6
|
+
*
|
|
7
|
+
* This is used internally by the ScalarCheckboxInput component.
|
|
8
|
+
*
|
|
9
|
+
* If you're looking to create an interactive checkbox you
|
|
10
|
+
* probably want the ScalarCheckboxInput component.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* <ScalarCheckbox :selected="state" type="radio" />
|
|
14
|
+
*/
|
|
15
|
+
declare const _default: import("vue").DefineComponent<{
|
|
16
|
+
selected?: boolean;
|
|
17
|
+
type?: ScalarCheckboxType;
|
|
18
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
19
|
+
selected?: boolean;
|
|
20
|
+
type?: ScalarCheckboxType;
|
|
21
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
export default _default;
|
|
23
|
+
//# sourceMappingURL=ScalarCheckbox.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarCheckbox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCheckboxInput/ScalarCheckbox.vue"],"names":[],"mappings":"AA2CA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAGjD;;;;;;;;;;;;GAYG;;eAGU,OAAO;WACX,kBAAkB;;eADd,OAAO;WACX,kBAAkB;;AAH3B,wBAqEC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { defineComponent as o, createElementBlock as c, openBlock as t, normalizeClass as r, createBlock as a, createCommentVNode as n, unref as s } from "vue";
|
|
2
|
+
import { ScalarIconCheck as l } from "@scalar/icons";
|
|
3
|
+
const d = {}, i = /* @__PURE__ */ o({
|
|
4
|
+
...d,
|
|
5
|
+
__name: "ScalarCheckbox",
|
|
6
|
+
props: {
|
|
7
|
+
selected: { type: Boolean },
|
|
8
|
+
type: { default: "checkbox" }
|
|
9
|
+
},
|
|
10
|
+
setup(p) {
|
|
11
|
+
return (e, m) => (t(), c("div", {
|
|
12
|
+
class: r(["flex size-4 items-center justify-center p-0.75", [
|
|
13
|
+
e.selected ? "bg-c-accent text-b-1" : "text-transparent shadow-border",
|
|
14
|
+
e.type === "checkbox" ? "rounded" : "rounded-full"
|
|
15
|
+
]])
|
|
16
|
+
}, [
|
|
17
|
+
e.selected ? (t(), a(s(l), {
|
|
18
|
+
key: 0,
|
|
19
|
+
class: "size-3",
|
|
20
|
+
weight: "bold"
|
|
21
|
+
})) : n("", !0)
|
|
22
|
+
], 2));
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
export {
|
|
26
|
+
i as default
|
|
27
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ScalarCheckboxOption } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Scalar Checkbox Group component
|
|
4
|
+
*
|
|
5
|
+
* A group of checkbox inputs allowing for multiple selections.
|
|
6
|
+
*/
|
|
7
|
+
declare const _default: import("vue").DefineComponent<{
|
|
8
|
+
options?: ScalarCheckboxOption[];
|
|
9
|
+
} & {
|
|
10
|
+
modelValue?: ScalarCheckboxOption[];
|
|
11
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
"update:modelValue": (value: ScalarCheckboxOption[]) => any;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
14
|
+
options?: ScalarCheckboxOption[];
|
|
15
|
+
} & {
|
|
16
|
+
modelValue?: ScalarCheckboxOption[];
|
|
17
|
+
}> & Readonly<{
|
|
18
|
+
"onUpdate:modelValue"?: ((value: ScalarCheckboxOption[]) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
export default _default;
|
|
21
|
+
//# sourceMappingURL=ScalarCheckboxGroup.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarCheckboxGroup.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCheckboxInput/ScalarCheckboxGroup.vue"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAGnD;;;;GAIG;;cAGS,oBAAoB,EAAE;;iBAcrB,oBAAoB,EAAE;;;;cAdvB,oBAAoB,EAAE;;iBAcrB,oBAAoB,EAAE;;;;AAhBnC,wBAqGC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { defineComponent as c, mergeModels as f, useModel as _, useId as i, createBlock as t, openBlock as u, unref as o, withCtx as m, createElementBlock as p, Fragment as v, renderList as V, createTextVNode as k, toDisplayString as x } from "vue";
|
|
2
|
+
import g from "./ScalarCheckboxInput.vue.js";
|
|
3
|
+
import h from "../ScalarForm/ScalarFormInputGroup.vue.js";
|
|
4
|
+
const B = {}, S = /* @__PURE__ */ c({
|
|
5
|
+
...B,
|
|
6
|
+
__name: "ScalarCheckboxGroup",
|
|
7
|
+
props: /* @__PURE__ */ f({
|
|
8
|
+
options: { default: () => [] }
|
|
9
|
+
}, {
|
|
10
|
+
modelValue: { default: [] },
|
|
11
|
+
modelModifiers: {}
|
|
12
|
+
}),
|
|
13
|
+
emits: ["update:modelValue"],
|
|
14
|
+
setup(r) {
|
|
15
|
+
const l = _(r, "modelValue"), d = i();
|
|
16
|
+
return (n, C) => (u(), t(o(h), null, {
|
|
17
|
+
default: m(() => [
|
|
18
|
+
(u(!0), p(v, null, V(n.options, (e) => (u(), t(g, {
|
|
19
|
+
value: e.value,
|
|
20
|
+
name: o(d),
|
|
21
|
+
modelValue: l.value?.some(({ value: a }) => a === e.value),
|
|
22
|
+
"onUpdate:modelValue": (a) => l.value = a ? [...l.value, e] : l.value.filter(({ value: s }) => s !== e.value),
|
|
23
|
+
key: e.value
|
|
24
|
+
}, {
|
|
25
|
+
default: m(() => [
|
|
26
|
+
k(x(e.label), 1)
|
|
27
|
+
]),
|
|
28
|
+
_: 2
|
|
29
|
+
}, 1032, ["value", "name", "modelValue", "onUpdate:modelValue"]))), 128))
|
|
30
|
+
]),
|
|
31
|
+
_: 1
|
|
32
|
+
}));
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
export {
|
|
36
|
+
S as default
|
|
37
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ScalarCheckboxType } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Scalar Checkbox Input component
|
|
4
|
+
*
|
|
5
|
+
* A wrapper around the HTML input element for either checkboxes or radio buttons.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* <ScalarCheckboxInput v-model="model" type="checkbox">
|
|
9
|
+
* Option Label
|
|
10
|
+
* </ScalarCheckboxInput>
|
|
11
|
+
*/
|
|
12
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
13
|
+
type?: ScalarCheckboxType;
|
|
14
|
+
} & {
|
|
15
|
+
modelValue?: boolean;
|
|
16
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
+
"update:modelValue": (value: boolean | undefined) => any;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
19
|
+
type?: ScalarCheckboxType;
|
|
20
|
+
} & {
|
|
21
|
+
modelValue?: boolean;
|
|
22
|
+
}> & Readonly<{
|
|
23
|
+
"onUpdate:modelValue"?: ((value: boolean | undefined) => any) | undefined;
|
|
24
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
25
|
+
default?: (props: {}) => any;
|
|
26
|
+
}>;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=ScalarCheckboxInput.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarCheckboxInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCheckboxInput/ScalarCheckboxInput.vue"],"names":[],"mappings":"AAqDA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAGjD;;;;;;;;;GASG;;WAGM,kBAAkB;;iBAcd,OAAO;;;;WAdX,kBAAkB;;iBAcd,OAAO;;;;cA6DN,CAAC,KAAK,IAAgB,KAAK,GAAG;;AA7E5C,wBAgHC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { defineComponent as u, mergeModels as c, useModel as m, createBlock as p, openBlock as f, unref as o, mergeProps as s, withCtx as _, createVNode as y, createElementVNode as r, withDirectives as h, renderSlot as v, vModelDynamic as x } from "vue";
|
|
2
|
+
import { useBindCx as V } from "@scalar/use-hooks/useBindCx";
|
|
3
|
+
import b from "./ScalarCheckbox.vue.js";
|
|
4
|
+
import k from "../ScalarForm/ScalarFormInput.vue.js";
|
|
5
|
+
const C = { class: "flex-1 text-left min-w-0 truncate" }, g = ["type"], B = {}, D = /* @__PURE__ */ u({
|
|
6
|
+
...B,
|
|
7
|
+
inheritAttrs: !1,
|
|
8
|
+
__name: "ScalarCheckboxInput",
|
|
9
|
+
props: /* @__PURE__ */ c({
|
|
10
|
+
type: { default: "checkbox" }
|
|
11
|
+
}, {
|
|
12
|
+
modelValue: { type: Boolean },
|
|
13
|
+
modelModifiers: {}
|
|
14
|
+
}),
|
|
15
|
+
emits: ["update:modelValue"],
|
|
16
|
+
setup(a) {
|
|
17
|
+
const e = m(a, "modelValue"), { classCx: n, otherAttrs: d } = V();
|
|
18
|
+
return (t, l) => (f(), p(o(k), s(
|
|
19
|
+
{ is: "label" },
|
|
20
|
+
o(n)("cursor-pointer gap-2 hover:bg-b-2", { "text-c-1": e.value })
|
|
21
|
+
), {
|
|
22
|
+
default: _(() => [
|
|
23
|
+
y(b, {
|
|
24
|
+
selected: e.value,
|
|
25
|
+
type: t.type,
|
|
26
|
+
class: "shrink-0"
|
|
27
|
+
}, null, 8, ["selected", "type"]),
|
|
28
|
+
r("div", C, [
|
|
29
|
+
v(t.$slots, "default")
|
|
30
|
+
]),
|
|
31
|
+
h(r("input", s({
|
|
32
|
+
type: t.type,
|
|
33
|
+
"onUpdate:modelValue": l[0] || (l[0] = (i) => e.value = i),
|
|
34
|
+
class: "sr-only"
|
|
35
|
+
}, o(d)), null, 16, g), [
|
|
36
|
+
[x, e.value]
|
|
37
|
+
])
|
|
38
|
+
]),
|
|
39
|
+
_: 3
|
|
40
|
+
}, 16));
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
export {
|
|
44
|
+
D as default
|
|
45
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ScalarCheckboxOption } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Scalar Checkbox Radio Group component
|
|
4
|
+
*
|
|
5
|
+
* A group of radio inputs allowing for single selection.
|
|
6
|
+
*/
|
|
7
|
+
declare const _default: import("vue").DefineComponent<{
|
|
8
|
+
options?: ScalarCheckboxOption[];
|
|
9
|
+
} & {
|
|
10
|
+
modelValue?: ScalarCheckboxOption;
|
|
11
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
"update:modelValue": (value: ScalarCheckboxOption | undefined) => any;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
14
|
+
options?: ScalarCheckboxOption[];
|
|
15
|
+
} & {
|
|
16
|
+
modelValue?: ScalarCheckboxOption;
|
|
17
|
+
}> & Readonly<{
|
|
18
|
+
"onUpdate:modelValue"?: ((value: ScalarCheckboxOption | undefined) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
export default _default;
|
|
21
|
+
//# sourceMappingURL=ScalarCheckboxRadioGroup.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarCheckboxRadioGroup.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCheckboxInput/ScalarCheckboxRadioGroup.vue"],"names":[],"mappings":"AA2CA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAGnD;;;;GAIG;;cAGS,oBAAoB,EAAE;;iBAarB,oBAAoB;;;;cAbrB,oBAAoB,EAAE;;iBAarB,oBAAoB;;;;AAfjC,wBAiGC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { defineComponent as s, mergeModels as c, useModel as i, useId as _, createBlock as o, openBlock as l, unref as t, withCtx as u, createElementBlock as f, Fragment as p, renderList as v, createTextVNode as V, toDisplayString as k } from "vue";
|
|
2
|
+
import x from "./ScalarCheckboxInput.vue.js";
|
|
3
|
+
import g from "../ScalarForm/ScalarFormInputGroup.vue.js";
|
|
4
|
+
const h = {}, b = /* @__PURE__ */ s({
|
|
5
|
+
...h,
|
|
6
|
+
__name: "ScalarCheckboxRadioGroup",
|
|
7
|
+
props: /* @__PURE__ */ c({
|
|
8
|
+
options: { default: () => [] }
|
|
9
|
+
}, {
|
|
10
|
+
modelValue: {},
|
|
11
|
+
modelModifiers: {}
|
|
12
|
+
}),
|
|
13
|
+
emits: ["update:modelValue"],
|
|
14
|
+
setup(r) {
|
|
15
|
+
const a = i(r, "modelValue"), d = _();
|
|
16
|
+
return (m, y) => (l(), o(t(g), null, {
|
|
17
|
+
default: u(() => [
|
|
18
|
+
(l(!0), f(p, null, v(m.options, (e) => (l(), o(x, {
|
|
19
|
+
type: "radio",
|
|
20
|
+
value: e.value,
|
|
21
|
+
name: t(d),
|
|
22
|
+
modelValue: a.value?.value === e.value,
|
|
23
|
+
"onUpdate:modelValue": (n) => a.value = n ? e : void 0,
|
|
24
|
+
key: e.value
|
|
25
|
+
}, {
|
|
26
|
+
default: u(() => [
|
|
27
|
+
V(k(e.label), 1)
|
|
28
|
+
]),
|
|
29
|
+
_: 2
|
|
30
|
+
}, 1032, ["value", "name", "modelValue", "onUpdate:modelValue"]))), 128))
|
|
31
|
+
]),
|
|
32
|
+
_: 1
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
export {
|
|
37
|
+
b as default
|
|
38
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as ScalarCheckboxInput } from './ScalarCheckboxInput.vue.js';
|
|
2
|
+
export { default as ScalarCheckboxGroup } from './ScalarCheckboxGroup.vue.js';
|
|
3
|
+
export { default as ScalarCheckboxRadioGroup } from './ScalarCheckboxRadioGroup.vue.js';
|
|
4
|
+
export { default as ScalarCheckbox } from './ScalarCheckbox.vue.js';
|
|
5
|
+
export type { ScalarCheckboxOption, ScalarCheckboxType } from './types';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCheckboxInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,gCAAgC,CAAA;AACpF,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAEhE,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCheckboxInput/types.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,OAAO,CAAA;AAErD,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd,CAAA"}
|
|
@@ -53,8 +53,8 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
53
53
|
/** The error message */
|
|
54
54
|
error?: string;
|
|
55
55
|
}> & Readonly<{
|
|
56
|
-
"onUpdate:modelValue"?: ((value: File[] | undefined) => any) | undefined;
|
|
57
56
|
onSelected?: ((value: File[]) => any) | undefined;
|
|
57
|
+
"onUpdate:modelValue"?: ((value: File[] | undefined) => any) | undefined;
|
|
58
58
|
"onUpdate:error"?: ((value: string | undefined) => any) | undefined;
|
|
59
59
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
60
60
|
/** Override the entire input */
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Component } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Scalar form input base component
|
|
4
|
+
*
|
|
5
|
+
* Provides a base for styling scalar form inputs and buttons
|
|
6
|
+
*
|
|
7
|
+
* This is used internally by the ScalarTextInput component and others
|
|
8
|
+
* If you want a text input consider using this component
|
|
9
|
+
*
|
|
10
|
+
* Renders a button by default can be used to render any kind of input or input wrapper
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* <ScalarFormInput />
|
|
14
|
+
*/
|
|
15
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
16
|
+
is?: string | Component;
|
|
17
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
18
|
+
is?: string | Component;
|
|
19
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
20
|
+
default?: (props: {}) => any;
|
|
21
|
+
}>;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=ScalarFormInput.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarFormInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarForm/ScalarFormInput.vue"],"names":[],"mappings":"AA0DA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAKpC;;;;;;;;;;;;GAYG;;SAGI,MAAM,GAAG,SAAS;;SAAlB,MAAM,GAAG,SAAS;;cAmDX,CAAC,KAAK,IAAgB,KAAK,GAAG;;AArD5C,wBAoFC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { defineComponent as s, createBlock as u, openBlock as i, resolveDynamicComponent as p, mergeProps as a, unref as e, withCtx as d, renderSlot as f } from "vue";
|
|
2
|
+
import { useBindCx as l, cva as c } from "@scalar/use-hooks/useBindCx";
|
|
3
|
+
import { useFormGroupInput as m } from "./useFormGroups.js";
|
|
4
|
+
const b = {}, y = /* @__PURE__ */ s({
|
|
5
|
+
...b,
|
|
6
|
+
inheritAttrs: !1,
|
|
7
|
+
__name: "ScalarFormInput",
|
|
8
|
+
props: {
|
|
9
|
+
is: { default: "button" }
|
|
10
|
+
},
|
|
11
|
+
setup(_) {
|
|
12
|
+
const { cx: o } = l(), r = m(), n = c({
|
|
13
|
+
base: [
|
|
14
|
+
// Layout
|
|
15
|
+
"bg-b-1.5 flex items-center text-c-2 gap-0.75 px-3 py-2.5 ",
|
|
16
|
+
//Focus
|
|
17
|
+
"outline-offset-[-1px] has-[:focus-visible]:outline"
|
|
18
|
+
],
|
|
19
|
+
variants: {
|
|
20
|
+
grouped: {
|
|
21
|
+
true: "first:rounded-t-[inherit] last:rounded-b-[inherit]",
|
|
22
|
+
false: "rounded border"
|
|
23
|
+
},
|
|
24
|
+
button: { true: "cursor-pointer hover:bg-b-2" }
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
return (t, g) => (i(), u(p(t.is), a({
|
|
28
|
+
type: t.is === "button" ? "button" : void 0
|
|
29
|
+
}, e(o)(e(n)({ button: t.is === "button", grouped: e(r) }))), {
|
|
30
|
+
default: d(() => [
|
|
31
|
+
f(t.$slots, "default")
|
|
32
|
+
]),
|
|
33
|
+
_: 3
|
|
34
|
+
}, 16, ["type"]));
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
export {
|
|
38
|
+
y as default
|
|
39
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Component } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Scalar Form Group component
|
|
4
|
+
*
|
|
5
|
+
* Groups a set of ScalarFormInput or their derived components.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* <ScalarFormInputGroup>
|
|
9
|
+
* <!-- Inputs... -->
|
|
10
|
+
* </ScalarFormInputGroup>
|
|
11
|
+
*/
|
|
12
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
13
|
+
/** The element to render
|
|
14
|
+
*
|
|
15
|
+
* If you want to use the group outside of a ScalarFormField,
|
|
16
|
+
* you can set this to 'fieldset'.
|
|
17
|
+
*
|
|
18
|
+
* @default 'div'
|
|
19
|
+
*/
|
|
20
|
+
is?: string | Component;
|
|
21
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
22
|
+
/** The element to render
|
|
23
|
+
*
|
|
24
|
+
* If you want to use the group outside of a ScalarFormField,
|
|
25
|
+
* you can set this to 'fieldset'.
|
|
26
|
+
*
|
|
27
|
+
* @default 'div'
|
|
28
|
+
*/
|
|
29
|
+
is?: string | Component;
|
|
30
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
31
|
+
default?: (props: {}) => any;
|
|
32
|
+
}>;
|
|
33
|
+
export default _default;
|
|
34
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
35
|
+
new (): {
|
|
36
|
+
$slots: S;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=ScalarFormInputGroup.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarFormInputGroup.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarForm/ScalarFormInputGroup.vue"],"names":[],"mappings":"AA6CA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAKpC;;;;;;;;;GASG;;IAGD;;;;;;OAMG;SACE,MAAM,GAAG,SAAS;;IAPvB;;;;;;OAMG;SACE,MAAM,GAAG,SAAS;;cAiCX,CAAC,KAAK,IAAgB,KAAK,GAAG;;AA1C5C,wBAuEC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { defineComponent as r, createBlock as t, openBlock as n, resolveDynamicComponent as s, normalizeProps as a, guardReactiveProps as i, unref as p, withCtx as l, renderSlot as u } from "vue";
|
|
2
|
+
import { useBindCx as d } from "@scalar/use-hooks/useBindCx";
|
|
3
|
+
import { useFormGroup as f } from "./useFormGroups.js";
|
|
4
|
+
const m = {}, h = /* @__PURE__ */ r({
|
|
5
|
+
...m,
|
|
6
|
+
inheritAttrs: !1,
|
|
7
|
+
__name: "ScalarFormInputGroup",
|
|
8
|
+
props: {
|
|
9
|
+
is: { default: "div" }
|
|
10
|
+
},
|
|
11
|
+
setup(c) {
|
|
12
|
+
const { cx: o } = d();
|
|
13
|
+
return f(), (e, _) => (n(), t(s(e.is), a(i(p(o)("flex flex-col border rounded divide-y"))), {
|
|
14
|
+
default: l(() => [
|
|
15
|
+
u(e.$slots, "default")
|
|
16
|
+
]),
|
|
17
|
+
_: 3
|
|
18
|
+
}, 16));
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
export {
|
|
22
|
+
h as default
|
|
23
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import s from "./ScalarFormSection.vue2.js";
|
|
2
2
|
import { createElementBlock as n, openBlock as c, createElementVNode as t, renderSlot as o } from "vue";
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const l = { class: "flex min-w-0 flex-col gap-3" }, a = { class: "contents" }, d = { class: "text-base font-medium text-c-1" };
|
|
5
5
|
function f(e, i, m, p, _, u) {
|
|
6
|
-
return c(), n("fieldset",
|
|
6
|
+
return c(), n("fieldset", l, [
|
|
7
7
|
t("legend", a, [
|
|
8
8
|
t("span", d, [
|
|
9
9
|
o(e.$slots, "label")
|
|
@@ -12,7 +12,7 @@ function f(e, i, m, p, _, u) {
|
|
|
12
12
|
o(e.$slots, "default")
|
|
13
13
|
]);
|
|
14
14
|
}
|
|
15
|
-
const
|
|
15
|
+
const S = /* @__PURE__ */ r(s, [["render", f]]);
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
S as default
|
|
18
18
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { default as ScalarForm } from './ScalarForm.vue.js';
|
|
2
|
+
export { default as ScalarFormError } from './ScalarFormError.vue.js';
|
|
2
3
|
export { default as ScalarFormField } from './ScalarFormField.vue.js';
|
|
4
|
+
export { default as ScalarFormInput } from './ScalarFormInput.vue.js';
|
|
5
|
+
export { default as ScalarFormInputGroup } from './ScalarFormInputGroup.vue.js';
|
|
3
6
|
export { default as ScalarFormSection } from './ScalarFormSection.vue.js';
|
|
4
|
-
export { default as ScalarFormError } from './ScalarFormError.vue.js';
|
|
5
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarForm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarForm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAC5E,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type InjectionKey } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Tells a ScalarFormInput component that it is in a form group.
|
|
4
|
+
*/
|
|
5
|
+
export declare const FORM_GROUP_SYMBOL: InjectionKey<boolean>;
|
|
6
|
+
/**
|
|
7
|
+
* Check if we're in a form group.
|
|
8
|
+
*
|
|
9
|
+
* This is called from ScalarFormInput components.
|
|
10
|
+
*/
|
|
11
|
+
export declare const useFormGroupInput: () => boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Set that this is a form group.
|
|
14
|
+
*
|
|
15
|
+
* This is called from ScalarFormInputGroup components.
|
|
16
|
+
*/
|
|
17
|
+
export declare const useFormGroup: () => void;
|
|
18
|
+
//# sourceMappingURL=useFormGroups.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFormGroups.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarForm/useFormGroups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAmB,MAAM,KAAK,CAAA;AAExD;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAe,YAAY,CAAC,OAAO,CAAC,CAAA;AAElE;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,eAE7B,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,YAAY,YAExB,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scalar Listbox Input component
|
|
3
|
+
*
|
|
4
|
+
* Provides a standard button for opening a listbox.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* <ScalarListbox v-model="selected" :options v-slot="{ open }">
|
|
8
|
+
* <ScalarListboxInput :open>{{ selected.label }}</ScalarListboxInput>
|
|
9
|
+
* </ScalarListbox>
|
|
10
|
+
*/
|
|
11
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
12
|
+
open?: Boolean;
|
|
13
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
14
|
+
open?: Boolean;
|
|
15
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
16
|
+
default?: (props: {}) => any;
|
|
17
|
+
}>;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=ScalarListboxInput.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarListboxInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarListbox/ScalarListboxInput.vue"],"names":[],"mappings":"AAmCA;;;;;;;;;GASG;;WAEyB,OAAO;;WAAP,OAAO;;cA+CrB,CAAC,KAAK,IAAgB,KAAK,GAAG;;AAhD5C,wBA8EC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { defineComponent as o, createBlock as n, openBlock as r, unref as t, withCtx as a, createElementVNode as s, createVNode as l, renderSlot as c, normalizeClass as i } from "vue";
|
|
2
|
+
import { ScalarIconCaretDown as _ } from "@scalar/icons";
|
|
3
|
+
import f from "../ScalarForm/ScalarFormInput.vue.js";
|
|
4
|
+
const m = { class: "flex-1 text-left min-w-0 truncate" }, p = {}, w = /* @__PURE__ */ o({
|
|
5
|
+
...p,
|
|
6
|
+
__name: "ScalarListboxInput",
|
|
7
|
+
props: {
|
|
8
|
+
open: {}
|
|
9
|
+
},
|
|
10
|
+
setup(u) {
|
|
11
|
+
return (e, d) => (r(), n(t(f), null, {
|
|
12
|
+
default: a(() => [
|
|
13
|
+
s("div", m, [
|
|
14
|
+
c(e.$slots, "default")
|
|
15
|
+
]),
|
|
16
|
+
l(t(_), {
|
|
17
|
+
class: i(["transition-transform size-3.5", { "rotate-180": e.open }])
|
|
18
|
+
}, null, 8, ["class"])
|
|
19
|
+
]),
|
|
20
|
+
_: 3
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
export {
|
|
25
|
+
w as default
|
|
26
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as ScalarListbox } from './ScalarListbox.vue.js';
|
|
2
|
-
export { default as ScalarListboxItem } from './ScalarListboxItem.vue.js';
|
|
3
2
|
export { default as ScalarListboxCheckbox } from './ScalarListboxCheckbox.vue.js';
|
|
3
|
+
export { default as ScalarListboxInput } from './ScalarListboxInput.vue.js';
|
|
4
|
+
export { default as ScalarListboxItem } from './ScalarListboxItem.vue.js';
|
|
4
5
|
export type { Option as ScalarListboxOption } from './types';
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarListbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,EAAE,OAAO,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarListbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AAC9E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AACxE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AACtE,YAAY,EAAE,MAAM,IAAI,mBAAmB,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarMarkdown.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMarkdown/ScalarMarkdown.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScalarMarkdown.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMarkdown/ScalarMarkdown.vue"],"names":[],"mappings":"AAirBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;;;;AA+FlD,wBAOG"}
|