@scalar/components 0.14.18 → 0.14.19
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/ScalarCard/ScalarCard.stories.d.ts +10 -0
- package/dist/components/ScalarCard/ScalarCard.stories.d.ts.map +1 -0
- package/dist/components/ScalarCard/ScalarCard.test.d.ts +2 -0
- package/dist/components/ScalarCard/ScalarCard.test.d.ts.map +1 -0
- package/dist/components/ScalarCard/ScalarCard.vue.d.ts +30 -0
- package/dist/components/ScalarCard/ScalarCard.vue.d.ts.map +1 -0
- package/dist/components/ScalarCard/ScalarCard.vue.js +25 -0
- package/dist/components/ScalarCard/ScalarCard.vue2.js +4 -0
- package/dist/components/ScalarCard/ScalarCardFooter.vue.d.ts +19 -0
- package/dist/components/ScalarCard/ScalarCardFooter.vue.d.ts.map +1 -0
- package/dist/components/ScalarCard/ScalarCardFooter.vue.js +20 -0
- package/dist/components/ScalarCard/ScalarCardFooter.vue2.js +4 -0
- package/dist/components/ScalarCard/ScalarCardHeader.vue.d.ts +22 -0
- package/dist/components/ScalarCard/ScalarCardHeader.vue.d.ts.map +1 -0
- package/dist/components/ScalarCard/ScalarCardHeader.vue.js +34 -0
- package/dist/components/ScalarCard/ScalarCardHeader.vue2.js +4 -0
- package/dist/components/ScalarCard/ScalarCardSection.vue.d.ts +22 -0
- package/dist/components/ScalarCard/ScalarCardSection.vue.d.ts.map +1 -0
- package/dist/components/ScalarCard/ScalarCardSection.vue.js +16 -0
- package/dist/components/ScalarCard/ScalarCardSection.vue2.js +4 -0
- package/dist/components/ScalarCard/index.d.ts +5 -0
- package/dist/components/ScalarCard/index.d.ts.map +1 -0
- package/dist/components/ScalarCard/useCardHeading.d.ts +21 -0
- package/dist/components/ScalarCard/useCardHeading.d.ts.map +1 -0
- package/dist/components/ScalarCard/useCardHeading.js +16 -0
- package/dist/components/ScalarColorModeToggle/ScalarColorModeToggleIcon.vue2.js +4 -3
- package/dist/components/ScalarCombobox/ScalarCombobox.vue.js +11 -11
- package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.vue.d.ts +1 -1
- package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.vue.d.ts.map +1 -1
- package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.vue.js +12 -12
- package/dist/components/ScalarCombobox/ScalarComboboxPopover.vue.js +6 -6
- package/dist/components/ScalarDropdown/ScalarDropdown.vue.js +15 -15
- package/dist/components/ScalarFileUpload/ScalarFileUploadFileList.vue.js +7 -5
- package/dist/components/ScalarFileUpload/ScalarFileUploadInput.vue.js +2 -1
- package/dist/components/ScalarFloating/ScalarFloating.vue.js +20 -20
- package/dist/components/ScalarListbox/ScalarListbox.vue.js +15 -15
- package/dist/components/ScalarMarkdown/ScalarMarkdown.vue.d.ts.map +1 -1
- package/dist/components/ScalarMenu/ScalarMenuProducts.vue.js +6 -3
- package/dist/components/ScalarMenu/ScalarMenuResources.vue.js +8 -5
- package/dist/components/ScalarMenu/ScalarMenuTeamPicker.vue.js +7 -5
- package/dist/components/ScalarPopover/ScalarPopover.vue.js +11 -11
- package/dist/components/ScalarSearchInput/ScalarSearchInput.vue.d.ts.map +1 -1
- package/dist/components/ScalarSearchInput/ScalarSearchInput.vue.js +8 -6
- package/dist/helpers/add-scalar-classes.d.ts +4 -2
- package/dist/helpers/add-scalar-classes.d.ts.map +1 -1
- package/dist/helpers/add-scalar-classes.js +13 -17
- package/dist/helpers/add-scalar-classes.test.d.ts +2 -0
- package/dist/helpers/add-scalar-classes.test.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +158 -150
- package/dist/style.css +1 -1
- package/package.json +8 -8
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3';
|
|
2
|
+
import { ScalarCard } from './index';
|
|
3
|
+
declare const meta: Meta<typeof ScalarCard>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithLabel: Story;
|
|
8
|
+
export declare const HeaderWithActions: Story;
|
|
9
|
+
export declare const MinimalCard: Story;
|
|
10
|
+
//# sourceMappingURL=ScalarCard.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarCard.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCard/ScalarCard.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAErD,OAAO,EAAE,UAAU,EAAyD,MAAM,SAAS,CAAA;AAE3F,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CA0BjC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAIvB,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,KAoB/B,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KAczB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarCard.test.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCard/ScalarCard.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scalar card component
|
|
3
|
+
*
|
|
4
|
+
* Creates an aria region using the nearest ScalarCardHeader as the label
|
|
5
|
+
*
|
|
6
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/region_role
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* <ScalarCard>
|
|
10
|
+
* <ScalarCardHeader>Header</ScalarCardHeader>
|
|
11
|
+
* <ScalarCardSection>Content</ScalarCardSection>
|
|
12
|
+
* <ScalarCardFooter>Footer</ScalarCardFooter>
|
|
13
|
+
* </ScalarCard>
|
|
14
|
+
*/
|
|
15
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
16
|
+
/** The a11y label for the card region */
|
|
17
|
+
label?: string;
|
|
18
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
19
|
+
/** The a11y label for the card region */
|
|
20
|
+
label?: string;
|
|
21
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
22
|
+
default?(_: {}): any;
|
|
23
|
+
}>;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=ScalarCard.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarCard.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCard/ScalarCard.vue"],"names":[],"mappings":"AAmEA;;;;;;;;;;;;;GAaG;;IAID,yCAAyC;YACjC,MAAM;;IADd,yCAAyC;YACjC,MAAM;;qBA4Da,GAAG;;AAhEhC,wBAiGC;AAWD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineComponent as o, computed as n, createElementBlock as i, openBlock as d, normalizeProps as s, guardReactiveProps as u, unref as c, renderSlot as f } from "vue";
|
|
2
|
+
import { useBindCx as m } from "@scalar/use-hooks/useBindCx";
|
|
3
|
+
import { useCardRegion as b } from "./useCardHeading.js";
|
|
4
|
+
const p = {}, h = /* @__PURE__ */ o({
|
|
5
|
+
...p,
|
|
6
|
+
inheritAttrs: !1,
|
|
7
|
+
__name: "ScalarCard",
|
|
8
|
+
props: {
|
|
9
|
+
label: {}
|
|
10
|
+
},
|
|
11
|
+
setup(e) {
|
|
12
|
+
const { id: r } = b(), t = n(() => e.label ? { "aria-label": e.label } : r.value ? { "aria-labelledby": r.value } : {}), { cx: a } = m();
|
|
13
|
+
return (l, _) => (d(), i("section", s(u({
|
|
14
|
+
...t.value,
|
|
15
|
+
...c(a)(
|
|
16
|
+
"scalar-card bg-b-2 flex flex-col divide-y rounded-lg border *:first:rounded-t-[inherit] *:last:rounded-b-[inherit]"
|
|
17
|
+
)
|
|
18
|
+
})), [
|
|
19
|
+
f(l.$slots, "default")
|
|
20
|
+
], 16));
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
export {
|
|
24
|
+
h as default
|
|
25
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scalar card footer component
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* <ScalarCard>
|
|
6
|
+
* ...
|
|
7
|
+
* <ScalarCardFooter>Footer</ScalarCardFooter>
|
|
8
|
+
* </ScalarCard>
|
|
9
|
+
*/
|
|
10
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
11
|
+
default?(_: {}): any;
|
|
12
|
+
}>;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=ScalarCardFooter.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarCardFooter.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCard/ScalarCardFooter.vue"],"names":[],"mappings":"AAiCA;;;;;;;;GAQG;;qBA4C0B,GAAG;;AA3ChC,wBA0EC;AAKD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineComponent as t, createBlock as o, openBlock as a, normalizeProps as n, guardReactiveProps as s, unref as c, withCtx as _, renderSlot as f } from "vue";
|
|
2
|
+
import { useBindCx as i } from "@scalar/use-hooks/useBindCx";
|
|
3
|
+
import l from "./ScalarCardSection.vue.js";
|
|
4
|
+
const m = {}, h = /* @__PURE__ */ t({
|
|
5
|
+
...m,
|
|
6
|
+
inheritAttrs: !1,
|
|
7
|
+
__name: "ScalarCardFooter",
|
|
8
|
+
setup(p) {
|
|
9
|
+
const { cx: r } = i();
|
|
10
|
+
return (e, d) => (a(), o(l, n(s(c(r)("scalar-card-footer"))), {
|
|
11
|
+
default: _(() => [
|
|
12
|
+
f(e.$slots, "default")
|
|
13
|
+
]),
|
|
14
|
+
_: 3
|
|
15
|
+
}, 16));
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
export {
|
|
19
|
+
h as default
|
|
20
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scalar card header component
|
|
3
|
+
*
|
|
4
|
+
* Will automatically be used as the aria-labelledby for the parent ScalarCard component
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* <ScalarCard>
|
|
8
|
+
* <ScalarCardHeader>Header</ScalarCardHeader>
|
|
9
|
+
* ...
|
|
10
|
+
* </ScalarCard>
|
|
11
|
+
*/
|
|
12
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
13
|
+
default?(_: {}): any;
|
|
14
|
+
actions?(_: {}): any;
|
|
15
|
+
}>;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=ScalarCardHeader.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarCardHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCard/ScalarCardHeader.vue"],"names":[],"mappings":"AA4DA;;;;;;;;;;GAUG;;qBAoE0B,GAAG;qBACH,GAAG;;AApEhC,wBAoGC;AAKD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { defineComponent as n, useId as d, createBlock as i, openBlock as r, normalizeProps as c, guardReactiveProps as l, unref as a, withCtx as m, createElementVNode as f, createElementBlock as _, createCommentVNode as u, renderSlot as o } from "vue";
|
|
2
|
+
import { useBindCx as p } from "@scalar/use-hooks/useBindCx";
|
|
3
|
+
import h from "./ScalarCardSection.vue.js";
|
|
4
|
+
import { useCardHeading as C } from "./useCardHeading.js";
|
|
5
|
+
const k = ["id"], x = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "flex"
|
|
8
|
+
}, B = {}, H = /* @__PURE__ */ n({
|
|
9
|
+
...B,
|
|
10
|
+
inheritAttrs: !1,
|
|
11
|
+
__name: "ScalarCardHeader",
|
|
12
|
+
setup($) {
|
|
13
|
+
const { cx: s } = p(), t = d();
|
|
14
|
+
return C(t), (e, g) => (r(), i(h, c(l(
|
|
15
|
+
a(s)("scalar-card-header leading-[1.35] font-medium py-2.25 px-3 shrink-0")
|
|
16
|
+
)), {
|
|
17
|
+
default: m(() => [
|
|
18
|
+
f("div", {
|
|
19
|
+
id: a(t),
|
|
20
|
+
class: "scalar-card-header-title min-w-0 flex-1 truncate"
|
|
21
|
+
}, [
|
|
22
|
+
o(e.$slots, "default")
|
|
23
|
+
], 8, k),
|
|
24
|
+
e.$slots.actions ? (r(), _("div", x, [
|
|
25
|
+
o(e.$slots, "actions")
|
|
26
|
+
])) : u("", !0)
|
|
27
|
+
]),
|
|
28
|
+
_: 3
|
|
29
|
+
}, 16));
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
export {
|
|
33
|
+
H as default
|
|
34
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scalar card section component
|
|
3
|
+
*
|
|
4
|
+
* A generic section of a ScalarCard component, provides the base for ScalarCardHeader and ScalarCardFooter
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* <ScalarCard>
|
|
8
|
+
* ...
|
|
9
|
+
* <ScalarCardSection>Content</ScalarCardSection>
|
|
10
|
+
* ...
|
|
11
|
+
* </ScalarCard>
|
|
12
|
+
*/
|
|
13
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
14
|
+
default?(_: {}): any;
|
|
15
|
+
}>;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=ScalarCardSection.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarCardSection.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCard/ScalarCardSection.vue"],"names":[],"mappings":"AAgCA;;;;;;;;;;;GAWG;;qBAqC0B,GAAG;;AApChC,wBAkEC;AAKD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { defineComponent as t, createElementBlock as o, openBlock as n, normalizeProps as a, guardReactiveProps as c, unref as s, renderSlot as l } from "vue";
|
|
2
|
+
import { useBindCx as f } from "@scalar/use-hooks/useBindCx";
|
|
3
|
+
const i = {}, m = /* @__PURE__ */ t({
|
|
4
|
+
...i,
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "ScalarCardSection",
|
|
7
|
+
setup(_) {
|
|
8
|
+
const { cx: e } = f();
|
|
9
|
+
return (r, d) => (n(), o("div", a(c(s(e)("scalar-card-content flex overflow-auto"))), [
|
|
10
|
+
l(r.$slots, "default")
|
|
11
|
+
], 16));
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
export {
|
|
15
|
+
m as default
|
|
16
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as ScalarCard } from './ScalarCard.vue.js';
|
|
2
|
+
export { default as ScalarCardHeader } from './ScalarCardHeader.vue.js';
|
|
3
|
+
export { default as ScalarCardSection } from './ScalarCardSection.vue.js';
|
|
4
|
+
export { default as ScalarCardFooter } from './ScalarCardFooter.vue.js';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCard/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACpE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AACtE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type InjectionKey, type Ref } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Tracks the region heading id for card accessibility
|
|
4
|
+
*/
|
|
5
|
+
export declare const CARD_Heading_SYMBOL: InjectionKey<Ref<string | undefined>>;
|
|
6
|
+
/**
|
|
7
|
+
* Set the region heading id for a ScalarCardHeader component.
|
|
8
|
+
*
|
|
9
|
+
* This should be called from ScalarCardHeader components.
|
|
10
|
+
*/
|
|
11
|
+
export declare const useCardHeading: (id: string) => void;
|
|
12
|
+
/**
|
|
13
|
+
* Get the region heading id if set.
|
|
14
|
+
*
|
|
15
|
+
* This should be called from ScalarCard components.
|
|
16
|
+
*/
|
|
17
|
+
export declare const useCardRegion: () => {
|
|
18
|
+
/** The region heading id ref */
|
|
19
|
+
id: Ref<string | undefined, string | undefined>;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=useCardHeading.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCardHeading.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCard/useCardHeading.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,YAAY,EAAE,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAEvE;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAe,YAAY,CAAC,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC,CAAA;AAEpF;;;;GAIG;AACH,eAAO,MAAM,cAAc,OAAQ,MAAM,SAKxC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,aAAa;IAMtB,gCAAgC;;CAGnC,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ref as i, provide as r, inject as t } from "vue";
|
|
2
|
+
const n = Symbol(), s = (o) => {
|
|
3
|
+
const e = t(n, void 0);
|
|
4
|
+
e && (e.value = o);
|
|
5
|
+
}, c = () => {
|
|
6
|
+
const o = i();
|
|
7
|
+
return r(n, o), {
|
|
8
|
+
/** The region heading id ref */
|
|
9
|
+
id: o
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
n as CARD_Heading_SYMBOL,
|
|
14
|
+
s as useCardHeading,
|
|
15
|
+
c as useCardRegion
|
|
16
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as a, computed as r, createBlock as i, openBlock as c, resolveDynamicComponent as u, mergeProps as m, unref as p, withCtx as g, createElementVNode as e } from "vue";
|
|
2
2
|
import { useBindCx as d } from "@scalar/use-hooks/useBindCx";
|
|
3
|
-
const f = {},
|
|
3
|
+
const f = {}, b = /* @__PURE__ */ a({
|
|
4
4
|
...f,
|
|
5
5
|
inheritAttrs: !1,
|
|
6
6
|
__name: "ScalarColorModeToggleIcon",
|
|
@@ -26,10 +26,11 @@ const f = {}, _ = /* @__PURE__ */ a({
|
|
|
26
26
|
e("span", { class: "toggle-icon-moon-mask" })
|
|
27
27
|
], -1)
|
|
28
28
|
])),
|
|
29
|
-
_: 1
|
|
29
|
+
_: 1,
|
|
30
|
+
__: [0]
|
|
30
31
|
}, 16, ["aria-label", "class", "type"]));
|
|
31
32
|
}
|
|
32
33
|
});
|
|
33
34
|
export {
|
|
34
|
-
|
|
35
|
+
b as default
|
|
35
36
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as m, createBlock as p, openBlock as d, withCtx as
|
|
1
|
+
import { defineComponent as m, createBlock as p, openBlock as d, withCtx as t, createVNode as s, createSlots as n, renderSlot as l } from "vue";
|
|
2
2
|
import f from "./ScalarComboboxOptions.vue.js";
|
|
3
3
|
import i from "./ScalarComboboxPopover.vue.js";
|
|
4
|
-
const
|
|
4
|
+
const h = /* @__PURE__ */ m({
|
|
5
5
|
__name: "ScalarCombobox",
|
|
6
6
|
props: {
|
|
7
7
|
options: {},
|
|
8
8
|
modelValue: {},
|
|
9
9
|
placeholder: {},
|
|
10
10
|
placement: {},
|
|
11
|
-
offset: {},
|
|
11
|
+
offset: { type: [Number, Object, Function] },
|
|
12
12
|
resize: { type: Boolean },
|
|
13
13
|
target: {},
|
|
14
14
|
middleware: {},
|
|
@@ -24,10 +24,10 @@ const c = /* @__PURE__ */ m({
|
|
|
24
24
|
target: e.target,
|
|
25
25
|
teleport: e.teleport
|
|
26
26
|
}, {
|
|
27
|
-
default:
|
|
28
|
-
|
|
27
|
+
default: t(({ open: o }) => [
|
|
28
|
+
l(e.$slots, "default", { open: o })
|
|
29
29
|
]),
|
|
30
|
-
popover:
|
|
30
|
+
popover: t(({ open: o, close: a }) => [
|
|
31
31
|
s(f, {
|
|
32
32
|
modelValue: e.modelValue ? [e.modelValue] : [],
|
|
33
33
|
open: o,
|
|
@@ -37,15 +37,15 @@ const c = /* @__PURE__ */ m({
|
|
|
37
37
|
}, n({ _: 2 }, [
|
|
38
38
|
e.$slots.before ? {
|
|
39
39
|
name: "before",
|
|
40
|
-
fn:
|
|
41
|
-
|
|
40
|
+
fn: t(() => [
|
|
41
|
+
l(e.$slots, "before", { open: o })
|
|
42
42
|
]),
|
|
43
43
|
key: "0"
|
|
44
44
|
} : void 0,
|
|
45
45
|
e.$slots.after ? {
|
|
46
46
|
name: "after",
|
|
47
|
-
fn:
|
|
48
|
-
|
|
47
|
+
fn: t(() => [
|
|
48
|
+
l(e.$slots, "after", { open: o })
|
|
49
49
|
]),
|
|
50
50
|
key: "1"
|
|
51
51
|
} : void 0
|
|
@@ -56,5 +56,5 @@ const c = /* @__PURE__ */ m({
|
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
58
|
export {
|
|
59
|
-
|
|
59
|
+
h as default
|
|
60
60
|
};
|
|
@@ -14,7 +14,7 @@ declare function __VLS_template(): {
|
|
|
14
14
|
$: import("vue").ComponentInternalInstance;
|
|
15
15
|
$data: {};
|
|
16
16
|
$props: {
|
|
17
|
-
readonly placement?: import("@floating-ui/
|
|
17
|
+
readonly placement?: import("@floating-ui/vue").Placement | undefined;
|
|
18
18
|
readonly offset?: import("@floating-ui/vue").OffsetOptions | undefined;
|
|
19
19
|
readonly resize?: boolean | undefined;
|
|
20
20
|
readonly target?: (string | HTMLElement) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarComboboxMultiselect.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCombobox/ScalarComboboxMultiselect.vue"],"names":[],"mappings":"AAwEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AAG9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAIjE,KAAK,WAAW,GAAG;IACf,OAAO,EAAE,MAAM,EAAE,GAAG,WAAW,EAAE,CAAA;IACjC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,GAAG,qBAAqB,CAAC;AAyB5B,iBAAS,cAAc;WAgGT,OAAO,IAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAvIlD,KA9Ba,eA8Bb,KA7BU,uBA6BV,KA5BO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"ScalarComboboxMultiselect.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCombobox/ScalarComboboxMultiselect.vue"],"names":[],"mappings":"AAwEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AAG9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAIjE,KAAK,WAAW,GAAG;IACf,OAAO,EAAE,MAAM,EAAE,GAAG,WAAW,EAAE,CAAA;IACjC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,GAAG,qBAAqB,CAAC;AAyB5B,iBAAS,cAAc;WAgGT,OAAO,IAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAvIlD,KA9Ba,eA8Bb,KA7BU,uBA6BV,KA5BO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAgNk5hB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAxC9giB;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;4BAzJrB,KA9Ba,eA8Bb,KA7BU,uBA6BV,KA5BO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA4BP,KA9Ba,eA8Bb,KA7BU,uBA6BV,KA5BO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kFA8LL,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as d, ref as f, createBlock as p, openBlock as n, withCtx as
|
|
1
|
+
import { defineComponent as d, ref as f, createBlock as p, openBlock as n, withCtx as t, renderSlot as a, createCommentVNode as u, createSlots as b } from "vue";
|
|
2
2
|
import $ from "./ScalarComboboxOptions.vue.js";
|
|
3
|
-
import
|
|
3
|
+
import y from "./ScalarComboboxPopover.vue.js";
|
|
4
4
|
const w = /* @__PURE__ */ d({
|
|
5
5
|
__name: "ScalarComboboxMultiselect",
|
|
6
6
|
props: {
|
|
@@ -9,16 +9,16 @@ const w = /* @__PURE__ */ d({
|
|
|
9
9
|
placeholder: {},
|
|
10
10
|
isDeletable: { type: Boolean },
|
|
11
11
|
placement: {},
|
|
12
|
-
offset: {},
|
|
12
|
+
offset: { type: [Number, Object, Function] },
|
|
13
13
|
resize: { type: Boolean },
|
|
14
14
|
target: {},
|
|
15
15
|
middleware: {},
|
|
16
16
|
teleport: { type: [Boolean, String] }
|
|
17
17
|
},
|
|
18
18
|
emits: ["update:modelValue", "delete"],
|
|
19
|
-
setup(
|
|
19
|
+
setup(V, { expose: i }) {
|
|
20
20
|
const s = f(null);
|
|
21
|
-
return i({ comboboxPopoverRef: s }), (e, o) => (n(), p(
|
|
21
|
+
return i({ comboboxPopoverRef: s }), (e, o) => (n(), p(y, {
|
|
22
22
|
ref_key: "comboboxPopoverRef",
|
|
23
23
|
ref: s,
|
|
24
24
|
middleware: e.middleware,
|
|
@@ -28,7 +28,7 @@ const w = /* @__PURE__ */ d({
|
|
|
28
28
|
target: e.target,
|
|
29
29
|
teleport: e.teleport
|
|
30
30
|
}, {
|
|
31
|
-
popover:
|
|
31
|
+
popover: t(({ open: l }) => {
|
|
32
32
|
var m;
|
|
33
33
|
return [
|
|
34
34
|
(m = e.options) != null && m.length ? (n(), p($, {
|
|
@@ -36,7 +36,7 @@ const w = /* @__PURE__ */ d({
|
|
|
36
36
|
isDeletable: e.isDeletable,
|
|
37
37
|
modelValue: e.modelValue,
|
|
38
38
|
multiselect: "",
|
|
39
|
-
open:
|
|
39
|
+
open: l,
|
|
40
40
|
options: e.options,
|
|
41
41
|
placeholder: e.placeholder,
|
|
42
42
|
onDelete: o[0] || (o[0] = (r) => e.$emit("delete", r)),
|
|
@@ -44,22 +44,22 @@ const w = /* @__PURE__ */ d({
|
|
|
44
44
|
}, b({ _: 2 }, [
|
|
45
45
|
e.$slots.before ? {
|
|
46
46
|
name: "before",
|
|
47
|
-
fn:
|
|
48
|
-
a(e.$slots, "before", { open:
|
|
47
|
+
fn: t(() => [
|
|
48
|
+
a(e.$slots, "before", { open: l })
|
|
49
49
|
]),
|
|
50
50
|
key: "0"
|
|
51
51
|
} : void 0,
|
|
52
52
|
e.$slots.after ? {
|
|
53
53
|
name: "after",
|
|
54
|
-
fn:
|
|
55
|
-
a(e.$slots, "after", { open:
|
|
54
|
+
fn: t(() => [
|
|
55
|
+
a(e.$slots, "after", { open: l })
|
|
56
56
|
]),
|
|
57
57
|
key: "1"
|
|
58
58
|
} : void 0
|
|
59
59
|
]), 1032, ["isDeletable", "modelValue", "open", "options", "placeholder"])) : u("", !0)
|
|
60
60
|
];
|
|
61
61
|
}),
|
|
62
|
-
default:
|
|
62
|
+
default: t(() => [
|
|
63
63
|
a(e.$slots, "default")
|
|
64
64
|
]),
|
|
65
65
|
_: 3
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { defineComponent as u, ref as c, createBlock as _, openBlock as v, unref as o, withCtx as t, createVNode as r, normalizeProps as y, guardReactiveProps as w, createSlots as x, renderSlot as l, mergeProps as B } from "vue";
|
|
2
2
|
import { Popover as P, PopoverButton as h, PopoverPanel as k } from "@headlessui/vue";
|
|
3
3
|
import { useBindCx as g } from "@scalar/use-hooks/useBindCx";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import b from "../ScalarFloating/ScalarFloating.vue.js";
|
|
5
|
+
import $ from "../ScalarFloating/ScalarFloatingBackdrop.vue.js";
|
|
6
6
|
const z = /* @__PURE__ */ u({
|
|
7
7
|
inheritAttrs: !1,
|
|
8
8
|
__name: "ScalarComboboxPopover",
|
|
9
9
|
props: {
|
|
10
10
|
placement: {},
|
|
11
|
-
offset: {},
|
|
11
|
+
offset: { type: [Number, Object, Function] },
|
|
12
12
|
resize: { type: Boolean },
|
|
13
13
|
target: {},
|
|
14
14
|
middleware: {},
|
|
15
15
|
teleport: { type: [Boolean, String] }
|
|
16
16
|
},
|
|
17
|
-
setup(
|
|
17
|
+
setup(C, { expose: s }) {
|
|
18
18
|
const { cx: f } = g(), p = c(null), i = (e) => {
|
|
19
19
|
var n;
|
|
20
20
|
["ArrowUp", "ArrowDown"].includes(e.key) && (e.preventDefault(), (n = e.target) == null || n.dispatchEvent(new KeyboardEvent("keydown", { key: "Enter" })));
|
|
21
21
|
};
|
|
22
22
|
return s({ popoverButtonRef: p }), (e, n) => (v(), _(o(P), { as: "template" }, {
|
|
23
23
|
default: t(({ open: a }) => [
|
|
24
|
-
r(o(
|
|
24
|
+
r(o(b), y(w(e.$props)), x({
|
|
25
25
|
default: t(() => [
|
|
26
26
|
r(o(h), {
|
|
27
27
|
ref_key: "popoverButtonRef",
|
|
@@ -51,7 +51,7 @@ const z = /* @__PURE__ */ u({
|
|
|
51
51
|
close: d,
|
|
52
52
|
open: a
|
|
53
53
|
}),
|
|
54
|
-
r(o(
|
|
54
|
+
r(o($))
|
|
55
55
|
]),
|
|
56
56
|
_: 2
|
|
57
57
|
}, 1040, ["style"])
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { defineComponent as p, createBlock as i, openBlock as f, unref as e, withCtx as t, createVNode as r, mergeProps as
|
|
2
|
-
import { Menu as u, MenuButton as
|
|
1
|
+
import { defineComponent as p, createBlock as i, openBlock as f, unref as e, withCtx as t, createVNode as r, mergeProps as a, renderSlot as s } from "vue";
|
|
2
|
+
import { Menu as u, MenuButton as c, MenuItems as _ } from "@headlessui/vue";
|
|
3
3
|
import { useBindCx as d } from "@scalar/use-hooks/useBindCx";
|
|
4
4
|
import B from "./ScalarDropdownMenu.vue.js";
|
|
5
5
|
import h from "../ScalarFloating/ScalarFloating.vue.js";
|
|
6
|
-
const
|
|
7
|
-
|
|
6
|
+
const y = {}, k = /* @__PURE__ */ p({
|
|
7
|
+
...y,
|
|
8
8
|
inheritAttrs: !1,
|
|
9
9
|
__name: "ScalarDropdown",
|
|
10
10
|
props: {
|
|
11
11
|
placement: {},
|
|
12
|
-
offset: {},
|
|
12
|
+
offset: { type: [Number, Object, Function] },
|
|
13
13
|
resize: { type: Boolean },
|
|
14
14
|
target: {},
|
|
15
15
|
middleware: {},
|
|
16
16
|
teleport: { type: [Boolean, String] }
|
|
17
17
|
},
|
|
18
|
-
setup(
|
|
18
|
+
setup($) {
|
|
19
19
|
const { cx: l } = d();
|
|
20
|
-
return (o,
|
|
21
|
-
default: t(({ open:
|
|
22
|
-
r(e(h),
|
|
20
|
+
return (o, g) => (f(), i(e(u), null, {
|
|
21
|
+
default: t(({ open: n }) => [
|
|
22
|
+
r(e(h), a(o.$props, {
|
|
23
23
|
placement: o.placement ?? "bottom-start"
|
|
24
24
|
}), {
|
|
25
25
|
floating: t(({ width: m }) => [
|
|
26
|
-
r(B,
|
|
27
|
-
is: e(
|
|
26
|
+
r(B, a({
|
|
27
|
+
is: e(_),
|
|
28
28
|
style: { width: m }
|
|
29
29
|
}, e(l)("max-h-[inherit]")), {
|
|
30
30
|
default: t(() => [
|
|
31
|
-
s(o.$slots, "items", { open:
|
|
31
|
+
s(o.$slots, "items", { open: n })
|
|
32
32
|
]),
|
|
33
33
|
_: 2
|
|
34
34
|
}, 1040, ["is", "style"])
|
|
35
35
|
]),
|
|
36
36
|
default: t(() => [
|
|
37
|
-
r(e(
|
|
37
|
+
r(e(c), { as: "template" }, {
|
|
38
38
|
default: t(() => [
|
|
39
|
-
s(o.$slots, "default", { open:
|
|
39
|
+
s(o.$slots, "default", { open: n })
|
|
40
40
|
]),
|
|
41
41
|
_: 2
|
|
42
42
|
}, 1024)
|
|
@@ -49,5 +49,5 @@ const $ = {}, x = /* @__PURE__ */ p({
|
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
export {
|
|
52
|
-
|
|
52
|
+
k as default
|
|
53
53
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as _, mergeModels as x, 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__ */ _({
|
|
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__ */ x(["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"))), [
|
|
@@ -34,7 +34,8 @@ const B = { class: "border rounded p-1 text-xs" }, $ = { class: "flex items-cent
|
|
|
34
34
|
default: a(() => e[2] || (e[2] = [
|
|
35
35
|
m(" Upload ")
|
|
36
36
|
])),
|
|
37
|
-
_: 1
|
|
37
|
+
_: 1,
|
|
38
|
+
__: [2]
|
|
38
39
|
}),
|
|
39
40
|
d(l(u), {
|
|
40
41
|
size: "sm",
|
|
@@ -44,7 +45,8 @@ const B = { class: "border rounded p-1 text-xs" }, $ = { class: "flex items-cent
|
|
|
44
45
|
default: a(() => e[3] || (e[3] = [
|
|
45
46
|
m(" Clear ")
|
|
46
47
|
])),
|
|
47
|
-
_: 1
|
|
48
|
+
_: 1,
|
|
49
|
+
__: [3]
|
|
48
50
|
})
|
|
49
51
|
])
|
|
50
52
|
], 16));
|