@hortiview/shared-components 0.0.4722 → 0.0.4723

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.
@@ -0,0 +1,64 @@
1
+ "use strict";const t=require("./index.es-CEydmFbW.cjs"),z=require("./index.es-CSD_u-fK.cjs"),c=require("react"),A=require("./tslib.es6-D1TYK0An.cjs"),_=require("./component-DJvMx3oL.cjs");/**
2
+ * @license
3
+ * Copyright 2018 Google Inc.
4
+ *
5
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ * of this software and associated documentation files (the "Software"), to deal
7
+ * in the Software without restriction, including without limitation the rights
8
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ * copies of the Software, and to permit persons to whom the Software is
10
+ * furnished to do so, subject to the following conditions:
11
+ *
12
+ * The above copyright notice and this permission notice shall be included in
13
+ * all copies or substantial portions of the Software.
14
+ *
15
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ * THE SOFTWARE.
22
+ */var m={ICON_BUTTON_ON:"mdc-icon-button--on",ROOT:"mdc-icon-button"},u={ARIA_LABEL:"aria-label",ARIA_PRESSED:"aria-pressed",DATA_ARIA_LABEL_OFF:"data-aria-label-off",DATA_ARIA_LABEL_ON:"data-aria-label-on",CHANGE_EVENT:"MDCIconButtonToggle:change"};/**
23
+ * @license
24
+ * Copyright 2018 Google Inc.
25
+ *
26
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
27
+ * of this software and associated documentation files (the "Software"), to deal
28
+ * in the Software without restriction, including without limitation the rights
29
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
30
+ * copies of the Software, and to permit persons to whom the Software is
31
+ * furnished to do so, subject to the following conditions:
32
+ *
33
+ * The above copyright notice and this permission notice shall be included in
34
+ * all copies or substantial portions of the Software.
35
+ *
36
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
37
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
38
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
39
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
40
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
41
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
42
+ * THE SOFTWARE.
43
+ */var R=function(d){A.__extends(o,d);function o(e){var a=d.call(this,A.__assign(A.__assign({},o.defaultAdapter),e))||this;return a.hasToggledAriaLabel=!1,a}return Object.defineProperty(o,"cssClasses",{get:function(){return m},enumerable:!1,configurable:!0}),Object.defineProperty(o,"strings",{get:function(){return u},enumerable:!1,configurable:!0}),Object.defineProperty(o,"defaultAdapter",{get:function(){return{addClass:function(){},hasClass:function(){return!1},notifyChange:function(){},removeClass:function(){},getAttr:function(){return null},setAttr:function(){}}},enumerable:!1,configurable:!0}),o.prototype.init=function(){var e=this.adapter.getAttr(u.DATA_ARIA_LABEL_ON),a=this.adapter.getAttr(u.DATA_ARIA_LABEL_OFF);if(e&&a){if(this.adapter.getAttr(u.ARIA_PRESSED)!==null)throw new Error("MDCIconButtonToggleFoundation: Button should not set `aria-pressed` if it has a toggled aria label.");this.hasToggledAriaLabel=!0}else this.adapter.setAttr(u.ARIA_PRESSED,String(this.isOn()))},o.prototype.handleClick=function(){this.toggle(),this.adapter.notifyChange({isOn:this.isOn()})},o.prototype.isOn=function(){return this.adapter.hasClass(m.ICON_BUTTON_ON)},o.prototype.toggle=function(e){if(e===void 0&&(e=!this.isOn()),e?this.adapter.addClass(m.ICON_BUTTON_ON):this.adapter.removeClass(m.ICON_BUTTON_ON),this.hasToggledAriaLabel){var a=e?this.adapter.getAttr(u.DATA_ARIA_LABEL_ON):this.adapter.getAttr(u.DATA_ARIA_LABEL_OFF);this.adapter.setAttr(u.ARIA_LABEL,a||"")}else this.adapter.setAttr(u.ARIA_PRESSED,""+e)},o}(_.MDCFoundation);/**
44
+ * @license
45
+ * Copyright 2018 Google Inc.
46
+ *
47
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
48
+ * of this software and associated documentation files (the "Software"), to deal
49
+ * in the Software without restriction, including without limitation the rights
50
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
51
+ * copies of the Software, and to permit persons to whom the Software is
52
+ * furnished to do so, subject to the following conditions:
53
+ *
54
+ * The above copyright notice and this permission notice shall be included in
55
+ * all copies or substantial portions of the Software.
56
+ *
57
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
58
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
59
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
60
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
61
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
62
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
63
+ * THE SOFTWARE.
64
+ */var U=R.strings,H=function(d){A.__extends(o,d);function o(){var e=d!==null&&d.apply(this,arguments)||this;return e.rippleComponent=e.createRipple(),e}return o.attachTo=function(e){return new o(e)},o.prototype.initialSyncWithDOM=function(){var e=this;this.handleClick=function(){e.foundation.handleClick()},this.listen("click",this.handleClick)},o.prototype.destroy=function(){this.unlisten("click",this.handleClick),this.ripple.destroy(),d.prototype.destroy.call(this)},o.prototype.getDefaultFoundation=function(){var e=this,a={addClass:function(l){return e.root.classList.add(l)},hasClass:function(l){return e.root.classList.contains(l)},notifyChange:function(l){e.emit(U.CHANGE_EVENT,l)},removeClass:function(l){return e.root.classList.remove(l)},getAttr:function(l){return e.root.getAttribute(l)},setAttr:function(l,v){return e.root.setAttribute(l,v)}};return new R(a)},Object.defineProperty(o.prototype,"ripple",{get:function(){return this.rippleComponent},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"on",{get:function(){return this.foundation.isOn()},set:function(e){this.foundation.toggle(e)},enumerable:!1,configurable:!0}),o.prototype.createRipple=function(){var e=new _.MDCRipple(this.root);return e.unbounded=!0,e},o}(_.MDCComponent);const G={active:t.PropTypes.bool,ariaLabel:t.PropTypes.string,ariaLabelledBy:t.PropTypes.string,badge:t.PropTypes.node,badgePlacement:t.PropTypes.oneOf(["right-start","left-start"]),children:t.PropTypes.node,className:t.PropTypes.string,dense:t.PropTypes.bool,disabled:t.PropTypes.bool,icon:t.PropTypes.oneOfType([t.PropTypes.string,t.PropTypes.node]),iconSize:t.PropTypes.oneOf(["xsmall","small","medium","large","xlarge"]),iconType:t.PropTypes.oneOf(["filled","outlined","rounded","two-tone","sharp"]),onClick:t.PropTypes.func,tabIndex:t.PropTypes.number,toggleOff:t.PropTypes.node,toggleOffAriaLabel:t.PropTypes.string,toggleOffAriaLabelledBy:t.PropTypes.string,toggleOn:t.PropTypes.node,toggleOnAriaLabel:t.PropTypes.string,toggleOnAriaLabelledBy:t.PropTypes.string,variant:t.deprecatedOneOf(t.PropTypes.oneOf(["","filled-danger-alt","filled-danger","filled-primary","filled-secondary","color-primary","color-secondary","color-on-dark","color-on-unknown-black"]),["primary-alt","secondary-alt","primary","danger-alt","danger"],"IconButton","Please use one of '','filled-danger-alt','filled-danger','filled-primary','filled-secondary','color-primary','color-secondary','color-on-dark','color-on-unknown-black'.")},V={active:!1,ariaLabel:null,ariaLabelledBy:null,badge:void 0,badgePlacement:"right-start",children:null,className:void 0,dense:!1,disabled:!1,icon:null,iconSize:"medium",iconType:"filled",tabIndex:0,toggleOff:null,toggleOffAriaLabel:null,toggleOffAriaLabelledBy:null,toggleOn:null,toggleOnAriaLabel:null,toggleOnAriaLabelledBy:null,variant:""},h=c.forwardRef((d,o)=>{const{active:e,ariaLabel:a,ariaLabelledBy:l,badge:v,badgePlacement:k,children:L,className:D,dense:x,disabled:S,icon:B,iconSize:w,iconType:F,onClick:I,tabIndex:M,toggleOff:N,toggleOffAriaLabel:T,toggleOffAriaLabelledBy:O,toggleOn:E,toggleOnAriaLabel:P,toggleOnAriaLabelledBy:C,variant:r,...$}=d,b=c.useRef(),y=c.useRef(),g=c.useRef(),p=E&&N;c.useImperativeHandle(o,()=>b.current,[]);const j=t.clsx("lmnt","lmnt-icon-button","mdc-icon-button",x&&"lmnt-icon-button--dense",(r==="primary"||r==="primary-alt"||r==="secondary"||r==="danger"||r==="danger-alt"||r==="filled-primary"||r==="filled-primary-alt"||r==="filled-secondary"||r==="filled-danger"||r==="filled-danger-alt")&&"lmnt-icon-button--fill",(r==="danger-alt"||r==="filled-danger-alt")&&"lmnt-icon-button--fill-danger-alt",(r==="danger"||r==="filled-danger")&&"lmnt-icon-button--fill-danger",(r==="primary"||r==="filled-primary")&&"lmnt-icon-button--fill-primary",(r==="primary-alt"||r==="filled-secondary")&&"lmnt-icon-button--fill-secondary",(r==="secondary-alt"||r==="color-on-dark")&&"lmnt-icon-button--color-on-dark",r==="color-primary"&&"lmnt-icon-button--color-primary",r==="color-secondary"&&"lmnt-icon-button--color-secondary",r==="color-on-unknown-black"&&"lmnt-icon-button--on-unknown-black",D);c.useEffect(()=>(p?g.current=H.attachTo(b.current):(y.current=_.MDCRipple.attachTo(b.current),y.current.unbounded=!0),()=>{p?g.current.destroy():y.current.destroy()}),[g,p,y]),c.useEffect(()=>{p&&(g.current.on=e)},[e,p,g]);const q=n=>{I&&I(p?g.current.on:n)};return c.createElement("button",t._extends({"aria-label":a,"aria-labelledby":l,"data-aria-label-on":P||C||a,"data-aria-label-off":T||O||a,onClick:q,ref:b,className:j,disabled:S,tabIndex:M},$),B&&c.createElement(z.Icon,{badge:v,badgePlacement:k,icon:B,iconSize:w,iconType:F}),L&&t.addProps(L,n=>{var i,s;return{className:t.clsx("mdc-icon-button__icon",n==null||(i=n.props)===null||i===void 0?void 0:i.className),"aria-hidden":(n==null||(s=n.props)===null||s===void 0?void 0:s["aria-hidden"])||a||l}}),p&&t.addProps(E,n=>{var i,s,f;return{className:t.clsx("mdc-icon-button__icon mdc-icon-button__icon--on",n==null||(i=n.props)===null||i===void 0?void 0:i.className),"aria-label":(n==null||(s=n.props)===null||s===void 0?void 0:s["aria-label"])||P||C||a,"aria-hidden":(n==null||(f=n.props)===null||f===void 0?void 0:f["aria-hidden"])||P||C||a}}),p&&t.addProps(N,n=>{var i,s,f;return{className:t.clsx("mdc-icon-button__icon",n==null||(i=n.props)===null||i===void 0?void 0:i.className),"aria-label":(n==null||(s=n.props)===null||s===void 0?void 0:s["aria-label"])||T||O||a,"aria-hidden":(n==null||(f=n.props)===null||f===void 0?void 0:f["aria-hidden"])||T||O||a}}))});h.displayName="IconButton";h.propTypes=G;h.defaultProps=V;exports.IconButton=h;
@@ -0,0 +1,127 @@
1
+ "use strict";const n=require("./index.es-CEydmFbW.cjs"),o=require("react"),j=require("react-dom"),G=require("./index.es-CSD_u-fK.cjs"),h=require("./tslib.es6-D1TYK0An.cjs"),g=require("./component-DJvMx3oL.cjs");/**
2
+ * @license
3
+ * Copyright 2016 Google Inc.
4
+ *
5
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ * of this software and associated documentation files (the "Software"), to deal
7
+ * in the Software without restriction, including without limitation the rights
8
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ * copies of the Software, and to permit persons to whom the Software is
10
+ * furnished to do so, subject to the following conditions:
11
+ *
12
+ * The above copyright notice and this permission notice shall be included in
13
+ * all copies or substantial portions of the Software.
14
+ *
15
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ * THE SOFTWARE.
22
+ */var Q={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"};/**
23
+ * @license
24
+ * Copyright 2016 Google Inc.
25
+ *
26
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
27
+ * of this software and associated documentation files (the "Software"), to deal
28
+ * in the Software without restriction, including without limitation the rights
29
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
30
+ * copies of the Software, and to permit persons to whom the Software is
31
+ * furnished to do so, subject to the following conditions:
32
+ *
33
+ * The above copyright notice and this permission notice shall be included in
34
+ * all copies or substantial portions of the Software.
35
+ *
36
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
37
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
38
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
39
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
40
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
41
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
42
+ * THE SOFTWARE.
43
+ */var k=function(a){h.__extends(t,a);function t(e){var r=a.call(this,h.__assign(h.__assign({},t.defaultAdapter),e))||this;return r.shakeAnimationEndHandler_=function(){return r.handleShakeAnimationEnd_()},r}return Object.defineProperty(t,"cssClasses",{get:function(){return Q},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),t.prototype.init=function(){this.adapter.registerInteractionHandler("animationend",this.shakeAnimationEndHandler_)},t.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler_)},t.prototype.getWidth=function(){return this.adapter.getWidth()},t.prototype.shake=function(e){var r=t.cssClasses.LABEL_SHAKE;e?this.adapter.addClass(r):this.adapter.removeClass(r)},t.prototype.float=function(e){var r=t.cssClasses,s=r.LABEL_FLOAT_ABOVE,i=r.LABEL_SHAKE;e?this.adapter.addClass(s):(this.adapter.removeClass(s),this.adapter.removeClass(i))},t.prototype.setRequired=function(e){var r=t.cssClasses.LABEL_REQUIRED;e?this.adapter.addClass(r):this.adapter.removeClass(r)},t.prototype.handleShakeAnimationEnd_=function(){var e=t.cssClasses.LABEL_SHAKE;this.adapter.removeClass(e)},t}(g.MDCFoundation);/**
44
+ * @license
45
+ * Copyright 2016 Google Inc.
46
+ *
47
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
48
+ * of this software and associated documentation files (the "Software"), to deal
49
+ * in the Software without restriction, including without limitation the rights
50
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
51
+ * copies of the Software, and to permit persons to whom the Software is
52
+ * furnished to do so, subject to the following conditions:
53
+ *
54
+ * The above copyright notice and this permission notice shall be included in
55
+ * all copies or substantial portions of the Software.
56
+ *
57
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
58
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
59
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
60
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
61
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
62
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
63
+ * THE SOFTWARE.
64
+ */var I=function(a){h.__extends(t,a);function t(){return a!==null&&a.apply(this,arguments)||this}return t.attachTo=function(e){return new t(e)},t.prototype.shake=function(e){this.foundation.shake(e)},t.prototype.float=function(e){this.foundation.float(e)},t.prototype.setRequired=function(e){this.foundation.setRequired(e)},t.prototype.getWidth=function(){return this.foundation.getWidth()},t.prototype.getDefaultFoundation=function(){var e=this,r={addClass:function(s){return e.root.classList.add(s)},removeClass:function(s){return e.root.classList.remove(s)},getWidth:function(){return g.estimateScrollWidth(e.root)},registerInteractionHandler:function(s,i){return e.listen(s,i)},deregisterInteractionHandler:function(s,i){return e.unlisten(s,i)}};return new k(r)},t}(g.MDCComponent);/**
65
+ * @license
66
+ * Copyright 2018 Google Inc.
67
+ *
68
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
69
+ * of this software and associated documentation files (the "Software"), to deal
70
+ * in the Software without restriction, including without limitation the rights
71
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
72
+ * copies of the Software, and to permit persons to whom the Software is
73
+ * furnished to do so, subject to the following conditions:
74
+ *
75
+ * The above copyright notice and this permission notice shall be included in
76
+ * all copies or substantial portions of the Software.
77
+ *
78
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
79
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
80
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
81
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
82
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
83
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
84
+ * THE SOFTWARE.
85
+ */var M={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},H={NOTCH_ELEMENT_PADDING:8},O={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"};/**
86
+ * @license
87
+ * Copyright 2017 Google Inc.
88
+ *
89
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
90
+ * of this software and associated documentation files (the "Software"), to deal
91
+ * in the Software without restriction, including without limitation the rights
92
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
93
+ * copies of the Software, and to permit persons to whom the Software is
94
+ * furnished to do so, subject to the following conditions:
95
+ *
96
+ * The above copyright notice and this permission notice shall be included in
97
+ * all copies or substantial portions of the Software.
98
+ *
99
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
100
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
101
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
102
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
103
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
104
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
105
+ * THE SOFTWARE.
106
+ */var V=function(a){h.__extends(t,a);function t(e){return a.call(this,h.__assign(h.__assign({},t.defaultAdapter),e))||this}return Object.defineProperty(t,"strings",{get:function(){return M},enumerable:!1,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return O},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return H},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}},enumerable:!1,configurable:!0}),t.prototype.notch=function(e){var r=t.cssClasses.OUTLINE_NOTCHED;e>0&&(e+=H.NOTCH_ELEMENT_PADDING),this.adapter.setNotchWidthProperty(e),this.adapter.addClass(r)},t.prototype.closeNotch=function(){var e=t.cssClasses.OUTLINE_NOTCHED;this.adapter.removeClass(e),this.adapter.removeNotchWidthProperty()},t}(g.MDCFoundation);/**
107
+ * @license
108
+ * Copyright 2017 Google Inc.
109
+ *
110
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
111
+ * of this software and associated documentation files (the "Software"), to deal
112
+ * in the Software without restriction, including without limitation the rights
113
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
114
+ * copies of the Software, and to permit persons to whom the Software is
115
+ * furnished to do so, subject to the following conditions:
116
+ *
117
+ * The above copyright notice and this permission notice shall be included in
118
+ * all copies or substantial portions of the Software.
119
+ *
120
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
121
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
122
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
123
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
124
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
125
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
126
+ * THE SOFTWARE.
127
+ */var S=function(a){h.__extends(t,a);function t(){return a!==null&&a.apply(this,arguments)||this}return t.attachTo=function(e){return new t(e)},t.prototype.initialSyncWithDOM=function(){this.notchElement_=this.root.querySelector(M.NOTCH_ELEMENT_SELECTOR);var e=this.root.querySelector("."+k.cssClasses.ROOT);e?(e.style.transitionDuration="0s",this.root.classList.add(O.OUTLINE_UPGRADED),requestAnimationFrame(function(){e.style.transitionDuration=""})):this.root.classList.add(O.NO_LABEL)},t.prototype.notch=function(e){this.foundation.notch(e)},t.prototype.closeNotch=function(){this.foundation.closeNotch()},t.prototype.getDefaultFoundation=function(){var e=this,r={addClass:function(s){return e.root.classList.add(s)},removeClass:function(s){return e.root.classList.remove(s)},setNotchWidthProperty:function(s){return e.notchElement_.style.setProperty("width",s+"px")},removeNotchWidthProperty:function(){return e.notchElement_.style.removeProperty("width")}};return new V(r)},t}(g.MDCComponent);const z={children:n.PropTypes.node,disabled:n.PropTypes.bool,portalContainer:n.PropTypes.oneOfType([n.PropTypes.string,n.PropTypes.node])},J={children:null,disabled:!1,portalContainer:"document.body"},C=o.forwardRef((a,t)=>{const[e,r]=o.useState(document.body),{children:s,container:i,disabled:p}=a,l=o.useRef();return o.useImperativeHandle(t,()=>l.current,[]),o.useEffect(()=>{if(typeof i=="string")if(i==="document.body")r(document.body);else{const d=n.edsQuerySelector(i);r(d||document.body)}else r(i||document.body)},[i]),o.createElement(o.Fragment,null,p?s:j.createPortal(s,e))});C.displayName="Portal";C.propTypes=z;C.defaultProps=J;var B=o.memo(C);const X={children:n.PropTypes.node.isRequired,className:n.PropTypes.string,containerType:n.PropTypes.oneOf(["inline","block"]),hoisted:n.PropTypes.bool,id:n.PropTypes.string,onClick:n.PropTypes.func,portalContainer:n.PropTypes.oneOfType([n.PropTypes.string,n.PropTypes.node]),position:n.PropTypes.oneOf(["bottom","top","left","right"]),text:n.PropTypes.oneOfType([n.PropTypes.string,n.PropTypes.func,n.PropTypes.node]).isRequired,tooltipProps:n.PropTypes.object,triggerProps:n.PropTypes.object},Y={children:void 0,className:void 0,containerType:"inline",hoisted:!1,id:void 0,portalContainer:"document.body",position:"bottom",text:null,tooltipProps:null,triggerProps:null},Z={className:n.PropTypes.string,hoisted:n.PropTypes.bool,id:n.PropTypes.string,portalContainer:n.PropTypes.oneOfType([n.PropTypes.string,n.PropTypes.node]),text:n.PropTypes.oneOfType([n.PropTypes.string,n.PropTypes.func,n.PropTypes.node]).isRequired},ee={className:void 0,hoisted:!1,id:void 0,portalContainer:"document.body",text:null},_=o.forwardRef((a,t)=>{const{className:e,hoisted:r,id:s,portalContainer:i,text:p,...l}=a,[d]=o.useState(()=>s||n.edsRandomId()),f=o.useRef();o.useImperativeHandle(t,()=>f.current,[]);const m=o.useMemo(()=>n.clsx(["lmnt",e,"lmnt-tooltip__text-content","mdc-typography--caption"]),[e]);return o.createElement(B,{disabled:!r,container:i},o.createElement("div",n._extends({role:"tooltip",id:d,className:m},l,{ref:f}),p))});_.displayName="TooltipText";_.propTypes=Z;_.defaultProps=ee;const R=o.forwardRef((a,t)=>{const{children:e,className:r,containerType:s,hoisted:i,id:p,onClick:l,portalContainer:d,position:f,text:m,tooltipProps:E,triggerProps:q,...w}=a,L=o.useRef(),y=o.useRef(),b=o.useRef();o.useImperativeHandle(t,()=>y.current,[]);const[T]=o.useState(()=>p||n.edsRandomId()),W=o.useCallback(()=>{l?.()},[l]),U=o.useCallback(c=>{c.key==="Enter"&&l?.()},[l]);n.useIsomorphicLayoutEffect(()=>{const c=[{name:"flip",options:{enabled:!0,padding:{bottom:32,top:32}}}];return i?c.push({name:"offset",options:{offset:[0,6]}}):c.push({name:"offset",options:{offset:[0,12]}}),L.current&&y.current&&(b.current=G.createPopper(L.current,y.current,{placement:f,modifiers:c})),()=>{var u;(u=b.current)===null||u===void 0||u.destroy()}},[f,i]);const A=o.useCallback(()=>{var c,u,P;(c=y.current)===null||c===void 0||c.setAttribute("data-show",""),(u=b.current)===null||u===void 0||u.setOptions(F=>({...F,modifiers:[...F.modifiers,{name:"eventListeners",enabled:!0}]})),(P=b.current)===null||P===void 0||P.update()},[]),D=o.useCallback(()=>{var c,u;(c=y.current)===null||c===void 0||c.removeAttribute("data-show"),(u=b.current)===null||u===void 0||u.setOptions(P=>({...P,modifiers:[...P.modifiers,{name:"eventListeners",enabled:!1}]}))},[]),x=o.useCallback(()=>{const c=e;return c.type?c.type===o.Fragment:c===o.Fragment},[e]);o.useEffect(()=>{const c=`Tooltips should only include short text for additional context and should not exceed three lines visually. (Toolitip ID ${T}).`;m&&m.length>100&&n.edsWarning(c)},[m,T]);const $=o.useMemo(()=>()=>e?typeof e=="string"||x(e)?o.createElement("span",{"aria-describedby":T},e):n.addProps(e,{"aria-describedby":T}):null,[e,T,x]),K=l?{tabIndex:0,role:l?"button":"note",onKeyPress:U,onClick:W}:{};return o.createElement("span",n._extends({className:n.clsx("lmnt lmnt-tooltip",s==="block"?"lmnt-tooltip--block":"lmnt-tooltip--inline")},K,w),o.createElement("span",n._extends({className:n.clsx("lmnt-tooltip__content",s==="block"?"lmnt-tooltip--block":"lmnt-tooltip--inline")},q,{ref:L,onMouseEnter:A,onFocus:A,onMouseLeave:D,onBlur:D}),o.createElement($,null)),m&&o.createElement(_,n._extends({hoisted:i,portalContainer:d,role:"tooltip",id:T,className:r},E,{ref:y,text:m})))});R.displayName="Tooltip";R.propTypes=X;R.defaultProps=Y;const te={children:n.PropTypes.node.isRequired,className:n.PropTypes.string,float:n.PropTypes.bool,htmlFor:n.PropTypes.string,shake:n.PropTypes.bool},ne={children:null,className:void 0,float:!1,htmlFor:"",shake:!1},v=o.forwardRef((a,t)=>{const{children:e,htmlFor:r="",shake:s=!1,float:i=!1,className:p,style:l,...d}=a,f=o.useRef(),m=e,E=o.useRef();return o.useImperativeHandle(t,()=>E.current,[]),o.useEffect(()=>(f.current=I.attachTo(E.current),()=>{f.current.destroy()})),o.useEffect(()=>{f.current.float(i)},[i]),o.createElement("label",n._extends({ref:E,htmlFor:r,className:n.clsx("lmnt","mdc-floating-label",i&&"mdc-floating-label--float-above",s&&"mdc-floating-label--shake",p)},d,{style:l}),m)});v.displayName="FloatingLabel";v.propTypes=te;v.defaultProps=ne;const oe={children:n.PropTypes.node,className:n.PropTypes.string,closed:n.PropTypes.bool,width:n.PropTypes.number},re={children:null,className:void 0,closed:void 0,width:null},N=o.forwardRef((a,t)=>{const{closed:e,className:r,children:s,width:i,...p}=a,l=o.useRef(),d=o.useRef();return o.useImperativeHandle(t,()=>l.current,[]),o.useEffect(()=>(d.current=S.attachTo(l.current),()=>{d.current.destroy()}),[]),o.useEffect(()=>{e!==void 0&&(e?d.current.closeNotch():d.current.notch())},[e]),o.useEffect(()=>{i?d.current.foundation.adapter.setNotchWidthProperty(i):d.current.foundation.adapter.removeNotchWidthProperty()},[i]),o.createElement("div",n._extends({className:n.clsx("lmnt","mdc-notched-outline",r),ref:l},p),o.createElement("div",{className:"mdc-notched-outline__leading"}),o.createElement("div",{className:"mdc-notched-outline__notch"},s),o.createElement("div",{className:"mdc-notched-outline__trailing"}))});N.displayName="NotchedOutline";N.propTypes=oe;N.defaultProps=re;exports.FloatingLabel=v;exports.MDCFloatingLabel=I;exports.MDCNotchedOutline=S;exports.NotchedOutline=N;exports.Portal$1=B;exports.TooltipText=_;
@@ -0,0 +1 @@
1
+ "use strict";const E=require("./index.es-CEydmFbW.cjs"),Z=require("react");var j="top",S="bottom",H="right",$="left",De="auto",ce=[j,S,H,$],_="start",le="end",mt="clippingParents",_e="viewport",oe="popper",gt="reference",Fe=ce.reduce(function(e,t){return e.concat([t+"-"+_,t+"-"+le])},[]),et=[].concat(ce,[De]).reduce(function(e,t){return e.concat([t,t+"-"+_,t+"-"+le])},[]),yt="beforeRead",ht="read",bt="afterRead",wt="beforeMain",xt="main",Ot="afterMain",Pt="beforeWrite",Et="write",At="afterWrite",Tt=[yt,ht,bt,wt,xt,Ot,Pt,Et,At];function N(e){return e?(e.nodeName||"").toLowerCase():null}function C(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function K(e){var t=C(e).Element;return e instanceof t||e instanceof Element}function L(e){var t=C(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Be(e){if(typeof ShadowRoot>"u")return!1;var t=C(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Rt(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},a=t.attributes[r]||{},o=t.elements[r];!L(o)||!N(o)||(Object.assign(o.style,n),Object.keys(a).forEach(function(c){var s=a[c];s===!1?o.removeAttribute(c):o.setAttribute(c,s===!0?"":s)}))})}function Dt(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var a=t.elements[n],o=t.attributes[n]||{},c=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),s=c.reduce(function(i,p){return i[p]="",i},{});!L(a)||!N(a)||(Object.assign(a.style,s),Object.keys(o).forEach(function(i){a.removeAttribute(i)}))})}}const Bt={name:"applyStyles",enabled:!0,phase:"write",fn:Rt,effect:Dt,requires:["computeStyles"]};function I(e){return e.split("-")[0]}var J=Math.max,be=Math.min,ee=Math.round;function Te(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function tt(){return!/^((?!chrome|android).)*safari/i.test(Te())}function te(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),a=1,o=1;t&&L(e)&&(a=e.offsetWidth>0&&ee(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&ee(n.height)/e.offsetHeight||1);var c=K(e)?C(e):window,s=c.visualViewport,i=!tt()&&r,p=(n.left+(i&&s?s.offsetLeft:0))/a,f=(n.top+(i&&s?s.offsetTop:0))/o,d=n.width/a,g=n.height/o;return{width:d,height:g,top:f,right:p+d,bottom:f+g,left:p,x:p,y:f}}function je(e){var t=te(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function rt(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&Be(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function V(e){return C(e).getComputedStyle(e)}function jt(e){return["table","td","th"].indexOf(N(e))>=0}function q(e){return((K(e)?e.ownerDocument:e.document)||window.document).documentElement}function we(e){return N(e)==="html"?e:e.assignedSlot||e.parentNode||(Be(e)?e.host:null)||q(e)}function Xe(e){return!L(e)||V(e).position==="fixed"?null:e.offsetParent}function $t(e){var t=/firefox/i.test(Te()),r=/Trident/i.test(Te());if(r&&L(e)){var n=V(e);if(n.position==="fixed")return null}var a=we(e);for(Be(a)&&(a=a.host);L(a)&&["html","body"].indexOf(N(a))<0;){var o=V(a);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return a;a=a.parentNode}return null}function pe(e){for(var t=C(e),r=Xe(e);r&&jt(r)&&V(r).position==="static";)r=Xe(r);return r&&(N(r)==="html"||N(r)==="body"&&V(r).position==="static")?t:r||$t(e)||t}function $e(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ie(e,t,r){return J(e,be(t,r))}function kt(e,t,r){var n=ie(e,t,r);return n>r?r:n}function nt(){return{top:0,right:0,bottom:0,left:0}}function at(e){return Object.assign({},nt(),e)}function ot(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var Ct=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,at(typeof t!="number"?t:ot(t,ce))};function Lt(e){var t,r=e.state,n=e.name,a=e.options,o=r.elements.arrow,c=r.modifiersData.popperOffsets,s=I(r.placement),i=$e(s),p=[$,H].indexOf(s)>=0,f=p?"height":"width";if(!(!o||!c)){var d=Ct(a.padding,r),g=je(o),l=i==="y"?j:$,x=i==="y"?S:H,v=r.rects.reference[f]+r.rects.reference[i]-c[i]-r.rects.popper[f],m=c[i]-r.rects.reference[i],y=pe(o),O=y?i==="y"?y.clientHeight||0:y.clientWidth||0:0,b=v/2-m/2,u=d[l],h=O-g[f]-d[x],w=O/2-g[f]/2+b,P=ie(u,w,h),R=i;r.modifiersData[n]=(t={},t[R]=P,t.centerOffset=P-w,t)}}function St(e){var t=e.state,r=e.options,n=r.element,a=n===void 0?"[data-popper-arrow]":n;a!=null&&(typeof a=="string"&&(a=t.elements.popper.querySelector(a),!a)||rt(t.elements.popper,a)&&(t.elements.arrow=a))}const Ht={name:"arrow",enabled:!0,phase:"main",fn:Lt,effect:St,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function re(e){return e.split("-")[1]}var Mt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Wt(e,t){var r=e.x,n=e.y,a=t.devicePixelRatio||1;return{x:ee(r*a)/a||0,y:ee(n*a)/a||0}}function Ye(e){var t,r=e.popper,n=e.popperRect,a=e.placement,o=e.variation,c=e.offsets,s=e.position,i=e.gpuAcceleration,p=e.adaptive,f=e.roundOffsets,d=e.isFixed,g=c.x,l=g===void 0?0:g,x=c.y,v=x===void 0?0:x,m=typeof f=="function"?f({x:l,y:v}):{x:l,y:v};l=m.x,v=m.y;var y=c.hasOwnProperty("x"),O=c.hasOwnProperty("y"),b=$,u=j,h=window;if(p){var w=pe(r),P="clientHeight",R="clientWidth";if(w===C(r)&&(w=q(r),V(w).position!=="static"&&s==="absolute"&&(P="scrollHeight",R="scrollWidth")),w=w,a===j||(a===$||a===H)&&o===le){u=S;var T=d&&w===h&&h.visualViewport?h.visualViewport.height:w[P];v-=T-n.height,v*=i?1:-1}if(a===$||(a===j||a===S)&&o===le){b=H;var A=d&&w===h&&h.visualViewport?h.visualViewport.width:w[R];l-=A-n.width,l*=i?1:-1}}var D=Object.assign({position:s},p&&Mt),M=f===!0?Wt({x:l,y:v},C(r)):{x:l,y:v};if(l=M.x,v=M.y,i){var B;return Object.assign({},D,(B={},B[u]=O?"0":"",B[b]=y?"0":"",B.transform=(h.devicePixelRatio||1)<=1?"translate("+l+"px, "+v+"px)":"translate3d("+l+"px, "+v+"px, 0)",B))}return Object.assign({},D,(t={},t[u]=O?v+"px":"",t[b]=y?l+"px":"",t.transform="",t))}function It(e){var t=e.state,r=e.options,n=r.gpuAcceleration,a=n===void 0?!0:n,o=r.adaptive,c=o===void 0?!0:o,s=r.roundOffsets,i=s===void 0?!0:s,p={placement:I(t.placement),variation:re(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Ye(Object.assign({},p,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:c,roundOffsets:i})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ye(Object.assign({},p,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:i})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Nt={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:It,data:{}};var ye={passive:!0};function Vt(e){var t=e.state,r=e.instance,n=e.options,a=n.scroll,o=a===void 0?!0:a,c=n.resize,s=c===void 0?!0:c,i=C(t.elements.popper),p=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&p.forEach(function(f){f.addEventListener("scroll",r.update,ye)}),s&&i.addEventListener("resize",r.update,ye),function(){o&&p.forEach(function(f){f.removeEventListener("scroll",r.update,ye)}),s&&i.removeEventListener("resize",r.update,ye)}}const zt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Vt,data:{}};var qt={left:"right",right:"left",bottom:"top",top:"bottom"};function he(e){return e.replace(/left|right|bottom|top/g,function(t){return qt[t]})}var Ft={start:"end",end:"start"};function Ue(e){return e.replace(/start|end/g,function(t){return Ft[t]})}function ke(e){var t=C(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function Ce(e){return te(q(e)).left+ke(e).scrollLeft}function Xt(e,t){var r=C(e),n=q(e),a=r.visualViewport,o=n.clientWidth,c=n.clientHeight,s=0,i=0;if(a){o=a.width,c=a.height;var p=tt();(p||!p&&t==="fixed")&&(s=a.offsetLeft,i=a.offsetTop)}return{width:o,height:c,x:s+Ce(e),y:i}}function Yt(e){var t,r=q(e),n=ke(e),a=(t=e.ownerDocument)==null?void 0:t.body,o=J(r.scrollWidth,r.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),c=J(r.scrollHeight,r.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),s=-n.scrollLeft+Ce(e),i=-n.scrollTop;return V(a||r).direction==="rtl"&&(s+=J(r.clientWidth,a?a.clientWidth:0)-o),{width:o,height:c,x:s,y:i}}function Le(e){var t=V(e),r=t.overflow,n=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+a+n)}function it(e){return["html","body","#document"].indexOf(N(e))>=0?e.ownerDocument.body:L(e)&&Le(e)?e:it(we(e))}function se(e,t){var r;t===void 0&&(t=[]);var n=it(e),a=n===((r=e.ownerDocument)==null?void 0:r.body),o=C(n),c=a?[o].concat(o.visualViewport||[],Le(n)?n:[]):n,s=t.concat(c);return a?s:s.concat(se(we(c)))}function Re(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Ut(e,t){var r=te(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function Ge(e,t,r){return t===_e?Re(Xt(e,r)):K(t)?Ut(t,r):Re(Yt(q(e)))}function Gt(e){var t=se(we(e)),r=["absolute","fixed"].indexOf(V(e).position)>=0,n=r&&L(e)?pe(e):e;return K(n)?t.filter(function(a){return K(a)&&rt(a,n)&&N(a)!=="body"}):[]}function Jt(e,t,r,n){var a=t==="clippingParents"?Gt(e):[].concat(t),o=[].concat(a,[r]),c=o[0],s=o.reduce(function(i,p){var f=Ge(e,p,n);return i.top=J(f.top,i.top),i.right=be(f.right,i.right),i.bottom=be(f.bottom,i.bottom),i.left=J(f.left,i.left),i},Ge(e,c,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function st(e){var t=e.reference,r=e.element,n=e.placement,a=n?I(n):null,o=n?re(n):null,c=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,i;switch(a){case j:i={x:c,y:t.y-r.height};break;case S:i={x:c,y:t.y+t.height};break;case H:i={x:t.x+t.width,y:s};break;case $:i={x:t.x-r.width,y:s};break;default:i={x:t.x,y:t.y}}var p=a?$e(a):null;if(p!=null){var f=p==="y"?"height":"width";switch(o){case _:i[p]=i[p]-(t[f]/2-r[f]/2);break;case le:i[p]=i[p]+(t[f]/2-r[f]/2);break}}return i}function fe(e,t){t===void 0&&(t={});var r=t,n=r.placement,a=n===void 0?e.placement:n,o=r.strategy,c=o===void 0?e.strategy:o,s=r.boundary,i=s===void 0?mt:s,p=r.rootBoundary,f=p===void 0?_e:p,d=r.elementContext,g=d===void 0?oe:d,l=r.altBoundary,x=l===void 0?!1:l,v=r.padding,m=v===void 0?0:v,y=at(typeof m!="number"?m:ot(m,ce)),O=g===oe?gt:oe,b=e.rects.popper,u=e.elements[x?O:g],h=Jt(K(u)?u:u.contextElement||q(e.elements.popper),i,f,c),w=te(e.elements.reference),P=st({reference:w,element:b,strategy:"absolute",placement:a}),R=Re(Object.assign({},b,P)),T=g===oe?R:w,A={top:h.top-T.top+y.top,bottom:T.bottom-h.bottom+y.bottom,left:h.left-T.left+y.left,right:T.right-h.right+y.right},D=e.modifiersData.offset;if(g===oe&&D){var M=D[a];Object.keys(A).forEach(function(B){var F=[H,S].indexOf(B)>=0?1:-1,X=[j,S].indexOf(B)>=0?"y":"x";A[B]+=M[X]*F})}return A}function Kt(e,t){t===void 0&&(t={});var r=t,n=r.placement,a=r.boundary,o=r.rootBoundary,c=r.padding,s=r.flipVariations,i=r.allowedAutoPlacements,p=i===void 0?et:i,f=re(n),d=f?s?Fe:Fe.filter(function(x){return re(x)===f}):ce,g=d.filter(function(x){return p.indexOf(x)>=0});g.length===0&&(g=d);var l=g.reduce(function(x,v){return x[v]=fe(e,{placement:v,boundary:a,rootBoundary:o,padding:c})[I(v)],x},{});return Object.keys(l).sort(function(x,v){return l[x]-l[v]})}function Qt(e){if(I(e)===De)return[];var t=he(e);return[Ue(e),t,Ue(t)]}function Zt(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var a=r.mainAxis,o=a===void 0?!0:a,c=r.altAxis,s=c===void 0?!0:c,i=r.fallbackPlacements,p=r.padding,f=r.boundary,d=r.rootBoundary,g=r.altBoundary,l=r.flipVariations,x=l===void 0?!0:l,v=r.allowedAutoPlacements,m=t.options.placement,y=I(m),O=y===m,b=i||(O||!x?[he(m)]:Qt(m)),u=[m].concat(b).reduce(function(Q,z){return Q.concat(I(z)===De?Kt(t,{placement:z,boundary:f,rootBoundary:d,padding:p,flipVariations:x,allowedAutoPlacements:v}):z)},[]),h=t.rects.reference,w=t.rects.popper,P=new Map,R=!0,T=u[0],A=0;A<u.length;A++){var D=u[A],M=I(D),B=re(D)===_,F=[j,S].indexOf(M)>=0,X=F?"width":"height",k=fe(t,{placement:D,boundary:f,rootBoundary:d,altBoundary:g,padding:p}),W=F?B?H:$:B?S:j;h[X]>w[X]&&(W=he(W));var ue=he(W),Y=[];if(o&&Y.push(k[M]<=0),s&&Y.push(k[W]<=0,k[ue]<=0),Y.every(function(Q){return Q})){T=D,R=!1;break}P.set(D,Y)}if(R)for(var de=x?3:1,Oe=function(z){var ae=u.find(function(me){var U=P.get(me);if(U)return U.slice(0,z).every(function(Pe){return Pe})});if(ae)return T=ae,"break"},ne=de;ne>0;ne--){var ve=Oe(ne);if(ve==="break")break}t.placement!==T&&(t.modifiersData[n]._skip=!0,t.placement=T,t.reset=!0)}}const _t={name:"flip",enabled:!0,phase:"main",fn:Zt,requiresIfExists:["offset"],data:{_skip:!1}};function Je(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Ke(e){return[j,H,S,$].some(function(t){return e[t]>=0})}function er(e){var t=e.state,r=e.name,n=t.rects.reference,a=t.rects.popper,o=t.modifiersData.preventOverflow,c=fe(t,{elementContext:"reference"}),s=fe(t,{altBoundary:!0}),i=Je(c,n),p=Je(s,a,o),f=Ke(i),d=Ke(p);t.modifiersData[r]={referenceClippingOffsets:i,popperEscapeOffsets:p,isReferenceHidden:f,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":d})}const tr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:er};function rr(e,t,r){var n=I(e),a=[$,j].indexOf(n)>=0?-1:1,o=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,c=o[0],s=o[1];return c=c||0,s=(s||0)*a,[$,H].indexOf(n)>=0?{x:s,y:c}:{x:c,y:s}}function nr(e){var t=e.state,r=e.options,n=e.name,a=r.offset,o=a===void 0?[0,0]:a,c=et.reduce(function(f,d){return f[d]=rr(d,t.rects,o),f},{}),s=c[t.placement],i=s.x,p=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=i,t.modifiersData.popperOffsets.y+=p),t.modifiersData[n]=c}const ar={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:nr};function or(e){var t=e.state,r=e.name;t.modifiersData[r]=st({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const ir={name:"popperOffsets",enabled:!0,phase:"read",fn:or,data:{}};function sr(e){return e==="x"?"y":"x"}function lr(e){var t=e.state,r=e.options,n=e.name,a=r.mainAxis,o=a===void 0?!0:a,c=r.altAxis,s=c===void 0?!1:c,i=r.boundary,p=r.rootBoundary,f=r.altBoundary,d=r.padding,g=r.tether,l=g===void 0?!0:g,x=r.tetherOffset,v=x===void 0?0:x,m=fe(t,{boundary:i,rootBoundary:p,padding:d,altBoundary:f}),y=I(t.placement),O=re(t.placement),b=!O,u=$e(y),h=sr(u),w=t.modifiersData.popperOffsets,P=t.rects.reference,R=t.rects.popper,T=typeof v=="function"?v(Object.assign({},t.rects,{placement:t.placement})):v,A=typeof T=="number"?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,M={x:0,y:0};if(w){if(o){var B,F=u==="y"?j:$,X=u==="y"?S:H,k=u==="y"?"height":"width",W=w[u],ue=W+m[F],Y=W-m[X],de=l?-R[k]/2:0,Oe=O===_?P[k]:R[k],ne=O===_?-R[k]:-P[k],ve=t.elements.arrow,Q=l&&ve?je(ve):{width:0,height:0},z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:nt(),ae=z[F],me=z[X],U=ie(0,P[k],Q[k]),Pe=b?P[k]/2-de-U-ae-A.mainAxis:Oe-U-ae-A.mainAxis,ft=b?-P[k]/2+de+U+me+A.mainAxis:ne+U+me+A.mainAxis,Ee=t.elements.arrow&&pe(t.elements.arrow),ct=Ee?u==="y"?Ee.clientTop||0:Ee.clientLeft||0:0,Se=(B=D?.[u])!=null?B:0,pt=W+Pe-Se-ct,ut=W+ft-Se,He=ie(l?be(ue,pt):ue,W,l?J(Y,ut):Y);w[u]=He,M[u]=He-W}if(s){var Me,dt=u==="x"?j:$,vt=u==="x"?S:H,G=w[h],ge=h==="y"?"height":"width",We=G+m[dt],Ie=G-m[vt],Ae=[j,$].indexOf(y)!==-1,Ne=(Me=D?.[h])!=null?Me:0,Ve=Ae?We:G-P[ge]-R[ge]-Ne+A.altAxis,ze=Ae?G+P[ge]+R[ge]-Ne-A.altAxis:Ie,qe=l&&Ae?kt(Ve,G,ze):ie(l?Ve:We,G,l?ze:Ie);w[h]=qe,M[h]=qe-G}t.modifiersData[n]=M}}const fr={name:"preventOverflow",enabled:!0,phase:"main",fn:lr,requiresIfExists:["offset"]};function cr(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function pr(e){return e===C(e)||!L(e)?ke(e):cr(e)}function ur(e){var t=e.getBoundingClientRect(),r=ee(t.width)/e.offsetWidth||1,n=ee(t.height)/e.offsetHeight||1;return r!==1||n!==1}function dr(e,t,r){r===void 0&&(r=!1);var n=L(t),a=L(t)&&ur(t),o=q(t),c=te(e,a,r),s={scrollLeft:0,scrollTop:0},i={x:0,y:0};return(n||!n&&!r)&&((N(t)!=="body"||Le(o))&&(s=pr(t)),L(t)?(i=te(t,!0),i.x+=t.clientLeft,i.y+=t.clientTop):o&&(i.x=Ce(o))),{x:c.left+s.scrollLeft-i.x,y:c.top+s.scrollTop-i.y,width:c.width,height:c.height}}function vr(e){var t=new Map,r=new Set,n=[];e.forEach(function(o){t.set(o.name,o)});function a(o){r.add(o.name);var c=[].concat(o.requires||[],o.requiresIfExists||[]);c.forEach(function(s){if(!r.has(s)){var i=t.get(s);i&&a(i)}}),n.push(o)}return e.forEach(function(o){r.has(o.name)||a(o)}),n}function mr(e){var t=vr(e);return Tt.reduce(function(r,n){return r.concat(t.filter(function(a){return a.phase===n}))},[])}function gr(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function yr(e){var t=e.reduce(function(r,n){var a=r[n.name];return r[n.name]=a?Object.assign({},a,n,{options:Object.assign({},a.options,n.options),data:Object.assign({},a.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var Qe={placement:"bottom",modifiers:[],strategy:"absolute"};function Ze(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function hr(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,a=t.defaultOptions,o=a===void 0?Qe:a;return function(s,i,p){p===void 0&&(p=o);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},Qe,o),modifiersData:{},elements:{reference:s,popper:i},attributes:{},styles:{}},d=[],g=!1,l={state:f,setOptions:function(y){var O=typeof y=="function"?y(f.options):y;v(),f.options=Object.assign({},o,f.options,O),f.scrollParents={reference:K(s)?se(s):s.contextElement?se(s.contextElement):[],popper:se(i)};var b=mr(yr([].concat(n,f.options.modifiers)));return f.orderedModifiers=b.filter(function(u){return u.enabled}),x(),l.update()},forceUpdate:function(){if(!g){var y=f.elements,O=y.reference,b=y.popper;if(Ze(O,b)){f.rects={reference:dr(O,pe(b),f.options.strategy==="fixed"),popper:je(b)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach(function(A){return f.modifiersData[A.name]=Object.assign({},A.data)});for(var u=0;u<f.orderedModifiers.length;u++){if(f.reset===!0){f.reset=!1,u=-1;continue}var h=f.orderedModifiers[u],w=h.fn,P=h.options,R=P===void 0?{}:P,T=h.name;typeof w=="function"&&(f=w({state:f,options:R,name:T,instance:l})||f)}}}},update:gr(function(){return new Promise(function(m){l.forceUpdate(),m(f)})}),destroy:function(){v(),g=!0}};if(!Ze(s,i))return l;l.setOptions(p).then(function(m){!g&&p.onFirstUpdate&&p.onFirstUpdate(m)});function x(){f.orderedModifiers.forEach(function(m){var y=m.name,O=m.options,b=O===void 0?{}:O,u=m.effect;if(typeof u=="function"){var h=u({state:f,name:y,instance:l,options:b}),w=function(){};d.push(h||w)}})}function v(){d.forEach(function(m){return m()}),d=[]}return l}}var br=[zt,ir,Nt,Bt,ar,_t,fr,Ht,tr],lt=hr({defaultModifiers:br});const wr={ariaHidden:E.PropTypes.bool,ariaLabel:E.PropTypes.string,ariaLabelledBy:E.PropTypes.string,badge:E.PropTypes.node,badgePlacement:E.PropTypes.oneOf(["right-start","left-start"]),className:E.PropTypes.string,icon:E.PropTypes.oneOfType([E.PropTypes.string,E.PropTypes.node]),iconSize:E.PropTypes.oneOf(["xsmall","small","medium","large","xlarge"]),iconType:E.PropTypes.oneOf(["filled","outlined","rounded","two-tone","sharp"]),pointer:E.PropTypes.bool,size:E.deprecatedProp(E.PropTypes.oneOf(["xsmall","small","medium","large","xlarge"]),"Icon","Renamed, see iconSize instead."),variant:E.deprecatedOneOf(E.PropTypes.oneOf(["","filled-danger-alt","filled-danger","filled-muted","filled-primary","filled-secondary","color-primary","color-secondary","color-on-dark","blue","gray","green","orange","purple","red","teal","yellow"]),["primary-alt","secondary-alt","primary","danger-alt","danger","muted"],"Icon","Please use one of '','filled-danger-alt','filled-danger','filled-muted','filled-primary','filled-secondary','color-primary','color-secondary','color-on-dark','blue','gray','green','orange','purple','red','teal','yellow'.")},xr={ariaHidden:null,ariaLabel:null,ariaLabelledBy:null,badge:void 0,badgePlacement:"right-start",className:void 0,icon:null,iconSize:"medium",iconType:"filled",pointer:!1,size:void 0,variant:""},xe=Z.forwardRef((e,t)=>{const{ariaHidden:r,ariaLabel:n,ariaLabelledBy:a,badge:o,badgePlacement:c,className:s,icon:i,iconType:p,pointer:f,size:d,iconSize:g,variant:l,...x}=e,v=Z.useRef(),m=Z.useRef(),y=Z.useRef();Z.useImperativeHandle(t,()=>v.current,[]),E.useIsomorphicLayoutEffect(()=>{if(o){let b;o.props.counter!=null?b=[{name:"flip",options:{fallbackPlacements:["right","left"]}},{name:"offset",options:{offset:u=>{let{placement:h}=u;return h==="right-start"?[-5,-10]:[-7,-10]}}}]:b=[{name:"flip",options:{fallbackPlacements:["right-start","left-start"]}},{name:"offset",options:{offset:[0,-10]}}],y.current=lt(v.current,m.current,{placement:c,modifiers:b})}return()=>{var b;y==null||(b=y.current)===null||b===void 0||b.destroy()}},[o,c]);const O=E.clsx("lmnt","lmnt-icon",p==="filled"&&"material-icons",p==="outlined"&&"material-icons-outlined",p==="rounded"&&"material-icons-round",p==="two-tone"&&"material-icons-two-tone",p==="sharp"&&"material-icons-sharp",f&&"lmnt-icon-pointer",d==="medium"||g==="medium"&&"lmnt-icon--medium",d==="large"||g==="large"&&"lmnt-icon--large",d==="xlarge"||g==="xlarge"&&"lmnt-icon--xlarge",(l==="primary"||l==="primary-alt"||l==="muted"||l==="danger"||l==="danger-alt"||l==="filled-primary"||l==="filled-secondary"||l==="filled-muted"||l==="filled-danger"||l==="filled-danger-alt"||l==="blue"||l==="gray"||l==="green"||l==="orange"||l==="purple"||l==="red"||l==="teal"||l==="yellow")&&"lmnt-icon--fill",(l==="danger-alt"||l==="filled-danger-alt")&&"lmnt-icon--fill-danger-alt",(l==="danger"||l==="filled-danger")&&"lmnt-icon--fill-danger",(l==="primary"||l==="filled-primary")&&"lmnt-icon--fill-primary",(l==="primary-alt"||l==="filled-secondary")&&"lmnt-icon--fill-secondary",(l==="muted"||l==="filled-muted")&&"lmnt-icon--fill-muted",(l==="secondary-alt"||l==="color-on-dark")&&"lmnt-icon--color-on-dark",l==="color-primary"&&"lmnt-icon--color-primary",l==="color-secondary"&&"lmnt-icon--color-secondary",l==="blue"&&"lmnt-icon--utility-blue",l==="gray"&&"lmnt-icon--utility-gray",l==="green"&&"lmnt-icon--utility-green",l==="orange"&&"lmnt-icon--utility-orange",l==="purple"&&"lmnt-icon--utility-purple",l==="red"&&"lmnt-icon--utility-red",l==="teal"&&"lmnt-icon--utility-teal",l==="yellow"&&"lmnt-icon--utility-yellow",!o&&(d==="xsmall"||g==="xsmall"&&"lmnt-icon--xsmall"),!o&&(d==="small"||g==="small"&&"lmnt-icon--small"),s);return Z.createElement("i",E._extends({className:O,"aria-label":n,"aria-labelledby":a,"aria-hidden":n||a?r:!1},x,{ref:v}),i,E.addProps(o,{ref:m}))});xe.displayName="Icon";xe.propTypes=wr;xe.defaultProps=xr;exports.Icon=xe;exports.createPopper=lt;