@pantograph/vue 0.9.0 → 0.10.1
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/ActionButton/index.js.js +1 -1
- package/dist/ActionButton/index.umd.cjs.js +1 -1
- package/dist/{ActionButton.vue_vue_type_script_setup_true_lang-2X340gYi.js → ActionButton.vue_vue_type_script_setup_true_lang-BVtP6mpl.js} +1 -1
- package/dist/{ActionButton.vue_vue_type_script_setup_true_lang-BVSgpJBL.js → ActionButton.vue_vue_type_script_setup_true_lang-KL8JuFlI.js} +2 -2
- package/dist/Avatar/index.js.js +1 -1
- package/dist/Avatar/index.umd.cjs.js +1 -1
- package/dist/{Avatar.vue_vue_type_style_index_0_lang-CO6GovcA.js → Avatar.vue_vue_type_style_index_0_lang-BHYcXGuX.js} +2 -2
- package/dist/{Avatar.vue_vue_type_style_index_0_lang-1i2t2a3E.js → Avatar.vue_vue_type_style_index_0_lang-DKGY3npY.js} +1 -1
- package/dist/AvatarGroup/index.js.js +1 -1
- package/dist/AvatarGroup/index.umd.cjs.js +1 -1
- package/dist/Badge/index.js.js +1 -1
- package/dist/Badge/index.umd.cjs.js +1 -1
- package/dist/{Badge.vue_vue_type_script_setup_true_lang-D7hKm2YM.js → Badge.vue_vue_type_script_setup_true_lang-BcdNUohN.js} +1 -1
- package/dist/{Badge.vue_vue_type_script_setup_true_lang-BQ2E1xoX.js → Badge.vue_vue_type_script_setup_true_lang-nmw9qfJ_.js} +1 -1
- package/dist/{BaseButton.vue_vue_type_style_index_0_lang-D99yMq5W.js → BaseButton.vue_vue_type_style_index_0_lang-BrQJfrgg.js} +1 -1
- package/dist/{BaseButton.vue_vue_type_style_index_0_lang-CfBRZCKS.js → BaseButton.vue_vue_type_style_index_0_lang-CTK5nNR6.js} +1 -1
- package/dist/Button/index.js.js +1 -1
- package/dist/Button/index.umd.cjs.js +1 -1
- package/dist/{Button.vue_vue_type_script_setup_true_lang-687jBefr.js → Button.vue_vue_type_script_setup_true_lang-7V57ztN4.js} +1 -1
- package/dist/{Button.vue_vue_type_script_setup_true_lang-4la0ea5M.js → Button.vue_vue_type_script_setup_true_lang-DIj3gT2D.js} +2 -2
- package/dist/Checkbox/index.js.js +1 -1
- package/dist/Checkbox/index.umd.cjs.js +1 -1
- package/dist/{Checkbox.vue_vue_type_style_index_0_lang-Bvk3KN2L.js → Checkbox.vue_vue_type_style_index_0_lang-C6Mdufam.js} +1 -1
- package/dist/{Checkbox.vue_vue_type_style_index_0_lang-DPxsdfde.js → Checkbox.vue_vue_type_style_index_0_lang-DNlvOQmv.js} +2 -2
- package/dist/CheckboxGroup/index.js.js +1 -1
- package/dist/CheckboxGroup/index.umd.cjs.js +1 -1
- package/dist/ColorPicker/ColorPicker.d.ts +37 -0
- package/dist/ColorPicker/ColorPickerSpace.d.ts +2 -0
- package/dist/ColorPicker/index.d.ts +1 -0
- package/dist/ColorPicker/index.js.js +7 -0
- package/dist/ColorPicker/index.umd.cjs.js +1 -0
- package/dist/ColorPicker/types.d.ts +60 -0
- package/dist/ColorPicker/utilities/CssValues.d.ts +48 -0
- package/dist/ColorPicker/utilities/clamp.d.ts +8 -0
- package/dist/ColorPicker/utilities/colorConversions/convertHexToRgb.d.ts +7 -0
- package/dist/ColorPicker/utilities/colorConversions/convertHslToHsv.d.ts +7 -0
- package/dist/ColorPicker/utilities/colorConversions/convertHslToRgb.d.ts +7 -0
- package/dist/ColorPicker/utilities/colorConversions/convertHsvToHsl.d.ts +7 -0
- package/dist/ColorPicker/utilities/colorConversions/convertHsvToHwb.d.ts +5 -0
- package/dist/ColorPicker/utilities/colorConversions/convertHsvToRgb.d.ts +7 -0
- package/dist/ColorPicker/utilities/colorConversions/convertHwbToHsv.d.ts +7 -0
- package/dist/ColorPicker/utilities/colorConversions/convertRgbToHex.d.ts +5 -0
- package/dist/ColorPicker/utilities/colorConversions/convertRgbToHsl.d.ts +7 -0
- package/dist/ColorPicker/utilities/colorConversions/convertRgbToHwb.d.ts +5 -0
- package/dist/ColorPicker/utilities/colorsAreValueEqual.d.ts +4 -0
- package/dist/ColorPicker/utilities/convert.d.ts +2 -0
- package/dist/ColorPicker/utilities/detectFormat.d.ts +7 -0
- package/dist/ColorPicker/utilities/eyeDropper.d.ts +17 -0
- package/dist/ColorPicker/utilities/formatAsCssColor.d.ts +5 -0
- package/dist/ColorPicker/utilities/getNewThumbPosition.d.ts +4 -0
- package/dist/ColorPicker/utilities/isValidHexColor.d.ts +4 -0
- package/dist/ColorPicker/utilities/parsePropsColor.d.ts +7 -0
- package/dist/ColorPicker/utilities/round.d.ts +6 -0
- package/dist/ColorPicker.vue_vue_type_style_index_0_lang-C36JPo4m.js +1 -0
- package/dist/ColorPicker.vue_vue_type_style_index_0_lang-Dq-kFXox.js +541 -0
- package/dist/ColorSwatch/ColorSwatch.d.ts +27 -0
- package/dist/ColorSwatch/index.d.ts +2 -0
- package/dist/ColorSwatch/index.js.js +7 -0
- package/dist/ColorSwatch/index.umd.cjs.js +1 -0
- package/dist/ColorSwatch.vue_vue_type_style_index_0_lang-Bo-zDAyc.js +1 -0
- package/dist/ColorSwatch.vue_vue_type_style_index_0_lang-DmLhCPh4.js +102 -0
- package/dist/ColorSwatchGroup/ColorSwatchGroup.d.ts +60 -0
- package/dist/ColorSwatchGroup/index.d.ts +1 -0
- package/dist/ColorSwatchGroup/index.js.js +5 -0
- package/dist/ColorSwatchGroup/index.umd.cjs.js +1 -0
- package/dist/ColorSwatchGroup.vue_vue_type_style_index_0_lang-CIkTvqD_.js +165 -0
- package/dist/ColorSwatchGroup.vue_vue_type_style_index_0_lang-T_L-D2SS.js +1 -0
- package/dist/ColorTrigger/ColorTrigger.d.ts +22 -0
- package/dist/ColorTrigger/index.d.ts +2 -0
- package/dist/ColorTrigger/index.js.js +6 -0
- package/dist/ColorTrigger/index.umd.cjs.js +1 -0
- package/dist/ColorTrigger.vue_vue_type_style_index_0_lang-DSZ8fAZ9.js +91 -0
- package/dist/ColorTrigger.vue_vue_type_style_index_0_lang-DwyinKNj.js +1 -0
- package/dist/ConfigProvider/index.js.js +119 -9
- package/dist/ConfigProvider/index.umd.cjs.js +1 -1
- package/dist/FloatButton/index.js.js +1 -1
- package/dist/FloatButton/index.umd.cjs.js +1 -1
- package/dist/{FloatButton.vue_vue_type_script_setup_true_lang-Bhc5xjck.js → FloatButton.vue_vue_type_script_setup_true_lang-Bapsnc_p.js} +2 -2
- package/dist/{FloatButton.vue_vue_type_script_setup_true_lang-CQIk1UgJ.js → FloatButton.vue_vue_type_script_setup_true_lang-C56u1xaL.js} +1 -1
- package/dist/GraphicalObject/index.js.js +1 -1
- package/dist/GraphicalObject/index.umd.cjs.js +1 -1
- package/dist/{GraphicalObject.vue_vue_type_script_setup_true_lang-DYCUqEs3.js → GraphicalObject.vue_vue_type_script_setup_true_lang-B3FouRlw.js} +1 -1
- package/dist/{GraphicalObject.vue_vue_type_script_setup_true_lang-8ZXdETpQ.js → GraphicalObject.vue_vue_type_script_setup_true_lang-DlMeNk_1.js} +1 -1
- package/dist/IconButton/index.js.js +1 -1
- package/dist/IconButton/index.umd.cjs.js +1 -1
- package/dist/{IconButton.vue_vue_type_script_setup_true_lang-BMbK9bu3.js → IconButton.vue_vue_type_script_setup_true_lang-7QB-mmyg.js} +1 -1
- package/dist/{IconButton.vue_vue_type_script_setup_true_lang-Dv60wNuX.js → IconButton.vue_vue_type_script_setup_true_lang-dI6-RNyi.js} +2 -2
- package/dist/IndentLevel/index.js.js +1 -1
- package/dist/IndentLevel/index.umd.cjs.js +1 -1
- package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-C0p5Alem.js → IndentLevel.vue_vue_type_style_index_0_lang-CM6s5E6c.js} +1 -1
- package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-CBV4A9Mh.js → IndentLevel.vue_vue_type_style_index_0_lang-nGsyFkwr.js} +1 -1
- package/dist/Indicator/index.js.js +1 -1
- package/dist/Indicator/index.umd.cjs.js +1 -1
- package/dist/{Indicator.vue_vue_type_script_setup_true_lang-DzKJMO-h.js → Indicator.vue_vue_type_script_setup_true_lang-C4Ecg4iy.js} +1 -1
- package/dist/{Indicator.vue_vue_type_script_setup_true_lang-BHIE3kZG.js → Indicator.vue_vue_type_script_setup_true_lang-ICqvLVbq.js} +1 -1
- package/dist/Input/Input.d.ts +67 -0
- package/dist/Input/index.d.ts +2 -0
- package/dist/Input/index.js.js +7 -0
- package/dist/Input/index.umd.cjs.js +1 -0
- package/dist/Input.vue_vue_type_style_index_0_lang-D0zx-hd_.js +1 -0
- package/dist/Input.vue_vue_type_style_index_0_lang-cjYJlwXf.js +413 -0
- package/dist/Menu/index.js.js +1 -1
- package/dist/Menu/index.umd.cjs.js +1 -1
- package/dist/Menu.vue_vue_type_style_index_0_lang-DHGED80D.js +481 -0
- package/dist/Menu.vue_vue_type_style_index_0_lang-DU0Rexv8.js +1 -0
- package/dist/MenuItem/MenuItem.d.ts +1 -1
- package/dist/MenuItem/index.js.js +1 -1
- package/dist/MenuItem/index.umd.cjs.js +1 -1
- package/dist/Popover/index.js.js +1 -1
- package/dist/Popover/index.umd.cjs.js +1 -1
- package/dist/{Popover.vue_vue_type_style_index_0_lang-MJjv8Cvt.js → Popover.vue_vue_type_style_index_0_lang-C0IwnsU5.js} +3 -3
- package/dist/Popover.vue_vue_type_style_index_0_lang-CM8qMFEi.js +1 -0
- package/dist/Primitive-BT1RjuGS.js +1 -0
- package/dist/Primitive-nOVjbfuc.js +47 -0
- package/dist/RadioGroup/index.js.js +1 -1
- package/dist/RadioGroup/index.umd.cjs.js +1 -1
- package/dist/{RadioGroup.vue_vue_type_script_setup_true_lang-DWC7_LXA.js → RadioGroup.vue_vue_type_script_setup_true_lang-DWfKIuDH.js} +1 -1
- package/dist/{RadioGroup.vue_vue_type_script_setup_true_lang-c3UZIDsE.js → RadioGroup.vue_vue_type_script_setup_true_lang-s-m7W1By.js} +1 -1
- package/dist/Switch/index.js.js +1 -1
- package/dist/Switch/index.umd.cjs.js +1 -1
- package/dist/{Switch.vue_vue_type_style_index_0_lang-B4DpjGcF.js → Switch.vue_vue_type_style_index_0_lang-BzC8-ylY.js} +1 -1
- package/dist/{Switch.vue_vue_type_style_index_0_lang-LcwRXYSm.js → Switch.vue_vue_type_style_index_0_lang-DnNHGn1c.js} +1 -1
- package/dist/Tree/index.js.js +1 -1
- package/dist/Tree/index.umd.cjs.js +1 -1
- package/dist/Tree.vue_vue_type_style_index_0_lang-B-BPV_p7.js +547 -0
- package/dist/Tree.vue_vue_type_style_index_0_lang-BIpFWo5L.js +1 -0
- package/dist/_flatRest-CHX8vV1P.js +556 -0
- package/dist/_flatRest-R59G2N4m.js +1 -0
- package/dist/{cloneDeep-DIRSbAoF.js → cloneDeep-BMA7VTX1.js} +1 -1
- package/dist/cloneDeep-BcKVMzWC.js +1 -0
- package/dist/get-B4UJlXpC.js +1 -0
- package/dist/get-Q8GXlj-L.js +34 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js.js +117 -100
- package/dist/index.umd.cjs.js +1 -1
- package/dist/isString-BVAZt9W3.js +9 -0
- package/dist/isString-CKmTJsel.js +1 -0
- package/dist/omit-BEkBWXra.js +212 -0
- package/dist/omit-BKPbELUG.js +1 -0
- package/dist/pick-C-ap2Lj0.js +1 -0
- package/dist/{pick-DYQvkbv7.js → pick-DLskPTKb.js} +3 -1
- package/dist/style/index.css +1 -1
- package/package.json +26 -1
- package/dist/Menu.vue_vue_type_style_index_0_lang-C_lbO09l.js +0 -1
- package/dist/Menu.vue_vue_type_style_index_0_lang-oedL61ps.js +0 -521
- package/dist/Popover.vue_vue_type_style_index_0_lang-TwQPMDMD.js +0 -1
- package/dist/Tree.vue_vue_type_style_index_0_lang-BHu81SiI.js +0 -573
- package/dist/Tree.vue_vue_type_style_index_0_lang-D2iXdFbM.js +0 -1
- package/dist/cloneDeep-DgcRQUzH.js +0 -1
- package/dist/index-CRYvpN0O.js +0 -126
- package/dist/index-JUGW3BX8.js +0 -1
- package/dist/omit-CMPOmOGF.js +0 -1
- package/dist/omit-wqhC12f_.js +0 -748
- package/dist/pick-CQkYSNzp.js +0 -1
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { defineComponent as P, computed as s, useSlots as S, createBlock as d, openBlock as c, unref as f, mergeProps as i, withCtx as n, createElementBlock as _, createCommentVNode as y, renderSlot as a, normalizeProps as r, createSlots as b, renderList as $, guardReactiveProps as g, createElementVNode as E } from "vue";
|
|
2
|
+
import { _ as I } from "./GraphicalObject.vue_vue_type_script_setup_true_lang-B3FouRlw.js";
|
|
3
|
+
import { g as L } from "./options-JBqnVZUl.js";
|
|
4
|
+
import { o as V } from "./omit-BEkBWXra.js";
|
|
5
|
+
import { g as N, a as l } from "./class-DziTeW9B.js";
|
|
6
|
+
import { cva as O } from "class-variance-authority";
|
|
7
|
+
import { P as T } from "./Primitive-nOVjbfuc.js";
|
|
8
|
+
import { _ as j } from "./IconButton.vue_vue_type_script_setup_true_lang-dI6-RNyi.js";
|
|
9
|
+
const k = ["sm", "md"], M = ["color", "remover", "custom-picker"], R = {
|
|
10
|
+
key: 1,
|
|
11
|
+
height: "100%",
|
|
12
|
+
width: "100%",
|
|
13
|
+
viewBox: "0 0 19 18",
|
|
14
|
+
fill: "none"
|
|
15
|
+
}, Q = /* @__PURE__ */ P({
|
|
16
|
+
...L("ColorTrigger"),
|
|
17
|
+
__name: "ColorSwatch",
|
|
18
|
+
props: {
|
|
19
|
+
class: {},
|
|
20
|
+
icon: {},
|
|
21
|
+
fg: {},
|
|
22
|
+
bg: {},
|
|
23
|
+
br: {},
|
|
24
|
+
size: { default: "md" },
|
|
25
|
+
selected: { type: Boolean },
|
|
26
|
+
type: { default: "color" },
|
|
27
|
+
customPickerIcon: { default: "tabler:palette" }
|
|
28
|
+
},
|
|
29
|
+
setup(v) {
|
|
30
|
+
const o = v, t = N("color_swatch"), z = O(t, {
|
|
31
|
+
variants: {
|
|
32
|
+
selected: l("selected", t),
|
|
33
|
+
size: l(k, t),
|
|
34
|
+
type: l(M, t)
|
|
35
|
+
}
|
|
36
|
+
}), m = s(
|
|
37
|
+
() => o.size && k.includes(o.size) ? o.size : "md"
|
|
38
|
+
), C = s(() => ({
|
|
39
|
+
size: m.value,
|
|
40
|
+
...V(
|
|
41
|
+
o,
|
|
42
|
+
"size",
|
|
43
|
+
"class",
|
|
44
|
+
"type",
|
|
45
|
+
"selected"
|
|
46
|
+
/*'fg', 'bg', 'br'*/
|
|
47
|
+
)
|
|
48
|
+
})), h = S(), w = s(() => {
|
|
49
|
+
switch (o.type) {
|
|
50
|
+
case "color":
|
|
51
|
+
return "div";
|
|
52
|
+
case "custom-picker":
|
|
53
|
+
return j;
|
|
54
|
+
case "remover":
|
|
55
|
+
return "div";
|
|
56
|
+
}
|
|
57
|
+
}), B = s(() => {
|
|
58
|
+
const e = {};
|
|
59
|
+
return o.type === "custom-picker" && (e.size = m.value, e.icon = o.customPickerIcon, e.color = "gray", e.type = "outline"), e;
|
|
60
|
+
});
|
|
61
|
+
return (e, p) => (c(), d(f(T), i({
|
|
62
|
+
as: w.value,
|
|
63
|
+
class: [
|
|
64
|
+
f(z)({
|
|
65
|
+
selected: e.type !== "custom-picker" && o.selected,
|
|
66
|
+
size: e.size,
|
|
67
|
+
type: e.type
|
|
68
|
+
}),
|
|
69
|
+
o.class
|
|
70
|
+
]
|
|
71
|
+
}, B.value), {
|
|
72
|
+
icon: n(() => [
|
|
73
|
+
a(e.$slots, "icon", r(g(o)))
|
|
74
|
+
]),
|
|
75
|
+
default: n(() => [
|
|
76
|
+
e.type === "color" ? (c(), d(I, r(i({ key: 0 }, C.value)), b({ _: 2 }, [
|
|
77
|
+
$(Object.keys(h), (u) => ({
|
|
78
|
+
name: u,
|
|
79
|
+
fn: n(() => [
|
|
80
|
+
a(e.$slots, u, r(g(o)))
|
|
81
|
+
])
|
|
82
|
+
}))
|
|
83
|
+
]), 1040)) : e.type === "remover" ? (c(), _("svg", R, p[0] || (p[0] = [
|
|
84
|
+
E("path", {
|
|
85
|
+
id: "Empty Indicator",
|
|
86
|
+
d: "M17.5 1L1.5 17",
|
|
87
|
+
stroke: "currentColor",
|
|
88
|
+
"stroke-width": "2",
|
|
89
|
+
"stroke-linecap": "round"
|
|
90
|
+
}, null, -1)
|
|
91
|
+
]))) : y("", !0),
|
|
92
|
+
e.type === "custom-picker" ? a(e.$slots, "default", r(i({ key: 2 }, o))) : y("", !0)
|
|
93
|
+
]),
|
|
94
|
+
_: 3
|
|
95
|
+
}, 16, ["as", "class"]));
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
export {
|
|
99
|
+
k as C,
|
|
100
|
+
Q as _,
|
|
101
|
+
M as a
|
|
102
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { PrimitiveProps } from 'radix-vue';
|
|
2
|
+
import { Class } from '../types';
|
|
3
|
+
import { ColorSwatchProps, ColorSwatchSlots } from '../ColorSwatch/ColorSwatch';
|
|
4
|
+
import { ColorSwatchSize } from '../ColorSwatch/ColorSwatch.model';
|
|
5
|
+
import { VisibleColorFormat } from '../ColorPicker/types.js';
|
|
6
|
+
import { PopoverProps } from '../Popover/index.js';
|
|
7
|
+
import { ColorPickerProps } from '../ColorPicker/index.js';
|
|
8
|
+
interface ColorObject extends Partial<Pick<ColorSwatchProps, 'bg' | 'fg' | 'br' | 'icon'>> {
|
|
9
|
+
value: string;
|
|
10
|
+
}
|
|
11
|
+
export type ColorSwatchItem = ColorObject | string;
|
|
12
|
+
type ColorMode = 'subtle' | 'bold';
|
|
13
|
+
export type ColorSwatchGroupProps = Omit<PrimitiveProps, 'asChild'> & Omit<ColorPickerProps, 'class' | 'color' | 'defaultColor'> & Partial<Pick<ColorSwatchProps, 'size' | 'customPickerIcon' | 'icon'>> & {
|
|
14
|
+
class?: Class;
|
|
15
|
+
size?: ColorSwatchSize;
|
|
16
|
+
noRemover?: boolean;
|
|
17
|
+
noCustomPicker?: boolean;
|
|
18
|
+
modelValue?: string;
|
|
19
|
+
headerCls?: string;
|
|
20
|
+
header?: string;
|
|
21
|
+
colorsCls?: string;
|
|
22
|
+
defaultValue?: string;
|
|
23
|
+
colors?: ColorSwatchItem[];
|
|
24
|
+
colorMode?: ColorMode | {
|
|
25
|
+
fg?: ColorMode;
|
|
26
|
+
bg?: ColorMode;
|
|
27
|
+
br?: ColorMode;
|
|
28
|
+
value: ColorMode;
|
|
29
|
+
};
|
|
30
|
+
popoverProps?: PopoverProps;
|
|
31
|
+
};
|
|
32
|
+
export interface ColorSwatchGroupEmits {
|
|
33
|
+
(e: 'update:format', value: VisibleColorFormat): void;
|
|
34
|
+
(e: 'update:modelValue', value?: string): void;
|
|
35
|
+
}
|
|
36
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<ColorSwatchGroupProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
37
|
+
"update:modelValue": (value?: string | undefined) => any;
|
|
38
|
+
"update:format": (value: VisibleColorFormat) => any;
|
|
39
|
+
}, string, import('vue').PublicProps, Readonly<ColorSwatchGroupProps> & Readonly<{
|
|
40
|
+
"onUpdate:modelValue"?: ((value?: string | undefined) => any) | undefined;
|
|
41
|
+
"onUpdate:format"?: ((value: VisibleColorFormat) => any) | undefined;
|
|
42
|
+
}>, {
|
|
43
|
+
size: "sm" | "md";
|
|
44
|
+
colorMode: ColorMode | {
|
|
45
|
+
fg?: ColorMode | undefined;
|
|
46
|
+
bg?: ColorMode | undefined;
|
|
47
|
+
br?: ColorMode | undefined;
|
|
48
|
+
value: ColorMode;
|
|
49
|
+
};
|
|
50
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, Readonly<ColorSwatchSlots & {
|
|
51
|
+
header: () => never;
|
|
52
|
+
}> & ColorSwatchSlots & {
|
|
53
|
+
header: () => never;
|
|
54
|
+
}>;
|
|
55
|
+
export default _default;
|
|
56
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
57
|
+
new (): {
|
|
58
|
+
$slots: S;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type ColorSwatchItem, type ColorSwatchGroupEmits, type ColorSwatchGroupProps, default, default as ColorSwatchGroup, } from './ColorSwatchGroup';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../ColorSwatchGroup.vue_vue_type_style_index_0_lang-T_L-D2SS.js");exports.ColorSwatchGroup=e._sfc_main;exports.default=e._sfc_main;
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { defineComponent as G, useSlots as L, ref as U, computed as f, createBlock as m, openBlock as a, unref as l, normalizeClass as v, withCtx as n, createElementBlock as z, createCommentVNode as b, createElementVNode as T, renderSlot as g, createTextVNode as q, toDisplayString as H, Fragment as J, renderList as C, mergeProps as c, createSlots as V, createVNode as $, normalizeProps as K, guardReactiveProps as Q } from "vue";
|
|
2
|
+
import { g as W } from "./options-JBqnVZUl.js";
|
|
3
|
+
import { P as X } from "./Primitive-nOVjbfuc.js";
|
|
4
|
+
import { useEmitAsProps as Y } from "radix-vue";
|
|
5
|
+
import { _ as k, C as Z } from "./ColorSwatch.vue_vue_type_style_index_0_lang-DmLhCPh4.js";
|
|
6
|
+
import { i as B } from "./isString-BVAZt9W3.js";
|
|
7
|
+
import { i as y } from "./_flatRest-CHX8vV1P.js";
|
|
8
|
+
import { useVModel as x } from "@vueuse/core";
|
|
9
|
+
import { g as ee, a as oe, b as j } from "./class-DziTeW9B.js";
|
|
10
|
+
import { cva as te } from "class-variance-authority";
|
|
11
|
+
import { o as re } from "./omit-BEkBWXra.js";
|
|
12
|
+
import { _ as se } from "./Popover.vue_vue_type_style_index_0_lang-C0IwnsU5.js";
|
|
13
|
+
import { _ as le } from "./ColorPicker.vue_vue_type_style_index_0_lang-Dq-kFXox.js";
|
|
14
|
+
import { p as S } from "./pick-DLskPTKb.js";
|
|
15
|
+
const ye = /* @__PURE__ */ G({
|
|
16
|
+
...W("ColorSwatchGroup"),
|
|
17
|
+
__name: "ColorSwatchGroup",
|
|
18
|
+
props: {
|
|
19
|
+
as: {},
|
|
20
|
+
format: {},
|
|
21
|
+
defaultFormat: {},
|
|
22
|
+
hideAlpha: { type: Boolean },
|
|
23
|
+
size: { default: "md" },
|
|
24
|
+
customPickerIcon: {},
|
|
25
|
+
icon: {},
|
|
26
|
+
class: {},
|
|
27
|
+
noRemover: { type: Boolean },
|
|
28
|
+
noCustomPicker: { type: Boolean },
|
|
29
|
+
modelValue: {},
|
|
30
|
+
headerCls: {},
|
|
31
|
+
header: {},
|
|
32
|
+
colorsCls: {},
|
|
33
|
+
defaultValue: {},
|
|
34
|
+
colors: {},
|
|
35
|
+
colorMode: { default: "bold" },
|
|
36
|
+
popoverProps: {}
|
|
37
|
+
},
|
|
38
|
+
emits: ["update:format", "update:modelValue"],
|
|
39
|
+
setup(w, { emit: I }) {
|
|
40
|
+
const o = w, A = L(), M = I, s = x(
|
|
41
|
+
o,
|
|
42
|
+
"modelValue",
|
|
43
|
+
M,
|
|
44
|
+
{
|
|
45
|
+
defaultValue: o.defaultValue,
|
|
46
|
+
passive: o.modelValue === void 0
|
|
47
|
+
}
|
|
48
|
+
), E = (e) => {
|
|
49
|
+
if (B(e))
|
|
50
|
+
return {
|
|
51
|
+
selected: s.value === e,
|
|
52
|
+
icon: o.icon,
|
|
53
|
+
bg: e
|
|
54
|
+
};
|
|
55
|
+
if (y(e))
|
|
56
|
+
return {
|
|
57
|
+
...re(e, "value"),
|
|
58
|
+
icon: e.icon ?? o.icon,
|
|
59
|
+
selected: s.value === e.value
|
|
60
|
+
};
|
|
61
|
+
}, u = ee("color_swatch_group"), N = te(u, {
|
|
62
|
+
variants: {
|
|
63
|
+
size: oe(Z, u)
|
|
64
|
+
}
|
|
65
|
+
}), h = U(!1), d = (e) => y(e) ? e.value : e ?? void 0, P = (e) => {
|
|
66
|
+
const t = d(e);
|
|
67
|
+
s.value = t, h.value = !t;
|
|
68
|
+
}, p = f(() => {
|
|
69
|
+
if (o.colors) return o.colors;
|
|
70
|
+
const e = ["red", "orange", "yellow", "lime", "green", "sky", "blue", "violet"];
|
|
71
|
+
return o.colorMode === "subtle" ? e.map((t) => `${t}-subtle`) : typeof o.colorMode == "object" && o.colorMode.value && (o.colorMode.bg || o.colorMode.br || o.colorMode.fg) ? e.map((t) => {
|
|
72
|
+
const r = {
|
|
73
|
+
value: typeof o.colorMode == "object" && o.colorMode.value === "subtle" ? `${t}-subtle` : t
|
|
74
|
+
};
|
|
75
|
+
return typeof o.colorMode == "object" && o.colorMode.bg && (r.bg = o.colorMode.bg === "subtle" ? `${t}-subtle` : t), typeof o.colorMode == "object" && o.colorMode.br && (r.br = o.colorMode.br === "subtle" ? `${t}-subtle` : t), typeof o.colorMode == "object" && o.colorMode.fg && (r.fg = o.colorMode.fg === "subtle" ? `${t}-subtle` : t), r;
|
|
76
|
+
}) : e;
|
|
77
|
+
}), O = f(() => {
|
|
78
|
+
var e;
|
|
79
|
+
if (!((e = p.value) != null && e.length && p.value.some(
|
|
80
|
+
(t) => B(t) && t === s.value || y(t) && s.value === t.value
|
|
81
|
+
)))
|
|
82
|
+
return s.value;
|
|
83
|
+
}), _ = (e) => {
|
|
84
|
+
e && (s.value = e);
|
|
85
|
+
}, F = Y(M), R = f(() => ({
|
|
86
|
+
...S(F, "onUpdate:format"),
|
|
87
|
+
...S(o, "format", "defaultFormat", "hideAlpha")
|
|
88
|
+
}));
|
|
89
|
+
return (e, t) => (a(), m(l(X), {
|
|
90
|
+
as: e.as,
|
|
91
|
+
class: v([o.class, l(N)({ size: e.size })])
|
|
92
|
+
}, {
|
|
93
|
+
default: n(() => [
|
|
94
|
+
A.header || e.header ? (a(), z("div", {
|
|
95
|
+
key: 0,
|
|
96
|
+
class: v([l(j)(l(u), "header"), e.headerCls])
|
|
97
|
+
}, [
|
|
98
|
+
g(e.$slots, "header", {}, () => [
|
|
99
|
+
q(H(e.header), 1)
|
|
100
|
+
])
|
|
101
|
+
], 2)) : b("", !0),
|
|
102
|
+
T("div", {
|
|
103
|
+
class: v([l(j)(l(u), "colors"), e.colorsCls])
|
|
104
|
+
}, [
|
|
105
|
+
e.noRemover ? b("", !0) : (a(), m(k, {
|
|
106
|
+
key: 0,
|
|
107
|
+
type: "remover",
|
|
108
|
+
size: e.size,
|
|
109
|
+
onClick: t[0] || (t[0] = (r) => P()),
|
|
110
|
+
selected: !l(s) && h.value
|
|
111
|
+
}, null, 8, ["size", "selected"])),
|
|
112
|
+
(a(!0), z(J, null, C(p.value, (r) => (a(), m(k, c({
|
|
113
|
+
type: "color",
|
|
114
|
+
size: e.size,
|
|
115
|
+
icon: e.icon,
|
|
116
|
+
ref_for: !0
|
|
117
|
+
}, E(r), {
|
|
118
|
+
key: d(r),
|
|
119
|
+
onClick: (i) => P(r)
|
|
120
|
+
}), V({ _: 2 }, [
|
|
121
|
+
C(Object.keys(e.$slots), (i) => ({
|
|
122
|
+
name: i,
|
|
123
|
+
fn: n((D) => [
|
|
124
|
+
g(e.$slots, i, c({ ref_for: !0 }, { ...D, value: d(r) }))
|
|
125
|
+
])
|
|
126
|
+
}))
|
|
127
|
+
]), 1040, ["size", "icon", "onClick"]))), 128)),
|
|
128
|
+
e.noCustomPicker ? b("", !0) : (a(), m(se, c({
|
|
129
|
+
key: 1,
|
|
130
|
+
trigger: "click",
|
|
131
|
+
"reverse-placement-on-dir": "rtl",
|
|
132
|
+
placement: "right-start",
|
|
133
|
+
"side-offset": 4
|
|
134
|
+
}, e.popoverProps || {}), {
|
|
135
|
+
content: n(() => [
|
|
136
|
+
$(le, c({
|
|
137
|
+
defaultColor: O.value,
|
|
138
|
+
"onUpdate:color": _
|
|
139
|
+
}, R.value), null, 16, ["defaultColor"])
|
|
140
|
+
]),
|
|
141
|
+
default: n(() => [
|
|
142
|
+
$(k, {
|
|
143
|
+
type: "custom-picker",
|
|
144
|
+
size: e.size,
|
|
145
|
+
customPickerIcon: e.customPickerIcon
|
|
146
|
+
}, V({ _: 2 }, [
|
|
147
|
+
C(Object.keys(e.$slots), (r) => ({
|
|
148
|
+
name: r,
|
|
149
|
+
fn: n((i) => [
|
|
150
|
+
g(e.$slots, r, K(Q(i)))
|
|
151
|
+
])
|
|
152
|
+
}))
|
|
153
|
+
]), 1032, ["size", "customPickerIcon"])
|
|
154
|
+
]),
|
|
155
|
+
_: 3
|
|
156
|
+
}, 16))
|
|
157
|
+
], 2)
|
|
158
|
+
]),
|
|
159
|
+
_: 3
|
|
160
|
+
}, 8, ["as", "class"]));
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
export {
|
|
164
|
+
ye as _
|
|
165
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),S=require("./options-B4iSAKol.js"),q=require("./Primitive-BT1RjuGS.js"),$=require("radix-vue"),i=require("./ColorSwatch.vue_vue_type_style_index_0_lang-Bo-zDAyc.js"),g=require("./isString-CKmTJsel.js"),m=require("./_flatRest-R59G2N4m.js"),j=require("@vueuse/core"),u=require("./class-CjZYGZDW.js"),w=require("class-variance-authority"),N=require("./omit-BKPbELUG.js"),E=require("./Popover.vue_vue_type_style_index_0_lang-CM8qMFEi.js"),O=require("./ColorPicker.vue_vue_type_style_index_0_lang-C36JPo4m.js"),k=require("./pick-C-ap2Lj0.js"),A=e.defineComponent({...S.getComponentOptions("ColorSwatchGroup"),__name:"ColorSwatchGroup",props:{as:{},format:{},defaultFormat:{},hideAlpha:{type:Boolean},size:{default:"md"},customPickerIcon:{},icon:{},class:{},noRemover:{type:Boolean},noCustomPicker:{type:Boolean},modelValue:{},headerCls:{},header:{},colorsCls:{},defaultValue:{},colors:{},colorMode:{default:"bold"},popoverProps:{}},emits:["update:format","update:modelValue"],setup(C,{emit:b}){const t=C,_=e.useSlots(),p=b,l=j.useVModel(t,"modelValue",p,{defaultValue:t.defaultValue,passive:t.modelValue===void 0}),y=o=>{if(g.isString(o))return{selected:l.value===o,icon:t.icon,bg:o};if(m.isObject(o))return{...N.omit(o,"value"),icon:o.icon??t.icon,selected:l.value===o.value}},a=u.getBemBlock("color_swatch_group"),h=w.cva(a,{variants:{size:u.generateVariantClassList(i.ColorSwatchSizes,a)}}),f=e.ref(!1),c=o=>m.isObject(o)?o.value:o??void 0,v=o=>{const r=c(o);l.value=r,f.value=!r},d=e.computed(()=>{if(t.colors)return t.colors;const o=["red","orange","yellow","lime","green","sky","blue","violet"];return t.colorMode==="subtle"?o.map(r=>`${r}-subtle`):typeof t.colorMode=="object"&&t.colorMode.value&&(t.colorMode.bg||t.colorMode.br||t.colorMode.fg)?o.map(r=>{const s={value:typeof t.colorMode=="object"&&t.colorMode.value==="subtle"?`${r}-subtle`:r};return typeof t.colorMode=="object"&&t.colorMode.bg&&(s.bg=t.colorMode.bg==="subtle"?`${r}-subtle`:r),typeof t.colorMode=="object"&&t.colorMode.br&&(s.br=t.colorMode.br==="subtle"?`${r}-subtle`:r),typeof t.colorMode=="object"&&t.colorMode.fg&&(s.fg=t.colorMode.fg==="subtle"?`${r}-subtle`:r),s}):o}),P=e.computed(()=>{var o;if(!((o=d.value)!=null&&o.length&&d.value.some(r=>g.isString(r)&&r===l.value||m.isObject(r)&&l.value===r.value)))return l.value}),V=o=>{o&&(l.value=o)},B=$.useEmitAsProps(p),M=e.computed(()=>({...k.pick(B,"onUpdate:format"),...k.pick(t,"format","defaultFormat","hideAlpha")}));return(o,r)=>(e.openBlock(),e.createBlock(e.unref(q.Primitive),{as:o.as,class:e.normalizeClass([t.class,e.unref(h)({size:o.size})])},{default:e.withCtx(()=>[_.header||o.header?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(u.getBemElement)(e.unref(a),"header"),o.headerCls])},[e.renderSlot(o.$slots,"header",{},()=>[e.createTextVNode(e.toDisplayString(o.header),1)])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([e.unref(u.getBemElement)(e.unref(a),"colors"),o.colorsCls])},[o.noRemover?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(i._sfc_main,{key:0,type:"remover",size:o.size,onClick:r[0]||(r[0]=s=>v()),selected:!e.unref(l)&&f.value},null,8,["size","selected"])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,s=>(e.openBlock(),e.createBlock(i._sfc_main,e.mergeProps({type:"color",size:o.size,icon:o.icon,ref_for:!0},y(s),{key:c(s),onClick:n=>v(s)}),e.createSlots({_:2},[e.renderList(Object.keys(o.$slots),n=>({name:n,fn:e.withCtx(z=>[e.renderSlot(o.$slots,n,e.mergeProps({ref_for:!0},{...z,value:c(s)}))])}))]),1040,["size","icon","onClick"]))),128)),o.noCustomPicker?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(E._sfc_main,e.mergeProps({key:1,trigger:"click","reverse-placement-on-dir":"rtl",placement:"right-start","side-offset":4},o.popoverProps||{}),{content:e.withCtx(()=>[e.createVNode(O._sfc_main,e.mergeProps({defaultColor:P.value,"onUpdate:color":V},M.value),null,16,["defaultColor"])]),default:e.withCtx(()=>[e.createVNode(i._sfc_main,{type:"custom-picker",size:o.size,customPickerIcon:o.customPickerIcon},e.createSlots({_:2},[e.renderList(Object.keys(o.$slots),s=>({name:s,fn:e.withCtx(n=>[e.renderSlot(o.$slots,s,e.normalizeProps(e.guardReactiveProps(n)))])}))]),1032,["size","customPickerIcon"])]),_:3},16))],2)]),_:3},8,["as","class"]))}});exports._sfc_main=A;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { GraphicalObjectProps } from '../GraphicalObject/GraphicalObject';
|
|
2
|
+
import { ColorTriggerSize } from './ColorTrigger.model';
|
|
3
|
+
export type ColorTriggerProps = Partial<Pick<GraphicalObjectProps, 'icon' | 'bg' | 'br' | 'fg' | 'as' | 'class'>> & {
|
|
4
|
+
size?: ColorTriggerSize;
|
|
5
|
+
borderless?: boolean;
|
|
6
|
+
suffixIcon?: boolean | string;
|
|
7
|
+
};
|
|
8
|
+
export interface ColorTriggerSlots {
|
|
9
|
+
default?: () => never;
|
|
10
|
+
icon?: () => never;
|
|
11
|
+
suffixIcon?: () => never;
|
|
12
|
+
}
|
|
13
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<ColorTriggerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ColorTriggerProps> & Readonly<{}>, {
|
|
14
|
+
size: "sm" | "md" | "lg";
|
|
15
|
+
suffixIcon: string | boolean;
|
|
16
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, Readonly<ColorTriggerSlots> & ColorTriggerSlots>;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../ColorTrigger.vue_vue_type_style_index_0_lang-DwyinKNj.js");exports.ColorTrigger=e._sfc_main;exports.ColorTriggerSizes=e.ColorTriggerSizes;exports.default=e._sfc_main;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { defineComponent as S, computed as o, useSlots as _, createBlock as c, openBlock as m, unref as i, normalizeClass as x, withCtx as t, createVNode as B, createCommentVNode as k, normalizeProps as l, guardReactiveProps as f, createSlots as I, renderList as h, renderSlot as u } from "vue";
|
|
2
|
+
import { _ as w } from "./GraphicalObject.vue_vue_type_script_setup_true_lang-B3FouRlw.js";
|
|
3
|
+
import { g as y } from "./options-JBqnVZUl.js";
|
|
4
|
+
import { g as O, a as g } from "./class-DziTeW9B.js";
|
|
5
|
+
import { cva as P } from "class-variance-authority";
|
|
6
|
+
import { P as $ } from "./Primitive-nOVjbfuc.js";
|
|
7
|
+
import { _ as T } from "./Icon.vue_vue_type_style_index_0_lang-BfPcw6PU.js";
|
|
8
|
+
import { i as V } from "./isString-BVAZt9W3.js";
|
|
9
|
+
import { p as G } from "./pick-DLskPTKb.js";
|
|
10
|
+
const p = ["sm", "md", "lg"], J = /* @__PURE__ */ S({
|
|
11
|
+
...y("ColorTrigger"),
|
|
12
|
+
__name: "ColorTrigger",
|
|
13
|
+
props: {
|
|
14
|
+
icon: {},
|
|
15
|
+
bg: {},
|
|
16
|
+
br: {},
|
|
17
|
+
fg: {},
|
|
18
|
+
as: {},
|
|
19
|
+
class: {},
|
|
20
|
+
size: { default: "md" },
|
|
21
|
+
borderless: { type: Boolean },
|
|
22
|
+
suffixIcon: { type: [Boolean, String], default: "tabler:chevron-down" }
|
|
23
|
+
},
|
|
24
|
+
setup(d) {
|
|
25
|
+
const e = d, r = O("color_trigger"), z = P(r, {
|
|
26
|
+
variants: {
|
|
27
|
+
size: g(p, r),
|
|
28
|
+
borderless: g("borderless", r)
|
|
29
|
+
}
|
|
30
|
+
}), b = o(
|
|
31
|
+
() => e.size && p.includes(e.size) ? e.size : "md"
|
|
32
|
+
), C = o(() => ({
|
|
33
|
+
size: (() => {
|
|
34
|
+
switch (e.size) {
|
|
35
|
+
case "sm":
|
|
36
|
+
return "2xsm";
|
|
37
|
+
case "md":
|
|
38
|
+
return "xsm";
|
|
39
|
+
case "lg":
|
|
40
|
+
return "sm";
|
|
41
|
+
}
|
|
42
|
+
})(),
|
|
43
|
+
...G(e, "icon", "bg", "br", "fg")
|
|
44
|
+
})), n = _(), v = o(() => {
|
|
45
|
+
switch (e.size) {
|
|
46
|
+
case "sm":
|
|
47
|
+
return "2xsm";
|
|
48
|
+
case "md":
|
|
49
|
+
case "lg":
|
|
50
|
+
return "xsm";
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
return (s, L) => (m(), c(i($), {
|
|
54
|
+
as: s.as,
|
|
55
|
+
class: x([
|
|
56
|
+
i(z)({
|
|
57
|
+
size: b.value,
|
|
58
|
+
borderless: s.borderless
|
|
59
|
+
}),
|
|
60
|
+
e.class
|
|
61
|
+
]),
|
|
62
|
+
tabindex: "0"
|
|
63
|
+
}, {
|
|
64
|
+
default: t(() => [
|
|
65
|
+
B(w, l(f(C.value)), I({ _: 2 }, [
|
|
66
|
+
h(Object.keys(n), (a) => ({
|
|
67
|
+
name: a,
|
|
68
|
+
fn: t(() => [
|
|
69
|
+
u(s.$slots, a, l(f(e)))
|
|
70
|
+
])
|
|
71
|
+
}))
|
|
72
|
+
]), 1040),
|
|
73
|
+
s.suffixIcon || n.suffixIcon ? (m(), c(T, {
|
|
74
|
+
key: 0,
|
|
75
|
+
icon: i(V)(s.suffixIcon) ? s.suffixIcon : void 0,
|
|
76
|
+
size: v.value
|
|
77
|
+
}, {
|
|
78
|
+
default: t(() => [
|
|
79
|
+
u(s.$slots, "suffixIcon")
|
|
80
|
+
]),
|
|
81
|
+
_: 3
|
|
82
|
+
}, 8, ["icon", "size"])) : k("", !0)
|
|
83
|
+
]),
|
|
84
|
+
_: 3
|
|
85
|
+
}, 8, ["as", "class"]));
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
export {
|
|
89
|
+
p as C,
|
|
90
|
+
J as _
|
|
91
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),d=require("./GraphicalObject.vue_vue_type_script_setup_true_lang-DlMeNk_1.js"),f=require("./options-B4iSAKol.js"),o=require("./class-CjZYGZDW.js"),p=require("class-variance-authority"),_=require("./Primitive-BT1RjuGS.js"),z=require("./Icon.vue_vue_type_style_index_0_lang-BvHCdzZP.js"),v=require("./isString-CKmTJsel.js"),C=require("./pick-C-ap2Lj0.js"),i=["sm","md","lg"],b=e.defineComponent({...f.getComponentOptions("ColorTrigger"),__name:"ColorTrigger",props:{icon:{},bg:{},br:{},fg:{},as:{},class:{},size:{default:"md"},borderless:{type:Boolean},suffixIcon:{type:[Boolean,String],default:"tabler:chevron-down"}},setup(a){const s=a,t=o.getBemBlock("color_trigger"),l=p.cva(t,{variants:{size:o.generateVariantClassList(i,t),borderless:o.generateVariantClassList("borderless",t)}}),u=e.computed(()=>s.size&&i.includes(s.size)?s.size:"md"),g=e.computed(()=>({size:(()=>{switch(s.size){case"sm":return"2xsm";case"md":return"xsm";case"lg":return"sm"}})(),...C.pick(s,"icon","bg","br","fg")})),n=e.useSlots(),m=e.computed(()=>{switch(s.size){case"sm":return"2xsm";case"md":case"lg":return"xsm"}});return(r,S)=>(e.openBlock(),e.createBlock(e.unref(_.Primitive),{as:r.as,class:e.normalizeClass([e.unref(l)({size:u.value,borderless:r.borderless}),s.class]),tabindex:"0"},{default:e.withCtx(()=>[e.createVNode(d._sfc_main,e.normalizeProps(e.guardReactiveProps(g.value)),e.createSlots({_:2},[e.renderList(Object.keys(n),c=>({name:c,fn:e.withCtx(()=>[e.renderSlot(r.$slots,c,e.normalizeProps(e.guardReactiveProps(s)))])}))]),1040),r.suffixIcon||n.suffixIcon?(e.openBlock(),e.createBlock(z._sfc_main,{key:0,icon:e.unref(v.isString)(r.suffixIcon)?r.suffixIcon:void 0,size:m.value},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"suffixIcon")]),_:3},8,["icon","size"])):e.createCommentVNode("",!0)]),_:3},8,["as","class"]))}});exports.ColorTriggerSizes=i;exports._sfc_main=b;
|
|
@@ -1,11 +1,121 @@
|
|
|
1
|
-
import "radix-vue";
|
|
2
|
-
import "@pantograph/tokens";
|
|
3
|
-
import "vue";
|
|
4
|
-
import {
|
|
5
|
-
import "
|
|
1
|
+
import { createContext as C, ConfigProvider as E } from "radix-vue";
|
|
2
|
+
import { toggleDark as T, getThemeConfig as s, init as _, defineTheme as u } from "@pantograph/tokens";
|
|
3
|
+
import { computed as m, unref as h, ref as g, defineComponent as p, watch as y, h as L } from "vue";
|
|
4
|
+
import { i as v } from "../isString-BVAZt9W3.js";
|
|
5
|
+
import { useMutationObserver as D } from "@vueuse/core";
|
|
6
|
+
import { c as M } from "../options-JBqnVZUl.js";
|
|
7
|
+
const k = (n) => {
|
|
8
|
+
const t = m(() => {
|
|
9
|
+
const e = h(n);
|
|
10
|
+
return v(e) ? document.querySelector(e) : e instanceof HTMLElement ? e : document.documentElement;
|
|
11
|
+
}), r = g("ltr"), o = () => {
|
|
12
|
+
t.value instanceof HTMLElement && (r.value = getComputedStyle(t.value).direction);
|
|
13
|
+
};
|
|
14
|
+
o();
|
|
15
|
+
const c = (e) => {
|
|
16
|
+
let i = e;
|
|
17
|
+
(!e || !["rtl", "ltr"].includes(e)) && (i = r.value === "ltr" ? "rtl" : "ltr"), t.value && (t.value.dir = i);
|
|
18
|
+
};
|
|
19
|
+
return D(t, o, {
|
|
20
|
+
attributes: !0,
|
|
21
|
+
attributeFilter: ["dir", "class", "style"]
|
|
22
|
+
}), [r, c];
|
|
23
|
+
}, b = (n) => {
|
|
24
|
+
const t = m(() => {
|
|
25
|
+
const e = h(n);
|
|
26
|
+
return v(e) ? document.querySelector(e) : e instanceof HTMLElement ? e : document.documentElement;
|
|
27
|
+
}), r = g(!1), o = () => {
|
|
28
|
+
var e, i;
|
|
29
|
+
t.value instanceof HTMLElement && (r.value = ((i = (e = t.value) == null ? void 0 : e.classList) == null ? void 0 : i.contains("dark")) ?? !1);
|
|
30
|
+
};
|
|
31
|
+
o();
|
|
32
|
+
const c = (e) => {
|
|
33
|
+
let i = e;
|
|
34
|
+
[!0, !1].includes(e) || (i = !r.value), t.value && T(i, t.value);
|
|
35
|
+
};
|
|
36
|
+
return D(t, o, {
|
|
37
|
+
attributes: !0,
|
|
38
|
+
attributeFilter: ["class", "data-theme"]
|
|
39
|
+
}), [r, c];
|
|
40
|
+
}, [S, j] = C("config-provider"), [x, H] = k(), [w, A] = b(), O = {
|
|
41
|
+
dir: x,
|
|
42
|
+
changeDirection: H,
|
|
43
|
+
dark: w,
|
|
44
|
+
toggleDark: A,
|
|
45
|
+
changeTheme: u,
|
|
46
|
+
theme: m(() => s())
|
|
47
|
+
}, I = () => S(O), J = p({
|
|
48
|
+
name: `${M}ConfigProvider`,
|
|
49
|
+
inheritAttrs: !1,
|
|
50
|
+
props: {
|
|
51
|
+
locale: {
|
|
52
|
+
type: [String, Object],
|
|
53
|
+
required: !1
|
|
54
|
+
},
|
|
55
|
+
theme: {
|
|
56
|
+
type: Object,
|
|
57
|
+
required: !1
|
|
58
|
+
},
|
|
59
|
+
changeAbleDirectionElement: {
|
|
60
|
+
type: [String, HTMLElement, Object],
|
|
61
|
+
default: "html"
|
|
62
|
+
},
|
|
63
|
+
changeAbleDarkElement: {
|
|
64
|
+
type: [String, HTMLElement, Object],
|
|
65
|
+
default: "html"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
setup(n, {
|
|
69
|
+
slots: t
|
|
70
|
+
}) {
|
|
71
|
+
const [r, o] = k(n.changeAbleDirectionElement), [c, e] = b(n.changeAbleDarkElement);
|
|
72
|
+
y(
|
|
73
|
+
() => n.theme,
|
|
74
|
+
() => {
|
|
75
|
+
var a, l;
|
|
76
|
+
if ((a = n.theme) != null && a.init || (l = n.theme) != null && l.element) {
|
|
77
|
+
const { init: P, ...f } = n.theme;
|
|
78
|
+
window.pantographThemeDefined ? u(f) : (_(f), Promise.resolve({ }), window.pantographThemeDefined = !0);
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
{ immediate: !0 }
|
|
82
|
+
);
|
|
83
|
+
const i = m(() => ({
|
|
84
|
+
...s(n.theme),
|
|
85
|
+
dark: c.value
|
|
86
|
+
})), d = (a) => {
|
|
87
|
+
var l;
|
|
88
|
+
return u({ element: (l = n.theme) == null ? void 0 : l.element, ...a });
|
|
89
|
+
};
|
|
90
|
+
return j({
|
|
91
|
+
dir: r,
|
|
92
|
+
theme: i,
|
|
93
|
+
dark: c,
|
|
94
|
+
changeDirection: o,
|
|
95
|
+
changeTheme: d,
|
|
96
|
+
toggleDark: e
|
|
97
|
+
}), () => L(
|
|
98
|
+
E,
|
|
99
|
+
{ dir: r.value },
|
|
100
|
+
{
|
|
101
|
+
default: () => {
|
|
102
|
+
var a;
|
|
103
|
+
return (a = t.default) == null ? void 0 : a.call(t, {
|
|
104
|
+
dir: r.value,
|
|
105
|
+
theme: i.value,
|
|
106
|
+
dark: c.value,
|
|
107
|
+
changeDirection: o,
|
|
108
|
+
changeTheme: d,
|
|
109
|
+
toggleDark: e
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
});
|
|
6
116
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
117
|
+
J as ConfigProvider,
|
|
118
|
+
J as default,
|
|
119
|
+
I as injectConfigContext,
|
|
120
|
+
j as provideConfigContext
|
|
11
121
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("radix-vue")
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("radix-vue"),u=require("@pantograph/tokens"),o=require("vue"),g=require("../isString-CKmTJsel.js"),h=require("@vueuse/core"),b=require("../options-B4iSAKol.js"),v=n=>{const t=o.computed(()=>{const e=o.unref(n);return g.isString(e)?document.querySelector(e):e instanceof HTMLElement?e:document.documentElement}),r=o.ref("ltr"),c=()=>{t.value instanceof HTMLElement&&(r.value=getComputedStyle(t.value).direction)};c();const l=e=>{let i=e;(!e||!["rtl","ltr"].includes(e))&&(i=r.value==="ltr"?"rtl":"ltr"),t.value&&(t.value.dir=i)};return h.useMutationObserver(t,c,{attributes:!0,attributeFilter:["dir","class","style"]}),[r,l]},D=n=>{const t=o.computed(()=>{const e=o.unref(n);return g.isString(e)?document.querySelector(e):e instanceof HTMLElement?e:document.documentElement}),r=o.ref(!1),c=()=>{var e,i;t.value instanceof HTMLElement&&(r.value=((i=(e=t.value)==null?void 0:e.classList)==null?void 0:i.contains("dark"))??!1)};c();const l=e=>{let i=e;[!0,!1].includes(e)||(i=!r.value),t.value&&u.toggleDark(i,t.value)};return h.useMutationObserver(t,c,{attributes:!0,attributeFilter:["class","data-theme"]}),[r,l]},[T,k]=f.createContext("config-provider"),[_,E]=v(),[q,S]=D(),M={dir:_,changeDirection:E,dark:q,toggleDark:S,changeTheme:u.defineTheme,theme:o.computed(()=>u.getThemeConfig())},p=()=>T(M),C=o.defineComponent({name:`${b.componentPrefix}ConfigProvider`,inheritAttrs:!1,props:{locale:{type:[String,Object],required:!1},theme:{type:Object,required:!1},changeAbleDirectionElement:{type:[String,HTMLElement,Object],default:"html"},changeAbleDarkElement:{type:[String,HTMLElement,Object],default:"html"}},setup(n,{slots:t}){const[r,c]=v(n.changeAbleDirectionElement),[l,e]=D(n.changeAbleDarkElement);o.watch(()=>n.theme,()=>{var a,s;if((a=n.theme)!=null&&a.init||(s=n.theme)!=null&&s.element){const{init:y,...m}=n.theme;window.pantographThemeDefined?u.defineTheme(m):(u.init(m),Promise.resolve().then(()=>require("../index-Dyvby5gX.js")),window.pantographThemeDefined=!0)}},{immediate:!0});const i=o.computed(()=>({...u.getThemeConfig(n.theme),dark:l.value})),d=a=>{var s;return u.defineTheme({element:(s=n.theme)==null?void 0:s.element,...a})};return k({dir:r,theme:i,dark:l,changeDirection:c,changeTheme:d,toggleDark:e}),()=>o.h(f.ConfigProvider,{dir:r.value},{default:()=>{var a;return(a=t.default)==null?void 0:a.call(t,{dir:r.value,theme:i.value,dark:l.value,changeDirection:c,changeTheme:d,toggleDark:e})}})}});exports.ConfigProvider=C;exports.default=C;exports.injectConfigContext=p;exports.provideConfigContext=k;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../FloatButton.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../FloatButton.vue_vue_type_script_setup_true_lang-C56u1xaL.js");exports.FloatButton=e._sfc_main;exports.default=e._sfc_main;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as i, useAttrs as l, computed as m, ref as u, createBlock as f, openBlock as _, mergeProps as d, createSlots as b, renderList as g, withCtx as v, renderSlot as B, normalizeProps as k, guardReactiveProps as x } from "vue";
|
|
2
|
-
import { o as y } from "./omit-
|
|
3
|
-
import { _ as C } from "./BaseButton.vue_vue_type_style_index_0_lang-
|
|
2
|
+
import { o as y } from "./omit-BEkBWXra.js";
|
|
3
|
+
import { _ as C } from "./BaseButton.vue_vue_type_style_index_0_lang-BrQJfrgg.js";
|
|
4
4
|
import { g as P } from "./options-JBqnVZUl.js";
|
|
5
5
|
const I = /* @__PURE__ */ i({
|
|
6
6
|
...P("FloatButton", !1),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),l=require("./omit-
|
|
1
|
+
"use strict";const e=require("vue"),l=require("./omit-BKPbELUG.js"),p=require("./BaseButton.vue_vue_type_style_index_0_lang-CTK5nNR6.js"),_=require("./options-B4iSAKol.js"),f=e.defineComponent({..._.getComponentOptions("FloatButton",!1),__name:"FloatButton",props:{as:{},class:{},color:{},loading:{type:Boolean},size:{},icon:{},type:{}},setup(s,{expose:r}){const a=s,c=e.useAttrs(),i=e.computed(()=>({...l.omit(c,"variant","text","preIcon","postIcon","action","active","badgeText"),...a})),o=e.ref();return r({focus(){var t;(t=o.value)==null||t.focus()},blur(){var t;(t=o.value)==null||t.blur()}}),(t,m)=>(e.openBlock(),e.createBlock(p._sfc_main,e.mergeProps(i.value,{variant:"float",ref_key:"buttonRef",ref:o}),e.createSlots({_:2},[e.renderList(Object.keys(t.$slots),n=>({name:n,fn:e.withCtx(u=>[e.renderSlot(t.$slots,n,e.normalizeProps(e.guardReactiveProps(u)))])}))]),1040))}});exports._sfc_main=f;
|