pxd 0.0.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/LICENSE +21 -0
- package/README.md +3 -0
- package/dist/_hooks/index.d.ts +7 -0
- package/dist/_hooks/use-disabled/index.d.ts +2 -0
- package/dist/_hooks/use-disabled/index.js +9 -0
- package/dist/_hooks/use-event-listener/index.d.ts +2 -0
- package/dist/_hooks/use-focus-trap/index.d.ts +8 -0
- package/dist/_hooks/use-focus-trap/index.js +35 -0
- package/dist/_hooks/use-size/index.d.ts +5 -0
- package/dist/_hooks/use-size/index.js +9 -0
- package/dist/_hooks/use-toggle/index.d.ts +6 -0
- package/dist/_hooks/use-toggle/index.js +13 -0
- package/dist/_hooks/use-z-index/index.d.ts +2 -0
- package/dist/_hooks/use-z-index/index.js +9 -0
- package/dist/_internal/constants.d.ts +4 -0
- package/dist/_internal/constants.js +7 -0
- package/dist/_internal/index.d.ts +3 -0
- package/dist/_internal/injectKeys.d.ts +5 -0
- package/dist/_internal/injectKeys.js +7 -0
- package/dist/_internal/props.d.ts +3 -0
- package/dist/_internal/props.js +5 -0
- package/dist/_styles/atoms.css +1 -0
- package/dist/_styles/base.css +1 -0
- package/dist/_styles/button.css +1 -0
- package/dist/_styles/checkbox.css +1 -0
- package/dist/_styles/dialog.css +1 -0
- package/dist/_styles/icon.css +1 -0
- package/dist/_styles/index.css +1 -0
- package/dist/_styles/input.css +1 -0
- package/dist/_styles/radio.css +1 -0
- package/dist/_styles/space.css +1 -0
- package/dist/_styles/spinner.css +1 -0
- package/dist/_styles/switch.css +1 -0
- package/dist/_styles/tokens.css +1 -0
- package/dist/_styles/transitions.css +1 -0
- package/dist/_types/component.d.ts +7 -0
- package/dist/_types/imports.d.ts +55 -0
- package/dist/_types/index.d.ts +2 -0
- package/dist/_types/props.d.ts +5 -0
- package/dist/_utils/index.d.ts +4 -0
- package/dist/_utils/install.d.ts +2 -0
- package/dist/_utils/install.js +7 -0
- package/dist/_utils/styles.d.ts +3 -0
- package/dist/_utils/styles.js +11 -0
- package/dist/_utils/typeof.d.ts +3 -0
- package/dist/_utils/typeof.js +14 -0
- package/dist/_utils/watchers.d.ts +8 -0
- package/dist/_utils/watchers.js +12 -0
- package/dist/button/index.d.ts +4 -0
- package/dist/button/index.js +9 -0
- package/dist/button/src/button.js +5 -0
- package/dist/button/src/button.vue.d.ts +14 -0
- package/dist/button/src/button.vue_vue_type_script_setup_true_name_CButton_lang.js +37 -0
- package/dist/button/src/constraints.d.ts +58 -0
- package/dist/button/src/constraints.js +36 -0
- package/dist/checkbox/index.d.ts +4 -0
- package/dist/checkbox/index.js +9 -0
- package/dist/checkbox/src/checkbox.js +5 -0
- package/dist/checkbox/src/checkbox.vue.d.ts +23 -0
- package/dist/checkbox/src/checkbox.vue_vue_type_script_setup_true_name_CCheckbox_lang.js +49 -0
- package/dist/checkbox/src/constraints.d.ts +26 -0
- package/dist/checkbox/src/constraints.js +19 -0
- package/dist/dialog/index.d.ts +4 -0
- package/dist/dialog/index.js +9 -0
- package/dist/dialog/src/constraints.d.ts +72 -0
- package/dist/dialog/src/constraints.js +41 -0
- package/dist/dialog/src/dialog.js +5 -0
- package/dist/dialog/src/dialog.vue.d.ts +37 -0
- package/dist/dialog/src/dialog.vue_vue_type_script_setup_true_name_CDialog_lang.js +143 -0
- package/dist/icon/index.d.ts +4 -0
- package/dist/icon/index.js +9 -0
- package/dist/icon/src/composables/use-icon.d.ts +8 -0
- package/dist/icon/src/composables/use-icon.js +15 -0
- package/dist/icon/src/constraints.d.ts +14 -0
- package/dist/icon/src/constraints.js +13 -0
- package/dist/icon/src/icon.js +5 -0
- package/dist/icon/src/icon.vue.d.ts +3 -0
- package/dist/icon/src/icon.vue_vue_type_script_setup_true_name_CIcon_lang.js +24 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +52 -0
- package/dist/input/index.d.ts +4 -0
- package/dist/input/index.js +9 -0
- package/dist/input/src/constraints.d.ts +55 -0
- package/dist/input/src/constraints.js +33 -0
- package/dist/input/src/input.js +5 -0
- package/dist/input/src/input.vue.d.ts +13 -0
- package/dist/input/src/input.vue_vue_type_script_setup_true_name_CInput_lang.js +54 -0
- package/dist/provider/index.d.ts +4 -0
- package/dist/provider/index.js +9 -0
- package/dist/provider/src/constraints.d.ts +14 -0
- package/dist/provider/src/constraints.js +13 -0
- package/dist/provider/src/provider.js +5 -0
- package/dist/provider/src/provider.vue.d.ts +3 -0
- package/dist/provider/src/provider.vue_vue_type_script_setup_true_name_CProvider_lang.js +15 -0
- package/dist/radio/index.d.ts +4 -0
- package/dist/radio/index.js +9 -0
- package/dist/radio/src/constraints.d.ts +13 -0
- package/dist/radio/src/constraints.js +9 -0
- package/dist/radio/src/radio.js +5 -0
- package/dist/radio/src/radio.vue.d.ts +3 -0
- package/dist/radio/src/radio.vue_vue_type_script_setup_true_name_CRadio_lang.js +39 -0
- package/dist/resolver.d.ts +2 -0
- package/dist/resolver.js +23 -0
- package/dist/space/index.d.ts +4 -0
- package/dist/space/index.js +9 -0
- package/dist/space/src/constraints.d.ts +27 -0
- package/dist/space/src/constraints.js +17 -0
- package/dist/space/src/space.js +5 -0
- package/dist/space/src/space.vue.d.ts +3 -0
- package/dist/space/src/space.vue_vue_type_script_setup_true_name_CSpace_lang.js +30 -0
- package/dist/spinner/index.d.ts +4 -0
- package/dist/spinner/index.js +9 -0
- package/dist/spinner/src/spinner.js +5 -0
- package/dist/spinner/src/spinner.vue.d.ts +3 -0
- package/dist/spinner/src/spinner.vue_vue_type_script_setup_true_name_CSpinner_lang.js +48 -0
- package/dist/switch/index.d.ts +4 -0
- package/dist/switch/index.js +9 -0
- package/dist/switch/src/constraints.d.ts +59 -0
- package/dist/switch/src/constraints.js +37 -0
- package/dist/switch/src/switch.js +5 -0
- package/dist/switch/src/switch.vue.d.ts +21 -0
- package/dist/switch/src/switch.vue_vue_type_script_setup_true_name_CSwitch_lang.js +50 -0
- package/package.json +89 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { CButton as m } from "./button/index.js";
|
|
2
|
+
import { CButton as y } from "./button/index.js";
|
|
3
|
+
import { CCheckbox as e } from "./checkbox/index.js";
|
|
4
|
+
import { CCheckbox as E } from "./checkbox/index.js";
|
|
5
|
+
import { CDialog as p } from "./dialog/index.js";
|
|
6
|
+
import { CDialog as q } from "./dialog/index.js";
|
|
7
|
+
import { CIcon as i } from "./icon/index.js";
|
|
8
|
+
import { CIcon as F } from "./icon/index.js";
|
|
9
|
+
import { CInput as f } from "./input/index.js";
|
|
10
|
+
import { CInput as H } from "./input/index.js";
|
|
11
|
+
import { CProvider as C } from "./provider/index.js";
|
|
12
|
+
import { CProvider as K } from "./provider/index.js";
|
|
13
|
+
import { CRadio as n } from "./radio/index.js";
|
|
14
|
+
import { CRadio as M } from "./radio/index.js";
|
|
15
|
+
import { CSpace as x } from "./space/index.js";
|
|
16
|
+
import { CSpace as O } from "./space/index.js";
|
|
17
|
+
import { CSpinner as c } from "./spinner/index.js";
|
|
18
|
+
import { CSpinner as T } from "./spinner/index.js";
|
|
19
|
+
import { CSwitch as a } from "./switch/index.js";
|
|
20
|
+
import { CSwitch as V } from "./switch/index.js";
|
|
21
|
+
import { globalSymbol as l } from "./_internal/injectKeys.js";
|
|
22
|
+
import { default as X } from "./resolver.js";
|
|
23
|
+
function w(o, r = { size: "medium" }) {
|
|
24
|
+
return o.provide(l, r), [
|
|
25
|
+
m,
|
|
26
|
+
i,
|
|
27
|
+
f,
|
|
28
|
+
C,
|
|
29
|
+
p,
|
|
30
|
+
c,
|
|
31
|
+
a,
|
|
32
|
+
x,
|
|
33
|
+
e,
|
|
34
|
+
n
|
|
35
|
+
].forEach((t) => {
|
|
36
|
+
t.install(o);
|
|
37
|
+
}), o;
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
y as CButton,
|
|
41
|
+
E as CCheckbox,
|
|
42
|
+
q as CDialog,
|
|
43
|
+
F as CIcon,
|
|
44
|
+
H as CInput,
|
|
45
|
+
K as CProvider,
|
|
46
|
+
M as CRadio,
|
|
47
|
+
O as CSpace,
|
|
48
|
+
T as CSpinner,
|
|
49
|
+
V as CSwitch,
|
|
50
|
+
X as PxResolver,
|
|
51
|
+
w as default
|
|
52
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import t from "./src/input.vue_vue_type_script_setup_true_name_CInput_lang.js";
|
|
2
|
+
import { default as a } from "./src/input.vue_vue_type_script_setup_true_name_CInput_lang.js";
|
|
3
|
+
import { withInstall as o } from "../_utils/install.js";
|
|
4
|
+
import "vue";
|
|
5
|
+
const f = o(t);
|
|
6
|
+
export {
|
|
7
|
+
f as CInput,
|
|
8
|
+
a as default
|
|
9
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
import type Input from './input.vue';
|
|
3
|
+
export declare const inputProps: {
|
|
4
|
+
/**
|
|
5
|
+
* @zh 输入框值
|
|
6
|
+
*/
|
|
7
|
+
modelValue: {
|
|
8
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @zh 输入框尺寸
|
|
13
|
+
*/
|
|
14
|
+
size: {
|
|
15
|
+
type: PropType<"mini" | "small" | "medium" | "large">;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* @zh 禁用
|
|
20
|
+
*/
|
|
21
|
+
disabled: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* @zh 只读
|
|
27
|
+
*/
|
|
28
|
+
readonly: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* @zh 是否移除展示省略号
|
|
34
|
+
*/
|
|
35
|
+
ellipsis: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* @zh 是否可以清空
|
|
41
|
+
*/
|
|
42
|
+
clearable: {
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
default: boolean;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* @zh 自定义提示语
|
|
48
|
+
*/
|
|
49
|
+
placeholder: {
|
|
50
|
+
type: StringConstructor;
|
|
51
|
+
default: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
export declare type InputProps = ExtractPropTypes<typeof inputProps>;
|
|
55
|
+
export declare type InputInstance = InstanceType<typeof Input>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
modelValue: {
|
|
3
|
+
type: [String, Number],
|
|
4
|
+
default: ""
|
|
5
|
+
},
|
|
6
|
+
size: {
|
|
7
|
+
type: String,
|
|
8
|
+
default: ""
|
|
9
|
+
},
|
|
10
|
+
disabled: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: !1
|
|
13
|
+
},
|
|
14
|
+
readonly: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: !1
|
|
17
|
+
},
|
|
18
|
+
ellipsis: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !0
|
|
21
|
+
},
|
|
22
|
+
clearable: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !0
|
|
25
|
+
},
|
|
26
|
+
placeholder: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: "Please enter..."
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
e as inputProps
|
|
33
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DefineComponent, ComputedRef, WritableComputedRef, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes } from 'vue';
|
|
2
|
+
declare const _sfc_main: DefineComponent<{}, {
|
|
3
|
+
props: any;
|
|
4
|
+
emits: (e: 'update:modelValue', value: string | number) => void;
|
|
5
|
+
size: ComputedRef<"mini" | "small" | "medium" | "large">;
|
|
6
|
+
className: ComputedRef<any[]>;
|
|
7
|
+
disabled: ComputedRef<boolean>;
|
|
8
|
+
placeholder: ComputedRef<any>;
|
|
9
|
+
modelValue: WritableComputedRef<any>;
|
|
10
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{}>> & {
|
|
11
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
12
|
+
}, {}>;
|
|
13
|
+
export default _sfc_main;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { defineComponent as c, computed as s, openBlock as p, createElementBlock as n, renderSlot as r, createCommentVNode as u, withDirectives as z, createElementVNode as V, isRef as _, normalizeClass as m, unref as t, vModelText as $ } from "vue";
|
|
2
|
+
import { inputProps as b } from "./constraints.js";
|
|
3
|
+
import { useDisabled as k } from "../../_hooks/use-disabled/index.js";
|
|
4
|
+
import { useSize as w } from "../../_hooks/use-size/index.js";
|
|
5
|
+
const C = { class: "px-input px-inline-flex px-width-full px-vertical-top" }, N = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "`px-input--prepend px-size-${size}`"
|
|
8
|
+
}, B = ["disabled", "readonly", "placeholder"], D = c({
|
|
9
|
+
name: "CInput"
|
|
10
|
+
}), M = /* @__PURE__ */ c({
|
|
11
|
+
...D,
|
|
12
|
+
props: b,
|
|
13
|
+
emits: ["update:modelValue"],
|
|
14
|
+
setup(f, { emit: x }) {
|
|
15
|
+
const l = f, i = w(l), v = s(() => [
|
|
16
|
+
"px-input--inner",
|
|
17
|
+
"px-transition",
|
|
18
|
+
"px-width-full",
|
|
19
|
+
`px-size-${i.value}`,
|
|
20
|
+
l.ellipsis && "px-overflow-ellipsis"
|
|
21
|
+
]), d = k(l), h = s(() => d.value || l.readonly ? "" : l.placeholder), o = s({
|
|
22
|
+
get() {
|
|
23
|
+
return l.modelValue;
|
|
24
|
+
},
|
|
25
|
+
set(e) {
|
|
26
|
+
x("update:modelValue", e);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
return (e, a) => (p(), n("div", C, [
|
|
30
|
+
e.$slots.prepend ? (p(), n("div", N, [
|
|
31
|
+
r(e.$slots, "prepend")
|
|
32
|
+
])) : u("", !0),
|
|
33
|
+
z(V("input", {
|
|
34
|
+
"onUpdate:modelValue": a[0] || (a[0] = (y) => _(o) ? o.value = y : null),
|
|
35
|
+
type: "text",
|
|
36
|
+
class: m(t(v)),
|
|
37
|
+
disabled: t(d),
|
|
38
|
+
readonly: e.readonly,
|
|
39
|
+
placeholder: t(h)
|
|
40
|
+
}, null, 10, B), [
|
|
41
|
+
[$, t(o)]
|
|
42
|
+
]),
|
|
43
|
+
e.$slots.append ? (p(), n("div", {
|
|
44
|
+
key: 1,
|
|
45
|
+
class: m(`px-input--append px-size-${t(i)}`)
|
|
46
|
+
}, [
|
|
47
|
+
r(e.$slots, "append")
|
|
48
|
+
], 2)) : u("", !0)
|
|
49
|
+
]));
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
export {
|
|
53
|
+
M as default
|
|
54
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import o from "./src/provider.vue_vue_type_script_setup_true_name_CProvider_lang.js";
|
|
2
|
+
import { default as a } from "./src/provider.vue_vue_type_script_setup_true_name_CProvider_lang.js";
|
|
3
|
+
import { withInstall as r } from "../_utils/install.js";
|
|
4
|
+
import "vue";
|
|
5
|
+
const f = r(o);
|
|
6
|
+
export {
|
|
7
|
+
f as CProvider,
|
|
8
|
+
a as default
|
|
9
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
import type Provider from './provider.vue';
|
|
3
|
+
export declare const providerProps: {
|
|
4
|
+
size: {
|
|
5
|
+
type: PropType<"mini" | "small" | "medium" | "large">;
|
|
6
|
+
default: null;
|
|
7
|
+
};
|
|
8
|
+
zIndex: {
|
|
9
|
+
type: NumberConstructor;
|
|
10
|
+
default: null;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export declare type ProviderProps = ExtractPropTypes<typeof providerProps>;
|
|
14
|
+
export declare type ProviderInstance = InstanceType<typeof Provider>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { DefineComponent, ComputedOptions, MethodOptions, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps } from 'vue';
|
|
2
|
+
declare const _sfc_main: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
|
|
3
|
+
export default _sfc_main;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { defineComponent as o, provide as t, renderSlot as p } from "vue";
|
|
2
|
+
import { providerProps as s } from "./constraints.js";
|
|
3
|
+
import { globalSymbol as n } from "../../_internal/injectKeys.js";
|
|
4
|
+
const m = o({
|
|
5
|
+
name: "CProvider"
|
|
6
|
+
}), _ = /* @__PURE__ */ o({
|
|
7
|
+
...m,
|
|
8
|
+
props: s,
|
|
9
|
+
setup(r) {
|
|
10
|
+
return t(n, r), (e, d) => p(e.$slots, "default");
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
export {
|
|
14
|
+
_ as default
|
|
15
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import o from "./src/radio.vue_vue_type_script_setup_true_name_CRadio_lang.js";
|
|
2
|
+
import { default as e } from "./src/radio.vue_vue_type_script_setup_true_name_CRadio_lang.js";
|
|
3
|
+
import { withInstall as t } from "../_utils/install.js";
|
|
4
|
+
import "vue";
|
|
5
|
+
const f = t(o);
|
|
6
|
+
export {
|
|
7
|
+
f as CRadio,
|
|
8
|
+
e as default
|
|
9
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ExtractPropTypes } from 'vue';
|
|
2
|
+
import type Radio from './radio.vue';
|
|
3
|
+
export declare const radioProps: {
|
|
4
|
+
/**
|
|
5
|
+
* @zh 是否禁用
|
|
6
|
+
*/
|
|
7
|
+
disabled: {
|
|
8
|
+
type: BooleanConstructor;
|
|
9
|
+
default: boolean;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export declare type RadioProps = ExtractPropTypes<typeof radioProps>;
|
|
13
|
+
export declare type RadioInstance = InstanceType<typeof Radio>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { DefineComponent, ComputedOptions, MethodOptions, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps } from 'vue';
|
|
2
|
+
declare const _sfc_main: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
|
|
3
|
+
export default _sfc_main;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { defineComponent as n, ref as b, computed as t, inject as a, openBlock as r, createElementBlock as l, normalizeClass as x, unref as o, createElementVNode as i, renderSlot as C, createCommentVNode as h } from "vue";
|
|
2
|
+
import { radioProps as y } from "./constraints.js";
|
|
3
|
+
import { formSymbol as g, radioGroupSymbol as k } from "../../_internal/injectKeys.js";
|
|
4
|
+
import { getFilledClassNames as N } from "../../_utils/styles.js";
|
|
5
|
+
const R = ["aria-disabled"], S = ["disabled"], V = /* @__PURE__ */ i("i", { class: "px-radio--target px-relative px-transition px-items-center px-justify-center" }, null, -1), j = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "px-radio--label"
|
|
8
|
+
}, B = n({
|
|
9
|
+
name: "CRadio"
|
|
10
|
+
}), F = /* @__PURE__ */ n({
|
|
11
|
+
...B,
|
|
12
|
+
props: y,
|
|
13
|
+
setup(d) {
|
|
14
|
+
const c = d, p = b(), m = t(() => ["px-radio", N("relation inline-flex items-center cursor-pointer select-none")]), f = a(g, { disabled: !1 }), u = a(k, { disabled: !1 }), s = t(() => c.disabled || u.disabled || f.disabled);
|
|
15
|
+
function _(e) {
|
|
16
|
+
console.log(e);
|
|
17
|
+
}
|
|
18
|
+
return (e, E) => (r(), l("label", {
|
|
19
|
+
class: x(o(m)),
|
|
20
|
+
"aria-disabled": o(s)
|
|
21
|
+
}, [
|
|
22
|
+
i("input", {
|
|
23
|
+
ref_key: "radioRef",
|
|
24
|
+
ref: p,
|
|
25
|
+
type: "radio",
|
|
26
|
+
class: "px-outside",
|
|
27
|
+
disabled: o(s),
|
|
28
|
+
onChange: _
|
|
29
|
+
}, null, 40, S),
|
|
30
|
+
V,
|
|
31
|
+
e.$slots.default ? (r(), l("span", j, [
|
|
32
|
+
C(e.$slots, "default")
|
|
33
|
+
])) : h("", !0)
|
|
34
|
+
], 10, R));
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
export {
|
|
38
|
+
F as default
|
|
39
|
+
};
|
package/dist/resolver.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const r = "px-ui", s = ["provider"];
|
|
2
|
+
function o(e) {
|
|
3
|
+
if (!s.includes(e))
|
|
4
|
+
return [`${r}/_styles/base.css`, `px-ui/_styles/${e}.css`];
|
|
5
|
+
}
|
|
6
|
+
function c() {
|
|
7
|
+
return {
|
|
8
|
+
type: "component",
|
|
9
|
+
resolve: (e) => {
|
|
10
|
+
if (!e.match(/^C[A-Z]/))
|
|
11
|
+
return;
|
|
12
|
+
const t = e.replace(/^C/, "").toLowerCase();
|
|
13
|
+
return {
|
|
14
|
+
importName: e,
|
|
15
|
+
from: `${r}/${t}`,
|
|
16
|
+
sideEffects: o(t)
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
c as default
|
|
23
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import o from "./src/space.vue_vue_type_script_setup_true_name_CSpace_lang.js";
|
|
2
|
+
import { default as e } from "./src/space.vue_vue_type_script_setup_true_name_CSpace_lang.js";
|
|
3
|
+
import { withInstall as t } from "../_utils/install.js";
|
|
4
|
+
import "vue";
|
|
5
|
+
const f = t(o);
|
|
6
|
+
export {
|
|
7
|
+
f as CSpace,
|
|
8
|
+
e as default
|
|
9
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
import type Space from './space.vue';
|
|
3
|
+
export declare const spaceProps: {
|
|
4
|
+
/**
|
|
5
|
+
* @zh 垂直排列
|
|
6
|
+
*/
|
|
7
|
+
vertical: {
|
|
8
|
+
type: BooleanConstructor;
|
|
9
|
+
default: boolean;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @zh 间距
|
|
13
|
+
*/
|
|
14
|
+
size: {
|
|
15
|
+
type: PropType<"mini" | "small" | "medium" | "large">;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* @zh 对齐方式
|
|
20
|
+
*/
|
|
21
|
+
align: {
|
|
22
|
+
type: PropType<"start" | "end" | "center" | "baseline">;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export declare type SpaceProps = ExtractPropTypes<typeof spaceProps>;
|
|
27
|
+
export declare type SpaceInstance = InstanceType<typeof Space>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { DefineComponent, ComputedOptions, MethodOptions, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps } from 'vue';
|
|
2
|
+
declare const _sfc_main: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
|
|
3
|
+
export default _sfc_main;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineComponent as t, computed as r, openBlock as c, createElementBlock as p, normalizeClass as i, unref as m, normalizeStyle as f, renderSlot as u } from "vue";
|
|
2
|
+
import { spaceProps as d } from "./constraints.js";
|
|
3
|
+
import { useSize as _ } from "../../_hooks/use-size/index.js";
|
|
4
|
+
const x = t({
|
|
5
|
+
name: "CSpace"
|
|
6
|
+
}), $ = /* @__PURE__ */ t({
|
|
7
|
+
...x,
|
|
8
|
+
props: d,
|
|
9
|
+
setup(s) {
|
|
10
|
+
const e = s, n = {
|
|
11
|
+
start: "flex-start",
|
|
12
|
+
end: "flex-end",
|
|
13
|
+
center: "center",
|
|
14
|
+
baseline: "baseline"
|
|
15
|
+
}, o = _(e), a = r(() => [
|
|
16
|
+
"px-space",
|
|
17
|
+
`px-space--${o.value}`,
|
|
18
|
+
`px-flex${e.vertical ? "-col" : ""}`
|
|
19
|
+
]);
|
|
20
|
+
return (l, z) => (c(), p("div", {
|
|
21
|
+
class: i(m(a)),
|
|
22
|
+
style: f({ "--align": n[e.align] })
|
|
23
|
+
}, [
|
|
24
|
+
u(l.$slots, "default")
|
|
25
|
+
], 6));
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
export {
|
|
29
|
+
$ as default
|
|
30
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import o from "./src/spinner.vue_vue_type_script_setup_true_name_CSpinner_lang.js";
|
|
2
|
+
import { default as e } from "./src/spinner.vue_vue_type_script_setup_true_name_CSpinner_lang.js";
|
|
3
|
+
import { withInstall as r } from "../_utils/install.js";
|
|
4
|
+
import "vue";
|
|
5
|
+
const p = r(o);
|
|
6
|
+
export {
|
|
7
|
+
p as CSpinner,
|
|
8
|
+
e as default
|
|
9
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { DefineComponent, ComputedOptions, MethodOptions, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps } from 'vue';
|
|
2
|
+
declare const _sfc_main: DefineComponent<unknown, object, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<unknown>, {}>;
|
|
3
|
+
export default _sfc_main;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { defineComponent as t, openBlock as n, createElementBlock as s, normalizeStyle as a, unref as i, createElementVNode as e } from "vue";
|
|
2
|
+
import { useIcon as l } from "../../icon/src/composables/use-icon.js";
|
|
3
|
+
import { iconProps as p } from "../../icon/src/constraints.js";
|
|
4
|
+
const c = /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24" }, [
|
|
5
|
+
/* @__PURE__ */ e("path", {
|
|
6
|
+
fill: "none",
|
|
7
|
+
stroke: "currentColor",
|
|
8
|
+
"stroke-dasharray": "15",
|
|
9
|
+
"stroke-dashoffset": "15",
|
|
10
|
+
"stroke-linecap": "round",
|
|
11
|
+
"stroke-width": "2",
|
|
12
|
+
d: "M12 3C16.9706 3 21 7.02944 21 12"
|
|
13
|
+
}, [
|
|
14
|
+
/* @__PURE__ */ e("animate", {
|
|
15
|
+
fill: "freeze",
|
|
16
|
+
attributeName: "stroke-dashoffset",
|
|
17
|
+
dur: "0.3s",
|
|
18
|
+
values: "15;0"
|
|
19
|
+
}),
|
|
20
|
+
/* @__PURE__ */ e("animateTransform", {
|
|
21
|
+
attributeName: "transform",
|
|
22
|
+
dur: "1.5s",
|
|
23
|
+
repeatCount: "indefinite",
|
|
24
|
+
type: "rotate",
|
|
25
|
+
values: "0 12 12;360 12 12"
|
|
26
|
+
})
|
|
27
|
+
])
|
|
28
|
+
], -1), m = [
|
|
29
|
+
c
|
|
30
|
+
], d = t({
|
|
31
|
+
name: "CSpinner"
|
|
32
|
+
}), x = /* @__PURE__ */ t({
|
|
33
|
+
...d,
|
|
34
|
+
props: p,
|
|
35
|
+
setup(r) {
|
|
36
|
+
const o = l(r);
|
|
37
|
+
return (u, _) => (n(), s("i", {
|
|
38
|
+
role: "img",
|
|
39
|
+
class: "px-spinner px-empty-hidden",
|
|
40
|
+
"aria-label": "icon",
|
|
41
|
+
"aria-hidden": "true",
|
|
42
|
+
style: a(i(o))
|
|
43
|
+
}, m, 4));
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
export {
|
|
47
|
+
x as default
|
|
48
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import t from "./src/switch.vue_vue_type_script_setup_true_name_CSwitch_lang.js";
|
|
2
|
+
import { default as c } from "./src/switch.vue_vue_type_script_setup_true_name_CSwitch_lang.js";
|
|
3
|
+
import { withInstall as o } from "../_utils/install.js";
|
|
4
|
+
import "vue";
|
|
5
|
+
const f = o(t);
|
|
6
|
+
export {
|
|
7
|
+
f as CSwitch,
|
|
8
|
+
c as default
|
|
9
|
+
};
|