@codeandfunction/callaloo 5.3.0 → 5.5.0
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/callaloo.global.js +1 -1
- package/dist/chunks/{CLA11yButton.vue_vue_type_style_index_0_lang-DAZeEmRe.js → CLA11yButton.vue_vue_type_style_index_0_lang-AFnNVNbg.js} +1 -1
- package/dist/chunks/CLButton.vue_vue_type_style_index_0_lang-Bi7lePOd.js +2 -0
- package/dist/chunks/{CLCalendar.vue_vue_type_style_index_0_lang-BBR13xMW.js → CLCalendar.vue_vue_type_style_index_0_lang-CiRuWRhp.js} +1 -1
- package/dist/chunks/CLCard.vue_vue_type_style_index_0_lang-CplKYS5s.js +2 -0
- package/dist/chunks/CLFormCharCounter.vue_vue_type_style_index_0_lang-DFCFnu6Y.js +2 -0
- package/dist/chunks/{CLFormLabel.vue_vue_type_script_setup_true_lang-r2o_Iv7o.js → CLFormLabel.vue_vue_type_script_setup_true_lang-BNeJZmcA.js} +1 -1
- package/dist/chunks/CLHeading.vue_vue_type_style_index_0_lang-CwVXOjg7.js +2 -0
- package/dist/chunks/CLIcon.vue_vue_type_style_index_0_lang--q8y4M0u.js +2 -0
- package/dist/chunks/CLInputMessages.vue_vue_type_style_index_0_lang-DWnRvCXn.js +2 -0
- package/dist/chunks/CLLink.vue_vue_type_style_index_0_lang-BBVcgoM9.js +2 -0
- package/dist/chunks/CLModal.vue_vue_type_style_index_0_lang-6mOp0go1.js +2 -0
- package/dist/chunks/{CLNavLink.vue_vue_type_script_setup_true_lang-D90NIayQ.js → CLNavLink.vue_vue_type_script_setup_true_lang-RaIpsTT4.js} +1 -1
- package/dist/chunks/{CLPill.vue_vue_type_style_index_0_lang-D7P0BFII.js → CLPill.vue_vue_type_style_index_0_lang-Dvfi1AT3.js} +1 -1
- package/dist/chunks/{CLSkeleton.vue_vue_type_style_index_0_lang-BscYHmgy.js → CLSkeleton.vue_vue_type_style_index_0_lang-B4jjertd.js} +1 -1
- package/dist/chunks/{CLSpinner.vue_vue_type_style_index_0_lang-oJtBOpZf.js → CLSpinner.vue_vue_type_style_index_0_lang-BmgD28pq.js} +1 -1
- package/dist/chunks/{CLText.vue_vue_type_style_index_0_lang-B6cjI8gJ.js → CLText.vue_vue_type_style_index_0_lang-FYzTOGba.js} +1 -1
- package/dist/chunks/CLToast.vue_vue_type_style_index_0_lang-CBzwakix.js +2 -0
- package/dist/chunks/context-BrNC8CsD.js +1 -0
- package/dist/chunks/{helper-C542dSLs.js → helper-BlxFN3eF.js} +1 -1
- package/dist/chunks/icons-C0rM0Bme.js +1 -0
- package/dist/chunks/index-ojQDOR8H.js +1 -0
- package/dist/chunks/index-vaUljOqP.js +1 -0
- package/dist/chunks/utils-7KCJTO5N.js +1 -0
- package/dist/chunks/utils-CBtSen1l.js +1 -0
- package/dist/chunks/utils-Cb7xN4PV.js +1 -0
- package/dist/chunks/utils-Dsrzvwvz.js +1 -0
- package/dist/chunks/utils-Dxz0vfLU.js +1 -0
- package/dist/chunks/utils-WkJUME4b.js +1 -0
- package/dist/components/Buttons/CLA11yButton/CLA11yButton.js +1 -1
- package/dist/components/Buttons/CLButton/CLButton.js +1 -1
- package/dist/components/Buttons/CLButton/CLButton.vue.d.ts +2 -2
- package/dist/components/CLIcon/CLIcon.js +1 -1
- package/dist/components/CLIcon/CLIcon.vue.d.ts +1 -1
- package/dist/components/CLTable/CLTable.js +1 -1
- package/dist/components/Containers/CLCard/CLCard.js +1 -1
- package/dist/components/Containers/CLCarousel/CLCarousel.js +1 -1
- package/dist/components/Containers/CLDisclosure/CLDisclosure.js +1 -1
- package/dist/components/Containers/CLDrawer/CLDrawer.js +1 -1
- package/dist/components/Form/CLCalendar/CLCalendar.js +1 -1
- package/dist/components/Form/CLCheckbox/CLCheckbox.js +1 -1
- package/dist/components/Form/CLCheckbox/CLCheckbox.vue.d.ts +1 -1
- package/dist/components/Form/CLFormCharCounter/CLFormCharCounter.vue.d.ts +1 -1
- package/dist/components/Form/CLInput/CLInput.js +1 -1
- package/dist/components/Form/CLInput/CLInput.vue.d.ts +1 -1
- package/dist/components/Form/CLInput/CLInputPrefix.vue.d.ts +1 -1
- package/dist/components/Form/CLInput/CLInputSuffix.vue.d.ts +1 -1
- package/dist/components/Form/CLInputDatePicker/CLInputDatePicker.js +1 -1
- package/dist/components/Form/CLInputDatePicker/CLInputDatePicker.vue.d.ts +3 -3
- package/dist/components/Form/CLRadioButton/CLRadioButton.js +1 -1
- package/dist/components/Form/CLRadioButton/CLRadioButton.vue.d.ts +1 -1
- package/dist/components/Form/CLSelect/CLSelect.js +1 -1
- package/dist/components/Form/CLSelect/CLSelect.vue.d.ts +1 -1
- package/dist/components/Form/CLTextArea/CLTextArea.js +1 -1
- package/dist/components/Form/CLTextArea/CLTextArea.vue.d.ts +1 -1
- package/dist/components/Indicators/CLBadge/CLBadge.js +1 -1
- package/dist/components/Indicators/CLBanner/CLBanner.js +1 -1
- package/dist/components/Indicators/CLPill/CLPill.js +1 -1
- package/dist/components/Indicators/CLProgress/CLProgress.js +1 -1
- package/dist/components/Indicators/CLProgress/CLProgress.vue.d.ts +1 -1
- package/dist/components/Loading/CLSkeleton/CLSkeleton.js +1 -1
- package/dist/components/Loading/CLSpinner/CLSpinner.js +1 -1
- package/dist/components/Loading/CLSpinner/CLSpinner.vue.d.ts +1 -1
- package/dist/components/Modals/CLModal/CLModal.js +1 -1
- package/dist/components/Modals/CLModalDatePicker/CLModalDatePicker.js +1 -1
- package/dist/components/Navigation/CLLink/CLLink.js +1 -1
- package/dist/components/Navigation/CLNavLink/CLNavLink.js +1 -1
- package/dist/components/Navigation/CLNavSection/CLNavSection.js +1 -1
- package/dist/components/Popups/CLDropdownMenu/CLDropdownMenu.js +1 -1
- package/dist/components/Popups/CLDropdownMenu/CLDropdownMenu.vue.d.ts +5 -5
- package/dist/components/Popups/CLToast/CLToast.js +1 -1
- package/dist/components/Popups/CLToast/CLToast.vue.d.ts +1 -1
- package/dist/components/Providers/CLThemeProvider/CLThemeProvider.js +1 -1
- package/dist/components/Providers/CLThemeProvider/base-theme.d.ts +3 -17
- package/dist/components/Providers/CLThemeProvider/utils.d.ts +2 -21
- package/dist/components/Providers/CLToastProvider/CLToastProvider.js +1 -1
- package/dist/components/Typography/CLHeading/CLHeading.js +1 -1
- package/dist/components/Typography/CLText/CLText.js +1 -1
- package/dist/composables/useDropdown.js +1 -1
- package/dist/composables/useElementSize.js +1 -1
- package/dist/composables/useEsc.js +1 -1
- package/dist/composables/useTheme.js +1 -1
- package/dist/index.js +1 -1
- package/dist/types.d.ts +3 -32
- package/package.json +25 -26
- package/dist/chunks/CLButton.vue_vue_type_style_index_0_lang-si2fvOPY.js +0 -2
- package/dist/chunks/CLCard.vue_vue_type_style_index_0_lang-DLIpPAlo.js +0 -2
- package/dist/chunks/CLFormCharCounter.vue_vue_type_style_index_0_lang-BCUvy9SB.js +0 -2
- package/dist/chunks/CLHeading.vue_vue_type_style_index_0_lang-CMYn2p7m.js +0 -2
- package/dist/chunks/CLIcon.vue_vue_type_style_index_0_lang-CCqXRdfi.js +0 -2
- package/dist/chunks/CLInputMessages.vue_vue_type_style_index_0_lang-DW0ezQId.js +0 -2
- package/dist/chunks/CLLink.vue_vue_type_style_index_0_lang-Cv76JpRm.js +0 -2
- package/dist/chunks/CLModal.vue_vue_type_style_index_0_lang-yooxncne.js +0 -2
- package/dist/chunks/CLToast.vue_vue_type_style_index_0_lang-MKnVZAj3.js +0 -2
- package/dist/chunks/context-C-j1PMxu.js +0 -1
- package/dist/chunks/icons-D0RuAcwt.js +0 -1
- package/dist/chunks/index-DbQjwiDA.js +0 -1
- package/dist/chunks/utils-CuBw41mS.js +0 -1
- package/dist/chunks/utils-DhgAjqVy.js +0 -1
- package/dist/chunks/utils-DlaxTQuD.js +0 -1
- package/dist/chunks/utils-DzuUmadd.js +0 -1
- package/dist/chunks/utils-J5U6zpvr.js +0 -1
- package/dist/chunks/utils-LUg0RA-R.js +0 -1
- package/dist/chunks/utils-at22DKYH.js +0 -1
package/package.json
CHANGED
|
@@ -17,32 +17,11 @@
|
|
|
17
17
|
"ui components",
|
|
18
18
|
"vuejs"
|
|
19
19
|
],
|
|
20
|
-
"version": "5.
|
|
20
|
+
"version": "5.5.0",
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"type": "module",
|
|
23
23
|
"unpkg": "dist/callaloo.global.js",
|
|
24
24
|
"jsdelivr": "dist/callaloo.global.js",
|
|
25
|
-
"scripts": {
|
|
26
|
-
"build": "pnpm export:icons && vite build && pnpm build:cdn && pnpm generate:exports",
|
|
27
|
-
"build:cdn": "vite build -c vite.config.cdn.ts",
|
|
28
|
-
"build:storybook": "pnpm export:icons && pnpm storybook build",
|
|
29
|
-
"generate:exports": "npx tsx scripts/generate-exports.ts",
|
|
30
|
-
"coverage": "vitest run --coverage",
|
|
31
|
-
"export:icons": "npx tsx scripts/export-icons.ts",
|
|
32
|
-
"export:meta": "npx tsx scripts/export-meta.ts",
|
|
33
|
-
"lint": "pnpm lint:js && pnpm lint:prettier",
|
|
34
|
-
"lint:js": "eslint 'src/**/*.{ts,vue}'",
|
|
35
|
-
"lint:js:fix": "eslint 'src/**/*.{ts,vue}' --fix",
|
|
36
|
-
"lint:prettier": "prettier --check 'src/**/*.{ts,vue}'",
|
|
37
|
-
"package": "npm pack",
|
|
38
|
-
"publish": "pnpm semantic-release",
|
|
39
|
-
"size": "size-limit",
|
|
40
|
-
"start": "pnpm export:icons && storybook dev -p 4400 --no-open",
|
|
41
|
-
"test": "vitest --run --passWithNoTests",
|
|
42
|
-
"test:watch": "vitest",
|
|
43
|
-
"test:ui": "vitest --ui --coverage",
|
|
44
|
-
"test:storybook": "test-storybook --url http://127.0.0.1:4400"
|
|
45
|
-
},
|
|
46
25
|
"files": [
|
|
47
26
|
"dist",
|
|
48
27
|
"!dist/stats.html"
|
|
@@ -193,7 +172,8 @@
|
|
|
193
172
|
}
|
|
194
173
|
},
|
|
195
174
|
"dependencies": {
|
|
196
|
-
"@codeandfunction/callaloo-types": "
|
|
175
|
+
"@codeandfunction/callaloo-types": "1.5.0",
|
|
176
|
+
"@codeandfunction/callaloo-tokens": "1.0.0"
|
|
197
177
|
},
|
|
198
178
|
"devDependencies": {
|
|
199
179
|
"@chromatic-com/storybook": "^4.1.3",
|
|
@@ -253,7 +233,6 @@
|
|
|
253
233
|
"peerDependencies": {
|
|
254
234
|
"vue": "^3.5.26"
|
|
255
235
|
},
|
|
256
|
-
"packageManager": "pnpm@10.26.1+sha512.664074abc367d2c9324fdc18037097ce0a8f126034160f709928e9e9f95d98714347044e5c3164d65bd5da6c59c6be362b107546292a8eecb7999196e5ce58fa",
|
|
257
236
|
"sideEffects": [
|
|
258
237
|
"**/*.css",
|
|
259
238
|
"dist/**/*.js"
|
|
@@ -264,5 +243,25 @@
|
|
|
264
243
|
"path": "dist/index.js",
|
|
265
244
|
"limit": "210 KB"
|
|
266
245
|
}
|
|
267
|
-
]
|
|
268
|
-
|
|
246
|
+
],
|
|
247
|
+
"scripts": {
|
|
248
|
+
"build": "pnpm export:icons && vite build && pnpm build:cdn && pnpm generate:exports",
|
|
249
|
+
"build:cdn": "vite build -c vite.config.cdn.ts",
|
|
250
|
+
"build:storybook": "pnpm export:icons && pnpm storybook build",
|
|
251
|
+
"generate:exports": "npx tsx scripts/generate-exports.ts",
|
|
252
|
+
"coverage": "vitest run --coverage",
|
|
253
|
+
"export:icons": "npx tsx scripts/export-icons.ts",
|
|
254
|
+
"export:meta": "npx tsx scripts/export-meta.ts",
|
|
255
|
+
"lint": "pnpm lint:js && pnpm lint:prettier",
|
|
256
|
+
"lint:js": "eslint 'src/**/*.{ts,vue}'",
|
|
257
|
+
"lint:js:fix": "eslint 'src/**/*.{ts,vue}' --fix",
|
|
258
|
+
"lint:prettier": "prettier --check 'src/**/*.{ts,vue}'",
|
|
259
|
+
"package": "npm pack",
|
|
260
|
+
"size": "size-limit",
|
|
261
|
+
"start": "pnpm export:icons && storybook dev -p 4400 --no-open",
|
|
262
|
+
"test": "vitest --run --passWithNoTests",
|
|
263
|
+
"test:watch": "vitest",
|
|
264
|
+
"test:ui": "vitest --ui --coverage",
|
|
265
|
+
"test:storybook": "test-storybook --url http://127.0.0.1:4400"
|
|
266
|
+
}
|
|
267
|
+
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import '../components/Buttons/CLButton/CLButton.css';
|
|
2
|
-
import{defineComponent as e,useSlots as t,ref as a,computed as o,onMounted as l,nextTick as i,createBlock as d,openBlock as n,resolveDynamicComponent as s,normalizeStyle as r,normalizeClass as u,unref as f,withCtx as c,createCommentVNode as p,createElementBlock as m,renderSlot as y}from"vue";import{_ as v}from"./CLIcon.vue_vue_type_style_index_0_lang-CCqXRdfi.js";import{_ as b}from"./CLSpinner.vue_vue_type_style_index_0_lang-oJtBOpZf.js";import{CLButtonTypes as $}from"../index.js";import{b as _}from"./utils-DlaxTQuD.js";import{useHasSlotContent as h}from"../composables/useHasSlotContent.js";import{useTheme as g}from"../composables/useTheme.js";import{c as B,m as C,C as L,f as z,d as X,i as S,q as k}from"./index-DbQjwiDA.js";const w=/* @__PURE__ */e({name:"CLButton",__name:"CLButton",props:{active:{type:Boolean,default:!1},alignContent:{default:S.Center},ariaLabel:{default:void 0},as:{default:"button"},borderRadius:{default:void 0},busy:{type:Boolean,default:!1},color:{default:X.Neutral},disabled:{type:Boolean,default:!1},elevated:{type:Boolean,default:!1},form:{default:void 0},forwardRef:{type:Function,default:void 0},height:{default:"auto"},href:{default:void 0},iconAfter:{default:void 0},iconBefore:{default:void 0},iconFilled:{type:Boolean,default:!1},iconSize:{default:z.Small},onClick:{type:Function,default:void 0},pill:{type:Boolean,default:!1},rounded:{type:Boolean,default:!0},size:{default:L.Small},target:{default:C.Self},testId:{default:"clll-button"},title:{default:void 0},type:{default:$.Button},variant:{default:B.Soft},width:{default:"auto"},wrap:{type:Boolean,default:!1}},setup(e){const $=e,B=g(),C=h();t();const z=a(),X="clll-button",w=o(()=>[X,`${X}--${$.type}`,`${X}--${$.color}--${$.variant}`,`${X}--${$.size}`,`${X}--${$.alignContent}`,$.active?`${X}--active`:"",$.busy?`${X}--busy`:"",$.disabled?`${X}--disabled`:"",$.wrap?`${X}--wrapped`:"",$.rounded?`${X}--rounded`:"",$.borderRadius?`${X}--${$.borderRadius}`:"",C.value?`${X}--has-content`:`${X}--no-content`,$.iconBefore?`${X}--icon-before`:"",$.iconAfter?`${X}--icon-after`:"",$.elevated?`${X}--elevated`:"",$.pill?`${X}--pill`:""]),j=()=>{switch($.size){case L.Medium:case L.Large:return L.Small;case L.XL:case L.XXL:return L.Medium;case L.XXXL:return L.Large;case L.XXXXL:return L.XL;case L.Tiny:default:return L.Tiny}};l(()=>{i(()=>{z.value&&$.forwardRef?.(z.value)})});const R=e=>{$.onClick?.(e)};return(t,a)=>(n(),d(s(e.as),{ref_key:"buttonRef",ref:z,"aria-label":e.ariaLabel,class:u(f(w)),"data-testid":e.testId,disabled:"button"===e.as?e.busy||e.disabled:void 0,form:"button"===e.as?e.form:void 0,href:"a"===e.as?e.href:void 0,target:"a"===e.as?e.target:void 0,title:e.title,type:"button"===e.as?e.type:void 0,style:r({width:e.width,height:e.height,...f(_)({color:e.color,variant:e.variant,theme:f(B)})}),onClick:R},{default:c(()=>[e.iconBefore?(n(),d(f(v),{key:0,filled:e.iconFilled,name:e.iconBefore,size:e.iconSize,"test-id":`${e.testId}-icon-before`},null,8,["filled","name","size","test-id"])):p("",!0),f(C)?(n(),m("span",{key:1,class:u(`${X}__content`)},[y(t.$slots,"default")],2)):p("",!0),e.iconAfter?(n(),d(f(v),{key:2,filled:e.iconFilled,name:e.iconAfter,size:e.iconSize,"test-id":`${e.testId}-icon-after`},null,8,["filled","name","size","test-id"])):p("",!0),e.busy?(n(),d(f(b),{key:3,align:f(S).Center,position:f(k).Absolute,size:j(),color:e.color},null,8,["align","position","size","color"])):p("",!0)]),_:3},8,["aria-label","class","data-testid","disabled","form","href","target","title","type","style"]))}});export{w as _};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import '../components/Containers/CLCard/CLCard.css';
|
|
2
|
-
import{defineComponent as e,useSlots as a,ref as t,computed as l,onMounted as i,nextTick as r,createElementBlock as o,openBlock as d,withKeys as s,normalizeStyle as n,normalizeClass as u,unref as c,createCommentVNode as g,createElementVNode as y,createBlock as h,renderSlot as m,Fragment as f,withCtx as b,createTextVNode as _,toDisplayString as v}from"vue";import{_ as $}from"./CLHeading.vue_vue_type_style_index_0_lang-CMYn2p7m.js";import{_ as p}from"./CLLink.vue_vue_type_style_index_0_lang-Cv76JpRm.js";import{_ as k}from"./CLSkeleton.vue_vue_type_style_index_0_lang-BscYHmgy.js";import{_ as C}from"./CLText.vue_vue_type_style_index_0_lang-B6cjI8gJ.js";import{c as w,j as x,k as L,l as H,m as T,n as R,o as j,d as B,i as S,p as A,a as O}from"./index-DbQjwiDA.js";import{c as W}from"./utils-CuBw41mS.js";import{useHasSlotContent as q}from"../composables/useHasSlotContent.js";import{useTheme as E}from"../composables/useTheme.js";const I=["data-testid","tabindex"],N=["alt","loading","src"],G={key:0,class:"clll-card__header-skeleton"},K=["alt","loading","src"],M=["aria-label","href","target"],z=/* @__PURE__ */e({name:"CLCard",__name:"CLCard",props:{active:{type:Boolean,default:!1},align:{default:S.Left},ariaLabel:{},borderRadius:{},bordered:{type:Boolean,default:!0},busy:{type:Boolean,default:!1},byline:{},color:{default:B.Neutral},compact:{type:Boolean,default:!1},elevated:{type:Boolean,default:!1},forwardRef:{},height:{default:"auto"},href:{},image:{},imageAltText:{default:""},imageHeight:{default:"auto"},imageLoading:{default:j.Eager},imageOrder:{},imageWidth:{default:"auto"},onClick:{},overflow:{default:R.Hidden},padded:{type:Boolean,default:!0},rounded:{type:Boolean,default:!0},target:{default:T.Self},testId:{default:"clll-card"},title:{},titleHLevel:{default:H.H2},titleType:{default:L.SubSection},truncateTitle:{type:Boolean,default:!1},type:{default:x.Medium},variant:{default:w.Soft},width:{default:"auto"}},setup(e){const x="clll-card",L=E(),H=e,T=q(),R=a(),j=t(),B=t(),S=["a","button"],z=t(),D=l(()=>[x,`${x}--${H.type}`,`${x}--${H.color}-${H.variant}`,`${x}--${H.variant}`,`${x}--align-${H.align}`,H.rounded?`${x}--rounded`:`${x}--box`,H.bordered?`${x}--bordered`:"",H.borderRadius?`${x}--${H.borderRadius}`:"",H.busy?`${x}--busy`:`${x}--ready`,H.compact?`${x}--compact`:`${x}--no-compact`,H.title||H.byline?`${x}--has-header`:`${x}--no-header`,H.byline?`${x}--has-byline`:`${x}--no-byline`,j.value?`${x}--has-heading`:`${x}--no-heading`,T.value?`${x}--has-content`:`${x}--no-content`,B.value?`${x}--has-footer`:`${x}--no-footer`,H.image?`${x}--has-image`:`${x}--has-no-image`,H.imageOrder?`${x}--image-${H.imageOrder}`:"",H.active?`${x}--active`:`${x}--inactive`,H.onClick?`${x}--has-link`:"",H.truncateTitle?`${x}--has-truncated-title`:"",H.elevated?`${x}--elevated`:"",H.overflow?`${x}--overflow-${H.overflow}`:"",H.padded?"":`${x}--no-padding`]),F=e=>{if(H.busy||!H.onClick)return;const{target:a}=e,t=a?a.closest("a,button"):void 0,l=[...z.value?.querySelectorAll("[data-expand-click-area]")??[]];if(l.length){const a=l[0],i=t?S.includes(t.tagName.toLowerCase()):null;t||a===e.target||i||a.click()}};return i(async()=>{await r(),z.value&&H.forwardRef?.(z.value),j.value=R?.heading,B.value=R?.footer}),(a,t)=>(d(),o("div",{ref_key:"refExpandedArea",ref:z,class:u(c(D)),style:n({...c(W)({color:e.color,variant:e.variant,theme:c(L)}),width:e.width,height:e.height,overflow:e.overflow}),"data-testid":e.testId,tabindex:e.onClick?0:void 0,onClick:F,onKeyup:s(F,["enter"])},[!e.image||e.imageOrder!==c(A).Before&&e.imageOrder?g("",!0):(d(),o("div",{key:0,class:u(["clll-card__image",{busy:e.busy}]),style:n({width:e.imageWidth,height:e.imageHeight})},[e.busy?(d(),h(c(k),{key:0,"border-radius":e.borderRadius,width:e.imageWidth,height:e.imageHeight,rounded:!1},null,8,["border-radius","width","height"])):g("",!0),e.image?(d(),o("img",{key:1,alt:e.imageAltText,class:u(`${x}__image__elem`),loading:e.imageLoading,src:e.image},null,10,N)):g("",!0)],6)),y("div",{class:u(`${x}__content`)},[y("div",{class:u(["clll-card__header",{busy:e.busy}])},[e.busy&&(c(j)||e.title||e.byline)?(d(),o("div",G,[c(j)||e.title?(d(),h(c(k),{key:0,"border-radius":e.borderRadius,height:"27px"},null,8,["border-radius"])):g("",!0),e.byline?(d(),h(c(k),{key:1,"border-radius":e.borderRadius,width:"70%",height:"20px"},null,8,["border-radius"])):g("",!0)])):g("",!0),e.onClick||e.href?e.title||c(j)&&(e.onClick||e.href)?(d(),h(c(p),{key:2,"aria-label":e.ariaLabel,color:e.color,href:e.href,target:e.target,"on-click":e.onClick,"data-expand-click-area":""},{default:b(()=>[m(a.$slots,"heading"),e.title?(d(),h(c($),{key:0,align:e.align,class:u(`${x}__heading`),color:e.color,level:e.titleHLevel,truncate:e.truncateTitle,type:e.titleType},{default:b(()=>[_(v(e.title),1)]),_:1},8,["align","class","color","level","truncate","type"])):g("",!0)]),_:3},8,["aria-label","color","href","target","on-click"])):g("",!0):(d(),o(f,{key:1},[m(a.$slots,"heading"),e.title?(d(),h(c($),{key:0,align:e.align,class:u(`${x}__heading`),color:e.color,level:e.titleHLevel,truncate:e.truncateTitle,type:e.titleType},{default:b(()=>[_(v(e.title),1)]),_:1},8,["align","class","color","level","truncate","type"])):g("",!0)],64)),m(a.$slots,"byline"),e.byline?(d(),h(c(C),{key:3,align:e.align,class:u(`${x}__byline`),color:e.color,type:c(O).Small},{default:b(()=>[_(v(e.byline),1)]),_:1},8,["align","class","color","type"])):g("",!0)],2),y("div",{class:u(`${x}__slot`)},[y("div",{ref:"slot-content",class:u([`${x}__slot-content`,{busy:e.busy}])},[c(T)&&e.busy?(d(),h(c(k),{key:0,"border-radius":e.borderRadius,width:"100%",height:"100%"},null,8,["border-radius"])):g("",!0),y("div",null,[m(a.$slots,"default")])],2)],2),y("div",{class:u(["clll-card__footer",{busy:e.busy}])},[c(B)&&e.busy?(d(),h(c(k),{key:0,"border-radius":e.borderRadius,width:"100%",height:"20px"},null,8,["border-radius"])):g("",!0),m(a.$slots,"footer")],2)],2),e.image&&e.imageOrder===c(A).After?(d(),o("div",{key:1,class:u(["clll-card__image",{busy:e.busy}]),style:n({width:e.imageWidth,height:e.imageHeight})},[e.busy?(d(),h(c(k),{key:0,"border-radius":e.borderRadius,width:e.imageWidth,height:e.imageHeight,rounded:!1},null,8,["border-radius","width","height"])):g("",!0),m(a.$slots,"image"),e.image?(d(),o("img",{key:1,alt:e.imageAltText,class:u(`${x}__image__elem`),loading:e.imageLoading,src:e.image},null,10,K)):g("",!0)],6)):g("",!0),e.title||!e.onClick&&!e.href?g("",!0):(d(),o("a",{key:2,"aria-label":e.ariaLabel,class:"sr-only",href:e.href,target:e.target,"data-expand-click-area":"",onClick:t[0]||(t[0]=(...a)=>e.onClick&&e.onClick(...a))},null,8,M)),e.onClick&&e.variant!==c(w).Ghost?(d(),o("div",{key:3,class:u(`${x}__hover-elem`)},null,2)):g("",!0)],46,I))}});export{z as _};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import '../assets/CLFormCharCounter.css';
|
|
2
|
-
import{defineComponent as r,computed as t,createElementBlock as e,openBlock as l,normalizeClass as o,unref as a,createElementVNode as c,toDisplayString as n}from"vue";import{C as s,e as u,d as m}from"./index-DbQjwiDA.js";const f=["data-testid"],h={"aria-live":"polite",class:"clll-form-char-counter__char-counter__text",role:"status"},i=/* @__PURE__ */r({name:"CLFormCharCounter",__name:"CLFormCharCounter",props:{color:{default:m.Neutral},cssPrefix:{},currentLength:{},layout:{default:u.Block},maxLength:{},size:{default:s.Small},testId:{default:"clll-form-char-counter"}},setup(r){const s=r,m=t(()=>[`${s.cssPrefix}__char-counter`,"clll-form-char-counter",`clll-form-char-counter--${s.layout}`,`clll-form-char-counter--${s.size}`,`clll-form-char-counter--${s.color}`,s.layout===u.Inline?"form-counter-flex":""]);return(t,s)=>(l(),e("span",{class:o(a(m)),"data-testid":r.testId},[c("div",h,n(r.currentLength)+"/"+n(r.maxLength),1)],10,f))}});export{i as _};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import '../components/Typography/CLHeading/CLHeading.css';
|
|
2
|
-
import{defineComponent as e,computed as t,createBlock as l,openBlock as a,resolveDynamicComponent as o,unref as s,normalizeStyle as r,normalizeClass as d,withCtx as n,renderSlot as i}from"vue";import{k as c,d as u,i as p,l as f}from"./index-DbQjwiDA.js";import{t as m}from"./utils-J5U6zpvr.js";import{useTheme as $}from"../composables/useTheme.js";const y=/* @__PURE__ */e({name:"CLHeading",__name:"CLHeading",props:{align:{default:p.Left},bolder:{type:Boolean,default:!1},color:{default:u.Secondary},level:{},testId:{default:"clll-heading"},truncate:{type:Boolean,default:!1},type:{default:c.Title}},setup(e){const u=e,p=$(),y="clll-heading",g=t(()=>{if(u.level)return u.level;switch(u.type){case c.Section:return f.H2;case c.SubSection:return f.H3;case c.PageTitle:case c.Title:default:return f.H1}}),b=t(()=>[y,`${y}--${u.align}`,`${y}--${u.color}`,`${y}--${u.truncate?"wrap":"nowrap"}`,`${y}--${u.type}`,u.bolder?`${y}--bolder`:""]);return(t,c)=>(a(),l(o(s(g)),{class:d(s(b)),"data-testid":e.testId,style:r(s(m)({color:e.color,theme:s(p)}))},{default:n(()=>[i(t.$slots,"default")]),_:3},8,["class","data-testid","style"]))}});export{y as _};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import '../components/CLIcon/CLIcon.css';
|
|
2
|
-
import{defineComponent as e,ref as t,computed as l,watch as n,onMounted as o,createElementBlock as a,openBlock as i,normalizeStyle as r,normalizeClass as s,unref as c,createElementVNode as d}from"vue";import{b as u,d as m,c as f,f as h}from"./index-DbQjwiDA.js";import{g as p}from"./utils-DzuUmadd.js";import{useTheme as v}from"../composables/useTheme.js";import{i as g}from"./helper-C542dSLs.js";const y=({color:e=m.Neutral,theme:t})=>{const{colors:l,darkMode:n}=t??v(),o=n.value?u.Dark:u.Light,a=p({color:e,colors:l.value,mode:o,variant:f.Text});return{"--clll-icon-color":a?.textBody??"inherit"}},L=["data-testid"],X=["height","width"],b=["href"],w=/* @__PURE__ */e({name:"CLIcon",__name:"CLIcon",props:{color:{default:m.Neutral},filled:{type:Boolean,default:!1},name:{},size:{default:h.Small},testId:{default:"clll-icon"}},setup(e){const u=e,m=v(),f="clll-icon",p={[h.Tiny]:20,[h.Small]:24,[h.Medium]:28,[h.Large]:32,[h.XL]:36,[h.XXL]:40,[h.XXXL]:44,[h.XXXXL]:48},w=/* @__PURE__ */new Map,B=t(!1),I=t(!1),x=l(()=>u.filled?u.name.endsWith("-filled")?u.name:u.name.replace("tabler:","tabler:")+"-filled":u.name),$=l(()=>{if(!I.value)return u.name;const e=x.value;return u.filled&&e!==u.name?B.value&&(e=>{if(!g)return!1;if(w.has(e))return w.get(e);const t=document.getElementById("clll-icons");if(!t)return!1;const l=document.getElementById(e),n=null!==l&&t.contains(l);return w.set(e,n),n})(e)?e:u.name:e}),j=l(()=>[f,`${f}--${u.name}`,`${f}--${u.size}`,{[`${f}--filled`]:u.filled&&$.value===x.value}]),z=l(()=>({...y({color:u.color,theme:m}),width:p[u.size]+4+"px",height:p[u.size]+4+"px"}));n(()=>B.value,e=>{e&&w.clear()});return o(()=>{I.value=!0,(async()=>{if(!g)return;let e=document.getElementById("clll-icons");if(e)B.value=!0;else try{const t=/* #__PURE__ */Object.assign({"/src/icons.svg":()=>import("./icons-D0RuAcwt.js").then(e=>e.default)})["/src/icons.svg"];if(!t)return;const l=await t();if(e=document.getElementById("clll-icons"),e)return void(B.value=!0);const n=document.createElement("div");n.id="clll-icons",n.style.display="none",n.innerHTML=l.toString();const o=()=>{document.body.insertBefore(n,document.body.childNodes[0]),B.value=!0};"loading"===document.readyState?window.addEventListener("DOMContentLoaded",o,{once:!0}):o()}catch(t){console.error("[Callaloo] Failed to load icon sprite:",t)}})()}),(t,l)=>(i(),a("span",{class:s(c(j)),"data-testid":e.testId,style:r(c(z))},[(i(),a("svg",{"aria-hidden":"true",class:s(`${f}-sprite`),height:p[e.size],width:p[e.size],viewBox:"0 0 24 24"},[d("use",{href:`#${c($)}`},null,8,b)],10,X))],14,L))}});export{w as _};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import '../assets/CLInputMessages.css';
|
|
2
|
-
import{defineComponent as s,createElementBlock as e,openBlock as a,normalizeClass as o,unref as l,renderSlot as t,Fragment as i,renderList as n,normalizeStyle as r,createElementVNode as p,toDisplayString as m}from"vue";import{t as u,d}from"./index-DbQjwiDA.js";import{b as f}from"./utils-LUg0RA-R.js";const $="clll-form-field",c=/* @__PURE__ */s({__name:"CLFormField",props:{fluid:{type:Boolean},hasPill:{type:Boolean},hasCharCounter:{type:Boolean},orientation:{}},setup:s=>(i,n)=>(a(),e("div",{class:o([$,s.fluid||s.orientation===l(u).Horizontal?`${$}--fluid`:`${$}--fixed`,s.orientation?`${$}--${s.orientation}`:"",s.hasPill?`${$}--haspill`:"",s.hasCharCounter?`${$}--hascharcounter`:""])},[t(i.$slots,"default")],2))}),h="clll-input__message",_=/* @__PURE__ */s({__name:"CLInputMessages",props:{id:{},messages:{},messageType:{default:d.Neutral}},setup:s=>(t,u)=>(a(!0),e(i,null,n(s.messages,(t,i)=>(a(),e("span",{key:`${s.id}-message-${i}`,class:o([h,`${h}--${s.messageType}`]),style:r(l(f)({color:s.messageType}))},[p("span",{class:o([`${h}__text`])},m(t),3)],6))),128))});export{c as _,_ as a};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import '../components/Navigation/CLLink/CLLink.css';
|
|
2
|
-
import{defineComponent as e,computed as l,createElementBlock as r,openBlock as t,normalizeStyle as a,normalizeClass as n,unref as o,renderSlot as i,createBlock as s,createCommentVNode as d}from"vue";import{_ as c}from"./CLIcon.vue_vue_type_style_index_0_lang-CCqXRdfi.js";import{b as u,d as m,c as f,m as p,f as k,g as h}from"./index-DbQjwiDA.js";import{g as x}from"./utils-DzuUmadd.js";import{useTheme as b}from"../composables/useTheme.js";const v=({color:e=m.Primary,underline:l=!0,theme:r})=>{const{colors:t,darkMode:a}=r??b(),n=a.value?u.Dark:u.Light,o=x({color:e,colors:t.value,mode:n,variant:f.Outline}),i=o?.border,s=o?.textDisabled,d=o?.textBody;return{"--clll-link-text-color":d??"inherit","--clll-link-text-hover":(a.value?o?.borderHover:o?.textDisabled)??"inherit","--clll-link-underline-color":l?i??"transparent":"transparent","--clll-link-underline-hover":l?s??"transparent":"transparent","--clll-link-focus-border":d??"transparent","--clll-link-focus-shadow":o?.shadow??"transparent"}},y=["aria-label","data-testid","href","rel","target"],_=/* @__PURE__ */e({name:"CLLink",__name:"CLLink",props:{ariaLabel:{},color:{default:m.Primary},external:{type:Boolean,default:!1},href:{},onClick:{},rel:{default:"noreferrer noopener"},target:{default:p.Self},testId:{default:"clll-link"},underline:{type:Boolean,default:!0}},setup(e){const u=e,m=b(),f="clll-link",p=l(()=>[f,`${f}--${u.color}`,`${f}--${u.external?"external":"internal"}`,u.underline?`${f}--underline`:`${f}--nounderline`]);return(l,u)=>(t(),r("a",{"aria-label":e.ariaLabel,class:n(o(p)),"data-testid":e.testId,href:e.href,rel:e.external?e.rel:"",target:e.target,style:a(o(v)({color:e.color,underline:e.underline,theme:o(m)})),onClick:u[0]||(u[0]=(...l)=>e.onClick&&e.onClick(...l))},[i(l.$slots,"default"),e.external?(t(),s(o(c),{key:0,color:e.color,name:o(h).ExternalLink,size:o(k).Tiny},null,8,["color","name","size"])):d("",!0)],14,y))}});export{_};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import '../components/Modals/CLModal/CLModal.css';
|
|
2
|
-
import{defineComponent as e,useTemplateRef as o,useSlots as t,ref as l,computed as a,watch as s,onMounted as n,onBeforeUnmount as d,createElementBlock as i,createCommentVNode as r,openBlock as c,normalizeStyle as _,normalizeClass as u,unref as m,createElementVNode as v,createBlock as f,renderSlot as y,withCtx as b,createTextVNode as p,toDisplayString as h}from"vue";import{_ as $}from"./CLButton.vue_vue_type_style_index_0_lang-si2fvOPY.js";import{_ as w}from"./CLHeading.vue_vue_type_style_index_0_lang-CMYn2p7m.js";import{b as x,d as I,c as z,h as g,f as L,g as k,k as C}from"./index-DbQjwiDA.js";import{g as B}from"./utils-DzuUmadd.js";import{useTheme as j}from"../composables/useTheme.js";import{useEsc as T}from"../composables/useEsc.js";import{c as E,i as O}from"./helper-C542dSLs.js";const R=e=>{const{colors:o,darkMode:t}=e??j(),l=t.value?x.Dark:x.Light,a=B({color:I.Neutral,colors:o.value,mode:l,variant:z.Solid}),s=t.value?"black":"white";return{"--clll-modal-overlay-bg":a?.bg??"transparent","--clll-modal-content-bg":s,"--clll-modal-theme-radius":"var(--clll-default-radius)"}},S=["id","data-testid"],M=["aria-labelledby"],D=/* @__PURE__ */e({name:"CLModal",__name:"CLModal",props:{borderRadius:{default:void 0},close:{type:Boolean,default:!0},closeBorderRadius:{default:g.Full},dismissible:{type:Boolean,default:!0},fullscreen:{type:Boolean,default:!1},isOpen:{type:Boolean,default:!1},maxWidth:{default:"640px"},modalId:{},onClose:{type:Function,default:void 0},overlay:{type:Boolean,default:!0},testId:{default:"clll-modal"},title:{default:void 0},zIndex:{default:100}},emits:["modal-open","modal-close"],setup(e,{emit:x}){const g=x,B=j(),D=o("modal-window"),F=t(),H=e,N="clll-modal",W="clll-prevent-scroll",q=l(),A=()=>{O&&window?.document.body.classList.add(W)},G=()=>{O&&window?.document.body.classList.remove(W)},J=a(()=>[N]),K=a(()=>[`${N}__window`,H.fullscreen?`${N}__window--fullscreen`:""]),P=a(()=>[`${N}__content`,H.borderRadius?`${N}__content--${H.borderRadius}`:"",H.close?`${N}__content--has-close-button`:`${N}__content--has-no-close-button`,F.body?`${N}__content--has-body`:`${N}__content--has-no-body`,F.footer?`${N}__content--has-footer`:`${N}__content--has-no-footer`,F.header||H.title?`${N}__content--has-header`:`${N}__content--has-no-header`,H.title?`${N}__content--has-title`:`${N}__content--has-no-title`]),Q=a(()=>"auto"===H.zIndex||E(H.zIndex)?H.zIndex:H.zIndex.toString()),U=a(()=>{if("auto"===H.zIndex)return H.zIndex;return((E(H.zIndex)?parseInt(H.zIndex,10):H.zIndex)+100).toString()}),V=e=>{try{(e=>{try{const o=e?.target,t=D.value;return!(!O||!t||t.contains(o))||void 0}catch(o){return void console.error(o)}})(e)&&(O&&window.removeEventListener("mousedown",V),Z())}catch(o){console.error(o)}},X=()=>{O&&window.removeEventListener("mousedown",V)},Y=()=>{O&&(q.value&&O&&window.clearTimeout(q.value),X(),G())},Z=()=>{H.isOpen&&(H.onClose?.(),Y())};s(H,e=>{e.isOpen?(g("modal-open"),A(),D.value&&D.value.focus(),O&&e.dismissible&&(X(),q.value=window.setTimeout(()=>{window.addEventListener("mousedown",V)},100))):(D.value&&D.value.blur(),G(),X(),q.value&&O&&window.clearTimeout(q.value),g("modal-close"))}),n(()=>{H.isOpen&&O&&(A(),D.value&&D.value.focus())});const{clearEventListeners:ee}=T({escHandler:H.dismissible?Z:void 0});return d(()=>{Y(),ee()}),(o,t)=>e.isOpen?(c(),i("div",{key:0,id:e.modalId,class:u(m(J)),"data-testid":e.testId,style:_({...m(R)(m(B)),zIndex:m(Q)})},[v("div",{class:u(m(K)),style:_({zIndex:m(U)})},[v("div",{ref:"modal-window","aria-modal":"true","aria-labelledby":`${N}__content__header__title`,class:u(m(P)),role:"dialog",tabindex:-1,style:_({"--clll-modal-max-width":e.maxWidth})},[v("div",{class:u(`${N}__close-button`)},[e.onClose&&e.close?(c(),f(m($),{key:0,"aria-label":"Close modal","border-radius":e.closeBorderRadius,color:m(I).Neutral,"icon-before":m(k).Delete,"icon-size":m(L).Tiny,"on-click":e.onClose,"test-id":`${N}__close-button`,variant:m(z).Text},null,8,["border-radius","color","icon-before","icon-size","on-click","test-id","variant"])):r("",!0)],2),v("div",{class:u(`${N}__content__header`)},[v("div",{class:u(`${N}__content__title`)},[v("div",{class:u(`${N}__content__header__container`)},[e.title?(c(),f(m(w),{key:0,id:`${N}__content__header__title`,class:u(`${N}__content__header__title`),type:m(C).Section},{default:b(()=>[p(h(e.title),1)]),_:1},8,["id","class","type"])):r("",!0),y(o.$slots,"header")],2)],2)],2),v("div",{class:u(`${N}__content__scroller`)},[v("div",{class:u(`${N}__content__body`)},[y(o.$slots,"body")],2)],2),v("div",{class:u(`${N}__content__footer`)},[y(o.$slots,"footer")],2)],14,M)],6),e.overlay?(c(),i("div",{key:0,ref:"overlay-ref",class:u(`${N}__overlay`),style:_({zIndex:e.zIndex})},null,6)):r("",!0)],14,S)):r("",!0)}});export{D as _};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import '../components/Popups/CLToast/CLToast.css';
|
|
2
|
-
import{defineComponent as e,ref as t,computed as o,watch as l,onMounted as s,onUnmounted as a,onBeforeUnmount as i,createElementBlock as r,openBlock as u,normalizeStyle as n,normalizeClass as d,unref as c,createElementVNode as m,createCommentVNode as v,createVNode as _,createBlock as b,withCtx as p,createTextVNode as f,toDisplayString as h}from"vue";import{_ as y}from"./CLButton.vue_vue_type_style_index_0_lang-si2fvOPY.js";import{_ as g}from"./CLIcon.vue_vue_type_style_index_0_lang-CCqXRdfi.js";import{_ as $}from"./CLText.vue_vue_type_style_index_0_lang-B6cjI8gJ.js";import{c as T,b as x,d as L,u as k,f as z,a as D,C as j,g as M}from"./index-DbQjwiDA.js";import{i as w,g as B,a as C}from"./helper-C542dSLs.js";import{useEsc as R}from"../composables/useEsc.js";import{useTheme as S}from"../composables/useTheme.js";import{g as F}from"./utils-DzuUmadd.js";const A=({color:e,theme:t})=>{const{colors:o,darkMode:l}=t??S(),s=F({color:e,colors:o.value,mode:(l.value,x.Light),variant:T.Soft}),a=F({color:L.Neutral,colors:o.value,mode:l.value?x.Light:x.Dark,variant:T.Text});return{"--clll-toast-bg-color":l.value?"white":"#322F35","--clll-toast-text-color":a?.textBody,"--clll-toast-action-button-text-color":s?.text,"--clll-toast-action-button-bg-color":s?.bg,"--clll-toast-action-button-hover-color":s?.hover,"--clll-toast-dismiss-button-text-color":a?.text,"--clll-toast-dismiss-button-bg-color":a?.bg,"--clll-toast-dismiss-button-hover-color":a?.hover,"--clll-toast-icon-bg":s?.bg,"--clll-toast-icon-color":s?.text,"--clll-toast-theme-radius":"var(--clll-default-radius)"}},E=["data-testid"],I=300,N="clll-toast",H=/* @__PURE__ */e({name:"CLToast",__name:"CLToast",props:{actionLabel:{},borderRadius:{},color:{default:L.Secondary},dismissTimer:{default:5},icon:{},iconSize:{default:z.Small},iconFilled:{type:Boolean,default:!1},message:{},onAction:{},onDismiss:{},position:{default:k.TopRight},rounded:{type:Boolean,default:!0},testId:{default:"clll-toast"},title:{},width:{default:"24rem"}},setup(e){const x=e,k=S(),F=t(),H=t(!1),q=t(),G=t(0),J=t(!1),K=t(null),O=t(0),P=t(0),Q=t(!1),U=o(()=>[N,x.borderRadius?`${N}--${x.borderRadius}`:"",x.dismissTimer?`${N}--has-timer`:"",x.icon?`${N}--has-icon`:"",x.message&&!x.title?`${N}--has-messageonly`:"",H.value?`${N}--mounted`:"",x.onAction&&x.actionLabel?`${N}--has-action`:"",x.rounded?`${N}--rounded`:`${N}--box`,x.title&&!x.message?`${N}--has-titleonly`:"",x.title&&x.message?`${N}--has-titleandmessage`:"",`${N}--${x.position}`]),V=()=>{null!==K.value&&(clearTimeout(K.value),K.value=null),q.value?.stop()},W=()=>{x.dismissTimer&&!J.value&&(V(),O.value=Date.now(),P.value=1e3*x.dismissTimer,Q.value=!1,K.value=setTimeout(()=>{Q.value||J.value||ee()},P.value))},X=()=>{if(!x.dismissTimer||Q.value||J.value)return;Q.value=!0;const e=Date.now()-O.value;P.value=Math.max(0,P.value-e),V()},Y=()=>{x.dismissTimer&&Q.value&&!J.value&&(Q.value=!1,O.value=Date.now(),K.value=setTimeout(()=>{Q.value||J.value||ee()},P.value))},Z=()=>{document.hidden?X():Y()},ee=()=>{J.value||(J.value=!0,H.value=!1,V(),q.value&&q.value.start(I,e=>{Math.min(e,I)===I&&(q.value?.stop(),x.onDismiss?.())}),te())};l(()=>x.dismissTimer,()=>{V(),J.value=!1,x.dismissTimer&&x.dismissTimer>0&&W()}),s(()=>{w&&(G.value=B()+1,q.value||(q.value=C(),q.value.start(100,e=>{100===Math.min(e,100)&&(q.value?.stop(),H.value=!0,x.dismissTimer&&q.value?.start(I,e=>{Math.min(e,I)===I&&(q.value?.stop(),W())}))})),document.addEventListener("visibilitychange",Z))}),a(()=>{w&&(V(),q.value=void 0,document.removeEventListener("visibilitychange",Z)),H.value=!1,J.value||(J.value=!0,x.onDismiss?.())});const{clearEventListeners:te}=R({escHandler:ee});return i(()=>{te()}),(t,o)=>(u(),r("output",{ref_key:"elem",ref:F,class:d(c(U)),"data-testid":e.testId,style:n({zIndex:c(G),"--clll-toast-width":e.width,...c(A)({color:e.color,theme:c(k)})}),onMouseenter:X,onMouseleave:Y,onFocusin:X,onFocusout:Y},[m("div",{class:d(`${N}__body`)},[m("div",{class:d(`${N}__content`)},[e.icon?(u(),r("div",{key:0,class:d(`${N}__icon`)},[_(c(g),{filled:e.iconFilled,name:e.icon,size:e.iconSize},null,8,["filled","name","size"])],2)):v("",!0),m("div",{class:d(`${N}__text`)},[e.title?(u(),b(c($),{key:0,color:c(L).Neutral,"test-id":`${N}__title`,type:c(D).Body,bold:""},{default:p(()=>[f(h(e.title),1)]),_:1},8,["color","test-id","type"])):v("",!0),e.message?(u(),b(c($),{key:1,color:c(L).Neutral,"test-id":`${N}__message`,type:e.title?c(D).Medium:c(D).Body},{default:p(()=>[f(h(e.message),1)]),_:1},8,["color","test-id","type"])):v("",!0)],2),e.onAction&&e.actionLabel?(u(),r("div",{key:1,class:d(`${N}__action-button`)},[_(c(y),{color:e.color,"border-radius":e.borderRadius,"on-click":e.onAction,"test-id":`${N}__action-button`,variant:c(T).Soft},{default:p(()=>[f(h(e.actionLabel),1)]),_:1},8,["color","border-radius","on-click","test-id","variant"])],2)):v("",!0)],2),m("div",{class:d(`${N}__dismiss-button`)},[_(c(y),{"aria-label":"Dismiss toast",color:c(L).Neutral,"border-radius":e.borderRadius,"icon-before":c(M).Delete,"icon-size":c(z).Tiny,"on-click":ee,size:c(j).Tiny,"test-id":`${N}__dismiss-button`,variant:c(T).Text},null,8,["color","border-radius","icon-before","icon-size","size","test-id","variant"])],2)],2)],46,E))}});export{H as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ref as e}from"vue";import{b as o}from"./index-DbQjwiDA.js";function r(e,o){if(!o)return e;const t={...e};for(const d in o)if(Object.prototype.hasOwnProperty.call(o,d)){const e=o[d],a=t[d];f(a)&&f(e)?t[d]=r(a,e):t[d]=e}return t}function f(e){return!(null===e||"object"!=typeof e||Array.isArray(e)||e instanceof Date||e instanceof Map||e instanceof Set)}const t={borderRadius:void 0,colors:{primary:{0:"#ffffff",100:"#def5ff",200:"#b6eeff",300:"#75e3ff",400:"#2cd6ff",500:"#00c8ff",600:"#009cd4",700:"#007cab",800:"#00688d",900:"#065674"},secondary:{0:"#ffffff",100:"#DEE2E8",200:"#BFC7D4",300:"#9EAABD",400:"#8090A8",500:"#61738E",600:"#4F5D73",700:"#3A4555",800:"#272F3A",900:"#13161B"},neutral:{0:"#ffffff",100:"#F7F7F7",200:"#F2F2F2",300:"#EBEBEB",400:"#E6E6E6",500:"#DEDEDE",600:"#B3B3B3",700:"#858585",800:"#595959",900:"#2B2B2B"},danger:{0:"#ffffff",100:"#ffd3ce",200:"#ffb2ac",300:"#ff8e88",400:"#fe6561",500:"#e74c4c",600:"#d20e27",700:"#9b0018",800:"#63000c",900:"#360003"},warning:{0:"#ffffff",100:"#ffeaba",200:"#ffdf95",300:"#ffd36a",400:"#fdc836",500:"#f5be1a",600:"#c79800",700:"#8a6900",800:"#4f3b00",900:"#211700"},success:{0:"#ffffff",100:"#9effb2",200:"#69f68d",300:"#56e57e",400:"#41d56e",500:"#22c55d",600:"#00a147",700:"#007230",800:"#00441a",900:"#001f08"},info:{0:"#ffffff",100:"#cfe2ff",200:"#afceff",300:"#8eb9ff",400:"#6ca4ff",500:"#4e8ff8",600:"#2470e7",700:"#004cb5",800:"#002e73",900:"#00153e"}},darkMode:!1,fontFamily:"BlinkMacSystemFont,-apple-system,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Fira Sans','Droid Sans','Helvetica Neue',Helvetica,Arial,sans-serif"},d={contrast:{[o.Light]:{border:900,borderHover:700,bg:900,disabled:500,focus:900,hover:800,shadow:900,text:0,textDisabled:800},[o.Dark]:{border:400,borderHover:700,bg:100,disabled:500,focus:400,hover:200,shadow:400,text:900,textDisabled:500}},ghost:{[o.Light]:{disabled:100,focus:700,text:800,textDisabled:800},[o.Dark]:{disabled:700,focus:300,text:300,textDisabled:700}},outline:{[o.Light]:{border:300,borderHover:700,disabled:400,focus:700,hover:100,text:900,textBody:700,textDisabled:800},[o.Dark]:{border:500,borderHover:500,disabled:800,focus:300,hover:900,text:300,textBody:300,textDisabled:700}},soft:{[o.Light]:{bg:100,border:300,borderHover:700,disabled:100,focus:400,hover:200,shadow:200,text:900,textDisabled:800},[o.Dark]:{bg:900,border:100,borderHover:300,disabled:800,focus:100,hover:800,shadow:800,text:300,textDisabled:500}},solid:{[o.Light]:{bg:600,border:700,borderHover:900,disabled:500,focus:700,hover:500,shadow:700,text:0,textDisabled:100},[o.Dark]:{bg:400,border:100,borderHover:300,disabled:600,focus:100,hover:500,shadow:100,text:900,textDisabled:800}},text:{[o.Light]:{border:100,borderHover:300,disabled:100,focus:800,hover:200,text:800,textBody:800,textDisabled:700},[o.Dark]:{border:300,borderHover:500,disabled:800,focus:300,hover:900,text:100,textBody:100,textDisabled:500}}},a=o=>{const f=e(o?.borderRadius||t.borderRadius),d=e(o?.darkMode??t.darkMode),a=e(o?.fontFamily??t.fontFamily),s=r(t.colors,o?.colors),b=e(s);return{borderRadius:f,colors:b,darkMode:d,fontFamily:a,setBorderRadius:e=>{f.value=e},setColors:e=>{b.value={...b.value,...e}},setDarkMode:e=>{d.value=e},setFontFamily:e=>{a.value=e}}},s=/* @__PURE__ */Symbol("clll-theme");export{d as C,t as D,s as T,a as s};
|