@lifesg/react-design-system 1.0.0-alpha.1
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/CONTRIBUTING.md +175 -0
- package/README.md +68 -0
- package/dist/README.md +68 -0
- package/dist/accordion/accordion-context.d.ts +2 -0
- package/dist/accordion/accordion-item.d.ts +3 -0
- package/dist/accordion/accordion-item.style.d.ts +13 -0
- package/dist/accordion/accordion.d.ts +5 -0
- package/dist/accordion/accordion.style.d.ts +6 -0
- package/dist/accordion/index.d.ts +2 -0
- package/dist/accordion/index.js +364 -0
- package/dist/accordion/index.js.map +1 -0
- package/dist/accordion/package.json +7 -0
- package/dist/accordion/types.d.ts +27 -0
- package/dist/alert/alert.d.ts +3 -0
- package/dist/alert/alert.style.d.ts +9 -0
- package/dist/alert/index.d.ts +2 -0
- package/dist/alert/index.js +175 -0
- package/dist/alert/index.js.map +1 -0
- package/dist/alert/package.json +7 -0
- package/dist/alert/types.d.ts +6 -0
- package/dist/animations/index.d.ts +2 -0
- package/dist/animations/index.js +7 -0
- package/dist/animations/index.js.map +1 -0
- package/dist/animations/loading-dots/loading-dots.d.ts +2 -0
- package/dist/animations/loading-dots/lottie-animation.d.ts +2 -0
- package/dist/animations/loading-spinner/loading-spinner.d.ts +2 -0
- package/dist/animations/loading-spinner/lottie-animation.d.ts +2 -0
- package/dist/animations/package.json +7 -0
- package/dist/box-container/box-container.d.ts +3 -0
- package/dist/box-container/box-container.styles.d.ts +22 -0
- package/dist/box-container/index.d.ts +2 -0
- package/dist/box-container/index.js +204 -0
- package/dist/box-container/index.js.map +1 -0
- package/dist/box-container/package.json +7 -0
- package/dist/box-container/types.d.ts +18 -0
- package/dist/breadcrumb/breadcrumb.d.ts +3 -0
- package/dist/breadcrumb/breadcrumb.style.d.ts +19 -0
- package/dist/breadcrumb/index.d.ts +2 -0
- package/dist/breadcrumb/index.js +184 -0
- package/dist/breadcrumb/index.js.map +1 -0
- package/dist/breadcrumb/package.json +7 -0
- package/dist/breadcrumb/types.d.ts +10 -0
- package/dist/button/button.d.ts +6 -0
- package/dist/button/button.style.d.ts +4 -0
- package/dist/button/index.d.ts +2 -0
- package/dist/button/index.js +268 -0
- package/dist/button/index.js.map +1 -0
- package/dist/button/package.json +7 -0
- package/dist/button/types.d.ts +17 -0
- package/dist/checkbox/checkbox.d.ts +3 -0
- package/dist/checkbox/checkbox.style.d.ts +11 -0
- package/dist/checkbox/index.d.ts +2 -0
- package/dist/checkbox/index.js +41 -0
- package/dist/checkbox/index.js.map +1 -0
- package/dist/checkbox/package.json +7 -0
- package/dist/checkbox/types.d.ts +6 -0
- package/dist/cjs/index.js +2162 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/color/color.d.ts +59 -0
- package/dist/color/index.d.ts +2 -0
- package/dist/color/index.js +2 -0
- package/dist/color/index.js.map +1 -0
- package/dist/color/package.json +7 -0
- package/dist/color/types.d.ts +52 -0
- package/dist/date-input/date-input.d.ts +3 -0
- package/dist/date-input/date-input.style.d.ts +22 -0
- package/dist/date-input/index.d.ts +2 -0
- package/dist/date-input/index.js +240 -0
- package/dist/date-input/index.js.map +1 -0
- package/dist/date-input/package.json +7 -0
- package/dist/date-input/types.d.ts +25 -0
- package/dist/form/form-date-input.d.ts +3 -0
- package/dist/form/form-input-group.d.ts +3 -0
- package/dist/form/form-input.d.ts +3 -0
- package/dist/form/form-label-addon.d.ts +15 -0
- package/dist/form/form-label-addon.style.d.ts +2 -0
- package/dist/form/form-label.d.ts +5 -0
- package/dist/form/form-label.style.d.ts +6 -0
- package/dist/form/form-multi-select.d.ts +3 -0
- package/dist/form/form-select.d.ts +3 -0
- package/dist/form/form-textarea.d.ts +3 -0
- package/dist/form/form-textarea.style.d.ts +3 -0
- package/dist/form/form-timepicker.d.ts +3 -0
- package/dist/form/form-wrapper.d.ts +8 -0
- package/dist/form/form-wrapper.style.d.ts +1 -0
- package/dist/form/index.d.ts +11 -0
- package/dist/form/index.js +1452 -0
- package/dist/form/index.js.map +1 -0
- package/dist/form/package.json +7 -0
- package/dist/form/types.d.ts +49 -0
- package/dist/icon/arrow-right-icon.d.ts +3 -0
- package/dist/icon/icon.d.ts +3 -0
- package/dist/icon/index.d.ts +2 -0
- package/dist/icon/index.js +12 -0
- package/dist/icon/index.js.map +1 -0
- package/dist/icon/info-icon.d.ts +3 -0
- package/dist/icon/package.json +7 -0
- package/dist/icon/play-alt-icon.d.ts +3 -0
- package/dist/icon/search-icon.d.ts +3 -0
- package/dist/icon/shared.style.d.ts +1 -0
- package/dist/icon/types.d.ts +9 -0
- package/dist/icon-button/icon-button.d.ts +3 -0
- package/dist/icon-button/icon-button.style.d.ts +1 -0
- package/dist/icon-button/index.d.ts +2 -0
- package/dist/icon-button/index.js +30 -0
- package/dist/icon-button/index.js.map +1 -0
- package/dist/icon-button/package.json +7 -0
- package/dist/icon-button/types.d.ts +6 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +2162 -0
- package/dist/index.js.map +1 -0
- package/dist/input/index.d.ts +2 -0
- package/dist/input/index.js +68 -0
- package/dist/input/index.js.map +1 -0
- package/dist/input/input.d.ts +3 -0
- package/dist/input/input.style.d.ts +6 -0
- package/dist/input/package.json +7 -0
- package/dist/input/types.d.ts +10 -0
- package/dist/input-group/index.d.ts +2 -0
- package/dist/input-group/index.js +768 -0
- package/dist/input-group/index.js.map +1 -0
- package/dist/input-group/input-group-list-addon.d.ts +3 -0
- package/dist/input-group/input-group-list-addon.style.d.ts +16 -0
- package/dist/input-group/input-group.d.ts +3 -0
- package/dist/input-group/input-group.style.d.ts +15 -0
- package/dist/input-group/package.json +7 -0
- package/dist/input-group/types.d.ts +39 -0
- package/dist/input-select/index.d.ts +3 -0
- package/dist/input-select/index.js +577 -0
- package/dist/input-select/index.js.map +1 -0
- package/dist/input-select/input-multi-select.d.ts +3 -0
- package/dist/input-select/input-select-wrapper.d.ts +3 -0
- package/dist/input-select/input-select.d.ts +3 -0
- package/dist/input-select/input-select.styles.d.ts +19 -0
- package/dist/input-select/package.json +7 -0
- package/dist/input-select/types.d.ts +49 -0
- package/dist/input-textarea/index.d.ts +2 -0
- package/dist/input-textarea/index.js +182 -0
- package/dist/input-textarea/index.js.map +1 -0
- package/dist/input-textarea/package.json +7 -0
- package/dist/input-textarea/textara-counter.style.d.ts +5 -0
- package/dist/input-textarea/textarea-counter.d.ts +8 -0
- package/dist/input-textarea/textarea.d.ts +4 -0
- package/dist/input-textarea/textarea.style.d.ts +6 -0
- package/dist/input-textarea/types.d.ts +8 -0
- package/dist/link-list/index.d.ts +2 -0
- package/dist/link-list/index.js +196 -0
- package/dist/link-list/index.js.map +1 -0
- package/dist/link-list/link-list.d.ts +3 -0
- package/dist/link-list/link-list.styles.d.ts +17 -0
- package/dist/link-list/package.json +7 -0
- package/dist/link-list/types.d.ts +20 -0
- package/dist/masonry/index.d.ts +1 -0
- package/dist/masonry/index.js +42 -0
- package/dist/masonry/index.js.map +1 -0
- package/dist/masonry/masonry.d.ts +6 -0
- package/dist/masonry/masonry.style.d.ts +6 -0
- package/dist/masonry/package.json +7 -0
- package/dist/masonry/types.d.ts +28 -0
- package/dist/media/index.d.ts +2 -0
- package/dist/media/index.js +2 -0
- package/dist/media/index.js.map +1 -0
- package/dist/media/media.d.ts +5 -0
- package/dist/media/package.json +7 -0
- package/dist/media/types.d.ts +18 -0
- package/dist/modal/index.d.ts +5 -0
- package/dist/modal/index.js +120 -0
- package/dist/modal/index.js.map +1 -0
- package/dist/modal/modal-box.d.ts +3 -0
- package/dist/modal/modal-box.styles.d.ts +4 -0
- package/dist/modal/modal.d.ts +3 -0
- package/dist/modal/modal.styles.d.ts +8 -0
- package/dist/modal/package.json +7 -0
- package/dist/modal/types.d.ts +18 -0
- package/dist/overlay/index.d.ts +2 -0
- package/dist/overlay/index.js +40 -0
- package/dist/overlay/index.js.map +1 -0
- package/dist/overlay/overlay.d.ts +3 -0
- package/dist/overlay/overlay.styles.d.ts +3 -0
- package/dist/overlay/package.json +7 -0
- package/dist/overlay/types.d.ts +26 -0
- package/dist/package.json +35 -0
- package/dist/popover/index.d.ts +3 -0
- package/dist/popover/index.js +372 -0
- package/dist/popover/index.js.map +1 -0
- package/dist/popover/package.json +7 -0
- package/dist/popover/popover-hoc.d.ts +3 -0
- package/dist/popover/popover.d.ts +3 -0
- package/dist/popover/popover.styles.d.ts +11 -0
- package/dist/popover/types.d.ts +19 -0
- package/dist/radio-button/index.d.ts +2 -0
- package/dist/radio-button/index.js +31 -0
- package/dist/radio-button/index.js.map +1 -0
- package/dist/radio-button/package.json +7 -0
- package/dist/radio-button/radio-button.d.ts +3 -0
- package/dist/radio-button/radio-button.styles.d.ts +9 -0
- package/dist/radio-button/types.d.ts +3 -0
- package/dist/shared/component-loading-spinner/component-loading-spinner.d.ts +12 -0
- package/dist/shared/component-loading-spinner/component-loading-spinner.style.d.ts +15 -0
- package/dist/shared/dropdown-list/dropdown-list.d.ts +7 -0
- package/dist/shared/dropdown-list/dropdown-list.styles.d.ts +31 -0
- package/dist/shared/dropdown-list/dropdown-search.d.ts +6 -0
- package/dist/shared/dropdown-list/dropdown-search.styles.d.ts +4 -0
- package/dist/shared/dropdown-list/types.d.ts +43 -0
- package/dist/spec/color-spec/base-color-set.d.ts +2 -0
- package/dist/spec/color-spec/bookingsg-color-set.d.ts +2 -0
- package/dist/spec/media-spec.d.ts +2 -0
- package/dist/spec/text-spec/base-text-style-set.d.ts +2 -0
- package/dist/spec/text-spec/font-spec.d.ts +9 -0
- package/dist/text/helper.d.ts +6 -0
- package/dist/text/index.d.ts +4 -0
- package/dist/text/index.js +130 -0
- package/dist/text/index.js.map +1 -0
- package/dist/text/package.json +7 -0
- package/dist/text/text-style.d.ts +100 -0
- package/dist/text/text.d.ts +22 -0
- package/dist/text/types.d.ts +33 -0
- package/dist/text-list/index.d.ts +6 -0
- package/dist/text-list/index.js +76 -0
- package/dist/text-list/index.js.map +1 -0
- package/dist/text-list/ordered-list.d.ts +3 -0
- package/dist/text-list/package.json +7 -0
- package/dist/text-list/text-list.styles.d.ts +3 -0
- package/dist/text-list/types.d.ts +23 -0
- package/dist/text-list/unordered-list.d.ts +3 -0
- package/dist/theme/color-theme-helper.d.ts +1 -0
- package/dist/theme/helper.d.ts +16 -0
- package/dist/theme/index.d.ts +4 -0
- package/dist/theme/index.js +2 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme/package.json +7 -0
- package/dist/theme/text-theme-helper.d.ts +1 -0
- package/dist/theme/types.d.ts +35 -0
- package/dist/timeline/index.d.ts +2 -0
- package/dist/timeline/index.js +199 -0
- package/dist/timeline/index.js.map +1 -0
- package/dist/timeline/package.json +7 -0
- package/dist/timeline/timeline.d.ts +3 -0
- package/dist/timeline/timeline.style.d.ts +19 -0
- package/dist/timeline/types.d.ts +19 -0
- package/dist/timepicker/helper.d.ts +15 -0
- package/dist/timepicker/index.d.ts +2 -0
- package/dist/timepicker/index.js +516 -0
- package/dist/timepicker/index.js.map +1 -0
- package/dist/timepicker/package.json +7 -0
- package/dist/timepicker/timepicker-dropdown.d.ts +12 -0
- package/dist/timepicker/timepicker-dropdown.styles.d.ts +13 -0
- package/dist/timepicker/timepicker.d.ts +3 -0
- package/dist/timepicker/timepicker.styles.d.ts +8 -0
- package/dist/timepicker/types.d.ts +19 -0
- package/dist/toggle-button/index.d.ts +2 -0
- package/dist/toggle-button/index.js +190 -0
- package/dist/toggle-button/index.js.map +1 -0
- package/dist/toggle-button/package.json +7 -0
- package/dist/toggle-button/toggle-button.d.ts +3 -0
- package/dist/toggle-button/toggle-button.styles.d.ts +10 -0
- package/dist/toggle-button/types.d.ts +7 -0
- package/dist/tooltip/index.d.ts +3 -0
- package/dist/tooltip/index.js +320 -0
- package/dist/tooltip/index.js.map +1 -0
- package/dist/tooltip/package.json +7 -0
- package/dist/tooltip/tooltip-hoc.d.ts +3 -0
- package/dist/tooltip/tooltip.d.ts +3 -0
- package/dist/tooltip/tooltip.styles.d.ts +9 -0
- package/dist/tooltip/types.d.ts +19 -0
- package/dist/transition/index.d.ts +4 -0
- package/dist/transition/index.js +2 -0
- package/dist/transition/index.js.map +1 -0
- package/dist/transition/package.json +7 -0
- package/dist/util/string-helper.d.ts +27 -0
- package/package.json +106 -0
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{useState as n,useRef as r,useEffect as i}from"react";import o,{css as a}from"styled-components";var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var c=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},h="object"==typeof l&&l&&l.Object===Object&&l,p="object"==typeof self&&self&&self.Object===Object&&self,s=h||p||Function("return this")(),f=s,g=function(){return f.Date.now()},d=/\s/;var u=function(t){for(var e=t.length;e--&&d.test(t.charAt(e)););return e},m=/^\s+/;var y=function(t){return t?t.slice(0,u(t)+1).replace(m,""):t},v=s.Symbol,F=v,S=Object.prototype,b=S.hasOwnProperty,x=S.toString,w=F?F.toStringTag:void 0;var $=function(t){var e=b.call(t,w),n=t[w];try{t[w]=void 0;var r=!0}catch(t){}var i=x.call(t);return r&&(e?t[w]=n:delete t[w]),i},B=Object.prototype.toString;var H=$,D=function(t){return B.call(t)},z=v?v.toStringTag:void 0;var _=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":z&&z in Object(t)?H(t):D(t)};var C=_,E=function(t){return null!=t&&"object"==typeof t};var W=function(t){return"symbol"==typeof t||E(t)&&"[object Symbol]"==C(t)},k=y,A=c,O=W,j=/^[-+]0x[0-9a-f]+$/i,L=/^0b[01]+$/i,T=/^0o[0-7]+$/i,R=parseInt;var V=c,N=g,X=function(t){if("number"==typeof t)return t;if(O(t))return NaN;if(A(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=A(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=k(t);var n=L.test(t);return n||T.test(t)?R(t.slice(2),n?2:8):j.test(t)?NaN:+t},I=Math.max,P=Math.min;var M=function(t,e,n){var r,i,o,a,l,c,h=0,p=!1,s=!1,f=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function g(e){var n=r,o=i;return r=i=void 0,h=e,a=t.apply(o,n)}function d(t){return h=t,l=setTimeout(m,e),p?g(t):a}function u(t){var n=t-c;return void 0===c||n>=e||n<0||s&&t-h>=o}function m(){var t=N();if(u(t))return y(t);l=setTimeout(m,function(t){var n=e-(t-c);return s?P(n,o-(t-h)):n}(t))}function y(t){return l=void 0,f&&r?g(t):(r=i=void 0,a)}function v(){var t=N(),n=u(t);if(r=arguments,i=this,c=t,n){if(void 0===l)return d(c);if(s)return clearTimeout(l),l=setTimeout(m,e),g(c)}return void 0===l&&(l=setTimeout(m,e)),a}return e=X(e)||0,V(n)&&(p=!!n.leading,o=(s="maxWait"in n)?I(X(n.maxWait)||0,e):o,f="trailing"in n?!!n.trailing:f),v.cancel=function(){void 0!==l&&clearTimeout(l),h=0,r=c=i=l=void 0},v.flush=function(){return void 0===l?a:y(N())},v};var G=Array.isArray,Y=G,Z=W,U=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,q=/^\w*$/;var J=function(t,e){if(Y(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Z(t))||(q.test(t)||!U.test(t)||null!=e&&t in Object(e))},K=_,Q=c;var tt,et=function(t){if(!Q(t))return!1;var e=K(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},nt=s["__core-js_shared__"],rt=(tt=/[^.]+$/.exec(nt&&nt.keys&&nt.keys.IE_PROTO||""))?"Symbol(src)_1."+tt:"";var it=function(t){return!!rt&&rt in t},ot=Function.prototype.toString;var at=et,lt=it,ct=c,ht=function(t){if(null!=t){try{return ot.call(t)}catch(t){}try{return t+""}catch(t){}}return""},pt=/^\[object .+?Constructor\]$/,st=Function.prototype,ft=Object.prototype,gt=st.toString,dt=ft.hasOwnProperty,ut=RegExp("^"+gt.call(dt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var mt=function(t){return!(!ct(t)||lt(t))&&(at(t)?ut:pt).test(ht(t))},yt=function(t,e){return null==t?void 0:t[e]};var vt=function(t,e){var n=yt(t,e);return mt(n)?n:void 0},Ft=vt(Object,"create"),St=Ft;var bt=function(){this.__data__=St?St(null):{},this.size=0};var xt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},wt=Ft,$t=Object.prototype.hasOwnProperty;var Bt=function(t){var e=this.__data__;if(wt){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return $t.call(e,t)?e[t]:void 0},Ht=Ft,Dt=Object.prototype.hasOwnProperty;var zt=Ft;var _t=bt,Ct=xt,Et=Bt,Wt=function(t){var e=this.__data__;return Ht?void 0!==e[t]:Dt.call(e,t)},kt=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=zt&&void 0===e?"__lodash_hash_undefined__":e,this};function At(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}At.prototype.clear=_t,At.prototype.delete=Ct,At.prototype.get=Et,At.prototype.has=Wt,At.prototype.set=kt;var Ot=At;var jt=function(){this.__data__=[],this.size=0};var Lt=function(t,e){return t===e||t!=t&&e!=e};var Tt=function(t,e){for(var n=t.length;n--;)if(Lt(t[n][0],e))return n;return-1},Rt=Tt,Vt=Array.prototype.splice;var Nt=Tt;var Xt=Tt;var It=Tt;var Pt=jt,Mt=function(t){var e=this.__data__,n=Rt(e,t);return!(n<0)&&(n==e.length-1?e.pop():Vt.call(e,n,1),--this.size,!0)},Gt=function(t){var e=this.__data__,n=Nt(e,t);return n<0?void 0:e[n][1]},Yt=function(t){return Xt(this.__data__,t)>-1},Zt=function(t,e){var n=this.__data__,r=It(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};function Ut(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Ut.prototype.clear=Pt,Ut.prototype.delete=Mt,Ut.prototype.get=Gt,Ut.prototype.has=Yt,Ut.prototype.set=Zt;var qt=Ut,Jt=vt(s,"Map"),Kt=Ot,Qt=qt,te=Jt;var ee=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var ne=function(t,e){var n=t.__data__;return ee(e)?n["string"==typeof e?"string":"hash"]:n.map},re=ne;var ie=ne;var oe=ne;var ae=ne;var le=function(){this.size=0,this.__data__={hash:new Kt,map:new(te||Qt),string:new Kt}},ce=function(t){var e=re(this,t).delete(t);return this.size-=e?1:0,e},he=function(t){return ie(this,t).get(t)},pe=function(t){return oe(this,t).has(t)},se=function(t,e){var n=ae(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function fe(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}fe.prototype.clear=le,fe.prototype.delete=ce,fe.prototype.get=he,fe.prototype.has=pe,fe.prototype.set=se;var ge=fe;function de(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(de.Cache||ge),n}de.Cache=ge;var ue=de;var me=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ye=/\\(\\)?/g,ve=function(t){var e=ue(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(me,(function(t,n,r,i){e.push(r?i.replace(ye,"$1"):n||t)})),e}));var Fe=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i},Se=G,be=W,xe=v?v.prototype:void 0,we=xe?xe.toString:void 0;var $e=function t(e){if("string"==typeof e)return e;if(Se(e))return Fe(e,t)+"";if(be(e))return we?we.call(e):"";var n=e+"";return"0"==n&&1/e==-Infinity?"-0":n},Be=$e;var He=G,De=J,ze=ve,_e=function(t){return null==t?"":Be(t)};var Ce=W;var Ee=function(t,e){return He(t)?t:De(t,e)?[t]:ze(_e(t))},We=function(t){if("string"==typeof t||Ce(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e};var ke=function(t,e){for(var n=0,r=(e=Ee(e,t)).length;null!=t&&n<r;)t=t[We(e[n++])];return n&&n==r?t:void 0};var Ae=function(t,e,n){var r=null==t?void 0:ke(t,e);return void 0===r?n:r};const Oe=(t,e,n)=>e?Ae(n,e)||Ae(t,e):n||t,je=(t,e)=>{const n=e||t.defaultValue;return Ae(t.collections,n)};var Le;!function(t){t.colorScheme="colorScheme",t.layout="layout",t.textStyleScheme="textStyleScheme"}(Le||(Le={}));const Te={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"},Re=t=>e=>{const n=e.theme,r=je(Te,n[Le.colorScheme]);return n.options&&n.options.color?Oe(r,t,n.options.color):Oe(r,t)},Ve=(Re("Brand.1"),Re("Brand.2"),Re("Brand.3"),Re("Brand.4"),Re("Brand.5"),Re("Brand.6"),Re("Primary")),Ne=(Re("PrimaryDark"),Re("Secondary")),Xe=(Re("Accent.Light.1"),Re("Accent.Light.2"),Re("Accent.Light.3"),Re("Accent.Light.4"),Re("Accent.Light.5"),Re("Accent.Light.6"),Re("Accent.Dark.1"),Re("Accent.Dark.2"),Re("Accent.Dark.3"),{1:Re("Neutral.1"),2:Re("Neutral.2"),3:Re("Neutral.3"),4:Re("Neutral.4"),5:Re("Neutral.5"),6:Re("Neutral.6"),7:Re("Neutral.7"),8:Re("Neutral.8")}),Ie=(Re("Validation.Green.Text"),Re("Validation.Green.Icon"),Re("Validation.Green.Border"),Re("Validation.Green.Background"),Re("Validation.Orange.Text"),Re("Validation.Orange.Icon"),Re("Validation.Orange.Border"),Re("Validation.Orange.Background"),Re("Validation.Orange.Badge"),Re("Validation.Red.Text"),Re("Validation.Red.Icon"),Re("Validation.Red.Border"),Re("Validation.Red.Background"),o.svg`
|
|
2
|
+
height: 1rem;
|
|
3
|
+
width: 1rem;
|
|
4
|
+
vertical-align: text-top;
|
|
5
|
+
|
|
6
|
+
#path {
|
|
7
|
+
fill: ${Xe[8]};
|
|
8
|
+
}
|
|
9
|
+
`),Pe=e=>t(Ie,{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 16 16",...e,children:t("g",{fill:"none",fillRule:"evenodd",children:t("g",{id:"path",fillRule:"nonzero",children:t("g",{children:t("g",{children:t("g",{children:t("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)"})})})})})})}),Me=e=>t(Ie,{width:"1rem",height:"1rem",viewBox:"0 0 40 40",xmlns:"http://www.w3.org/2000/svg",...e,children:t("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"})}),Ge=e=>t(Ie,{xmlns:"http://www.w3.org/2000/svg",width:"2rem",height:"2rem",viewBox:"0 0 64 64",id:"play-icon",...e,children:t("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"})}),Ye=e=>t(Ie,{xmlns:"http://www.w3.org/2000/svg",width:"2rem",height:"2rem",viewBox:"0 0 32 32",fill:"none",...e,children:t("g",{id:"search",children:t("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"})})}),Ze=o.span`
|
|
10
|
+
font-size: 1rem;
|
|
11
|
+
`,Ue={Regular:"Open Sans",Semibold:"Open Sans Semibold",Bold:"Open Sans Bold",Light:"Open Sans Light"},qe={collections:{base:{D1:{fontFamily:Ue.Bold,fontSize:3,fontWeight:700,lineHeight:4,letterSpacing:-.056},D2:{fontFamily:Ue.Bold,fontSize:2.5,fontWeight:700,lineHeight:3.5,letterSpacing:-.032},D3:{fontFamily:Ue.Bold,fontSize:1.625,fontWeight:700,lineHeight:2.25},D4:{fontFamily:Ue.Bold,fontSize:1.375,fontWeight:700,lineHeight:1.75},DBody:{fontFamily:Ue.Regular,fontSize:1.375,lineHeight:1.75},H1:{fontFamily:Ue.Bold,fontSize:2,fontWeight:700,lineHeight:2.5},H2:{fontFamily:Ue.Bold,fontSize:1.625,fontWeight:700,lineHeight:2.25},H3:{fontFamily:Ue.Bold,fontSize:1.375,fontWeight:700,lineHeight:1.75},H4:{fontFamily:Ue.Bold,fontSize:1.125,fontWeight:700,lineHeight:1.625},H5:{fontFamily:Ue.Bold,fontSize:1,fontWeight:700,lineHeight:1.5,letterSpacing:.014},H6:{fontFamily:Ue.Bold,fontSize:.875,fontWeight:700,lineHeight:1.6,letterSpacing:.012},Body:{fontFamily:Ue.Regular,fontSize:1.125,lineHeight:1.625},BodySmall:{fontFamily:Ue.Regular,fontSize:1,lineHeight:1.5,letterSpacing:.014},XSmall:{fontFamily:Ue.Regular,fontSize:.75,lineHeight:1.2,letterSpacing:.012}}},defaultValue:"base"},Je=t=>e=>{const n=e.theme,r=je(qe,n[Le.textStyleScheme]);return n.options&&n.options.textStyle?Oe(r,t,n.options.textStyle):Oe(r,t)},Ke={D1:{fontFamily:Je("D1.fontFamily"),fontSize:Je("D1.fontSize"),fontWeight:Je("D1.fontWeight"),lineHeight:Je("D1.lineHeight"),letterSpacing:Je("D1.letterSpacing")},D2:{fontFamily:Je("D2.fontFamily"),fontSize:Je("D2.fontSize"),fontWeight:Je("D2.fontWeight"),lineHeight:Je("D2.lineHeight"),letterSpacing:Je("D2.letterSpacing")},D3:{fontFamily:Je("D3.fontFamily"),fontSize:Je("D3.fontSize"),fontWeight:Je("D3.fontWeight"),lineHeight:Je("D3.lineHeight"),letterSpacing:Je("D3.letterSpacing")},D4:{fontFamily:Je("D4.fontFamily"),fontSize:Je("D4.fontSize"),fontWeight:Je("D4.fontWeight"),lineHeight:Je("D4.lineHeight"),letterSpacing:Je("D4.letterSpacing")},DBody:{fontFamily:Je("DBody.fontFamily"),fontSize:Je("DBody.fontSize"),fontWeight:Je("DBody.fontWeight"),lineHeight:Je("DBody.lineHeight"),letterSpacing:Je("DBody.letterSpacing")},H1:{fontFamily:Je("H1.fontFamily"),fontSize:Je("H1.fontSize"),fontWeight:Je("H1.fontWeight"),lineHeight:Je("H1.lineHeight"),letterSpacing:Je("H1.letterSpacing")},H2:{fontFamily:Je("H2.fontFamily"),fontSize:Je("H2.fontSize"),fontWeight:Je("H2.fontWeight"),lineHeight:Je("H2.lineHeight"),letterSpacing:Je("H2.letterSpacing")},H3:{fontFamily:Je("H3.fontFamily"),fontSize:Je("H3.fontSize"),fontWeight:Je("H3.fontWeight"),lineHeight:Je("H3.lineHeight"),letterSpacing:Je("H3.letterSpacing")},H4:{fontFamily:Je("H4.fontFamily"),fontSize:Je("H4.fontSize"),fontWeight:Je("H4.fontWeight"),lineHeight:Je("H4.lineHeight"),letterSpacing:Je("H4.letterSpacing")},H5:{fontFamily:Je("H5.fontFamily"),fontSize:Je("H5.fontSize"),fontWeight:Je("H5.fontWeight"),lineHeight:Je("H5.lineHeight"),letterSpacing:Je("H5.letterSpacing")},H6:{fontFamily:Je("H6.fontFamily"),fontSize:Je("H6.fontSize"),fontWeight:Je("H6.fontWeight"),lineHeight:Je("H6.lineHeight"),letterSpacing:Je("H6.letterSpacing")},Body:{fontFamily:Je("Body.fontFamily"),fontSize:Je("Body.fontSize"),fontWeight:Je("Body.fontWeight"),lineHeight:Je("Body.lineHeight"),letterSpacing:Je("Body.letterSpacing")},BodySmall:{fontFamily:Je("BodySmall.fontFamily"),fontSize:Je("BodySmall.fontSize"),fontWeight:Je("BodySmall.fontWeight"),lineHeight:Je("BodySmall.lineHeight"),letterSpacing:Je("BodySmall.letterSpacing")},XSmall:{fontFamily:Je("XSmall.fontFamily"),fontSize:Je("XSmall.fontSize"),fontWeight:Je("XSmall.fontWeight"),lineHeight:Je("XSmall.lineHeight"),letterSpacing:Je("XSmall.letterSpacing")}},Qe=t=>{switch(t){case 700:case"bold":return Ue.Bold;case 600:case"semibold":return Ue.Semibold;case 300:case"light":return Ue.Light;case 400:case"regular":return Ue.Regular;default:return""}},tn=(t,e)=>n=>{const r=Ke[t].fontFamily(n),i=Ke[t].fontWeight(n);return Object.values(Ue).includes(r)?a`
|
|
12
|
+
font-family: ${Qe(e)||Qe(i)||r};
|
|
13
|
+
font-weight: normal !important;
|
|
14
|
+
`:a`
|
|
15
|
+
font-family: ${r};
|
|
16
|
+
font-weight: ${(en(e)||i)??"normal"};
|
|
17
|
+
`},en=t=>{switch(t){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""}},nn=(t,e,n=!1)=>r=>{const i=Ke[t],o=i.fontSize(r);return a`
|
|
18
|
+
${tn(t,e)}
|
|
19
|
+
font-size: ${o}rem !important;
|
|
20
|
+
line-height: ${i.lineHeight}rem !important;
|
|
21
|
+
letter-spacing: ${i.letterSpacing(r)||0}rem !important;
|
|
22
|
+
${a`
|
|
23
|
+
margin-bottom: ${o*(n?1.05:0)}rem;
|
|
24
|
+
`}
|
|
25
|
+
`},rn=(t=!1,e=!1)=>e?a`
|
|
26
|
+
display: block;
|
|
27
|
+
`:t?a`
|
|
28
|
+
display: inline;
|
|
29
|
+
`:a`
|
|
30
|
+
display: block;
|
|
31
|
+
`;var on;!function(t){t.D1=o.h1`
|
|
32
|
+
${t=>a`
|
|
33
|
+
${nn("D1",t.weight,t.paragraph)}
|
|
34
|
+
color: ${Xe[1]};
|
|
35
|
+
${rn(t.inline,t.paragraph)}
|
|
36
|
+
`}
|
|
37
|
+
`,t.D2=o.h1`
|
|
38
|
+
${t=>a`
|
|
39
|
+
${nn("D2",t.weight,t.paragraph)}
|
|
40
|
+
color: ${Xe[1]};
|
|
41
|
+
${rn(t.inline,t.paragraph)}
|
|
42
|
+
`}
|
|
43
|
+
`,t.D3=o.h1`
|
|
44
|
+
${t=>a`
|
|
45
|
+
${nn("D3",t.weight,t.paragraph)}
|
|
46
|
+
color: ${Xe[1]};
|
|
47
|
+
${rn(t.inline,t.paragraph)}
|
|
48
|
+
`}
|
|
49
|
+
`,t.D4=o.h1`
|
|
50
|
+
${t=>a`
|
|
51
|
+
${nn("D4",t.weight,t.paragraph)}
|
|
52
|
+
color: ${Xe[1]};
|
|
53
|
+
${rn(t.inline,t.paragraph)}
|
|
54
|
+
`}
|
|
55
|
+
`,t.DBody=o.h1`
|
|
56
|
+
${t=>a`
|
|
57
|
+
${nn("DBody",t.weight,t.paragraph)}
|
|
58
|
+
color: ${Xe[1]};
|
|
59
|
+
${rn(t.inline,t.paragraph)}
|
|
60
|
+
`}
|
|
61
|
+
`,t.H1=o.h1`
|
|
62
|
+
${t=>a`
|
|
63
|
+
${nn("H1",t.weight,t.paragraph)}
|
|
64
|
+
color: ${Xe[1]};
|
|
65
|
+
${rn(t.inline,t.paragraph)}
|
|
66
|
+
`}
|
|
67
|
+
`,t.H2=o.h2`
|
|
68
|
+
${t=>a`
|
|
69
|
+
${nn("H2",t.weight,t.paragraph)}
|
|
70
|
+
color: ${Xe[1]};
|
|
71
|
+
${rn(t.inline,t.paragraph)}
|
|
72
|
+
`}
|
|
73
|
+
`,t.H3=o.h3`
|
|
74
|
+
${t=>a`
|
|
75
|
+
${nn("H3",t.weight,t.paragraph)}
|
|
76
|
+
color: ${Xe[1]};
|
|
77
|
+
${rn(t.inline,t.paragraph)}
|
|
78
|
+
`}
|
|
79
|
+
`,t.H4=o.h4`
|
|
80
|
+
${t=>a`
|
|
81
|
+
${nn("H4",t.weight,t.paragraph)}
|
|
82
|
+
color: ${Xe[1]};
|
|
83
|
+
${rn(t.inline,t.paragraph)}
|
|
84
|
+
`}
|
|
85
|
+
`,t.H5=o.h5`
|
|
86
|
+
${t=>a`
|
|
87
|
+
${nn("H5",t.weight,t.paragraph)}
|
|
88
|
+
color: ${Xe[1]};
|
|
89
|
+
${rn(t.inline,t.paragraph)}
|
|
90
|
+
`}
|
|
91
|
+
`,t.H6=o.h6`
|
|
92
|
+
${t=>a`
|
|
93
|
+
${nn("H6",t.weight,t.paragraph)}
|
|
94
|
+
color: ${Xe[1]};
|
|
95
|
+
${rn(t.inline,t.paragraph)}
|
|
96
|
+
`}
|
|
97
|
+
`,t.Body=o.p`
|
|
98
|
+
${t=>a`
|
|
99
|
+
${nn("Body",t.weight,t.paragraph)}
|
|
100
|
+
color: ${Xe[1]};
|
|
101
|
+
${rn(t.inline,t.paragraph)}
|
|
102
|
+
`}
|
|
103
|
+
`,t.BodySmall=o.p`
|
|
104
|
+
${t=>a`
|
|
105
|
+
${nn("BodySmall",t.weight,t.paragraph)}
|
|
106
|
+
color: ${Xe[1]};
|
|
107
|
+
${rn(t.inline,t.paragraph)}
|
|
108
|
+
`}
|
|
109
|
+
`,t.XSmall=o.span`
|
|
110
|
+
${t=>a`
|
|
111
|
+
${nn("XSmall",t.weight,t.paragraph)}
|
|
112
|
+
color: ${Xe[1]};
|
|
113
|
+
${rn(t.inline,t.paragraph)}
|
|
114
|
+
`}
|
|
115
|
+
`,t.Hyperlink={Default:t=>cn({...t,textStyle:"Body"}),Small:t=>cn({...t,textStyle:"BodySmall"})}}(on||(on={}));const an=o.a`
|
|
116
|
+
${t=>a`
|
|
117
|
+
${nn(t.textStyle,t.weight)}
|
|
118
|
+
color: ${Ve};
|
|
119
|
+
text-decoration: none;
|
|
120
|
+
|
|
121
|
+
:hover,
|
|
122
|
+
:active,
|
|
123
|
+
:focus {
|
|
124
|
+
color: ${Ne};
|
|
125
|
+
}
|
|
126
|
+
`}
|
|
127
|
+
`,ln=o((({type:e,...n})=>{switch(e){case"arrow-right":return t(Pe,{...n});case"info":return t(Me,{...n});case"search":return t(Ye,{...n});case"play-alt":return t(Ge,{...n});default:{const r=`sgds-icon sgds-icon-${e}`,i=n.className?`${r} ${n.className}`:r;return t(Ze,{...n,className:i})}}}))`
|
|
128
|
+
margin-left: 0.4rem;
|
|
129
|
+
`,cn=({external:n=!1,children:r,...i})=>e(an,{...i,children:[r,n&&t(ln,{type:"external"})]}),hn={mobileS:320,mobileM:375,mobileL:480,tablet:1199,desktopM:1399,desktopL:1999,desktop4k:3840},pn=t=>Object.keys(hn).reduce(((e,n)=>{const r=hn[n];return e[n]=`@media screen and (${t}: ${r}px)`,e}),{}),sn=pn("max-width"),fn=(pn("min-width"),"all 300ms cubic-bezier(0.21, 0.79, 0.53, 1)"),gn=o.div`
|
|
130
|
+
position: absolute;
|
|
131
|
+
padding: 1rem 2rem;
|
|
132
|
+
border-radius: 4px;
|
|
133
|
+
background: ${Xe[8]};
|
|
134
|
+
box-shadow: 3px 2px 10px 1px rgba(91, 91, 91, 0.2);
|
|
135
|
+
max-width: 30rem;
|
|
136
|
+
${t=>(t=>{switch(t){case"left":return a`
|
|
137
|
+
right: calc(100% + 16px);
|
|
138
|
+
width: max-content;
|
|
139
|
+
margin: auto;
|
|
140
|
+
top: 50%;
|
|
141
|
+
-moz-transform: translateY(-50%);
|
|
142
|
+
-webkit-transform: translateY(-50%);
|
|
143
|
+
transform: translateY(-50%);
|
|
144
|
+
|
|
145
|
+
${sn.mobileL} {
|
|
146
|
+
width: auto;
|
|
147
|
+
}
|
|
148
|
+
`;case"right":return a`
|
|
149
|
+
left: calc(100% + 16px);
|
|
150
|
+
width: max-content;
|
|
151
|
+
margin: auto;
|
|
152
|
+
top: 50%;
|
|
153
|
+
-moz-transform: translateY(-50%);
|
|
154
|
+
-webkit-transform: translateY(-50%);
|
|
155
|
+
transform: translateY(-50%);
|
|
156
|
+
|
|
157
|
+
${sn.mobileL} {
|
|
158
|
+
width: auto;
|
|
159
|
+
}
|
|
160
|
+
`;case"bottom":return a`
|
|
161
|
+
top: calc(100% + 16px);
|
|
162
|
+
width: max-content;
|
|
163
|
+
margin: auto;
|
|
164
|
+
left: 50%;
|
|
165
|
+
-moz-transform: translateX(-50%);
|
|
166
|
+
-webkit-transform: translateX(-50%);
|
|
167
|
+
transform: translateX(-50%);
|
|
168
|
+
|
|
169
|
+
${sn.mobileL} {
|
|
170
|
+
max-width: 80vw;
|
|
171
|
+
}
|
|
172
|
+
`;default:return a`
|
|
173
|
+
bottom: calc(100% + 16px);
|
|
174
|
+
width: max-content;
|
|
175
|
+
margin: auto;
|
|
176
|
+
left: 50%;
|
|
177
|
+
-moz-transform: translateX(-50%);
|
|
178
|
+
-webkit-transform: translateX(-50%);
|
|
179
|
+
transform: translateX(-50%);
|
|
180
|
+
|
|
181
|
+
${sn.mobileL} {
|
|
182
|
+
max-width: 80vw;
|
|
183
|
+
}
|
|
184
|
+
`}})(t.position)}
|
|
185
|
+
${t=>t.visible?a`
|
|
186
|
+
visibility: "visible";
|
|
187
|
+
opacity: 1;
|
|
188
|
+
transition: ${fn};
|
|
189
|
+
z-index: 2;
|
|
190
|
+
`:a`
|
|
191
|
+
visibility: "hidden";
|
|
192
|
+
opacity: 0;
|
|
193
|
+
transition: ${fn};
|
|
194
|
+
z-index: -1;
|
|
195
|
+
`}
|
|
196
|
+
pointer-events: auto;
|
|
197
|
+
`,dn=o.div`
|
|
198
|
+
position: absolute;
|
|
199
|
+
overflow: hidden;
|
|
200
|
+
|
|
201
|
+
${t=>{switch(t.position){case"top":default:return a`
|
|
202
|
+
width: 50%;
|
|
203
|
+
height: 30px;
|
|
204
|
+
top: 100%;
|
|
205
|
+
left: 25%;
|
|
206
|
+
|
|
207
|
+
::before {
|
|
208
|
+
content: "";
|
|
209
|
+
position: absolute;
|
|
210
|
+
background: transparent;
|
|
211
|
+
left: calc(50% - 3px);
|
|
212
|
+
width: 2px;
|
|
213
|
+
height: 8px;
|
|
214
|
+
box-shadow: 3px 2px 14px 3px rgba(91, 91, 91, 0.5);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
::after {
|
|
218
|
+
content: "";
|
|
219
|
+
position: absolute;
|
|
220
|
+
width: 0;
|
|
221
|
+
height: 0;
|
|
222
|
+
top: -10%;
|
|
223
|
+
left: calc(50% - 10px);
|
|
224
|
+
border-style: solid;
|
|
225
|
+
border-width: 16px 8px 0 8px;
|
|
226
|
+
border-color: ${Xe[8]} transparent
|
|
227
|
+
transparent transparent;
|
|
228
|
+
}
|
|
229
|
+
`;case"right":return a`
|
|
230
|
+
width: 30px;
|
|
231
|
+
height: 100%;
|
|
232
|
+
top: 0;
|
|
233
|
+
left: -30px;
|
|
234
|
+
|
|
235
|
+
::before {
|
|
236
|
+
content: "";
|
|
237
|
+
position: absolute;
|
|
238
|
+
background: red;
|
|
239
|
+
right: 0;
|
|
240
|
+
top: calc(50% - 3px);
|
|
241
|
+
width: 8px;
|
|
242
|
+
height: 2px;
|
|
243
|
+
box-shadow: 2px 3px 11px 3px rgba(91, 91, 91, 0.5);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
::after {
|
|
247
|
+
content: "";
|
|
248
|
+
position: absolute;
|
|
249
|
+
width: 0;
|
|
250
|
+
height: 0;
|
|
251
|
+
top: calc(50% - 10px);
|
|
252
|
+
right: -10%;
|
|
253
|
+
border-style: solid;
|
|
254
|
+
border-width: 8px 16px 8px 0;
|
|
255
|
+
border-color: transparent ${Xe[8]}
|
|
256
|
+
transparent transparent;
|
|
257
|
+
}
|
|
258
|
+
`;case"left":return a`
|
|
259
|
+
width: 30px;
|
|
260
|
+
height: 100%;
|
|
261
|
+
top: 0;
|
|
262
|
+
right: -30px;
|
|
263
|
+
|
|
264
|
+
::before {
|
|
265
|
+
content: "";
|
|
266
|
+
position: absolute;
|
|
267
|
+
background: red;
|
|
268
|
+
left: 0;
|
|
269
|
+
top: calc(50% - 3px);
|
|
270
|
+
width: 8px;
|
|
271
|
+
height: 2px;
|
|
272
|
+
box-shadow: 4px 0px 11px 3px rgba(91, 91, 91, 0.5);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
::after {
|
|
276
|
+
content: "";
|
|
277
|
+
position: absolute;
|
|
278
|
+
width: 0;
|
|
279
|
+
height: 0;
|
|
280
|
+
top: calc(50% - 10px);
|
|
281
|
+
left: -10%;
|
|
282
|
+
border-style: solid;
|
|
283
|
+
border-width: 8px 0 8px 16px;
|
|
284
|
+
border-color: transparent transparent transparent
|
|
285
|
+
${Xe[8]};
|
|
286
|
+
}
|
|
287
|
+
`;case"bottom":return a`
|
|
288
|
+
width: 50%;
|
|
289
|
+
height: 30px;
|
|
290
|
+
bottom: 100%;
|
|
291
|
+
left: 25%;
|
|
292
|
+
|
|
293
|
+
::before {
|
|
294
|
+
content: "";
|
|
295
|
+
position: absolute;
|
|
296
|
+
background: transparent;
|
|
297
|
+
left: calc(50% - 3px);
|
|
298
|
+
bottom: -10px;
|
|
299
|
+
width: 2px;
|
|
300
|
+
height: 8px;
|
|
301
|
+
box-shadow: 3px -9px 14px 3px rgba(91, 91, 91, 0.5);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
::after {
|
|
305
|
+
content: "";
|
|
306
|
+
position: absolute;
|
|
307
|
+
width: 0;
|
|
308
|
+
height: 0;
|
|
309
|
+
bottom: -10%;
|
|
310
|
+
left: calc(50% - 10px);
|
|
311
|
+
border-style: solid;
|
|
312
|
+
border-width: 0 8px 16px 8px;
|
|
313
|
+
border-color: transparent transparent
|
|
314
|
+
${Xe[8]} transparent;
|
|
315
|
+
}
|
|
316
|
+
`}}}
|
|
317
|
+
`,un=o.div`
|
|
318
|
+
position: relative;
|
|
319
|
+
`,mn=({visible:o,position:a="top",children:l,...c})=>{const h=c["data-testid"]||"tooltip",[p,s]=n(a),f=r(null);i((()=>(d(),window.addEventListener("resize",M(g,300)),()=>{window.removeEventListener("resize",M(g,300))})),[]);const g=()=>{d()},d=()=>{if(f.current){const t=f.current.getBoundingClientRect();if(t.x<0)switch(a){case"left":case"top":case"bottom":s("right");break;case"right":s("top")}else if(t.x+t.width>window.outerWidth)switch(a){case"right":case"top":case"bottom":s("left");break;case"left":s("top")}else s(a)}};return e(gn,{position:p,"data-testid":h,visible:o,ref:f,...c,children:["string"==typeof l?t(on.BodySmall,{children:l}):l,t(dn,{position:p})]})},yn=(n,r)=>i=>{const{tooltipVisible:o,position:a,...l}=i;return e(un,{children:[t(n,{...l}),t(mn,{visible:o,position:a,children:r.content})]})};export{mn as Tooltip,yn as withTooltip};
|
|
320
|
+
//# sourceMappingURL=index.js.map
|