@phila/phila-ui-core 2.1.2 → 2.2.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BaseLink.css +1 -0
- package/dist/BaseLink.vue_vue_type_script_setup_true_lang-CXQJyB5W.js +225 -0
- package/dist/BaseLink.vue_vue_type_script_setup_true_lang-CexJ6lNf.cjs +1 -0
- package/dist/classNames-CcykAxZN.js +6 -0
- package/dist/classNames-GLLmlfI4.cjs +1 -0
- package/dist/collapse-ApWEJVnD.cjs +1 -0
- package/dist/collapse-BvsHwQBu.js +74 -0
- package/dist/components.d.ts +162 -1
- package/dist/components.js +1 -1
- package/dist/components.mjs +7 -109
- package/dist/composables.d.ts +100 -0
- package/dist/composables.js +1 -1
- package/dist/composables.mjs +6 -2
- package/dist/index.d.ts +356 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +19 -2
- package/dist/styles/elements/buttons.css +230 -0
- package/dist/styles/elements/icons.css +53 -0
- package/dist/styles/elements/index.css +3 -0
- package/dist/styles/elements/links.css +87 -0
- package/dist/styles/generated/extended-colors.css +11 -0
- package/dist/styles/generated/other.css +111 -0
- package/dist/styles/generated/palettes.css +140 -0
- package/dist/styles/generated/primitives.css +293 -0
- package/dist/styles/generated/schemes.css +58 -0
- package/dist/styles/generated/sizes.css +44 -0
- package/dist/styles/generated/typography.css +281 -0
- package/dist/styles/legacy.css +39 -0
- package/dist/styles/raw/PhilaUI 4.0-variables.css +3543 -0
- package/dist/styles/template-light.css +6 -2
- package/dist/styles/template-orange.css +4 -2
- package/dist/styles/tokens.css +39 -0
- package/dist/styles/typography.css +45 -0
- package/dist/styles/utilities/color.css +26 -0
- package/dist/styles/utilities/containers.css +158 -0
- package/dist/styles/utilities/index.css +4 -0
- package/dist/styles/utilities/spacing.css +433 -0
- package/dist/styles/utilities/text.css +177 -0
- package/dist/useRouter-BVKwor6C.js +50 -0
- package/dist/useRouter-C4oT8vFk.cjs +1 -0
- package/dist/utils.d.ts +71 -0
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +17 -3
- package/package.json +25 -13
- package/dist/components.css +0 -1
- package/dist/index-DkaNsoLU.cjs +0 -5
- package/dist/index-dajx1Lu4.js +0 -1718
- package/dist/styles/light-mode.css +0 -106
- package/dist/styles/variables.css +0 -92
package/dist/components.mjs
CHANGED
|
@@ -1,111 +1,9 @@
|
|
|
1
|
-
import {
|
|
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"]]);
|
|
1
|
+
import { _ as n, c as t, E as o, b as r, a as e, I as p } from "./BaseLink.vue_vue_type_script_setup_true_lang-CXQJyB5W.js";
|
|
107
2
|
export {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
3
|
+
n as ActionContent,
|
|
4
|
+
t as BaseLink,
|
|
5
|
+
o as ErrorList,
|
|
6
|
+
r as Icon,
|
|
7
|
+
e as InputLabel,
|
|
8
|
+
p as InputWrap
|
|
111
9
|
};
|
package/dist/composables.d.ts
CHANGED
|
@@ -1,12 +1,112 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes } from 'vue';
|
|
1
2
|
import { ComputedRef } from 'vue';
|
|
2
3
|
import { defineEmits as defineEmits_2 } from 'vue';
|
|
3
4
|
import { Ref } from 'vue';
|
|
4
5
|
|
|
6
|
+
declare interface BaseLinkBaseProps extends BaseProps {
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
ariaLabel?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
declare type BaseLinkProps = RouterLinkProps | HtmlLinkProps;
|
|
12
|
+
|
|
13
|
+
declare interface BaseProps {
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare interface CollapseItems {
|
|
18
|
+
[id: string]: boolean;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare interface CollapseState {
|
|
22
|
+
[group: string]: CollapseItems;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare interface HtmlLinkProps extends BaseLinkBaseProps {
|
|
26
|
+
href: string;
|
|
27
|
+
to?: never;
|
|
28
|
+
target?: string;
|
|
29
|
+
rel?: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export declare const isRouterLink: (props: BaseLinkProps) => props is RouterLinkProps;
|
|
33
|
+
|
|
34
|
+
declare type RouteLocationRaw = string | {
|
|
35
|
+
path?: string;
|
|
36
|
+
name?: string;
|
|
37
|
+
params?: Record<string, string | string[]>;
|
|
38
|
+
query?: Record<string, string | string[]>;
|
|
39
|
+
hash?: string;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
declare interface RouterLinkProps extends BaseLinkBaseProps {
|
|
43
|
+
to: RouteLocationRaw;
|
|
44
|
+
href?: never;
|
|
45
|
+
target?: never;
|
|
46
|
+
rel?: never;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export declare function useCollapse(props?: UseCollapseProps): {
|
|
50
|
+
state: Ref<CollapseState, CollapseState>;
|
|
51
|
+
timeout: Ref<NodeJS.Timeout | undefined, NodeJS.Timeout | undefined>;
|
|
52
|
+
toggle: (id: string) => void;
|
|
53
|
+
toggleSingle: (id: string) => void;
|
|
54
|
+
setCollapsed: (id: string, value: boolean) => void;
|
|
55
|
+
setSingleCollapsed: (id: string, value: boolean) => void;
|
|
56
|
+
isCollapsed: (id: string) => boolean;
|
|
57
|
+
reset: () => void;
|
|
58
|
+
onMouseEnter: () => void;
|
|
59
|
+
onMouseLeave: () => void;
|
|
60
|
+
focusChange: (e: FocusEvent) => void;
|
|
61
|
+
onClickToggle: (event: Event) => void;
|
|
62
|
+
onClickOpen: (event?: Event) => void;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
declare interface UseCollapseProps {
|
|
66
|
+
/**
|
|
67
|
+
* Unique identifier for the panel
|
|
68
|
+
*/
|
|
69
|
+
id: string;
|
|
70
|
+
/**
|
|
71
|
+
* Group identifier to group multiple panels together
|
|
72
|
+
*/
|
|
73
|
+
group?: string;
|
|
74
|
+
/**
|
|
75
|
+
* Close panel when focus is lost on toggle and panel
|
|
76
|
+
*/
|
|
77
|
+
blurClose?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Close all others in group when opened
|
|
80
|
+
*/
|
|
81
|
+
openSingle?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Toggle panel open/close on mouse over
|
|
84
|
+
*/
|
|
85
|
+
mouseOverToggle?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Close panel when clicking outside of it and the toggle
|
|
88
|
+
*/
|
|
89
|
+
outsideClickClose?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Close panel when escape key is pressed
|
|
92
|
+
*/
|
|
93
|
+
escapeKeyClose?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Additional attributes to bind to the toggle button
|
|
96
|
+
*/
|
|
97
|
+
toggleAttrs?: Partial<ButtonHTMLAttributes>;
|
|
98
|
+
}
|
|
99
|
+
|
|
5
100
|
export declare function useInput(): {
|
|
6
101
|
inputValue: Ref<string, string>;
|
|
7
102
|
setInputValue: (value: string) => void;
|
|
8
103
|
};
|
|
9
104
|
|
|
105
|
+
export declare function useRouter(): {
|
|
106
|
+
router: unknown;
|
|
107
|
+
hasRouter: ComputedRef<boolean>;
|
|
108
|
+
};
|
|
109
|
+
|
|
10
110
|
export declare function useValidation(props?: ValidationProps, emit?: ReturnType<typeof defineEmits_2>): {
|
|
11
111
|
init: () => void;
|
|
12
112
|
validation: () => void;
|
package/dist/composables.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./useRouter-C4oT8vFk.cjs"),u=require("./collapse-ApWEJVnD.cjs");exports.isRouterLink=e.isRouterLink;exports.useInput=e.useInput;exports.useRouter=e.useRouter;exports.useValidation=e.useValidation;exports.useCollapse=u.useCollapse;
|
package/dist/composables.mjs
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as e, u, b as o, a as r } from "./useRouter-BVKwor6C.js";
|
|
2
|
+
import { u as i } from "./collapse-BvsHwQBu.js";
|
|
2
3
|
export {
|
|
4
|
+
e as isRouterLink,
|
|
5
|
+
i as useCollapse,
|
|
3
6
|
u as useInput,
|
|
4
|
-
|
|
7
|
+
o as useRouter,
|
|
8
|
+
r as useValidation
|
|
5
9
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,212 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes } from 'vue';
|
|
2
|
+
import { ComponentOptionsMixin } from 'vue';
|
|
3
|
+
import { ComponentProvideOptions } from 'vue';
|
|
4
|
+
import { ComputedRef } from 'vue';
|
|
5
|
+
import { DefineComponent } from 'vue';
|
|
6
|
+
import { defineEmits as defineEmits_2 } from 'vue';
|
|
7
|
+
import { DefineSetupFnComponent } from 'vue';
|
|
8
|
+
import { ExtractPropTypes } from 'vue';
|
|
9
|
+
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
10
|
+
import { PropType } from 'vue';
|
|
11
|
+
import { PublicProps } from 'vue';
|
|
12
|
+
import { Ref } from 'vue';
|
|
13
|
+
|
|
14
|
+
declare const __VLS_component: DefineComponent<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_2<InputWrapProps>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
15
|
+
"update:modelValue": (value: string) => void;
|
|
16
|
+
input: (value: string) => void;
|
|
17
|
+
change: (value: string) => void;
|
|
18
|
+
focus: () => void;
|
|
19
|
+
blur: () => void;
|
|
20
|
+
keydown: () => void;
|
|
21
|
+
keyup: () => void;
|
|
22
|
+
keypress: () => void;
|
|
23
|
+
error: (errors: string[] | undefined) => void;
|
|
24
|
+
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_2<InputWrapProps>>> & Readonly<{
|
|
25
|
+
onInput?: ((value: string) => any) | undefined;
|
|
26
|
+
onError?: ((errors: string[] | undefined) => any) | undefined;
|
|
27
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
28
|
+
onChange?: ((value: string) => any) | undefined;
|
|
29
|
+
onFocus?: (() => any) | undefined;
|
|
30
|
+
onBlur?: (() => any) | undefined;
|
|
31
|
+
onKeydown?: (() => any) | undefined;
|
|
32
|
+
onKeyup?: (() => any) | undefined;
|
|
33
|
+
onKeypress?: (() => any) | undefined;
|
|
34
|
+
}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
35
|
+
|
|
36
|
+
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>;
|
|
37
|
+
|
|
38
|
+
declare const __VLS_component_3: DefineComponent<ExtractPropTypes<__VLS_WithDefaults_2<__VLS_TypePropsToRuntimeProps_5<ActionContentProps>, {
|
|
39
|
+
iconOnly: boolean;
|
|
40
|
+
iconRight: boolean;
|
|
41
|
+
text: undefined;
|
|
42
|
+
size: undefined;
|
|
43
|
+
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_2<__VLS_TypePropsToRuntimeProps_5<ActionContentProps>, {
|
|
44
|
+
iconOnly: boolean;
|
|
45
|
+
iconRight: boolean;
|
|
46
|
+
text: undefined;
|
|
47
|
+
size: undefined;
|
|
48
|
+
}>>> & Readonly<{}>, {
|
|
49
|
+
size: ComponentSize;
|
|
50
|
+
text: string;
|
|
51
|
+
iconRight: boolean;
|
|
52
|
+
iconOnly: boolean;
|
|
53
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
54
|
+
|
|
55
|
+
declare const __VLS_component_4: DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, PublicProps>;
|
|
56
|
+
|
|
57
|
+
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
58
|
+
|
|
59
|
+
declare type __VLS_NonUndefinedable_2<T> = T extends undefined ? never : T;
|
|
60
|
+
|
|
61
|
+
declare type __VLS_NonUndefinedable_3<T> = T extends undefined ? never : T;
|
|
62
|
+
|
|
63
|
+
declare type __VLS_NonUndefinedable_4<T> = T extends undefined ? never : T;
|
|
64
|
+
|
|
65
|
+
declare type __VLS_NonUndefinedable_5<T> = T extends undefined ? never : T;
|
|
66
|
+
|
|
67
|
+
declare type __VLS_Prettify<T> = {
|
|
68
|
+
[K in keyof T]: T[K];
|
|
69
|
+
} & {};
|
|
70
|
+
|
|
71
|
+
declare type __VLS_Prettify_2<T> = {
|
|
72
|
+
[K in keyof T]: T[K];
|
|
73
|
+
} & {};
|
|
74
|
+
|
|
75
|
+
declare function __VLS_template(): {
|
|
76
|
+
default?(_: {
|
|
77
|
+
inputValue: string;
|
|
78
|
+
onBlur: () => void;
|
|
79
|
+
onFocus: () => void;
|
|
80
|
+
onInput: (event: Event) => string;
|
|
81
|
+
isValid: boolean;
|
|
82
|
+
inputClasses: {
|
|
83
|
+
invalid: boolean;
|
|
84
|
+
};
|
|
85
|
+
}): any;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
declare function __VLS_template_2(): {
|
|
89
|
+
default?(_: {}): any;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
declare function __VLS_template_3(): {
|
|
93
|
+
default?(_: {}): any;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
declare function __VLS_template_4(): {
|
|
97
|
+
default?(_: {}): any;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
101
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
102
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
103
|
+
} : {
|
|
104
|
+
type: PropType<T[K]>;
|
|
105
|
+
required: true;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
declare type __VLS_TypePropsToRuntimeProps_2<T> = {
|
|
110
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
111
|
+
type: PropType<__VLS_NonUndefinedable_2<T[K]>>;
|
|
112
|
+
} : {
|
|
113
|
+
type: PropType<T[K]>;
|
|
114
|
+
required: true;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
declare type __VLS_TypePropsToRuntimeProps_3<T> = {
|
|
119
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
120
|
+
type: PropType<__VLS_NonUndefinedable_3<T[K]>>;
|
|
121
|
+
} : {
|
|
122
|
+
type: PropType<T[K]>;
|
|
123
|
+
required: true;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
declare type __VLS_TypePropsToRuntimeProps_4<T> = {
|
|
128
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
129
|
+
type: PropType<__VLS_NonUndefinedable_4<T[K]>>;
|
|
130
|
+
} : {
|
|
131
|
+
type: PropType<T[K]>;
|
|
132
|
+
required: true;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
declare type __VLS_TypePropsToRuntimeProps_5<T> = {
|
|
137
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
138
|
+
type: PropType<__VLS_NonUndefinedable_5<T[K]>>;
|
|
139
|
+
} : {
|
|
140
|
+
type: PropType<T[K]>;
|
|
141
|
+
required: true;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
declare type __VLS_WithDefaults<P, D> = {
|
|
146
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
147
|
+
default: D[K];
|
|
148
|
+
}> : P[K];
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
declare type __VLS_WithDefaults_2<P, D> = {
|
|
152
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify_2<P[K] & {
|
|
153
|
+
default: D[K];
|
|
154
|
+
}> : P[K];
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
158
|
+
new (): {
|
|
159
|
+
$slots: S;
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
declare type __VLS_WithTemplateSlots_2<T, S> = T & {
|
|
164
|
+
new (): {
|
|
165
|
+
$slots: S;
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
declare type __VLS_WithTemplateSlots_3<T, S> = T & {
|
|
170
|
+
new (): {
|
|
171
|
+
$slots: S;
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
declare type __VLS_WithTemplateSlots_4<T, S> = T & {
|
|
176
|
+
new (): {
|
|
177
|
+
$slots: S;
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
export declare const ActionContent: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, ReturnType<typeof __VLS_template_3>>;
|
|
182
|
+
|
|
183
|
+
export declare interface ActionContentProps extends BaseIconProps {
|
|
184
|
+
iconRight?: boolean;
|
|
185
|
+
iconOnly?: boolean;
|
|
186
|
+
text?: string;
|
|
187
|
+
size?: ComponentSize;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export declare interface BaseIconProps {
|
|
191
|
+
/** FontAwesome icon definition object */
|
|
192
|
+
iconDefinition?: IconDefinition;
|
|
193
|
+
/** FontAwesome icon class name (fallback method) */
|
|
194
|
+
iconClass?: string;
|
|
195
|
+
/** Custom icon source URL for img tag (fallback method) */
|
|
196
|
+
src?: string;
|
|
197
|
+
/** Raw SVG string for inline rendering (allows CSS color styling) */
|
|
198
|
+
svgRaw?: string;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export declare const BaseLink: __VLS_WithTemplateSlots_4<typeof __VLS_component_4, ReturnType<typeof __VLS_template_4>>;
|
|
202
|
+
|
|
203
|
+
declare interface BaseLinkBaseProps extends BaseProps {
|
|
204
|
+
disabled?: boolean;
|
|
205
|
+
ariaLabel?: string;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export declare type BaseLinkProps = RouterLinkProps | HtmlLinkProps;
|
|
209
|
+
|
|
1
210
|
export declare interface BaseProps {
|
|
2
211
|
className?: string;
|
|
3
212
|
}
|
|
@@ -9,6 +218,56 @@ export declare interface BaseProps {
|
|
|
9
218
|
*/
|
|
10
219
|
export declare function cn(...inputs: (string | undefined | null | false)[]): string;
|
|
11
220
|
|
|
221
|
+
export declare interface CollapseItems {
|
|
222
|
+
[id: string]: boolean;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export declare interface CollapseState {
|
|
226
|
+
[group: string]: CollapseItems;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export declare type ComponentSize = "extra-large" | "large" | "medium" | "small" | "extra-small";
|
|
230
|
+
|
|
231
|
+
export declare function debounce<T extends (...args: unknown[]) => void>(callback: T, wait: number): (...args: Parameters<T>) => void;
|
|
232
|
+
|
|
233
|
+
export declare const ErrorList: DefineComponent<ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ValidationProps>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ValidationProps>>> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
234
|
+
|
|
235
|
+
export declare function generateRandomId(prefix?: string): string;
|
|
236
|
+
|
|
237
|
+
export declare interface HtmlLinkProps extends BaseLinkBaseProps {
|
|
238
|
+
href: string;
|
|
239
|
+
to?: never;
|
|
240
|
+
target?: string;
|
|
241
|
+
rel?: string;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export declare const Icon: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps_4<IconProps>, {
|
|
245
|
+
size: string;
|
|
246
|
+
decorative: boolean;
|
|
247
|
+
ariaLabel: undefined;
|
|
248
|
+
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps_4<IconProps>, {
|
|
249
|
+
size: string;
|
|
250
|
+
decorative: boolean;
|
|
251
|
+
ariaLabel: undefined;
|
|
252
|
+
}>>> & Readonly<{}>, {
|
|
253
|
+
size: ComponentSize;
|
|
254
|
+
ariaLabel: string;
|
|
255
|
+
decorative: boolean;
|
|
256
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
257
|
+
|
|
258
|
+
export declare interface IconProps extends BaseProps, BaseIconProps {
|
|
259
|
+
/** Icon size variant */
|
|
260
|
+
size?: ComponentSize;
|
|
261
|
+
/** Accessible label for screen readers */
|
|
262
|
+
ariaLabel?: string;
|
|
263
|
+
/** Whether the icon is decorative (hides from screen readers) */
|
|
264
|
+
decorative?: boolean;
|
|
265
|
+
/** Whether the icon is displayed inline (removes padding)*/
|
|
266
|
+
inline?: boolean;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export declare const InputLabel: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, ReturnType<typeof __VLS_template_2>>;
|
|
270
|
+
|
|
12
271
|
export declare interface InputProps {
|
|
13
272
|
id: string;
|
|
14
273
|
name: string;
|
|
@@ -17,13 +276,100 @@ export declare interface InputProps {
|
|
|
17
276
|
icon?: string;
|
|
18
277
|
}
|
|
19
278
|
|
|
279
|
+
export declare const InputWrap: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
280
|
+
|
|
20
281
|
export declare type InputWrapProps = InputProps & LabelProps & ValidationProps & BaseProps;
|
|
21
282
|
|
|
283
|
+
export declare const isRouterLink: (props: BaseLinkProps) => props is RouterLinkProps;
|
|
284
|
+
|
|
22
285
|
export declare interface LabelProps {
|
|
23
286
|
id: string;
|
|
24
287
|
required?: boolean;
|
|
25
288
|
}
|
|
26
289
|
|
|
290
|
+
export declare type RouteLocationRaw = string | {
|
|
291
|
+
path?: string;
|
|
292
|
+
name?: string;
|
|
293
|
+
params?: Record<string, string | string[]>;
|
|
294
|
+
query?: Record<string, string | string[]>;
|
|
295
|
+
hash?: string;
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
export declare interface RouterLinkProps extends BaseLinkBaseProps {
|
|
299
|
+
to: RouteLocationRaw;
|
|
300
|
+
href?: never;
|
|
301
|
+
target?: never;
|
|
302
|
+
rel?: never;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export declare function useCollapse(props?: UseCollapseProps): {
|
|
306
|
+
state: Ref<CollapseState, CollapseState>;
|
|
307
|
+
timeout: Ref<NodeJS.Timeout | undefined, NodeJS.Timeout | undefined>;
|
|
308
|
+
toggle: (id: string) => void;
|
|
309
|
+
toggleSingle: (id: string) => void;
|
|
310
|
+
setCollapsed: (id: string, value: boolean) => void;
|
|
311
|
+
setSingleCollapsed: (id: string, value: boolean) => void;
|
|
312
|
+
isCollapsed: (id: string) => boolean;
|
|
313
|
+
reset: () => void;
|
|
314
|
+
onMouseEnter: () => void;
|
|
315
|
+
onMouseLeave: () => void;
|
|
316
|
+
focusChange: (e: FocusEvent) => void;
|
|
317
|
+
onClickToggle: (event: Event) => void;
|
|
318
|
+
onClickOpen: (event?: Event) => void;
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
export declare interface UseCollapseProps {
|
|
322
|
+
/**
|
|
323
|
+
* Unique identifier for the panel
|
|
324
|
+
*/
|
|
325
|
+
id: string;
|
|
326
|
+
/**
|
|
327
|
+
* Group identifier to group multiple panels together
|
|
328
|
+
*/
|
|
329
|
+
group?: string;
|
|
330
|
+
/**
|
|
331
|
+
* Close panel when focus is lost on toggle and panel
|
|
332
|
+
*/
|
|
333
|
+
blurClose?: boolean;
|
|
334
|
+
/**
|
|
335
|
+
* Close all others in group when opened
|
|
336
|
+
*/
|
|
337
|
+
openSingle?: boolean;
|
|
338
|
+
/**
|
|
339
|
+
* Toggle panel open/close on mouse over
|
|
340
|
+
*/
|
|
341
|
+
mouseOverToggle?: boolean;
|
|
342
|
+
/**
|
|
343
|
+
* Close panel when clicking outside of it and the toggle
|
|
344
|
+
*/
|
|
345
|
+
outsideClickClose?: boolean;
|
|
346
|
+
/**
|
|
347
|
+
* Close panel when escape key is pressed
|
|
348
|
+
*/
|
|
349
|
+
escapeKeyClose?: boolean;
|
|
350
|
+
/**
|
|
351
|
+
* Additional attributes to bind to the toggle button
|
|
352
|
+
*/
|
|
353
|
+
toggleAttrs?: Partial<ButtonHTMLAttributes>;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
export declare function useInput(): {
|
|
357
|
+
inputValue: Ref<string, string>;
|
|
358
|
+
setInputValue: (value: string) => void;
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
export declare function useRouter(): {
|
|
362
|
+
router: unknown;
|
|
363
|
+
hasRouter: ComputedRef<boolean>;
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
export declare function useValidation(props?: ValidationProps_2, emit?: ReturnType<typeof defineEmits_2>): {
|
|
367
|
+
init: () => void;
|
|
368
|
+
validation: () => void;
|
|
369
|
+
isValid: ComputedRef<boolean>;
|
|
370
|
+
errors: ComputedRef<string[]>;
|
|
371
|
+
};
|
|
372
|
+
|
|
27
373
|
export declare interface ValidationProps {
|
|
28
374
|
errors?: string[];
|
|
29
375
|
validateOnBlur?: boolean;
|
|
@@ -34,4 +380,14 @@ export declare interface ValidationProps {
|
|
|
34
380
|
required?: boolean;
|
|
35
381
|
}
|
|
36
382
|
|
|
383
|
+
declare interface ValidationProps_2 {
|
|
384
|
+
errors?: string[];
|
|
385
|
+
validateOnBlur?: boolean;
|
|
386
|
+
validateOnInput?: boolean;
|
|
387
|
+
validateOnChange?: boolean;
|
|
388
|
+
validateOnMount?: boolean;
|
|
389
|
+
validate?: (value: string) => boolean | string | string[];
|
|
390
|
+
required?: boolean;
|
|
391
|
+
}
|
|
392
|
+
|
|
37
393
|
export { }
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./classNames-GLLmlfI4.cjs"),n=require("./utils.js"),e=require("./BaseLink.vue_vue_type_script_setup_true_lang-CexJ6lNf.cjs"),t=require("./useRouter-C4oT8vFk.cjs"),s=require("./collapse-ApWEJVnD.cjs");exports.cn=u.cn;exports.debounce=n.debounce;exports.generateRandomId=n.generateRandomId;exports.ActionContent=e._sfc_main;exports.BaseLink=e._sfc_main$1;exports.ErrorList=e.ErrorList;exports.Icon=e.Icon;exports.InputLabel=e.InputLabel;exports.InputWrap=e.InputWrap;exports.isRouterLink=t.isRouterLink;exports.useInput=t.useInput;exports.useRouter=t.useRouter;exports.useValidation=t.useValidation;exports.useCollapse=s.useCollapse;
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as o } from "./classNames-CcykAxZN.js";
|
|
2
|
+
import { debounce as r, generateRandomId as t } from "./utils.mjs";
|
|
3
|
+
import { _ as u, c as p, E as i, b as c, a as m, I } from "./BaseLink.vue_vue_type_script_setup_true_lang-CXQJyB5W.js";
|
|
4
|
+
import { i as x, u as b, b as d, a as l } from "./useRouter-BVKwor6C.js";
|
|
5
|
+
import { u as R } from "./collapse-BvsHwQBu.js";
|
|
2
6
|
export {
|
|
3
|
-
|
|
7
|
+
u as ActionContent,
|
|
8
|
+
p as BaseLink,
|
|
9
|
+
i as ErrorList,
|
|
10
|
+
c as Icon,
|
|
11
|
+
m as InputLabel,
|
|
12
|
+
I as InputWrap,
|
|
13
|
+
o as cn,
|
|
14
|
+
r as debounce,
|
|
15
|
+
t as generateRandomId,
|
|
16
|
+
x as isRouterLink,
|
|
17
|
+
R as useCollapse,
|
|
18
|
+
b as useInput,
|
|
19
|
+
d as useRouter,
|
|
20
|
+
l as useValidation
|
|
4
21
|
};
|