najwer23morsels 1.10.36 → 1.11.2

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.
Files changed (41) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/lib/Button/Button.const.d.ts +15 -0
  3. package/lib/Button/Button.d.ts +7 -4
  4. package/lib/Button/Button.types.d.ts +1 -0
  5. package/lib/Button/index.js +1 -1
  6. package/lib/Button-BDPxqgFb.js +1 -0
  7. package/lib/ButtonCopy/ButtonCopy.d.ts +0 -2
  8. package/lib/ButtonCopy/index.js +1 -1
  9. package/lib/Calendar/index.js +1 -1
  10. package/lib/Calendar-BCqWc3BZ.js +1 -0
  11. package/lib/Dialog/index.js +1 -1
  12. package/lib/{Dialog-8B0xk8Wx.js → Dialog-eSjNkfJK.js} +1 -1
  13. package/lib/Form/index.js +1 -1
  14. package/lib/Form-GEUDMZ7Z.js +1 -0
  15. package/lib/FormForgotPass/index.js +1 -1
  16. package/lib/FormForgotPassOtp/index.js +1 -1
  17. package/lib/FormLogin/index.js +1 -1
  18. package/lib/FormSignUp/index.js +1 -1
  19. package/lib/IconLocate-BXomEqkx.js +1 -0
  20. package/lib/Icons/index.js +1 -1
  21. package/lib/Input/index.js +1 -1
  22. package/lib/Input-BJj54qdT.js +1 -0
  23. package/lib/NavigationDashboard/index.js +1 -1
  24. package/lib/NavigationTabs/index.js +1 -1
  25. package/lib/{NavigationTabs-CWkGtNHu.js → NavigationTabs-DtNZmWJJ.js} +1 -1
  26. package/lib/Select/index.js +1 -1
  27. package/lib/{Select-QBTZllFj.js → Select-CQBKuf2T.js} +1 -1
  28. package/lib/Slider/index.js +1 -1
  29. package/lib/SliderScroll/index.js +1 -1
  30. package/lib/Table/index.js +1 -1
  31. package/lib/Typography/Typography.d.ts +2 -3
  32. package/lib/Typography/index.js +1 -1
  33. package/lib/{Typography-CZqNLAT7.js → Typography-CR1DOKsN.js} +1 -1
  34. package/lib/validator/validator.const.d.ts +5 -0
  35. package/lib/validator.const-LBF9whmW.js +1 -0
  36. package/package.json +1 -1
  37. package/lib/Button-QC014EKI.js +0 -1
  38. package/lib/Calendar-BkDrBfRy.js +0 -1
  39. package/lib/Form-CgTuTB2Q.js +0 -1
  40. package/lib/IconLocate-CQda7FAB.js +0 -1
  41. package/lib/Input-Bl7_BOs4.js +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # najwer23morsels
2
2
 
3
+ ## 1.11.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Variants
8
+
3
9
  ## 1.10.0
4
10
 
5
11
  ### Minor Changes
@@ -0,0 +1,15 @@
1
+ import { ButtonVariant } from './Button.types';
2
+ /**
3
+ * Color palette for each Button variant.
4
+ *
5
+ * background - fill color of the button
6
+ * border - 1px border, a darker shade of the background
7
+ * text - label color (and loader color while loading)
8
+ * focus - outline color shown on keyboard focus (:focus-visible)
9
+ */
10
+ export declare const BUTTON_VARIANTS: Record<ButtonVariant, {
11
+ background: string;
12
+ border: string;
13
+ text: string;
14
+ focus: string;
15
+ }>;
@@ -1,16 +1,19 @@
1
1
  import React from 'react';
2
+ import { ButtonVariant } from './Button.types';
2
3
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
3
4
  children?: React.ReactNode;
5
+ variant?: ButtonVariant;
4
6
  backgroundColor?: React.CSSProperties['color'];
7
+ backgroundColorDisabled?: React.CSSProperties['color'];
8
+ borderColor?: React.CSSProperties['color'];
9
+ textColor?: React.CSSProperties['color'];
5
10
  padding?: React.CSSProperties['padding'];
6
11
  margin?: React.CSSProperties['margin'];
7
- height: React.CSSProperties['height'];
8
- width: React.CSSProperties['width'];
12
+ height?: React.CSSProperties['height'];
13
+ width?: React.CSSProperties['width'];
9
14
  loading?: boolean;
10
15
  loaderMobileSize?: number;
11
16
  loaderDesktopSize?: number;
12
- backgroundColorDisabled?: React.CSSProperties['color'];
13
- borderColor?: React.CSSProperties['color'];
14
17
  style?: React.CSSProperties;
15
18
  }
16
19
  export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1 @@
1
+ export type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'success' | 'copy' | 'menu' | 'disabled';
@@ -1 +1 @@
1
- export{B as Button}from"../Button-QC014EKI.js";import"react/jsx-runtime";import"react";import"../Loader-ZYEBOkbx.js";import"../LoaderDots-BoEg_zlZ.js";import"../TextBox-__k4jPYK.js";import"../style-inject.es-CrVRO2OA.js";
1
+ export{B as Button}from"../Button-BDPxqgFb.js";import"react/jsx-runtime";import"react";import"../LoaderDots-BoEg_zlZ.js";import"../TextBox-__k4jPYK.js";import"../style-inject.es-CrVRO2OA.js";
@@ -0,0 +1 @@
1
+ import{jsxs as t,jsx as o}from"react/jsx-runtime";import{forwardRef as n}from"react";import{L as e}from"./LoaderDots-BoEg_zlZ.js";import{s as r,g as a}from"./style-inject.es-CrVRO2OA.js";const i={primary:{background:"#3F454B",border:"#343A40",text:"#FFFFFF",focus:"#3F454B"},secondary:{background:"#6B6F76",border:"#585C62",text:"#FFFFFF",focus:"#6B6F76"},danger:{background:"#C24141",border:"#A93434",text:"#FFFFFF",focus:"#C24141"},success:{background:"#367C59",border:"#2D684B",text:"#FFFFFF",focus:"#367C59"},copy:{background:"#B45309",border:"#92400E",text:"#FFFFFF",focus:"#B45309"},menu:{background:"#6B4FA0",border:"#593F89",text:"#FFFFFF",focus:"#6B4FA0"},disabled:{background:"#CFCFCF",border:"#C8C8C8",text:"#555555",focus:"#8A8A8A"}};var d={n23mButtonButton:"Button-module_n23mButtonButton__U9-RM",n23mButtonButtonLoading:"Button-module_n23mButtonButtonLoading__NNmp1",n23mButtonContent:"Button-module_n23mButtonContent__dIwIk",n23mButtonLoader:"Button-module_n23mButtonLoader__464qp"};r('@layer n23mButton{.Button-module_n23mButtonButton__U9-RM{--button-radius:12px;--button-transition:180ms ease;--button-shadow:0 2px 4px rgba(0,0,0,.08),0 4px 12px rgba(0,0,0,.1);--button-shadow-hover:0 4px 8px rgba(0,0,0,.1),0 8px 20px rgba(0,0,0,.14);corner-shape:squircle;-webkit-tap-highlight-color:transparent;align-items:center;background-color:var(--n23mButtonBg,var(--button-bg));border:1px solid var(--n23mButtonBorderColor,var(--button-bc,transparent));border-radius:var(--button-radius);box-shadow:none;box-sizing:border-box;color:var(--n23mButtonTextColor,var(--button-color,#fff));cursor:pointer;display:inline-flex;height:var(--button-h,42px);justify-content:center;letter-spacing:normal;margin:var(--button-m,0);padding:var(--button-p,0 12px);position:relative;transition:background-color var(--button-transition),border-color var(--button-transition),box-shadow var(--button-transition),transform var(--button-transition);user-select:none;width:var(--button-w,auto);>*{position:relative;z-index:1}&:before{corner-shape:inherit;background-color:inherit;border-radius:inherit;content:"";inset:0;pointer-events:none;position:absolute;transition:filter var(--button-transition);z-index:0}@media (hover:hover) and (pointer:fine){&:hover:not(:disabled){box-shadow:var(--button-shadow-hover);transform:translateY(-1px)}&:hover:not(:disabled):before{filter:brightness(1.06)}}&:active:not(:disabled){box-shadow:var(--button-shadow);transform:translateY(0)}&:active:not(:disabled):before{filter:brightness(.92)}&:focus-visible{box-shadow:none;outline:3px solid var(--n23mButtonFocusColor,var(--button-focus,var(--button-bg)));outline-offset:3px}&:disabled{box-shadow:none;cursor:not-allowed;transform:none}&:disabled:not(.Button-module_n23mButtonButtonLoading__NNmp1){background-color:var(--n23mButtonBgDisabled,var(--button-bgd,#e5e7eb));border-color:transparent;color:var(--n23mButtonTextColorDisabled,var(--button-colord,#595959))}&:disabled:before{filter:none}@media (prefers-reduced-motion:reduce){transition:none;&:before{transition:none}}}.Button-module_n23mButtonContent__dIwIk{align-items:center;display:inline-flex;justify-content:center;min-width:0;position:relative;transition:opacity .14s ease;white-space:nowrap;z-index:1}.Button-module_n23mButtonButtonLoading__NNmp1 .Button-module_n23mButtonContent__dIwIk{opacity:0;pointer-events:none}.Button-module_n23mButtonLoader__464qp{align-items:center;display:inline-flex;inset:0;justify-content:center;pointer-events:none;position:absolute;z-index:2}}');const s=n(({variant:n="primary",loaderMobileSize:r=16,loaderDesktopSize:s=16,margin:u,children:b,className:l,backgroundColor:c,backgroundColorDisabled:m,borderColor:p,textColor:B,padding:g="0 12px",loading:x=!1,height:F="42px",width:v,style:f,disabled:h,..._},C)=>{const w="disabled"===n||h&&!x?"disabled":n,k=i[w],y=i.disabled;return t("button",{ref:C,disabled:h||x||"disabled"===n,"aria-busy":x||void 0,"data-variant":w,style:{...a({"--button-bg":c??k.background,"--button-bc":p??k.border,"--button-color":B??k.text,"--button-focus":k.focus,"--button-bgd":m??y.background,"--button-colord":y.text,"--button-h":F,"--button-w":v,"--button-p":g,"--button-m":u}),...f},className:[d.n23mButtonButton,"n23mButtonButton",x&&d.n23mButtonButtonLoading,l].filter(Boolean).join(" "),..._,children:[o("span",{className:d.n23mButtonContent,"aria-hidden":x||void 0,children:b}),x&&o("span",{className:d.n23mButtonLoader,children:o(e,{mobileSize:r,desktopSize:s,color:B??k.text})})]})});s.displayName="Button";export{s as B};
@@ -1,8 +1,6 @@
1
1
  interface ButtonCopyProps extends React.HTMLAttributes<HTMLDivElement> {
2
2
  children?: React.ReactNode;
3
3
  style?: React.CSSProperties;
4
- backgroundColor?: React.CSSProperties['backgroundColor'];
5
- color?: React.CSSProperties['color'];
6
4
  padding?: React.CSSProperties['padding'];
7
5
  margin?: React.CSSProperties['margin'];
8
6
  textToCopy: string;
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{useState as r,useRef as o,useCallback as e,useEffect as i}from"react";import{B as n}from"../Button-QC014EKI.js";import{T as a}from"../TextBox-__k4jPYK.js";import"../Loader-ZYEBOkbx.js";import"../LoaderDots-BoEg_zlZ.js";import"../style-inject.es-CrVRO2OA.js";const c=({children:c,className:l,style:u,textToCopy:s,margin:m,height:p="auto",width:d="auto",padding:h="0px 3px",color:g="white",backgroundColor:y="orangered",...x})=>{const[j,B]=r(!1),C=o(null),T=e(async()=>{C.current&&(clearTimeout(C.current),C.current=null);try{await navigator.clipboard.writeText(s)}catch{return void B(!1)}B(!0),C.current=setTimeout(()=>{B(!1),C.current=null},800)},[s]);return i(()=>()=>{C.current&&clearTimeout(C.current)},[]),t("div",{className:["n23mButtonCopy",l].filter(Boolean).join(" "),style:u,...x,children:t(n,{type:"button",padding:h,height:p,width:d,margin:m,backgroundColor:j?"#4BB543":y,onClick:T,children:c??t(a,{mobileSize:10,desktopSize:10,fontWeight:600,lineHeight:"17px",color:g,children:"Copy"})})})};c.displayName="ButtonCopy";export{c as ButtonCopy};
1
+ import{jsxs as t,jsx as e}from"react/jsx-runtime";import{useState as r,useRef as i,useCallback as o,useEffect as n}from"react";import{B as a}from"../Button-BDPxqgFb.js";import{T as c}from"../TextBox-__k4jPYK.js";import"../LoaderDots-BoEg_zlZ.js";import"../style-inject.es-CrVRO2OA.js";const l={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap",border:0},s=({children:s,className:p,style:u,textToCopy:d,margin:m,height:h="auto",width:y="auto",padding:g="0px 3px",...x})=>{const[w,f]=r(!1),j=i(null),T=o(async()=>{j.current&&(clearTimeout(j.current),j.current=null);try{await navigator.clipboard.writeText(d)}catch{return void f(!1)}f(!0),j.current=setTimeout(()=>{f(!1),j.current=null},800)},[d]);return n(()=>()=>{j.current&&clearTimeout(j.current)},[]),t("div",{className:["n23mButtonCopy",p].filter(Boolean).join(" "),style:u,...x,children:[e(a,{type:"button",variant:w?"success":"copy",padding:g,height:h,width:y,margin:m,onClick:T,children:s??e(c,{mobileSize:10,desktopSize:10,fontWeight:600,lineHeight:"17px",color:"inherit",children:"Copy"})}),e("span",{role:"status","aria-live":"polite",style:l,children:w?"Copied":""})]})};s.displayName="ButtonCopy";export{s as ButtonCopy};
@@ -1 +1 @@
1
- export{C as Calendar}from"../Calendar-BkDrBfRy.js";import"react/jsx-runtime";import"react";import"../Button-QC014EKI.js";import"../Loader-ZYEBOkbx.js";import"../LoaderDots-BoEg_zlZ.js";import"../TextBox-__k4jPYK.js";import"../style-inject.es-CrVRO2OA.js";import"../IconLocate-CQda7FAB.js";import"../Input-Bl7_BOs4.js";import"../validator/index.js";
1
+ export{C as Calendar}from"../Calendar-BCqWc3BZ.js";import"react/jsx-runtime";import"react";import"../Button-BDPxqgFb.js";import"../LoaderDots-BoEg_zlZ.js";import"../TextBox-__k4jPYK.js";import"../style-inject.es-CrVRO2OA.js";import"../IconLocate-BXomEqkx.js";import"../Input-BJj54qdT.js";import"../validator/index.js";import"../validator.const-LBF9whmW.js";
@@ -0,0 +1 @@
1
+ import{jsxs as e,jsx as a,Fragment as t}from"react/jsx-runtime";import{useRef as n,useState as r,useMemo as o}from"react";import{B as l}from"./Button-BDPxqgFb.js";import{I as d,a as i}from"./IconLocate-BXomEqkx.js";import{I as s}from"./Input-BJj54qdT.js";import{T as c}from"./TextBox-__k4jPYK.js";import{s as p}from"./style-inject.es-CrVRO2OA.js";var h={n23mCalendar:"Calendar-module_n23mCalendar__6E2X7",icon:"Calendar-module_icon__ye4Dl",dropdownWrapper:"Calendar-module_dropdownWrapper__KryyT",open:"Calendar-module_open__Y-JWN",dropdown:"Calendar-module_dropdown__RPTTl",controls:"Calendar-module_controls__XGi-Q",controlsDate:"Calendar-module_controlsDate__L1Wp6",weekdays:"Calendar-module_weekdays__t9VRM",weekdaysChild:"Calendar-module_weekdaysChild__owTwc",days:"Calendar-module_days__D03p-",daysChild:"Calendar-module_daysChild__Jbjrd",daysActive:"Calendar-module_daysActive__Y7Fsv",daysClickable:"Calendar-module_daysClickable__THEm1",months:"Calendar-module_months__NOLDP",years:"Calendar-module_years__li-uY",monthsChild:"Calendar-module_monthsChild__4gx-0",yearsChild:"Calendar-module_yearsChild__mRWoZ"};p("@layer n23mCalendar{.Calendar-module_n23mCalendar__6E2X7{--iff:-apple-system,BlinkMacSystemFont,avenir next,avenir,segoe ui,helvetica neue,helvetica,Cantarell,Ubuntu,roboto,noto,arial,sans-serif;position:relative;& input{padding-right:40px}.Calendar-module_icon__ye4Dl{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 25 25'%3E%3Cpath fill='%23231f20' d='M22.5 3H21V2a1 1 0 0 0-1-1h-1a1 1 0 0 0-1 1v1h-4V2a1 1 0 0 0-1-1h-1a1 1 0 0 0-1 1v1H7V2a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v1H2.5A1.5 1.5 0 0 0 1 4.5v18A1.5 1.5 0 0 0 2.5 24h20a1.5 1.5 0 0 0 1.5-1.5v-18A1.5 1.5 0 0 0 22.5 3ZM19 2h1v3h-1Zm-7 0h1v3h-1ZM5 2h1v3H5ZM2.5 4H4v1a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1V4h4v1a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1V4h4v1a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1V4h1.5a.5.5 0 0 1 .5.5V8H2V4.5a.5.5 0 0 1 .5-.5Zm20 19h-20a.5.5 0 0 1-.5-.5V9h21v13.5a.5.5 0 0 1-.5.5Z'/%3E%3C/svg%3E\");background-position:100%;background-position:calc(100% - 10px) 50%;background-repeat:no-repeat;background-size:18px;cursor:pointer;display:inline-block;height:40px;position:absolute;right:1px;top:21px;width:40px}.Calendar-module_dropdownWrapper__KryyT{background-color:transparent;display:none;margin-top:65px;padding-bottom:40px;position:absolute;top:0;width:318px;z-index:3;&.Calendar-module_open__Y-JWN{display:block}.Calendar-module_dropdown__RPTTl{corner-shape:squircle;background:#fff;border:1px solid var(--input-cb,#000);border-radius:12px;box-shadow:0 4px 8px 0 rgba(0,0,0,.24),0 6px 20px 0 rgba(0,0,0,.19);box-sizing:border-box;overflow-y:auto;padding:20px;& .Calendar-module_controls__XGi-Q{align-items:center;display:flex;height:40px;justify-content:space-between;padding:0 7px}& .Calendar-module_controlsDate__L1Wp6{display:flex;font-family:var(--n23mFontFamily,var(--iff));font-size:20px;justify-content:center}& .Calendar-module_weekdays__t9VRM{display:flex;justify-content:center;width:100%}& .Calendar-module_weekdaysChild__owTwc{align-items:center;display:flex;font-family:var(--n23mFontFamily,var(--iff));font-size:12px;height:30px;justify-content:center;width:14.28571%}& .Calendar-module_days__D03p-{display:flex;flex-wrap:wrap;justify-content:flex-start;width:100%}& .Calendar-module_daysChild__Jbjrd{font-size:16px}& .Calendar-module_daysChild__Jbjrd:nth-child(7n){color:red;font-weight:700}& .Calendar-module_daysActive__Y7Fsv,& .Calendar-module_daysClickable__THEm1:hover{corner-shape:squircle;background-color:#f2f2f2;border-radius:12px;cursor:pointer}& .Calendar-module_daysClickable__THEm1{cursor:pointer}& .Calendar-module_months__NOLDP,& .Calendar-module_years__li-uY{display:flex;flex-wrap:wrap;gap:12px;justify-content:center}& .Calendar-module_monthsChild__4gx-0,& .Calendar-module_yearsChild__mRWoZ{display:flex;justify-content:center}}}}}");const u=(e,a,t)=>{const n=new Date(0);return n.setFullYear(e,a,t),n.setHours(0,0,0,0),n},m=e=>{const a="string"==typeof e?new Date(e):e,t=a.getFullYear(),n=a.getMonth();return u(t,n+1,0).getDate()},y=e=>{const a="string"==typeof e?new Date(e):e;return`${String(a.getFullYear()).padStart(4,"0")}-${String(a.getMonth()+1).padStart(2,"0")}-${String(a.getDate()).padStart(2,"0")}`},_=e=>{const a="string"==typeof e?new Date(e):e,t=a.getDate(),n=((e=>{const a="string"==typeof e?new Date(e):e,t=a.getFullYear(),n=a.getMonth();return u(t,n,1).getDay()})(a)+6)%7,r=m(a);return Array.from({length:r+n},(e,a)=>{let r="",o="";return a<=n-1?(r="",o="blank"):a===t+n-1?(r=String(a-n+1),o="active"):(r=String(a-n+1),o="clickable"),{day:a-n+1,dayValue:r,cssClass:o}})},g=e=>a=>{"Enter"!==a.key&&" "!==a.key||(a.preventDefault(),e())},C=({children:p,name:C,placeholder:v,label:w="Calendar",initialValue:x,disabled:b,onBlur:f,validatorOptions:D,className:k,style:S,...N})=>{const F=n(null),j=n(null),[M,T]=r({value:x??y(new Date),open:!1,dropDwonState:"days"}),{year:Y,month:V,day:E,iso:A}=((e,a=new Date)=>{const[t="",n="",r=""]=e.split("-"),o=/^\d{4}$/.test(t)?Number(t):a.getFullYear(),l=/^\d{1,2}$/.test(n)&&Number(n)>=1&&Number(n)<=12?Number(n)-1:a.getMonth(),d=/^\d{1,2}$/.test(r)&&Number(r)>=1&&Number(r)<=31?Number(r):a.getDate(),i=Math.min(d,m(u(o,l,1)));return{year:o,month:l,day:i,iso:`${String(o).padStart(4,"0")}-${String(l+1).padStart(2,"0")}-${String(i).padStart(2,"0")}`}})(M.value),H=e=>{const a=e.relatedTarget;a&&j.current?.contains(a)||(T(e=>({...e,open:!1})),f?.(e))},z=e=>{T(a=>({...a,value:y(e),open:!0}))},B=e=>{z(((e,a)=>{const t="string"==typeof e?new Date(e):e,n=t.getFullYear(),r=t.getMonth(),o=u(n,r+1,0).getDate(),l=Math.max(1,Math.min(a,o));return u(n,r,l)})(A,e))},W=e=>{z(((e,a)=>{const t="string"==typeof e?new Date(e):e,n=t.getFullYear(),r=t.getMonth()+a,o=t.getDate(),l=u(n,r,o);if(l.getDate()!==o){const e=u(n,r+1,0).getDate();return u(n,r,e)}return l})(A,e))},$=e=>{z(((e,a)=>{const t="string"==typeof e?new Date(e):e,n=a,r=t.getMonth(),o=t.getDate();return u(n,r,o)})(A,e))},I=e=>{T(a=>({...a,dropDwonState:e}))},Z=e=>{e>0&&B(e),T(e=>({...e,open:!1})),setTimeout(()=>{F.current?.blur()})},L=o(()=>Array.from({length:7},(e,a)=>new Date(2021,0,(a+4)%7).toLocaleString("en-US",{weekday:"short"})),[]),R=o(()=>Array.from({length:12},(e,a)=>new Date(2021,a+1,0).toLocaleString("en-US",{month:"short"})),[]),K=_(A),P=(e=>{const a="string"==typeof e?new Date(e):e,t=a.getFullYear()-4,n=a.getFullYear()+4;return Array.from({length:n-t+1},(e,a)=>t+a).filter(e=>e>=0)})(A);return e("div",{ref:j,className:[h.n23mCalendar,"n23mCalendar",k].filter(Boolean).join(" "),...N,style:{...S},children:[a("div",{className:h.icon,onMouseDown:e=>{b||(e.preventDefault(),document.activeElement===F.current?T(e=>({...e,open:!e.open,dropDwonState:"days"})):F.current?.focus())}}),a(s,{inputRef:F,label:w,type:"text",kind:"input",name:C,autoComplete:"off",placeholder:v,onChange:e=>{const a=e.currentTarget.value;T(e=>({...e,value:a}))},onBlur:H,onFocus:()=>{b||T(e=>({...e,open:!0,dropDwonState:"days"}))},onClick:()=>{b||T(e=>({...e,open:!0,dropDwonState:"days"}))},disabled:b,value:M.value,validatorOptions:[...D??[],{type:"date"}],className:h.arrowUp,"aria-expanded":M.open,role:"combobox"}),a("div",{className:[h.dropdownWrapper,M.open?h.open:""].join(" "),children:e("div",{className:[h.dropdown].join(" "),onMouseDown:e=>e.preventDefault(),onBlur:H,children:["years"===M.dropDwonState&&e(t,{children:[e("div",{className:h.controls,style:{marginBottom:"10px"},children:[a("div",{style:{width:"30px"},children:a(l,{type:"button",padding:"0",height:"30px",width:"30px",title:"Previous years",variant:"secondary",onClick:()=>$(Y-9),children:a(d,{height:22,width:22})})}),a("div",{style:{width:"60%"},className:h.controlsDate,children:a("div",{style:{cursor:"pointer"},role:"button",tabIndex:0,onClick:()=>I("days"),onKeyDown:g(()=>I("days")),children:Y})}),a("div",{style:{width:"30px"},children:a(l,{type:"button",padding:"0",height:"30px",width:"30px",title:"Next years",variant:"secondary",onClick:()=>$(Y+9),children:a(i,{height:22,width:22})})})]}),a("div",{className:h.years,children:P.map(e=>a("div",{className:h.yearsChild,children:a(l,{type:"button",height:"40px",width:"80px",textColor:"black",backgroundColor:Y==e?"white":"#F2F0EF",borderColor:"black",title:"year",onClick:()=>{$(e),I("days")},children:a(c,{mobileSize:14,desktopSize:14,color:"inherit",children:e})},e+M.value)},e+M.value))})]}),"months"===M.dropDwonState&&a("div",{className:h.months,children:R.map((e,t)=>a("div",{className:h.monthsChild,children:a(l,{type:"button",height:"40px",width:"80px",textColor:"black",backgroundColor:V==t?"white":"#F2F0EF",borderColor:"black",title:"month",onClick:()=>{W(t-V),I("days")},children:a(c,{mobileSize:14,desktopSize:14,color:"inherit",children:e})},e+M.value)},e+M.value))}),"days"===M.dropDwonState&&e(t,{children:[e("div",{className:h.controls,children:[a("div",{style:{width:"30px"},children:a(l,{type:"button",padding:"0",height:"30px",width:"30px",title:"Previous month",variant:"secondary",onClick:()=>W(-1),children:a(d,{height:22,width:22})})}),e("div",{style:{width:"60%"},className:h.controlsDate,children:[a("div",{style:{cursor:"pointer"},role:"button",tabIndex:0,onClick:()=>I("years"),onKeyDown:g(()=>I("years")),children:Y}),a("div",{children:"-"}),a("div",{style:{cursor:"pointer"},role:"button",tabIndex:0,onClick:()=>I("months"),onKeyDown:g(()=>I("months")),children:String(V+1).padStart(2,"0")}),a("div",{children:"-"}),a("div",{children:String(E).padStart(2,"0")})]}),a("div",{style:{width:"30px"},children:a(l,{type:"button",padding:"0",height:"30px",width:"30px",title:"Next month",variant:"secondary",onClick:()=>W(1),children:a(i,{height:22,width:22})})})]}),a("div",{className:h.weekdays,children:L.map(e=>a("div",{className:h.weekdaysChild,children:e},e))}),a("div",{className:h.days,children:K.map(e=>{const t=e.day>0&&e.day<=m(A);return a("div",{className:[h.weekdaysChild,h.daysChild,"active"==e.cssClass&&h.daysActive,"clickable"==e.cssClass&&h.daysClickable].join(" "),role:t?"button":void 0,tabIndex:t?0:void 0,onKeyDown:t?g(()=>Z(e.day)):void 0,onMouseDown:()=>Z(e.day),children:t?e.day:" "},e.day+M.value)})})]})]})})]})};C.displayName="Calendar";export{C};
@@ -1 +1 @@
1
- export{D as Dialog}from"../Dialog-8B0xk8Wx.js";import"react/jsx-runtime";import"react";import"../Button-QC014EKI.js";import"../Loader-ZYEBOkbx.js";import"../LoaderDots-BoEg_zlZ.js";import"../TextBox-__k4jPYK.js";import"../style-inject.es-CrVRO2OA.js";
1
+ export{D as Dialog}from"../Dialog-eSjNkfJK.js";import"react/jsx-runtime";import"react";import"../Button-BDPxqgFb.js";import"../LoaderDots-BoEg_zlZ.js";import"../TextBox-__k4jPYK.js";import"../style-inject.es-CrVRO2OA.js";
@@ -1 +1 @@
1
- import{jsx as o,jsxs as i}from"react/jsx-runtime";import{useRef as e,useEffect as l}from"react";import{B as a}from"./Button-QC014EKI.js";import{T as t}from"./TextBox-__k4jPYK.js";import{s as d,g as r}from"./style-inject.es-CrVRO2OA.js";var n={n23mDialog:"Dialog-module_n23mDialog__1y-5W",dialog:"Dialog-module_dialog__AbQKQ",dialogCloseButton:"Dialog-module_dialogCloseButton__idhtw"};d("@layer n23mDialog{.Dialog-module_n23mDialog__1y-5W{background-color:#fff;.Dialog-module_dialog__AbQKQ{corner-shape:squircle;border:1px solid #000;border-radius:12px;box-sizing:border-box;max-block-size:calc(100dvb - 50px);max-inline-size:min(calc(100vw - 20px),var(--dialog-wm,95%));min-height:100px;overscroll-behavior:none;padding:0;position:fixed;& .Dialog-module_dialogCloseButton__idhtw{position:absolute!important;right:10px;top:10px}article{margin-top:55px}&::backdrop{backdrop-filter:blur(5px);background-color:hsla(0,0%,100%,.15);bottom:0;left:0;position:fixed;right:0;top:0}}}}");const s=({children:d,open:s,widthMax:c,title:m,onCancel:g,className:p,style:u,...h})=>{const b=e(null);return l(()=>{if(!s){b.current?.classList.add(n.minimize);const o=setTimeout(()=>{b.current?.close(),b.current?.classList.remove(n.minimize),document.body.style.paddingRight="0",document.body.style.overflow=""},0);return()=>clearTimeout(o)}b.current?.showModal(),document.body.style.paddingRight=window.innerWidth-document.body.clientWidth+"px",document.body.style.overflow="hidden"},[s]),o("div",{className:[n.n23mDialog,"n23mDialog",p].filter(Boolean).join(" "),...h,style:{...r({"--dialog-wm":c}),...u},children:i("dialog",{className:[m?n.hasTitle:"",n.dialog].join(" "),"modal-mode":"mega",ref:b,onCancel:g,children:[o("div",{className:n.dialogCloseButton,style:{display:s?"block":"none"},children:o(a,{onClick:g,"aria-label":"close dialog",height:"25px",width:"auto",padding:"0 10px",backgroundColor:"#ff3333",children:o(t,{tag:"h2",mobileSize:14,desktopSize:14,color:"white",children:"Close"})})}),o("article",{children:d})]})})};s.displayName="Dialog";export{s as D};
1
+ import{jsx as o,jsxs as i}from"react/jsx-runtime";import{useRef as e,useEffect as l}from"react";import{B as a}from"./Button-BDPxqgFb.js";import{T as t}from"./TextBox-__k4jPYK.js";import{s as d,g as n}from"./style-inject.es-CrVRO2OA.js";var r={n23mDialog:"Dialog-module_n23mDialog__1y-5W",dialog:"Dialog-module_dialog__AbQKQ",dialogCloseButton:"Dialog-module_dialogCloseButton__idhtw"};d("@layer n23mDialog{.Dialog-module_n23mDialog__1y-5W{background-color:#fff;.Dialog-module_dialog__AbQKQ{corner-shape:squircle;border:1px solid #000;border-radius:12px;box-sizing:border-box;max-block-size:calc(100dvb - 50px);max-inline-size:min(calc(100vw - 20px),var(--dialog-wm,95%));min-height:100px;overscroll-behavior:none;padding:0;position:fixed;& .Dialog-module_dialogCloseButton__idhtw{position:absolute!important;right:10px;top:10px}article{margin-top:55px}&::backdrop{backdrop-filter:blur(5px);background-color:hsla(0,0%,100%,.15);bottom:0;left:0;position:fixed;right:0;top:0}}}}");const s=({children:d,open:s,widthMax:c,title:m,onCancel:g,className:p,style:u,...h})=>{const b=e(null);return l(()=>{if(!s){b.current?.classList.add(r.minimize);const o=setTimeout(()=>{b.current?.close(),b.current?.classList.remove(r.minimize),document.body.style.paddingRight="0",document.body.style.overflow=""},0);return()=>clearTimeout(o)}b.current?.showModal(),document.body.style.paddingRight=window.innerWidth-document.body.clientWidth+"px",document.body.style.overflow="hidden"},[s]),o("div",{className:[r.n23mDialog,"n23mDialog",p].filter(Boolean).join(" "),...h,style:{...n({"--dialog-wm":c}),...u},children:i("dialog",{className:[m?r.hasTitle:"",r.dialog].join(" "),"modal-mode":"mega",ref:b,onCancel:g,children:[o("div",{className:r.dialogCloseButton,style:{display:s?"block":"none"},children:o(a,{variant:"secondary",onClick:g,"aria-label":"close dialog",height:"25px",width:"auto",padding:"0 10px",children:o(t,{tag:"h2",mobileSize:14,desktopSize:14,color:"inherit",children:"Close"})})}),o("article",{children:d})]})})};s.displayName="Dialog";export{s as D};
package/lib/Form/index.js CHANGED
@@ -1 +1 @@
1
- export{F as Form}from"../Form-CgTuTB2Q.js";import"react/jsx-runtime";import"../LoaderDots-BoEg_zlZ.js";import"../TextBox-__k4jPYK.js";import"../style-inject.es-CrVRO2OA.js";
1
+ export{F as Form}from"../Form-GEUDMZ7Z.js";import"react/jsx-runtime";import"../LoaderDots-BoEg_zlZ.js";import"../TextBox-__k4jPYK.js";import"../style-inject.es-CrVRO2OA.js";import"../validator.const-LBF9whmW.js";
@@ -0,0 +1 @@
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{L as o}from"./LoaderDots-BoEg_zlZ.js";import{T as r}from"./TextBox-__k4jPYK.js";import{V as n}from"./validator.const-LBF9whmW.js";const s=({children:s,onSubmit:i,className:a,isError:m,isPending:c,isSuccess:l,errorMsg:p,successMsg:f,style:u,...d})=>e("form",{className:["n23mForm",a].filter(Boolean).join(" "),...d,style:{...u},onSubmit:e=>{e.preventDefault();const t=e.currentTarget;t&&Array.from(t.elements).forEach(e=>{(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement)&&e.dispatchEvent(new FocusEvent("focusout",{bubbles:!0}))});const o=Object.fromEntries(Array.from(t.elements).filter(e=>e instanceof HTMLInputElement&&""!==e.name||e instanceof HTMLTextAreaElement&&""!==e.name||e instanceof HTMLSelectElement&&""!==e.name).map(e=>[e.name,{error:e.className.includes("error"),value:e.value}]));i(o)},children:[s,m&&t(r,{tag:"p",color:n.error,mobileSize:12,desktopSize:12,margin:"15px 0 10px 0",fontWeight:400,children:p}),c&&t(o,{color:n.pending,mobileSize:12,desktopSize:12,fontWeight:400,margin:"15px 0 10px 0"}),l&&t(r,{tag:"p",color:n.success,mobileSize:12,desktopSize:12,margin:"15px 0 10px 0",fontWeight:400,children:f})]});s.displayName="Form";export{s as F};
@@ -1 +1 @@
1
- import{jsx as o,jsxs as r}from"react/jsx-runtime";import{B as e}from"../Button-QC014EKI.js";import{F as t}from"../Form-CgTuTB2Q.js";import{G as s}from"../Grid-DmI4tqqG.js";import{I as i}from"../Input-Bl7_BOs4.js";import{T as a}from"../TextBox-__k4jPYK.js";import{s as n}from"../style-inject.es-CrVRO2OA.js";import"react";import"../Loader-ZYEBOkbx.js";import"../LoaderDots-BoEg_zlZ.js";import"../validator/index.js";var l={n23mFormForgotPass:"FormForgotPass-module_n23mFormForgotPass__sI7QJ",forogotPasswordWrapper:"FormForgotPass-module_forogotPasswordWrapper__LCDpp"};n("@layer n23mFormForgotPass{.FormForgotPass-module_n23mFormForgotPass__sI7QJ{.FormForgotPass-module_forogotPasswordWrapper__LCDpp{corner-shape:squircle;background-color:#fff;border:1px solid grey;border-radius:12px}}}");const m=({className:n,style:m,onSubmit:p,isPending:d,isError:c,isSuccess:g,errorMsg:x,successMsg:f,onNavigate:h,footerHeight:u="100px",linkMainPage:F,linkLogin:b,...y})=>{const P=o=>{h?h(o):window.location.href=o};return o("div",{className:[l.n23mFormForgotPass,"n23mFormForgotPass",n].filter(Boolean).join(" "),...y,style:{...m},children:o(s,{layout:"flex",flexWrap:"wrap",justifyContent:"center",alignItems:"center",widthMax:"1400px",minHeight:`calc(100dvb - ${u})`,children:r(s,{layout:"container",minHeight:0,widthMin:"min(450px, calc(100% - 40px))",padding:"20px",margin:"20px",className:l.forogotPasswordWrapper,children:[F&&o(a,{desktopSize:20,mobileSize:20,fontWeight:500,tag:"a",href:F.link,color:"grey",colorHover:"var(--n23mTextBoxColorHover, black)",onClick:o=>{o.preventDefault(),P(F.link)},children:F.text}),o(a,{tag:"h3",desktopSize:14,mobileSize:14,fontWeight:500,margin:"12px 0 18px",children:"Forgot Password"}),r(t,{onSubmit:p,isError:c,isPending:d,isSuccess:g,errorMsg:x,successMsg:f,children:[o(i,{validatorOptions:[{type:"empty"},{type:"email"}],label:"Email",name:"email",type:"text",placeholder:"you@example.com"}),r(s,{layout:"flex",justifyContent:"space-between",alignItems:"flex-start",children:[o(e,{type:"submit",disabled:d,height:"40px",width:"auto",padding:"0 10px",backgroundColor:"orangered",backgroundColorDisabled:"grey",children:o(a,{tag:"span",desktopSize:16,mobileSize:16,fontWeight:400,color:"white",children:"Send"})}),b&&o(a,{tag:"a",href:b.link,desktopSize:12,mobileSize:12,fontWeight:400,color:"var(--n23mTextBoxColor, orangered)",colorHover:"var(--n23mTextBoxColorHover, black)",onClick:o=>{o.preventDefault(),P(b.link)},children:b.text})]})]})]})})})};m.displayName="FormForgotPass";export{m as FormForgotPass};
1
+ import{jsx as o,jsxs as r}from"react/jsx-runtime";import{B as e}from"../Button-BDPxqgFb.js";import{F as t}from"../Form-GEUDMZ7Z.js";import{G as s}from"../Grid-DmI4tqqG.js";import{I as i}from"../Input-BJj54qdT.js";import{T as a}from"../TextBox-__k4jPYK.js";import{T as n}from"../Typography-CR1DOKsN.js";import{s as m}from"../style-inject.es-CrVRO2OA.js";import"react";import"../LoaderDots-BoEg_zlZ.js";import"../validator.const-LBF9whmW.js";import"../Loader-ZYEBOkbx.js";import"../validator/index.js";var l={n23mFormForgotPass:"FormForgotPass-module_n23mFormForgotPass__sI7QJ",forogotPasswordWrapper:"FormForgotPass-module_forogotPasswordWrapper__LCDpp"};m("@layer n23mFormForgotPass{.FormForgotPass-module_n23mFormForgotPass__sI7QJ{.FormForgotPass-module_forogotPasswordWrapper__LCDpp{corner-shape:squircle;background-color:#fff;border:1px solid grey;border-radius:12px}}}");const p=({className:m,style:p,onSubmit:d,isPending:c,isError:g,isSuccess:f,errorMsg:u,successMsg:h,onNavigate:F,footerHeight:x="100px",linkMainPage:y,linkLogin:P,...j})=>{const b=o=>{F?F(o):window.location.href=o};return o("div",{className:[l.n23mFormForgotPass,"n23mFormForgotPass",m].filter(Boolean).join(" "),...j,style:{...p},children:o(s,{layout:"flex",flexWrap:"wrap",justifyContent:"center",alignItems:"center",widthMax:"1400px",minHeight:`calc(100dvb - ${x})`,children:r(s,{layout:"container",minHeight:0,widthMin:"min(450px, calc(100% - 40px))",padding:"20px",margin:"20px",className:l.forogotPasswordWrapper,children:[y&&o(n,{desktopSize:20,mobileSize:20,fontWeight:500,variant:"link",href:y.link,onClick:o=>{o.preventDefault(),b(y.link)},children:y.text}),o(a,{tag:"h3",desktopSize:14,mobileSize:14,fontWeight:500,margin:"12px 0 18px",children:"Forgot Password"}),r(t,{onSubmit:d,isError:g,isPending:c,isSuccess:f,errorMsg:u,successMsg:h,children:[o(i,{validatorOptions:[{type:"empty"},{type:"email"}],label:"Email",name:"email",type:"text",placeholder:"you@example.com"}),r(s,{layout:"flex",justifyContent:"space-between",alignItems:"flex-start",children:[o(e,{type:"submit",disabled:c,variant:"primary",children:o(a,{desktopSize:16,mobileSize:16,color:"inherit",children:"Send"})}),P&&o(n,{variant:"link",href:P.link,desktopSize:12,mobileSize:12,onClick:o=>{o.preventDefault(),b(P.link)},children:P.text})]})]})]})})})};p.displayName="FormForgotPass";export{p as FormForgotPass};
@@ -1 +1 @@
1
- import{jsx as r,jsxs as o}from"react/jsx-runtime";import{useRef as e}from"react";import{B as t}from"../Button-QC014EKI.js";import{F as s}from"../Form-CgTuTB2Q.js";import{G as a}from"../Grid-DmI4tqqG.js";import{I as n}from"../Input-Bl7_BOs4.js";import{T as i}from"../TextBox-__k4jPYK.js";import{s as p}from"../style-inject.es-CrVRO2OA.js";import"../Loader-ZYEBOkbx.js";import"../LoaderDots-BoEg_zlZ.js";import"../validator/index.js";var l={n23mFormForgotPassOtp:"FormForgotPassOtp-module_n23mFormForgotPassOtp__898ki",forogotPasswordOtpWrapper:"FormForgotPassOtp-module_forogotPasswordOtpWrapper__3s-uz"};p("@layer n23mFormForgotPassOtp{.FormForgotPassOtp-module_n23mFormForgotPassOtp__898ki{.FormForgotPassOtp-module_forogotPasswordOtpWrapper__3s-uz{corner-shape:squircle;background-color:#fff;border:1px solid grey;border-radius:12px}}}");const m=({className:p,style:m,onSubmit:c,isPending:d,isError:u,isSuccess:g,errorMsg:f,successMsg:h,onNavigate:F,footerHeight:b="100px",linkMainPage:w,...x})=>{const y=e(null),v=e(null),P=e(!1);return r("div",{className:[l.n23mFormForgotPassOtp,"n23mFormForgotPassOtp",p].filter(Boolean).join(" "),...x,style:{...m},children:r(a,{layout:"flex",flexWrap:"wrap",justifyContent:"center",alignItems:"center",widthMax:"1400px",minHeight:`calc(100dvb - ${b})`,children:o(a,{layout:"container",minHeight:0,widthMin:"min(450px, calc(100% - 40px))",padding:"20px",margin:"20px",className:l.forogotPasswordOtpWrapper,children:[w&&r(i,{desktopSize:20,mobileSize:20,fontWeight:500,tag:"a",href:w.link,color:"grey",colorHover:"var(--n23mTextBoxColorHover, black)",onClick:r=>{var o;r.preventDefault(),o=w.link,F?F(o):window.location.href=o},children:w.text}),r(i,{tag:"h3",desktopSize:14,mobileSize:14,fontWeight:500,margin:"12px 0 18px",children:"Change password"}),o(s,{onSubmit:c,isError:u,isPending:d,isSuccess:g,errorMsg:f,successMsg:h,children:[r(n,{inputRef:y,label:"New password",type:"password",name:"pass",validatorOptions:[{type:"empty"},{type:"equal",options:{ref:v}}],placeholder:"Create a new password",onBlur:()=>{P.current||y.current?.value&&v.current?.value&&(P.current=!0,v.current?.dispatchEvent(new FocusEvent("focusout",{bubbles:!0})),P.current=!1)}}),r(n,{inputRef:v,label:"Confirm new password",type:"password",name:"confirmPass",validatorOptions:[{type:"empty"},{type:"equal",options:{ref:y}}],placeholder:"Re-enter your new password",onBlur:()=>{P.current||y.current?.value&&v.current?.value&&(P.current=!0,y.current?.dispatchEvent(new FocusEvent("focusout",{bubbles:!0})),P.current=!1)}}),r(t,{type:"submit",disabled:d,height:"40px",width:"auto",padding:"0 10px",backgroundColor:"orangered",backgroundColorDisabled:"grey",children:r(i,{tag:"span",desktopSize:16,mobileSize:16,fontWeight:400,color:"white",children:"Send"})})]})]})})})};m.displayName="FormForgotPassOtp";export{m as FormForgotPassOtp};
1
+ import{jsx as r,jsxs as o}from"react/jsx-runtime";import{useRef as e}from"react";import{B as t}from"../Button-BDPxqgFb.js";import{F as s}from"../Form-GEUDMZ7Z.js";import{G as a}from"../Grid-DmI4tqqG.js";import{I as i}from"../Input-BJj54qdT.js";import{T as n}from"../TextBox-__k4jPYK.js";import{T as p}from"../Typography-CR1DOKsN.js";import{s as l}from"../style-inject.es-CrVRO2OA.js";import"../LoaderDots-BoEg_zlZ.js";import"../validator.const-LBF9whmW.js";import"../Loader-ZYEBOkbx.js";import"../validator/index.js";var m={n23mFormForgotPassOtp:"FormForgotPassOtp-module_n23mFormForgotPassOtp__898ki",forogotPasswordOtpWrapper:"FormForgotPassOtp-module_forogotPasswordOtpWrapper__3s-uz"};l("@layer n23mFormForgotPassOtp{.FormForgotPassOtp-module_n23mFormForgotPassOtp__898ki{.FormForgotPassOtp-module_forogotPasswordOtpWrapper__3s-uz{corner-shape:squircle;background-color:#fff;border:1px solid grey;border-radius:12px}}}");const c=({className:l,style:c,onSubmit:u,isPending:d,isError:g,isSuccess:f,errorMsg:h,successMsg:F,onNavigate:w,footerHeight:y="100px",linkMainPage:b,...v})=>{const x=e(null),P=e(null),O=e(!1);return r("div",{className:[m.n23mFormForgotPassOtp,"n23mFormForgotPassOtp",l].filter(Boolean).join(" "),...v,style:{...c},children:r(a,{layout:"flex",flexWrap:"wrap",justifyContent:"center",alignItems:"center",widthMax:"1400px",minHeight:`calc(100dvb - ${y})`,children:o(a,{layout:"container",minHeight:0,widthMin:"min(450px, calc(100% - 40px))",padding:"20px",margin:"20px",className:m.forogotPasswordOtpWrapper,children:[b&&r(p,{desktopSize:20,mobileSize:20,fontWeight:500,variant:"link",href:b.link,onClick:r=>{var o;r.preventDefault(),o=b.link,w?w(o):window.location.href=o},children:b.text}),r(n,{tag:"h3",desktopSize:14,mobileSize:14,fontWeight:500,margin:"12px 0 18px",children:"Change password"}),o(s,{onSubmit:u,isError:g,isPending:d,isSuccess:f,errorMsg:h,successMsg:F,children:[r(i,{inputRef:x,label:"New password",type:"password",name:"pass",validatorOptions:[{type:"empty"},{type:"equal",options:{ref:P}}],placeholder:"Create a new password",onBlur:()=>{O.current||x.current?.value&&P.current?.value&&(O.current=!0,P.current?.dispatchEvent(new FocusEvent("focusout",{bubbles:!0})),O.current=!1)}}),r(i,{inputRef:P,label:"Confirm new password",type:"password",name:"confirmPass",validatorOptions:[{type:"empty"},{type:"equal",options:{ref:x}}],placeholder:"Re-enter your new password",onBlur:()=>{O.current||x.current?.value&&P.current?.value&&(O.current=!0,x.current?.dispatchEvent(new FocusEvent("focusout",{bubbles:!0})),O.current=!1)}}),r(t,{type:"submit",disabled:d,variant:"primary",children:r(n,{desktopSize:16,mobileSize:16,color:"inherit",children:"Send"})})]})]})})})};c.displayName="FormForgotPassOtp";export{c as FormForgotPassOtp};
@@ -1 +1 @@
1
- import{jsx as o,jsxs as e}from"react/jsx-runtime";import{B as r}from"../Button-QC014EKI.js";import{F as i}from"../Form-CgTuTB2Q.js";import{G as t}from"../Grid-DmI4tqqG.js";import{I as n}from"../Input-Bl7_BOs4.js";import{T as l}from"../TextBox-__k4jPYK.js";import{s as a}from"../style-inject.es-CrVRO2OA.js";import"react";import"../Loader-ZYEBOkbx.js";import"../LoaderDots-BoEg_zlZ.js";import"../validator/index.js";var s={n23mFormLogin:"FormLogin-module_n23mFormLogin__1mOEk",loginWrapper:"FormLogin-module_loginWrapper__HOEgv"};a("@layer n23mFormLogin{.FormLogin-module_n23mFormLogin__1mOEk{.FormLogin-module_loginWrapper__HOEgv{corner-shape:squircle;background-color:#fff;border:1px solid grey;border-radius:12px}}}");const m=({className:a,style:m,onSubmit:p,isPending:d,isError:c,isSuccess:g,errorMsg:x,successMsg:h,onNavigate:u,linkMainPage:f,linkForgotPassword:y,linkSignUp:v,footerHeight:k="100px",...b})=>{const j=o=>{u?u(o):window.location.href=o};return o("div",{className:[s.n23mFormLogin,"n23mFormLogin",a].filter(Boolean).join(" "),...b,style:{...m},children:o(t,{layout:"flex",flexWrap:"wrap",justifyContent:"center",alignItems:"center",widthMax:"1400px",minHeight:`calc(100dvb - ${k})`,children:e(t,{layout:"container",minHeight:0,widthMin:"min(450px, calc(100% - 40px))",padding:"20px",margin:"20px",className:s.loginWrapper,children:[f&&o(l,{desktopSize:20,mobileSize:20,fontWeight:500,tag:"a",href:f.link,color:"grey",colorHover:"var(--n23mTextBoxColorHover, black)",onClick:o=>{o.preventDefault(),j("/")},children:f.text}),o(l,{tag:"h3",desktopSize:14,mobileSize:14,fontWeight:500,margin:"12px 0 18px",children:"Good to see you!"}),e(i,{onSubmit:p,isError:c,isPending:d,isSuccess:g,errorMsg:x,successMsg:h,children:[o(n,{validatorOptions:[{type:"empty"},{type:"email"}],label:"Email",name:"email",type:"text",placeholder:"you@example.com"}),o(n,{label:"Password",type:"password",name:"pass",validatorOptions:[{type:"empty"}],placeholder:"Enter your password"}),e(t,{layout:"flex",justifyContent:"space-between",alignItems:"flex-start",children:[o(r,{type:"submit",disabled:d,height:"40px",width:"auto",padding:"0 10px",backgroundColor:"orangered",backgroundColorDisabled:"grey",children:o(l,{tag:"span",desktopSize:16,mobileSize:16,fontWeight:400,color:"white",children:"Log in"})}),e("div",{children:[y&&o("div",{children:o(l,{tag:"a",href:y.link,desktopSize:12,mobileSize:12,fontWeight:400,color:"var(--n23mTextBoxColor, orangered)",colorHover:"var(--n23mTextBoxColorHover, black)",onClick:o=>{o.preventDefault(),j(y.link)},children:y.text})}),v&&o(t,{layout:"flex",justifyContent:"right",children:o(l,{tag:"a",href:v.link,desktopSize:12,mobileSize:12,fontWeight:400,color:"var(--n23mTextBoxColor, orangered)",colorHover:"var(--n23mTextBoxColorHover, black)",onClick:o=>{o.preventDefault(),j(v.link)},children:v.text})})]})]})]})]})})})};m.displayName="FormLogin";export{m as FormLogin};
1
+ import{jsx as e,jsxs as i}from"react/jsx-runtime";import{B as o}from"../Button-BDPxqgFb.js";import{F as r}from"../Form-GEUDMZ7Z.js";import{G as n}from"../Grid-DmI4tqqG.js";import{I as t}from"../Input-BJj54qdT.js";import{T as a}from"../TextBox-__k4jPYK.js";import{T as l}from"../Typography-CR1DOKsN.js";import{s}from"../style-inject.es-CrVRO2OA.js";import"react";import"../LoaderDots-BoEg_zlZ.js";import"../validator.const-LBF9whmW.js";import"../Loader-ZYEBOkbx.js";import"../validator/index.js";var m={n23mFormLogin:"FormLogin-module_n23mFormLogin__1mOEk",loginWrapper:"FormLogin-module_loginWrapper__HOEgv"};s("@layer n23mFormLogin{.FormLogin-module_n23mFormLogin__1mOEk{.FormLogin-module_loginWrapper__HOEgv{corner-shape:squircle;background-color:#fff;border:1px solid grey;border-radius:12px}}}");const p=({className:s,style:p,onSubmit:d,isPending:c,isError:g,isSuccess:h,errorMsg:f,successMsg:u,onNavigate:y,linkMainPage:x,linkForgotPassword:k,linkSignUp:v,footerHeight:b="100px",...j})=>{const S=e=>{y?y(e):window.location.href=e};return e("div",{className:[m.n23mFormLogin,"n23mFormLogin",s].filter(Boolean).join(" "),...j,style:{...p},children:e(n,{layout:"flex",flexWrap:"wrap",justifyContent:"center",alignItems:"center",widthMax:"1400px",minHeight:`calc(100dvb - ${b})`,children:i(n,{layout:"container",minHeight:0,widthMin:"min(450px, calc(100% - 40px))",padding:"20px",margin:"20px",className:m.loginWrapper,children:[x&&e(l,{desktopSize:20,mobileSize:20,fontWeight:500,variant:"link",href:x.link,onClick:e=>{e.preventDefault(),S(x.link)},children:x.text}),e(a,{tag:"h3",desktopSize:14,mobileSize:14,fontWeight:500,margin:"12px 0 18px",children:"Good to see you!"}),i(r,{onSubmit:d,isError:g,isPending:c,isSuccess:h,errorMsg:f,successMsg:u,children:[e(t,{validatorOptions:[{type:"empty"},{type:"email"}],label:"Email",name:"email",type:"text",placeholder:"you@example.com"}),e(t,{label:"Password",type:"password",name:"pass",validatorOptions:[{type:"empty"}],placeholder:"Enter your password"}),i(n,{layout:"flex",justifyContent:"space-between",alignItems:"flex-start",children:[e(o,{type:"submit",disabled:c,variant:"primary",children:e(a,{desktopSize:16,mobileSize:16,color:"inherit",children:"Log in"})}),i("div",{children:[k&&e("div",{children:e(l,{variant:"link",href:k.link,desktopSize:12,mobileSize:12,onClick:e=>{e.preventDefault(),S(k.link)},children:k.text})}),v&&e(n,{layout:"flex",justifyContent:"right",children:e(l,{variant:"link",href:v.link,desktopSize:12,mobileSize:12,onClick:e=>{e.preventDefault(),S(v.link)},children:v.text})})]})]})]})]})})})};p.displayName="FormLogin";export{p as FormLogin};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as r}from"react/jsx-runtime";import{B as o}from"../Button-QC014EKI.js";import{F as i}from"../Form-CgTuTB2Q.js";import{G as n}from"../Grid-DmI4tqqG.js";import{I as t}from"../Input-Bl7_BOs4.js";import{T as a}from"../TextBox-__k4jPYK.js";import{s as l}from"../style-inject.es-CrVRO2OA.js";import"react";import"../Loader-ZYEBOkbx.js";import"../LoaderDots-BoEg_zlZ.js";import"../validator/index.js";var s={n23mFormSignUp:"FormSignUp-module_n23mFormSignUp__p9dT2",signUpWrapper:"FormSignUp-module_signUpWrapper__PcjYN"};l("@layer n23mFormSignUp{.FormSignUp-module_n23mFormSignUp__p9dT2{.FormSignUp-module_signUpWrapper__PcjYN{corner-shape:squircle;background-color:#fff;border:1px solid grey;border-radius:12px}}}");const p=({className:l,style:p,onSubmit:m,isPending:d,isError:c,isSuccess:g,errorMsg:u,successMsg:x,onNavigate:h,footerHeight:f="100px",linkMainPage:S,linkLogin:y,...b})=>{const k=e=>{h?h(e):window.location.href=e};return e("div",{className:[s.n23mFormSignUp,"n23mFormSignUp",l].filter(Boolean).join(" "),...b,style:{...p},children:e(n,{layout:"flex",flexWrap:"wrap",justifyContent:"center",alignItems:"center",widthMax:"1400px",minHeight:`calc(100dvb - ${f})`,children:r(n,{layout:"container",minHeight:0,widthMin:"min(450px, calc(100% - 40px))",padding:"20px",margin:"20px",className:s.signUpWrapper,children:[S&&e(a,{desktopSize:20,mobileSize:20,fontWeight:500,tag:"a",href:S.link,color:"grey",colorHover:"var(--n23mTextBoxColorHover, black)",onClick:e=>{e.preventDefault(),k(S.link)},children:S.text}),e(a,{tag:"h3",desktopSize:14,mobileSize:14,fontWeight:500,margin:"12px 0 18px",children:"Create an account now!"}),r(i,{onSubmit:m,isError:c,isPending:d,isSuccess:g,errorMsg:u,successMsg:x,children:[e(t,{validatorOptions:[{type:"empty"},{type:"email"}],label:"Email",name:"email",type:"text",placeholder:"you@example.com"}),e(t,{label:"Password",type:"password",name:"pass",validatorOptions:[{type:"empty"}],placeholder:"Enter your password"}),r(n,{layout:"flex",justifyContent:"space-between",alignItems:"flex-start",children:[e(o,{type:"submit",disabled:d,height:"40px",width:"auto",padding:"0 10px",backgroundColor:"orangered",backgroundColorDisabled:"grey",children:e(a,{tag:"span",desktopSize:16,mobileSize:16,fontWeight:400,color:"white",children:"Sign up"})}),y&&e("div",{children:e(a,{tag:"a",href:y.link,desktopSize:12,mobileSize:12,fontWeight:400,color:"var(--n23mTextBoxColor, orangered)",colorHover:"var(--n23mTextBoxColorHover, black)",onClick:e=>{e.preventDefault(),k(y.link)},children:y.text})})]})]})]})})})};p.displayName="FormSignUp";export{p as FormSignUp};
1
+ import{jsx as e,jsxs as i}from"react/jsx-runtime";import{B as r}from"../Button-BDPxqgFb.js";import{F as o}from"../Form-GEUDMZ7Z.js";import{G as n}from"../Grid-DmI4tqqG.js";import{I as t}from"../Input-BJj54qdT.js";import{T as a}from"../TextBox-__k4jPYK.js";import{T as s}from"../Typography-CR1DOKsN.js";import{s as p}from"../style-inject.es-CrVRO2OA.js";import"react";import"../LoaderDots-BoEg_zlZ.js";import"../validator.const-LBF9whmW.js";import"../Loader-ZYEBOkbx.js";import"../validator/index.js";var l={n23mFormSignUp:"FormSignUp-module_n23mFormSignUp__p9dT2",signUpWrapper:"FormSignUp-module_signUpWrapper__PcjYN"};p("@layer n23mFormSignUp{.FormSignUp-module_n23mFormSignUp__p9dT2{.FormSignUp-module_signUpWrapper__PcjYN{corner-shape:squircle;background-color:#fff;border:1px solid grey;border-radius:12px}}}");const m=({className:p,style:m,onSubmit:c,isPending:d,isError:g,isSuccess:u,errorMsg:f,successMsg:h,onNavigate:x,footerHeight:y="100px",linkMainPage:S,linkLogin:j,...b})=>{const k=e=>{x?x(e):window.location.href=e};return e("div",{className:[l.n23mFormSignUp,"n23mFormSignUp",p].filter(Boolean).join(" "),...b,style:{...m},children:e(n,{layout:"flex",flexWrap:"wrap",justifyContent:"center",alignItems:"center",widthMax:"1400px",minHeight:`calc(100dvb - ${y})`,children:i(n,{layout:"container",minHeight:0,widthMin:"min(450px, calc(100% - 40px))",padding:"20px",margin:"20px",className:l.signUpWrapper,children:[S&&e(s,{desktopSize:20,mobileSize:20,fontWeight:500,variant:"link",href:S.link,onClick:e=>{e.preventDefault(),k(S.link)},children:S.text}),e(a,{tag:"h3",desktopSize:14,mobileSize:14,fontWeight:500,margin:"12px 0 18px",children:"Create an account now!"}),i(o,{onSubmit:c,isError:g,isPending:d,isSuccess:u,errorMsg:f,successMsg:h,children:[e(t,{validatorOptions:[{type:"empty"},{type:"email"}],label:"Email",name:"email",type:"text",placeholder:"you@example.com"}),e(t,{label:"Password",type:"password",name:"pass",validatorOptions:[{type:"empty"}],placeholder:"Enter your password"}),i(n,{layout:"flex",justifyContent:"space-between",alignItems:"flex-start",children:[e(r,{type:"submit",disabled:d,variant:"primary",children:e(a,{desktopSize:16,mobileSize:16,color:"inherit",children:"Sign up"})}),j&&e("div",{children:e(s,{variant:"link",href:j.link,desktopSize:12,mobileSize:12,onClick:e=>{e.preventDefault(),k(j.link)},children:j.text})})]})]})]})})})};m.displayName="FormSignUp";export{m as FormSignUp};
@@ -0,0 +1 @@
1
+ import{jsx as o,jsxs as i}from"react/jsx-runtime";const e=({width:i,height:e,color:t="currentColor"})=>o("svg",{viewBox:"-16 0 320 512",width:i,height:e,fill:t,children:o("path",{d:"M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"})});e.displayName="IconArrowLeft";const t=({width:i,height:e,color:t="currentColor"})=>o("svg",{viewBox:"16 0 320 512",width:i,height:e,fill:t,children:o("path",{d:"M278.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-160 160c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L210.7 256 73.4 118.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l160 160z"})});t.displayName="IconArrowRight";const h=({width:e,height:t,color:h="currentColor",open:c=!1})=>i("svg",{viewBox:"0 0 24 24",width:e,height:t,fill:"none",stroke:h,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[o("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4"}),o("path",{d:"M3 7a4 4 0 0 1 4-4h2v18H7a4 4 0 0 1-4-4z",fill:c?h:"none"})]});h.displayName="IconAside";const c=({width:e,height:t,color:h="currentColor"})=>i("svg",{width:e,height:t,viewBox:"0 0 24 24",fill:"none",stroke:h,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),o("polyline",{points:"15 3 21 3 21 9"}),o("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]});c.displayName="IconBoxWithArrow";const r=({width:e,height:t,color:h="currentColor"})=>o("svg",{viewBox:"0 -20 492.589 492.589",width:e,height:t,fill:h,children:i("g",{children:[o("path",{d:"M468.467,222.168h-28.329c-9.712-89.679-80.46-161.18-169.71-172.258V24.135c0-13.338-10.791-24.134-24.134-24.134 c-13.311,0-24.117,10.796-24.117,24.134V49.91C132.924,60.988,62.177,132.488,52.482,222.168H24.153 C10.806,222.168,0,232.964,0,246.286c0,13.336,10.806,24.132,24.153,24.132h29.228c12.192,86.816,81.551,155.4,168.797,166.229 v31.804c0,13.336,10.806,24.135,24.117,24.135c13.343,0,24.134-10.799,24.134-24.135v-31.804 c87.228-10.829,156.607-79.413,168.775-166.229h29.264c13.33,0,24.122-10.796,24.122-24.132 C492.589,232.964,481.797,222.168,468.467,222.168z M246.294,398.093c-85.345,0-154.804-69.453-154.804-154.813 c0-85.363,69.459-154.813,154.804-154.813c85.376,0,154.823,69.45,154.823,154.813 C401.117,328.639,331.671,398.093,246.294,398.093z"}),o("path",{d:"M246.294,176.93c-36.628,0-66.34,29.704-66.34,66.349c0,36.635,29.711,66.349,66.34,66.349 c36.66,0,66.34-29.713,66.34-66.349C312.634,206.635,282.955,176.93,246.294,176.93z"})]})});r.displayName="IconLocate";export{e as I,t as a,h as b,c,r as d};
@@ -1 +1 @@
1
- export{I as IconArrowLeft,a as IconArrowRight,b as IconAside,c as IconBoxWithArrow,d as IconLocate}from"../IconLocate-CQda7FAB.js";import"react/jsx-runtime";
1
+ export{I as IconArrowLeft,a as IconArrowRight,b as IconAside,c as IconBoxWithArrow,d as IconLocate}from"../IconLocate-BXomEqkx.js";import"react/jsx-runtime";
@@ -1 +1 @@
1
- export{I as Input}from"../Input-Bl7_BOs4.js";import"react/jsx-runtime";import"react";import"../TextBox-__k4jPYK.js";import"../style-inject.es-CrVRO2OA.js";import"../validator/index.js";
1
+ export{I as Input}from"../Input-BJj54qdT.js";import"react/jsx-runtime";import"react";import"../TextBox-__k4jPYK.js";import"../style-inject.es-CrVRO2OA.js";import"../validator/index.js";import"../validator.const-LBF9whmW.js";
@@ -0,0 +1 @@
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useRef as n,useEffect as r}from"react";import{T as o}from"./TextBox-__k4jPYK.js";import{s as a,g as i}from"./style-inject.es-CrVRO2OA.js";import{validator as l}from"./validator/index.js";import{V as p}from"./validator.const-LBF9whmW.js";var u={n23mInput:"Input-module_n23mInput__6WopW",n23mInputInput:"Input-module_n23mInputInput__djmAy"};a("@layer n23mInput{.Input-module_n23mInput__6WopW{--iff:-apple-system,BlinkMacSystemFont,avenir next,avenir,segoe ui,helvetica neue,helvetica,Cantarell,Ubuntu,roboto,noto,arial,sans-serif;margin-top:0;&:not(:has(input[type=hidden])){margin-bottom:10px}.Input-module_n23mInputInput__djmAy{display:grid;& input,& textarea{corner-shape:squircle;border:1px solid var(--input-cb,#000);border-radius:12px;box-sizing:border-box;color:var(--input-c,#000);font-family:var(--n23mFontFamily,var(--iff));font-size:16px;font-weight:500;&:disabled{-webkit-text-fill-color:#8a8a8a;background-color:#f3f3f3;border-color:#cfcfcf;color:#8a8a8a;cursor:not-allowed;opacity:1}}& input{height:40px;padding:20px 10px;width:100%}& textarea{field-sizing:content;block-size:100%;max-height:400px;min-height:200px;padding:10px;resize:vertical}&input[type=hidden]{margin:0;padding:0}& ::placeholder{filter:brightness(125%);font-weight:300}}.Input-module_n23mInputError__0yrzG{color:var(--najwer23snacks-input-error-font-color);font-family:var(--najwer23snacks-input-error-font-family);font-size:var(--najwer23snacks-input-error-font-size);font-weight:var(--najwer23snacks-input-error-font-weight);line-height:1;margin:2px}}}");const s=e=>{for(const t of[":autofill",":-webkit-autofill"])try{if(e.matches(t))return!0}catch{}return!1},c=({className:a,style:c,name:d,label:m,inputRef:f,placeholder:h,type:g="text",labelColor:x="black",kind:v="input",inputColor:b,inputColorBorder:y,defaultValue:I,disabled:_,validatorOptions:C,value:j,autoComplete:k,id:w,onBlur:z,onChange:B,step:S,...T})=>{const W=n(null),V=n(null),F=e=>{if(W.current&&(W.current.textContent=""),!C)return;const t=l(e.value,C);t.length>0?(W.current&&(W.current.textContent=t[0]),e.classList.add("error")):e.classList.remove("error")},N=e=>{z?.(e);const t=e.target;document.activeElement!==t&&F(t)},E=e=>{B?.(e);const t=e.target;((e=>{const{inputType:t}=e.nativeEvent;return!t||"insertReplacementText"===t||s(e.target)})(e)||t.classList.contains("error"))&&F(t)};return r(()=>{const e=setTimeout(()=>{const e=V.current?.querySelector("input, textarea");e&&e.value&&s(e)&&F(e)},300);return()=>clearTimeout(e)},[]),e("div",{ref:V,className:[u.n23mInput,"n23mInput",a].filter(Boolean).join(" "),...T,style:{...i({"--input-c":b,"--input-cb":y}),...c},children:["hidden"!==g&&t(o,{mobileSize:14,desktopSize:14,tag:"label",fontWeight:400,color:x,htmlFor:"select"===v?w:d,children:m}),e("div",{className:u.n23mInputInput,children:["input"===v&&t("input",{ref:f,id:d,name:d,type:g,onBlur:N,onChange:E,placeholder:h,defaultValue:I,disabled:_,value:j,autoComplete:k,step:S}),"textarea"===v&&t("textarea",{autoComplete:k,id:d,name:d,onBlur:N,onChange:E,placeholder:h,defaultValue:I,disabled:_,value:j,ref:f}),"select"===v&&t("input",{id:w,autoComplete:"off",ref:f,type:g,onBlur:N,onChange:E,placeholder:h,defaultValue:I,disabled:_,value:j,step:S})]}),"hidden"!==g&&t(o,{ref:W,mobileSize:12,desktopSize:12,tag:"p",fontWeight:400,color:p.error,lineHeight:"14px",margin:"2px 0 2px"})]})};c.displayName="Input";export{c as I};
@@ -1 +1 @@
1
- import{jsxs as a,jsx as o,Fragment as i}from"react/jsx-runtime";import{useRef as e,useState as r,useLayoutEffect as n}from"react";import{B as t}from"../Button-QC014EKI.js";import{G as d}from"../Grid-DmI4tqqG.js";import{u as s}from"../useWindowSize-CAQRbyxi.js";import{b as l}from"../IconLocate-CQda7FAB.js";import{N as g}from"../NavigationTabs-CWkGtNHu.js";import{T as b}from"../TextBox-__k4jPYK.js";import{s as h,g as m}from"../style-inject.es-CrVRO2OA.js";import"../Loader-ZYEBOkbx.js";import"../LoaderDots-BoEg_zlZ.js";var v={n23mNavigationDashboard:"NavigationDashboard-module_n23mNavigationDashboard__DaVvB",dragging:"NavigationDashboard-module_dragging__gT3R-",row:"NavigationDashboard-module_row__0hfcb",sidebarContainer:"NavigationDashboard-module_sidebarContainer__yDMvb",sticky:"NavigationDashboard-module_sticky__mJ3qk",rowOpen:"NavigationDashboard-module_rowOpen__R8X9U",sidebarContainerOpen:"NavigationDashboard-module_sidebarContainerOpen__a5s0j",sidebarContainerClosed:"NavigationDashboard-module_sidebarContainerClosed__MtEom",asideInner:"NavigationDashboard-module_asideInner__6XAWJ",sidebarOpen:"NavigationDashboard-module_sidebarOpen__p8DGE",sidebarClosed:"NavigationDashboard-module_sidebarClosed__WCDNU",outlet:"NavigationDashboard-module_outlet__ZDTtw",outletContent:"NavigationDashboard-module_outletContent__d1Xs6",toggleAnchor:"NavigationDashboard-module_toggleAnchor__s9fbs",toggleOpen:"NavigationDashboard-module_toggleOpen__m8fxh",toggleClosed:"NavigationDashboard-module_toggleClosed__efOTE",rowNoAside:"NavigationDashboard-module_rowNoAside__v3MDd",outletNoAside:"NavigationDashboard-module_outletNoAside__whzV-"};h("@layer n23mNavigationDashboard{.NavigationDashboard-module_n23mNavigationDashboard__DaVvB{--navigationdashboard-sidebar-w:300px;--navigationdashboard-sidebar-min:200px;--navigationdashboard-sidebar-border:2px;--navigationdashboard-toggle-nudge:0px;--navigationdashboard-sidebar-duration:450ms;--navigationdashboard-sidebar-easing:cubic-bezier(0.22,1,0.36,1);&.NavigationDashboard-module_dragging__gT3R-{cursor:col-resize;user-select:none}&.NavigationDashboard-module_dragging__gT3R- .NavigationDashboard-module_row__0hfcb,&.NavigationDashboard-module_dragging__gT3R- .NavigationDashboard-module_sidebarContainer__yDMvb,&.NavigationDashboard-module_dragging__gT3R- .NavigationDashboard-module_sticky__mJ3qk{transition:none}&[data-collapsing=true] .NavigationDashboard-module_sticky__mJ3qk{opacity:.45}.NavigationDashboard-module_row__0hfcb{display:grid;grid-template-columns:0 minmax(0,1fr);min-width:0;overflow-x:clip;transition:grid-template-columns var(--navigationdashboard-sidebar-duration) var(--navigationdashboard-sidebar-easing);width:100%}.NavigationDashboard-module_rowOpen__R8X9U{grid-template-columns:var(--navigationdashboard-sidebar-w) minmax(0,1fr)}.NavigationDashboard-module_sidebarContainer__yDMvb{border-right:var(--navigationdashboard-sidebar-border) solid transparent;box-sizing:border-box;min-width:0;overflow:clip;position:relative;transition:border-right-color var(--navigationdashboard-sidebar-duration) var(--navigationdashboard-sidebar-easing)}.NavigationDashboard-module_sidebarContainerOpen__a5s0j{border-right-color:#e1dfdf}.NavigationDashboard-module_sidebarContainerClosed__MtEom{border-right-color:transparent}.NavigationDashboard-module_sticky__mJ3qk{-ms-overflow-style:none;-webkit-overflow-scrolling:touch;box-sizing:border-box;height:calc(100dvh - var(--navigationdashboard-h, 0px));min-width:0;opacity:1;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding:20px 30px 20px 20px;position:sticky;scrollbar-width:none;top:var(--navigationdashboard-h,0);transform:translateZ(0);transition:transform var(--navigationdashboard-sidebar-duration) var(--navigationdashboard-sidebar-easing),opacity .3s ease;width:100%;will-change:transform;&::-webkit-scrollbar{display:none}}.NavigationDashboard-module_asideInner__6XAWJ{box-sizing:border-box;min-width:0;width:calc(max(var(--navigationdashboard-sidebar-min), var(--navigationdashboard-sidebar-w)) - 52px)}.NavigationDashboard-module_asideInner__6XAWJ>*{height:auto;max-height:none;overflow:visible}.NavigationDashboard-module_sidebarOpen__p8DGE{opacity:1}.NavigationDashboard-module_sidebarClosed__WCDNU{opacity:0;pointer-events:none}.NavigationDashboard-module_outlet__ZDTtw{box-sizing:border-box;min-width:0;padding:20px 0 20px 20px;position:relative;width:100%}.NavigationDashboard-module_outletContent__d1Xs6{min-width:0;width:100%}.NavigationDashboard-module_toggleAnchor__s9fbs{height:0;margin-left:-20px;position:sticky;top:calc(var(--navigationdashboard-h, 0px) + (100dvh - var(--navigationdashboard-h, 0px))/2);width:0}.NavigationDashboard-module_toggleOpen__m8fxh{cursor:col-resize;transform:translate(calc(-50% - var(--navigationdashboard-sidebar-border)/2 + var(--navigationdashboard-toggle-nudge)),-50%)}.NavigationDashboard-module_toggleClosed__efOTE{cursor:col-resize;transform:translate(-4px,-50%)}.NavigationDashboard-module_rowNoAside__v3MDd{grid-template-columns:minmax(0,1fr);transition:none}.NavigationDashboard-module_outletNoAside__whzV-{min-width:0}}}");const c=768,u=({children:h,className:u,style:_,menuTopLeftColumn:p=o(i,{children:"menuTopLeftColumn"}),menuTopRightColumn:w=o(i,{children:"menuTopRightColumn"}),menuMobile:N=o(i,{children:"menuMobile"}),outlet:D=o(i,{children:"outlet"}),aside:x=o(i,{children:"aside"}),...f})=>{const C=e(null),y=e(null),{width:k}=s(),O=null!=x&&!1!==x&&k>=c,[j,T]=r(k>=c),[M,z]=r(300),[A,E]=r(!1),L=O&&j,R=e(null),F=e(300),X=e(!1),P=()=>{T(!(k<c)&&(a=>!a))},B=()=>{const a=R.current,o=C.current;if(R.current=null,!a?.moved||!o)return;X.current=!0,o.dataset.collapsing="false";const i=F.current;if(i<220)o.style.setProperty("--navigationdashboard-sidebar-w",`${M}px`),T(!1);else{const a=Math.min(480,Math.max(300,i));o.style.setProperty("--navigationdashboard-sidebar-w",`${a}px`),F.current=a,z(a),T(!0)}E(!1)};return n(()=>{k<c&&T(!1)},[k]),n(()=>{const a=C.current;a&&a.style.setProperty("--navigationdashboard-sidebar-w",`${M}px`)},[M]),n(()=>{const a=C.current,o=y.current;if(!a||!o)return;let i=0;const e=()=>{i=0;const e=Math.max(0,o.getBoundingClientRect().bottom);a.style.setProperty("--navigationdashboard-h",`${e}px`)},r=()=>{i||(i=requestAnimationFrame(e))};e(),window.addEventListener("scroll",r,{passive:!0}),window.addEventListener("resize",r),window.addEventListener("pageshow",r),window.visualViewport?.addEventListener("resize",r);const n=new ResizeObserver(r);return n.observe(o),()=>{window.removeEventListener("scroll",r),window.removeEventListener("resize",r),window.removeEventListener("pageshow",r),window.visualViewport?.removeEventListener("resize",r),n.disconnect(),cancelAnimationFrame(i)}},[]),a("div",{ref:C,className:[v.n23mNavigationDashboard,"n23mNavigationDashboard",A&&v.dragging,u].filter(Boolean).join(" "),...f,style:{...m({"--navigationdashboard-sidebar-w":`${M}px`,"--navigationdashboard-sidebar-min":"300px"}),..._},children:[o("div",{ref:y,children:o(g,{widthInnerContainer:"100%",widthMainContainer:"100%",menuOnlyTop:!0,menuTopLeftColumn:a(d,{layout:"flex",justifyContent:"flex-start",gap:{col:"15px",row:"0px"},alignItems:"center",minHeight:"100%",children:[O&&o(d,{layout:"flex",justifyContent:"flex-start",margin:0,children:o(t,{onClick:P,height:"40px",width:"40px",backgroundColor:"#F2F0EF",backgroundColorDisabled:"#F2F0EF",borderColor:"black",children:o(b,{tag:"div",mobileSize:0,desktopSize:0,margin:"2px 0 0",children:o(l,{open:j,width:20,height:20})})})}),o("div",{children:p})]}),menuTopRightColumn:w,menuMobile:N})}),o(d,{layout:"container",padding:"0 20px 0 0",widthMin:"100%",children:a("div",{className:[v.row,O?L&&v.rowOpen:v.rowNoAside].filter(Boolean).join(" "),children:[O&&o("div",{className:[v.sidebarContainer,L?v.sidebarContainerOpen:v.sidebarContainerClosed].join(" "),children:o("div",{className:[v.sticky,L?v.sidebarOpen:v.sidebarClosed].join(" "),children:o("div",{className:v.asideInner,children:x})})}),a("div",{className:[v.outlet,!O&&v.outletNoAside].filter(Boolean).join(" "),children:[O&&o("div",{className:v.toggleAnchor,children:o(t,{height:"60px",width:"10px",backgroundColor:"#F2F0EF",borderColor:"black",type:"button",onClick:()=>{X.current?X.current=!1:P()},onPointerDown:a=>{if(X.current=!1,0!==a.button||k<c)return;a.currentTarget.setPointerCapture(a.pointerId);const o=L?M:0;R.current={startX:a.clientX,startWidth:o,moved:!1,wasOpen:L},F.current=o},onPointerMove:a=>{const o=R.current,i=C.current;if(!o||!i)return;const e=a.clientX-o.startX;if(!o.moved){if(Math.abs(e)<4)return;o.moved=!0,E(!0)}const r=Math.min(480,Math.max(0,o.startWidth+e));F.current=r,i.style.setProperty("--navigationdashboard-sidebar-w",`${r}px`),i.dataset.collapsing=r<220?"true":"false",!o.wasOpen&&r>0&&T(!0)},onPointerUp:B,onPointerCancel:B,className:[L?v.toggleOpen:v.toggleClosed].join(" "),children:o("div",{children:"|"})})}),o("div",{className:v.outletContent,children:D})]})]})})]})};u.displayName="NavigationDashboard";export{u as NavigationDashboard};
1
+ import{jsxs as a,jsx as o,Fragment as i}from"react/jsx-runtime";import{useRef as e,useState as n,useLayoutEffect as r}from"react";import{B as t}from"../Button-BDPxqgFb.js";import{G as d}from"../Grid-DmI4tqqG.js";import{u as s}from"../useWindowSize-CAQRbyxi.js";import{b as l}from"../IconLocate-BXomEqkx.js";import{N as g}from"../NavigationTabs-DtNZmWJJ.js";import{s as h,g as b}from"../style-inject.es-CrVRO2OA.js";import"../LoaderDots-BoEg_zlZ.js";import"../TextBox-__k4jPYK.js";import"../Loader-ZYEBOkbx.js";var m={n23mNavigationDashboard:"NavigationDashboard-module_n23mNavigationDashboard__DaVvB",dragging:"NavigationDashboard-module_dragging__gT3R-",row:"NavigationDashboard-module_row__0hfcb",sidebarContainer:"NavigationDashboard-module_sidebarContainer__yDMvb",sticky:"NavigationDashboard-module_sticky__mJ3qk",rowOpen:"NavigationDashboard-module_rowOpen__R8X9U",sidebarContainerOpen:"NavigationDashboard-module_sidebarContainerOpen__a5s0j",sidebarContainerClosed:"NavigationDashboard-module_sidebarContainerClosed__MtEom",asideInner:"NavigationDashboard-module_asideInner__6XAWJ",sidebarOpen:"NavigationDashboard-module_sidebarOpen__p8DGE",sidebarClosed:"NavigationDashboard-module_sidebarClosed__WCDNU",outlet:"NavigationDashboard-module_outlet__ZDTtw",outletContent:"NavigationDashboard-module_outletContent__d1Xs6",toggleAnchor:"NavigationDashboard-module_toggleAnchor__s9fbs",toggleOpen:"NavigationDashboard-module_toggleOpen__m8fxh",toggleClosed:"NavigationDashboard-module_toggleClosed__efOTE",rowNoAside:"NavigationDashboard-module_rowNoAside__v3MDd",outletNoAside:"NavigationDashboard-module_outletNoAside__whzV-"};h("@layer n23mNavigationDashboard{.NavigationDashboard-module_n23mNavigationDashboard__DaVvB{--navigationdashboard-sidebar-w:300px;--navigationdashboard-sidebar-min:200px;--navigationdashboard-sidebar-border:2px;--navigationdashboard-toggle-nudge:0px;--navigationdashboard-sidebar-duration:450ms;--navigationdashboard-sidebar-easing:cubic-bezier(0.22,1,0.36,1);&.NavigationDashboard-module_dragging__gT3R-{cursor:col-resize;user-select:none}&.NavigationDashboard-module_dragging__gT3R- .NavigationDashboard-module_row__0hfcb,&.NavigationDashboard-module_dragging__gT3R- .NavigationDashboard-module_sidebarContainer__yDMvb,&.NavigationDashboard-module_dragging__gT3R- .NavigationDashboard-module_sticky__mJ3qk{transition:none}&[data-collapsing=true] .NavigationDashboard-module_sticky__mJ3qk{opacity:.45}.NavigationDashboard-module_row__0hfcb{display:grid;grid-template-columns:0 minmax(0,1fr);min-width:0;overflow-x:clip;transition:grid-template-columns var(--navigationdashboard-sidebar-duration) var(--navigationdashboard-sidebar-easing);width:100%}.NavigationDashboard-module_rowOpen__R8X9U{grid-template-columns:var(--navigationdashboard-sidebar-w) minmax(0,1fr)}.NavigationDashboard-module_sidebarContainer__yDMvb{border-right:var(--navigationdashboard-sidebar-border) solid transparent;box-sizing:border-box;min-width:0;overflow:clip;position:relative;transition:border-right-color var(--navigationdashboard-sidebar-duration) var(--navigationdashboard-sidebar-easing)}.NavigationDashboard-module_sidebarContainerOpen__a5s0j{border-right-color:#e1dfdf}.NavigationDashboard-module_sidebarContainerClosed__MtEom{border-right-color:transparent}.NavigationDashboard-module_sticky__mJ3qk{-ms-overflow-style:none;-webkit-overflow-scrolling:touch;box-sizing:border-box;height:calc(100dvh - var(--navigationdashboard-h, 0px));min-width:0;opacity:1;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding:20px 30px 20px 20px;position:sticky;scrollbar-width:none;top:var(--navigationdashboard-h,0);transform:translateZ(0);transition:transform var(--navigationdashboard-sidebar-duration) var(--navigationdashboard-sidebar-easing),opacity .3s ease;width:100%;will-change:transform;&::-webkit-scrollbar{display:none}}.NavigationDashboard-module_asideInner__6XAWJ{box-sizing:border-box;min-width:0;width:calc(max(var(--navigationdashboard-sidebar-min), var(--navigationdashboard-sidebar-w)) - 52px)}.NavigationDashboard-module_asideInner__6XAWJ>*{height:auto;max-height:none;overflow:visible}.NavigationDashboard-module_sidebarOpen__p8DGE{opacity:1}.NavigationDashboard-module_sidebarClosed__WCDNU{opacity:0;pointer-events:none}.NavigationDashboard-module_outlet__ZDTtw{box-sizing:border-box;min-width:0;padding:20px 0 20px 20px;position:relative;width:100%}.NavigationDashboard-module_outletContent__d1Xs6{min-width:0;width:100%}.NavigationDashboard-module_toggleAnchor__s9fbs{height:0;margin-left:-20px;position:sticky;top:calc(var(--navigationdashboard-h, 0px) + (100dvh - var(--navigationdashboard-h, 0px))/2);width:0}.NavigationDashboard-module_toggleOpen__m8fxh{cursor:col-resize;transform:translate(calc(-50% - var(--navigationdashboard-sidebar-border)/2 + var(--navigationdashboard-toggle-nudge)),-50%)}.NavigationDashboard-module_toggleClosed__efOTE{cursor:col-resize;transform:translate(-4px,-50%)}.NavigationDashboard-module_rowNoAside__v3MDd{grid-template-columns:minmax(0,1fr);transition:none}.NavigationDashboard-module_outletNoAside__whzV-{min-width:0}}}");const v=768,c=({children:h,className:c,style:u,menuTopLeftColumn:_=o(i,{children:"menuTopLeftColumn"}),menuTopRightColumn:p=o(i,{children:"menuTopRightColumn"}),menuMobile:w=o(i,{children:"menuMobile"}),outlet:N=o(i,{children:"outlet"}),aside:D=o(i,{children:"aside"}),...x})=>{const f=e(null),C=e(null),{width:y}=s(),O=null!=D&&!1!==D&&y>=v,[j,M]=n(y>=v),[T,A]=n(300),[k,z]=n(!1),E=O&&j,L=e(null),R=e(300),X=e(!1),P=()=>{M(!(y<v)&&(a=>!a))},B=()=>{const a=L.current,o=f.current;if(L.current=null,!a?.moved||!o)return;X.current=!0,o.dataset.collapsing="false";const i=R.current;if(i<220)o.style.setProperty("--navigationdashboard-sidebar-w",`${T}px`),M(!1);else{const a=Math.min(480,Math.max(300,i));o.style.setProperty("--navigationdashboard-sidebar-w",`${a}px`),R.current=a,A(a),M(!0)}z(!1)};return r(()=>{y<v&&M(!1)},[y]),r(()=>{const a=f.current;a&&a.style.setProperty("--navigationdashboard-sidebar-w",`${T}px`)},[T]),r(()=>{const a=f.current,o=C.current;if(!a||!o)return;let i=0;const e=()=>{i=0;const e=Math.max(0,o.getBoundingClientRect().bottom);a.style.setProperty("--navigationdashboard-h",`${e}px`)},n=()=>{i||(i=requestAnimationFrame(e))};e(),window.addEventListener("scroll",n,{passive:!0}),window.addEventListener("resize",n),window.addEventListener("pageshow",n),window.visualViewport?.addEventListener("resize",n);const r=new ResizeObserver(n);return r.observe(o),()=>{window.removeEventListener("scroll",n),window.removeEventListener("resize",n),window.removeEventListener("pageshow",n),window.visualViewport?.removeEventListener("resize",n),r.disconnect(),cancelAnimationFrame(i)}},[]),a("div",{ref:f,className:[m.n23mNavigationDashboard,"n23mNavigationDashboard",k&&m.dragging,c].filter(Boolean).join(" "),...x,style:{...b({"--navigationdashboard-sidebar-w":`${T}px`,"--navigationdashboard-sidebar-min":"300px"}),...u},children:[o("div",{ref:C,children:o(g,{widthInnerContainer:"100%",widthMainContainer:"100%",menuOnlyTop:!0,menuTopLeftColumn:a(d,{layout:"flex",justifyContent:"flex-start",gap:{col:"15px",row:"0px"},alignItems:"center",minHeight:"100%",children:[O&&o(d,{layout:"flex",justifyContent:"flex-start",margin:0,children:o(t,{type:"button",variant:"secondary",onClick:P,height:"40px",width:"40px",padding:0,children:o(l,{open:j,width:20,height:20})})}),o("div",{children:_})]}),menuTopRightColumn:p,menuMobile:w})}),o(d,{layout:"container",padding:"0 20px 0 0",widthMin:"100%",children:a("div",{className:[m.row,O?E&&m.rowOpen:m.rowNoAside].filter(Boolean).join(" "),children:[O&&o("div",{className:[m.sidebarContainer,E?m.sidebarContainerOpen:m.sidebarContainerClosed].join(" "),children:o("div",{className:[m.sticky,E?m.sidebarOpen:m.sidebarClosed].join(" "),children:o("div",{className:m.asideInner,children:D})})}),a("div",{className:[m.outlet,!O&&m.outletNoAside].filter(Boolean).join(" "),children:[O&&o("div",{className:m.toggleAnchor,children:o(t,{type:"button",variant:"secondary",height:"60px",width:"10px",padding:0,onClick:()=>{X.current?X.current=!1:P()},onPointerDown:a=>{if(X.current=!1,0!==a.button||y<v)return;a.currentTarget.setPointerCapture(a.pointerId);const o=E?T:0;L.current={startX:a.clientX,startWidth:o,moved:!1,wasOpen:E},R.current=o},onPointerMove:a=>{const o=L.current,i=f.current;if(!o||!i)return;const e=a.clientX-o.startX;if(!o.moved){if(Math.abs(e)<4)return;o.moved=!0,z(!0)}const n=Math.min(480,Math.max(0,o.startWidth+e));R.current=n,i.style.setProperty("--navigationdashboard-sidebar-w",`${n}px`),i.dataset.collapsing=n<220?"true":"false",!o.wasOpen&&n>0&&M(!0)},onPointerUp:B,onPointerCancel:B,className:[E?m.toggleOpen:m.toggleClosed].join(" "),"aria-label":E?"Collapse sidebar":"Expand sidebar","aria-expanded":E,children:o("div",{children:"|"})})}),o("div",{className:m.outletContent,children:N})]})]})})]})};c.displayName="NavigationDashboard";export{c as NavigationDashboard};
@@ -1 +1 @@
1
- export{N as NavigationTabs}from"../NavigationTabs-CWkGtNHu.js";import"react/jsx-runtime";import"react";import"../Button-QC014EKI.js";import"../Loader-ZYEBOkbx.js";import"../LoaderDots-BoEg_zlZ.js";import"../TextBox-__k4jPYK.js";import"../style-inject.es-CrVRO2OA.js";import"../Grid-DmI4tqqG.js";
1
+ export{N as NavigationTabs}from"../NavigationTabs-DtNZmWJJ.js";import"react/jsx-runtime";import"react";import"../Button-BDPxqgFb.js";import"../LoaderDots-BoEg_zlZ.js";import"../TextBox-__k4jPYK.js";import"../style-inject.es-CrVRO2OA.js";import"../Grid-DmI4tqqG.js";import"../Loader-ZYEBOkbx.js";
@@ -1 +1 @@
1
- import{jsx as n,jsxs as e,Fragment as a}from"react/jsx-runtime";import{useId as t,useRef as i,useCallback as o,useEffect as r}from"react";import{B as s}from"./Button-QC014EKI.js";import{G as m}from"./Grid-DmI4tqqG.js";import{T as l}from"./TextBox-__k4jPYK.js";import{s as u}from"./style-inject.es-CrVRO2OA.js";const d={urlChangeTimeoutMs:1500,settleMs:150,maxWaitMs:4e3},c=n=>/^#!?\//.test(n),h=n=>n.replace(/\/+$/,"")||"/",g=(n,e,a={})=>{const{urlChangeTimeoutMs:t,settleMs:i,maxWaitMs:o}={...d,...a},r=window.location.href,s=performance.now();let m,l,u,c=!1,h=0,g=0;const _=()=>{cancelAnimationFrame(h),cancelAnimationFrame(g),clearTimeout(m),clearTimeout(l),u?.disconnect()},v=()=>{c||(c=!0,_(),g=requestAnimationFrame(()=>{g=requestAnimationFrame(()=>e())}))};l=window.setTimeout(v,o);const p=()=>{clearTimeout(m),m=window.setTimeout(v,i)},b=()=>{if(!c)return window.location.href!==r?(u=new MutationObserver(e=>{e.some(e=>!n?.contains(e.target))&&p()}),u.observe(document.body,{childList:!0,subtree:!0,characterData:!0}),void p()):void(performance.now()-s>t?v():h=requestAnimationFrame(b))};return h=requestAnimationFrame(b),()=>{c=!0,_()}};var _={n23mNavigationTabs:"NavigationTabs-module_n23mNavigationTabs__ZW-sA",navigationLine:"NavigationTabs-module_navigationLine__0GXrl",menuPlaceholder:"NavigationTabs-module_menuPlaceholder__4e0gb",menu:"NavigationTabs-module_menu__RyLBY",menuContent:"NavigationTabs-module_menuContent__bVzSY",menuAnimation:"NavigationTabs-module_menuAnimation__RvppI",menuOpen:"NavigationTabs-module_menuOpen__H7d5G",noAnimation:"NavigationTabs-module_noAnimation__Wxndt",menuItemMobile:"NavigationTabs-module_menuItemMobile__xblea",navigationTabMenu:"NavigationTabs-module_navigationTabMenu__sH02E",menuItemDesktop:"NavigationTabs-module_menuItemDesktop__CgUIw"};u("@layer n23mNavigationTabs{.NavigationTabs-module_n23mNavigationTabs__ZW-sA{.NavigationTabs-module_navigationLine__0GXrl{background-color:#e1dfdf;height:2px;width:100%}.NavigationTabs-module_menuPlaceholder__4e0gb{position:fixed;right:calc(50% - clamp(0px, 100%, 1440px)/2 + 20px);z-index:9999}.NavigationTabs-module_menu__RyLBY{background-color:#e1dfdf;contain:strict;height:100dvh;left:0;overflow-y:auto;overscroll-behavior:contain;position:fixed;top:0;transform:scale(0);transform-origin:top right;transition:transform .25s ease-out;width:100vw;will-change:transform;z-index:9998;.NavigationTabs-module_menuContent__bVzSY{display:flex;flex-direction:column;opacity:0;padding:150px 20px;&.NavigationTabs-module_menuAnimation__RvppI{opacity:1;transition:opacity .2s ease-in .3s}a{-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);user-select:none}}}.NavigationTabs-module_menuOpen__H7d5G{transform:scale(1);transition:transform .25s ease-in}.NavigationTabs-module_menuContent__bVzSY.NavigationTabs-module_noAnimation__Wxndt,.NavigationTabs-module_menu__RyLBY.NavigationTabs-module_noAnimation__Wxndt{transition:none}.NavigationTabs-module_menuItemMobile__xblea{display:none}@media (max-width:767.98px){.NavigationTabs-module_menuItemDesktop__CgUIw,.NavigationTabs-module_navigationTabMenu__sH02E{display:none}.NavigationTabs-module_menuItemMobile__xblea{align-items:center;display:flex;min-height:40px}body:has(.NavigationTabs-module_menuItemMobile__xblea .NavigationTabs-module_menuOpen__H7d5G){overflow:hidden}}}}");const v=({children:u,className:d,style:v,menuTopLeftColumn:p=n(a,{children:"menuTopLeftColumn"}),menuTopRightColumn:b=n(a,{children:"menuTopRightColumn"}),menuMobile:w,menuBottomTabs:T=n(a,{children:"menuBottomTabs"}),menuOnlyTop:f=!1,widthMainContainer:x="1600px",widthInnerContainer:N="1400px",...y})=>{const L=t(),A=i(null),M=i(null),C=i(!1),k=i(null),I=i(null),E=o(()=>{null!==k.current&&(cancelAnimationFrame(k.current),k.current=null)},[]),B=o(()=>{I.current?.(),I.current=null},[]),F=o(()=>{const n=A.current,e=M.current;n&&e&&(B(),E(),C.current=!0,n.classList.remove(_.noAnimation),e.classList.remove(_.noAnimation),k.current=requestAnimationFrame(()=>{k.current=requestAnimationFrame(()=>{C.current&&(n.classList.add(_.menuOpen),e.classList.add(_.menuAnimation),k.current=null)})}))},[E,B]),j=o((n=!1)=>{const e=A.current,a=M.current;e&&a&&(B(),E(),C.current=!1,n&&(e.classList.add(_.noAnimation),a.classList.add(_.noAnimation)),e.classList.remove(_.menuOpen),a.classList.remove(_.menuAnimation))},[E,B]);r(()=>{const n=n=>{"Escape"===n.key&&C.current&&j()},e=window.matchMedia("(max-width: 767.98px)"),a=n=>{!n.matches&&C.current&&j(!0)};return document.addEventListener("keydown",n),e.addEventListener("change",a),()=>{document.removeEventListener("keydown",n),e.removeEventListener("change",a),B(),E()}},[j,B,E]),r(()=>{const n=()=>{I.current||C.current&&j(!0)};return window.addEventListener("popstate",n),window.addEventListener("hashchange",n),()=>{window.removeEventListener("popstate",n),window.removeEventListener("hashchange",n)}},[j]);return n("div",{className:[_.n23mNavigationTabs,"n23mNavigationTabs",d].filter(Boolean).join(" "),style:v,...y,children:e(m,{layout:"container",widthMax:x,children:[n(m,{layout:"container",widthMax:N,padding:"20px",margin:"auto",children:e(m,{layout:"columns",gap:{col:"20px",row:"20px"},col:{smallDesktop:2,desktop:2,mobile:2,tablet:2},children:[n("div",{children:p}),n("div",{className:w?_.menuItemDesktop:void 0,children:b}),w&&e("div",{className:_.menuItemMobile,children:[n("div",{className:_.menuPlaceholder,children:n(s,{height:"40px",width:"70px",padding:0,backgroundColor:"orangered",onClick:()=>{C.current?j():F()},"aria-label":"Menu","aria-controls":L,children:n(l,{tag:"span",desktopSize:20,mobileSize:20,fontWeight:400,color:"white",children:"Menu"})})}),n("div",{id:L,ref:A,className:_.menu,children:n("div",{ref:M,className:_.menuContent,onClickCapture:n=>{const e=n.target;if(!(e instanceof Element))return;const a=e.closest("a");if(!a)return;if(0!==n.button||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey)return;if("_blank"===a.getAttribute("target")||a.hasAttribute("download"))return void B();const t=new URL(a.href,window.location.href);if(t.origin!==window.location.origin)return void B();const i=h(t.pathname)===h(window.location.pathname)&&t.search===window.location.search,o=t.hash!==window.location.hash&&(c(t.hash)||c(window.location.hash));if(i&&!o)return B(),void j();B(),I.current=g(A.current,()=>{I.current=null,j()})},children:w})})]})]})}),n("div",{className:_.navigationLine}),!f&&n(m,{layout:"container",widthMax:N,padding:"20px",margin:"auto",className:_.navigationTabMenu,children:n(m,{layout:"flex",justifyContent:"center",widthMax:N,gap:{col:"30px",row:"20px"},children:T})})]})})};v.displayName="NavigationTabs";export{v as N};
1
+ import{jsx as n,jsxs as e,Fragment as a}from"react/jsx-runtime";import{useId as t,useRef as i,useCallback as o,useEffect as r}from"react";import{B as s}from"./Button-BDPxqgFb.js";import{G as m}from"./Grid-DmI4tqqG.js";import{T as l}from"./TextBox-__k4jPYK.js";import{s as u}from"./style-inject.es-CrVRO2OA.js";const c={urlChangeTimeoutMs:1500,settleMs:150,maxWaitMs:4e3},d=n=>/^#!?\//.test(n),h=n=>n.replace(/\/+$/,"")||"/",g=(n,e,a={})=>{const{urlChangeTimeoutMs:t,settleMs:i,maxWaitMs:o}={...c,...a},r=window.location.href,s=performance.now();let m,l,u,d=!1,h=0,g=0;const v=()=>{cancelAnimationFrame(h),cancelAnimationFrame(g),clearTimeout(m),clearTimeout(l),u?.disconnect()},_=()=>{d||(d=!0,v(),g=requestAnimationFrame(()=>{g=requestAnimationFrame(()=>e())}))};l=window.setTimeout(_,o);const p=()=>{clearTimeout(m),m=window.setTimeout(_,i)},b=()=>{if(!d)return window.location.href!==r?(u=new MutationObserver(e=>{e.some(e=>!n?.contains(e.target))&&p()}),u.observe(document.body,{childList:!0,subtree:!0,characterData:!0}),void p()):void(performance.now()-s>t?_():h=requestAnimationFrame(b))};return h=requestAnimationFrame(b),()=>{d=!0,v()}};var v={n23mNavigationTabs:"NavigationTabs-module_n23mNavigationTabs__ZW-sA",navigationLine:"NavigationTabs-module_navigationLine__0GXrl",menuPlaceholder:"NavigationTabs-module_menuPlaceholder__4e0gb",menu:"NavigationTabs-module_menu__RyLBY",menuContent:"NavigationTabs-module_menuContent__bVzSY",menuAnimation:"NavigationTabs-module_menuAnimation__RvppI",menuOpen:"NavigationTabs-module_menuOpen__H7d5G",noAnimation:"NavigationTabs-module_noAnimation__Wxndt",menuItemMobile:"NavigationTabs-module_menuItemMobile__xblea",navigationTabMenu:"NavigationTabs-module_navigationTabMenu__sH02E",menuItemDesktop:"NavigationTabs-module_menuItemDesktop__CgUIw"};u("@layer n23mNavigationTabs{.NavigationTabs-module_n23mNavigationTabs__ZW-sA{.NavigationTabs-module_navigationLine__0GXrl{background-color:#e1dfdf;height:2px;width:100%}.NavigationTabs-module_menuPlaceholder__4e0gb{position:fixed;right:calc(50% - clamp(0px, 100%, 1440px)/2 + 20px);z-index:9999}.NavigationTabs-module_menu__RyLBY{background-color:#e1dfdf;contain:strict;height:100dvh;left:0;overflow-y:auto;overscroll-behavior:contain;position:fixed;top:0;transform:scale(0);transform-origin:top right;transition:transform .25s ease-out;width:100vw;will-change:transform;z-index:9998;.NavigationTabs-module_menuContent__bVzSY{display:flex;flex-direction:column;opacity:0;padding:150px 20px;&.NavigationTabs-module_menuAnimation__RvppI{opacity:1;transition:opacity .2s ease-in .3s}a{-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);user-select:none}}}.NavigationTabs-module_menuOpen__H7d5G{transform:scale(1);transition:transform .25s ease-in}.NavigationTabs-module_menuContent__bVzSY.NavigationTabs-module_noAnimation__Wxndt,.NavigationTabs-module_menu__RyLBY.NavigationTabs-module_noAnimation__Wxndt{transition:none}.NavigationTabs-module_menuItemMobile__xblea{display:none}@media (max-width:767.98px){.NavigationTabs-module_menuItemDesktop__CgUIw,.NavigationTabs-module_navigationTabMenu__sH02E{display:none}.NavigationTabs-module_menuItemMobile__xblea{align-items:center;display:flex;min-height:40px}body:has(.NavigationTabs-module_menuItemMobile__xblea .NavigationTabs-module_menuOpen__H7d5G){overflow:hidden}}}}");const _=({children:u,className:c,style:_,menuTopLeftColumn:p=n(a,{children:"menuTopLeftColumn"}),menuTopRightColumn:b=n(a,{children:"menuTopRightColumn"}),menuMobile:w,menuBottomTabs:T=n(a,{children:"menuBottomTabs"}),menuOnlyTop:f=!1,widthMainContainer:x="1600px",widthInnerContainer:N="1400px",...y})=>{const L=t(),A=i(null),M=i(null),C=i(!1),k=i(null),I=i(null),E=o(()=>{null!==k.current&&(cancelAnimationFrame(k.current),k.current=null)},[]),B=o(()=>{I.current?.(),I.current=null},[]),F=o(()=>{const n=A.current,e=M.current;n&&e&&(B(),E(),C.current=!0,n.classList.remove(v.noAnimation),e.classList.remove(v.noAnimation),k.current=requestAnimationFrame(()=>{k.current=requestAnimationFrame(()=>{C.current&&(n.classList.add(v.menuOpen),e.classList.add(v.menuAnimation),k.current=null)})}))},[E,B]),j=o((n=!1)=>{const e=A.current,a=M.current;e&&a&&(B(),E(),C.current=!1,n&&(e.classList.add(v.noAnimation),a.classList.add(v.noAnimation)),e.classList.remove(v.menuOpen),a.classList.remove(v.menuAnimation))},[E,B]);r(()=>{const n=n=>{"Escape"===n.key&&C.current&&j()},e=window.matchMedia("(max-width: 767.98px)"),a=n=>{!n.matches&&C.current&&j(!0)};return document.addEventListener("keydown",n),e.addEventListener("change",a),()=>{document.removeEventListener("keydown",n),e.removeEventListener("change",a),B(),E()}},[j,B,E]),r(()=>{const n=()=>{I.current||C.current&&j(!0)};return window.addEventListener("popstate",n),window.addEventListener("hashchange",n),()=>{window.removeEventListener("popstate",n),window.removeEventListener("hashchange",n)}},[j]);return n("div",{className:[v.n23mNavigationTabs,"n23mNavigationTabs",c].filter(Boolean).join(" "),style:_,...y,children:e(m,{layout:"container",widthMax:x,children:[n(m,{layout:"container",widthMax:N,padding:"20px",margin:"auto",children:e(m,{layout:"columns",gap:{col:"20px",row:"20px"},col:{smallDesktop:2,desktop:2,mobile:2,tablet:2},children:[n("div",{children:p}),n("div",{className:w?v.menuItemDesktop:void 0,children:b}),w&&e("div",{className:v.menuItemMobile,children:[n("div",{className:v.menuPlaceholder,children:n(s,{type:"button",variant:"menu",height:"40px",width:"70px",padding:0,onClick:()=>{C.current?j():F()},"aria-label":"Menu","aria-controls":L,children:n(l,{tag:"span",desktopSize:20,mobileSize:20,fontWeight:400,color:"inherit",children:"Menu"})})}),n("div",{id:L,ref:A,className:v.menu,children:n("div",{ref:M,className:v.menuContent,onClickCapture:n=>{const e=n.target;if(!(e instanceof Element))return;const a=e.closest("a");if(!a)return;if(0!==n.button||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey)return;if("_blank"===a.getAttribute("target")||a.hasAttribute("download"))return void B();const t=new URL(a.href,window.location.href);if(t.origin!==window.location.origin)return void B();const i=h(t.pathname)===h(window.location.pathname)&&t.search===window.location.search,o=t.hash!==window.location.hash&&(d(t.hash)||d(window.location.hash));if(i&&!o)return B(),void j();B(),I.current=g(A.current,()=>{I.current=null,j()})},children:w})})]})]})}),n("div",{className:v.navigationLine}),!f&&n(m,{layout:"container",widthMax:N,padding:"20px",margin:"auto",className:v.navigationTabMenu,children:n(m,{layout:"flex",justifyContent:"center",widthMax:N,gap:{col:"30px",row:"20px"},children:T})})]})})};_.displayName="NavigationTabs";export{_ as N};
@@ -1 +1 @@
1
- export{S as Select}from"../Select-QBTZllFj.js";import"react/jsx-runtime";import"react";import"../Input-Bl7_BOs4.js";import"../TextBox-__k4jPYK.js";import"../style-inject.es-CrVRO2OA.js";import"../validator/index.js";
1
+ export{S as Select}from"../Select-CQBKuf2T.js";import"react/jsx-runtime";import"react";import"../Input-BJj54qdT.js";import"../TextBox-__k4jPYK.js";import"../style-inject.es-CrVRO2OA.js";import"../validator/index.js";import"../validator.const-LBF9whmW.js";
@@ -1 +1 @@
1
- import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useState as t,useRef as n,useId as r,useMemo as l}from"react";import{I as a}from"./Input-Bl7_BOs4.js";import{s as i}from"./style-inject.es-CrVRO2OA.js";var s={n23mSelect:"Select-module_n23mSelect__awO8y",icon:"Select-module_icon__jzEHa",iconRotate:"Select-module_iconRotate__NvZVj",dropdownWrapper:"Select-module_dropdownWrapper__IUKRC",open:"Select-module_open__JxM1W",dropdown:"Select-module_dropdown__DZBqH",dropdownItem:"Select-module_dropdownItem__COzLI"};i('@layer n23mSelect{.Select-module_n23mSelect__awO8y{--iff:-apple-system,BlinkMacSystemFont,avenir next,avenir,segoe ui,helvetica neue,helvetica,Cantarell,Ubuntu,roboto,noto,arial,sans-serif;position:relative;& input{cursor:pointer;padding-right:40px}.Select-module_icon__jzEHa{-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);background:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256" xml:space="preserve"><g style="stroke:none;stroke-width:1px;fill-rule:nonzero;opacity:1"><path d="M90 24.25a3.499 3.499 0 0 0-5.974-2.475L45 60.8 5.975 21.775a3.5 3.5 0 1 0-4.95 4.95l41.5 41.5a3.499 3.499 0 0 0 4.949 0l41.5-41.5A3.487 3.487 0 0 0 90 24.25z" style="stroke:none;stroke-width:1" transform="matrix(2.81 0 0 2.81 1.407 1.407)"/></g></svg>\') no-repeat 100%;background-position:calc(100% - 10px) 50%;background-size:18px;cursor:pointer;display:inline-block;height:40px;position:absolute;right:2px;top:22px;transform:rotate(0deg);transition:transform .1s ease-in-out;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:40px;&.Select-module_iconRotate__NvZVj{transform:rotate(180deg);transition:transform .1s ease-in-out}}.Select-module_dropdownWrapper__IUKRC{corner-shape:squircle;background:transparent;border-radius:12px;display:none;margin-top:65px;padding-bottom:40px;position:absolute;top:0;width:100%;z-index:3;&.Select-module_open__JxM1W{display:block}.Select-module_dropdown__DZBqH{corner-shape:squircle;-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);background:#fff;border-radius:12px;box-shadow:0 4px 8px 0 rgba(0,0,0,.24),0 6px 20px 0 rgba(0,0,0,.19);cursor:pointer;max-height:180px;overflow-y:auto;overscroll-behavior:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;&:has(.Select-module_dropdownItem__COzLI){border:1px solid var(--input-cb,#000)}.Select-module_dropdownItem__COzLI{background:#fff;border-bottom:1px solid var(--input-cb,#000);box-sizing:border-box;color:var(--input-c,#000);font-family:var(--n23mFontFamily,var(--iff));font-size:16px;font-weight:500;padding:10px;width:100%;&:hover{background-color:#f5f5f5}&:not(:first-child){border-top:none}&:last-child{border-bottom:unset}}}}}}');const d=({className:i,name:d,disabled:p,style:c,options:u,initialValue:m,validatorOptions:b,placeholder:h,onBlur:_,label:x="Select",...g})=>{const[v,w]=t(m?.label??""),[f,k]=t(m?.value??""),[S,y]=t(!1),[I,z]=t(!1),j=n(null),C=r(),O=l(()=>I?u.filter(e=>e.label.toLowerCase().includes(v.toLowerCase())):u,[u,v,I]);return e("div",{className:[s.n23mSelect,"n23mSelect",i].filter(Boolean).join(" "),...g,style:{...c},children:[o("div",{className:[s.icon,S?s.iconRotate:""].join(" "),onMouseDown:e=>{e.preventDefault(),j.current?.focus(),p||(z(!1),y(e=>!e))}}),o(a,{name:d,type:"hidden",kind:"input",validatorOptions:[...b??[],{type:"existsInOptions",options:{options:u,matchBy:"value"}}],value:f}),o(a,{id:C,inputRef:j,label:x,type:"text",kind:"select",disabled:p,placeholder:h,value:v,onChange:e=>{const o=e.currentTarget.value;w(o),k(""),z(!0),y(!0)},onClick:()=>{p||(z(!1),y(!0))},onBlur:e=>{y(!1),z(!1),_?.(e,{value:f,label:v})},validatorOptions:[...b??[],{type:"existsInOptions",options:{options:u,matchBy:"label"}}],"aria-autocomplete":"list","aria-expanded":S,"aria-controls":`${d}-listbox`,role:"combobox"}),o("div",{className:[s.dropdownWrapper,S?s.open:""].join(" "),children:o("div",{className:[s.dropdown].join(" "),children:O.map(e=>o("div",{className:s.dropdownItem,onMouseDown:()=>{(e=>{k(e.value),w(e.label),z(!1),y(!1)})(e)},children:e.label},e.value))})})]})};export{d as S};
1
+ import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useState as t,useRef as n,useId as r,useMemo as l}from"react";import{I as a}from"./Input-BJj54qdT.js";import{s as i}from"./style-inject.es-CrVRO2OA.js";var s={n23mSelect:"Select-module_n23mSelect__awO8y",icon:"Select-module_icon__jzEHa",iconRotate:"Select-module_iconRotate__NvZVj",dropdownWrapper:"Select-module_dropdownWrapper__IUKRC",open:"Select-module_open__JxM1W",dropdown:"Select-module_dropdown__DZBqH",dropdownItem:"Select-module_dropdownItem__COzLI"};i('@layer n23mSelect{.Select-module_n23mSelect__awO8y{--iff:-apple-system,BlinkMacSystemFont,avenir next,avenir,segoe ui,helvetica neue,helvetica,Cantarell,Ubuntu,roboto,noto,arial,sans-serif;position:relative;& input{cursor:pointer;padding-right:40px}.Select-module_icon__jzEHa{-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);background:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256" xml:space="preserve"><g style="stroke:none;stroke-width:1px;fill-rule:nonzero;opacity:1"><path d="M90 24.25a3.499 3.499 0 0 0-5.974-2.475L45 60.8 5.975 21.775a3.5 3.5 0 1 0-4.95 4.95l41.5 41.5a3.499 3.499 0 0 0 4.949 0l41.5-41.5A3.487 3.487 0 0 0 90 24.25z" style="stroke:none;stroke-width:1" transform="matrix(2.81 0 0 2.81 1.407 1.407)"/></g></svg>\') no-repeat 100%;background-position:calc(100% - 10px) 50%;background-size:18px;cursor:pointer;display:inline-block;height:40px;position:absolute;right:2px;top:22px;transform:rotate(0deg);transition:transform .1s ease-in-out;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:40px;&.Select-module_iconRotate__NvZVj{transform:rotate(180deg);transition:transform .1s ease-in-out}}.Select-module_dropdownWrapper__IUKRC{corner-shape:squircle;background:transparent;border-radius:12px;display:none;margin-top:65px;padding-bottom:40px;position:absolute;top:0;width:100%;z-index:3;&.Select-module_open__JxM1W{display:block}.Select-module_dropdown__DZBqH{corner-shape:squircle;-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);background:#fff;border-radius:12px;box-shadow:0 4px 8px 0 rgba(0,0,0,.24),0 6px 20px 0 rgba(0,0,0,.19);cursor:pointer;max-height:180px;overflow-y:auto;overscroll-behavior:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;&:has(.Select-module_dropdownItem__COzLI){border:1px solid var(--input-cb,#000)}.Select-module_dropdownItem__COzLI{background:#fff;border-bottom:1px solid var(--input-cb,#000);box-sizing:border-box;color:var(--input-c,#000);font-family:var(--n23mFontFamily,var(--iff));font-size:16px;font-weight:500;padding:10px;width:100%;&:hover{background-color:#f5f5f5}&:not(:first-child){border-top:none}&:last-child{border-bottom:unset}}}}}}');const d=({className:i,name:d,disabled:p,style:c,options:u,initialValue:m,validatorOptions:b,placeholder:h,onBlur:_,label:x="Select",...g})=>{const[v,w]=t(m?.label??""),[f,k]=t(m?.value??""),[S,y]=t(!1),[I,z]=t(!1),j=n(null),C=r(),O=l(()=>I?u.filter(e=>e.label.toLowerCase().includes(v.toLowerCase())):u,[u,v,I]);return e("div",{className:[s.n23mSelect,"n23mSelect",i].filter(Boolean).join(" "),...g,style:{...c},children:[o("div",{className:[s.icon,S?s.iconRotate:""].join(" "),onMouseDown:e=>{e.preventDefault(),j.current?.focus(),p||(z(!1),y(e=>!e))}}),o(a,{name:d,type:"hidden",kind:"input",validatorOptions:[...b??[],{type:"existsInOptions",options:{options:u,matchBy:"value"}}],value:f}),o(a,{id:C,inputRef:j,label:x,type:"text",kind:"select",disabled:p,placeholder:h,value:v,onChange:e=>{const o=e.currentTarget.value;w(o),k(""),z(!0),y(!0)},onClick:()=>{p||(z(!1),y(!0))},onBlur:e=>{y(!1),z(!1),_?.(e,{value:f,label:v})},validatorOptions:[...b??[],{type:"existsInOptions",options:{options:u,matchBy:"label"}}],"aria-autocomplete":"list","aria-expanded":S,"aria-controls":`${d}-listbox`,role:"combobox"}),o("div",{className:[s.dropdownWrapper,S?s.open:""].join(" "),children:o("div",{className:[s.dropdown].join(" "),children:O.map(e=>o("div",{className:s.dropdownItem,onMouseDown:()=>{(e=>{k(e.value),w(e.label),z(!1),y(!1)})(e)},children:e.label},e.value))})})]})};export{d as S};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as r,Fragment as l}from"react/jsx-runtime";import i,{useState as n,useRef as t,useLayoutEffect as o}from"react";import{B as d}from"../Button-QC014EKI.js";import{u as s}from"../useWindowSize-CAQRbyxi.js";import{I as a,a as c}from"../IconLocate-CQda7FAB.js";import{L as m}from"../Loader-ZYEBOkbx.js";import{T as u}from"../TextBox-__k4jPYK.js";import{s as h}from"../style-inject.es-CrVRO2OA.js";import"../LoaderDots-BoEg_zlZ.js";var g={n23mSlider:"Slider-module_n23mSlider__dg2MQ",dragging:"Slider-module_dragging__kMTuz",n23mSliderContainerSlider:"Slider-module_n23mSliderContainerSlider__2hzVV",n23mSliderSlideWrapper:"Slider-module_n23mSliderSlideWrapper__rGgB5",n23mSliderSlide:"Slider-module_n23mSliderSlide__Rp-uz",n23mSliderControls:"Slider-module_n23mSliderControls__P6qoa",n23mSliderControlsButtons:"Slider-module_n23mSliderControlsButtons__VGq89",n23mSliderCounter:"Slider-module_n23mSliderCounter__o-IR0"};h("@layer n23mSlider{.Slider-module_n23mSlider__dg2MQ{width:100%;&.Slider-module_dragging__kMTuz,&.Slider-module_dragging__kMTuz a{cursor:grabbing}}.Slider-module_n23mSliderContainerSlider__2hzVV{display:flex;flex-direction:column;gap:10px;height:100%;position:relative;user-select:none;width:100%}.Slider-module_n23mSliderSlideWrapper__rGgB5{box-sizing:border-box;display:flex;height:100%;overflow:hidden;position:relative;width:100%;will-change:transform}.Slider-module_n23mSliderSlide__Rp-uz{height:100%;overflow:hidden;position:absolute;top:0;will-change:transform;&>*{height:100%;width:100%}}.Slider-module_n23mSliderControls__P6qoa{align-items:center;display:flex;margin-left:20px;margin-right:20px}.Slider-module_n23mSliderControlsButtons__VGq89{display:flex;gap:10px;margin-top:10px}.Slider-module_n23mSliderCounter__o-IR0{align-items:center;align-items:flex-start;display:flex;height:50px;justify-content:center}}");const S=(e,r,l=!1,n)=>(l?e.slice(0,r):e.slice(-r)).map((e,r)=>i.cloneElement(e,{key:`${l?"clone-first":"clone-last"}-${r} ${n}`,className:e.props.className})),p=({isCircular:h=!1,children:p,className:_,loading:f=!1,loaderColor:x="black",slidesConfig:b={mobile:{items:1,slidesToScroll:1},tablet:{items:2,slidesToScroll:2},desktop:{items:3,slidesToScroll:3}},slideSpacingPx:C=10})=>{const v=i.Children.toArray(p).filter(i.isValidElement),{width:w}=s(),[k,y]=n(0),j=t(null),T=t(null),[E,z]=n(h?2*v.length:0),[$,B]=n(!1),F=t([]),[L,N]=n(null),[M,W]=n(0),V=t(!1);let R,X,q,D;w<767.98?(R=b.mobile.items,X=b.mobile.slidesToScroll,q="transform 0.4s cubic-bezier(.4,0,.2,1)",D=450):w<1199.98?(R=b.tablet.items,X=b.tablet.slidesToScroll,q="transform 0.4s cubic-bezier(.4,0,.2,1)",D=450):(R=b.desktop.items,X=b.desktop.slidesToScroll,q="transform 0.4s cubic-bezier(.4,0,.2,1)",D=450),o(()=>{j.current&&y(j.current.offsetWidth),z(h?2*v.length:0)},[f,h,R,v.length,w]),o(()=>{const e=j.current;if(!e)return;const r=new ResizeObserver(()=>{y(e.offsetWidth)});return r.observe(e),()=>r.disconnect()},[f]);const G=(k-C*(R-1))/R;let I=h?[...S(v,v.length,!1,1),...v,...S(v,v.length,!1,2),...S(v,v.length,!0,3),...S(v,v.length,!0,4)]:v;o(()=>{F.current.forEach((e,r)=>{if(!e)return;let l=0,i=0;1===R&&1!==v.length?(l=40,i=40):2===R?(l=20,i=20):4===R?(l=10,i=10):3===R&&(l=12.5,i=12.5);const n=(r-E)*(G+C-i)+(k-(G-l)*R-C*(R-1))/2;e.style.transition=$?q:"none",e.style.transform=`translateX(${n}px)`})},[E,k,$,I.length,R,G,C,f]),o(()=>{if(!$)return;let e;const r=()=>{let l=E;E<2*R&&h?l=E+2*v.length:E>=2*v.length+R&&h&&(l=E-v.length),l!==E&&h&&z(l),B(!1),F.current.forEach(e=>{e&&e.removeEventListener("transitionend",r)}),clearTimeout(e)};return F.current.forEach(e=>{e&&e.addEventListener("transitionend",r)}),e=window.setTimeout(()=>{B(!1),F.current.forEach(e=>{e&&e.removeEventListener("transitionend",r)})},D),()=>{F.current.forEach(e=>{e&&e.removeEventListener("transitionend",r)}),clearTimeout(e)}},[E,h,$,v.length,R,I.length,f]);const P=()=>{$||(B(!0),z(e=>e+X))},Q=()=>{$||(B(!0),z(e=>e-X))};return e("div",{ref:T,className:[g.n23mSlider,"n23mSlider",_].filter(Boolean).join(" "),style:{height:f?"calc(100% - 2px)":"calc(100% - 60px)"},children:[f&&r(m,{loaderColor:x}),!f&&e(l,{children:[r("div",{className:[g.n23mSliderContainerSlider].filter(Boolean).join(" "),onTouchStart:e=>{1===e.touches.length&&(N(e.touches[0].clientX),W(0),V.current=!0,T.current&&T.current.classList.add(g.dragging))},onTouchMove:e=>{null!==L&&W(e.touches[0].clientX-L)},onTouchEnd:()=>{M>50&&!$&&(h||0!==E)?Q():M<-50&&!($||!h&&E+R>=v.length)&&P(),N(null),W(0),V.current=!1,T.current&&T.current.classList.remove(g.dragging)},onMouseDown:e=>{N(e.clientX),W(0),V.current=!0,T.current&&T.current.classList.add(g.dragging)},onMouseMove:e=>{null!==L&&W(e.clientX-L)},onMouseUp:()=>{M>50&&!$&&(h||0!==E)?Q():M<-50&&!($||!h&&E+R>=v.length)&&P(),N(null),W(0),V.current=!1,T.current&&T.current.classList.remove(g.dragging)},children:r("div",{className:[g.n23mSliderSlideWrapper,"n23mSliderSlideWrapper"].join(" "),ref:j,style:{gap:`${C}px`},children:I.map((e,l)=>r("div",{ref:e=>{F.current[l]=e},className:g.n23mSliderSlide,style:{width:1===R&&1===v.length?"100%":1===R?`calc(${G}px - 40px)`:2===R?`calc(${G}px - 20px)`:3===R?`calc(${G}px - 12.5px)`:4===R?`calc(${G}px - 10px)`:`${G}px`},"aria-hidden":l<E||l>=E+R,children:e},e.key??l))})}),e("div",{className:[g.n23mSliderControls,"n23mSliderControls"].join(" "),style:{justifyContent:1===R?"space-between":"flex-end"},children:[1===R&&r("div",{className:[g.n23mSliderCounter,"n23mSliderCounter"].join(" "),children:r(u,{mobileSize:16,desktopSize:16,color:"black",children:h?`${(()=>{if(!h)return E;const e=v.length;return e<1?0:(E+e)%e})()+1} / ${v.length}`:`${E+1} / ${v.length}`})}),e("div",{className:[g.n23mSliderControlsButtons,"n23mSliderControlsButtons"].join(" "),children:[r(d,{height:"50px",width:"50px",backgroundColor:"#F2F0EF",padding:0,title:"Prev",onClick:Q,borderColor:"black",backgroundColorDisabled:"#F2F0EF",disabled:$||!h&&0===E,children:r(a,{width:24,height:24})}),r(d,{height:"50px",width:"50px",backgroundColor:"#F2F0EF",padding:0,title:"Next",borderColor:"black",backgroundColorDisabled:"#F2F0EF",onClick:P,disabled:$||!h&&E+R>=v.length,children:r(c,{width:24,height:24})})]})]})]})]})};p.displayName="Slider";export{p as Slider};
1
+ import{jsxs as e,jsx as r,Fragment as l}from"react/jsx-runtime";import i,{useState as n,useRef as t,useLayoutEffect as o}from"react";import{B as d}from"../Button-BDPxqgFb.js";import{u as s}from"../useWindowSize-CAQRbyxi.js";import{I as a,a as c}from"../IconLocate-BXomEqkx.js";import{L as m}from"../Loader-ZYEBOkbx.js";import{T as u}from"../Typography-CR1DOKsN.js";import{s as h}from"../style-inject.es-CrVRO2OA.js";import"../LoaderDots-BoEg_zlZ.js";import"../TextBox-__k4jPYK.js";var g={n23mSlider:"Slider-module_n23mSlider__dg2MQ",dragging:"Slider-module_dragging__kMTuz",n23mSliderContainerSlider:"Slider-module_n23mSliderContainerSlider__2hzVV",n23mSliderSlideWrapper:"Slider-module_n23mSliderSlideWrapper__rGgB5",n23mSliderSlide:"Slider-module_n23mSliderSlide__Rp-uz",n23mSliderControls:"Slider-module_n23mSliderControls__P6qoa",n23mSliderControlsButtons:"Slider-module_n23mSliderControlsButtons__VGq89",n23mSliderCounter:"Slider-module_n23mSliderCounter__o-IR0"};h("@layer n23mSlider{.Slider-module_n23mSlider__dg2MQ{width:100%;&.Slider-module_dragging__kMTuz,&.Slider-module_dragging__kMTuz a{cursor:grabbing}}.Slider-module_n23mSliderContainerSlider__2hzVV{display:flex;flex-direction:column;gap:10px;height:100%;position:relative;user-select:none;width:100%}.Slider-module_n23mSliderSlideWrapper__rGgB5{box-sizing:border-box;display:flex;height:100%;overflow:hidden;position:relative;width:100%;will-change:transform}.Slider-module_n23mSliderSlide__Rp-uz{height:100%;overflow:hidden;position:absolute;top:0;will-change:transform;&>*{height:100%;width:100%}}.Slider-module_n23mSliderControls__P6qoa{align-items:center;display:flex;margin-left:20px;margin-right:20px}.Slider-module_n23mSliderControlsButtons__VGq89{display:flex;gap:10px;margin-top:10px}.Slider-module_n23mSliderCounter__o-IR0{align-items:center;align-items:flex-start;display:flex;height:50px;justify-content:center}}");const p=(e,r,l=!1,n)=>(l?e.slice(0,r):e.slice(-r)).map((e,r)=>i.cloneElement(e,{key:`${l?"clone-first":"clone-last"}-${r} ${n}`,className:e.props.className})),S=({isCircular:h=!1,children:S,className:_,loading:f=!1,loaderColor:x="black",slidesConfig:v={mobile:{items:1,slidesToScroll:1},tablet:{items:2,slidesToScroll:2},desktop:{items:3,slidesToScroll:3}},slideSpacingPx:b=10})=>{const C=i.Children.toArray(S).filter(i.isValidElement),{width:y}=s(),[w,T]=n(0),j=t(null),$=t(null),[z,N]=n(h?2*C.length:0),[E,L]=n(!1),k=t([]),[B,M]=n(null),[W,V]=n(0),P=t(!1);let R,X,q,G;y<767.98?(R=v.mobile.items,X=v.mobile.slidesToScroll,q="transform 0.4s cubic-bezier(.4,0,.2,1)",G=450):y<1199.98?(R=v.tablet.items,X=v.tablet.slidesToScroll,q="transform 0.4s cubic-bezier(.4,0,.2,1)",G=450):(R=v.desktop.items,X=v.desktop.slidesToScroll,q="transform 0.4s cubic-bezier(.4,0,.2,1)",G=450),o(()=>{j.current&&T(j.current.offsetWidth),N(h?2*C.length:0)},[f,h,R,C.length,y]),o(()=>{const e=j.current;if(!e)return;const r=new ResizeObserver(()=>{T(e.offsetWidth)});return r.observe(e),()=>r.disconnect()},[f]);const I=(w-b*(R-1))/R;let D=h?[...p(C,C.length,!1,1),...C,...p(C,C.length,!1,2),...p(C,C.length,!0,3),...p(C,C.length,!0,4)]:C;o(()=>{k.current.forEach((e,r)=>{if(!e)return;let l=0,i=0;1===R&&1!==C.length?(l=40,i=40):2===R?(l=20,i=20):4===R?(l=10,i=10):3===R&&(l=12.5,i=12.5);const n=(r-z)*(I+b-i)+(w-(I-l)*R-b*(R-1))/2;e.style.transition=E?q:"none",e.style.transform=`translateX(${n}px)`})},[z,w,E,D.length,R,I,b,f]),o(()=>{if(!E)return;let e;const r=()=>{let l=z;z<2*R&&h?l=z+2*C.length:z>=2*C.length+R&&h&&(l=z-C.length),l!==z&&h&&N(l),L(!1),k.current.forEach(e=>{e&&e.removeEventListener("transitionend",r)}),clearTimeout(e)};return k.current.forEach(e=>{e&&e.addEventListener("transitionend",r)}),e=window.setTimeout(()=>{L(!1),k.current.forEach(e=>{e&&e.removeEventListener("transitionend",r)})},G),()=>{k.current.forEach(e=>{e&&e.removeEventListener("transitionend",r)}),clearTimeout(e)}},[z,h,E,C.length,R,D.length,f]);const Q=()=>{E||(L(!0),N(e=>e+X))},A=()=>{E||(L(!0),N(e=>e-X))};return e("div",{ref:$,className:[g.n23mSlider,"n23mSlider",_].filter(Boolean).join(" "),style:{height:f?"calc(100% - 2px)":"calc(100% - 60px)"},children:[f&&r(m,{loaderColor:x}),!f&&e(l,{children:[r("div",{className:g.n23mSliderContainerSlider,onTouchStart:e=>{1===e.touches.length&&(M(e.touches[0].clientX),V(0),P.current=!0,$.current&&$.current.classList.add(g.dragging))},onTouchMove:e=>{null!==B&&V(e.touches[0].clientX-B)},onTouchEnd:()=>{W>50&&!E&&(h||0!==z)?A():W<-50&&!(E||!h&&z+R>=C.length)&&Q(),M(null),V(0),P.current=!1,$.current&&$.current.classList.remove(g.dragging)},onMouseDown:e=>{M(e.clientX),V(0),P.current=!0,$.current&&$.current.classList.add(g.dragging)},onMouseMove:e=>{null!==B&&V(e.clientX-B)},onMouseUp:()=>{W>50&&!E&&(h||0!==z)?A():W<-50&&!(E||!h&&z+R>=C.length)&&Q(),M(null),V(0),P.current=!1,$.current&&$.current.classList.remove(g.dragging)},children:r("div",{className:[g.n23mSliderSlideWrapper,"n23mSliderSlideWrapper"].join(" "),ref:j,style:{gap:`${b}px`},children:D.map((e,l)=>r("div",{ref:e=>{k.current[l]=e},className:g.n23mSliderSlide,style:{width:1===R&&1===C.length?"100%":1===R?`calc(${I}px - 40px)`:2===R?`calc(${I}px - 20px)`:3===R?`calc(${I}px - 12.5px)`:4===R?`calc(${I}px - 10px)`:`${I}px`},"aria-hidden":l<z||l>=z+R,children:e},e.key??l))})}),e("div",{className:[g.n23mSliderControls,"n23mSliderControls"].join(" "),style:{justifyContent:1===R?"space-between":"flex-end"},children:[1===R&&r("div",{className:[g.n23mSliderCounter,"n23mSliderCounter"].join(" "),children:r(u,{variant:"body",tag:"span",children:h?`${(()=>{if(!h)return z;const e=C.length;return e<1?0:(z+e)%e})()+1} / ${C.length}`:`${z+1} / ${C.length}`})}),e("div",{className:[g.n23mSliderControlsButtons,"n23mSliderControlsButtons"].join(" "),children:[r(d,{variant:"secondary",height:"50px",width:"50px",padding:0,title:"Previous slide","aria-label":"Previous slide",onClick:A,disabled:E||!h&&0===z,children:r(a,{width:24,height:24})}),r(d,{variant:"secondary",height:"50px",width:"50px",padding:0,title:"Next slide","aria-label":"Next slide",onClick:Q,disabled:E||!h&&z+R>=C.length,children:r(c,{width:24,height:24})})]})]})]})]})};S.displayName="Slider";export{S as Slider};
@@ -1 +1 @@
1
- import{jsxs as r,jsx as e}from"react/jsx-runtime";import{useRef as t,Children as l,cloneElement as n,useState as o,useCallback as i,useEffect as c,useMemo as s}from"react";import{B as a}from"../Button-QC014EKI.js";import{u}from"../useWindowSize-CAQRbyxi.js";import{I as d,a as g}from"../IconLocate-CQda7FAB.js";import{s as m,g as f}from"../style-inject.es-CrVRO2OA.js";import"../Loader-ZYEBOkbx.js";import"../LoaderDots-BoEg_zlZ.js";import"../TextBox-__k4jPYK.js";var h={n23mSliderScrollWrapper:"SliderScroll-module_n23mSliderScrollWrapper__qj8cS",n23mSliderScrollTrack:"SliderScroll-module_n23mSliderScrollTrack__y6G6v",dragging:"SliderScroll-module_dragging__gH9AX",n23mSliderScrollControls:"SliderScroll-module_n23mSliderScrollControls__TAnlc",n23mSliderScrollControlsButtons:"SliderScroll-module_n23mSliderScrollControlsButtons__-PK4Y"};m("@layer n23mSliderScroll{.SliderScroll-module_n23mSliderScrollWrapper__qj8cS{display:grid;position:relative}.SliderScroll-module_n23mSliderScrollTrack__y6G6v{-ms-overflow-style:none;-webkit-overflow-scrolling:touch;display:flex;flex-wrap:nowrap;gap:var(--sliderscroll-g);overflow-x:scroll;scrollbar-width:none;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;will-change:scroll-position;&::-webkit-scrollbar{display:none}&>*{flex-shrink:0}&.SliderScroll-module_dragging__gH9AX,&.SliderScroll-module_dragging__gH9AX a{cursor:grabbing}}.SliderScroll-module_n23mSliderScrollControls__TAnlc{align-items:center;display:flex;justify-content:flex-end;margin-left:20px;margin-right:20px}.SliderScroll-module_n23mSliderScrollControlsButtons__-PK4Y{display:flex;gap:10px;margin-top:10px}}");const S=({children:m,className:S,gap:p="5px",isCircular:w=!1,autoPlay:b=!1,autoPlaySpeed:v=.5,style:F})=>{const L={carousel:t(null),buttonLeft:t(null),buttonRight:t(null),showArrowLeft:t(!1),showArrowRight:t(!1),isSliding:t(!1),animationFrameId:t(null),isHovered:t(!1),hasInitialized:t(!1),updateControls:t(()=>{}),drag:t({isDown:!1,startX:0,scrollLeft:0,isMove:!1,isDragging:!1}),childRefs:t([])},_=l.toArray(m),x=_.length,y=w?_.map((r,e)=>n(r,{key:`cb-${e}`})):[],A=w?_.map((r,e)=>n(r,{key:`ca-${e}`})):[],C=w?[...y,..._,...A]:_,[k,D]=o([]),{width:I}=u(),j=i(()=>{if(!L.carousel.current)return;const r=Number(p.slice(0,-2)),e=L.childRefs.current.map(e=>{if(!e)return 0;const t=getComputedStyle(e),l=parseFloat(t.marginLeft)||0,n=parseFloat(t.marginRight)||0;return e.offsetWidth+l+n+r});D(r=>r.length===e.length&&r.every((r,t)=>r===e[t])?r:e)},[p]);c(()=>{j()},[m,I,j]),c(()=>{const r=L.carousel.current;if(!r)return;let e=null;const t=new ResizeObserver(()=>{e&&cancelAnimationFrame(e),e=requestAnimationFrame(()=>{j(),L.updateControls.current()})});return t.observe(r),r.parentElement&&t.observe(r.parentElement),()=>{t.disconnect(),e&&cancelAnimationFrame(e)}},[j,w]);const M=s(()=>{const r=[];let e=0;for(const t of k)r.push(e),e+=t;return r},[k]);c(()=>{L.hasInitialized.current=!1},[w]),c(()=>{w&&L.carousel.current&&M.length&&!L.hasInitialized.current&&(L.carousel.current.scrollLeft=(M[x]||0)-2*Number(p.slice(0,-2)),L.hasInitialized.current=!0),N()},[I,M,x,w]),c(()=>{R(!1)},[]),c(()=>{if(!w)return;if(!b)return void(L.animationFrameId.current&&(cancelAnimationFrame(L.animationFrameId.current),L.animationFrameId.current=null));let r;const e=()=>{if(!L.carousel.current)return;if(L.isSliding.current||L.isHovered.current)return void(L.animationFrameId.current=requestAnimationFrame(e));const r=L.carousel.current;let t=r.scrollLeft+v;if(w&&M.length&&k.length){const r=M[M.length-1]+(k[k.length-1]||0),e=M[x]||0,l=M[x+_.length]||r;t>l+k[0]/2&&(t-=l-e)}r.scrollLeft=t,N(),L.animationFrameId.current=requestAnimationFrame(e)};return r=setTimeout(()=>{L.animationFrameId.current=requestAnimationFrame(e)},500),()=>{r&&clearTimeout(r),L.animationFrameId.current&&(cancelAnimationFrame(L.animationFrameId.current),L.animationFrameId.current=null)}},[b,v,w,M,k,x,_.length]);const N=()=>{if(L.carousel.current){if(w)L.showArrowLeft.current=!0,L.showArrowRight.current=!0;else{const r=L.carousel.current.scrollLeft,e=L.carousel.current.scrollWidth-L.carousel.current.clientWidth;L.showArrowLeft.current=r>0,L.showArrowRight.current=r<e-1}R(L.isSliding.current)}};L.updateControls.current=N;const R=r=>{L.buttonLeft.current&&(L.buttonLeft.current.disabled=r||!L.showArrowLeft.current),L.buttonRight.current&&(L.buttonRight.current.disabled=r||!L.showArrowRight.current)},W=(r,e,t=300)=>{if(L.isSliding.current)return;L.isSliding.current=!0,R(!0);const l=r.scrollLeft,n=e-l,o=performance.now(),i=e=>{const c=e-o,s=Math.min(c/t,1);var a;r.scrollLeft=l+n*((a=s)<.5?4*a*a*a:1-Math.pow(-2*a+2,3)/2),s<1?requestAnimationFrame(i):(L.isSliding.current=!1,R(!1),N())};requestAnimationFrame(i)},X=i(()=>{if(!L.carousel.current)return;if(!M.length||!k.length)return;const r=L.carousel.current,e=r.offsetWidth,t=r.scrollLeft;let l=M.findIndex((r,e)=>r>t);-1===l?l=M.length-1:l>0&&l--;let n,o=0,i=0;for(let r=l;r<M.length&&(o+=k[r],i++,!(o>=e));r++);const c=l+i-1;n=M[c]+k[c]>t+e+1?c:l+i;let s=M[n]-2*Number(p.slice(0,-2));if(s<0&&(s=0),w){s=(M[x]||0)+s-(M[x]||0)}W(L.carousel.current,s,400)},[M,k,p,x,w,_.length]),B=i(()=>{if(!L.carousel.current)return;if(!M.length||!k.length)return;const r=L.carousel.current,e=r.offsetWidth,t=r.scrollLeft;let l=0;for(let r=0;r<M.length;r++)if(M[r]>t){l=r-1;break}l<0&&(l=0);let n=0,o=0;for(let r=l;r>=0&&(n+=k[r],n<=e);r--)o++;let i=l;w||(i=Math.max(o-1,i));let c=M[i]+k[i]-e+Number(p.slice(0,-2));if(c<0&&(c=0),w){c=(M[x]||0)+c-(M[x]||0)+Number(p.slice(0,-2))}W(L.carousel.current,c,400)},[M,k,p,x,w]),T=()=>{L.carousel.current&&(L.drag.current.isDragging?L.carousel.current.classList.add(h.dragging):L.carousel.current.classList.remove(h.dragging))};return r("div",{className:["n23mSliderScroll",S].filter(Boolean).join(" "),style:{...f({"--sliderscroll-g":p,height:"calc(100% - 60px)"}),...F},onMouseEnter:()=>{L.isHovered.current=!0},onMouseLeave:()=>{L.isHovered.current=!1},children:[e("div",{className:[h.n23mSliderScrollWrapper,"n23mSliderScrollWrapper"].join(" "),children:e("div",{className:h.n23mSliderScrollTrack,ref:L.carousel,onClick:r=>{L.drag.current.isMove&&(r.preventDefault(),r.stopPropagation())},onScroll:()=>{if(L.carousel.current){if(w&&M.length&&k.length){const r=L.carousel.current.scrollLeft,e=M[M.length-1]+(k[k.length-1]||0),t=M[x]||0,l=M[x+_.length]||e;r<t-k[0]/2?L.carousel.current.scrollLeft=r+(M[_.length+x]-t):r>l+k[0]/2&&(L.carousel.current.scrollLeft=r-(l-t))}N()}},onMouseDown:r=>{L.drag.current.isDown=!0,L.drag.current.startX=r.pageX-(L.carousel.current?.offsetLeft||0),L.drag.current.scrollLeft=L.carousel.current?.scrollLeft||0,L.drag.current.isDragging=!0,T()},onMouseLeave:()=>{L.drag.current.isDown&&(L.drag.current.isDown=!1,L.drag.current.isDragging=!1,T())},onMouseUp:()=>{L.drag.current.isDown=!1,L.drag.current.isDragging=!1,T()},onMouseMove:r=>{if(!L.drag.current.isDown)return void(L.drag.current.isMove=!1);r.preventDefault();var e;const t=("pageX"in(e=r)?e.pageX:"touches"in e?e.touches[0].pageX:0)-(L.carousel.current?.offsetLeft||0)-L.drag.current.startX;Math.abs(t)>5&&(L.drag.current.isMove=!0),L.carousel.current&&(L.carousel.current.scrollLeft=L.drag.current.scrollLeft-t,N())},children:C.map((r,t)=>e("div",{ref:r=>{L.childRefs.current[t]=r},style:{display:"inline-block"},children:r},r.key||t))})}),e("div",{className:[h.n23mSliderScrollControls,"n23mSliderScrollControls"].join(" "),children:r("div",{className:[h.n23mSliderScrollControlsButtons,"n23mSliderScrollControlsButtons"].join(" "),children:[e(a,{ref:L.buttonLeft,height:"50px",width:"50px",backgroundColor:"#F2F0EF",padding:0,title:"Prev",onClick:B,borderColor:"black",backgroundColorDisabled:"#F2F0EF",children:e(d,{width:24,height:24})}),e(a,{ref:L.buttonRight,height:"50px",width:"50px",backgroundColor:"#F2F0EF",padding:0,title:"Next",onClick:X,borderColor:"black",backgroundColorDisabled:"#F2F0EF",children:e(g,{width:24,height:24})})]})})]})};S.displayName="SliderScroll";export{S as SliderScroll};
1
+ import{jsxs as r,jsx as e}from"react/jsx-runtime";import{useRef as t,Children as l,cloneElement as n,useState as o,useCallback as i,useEffect as c,useMemo as a}from"react";import{B as s}from"../Button-BDPxqgFb.js";import{u}from"../useWindowSize-CAQRbyxi.js";import{I as d,a as g}from"../IconLocate-BXomEqkx.js";import{s as m,g as f}from"../style-inject.es-CrVRO2OA.js";import"../LoaderDots-BoEg_zlZ.js";import"../TextBox-__k4jPYK.js";var h={n23mSliderScrollWrapper:"SliderScroll-module_n23mSliderScrollWrapper__qj8cS",n23mSliderScrollTrack:"SliderScroll-module_n23mSliderScrollTrack__y6G6v",dragging:"SliderScroll-module_dragging__gH9AX",n23mSliderScrollControls:"SliderScroll-module_n23mSliderScrollControls__TAnlc",n23mSliderScrollControlsButtons:"SliderScroll-module_n23mSliderScrollControlsButtons__-PK4Y"};m("@layer n23mSliderScroll{.SliderScroll-module_n23mSliderScrollWrapper__qj8cS{display:grid;position:relative}.SliderScroll-module_n23mSliderScrollTrack__y6G6v{-ms-overflow-style:none;-webkit-overflow-scrolling:touch;display:flex;flex-wrap:nowrap;gap:var(--sliderscroll-g);overflow-x:scroll;scrollbar-width:none;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;will-change:scroll-position;&::-webkit-scrollbar{display:none}&>*{flex-shrink:0}&.SliderScroll-module_dragging__gH9AX,&.SliderScroll-module_dragging__gH9AX a{cursor:grabbing}}.SliderScroll-module_n23mSliderScrollControls__TAnlc{align-items:center;display:flex;justify-content:flex-end;margin-left:20px;margin-right:20px}.SliderScroll-module_n23mSliderScrollControlsButtons__-PK4Y{display:flex;gap:10px;margin-top:10px}}");const S=({children:m,className:S,gap:p="5px",isCircular:w=!1,autoPlay:v=!1,autoPlaySpeed:L=.5,style:_})=>{const b={carousel:t(null),buttonLeft:t(null),buttonRight:t(null),showArrowLeft:t(!1),showArrowRight:t(!1),isSliding:t(!1),animationFrameId:t(null),isHovered:t(!1),hasInitialized:t(!1),updateControls:t(()=>{}),drag:t({isDown:!1,startX:0,scrollLeft:0,isMove:!1,isDragging:!1}),childRefs:t([])},y=l.toArray(m),x=y.length,A=w?y.map((r,e)=>n(r,{key:`cb-${e}`})):[],F=w?y.map((r,e)=>n(r,{key:`ca-${e}`})):[],C=w?[...A,...y,...F]:y,[I,k]=o([]),{width:j}=u(),D=i(()=>{if(!b.carousel.current)return;const r=Number(p.slice(0,-2)),e=b.childRefs.current.map(e=>{if(!e)return 0;const t=getComputedStyle(e),l=parseFloat(t.marginLeft)||0,n=parseFloat(t.marginRight)||0;return e.offsetWidth+l+n+r});k(r=>r.length===e.length&&r.every((r,t)=>r===e[t])?r:e)},[p]);c(()=>{D()},[m,j,D]),c(()=>{const r=b.carousel.current;if(!r)return;let e=null;const t=new ResizeObserver(()=>{e&&cancelAnimationFrame(e),e=requestAnimationFrame(()=>{D(),b.updateControls.current()})});return t.observe(r),r.parentElement&&t.observe(r.parentElement),()=>{t.disconnect(),e&&cancelAnimationFrame(e)}},[D,w]);const M=a(()=>{const r=[];let e=0;for(const t of I)r.push(e),e+=t;return r},[I]);c(()=>{b.hasInitialized.current=!1},[w]),c(()=>{w&&b.carousel.current&&M.length&&!b.hasInitialized.current&&(b.carousel.current.scrollLeft=(M[x]||0)-2*Number(p.slice(0,-2)),b.hasInitialized.current=!0),N()},[j,M,x,w]),c(()=>{R(!1)},[]),c(()=>{if(!w)return;if(!v)return void(b.animationFrameId.current&&(cancelAnimationFrame(b.animationFrameId.current),b.animationFrameId.current=null));let r;const e=()=>{if(!b.carousel.current)return;if(b.isSliding.current||b.isHovered.current)return void(b.animationFrameId.current=requestAnimationFrame(e));const r=b.carousel.current;let t=r.scrollLeft+L;if(w&&M.length&&I.length){const r=M[M.length-1]+(I[I.length-1]||0),e=M[x]||0,l=M[x+y.length]||r;t>l+I[0]/2&&(t-=l-e)}r.scrollLeft=t,N(),b.animationFrameId.current=requestAnimationFrame(e)};return r=setTimeout(()=>{b.animationFrameId.current=requestAnimationFrame(e)},500),()=>{r&&clearTimeout(r),b.animationFrameId.current&&(cancelAnimationFrame(b.animationFrameId.current),b.animationFrameId.current=null)}},[v,L,w,M,I,x,y.length]);const N=()=>{if(b.carousel.current){if(w)b.showArrowLeft.current=!0,b.showArrowRight.current=!0;else{const r=b.carousel.current.scrollLeft,e=b.carousel.current.scrollWidth-b.carousel.current.clientWidth;b.showArrowLeft.current=r>0,b.showArrowRight.current=r<e-1}R(b.isSliding.current)}};b.updateControls.current=N;const R=r=>{b.buttonLeft.current&&(b.buttonLeft.current.disabled=r||!b.showArrowLeft.current),b.buttonRight.current&&(b.buttonRight.current.disabled=r||!b.showArrowRight.current)},W=(r,e,t=300)=>{if(b.isSliding.current)return;b.isSliding.current=!0,R(!0);const l=r.scrollLeft,n=e-l,o=performance.now(),i=e=>{const c=e-o,a=Math.min(c/t,1);var s;r.scrollLeft=l+n*((s=a)<.5?4*s*s*s:1-Math.pow(-2*s+2,3)/2),a<1?requestAnimationFrame(i):(b.isSliding.current=!1,R(!1),N())};requestAnimationFrame(i)},X=i(()=>{if(!b.carousel.current)return;if(!M.length||!I.length)return;const r=b.carousel.current,e=r.offsetWidth,t=r.scrollLeft;let l=M.findIndex(r=>r>t);-1===l?l=M.length-1:l>0&&l--;let n,o=0,i=0;for(let r=l;r<M.length&&(o+=I[r],i++,!(o>=e));r++);const c=l+i-1;n=M[c]+I[c]>t+e+1?c:l+i;let a=M[n]-2*Number(p.slice(0,-2));if(a<0&&(a=0),w){a=(M[x]||0)+a-(M[x]||0)}W(b.carousel.current,a,400)},[M,I,p,x,w,y.length]),B=i(()=>{if(!b.carousel.current)return;if(!M.length||!I.length)return;const r=b.carousel.current,e=r.offsetWidth,t=r.scrollLeft;let l=0;for(let r=0;r<M.length;r++)if(M[r]>t){l=r-1;break}l<0&&(l=0);let n=0,o=0;for(let r=l;r>=0&&(n+=I[r],n<=e);r--)o++;let i=l;w||(i=Math.max(o-1,i));let c=M[i]+I[i]-e+Number(p.slice(0,-2));if(c<0&&(c=0),w){c=(M[x]||0)+c-(M[x]||0)+Number(p.slice(0,-2))}W(b.carousel.current,c,400)},[M,I,p,x,w]),T=()=>{b.carousel.current&&(b.drag.current.isDragging?b.carousel.current.classList.add(h.dragging):b.carousel.current.classList.remove(h.dragging))};return r("div",{className:["n23mSliderScroll",S].filter(Boolean).join(" "),style:{...f({"--sliderscroll-g":p,height:"calc(100% - 60px)"}),..._},onMouseEnter:()=>{b.isHovered.current=!0},onMouseLeave:()=>{b.isHovered.current=!1},children:[e("div",{className:[h.n23mSliderScrollWrapper,"n23mSliderScrollWrapper"].join(" "),children:e("div",{className:h.n23mSliderScrollTrack,ref:b.carousel,onClick:r=>{b.drag.current.isMove&&(r.preventDefault(),r.stopPropagation())},onScroll:()=>{if(b.carousel.current){if(w&&M.length&&I.length){const r=b.carousel.current.scrollLeft,e=M[M.length-1]+(I[I.length-1]||0),t=M[x]||0,l=M[x+y.length]||e;r<t-I[0]/2?b.carousel.current.scrollLeft=r+(M[y.length+x]-t):r>l+I[0]/2&&(b.carousel.current.scrollLeft=r-(l-t))}N()}},onMouseDown:r=>{b.drag.current.isDown=!0,b.drag.current.startX=r.pageX-(b.carousel.current?.offsetLeft||0),b.drag.current.scrollLeft=b.carousel.current?.scrollLeft||0,b.drag.current.isDragging=!0,T()},onMouseLeave:()=>{b.drag.current.isDown&&(b.drag.current.isDown=!1,b.drag.current.isDragging=!1,T())},onMouseUp:()=>{b.drag.current.isDown=!1,b.drag.current.isDragging=!1,T()},onMouseMove:r=>{if(!b.drag.current.isDown)return void(b.drag.current.isMove=!1);r.preventDefault();var e;const t=("pageX"in(e=r)?e.pageX:"touches"in e?e.touches[0].pageX:0)-(b.carousel.current?.offsetLeft||0)-b.drag.current.startX;Math.abs(t)>5&&(b.drag.current.isMove=!0),b.carousel.current&&(b.carousel.current.scrollLeft=b.drag.current.scrollLeft-t,N())},children:C.map((r,t)=>e("div",{ref:r=>{b.childRefs.current[t]=r},style:{display:"inline-block"},children:r},r.key||t))})}),e("div",{className:[h.n23mSliderScrollControls,"n23mSliderScrollControls"].join(" "),children:r("div",{className:[h.n23mSliderScrollControlsButtons,"n23mSliderScrollControlsButtons"].join(" "),children:[e(s,{ref:b.buttonLeft,variant:"secondary",height:"50px",width:"50px",padding:0,title:"Previous","aria-label":"Previous",onClick:B,children:e(d,{width:24,height:24})}),e(s,{ref:b.buttonRight,variant:"secondary",height:"50px",width:"50px",padding:0,title:"Next","aria-label":"Next",onClick:X,children:e(g,{width:24,height:24})})]})})]})};S.displayName="SliderScroll";export{S as SliderScroll};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as l,Fragment as t}from"react/jsx-runtime";import{useState as o}from"react";import{B as a}from"../Button-QC014EKI.js";import{C as i}from"../Calendar-BkDrBfRy.js";import{D as n}from"../Dialog-8B0xk8Wx.js";import{F as r}from"../Form-CgTuTB2Q.js";import{G as d}from"../Grid-DmI4tqqG.js";import{I as s}from"../Input-Bl7_BOs4.js";import{L as c}from"../LoaderDots-BoEg_zlZ.js";import{S as p}from"../Select-QBTZllFj.js";import{T as b}from"../TextBox-__k4jPYK.js";import{T as h}from"../Typography-CZqNLAT7.js";import{s as g,g as m}from"../style-inject.es-CrVRO2OA.js";import"../Loader-ZYEBOkbx.js";import"../IconLocate-CQda7FAB.js";import"../validator/index.js";var u={n23mTable:"Table-module_n23mTable__kKVd9",table:"Table-module_table__hJFsY",loadingCell:"Table-module_loadingCell__mIX-P",loadingInner:"Table-module_loadingInner__GlNjv"};g('@layer n23mTable{.Table-module_n23mTable__kKVd9{--hover-bg:rgba(0,0,0,.11);background-attachment:local,local,scroll,scroll;background-color:#fff;background-image:linear-gradient(90deg,#fff 20px,hsla(0,0%,100%,0)),linear-gradient(270deg,#fff 20px,hsla(0,0%,100%,0)),radial-gradient(farthest-side at 0 50%,rgba(0,0,0,.25),transparent),radial-gradient(farthest-side at 100% 50%,rgba(0,0,0,.25),transparent);background-position:0,100%,0,100%;background-repeat:no-repeat;background-size:40px 100%,40px 100%,14px 100%,14px 100%;isolation:isolate;overflow-x:auto;overflow-y:hidden}.Table-module_n23mTable__kKVd9:focus-visible{outline:2px solid currentcolor;outline-offset:2px}.Table-module_table__hJFsY{border-collapse:collapse;min-width:max-content;width:100%}.Table-module_table__hJFsY td,.Table-module_table__hJFsY th{border:1px solid grey;padding:10px 12px;position:relative}.Table-module_table__hJFsY td[data-clickable=true]{-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.Table-module_table__hJFsY td.Table-module_loadingCell__mIX-P{cursor:default;padding:0}.Table-module_loadingInner__GlNjv{align-items:flex-start;box-sizing:border-box;display:flex;justify-content:flex-start;min-height:var(--table-loading-height,219.25px);padding:10px}@media (hover:hover){.Table-module_table__hJFsY tbody tr:hover>td{background-color:var(--hover-bg)}.Table-module_table__hJFsY tbody td:hover:after{background-color:var(--hover-bg);content:"";inset:-100vh 0;pointer-events:none;position:absolute;z-index:-1}.Table-module_table__hJFsY tbody tr:hover>td.Table-module_loadingCell__mIX-P{background-color:transparent}.Table-module_table__hJFsY tbody td.Table-module_loadingCell__mIX-P:hover:after{content:none}}}');const x=({className:g,jsonSchema:x,jsonData:f,cellEdit:_,cellDelete:k,onCellReset:y,isLoading:T=!1,style:v,tableLoadingHeight:C,...S})=>{const[w,j]=o(!1),[z,D]=o(!1),[N,E]=o(0),[M,B]=o(null),{onCellEdit:F,isCellEditError:I=!1,isCellEditPending:Y=!1,isCellEditSuccess:J=!1,cellEditErrorMsg:O,cellEditSuccessMsg:W}=_??{},{onCellDelete:V,isCellDeleteError:P=!1,isCellDeletePending:L=!1,isCellDeleteSuccess:A=!1,cellDeleteErrorMsg:G,cellDeleteSuccessMsg:X}=k??{},K=Boolean(F),R=Boolean(V),H=x.cols.filter(e=>"id"!==e.cellName),q=()=>{y&&setTimeout(()=>y(),300)},Q=()=>{D(!1),q()},U=()=>{D(!1),j(!1),q()};return e("div",{className:[u.n23mTable,"n23mTable",g].filter(Boolean).join(" "),...S,style:{...m({"--table-loading-height":C}),...v},children:[K&&l(n,{open:w,onCancel:()=>{j(!1),q()},widthMax:"900px",children:e(d,{layout:"container",widthMin:"min(800px, calc(100vw - 25px))",padding:"0px 30px 30px 30px",margin:"auto",children:[l(h,{appearance:"light",variant:"subheading",style:{margin:"0 0 20px 0"},children:"Edit Cell"}),e(r,{onSubmit:e=>{if(!F)return;if(Object.values(e).some(({error:e})=>e))return;const l=Object.fromEntries(Object.entries(e).map(([e,{value:l}])=>[e,l]));F(l)},isError:I,isPending:Y,isSuccess:J,errorMsg:O,successMsg:W,children:[l(d,{layout:"columns",col:{smallDesktop:2},gap:{col:"20px"},children:M&&x.cols.map(e=>{const t=M[e.cellName];if("date"===e.cellType){const o=t||e.initialValue;return l(i,{label:e.cellText,name:e.cellName,disabled:e.disabledEdit,initialValue:o,placeholder:e.cellText,validatorOptions:e.validatorOptions},e.cellName)}if("select"===e.cellType){const o=e.options.find(e=>e.value===String(t??""))??e.initialValue;return l(p,{name:e.cellName,options:e.options,disabled:e.disabledEdit,initialValue:o,validatorOptions:e.validatorOptions},e.cellName)}return l(s,{label:e.cellText,name:e.cellName,type:e.cellType,step:"number"===e.cellType?.01:void 0,defaultValue:String(t??""),disabled:e.disabledEdit,placeholder:e.cellText,validatorOptions:e.validatorOptions},e.cellName)})}),e(d,{layout:"flex",widthMax:"100%",padding:"0",justifyContent:R?"space-between":"flex-end",alignItems:"right",margin:"20px 0 0 0",children:[R&&l(a,{type:"button",height:"40px",width:"auto",padding:"0 10px",disabled:Y||L,backgroundColor:"red",backgroundColorDisabled:"grey",onClick:()=>{R&&M&&D(!0)},children:l(b,{tag:"span",desktopSize:16,mobileSize:16,fontWeight:400,color:"white",children:"Delete"})}),l(a,{type:"submit",height:"40px",width:"auto",padding:"0 10px",disabled:Y||L,backgroundColor:"#4BB543",backgroundColorDisabled:"grey",children:l(b,{tag:"span",desktopSize:16,mobileSize:16,fontWeight:400,color:"white",children:"Save changes"})})]})]},N)]})}),R&&l(n,{open:z,onCancel:A?U:Q,widthMax:"450px",children:e(d,{layout:"container",widthMin:"min(400px, calc(100vw - 25px))",padding:"0px 30px 30px 30px",margin:"auto",children:[l(h,{appearance:"light",variant:"subheading",style:{margin:"0 0 10px 0"},children:A?"Deleted":"Are you sure?"}),!A&&l(b,{tag:"p",desktopSize:16,mobileSize:16,fontWeight:400,color:"black",children:"This row will be permanently deleted. This action cannot be undone."}),P&&!A&&l(b,{tag:"p",desktopSize:16,mobileSize:16,fontWeight:400,color:"red",style:{margin:"10px 0 0 0"},children:G??"Delete failed"}),A&&l(b,{tag:"p",desktopSize:16,mobileSize:16,fontWeight:400,color:"#4BB543",children:X??"Row deleted"}),l(d,{layout:"flex",widthMax:"100%",padding:"0",justifyContent:A?"flex-end":"space-between",margin:"20px 0 0 0",children:A?l(a,{type:"button",height:"40px",width:"auto",padding:"0 10px",backgroundColor:"#4BB543",onClick:U,children:l(b,{tag:"span",desktopSize:16,mobileSize:16,fontWeight:400,color:"white",children:"Close"})}):e(t,{children:[l(a,{type:"button",height:"40px",width:"auto",padding:"0 10px",disabled:L,backgroundColor:"grey",backgroundColorDisabled:"grey",onClick:Q,children:l(b,{tag:"span",desktopSize:16,mobileSize:16,fontWeight:400,color:"white",children:"Cancel"})}),l(a,{type:"button",height:"40px",width:"auto",padding:"0 10px",disabled:L,backgroundColor:"red",backgroundColorDisabled:"grey",onClick:()=>{V&&M&&V(M.id)},children:l(b,{tag:"span",desktopSize:16,mobileSize:16,fontWeight:400,color:"white",children:"Yes, delete"})})]})})]})}),e("table",{className:u.table,"aria-busy":T,children:[l("thead",{children:l("tr",{children:H.map(e=>l("th",{scope:"col",children:l(b,{mobileSize:16,desktopSize:20,color:"black",textAlign:e.thAlign??"left",children:e.cellText})},e.cellName))})}),l("tbody",{children:T?l("tr",{children:l("td",{className:u.loadingCell,colSpan:Math.max(H.length,1),children:l("div",{className:u.loadingInner,children:l(c,{})})})}):f.rows.map(e=>l("tr",{children:H.map(t=>{const o=e[t.cellName];return l("td",{"data-clickable":K,onClick:K?()=>(e=>{B(e),j(!0),E(e=>e+1)})(e):void 0,children:l(b,{fontWeight:400,mobileSize:16,desktopSize:16,color:"black",textAlign:t.tdAlign??"left",children:void 0===o?"":String(o)})},t.cellName)})},e.id))})]})]})};x.displayName="Table";export{x as Table};
1
+ import{jsxs as e,jsx as l,Fragment as t}from"react/jsx-runtime";import{useState as a}from"react";import{B as i}from"../Button-BDPxqgFb.js";import{C as o}from"../Calendar-BCqWc3BZ.js";import{D as n}from"../Dialog-eSjNkfJK.js";import{F as r}from"../Form-GEUDMZ7Z.js";import{G as d}from"../Grid-DmI4tqqG.js";import{I as s}from"../Input-BJj54qdT.js";import{L as c}from"../LoaderDots-BoEg_zlZ.js";import{S as p}from"../Select-CQBKuf2T.js";import{T as m}from"../TextBox-__k4jPYK.js";import{T as b}from"../Typography-CR1DOKsN.js";import{s as h,g}from"../style-inject.es-CrVRO2OA.js";import{V as u}from"../validator.const-LBF9whmW.js";import"../IconLocate-BXomEqkx.js";import"../Loader-ZYEBOkbx.js";import"../validator/index.js";var f={n23mTable:"Table-module_n23mTable__kKVd9",table:"Table-module_table__hJFsY",loadingCell:"Table-module_loadingCell__mIX-P",loadingInner:"Table-module_loadingInner__GlNjv"};h('@layer n23mTable{.Table-module_n23mTable__kKVd9{--hover-bg:rgba(0,0,0,.11);background-attachment:local,local,scroll,scroll;background-color:#fff;background-image:linear-gradient(90deg,#fff 20px,hsla(0,0%,100%,0)),linear-gradient(270deg,#fff 20px,hsla(0,0%,100%,0)),radial-gradient(farthest-side at 0 50%,rgba(0,0,0,.25),transparent),radial-gradient(farthest-side at 100% 50%,rgba(0,0,0,.25),transparent);background-position:0,100%,0,100%;background-repeat:no-repeat;background-size:40px 100%,40px 100%,14px 100%,14px 100%;isolation:isolate;overflow-x:auto;overflow-y:hidden}.Table-module_n23mTable__kKVd9:focus-visible{outline:2px solid currentcolor;outline-offset:2px}.Table-module_table__hJFsY{border-collapse:collapse;min-width:max-content;width:100%}.Table-module_table__hJFsY td,.Table-module_table__hJFsY th{border:1px solid grey;padding:10px 12px;position:relative}.Table-module_table__hJFsY td[data-clickable=true]{-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.Table-module_table__hJFsY td.Table-module_loadingCell__mIX-P{cursor:default;padding:0}.Table-module_loadingInner__GlNjv{align-items:flex-start;box-sizing:border-box;display:flex;justify-content:flex-start;min-height:var(--table-loading-height,219.25px);padding:10px}@media (hover:hover){.Table-module_table__hJFsY tbody tr:hover>td{background-color:var(--hover-bg)}.Table-module_table__hJFsY tbody td:hover:after{background-color:var(--hover-bg);content:"";inset:-100vh 0;pointer-events:none;position:absolute;z-index:-1}.Table-module_table__hJFsY tbody tr:hover>td.Table-module_loadingCell__mIX-P{background-color:transparent}.Table-module_table__hJFsY tbody td.Table-module_loadingCell__mIX-P:hover:after{content:none}}}');const x=({className:h,jsonSchema:x,jsonData:_,cellEdit:v,cellDelete:y,onCellReset:T,isLoading:k=!1,style:S,tableLoadingHeight:C,...j})=>{const[z,w]=a(!1),[N,E]=a(!1),[D,M]=a(0),[F,I]=a(null),{onCellEdit:Y,isCellEditError:J=!1,isCellEditPending:O=!1,isCellEditSuccess:V=!1,cellEditErrorMsg:W,cellEditSuccessMsg:P}=v??{},{onCellDelete:B,isCellDeleteError:L=!1,isCellDeletePending:A=!1,isCellDeleteSuccess:G=!1,cellDeleteErrorMsg:X,cellDeleteSuccessMsg:K}=y??{},R=Boolean(Y),H=Boolean(B),q=x.cols.filter(e=>"id"!==e.cellName),Q=()=>{T&&setTimeout(()=>T(),300)},U=()=>{E(!1),Q()},Z=()=>{E(!1),w(!1),Q()};return e("div",{className:[f.n23mTable,"n23mTable",h].filter(Boolean).join(" "),...j,style:{...g({"--table-loading-height":C}),...S},children:[R&&l(n,{open:z,onCancel:()=>{w(!1),Q()},widthMax:"900px",children:e(d,{layout:"container",widthMin:"min(800px, calc(100vw - 25px))",padding:"0px 30px 30px 30px",margin:"auto",children:[l(b,{appearance:"light",variant:"subheading",tag:"h2",style:{margin:"0 0 20px 0"},children:"Edit Cell"}),e(r,{onSubmit:e=>{if(!Y)return;if(Object.values(e).some(({error:e})=>e))return;const l=Object.fromEntries(Object.entries(e).map(([e,{value:l}])=>[e,l]));Y(l)},isError:J,isPending:O,isSuccess:V,errorMsg:W,successMsg:P,children:[l(d,{layout:"columns",col:{smallDesktop:2},gap:{col:"20px"},children:F&&x.cols.map(e=>{const t=F[e.cellName];if("date"===e.cellType){const a=t||e.initialValue;return l(o,{label:e.cellText,name:e.cellName,disabled:e.disabledEdit,initialValue:a,placeholder:e.cellText,validatorOptions:e.validatorOptions},e.cellName)}if("select"===e.cellType){const a=e.options.find(e=>e.value===String(t??""))??e.initialValue;return l(p,{name:e.cellName,options:e.options,disabled:e.disabledEdit,initialValue:a,validatorOptions:e.validatorOptions},e.cellName)}return l(s,{label:e.cellText,name:e.cellName,type:e.cellType,step:"number"===e.cellType?.01:void 0,defaultValue:String(t??""),disabled:e.disabledEdit,placeholder:e.cellText,validatorOptions:e.validatorOptions},e.cellName)})}),e(d,{layout:"flex",widthMax:"100%",padding:"0",justifyContent:H?"space-between":"flex-end",alignItems:"right",margin:"20px 0 0 0",children:[H&&l(i,{type:"button",variant:"danger",disabled:O||A,onClick:()=>{H&&F&&E(!0)},children:l(m,{tag:"span",desktopSize:16,mobileSize:16,fontWeight:400,color:"inherit",children:"Delete"})}),l(i,{type:"submit",variant:"success",disabled:O||A,children:l(m,{tag:"span",desktopSize:16,mobileSize:16,fontWeight:400,color:"inherit",children:"Save changes"})})]})]},D)]})}),H&&l(n,{open:N,onCancel:G?Z:U,widthMax:"900px",children:e(d,{layout:"container",widthMin:"min(500px, calc(100vw - 25px))",padding:"0px 30px 30px 30px",margin:"auto",children:[l(b,{appearance:"light",variant:"subheading",tag:"h2",style:{margin:"0 0 20px 0"},children:G?"Deleted":"Are you sure?"}),!G&&l(b,{variant:"body",tag:"p",desktopSize:16,mobileSize:16,fontWeight:400,children:"This row will be permanently deleted. This action cannot be undone."}),L&&!G&&l(b,{variant:"body",tag:"p",desktopSize:16,mobileSize:16,fontWeight:400,color:u.error,style:{margin:"10px 0 0 0"},children:X??"Delete failed"}),G&&l(b,{variant:"body",tag:"p",desktopSize:16,mobileSize:16,fontWeight:400,color:u.success,children:K??"Row deleted"}),l(d,{layout:"flex",widthMax:"100%",padding:"0",justifyContent:G?"flex-end":"space-between",margin:"20px 0 0 0",children:G?l(i,{type:"button",variant:"success",onClick:Z,children:l(m,{tag:"span",desktopSize:16,mobileSize:16,fontWeight:400,color:"inherit",children:"Close"})}):e(t,{children:[l(i,{type:"button",variant:"secondary",disabled:A,onClick:U,children:l(m,{tag:"span",desktopSize:16,mobileSize:16,fontWeight:400,color:"inherit",children:"Cancel"})}),l(i,{type:"button",variant:"danger",disabled:A,onClick:()=>{B&&F&&B(F.id)},children:l(m,{tag:"span",desktopSize:16,mobileSize:16,fontWeight:400,color:"inherit",children:"Yes, delete"})})]})})]})}),e("table",{className:f.table,"aria-busy":k,children:[l("thead",{children:l("tr",{children:q.map(e=>l("th",{scope:"col",children:l(b,{variant:"body",tag:"span",mobileSize:16,desktopSize:20,color:"black",textAlign:e.thAlign??"left",children:e.cellText})},e.cellName))})}),l("tbody",{children:k?l("tr",{children:l("td",{className:f.loadingCell,colSpan:Math.max(q.length,1),children:l("div",{className:f.loadingInner,children:l(c,{})})})}):_.rows.map(e=>l("tr",{children:q.map(t=>{const a=e[t.cellName];return l("td",{"data-clickable":R,onClick:R?()=>(e=>{I(e),w(!0),M(e=>e+1)})(e):void 0,children:l(b,{variant:"body",tag:"span",fontWeight:400,mobileSize:16,desktopSize:16,color:"black",textAlign:t.tdAlign??"left",children:void 0===a?"":String(a)})},t.cellName)})},e.id))})]})]})};x.displayName="Table";export{x as Table};
@@ -5,14 +5,13 @@ type TypographyPreset = Omit<TextBoxOwnProps, 'children'> & {
5
5
  tag?: React.ElementType;
6
6
  letterSpacing?: React.CSSProperties['letterSpacing'];
7
7
  };
8
- type TypographyProps = Partial<TypographyPreset> & {
8
+ type TypographyProps = Partial<TypographyPreset> & React.HTMLAttributes<HTMLElement> & {
9
9
  variant: TypographyVariant;
10
10
  appearance?: TypographyAppearance;
11
- children?: React.ReactNode;
12
- className?: string;
13
11
  href?: string;
14
12
  target?: React.HTMLAttributeAnchorTarget;
15
13
  rel?: string;
14
+ className?: string;
16
15
  };
17
16
  export declare const Typography: {
18
17
  ({ variant, appearance, style, color, colorHover, ...overrides }: TypographyProps): import("react").JSX.Element;
@@ -1 +1 @@
1
- export{T as Typography}from"../Typography-CZqNLAT7.js";import"react/jsx-runtime";import"../TextBox-__k4jPYK.js";import"../style-inject.es-CrVRO2OA.js";
1
+ export{T as Typography}from"../Typography-CR1DOKsN.js";import"react/jsx-runtime";import"../TextBox-__k4jPYK.js";import"../style-inject.es-CrVRO2OA.js";
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{T as o}from"./TextBox-__k4jPYK.js";const i={display:{tag:"h1",mobileSize:42,desktopSize:76,lineHeight:1.05,fontWeight:700,textWrap:"balance",margin:"clamp(40px, 8vw, 60px) 0 10px"},heading:{tag:"h2",mobileSize:30,desktopSize:52,fontWeight:650,lineHeight:1.1,textWrap:"balance",margin:"clamp(30px, 8vw, 40px) 0 5px"},subheading:{tag:"h3",mobileSize:20,desktopSize:26,lineHeight:1.25,fontWeight:500,margin:"30px 0 0"},body:{tag:"p",mobileSize:16,desktopSize:17,fontWeight:400,margin:"10px 0 0"},caption:{tag:"span",mobileSize:11,desktopSize:12,lineHeight:1,fontWeight:600,margin:0,style:{textTransform:"uppercase"}},link:{tag:"a",mobileSize:"inherit",desktopSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit",fontWeight:"inherit",margin:0}},t={light:{display:{color:"#0F1014"},heading:{color:"#14151A"},subheading:{color:"#3f4043"},body:{color:"#26272E"},caption:{color:"#6B6D76"},link:{color:"orangered",hover:"orangered"}},dark:{display:{color:"#FFFFFF"},heading:{color:"#F7F8FA"},subheading:{color:"#9A9DAA"},body:{color:"#F7F7F8"},caption:{color:"#9A9DAA"},link:{color:"orangered",hover:"orangered"}}},r=({variant:r,appearance:a="light",style:n,color:l,colorHover:g,...p})=>{const h=i[r],c=t[a][r];return e(o,{...h,...p,color:l??c.color,colorHover:g??c.hover,style:{...h.style,...n}})};r.displayName="Typography";export{r as T};
1
+ import{jsx as e}from"react/jsx-runtime";import{T as i}from"./TextBox-__k4jPYK.js";const o={display:{tag:"h1",mobileSize:42,desktopSize:76,lineHeight:1.05,fontWeight:700,textWrap:"balance",margin:"clamp(40px, 8vw, 60px) 0 10px"},heading:{tag:"h2",mobileSize:30,desktopSize:52,fontWeight:650,lineHeight:1.1,textWrap:"balance",margin:"clamp(30px, 8vw, 40px) 0 5px"},subheading:{tag:"h3",mobileSize:20,desktopSize:26,lineHeight:1.25,fontWeight:500,margin:"30px 0 0"},body:{tag:"p",mobileSize:16,desktopSize:17,fontWeight:400,margin:"10px 0 0"},caption:{tag:"span",mobileSize:11,desktopSize:12,lineHeight:1,fontWeight:600,margin:0,style:{textTransform:"uppercase"}},link:{tag:"a",mobileSize:"inherit",desktopSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit",fontWeight:"inherit",margin:0}},t={light:{display:{color:"#0F1014"},heading:{color:"#14151A"},subheading:{color:"#3f4043"},body:{color:"#26272E"},caption:{color:"#6B6D76"},link:{color:"#C73500",hover:"#C73500"}},dark:{display:{color:"#FFFFFF"},heading:{color:"#F7F8FA"},subheading:{color:"#9A9DAA"},body:{color:"#F7F7F8"},caption:{color:"#9A9DAA"},link:{color:"#C73500",hover:"#C73500"}}},r=({variant:r,appearance:a="light",style:l,color:n,colorHover:p,...g})=>{const h=o[r],c=t[a][r];return e(i,{...h,...g,color:n??c.color,colorHover:p??c.hover,style:{...h.style,...l}})};r.displayName="Typography";export{r as T};
@@ -0,0 +1,5 @@
1
+ export declare const VALIDATOR_MESSAGE_COLORS: {
2
+ error: string;
3
+ success: string;
4
+ pending: string;
5
+ };
@@ -0,0 +1 @@
1
+ const s={error:"#B42318",success:"#187A3D",pending:"#5F6368"};export{s as V};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "najwer23morsels",
3
- "version": "1.10.36",
3
+ "version": "1.11.2",
4
4
  "exports": {
5
5
  "./lib/*": {
6
6
  "types": "./lib/*/index.d.ts",
@@ -1 +0,0 @@
1
- import{jsxs as o,jsx as t}from"react/jsx-runtime";import{forwardRef as e}from"react";import{L as n}from"./Loader-ZYEBOkbx.js";import{s as r,g as i}from"./style-inject.es-CrVRO2OA.js";var a={n23mButtonButton:"Button-module_n23mButtonButton__U9-RM"};r('@layer n23mButton{.Button-module_n23mButtonButton__U9-RM{--boxShadow:0 4px 8px 0 rgba(0,0,0,.24),0 6px 20px 0 rgba(0,0,0,.19);corner-shape:squircle;-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);background-color:var(--n23mButtonBg,var(--button-bg));border:1px solid var(--n23mButtonBorderColor,var(--button-bc,unset));border-radius:12px;box-shadow:none;cursor:pointer;height:var(--button-h,auto);letter-spacing:normal;margin:var(--button-m,0);padding:var(--button-p,0);position:relative;transition:background-color .3s,box-shadow .3s;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:var(--button-w,auto);>*{display:inline-block;position:relative;z-index:1}&:before{corner-shape:squircle;background-color:inherit;border-radius:12px;content:"";inset:0;pointer-events:none;position:absolute;transition:filter .3s;z-index:0}@media (hover:hover) and (pointer:fine){&:hover:before{filter:brightness(100%)}&:hover{box-shadow:var(--boxShadow)}}&:active:before{filter:brightness(.8)}&:active{box-shadow:var(--boxShadow)}&:focus-visible:before{filter:brightness(.8);outline:none}&:focus-visible{box-shadow:var(--boxShadow);outline:none}&:disabled{background-color:var(--n23mButtonBgDisabled,var(--button-bgd));box-shadow:none;cursor:not-allowed}}}');const s=e(({loaderMobileSize:e=14,loaderDesktopSize:r=14,margin:s,children:l,className:b,backgroundColor:u,padding:d,loading:c,height:h,width:m,borderColor:g,backgroundColorDisabled:p,style:v,...B},x)=>o("div",{className:["n23mButton"].filter(Boolean).join(" "),children:[c&&t("div",{style:{width:m,height:h},children:t(n,{mobileSize:e,desktopSize:r})}),!c&&t("button",{ref:x,style:{...i({"--button-bg":u,"--button-h":h,"--button-w":m,"--button-bgd":p,"--button-bc":g,"--button-p":d,"--button-m":s}),...v},className:[a.n23mButtonButton,"n23mButtonButton",b].filter(Boolean).join(" "),...B,children:l})]}));s.displayName="Button";export{s as B};
@@ -1 +0,0 @@
1
- import{jsxs as e,jsx as a,Fragment as t}from"react/jsx-runtime";import{useRef as r,useState as o,useMemo as n}from"react";import{B as l}from"./Button-QC014EKI.js";import{I as d,a as i}from"./IconLocate-CQda7FAB.js";import{I as s}from"./Input-Bl7_BOs4.js";import{T as c}from"./TextBox-__k4jPYK.js";import{s as p}from"./style-inject.es-CrVRO2OA.js";var h={n23mCalendar:"Calendar-module_n23mCalendar__6E2X7",icon:"Calendar-module_icon__ye4Dl",dropdownWrapper:"Calendar-module_dropdownWrapper__KryyT",open:"Calendar-module_open__Y-JWN",dropdown:"Calendar-module_dropdown__RPTTl",controls:"Calendar-module_controls__XGi-Q",controlsDate:"Calendar-module_controlsDate__L1Wp6",weekdays:"Calendar-module_weekdays__t9VRM",weekdaysChild:"Calendar-module_weekdaysChild__owTwc",days:"Calendar-module_days__D03p-",daysChild:"Calendar-module_daysChild__Jbjrd",daysActive:"Calendar-module_daysActive__Y7Fsv",daysClickable:"Calendar-module_daysClickable__THEm1",months:"Calendar-module_months__NOLDP",years:"Calendar-module_years__li-uY",monthsChild:"Calendar-module_monthsChild__4gx-0",yearsChild:"Calendar-module_yearsChild__mRWoZ"};p("@layer n23mCalendar{.Calendar-module_n23mCalendar__6E2X7{--iff:-apple-system,BlinkMacSystemFont,avenir next,avenir,segoe ui,helvetica neue,helvetica,Cantarell,Ubuntu,roboto,noto,arial,sans-serif;position:relative;& input{padding-right:40px}.Calendar-module_icon__ye4Dl{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 25 25'%3E%3Cpath fill='%23231f20' d='M22.5 3H21V2a1 1 0 0 0-1-1h-1a1 1 0 0 0-1 1v1h-4V2a1 1 0 0 0-1-1h-1a1 1 0 0 0-1 1v1H7V2a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v1H2.5A1.5 1.5 0 0 0 1 4.5v18A1.5 1.5 0 0 0 2.5 24h20a1.5 1.5 0 0 0 1.5-1.5v-18A1.5 1.5 0 0 0 22.5 3ZM19 2h1v3h-1Zm-7 0h1v3h-1ZM5 2h1v3H5ZM2.5 4H4v1a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1V4h4v1a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1V4h4v1a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1V4h1.5a.5.5 0 0 1 .5.5V8H2V4.5a.5.5 0 0 1 .5-.5Zm20 19h-20a.5.5 0 0 1-.5-.5V9h21v13.5a.5.5 0 0 1-.5.5Z'/%3E%3C/svg%3E\");background-position:100%;background-position:calc(100% - 10px) 50%;background-repeat:no-repeat;background-size:18px;cursor:pointer;display:inline-block;height:40px;position:absolute;right:1px;top:21px;width:40px}.Calendar-module_dropdownWrapper__KryyT{background-color:transparent;display:none;margin-top:65px;padding-bottom:40px;position:absolute;top:0;width:318px;z-index:3;&.Calendar-module_open__Y-JWN{display:block}.Calendar-module_dropdown__RPTTl{corner-shape:squircle;background:#fff;border:1px solid var(--input-cb,#000);border-radius:12px;box-shadow:0 4px 8px 0 rgba(0,0,0,.24),0 6px 20px 0 rgba(0,0,0,.19);box-sizing:border-box;overflow-y:auto;padding:20px;& .Calendar-module_controls__XGi-Q{align-items:center;display:flex;height:40px;justify-content:space-between;padding:0 7px}& .Calendar-module_controlsDate__L1Wp6{display:flex;font-family:var(--n23mFontFamily,var(--iff));font-size:20px;justify-content:center}& .Calendar-module_weekdays__t9VRM{display:flex;justify-content:center;width:100%}& .Calendar-module_weekdaysChild__owTwc{align-items:center;display:flex;font-family:var(--n23mFontFamily,var(--iff));font-size:12px;height:30px;justify-content:center;width:14.28571%}& .Calendar-module_days__D03p-{display:flex;flex-wrap:wrap;justify-content:flex-start;width:100%}& .Calendar-module_daysChild__Jbjrd{font-size:16px}& .Calendar-module_daysChild__Jbjrd:nth-child(7n){color:red;font-weight:700}& .Calendar-module_daysActive__Y7Fsv{corner-shape:squircle;background-color:#f2f2f2;border-radius:12px;cursor:pointer}& .Calendar-module_daysClickable__THEm1{cursor:pointer}& .Calendar-module_months__NOLDP,& .Calendar-module_years__li-uY{display:flex;flex-wrap:wrap;gap:12px;justify-content:center}& .Calendar-module_monthsChild__4gx-0,& .Calendar-module_yearsChild__mRWoZ{display:flex;justify-content:center}}}}}");const u=(e,a,t)=>{const r=new Date(0);return r.setFullYear(e,a,t),r.setHours(0,0,0,0),r},m=e=>{const a="string"==typeof e?new Date(e):e,t=a.getFullYear(),r=a.getMonth();return u(t,r+1,0).getDate()},y=e=>{const a="string"==typeof e?new Date(e):e;return`${String(a.getFullYear()).padStart(4,"0")}-${String(a.getMonth()+1).padStart(2,"0")}-${String(a.getDate()).padStart(2,"0")}`},g=e=>{const a="string"==typeof e?new Date(e):e,t=a.getDate(),r=((e=>{const a="string"==typeof e?new Date(e):e,t=a.getFullYear(),r=a.getMonth();return u(t,r,1).getDay()})(a)+6)%7,o=m(a);return Array.from({length:o+r},(e,a)=>{let o="",n="";return a<=r-1?(o="",n="blank"):a===t+r-1?(o=String(a-r+1),n="active"):(o=String(a-r+1),n="clickable"),{day:a-r+1,dayValue:o,cssClass:n}})},_=({children:p,name:_,placeholder:C,label:w="Calendar",initialValue:v,disabled:b,onBlur:x,validatorOptions:f,className:k,style:D,...S})=>{const F=r(null),[N,M]=o({value:v??y(new Date),open:!1,dropDwonState:"days"}),{year:j,month:Y,day:T,iso:E}=((e,a=new Date)=>{const[t="",r="",o=""]=e.split("-"),n=/^\d{4}$/.test(t)?Number(t):a.getFullYear(),l=/^\d{1,2}$/.test(r)&&Number(r)>=1&&Number(r)<=12?Number(r)-1:a.getMonth(),d=/^\d{1,2}$/.test(o)&&Number(o)>=1&&Number(o)<=31?Number(o):a.getDate(),i=Math.min(d,m(u(n,l,1)));return{year:n,month:l,day:i,iso:`${String(n).padStart(4,"0")}-${String(l+1).padStart(2,"0")}-${String(i).padStart(2,"0")}`}})(N.value),V=e=>{M(a=>({...a,value:y(e),open:!0}))},A=e=>{V(((e,a)=>{const t="string"==typeof e?new Date(e):e,r=t.getFullYear(),o=t.getMonth(),n=u(r,o+1,0).getDate(),l=Math.max(1,Math.min(a,n));return u(r,o,l)})(E,e))},z=e=>{V(((e,a)=>{const t="string"==typeof e?new Date(e):e,r=t.getFullYear(),o=t.getMonth()+a,n=t.getDate(),l=u(r,o,n);if(l.getDate()!==n){const e=u(r,o+1,0).getDate();return u(r,o,e)}return l})(E,e))},H=e=>{V(((e,a)=>{const t="string"==typeof e?new Date(e):e,r=a,o=t.getMonth(),n=t.getDate();return u(r,o,n)})(E,e))},W=n(()=>Array.from({length:7},(e,a)=>new Date(2021,0,(a+4)%7).toLocaleString("en-US",{weekday:"short"})),[]),B=n(()=>Array.from({length:12},(e,a)=>new Date(2021,a+1,0).toLocaleString("en-US",{month:"short"})),[]),$=g(E),P=(e=>{const a="string"==typeof e?new Date(e):e,t=a.getFullYear()-4,r=a.getFullYear()+4;return Array.from({length:r-t+1},(e,a)=>t+a).filter(e=>e>=0)})(E);return e("div",{className:[h.n23mCalendar,"n23mCalendar",k].filter(Boolean).join(" "),...S,style:{...D},children:[a("div",{className:h.icon,onMouseDown:e=>{b||(e.preventDefault(),F.current?.focus(),M(e=>({...e,open:!e.open,dropDwonState:"days"})))}}),a(s,{inputRef:F,label:w,type:"text",kind:"input",name:_,autoComplete:"off",placeholder:C,onChange:e=>{const a=e.currentTarget.value;M(e=>({...e,value:a}))},onBlur:e=>{M(e=>({...e,open:!1})),x?.(e)},onClick:()=>{b||M(e=>({...e,open:!0,dropDwonState:"days"}))},disabled:b,value:N.value,validatorOptions:[...f??[],{type:"date"}],className:h.arrowUp,"aria-expanded":N.open,role:"combobox"}),a("div",{className:[h.dropdownWrapper,N.open?h.open:""].join(" "),children:e("div",{className:[h.dropdown].join(" "),onMouseDown:e=>e.preventDefault(),children:["years"===N.dropDwonState&&e(t,{children:[e("div",{className:h.controls,style:{marginBottom:"10px"},children:[a("div",{style:{width:"30px"},children:a(l,{type:"button",padding:"3px 0 0 0",height:"30px",width:"30px",title:"Prev Month",backgroundColor:"#F2F0EF",borderColor:"black",onClick:()=>H(j-9),children:a(d,{color:"black",height:22,width:22})})}),a("div",{style:{width:"60%"},className:h.controlsDate,children:a("div",{style:{cursor:"pointer"},onClick:()=>M(e=>({...e,dropDwonState:"days"})),children:j})}),a("div",{style:{width:"30px"},children:a(l,{type:"button",padding:"3px 0 0 0",height:"30px",width:"30px",title:"Prev Month",backgroundColor:"#F2F0EF",borderColor:"black",onClick:()=>H(j+9),children:a(i,{color:"black",height:22,width:22})})})]}),a("div",{className:h.years,children:P.map(e=>a("div",{className:h.yearsChild,children:a(l,{type:"button",height:"40px",width:"80px",color:"black",backgroundColor:j==e?"white":"#F2F0EF",borderColor:"black",title:"year",onClick:()=>{H(e),M(e=>({...e,dropDwonState:"days"}))},children:a(c,{mobileSize:14,desktopSize:14,children:e})},e+N.value)},e+N.value))})]}),"months"===N.dropDwonState&&a("div",{className:h.months,children:B.map((e,t)=>a("div",{className:h.monthsChild,children:a(l,{type:"button",height:"40px",width:"80px",backgroundColor:Y==t?"white":"#F2F0EF",borderColor:"black",title:"month",onClick:()=>{z(t-Y),M(e=>({...e,dropDwonState:"days"}))},children:a(c,{mobileSize:14,desktopSize:14,children:e})},e+N.value)},e+N.value))}),"days"===N.dropDwonState&&e(t,{children:[e("div",{className:h.controls,children:[a("div",{style:{width:"30px"},children:a(l,{type:"button",padding:"3px 0 0 0",height:"30px",width:"30px",title:"Prev Month",backgroundColor:"#F2F0EF",borderColor:"black",onClick:()=>z(-1),children:a(d,{color:"black",height:22,width:22})})}),e("div",{style:{width:"60%"},className:h.controlsDate,children:[a("div",{style:{cursor:"pointer"},onClick:()=>M(e=>({...e,dropDwonState:"years"})),children:j}),a("div",{children:"-"}),a("div",{style:{cursor:"pointer"},onClick:()=>M(e=>({...e,dropDwonState:"months"})),children:String(Y+1).padStart(2,"0")}),a("div",{children:"-"}),a("div",{children:String(T).padStart(2,"0")})]}),a("div",{style:{width:"30px"},children:a(l,{type:"button",padding:"3px 0 0 0",height:"30px",width:"30px",title:"Prev Month",backgroundColor:"#F2F0EF",borderColor:"black",onClick:()=>z(1),children:a(i,{color:"black",height:22,width:22})})})]}),a("div",{className:h.weekdays,children:W.map(e=>a("div",{className:h.weekdaysChild,children:e},e))}),a("div",{className:h.days,children:$.map(e=>a("div",{className:[h.weekdaysChild,h.daysChild,"active"==e.cssClass&&h.daysActive,"clickable"==e.cssClass&&h.daysClickable].join(" "),onMouseDown:()=>{e.day>0&&A(e.day),M(e=>({...e,open:!1})),setTimeout(()=>{F.current?.blur()})},children:e.day<=0||e.day>m(E)?" ":e.day},e.day+N.value))})]})]})})]})};_.displayName="Calendar";export{_ as C};
@@ -1 +0,0 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{L as n}from"./LoaderDots-BoEg_zlZ.js";import{T as o}from"./TextBox-__k4jPYK.js";const r=({children:r,onSubmit:s,className:i,isError:a,isPending:m,isSuccess:l,errorMsg:c,successMsg:f,style:p,...u})=>e("form",{className:["n23mForm",i].filter(Boolean).join(" "),...u,style:{...p},onSubmit:e=>{e.preventDefault();const t=e.currentTarget;t&&Array.from(t.elements).forEach(e=>{(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement)&&e.dispatchEvent(new FocusEvent("focusout",{bubbles:!0}))});const n=Object.fromEntries(Array.from(t.elements).filter(e=>e instanceof HTMLInputElement&&""!==e.name||e instanceof HTMLTextAreaElement&&""!==e.name||e instanceof HTMLSelectElement&&""!==e.name).map(e=>[e.name,{error:e.className.includes("error"),value:e.value}]));s(n)},children:[r,a&&t(o,{tag:"p",color:"#ff3333",mobileSize:12,desktopSize:12,margin:"15px 0 10px 0",fontWeight:400,children:c}),m&&t(n,{color:"grey",mobileSize:12,desktopSize:12,fontWeight:400,margin:"15px 0 10px 0"}),l&&t(o,{tag:"p",color:"#4BB543",mobileSize:12,desktopSize:12,margin:"15px 0 10px 0",fontWeight:400,children:f})]});r.displayName="Form";export{r as F};
@@ -1 +0,0 @@
1
- import{jsx as o,jsxs as i}from"react/jsx-runtime";const e=({width:i,height:e,color:t="currentColor"})=>o("svg",{viewBox:"0 0 320 512",width:i,height:e,fill:t,children:o("path",{d:"M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"})});e.displayName="IconArrowLeft";const t=({width:i,height:e,color:t="currentColor"})=>o("svg",{viewBox:"0 0 320 512",width:i,height:e,fill:t,children:o("path",{d:"M278.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-160 160c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L210.7 256 73.4 118.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l160 160z"})});t.displayName="IconArrowRight";const h=({width:e,height:t,color:h="currentColor",open:c=!1})=>i("svg",{viewBox:"0 0 24 24",width:e,height:t,fill:"none",stroke:h,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[o("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4"}),o("path",{d:"M3 7a4 4 0 0 1 4-4h2v18H7a4 4 0 0 1-4-4z",fill:c?h:"none"})]});h.displayName="IconAside";const c=({width:e,height:t,color:h="currentColor"})=>i("svg",{width:e,height:t,viewBox:"0 0 24 24",fill:"none",stroke:h,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),o("polyline",{points:"15 3 21 3 21 9"}),o("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]});c.displayName="IconBoxWithArrow";const r=({width:e,height:t,color:h="currentColor"})=>o("svg",{viewBox:"0 -20 492.589 492.589",width:e,height:t,fill:h,children:i("g",{children:[o("path",{d:"M468.467,222.168h-28.329c-9.712-89.679-80.46-161.18-169.71-172.258V24.135c0-13.338-10.791-24.134-24.134-24.134 c-13.311,0-24.117,10.796-24.117,24.134V49.91C132.924,60.988,62.177,132.488,52.482,222.168H24.153 C10.806,222.168,0,232.964,0,246.286c0,13.336,10.806,24.132,24.153,24.132h29.228c12.192,86.816,81.551,155.4,168.797,166.229 v31.804c0,13.336,10.806,24.135,24.117,24.135c13.343,0,24.134-10.799,24.134-24.135v-31.804 c87.228-10.829,156.607-79.413,168.775-166.229h29.264c13.33,0,24.122-10.796,24.122-24.132 C492.589,232.964,481.797,222.168,468.467,222.168z M246.294,398.093c-85.345,0-154.804-69.453-154.804-154.813 c0-85.363,69.459-154.813,154.804-154.813c85.376,0,154.823,69.45,154.823,154.813 C401.117,328.639,331.671,398.093,246.294,398.093z"}),o("path",{d:"M246.294,176.93c-36.628,0-66.34,29.704-66.34,66.349c0,36.635,29.711,66.349,66.34,66.349 c36.66,0,66.34-29.713,66.34-66.349C312.634,206.635,282.955,176.93,246.294,176.93z"})]})});r.displayName="IconLocate";export{e as I,t as a,h as b,c,r as d};
@@ -1 +0,0 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useRef as n,useEffect as r}from"react";import{T as o}from"./TextBox-__k4jPYK.js";import{s as a,g as i}from"./style-inject.es-CrVRO2OA.js";import{validator as l}from"./validator/index.js";var p={n23mInput:"Input-module_n23mInput__6WopW",n23mInputInput:"Input-module_n23mInputInput__djmAy"};a("@layer n23mInput{.Input-module_n23mInput__6WopW{--iff:-apple-system,BlinkMacSystemFont,avenir next,avenir,segoe ui,helvetica neue,helvetica,Cantarell,Ubuntu,roboto,noto,arial,sans-serif;margin-top:0;&:not(:has(input[type=hidden])){margin-bottom:10px}.Input-module_n23mInputInput__djmAy{display:grid;& input,& textarea{corner-shape:squircle;border:1px solid var(--input-cb,#000);border-radius:12px;box-sizing:border-box;color:var(--input-c,#000);font-family:var(--n23mFontFamily,var(--iff));font-size:16px;font-weight:500;&:disabled{-webkit-text-fill-color:#8a8a8a;background-color:#f3f3f3;border-color:#cfcfcf;color:#8a8a8a;cursor:not-allowed;opacity:1}}& input{height:40px;padding:20px 10px;width:100%}& textarea{field-sizing:content;block-size:100%;max-height:400px;min-height:200px;padding:10px;resize:vertical}&input[type=hidden]{margin:0;padding:0}& ::placeholder{filter:brightness(125%);font-weight:300}}.Input-module_n23mInputError__0yrzG{color:var(--najwer23snacks-input-error-font-color);font-family:var(--najwer23snacks-input-error-font-family);font-size:var(--najwer23snacks-input-error-font-size);font-weight:var(--najwer23snacks-input-error-font-weight);line-height:1;margin:2px}}}");const u=e=>{for(const t of[":autofill",":-webkit-autofill"])try{if(e.matches(t))return!0}catch{}return!1},s=({className:a,style:s,name:c,label:d,inputRef:m,placeholder:f,type:h="text",labelColor:g="black",kind:x="input",inputColor:v,inputColorBorder:b,defaultValue:y,disabled:I,validatorOptions:_,value:C,autoComplete:k,id:j,onBlur:w,onChange:z,step:B,...S})=>{const T=n(null),W=n(null),F=e=>{if(T.current&&(T.current.textContent=""),!_)return;const t=l(e.value,_);t.length>0?(T.current&&(T.current.textContent=t[0]),e.classList.add("error")):e.classList.remove("error")},N=e=>{w?.(e);const t=e.target;document.activeElement!==t&&F(t)},V=e=>{z?.(e);const t=e.target;((e=>{const{inputType:t}=e.nativeEvent;return!t||"insertReplacementText"===t||u(e.target)})(e)||t.classList.contains("error"))&&F(t)};return r(()=>{const e=setTimeout(()=>{const e=W.current?.querySelector("input, textarea");e&&e.value&&u(e)&&F(e)},300);return()=>clearTimeout(e)},[]),e("div",{ref:W,className:[p.n23mInput,"n23mInput",a].filter(Boolean).join(" "),...S,style:{...i({"--input-c":v,"--input-cb":b}),...s},children:["hidden"!==h&&t(o,{mobileSize:14,desktopSize:14,tag:"label",fontWeight:400,color:g,htmlFor:"select"===x?j:c,children:d}),e("div",{className:p.n23mInputInput,children:["input"===x&&t("input",{ref:m,id:c,name:c,type:h,onBlur:N,onChange:V,placeholder:f,defaultValue:y,disabled:I,value:C,autoComplete:k,step:B}),"textarea"===x&&t("textarea",{autoComplete:k,id:c,name:c,onBlur:N,onChange:V,placeholder:f,defaultValue:y,disabled:I,value:C,ref:m}),"select"===x&&t("input",{id:j,autoComplete:"off",ref:m,type:h,onBlur:N,onChange:V,placeholder:f,defaultValue:y,disabled:I,value:C,step:B})]}),"hidden"!==h&&t(o,{ref:T,mobileSize:12,desktopSize:12,tag:"p",fontWeight:400,color:"#ff3333",lineHeight:"14px",margin:"2px 0 2px"})]})};s.displayName="Input";export{s as I};