diff --git a/CHANGELOG.md b/CHANGELOG.md
index ee3b8312..fb1e734f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,11 @@ Changelog
+## v9.4.18 *(2024-05-01)*
+- Fix icon alignment in `Menu`.
+- Fix tests to work with the latest version of svelte testing library.
+
+
## v9.4.17 *(2024-04-14)*
- InputDate event handling race-condition fix (when enter was pressed).
diff --git a/README.md b/README.md
index aa1ce572..449b71ca 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,12 @@
PerfectThings/UI
-==============================
+================
A set of simple, but perfect, UI components, written in Svelte (the only front-end framework worth learning).
+
+[![Tests](https://github.com/perfect-things/ui/actions/workflows/node.js.yml/badge.svg)](https://github.com/perfect-things/ui/actions/workflows/node.js.yml)
+
### Github pages site with docs
https://ui.perfectthings.dev
@@ -86,4 +89,4 @@ A browser window should open with the demo of the components.
## Support
-
+
diff --git a/docs-src/pages/changelog.svelte b/docs-src/pages/changelog.svelte
index b584d990..3f3f7284 100644
--- a/docs-src/pages/changelog.svelte
+++ b/docs-src/pages/changelog.svelte
@@ -1,4 +1,9 @@
Changelog
+
v9.4.18 (2024-05-01)
+
+
Fix icon alignment in Menu.
+
Fix tests to work with the latest version of svelte testing library.
+
v9.4.17 (2024-04-14)
InputDate event handling race-condition fix (when enter was pressed).
npm i -D @perfectthings/ui
@@ -58,11 +58,11 @@ var K0=Object.create;var Gm=Object.defineProperty;var X0=Object.getOwnPropertyDe
cd perfectthings-ui
npm i && npm start
A browser window should open with the demo of the components.
Fix InputRating - it would select value on mouse-down. This - where an error message was displayed above the input - would cause the error message to be removed, and input to slide up, which would unselect the value (while mouse was down), and cause the error message to reappear.
New: added Utils page in the docs with APIs to the utility functions exposed by the library.
Tooltip was simplified and now the positioning ensures that the tooltip is always visible on the screen.
Popover will now update its position when the window is resized.
The tip of the Tooltip and Popover will now try to be centered on the target element (if the box was offset from the screen edge).
Improved keyboard focus for notifications: when a notification is dismissed from the keyboard (Escape) the focus will be moved to the next available notification.
Improved & standardised z-index throughout the components.
Tweaked Menu positioning to update on window resize.
Tweaked MenuItem for responsiveness (e.g. add ellipsis if the text is too long).
The events property was dropped from the Tooltip, leaving hover and focus events as the default. For use cases when the click was needed, Popover should be used instead.
z-index value of the Popover and Tooltip has been reduced from 9999 to 99, so that it's closer to the content it describes. Ideally tooltips should slide under some other floating elements of the UI (like toolbars or drawers), while remaining above the content layer. This can be o overriden in the app's own css if needed.
New:Popover component. If a Dialog and Tooltip had a child - this would be it. It's a container that can be opened like a dialog, but will be attached to the target element (like a tooltip). It's a great way to display additional information or actions for a specific element on the page. It can contain other components (e.g. buttons) and can serve as a free-form menu.
Fix popover above the target styling.
Simplify & refactor Tooltip to share more code with Popover. Styling and core functionality is now almost the same, while the UX and usage remains a bit different.
Improve InputRadio styling to look more like the rest of the inputs (e.g. checkbox).
Standardise font sizes into css variables: --ui-font-xs=14px, --ui-font-s=15px, --ui-font-m=16px, --ui-font-l=17px, --ui-font-xl=22px
Correct the symbol for Return (\u23CE) in Menu.
Menu can now be centered with the target button (using align attribute).
Context Menu will now open above the long-pressed spot on mobile (by default).
Pressing the same letter key, with the Menu open will now cycle through the items starting with that letter.
Pressing space with the Menu open, while typing something quickly, will not trigger the click event on the currently selected item. This allows to type-to-highlight elements that contain space in the text. Pressing space standalone (while not typing), will trigger the click event.
Removed --ui-margin-xl and --ui-margin-xxl as they were not used.
Merged --ui-border-radius-s with --ui-border-radius and changed to a rem value that calculates to the whole pixel (so that browsers would render it better).
Fixed the NotificationCenter issue, where toasts would not close if navigated away from the page that initialises the component.
Tweaked dialog border-radius to render a bit better (for dialog's header and footer).
Aligned components heights (Menu, Combobox, and InputRadio items).
Fixed Menu's longpress event to not triger when moving the finger (touchmove should stop longpress).
Improve navigation swipe event (swiping can now be triggered by any element that is not scrollable and has no scrollable ancestors).
Increased Menu font size slightly, while decreasing it for everything (102% -> 100% on body).
data attribute in Combobox is deprecated. It will be removed in the next major version. Use items instead.
Combobox and Menu now use the same align function (for consistency and performance) and there's no need to add elevate attribute to either of them, as both popups are rendered inside the body element and are only added to the DOM, when they are opened (to avoid polluting the DOM with unnecessary elements).
New icons:sun and moon for the dark-theme switchers.
Improvement:info, error and label attributes are now supported on other inputs (Combobox, InputDate, Select, ButtonToggle, and Toggle).
Improvement: all components now expose element and inputElement (if there is one (and only one)). The exceptions are NotificationCenter and MessageBox, due to their implementation.
",lu=d(),Cs=p("p"),Cs.innerHTML="Other (not mentioned above) color variations, (i.e. -light- and -dark-) have been removed.",ru=d(),au=p("hr"),uu=d(),Ss=p("h2"),Ss.innerHTML="v7.1.2 (2023-07-05)",fu=d(),Ls=p("ul"),Ls.innerHTML="
Fix Checkbox label (don't render empty label if no label attribute was passed).
New:MessageBox component for displaying quick info/warning/error messages or confirmation dialogs (replacement for browser's native alert and confirm).
Breaking change: renamed props for all components: className -> class (as it turns out it is possible to use class as a prop name in svelte)
Almost all components now have a class prop, which can be used to add custom classes to the component
Updated docs to reflect the above changes
Docs API table is now alphabetically sorted
Components don't use $$props anymore, as it was causing issues with the class prop. Instead, the props are now explicitly passed down to the component. This is a good thing to do, as it makes the components more explicit and easier to understand.
UX change: autocomplete will not close on scroll or resize events from now on (it can be changed using new properties hideOnScroll and hideOnResize).
fixed: autocomplete issue, where clicking on a filtered list would not select.
tweak: autocomplete will now show "create new item" always (when enabled), not only when the query did not match anything. Except when the query matches an item exactly.
breaking change: cssClass property available on some components has been renamed to className (to be more aligned with the standard workaround in other libs/frameworks).
some components (where possible) are now using $$props to pass-through the properties of the instance down to the component.
breaking change: dist folder has been renamed to docs, as this is the only allowed name for a GH pages folder so that the GH pages is published automatically (without writing a GH action specifically for this).
Fix InputRating - it would select value on mouse-down. This - where an error message was displayed above the input - would cause the error message to be removed, and input to slide up, which would unselect the value (while mouse was down), and cause the error message to reappear.
New: added Utils page in the docs with APIs to the utility functions exposed by the library.
Tooltip was simplified and now the positioning ensures that the tooltip is always visible on the screen.
Popover will now update its position when the window is resized.
The tip of the Tooltip and Popover will now try to be centered on the target element (if the box was offset from the screen edge).
Improved keyboard focus for notifications: when a notification is dismissed from the keyboard (Escape) the focus will be moved to the next available notification.
Improved & standardised z-index throughout the components.
Tweaked Menu positioning to update on window resize.
Tweaked MenuItem for responsiveness (e.g. add ellipsis if the text is too long).
The events property was dropped from the Tooltip, leaving hover and focus events as the default. For use cases when the click was needed, Popover should be used instead.
z-index value of the Popover and Tooltip has been reduced from 9999 to 99, so that it's closer to the content it describes. Ideally tooltips should slide under some other floating elements of the UI (like toolbars or drawers), while remaining above the content layer. This can be o overriden in the app's own css if needed.
New:Popover component. If a Dialog and Tooltip had a child - this would be it. It's a container that can be opened like a dialog, but will be attached to the target element (like a tooltip). It's a great way to display additional information or actions for a specific element on the page. It can contain other components (e.g. buttons) and can serve as a free-form menu.
Fix popover above the target styling.
Simplify & refactor Tooltip to share more code with Popover. Styling and core functionality is now almost the same, while the UX and usage remains a bit different.
Improve InputRadio styling to look more like the rest of the inputs (e.g. checkbox).
Standardise font sizes into css variables: --ui-font-xs=14px, --ui-font-s=15px, --ui-font-m=16px, --ui-font-l=17px, --ui-font-xl=22px
Correct the symbol for Return (\u23CE) in Menu.
Menu can now be centered with the target button (using align attribute).
Context Menu will now open above the long-pressed spot on mobile (by default).
Pressing the same letter key, with the Menu open will now cycle through the items starting with that letter.
Pressing space with the Menu open, while typing something quickly, will not trigger the click event on the currently selected item. This allows to type-to-highlight elements that contain space in the text. Pressing space standalone (while not typing), will trigger the click event.
Removed --ui-margin-xl and --ui-margin-xxl as they were not used.
Merged --ui-border-radius-s with --ui-border-radius and changed to a rem value that calculates to the whole pixel (so that browsers would render it better).
Fixed the NotificationCenter issue, where toasts would not close if navigated away from the page that initialises the component.
Tweaked dialog border-radius to render a bit better (for dialog's header and footer).
Aligned components heights (Menu, Combobox, and InputRadio items).
Fixed Menu's longpress event to not triger when moving the finger (touchmove should stop longpress).
Improve navigation swipe event (swiping can now be triggered by any element that is not scrollable and has no scrollable ancestors).
Increased Menu font size slightly, while decreasing it for everything (102% -> 100% on body).
data attribute in Combobox is deprecated. It will be removed in the next major version. Use items instead.
Combobox and Menu now use the same align function (for consistency and performance) and there's no need to add elevate attribute to either of them, as both popups are rendered inside the body element and are only added to the DOM, when they are opened (to avoid polluting the DOM with unnecessary elements).
New icons:sun and moon for the dark-theme switchers.
Improvement:info, error and label attributes are now supported on other inputs (Combobox, InputDate, Select, ButtonToggle, and Toggle).
Improvement: all components now expose element and inputElement (if there is one (and only one)). The exceptions are NotificationCenter and MessageBox, due to their implementation.
",fu=d(),Ls=p("p"),Ls.innerHTML="Other (not mentioned above) color variations, (i.e. -light- and -dark-) have been removed.",mu=d(),du=p("hr"),cu=d(),Ds=p("h2"),Ds.innerHTML="v7.1.2 (2023-07-05)",pu=d(),As=p("ul"),As.innerHTML="
Fix Checkbox label (don't render empty label if no label attribute was passed).
New:MessageBox component for displaying quick info/warning/error messages or confirmation dialogs (replacement for browser's native alert and confirm).
Breaking change: renamed props for all components: className -> class (as it turns out it is possible to use class as a prop name in svelte)
Almost all components now have a class prop, which can be used to add custom classes to the component
Updated docs to reflect the above changes
Docs API table is now alphabetically sorted
Components don't use $$props anymore, as it was causing issues with the class prop. Instead, the props are now explicitly passed down to the component. This is a good thing to do, as it makes the components more explicit and easier to understand.
UX change: autocomplete will not close on scroll or resize events from now on (it can be changed using new properties hideOnScroll and hideOnResize).
fixed: autocomplete issue, where clicking on a filtered list would not select.
tweak: autocomplete will now show "create new item" always (when enabled), not only when the query did not match anything. Except when the query matches an item exactly.
breaking change: cssClass property available on some components has been renamed to className (to be more aligned with the standard workaround in other libs/frameworks).
some components (where possible) are now using $$props to pass-through the properties of the instance down to the component.
breaking change: dist folder has been renamed to docs, as this is the only allowed name for a GH pages folder so that the GH pages is published automatically (without writing a GH action specifically for this).
",n=d(),i=p("tbody");for(let u=0;u`${i}`);return e.push(n.join(" | ")),typeof t.required<"u"&&e.push("required"),typeof t.default<"u"&&e.push(` (defaults to ${t.default})`),e.join(" ")}function Bw(t,e,n){let{title:i="API"}=e,{description:l=""}=e,{props:r=[{name:"id",type:"string",defalut:"",required:!0,description:"assign ID to the underlying component"}]}=e;return t.$$set=u=>{"title"in u&&n(0,i=u.title),"description"in u&&n(1,l=u.description),"props"in u&&n(2,r=u.props)},[i,l,r]}var Ep=class extends ae{constructor(e){super(),fe(this,e,Bw,qw,ue,{title:0,description:1,props:2})}},Fe=Ep;function F_(t){let e,n,i=t[2]===void 0&&q_(t);return{c(){i&&i.c(),e=d(),n=p("h3"),n.textContent="Example"},m(l,r){i&&i.m(l,r),s(l,e,r),s(l,n,r)},p(l,r){l[2]===void 0?i||(i=q_(l),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null)},d(l){l&&(o(e),o(n)),i&&i.d(l)}}}function q_(t){let e;return{c(){e=p("hr")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function Rw(t){let e,n,i,l,r,u=B_(t[0])+"",a,m=!t[1]&&F_(t);return{c(){m&&m.c(),e=d(),n=p("pre"),i=p("code"),l=ie(`
`),r=new Ci(!1),a=ie(`
-`),r.a=a,x(i,"class","language-svelte")},m(f,c){m&&m.m(f,c),s(f,e,c),s(f,n,c),q(n,i),q(i,l),r.m(u,i),q(i,a)},p(f,[c]){f[1]?m&&(m.d(1),m=null):m?m.p(f,c):(m=x_(f),m.c(),m.m(e.parentNode,e)),c&1&&u!==(u=P_(f[0])+"")&&r.p(u)},i:Le,o:Le,d(f){f&&(o(e),o(n)),m&&m.d(f)}}}function P_(t){return t.replace(/{/gim,"{").replace(/}/gim,"}").replace(//gim,">").replace(/\t/gim," ").trim()}function Fw(t,e,n){let{html:i=""}=e,{notitle:l=!1}=e,{nohr:r=void 0}=e;return t.$$set=u=>{"html"in u&&n(0,i=u.html),"notitle"in u&&n(1,l=u.notitle),"nohr"in u&&n(2,r=u.nohr)},[i,l,r]}var kp=class extends ae{constructor(e){super(),fe(this,e,Fw,Nw,ue,{html:0,notitle:1,nohr:2})}},ze=kp;function qw(t){let e,n;return{c(){e=p("pre"),n=p("code"),x(n,"class","language-")},m(i,l){s(i,e,l),q(e,n),n.innerHTML=t[0]},p(i,[l]){l&1&&(n.innerHTML=i[0])},i:Le,o:Le,d(i){i&&o(e)}}}function Bw(t,e,n){let{tag:i="div"}=e,{props:l={}}=e,{text:r=""}=e,u="";Sn(()=>{requestAnimationFrame(a)});function a(){n(0,u=window.Prism.highlight(m(),window.Prism.languages.svelte,"svelte"))}function m(){let f={};for(let b in l)l[b]!==!1&&l[b]!==""&&(f[b]=l[b]);let c=JSON.stringify(f).replace(/"([^"]+)":/g,"$1:").replace(/(:)/g,"=").replace(/,/g," ").replace(/({|}|=true|default)/g,"").trim();return c&&(c=" "+c),r?`<${i}${c}>${r}${i}>`:`<${i}${c}/>`}return t.$$set=f=>{"tag"in f&&n(1,i=f.tag),"props"in f&&n(2,l=f.props),"text"in f&&n(3,r=f.text)},[u,i,l,r]}var Tp=class extends ae{constructor(e){super(),fe(this,e,Bw,qw,ue,{tag:1,props:2,text:3})}},Mp=Tp;function Rw(t){let e,n;return{c(){e=p("pre"),n=p("code"),x(n,"class","language-json")},m(i,l){s(i,e,l),q(e,n),n.innerHTML=t[0]},p(i,[l]){l&1&&(n.innerHTML=i[0])},i:Le,o:Le,d(i){i&&o(e)}}}function jw(t){if(!t)return"";let e=JSON.stringify(t);return e=e.replace(/([:,])/g,"$1 "),e.match(/^{/)?e=e.replace(/{/g,"{ "):(e.match(/}/)&&(e=e.replace(/\]/g,`
+`),r.a=a,x(i,"class","language-svelte")},m(f,c){m&&m.m(f,c),s(f,e,c),s(f,n,c),q(n,i),q(i,l),r.m(u,i),q(i,a)},p(f,[c]){f[1]?m&&(m.d(1),m=null):m?m.p(f,c):(m=F_(f),m.c(),m.m(e.parentNode,e)),c&1&&u!==(u=B_(f[0])+"")&&r.p(u)},i:Le,o:Le,d(f){f&&(o(e),o(n)),m&&m.d(f)}}}function B_(t){return t.replace(/{/gim,"{").replace(/}/gim,"}").replace(//gim,">").replace(/\t/gim," ").trim()}function jw(t,e,n){let{html:i=""}=e,{notitle:l=!1}=e,{nohr:r=void 0}=e;return t.$$set=u=>{"html"in u&&n(0,i=u.html),"notitle"in u&&n(1,l=u.notitle),"nohr"in u&&n(2,r=u.nohr)},[i,l,r]}var Cp=class extends ae{constructor(e){super(),fe(this,e,jw,Rw,ue,{html:0,notitle:1,nohr:2})}},ze=Cp;function zw(t){let e,n;return{c(){e=p("pre"),n=p("code"),x(n,"class","language-")},m(i,l){s(i,e,l),q(e,n),n.innerHTML=t[0]},p(i,[l]){l&1&&(n.innerHTML=i[0])},i:Le,o:Le,d(i){i&&o(e)}}}function Ww(t,e,n){let{tag:i="div"}=e,{props:l={}}=e,{text:r=""}=e,u="";Cn(()=>{requestAnimationFrame(a)});function a(){n(0,u=window.Prism.highlight(m(),window.Prism.languages.svelte,"svelte"))}function m(){let f={};for(let b in l)l[b]!==!1&&l[b]!==""&&(f[b]=l[b]);let c=JSON.stringify(f).replace(/"([^"]+)":/g,"$1:").replace(/(:)/g,"=").replace(/,/g," ").replace(/({|}|=true|default)/g,"").trim();return c&&(c=" "+c),r?`<${i}${c}>${r}${i}>`:`<${i}${c}/>`}return t.$$set=f=>{"tag"in f&&n(1,i=f.tag),"props"in f&&n(2,l=f.props),"text"in f&&n(3,r=f.text)},[u,i,l,r]}var Sp=class extends ae{constructor(e){super(),fe(this,e,Ww,zw,ue,{tag:1,props:2,text:3})}},Lp=Sp;function Vw(t){let e,n;return{c(){e=p("pre"),n=p("code"),x(n,"class","language-json")},m(i,l){s(i,e,l),q(e,n),n.innerHTML=t[0]},p(i,[l]){l&1&&(n.innerHTML=i[0])},i:Le,o:Le,d(i){i&&o(e)}}}function Uw(t){if(!t)return"";let e=JSON.stringify(t);return e=e.replace(/([:,])/g,"$1 "),e.match(/^{/)?e=e.replace(/{/g,"{ "):(e.match(/}/)&&(e=e.replace(/\]/g,`
]`)),e=e.replace(/{/g,`
- { `)),e=e.replace(/}/g," }"),e}function zw(t,e,n){let{value:i=""}=e,l="";Sn(()=>{requestAnimationFrame(r)});function r(){typeof i!="string"&&n(1,i=jw(i)),n(0,l=window.Prism.highlight(i,window.Prism.languages.json,"json"))}return t.$$set=u=>{"value"in u&&n(1,i=u.value)},[l,i]}var Ep=class extends ae{constructor(e){super(),fe(this,e,zw,Rw,ue,{value:1})}},mo=Ep;function Ww(t){let e,n,i=[t[0]],l={};for(let r=0;rGe(v,"value",se)),_=new Qt({props:{label:"Style",items:t[3],value:""}}),_.$on("change",t[6]),O=new Qt({props:{label:"Type",items:t[4],value:""}}),O.$on("change",t[7]),L=new Qt({props:{label:"Icon",items:t[5],value:""}}),L.$on("change",t[8]);function G(Z){t[10](Z)}let J={label:"Round"};t[0].round!==void 0&&(J.value=t[0].round),A=new pn({props:J}),be.push(()=>Ge(A,"value",G));function he(Z){t[11](Z)}let Se={label:"Disabled"};return t[0].disabled!==void 0&&(Se.value=t[0].disabled),P=new pn({props:Se}),be.push(()=>Ge(P,"value",he)),j=new Fe({props:{props:t[2]}}),{c(){e=p("h2"),e.textContent="Button",n=d(),i=p("h3"),i.textContent="Live demo",l=d(),r=p("div"),a.c(),m=d(),S(f.$$.fragment),c=d(),b=p("hr"),g=d(),h=p("div"),S(v.$$.fragment),k=d(),S(_.$$.fragment),M=d(),S(O.$$.fragment),D=d(),S(L.$$.fragment),T=d(),S(A.$$.fragment),I=d(),S(P.$$.fragment),W=d(),U=p("hr"),V=d(),S(j.$$.fragment),x(r,"class","docs-buttons-row"),Yt(r,"height","3rem"),x(h,"class","button-demo-props")},m(Z,Y){s(Z,e,Y),s(Z,n,Y),s(Z,i,Y),s(Z,l,Y),s(Z,r,Y),z[u].m(r,null),s(Z,m,Y),E(f,Z,Y),s(Z,c,Y),s(Z,b,Y),s(Z,g,Y),s(Z,h,Y),E(v,h,null),q(h,k),E(_,h,null),q(h,M),E(O,h,null),q(h,D),E(L,h,null),q(h,T),E(A,h,null),q(h,I),E(P,h,null),s(Z,W,Y),s(Z,U,Y),s(Z,V,Y),E(j,Z,Y),F=!0},p(Z,[Y]){let Q=u;u=X(Z,Y),u===Q?z[u].p(Z,Y):(We(),y(z[Q],1,1,()=>{z[Q]=null}),Ve(),a=z[u],a?a.p(Z,Y):(a=z[u]=K[u](Z),a.c()),$(a,1),a.m(r,null));let ne={};Y&2&&(ne.text=Z[1]),Y&1&&(ne.props=Z[0]),f.$set(ne);let pe={};!w&&Y&2&&(w=!0,pe.value=Z[1],Ye(()=>w=!1)),v.$set(pe);let _e={};!H&&Y&1&&(H=!0,_e.value=Z[0].round,Ye(()=>H=!1)),A.$set(_e);let me={};!N&&Y&1&&(N=!0,me.value=Z[0].disabled,Ye(()=>N=!1)),P.$set(me)},i(Z){F||($(a),$(f.$$.fragment,Z),$(v.$$.fragment,Z),$(_.$$.fragment,Z),$(O.$$.fragment,Z),$(L.$$.fragment,Z),$(A.$$.fragment,Z),$(P.$$.fragment,Z),$(j.$$.fragment,Z),F=!0)},o(Z){y(a),y(f.$$.fragment,Z),y(v.$$.fragment,Z),y(_.$$.fragment,Z),y(O.$$.fragment,Z),y(L.$$.fragment,Z),y(A.$$.fragment,Z),y(P.$$.fragment,Z),y(j.$$.fragment,Z),F=!1},d(Z){Z&&(o(e),o(n),o(i),o(l),o(r),o(m),o(c),o(b),o(g),o(h),o(W),o(U),o(V)),z[u].d(),C(f,Z),C(v),C(_),C(O),C(L),C(A),C(P),C(j,Z)}}}function Gw(t,e,n){let i=[{name:"class",type:"string",description:"Additional css class name to be added to the component."},{name:"danger",description:"Button type: danger"},{name:"data-",description:"Dataset attribute allows to pass some data of a primitive type (string, number, boolean), which will be accessible in the on:click event listener, via button reference."},{name:"disabled",description:"Makes the button disabled"},{name:"icon",type:"string",description:'Adds an icon, with this name, to the button (see icons section for icon names)'},{name:"id",type:"string",description:"Assign ID to the underlying button"},{name:"info",description:"Button type: info"},{name:"link",description:"Button style: link"},{name:"outline",description:"Button style: outline"},{name:"round",description:"Makes the button round"},{name:"submit",type:["true","false"],default:"false",description:"If true button type is set to submit, otherwise it's button"},{name:"success",description:"Button type: success"},{name:"text",description:"Button style: text"},{name:"title",type:"string",description:"Assign title to the underlying button"},{name:"warning",description:"Button type: warning"},{name:"bind:element",type:"element",description:"Exposes the HTML element of the component."},{name:"on:click",type:"function",description:"Triggered when the button is clicked."}],l={},r="Demo button",u=[{name:"Normal",value:""},{name:"Outline",value:"outline"},{name:"Text",value:"text"},{name:"Link",value:"link"}],a=[{name:"Default",value:""},{name:"Info",value:"info"},{name:"Success",value:"success"},{name:"Warning",value:"warning"},{name:"Danger",value:"danger"}],m=[{name:"none",value:""},{name:"info",value:"info"},{name:"check",value:"check"},{name:"alert",value:"alert"},{name:"trash",value:"trash"}];function f(k){n(0,l.outline=!1,l),n(0,l.text=!1,l),n(0,l.link=!1,l),g(k.detail,!0)}function c(k){n(0,l.info=!1,l),n(0,l.success=!1,l),n(0,l.warning=!1,l),n(0,l.danger=!1,l),g(k.detail,!0)}function b(k){g("icon",k.detail)}function g(k,_){!k||typeof _>"u"||n(0,l[k]=_,l)}function h(k){r=k,n(1,r)}function v(k){t.$$.not_equal(l.round,k)&&(l.round=k,n(0,l))}function w(k){t.$$.not_equal(l.disabled,k)&&(l.disabled=k,n(0,l))}return[l,r,i,u,a,m,f,c,b,h,v,w]}var Cp=class extends ae{constructor(e){super(),fe(this,e,Gw,Yw,ue,{})}},Sp=Cp;function Kw(t){let e;return{c(){e=ie("Hello")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function Xw(t){let e;return{c(){e=ie("Info")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function Zw(t){let e;return{c(){e=ie("Warning")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function Jw(t){let e;return{c(){e=ie("Warning")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function Qw(t){let e;return{c(){e=ie("Danger")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function e3(t){let e;return{c(){e=ie("Hello")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function t3(t){let e;return{c(){e=ie("Info")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function n3(t){let e;return{c(){e=ie("Warning")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function i3(t){let e;return{c(){e=ie("Warning")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function o3(t){let e;return{c(){e=ie("Danger")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function s3(t){let e;return{c(){e=ie("Hello")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function l3(t){let e;return{c(){e=ie("Info")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function r3(t){let e;return{c(){e=ie("Success")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function a3(t){let e;return{c(){e=ie("Warning")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function u3(t){let e;return{c(){e=ie("Danger")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function f3(t){let e;return{c(){e=ie("Help")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function m3(t){let e;return{c(){e=ie("Info")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function d3(t){let e;return{c(){e=ie("Success")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function c3(t){let e;return{c(){e=ie("Warning")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function p3(t){let e;return{c(){e=ie("Delete")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function h3(t){let e;return{c(){e=ie("Hello")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function g3(t){let e;return{c(){e=ie("Info")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function b3(t){let e;return{c(){e=ie("Warning")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function _3(t){let e;return{c(){e=ie("Warning")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function v3(t){let e;return{c(){e=ie("Danger")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function $3(t){let e,n,i,l,r,u,a,m,f,c,b,g,h,v,w,k,_,M,O,D,L,T,A,H,I,P,N,W,U,V,j,F,K,z,X,se,ee,G,J,he,Se,Z,Y,Q,ne,pe,_e,me,le,Pe,Me,ce,ge,Ie,re,ve,we,de,Oe,Ze,nt,it,lt,Ee,Ne,dt,ht,at,wt,Et,yt,gt,Wt,mt,Vt,st,xt,Te,qe,Ae,Be,ot,Nt,Gt,Ft,qt,Xt,Bt,Jt,ke,He,Ut,Ht,tn,In,mn,On,Ce,Je,nn,xn,ln,_n,rn,vn,an,gn;return m=new ft({props:{$$slots:{default:[Kw]},$$scope:{ctx:t}}}),c=new ft({props:{info:!0,$$slots:{default:[Xw]},$$scope:{ctx:t}}}),g=new ft({props:{success:!0,$$slots:{default:[Zw]},$$scope:{ctx:t}}}),v=new ft({props:{warning:!0,$$slots:{default:[Jw]},$$scope:{ctx:t}}}),k=new ft({props:{danger:!0,$$slots:{default:[Qw]},$$scope:{ctx:t}}}),L=new ft({props:{pressed:!0,$$slots:{default:[e3]},$$scope:{ctx:t}}}),A=new ft({props:{pressed:!0,info:!0,$$slots:{default:[t3]},$$scope:{ctx:t}}}),I=new ft({props:{pressed:!0,success:!0,$$slots:{default:[n3]},$$scope:{ctx:t}}}),N=new ft({props:{pressed:!0,warning:!0,$$slots:{default:[i3]},$$scope:{ctx:t}}}),U=new ft({props:{pressed:!0,danger:!0,$$slots:{default:[o3]},$$scope:{ctx:t}}}),z=new ft({props:{pressed:!0,disabled:!0,$$slots:{default:[s3]},$$scope:{ctx:t}}}),se=new ft({props:{pressed:!0,disabled:!0,info:!0,$$slots:{default:[l3]},$$scope:{ctx:t}}}),G=new ft({props:{pressed:!0,disabled:!0,success:!0,$$slots:{default:[r3]},$$scope:{ctx:t}}}),he=new ft({props:{pressed:!0,disabled:!0,warning:!0,$$slots:{default:[a3]},$$scope:{ctx:t}}}),Z=new ft({props:{pressed:!0,disabled:!0,danger:!0,$$slots:{default:[u3]},$$scope:{ctx:t}}}),_e=new ft({props:{icon:"help",$$slots:{default:[f3]},$$scope:{ctx:t}}}),le=new ft({props:{icon:"info",info:!0,$$slots:{default:[m3]},$$scope:{ctx:t}}}),Me=new ft({props:{icon:"check",success:!0,$$slots:{default:[d3]},$$scope:{ctx:t}}}),ge=new ft({props:{icon:"alert",warning:!0,$$slots:{default:[c3]},$$scope:{ctx:t}}}),re=new ft({props:{icon:"trash",danger:!0,$$slots:{default:[p3]},$$scope:{ctx:t}}}),Ze=new ft({props:{outline:!0,$$slots:{default:[h3]},$$scope:{ctx:t}}}),it=new ft({props:{outline:!0,info:!0,$$slots:{default:[g3]},$$scope:{ctx:t}}}),Ee=new ft({props:{outline:!0,success:!0,$$slots:{default:[b3]},$$scope:{ctx:t}}}),dt=new ft({props:{outline:!0,warning:!0,$$slots:{default:[_3]},$$scope:{ctx:t}}}),at=new ft({props:{outline:!0,danger:!0,$$slots:{default:[v3]},$$scope:{ctx:t}}}),xt=new ft({props:{icon:"help"}}),qe=new ft({props:{icon:"info",info:!0}}),Be=new ft({props:{icon:"check",success:!0}}),Nt=new ft({props:{icon:"alert",warning:!0}}),Ft=new ft({props:{icon:"trash",danger:!0}}),tn=new ft({props:{round:!0,icon:"help"}}),mn=new ft({props:{round:!0,icon:"info",info:!0}}),Ce=new ft({props:{round:!0,icon:"check",success:!0}}),nn=new ft({props:{round:!0,icon:"alert",warning:!0}}),ln=new ft({props:{round:!0,icon:"trash",danger:!0}}),rn=new ze({props:{html:t[1]}}),an=new Fe({props:{props:t[0]}}),{c(){e=p("h2"),e.textContent="Push Button",n=d(),i=p("h3"),i.textContent="Normal",l=d(),r=p("h4"),r.textContent="Default",u=d(),a=p("div"),S(m.$$.fragment),f=d(),S(c.$$.fragment),b=d(),S(g.$$.fragment),h=d(),S(v.$$.fragment),w=d(),S(k.$$.fragment),_=d(),M=p("h4"),M.textContent="Pressed",O=d(),D=p("div"),S(L.$$.fragment),T=d(),S(A.$$.fragment),H=d(),S(I.$$.fragment),P=d(),S(N.$$.fragment),W=d(),S(U.$$.fragment),V=d(),j=p("h4"),j.textContent="Disabled",F=d(),K=p("div"),S(z.$$.fragment),X=d(),S(se.$$.fragment),ee=d(),S(G.$$.fragment),J=d(),S(he.$$.fragment),Se=d(),S(Z.$$.fragment),Y=d(),Q=p("h4"),Q.textContent="With icon",ne=d(),pe=p("div"),S(_e.$$.fragment),me=d(),S(le.$$.fragment),Pe=d(),S(Me.$$.fragment),ce=d(),S(ge.$$.fragment),Ie=d(),S(re.$$.fragment),ve=d(),we=p("h4"),we.textContent="Outline",de=d(),Oe=p("div"),S(Ze.$$.fragment),nt=d(),S(it.$$.fragment),lt=d(),S(Ee.$$.fragment),Ne=d(),S(dt.$$.fragment),ht=d(),S(at.$$.fragment),wt=d(),Et=p("hr"),yt=d(),gt=p("h3"),gt.textContent="Icon only buttons",Wt=d(),mt=p("h4"),mt.textContent="Default",Vt=d(),st=p("div"),S(xt.$$.fragment),Te=d(),S(qe.$$.fragment),Ae=d(),S(Be.$$.fragment),ot=d(),S(Nt.$$.fragment),Gt=d(),S(Ft.$$.fragment),qt=d(),Xt=p("hr"),Bt=d(),Jt=p("h3"),Jt.textContent="Icon only, and round",ke=d(),He=p("h4"),He.textContent="Default",Ut=d(),Ht=p("div"),S(tn.$$.fragment),In=d(),S(mn.$$.fragment),On=d(),S(Ce.$$.fragment),Je=d(),S(nn.$$.fragment),xn=d(),S(ln.$$.fragment),_n=d(),S(rn.$$.fragment),vn=d(),S(an.$$.fragment),x(a,"class","docs-buttons-row"),x(D,"class","docs-buttons-row"),x(K,"class","docs-buttons-row"),x(pe,"class","docs-buttons-row"),x(Oe,"class","docs-buttons-row"),x(st,"class","docs-buttons-row"),x(Ht,"class","docs-buttons-row")},m(ye,te){s(ye,e,te),s(ye,n,te),s(ye,i,te),s(ye,l,te),s(ye,r,te),s(ye,u,te),s(ye,a,te),E(m,a,null),q(a,f),E(c,a,null),q(a,b),E(g,a,null),q(a,h),E(v,a,null),q(a,w),E(k,a,null),s(ye,_,te),s(ye,M,te),s(ye,O,te),s(ye,D,te),E(L,D,null),q(D,T),E(A,D,null),q(D,H),E(I,D,null),q(D,P),E(N,D,null),q(D,W),E(U,D,null),s(ye,V,te),s(ye,j,te),s(ye,F,te),s(ye,K,te),E(z,K,null),q(K,X),E(se,K,null),q(K,ee),E(G,K,null),q(K,J),E(he,K,null),q(K,Se),E(Z,K,null),s(ye,Y,te),s(ye,Q,te),s(ye,ne,te),s(ye,pe,te),E(_e,pe,null),q(pe,me),E(le,pe,null),q(pe,Pe),E(Me,pe,null),q(pe,ce),E(ge,pe,null),q(pe,Ie),E(re,pe,null),s(ye,ve,te),s(ye,we,te),s(ye,de,te),s(ye,Oe,te),E(Ze,Oe,null),q(Oe,nt),E(it,Oe,null),q(Oe,lt),E(Ee,Oe,null),q(Oe,Ne),E(dt,Oe,null),q(Oe,ht),E(at,Oe,null),s(ye,wt,te),s(ye,Et,te),s(ye,yt,te),s(ye,gt,te),s(ye,Wt,te),s(ye,mt,te),s(ye,Vt,te),s(ye,st,te),E(xt,st,null),q(st,Te),E(qe,st,null),q(st,Ae),E(Be,st,null),q(st,ot),E(Nt,st,null),q(st,Gt),E(Ft,st,null),s(ye,qt,te),s(ye,Xt,te),s(ye,Bt,te),s(ye,Jt,te),s(ye,ke,te),s(ye,He,te),s(ye,Ut,te),s(ye,Ht,te),E(tn,Ht,null),q(Ht,In),E(mn,Ht,null),q(Ht,On),E(Ce,Ht,null),q(Ht,Je),E(nn,Ht,null),q(Ht,xn),E(ln,Ht,null),s(ye,_n,te),E(rn,ye,te),s(ye,vn,te),E(an,ye,te),gn=!0},p(ye,[te]){let xe={};te&4&&(xe.$$scope={dirty:te,ctx:ye}),m.$set(xe);let $n={};te&4&&($n.$$scope={dirty:te,ctx:ye}),c.$set($n);let Hn={};te&4&&(Hn.$$scope={dirty:te,ctx:ye}),g.$set(Hn);let wn={};te&4&&(wn.$$scope={dirty:te,ctx:ye}),v.$set(wn);let Pn={};te&4&&(Pn.$$scope={dirty:te,ctx:ye}),k.$set(Pn);let yn={};te&4&&(yn.$$scope={dirty:te,ctx:ye}),L.$set(yn);let Nn={};te&4&&(Nn.$$scope={dirty:te,ctx:ye}),A.$set(Nn);let kn={};te&4&&(kn.$$scope={dirty:te,ctx:ye}),I.$set(kn);let Fn={};te&4&&(Fn.$$scope={dirty:te,ctx:ye}),N.$set(Fn);let Tn={};te&4&&(Tn.$$scope={dirty:te,ctx:ye}),U.$set(Tn);let qn={};te&4&&(qn.$$scope={dirty:te,ctx:ye}),z.$set(qn);let Mn={};te&4&&(Mn.$$scope={dirty:te,ctx:ye}),se.$set(Mn);let Bn={};te&4&&(Bn.$$scope={dirty:te,ctx:ye}),G.$set(Bn);let En={};te&4&&(En.$$scope={dirty:te,ctx:ye}),he.$set(En);let Rn={};te&4&&(Rn.$$scope={dirty:te,ctx:ye}),Z.$set(Rn);let Cn={};te&4&&(Cn.$$scope={dirty:te,ctx:ye}),_e.$set(Cn);let di={};te&4&&(di.$$scope={dirty:te,ctx:ye}),le.$set(di);let ti={};te&4&&(ti.$$scope={dirty:te,ctx:ye}),Me.$set(ti);let ci={};te&4&&(ci.$$scope={dirty:te,ctx:ye}),ge.$set(ci);let ni={};te&4&&(ni.$$scope={dirty:te,ctx:ye}),re.$set(ni);let pi={};te&4&&(pi.$$scope={dirty:te,ctx:ye}),Ze.$set(pi);let ii={};te&4&&(ii.$$scope={dirty:te,ctx:ye}),it.$set(ii);let hi={};te&4&&(hi.$$scope={dirty:te,ctx:ye}),Ee.$set(hi);let oi={};te&4&&(oi.$$scope={dirty:te,ctx:ye}),dt.$set(oi);let gi={};te&4&&(gi.$$scope={dirty:te,ctx:ye}),at.$set(gi)},i(ye){gn||($(m.$$.fragment,ye),$(c.$$.fragment,ye),$(g.$$.fragment,ye),$(v.$$.fragment,ye),$(k.$$.fragment,ye),$(L.$$.fragment,ye),$(A.$$.fragment,ye),$(I.$$.fragment,ye),$(N.$$.fragment,ye),$(U.$$.fragment,ye),$(z.$$.fragment,ye),$(se.$$.fragment,ye),$(G.$$.fragment,ye),$(he.$$.fragment,ye),$(Z.$$.fragment,ye),$(_e.$$.fragment,ye),$(le.$$.fragment,ye),$(Me.$$.fragment,ye),$(ge.$$.fragment,ye),$(re.$$.fragment,ye),$(Ze.$$.fragment,ye),$(it.$$.fragment,ye),$(Ee.$$.fragment,ye),$(dt.$$.fragment,ye),$(at.$$.fragment,ye),$(xt.$$.fragment,ye),$(qe.$$.fragment,ye),$(Be.$$.fragment,ye),$(Nt.$$.fragment,ye),$(Ft.$$.fragment,ye),$(tn.$$.fragment,ye),$(mn.$$.fragment,ye),$(Ce.$$.fragment,ye),$(nn.$$.fragment,ye),$(ln.$$.fragment,ye),$(rn.$$.fragment,ye),$(an.$$.fragment,ye),gn=!0)},o(ye){y(m.$$.fragment,ye),y(c.$$.fragment,ye),y(g.$$.fragment,ye),y(v.$$.fragment,ye),y(k.$$.fragment,ye),y(L.$$.fragment,ye),y(A.$$.fragment,ye),y(I.$$.fragment,ye),y(N.$$.fragment,ye),y(U.$$.fragment,ye),y(z.$$.fragment,ye),y(se.$$.fragment,ye),y(G.$$.fragment,ye),y(he.$$.fragment,ye),y(Z.$$.fragment,ye),y(_e.$$.fragment,ye),y(le.$$.fragment,ye),y(Me.$$.fragment,ye),y(ge.$$.fragment,ye),y(re.$$.fragment,ye),y(Ze.$$.fragment,ye),y(it.$$.fragment,ye),y(Ee.$$.fragment,ye),y(dt.$$.fragment,ye),y(at.$$.fragment,ye),y(xt.$$.fragment,ye),y(qe.$$.fragment,ye),y(Be.$$.fragment,ye),y(Nt.$$.fragment,ye),y(Ft.$$.fragment,ye),y(tn.$$.fragment,ye),y(mn.$$.fragment,ye),y(Ce.$$.fragment,ye),y(nn.$$.fragment,ye),y(ln.$$.fragment,ye),y(rn.$$.fragment,ye),y(an.$$.fragment,ye),gn=!1},d(ye){ye&&(o(e),o(n),o(i),o(l),o(r),o(u),o(a),o(_),o(M),o(O),o(D),o(V),o(j),o(F),o(K),o(Y),o(Q),o(ne),o(pe),o(ve),o(we),o(de),o(Oe),o(wt),o(Et),o(yt),o(gt),o(Wt),o(mt),o(Vt),o(st),o(qt),o(Xt),o(Bt),o(Jt),o(ke),o(He),o(Ut),o(Ht),o(_n),o(vn)),C(m),C(c),C(g),C(v),C(k),C(L),C(A),C(I),C(N),C(U),C(z),C(se),C(G),C(he),C(Z),C(_e),C(le),C(Me),C(ge),C(re),C(Ze),C(it),C(Ee),C(dt),C(at),C(xt),C(qe),C(Be),C(Nt),C(Ft),C(tn),C(mn),C(Ce),C(nn),C(ln),C(rn,ye),C(an,ye)}}}function w3(t){return[[{name:"class",type:"string",description:"Additional css class name to be added to the component."},{name:"danger",description:"Button type: danger"},{name:"disabled",description:"Makes the button disabled"},{name:"icon",type:"string",description:'Adds an icon, with this name, to the button (see icons section for icon names)'},{name:"id",type:"string",description:"Assign ID to the underlying button"},{name:"outline",description:"Button style: outline"},{name:"pressed",type:["true","false"],default:"false",description:"Initial pressed state of the button."},{name:"round",description:"Makes the button round"},{name:"submit",type:["true","false"],default:"false",description:"If true button type is set to submit, otherwise it's button"},{name:"success",description:"Button type: success"},{name:"title",type:"string",description:"Assign title to the underlying button"},{name:"warning",description:"Button type: warning"},{name:"bind:element",type:"element",description:"Exposes the HTML element of the component."},{name:"on:click",type:"function",description:"Triggered when the button is clicked."}],`
+ { `)),e=e.replace(/}/g," }"),e}function Yw(t,e,n){let{value:i=""}=e,l="";Cn(()=>{requestAnimationFrame(r)});function r(){typeof i!="string"&&n(1,i=Uw(i)),n(0,l=window.Prism.highlight(i,window.Prism.languages.json,"json"))}return t.$$set=u=>{"value"in u&&n(1,i=u.value)},[l,i]}var Dp=class extends ae{constructor(e){super(),fe(this,e,Yw,Vw,ue,{value:1})}},mo=Dp;function Gw(t){let e,n,i=[t[0]],l={};for(let r=0;rGe(v,"value",se)),_=new Qt({props:{label:"Style",items:t[3],value:""}}),_.$on("change",t[6]),O=new Qt({props:{label:"Type",items:t[4],value:""}}),O.$on("change",t[7]),L=new Qt({props:{label:"Icon",items:t[5],value:""}}),L.$on("change",t[8]);function G(Z){t[10](Z)}let J={label:"Round"};t[0].round!==void 0&&(J.value=t[0].round),A=new pn({props:J}),be.push(()=>Ge(A,"value",G));function he(Z){t[11](Z)}let Se={label:"Disabled"};return t[0].disabled!==void 0&&(Se.value=t[0].disabled),P=new pn({props:Se}),be.push(()=>Ge(P,"value",he)),j=new Fe({props:{props:t[2]}}),{c(){e=p("h2"),e.textContent="Button",n=d(),i=p("h3"),i.textContent="Live demo",l=d(),r=p("div"),a.c(),m=d(),S(f.$$.fragment),c=d(),b=p("hr"),g=d(),h=p("div"),S(v.$$.fragment),k=d(),S(_.$$.fragment),M=d(),S(O.$$.fragment),D=d(),S(L.$$.fragment),T=d(),S(A.$$.fragment),I=d(),S(P.$$.fragment),W=d(),U=p("hr"),V=d(),S(j.$$.fragment),x(r,"class","docs-buttons-row"),Yt(r,"height","3rem"),x(h,"class","button-demo-props")},m(Z,Y){s(Z,e,Y),s(Z,n,Y),s(Z,i,Y),s(Z,l,Y),s(Z,r,Y),z[u].m(r,null),s(Z,m,Y),E(f,Z,Y),s(Z,c,Y),s(Z,b,Y),s(Z,g,Y),s(Z,h,Y),E(v,h,null),q(h,k),E(_,h,null),q(h,M),E(O,h,null),q(h,D),E(L,h,null),q(h,T),E(A,h,null),q(h,I),E(P,h,null),s(Z,W,Y),s(Z,U,Y),s(Z,V,Y),E(j,Z,Y),F=!0},p(Z,[Y]){let Q=u;u=X(Z,Y),u===Q?z[u].p(Z,Y):(We(),y(z[Q],1,1,()=>{z[Q]=null}),Ve(),a=z[u],a?a.p(Z,Y):(a=z[u]=K[u](Z),a.c()),$(a,1),a.m(r,null));let ne={};Y&2&&(ne.text=Z[1]),Y&1&&(ne.props=Z[0]),f.$set(ne);let pe={};!w&&Y&2&&(w=!0,pe.value=Z[1],Ye(()=>w=!1)),v.$set(pe);let _e={};!H&&Y&1&&(H=!0,_e.value=Z[0].round,Ye(()=>H=!1)),A.$set(_e);let me={};!N&&Y&1&&(N=!0,me.value=Z[0].disabled,Ye(()=>N=!1)),P.$set(me)},i(Z){F||($(a),$(f.$$.fragment,Z),$(v.$$.fragment,Z),$(_.$$.fragment,Z),$(O.$$.fragment,Z),$(L.$$.fragment,Z),$(A.$$.fragment,Z),$(P.$$.fragment,Z),$(j.$$.fragment,Z),F=!0)},o(Z){y(a),y(f.$$.fragment,Z),y(v.$$.fragment,Z),y(_.$$.fragment,Z),y(O.$$.fragment,Z),y(L.$$.fragment,Z),y(A.$$.fragment,Z),y(P.$$.fragment,Z),y(j.$$.fragment,Z),F=!1},d(Z){Z&&(o(e),o(n),o(i),o(l),o(r),o(m),o(c),o(b),o(g),o(h),o(W),o(U),o(V)),z[u].d(),C(f,Z),C(v),C(_),C(O),C(L),C(A),C(P),C(j,Z)}}}function Jw(t,e,n){let i=[{name:"class",type:"string",description:"Additional css class name to be added to the component."},{name:"danger",description:"Button type: danger"},{name:"data-",description:"Dataset attribute allows to pass some data of a primitive type (string, number, boolean), which will be accessible in the on:click event listener, via button reference."},{name:"disabled",description:"Makes the button disabled"},{name:"icon",type:"string",description:'Adds an icon, with this name, to the button (see icons section for icon names)'},{name:"id",type:"string",description:"Assign ID to the underlying button"},{name:"info",description:"Button type: info"},{name:"link",description:"Button style: link"},{name:"outline",description:"Button style: outline"},{name:"round",description:"Makes the button round"},{name:"submit",type:["true","false"],default:"false",description:"If true button type is set to submit, otherwise it's button"},{name:"success",description:"Button type: success"},{name:"text",description:"Button style: text"},{name:"title",type:"string",description:"Assign title to the underlying button"},{name:"warning",description:"Button type: warning"},{name:"bind:element",type:"element",description:"Exposes the HTML element of the component."},{name:"on:click",type:"function",description:"Triggered when the button is clicked."}],l={},r="Demo button",u=[{name:"Normal",value:""},{name:"Outline",value:"outline"},{name:"Text",value:"text"},{name:"Link",value:"link"}],a=[{name:"Default",value:""},{name:"Info",value:"info"},{name:"Success",value:"success"},{name:"Warning",value:"warning"},{name:"Danger",value:"danger"}],m=[{name:"none",value:""},{name:"info",value:"info"},{name:"check",value:"check"},{name:"alert",value:"alert"},{name:"trash",value:"trash"}];function f(k){n(0,l.outline=!1,l),n(0,l.text=!1,l),n(0,l.link=!1,l),g(k.detail,!0)}function c(k){n(0,l.info=!1,l),n(0,l.success=!1,l),n(0,l.warning=!1,l),n(0,l.danger=!1,l),g(k.detail,!0)}function b(k){g("icon",k.detail)}function g(k,_){!k||typeof _>"u"||n(0,l[k]=_,l)}function h(k){r=k,n(1,r)}function v(k){t.$$.not_equal(l.round,k)&&(l.round=k,n(0,l))}function w(k){t.$$.not_equal(l.disabled,k)&&(l.disabled=k,n(0,l))}return[l,r,i,u,a,m,f,c,b,h,v,w]}var Ap=class extends ae{constructor(e){super(),fe(this,e,Jw,Zw,ue,{})}},Ip=Ap;function Qw(t){let e;return{c(){e=ie("Hello")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function e3(t){let e;return{c(){e=ie("Info")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function t3(t){let e;return{c(){e=ie("Warning")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function n3(t){let e;return{c(){e=ie("Warning")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function i3(t){let e;return{c(){e=ie("Danger")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function o3(t){let e;return{c(){e=ie("Hello")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function s3(t){let e;return{c(){e=ie("Info")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function l3(t){let e;return{c(){e=ie("Warning")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function r3(t){let e;return{c(){e=ie("Warning")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function a3(t){let e;return{c(){e=ie("Danger")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function u3(t){let e;return{c(){e=ie("Hello")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function f3(t){let e;return{c(){e=ie("Info")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function m3(t){let e;return{c(){e=ie("Success")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function d3(t){let e;return{c(){e=ie("Warning")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function c3(t){let e;return{c(){e=ie("Danger")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function p3(t){let e;return{c(){e=ie("Help")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function h3(t){let e;return{c(){e=ie("Info")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function g3(t){let e;return{c(){e=ie("Success")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function b3(t){let e;return{c(){e=ie("Warning")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function _3(t){let e;return{c(){e=ie("Delete")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function v3(t){let e;return{c(){e=ie("Hello")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function $3(t){let e;return{c(){e=ie("Info")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function w3(t){let e;return{c(){e=ie("Warning")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function y3(t){let e;return{c(){e=ie("Warning")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function k3(t){let e;return{c(){e=ie("Danger")},m(n,i){s(n,e,i)},d(n){n&&o(e)}}}function T3(t){let e,n,i,l,r,u,a,m,f,c,b,g,h,v,w,k,_,M,O,D,L,T,A,H,I,P,N,W,U,V,j,F,K,z,X,se,ee,G,J,he,Se,Z,Y,Q,ne,pe,_e,me,le,Pe,Me,ce,ge,Ie,re,ve,we,de,Oe,Je,nt,it,lt,Ee,Ne,dt,ht,at,wt,Et,yt,gt,Wt,mt,Vt,st,xt,Te,qe,Ae,Be,ot,Nt,Gt,Ft,qt,Xt,Bt,Jt,ke,He,Ut,Ht,tn,An,mn,In,Ce,Ze,nn,On,ln,xn,rn,_n,an,gn;return m=new ft({props:{$$slots:{default:[Qw]},$$scope:{ctx:t}}}),c=new ft({props:{info:!0,$$slots:{default:[e3]},$$scope:{ctx:t}}}),g=new ft({props:{success:!0,$$slots:{default:[t3]},$$scope:{ctx:t}}}),v=new ft({props:{warning:!0,$$slots:{default:[n3]},$$scope:{ctx:t}}}),k=new ft({props:{danger:!0,$$slots:{default:[i3]},$$scope:{ctx:t}}}),L=new ft({props:{pressed:!0,$$slots:{default:[o3]},$$scope:{ctx:t}}}),A=new ft({props:{pressed:!0,info:!0,$$slots:{default:[s3]},$$scope:{ctx:t}}}),I=new ft({props:{pressed:!0,success:!0,$$slots:{default:[l3]},$$scope:{ctx:t}}}),N=new ft({props:{pressed:!0,warning:!0,$$slots:{default:[r3]},$$scope:{ctx:t}}}),U=new ft({props:{pressed:!0,danger:!0,$$slots:{default:[a3]},$$scope:{ctx:t}}}),z=new ft({props:{pressed:!0,disabled:!0,$$slots:{default:[u3]},$$scope:{ctx:t}}}),se=new ft({props:{pressed:!0,disabled:!0,info:!0,$$slots:{default:[f3]},$$scope:{ctx:t}}}),G=new ft({props:{pressed:!0,disabled:!0,success:!0,$$slots:{default:[m3]},$$scope:{ctx:t}}}),he=new ft({props:{pressed:!0,disabled:!0,warning:!0,$$slots:{default:[d3]},$$scope:{ctx:t}}}),Z=new ft({props:{pressed:!0,disabled:!0,danger:!0,$$slots:{default:[c3]},$$scope:{ctx:t}}}),_e=new ft({props:{icon:"help",$$slots:{default:[p3]},$$scope:{ctx:t}}}),le=new ft({props:{icon:"info",info:!0,$$slots:{default:[h3]},$$scope:{ctx:t}}}),Me=new ft({props:{icon:"check",success:!0,$$slots:{default:[g3]},$$scope:{ctx:t}}}),ge=new ft({props:{icon:"alert",warning:!0,$$slots:{default:[b3]},$$scope:{ctx:t}}}),re=new ft({props:{icon:"trash",danger:!0,$$slots:{default:[_3]},$$scope:{ctx:t}}}),Je=new ft({props:{outline:!0,$$slots:{default:[v3]},$$scope:{ctx:t}}}),it=new ft({props:{outline:!0,info:!0,$$slots:{default:[$3]},$$scope:{ctx:t}}}),Ee=new ft({props:{outline:!0,success:!0,$$slots:{default:[w3]},$$scope:{ctx:t}}}),dt=new ft({props:{outline:!0,warning:!0,$$slots:{default:[y3]},$$scope:{ctx:t}}}),at=new ft({props:{outline:!0,danger:!0,$$slots:{default:[k3]},$$scope:{ctx:t}}}),xt=new ft({props:{icon:"help"}}),qe=new ft({props:{icon:"info",info:!0}}),Be=new ft({props:{icon:"check",success:!0}}),Nt=new ft({props:{icon:"alert",warning:!0}}),Ft=new ft({props:{icon:"trash",danger:!0}}),tn=new ft({props:{round:!0,icon:"help"}}),mn=new ft({props:{round:!0,icon:"info",info:!0}}),Ce=new ft({props:{round:!0,icon:"check",success:!0}}),nn=new ft({props:{round:!0,icon:"alert",warning:!0}}),ln=new ft({props:{round:!0,icon:"trash",danger:!0}}),rn=new ze({props:{html:t[1]}}),an=new Fe({props:{props:t[0]}}),{c(){e=p("h2"),e.textContent="Push Button",n=d(),i=p("h3"),i.textContent="Normal",l=d(),r=p("h4"),r.textContent="Default",u=d(),a=p("div"),S(m.$$.fragment),f=d(),S(c.$$.fragment),b=d(),S(g.$$.fragment),h=d(),S(v.$$.fragment),w=d(),S(k.$$.fragment),_=d(),M=p("h4"),M.textContent="Pressed",O=d(),D=p("div"),S(L.$$.fragment),T=d(),S(A.$$.fragment),H=d(),S(I.$$.fragment),P=d(),S(N.$$.fragment),W=d(),S(U.$$.fragment),V=d(),j=p("h4"),j.textContent="Disabled",F=d(),K=p("div"),S(z.$$.fragment),X=d(),S(se.$$.fragment),ee=d(),S(G.$$.fragment),J=d(),S(he.$$.fragment),Se=d(),S(Z.$$.fragment),Y=d(),Q=p("h4"),Q.textContent="With icon",ne=d(),pe=p("div"),S(_e.$$.fragment),me=d(),S(le.$$.fragment),Pe=d(),S(Me.$$.fragment),ce=d(),S(ge.$$.fragment),Ie=d(),S(re.$$.fragment),ve=d(),we=p("h4"),we.textContent="Outline",de=d(),Oe=p("div"),S(Je.$$.fragment),nt=d(),S(it.$$.fragment),lt=d(),S(Ee.$$.fragment),Ne=d(),S(dt.$$.fragment),ht=d(),S(at.$$.fragment),wt=d(),Et=p("hr"),yt=d(),gt=p("h3"),gt.textContent="Icon only buttons",Wt=d(),mt=p("h4"),mt.textContent="Default",Vt=d(),st=p("div"),S(xt.$$.fragment),Te=d(),S(qe.$$.fragment),Ae=d(),S(Be.$$.fragment),ot=d(),S(Nt.$$.fragment),Gt=d(),S(Ft.$$.fragment),qt=d(),Xt=p("hr"),Bt=d(),Jt=p("h3"),Jt.textContent="Icon only, and round",ke=d(),He=p("h4"),He.textContent="Default",Ut=d(),Ht=p("div"),S(tn.$$.fragment),An=d(),S(mn.$$.fragment),In=d(),S(Ce.$$.fragment),Ze=d(),S(nn.$$.fragment),On=d(),S(ln.$$.fragment),xn=d(),S(rn.$$.fragment),_n=d(),S(an.$$.fragment),x(a,"class","docs-buttons-row"),x(D,"class","docs-buttons-row"),x(K,"class","docs-buttons-row"),x(pe,"class","docs-buttons-row"),x(Oe,"class","docs-buttons-row"),x(st,"class","docs-buttons-row"),x(Ht,"class","docs-buttons-row")},m(ye,te){s(ye,e,te),s(ye,n,te),s(ye,i,te),s(ye,l,te),s(ye,r,te),s(ye,u,te),s(ye,a,te),E(m,a,null),q(a,f),E(c,a,null),q(a,b),E(g,a,null),q(a,h),E(v,a,null),q(a,w),E(k,a,null),s(ye,_,te),s(ye,M,te),s(ye,O,te),s(ye,D,te),E(L,D,null),q(D,T),E(A,D,null),q(D,H),E(I,D,null),q(D,P),E(N,D,null),q(D,W),E(U,D,null),s(ye,V,te),s(ye,j,te),s(ye,F,te),s(ye,K,te),E(z,K,null),q(K,X),E(se,K,null),q(K,ee),E(G,K,null),q(K,J),E(he,K,null),q(K,Se),E(Z,K,null),s(ye,Y,te),s(ye,Q,te),s(ye,ne,te),s(ye,pe,te),E(_e,pe,null),q(pe,me),E(le,pe,null),q(pe,Pe),E(Me,pe,null),q(pe,ce),E(ge,pe,null),q(pe,Ie),E(re,pe,null),s(ye,ve,te),s(ye,we,te),s(ye,de,te),s(ye,Oe,te),E(Je,Oe,null),q(Oe,nt),E(it,Oe,null),q(Oe,lt),E(Ee,Oe,null),q(Oe,Ne),E(dt,Oe,null),q(Oe,ht),E(at,Oe,null),s(ye,wt,te),s(ye,Et,te),s(ye,yt,te),s(ye,gt,te),s(ye,Wt,te),s(ye,mt,te),s(ye,Vt,te),s(ye,st,te),E(xt,st,null),q(st,Te),E(qe,st,null),q(st,Ae),E(Be,st,null),q(st,ot),E(Nt,st,null),q(st,Gt),E(Ft,st,null),s(ye,qt,te),s(ye,Xt,te),s(ye,Bt,te),s(ye,Jt,te),s(ye,ke,te),s(ye,He,te),s(ye,Ut,te),s(ye,Ht,te),E(tn,Ht,null),q(Ht,An),E(mn,Ht,null),q(Ht,In),E(Ce,Ht,null),q(Ht,Ze),E(nn,Ht,null),q(Ht,On),E(ln,Ht,null),s(ye,xn,te),E(rn,ye,te),s(ye,_n,te),E(an,ye,te),gn=!0},p(ye,[te]){let xe={};te&4&&(xe.$$scope={dirty:te,ctx:ye}),m.$set(xe);let vn={};te&4&&(vn.$$scope={dirty:te,ctx:ye}),c.$set(vn);let Hn={};te&4&&(Hn.$$scope={dirty:te,ctx:ye}),g.$set(Hn);let $n={};te&4&&($n.$$scope={dirty:te,ctx:ye}),v.$set($n);let Pn={};te&4&&(Pn.$$scope={dirty:te,ctx:ye}),k.$set(Pn);let wn={};te&4&&(wn.$$scope={dirty:te,ctx:ye}),L.$set(wn);let Nn={};te&4&&(Nn.$$scope={dirty:te,ctx:ye}),A.$set(Nn);let yn={};te&4&&(yn.$$scope={dirty:te,ctx:ye}),I.$set(yn);let Fn={};te&4&&(Fn.$$scope={dirty:te,ctx:ye}),N.$set(Fn);let kn={};te&4&&(kn.$$scope={dirty:te,ctx:ye}),U.$set(kn);let qn={};te&4&&(qn.$$scope={dirty:te,ctx:ye}),z.$set(qn);let Tn={};te&4&&(Tn.$$scope={dirty:te,ctx:ye}),se.$set(Tn);let Bn={};te&4&&(Bn.$$scope={dirty:te,ctx:ye}),G.$set(Bn);let Mn={};te&4&&(Mn.$$scope={dirty:te,ctx:ye}),he.$set(Mn);let Rn={};te&4&&(Rn.$$scope={dirty:te,ctx:ye}),Z.$set(Rn);let En={};te&4&&(En.$$scope={dirty:te,ctx:ye}),_e.$set(En);let di={};te&4&&(di.$$scope={dirty:te,ctx:ye}),le.$set(di);let ti={};te&4&&(ti.$$scope={dirty:te,ctx:ye}),Me.$set(ti);let ci={};te&4&&(ci.$$scope={dirty:te,ctx:ye}),ge.$set(ci);let ni={};te&4&&(ni.$$scope={dirty:te,ctx:ye}),re.$set(ni);let pi={};te&4&&(pi.$$scope={dirty:te,ctx:ye}),Je.$set(pi);let ii={};te&4&&(ii.$$scope={dirty:te,ctx:ye}),it.$set(ii);let hi={};te&4&&(hi.$$scope={dirty:te,ctx:ye}),Ee.$set(hi);let oi={};te&4&&(oi.$$scope={dirty:te,ctx:ye}),dt.$set(oi);let gi={};te&4&&(gi.$$scope={dirty:te,ctx:ye}),at.$set(gi)},i(ye){gn||($(m.$$.fragment,ye),$(c.$$.fragment,ye),$(g.$$.fragment,ye),$(v.$$.fragment,ye),$(k.$$.fragment,ye),$(L.$$.fragment,ye),$(A.$$.fragment,ye),$(I.$$.fragment,ye),$(N.$$.fragment,ye),$(U.$$.fragment,ye),$(z.$$.fragment,ye),$(se.$$.fragment,ye),$(G.$$.fragment,ye),$(he.$$.fragment,ye),$(Z.$$.fragment,ye),$(_e.$$.fragment,ye),$(le.$$.fragment,ye),$(Me.$$.fragment,ye),$(ge.$$.fragment,ye),$(re.$$.fragment,ye),$(Je.$$.fragment,ye),$(it.$$.fragment,ye),$(Ee.$$.fragment,ye),$(dt.$$.fragment,ye),$(at.$$.fragment,ye),$(xt.$$.fragment,ye),$(qe.$$.fragment,ye),$(Be.$$.fragment,ye),$(Nt.$$.fragment,ye),$(Ft.$$.fragment,ye),$(tn.$$.fragment,ye),$(mn.$$.fragment,ye),$(Ce.$$.fragment,ye),$(nn.$$.fragment,ye),$(ln.$$.fragment,ye),$(rn.$$.fragment,ye),$(an.$$.fragment,ye),gn=!0)},o(ye){y(m.$$.fragment,ye),y(c.$$.fragment,ye),y(g.$$.fragment,ye),y(v.$$.fragment,ye),y(k.$$.fragment,ye),y(L.$$.fragment,ye),y(A.$$.fragment,ye),y(I.$$.fragment,ye),y(N.$$.fragment,ye),y(U.$$.fragment,ye),y(z.$$.fragment,ye),y(se.$$.fragment,ye),y(G.$$.fragment,ye),y(he.$$.fragment,ye),y(Z.$$.fragment,ye),y(_e.$$.fragment,ye),y(le.$$.fragment,ye),y(Me.$$.fragment,ye),y(ge.$$.fragment,ye),y(re.$$.fragment,ye),y(Je.$$.fragment,ye),y(it.$$.fragment,ye),y(Ee.$$.fragment,ye),y(dt.$$.fragment,ye),y(at.$$.fragment,ye),y(xt.$$.fragment,ye),y(qe.$$.fragment,ye),y(Be.$$.fragment,ye),y(Nt.$$.fragment,ye),y(Ft.$$.fragment,ye),y(tn.$$.fragment,ye),y(mn.$$.fragment,ye),y(Ce.$$.fragment,ye),y(nn.$$.fragment,ye),y(ln.$$.fragment,ye),y(rn.$$.fragment,ye),y(an.$$.fragment,ye),gn=!1},d(ye){ye&&(o(e),o(n),o(i),o(l),o(r),o(u),o(a),o(_),o(M),o(O),o(D),o(V),o(j),o(F),o(K),o(Y),o(Q),o(ne),o(pe),o(ve),o(we),o(de),o(Oe),o(wt),o(Et),o(yt),o(gt),o(Wt),o(mt),o(Vt),o(st),o(qt),o(Xt),o(Bt),o(Jt),o(ke),o(He),o(Ut),o(Ht),o(xn),o(_n)),C(m),C(c),C(g),C(v),C(k),C(L),C(A),C(I),C(N),C(U),C(z),C(se),C(G),C(he),C(Z),C(_e),C(le),C(Me),C(ge),C(re),C(Je),C(it),C(Ee),C(dt),C(at),C(xt),C(qe),C(Be),C(Nt),C(Ft),C(tn),C(mn),C(Ce),C(nn),C(ln),C(rn,ye),C(an,ye)}}}function M3(t){return[[{name:"class",type:"string",description:"Additional css class name to be added to the component."},{name:"danger",description:"Button type: danger"},{name:"disabled",description:"Makes the button disabled"},{name:"icon",type:"string",description:'Adds an icon, with this name, to the button (see icons section for icon names)'},{name:"id",type:"string",description:"Assign ID to the underlying button"},{name:"outline",description:"Button style: outline"},{name:"pressed",type:["true","false"],default:"false",description:"Initial pressed state of the button."},{name:"round",description:"Makes the button round"},{name:"submit",type:["true","false"],default:"false",description:"If true button type is set to submit, otherwise it's button"},{name:"success",description:"Button type: success"},{name:"title",type:"string",description:"Assign title to the underlying button"},{name:"warning",description:"Button type: warning"},{name:"bind:element",type:"element",description:"Exposes the HTML element of the component."},{name:"on:click",type:"function",description:"Triggered when the button is clicked."}],`