@superruudje/picobello 0.1.0-beta.2 → 0.1.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +206 -54
- package/dist/picobello.css +1 -1
- package/package.json +14 -3
package/README.md
CHANGED
|
@@ -18,6 +18,7 @@ npm install @rudihaamke/picobello@beta
|
|
|
18
18
|
## Usage
|
|
19
19
|
|
|
20
20
|
### Import styles (required)
|
|
21
|
+
|
|
21
22
|
Import the global styles once in your app entry:
|
|
22
23
|
|
|
23
24
|
```ts
|
|
@@ -26,6 +27,7 @@ import "@rudihaamke/picobello/dist/style.css";
|
|
|
26
27
|
```
|
|
27
28
|
|
|
28
29
|
### Use components
|
|
30
|
+
|
|
29
31
|
```vue
|
|
30
32
|
<script setup lang="ts">
|
|
31
33
|
import { Button, Heading, Flex } from "@rudihaamke/picobello";
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=["aria-hidden"],d=e.defineComponent({__name:"Icon",props:{name:{},size:{default:"1em"},title:{}},setup(t){return(a,l)=>(e.openBlock(),e.createElementBlock("i",{class:e.normalizeClass(["bi",`bi-${t.name}`]),style:e.normalizeStyle({fontSize:typeof t.size=="number"?`${t.size}px`:t.size}),"aria-hidden":t.title?void 0:"true",role:"img"},null,14,u))}}),f={class:"alert__icon"},m={class:"alert__content"},v=e.defineComponent({__name:"Alert",props:{type:{default:"info"}},setup(t){const a=t,l=e.computed(()=>a.type==="warning"?"exclamation-circle-fill":a.type==="success"?"check-circle-fill":a.type==="info"?"info-circle-fill":a.type==="danger"?"x-circle-fill":"");return(o,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([`alert--${a.type}`,"alert"])},[e.createElementVNode("div",f,[e.renderSlot(o.$slots,"alert-icon",{},()=>[e.createVNode(d,{name:l.value},null,8,["name"])])]),e.createElementVNode("div",m,[e.renderSlot(o.$slots,"alert-content")])],2))}}),p={key:0,class:"btn__text"},y=e.defineComponent({__name:"Button",props:{label:{},variant:{default:"primary"},size:{default:"default"},disabled:{type:Boolean,default:!1},active:{type:Boolean,default:!1},as:{default:"button"},href:{},type:{default:"button"}},setup(t){const a=t,l=e.computed(()=>["btn",`btn--${a.variant}`,a.size==="small"&&"btn--small",a.disabled&&"btn--disabled",a.active&&"active"]),o=n=>{a.disabled&&(n.preventDefault(),n.stopImmediatePropagation())};return(n,i)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.as),{"aria-disabled":t.as!=="button"?t.disabled:void 0,class:e.normalizeClass(l.value),disabled:t.as==="button"?t.disabled:void 0,href:t.as==="a"&&!t.disabled?t.href:void 0,type:t.as==="button"?t.type:void 0,onClick:o},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"icon-left"),t.label?(e.openBlock(),e.createElementBlock("span",p,e.toDisplayString(t.label),1)):e.renderSlot(n.$slots,"default",{key:1}),e.renderSlot(n.$slots,"icon-right")]),_:3},8,["aria-disabled","class","disabled","href","type"]))}}),b={class:"card"},h={key:0,class:"card__header"},g={key:0,class:"card__title"},C=["aria-expanded"],k={key:1,class:"card__footer"},$={class:"card__footer-content"},B=e.defineComponent({__name:"Card",props:{title:{},collapsible:{type:Boolean,default:!1},defaultCollapsed:{type:Boolean,default:!1}},setup(t){const a=t,l=e.useSlots(),o=e.computed(()=>!!a.title||!!l["header-icon"]),n=e.computed(()=>!!l["footer-content"]),i=e.ref(a.defaultCollapsed);function r(){i.value=!i.value}return(s,c)=>(e.openBlock(),e.createElementBlock("div",b,[o.value?(e.openBlock(),e.createElementBlock("div",h,[e.renderSlot(s.$slots,"header-icon"),t.title?(e.openBlock(),e.createElementBlock("h3",g,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),e.renderSlot(s.$slots,"header-buttons"),t.collapsible?(e.openBlock(),e.createElementBlock("button",{key:1,"aria-expanded":!i.value,class:"card__collapse-toggle btn btn--small btn--secondary",type:"button",onClick:r},[e.renderSlot(s.$slots,"collapse-indicator",{},()=>[e.createElementVNode("i",{class:e.normalizeClass([{"is-collapsed":i.value},"bi bi-chevron-up"])},null,2)])],8,C)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass([{"with-header":o.value},"card__body"])},[e.renderSlot(s.$slots,"card-body")],2),[[e.vShow,!i.value]]),n.value&&!i.value?(e.openBlock(),e.createElementBlock("div",k,[e.createElementVNode("div",$,[e.renderSlot(s.$slots,"footer-content")])])):e.createCommentVNode("",!0)]))}}),E=e.defineComponent({__name:"Flex",props:{direction:{default:"row"},gap:{default:"md"},align:{},justify:{},wrap:{type:Boolean,default:!1},inline:{type:Boolean,default:!1}},setup(t){const a=t,l=e.computed(()=>typeof a.gap=="number"?{gap:`${a.gap}px`}:{});return(o,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex",`flex--${t.direction}`,typeof t.gap=="string"&&`flex--gap-${t.gap}`,t.align&&`flex--align-${t.align}`,t.justify&&`flex--justify-${t.justify}`,t.wrap&&"flex--wrap",t.inline&&"flex--inline"]),style:e.normalizeStyle(l.value)},[e.renderSlot(o.$slots,"default")],6))}}),S=e.defineComponent({__name:"Heading",props:{level:{default:2},visual:{}},setup(t){const a=t,l=e.computed(()=>`h${a.level}`),o=e.computed(()=>a.visual??a.level);return(n,i)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value),{class:e.normalizeClass(["heading",`heading--h${o.value}`])},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:3},8,["class"]))}}),x=["aria-invalid","disabled","placeholder","readonly","type","value"],z=e.defineComponent({__name:"Input",props:{modelValue:{},type:{default:"text"},width:{default:"m"},size:{default:"default"},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},placeholder:{}},emits:["update:modelValue","blur","focus","change"],setup(t,{emit:a}){const l=a,o=e.useAttrs(),n=e.computed(()=>{const{class:r,style:s,...c}=o;return c});function i(r){l("update:modelValue",r.target.value)}return(r,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([`input-wrapper--${t.width}`,"input-wrapper"])},[e.createElementVNode("input",e.mergeProps({"aria-invalid":t.invalid?"true":void 0,class:[[t.size==="large"&&"input--large",t.disabled&&"input--disabled",t.invalid&&"input--invalid"],"input"],disabled:t.disabled,placeholder:t.placeholder,readonly:t.readonly,type:t.type,value:t.modelValue},n.value,{onBlur:s[0]||(s[0]=c=>r.$emit("blur",c)),onChange:s[1]||(s[1]=c=>r.$emit("change",c)),onFocus:s[2]||(s[2]=c=>r.$emit("focus",c)),onInput:i}),null,16,x)],2))}}),w="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2080%2080'%3e%3cstyle%20type='text/css'%3e%20g.spinner-outer%20{%20animation:%20rotate%202s%20linear%20infinite;%20transform-origin:%2050%25%2050%25;%20}%20@keyframes%20rotate%20{%20to%20{%20transform:%20rotateZ(360deg)}%20}%20circle%20{%20display:%20block;%20fill:%20transparent;%20stroke-width:%204px;%20stroke:%20%23E6EEF7;%20}%20circle.spinner-inner%20{%20animation:%20spin%201.5s%20ease-in-out%20infinite%20both;%20stroke:%20%233291F0;%20stroke-linecap:%20round;%20stroke-dasharray:%20215;%20transform-origin:%2050%25%2050%25;%20}%20@keyframes%20spin%20{%200%25,%2025%25%20{%20stroke-dashoffset:%20210;%20transform:%20rotate(0);%20}%2050%25,%2075%25%20{%20stroke-dashoffset:%2055;%20transform:%20rotate(45deg);%20}%20100%25%20{%20stroke-dashoffset:%20210;%20transform:%20rotate(360deg);%20}%20}%20.logo-container%20{%20animation:%20float%202s%20ease-in-out%20infinite%20alternate;%20transform-origin:%20center;%20}%20@keyframes%20float%20{%20to%20{%20transform:%20translate(40,40)%20translateY(-3px);%20}%20}%20%3c/style%3e%3cg%20class='logo-container'%20transform='translate(40,%2040)'%3e%3cg%20transform='scale(1.2)%20translate(-17,%20-11)'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M17.6799%203.10235C21.8055%20-0.186896%2027.9891%200.367995%2031.494%204.33645C34.9979%208.3039%2034.499%2014.1882%2030.3745%2017.4763L25.0703%2021.7052C24.5091%2022.1524%2023.6703%2022.0832%2023.1989%2021.5495L22.3243%2020.5592C21.8532%2020.0257%2021.9278%2019.2277%2022.4906%2018.7793L27.7907%2014.5536C30.2302%2012.6088%2030.5261%209.12242%2028.4457%206.76675C26.3649%204.41041%2022.7007%204.08226%2020.2609%206.0274L11.0169%2013.3971C10.4532%2013.8464%209.61603%2013.7772%209.14388%2013.2428L8.26927%2012.2523C7.79836%2011.719%207.87229%2010.9214%208.43469%2010.4731L17.6799%203.10235ZM8.75677%200.294978C9.31792%20-0.152436%2010.1567%20-0.0832017%2010.6282%200.450462L11.5028%201.44097C11.974%201.9743%2011.8992%202.77244%2011.3366%203.22086L6.0363%207.44637C3.59685%209.39135%203.30094%2012.8777%205.38136%2015.2333C7.46231%2017.5895%2011.1265%2017.9178%2013.5663%2015.9727L22.8103%208.60298C23.374%208.15355%2024.211%208.22278%2024.6831%208.75729L25.5578%209.74763C26.0287%2010.281%2025.9547%2011.0786%2025.3925%2011.5268L16.1471%2018.8977C12.0215%2022.1868%205.8379%2021.6321%202.33307%2017.6635C-1.17088%2013.696%20-0.671964%207.81192%203.45253%204.52369L8.75677%200.294978Z'%20fill='%230073E6'/%3e%3c/g%3e%3c/g%3e%3ccircle%20class='circle'%20cx='40'%20cy='40'%20r='34'/%3e%3cg%20class='spinner-outer'%3e%3ccircle%20class='spinner-inner'%20cx='40'%20cy='40'%20r='34'/%3e%3c/g%3e%3c/svg%3e",V=["aria-label"],N=["src"],L=e.defineComponent({__name:"Loader",props:{size:{default:"medium"},label:{default:"Loading"}},setup(t){return(a,l)=>(e.openBlock(),e.createElementBlock("div",{class:"loader",role:"status","aria-live":"polite","aria-label":t.label},[e.createElementVNode("div",{class:e.normalizeClass(["loader__container",`loader__container--${t.size}`])},[e.renderSlot(a.$slots,"icon",{},()=>[e.createElementVNode("img",{class:"loader__image",src:e.unref(w),alt:""},null,8,N)])],2)],8,V))}}),D={class:"nav-card__media"},_={class:"nav-card__content"},F={class:"nav-card__title"},I={key:0,class:"nav-card__subtext"},j=e.defineComponent({__name:"NavigationCard",props:{title:{},subtext:{},href:{},as:{default:"div"},disabled:{type:Boolean,default:!1}},setup(t){return(a,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.as),{class:"nav-card",href:t.as==="a"&&!t.disabled?t.href:void 0,"aria-disabled":t.disabled?"true":void 0,tabindex:t.disabled?-1:0},{default:e.withCtx(()=>[e.createElementVNode("div",D,[e.renderSlot(a.$slots,"image")]),e.createElementVNode("div",_,[e.createElementVNode("div",F,e.toDisplayString(t.title),1),t.subtext?(e.openBlock(),e.createElementBlock("p",I,e.toDisplayString(t.subtext),1)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"default")])]),_:3},8,["href","aria-disabled","tabindex"]))}});exports.Alert=v;exports.Button=y;exports.Card=B;exports.Flex=E;exports.Heading=S;exports.Icon=d;exports.Input=z;exports.Loader=L;exports.NavigationCard=j;
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as f, createElementBlock as r, openBlock as l, normalizeStyle as C, normalizeClass as u, computed as b, createElementVNode as d, renderSlot as s, createVNode as k, createBlock as g, resolveDynamicComponent as $, withCtx as p, toDisplayString as y, useSlots as x, ref as w, createCommentVNode as h, withDirectives as B, vShow as L, useAttrs as z, mergeProps as _, unref as V } from "vue";
|
|
2
|
+
const E = ["aria-hidden"], F = /* @__PURE__ */ f({
|
|
3
3
|
__name: "Icon",
|
|
4
4
|
props: {
|
|
5
5
|
name: {},
|
|
@@ -7,37 +7,37 @@ const S = ["aria-hidden"], w = /* @__PURE__ */ h({
|
|
|
7
7
|
title: {}
|
|
8
8
|
},
|
|
9
9
|
setup(e) {
|
|
10
|
-
return (t,
|
|
10
|
+
return (t, a) => (l(), r("i", {
|
|
11
11
|
class: u(["bi", `bi-${e.name}`]),
|
|
12
|
-
style:
|
|
12
|
+
style: C({ fontSize: typeof e.size == "number" ? `${e.size}px` : e.size }),
|
|
13
13
|
"aria-hidden": e.title ? void 0 : "true",
|
|
14
14
|
role: "img"
|
|
15
|
-
}, null, 14,
|
|
15
|
+
}, null, 14, E));
|
|
16
16
|
}
|
|
17
|
-
}),
|
|
17
|
+
}), I = { class: "alert__icon" }, S = { class: "alert__content" }, R = /* @__PURE__ */ f({
|
|
18
18
|
__name: "Alert",
|
|
19
19
|
props: {
|
|
20
20
|
type: { default: "info" }
|
|
21
21
|
},
|
|
22
22
|
setup(e) {
|
|
23
|
-
const t = e,
|
|
24
|
-
return (i,
|
|
23
|
+
const t = e, a = b(() => t.type === "warning" ? "exclamation-circle-fill" : t.type === "success" ? "check-circle-fill" : t.type === "info" ? "info-circle-fill" : t.type === "danger" ? "x-circle-fill" : "");
|
|
24
|
+
return (i, n) => (l(), r("div", {
|
|
25
25
|
class: u([`alert--${t.type}`, "alert"])
|
|
26
26
|
}, [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
d("div", I, [
|
|
28
|
+
s(i.$slots, "alert-icon", {}, () => [
|
|
29
|
+
k(F, { name: a.value }, null, 8, ["name"])
|
|
30
30
|
])
|
|
31
31
|
]),
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
d("div", S, [
|
|
33
|
+
s(i.$slots, "alert-content")
|
|
34
34
|
])
|
|
35
35
|
], 2));
|
|
36
36
|
}
|
|
37
|
-
}),
|
|
37
|
+
}), N = {
|
|
38
38
|
key: 0,
|
|
39
39
|
class: "btn__text"
|
|
40
|
-
},
|
|
40
|
+
}, T = /* @__PURE__ */ f({
|
|
41
41
|
__name: "Button",
|
|
42
42
|
props: {
|
|
43
43
|
label: {},
|
|
@@ -50,41 +50,41 @@ const S = ["aria-hidden"], w = /* @__PURE__ */ h({
|
|
|
50
50
|
type: { default: "button" }
|
|
51
51
|
},
|
|
52
52
|
setup(e) {
|
|
53
|
-
const t = e,
|
|
53
|
+
const t = e, a = b(() => [
|
|
54
54
|
"btn",
|
|
55
55
|
`btn--${t.variant}`,
|
|
56
56
|
t.size === "small" && "btn--small",
|
|
57
57
|
t.disabled && "btn--disabled",
|
|
58
58
|
t.active && "active"
|
|
59
|
-
]), i = (
|
|
60
|
-
t.disabled && (
|
|
59
|
+
]), i = (n) => {
|
|
60
|
+
t.disabled && (n.preventDefault(), n.stopImmediatePropagation());
|
|
61
61
|
};
|
|
62
|
-
return (
|
|
62
|
+
return (n, c) => (l(), g($(e.as), {
|
|
63
63
|
"aria-disabled": e.as !== "button" ? e.disabled : void 0,
|
|
64
|
-
class: u(
|
|
64
|
+
class: u(a.value),
|
|
65
65
|
disabled: e.as === "button" ? e.disabled : void 0,
|
|
66
66
|
href: e.as === "a" && !e.disabled ? e.href : void 0,
|
|
67
67
|
type: e.as === "button" ? e.type : void 0,
|
|
68
68
|
onClick: i
|
|
69
69
|
}, {
|
|
70
|
-
default:
|
|
71
|
-
|
|
72
|
-
e.label ? (
|
|
73
|
-
|
|
70
|
+
default: p(() => [
|
|
71
|
+
s(n.$slots, "icon-left"),
|
|
72
|
+
e.label ? (l(), r("span", N, y(e.label), 1)) : s(n.$slots, "default", { key: 1 }),
|
|
73
|
+
s(n.$slots, "icon-right")
|
|
74
74
|
]),
|
|
75
75
|
_: 3
|
|
76
76
|
}, 8, ["aria-disabled", "class", "disabled", "href", "type"]));
|
|
77
77
|
}
|
|
78
|
-
}),
|
|
78
|
+
}), j = { class: "card" }, A = {
|
|
79
79
|
key: 0,
|
|
80
80
|
class: "card__header"
|
|
81
|
-
},
|
|
81
|
+
}, D = {
|
|
82
82
|
key: 0,
|
|
83
83
|
class: "card__title"
|
|
84
|
-
},
|
|
84
|
+
}, H = ["aria-expanded"], Z = {
|
|
85
85
|
key: 1,
|
|
86
86
|
class: "card__footer"
|
|
87
|
-
},
|
|
87
|
+
}, M = { class: "card__footer-content" }, W = /* @__PURE__ */ f({
|
|
88
88
|
__name: "Card",
|
|
89
89
|
props: {
|
|
90
90
|
title: {},
|
|
@@ -92,46 +92,198 @@ const S = ["aria-hidden"], w = /* @__PURE__ */ h({
|
|
|
92
92
|
defaultCollapsed: { type: Boolean, default: !1 }
|
|
93
93
|
},
|
|
94
94
|
setup(e) {
|
|
95
|
-
const t = e,
|
|
96
|
-
function
|
|
95
|
+
const t = e, a = x(), i = b(() => !!t.title || !!a["header-icon"]), n = b(() => !!a["footer-content"]), c = w(t.defaultCollapsed);
|
|
96
|
+
function m() {
|
|
97
97
|
c.value = !c.value;
|
|
98
98
|
}
|
|
99
|
-
return (
|
|
100
|
-
i.value ? (
|
|
101
|
-
|
|
102
|
-
e.title ? (
|
|
103
|
-
|
|
104
|
-
e.collapsible ? (
|
|
99
|
+
return (o, v) => (l(), r("div", j, [
|
|
100
|
+
i.value ? (l(), r("div", A, [
|
|
101
|
+
s(o.$slots, "header-icon"),
|
|
102
|
+
e.title ? (l(), r("h3", D, y(e.title), 1)) : h("", !0),
|
|
103
|
+
s(o.$slots, "header-buttons"),
|
|
104
|
+
e.collapsible ? (l(), r("button", {
|
|
105
105
|
key: 1,
|
|
106
|
+
"aria-expanded": !c.value,
|
|
106
107
|
class: "card__collapse-toggle btn btn--small btn--secondary",
|
|
107
108
|
type: "button",
|
|
108
|
-
onClick:
|
|
109
|
-
"aria-expanded": !c.value
|
|
109
|
+
onClick: m
|
|
110
110
|
}, [
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
class: u([
|
|
111
|
+
s(o.$slots, "collapse-indicator", {}, () => [
|
|
112
|
+
d("i", {
|
|
113
|
+
class: u([{ "is-collapsed": c.value }, "bi bi-chevron-up"])
|
|
114
114
|
}, null, 2)
|
|
115
115
|
])
|
|
116
|
-
], 8,
|
|
117
|
-
])) :
|
|
118
|
-
|
|
119
|
-
class: u([
|
|
116
|
+
], 8, H)) : h("", !0)
|
|
117
|
+
])) : h("", !0),
|
|
118
|
+
B(d("div", {
|
|
119
|
+
class: u([{ "with-header": i.value }, "card__body"])
|
|
120
120
|
}, [
|
|
121
|
-
|
|
121
|
+
s(o.$slots, "card-body")
|
|
122
122
|
], 2), [
|
|
123
|
-
[
|
|
123
|
+
[L, !c.value]
|
|
124
124
|
]),
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
n.value && !c.value ? (l(), r("div", Z, [
|
|
126
|
+
d("div", M, [
|
|
127
|
+
s(o.$slots, "footer-content")
|
|
128
128
|
])
|
|
129
|
-
])) :
|
|
129
|
+
])) : h("", !0)
|
|
130
130
|
]));
|
|
131
131
|
}
|
|
132
|
+
}), X = /* @__PURE__ */ f({
|
|
133
|
+
__name: "Flex",
|
|
134
|
+
props: {
|
|
135
|
+
direction: { default: "row" },
|
|
136
|
+
gap: { default: "md" },
|
|
137
|
+
align: {},
|
|
138
|
+
justify: {},
|
|
139
|
+
wrap: { type: Boolean, default: !1 },
|
|
140
|
+
inline: { type: Boolean, default: !1 }
|
|
141
|
+
},
|
|
142
|
+
setup(e) {
|
|
143
|
+
const t = e, a = b(() => typeof t.gap == "number" ? { gap: `${t.gap}px` } : {});
|
|
144
|
+
return (i, n) => (l(), r("div", {
|
|
145
|
+
class: u([
|
|
146
|
+
"flex",
|
|
147
|
+
`flex--${e.direction}`,
|
|
148
|
+
typeof e.gap == "string" && `flex--gap-${e.gap}`,
|
|
149
|
+
e.align && `flex--align-${e.align}`,
|
|
150
|
+
e.justify && `flex--justify-${e.justify}`,
|
|
151
|
+
e.wrap && "flex--wrap",
|
|
152
|
+
e.inline && "flex--inline"
|
|
153
|
+
]),
|
|
154
|
+
style: C(a.value)
|
|
155
|
+
}, [
|
|
156
|
+
s(i.$slots, "default")
|
|
157
|
+
], 6));
|
|
158
|
+
}
|
|
159
|
+
}), ee = /* @__PURE__ */ f({
|
|
160
|
+
__name: "Heading",
|
|
161
|
+
props: {
|
|
162
|
+
level: { default: 2 },
|
|
163
|
+
visual: {}
|
|
164
|
+
},
|
|
165
|
+
setup(e) {
|
|
166
|
+
const t = e, a = b(() => `h${t.level}`), i = b(() => t.visual ?? t.level);
|
|
167
|
+
return (n, c) => (l(), g($(a.value), {
|
|
168
|
+
class: u(["heading", `heading--h${i.value}`])
|
|
169
|
+
}, {
|
|
170
|
+
default: p(() => [
|
|
171
|
+
s(n.$slots, "default")
|
|
172
|
+
]),
|
|
173
|
+
_: 3
|
|
174
|
+
}, 8, ["class"]));
|
|
175
|
+
}
|
|
176
|
+
}), P = ["aria-invalid", "disabled", "placeholder", "readonly", "type", "value"], te = /* @__PURE__ */ f({
|
|
177
|
+
__name: "Input",
|
|
178
|
+
props: {
|
|
179
|
+
modelValue: {},
|
|
180
|
+
type: { default: "text" },
|
|
181
|
+
width: { default: "m" },
|
|
182
|
+
size: { default: "default" },
|
|
183
|
+
disabled: { type: Boolean, default: !1 },
|
|
184
|
+
readonly: { type: Boolean, default: !1 },
|
|
185
|
+
invalid: { type: Boolean, default: !1 },
|
|
186
|
+
placeholder: {}
|
|
187
|
+
},
|
|
188
|
+
emits: ["update:modelValue", "blur", "focus", "change"],
|
|
189
|
+
setup(e, { emit: t }) {
|
|
190
|
+
const a = t, i = z(), n = b(() => {
|
|
191
|
+
const { class: m, style: o, ...v } = i;
|
|
192
|
+
return v;
|
|
193
|
+
});
|
|
194
|
+
function c(m) {
|
|
195
|
+
a("update:modelValue", m.target.value);
|
|
196
|
+
}
|
|
197
|
+
return (m, o) => (l(), r("div", {
|
|
198
|
+
class: u([`input-wrapper--${e.width}`, "input-wrapper"])
|
|
199
|
+
}, [
|
|
200
|
+
d("input", _({
|
|
201
|
+
"aria-invalid": e.invalid ? "true" : void 0,
|
|
202
|
+
class: [[
|
|
203
|
+
e.size === "large" && "input--large",
|
|
204
|
+
e.disabled && "input--disabled",
|
|
205
|
+
e.invalid && "input--invalid"
|
|
206
|
+
], "input"],
|
|
207
|
+
disabled: e.disabled,
|
|
208
|
+
placeholder: e.placeholder,
|
|
209
|
+
readonly: e.readonly,
|
|
210
|
+
type: e.type,
|
|
211
|
+
value: e.modelValue
|
|
212
|
+
}, n.value, {
|
|
213
|
+
onBlur: o[0] || (o[0] = (v) => m.$emit("blur", v)),
|
|
214
|
+
onChange: o[1] || (o[1] = (v) => m.$emit("change", v)),
|
|
215
|
+
onFocus: o[2] || (o[2] = (v) => m.$emit("focus", v)),
|
|
216
|
+
onInput: c
|
|
217
|
+
}), null, 16, P)
|
|
218
|
+
], 2));
|
|
219
|
+
}
|
|
220
|
+
}), U = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2080%2080'%3e%3cstyle%20type='text/css'%3e%20g.spinner-outer%20{%20animation:%20rotate%202s%20linear%20infinite;%20transform-origin:%2050%25%2050%25;%20}%20@keyframes%20rotate%20{%20to%20{%20transform:%20rotateZ(360deg)}%20}%20circle%20{%20display:%20block;%20fill:%20transparent;%20stroke-width:%204px;%20stroke:%20%23E6EEF7;%20}%20circle.spinner-inner%20{%20animation:%20spin%201.5s%20ease-in-out%20infinite%20both;%20stroke:%20%233291F0;%20stroke-linecap:%20round;%20stroke-dasharray:%20215;%20transform-origin:%2050%25%2050%25;%20}%20@keyframes%20spin%20{%200%25,%2025%25%20{%20stroke-dashoffset:%20210;%20transform:%20rotate(0);%20}%2050%25,%2075%25%20{%20stroke-dashoffset:%2055;%20transform:%20rotate(45deg);%20}%20100%25%20{%20stroke-dashoffset:%20210;%20transform:%20rotate(360deg);%20}%20}%20.logo-container%20{%20animation:%20float%202s%20ease-in-out%20infinite%20alternate;%20transform-origin:%20center;%20}%20@keyframes%20float%20{%20to%20{%20transform:%20translate(40,40)%20translateY(-3px);%20}%20}%20%3c/style%3e%3cg%20class='logo-container'%20transform='translate(40,%2040)'%3e%3cg%20transform='scale(1.2)%20translate(-17,%20-11)'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M17.6799%203.10235C21.8055%20-0.186896%2027.9891%200.367995%2031.494%204.33645C34.9979%208.3039%2034.499%2014.1882%2030.3745%2017.4763L25.0703%2021.7052C24.5091%2022.1524%2023.6703%2022.0832%2023.1989%2021.5495L22.3243%2020.5592C21.8532%2020.0257%2021.9278%2019.2277%2022.4906%2018.7793L27.7907%2014.5536C30.2302%2012.6088%2030.5261%209.12242%2028.4457%206.76675C26.3649%204.41041%2022.7007%204.08226%2020.2609%206.0274L11.0169%2013.3971C10.4532%2013.8464%209.61603%2013.7772%209.14388%2013.2428L8.26927%2012.2523C7.79836%2011.719%207.87229%2010.9214%208.43469%2010.4731L17.6799%203.10235ZM8.75677%200.294978C9.31792%20-0.152436%2010.1567%20-0.0832017%2010.6282%200.450462L11.5028%201.44097C11.974%201.9743%2011.8992%202.77244%2011.3366%203.22086L6.0363%207.44637C3.59685%209.39135%203.30094%2012.8777%205.38136%2015.2333C7.46231%2017.5895%2011.1265%2017.9178%2013.5663%2015.9727L22.8103%208.60298C23.374%208.15355%2024.211%208.22278%2024.6831%208.75729L25.5578%209.74763C26.0287%2010.281%2025.9547%2011.0786%2025.3925%2011.5268L16.1471%2018.8977C12.0215%2022.1868%205.8379%2021.6321%202.33307%2017.6635C-1.17088%2013.696%20-0.671964%207.81192%203.45253%204.52369L8.75677%200.294978Z'%20fill='%230073E6'/%3e%3c/g%3e%3c/g%3e%3ccircle%20class='circle'%20cx='40'%20cy='40'%20r='34'/%3e%3cg%20class='spinner-outer'%3e%3ccircle%20class='spinner-inner'%20cx='40'%20cy='40'%20r='34'/%3e%3c/g%3e%3c/svg%3e", Y = ["aria-label"], q = ["src"], ae = /* @__PURE__ */ f({
|
|
221
|
+
__name: "Loader",
|
|
222
|
+
props: {
|
|
223
|
+
size: { default: "medium" },
|
|
224
|
+
label: { default: "Loading" }
|
|
225
|
+
},
|
|
226
|
+
setup(e) {
|
|
227
|
+
return (t, a) => (l(), r("div", {
|
|
228
|
+
class: "loader",
|
|
229
|
+
role: "status",
|
|
230
|
+
"aria-live": "polite",
|
|
231
|
+
"aria-label": e.label
|
|
232
|
+
}, [
|
|
233
|
+
d("div", {
|
|
234
|
+
class: u(["loader__container", `loader__container--${e.size}`])
|
|
235
|
+
}, [
|
|
236
|
+
s(t.$slots, "icon", {}, () => [
|
|
237
|
+
d("img", {
|
|
238
|
+
class: "loader__image",
|
|
239
|
+
src: V(U),
|
|
240
|
+
alt: ""
|
|
241
|
+
}, null, 8, q)
|
|
242
|
+
])
|
|
243
|
+
], 2)
|
|
244
|
+
], 8, Y));
|
|
245
|
+
}
|
|
246
|
+
}), G = { class: "nav-card__media" }, J = { class: "nav-card__content" }, K = { class: "nav-card__title" }, O = {
|
|
247
|
+
key: 0,
|
|
248
|
+
class: "nav-card__subtext"
|
|
249
|
+
}, le = /* @__PURE__ */ f({
|
|
250
|
+
__name: "NavigationCard",
|
|
251
|
+
props: {
|
|
252
|
+
title: {},
|
|
253
|
+
subtext: {},
|
|
254
|
+
href: {},
|
|
255
|
+
as: { default: "div" },
|
|
256
|
+
disabled: { type: Boolean, default: !1 }
|
|
257
|
+
},
|
|
258
|
+
setup(e) {
|
|
259
|
+
return (t, a) => (l(), g($(e.as), {
|
|
260
|
+
class: "nav-card",
|
|
261
|
+
href: e.as === "a" && !e.disabled ? e.href : void 0,
|
|
262
|
+
"aria-disabled": e.disabled ? "true" : void 0,
|
|
263
|
+
tabindex: e.disabled ? -1 : 0
|
|
264
|
+
}, {
|
|
265
|
+
default: p(() => [
|
|
266
|
+
d("div", G, [
|
|
267
|
+
s(t.$slots, "image")
|
|
268
|
+
]),
|
|
269
|
+
d("div", J, [
|
|
270
|
+
d("div", K, y(e.title), 1),
|
|
271
|
+
e.subtext ? (l(), r("p", O, y(e.subtext), 1)) : h("", !0),
|
|
272
|
+
s(t.$slots, "default")
|
|
273
|
+
])
|
|
274
|
+
]),
|
|
275
|
+
_: 3
|
|
276
|
+
}, 8, ["href", "aria-disabled", "tabindex"]));
|
|
277
|
+
}
|
|
132
278
|
});
|
|
133
279
|
export {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
280
|
+
R as Alert,
|
|
281
|
+
T as Button,
|
|
282
|
+
W as Card,
|
|
283
|
+
X as Flex,
|
|
284
|
+
ee as Heading,
|
|
285
|
+
F as Icon,
|
|
286
|
+
te as Input,
|
|
287
|
+
ae as Loader,
|
|
288
|
+
le as NavigationCard
|
|
137
289
|
};
|