@lifesg/react-design-system 1.0.0-alpha.2 → 1.0.0-alpha.20
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.
- package/README.md +2 -0
- package/accordion/accordion-item.style.d.ts +5 -2
- package/accordion/accordion.style.d.ts +1 -1
- package/accordion/index.js +165 -172
- package/accordion/index.js.map +1 -1
- package/alert/alert.style.d.ts +4 -1
- package/alert/index.js +107 -119
- package/alert/index.js.map +1 -1
- package/animations/index.js +1 -1
- package/animations/index.js.map +1 -1
- package/box-container/box-container.styles.d.ts +8 -1
- package/box-container/index.js +69 -74
- package/box-container/index.js.map +1 -1
- package/breadcrumb/breadcrumb.style.d.ts +4 -4
- package/breadcrumb/index.js +102 -106
- package/breadcrumb/index.js.map +1 -1
- package/breadcrumb/types.d.ts +5 -1
- package/button/button.d.ts +2 -2
- package/button/index.js +140 -143
- package/button/index.js.map +1 -1
- package/card/card.d.ts +3 -0
- package/card/card.style.d.ts +1 -0
- package/card/index.d.ts +1 -0
- package/card/index.js +132 -0
- package/card/index.js.map +1 -0
- package/{icon → card}/package.json +1 -1
- package/card/types.d.ts +4 -0
- package/checkbox/checkbox.d.ts +1 -1
- package/checkbox/checkbox.style.d.ts +4 -1
- package/checkbox/index.js +11 -21
- package/checkbox/index.js.map +1 -1
- package/cjs/index.js +1999 -1021
- package/cjs/index.js.map +1 -1
- package/color/color.d.ts +4 -59
- package/color/index.js +1 -1
- package/color/index.js.map +1 -1
- package/color/types.d.ts +5 -1
- package/date-input/date-input.d.ts +1 -1
- package/date-input/date-input.style.d.ts +2 -6
- package/date-input/index.js +121 -136
- package/date-input/index.js.map +1 -1
- package/date-input/types.d.ts +14 -16
- package/design-token/design-token.d.ts +4 -0
- package/design-token/index.d.ts +2 -0
- package/design-token/index.js +6 -0
- package/design-token/index.js.map +1 -0
- package/design-token/package.json +7 -0
- package/design-token/types.d.ts +7 -0
- package/error-display/error-display-data.d.ts +11 -0
- package/error-display/error-display.d.ts +3 -0
- package/error-display/error-display.style.d.ts +7 -0
- package/error-display/index.d.ts +2 -0
- package/error-display/index.js +322 -0
- package/error-display/index.js.map +1 -0
- package/error-display/package.json +7 -0
- package/error-display/types.d.ts +20 -0
- package/feedback-rating/feedback-rating-data.d.ts +5 -0
- package/feedback-rating/feedback-rating-stars-container-data.d.ts +3 -0
- package/feedback-rating/feedback-rating-stars-container.d.ts +3 -0
- package/feedback-rating/feedback-rating-stars-container.styles.d.ts +12 -0
- package/feedback-rating/feedback-rating.d.ts +3 -0
- package/feedback-rating/feedback-rating.styles.d.ts +5 -0
- package/feedback-rating/index.d.ts +2 -0
- package/feedback-rating/index.js +329 -0
- package/feedback-rating/index.js.map +1 -0
- package/feedback-rating/package.json +7 -0
- package/feedback-rating/types.d.ts +14 -0
- package/footer/footer-download-app.d.ts +2 -0
- package/footer/footer-download-app.style.d.ts +6 -0
- package/footer/footer-helper.d.ts +12 -0
- package/footer/footer.d.ts +3 -0
- package/footer/footer.style.d.ts +12 -0
- package/footer/index.d.ts +2 -0
- package/footer/index.js +373 -0
- package/footer/index.js.map +1 -0
- package/footer/package.json +7 -0
- package/footer/types.d.ts +31 -0
- package/form/form-custom-field.d.ts +3 -0
- package/form/form-input-group.d.ts +1 -1
- package/form/form-input.d.ts +1 -1
- package/form/form-label-addon.d.ts +1 -2
- package/form/form-label.d.ts +1 -1
- package/form/form-label.style.d.ts +1 -0
- package/form/form-phone-number-input.d.ts +3 -0
- package/form/form-textarea.d.ts +1 -1
- package/form/form-unit-number-input.d.ts +3 -0
- package/form/index.d.ts +9 -6
- package/form/index.js +774 -629
- package/form/index.js.map +1 -1
- package/form/types.d.ts +14 -5
- package/icon-button/icon-button.d.ts +1 -1
- package/icon-button/icon-button.style.d.ts +6 -1
- package/icon-button/index.js +9 -15
- package/icon-button/index.js.map +1 -1
- package/icon-button/types.d.ts +2 -3
- package/index.d.ts +11 -1
- package/index.js +1997 -1019
- package/index.js.map +1 -1
- package/input/index.js +84 -41
- package/input/index.js.map +1 -1
- package/input/input.d.ts +1 -1
- package/input/input.style.d.ts +9 -0
- package/input/types.d.ts +2 -0
- package/input-group/index.js +392 -312
- package/input-group/index.js.map +1 -1
- package/input-group/input-group-list-addon.d.ts +1 -1
- package/input-group/input-group-list-addon.style.d.ts +4 -1
- package/input-group/input-group.d.ts +1 -1
- package/input-group/input-group.style.d.ts +1 -2
- package/input-group/types.d.ts +8 -8
- package/input-select/index.js +278 -242
- package/input-select/index.js.map +1 -1
- package/input-select/input-select-wrapper.d.ts +1 -1
- package/input-select/input-select.d.ts +1 -1
- package/input-select/input-select.styles.d.ts +5 -1
- package/input-select/types.d.ts +15 -11
- package/input-textarea/index.js +132 -121
- package/input-textarea/index.js.map +1 -1
- package/input-textarea/textarea-counter.d.ts +2 -1
- package/input-textarea/textarea.d.ts +2 -2
- package/input-textarea/types.d.ts +1 -0
- package/layout/container.d.ts +3 -0
- package/layout/content.d.ts +3 -0
- package/layout/index.d.ts +7 -0
- package/layout/index.js +55 -0
- package/layout/index.js.map +1 -0
- package/layout/package.json +7 -0
- package/layout/section.d.ts +3 -0
- package/layout/types.d.ts +15 -0
- package/link-list/index.js +130 -130
- package/link-list/index.js.map +1 -1
- package/link-list/link-list.styles.d.ts +12 -2
- package/link-list/types.d.ts +1 -1
- package/masonry/index.js.map +1 -1
- package/masonry/masonry.d.ts +2 -2
- package/masthead/index.d.ts +1 -0
- package/masthead/index.js +9 -0
- package/masthead/index.js.map +1 -0
- package/masthead/masthead.d.ts +2 -0
- package/masthead/masthead.style.d.ts +1 -0
- package/masthead/package.json +7 -0
- package/media/index.js +1 -1
- package/media/index.js.map +1 -1
- package/media/media.d.ts +2 -1
- package/modal/index.d.ts +1 -1
- package/modal/index.js +30 -43
- package/modal/index.js.map +1 -1
- package/modal/modal-box.styles.d.ts +5 -2
- package/modal/modal.d.ts +1 -1
- package/modal/modal.styles.d.ts +1 -0
- package/modal/types.d.ts +4 -2
- package/navbar/brand.d.ts +10 -0
- package/navbar/brand.styles.d.ts +5 -0
- package/navbar/drawer.d.ts +3 -0
- package/navbar/drawer.styles.d.ts +15 -0
- package/navbar/index.d.ts +7 -0
- package/navbar/index.js +651 -0
- package/navbar/index.js.map +1 -0
- package/navbar/navbar-action-buttons.d.ts +10 -0
- package/navbar/navbar-action-buttons.styles.d.ts +9 -0
- package/navbar/navbar-items.d.ts +11 -0
- package/navbar/navbar-items.styles.d.ts +10 -0
- package/navbar/navbar.d.ts +3 -0
- package/navbar/navbar.styles.d.ts +19 -0
- package/navbar/package.json +7 -0
- package/navbar/types.d.ts +56 -0
- package/notification-banner/index.d.ts +3 -0
- package/notification-banner/index.js +266 -0
- package/notification-banner/index.js.map +1 -0
- package/notification-banner/notification-banner-hoc.d.ts +3 -0
- package/notification-banner/notification-banner.d.ts +6 -0
- package/notification-banner/notification-banner.styles.d.ts +15 -0
- package/notification-banner/package.json +7 -0
- package/notification-banner/types.d.ts +22 -0
- package/overlay/index.js +1 -1
- package/overlay/index.js.map +1 -1
- package/overlay/types.d.ts +1 -1
- package/package.json +4 -1
- package/phone-number-input/data/country-code.d.ts +1 -0
- package/phone-number-input/index.d.ts +1 -0
- package/phone-number-input/index.js +850 -0
- package/phone-number-input/index.js.map +1 -0
- package/phone-number-input/package.json +7 -0
- package/phone-number-input/phone-number-input-helper.d.ts +5 -0
- package/phone-number-input/phone-number-input.d.ts +3 -0
- package/phone-number-input/phone-number-input.styles.d.ts +1 -0
- package/phone-number-input/types.d.ts +42 -0
- package/popover/index.js +148 -153
- package/popover/index.js.map +1 -1
- package/popover/popover.styles.d.ts +1 -1
- package/popover/types.d.ts +3 -3
- package/progress-indicator/index.d.ts +2 -0
- package/progress-indicator/index.js +240 -0
- package/progress-indicator/index.js.map +1 -0
- package/progress-indicator/package.json +7 -0
- package/progress-indicator/progress-indicator.d.ts +3 -0
- package/progress-indicator/progress-indicator.style.d.ts +19 -0
- package/progress-indicator/types.d.ts +9 -0
- package/radio-button/index.js +7 -7
- package/radio-button/index.js.map +1 -1
- package/shared/dropdown-list/dropdown-list.d.ts +1 -1
- package/shared/dropdown-list/dropdown-list.styles.d.ts +6 -2
- package/shared/dropdown-list/dropdown-search.d.ts +2 -1
- package/shared/dropdown-list/dropdown-search.styles.d.ts +9 -1
- package/shared/dropdown-list/types.d.ts +21 -12
- package/smart-app-banner/index.d.ts +2 -0
- package/smart-app-banner/index.js +373 -0
- package/smart-app-banner/index.js.map +1 -0
- package/smart-app-banner/package.json +7 -0
- package/smart-app-banner/smart-app-banner.d.ts +3 -0
- package/smart-app-banner/smart-app-banner.styles.d.ts +31 -0
- package/smart-app-banner/types.d.ts +18 -0
- package/spec/design-token-spec/base-design-token-set.d.ts +2 -0
- package/text/index.js +62 -65
- package/text/index.js.map +1 -1
- package/text/text-style.d.ts +4 -100
- package/text-list/index.js +7 -7
- package/text-list/index.js.map +1 -1
- package/theme/design-token-helper.d.ts +2 -0
- package/theme/index.js +1 -1
- package/theme/index.js.map +1 -1
- package/theme/types.d.ts +12 -3
- package/timeline/index.js +95 -98
- package/timeline/index.js.map +1 -1
- package/timepicker/index.js +213 -207
- package/timepicker/index.js.map +1 -1
- package/timepicker/timepicker-dropdown.styles.d.ts +2 -2
- package/timepicker/types.d.ts +3 -3
- package/toggle-button/index.js +118 -121
- package/toggle-button/index.js.map +1 -1
- package/tooltip/index.js +127 -125
- package/tooltip/index.js.map +1 -1
- package/tooltip/tooltip.styles.d.ts +3 -1
- package/unit-number/index.d.ts +2 -0
- package/unit-number/index.js +403 -0
- package/unit-number/index.js.map +1 -0
- package/unit-number/package.json +7 -0
- package/unit-number/types.d.ts +27 -0
- package/unit-number/unit-number-input.d.ts +3 -0
- package/unit-number/unit-number-input.style.d.ts +16 -0
- package/util/date-helper.d.ts +19 -0
- package/util/index.d.ts +2 -0
- package/util/utility-types.d.ts +3 -0
- package/icon/arrow-right-icon.d.ts +0 -3
- package/icon/icon.d.ts +0 -3
- package/icon/index.d.ts +0 -2
- package/icon/index.js +0 -12
- package/icon/index.js.map +0 -1
- package/icon/info-icon.d.ts +0 -3
- package/icon/play-alt-icon.d.ts +0 -3
- package/icon/search-icon.d.ts +0 -3
- package/icon/shared.style.d.ts +0 -1
- package/icon/types.d.ts +0 -9
package/date-input/index.js
CHANGED
|
@@ -1,186 +1,185 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useState as n,useRef as r,useEffect as a}from"react";import i,{css as o}from"styled-components";var l;!function(e){e.transformWithSpaces=(e,t)=>{const n="(.{"+t+"})";return e.replace(/[^\dA-Z]/gi,"").replace(new RegExp(n,"g"),"$1 ").trim()},e.padValue=(e,t)=>{if("0"===e)return t?e:e.padStart(2,"0");if(""===e)return e;return parseInt(e).toString().padStart(2,"0")},e.shouldTruncateToTwoLines=(e,t)=>{const n=Math.floor(t/9);return e.length>=2*n||1===e.split(" ").length&&e.length>n},e.truncateOneLine=(e,t,n,r)=>{let a=0;t>n&&(a=Math.floor((t-n)/8));const i=r+a;if(i<e.length){const t=Math.floor(i/2);return e.substring(0,t)+" ... "+e.substring(e.length-t,e.length)}return e}}(l||(l={}));var c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},h=Array.isArray,d="object"==typeof c&&c&&c.Object===Object&&c,g="object"==typeof self&&self&&self.Object===Object&&self,u=d||g||Function("return this")(),s=u.Symbol,p=s,f=Object.prototype,y=f.hasOwnProperty,m=f.toString,v=p?p.toStringTag:void 0;var F=function(e){var t=y.call(e,v),n=e[v];try{e[v]=void 0;var r=!0}catch(e){}var a=m.call(e);return r&&(t?e[v]=n:delete e[v]),a},S=Object.prototype.toString;var B=F,$=function(e){return S.call(e)},b=s?s.toStringTag:void 0;var w=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":b&&b in Object(e)?B(e):$(e)};var D=w,H=function(e){return null!=e&&"object"==typeof e};var _=function(e){return"symbol"==typeof e||H(e)&&"[object Symbol]"==D(e)},z=h,x=_,k=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,E=/^\w*$/;var C=function(e,t){if(z(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!x(e))||(E.test(e)||!k.test(e)||null!=t&&e in Object(t))};var A=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},W=w,N=A;var L,O=function(e){if(!N(e))return!1;var t=W(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},j=u["__core-js_shared__"],V=(L=/[^.]+$/.exec(j&&j.keys&&j.keys.IE_PROTO||""))?"Symbol(src)_1."+L:"";var R=function(e){return!!V&&V in e},T=Function.prototype.toString;var I=O,P=R,M=A,G=function(e){if(null!=e){try{return T.call(e)}catch(e){}try{return e+""}catch(e){}}return""},X=/^\[object .+?Constructor\]$/,Y=Function.prototype,Z=Object.prototype,U=Y.toString,q=Z.hasOwnProperty,J=RegExp("^"+U.call(q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var K=function(e){return!(!M(e)||P(e))&&(I(e)?J:X).test(G(e))},Q=function(e,t){return null==e?void 0:e[t]};var ee=function(e,t){var n=Q(e,t);return K(n)?n:void 0},te=ee(Object,"create"),ne=te;var re=function(){this.__data__=ne?ne(null):{},this.size=0};var ae=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ie=te,oe=Object.prototype.hasOwnProperty;var le=function(e){var t=this.__data__;if(ie){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return oe.call(t,e)?t[e]:void 0},ce=te,he=Object.prototype.hasOwnProperty;var de=te;var ge=re,ue=ae,se=le,pe=function(e){var t=this.__data__;return ce?void 0!==t[e]:he.call(t,e)},fe=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=de&&void 0===t?"__lodash_hash_undefined__":t,this};function ye(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ye.prototype.clear=ge,ye.prototype.delete=ue,ye.prototype.get=se,ye.prototype.has=pe,ye.prototype.set=fe;var me=ye;var ve=function(){this.__data__=[],this.size=0};var Fe=function(e,t){return e===t||e!=e&&t!=t};var Se=function(e,t){for(var n=e.length;n--;)if(Fe(e[n][0],t))return n;return-1},Be=Se,$e=Array.prototype.splice;var be=Se;var we=Se;var De=Se;var He=ve,_e=function(e){var t=this.__data__,n=Be(t,e);return!(n<0)&&(n==t.length-1?t.pop():$e.call(t,n,1),--this.size,!0)},ze=function(e){var t=this.__data__,n=be(t,e);return n<0?void 0:t[n][1]},xe=function(e){return we(this.__data__,e)>-1},ke=function(e,t){var n=this.__data__,r=De(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function Ee(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ee.prototype.clear=He,Ee.prototype.delete=_e,Ee.prototype.get=ze,Ee.prototype.has=xe,Ee.prototype.set=ke;var Ce=Ee,Ae=ee(u,"Map"),We=me,Ne=Ce,Le=Ae;var Oe=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var je=function(e,t){var n=e.__data__;return Oe(t)?n["string"==typeof t?"string":"hash"]:n.map},Ve=je;var Re=je;var Te=je;var Ie=je;var Pe=function(){this.size=0,this.__data__={hash:new We,map:new(Le||Ne),string:new We}},Me=function(e){var t=Ve(this,e).delete(e);return this.size-=t?1:0,t},Ge=function(e){return Re(this,e).get(e)},Xe=function(e){return Te(this,e).has(e)},Ye=function(e,t){var n=Ie(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Ze(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ze.prototype.clear=Pe,Ze.prototype.delete=Me,Ze.prototype.get=Ge,Ze.prototype.has=Xe,Ze.prototype.set=Ye;var Ue=Ze;function qe(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var o=e.apply(this,r);return n.cache=i.set(a,o)||i,o};return n.cache=new(qe.Cache||Ue),n}qe.Cache=Ue;var Je=qe;var Ke=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Qe=/\\(\\)?/g,et=function(e){var t=Je(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Ke,(function(e,n,r,a){t.push(r?a.replace(Qe,"$1"):n||e)})),t}));var tt=function(e,t){for(var n=-1,r=null==e?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a},nt=h,rt=_,at=s?s.prototype:void 0,it=at?at.toString:void 0;var ot=function e(t){if("string"==typeof t)return t;if(nt(t))return tt(t,e)+"";if(rt(t))return it?it.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n},lt=ot;var ct=h,ht=C,dt=et,gt=function(e){return null==e?"":lt(e)};var ut=_;var st=function(e,t){return ct(e)?e:ht(e,t)?[e]:dt(gt(e))},pt=function(e){if("string"==typeof e||ut(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t};var ft=function(e,t){for(var n=0,r=(t=st(t,e)).length;null!=e&&n<r;)e=e[pt(t[n++])];return n&&n==r?e:void 0};var yt=function(e,t,n){var r=null==e?void 0:ft(e,t);return void 0===r?n:r};const mt=(e,t,n)=>t?yt(n,t)||yt(e,t):n||e,vt=(e,t)=>{const n=t||e.defaultValue;return yt(e.collections,n)};var Ft;!function(e){e.colorScheme="colorScheme",e.layout="layout",e.textStyleScheme="textStyleScheme"}(Ft||(Ft={}));const St={collections:{base:{Brand:{1:"#EF413D",2:"#F26664",3:"#F58E8B",4:"#F9B5B2",5:"#FDDDD7",6:"#FFEEEA"},Primary:"#1C76D5",PrimaryDark:"#1869BF",Secondary:"#0056b3",Accent:{Dark:{1:"#465A88",2:"#556D99",3:"#8D8DBF"},Light:{1:"#57A9FF",2:"#81BFFF",3:"#BED7FF",4:"#E2ECFD",5:"#F6F8FF",6:"#FBFCFE"}},Neutral:{1:"#282828",2:"#424242",3:"#686868",4:"#A4A4A4",5:"#E0E4E5",6:"#ECEFEF",7:"#F8F8F8",8:"#FFFFFF"},Validation:{Green:{Text:"#097123",Icon:"#4FC029",Border:"#95D97F",Background:"#F9FDF8"},Orange:{Text:"#B34E00",Icon:"#FEAB10",Border:"#F9CB77",Background:"#FFFCF7",Badge:"#F57F17"},Red:{Text:"#C60000",Icon:"#C60000",Border:"#DD6666",Background:"#FDF7F7"}}},bookingsg:{Brand:{1:"#EF413D",2:"#F26664",3:"#F58E8B",4:"#F9B5B2",5:"#FDDDD7",6:"#FFEEEA"},Primary:"#6F4AB8",PrimaryDark:"#6443A6",Secondary:"#6443A6",Accent:{Dark:{1:"#355985",2:"#68819D",3:"#9AABBE"},Light:{1:"#9F82D9",2:"#B5A5D7",3:"#CEC3E4 ",4:"#E2DBEF",5:"#F2EFF8",6:"#F7F6FB"}},Neutral:{1:"#282828",2:"#424242",3:"#686868",4:"#A4A4A4",5:"#E0E4E5",6:"#ECEFEF",7:"#F8F8F8",8:"#FFFFFF"},Validation:{Green:{Text:"#097123",Icon:"#4FC029",Border:"#95D97F",Background:"#F9FDF8"},Orange:{Text:"#B34E00",Icon:"#FEAB10",Border:"#F9CB77",Background:"#FFFCF7",Badge:"#F57F17"},Red:{Text:"#C60000",Icon:"#C60000",Border:"#DD6666",Background:"#FDF7F7"}}}},defaultValue:"base"},Bt=e=>t=>{const n=t.theme,r=vt(St,n[Ft.colorScheme]);return n.options&&n.options.color?mt(r,e,n.options.color):mt(r,e)},$t={Brand:{1:Bt("Brand.1"),2:Bt("Brand.2"),3:Bt("Brand.3"),4:Bt("Brand.4"),5:Bt("Brand.5"),6:Bt("Brand.6")},Primary:Bt("Primary"),PrimaryDark:Bt("PrimaryDark"),Secondary:Bt("Secondary"),Accent:{Light:{1:Bt("Accent.Light.1"),2:Bt("Accent.Light.2"),3:Bt("Accent.Light.3"),4:Bt("Accent.Light.4"),5:Bt("Accent.Light.5"),6:Bt("Accent.Light.6")},Dark:{1:Bt("Accent.Dark.1"),2:Bt("Accent.Dark.2"),3:Bt("Accent.Dark.3")}},Neutral:{1:Bt("Neutral.1"),2:Bt("Neutral.2"),3:Bt("Neutral.3"),4:Bt("Neutral.4"),5:Bt("Neutral.5"),6:Bt("Neutral.6"),7:Bt("Neutral.7"),8:Bt("Neutral.8")},Validation:{Green:{Text:Bt("Validation.Green.Text"),Icon:Bt("Validation.Green.Icon"),Border:Bt("Validation.Green.Border"),Background:Bt("Validation.Green.Background")},Orange:{Text:Bt("Validation.Orange.Text"),Icon:Bt("Validation.Orange.Icon"),Border:Bt("Validation.Orange.Border"),Background:Bt("Validation.Orange.Background"),Badge:Bt("Validation.Orange.Badge")},Red:{Text:Bt("Validation.Red.Text"),Icon:Bt("Validation.Red.Icon"),Border:Bt("Validation.Red.Border"),Background:Bt("Validation.Red.Background")}}},bt={Regular:"Open Sans",Semibold:"Open Sans Semibold",Bold:"Open Sans Bold",Light:"Open Sans Light"},wt={collections:{base:{D1:{fontFamily:bt.Bold,fontSize:3,fontWeight:700,lineHeight:4,letterSpacing:-.056},D2:{fontFamily:bt.Bold,fontSize:2.5,fontWeight:700,lineHeight:3.5,letterSpacing:-.032},D3:{fontFamily:bt.Bold,fontSize:1.625,fontWeight:700,lineHeight:2.25},D4:{fontFamily:bt.Bold,fontSize:1.375,fontWeight:700,lineHeight:1.75},DBody:{fontFamily:bt.Regular,fontSize:1.375,lineHeight:1.75},H1:{fontFamily:bt.Bold,fontSize:2,fontWeight:700,lineHeight:2.5},H2:{fontFamily:bt.Bold,fontSize:1.625,fontWeight:700,lineHeight:2.25},H3:{fontFamily:bt.Bold,fontSize:1.375,fontWeight:700,lineHeight:1.75},H4:{fontFamily:bt.Bold,fontSize:1.125,fontWeight:700,lineHeight:1.625},H5:{fontFamily:bt.Bold,fontSize:1,fontWeight:700,lineHeight:1.5,letterSpacing:.014},H6:{fontFamily:bt.Bold,fontSize:.875,fontWeight:700,lineHeight:1.6,letterSpacing:.012},Body:{fontFamily:bt.Regular,fontSize:1.125,lineHeight:1.625},BodySmall:{fontFamily:bt.Regular,fontSize:1,lineHeight:1.5,letterSpacing:.014},XSmall:{fontFamily:bt.Regular,fontSize:.75,lineHeight:1.2,letterSpacing:.012}}},defaultValue:"base"},Dt=e=>t=>{const n=t.theme,r=vt(wt,n[Ft.textStyleScheme]);return n.options&&n.options.textStyle?mt(r,e,n.options.textStyle):mt(r,e)},Ht={D1:{fontFamily:Dt("D1.fontFamily"),fontSize:Dt("D1.fontSize"),fontWeight:Dt("D1.fontWeight"),lineHeight:Dt("D1.lineHeight"),letterSpacing:Dt("D1.letterSpacing")},D2:{fontFamily:Dt("D2.fontFamily"),fontSize:Dt("D2.fontSize"),fontWeight:Dt("D2.fontWeight"),lineHeight:Dt("D2.lineHeight"),letterSpacing:Dt("D2.letterSpacing")},D3:{fontFamily:Dt("D3.fontFamily"),fontSize:Dt("D3.fontSize"),fontWeight:Dt("D3.fontWeight"),lineHeight:Dt("D3.lineHeight"),letterSpacing:Dt("D3.letterSpacing")},D4:{fontFamily:Dt("D4.fontFamily"),fontSize:Dt("D4.fontSize"),fontWeight:Dt("D4.fontWeight"),lineHeight:Dt("D4.lineHeight"),letterSpacing:Dt("D4.letterSpacing")},DBody:{fontFamily:Dt("DBody.fontFamily"),fontSize:Dt("DBody.fontSize"),fontWeight:Dt("DBody.fontWeight"),lineHeight:Dt("DBody.lineHeight"),letterSpacing:Dt("DBody.letterSpacing")},H1:{fontFamily:Dt("H1.fontFamily"),fontSize:Dt("H1.fontSize"),fontWeight:Dt("H1.fontWeight"),lineHeight:Dt("H1.lineHeight"),letterSpacing:Dt("H1.letterSpacing")},H2:{fontFamily:Dt("H2.fontFamily"),fontSize:Dt("H2.fontSize"),fontWeight:Dt("H2.fontWeight"),lineHeight:Dt("H2.lineHeight"),letterSpacing:Dt("H2.letterSpacing")},H3:{fontFamily:Dt("H3.fontFamily"),fontSize:Dt("H3.fontSize"),fontWeight:Dt("H3.fontWeight"),lineHeight:Dt("H3.lineHeight"),letterSpacing:Dt("H3.letterSpacing")},H4:{fontFamily:Dt("H4.fontFamily"),fontSize:Dt("H4.fontSize"),fontWeight:Dt("H4.fontWeight"),lineHeight:Dt("H4.lineHeight"),letterSpacing:Dt("H4.letterSpacing")},H5:{fontFamily:Dt("H5.fontFamily"),fontSize:Dt("H5.fontSize"),fontWeight:Dt("H5.fontWeight"),lineHeight:Dt("H5.lineHeight"),letterSpacing:Dt("H5.letterSpacing")},H6:{fontFamily:Dt("H6.fontFamily"),fontSize:Dt("H6.fontSize"),fontWeight:Dt("H6.fontWeight"),lineHeight:Dt("H6.lineHeight"),letterSpacing:Dt("H6.letterSpacing")},Body:{fontFamily:Dt("Body.fontFamily"),fontSize:Dt("Body.fontSize"),fontWeight:Dt("Body.fontWeight"),lineHeight:Dt("Body.lineHeight"),letterSpacing:Dt("Body.letterSpacing")},BodySmall:{fontFamily:Dt("BodySmall.fontFamily"),fontSize:Dt("BodySmall.fontSize"),fontWeight:Dt("BodySmall.fontWeight"),lineHeight:Dt("BodySmall.lineHeight"),letterSpacing:Dt("BodySmall.letterSpacing")},XSmall:{fontFamily:Dt("XSmall.fontFamily"),fontSize:Dt("XSmall.fontSize"),fontWeight:Dt("XSmall.fontWeight"),lineHeight:Dt("XSmall.lineHeight"),letterSpacing:Dt("XSmall.letterSpacing")}},_t=e=>{switch(e){case 700:case"bold":return bt.Bold;case 600:case"semibold":return bt.Semibold;case 300:case"light":return bt.Light;case 400:case"regular":return bt.Regular;default:return""}},zt=(e,t)=>n=>{const r=Ht[e].fontFamily(n),a=Ht[e].fontWeight(n);return Object.values(bt).includes(r)?o`
|
|
2
|
-
|
|
1
|
+
import e,{jsxs as t,jsx as n}from"react/jsx-runtime";import{useState as r,useRef as a,useEffect as o}from"react";import i,{css as l}from"styled-components";const c=[1,3,5,7,8,10,12],h=[4,6,9,11];var d,u;!function(e){e.clampDay=(t,n,r)=>{const a=parseInt(t),o=parseInt(n),i=parseInt(r);return 0==a?"1":c.includes(o)?Math.min(a,31).toString():h.includes(o)?Math.min(a,30).toString():2===o?e.isLeapYear(i)?Math.min(a,29).toString():Math.min(a,28).toString():t},e.clampMonth=e=>{const t=parseInt(e);return 0==t?"1":t>12?"12":e},e.isLeapYear=e=>e%4==0&&e%100!=0||e%400==0}(d||(d={})),function(e){e.transformWithSpaces=(e,t)=>{const n="(.{"+t+"})";return e.replace(/[^\dA-Z]/gi,"").replace(new RegExp(n,"g"),"$1 ").trim()},e.padValue=(e,t)=>{if("0"===e)return t?e:e.padStart(2,"0");if(""===e)return e;return parseInt(e).toString().padStart(2,"0")},e.shouldTruncateToTwoLines=(e,t)=>{const n=Math.floor(t/9);return e.length>=2*n||1===e.split(" ").length&&e.length>n},e.truncateOneLine=(e,t,n,r)=>{let a=0;t>n&&(a=Math.floor((t-n)/8));const o=r+a;if(o<e.length){const t=Math.floor(o/2);return e.substring(0,t)+" ... "+e.substring(e.length-t,e.length)}return e}}(u||(u={}));var g="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},p=Array.isArray,s="object"==typeof g&&g&&g.Object===Object&&g,f="object"==typeof self&&self&&self.Object===Object&&self,y=s||f||Function("return this")(),m=y.Symbol,S=m,F=Object.prototype,v=F.hasOwnProperty,B=F.toString,$=S?S.toStringTag:void 0;var H=function(e){var t=v.call(e,$),n=e[$];try{e[$]=void 0;var r=!0}catch(e){}var a=B.call(e);return r&&(t?e[$]=n:delete e[$]),a},b=Object.prototype.toString;var D=H,w=function(e){return b.call(e)},_=m?m.toStringTag:void 0;var x=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":_&&_ in Object(e)?D(e):w(e)};var z=x,C=function(e){return null!=e&&"object"==typeof e};var k=function(e){return"symbol"==typeof e||C(e)&&"[object Symbol]"==z(e)},E=p,A=k,O=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,W=/^\w*$/;var V=function(e,t){if(E(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!A(e))||(W.test(e)||!O.test(e)||null!=t&&e in Object(t))};var N=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},j=x,T=N;var I,L=function(e){if(!T(e))return!1;var t=j(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},R=y["__core-js_shared__"],M=(I=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||""))?"Symbol(src)_1."+I:"";var P=function(e){return!!M&&M in e},X=Function.prototype.toString;var G=L,Y=P,Z=N,K=function(e){if(null!=e){try{return X.call(e)}catch(e){}try{return e+""}catch(e){}}return""},U=/^\[object .+?Constructor\]$/,q=Function.prototype,J=Object.prototype,Q=q.toString,ee=J.hasOwnProperty,te=RegExp("^"+Q.call(ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var ne=function(e){return!(!Z(e)||Y(e))&&(G(e)?te:U).test(K(e))},re=function(e,t){return null==e?void 0:e[t]};var ae=function(e,t){var n=re(e,t);return ne(n)?n:void 0},oe=ae(Object,"create"),ie=oe;var le=function(){this.__data__=ie?ie(null):{},this.size=0};var ce=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},he=oe,de=Object.prototype.hasOwnProperty;var ue=function(e){var t=this.__data__;if(he){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return de.call(t,e)?t[e]:void 0},ge=oe,pe=Object.prototype.hasOwnProperty;var se=oe;var fe=le,ye=ce,me=ue,Se=function(e){var t=this.__data__;return ge?void 0!==t[e]:pe.call(t,e)},Fe=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=se&&void 0===t?"__lodash_hash_undefined__":t,this};function ve(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ve.prototype.clear=fe,ve.prototype.delete=ye,ve.prototype.get=me,ve.prototype.has=Se,ve.prototype.set=Fe;var Be=ve;var $e=function(){this.__data__=[],this.size=0};var He=function(e,t){return e===t||e!=e&&t!=t};var be=function(e,t){for(var n=e.length;n--;)if(He(e[n][0],t))return n;return-1},De=be,we=Array.prototype.splice;var _e=be;var xe=be;var ze=be;var Ce=$e,ke=function(e){var t=this.__data__,n=De(t,e);return!(n<0)&&(n==t.length-1?t.pop():we.call(t,n,1),--this.size,!0)},Ee=function(e){var t=this.__data__,n=_e(t,e);return n<0?void 0:t[n][1]},Ae=function(e){return xe(this.__data__,e)>-1},Oe=function(e,t){var n=this.__data__,r=ze(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function We(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}We.prototype.clear=Ce,We.prototype.delete=ke,We.prototype.get=Ee,We.prototype.has=Ae,We.prototype.set=Oe;var Ve=We,Ne=ae(y,"Map"),je=Be,Te=Ve,Ie=Ne;var Le=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Re=function(e,t){var n=e.__data__;return Le(t)?n["string"==typeof t?"string":"hash"]:n.map},Me=Re;var Pe=Re;var Xe=Re;var Ge=Re;var Ye=function(){this.size=0,this.__data__={hash:new je,map:new(Ie||Te),string:new je}},Ze=function(e){var t=Me(this,e).delete(e);return this.size-=t?1:0,t},Ke=function(e){return Pe(this,e).get(e)},Ue=function(e){return Xe(this,e).has(e)},qe=function(e,t){var n=Ge(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Je(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Je.prototype.clear=Ye,Je.prototype.delete=Ze,Je.prototype.get=Ke,Je.prototype.has=Ue,Je.prototype.set=qe;var Qe=Je;function et(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var i=e.apply(this,r);return n.cache=o.set(a,i)||o,i};return n.cache=new(et.Cache||Qe),n}et.Cache=Qe;var tt=et;var nt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rt=/\\(\\)?/g,at=function(e){var t=tt(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(nt,(function(e,n,r,a){t.push(r?a.replace(rt,"$1"):n||e)})),t}));var ot=function(e,t){for(var n=-1,r=null==e?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a},it=p,lt=k,ct=m?m.prototype:void 0,ht=ct?ct.toString:void 0;var dt=function e(t){if("string"==typeof t)return t;if(it(t))return ot(t,e)+"";if(lt(t))return ht?ht.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n},ut=dt;var gt=p,pt=V,st=at,ft=function(e){return null==e?"":ut(e)};var yt=k;var mt=function(e,t){return gt(e)?e:pt(e,t)?[e]:st(ft(e))},St=function(e){if("string"==typeof e||yt(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t};var Ft=function(e,t){for(var n=0,r=(t=mt(t,e)).length;null!=e&&n<r;)e=e[St(t[n++])];return n&&n==r?e:void 0};var vt=function(e,t,n){var r=null==e?void 0:Ft(e,t);return void 0===r?n:r};const Bt=(e,t,n)=>t?vt(n,t)||vt(e,t):n||e,$t=(e,t)=>{const n=t||e.defaultValue;return vt(e.collections,n)};var Ht;!function(e){e.colorScheme="colorScheme",e.layout="layout",e.textStyleScheme="textStyleScheme",e.designTokenScheme="designTokenScheme"}(Ht||(Ht={}));const bt={collections:{base:{Brand:{1:"#EF413D",2:"#F26664",3:"#F58E8B",4:"#F9B5B2",5:"#FDDDD7",6:"#FFEEEA"},Primary:"#1C76D5",PrimaryDark:"#1869BF",Secondary:"#0056b3",Accent:{Dark:{1:"#465A88",2:"#556D99",3:"#8D8DBF"},Light:{1:"#57A9FF",2:"#81BFFF",3:"#BED7FF",4:"#E2ECFD",5:"#F6F8FF",6:"#FBFCFE"}},Neutral:{1:"#282828",2:"#424242",3:"#686868",4:"#A4A4A4",5:"#E0E4E5",6:"#ECEFEF",7:"#F8F8F8",8:"#FFFFFF"},Validation:{Green:{Text:"#097123",Icon:"#4FC029",Border:"#95D97F",Background:"#F9FDF8"},Orange:{Text:"#B34E00",Icon:"#FEAB10",Border:"#F9CB77",Background:"#FFFCF7",Badge:"#F57F17"},Red:{Text:"#C60000",Icon:"#C60000",Border:"#DD6666",Background:"#FDF7F7"}},Shadow:{Accent:"rgba(87, 169, 255, 0.5)",Red:"rgba(221, 102, 102, 0.8)"}},bookingsg:{Brand:{1:"#EF413D",2:"#F26664",3:"#F58E8B",4:"#F9B5B2",5:"#FDDDD7",6:"#FFEEEA"},Primary:"#6F4AB8",PrimaryDark:"#6443A6",Secondary:"#6443A6",Accent:{Dark:{1:"#355985",2:"#68819D",3:"#9AABBE"},Light:{1:"#9F82D9",2:"#B5A5D7",3:"#CEC3E4 ",4:"#E2DBEF",5:"#F2EFF8",6:"#F7F6FB"}},Neutral:{1:"#282828",2:"#424242",3:"#686868",4:"#A4A4A4",5:"#E0E4E5",6:"#ECEFEF",7:"#F8F8F8",8:"#FFFFFF"},Validation:{Green:{Text:"#097123",Icon:"#4FC029",Border:"#95D97F",Background:"#F9FDF8"},Orange:{Text:"#B34E00",Icon:"#FEAB10",Border:"#F9CB77",Background:"#FFFCF7",Badge:"#F57F17"},Red:{Text:"#C60000",Icon:"#C60000",Border:"#DD6666",Background:"#FDF7F7"}},Shadow:{Accent:"rgba(161, 87, 255, 0.5)",Red:"rgba(221, 102, 102, 0.8)"}}},defaultValue:"base"},Dt=e=>t=>{const n=t.theme,r=$t(bt,n[Ht.colorScheme]);return n.options&&n.options.color?Bt(r,e,n.options.color):Bt(r,e)},wt={Brand:{1:Dt("Brand.1"),2:Dt("Brand.2"),3:Dt("Brand.3"),4:Dt("Brand.4"),5:Dt("Brand.5"),6:Dt("Brand.6")},Primary:Dt("Primary"),PrimaryDark:Dt("PrimaryDark"),Secondary:Dt("Secondary"),Accent:{Light:{1:Dt("Accent.Light.1"),2:Dt("Accent.Light.2"),3:Dt("Accent.Light.3"),4:Dt("Accent.Light.4"),5:Dt("Accent.Light.5"),6:Dt("Accent.Light.6")},Dark:{1:Dt("Accent.Dark.1"),2:Dt("Accent.Dark.2"),3:Dt("Accent.Dark.3")}},Neutral:{1:Dt("Neutral.1"),2:Dt("Neutral.2"),3:Dt("Neutral.3"),4:Dt("Neutral.4"),5:Dt("Neutral.5"),6:Dt("Neutral.6"),7:Dt("Neutral.7"),8:Dt("Neutral.8")},Validation:{Green:{Text:Dt("Validation.Green.Text"),Icon:Dt("Validation.Green.Icon"),Border:Dt("Validation.Green.Border"),Background:Dt("Validation.Green.Background")},Orange:{Text:Dt("Validation.Orange.Text"),Icon:Dt("Validation.Orange.Icon"),Border:Dt("Validation.Orange.Border"),Background:Dt("Validation.Orange.Background"),Badge:Dt("Validation.Orange.Badge")},Red:{Text:Dt("Validation.Red.Text"),Icon:Dt("Validation.Red.Icon"),Border:Dt("Validation.Red.Border"),Background:Dt("Validation.Red.Background")}},Shadow:{Accent:Dt("Shadow.Accent"),Red:Dt("Shadow.Red")}},_t={collections:{base:{InputBoxShadow:l`
|
|
2
|
+
inset 0 0 6px 1px ${wt.Shadow.Accent}
|
|
3
|
+
`,InputErrorBoxShadow:l`
|
|
4
|
+
inset 0 0 6px 1px ${wt.Shadow.Red}
|
|
5
|
+
`}},defaultValue:"base"},xt=e=>t=>{const n=t.theme,r=$t(_t,n[Ht.designTokenScheme]);return n.options?.designToken?Bt(r,e,n.options.designToken):Bt(r,e)},zt=xt("InputBoxShadow"),Ct=xt("InputErrorBoxShadow"),kt={Regular:"Open Sans",Semibold:"Open Sans Semibold",Bold:"Open Sans Bold",Light:"Open Sans Light"},Et={collections:{base:{D1:{fontFamily:kt.Bold,fontSize:3,fontWeight:700,lineHeight:4,letterSpacing:-.056},D2:{fontFamily:kt.Bold,fontSize:2.5,fontWeight:700,lineHeight:3.5,letterSpacing:-.032},D3:{fontFamily:kt.Bold,fontSize:1.625,fontWeight:700,lineHeight:2.25},D4:{fontFamily:kt.Bold,fontSize:1.375,fontWeight:700,lineHeight:1.75},DBody:{fontFamily:kt.Regular,fontSize:1.375,lineHeight:1.75},H1:{fontFamily:kt.Bold,fontSize:2,fontWeight:700,lineHeight:2.5},H2:{fontFamily:kt.Bold,fontSize:1.625,fontWeight:700,lineHeight:2.25},H3:{fontFamily:kt.Bold,fontSize:1.375,fontWeight:700,lineHeight:1.75},H4:{fontFamily:kt.Bold,fontSize:1.125,fontWeight:700,lineHeight:1.625},H5:{fontFamily:kt.Bold,fontSize:1,fontWeight:700,lineHeight:1.5,letterSpacing:.014},H6:{fontFamily:kt.Bold,fontSize:.875,fontWeight:700,lineHeight:1.6,letterSpacing:.012},Body:{fontFamily:kt.Regular,fontSize:1.125,lineHeight:1.625},BodySmall:{fontFamily:kt.Regular,fontSize:1,lineHeight:1.5,letterSpacing:.014},XSmall:{fontFamily:kt.Regular,fontSize:.75,lineHeight:1.2,letterSpacing:.012}}},defaultValue:"base"},At=e=>t=>{const n=t.theme,r=$t(Et,n[Ht.textStyleScheme]);return n.options&&n.options.textStyle?Bt(r,e,n.options.textStyle):Bt(r,e)},Ot={D1:{fontFamily:At("D1.fontFamily"),fontSize:At("D1.fontSize"),fontWeight:At("D1.fontWeight"),lineHeight:At("D1.lineHeight"),letterSpacing:At("D1.letterSpacing")},D2:{fontFamily:At("D2.fontFamily"),fontSize:At("D2.fontSize"),fontWeight:At("D2.fontWeight"),lineHeight:At("D2.lineHeight"),letterSpacing:At("D2.letterSpacing")},D3:{fontFamily:At("D3.fontFamily"),fontSize:At("D3.fontSize"),fontWeight:At("D3.fontWeight"),lineHeight:At("D3.lineHeight"),letterSpacing:At("D3.letterSpacing")},D4:{fontFamily:At("D4.fontFamily"),fontSize:At("D4.fontSize"),fontWeight:At("D4.fontWeight"),lineHeight:At("D4.lineHeight"),letterSpacing:At("D4.letterSpacing")},DBody:{fontFamily:At("DBody.fontFamily"),fontSize:At("DBody.fontSize"),fontWeight:At("DBody.fontWeight"),lineHeight:At("DBody.lineHeight"),letterSpacing:At("DBody.letterSpacing")},H1:{fontFamily:At("H1.fontFamily"),fontSize:At("H1.fontSize"),fontWeight:At("H1.fontWeight"),lineHeight:At("H1.lineHeight"),letterSpacing:At("H1.letterSpacing")},H2:{fontFamily:At("H2.fontFamily"),fontSize:At("H2.fontSize"),fontWeight:At("H2.fontWeight"),lineHeight:At("H2.lineHeight"),letterSpacing:At("H2.letterSpacing")},H3:{fontFamily:At("H3.fontFamily"),fontSize:At("H3.fontSize"),fontWeight:At("H3.fontWeight"),lineHeight:At("H3.lineHeight"),letterSpacing:At("H3.letterSpacing")},H4:{fontFamily:At("H4.fontFamily"),fontSize:At("H4.fontSize"),fontWeight:At("H4.fontWeight"),lineHeight:At("H4.lineHeight"),letterSpacing:At("H4.letterSpacing")},H5:{fontFamily:At("H5.fontFamily"),fontSize:At("H5.fontSize"),fontWeight:At("H5.fontWeight"),lineHeight:At("H5.lineHeight"),letterSpacing:At("H5.letterSpacing")},H6:{fontFamily:At("H6.fontFamily"),fontSize:At("H6.fontSize"),fontWeight:At("H6.fontWeight"),lineHeight:At("H6.lineHeight"),letterSpacing:At("H6.letterSpacing")},Body:{fontFamily:At("Body.fontFamily"),fontSize:At("Body.fontSize"),fontWeight:At("Body.fontWeight"),lineHeight:At("Body.lineHeight"),letterSpacing:At("Body.letterSpacing")},BodySmall:{fontFamily:At("BodySmall.fontFamily"),fontSize:At("BodySmall.fontSize"),fontWeight:At("BodySmall.fontWeight"),lineHeight:At("BodySmall.lineHeight"),letterSpacing:At("BodySmall.letterSpacing")},XSmall:{fontFamily:At("XSmall.fontFamily"),fontSize:At("XSmall.fontSize"),fontWeight:At("XSmall.fontWeight"),lineHeight:At("XSmall.lineHeight"),letterSpacing:At("XSmall.letterSpacing")}},Wt=e=>{switch(e){case 700:case"bold":return kt.Bold;case 600:case"semibold":return kt.Semibold;case 300:case"light":return kt.Light;case 400:case"regular":return kt.Regular;default:return""}},Vt=(e,t)=>n=>{const r=Ot[e].fontFamily(n),a=Ot[e].fontWeight(n);return Object.values(kt).includes(r)?l`
|
|
6
|
+
font-family: ${Wt(t)||Wt(a)||r};
|
|
3
7
|
font-weight: normal !important;
|
|
4
|
-
`:
|
|
8
|
+
`:l`
|
|
5
9
|
font-family: ${r};
|
|
6
|
-
font-weight: ${(
|
|
7
|
-
`},
|
|
8
|
-
${
|
|
9
|
-
font-size: ${
|
|
10
|
+
font-weight: ${(Nt(t)||a)??"normal"};
|
|
11
|
+
`},Nt=e=>{switch(e){case 300:case"light":return 300;case 400:case"regular":return 400;case 600:case"semibold":return 600;case 700:case"bold":return 700;case 900:case"black":return 900;default:return""}},jt=(e,t,n=!1)=>r=>{const a=Ot[e],o=a.fontSize(r);return l`
|
|
12
|
+
${Vt(e,t)}
|
|
13
|
+
font-size: ${o}rem !important;
|
|
10
14
|
line-height: ${a.lineHeight}rem !important;
|
|
11
15
|
letter-spacing: ${a.letterSpacing(r)||0}rem !important;
|
|
12
|
-
${
|
|
13
|
-
margin-bottom: ${
|
|
16
|
+
${l`
|
|
17
|
+
margin-bottom: ${o*(n?1.05:0)}rem;
|
|
14
18
|
`}
|
|
15
|
-
`},
|
|
19
|
+
`},Tt=(e=!1,t=!1)=>t?l`
|
|
16
20
|
display: block;
|
|
17
|
-
`:e?
|
|
21
|
+
`:e?l`
|
|
18
22
|
display: inline;
|
|
19
|
-
`:
|
|
23
|
+
`:l`
|
|
20
24
|
display: block;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
#path {
|
|
27
|
-
fill: ${$t.Neutral[8]};
|
|
28
|
-
}
|
|
29
|
-
`,At=t=>e(Ct,{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 16 16",...t,children:e("g",{fill:"none",fillRule:"evenodd",children:e("g",{id:"path",fillRule:"nonzero",children:e("g",{children:e("g",{children:e("g",{children:e("path",{d:"M8.706 14.603l6.075-6.075c.294-.29.294-.765 0-1.06L8.706 1.398c-.29-.294-.765-.294-1.06 0l-.693.694c-.3.297-.294.78.013 1.072L10.73 6.75H1.75c-.416 0-.75.334-.75.75v1c0 .416.334.75.75.75h8.981l-3.765 3.587c-.304.291-.31.775-.013 1.072l.694.694c.29.294.765.294 1.06 0z",transform:"translate(-2384.000000, -760.000000) translate(2253.000000, 692.000000) translate(16.000000, 64.000000) translate(115.000000, 4.000000) translate(0.000000, 0.000000)"})})})})})})}),Wt=t=>e(Ct,{width:"1rem",height:"1rem",viewBox:"0 0 40 40",xmlns:"http://www.w3.org/2000/svg",...t,children:e("path",{id:"path",d:"M20\n\t\t8.639c-.934\n\t\t0-1.742.342-2.43 1.03-.684.684-1.03 1.495-1.03 2.429 0 .931.346 1.742 1.03 2.426.688.688 1.496 1.03 2.43 1.03.931 0 1.742-.342 2.43-1.03.684-.684 1.026-1.495 1.026-2.426 0-.934-.342-1.745-1.026-2.43-.688-.687-1.499-1.03-2.43-1.03m4.61 20.91v-1.976a.959.959 0 0 0-.287-.7.959.959 0 0 0-.7-.286h-.99v-8.232a.954.954 0 0 0-.287-.7.945.945 0 0 0-.7-.29h-5.269a.95.95 0 0 0-.7.29.954.954 0 0 0-.286.7v1.976c0 .271.095.506.286.7a.959.959 0 0 0 .7.287h.99v5.269h-.99a.959.959 0 0 0-.7.286.959.959 0 0 0-.286.7v1.977c0 .274.095.505.286.7a.959.959 0 0 0 .7.286h7.246a.959.959 0 0 0 .7-.287.959.959 0 0 0 .286-.7M20 2.5c3.15 0 6.068.788 8.75 2.365a17.67 17.67 0 0 1 6.385 6.386C36.71 13.933 37.5 16.848 37.5 20c0 3.15-.79 6.068-2.365 8.751a17.71 17.71 0 0 1-6.385 6.385C26.068 36.712 23.15 37.5 20 37.5c-3.153 0-6.068-.788-8.75-2.363a17.71 17.71 0 0 1-6.385-6.385c-1.575-2.683-2.365-5.6-2.365-8.75 0-3.154.79-6.069 2.365-8.751a17.67 17.67 0 0 1 6.385-6.386C13.932 3.288 16.847 2.5 20 2.5",fillRule:"nonzero"})}),Nt=t=>e(Ct,{xmlns:"http://www.w3.org/2000/svg",width:"2rem",height:"2rem",viewBox:"0 0 64 64",id:"play-icon",...t,children:e("path",{id:"path",d:"M52.762 37.237 20.474 53.38A5.856 5.856 0 0 1 12 48.143V15.856a5.856 5.856 0 0 1 8.474-5.238l32.288 16.144a5.856 5.856 0 0 1 0 10.475z",fillRule:"nonzero"})}),Lt=t=>e(Ct,{xmlns:"http://www.w3.org/2000/svg",width:"2rem",height:"2rem",viewBox:"0 0 32 32",fill:"none",...t,children:e("g",{id:"search",children:e("path",{id:"path",fillRule:"evenodd",clipRule:"evenodd",d:"M7.60986 7.60986C5.86994 9.34977 5 11.445 5 13.8956C5 16.3462 5.86994 18.4414 7.60986 20.1813C9.34977 21.9212 11.445 22.7911 13.8956 22.7911C15.6355 22.7911 17.2345 22.3133 18.6926 21.3576L24.2063 26.8713C24.3044 26.9571 24.4146 27 24.5372 27C24.6597 27 24.77 26.9571 24.868 26.8713L26.8713 24.868C26.9571 24.77 27 24.6597 27 24.5372C27 24.4146 26.9571 24.3044 26.8713 24.2063L21.3576 18.6926C22.3133 17.2345 22.7911 15.6355 22.7911 13.8956C22.7911 11.445 21.9212 9.34977 20.1813 7.60986C18.4414 5.86994 16.3462 5 13.8956 5C11.445 5 9.34977 5.86994 7.60986 7.60986ZM9.59484 18.178C8.4063 16.9894 7.81205 15.562 7.81205 13.8956C7.81205 12.2292 8.4063 10.8017 9.59484 9.61321C10.7834 8.42468 12.2169 7.83042 13.8956 7.83042C15.5742 7.83042 17.0047 8.42162 18.1872 9.60403C19.3696 10.7864 19.9608 12.2169 19.9608 13.8956C19.9608 15.5742 19.3696 17.0047 18.1872 18.1872C17.0047 19.3696 15.5742 19.9608 13.8956 19.9608C12.2169 19.9608 10.7834 19.3665 9.59484 18.178Z"})})}),Ot=i.span`
|
|
30
|
-
font-size: 1rem;
|
|
31
|
-
`;var jt;!function(e){e.D1=i.h1`
|
|
32
|
-
${e=>o`
|
|
33
|
-
${kt("D1",e.weight,e.paragraph)}
|
|
34
|
-
color: ${$t.Neutral[1]};
|
|
35
|
-
${Et(e.inline,e.paragraph)}
|
|
25
|
+
`;var It,Lt={};Object.defineProperty(Lt,"__esModule",{value:!0});var Rt=e;const Mt=e=>Rt.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:Rt.jsx("path",{d:"M4.25 17.5C3.764 17.5 3.35067 17.33 3.01 16.99C2.67 16.6493 2.5 16.236 2.5 15.75V4.25C2.5 3.764 2.67 3.35067 3.01 3.01C3.35067 2.67 3.764 2.5 4.25 2.5H9.208C9.444 2.5 9.649 2.58667 9.823 2.76C9.99633 2.934 10.083 3.139 10.083 3.375C10.083 3.611 9.99633 3.816 9.823 3.99C9.649 4.16333 9.444 4.25 9.208 4.25H4.25V15.75H15.75V10.792C15.75 10.556 15.8367 10.351 16.01 10.177C16.184 10.0037 16.389 9.917 16.625 9.917C16.861 9.917 17.066 10.0037 17.24 10.177C17.4133 10.351 17.5 10.556 17.5 10.792V15.75C17.5 16.236 17.33 16.6493 16.99 16.99C16.6493 17.33 16.236 17.5 15.75 17.5H4.25ZM7.5 12.5C7.33333 12.3333 7.25 12.1283 7.25 11.885C7.25 11.6423 7.33333 11.4377 7.5 11.271L14.521 4.25H12.708C12.472 4.25 12.2673 4.16333 12.094 3.99C11.92 3.816 11.833 3.611 11.833 3.375C11.833 3.139 11.92 2.934 12.094 2.76C12.2673 2.58667 12.472 2.5 12.708 2.5H16.625C16.861 2.5 17.066 2.58667 17.24 2.76C17.4133 2.934 17.5 3.139 17.5 3.375V7.292C17.5 7.528 17.4133 7.73267 17.24 7.906C17.066 8.08 16.861 8.167 16.625 8.167C16.389 8.167 16.184 8.08 16.01 7.906C15.8367 7.73267 15.75 7.528 15.75 7.292V5.479L8.708 12.521C8.54133 12.6877 8.34367 12.771 8.115 12.771C7.88567 12.771 7.68067 12.6807 7.5 12.5Z",fill:"currentColor"})});var Pt;Mt.displayName="ExternalIcon",It=Lt.ExternalIcon=Mt,function(e){e.D1=i.h1`
|
|
26
|
+
${e=>l`
|
|
27
|
+
${jt("D1",e.weight,e.paragraph)}
|
|
28
|
+
color: ${wt.Neutral[1]};
|
|
29
|
+
${Tt(e.inline,e.paragraph)}
|
|
36
30
|
`}
|
|
37
31
|
`,e.D2=i.h1`
|
|
38
|
-
${e=>
|
|
39
|
-
${
|
|
40
|
-
color: ${
|
|
41
|
-
${
|
|
32
|
+
${e=>l`
|
|
33
|
+
${jt("D2",e.weight,e.paragraph)}
|
|
34
|
+
color: ${wt.Neutral[1]};
|
|
35
|
+
${Tt(e.inline,e.paragraph)}
|
|
42
36
|
`}
|
|
43
37
|
`,e.D3=i.h1`
|
|
44
|
-
${e=>
|
|
45
|
-
${
|
|
46
|
-
color: ${
|
|
47
|
-
${
|
|
38
|
+
${e=>l`
|
|
39
|
+
${jt("D3",e.weight,e.paragraph)}
|
|
40
|
+
color: ${wt.Neutral[1]};
|
|
41
|
+
${Tt(e.inline,e.paragraph)}
|
|
48
42
|
`}
|
|
49
43
|
`,e.D4=i.h1`
|
|
50
|
-
${e=>
|
|
51
|
-
${
|
|
52
|
-
color: ${
|
|
53
|
-
${
|
|
44
|
+
${e=>l`
|
|
45
|
+
${jt("D4",e.weight,e.paragraph)}
|
|
46
|
+
color: ${wt.Neutral[1]};
|
|
47
|
+
${Tt(e.inline,e.paragraph)}
|
|
54
48
|
`}
|
|
55
49
|
`,e.DBody=i.h1`
|
|
56
|
-
${e=>
|
|
57
|
-
${
|
|
58
|
-
color: ${
|
|
59
|
-
${
|
|
50
|
+
${e=>l`
|
|
51
|
+
${jt("DBody",e.weight,e.paragraph)}
|
|
52
|
+
color: ${wt.Neutral[1]};
|
|
53
|
+
${Tt(e.inline,e.paragraph)}
|
|
60
54
|
`}
|
|
61
55
|
`,e.H1=i.h1`
|
|
62
|
-
${e=>
|
|
63
|
-
${
|
|
64
|
-
color: ${
|
|
65
|
-
${
|
|
56
|
+
${e=>l`
|
|
57
|
+
${jt("H1",e.weight,e.paragraph)}
|
|
58
|
+
color: ${wt.Neutral[1]};
|
|
59
|
+
${Tt(e.inline,e.paragraph)}
|
|
66
60
|
`}
|
|
67
61
|
`,e.H2=i.h2`
|
|
68
|
-
${e=>
|
|
69
|
-
${
|
|
70
|
-
color: ${
|
|
71
|
-
${
|
|
62
|
+
${e=>l`
|
|
63
|
+
${jt("H2",e.weight,e.paragraph)}
|
|
64
|
+
color: ${wt.Neutral[1]};
|
|
65
|
+
${Tt(e.inline,e.paragraph)}
|
|
72
66
|
`}
|
|
73
67
|
`,e.H3=i.h3`
|
|
74
|
-
${e=>
|
|
75
|
-
${
|
|
76
|
-
color: ${
|
|
77
|
-
${
|
|
68
|
+
${e=>l`
|
|
69
|
+
${jt("H3",e.weight,e.paragraph)}
|
|
70
|
+
color: ${wt.Neutral[1]};
|
|
71
|
+
${Tt(e.inline,e.paragraph)}
|
|
78
72
|
`}
|
|
79
73
|
`,e.H4=i.h4`
|
|
80
|
-
${e=>
|
|
81
|
-
${
|
|
82
|
-
color: ${
|
|
83
|
-
${
|
|
74
|
+
${e=>l`
|
|
75
|
+
${jt("H4",e.weight,e.paragraph)}
|
|
76
|
+
color: ${wt.Neutral[1]};
|
|
77
|
+
${Tt(e.inline,e.paragraph)}
|
|
84
78
|
`}
|
|
85
79
|
`,e.H5=i.h5`
|
|
86
|
-
${e=>
|
|
87
|
-
${
|
|
88
|
-
color: ${
|
|
89
|
-
${
|
|
80
|
+
${e=>l`
|
|
81
|
+
${jt("H5",e.weight,e.paragraph)}
|
|
82
|
+
color: ${wt.Neutral[1]};
|
|
83
|
+
${Tt(e.inline,e.paragraph)}
|
|
90
84
|
`}
|
|
91
85
|
`,e.H6=i.h6`
|
|
92
|
-
${e=>
|
|
93
|
-
${
|
|
94
|
-
color: ${
|
|
95
|
-
${
|
|
86
|
+
${e=>l`
|
|
87
|
+
${jt("H6",e.weight,e.paragraph)}
|
|
88
|
+
color: ${wt.Neutral[1]};
|
|
89
|
+
${Tt(e.inline,e.paragraph)}
|
|
96
90
|
`}
|
|
97
91
|
`,e.Body=i.p`
|
|
98
|
-
${e=>
|
|
99
|
-
${
|
|
100
|
-
color: ${
|
|
101
|
-
${
|
|
92
|
+
${e=>l`
|
|
93
|
+
${jt("Body",e.weight,e.paragraph)}
|
|
94
|
+
color: ${wt.Neutral[1]};
|
|
95
|
+
${Tt(e.inline,e.paragraph)}
|
|
102
96
|
`}
|
|
103
97
|
`,e.BodySmall=i.p`
|
|
104
|
-
${e=>
|
|
105
|
-
${
|
|
106
|
-
color: ${
|
|
107
|
-
${
|
|
98
|
+
${e=>l`
|
|
99
|
+
${jt("BodySmall",e.weight,e.paragraph)}
|
|
100
|
+
color: ${wt.Neutral[1]};
|
|
101
|
+
${Tt(e.inline,e.paragraph)}
|
|
108
102
|
`}
|
|
109
103
|
`,e.XSmall=i.span`
|
|
110
|
-
${e=>
|
|
111
|
-
${
|
|
112
|
-
color: ${
|
|
113
|
-
${
|
|
104
|
+
${e=>l`
|
|
105
|
+
${jt("XSmall",e.weight,e.paragraph)}
|
|
106
|
+
color: ${wt.Neutral[1]};
|
|
107
|
+
${Tt(e.inline,e.paragraph)}
|
|
114
108
|
`}
|
|
115
|
-
`,e.Hyperlink={Default:e=>
|
|
116
|
-
${e=>
|
|
117
|
-
${
|
|
118
|
-
color: ${
|
|
109
|
+
`,e.Hyperlink={Default:e=>Yt({...e,textStyle:"Body"}),Small:e=>Yt({...e,textStyle:"BodySmall"})}}(Pt||(Pt={}));const Xt=i.a`
|
|
110
|
+
${e=>l`
|
|
111
|
+
${jt(e.textStyle,e.weight)}
|
|
112
|
+
color: ${wt.Primary};
|
|
119
113
|
text-decoration: none;
|
|
120
114
|
|
|
121
115
|
:hover,
|
|
122
116
|
:active,
|
|
123
117
|
:focus {
|
|
124
|
-
color: ${
|
|
118
|
+
color: ${wt.Secondary};
|
|
119
|
+
|
|
120
|
+
svg {
|
|
121
|
+
color: ${wt.Secondary};
|
|
122
|
+
}
|
|
125
123
|
}
|
|
126
124
|
`}
|
|
127
|
-
`,
|
|
125
|
+
`,Gt=i(It)`
|
|
126
|
+
height: 1rem;
|
|
127
|
+
width: 1rem;
|
|
128
128
|
margin-left: 0.4rem;
|
|
129
|
-
|
|
129
|
+
vertical-align: middle;
|
|
130
|
+
`,Yt=({external:e=!1,children:r,...a})=>t(Xt,{...a,children:[r,e&&n(Gt,{})]}),Zt=i.div`
|
|
130
131
|
display: flex;
|
|
131
132
|
position: relative;
|
|
132
133
|
align-items: center;
|
|
133
|
-
border: 1px solid ${
|
|
134
|
+
border: 1px solid ${wt.Neutral[5]};
|
|
134
135
|
border-radius: 4px;
|
|
135
|
-
background: ${
|
|
136
|
+
background: ${wt.Neutral[8]};
|
|
136
137
|
height: 3rem;
|
|
137
138
|
width: 100%;
|
|
138
139
|
padding: 0.1rem 1rem 0;
|
|
139
140
|
|
|
140
141
|
:focus,
|
|
141
142
|
:focus-within {
|
|
142
|
-
border: 1px solid ${
|
|
143
|
-
box-shadow:
|
|
143
|
+
border: 1px solid ${wt.Accent.Light[1]};
|
|
144
|
+
box-shadow: ${zt};
|
|
144
145
|
}
|
|
145
146
|
|
|
146
|
-
${e=>e
|
|
147
|
-
|
|
147
|
+
${e=>e.$readOnly?l`
|
|
148
|
+
border: none;
|
|
149
|
+
padding-left: 0rem;
|
|
150
|
+
background: transparent !important;
|
|
151
|
+
|
|
152
|
+
:focus-within {
|
|
153
|
+
border: none;
|
|
154
|
+
box-shadow: none;
|
|
155
|
+
}
|
|
156
|
+
`:e.disabled?l`
|
|
157
|
+
background: ${wt.Neutral[6](e)};
|
|
148
158
|
:hover {
|
|
149
159
|
cursor: not-allowed;
|
|
150
160
|
}
|
|
151
161
|
|
|
152
162
|
:focus-within {
|
|
153
|
-
border: 1px solid ${
|
|
163
|
+
border: 1px solid ${wt.Neutral[5](e)};
|
|
154
164
|
box-shadow: none;
|
|
155
165
|
}
|
|
156
|
-
`:e.$error?
|
|
157
|
-
border: 1px solid ${
|
|
166
|
+
`:e.$error?l`
|
|
167
|
+
border: 1px solid ${wt.Validation.Red.Border(e)};
|
|
158
168
|
|
|
159
169
|
:focus-within {
|
|
160
|
-
border: 1px solid ${
|
|
161
|
-
box-shadow:
|
|
170
|
+
border: 1px solid ${wt.Validation.Red.Border(e)};
|
|
171
|
+
box-shadow: ${Ct};
|
|
162
172
|
}
|
|
163
173
|
`:void 0}
|
|
164
|
-
`,
|
|
174
|
+
`,Kt=i.div`
|
|
165
175
|
position: absolute;
|
|
166
176
|
top: 0;
|
|
167
|
-
left: 1rem;
|
|
177
|
+
left: ${e=>e.$readOnly?"-0.5rem":"1rem"};
|
|
168
178
|
height: 100%;
|
|
169
179
|
display: flex;
|
|
170
180
|
align-items: center;
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
input[type="number"]::-webkit-outer-spin-button,
|
|
174
|
-
input[type="number"]::-webkit-inner-spin-button {
|
|
175
|
-
-webkit-appearance: none;
|
|
176
|
-
margin: 0;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
input[type="number"] {
|
|
180
|
-
-moz-appearance: textfield;
|
|
181
|
-
}
|
|
182
|
-
`,Mt=i.input`
|
|
183
|
-
${kt("Body","regular")}
|
|
181
|
+
`,Ut=i.input`
|
|
182
|
+
${jt("Body","regular")}
|
|
184
183
|
background: transparent;
|
|
185
184
|
height: 100%;
|
|
186
185
|
width: 2.5rem;
|
|
@@ -206,35 +205,21 @@ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useState as n,useRef as
|
|
|
206
205
|
outline: none;
|
|
207
206
|
}
|
|
208
207
|
|
|
209
|
-
${e=>{if(e.disabled)return
|
|
208
|
+
${e=>{if(e.disabled)return l`
|
|
210
209
|
cursor: not-allowed;
|
|
211
210
|
`}}
|
|
212
|
-
`,
|
|
211
|
+
`,qt=i(Ut)`
|
|
213
212
|
width: 2.6rem;
|
|
214
|
-
`,
|
|
213
|
+
`,Jt=i(Ut)`
|
|
215
214
|
width: 3.5rem;
|
|
216
|
-
`,
|
|
217
|
-
opacity: ${e=>e.$hide?0:1};
|
|
215
|
+
`,Qt=i(Pt.Body)`
|
|
218
216
|
margin: 0.1rem 0.2rem 0 0.2rem;
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
217
|
+
${e=>{if(e.$hide)return l`
|
|
218
|
+
color: ${wt.Neutral[3]};
|
|
219
|
+
`}}
|
|
220
|
+
`;i(Qt)`
|
|
221
|
+
${e=>{if(e.$compress)return l`
|
|
222
222
|
margin: 0.1rem 0.1rem 0 0.1rem;
|
|
223
223
|
`}}
|
|
224
|
-
`;const
|
|
225
|
-
display: flex;
|
|
226
|
-
align-items: center;
|
|
227
|
-
`,Ut=i(jt.Body)`
|
|
228
|
-
opacity: ${e=>e.$hide?0:1};
|
|
229
|
-
color: ${$t.Neutral[3]};
|
|
230
|
-
display: inline;
|
|
231
|
-
width: 2.5rem;
|
|
232
|
-
text-align: center;
|
|
233
|
-
`,qt=i(Yt)`
|
|
234
|
-
color: ${$t.Neutral[3]};
|
|
235
|
-
`,Jt=i(Ut)`
|
|
236
|
-
width: 2.6rem;
|
|
237
|
-
`,Kt=i(Ut)`
|
|
238
|
-
width: 3.5rem;
|
|
239
|
-
`,Qt=({disabled:i,error:o,value:c,onChange:h,onBlur:d,...g})=>{const[u,s]=n(""),[p,f]=n(""),[y,m]=n(""),[v,F]=n("none"),S=r(null),B=r(null),$=r(null),b=r(null),w=r(u),D=r(p),H=r(y),_=r(v),z=e=>{w.current=e,s(e)},x=e=>{D.current=e,f(e)},k=e=>{H.current=e,m(e)},E=e=>{_.current=e,F(e)};a((()=>(document.addEventListener("mousedown",A),S.current&&S.current.addEventListener("keydown",W),B.current&&B.current.addEventListener("keydown",C),$.current&&$.current.addEventListener("keydown",C),b.current&&b.current.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",A),S.current&&S.current.removeEventListener("keydown",W),B.current&&B.current.removeEventListener("keydown",C),$.current&&$.current.removeEventListener("keydown",C),b.current&&b.current.removeEventListener("keydown",C)})),[v]),a((()=>{"day"===v&&2===u.length&&$.current&&$.current.focus()}),[u]),a((()=>{"month"===v&&2===p.length&&b.current&&b.current.focus()}),[p]),a((()=>{j(c)}),[c]);const C=e=>{const t=["Backspace","0","1","2","3","4","5","6","7","8","9"],n=e.code&&e.code.startsWith("Digit")&&!t.includes(e.key);(!["Digit0","Digit1","Digit2","Digit3","Digit4","Digit5","Digit6","Digit7","Digit8","Digit9","Tab","Backspace","Delete","ArrowLeft","ArrowRight"].includes(e.code)&&!t.includes(e.key)||n)&&e.preventDefault()},A=e=>{i||S&&S.current.contains(e.target)||"none"!==_.current&&(E("none"),R())},W=e=>{"year"===e.target.name&&"Tab"===e.code&&(E("none"),R())},N=e=>{E(e.target.name),e.target.select()},L=e=>{switch(e.target.name){case"day":z(l.padValue(e.target.value,!0));break;case"month":x(l.padValue(e.target.value,!0))}},O=e=>{const t=e.target.name;switch(t){case"day":e.target.value.length<=2&&(z(e.target.value),V(e.target.value,t));break;case"month":e.target.value.length<=2&&(x(e.target.value),V(e.target.value,t));break;case"year":e.target.value.length<=4&&(k(e.target.value),V(e.target.value,t))}},j=e=>{if(void 0===e||""===e)z(""),x(""),k("");else{const t=new Date(e);if(!isNaN(t.getTime())){const e=t.getDate(),n=t.getMonth()+1,r=t.getFullYear();z(l.padValue(e.toString())),x(l.padValue(n.toString())),k(r.toString())}}},V=(e,t)=>{if(h){const n={day:u,month:p,year:y};n[t]=e;const r=T(n);h(r)}},R=()=>{if(d){const e={day:w.current,month:D.current,year:H.current},t=T(e);d(t)}},T=e=>{const t=[e.year,e.month,e.day];return e.day.length>=1&&e.month.length>=1&&4===e.year.length?t.join("-"):t.every((e=>""===e))?"":en};return t(It,{ref:S,onClick:()=>{"none"===v&&B.current&&B.current.focus()},disabled:i,$error:o,"data-testid":g["data-testid"],children:[t(Zt,{children:[e(Ut,{$hide:"day"===v||u.length>0,"data-testid":"day-placeholder",children:"DD"}),e(qt,{$hide:u.length>0,children:"/"}),e(Jt,{$hide:"month"===v||p.length>0,"data-testid":"month-placeholder",children:"MM"}),e(qt,{$hide:p.length>0,children:"/"}),e(Kt,{$hide:"year"===v||y.length>0,"data-testid":"year-placeholder",$addGap:0===u.length&&0===y.length,children:"YYYY"})]}),t(Pt,{children:[e(Mt,{name:"day",maxLength:2,value:u,ref:B,onFocus:N,onBlur:L,onChange:O,disabled:i,type:"number",pattern:"[0-9]{2}","data-testid":"day-input","aria-label":"day-input"}),e(Yt,{$hide:0===u.length,children:"/"}),e(Gt,{name:"month",maxLength:2,value:p,ref:$,onFocus:N,onBlur:L,onChange:O,disabled:i,type:"number",pattern:"[0-9]{2}","data-testid":"month-input","aria-label":"month-input"}),e(Yt,{$hide:0===p.length,children:"/"}),e(Xt,{name:"year",maxLength:4,value:y,ref:b,onFocus:N,onBlur:L,onChange:O,disabled:i,type:"number",pattern:"[0-9]{4}","data-testid":"year-input","aria-label":"year-input"})]})]})},en="Invalid date";export{Qt as DateInput};
|
|
224
|
+
`;const en=({disabled:e,error:i,value:l,onChange:c,onBlur:h,onChangeRaw:g,onBlurRaw:p,readOnly:s,id:f,...y})=>{const[m,S]=r(""),[F,v]=r(""),[B,$]=r(""),[H,b]=r("none"),D=a(null),w=a(null),_=a(null),x=a(null),z=a(m),C=a(F),k=a(B),E=a(H),A=e=>{z.current=e,S(e)},O=e=>{C.current=e,v(e)},W=e=>{k.current=e,$(e)},V=e=>{E.current=e,b(e)};o((()=>(document.addEventListener("mousedown",N),D.current&&D.current.addEventListener("keydown",j),()=>{document.removeEventListener("mousedown",N),D.current&&D.current.removeEventListener("keydown",j)})),[H]),o((()=>{"day"===H&&2===m.length&&_.current&&_.current.focus()}),[m]),o((()=>{"month"===H&&2===F.length&&x.current&&x.current.focus()}),[F]),o((()=>{M(l)}),[l]);const N=t=>{e||s||D&&D.current.contains(t.target)||"none"!==E.current&&(V("none"),X())},j=e=>{"year"===e.target.name&&"Tab"===e.code&&(V("none"),X())},T=e=>{V(e.target.name),e.target.select()},I=e=>{const t=e.target.name,n=u.padValue(e.target.value,!0);switch(t){case"day":A(n);break;case"month":O(n)}const r=m.length&&F.length&&4===B.length,a="day"===t,o=d.clampMonth(F);r&&(A(u.padValue(d.clampDay(a?n:m,o,B))),O(u.padValue(o)))},L=e=>{const t=e.target.name,n=e.target.value.replace(/[^0-9]/g,"");switch(t){case"day":A(n),P(n,t);break;case"month":O(n),P(n,t);break;case"year":W(n),P(n,t)}},R=e=>{"Backspace"!==e.code&&"Backspace"!==e.key||("month"===H&&0===F.length&&w.current.focus(),"year"===H&&0===B.length&&_.current.focus())},M=e=>{if(void 0===e||""===e)A(""),O(""),W("");else{const t=new Date(e);if(!isNaN(t.getTime())){const e=(t.getMonth()+1).toString(),n=t.getFullYear().toString(),r=d.clampDay(t.getDate().toString(),e,n);A(u.padValue(r)),O(u.padValue(e)),W(n)}}},P=(e,t)=>{if(c){const n={day:m,month:F,year:B};n[t]=e;const r=G(n);c(r)}if(g){const n=[..."day"===t?[u.padValue(e)]:[m],..."month"===t?[u.padValue(e)]:[F],..."year"===t?[e]:[B]];g(n)}},X=()=>{if(h){const e={day:z.current,month:C.current,year:k.current},t=G(e);h(t)}if(p){const e=[u.padValue(z.current.toString()),u.padValue(C.current.toString()),k.current];p(e)}},G=e=>{const t=[e.year,e.month,e.day];return e.day.length>=1&&e.month.length>=1&&4===e.year.length?t.join("-"):t.every((e=>""===e))?"":tn};return n(Zt,{ref:D,onClick:()=>{"none"===H&&w.current&&w.current.focus()},disabled:e,$error:i,id:f,"data-testid":y["data-testid"],$readOnly:s,children:t(Kt,{$readOnly:s,children:[n(Ut,{name:"day",maxLength:2,value:m,ref:w,onFocus:T,onBlur:I,onChange:L,disabled:e,type:"text",inputMode:"numeric",pattern:"[0-9]{2}","data-testid":"day-input","aria-label":"day-input",readOnly:s,placeholder:"day"!==H||s?"DD":""}),n(Qt,{$hide:0===m.length,children:"/"}),n(qt,{name:"month",maxLength:2,value:F,ref:_,onFocus:T,onBlur:I,onChange:L,onKeyDown:R,disabled:e,type:"text",inputMode:"numeric",pattern:"[0-9]{2}","data-testid":"month-input","aria-label":"month-input",readOnly:s,placeholder:"month"!==H||s?"MM":""}),n(Qt,{$hide:0===F.length,children:"/"}),n(Jt,{name:"year",maxLength:4,value:B,ref:x,onFocus:T,onBlur:I,onChange:L,onKeyDown:R,disabled:e,type:"text",inputMode:"numeric",pattern:"[0-9]{4}","data-testid":"year-input","aria-label":"year-input",readOnly:s,placeholder:"year"!==H||s?"YYYY":""})]})})},tn="Invalid date";export{en as DateInput};
|
|
240
225
|
//# sourceMappingURL=index.js.map
|