@phila/phila-ui-core 2.3.2 → 2.3.3-beta.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.
- package/dist/index.css +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +87 -68
- package/dist/styles/elements/buttons.css +1 -1
- package/dist/styles/elements/icons.css +7 -0
- package/dist/styles/utilities/color.css +10 -0
- package/dist/styles/utilities/text.css +7 -0
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -1 +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-
|
|
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-1fe4be50] svg{display:block;width:100%;height:100%}.phila-icon__svg[data-v-1fe4be50] svg path,.phila-icon__svg[data-v-1fe4be50] svg circle,.phila-icon__svg[data-v-1fe4be50] svg rect,.phila-icon__svg[data-v-1fe4be50] svg polygon,.phila-icon__svg[data-v-1fe4be50] svg ellipse,.phila-icon__svg[data-v-1fe4be50] svg line,.phila-icon__svg[data-v-1fe4be50] svg polyline{fill:currentColor}.phila-icon__svg[data-v-1fe4be50] svg [stroke]{stroke:currentColor}
|
package/dist/index.d.ts
CHANGED
|
@@ -40,16 +40,19 @@ iconOnly: boolean;
|
|
|
40
40
|
iconRight: boolean;
|
|
41
41
|
text: undefined;
|
|
42
42
|
size: undefined;
|
|
43
|
+
iconSize: undefined;
|
|
43
44
|
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps_4<ActionContentProps>, {
|
|
44
45
|
iconOnly: boolean;
|
|
45
46
|
iconRight: boolean;
|
|
46
47
|
text: undefined;
|
|
47
48
|
size: undefined;
|
|
49
|
+
iconSize: undefined;
|
|
48
50
|
}>>> & Readonly<{}>, {
|
|
49
51
|
size: ComponentSize;
|
|
50
52
|
text: string;
|
|
51
53
|
iconRight: boolean;
|
|
52
54
|
iconOnly: boolean;
|
|
55
|
+
iconSize: ComponentSize;
|
|
53
56
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
54
57
|
|
|
55
58
|
declare const __VLS_component_4: DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, PublicProps>;
|
|
@@ -174,6 +177,7 @@ export declare interface ActionContentProps extends BaseIconProps {
|
|
|
174
177
|
text?: string;
|
|
175
178
|
size?: ComponentSize;
|
|
176
179
|
shadow?: boolean;
|
|
180
|
+
iconSize?: ComponentSize;
|
|
177
181
|
}
|
|
178
182
|
|
|
179
183
|
export declare interface BaseIconProps {
|
|
@@ -217,7 +221,7 @@ export declare interface CollapseState {
|
|
|
217
221
|
[group: string]: CollapseItems;
|
|
218
222
|
}
|
|
219
223
|
|
|
220
|
-
export declare type ComponentSize = "extra-large" | "large" | "medium" | "small" | "extra-small";
|
|
224
|
+
export declare type ComponentSize = "extra-large" | "large" | "medium" | "small" | "extra-small" | "xxsmall";
|
|
221
225
|
|
|
222
226
|
export declare function debounce<T extends (...args: unknown[]) => void>(callback: T, wait: number): (...args: Parameters<T>) => void;
|
|
223
227
|
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const e=require("vue"),F=require("@fortawesome/vue-fontawesome");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const e=require("vue"),F=require("@fortawesome/vue-fontawesome");function x(...n){return n.filter(Boolean).join(" ")}function W(n,t){let o;return(...l)=>{o!==void 0&&clearTimeout(o),o=setTimeout(()=>{n(...l)},t)}}function H(n="phila-ui-"){const t=new Uint8Array(16);crypto.getRandomValues(t);const o=Array.from(t,l=>l.toString(36)).join("").substring(0,12);return`${n}-${o}`}const S=e.ref("");function E(){return{inputValue:S,setInputValue:t=>{S.value=t}}}const s=e.reactive({validateOnBlur:!1,validateOnInput:!1,validateOnChange:!1,validateOnMount:!1,required:!1,isValid:!0,errors:[]}),{inputValue:q}=E();function w(n,t){return{init:()=>{n&&(s.validateOnBlur=n.validateOnBlur??!1,s.validateOnInput=n.validateOnInput??!1,s.validateOnChange=n.validateOnChange??!1,s.validateOnMount=n.validateOnMount??!1,s.validate=n.validate,s.required=n.required??!1,s.errors=n.errors||[])},validation:()=>{const a=Object.assign([],n?.errors||[]);if(s.required&&!q.value&&(s.isValid=!1,a.push("This field is required")),s.validate){const i=s.validate(q.value);typeof i=="string"?(s.isValid=!1,a.push(i)):Array.isArray(i)?(s.isValid=!1,a.push(...i)):s.isValid=!0}s.errors=a,a.length>0?(s.isValid=!1,t?.("error",a)):s.isValid=!0},isValid:e.computed(()=>s.isValid),errors:e.computed(()=>s.errors)}}const U={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(n){const{errors:t,isValid:o}=w(),l=n,a=e.computed(()=>Object.assign([],t.value,l.errors||[]));return(i,m)=>!e.unref(o)&&a.value?.length?(e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(c,d)=>(e.openBlock(),e.createElementBlock("li",{key:d},e.toDisplayString(c),1))),128))])])):e.createCommentVNode("",!0)}}),_=(n,t)=>{const o=n.__vccOpts||n;for(const[l,a]of t)o[l]=a;return o},z=_(K,[["__scopeId","data-v-caba8dd2"]]),G=["for"],J={key:0,class:"required"},Q=e.defineComponent({__name:"InputLabel",props:{id:{},required:{type:Boolean}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("label",{class:"input-label",for:n.id},[e.renderSlot(t.$slots,"default",{},void 0,!0),n.required?(e.openBlock(),e.createElementBlock("span",J,"*")):e.createCommentVNode("",!0)],8,G))}}),M=_(Q,[["__scopeId","data-v-00c91174"]]),X=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(n,{emit:t}){const{setInputValue:o}=E(),l=e.ref(""),a=n,i=t,{init:m,isValid:c,validation:d}=w({validateOnMount:a.validateOnMount??!0,validateOnInput:a.validateOnInput??!0,validateOnBlur:a.validateOnBlur??!0,validateOnChange:a.validateOnChange??!0,required:a.required??!1,errors:a.errors||[],validate:a.validate},i),p=e.computed(()=>({invalid:!c.value})),C=B=>(l.value=B.target.value,i("update:modelValue",l.value),i("input",l.value),o(l.value),a.validateOnInput&&d(),l.value),b=()=>{a.validateOnBlur&&d(),i("blur")},O=()=>{i("focus")};return e.onBeforeMount(()=>{m()}),e.onMounted(()=>{a.validateOnMount&&d()}),(B,T)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["input-wrap",{hasError:!e.unref(c)}])},[a.label?(e.openBlock(),e.createBlock(M,{key:0,id:a.id,required:a.required},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.label),1)]),_:1},8,["id","required"])):e.createCommentVNode("",!0),e.renderSlot(B.$slots,"default",e.normalizeProps(e.guardReactiveProps({inputValue:l.value,onBlur:b,onFocus:O,onInput:C,isValid:e.unref(c),inputClasses:p.value})),void 0,!0),e.createVNode(z)],2))}}),Y=_(X,[["__scopeId","data-v-751bf20e"]]),Z=["innerHTML"],ee=["src","alt"],te=e.defineComponent({__name:"Icon",props:{className:{},iconDefinition:{},iconClass:{},src:{},svgRaw:{},variant:{default:"default"},size:{default:"small"},inline:{type:Boolean},shadow:{type:Boolean},decorative:{type:Boolean},ariaLabel:{default:void 0}},setup(n){const t=n,o=e.computed(()=>x("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)),l=e.computed(()=>t.decorative?{"aria-hidden":!0}:{"aria-label":t.ariaLabel,role:"img"});return(a,i)=>(e.openBlock(),e.createElementBlock("span",e.mergeProps({class:o.value},l.value),[t.iconDefinition?(e.openBlock(),e.createBlock(e.unref(F.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,Z)):t.src?(e.openBlock(),e.createElementBlock("img",{key:3,src:t.src,alt:t.decorative?"":t.ariaLabel||"Icon"},null,8,ee)):e.createCommentVNode("",!0)],16))}}),V=_(te,[["__scopeId","data-v-1fe4be50"]]),ne={key:1},ae=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},iconSize:{default:void 0},iconDefinition:{},iconClass:{},src:{},svgRaw:{},variant:{}},setup(n){const t=n,o=e.computed(()=>t.iconDefinition||t.iconClass||t.src||t.svgRaw),l=i=>{if(i.iconOnly)switch(i.size){case"small":return"extra-small";case"extra-small":return"xxsmall";default:return i.size||"medium"}else switch(i.size){case"small":case"extra-small":return"xxsmall";default:return"extra-small"}},a=e.computed(()=>({iconDefinition:t.iconDefinition,iconClass:t.iconClass,src:t.src,svgRaw:t.svgRaw,size:t.iconSize??l(t),decorative:!0,class:"icon",inline:t.inline??!t.iconOnly,shadow:t.shadow}));return(i,m)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[o.value&&!t.iconRight?(e.openBlock(),e.createBlock(V,e.normalizeProps(e.mergeProps({key:0},a.value)),null,16)):e.createCommentVNode("",!0),t.iconOnly?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",ne,[e.renderSlot(i.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.text),1)])])),o.value&&t.iconRight?(e.openBlock(),e.createBlock(V,e.normalizeProps(e.mergeProps({key:2},a.value)),null,16)):e.createCommentVNode("",!0)],64))}}),L=n=>"to"in n&&n.to!==void 0;function N(){const n=e.inject("router",null),t=e.computed(()=>n!==null);return{router:n,hasRouter:t}}const oe=e.defineComponent({__name:"BaseLink",props:{to:{},href:{},target:{},rel:{},disabled:{type:Boolean},ariaLabel:{},className:{}},setup(n){const t=n,{hasRouter:o}=N(),l=e.computed(()=>L(t)&&o.value?e.resolveComponent("RouterLink"):"a"),a=e.computed(()=>L(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(i,m)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value),e.mergeProps({class:n.className},a.value),{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),_:3},16,["class"]))}}),v=e.ref({}),f=e.ref(),h=400,I=e.ref(null);function le(n){const t=n?.group??"global",o=(r,u)=>{v.value[t][r]=u},l=(r,u)=>{v.value[t]={[r]:u}},a=r=>v.value[t]?.[r]??!1,i=r=>{o(r,!a(r))},m=r=>{l(r,!a(r))},c=()=>{v.value[t]={}},d=r=>{r.key==="Escape"&&(o(n.id,!1),g())},p=r=>{if(!n)return;const u=r.target,[y]=Object.keys(v.value[t]).filter(j=>v.value[t][j]===!0),k=document.getElementById(y),D=document.querySelector(`[aria-controls="${y}"]`),P=u.getAttribute("aria-controls")===y||D?.contains(r.target);k&&!k.contains(u)&&!P&&(o(n.id,!1),g())},C=()=>{n&&(f.value=setTimeout(()=>{o(n.id,!1),g()},h))},b=()=>{n&&n.mouseOverToggle===!0&&(I.value=n.id,f.value=setTimeout(()=>{$()},h))},O=()=>{n&&n.mouseOverToggle===!0&&(I.value=null,clearTimeout(f.value),f.value=setTimeout(()=>{I.value!==n.id&&(o(n.id,!1),g())},h))},B=r=>{if(!n)return;const{relatedTarget:u}=r;if(!u||u.getAttribute("aria-controls")===n.id)return;const k=document.getElementById(n.id);k&&k.contains(u)||(clearTimeout(f.value),f.value=setTimeout(()=>{n.openSingle?l(n.id,!1):o(n.id,!1),g()},h))},T=()=>{n&&(n.outsideClickClose&&(document.addEventListener("click",p),document.addEventListener("touchend",p)),n.escapeKeyClose&&document.addEventListener("keydown",d))},g=()=>{document.removeEventListener("click",p),document.removeEventListener("touchend",p),document.removeEventListener("keydown",d),document.removeEventListener("scroll",C)},R=r=>{n&&(r?.preventDefault(),clearTimeout(f.value),T())},A=r=>{n&&(R(r),n.openSingle?m(n.id):i(n.id))},$=r=>{n&&(R(r),n.openSingle?l(n.id,!0):o(n.id,!0))};return e.onBeforeMount(()=>{v.value[t]||c()}),e.onUnmounted(()=>{g()}),{state:v,timeout:f,toggle:i,toggleSingle:m,setCollapsed:o,setSingleCollapsed:l,isCollapsed:a,reset:c,onMouseEnter:b,onMouseLeave:O,focusChange:B,onClickToggle:A,onClickOpen:$}}exports.ActionContent=ae;exports.BaseLink=oe;exports.ErrorList=z;exports.Icon=V;exports.InputLabel=M;exports.InputWrap=Y;exports.cn=x;exports.debounce=W;exports.generateRandomId=H;exports.isRouterLink=L;exports.useCollapse=le;exports.useInput=E;exports.useRouter=N;exports.useValidation=w;
|
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ref as k, reactive as te, computed as c, defineComponent as O, createElementBlock as u, createCommentVNode as y, unref as V, openBlock as s, createElementVNode as ne, Fragment as H, renderList as ae, toDisplayString as
|
|
1
|
+
import { ref as k, reactive as te, computed as c, defineComponent as O, createElementBlock as u, createCommentVNode as y, unref as V, openBlock as s, createElementVNode as ne, Fragment as H, renderList as ae, toDisplayString as z, renderSlot as T, onBeforeMount as U, onMounted as ie, normalizeClass as W, createBlock as C, createVNode as le, withCtx as K, createTextVNode as G, normalizeProps as M, guardReactiveProps as re, mergeProps as w, inject as oe, resolveComponent as se, resolveDynamicComponent as ue, onUnmounted as ce } from "vue";
|
|
2
2
|
import { FontAwesomeIcon as de } from "@fortawesome/vue-fontawesome";
|
|
3
3
|
import './index.css';function ve(...t) {
|
|
4
4
|
return t.filter(Boolean).join(" ");
|
|
5
5
|
}
|
|
6
|
-
function
|
|
6
|
+
function we(t, e) {
|
|
7
7
|
let a;
|
|
8
8
|
return (...i) => {
|
|
9
9
|
a !== void 0 && clearTimeout(a), a = setTimeout(() => {
|
|
@@ -11,18 +11,18 @@ function Te(t, e) {
|
|
|
11
11
|
}, e);
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function Te(t = "phila-ui-") {
|
|
15
15
|
const e = new Uint8Array(16);
|
|
16
16
|
crypto.getRandomValues(e);
|
|
17
17
|
const a = Array.from(e, (i) => i.toString(36)).join("").substring(0, 12);
|
|
18
18
|
return `${t}-${a}`;
|
|
19
19
|
}
|
|
20
|
-
const
|
|
20
|
+
const N = k("");
|
|
21
21
|
function J() {
|
|
22
22
|
return {
|
|
23
|
-
inputValue:
|
|
23
|
+
inputValue: N,
|
|
24
24
|
setInputValue: (e) => {
|
|
25
|
-
|
|
25
|
+
N.value = e;
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
}
|
|
@@ -43,8 +43,8 @@ function Q(t, e) {
|
|
|
43
43
|
validation: () => {
|
|
44
44
|
const n = Object.assign([], t?.errors || []);
|
|
45
45
|
if (o.required && !j.value && (o.isValid = !1, n.push("This field is required")), o.validate) {
|
|
46
|
-
const
|
|
47
|
-
typeof
|
|
46
|
+
const l = o.validate(j.value);
|
|
47
|
+
typeof l == "string" ? (o.isValid = !1, n.push(l)) : Array.isArray(l) ? (o.isValid = !1, n.push(...l)) : o.isValid = !0;
|
|
48
48
|
}
|
|
49
49
|
o.errors = n, n.length > 0 ? (o.isValid = !1, e?.("error", n)) : o.isValid = !0;
|
|
50
50
|
},
|
|
@@ -68,18 +68,18 @@ const fe = {
|
|
|
68
68
|
},
|
|
69
69
|
setup(t) {
|
|
70
70
|
const { errors: e, isValid: a } = Q(), i = t, n = c(() => Object.assign([], e.value, i.errors || []));
|
|
71
|
-
return (
|
|
71
|
+
return (l, h) => !V(a) && n.value?.length ? (s(), u("div", fe, [
|
|
72
72
|
ne("ul", null, [
|
|
73
|
-
(s(!0), u(H, null, ae(n.value, (v, f) => (s(), u("li", { key: f },
|
|
73
|
+
(s(!0), u(H, null, ae(n.value, (v, f) => (s(), u("li", { key: f }, z(v), 1))), 128))
|
|
74
74
|
])
|
|
75
75
|
])) : y("", !0);
|
|
76
76
|
}
|
|
77
|
-
}),
|
|
77
|
+
}), $ = (t, e) => {
|
|
78
78
|
const a = t.__vccOpts || t;
|
|
79
79
|
for (const [i, n] of e)
|
|
80
80
|
a[i] = n;
|
|
81
81
|
return a;
|
|
82
|
-
}, ge = /* @__PURE__ */
|
|
82
|
+
}, ge = /* @__PURE__ */ $(me, [["__scopeId", "data-v-caba8dd2"]]), he = ["for"], ye = {
|
|
83
83
|
key: 0,
|
|
84
84
|
class: "required"
|
|
85
85
|
}, _e = /* @__PURE__ */ O({
|
|
@@ -93,11 +93,11 @@ const fe = {
|
|
|
93
93
|
class: "input-label",
|
|
94
94
|
for: t.id
|
|
95
95
|
}, [
|
|
96
|
-
|
|
97
|
-
t.required ? (s(), u("span",
|
|
98
|
-
], 8,
|
|
96
|
+
T(e.$slots, "default", {}, void 0, !0),
|
|
97
|
+
t.required ? (s(), u("span", ye, "*")) : y("", !0)
|
|
98
|
+
], 8, he));
|
|
99
99
|
}
|
|
100
|
-
}), pe = /* @__PURE__ */
|
|
100
|
+
}), pe = /* @__PURE__ */ $(_e, [["__scopeId", "data-v-00c91174"]]), Oe = /* @__PURE__ */ O({
|
|
101
101
|
inheritAttrs: !1,
|
|
102
102
|
__name: "InputWrap",
|
|
103
103
|
props: {
|
|
@@ -117,7 +117,7 @@ const fe = {
|
|
|
117
117
|
},
|
|
118
118
|
emits: ["update:modelValue", "input", "change", "focus", "blur", "keydown", "keyup", "keypress", "error"],
|
|
119
119
|
setup(t, { emit: e }) {
|
|
120
|
-
const { setInputValue: a } = J(), i = k(""), n = t,
|
|
120
|
+
const { setInputValue: a } = J(), i = k(""), n = t, l = e, { init: h, isValid: v, validation: f } = Q(
|
|
121
121
|
{
|
|
122
122
|
validateOnMount: n.validateOnMount ?? !0,
|
|
123
123
|
validateOnInput: n.validateOnInput ?? !0,
|
|
@@ -127,13 +127,13 @@ const fe = {
|
|
|
127
127
|
errors: n.errors || [],
|
|
128
128
|
validate: n.validate
|
|
129
129
|
},
|
|
130
|
-
|
|
130
|
+
l
|
|
131
131
|
), _ = c(() => ({
|
|
132
132
|
invalid: !v.value
|
|
133
|
-
})), R = (b) => (i.value = b.target.value,
|
|
134
|
-
n.validateOnBlur && f(),
|
|
133
|
+
})), R = (b) => (i.value = b.target.value, l("update:modelValue", i.value), l("input", i.value), a(i.value), n.validateOnInput && f(), i.value), E = () => {
|
|
134
|
+
n.validateOnBlur && f(), l("blur");
|
|
135
135
|
}, q = () => {
|
|
136
|
-
|
|
136
|
+
l("focus");
|
|
137
137
|
};
|
|
138
138
|
return U(() => {
|
|
139
139
|
h();
|
|
@@ -148,15 +148,15 @@ const fe = {
|
|
|
148
148
|
required: n.required
|
|
149
149
|
}, {
|
|
150
150
|
default: K(() => [
|
|
151
|
-
G(
|
|
151
|
+
G(z(n.label), 1)
|
|
152
152
|
]),
|
|
153
153
|
_: 1
|
|
154
154
|
}, 8, ["id", "required"])) : y("", !0),
|
|
155
|
-
|
|
155
|
+
T(b.$slots, "default", M(re({ inputValue: i.value, onBlur: E, onFocus: q, onInput: R, isValid: V(v), inputClasses: _.value })), void 0, !0),
|
|
156
156
|
le(ge)
|
|
157
157
|
], 2));
|
|
158
158
|
}
|
|
159
|
-
}),
|
|
159
|
+
}), $e = /* @__PURE__ */ $(Oe, [["__scopeId", "data-v-751bf20e"]]), be = ["innerHTML"], Be = ["src", "alt"], Ce = /* @__PURE__ */ O({
|
|
160
160
|
__name: "Icon",
|
|
161
161
|
props: {
|
|
162
162
|
className: {},
|
|
@@ -164,12 +164,12 @@ const fe = {
|
|
|
164
164
|
iconClass: {},
|
|
165
165
|
src: {},
|
|
166
166
|
svgRaw: {},
|
|
167
|
-
variant: {},
|
|
167
|
+
variant: { default: "default" },
|
|
168
168
|
size: { default: "small" },
|
|
169
169
|
inline: { type: Boolean },
|
|
170
170
|
shadow: { type: Boolean },
|
|
171
171
|
decorative: { type: Boolean },
|
|
172
|
-
ariaLabel: {}
|
|
172
|
+
ariaLabel: { default: void 0 }
|
|
173
173
|
},
|
|
174
174
|
setup(t) {
|
|
175
175
|
const e = t, a = c(() => ve(
|
|
@@ -185,7 +185,7 @@ const fe = {
|
|
|
185
185
|
"aria-label": e.ariaLabel,
|
|
186
186
|
role: "img"
|
|
187
187
|
});
|
|
188
|
-
return (n,
|
|
188
|
+
return (n, l) => (s(), u("span", w({ class: a.value }, i.value), [
|
|
189
189
|
e.iconDefinition ? (s(), C(V(de), {
|
|
190
190
|
key: 0,
|
|
191
191
|
icon: e.iconDefinition
|
|
@@ -203,7 +203,7 @@ const fe = {
|
|
|
203
203
|
}, null, 8, Be)) : y("", !0)
|
|
204
204
|
], 16));
|
|
205
205
|
}
|
|
206
|
-
}), F = /* @__PURE__ */
|
|
206
|
+
}), F = /* @__PURE__ */ $(Ce, [["__scopeId", "data-v-1fe4be50"]]), ke = { key: 1 }, Re = /* @__PURE__ */ O({
|
|
207
207
|
__name: "ActionContent",
|
|
208
208
|
props: {
|
|
209
209
|
iconRight: { type: Boolean, default: !1 },
|
|
@@ -212,6 +212,7 @@ const fe = {
|
|
|
212
212
|
text: { default: void 0 },
|
|
213
213
|
size: { default: void 0 },
|
|
214
214
|
shadow: { type: Boolean },
|
|
215
|
+
iconSize: { default: void 0 },
|
|
215
216
|
iconDefinition: {},
|
|
216
217
|
iconClass: {},
|
|
217
218
|
src: {},
|
|
@@ -219,32 +220,50 @@ const fe = {
|
|
|
219
220
|
variant: {}
|
|
220
221
|
},
|
|
221
222
|
setup(t) {
|
|
222
|
-
const e = t, a = c(() => e.iconDefinition || e.iconClass || e.src || e.svgRaw), i =
|
|
223
|
+
const e = t, a = c(() => e.iconDefinition || e.iconClass || e.src || e.svgRaw), i = (l) => {
|
|
224
|
+
if (l.iconOnly)
|
|
225
|
+
switch (l.size) {
|
|
226
|
+
case "small":
|
|
227
|
+
return "extra-small";
|
|
228
|
+
case "extra-small":
|
|
229
|
+
return "xxsmall";
|
|
230
|
+
default:
|
|
231
|
+
return l.size || "medium";
|
|
232
|
+
}
|
|
233
|
+
else
|
|
234
|
+
switch (l.size) {
|
|
235
|
+
case "small":
|
|
236
|
+
case "extra-small":
|
|
237
|
+
return "xxsmall";
|
|
238
|
+
default:
|
|
239
|
+
return "extra-small";
|
|
240
|
+
}
|
|
241
|
+
}, n = c(
|
|
223
242
|
() => ({
|
|
224
243
|
iconDefinition: e.iconDefinition,
|
|
225
244
|
iconClass: e.iconClass,
|
|
226
245
|
src: e.src,
|
|
227
246
|
svgRaw: e.svgRaw,
|
|
228
|
-
size: e.
|
|
247
|
+
size: e.iconSize ?? i(e),
|
|
229
248
|
decorative: !0,
|
|
230
249
|
class: "icon",
|
|
231
250
|
inline: e.inline ?? !e.iconOnly,
|
|
232
251
|
shadow: e.shadow
|
|
233
252
|
})
|
|
234
253
|
);
|
|
235
|
-
return (
|
|
236
|
-
a.value && !e.iconRight ? (s(), C(F,
|
|
254
|
+
return (l, h) => (s(), u(H, null, [
|
|
255
|
+
a.value && !e.iconRight ? (s(), C(F, M(w({ key: 0 }, n.value)), null, 16)) : y("", !0),
|
|
237
256
|
e.iconOnly ? y("", !0) : (s(), u("span", ke, [
|
|
238
|
-
|
|
239
|
-
G(
|
|
257
|
+
T(l.$slots, "default", {}, () => [
|
|
258
|
+
G(z(e.text), 1)
|
|
240
259
|
])
|
|
241
260
|
])),
|
|
242
|
-
a.value && e.iconRight ? (s(), C(F,
|
|
261
|
+
a.value && e.iconRight ? (s(), C(F, M(w({ key: 2 }, n.value)), null, 16)) : y("", !0)
|
|
243
262
|
], 64));
|
|
244
263
|
}
|
|
245
264
|
}), P = (t) => "to" in t && t.to !== void 0;
|
|
246
265
|
function Ie() {
|
|
247
|
-
const t =
|
|
266
|
+
const t = oe("router", null), e = c(() => t !== null);
|
|
248
267
|
return {
|
|
249
268
|
router: t,
|
|
250
269
|
hasRouter: e
|
|
@@ -273,46 +292,46 @@ const Ee = /* @__PURE__ */ O({
|
|
|
273
292
|
...e.disabled && { "aria-disabled": "true" },
|
|
274
293
|
...e.ariaLabel && { "aria-label": e.ariaLabel }
|
|
275
294
|
});
|
|
276
|
-
return (
|
|
295
|
+
return (l, h) => (s(), C(ue(i.value), w({ class: t.className }, n.value), {
|
|
277
296
|
default: K(() => [
|
|
278
|
-
|
|
297
|
+
T(l.$slots, "default")
|
|
279
298
|
]),
|
|
280
299
|
_: 3
|
|
281
300
|
}, 16, ["class"]));
|
|
282
301
|
}
|
|
283
|
-
}), m = k({}), g = k(), L = 400,
|
|
302
|
+
}), m = k({}), g = k(), L = 400, x = k(null);
|
|
284
303
|
function qe(t) {
|
|
285
|
-
const e = t?.group ?? "global", a = (
|
|
286
|
-
m.value[e][
|
|
287
|
-
}, i = (
|
|
288
|
-
m.value[e] = { [
|
|
289
|
-
}, n = (
|
|
290
|
-
a(
|
|
291
|
-
}, h = (
|
|
292
|
-
i(
|
|
304
|
+
const e = t?.group ?? "global", a = (r, d) => {
|
|
305
|
+
m.value[e][r] = d;
|
|
306
|
+
}, i = (r, d) => {
|
|
307
|
+
m.value[e] = { [r]: d };
|
|
308
|
+
}, n = (r) => m.value[e]?.[r] ?? !1, l = (r) => {
|
|
309
|
+
a(r, !n(r));
|
|
310
|
+
}, h = (r) => {
|
|
311
|
+
i(r, !n(r));
|
|
293
312
|
}, v = () => {
|
|
294
313
|
m.value[e] = {};
|
|
295
|
-
}, f = (
|
|
296
|
-
|
|
297
|
-
}, _ = (
|
|
314
|
+
}, f = (r) => {
|
|
315
|
+
r.key === "Escape" && (a(t.id, !1), p());
|
|
316
|
+
}, _ = (r) => {
|
|
298
317
|
if (!t) return;
|
|
299
|
-
const d =
|
|
318
|
+
const d = r.target, [I] = Object.keys(m.value[e]).filter((ee) => m.value[e][ee] === !0), B = document.getElementById(I), Y = document.querySelector(`[aria-controls="${I}"]`), Z = d.getAttribute("aria-controls") === I || Y?.contains(r.target);
|
|
300
319
|
B && !B.contains(d) && !Z && (a(t.id, !1), p());
|
|
301
320
|
}, R = () => {
|
|
302
321
|
t && (g.value = setTimeout(() => {
|
|
303
322
|
a(t.id, !1), p();
|
|
304
323
|
}, L));
|
|
305
324
|
}, E = () => {
|
|
306
|
-
t && t.mouseOverToggle === !0 && (
|
|
307
|
-
|
|
325
|
+
t && t.mouseOverToggle === !0 && (x.value = t.id, g.value = setTimeout(() => {
|
|
326
|
+
D();
|
|
308
327
|
}, L));
|
|
309
328
|
}, q = () => {
|
|
310
|
-
t && t.mouseOverToggle === !0 && (
|
|
311
|
-
|
|
329
|
+
t && t.mouseOverToggle === !0 && (x.value = null, clearTimeout(g.value), g.value = setTimeout(() => {
|
|
330
|
+
x.value !== t.id && (a(t.id, !1), p());
|
|
312
331
|
}, L));
|
|
313
|
-
}, b = (
|
|
332
|
+
}, b = (r) => {
|
|
314
333
|
if (!t) return;
|
|
315
|
-
const { relatedTarget: d } =
|
|
334
|
+
const { relatedTarget: d } = r;
|
|
316
335
|
if (!d || d.getAttribute("aria-controls") === t.id)
|
|
317
336
|
return;
|
|
318
337
|
const B = document.getElementById(t.id);
|
|
@@ -323,12 +342,12 @@ function qe(t) {
|
|
|
323
342
|
t && (t.outsideClickClose && (document.addEventListener("click", _), document.addEventListener("touchend", _)), t.escapeKeyClose && document.addEventListener("keydown", f));
|
|
324
343
|
}, p = () => {
|
|
325
344
|
document.removeEventListener("click", _), document.removeEventListener("touchend", _), document.removeEventListener("keydown", f), document.removeEventListener("scroll", R);
|
|
326
|
-
},
|
|
327
|
-
t && (
|
|
328
|
-
}, X = (
|
|
329
|
-
t && (
|
|
330
|
-
},
|
|
331
|
-
t && (
|
|
345
|
+
}, A = (r) => {
|
|
346
|
+
t && (r?.preventDefault(), clearTimeout(g.value), S());
|
|
347
|
+
}, X = (r) => {
|
|
348
|
+
t && (A(r), t.openSingle ? h(t.id) : l(t.id));
|
|
349
|
+
}, D = (r) => {
|
|
350
|
+
t && (A(r), t.openSingle ? i(t.id, !0) : a(t.id, !0));
|
|
332
351
|
};
|
|
333
352
|
return U(() => {
|
|
334
353
|
m.value[e] || v();
|
|
@@ -337,7 +356,7 @@ function qe(t) {
|
|
|
337
356
|
}), {
|
|
338
357
|
state: m,
|
|
339
358
|
timeout: g,
|
|
340
|
-
toggle:
|
|
359
|
+
toggle: l,
|
|
341
360
|
toggleSingle: h,
|
|
342
361
|
setCollapsed: a,
|
|
343
362
|
setSingleCollapsed: i,
|
|
@@ -347,7 +366,7 @@ function qe(t) {
|
|
|
347
366
|
onMouseLeave: q,
|
|
348
367
|
focusChange: b,
|
|
349
368
|
onClickToggle: X,
|
|
350
|
-
onClickOpen:
|
|
369
|
+
onClickOpen: D
|
|
351
370
|
};
|
|
352
371
|
}
|
|
353
372
|
export {
|
|
@@ -356,10 +375,10 @@ export {
|
|
|
356
375
|
ge as ErrorList,
|
|
357
376
|
F as Icon,
|
|
358
377
|
pe as InputLabel,
|
|
359
|
-
|
|
378
|
+
$e as InputWrap,
|
|
360
379
|
ve as cn,
|
|
361
|
-
|
|
362
|
-
|
|
380
|
+
we as debounce,
|
|
381
|
+
Te as generateRandomId,
|
|
363
382
|
P as isRouterLink,
|
|
364
383
|
qe as useCollapse,
|
|
365
384
|
J as useInput,
|
|
@@ -42,6 +42,13 @@
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
.phila-icon--extra-small {
|
|
45
|
+
font-size: var(--Icon-Solid-ExtraSmall-font-icon-solid-xs-size);
|
|
46
|
+
height: var(--dimension-core-300);
|
|
47
|
+
width: var(--dimension-core-300);
|
|
48
|
+
padding: var(--spacing-xs);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.phila-icon--xxsmall {
|
|
45
52
|
font-size: var(--Icon-Solid-XXSmall-font-icon-solid-xxs-size);
|
|
46
53
|
height: var(--dimension-core-300);
|
|
47
54
|
width: var(--dimension-core-300);
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/* Resets inherited link color tokens back to their defaults.
|
|
2
|
+
Apply to any container that has a standard surface background but sits inside
|
|
3
|
+
a colored ancestor (e.g. has-background-primary) that overrides link colors. */
|
|
4
|
+
.resets-link-colors {
|
|
5
|
+
--Base-font-variables-Color-Link-link-default: initial;
|
|
6
|
+
--Extended-Colors-link-default: initial;
|
|
7
|
+
--Extended-Colors-link-hover: initial;
|
|
8
|
+
--Extended-Colors-link-visited: initial;
|
|
9
|
+
}
|
|
10
|
+
|
|
1
11
|
.has-background-ben-franklin-blue {
|
|
2
12
|
background-color: var(--dark-ben-franklin-blue);
|
|
3
13
|
}
|
|
@@ -59,6 +59,13 @@
|
|
|
59
59
|
font-weight: 400;
|
|
60
60
|
line-height: var(--Body-Small-font-body-small-lineheight) !important;
|
|
61
61
|
}
|
|
62
|
+
.has-text-body-extra-small {
|
|
63
|
+
font-family: var(--Body-ExtraSmall-font-body-xs-family) !important;
|
|
64
|
+
font-size: var(--Body-ExtraSmall-font-body-xs-size) !important;
|
|
65
|
+
font-style: normal;
|
|
66
|
+
font-weight: 400;
|
|
67
|
+
line-height: var(--Body-ExtraSmall-font-body-xs-lineheight) !important;
|
|
68
|
+
}
|
|
62
69
|
.has-text-body-large {
|
|
63
70
|
font-family: var(--Body-Large-font-body-large-family) !important;
|
|
64
71
|
font-size: var(--Body-Large-font-body-large-size) !important;
|