@purpurds/toggle 8.2.2 → 8.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"DraggableX.d.ts","sourceRoot":"","sources":["../src/DraggableX.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EAElB,KAAK,YAAY,EAIlB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,EAAE,YAAY,CAAC,gBAAgB,CAAC,CAAC;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACvC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB,CAAC;AAIF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,8EASpB,eAAe,+FAuFjB,CAAC"}
1
+ {"version":3,"file":"DraggableX.d.ts","sourceRoot":"","sources":["../src/DraggableX.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EAElB,KAAK,YAAY,EAIlB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,EAAE,YAAY,CAAC,gBAAgB,CAAC,CAAC;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACvC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB,CAAC;AAIF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAI,2EASxB,eAAe,+FAuFjB,CAAC"}
package/dist/LICENSE.txt CHANGED
@@ -1,26 +1,26 @@
1
1
  Name: @purpurds/icon
2
- Version: 8.2.1
2
+ Version: 8.2.3
3
3
  License: AGPL-3.0-only
4
4
  Private: false
5
5
 
6
6
  ---
7
7
 
8
8
  Name: @purpurds/label
9
- Version: 8.2.1
9
+ Version: 8.2.3
10
10
  License: AGPL-3.0-only
11
11
  Private: false
12
12
 
13
13
  ---
14
14
 
15
15
  Name: @purpurds/paragraph
16
- Version: 8.2.1
16
+ Version: 8.2.3
17
17
  License: AGPL-3.0-only
18
18
  Private: false
19
19
 
20
20
  ---
21
21
 
22
22
  Name: @radix-ui/primitive
23
- Version: 1.1.1
23
+ Version: 1.1.2
24
24
  License: MIT
25
25
  Private: false
26
26
  Repository: git+https://github.com/radix-ui/primitives.git
@@ -29,7 +29,7 @@ Homepage: https://radix-ui.com/primitives
29
29
  ---
30
30
 
31
31
  Name: @radix-ui/react-compose-refs
32
- Version: 1.1.1
32
+ Version: 1.1.2
33
33
  License: MIT
34
34
  Private: false
35
35
  Repository: git+https://github.com/radix-ui/primitives.git
@@ -38,7 +38,7 @@ Homepage: https://radix-ui.com/primitives
38
38
  ---
39
39
 
40
40
  Name: @radix-ui/react-context
41
- Version: 1.1.1
41
+ Version: 1.1.2
42
42
  License: MIT
43
43
  Private: false
44
44
  Repository: git+https://github.com/radix-ui/primitives.git
@@ -47,7 +47,7 @@ Homepage: https://radix-ui.com/primitives
47
47
  ---
48
48
 
49
49
  Name: @radix-ui/react-use-callback-ref
50
- Version: 1.1.0
50
+ Version: 1.1.1
51
51
  License: MIT
52
52
  Private: false
53
53
  Repository: git+https://github.com/radix-ui/primitives.git
@@ -56,7 +56,7 @@ Homepage: https://radix-ui.com/primitives
56
56
  ---
57
57
 
58
58
  Name: @radix-ui/react-use-controllable-state
59
- Version: 1.1.0
59
+ Version: 1.1.1
60
60
  License: MIT
61
61
  Private: false
62
62
  Repository: git+https://github.com/radix-ui/primitives.git
@@ -65,7 +65,7 @@ Homepage: https://radix-ui.com/primitives
65
65
  ---
66
66
 
67
67
  Name: @radix-ui/react-use-previous
68
- Version: 1.1.0
68
+ Version: 1.1.1
69
69
  License: MIT
70
70
  Private: false
71
71
  Repository: git+https://github.com/radix-ui/primitives.git
@@ -74,7 +74,7 @@ Homepage: https://radix-ui.com/primitives
74
74
  ---
75
75
 
76
76
  Name: @radix-ui/react-use-layout-effect
77
- Version: 1.1.0
77
+ Version: 1.1.1
78
78
  License: MIT
79
79
  Private: false
80
80
  Repository: git+https://github.com/radix-ui/primitives.git
@@ -83,7 +83,7 @@ Homepage: https://radix-ui.com/primitives
83
83
  ---
84
84
 
85
85
  Name: @radix-ui/react-use-size
86
- Version: 1.1.0
86
+ Version: 1.1.1
87
87
  License: MIT
88
88
  Private: false
89
89
  Repository: git+https://github.com/radix-ui/primitives.git
@@ -92,7 +92,7 @@ Homepage: https://radix-ui.com/primitives
92
92
  ---
93
93
 
94
94
  Name: @radix-ui/react-slot
95
- Version: 1.1.2
95
+ Version: 1.2.0
96
96
  License: MIT
97
97
  Private: false
98
98
  Repository: git+https://github.com/radix-ui/primitives.git
@@ -101,7 +101,7 @@ Homepage: https://radix-ui.com/primitives
101
101
  ---
102
102
 
103
103
  Name: @radix-ui/react-primitive
104
- Version: 2.0.2
104
+ Version: 2.0.3
105
105
  License: MIT
106
106
  Private: false
107
107
  Repository: git+https://github.com/radix-ui/primitives.git
@@ -110,7 +110,7 @@ Homepage: https://radix-ui.com/primitives
110
110
  ---
111
111
 
112
112
  Name: @radix-ui/react-switch
113
- Version: 1.1.3
113
+ Version: 1.1.4
114
114
  License: MIT
115
115
  Private: false
116
116
  Repository: git+https://github.com/radix-ui/primitives.git
@@ -1 +1 @@
1
- {"version":3,"file":"useToggleDrag.d.ts","sourceRoot":"","sources":["../../src/hooks/useToggleDrag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAoB,MAAM,OAAO,CAAC;AAIzD,KAAK,kBAAkB,GAAG;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CACpD,CAAC;AAEF,eAAO,MAAM,aAAa,0BAA2B,kBAAkB;;;;;;;;;oBAiB9C;QAAE,CAAC,EAAE,MAAM,CAAA;KAAE;;;CAiCrC,CAAC"}
1
+ {"version":3,"file":"useToggleDrag.d.ts","sourceRoot":"","sources":["../../src/hooks/useToggleDrag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAoB,MAAM,OAAO,CAAC;AAIzD,KAAK,kBAAkB,GAAG;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CACpD,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,uBAAuB,kBAAkB;;;;;;;;;oBAiB9C;QAAE,CAAC,EAAE,MAAM,CAAA;KAAE;;;CAiCrC,CAAC"}
@@ -1,18 +1,18 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),h=require("react");require("react-dom");function se(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const a=se(h);function ue(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var z={exports:{}};/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),h=require("react");require("react-dom");function te(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,i.get?i:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const a=te(h);function ne(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var O={exports:{}};/*!
2
2
  Copyright (c) 2018 Jed Watson.
3
3
  Licensed under the MIT License (MIT), see
4
4
  http://jedwatson.github.io/classnames
5
- */var D;function ae(){return D||(D=1,function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",s=0;s<arguments.length;s++){var u=arguments[s];u&&(r=i(r,o.call(this,u)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var s="";for(var u in r)n.call(r,u)&&r[u]&&(s=i(s,this&&this[u]||u));return s}function i(r,s){return s?r?r+" "+s:r+s:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()}(z)),z.exports}var ce=ae();const le=ue(ce),pe={"purpur-icon":"_purpur-icon_8u1lq_1","purpur-icon--xxs":"_purpur-icon--xxs_8u1lq_4","purpur-icon--xs":"_purpur-icon--xs_8u1lq_8","purpur-icon--sm":"_purpur-icon--sm_8u1lq_12","purpur-icon--md":"_purpur-icon--md_8u1lq_16","purpur-icon--lg":"_purpur-icon--lg_8u1lq_20","purpur-icon--xl":"_purpur-icon--xl_8u1lq_24"},fe=le.bind(pe),M="purpur-icon",de="md",he=e=>e.filter(n=>Object.keys(n).length>=1).map(n=>`${n.name}="${n.value}"`).join(" "),ge=({content:e="",title:n}={})=>{const t=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},{name:"viewBox",value:"0 0 24 24"},n?{name:"role",value:"img"}:{name:"aria-hidden",value:"true"}],o=n?`<title>${n}</title>`:"";return`<svg ${he(t)}>${o}${e}</svg>`},_e=e=>e.replace(/<(\/?)svg([^>]*)>/g,"").trim(),U=({svg:e,allyTitle:n,className:t,size:o=de,...i})=>{const r=ge({content:_e(e.svg),title:n}),s=fe(t,M,`${M}--${o}`);return l.jsx("span",{className:s,dangerouslySetInnerHTML:{__html:r},...i})};U.displayName="Icon";const me={name:"checkmark-bold",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M21.243 4.176a2 2 0 0 1 .324 2.81l-10.45 13.176a2.092 2.092 0 0 1-3.118.18l-5.413-5.413A2 2 0 1 1 5.414 12.1l3.9 3.9 9.118-11.5a2 2 0 0 1 2.81-.324Z" clip-rule="evenodd"/></svg>',keywords:["checkmark-bold"],category:"utility"};function A(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function ve(...e){return n=>{let t=!1;const o=e.map(i=>{const r=A(i,n);return!t&&typeof r=="function"&&(t=!0),r});if(t)return()=>{for(let i=0;i<o.length;i++){const r=o[i];typeof r=="function"?r():A(e[i],null)}}}}var Z=a.forwardRef((e,n)=>{const{children:t,...o}=e,i=a.Children.toArray(t),r=i.find(ye);if(r){const s=r.props.children,u=i.map(c=>c===r?a.Children.count(s)>1?a.Children.only(null):a.isValidElement(s)?s.props.children:null:c);return l.jsx(E,{...o,ref:n,children:a.isValidElement(s)?a.cloneElement(s,void 0,u):null})}return l.jsx(E,{...o,ref:n,children:t})});Z.displayName="Slot";var E=a.forwardRef((e,n)=>{const{children:t,...o}=e;if(a.isValidElement(t)){const i=xe(t),r=we(o,t.props);return t.type!==a.Fragment&&(r.ref=n?ve(n,i):i),a.cloneElement(t,r)}return a.Children.count(t)>1?a.Children.only(null):null});E.displayName="SlotClone";var be=({children:e})=>l.jsx(l.Fragment,{children:e});function ye(e){return a.isValidElement(e)&&e.type===be}function we(e,n){const t={...n};for(const o in n){const i=e[o],r=n[o];/^on[A-Z]/.test(o)?i&&r?t[o]=(...s)=>{r(...s),i(...s)}:i&&(t[o]=i):o==="style"?t[o]={...i,...r}:o==="className"&&(t[o]=[i,r].filter(Boolean).join(" "))}return{...e,...t}}function xe(e){var n,t;let o=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,i=o&&"isReactWarning"in o&&o.isReactWarning;return i?e.ref:(o=(t=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:t.get,i=o&&"isReactWarning"in o&&o.isReactWarning,i?e.props.ref:e.props.ref||e.ref)}var Se=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Re=Se.reduce((e,n)=>{const t=a.forwardRef((o,i)=>{const{asChild:r,...s}=o,u=r?Z:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(u,{...s,ref:i})});return t.displayName=`Primitive.${n}`,{...e,[n]:t}},{}),je="Label",G=a.forwardRef((e,n)=>l.jsx(Re.label,{...e,ref:n,onMouseDown:t=>{var o;t.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));G.displayName=je;var $e=G;function Ce(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var q={exports:{}};/*!
5
+ */var N;function oe(){return N||(N=1,(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",s=0;s<arguments.length;s++){var u=arguments[s];u&&(r=o(r,i.call(this,u)))}return r}function i(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var s="";for(var u in r)n.call(r,u)&&r[u]&&(s=o(s,this&&this[u]||u));return s}function o(r,s){return s?r?r+" "+s:r+s:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(O)),O.exports}var ie=oe();const se=ne(ie),ue={"purpur-icon":"_purpur-icon_8u1lq_1","purpur-icon--xxs":"_purpur-icon--xxs_8u1lq_4","purpur-icon--xs":"_purpur-icon--xs_8u1lq_8","purpur-icon--sm":"_purpur-icon--sm_8u1lq_12","purpur-icon--md":"_purpur-icon--md_8u1lq_16","purpur-icon--lg":"_purpur-icon--lg_8u1lq_20","purpur-icon--xl":"_purpur-icon--xl_8u1lq_24"},ae=se.bind(ue),D="purpur-icon",ce="md",le=e=>e.filter(n=>Object.keys(n).length>=1).map(n=>`${n.name}="${n.value}"`).join(" "),pe=({content:e="",title:n}={})=>{const t=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},{name:"viewBox",value:"0 0 24 24"},n?{name:"role",value:"img"}:{name:"aria-hidden",value:"true"}],i=n?`<title>${n}</title>`:"";return`<svg ${le(t)}>${i}${e}</svg>`},fe=e=>e.replace(/<(\/?)svg([^>]*)>/g,"").trim(),H=({svg:e,allyTitle:n,className:t,size:i=ce,...o})=>{const r=pe({content:fe(e.svg),title:n}),s=ae(t,D,`${D}--${i}`);return d.jsx("span",{className:s,dangerouslySetInnerHTML:{__html:r},...o})};H.displayName="Icon";const de={name:"checkmark-bold",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M21.243 4.176a2 2 0 0 1 .324 2.81l-10.45 13.176a2.092 2.092 0 0 1-3.118.18l-5.413-5.413A2 2 0 1 1 5.414 12.1l3.9 3.9 9.118-11.5a2 2 0 0 1 2.81-.324Z" clip-rule="evenodd"/></svg>',keywords:["checkmark-bold"],category:"utility"};function z(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function he(...e){return n=>{let t=!1;const i=e.map(o=>{const r=z(o,n);return!t&&typeof r=="function"&&(t=!0),r});if(t)return()=>{for(let o=0;o<i.length;o++){const r=i[o];typeof r=="function"?r():z(e[o],null)}}}}function ge(e){const n=_e(e),t=a.forwardRef((i,o)=>{const{children:r,...s}=i,u=a.Children.toArray(r),c=u.find(ve);if(c){const l=c.props.children,g=u.map(p=>p===c?a.Children.count(l)>1?a.Children.only(null):a.isValidElement(l)?l.props.children:null:p);return d.jsx(n,{...s,ref:o,children:a.isValidElement(l)?a.cloneElement(l,void 0,g):null})}return d.jsx(n,{...s,ref:o,children:r})});return t.displayName=`${e}.Slot`,t}function _e(e){const n=a.forwardRef((t,i)=>{const{children:o,...r}=t;if(a.isValidElement(o)){const s=ye(o),u=be(r,o.props);return o.type!==a.Fragment&&(u.ref=i?he(i,s):s),a.cloneElement(o,u)}return a.Children.count(o)>1?a.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var me=Symbol("radix.slottable");function ve(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===me}function be(e,n){const t={...n};for(const i in n){const o=e[i],r=n[i];/^on[A-Z]/.test(i)?o&&r?t[i]=(...s)=>{const u=r(...s);return o(...s),u}:o&&(t[i]=o):i==="style"?t[i]={...o,...r}:i==="className"&&(t[i]=[o,r].filter(Boolean).join(" "))}return{...e,...t}}function ye(e){var n,t;let i=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,o=i&&"isReactWarning"in i&&i.isReactWarning;return o?e.ref:(i=(t=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:t.get,o=i&&"isReactWarning"in i&&i.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var we=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],xe=we.reduce((e,n)=>{const t=ge(`Primitive.${n}`),i=a.forwardRef((o,r)=>{const{asChild:s,...u}=o,c=s?t:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...u,ref:r})});return i.displayName=`Primitive.${n}`,{...e,[n]:i}},{}),Se="Label",F=a.forwardRef((e,n)=>d.jsx(xe.label,{...e,ref:n,onMouseDown:t=>{var i;t.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));F.displayName=Se;var $e=F;function Re(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var A={exports:{}};/*!
6
6
  Copyright (c) 2018 Jed Watson.
7
7
  Licensed under the MIT License (MIT), see
8
8
  http://jedwatson.github.io/classnames
9
- */var B;function Pe(){return B||(B=1,function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",s=0;s<arguments.length;s++){var u=arguments[s];u&&(r=i(r,o.call(this,u)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var s="";for(var u in r)n.call(r,u)&&r[u]&&(s=i(s,this&&this[u]||u));return s}function i(r,s){return s?r?r+" "+s:r+s:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()}(q)),q.exports}var ke=Pe();const Ee=Ce(ke),Oe={"purpur-label":"_purpur-label_1x80u_1","purpur-label--negative":"_purpur-label--negative_1x80u_8","purpur-label--disabled":"_purpur-label--disabled_1x80u_11"},Ne=Ee.bind(Oe),P="purpur-label",ze=({children:e,className:n,disabled:t,negative:o=!1,...i})=>{const r=Ne(n,P,{[`${P}--disabled`]:t,[`${P}--negative`]:o});return l.jsx($e,{className:r,...i,children:e})};function De(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var X={exports:{}};/*!
9
+ */var M;function Ce(){return M||(M=1,(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",s=0;s<arguments.length;s++){var u=arguments[s];u&&(r=o(r,i.call(this,u)))}return r}function i(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var s="";for(var u in r)n.call(r,u)&&r[u]&&(s=o(s,this&&this[u]||u));return s}function o(r,s){return s?r?r+" "+s:r+s:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(A)),A.exports}var je=Ce();const Pe=Re(je),ke={"purpur-label":"_purpur-label_1x80u_1","purpur-label--negative":"_purpur-label--negative_1x80u_8","purpur-label--disabled":"_purpur-label--disabled_1x80u_11"},Ee=Pe.bind(ke),P="purpur-label",Oe=({children:e,className:n,disabled:t,negative:i=!1,...o})=>{const r=Ee(n,P,{[`${P}--disabled`]:t,[`${P}--negative`]:i});return d.jsx($e,{className:r,...o,children:e})};function Ne(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var q={exports:{}};/*!
10
10
  Copyright (c) 2018 Jed Watson.
11
11
  Licensed under the MIT License (MIT), see
12
12
  http://jedwatson.github.io/classnames
13
- */var W;function Me(){return W||(W=1,function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",s=0;s<arguments.length;s++){var u=arguments[s];u&&(r=i(r,o.call(this,u)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var s="";for(var u in r)n.call(r,u)&&r[u]&&(s=i(s,this&&this[u]||u));return s}function i(r,s){return s?r?r+" "+s:r+s:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()}(X)),X.exports}var Ae=Me();const qe=De(Ae),Be={"purpur-paragraph":"_purpur-paragraph_1rh57_1","purpur-paragraph--disabled":"_purpur-paragraph--disabled_1rh57_7","purpur-paragraph--hyphens":"_purpur-paragraph--hyphens_1rh57_10","purpur-paragraph--negative":"_purpur-paragraph--negative_1rh57_13","purpur-paragraph--paragraph-100":"_purpur-paragraph--paragraph-100_1rh57_16","purpur-paragraph--paragraph-100-medium":"_purpur-paragraph--paragraph-100-medium_1rh57_22","purpur-paragraph--paragraph-100-bold":"_purpur-paragraph--paragraph-100-bold_1rh57_29","purpur-paragraph--paragraph-200":"_purpur-paragraph--paragraph-200_1rh57_36","purpur-paragraph--preamble-100":"_purpur-paragraph--preamble-100_1rh57_42","purpur-paragraph--preamble-200":"_purpur-paragraph--preamble-200_1rh57_48","purpur-paragraph--additional-100":"_purpur-paragraph--additional-100_1rh57_54","purpur-paragraph--additional-100-medium":"_purpur-paragraph--additional-100-medium_1rh57_60","purpur-paragraph--overline-100":"_purpur-paragraph--overline-100_1rh57_67","purpur-paragraph--overline-200":"_purpur-paragraph--overline-200_1rh57_75"},Xe=qe.bind(Be),We={PARAGRAPH100:"paragraph-100"},$="purpur-paragraph",J=({children:e,className:n,disabled:t,enableHyphenation:o=!1,negative:i=!1,variant:r=We.PARAGRAPH100,...s})=>{const u=Xe(n,$,`${$}--${r}`,{[`${$}--hyphens`]:o,[`${$}--disabled`]:t,[`${$}--negative`]:i});return l.jsx("p",{...s,className:u,children:e})};J.displayName="Paragraph";function Le(e,n,{checkForDefaultPrevented:t=!0}={}){return function(i){if(e==null||e(i),t===!1||!i.defaultPrevented)return n==null?void 0:n(i)}}function L(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function K(...e){return n=>{let t=!1;const o=e.map(i=>{const r=L(i,n);return!t&&typeof r=="function"&&(t=!0),r});if(t)return()=>{for(let i=0;i<o.length;i++){const r=o[i];typeof r=="function"?r():L(e[i],null)}}}}function Te(...e){return a.useCallback(K(...e),e)}function Ve(e,n=[]){let t=[];function o(r,s){const u=a.createContext(s),c=t.length;t=[...t,s];const p=d=>{var b;const{scope:f,children:_,...g}=d,m=((b=f==null?void 0:f[e])==null?void 0:b[c])||u,y=a.useMemo(()=>g,Object.values(g));return l.jsx(m.Provider,{value:y,children:_})};p.displayName=r+"Provider";function v(d,f){var m;const _=((m=f==null?void 0:f[e])==null?void 0:m[c])||u,g=a.useContext(_);if(g)return g;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${r}\``)}return[p,v]}const i=()=>{const r=t.map(s=>a.createContext(s));return function(u){const c=(u==null?void 0:u[e])||r;return a.useMemo(()=>({[`__scope${e}`]:{...u,[e]:c}}),[u,c])}};return i.scopeName=e,[o,He(i,...n)]}function He(...e){const n=e[0];if(e.length===1)return n;const t=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(r){const s=o.reduce((u,{useScope:c,scopeName:p})=>{const d=c(r)[`__scope${p}`];return{...u,...d}},{});return a.useMemo(()=>({[`__scope${n.scopeName}`]:s}),[s])}};return t.scopeName=n.scopeName,t}function Q(e){const n=a.useRef(e);return a.useEffect(()=>{n.current=e}),a.useMemo(()=>(...t)=>{var o;return(o=n.current)==null?void 0:o.call(n,...t)},[])}function Fe({prop:e,defaultProp:n,onChange:t=()=>{}}){const[o,i]=Ie({defaultProp:n,onChange:t}),r=e!==void 0,s=r?e:o,u=Q(t),c=a.useCallback(p=>{if(r){const d=typeof p=="function"?p(e):p;d!==e&&u(d)}else i(p)},[r,e,i,u]);return[s,c]}function Ie({defaultProp:e,onChange:n}){const t=a.useState(e),[o]=t,i=a.useRef(o),r=Q(n);return a.useEffect(()=>{i.current!==o&&(r(o),i.current=o)},[o,i,r]),t}function Ue(e){const n=a.useRef({value:e,previous:e});return a.useMemo(()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous),[e])}var Ze=globalThis!=null&&globalThis.document?a.useLayoutEffect:()=>{};function Ge(e){const[n,t]=a.useState(void 0);return Ze(()=>{if(e){t({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const r=i[0];let s,u;if("borderBoxSize"in r){const c=r.borderBoxSize,p=Array.isArray(c)?c[0]:c;s=p.inlineSize,u=p.blockSize}else s=e.offsetWidth,u=e.offsetHeight;t({width:s,height:u})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else t(void 0)},[e]),n}var Y=a.forwardRef((e,n)=>{const{children:t,...o}=e,i=a.Children.toArray(t),r=i.find(Ke);if(r){const s=r.props.children,u=i.map(c=>c===r?a.Children.count(s)>1?a.Children.only(null):a.isValidElement(s)?s.props.children:null:c);return l.jsx(O,{...o,ref:n,children:a.isValidElement(s)?a.cloneElement(s,void 0,u):null})}return l.jsx(O,{...o,ref:n,children:t})});Y.displayName="Slot";var O=a.forwardRef((e,n)=>{const{children:t,...o}=e;if(a.isValidElement(t)){const i=Ye(t),r=Qe(o,t.props);return t.type!==a.Fragment&&(r.ref=n?K(n,i):i),a.cloneElement(t,r)}return a.Children.count(t)>1?a.Children.only(null):null});O.displayName="SlotClone";var Je=({children:e})=>l.jsx(l.Fragment,{children:e});function Ke(e){return a.isValidElement(e)&&e.type===Je}function Qe(e,n){const t={...n};for(const o in n){const i=e[o],r=n[o];/^on[A-Z]/.test(o)?i&&r?t[o]=(...u)=>{r(...u),i(...u)}:i&&(t[o]=i):o==="style"?t[o]={...i,...r}:o==="className"&&(t[o]=[i,r].filter(Boolean).join(" "))}return{...e,...t}}function Ye(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,t=n&&"isReactWarning"in n&&n.isReactWarning;return t?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,t=n&&"isReactWarning"in n&&n.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}var er=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ee=er.reduce((e,n)=>{const t=a.forwardRef((o,i)=>{const{asChild:r,...s}=o,u=r?Y:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(u,{...s,ref:i})});return t.displayName=`Primitive.${n}`,{...e,[n]:t}},{}),N="Switch",[rr,gr]=Ve(N),[tr,nr]=rr(N),re=a.forwardRef((e,n)=>{const{__scopeSwitch:t,name:o,checked:i,defaultChecked:r,required:s,disabled:u,value:c="on",onCheckedChange:p,form:v,...d}=e,[f,_]=a.useState(null),g=Te(n,w=>_(w)),m=a.useRef(!1),y=f?v||!!f.closest("form"):!0,[b=!1,R]=Fe({prop:i,defaultProp:r,onChange:p});return l.jsxs(tr,{scope:t,checked:b,disabled:u,children:[l.jsx(ee.button,{type:"button",role:"switch","aria-checked":b,"aria-required":s,"data-state":oe(b),"data-disabled":u?"":void 0,disabled:u,value:c,...d,ref:g,onClick:Le(e.onClick,w=>{R(x=>!x),y&&(m.current=w.isPropagationStopped(),m.current||w.stopPropagation())})}),y&&l.jsx(or,{control:f,bubbles:!m.current,name:o,value:c,checked:b,required:s,disabled:u,form:v,style:{transform:"translateX(-100%)"}})]})});re.displayName=N;var te="SwitchThumb",ne=a.forwardRef((e,n)=>{const{__scopeSwitch:t,...o}=e,i=nr(te,t);return l.jsx(ee.span,{"data-state":oe(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:n})});ne.displayName=te;var or=e=>{const{control:n,checked:t,bubbles:o=!0,...i}=e,r=a.useRef(null),s=Ue(t),u=Ge(n);return a.useEffect(()=>{const c=r.current,p=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(p,"checked").set;if(s!==t&&d){const f=new Event("click",{bubbles:o});d.call(c,t),c.dispatchEvent(f)}},[s,t,o]),l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...i,tabIndex:-1,ref:r,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function oe(e){return e?"checked":"unchecked"}var ir=re,sr=ne;function ur(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var k={exports:{}};/*!
13
+ */var B;function De(){return B||(B=1,(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",s=0;s<arguments.length;s++){var u=arguments[s];u&&(r=o(r,i.call(this,u)))}return r}function i(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var s="";for(var u in r)n.call(r,u)&&r[u]&&(s=o(s,this&&this[u]||u));return s}function o(r,s){return s?r?r+" "+s:r+s:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(q)),q.exports}var ze=De();const Ae=Ne(ze),Me={"purpur-paragraph":"_purpur-paragraph_1rh57_1","purpur-paragraph--disabled":"_purpur-paragraph--disabled_1rh57_7","purpur-paragraph--hyphens":"_purpur-paragraph--hyphens_1rh57_10","purpur-paragraph--negative":"_purpur-paragraph--negative_1rh57_13","purpur-paragraph--paragraph-100":"_purpur-paragraph--paragraph-100_1rh57_16","purpur-paragraph--paragraph-100-medium":"_purpur-paragraph--paragraph-100-medium_1rh57_22","purpur-paragraph--paragraph-100-bold":"_purpur-paragraph--paragraph-100-bold_1rh57_29","purpur-paragraph--paragraph-200":"_purpur-paragraph--paragraph-200_1rh57_36","purpur-paragraph--preamble-100":"_purpur-paragraph--preamble-100_1rh57_42","purpur-paragraph--preamble-200":"_purpur-paragraph--preamble-200_1rh57_48","purpur-paragraph--additional-100":"_purpur-paragraph--additional-100_1rh57_54","purpur-paragraph--additional-100-medium":"_purpur-paragraph--additional-100-medium_1rh57_60","purpur-paragraph--overline-100":"_purpur-paragraph--overline-100_1rh57_67","purpur-paragraph--overline-200":"_purpur-paragraph--overline-200_1rh57_75"},qe=Ae.bind(Me),Be={PARAGRAPH100:"paragraph-100"},C="purpur-paragraph",U=({children:e,className:n,disabled:t,enableHyphenation:i=!1,negative:o=!1,variant:r=Be.PARAGRAPH100,...s})=>{const u=qe(n,C,`${C}--${r}`,{[`${C}--hyphens`]:i,[`${C}--disabled`]:t,[`${C}--negative`]:o});return d.jsx("p",{...s,className:u,children:e})};U.displayName="Paragraph";function Xe(e,n,{checkForDefaultPrevented:t=!0}={}){return function(o){if(e==null||e(o),t===!1||!o.defaultPrevented)return n==null?void 0:n(o)}}function X(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function Z(...e){return n=>{let t=!1;const i=e.map(o=>{const r=X(o,n);return!t&&typeof r=="function"&&(t=!0),r});if(t)return()=>{for(let o=0;o<i.length;o++){const r=i[o];typeof r=="function"?r():X(e[o],null)}}}}function Le(...e){return a.useCallback(Z(...e),e)}function We(e,n=[]){let t=[];function i(r,s){const u=a.createContext(s),c=t.length;t=[...t,s];const l=p=>{var b;const{scope:f,children:m,..._}=p,v=((b=f==null?void 0:f[e])==null?void 0:b[c])||u,y=a.useMemo(()=>_,Object.values(_));return d.jsx(v.Provider,{value:y,children:m})};l.displayName=r+"Provider";function g(p,f){var v;const m=((v=f==null?void 0:f[e])==null?void 0:v[c])||u,_=a.useContext(m);if(_)return _;if(s!==void 0)return s;throw new Error(`\`${p}\` must be used within \`${r}\``)}return[l,g]}const o=()=>{const r=t.map(s=>a.createContext(s));return function(u){const c=(u==null?void 0:u[e])||r;return a.useMemo(()=>({[`__scope${e}`]:{...u,[e]:c}}),[u,c])}};return o.scopeName=e,[i,Te(o,...n)]}function Te(...e){const n=e[0];if(e.length===1)return n;const t=()=>{const i=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(r){const s=i.reduce((u,{useScope:c,scopeName:l})=>{const p=c(r)[`__scope${l}`];return{...u,...p}},{});return a.useMemo(()=>({[`__scope${n.scopeName}`]:s}),[s])}};return t.scopeName=n.scopeName,t}function G(e){const n=a.useRef(e);return a.useEffect(()=>{n.current=e}),a.useMemo(()=>(...t)=>{var i;return(i=n.current)==null?void 0:i.call(n,...t)},[])}function Ie({prop:e,defaultProp:n,onChange:t=()=>{}}){const[i,o]=Ve({defaultProp:n,onChange:t}),r=e!==void 0,s=r?e:i,u=G(t),c=a.useCallback(l=>{if(r){const p=typeof l=="function"?l(e):l;p!==e&&u(p)}else o(l)},[r,e,o,u]);return[s,c]}function Ve({defaultProp:e,onChange:n}){const t=a.useState(e),[i]=t,o=a.useRef(i),r=G(n);return a.useEffect(()=>{o.current!==i&&(r(i),o.current=i)},[i,o,r]),t}function He(e){const n=a.useRef({value:e,previous:e});return a.useMemo(()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous),[e])}var Fe=globalThis!=null&&globalThis.document?a.useLayoutEffect:()=>{};function Ue(e){const[n,t]=a.useState(void 0);return Fe(()=>{if(e){t({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const r=o[0];let s,u;if("borderBoxSize"in r){const c=r.borderBoxSize,l=Array.isArray(c)?c[0]:c;s=l.inlineSize,u=l.blockSize}else s=e.offsetWidth,u=e.offsetHeight;t({width:s,height:u})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else t(void 0)},[e]),n}function Ze(e){const n=Ge(e),t=a.forwardRef((i,o)=>{const{children:r,...s}=i,u=a.Children.toArray(r),c=u.find(Ke);if(c){const l=c.props.children,g=u.map(p=>p===c?a.Children.count(l)>1?a.Children.only(null):a.isValidElement(l)?l.props.children:null:p);return d.jsx(n,{...s,ref:o,children:a.isValidElement(l)?a.cloneElement(l,void 0,g):null})}return d.jsx(n,{...s,ref:o,children:r})});return t.displayName=`${e}.Slot`,t}function Ge(e){const n=a.forwardRef((t,i)=>{const{children:o,...r}=t;if(a.isValidElement(o)){const s=Ye(o),u=Qe(r,o.props);return o.type!==a.Fragment&&(u.ref=i?Z(i,s):s),a.cloneElement(o,u)}return a.Children.count(o)>1?a.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var Je=Symbol("radix.slottable");function Ke(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Je}function Qe(e,n){const t={...n};for(const i in n){const o=e[i],r=n[i];/^on[A-Z]/.test(i)?o&&r?t[i]=(...u)=>{r(...u),o(...u)}:o&&(t[i]=o):i==="style"?t[i]={...o,...r}:i==="className"&&(t[i]=[o,r].filter(Boolean).join(" "))}return{...e,...t}}function Ye(e){var i,o;let n=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,t=n&&"isReactWarning"in n&&n.isReactWarning;return t?e.ref:(n=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,t=n&&"isReactWarning"in n&&n.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}var er=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],J=er.reduce((e,n)=>{const t=Ze(`Primitive.${n}`),i=a.forwardRef((o,r)=>{const{asChild:s,...u}=o,c=s?t:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...u,ref:r})});return i.displayName=`Primitive.${n}`,{...e,[n]:i}},{}),E="Switch",[rr]=We(E),[tr,nr]=rr(E),K=a.forwardRef((e,n)=>{const{__scopeSwitch:t,name:i,checked:o,defaultChecked:r,required:s,disabled:u,value:c="on",onCheckedChange:l,form:g,...p}=e,[f,m]=a.useState(null),_=Le(n,w=>m(w)),v=a.useRef(!1),y=f?g||!!f.closest("form"):!0,[b=!1,$]=Ie({prop:o,defaultProp:r,onChange:l});return d.jsxs(tr,{scope:t,checked:b,disabled:u,children:[d.jsx(J.button,{type:"button",role:"switch","aria-checked":b,"aria-required":s,"data-state":ee(b),"data-disabled":u?"":void 0,disabled:u,value:c,...p,ref:_,onClick:Xe(e.onClick,w=>{$(x=>!x),y&&(v.current=w.isPropagationStopped(),v.current||w.stopPropagation())})}),y&&d.jsx(or,{control:f,bubbles:!v.current,name:i,value:c,checked:b,required:s,disabled:u,form:g,style:{transform:"translateX(-100%)"}})]})});K.displayName=E;var Q="SwitchThumb",Y=a.forwardRef((e,n)=>{const{__scopeSwitch:t,...i}=e,o=nr(Q,t);return d.jsx(J.span,{"data-state":ee(o.checked),"data-disabled":o.disabled?"":void 0,...i,ref:n})});Y.displayName=Q;var or=e=>{const{control:n,checked:t,bubbles:i=!0,...o}=e,r=a.useRef(null),s=He(t),u=Ue(n);return a.useEffect(()=>{const c=r.current,l=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(l,"checked").set;if(s!==t&&p){const f=new Event("click",{bubbles:i});p.call(c,t),c.dispatchEvent(f)}},[s,t,i]),d.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...o,tabIndex:-1,ref:r,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function ee(e){return e?"checked":"unchecked"}var ir=K,sr=Y;function ur(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var k={exports:{}};/*!
14
14
  Copyright (c) 2018 Jed Watson.
15
15
  Licensed under the MIT License (MIT), see
16
16
  http://jedwatson.github.io/classnames
17
- */var T;function ar(){return T||(T=1,function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",s=0;s<arguments.length;s++){var u=arguments[s];u&&(r=i(r,o.call(this,u)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var s="";for(var u in r)n.call(r,u)&&r[u]&&(s=i(s,this&&this[u]||u));return s}function i(r,s){return s?r?r+" "+s:r+s:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()}(k)),k.exports}var cr=ar();const lr=ur(cr),V=e=>e&&"touches"in e,pr=({children:e,disabled:n,onStart:t,onDrag:o,onStop:i,bounds:r,position:s,style:u})=>{const[c,p]=h.useState(void 0),[v,d]=h.useState(void 0),[f,_]=h.useState(!1),g=b=>{if(!n){b.preventDefault();const R=V(b.nativeEvent)?b.nativeEvent.touches[0].clientX:b.nativeEvent.clientX;d(R),t==null||t()}},m=h.useCallback(b=>{if(typeof v!="number")return;const w=(V(b)?b.touches[0].clientX:b.clientX)-v;if(!w)return;const x=s+w;!f&&Math.abs(x)&&_(!0);const C=x>r.right?r.right:x<r.left?r.left:x;p(C),o==null||o({x:C})},[o,p,f,v]),y=h.useCallback(()=>{d(void 0),p(void 0),_(!1),i==null||i()},[i,d]);return h.useEffect(()=>(window.addEventListener("mousemove",m),window.addEventListener("touchmove",m),()=>{window.removeEventListener("mousemove",m),window.removeEventListener("touchmove",m)}),[m]),h.useEffect(()=>(window.addEventListener("mouseup",y),window.addEventListener("touchend",y),()=>{window.removeEventListener("mouseup",y),window.removeEventListener("touchend",y)}),[y]),h.isValidElement(e)?h.cloneElement(e,{onMouseDown:g,onTouchStart:g,style:{...u,transform:`translateX(${f?c:s}px)`}}):null},H={width:void 0,height:void 0};function F(e){const{ref:n,box:t="content-box",round:o}=e,[{width:i,height:r},s]=h.useState(H),u=fr(),c=h.useRef({...H}),p=h.useRef(void 0);return p.current=e.onResize,h.useEffect(()=>{if(!n.current||typeof window>"u"||!("ResizeObserver"in window))return;const v=new ResizeObserver(([d])=>{const f=t==="border-box"?"borderBoxSize":t==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",_=I(d,f,"inlineSize"),g=I(d,f,"blockSize");if(c.current.width!==_||c.current.height!==g){const y={width:_&&o?Math.round(_):_,height:g&&o?Math.round(g):g};c.current.width=_,c.current.height=g,p.current?p.current(y):u()&&s(y)}});return v.observe(n.current,{box:t}),()=>{v.disconnect()}},[t,n,u,o]),{width:i,height:r}}function I(e,n,t){return e[n]?Array.isArray(e[n])?e[n][0][t]:e[n][t]:n==="contentBoxSize"?e.contentRect[t==="inlineSize"?"width":"height"]:void 0}function fr(){const e=h.useRef(!1);return h.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),h.useCallback(()=>e.current,[])}const dr=({checked:e,onChange:n})=>{const t=h.useRef(null),o=h.useRef(null),[i,r]=h.useState(void 0),[s,u]=h.useState(!1),[c,p]=h.useState(0),{height:v=0}=F({ref:o,round:!0}),{height:d=0}=F({ref:t,round:!0}),f=(d||0)-v,_=v+f,g=f/2,m=_/2,y=typeof i=="number"&&(e?i<m:i>m);return{trackRef:t,thumbRef:o,isDragging:s,bounds:{left:g,right:_},position:e?_:g,onDrag:({x})=>{r(x),Math.abs((e?_:g)-x)>2&&u(!0)},onStop:()=>{u(!1),s&&p(Date.now()),y&&(n==null||n(!e))},onChangeWithDrag:()=>{Date.now()-c>50&&(n==null||n(!e)),r(void 0)}}},hr={"purpur-toggle":"_purpur-toggle_zqs8u_1","purpur-toggle__track":"_purpur-toggle__track_zqs8u_7","purpur-toggle__checkmark-container":"_purpur-toggle__checkmark-container_zqs8u_45","purpur-toggle__thumb":"_purpur-toggle__thumb_zqs8u_60","purpur-toggle__thumb--dragging":"_purpur-toggle__thumb--dragging_zqs8u_85","purpur-toggle__checkmark":"_purpur-toggle__checkmark_zqs8u_45","purpur-toggle__label--right":"_purpur-toggle__label--right_zqs8u_110","purpur-toggle__label--left":"_purpur-toggle__label--left_zqs8u_113","purpur-toggle__container":"_purpur-toggle__container_zqs8u_116"},j=lr.bind(hr),S="purpur-toggle",ie=h.forwardRef(({["data-testid"]:e,className:n,label:t,onChange:o,labelPosition:i="right",checked:r,disableDrag:s,defaultChecked:u,...c},p)=>{const[v,d]=h.useState(typeof r=="boolean"?r:!!u),f=!!(typeof r=="boolean"?r:v),{thumbRef:_,trackRef:g,isDragging:m,onChangeWithDrag:y,...b}=dr({checked:f,onChange:w=>{c.disabled||(o==null||o(w),d(w))}}),R=()=>l.jsx(ze,{htmlFor:c.id,"data-testid":e&&`${e}-label`,disabled:c.disabled,className:j(`${S}__label`,`${S}__label--${i}`),children:l.jsx(J,{disabled:c.disabled,children:t})});return l.jsxs("div",{className:j(n,`${S}__container`),children:[t&&i==="left"&&R(),l.jsx(ir,{...c,ref:p,id:c.id,"data-testid":e,className:j(S),onCheckedChange:y,checked:f,children:l.jsxs("span",{ref:g,className:j(`${S}__track`),children:[l.jsx("span",{className:j(`${S}__checkmark-container`),children:l.jsx(U,{className:j(`${S}__checkmark`),svg:me,size:"xxs"})}),l.jsx(pr,{disabled:s,...b,children:l.jsx(sr,{ref:_,"data-testid":e&&`${e}-thumb`,className:j(`${S}__thumb`,{[`${S}__thumb--dragging`]:m})})})]})}),t&&i==="right"&&R()]})});ie.displayName="Toggle";exports.Toggle=ie;
17
+ */var L;function ar(){return L||(L=1,(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",s=0;s<arguments.length;s++){var u=arguments[s];u&&(r=o(r,i.call(this,u)))}return r}function i(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var s="";for(var u in r)n.call(r,u)&&r[u]&&(s=o(s,this&&this[u]||u));return s}function o(r,s){return s?r?r+" "+s:r+s:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(k)),k.exports}var cr=ar();const lr=ur(cr),W=e=>e&&"touches"in e,pr=({children:e,disabled:n,onStart:t,onDrag:i,onStop:o,bounds:r,position:s,style:u})=>{const[c,l]=h.useState(void 0),[g,p]=h.useState(void 0),[f,m]=h.useState(!1),_=b=>{if(!n){b.preventDefault();const $=W(b.nativeEvent)?b.nativeEvent.touches[0].clientX:b.nativeEvent.clientX;p($),t==null||t()}},v=h.useCallback(b=>{if(typeof g!="number")return;const w=(W(b)?b.touches[0].clientX:b.clientX)-g;if(!w)return;const x=s+w;!f&&Math.abs(x)&&m(!0);const j=x>r.right?r.right:x<r.left?r.left:x;l(j),i==null||i({x:j})},[i,l,f,g]),y=h.useCallback(()=>{p(void 0),l(void 0),m(!1),o==null||o()},[o,p]);return h.useEffect(()=>(window.addEventListener("mousemove",v),window.addEventListener("touchmove",v),()=>{window.removeEventListener("mousemove",v),window.removeEventListener("touchmove",v)}),[v]),h.useEffect(()=>(window.addEventListener("mouseup",y),window.addEventListener("touchend",y),()=>{window.removeEventListener("mouseup",y),window.removeEventListener("touchend",y)}),[y]),h.isValidElement(e)?h.cloneElement(e,{onMouseDown:_,onTouchStart:_,style:{...u,transform:`translateX(${f?c:s}px)`}}):null},T={width:void 0,height:void 0};function I(e){const{ref:n,box:t="content-box",round:i}=e,[{width:o,height:r},s]=h.useState(T),u=fr(),c=h.useRef({...T}),l=h.useRef(void 0);return l.current=e.onResize,h.useEffect(()=>{if(!n.current||typeof window>"u"||!("ResizeObserver"in window))return;const g=new ResizeObserver(([p])=>{const f=t==="border-box"?"borderBoxSize":t==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",m=V(p,f,"inlineSize"),_=V(p,f,"blockSize");if(c.current.width!==m||c.current.height!==_){const y={width:m&&i?Math.round(m):m,height:_&&i?Math.round(_):_};c.current.width=m,c.current.height=_,l.current?l.current(y):u()&&s(y)}});return g.observe(n.current,{box:t}),()=>{g.disconnect()}},[t,n,u,i]),{width:o,height:r}}function V(e,n,t){return e[n]?Array.isArray(e[n])?e[n][0][t]:e[n][t]:n==="contentBoxSize"?e.contentRect[t==="inlineSize"?"width":"height"]:void 0}function fr(){const e=h.useRef(!1);return h.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),h.useCallback(()=>e.current,[])}const dr=({checked:e,onChange:n})=>{const t=h.useRef(null),i=h.useRef(null),[o,r]=h.useState(void 0),[s,u]=h.useState(!1),[c,l]=h.useState(0),{height:g=0}=I({ref:i,round:!0}),{height:p=0}=I({ref:t,round:!0}),f=(p||0)-g,m=g+f,_=f/2,v=m/2,y=typeof o=="number"&&(e?o<v:o>v);return{trackRef:t,thumbRef:i,isDragging:s,bounds:{left:_,right:m},position:e?m:_,onDrag:({x})=>{r(x),Math.abs((e?m:_)-x)>2&&u(!0)},onStop:()=>{u(!1),s&&l(Date.now()),y&&(n==null||n(!e))},onChangeWithDrag:()=>{Date.now()-c>50&&(n==null||n(!e)),r(void 0)}}},hr={"purpur-toggle":"_purpur-toggle_zqs8u_1","purpur-toggle__track":"_purpur-toggle__track_zqs8u_7","purpur-toggle__checkmark-container":"_purpur-toggle__checkmark-container_zqs8u_45","purpur-toggle__thumb":"_purpur-toggle__thumb_zqs8u_60","purpur-toggle__thumb--dragging":"_purpur-toggle__thumb--dragging_zqs8u_85","purpur-toggle__checkmark":"_purpur-toggle__checkmark_zqs8u_45","purpur-toggle__label--right":"_purpur-toggle__label--right_zqs8u_110","purpur-toggle__label--left":"_purpur-toggle__label--left_zqs8u_113","purpur-toggle__container":"_purpur-toggle__container_zqs8u_116"},R=lr.bind(hr),S="purpur-toggle",re=h.forwardRef(({["data-testid"]:e,className:n,label:t,onChange:i,labelPosition:o="right",checked:r,disableDrag:s,defaultChecked:u,...c},l)=>{const[g,p]=h.useState(typeof r=="boolean"?r:!!u),f=!!(typeof r=="boolean"?r:g),{thumbRef:m,trackRef:_,isDragging:v,onChangeWithDrag:y,...b}=dr({checked:f,onChange:w=>{c.disabled||(i==null||i(w),p(w))}}),$=()=>d.jsx(Oe,{htmlFor:c.id,"data-testid":e&&`${e}-label`,disabled:c.disabled,className:R(`${S}__label`,`${S}__label--${o}`),children:d.jsx(U,{disabled:c.disabled,children:t})});return d.jsxs("div",{className:R(n,`${S}__container`),children:[t&&o==="left"&&$(),d.jsx(ir,{...c,ref:l,id:c.id,"data-testid":e,className:R(S),onCheckedChange:y,checked:f,children:d.jsxs("span",{ref:_,className:R(`${S}__track`),children:[d.jsx("span",{className:R(`${S}__checkmark-container`),children:d.jsx(H,{className:R(`${S}__checkmark`),svg:de,size:"xxs"})}),d.jsx(pr,{disabled:s,...b,children:d.jsx(sr,{ref:m,"data-testid":e&&`${e}-thumb`,className:R(`${S}__thumb`,{[`${S}__thumb--dragging`]:v})})})]})}),t&&o==="right"&&$()]})});re.displayName="Toggle";exports.Toggle=re;
18
18
  //# sourceMappingURL=toggle.cjs.js.map