diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d1ccfd8..6f376f4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,17 @@ Changelog ========= -## v9.0.0 *(2023-08-28)* -- **Improved**: `Tooltip` was simplified and now the positioning ensures that the tooltip is always visible on the screen. -- **Improved**: `Popover` will now update its position when the window is resized. +## v9.0.0 *(2023-08-?)* +- **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). + + ### Breaking changes - 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. diff --git a/docs-src/api-table/ApiTable.svelte b/docs-src/api-table/ApiTable.svelte index aa3fbcf9..c5357ae6 100644 --- a/docs-src/api-table/ApiTable.svelte +++ b/docs-src/api-table/ApiTable.svelte @@ -36,8 +36,8 @@ function buildType (prop) { if (!prop.type) prop.type = '-'; const types = (Array.isArray(prop.type) ? prop.type : [prop.type]).map(t => `${t}`); res.push(types.join(' | ')); - if (prop.required) res.push('required'); - if (prop.default) res.push(`
(defaults to ${prop.default})`); + if (typeof prop.required !== 'undefined') res.push('required'); + if (typeof prop.default !== 'undefined') res.push(`
(defaults to ${prop.default})`); return res.join(' '); } diff --git a/docs-src/code-example/CodeExample.svelte b/docs-src/code-example/CodeExample.svelte index e358b672..8bd443f0 100644 --- a/docs-src/code-example/CodeExample.svelte +++ b/docs-src/code-example/CodeExample.svelte @@ -1,5 +1,6 @@ {#if !notitle} -

Example

+ {#if nohr === undefined}
{/if} +

Example

{/if}

 	{@html encode(html)}
@@ -8,6 +9,7 @@
 
diff --git a/docs-src/components/utils/functions/align-item.svelte b/docs-src/components/utils/functions/align-item.svelte
new file mode 100644
index 00000000..2a33a18a
--- /dev/null
+++ b/docs-src/components/utils/functions/align-item.svelte
@@ -0,0 +1,48 @@
+

alignItem(config)

+

Aligns an element to another element, + ensuring that the aligned element remains within the viewport. +

+ + + + + + + + diff --git a/docs-src/components/utils/functions/animate.svelte b/docs-src/components/utils/functions/animate.svelte new file mode 100644 index 00000000..7d927db3 --- /dev/null +++ b/docs-src/components/utils/functions/animate.svelte @@ -0,0 +1,32 @@ +

animate(element, from, to, options?)

+ +

Animates an element from one state to another. Shortcut & wrapper for the native javascript animation.

+ + +

Returns a promise which resolves when the animation finishes.

+ + + + + + diff --git a/docs-src/components/utils/functions/blink.svelte b/docs-src/components/utils/functions/blink.svelte new file mode 100644 index 00000000..145b6d1e --- /dev/null +++ b/docs-src/components/utils/functions/blink.svelte @@ -0,0 +1,22 @@ + +

Animates an element by changing its opacity from 0.5 to 1.

+
    +
  • element - HTMLElement to animate +
  • duration - how long to animate (in ms). +
  • Returns a promise which resolves when the animation finishes. +
+ + + + diff --git a/docs-src/components/utils/functions/debounce.svelte b/docs-src/components/utils/functions/debounce.svelte new file mode 100644 index 00000000..bc79a10f --- /dev/null +++ b/docs-src/components/utils/functions/debounce.svelte @@ -0,0 +1,31 @@ +

debounce(fn, timeout = 300)

+

The "debounced" function will only be called after it has not been called for timeout milliseconds.

+
    +
  • fn - function to debounce. +
  • timeout - milliseconds to wait before calling fn. +
+ +

+ This is a useful e.g. when attaching an event listener to an event that is fired repeatedly & quickly (like scroll or resize).
+ Attaching a heavy function to such an event can cause performance issues, so debouncing it will ensure + that the function is only called after it has not been called for timeout milliseconds. +

+ + + + + diff --git a/docs-src/components/utils/functions/deep-copy.svelte b/docs-src/components/utils/functions/deep-copy.svelte new file mode 100644 index 00000000..ca5cc16c --- /dev/null +++ b/docs-src/components/utils/functions/deep-copy.svelte @@ -0,0 +1,20 @@ +

deepCopy(object)

+

This is just an alias for an oddly-named native function: structuredClone.

+
    +
  • object - any object or array to clone. +
+ + + + diff --git a/docs-src/components/utils/functions/empty.svelte b/docs-src/components/utils/functions/empty.svelte new file mode 100644 index 00000000..a94c9772 --- /dev/null +++ b/docs-src/components/utils/functions/empty.svelte @@ -0,0 +1,39 @@ +

empty(value)

+

Similar to PHP's empty - returns true if a value is empty.

+
    +
  • value - any data type. +
+ +

Empty will return true if the value is one of the following:

+
    +
  • undefined +
  • null +
  • empty string +
  • empty array +
  • empty object +
+ + + + + diff --git a/docs-src/components/utils/functions/format-date.svelte b/docs-src/components/utils/functions/format-date.svelte new file mode 100644 index 00000000..c0412ed3 --- /dev/null +++ b/docs-src/components/utils/functions/format-date.svelte @@ -0,0 +1,16 @@ +

formatDate(date)

+

Converts date to a string in the format: YYYY-MM-DD HH:mm.

+ + + + + diff --git a/docs-src/components/utils/functions/fuzzy.svelte b/docs-src/components/utils/functions/fuzzy.svelte new file mode 100644 index 00000000..46ddc0f0 --- /dev/null +++ b/docs-src/components/utils/functions/fuzzy.svelte @@ -0,0 +1,26 @@ +

fuzzy(haystack = '', needle = '')

+

Fuzzy finds if haystack contains characters from the needle in the same order.

+
    +
  • haystack - a string to be searched in. +
  • needle - a string to search for. +
+ +

It's useful for filtering lists of items by a search string.

+ + + + + diff --git a/docs-src/components/utils/functions/get-mouse-x.svelte.svelte b/docs-src/components/utils/functions/get-mouse-x.svelte.svelte new file mode 100644 index 00000000..57b54f38 --- /dev/null +++ b/docs-src/components/utils/functions/get-mouse-x.svelte.svelte @@ -0,0 +1,19 @@ +

getMouseX(event)

+

Returns the mouse X position. Event is standardised across platforms (touch & pointer)

+ + + + + diff --git a/docs-src/components/utils/functions/get-mouse-xy.svelte.svelte b/docs-src/components/utils/functions/get-mouse-xy.svelte.svelte new file mode 100644 index 00000000..0fe32b17 --- /dev/null +++ b/docs-src/components/utils/functions/get-mouse-xy.svelte.svelte @@ -0,0 +1,19 @@ +

getMouseXY(event)

+

Returns the mouse XY position (as an array: [x, y]). Event is standardised across platforms (touch & pointer)

+ + + + + diff --git a/docs-src/components/utils/functions/get-mouse-y.svelte.svelte b/docs-src/components/utils/functions/get-mouse-y.svelte.svelte new file mode 100644 index 00000000..c9e7668a --- /dev/null +++ b/docs-src/components/utils/functions/get-mouse-y.svelte.svelte @@ -0,0 +1,19 @@ +

getMouseY(event)

+

Returns the mouse Y position. Event is standardised across platforms (touch & pointer)

+ + + + + diff --git a/docs-src/components/utils/functions/guid.svelte b/docs-src/components/utils/functions/guid.svelte new file mode 100644 index 00000000..126a7ae1 --- /dev/null +++ b/docs-src/components/utils/functions/guid.svelte @@ -0,0 +1,17 @@ +

guid()

+

Generates a globally unique identifier.

+ + + + + diff --git a/docs-src/components/utils/functions/index.js b/docs-src/components/utils/functions/index.js new file mode 100644 index 00000000..0819ca4c --- /dev/null +++ b/docs-src/components/utils/functions/index.js @@ -0,0 +1,18 @@ +export { default as AlignItem } from './align-item.svelte'; +export { default as Animate } from './animate.svelte'; +export { default as Blink } from './blink.svelte'; +export { default as Debounce } from './debounce.svelte'; +export { default as DeepCopy } from './deep-copy.svelte'; +export { default as Empty } from './empty.svelte'; +export { default as FormatDate } from './format-date.svelte'; +export { default as Fuzzy } from './fuzzy.svelte'; +export { default as GetMouseX } from './get-mouse-x.svelte.svelte'; +export { default as GetMouseXY } from './get-mouse-xy.svelte.svelte'; +export { default as GetMouseY } from './get-mouse-y.svelte.svelte'; +export { default as Guid } from './guid.svelte'; +export { default as IsInScrollable } from './is-in-scrollable.svelte'; +export { default as IsMobile } from './is-mobile.svelte'; +export { default as Pluck } from './pluck.svelte'; +export { default as RoundAmount } from './round-amount.svelte'; +export { default as Throttle } from './throttle.svelte'; +export { default as TimeAgo } from './time-ago.svelte'; diff --git a/docs-src/components/utils/functions/is-in-scrollable.svelte b/docs-src/components/utils/functions/is-in-scrollable.svelte new file mode 100644 index 00000000..81195b9b --- /dev/null +++ b/docs-src/components/utils/functions/is-in-scrollable.svelte @@ -0,0 +1,21 @@ +

isInScrollable(node)

+

Checks whether the given node is inside a scrollable element.

+

This function is useful when determining whether a swipe event should be allowed + to start on a given element.
+ If an element is inside a scrollable element, the swipe event will not start, + allowing the browser to trigger the normal scrolling. +

+ + + + + diff --git a/docs-src/components/utils/functions/is-mobile.svelte b/docs-src/components/utils/functions/is-mobile.svelte new file mode 100644 index 00000000..9bd60d1a --- /dev/null +++ b/docs-src/components/utils/functions/is-mobile.svelte @@ -0,0 +1,17 @@ +

isMobile()

+

Checks if the current platform is mobile.

+ + + + + diff --git a/docs-src/components/utils/functions/pluck.svelte b/docs-src/components/utils/functions/pluck.svelte new file mode 100644 index 00000000..566bf987 --- /dev/null +++ b/docs-src/components/utils/functions/pluck.svelte @@ -0,0 +1,20 @@ +

pluck(object, props)

+

Creates a new object with only the plucked properties from the original object..

+
    +
  • object - object to pluck from. +
  • props - an array of property names. +
+ + + + + diff --git a/docs-src/components/utils/functions/round-amount.svelte b/docs-src/components/utils/functions/round-amount.svelte new file mode 100644 index 00000000..daef460f --- /dev/null +++ b/docs-src/components/utils/functions/round-amount.svelte @@ -0,0 +1,16 @@ +

roundAmount(value, precision = 2)

+

Rounds a number to 2 decimal places (by default).

+ + + + + diff --git a/docs-src/components/utils/functions/throttle.svelte b/docs-src/components/utils/functions/throttle.svelte new file mode 100644 index 00000000..2a5833d4 --- /dev/null +++ b/docs-src/components/utils/functions/throttle.svelte @@ -0,0 +1,47 @@ +

throttle(fn, timeout = 300)

+

The "throttled" function will only be called once every timeout milliseconds.

+
    +
  • fn - function to debounce. +
  • timeout - milliseconds to wait before calling fn. +
+ + +

+ This is slightly different to debounce but serves a similar purpose - performance optimization.
+ It's useful when a heavy event handler function would be to costly to call on every event. +

+

One caveat is that the throttled function will be called once every x miliseconds, so if an event would stop firing + before the function is called the next time - the function will not be called at the end. E.g.: +

+
    +
  • we would like to update a position of a tooltip when the window is resizing. +
  • we don't want to call the function on every resize event, because it's heavy and resize events are fired with every pixel of the window size change. +
  • we also don't want to call the function only once at the end of the resize, because the tooltip would be in the wrong place for the whole duration of the resize. +
  • throttle is a good option here, but the caveat mentioned above may cause the tooltip to be in the wrong place at the end of the resize. +
  • in this case it is a good idea to use both: throttle and debounce: throttle the function to be called every 300ms, but also debounce it to be called at the end of the resize. +
+ + + + + + + diff --git a/docs-src/components/utils/functions/time-ago.svelte b/docs-src/components/utils/functions/time-ago.svelte new file mode 100644 index 00000000..f08ffcdf --- /dev/null +++ b/docs-src/components/utils/functions/time-ago.svelte @@ -0,0 +1,23 @@ +

timeAgo(date, now)

+

Converts date to a string describing how long time ago was the given date.

+ + + + + diff --git a/docs-src/components/utils/index.js b/docs-src/components/utils/index.js new file mode 100644 index 00000000..f4ba060a --- /dev/null +++ b/docs-src/components/utils/index.js @@ -0,0 +1 @@ +export { default as Utils } from './Utils.svelte'; diff --git a/docs-src/components/utils/properties/focusable-selector.svelte b/docs-src/components/utils/properties/focusable-selector.svelte new file mode 100644 index 00000000..0174ff18 --- /dev/null +++ b/docs-src/components/utils/properties/focusable-selector.svelte @@ -0,0 +1,20 @@ +

FOCUSABLE_SELECTOR

+
    +
  • Svelte store* +
  • Type: string +
  • Returns a list of selectors that can be focused. +
+ + + diff --git a/docs-src/components/utils/properties/index.js b/docs-src/components/utils/properties/index.js new file mode 100644 index 00000000..86b62aaf --- /dev/null +++ b/docs-src/components/utils/properties/index.js @@ -0,0 +1,2 @@ +export { default as FocusableSelector } from './focusable-selector.svelte'; +export { default as PrefersDark } from './prefers-dark.svelte'; diff --git a/docs-src/components/utils/properties/prefers-dark.svelte b/docs-src/components/utils/properties/prefers-dark.svelte new file mode 100644 index 00000000..077bfbf4 --- /dev/null +++ b/docs-src/components/utils/properties/prefers-dark.svelte @@ -0,0 +1,21 @@ +

PREFERS_DARK

+
    +
  • Svelte store* +
  • Type: boolean +
  • Updates on system theme change. +
  • Returns user preference for dark mode. +
+ + + + diff --git a/docs-src/header/Header.css b/docs-src/header/Header.css index 34a3c0f9..b1e9af05 100644 --- a/docs-src/header/Header.css +++ b/docs-src/header/Header.css @@ -3,5 +3,5 @@ position: fixed; top: 0.5rem; right: 0.6rem; - z-index: 1000; + z-index: 55; } diff --git a/docs-src/nav/Nav.css b/docs-src/nav/Nav.css index f24b26b1..4e192c67 100644 --- a/docs-src/nav/Nav.css +++ b/docs-src/nav/Nav.css @@ -11,7 +11,7 @@ aside { padding: 0 1rem calc(100lvh - 100svh); overscroll-behavior: contain; - z-index: 10; + z-index: 60; } menu { @@ -52,20 +52,27 @@ menu a.active { background-color: var(--ui-color-highlight); } position: fixed; left: 0; top: 0.4rem; - z-index: 1001; + z-index: 65; color: var(--ui-color-text-1); display: none; transform: translateX(10px); } .nav-toggler:hover { color: var(--ui-color-text); background: none; } +.btn-scroll-top { + position: fixed; + bottom: 1rem; + right: 1rem; + z-index: 999; +} +.btn-scroll-top.hidden { display: none; } + @media (1px <= width <= 700px) { .nav-toggler { display: flex; } .nav-toggler.expanded { transform: translateX(calc(var(--sidebar-width) - 40px)); } aside { - z-index: 1000; box-shadow: 2px 1px 10px #0006; transform: translateX(calc(var(--sidebar-width) * -1)); diff --git a/docs-src/nav/Nav.svelte b/docs-src/nav/Nav.svelte index fb2cd0a4..aef88f58 100644 --- a/docs-src/nav/Nav.svelte +++ b/docs-src/nav/Nav.svelte @@ -50,17 +50,25 @@

Generic

+ + + + diff --git a/docs-src/pages/changelog.svelte b/docs-src/pages/changelog.svelte index 0a1fad33..7f286cae 100644 --- a/docs-src/pages/changelog.svelte +++ b/docs-src/pages/changelog.svelte @@ -1,9 +1,14 @@

Changelog

-

v9.0.0 (2023-08-28)

+

v9.0.0 (2023-08-?)

    -
  • Improved: Tooltip was simplified and now the positioning ensures that the tooltip is always visible on the screen.
  • -
  • Improved: Popover will now update its position when the window is resized.
  • +
  • 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).

Breaking changes

`,$=m(),_=p("div"),_.innerHTML=`

SvelteKit

This framework works with SvelteKit from version 6.4.0.

1. Config

Because this is a purely front-end framework and requires a browser to work, it will not work with SSR, so it needs to be disabled.
Create a file: src/routes/+layout.js and add this:


 	export const ssr = false;
 	

2. CSS

If you're using SvelteKit, you need to add the ui.css file to the static folder,
@@ -53,14 +53,14 @@ var f1=Object.create;var Vu=Object.defineProperty;var c1=Object.getOwnPropertyDe ... <link rel="stylesheet" href="%sveltekit.assets%/ui.css" /> </head> -

Once that's done, you can import the components as normal.

`,w=m(),v=h("div"),v.innerHTML=`

Development

You need node & npm (obviously). Then, run these:


+	

Once that's done, you can import the components as normal.

`,v=m(),y=p("div"),y.innerHTML=`

Development

You need node & npm (obviously). Then, run these:


 	git clone git@github.com:perfect-things/ui.git perfectthings-ui
 	cd perfectthings-ui
 	npm i && npm start
-	

A browser window should open with the demo of the components.

`,k=m(),x=h("div"),x.innerHTML=`

Resources & Credits

`,O(i,"class","logo"),Hm(i.src,o="logo.svg")||O(i,"src",o),O(i,"alt","Logo"),O(u,"class","logotype"),O(n,"href","https://ui.perfectthings.dev"),O(e,"class","banner"),O(g,"class","sticky-block"),O(_,"class","sticky-block"),O(v,"class","sticky-block"),O(x,"class","sticky-block")},m(A,T){l(A,e,T),P(e,n),P(n,i),P(n,r),P(n,u),P(u,a),P(u,c),P(u,f),l(A,d,T),l(A,b,T),l(A,p,T),l(A,g,T),l(A,$,T),l(A,_,T),l(A,w,T),l(A,v,T),l(A,k,T),l(A,x,T)},p:Pe,i:Pe,o:Pe,d(A){A&&(s(e),s(d),s(b),s(p),s(g),s($),s(_),s(w),s(v),s(k),s(x))}}}var pd=class extends ce{constructor(e){super(),pe(this,e,null,C0,de,{})}},jg=pd;function D0(t){let e,n,i,o,r,u,a,c,f,d,b,p,g,$,_,w,v,k,x,A,T,y,S,q,I,F,z,W,N,X,U,H,Q,j,K,ee,be,G,V,ue,ie,Y,J,se,le,ge,He,fe,we,Te,re,oe,ae,Ce,_e,Ie,ye,te,Le,Ge,ut,et,ft,Ze,pt,rt,ht,ke,it,ct,gt,at,ve,Oe,qt,ot,Dt,wt,bt,De,Re,nn,Wt,Ee,We,Vt,Jt,Gt,Yt,$e,xe,on,Bt,sn,Cn,ln,Dn,rn,Ln,an,An,un,$n,fn,yn,cn,gn,he,Ae,zn,xn,Vn,In,Wn,On,Gn,Pn,zi,gi,Vi,bi,Wi,_i,Gi,vi,Yi,wi,Ui,$i,Ki,Xi,Zi,yi,Ji,jo,Ir,zo,Or,Vo,Pr,Wo,Hr,Go,Fr,Yo,Nr,Uo,qr,Ko,Br,Xo,Rr,Zo,jr,Jo,zr,Qo,Vr,es,Wr,ts,Gr,ns,Yr,is,Ur,os,Kr,ss,Xr,ls,Zr,rs,Jr,as,Qr,us,ea,fs,ta,cs,na,ds,ia,ms,oa,ps,sa,hs,la,gs,ra,bs,aa,_s,ua,vs,fa,ws,ca,$s,da,ys,ma,ks,pa,Ts,ha,Ms,ga,Es,ba,Ss,_a,Cs,va,Ds,wa,Ls,$a,As,ya,xs,ka,Is,Ta,Os,Ma,Ps,Ea,Hs,Sa,Fs,Ca,Ns,Da,qs,La,Bs,Aa,Rs,xa,js,Ia,zs,Oa,Vs,Pa,Ws,Ha,Gs,Fa,Ys,Na,Us,qa,Ks,Ba,Xs,Ra,Zs,ja,Js,za,Qs,Va,el,Wa,tl,Ga,nl,Ya,il,Ua,ol,Ka,sl,Xa,ll,Za,rl,Ja,al,Qa,eu,tu,ul,nu,fl,iu,cl,ou,dl,su,ml,lu,pl,ru,hl,au,gl,uu,bl,fu,_l,cu,vl,du,wl,mu,$l,pu,yl,hu,kl,gu,Tl,bu,Ml,_u,El,vu,Sl,wu,Cl,$u,yu,ku,Dl,Tu,Ll,Mu,Eu,Su,Al,Cu,xl,Du,Il,Lu,Ol,Au,Pl,xu,Hl,Iu,Fl,Ou,Nl,Pu,ql,Hu,Bl,Fu,Nu,qu,Rl,Bu,jl,Ru,ju,zu,zl;return{c(){e=h("h1"),e.textContent="Changelog",n=m(),i=h("h2"),i.innerHTML="v9.0.0 (2023-08-28)",o=m(),r=h("ul"),r.innerHTML="
  • Improved: Tooltip was simplified and now the positioning ensures that the tooltip is always visible on the screen.
  • Improved: 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).
  • ",u=m(),a=h("h3"),a.textContent="Breaking changes",c=m(),f=h("ul"),f.innerHTML="
  • 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.
  • ",d=m(),b=h("hr"),p=m(),g=h("h2"),g.innerHTML="v8.4.5, v8.4.4 (2023-08-26)",$=m(),_=h("ul"),_.innerHTML="
  • Standardise InputSearch UX: clear button and Escape-to-clear behaviour now works the same in different browsers.
  • Enhance Popover so that it updates its position after it detects a content change.
  • Expose Popover's updatePosition function.
  • Tweak the dropdown-align function for popover.
  • ",w=m(),v=h("h2"),v.innerHTML="v8.4.3 (2023-08-25)",k=m(),x=h("ul"),x.innerHTML="
  • Fix InputRadio group block padding.
  • ",A=m(),T=h("h2"),T.innerHTML="v8.4.2, v8.4.1, v8.4.0 (2023-08-24)",y=m(),S=h("ul"),S.innerHTML="
  • 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.
  • ",q=m(),I=h("h2"),I.innerHTML="v8.3.3 (2023-08-19)",F=m(),z=h("ul"),z.innerHTML="
  • Inputs with dropdowns (e.g. Combobox and InputDate) will not trigger page scroll on focus (in mobile Safari).
  • Combobox dropdown will now auto-adjust its position when the virtual keyboard opens (in mobile Safari).
  • :focus has been updated to :focus-visible for non-input elements, for a better look.
  • ",W=m(),N=h("h2"),N.innerHTML="v8.3.2 (2023-08-18)",X=m(),U=h("ul"),U.innerHTML="
  • 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.
  • ",H=m(),Q=h("h2"),Q.innerHTML="v8.3.1 (2023-08-14)",j=m(),K=h("ul"),K.innerHTML="
  • 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).
  • ",ee=m(),be=h("h2"),be.innerHTML="v8.3.0 (2023-08-11)",G=m(),V=h("ul"),V.innerHTML="
  • New: InputSearch component. Not much more than InputText, except the search icon and (depending on the browser) - the clear button.
  • Fixed a weird and edge-case issue with Menu on mobile Safari (#119).
  • ",ue=m(),ie=h("h2"),ie.innerHTML="v8.2.0 (2023-08-08)",Y=m(),J=h("ul"),J.innerHTML="
  • 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).
  • ",se=m(),le=h("h2"),le.innerHTML="v8.1.4 (2023-07-31)",ge=m(),He=h("ul"),He.innerHTML="
  • Improved PushButton pressed styling.
  • Some buttons should now react faster on mobile (touch-action added to notification buttons and all inputs, selects and textareas).
  • ",fe=m(),we=h("h2"),we.innerHTML="v8.1.3 (2023-07-30)",Te=m(),re=h("ul"),re.innerHTML="
  • PushButton now has better contrast (when pressed).
  • Fixed showMessage style for long messages on mobile.
  • Fixed password strength popup style.
  • Docs: fancy font should be applied do docs only, not to the components.
  • Docs: try swipeRight on mobile to open sidebar.
  • Added touch-action: manipulation to Label and some other missing places.
  • ",oe=m(),ae=h("h2"),ae.innerHTML="v8.1.2 (2023-07-29)",Ce=m(),_e=h("ul"),_e.innerHTML="
  • Small table style tweaks
  • Docs improvements
  • ",Ie=m(),ye=h("h2"),ye.innerHTML="v8.1.1 (2023-07-28)",te=m(),Le=h("ul"),Le.innerHTML="
  • Bring back --ui-color-accent-semi and --ui-color-highlight-semi colors.
  • Combobox and InputDate buttons should not be tabbable.
  • Combobox and InputDate buttons should toggle the dropdown on click.
  • ",Ge=m(),ut=h("h2"),ut.innerHTML="v8.1.0 (2023-07-28)",et=m(),ft=h("ul"),ft.innerHTML="
  • New: All inputs have a new attribute labelOnTheLeft which allows to move the label to the left of the input.
  • ",Ze=m(),pt=h("h2"),pt.innerHTML="v8.0.1 (2023-07-26)",rt=m(),ht=h("ul"),ht.innerHTML="
  • New: Check the platform on load and add a mobile or desktop class to the html element.
  • Fixed: Menu separator is now aligned with menu items.
  • Fixed: Notifications Archive "Clear all" button is now back to normal.
  • ",ke=m(),it=h("h2"),it.innerHTML="v8.0.0 (2023-07-25)",ct=m(),gt=h("ul"),gt.innerHTML="
  • New: Label component.
  • 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.
  • Added title attribute to ButtonToggle.
  • Added success type for MessageBox.
  • Fixed selectable=false not working on Table.
  • Improved styling for Dialog and MessageBox.
  • ",at=m(),ve=h("h3"),ve.textContent="Breaking changes",Oe=m(),qt=h("ul"),qt.innerHTML="
  • Color palette has been completely revamped for better accessibility (more contrast), consistency and simplicity (fewer colors and css variables).
  • Autocomplete has been renamed to Combobox as this is what it really is.
  • Datepicker has been renamed to InputDate.
  • Toaster component has been removed. Use NotificationCenter instead.
  • Select - HTML structure has changed: .select-wrap select --> .select .input-inner .input-row select
  • Table - CSS classes have changed from .table-wrapper table.table --> .table table
  • Toggle - HTML structure has changed from .toggle .toggle-inner .toggle-scroller input --> .toggle .toggle-inner .toggle-label .toggle-scroller input
  • drawBorders attribute has been removed from Dialog, while header and footer styling has been improved for all dialogs.
  • These components previously exposed _this, which is now called element: Button, Checkbox, InputMath, PushButton, Table
  • ",ot=m(),Dt=h("h3"),Dt.textContent="Color palette - mapping from v7 to v8 colors:",wt=m(),bt=h("ul"),bt.innerHTML="
  • --ui-color-text-dark-1 --> --ui-color-text-1
  • --ui-color-text-dark-2 --> --ui-color-text-2
  • --ui-color-border-dark-1 --> --ui-color-border-1
  • --ui-color-border-dark-2 --> --ui-color-border-2
  • --ui-color-background-light-2 --> --ui-color-background-1
  • --ui-color-background-dark-2 --> --ui-color-background-2
  • --ui-color-highlight-dark-2 --> --ui-color-highlight-1
  • ",De=m(),Re=h("p"),Re.innerHTML="Other (not mentioned above) color variations, (i.e. -light- and -dark-) have been removed.",nn=m(),Wt=h("hr"),Ee=m(),We=h("h2"),We.innerHTML="v7.1.2 (2023-07-05)",Vt=m(),Jt=h("ul"),Jt.innerHTML="
  • Fix Checkbox label (don't render empty label if no label attribute was passed).
  • ",Gt=m(),Yt=h("h2"),Yt.innerHTML="v7.1.1 (2023-07-01)",$e=m(),xe=h("ul"),xe.innerHTML="
  • Fixed some NotificationCenter bugs.
  • ",on=m(),Bt=h("h2"),Bt.innerHTML="v7.1.0 (2023-06-30)",sn=m(),Cn=h("ul"),Cn.innerHTML="
  • Improve Panel component with new properties: collapsible (it's not collapsible by default), and disabled.
  • ",ln=m(),Dn=h("h2"),Dn.innerHTML="v7.0.2 (2023-06-29)",rn=m(),Ln=h("ul"),Ln.innerHTML="
  • Add success to the InfoBar component.
  • Behind the scenes refactoring and improvements.
  • ",an=m(),An=h("h2"),An.innerHTML="v7.0.1 (2023-06-28)",un=m(),$n=h("ul"),$n.innerHTML="
  • Textarea component now follows all basic inputs and support error, info, and label properties.
  • Notifications are now centered on mobile screen sizes.
  • ",fn=m(),yn=h("h2"),yn.innerHTML="v7.0.0 (2023-06-28)",cn=m(),gn=h("ul"),gn.innerHTML='
  • New: InfoBar component.
  • New: InputText, InputNumber, and Radio components.
  • New: info, error and label attributes are now supported on all basic inputs (InputText, InputNumber, InputMath, InputPassword, Radio, and Checkbox).
  • Improved: InputMath component: support for () characters, to allow for more complex expressions.
  • ',he=m(),Ae=h("h3"),Ae.textContent="Breaking changes",zn=m(),xn=h("h4"),xn.textContent="Checkbox",Vn=m(),In=h("ul"),In.innerHTML="
  • HTML structure changed input --> .checkbox .checkbox-row input
  • on:change is called with a svelte event instead of the native one, so: e.target.checked is now e.detail.checked
  • ",Wn=m(),On=h("h4"),On.textContent="InputMath",Gn=m(),Pn=h("ul"),Pn.innerHTML="
  • HTML structure changed .input-math-wrapper input --> .input-math .input-inner .input-math-row input
  • ",zi=m(),gi=h("h4"),gi.textContent="InputNumber:",Vi=m(),bi=h("ul"),bi.innerHTML="
  • HTML structure changed: input --> .input-number .input-inner input
  • ",Wi=m(),_i=h("h4"),_i.textContent="InputPassword",Gi=m(),vi=h("ul"),vi.innerHTML="
  • HTML structure changed: .input-password-wrapper .input-password-row input --> .input-password .input-inner .input-password-row input
  • ",Yi=m(),wi=h("h4"),wi.textContent="CSS variables changed:",Ui=m(),$i=h("ul"),$i.innerHTML="
  • --ui-shadow-invalid --> --ui-shadow-danger
  • ",Ki=m(),Xi=h("hr"),Zi=m(),yi=h("h2"),yi.innerHTML="v6.8.2, v6.8.1 (2023-06-21)",Ji=m(),jo=h("ul"),jo.innerHTML="
  • Allow HTML in MessageBox.
  • Improve styling for multi-line messages in MessageBox.
  • ",Ir=m(),zo=h("h2"),zo.innerHTML="v6.8.0 (2023-06-17)",Or=m(),Vo=h("ul"),Vo.innerHTML="
  • New: MessageBox component for displaying quick info/warning/error messages or confirmation dialogs (replacement for browser's native alert and confirm).
  • ",Pr=m(),Wo=h("h2"),Wo.innerHTML="v6.7.1 (2023-06-13)",Hr=m(),Go=h("ul"),Go.innerHTML="
  • Fix Menu show and hide events and clearing the highlight on mouse out.
  • ",Fr=m(),Yo=h("h2"),Yo.innerHTML="v6.7.0 (2023-06-13)",Nr=m(),Uo=h("ul"),Uo.innerHTML="
  • New: NotificationCenter component. This will eventually replace Toaster, as it's more accessible and powerful.
  • Toaster component is now deprecated and will be removed in the next major version.
  • PushButton changes:
  • ",qr=m(),Ko=h("h2"),Ko.innerHTML="v6.6.8 (2023-06-07)",Br=m(),Xo=h("ul"),Xo.innerHTML="
  • Menu improvements:
  • ",Rr=m(),Zo=h("h2"),Zo.innerHTML="v6.6.7 (2023-06-01)",jr=m(),Jo=h("ul"),Jo.innerHTML="
  • Toaster enhancements:
  • ",zr=m(),Qo=h("h2"),Qo.innerHTML="v6.6.6 (2023-05-31)",Vr=m(),es=h("ul"),es.innerHTML="
  • Fix button-toggle not working on mobile.
  • ",Wr=m(),ts=h("h2"),ts.innerHTML="v6.6.4, v6.6.5 (2023-05-12)",Gr=m(),ns=h("ul"),ns.innerHTML="
  • Bring back --ui-shadow-small property.
  • Menu performance improvements: menu will not be rendered until it's opened.
  • ",Yr=m(),is=h("h2"),is.innerHTML="v6.6.3, v6.6.2, v6.6.1, v6.6.0, (2023-05-11)",Ur=m(),os=h("ul"),os.innerHTML="
  • Select now also accepts an array of strings for items.
  • ButtonToggle now also accepts an array of strings for items.
  • em to rem, as it's more consistent and predictable.
  • ",Kr=m(),ss=h("h2"),ss.innerHTML="v6.5.5, v6.5.4, v6.5.3 (2023-05-09)",Xr=m(),ls=h("ul"),ls.innerHTML="
  • Standardise button height to match all the other controls.
  • Standardise placeholder and input-icon colours.
  • Enhance Autocomplete's and DatePicker's input-icon click experience.
  • Size the icons in em not px.
  • ",Zr=m(),rs=h("h2"),rs.innerHTML="v6.5.2 (2023-05-08)",Jr=m(),as=h("ul"),as.innerHTML="
  • Maintenance update: upgrade dependencies, remove yet another useless a11y warning from svelte zealots.
  • ",Qr=m(),us=h("h2"),us.innerHTML="v6.5.1 (2023-05-07)",ea=m(),fs=h("ul"),fs.innerHTML="
  • Menu highlighting upgrade: ArrowDown on the last item will highlight the first item, ArrowUp on the first item will highlight the last item.
  • ",ta=m(),cs=h("h2"),cs.innerHTML="v6.5.0 (2023-04-28)",na=m(),ds=h("ul"),ds.innerHTML="
  • Change the default color for a secondary button.
  • Add info type to Button component (that takes the colour of the previous default).
  • Fix round button (with text) aspect-ratio lock.
  • ",ia=m(),ms=h("h2"),ms.innerHTML="v6.4.3 (2023-04-27)",oa=m(),ps=h("ul"),ps.innerHTML="
  • Improve <InputPassword/> component: don't rerender when eye button is clicked, minor alignment style tweak.
  • Autocomplete keyboard scrolling alignment fix (highlighted item was partially cropped).
  • ",sa=m(),hs=h("h2"),hs.innerHTML="v6.4.2, v6.4.1 (2023-04-22)",la=m(),gs=h("ul"),gs.innerHTML="
  • Remove the need to inline svg icons in the consumer's build.
  • Add addIcon function to allow adding custom icons.
  • Fix menu.open issue when event was not passed.
  • ",ra=m(),bs=h("h2"),bs.innerHTML="v6.4.0 (2023-04-20)",aa=m(),_s=h("ul"),_s.innerHTML="
  • Tweaks to allow it to be used with SvelteKit.
  • ",ua=m(),vs=h("h2"),vs.innerHTML="v6.3.16, v6.3.15 (2023-04-15)",fa=m(),ws=h("ul"),ws.innerHTML="
  • New icons: undo and redo.
  • Fix ButtonGroup styling for other button types.
  • ",ca=m(),$s=h("h2"),$s.innerHTML="v6.3.14, v6.3.13 (2023-04-12)",da=m(),ys=h("ul"),ys.innerHTML="
  • Tooltip style tweaks, so it's finally perfect.
  • Minor fix in Tooltip.
  • ",ma=m(),ks=h("h2"),ks.innerHTML="v6.3.12 (2023-04-09)",pa=m(),Ts=h("ul"),Ts.innerHTML="
  • Cleanup.
  • ",ha=m(),Ms=h("h2"),Ms.innerHTML="v6.3.12, v6.3.11, v6.3.10, v6.3.9 (2023-04-07)",ga=m(),Es=h("ul"),Es.innerHTML="
  • Menu on-close should resolve instantly, when the menu is already closed.
  • Menu new attribute align allows to align the menu to the right with the target.
  • ",ba=m(),Ss=h("h2"),Ss.innerHTML="v6.3.8, v6.3.7, v6.3.6, v6.3.5, v6.3.4 (2023-04-06)",_a=m(),Cs=h("ul"),Cs.innerHTML="
  • Handle svelte's newest a11y warnings.
  • Tweak media query notation.
  • Remove menu of type='input'.
  • Allow data- attributes on Button and MenuItem.
  • Fix Menu target button's aria-expanded attribute (wasn't set to false on menu close).
  • ",va=m(),Ds=h("h2"),Ds.innerHTML="v6.3.3 (2023-04-05)",wa=m(),Ls=h("ul"),Ls.innerHTML="
  • Tooltip tip was upgraded to take advantage of the new clip-path property.
  • Tooltip tip was enhanced with color variations: success, warning and danger.
  • ",$a=m(),As=h("h2"),As.innerHTML="v6.3.2 (2023-03-30)",ya=m(),xs=h("ul"),xs.innerHTML="
  • Table will not listen to events when it's not the target.
  • Dialog buttons can now be navigated with left & right arrow keys for convenience.
  • ",ka=m(),Is=h("h2"),Is.innerHTML="v6.3.1 (2023-03-26)",Ta=m(),Os=h("ul"),Os.innerHTML="
  • ButtonGroup styling tweaks (edge buttons padding alignment)
  • ",Ma=m(),Ps=h("h2"),Ps.innerHTML="v6.3.0 (2023-03-26)",Ea=m(),Hs=h("ul"),Hs.innerHTML="
  • enhance MenuItem component (add props: class, disabled, icon, success, warning, danger)
  • ",Sa=m(),Fs=h("h2"),Fs.innerHTML="v6.2.10 (2023-03-25)",Ca=m(),Ns=h("ul"),Ns.innerHTML="
  • Also pass event target in menu on:close event.
  • ",Da=m(),qs=h("h2"),qs.innerHTML="v6.2.9 (2023-03-25)",La=m(),Bs=h("ul"),Bs.innerHTML="
  • Fix: menu on:open event was missing.
  • ",Aa=m(),Rs=h("h2"),Rs.innerHTML="v6.2.8 (2023-03-24)",xa=m(),js=h("ul"),js.innerHTML="
  • move tooltip custom class attribute to the tooltip itself, not the content (so that it can easily overwrite the background color).
  • ",Ia=m(),zs=h("h2"),zs.innerHTML="v6.2.7 (2023-03-24)",Oa=m(),Vs=h("ul"),Vs.innerHTML="
  • revert some tooltip changes (events prop is actually useful)
  • ",Pa=m(),Ws=h("h2"),Ws.innerHTML="v6.2.6 (2023-03-24)",Ha=m(),Gs=h("ul"),Gs.innerHTML="
  • simplify tooltip (change bg color to accent, drop events prop and default to focus + hover)
  • ",Fa=m(),Ys=h("h2"),Ys.innerHTML="v6.2.5 (2023-03-24)",Na=m(),Us=h("ul"),Us.innerHTML='
  • disable svelte false-positive a11y warnings. See svelte#8402
  • ',qa=m(),Ks=h("h2"),Ks.innerHTML="v6.2.4 (2023-03-24)",Ba=m(),Xs=h("ul"),Xs.innerHTML="
  • update table docs (missing data prop)
  • change button's active class to touching for touch events (to not conflict with popular active class name that may be used by consumers)
  • ",Ra=m(),Zs=h("h2"),Zs.innerHTML="v6.2.3, v6.2.2 (2023-03-24)",ja=m(),Js=h("ul"),Js.innerHTML="
  • Fix issue where a selectable table would become non-selectable if another table on the same page was destroyed.
  • ",za=m(),Qs=h("h2"),Qs.innerHTML="v6.2.1 (2023-03-23)",Va=m(),el=h("ul"),el.innerHTML="
  • Datepicker should stopPropagation on Escape, when the calendar is open.
  • ",Wa=m(),tl=h("h2"),tl.innerHTML="v6.2.0 (2023-03-20)",Ga=m(),nl=h("ul"),nl.innerHTML="
  • Review accessibility of all components (added aria- roles and attributes where necessary).
  • Tweaked some components (e.g. close Tooltip on Escape)
  • Added unit tests for all components.
  • Docs pages style tweaks (e.g. color palette)
  • ",Ya=m(),il=h("h2"),il.innerHTML="v6.1.1 (2023-03-15)",Ua=m(),ol=h("ul"),ol.innerHTML="
  • Remove coverage folder from the npm package.
  • ",Ka=m(),sl=h("h2"),sl.innerHTML="v6.1.0 (2023-03-15)",Xa=m(),ll=h("ul"),ll.innerHTML="
  • Toggle component has been completely rewritten to make it more flexible and perfect.
  • ",Za=m(),rl=h("h2"),rl.innerHTML="v6.0.2, v6.0.1, v6.0.0 (2023-03-13)",Ja=m(),al=h("ul"),al.innerHTML="
  • rebrand simple-ui-components-in-svelte to @perfectthings/ui
  • ",Qa=m(),eu=h("hr"),tu=m(),ul=h("h2"),ul.innerHTML="v5.1.0 (2023-03-12)",nu=m(),fl=h("ul"),fl.innerHTML="
  • Better Menu highlighting (doesn't hl first item on open, mouseout removes the highlighting), inline with how native menus work on MacOS
  • Mobile friendlier buttons (touchstart invokes :active styling)
  • unit tests for some components
  • ",iu=m(),cl=h("h2"),cl.innerHTML="v5.0.8 (2023-03-03)",ou=m(),dl=h("ul"),dl.innerHTML="
  • Tooltip offset parameter
  • ",su=m(),ml=h("h2"),ml.innerHTML="v5.0.7 (2023-03-03)",lu=m(),pl=h("ul"),pl.innerHTML="
  • PushButton fix (pushed class was not applied)
  • ",ru=m(),hl=h("h2"),hl.innerHTML="v5.0.6 (2023-03-02)",au=m(),gl=h("ul"),gl.innerHTML="
  • Add back form property to a button
  • ",uu=m(),bl=h("h2"),bl.innerHTML="v5.0.5 (2023-03-02)",fu=m(),_l=h("ul"),_l.innerHTML="
  • Reduce memory footprint (removed some of the transform props that were no longer necessary)
  • ",cu=m(),vl=h("h2"),vl.innerHTML="v5.0.4 (2023-03-02)",du=m(),wl=h("ul"),wl.innerHTML="
  • esbuild replaced rollup for speed and simplicity
  • cleanup & refactoring
  • ",mu=m(),$l=h("h2"),$l.innerHTML="v5.0.3 (2023-03-01)",pu=m(),yl=h("ul"),yl.innerHTML="
  • Tooltip hiding fix (wasn't hiding when hovering target)
  • ",hu=m(),kl=h("h2"),kl.innerHTML="v5.0.2 (2023-03-01)",gu=m(),Tl=h("ul"),Tl.innerHTML="
  • Toaster import fix
  • Tooltip fix (some console errors were popping up)
  • ",bu=m(),Ml=h("h2"),Ml.innerHTML="v5.0.1 (2023-02-28)",_u=m(),El=h("ul"),El.innerHTML="
  • Bring back button-outline.css (it was accidentally deleted in v5.0.0)
  • ",vu=m(),Sl=h("h2"),Sl.innerHTML="v5.0.0 (2023-02-28)",wu=m(),Cl=h("ul"),Cl.innerHTML="
  • 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.
  • ",$u=m(),yu=h("hr"),ku=m(),Dl=h("h2"),Dl.innerHTML="v4.0.0 (2023-02-28)",Tu=m(),Ll=h("ul"),Ll.innerHTML="
  • Breaking change: renamed components: Item -> MenuItem, Separator -> MenuSeparator
  • Refactored the folder structure
  • ",Mu=m(),Eu=h("hr"),Su=m(),Al=h("h2"),Al.innerHTML="v3.1.2 (2023-01-04)",Cu=m(),xl=h("ul"),xl.innerHTML="
  • Toggle's innerWidth function was somehow overwriting window.innerWidth property (maybe a compiler issue?)
  • ",Du=m(),Il=h("h2"),Il.innerHTML="v3.1.1 (2023-01-04)",Lu=m(),Ol=h("ul"),Ol.innerHTML="
  • Fix input-number (could not enter decimals)
  • Fix input-math (math didn't work)
  • ",Au=m(),Pl=h("h2"),Pl.innerHTML="v3.1.0 (2023-01-03)",xu=m(),Hl=h("ul"),Hl.innerHTML="
  • 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.
  • ",Iu=m(),Fl=h("h2"),Fl.innerHTML="v3.0.1 (2022-12-30)",Ou=m(),Nl=h("ul"),Nl.innerHTML="
  • autocomplete should revert when entered value is not on the list
  • ",Pu=m(),ql=h("h2"),ql.innerHTML="v3.0.0 (2022-12-28)",Hu=m(),Bl=h("ul"),Bl.innerHTML="
  • 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.
  • ",Fu=m(),Nu=h("hr"),qu=m(),Rl=h("h2"),Rl.innerHTML="v2.1.1 (2022-12-24)",Bu=m(),jl=h("ul"),jl.innerHTML="
  • 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).
  • ",Ru=m(),ju=h("hr"),zu=m(),zl=h("h2"),zl.innerHTML="v1.7.12 (2022)"},m(B,R){l(B,e,R),l(B,n,R),l(B,i,R),l(B,o,R),l(B,r,R),l(B,u,R),l(B,a,R),l(B,c,R),l(B,f,R),l(B,d,R),l(B,b,R),l(B,p,R),l(B,g,R),l(B,$,R),l(B,_,R),l(B,w,R),l(B,v,R),l(B,k,R),l(B,x,R),l(B,A,R),l(B,T,R),l(B,y,R),l(B,S,R),l(B,q,R),l(B,I,R),l(B,F,R),l(B,z,R),l(B,W,R),l(B,N,R),l(B,X,R),l(B,U,R),l(B,H,R),l(B,Q,R),l(B,j,R),l(B,K,R),l(B,ee,R),l(B,be,R),l(B,G,R),l(B,V,R),l(B,ue,R),l(B,ie,R),l(B,Y,R),l(B,J,R),l(B,se,R),l(B,le,R),l(B,ge,R),l(B,He,R),l(B,fe,R),l(B,we,R),l(B,Te,R),l(B,re,R),l(B,oe,R),l(B,ae,R),l(B,Ce,R),l(B,_e,R),l(B,Ie,R),l(B,ye,R),l(B,te,R),l(B,Le,R),l(B,Ge,R),l(B,ut,R),l(B,et,R),l(B,ft,R),l(B,Ze,R),l(B,pt,R),l(B,rt,R),l(B,ht,R),l(B,ke,R),l(B,it,R),l(B,ct,R),l(B,gt,R),l(B,at,R),l(B,ve,R),l(B,Oe,R),l(B,qt,R),l(B,ot,R),l(B,Dt,R),l(B,wt,R),l(B,bt,R),l(B,De,R),l(B,Re,R),l(B,nn,R),l(B,Wt,R),l(B,Ee,R),l(B,We,R),l(B,Vt,R),l(B,Jt,R),l(B,Gt,R),l(B,Yt,R),l(B,$e,R),l(B,xe,R),l(B,on,R),l(B,Bt,R),l(B,sn,R),l(B,Cn,R),l(B,ln,R),l(B,Dn,R),l(B,rn,R),l(B,Ln,R),l(B,an,R),l(B,An,R),l(B,un,R),l(B,$n,R),l(B,fn,R),l(B,yn,R),l(B,cn,R),l(B,gn,R),l(B,he,R),l(B,Ae,R),l(B,zn,R),l(B,xn,R),l(B,Vn,R),l(B,In,R),l(B,Wn,R),l(B,On,R),l(B,Gn,R),l(B,Pn,R),l(B,zi,R),l(B,gi,R),l(B,Vi,R),l(B,bi,R),l(B,Wi,R),l(B,_i,R),l(B,Gi,R),l(B,vi,R),l(B,Yi,R),l(B,wi,R),l(B,Ui,R),l(B,$i,R),l(B,Ki,R),l(B,Xi,R),l(B,Zi,R),l(B,yi,R),l(B,Ji,R),l(B,jo,R),l(B,Ir,R),l(B,zo,R),l(B,Or,R),l(B,Vo,R),l(B,Pr,R),l(B,Wo,R),l(B,Hr,R),l(B,Go,R),l(B,Fr,R),l(B,Yo,R),l(B,Nr,R),l(B,Uo,R),l(B,qr,R),l(B,Ko,R),l(B,Br,R),l(B,Xo,R),l(B,Rr,R),l(B,Zo,R),l(B,jr,R),l(B,Jo,R),l(B,zr,R),l(B,Qo,R),l(B,Vr,R),l(B,es,R),l(B,Wr,R),l(B,ts,R),l(B,Gr,R),l(B,ns,R),l(B,Yr,R),l(B,is,R),l(B,Ur,R),l(B,os,R),l(B,Kr,R),l(B,ss,R),l(B,Xr,R),l(B,ls,R),l(B,Zr,R),l(B,rs,R),l(B,Jr,R),l(B,as,R),l(B,Qr,R),l(B,us,R),l(B,ea,R),l(B,fs,R),l(B,ta,R),l(B,cs,R),l(B,na,R),l(B,ds,R),l(B,ia,R),l(B,ms,R),l(B,oa,R),l(B,ps,R),l(B,sa,R),l(B,hs,R),l(B,la,R),l(B,gs,R),l(B,ra,R),l(B,bs,R),l(B,aa,R),l(B,_s,R),l(B,ua,R),l(B,vs,R),l(B,fa,R),l(B,ws,R),l(B,ca,R),l(B,$s,R),l(B,da,R),l(B,ys,R),l(B,ma,R),l(B,ks,R),l(B,pa,R),l(B,Ts,R),l(B,ha,R),l(B,Ms,R),l(B,ga,R),l(B,Es,R),l(B,ba,R),l(B,Ss,R),l(B,_a,R),l(B,Cs,R),l(B,va,R),l(B,Ds,R),l(B,wa,R),l(B,Ls,R),l(B,$a,R),l(B,As,R),l(B,ya,R),l(B,xs,R),l(B,ka,R),l(B,Is,R),l(B,Ta,R),l(B,Os,R),l(B,Ma,R),l(B,Ps,R),l(B,Ea,R),l(B,Hs,R),l(B,Sa,R),l(B,Fs,R),l(B,Ca,R),l(B,Ns,R),l(B,Da,R),l(B,qs,R),l(B,La,R),l(B,Bs,R),l(B,Aa,R),l(B,Rs,R),l(B,xa,R),l(B,js,R),l(B,Ia,R),l(B,zs,R),l(B,Oa,R),l(B,Vs,R),l(B,Pa,R),l(B,Ws,R),l(B,Ha,R),l(B,Gs,R),l(B,Fa,R),l(B,Ys,R),l(B,Na,R),l(B,Us,R),l(B,qa,R),l(B,Ks,R),l(B,Ba,R),l(B,Xs,R),l(B,Ra,R),l(B,Zs,R),l(B,ja,R),l(B,Js,R),l(B,za,R),l(B,Qs,R),l(B,Va,R),l(B,el,R),l(B,Wa,R),l(B,tl,R),l(B,Ga,R),l(B,nl,R),l(B,Ya,R),l(B,il,R),l(B,Ua,R),l(B,ol,R),l(B,Ka,R),l(B,sl,R),l(B,Xa,R),l(B,ll,R),l(B,Za,R),l(B,rl,R),l(B,Ja,R),l(B,al,R),l(B,Qa,R),l(B,eu,R),l(B,tu,R),l(B,ul,R),l(B,nu,R),l(B,fl,R),l(B,iu,R),l(B,cl,R),l(B,ou,R),l(B,dl,R),l(B,su,R),l(B,ml,R),l(B,lu,R),l(B,pl,R),l(B,ru,R),l(B,hl,R),l(B,au,R),l(B,gl,R),l(B,uu,R),l(B,bl,R),l(B,fu,R),l(B,_l,R),l(B,cu,R),l(B,vl,R),l(B,du,R),l(B,wl,R),l(B,mu,R),l(B,$l,R),l(B,pu,R),l(B,yl,R),l(B,hu,R),l(B,kl,R),l(B,gu,R),l(B,Tl,R),l(B,bu,R),l(B,Ml,R),l(B,_u,R),l(B,El,R),l(B,vu,R),l(B,Sl,R),l(B,wu,R),l(B,Cl,R),l(B,$u,R),l(B,yu,R),l(B,ku,R),l(B,Dl,R),l(B,Tu,R),l(B,Ll,R),l(B,Mu,R),l(B,Eu,R),l(B,Su,R),l(B,Al,R),l(B,Cu,R),l(B,xl,R),l(B,Du,R),l(B,Il,R),l(B,Lu,R),l(B,Ol,R),l(B,Au,R),l(B,Pl,R),l(B,xu,R),l(B,Hl,R),l(B,Iu,R),l(B,Fl,R),l(B,Ou,R),l(B,Nl,R),l(B,Pu,R),l(B,ql,R),l(B,Hu,R),l(B,Bl,R),l(B,Fu,R),l(B,Nu,R),l(B,qu,R),l(B,Rl,R),l(B,Bu,R),l(B,jl,R),l(B,Ru,R),l(B,ju,R),l(B,zu,R),l(B,zl,R)},p:Pe,i:Pe,o:Pe,d(B){B&&(s(e),s(n),s(i),s(o),s(r),s(u),s(a),s(c),s(f),s(d),s(b),s(p),s(g),s($),s(_),s(w),s(v),s(k),s(x),s(A),s(T),s(y),s(S),s(q),s(I),s(F),s(z),s(W),s(N),s(X),s(U),s(H),s(Q),s(j),s(K),s(ee),s(be),s(G),s(V),s(ue),s(ie),s(Y),s(J),s(se),s(le),s(ge),s(He),s(fe),s(we),s(Te),s(re),s(oe),s(ae),s(Ce),s(_e),s(Ie),s(ye),s(te),s(Le),s(Ge),s(ut),s(et),s(ft),s(Ze),s(pt),s(rt),s(ht),s(ke),s(it),s(ct),s(gt),s(at),s(ve),s(Oe),s(qt),s(ot),s(Dt),s(wt),s(bt),s(De),s(Re),s(nn),s(Wt),s(Ee),s(We),s(Vt),s(Jt),s(Gt),s(Yt),s($e),s(xe),s(on),s(Bt),s(sn),s(Cn),s(ln),s(Dn),s(rn),s(Ln),s(an),s(An),s(un),s($n),s(fn),s(yn),s(cn),s(gn),s(he),s(Ae),s(zn),s(xn),s(Vn),s(In),s(Wn),s(On),s(Gn),s(Pn),s(zi),s(gi),s(Vi),s(bi),s(Wi),s(_i),s(Gi),s(vi),s(Yi),s(wi),s(Ui),s($i),s(Ki),s(Xi),s(Zi),s(yi),s(Ji),s(jo),s(Ir),s(zo),s(Or),s(Vo),s(Pr),s(Wo),s(Hr),s(Go),s(Fr),s(Yo),s(Nr),s(Uo),s(qr),s(Ko),s(Br),s(Xo),s(Rr),s(Zo),s(jr),s(Jo),s(zr),s(Qo),s(Vr),s(es),s(Wr),s(ts),s(Gr),s(ns),s(Yr),s(is),s(Ur),s(os),s(Kr),s(ss),s(Xr),s(ls),s(Zr),s(rs),s(Jr),s(as),s(Qr),s(us),s(ea),s(fs),s(ta),s(cs),s(na),s(ds),s(ia),s(ms),s(oa),s(ps),s(sa),s(hs),s(la),s(gs),s(ra),s(bs),s(aa),s(_s),s(ua),s(vs),s(fa),s(ws),s(ca),s($s),s(da),s(ys),s(ma),s(ks),s(pa),s(Ts),s(ha),s(Ms),s(ga),s(Es),s(ba),s(Ss),s(_a),s(Cs),s(va),s(Ds),s(wa),s(Ls),s($a),s(As),s(ya),s(xs),s(ka),s(Is),s(Ta),s(Os),s(Ma),s(Ps),s(Ea),s(Hs),s(Sa),s(Fs),s(Ca),s(Ns),s(Da),s(qs),s(La),s(Bs),s(Aa),s(Rs),s(xa),s(js),s(Ia),s(zs),s(Oa),s(Vs),s(Pa),s(Ws),s(Ha),s(Gs),s(Fa),s(Ys),s(Na),s(Us),s(qa),s(Ks),s(Ba),s(Xs),s(Ra),s(Zs),s(ja),s(Js),s(za),s(Qs),s(Va),s(el),s(Wa),s(tl),s(Ga),s(nl),s(Ya),s(il),s(Ua),s(ol),s(Ka),s(sl),s(Xa),s(ll),s(Za),s(rl),s(Ja),s(al),s(Qa),s(eu),s(tu),s(ul),s(nu),s(fl),s(iu),s(cl),s(ou),s(dl),s(su),s(ml),s(lu),s(pl),s(ru),s(hl),s(au),s(gl),s(uu),s(bl),s(fu),s(_l),s(cu),s(vl),s(du),s(wl),s(mu),s($l),s(pu),s(yl),s(hu),s(kl),s(gu),s(Tl),s(bu),s(Ml),s(_u),s(El),s(vu),s(Sl),s(wu),s(Cl),s($u),s(yu),s(ku),s(Dl),s(Tu),s(Ll),s(Mu),s(Eu),s(Su),s(Al),s(Cu),s(xl),s(Du),s(Il),s(Lu),s(Ol),s(Au),s(Pl),s(xu),s(Hl),s(Iu),s(Fl),s(Ou),s(Nl),s(Pu),s(ql),s(Hu),s(Bl),s(Fu),s(Nu),s(qu),s(Rl),s(Bu),s(jl),s(Ru),s(ju),s(zu),s(zl))}}}var hd=class extends ce{constructor(e){super(),pe(this,e,null,D0,de,{})}},zg=hd;var Cm={};h1(Cm,{Button:()=>$d,ButtonGroup:()=>Md,ButtonToggle:()=>Sd,Checkbox:()=>Dd,ColorPalette:()=>Sm,Combobox:()=>Ad,Dialog:()=>rm,Drawer:()=>um,Icon:()=>ym,InfoBar:()=>Qd,InputDate:()=>Id,InputMath:()=>Pd,InputNumber:()=>Fd,InputPassword:()=>qd,InputSearch:()=>Rd,InputText:()=>zd,Menu:()=>wm,MessageBox:()=>im,NotificationCenter:()=>tm,Panel:()=>cm,Popover:()=>mm,PushButton:()=>kd,Radio:()=>Wd,Select:()=>Yd,Splitter:()=>Tm,Table:()=>hm,Textarea:()=>Kd,Toggle:()=>Zd,Tooltip:()=>sm,Tree:()=>bm});function Vg(t,e,n){let i=t.slice();return i[3]=e[n],i}function Wg(t){let e;return{c(){e=h("p")},m(n,i){l(n,e,i),e.innerHTML=t[1]},p(n,i){i&2&&(e.innerHTML=n[1])},d(n){n&&s(e)}}}function Gg(t){let e,n,i=t[3].name+"",o,r,u,a=Yg(t[3])+"",c,f,d=t[3].description+"",b;return{c(){e=h("tr"),n=h("td"),o=Z(i),r=m(),u=h("td"),c=m(),f=h("td"),b=m()},m(p,g){l(p,e,g),P(e,n),P(n,o),P(e,r),P(e,u),u.innerHTML=a,P(e,c),P(e,f),f.innerHTML=d,P(e,b)},p(p,g){g&4&&i!==(i=p[3].name+"")&&je(o,i),g&4&&a!==(a=Yg(p[3])+"")&&(u.innerHTML=a),g&4&&d!==(d=p[3].description+"")&&(f.innerHTML=d)},d(p){p&&s(e)}}}function L0(t){let e,n,i,o=nt(t[2]),r=[];for(let u=0;uAttributeType/ValueDescription",n=m(),i=h("tbody");for(let u=0;u`${i}`);return e.push(n.join(" | ")),t.required&&e.push("required"),t.default&&e.push(`
    (defaults to ${t.default})`),e.join(" ")}function x0(t,e,n){let{title:i="API"}=e,{description:o=""}=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,o=u.description),"props"in u&&n(2,r=u.props)},[i,o,r]}var gd=class extends ce{constructor(e){super(),pe(this,e,x0,A0,de,{title:0,description:1,props:2})}},Ne=gd;function Ug(t){let e,n;return{c(){e=h("hr"),n=h("h3"),n.textContent="Example"},m(i,o){l(i,e,o),l(i,n,o)},d(i){i&&(s(e),s(n))}}}function I0(t){let e,n,i,o,r,u=Kg(t[0])+"",a,c=!t[1]&&Ug(t);return{c(){c&&c.c(),e=m(),n=h("pre"),i=h("code"),o=Z(` - `),r=new Hn(!1),a=Z(` -`),r.a=a,O(i,"class","language-svelte")},m(f,d){c&&c.m(f,d),l(f,e,d),l(f,n,d),P(n,i),P(i,o),r.m(u,i),P(i,a)},p(f,[d]){f[1]?c&&(c.d(1),c=null):c||(c=Ug(f),c.c(),c.m(e.parentNode,e)),d&1&&u!==(u=Kg(f[0])+"")&&r.p(u)},i:Pe,o:Pe,d(f){f&&(s(e),s(n)),c&&c.d(f)}}}function Kg(t){return t.replace(/{/gim,"{").replace(/}/gim,"}").replace(//gim,">").replace(/\t/gim," ").trim()}function O0(t,e,n){let{html:i=""}=e,{notitle:o=!1}=e;return t.$$set=r=>{"html"in r&&n(0,i=r.html),"notitle"in r&&n(1,o=r.notitle)},[i,o]}var bd=class extends ce{constructor(e){super(),pe(this,e,O0,I0,de,{html:0,notitle:1})}},ze=bd;function P0(t){let e,n;return{c(){e=h("pre"),n=h("code"),O(n,"class","language-")},m(i,o){l(i,e,o),P(e,n),n.innerHTML=t[0]},p(i,[o]){o&1&&(n.innerHTML=i[0])},i:Pe,o:Pe,d(i){i&&s(e)}}}function H0(t,e,n){let{tag:i="div"}=e,{props:o={}}=e,{text:r=""}=e,u="";Un(()=>{requestAnimationFrame(a)});function a(){n(0,u=window.Prism.highlight(c(),window.Prism.languages.svelte,"svelte"))}function c(){let f={};for(let b in o)o[b]!==!1&&o[b]!==""&&(f[b]=o[b]);let d=JSON.stringify(f).replace(/"([^"]+)":/g,"$1:").replace(/(:)/g,"=").replace(/,/g," ").replace(/({|}|=true|default)/g,"").trim();return d&&(d=" "+d),r?`<${i}${d}>${r}`:`<${i}${d}/>`}return t.$$set=f=>{"tag"in f&&n(1,i=f.tag),"props"in f&&n(2,o=f.props),"text"in f&&n(3,r=f.text)},[u,i,o,r]}var _d=class extends ce{constructor(e){super(),pe(this,e,H0,P0,de,{tag:1,props:2,text:3})}},vd=_d;function F0(t){let e,n,i=[t[0]],o={};for(let r=0;rUe($,"value",ee)),v=new Rt({props:{label:"Style",items:t[3],value:""}}),v.$on("change",t[6]),x=new Rt({props:{label:"Type",items:t[4],value:""}}),x.$on("change",t[7]),T=new Rt({props:{label:"Icon",items:t[5],value:""}}),T.$on("change",t[8]);function G(Y){t[10](Y)}let V={label:"Round"};t[0].round!==void 0&&(V.value=t[0].round),S=new tn({props:V}),me.push(()=>Ue(S,"value",G));function ue(Y){t[11](Y)}let ie={label:"Disabled"};return t[0].disabled!==void 0&&(ie.value=t[0].disabled),F=new tn({props:ie}),me.push(()=>Ue(F,"value",ue)),U=new Ne({props:{props:t[2]}}),{c(){e=h("h2"),e.textContent="Button",n=m(),i=h("h3"),i.textContent="Live demo",o=m(),r=h("div"),a.c(),c=m(),L(f.$$.fragment),d=m(),b=h("hr"),p=m(),g=h("div"),L($.$$.fragment),w=m(),L(v.$$.fragment),k=m(),L(x.$$.fragment),A=m(),L(T.$$.fragment),y=m(),L(S.$$.fragment),I=m(),L(F.$$.fragment),W=m(),N=h("hr"),X=m(),L(U.$$.fragment),O(r,"class","docs-buttons-row"),Xt(r,"height","3rem"),O(g,"class","button-demo-props")},m(Y,J){l(Y,e,J),l(Y,n,J),l(Y,i,J),l(Y,o,J),l(Y,r,J),j[u].m(r,null),l(Y,c,J),C(f,Y,J),l(Y,d,J),l(Y,b,J),l(Y,p,J),l(Y,g,J),C($,g,null),P(g,w),C(v,g,null),P(g,k),C(x,g,null),P(g,A),C(T,g,null),P(g,y),C(S,g,null),P(g,I),C(F,g,null),l(Y,W,J),l(Y,N,J),l(Y,X,J),C(U,Y,J),H=!0},p(Y,[J]){let se=u;u=K(Y,J),u===se?j[u].p(Y,J):(Je(),E(j[se],1,1,()=>{j[se]=null}),Qe(),a=j[u],a?a.p(Y,J):(a=j[u]=Q[u](Y),a.c()),M(a,1),a.m(r,null));let le={};J&2&&(le.text=Y[1]),J&1&&(le.props=Y[0]),f.$set(le);let ge={};!_&&J&2&&(_=!0,ge.value=Y[1],Ye(()=>_=!1)),$.$set(ge);let He={};!q&&J&1&&(q=!0,He.value=Y[0].round,Ye(()=>q=!1)),S.$set(He);let fe={};!z&&J&1&&(z=!0,fe.value=Y[0].disabled,Ye(()=>z=!1)),F.$set(fe)},i(Y){H||(M(a),M(f.$$.fragment,Y),M($.$$.fragment,Y),M(v.$$.fragment,Y),M(x.$$.fragment,Y),M(T.$$.fragment,Y),M(S.$$.fragment,Y),M(F.$$.fragment,Y),M(U.$$.fragment,Y),H=!0)},o(Y){E(a),E(f.$$.fragment,Y),E($.$$.fragment,Y),E(v.$$.fragment,Y),E(x.$$.fragment,Y),E(T.$$.fragment,Y),E(S.$$.fragment,Y),E(F.$$.fragment,Y),E(U.$$.fragment,Y),H=!1},d(Y){Y&&(s(e),s(n),s(i),s(o),s(r),s(c),s(d),s(b),s(p),s(g),s(W),s(N),s(X)),j[u].d(),D(f,Y),D($),D(v),D(x),D(T),D(S),D(F),D(U,Y)}}}function R0(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."}],o={},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"}],c=[{name:"none",value:""},{name:"info",value:"info"},{name:"check",value:"check"},{name:"alert",value:"alert"},{name:"trash",value:"trash"}];function f(w){n(0,o.outline=!1,o),n(0,o.text=!1,o),n(0,o.link=!1,o),p(w.detail,!0)}function d(w){n(0,o.info=!1,o),n(0,o.success=!1,o),n(0,o.warning=!1,o),n(0,o.danger=!1,o),p(w.detail,!0)}function b(w){p("icon",w.detail)}function p(w,v){!w||typeof v>"u"||n(0,o[w]=v,o)}function g(w){r=w,n(1,r)}function $(w){t.$$.not_equal(o.round,w)&&(o.round=w,n(0,o))}function _(w){t.$$.not_equal(o.disabled,w)&&(o.disabled=w,n(0,o))}return[o,r,i,u,a,c,f,d,b,g,$,_]}var wd=class extends ce{constructor(e){super(),pe(this,e,R0,B0,de,{})}},$d=wd;function j0(t){let e;return{c(){e=Z("Hello")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function z0(t){let e;return{c(){e=Z("Info")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function V0(t){let e;return{c(){e=Z("Warning")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function W0(t){let e;return{c(){e=Z("Warning")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function G0(t){let e;return{c(){e=Z("Danger")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function Y0(t){let e;return{c(){e=Z("Hello")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function U0(t){let e;return{c(){e=Z("Info")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function K0(t){let e;return{c(){e=Z("Warning")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function X0(t){let e;return{c(){e=Z("Warning")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function Z0(t){let e;return{c(){e=Z("Danger")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function J0(t){let e;return{c(){e=Z("Hello")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function Q0(t){let e;return{c(){e=Z("Info")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function e2(t){let e;return{c(){e=Z("Success")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function t2(t){let e;return{c(){e=Z("Warning")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function n2(t){let e;return{c(){e=Z("Danger")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function i2(t){let e;return{c(){e=Z("Help")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function o2(t){let e;return{c(){e=Z("Info")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function s2(t){let e;return{c(){e=Z("Success")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function l2(t){let e;return{c(){e=Z("Warning")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function r2(t){let e;return{c(){e=Z("Delete")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function a2(t){let e;return{c(){e=Z("Hello")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function u2(t){let e;return{c(){e=Z("Info")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function f2(t){let e;return{c(){e=Z("Warning")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function c2(t){let e;return{c(){e=Z("Warning")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function d2(t){let e;return{c(){e=Z("Danger")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function m2(t){let e,n,i,o,r,u,a,c,f,d,b,p,g,$,_,w,v,k,x,A,T,y,S,q,I,F,z,W,N,X,U,H,Q,j,K,ee,be,G,V,ue,ie,Y,J,se,le,ge,He,fe,we,Te,re,oe,ae,Ce,_e,Ie,ye,te,Le,Ge,ut,et,ft,Ze,pt,rt,ht,ke,it,ct,gt,at,ve,Oe,qt,ot,Dt,wt,bt,De,Re,nn,Wt,Ee,We,Vt,Jt,Gt,Yt,$e,xe,on,Bt,sn,Cn,ln,Dn,rn,Ln,an,An,un,$n,fn,yn,cn,gn;return c=new tt({props:{$$slots:{default:[j0]},$$scope:{ctx:t}}}),d=new tt({props:{info:!0,$$slots:{default:[z0]},$$scope:{ctx:t}}}),p=new tt({props:{success:!0,$$slots:{default:[V0]},$$scope:{ctx:t}}}),$=new tt({props:{warning:!0,$$slots:{default:[W0]},$$scope:{ctx:t}}}),w=new tt({props:{danger:!0,$$slots:{default:[G0]},$$scope:{ctx:t}}}),T=new tt({props:{pressed:!0,$$slots:{default:[Y0]},$$scope:{ctx:t}}}),S=new tt({props:{pressed:!0,info:!0,$$slots:{default:[U0]},$$scope:{ctx:t}}}),I=new tt({props:{pressed:!0,success:!0,$$slots:{default:[K0]},$$scope:{ctx:t}}}),z=new tt({props:{pressed:!0,warning:!0,$$slots:{default:[X0]},$$scope:{ctx:t}}}),N=new tt({props:{pressed:!0,danger:!0,$$slots:{default:[Z0]},$$scope:{ctx:t}}}),j=new tt({props:{pressed:!0,disabled:!0,$$slots:{default:[J0]},$$scope:{ctx:t}}}),ee=new tt({props:{pressed:!0,disabled:!0,info:!0,$$slots:{default:[Q0]},$$scope:{ctx:t}}}),G=new tt({props:{pressed:!0,disabled:!0,success:!0,$$slots:{default:[e2]},$$scope:{ctx:t}}}),ue=new tt({props:{pressed:!0,disabled:!0,warning:!0,$$slots:{default:[t2]},$$scope:{ctx:t}}}),Y=new tt({props:{pressed:!0,disabled:!0,danger:!0,$$slots:{default:[n2]},$$scope:{ctx:t}}}),He=new tt({props:{icon:"help",$$slots:{default:[i2]},$$scope:{ctx:t}}}),we=new tt({props:{icon:"info",info:!0,$$slots:{default:[o2]},$$scope:{ctx:t}}}),re=new tt({props:{icon:"check",success:!0,$$slots:{default:[s2]},$$scope:{ctx:t}}}),ae=new tt({props:{icon:"alert",warning:!0,$$slots:{default:[l2]},$$scope:{ctx:t}}}),_e=new tt({props:{icon:"trash",danger:!0,$$slots:{default:[r2]},$$scope:{ctx:t}}}),Ge=new tt({props:{outline:!0,$$slots:{default:[a2]},$$scope:{ctx:t}}}),et=new tt({props:{outline:!0,info:!0,$$slots:{default:[u2]},$$scope:{ctx:t}}}),Ze=new tt({props:{outline:!0,success:!0,$$slots:{default:[f2]},$$scope:{ctx:t}}}),rt=new tt({props:{outline:!0,warning:!0,$$slots:{default:[c2]},$$scope:{ctx:t}}}),ke=new tt({props:{outline:!0,danger:!0,$$slots:{default:[d2]},$$scope:{ctx:t}}}),Dt=new tt({props:{icon:"help"}}),bt=new tt({props:{icon:"info",info:!0}}),Re=new tt({props:{icon:"check",success:!0}}),Wt=new tt({props:{icon:"alert",warning:!0}}),We=new tt({props:{icon:"trash",danger:!0}}),sn=new tt({props:{round:!0,icon:"help"}}),ln=new tt({props:{round:!0,icon:"info",info:!0}}),rn=new tt({props:{round:!0,icon:"check",success:!0}}),an=new tt({props:{round:!0,icon:"alert",warning:!0}}),un=new tt({props:{round:!0,icon:"trash",danger:!0}}),fn=new ze({props:{html:t[1]}}),cn=new Ne({props:{props:t[0]}}),{c(){e=h("h2"),e.textContent="Push Button",n=m(),i=h("h3"),i.textContent="Normal",o=m(),r=h("h4"),r.textContent="Default",u=m(),a=h("div"),L(c.$$.fragment),f=m(),L(d.$$.fragment),b=m(),L(p.$$.fragment),g=m(),L($.$$.fragment),_=m(),L(w.$$.fragment),v=m(),k=h("h4"),k.textContent="Pressed",x=m(),A=h("div"),L(T.$$.fragment),y=m(),L(S.$$.fragment),q=m(),L(I.$$.fragment),F=m(),L(z.$$.fragment),W=m(),L(N.$$.fragment),X=m(),U=h("h4"),U.textContent="Disabled",H=m(),Q=h("div"),L(j.$$.fragment),K=m(),L(ee.$$.fragment),be=m(),L(G.$$.fragment),V=m(),L(ue.$$.fragment),ie=m(),L(Y.$$.fragment),J=m(),se=h("h4"),se.textContent="With icon",le=m(),ge=h("div"),L(He.$$.fragment),fe=m(),L(we.$$.fragment),Te=m(),L(re.$$.fragment),oe=m(),L(ae.$$.fragment),Ce=m(),L(_e.$$.fragment),Ie=m(),ye=h("h4"),ye.textContent="Outline",te=m(),Le=h("div"),L(Ge.$$.fragment),ut=m(),L(et.$$.fragment),ft=m(),L(Ze.$$.fragment),pt=m(),L(rt.$$.fragment),ht=m(),L(ke.$$.fragment),it=m(),ct=h("hr"),gt=m(),at=h("h3"),at.textContent="Icon only buttons",ve=m(),Oe=h("h4"),Oe.textContent="Default",qt=m(),ot=h("div"),L(Dt.$$.fragment),wt=m(),L(bt.$$.fragment),De=m(),L(Re.$$.fragment),nn=m(),L(Wt.$$.fragment),Ee=m(),L(We.$$.fragment),Vt=m(),Jt=h("hr"),Gt=m(),Yt=h("h3"),Yt.textContent="Icon only, and round",$e=m(),xe=h("h4"),xe.textContent="Default",on=m(),Bt=h("div"),L(sn.$$.fragment),Cn=m(),L(ln.$$.fragment),Dn=m(),L(rn.$$.fragment),Ln=m(),L(an.$$.fragment),An=m(),L(un.$$.fragment),$n=m(),L(fn.$$.fragment),yn=m(),L(cn.$$.fragment),O(a,"class","docs-buttons-row"),O(A,"class","docs-buttons-row"),O(Q,"class","docs-buttons-row"),O(ge,"class","docs-buttons-row"),O(Le,"class","docs-buttons-row"),O(ot,"class","docs-buttons-row"),O(Bt,"class","docs-buttons-row")},m(he,Ae){l(he,e,Ae),l(he,n,Ae),l(he,i,Ae),l(he,o,Ae),l(he,r,Ae),l(he,u,Ae),l(he,a,Ae),C(c,a,null),P(a,f),C(d,a,null),P(a,b),C(p,a,null),P(a,g),C($,a,null),P(a,_),C(w,a,null),l(he,v,Ae),l(he,k,Ae),l(he,x,Ae),l(he,A,Ae),C(T,A,null),P(A,y),C(S,A,null),P(A,q),C(I,A,null),P(A,F),C(z,A,null),P(A,W),C(N,A,null),l(he,X,Ae),l(he,U,Ae),l(he,H,Ae),l(he,Q,Ae),C(j,Q,null),P(Q,K),C(ee,Q,null),P(Q,be),C(G,Q,null),P(Q,V),C(ue,Q,null),P(Q,ie),C(Y,Q,null),l(he,J,Ae),l(he,se,Ae),l(he,le,Ae),l(he,ge,Ae),C(He,ge,null),P(ge,fe),C(we,ge,null),P(ge,Te),C(re,ge,null),P(ge,oe),C(ae,ge,null),P(ge,Ce),C(_e,ge,null),l(he,Ie,Ae),l(he,ye,Ae),l(he,te,Ae),l(he,Le,Ae),C(Ge,Le,null),P(Le,ut),C(et,Le,null),P(Le,ft),C(Ze,Le,null),P(Le,pt),C(rt,Le,null),P(Le,ht),C(ke,Le,null),l(he,it,Ae),l(he,ct,Ae),l(he,gt,Ae),l(he,at,Ae),l(he,ve,Ae),l(he,Oe,Ae),l(he,qt,Ae),l(he,ot,Ae),C(Dt,ot,null),P(ot,wt),C(bt,ot,null),P(ot,De),C(Re,ot,null),P(ot,nn),C(Wt,ot,null),P(ot,Ee),C(We,ot,null),l(he,Vt,Ae),l(he,Jt,Ae),l(he,Gt,Ae),l(he,Yt,Ae),l(he,$e,Ae),l(he,xe,Ae),l(he,on,Ae),l(he,Bt,Ae),C(sn,Bt,null),P(Bt,Cn),C(ln,Bt,null),P(Bt,Dn),C(rn,Bt,null),P(Bt,Ln),C(an,Bt,null),P(Bt,An),C(un,Bt,null),l(he,$n,Ae),C(fn,he,Ae),l(he,yn,Ae),C(cn,he,Ae),gn=!0},p(he,[Ae]){let zn={};Ae&4&&(zn.$$scope={dirty:Ae,ctx:he}),c.$set(zn);let xn={};Ae&4&&(xn.$$scope={dirty:Ae,ctx:he}),d.$set(xn);let Vn={};Ae&4&&(Vn.$$scope={dirty:Ae,ctx:he}),p.$set(Vn);let In={};Ae&4&&(In.$$scope={dirty:Ae,ctx:he}),$.$set(In);let Wn={};Ae&4&&(Wn.$$scope={dirty:Ae,ctx:he}),w.$set(Wn);let On={};Ae&4&&(On.$$scope={dirty:Ae,ctx:he}),T.$set(On);let Gn={};Ae&4&&(Gn.$$scope={dirty:Ae,ctx:he}),S.$set(Gn);let Pn={};Ae&4&&(Pn.$$scope={dirty:Ae,ctx:he}),I.$set(Pn);let zi={};Ae&4&&(zi.$$scope={dirty:Ae,ctx:he}),z.$set(zi);let gi={};Ae&4&&(gi.$$scope={dirty:Ae,ctx:he}),N.$set(gi);let Vi={};Ae&4&&(Vi.$$scope={dirty:Ae,ctx:he}),j.$set(Vi);let bi={};Ae&4&&(bi.$$scope={dirty:Ae,ctx:he}),ee.$set(bi);let Wi={};Ae&4&&(Wi.$$scope={dirty:Ae,ctx:he}),G.$set(Wi);let _i={};Ae&4&&(_i.$$scope={dirty:Ae,ctx:he}),ue.$set(_i);let Gi={};Ae&4&&(Gi.$$scope={dirty:Ae,ctx:he}),Y.$set(Gi);let vi={};Ae&4&&(vi.$$scope={dirty:Ae,ctx:he}),He.$set(vi);let Yi={};Ae&4&&(Yi.$$scope={dirty:Ae,ctx:he}),we.$set(Yi);let wi={};Ae&4&&(wi.$$scope={dirty:Ae,ctx:he}),re.$set(wi);let Ui={};Ae&4&&(Ui.$$scope={dirty:Ae,ctx:he}),ae.$set(Ui);let $i={};Ae&4&&($i.$$scope={dirty:Ae,ctx:he}),_e.$set($i);let Ki={};Ae&4&&(Ki.$$scope={dirty:Ae,ctx:he}),Ge.$set(Ki);let Xi={};Ae&4&&(Xi.$$scope={dirty:Ae,ctx:he}),et.$set(Xi);let Zi={};Ae&4&&(Zi.$$scope={dirty:Ae,ctx:he}),Ze.$set(Zi);let yi={};Ae&4&&(yi.$$scope={dirty:Ae,ctx:he}),rt.$set(yi);let Ji={};Ae&4&&(Ji.$$scope={dirty:Ae,ctx:he}),ke.$set(Ji)},i(he){gn||(M(c.$$.fragment,he),M(d.$$.fragment,he),M(p.$$.fragment,he),M($.$$.fragment,he),M(w.$$.fragment,he),M(T.$$.fragment,he),M(S.$$.fragment,he),M(I.$$.fragment,he),M(z.$$.fragment,he),M(N.$$.fragment,he),M(j.$$.fragment,he),M(ee.$$.fragment,he),M(G.$$.fragment,he),M(ue.$$.fragment,he),M(Y.$$.fragment,he),M(He.$$.fragment,he),M(we.$$.fragment,he),M(re.$$.fragment,he),M(ae.$$.fragment,he),M(_e.$$.fragment,he),M(Ge.$$.fragment,he),M(et.$$.fragment,he),M(Ze.$$.fragment,he),M(rt.$$.fragment,he),M(ke.$$.fragment,he),M(Dt.$$.fragment,he),M(bt.$$.fragment,he),M(Re.$$.fragment,he),M(Wt.$$.fragment,he),M(We.$$.fragment,he),M(sn.$$.fragment,he),M(ln.$$.fragment,he),M(rn.$$.fragment,he),M(an.$$.fragment,he),M(un.$$.fragment,he),M(fn.$$.fragment,he),M(cn.$$.fragment,he),gn=!0)},o(he){E(c.$$.fragment,he),E(d.$$.fragment,he),E(p.$$.fragment,he),E($.$$.fragment,he),E(w.$$.fragment,he),E(T.$$.fragment,he),E(S.$$.fragment,he),E(I.$$.fragment,he),E(z.$$.fragment,he),E(N.$$.fragment,he),E(j.$$.fragment,he),E(ee.$$.fragment,he),E(G.$$.fragment,he),E(ue.$$.fragment,he),E(Y.$$.fragment,he),E(He.$$.fragment,he),E(we.$$.fragment,he),E(re.$$.fragment,he),E(ae.$$.fragment,he),E(_e.$$.fragment,he),E(Ge.$$.fragment,he),E(et.$$.fragment,he),E(Ze.$$.fragment,he),E(rt.$$.fragment,he),E(ke.$$.fragment,he),E(Dt.$$.fragment,he),E(bt.$$.fragment,he),E(Re.$$.fragment,he),E(Wt.$$.fragment,he),E(We.$$.fragment,he),E(sn.$$.fragment,he),E(ln.$$.fragment,he),E(rn.$$.fragment,he),E(an.$$.fragment,he),E(un.$$.fragment,he),E(fn.$$.fragment,he),E(cn.$$.fragment,he),gn=!1},d(he){he&&(s(e),s(n),s(i),s(o),s(r),s(u),s(a),s(v),s(k),s(x),s(A),s(X),s(U),s(H),s(Q),s(J),s(se),s(le),s(ge),s(Ie),s(ye),s(te),s(Le),s(it),s(ct),s(gt),s(at),s(ve),s(Oe),s(qt),s(ot),s(Vt),s(Jt),s(Gt),s(Yt),s($e),s(xe),s(on),s(Bt),s($n),s(yn)),D(c),D(d),D(p),D($),D(w),D(T),D(S),D(I),D(z),D(N),D(j),D(ee),D(G),D(ue),D(Y),D(He),D(we),D(re),D(ae),D(_e),D(Ge),D(et),D(Ze),D(rt),D(ke),D(Dt),D(bt),D(Re),D(Wt),D(We),D(sn),D(ln),D(rn),D(an),D(un),D(fn,he),D(cn,he)}}}function p2(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."}],` +

    A browser window should open with the demo of the components.

    `,T=m(),L=p("div"),L.innerHTML=`

    Resources & Credits

    `,O(i,"class","logo"),cp(i.src,o="logo.svg")||O(i,"src",o),O(i,"alt","Logo"),O(u,"class","logotype"),O(n,"href","https://ui.perfectthings.dev"),O(e,"class","banner"),O(b,"class","sticky-block"),O(_,"class","sticky-block"),O(y,"class","sticky-block"),O(L,"class","sticky-block")},m(I,E){l(I,e,E),P(e,n),P(n,i),P(n,r),P(n,u),P(u,a),P(u,c),P(u,f),l(I,d,E),l(I,g,E),l(I,h,E),l(I,b,E),l(I,$,E),l(I,_,E),l(I,v,E),l(I,y,E),l(I,T,E),l(I,L,E)},p:Me,i:Me,o:Me,d(I){I&&(s(e),s(d),s(g),s(h),s(b),s($),s(_),s(v),s(y),s(T),s(L))}}}var wd=class extends oe{constructor(e){super(),re(this,e,null,D2,se,{})}},h1=wd;function L2(t){let e,n,i,o,r,u,a,c,f,d,g,h,b,$,_,v,y,T,L,I,E,M,D,N,A,F,z,j,q,W,G,H,Q,V,X,te,$e,U,Y,de,ae,K,ee,Oe,pe,ke,Fe,me,J,ce,ue,le,fe,Se,be,Ie,we,ne,De,Ue,ut,tt,ft,et,pt,rt,ht,ye,it,ct,gt,at,_e,Pe,Bt,ot,xt,vt,Ct,xe,ze,Vt,Rt,Qt,Gt,Kt,en,Te,je,ve,Ae,on,zt,sn,Sn,ln,xn,rn,Dn,an,Ln,un,$n,fn,yn,cn,gn,ge,Le,Gn,An,Yn,In,Un,On,Kn,Hn,Xn,Pn,Zn,Fn,Jn,Nn,Yi,ki,Ui,Ti,Ki,Mi,Xi,Zi,Ji,Ei,Qi,Go,qr,Yo,Br,Uo,Rr,Ko,zr,Xo,jr,Zo,Vr,Jo,Wr,Qo,Gr,es,Yr,ts,Ur,ns,Kr,is,Xr,os,Zr,ss,Jr,ls,Qr,rs,ea,as,ta,us,na,fs,ia,cs,oa,ds,sa,ms,la,ps,ra,hs,aa,gs,ua,bs,fa,_s,ca,vs,da,ws,ma,$s,pa,ys,ha,ks,ga,Ts,ba,Ms,_a,Es,va,Cs,wa,Ss,$a,xs,ya,Ds,ka,Ls,Ta,As,Ma,Is,Ea,Os,Ca,Hs,Sa,Ps,xa,Fs,Da,Ns,La,qs,Aa,Bs,Ia,Rs,Oa,zs,Ha,js,Pa,Vs,Fa,Ws,Na,Gs,qa,Ys,Ba,Us,Ra,Ks,za,Xs,ja,Zs,Va,Js,Wa,Qs,Ga,el,Ya,tl,Ua,nl,Ka,il,Xa,ol,Za,sl,Ja,ll,Qa,rl,eu,al,tu,ul,nu,fl,iu,cl,ou,dl,su,lu,ru,ml,au,pl,uu,hl,fu,gl,cu,bl,du,_l,mu,vl,pu,wl,hu,$l,gu,yl,bu,kl,_u,Tl,vu,Ml,wu,El,$u,Cl,yu,Sl,ku,xl,Tu,Dl,Mu,Ll,Eu,Al,Cu,Su,xu,Il,Du,Ol,Lu,Au,Iu,Hl,Ou,Pl,Hu,Fl,Pu,Nl,Fu,ql,Nu,Bl,qu,Rl,Bu,zl,Ru,jl,zu,Vl,ju,Vu,Wu,Wl,Gu,Gl,Yu,Uu,Ku,Yl;return{c(){e=p("h1"),e.textContent="Changelog",n=m(),i=p("h2"),i.innerHTML="v9.0.0 (2023-08-?)",o=m(),r=p("ul"),r.innerHTML="
  • 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).
  • ",u=m(),a=p("h3"),a.textContent="Breaking changes",c=m(),f=p("ul"),f.innerHTML="
  • 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.
  • ",d=m(),g=p("hr"),h=m(),b=p("h2"),b.innerHTML="v8.4.5, v8.4.4 (2023-08-26)",$=m(),_=p("ul"),_.innerHTML="
  • Standardise InputSearch UX: clear button and Escape-to-clear behaviour now works the same in different browsers.
  • Enhance Popover so that it updates its position after it detects a content change.
  • Expose Popover's updatePosition function.
  • Tweak the dropdown-align function for popover.
  • ",v=m(),y=p("h2"),y.innerHTML="v8.4.3 (2023-08-25)",T=m(),L=p("ul"),L.innerHTML="
  • Fix InputRadio group block padding.
  • ",I=m(),E=p("h2"),E.innerHTML="v8.4.2, v8.4.1, v8.4.0 (2023-08-24)",M=m(),D=p("ul"),D.innerHTML="
  • 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.
  • ",N=m(),A=p("h2"),A.innerHTML="v8.3.3 (2023-08-19)",F=m(),z=p("ul"),z.innerHTML="
  • Inputs with dropdowns (e.g. Combobox and InputDate) will not trigger page scroll on focus (in mobile Safari).
  • Combobox dropdown will now auto-adjust its position when the virtual keyboard opens (in mobile Safari).
  • :focus has been updated to :focus-visible for non-input elements, for a better look.
  • ",j=m(),q=p("h2"),q.innerHTML="v8.3.2 (2023-08-18)",W=m(),G=p("ul"),G.innerHTML="
  • 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.
  • ",H=m(),Q=p("h2"),Q.innerHTML="v8.3.1 (2023-08-14)",V=m(),X=p("ul"),X.innerHTML="
  • 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).
  • ",te=m(),$e=p("h2"),$e.innerHTML="v8.3.0 (2023-08-11)",U=m(),Y=p("ul"),Y.innerHTML="
  • New: InputSearch component. Not much more than InputText, except the search icon and (depending on the browser) - the clear button.
  • Fixed a weird and edge-case issue with Menu on mobile Safari (#119).
  • ",de=m(),ae=p("h2"),ae.innerHTML="v8.2.0 (2023-08-08)",K=m(),ee=p("ul"),ee.innerHTML="
  • 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).
  • ",Oe=m(),pe=p("h2"),pe.innerHTML="v8.1.4 (2023-07-31)",ke=m(),Fe=p("ul"),Fe.innerHTML="
  • Improved PushButton pressed styling.
  • Some buttons should now react faster on mobile (touch-action added to notification buttons and all inputs, selects and textareas).
  • ",me=m(),J=p("h2"),J.innerHTML="v8.1.3 (2023-07-30)",ce=m(),ue=p("ul"),ue.innerHTML="
  • PushButton now has better contrast (when pressed).
  • Fixed showMessage style for long messages on mobile.
  • Fixed password strength popup style.
  • Docs: fancy font should be applied do docs only, not to the components.
  • Docs: try swipeRight on mobile to open sidebar.
  • Added touch-action: manipulation to Label and some other missing places.
  • ",le=m(),fe=p("h2"),fe.innerHTML="v8.1.2 (2023-07-29)",Se=m(),be=p("ul"),be.innerHTML="
  • Small table style tweaks
  • Docs improvements
  • ",Ie=m(),we=p("h2"),we.innerHTML="v8.1.1 (2023-07-28)",ne=m(),De=p("ul"),De.innerHTML="
  • Bring back --ui-color-accent-semi and --ui-color-highlight-semi colors.
  • Combobox and InputDate buttons should not be tabbable.
  • Combobox and InputDate buttons should toggle the dropdown on click.
  • ",Ue=m(),ut=p("h2"),ut.innerHTML="v8.1.0 (2023-07-28)",tt=m(),ft=p("ul"),ft.innerHTML="
  • New: All inputs have a new attribute labelOnTheLeft which allows to move the label to the left of the input.
  • ",et=m(),pt=p("h2"),pt.innerHTML="v8.0.1 (2023-07-26)",rt=m(),ht=p("ul"),ht.innerHTML="
  • New: Check the platform on load and add a mobile or desktop class to the html element.
  • Fixed: Menu separator is now aligned with menu items.
  • Fixed: Notifications Archive "Clear all" button is now back to normal.
  • ",ye=m(),it=p("h2"),it.innerHTML="v8.0.0 (2023-07-25)",ct=m(),gt=p("ul"),gt.innerHTML="
  • New: Label component.
  • 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.
  • Added title attribute to ButtonToggle.
  • Added success type for MessageBox.
  • Fixed selectable=false not working on Table.
  • Improved styling for Dialog and MessageBox.
  • ",at=m(),_e=p("h3"),_e.textContent="Breaking changes",Pe=m(),Bt=p("ul"),Bt.innerHTML="
  • Color palette has been completely revamped for better accessibility (more contrast), consistency and simplicity (fewer colors and css variables).
  • Autocomplete has been renamed to Combobox as this is what it really is.
  • Datepicker has been renamed to InputDate.
  • Toaster component has been removed. Use NotificationCenter instead.
  • Select - HTML structure has changed: .select-wrap select --> .select .input-inner .input-row select
  • Table - CSS classes have changed from .table-wrapper table.table --> .table table
  • Toggle - HTML structure has changed from .toggle .toggle-inner .toggle-scroller input --> .toggle .toggle-inner .toggle-label .toggle-scroller input
  • drawBorders attribute has been removed from Dialog, while header and footer styling has been improved for all dialogs.
  • These components previously exposed _this, which is now called element: Button, Checkbox, InputMath, PushButton, Table
  • ",ot=m(),xt=p("h3"),xt.textContent="Color palette - mapping from v7 to v8 colors:",vt=m(),Ct=p("ul"),Ct.innerHTML="
  • --ui-color-text-dark-1 --> --ui-color-text-1
  • --ui-color-text-dark-2 --> --ui-color-text-2
  • --ui-color-border-dark-1 --> --ui-color-border-1
  • --ui-color-border-dark-2 --> --ui-color-border-2
  • --ui-color-background-light-2 --> --ui-color-background-1
  • --ui-color-background-dark-2 --> --ui-color-background-2
  • --ui-color-highlight-dark-2 --> --ui-color-highlight-1
  • ",xe=m(),ze=p("p"),ze.innerHTML="Other (not mentioned above) color variations, (i.e. -light- and -dark-) have been removed.",Vt=m(),Rt=p("hr"),Qt=m(),Gt=p("h2"),Gt.innerHTML="v7.1.2 (2023-07-05)",Kt=m(),en=p("ul"),en.innerHTML="
  • Fix Checkbox label (don't render empty label if no label attribute was passed).
  • ",Te=m(),je=p("h2"),je.innerHTML="v7.1.1 (2023-07-01)",ve=m(),Ae=p("ul"),Ae.innerHTML="
  • Fixed some NotificationCenter bugs.
  • ",on=m(),zt=p("h2"),zt.innerHTML="v7.1.0 (2023-06-30)",sn=m(),Sn=p("ul"),Sn.innerHTML="
  • Improve Panel component with new properties: collapsible (it's not collapsible by default), and disabled.
  • ",ln=m(),xn=p("h2"),xn.innerHTML="v7.0.2 (2023-06-29)",rn=m(),Dn=p("ul"),Dn.innerHTML="
  • Add success to the InfoBar component.
  • Behind the scenes refactoring and improvements.
  • ",an=m(),Ln=p("h2"),Ln.innerHTML="v7.0.1 (2023-06-28)",un=m(),$n=p("ul"),$n.innerHTML="
  • Textarea component now follows all basic inputs and support error, info, and label properties.
  • Notifications are now centered on mobile screen sizes.
  • ",fn=m(),yn=p("h2"),yn.innerHTML="v7.0.0 (2023-06-28)",cn=m(),gn=p("ul"),gn.innerHTML='
  • New: InfoBar component.
  • New: InputText, InputNumber, and Radio components.
  • New: info, error and label attributes are now supported on all basic inputs (InputText, InputNumber, InputMath, InputPassword, Radio, and Checkbox).
  • Improved: InputMath component: support for () characters, to allow for more complex expressions.
  • ',ge=m(),Le=p("h3"),Le.textContent="Breaking changes",Gn=m(),An=p("h4"),An.textContent="Checkbox",Yn=m(),In=p("ul"),In.innerHTML="
  • HTML structure changed input --> .checkbox .checkbox-row input
  • on:change is called with a svelte event instead of the native one, so: e.target.checked is now e.detail.checked
  • ",Un=m(),On=p("h4"),On.textContent="InputMath",Kn=m(),Hn=p("ul"),Hn.innerHTML="
  • HTML structure changed .input-math-wrapper input --> .input-math .input-inner .input-math-row input
  • ",Xn=m(),Pn=p("h4"),Pn.textContent="InputNumber:",Zn=m(),Fn=p("ul"),Fn.innerHTML="
  • HTML structure changed: input --> .input-number .input-inner input
  • ",Jn=m(),Nn=p("h4"),Nn.textContent="InputPassword",Yi=m(),ki=p("ul"),ki.innerHTML="
  • HTML structure changed: .input-password-wrapper .input-password-row input --> .input-password .input-inner .input-password-row input
  • ",Ui=m(),Ti=p("h4"),Ti.textContent="CSS variables changed:",Ki=m(),Mi=p("ul"),Mi.innerHTML="
  • --ui-shadow-invalid --> --ui-shadow-danger
  • ",Xi=m(),Zi=p("hr"),Ji=m(),Ei=p("h2"),Ei.innerHTML="v6.8.2, v6.8.1 (2023-06-21)",Qi=m(),Go=p("ul"),Go.innerHTML="
  • Allow HTML in MessageBox.
  • Improve styling for multi-line messages in MessageBox.
  • ",qr=m(),Yo=p("h2"),Yo.innerHTML="v6.8.0 (2023-06-17)",Br=m(),Uo=p("ul"),Uo.innerHTML="
  • New: MessageBox component for displaying quick info/warning/error messages or confirmation dialogs (replacement for browser's native alert and confirm).
  • ",Rr=m(),Ko=p("h2"),Ko.innerHTML="v6.7.1 (2023-06-13)",zr=m(),Xo=p("ul"),Xo.innerHTML="
  • Fix Menu show and hide events and clearing the highlight on mouse out.
  • ",jr=m(),Zo=p("h2"),Zo.innerHTML="v6.7.0 (2023-06-13)",Vr=m(),Jo=p("ul"),Jo.innerHTML="
  • New: NotificationCenter component. This will eventually replace Toaster, as it's more accessible and powerful.
  • Toaster component is now deprecated and will be removed in the next major version.
  • PushButton changes:
    • remove link and text types, as they don't make sense (pushed state would not be visible).
    • fix outline type styling.
    • update the event passed to the on:change callback (rename property from event.detail.value to event.detail.pressed).
    • fix PushButton keyboard events (pressing Space or Enter would not trigger the on:change event).
  • ",Wr=m(),Qo=p("h2"),Qo.innerHTML="v6.6.8 (2023-06-07)",Gr=m(),es=p("ul"),es.innerHTML="
  • Menu improvements:
    • aria-expanded attribute was incorrectly being added to the body on menu open (apart from the target button).
    • Tabbing does not move focus out of the menu anymore (it will cycle through the menu items).
    • simplify html structure (ul -> menu, li/button -> button)
  • ",Yr=m(),ts=p("h2"),ts.innerHTML="v6.6.7 (2023-06-01)",Ur=m(),ns=p("ul"),ns.innerHTML="
  • Toaster enhancements:
    • Improve contrast (reduce the transparency).
    • Make toasts focusable (so that they can be closed with Escape).
    • When toasts are focused or mouse is over them, the auto-close progress will pause.
  • ",Kr=m(),is=p("h2"),is.innerHTML="v6.6.6 (2023-05-31)",Xr=m(),os=p("ul"),os.innerHTML="
  • Fix button-toggle not working on mobile.
  • ",Zr=m(),ss=p("h2"),ss.innerHTML="v6.6.4, v6.6.5 (2023-05-12)",Jr=m(),ls=p("ul"),ls.innerHTML="
  • Bring back --ui-shadow-small property.
  • Menu performance improvements: menu will not be rendered until it's opened.
  • ",Qr=m(),rs=p("h2"),rs.innerHTML="v6.6.3, v6.6.2, v6.6.1, v6.6.0, (2023-05-11)",ea=m(),as=p("ul"),as.innerHTML="
  • Select now also accepts an array of strings for items.
  • ButtonToggle now also accepts an array of strings for items.
  • em to rem, as it's more consistent and predictable.
  • ",ta=m(),us=p("h2"),us.innerHTML="v6.5.5, v6.5.4, v6.5.3 (2023-05-09)",na=m(),fs=p("ul"),fs.innerHTML="
  • Standardise button height to match all the other controls.
  • Standardise placeholder and input-icon colours.
  • Enhance Autocomplete's and DatePicker's input-icon click experience.
  • Size the icons in em not px.
  • ",ia=m(),cs=p("h2"),cs.innerHTML="v6.5.2 (2023-05-08)",oa=m(),ds=p("ul"),ds.innerHTML="
  • Maintenance update: upgrade dependencies, remove yet another useless a11y warning from svelte zealots.
  • ",sa=m(),ms=p("h2"),ms.innerHTML="v6.5.1 (2023-05-07)",la=m(),ps=p("ul"),ps.innerHTML="
  • Menu highlighting upgrade: ArrowDown on the last item will highlight the first item, ArrowUp on the first item will highlight the last item.
  • ",ra=m(),hs=p("h2"),hs.innerHTML="v6.5.0 (2023-04-28)",aa=m(),gs=p("ul"),gs.innerHTML="
  • Change the default color for a secondary button.
  • Add info type to Button component (that takes the colour of the previous default).
  • Fix round button (with text) aspect-ratio lock.
  • ",ua=m(),bs=p("h2"),bs.innerHTML="v6.4.3 (2023-04-27)",fa=m(),_s=p("ul"),_s.innerHTML="
  • Improve <InputPassword/> component: don't rerender when eye button is clicked, minor alignment style tweak.
  • Autocomplete keyboard scrolling alignment fix (highlighted item was partially cropped).
  • ",ca=m(),vs=p("h2"),vs.innerHTML="v6.4.2, v6.4.1 (2023-04-22)",da=m(),ws=p("ul"),ws.innerHTML="
  • Remove the need to inline svg icons in the consumer's build.
  • Add addIcon function to allow adding custom icons.
  • Fix menu.open issue when event was not passed.
  • ",ma=m(),$s=p("h2"),$s.innerHTML="v6.4.0 (2023-04-20)",pa=m(),ys=p("ul"),ys.innerHTML="
  • Tweaks to allow it to be used with SvelteKit.
  • ",ha=m(),ks=p("h2"),ks.innerHTML="v6.3.16, v6.3.15 (2023-04-15)",ga=m(),Ts=p("ul"),Ts.innerHTML="
  • New icons: undo and redo.
  • Fix ButtonGroup styling for other button types.
  • ",ba=m(),Ms=p("h2"),Ms.innerHTML="v6.3.14, v6.3.13 (2023-04-12)",_a=m(),Es=p("ul"),Es.innerHTML="
  • Tooltip style tweaks, so it's finally perfect.
  • Minor fix in Tooltip.
  • ",va=m(),Cs=p("h2"),Cs.innerHTML="v6.3.12 (2023-04-09)",wa=m(),Ss=p("ul"),Ss.innerHTML="
  • Cleanup.
  • ",$a=m(),xs=p("h2"),xs.innerHTML="v6.3.12, v6.3.11, v6.3.10, v6.3.9 (2023-04-07)",ya=m(),Ds=p("ul"),Ds.innerHTML="
  • Menu on-close should resolve instantly, when the menu is already closed.
  • Menu new attribute align allows to align the menu to the right with the target.
  • ",ka=m(),Ls=p("h2"),Ls.innerHTML="v6.3.8, v6.3.7, v6.3.6, v6.3.5, v6.3.4 (2023-04-06)",Ta=m(),As=p("ul"),As.innerHTML="
  • Handle svelte's newest a11y warnings.
  • Tweak media query notation.
  • Remove menu of type='input'.
  • Allow data- attributes on Button and MenuItem.
  • Fix Menu target button's aria-expanded attribute (wasn't set to false on menu close).
  • ",Ma=m(),Is=p("h2"),Is.innerHTML="v6.3.3 (2023-04-05)",Ea=m(),Os=p("ul"),Os.innerHTML="
  • Tooltip tip was upgraded to take advantage of the new clip-path property.
  • Tooltip tip was enhanced with color variations: success, warning and danger.
  • ",Ca=m(),Hs=p("h2"),Hs.innerHTML="v6.3.2 (2023-03-30)",Sa=m(),Ps=p("ul"),Ps.innerHTML="
  • Table will not listen to events when it's not the target.
  • Dialog buttons can now be navigated with left & right arrow keys for convenience.
  • ",xa=m(),Fs=p("h2"),Fs.innerHTML="v6.3.1 (2023-03-26)",Da=m(),Ns=p("ul"),Ns.innerHTML="
  • ButtonGroup styling tweaks (edge buttons padding alignment)
  • ",La=m(),qs=p("h2"),qs.innerHTML="v6.3.0 (2023-03-26)",Aa=m(),Bs=p("ul"),Bs.innerHTML="
  • enhance MenuItem component (add props: class, disabled, icon, success, warning, danger)
  • ",Ia=m(),Rs=p("h2"),Rs.innerHTML="v6.2.10 (2023-03-25)",Oa=m(),zs=p("ul"),zs.innerHTML="
  • Also pass event target in menu on:close event.
  • ",Ha=m(),js=p("h2"),js.innerHTML="v6.2.9 (2023-03-25)",Pa=m(),Vs=p("ul"),Vs.innerHTML="
  • Fix: menu on:open event was missing.
  • ",Fa=m(),Ws=p("h2"),Ws.innerHTML="v6.2.8 (2023-03-24)",Na=m(),Gs=p("ul"),Gs.innerHTML="
  • move tooltip custom class attribute to the tooltip itself, not the content (so that it can easily overwrite the background color).
  • ",qa=m(),Ys=p("h2"),Ys.innerHTML="v6.2.7 (2023-03-24)",Ba=m(),Us=p("ul"),Us.innerHTML="
  • revert some tooltip changes (events prop is actually useful)
  • ",Ra=m(),Ks=p("h2"),Ks.innerHTML="v6.2.6 (2023-03-24)",za=m(),Xs=p("ul"),Xs.innerHTML="
  • simplify tooltip (change bg color to accent, drop events prop and default to focus + hover)
  • ",ja=m(),Zs=p("h2"),Zs.innerHTML="v6.2.5 (2023-03-24)",Va=m(),Js=p("ul"),Js.innerHTML='
  • disable svelte false-positive a11y warnings. See svelte#8402
  • ',Wa=m(),Qs=p("h2"),Qs.innerHTML="v6.2.4 (2023-03-24)",Ga=m(),el=p("ul"),el.innerHTML="
  • update table docs (missing data prop)
  • change button's active class to touching for touch events (to not conflict with popular active class name that may be used by consumers)
  • ",Ya=m(),tl=p("h2"),tl.innerHTML="v6.2.3, v6.2.2 (2023-03-24)",Ua=m(),nl=p("ul"),nl.innerHTML="
  • Fix issue where a selectable table would become non-selectable if another table on the same page was destroyed.
  • ",Ka=m(),il=p("h2"),il.innerHTML="v6.2.1 (2023-03-23)",Xa=m(),ol=p("ul"),ol.innerHTML="
  • Datepicker should stopPropagation on Escape, when the calendar is open.
  • ",Za=m(),sl=p("h2"),sl.innerHTML="v6.2.0 (2023-03-20)",Ja=m(),ll=p("ul"),ll.innerHTML="
  • Review accessibility of all components (added aria- roles and attributes where necessary).
  • Tweaked some components (e.g. close Tooltip on Escape)
  • Added unit tests for all components.
  • Docs pages style tweaks (e.g. color palette)
  • ",Qa=m(),rl=p("h2"),rl.innerHTML="v6.1.1 (2023-03-15)",eu=m(),al=p("ul"),al.innerHTML="
  • Remove coverage folder from the npm package.
  • ",tu=m(),ul=p("h2"),ul.innerHTML="v6.1.0 (2023-03-15)",nu=m(),fl=p("ul"),fl.innerHTML="
  • Toggle component has been completely rewritten to make it more flexible and perfect.
  • ",iu=m(),cl=p("h2"),cl.innerHTML="v6.0.2, v6.0.1, v6.0.0 (2023-03-13)",ou=m(),dl=p("ul"),dl.innerHTML="
  • rebrand simple-ui-components-in-svelte to @perfectthings/ui
  • ",su=m(),lu=p("hr"),ru=m(),ml=p("h2"),ml.innerHTML="v5.1.0 (2023-03-12)",au=m(),pl=p("ul"),pl.innerHTML="
  • Better Menu highlighting (doesn't hl first item on open, mouseout removes the highlighting), inline with how native menus work on MacOS
  • Mobile friendlier buttons (touchstart invokes :active styling)
  • unit tests for some components
  • ",uu=m(),hl=p("h2"),hl.innerHTML="v5.0.8 (2023-03-03)",fu=m(),gl=p("ul"),gl.innerHTML="
  • Tooltip offset parameter
  • ",cu=m(),bl=p("h2"),bl.innerHTML="v5.0.7 (2023-03-03)",du=m(),_l=p("ul"),_l.innerHTML="
  • PushButton fix (pushed class was not applied)
  • ",mu=m(),vl=p("h2"),vl.innerHTML="v5.0.6 (2023-03-02)",pu=m(),wl=p("ul"),wl.innerHTML="
  • Add back form property to a button
  • ",hu=m(),$l=p("h2"),$l.innerHTML="v5.0.5 (2023-03-02)",gu=m(),yl=p("ul"),yl.innerHTML="
  • Reduce memory footprint (removed some of the transform props that were no longer necessary)
  • ",bu=m(),kl=p("h2"),kl.innerHTML="v5.0.4 (2023-03-02)",_u=m(),Tl=p("ul"),Tl.innerHTML="
  • esbuild replaced rollup for speed and simplicity
  • cleanup & refactoring
  • ",vu=m(),Ml=p("h2"),Ml.innerHTML="v5.0.3 (2023-03-01)",wu=m(),El=p("ul"),El.innerHTML="
  • Tooltip hiding fix (wasn't hiding when hovering target)
  • ",$u=m(),Cl=p("h2"),Cl.innerHTML="v5.0.2 (2023-03-01)",yu=m(),Sl=p("ul"),Sl.innerHTML="
  • Toaster import fix
  • Tooltip fix (some console errors were popping up)
  • ",ku=m(),xl=p("h2"),xl.innerHTML="v5.0.1 (2023-02-28)",Tu=m(),Dl=p("ul"),Dl.innerHTML="
  • Bring back button-outline.css (it was accidentally deleted in v5.0.0)
  • ",Mu=m(),Ll=p("h2"),Ll.innerHTML="v5.0.0 (2023-02-28)",Eu=m(),Al=p("ul"),Al.innerHTML="
  • 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.
  • ",Cu=m(),Su=p("hr"),xu=m(),Il=p("h2"),Il.innerHTML="v4.0.0 (2023-02-28)",Du=m(),Ol=p("ul"),Ol.innerHTML="
  • Breaking change: renamed components: Item -> MenuItem, Separator -> MenuSeparator
  • Refactored the folder structure
  • ",Lu=m(),Au=p("hr"),Iu=m(),Hl=p("h2"),Hl.innerHTML="v3.1.2 (2023-01-04)",Ou=m(),Pl=p("ul"),Pl.innerHTML="
  • Toggle's innerWidth function was somehow overwriting window.innerWidth property (maybe a compiler issue?)
  • ",Hu=m(),Fl=p("h2"),Fl.innerHTML="v3.1.1 (2023-01-04)",Pu=m(),Nl=p("ul"),Nl.innerHTML="
  • Fix input-number (could not enter decimals)
  • Fix input-math (math didn't work)
  • ",Fu=m(),ql=p("h2"),ql.innerHTML="v3.1.0 (2023-01-03)",Nu=m(),Bl=p("ul"),Bl.innerHTML="
  • 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.
  • ",qu=m(),Rl=p("h2"),Rl.innerHTML="v3.0.1 (2022-12-30)",Bu=m(),zl=p("ul"),zl.innerHTML="
  • autocomplete should revert when entered value is not on the list
  • ",Ru=m(),jl=p("h2"),jl.innerHTML="v3.0.0 (2022-12-28)",zu=m(),Vl=p("ul"),Vl.innerHTML="
  • 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.
  • ",ju=m(),Vu=p("hr"),Wu=m(),Wl=p("h2"),Wl.innerHTML="v2.1.1 (2022-12-24)",Gu=m(),Gl=p("ul"),Gl.innerHTML="
  • 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).
  • ",Yu=m(),Uu=p("hr"),Ku=m(),Yl=p("h2"),Yl.innerHTML="v1.7.12 (2022)"},m(B,R){l(B,e,R),l(B,n,R),l(B,i,R),l(B,o,R),l(B,r,R),l(B,u,R),l(B,a,R),l(B,c,R),l(B,f,R),l(B,d,R),l(B,g,R),l(B,h,R),l(B,b,R),l(B,$,R),l(B,_,R),l(B,v,R),l(B,y,R),l(B,T,R),l(B,L,R),l(B,I,R),l(B,E,R),l(B,M,R),l(B,D,R),l(B,N,R),l(B,A,R),l(B,F,R),l(B,z,R),l(B,j,R),l(B,q,R),l(B,W,R),l(B,G,R),l(B,H,R),l(B,Q,R),l(B,V,R),l(B,X,R),l(B,te,R),l(B,$e,R),l(B,U,R),l(B,Y,R),l(B,de,R),l(B,ae,R),l(B,K,R),l(B,ee,R),l(B,Oe,R),l(B,pe,R),l(B,ke,R),l(B,Fe,R),l(B,me,R),l(B,J,R),l(B,ce,R),l(B,ue,R),l(B,le,R),l(B,fe,R),l(B,Se,R),l(B,be,R),l(B,Ie,R),l(B,we,R),l(B,ne,R),l(B,De,R),l(B,Ue,R),l(B,ut,R),l(B,tt,R),l(B,ft,R),l(B,et,R),l(B,pt,R),l(B,rt,R),l(B,ht,R),l(B,ye,R),l(B,it,R),l(B,ct,R),l(B,gt,R),l(B,at,R),l(B,_e,R),l(B,Pe,R),l(B,Bt,R),l(B,ot,R),l(B,xt,R),l(B,vt,R),l(B,Ct,R),l(B,xe,R),l(B,ze,R),l(B,Vt,R),l(B,Rt,R),l(B,Qt,R),l(B,Gt,R),l(B,Kt,R),l(B,en,R),l(B,Te,R),l(B,je,R),l(B,ve,R),l(B,Ae,R),l(B,on,R),l(B,zt,R),l(B,sn,R),l(B,Sn,R),l(B,ln,R),l(B,xn,R),l(B,rn,R),l(B,Dn,R),l(B,an,R),l(B,Ln,R),l(B,un,R),l(B,$n,R),l(B,fn,R),l(B,yn,R),l(B,cn,R),l(B,gn,R),l(B,ge,R),l(B,Le,R),l(B,Gn,R),l(B,An,R),l(B,Yn,R),l(B,In,R),l(B,Un,R),l(B,On,R),l(B,Kn,R),l(B,Hn,R),l(B,Xn,R),l(B,Pn,R),l(B,Zn,R),l(B,Fn,R),l(B,Jn,R),l(B,Nn,R),l(B,Yi,R),l(B,ki,R),l(B,Ui,R),l(B,Ti,R),l(B,Ki,R),l(B,Mi,R),l(B,Xi,R),l(B,Zi,R),l(B,Ji,R),l(B,Ei,R),l(B,Qi,R),l(B,Go,R),l(B,qr,R),l(B,Yo,R),l(B,Br,R),l(B,Uo,R),l(B,Rr,R),l(B,Ko,R),l(B,zr,R),l(B,Xo,R),l(B,jr,R),l(B,Zo,R),l(B,Vr,R),l(B,Jo,R),l(B,Wr,R),l(B,Qo,R),l(B,Gr,R),l(B,es,R),l(B,Yr,R),l(B,ts,R),l(B,Ur,R),l(B,ns,R),l(B,Kr,R),l(B,is,R),l(B,Xr,R),l(B,os,R),l(B,Zr,R),l(B,ss,R),l(B,Jr,R),l(B,ls,R),l(B,Qr,R),l(B,rs,R),l(B,ea,R),l(B,as,R),l(B,ta,R),l(B,us,R),l(B,na,R),l(B,fs,R),l(B,ia,R),l(B,cs,R),l(B,oa,R),l(B,ds,R),l(B,sa,R),l(B,ms,R),l(B,la,R),l(B,ps,R),l(B,ra,R),l(B,hs,R),l(B,aa,R),l(B,gs,R),l(B,ua,R),l(B,bs,R),l(B,fa,R),l(B,_s,R),l(B,ca,R),l(B,vs,R),l(B,da,R),l(B,ws,R),l(B,ma,R),l(B,$s,R),l(B,pa,R),l(B,ys,R),l(B,ha,R),l(B,ks,R),l(B,ga,R),l(B,Ts,R),l(B,ba,R),l(B,Ms,R),l(B,_a,R),l(B,Es,R),l(B,va,R),l(B,Cs,R),l(B,wa,R),l(B,Ss,R),l(B,$a,R),l(B,xs,R),l(B,ya,R),l(B,Ds,R),l(B,ka,R),l(B,Ls,R),l(B,Ta,R),l(B,As,R),l(B,Ma,R),l(B,Is,R),l(B,Ea,R),l(B,Os,R),l(B,Ca,R),l(B,Hs,R),l(B,Sa,R),l(B,Ps,R),l(B,xa,R),l(B,Fs,R),l(B,Da,R),l(B,Ns,R),l(B,La,R),l(B,qs,R),l(B,Aa,R),l(B,Bs,R),l(B,Ia,R),l(B,Rs,R),l(B,Oa,R),l(B,zs,R),l(B,Ha,R),l(B,js,R),l(B,Pa,R),l(B,Vs,R),l(B,Fa,R),l(B,Ws,R),l(B,Na,R),l(B,Gs,R),l(B,qa,R),l(B,Ys,R),l(B,Ba,R),l(B,Us,R),l(B,Ra,R),l(B,Ks,R),l(B,za,R),l(B,Xs,R),l(B,ja,R),l(B,Zs,R),l(B,Va,R),l(B,Js,R),l(B,Wa,R),l(B,Qs,R),l(B,Ga,R),l(B,el,R),l(B,Ya,R),l(B,tl,R),l(B,Ua,R),l(B,nl,R),l(B,Ka,R),l(B,il,R),l(B,Xa,R),l(B,ol,R),l(B,Za,R),l(B,sl,R),l(B,Ja,R),l(B,ll,R),l(B,Qa,R),l(B,rl,R),l(B,eu,R),l(B,al,R),l(B,tu,R),l(B,ul,R),l(B,nu,R),l(B,fl,R),l(B,iu,R),l(B,cl,R),l(B,ou,R),l(B,dl,R),l(B,su,R),l(B,lu,R),l(B,ru,R),l(B,ml,R),l(B,au,R),l(B,pl,R),l(B,uu,R),l(B,hl,R),l(B,fu,R),l(B,gl,R),l(B,cu,R),l(B,bl,R),l(B,du,R),l(B,_l,R),l(B,mu,R),l(B,vl,R),l(B,pu,R),l(B,wl,R),l(B,hu,R),l(B,$l,R),l(B,gu,R),l(B,yl,R),l(B,bu,R),l(B,kl,R),l(B,_u,R),l(B,Tl,R),l(B,vu,R),l(B,Ml,R),l(B,wu,R),l(B,El,R),l(B,$u,R),l(B,Cl,R),l(B,yu,R),l(B,Sl,R),l(B,ku,R),l(B,xl,R),l(B,Tu,R),l(B,Dl,R),l(B,Mu,R),l(B,Ll,R),l(B,Eu,R),l(B,Al,R),l(B,Cu,R),l(B,Su,R),l(B,xu,R),l(B,Il,R),l(B,Du,R),l(B,Ol,R),l(B,Lu,R),l(B,Au,R),l(B,Iu,R),l(B,Hl,R),l(B,Ou,R),l(B,Pl,R),l(B,Hu,R),l(B,Fl,R),l(B,Pu,R),l(B,Nl,R),l(B,Fu,R),l(B,ql,R),l(B,Nu,R),l(B,Bl,R),l(B,qu,R),l(B,Rl,R),l(B,Bu,R),l(B,zl,R),l(B,Ru,R),l(B,jl,R),l(B,zu,R),l(B,Vl,R),l(B,ju,R),l(B,Vu,R),l(B,Wu,R),l(B,Wl,R),l(B,Gu,R),l(B,Gl,R),l(B,Yu,R),l(B,Uu,R),l(B,Ku,R),l(B,Yl,R)},p:Me,i:Me,o:Me,d(B){B&&(s(e),s(n),s(i),s(o),s(r),s(u),s(a),s(c),s(f),s(d),s(g),s(h),s(b),s($),s(_),s(v),s(y),s(T),s(L),s(I),s(E),s(M),s(D),s(N),s(A),s(F),s(z),s(j),s(q),s(W),s(G),s(H),s(Q),s(V),s(X),s(te),s($e),s(U),s(Y),s(de),s(ae),s(K),s(ee),s(Oe),s(pe),s(ke),s(Fe),s(me),s(J),s(ce),s(ue),s(le),s(fe),s(Se),s(be),s(Ie),s(we),s(ne),s(De),s(Ue),s(ut),s(tt),s(ft),s(et),s(pt),s(rt),s(ht),s(ye),s(it),s(ct),s(gt),s(at),s(_e),s(Pe),s(Bt),s(ot),s(xt),s(vt),s(Ct),s(xe),s(ze),s(Vt),s(Rt),s(Qt),s(Gt),s(Kt),s(en),s(Te),s(je),s(ve),s(Ae),s(on),s(zt),s(sn),s(Sn),s(ln),s(xn),s(rn),s(Dn),s(an),s(Ln),s(un),s($n),s(fn),s(yn),s(cn),s(gn),s(ge),s(Le),s(Gn),s(An),s(Yn),s(In),s(Un),s(On),s(Kn),s(Hn),s(Xn),s(Pn),s(Zn),s(Fn),s(Jn),s(Nn),s(Yi),s(ki),s(Ui),s(Ti),s(Ki),s(Mi),s(Xi),s(Zi),s(Ji),s(Ei),s(Qi),s(Go),s(qr),s(Yo),s(Br),s(Uo),s(Rr),s(Ko),s(zr),s(Xo),s(jr),s(Zo),s(Vr),s(Jo),s(Wr),s(Qo),s(Gr),s(es),s(Yr),s(ts),s(Ur),s(ns),s(Kr),s(is),s(Xr),s(os),s(Zr),s(ss),s(Jr),s(ls),s(Qr),s(rs),s(ea),s(as),s(ta),s(us),s(na),s(fs),s(ia),s(cs),s(oa),s(ds),s(sa),s(ms),s(la),s(ps),s(ra),s(hs),s(aa),s(gs),s(ua),s(bs),s(fa),s(_s),s(ca),s(vs),s(da),s(ws),s(ma),s($s),s(pa),s(ys),s(ha),s(ks),s(ga),s(Ts),s(ba),s(Ms),s(_a),s(Es),s(va),s(Cs),s(wa),s(Ss),s($a),s(xs),s(ya),s(Ds),s(ka),s(Ls),s(Ta),s(As),s(Ma),s(Is),s(Ea),s(Os),s(Ca),s(Hs),s(Sa),s(Ps),s(xa),s(Fs),s(Da),s(Ns),s(La),s(qs),s(Aa),s(Bs),s(Ia),s(Rs),s(Oa),s(zs),s(Ha),s(js),s(Pa),s(Vs),s(Fa),s(Ws),s(Na),s(Gs),s(qa),s(Ys),s(Ba),s(Us),s(Ra),s(Ks),s(za),s(Xs),s(ja),s(Zs),s(Va),s(Js),s(Wa),s(Qs),s(Ga),s(el),s(Ya),s(tl),s(Ua),s(nl),s(Ka),s(il),s(Xa),s(ol),s(Za),s(sl),s(Ja),s(ll),s(Qa),s(rl),s(eu),s(al),s(tu),s(ul),s(nu),s(fl),s(iu),s(cl),s(ou),s(dl),s(su),s(lu),s(ru),s(ml),s(au),s(pl),s(uu),s(hl),s(fu),s(gl),s(cu),s(bl),s(du),s(_l),s(mu),s(vl),s(pu),s(wl),s(hu),s($l),s(gu),s(yl),s(bu),s(kl),s(_u),s(Tl),s(vu),s(Ml),s(wu),s(El),s($u),s(Cl),s(yu),s(Sl),s(ku),s(xl),s(Tu),s(Dl),s(Mu),s(Ll),s(Eu),s(Al),s(Cu),s(Su),s(xu),s(Il),s(Du),s(Ol),s(Lu),s(Au),s(Iu),s(Hl),s(Ou),s(Pl),s(Hu),s(Fl),s(Pu),s(Nl),s(Fu),s(ql),s(Nu),s(Bl),s(qu),s(Rl),s(Bu),s(zl),s(Ru),s(jl),s(zu),s(Vl),s(ju),s(Vu),s(Wu),s(Wl),s(Gu),s(Gl),s(Yu),s(Uu),s(Ku),s(Yl))}}}var $d=class extends oe{constructor(e){super(),re(this,e,null,L2,se,{})}},g1=$d;var np={};Zu(np,{Button:()=>Cd,ButtonGroup:()=>Ld,ButtonToggle:()=>Id,Checkbox:()=>Hd,ColorPalette:()=>tp,Combobox:()=>Fd,Dialog:()=>mm,Drawer:()=>hm,Icon:()=>Sm,InfoBar:()=>sm,InputDate:()=>qd,InputMath:()=>Rd,InputNumber:()=>jd,InputPassword:()=>Wd,InputSearch:()=>Yd,InputText:()=>Kd,Menu:()=>Em,MessageBox:()=>um,NotificationCenter:()=>rm,Panel:()=>bm,Popover:()=>vm,PushButton:()=>xd,Radio:()=>Zd,Select:()=>Qd,Splitter:()=>Jm,Table:()=>$m,Textarea:()=>tm,Toggle:()=>im,Tooltip:()=>cm,Tree:()=>km,Utils:()=>Xm});function b1(t,e,n){let i=t.slice();return i[3]=e[n],i}function _1(t){let e;return{c(){e=p("p")},m(n,i){l(n,e,i),e.innerHTML=t[1]},p(n,i){i&2&&(e.innerHTML=n[1])},d(n){n&&s(e)}}}function v1(t){let e,n,i=t[3].name+"",o,r,u,a=w1(t[3])+"",c,f,d=t[3].description+"",g;return{c(){e=p("tr"),n=p("td"),o=Z(i),r=m(),u=p("td"),c=m(),f=p("td"),g=m()},m(h,b){l(h,e,b),P(e,n),P(n,o),P(e,r),P(e,u),u.innerHTML=a,P(e,c),P(e,f),f.innerHTML=d,P(e,g)},p(h,b){b&4&&i!==(i=h[3].name+"")&&Ve(o,i),b&4&&a!==(a=w1(h[3])+"")&&(u.innerHTML=a),b&4&&d!==(d=h[3].description+"")&&(f.innerHTML=d)},d(h){h&&s(e)}}}function A2(t){let e,n,i,o=Ke(t[2]),r=[];for(let u=0;uAttributeType/ValueDescription",n=m(),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 O2(t,e,n){let{title:i="API"}=e,{description:o=""}=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,o=u.description),"props"in u&&n(2,r=u.props)},[i,o,r]}var yd=class extends oe{constructor(e){super(),re(this,e,O2,I2,se,{title:0,description:1,props:2})}},Ne=yd;function $1(t){let e,n,i=t[2]===void 0&&y1(t);return{c(){i&&i.c(),e=m(),n=p("h3"),n.textContent="Example"},m(o,r){i&&i.m(o,r),l(o,e,r),l(o,n,r)},p(o,r){o[2]===void 0?i||(i=y1(o),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null)},d(o){o&&(s(e),s(n)),i&&i.d(o)}}}function y1(t){let e;return{c(){e=p("hr")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function H2(t){let e,n,i,o,r,u=k1(t[0])+"",a,c=!t[1]&&$1(t);return{c(){c&&c.c(),e=m(),n=p("pre"),i=p("code"),o=Z(` + `),r=new qn(!1),a=Z(` +`),r.a=a,O(i,"class","language-svelte")},m(f,d){c&&c.m(f,d),l(f,e,d),l(f,n,d),P(n,i),P(i,o),r.m(u,i),P(i,a)},p(f,[d]){f[1]?c&&(c.d(1),c=null):c?c.p(f,d):(c=$1(f),c.c(),c.m(e.parentNode,e)),d&1&&u!==(u=k1(f[0])+"")&&r.p(u)},i:Me,o:Me,d(f){f&&(s(e),s(n)),c&&c.d(f)}}}function k1(t){return t.replace(/{/gim,"{").replace(/}/gim,"}").replace(//gim,">").replace(/\t/gim," ").trim()}function P2(t,e,n){let{html:i=""}=e,{notitle:o=!1}=e,{nohr:r=void 0}=e;return t.$$set=u=>{"html"in u&&n(0,i=u.html),"notitle"in u&&n(1,o=u.notitle),"nohr"in u&&n(2,r=u.nohr)},[i,o,r]}var kd=class extends oe{constructor(e){super(),re(this,e,P2,H2,se,{html:0,notitle:1,nohr:2})}},He=kd;function F2(t){let e,n;return{c(){e=p("pre"),n=p("code"),O(n,"class","language-")},m(i,o){l(i,e,o),P(e,n),n.innerHTML=t[0]},p(i,[o]){o&1&&(n.innerHTML=i[0])},i:Me,o:Me,d(i){i&&s(e)}}}function N2(t,e,n){let{tag:i="div"}=e,{props:o={}}=e,{text:r=""}=e,u="";ei(()=>{requestAnimationFrame(a)});function a(){n(0,u=window.Prism.highlight(c(),window.Prism.languages.svelte,"svelte"))}function c(){let f={};for(let g in o)o[g]!==!1&&o[g]!==""&&(f[g]=o[g]);let d=JSON.stringify(f).replace(/"([^"]+)":/g,"$1:").replace(/(:)/g,"=").replace(/,/g," ").replace(/({|}|=true|default)/g,"").trim();return d&&(d=" "+d),r?`<${i}${d}>${r}`:`<${i}${d}/>`}return t.$$set=f=>{"tag"in f&&n(1,i=f.tag),"props"in f&&n(2,o=f.props),"text"in f&&n(3,r=f.text)},[u,i,o,r]}var Td=class extends oe{constructor(e){super(),re(this,e,N2,F2,se,{tag:1,props:2,text:3})}},Md=Td;function q2(t){let e,n,i=[t[0]],o={};for(let r=0;rZe($,"value",te)),y=new jt({props:{label:"Style",items:t[3],value:""}}),y.$on("change",t[6]),L=new jt({props:{label:"Type",items:t[4],value:""}}),L.$on("change",t[7]),E=new jt({props:{label:"Icon",items:t[5],value:""}}),E.$on("change",t[8]);function U(K){t[10](K)}let Y={label:"Round"};t[0].round!==void 0&&(Y.value=t[0].round),D=new nn({props:Y}),he.push(()=>Ze(D,"value",U));function de(K){t[11](K)}let ae={label:"Disabled"};return t[0].disabled!==void 0&&(ae.value=t[0].disabled),F=new nn({props:ae}),he.push(()=>Ze(F,"value",de)),G=new Ne({props:{props:t[2]}}),{c(){e=p("h2"),e.textContent="Button",n=m(),i=p("h3"),i.textContent="Live demo",o=m(),r=p("div"),a.c(),c=m(),x(f.$$.fragment),d=m(),g=p("hr"),h=m(),b=p("div"),x($.$$.fragment),v=m(),x(y.$$.fragment),T=m(),x(L.$$.fragment),I=m(),x(E.$$.fragment),M=m(),x(D.$$.fragment),A=m(),x(F.$$.fragment),j=m(),q=p("hr"),W=m(),x(G.$$.fragment),O(r,"class","docs-buttons-row"),Zt(r,"height","3rem"),O(b,"class","button-demo-props")},m(K,ee){l(K,e,ee),l(K,n,ee),l(K,i,ee),l(K,o,ee),l(K,r,ee),V[u].m(r,null),l(K,c,ee),C(f,K,ee),l(K,d,ee),l(K,g,ee),l(K,h,ee),l(K,b,ee),C($,b,null),P(b,v),C(y,b,null),P(b,T),C(L,b,null),P(b,I),C(E,b,null),P(b,M),C(D,b,null),P(b,A),C(F,b,null),l(K,j,ee),l(K,q,ee),l(K,W,ee),C(G,K,ee),H=!0},p(K,[ee]){let Oe=u;u=X(K,ee),u===Oe?V[u].p(K,ee):(Ge(),k(V[Oe],1,1,()=>{V[Oe]=null}),Ye(),a=V[u],a?a.p(K,ee):(a=V[u]=Q[u](K),a.c()),w(a,1),a.m(r,null));let pe={};ee&2&&(pe.text=K[1]),ee&1&&(pe.props=K[0]),f.$set(pe);let ke={};!_&&ee&2&&(_=!0,ke.value=K[1],Xe(()=>_=!1)),$.$set(ke);let Fe={};!N&&ee&1&&(N=!0,Fe.value=K[0].round,Xe(()=>N=!1)),D.$set(Fe);let me={};!z&&ee&1&&(z=!0,me.value=K[0].disabled,Xe(()=>z=!1)),F.$set(me)},i(K){H||(w(a),w(f.$$.fragment,K),w($.$$.fragment,K),w(y.$$.fragment,K),w(L.$$.fragment,K),w(E.$$.fragment,K),w(D.$$.fragment,K),w(F.$$.fragment,K),w(G.$$.fragment,K),H=!0)},o(K){k(a),k(f.$$.fragment,K),k($.$$.fragment,K),k(y.$$.fragment,K),k(L.$$.fragment,K),k(E.$$.fragment,K),k(D.$$.fragment,K),k(F.$$.fragment,K),k(G.$$.fragment,K),H=!1},d(K){K&&(s(e),s(n),s(i),s(o),s(r),s(c),s(d),s(g),s(h),s(b),s(j),s(q),s(W)),V[u].d(),S(f,K),S($),S(y),S(L),S(E),S(D),S(F),S(G,K)}}}function j2(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."}],o={},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"}],c=[{name:"none",value:""},{name:"info",value:"info"},{name:"check",value:"check"},{name:"alert",value:"alert"},{name:"trash",value:"trash"}];function f(v){n(0,o.outline=!1,o),n(0,o.text=!1,o),n(0,o.link=!1,o),h(v.detail,!0)}function d(v){n(0,o.info=!1,o),n(0,o.success=!1,o),n(0,o.warning=!1,o),n(0,o.danger=!1,o),h(v.detail,!0)}function g(v){h("icon",v.detail)}function h(v,y){!v||typeof y>"u"||n(0,o[v]=y,o)}function b(v){r=v,n(1,r)}function $(v){t.$$.not_equal(o.round,v)&&(o.round=v,n(0,o))}function _(v){t.$$.not_equal(o.disabled,v)&&(o.disabled=v,n(0,o))}return[o,r,i,u,a,c,f,d,g,b,$,_]}var Ed=class extends oe{constructor(e){super(),re(this,e,j2,z2,se,{})}},Cd=Ed;function V2(t){let e;return{c(){e=Z("Hello")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function W2(t){let e;return{c(){e=Z("Info")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function G2(t){let e;return{c(){e=Z("Warning")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function Y2(t){let e;return{c(){e=Z("Warning")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function U2(t){let e;return{c(){e=Z("Danger")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function K2(t){let e;return{c(){e=Z("Hello")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function X2(t){let e;return{c(){e=Z("Info")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function Z2(t){let e;return{c(){e=Z("Warning")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function J2(t){let e;return{c(){e=Z("Warning")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function Q2(t){let e;return{c(){e=Z("Danger")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function ev(t){let e;return{c(){e=Z("Hello")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function tv(t){let e;return{c(){e=Z("Info")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function nv(t){let e;return{c(){e=Z("Success")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function iv(t){let e;return{c(){e=Z("Warning")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function ov(t){let e;return{c(){e=Z("Danger")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function sv(t){let e;return{c(){e=Z("Help")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function lv(t){let e;return{c(){e=Z("Info")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function rv(t){let e;return{c(){e=Z("Success")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function av(t){let e;return{c(){e=Z("Warning")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function uv(t){let e;return{c(){e=Z("Delete")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function fv(t){let e;return{c(){e=Z("Hello")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function cv(t){let e;return{c(){e=Z("Info")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function dv(t){let e;return{c(){e=Z("Warning")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function mv(t){let e;return{c(){e=Z("Warning")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function pv(t){let e;return{c(){e=Z("Danger")},m(n,i){l(n,e,i)},d(n){n&&s(e)}}}function hv(t){let e,n,i,o,r,u,a,c,f,d,g,h,b,$,_,v,y,T,L,I,E,M,D,N,A,F,z,j,q,W,G,H,Q,V,X,te,$e,U,Y,de,ae,K,ee,Oe,pe,ke,Fe,me,J,ce,ue,le,fe,Se,be,Ie,we,ne,De,Ue,ut,tt,ft,et,pt,rt,ht,ye,it,ct,gt,at,_e,Pe,Bt,ot,xt,vt,Ct,xe,ze,Vt,Rt,Qt,Gt,Kt,en,Te,je,ve,Ae,on,zt,sn,Sn,ln,xn,rn,Dn,an,Ln,un,$n,fn,yn,cn,gn;return c=new nt({props:{$$slots:{default:[V2]},$$scope:{ctx:t}}}),d=new nt({props:{info:!0,$$slots:{default:[W2]},$$scope:{ctx:t}}}),h=new nt({props:{success:!0,$$slots:{default:[G2]},$$scope:{ctx:t}}}),$=new nt({props:{warning:!0,$$slots:{default:[Y2]},$$scope:{ctx:t}}}),v=new nt({props:{danger:!0,$$slots:{default:[U2]},$$scope:{ctx:t}}}),E=new nt({props:{pressed:!0,$$slots:{default:[K2]},$$scope:{ctx:t}}}),D=new nt({props:{pressed:!0,info:!0,$$slots:{default:[X2]},$$scope:{ctx:t}}}),A=new nt({props:{pressed:!0,success:!0,$$slots:{default:[Z2]},$$scope:{ctx:t}}}),z=new nt({props:{pressed:!0,warning:!0,$$slots:{default:[J2]},$$scope:{ctx:t}}}),q=new nt({props:{pressed:!0,danger:!0,$$slots:{default:[Q2]},$$scope:{ctx:t}}}),V=new nt({props:{pressed:!0,disabled:!0,$$slots:{default:[ev]},$$scope:{ctx:t}}}),te=new nt({props:{pressed:!0,disabled:!0,info:!0,$$slots:{default:[tv]},$$scope:{ctx:t}}}),U=new nt({props:{pressed:!0,disabled:!0,success:!0,$$slots:{default:[nv]},$$scope:{ctx:t}}}),de=new nt({props:{pressed:!0,disabled:!0,warning:!0,$$slots:{default:[iv]},$$scope:{ctx:t}}}),K=new nt({props:{pressed:!0,disabled:!0,danger:!0,$$slots:{default:[ov]},$$scope:{ctx:t}}}),Fe=new nt({props:{icon:"help",$$slots:{default:[sv]},$$scope:{ctx:t}}}),J=new nt({props:{icon:"info",info:!0,$$slots:{default:[lv]},$$scope:{ctx:t}}}),ue=new nt({props:{icon:"check",success:!0,$$slots:{default:[rv]},$$scope:{ctx:t}}}),fe=new nt({props:{icon:"alert",warning:!0,$$slots:{default:[av]},$$scope:{ctx:t}}}),be=new nt({props:{icon:"trash",danger:!0,$$slots:{default:[uv]},$$scope:{ctx:t}}}),Ue=new nt({props:{outline:!0,$$slots:{default:[fv]},$$scope:{ctx:t}}}),tt=new nt({props:{outline:!0,info:!0,$$slots:{default:[cv]},$$scope:{ctx:t}}}),et=new nt({props:{outline:!0,success:!0,$$slots:{default:[dv]},$$scope:{ctx:t}}}),rt=new nt({props:{outline:!0,warning:!0,$$slots:{default:[mv]},$$scope:{ctx:t}}}),ye=new nt({props:{outline:!0,danger:!0,$$slots:{default:[pv]},$$scope:{ctx:t}}}),xt=new nt({props:{icon:"help"}}),Ct=new nt({props:{icon:"info",info:!0}}),ze=new nt({props:{icon:"check",success:!0}}),Rt=new nt({props:{icon:"alert",warning:!0}}),Gt=new nt({props:{icon:"trash",danger:!0}}),sn=new nt({props:{round:!0,icon:"help"}}),ln=new nt({props:{round:!0,icon:"info",info:!0}}),rn=new nt({props:{round:!0,icon:"check",success:!0}}),an=new nt({props:{round:!0,icon:"alert",warning:!0}}),un=new nt({props:{round:!0,icon:"trash",danger:!0}}),fn=new He({props:{html:t[1]}}),cn=new Ne({props:{props:t[0]}}),{c(){e=p("h2"),e.textContent="Push Button",n=m(),i=p("h3"),i.textContent="Normal",o=m(),r=p("h4"),r.textContent="Default",u=m(),a=p("div"),x(c.$$.fragment),f=m(),x(d.$$.fragment),g=m(),x(h.$$.fragment),b=m(),x($.$$.fragment),_=m(),x(v.$$.fragment),y=m(),T=p("h4"),T.textContent="Pressed",L=m(),I=p("div"),x(E.$$.fragment),M=m(),x(D.$$.fragment),N=m(),x(A.$$.fragment),F=m(),x(z.$$.fragment),j=m(),x(q.$$.fragment),W=m(),G=p("h4"),G.textContent="Disabled",H=m(),Q=p("div"),x(V.$$.fragment),X=m(),x(te.$$.fragment),$e=m(),x(U.$$.fragment),Y=m(),x(de.$$.fragment),ae=m(),x(K.$$.fragment),ee=m(),Oe=p("h4"),Oe.textContent="With icon",pe=m(),ke=p("div"),x(Fe.$$.fragment),me=m(),x(J.$$.fragment),ce=m(),x(ue.$$.fragment),le=m(),x(fe.$$.fragment),Se=m(),x(be.$$.fragment),Ie=m(),we=p("h4"),we.textContent="Outline",ne=m(),De=p("div"),x(Ue.$$.fragment),ut=m(),x(tt.$$.fragment),ft=m(),x(et.$$.fragment),pt=m(),x(rt.$$.fragment),ht=m(),x(ye.$$.fragment),it=m(),ct=p("hr"),gt=m(),at=p("h3"),at.textContent="Icon only buttons",_e=m(),Pe=p("h4"),Pe.textContent="Default",Bt=m(),ot=p("div"),x(xt.$$.fragment),vt=m(),x(Ct.$$.fragment),xe=m(),x(ze.$$.fragment),Vt=m(),x(Rt.$$.fragment),Qt=m(),x(Gt.$$.fragment),Kt=m(),en=p("hr"),Te=m(),je=p("h3"),je.textContent="Icon only, and round",ve=m(),Ae=p("h4"),Ae.textContent="Default",on=m(),zt=p("div"),x(sn.$$.fragment),Sn=m(),x(ln.$$.fragment),xn=m(),x(rn.$$.fragment),Dn=m(),x(an.$$.fragment),Ln=m(),x(un.$$.fragment),$n=m(),x(fn.$$.fragment),yn=m(),x(cn.$$.fragment),O(a,"class","docs-buttons-row"),O(I,"class","docs-buttons-row"),O(Q,"class","docs-buttons-row"),O(ke,"class","docs-buttons-row"),O(De,"class","docs-buttons-row"),O(ot,"class","docs-buttons-row"),O(zt,"class","docs-buttons-row")},m(ge,Le){l(ge,e,Le),l(ge,n,Le),l(ge,i,Le),l(ge,o,Le),l(ge,r,Le),l(ge,u,Le),l(ge,a,Le),C(c,a,null),P(a,f),C(d,a,null),P(a,g),C(h,a,null),P(a,b),C($,a,null),P(a,_),C(v,a,null),l(ge,y,Le),l(ge,T,Le),l(ge,L,Le),l(ge,I,Le),C(E,I,null),P(I,M),C(D,I,null),P(I,N),C(A,I,null),P(I,F),C(z,I,null),P(I,j),C(q,I,null),l(ge,W,Le),l(ge,G,Le),l(ge,H,Le),l(ge,Q,Le),C(V,Q,null),P(Q,X),C(te,Q,null),P(Q,$e),C(U,Q,null),P(Q,Y),C(de,Q,null),P(Q,ae),C(K,Q,null),l(ge,ee,Le),l(ge,Oe,Le),l(ge,pe,Le),l(ge,ke,Le),C(Fe,ke,null),P(ke,me),C(J,ke,null),P(ke,ce),C(ue,ke,null),P(ke,le),C(fe,ke,null),P(ke,Se),C(be,ke,null),l(ge,Ie,Le),l(ge,we,Le),l(ge,ne,Le),l(ge,De,Le),C(Ue,De,null),P(De,ut),C(tt,De,null),P(De,ft),C(et,De,null),P(De,pt),C(rt,De,null),P(De,ht),C(ye,De,null),l(ge,it,Le),l(ge,ct,Le),l(ge,gt,Le),l(ge,at,Le),l(ge,_e,Le),l(ge,Pe,Le),l(ge,Bt,Le),l(ge,ot,Le),C(xt,ot,null),P(ot,vt),C(Ct,ot,null),P(ot,xe),C(ze,ot,null),P(ot,Vt),C(Rt,ot,null),P(ot,Qt),C(Gt,ot,null),l(ge,Kt,Le),l(ge,en,Le),l(ge,Te,Le),l(ge,je,Le),l(ge,ve,Le),l(ge,Ae,Le),l(ge,on,Le),l(ge,zt,Le),C(sn,zt,null),P(zt,Sn),C(ln,zt,null),P(zt,xn),C(rn,zt,null),P(zt,Dn),C(an,zt,null),P(zt,Ln),C(un,zt,null),l(ge,$n,Le),C(fn,ge,Le),l(ge,yn,Le),C(cn,ge,Le),gn=!0},p(ge,[Le]){let Gn={};Le&4&&(Gn.$$scope={dirty:Le,ctx:ge}),c.$set(Gn);let An={};Le&4&&(An.$$scope={dirty:Le,ctx:ge}),d.$set(An);let Yn={};Le&4&&(Yn.$$scope={dirty:Le,ctx:ge}),h.$set(Yn);let In={};Le&4&&(In.$$scope={dirty:Le,ctx:ge}),$.$set(In);let Un={};Le&4&&(Un.$$scope={dirty:Le,ctx:ge}),v.$set(Un);let On={};Le&4&&(On.$$scope={dirty:Le,ctx:ge}),E.$set(On);let Kn={};Le&4&&(Kn.$$scope={dirty:Le,ctx:ge}),D.$set(Kn);let Hn={};Le&4&&(Hn.$$scope={dirty:Le,ctx:ge}),A.$set(Hn);let Xn={};Le&4&&(Xn.$$scope={dirty:Le,ctx:ge}),z.$set(Xn);let Pn={};Le&4&&(Pn.$$scope={dirty:Le,ctx:ge}),q.$set(Pn);let Zn={};Le&4&&(Zn.$$scope={dirty:Le,ctx:ge}),V.$set(Zn);let Fn={};Le&4&&(Fn.$$scope={dirty:Le,ctx:ge}),te.$set(Fn);let Jn={};Le&4&&(Jn.$$scope={dirty:Le,ctx:ge}),U.$set(Jn);let Nn={};Le&4&&(Nn.$$scope={dirty:Le,ctx:ge}),de.$set(Nn);let Yi={};Le&4&&(Yi.$$scope={dirty:Le,ctx:ge}),K.$set(Yi);let ki={};Le&4&&(ki.$$scope={dirty:Le,ctx:ge}),Fe.$set(ki);let Ui={};Le&4&&(Ui.$$scope={dirty:Le,ctx:ge}),J.$set(Ui);let Ti={};Le&4&&(Ti.$$scope={dirty:Le,ctx:ge}),ue.$set(Ti);let Ki={};Le&4&&(Ki.$$scope={dirty:Le,ctx:ge}),fe.$set(Ki);let Mi={};Le&4&&(Mi.$$scope={dirty:Le,ctx:ge}),be.$set(Mi);let Xi={};Le&4&&(Xi.$$scope={dirty:Le,ctx:ge}),Ue.$set(Xi);let Zi={};Le&4&&(Zi.$$scope={dirty:Le,ctx:ge}),tt.$set(Zi);let Ji={};Le&4&&(Ji.$$scope={dirty:Le,ctx:ge}),et.$set(Ji);let Ei={};Le&4&&(Ei.$$scope={dirty:Le,ctx:ge}),rt.$set(Ei);let Qi={};Le&4&&(Qi.$$scope={dirty:Le,ctx:ge}),ye.$set(Qi)},i(ge){gn||(w(c.$$.fragment,ge),w(d.$$.fragment,ge),w(h.$$.fragment,ge),w($.$$.fragment,ge),w(v.$$.fragment,ge),w(E.$$.fragment,ge),w(D.$$.fragment,ge),w(A.$$.fragment,ge),w(z.$$.fragment,ge),w(q.$$.fragment,ge),w(V.$$.fragment,ge),w(te.$$.fragment,ge),w(U.$$.fragment,ge),w(de.$$.fragment,ge),w(K.$$.fragment,ge),w(Fe.$$.fragment,ge),w(J.$$.fragment,ge),w(ue.$$.fragment,ge),w(fe.$$.fragment,ge),w(be.$$.fragment,ge),w(Ue.$$.fragment,ge),w(tt.$$.fragment,ge),w(et.$$.fragment,ge),w(rt.$$.fragment,ge),w(ye.$$.fragment,ge),w(xt.$$.fragment,ge),w(Ct.$$.fragment,ge),w(ze.$$.fragment,ge),w(Rt.$$.fragment,ge),w(Gt.$$.fragment,ge),w(sn.$$.fragment,ge),w(ln.$$.fragment,ge),w(rn.$$.fragment,ge),w(an.$$.fragment,ge),w(un.$$.fragment,ge),w(fn.$$.fragment,ge),w(cn.$$.fragment,ge),gn=!0)},o(ge){k(c.$$.fragment,ge),k(d.$$.fragment,ge),k(h.$$.fragment,ge),k($.$$.fragment,ge),k(v.$$.fragment,ge),k(E.$$.fragment,ge),k(D.$$.fragment,ge),k(A.$$.fragment,ge),k(z.$$.fragment,ge),k(q.$$.fragment,ge),k(V.$$.fragment,ge),k(te.$$.fragment,ge),k(U.$$.fragment,ge),k(de.$$.fragment,ge),k(K.$$.fragment,ge),k(Fe.$$.fragment,ge),k(J.$$.fragment,ge),k(ue.$$.fragment,ge),k(fe.$$.fragment,ge),k(be.$$.fragment,ge),k(Ue.$$.fragment,ge),k(tt.$$.fragment,ge),k(et.$$.fragment,ge),k(rt.$$.fragment,ge),k(ye.$$.fragment,ge),k(xt.$$.fragment,ge),k(Ct.$$.fragment,ge),k(ze.$$.fragment,ge),k(Rt.$$.fragment,ge),k(Gt.$$.fragment,ge),k(sn.$$.fragment,ge),k(ln.$$.fragment,ge),k(rn.$$.fragment,ge),k(an.$$.fragment,ge),k(un.$$.fragment,ge),k(fn.$$.fragment,ge),k(cn.$$.fragment,ge),gn=!1},d(ge){ge&&(s(e),s(n),s(i),s(o),s(r),s(u),s(a),s(y),s(T),s(L),s(I),s(W),s(G),s(H),s(Q),s(ee),s(Oe),s(pe),s(ke),s(Ie),s(we),s(ne),s(De),s(it),s(ct),s(gt),s(at),s(_e),s(Pe),s(Bt),s(ot),s(Kt),s(en),s(Te),s(je),s(ve),s(Ae),s(on),s(zt),s($n),s(yn)),S(c),S(d),S(h),S($),S(v),S(E),S(D),S(A),S(z),S(q),S(V),S(te),S(U),S(de),S(K),S(Fe),S(J),S(ue),S(fe),S(be),S(Ue),S(tt),S(et),S(rt),S(ye),S(xt),S(Ct),S(ze),S(Rt),S(Gt),S(sn),S(ln),S(rn),S(an),S(un),S(fn,ge),S(cn,ge)}}}function gv(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."}],` diff --git a/src/notification-center/store.js b/src/notification-center/store.js index a23f445a..65f52dd6 100644 --- a/src/notification-center/store.js +++ b/src/notification-center/store.js @@ -92,10 +92,13 @@ export function showNotification (msg, type = 'info', timeout = 5000, btn, cb = export function hideNotification (id) { - Notifications.update(list => { - addToArchive(list[id]); - delete list[id]; - return list; + return new Promise(resolve => { + Notifications.update(list => { + addToArchive(list[id]); + delete list[id]; + return list; + }); + requestAnimationFrame(resolve); }); } @@ -111,8 +114,11 @@ function addToArchive (notification) { export function removeFromArchive (id) { - ArchivedNotifications.update(list => { - delete list[id]; - return list; + return new Promise(resolve => { + ArchivedNotifications.update(list => { + delete list[id]; + return list; + }); + requestAnimationFrame(resolve); }); } diff --git a/src/notification-center/utils.js b/src/notification-center/utils.js new file mode 100644 index 00000000..ae299c7f --- /dev/null +++ b/src/notification-center/utils.js @@ -0,0 +1,18 @@ +/** + * Finds the next notification to focus + * + * @param {*} el notifications list container + * @param {*} id id of the current notification + * @returns HTMLElement for the previous/next/first notification + */ +export function getNextNotification (el, id) { + if (!el) return; + const thisEl = el.querySelector(`[data-id="${id}"]`); + const all = el.querySelectorAll('.notification'); + if (!all || !all.length) return; + + const index = Array.from(all).indexOf(thisEl); + if (index < all.length - 1) return all[index + 1]; + if (index > 0) return all[index - 1]; + return all[0]; +} diff --git a/src/popover/Popover.css b/src/popover/Popover.css index a990100a..cd2993b4 100644 --- a/src/popover/Popover.css +++ b/src/popover/Popover.css @@ -6,7 +6,7 @@ position: absolute; transform: translateZ(1px); - z-index: 99; + z-index: var(--ui-z-index-elevated); } .popover { diff --git a/src/root.css b/src/root.css index e00b8de7..d2d2df4c 100644 --- a/src/root.css +++ b/src/root.css @@ -1,24 +1,25 @@ :root { + + /* BORDERS */ --ui-border-radius: 0.375rem; /* 6px */ --ui-border-radius-m: 0.6877rem;/* 11px */ --ui-border-radius-l: 1rem; /* 16px */ --ui-border-radius-xl: 5rem; /* 80px */ - /* margins & padding values */ + /* MARGIN & PADDING */ --ui-margin: 0.375rem; /* 6px */ --ui-margin-xs: 0.125rem; /* 2px */ --ui-margin-s: 0.25rem; /* 4px */ --ui-margin-m: 0.5rem; /* 8px */ --ui-margin-l: 1rem; /* 16px */ - --ui-animation-speed: .3s; + --ui-animation-speed: .3s; --ui-button-height: 2.25rem; /* 36px */ - /* font sizes */ + /* FONTS */ --ui-font-system: system-ui, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', 'sans-serif', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; - --ui-font-xs: 0.875rem; /* 14px */ --ui-font-s: 0.9375rem; /* 15px */ --ui-font-m: 1rem; /* 16px */ @@ -26,7 +27,7 @@ --ui-font-xl: 1.375rem; /* 22px */ - /* shadows */ + /* SHADOWS */ --ui-shadow-focus: 0 0 2px 1px var(--ui-color-accent); --ui-shadow-danger: 0 0 2px 1px var(--ui-color-danger); --ui-shadow-small: 0 0 0 0.5px #fff4, 0 3px 10px #0006; @@ -36,6 +37,11 @@ 0 1px 5px rgb(0 0 0 / 30%), 0 4px 10px rgb(0 0 0 / 10%), 0 10px 25px rgb(0 0 0 / 8%); + + + /* Z-INDEX */ + --ui-z-index-elevated: 9; + --ui-z-index-popup: 999; } diff --git a/src/utils.js b/src/utils.js index 45ba2957..41e09887 100644 --- a/src/utils.js +++ b/src/utils.js @@ -245,6 +245,7 @@ export function alignItem ({ top = targetBox.top + targetBox.height + offsetV; left = targetBox.left + offsetH; + if (alignH === 'right') left += targetBox.width - element.offsetWidth; else if (alignH === 'center') { left = (targetBox.width - element.offsetWidth) / 2 + targetBox.left; @@ -271,8 +272,9 @@ export function alignItem ({ } // check if the menu is off the right side of the screen - if (winW < elementBox.x + elementBox.width + viewportPadding * 2) { - left = winW - elementBox.width - (viewportPadding * 2) - 20; + const padding = alignH === 'center' ? viewportPadding * 2 : viewportPadding; + if (winW < elementBox.x + elementBox.width + padding) { + left = winW - elementBox.width - padding; if (left < 0) left = viewportPadding; left = left + window.scrollX; } diff --git a/tests/NotificationCenter-utils.spec.js b/tests/NotificationCenter-utils.spec.js new file mode 100644 index 00000000..151f2b94 --- /dev/null +++ b/tests/NotificationCenter-utils.spec.js @@ -0,0 +1,48 @@ +import './helpers/utils'; +import { getNextNotification } from '../src/notification-center/utils'; + + +describe('getNextNotification', () => { + let el; + + beforeEach(() => { + el = document.createElement('div'); + el.innerHTML = ` +
    +
    +
    + `; + document.body.appendChild(el); + }); + + test('should return the next notification element when given the current element and ID', () => { + const nextEl = getNextNotification(el, '1'); + expect(nextEl).toBe(el.querySelector('[data-id="2"]')); + }); + + test('should return the previous notification element when given the current element and ID', () => { + const prevEl = getNextNotification(el, '2'); + expect(prevEl).toBe(el.querySelector('[data-id="3"]')); + }); + + test('should return the first notification element when given the last element and ID', () => { + const firstEl = getNextNotification(el, '3'); + expect(firstEl).toBe(el.querySelector('[data-id="2"]')); + }); + + test('should return first when given an invalid ID', () => { + const nextEl = getNextNotification(el, 'invalid'); + expect(nextEl).toBe(el.querySelector('[data-id="1"]')); + }); + + test('should return undefined when given an empty element', () => { + const emptyEl = getNextNotification(null, '1'); + expect(emptyEl).toBeUndefined(); + }); + + test('should return undefined when given an element with no notifications', () => { + const emptyEl = document.createElement('div'); + const noNotificationsEl = getNextNotification(emptyEl, '1'); + expect(noNotificationsEl).toBeUndefined(); + }); +}); diff --git a/wallaby.js b/wallaby.js new file mode 100644 index 00000000..08b1e3cc --- /dev/null +++ b/wallaby.js @@ -0,0 +1,10 @@ +export default function (wallaby) { + return { + compilers: { + '**/*.js': wallaby.compilers.babel(), + }, + env: { + params: { runner: '--experimental-vm-modules' } + }, + }; +}