mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
1 line
4.5 KiB
JavaScript
1 line
4.5 KiB
JavaScript
import{S as a,i,s as l,D as r,q as e,Y as t,o as c,B as o,w as s,C as d,L as n,k as v,l as h,N as b,y as x,g,h as f,j as m,n as u,p as y,x as p,r as E,M as _,A as w}from"./index.c2c9d961.js";function B(a){let i,l,r,t,o,d,B,L,k,O=a[0]&&$(a),A=[{"aria-atomic":"true"},{"aria-labelledby":a[4]},{"aria-live":k=a[1]?"assertive":"off"},a[6]],D={};for(let a=0;a<A.length;a+=1)D=s(D,A[a]);return{c(){i=g("div"),l=g("label"),r=f(a[3]),t=m(),o=n("svg"),d=n("title"),B=f(a[3]),O&&O.c(),L=n("circle"),this.h()},l(e){i=v(e,"DIV",{"aria-atomic":!0,"aria-labelledby":!0,"aria-live":!0});var s=h(i);l=v(s,"LABEL",{id:!0});var n=h(l);r=u(n,a[3]),n.forEach(c),t=y(s),o=v(s,"svg",{viewBox:!0},1);var b=h(o);d=v(b,"title",{},1);var x=h(d);B=u(x,a[3]),x.forEach(c),O&&O.l(b),L=v(b,"circle",{cx:!0,cy:!0,r:!0},1),h(L).forEach(c),b.forEach(c),s.forEach(c),this.h()},h(){b(l,"id",a[4]),x(l,"bx--visually-hidden",!0),b(L,"cx","0"),b(L,"cy","0"),b(L,"r",a[5]),x(L,"bx--loading__stroke",!0),b(o,"viewBox","-75 -75 150 150"),x(o,"bx--loading__svg",!0),p(i,D),x(i,"bx--loading",!0),x(i,"bx--loading--small",a[0]),x(i,"bx--loading--stop",!a[1])},m(a,c){e(a,i,c),E(i,l),E(l,r),E(i,t),E(i,o),E(o,d),E(d,B),O&&O.m(o,null),E(o,L)},p(a,e){8&e&&_(r,a[3]),16&e&&b(l,"id",a[4]),8&e&&_(B,a[3]),a[0]?O?O.p(a,e):(O=$(a),O.c(),O.m(o,L)):O&&(O.d(1),O=null),32&e&&b(L,"r",a[5]),p(i,D=w(A,[{"aria-atomic":"true"},16&e&&{"aria-labelledby":a[4]},2&e&&k!==(k=a[1]?"assertive":"off")&&{"aria-live":k},64&e&&a[6]])),x(i,"bx--loading",!0),x(i,"bx--loading--small",a[0]),x(i,"bx--loading--stop",!a[1])},d(a){a&&c(i),O&&O.d()}}}function L(a){let i,l,r,t,o,d,B,L,$,O,A=a[0]&&k(a),D=[a[6]],I={};for(let a=0;a<D.length;a+=1)I=s(I,D[a]);return{c(){i=g("div"),l=g("div"),r=g("label"),t=f(a[3]),o=m(),d=n("svg"),B=n("title"),L=f(a[3]),A&&A.c(),$=n("circle"),this.h()},l(e){i=v(e,"DIV",{});var s=h(i);l=v(s,"DIV",{"aria-atomic":!0,"aria-labelledby":!0,"aria-live":!0});var n=h(l);r=v(n,"LABEL",{id:!0});var b=h(r);t=u(b,a[3]),b.forEach(c),o=y(n),d=v(n,"svg",{viewBox:!0},1);var x=h(d);B=v(x,"title",{},1);var g=h(B);L=u(g,a[3]),g.forEach(c),A&&A.l(x),$=v(x,"circle",{cx:!0,cy:!0,r:!0},1),h($).forEach(c),x.forEach(c),n.forEach(c),s.forEach(c),this.h()},h(){b(r,"id",a[4]),x(r,"bx--visually-hidden",!0),b($,"cx","0"),b($,"cy","0"),b($,"r",a[5]),x($,"bx--loading__stroke",!0),b(d,"viewBox","-75 -75 150 150"),x(d,"bx--loading__svg",!0),b(l,"aria-atomic","true"),b(l,"aria-labelledby",a[4]),b(l,"aria-live",O=a[1]?"assertive":"off"),x(l,"bx--loading",!0),x(l,"bx--loading--small",a[0]),x(l,"bx--loading--stop",!a[1]),p(i,I),x(i,"bx--loading-overlay",!0),x(i,"bx--loading-overlay--stop",!a[1])},m(a,c){e(a,i,c),E(i,l),E(l,r),E(r,t),E(l,o),E(l,d),E(d,B),E(B,L),A&&A.m(d,null),E(d,$)},p(a,e){8&e&&_(t,a[3]),16&e&&b(r,"id",a[4]),8&e&&_(L,a[3]),a[0]?A?A.p(a,e):(A=k(a),A.c(),A.m(d,$)):A&&(A.d(1),A=null),32&e&&b($,"r",a[5]),16&e&&b(l,"aria-labelledby",a[4]),2&e&&O!==(O=a[1]?"assertive":"off")&&b(l,"aria-live",O),1&e&&x(l,"bx--loading--small",a[0]),2&e&&x(l,"bx--loading--stop",!a[1]),p(i,I=w(D,[64&e&&a[6]])),x(i,"bx--loading-overlay",!0),x(i,"bx--loading-overlay--stop",!a[1])},d(a){a&&c(i),A&&A.d()}}}function $(a){let i;return{c(){i=n("circle"),this.h()},l(a){i=v(a,"circle",{cx:!0,cy:!0,r:!0},1),h(i).forEach(c),this.h()},h(){b(i,"cx","0"),b(i,"cy","0"),b(i,"r",a[5]),x(i,"bx--loading__background",!0)},m(a,l){e(a,i,l)},p(a,l){32&l&&b(i,"r",a[5])},d(a){a&&c(i)}}}function k(a){let i;return{c(){i=n("circle"),this.h()},l(a){i=v(a,"circle",{cx:!0,cy:!0,r:!0},1),h(i).forEach(c),this.h()},h(){b(i,"cx","0"),b(i,"cy","0"),b(i,"r",a[5]),x(i,"bx--loading__background",!0)},m(a,l){e(a,i,l)},p(a,l){32&l&&b(i,"r",a[5])},d(a){a&&c(i)}}}function O(a){let i;function l(a,i){return a[2]?L:B}let o=l(a),s=o(a);return{c(){s.c(),i=r()},l(a){s.l(a),i=r()},m(a,l){s.m(a,l),e(a,i,l)},p(a,[r]){o===(o=l(a))&&s?s.p(a,r):(s.d(1),s=o(a),s&&(s.c(),s.m(i.parentNode,i)))},i:t,o:t,d(a){s.d(a),a&&c(i)}}}function A(a,i,l){const r=["small","active","withOverlay","description","id"];let e,t=o(i,r),{small:c=!1}=i,{active:n=!0}=i,{withOverlay:v=!0}=i,{description:h="Active loading indicator"}=i,{id:b="ccs-"+Math.random().toString(36)}=i;return a.$$set=a=>{i=s(s({},i),d(a)),l(6,t=o(i,r)),"small"in a&&l(0,c=a.small),"active"in a&&l(1,n=a.active),"withOverlay"in a&&l(2,v=a.withOverlay),"description"in a&&l(3,h=a.description),"id"in a&&l(4,b=a.id)},a.$$.update=()=>{1&a.$$.dirty&&l(5,e=c?"26.8125":"37.5")},[c,n,v,h,b,e,t]}class D extends a{constructor(a){super(),i(this,a,A,O,l,{small:0,active:1,withOverlay:2,description:3,id:4})}}export{D as L};
|