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.
Files changed (123) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +3 -0
  3. package/dist/_hooks/index.d.ts +7 -0
  4. package/dist/_hooks/use-disabled/index.d.ts +2 -0
  5. package/dist/_hooks/use-disabled/index.js +9 -0
  6. package/dist/_hooks/use-event-listener/index.d.ts +2 -0
  7. package/dist/_hooks/use-focus-trap/index.d.ts +8 -0
  8. package/dist/_hooks/use-focus-trap/index.js +35 -0
  9. package/dist/_hooks/use-size/index.d.ts +5 -0
  10. package/dist/_hooks/use-size/index.js +9 -0
  11. package/dist/_hooks/use-toggle/index.d.ts +6 -0
  12. package/dist/_hooks/use-toggle/index.js +13 -0
  13. package/dist/_hooks/use-z-index/index.d.ts +2 -0
  14. package/dist/_hooks/use-z-index/index.js +9 -0
  15. package/dist/_internal/constants.d.ts +4 -0
  16. package/dist/_internal/constants.js +7 -0
  17. package/dist/_internal/index.d.ts +3 -0
  18. package/dist/_internal/injectKeys.d.ts +5 -0
  19. package/dist/_internal/injectKeys.js +7 -0
  20. package/dist/_internal/props.d.ts +3 -0
  21. package/dist/_internal/props.js +5 -0
  22. package/dist/_styles/atoms.css +1 -0
  23. package/dist/_styles/base.css +1 -0
  24. package/dist/_styles/button.css +1 -0
  25. package/dist/_styles/checkbox.css +1 -0
  26. package/dist/_styles/dialog.css +1 -0
  27. package/dist/_styles/icon.css +1 -0
  28. package/dist/_styles/index.css +1 -0
  29. package/dist/_styles/input.css +1 -0
  30. package/dist/_styles/radio.css +1 -0
  31. package/dist/_styles/space.css +1 -0
  32. package/dist/_styles/spinner.css +1 -0
  33. package/dist/_styles/switch.css +1 -0
  34. package/dist/_styles/tokens.css +1 -0
  35. package/dist/_styles/transitions.css +1 -0
  36. package/dist/_types/component.d.ts +7 -0
  37. package/dist/_types/imports.d.ts +55 -0
  38. package/dist/_types/index.d.ts +2 -0
  39. package/dist/_types/props.d.ts +5 -0
  40. package/dist/_utils/index.d.ts +4 -0
  41. package/dist/_utils/install.d.ts +2 -0
  42. package/dist/_utils/install.js +7 -0
  43. package/dist/_utils/styles.d.ts +3 -0
  44. package/dist/_utils/styles.js +11 -0
  45. package/dist/_utils/typeof.d.ts +3 -0
  46. package/dist/_utils/typeof.js +14 -0
  47. package/dist/_utils/watchers.d.ts +8 -0
  48. package/dist/_utils/watchers.js +12 -0
  49. package/dist/button/index.d.ts +4 -0
  50. package/dist/button/index.js +9 -0
  51. package/dist/button/src/button.js +5 -0
  52. package/dist/button/src/button.vue.d.ts +14 -0
  53. package/dist/button/src/button.vue_vue_type_script_setup_true_name_CButton_lang.js +37 -0
  54. package/dist/button/src/constraints.d.ts +58 -0
  55. package/dist/button/src/constraints.js +36 -0
  56. package/dist/checkbox/index.d.ts +4 -0
  57. package/dist/checkbox/index.js +9 -0
  58. package/dist/checkbox/src/checkbox.js +5 -0
  59. package/dist/checkbox/src/checkbox.vue.d.ts +23 -0
  60. package/dist/checkbox/src/checkbox.vue_vue_type_script_setup_true_name_CCheckbox_lang.js +49 -0
  61. package/dist/checkbox/src/constraints.d.ts +26 -0
  62. package/dist/checkbox/src/constraints.js +19 -0
  63. package/dist/dialog/index.d.ts +4 -0
  64. package/dist/dialog/index.js +9 -0
  65. package/dist/dialog/src/constraints.d.ts +72 -0
  66. package/dist/dialog/src/constraints.js +41 -0
  67. package/dist/dialog/src/dialog.js +5 -0
  68. package/dist/dialog/src/dialog.vue.d.ts +37 -0
  69. package/dist/dialog/src/dialog.vue_vue_type_script_setup_true_name_CDialog_lang.js +143 -0
  70. package/dist/icon/index.d.ts +4 -0
  71. package/dist/icon/index.js +9 -0
  72. package/dist/icon/src/composables/use-icon.d.ts +8 -0
  73. package/dist/icon/src/composables/use-icon.js +15 -0
  74. package/dist/icon/src/constraints.d.ts +14 -0
  75. package/dist/icon/src/constraints.js +13 -0
  76. package/dist/icon/src/icon.js +5 -0
  77. package/dist/icon/src/icon.vue.d.ts +3 -0
  78. package/dist/icon/src/icon.vue_vue_type_script_setup_true_name_CIcon_lang.js +24 -0
  79. package/dist/index.d.ts +18 -0
  80. package/dist/index.js +52 -0
  81. package/dist/input/index.d.ts +4 -0
  82. package/dist/input/index.js +9 -0
  83. package/dist/input/src/constraints.d.ts +55 -0
  84. package/dist/input/src/constraints.js +33 -0
  85. package/dist/input/src/input.js +5 -0
  86. package/dist/input/src/input.vue.d.ts +13 -0
  87. package/dist/input/src/input.vue_vue_type_script_setup_true_name_CInput_lang.js +54 -0
  88. package/dist/provider/index.d.ts +4 -0
  89. package/dist/provider/index.js +9 -0
  90. package/dist/provider/src/constraints.d.ts +14 -0
  91. package/dist/provider/src/constraints.js +13 -0
  92. package/dist/provider/src/provider.js +5 -0
  93. package/dist/provider/src/provider.vue.d.ts +3 -0
  94. package/dist/provider/src/provider.vue_vue_type_script_setup_true_name_CProvider_lang.js +15 -0
  95. package/dist/radio/index.d.ts +4 -0
  96. package/dist/radio/index.js +9 -0
  97. package/dist/radio/src/constraints.d.ts +13 -0
  98. package/dist/radio/src/constraints.js +9 -0
  99. package/dist/radio/src/radio.js +5 -0
  100. package/dist/radio/src/radio.vue.d.ts +3 -0
  101. package/dist/radio/src/radio.vue_vue_type_script_setup_true_name_CRadio_lang.js +39 -0
  102. package/dist/resolver.d.ts +2 -0
  103. package/dist/resolver.js +23 -0
  104. package/dist/space/index.d.ts +4 -0
  105. package/dist/space/index.js +9 -0
  106. package/dist/space/src/constraints.d.ts +27 -0
  107. package/dist/space/src/constraints.js +17 -0
  108. package/dist/space/src/space.js +5 -0
  109. package/dist/space/src/space.vue.d.ts +3 -0
  110. package/dist/space/src/space.vue_vue_type_script_setup_true_name_CSpace_lang.js +30 -0
  111. package/dist/spinner/index.d.ts +4 -0
  112. package/dist/spinner/index.js +9 -0
  113. package/dist/spinner/src/spinner.js +5 -0
  114. package/dist/spinner/src/spinner.vue.d.ts +3 -0
  115. package/dist/spinner/src/spinner.vue_vue_type_script_setup_true_name_CSpinner_lang.js +48 -0
  116. package/dist/switch/index.d.ts +4 -0
  117. package/dist/switch/index.js +9 -0
  118. package/dist/switch/src/constraints.d.ts +59 -0
  119. package/dist/switch/src/constraints.js +37 -0
  120. package/dist/switch/src/switch.js +5 -0
  121. package/dist/switch/src/switch.vue.d.ts +21 -0
  122. package/dist/switch/src/switch.vue_vue_type_script_setup_true_name_CSwitch_lang.js +50 -0
  123. package/package.json +89 -0
@@ -0,0 +1,36 @@
1
+ import { VARIANTS as e, NATIVE_BUTTON_TYPES as a } from "../../_internal/props.js";
2
+ const o = {
3
+ status: {
4
+ type: String,
5
+ default: "default",
6
+ validator: (t) => e.includes(t)
7
+ },
8
+ type: {
9
+ type: String,
10
+ default: "button",
11
+ validator: (t) => a.includes(t)
12
+ },
13
+ size: {
14
+ type: String,
15
+ default: ""
16
+ },
17
+ plain: {
18
+ type: Boolean,
19
+ default: !1
20
+ },
21
+ ghost: {
22
+ type: Boolean,
23
+ default: !1
24
+ },
25
+ loading: {
26
+ type: Boolean,
27
+ default: !1
28
+ },
29
+ disabled: {
30
+ type: Boolean,
31
+ default: !1
32
+ }
33
+ };
34
+ export {
35
+ o as buttonProps
36
+ };
@@ -0,0 +1,4 @@
1
+ import type { InstallableComponent } from '..';
2
+ import Checkbox from './src/checkbox.vue';
3
+ export declare const CCheckbox: InstallableComponent;
4
+ export default Checkbox;
@@ -0,0 +1,9 @@
1
+ import o from "./src/checkbox.vue_vue_type_script_setup_true_name_CCheckbox_lang.js";
2
+ import { default as a } from "./src/checkbox.vue_vue_type_script_setup_true_name_CCheckbox_lang.js";
3
+ import { withInstall as t } from "../_utils/install.js";
4
+ import "vue";
5
+ const i = t(o);
6
+ export {
7
+ i as CCheckbox,
8
+ a as default
9
+ };
@@ -0,0 +1,5 @@
1
+ import "./checkbox.vue_vue_type_script_setup_true_name_CCheckbox_lang.js";
2
+ import { default as t } from "./checkbox.vue_vue_type_script_setup_true_name_CCheckbox_lang.js";
3
+ export {
4
+ t as default
5
+ };
@@ -0,0 +1,23 @@
1
+ import type { DefineComponent, Ref, ComputedRef, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes } from 'vue';
2
+ declare const _sfc_main: DefineComponent<{}, {
3
+ props: any;
4
+ emits: {
5
+ (e: 'change'): void;
6
+ (e: 'update:modelValue'): void;
7
+ };
8
+ checked: Ref<boolean>;
9
+ checkboxRef: Ref<HTMLInputElement | undefined>;
10
+ form: {
11
+ disabled: boolean;
12
+ };
13
+ checkboxGroup: {
14
+ disabled: boolean;
15
+ };
16
+ disabledComputed: ComputedRef<boolean>;
17
+ className: ComputedRef<any[]>;
18
+ onChangeValue: () => void;
19
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{}>> & {
20
+ onChange?: ((...args: any[]) => any) | undefined;
21
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
22
+ }, {}>;
23
+ export default _sfc_main;
@@ -0,0 +1,49 @@
1
+ import { defineComponent as p, ref as l, inject as n, computed as d, openBlock as r, createElementBlock as i, normalizeClass as _, unref as c, createElementVNode as e, renderSlot as C, createCommentVNode as v } from "vue";
2
+ import { checkboxProps as g } from "./constraints.js";
3
+ import { formSymbol as y, checkboxGroupSymbol as V } from "../../_internal/injectKeys.js";
4
+ const B = ["aria-disabled"], N = ["value", "disabled", "checked"], S = /* @__PURE__ */ e("i", { class: "px-checkbox--target px-relative px-transition px-items-center px-justify-center" }, [
5
+ /* @__PURE__ */ e("svg", { viewBox: "0 0 64 64" }, [
6
+ /* @__PURE__ */ e("path", { d: "M50.42,16.76L22.34,39.45l-8.1-11.46c-1.12-1.58-3.3-1.96-4.88-0.84c-1.58,1.12-1.95,3.3-0.84,4.88l10.26,14.51 c0.56,0.79,1.42,1.31,2.38,1.45c0.16,0.02,0.32,0.03,0.48,0.03c0.8,0,1.57-0.27,2.2-0.78l30.99-25.03c1.5-1.21,1.74-3.42,0.52-4.92 C54.13,15.78,51.93,15.55,50.42,16.76z" })
7
+ ])
8
+ ], -1), j = {
9
+ key: 0,
10
+ class: "px-checkbox--label"
11
+ }, z = p({
12
+ name: "CCheckbox"
13
+ }), w = /* @__PURE__ */ p({
14
+ ...z,
15
+ props: g,
16
+ emits: ["change", "update:modelValue"],
17
+ setup(u, { emit: s }) {
18
+ const o = u, m = l(!1), b = l(), x = n(y, { disabled: !1 }), h = n(V, { disabled: !1 }), a = d(() => o.disabled || h.disabled || x.disabled), f = d(() => [
19
+ "px-checkbox",
20
+ o.disabled && "px-checkbox--disabled",
21
+ o.indeterminate && "indeterminate"
22
+ ]);
23
+ function k() {
24
+ s("change"), s("update:modelValue");
25
+ }
26
+ return (t, E) => (r(), i("label", {
27
+ class: _(["px-relation px-inline-flex px-items-center px-cursor-pointer px-select-none", c(f)]),
28
+ "aria-disabled": c(a)
29
+ }, [
30
+ e("input", {
31
+ ref_key: "checkboxRef",
32
+ ref: b,
33
+ type: "checkbox",
34
+ class: "px-outside",
35
+ value: t.value,
36
+ disabled: c(a),
37
+ checked: m.value,
38
+ onChange: k
39
+ }, null, 40, N),
40
+ S,
41
+ t.$slots.default ? (r(), i("span", j, [
42
+ C(t.$slots, "default")
43
+ ])) : v("", !0)
44
+ ], 10, B));
45
+ }
46
+ });
47
+ export {
48
+ w as default
49
+ };
@@ -0,0 +1,26 @@
1
+ import type Checkbox from './checkbox.vue';
2
+ import type { ExtractPropTypes } from 'vue';
3
+ export declare const checkboxProps: {
4
+ modelValue: {
5
+ type: BooleanConstructor;
6
+ };
7
+ value: {
8
+ type: (BooleanConstructor | StringConstructor | ObjectConstructor | NumberConstructor)[];
9
+ };
10
+ /**
11
+ * @zh 是否禁用
12
+ */
13
+ disabled: {
14
+ type: BooleanConstructor;
15
+ default: boolean;
16
+ };
17
+ /**
18
+ * @zh 半选
19
+ */
20
+ indeterminate: {
21
+ type: BooleanConstructor;
22
+ default: boolean;
23
+ };
24
+ };
25
+ export declare type CheckboxProps = ExtractPropTypes<typeof checkboxProps>;
26
+ export declare type CheckboxInstance = InstanceType<typeof Checkbox>;
@@ -0,0 +1,19 @@
1
+ const e = {
2
+ modelValue: {
3
+ type: Boolean
4
+ },
5
+ value: {
6
+ type: [String, Number, Boolean, Object]
7
+ },
8
+ disabled: {
9
+ type: Boolean,
10
+ default: !1
11
+ },
12
+ indeterminate: {
13
+ type: Boolean,
14
+ default: !1
15
+ }
16
+ };
17
+ export {
18
+ e as checkboxProps
19
+ };
@@ -0,0 +1,4 @@
1
+ import type { InstallableComponent } from '..';
2
+ import Dialog from './src/dialog.vue';
3
+ export declare const CDialog: InstallableComponent;
4
+ export default Dialog;
@@ -0,0 +1,9 @@
1
+ import o from "./src/dialog.vue_vue_type_script_setup_true_name_CDialog_lang.js";
2
+ import { default as l } from "./src/dialog.vue_vue_type_script_setup_true_name_CDialog_lang.js";
3
+ import { withInstall as t } from "../_utils/install.js";
4
+ import "vue";
5
+ const f = t(o);
6
+ export {
7
+ f as CDialog,
8
+ l as default
9
+ };
@@ -0,0 +1,72 @@
1
+ import type Dialog from './dialog.vue';
2
+ import type { ExtractPropTypes } from 'vue';
3
+ export declare const dialogProps: {
4
+ /**
5
+ * @zh 是否显示弹窗
6
+ */
7
+ modelValue: {
8
+ type: BooleanConstructor;
9
+ default: boolean;
10
+ };
11
+ /**
12
+ * @zh 标题
13
+ */
14
+ title: {
15
+ type: StringConstructor;
16
+ default: string;
17
+ };
18
+ /**
19
+ * @zh 标题下方的描述
20
+ */
21
+ description: {
22
+ type: StringConstructor;
23
+ default: string;
24
+ };
25
+ /**
26
+ * @zh 是否只有在展示的时候才渲染 DOM
27
+ */
28
+ /**
29
+ * @zh 弹窗出现时锁定 body 滚动
30
+ */
31
+ lockScroll: {
32
+ type: BooleanConstructor;
33
+ default: boolean;
34
+ };
35
+ /**
36
+ * @zh 是否显示关闭按钮
37
+ */
38
+ showClose: {
39
+ type: BooleanConstructor;
40
+ default: boolean;
41
+ };
42
+ /**
43
+ * @zh 是否把焦点范围锁定在弹窗中
44
+ */
45
+ focusTrap: {
46
+ type: BooleanConstructor;
47
+ default: boolean;
48
+ };
49
+ /**
50
+ * @zh 是否将 DOM 元素
51
+ */
52
+ appendToBody: {
53
+ type: BooleanConstructor;
54
+ default: boolean;
55
+ };
56
+ /**
57
+ * @zh 是否可以点击遮罩关闭弹窗
58
+ */
59
+ closeOnClickOutside: {
60
+ type: BooleanConstructor;
61
+ default: boolean;
62
+ };
63
+ /**
64
+ * @zh 是否可以通过按下 ESC 关闭 Dialog
65
+ */
66
+ closeOnPressEscape: {
67
+ type: BooleanConstructor;
68
+ default: boolean;
69
+ };
70
+ };
71
+ export declare type DialogProps = ExtractPropTypes<typeof dialogProps>;
72
+ export declare type DialogInstance = InstanceType<typeof Dialog>;
@@ -0,0 +1,41 @@
1
+ const e = {
2
+ modelValue: {
3
+ type: Boolean,
4
+ default: !1
5
+ },
6
+ title: {
7
+ type: String,
8
+ default: ""
9
+ },
10
+ description: {
11
+ type: String,
12
+ default: ""
13
+ },
14
+ lockScroll: {
15
+ type: Boolean,
16
+ default: !0
17
+ },
18
+ showClose: {
19
+ type: Boolean,
20
+ default: !0
21
+ },
22
+ focusTrap: {
23
+ type: Boolean,
24
+ default: !0
25
+ },
26
+ appendToBody: {
27
+ type: Boolean,
28
+ default: !0
29
+ },
30
+ closeOnClickOutside: {
31
+ type: Boolean,
32
+ default: !0
33
+ },
34
+ closeOnPressEscape: {
35
+ type: Boolean,
36
+ default: !0
37
+ }
38
+ };
39
+ export {
40
+ e as dialogProps
41
+ };
@@ -0,0 +1,5 @@
1
+ import "./dialog.vue_vue_type_script_setup_true_name_CDialog_lang.js";
2
+ import { default as t } from "./dialog.vue_vue_type_script_setup_true_name_CDialog_lang.js";
3
+ export {
4
+ t as default
5
+ };
@@ -0,0 +1,37 @@
1
+ import type { noop } from '../../_internal';
2
+ import type { DefineComponent, Ref, ComputedRef, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes } from 'vue';
3
+ declare const _sfc_main: DefineComponent<{}, {
4
+ props: any;
5
+ emits: {
6
+ (e: 'update:modelValue', value: boolean): void;
7
+ (e: 'open'): void;
8
+ (e: 'close'): void;
9
+ (e: 'before-open'): void;
10
+ (e: 'before-close'): void;
11
+ };
12
+ dialogRef: Ref<any>;
13
+ zIndex: ComputedRef<number | undefined>;
14
+ className: ComputedRef<string[]>;
15
+ modelVisible: any;
16
+ close: () => void;
17
+ activate: typeof noop;
18
+ deactivate: typeof noop;
19
+ visibleWatchers: Set<(value: any, oldValue?: any) => void>;
20
+ maskTransitionMethods: {
21
+ onBeforeEnter(): void;
22
+ onBeforeLeave(): void;
23
+ onEnter(): void;
24
+ onLeave(): void;
25
+ };
26
+ modalTransitionMethods: {
27
+ onAfterEnter(): void;
28
+ onAfterLeave(): void;
29
+ };
30
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("update:modelValue" | "open" | "close" | "before-open" | "before-close")[], "update:modelValue" | "open" | "close" | "before-open" | "before-close", VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{}>> & {
31
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
32
+ onOpen?: ((...args: any[]) => any) | undefined;
33
+ onClose?: ((...args: any[]) => any) | undefined;
34
+ "onBefore-open"?: ((...args: any[]) => any) | undefined;
35
+ "onBefore-close"?: ((...args: any[]) => any) | undefined;
36
+ }, {}>;
37
+ export default _sfc_main;
@@ -0,0 +1,143 @@
1
+ import { defineComponent as w, ref as v, computed as S, openBlock as s, createBlock as O, Teleport as D, createVNode as b, Transition as y, mergeProps as h, withCtx as k, withDirectives as g, createElementVNode as f, normalizeClass as I, unref as x, normalizeStyle as P, createElementBlock as i, renderSlot as r, createTextVNode as V, toDisplayString as C, createCommentVNode as a, vShow as E } from "vue";
2
+ import { dialogProps as A } from "./constraints.js";
3
+ import { getFilledClassNames as M } from "../../_utils/styles.js";
4
+ import { createWatchers as R } from "../../_utils/watchers.js";
5
+ import { useFocusTrap as W } from "../../_hooks/use-focus-trap/index.js";
6
+ import { useZIndex as j } from "../../_hooks/use-z-index/index.js";
7
+ import { onClickOutside as F } from "@vueuse/core";
8
+ const Z = ["aria-labelledby", "aria-describedby"], q = { class: "px-dialog--header" }, G = {
9
+ key: 0,
10
+ class: "px-dialog--text"
11
+ }, H = {
12
+ key: 1,
13
+ class: "px-dialog--description"
14
+ }, J = {
15
+ key: 0,
16
+ class: "px-dialog--content"
17
+ }, K = {
18
+ key: 1,
19
+ class: "px-dialog--footer"
20
+ }, Q = w({
21
+ name: "CDialog"
22
+ }), le = /* @__PURE__ */ w({
23
+ ...Q,
24
+ props: A,
25
+ emits: ["update:modelValue", "open", "close", "before-open", "before-close"],
26
+ setup(T, { emit: l }) {
27
+ const o = T, d = v(), $ = j(), L = S(() => ["px-dialog", M("fixed flex-col items-center justify-center")]), n = v(o.modelValue), c = () => {
28
+ l("update:modelValue", !1);
29
+ }, { activate: _, deactivate: B } = W(d), p = R(() => o.modelValue, {
30
+ initialValue: [(e) => e ? _() : B()]
31
+ });
32
+ if (o.lockScroll && p.add((e) => {
33
+ if (e) {
34
+ document.body.classList.add("px-overflow-hidden");
35
+ return;
36
+ }
37
+ setTimeout(() => {
38
+ document.body.classList.remove("px-overflow-hidden");
39
+ }, 200);
40
+ }), o.closeOnClickOutside) {
41
+ let e;
42
+ p.add((t) => {
43
+ if (!t) {
44
+ e == null || e(), e = null;
45
+ return;
46
+ }
47
+ e = F(d, c);
48
+ });
49
+ }
50
+ if (o.closeOnPressEscape) {
51
+ const e = (t) => {
52
+ t.key === "Escape" && c();
53
+ };
54
+ p.add((t) => {
55
+ t ? document.addEventListener("keydown", e) : document.removeEventListener("keydown", e);
56
+ });
57
+ }
58
+ const N = {
59
+ onBeforeEnter() {
60
+ l("before-open");
61
+ },
62
+ onBeforeLeave() {
63
+ l("before-close");
64
+ },
65
+ onEnter() {
66
+ n.value = !0;
67
+ },
68
+ onLeave() {
69
+ n.value = !1;
70
+ }
71
+ }, z = {
72
+ onAfterEnter() {
73
+ l("open");
74
+ },
75
+ onAfterLeave() {
76
+ l("close");
77
+ }
78
+ };
79
+ return (e, t) => (s(), O(D, {
80
+ to: "body",
81
+ disabled: !o.appendToBody
82
+ }, [
83
+ b(y, h({ name: "px-fade" }, N), {
84
+ default: k(() => [
85
+ g(f("div", {
86
+ class: I(x(L)),
87
+ style: P({ zIndex: x($) })
88
+ }, [
89
+ b(y, h({ name: "px-zoom" }, z), {
90
+ default: k(() => {
91
+ var u, m;
92
+ return [
93
+ g(f("div", {
94
+ ref_key: "dialogRef",
95
+ ref: d,
96
+ tabindex: "0",
97
+ role: "dialog",
98
+ "aria-labelledby": e.title,
99
+ "aria-describedby": e.description,
100
+ class: "px-dialog--inner px-relative px-flex-col"
101
+ }, [
102
+ f("div", q, [
103
+ ((u = e.$slots.title) != null ? u : e.title) ? (s(), i("span", G, [
104
+ r(e.$slots, "title", {}, () => [
105
+ V(C(e.title), 1)
106
+ ])
107
+ ])) : a("", !0),
108
+ ((m = e.$slots.description) != null ? m : e.description) ? (s(), i("p", H, [
109
+ r(e.$slots, "description", {}, () => [
110
+ V(C(e.description), 1)
111
+ ])
112
+ ])) : a("", !0),
113
+ e.showClose ? (s(), i("button", {
114
+ key: 2,
115
+ class: "px-dialog--close px-absolute px-transition",
116
+ onClick: c
117
+ })) : a("", !0)
118
+ ]),
119
+ e.$slots.default ? (s(), i("div", J, [
120
+ r(e.$slots, "default")
121
+ ])) : a("", !0),
122
+ e.$slots.footer ? (s(), i("div", K, [
123
+ r(e.$slots, "footer")
124
+ ])) : a("", !0)
125
+ ], 8, Z), [
126
+ [E, n.value]
127
+ ])
128
+ ];
129
+ }),
130
+ _: 3
131
+ }, 16)
132
+ ], 6), [
133
+ [E, e.modelValue]
134
+ ])
135
+ ]),
136
+ _: 3
137
+ }, 16)
138
+ ], 8, ["disabled"]));
139
+ }
140
+ });
141
+ export {
142
+ le as default
143
+ };
@@ -0,0 +1,4 @@
1
+ import type { InstallableComponent } from '..';
2
+ import Icon from './src/icon.vue';
3
+ export declare const CIcon: InstallableComponent;
4
+ export default Icon;
@@ -0,0 +1,9 @@
1
+ import o from "./src/icon.vue_vue_type_script_setup_true_name_CIcon_lang.js";
2
+ import { default as a } from "./src/icon.vue_vue_type_script_setup_true_name_CIcon_lang.js";
3
+ import { withInstall as t } from "../_utils/install.js";
4
+ import "vue";
5
+ const i = t(o);
6
+ export {
7
+ i as CIcon,
8
+ a as default
9
+ };
@@ -0,0 +1,8 @@
1
+ import { type ComputedRef } from 'vue';
2
+ import type { IconProps } from '../constraints';
3
+ declare type UseIconReturnType = undefined | {
4
+ color: string;
5
+ fontSize: string | undefined;
6
+ };
7
+ export declare function useIcon(props: IconProps): ComputedRef<UseIconReturnType>;
8
+ export {};
@@ -0,0 +1,15 @@
1
+ import { computed as n } from "vue";
2
+ import { appendCSSUnit as e } from "../../../_utils/styles.js";
3
+ function u(t) {
4
+ return n(() => {
5
+ const { size: o, color: r } = t;
6
+ if (!(!o && !r))
7
+ return {
8
+ color: r,
9
+ fontSize: e(o)
10
+ };
11
+ });
12
+ }
13
+ export {
14
+ u as useIcon
15
+ };
@@ -0,0 +1,14 @@
1
+ import type { ExtractPropTypes, PropType } from 'vue';
2
+ import type Icon from './icon.vue';
3
+ export declare const iconProps: {
4
+ size: {
5
+ type: PropType<`${number}px` | `${number}rem` | `${number}em` | `${number}vw` | `${number}vh` | `${number}vmin` | `${number}vmax`>;
6
+ default: null;
7
+ };
8
+ color: {
9
+ type: StringConstructor;
10
+ default: null;
11
+ };
12
+ };
13
+ export declare type IconProps = ExtractPropTypes<typeof iconProps>;
14
+ export declare type IconInstance = InstanceType<typeof Icon>;
@@ -0,0 +1,13 @@
1
+ const t = {
2
+ size: {
3
+ type: String,
4
+ default: null
5
+ },
6
+ color: {
7
+ type: String,
8
+ default: null
9
+ }
10
+ };
11
+ export {
12
+ t as iconProps
13
+ };
@@ -0,0 +1,5 @@
1
+ import "./icon.vue_vue_type_script_setup_true_name_CIcon_lang.js";
2
+ import { default as t } from "./icon.vue_vue_type_script_setup_true_name_CIcon_lang.js";
3
+ export {
4
+ t as default
5
+ };
@@ -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,24 @@
1
+ import { defineComponent as e, openBlock as t, createElementBlock as s, normalizeStyle as i, unref as l, renderSlot as p } from "vue";
2
+ import { useIcon as c } from "./composables/use-icon.js";
3
+ import { iconProps as a } from "./constraints.js";
4
+ const m = e({
5
+ name: "CIcon"
6
+ }), h = /* @__PURE__ */ e({
7
+ ...m,
8
+ props: a,
9
+ setup(o) {
10
+ const n = c(o);
11
+ return (r, f) => (t(), s("i", {
12
+ role: "img",
13
+ class: "px-icon px-empty-hidden",
14
+ "aria-label": "icon",
15
+ "aria-hidden": "true",
16
+ style: i(l(n))
17
+ }, [
18
+ p(r.$slots, "default")
19
+ ], 4));
20
+ }
21
+ });
22
+ export {
23
+ h as default
24
+ };
@@ -0,0 +1,18 @@
1
+ import type { Sizes } from './_types/props';
2
+ import type { App } from 'vue';
3
+ export * from './_types';
4
+ export * from './button';
5
+ export * from './dialog';
6
+ export * from './icon';
7
+ export * from './input';
8
+ export * from './provider';
9
+ export * from './spinner';
10
+ export * from './switch';
11
+ export * from './space';
12
+ export * from './checkbox';
13
+ export * from './radio';
14
+ export { default as PxResolver } from './resolver';
15
+ export interface GlobalConfig {
16
+ size: Sizes;
17
+ }
18
+ export default function install(app: App, globalConfig?: GlobalConfig): App;