@scalar/components 0.14.38 → 0.15.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/components/ScalarButton/ScalarButton.vue.d.ts +16 -24
- package/dist/components/ScalarButton/ScalarButton.vue.d.ts.map +1 -1
- package/dist/components/ScalarButton/ScalarButton.vue.js +83 -37
- package/dist/components/ScalarButton/constants.d.ts +9 -0
- package/dist/components/ScalarButton/constants.d.ts.map +1 -0
- package/dist/components/ScalarButton/constants.js +21 -0
- package/dist/components/ScalarButton/index.d.ts +1 -1
- package/dist/components/ScalarButton/index.d.ts.map +1 -1
- package/dist/components/ScalarButton/types.d.ts +72 -0
- package/dist/components/ScalarButton/types.d.ts.map +1 -0
- package/dist/components/ScalarFileUpload/ScalarFileUploadFileList.vue.js +5 -5
- package/dist/components/ScalarFileUpload/ScalarFileUploadInput.vue.js +1 -1
- package/dist/components/ScalarIcon/icons/index.d.ts +1 -1
- package/dist/components/ScalarIcon/icons/index.d.ts.map +1 -1
- package/dist/components/ScalarIcon/icons/programming-language-fsharp.svg.js +16 -0
- package/dist/components/ScalarIcon/utils/index.js +116 -114
- package/dist/components/ScalarIconButton/ScalarIconButton.vue.d.ts.map +1 -1
- package/dist/components/ScalarIconButton/ScalarIconButton.vue.js +40 -17
- package/dist/components/ScalarIconButton/types.d.ts +5 -5
- package/dist/components/ScalarIconButton/types.d.ts.map +1 -1
- package/dist/components/ScalarMarkdown/ScalarMarkdown.vue.d.ts.map +1 -1
- package/dist/components/ScalarMarkdown/samples/index.d.ts +33 -3
- package/dist/components/ScalarMarkdown/samples/index.d.ts.map +1 -1
- package/dist/components/ScalarMarkdown/samples/lists-edge.d.ts +4 -0
- package/dist/components/ScalarMarkdown/samples/lists-edge.d.ts.map +1 -0
- package/dist/components/ScalarMarkdown/samples/lists-interactions.d.ts +3 -0
- package/dist/components/ScalarMarkdown/samples/lists-interactions.d.ts.map +1 -0
- package/dist/components/ScalarMarkdown/samples/lists-mixed.d.ts +3 -0
- package/dist/components/ScalarMarkdown/samples/lists-mixed.d.ts.map +1 -0
- package/dist/components/ScalarMarkdown/samples/lists-ordered.d.ts +3 -0
- package/dist/components/ScalarMarkdown/samples/lists-ordered.d.ts.map +1 -0
- package/dist/components/ScalarMarkdown/samples/lists-tasks.d.ts +3 -0
- package/dist/components/ScalarMarkdown/samples/lists-tasks.d.ts.map +1 -0
- package/dist/components/ScalarMarkdown/samples/lists-unordered.d.ts +3 -0
- package/dist/components/ScalarMarkdown/samples/lists-unordered.d.ts.map +1 -0
- package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.d.ts +4 -0
- package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.d.ts.map +1 -1
- package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.js +29 -28
- package/dist/components/ScalarSidebar/ScalarSidebarSection.vue.js +52 -0
- package/dist/components/ScalarSidebar/ScalarSidebarSection.vue3.js +5 -0
- package/dist/components/ScalarSidebar/ScalarSidebarSpacer.vue.js +20 -0
- package/dist/components/ScalarSidebar/ScalarSidebarSpacer.vue2.js +4 -0
- package/dist/components/ScalarSidebar/index.d.ts +2 -1
- package/dist/components/ScalarSidebar/index.d.ts.map +1 -1
- package/dist/index.js +183 -182
- package/dist/style.css +1 -1
- package/package.json +7 -7
- package/dist/components/ScalarButton/variants.d.ts +0 -69
- package/dist/components/ScalarButton/variants.d.ts.map +0 -1
- package/dist/components/ScalarButton/variants.js +0 -32
- package/dist/components/ScalarIconButton/variants.d.ts +0 -62
- package/dist/components/ScalarIconButton/variants.d.ts.map +0 -1
- package/dist/components/ScalarIconButton/variants.js +0 -32
- package/dist/components/ScalarMarkdown/samples/lists.d.ts +0 -3
- package/dist/components/ScalarMarkdown/samples/lists.d.ts.map +0 -1
|
@@ -1,31 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type Variants } from './variants.js';
|
|
1
|
+
import type { ScalarButtonProps } from '../../components/ScalarButton/types';
|
|
3
2
|
/**
|
|
4
|
-
* Scalar Button
|
|
3
|
+
* Scalar Button Component
|
|
4
|
+
*
|
|
5
|
+
* Provides a styled button, if you are looking for
|
|
6
|
+
* an icon only button, use ScalarIconButton instead,
|
|
7
|
+
* it's a helpful wrapper around this component
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* <ScalarButton>
|
|
11
|
+
* <!-- Button label -->
|
|
12
|
+
* </ScalarButton>
|
|
5
13
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
fullWidth?: boolean;
|
|
9
|
-
loading?: LoadingState | undefined;
|
|
10
|
-
size?: Variants['size'];
|
|
11
|
-
variant?: Variants['variant'];
|
|
12
|
-
type?: 'button' | 'submit' | 'reset';
|
|
13
|
-
};
|
|
14
|
-
declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
|
|
15
|
-
type __VLS_Slots = {} & {
|
|
16
|
-
icon?: (props: typeof __VLS_1) => any;
|
|
14
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ScalarButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ScalarButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
15
|
+
icon?: (props: {}) => any;
|
|
17
16
|
} & {
|
|
18
|
-
default?: (props:
|
|
17
|
+
default?: (props: {}) => any;
|
|
19
18
|
} & {
|
|
20
|
-
default?: (props:
|
|
21
|
-
}
|
|
22
|
-
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
23
|
-
size: "sm" | "md";
|
|
24
|
-
variant: "solid" | "outlined" | "ghost" | "danger";
|
|
25
|
-
fullWidth: boolean;
|
|
26
|
-
type: "button" | "submit" | "reset";
|
|
27
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
|
-
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
19
|
+
default?: (props: {}) => any;
|
|
20
|
+
}>;
|
|
29
21
|
export default _default;
|
|
30
22
|
type __VLS_WithSlots<T, S> = T & {
|
|
31
23
|
new (): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarButton/ScalarButton.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScalarButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarButton/ScalarButton.vue"],"names":[],"mappings":"AA0HA,OAAO,KAAK,EAGV,iBAAiB,EAClB,MAAM,iCAAiC,CAAA;AAOxC;;;;;;;;;;;GAWG;;WA+IQ,CAAC,KAAK,IAAgB,KAAK,GAAG;;cAC3B,CAAC,KAAK,IAAiB,KAAK,GAAG;;cAC/B,CAAC,KAAK,IAAiB,KAAK,GAAG;;AAhJ7C,wBAiLC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,53 +1,99 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useBindCx as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as g, createBlock as r, openBlock as i, resolveDynamicComponent as l, mergeProps as p, unref as a, withCtx as v, createElementBlock as s, createCommentVNode as d, renderSlot as o, normalizeClass as t, createVNode as f } from "vue";
|
|
2
|
+
import { cva as n, useBindCx as z } from "@scalar/use-hooks/useBindCx";
|
|
3
|
+
import { BUTTON_VARIANT_STYLES as h } from "./constants.js";
|
|
4
|
+
import y from "../ScalarLoading/ScalarLoading.vue.js";
|
|
5
|
+
const k = {
|
|
6
6
|
key: 3,
|
|
7
7
|
class: "centered"
|
|
8
|
-
},
|
|
8
|
+
}, B = {}, T = /* @__PURE__ */ g({
|
|
9
|
+
...B,
|
|
9
10
|
inheritAttrs: !1,
|
|
10
11
|
__name: "ScalarButton",
|
|
11
12
|
props: {
|
|
12
|
-
|
|
13
|
-
fullWidth: { type: Boolean, default: !1 },
|
|
14
|
-
loading: {},
|
|
15
|
-
size: { default: "md" },
|
|
13
|
+
is: { default: "button" },
|
|
16
14
|
variant: { default: "solid" },
|
|
17
|
-
|
|
15
|
+
size: { default: "md" },
|
|
16
|
+
disabled: { type: Boolean },
|
|
17
|
+
icon: {},
|
|
18
|
+
loading: {}
|
|
18
19
|
},
|
|
19
|
-
setup(
|
|
20
|
-
const
|
|
21
|
-
|
|
20
|
+
setup(S) {
|
|
21
|
+
const m = n({
|
|
22
|
+
base: "scalar-button flex cursor-pointer items-center justify-center rounded font-medium -outline-offset-1",
|
|
23
|
+
variants: {
|
|
24
|
+
disabled: { true: "bg-b-2 text-color-3 shadow-none" },
|
|
25
|
+
size: {
|
|
26
|
+
xs: "px-2 py-1 text-xs leading-5",
|
|
27
|
+
sm: "px-3.5 py-2 text-sm leading-5",
|
|
28
|
+
md: "px-5 py-3 text-sm leading-5"
|
|
29
|
+
},
|
|
30
|
+
variant: h
|
|
31
|
+
},
|
|
32
|
+
compoundVariants: [
|
|
33
|
+
{
|
|
34
|
+
disabled: !0,
|
|
35
|
+
variant: ["solid", "outlined", "ghost", "gradient", "danger"],
|
|
36
|
+
class: "bg-b-2 text-c-3 shadow-none hover:bg-b-[_] cursor-not-allowed active:bg-b-[_] hover:text-c-[_] active:text-c-[_]"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
disabled: !0,
|
|
40
|
+
variant: ["gradient"],
|
|
41
|
+
class: "to-b-1.5 bg-linear-to-b hover:bg-linear-to-b dark:hover:bg-linear-to-t"
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}), u = n({
|
|
45
|
+
base: "shrink-0",
|
|
46
|
+
variants: {
|
|
47
|
+
size: {
|
|
48
|
+
xs: "size-2.75 -ml-0.25 mr-1",
|
|
49
|
+
sm: "size-3.25 -ml-0.5 mr-1.5",
|
|
50
|
+
md: "size-3.5 -ml-0.5 mr-1.5"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}), b = n({
|
|
54
|
+
variants: {
|
|
55
|
+
size: {
|
|
56
|
+
xs: "size-4",
|
|
57
|
+
sm: "size-5",
|
|
58
|
+
md: "size-6"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}), { cx: c } = z();
|
|
62
|
+
return (e, V) => (i(), r(l(e.is), p(
|
|
22
63
|
{
|
|
23
64
|
"aria-disabled": e.disabled || void 0,
|
|
24
|
-
type: e.
|
|
65
|
+
type: e.is === "button" ? "button" : void 0
|
|
25
66
|
},
|
|
26
|
-
|
|
67
|
+
a(c)(a(m)({ disabled: e.disabled, size: e.size, variant: e.variant }), {
|
|
27
68
|
relative: e.loading?.isLoading
|
|
28
69
|
})
|
|
29
|
-
),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
70
|
+
), {
|
|
71
|
+
default: v(() => [
|
|
72
|
+
e.$slots.icon || e.icon ? (i(), s("div", {
|
|
73
|
+
key: 0,
|
|
74
|
+
class: t([a(u)({ size: e.size }), { invisible: e.loading?.isLoading }])
|
|
75
|
+
}, [
|
|
76
|
+
o(e.$slots, "icon", {}, () => [
|
|
77
|
+
(i(), r(l(e.icon), { class: "size-full" }))
|
|
78
|
+
])
|
|
79
|
+
], 2)) : d("", !0),
|
|
80
|
+
e.loading ? (i(), s("span", {
|
|
81
|
+
key: 1,
|
|
82
|
+
class: t({ invisible: e.loading?.isLoading })
|
|
83
|
+
}, [
|
|
84
|
+
o(e.$slots, "default")
|
|
85
|
+
], 2)) : o(e.$slots, "default", { key: 2 }),
|
|
86
|
+
e.loading?.isLoading ? (i(), s("div", k, [
|
|
87
|
+
f(a(y), {
|
|
88
|
+
class: t(a(b)({ size: e.size })),
|
|
89
|
+
loadingState: e.loading
|
|
90
|
+
}, null, 8, ["class", "loadingState"])
|
|
91
|
+
])) : d("", !0)
|
|
92
|
+
]),
|
|
93
|
+
_: 3
|
|
94
|
+
}, 16, ["aria-disabled", "type"]));
|
|
49
95
|
}
|
|
50
96
|
});
|
|
51
97
|
export {
|
|
52
|
-
|
|
98
|
+
T as default
|
|
53
99
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Styles for the different button variants */
|
|
2
|
+
export declare const BUTTON_VARIANT_STYLES: {
|
|
3
|
+
readonly solid: ["scalar-button-solid", "bg-b-btn text-c-btn focus-visible:border-c-btn active:bg-b-btn hover:bg-h-btn outline-offset-1"];
|
|
4
|
+
readonly outlined: ["scalar-button-outlined", "active:bg-btn-1 border border-solid border-border bg-b-1 text-c-1 hover:bg-b-2"];
|
|
5
|
+
readonly ghost: ["scalar-button-ghost", "bg-transparent text-c-3 active:text-c-1 hover:text-c-1"];
|
|
6
|
+
readonly gradient: ["scalar-button-gradient", "border bg-b-1.5 bg-linear-to-b from-b-1 to-b-2 hover:bg-linear-to-t", "dark:bg-linear-to-t dark:hover:bg-linear-to-b"];
|
|
7
|
+
readonly danger: ["scalar-button-danger", "bg-c-danger text-white active:brightness-90 hover:brightness-90"];
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarButton/constants.ts"],"names":[],"mappings":"AAEA,+CAA+C;AAC/C,eAAO,MAAM,qBAAqB;;;;;;CAiBmB,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const t = {
|
|
2
|
+
solid: [
|
|
3
|
+
"scalar-button-solid",
|
|
4
|
+
"bg-b-btn text-c-btn focus-visible:border-c-btn active:bg-b-btn hover:bg-h-btn outline-offset-1"
|
|
5
|
+
],
|
|
6
|
+
outlined: [
|
|
7
|
+
"scalar-button-outlined",
|
|
8
|
+
"active:bg-btn-1 border border-solid border-border bg-b-1 text-c-1 hover:bg-b-2"
|
|
9
|
+
],
|
|
10
|
+
ghost: ["scalar-button-ghost", "bg-transparent text-c-3 active:text-c-1 hover:text-c-1"],
|
|
11
|
+
gradient: [
|
|
12
|
+
"scalar-button-gradient",
|
|
13
|
+
"border bg-b-1.5 bg-linear-to-b from-b-1 to-b-2 hover:bg-linear-to-t",
|
|
14
|
+
// in dark mode we want to reverse the gradient direction
|
|
15
|
+
"dark:bg-linear-to-t dark:hover:bg-linear-to-b"
|
|
16
|
+
],
|
|
17
|
+
danger: ["scalar-button-danger", "bg-c-danger text-white active:brightness-90 hover:brightness-90"]
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
t as BUTTON_VARIANT_STYLES
|
|
21
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAC5D,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAC5D,YAAY,EAAE,UAAU,IAAI,gBAAgB,EAAE,aAAa,IAAI,mBAAmB,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { ScalarIconComponent } from '@scalar/icons/types';
|
|
2
|
+
import type { Component } from 'vue';
|
|
3
|
+
import type { LoadingState } from '../../components/ScalarLoading';
|
|
4
|
+
/** Styles for the ScalarButton component */
|
|
5
|
+
export type ButtonVariant = 'solid' | 'outlined' | 'ghost' | 'gradient' | 'danger';
|
|
6
|
+
/** Sizes for the ScalarButton component */
|
|
7
|
+
export type ButtonSize = 'xs' | 'sm' | 'md';
|
|
8
|
+
/** Utility type for class names */
|
|
9
|
+
export type ClassList = string | string[];
|
|
10
|
+
/** Props for the ScalarButton component */
|
|
11
|
+
export type ScalarButtonProps = {
|
|
12
|
+
/**
|
|
13
|
+
* Overrides the rendered element
|
|
14
|
+
*
|
|
15
|
+
* @default 'button'
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* <ScalarButton is="a" href="https://scalar.com">
|
|
19
|
+
* I'm a link!
|
|
20
|
+
* </ScalarButton>
|
|
21
|
+
*/
|
|
22
|
+
is?: string | Component;
|
|
23
|
+
/**
|
|
24
|
+
* The variant of the button
|
|
25
|
+
*
|
|
26
|
+
* @default 'solid'
|
|
27
|
+
*/
|
|
28
|
+
variant?: ButtonVariant;
|
|
29
|
+
/**
|
|
30
|
+
* The size of the button
|
|
31
|
+
*
|
|
32
|
+
* @default 'md'
|
|
33
|
+
*/
|
|
34
|
+
size?: ButtonSize;
|
|
35
|
+
/**
|
|
36
|
+
* Visually disables the button
|
|
37
|
+
*
|
|
38
|
+
* Note: This does not prevent interaction.
|
|
39
|
+
*@see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-disabled
|
|
40
|
+
*/
|
|
41
|
+
disabled?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* The icon to display in the button
|
|
44
|
+
*
|
|
45
|
+
* Use a component from the `@scalar/icons` package to display an icon.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* import { ScalarIconAcorn } from '@scalar/icons'
|
|
49
|
+
* ...
|
|
50
|
+
* <ScalarButton :icon="ScalarIconAcorn">
|
|
51
|
+
* It's an acorn
|
|
52
|
+
* </ScalarButton>
|
|
53
|
+
*/
|
|
54
|
+
icon?: ScalarIconComponent;
|
|
55
|
+
/**
|
|
56
|
+
* The loading state of the button
|
|
57
|
+
*
|
|
58
|
+
* @see <ScalarLoading>
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* import { useLoadingState } from '@scalar/components'
|
|
62
|
+
* ...
|
|
63
|
+
* const loadingState = useLoadingState()
|
|
64
|
+
* loadingState.startLoading()
|
|
65
|
+
* ...
|
|
66
|
+
* <ScalarButton :loading="loadingState">
|
|
67
|
+
* It's loading...
|
|
68
|
+
* </ScalarButton>
|
|
69
|
+
*/
|
|
70
|
+
loading?: LoadingState;
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarButton/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAEpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAE9D,4CAA4C;AAC5C,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,CAAA;AAElF,2CAA2C;AAC3C,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAE3C,mCAAmC;AACnC,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,EAAE,CAAA;AAEzC,2CAA2C;AAC3C,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;;;;;;;OASG;IACH,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB;;;;OAIG;IACH,OAAO,CAAC,EAAE,aAAa,CAAA;IACvB;;;;OAIG;IACH,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,EAAE,mBAAmB,CAAA;IAC1B;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,EAAE,YAAY,CAAA;CACvB,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as x, mergeModels as _, useModel as v, createElementBlock as o, openBlock as i, normalizeProps as g, guardReactiveProps as C, unref as l, createElementVNode as t, Fragment as V, renderList as k, toDisplayString as n, createVNode as d, withCtx as a, createTextVNode as m } from "vue";
|
|
2
2
|
import { useBindCx as y } from "@scalar/use-hooks/useBindCx";
|
|
3
3
|
import z from "pretty-bytes";
|
|
4
4
|
import u from "../ScalarButton/ScalarButton.vue.js";
|
|
5
|
-
const B = { class: "border rounded p-1 text-xs" }, $ = { class: "flex items-center justify-between" }, w = { class: "flex-1 min-w-0 truncate" }, F = { class: "text-c-3" }, M = { class: "flex items-center gap-1.5" }, N = {}, P = /* @__PURE__ */
|
|
5
|
+
const B = { class: "border rounded p-1 text-xs" }, $ = { class: "flex items-center justify-between" }, w = { class: "flex-1 min-w-0 truncate" }, F = { class: "text-c-3" }, M = { class: "flex items-center gap-1.5" }, N = {}, P = /* @__PURE__ */ x({
|
|
6
6
|
...N,
|
|
7
7
|
inheritAttrs: !1,
|
|
8
8
|
__name: "ScalarFileUploadFileList",
|
|
@@ -10,7 +10,7 @@ const B = { class: "border rounded p-1 text-xs" }, $ = { class: "flex items-cent
|
|
|
10
10
|
modelValue: {},
|
|
11
11
|
modelModifiers: {}
|
|
12
12
|
},
|
|
13
|
-
emits: /* @__PURE__ */
|
|
13
|
+
emits: /* @__PURE__ */ _(["upload"], ["update:modelValue"]),
|
|
14
14
|
setup(p) {
|
|
15
15
|
const r = v(p, "modelValue"), { cx: f } = y();
|
|
16
16
|
return (c, e) => (i(), o("div", g(C(l(f)("flex flex-col gap-2 p-4"))), [
|
|
@@ -28,7 +28,7 @@ const B = { class: "border rounded p-1 text-xs" }, $ = { class: "flex items-cent
|
|
|
28
28
|
]))), 128)),
|
|
29
29
|
t("div", M, [
|
|
30
30
|
d(l(u), {
|
|
31
|
-
size: "
|
|
31
|
+
size: "xs",
|
|
32
32
|
onClick: e[0] || (e[0] = (s) => c.$emit("upload"))
|
|
33
33
|
}, {
|
|
34
34
|
default: a(() => e[2] || (e[2] = [
|
|
@@ -38,7 +38,7 @@ const B = { class: "border rounded p-1 text-xs" }, $ = { class: "flex items-cent
|
|
|
38
38
|
__: [2]
|
|
39
39
|
}),
|
|
40
40
|
d(l(u), {
|
|
41
|
-
size: "
|
|
41
|
+
size: "xs",
|
|
42
42
|
variant: "outlined",
|
|
43
43
|
onClick: e[1] || (e[1] = (s) => r.value = [])
|
|
44
44
|
}, {
|
|
@@ -24,7 +24,7 @@ const v = { class: "flex items-center gap-1.5 whitespace-nowrap" }, B = { class:
|
|
|
24
24
|
e[1] || (e[1] = s("span", { class: "text-c-3" }, " or", -1))
|
|
25
25
|
]),
|
|
26
26
|
c(l(y), {
|
|
27
|
-
size: "
|
|
27
|
+
size: "xs",
|
|
28
28
|
tabindex: "-1",
|
|
29
29
|
variant: "outlined",
|
|
30
30
|
onClick: e[0] || (e[0] = (d) => t.$emit("click", d))
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const ICONS: readonly ["Add", "AddTab", "Alert", "ArrowLeft", "ArrowRight", "Brackets", "Branch", "Changelog", "Checkmark", "ChevronDown", "ChevronLeft", "ChevronRight", "ChevronUp", "Clipboard", "Close", "CloseTab", "CloseTabs", "Cloud", "CodeFolder", "Cog", "Collection", "Cookie", "DarkMode", "Delete", "Discord", "DocsPage", "Download", "Duplicate", "Edit", "Ellipses", "Email", "Error", "Example", "ExternalLink", "FilterList", "Folder", "GitHub", "GitHubLine", "Globe", "Google", "Help", "Hide", "History", "House", "Import", "Info", "Key", "Leave", "LightDarkModeToggle", "LightMode", "Link", "Lock", "Logo", "Magic", "Markdown", "Menu", "NotAllowed", "Page", "Pencil", "Play", "Refresh", "Roadmap", "Scribble", "Search", "Server", "Settings", "Show", "Sort", "Terminal", "Trash", "Unlock", "Unwatch", "Upload", "User", "UserSwitch", "Users", "Versions", "Wallet", "Watch", "Workspace", "programming-framework-angular", "programming-framework-astro", "programming-framework-laravel", "programming-framework-nextdotjs", "programming-framework-react", "programming-framework-vuedotjs", "programming-language-c", "programming-language-clojure", "programming-language-csharp", "programming-language-css3", "programming-language-dart", "programming-language-go", "programming-language-html5", "programming-language-http", "programming-language-java", "programming-language-javascript", "programming-language-json", "programming-language-kotlin", "programming-language-node", "programming-language-objc", "programming-language-ocaml", "programming-language-php", "programming-language-powershell", "programming-language-python", "programming-language-r", "programming-language-ruby", "programming-language-rust", "programming-language-scala", "programming-language-shell", "programming-language-swift", "programming-language-typescript", "programming-script-code", "programming-tool-git", "programming-tool-tailwindcss"];
|
|
1
|
+
export declare const ICONS: readonly ["Add", "AddTab", "Alert", "ArrowLeft", "ArrowRight", "Brackets", "Branch", "Changelog", "Checkmark", "ChevronDown", "ChevronLeft", "ChevronRight", "ChevronUp", "Clipboard", "Close", "CloseTab", "CloseTabs", "Cloud", "CodeFolder", "Cog", "Collection", "Cookie", "DarkMode", "Delete", "Discord", "DocsPage", "Download", "Duplicate", "Edit", "Ellipses", "Email", "Error", "Example", "ExternalLink", "FilterList", "Folder", "GitHub", "GitHubLine", "Globe", "Google", "Help", "Hide", "History", "House", "Import", "Info", "Key", "Leave", "LightDarkModeToggle", "LightMode", "Link", "Lock", "Logo", "Magic", "Markdown", "Menu", "NotAllowed", "Page", "Pencil", "Play", "Refresh", "Roadmap", "Scribble", "Search", "Server", "Settings", "Show", "Sort", "Terminal", "Trash", "Unlock", "Unwatch", "Upload", "User", "UserSwitch", "Users", "Versions", "Wallet", "Watch", "Workspace", "programming-framework-angular", "programming-framework-astro", "programming-framework-laravel", "programming-framework-nextdotjs", "programming-framework-react", "programming-framework-vuedotjs", "programming-language-c", "programming-language-clojure", "programming-language-csharp", "programming-language-css3", "programming-language-dart", "programming-language-fsharp", "programming-language-go", "programming-language-html5", "programming-language-http", "programming-language-java", "programming-language-javascript", "programming-language-json", "programming-language-kotlin", "programming-language-node", "programming-language-objc", "programming-language-ocaml", "programming-language-php", "programming-language-powershell", "programming-language-python", "programming-language-r", "programming-language-ruby", "programming-language-rust", "programming-language-scala", "programming-language-shell", "programming-language-swift", "programming-language-typescript", "programming-script-code", "programming-tool-git", "programming-tool-tailwindcss"];
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ScalarIcon/icons/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ScalarIcon/icons/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,q5DAoHR,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createElementBlock as r, openBlock as t, createElementVNode as o } from "vue";
|
|
2
|
+
const n = {
|
|
3
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4
|
+
fill: "currentColor",
|
|
5
|
+
viewBox: "0 0 128 128"
|
|
6
|
+
};
|
|
7
|
+
function l(m, e) {
|
|
8
|
+
return t(), r("svg", n, e[0] || (e[0] = [
|
|
9
|
+
o("path", { d: "M0 64.5 60.7 3.8v30.4L30.4 64.5l30.4 30.4v30.4zm39.1 0 21.7-21.7v43.4zm88.9 0L65.1 3.8v30.4l30.4 30.4-30.4 30.3v30.4z" }, null, -1)
|
|
10
|
+
]));
|
|
11
|
+
}
|
|
12
|
+
const s = { render: l };
|
|
13
|
+
export {
|
|
14
|
+
s as default,
|
|
15
|
+
l as render
|
|
16
|
+
};
|