@phila/phila-ui-core 1.0.24 → 1.0.25-beta.0
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/README.md +79 -0
- package/dist/components.css +1 -0
- package/dist/components.d.ts +129 -0
- package/dist/components.js +1 -0
- package/dist/components.mjs +111 -0
- package/dist/composables.d.ts +27 -0
- package/dist/composables.js +1 -0
- package/dist/composables.mjs +5 -0
- package/dist/index-BoaHzp_d.js +5 -0
- package/dist/index-C8jyC31H.mjs +1724 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.js +1 -0
- package/dist/index.mjs +4 -0
- package/dist/styles/template-blue.css +40 -0
- package/dist/styles/template-orange.css +40 -0
- package/dist/styles/variables.css +14 -0
- package/dist/utils.d.ts +37 -0
- package/dist/utils.js +1 -0
- package/dist/utils.mjs +6 -0
- package/package.json +58 -35
- package/LICENSE +0 -21
- package/dist/images/phila-small-logo.svg +0 -10
- package/dist/phila-ui-core.js +0 -2672
- package/dist/phila-ui-core.umd.cjs +0 -1
- package/dist/styles/scss/all.scss +0 -34
- package/dist/styles/scss/base.scss +0 -53
- package/dist/styles/scss/buttons.scss +0 -239
- package/dist/styles/scss/colors.scss +0 -72
- package/dist/styles/scss/content.scss +0 -103
- package/dist/styles/scss/deprecated/all.scss +0 -6
- package/dist/styles/scss/deprecated/buttons.scss +0 -135
- package/dist/styles/scss/deprecated/content-padding.scss +0 -3
- package/dist/styles/scss/deprecated/headings.scss +0 -112
- package/dist/styles/scss/deprecated/links.scss +0 -32
- package/dist/styles/scss/deprecated/table.scss +0 -15
- package/dist/styles/scss/deprecated/tabs.scss +0 -14
- package/dist/styles/scss/derived-colors.scss +0 -14
- package/dist/styles/scss/fonts.scss +0 -71
- package/dist/styles/scss/functions.scss +0 -57
- package/dist/styles/scss/headings.scss +0 -10
- package/dist/styles/scss/helpers.scss +0 -4
- package/dist/styles/scss/inputs.scss +0 -350
- package/dist/styles/scss/mixins.scss +0 -220
- package/dist/styles/scss/table.scss +0 -10
- package/dist/styles/scss/textbox-inputs.scss +0 -29
- package/dist/styles/scss/variables.scss +0 -86
- package/dist/styles/scss/vendors/vendors.scss +0 -1
- package/dist/styles/scss/vendors/vue-good-table.scss +0 -15
- package/dist/types.d.ts +0 -105
package/README.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# @phila/phila-ui-core
|
|
2
|
+
|
|
3
|
+
Core utilities and styles for the Phila UI library. This package provides shared TypeScript utilities and design tokens for testing purposes.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Design Tokens**: Essential colors, spacing, typography, and border radius
|
|
8
|
+
- **TypeScript Utilities**: Class name utilities and type definitions
|
|
9
|
+
- **Type Safety**: Full TypeScript support with comprehensive type definitions
|
|
10
|
+
- **Vanilla CSS**: Pure CSS approach without external dependencies
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
pnpm add @phila/phila-ui-core
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
### Design Tokens
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import { colors, spacing, typography, borderRadius } from "@phila/phila-ui-core";
|
|
24
|
+
|
|
25
|
+
// Use design tokens in your styles
|
|
26
|
+
const buttonStyles = {
|
|
27
|
+
backgroundColor: colors.primary[500],
|
|
28
|
+
padding: spacing[4],
|
|
29
|
+
fontSize: typography.fontSizes.base,
|
|
30
|
+
borderRadius: borderRadius.md,
|
|
31
|
+
};
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Class Name Utilities
|
|
35
|
+
|
|
36
|
+
```typescript
|
|
37
|
+
import { cn } from "@phila/phila-ui-core";
|
|
38
|
+
|
|
39
|
+
// Combine class names efficiently
|
|
40
|
+
const buttonClass = cn("base-button", "active", className);
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Type Definitions
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
import type { Size, Color, Variant, StyledProps } from "@phila/phila-ui-core";
|
|
47
|
+
|
|
48
|
+
interface ButtonProps extends StyledProps {
|
|
49
|
+
children: React.ReactNode;
|
|
50
|
+
onClick?: () => void;
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Design Tokens
|
|
55
|
+
|
|
56
|
+
### Colors
|
|
57
|
+
|
|
58
|
+
- **Primary**: Blue shades for main actions
|
|
59
|
+
- **Secondary**: Gray shades for secondary actions
|
|
60
|
+
|
|
61
|
+
### Spacing
|
|
62
|
+
|
|
63
|
+
Essential spacing scale: `2`, `4`, `6` (0.5rem, 1rem, 1.5rem)
|
|
64
|
+
|
|
65
|
+
### Typography
|
|
66
|
+
|
|
67
|
+
- **Font Sizes**: sm, base, lg
|
|
68
|
+
|
|
69
|
+
### Border Radius
|
|
70
|
+
|
|
71
|
+
- **Sizes**: base, md
|
|
72
|
+
|
|
73
|
+
## TypeScript Support
|
|
74
|
+
|
|
75
|
+
The package includes TypeScript definitions for all utilities and design tokens.
|
|
76
|
+
|
|
77
|
+
## License
|
|
78
|
+
|
|
79
|
+
MIT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[data-v-caba8dd2]{color:red;font-size:12px}[data-v-00c91174]{font-weight:700}[data-v-751bf20e] input{border:solid 4px var(--color-primary)}[data-v-751bf20e] input.invalid{border:solid 4px var(--color-danger)}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { ComponentOptionsMixin } from 'vue';
|
|
2
|
+
import { ComponentProvideOptions } from 'vue';
|
|
3
|
+
import { DefineComponent } from 'vue';
|
|
4
|
+
import { ExtractPropTypes } from 'vue';
|
|
5
|
+
import { PropType } from 'vue';
|
|
6
|
+
import { PublicProps } from 'vue';
|
|
7
|
+
|
|
8
|
+
declare const __VLS_component: DefineComponent<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_2<InputWrapProps>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
9
|
+
"update:modelValue": (value: string) => void;
|
|
10
|
+
input: (value: string) => void;
|
|
11
|
+
change: (value: string) => void;
|
|
12
|
+
focus: () => void;
|
|
13
|
+
blur: () => void;
|
|
14
|
+
keydown: () => void;
|
|
15
|
+
keyup: () => void;
|
|
16
|
+
keypress: () => void;
|
|
17
|
+
error: (errors: string[] | undefined) => void;
|
|
18
|
+
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_2<InputWrapProps>>> & Readonly<{
|
|
19
|
+
onError?: ((errors: string[] | undefined) => any) | undefined;
|
|
20
|
+
onInput?: ((value: string) => any) | undefined;
|
|
21
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
22
|
+
onChange?: ((value: string) => any) | undefined;
|
|
23
|
+
onFocus?: (() => any) | undefined;
|
|
24
|
+
onBlur?: (() => any) | undefined;
|
|
25
|
+
onKeydown?: (() => any) | undefined;
|
|
26
|
+
onKeyup?: (() => any) | undefined;
|
|
27
|
+
onKeypress?: (() => any) | undefined;
|
|
28
|
+
}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
29
|
+
|
|
30
|
+
declare const __VLS_component_2: DefineComponent<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_3<LabelProps>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_3<LabelProps>>> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
31
|
+
|
|
32
|
+
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
33
|
+
|
|
34
|
+
declare type __VLS_NonUndefinedable_2<T> = T extends undefined ? never : T;
|
|
35
|
+
|
|
36
|
+
declare type __VLS_NonUndefinedable_3<T> = T extends undefined ? never : T;
|
|
37
|
+
|
|
38
|
+
declare function __VLS_template(): {
|
|
39
|
+
default?(_: {
|
|
40
|
+
inputValue: string;
|
|
41
|
+
onBlur: () => void;
|
|
42
|
+
onFocus: () => void;
|
|
43
|
+
onInput: (event: Event) => string;
|
|
44
|
+
isValid: boolean;
|
|
45
|
+
inputClasses: {
|
|
46
|
+
invalid: boolean;
|
|
47
|
+
};
|
|
48
|
+
}): any;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
declare function __VLS_template_2(): {
|
|
52
|
+
default?(_: {}): any;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
56
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
57
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
58
|
+
} : {
|
|
59
|
+
type: PropType<T[K]>;
|
|
60
|
+
required: true;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
declare type __VLS_TypePropsToRuntimeProps_2<T> = {
|
|
65
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
66
|
+
type: PropType<__VLS_NonUndefinedable_2<T[K]>>;
|
|
67
|
+
} : {
|
|
68
|
+
type: PropType<T[K]>;
|
|
69
|
+
required: true;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
declare type __VLS_TypePropsToRuntimeProps_3<T> = {
|
|
74
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
75
|
+
type: PropType<__VLS_NonUndefinedable_3<T[K]>>;
|
|
76
|
+
} : {
|
|
77
|
+
type: PropType<T[K]>;
|
|
78
|
+
required: true;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
83
|
+
new (): {
|
|
84
|
+
$slots: S;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
declare type __VLS_WithTemplateSlots_2<T, S> = T & {
|
|
89
|
+
new (): {
|
|
90
|
+
$slots: S;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
declare interface BaseProps {
|
|
95
|
+
className?: string;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export declare const ErrorList: DefineComponent<ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ValidationProps>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ValidationProps>>> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
99
|
+
|
|
100
|
+
export declare const InputLabel: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, ReturnType<typeof __VLS_template_2>>;
|
|
101
|
+
|
|
102
|
+
declare interface InputProps {
|
|
103
|
+
id: string;
|
|
104
|
+
name: string;
|
|
105
|
+
placeholder?: string;
|
|
106
|
+
label?: string;
|
|
107
|
+
icon?: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export declare const InputWrap: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
111
|
+
|
|
112
|
+
declare type InputWrapProps = InputProps & LabelProps & ValidationProps & BaseProps;
|
|
113
|
+
|
|
114
|
+
declare interface LabelProps {
|
|
115
|
+
id: string;
|
|
116
|
+
required?: boolean;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
declare interface ValidationProps {
|
|
120
|
+
errors?: string[];
|
|
121
|
+
validateOnBlur?: boolean;
|
|
122
|
+
validateOnInput?: boolean;
|
|
123
|
+
validateOnChange?: boolean;
|
|
124
|
+
validateOnMount?: boolean;
|
|
125
|
+
validate?: (value: string) => boolean | string | string[];
|
|
126
|
+
required?: boolean;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export { }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components.css');const e=require("./index-BoaHzp_d.js"),y={key:0,class:"input-errors"},k=e.defineComponent({__name:"ErrorList",props:{errors:{},validateOnBlur:{type:Boolean},validateOnInput:{type:Boolean},validateOnChange:{type:Boolean},validateOnMount:{type:Boolean},validate:{type:Function},required:{type:Boolean}},setup(o){const{errors:a,isValid:r}=e.useValidation(),n=o,t=e.computed(()=>Object.assign([],a.value,n.errors||[]));return(l,c)=>!e.unref(r)&&t.value?.length?(e.openBlock(),e.createElementBlock("div",y,[e.createBaseVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(u,i)=>(e.openBlock(),e.createElementBlock("li",{key:i},e.toDisplayString(u),1))),128))])])):e.createCommentVNode("",!0)}}),d=(o,a)=>{const r=o.__vccOpts||o;for(const[n,t]of a)r[n]=t;return r},p=d(k,[["__scopeId","data-v-caba8dd2"]]),O=["for"],I={key:0,class:"required"},b=e.defineComponent({__name:"InputLabel",props:{id:{},required:{type:Boolean}},setup(o){return(a,r)=>(e.openBlock(),e.createElementBlock("label",{class:"input-label",for:a.id},[e.renderSlot(a.$slots,"default",{},void 0),a.required?(e.openBlock(),e.createElementBlock("span",I,"*")):e.createCommentVNode("",!0)],8,O))}}),v=d(b,[["__scopeId","data-v-00c91174"]]),h=e.defineComponent({inheritAttrs:!1,__name:"InputWrap",props:{id:{},name:{},placeholder:{},label:{},icon:{},required:{type:Boolean},errors:{},validateOnBlur:{type:Boolean},validateOnInput:{type:Boolean},validateOnChange:{type:Boolean},validateOnMount:{type:Boolean},validate:{type:Function},className:{}},emits:["update:modelValue","input","change","focus","blur","keydown","keyup","keypress","error"],setup(o,{emit:a}){const{setInputValue:r}=e.useInput(),n=e.ref(""),t=o,l=a,{init:c,isValid:u,validation:i}=e.useValidation({validateOnMount:t.validateOnMount??!0,validateOnInput:t.validateOnInput??!0,validateOnBlur:t.validateOnBlur??!0,validateOnChange:t.validateOnChange??!0,required:t.required??!1,errors:t.errors||[],validate:t.validate},l),m=e.computed(()=>({invalid:!u.value})),B=s=>(n.value=s.target.value,l("update:modelValue",n.value),l("input",n.value),r(n.value),t.validateOnInput&&i(),n.value),_=()=>{t.validateOnBlur&&i(),l("blur")},f=()=>{l("focus")};return e.onBeforeMount(()=>{c()}),e.onMounted(()=>{t.validateOnMount&&i()}),(s,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["input-wrap",{hasError:!e.unref(u)}])},[t.label?(e.openBlock(),e.createBlock(v,{key:0,id:t.id,required:t.required},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:1},8,["id","required"])):e.createCommentVNode("",!0),e.renderSlot(s.$slots,"default",e.normalizeProps(e.guardReactiveProps({inputValue:n.value,onBlur:_,onFocus:f,onInput:B,isValid:e.unref(u),inputClasses:m.value})),void 0),e.createVNode(p)],2))}}),V=d(h,[["__scopeId","data-v-751bf20e"]]);exports.ErrorList=p;exports.InputLabel=v;exports.InputWrap=V;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { d as c, u as m, c as y, a as l, b as v, e as p, o, f as V, F as k, r as q, t as B, g as O, h as C, i as M, j as E, k as F, l as L, m as N, n as $, p as w, q as x, w as j, s as z } from "./index-C8jyC31H.mjs";
|
|
2
|
+
import './components.css';const P = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "input-errors"
|
|
5
|
+
}, S = /* @__PURE__ */ c({
|
|
6
|
+
__name: "ErrorList",
|
|
7
|
+
props: {
|
|
8
|
+
errors: {},
|
|
9
|
+
validateOnBlur: { type: Boolean },
|
|
10
|
+
validateOnInput: { type: Boolean },
|
|
11
|
+
validateOnChange: { type: Boolean },
|
|
12
|
+
validateOnMount: { type: Boolean },
|
|
13
|
+
validate: { type: Function },
|
|
14
|
+
required: { type: Boolean }
|
|
15
|
+
},
|
|
16
|
+
setup(n) {
|
|
17
|
+
const { errors: t, isValid: r } = m(), a = n, e = y(() => Object.assign([], t.value, a.errors || []));
|
|
18
|
+
return (s, f) => !p(r) && e.value?.length ? (o(), l("div", P, [
|
|
19
|
+
V("ul", null, [
|
|
20
|
+
(o(!0), l(k, null, q(e.value, (u, i) => (o(), l("li", { key: i }, B(u), 1))), 128))
|
|
21
|
+
])
|
|
22
|
+
])) : v("", !0);
|
|
23
|
+
}
|
|
24
|
+
}), _ = (n, t) => {
|
|
25
|
+
const r = n.__vccOpts || n;
|
|
26
|
+
for (const [a, e] of t)
|
|
27
|
+
r[a] = e;
|
|
28
|
+
return r;
|
|
29
|
+
}, W = /* @__PURE__ */ _(S, [["__scopeId", "data-v-caba8dd2"]]), A = ["for"], D = {
|
|
30
|
+
key: 0,
|
|
31
|
+
class: "required"
|
|
32
|
+
}, R = /* @__PURE__ */ c({
|
|
33
|
+
__name: "InputLabel",
|
|
34
|
+
props: {
|
|
35
|
+
id: {},
|
|
36
|
+
required: { type: Boolean }
|
|
37
|
+
},
|
|
38
|
+
setup(n) {
|
|
39
|
+
return (t, r) => (o(), l("label", {
|
|
40
|
+
class: "input-label",
|
|
41
|
+
for: t.id
|
|
42
|
+
}, [
|
|
43
|
+
O(t.$slots, "default", {}, void 0),
|
|
44
|
+
t.required ? (o(), l("span", D, "*")) : v("", !0)
|
|
45
|
+
], 8, A));
|
|
46
|
+
}
|
|
47
|
+
}), T = /* @__PURE__ */ _(R, [["__scopeId", "data-v-00c91174"]]), G = /* @__PURE__ */ c({
|
|
48
|
+
inheritAttrs: !1,
|
|
49
|
+
__name: "InputWrap",
|
|
50
|
+
props: {
|
|
51
|
+
id: {},
|
|
52
|
+
name: {},
|
|
53
|
+
placeholder: {},
|
|
54
|
+
label: {},
|
|
55
|
+
icon: {},
|
|
56
|
+
required: { type: Boolean },
|
|
57
|
+
errors: {},
|
|
58
|
+
validateOnBlur: { type: Boolean },
|
|
59
|
+
validateOnInput: { type: Boolean },
|
|
60
|
+
validateOnChange: { type: Boolean },
|
|
61
|
+
validateOnMount: { type: Boolean },
|
|
62
|
+
validate: { type: Function },
|
|
63
|
+
className: {}
|
|
64
|
+
},
|
|
65
|
+
emits: ["update:modelValue", "input", "change", "focus", "blur", "keydown", "keyup", "keypress", "error"],
|
|
66
|
+
setup(n, { emit: t }) {
|
|
67
|
+
const { setInputValue: r } = C(), a = M(""), e = n, s = t, { init: f, isValid: u, validation: i } = m(
|
|
68
|
+
{
|
|
69
|
+
validateOnMount: e.validateOnMount ?? !0,
|
|
70
|
+
validateOnInput: e.validateOnInput ?? !0,
|
|
71
|
+
validateOnBlur: e.validateOnBlur ?? !0,
|
|
72
|
+
validateOnChange: e.validateOnChange ?? !0,
|
|
73
|
+
required: e.required ?? !1,
|
|
74
|
+
errors: e.errors || [],
|
|
75
|
+
validate: e.validate
|
|
76
|
+
},
|
|
77
|
+
s
|
|
78
|
+
), h = y(() => ({
|
|
79
|
+
invalid: !u.value
|
|
80
|
+
})), I = (d) => (a.value = d.target.value, s("update:modelValue", a.value), s("input", a.value), r(a.value), e.validateOnInput && i(), a.value), b = () => {
|
|
81
|
+
e.validateOnBlur && i(), s("blur");
|
|
82
|
+
}, g = () => {
|
|
83
|
+
s("focus");
|
|
84
|
+
};
|
|
85
|
+
return E(() => {
|
|
86
|
+
f();
|
|
87
|
+
}), F(() => {
|
|
88
|
+
e.validateOnMount && i();
|
|
89
|
+
}), (d, H) => (o(), l("div", {
|
|
90
|
+
class: x(["input-wrap", { hasError: !p(u) }])
|
|
91
|
+
}, [
|
|
92
|
+
e.label ? (o(), L(T, {
|
|
93
|
+
key: 0,
|
|
94
|
+
id: e.id,
|
|
95
|
+
required: e.required
|
|
96
|
+
}, {
|
|
97
|
+
default: j(() => [
|
|
98
|
+
z(B(e.label), 1)
|
|
99
|
+
]),
|
|
100
|
+
_: 1
|
|
101
|
+
}, 8, ["id", "required"])) : v("", !0),
|
|
102
|
+
O(d.$slots, "default", $(w({ inputValue: a.value, onBlur: b, onFocus: g, onInput: I, isValid: p(u), inputClasses: h.value })), void 0),
|
|
103
|
+
N(W)
|
|
104
|
+
], 2));
|
|
105
|
+
}
|
|
106
|
+
}), K = /* @__PURE__ */ _(G, [["__scopeId", "data-v-751bf20e"]]);
|
|
107
|
+
export {
|
|
108
|
+
W as ErrorList,
|
|
109
|
+
T as InputLabel,
|
|
110
|
+
K as InputWrap
|
|
111
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
import { defineEmits as defineEmits_2 } from 'vue';
|
|
3
|
+
import { Ref } from 'vue';
|
|
4
|
+
|
|
5
|
+
export declare function useInput(): {
|
|
6
|
+
inputValue: Ref<string, string>;
|
|
7
|
+
setInputValue: (value: string) => void;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export declare function useValidation(props?: ValidationProps, emit?: ReturnType<typeof defineEmits_2>): {
|
|
11
|
+
init: () => void;
|
|
12
|
+
validation: () => void;
|
|
13
|
+
isValid: ComputedRef<boolean>;
|
|
14
|
+
errors: ComputedRef<string[]>;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
declare interface ValidationProps {
|
|
18
|
+
errors?: string[];
|
|
19
|
+
validateOnBlur?: boolean;
|
|
20
|
+
validateOnInput?: boolean;
|
|
21
|
+
validateOnChange?: boolean;
|
|
22
|
+
validateOnMount?: boolean;
|
|
23
|
+
validate?: (value: string) => boolean | string | string[];
|
|
24
|
+
required?: boolean;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BoaHzp_d.js");exports.useInput=e.useInput;exports.useValidation=e.useValidation;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";function Yt(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Ce=process.env.NODE_ENV!=="production"?Object.freeze({}):{},Jt=process.env.NODE_ENV!=="production"?Object.freeze([]):[],ot=()=>{},Gt=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),F=Object.assign,Qt=Object.prototype.hasOwnProperty,Ie=(e,t)=>Qt.call(e,t),_=Array.isArray,B=e=>ye(e)==="[object Map]",Xt=e=>ye(e)==="[object Set]",b=e=>typeof e=="function",V=e=>typeof e=="string",k=e=>typeof e=="symbol",v=e=>e!==null&&typeof e=="object",Zt=e=>(v(e)||b(e))&&b(e.then)&&b(e.catch),it=Object.prototype.toString,ye=e=>it.call(e),ct=e=>ye(e).slice(8,-1),en=e=>ye(e)==="[object Object]",je=e=>V(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,lt=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},at=lt(e=>e.charAt(0).toUpperCase()+e.slice(1)),tn=lt(e=>e?`on${at(e)}`:""),W=(e,t)=>!Object.is(e,t);let Qe;const be=()=>Qe||(Qe=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ne(e){if(_(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=V(s)?on(s):Ne(s);if(r)for(const o in r)t[o]=r[o]}return t}else if(V(e)||v(e))return e}const nn=/;(?![^(]*\))/g,rn=/:([^]+)/,sn=/\/\*[^]*?\*\//g;function on(e){const t={};return e.replace(sn,"").split(nn).forEach(n=>{if(n){const s=n.split(rn);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function re(e){let t="";if(V(e))t=e;else if(_(e))for(let n=0;n<e.length;n++){const s=re(e[n]);s&&(t+=s+" ")}else if(v(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function cn(e){if(!e)return null;let{class:t,style:n}=e;return t&&!V(t)&&(e.class=re(t)),n&&(e.style=Ne(n)),e}const ut=e=>!!(e&&e.__v_isRef===!0),ft=e=>V(e)?e:e==null?"":_(e)||v(e)&&(e.toString===it||!b(e.toString))?ut(e)?ft(e.value):JSON.stringify(e,dt,2):String(e),dt=(e,t)=>ut(t)?dt(e,t.value):B(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],o)=>(n[Oe(s,o)+" =>"]=r,n),{})}:Xt(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Oe(n))}:k(t)?Oe(t):v(t)&&!_(t)&&!en(t)?String(t):t,Oe=(e,t="")=>{var n;return k(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};function L(e,...t){}let h,pt=0,Q,X;function ln(e,t=!1){if(e.flags|=8,t){e.next=X,X=e;return}e.next=Q,Q=e}function Le(){pt++}function Ke(){if(--pt>0)return;if(X){let t=X;for(X=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Q;){let t=Q;for(Q=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function an(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function un(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),_t(s),dn(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function fn(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ht(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function ht(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Z)||(e.globalVersion=Z,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!fn(e))))return;e.flags|=2;const t=e.dep,n=h,s=P;h=e,P=!0;try{an(e);const r=e.fn(e._value);(t.version===0||W(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{h=n,P=s,un(e),e.flags&=-3}}function _t(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),process.env.NODE_ENV!=="production"&&n.subsHead===e&&(n.subsHead=r),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)_t(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function dn(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let P=!0;const gt=[];function se(){gt.push(P),P=!1}function oe(){const e=gt.pop();P=e===void 0?!0:e}let Z=0;class pn{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class ze{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0,process.env.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(t){if(!h||!P||h===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==h)n=this.activeLink=new pn(h,this),h.deps?(n.prevDep=h.depsTail,h.depsTail.nextDep=n,h.depsTail=n):h.deps=h.depsTail=n,mt(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=h.depsTail,n.nextDep=void 0,h.depsTail.nextDep=n,h.depsTail=n,h.deps===n&&(h.deps=s)}return process.env.NODE_ENV!=="production"&&h.onTrack&&h.onTrack(F({effect:h},t)),n}trigger(t){this.version++,Z++,this.notify(t)}notify(t){Le();try{if(process.env.NODE_ENV!=="production")for(let n=this.subsHead;n;n=n.nextSub)n.sub.onTrigger&&!(n.sub.flags&8)&&n.sub.onTrigger(F({effect:n.sub},t));for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Ke()}}}function mt(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)mt(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),process.env.NODE_ENV!=="production"&&e.dep.subsHead===void 0&&(e.dep.subsHead=e),e.dep.subs=e}}const Ae=new WeakMap,H=Symbol(process.env.NODE_ENV!=="production"?"Object iterate":""),Me=Symbol(process.env.NODE_ENV!=="production"?"Map keys iterate":""),ee=Symbol(process.env.NODE_ENV!=="production"?"Array iterate":"");function E(e,t,n){if(P&&h){let s=Ae.get(e);s||Ae.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new ze),r.map=s,r.key=n),process.env.NODE_ENV!=="production"?r.track({target:e,type:t,key:n}):r.track()}}function M(e,t,n,s,r,o){const c=Ae.get(e);if(!c){Z++;return}const i=a=>{a&&(process.env.NODE_ENV!=="production"?a.trigger({target:e,type:t,key:n,newValue:s,oldValue:r,oldTarget:o}):a.trigger())};if(Le(),t==="clear")c.forEach(i);else{const a=_(e),f=a&&je(n);if(a&&n==="length"){const d=Number(s);c.forEach((l,u)=>{(u==="length"||u===ee||!k(u)&&u>=d)&&i(l)})}else switch((n!==void 0||c.has(void 0))&&i(c.get(n)),f&&i(c.get(ee)),t){case"add":a?f&&i(c.get("length")):(i(c.get(H)),B(e)&&i(c.get(Me)));break;case"delete":a||(i(c.get(H)),B(e)&&i(c.get(Me)));break;case"set":B(e)&&i(c.get(H));break}}Ke()}function K(e){const t=p(e);return t===e?t:(E(t,"iterate",ee),O(e)?t:t.map(m))}function Se(e){return E(e=p(e),"iterate",ee),e}const hn={__proto__:null,[Symbol.iterator](){return Ve(this,Symbol.iterator,m)},concat(...e){return K(this).concat(...e.map(t=>_(t)?K(t):t))},entries(){return Ve(this,"entries",e=>(e[1]=m(e[1]),e))},every(e,t){return C(this,"every",e,t,void 0,arguments)},filter(e,t){return C(this,"filter",e,t,n=>n.map(m),arguments)},find(e,t){return C(this,"find",e,t,m,arguments)},findIndex(e,t){return C(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return C(this,"findLast",e,t,m,arguments)},findLastIndex(e,t){return C(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return C(this,"forEach",e,t,void 0,arguments)},includes(...e){return Re(this,"includes",e)},indexOf(...e){return Re(this,"indexOf",e)},join(e){return K(this).join(e)},lastIndexOf(...e){return Re(this,"lastIndexOf",e)},map(e,t){return C(this,"map",e,t,void 0,arguments)},pop(){return J(this,"pop")},push(...e){return J(this,"push",e)},reduce(e,...t){return Xe(this,"reduce",e,t)},reduceRight(e,...t){return Xe(this,"reduceRight",e,t)},shift(){return J(this,"shift")},some(e,t){return C(this,"some",e,t,void 0,arguments)},splice(...e){return J(this,"splice",e)},toReversed(){return K(this).toReversed()},toSorted(e){return K(this).toSorted(e)},toSpliced(...e){return K(this).toSpliced(...e)},unshift(...e){return J(this,"unshift",e)},values(){return Ve(this,"values",m)}};function Ve(e,t,n){const s=Se(e),r=s[t]();return s!==e&&!O(e)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.value&&(o.value=n(o.value)),o}),r}const _n=Array.prototype;function C(e,t,n,s,r,o){const c=Se(e),i=c!==e&&!O(e),a=c[t];if(a!==_n[t]){const l=a.apply(e,o);return i?m(l):l}let f=n;c!==e&&(i?f=function(l,u){return n.call(this,m(l),u,e)}:n.length>2&&(f=function(l,u){return n.call(this,l,u,e)}));const d=a.call(c,f,s);return i&&r?r(d):d}function Xe(e,t,n,s){const r=Se(e);let o=n;return r!==e&&(O(e)?n.length>3&&(o=function(c,i,a){return n.call(this,c,i,a,e)}):o=function(c,i,a){return n.call(this,c,m(i),a,e)}),r[t](o,...s)}function Re(e,t,n){const s=p(e);E(s,"iterate",ee);const r=s[t](...n);return(r===-1||r===!1)&&de(n[0])?(n[0]=p(n[0]),s[t](...n)):r}function J(e,t,n=[]){se(),Le();const s=p(e)[t].apply(e,n);return Ke(),oe(),s}const gn=Yt("__proto__,__v_isRef,__isVue"),vt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(k));function mn(e){k(e)||(e=String(e));const t=p(this);return E(t,"has",e),t.hasOwnProperty(e)}class Et{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return o;if(n==="__v_raw")return s===(r?o?Rn:Nt:o?Vn:bt).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const c=_(t);if(!r){let a;if(c&&(a=hn[n]))return a;if(n==="hasOwnProperty")return mn}const i=Reflect.get(t,n,D(t)?t:s);return(k(n)?vt.has(n):gn(n))||(r||E(t,"get",n),o)?i:D(i)?c&&je(n)?i:i.value:v(i)?r?St(i):Be(i):i}}class vn extends Et{constructor(t=!1){super(!1,t)}set(t,n,s,r){let o=t[n];if(!this._isShallow){const a=x(o);if(!O(s)&&!x(s)&&(o=p(o),s=p(s)),!_(t)&&D(o)&&!D(s))return a?(process.env.NODE_ENV!=="production"&&L(`Set operation on key "${String(n)}" failed: target is readonly.`,t[n]),!0):(o.value=s,!0)}const c=_(t)&&je(n)?Number(n)<t.length:Ie(t,n),i=Reflect.set(t,n,s,D(t)?t:r);return t===p(r)&&(c?W(s,o)&&M(t,"set",n,s,o):M(t,"add",n,s)),i}deleteProperty(t,n){const s=Ie(t,n),r=t[n],o=Reflect.deleteProperty(t,n);return o&&s&&M(t,"delete",n,void 0,r),o}has(t,n){const s=Reflect.has(t,n);return(!k(n)||!vt.has(n))&&E(t,"has",n),s}ownKeys(t){return E(t,"iterate",_(t)?"length":H),Reflect.ownKeys(t)}}class En extends Et{constructor(t=!1){super(!0,t)}set(t,n){return process.env.NODE_ENV!=="production"&&L(`Set operation on key "${String(n)}" failed: target is readonly.`,t),!0}deleteProperty(t,n){return process.env.NODE_ENV!=="production"&&L(`Delete operation on key "${String(n)}" failed: target is readonly.`,t),!0}}const yn=new vn,bn=new En,$e=e=>e,le=e=>Reflect.getPrototypeOf(e);function Nn(e,t,n){return function(...s){const r=this.__v_raw,o=p(r),c=B(o),i=e==="entries"||e===Symbol.iterator&&c,a=e==="keys"&&c,f=r[e](...s),d=n?$e:t?pe:m;return!t&&E(o,"iterate",a?Me:H),{next(){const{value:l,done:u}=f.next();return u?{value:l,done:u}:{value:i?[d(l[0]),d(l[1])]:d(l),done:u}},[Symbol.iterator](){return this}}}}function ae(e){return function(...t){if(process.env.NODE_ENV!=="production"){const n=t[0]?`on key "${t[0]}" `:"";L(`${at(e)} operation ${n}failed: target is readonly.`,p(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function Sn(e,t){const n={get(r){const o=this.__v_raw,c=p(o),i=p(r);e||(W(r,i)&&E(c,"get",r),E(c,"get",i));const{has:a}=le(c),f=t?$e:e?pe:m;if(a.call(c,r))return f(o.get(r));if(a.call(c,i))return f(o.get(i));o!==c&&o.get(r)},get size(){const r=this.__v_raw;return!e&&E(p(r),"iterate",H),r.size},has(r){const o=this.__v_raw,c=p(o),i=p(r);return e||(W(r,i)&&E(c,"has",r),E(c,"has",i)),r===i?o.has(r):o.has(r)||o.has(i)},forEach(r,o){const c=this,i=c.__v_raw,a=p(i),f=t?$e:e?pe:m;return!e&&E(a,"iterate",H),i.forEach((d,l)=>r.call(o,f(d),f(l),c))}};return F(n,e?{add:ae("add"),set:ae("set"),delete:ae("delete"),clear:ae("clear")}:{add(r){!t&&!O(r)&&!x(r)&&(r=p(r));const o=p(this);return le(o).has.call(o,r)||(o.add(r),M(o,"add",r,r)),this},set(r,o){!t&&!O(o)&&!x(o)&&(o=p(o));const c=p(this),{has:i,get:a}=le(c);let f=i.call(c,r);f?process.env.NODE_ENV!=="production"&&Ze(c,i,r):(r=p(r),f=i.call(c,r));const d=a.call(c,r);return c.set(r,o),f?W(o,d)&&M(c,"set",r,o,d):M(c,"add",r,o),this},delete(r){const o=p(this),{has:c,get:i}=le(o);let a=c.call(o,r);a?process.env.NODE_ENV!=="production"&&Ze(o,c,r):(r=p(r),a=c.call(o,r));const f=i?i.call(o,r):void 0,d=o.delete(r);return a&&M(o,"delete",r,void 0,f),d},clear(){const r=p(this),o=r.size!==0,c=process.env.NODE_ENV!=="production"?B(r)?new Map(r):new Set(r):void 0,i=r.clear();return o&&M(r,"clear",void 0,void 0,c),i}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=Nn(r,e,t)}),n}function yt(e,t){const n=Sn(e,t);return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(Ie(n,r)&&r in s?n:s,r,o)}const wn={get:yt(!1,!1)},On={get:yt(!0,!1)};function Ze(e,t,n){const s=p(n);if(s!==n&&t.call(e,s)){const r=ct(e);L(`Reactive ${r} contains both the raw and reactive versions of the same object${r==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const bt=new WeakMap,Vn=new WeakMap,Nt=new WeakMap,Rn=new WeakMap;function Dn(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function xn(e){return e.__v_skip||!Object.isExtensible(e)?0:Dn(ct(e))}function Be(e){return x(e)?e:wt(e,!1,yn,wn,bt)}function St(e){return wt(e,!0,bn,On,Nt)}function wt(e,t,n,s,r){if(!v(e))return process.env.NODE_ENV!=="production"&&L(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=xn(e);if(o===0)return e;const c=r.get(e);if(c)return c;const i=new Proxy(e,o===2?s:n);return r.set(e,i),i}function We(e){return x(e)?We(e.__v_raw):!!(e&&e.__v_isReactive)}function x(e){return!!(e&&e.__v_isReadonly)}function O(e){return!!(e&&e.__v_isShallow)}function de(e){return e?!!e.__v_raw:!1}function p(e){const t=e&&e.__v_raw;return t?p(t):e}const m=e=>v(e)?Be(e):e,pe=e=>v(e)?St(e):e;function D(e){return e?e.__v_isRef===!0:!1}function Ot(e){return Tn(e,!1)}function Tn(e,t){return D(e)?e:new Cn(e,t)}class Cn{constructor(t,n){this.dep=new ze,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:p(t),this._value=n?t:m(t),this.__v_isShallow=n}get value(){return process.env.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||O(t)||x(t);t=s?t:p(t),W(t,n)&&(this._rawValue=t,this._value=s?t:m(t),process.env.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:t,oldValue:n}):this.dep.trigger())}}function In(e){return D(e)?e.value:e}class An{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new ze(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Z-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&h!==this)return ln(this,!0),!0;process.env.NODE_ENV}get value(){const t=process.env.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track();return ht(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter?this.setter(t):process.env.NODE_ENV!=="production"&&L("Write operation failed: computed value is readonly")}}function Mn(e,t,n=!1){let s,r;b(e)?s=e:(s=e.get,r=e.set);const o=new An(s,r,n);return process.env.NODE_ENV,o}const j=[];function $n(e){j.push(e)}function Pn(){j.pop()}let De=!1;function T(e,...t){if(De)return;De=!0,se();const n=j.length?j[j.length-1].component:null,s=n&&n.appContext.config.warnHandler,r=Fn();if(s)we(s,n,11,[e+t.map(o=>{var c,i;return(i=(c=o.toString)==null?void 0:c.call(o))!=null?i:JSON.stringify(o)}).join(""),n&&n.proxy,r.map(({vnode:o})=>`at <${Wt(n,o.type)}>`).join(`
|
|
2
|
+
`),r]);else{const o=[`[Vue warn]: ${e}`,...t];r.length&&o.push(`
|
|
3
|
+
`,...kn(r))}oe(),De=!1}function Fn(){let e=j[j.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const s=e.component&&e.component.parent;e=s&&s.vnode}return t}function kn(e){const t=[];return e.forEach((n,s)=>{t.push(...s===0?[]:[`
|
|
4
|
+
`],...Hn(n))}),t}function Hn({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",s=e.component?e.component.parent==null:!1,r=` at <${Wt(e.component,e.type,s)}`,o=">"+n;return e.props?[r,...jn(e.props),o]:[r+o]}function jn(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(s=>{t.push(...Vt(s,e[s]))}),n.length>3&&t.push(" ..."),t}function Vt(e,t,n){return V(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:D(t)?(t=Vt(e,p(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):b(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=p(t),n?t:[`${e}=`,t])}const Ue={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function we(e,t,n,s){try{return s?e(...s):e()}catch(r){qe(r,t,n)}}function Rt(e,t,n,s){if(b(e)){const r=we(e,t,n,s);return r&&Zt(r)&&r.catch(o=>{qe(o,t,n)}),r}if(_(e)){const r=[];for(let o=0;o<e.length;o++)r.push(Rt(e[o],t,n,s));return r}else process.env.NODE_ENV!=="production"&&T(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`)}function qe(e,t,n,s=!0){const r=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:c}=t&&t.appContext.config||Ce;if(t){let i=t.parent;const a=t.proxy,f=process.env.NODE_ENV!=="production"?Ue[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;i;){const d=i.ec;if(d){for(let l=0;l<d.length;l++)if(d[l](e,a,f)===!1)return}i=i.parent}if(o){se(),we(o,null,10,[e,a,f]),oe();return}}Ln(e,n,r,s,c)}function Ln(e,t,n,s=!0,r=!1){if(process.env.NODE_ENV!=="production"){const o=Ue[t];if(n&&$n(n),T(`Unhandled error${o?` during execution of ${o}`:""}`),n&&Pn(),s)throw e}else if(r)throw e}const w=[];let I=-1;const U=[];let A=null,z=0;const Kn=Promise.resolve();let Pe=null;const zn=100;function Bn(e){let t=I+1,n=w.length;for(;t<n;){const s=t+n>>>1,r=w[s],o=te(r);o<e||o===e&&r.flags&2?t=s+1:n=s}return t}function Wn(e){if(!(e.flags&1)){const t=te(e),n=w[w.length-1];!n||!(e.flags&2)&&t>=te(n)?w.push(e):w.splice(Bn(t),0,e),e.flags|=1,Dt()}}function Dt(){Pe||(Pe=Kn.then(xt))}function Un(e){_(e)?U.push(...e):A&&e.id===-1?A.splice(z+1,0,e):e.flags&1||(U.push(e),e.flags|=1),Dt()}function qn(e){if(U.length){const t=[...new Set(U)].sort((n,s)=>te(n)-te(s));if(U.length=0,A){A.push(...t);return}for(A=t,process.env.NODE_ENV!=="production"&&(e=e||new Map),z=0;z<A.length;z++){const n=A[z];process.env.NODE_ENV!=="production"&&Tt(e,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}A=null,z=0}}const te=e=>e.id==null?e.flags&2?-1:1/0:e.id;function xt(e){process.env.NODE_ENV!=="production"&&(e=e||new Map);const t=process.env.NODE_ENV!=="production"?n=>Tt(e,n):ot;try{for(I=0;I<w.length;I++){const n=w[I];if(n&&!(n.flags&8)){if(process.env.NODE_ENV!=="production"&&t(n))continue;n.flags&4&&(n.flags&=-2),we(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2)}}}finally{for(;I<w.length;I++){const n=w[I];n&&(n.flags&=-2)}I=-1,w.length=0,qn(e),Pe=null,(w.length||U.length)&&xt(e)}}function Tt(e,t){const n=e.get(t)||0;if(n>zn){const s=t.i,r=s&&Bt(s.type);return qe(`Maximum recursive updates exceeded${r?` in component <${r}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}return e.set(t,n+1),!1}const xe=new Map;if(process.env.NODE_ENV!=="production"){const e=be();e.__VUE_HMR_RUNTIME__||(e.__VUE_HMR_RUNTIME__={createRecord:Te(Yn),rerender:Te(Jn),reload:Te(Gn)})}const he=new Map;function Yn(e,t){return he.has(e)?!1:(he.set(e,{initialDef:_e(t),instances:new Set}),!0)}function _e(e){return Ut(e)?e.__vccOpts:e}function Jn(e,t){const n=he.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(s=>{t&&(s.render=t,_e(s.type).render=t),s.renderCache=[],s.job.flags&8||s.update()}))}function Gn(e,t){const n=he.get(e);if(!n)return;t=_e(t),et(n.initialDef,t);const s=[...n.instances];for(let r=0;r<s.length;r++){const o=s[r],c=_e(o.type);let i=xe.get(c);i||(c!==n.initialDef&&et(c,t),xe.set(c,i=new Set)),i.add(o),o.appContext.propsCache.delete(o.type),o.appContext.emitsCache.delete(o.type),o.appContext.optionsCache.delete(o.type),o.ceReload?(i.add(o),o.ceReload(t.styles),i.delete(o)):o.parent?Wn(()=>{o.job.flags&8||(o.parent.update(),i.delete(o))}):o.appContext.reload?o.appContext.reload():typeof window<"u"&&window.location.reload(),o.root.ce&&o!==o.root&&o.root.ce._removeChildStyle(c)}Un(()=>{xe.clear()})}function et(e,t){F(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function Te(e){return(t,n)=>{try{return e(t,n)}catch{}}}let $,G=[],Fe=!1;function Qn(e,...t){$?$.emit(e,...t):Fe||G.push({event:e,args:t})}function Ct(e,t){var n,s;$=e,$?($.enabled=!0,G.forEach(({event:r,args:o})=>$.emit(r,...o)),G=[]):typeof window<"u"&&window.HTMLElement&&!((s=(n=window.navigator)==null?void 0:n.userAgent)!=null&&s.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(o=>{Ct(o,t)}),setTimeout(()=>{$||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Fe=!0,G=[])},3e3)):(Fe=!0,G=[])}const Xn=Zn("component:updated");function Zn(e){return t=>{Qn(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}let y=null,It=null;function tt(e){const t=y;return y=e,It=e&&e.type.__scopeId||null,t}function er(e,t=y,n){if(!t||e._n)return e;const s=(...r)=>{s._d&&nt(-1);const o=tt(t);let c;try{c=e(...r)}finally{tt(o),s._d&&nt(1)}return process.env.NODE_ENV!=="production"&&Xn(t),c};return s._n=!0,s._c=!0,s._d=!0,s}const tr=e=>e.__isTeleport;function At(e,t){e.shapeFlag&6&&e.component?(e.transition=t,At(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function nr(e,t){return b(e)?F({name:e.name},t,{setup:e}):e}be().requestIdleCallback;be().cancelIdleCallback;const rr=e=>!!e.type.__asyncLoader;function sr(e,t,n=ce,s=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...c)=>{se();const i=yr(n),a=Rt(t,n,e,c);return i(),oe(),a});return s?r.unshift(o):r.push(o),o}else if(process.env.NODE_ENV!=="production"){const r=tn(Ue[e].replace(/ hook$/,""));T(`${r} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`)}}const Mt=e=>(t,n=ce)=>{(!Ge||e==="sp")&&sr(e,(...s)=>t(...s),n)},or=Mt("bm"),ir=Mt("m"),cr=Symbol.for("v-ndc");function lr(e,t,n,s){let r;const o=n,c=_(e);if(c||V(e)){const i=c&&We(e);let a=!1,f=!1;i&&(a=!O(e),f=x(e),e=Se(e)),r=new Array(e.length);for(let d=0,l=e.length;d<l;d++)r[d]=t(a?f?pe(m(e[d])):m(e[d]):e[d],d,void 0,o)}else if(typeof e=="number"){process.env.NODE_ENV!=="production"&&!Number.isInteger(e)&&T(`The v-for range expect an integer value but got ${e}.`),r=new Array(e);for(let i=0;i<e;i++)r[i]=t(i+1,i,void 0,o)}else if(v(e))if(e[Symbol.iterator])r=Array.from(e,(i,a)=>t(i,a,void 0,o));else{const i=Object.keys(e);r=new Array(i.length);for(let a=0,f=i.length;a<f;a++){const d=i[a];r[a]=t(e[d],d,a,o)}}else r=[];return r}function ar(e,t,n={},s,r){if(y.ce||y.parent&&rr(y.parent)&&y.parent.ce)return me(),ve(q,null,[ie("slot",n,s)],64);let o=e[t];process.env.NODE_ENV!=="production"&&o&&o.length>1&&(T("SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template."),o=()=>[]),o&&o._c&&(o._d=!1),me();const c=o&&$t(o(n)),i=n.key||c&&c.key,a=ve(q,{key:(i&&!k(i)?i:`_${t}`)+(!c&&s?"_fb":"")},c||[],c&&e._===1?64:-2);return o&&o._c&&(o._d=!0),a}function $t(e){return e.some(t=>kt(t)?!(t.type===ge||t.type===q&&!$t(t.children)):!0)?e:null}const ur={};process.env.NODE_ENV!=="production"&&(ur.ownKeys=e=>(T("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(e)));const fr={},Pt=e=>Object.getPrototypeOf(e)===fr,dr=e=>e.__isSuspense,q=Symbol.for("v-fgt"),pr=Symbol.for("v-txt"),ge=Symbol.for("v-cmt"),ue=[];let N=null;function me(e=!1){ue.push(N=e?null:[])}function hr(){ue.pop(),N=ue[ue.length-1]||null}let ne=1;function nt(e,t=!1){ne+=e,e<0&&N&&t&&(N.hasOnce=!0)}function Ft(e){return e.dynamicChildren=ne>0?N||Jt:null,hr(),ne>0&&N&&N.push(e),e}function _r(e,t,n,s,r,o){return Ft(Ye(e,t,n,s,r,o,!0))}function ve(e,t,n,s,r){return Ft(ie(e,t,n,s,r,!0))}function kt(e){return e?e.__v_isVNode===!0:!1}const gr=(...e)=>jt(...e),Ht=({key:e})=>e??null,fe=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?V(e)||D(e)||b(e)?{i:y,r:e,k:t,f:!!n}:e:null);function Ye(e,t=null,n=null,s=0,r=null,o=e===q?0:1,c=!1,i=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ht(t),ref:t&&fe(t),scopeId:It,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:y};return i?(Je(a,n),o&128&&e.normalize(a)):n&&(a.shapeFlag|=V(n)?8:16),process.env.NODE_ENV!=="production"&&a.key!==a.key&&T("VNode created with invalid key (NaN). VNode type:",a.type),ne>0&&!c&&N&&(a.patchFlag>0||o&6)&&a.patchFlag!==32&&N.push(a),a}const ie=process.env.NODE_ENV!=="production"?gr:jt;function jt(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===cr)&&(process.env.NODE_ENV!=="production"&&!e&&T(`Invalid vnode type when creating vnode: ${e}.`),e=ge),kt(e)){const i=Ee(e,t,!0);return n&&Je(i,n),ne>0&&!o&&N&&(i.shapeFlag&6?N[N.indexOf(e)]=i:N.push(i)),i.patchFlag=-2,i}if(Ut(e)&&(e=e.__vccOpts),t){t=Lt(t);let{class:i,style:a}=t;i&&!V(i)&&(t.class=re(i)),v(a)&&(de(a)&&!_(a)&&(a=F({},a)),t.style=Ne(a))}const c=V(e)?1:dr(e)?128:tr(e)?64:v(e)?4:b(e)?2:0;return process.env.NODE_ENV!=="production"&&c&4&&de(e)&&(e=p(e),T("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
|
|
5
|
+
Component that was made reactive: `,e)),Ye(e,t,n,s,r,c,o,!0)}function Lt(e){return e?de(e)||Pt(e)?F({},e):e:null}function Ee(e,t,n=!1,s=!1){const{props:r,ref:o,patchFlag:c,children:i,transition:a}=e,f=t?vr(r||{},t):r,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:f,key:f&&Ht(f),ref:t&&t.ref?n&&o?_(o)?o.concat(fe(t)):[o,fe(t)]:fe(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:process.env.NODE_ENV!=="production"&&c===-1&&_(i)?i.map(Kt):i,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==q?c===-1?16:c|16:c,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ee(e.ssContent),ssFallback:e.ssFallback&&Ee(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&s&&At(d,a.clone(d)),d}function Kt(e){const t=Ee(e);return _(e.children)&&(t.children=e.children.map(Kt)),t}function zt(e=" ",t=0){return ie(pr,null,e,t)}function mr(e="",t=!1){return t?(me(),ve(ge,null,e)):ie(ge,null,e)}function Je(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(_(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),Je(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!Pt(t)?t._ctx=y:r===3&&y&&(y.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else b(t)?(t={default:t,_ctx:y},n=32):(t=String(t),s&64?(n=16,t=[zt(t)]):n=8);e.children=t,e.shapeFlag|=n}function vr(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const r in s)if(r==="class")t.class!==s.class&&(t.class=re([t.class,s.class]));else if(r==="style")t.style=Ne([t.style,s.style]);else if(Gt(r)){const o=t[r],c=s[r];c&&o!==c&&!(_(o)&&o.includes(c))&&(t[r]=o?[].concat(o,c):c)}else r!==""&&(t[r]=s[r])}return t}let ce=null;const Er=()=>ce||y;let ke;{const e=be(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),o=>{r.length>1?r.forEach(c=>c(o)):r[0](o)}};ke=t("__VUE_INSTANCE_SETTERS__",n=>ce=n),t("__VUE_SSR_SETTERS__",n=>Ge=n)}const yr=e=>{const t=ce;return ke(e),e.scope.on(),()=>{e.scope.off(),ke(t)}};let Ge=!1;process.env.NODE_ENV;const br=/(?:^|[-_])\w/g,Nr=e=>e.replace(br,t=>t.toUpperCase()).replace(/[-_]/g,"");function Bt(e,t=!0){return b(e)?e.displayName||e.name:e.name||t&&e.__name}function Wt(e,t,n=!1){let s=Bt(t);if(!s&&t.__file){const r=t.__file.match(/([^/\\]+)\.\w+$/);r&&(s=r[1])}if(!s&&e&&e.parent){const r=o=>{for(const c in o)if(o[c]===t)return c};s=r(e.components||e.parent.type.components)||r(e.appContext.components)}return s?Nr(s):n?"App":"Anonymous"}function Ut(e){return b(e)&&"__vccOpts"in e}const He=(e,t)=>{const n=Mn(e,t,Ge);if(process.env.NODE_ENV!=="production"){const s=Er();s&&s.appContext.config.warnRecursiveComputed&&(n._warnRecursive=!0)}return n};function Sr(){if(process.env.NODE_ENV==="production"||typeof window>"u")return;const e={style:"color:#3ba776"},t={style:"color:#1677ff"},n={style:"color:#f5222d"},s={style:"color:#eb2f96"},r={__vue_custom_formatter:!0,header(l){if(!v(l))return null;if(l.__isVue)return["div",e,"VueInstance"];if(D(l)){se();const u=l.value;return oe(),["div",{},["span",e,d(l)],"<",i(u),">"]}else{if(We(l))return["div",{},["span",e,O(l)?"ShallowReactive":"Reactive"],"<",i(l),`>${x(l)?" (readonly)":""}`];if(x(l))return["div",{},["span",e,O(l)?"ShallowReadonly":"Readonly"],"<",i(l),">"]}return null},hasBody(l){return l&&l.__isVue},body(l){if(l&&l.__isVue)return["div",{},...o(l.$)]}};function o(l){const u=[];l.type.props&&l.props&&u.push(c("props",p(l.props))),l.setupState!==Ce&&u.push(c("setup",l.setupState)),l.data!==Ce&&u.push(c("data",p(l.data)));const S=a(l,"computed");S&&u.push(c("computed",S));const R=a(l,"inject");return R&&u.push(c("injected",R)),u.push(["div",{},["span",{style:s.style+";opacity:0.66"},"$ (internal): "],["object",{object:l}]]),u}function c(l,u){return u=F({},u),Object.keys(u).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},l],["div",{style:"padding-left:1.25em"},...Object.keys(u).map(S=>["div",{},["span",s,S+": "],i(u[S],!1)])]]:["span",{}]}function i(l,u=!0){return typeof l=="number"?["span",t,l]:typeof l=="string"?["span",n,JSON.stringify(l)]:typeof l=="boolean"?["span",s,l]:v(l)?["object",{object:u?p(l):l}]:["span",n,String(l)]}function a(l,u){const S=l.type;if(b(S))return;const R={};for(const Y in l.ctx)f(S,Y,u)&&(R[Y]=l.ctx[Y]);return R}function f(l,u,S){const R=l[S];if(_(R)&&R.includes(u)||v(R)&&u in R||l.extends&&f(l.extends,u,S)||l.mixins&&l.mixins.some(Y=>f(Y,u,S)))return!0}function d(l){return O(l)?"ShallowRef":l.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(r):window.devtoolsFormatters=[r]}process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;function wr(){Sr()}process.env.NODE_ENV!=="production"&&wr();const rt=Ot("");function qt(){return{inputValue:rt,setInputValue:t=>{rt.value=t}}}const g=Be({validateOnBlur:!1,validateOnInput:!1,validateOnChange:!1,validateOnMount:!1,required:!1,isValid:!0,errors:[]}),{inputValue:st}=qt();function Or(e,t){return{init:()=>{e&&(g.validateOnBlur=e.validateOnBlur??!1,g.validateOnInput=e.validateOnInput??!1,g.validateOnChange=e.validateOnChange??!1,g.validateOnMount=e.validateOnMount??!1,g.validate=e.validate,g.required=e.required??!1,g.errors=e.errors||[])},validation:()=>{const r=Object.assign([],e?.errors||[]);if(g.required&&!st.value&&(g.isValid=!1,r.push("This field is required")),g.validate){const o=g.validate(st.value);typeof o=="string"?(g.isValid=!1,r.push(o)):Array.isArray(o)?(g.isValid=!1,r.push(...o)):g.isValid=!0}g.errors=r,r.length>0?(g.isValid=!1,t?.("error",r)):g.isValid=!0},isValid:He(()=>g.isValid),errors:He(()=>g.errors)}}exports.Fragment=q;exports.computed=He;exports.createBaseVNode=Ye;exports.createBlock=ve;exports.createCommentVNode=mr;exports.createElementBlock=_r;exports.createTextVNode=zt;exports.createVNode=ie;exports.defineComponent=nr;exports.guardReactiveProps=Lt;exports.normalizeClass=re;exports.normalizeProps=cn;exports.onBeforeMount=or;exports.onMounted=ir;exports.openBlock=me;exports.ref=Ot;exports.renderList=lr;exports.renderSlot=ar;exports.toDisplayString=ft;exports.unref=In;exports.useInput=qt;exports.useValidation=Or;exports.withCtx=er;
|