@scalar/components 0.13.0 → 0.13.2
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.test.d.ts +2 -0
- package/dist/components/ScalarButton/ScalarButton.test.d.ts.map +1 -0
- package/dist/components/ScalarCodeBlock/ScalarCodeBlock.test.d.ts +2 -0
- package/dist/components/ScalarCodeBlock/ScalarCodeBlock.test.d.ts.map +1 -0
- package/dist/components/ScalarCombobox/ScalarCombobox.test.d.ts +2 -0
- package/dist/components/ScalarCombobox/ScalarCombobox.test.d.ts.map +1 -0
- package/dist/components/ScalarContextMenu/ScalarContextMenu.test.d.ts +2 -0
- package/dist/components/ScalarContextMenu/ScalarContextMenu.test.d.ts.map +1 -0
- package/dist/components/ScalarDropdown/ScalarDropdown.test.d.ts +2 -0
- package/dist/components/ScalarDropdown/ScalarDropdown.test.d.ts.map +1 -0
- package/dist/components/ScalarErrorBoundary/ScalarErrorBoundary.test.d.ts +2 -0
- package/dist/components/ScalarErrorBoundary/ScalarErrorBoundary.test.d.ts.map +1 -0
- package/dist/components/ScalarFloating/ScalarFloating.test.d.ts +2 -0
- package/dist/components/ScalarFloating/ScalarFloating.test.d.ts.map +1 -0
- package/dist/components/ScalarFloating/ScalarFloating.vue.d.ts.map +1 -1
- package/dist/components/ScalarFloating/ScalarFloating.vue.js +33 -31
- package/dist/components/ScalarFloating/types.d.ts +3 -1
- package/dist/components/ScalarFloating/types.d.ts.map +1 -1
- package/dist/components/ScalarFloating/useResizeWithTarget.test.d.ts +2 -0
- package/dist/components/ScalarFloating/useResizeWithTarget.test.d.ts.map +1 -0
- package/dist/components/ScalarHeaderButton/ScalarHeaderButton.test.d.ts +2 -0
- package/dist/components/ScalarHeaderButton/ScalarHeaderButton.test.d.ts.map +1 -0
- package/dist/components/ScalarIcon/ScalarIcon.stories.d.ts +8 -8
- package/dist/components/ScalarIcon/ScalarIcon.test.d.ts +2 -0
- package/dist/components/ScalarIcon/ScalarIcon.test.d.ts.map +1 -0
- package/dist/components/ScalarIcon/ScalarIcon.vue.d.ts +1 -1
- package/dist/components/ScalarIcon/icons/Add.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/ChevronDown.svg.js +1 -1
- package/dist/components/ScalarIcon/icons/ChevronRight.svg.js +1 -1
- package/dist/components/ScalarIcon/icons/ChevronUp.svg.js +1 -1
- package/dist/components/ScalarIconButton/ScalarIconButton.stories.d.ts +3 -3
- package/dist/components/ScalarIconButton/ScalarIconButton.test.d.ts +2 -0
- package/dist/components/ScalarIconButton/ScalarIconButton.test.d.ts.map +1 -0
- package/dist/components/ScalarIconButton/ScalarIconButton.vue.d.ts +2 -2
- package/dist/components/ScalarListbox/ScalarListbox.test.d.ts +2 -0
- package/dist/components/ScalarListbox/ScalarListbox.test.d.ts.map +1 -0
- package/dist/components/ScalarLoading/ScalarLoading.stories.d.ts +8 -8
- package/dist/components/ScalarLoading/ScalarLoading.test.d.ts +2 -0
- package/dist/components/ScalarLoading/ScalarLoading.test.d.ts.map +1 -0
- package/dist/components/ScalarLoading/ScalarLoading.vue.d.ts +2 -2
- package/dist/components/ScalarMenu/ScalarMenu.test.d.ts +2 -0
- package/dist/components/ScalarMenu/ScalarMenu.test.d.ts.map +1 -0
- package/dist/components/ScalarMenu/ScalarMenuButton.vue.d.ts.map +1 -1
- package/dist/components/ScalarMenu/ScalarMenuButton.vue.js +3 -4
- package/dist/components/ScalarMenu/ScalarMenuTeamPicker.vue.d.ts.map +1 -1
- package/dist/components/ScalarMenu/ScalarMenuTeamPicker.vue.js +19 -20
- package/dist/components/ScalarModal/ScalarModal.stories.d.ts +6 -6
- package/dist/components/ScalarModal/ScalarModal.test.d.ts +2 -0
- package/dist/components/ScalarModal/ScalarModal.test.d.ts.map +1 -0
- package/dist/components/ScalarModal/ScalarModal.vue.d.ts +3 -3
- package/dist/components/ScalarPopover/ScalarPopover.test.d.ts +2 -0
- package/dist/components/ScalarPopover/ScalarPopover.test.d.ts.map +1 -0
- package/dist/components/ScalarSearchInput/ScalarSearchInput.test.d.ts +2 -0
- package/dist/components/ScalarSearchInput/ScalarSearchInput.test.d.ts.map +1 -0
- package/dist/components/ScalarSearchResults/ScalarSearchResults.test.d.ts +2 -0
- package/dist/components/ScalarSearchResults/ScalarSearchResults.test.d.ts.map +1 -0
- package/dist/components/ScalarTeleport/ScalarTeleport.stories.d.ts +7 -0
- package/dist/components/ScalarTeleport/ScalarTeleport.stories.d.ts.map +1 -0
- package/dist/components/ScalarTeleport/ScalarTeleport.test.d.ts +2 -0
- package/dist/components/ScalarTeleport/ScalarTeleport.test.d.ts.map +1 -0
- package/dist/components/ScalarTeleport/ScalarTeleport.vue.d.ts +58 -0
- package/dist/components/ScalarTeleport/ScalarTeleport.vue.d.ts.map +1 -0
- package/dist/components/ScalarTeleport/ScalarTeleport.vue.js +30 -0
- package/dist/components/ScalarTeleport/ScalarTeleport.vue2.js +4 -0
- package/dist/components/ScalarTeleport/ScalarTeleportRoot.vue.d.ts +38 -0
- package/dist/components/ScalarTeleport/ScalarTeleportRoot.vue.d.ts.map +1 -0
- package/dist/components/ScalarTeleport/ScalarTeleportRoot.vue.js +23 -0
- package/dist/components/ScalarTeleport/ScalarTeleportRoot.vue2.js +4 -0
- package/dist/components/ScalarTeleport/index.d.ts +4 -0
- package/dist/components/ScalarTeleport/index.d.ts.map +1 -0
- package/dist/components/ScalarTeleport/useTeleport.d.ts +20 -0
- package/dist/components/ScalarTeleport/useTeleport.d.ts.map +1 -0
- package/dist/components/ScalarTeleport/useTeleport.js +11 -0
- package/dist/components/ScalarTeleport/useTeleport.test.d.ts +2 -0
- package/dist/components/ScalarTeleport/useTeleport.test.d.ts.map +1 -0
- package/dist/components/ScalarTextField/ScalarTextField.test.d.ts +2 -0
- package/dist/components/ScalarTextField/ScalarTextField.test.d.ts.map +1 -0
- package/dist/components/ScalarToggle/ScalarToggle.test.d.ts +2 -0
- package/dist/components/ScalarToggle/ScalarToggle.test.d.ts.map +1 -0
- package/dist/components/ScalarTooltip/ScalarTooltip.test.d.ts +2 -0
- package/dist/components/ScalarTooltip/ScalarTooltip.test.d.ts.map +1 -0
- package/dist/components/ScalarTooltip/ScalarTooltip.vue.js +5 -5
- package/dist/components/ScalarVirtualText/ScalarVirtualText.test.d.ts +2 -0
- package/dist/components/ScalarVirtualText/ScalarVirtualText.test.d.ts.map +1 -0
- package/dist/cva.js +7 -7
- package/dist/cva.test.d.ts +2 -0
- package/dist/cva.test.d.ts.map +1 -0
- package/dist/hooks/useBindCx.d.ts.map +1 -1
- package/dist/hooks/useBindCx.js +8 -8
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +91 -78
- package/dist/style.css +1 -1
- package/package.json +6 -6
- package/dist/components/ScalarButton/ScalarButton.spec.d.ts +0 -2
- package/dist/components/ScalarButton/ScalarButton.spec.d.ts.map +0 -1
- package/dist/components/ScalarCodeBlock/ScalarCodeBlock.spec.d.ts +0 -2
- package/dist/components/ScalarCodeBlock/ScalarCodeBlock.spec.d.ts.map +0 -1
- package/dist/components/ScalarCombobox/ScalarCombobox.spec.d.ts +0 -2
- package/dist/components/ScalarCombobox/ScalarCombobox.spec.d.ts.map +0 -1
- package/dist/components/ScalarContextMenu/ScalarContextMenu.spec.d.ts +0 -2
- package/dist/components/ScalarContextMenu/ScalarContextMenu.spec.d.ts.map +0 -1
- package/dist/components/ScalarDropdown/ScalarDropdown.spec.d.ts +0 -2
- package/dist/components/ScalarDropdown/ScalarDropdown.spec.d.ts.map +0 -1
- package/dist/components/ScalarErrorBoundary/ScalarErrorBoundary.spec.d.ts +0 -2
- package/dist/components/ScalarErrorBoundary/ScalarErrorBoundary.spec.d.ts.map +0 -1
- package/dist/components/ScalarFloating/ScalarFloating.spec.d.ts +0 -2
- package/dist/components/ScalarFloating/ScalarFloating.spec.d.ts.map +0 -1
- package/dist/components/ScalarFloating/useResizeWithTarget.spec.d.ts +0 -2
- package/dist/components/ScalarFloating/useResizeWithTarget.spec.d.ts.map +0 -1
- package/dist/components/ScalarHeaderButton/ScalarHeaderButton.spec.d.ts +0 -2
- package/dist/components/ScalarHeaderButton/ScalarHeaderButton.spec.d.ts.map +0 -1
- package/dist/components/ScalarIcon/ScalarIcon.spec.d.ts +0 -2
- package/dist/components/ScalarIcon/ScalarIcon.spec.d.ts.map +0 -1
- package/dist/components/ScalarIconButton/ScalarIconButton.spec.d.ts +0 -2
- package/dist/components/ScalarIconButton/ScalarIconButton.spec.d.ts.map +0 -1
- package/dist/components/ScalarListbox/ScalarListbox.spec.d.ts +0 -2
- package/dist/components/ScalarListbox/ScalarListbox.spec.d.ts.map +0 -1
- package/dist/components/ScalarLoading/ScalarLoading.spec.d.ts +0 -2
- package/dist/components/ScalarLoading/ScalarLoading.spec.d.ts.map +0 -1
- package/dist/components/ScalarMenu/ScalarMenu.spec.d.ts +0 -2
- package/dist/components/ScalarMenu/ScalarMenu.spec.d.ts.map +0 -1
- package/dist/components/ScalarModal/ScalarModal.spec.d.ts +0 -2
- package/dist/components/ScalarModal/ScalarModal.spec.d.ts.map +0 -1
- package/dist/components/ScalarPopover/ScalarPopover.spec.d.ts +0 -2
- package/dist/components/ScalarPopover/ScalarPopover.spec.d.ts.map +0 -1
- package/dist/components/ScalarSearchInput/ScalarSearchInput.spec.d.ts +0 -2
- package/dist/components/ScalarSearchInput/ScalarSearchInput.spec.d.ts.map +0 -1
- package/dist/components/ScalarSearchResults/ScalarSearchResults.spec.d.ts +0 -2
- package/dist/components/ScalarSearchResults/ScalarSearchResults.spec.d.ts.map +0 -1
- package/dist/components/ScalarTextField/ScalarTextField.spec.d.ts +0 -2
- package/dist/components/ScalarTextField/ScalarTextField.spec.d.ts.map +0 -1
- package/dist/components/ScalarToggle/ScalarToggle.spec.d.ts +0 -2
- package/dist/components/ScalarToggle/ScalarToggle.spec.d.ts.map +0 -1
- package/dist/components/ScalarTooltip/ScalarTooltip.spec.d.ts +0 -2
- package/dist/components/ScalarTooltip/ScalarTooltip.spec.d.ts.map +0 -1
- package/dist/components/ScalarVirtualText/ScalarVirtualText.spec.d.ts +0 -2
- package/dist/components/ScalarVirtualText/ScalarVirtualText.spec.d.ts.map +0 -1
|
@@ -10,10 +10,10 @@ declare const meta: {
|
|
|
10
10
|
title?: string;
|
|
11
11
|
bodyClass?: string;
|
|
12
12
|
maxWidth?: string;
|
|
13
|
-
size?: "
|
|
13
|
+
size?: "sm" | "lg" | "xs" | "md" | "xl" | "full" | "xxs" | undefined;
|
|
14
14
|
variant?: "form" | "search" | "error" | "history" | undefined;
|
|
15
15
|
}> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
16
|
-
size: "
|
|
16
|
+
size: "sm" | "lg" | "xs" | "md" | "xl" | "full" | "xxs";
|
|
17
17
|
}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
18
18
|
P: {};
|
|
19
19
|
B: {};
|
|
@@ -26,10 +26,10 @@ declare const meta: {
|
|
|
26
26
|
title?: string;
|
|
27
27
|
bodyClass?: string;
|
|
28
28
|
maxWidth?: string;
|
|
29
|
-
size?: "
|
|
29
|
+
size?: "sm" | "lg" | "xs" | "md" | "xl" | "full" | "xxs" | undefined;
|
|
30
30
|
variant?: "form" | "search" | "error" | "history" | undefined;
|
|
31
31
|
}> & Readonly<{}>, {}, {}, {}, {}, {
|
|
32
|
-
size: "
|
|
32
|
+
size: "sm" | "lg" | "xs" | "md" | "xl" | "full" | "xxs";
|
|
33
33
|
}>;
|
|
34
34
|
__isFragment?: never;
|
|
35
35
|
__isTeleport?: never;
|
|
@@ -39,10 +39,10 @@ declare const meta: {
|
|
|
39
39
|
title?: string;
|
|
40
40
|
bodyClass?: string;
|
|
41
41
|
maxWidth?: string;
|
|
42
|
-
size?: "
|
|
42
|
+
size?: "sm" | "lg" | "xs" | "md" | "xl" | "full" | "xxs" | undefined;
|
|
43
43
|
variant?: "form" | "search" | "error" | "history" | undefined;
|
|
44
44
|
}> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
45
|
-
size: "
|
|
45
|
+
size: "sm" | "lg" | "xs" | "md" | "xl" | "full" | "xxs";
|
|
46
46
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
47
47
|
$slots: {
|
|
48
48
|
default?(_: {}): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarModal.test.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarModal/ScalarModal.test.ts"],"names":[],"mappings":""}
|
|
@@ -9,17 +9,17 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
9
9
|
title?: string;
|
|
10
10
|
bodyClass?: string;
|
|
11
11
|
maxWidth?: string;
|
|
12
|
-
size?: "
|
|
12
|
+
size?: "sm" | "lg" | "xs" | "md" | "xl" | "full" | "xxs" | undefined;
|
|
13
13
|
variant?: "form" | "search" | "error" | "history" | undefined;
|
|
14
14
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
15
15
|
state: ReturnType<typeof useModal>;
|
|
16
16
|
title?: string;
|
|
17
17
|
bodyClass?: string;
|
|
18
18
|
maxWidth?: string;
|
|
19
|
-
size?: "
|
|
19
|
+
size?: "sm" | "lg" | "xs" | "md" | "xl" | "full" | "xxs" | undefined;
|
|
20
20
|
variant?: "form" | "search" | "error" | "history" | undefined;
|
|
21
21
|
}> & Readonly<{}>, {
|
|
22
|
-
size: "
|
|
22
|
+
size: "sm" | "lg" | "xs" | "md" | "xl" | "full" | "xxs";
|
|
23
23
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
24
24
|
default?(_: {}): any;
|
|
25
25
|
default?(_: {}): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarPopover.test.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarPopover/ScalarPopover.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarSearchInput.test.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSearchInput/ScalarSearchInput.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarSearchResults.test.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSearchResults/ScalarSearchResults.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3';
|
|
2
|
+
import ScalarTeleport from './ScalarTeleport.vue.js';
|
|
3
|
+
declare const meta: Meta<typeof ScalarTeleport>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Base: Story;
|
|
7
|
+
//# sourceMappingURL=ScalarTeleport.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarTeleport.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarTeleport/ScalarTeleport.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAErD,OAAO,cAAc,MAAM,sBAAsB,CAAA;AAGjD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CAgCrC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,IAAI,EAAE,KAAU,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarTeleport.test.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarTeleport/ScalarTeleport.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { TeleportProps } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Scalar teleport component
|
|
4
|
+
*
|
|
5
|
+
* Teleports the contents to the nearest <ScalarTeleportRoot>
|
|
6
|
+
* Falls back to the default teleport target (body) if no root is found
|
|
7
|
+
*
|
|
8
|
+
* Is a wrapper around the Vue <Teleport> component and takes the same props
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* <ScalarTeleport>
|
|
12
|
+
* <div>Teleported Content</div>
|
|
13
|
+
* </ScalarTeleport>
|
|
14
|
+
*/
|
|
15
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
16
|
+
/**
|
|
17
|
+
* Override the default teleport target
|
|
18
|
+
*/
|
|
19
|
+
to?: TeleportProps["to"];
|
|
20
|
+
/**
|
|
21
|
+
* Whether to teleport immediately, disables the default defer behavior
|
|
22
|
+
*
|
|
23
|
+
* @see https://vuejs.org/guide/built-ins/teleport#deferred-teleport
|
|
24
|
+
*/
|
|
25
|
+
immediate?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Whether to disable teleportation
|
|
28
|
+
*/
|
|
29
|
+
disabled?: TeleportProps["disabled"];
|
|
30
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
31
|
+
/**
|
|
32
|
+
* Override the default teleport target
|
|
33
|
+
*/
|
|
34
|
+
to?: TeleportProps["to"];
|
|
35
|
+
/**
|
|
36
|
+
* Whether to teleport immediately, disables the default defer behavior
|
|
37
|
+
*
|
|
38
|
+
* @see https://vuejs.org/guide/built-ins/teleport#deferred-teleport
|
|
39
|
+
*/
|
|
40
|
+
immediate?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Whether to disable teleportation
|
|
43
|
+
*/
|
|
44
|
+
disabled?: TeleportProps["disabled"];
|
|
45
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, Readonly<{
|
|
46
|
+
/** The element to be teleported */
|
|
47
|
+
default(): any;
|
|
48
|
+
}> & {
|
|
49
|
+
/** The element to be teleported */
|
|
50
|
+
default(): any;
|
|
51
|
+
}>;
|
|
52
|
+
export default _default;
|
|
53
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
54
|
+
new (): {
|
|
55
|
+
$slots: S;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=ScalarTeleport.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarTeleport.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarTeleport/ScalarTeleport.vue"],"names":[],"mappings":"AA8DA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,KAAK,CAAA;AAMxC;;;;;;;;;;;;GAYG;;IAID;;OAEG;SACE,aAAa,CAAC,IAAI,CAAC;IACxB;;;;OAIG;gBACS,OAAO;IACnB;;OAEG;eACQ,aAAa,CAAC,UAAU,CAAC;;IAbpC;;OAEG;SACE,aAAa,CAAC,IAAI,CAAC;IACxB;;;;OAIG;gBACS,OAAO;IACnB;;OAEG;eACQ,aAAa,CAAC,UAAU,CAAC;;IAKpC,mCAAmC;eACxB,GAAG;;IADd,mCAAmC;eACxB,GAAG;;AAtBhB,wBAkGC;AAWD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineComponent as o, openBlock as r, createBlock as a, Teleport as s, unref as l, createElementVNode as d, mergeProps as n, renderSlot as p } from "vue";
|
|
2
|
+
import { useTeleport as i } from "./useTeleport.js";
|
|
3
|
+
const m = {}, b = /* @__PURE__ */ o({
|
|
4
|
+
...m,
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "ScalarTeleport",
|
|
7
|
+
props: {
|
|
8
|
+
to: {},
|
|
9
|
+
immediate: { type: Boolean },
|
|
10
|
+
disabled: { type: Boolean }
|
|
11
|
+
},
|
|
12
|
+
setup(f) {
|
|
13
|
+
const t = i();
|
|
14
|
+
return (e, c) => (r(), a(s, {
|
|
15
|
+
defer: !e.immediate,
|
|
16
|
+
disabled: e.disabled,
|
|
17
|
+
to: e.to || l(t)
|
|
18
|
+
}, [
|
|
19
|
+
d("div", n({
|
|
20
|
+
class: "scalar-app",
|
|
21
|
+
style: { display: "contents" }
|
|
22
|
+
}, e.$attrs), [
|
|
23
|
+
p(e.$slots, "default")
|
|
24
|
+
], 16)
|
|
25
|
+
], 8, ["defer", "disabled", "to"]));
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
export {
|
|
29
|
+
b as default
|
|
30
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scalar teleport root component
|
|
3
|
+
*
|
|
4
|
+
* Provides a teleport target for nested <ScalarTeleport> components
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* <ScalarTeleportRoot>
|
|
8
|
+
* ...
|
|
9
|
+
* <ScalarTeleport>
|
|
10
|
+
* <div>Teleported Content</div>
|
|
11
|
+
* </ScalarTeleport>
|
|
12
|
+
* ...
|
|
13
|
+
* </ScalarTeleportRoot>
|
|
14
|
+
*/
|
|
15
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
16
|
+
/**
|
|
17
|
+
* Override the default teleport target id
|
|
18
|
+
*/
|
|
19
|
+
id?: string;
|
|
20
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
21
|
+
/**
|
|
22
|
+
* Override the default teleport target id
|
|
23
|
+
*/
|
|
24
|
+
id?: string;
|
|
25
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, Readonly<{
|
|
26
|
+
/** The content which contains <ScalarTeleports> */
|
|
27
|
+
default(): any;
|
|
28
|
+
}> & {
|
|
29
|
+
/** The content which contains <ScalarTeleports> */
|
|
30
|
+
default(): any;
|
|
31
|
+
}>;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=ScalarTeleportRoot.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarTeleportRoot.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarTeleport/ScalarTeleportRoot.vue"],"names":[],"mappings":"AAgDA;;;;;;;;;;;;;GAaG;;IAID;;OAEG;SACE,MAAM;;IAHX;;OAEG;SACE,MAAM;;IAKX,mDAAmD;eACxC,GAAG;;IADd,mDAAmD;eACxC,GAAG;;AAZhB,wBAiFC;AAWD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { defineComponent as r, openBlock as n, createElementBlock as s, Fragment as l, renderSlot as a, createElementVNode as c, unref as p } from "vue";
|
|
2
|
+
import { useProvideTeleport as d } from "./useTeleport.js";
|
|
3
|
+
const i = ["id"], _ = {}, k = /* @__PURE__ */ r({
|
|
4
|
+
..._,
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "ScalarTeleportRoot",
|
|
7
|
+
props: {
|
|
8
|
+
id: {}
|
|
9
|
+
},
|
|
10
|
+
setup(e) {
|
|
11
|
+
const t = d(e.id);
|
|
12
|
+
return (o, u) => (n(), s(l, null, [
|
|
13
|
+
a(o.$slots, "default"),
|
|
14
|
+
c("div", {
|
|
15
|
+
id: p(t),
|
|
16
|
+
class: "scalar-teleport-root contents"
|
|
17
|
+
}, null, 8, i)
|
|
18
|
+
], 64));
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
export {
|
|
22
|
+
k as default
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarTeleport/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAExE,cAAc,eAAe,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type InjectionKey } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* The teleport target
|
|
4
|
+
*/
|
|
5
|
+
export declare const TELEPORT_SYMBOL: InjectionKey<string>;
|
|
6
|
+
/**
|
|
7
|
+
* Get the nearest teleport target id from `useProvideTeleport`
|
|
8
|
+
*
|
|
9
|
+
* Falls back to `body` if no teleport target id is found
|
|
10
|
+
*
|
|
11
|
+
* @see {@link useProvideTeleport}
|
|
12
|
+
*/
|
|
13
|
+
export declare const useTeleport: () => string;
|
|
14
|
+
/**
|
|
15
|
+
* Provides a teleport target id using Vue's `provide`
|
|
16
|
+
*
|
|
17
|
+
* @see https://vuejs.org/guide/components/provide-inject.html#provide-inject
|
|
18
|
+
*/
|
|
19
|
+
export declare const useProvideTeleport: (id?: string) => string;
|
|
20
|
+
//# sourceMappingURL=useTeleport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTeleport.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarTeleport/useTeleport.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAmB,MAAM,KAAK,CAAA;AAExD;;GAEG;AACH,eAAO,MAAM,eAAe,EAAe,YAAY,CAAC,MAAM,CAAC,CAAA;AAE/D;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,cAAwC,CAAA;AAEhE;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,QAAS,MAAM,WAI7C,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { nanoid as r } from "nanoid";
|
|
2
|
+
import { inject as n, provide as p } from "vue";
|
|
3
|
+
const t = Symbol(), i = () => n(t, "body"), d = (e) => {
|
|
4
|
+
const o = e ?? `scalar-teleport-${r()}`;
|
|
5
|
+
return p(t, `#${o}`), o;
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
t as TELEPORT_SYMBOL,
|
|
9
|
+
d as useProvideTeleport,
|
|
10
|
+
i as useTeleport
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTeleport.test.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarTeleport/useTeleport.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarTextField.test.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarTextField/ScalarTextField.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarToggle.test.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarToggle/ScalarToggle.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarTooltip.test.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarTooltip/ScalarTooltip.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as c, openBlock as o, createBlock as i, unref as t, withCtx as l, createVNode as a, normalizeClass as r, renderSlot as n, createCommentVNode as f } from "vue";
|
|
2
2
|
import { TooltipProvider as p, TooltipRoot as u, TooltipTrigger as g, TooltipPortal as k, TooltipContent as m } from "radix-vue";
|
|
3
|
-
const D = /* @__PURE__ */
|
|
3
|
+
const D = /* @__PURE__ */ c({
|
|
4
4
|
__name: "ScalarTooltip",
|
|
5
5
|
props: {
|
|
6
6
|
click: {},
|
|
@@ -16,8 +16,8 @@ const D = /* @__PURE__ */ d({
|
|
|
16
16
|
disabled: { type: Boolean, default: !1 }
|
|
17
17
|
},
|
|
18
18
|
emits: ["click"],
|
|
19
|
-
setup(
|
|
20
|
-
const e =
|
|
19
|
+
setup(d) {
|
|
20
|
+
const e = d;
|
|
21
21
|
return (s, y) => (o(), i(t(p), {
|
|
22
22
|
delayDuration: e.delay,
|
|
23
23
|
skipDelayDuration: e.skipDelay
|
|
@@ -35,7 +35,7 @@ const D = /* @__PURE__ */ d({
|
|
|
35
35
|
]),
|
|
36
36
|
_: 3
|
|
37
37
|
}, 8, ["as", "class", "onClick"]),
|
|
38
|
-
a(t(k),
|
|
38
|
+
a(t(k), null, {
|
|
39
39
|
default: l(() => [
|
|
40
40
|
e.disabled ? f("", !0) : (o(), i(t(m), {
|
|
41
41
|
key: 0,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarVirtualText.test.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarVirtualText/ScalarVirtualText.test.ts"],"names":[],"mappings":""}
|
package/dist/cva.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { defineConfig as e } from "cva";
|
|
2
2
|
import { extendTailwindMerge as t } from "tailwind-merge";
|
|
3
|
-
const
|
|
3
|
+
const s = t({
|
|
4
4
|
extend: {
|
|
5
5
|
classGroups: {
|
|
6
|
-
"font-size": ["text-xxs"]
|
|
6
|
+
"font-size": ["text-3xs", "text-xxs"]
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
-
}), { cva:
|
|
9
|
+
}), { cva: i, cx: r, compose: c } = e({
|
|
10
10
|
hooks: {
|
|
11
|
-
onComplete: (o) =>
|
|
11
|
+
onComplete: (o) => s(o)
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
14
|
export {
|
|
15
15
|
c as compose,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
i as cva,
|
|
17
|
+
r as cx,
|
|
18
|
+
s as tw
|
|
19
19
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cva.test.d.ts","sourceRoot":"","sources":["../src/cva.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBindCx.d.ts","sourceRoot":"","sources":["../../src/hooks/useBindCx.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAKpC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,SAAS;
|
|
1
|
+
{"version":3,"file":"useBindCx.d.ts","sourceRoot":"","sources":["../../src/hooks/useBindCx.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAKpC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,SAAS;IAqBrB;;;;;;;;;;;;;OAaG;kBA1BoB,SAAS,KAAG;QACnC,iCAAiC;QACjC,KAAK,EAAE,MAAM,CAAA;QACb,+BAA+B;QAC/B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KACnB;EAwBF"}
|
package/dist/hooks/useBindCx.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useAttrs as n, computed as u } from "vue";
|
|
2
2
|
import { cx as o } from "../cva.js";
|
|
3
|
-
function
|
|
4
|
-
const t =
|
|
5
|
-
const { class: s, ...
|
|
6
|
-
return { class: s || "", rest:
|
|
3
|
+
function i() {
|
|
4
|
+
const r = n(), t = u(() => {
|
|
5
|
+
const { class: s, ...e } = r;
|
|
6
|
+
return { class: s || "", rest: e };
|
|
7
7
|
});
|
|
8
|
-
function
|
|
8
|
+
function c(...s) {
|
|
9
9
|
return {
|
|
10
10
|
class: o(...s, t.value.class),
|
|
11
11
|
...t.value.rest
|
|
@@ -26,9 +26,9 @@ function l() {
|
|
|
26
26
|
* <div v-bind="cx(...)">...</div>
|
|
27
27
|
* </template>
|
|
28
28
|
*/
|
|
29
|
-
cx:
|
|
29
|
+
cx: c
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
export {
|
|
33
|
-
|
|
33
|
+
i as useBindCx
|
|
34
34
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -16,10 +16,12 @@ export * from './components/ScalarModal';
|
|
|
16
16
|
export * from './components/ScalarPopover';
|
|
17
17
|
export * from './components/ScalarSearchInput';
|
|
18
18
|
export * from './components/ScalarSearchResults';
|
|
19
|
+
export * from './components/ScalarTeleport';
|
|
19
20
|
export * from './components/ScalarTextField';
|
|
20
21
|
export * from './components/ScalarToggle';
|
|
21
22
|
export * from './components/ScalarTooltip';
|
|
22
23
|
export * from './components/ScalarVirtualText';
|
|
23
24
|
export * from './hooks/useBindCx.js';
|
|
25
|
+
export * from './cva.js';
|
|
24
26
|
export * from './helpers';
|
|
25
27
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAA;AAEhC,cAAc,2BAA2B,CAAA;AACzC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,kCAAkC,CAAA;AAChD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA;AACvC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA;AACvC,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,kCAAkC,CAAA;AAChD,cAAc,8BAA8B,CAAA;AAC5C,cAAc,2BAA2B,CAAA;AACzC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gCAAgC,CAAA;AAE9C,cAAc,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAA;AAEhC,cAAc,2BAA2B,CAAA;AACzC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,kCAAkC,CAAA;AAChD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA;AACvC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA;AACvC,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,kCAAkC,CAAA;AAChD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,2BAA2B,CAAA;AACzC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gCAAgC,CAAA;AAE9C,cAAc,mBAAmB,CAAA;AACjC,cAAc,OAAO,CAAA;AACrB,cAAc,WAAW,CAAA"}
|