@phila/phila-ui-core 2.3.0 → 2.3.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.
@@ -1,233 +0,0 @@
1
- import { defineComponent as u, computed as l, createElementBlock as r, createCommentVNode as c, unref as _, openBlock as n, createElementVNode as M, Fragment as I, renderList as N, toDisplayString as B, renderSlot as m, ref as x, onBeforeMount as z, onMounted as E, normalizeClass as C, createBlock as v, createVNode as A, withCtx as L, createTextVNode as w, normalizeProps as g, guardReactiveProps as F, mergeProps as f, resolveComponent as P, resolveDynamicComponent as T } from "vue";
2
- import { a as $, u as H, b as S, i as O } from "./useRouter-BVKwor6C.js";
3
- import { FontAwesomeIcon as W } from "@fortawesome/vue-fontawesome";
4
- import { c as j } from "./classNames-CcykAxZN.js";
5
- import './BaseLink.css';const G = {
6
- key: 0,
7
- class: "input-errors"
8
- }, J = /* @__PURE__ */ u({
9
- __name: "ErrorList",
10
- props: {
11
- errors: {},
12
- validateOnBlur: { type: Boolean },
13
- validateOnInput: { type: Boolean },
14
- validateOnChange: { type: Boolean },
15
- validateOnMount: { type: Boolean },
16
- validate: { type: Function },
17
- required: { type: Boolean }
18
- },
19
- setup(o) {
20
- const { errors: e, isValid: i } = $(), t = o, a = l(() => Object.assign([], e.value, t.errors || []));
21
- return (s, y) => !_(i) && a.value?.length ? (n(), r("div", G, [
22
- M("ul", null, [
23
- (n(!0), r(I, null, N(a.value, (d, p) => (n(), r("li", { key: p }, B(d), 1))), 128))
24
- ])
25
- ])) : c("", !0);
26
- }
27
- }), h = (o, e) => {
28
- const i = o.__vccOpts || o;
29
- for (const [t, a] of e)
30
- i[t] = a;
31
- return i;
32
- }, K = /* @__PURE__ */ h(J, [["__scopeId", "data-v-caba8dd2"]]), Q = ["for"], U = {
33
- key: 0,
34
- class: "required"
35
- }, X = /* @__PURE__ */ u({
36
- __name: "InputLabel",
37
- props: {
38
- id: {},
39
- required: { type: Boolean }
40
- },
41
- setup(o) {
42
- return (e, i) => (n(), r("label", {
43
- class: "input-label",
44
- for: o.id
45
- }, [
46
- m(e.$slots, "default", {}, void 0, !0),
47
- o.required ? (n(), r("span", U, "*")) : c("", !0)
48
- ], 8, Q));
49
- }
50
- }), Y = /* @__PURE__ */ h(X, [["__scopeId", "data-v-00c91174"]]), Z = /* @__PURE__ */ u({
51
- inheritAttrs: !1,
52
- __name: "InputWrap",
53
- props: {
54
- id: {},
55
- name: {},
56
- placeholder: {},
57
- label: {},
58
- icon: {},
59
- required: { type: Boolean },
60
- errors: {},
61
- validateOnBlur: { type: Boolean },
62
- validateOnInput: { type: Boolean },
63
- validateOnChange: { type: Boolean },
64
- validateOnMount: { type: Boolean },
65
- validate: { type: Function },
66
- className: {}
67
- },
68
- emits: ["update:modelValue", "input", "change", "focus", "blur", "keydown", "keyup", "keypress", "error"],
69
- setup(o, { emit: e }) {
70
- const { setInputValue: i } = H(), t = x(""), a = o, s = e, { init: y, isValid: d, validation: p } = $(
71
- {
72
- validateOnMount: a.validateOnMount ?? !0,
73
- validateOnInput: a.validateOnInput ?? !0,
74
- validateOnBlur: a.validateOnBlur ?? !0,
75
- validateOnChange: a.validateOnChange ?? !0,
76
- required: a.required ?? !1,
77
- errors: a.errors || [],
78
- validate: a.validate
79
- },
80
- s
81
- ), R = l(() => ({
82
- invalid: !d.value
83
- })), V = (b) => (t.value = b.target.value, s("update:modelValue", t.value), s("input", t.value), i(t.value), a.validateOnInput && p(), t.value), q = () => {
84
- a.validateOnBlur && p(), s("blur");
85
- }, D = () => {
86
- s("focus");
87
- };
88
- return z(() => {
89
- y();
90
- }), E(() => {
91
- a.validateOnMount && p();
92
- }), (b, oe) => (n(), r("div", {
93
- class: C(["input-wrap", { hasError: !_(d) }])
94
- }, [
95
- a.label ? (n(), v(Y, {
96
- key: 0,
97
- id: a.id,
98
- required: a.required
99
- }, {
100
- default: L(() => [
101
- w(B(a.label), 1)
102
- ]),
103
- _: 1
104
- }, 8, ["id", "required"])) : c("", !0),
105
- m(b.$slots, "default", g(F({ inputValue: t.value, onBlur: q, onFocus: D, onInput: V, isValid: _(d), inputClasses: R.value })), void 0, !0),
106
- A(K)
107
- ], 2));
108
- }
109
- }), ce = /* @__PURE__ */ h(Z, [["__scopeId", "data-v-751bf20e"]]), ee = ["innerHTML"], ae = ["src", "alt"], te = /* @__PURE__ */ u({
110
- __name: "Icon",
111
- props: {
112
- className: {},
113
- iconDefinition: {},
114
- iconClass: {},
115
- src: {},
116
- svgRaw: {},
117
- variant: {},
118
- size: { default: "small" },
119
- inline: { type: Boolean },
120
- shadow: { type: Boolean },
121
- decorative: { type: Boolean },
122
- ariaLabel: {}
123
- },
124
- setup(o) {
125
- const e = o, i = l(() => j(
126
- "phila-icon",
127
- e.size && `phila-icon--${e.size}`,
128
- e.inline && "phila-icon--inline",
129
- e.variant && e.variant !== "default" && `phila-icon--${e.variant}`,
130
- e.shadow && "phila-icon--shadow",
131
- e.className
132
- )), t = l(() => e.decorative ? {
133
- "aria-hidden": !0
134
- } : {
135
- "aria-label": e.ariaLabel,
136
- role: "img"
137
- });
138
- return (a, s) => (n(), r("span", f({ class: i.value }, t.value), [
139
- e.iconDefinition ? (n(), v(_(W), {
140
- key: 0,
141
- icon: e.iconDefinition
142
- }, null, 8, ["icon"])) : e.iconClass ? (n(), r("i", {
143
- key: 1,
144
- class: C(`fa fa-${e.iconClass}`)
145
- }, null, 2)) : e.svgRaw ? (n(), r("span", {
146
- key: 2,
147
- class: "phila-icon__svg",
148
- innerHTML: e.svgRaw
149
- }, null, 8, ee)) : e.src ? (n(), r("img", {
150
- key: 3,
151
- src: e.src,
152
- alt: e.decorative ? "" : e.ariaLabel || "Icon"
153
- }, null, 8, ae)) : c("", !0)
154
- ], 16));
155
- }
156
- }), k = /* @__PURE__ */ h(te, [["__scopeId", "data-v-55074cbf"]]), ne = { key: 1 }, ue = /* @__PURE__ */ u({
157
- __name: "ActionContent",
158
- props: {
159
- iconRight: { type: Boolean, default: !1 },
160
- iconOnly: { type: Boolean, default: !1 },
161
- inline: { type: Boolean },
162
- text: { default: void 0 },
163
- size: { default: void 0 },
164
- shadow: { type: Boolean },
165
- iconDefinition: {},
166
- iconClass: {},
167
- src: {},
168
- svgRaw: {},
169
- variant: {}
170
- },
171
- setup(o) {
172
- const e = o, i = l(() => e.iconDefinition || e.iconClass || e.src || e.svgRaw), t = l(
173
- () => ({
174
- iconDefinition: e.iconDefinition,
175
- iconClass: e.iconClass,
176
- src: e.src,
177
- svgRaw: e.svgRaw,
178
- size: e.iconOnly ? e.size : void 0,
179
- decorative: !0,
180
- class: "icon",
181
- inline: e.inline ?? !e.iconOnly,
182
- shadow: e.shadow
183
- })
184
- );
185
- return (a, s) => (n(), r(I, null, [
186
- i.value && !e.iconRight ? (n(), v(k, g(f({ key: 0 }, t.value)), null, 16)) : c("", !0),
187
- e.iconOnly ? c("", !0) : (n(), r("span", ne, [
188
- m(a.$slots, "default", {}, () => [
189
- w(B(e.text), 1)
190
- ])
191
- ])),
192
- i.value && e.iconRight ? (n(), v(k, g(f({ key: 2 }, t.value)), null, 16)) : c("", !0)
193
- ], 64));
194
- }
195
- }), de = /* @__PURE__ */ u({
196
- __name: "BaseLink",
197
- props: {
198
- to: {},
199
- href: {},
200
- target: {},
201
- rel: {},
202
- disabled: { type: Boolean },
203
- ariaLabel: {},
204
- className: {}
205
- },
206
- setup(o) {
207
- const e = o, { hasRouter: i } = S(), t = l(() => O(e) && i.value ? P("RouterLink") : "a"), a = l(() => O(e) ? {
208
- to: e.disabled ? void 0 : e.to,
209
- ...e.disabled && { "aria-disabled": "true" },
210
- ...e.ariaLabel && { "aria-label": e.ariaLabel }
211
- } : {
212
- href: e.disabled ? void 0 : e.href,
213
- ...e.target && { target: e.target },
214
- ...e.rel && { rel: e.rel },
215
- ...e.disabled && { "aria-disabled": "true" },
216
- ...e.ariaLabel && { "aria-label": e.ariaLabel }
217
- });
218
- return (s, y) => (n(), v(T(t.value), f({ class: o.className }, a.value), {
219
- default: L(() => [
220
- m(s.$slots, "default")
221
- ]),
222
- _: 3
223
- }, 16, ["class"]));
224
- }
225
- });
226
- export {
227
- K as E,
228
- ce as I,
229
- ue as _,
230
- Y as a,
231
- k as b,
232
- de as c
233
- };
@@ -1 +0,0 @@
1
- "use strict";require('./BaseLink.css');const e=require("vue"),i=require("./useRouter-C4oT8vFk.cjs"),h=require("@fortawesome/vue-fontawesome"),g=require("./classNames-GLLmlfI4.cjs"),C={key:0,class:"input-errors"},b=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:t,isValid:r}=i.useValidation(),a=o,n=e.computed(()=>Object.assign([],t.value,a.errors||[]));return(l,d)=>!e.unref(r)&&n.value?.length?(e.openBlock(),e.createElementBlock("div",C,[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(s,c)=>(e.openBlock(),e.createElementBlock("li",{key:c},e.toDisplayString(s),1))),128))])])):e.createCommentVNode("",!0)}}),u=(o,t)=>{const r=o.__vccOpts||o;for(const[a,n]of t)r[a]=n;return r},v=u(b,[["__scopeId","data-v-caba8dd2"]]),O=["for"],I={key:0,class:"required"},L=e.defineComponent({__name:"InputLabel",props:{id:{},required:{type:Boolean}},setup(o){return(t,r)=>(e.openBlock(),e.createElementBlock("label",{class:"input-label",for:o.id},[e.renderSlot(t.$slots,"default",{},void 0,!0),o.required?(e.openBlock(),e.createElementBlock("span",I,"*")):e.createCommentVNode("",!0)],8,O))}}),f=u(L,[["__scopeId","data-v-00c91174"]]),V=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:t}){const{setInputValue:r}=i.useInput(),a=e.ref(""),n=o,l=t,{init:d,isValid:s,validation:c}=i.useValidation({validateOnMount:n.validateOnMount??!0,validateOnInput:n.validateOnInput??!0,validateOnBlur:n.validateOnBlur??!0,validateOnChange:n.validateOnChange??!0,required:n.required??!1,errors:n.errors||[],validate:n.validate},l),B=e.computed(()=>({invalid:!s.value})),_=p=>(a.value=p.target.value,l("update:modelValue",a.value),l("input",a.value),r(a.value),n.validateOnInput&&c(),a.value),k=()=>{n.validateOnBlur&&c(),l("blur")},y=()=>{l("focus")};return e.onBeforeMount(()=>{d()}),e.onMounted(()=>{n.validateOnMount&&c()}),(p,D)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["input-wrap",{hasError:!e.unref(s)}])},[n.label?(e.openBlock(),e.createBlock(f,{key:0,id:n.id,required:n.required},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.label),1)]),_:1},8,["id","required"])):e.createCommentVNode("",!0),e.renderSlot(p.$slots,"default",e.normalizeProps(e.guardReactiveProps({inputValue:a.value,onBlur:k,onFocus:y,onInput:_,isValid:e.unref(s),inputClasses:B.value})),void 0,!0),e.createVNode(v)],2))}}),w=u(V,[["__scopeId","data-v-751bf20e"]]),E=["innerHTML"],N=["src","alt"],R=e.defineComponent({__name:"Icon",props:{className:{},iconDefinition:{},iconClass:{},src:{},svgRaw:{},variant:{},size:{default:"small"},inline:{type:Boolean},shadow:{type:Boolean},decorative:{type:Boolean},ariaLabel:{}},setup(o){const t=o,r=e.computed(()=>g.cn("phila-icon",t.size&&`phila-icon--${t.size}`,t.inline&&"phila-icon--inline",t.variant&&t.variant!=="default"&&`phila-icon--${t.variant}`,t.shadow&&"phila-icon--shadow",t.className)),a=e.computed(()=>t.decorative?{"aria-hidden":!0}:{"aria-label":t.ariaLabel,role:"img"});return(n,l)=>(e.openBlock(),e.createElementBlock("span",e.mergeProps({class:r.value},a.value),[t.iconDefinition?(e.openBlock(),e.createBlock(e.unref(h.FontAwesomeIcon),{key:0,icon:t.iconDefinition},null,8,["icon"])):t.iconClass?(e.openBlock(),e.createElementBlock("i",{key:1,class:e.normalizeClass(`fa fa-${t.iconClass}`)},null,2)):t.svgRaw?(e.openBlock(),e.createElementBlock("span",{key:2,class:"phila-icon__svg",innerHTML:t.svgRaw},null,8,E)):t.src?(e.openBlock(),e.createElementBlock("img",{key:3,src:t.src,alt:t.decorative?"":t.ariaLabel||"Icon"},null,8,N)):e.createCommentVNode("",!0)],16))}}),m=u(R,[["__scopeId","data-v-55074cbf"]]),$={key:1},q=e.defineComponent({__name:"ActionContent",props:{iconRight:{type:Boolean,default:!1},iconOnly:{type:Boolean,default:!1},inline:{type:Boolean},text:{default:void 0},size:{default:void 0},shadow:{type:Boolean},iconDefinition:{},iconClass:{},src:{},svgRaw:{},variant:{}},setup(o){const t=o,r=e.computed(()=>t.iconDefinition||t.iconClass||t.src||t.svgRaw),a=e.computed(()=>({iconDefinition:t.iconDefinition,iconClass:t.iconClass,src:t.src,svgRaw:t.svgRaw,size:t.iconOnly?t.size:void 0,decorative:!0,class:"icon",inline:t.inline??!t.iconOnly,shadow:t.shadow}));return(n,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[r.value&&!t.iconRight?(e.openBlock(),e.createBlock(m,e.normalizeProps(e.mergeProps({key:0},a.value)),null,16)):e.createCommentVNode("",!0),t.iconOnly?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",$,[e.renderSlot(n.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.text),1)])])),r.value&&t.iconRight?(e.openBlock(),e.createBlock(m,e.normalizeProps(e.mergeProps({key:2},a.value)),null,16)):e.createCommentVNode("",!0)],64))}}),z=e.defineComponent({__name:"BaseLink",props:{to:{},href:{},target:{},rel:{},disabled:{type:Boolean},ariaLabel:{},className:{}},setup(o){const t=o,{hasRouter:r}=i.useRouter(),a=e.computed(()=>i.isRouterLink(t)&&r.value?e.resolveComponent("RouterLink"):"a"),n=e.computed(()=>i.isRouterLink(t)?{to:t.disabled?void 0:t.to,...t.disabled&&{"aria-disabled":"true"},...t.ariaLabel&&{"aria-label":t.ariaLabel}}:{href:t.disabled?void 0:t.href,...t.target&&{target:t.target},...t.rel&&{rel:t.rel},...t.disabled&&{"aria-disabled":"true"},...t.ariaLabel&&{"aria-label":t.ariaLabel}});return(l,d)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value),e.mergeProps({class:o.className},n.value),{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default")]),_:3},16,["class"]))}});exports.ErrorList=v;exports.Icon=m;exports.InputLabel=f;exports.InputWrap=w;exports._sfc_main=q;exports._sfc_main$1=z;
@@ -1,6 +0,0 @@
1
- function o(...n) {
2
- return n.filter(Boolean).join(" ");
3
- }
4
- export {
5
- o as c
6
- };
@@ -1 +0,0 @@
1
- "use strict";function t(...n){return n.filter(Boolean).join(" ")}exports.cn=t;
@@ -1 +0,0 @@
1
- "use strict";const s=require("vue"),i=s.ref({}),u=s.ref(),v=400,m=s.ref(null);function A(e){const o=e?.group??"global",l=(t,n)=>{i.value[o][t]=n},a=(t,n)=>{i.value[o]={[t]:n}},g=t=>i.value[o][t]??!1,T=t=>{l(t,!g(t))},L=t=>{a(t,!g(t))},E=()=>{i.value[o]={}},k=t=>{t.key==="Escape"&&(l(e.id,!1),c())},d=t=>{if(!e)return;const n=t.target,[f]=Object.keys(i.value[o]).filter(w=>i.value[o][w]===!0),r=document.getElementById(f),M=document.querySelector(`[aria-controls="${f}"]`),q=n.getAttribute("aria-controls")===f||M?.contains(t.target);r&&!r.contains(n)&&!q&&(l(e.id,!1),c())},S=()=>{e&&(u.value=setTimeout(()=>{l(e.id,!1),c()},v))},b=()=>{e&&e.mouseOverToggle===!0&&(m.value=e.id,u.value=setTimeout(()=>{y()},v))},h=()=>{e&&e.mouseOverToggle===!0&&(m.value=null,clearTimeout(u.value),u.value=setTimeout(()=>{m.value!==e.id&&(l(e.id,!1),c())},v))},B=t=>{if(!e)return;const{relatedTarget:n}=t;if(!n||n.getAttribute("aria-controls")===e.id)return;const r=document.getElementById(e.id);r&&r.contains(n)||(clearTimeout(u.value),u.value=setTimeout(()=>{e.openSingle?a(e.id,!1):l(e.id,!1),c()},v))},I=()=>{e&&(e.outsideClickClose&&(document.addEventListener("click",d),document.addEventListener("touchend",d)),e.escapeKeyClose&&document.addEventListener("keydown",k))},c=()=>{document.removeEventListener("click",d),document.removeEventListener("touchend",d),document.removeEventListener("keydown",k),document.removeEventListener("scroll",S)},C=t=>{e&&(t?.preventDefault(),clearTimeout(u.value),I())},O=t=>{e&&(C(t),e.openSingle?L(e.id):T(e.id))},y=t=>{e&&(C(t),e.openSingle?a(e.id,!0):l(e.id,!0))};return s.onBeforeMount(()=>{i.value[o]||E()}),s.onUnmounted(()=>{c()}),{state:i,timeout:u,toggle:T,toggleSingle:L,setCollapsed:l,setSingleCollapsed:a,isCollapsed:g,reset:E,onMouseEnter:b,onMouseLeave:h,focusChange:B,onClickToggle:O,onClickOpen:y}}exports.useCollapse=A;
@@ -1,74 +0,0 @@
1
- import { ref as m, onBeforeMount as j, onUnmounted as q } from "vue";
2
- const i = m({}), o = m(), f = 400, g = m(null);
3
- function D(e) {
4
- const u = e?.group ?? "global", l = (t, n) => {
5
- i.value[u][t] = n;
6
- }, a = (t, n) => {
7
- i.value[u] = { [t]: n };
8
- }, v = (t) => i.value[u][t] ?? !1, T = (t) => {
9
- l(t, !v(t));
10
- }, L = (t) => {
11
- a(t, !v(t));
12
- }, E = () => {
13
- i.value[u] = {};
14
- }, k = (t) => {
15
- t.key === "Escape" && (l(e.id, !1), c());
16
- }, s = (t) => {
17
- if (!e) return;
18
- const n = t.target, [d] = Object.keys(i.value[u]).filter((A) => i.value[u][A] === !0), r = document.getElementById(d), M = document.querySelector(`[aria-controls="${d}"]`), w = n.getAttribute("aria-controls") === d || M?.contains(t.target);
19
- r && !r.contains(n) && !w && (l(e.id, !1), c());
20
- }, S = () => {
21
- e && (o.value = setTimeout(() => {
22
- l(e.id, !1), c();
23
- }, f));
24
- }, b = () => {
25
- e && e.mouseOverToggle === !0 && (g.value = e.id, o.value = setTimeout(() => {
26
- y();
27
- }, f));
28
- }, h = () => {
29
- e && e.mouseOverToggle === !0 && (g.value = null, clearTimeout(o.value), o.value = setTimeout(() => {
30
- g.value !== e.id && (l(e.id, !1), c());
31
- }, f));
32
- }, B = (t) => {
33
- if (!e) return;
34
- const { relatedTarget: n } = t;
35
- if (!n || n.getAttribute("aria-controls") === e.id)
36
- return;
37
- const r = document.getElementById(e.id);
38
- r && r.contains(n) || (clearTimeout(o.value), o.value = setTimeout(() => {
39
- e.openSingle ? a(e.id, !1) : l(e.id, !1), c();
40
- }, f));
41
- }, I = () => {
42
- e && (e.outsideClickClose && (document.addEventListener("click", s), document.addEventListener("touchend", s)), e.escapeKeyClose && document.addEventListener("keydown", k));
43
- }, c = () => {
44
- document.removeEventListener("click", s), document.removeEventListener("touchend", s), document.removeEventListener("keydown", k), document.removeEventListener("scroll", S);
45
- }, C = (t) => {
46
- e && (t?.preventDefault(), clearTimeout(o.value), I());
47
- }, O = (t) => {
48
- e && (C(t), e.openSingle ? L(e.id) : T(e.id));
49
- }, y = (t) => {
50
- e && (C(t), e.openSingle ? a(e.id, !0) : l(e.id, !0));
51
- };
52
- return j(() => {
53
- i.value[u] || E();
54
- }), q(() => {
55
- c();
56
- }), {
57
- state: i,
58
- timeout: o,
59
- toggle: T,
60
- toggleSingle: L,
61
- setCollapsed: l,
62
- setSingleCollapsed: a,
63
- isCollapsed: v,
64
- reset: E,
65
- onMouseEnter: b,
66
- onMouseLeave: h,
67
- focusChange: B,
68
- onClickToggle: O,
69
- onClickOpen: y
70
- };
71
- }
72
- export {
73
- D as u
74
- };
@@ -1,282 +0,0 @@
1
- import { ComponentOptionsMixin } from 'vue';
2
- import { ComponentProvideOptions } from 'vue';
3
- import { DefineComponent } from 'vue';
4
- import { DefineSetupFnComponent } from 'vue';
5
- import { ExtractPropTypes } from 'vue';
6
- import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
7
- import { PropType } from 'vue';
8
- import { PublicProps } from 'vue';
9
-
10
- declare const __VLS_component: DefineComponent<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_2<InputWrapProps>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
11
- "update:modelValue": (value: string) => void;
12
- input: (value: string) => void;
13
- change: (value: string) => void;
14
- focus: () => void;
15
- blur: () => void;
16
- keydown: () => void;
17
- keyup: () => void;
18
- keypress: () => void;
19
- error: (errors: string[] | undefined) => void;
20
- }, string, PublicProps, Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_2<InputWrapProps>>> & Readonly<{
21
- onInput?: ((value: string) => any) | undefined;
22
- onError?: ((errors: string[] | undefined) => any) | undefined;
23
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
24
- onChange?: ((value: string) => any) | undefined;
25
- onFocus?: (() => any) | undefined;
26
- onBlur?: (() => any) | undefined;
27
- onKeydown?: (() => any) | undefined;
28
- onKeyup?: (() => any) | undefined;
29
- onKeypress?: (() => any) | undefined;
30
- }>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
31
-
32
- 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>;
33
-
34
- declare const __VLS_component_3: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps_4<ActionContentProps>, {
35
- iconOnly: boolean;
36
- iconRight: boolean;
37
- text: undefined;
38
- size: undefined;
39
- }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps_4<ActionContentProps>, {
40
- iconOnly: boolean;
41
- iconRight: boolean;
42
- text: undefined;
43
- size: undefined;
44
- }>>> & Readonly<{}>, {
45
- size: ComponentSize;
46
- text: string;
47
- iconRight: boolean;
48
- iconOnly: boolean;
49
- }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
50
-
51
- declare const __VLS_component_4: DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, PublicProps>;
52
-
53
- declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
54
-
55
- declare type __VLS_NonUndefinedable_2<T> = T extends undefined ? never : T;
56
-
57
- declare type __VLS_NonUndefinedable_3<T> = T extends undefined ? never : T;
58
-
59
- declare type __VLS_NonUndefinedable_4<T> = T extends undefined ? never : T;
60
-
61
- declare type __VLS_Prettify<T> = {
62
- [K in keyof T]: T[K];
63
- } & {};
64
-
65
- declare function __VLS_template(): {
66
- default?(_: {
67
- inputValue: string;
68
- onBlur: () => void;
69
- onFocus: () => void;
70
- onInput: (event: Event) => string;
71
- isValid: boolean;
72
- inputClasses: {
73
- invalid: boolean;
74
- };
75
- }): any;
76
- };
77
-
78
- declare function __VLS_template_2(): {
79
- default?(_: {}): any;
80
- };
81
-
82
- declare function __VLS_template_3(): {
83
- default?(_: {}): any;
84
- };
85
-
86
- declare function __VLS_template_4(): {
87
- default?(_: {}): any;
88
- };
89
-
90
- declare type __VLS_TypePropsToRuntimeProps<T> = {
91
- [K in keyof T]-?: {} extends Pick<T, K> ? {
92
- type: PropType<__VLS_NonUndefinedable<T[K]>>;
93
- } : {
94
- type: PropType<T[K]>;
95
- required: true;
96
- };
97
- };
98
-
99
- declare type __VLS_TypePropsToRuntimeProps_2<T> = {
100
- [K in keyof T]-?: {} extends Pick<T, K> ? {
101
- type: PropType<__VLS_NonUndefinedable_2<T[K]>>;
102
- } : {
103
- type: PropType<T[K]>;
104
- required: true;
105
- };
106
- };
107
-
108
- declare type __VLS_TypePropsToRuntimeProps_3<T> = {
109
- [K in keyof T]-?: {} extends Pick<T, K> ? {
110
- type: PropType<__VLS_NonUndefinedable_3<T[K]>>;
111
- } : {
112
- type: PropType<T[K]>;
113
- required: true;
114
- };
115
- };
116
-
117
- declare type __VLS_TypePropsToRuntimeProps_4<T> = {
118
- [K in keyof T]-?: {} extends Pick<T, K> ? {
119
- type: PropType<__VLS_NonUndefinedable_4<T[K]>>;
120
- } : {
121
- type: PropType<T[K]>;
122
- required: true;
123
- };
124
- };
125
-
126
- declare type __VLS_WithDefaults<P, D> = {
127
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
128
- default: D[K];
129
- }> : P[K];
130
- };
131
-
132
- declare type __VLS_WithTemplateSlots<T, S> = T & {
133
- new (): {
134
- $slots: S;
135
- };
136
- };
137
-
138
- declare type __VLS_WithTemplateSlots_2<T, S> = T & {
139
- new (): {
140
- $slots: S;
141
- };
142
- };
143
-
144
- declare type __VLS_WithTemplateSlots_3<T, S> = T & {
145
- new (): {
146
- $slots: S;
147
- };
148
- };
149
-
150
- declare type __VLS_WithTemplateSlots_4<T, S> = T & {
151
- new (): {
152
- $slots: S;
153
- };
154
- };
155
-
156
- /** Accessible icon with required label for screen readers */
157
- declare type AccessibleIconProps = {
158
- /** Icon is not decorative */
159
- decorative?: false;
160
- /** Accessible label for screen readers (required when not decorative) */
161
- ariaLabel: string;
162
- };
163
-
164
- export declare const ActionContent: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, ReturnType<typeof __VLS_template_3>>;
165
-
166
- export declare interface ActionContentProps extends BaseIconProps {
167
- iconRight?: boolean;
168
- iconOnly?: boolean;
169
- inline?: boolean;
170
- text?: string;
171
- size?: ComponentSize;
172
- shadow?: boolean;
173
- }
174
-
175
- declare interface BaseIconProps {
176
- /** FontAwesome icon definition object */
177
- iconDefinition?: IconDefinition;
178
- /** FontAwesome icon class name (fallback method) */
179
- iconClass?: string;
180
- /** Custom icon source URL for img tag (fallback method) */
181
- src?: string;
182
- /** Raw SVG string for inline rendering (allows CSS color styling) */
183
- svgRaw?: string;
184
- /** Icon variant style */
185
- variant?: IconVariant;
186
- }
187
-
188
- export declare const BaseLink: __VLS_WithTemplateSlots_4<typeof __VLS_component_4, ReturnType<typeof __VLS_template_4>>;
189
-
190
- declare interface BaseLinkBaseProps extends BaseProps {
191
- disabled?: boolean;
192
- ariaLabel?: string;
193
- }
194
-
195
- export declare type BaseLinkProps = RouterLinkProps | HtmlLinkProps;
196
-
197
- declare interface BaseProps {
198
- className?: string;
199
- }
200
-
201
- declare type ComponentSize = "extra-large" | "large" | "medium" | "small" | "extra-small";
202
-
203
- /** Decorative icon that is hidden from screen readers */
204
- declare type DecorativeIconProps = {
205
- /** Icon is decorative and hidden from screen readers */
206
- decorative: true;
207
- /** Accessible label for screen readers (optional when decorative) */
208
- ariaLabel?: string;
209
- };
210
-
211
- export declare const ErrorList: DefineComponent<ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ValidationProps>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ValidationProps>>> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
212
-
213
- export declare interface HtmlLinkProps extends BaseLinkBaseProps {
214
- href: string;
215
- to?: never;
216
- target?: string;
217
- rel?: string;
218
- }
219
-
220
- export declare const Icon: DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, PublicProps>;
221
-
222
- declare type IconBaseProps = BaseProps & BaseIconProps & {
223
- /** Icon size variant */
224
- size?: ComponentSize;
225
- /** Whether the icon is displayed inline (removes padding)*/
226
- inline?: boolean;
227
- /** Icon style variant */
228
- variant?: IconVariant;
229
- /** Whether to apply a drop shadow to the icon */
230
- shadow?: boolean;
231
- };
232
-
233
- /** Icon props with discriminated union to enforce accessibility */
234
- export declare type IconProps = IconBaseProps & (DecorativeIconProps | AccessibleIconProps);
235
-
236
- declare type IconVariant = "default" | "circle";
237
-
238
- export declare const InputLabel: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, ReturnType<typeof __VLS_template_2>>;
239
-
240
- declare interface InputProps {
241
- id: string;
242
- name: string;
243
- placeholder?: string;
244
- label?: string;
245
- icon?: string;
246
- }
247
-
248
- export declare const InputWrap: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
249
-
250
- declare type InputWrapProps = InputProps & LabelProps & ValidationProps & BaseProps;
251
-
252
- declare interface LabelProps {
253
- id: string;
254
- required?: boolean;
255
- }
256
-
257
- export declare type RouteLocationRaw = string | {
258
- path?: string;
259
- name?: string;
260
- params?: Record<string, string | string[]>;
261
- query?: Record<string, string | string[]>;
262
- hash?: string;
263
- };
264
-
265
- export declare interface RouterLinkProps extends BaseLinkBaseProps {
266
- to: RouteLocationRaw;
267
- href?: never;
268
- target?: never;
269
- rel?: never;
270
- }
271
-
272
- declare interface ValidationProps {
273
- errors?: string[];
274
- validateOnBlur?: boolean;
275
- validateOnInput?: boolean;
276
- validateOnChange?: boolean;
277
- validateOnMount?: boolean;
278
- validate?: (value: string) => boolean | string | string[];
279
- required?: boolean;
280
- }
281
-
282
- export { }
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./BaseLink.vue_vue_type_script_setup_true_lang-DYewXFgw.cjs");exports.ActionContent=t._sfc_main;exports.BaseLink=t._sfc_main$1;exports.ErrorList=t.ErrorList;exports.Icon=t.Icon;exports.InputLabel=t.InputLabel;exports.InputWrap=t.InputWrap;
@@ -1,9 +0,0 @@
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-Cp8pZrsD.js";
2
- export {
3
- n as ActionContent,
4
- t as BaseLink,
5
- o as ErrorList,
6
- r as Icon,
7
- e as InputLabel,
8
- p as InputWrap
9
- };