@beamimpact/web-sdk 1.38.1 → 1.39.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/_share-dialog-dependencies-45VkuwV_.esm.js +2 -0
- package/dist/chunks/_share-dialog-dependencies-45VkuwV_.esm.js.map +1 -0
- package/dist/chunks/_share-dialog-dependencies-zjR-bLve.esm.js +2 -0
- package/dist/chunks/_share-dialog-dependencies-zjR-bLve.esm.js.map +1 -0
- package/dist/chunks/{cart-contents-dKdDg09p.esm.d.ts → cart-contents-3-9fB-7m.esm.d.ts} +1 -1
- package/dist/chunks/{css-card-grid-inRnKSWs.esm.js → css-card-grid-7tObtoJx.esm.js} +2 -2
- package/dist/chunks/{css-card-grid-inRnKSWs.esm.js.map → css-card-grid-7tObtoJx.esm.js.map} +1 -1
- package/dist/chunks/{events-zF9NDtBD.esm.d.ts → events-7W7i4aV5.esm.d.ts} +1 -1
- package/dist/chunks/index-07spDV_A.esm.js +2 -0
- package/dist/chunks/index-07spDV_A.esm.js.map +1 -0
- package/dist/chunks/{index-tqTROh5B.esm.d.ts → index-HBDtoJlQ.esm.d.ts} +1 -1
- package/dist/chunks/{index-oLz4lmx2.esm.d.ts → index-Hb-jziQs.esm.d.ts} +3 -1
- package/dist/chunks/{index-UCh8HjVN.esm.js → index-IO0Z_buU.esm.js} +2 -2
- package/dist/chunks/{index-UCh8HjVN.esm.js.map → index-IO0Z_buU.esm.js.map} +1 -1
- package/dist/chunks/index-NF6VKqmo.esm.js +2 -0
- package/dist/chunks/index-NF6VKqmo.esm.js.map +1 -0
- package/dist/chunks/{index-6iInzwnG.esm.js → index-Q1vx4WtG.esm.js} +2 -2
- package/dist/chunks/{index-6iInzwnG.esm.js.map → index-Q1vx4WtG.esm.js.map} +1 -1
- package/dist/chunks/{index-EjqeU7Mu.esm.d.ts → index-SxFKifVJ.esm.d.ts} +1 -1
- package/dist/chunks/index-TD6ZYob2.esm.js +2 -0
- package/dist/chunks/index-TD6ZYob2.esm.js.map +1 -0
- package/dist/chunks/{index-cRyQ6D5G.esm.d.ts → index-TOzSFOvI.esm.d.ts} +1 -1
- package/dist/chunks/index-V-BsPYtl.esm.js +2 -0
- package/dist/chunks/index-V-BsPYtl.esm.js.map +1 -0
- package/dist/chunks/{index-dDBsHD_s.esm.d.ts → index-YwDVLm67.esm.d.ts} +1 -1
- package/dist/chunks/{index-Tnwxn22c.esm.d.ts → index-Zk634mW7.esm.d.ts} +4 -4
- package/dist/chunks/{index-iYxrQMxt.esm.d.ts → index-b-AHDeDB.esm.d.ts} +1 -1
- package/dist/chunks/index-b9nIxcaS.esm.js +2 -0
- package/dist/chunks/index-b9nIxcaS.esm.js.map +1 -0
- package/dist/chunks/index-cekgAcEE.esm.js +2 -0
- package/dist/chunks/index-cekgAcEE.esm.js.map +1 -0
- package/dist/chunks/index-i1kXw_4Z.esm.js +2 -0
- package/dist/chunks/index-i1kXw_4Z.esm.js.map +1 -0
- package/dist/chunks/index-qFEb98cw.esm.js +2 -0
- package/dist/chunks/index-qFEb98cw.esm.js.map +1 -0
- package/dist/chunks/{index-l7Ao8g5B.esm.js → index-uCfdsWtt.esm.js} +2 -2
- package/dist/chunks/{index-l7Ao8g5B.esm.js.map → index-uCfdsWtt.esm.js.map} +1 -1
- package/dist/chunks/{index-_WQFoMIz.esm.js → index-wrvDFuaS.esm.js} +2 -2
- package/dist/chunks/{index-_WQFoMIz.esm.js.map → index-wrvDFuaS.esm.js.map} +1 -1
- package/dist/chunks/{lit-HCWbxxT7.esm.js → lit-qtGbjGnK.esm.js} +2 -2
- package/dist/chunks/{lit-HCWbxxT7.esm.js.map → lit-qtGbjGnK.esm.js.map} +1 -1
- package/dist/chunks/loading-template-Av0IUyKF.esm.js +2 -0
- package/dist/chunks/loading-template-Av0IUyKF.esm.js.map +1 -0
- package/dist/chunks/localize-F31ae3j6.esm.js +30 -0
- package/dist/chunks/localize-F31ae3j6.esm.js.map +1 -0
- package/dist/chunks/localize-fH8KOrMi.esm.js +30 -0
- package/dist/chunks/localize-fH8KOrMi.esm.js.map +1 -0
- package/dist/chunks/{openapi-spec-fxMWpEwU.esm.d.ts → openapi-spec--MzXvfCC.esm.d.ts} +139 -10
- package/dist/chunks/{order-page-AezeN9KY.esm.d.ts → order-page-DPx5SUKM.esm.d.ts} +2 -2
- package/dist/chunks/{order-page-5VQO1Sil.esm.js → order-page-DTWyo57K.esm.js} +2 -2
- package/dist/chunks/{order-page-5VQO1Sil.esm.js.map → order-page-DTWyo57K.esm.js.map} +1 -1
- package/dist/chunks/{order-page-E7Kyu1JP.esm.js → order-page-r0Bn2_wR.esm.js} +2 -2
- package/dist/chunks/{order-page-E7Kyu1JP.esm.js.map → order-page-r0Bn2_wR.esm.js.map} +1 -1
- package/dist/chunks/{progress-bar-9vfd2JYm.esm.js → progress-bar-Sn2QspHy.esm.js} +2 -2
- package/dist/chunks/{progress-bar-9vfd2JYm.esm.js.map → progress-bar-Sn2QspHy.esm.js.map} +1 -1
- package/dist/chunks/{promo-pill-label-vCWNyiaj.esm.js → promo-pill-label-j0A8qZ0c.esm.js} +2 -2
- package/dist/chunks/{promo-pill-label-vCWNyiaj.esm.js.map → promo-pill-label-j0A8qZ0c.esm.js.map} +1 -1
- package/dist/chunks/{responsive-Bzkkpj11.esm.js → responsive-aWj_7ZN_.esm.js} +2 -2
- package/dist/chunks/responsive-aWj_7ZN_.esm.js.map +1 -0
- package/dist/chunks/routes-eEIGOCLH.esm.js +2 -0
- package/dist/chunks/{routes-UBDDazXd.esm.js.map → routes-eEIGOCLH.esm.js.map} +1 -1
- package/dist/chunks/routes-mFdr3VNw.esm.js +2 -0
- package/dist/chunks/{routes-t5eRHMRc.esm.js.map → routes-mFdr3VNw.esm.js.map} +1 -1
- package/dist/chunks/shoelace-components-jVPXTZPS.esm.js +2 -0
- package/dist/chunks/shoelace-components-jVPXTZPS.esm.js.map +1 -0
- package/dist/chunks/shoelace-components-yvcqUObE.esm.js +2 -0
- package/dist/chunks/shoelace-components-yvcqUObE.esm.js.map +1 -0
- package/dist/chunks/{update-cart-6fMyZd34.esm.js → update-cart--5PpQSrY.esm.js} +2 -2
- package/dist/chunks/{update-cart-6fMyZd34.esm.js.map → update-cart--5PpQSrY.esm.js.map} +1 -1
- package/dist/chunks/{update-cart-WfOplzik.esm.js → update-cart-TDb6pWxk.esm.js} +2 -2
- package/dist/chunks/{update-cart-WfOplzik.esm.js.map → update-cart-TDb6pWxk.esm.js.map} +1 -1
- package/dist/chunks/{update-cart-43LEXveI.esm.d.ts → update-cart-xaWdPxse.esm.d.ts} +1 -1
- package/dist/chunks/vendor-jQ8cxMpw.esm.js +1284 -0
- package/dist/chunks/vendor-jQ8cxMpw.esm.js.map +1 -0
- package/dist/components/beam-partner-logos.esm.js +1 -1
- package/dist/components/beam-partner-logos.js +1 -1
- package/dist/components/community-impact.esm.js +1 -1
- package/dist/components/community-impact.esm.js.map +1 -1
- package/dist/components/community-impact.js +1 -1
- package/dist/components/community-impact.js.map +1 -1
- package/dist/components/cumulative-impact.esm.js +1 -1
- package/dist/components/cumulative-impact.esm.js.map +1 -1
- package/dist/components/cumulative-impact.js +1 -1
- package/dist/components/cumulative-impact.js.map +1 -1
- package/dist/components/impact-overview.esm.js +7 -7
- package/dist/components/impact-overview.esm.js.map +1 -1
- package/dist/components/impact-overview.js +7 -7
- package/dist/components/impact-overview.js.map +1 -1
- package/dist/components/index.d.ts +3 -2
- package/dist/components/index.esm.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/post-purchase.d.ts +3 -3
- package/dist/components/post-purchase.esm.js +1 -1
- package/dist/components/post-purchase.esm.js.map +1 -1
- package/dist/components/post-purchase.js +1 -1
- package/dist/components/post-purchase.js.map +1 -1
- package/dist/components/product-details-page.d.ts +75 -0
- package/dist/components/product-details-page.esm.js +114 -0
- package/dist/components/product-details-page.esm.js.map +1 -0
- package/dist/components/product-details-page.js +114 -0
- package/dist/components/product-details-page.js.map +1 -0
- package/dist/components/redeem-transaction.d.ts +3 -3
- package/dist/components/redeem-transaction.esm.js +1 -1
- package/dist/components/redeem-transaction.esm.js.map +1 -1
- package/dist/components/redeem-transaction.js +1 -1
- package/dist/components/redeem-transaction.js.map +1 -1
- package/dist/components/select-nonprofit.d.ts +3 -3
- package/dist/components/select-nonprofit.esm.js +1 -1
- package/dist/components/select-nonprofit.esm.js.map +1 -1
- package/dist/components/select-nonprofit.js +1 -1
- package/dist/components/select-nonprofit.js.map +1 -1
- package/dist/components/shopify.d.ts +5 -5
- package/dist/components/shopify.esm.js +1 -1
- package/dist/components/shopify.esm.js.map +1 -1
- package/dist/components/shopify.js +1 -1
- package/dist/components/shopify.js.map +1 -1
- package/dist/components/subscription-management.d.ts +10 -3
- package/dist/components/subscription-management.esm.js +4 -4
- package/dist/components/subscription-management.esm.js.map +1 -1
- package/dist/components/subscription-management.js +4 -4
- package/dist/components/subscription-management.js.map +1 -1
- package/dist/index.d.ts +13 -12
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/integrations/beam.esm.js +1 -1
- package/dist/integrations/beam.js +1 -1
- package/dist/integrations/cart.d.ts +3 -3
- package/dist/integrations/cart.esm.js +1 -1
- package/dist/integrations/cart.js +1 -1
- package/dist/integrations/index.d.ts +9 -9
- package/dist/integrations/index.esm.js +1 -1
- package/dist/integrations/index.js +1 -1
- package/dist/integrations/logs.d.ts +2 -2
- package/dist/integrations/logs.esm.js +1 -1
- package/dist/integrations/logs.js +1 -1
- package/dist/integrations/session.esm.js +1 -1
- package/dist/integrations/session.js +1 -1
- package/dist/integrations/shopify.d.ts +4 -4
- package/dist/integrations/shopify.esm.js +1 -1
- package/dist/integrations/shopify.js +1 -1
- package/dist/integrations/statsig.esm.js +3 -2
- package/dist/integrations/statsig.esm.js.map +1 -1
- package/dist/integrations/statsig.js +3 -2
- package/dist/integrations/statsig.js.map +1 -1
- package/dist/integrations/utils.d.ts +3 -3
- package/dist/react/beam-partner-logos.esm.js +1 -1
- package/dist/react/beam-partner-logos.js +1 -1
- package/dist/react/community-impact.esm.js +1 -1
- package/dist/react/community-impact.esm.js.map +1 -1
- package/dist/react/community-impact.js +1 -1
- package/dist/react/community-impact.js.map +1 -1
- package/dist/react/cumulative-impact.esm.js +1 -1
- package/dist/react/cumulative-impact.esm.js.map +1 -1
- package/dist/react/cumulative-impact.js +1 -1
- package/dist/react/cumulative-impact.js.map +1 -1
- package/dist/react/impact-overview.esm.js +1 -1
- package/dist/react/impact-overview.esm.js.map +1 -1
- package/dist/react/impact-overview.js +1 -1
- package/dist/react/impact-overview.js.map +1 -1
- package/dist/react/index.d.ts +3 -3
- package/dist/react/index.esm.js +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/post-purchase.d.ts +2 -2
- package/dist/react/post-purchase.esm.js +1 -1
- package/dist/react/post-purchase.esm.js.map +1 -1
- package/dist/react/post-purchase.js +1 -1
- package/dist/react/post-purchase.js.map +1 -1
- package/dist/react/product-details-page.d.ts +9 -0
- package/dist/react/product-details-page.esm.js +2 -0
- package/dist/react/product-details-page.esm.js.map +1 -0
- package/dist/react/product-details-page.js +2 -0
- package/dist/react/product-details-page.js.map +1 -0
- package/dist/react/redeem-transaction.d.ts +3 -3
- package/dist/react/redeem-transaction.esm.js +1 -1
- package/dist/react/redeem-transaction.esm.js.map +1 -1
- package/dist/react/redeem-transaction.js +1 -1
- package/dist/react/redeem-transaction.js.map +1 -1
- package/dist/react/select-nonprofit.d.ts +3 -3
- package/dist/react/select-nonprofit.esm.js +1 -1
- package/dist/react/select-nonprofit.esm.js.map +1 -1
- package/dist/react/select-nonprofit.js +1 -1
- package/dist/react/select-nonprofit.js.map +1 -1
- package/dist/react/subscription-management.d.ts +9 -2
- package/dist/react/subscription-management.esm.js +1 -1
- package/dist/react/subscription-management.esm.js.map +1 -1
- package/dist/react/subscription-management.js +1 -1
- package/dist/react/subscription-management.js.map +1 -1
- package/dist/utils/events.d.ts +3 -3
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/makeApiKeyHeader.d.ts +5 -0
- package/dist/utils/makeApiKeyHeader.esm.js +2 -0
- package/dist/utils/makeApiKeyHeader.esm.js.map +1 -0
- package/dist/utils/makeApiKeyHeader.js +2 -0
- package/dist/utils/makeApiKeyHeader.js.map +1 -0
- package/package.json +2 -2
- package/dist/chunks/_share-dialog-dependencies-0yVtRIRR.esm.js +0 -2
- package/dist/chunks/_share-dialog-dependencies-0yVtRIRR.esm.js.map +0 -1
- package/dist/chunks/_share-dialog-dependencies-HWissVga.esm.js +0 -2
- package/dist/chunks/_share-dialog-dependencies-HWissVga.esm.js.map +0 -1
- package/dist/chunks/enforce-config-7R9KCF_i.esm.js +0 -22
- package/dist/chunks/enforce-config-7R9KCF_i.esm.js.map +0 -1
- package/dist/chunks/enforce-config-iFdf1QkH.esm.js +0 -22
- package/dist/chunks/enforce-config-iFdf1QkH.esm.js.map +0 -1
- package/dist/chunks/index-5yFqo0yl.esm.js +0 -2
- package/dist/chunks/index-5yFqo0yl.esm.js.map +0 -1
- package/dist/chunks/index-FsVWk2WD.esm.js +0 -2
- package/dist/chunks/index-FsVWk2WD.esm.js.map +0 -1
- package/dist/chunks/index-IKTofhFw.esm.js +0 -2
- package/dist/chunks/index-IKTofhFw.esm.js.map +0 -1
- package/dist/chunks/index-IWF7IfQk.esm.js +0 -2
- package/dist/chunks/index-IWF7IfQk.esm.js.map +0 -1
- package/dist/chunks/index-IzAvjker.esm.js +0 -2
- package/dist/chunks/index-IzAvjker.esm.js.map +0 -1
- package/dist/chunks/index-MG0WE1Fz.esm.js +0 -2
- package/dist/chunks/index-MG0WE1Fz.esm.js.map +0 -1
- package/dist/chunks/index-NU6RpwSa.esm.js +0 -2
- package/dist/chunks/index-NU6RpwSa.esm.js.map +0 -1
- package/dist/chunks/index-QrlkSlnv.esm.js +0 -2
- package/dist/chunks/index-QrlkSlnv.esm.js.map +0 -1
- package/dist/chunks/localize-ZHtlNltZ.esm.js +0 -10
- package/dist/chunks/localize-ZHtlNltZ.esm.js.map +0 -1
- package/dist/chunks/localize-jRg7W6Ul.esm.js +0 -10
- package/dist/chunks/localize-jRg7W6Ul.esm.js.map +0 -1
- package/dist/chunks/responsive-Bzkkpj11.esm.js.map +0 -1
- package/dist/chunks/routes-UBDDazXd.esm.js +0 -2
- package/dist/chunks/routes-t5eRHMRc.esm.js +0 -2
- package/dist/chunks/vendor-h5FNKy-G.esm.js +0 -1147
- package/dist/chunks/vendor-h5FNKy-G.esm.js.map +0 -1
|
@@ -1,1147 +0,0 @@
|
|
|
1
|
-
import{i as m,n,s as kt,x as k,e as I,r as D,a as Ct,b as C,c as M,d as O,o as c}from"./lit-HCWbxxT7.esm.js";var H="";function W(t){H=t}function Et(t=""){if(!H){const e=[...document.getElementsByTagName("script")],o=e.find(r=>r.hasAttribute("data-shoelace"));if(o)W(o.getAttribute("data-shoelace"));else{const r=e.find(a=>/shoelace(\.min)?\.js($|\?)/.test(a.src)||/shoelace-autoloader(\.min)?\.js($|\?)/.test(a.src));let s="";r&&(s=r.getAttribute("src")),W(s.split("/").slice(0,-1).join("/"))}}return H.replace(/\/$/,"")+(t?`/${t.replace(/^\//,"")}`:"")}var at=Object.defineProperty,Lt=Object.defineProperties,At=Object.getOwnPropertyDescriptor,$t=Object.getOwnPropertyDescriptors,it=Object.getOwnPropertySymbols,St=Object.prototype.hasOwnProperty,zt=Object.prototype.propertyIsEnumerable,K=(t,e)=>{if(e=Symbol[t])return e;throw Error("Symbol."+t+" is not defined")},nt=(t,e,o)=>e in t?at(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,w=(t,e)=>{for(var o in e||(e={}))St.call(e,o)&&nt(t,o,e[o]);if(it)for(var o of it(e))zt.call(e,o)&&nt(t,o,e[o]);return t},X=(t,e)=>Lt(t,$t(e)),i=(t,e,o,r)=>{for(var s=r>1?void 0:r?At(e,o):e,a=t.length-1,l;a>=0;a--)(l=t[a])&&(s=(r?l(e,o,s):l(s))||s);return r&&s&&at(e,o,s),s},Ft=function(t,e){this[0]=t,this[1]=e},Bt=t=>{var e=t[K("asyncIterator")],o=!1,r,s={};return e==null?(e=t[K("iterator")](),r=a=>s[a]=l=>e[a](l)):(e=e.call(t),r=a=>s[a]=l=>{if(o){if(o=!1,a==="throw")throw l;return l}return o=!0,{done:!1,value:new Ft(new Promise(u=>{var g=e[a](l);if(!(g instanceof Object))throw TypeError("Object expected");u(g)}),1)}}),s[K("iterator")]=()=>s,r("next"),"throw"in e?r("throw"):s.throw=a=>{throw a},"return"in e&&r("return"),s},It={name:"default",resolver:t=>Et(`assets/icons/${t}.svg`)},Dt=It,lt={caret:`
|
|
2
|
-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
3
|
-
<polyline points="6 9 12 15 18 9"></polyline>
|
|
4
|
-
</svg>
|
|
5
|
-
`,check:`
|
|
6
|
-
<svg part="checked-icon" class="checkbox__icon" viewBox="0 0 16 16">
|
|
7
|
-
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">
|
|
8
|
-
<g stroke="currentColor">
|
|
9
|
-
<g transform="translate(3.428571, 3.428571)">
|
|
10
|
-
<path d="M0,5.71428571 L3.42857143,9.14285714"></path>
|
|
11
|
-
<path d="M9.14285714,0 L3.42857143,9.14285714"></path>
|
|
12
|
-
</g>
|
|
13
|
-
</g>
|
|
14
|
-
</g>
|
|
15
|
-
</svg>
|
|
16
|
-
`,"chevron-down":`
|
|
17
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-down" viewBox="0 0 16 16">
|
|
18
|
-
<path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/>
|
|
19
|
-
</svg>
|
|
20
|
-
`,"chevron-left":`
|
|
21
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-left" viewBox="0 0 16 16">
|
|
22
|
-
<path fill-rule="evenodd" d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"/>
|
|
23
|
-
</svg>
|
|
24
|
-
`,"chevron-right":`
|
|
25
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-right" viewBox="0 0 16 16">
|
|
26
|
-
<path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"/>
|
|
27
|
-
</svg>
|
|
28
|
-
`,copy:`
|
|
29
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-files" viewBox="0 0 16 16" part="svg">
|
|
30
|
-
<path d="M13 0H6a2 2 0 0 0-2 2 2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h7a2 2 0 0 0 2-2 2 2 0 0 0 2-2V2a2 2 0 0 0-2-2zm0 13V4a2 2 0 0 0-2-2H5a1 1 0 0 1 1-1h7a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1zM3 4a1 1 0 0 1 1-1h7a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4z"></path>
|
|
31
|
-
</svg>
|
|
32
|
-
`,eye:`
|
|
33
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16">
|
|
34
|
-
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>
|
|
35
|
-
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>
|
|
36
|
-
</svg>
|
|
37
|
-
`,"eye-slash":`
|
|
38
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye-slash" viewBox="0 0 16 16">
|
|
39
|
-
<path d="M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755-.165.165-.337.328-.517.486l.708.709z"/>
|
|
40
|
-
<path d="M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"/>
|
|
41
|
-
<path d="M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884-12-12 .708-.708 12 12-.708.708z"/>
|
|
42
|
-
</svg>
|
|
43
|
-
`,eyedropper:`
|
|
44
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eyedropper" viewBox="0 0 16 16">
|
|
45
|
-
<path d="M13.354.646a1.207 1.207 0 0 0-1.708 0L8.5 3.793l-.646-.647a.5.5 0 1 0-.708.708L8.293 5l-7.147 7.146A.5.5 0 0 0 1 12.5v1.793l-.854.853a.5.5 0 1 0 .708.707L1.707 15H3.5a.5.5 0 0 0 .354-.146L11 7.707l1.146 1.147a.5.5 0 0 0 .708-.708l-.647-.646 3.147-3.146a1.207 1.207 0 0 0 0-1.708l-2-2zM2 12.707l7-7L10.293 7l-7 7H2v-1.293z"></path>
|
|
46
|
-
</svg>
|
|
47
|
-
`,"grip-vertical":`
|
|
48
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-grip-vertical" viewBox="0 0 16 16">
|
|
49
|
-
<path d="M7 2a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zM7 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zM7 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"></path>
|
|
50
|
-
</svg>
|
|
51
|
-
`,indeterminate:`
|
|
52
|
-
<svg part="indeterminate-icon" class="checkbox__icon" viewBox="0 0 16 16">
|
|
53
|
-
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">
|
|
54
|
-
<g stroke="currentColor" stroke-width="2">
|
|
55
|
-
<g transform="translate(2.285714, 6.857143)">
|
|
56
|
-
<path d="M10.2857143,1.14285714 L1.14285714,1.14285714"></path>
|
|
57
|
-
</g>
|
|
58
|
-
</g>
|
|
59
|
-
</g>
|
|
60
|
-
</svg>
|
|
61
|
-
`,"person-fill":`
|
|
62
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-person-fill" viewBox="0 0 16 16">
|
|
63
|
-
<path d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/>
|
|
64
|
-
</svg>
|
|
65
|
-
`,"play-fill":`
|
|
66
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-play-fill" viewBox="0 0 16 16">
|
|
67
|
-
<path d="m11.596 8.697-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z"></path>
|
|
68
|
-
</svg>
|
|
69
|
-
`,"pause-fill":`
|
|
70
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pause-fill" viewBox="0 0 16 16">
|
|
71
|
-
<path d="M5.5 3.5A1.5 1.5 0 0 1 7 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5zm5 0A1.5 1.5 0 0 1 12 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5z"></path>
|
|
72
|
-
</svg>
|
|
73
|
-
`,radio:`
|
|
74
|
-
<svg part="checked-icon" class="radio__icon" viewBox="0 0 16 16">
|
|
75
|
-
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
76
|
-
<g fill="currentColor">
|
|
77
|
-
<circle cx="8" cy="8" r="3.42857143"></circle>
|
|
78
|
-
</g>
|
|
79
|
-
</g>
|
|
80
|
-
</svg>
|
|
81
|
-
`,"star-fill":`
|
|
82
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-star-fill" viewBox="0 0 16 16">
|
|
83
|
-
<path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/>
|
|
84
|
-
</svg>
|
|
85
|
-
`,"x-lg":`
|
|
86
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-lg" viewBox="0 0 16 16">
|
|
87
|
-
<path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z"/>
|
|
88
|
-
</svg>
|
|
89
|
-
`,"x-circle-fill":`
|
|
90
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-circle-fill" viewBox="0 0 16 16">
|
|
91
|
-
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z"></path>
|
|
92
|
-
</svg>
|
|
93
|
-
`},Mt={name:"system",resolver:t=>t in lt?`data:image/svg+xml,${encodeURIComponent(lt[t])}`:""},Ot=Mt,V=[Dt,Ot],P=[];function Vt(t){P.push(t)}function Pt(t){P=P.filter(e=>e!==t)}function dt(t){return V.find(e=>e.name===t)}function Rt(t,e){Tt(t),V.push({name:t,resolver:e.resolver,mutator:e.mutator,spriteSheet:e.spriteSheet}),P.forEach(o=>{o.library===t&&o.setIcon()})}function Tt(t){V=V.filter(e=>e.name!==t)}var _=m`
|
|
94
|
-
:host {
|
|
95
|
-
box-sizing: border-box;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
:host *,
|
|
99
|
-
:host *::before,
|
|
100
|
-
:host *::after {
|
|
101
|
-
box-sizing: inherit;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
[hidden] {
|
|
105
|
-
display: none !important;
|
|
106
|
-
}
|
|
107
|
-
`,Nt=m`
|
|
108
|
-
${_}
|
|
109
|
-
|
|
110
|
-
:host {
|
|
111
|
-
display: inline-flex;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.badge {
|
|
115
|
-
display: inline-flex;
|
|
116
|
-
align-items: center;
|
|
117
|
-
justify-content: center;
|
|
118
|
-
font-size: max(12px, 0.75em);
|
|
119
|
-
font-weight: var(--sl-font-weight-semibold);
|
|
120
|
-
letter-spacing: var(--sl-letter-spacing-normal);
|
|
121
|
-
line-height: 1;
|
|
122
|
-
border-radius: var(--sl-border-radius-small);
|
|
123
|
-
border: solid 1px var(--sl-color-neutral-0);
|
|
124
|
-
white-space: nowrap;
|
|
125
|
-
padding: 0.35em 0.6em;
|
|
126
|
-
user-select: none;
|
|
127
|
-
-webkit-user-select: none;
|
|
128
|
-
cursor: inherit;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
/* Variant modifiers */
|
|
132
|
-
.badge--primary {
|
|
133
|
-
background-color: var(--sl-color-primary-600);
|
|
134
|
-
color: var(--sl-color-neutral-0);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.badge--success {
|
|
138
|
-
background-color: var(--sl-color-success-600);
|
|
139
|
-
color: var(--sl-color-neutral-0);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.badge--neutral {
|
|
143
|
-
background-color: var(--sl-color-neutral-600);
|
|
144
|
-
color: var(--sl-color-neutral-0);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.badge--warning {
|
|
148
|
-
background-color: var(--sl-color-warning-600);
|
|
149
|
-
color: var(--sl-color-neutral-0);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.badge--danger {
|
|
153
|
-
background-color: var(--sl-color-danger-600);
|
|
154
|
-
color: var(--sl-color-neutral-0);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
/* Pill modifier */
|
|
158
|
-
.badge--pill {
|
|
159
|
-
border-radius: var(--sl-border-radius-pill);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/* Pulse modifier */
|
|
163
|
-
.badge--pulse {
|
|
164
|
-
animation: pulse 1.5s infinite;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.badge--pulse.badge--primary {
|
|
168
|
-
--pulse-color: var(--sl-color-primary-600);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.badge--pulse.badge--success {
|
|
172
|
-
--pulse-color: var(--sl-color-success-600);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.badge--pulse.badge--neutral {
|
|
176
|
-
--pulse-color: var(--sl-color-neutral-600);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.badge--pulse.badge--warning {
|
|
180
|
-
--pulse-color: var(--sl-color-warning-600);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.badge--pulse.badge--danger {
|
|
184
|
-
--pulse-color: var(--sl-color-danger-600);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
@keyframes pulse {
|
|
188
|
-
0% {
|
|
189
|
-
box-shadow: 0 0 0 0 var(--pulse-color);
|
|
190
|
-
}
|
|
191
|
-
70% {
|
|
192
|
-
box-shadow: 0 0 0 0.5rem transparent;
|
|
193
|
-
}
|
|
194
|
-
100% {
|
|
195
|
-
box-shadow: 0 0 0 0 transparent;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
`,p=class extends kt{constructor(){super(),Object.entries(this.constructor.dependencies).forEach(([t,e])=>{this.constructor.define(t,e)})}emit(t,e){const o=new CustomEvent(t,w({bubbles:!0,cancelable:!1,composed:!0,detail:{}},e));return this.dispatchEvent(o),o}static define(t,e=this,o={}){const r=customElements.get(t);if(!r){customElements.define(t,class extends e{},o);return}let s=" (unknown version)",a=s;"version"in e&&e.version&&(s=" v"+e.version),"version"in r&&r.version&&(a=" v"+r.version),!(s&&a&&s===a)&&console.warn(`Attempted to register <${t}>${s}, but <${t}>${a} has already been registered.`)}};p.version="2.11.2",p.dependencies={},i([n()],p.prototype,"dir",2),i([n()],p.prototype,"lang",2);var E=class extends p{constructor(){super(...arguments),this.variant="primary",this.pill=!1,this.pulse=!1}render(){return k`
|
|
199
|
-
<span
|
|
200
|
-
part="base"
|
|
201
|
-
class=${I({badge:!0,"badge--primary":this.variant==="primary","badge--success":this.variant==="success","badge--neutral":this.variant==="neutral","badge--warning":this.variant==="warning","badge--danger":this.variant==="danger","badge--pill":this.pill,"badge--pulse":this.pulse})}
|
|
202
|
-
role="status"
|
|
203
|
-
>
|
|
204
|
-
<slot></slot>
|
|
205
|
-
</span>
|
|
206
|
-
`}};E.styles=Nt,i([n({reflect:!0})],E.prototype,"variant",2),i([n({type:Boolean,reflect:!0})],E.prototype,"pill",2),i([n({type:Boolean,reflect:!0})],E.prototype,"pulse",2),E.define("sl-badge");function Ut(t){return crypto.getRandomValues(new Uint8Array(t))}for(var ct=4096,R=[],v=0,Z;v<256;v++)R[v]=(v+256).toString(16).substring(1);function jt(){(!Z||v+16>ct)&&(Z=Ut(ct),v=0);for(var t=0,e,o="";t<16;t++)e=Z[v+t],t==6?o+=R[e&15|64]:t==8?o+=R[e&63|128]:o+=R[e],t&1&&t>1&&t<11&&(o+="-");return v+=16,o}var qt=m`
|
|
207
|
-
${_}
|
|
208
|
-
|
|
209
|
-
:host {
|
|
210
|
-
--track-width: 2px;
|
|
211
|
-
--track-color: rgb(128 128 128 / 25%);
|
|
212
|
-
--indicator-color: var(--sl-color-primary-600);
|
|
213
|
-
--speed: 2s;
|
|
214
|
-
|
|
215
|
-
display: inline-flex;
|
|
216
|
-
width: 1em;
|
|
217
|
-
height: 1em;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
.spinner {
|
|
221
|
-
flex: 1 1 auto;
|
|
222
|
-
height: 100%;
|
|
223
|
-
width: 100%;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.spinner__track,
|
|
227
|
-
.spinner__indicator {
|
|
228
|
-
fill: none;
|
|
229
|
-
stroke-width: var(--track-width);
|
|
230
|
-
r: calc(0.5em - var(--track-width) / 2);
|
|
231
|
-
cx: 0.5em;
|
|
232
|
-
cy: 0.5em;
|
|
233
|
-
transform-origin: 50% 50%;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.spinner__track {
|
|
237
|
-
stroke: var(--track-color);
|
|
238
|
-
transform-origin: 0% 0%;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
.spinner__indicator {
|
|
242
|
-
stroke: var(--indicator-color);
|
|
243
|
-
stroke-linecap: round;
|
|
244
|
-
stroke-dasharray: 150% 75%;
|
|
245
|
-
animation: spin var(--speed) linear infinite;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
@keyframes spin {
|
|
249
|
-
0% {
|
|
250
|
-
transform: rotate(0deg);
|
|
251
|
-
stroke-dasharray: 0.01em, 2.75em;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
50% {
|
|
255
|
-
transform: rotate(450deg);
|
|
256
|
-
stroke-dasharray: 1.375em, 1.375em;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
100% {
|
|
260
|
-
transform: rotate(1080deg);
|
|
261
|
-
stroke-dasharray: 0.01em, 2.75em;
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
`;const G=new Set,Ht=new MutationObserver(bt),x=new Map;let ut=document.documentElement.dir||"ltr",ht=document.documentElement.lang||navigator.language,y;Ht.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]});function Wt(...t){t.map(e=>{const o=e.$code.toLowerCase();x.has(o)?x.set(o,Object.assign(Object.assign({},x.get(o)),e)):x.set(o,e),y||(y=e)}),bt()}function bt(){ut=document.documentElement.dir||"ltr",ht=document.documentElement.lang||navigator.language,[...G.keys()].map(t=>{typeof t.requestUpdate=="function"&&t.requestUpdate()})}let Kt=class{constructor(e){this.host=e,this.host.addController(this)}hostConnected(){G.add(this.host)}hostDisconnected(){G.delete(this.host)}dir(){return`${this.host.dir||ut}`.toLowerCase()}lang(){return`${this.host.lang||ht}`.toLowerCase()}getTranslationData(e){var o,r;const s=new Intl.Locale(e.replace(/_/g,"-")),a=s?.language.toLowerCase(),l=(r=(o=s?.region)===null||o===void 0?void 0:o.toLowerCase())!==null&&r!==void 0?r:"",u=x.get(`${a}-${l}`),g=x.get(a);return{locale:s,language:a,region:l,primary:u,secondary:g}}exists(e,o){var r;const{primary:s,secondary:a}=this.getTranslationData((r=o.lang)!==null&&r!==void 0?r:this.lang());return o=Object.assign({includeFallback:!1},o),!!(s&&s[e]||a&&a[e]||o.includeFallback&&y&&y[e])}term(e,...o){const{primary:r,secondary:s}=this.getTranslationData(this.lang());let a;if(r&&r[e])a=r[e];else if(s&&s[e])a=s[e];else if(y&&y[e])a=y[e];else return console.error(`No translation found for: ${String(e)}`),String(e);return typeof a=="function"?a(...o):a}date(e,o){return e=new Date(e),new Intl.DateTimeFormat(this.lang(),o).format(e)}number(e,o){return e=Number(e),isNaN(e)?"":new Intl.NumberFormat(this.lang(),o).format(e)}relativeTime(e,o,r){return new Intl.RelativeTimeFormat(this.lang(),r).format(e,o)}};var Y=class extends Kt{},pt=class extends p{constructor(){super(...arguments),this.localize=new Y(this)}render(){return k`
|
|
265
|
-
<svg part="base" class="spinner" role="progressbar" aria-label=${this.localize.term("loading")}>
|
|
266
|
-
<circle class="spinner__track"></circle>
|
|
267
|
-
<circle class="spinner__indicator"></circle>
|
|
268
|
-
</svg>
|
|
269
|
-
`}};pt.styles=qt;var L=new WeakMap,A=new WeakMap,J=new WeakSet,T=new WeakMap,Xt=class{constructor(t,e){this.handleFormData=o=>{const r=this.options.disabled(this.host),s=this.options.name(this.host),a=this.options.value(this.host),l=this.host.tagName.toLowerCase()==="sl-button";!r&&!l&&typeof s=="string"&&s.length>0&&typeof a<"u"&&(Array.isArray(a)?a.forEach(u=>{o.formData.append(s,u.toString())}):o.formData.append(s,a.toString()))},this.handleFormSubmit=o=>{var r;const s=this.options.disabled(this.host),a=this.options.reportValidity;this.form&&!this.form.noValidate&&((r=L.get(this.form))==null||r.forEach(l=>{this.setUserInteracted(l,!0)})),this.form&&!this.form.noValidate&&!s&&!a(this.host)&&(o.preventDefault(),o.stopImmediatePropagation())},this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),T.set(this.host,[])},this.handleInteraction=o=>{const r=T.get(this.host);r.includes(o.type)||r.push(o.type),r.length===this.options.assumeInteractionOn.length&&this.setUserInteracted(this.host,!0)},this.reportFormValidity=()=>{if(this.form&&!this.form.noValidate){const o=this.form.querySelectorAll("*");for(const r of o)if(typeof r.reportValidity=="function"&&!r.reportValidity())return!1}return!0},(this.host=t).addController(this),this.options=w({form:o=>{if(o.hasAttribute("form")&&o.getAttribute("form")!==""){const r=o.getRootNode(),s=o.getAttribute("form");if(s)return r.getElementById(s)}return o.closest("form")},name:o=>o.name,value:o=>o.value,defaultValue:o=>o.defaultValue,disabled:o=>{var r;return(r=o.disabled)!=null?r:!1},reportValidity:o=>typeof o.reportValidity=="function"?o.reportValidity():!0,setValue:(o,r)=>o.value=r,assumeInteractionOn:["sl-input"]},e)}hostConnected(){const t=this.options.form(this.host);t&&this.attachForm(t),T.set(this.host,[]),this.options.assumeInteractionOn.forEach(e=>{this.host.addEventListener(e,this.handleInteraction)})}hostDisconnected(){this.detachForm(),T.delete(this.host),this.options.assumeInteractionOn.forEach(t=>{this.host.removeEventListener(t,this.handleInteraction)})}hostUpdated(){const t=this.options.form(this.host);t||this.detachForm(),t&&this.form!==t&&(this.detachForm(),this.attachForm(t)),this.host.hasUpdated&&this.setValidity(this.host.validity.valid)}attachForm(t){t?(this.form=t,L.has(this.form)?L.get(this.form).add(this.host):L.set(this.form,new Set([this.host])),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),A.has(this.form)||(A.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity())):this.form=void 0}detachForm(){var t;this.form&&((t=L.get(this.form))==null||t.delete(this.host),this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),A.has(this.form)&&(this.form.reportValidity=A.get(this.form),A.delete(this.form))),this.form=void 0}setUserInteracted(t,e){e?J.add(t):J.delete(t),t.requestUpdate()}doAction(t,e){if(this.form){const o=document.createElement("button");o.type=t,o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.clipPath="inset(50%)",o.style.overflow="hidden",o.style.whiteSpace="nowrap",e&&(o.name=e.name,o.value=e.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach(r=>{e.hasAttribute(r)&&o.setAttribute(r,e.getAttribute(r))})),this.form.append(o),o.click(),o.remove()}}getForm(){var t;return(t=this.form)!=null?t:null}reset(t){this.doAction("reset",t)}submit(t){this.doAction("submit",t)}setValidity(t){const e=this.host,o=!!J.has(e),r=!!e.required;e.toggleAttribute("data-required",r),e.toggleAttribute("data-optional",!r),e.toggleAttribute("data-invalid",!t),e.toggleAttribute("data-valid",t),e.toggleAttribute("data-user-invalid",!t&&o),e.toggleAttribute("data-user-valid",t&&o)}updateValidity(){const t=this.host;this.setValidity(t.validity.valid)}emitInvalidEvent(t){const e=new CustomEvent("sl-invalid",{bubbles:!1,composed:!1,cancelable:!0,detail:{}});t||e.preventDefault(),this.host.dispatchEvent(e)||t?.preventDefault()}},Q=Object.freeze({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1});Object.freeze(X(w({},Q),{valid:!1,valueMissing:!0})),Object.freeze(X(w({},Q),{valid:!1,customError:!0}));var Zt=m`
|
|
270
|
-
${_}
|
|
271
|
-
|
|
272
|
-
:host {
|
|
273
|
-
display: inline-block;
|
|
274
|
-
position: relative;
|
|
275
|
-
width: auto;
|
|
276
|
-
cursor: pointer;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
.button {
|
|
280
|
-
display: inline-flex;
|
|
281
|
-
align-items: stretch;
|
|
282
|
-
justify-content: center;
|
|
283
|
-
width: 100%;
|
|
284
|
-
border-style: solid;
|
|
285
|
-
border-width: var(--sl-input-border-width);
|
|
286
|
-
font-family: var(--sl-input-font-family);
|
|
287
|
-
font-weight: var(--sl-font-weight-semibold);
|
|
288
|
-
text-decoration: none;
|
|
289
|
-
user-select: none;
|
|
290
|
-
-webkit-user-select: none;
|
|
291
|
-
white-space: nowrap;
|
|
292
|
-
vertical-align: middle;
|
|
293
|
-
padding: 0;
|
|
294
|
-
transition:
|
|
295
|
-
var(--sl-transition-x-fast) background-color,
|
|
296
|
-
var(--sl-transition-x-fast) color,
|
|
297
|
-
var(--sl-transition-x-fast) border,
|
|
298
|
-
var(--sl-transition-x-fast) box-shadow;
|
|
299
|
-
cursor: inherit;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
.button::-moz-focus-inner {
|
|
303
|
-
border: 0;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
.button:focus {
|
|
307
|
-
outline: none;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
.button:focus-visible {
|
|
311
|
-
outline: var(--sl-focus-ring);
|
|
312
|
-
outline-offset: var(--sl-focus-ring-offset);
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
.button--disabled {
|
|
316
|
-
opacity: 0.5;
|
|
317
|
-
cursor: not-allowed;
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
/* When disabled, prevent mouse events from bubbling up from children */
|
|
321
|
-
.button--disabled * {
|
|
322
|
-
pointer-events: none;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
.button__prefix,
|
|
326
|
-
.button__suffix {
|
|
327
|
-
flex: 0 0 auto;
|
|
328
|
-
display: flex;
|
|
329
|
-
align-items: center;
|
|
330
|
-
pointer-events: none;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
.button__label {
|
|
334
|
-
display: inline-block;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
.button__label::slotted(sl-icon) {
|
|
338
|
-
vertical-align: -2px;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
/*
|
|
342
|
-
* Standard buttons
|
|
343
|
-
*/
|
|
344
|
-
|
|
345
|
-
/* Default */
|
|
346
|
-
.button--standard.button--default {
|
|
347
|
-
background-color: var(--sl-color-neutral-0);
|
|
348
|
-
border-color: var(--sl-color-neutral-300);
|
|
349
|
-
color: var(--sl-color-neutral-700);
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
.button--standard.button--default:hover:not(.button--disabled) {
|
|
353
|
-
background-color: var(--sl-color-primary-50);
|
|
354
|
-
border-color: var(--sl-color-primary-300);
|
|
355
|
-
color: var(--sl-color-primary-700);
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
.button--standard.button--default:active:not(.button--disabled) {
|
|
359
|
-
background-color: var(--sl-color-primary-100);
|
|
360
|
-
border-color: var(--sl-color-primary-400);
|
|
361
|
-
color: var(--sl-color-primary-700);
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
/* Primary */
|
|
365
|
-
.button--standard.button--primary {
|
|
366
|
-
background-color: var(--sl-color-primary-600);
|
|
367
|
-
border-color: var(--sl-color-primary-600);
|
|
368
|
-
color: var(--sl-color-neutral-0);
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
.button--standard.button--primary:hover:not(.button--disabled) {
|
|
372
|
-
background-color: var(--sl-color-primary-500);
|
|
373
|
-
border-color: var(--sl-color-primary-500);
|
|
374
|
-
color: var(--sl-color-neutral-0);
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
.button--standard.button--primary:active:not(.button--disabled) {
|
|
378
|
-
background-color: var(--sl-color-primary-600);
|
|
379
|
-
border-color: var(--sl-color-primary-600);
|
|
380
|
-
color: var(--sl-color-neutral-0);
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
/* Success */
|
|
384
|
-
.button--standard.button--success {
|
|
385
|
-
background-color: var(--sl-color-success-600);
|
|
386
|
-
border-color: var(--sl-color-success-600);
|
|
387
|
-
color: var(--sl-color-neutral-0);
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
.button--standard.button--success:hover:not(.button--disabled) {
|
|
391
|
-
background-color: var(--sl-color-success-500);
|
|
392
|
-
border-color: var(--sl-color-success-500);
|
|
393
|
-
color: var(--sl-color-neutral-0);
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
.button--standard.button--success:active:not(.button--disabled) {
|
|
397
|
-
background-color: var(--sl-color-success-600);
|
|
398
|
-
border-color: var(--sl-color-success-600);
|
|
399
|
-
color: var(--sl-color-neutral-0);
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
/* Neutral */
|
|
403
|
-
.button--standard.button--neutral {
|
|
404
|
-
background-color: var(--sl-color-neutral-600);
|
|
405
|
-
border-color: var(--sl-color-neutral-600);
|
|
406
|
-
color: var(--sl-color-neutral-0);
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
.button--standard.button--neutral:hover:not(.button--disabled) {
|
|
410
|
-
background-color: var(--sl-color-neutral-500);
|
|
411
|
-
border-color: var(--sl-color-neutral-500);
|
|
412
|
-
color: var(--sl-color-neutral-0);
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
.button--standard.button--neutral:active:not(.button--disabled) {
|
|
416
|
-
background-color: var(--sl-color-neutral-600);
|
|
417
|
-
border-color: var(--sl-color-neutral-600);
|
|
418
|
-
color: var(--sl-color-neutral-0);
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
/* Warning */
|
|
422
|
-
.button--standard.button--warning {
|
|
423
|
-
background-color: var(--sl-color-warning-600);
|
|
424
|
-
border-color: var(--sl-color-warning-600);
|
|
425
|
-
color: var(--sl-color-neutral-0);
|
|
426
|
-
}
|
|
427
|
-
.button--standard.button--warning:hover:not(.button--disabled) {
|
|
428
|
-
background-color: var(--sl-color-warning-500);
|
|
429
|
-
border-color: var(--sl-color-warning-500);
|
|
430
|
-
color: var(--sl-color-neutral-0);
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
.button--standard.button--warning:active:not(.button--disabled) {
|
|
434
|
-
background-color: var(--sl-color-warning-600);
|
|
435
|
-
border-color: var(--sl-color-warning-600);
|
|
436
|
-
color: var(--sl-color-neutral-0);
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
/* Danger */
|
|
440
|
-
.button--standard.button--danger {
|
|
441
|
-
background-color: var(--sl-color-danger-600);
|
|
442
|
-
border-color: var(--sl-color-danger-600);
|
|
443
|
-
color: var(--sl-color-neutral-0);
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
.button--standard.button--danger:hover:not(.button--disabled) {
|
|
447
|
-
background-color: var(--sl-color-danger-500);
|
|
448
|
-
border-color: var(--sl-color-danger-500);
|
|
449
|
-
color: var(--sl-color-neutral-0);
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
.button--standard.button--danger:active:not(.button--disabled) {
|
|
453
|
-
background-color: var(--sl-color-danger-600);
|
|
454
|
-
border-color: var(--sl-color-danger-600);
|
|
455
|
-
color: var(--sl-color-neutral-0);
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
/*
|
|
459
|
-
* Outline buttons
|
|
460
|
-
*/
|
|
461
|
-
|
|
462
|
-
.button--outline {
|
|
463
|
-
background: none;
|
|
464
|
-
border: solid 1px;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
/* Default */
|
|
468
|
-
.button--outline.button--default {
|
|
469
|
-
border-color: var(--sl-color-neutral-300);
|
|
470
|
-
color: var(--sl-color-neutral-700);
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
.button--outline.button--default:hover:not(.button--disabled),
|
|
474
|
-
.button--outline.button--default.button--checked:not(.button--disabled) {
|
|
475
|
-
border-color: var(--sl-color-primary-600);
|
|
476
|
-
background-color: var(--sl-color-primary-600);
|
|
477
|
-
color: var(--sl-color-neutral-0);
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
.button--outline.button--default:active:not(.button--disabled) {
|
|
481
|
-
border-color: var(--sl-color-primary-700);
|
|
482
|
-
background-color: var(--sl-color-primary-700);
|
|
483
|
-
color: var(--sl-color-neutral-0);
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
/* Primary */
|
|
487
|
-
.button--outline.button--primary {
|
|
488
|
-
border-color: var(--sl-color-primary-600);
|
|
489
|
-
color: var(--sl-color-primary-600);
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
.button--outline.button--primary:hover:not(.button--disabled),
|
|
493
|
-
.button--outline.button--primary.button--checked:not(.button--disabled) {
|
|
494
|
-
background-color: var(--sl-color-primary-600);
|
|
495
|
-
color: var(--sl-color-neutral-0);
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
.button--outline.button--primary:active:not(.button--disabled) {
|
|
499
|
-
border-color: var(--sl-color-primary-700);
|
|
500
|
-
background-color: var(--sl-color-primary-700);
|
|
501
|
-
color: var(--sl-color-neutral-0);
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
/* Success */
|
|
505
|
-
.button--outline.button--success {
|
|
506
|
-
border-color: var(--sl-color-success-600);
|
|
507
|
-
color: var(--sl-color-success-600);
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
.button--outline.button--success:hover:not(.button--disabled),
|
|
511
|
-
.button--outline.button--success.button--checked:not(.button--disabled) {
|
|
512
|
-
background-color: var(--sl-color-success-600);
|
|
513
|
-
color: var(--sl-color-neutral-0);
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
.button--outline.button--success:active:not(.button--disabled) {
|
|
517
|
-
border-color: var(--sl-color-success-700);
|
|
518
|
-
background-color: var(--sl-color-success-700);
|
|
519
|
-
color: var(--sl-color-neutral-0);
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
/* Neutral */
|
|
523
|
-
.button--outline.button--neutral {
|
|
524
|
-
border-color: var(--sl-color-neutral-600);
|
|
525
|
-
color: var(--sl-color-neutral-600);
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
.button--outline.button--neutral:hover:not(.button--disabled),
|
|
529
|
-
.button--outline.button--neutral.button--checked:not(.button--disabled) {
|
|
530
|
-
background-color: var(--sl-color-neutral-600);
|
|
531
|
-
color: var(--sl-color-neutral-0);
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
.button--outline.button--neutral:active:not(.button--disabled) {
|
|
535
|
-
border-color: var(--sl-color-neutral-700);
|
|
536
|
-
background-color: var(--sl-color-neutral-700);
|
|
537
|
-
color: var(--sl-color-neutral-0);
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
/* Warning */
|
|
541
|
-
.button--outline.button--warning {
|
|
542
|
-
border-color: var(--sl-color-warning-600);
|
|
543
|
-
color: var(--sl-color-warning-600);
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
.button--outline.button--warning:hover:not(.button--disabled),
|
|
547
|
-
.button--outline.button--warning.button--checked:not(.button--disabled) {
|
|
548
|
-
background-color: var(--sl-color-warning-600);
|
|
549
|
-
color: var(--sl-color-neutral-0);
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
.button--outline.button--warning:active:not(.button--disabled) {
|
|
553
|
-
border-color: var(--sl-color-warning-700);
|
|
554
|
-
background-color: var(--sl-color-warning-700);
|
|
555
|
-
color: var(--sl-color-neutral-0);
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
/* Danger */
|
|
559
|
-
.button--outline.button--danger {
|
|
560
|
-
border-color: var(--sl-color-danger-600);
|
|
561
|
-
color: var(--sl-color-danger-600);
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
.button--outline.button--danger:hover:not(.button--disabled),
|
|
565
|
-
.button--outline.button--danger.button--checked:not(.button--disabled) {
|
|
566
|
-
background-color: var(--sl-color-danger-600);
|
|
567
|
-
color: var(--sl-color-neutral-0);
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
.button--outline.button--danger:active:not(.button--disabled) {
|
|
571
|
-
border-color: var(--sl-color-danger-700);
|
|
572
|
-
background-color: var(--sl-color-danger-700);
|
|
573
|
-
color: var(--sl-color-neutral-0);
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
@media (forced-colors: active) {
|
|
577
|
-
.button.button--outline.button--checked:not(.button--disabled) {
|
|
578
|
-
outline: solid 2px transparent;
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
/*
|
|
583
|
-
* Text buttons
|
|
584
|
-
*/
|
|
585
|
-
|
|
586
|
-
.button--text {
|
|
587
|
-
background-color: transparent;
|
|
588
|
-
border-color: transparent;
|
|
589
|
-
color: var(--sl-color-primary-600);
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
.button--text:hover:not(.button--disabled) {
|
|
593
|
-
background-color: transparent;
|
|
594
|
-
border-color: transparent;
|
|
595
|
-
color: var(--sl-color-primary-500);
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
.button--text:focus-visible:not(.button--disabled) {
|
|
599
|
-
background-color: transparent;
|
|
600
|
-
border-color: transparent;
|
|
601
|
-
color: var(--sl-color-primary-500);
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
.button--text:active:not(.button--disabled) {
|
|
605
|
-
background-color: transparent;
|
|
606
|
-
border-color: transparent;
|
|
607
|
-
color: var(--sl-color-primary-700);
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
/*
|
|
611
|
-
* Size modifiers
|
|
612
|
-
*/
|
|
613
|
-
|
|
614
|
-
.button--small {
|
|
615
|
-
height: auto;
|
|
616
|
-
min-height: var(--sl-input-height-small);
|
|
617
|
-
font-size: var(--sl-button-font-size-small);
|
|
618
|
-
line-height: calc(var(--sl-input-height-small) - var(--sl-input-border-width) * 2);
|
|
619
|
-
border-radius: var(--sl-input-border-radius-small);
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
.button--medium {
|
|
623
|
-
height: auto;
|
|
624
|
-
min-height: var(--sl-input-height-medium);
|
|
625
|
-
font-size: var(--sl-button-font-size-medium);
|
|
626
|
-
line-height: calc(var(--sl-input-height-medium) - var(--sl-input-border-width) * 2);
|
|
627
|
-
border-radius: var(--sl-input-border-radius-medium);
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
.button--large {
|
|
631
|
-
height: auto;
|
|
632
|
-
min-height: var(--sl-input-height-large);
|
|
633
|
-
font-size: var(--sl-button-font-size-large);
|
|
634
|
-
line-height: calc(var(--sl-input-height-large) - var(--sl-input-border-width) * 2);
|
|
635
|
-
border-radius: var(--sl-input-border-radius-large);
|
|
636
|
-
}
|
|
637
|
-
|
|
638
|
-
/*
|
|
639
|
-
* Pill modifier
|
|
640
|
-
*/
|
|
641
|
-
|
|
642
|
-
.button--pill.button--small {
|
|
643
|
-
border-radius: var(--sl-input-height-small);
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
.button--pill.button--medium {
|
|
647
|
-
border-radius: var(--sl-input-height-medium);
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
.button--pill.button--large {
|
|
651
|
-
border-radius: var(--sl-input-height-large);
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
/*
|
|
655
|
-
* Circle modifier
|
|
656
|
-
*/
|
|
657
|
-
|
|
658
|
-
.button--circle {
|
|
659
|
-
padding-left: 0;
|
|
660
|
-
padding-right: 0;
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
.button--circle.button--small {
|
|
664
|
-
width: var(--sl-input-height-small);
|
|
665
|
-
border-radius: 50%;
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
.button--circle.button--medium {
|
|
669
|
-
width: var(--sl-input-height-medium);
|
|
670
|
-
border-radius: 50%;
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
.button--circle.button--large {
|
|
674
|
-
width: var(--sl-input-height-large);
|
|
675
|
-
border-radius: 50%;
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
.button--circle .button__prefix,
|
|
679
|
-
.button--circle .button__suffix,
|
|
680
|
-
.button--circle .button__caret {
|
|
681
|
-
display: none;
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
/*
|
|
685
|
-
* Caret modifier
|
|
686
|
-
*/
|
|
687
|
-
|
|
688
|
-
.button--caret .button__suffix {
|
|
689
|
-
display: none;
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
.button--caret .button__caret {
|
|
693
|
-
height: auto;
|
|
694
|
-
}
|
|
695
|
-
|
|
696
|
-
/*
|
|
697
|
-
* Loading modifier
|
|
698
|
-
*/
|
|
699
|
-
|
|
700
|
-
.button--loading {
|
|
701
|
-
position: relative;
|
|
702
|
-
cursor: wait;
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
.button--loading .button__prefix,
|
|
706
|
-
.button--loading .button__label,
|
|
707
|
-
.button--loading .button__suffix,
|
|
708
|
-
.button--loading .button__caret {
|
|
709
|
-
visibility: hidden;
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
.button--loading sl-spinner {
|
|
713
|
-
--indicator-color: currentColor;
|
|
714
|
-
position: absolute;
|
|
715
|
-
font-size: 1em;
|
|
716
|
-
height: 1em;
|
|
717
|
-
width: 1em;
|
|
718
|
-
top: calc(50% - 0.5em);
|
|
719
|
-
left: calc(50% - 0.5em);
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
/*
|
|
723
|
-
* Badges
|
|
724
|
-
*/
|
|
725
|
-
|
|
726
|
-
.button ::slotted(sl-badge) {
|
|
727
|
-
position: absolute;
|
|
728
|
-
top: 0;
|
|
729
|
-
right: 0;
|
|
730
|
-
translate: 50% -50%;
|
|
731
|
-
pointer-events: none;
|
|
732
|
-
}
|
|
733
|
-
|
|
734
|
-
.button--rtl ::slotted(sl-badge) {
|
|
735
|
-
right: auto;
|
|
736
|
-
left: 0;
|
|
737
|
-
translate: -50% -50%;
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
/*
|
|
741
|
-
* Button spacing
|
|
742
|
-
*/
|
|
743
|
-
|
|
744
|
-
.button--has-label.button--small .button__label {
|
|
745
|
-
padding: 0 var(--sl-spacing-small);
|
|
746
|
-
}
|
|
747
|
-
|
|
748
|
-
.button--has-label.button--medium .button__label {
|
|
749
|
-
padding: 0 var(--sl-spacing-medium);
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
.button--has-label.button--large .button__label {
|
|
753
|
-
padding: 0 var(--sl-spacing-large);
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
.button--has-prefix.button--small {
|
|
757
|
-
padding-inline-start: var(--sl-spacing-x-small);
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
.button--has-prefix.button--small .button__label {
|
|
761
|
-
padding-inline-start: var(--sl-spacing-x-small);
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
.button--has-prefix.button--medium {
|
|
765
|
-
padding-inline-start: var(--sl-spacing-small);
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
.button--has-prefix.button--medium .button__label {
|
|
769
|
-
padding-inline-start: var(--sl-spacing-small);
|
|
770
|
-
}
|
|
771
|
-
|
|
772
|
-
.button--has-prefix.button--large {
|
|
773
|
-
padding-inline-start: var(--sl-spacing-small);
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
.button--has-prefix.button--large .button__label {
|
|
777
|
-
padding-inline-start: var(--sl-spacing-small);
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
.button--has-suffix.button--small,
|
|
781
|
-
.button--caret.button--small {
|
|
782
|
-
padding-inline-end: var(--sl-spacing-x-small);
|
|
783
|
-
}
|
|
784
|
-
|
|
785
|
-
.button--has-suffix.button--small .button__label,
|
|
786
|
-
.button--caret.button--small .button__label {
|
|
787
|
-
padding-inline-end: var(--sl-spacing-x-small);
|
|
788
|
-
}
|
|
789
|
-
|
|
790
|
-
.button--has-suffix.button--medium,
|
|
791
|
-
.button--caret.button--medium {
|
|
792
|
-
padding-inline-end: var(--sl-spacing-small);
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
.button--has-suffix.button--medium .button__label,
|
|
796
|
-
.button--caret.button--medium .button__label {
|
|
797
|
-
padding-inline-end: var(--sl-spacing-small);
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
.button--has-suffix.button--large,
|
|
801
|
-
.button--caret.button--large {
|
|
802
|
-
padding-inline-end: var(--sl-spacing-small);
|
|
803
|
-
}
|
|
804
|
-
|
|
805
|
-
.button--has-suffix.button--large .button__label,
|
|
806
|
-
.button--caret.button--large .button__label {
|
|
807
|
-
padding-inline-end: var(--sl-spacing-small);
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
/*
|
|
811
|
-
* Button groups support a variety of button types (e.g. buttons with tooltips, buttons as dropdown triggers, etc.).
|
|
812
|
-
* This means buttons aren't always direct descendants of the button group, thus we can't target them with the
|
|
813
|
-
* ::slotted selector. To work around this, the button group component does some magic to add these special classes to
|
|
814
|
-
* buttons and we style them here instead.
|
|
815
|
-
*/
|
|
816
|
-
|
|
817
|
-
:host(.sl-button-group__button--first:not(.sl-button-group__button--last)) .button {
|
|
818
|
-
border-start-end-radius: 0;
|
|
819
|
-
border-end-end-radius: 0;
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
:host(.sl-button-group__button--inner) .button {
|
|
823
|
-
border-radius: 0;
|
|
824
|
-
}
|
|
825
|
-
|
|
826
|
-
:host(.sl-button-group__button--last:not(.sl-button-group__button--first)) .button {
|
|
827
|
-
border-start-start-radius: 0;
|
|
828
|
-
border-end-start-radius: 0;
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
/* All except the first */
|
|
832
|
-
:host(.sl-button-group__button:not(.sl-button-group__button--first)) {
|
|
833
|
-
margin-inline-start: calc(-1 * var(--sl-input-border-width));
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
/* Add a visual separator between solid buttons */
|
|
837
|
-
:host(
|
|
838
|
-
.sl-button-group__button:not(
|
|
839
|
-
.sl-button-group__button--first,
|
|
840
|
-
.sl-button-group__button--radio,
|
|
841
|
-
[variant='default']
|
|
842
|
-
):not(:hover)
|
|
843
|
-
)
|
|
844
|
-
.button:after {
|
|
845
|
-
content: '';
|
|
846
|
-
position: absolute;
|
|
847
|
-
top: 0;
|
|
848
|
-
inset-inline-start: 0;
|
|
849
|
-
bottom: 0;
|
|
850
|
-
border-left: solid 1px rgb(128 128 128 / 33%);
|
|
851
|
-
mix-blend-mode: multiply;
|
|
852
|
-
}
|
|
853
|
-
|
|
854
|
-
/* Bump hovered, focused, and checked buttons up so their focus ring isn't clipped */
|
|
855
|
-
:host(.sl-button-group__button--hover) {
|
|
856
|
-
z-index: 1;
|
|
857
|
-
}
|
|
858
|
-
|
|
859
|
-
/* Focus and checked are always on top */
|
|
860
|
-
:host(.sl-button-group__button--focus),
|
|
861
|
-
:host(.sl-button-group__button[checked]) {
|
|
862
|
-
z-index: 2;
|
|
863
|
-
}
|
|
864
|
-
`,ft=class{constructor(t,...e){this.slotNames=[],this.handleSlotChange=o=>{const r=o.target;(this.slotNames.includes("[default]")&&!r.name||r.name&&this.slotNames.includes(r.name))&&this.host.requestUpdate()},(this.host=t).addController(this),this.slotNames=e}hasDefaultSlot(){return[...this.host.childNodes].some(t=>{if(t.nodeType===t.TEXT_NODE&&t.textContent.trim()!=="")return!0;if(t.nodeType===t.ELEMENT_NODE){const e=t;if(e.tagName.toLowerCase()==="sl-visually-hidden")return!1;if(!e.hasAttribute("slot"))return!0}return!1})}hasNamedSlot(t){return this.host.querySelector(`:scope > [slot="${t}"]`)!==null}test(t){return t==="[default]"?this.hasDefaultSlot():this.hasNamedSlot(t)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}},Gt=m`
|
|
865
|
-
${_}
|
|
866
|
-
|
|
867
|
-
:host {
|
|
868
|
-
display: inline-block;
|
|
869
|
-
width: 1em;
|
|
870
|
-
height: 1em;
|
|
871
|
-
box-sizing: content-box !important;
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
svg {
|
|
875
|
-
display: block;
|
|
876
|
-
height: 100%;
|
|
877
|
-
width: 100%;
|
|
878
|
-
}
|
|
879
|
-
`;function N(t,e){const o=w({waitUntilFirstUpdate:!1},e);return(r,s)=>{const{update:a}=r,l=Array.isArray(t)?t:[t];r.update=function(u){l.forEach(g=>{const q=g;if(u.has(q)){const rt=u.get(q),st=this[q];rt!==st&&(!o.waitUntilFirstUpdate||this.hasUpdated)&&this[s](rt,st)}}),a.call(this,u)}}}var $=Symbol(),U=Symbol(),tt,et=new Map,b=class extends p{constructor(){super(...arguments),this.initialRender=!1,this.svg=null,this.label="",this.library="default"}async resolveIcon(t,e){var o;let r;if(e?.spriteSheet)return k`<svg part="svg">
|
|
880
|
-
<use part="use" href="${t}"></use>
|
|
881
|
-
</svg>`;try{if(r=await fetch(t,{mode:"cors"}),!r.ok)return r.status===410?$:U}catch{return U}try{const s=document.createElement("div");s.innerHTML=await r.text();const a=s.firstElementChild;if(((o=a?.tagName)==null?void 0:o.toLowerCase())!=="svg")return $;tt||(tt=new DOMParser);const u=tt.parseFromString(a.outerHTML,"text/html").body.querySelector("svg");return u?(u.part.add("svg"),document.adoptNode(u)):$}catch{return $}}connectedCallback(){super.connectedCallback(),Vt(this)}firstUpdated(){this.initialRender=!0,this.setIcon()}disconnectedCallback(){super.disconnectedCallback(),Pt(this)}getIconSource(){const t=dt(this.library);return this.name&&t?{url:t.resolver(this.name),fromLibrary:!0}:{url:this.src,fromLibrary:!1}}handleLabelChange(){typeof this.label=="string"&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}async setIcon(){var t;const{url:e,fromLibrary:o}=this.getIconSource(),r=o?dt(this.library):void 0;if(!e){this.svg=null;return}let s=et.get(e);if(s||(s=this.resolveIcon(e,r),et.set(e,s)),!this.initialRender)return;const a=await s;if(a===U&&et.delete(e),e===this.getIconSource().url){if(Ct(a)){this.svg=a;return}switch(a){case U:case $:this.svg=null,this.emit("sl-error");break;default:this.svg=a.cloneNode(!0),(t=r?.mutator)==null||t.call(r,this.svg),this.emit("sl-load")}}}render(){return this.svg}};b.styles=Gt,i([D()],b.prototype,"svg",2),i([n({reflect:!0})],b.prototype,"name",2),i([n()],b.prototype,"src",2),i([n()],b.prototype,"label",2),i([n({reflect:!0})],b.prototype,"library",2),i([N("label")],b.prototype,"handleLabelChange",1),i([N(["name","src","library"])],b.prototype,"setIcon",1);var d=class extends p{constructor(){super(...arguments),this.formControlController=new Xt(this,{form:t=>{if(t.hasAttribute("form")){const e=t.getRootNode(),o=t.getAttribute("form");return e.getElementById(o)}return t.closest("form")},assumeInteractionOn:["click"]}),this.hasSlotController=new ft(this,"[default]","prefix","suffix"),this.localize=new Y(this),this.hasFocus=!1,this.invalid=!1,this.title="",this.variant="default",this.size="medium",this.caret=!1,this.disabled=!1,this.loading=!1,this.outline=!1,this.pill=!1,this.circle=!1,this.type="button",this.name="",this.value="",this.href="",this.rel="noreferrer noopener"}get validity(){return this.isButton()?this.button.validity:Q}get validationMessage(){return this.isButton()?this.button.validationMessage:""}firstUpdated(){this.isButton()&&this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleClick(){this.type==="submit"&&this.formControlController.submit(this),this.type==="reset"&&this.formControlController.reset(this)}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)}isButton(){return!this.href}isLink(){return!!this.href}handleDisabledChange(){this.isButton()&&this.formControlController.setValidity(this.disabled)}click(){this.button.click()}focus(t){this.button.focus(t)}blur(){this.button.blur()}checkValidity(){return this.isButton()?this.button.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.isButton()?this.button.reportValidity():!0}setCustomValidity(t){this.isButton()&&(this.button.setCustomValidity(t),this.formControlController.updateValidity())}render(){const t=this.isLink(),e=t?M`a`:M`button`;return O`
|
|
882
|
-
<${e}
|
|
883
|
-
part="base"
|
|
884
|
-
class=${I({button:!0,"button--default":this.variant==="default","button--primary":this.variant==="primary","button--success":this.variant==="success","button--neutral":this.variant==="neutral","button--warning":this.variant==="warning","button--danger":this.variant==="danger","button--text":this.variant==="text","button--small":this.size==="small","button--medium":this.size==="medium","button--large":this.size==="large","button--caret":this.caret,"button--circle":this.circle,"button--disabled":this.disabled,"button--focused":this.hasFocus,"button--loading":this.loading,"button--standard":!this.outline,"button--outline":this.outline,"button--pill":this.pill,"button--rtl":this.localize.dir()==="rtl","button--has-label":this.hasSlotController.test("[default]"),"button--has-prefix":this.hasSlotController.test("prefix"),"button--has-suffix":this.hasSlotController.test("suffix")})}
|
|
885
|
-
?disabled=${c(t?void 0:this.disabled)}
|
|
886
|
-
type=${c(t?void 0:this.type)}
|
|
887
|
-
title=${this.title}
|
|
888
|
-
name=${c(t?void 0:this.name)}
|
|
889
|
-
value=${c(t?void 0:this.value)}
|
|
890
|
-
href=${c(t?this.href:void 0)}
|
|
891
|
-
target=${c(t?this.target:void 0)}
|
|
892
|
-
download=${c(t?this.download:void 0)}
|
|
893
|
-
rel=${c(t?this.rel:void 0)}
|
|
894
|
-
role=${c(t?void 0:"button")}
|
|
895
|
-
aria-disabled=${this.disabled?"true":"false"}
|
|
896
|
-
tabindex=${this.disabled?"-1":"0"}
|
|
897
|
-
@blur=${this.handleBlur}
|
|
898
|
-
@focus=${this.handleFocus}
|
|
899
|
-
@invalid=${this.isButton()?this.handleInvalid:null}
|
|
900
|
-
@click=${this.handleClick}
|
|
901
|
-
>
|
|
902
|
-
<slot name="prefix" part="prefix" class="button__prefix"></slot>
|
|
903
|
-
<slot part="label" class="button__label"></slot>
|
|
904
|
-
<slot name="suffix" part="suffix" class="button__suffix"></slot>
|
|
905
|
-
${this.caret?O` <sl-icon part="caret" class="button__caret" library="system" name="caret"></sl-icon> `:""}
|
|
906
|
-
${this.loading?O`<sl-spinner part="spinner"></sl-spinner>`:""}
|
|
907
|
-
</${e}>
|
|
908
|
-
`}};d.styles=Zt,d.dependencies={"sl-icon":b,"sl-spinner":pt},i([C(".button")],d.prototype,"button",2),i([D()],d.prototype,"hasFocus",2),i([D()],d.prototype,"invalid",2),i([n()],d.prototype,"title",2),i([n({reflect:!0})],d.prototype,"variant",2),i([n({reflect:!0})],d.prototype,"size",2),i([n({type:Boolean,reflect:!0})],d.prototype,"caret",2),i([n({type:Boolean,reflect:!0})],d.prototype,"disabled",2),i([n({type:Boolean,reflect:!0})],d.prototype,"loading",2),i([n({type:Boolean,reflect:!0})],d.prototype,"outline",2),i([n({type:Boolean,reflect:!0})],d.prototype,"pill",2),i([n({type:Boolean,reflect:!0})],d.prototype,"circle",2),i([n()],d.prototype,"type",2),i([n()],d.prototype,"name",2),i([n()],d.prototype,"value",2),i([n()],d.prototype,"href",2),i([n()],d.prototype,"target",2),i([n()],d.prototype,"rel",2),i([n()],d.prototype,"download",2),i([n()],d.prototype,"form",2),i([n({attribute:"formaction"})],d.prototype,"formAction",2),i([n({attribute:"formenctype"})],d.prototype,"formEnctype",2),i([n({attribute:"formmethod"})],d.prototype,"formMethod",2),i([n({attribute:"formnovalidate",type:Boolean})],d.prototype,"formNoValidate",2),i([n({attribute:"formtarget"})],d.prototype,"formTarget",2),i([N("disabled",{waitUntilFirstUpdate:!0})],d.prototype,"handleDisabledChange",1),d.define("sl-button");var Yt={$code:"en",$name:"English",$dir:"ltr",carousel:"Carousel",clearEntry:"Clear entry",close:"Close",copied:"Copied",copy:"Copy",currentValue:"Current value",error:"Error",goToSlide:(t,e)=>`Go to slide ${t} of ${e}`,hidePassword:"Hide password",loading:"Loading",nextSlide:"Next slide",numOptionsSelected:t=>t===0?"No options selected":t===1?"1 option selected":`${t} options selected`,previousSlide:"Previous slide",progress:"Progress",remove:"Remove",resize:"Resize",scrollToEnd:"Scroll to end",scrollToStart:"Scroll to start",selectAColorFromTheScreen:"Select a color from the screen",showPassword:"Show password",slideNum:t=>`Slide ${t}`,toggleColorFormat:"Toggle color format"};Wt(Yt);function Jt(t){return!!(t.offsetParent||t.offsetWidth||t.offsetHeight||t.getClientRects().length)}function Qt(t){const e=t.tagName.toLowerCase();return t.getAttribute("tabindex")==="-1"||t.hasAttribute("disabled")||e==="input"&&t.getAttribute("type")==="radio"&&!t.hasAttribute("checked")||!Jt(t)||window.getComputedStyle(t).visibility==="hidden"?!1:(e==="audio"||e==="video")&&t.hasAttribute("controls")||t.hasAttribute("tabindex")||t.hasAttribute("contenteditable")&&t.getAttribute("contenteditable")!=="false"?!0:["button","input","select","textarea","a","audio","video","summary"].includes(e)}function gt(t){const e=[];function o(r){if(r instanceof Element){if(r.hasAttribute("inert"))return;!e.includes(r)&&Qt(r)&&e.push(r);const s=a=>{var l;return((l=a.getRootNode({composed:!0}))==null?void 0:l.host)!==t};r instanceof HTMLSlotElement&&s(r)&&r.assignedElements({flatten:!0}).forEach(a=>{o(a)}),r.shadowRoot!==null&&r.shadowRoot.mode==="open"&&o(r.shadowRoot)}[...r.children].forEach(s=>o(s))}return o(t),e.sort((r,s)=>{const a=Number(r.getAttribute("tabindex"))||0;return(Number(s.getAttribute("tabindex"))||0)-a})}function*vt(t=document.activeElement){t!=null&&(yield t,"shadowRoot"in t&&t.shadowRoot&&t.shadowRoot.mode!=="closed"&&(yield*Bt(vt(t.shadowRoot.activeElement))))}function te(){return[...vt()].pop()}var S=[],ee=class{constructor(t){this.tabDirection="forward",this.handleFocusIn=()=>{this.checkFocus()},this.handleKeyDown=e=>{var o,r;if(e.key!=="Tab"||this.isExternalActivated)return;e.shiftKey?this.tabDirection="backward":this.tabDirection="forward",e.preventDefault();const s=gt(this.element),a=te();let l=s.findIndex(g=>g===a);if(l===-1){this.currentFocus=s[0],(o=this.currentFocus)==null||o.focus({preventScroll:!0});return}const u=this.tabDirection==="forward"?1:-1;l+u>=s.length?l=0:l+u<0?l=s.length-1:l+=u,this.currentFocus=s[l],(r=this.currentFocus)==null||r.focus({preventScroll:!0}),setTimeout(()=>this.checkFocus())},this.handleKeyUp=()=>{this.tabDirection="forward"},this.element=t}activate(){S.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){S=S.filter(t=>t!==this.element),this.currentFocus=null,document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return S[S.length-1]===this.element}activateExternal(){this.isExternalActivated=!0}deactivateExternal(){this.isExternalActivated=!1}checkFocus(){if(this.isActive()&&!this.isExternalActivated){const t=gt(this.element);if(!this.element.matches(":focus-within")){const e=t[0],o=t[t.length-1],r=this.tabDirection==="forward"?e:o;typeof r?.focus=="function"&&(this.currentFocus=r,r.focus({preventScroll:!0}))}}}},ot=new Set;function oe(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}function mt(t){if(ot.add(t),!document.body.classList.contains("sl-scroll-lock")){const e=oe();document.body.classList.add("sl-scroll-lock"),document.body.style.setProperty("--sl-scroll-lock-size",`${e}px`)}}function yt(t){ot.delete(t),ot.size===0&&(document.body.classList.remove("sl-scroll-lock"),document.body.style.removeProperty("--sl-scroll-lock-size"))}var re=m`
|
|
909
|
-
${_}
|
|
910
|
-
|
|
911
|
-
:host {
|
|
912
|
-
--width: 31rem;
|
|
913
|
-
--header-spacing: var(--sl-spacing-large);
|
|
914
|
-
--body-spacing: var(--sl-spacing-large);
|
|
915
|
-
--footer-spacing: var(--sl-spacing-large);
|
|
916
|
-
|
|
917
|
-
display: contents;
|
|
918
|
-
}
|
|
919
|
-
|
|
920
|
-
.dialog {
|
|
921
|
-
display: flex;
|
|
922
|
-
align-items: center;
|
|
923
|
-
justify-content: center;
|
|
924
|
-
position: fixed;
|
|
925
|
-
top: 0;
|
|
926
|
-
right: 0;
|
|
927
|
-
bottom: 0;
|
|
928
|
-
left: 0;
|
|
929
|
-
z-index: var(--sl-z-index-dialog);
|
|
930
|
-
}
|
|
931
|
-
|
|
932
|
-
.dialog__panel {
|
|
933
|
-
display: flex;
|
|
934
|
-
flex-direction: column;
|
|
935
|
-
z-index: 2;
|
|
936
|
-
width: var(--width);
|
|
937
|
-
max-width: calc(100% - var(--sl-spacing-2x-large));
|
|
938
|
-
max-height: calc(100% - var(--sl-spacing-2x-large));
|
|
939
|
-
background-color: var(--sl-panel-background-color);
|
|
940
|
-
border-radius: var(--sl-border-radius-medium);
|
|
941
|
-
box-shadow: var(--sl-shadow-x-large);
|
|
942
|
-
}
|
|
943
|
-
|
|
944
|
-
.dialog__panel:focus {
|
|
945
|
-
outline: none;
|
|
946
|
-
}
|
|
947
|
-
|
|
948
|
-
/* Ensure there's enough vertical padding for phones that don't update vh when chrome appears (e.g. iPhone) */
|
|
949
|
-
@media screen and (max-width: 420px) {
|
|
950
|
-
.dialog__panel {
|
|
951
|
-
max-height: 80vh;
|
|
952
|
-
}
|
|
953
|
-
}
|
|
954
|
-
|
|
955
|
-
.dialog--open .dialog__panel {
|
|
956
|
-
display: flex;
|
|
957
|
-
opacity: 1;
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
.dialog__header {
|
|
961
|
-
flex: 0 0 auto;
|
|
962
|
-
display: flex;
|
|
963
|
-
}
|
|
964
|
-
|
|
965
|
-
.dialog__title {
|
|
966
|
-
flex: 1 1 auto;
|
|
967
|
-
font: inherit;
|
|
968
|
-
font-size: var(--sl-font-size-large);
|
|
969
|
-
line-height: var(--sl-line-height-dense);
|
|
970
|
-
padding: var(--header-spacing);
|
|
971
|
-
margin: 0;
|
|
972
|
-
}
|
|
973
|
-
|
|
974
|
-
.dialog__header-actions {
|
|
975
|
-
flex-shrink: 0;
|
|
976
|
-
display: flex;
|
|
977
|
-
flex-wrap: wrap;
|
|
978
|
-
justify-content: end;
|
|
979
|
-
gap: var(--sl-spacing-2x-small);
|
|
980
|
-
padding: 0 var(--header-spacing);
|
|
981
|
-
}
|
|
982
|
-
|
|
983
|
-
.dialog__header-actions sl-icon-button,
|
|
984
|
-
.dialog__header-actions ::slotted(sl-icon-button) {
|
|
985
|
-
flex: 0 0 auto;
|
|
986
|
-
display: flex;
|
|
987
|
-
align-items: center;
|
|
988
|
-
font-size: var(--sl-font-size-medium);
|
|
989
|
-
}
|
|
990
|
-
|
|
991
|
-
.dialog__body {
|
|
992
|
-
flex: 1 1 auto;
|
|
993
|
-
display: block;
|
|
994
|
-
padding: var(--body-spacing);
|
|
995
|
-
overflow: auto;
|
|
996
|
-
-webkit-overflow-scrolling: touch;
|
|
997
|
-
}
|
|
998
|
-
|
|
999
|
-
.dialog__footer {
|
|
1000
|
-
flex: 0 0 auto;
|
|
1001
|
-
text-align: right;
|
|
1002
|
-
padding: var(--footer-spacing);
|
|
1003
|
-
}
|
|
1004
|
-
|
|
1005
|
-
.dialog__footer ::slotted(sl-button:not(:first-of-type)) {
|
|
1006
|
-
margin-inline-start: var(--sl-spacing-x-small);
|
|
1007
|
-
}
|
|
1008
|
-
|
|
1009
|
-
.dialog:not(.dialog--has-footer) .dialog__footer {
|
|
1010
|
-
display: none;
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
|
-
.dialog__overlay {
|
|
1014
|
-
position: fixed;
|
|
1015
|
-
top: 0;
|
|
1016
|
-
right: 0;
|
|
1017
|
-
bottom: 0;
|
|
1018
|
-
left: 0;
|
|
1019
|
-
background-color: var(--sl-overlay-background-color);
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
@media (forced-colors: active) {
|
|
1023
|
-
.dialog__panel {
|
|
1024
|
-
border: solid 1px var(--sl-color-neutral-0);
|
|
1025
|
-
}
|
|
1026
|
-
}
|
|
1027
|
-
`,se=m`
|
|
1028
|
-
${_}
|
|
1029
|
-
|
|
1030
|
-
:host {
|
|
1031
|
-
display: inline-block;
|
|
1032
|
-
color: var(--sl-color-neutral-600);
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
|
-
.icon-button {
|
|
1036
|
-
flex: 0 0 auto;
|
|
1037
|
-
display: flex;
|
|
1038
|
-
align-items: center;
|
|
1039
|
-
background: none;
|
|
1040
|
-
border: none;
|
|
1041
|
-
border-radius: var(--sl-border-radius-medium);
|
|
1042
|
-
font-size: inherit;
|
|
1043
|
-
color: inherit;
|
|
1044
|
-
padding: var(--sl-spacing-x-small);
|
|
1045
|
-
cursor: pointer;
|
|
1046
|
-
transition: var(--sl-transition-x-fast) color;
|
|
1047
|
-
-webkit-appearance: none;
|
|
1048
|
-
}
|
|
1049
|
-
|
|
1050
|
-
.icon-button:hover:not(.icon-button--disabled),
|
|
1051
|
-
.icon-button:focus-visible:not(.icon-button--disabled) {
|
|
1052
|
-
color: var(--sl-color-primary-600);
|
|
1053
|
-
}
|
|
1054
|
-
|
|
1055
|
-
.icon-button:active:not(.icon-button--disabled) {
|
|
1056
|
-
color: var(--sl-color-primary-700);
|
|
1057
|
-
}
|
|
1058
|
-
|
|
1059
|
-
.icon-button:focus {
|
|
1060
|
-
outline: none;
|
|
1061
|
-
}
|
|
1062
|
-
|
|
1063
|
-
.icon-button--disabled {
|
|
1064
|
-
opacity: 0.5;
|
|
1065
|
-
cursor: not-allowed;
|
|
1066
|
-
}
|
|
1067
|
-
|
|
1068
|
-
.icon-button:focus-visible {
|
|
1069
|
-
outline: var(--sl-focus-ring);
|
|
1070
|
-
outline-offset: var(--sl-focus-ring-offset);
|
|
1071
|
-
}
|
|
1072
|
-
|
|
1073
|
-
.icon-button__icon {
|
|
1074
|
-
pointer-events: none;
|
|
1075
|
-
}
|
|
1076
|
-
`,h=class extends p{constructor(){super(...arguments),this.hasFocus=!1,this.label="",this.disabled=!1}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleClick(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}click(){this.button.click()}focus(t){this.button.focus(t)}blur(){this.button.blur()}render(){const t=!!this.href,e=t?M`a`:M`button`;return O`
|
|
1077
|
-
<${e}
|
|
1078
|
-
part="base"
|
|
1079
|
-
class=${I({"icon-button":!0,"icon-button--disabled":!t&&this.disabled,"icon-button--focused":this.hasFocus})}
|
|
1080
|
-
?disabled=${c(t?void 0:this.disabled)}
|
|
1081
|
-
type=${c(t?void 0:"button")}
|
|
1082
|
-
href=${c(t?this.href:void 0)}
|
|
1083
|
-
target=${c(t?this.target:void 0)}
|
|
1084
|
-
download=${c(t?this.download:void 0)}
|
|
1085
|
-
rel=${c(t&&this.target?"noreferrer noopener":void 0)}
|
|
1086
|
-
role=${c(t?void 0:"button")}
|
|
1087
|
-
aria-disabled=${this.disabled?"true":"false"}
|
|
1088
|
-
aria-label="${this.label}"
|
|
1089
|
-
tabindex=${this.disabled?"-1":"0"}
|
|
1090
|
-
@blur=${this.handleBlur}
|
|
1091
|
-
@focus=${this.handleFocus}
|
|
1092
|
-
@click=${this.handleClick}
|
|
1093
|
-
>
|
|
1094
|
-
<sl-icon
|
|
1095
|
-
class="icon-button__icon"
|
|
1096
|
-
name=${c(this.name)}
|
|
1097
|
-
library=${c(this.library)}
|
|
1098
|
-
src=${c(this.src)}
|
|
1099
|
-
aria-hidden="true"
|
|
1100
|
-
></sl-icon>
|
|
1101
|
-
</${e}>
|
|
1102
|
-
`}};h.styles=se,h.dependencies={"sl-icon":b},i([C(".icon-button")],h.prototype,"button",2),i([D()],h.prototype,"hasFocus",2),i([n()],h.prototype,"name",2),i([n()],h.prototype,"library",2),i([n()],h.prototype,"src",2),i([n()],h.prototype,"href",2),i([n()],h.prototype,"target",2),i([n()],h.prototype,"download",2),i([n()],h.prototype,"label",2),i([n({type:Boolean,reflect:!0})],h.prototype,"disabled",2);var wt=new Map,ae=new WeakMap;function ie(t){return t??{keyframes:[],options:{duration:0}}}function _t(t,e){return e.toLowerCase()==="rtl"?{keyframes:t.rtlKeyframes||t.keyframes,options:t.options}:t}function z(t,e){wt.set(t,ie(e))}function F(t,e,o){const r=ae.get(t);if(r?.[e])return _t(r[e],o.dir);const s=wt.get(e);return s?_t(s,o.dir):{keyframes:[],options:{duration:0}}}function xt(t,e){return new Promise(o=>{function r(s){s.target===t&&(t.removeEventListener(e,r),o())}t.addEventListener(e,r)})}function B(t,e,o){return new Promise(r=>{if(o?.duration===1/0)throw new Error("Promise-based animations must be finite.");const s=t.animate(e,X(w({},o),{duration:ne()?0:o.duration}));s.addEventListener("cancel",r,{once:!0}),s.addEventListener("finish",r,{once:!0})})}function ne(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function j(t){return Promise.all(t.getAnimations().map(e=>new Promise(o=>{const r=requestAnimationFrame(o);e.addEventListener("cancel",()=>r,{once:!0}),e.addEventListener("finish",()=>r,{once:!0}),e.cancel()})))}var f=class extends p{constructor(){super(...arguments),this.hasSlotController=new ft(this,"footer"),this.localize=new Y(this),this.modal=new ee(this),this.open=!1,this.label="",this.noHeader=!1,this.handleDocumentKeyDown=t=>{t.key==="Escape"&&this.modal.isActive()&&this.open&&(t.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),mt(this))}disconnectedCallback(){super.disconnectedCallback(),this.modal.deactivate(),yt(this)}requestClose(t){if(this.emit("sl-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented){const o=F(this,"dialog.denyClose",{dir:this.localize.dir()});B(this.panel,o.keyframes,o.options);return}this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){if(this.open){this.emit("sl-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.modal.activate(),mt(this);const t=this.querySelector("[autofocus]");t&&t.removeAttribute("autofocus"),await Promise.all([j(this.dialog),j(this.overlay)]),this.dialog.hidden=!1,requestAnimationFrame(()=>{this.emit("sl-initial-focus",{cancelable:!0}).defaultPrevented||(t?t.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),t&&t.setAttribute("autofocus","")});const e=F(this,"dialog.show",{dir:this.localize.dir()}),o=F(this,"dialog.overlay.show",{dir:this.localize.dir()});await Promise.all([B(this.panel,e.keyframes,e.options),B(this.overlay,o.keyframes,o.options)]),this.emit("sl-after-show")}else{this.emit("sl-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([j(this.dialog),j(this.overlay)]);const t=F(this,"dialog.hide",{dir:this.localize.dir()}),e=F(this,"dialog.overlay.hide",{dir:this.localize.dir()});await Promise.all([B(this.overlay,e.keyframes,e.options).then(()=>{this.overlay.hidden=!0}),B(this.panel,t.keyframes,t.options).then(()=>{this.panel.hidden=!0})]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,yt(this);const o=this.originalTrigger;typeof o?.focus=="function"&&setTimeout(()=>o.focus()),this.emit("sl-after-hide")}}async show(){if(!this.open)return this.open=!0,xt(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,xt(this,"sl-after-hide")}render(){return k`
|
|
1103
|
-
<div
|
|
1104
|
-
part="base"
|
|
1105
|
-
class=${I({dialog:!0,"dialog--open":this.open,"dialog--has-footer":this.hasSlotController.test("footer")})}
|
|
1106
|
-
>
|
|
1107
|
-
<div part="overlay" class="dialog__overlay" @click=${()=>this.requestClose("overlay")} tabindex="-1"></div>
|
|
1108
|
-
|
|
1109
|
-
<div
|
|
1110
|
-
part="panel"
|
|
1111
|
-
class="dialog__panel"
|
|
1112
|
-
role="dialog"
|
|
1113
|
-
aria-modal="true"
|
|
1114
|
-
aria-hidden=${this.open?"false":"true"}
|
|
1115
|
-
aria-label=${c(this.noHeader?this.label:void 0)}
|
|
1116
|
-
aria-labelledby=${c(this.noHeader?void 0:"title")}
|
|
1117
|
-
tabindex="-1"
|
|
1118
|
-
>
|
|
1119
|
-
${this.noHeader?"":k`
|
|
1120
|
-
<header part="header" class="dialog__header">
|
|
1121
|
-
<h2 part="title" class="dialog__title" id="title">
|
|
1122
|
-
<slot name="label"> ${this.label.length>0?this.label:String.fromCharCode(65279)} </slot>
|
|
1123
|
-
</h2>
|
|
1124
|
-
<div part="header-actions" class="dialog__header-actions">
|
|
1125
|
-
<slot name="header-actions"></slot>
|
|
1126
|
-
<sl-icon-button
|
|
1127
|
-
part="close-button"
|
|
1128
|
-
exportparts="base:close-button__base"
|
|
1129
|
-
class="dialog__close"
|
|
1130
|
-
name="x-lg"
|
|
1131
|
-
label=${this.localize.term("close")}
|
|
1132
|
-
library="system"
|
|
1133
|
-
@click="${()=>this.requestClose("close-button")}"
|
|
1134
|
-
></sl-icon-button>
|
|
1135
|
-
</div>
|
|
1136
|
-
</header>
|
|
1137
|
-
`}
|
|
1138
|
-
${""}
|
|
1139
|
-
<slot part="body" class="dialog__body" tabindex="-1"></slot>
|
|
1140
|
-
|
|
1141
|
-
<footer part="footer" class="dialog__footer">
|
|
1142
|
-
<slot name="footer"></slot>
|
|
1143
|
-
</footer>
|
|
1144
|
-
</div>
|
|
1145
|
-
</div>
|
|
1146
|
-
`}};f.styles=re,f.dependencies={"sl-icon-button":h},i([C(".dialog")],f.prototype,"dialog",2),i([C(".dialog__panel")],f.prototype,"panel",2),i([C(".dialog__overlay")],f.prototype,"overlay",2),i([n({type:Boolean,reflect:!0})],f.prototype,"open",2),i([n({reflect:!0})],f.prototype,"label",2),i([n({attribute:"no-header",type:Boolean,reflect:!0})],f.prototype,"noHeader",2),i([N("open",{waitUntilFirstUpdate:!0})],f.prototype,"handleOpenChange",1),z("dialog.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),z("dialog.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}}),z("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}}),z("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}}),z("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}}),f.define("sl-dialog"),b.define("sl-icon"),h.define("sl-icon-button");export{Rt as r,W as s,jt as v};
|
|
1147
|
-
//# sourceMappingURL=vendor-h5FNKy-G.esm.js.map
|