bromcom-ui 2.7.36-rc.12-0 → 2.7.36-rc.12
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/bromcom-ui/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/{p-a18bb86e.entry.js → p-043fadc2.entry.js} +1 -1
- package/dist/bromcom-ui/{p-aedac6e4.entry.js → p-07990577.entry.js} +1 -1
- package/dist/bromcom-ui/{p-831fa0e8.entry.js → p-10b6faa4.entry.js} +1 -1
- package/dist/bromcom-ui/{p-cad94133.entry.js → p-1e15f9e2.entry.js} +1 -1
- package/dist/bromcom-ui/{p-cf48e4bd.entry.js → p-208ecb7e.entry.js} +1 -1
- package/dist/bromcom-ui/p-2900dc18.js +5 -0
- package/dist/bromcom-ui/{p-bb4a5441.entry.js → p-2e9f7f67.entry.js} +1 -1
- package/dist/bromcom-ui/{p-9ab7c5f9.js → p-2ed0035c.js} +1 -1
- package/dist/bromcom-ui/{p-ca48c3aa.entry.js → p-33da36fe.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b6c04be0.entry.js → p-427d4cfe.entry.js} +1 -1
- package/dist/bromcom-ui/{p-965d1cb2.entry.js → p-45f4c48d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5e502028.entry.js → p-4cffee4c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d0ae1e25.entry.js → p-4f425a06.entry.js} +1 -1
- package/dist/bromcom-ui/{p-6711d370.entry.js → p-5562a6f8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e58a867d.entry.js → p-5cfa60d9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c0648349.entry.js → p-5dbd14ee.entry.js} +1 -1
- package/dist/bromcom-ui/{p-26e68ec6.entry.js → p-66ca7f5c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a7acf688.entry.js → p-73a5514c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8ad347e0.entry.js → p-7a1590ef.entry.js} +1 -1
- package/dist/bromcom-ui/{p-885292bf.entry.js → p-7aa7ba95.entry.js} +1 -1
- package/dist/bromcom-ui/{p-cfeac4c2.entry.js → p-7afaa032.entry.js} +1 -1
- package/dist/bromcom-ui/{p-27c8e474.entry.js → p-85b66c30.entry.js} +1 -1
- package/dist/bromcom-ui/p-8737b92d.js +5 -0
- package/dist/bromcom-ui/{p-bbeb3aa8.entry.js → p-8e30c3ab.entry.js} +1 -1
- package/dist/bromcom-ui/{p-76e8a020.entry.js → p-8fc020d6.entry.js} +1 -1
- package/dist/bromcom-ui/p-923d0d7b.js +5 -0
- package/dist/bromcom-ui/{p-2ec58d06.entry.js → p-95506f91.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5d337c50.js → p-971036f3.js} +1 -1
- package/dist/bromcom-ui/{p-fb8d1e47.entry.js → p-99f802df.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c0a49e8e.entry.js → p-9a843ddf.entry.js} +1 -1
- package/dist/bromcom-ui/{p-83332466.entry.js → p-9cca42a9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-2fc5b5bd.entry.js → p-a855cd39.entry.js} +1 -1
- package/dist/bromcom-ui/{p-118e711c.entry.js → p-a9838689.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f559a41c.entry.js → p-abedcdee.entry.js} +1 -1
- package/dist/bromcom-ui/{p-cf68a762.entry.js → p-b5c23d92.entry.js} +1 -1
- package/dist/bromcom-ui/{p-3cd7aace.entry.js → p-bf52d000.entry.js} +1 -1
- package/dist/bromcom-ui/{p-80cdeb5b.entry.js → p-c67b5116.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a57c40a2.entry.js → p-ce62e9f4.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a6f49d6c.entry.js → p-cf1e59a8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-41d1f8b7.entry.js → p-dc5789ce.entry.js} +1 -1
- package/dist/bromcom-ui/{p-505b1f51.entry.js → p-dc94fe09.entry.js} +1 -1
- package/dist/bromcom-ui/{p-25f444e7.entry.js → p-ddce2fc7.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a25d4102.js → p-df8fe884.js} +1 -1
- package/dist/bromcom-ui/{p-e97f680e.entry.js → p-e43c47dc.entry.js} +1 -1
- package/dist/bromcom-ui/p-ee265d02.js +5 -0
- package/package.json +1 -1
- package/dist/bromcom-ui/p-121e4ca5.js +0 -5
- package/dist/bromcom-ui/p-5f46c328.js +0 -5
- package/dist/bromcom-ui/p-6b61ef5d.js +0 -5
- package/dist/bromcom-ui/p-fb65423b.js +0 -5
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{r as e,h as c,H as o,g as r}from"./p-0ba73c30.js";import{c as l}from"./p-d5b08a77.js";import{I as n}from"./p-20e22beb.js";import{C as d}from"./p-a3ffcb0d.js";import{G as s}from"./p-121e4ca5.js";import{S as b}from"./p-04c8b756.js";import{S as m}from"./p-128a5956.js";import"./p-6f56f8ca.js";import"./p-436364c8.js";import"./p-8c018ae0.js";import"./p-c9bd85e9.js";const a=class{constructor(c){e(this,c),this._id=s.UID(),this.hidden=!1,this.color="slate",this.modalSlots={}}connectedCallback(){const e=this.el.querySelectorAll("bcm-card-header, bcm-card-footer");e&&e.forEach((e=>{let c=b.lowercase(b.split(e.nodeName,"-").pop());if(e.slot=c,"header"===c){let c=e.getAttribute("color");c&&(c="white"==c?c:c+"-50",e.setAttribute("style",`background-color: ${d.dsColor(c)}`))}e.classList.add(`bcm-card__${c}`),this.modalSlots[c]=e}))}render(){const e=l("bcm-card",this.hidden?"hidden":null);return c(o,{class:e},c((()=>this.modalSlots.header&&c("slot",{name:"header"})),null),c("div",{class:"bcm-card__body"},c(m,null)),c((()=>this.modalSlots.footer&&c("slot",{name:"footer"})),null))}get el(){return r(this)}};(function(e,c,o,r){var l,n=arguments.length,d=n<3?c:null===r?r=Object.getOwnPropertyDescriptor(c,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)d=Reflect.decorate(e,c,o,r);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(d=(n<3?l(d):n>3?l(c,o,d):l(c,o))||d);n>3&&d&&Object.defineProperty(c,o,d)})([n()],a.prototype,"el",void 0),a.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}:root{--bcm-new-ds-color-inherit:inherit;--bcm-new-ds-color-current:currentColor;--bcm-new-ds-color-transparent:transparent;--bcm-new-ds-color-black:#000;--bcm-new-ds-color-white:#fff;--bcm-new-ds-color-slate:#64748b;--bcm-new-ds-color-slate-50:#f8fafc;--bcm-new-ds-color-slate-100:#f1f5f9;--bcm-new-ds-color-slate-200:#e2e8f0;--bcm-new-ds-color-slate-300:#cbd5e1;--bcm-new-ds-color-slate-400:#94a3b8;--bcm-new-ds-color-slate-500:#64748b;--bcm-new-ds-color-slate-600:#475569;--bcm-new-ds-color-slate-700:#334155;--bcm-new-ds-color-slate-800:#1e293b;--bcm-new-ds-color-slate-900:#0f172a;--bcm-new-ds-color-gray:#6b7280;--bcm-new-ds-color-gray-50:#f9fafb;--bcm-new-ds-color-gray-100:#f3f4f6;--bcm-new-ds-color-gray-200:#e5e7eb;--bcm-new-ds-color-gray-300:#d1d5db;--bcm-new-ds-color-gray-400:#9ca3af;--bcm-new-ds-color-gray-500:#6b7280;--bcm-new-ds-color-gray-600:#4b5563;--bcm-new-ds-color-gray-700:#374151;--bcm-new-ds-color-gray-800:#1f2937;--bcm-new-ds-color-gray-900:#111827;--bcm-new-ds-color-zinc:#71717a;--bcm-new-ds-color-zinc-50:#fafafa;--bcm-new-ds-color-zinc-100:#f4f4f5;--bcm-new-ds-color-zinc-200:#e4e4e7;--bcm-new-ds-color-zinc-300:#d4d4d8;--bcm-new-ds-color-zinc-400:#a1a1aa;--bcm-new-ds-color-zinc-500:#71717a;--bcm-new-ds-color-zinc-600:#52525b;--bcm-new-ds-color-zinc-700:#3f3f46;--bcm-new-ds-color-zinc-800:#27272a;--bcm-new-ds-color-zinc-900:#18181b;--bcm-new-ds-color-neutral:#737373;--bcm-new-ds-color-neutral-50:#fafafa;--bcm-new-ds-color-neutral-100:#f5f5f5;--bcm-new-ds-color-neutral-200:#e5e5e5;--bcm-new-ds-color-neutral-300:#d4d4d4;--bcm-new-ds-color-neutral-400:#a3a3a3;--bcm-new-ds-color-neutral-500:#737373;--bcm-new-ds-color-neutral-600:#525252;--bcm-new-ds-color-neutral-700:#404040;--bcm-new-ds-color-neutral-800:#262626;--bcm-new-ds-color-neutral-900:#171717;--bcm-new-ds-color-stone:#78716c;--bcm-new-ds-color-stone-50:#fafaf9;--bcm-new-ds-color-stone-100:#f5f5f4;--bcm-new-ds-color-stone-200:#e7e5e4;--bcm-new-ds-color-stone-300:#d6d3d1;--bcm-new-ds-color-stone-400:#a8a29e;--bcm-new-ds-color-stone-500:#78716c;--bcm-new-ds-color-stone-600:#57534e;--bcm-new-ds-color-stone-700:#44403c;--bcm-new-ds-color-stone-800:#292524;--bcm-new-ds-color-stone-900:#1c1917;--bcm-new-ds-color-red:#ef4444;--bcm-new-ds-color-red-50:#fef2f2;--bcm-new-ds-color-red-100:#fee2e2;--bcm-new-ds-color-red-200:#fecaca;--bcm-new-ds-color-red-300:#fca5a5;--bcm-new-ds-color-red-400:#f87171;--bcm-new-ds-color-red-500:#ef4444;--bcm-new-ds-color-red-600:#dc2626;--bcm-new-ds-color-red-700:#b91c1c;--bcm-new-ds-color-red-800:#991b1b;--bcm-new-ds-color-red-900:#7f1d1d;--bcm-new-ds-color-orange:#f97316;--bcm-new-ds-color-orange-50:#fff7ed;--bcm-new-ds-color-orange-100:#ffedd5;--bcm-new-ds-color-orange-200:#fed7aa;--bcm-new-ds-color-orange-300:#fdba74;--bcm-new-ds-color-orange-400:#fb923c;--bcm-new-ds-color-orange-500:#f97316;--bcm-new-ds-color-orange-600:#ea580c;--bcm-new-ds-color-orange-700:#c2410c;--bcm-new-ds-color-orange-800:#9a3412;--bcm-new-ds-color-orange-900:#7c2d12;--bcm-new-ds-color-amber:#f59e0b;--bcm-new-ds-color-amber-50:#fffbeb;--bcm-new-ds-color-amber-100:#fef3c7;--bcm-new-ds-color-amber-200:#fde68a;--bcm-new-ds-color-amber-300:#fcd34d;--bcm-new-ds-color-amber-400:#fbbf24;--bcm-new-ds-color-amber-500:#f59e0b;--bcm-new-ds-color-amber-600:#d97706;--bcm-new-ds-color-amber-700:#b45309;--bcm-new-ds-color-amber-800:#92400e;--bcm-new-ds-color-amber-900:#78350f;--bcm-new-ds-color-yellow:#eab308;--bcm-new-ds-color-yellow-50:#fefce8;--bcm-new-ds-color-yellow-100:#fef9c3;--bcm-new-ds-color-yellow-200:#fef08a;--bcm-new-ds-color-yellow-300:#fde047;--bcm-new-ds-color-yellow-400:#facc15;--bcm-new-ds-color-yellow-500:#eab308;--bcm-new-ds-color-yellow-600:#ca8a04;--bcm-new-ds-color-yellow-700:#a16207;--bcm-new-ds-color-yellow-800:#854d0e;--bcm-new-ds-color-yellow-900:#713f12;--bcm-new-ds-color-lime:#84cc16;--bcm-new-ds-color-lime-50:#f7fee7;--bcm-new-ds-color-lime-100:#ecfccb;--bcm-new-ds-color-lime-200:#d9f99d;--bcm-new-ds-color-lime-300:#bef264;--bcm-new-ds-color-lime-400:#a3e635;--bcm-new-ds-color-lime-500:#84cc16;--bcm-new-ds-color-lime-600:#65a30d;--bcm-new-ds-color-lime-700:#4d7c0f;--bcm-new-ds-color-lime-800:#3f6212;--bcm-new-ds-color-lime-900:#365314;--bcm-new-ds-color-green:#22c55e;--bcm-new-ds-color-green-50:#f0fdf4;--bcm-new-ds-color-green-100:#dcfce7;--bcm-new-ds-color-green-200:#bbf7d0;--bcm-new-ds-color-green-300:#86efac;--bcm-new-ds-color-green-400:#4ade80;--bcm-new-ds-color-green-500:#22c55e;--bcm-new-ds-color-green-600:#16a34a;--bcm-new-ds-color-green-700:#15803d;--bcm-new-ds-color-green-800:#166534;--bcm-new-ds-color-green-900:#14532d;--bcm-new-ds-color-emerald:#10b981;--bcm-new-ds-color-emerald-50:#ecfdf5;--bcm-new-ds-color-emerald-100:#d1fae5;--bcm-new-ds-color-emerald-200:#a7f3d0;--bcm-new-ds-color-emerald-300:#6ee7b7;--bcm-new-ds-color-emerald-400:#34d399;--bcm-new-ds-color-emerald-500:#10b981;--bcm-new-ds-color-emerald-600:#059669;--bcm-new-ds-color-emerald-700:#047857;--bcm-new-ds-color-emerald-800:#065f46;--bcm-new-ds-color-emerald-900:#064e3b;--bcm-new-ds-color-teal:#14b8a6;--bcm-new-ds-color-teal-50:#f0fdfa;--bcm-new-ds-color-teal-100:#ccfbf1;--bcm-new-ds-color-teal-200:#99f6e4;--bcm-new-ds-color-teal-300:#5eead4;--bcm-new-ds-color-teal-400:#2dd4bf;--bcm-new-ds-color-teal-500:#14b8a6;--bcm-new-ds-color-teal-600:#0d9488;--bcm-new-ds-color-teal-700:#0f766e;--bcm-new-ds-color-teal-800:#115e59;--bcm-new-ds-color-teal-900:#134e4a;--bcm-new-ds-color-cyan:#06b6d4;--bcm-new-ds-color-cyan-50:#ecfeff;--bcm-new-ds-color-cyan-100:#cffafe;--bcm-new-ds-color-cyan-200:#a5f3fc;--bcm-new-ds-color-cyan-300:#67e8f9;--bcm-new-ds-color-cyan-400:#22d3ee;--bcm-new-ds-color-cyan-500:#06b6d4;--bcm-new-ds-color-cyan-600:#0891b2;--bcm-new-ds-color-cyan-700:#0e7490;--bcm-new-ds-color-cyan-800:#155e75;--bcm-new-ds-color-cyan-900:#164e63;--bcm-new-ds-color-sky:#0ea5e9;--bcm-new-ds-color-sky-50:#f0f9ff;--bcm-new-ds-color-sky-100:#e0f2fe;--bcm-new-ds-color-sky-200:#bae6fd;--bcm-new-ds-color-sky-300:#7dd3fc;--bcm-new-ds-color-sky-400:#38bdf8;--bcm-new-ds-color-sky-500:#0ea5e9;--bcm-new-ds-color-sky-600:#0284c7;--bcm-new-ds-color-sky-700:#0369a1;--bcm-new-ds-color-sky-800:#075985;--bcm-new-ds-color-sky-900:#0c4a6e;--bcm-new-ds-color-blue:#3b82f6;--bcm-new-ds-color-blue-50:#eff6ff;--bcm-new-ds-color-blue-100:#dbeafe;--bcm-new-ds-color-blue-200:#bfdbfe;--bcm-new-ds-color-blue-300:#93c5fd;--bcm-new-ds-color-blue-400:#60a5fa;--bcm-new-ds-color-blue-500:#3b82f6;--bcm-new-ds-color-blue-600:#2563eb;--bcm-new-ds-color-blue-700:#1d4ed8;--bcm-new-ds-color-blue-800:#1e40af;--bcm-new-ds-color-blue-900:#1e3a8a;--bcm-new-ds-color-indigo:#6366f1;--bcm-new-ds-color-indigo-50:#eef2ff;--bcm-new-ds-color-indigo-100:#e0e7ff;--bcm-new-ds-color-indigo-200:#c7d2fe;--bcm-new-ds-color-indigo-300:#a5b4fc;--bcm-new-ds-color-indigo-400:#818cf8;--bcm-new-ds-color-indigo-500:#6366f1;--bcm-new-ds-color-indigo-600:#4f46e5;--bcm-new-ds-color-indigo-700:#4338ca;--bcm-new-ds-color-indigo-800:#3730a3;--bcm-new-ds-color-indigo-900:#312e81;--bcm-new-ds-color-violet:#8b5cf6;--bcm-new-ds-color-violet-50:#f5f3ff;--bcm-new-ds-color-violet-100:#ede9fe;--bcm-new-ds-color-violet-200:#ddd6fe;--bcm-new-ds-color-violet-300:#c4b5fd;--bcm-new-ds-color-violet-400:#a78bfa;--bcm-new-ds-color-violet-500:#8b5cf6;--bcm-new-ds-color-violet-600:#7c3aed;--bcm-new-ds-color-violet-700:#6d28d9;--bcm-new-ds-color-violet-800:#5b21b6;--bcm-new-ds-color-violet-900:#4c1d95;--bcm-new-ds-color-purple:#a855f7;--bcm-new-ds-color-purple-50:#faf5ff;--bcm-new-ds-color-purple-100:#f3e8ff;--bcm-new-ds-color-purple-200:#e9d5ff;--bcm-new-ds-color-purple-300:#d8b4fe;--bcm-new-ds-color-purple-400:#c084fc;--bcm-new-ds-color-purple-500:#a855f7;--bcm-new-ds-color-purple-600:#9333ea;--bcm-new-ds-color-purple-700:#7e22ce;--bcm-new-ds-color-purple-800:#6b21a8;--bcm-new-ds-color-purple-900:#581c87;--bcm-new-ds-color-fuchsia:#d946ef;--bcm-new-ds-color-fuchsia-50:#fdf4ff;--bcm-new-ds-color-fuchsia-100:#fae8ff;--bcm-new-ds-color-fuchsia-200:#f5d0fe;--bcm-new-ds-color-fuchsia-300:#f0abfc;--bcm-new-ds-color-fuchsia-400:#e879f9;--bcm-new-ds-color-fuchsia-500:#d946ef;--bcm-new-ds-color-fuchsia-600:#c026d3;--bcm-new-ds-color-fuchsia-700:#a21caf;--bcm-new-ds-color-fuchsia-800:#86198f;--bcm-new-ds-color-fuchsia-900:#701a75;--bcm-new-ds-color-pink:#ec4899;--bcm-new-ds-color-pink-50:#fdf2f8;--bcm-new-ds-color-pink-100:#fce7f3;--bcm-new-ds-color-pink-200:#fbcfe8;--bcm-new-ds-color-pink-300:#f9a8d4;--bcm-new-ds-color-pink-400:#f472b6;--bcm-new-ds-color-pink-500:#ec4899;--bcm-new-ds-color-pink-600:#db2777;--bcm-new-ds-color-pink-700:#be185d;--bcm-new-ds-color-pink-800:#9d174d;--bcm-new-ds-color-pink-900:#831843;--bcm-new-ds-color-rose:#f43f5e;--bcm-new-ds-color-rose-50:#fff1f2;--bcm-new-ds-color-rose-100:#ffe4e6;--bcm-new-ds-color-rose-200:#fecdd3;--bcm-new-ds-color-rose-300:#fda4af;--bcm-new-ds-color-rose-400:#fb7185;--bcm-new-ds-color-rose-500:#f43f5e;--bcm-new-ds-color-rose-600:#e11d48;--bcm-new-ds-color-rose-700:#be123c;--bcm-new-ds-color-rose-800:#9f1239;--bcm-new-ds-color-rose-900:#881337}*{box-sizing:border-box}.bcm-card{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:block;width:100%;background-color:var(--bcm-new-ds-color-white);border-radius:8px;box-shadow:0 1px 3px 0 rgba(17, 24, 38, 0.1);box-sizing:border-box}.bcm-card__header,.bcm-card__body,.bcm-card__footer{display:block;width:100%}.bcm-card__header{border-radius:8px 8px 0 0;padding:12px 24px;color:var(--bcm-new-ds-color-slate-700);font-weight:600}.bcm-card__body{padding:12px 24px}.bcm-card__footer{padding:12px 24px;border-radius:0 0 8px 8px}';export{a as bcm_card}
|
|
5
|
+
import{r as e,h as c,H as o,g as r}from"./p-0ba73c30.js";import{c as l}from"./p-d5b08a77.js";import{I as n}from"./p-20e22beb.js";import{C as d}from"./p-a3ffcb0d.js";import{G as s}from"./p-2900dc18.js";import{S as b}from"./p-04c8b756.js";import{S as m}from"./p-128a5956.js";import"./p-6f56f8ca.js";import"./p-436364c8.js";import"./p-8c018ae0.js";import"./p-c9bd85e9.js";const a=class{constructor(c){e(this,c),this._id=s.UID(),this.hidden=!1,this.color="slate",this.modalSlots={}}connectedCallback(){const e=this.el.querySelectorAll("bcm-card-header, bcm-card-footer");e&&e.forEach((e=>{let c=b.lowercase(b.split(e.nodeName,"-").pop());if(e.slot=c,"header"===c){let c=e.getAttribute("color");c&&(c="white"==c?c:c+"-50",e.setAttribute("style",`background-color: ${d.dsColor(c)}`))}e.classList.add(`bcm-card__${c}`),this.modalSlots[c]=e}))}render(){const e=l("bcm-card",this.hidden?"hidden":null);return c(o,{class:e},c((()=>this.modalSlots.header&&c("slot",{name:"header"})),null),c("div",{class:"bcm-card__body"},c(m,null)),c((()=>this.modalSlots.footer&&c("slot",{name:"footer"})),null))}get el(){return r(this)}};(function(e,c,o,r){var l,n=arguments.length,d=n<3?c:null===r?r=Object.getOwnPropertyDescriptor(c,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)d=Reflect.decorate(e,c,o,r);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(d=(n<3?l(d):n>3?l(c,o,d):l(c,o))||d);n>3&&d&&Object.defineProperty(c,o,d)})([n()],a.prototype,"el",void 0),a.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}:root{--bcm-new-ds-color-inherit:inherit;--bcm-new-ds-color-current:currentColor;--bcm-new-ds-color-transparent:transparent;--bcm-new-ds-color-black:#000;--bcm-new-ds-color-white:#fff;--bcm-new-ds-color-slate:#64748b;--bcm-new-ds-color-slate-50:#f8fafc;--bcm-new-ds-color-slate-100:#f1f5f9;--bcm-new-ds-color-slate-200:#e2e8f0;--bcm-new-ds-color-slate-300:#cbd5e1;--bcm-new-ds-color-slate-400:#94a3b8;--bcm-new-ds-color-slate-500:#64748b;--bcm-new-ds-color-slate-600:#475569;--bcm-new-ds-color-slate-700:#334155;--bcm-new-ds-color-slate-800:#1e293b;--bcm-new-ds-color-slate-900:#0f172a;--bcm-new-ds-color-gray:#6b7280;--bcm-new-ds-color-gray-50:#f9fafb;--bcm-new-ds-color-gray-100:#f3f4f6;--bcm-new-ds-color-gray-200:#e5e7eb;--bcm-new-ds-color-gray-300:#d1d5db;--bcm-new-ds-color-gray-400:#9ca3af;--bcm-new-ds-color-gray-500:#6b7280;--bcm-new-ds-color-gray-600:#4b5563;--bcm-new-ds-color-gray-700:#374151;--bcm-new-ds-color-gray-800:#1f2937;--bcm-new-ds-color-gray-900:#111827;--bcm-new-ds-color-zinc:#71717a;--bcm-new-ds-color-zinc-50:#fafafa;--bcm-new-ds-color-zinc-100:#f4f4f5;--bcm-new-ds-color-zinc-200:#e4e4e7;--bcm-new-ds-color-zinc-300:#d4d4d8;--bcm-new-ds-color-zinc-400:#a1a1aa;--bcm-new-ds-color-zinc-500:#71717a;--bcm-new-ds-color-zinc-600:#52525b;--bcm-new-ds-color-zinc-700:#3f3f46;--bcm-new-ds-color-zinc-800:#27272a;--bcm-new-ds-color-zinc-900:#18181b;--bcm-new-ds-color-neutral:#737373;--bcm-new-ds-color-neutral-50:#fafafa;--bcm-new-ds-color-neutral-100:#f5f5f5;--bcm-new-ds-color-neutral-200:#e5e5e5;--bcm-new-ds-color-neutral-300:#d4d4d4;--bcm-new-ds-color-neutral-400:#a3a3a3;--bcm-new-ds-color-neutral-500:#737373;--bcm-new-ds-color-neutral-600:#525252;--bcm-new-ds-color-neutral-700:#404040;--bcm-new-ds-color-neutral-800:#262626;--bcm-new-ds-color-neutral-900:#171717;--bcm-new-ds-color-stone:#78716c;--bcm-new-ds-color-stone-50:#fafaf9;--bcm-new-ds-color-stone-100:#f5f5f4;--bcm-new-ds-color-stone-200:#e7e5e4;--bcm-new-ds-color-stone-300:#d6d3d1;--bcm-new-ds-color-stone-400:#a8a29e;--bcm-new-ds-color-stone-500:#78716c;--bcm-new-ds-color-stone-600:#57534e;--bcm-new-ds-color-stone-700:#44403c;--bcm-new-ds-color-stone-800:#292524;--bcm-new-ds-color-stone-900:#1c1917;--bcm-new-ds-color-red:#ef4444;--bcm-new-ds-color-red-50:#fef2f2;--bcm-new-ds-color-red-100:#fee2e2;--bcm-new-ds-color-red-200:#fecaca;--bcm-new-ds-color-red-300:#fca5a5;--bcm-new-ds-color-red-400:#f87171;--bcm-new-ds-color-red-500:#ef4444;--bcm-new-ds-color-red-600:#dc2626;--bcm-new-ds-color-red-700:#b91c1c;--bcm-new-ds-color-red-800:#991b1b;--bcm-new-ds-color-red-900:#7f1d1d;--bcm-new-ds-color-orange:#f97316;--bcm-new-ds-color-orange-50:#fff7ed;--bcm-new-ds-color-orange-100:#ffedd5;--bcm-new-ds-color-orange-200:#fed7aa;--bcm-new-ds-color-orange-300:#fdba74;--bcm-new-ds-color-orange-400:#fb923c;--bcm-new-ds-color-orange-500:#f97316;--bcm-new-ds-color-orange-600:#ea580c;--bcm-new-ds-color-orange-700:#c2410c;--bcm-new-ds-color-orange-800:#9a3412;--bcm-new-ds-color-orange-900:#7c2d12;--bcm-new-ds-color-amber:#f59e0b;--bcm-new-ds-color-amber-50:#fffbeb;--bcm-new-ds-color-amber-100:#fef3c7;--bcm-new-ds-color-amber-200:#fde68a;--bcm-new-ds-color-amber-300:#fcd34d;--bcm-new-ds-color-amber-400:#fbbf24;--bcm-new-ds-color-amber-500:#f59e0b;--bcm-new-ds-color-amber-600:#d97706;--bcm-new-ds-color-amber-700:#b45309;--bcm-new-ds-color-amber-800:#92400e;--bcm-new-ds-color-amber-900:#78350f;--bcm-new-ds-color-yellow:#eab308;--bcm-new-ds-color-yellow-50:#fefce8;--bcm-new-ds-color-yellow-100:#fef9c3;--bcm-new-ds-color-yellow-200:#fef08a;--bcm-new-ds-color-yellow-300:#fde047;--bcm-new-ds-color-yellow-400:#facc15;--bcm-new-ds-color-yellow-500:#eab308;--bcm-new-ds-color-yellow-600:#ca8a04;--bcm-new-ds-color-yellow-700:#a16207;--bcm-new-ds-color-yellow-800:#854d0e;--bcm-new-ds-color-yellow-900:#713f12;--bcm-new-ds-color-lime:#84cc16;--bcm-new-ds-color-lime-50:#f7fee7;--bcm-new-ds-color-lime-100:#ecfccb;--bcm-new-ds-color-lime-200:#d9f99d;--bcm-new-ds-color-lime-300:#bef264;--bcm-new-ds-color-lime-400:#a3e635;--bcm-new-ds-color-lime-500:#84cc16;--bcm-new-ds-color-lime-600:#65a30d;--bcm-new-ds-color-lime-700:#4d7c0f;--bcm-new-ds-color-lime-800:#3f6212;--bcm-new-ds-color-lime-900:#365314;--bcm-new-ds-color-green:#22c55e;--bcm-new-ds-color-green-50:#f0fdf4;--bcm-new-ds-color-green-100:#dcfce7;--bcm-new-ds-color-green-200:#bbf7d0;--bcm-new-ds-color-green-300:#86efac;--bcm-new-ds-color-green-400:#4ade80;--bcm-new-ds-color-green-500:#22c55e;--bcm-new-ds-color-green-600:#16a34a;--bcm-new-ds-color-green-700:#15803d;--bcm-new-ds-color-green-800:#166534;--bcm-new-ds-color-green-900:#14532d;--bcm-new-ds-color-emerald:#10b981;--bcm-new-ds-color-emerald-50:#ecfdf5;--bcm-new-ds-color-emerald-100:#d1fae5;--bcm-new-ds-color-emerald-200:#a7f3d0;--bcm-new-ds-color-emerald-300:#6ee7b7;--bcm-new-ds-color-emerald-400:#34d399;--bcm-new-ds-color-emerald-500:#10b981;--bcm-new-ds-color-emerald-600:#059669;--bcm-new-ds-color-emerald-700:#047857;--bcm-new-ds-color-emerald-800:#065f46;--bcm-new-ds-color-emerald-900:#064e3b;--bcm-new-ds-color-teal:#14b8a6;--bcm-new-ds-color-teal-50:#f0fdfa;--bcm-new-ds-color-teal-100:#ccfbf1;--bcm-new-ds-color-teal-200:#99f6e4;--bcm-new-ds-color-teal-300:#5eead4;--bcm-new-ds-color-teal-400:#2dd4bf;--bcm-new-ds-color-teal-500:#14b8a6;--bcm-new-ds-color-teal-600:#0d9488;--bcm-new-ds-color-teal-700:#0f766e;--bcm-new-ds-color-teal-800:#115e59;--bcm-new-ds-color-teal-900:#134e4a;--bcm-new-ds-color-cyan:#06b6d4;--bcm-new-ds-color-cyan-50:#ecfeff;--bcm-new-ds-color-cyan-100:#cffafe;--bcm-new-ds-color-cyan-200:#a5f3fc;--bcm-new-ds-color-cyan-300:#67e8f9;--bcm-new-ds-color-cyan-400:#22d3ee;--bcm-new-ds-color-cyan-500:#06b6d4;--bcm-new-ds-color-cyan-600:#0891b2;--bcm-new-ds-color-cyan-700:#0e7490;--bcm-new-ds-color-cyan-800:#155e75;--bcm-new-ds-color-cyan-900:#164e63;--bcm-new-ds-color-sky:#0ea5e9;--bcm-new-ds-color-sky-50:#f0f9ff;--bcm-new-ds-color-sky-100:#e0f2fe;--bcm-new-ds-color-sky-200:#bae6fd;--bcm-new-ds-color-sky-300:#7dd3fc;--bcm-new-ds-color-sky-400:#38bdf8;--bcm-new-ds-color-sky-500:#0ea5e9;--bcm-new-ds-color-sky-600:#0284c7;--bcm-new-ds-color-sky-700:#0369a1;--bcm-new-ds-color-sky-800:#075985;--bcm-new-ds-color-sky-900:#0c4a6e;--bcm-new-ds-color-blue:#3b82f6;--bcm-new-ds-color-blue-50:#eff6ff;--bcm-new-ds-color-blue-100:#dbeafe;--bcm-new-ds-color-blue-200:#bfdbfe;--bcm-new-ds-color-blue-300:#93c5fd;--bcm-new-ds-color-blue-400:#60a5fa;--bcm-new-ds-color-blue-500:#3b82f6;--bcm-new-ds-color-blue-600:#2563eb;--bcm-new-ds-color-blue-700:#1d4ed8;--bcm-new-ds-color-blue-800:#1e40af;--bcm-new-ds-color-blue-900:#1e3a8a;--bcm-new-ds-color-indigo:#6366f1;--bcm-new-ds-color-indigo-50:#eef2ff;--bcm-new-ds-color-indigo-100:#e0e7ff;--bcm-new-ds-color-indigo-200:#c7d2fe;--bcm-new-ds-color-indigo-300:#a5b4fc;--bcm-new-ds-color-indigo-400:#818cf8;--bcm-new-ds-color-indigo-500:#6366f1;--bcm-new-ds-color-indigo-600:#4f46e5;--bcm-new-ds-color-indigo-700:#4338ca;--bcm-new-ds-color-indigo-800:#3730a3;--bcm-new-ds-color-indigo-900:#312e81;--bcm-new-ds-color-violet:#8b5cf6;--bcm-new-ds-color-violet-50:#f5f3ff;--bcm-new-ds-color-violet-100:#ede9fe;--bcm-new-ds-color-violet-200:#ddd6fe;--bcm-new-ds-color-violet-300:#c4b5fd;--bcm-new-ds-color-violet-400:#a78bfa;--bcm-new-ds-color-violet-500:#8b5cf6;--bcm-new-ds-color-violet-600:#7c3aed;--bcm-new-ds-color-violet-700:#6d28d9;--bcm-new-ds-color-violet-800:#5b21b6;--bcm-new-ds-color-violet-900:#4c1d95;--bcm-new-ds-color-purple:#a855f7;--bcm-new-ds-color-purple-50:#faf5ff;--bcm-new-ds-color-purple-100:#f3e8ff;--bcm-new-ds-color-purple-200:#e9d5ff;--bcm-new-ds-color-purple-300:#d8b4fe;--bcm-new-ds-color-purple-400:#c084fc;--bcm-new-ds-color-purple-500:#a855f7;--bcm-new-ds-color-purple-600:#9333ea;--bcm-new-ds-color-purple-700:#7e22ce;--bcm-new-ds-color-purple-800:#6b21a8;--bcm-new-ds-color-purple-900:#581c87;--bcm-new-ds-color-fuchsia:#d946ef;--bcm-new-ds-color-fuchsia-50:#fdf4ff;--bcm-new-ds-color-fuchsia-100:#fae8ff;--bcm-new-ds-color-fuchsia-200:#f5d0fe;--bcm-new-ds-color-fuchsia-300:#f0abfc;--bcm-new-ds-color-fuchsia-400:#e879f9;--bcm-new-ds-color-fuchsia-500:#d946ef;--bcm-new-ds-color-fuchsia-600:#c026d3;--bcm-new-ds-color-fuchsia-700:#a21caf;--bcm-new-ds-color-fuchsia-800:#86198f;--bcm-new-ds-color-fuchsia-900:#701a75;--bcm-new-ds-color-pink:#ec4899;--bcm-new-ds-color-pink-50:#fdf2f8;--bcm-new-ds-color-pink-100:#fce7f3;--bcm-new-ds-color-pink-200:#fbcfe8;--bcm-new-ds-color-pink-300:#f9a8d4;--bcm-new-ds-color-pink-400:#f472b6;--bcm-new-ds-color-pink-500:#ec4899;--bcm-new-ds-color-pink-600:#db2777;--bcm-new-ds-color-pink-700:#be185d;--bcm-new-ds-color-pink-800:#9d174d;--bcm-new-ds-color-pink-900:#831843;--bcm-new-ds-color-rose:#f43f5e;--bcm-new-ds-color-rose-50:#fff1f2;--bcm-new-ds-color-rose-100:#ffe4e6;--bcm-new-ds-color-rose-200:#fecdd3;--bcm-new-ds-color-rose-300:#fda4af;--bcm-new-ds-color-rose-400:#fb7185;--bcm-new-ds-color-rose-500:#f43f5e;--bcm-new-ds-color-rose-600:#e11d48;--bcm-new-ds-color-rose-700:#be123c;--bcm-new-ds-color-rose-800:#9f1239;--bcm-new-ds-color-rose-900:#881337}*{box-sizing:border-box}.bcm-card{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:block;width:100%;background-color:var(--bcm-new-ds-color-white);border-radius:8px;box-shadow:0 1px 3px 0 rgba(17, 24, 38, 0.1);box-sizing:border-box}.bcm-card__header,.bcm-card__body,.bcm-card__footer{display:block;width:100%}.bcm-card__header{border-radius:8px 8px 0 0;padding:12px 24px;color:var(--bcm-new-ds-color-slate-700);font-weight:600}.bcm-card__body{padding:12px 24px}.bcm-card__footer{padding:12px 24px;border-radius:0 0 8px 8px}';export{a as bcm_card}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{h as e,r as t,c as i,H as n,g as a}from"./p-0ba73c30.js";import{c as s}from"./p-d5b08a77.js";import{G as o,s as c}from"./p-
|
|
5
|
+
import{h as e,r as t,c as i,H as n,g as a}from"./p-0ba73c30.js";import{c as s}from"./p-d5b08a77.js";import{G as o,s as c}from"./p-2900dc18.js";import{B as r}from"./p-c9bd85e9.js";import{d as h,g as l}from"./p-8c018ae0.js";import{c as p}from"./p-be904c55.js";import{L as d}from"./p-8f394771.js";import{I as m}from"./p-20e22beb.js";import"./p-6f56f8ca.js";import"./p-128a5956.js";import"./p-04c8b756.js";const{state:u}=p({group:new Map,allChecked:!0,allUnchecked:!0,changeInderminate:{}}),x=e=>c((()=>u.group.get(e)),{}),g=e=>{var t;const i=x(e);let n=!0,a=!0;null===(t=i.childs)||void 0===t||t.map((e=>{e.checked&&(a=!1),!e.checked&&(n=!1)})),i.indeterminateState=n||a?n?"determinate":"uncheck":"indeterminate"},b=x,f=({customStyle:t,groupContainerClasses:i,onBcmSelect:n,items:a})=>e("div",{class:i,style:t},a.childs&&a.childs.map((t=>e("bcm-checkbox",{id:t.id,name:t.name,color:t.color,checked:t.checked,disabled:t.disabled,readonly:t.readonly,required:t.required,noCaption:t.noCaption,"no-margin":!0,size:t.size,"full-width":t.fullWidth,onClick:e=>{!t.disabled&&!t.readonly&&(n(t.id),e.preventDefault())}},t.slot||t.label))));const y=class{constructor(e){t(this,e),this.change=i(this,"bcm-change",7),this.groupCheckedList=i(this,"bcm-group-checked-list",7),this._id=o.UID(),this.direction=r.Direction.horizontal,this.items=[],this.indeterminate=!1,this.disabled=!1,this.readonly=!1,this.hidden=!1,this.required=!1,this.fullWidth=!1,this.optionType="default",this.buttonStyle="solid",this.size=r.Size.medium,this.noCaption=!1,this.captionType=r.Status.default,this.tick={}}componentDidLoad(){this.initState()}disconnectedCallback(){Promise.resolve(u.group.delete(this._id))}componentShouldUpdate(e,t,i){"tick"==i&&e!==t&&c((()=>b(this._id).childs.length>0),!1)&&this.getValue().then((e=>this.value=e)),this.getOptions().indexOf(i)>-1&&e!==t&&this.initState()}getOptions(){return c((()=>Object.keys(u.group.get(this._id))),[])}async initState(){const{fullWidth:e,optionType:t,buttonStyle:i,size:n,noCaption:a,defaultValue:s,label:r,required:h,captionType:l,hidden:p,direction:d,indeterminate:m,gap:x,items:g}=this,b=s&&("string"==typeof s?JSON.parse(s):s),f=g.length>0?g:await this.getCheckboxes();await(async({fullWidth:e,optionType:t,buttonStyle:i,size:n,defaultCheckedItems:a,el:s,id:r,label:h,required:l,captionType:p,hidden:d,direction:m,childs:x,indeterminate:g,gap:b,noCaption:f})=>{s&&u.group.set(r,{fullWidth:e,optionType:t,buttonStyle:i,size:n,defaultCheckedItems:a,label:h,required:l,captionType:p,hidden:d,direction:m,indeterminate:g,gap:b,noCaption:f,childs:null==x?void 0:x.map((e=>(e.checked&&(u.allUnchecked=!1),!e.checked&&(u.allChecked=!1),t&&(e.optionType=t),i&&(e.buttonStyle=i),n&&(e.size=n),a&&a.find((t=>t===e.name))&&(e.checked=!0),e.noCaption=f,{id:e.id||o.UID(),checked:e.checked||!1,name:e.name,size:e.size,buttonStyle:e.buttonStyle,optionType:e.optionType,style:e.style,noCaption:e.noCaption,color:e.color,disabled:e.disabled,readonly:e.readonly,label:e.label||e.name,slot:e.slot||c((()=>e.querySelector(".slot").textContent),e.textContent),required:e.required||l,el:e,captionType:p,hidden:d}))),indeterminateState:u.allChecked||u.allUnchecked?u.allChecked?"determinate":"uncheck":"indeterminate"})})({id:this._id,el:this.el,indeterminate:m,fullWidth:e,optionType:t,buttonStyle:i,size:n,defaultCheckedItems:b,label:r,noCaption:a,required:h,captionType:l,hidden:p,gap:x,direction:d,childs:f});const y=this.el.querySelector(`#bcm-checkbox-group__items-${this._id}`);y&&y.innerHTML&&(y.innerHTML=""),this.value=await this.getValue()}async markForCheck(){await h(10),this.tick=o.UID()}async onBcmFocus(){const e=this.getCheckboxes();e.length>0&&e[0].onBcmFocus()}async onBcmBlur(){this.el.blur()}async setClear(){return null===(t=x(e=this._id).childs)||void 0===t||t.forEach((e=>{e.checked=!1})),g(e),await h(10),this.getCheckboxes().forEach((e=>{e.setClear()})),this.markForCheck(),await h(10),Promise.resolve();var e,t}async resetCaption(){return await h(10),this.getCheckboxes().forEach((e=>{e.resetCaption()})),await h(10),Promise.resolve()}async set(e){Array.isArray(e)&&await this.check(e,!0,!0)}async get(){const e=await this.getCheckedList()&&Object.keys(await this.getCheckedList());return e.length>0?e:[]}async check(e,t=!0,i=!1){((e,t,i,n)=>{var a;const s=t&&("string"==typeof t?JSON.parse(t):t);null===(a=x(e).childs)||void 0===a||a.forEach((e=>{if(s){const t=s.find((t=>t===e.name||t.name===e.name));t?"object"==typeof t?Object.keys(t).map((n=>{e.checked="checked"===n?t[n]:i})):e.checked=i:n&&(e.checked=!1)}else e.checked=!1})),g(e)})(this._id,e,t,i),this.markForCheck()}async getValue(e){return Promise.resolve(((e,t)=>{var i;const n=x(e);let a={};return null===(i=n.childs)||void 0===i||i.map((e=>{t?e.name===t&&(a[e.name]={value:!!e.checked,name:e.name}):a[e.name]={value:!!e.checked,name:e.name}})),a})(this._id,e))}async getCheckedList(){return(e=>{var t;const i=x(e);let n={};return null===(t=i.childs)||void 0===t||t.map((e=>{!0===e.checked&&(n[e.name]={value:!!e.checked,name:e.name})})),n})(this._id)}handleItemsChange(){this.initState()}getCheckboxes(){return l(this.el,"bcm-checkbox:not(#bcm-indeterminate-element)")}async getCheckbox(e){const t=this.el.querySelector(`bcm-checkbox[id="${e}"]`);if(t){const e=t.name,i=await this.getValue(e);return{element:t,event:c((()=>i[e]),null)}}return{}}async indeterminateClick(){(e=>{var t;const i=x(e);if(!i.disabled){let n=!0;"determinate"===i.indeterminateState&&(n=!1),null===(t=x(e).childs)||void 0===t||t.map((e=>{e.checked=n})),g(e)}})(this._id),this.markForCheck()}async changeCheckBox(e){var t,i;null===(i=x((t={id:this._id,childId:e}).id).childs)||void 0===i||i.map((e=>{e.checked=e.id===t.childId?!e.checked:e.checked})),g(t.id),this.markForCheck(),await h(10),this.value=await this.getValue(),this.change.emit({value:this.value,changed:Object.assign({},await this.getCheckbox(e))}),this.groupCheckedList.emit(await this.getCheckedList())}getItems(){return b(this._id)}render(){const t=this.getItems(),{disabled:i,captionType:a,label:o,indeterminate:c,indeterminateState:r,required:h,direction:l,optionType:p,hidden:m,fullWidth:u,gap:x}=t,g=s("bcm-checkbox-group",l,p,{hidden:m,"full-width":u}),b=s("bcm-checkbox-group__container",p,{[l]:"default"===p,indeterminate:c,hidden:m,"full-width":u});return e(n,{class:g},e("span",{hidden:!0,id:`bcm-checkbox-group__items-${this._id}`},e("slot",null)),e("div",{class:"bcm-checkbox-group__label"},o&&e("div",null,e(d,{size:this.size,type:a,value:o,required:h}))),c&&e("bcm-checkbox",{onClick:e=>{this.indeterminateClick(),e.preventDefault()},"no-caption":!0,id:"bcm-indeterminate-element",indeterminate:r,disabled:i},"Check All"),e(f,{items:t,groupContainerClasses:b,customStyle:x&&{gap:x},onBcmSelect:e=>this.changeCheckBox(e)}))}get el(){return a(this)}static get watchers(){return{items:["handleItemsChange"]}}};(function(e,t,i,n){var a,s=arguments.length,o=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,n);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(o=(s<3?a(o):s>3?a(t,i,o):a(t,i))||o);s>3&&o&&Object.defineProperty(t,i,o)})([m()],y.prototype,"el",void 0),y.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}.bcm-checkbox-group{display:flex;flex-direction:column;align-items:flex-start;width:100%;margin-bottom:8px}.bcm-checkbox-group.hidden{display:none}.bcm-checkbox-group__container{display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:flex-start;width:100%}.bcm-checkbox-group__container.full-width{max-width:100%}.bcm-checkbox-group__container.vertical{gap:8px;flex-direction:column}.bcm-checkbox-group__container.button{gap:unset}.bcm-checkbox-group__container.indeterminate{padding-top:16px;margin-top:16px;border-top:1px solid #efefef}';export{y as bcm_checkbox_group}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{r as e,h as t,H as i,g as p}from"./p-0ba73c30.js";import{I as n}from"./p-20e22beb.js";import{G as a}from"./p-
|
|
5
|
+
import{r as e,h as t,H as i,g as p}from"./p-0ba73c30.js";import{I as n}from"./p-20e22beb.js";import{G as a}from"./p-2900dc18.js";const s=class{constructor(t){e(this,t),this._id=a.UID()}render(){return t(i,null,t("bcm-skeleton",null,t("slot",null)))}get el(){return p(this)}};(function(e,t,i,p){var n,a=arguments.length,s=a<3?t:null===p?p=Object.getOwnPropertyDescriptor(t,i):p;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,p);else for(var x=e.length-1;x>=0;x--)(n=e[x])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);a>3&&s&&Object.defineProperty(t,i,s)})([n()],s.prototype,"el",void 0),s.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}:host{display:block}';export{s as bcm_default}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{r as t,c as e,f as i,h as s,H as o,g as a}from"./p-0ba73c30.js";import{I as n}from"./p-20e22beb.js";import{G as r,s as h}from"./p-
|
|
5
|
+
import{r as t,c as e,f as i,h as s,H as o,g as a}from"./p-0ba73c30.js";import{I as n}from"./p-20e22beb.js";import{G as r,s as h}from"./p-2900dc18.js";import{S as p}from"./p-04c8b756.js";import{B as l}from"./p-c9bd85e9.js";import"./p-6f56f8ca.js";const c=["BCM-INPUT","BCM-TEXTAREA","BCM-SWITCH","BCM-CHECKBOX","BCM-RADIO-GROUP","BCM-CHECKBOX-GROUP","BCM-RANGE","BCM-FORM","BCM-FORM-GROUP","BCM-LIST","BCM-COLORPICKER","BCM-DATE-PICKER","BCM-TIME-PICKER","BCM-DATETIME-PICKER","BCM-SELECT","BCM-LISTBOX"];const x=class{constructor(i){t(this,i),this.bcmForm=e(this,"bcm-form",7),this._id=r.UID(),this.validation=!1,this.isLoad=!1,this.formData={},this.formObj=new Map}componentDidLoad(){this.isLoad=!0,i(this)}componentIsValid(t){if(!t.hidden){this.checkIsGroup(t);const e=["bcm-checkbox","bcm-switch"].includes(p.lowercase(t.tagName))?0==t.value:p.isNullOrEmpty(t.value);t.required&&(e?(t.captionError=l.FormErrorMessages.required,t.captionType="error",this.formObj.set(t.id,{name:t.name,valid:!1,errorDetails:t.captionError})):(t.captionError=null,t.captionType="default",this.formObj.delete(t.id)))}}isGroup(t){return["bcm-checkbox-group"].includes(p.lowercase(t.tagName))}checkIsGroup(t){if(this.isGroup(t))for(let e of Array.from(t.querySelectorAll("bcm-checkbox")))e&&this.componentIsValid(e)}changeCheckboxGroup(t){const e=t.target,{changed:i}=t.detail,s=Array.from(e.querySelectorAll("bcm-checkbox"));for(let t of s)t.id==i.element.id&&(t.value=i.event.value,this.componentIsValid(t))}bcmComponentList(){return h((()=>Array.from(this.el.querySelectorAll("*")).filter((t=>c.includes(t.tagName)&&(!t["s-hn"]||"BCM-FORM-2"==t["s-hn"]))).filter(Boolean)),[])}formResponse(){const t={formData:this.formData,isValid:0==this.formObj.size,errorDetails:Object.assign({},this.formObj.size>0&&Array.from(this.formObj).map((([t,e])=>({[e.name]:e.errorDetails})))),message:0==this.formObj.size?"":"Please fill in all inputs"};return this.bcmForm.emit(t),t}async setMethodType(t){const{isLoad:e,validation:i}=this;if(e)for(const e of this.bcmComponentList())try{await e[t](),"setClear"==t&&i&&this.componentIsValid(e)}catch(i){console.error(e.nodeName,t,i)}return Promise.resolve()}async submit(){const{isLoad:t,validation:e}=this;if(t)for(const t of this.bcmComponentList()){const{name:i,value:s}=t;this.formData[i]=p.isNullOrEmpty(s)?null:s,e&&this.componentIsValid(t)}return Promise.resolve(this.formResponse())}async set(t){var e,i,s;if(this.isLoad&&t&&(null===(e=this.bcmComponentList())||void 0===e?void 0:e.length)>0)for(let e of Object.keys(t)){const o=null!==(s=null===(i=this.bcmComponentList())||void 0===i?void 0:i.find((t=>t.name==e)))&&void 0!==s?s:{};if(o)try{await o.set(t[e]),this.componentIsValid(o)}catch(t){console.warn("set: ",e,o.nodeName)}}}get(){var t;let e={};if((null===(t=this.bcmComponentList())||void 0===t?void 0:t.length)>0)for(let t of this.bcmComponentList())e=Object.assign(Object.assign({},e),{[t.name]:p.isNullOrEmpty(t.value)?null:t.value});return Promise.resolve(e)}async resetCaption(){return Promise.resolve(await this.setMethodType("resetCaption"))}async setClear(){return this.formData={},this.formObj=new Map,Promise.resolve(await this.setMethodType("setClear"))}onChange(t){const{isLoad:e,validation:i}=this;if(e){const e=t.target,s=e&&e.tagName.toLowerCase().startsWith("bcm-");if(i&&s){if(this.isGroup(e))return this.changeCheckboxGroup(t);this.componentIsValid(e)}}}render(){return s(o,null,s("slot",null))}get el(){return a(this)}};(function(t,e,i,s){var o,a=arguments.length,n=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);a>3&&n&&Object.defineProperty(e,i,n)})([n()],x.prototype,"el",void 0),x.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}:host{display:block}';export{x as bcm_form_2}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Stencil
|
|
3
|
+
* Copyright (c) Bromcom.
|
|
4
|
+
*/
|
|
5
|
+
import"./p-7e44e6b5.js";import{S as t}from"./p-04c8b756.js";import{a as e}from"./p-c9bd85e9.js";import{C as n}from"./p-a3ffcb0d.js";import"./p-626a65e9.js";import{G as o}from"./p-2900dc18.js";import"./p-923d0d7b.js";import"./p-df8fe884.js";function i(t){return t.split("-")[0]}function r(t){return t.split("-")[1]}function s(t){return["top","bottom"].includes(i(t))?"x":"y"}function a(t){return"y"===t?"height":"width"}function l(t,e,n){let{reference:o,floating:l}=t;const c=o.x+o.width/2-l.width/2,f=o.y+o.height/2-l.height/2,u=s(e),d=a(u),h=o[d]/2-l[d]/2,m="x"===u;let p;switch(i(e)){case"top":p={x:c,y:o.y-l.height};break;case"bottom":p={x:c,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:f};break;case"left":p={x:o.x-l.width,y:f};break;default:p={x:o.x,y:o.y}}switch(r(e)){case"start":p[u]-=h*(n&&m?-1:1);break;case"end":p[u]+=h*(n&&m?-1:1)}return p}function c(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function f(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function u(t,e){var n;void 0===e&&(e={});const{x:o,y:i,platform:r,rects:s,elements:a,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:m=!1,padding:p=0}=e,w=c(p),y=a[m?"floating"===h?"reference":"floating":h],g=f(await r.getClippingRect({element:null==(n=await(null==r.isElement?void 0:r.isElement(y)))||n?y:y.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),x=f(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===h?{...s.floating,x:o,y:i}:s.reference,offsetParent:await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),strategy:l}):s[h]);return{top:g.top-x.top+w.top,bottom:x.bottom-g.bottom+w.bottom,left:g.left-x.left+w.left,right:x.right-g.right+w.right}}const d=Math.min,h=Math.max;function m(t,e,n){return h(t,d(e,n))}const p={left:"right",right:"left",bottom:"top",top:"bottom"};function w(t){return t.replace(/left|right|bottom|top/g,(t=>p[t]))}const y={start:"end",end:"start"};function g(t){return t.replace(/start|end/g,(t=>y[t]))}const x=["top","right","bottom","left"],b=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n;const{placement:o,middlewareData:l,rects:c,initialPlacement:f,platform:d,elements:h}=e,{mainAxis:m=!0,crossAxis:p=!0,fallbackPlacements:y,fallbackStrategy:x="bestFit",flipAlignment:b=!0,...v}=t,A=i(o),k=[f,...y||(A!==f&&b?function(t){const e=w(t);return[g(t),e,g(e)]}(f):[w(f)])],j=await u(e,v),$=[];let R=(null==(n=l.flip)?void 0:n.overflows)||[];if(m&&$.push(j[A]),p){const{main:t,cross:e}=function(t,e,n){void 0===n&&(n=!1);const o=r(t),i=s(t),l=a(i);let c="x"===i?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[l]>e.floating[l]&&(c=w(c)),{main:c,cross:w(c)}}(o,c,await(null==d.isRTL?void 0:d.isRTL(h.floating)));$.push(j[t],j[e])}if(R=[...R,{placement:o,overflows:$}],!$.every((t=>t<=0))){var P,C;const t=(null!=(P=null==(C=l.flip)?void 0:C.index)?P:0)+1,e=k[t];if(e)return{data:{index:t,overflows:R},reset:{placement:e}};let n="bottom";switch(x){case"bestFit":{var M;const t=null==(M=R.map((t=>[t,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:M[0].placement;t&&(n=t);break}case"initialPlacement":n=f}if(o!==n)return{reset:{placement:n}}}return{}}}};function v(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function A(t){return x.some((e=>t[e]>=0))}const k=function(t){let{strategy:e="referenceHidden",...n}=void 0===t?{}:t;return{name:"hide",async fn(t){const{rects:o}=t;switch(e){case"referenceHidden":{const e=v(await u(t,{...n,elementContext:"reference"}),o.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:A(e)}}}case"escaped":{const e=v(await u(t,{...n,altBoundary:!0}),o.floating);return{data:{escapedOffsets:e,escaped:A(e)}}}default:return{}}}}},j=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r}=e,{mainAxis:a=!0,crossAxis:l=!1,limiter:c={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...f}=t,d={x:n,y:o},h=await u(e,f),p=s(i(r)),w="x"===p?"y":"x";let y=d[p],g=d[w];a&&(y=m(y+h["y"===p?"top":"left"],y,y-h["y"===p?"bottom":"right"])),l&&(g=m(g+h["y"===w?"top":"left"],g,g-h["y"===w?"bottom":"right"]));const x=c.fn({...e,[p]:y,[w]:g});return{...x,data:{x:x.x-n,y:x.y-o}}}}};function $(t){return t&&t.document&&t.location&&t.alert&&t.setInterval}function R(t){if(null==t)return window;if(!$(t)){const e=t.ownerDocument;return e&&e.defaultView||window}return t}function P(t){return R(t).getComputedStyle(t)}function C(t){return $(t)?"":t?(t.nodeName||"").toLowerCase():""}function M(){const t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((t=>t.brand+"/"+t.version)).join(" "):navigator.userAgent}function T(t){return t instanceof R(t).HTMLElement}function O(t){return t instanceof R(t).Element}function D(t){return"undefined"!=typeof ShadowRoot&&(t instanceof R(t).ShadowRoot||t instanceof ShadowRoot)}function H(t){const{overflow:e,overflowX:n,overflowY:o}=P(t);return/auto|scroll|overlay|hidden/.test(e+o+n)}function L(t){return["table","td","th"].includes(C(t))}function B(t){const e=/firefox/i.test(M()),n=P(t);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||e&&"filter"===n.willChange||e&&!!n.filter&&"none"!==n.filter}function S(){return!/^((?!chrome|android).)*safari/i.test(M())}const z=Math.min,E=Math.max,F=Math.round;function G(t,e,n){var o,i,r,s;void 0===e&&(e=!1),void 0===n&&(n=!1);const a=t.getBoundingClientRect();let l=1,c=1;e&&T(t)&&(l=t.offsetWidth>0&&F(a.width)/t.offsetWidth||1,c=t.offsetHeight>0&&F(a.height)/t.offsetHeight||1);const f=O(t)?R(t):window,u=!S()&&n,d=(a.left+(u&&null!=(o=null==(i=f.visualViewport)?void 0:i.offsetLeft)?o:0))/l,h=(a.top+(u&&null!=(r=null==(s=f.visualViewport)?void 0:s.offsetTop)?r:0))/c,m=a.width/l,p=a.height/c;return{width:m,height:p,top:h,right:d+m,bottom:h+p,left:d,x:d,y:h}}function I(t){return(e=t,(e instanceof R(e).Node?t.ownerDocument:t.document)||window.document).documentElement;var e}function V(t){return O(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function X(t){return G(I(t)).left+V(t).scrollLeft}function Y(t,e,n){const o=T(e),i=I(e),r=G(t,o&&function(t){const e=G(t);return F(e.width)!==t.offsetWidth||F(e.height)!==t.offsetHeight}(e),"fixed"===n);let s={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(o||!o&&"fixed"!==n)if(("body"!==C(e)||H(i))&&(s=V(e)),T(e)){const t=G(e,!0);a.x=t.x+e.clientLeft,a.y=t.y+e.clientTop}else i&&(a.x=X(i));return{x:r.left+s.scrollLeft-a.x,y:r.top+s.scrollTop-a.y,width:r.width,height:r.height}}function q(t){return"html"===C(t)?t:t.assignedSlot||t.parentNode||(D(t)?t.host:null)||I(t)}function J(t){return T(t)&&"fixed"!==P(t).position?function(t){let{offsetParent:e}=t,n=t,o=!1;for(;n&&n!==e;){const{assignedSlot:t}=n;if(t){let i=t.offsetParent;if("contents"===P(t).display){const e=t.hasAttribute("style"),o=t.style.display;t.style.display=P(n).display,i=t.offsetParent,t.style.display=o,e||t.removeAttribute("style")}n=t,e!==i&&(e=i,o=!0)}else if(D(n)&&n.host&&o)break;n=D(n)&&n.host||n.parentNode}return e}(t):null}function K(t){const e=R(t);let n=J(t);for(;n&&L(n)&&"static"===P(n).position;)n=J(n);return n&&("html"===C(n)||"body"===C(n)&&"static"===P(n).position&&!B(n))?e:n||function(t){let e=q(t);for(D(e)&&(e=e.host);T(e)&&!["html","body"].includes(C(e));){if(B(e))return e;{const t=e.parentNode;e=D(t)?t.host:t}}return null}(t)||e}function N(t){if(T(t))return{width:t.offsetWidth,height:t.offsetHeight};const e=G(t);return{width:e.width,height:e.height}}function Q(t){const e=q(t);return["html","body","#document"].includes(C(e))?t.ownerDocument.body:T(e)&&H(e)?e:Q(e)}function U(t,e){var n;void 0===e&&(e=[]);const o=Q(t),i=o===(null==(n=t.ownerDocument)?void 0:n.body),r=R(o),s=i?[r].concat(r.visualViewport||[],H(o)?o:[]):o,a=e.concat(s);return i?a:a.concat(U(s))}function W(t,e,n){return"viewport"===e?f(function(t,e){const n=R(t),o=I(t),i=n.visualViewport;let r=o.clientWidth,s=o.clientHeight,a=0,l=0;if(i){r=i.width,s=i.height;const t=S();(t||!t&&"fixed"===e)&&(a=i.offsetLeft,l=i.offsetTop)}return{width:r,height:s,x:a,y:l}}(t,n)):O(e)?function(t,e){const n=G(t,!1,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft;return{top:o,left:i,x:i,y:o,right:i+t.clientWidth,bottom:o+t.clientHeight,width:t.clientWidth,height:t.clientHeight}}(e,n):f(function(t){var e;const n=I(t),o=V(t),i=null==(e=t.ownerDocument)?void 0:e.body,r=E(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=E(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let a=-o.scrollLeft+X(t);const l=-o.scrollTop;return"rtl"===P(i||n).direction&&(a+=E(n.clientWidth,i?i.clientWidth:0)-r),{width:r,height:s,x:a,y:l}}(I(t)))}function Z(t){const e=U(t),n=["absolute","fixed"].includes(P(t).position)&&T(t)?K(t):t;return O(n)?e.filter((t=>O(t)&&function(t,e){const n=null==e.getRootNode?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&D(n)){let n=e;do{if(n&&t===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(t,n)&&"body"!==C(t))):[]}const _={getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[..."clippingAncestors"===n?Z(e):[].concat(n),o],s=r.reduce(((t,n)=>{const o=W(e,n,i);return t.top=E(o.top,t.top),t.right=z(o.right,t.right),t.bottom=z(o.bottom,t.bottom),t.left=E(o.left,t.left),t}),W(e,r[0],i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:n,strategy:o}=t;const i=T(n),r=I(n);if(n===r)return e;let s={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if((i||!i&&"fixed"!==o)&&(("body"!==C(n)||H(r))&&(s=V(n)),T(n))){const t=G(n,!0);a.x=t.x+n.clientLeft,a.y=t.y+n.clientTop}return{...e,x:e.x-s.scrollLeft+a.x,y:e.y-s.scrollTop+a.y}},isElement:O,getDimensions:N,getOffsetParent:K,getDocumentElement:I,getElementRects:t=>{let{reference:e,floating:n,strategy:o}=t;return{reference:Y(e,K(n),o),floating:{...N(n),x:0,y:0}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===P(t).direction},tt=(t,n,o={placement:e.Placement.bottom,offset:0,arrow:!1,arrowColor:"tw-bg-slate-700"})=>{const{placement:f,offset:u,arrow:d,arrowColor:h}=o;let p=[(y=u,void 0===y&&(y=0),{name:"offset",options:y,async fn(t){const{x:e,y:n}=t,o=await async function(t,e){const{placement:n,platform:o,elements:a}=t,l=await(null==o.isRTL?void 0:o.isRTL(a.floating)),c=i(n),f=r(n),u="x"===s(n),d=["left","top"].includes(c)?-1:1,h=l&&u?-1:1,m="function"==typeof e?e(t):e;let{mainAxis:p,crossAxis:w,alignmentAxis:y}="number"==typeof m?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...m};return f&&"number"==typeof y&&(w="end"===f?-1*y:y),u?{x:w*h,y:p*d}:{x:p*d,y:w*h}}(t,y);return{x:e+o.x,y:n+o.y,data:o}}}),b(),j({padding:5}),k({padding:10})],w=document.getElementById(`${n.id}-arrow`);var y;d&&(w||(w=document.createElement("div"),w.setAttribute("id",`${n.id}-arrow`)),w.setAttribute("class",`tw-absolute tw-w-2 tw-h-2 ${h} tw-transform tw-z-[-1] tw-opacity-0 tw-transition-opacity tw-duration-300 \n tw-shadow \n `),n.prepend(w),p.push((t=>({name:"arrow",options:t,async fn(e){const{element:n,padding:o=0}=null!=t?t:{},{x:i,y:l,placement:f,rects:u,platform:d}=e;if(null==n)return{};const h=c(o),p={x:i,y:l},w=s(f),y=r(f),g=a(w),x=await d.getDimensions(n),b="y"===w?"top":"left",v="y"===w?"bottom":"right",A=u.reference[g]+u.reference[w]-p[w]-u.floating[g],k=p[w]-u.reference[w],j=await(null==d.getOffsetParent?void 0:d.getOffsetParent(n));let $=j?"y"===w?j.clientHeight||0:j.clientWidth||0:0;0===$&&($=u.floating[g]);const R=h[b],P=$-x[g]-h[v],C=$/2-x[g]/2+(A/2-k/2),M=m(R,C,P);return{[w]:p[w]-(("start"===y?h[b]:h[v])>0&&C!==M&&u.reference[g]<=u.floating[g]?C<R?R-C:P-C:0),data:{[w]:M,centerOffset:C-M}}}}))({element:w,padding:4}))),((t,e,n)=>(async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,a=await(null==s.isRTL?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:u}=l(c,o,a),d=o,h={},m=0;for(let n=0;n<r.length;n++){const{name:p,fn:w}=r[n],{x:y,y:g,data:x,reset:b}=await w({x:f,y:u,initialPlacement:o,placement:d,strategy:i,middlewareData:h,rects:c,platform:s,elements:{reference:t,floating:e}});f=null!=y?y:f,u=null!=g?g:u,h={...h,[p]:{...h[p],...x}},b&&m<=50&&(m++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(c=!0===b.rects?await s.getElementRects({reference:t,floating:e,strategy:i}):b.rects),({x:f,y:u}=l(c,d,a))),n=-1)}return{x:f,y:u,placement:d,strategy:i,middlewareData:h}})(t,e,{platform:_,...n}))(t,n,{placement:f,middleware:p}).then((({x:t,y:e,placement:o,middlewareData:i})=>{const{referenceHidden:r}=i.hide;if(Object.assign(n.style,{top:"0",left:"0",transform:`translate(${Math.round(t)}px,${Math.round(e)}px)`,opacity:1,visibility:r?"hidden":"visible"}),d){const{x:t,y:e}=i.arrow,n={top:"bottom",right:"left",bottom:"top",left:"right"}[o.split("-")[0]],s={top:"rotate(45deg)",right:"rotate(135deg)",bottom:"rotate(-135deg)",left:"rotate(-45deg)"}[o.split("-")[0]];Object.assign(w.style,{left:null!=t?`${t}px`:"",top:null!=e?`${e}px`:"",right:"",bottom:"",[n]:"-4px",opacity:1,visibility:r?"hidden":"visible",transform:s})}}))};class et{constructor({message:e,targetId:i,placement:r="top",color:s="slate-700",trigger:a="none"}){this.bgColor=()=>n.twColor(this.color,700),this.target=()=>document.getElementById(this.targetId),this.init=()=>{this.el=o.createElement("div",{id:`${this.targetId}-tooltip-box`,class:`\n tw-whitespace-normal tw-break-words tw-block tw-font-sans tw-pointer-events-none tw-max-w-xs tw-py-1 tw-px-2 tw-rounded tw-bg-${this.bgColor()} tw-text-white tw-text-1 tw-absolute tw-top-0 tw-left-0 tw-z-tooltip tw-opacity-0 tw-transition-opacity tw-duration-300`,role:"tooltip","aria-hidden":"true",style:`color: ${n.twColorReverse(this.bgColor())}`,innerHTML:t.trim(this.message)})},this.update=()=>{this.el=document.getElementById(this.id),this.el&&(this.hide(),this.show())},this.listener=()=>{if(window.addEventListener("resize",this.calculatePosition.bind(this)),window.addEventListener("scroll",this.calculatePosition.bind(this)),this.trigger&&this.target())switch(this.trigger){case"click":this.target().addEventListener("click",this.toggle.bind(this));break;case"hover":this.target().addEventListener("mouseenter",this.show.bind(this)),this.target().addEventListener("mouseleave",this.hide.bind(this));break;case"focus":this.target().addEventListener("focus",this.show.bind(this),!0),this.target().addEventListener("blur",this.hide.bind(this),!0)}this.calculatePosition()},this.calculatePosition=()=>{this.el=document.getElementById(this.id),this.el&&tt(this.target(),this.el,{placement:this.placement,offset:8,arrow:!0,arrowColor:`tw-bg-${this.bgColor()}`})},this.show=()=>{this.message?(this.init(),this.calculatePosition()):this.hide()},this.hide=()=>{this.el=document.getElementById(this.id),this.el&&this.el.remove()},this.toggle=()=>{this.el=document.getElementById(this.id),this.el?this.hide():this.show()},this.message=e,this.targetId=i,this.placement=r,this.color=s,this.id=i+"-tooltip-box",this.trigger=a}}export{tt as F,et as T}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{r as t,h as s,g as e}from"./p-0ba73c30.js";import{I as l}from"./p-20e22beb.js";import{G as a}from"./p-
|
|
5
|
+
import{r as t,h as s,g as e}from"./p-0ba73c30.js";import{I as l}from"./p-20e22beb.js";import{G as a}from"./p-2900dc18.js";const o=class{constructor(s){t(this,s),this._id=a.UID(),this.loading=!0}componentDidLoad(){var t;const s=null===(t=this.el)||void 0===t?void 0:t.parentElement;if(s){const t=document.createElement("span");t.setAttribute("id",`${this._id}-span`),t.classList.add("tw-hidden"),t.innerHTML="<slot />",s.appendChild(t),s.isConnected&&(this.loading=!1,s.querySelector(`#${this._id}-span`).remove())}}render(){return s(this.loading?()=>s("div",{class:"tw-border tw-border-blue-300 tw-shadow tw-rounded-md tw-p-4 tw-max-w-sm tw-w-full tw-mx-auto"},s("span",{class:"tw-hidden"},s("slot",null)),s("div",{class:"tw-animate-pulse tw-flex tw-space-x-4"},s("div",{class:"tw-rounded-full tw-bg-slate-200 tw-h-10 tw-w-10"}),s("div",{class:"tw-flex-1 tw-space-y-6 tw-py-1"},s("div",{class:"tw-h-2 tw-bg-slate-200 tw-rounded"}),s("div",{class:"tw-space-y-3"},s("div",{class:"tw-grid tw-grid-cols-3 tw-gap-4"},s("div",{class:"tw-h-2 tw-bg-slate-200 tw-rounded tw-col-span-2"}),s("div",{class:"tw-h-2 tw-bg-slate-200 tw-rounded tw-col-span-1"})),s("div",{class:"tw-h-2 tw-bg-slate-200 tw-rounded"}))))):"slot",null)}get el(){return e(this)}};!function(t,s,e,l){var a,o=arguments.length,w=o<3?s:null===l?l=Object.getOwnPropertyDescriptor(s,e):l;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)w=Reflect.decorate(t,s,e,l);else for(var d=t.length-1;d>=0;d--)(a=t[d])&&(w=(o<3?a(w):o>3?a(s,e,w):a(s,e))||w);o>3&&w&&Object.defineProperty(s,e,w)}([l()],o.prototype,"el",void 0);export{o as bcm_skeleton}
|