stp-ui-kit 0.0.6 → 0.0.8
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/dist/components/Modal/Modal.d.ts +17 -16
- package/dist/components/Modal/Modal.stories.d.ts +7 -0
- package/dist/components/Tooltip/Tooltip.d.ts +14 -0
- package/dist/components/Tooltip/Tooltip.stories.d.ts +10 -0
- package/dist/components/index.d.ts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/stp-ui-kit.cjs.js +21 -11
- package/dist/stp-ui-kit.es.js +810 -647
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/styles/_variables.scss +5 -0
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
export interface ModalAction {
|
|
3
|
+
content: string;
|
|
4
|
+
onAction: () => void;
|
|
5
|
+
}
|
|
2
6
|
export interface ModalProps {
|
|
7
|
+
activator?: ReactNode;
|
|
3
8
|
open: boolean;
|
|
4
9
|
onClose: () => void;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
title: string;
|
|
11
|
+
primaryAction?: ModalAction;
|
|
12
|
+
secondaryActions?: ModalAction[];
|
|
13
|
+
tone?: "default" | "critical" | "warning";
|
|
14
|
+
children: ReactNode;
|
|
10
15
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
children: React.ReactNode;
|
|
16
|
+
interface SectionProps {
|
|
17
|
+
children: ReactNode;
|
|
14
18
|
}
|
|
15
|
-
declare const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Header: typeof Header;
|
|
19
|
-
Content: typeof Content;
|
|
20
|
-
Footer: typeof Footer;
|
|
19
|
+
declare const Section: ({ children }: SectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
interface ModalComponent extends React.FC<ModalProps> {
|
|
21
|
+
Section: typeof Section;
|
|
21
22
|
}
|
|
22
|
-
declare const Modal:
|
|
23
|
+
declare const Modal: ModalComponent;
|
|
23
24
|
export { Modal };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { Modal } from './Modal';
|
|
3
|
+
declare const meta: Meta<typeof Modal>;
|
|
4
|
+
export default meta;
|
|
5
|
+
export declare const Default: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('./Modal').ModalProps>;
|
|
6
|
+
export declare const Critical: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('./Modal').ModalProps>;
|
|
7
|
+
export declare const Warning: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('./Modal').ModalProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface TooltipProps {
|
|
3
|
+
active?: boolean;
|
|
4
|
+
content: ReactNode;
|
|
5
|
+
hoverDelay?: number;
|
|
6
|
+
preferredPosition?: "above" | "below" | "mostSpace" | "cover";
|
|
7
|
+
zIndexOverride?: number;
|
|
8
|
+
persistOnClick?: boolean;
|
|
9
|
+
trigger?: "hover" | "click" | "both";
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
tooltipClassName?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const Tooltip: ({ active: controlledActive, content, hoverDelay, preferredPosition, zIndexOverride, trigger, children, className, tooltipClassName, }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { TooltipProps } from './Tooltip';
|
|
3
|
+
declare const meta: Meta<TooltipProps>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<TooltipProps>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const ClickToShow: Story;
|
|
8
|
+
export declare const BelowPosition: Story;
|
|
9
|
+
export declare const PersistentClick: Story;
|
|
10
|
+
export declare const CoverPosition: Story;
|
|
@@ -10,6 +10,7 @@ import { NavigationItem } from './NavigationItem/NavigationItem';
|
|
|
10
10
|
import { PageHeader } from './PageHeader/PageHeader';
|
|
11
11
|
import { ProgressLine } from './ProgressLine/ProgressLine';
|
|
12
12
|
import { SectionHeader } from './SectionHeader/SectionHeader';
|
|
13
|
+
import { Tooltip } from './Tooltip/Tooltip';
|
|
13
14
|
import { TopBar } from './TopBar/TopBar';
|
|
14
15
|
import { Typography } from './Typography/Typography';
|
|
15
|
-
export { Banner, Button, Collapse, CourseCollapse, Empty, FormItem, IconButton, Modal, NavigationItem, PageHeader, ProgressLine, SectionHeader, TopBar, Typography, };
|
|
16
|
+
export { Banner, Button, Collapse, CourseCollapse, Empty, FormItem, IconButton, Modal, Tooltip, NavigationItem, PageHeader, ProgressLine, SectionHeader, TopBar, Typography, };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { Banner, Button, Collapse, CourseCollapse, Empty, FormItem, IconButton, Modal, NavigationItem, PageHeader, ProgressLine, SectionHeader, TopBar, Typography } from './components';
|
|
2
|
-
|
|
2
|
+
import { Tooltip } from './components/Tooltip/Tooltip';
|
|
3
|
+
export { Banner, Button, Collapse, CourseCollapse, Empty, FormItem, IconButton, Modal, Tooltip, NavigationItem, PageHeader, ProgressLine, SectionHeader, TopBar, Typography, };
|
package/dist/stp-ui-kit.cjs.js
CHANGED
|
@@ -1,50 +1,60 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),C=require("react");var De=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var be={exports:{}};/*!
|
|
2
2
|
Copyright (c) 2018 Jed Watson.
|
|
3
3
|
Licensed under the MIT License (MIT), see
|
|
4
4
|
http://jedwatson.github.io/classnames
|
|
5
|
-
*/(function(e){(function(){var n={}.hasOwnProperty;function a(){for(var c="",f=0;f<arguments.length;f++){var g=arguments[f];g&&(c=d(c,i(g)))}return c}function i(c){if(typeof c=="string"||typeof c=="number")return c;if(typeof c!="object")return"";if(Array.isArray(c))return a.apply(null,c);if(c.toString!==Object.prototype.toString&&!c.toString.toString().includes("[native code]"))return c.toString();var f="";for(var g in c)n.call(c,g)&&c[g]&&(f=d(f,g));return f}function d(c,f){return f?c?c+" "+f:c+f:c}e.exports?(a.default=a,e.exports=a):window.classNames=a})()})(xe);var ze=xe.exports;const j=$e(ze),Ie="_typography_18a99_29",ye={"shadow-0":"_shadow-0_18a99_1","shadow-100":"_shadow-100_18a99_5","shadow-200":"_shadow-200_18a99_9","shadow-300":"_shadow-300_18a99_13","shadow-400":"_shadow-400_18a99_17","shadow-500":"_shadow-500_18a99_21","shadow-600":"_shadow-600_18a99_25",typography:Ie,"heading-xl":"_heading-xl_18a99_34","heading-lg":"_heading-lg_18a99_43","heading-md":"_heading-md_18a99_52","heading-sm":"_heading-sm_18a99_61","heading-xs":"_heading-xs_18a99_70","body-lg":"_body-lg_18a99_79","body-md":"_body-md_18a99_88","body-sm":"_body-sm_18a99_97"},C=({variant:e="body-md",className:n="",children:a})=>{const i=ye[e]||"";return t.jsx("div",{className:j(ye.typography,i,n),children:a})},Le="_container_cgftc_29",Ae="_content_cgftc_40",Be="_title_cgftc_57",qe="_timer_cgftc_68",Te="_timerCell_cgftc_80",He="_timerCount_cgftc_87",Pe="_pattern_cgftc_102",Ee="_button_cgftc_129",q={container:Le,content:Ae,title:Be,timer:qe,timerCell:Te,timerCount:He,pattern:Pe,button:Ee};var we={exports:{}};(function(e,n){(function(a,i){e.exports=i()})(De,function(){var a=1e3,i=6e4,d=36e5,c="millisecond",f="second",g="minute",$="hour",m="day",M="week",b="month",Y="quarter",O="year",I="date",ee="Invalid Date",A=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,te=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,Se={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(_){var o=["th","st","nd","rd"],s=_%100;return"["+_+(o[(s-20)%10]||o[s]||o[0])+"]"}},le=function(_,o,s){var l=String(_);return!l||l.length>=o?_:""+Array(o+1-l.length).join(s)+_},Oe={s:le,z:function(_){var o=-_.utcOffset(),s=Math.abs(o),l=Math.floor(s/60),r=s%60;return(o<=0?"+":"-")+le(l,2,"0")+":"+le(r,2,"0")},m:function _(o,s){if(o.date()<s.date())return-_(s,o);var l=12*(s.year()-o.year())+(s.month()-o.month()),r=o.clone().add(l,b),u=s-r<0,h=o.clone().add(l+(u?-1:1),b);return+(-(l+(s-r)/(u?r-h:h-r))||0)},a:function(_){return _<0?Math.ceil(_)||0:Math.floor(_)},p:function(_){return{M:b,y:O,w:M,d:m,D:I,h:$,m:g,s:f,ms:c,Q:Y}[_]||String(_||"").toLowerCase().replace(/s$/,"")},u:function(_){return _===void 0}},V="en",P={};P[V]=Se;var ge="$isDayjsObject",de=function(_){return _ instanceof se||!(!_||!_[ge])},ne=function _(o,s,l){var r;if(!o)return V;if(typeof o=="string"){var u=o.toLowerCase();P[u]&&(r=u),s&&(P[u]=s,r=u);var h=o.split("-");if(!r&&h.length>1)return _(h[0])}else{var y=o.name;P[y]=o,r=y}return!l&&r&&(V=r),r||!l&&V},x=function(_,o){if(de(_))return _.clone();var s=typeof o=="object"?o:{};return s.date=_,s.args=arguments,new se(s)},p=Oe;p.l=ne,p.i=de,p.w=function(_,o){return x(_,{locale:o.$L,utc:o.$u,x:o.$x,$offset:o.$offset})};var se=function(){function _(s){this.$L=ne(s.locale,null,!0),this.parse(s),this.$x=this.$x||s.x||{},this[ge]=!0}var o=_.prototype;return o.parse=function(s){this.$d=function(l){var r=l.date,u=l.utc;if(r===null)return new Date(NaN);if(p.u(r))return new Date;if(r instanceof Date)return new Date(r);if(typeof r=="string"&&!/Z$/i.test(r)){var h=r.match(A);if(h){var y=h[2]-1||0,v=(h[7]||"0").substring(0,3);return u?new Date(Date.UTC(h[1],y,h[3]||1,h[4]||0,h[5]||0,h[6]||0,v)):new Date(h[1],y,h[3]||1,h[4]||0,h[5]||0,h[6]||0,v)}}return new Date(r)}(s),this.init()},o.init=function(){var s=this.$d;this.$y=s.getFullYear(),this.$M=s.getMonth(),this.$D=s.getDate(),this.$W=s.getDay(),this.$H=s.getHours(),this.$m=s.getMinutes(),this.$s=s.getSeconds(),this.$ms=s.getMilliseconds()},o.$utils=function(){return p},o.isValid=function(){return this.$d.toString()!==ee},o.isSame=function(s,l){var r=x(s);return this.startOf(l)<=r&&r<=this.endOf(l)},o.isAfter=function(s,l){return x(s)<this.startOf(l)},o.isBefore=function(s,l){return this.endOf(l)<x(s)},o.$g=function(s,l,r){return p.u(s)?this[l]:this.set(r,s)},o.unix=function(){return Math.floor(this.valueOf()/1e3)},o.valueOf=function(){return this.$d.getTime()},o.startOf=function(s,l){var r=this,u=!!p.u(l)||l,h=p.p(s),y=function(F,k){var B=p.w(r.$u?Date.UTC(r.$y,k,F):new Date(r.$y,k,F),r);return u?B:B.endOf(m)},v=function(F,k){return p.w(r.toDate()[F].apply(r.toDate("s"),(u?[0,0,0,0]:[23,59,59,999]).slice(k)),r)},w=this.$W,N=this.$M,D=this.$D,W="set"+(this.$u?"UTC":"");switch(h){case O:return u?y(1,0):y(31,11);case b:return u?y(1,N):y(0,N+1);case M:var E=this.$locale().weekStart||0,G=(w<E?w+7:w)-E;return y(u?D-G:D+(6-G),N);case m:case I:return v(W+"Hours",0);case $:return v(W+"Minutes",1);case g:return v(W+"Seconds",2);case f:return v(W+"Milliseconds",3);default:return this.clone()}},o.endOf=function(s){return this.startOf(s,!1)},o.$set=function(s,l){var r,u=p.p(s),h="set"+(this.$u?"UTC":""),y=(r={},r[m]=h+"Date",r[I]=h+"Date",r[b]=h+"Month",r[O]=h+"FullYear",r[$]=h+"Hours",r[g]=h+"Minutes",r[f]=h+"Seconds",r[c]=h+"Milliseconds",r)[u],v=u===m?this.$D+(l-this.$W):l;if(u===b||u===O){var w=this.clone().set(I,1);w.$d[y](v),w.init(),this.$d=w.set(I,Math.min(this.$D,w.daysInMonth())).$d}else y&&this.$d[y](v);return this.init(),this},o.set=function(s,l){return this.clone().$set(s,l)},o.get=function(s){return this[p.p(s)]()},o.add=function(s,l){var r,u=this;s=Number(s);var h=p.p(l),y=function(N){var D=x(u);return p.w(D.date(D.date()+Math.round(N*s)),u)};if(h===b)return this.set(b,this.$M+s);if(h===O)return this.set(O,this.$y+s);if(h===m)return y(1);if(h===M)return y(7);var v=(r={},r[g]=i,r[$]=d,r[f]=a,r)[h]||1,w=this.$d.getTime()+s*v;return p.w(w,this)},o.subtract=function(s,l){return this.add(-1*s,l)},o.format=function(s){var l=this,r=this.$locale();if(!this.isValid())return r.invalidDate||ee;var u=s||"YYYY-MM-DDTHH:mm:ssZ",h=p.z(this),y=this.$H,v=this.$m,w=this.$M,N=r.weekdays,D=r.months,W=r.meridiem,E=function(k,B,K,ae){return k&&(k[B]||k(l,u))||K[B].slice(0,ae)},G=function(k){return p.s(y%12||12,k,"0")},F=W||function(k,B,K){var ae=k<12?"AM":"PM";return K?ae.toLowerCase():ae};return u.replace(te,function(k,B){return B||function(K){switch(K){case"YY":return String(l.$y).slice(-2);case"YYYY":return p.s(l.$y,4,"0");case"M":return w+1;case"MM":return p.s(w+1,2,"0");case"MMM":return E(r.monthsShort,w,D,3);case"MMMM":return E(D,w);case"D":return l.$D;case"DD":return p.s(l.$D,2,"0");case"d":return String(l.$W);case"dd":return E(r.weekdaysMin,l.$W,N,2);case"ddd":return E(r.weekdaysShort,l.$W,N,3);case"dddd":return N[l.$W];case"H":return String(y);case"HH":return p.s(y,2,"0");case"h":return G(1);case"hh":return G(2);case"a":return F(y,v,!0);case"A":return F(y,v,!1);case"m":return String(v);case"mm":return p.s(v,2,"0");case"s":return String(l.$s);case"ss":return p.s(l.$s,2,"0");case"SSS":return p.s(l.$ms,3,"0");case"Z":return h}return null}(k)||h.replace(":","")})},o.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},o.diff=function(s,l,r){var u,h=this,y=p.p(l),v=x(s),w=(v.utcOffset()-this.utcOffset())*i,N=this-v,D=function(){return p.m(h,v)};switch(y){case O:u=D()/12;break;case b:u=D();break;case Y:u=D()/3;break;case M:u=(N-w)/6048e5;break;case m:u=(N-w)/864e5;break;case $:u=N/d;break;case g:u=N/i;break;case f:u=N/a;break;default:u=N}return r?u:p.a(u)},o.daysInMonth=function(){return this.endOf(b).$D},o.$locale=function(){return P[this.$L]},o.locale=function(s,l){if(!s)return this.$L;var r=this.clone(),u=ne(s,l,!0);return u&&(r.$L=u),r},o.clone=function(){return p.w(this.$d,this)},o.toDate=function(){return new Date(this.valueOf())},o.toJSON=function(){return this.isValid()?this.toISOString():null},o.toISOString=function(){return this.$d.toISOString()},o.toString=function(){return this.$d.toUTCString()},_}(),pe=se.prototype;return x.prototype=pe,[["$ms",c],["$s",f],["$m",g],["$H",$],["$W",m],["$M",b],["$y",O],["$D",I]].forEach(function(_){pe[_[1]]=function(o){return this.$g(o,_[0],_[1])}}),x.extend=function(_,o){return _.$i||(_(o,se,x),_.$i=!0),x},x.locale=ne,x.isDayjs=de,x.unix=function(_){return x(1e3*_)},x.en=P[V],x.Ls=P,x.p={},x})})(we);var Fe=we.exports;const Ye=$e(Fe),We=e=>{const n=Ye(e),a=n.date(),i=a===1||a===21||a===31?"st":a===2||a===22?"nd":a===3||a===23?"rd":"th";return`${n.format("MMMM D, HH:mm").replace(a.toString(),`${a}${i}`)} (UTC +5)`},Ue=({color:e,title:n,bgPattern:a,deadline:i,bgPatternFinished:d,buttonColor:c,onClick:f})=>{const[g,$]=S.useState(!1),[m,M]=S.useState({days:0,hours:0,minutes:0,seconds:0});S.useEffect(()=>{const Y=new Date(i),O=A=>({days:Math.floor(A/(1e3*60*60*24)),hours:Math.floor(A/(1e3*60*60)%24),minutes:Math.floor(A/(1e3*60)%60),seconds:Math.floor(A/1e3%60)}),I=()=>{const A=Date.now(),te=Y.getTime()-A;te<=0?($(!0),M({days:0,hours:0,minutes:0,seconds:0})):M(O(te))};I();const ee=setInterval(I,1e3);return()=>clearInterval(ee)},[i]);const b=(Y,O)=>t.jsxs("div",{className:q.timerCell,children:[t.jsx(C,{variant:"heading-lg",className:q.timerCount,children:Y}),O]});return t.jsxs("div",{className:q.container,style:{backgroundColor:e},children:[t.jsxs("div",{className:q.content,children:[t.jsxs("div",{className:q.title,children:[t.jsx(C,{variant:"heading-md",children:n}),t.jsx(C,{variant:"body-md",children:We(i)})]}),t.jsxs("div",{className:q.timer,children:[b(m.days,"Days"),b(m.hours,"Hours"),b(m.minutes,"Minutes"),b(m.seconds,"Seconds")]})]}),t.jsx("div",{className:q.pattern,style:{"--pattern-color":e,"--pattern-url":`url(${g?d??a:a})`},children:g&&t.jsx("button",{className:q.button,style:{backgroundColor:c},onClick:f,children:t.jsx(C,{variant:"heading-md",children:"Start"})})})]})},Ze="_btn_12gio_29",Je="_small_12gio_44",Ve="_medium_12gio_47",Ge="_large_12gio_50",Ke="_primary_12gio_71",Qe="_tertiary_12gio_87",Xe="_plain_12gio_102",re={"shadow-0":"_shadow-0_12gio_1","shadow-100":"_shadow-100_12gio_5","shadow-200":"_shadow-200_12gio_9","shadow-300":"_shadow-300_12gio_13","shadow-400":"_shadow-400_12gio_17","shadow-500":"_shadow-500_12gio_21","shadow-600":"_shadow-600_12gio_25",btn:Ze,small:Je,medium:Ve,large:Ge,default:"_default_12gio_53","default-selected":"_default-selected_12gio_64",primary:Ke,"primary-selected":"_primary-selected_12gio_81",tertiary:Qe,"tertiary-selected":"_tertiary-selected_12gio_96",plain:Xe,"plain-selected":"_plain-selected_12gio_113"},me=({state:e="default",size:n="medium",selected:a=!1,disabled:i=!1,children:d,onClick:c=()=>{},className:f="",...g})=>{const $=j(re.btn,re[e],re[n],{[re[`${e}-selected`]]:a},f);return t.jsx("button",{className:$,onClick:c,disabled:i,...g,children:d})};/**
|
|
5
|
+
*/(function(e){(function(){var n={}.hasOwnProperty;function s(){for(var i="",p=0;p<arguments.length;p++){var f=arguments[p];f&&(i=d(i,c(f)))}return i}function c(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return s.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var p="";for(var f in i)n.call(i,f)&&i[f]&&(p=d(p,f));return p}function d(i,p){return p?i?i+" "+p:i+p:i}e.exports?(s.default=s,e.exports=s):window.classNames=s})()})(be);var Ie=be.exports;const b=xe(Ie),Ae="_typography_18a99_29",ve={"shadow-0":"_shadow-0_18a99_1","shadow-100":"_shadow-100_18a99_5","shadow-200":"_shadow-200_18a99_9","shadow-300":"_shadow-300_18a99_13","shadow-400":"_shadow-400_18a99_17","shadow-500":"_shadow-500_18a99_21","shadow-600":"_shadow-600_18a99_25",typography:Ae,"heading-xl":"_heading-xl_18a99_34","heading-lg":"_heading-lg_18a99_43","heading-md":"_heading-md_18a99_52","heading-sm":"_heading-sm_18a99_61","heading-xs":"_heading-xs_18a99_70","body-lg":"_body-lg_18a99_79","body-md":"_body-md_18a99_88","body-sm":"_body-sm_18a99_97"},z=({variant:e="body-md",className:n="",children:s})=>{const c=ve[e]||"";return t.jsx("div",{className:b(ve.typography,c,n),children:s})},Be="_container_cgftc_29",Te="_content_cgftc_40",Le="_title_cgftc_57",qe="_timer_cgftc_68",He="_timerCell_cgftc_80",Ee="_timerCount_cgftc_87",Pe="_pattern_cgftc_102",We="_button_cgftc_129",W={container:Be,content:Te,title:Le,timer:qe,timerCell:He,timerCount:Ee,pattern:Pe,button:We};var je={exports:{}};(function(e,n){(function(s,c){e.exports=c()})(De,function(){var s=1e3,c=6e4,d=36e5,i="millisecond",p="second",f="minute",y="hour",m="day",v="week",N="month",A="quarter",j="year",S="date",T="Invalid Date",B=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,Y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,he={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(_){var r=["th","st","nd","rd"],o=_%100;return"["+_+(r[(o-20)%10]||r[o]||r[0])+"]"}},K=function(_,r,o){var l=String(_);return!l||l.length>=r?_:""+Array(r+1-l.length).join(o)+_},me={s:K,z:function(_){var r=-_.utcOffset(),o=Math.abs(r),l=Math.floor(o/60),a=o%60;return(r<=0?"+":"-")+K(l,2,"0")+":"+K(a,2,"0")},m:function _(r,o){if(r.date()<o.date())return-_(o,r);var l=12*(o.year()-r.year())+(o.month()-r.month()),a=r.clone().add(l,N),u=o-a<0,h=r.clone().add(l+(u?-1:1),N);return+(-(l+(o-a)/(u?a-h:h-a))||0)},a:function(_){return _<0?Math.ceil(_)||0:Math.floor(_)},p:function(_){return{M:N,y:j,w:v,d:m,D:S,h:y,m:f,s:p,ms:i,Q:A}[_]||String(_||"").toLowerCase().replace(/s$/,"")},u:function(_){return _===void 0}},Z="en",q={};q[Z]=he;var ce="$isDayjsObject",ne=function(_){return _ instanceof E||!(!_||!_[ce])},Q=function _(r,o,l){var a;if(!r)return Z;if(typeof r=="string"){var u=r.toLowerCase();q[u]&&(a=u),o&&(q[u]=o,a=u);var h=r.split("-");if(!a&&h.length>1)return _(h[0])}else{var w=r.name;q[w]=r,a=w}return!l&&a&&(Z=a),a||!l&&Z},x=function(_,r){if(ne(_))return _.clone();var o=typeof r=="object"?r:{};return o.date=_,o.args=arguments,new E(o)},g=me;g.l=Q,g.i=ne,g.w=function(_,r){return x(_,{locale:r.$L,utc:r.$u,x:r.$x,$offset:r.$offset})};var E=function(){function _(o){this.$L=Q(o.locale,null,!0),this.parse(o),this.$x=this.$x||o.x||{},this[ce]=!0}var r=_.prototype;return r.parse=function(o){this.$d=function(l){var a=l.date,u=l.utc;if(a===null)return new Date(NaN);if(g.u(a))return new Date;if(a instanceof Date)return new Date(a);if(typeof a=="string"&&!/Z$/i.test(a)){var h=a.match(B);if(h){var w=h[2]-1||0,$=(h[7]||"0").substring(0,3);return u?new Date(Date.UTC(h[1],w,h[3]||1,h[4]||0,h[5]||0,h[6]||0,$)):new Date(h[1],w,h[3]||1,h[4]||0,h[5]||0,h[6]||0,$)}}return new Date(a)}(o),this.init()},r.init=function(){var o=this.$d;this.$y=o.getFullYear(),this.$M=o.getMonth(),this.$D=o.getDate(),this.$W=o.getDay(),this.$H=o.getHours(),this.$m=o.getMinutes(),this.$s=o.getSeconds(),this.$ms=o.getMilliseconds()},r.$utils=function(){return g},r.isValid=function(){return this.$d.toString()!==T},r.isSame=function(o,l){var a=x(o);return this.startOf(l)<=a&&a<=this.endOf(l)},r.isAfter=function(o,l){return x(o)<this.startOf(l)},r.isBefore=function(o,l){return this.endOf(l)<x(o)},r.$g=function(o,l,a){return g.u(o)?this[l]:this.set(a,o)},r.unix=function(){return Math.floor(this.valueOf()/1e3)},r.valueOf=function(){return this.$d.getTime()},r.startOf=function(o,l){var a=this,u=!!g.u(l)||l,h=g.p(o),w=function(J,O){var P=g.w(a.$u?Date.UTC(a.$y,O,J):new Date(a.$y,O,J),a);return u?P:P.endOf(m)},$=function(J,O){return g.w(a.toDate()[J].apply(a.toDate("s"),(u?[0,0,0,0]:[23,59,59,999]).slice(O)),a)},M=this.$W,k=this.$M,D=this.$D,R="set"+(this.$u?"UTC":"");switch(h){case j:return u?w(1,0):w(31,11);case N:return u?w(1,k):w(0,k+1);case v:var V=this.$locale().weekStart||0,se=(M<V?M+7:M)-V;return w(u?D-se:D+(6-se),k);case m:case S:return $(R+"Hours",0);case y:return $(R+"Minutes",1);case f:return $(R+"Seconds",2);case p:return $(R+"Milliseconds",3);default:return this.clone()}},r.endOf=function(o){return this.startOf(o,!1)},r.$set=function(o,l){var a,u=g.p(o),h="set"+(this.$u?"UTC":""),w=(a={},a[m]=h+"Date",a[S]=h+"Date",a[N]=h+"Month",a[j]=h+"FullYear",a[y]=h+"Hours",a[f]=h+"Minutes",a[p]=h+"Seconds",a[i]=h+"Milliseconds",a)[u],$=u===m?this.$D+(l-this.$W):l;if(u===N||u===j){var M=this.clone().set(S,1);M.$d[w]($),M.init(),this.$d=M.set(S,Math.min(this.$D,M.daysInMonth())).$d}else w&&this.$d[w]($);return this.init(),this},r.set=function(o,l){return this.clone().$set(o,l)},r.get=function(o){return this[g.p(o)]()},r.add=function(o,l){var a,u=this;o=Number(o);var h=g.p(l),w=function(k){var D=x(u);return g.w(D.date(D.date()+Math.round(k*o)),u)};if(h===N)return this.set(N,this.$M+o);if(h===j)return this.set(j,this.$y+o);if(h===m)return w(1);if(h===v)return w(7);var $=(a={},a[f]=c,a[y]=d,a[p]=s,a)[h]||1,M=this.$d.getTime()+o*$;return g.w(M,this)},r.subtract=function(o,l){return this.add(-1*o,l)},r.format=function(o){var l=this,a=this.$locale();if(!this.isValid())return a.invalidDate||T;var u=o||"YYYY-MM-DDTHH:mm:ssZ",h=g.z(this),w=this.$H,$=this.$m,M=this.$M,k=a.weekdays,D=a.months,R=a.meridiem,V=function(O,P,oe,le){return O&&(O[P]||O(l,u))||oe[P].slice(0,le)},se=function(O){return g.s(w%12||12,O,"0")},J=R||function(O,P,oe){var le=O<12?"AM":"PM";return oe?le.toLowerCase():le};return u.replace(Y,function(O,P){return P||function(oe){switch(oe){case"YY":return String(l.$y).slice(-2);case"YYYY":return g.s(l.$y,4,"0");case"M":return M+1;case"MM":return g.s(M+1,2,"0");case"MMM":return V(a.monthsShort,M,D,3);case"MMMM":return V(D,M);case"D":return l.$D;case"DD":return g.s(l.$D,2,"0");case"d":return String(l.$W);case"dd":return V(a.weekdaysMin,l.$W,k,2);case"ddd":return V(a.weekdaysShort,l.$W,k,3);case"dddd":return k[l.$W];case"H":return String(w);case"HH":return g.s(w,2,"0");case"h":return se(1);case"hh":return se(2);case"a":return J(w,$,!0);case"A":return J(w,$,!1);case"m":return String($);case"mm":return g.s($,2,"0");case"s":return String(l.$s);case"ss":return g.s(l.$s,2,"0");case"SSS":return g.s(l.$ms,3,"0");case"Z":return h}return null}(O)||h.replace(":","")})},r.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},r.diff=function(o,l,a){var u,h=this,w=g.p(l),$=x(o),M=($.utcOffset()-this.utcOffset())*c,k=this-$,D=function(){return g.m(h,$)};switch(w){case j:u=D()/12;break;case N:u=D();break;case A:u=D()/3;break;case v:u=(k-M)/6048e5;break;case m:u=(k-M)/864e5;break;case y:u=k/d;break;case f:u=k/c;break;case p:u=k/s;break;default:u=k}return a?u:g.a(u)},r.daysInMonth=function(){return this.endOf(N).$D},r.$locale=function(){return q[this.$L]},r.locale=function(o,l){if(!o)return this.$L;var a=this.clone(),u=Q(o,l,!0);return u&&(a.$L=u),a},r.clone=function(){return g.w(this.$d,this)},r.toDate=function(){return new Date(this.valueOf())},r.toJSON=function(){return this.isValid()?this.toISOString():null},r.toISOString=function(){return this.$d.toISOString()},r.toString=function(){return this.$d.toUTCString()},_}(),X=E.prototype;return x.prototype=X,[["$ms",i],["$s",p],["$m",f],["$H",y],["$W",m],["$M",N],["$y",j],["$D",S]].forEach(function(_){X[_[1]]=function(r){return this.$g(r,_[0],_[1])}}),x.extend=function(_,r){return _.$i||(_(r,E,x),_.$i=!0),x},x.locale=Q,x.isDayjs=ne,x.unix=function(_){return x(1e3*_)},x.en=q[Z],x.Ls=q,x.p={},x})})(je);var Fe=je.exports;const Ue=xe(Fe),Ye=e=>{const n=Ue(e),s=n.date(),c=s===1||s===21||s===31?"st":s===2||s===22?"nd":s===3||s===23?"rd":"th";return`${n.format("MMMM D, HH:mm").replace(s.toString(),`${s}${c}`)} (UTC +5)`},Ze=({color:e,title:n,bgPattern:s,deadline:c,bgPatternFinished:d,buttonColor:i,onClick:p})=>{const[f,y]=C.useState(!1),[m,v]=C.useState({days:0,hours:0,minutes:0,seconds:0});C.useEffect(()=>{const A=new Date(c),j=B=>({days:Math.floor(B/(1e3*60*60*24)),hours:Math.floor(B/(1e3*60*60)%24),minutes:Math.floor(B/(1e3*60)%60),seconds:Math.floor(B/1e3%60)}),S=()=>{const B=Date.now(),Y=A.getTime()-B;Y<=0?(y(!0),v({days:0,hours:0,minutes:0,seconds:0})):v(j(Y))};S();const T=setInterval(S,1e3);return()=>clearInterval(T)},[c]);const N=(A,j)=>t.jsxs("div",{className:W.timerCell,children:[t.jsx(z,{variant:"heading-lg",className:W.timerCount,children:A}),j]});return t.jsxs("div",{className:W.container,style:{backgroundColor:e},children:[t.jsxs("div",{className:W.content,children:[t.jsxs("div",{className:W.title,children:[t.jsx(z,{variant:"heading-md",children:n}),t.jsx(z,{variant:"body-md",children:Ye(c)})]}),t.jsxs("div",{className:W.timer,children:[N(m.days,"Days"),N(m.hours,"Hours"),N(m.minutes,"Minutes"),N(m.seconds,"Seconds")]})]}),t.jsx("div",{className:W.pattern,style:{"--pattern-color":e,"--pattern-url":`url(${f?d??s:s})`},children:f&&t.jsx("button",{className:W.button,style:{backgroundColor:i},onClick:p,children:t.jsx(z,{variant:"heading-md",children:"Start"})})})]})},Ve="_btn_12gio_29",Je="_small_12gio_44",Ge="_medium_12gio_47",Ke="_large_12gio_50",Qe="_primary_12gio_71",Xe="_tertiary_12gio_87",Re="_plain_12gio_102",de={"shadow-0":"_shadow-0_12gio_1","shadow-100":"_shadow-100_12gio_5","shadow-200":"_shadow-200_12gio_9","shadow-300":"_shadow-300_12gio_13","shadow-400":"_shadow-400_12gio_17","shadow-500":"_shadow-500_12gio_21","shadow-600":"_shadow-600_12gio_25",btn:Ve,small:Je,medium:Ge,large:Ke,default:"_default_12gio_53","default-selected":"_default-selected_12gio_64",primary:Qe,"primary-selected":"_primary-selected_12gio_81",tertiary:Xe,"tertiary-selected":"_tertiary-selected_12gio_96",plain:Re,"plain-selected":"_plain-selected_12gio_113"},re=({state:e="default",size:n="medium",selected:s=!1,disabled:c=!1,children:d,onClick:i=()=>{},className:p="",...f})=>{const y=b(de.btn,de[e],de[n],{[de[`${e}-selected`]]:s},p);return t.jsx("button",{className:y,onClick:i,disabled:c,...f,children:d})};/**
|
|
6
6
|
* @license lucide-react v0.511.0 - ISC
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the ISC license.
|
|
9
9
|
* See the LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/const
|
|
10
|
+
*/const et=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),tt=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,s,c)=>c?c.toUpperCase():s.toLowerCase()),$e=e=>{const n=tt(e);return n.charAt(0).toUpperCase()+n.slice(1)},Ce=(...e)=>e.filter((n,s,c)=>!!n&&n.trim()!==""&&c.indexOf(n)===s).join(" ").trim(),nt=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};/**
|
|
11
11
|
* @license lucide-react v0.511.0 - ISC
|
|
12
12
|
*
|
|
13
13
|
* This source code is licensed under the ISC license.
|
|
14
14
|
* See the LICENSE file in the root directory of this source tree.
|
|
15
|
-
*/var
|
|
15
|
+
*/var st={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
16
16
|
* @license lucide-react v0.511.0 - ISC
|
|
17
17
|
*
|
|
18
18
|
* This source code is licensed under the ISC license.
|
|
19
19
|
* See the LICENSE file in the root directory of this source tree.
|
|
20
|
-
*/const
|
|
20
|
+
*/const ot=C.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:s=2,absoluteStrokeWidth:c,className:d="",children:i,iconNode:p,...f},y)=>C.createElement("svg",{ref:y,...st,width:n,height:n,stroke:e,strokeWidth:c?Number(s)*24/Number(n):s,className:Ce("lucide",d),...!i&&!nt(f)&&{"aria-hidden":"true"},...f},[...p.map(([m,v])=>C.createElement(m,v)),...Array.isArray(i)?i:[i]]));/**
|
|
21
21
|
* @license lucide-react v0.511.0 - ISC
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the ISC license.
|
|
24
24
|
* See the LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/const
|
|
25
|
+
*/const G=(e,n)=>{const s=C.forwardRef(({className:c,...d},i)=>C.createElement(ot,{ref:i,iconNode:n,className:Ce(`lucide-${et($e(e))}`,`lucide-${e}`,c),...d}));return s.displayName=$e(e),s};/**
|
|
26
26
|
* @license lucide-react v0.511.0 - ISC
|
|
27
27
|
*
|
|
28
28
|
* This source code is licensed under the ISC license.
|
|
29
29
|
* See the LICENSE file in the root directory of this source tree.
|
|
30
|
-
*/const at=[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]],rt=
|
|
30
|
+
*/const at=[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]],rt=G("check-check",at);/**
|
|
31
31
|
* @license lucide-react v0.511.0 - ISC
|
|
32
32
|
*
|
|
33
33
|
* This source code is licensed under the ISC license.
|
|
34
34
|
* See the LICENSE file in the root directory of this source tree.
|
|
35
|
-
*/const
|
|
35
|
+
*/const it=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ne=G("chevron-down",it);/**
|
|
36
36
|
* @license lucide-react v0.511.0 - ISC
|
|
37
37
|
*
|
|
38
38
|
* This source code is licensed under the ISC license.
|
|
39
39
|
* See the LICENSE file in the root directory of this source tree.
|
|
40
|
-
*/const
|
|
40
|
+
*/const ct=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Me=G("chevron-up",ct);/**
|
|
41
41
|
* @license lucide-react v0.511.0 - ISC
|
|
42
42
|
*
|
|
43
43
|
* This source code is licensed under the ISC license.
|
|
44
44
|
* See the LICENSE file in the root directory of this source tree.
|
|
45
|
-
*/const
|
|
45
|
+
*/const lt=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],dt=G("circle-alert",lt);/**
|
|
46
46
|
* @license lucide-react v0.511.0 - ISC
|
|
47
47
|
*
|
|
48
48
|
* This source code is licensed under the ISC license.
|
|
49
49
|
* See the LICENSE file in the root directory of this source tree.
|
|
50
|
-
*/const
|
|
50
|
+
*/const _t=[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]],ut=G("octagon-alert",_t);/**
|
|
51
|
+
* @license lucide-react v0.511.0 - ISC
|
|
52
|
+
*
|
|
53
|
+
* This source code is licensed under the ISC license.
|
|
54
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
55
|
+
*/const ht=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],mt=G("triangle-alert",ht);/**
|
|
56
|
+
* @license lucide-react v0.511.0 - ISC
|
|
57
|
+
*
|
|
58
|
+
* This source code is licensed under the ISC license.
|
|
59
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
60
|
+
*/const pt=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ft=G("x",pt),gt="_navigationItem_1uz1o_29",yt="_container_1uz1o_45",wt="_IconContainer_1uz1o_51",vt="_ParentLine_1uz1o_57",$t="_secondaryIcon_1uz1o_69",xt="_active_1uz1o_80",bt="_collapsed_1uz1o_88",jt="_label_1uz1o_92",H={navigationItem:gt,container:yt,IconContainer:wt,ParentLine:vt,secondaryIcon:$t,active:xt,collapsed:bt,label:jt},ie=({icon:e,label:n,secondaryIcon:s,collapsed:c=!1,active:d=!1,isParentNode:i=!1,onClick:p,className:f})=>t.jsxs("div",{className:b(H.navigationItem,d&&H.active,f),onClick:p,children:[t.jsxs("div",{className:H.container,children:[t.jsxs("div",{className:H.IconContainer,children:[e,i&&t.jsx("img",{src:"/assets/icons/ParentLine.svg",alt:"Arrow Indicator",className:H.ParentLine})]}),t.jsx(z,{variant:"body-md",className:b(c&&H.collapsed,H.label),children:n})]}),s&&t.jsx("div",{className:b(H.secondaryIcon,c&&H.collapsed),children:s})]}),Ct="_ArrowContainer_i9cnp_29",Nt="_active_i9cnp_44",Mt="_arrowBlock_i9cnp_54",kt="_isOpen_i9cnp_58",ae={ArrowContainer:Ct,active:Nt,arrowBlock:Mt,isOpen:kt},zt=({activeItemId:e,onChange:n,item:s})=>{var f,y;const c=(f=s.children)==null?void 0:f.findIndex(m=>m.id===e),[d,i]=C.useState(c!==-1),p=()=>{s.children&&i(!d),n(s)};return t.jsxs("div",{children:[t.jsx(ie,{icon:s.icon,label:s.name,secondaryIcon:d?t.jsx(Me,{size:20}):t.jsx(Ne,{size:20}),onClick:p,isParentNode:d&&c!==-1,active:c!==-1&&!d,className:b(d&&c===-1&&ae.isOpen)}),t.jsx("div",{className:ae.childContainer,children:d&&((y=s.children)==null?void 0:y.map((m,v)=>t.jsxs("div",{className:b(ae.ArrowContainer,e===m.id?ae.active:""),onClick:()=>n(m),children:[t.jsxs("div",{className:ae.arrowBlock,children:[c===v&&t.jsx("img",{src:"/assets/icons/ArrowLine.svg",alt:"Arrow Indicator"}),v<(c??-1)&&t.jsx("img",{src:"/assets/icons/SideLine.svg",alt:"Side Indicator"})]}),t.jsx(ie,{icon:m.icon,label:m.name,active:m.id===e})]},m.id)))})]})},St="_ArrowContainer_17ds0_29",Ot="_iconCheck_17ds0_37",Dt="_active_17ds0_47",It="_arrowBlock_17ds0_57",At="_isOpen_17ds0_61",ee={ArrowContainer:St,iconCheck:Ot,active:Dt,arrowBlock:It,isOpen:At},Bt=({activeItemId:e,onChange:n,item:s})=>{var f,y;const c=(f=s.children)==null?void 0:f.findIndex(m=>m.id===e),[d,i]=C.useState(c!==-1),p=()=>{s.children&&i(!d),n(s)};return t.jsxs("div",{children:[t.jsx(ie,{icon:s.icon,label:s.name,secondaryIcon:d?t.jsx(Me,{size:20}):t.jsx(Ne,{size:20}),onClick:p,isParentNode:d&&c!==-1,active:c!==-1&&!d,className:b(d&&c===-1&&ee.isOpen)}),t.jsx("div",{className:ee.childContainer,children:d&&((y=s.children)==null?void 0:y.map((m,v)=>t.jsxs("div",{className:b(ee.ArrowContainer,e===m.id?ee.active:""),onClick:()=>n(m),children:[t.jsxs("div",{className:ee.arrowBlock,children:[c===v&&t.jsx("img",{src:"/assets/icons/ArrowLine.svg",alt:"Arrow Indicator"}),v<(c??-1)&&t.jsx("img",{src:"/assets/icons/SideLine.svg",alt:"Side Indicator"})]}),t.jsx(ie,{icon:m.icon,label:m.name,active:m.id===e,secondaryIcon:m.completed&&t.jsx(rt,{size:20,className:ee.iconCheck})},m.id)]},m.id)))})]})},Tt="_emptyContainer_tmvlz_29",Lt="_imageContent_tmvlz_55",qt="_content_tmvlz_62",Ht="_buttonContent_tmvlz_69",Et="_mobile_tmvlz_85",Pt="_desktop_tmvlz_86",F={emptyContainer:Tt,imageContent:Lt,content:qt,buttonContent:Ht,mobile:Et,desktop:Pt},Wt=({children:e,className:n=""})=>t.jsx("div",{className:`${F.emptyContainer} ${n}`,children:e}),Ft=({children:e,className:n=""})=>t.jsxs(t.Fragment,{children:[t.jsx(z,{className:b(n,F.desktop),variant:"heading-md",children:e}),t.jsx(z,{className:b(n,F.mobile),variant:"heading-sm",children:e})]}),Ut=({children:e,className:n=""})=>t.jsx("div",{className:b(n),children:e}),Yt=({children:e,className:n=""})=>t.jsx("div",{className:`${F.content} ${n}`,children:e}),Zt=({children:e,className:n=""})=>t.jsx("div",{className:`${F.buttonContent} ${n}`,children:e}),Vt=({children:e,onClick:n,className:s=""})=>t.jsx(re,{state:"primary",size:"medium",className:`${F.buttons} ${s}`,onClick:n,children:e}),Jt=({children:e,onClick:n,className:s=""})=>t.jsx(re,{size:"medium",className:`${F.buttons} ${s}`,onClick:n,children:e}),Gt=({src:e,className:n="",alt:s="Empty state image"})=>t.jsx("img",{className:b(F.imageContent,n),src:e,alt:s}),U=Wt;U.Title=Ft;U.Context=Ut;U.Content=Yt;U.ButtonContent=Zt;U.PrimaryButton=Vt;U.SecondaryButton=Jt;U.Image=Gt;const Kt="_formItem_96xeh_29",Qt="_critical_96xeh_36",Xt="_message_96xeh_40",Rt="_error_96xeh_46",en="_label_96xeh_50",tn="_disabled_96xeh_53",nn="_readOnly_96xeh_56",sn="_input_96xeh_60",L={"shadow-0":"_shadow-0_96xeh_1","shadow-100":"_shadow-100_96xeh_5","shadow-200":"_shadow-200_96xeh_9","shadow-300":"_shadow-300_96xeh_13","shadow-400":"_shadow-400_96xeh_17","shadow-500":"_shadow-500_96xeh_21","shadow-600":"_shadow-600_96xeh_25",formItem:Kt,critical:Qt,message:Xt,error:Rt,label:en,disabled:tn,readOnly:nn,input:sn},ke=C.createContext({state:"default"}),we=()=>C.useContext(ke),ue=({children:e,error:n,disabled:s,readOnly:c})=>{let d="default";return n?d="error":s?d="disabled":c&&(d="readOnly"),t.jsx(ke.Provider,{value:{state:d},children:t.jsx("div",{className:L.formItem,children:e})})},on=({children:e})=>{const{state:n}=we();return t.jsx("label",{className:b(L.label,n==="disabled"&&L.disabled,n==="readOnly"&&L.readOnly),children:e})},ze=C.forwardRef(({as:e="input",className:n,...s},c)=>{const{state:d}=we();return t.jsx(e,{ref:c,className:b(L.input,L[d],n),disabled:d==="disabled",readOnly:d==="readOnly",...s})});ze.displayName="FormItem.Input";const an=({children:e})=>{const{state:n}=we();return e?t.jsxs("div",{className:b(L.message,n==="error"?L.error:L.default),children:[n==="error"&&t.jsx(dt,{className:L.critical}),e]}):null};ue.Label=on;ue.Input=ze;ue.Message=an;const rn="_btn_z8qng_29",cn="_small_z8qng_42",ln="_medium_z8qng_45",dn="_large_z8qng_48",_n="_primary_z8qng_69",un="_tertiary_z8qng_85",hn="_plain_z8qng_100",_e={"shadow-0":"_shadow-0_z8qng_1","shadow-100":"_shadow-100_z8qng_5","shadow-200":"_shadow-200_z8qng_9","shadow-300":"_shadow-300_z8qng_13","shadow-400":"_shadow-400_z8qng_17","shadow-500":"_shadow-500_z8qng_21","shadow-600":"_shadow-600_z8qng_25",btn:rn,small:cn,medium:ln,large:dn,default:"_default_z8qng_51","default-selected":"_default-selected_z8qng_62",primary:_n,"primary-selected":"_primary-selected_z8qng_79",tertiary:un,"tertiary-selected":"_tertiary-selected_z8qng_94",plain:hn,"plain-selected":"_plain-selected_z8qng_111"},Se=({state:e="default",size:n="medium",selected:s=!1,disabled:c=!1,children:d,onClick:i=()=>{},className:p="",...f})=>{const y=b(_e.btn,_e[e],_e[n],{[_e[`${e}-selected`]]:s},p);return t.jsx("button",{className:y,onClick:i,disabled:c,...f,children:d})},mn="_modalLayout_1pbrs_29",pn="_modalContainer_1pbrs_40",fn="_slideUp_1pbrs_1",gn="_header_1pbrs_64",yn="_title_1pbrs_73",wn="_close_1pbrs_78",vn="_content_1pbrs_88",$n="_footer_1pbrs_96",xn="_critical_1pbrs_130",bn="_warning_1pbrs_134",I={"shadow-0":"_shadow-0_1pbrs_1","shadow-100":"_shadow-100_1pbrs_5","shadow-200":"_shadow-200_1pbrs_9","shadow-300":"_shadow-300_1pbrs_13","shadow-400":"_shadow-400_1pbrs_17","shadow-500":"_shadow-500_1pbrs_21","shadow-600":"_shadow-600_1pbrs_25",modalLayout:mn,modalContainer:pn,slideUp:fn,header:gn,title:yn,close:wn,content:vn,footer:$n,"tone-critical":"_tone-critical_1pbrs_122","tone-warning":"_tone-warning_1pbrs_126",critical:xn,warning:bn},jn=({open:e,onClose:n,title:s,primaryAction:c,secondaryActions:d=[],tone:i="default",children:p})=>{if(!e)return null;const f=I[`tone-${i}`]||"";return t.jsx("div",{className:I.modalLayout,onClick:n,children:t.jsxs("div",{className:`${I.modalContainer} ${f}`,onClick:y=>y.stopPropagation(),role:"dialog","aria-modal":"true","aria-labelledby":"modal-title",children:[t.jsxs("div",{className:I.header,children:[t.jsxs("div",{className:I.title,children:[i=="critical"&&t.jsx(ut,{className:I.critical}),i=="warning"&&t.jsx(mt,{className:I.warning}),t.jsx(z,{variant:"heading-sm",children:s})]}),t.jsx(Se,{size:"small",state:"default",onClick:n,"aria-label":"Close modal",children:t.jsx(ft,{})})]}),t.jsx("div",{className:I.content,children:p}),t.jsxs("div",{className:I.footer,children:[d.map(({content:y,onAction:m},v)=>t.jsx(re,{className:I.secondaryButton,onClick:m,children:y},v)),c&&t.jsx(re,{type:"button",state:"primary",className:I.primaryButton,onClick:c.onAction,children:c.content})]})]})})},Cn=({children:e})=>t.jsx("section",{className:I.section,children:e}),Oe=jn;Oe.Section=Cn;const Nn="_pageHeader_1lrq1_29",Mn="_mg_1lrq1_38",kn="_lg_1lrq1_39",pe={pageHeader:Nn,mg:Mn,lg:kn},zn=({children:e})=>t.jsxs("header",{className:pe.pageHeader,children:[t.jsx(z,{variant:"heading-xl",className:pe.lg,children:e}),t.jsx(z,{variant:"heading-md",className:pe.mg,children:e})]}),Sn="_container_1g19z_29",On="_line_1g19z_35",Dn="_progress_1g19z_41",fe={container:Sn,line:On,progress:Dn},In=({percent:e})=>t.jsx("div",{className:fe.container,children:t.jsx("div",{className:fe.line,children:t.jsx("div",{className:fe.progress,style:{width:`${e}%`}})})}),An="_container_1gn8d_29",Bn="_notMobile_1gn8d_38",Tn="_mobile_1gn8d_47",ge={container:An,notMobile:Bn,mobile:Tn},Ln=({title:e,extra:n})=>t.jsxs("div",{className:ge.container,children:[t.jsx(z,{variant:"heading-md",className:ge.notMobile,children:e}),t.jsx(z,{variant:"heading-sm",className:ge.mobile,children:e}),n]}),qn="_tooltipWrapper_mj0hz_29",Hn="_underline_mj0hz_34",En="_tooltip_mj0hz_29",ye={"shadow-0":"_shadow-0_mj0hz_1","shadow-100":"_shadow-100_mj0hz_5","shadow-200":"_shadow-200_mj0hz_9","shadow-300":"_shadow-300_mj0hz_13","shadow-400":"_shadow-400_mj0hz_17","shadow-500":"_shadow-500_mj0hz_21","shadow-600":"_shadow-600_mj0hz_25",tooltipWrapper:qn,underline:Hn,tooltip:En,"tooltip-position-above":"_tooltip-position-above_mj0hz_58","tooltip-position-below":"_tooltip-position-below_mj0hz_68","tooltip-position-cover":"_tooltip-position-cover_mj0hz_78"},Pn=({active:e,content:n,hoverDelay:s=300,preferredPosition:c="above",zIndexOverride:d,trigger:i="hover",children:p,className:f,tooltipClassName:y})=>{const[m,v]=C.useState(!1),[N,A]=C.useState(c),j=C.useRef(null),S=C.useRef(!1),T=C.useRef(null),B=e!==void 0?e:m,Y=i==="hover"||i==="both",he=i==="click"||i==="both",K=C.useId(),me=ye[`tooltip-position-${N}`]||"",Z=b(ye.tooltipWrapper,f),q=b(ye.tooltip,me,y),ce={zIndex:d??400,position:"absolute"},ne=()=>{!Y||e!==void 0||(j.current&&clearTimeout(j.current),j.current=window.setTimeout(()=>{if(c==="mostSpace"&&T.current){const g=T.current.getBoundingClientRect(),E=g.top,X=window.innerHeight-g.bottom;A(X>=E?"below":"above")}else A(c);v(!0)},s))},Q=()=>{!Y||e!==void 0||(j.current&&clearTimeout(j.current),j.current=window.setTimeout(()=>{S.current||v(!1)},50))},x=()=>{if(!(!he||e!==void 0)){if(S.current=!S.current,c==="mostSpace"&&T.current){const g=T.current.getBoundingClientRect(),E=g.top,X=window.innerHeight-g.bottom;A(X>=E?"below":"above")}else A(c);v(S.current)}};return t.jsxs("span",{ref:T,className:Z,onMouseEnter:ne,onMouseLeave:Q,onClick:x,"aria-describedby":B?K:void 0,tabIndex:0,style:{display:"inline-block",position:"relative"},children:[p,B&&t.jsx("div",{id:K,role:"tooltip",className:q,style:ce,children:n})]})},Wn="_topBar_xnlee_29",Fn="_section_xnlee_66",Un="_scretched_xnlee_73",Yn="_active_xnlee_90",Zn="_sm_xnlee_99",Vn="_md_xnlee_100",te={topBar:Wn,section:Fn,scretched:Un,active:Yn,sm:Zn,md:Vn},Jn=({sections:e,activeTab:n,onTabSelect:s,isStretched:c=!0})=>{var d;return t.jsxs("div",{children:[t.jsx("div",{className:te.topBar,children:e.map(i=>t.jsxs("div",{className:b(te.section,c&&te.scretched,n===i.id&&te.active),onClick:()=>s(i.id),children:[t.jsx(z,{variant:"heading-xs",className:te.sm,children:i.title}),t.jsx(z,{variant:"heading-md",className:te.md,children:i.title})]},i.id))}),((d=e.find(i=>i.id===n))==null?void 0:d.component)??t.jsx(z,{variant:"body-lg",children:"Not Found"})]})};exports.Banner=Ze;exports.Button=re;exports.Collapse=zt;exports.CourseCollapse=Bt;exports.Empty=U;exports.FormItem=ue;exports.IconButton=Se;exports.Modal=Oe;exports.NavigationItem=ie;exports.PageHeader=zn;exports.ProgressLine=In;exports.SectionHeader=Ln;exports.Tooltip=Pn;exports.TopBar=Jn;exports.Typography=z;
|