@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.
Files changed (49) hide show
  1. package/dist/BaseLink.css +1 -0
  2. package/dist/BaseLink.vue_vue_type_script_setup_true_lang-CXQJyB5W.js +225 -0
  3. package/dist/BaseLink.vue_vue_type_script_setup_true_lang-CexJ6lNf.cjs +1 -0
  4. package/dist/classNames-CcykAxZN.js +6 -0
  5. package/dist/classNames-GLLmlfI4.cjs +1 -0
  6. package/dist/collapse-ApWEJVnD.cjs +1 -0
  7. package/dist/collapse-BvsHwQBu.js +74 -0
  8. package/dist/components.d.ts +162 -1
  9. package/dist/components.js +1 -1
  10. package/dist/components.mjs +7 -109
  11. package/dist/composables.d.ts +100 -0
  12. package/dist/composables.js +1 -1
  13. package/dist/composables.mjs +6 -2
  14. package/dist/index.d.ts +356 -0
  15. package/dist/index.js +1 -1
  16. package/dist/index.mjs +19 -2
  17. package/dist/styles/elements/buttons.css +230 -0
  18. package/dist/styles/elements/icons.css +53 -0
  19. package/dist/styles/elements/index.css +3 -0
  20. package/dist/styles/elements/links.css +87 -0
  21. package/dist/styles/generated/extended-colors.css +11 -0
  22. package/dist/styles/generated/other.css +111 -0
  23. package/dist/styles/generated/palettes.css +140 -0
  24. package/dist/styles/generated/primitives.css +293 -0
  25. package/dist/styles/generated/schemes.css +58 -0
  26. package/dist/styles/generated/sizes.css +44 -0
  27. package/dist/styles/generated/typography.css +281 -0
  28. package/dist/styles/legacy.css +39 -0
  29. package/dist/styles/raw/PhilaUI 4.0-variables.css +3543 -0
  30. package/dist/styles/template-light.css +6 -2
  31. package/dist/styles/template-orange.css +4 -2
  32. package/dist/styles/tokens.css +39 -0
  33. package/dist/styles/typography.css +45 -0
  34. package/dist/styles/utilities/color.css +26 -0
  35. package/dist/styles/utilities/containers.css +158 -0
  36. package/dist/styles/utilities/index.css +4 -0
  37. package/dist/styles/utilities/spacing.css +433 -0
  38. package/dist/styles/utilities/text.css +177 -0
  39. package/dist/useRouter-BVKwor6C.js +50 -0
  40. package/dist/useRouter-C4oT8vFk.cjs +1 -0
  41. package/dist/utils.d.ts +71 -0
  42. package/dist/utils.js +1 -1
  43. package/dist/utils.mjs +17 -3
  44. package/package.json +25 -13
  45. package/dist/components.css +0 -1
  46. package/dist/index-DkaNsoLU.cjs +0 -5
  47. package/dist/index-dajx1Lu4.js +0 -1718
  48. package/dist/styles/light-mode.css +0 -106
  49. package/dist/styles/variables.css +0 -92
@@ -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)}.phila-icon__svg[data-v-36d958d1] svg{display:block;width:100%;height:100%}.phila-icon__svg[data-v-36d958d1] svg path,.phila-icon__svg[data-v-36d958d1] svg circle,.phila-icon__svg[data-v-36d958d1] svg rect,.phila-icon__svg[data-v-36d958d1] svg polygon,.phila-icon__svg[data-v-36d958d1] svg ellipse,.phila-icon__svg[data-v-36d958d1] svg line,.phila-icon__svg[data-v-36d958d1] svg polyline{fill:currentColor}.phila-icon__svg[data-v-36d958d1] svg [stroke]{stroke:currentColor}
@@ -0,0 +1,225 @@
1
+ import { defineComponent as c, computed as l, createElementBlock as s, createCommentVNode as u, unref as f, 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 R, normalizeProps as g, guardReactiveProps as F, mergeProps as _, 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__ */ c({
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: r } = $(), t = o, a = l(() => Object.assign([], e.value, t.errors || []));
21
+ return (i, h) => !f(r) && a.value?.length ? (n(), s("div", G, [
22
+ M("ul", null, [
23
+ (n(!0), s(I, null, N(a.value, (d, p) => (n(), s("li", { key: p }, B(d), 1))), 128))
24
+ ])
25
+ ])) : u("", !0);
26
+ }
27
+ }), y = (o, e) => {
28
+ const r = o.__vccOpts || o;
29
+ for (const [t, a] of e)
30
+ r[t] = a;
31
+ return r;
32
+ }, K = /* @__PURE__ */ y(J, [["__scopeId", "data-v-caba8dd2"]]), Q = ["for"], U = {
33
+ key: 0,
34
+ class: "required"
35
+ }, X = /* @__PURE__ */ c({
36
+ __name: "InputLabel",
37
+ props: {
38
+ id: {},
39
+ required: { type: Boolean }
40
+ },
41
+ setup(o) {
42
+ return (e, r) => (n(), s("label", {
43
+ class: "input-label",
44
+ for: o.id
45
+ }, [
46
+ m(e.$slots, "default", {}, void 0, !0),
47
+ o.required ? (n(), s("span", U, "*")) : u("", !0)
48
+ ], 8, Q));
49
+ }
50
+ }), Y = /* @__PURE__ */ y(X, [["__scopeId", "data-v-00c91174"]]), Z = /* @__PURE__ */ c({
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: r } = H(), t = x(""), a = o, i = e, { init: h, 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
+ i
81
+ ), V = l(() => ({
82
+ invalid: !d.value
83
+ })), w = (b) => (t.value = b.target.value, i("update:modelValue", t.value), i("input", t.value), r(t.value), a.validateOnInput && p(), t.value), q = () => {
84
+ a.validateOnBlur && p(), i("blur");
85
+ }, D = () => {
86
+ i("focus");
87
+ };
88
+ return z(() => {
89
+ h();
90
+ }), E(() => {
91
+ a.validateOnMount && p();
92
+ }), (b, oe) => (n(), s("div", {
93
+ class: C(["input-wrap", { hasError: !f(d) }])
94
+ }, [
95
+ a.label ? (n(), v(Y, {
96
+ key: 0,
97
+ id: a.id,
98
+ required: a.required
99
+ }, {
100
+ default: L(() => [
101
+ R(B(a.label), 1)
102
+ ]),
103
+ _: 1
104
+ }, 8, ["id", "required"])) : u("", !0),
105
+ m(b.$slots, "default", g(F({ inputValue: t.value, onBlur: q, onFocus: D, onInput: w, isValid: f(d), inputClasses: V.value })), void 0, !0),
106
+ A(K)
107
+ ], 2));
108
+ }
109
+ }), ue = /* @__PURE__ */ y(Z, [["__scopeId", "data-v-751bf20e"]]), ee = ["innerHTML"], ae = ["src", "alt"], te = /* @__PURE__ */ c({
110
+ __name: "Icon",
111
+ props: {
112
+ size: { default: "small" },
113
+ ariaLabel: { default: void 0 },
114
+ decorative: { type: Boolean, default: !1 },
115
+ inline: { type: Boolean },
116
+ className: {},
117
+ iconDefinition: {},
118
+ iconClass: {},
119
+ src: {},
120
+ svgRaw: {}
121
+ },
122
+ setup(o) {
123
+ const e = o, r = l(() => j(
124
+ "phila-icon",
125
+ e.size && `phila-icon--${e.size}`,
126
+ e.inline && "phila-icon--inline",
127
+ e.className
128
+ )), t = l(() => e.decorative ? {
129
+ "aria-hidden": !0
130
+ } : {
131
+ "aria-label": e.ariaLabel,
132
+ role: "img"
133
+ });
134
+ return (a, i) => (n(), s("span", _({ class: r.value }, t.value), [
135
+ e.iconDefinition ? (n(), v(f(W), {
136
+ key: 0,
137
+ icon: e.iconDefinition
138
+ }, null, 8, ["icon"])) : e.iconClass ? (n(), s("i", {
139
+ key: 1,
140
+ class: C(`fa fa-${e.iconClass}`)
141
+ }, null, 2)) : e.svgRaw ? (n(), s("span", {
142
+ key: 2,
143
+ class: "phila-icon__svg",
144
+ innerHTML: e.svgRaw
145
+ }, null, 8, ee)) : e.src ? (n(), s("img", {
146
+ key: 3,
147
+ src: e.src,
148
+ alt: e.decorative ? "" : e.ariaLabel || "Icon"
149
+ }, null, 8, ae)) : u("", !0)
150
+ ], 16));
151
+ }
152
+ }), k = /* @__PURE__ */ y(te, [["__scopeId", "data-v-36d958d1"]]), ne = { key: 1 }, ce = /* @__PURE__ */ c({
153
+ __name: "ActionContent",
154
+ props: {
155
+ iconRight: { type: Boolean, default: !1 },
156
+ iconOnly: { type: Boolean, default: !1 },
157
+ text: { default: void 0 },
158
+ size: { default: void 0 },
159
+ iconDefinition: {},
160
+ iconClass: {},
161
+ src: {},
162
+ svgRaw: {}
163
+ },
164
+ setup(o) {
165
+ const e = o, r = l(() => e.iconDefinition || e.iconClass || e.src || e.svgRaw), t = l(
166
+ () => ({
167
+ iconDefinition: e.iconDefinition,
168
+ iconClass: e.iconClass,
169
+ src: e.src,
170
+ svgRaw: e.svgRaw,
171
+ size: e.iconOnly ? e.size : void 0,
172
+ decorative: !0,
173
+ class: "icon",
174
+ inline: !0
175
+ })
176
+ );
177
+ return (a, i) => (n(), s(I, null, [
178
+ r.value && !e.iconRight ? (n(), v(k, g(_({ key: 0 }, t.value)), null, 16)) : u("", !0),
179
+ e.iconOnly ? u("", !0) : (n(), s("span", ne, [
180
+ m(a.$slots, "default", {}, () => [
181
+ R(B(e.text), 1)
182
+ ])
183
+ ])),
184
+ r.value && e.iconRight ? (n(), v(k, g(_({ key: 2 }, t.value)), null, 16)) : u("", !0)
185
+ ], 64));
186
+ }
187
+ }), de = /* @__PURE__ */ c({
188
+ __name: "BaseLink",
189
+ props: {
190
+ to: {},
191
+ href: {},
192
+ target: {},
193
+ rel: {},
194
+ disabled: { type: Boolean },
195
+ ariaLabel: {},
196
+ className: {}
197
+ },
198
+ setup(o) {
199
+ const e = o, { hasRouter: r } = S(), t = l(() => O(e) && r.value ? P("RouterLink") : "a"), a = l(() => O(e) ? {
200
+ to: e.disabled ? void 0 : e.to,
201
+ ...e.disabled && { "aria-disabled": "true" },
202
+ ...e.ariaLabel && { "aria-label": e.ariaLabel }
203
+ } : {
204
+ href: e.disabled ? void 0 : e.href,
205
+ ...e.target && { target: e.target },
206
+ ...e.rel && { rel: e.rel },
207
+ ...e.disabled && { "aria-disabled": "true" },
208
+ ...e.ariaLabel && { "aria-label": e.ariaLabel }
209
+ });
210
+ return (i, h) => (n(), v(T(t.value), _({ class: o.className }, a.value), {
211
+ default: L(() => [
212
+ m(i.$slots, "default")
213
+ ]),
214
+ _: 3
215
+ }, 16, ["class"]));
216
+ }
217
+ });
218
+ export {
219
+ K as E,
220
+ ue as I,
221
+ ce as _,
222
+ Y as a,
223
+ k as b,
224
+ de as c
225
+ };
@@ -0,0 +1 @@
1
+ "use strict";require('./BaseLink.css');const e=require("vue"),i=require("./useRouter-C4oT8vFk.cjs"),g=require("@fortawesome/vue-fontawesome"),h=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(a){const{errors:t,isValid:r}=i.useValidation(),o=a,n=e.computed(()=>Object.assign([],t.value,o.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=(a,t)=>{const r=a.__vccOpts||a;for(const[o,n]of t)r[o]=n;return r},v=u(b,[["__scopeId","data-v-caba8dd2"]]),I=["for"],O={key:0,class:"required"},L=e.defineComponent({__name:"InputLabel",props:{id:{},required:{type:Boolean}},setup(a){return(t,r)=>(e.openBlock(),e.createElementBlock("label",{class:"input-label",for:a.id},[e.renderSlot(t.$slots,"default",{},void 0,!0),a.required?(e.openBlock(),e.createElementBlock("span",O,"*")):e.createCommentVNode("",!0)],8,I))}}),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(a,{emit:t}){const{setInputValue:r}=i.useInput(),o=e.ref(""),n=a,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),_=e.computed(()=>({invalid:!s.value})),B=p=>(o.value=p.target.value,l("update:modelValue",o.value),l("input",o.value),r(o.value),n.validateOnInput&&c(),o.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:o.value,onBlur:k,onFocus:y,onInput:B,isValid:e.unref(s),inputClasses:_.value})),void 0,!0),e.createVNode(v)],2))}}),E=u(V,[["__scopeId","data-v-751bf20e"]]),N=["innerHTML"],R=["src","alt"],$=e.defineComponent({__name:"Icon",props:{size:{default:"small"},ariaLabel:{default:void 0},decorative:{type:Boolean,default:!1},inline:{type:Boolean},className:{},iconDefinition:{},iconClass:{},src:{},svgRaw:{}},setup(a){const t=a,r=e.computed(()=>h.cn("phila-icon",t.size&&`phila-icon--${t.size}`,t.inline&&"phila-icon--inline",t.className)),o=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},o.value),[t.iconDefinition?(e.openBlock(),e.createBlock(e.unref(g.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,N)):t.src?(e.openBlock(),e.createElementBlock("img",{key:3,src:t.src,alt:t.decorative?"":t.ariaLabel||"Icon"},null,8,R)):e.createCommentVNode("",!0)],16))}}),m=u($,[["__scopeId","data-v-36d958d1"]]),q={key:1},w=e.defineComponent({__name:"ActionContent",props:{iconRight:{type:Boolean,default:!1},iconOnly:{type:Boolean,default:!1},text:{default:void 0},size:{default:void 0},iconDefinition:{},iconClass:{},src:{},svgRaw:{}},setup(a){const t=a,r=e.computed(()=>t.iconDefinition||t.iconClass||t.src||t.svgRaw),o=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:!0}));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},o.value)),null,16)):e.createCommentVNode("",!0),t.iconOnly?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",q,[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},o.value)),null,16)):e.createCommentVNode("",!0)],64))}}),z=e.defineComponent({__name:"BaseLink",props:{to:{},href:{},target:{},rel:{},disabled:{type:Boolean},ariaLabel:{},className:{}},setup(a){const t=a,{hasRouter:r}=i.useRouter(),o=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(o.value),e.mergeProps({class:a.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=E;exports._sfc_main=w;exports._sfc_main$1=z;
@@ -0,0 +1,6 @@
1
+ function o(...n) {
2
+ return n.filter(Boolean).join(" ");
3
+ }
4
+ export {
5
+ o as c
6
+ };
@@ -0,0 +1 @@
1
+ "use strict";function t(...n){return n.filter(Boolean).join(" ")}exports.cn=t;
@@ -0,0 +1 @@
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;
@@ -0,0 +1,74 @@
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,7 +1,9 @@
1
1
  import { ComponentOptionsMixin } from 'vue';
2
2
  import { ComponentProvideOptions } from 'vue';
3
3
  import { DefineComponent } from 'vue';
4
+ import { DefineSetupFnComponent } from 'vue';
4
5
  import { ExtractPropTypes } from 'vue';
6
+ import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
5
7
  import { PropType } from 'vue';
6
8
  import { PublicProps } from 'vue';
7
9
 
@@ -16,8 +18,8 @@ keyup: () => void;
16
18
  keypress: () => void;
17
19
  error: (errors: string[] | undefined) => void;
18
20
  }, string, PublicProps, Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_2<InputWrapProps>>> & Readonly<{
19
- onError?: ((errors: string[] | undefined) => any) | undefined;
20
21
  onInput?: ((value: string) => any) | undefined;
22
+ onError?: ((errors: string[] | undefined) => any) | undefined;
21
23
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
22
24
  onChange?: ((value: string) => any) | undefined;
23
25
  onFocus?: (() => any) | undefined;
@@ -29,12 +31,43 @@ onKeypress?: (() => any) | undefined;
29
31
 
30
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>;
31
33
 
34
+ declare const __VLS_component_3: DefineComponent<ExtractPropTypes<__VLS_WithDefaults_2<__VLS_TypePropsToRuntimeProps_5<ActionContentProps>, {
35
+ iconOnly: boolean;
36
+ iconRight: boolean;
37
+ text: undefined;
38
+ size: undefined;
39
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_2<__VLS_TypePropsToRuntimeProps_5<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
+
32
53
  declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
33
54
 
34
55
  declare type __VLS_NonUndefinedable_2<T> = T extends undefined ? never : T;
35
56
 
36
57
  declare type __VLS_NonUndefinedable_3<T> = T extends undefined ? never : T;
37
58
 
59
+ declare type __VLS_NonUndefinedable_4<T> = T extends undefined ? never : T;
60
+
61
+ declare type __VLS_NonUndefinedable_5<T> = T extends undefined ? never : T;
62
+
63
+ declare type __VLS_Prettify<T> = {
64
+ [K in keyof T]: T[K];
65
+ } & {};
66
+
67
+ declare type __VLS_Prettify_2<T> = {
68
+ [K in keyof T]: T[K];
69
+ } & {};
70
+
38
71
  declare function __VLS_template(): {
39
72
  default?(_: {
40
73
  inputValue: string;
@@ -52,6 +85,14 @@ declare function __VLS_template_2(): {
52
85
  default?(_: {}): any;
53
86
  };
54
87
 
88
+ declare function __VLS_template_3(): {
89
+ default?(_: {}): any;
90
+ };
91
+
92
+ declare function __VLS_template_4(): {
93
+ default?(_: {}): any;
94
+ };
95
+
55
96
  declare type __VLS_TypePropsToRuntimeProps<T> = {
56
97
  [K in keyof T]-?: {} extends Pick<T, K> ? {
57
98
  type: PropType<__VLS_NonUndefinedable<T[K]>>;
@@ -79,6 +120,36 @@ declare type __VLS_TypePropsToRuntimeProps_3<T> = {
79
120
  };
80
121
  };
81
122
 
123
+ declare type __VLS_TypePropsToRuntimeProps_4<T> = {
124
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
125
+ type: PropType<__VLS_NonUndefinedable_4<T[K]>>;
126
+ } : {
127
+ type: PropType<T[K]>;
128
+ required: true;
129
+ };
130
+ };
131
+
132
+ declare type __VLS_TypePropsToRuntimeProps_5<T> = {
133
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
134
+ type: PropType<__VLS_NonUndefinedable_5<T[K]>>;
135
+ } : {
136
+ type: PropType<T[K]>;
137
+ required: true;
138
+ };
139
+ };
140
+
141
+ declare type __VLS_WithDefaults<P, D> = {
142
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
143
+ default: D[K];
144
+ }> : P[K];
145
+ };
146
+
147
+ declare type __VLS_WithDefaults_2<P, D> = {
148
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify_2<P[K] & {
149
+ default: D[K];
150
+ }> : P[K];
151
+ };
152
+
82
153
  declare type __VLS_WithTemplateSlots<T, S> = T & {
83
154
  new (): {
84
155
  $slots: S;
@@ -91,12 +162,87 @@ declare type __VLS_WithTemplateSlots_2<T, S> = T & {
91
162
  };
92
163
  };
93
164
 
165
+ declare type __VLS_WithTemplateSlots_3<T, S> = T & {
166
+ new (): {
167
+ $slots: S;
168
+ };
169
+ };
170
+
171
+ declare type __VLS_WithTemplateSlots_4<T, S> = T & {
172
+ new (): {
173
+ $slots: S;
174
+ };
175
+ };
176
+
177
+ export declare const ActionContent: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, ReturnType<typeof __VLS_template_3>>;
178
+
179
+ export declare interface ActionContentProps extends BaseIconProps {
180
+ iconRight?: boolean;
181
+ iconOnly?: boolean;
182
+ text?: string;
183
+ size?: ComponentSize;
184
+ }
185
+
186
+ declare interface BaseIconProps {
187
+ /** FontAwesome icon definition object */
188
+ iconDefinition?: IconDefinition;
189
+ /** FontAwesome icon class name (fallback method) */
190
+ iconClass?: string;
191
+ /** Custom icon source URL for img tag (fallback method) */
192
+ src?: string;
193
+ /** Raw SVG string for inline rendering (allows CSS color styling) */
194
+ svgRaw?: string;
195
+ }
196
+
197
+ export declare const BaseLink: __VLS_WithTemplateSlots_4<typeof __VLS_component_4, ReturnType<typeof __VLS_template_4>>;
198
+
199
+ declare interface BaseLinkBaseProps extends BaseProps {
200
+ disabled?: boolean;
201
+ ariaLabel?: string;
202
+ }
203
+
204
+ export declare type BaseLinkProps = RouterLinkProps | HtmlLinkProps;
205
+
94
206
  declare interface BaseProps {
95
207
  className?: string;
96
208
  }
97
209
 
210
+ declare type ComponentSize = "extra-large" | "large" | "medium" | "small" | "extra-small";
211
+
98
212
  export declare const ErrorList: DefineComponent<ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ValidationProps>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ValidationProps>>> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
99
213
 
214
+ export declare interface HtmlLinkProps extends BaseLinkBaseProps {
215
+ href: string;
216
+ to?: never;
217
+ target?: string;
218
+ rel?: string;
219
+ }
220
+
221
+ export declare const Icon: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps_4<IconProps>, {
222
+ size: string;
223
+ decorative: boolean;
224
+ ariaLabel: undefined;
225
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps_4<IconProps>, {
226
+ size: string;
227
+ decorative: boolean;
228
+ ariaLabel: undefined;
229
+ }>>> & Readonly<{}>, {
230
+ size: ComponentSize;
231
+ ariaLabel: string;
232
+ decorative: boolean;
233
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
234
+
235
+ export declare interface IconProps extends BaseProps, BaseIconProps {
236
+ /** Icon size variant */
237
+ size?: ComponentSize;
238
+ /** Accessible label for screen readers */
239
+ ariaLabel?: string;
240
+ /** Whether the icon is decorative (hides from screen readers) */
241
+ decorative?: boolean;
242
+ /** Whether the icon is displayed inline (removes padding)*/
243
+ inline?: boolean;
244
+ }
245
+
100
246
  export declare const InputLabel: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, ReturnType<typeof __VLS_template_2>>;
101
247
 
102
248
  declare interface InputProps {
@@ -116,6 +262,21 @@ declare interface LabelProps {
116
262
  required?: boolean;
117
263
  }
118
264
 
265
+ export declare type RouteLocationRaw = string | {
266
+ path?: string;
267
+ name?: string;
268
+ params?: Record<string, string | string[]>;
269
+ query?: Record<string, string | string[]>;
270
+ hash?: string;
271
+ };
272
+
273
+ export declare interface RouterLinkProps extends BaseLinkBaseProps {
274
+ to: RouteLocationRaw;
275
+ href?: never;
276
+ target?: never;
277
+ rel?: never;
278
+ }
279
+
119
280
  declare interface ValidationProps {
120
281
  errors?: string[];
121
282
  validateOnBlur?: boolean;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components.css');const e=require("./index-DkaNsoLU.cjs"),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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./BaseLink.vue_vue_type_script_setup_true_lang-CexJ6lNf.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;