@lifesg/react-design-system 1.0.0-alpha.3 → 1.0.0-alpha.5
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/accordion/index.css +1 -0
- package/accordion/index.js +70 -73
- package/accordion/index.js.map +1 -1
- package/alert/index.css +1 -0
- package/alert/index.js +48 -51
- package/alert/index.js.map +1 -1
- package/animations/index.css +1 -0
- package/box-container/index.css +1 -0
- package/box-container/index.js +58 -61
- package/box-container/index.js.map +1 -1
- package/breadcrumb/index.css +1 -0
- package/breadcrumb/index.js +52 -55
- package/breadcrumb/index.js.map +1 -1
- package/button/index.css +1 -0
- package/button/index.js +48 -51
- package/button/index.js.map +1 -1
- package/checkbox/index.css +1 -0
- package/checkbox/index.js +5 -8
- package/checkbox/index.js.map +1 -1
- package/cjs/index.css +1 -0
- package/cjs/index.js +676 -82
- package/cjs/index.js.map +1 -1
- package/color/index.css +1 -0
- package/color/index.js.map +1 -1
- package/date-input/index.css +1 -0
- package/date-input/index.js +53 -68
- package/date-input/index.js.map +1 -1
- 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.css +1 -0
- package/footer/index.d.ts +2 -0
- package/footer/index.js +361 -0
- package/footer/index.js.map +1 -0
- package/footer/package.json +7 -0
- package/footer/types.d.ts +31 -0
- package/form/form-label.d.ts +1 -1
- package/form/form-label.style.d.ts +1 -0
- package/form/index.css +1 -0
- package/form/index.d.ts +1 -1
- package/form/index.js +194 -191
- package/form/index.js.map +1 -1
- package/form/types.d.ts +2 -0
- package/icon/cross-icon.d.ts +3 -0
- package/icon/index.css +1 -0
- package/icon/index.js +3 -6
- package/icon/index.js.map +1 -1
- package/icon/play-icon.d.ts +3 -0
- package/icon-button/index.css +1 -0
- package/icon-button/index.js +7 -10
- package/icon-button/index.js.map +1 -1
- package/index.css +1 -0
- package/index.d.ts +5 -0
- package/index.js +677 -83
- package/index.js.map +1 -1
- package/input/index.css +1 -0
- package/input/index.js +15 -3
- package/input/index.js.map +1 -1
- package/input/input.style.d.ts +2 -0
- package/input-group/index.css +1 -0
- package/input-group/index.js +128 -119
- package/input-group/index.js.map +1 -1
- package/input-group/input-group.style.d.ts +1 -0
- package/input-select/index.css +1 -0
- package/input-select/index.js +98 -104
- package/input-select/index.js.map +1 -1
- package/input-textarea/index.css +1 -0
- package/input-textarea/index.js +118 -111
- package/input-textarea/index.js.map +1 -1
- package/input-textarea/textarea-counter.d.ts +2 -1
- 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.css +1 -0
- package/layout/index.d.ts +7 -0
- package/layout/index.js +51 -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.css +1 -0
- package/link-list/index.js +55 -58
- package/link-list/index.js.map +1 -1
- package/masonry/index.css +1 -0
- package/masonry/index.js.map +1 -1
- package/masthead/index.css +1 -0
- package/masthead/index.d.ts +1 -0
- package/masthead/index.js +5 -0
- package/masthead/index.js.map +1 -0
- package/masthead/masthead.d.ts +3 -0
- package/masthead/package.json +7 -0
- package/media/index.css +1 -0
- package/media/index.js +1 -1
- package/media/index.js.map +1 -1
- package/media/media.d.ts +2 -1
- package/modal/index.css +1 -0
- package/modal/index.js +12 -15
- package/modal/index.js.map +1 -1
- 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 +12 -0
- package/navbar/index.css +1 -0
- package/navbar/index.d.ts +6 -0
- package/navbar/index.js +659 -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 +14 -0
- package/navbar/package.json +7 -0
- package/navbar/types.d.ts +56 -0
- package/notification-banner/index.css +1 -0
- package/notification-banner/index.d.ts +3 -0
- package/notification-banner/index.js +262 -0
- package/notification-banner/index.js.map +1 -0
- package/notification-banner/notification-banner-hoc.d.ts +3 -0
- package/notification-banner/notification-banner-label.d.ts +3 -0
- package/notification-banner/notification-banner.d.ts +6 -0
- package/notification-banner/notification-banner.styles.d.ts +12 -0
- package/notification-banner/package.json +7 -0
- package/notification-banner/types.d.ts +22 -0
- package/overlay/index.css +1 -0
- package/package.json +1 -1
- package/popover/index.css +1 -0
- package/popover/index.js +55 -58
- package/popover/index.js.map +1 -1
- package/radio-button/index.css +1 -0
- package/radio-button/index.js.map +1 -1
- package/text/index.css +1 -0
- package/text/index.js +25 -28
- package/text/index.js.map +1 -1
- package/text-list/index.css +1 -0
- package/text-list/index.js.map +1 -1
- package/theme/index.css +1 -0
- package/theme/index.js.map +1 -1
- package/theme/types.d.ts +2 -2
- package/timeline/index.css +1 -0
- package/timeline/index.js +52 -55
- package/timeline/index.js.map +1 -1
- package/timepicker/index.css +1 -0
- package/timepicker/index.js +88 -91
- package/timepicker/index.js.map +1 -1
- package/toggle-button/index.css +1 -0
- package/toggle-button/index.js +110 -113
- package/toggle-button/index.js.map +1 -1
- package/tooltip/index.css +1 -0
- package/tooltip/index.js +51 -54
- package/tooltip/index.js.map +1 -1
- package/transition/index.css +1 -0
- package/icon/play-alt-icon.d.ts +0 -3
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TextLinkProps, TextProps } from "../text/types";
|
|
3
|
+
export interface NotificationBannerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
children?: JSX.Element | JSX.Element[] | string | undefined;
|
|
5
|
+
dismissible?: boolean | undefined;
|
|
6
|
+
visible?: boolean | undefined;
|
|
7
|
+
sticky?: boolean | undefined;
|
|
8
|
+
onDismiss?: () => void | undefined;
|
|
9
|
+
}
|
|
10
|
+
export interface NotificationBannerWithForwardedRefProps extends NotificationBannerProps {
|
|
11
|
+
forwardedRef?: React.Ref<HTMLDivElement> | undefined;
|
|
12
|
+
}
|
|
13
|
+
export declare type ContentType = "text" | "link";
|
|
14
|
+
export interface ContentLinkAttributes extends TextLinkProps {
|
|
15
|
+
}
|
|
16
|
+
export interface ContentTextAttributes extends TextProps {
|
|
17
|
+
}
|
|
18
|
+
export interface NotificationContentAttributes {
|
|
19
|
+
type: ContentType;
|
|
20
|
+
content: string;
|
|
21
|
+
otherAttributes?: TextLinkProps | TextProps | undefined;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--sgds-masthead-font-family:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--sgds-masthead-background-color:hsl(0, 0%, 94%);--sgds-masthead-text-color:hsl(0, 0%, 28%);--sgds-masthead-link-color:hsl(220, 100%, 47%);--sgds-masthead-link-hover-color:hsl(220, 100%, 37%);--sgds-masthead-tablet-padding-x:1.25rem;--sgds-masthead-tablet-font-size:0.75rem;--sgds-masthead-crest-color:rgb(239, 51, 32)}
|
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--sgds-masthead-font-family:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--sgds-masthead-background-color:hsl(0, 0%, 94%);--sgds-masthead-text-color:hsl(0, 0%, 28%);--sgds-masthead-link-color:hsl(220, 100%, 47%);--sgds-masthead-link-hover-color:hsl(220, 100%, 37%);--sgds-masthead-tablet-padding-x:1.25rem;--sgds-masthead-tablet-font-size:0.75rem;--sgds-masthead-crest-color:rgb(239, 51, 32)}
|
package/popover/index.js
CHANGED
|
@@ -34,7 +34,7 @@ var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.pr
|
|
|
34
34
|
\********************************************/e=>{e.exports=Function.call.bind(Object.prototype.hasOwnProperty)},"./node_modules/react-is/cjs/react-is.development.js":
|
|
35
35
|
/*!***********************************************************!*\
|
|
36
36
|
!*** ./node_modules/react-is/cjs/react-is.development.js ***!
|
|
37
|
-
\***********************************************************/(e,t)=>{!function(){var e="function"==typeof Symbol&&Symbol.for,n=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,l=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,s=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:var p=e.type;switch(p){case s:case u:case o:case a:case i:case f:return p;default:var m=p&&p.$$typeof;switch(m){case c:case d:case y:case h:case l:return m;default:return t}}case r:return t}}}var S=s,x=u,$=c,F=l,_=n,O=d,j=o,
|
|
37
|
+
\***********************************************************/(e,t)=>{!function(){var e="function"==typeof Symbol&&Symbol.for,n=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,l=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,s=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:var p=e.type;switch(p){case s:case u:case o:case a:case i:case f:return p;default:var m=p&&p.$$typeof;switch(m){case c:case d:case y:case h:case l:return m;default:return t}}case r:return t}}}var S=s,x=u,$=c,F=l,_=n,O=d,j=o,C=y,H=h,B=r,D=a,k=i,E=f,z=!1;function T(e){return w(e)===u}t.AsyncMode=S,t.ConcurrentMode=x,t.ContextConsumer=$,t.ContextProvider=F,t.Element=_,t.ForwardRef=O,t.Fragment=j,t.Lazy=C,t.Memo=H,t.Portal=B,t.Profiler=D,t.StrictMode=k,t.Suspense=E,t.isAsyncMode=function(e){return z||(z=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),T(e)||w(e)===s},t.isConcurrentMode=T,t.isContextConsumer=function(e){return w(e)===c},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return w(e)===d},t.isFragment=function(e){return w(e)===o},t.isLazy=function(e){return w(e)===y},t.isMemo=function(e){return w(e)===h},t.isPortal=function(e){return w(e)===r},t.isProfiler=function(e){return w(e)===a},t.isStrictMode=function(e){return w(e)===i},t.isSuspense=function(e){return w(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===u||e===a||e===i||e===f||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===h||e.$$typeof===l||e.$$typeof===c||e.$$typeof===d||e.$$typeof===g||e.$$typeof===v||e.$$typeof===b||e.$$typeof===m)},t.typeOf=w}()},"./node_modules/react-is/index.js":
|
|
38
38
|
/*!****************************************!*\
|
|
39
39
|
!*** ./node_modules/react-is/index.js ***!
|
|
40
40
|
\****************************************/(e,t,n)=>{e.exports=n(/*! ./cjs/react-is.development.js */"./node_modules/react-is/cjs/react-is.development.js")},"./node_modules/shallow-equal/dist/index.esm.js":
|
|
@@ -61,7 +61,7 @@ var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.pr
|
|
|
61
61
|
\******************************/function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(/*! react */"react"),i=r(n(/*! matchmediaquery */"./node_modules/matchmediaquery/index.js")),a=r(n(/*! hyphenate-style-name */"./node_modules/hyphenate-style-name/index.js")),l=n(/*! shallow-equal */"./node_modules/shallow-equal/dist/index.esm.js"),c=r(n(/*! ./toQuery */"./src/toQuery.ts")),s=r(n(/*! ./Context */"./src/Context.ts")),u=function(e){if(e)return Object.keys(e).reduce((function(t,n){return t[(0,a.default)(n)]=e[n],t}),{})},d=function(){var e=(0,o.useRef)(!1);return(0,o.useEffect)((function(){e.current=!0}),[]),e.current},f=function(e){var t=function(){return function(e){return e.query||(0,c.default)(e)}(e)},n=(0,o.useState)(t),r=n[0],i=n[1];return(0,o.useEffect)((function(){var e=t();r!==e&&i(e)}),[e]),r};t.default=function(e,t,n){var r=function(e){var t=(0,o.useContext)(s.default),n=function(){return u(e)||u(t)},r=(0,o.useState)(n),i=r[0],a=r[1];return(0,o.useEffect)((function(){var e=n();(0,l.shallowEqualObjects)(i,e)||a(e)}),[e,t]),i}(t),a=f(e);if(!a)throw new Error("Invalid or missing MediaQuery!");var c=function(e,t){var n=function(){return(0,i.default)(e,t||{},!!t)},r=(0,o.useState)(n),a=r[0],l=r[1],c=d();return(0,o.useEffect)((function(){if(c){var e=n();return l(e),function(){e&&e.dispose()}}}),[e,t]),a}(a,r),p=function(e){var t=(0,o.useState)(e.matches),n=t[0],r=t[1];return(0,o.useEffect)((function(){var t=function(e){r(e.matches)};return e.addListener(t),r(e.matches),function(){e.removeListener(t)}}),[e]),n}(c),h=d();return(0,o.useEffect)((function(){h&&n&&n(p)}),[p]),(0,o.useEffect)((function(){return function(){c&&c.dispose()}}),[]),p}},react:
|
|
62
62
|
/*!**************************************************************************************!*\
|
|
63
63
|
!*** external {"commonjs":"react","commonjs2":"react","amd":"react","root":"React"} ***!
|
|
64
|
-
\**************************************************************************************/t=>{t.exports=e}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e].call(i.exports,i,i.exports,r),i.exports}return r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r("./src/index.ts")})(),f.exports=u(r);const p={mobileS:320,mobileM:375,mobileL:480,tablet:1199,desktopM:1399,desktopL:1999,desktop4k:3840};var h=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},y="object"==typeof d&&d&&d.Object===Object&&d,m="object"==typeof self&&self&&self.Object===Object&&self,g=y||m||Function("return this")(),v=g,b=function(){return v.Date.now()},w=/\s/;var S=function(e){for(var t=e.length;t--&&w.test(e.charAt(t)););return t},x=/^\s+/;var $=function(e){return e?e.slice(0,S(e)+1).replace(x,""):e},F=g.Symbol,_=F,O=Object.prototype,j=O.hasOwnProperty,
|
|
64
|
+
\**************************************************************************************/t=>{t.exports=e}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e].call(i.exports,i,i.exports,r),i.exports}return r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r("./src/index.ts")})(),f.exports=u(r);const p={mobileS:320,mobileM:375,mobileL:480,tablet:1199,desktopM:1399,desktopL:1999,desktop4k:3840};var h=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},y="object"==typeof d&&d&&d.Object===Object&&d,m="object"==typeof self&&self&&self.Object===Object&&self,g=y||m||Function("return this")(),v=g,b=function(){return v.Date.now()},w=/\s/;var S=function(e){for(var t=e.length;t--&&w.test(e.charAt(t)););return t},x=/^\s+/;var $=function(e){return e?e.slice(0,S(e)+1).replace(x,""):e},F=g.Symbol,_=F,O=Object.prototype,j=O.hasOwnProperty,C=O.toString,H=_?_.toStringTag:void 0;var B=function(e){var t=j.call(e,H),n=e[H];try{e[H]=void 0;var r=!0}catch(e){}var o=C.call(e);return r&&(t?e[H]=n:delete e[H]),o},D=Object.prototype.toString;var k=B,E=function(e){return D.call(e)},z=F?F.toStringTag:void 0;var T=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":z&&z in Object(e)?k(e):E(e)};var L=T,P=function(e){return null!=e&&"object"==typeof e};var A=function(e){return"symbol"==typeof e||P(e)&&"[object Symbol]"==L(e)},W=$,I=h,M=A,R=/^[-+]0x[0-9a-f]+$/i,N=/^0b[01]+$/i,V=/^0o[0-7]+$/i,q=parseInt;var Q=h,X=b,G=function(e){if("number"==typeof e)return e;if(M(e))return NaN;if(I(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=I(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=W(e);var n=N.test(e);return n||V.test(e)?q(e.slice(2),n?2:8):R.test(e)?NaN:+e},U=Math.max,Y=Math.min;var Z=function(e,t,n){var r,o,i,a,l,c,s=0,u=!1,d=!1,f=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=r,i=o;return r=o=void 0,s=t,a=e.apply(i,n)}function h(e){return s=e,l=setTimeout(m,t),u?p(e):a}function y(e){var n=e-c;return void 0===c||n>=t||n<0||d&&e-s>=i}function m(){var e=X();if(y(e))return g(e);l=setTimeout(m,function(e){var n=t-(e-c);return d?Y(n,i-(e-s)):n}(e))}function g(e){return l=void 0,f&&r?p(e):(r=o=void 0,a)}function v(){var e=X(),n=y(e);if(r=arguments,o=this,c=e,n){if(void 0===l)return h(c);if(d)return clearTimeout(l),l=setTimeout(m,t),p(c)}return void 0===l&&(l=setTimeout(m,t)),a}return t=G(t)||0,Q(n)&&(u=!!n.leading,i=(d="maxWait"in n)?U(G(n.maxWait)||0,t):i,f="trailing"in n?!!n.trailing:f),v.cancel=function(){void 0!==l&&clearTimeout(l),s=0,r=c=o=l=void 0},v.flush=function(){return void 0===l?a:g(X())},v};const J=c.div`
|
|
65
65
|
position: fixed;
|
|
66
66
|
left: 0;
|
|
67
67
|
top: 0;
|
|
@@ -99,7 +99,7 @@ var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.pr
|
|
|
99
99
|
`,e.$disableTransition&&(t+=s`
|
|
100
100
|
transition: none;
|
|
101
101
|
`),t}}
|
|
102
|
-
`,ee=({show:t=!1,rootId:n,onOverlayClick:c,children:s,backgroundOpacity:u,backgroundBlur:d=!0,disableTransition:f=!1,enableOverlayClick:p=!1,zIndex:h,id:y})=>{const[m,g]=o(null),[v,b]=o(),w=i(),S=i(null),x=s&&r.cloneElement(s,{ref:S}),$=y?`lifesg-ds-overlay-root-${y}`:"lifesg-ds-overlay-root";a((()=>{if(t){const e=O();if(F(e),!e){const e=setTimeout((()=>{
|
|
102
|
+
`,ee=({show:t=!1,rootId:n,onOverlayClick:c,children:s,backgroundOpacity:u,backgroundBlur:d=!0,disableTransition:f=!1,enableOverlayClick:p=!1,zIndex:h,id:y})=>{const[m,g]=o(null),[v,b]=o(),w=i(),S=i(null),x=s&&r.cloneElement(s,{ref:S}),$=y?`lifesg-ds-overlay-root-${y}`:"lifesg-ds-overlay-root";a((()=>{if(t){const e=O();if(F(e),!e){const e=setTimeout((()=>{C("add")}),200);return()=>clearTimeout(e)}}else if(!w.current){const e=setTimeout((()=>{C("add")}),200);return()=>clearTimeout(e)}}),[t]),a((()=>{g(_());const e=O();return F(e),e||j(),()=>{C("remove")}}),[]);const F=e=>{w.current=e,b(e)},_=()=>document&&n?document.getElementById(n):document?document.body:null,O=()=>document.body.classList.contains(ne),j=()=>{if(!document.getElementById(te)){const e=document.createElement("style");e.id=te;const t=document.documentElement.clientWidth,n=window.innerWidth-t;e.innerHTML=`\n\t\t\t\t.${ne} {\n\t\t\t\t\toverflow: hidden;\n\t\t\t\t\tpadding-right: ${n}px !important;\n\t\t\t\t\t-ms-overflow-style: none;\n\t\t\t\t\tscrollbar-width: none;\n\t\t\t\t}\n\n\t\t\t\t.${ne}::-webkit-scrollbar {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\t\t\t`,document.body.appendChild(e)}},C=e=>{const t=document.body.classList.contains(ne);"add"!==e||t?"remove"===e&&t&&document.body.classList.remove(ne):document.body.classList.add(ne)},H=e=>{e.preventDefault();const t=S.current?.firstChild;t&&t.contains(e.target)||c&&p&&c()};return m?l.createPortal(e(J,{id:$,"data-testid":$,$show:t,zIndex:h,$stacked:v,children:s&&e(K,{"data-testid":"overlay-wrapper",$show:t,$backgroundOpacity:u||(v?.5:.8),$backgroundBlur:d,$disableTransition:f,$enableOverlayClick:p,onClick:H,children:x})}),m):null},te="lifesg-ds-overlay-stylesheet",ne="lifesg-ds-overlay-open",re=e=>Object.keys(p).reduce(((t,n)=>{const r=p[n];return t[n]=`@media screen and (${e}: ${r}px)`,t}),{}),oe=re("max-width"),ie=(re("min-width"),c.div`
|
|
103
103
|
position: relative;
|
|
104
104
|
display: flex;
|
|
105
105
|
justify-content: center;
|
|
@@ -118,123 +118,120 @@ var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.pr
|
|
|
118
118
|
height: calc(1vh * 100);
|
|
119
119
|
}
|
|
120
120
|
`}
|
|
121
|
-
`),ae=({id:t="modal",show:n,animationFrom:r="bottom",children:i,enableOverlayClick:l=!0,rootComponentId:c,zIndex:s,onOverlayClick:u,...d})=>{const[f,p]=o();a((()=>(p(.01*window.innerHeight),window.addEventListener("resize",h),()=>{window.removeEventListener("resize",h)})),[]);const h=()=>{const e=.01*window.innerHeight;p(e)};return e(ee,{"data-testid":`${t}-overlay`,show:n,enableOverlayClick:l,onOverlayClick:u,id:t,rootId:c,zIndex:s,children:e(ie,{show:n,animationFrom:r,"data-testid":t,verticalHeight:f,...d,children:i})})};var le=Array.isArray,ce=le,se=
|
|
121
|
+
`),ae=({id:t="modal",show:n,animationFrom:r="bottom",children:i,enableOverlayClick:l=!0,rootComponentId:c,zIndex:s,onOverlayClick:u,...d})=>{const[f,p]=o();a((()=>(p(.01*window.innerHeight),window.addEventListener("resize",h),()=>{window.removeEventListener("resize",h)})),[]);const h=()=>{const e=.01*window.innerHeight;p(e)};return e(ee,{"data-testid":`${t}-overlay`,show:n,enableOverlayClick:l,onOverlayClick:u,id:t,rootId:c,zIndex:s,children:e(ie,{show:n,animationFrom:r,"data-testid":t,verticalHeight:f,...d,children:i})})};var le=Array.isArray,ce=le,se=A,ue=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,de=/^\w*$/;var fe=function(e,t){if(ce(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!se(e))||(de.test(e)||!ue.test(e)||null!=t&&e in Object(t))},pe=T,he=h;var ye,me=function(e){if(!he(e))return!1;var t=pe(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},ge=g["__core-js_shared__"],ve=(ye=/[^.]+$/.exec(ge&&ge.keys&&ge.keys.IE_PROTO||""))?"Symbol(src)_1."+ye:"";var be=function(e){return!!ve&&ve in e},we=Function.prototype.toString;var Se=me,xe=be,$e=h,Fe=function(e){if(null!=e){try{return we.call(e)}catch(e){}try{return e+""}catch(e){}}return""},_e=/^\[object .+?Constructor\]$/,Oe=Function.prototype,je=Object.prototype,Ce=Oe.toString,He=je.hasOwnProperty,Be=RegExp("^"+Ce.call(He).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var De=function(e){return!(!$e(e)||xe(e))&&(Se(e)?Be:_e).test(Fe(e))},ke=function(e,t){return null==e?void 0:e[t]};var Ee=function(e,t){var n=ke(e,t);return De(n)?n:void 0},ze=Ee(Object,"create"),Te=ze;var Le=function(){this.__data__=Te?Te(null):{},this.size=0};var Pe=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ae=ze,We=Object.prototype.hasOwnProperty;var Ie=function(e){var t=this.__data__;if(Ae){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return We.call(t,e)?t[e]:void 0},Me=ze,Re=Object.prototype.hasOwnProperty;var Ne=ze;var Ve=Le,qe=Pe,Qe=Ie,Xe=function(e){var t=this.__data__;return Me?void 0!==t[e]:Re.call(t,e)},Ge=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ne&&void 0===t?"__lodash_hash_undefined__":t,this};function Ue(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])}}Ue.prototype.clear=Ve,Ue.prototype.delete=qe,Ue.prototype.get=Qe,Ue.prototype.has=Xe,Ue.prototype.set=Ge;var Ye=Ue;var Ze=function(){this.__data__=[],this.size=0};var Je=function(e,t){return e===t||e!=e&&t!=t};var Ke=function(e,t){for(var n=e.length;n--;)if(Je(e[n][0],t))return n;return-1},et=Ke,tt=Array.prototype.splice;var nt=Ke;var rt=Ke;var ot=Ke;var it=Ze,at=function(e){var t=this.__data__,n=et(t,e);return!(n<0)&&(n==t.length-1?t.pop():tt.call(t,n,1),--this.size,!0)},lt=function(e){var t=this.__data__,n=nt(t,e);return n<0?void 0:t[n][1]},ct=function(e){return rt(this.__data__,e)>-1},st=function(e,t){var n=this.__data__,r=ot(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function ut(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])}}ut.prototype.clear=it,ut.prototype.delete=at,ut.prototype.get=lt,ut.prototype.has=ct,ut.prototype.set=st;var dt=ut,ft=Ee(g,"Map"),pt=Ye,ht=dt,yt=ft;var mt=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var gt=function(e,t){var n=e.__data__;return mt(t)?n["string"==typeof t?"string":"hash"]:n.map},vt=gt;var bt=gt;var wt=gt;var St=gt;var xt=function(){this.size=0,this.__data__={hash:new pt,map:new(yt||ht),string:new pt}},$t=function(e){var t=vt(this,e).delete(e);return this.size-=t?1:0,t},Ft=function(e){return bt(this,e).get(e)},_t=function(e){return wt(this,e).has(e)},Ot=function(e,t){var n=St(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function jt(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])}}jt.prototype.clear=xt,jt.prototype.delete=$t,jt.prototype.get=Ft,jt.prototype.has=_t,jt.prototype.set=Ot;var Ct=jt;function Ht(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Ht.Cache||Ct),n}Ht.Cache=Ct;var Bt=Ht;var Dt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kt=/\\(\\)?/g,Et=function(e){var t=Bt(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(Dt,(function(e,n,r,o){t.push(r?o.replace(kt,"$1"):n||e)})),t}));var zt=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o},Tt=le,Lt=A,Pt=F?F.prototype:void 0,At=Pt?Pt.toString:void 0;var Wt=function e(t){if("string"==typeof t)return t;if(Tt(t))return zt(t,e)+"";if(Lt(t))return At?At.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n},It=Wt;var Mt=le,Rt=fe,Nt=Et,Vt=function(e){return null==e?"":It(e)};var qt=A;var Qt=function(e,t){return Mt(e)?e:Rt(e,t)?[e]:Nt(Vt(e))},Xt=function(e){if("string"==typeof e||qt(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t};var Gt=function(e,t){for(var n=0,r=(t=Qt(t,e)).length;null!=e&&n<r;)e=e[Xt(t[n++])];return n&&n==r?e:void 0};var Ut=function(e,t,n){var r=null==e?void 0:Gt(e,t);return void 0===r?n:r};const Yt=(e,t,n)=>t?Ut(n,t)||Ut(e,t):n||e,Zt=(e,t)=>{const n=t||e.defaultValue;return Ut(e.collections,n)};var Jt;!function(e){e.colorScheme="colorScheme",e.layout="layout",e.textStyleScheme="textStyleScheme"}(Jt||(Jt={}));const Kt={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"},en=e=>t=>{const n=t.theme,r=Zt(Kt,n[Jt.colorScheme]);return n.options&&n.options.color?Yt(r,e,n.options.color):Yt(r,e)},tn=(en("Brand.1"),en("Brand.2"),en("Brand.3"),en("Brand.4"),en("Brand.5"),en("Brand.6"),en("Primary")),nn=(en("PrimaryDark"),en("Secondary")),rn={Light:{1:en("Accent.Light.1"),2:en("Accent.Light.2"),3:en("Accent.Light.3"),4:en("Accent.Light.4"),5:en("Accent.Light.5"),6:en("Accent.Light.6")},Dark:{1:en("Accent.Dark.1"),2:en("Accent.Dark.2"),3:en("Accent.Dark.3")}},on={1:en("Neutral.1"),2:en("Neutral.2"),3:en("Neutral.3"),4:en("Neutral.4"),5:en("Neutral.5"),6:en("Neutral.6"),7:en("Neutral.7"),8:en("Neutral.8")},an=(en("Validation.Green.Text"),en("Validation.Green.Icon"),en("Validation.Green.Border"),en("Validation.Green.Background"),en("Validation.Orange.Text"),en("Validation.Orange.Icon"),en("Validation.Orange.Border"),en("Validation.Orange.Background"),en("Validation.Orange.Badge"),en("Validation.Red.Text"),en("Validation.Red.Icon"),en("Validation.Red.Border"),en("Validation.Red.Background"),c.svg`
|
|
122
122
|
height: 1rem;
|
|
123
123
|
width: 1rem;
|
|
124
124
|
vertical-align: text-top;
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
fill: ${on[8]};
|
|
128
|
-
}
|
|
129
|
-
`),ln=t=>e(an,{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)"})})})})})})}),cn=t=>e(an,{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"})}),sn=t=>e(an,{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"})}),un=t=>e(an,{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"})})}),dn=({type:t,...n})=>{switch(t){case"arrow-right":return e(ln,{...n});case"info":return e(cn,{...n});case"search":return e(un,{...n});case"play-alt":return e(sn,{...n});default:{const r=`sgds-icon sgds-icon-${t}`,o=n.className?`${r} ${n.className}`:r;return e(fn,{...n,className:o})}}},fn=c.span`
|
|
125
|
+
color: ${tn};
|
|
126
|
+
`),ln=t=>e(an,{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 16 16",...t,children:e("path",{fill:"currentColor",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)"})}),cn=t=>e(an,{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:e("path",{fill:"currentColor",d:"M23.8785 5.13337C24.0563 4.95554 24.3408 4.95554 24.5186 5.13337L26.8666 7.48184C27.0444 7.65572 27.0444 7.9442 26.8666 8.11808L19.3082 15.6819C19.1304 15.8558 19.1304 16.1442 19.3082 16.3221L26.8666 23.8819C27.0444 24.0558 27.0444 24.3443 26.8666 24.5182L24.5186 26.8666C24.3408 27.0445 24.0563 27.0445 23.8785 26.8666L16.32 19.3068C16.1422 19.129 15.8578 19.129 15.68 19.3068L8.12148 26.8666C7.94368 27.0445 7.65919 27.0445 7.48139 26.8666L5.13335 24.5182C4.95555 24.3443 4.95555 24.0558 5.13335 23.8819L12.6918 16.3221C12.8696 16.1442 12.8696 15.8558 12.6918 15.6819L5.13335 8.11808C4.95555 7.9442 4.95555 7.65572 5.13335 7.48184L7.48139 5.13337C7.65919 4.95554 7.94368 4.95554 8.12148 5.13337L15.68 12.6932C15.8578 12.871 16.1422 12.871 16.32 12.6932L23.8785 5.13337Z"})}),sn=t=>e(an,{width:"1rem",height:"1rem",viewBox:"0 0 40 40",xmlns:"http://www.w3.org/2000/svg",...t,children:e("path",{fill:"currentColor",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"})}),un=t=>e(an,{xmlns:"http://www.w3.org/2000/svg",width:"2rem",height:"2rem",viewBox:"0 0 64 64",id:"play-icon",...t,children:e("path",{fill:"currentColor",fillRule:"nonzero",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"})}),dn=t=>e(an,{xmlns:"http://www.w3.org/2000/svg",width:"2rem",height:"2rem",viewBox:"0 0 32 32",...t,children:e("path",{id:"path",fill:"currentColor",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"})}),fn=({type:t,...n})=>{switch(t){case"arrow-right":return e(ln,{...n});case"info":return e(sn,{...n});case"cross":return e(cn,{...n});case"play":return e(un,{...n});case"search":return e(dn,{...n});default:{const r=`sgds-icon sgds-icon-${t}`,o=n.className?`${r} ${n.className}`:r;return e(pn,{...n,className:o})}}},pn=c.span`
|
|
130
127
|
font-size: 1rem;
|
|
131
|
-
`,
|
|
132
|
-
font-family: ${
|
|
128
|
+
`,hn={Regular:"Open Sans",Semibold:"Open Sans Semibold",Bold:"Open Sans Bold",Light:"Open Sans Light"},yn={collections:{base:{D1:{fontFamily:hn.Bold,fontSize:3,fontWeight:700,lineHeight:4,letterSpacing:-.056},D2:{fontFamily:hn.Bold,fontSize:2.5,fontWeight:700,lineHeight:3.5,letterSpacing:-.032},D3:{fontFamily:hn.Bold,fontSize:1.625,fontWeight:700,lineHeight:2.25},D4:{fontFamily:hn.Bold,fontSize:1.375,fontWeight:700,lineHeight:1.75},DBody:{fontFamily:hn.Regular,fontSize:1.375,lineHeight:1.75},H1:{fontFamily:hn.Bold,fontSize:2,fontWeight:700,lineHeight:2.5},H2:{fontFamily:hn.Bold,fontSize:1.625,fontWeight:700,lineHeight:2.25},H3:{fontFamily:hn.Bold,fontSize:1.375,fontWeight:700,lineHeight:1.75},H4:{fontFamily:hn.Bold,fontSize:1.125,fontWeight:700,lineHeight:1.625},H5:{fontFamily:hn.Bold,fontSize:1,fontWeight:700,lineHeight:1.5,letterSpacing:.014},H6:{fontFamily:hn.Bold,fontSize:.875,fontWeight:700,lineHeight:1.6,letterSpacing:.012},Body:{fontFamily:hn.Regular,fontSize:1.125,lineHeight:1.625},BodySmall:{fontFamily:hn.Regular,fontSize:1,lineHeight:1.5,letterSpacing:.014},XSmall:{fontFamily:hn.Regular,fontSize:.75,lineHeight:1.2,letterSpacing:.012}}},defaultValue:"base"},mn=e=>t=>{const n=t.theme,r=Zt(yn,n[Jt.textStyleScheme]);return n.options&&n.options.textStyle?Yt(r,e,n.options.textStyle):Yt(r,e)},gn={D1:{fontFamily:mn("D1.fontFamily"),fontSize:mn("D1.fontSize"),fontWeight:mn("D1.fontWeight"),lineHeight:mn("D1.lineHeight"),letterSpacing:mn("D1.letterSpacing")},D2:{fontFamily:mn("D2.fontFamily"),fontSize:mn("D2.fontSize"),fontWeight:mn("D2.fontWeight"),lineHeight:mn("D2.lineHeight"),letterSpacing:mn("D2.letterSpacing")},D3:{fontFamily:mn("D3.fontFamily"),fontSize:mn("D3.fontSize"),fontWeight:mn("D3.fontWeight"),lineHeight:mn("D3.lineHeight"),letterSpacing:mn("D3.letterSpacing")},D4:{fontFamily:mn("D4.fontFamily"),fontSize:mn("D4.fontSize"),fontWeight:mn("D4.fontWeight"),lineHeight:mn("D4.lineHeight"),letterSpacing:mn("D4.letterSpacing")},DBody:{fontFamily:mn("DBody.fontFamily"),fontSize:mn("DBody.fontSize"),fontWeight:mn("DBody.fontWeight"),lineHeight:mn("DBody.lineHeight"),letterSpacing:mn("DBody.letterSpacing")},H1:{fontFamily:mn("H1.fontFamily"),fontSize:mn("H1.fontSize"),fontWeight:mn("H1.fontWeight"),lineHeight:mn("H1.lineHeight"),letterSpacing:mn("H1.letterSpacing")},H2:{fontFamily:mn("H2.fontFamily"),fontSize:mn("H2.fontSize"),fontWeight:mn("H2.fontWeight"),lineHeight:mn("H2.lineHeight"),letterSpacing:mn("H2.letterSpacing")},H3:{fontFamily:mn("H3.fontFamily"),fontSize:mn("H3.fontSize"),fontWeight:mn("H3.fontWeight"),lineHeight:mn("H3.lineHeight"),letterSpacing:mn("H3.letterSpacing")},H4:{fontFamily:mn("H4.fontFamily"),fontSize:mn("H4.fontSize"),fontWeight:mn("H4.fontWeight"),lineHeight:mn("H4.lineHeight"),letterSpacing:mn("H4.letterSpacing")},H5:{fontFamily:mn("H5.fontFamily"),fontSize:mn("H5.fontSize"),fontWeight:mn("H5.fontWeight"),lineHeight:mn("H5.lineHeight"),letterSpacing:mn("H5.letterSpacing")},H6:{fontFamily:mn("H6.fontFamily"),fontSize:mn("H6.fontSize"),fontWeight:mn("H6.fontWeight"),lineHeight:mn("H6.lineHeight"),letterSpacing:mn("H6.letterSpacing")},Body:{fontFamily:mn("Body.fontFamily"),fontSize:mn("Body.fontSize"),fontWeight:mn("Body.fontWeight"),lineHeight:mn("Body.lineHeight"),letterSpacing:mn("Body.letterSpacing")},BodySmall:{fontFamily:mn("BodySmall.fontFamily"),fontSize:mn("BodySmall.fontSize"),fontWeight:mn("BodySmall.fontWeight"),lineHeight:mn("BodySmall.lineHeight"),letterSpacing:mn("BodySmall.letterSpacing")},XSmall:{fontFamily:mn("XSmall.fontFamily"),fontSize:mn("XSmall.fontSize"),fontWeight:mn("XSmall.fontWeight"),lineHeight:mn("XSmall.lineHeight"),letterSpacing:mn("XSmall.letterSpacing")}},vn=e=>{switch(e){case 700:case"bold":return hn.Bold;case 600:case"semibold":return hn.Semibold;case 300:case"light":return hn.Light;case 400:case"regular":return hn.Regular;default:return""}},bn=(e,t)=>n=>{const r=gn[e].fontFamily(n),o=gn[e].fontWeight(n);return Object.values(hn).includes(r)?s`
|
|
129
|
+
font-family: ${vn(t)||vn(o)||r};
|
|
133
130
|
font-weight: normal !important;
|
|
134
131
|
`:s`
|
|
135
132
|
font-family: ${r};
|
|
136
|
-
font-weight: ${(
|
|
137
|
-
`},
|
|
138
|
-
${
|
|
133
|
+
font-weight: ${(wn(t)||o)??"normal"};
|
|
134
|
+
`},wn=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""}},Sn=(e,t,n=!1)=>r=>{const o=gn[e],i=o.fontSize(r);return s`
|
|
135
|
+
${bn(e,t)}
|
|
139
136
|
font-size: ${i}rem !important;
|
|
140
137
|
line-height: ${o.lineHeight}rem !important;
|
|
141
138
|
letter-spacing: ${o.letterSpacing(r)||0}rem !important;
|
|
142
139
|
${s`
|
|
143
140
|
margin-bottom: ${i*(n?1.05:0)}rem;
|
|
144
141
|
`}
|
|
145
|
-
`},
|
|
142
|
+
`},xn=(e=!1,t=!1)=>t?s`
|
|
146
143
|
display: block;
|
|
147
144
|
`:e?s`
|
|
148
145
|
display: inline;
|
|
149
146
|
`:s`
|
|
150
147
|
display: block;
|
|
151
|
-
`;var
|
|
148
|
+
`;var $n;!function(e){e.D1=c.h1`
|
|
152
149
|
${e=>s`
|
|
153
|
-
${
|
|
150
|
+
${Sn("D1",e.weight,e.paragraph)}
|
|
154
151
|
color: ${on[1]};
|
|
155
|
-
${
|
|
152
|
+
${xn(e.inline,e.paragraph)}
|
|
156
153
|
`}
|
|
157
154
|
`,e.D2=c.h1`
|
|
158
155
|
${e=>s`
|
|
159
|
-
${
|
|
156
|
+
${Sn("D2",e.weight,e.paragraph)}
|
|
160
157
|
color: ${on[1]};
|
|
161
|
-
${
|
|
158
|
+
${xn(e.inline,e.paragraph)}
|
|
162
159
|
`}
|
|
163
160
|
`,e.D3=c.h1`
|
|
164
161
|
${e=>s`
|
|
165
|
-
${
|
|
162
|
+
${Sn("D3",e.weight,e.paragraph)}
|
|
166
163
|
color: ${on[1]};
|
|
167
|
-
${
|
|
164
|
+
${xn(e.inline,e.paragraph)}
|
|
168
165
|
`}
|
|
169
166
|
`,e.D4=c.h1`
|
|
170
167
|
${e=>s`
|
|
171
|
-
${
|
|
168
|
+
${Sn("D4",e.weight,e.paragraph)}
|
|
172
169
|
color: ${on[1]};
|
|
173
|
-
${
|
|
170
|
+
${xn(e.inline,e.paragraph)}
|
|
174
171
|
`}
|
|
175
172
|
`,e.DBody=c.h1`
|
|
176
173
|
${e=>s`
|
|
177
|
-
${
|
|
174
|
+
${Sn("DBody",e.weight,e.paragraph)}
|
|
178
175
|
color: ${on[1]};
|
|
179
|
-
${
|
|
176
|
+
${xn(e.inline,e.paragraph)}
|
|
180
177
|
`}
|
|
181
178
|
`,e.H1=c.h1`
|
|
182
179
|
${e=>s`
|
|
183
|
-
${
|
|
180
|
+
${Sn("H1",e.weight,e.paragraph)}
|
|
184
181
|
color: ${on[1]};
|
|
185
|
-
${
|
|
182
|
+
${xn(e.inline,e.paragraph)}
|
|
186
183
|
`}
|
|
187
184
|
`,e.H2=c.h2`
|
|
188
185
|
${e=>s`
|
|
189
|
-
${
|
|
186
|
+
${Sn("H2",e.weight,e.paragraph)}
|
|
190
187
|
color: ${on[1]};
|
|
191
|
-
${
|
|
188
|
+
${xn(e.inline,e.paragraph)}
|
|
192
189
|
`}
|
|
193
190
|
`,e.H3=c.h3`
|
|
194
191
|
${e=>s`
|
|
195
|
-
${
|
|
192
|
+
${Sn("H3",e.weight,e.paragraph)}
|
|
196
193
|
color: ${on[1]};
|
|
197
|
-
${
|
|
194
|
+
${xn(e.inline,e.paragraph)}
|
|
198
195
|
`}
|
|
199
196
|
`,e.H4=c.h4`
|
|
200
197
|
${e=>s`
|
|
201
|
-
${
|
|
198
|
+
${Sn("H4",e.weight,e.paragraph)}
|
|
202
199
|
color: ${on[1]};
|
|
203
|
-
${
|
|
200
|
+
${xn(e.inline,e.paragraph)}
|
|
204
201
|
`}
|
|
205
202
|
`,e.H5=c.h5`
|
|
206
203
|
${e=>s`
|
|
207
|
-
${
|
|
204
|
+
${Sn("H5",e.weight,e.paragraph)}
|
|
208
205
|
color: ${on[1]};
|
|
209
|
-
${
|
|
206
|
+
${xn(e.inline,e.paragraph)}
|
|
210
207
|
`}
|
|
211
208
|
`,e.H6=c.h6`
|
|
212
209
|
${e=>s`
|
|
213
|
-
${
|
|
210
|
+
${Sn("H6",e.weight,e.paragraph)}
|
|
214
211
|
color: ${on[1]};
|
|
215
|
-
${
|
|
212
|
+
${xn(e.inline,e.paragraph)}
|
|
216
213
|
`}
|
|
217
214
|
`,e.Body=c.p`
|
|
218
215
|
${e=>s`
|
|
219
|
-
${
|
|
216
|
+
${Sn("Body",e.weight,e.paragraph)}
|
|
220
217
|
color: ${on[1]};
|
|
221
|
-
${
|
|
218
|
+
${xn(e.inline,e.paragraph)}
|
|
222
219
|
`}
|
|
223
220
|
`,e.BodySmall=c.p`
|
|
224
221
|
${e=>s`
|
|
225
|
-
${
|
|
222
|
+
${Sn("BodySmall",e.weight,e.paragraph)}
|
|
226
223
|
color: ${on[1]};
|
|
227
|
-
${
|
|
224
|
+
${xn(e.inline,e.paragraph)}
|
|
228
225
|
`}
|
|
229
226
|
`,e.XSmall=c.span`
|
|
230
227
|
${e=>s`
|
|
231
|
-
${
|
|
228
|
+
${Sn("XSmall",e.weight,e.paragraph)}
|
|
232
229
|
color: ${on[1]};
|
|
233
|
-
${
|
|
230
|
+
${xn(e.inline,e.paragraph)}
|
|
234
231
|
`}
|
|
235
|
-
`,e.Hyperlink={Default:e=>
|
|
232
|
+
`,e.Hyperlink={Default:e=>On({...e,textStyle:"Body"}),Small:e=>On({...e,textStyle:"BodySmall"})}}($n||($n={}));const Fn=c.a`
|
|
236
233
|
${e=>s`
|
|
237
|
-
${
|
|
234
|
+
${Sn(e.textStyle,e.weight)}
|
|
238
235
|
color: ${tn};
|
|
239
236
|
text-decoration: none;
|
|
240
237
|
|
|
@@ -244,9 +241,9 @@ var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.pr
|
|
|
244
241
|
color: ${nn};
|
|
245
242
|
}
|
|
246
243
|
`}
|
|
247
|
-
`,
|
|
244
|
+
`,_n=c(fn)`
|
|
248
245
|
margin-left: 0.4rem;
|
|
249
|
-
`,
|
|
246
|
+
`,On=({external:n=!1,children:r,...o})=>t(Fn,{...o,children:[r,n&&e(_n,{type:"external"})]}),jn=c.button`
|
|
250
247
|
display: flex;
|
|
251
248
|
justify-content: center;
|
|
252
249
|
align-items: center;
|
|
@@ -264,7 +261,7 @@ var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.pr
|
|
|
264
261
|
outline: none;
|
|
265
262
|
background-color: ${on[7]};
|
|
266
263
|
}
|
|
267
|
-
`,
|
|
264
|
+
`,Cn=r.forwardRef((({children:t,iconType:n,...r},o)=>{let i;if(t)i=t;else{if(!n)return console.error("IconButton - Did not specify a valid children or iconType prop"),null;i=e(fn,{type:n})}return e(jn,{ref:o,...r,children:i})})),Hn=c.div`
|
|
268
265
|
position: relative;
|
|
269
266
|
display: flex;
|
|
270
267
|
flex-direction: column;
|
|
@@ -279,7 +276,7 @@ var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.pr
|
|
|
279
276
|
width: 90%;
|
|
280
277
|
max-height: 70%;
|
|
281
278
|
}
|
|
282
|
-
`,Bn=c(
|
|
279
|
+
`,Bn=c(Cn)`
|
|
283
280
|
position: absolute;
|
|
284
281
|
top: 0;
|
|
285
282
|
right: 0;
|
|
@@ -294,10 +291,10 @@ var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.pr
|
|
|
294
291
|
:focus-visible {
|
|
295
292
|
outline: 4px solid ${rn.Light[1]};
|
|
296
293
|
}
|
|
297
|
-
`,
|
|
294
|
+
`,Dn=c(fn)`
|
|
298
295
|
font-size: 2rem;
|
|
299
296
|
color: ${on[4]};
|
|
300
|
-
`,
|
|
297
|
+
`,kn="all 300ms cubic-bezier(0.21, 0.79, 0.53, 1)",En=c.div`
|
|
301
298
|
border-radius: 8px;
|
|
302
299
|
background: ${on[8]};
|
|
303
300
|
padding: 1rem 2rem;
|
|
@@ -309,12 +306,12 @@ var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.pr
|
|
|
309
306
|
${e=>e.$visible?s`
|
|
310
307
|
visibility: visible;
|
|
311
308
|
opacity: 1;
|
|
312
|
-
transition: ${
|
|
309
|
+
transition: ${kn};
|
|
313
310
|
z-index: 2;
|
|
314
311
|
`:s`
|
|
315
312
|
visibility: hidden;
|
|
316
313
|
opacity: 0;
|
|
317
|
-
transition: ${
|
|
314
|
+
transition: ${kn};
|
|
318
315
|
z-index: -1;
|
|
319
316
|
`}
|
|
320
317
|
${e=>(e=>{switch(e){case"top-center":return s`
|
|
@@ -358,15 +355,15 @@ var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.pr
|
|
|
358
355
|
${oe.mobileL} {
|
|
359
356
|
display: none;
|
|
360
357
|
}
|
|
361
|
-
`,
|
|
358
|
+
`,zn=c((({id:n="modal-box",children:r,onClose:o,showCloseButton:i=!0,...a})=>t(Hn,{"data-testid":n,...a,onClick:e=>{e.stopPropagation()},children:[i&&e(Bn,{type:"button",onClick:o,"data-testid":"close-button",children:e(Dn,{type:"cross"})}),r]})))`
|
|
362
359
|
padding: 3.5rem 1.25rem 2.5rem;
|
|
363
|
-
`,
|
|
360
|
+
`,Tn=c.div`
|
|
364
361
|
position: relative;
|
|
365
362
|
width: fit-content;
|
|
366
|
-
`,
|
|
363
|
+
`,Ln=c.button`
|
|
367
364
|
cursor: pointer;
|
|
368
365
|
background: none;
|
|
369
366
|
border: none;
|
|
370
367
|
padding: 0;
|
|
371
|
-
`,Pn=({children:r,visible:l,onMobileClose:c,...s})=>{const u=s["data-testid"]||"popover",[d,h]=o("none"),y=i(null),m=f.exports.useMediaQuery({maxWidth:p.mobileL}),g=i(d);a((()=>(w(),window.addEventListener("resize",
|
|
368
|
+
`,Pn=({children:r,visible:l,onMobileClose:c,...s})=>{const u=s["data-testid"]||"popover",[d,h]=o("none"),y=i(null),m=f.exports.useMediaQuery({maxWidth:p.mobileL}),g=i(d);a((()=>(w(),window.addEventListener("resize",Z(v,300)),()=>{window.removeEventListener("resize",Z(v,300))})),[]);const v=()=>{w()},b=()=>{c&&c()},w=()=>{const e=S();var t;e&&(t=e,g.current=t,h(t))},S=()=>{if(y.current){const e=y.current.getBoundingClientRect(),t=24,n=e.y<t,r=window.innerWidth-t;return e.x<t?n?"top-left":"left":e.x+e.width>r?n?"top-right":"right":("top-left"===g.current||"left"===g.current)&&e.x-e.width/2>t||("top-right"===g.current||"right"===g.current)&&e.x+2*e.width<r?n?"top-center":"none":void 0}},x=()=>"string"==typeof r?e($n.BodySmall,{children:r}):r;return t(n,{children:[e(En,{ref:y,"data-testid":u,$visible:l,$offset:d,...s,children:x()}),m&&e(ae,{show:l,onOverlayClick:b,children:e(zn,{onClose:b,children:x()})})]})},An=(n,r)=>l=>{const{onPopoverAppear:c,onPopoverDismiss:s,...u}=l,d=r.trigger||"click",h=u,[y,m]=o(!1),g=i(),v=f.exports.useMediaQuery({maxWidth:p.mobileL});a((()=>{if(!v)return document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b)}}),[y]);const b=e=>{g&&!g.current.contains(e.target)&&(y&&m(!1),s&&s())};return t(Tn,{id:"popover-hoc-wrapper",ref:g,children:[e(Ln,{id:`popover-hoc-trigger${r["data-testid"]&&`-${r["data-testid"]}`}`,type:"button",onClick:e=>{e.preventDefault(),("click"===d||v)&&(m(!y),!y&&c&&c(),y&&s&&s())},onMouseEnter:()=>{"hover"!==d||v||m(!0)},onMouseLeave:()=>{"hover"===d&&y&&!v&&m(!1)},"aria-label":"popover-button",children:e(n,{...h})}),e(Pn,{visible:y,id:r.id,"data-testid":r["data-testid"],onMobileClose:()=>{m(!1)},children:r.content})]})};export{Pn as Popover,An as withPopover};
|
|
372
369
|
//# sourceMappingURL=index.js.map
|