mimir-ui-kit 1.14.0 → 1.14.2
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +62 -62
- package/dist/DatePickerModal-BM0BgzTb.js +204 -0
- package/dist/{NavigationButtons-B8tMfqrg.js → NavigationButtons-DuOoqaPo.js} +20 -20
- package/dist/assets/Accordion.css +1 -0
- package/dist/assets/AccordionItem.css +1 -0
- package/dist/assets/Button.css +1 -1
- package/dist/assets/DatePickerModal.css +1 -0
- package/dist/assets/Drawer.css +1 -0
- package/dist/assets/Input.css +1 -1
- package/dist/assets/ListPhotos.css +1 -0
- package/dist/assets/MergedButton.css +1 -1
- package/dist/assets/OtpInput.css +1 -1
- package/dist/assets/Pagination.css +1 -0
- package/dist/assets/RadioGroup.css +1 -1
- package/dist/assets/SelectSearch.css +1 -0
- package/dist/assets/Slider.css +1 -1
- package/dist/assets/Switch.css +1 -0
- package/dist/assets/TabTrail.css +1 -0
- package/dist/assets/Tag.css +1 -0
- package/dist/assets/Timer.css +1 -0
- package/dist/assets/Uploader.css +1 -0
- package/dist/assets/UploaderPhotos.css +1 -0
- package/dist/assets/index.css +1 -1
- package/dist/bugs-CSBdWk0R.js +18 -0
- package/dist/components/Accordion/Accordion.d.ts +10 -0
- package/dist/components/Accordion/Accordion.js +176 -0
- package/dist/components/Accordion/AccordionItem/AccordionItem.d.ts +8 -0
- package/dist/components/Accordion/AccordionItem/AccordionItem.js +16 -0
- package/dist/components/Accordion/AccordionItem/index.d.ts +1 -0
- package/dist/components/Accordion/AccordionItem/index.js +4 -0
- package/dist/components/Accordion/constants.d.ts +8 -0
- package/dist/components/Accordion/constants.js +14 -0
- package/dist/components/Accordion/index.d.ts +3 -0
- package/dist/components/Accordion/index.js +8 -0
- package/dist/components/Button/Button.d.ts +0 -1
- package/dist/components/Button/Button.js +26 -25
- package/dist/components/Button/constants.d.ts +2 -1
- package/dist/components/Button/constants.js +1 -0
- package/dist/components/DatePicker/DatePicker.d.ts +44 -0
- package/dist/components/DatePicker/DatePicker.js +69 -0
- package/dist/components/DatePicker/DatePickerModal.d.ts +8 -0
- package/dist/components/DatePicker/DatePickerModal.js +9 -0
- package/dist/components/DatePicker/constants.d.ts +6 -0
- package/dist/components/DatePicker/constants.js +11 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/DatePicker/index.js +4 -0
- package/dist/components/Drawer/Drawer.d.ts +42 -0
- package/dist/components/Drawer/Drawer.js +145 -0
- package/dist/components/Drawer/constants.d.ts +5 -0
- package/dist/components/Drawer/constants.js +9 -0
- package/dist/components/Drawer/index.d.ts +2 -0
- package/dist/components/Drawer/index.js +6 -0
- package/dist/components/Input/Input.d.ts +2 -2
- package/dist/components/Input/Input.js +17 -16
- package/dist/components/InputPassword/InputPassword.js +2 -2
- package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
- package/dist/components/ListPhotos/ListPhotos.d.ts +23 -0
- package/dist/components/ListPhotos/ListPhotos.js +33 -0
- package/dist/components/ListPhotos/constants.d.ts +3 -0
- package/dist/components/ListPhotos/constants.js +21 -0
- package/dist/components/ListPhotos/index.d.ts +2 -0
- package/dist/components/ListPhotos/index.js +4 -0
- package/dist/components/MergedButton/MergedButton.d.ts +1 -1
- package/dist/components/MergedButton/MergedButton.js +17 -19
- package/dist/components/OtpInput/OtpInput.js +6 -6
- package/dist/components/Pagination/Pagination.d.ts +42 -0
- package/dist/components/Pagination/Pagination.js +220 -0
- package/dist/components/Pagination/constants.d.ts +2 -0
- package/dist/components/Pagination/constants.js +6 -0
- package/dist/components/Pagination/index.d.ts +1 -0
- package/dist/components/Pagination/index.js +4 -0
- package/dist/components/Pagination/types.d.ts +0 -0
- package/dist/components/Pagination/types.js +1 -0
- package/dist/components/Portal/Portal.d.ts +7 -0
- package/dist/components/Portal/Portal.js +10 -0
- package/dist/components/Portal/index.d.ts +1 -0
- package/dist/components/Portal/index.js +4 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +18 -2
- package/dist/components/RadioGroup/RadioGroup.js +130 -1061
- package/dist/components/RadioGroup/index.d.ts +1 -1
- package/dist/components/SelectSearch/SelectSearch.d.ts +15 -0
- package/dist/components/SelectSearch/SelectSearch.js +3876 -0
- package/dist/components/SelectSearch/constants.d.ts +4 -0
- package/dist/components/SelectSearch/constants.js +8 -0
- package/dist/components/SelectSearch/index.d.ts +2 -0
- package/dist/components/SelectSearch/index.js +6 -0
- package/dist/components/Slider/NavigationButtons/NavigationButtons.js +1 -1
- package/dist/components/Slider/NavigationButtons/index.js +1 -1
- package/dist/components/Slider/Slider.js +10 -10
- package/dist/components/Switch/Switch.d.ts +294 -0
- package/dist/components/Switch/Switch.js +59 -0
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/Switch/index.js +4 -0
- package/dist/components/TabTrail/TabButtons/TabButtons.d.ts +8 -0
- package/dist/components/TabTrail/TabButtons/TabButtons.js +29 -0
- package/dist/components/TabTrail/TabButtons/constants.d.ts +8 -0
- package/dist/components/TabTrail/TabButtons/constants.js +14 -0
- package/dist/components/TabTrail/TabButtons/index.d.ts +1 -0
- package/dist/components/TabTrail/TabButtons/index.js +4 -0
- package/dist/components/TabTrail/TabTrail.d.ts +11 -0
- package/dist/components/TabTrail/TabTrail.js +282 -0
- package/dist/components/TabTrail/constants.d.ts +4 -0
- package/dist/components/TabTrail/constants.js +8 -0
- package/dist/components/TabTrail/index.d.ts +2 -0
- package/dist/components/TabTrail/index.js +6 -0
- package/dist/components/Tag/Tag.d.ts +20 -57
- package/dist/components/Tag/Tag.js +39 -84
- package/dist/components/Tag/constants.d.ts +5 -37
- package/dist/components/Tag/constants.js +13 -53
- package/dist/components/Tag/index.d.ts +2 -3
- package/dist/components/Tag/index.js +5 -6
- package/dist/components/Tag/types.d.ts +0 -6
- package/dist/components/Timer/Timer.d.ts +24 -0
- package/dist/components/Timer/Timer.js +29 -0
- package/dist/components/Timer/index.d.ts +1 -0
- package/dist/components/Timer/index.js +4 -0
- package/dist/components/Uploader/Uploader.d.ts +30 -0
- package/dist/components/Uploader/Uploader.js +90 -0
- package/dist/components/Uploader/constants.d.ts +5 -0
- package/dist/components/Uploader/constants.js +16 -0
- package/dist/components/Uploader/index.d.ts +2 -0
- package/dist/components/Uploader/index.js +4 -0
- package/dist/components/UploaderPhotos/UploaderPhotos.d.ts +29 -0
- package/dist/components/UploaderPhotos/UploaderPhotos.js +46 -0
- package/dist/components/UploaderPhotos/index.d.ts +2 -0
- package/dist/components/UploaderPhotos/index.js +4 -0
- package/dist/components/index.d.ts +16 -1
- package/dist/components/index.js +31 -0
- package/dist/focus-management-1rQPII7Z.js +77 -0
- package/dist/hidden-BuVoeHNy.js +13 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.js +7 -1
- package/dist/hooks/useClickOutside/index.d.ts +1 -0
- package/dist/hooks/useClickOutside/index.js +4 -0
- package/dist/hooks/useClickOutside/useClickOutside.d.ts +7 -0
- package/dist/hooks/useClickOutside/useClickOutside.js +25 -0
- package/dist/hooks/useInterval/index.d.ts +1 -0
- package/dist/hooks/useInterval/index.js +4 -0
- package/dist/hooks/useInterval/useInterval.d.ts +1 -0
- package/dist/hooks/useInterval/useInterval.js +17 -0
- package/dist/hooks/useLockBodyScroll/index.d.ts +1 -0
- package/dist/hooks/useLockBodyScroll/index.js +4 -0
- package/dist/hooks/useLockBodyScroll/useLockBodyScroll.d.ts +6 -0
- package/dist/hooks/useLockBodyScroll/useLockBodyScroll.js +20 -0
- package/dist/hooks/useTimer/index.d.ts +18 -0
- package/dist/hooks/useTimer/index.js +83 -0
- package/dist/hooks/useTimer/useTimer.d.ts +18 -0
- package/dist/hooks/useTimer/useTimer.js +87 -0
- package/dist/hooks/useTimer/utils.d.ts +24 -0
- package/dist/hooks/useTimer/utils.js +88 -0
- package/dist/hooks/useWindowSize/index.d.ts +4 -0
- package/dist/hooks/useWindowSize/index.js +26 -0
- package/dist/icons/Icon.js +1 -1
- package/dist/icons/components/12px/Close12px.d.ts +4 -0
- package/dist/icons/components/12px/Close12px.js +18 -0
- package/dist/icons/components/index.d.ts +1 -0
- package/dist/icons/components/index.js +560 -559
- package/dist/{index-_ACzPKPw.js → index-Cxiikb7g.js} +561 -558
- package/dist/index.d.ts +1 -0
- package/dist/index.js +40 -1
- package/dist/keyboard-B256ZoM-.js +745 -0
- package/dist/label-C_5Syaoj.js +159 -0
- package/dist/open-closed-CbXq00et.js +93 -0
- package/dist/use-active-press-B6yeSopF.js +31 -0
- package/dist/use-by-comparator-BUO78DGe.js +16 -0
- package/dist/use-resolve-button-type-B6LE6gU3.js +19 -0
- package/dist/utils/UUID4.d.ts +1 -0
- package/dist/utils/UUID4.js +9 -0
- package/dist/utils/formating/Date.d.ts +1 -0
- package/dist/utils/formating/Date.js +26 -0
- package/dist/utils/formating/Month.d.ts +8 -0
- package/dist/utils/formating/Month.js +80 -0
- package/dist/utils/formating/Numbers.d.ts +6 -0
- package/dist/utils/formating/Numbers.js +8 -0
- package/dist/utils/index.d.ts +11 -0
- package/dist/utils/index.js +13 -0
- package/package.json +128 -128
@@ -0,0 +1 @@
|
|
1
|
+
._container_y23cb_2{position:relative}._group_y23cb_6{position:relative;overflow:hidden}._group-inner_y23cb_10{display:flex;gap:var(--space-4xl)}._tab_y23cb_15{height:var(--tab-trail-height);margin-bottom:var(--space-2xl);padding:0 var(--space-m);color:var(--disabled-color);font-weight:var(--font-weight-text-medium);font-size:var(--tab-trail-font-size);font-family:var(--font-montserrat);border-bottom:2px solid var(--white)}._tab_y23cb_15[data-selected]{color:var(--black-100);border-bottom:2px solid var(--sapphire-100)}._list_y23cb_30{display:flex;align-items:center;overflow:auto;white-space:nowrap;scroll-behavior:smooth}._list_y23cb_30::-webkit-scrollbar{display:none}._tabs_y23cb_41{display:flex}._buttons_y23cb_45{position:relative;display:flex;height:100%;max-height:40px}._m_y23cb_52{--tab-trail-font-size: var(--size-text-xl3);--tab-trail-height: var(--tab-trail-height-m)}._s_y23cb_57{--tab-trail-font-size: var(--size-text-xl);--tab-trail-height: var(--tab-trail-height-s)}
|
@@ -0,0 +1 @@
|
|
1
|
+
._container_1f2sk_2{display:flex;align-items:center;justify-content:center;color:var(--sapphire-normal);border:none;border:1px solid var(--sapphire-normal);border-top-left-radius:var(--control-radius-s);border-bottom-right-radius:var(--control-radius-s);transform:skew(-23.48deg)}._container_1f2sk_2:hover{color:var(--sapphire-hover);border-color:var(--sapphire-hover)}._container_1f2sk_2:active{color:var(--white);background-color:var(--sapphire-normal)}._container_1f2sk_2:focus{box-shadow:0 0 4px 0 var(--box-shadow-focus)}._container_1f2sk_2._disabled_1f2sk_24{color:var(--white);background-color:var(--disabled);border-color:var(--disabled)}._container_1f2sk_2 ._inner_1f2sk_29{display:inline-block;font-weight:var(--font-weight-text-regular);font-size:var(--size-text-l);font-family:var(--inter-font-family);line-height:var(--line-height-text-s1);transform:skew(23.48deg)}._container_1f2sk_2._M_1f2sk_37{height:40px;padding:0 15px}._container_1f2sk_2._S_1f2sk_41{height:32px;padding:0 11px}._container_1f2sk_2._S_1f2sk_41 ._inner_1f2sk_29{font-size:var(--size-text-m);line-height:16px}._container_1f2sk_2._XS_1f2sk_49{height:26px;padding:0 8px}._container_1f2sk_2._XS_1f2sk_49 ._inner_1f2sk_29{font-size:var(--size-text-s);line-height:20px}
|
@@ -0,0 +1 @@
|
|
1
|
+
._timer_llwad_3{color:var(--black-60);font-size:var(--size-text-l)}@media (max-width: 600px){._timer_llwad_3{font-size:var(--size-text-m)}}
|
@@ -0,0 +1 @@
|
|
1
|
+
._upload-file__wrapper_165vi_2{position:relative;width:100%}._upload-file__wrapper_165vi_2 label{display:flex;flex-direction:column;gap:var(--space-m);align-items:center;justify-content:center}._upload-file__wrapper_165vi_2 label button{z-index:1}._upload-file__wrapper_165vi_2 label b{color:var(--black-100);font-weight:var(--font-weight-text-regular);font-size:var(--size-text-l2);font-family:var(--font-inter);font-style:normal;line-height:130%;text-align:center}._upload-file__wrapper_165vi_2 label ._upload-text_165vi_25{color:var(--disabled-color);font-weight:var(--font-weight-text-regular);font-size:var(--size-text-m);font-family:var(--font-inter);font-style:normal;line-height:var(--line-height-text-xxs);text-align:center}._upload-file-input_165vi_35{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;opacity:0}
|
@@ -0,0 +1 @@
|
|
1
|
+
._upload-file__wrapper_udscq_2{display:flex;flex-direction:column;gap:var(--space-m)}
|
package/dist/assets/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@font-face{font-weight:400;font-family:Montserrat;font-style:normal;src:url(./fonts/585d10920d676fcd.woff2) format("woff2"),url(./fonts/3b9f59412b17ff93.woff) format("woff")}@font-face{font-weight:700;font-family:Montserrat;font-style:normal;src:url(./fonts/f4d681a788c6d497.woff2) format("woff2"),url(./fonts/43b748f250df0f08.woff) format("woff")}@font-face{font-weight:300;font-family:Montserrat;font-style:normal;src:url(./fonts/ee3db32f0aadef5d.woff2) format("woff2"),url(./fonts/1a738bfdbc1e4d9d.woff) format("woff")}@font-face{font-weight:500;font-family:Montserrat;font-style:normal;src:url(./fonts/e51d2feb30084bc2.woff2) format("woff2"),url(./fonts/badaa6d1837432de.woff) format("woff")}@font-face{font-weight:600;font-family:Montserrat;font-style:normal;src:url(./fonts/63611593e008a77c.woff2) format("woff2"),url(./fonts/3cdd7fabbe89d2b9.woff) format("woff")}@font-face{font-weight:400;font-family:Inter;font-style:normal;src:url(./fonts/d080ae18fd04e52c.woff2) format("woff2");font-variant-numeric:slashed-zero}@font-face{font-weight:700;font-family:Inter;font-style:normal;src:url(./fonts/11d5bc9f0cad36d1.woff2) format("woff2");font-variant-numeric:slashed-zero}@font-face{font-weight:500;font-family:Inter;font-style:normal;src:url(./fonts/242d04bef81519ae.woff2) format("woff2");font-variant-numeric:slashed-zero}@font-face{font-weight:600;font-family:Inter;font-style:normal;src:url(./fonts/cac2ba46e8c8adc9.woff2) format("woff2");font-variant-numeric:slashed-zero}@supports (font-variation-settings: normal){:root{font-family:InterVariable,sans-serif}}:root{font-feature-settings:"zero"}*{margin:0;padding:0;border:0;outline:none}*,:after,:before{box-sizing:border-box}:active,:focus{outline:0}a,a:visited,a:hover{-webkit-text-decoration:none;text-decoration:none}a:active,a:focus{outline:0}aside,footer,header,nav{display:block}body,html{width:100%;height:100%;font-size:100%;line-height:1}button,input,textarea,select{font-family:inherit}input::-ms-clear{display:none}button{background-color:transparent;cursor:pointer}button::-moz-focus-inner{padding:0;border:0}ul li{list-style:none}img{vertical-align:top}h1,h2,h3,h4,h5,h6{font-weight:inherit;font-size:inherit}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:var(--color-typo-brand);-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s}:root{--sapphire-100: #2355d7;--sapphire-90: #3564df;--sapphire-80: #4b75e2;--sapphire-70: #6186e6;--sapphire-60: #7797e9;--sapphire-50: #8da7ed;--sapphire-40: #9fb7f4;--sapphire-30: #b9caf4;--sapphire-20: #cfdaf7;--sapphire-10: #e5ebfb;--citrine-100: #ff7900;--citrine-90: #ff861a;--citrine-80: #ff9433;--citrine-70: #ffa14d;--citrine-60: #ffaf66;--citrine-50: #ffbc80;--citrine-40: #ffc999;--citrine-30: #ffd7b2;--citrine-20: #ffe4cc;--citrine-10: #fff2e5;--magenta-100: #bc2251;--magenta-90: #d8275d;--magenta-80: #dc3d6d;--magenta-70: #e15781;--magenta-60: #e46c91;--magenta-50: #e986a4;--magenta-40: #ed9cb4;--magenta-30: #f2b6c8;--magenta-20: #f6cbd8;--magenta-10: #fae5ec;--black-100: #000;--black-95: #0d0d0d;--black-90: #1a1a1a;--black-85: #262626;--black-80: #333;--black-75: #404040;--black-70: #4d4d4d;--black-65: #595959;--black-60: #666;--black-55: #737373;--black-50: #808080;--black-45: #8c8c8c;--black-40: #999;--black-35: #a6a6a6;--black-30: #b3b3b3;--black-25: #bfbfbf;--black-20: #ccc;--black-15: #d9d9d9;--black-10: #e6e6e6;--black-5: #f2f2f2;--white: #fff;--dark-blue: #0a38af;--blue-40: #a7bbef;--blue-20: #d3ddf7;--green: #1b770c;--red-tag: #f01406;--success-normal: #23b413;--success-bg-hover: #d5fbe2;--success-bg-active: #ebfdf1;--alarm-normal: #fdc023;--alarm-bg-hover: #fff0c7;--alarm-bg-active: #fff6de;--error-normal: #e64646;--error-bg-hover: #fadbdb;--error-bg-active: #fbe3e3;--disabled: #b3b3b3;--disabled-color: #b2b2b2;--light-text: var(--white);--dark-text: var(--black-100);--sapphire-normal: var(--sapphire-100);--sapphire-hover: #1b41a3;--sapphire-active: #122c70;--citrine-normal: var(--citrine-100);--citrine-hover: #e56d00;--citrine-active: #cc6100;--asphalt-border: var(--black-30);--asphalt-normal: var(--black-80);--asphalt-hover: var(--black-90);--asphalt-active: var(--black-100);--gray-normal: var(--black-5);--gray-hover: var(--black-10);--gray-active: var(--black-80);--white-normal: var(--white);--white-hover: var(--black-5);--white-transparent: rgba(255, 255, 255, .4);--white-active: var(--black-80);--red-normal: var(--error-normal);--red-hover: #e33030;--red-active: #dc1e1e;--green-normal: var(--green);--green-hover: #16610a;--green-active: #114a08;--counter-text: #ffa066;--button-height-xs: 24px;--button-height-s: 32px;--button-height-m: 40px;--button-height-l: 48px;--button-height-xl: 56px;--button-height-xxl: 64px;--control-default: var(--sapphire-20);--control-hover: var(--sapphire-40);--control-selected: var(--sapphire-100);--control-disabled: var(--black-10);--font-inter: "Inter", sans-serif;--font-montserrat: "Montserrat", sans-serif;--font-weight-text-regular: 400;--font-weight-text-medium: 500;--font-weight-text-semibold: 600;--font-weight-text-bold: 700;--font-weight-text-extrabold: 800;--font-weight-text-black: 900;--size-text-xs2: 8px;--size-text-xs: 10px;--size-text-s: 12px;--size-text-m: 14px;--size-text-l: 16px;--size-text-xl: 20px;--size-text-xl2: 24px;--size-text-2xl: 28px;--size-text-xl3: 32px;--size-text-xl4: 48px;--size-text-xl5: 72px;--size-text-xl6: 96px;--line-height-text-2xs: 1em;--line-height-text-xs: 1.1em;--line-height-text-s: 1.2em;--line-height-text-s1: 1.25em;--line-height-text-m: 1.3em;--line-height-text-m1: 1.35em;--line-height-text-l: 1.4em;--line-height-text-l1: 1.45em;--line-height-text-xl: 1.5em;--line-height-text-xl1: 1.5em;--control-radius-
|
1
|
+
@font-face{font-weight:400;font-family:Montserrat;font-style:normal;src:url(./fonts/585d10920d676fcd.woff2) format("woff2"),url(./fonts/3b9f59412b17ff93.woff) format("woff")}@font-face{font-weight:700;font-family:Montserrat;font-style:normal;src:url(./fonts/f4d681a788c6d497.woff2) format("woff2"),url(./fonts/43b748f250df0f08.woff) format("woff")}@font-face{font-weight:300;font-family:Montserrat;font-style:normal;src:url(./fonts/ee3db32f0aadef5d.woff2) format("woff2"),url(./fonts/1a738bfdbc1e4d9d.woff) format("woff")}@font-face{font-weight:500;font-family:Montserrat;font-style:normal;src:url(./fonts/e51d2feb30084bc2.woff2) format("woff2"),url(./fonts/badaa6d1837432de.woff) format("woff")}@font-face{font-weight:600;font-family:Montserrat;font-style:normal;src:url(./fonts/63611593e008a77c.woff2) format("woff2"),url(./fonts/3cdd7fabbe89d2b9.woff) format("woff")}@font-face{font-weight:400;font-family:Inter;font-style:normal;src:url(./fonts/d080ae18fd04e52c.woff2) format("woff2");font-variant-numeric:slashed-zero}@font-face{font-weight:700;font-family:Inter;font-style:normal;src:url(./fonts/11d5bc9f0cad36d1.woff2) format("woff2");font-variant-numeric:slashed-zero}@font-face{font-weight:500;font-family:Inter;font-style:normal;src:url(./fonts/242d04bef81519ae.woff2) format("woff2");font-variant-numeric:slashed-zero}@font-face{font-weight:600;font-family:Inter;font-style:normal;src:url(./fonts/cac2ba46e8c8adc9.woff2) format("woff2");font-variant-numeric:slashed-zero}@supports (font-variation-settings: normal){:root{font-family:InterVariable,sans-serif}}:root{font-feature-settings:"zero"}*{margin:0;padding:0;border:0;outline:none}*,:after,:before{box-sizing:border-box}:active,:focus{outline:0}a,a:visited,a:hover{-webkit-text-decoration:none;text-decoration:none}a:active,a:focus{outline:0}aside,footer,header,nav{display:block}body,html{width:100%;height:100%;font-size:100%;line-height:1}button,input,textarea,select{font-family:inherit}input::-ms-clear{display:none}button{background-color:transparent;cursor:pointer}button::-moz-focus-inner{padding:0;border:0}ul li{list-style:none}img{vertical-align:top}h1,h2,h3,h4,h5,h6{font-weight:inherit;font-size:inherit}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:var(--color-typo-brand);-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s}:root{--sapphire-100: #2355d7;--sapphire-90: #3564df;--sapphire-80: #4b75e2;--sapphire-70: #6186e6;--sapphire-60: #7797e9;--sapphire-50: #8da7ed;--sapphire-40: #9fb7f4;--sapphire-30: #b9caf4;--sapphire-20: #cfdaf7;--sapphire-10: #e5ebfb;--citrine-100: #ff7900;--citrine-90: #ff861a;--citrine-80: #ff9433;--citrine-70: #ffa14d;--citrine-60: #ffaf66;--citrine-50: #ffbc80;--citrine-40: #ffc999;--citrine-30: #ffd7b2;--citrine-20: #ffe4cc;--citrine-10: #fff2e5;--magenta-100: #bc2251;--magenta-90: #d8275d;--magenta-80: #dc3d6d;--magenta-70: #e15781;--magenta-60: #e46c91;--magenta-50: #e986a4;--magenta-40: #ed9cb4;--magenta-30: #f2b6c8;--magenta-20: #f6cbd8;--magenta-10: #fae5ec;--black-100: #000;--black-95: #0d0d0d;--black-90: #1a1a1a;--black-85: #262626;--black-80: #333;--black-75: #404040;--black-70: #4d4d4d;--black-65: #595959;--black-60: #666;--black-55: #737373;--black-50: #808080;--black-45: #8c8c8c;--black-40: #999;--black-35: #a6a6a6;--black-30: #b3b3b3;--black-25: #bfbfbf;--black-20: #ccc;--black-15: #d9d9d9;--black-10: #e6e6e6;--black-5: #f2f2f2;--white: #fff;--dark-blue: #0a38af;--blue-40: #a7bbef;--blue-20: #d3ddf7;--green: #1b770c;--red-tag: #f01406;--success-normal: #23b413;--success-bg-hover: #d5fbe2;--success-bg-active: #ebfdf1;--alarm-normal: #fdc023;--alarm-bg-hover: #fff0c7;--alarm-bg-active: #fff6de;--error-normal: #e64646;--error-bg-hover: #fadbdb;--error-bg-active: #fbe3e3;--disabled: #b3b3b3;--disabled-color: #b2b2b2;--light-text: var(--white);--dark-text: var(--black-100);--sapphire-normal: var(--sapphire-100);--sapphire-hover: #1b41a3;--sapphire-active: #122c70;--citrine-normal: var(--citrine-100);--citrine-hover: #e56d00;--citrine-active: #cc6100;--asphalt-border: var(--black-30);--asphalt-normal: var(--black-80);--asphalt-hover: var(--black-90);--asphalt-active: var(--black-100);--gray-normal: var(--black-5);--gray-hover: var(--black-10);--gray-active: var(--black-80);--white-normal: var(--white);--white-hover: var(--black-5);--white-transparent: rgba(255, 255, 255, .4);--white-active: var(--black-80);--red-normal: var(--error-normal);--red-hover: #e33030;--red-active: #dc1e1e;--green-normal: var(--green);--green-hover: #16610a;--green-active: #114a08;--counter-text: #ffa066;--button-height-ms: 16px;--button-height-xs: 24px;--button-height-s: 32px;--button-height-m: 40px;--button-height-l: 48px;--button-height-xl: 56px;--button-height-xxl: 64px;--select-search-height-l: 48px;--select-search-height-xxl: 64px;--select-search-options-height-desktop: 320px;--select-search-options-height-mobile: 264px;--control-default: var(--sapphire-20);--control-hover: var(--sapphire-40);--control-selected: var(--sapphire-100);--control-disabled: var(--black-10);--font-inter: "Inter", sans-serif;--font-montserrat: "Montserrat", sans-serif;--font-weight-text-regular: 400;--font-weight-text-medium: 500;--font-weight-text-semibold: 600;--font-weight-text-bold: 700;--font-weight-text-extrabold: 800;--font-weight-text-black: 900;--size-text-xs2: 8px;--size-text-xs: 10px;--size-text-s: 12px;--size-text-m: 14px;--size-text-l: 16px;--size-text-l2: 18px;--size-text-xl: 20px;--size-text-xl2: 24px;--size-text-2xl: 28px;--size-text-xl3: 32px;--size-text-xl4: 48px;--size-text-4xl: 52px;--size-text-xl5: 72px;--size-text-xl6: 96px;--line-height-text-2xs: 1em;--line-height-text-xxs: 1.125em;--line-height-text-xs: 1.1em;--line-height-text-s: 1.2em;--line-height-text-s1: 1.25em;--line-height-text-m: 1.3em;--line-height-text-m1: 1.35em;--line-height-text-l: 1.4em;--line-height-text-l1: 1.45em;--line-height-text-xl: 1.5em;--line-height-text-xl1: 1.5em;--control-radius-xs: 4px;--control-radius: 6px;--control-radius-s: 8px;--control-radius-m: 20px;--control-radius-l: 24px;--control-radius-xl: 32px;--control-radius-xxl: 40px;--control-input-radius: 12px;--control-border-width: 1px;--control-height-xl: 60px;--control-height-xxl: 60px;--control-height-l: var(--space-4xl);--control-height-m: var(--space-3xl);--control-height-s: var(--space-2xl);--control-height-xs: var(--space-xl);--control-box-size-s: var(--space-s);--control-box-size-m: var(--space-m);--control-box-size-l: var(--space-l);--control-space-xxl: var(--space-xl);--control-space-l: var(--space-xl);--control-space-m: var(--space-l);--control-space-s: var(--space-m);--control-space-xs: var(--space-s);--control-text-size-2xl: var(--size-text-xl);--control-text-size-xl: var(--size-text-xl3);--control-text-size-l: var(--size-text-l);--control-text-size-m: var(--size-text-m);--control-text-size-s: var(--size-text-s);--control-text-size-xs: var(--size-text-xs);--space-3xs: 2px;--space-2xs: 4px;--space-1xs: 6px;--space-xs: 8px;--space-xss: 10px;--space-s: 12px;--space-2s: 14px;--space-m: 16px;--space-2m: 18px;--space-l: 20px;--space-2l: 22px;--space-xl: 24px;--space-1xl: 28px;--space-2xl: 32px;--space-xxl: 40px;--space-3xl: 44px;--space-4xl: 48px;--space-4xxl: 64px;--space-5xl: 72px;--space-6xl: 96px;--box-shadow-active: 0 0 2px var(--sapphire-normal);--box-shadow-focus: 0px 0px 10px 2px #1389cc;--box-shadow-select-search: 0 3px 15px 0 rgba(31, 32, 35, .15);--select-search-input-top-l: -15%;--select-search-input-top-xxl: -35%;--container-width-xs: 375px;--container-width-s: 767px;--container-width-m: 960px;--container-width-l: 1280px;--container-width-xl: 1440px;--container-width-xxl: 1920px;--zindex-fixed: 1030;--sidebar-width-collapsed: 64px;--sidebar-width-expanded: 256px;--header-height: 64px;--sidebar-form-width-tablet: 369px;--sidebar-form-width-mobile: 309px;--tab-trail-height-m: 54px;--tab-trail-height-s: 30px;--accordion-icon-size-m: 48px;--accordion-icon-size-s: 36px}@supports (font-variation-settings: normal){:root{font-family:Inter,sans-serif}}:root{font-feature-settings:"zero";font-variant-numeric:slashed-zero}body{font-family:Inter,sans-serif;font-feature-settings:"zero";font-variant-numeric:slashed-zero;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
function r(n) {
|
2
|
+
let e = n.parentElement, l = null;
|
3
|
+
for (; e && !(e instanceof HTMLFieldSetElement); ) e instanceof HTMLLegendElement && (l = e), e = e.parentElement;
|
4
|
+
let t = (e == null ? void 0 : e.getAttribute("disabled")) === "";
|
5
|
+
return t && i(l) ? false : t;
|
6
|
+
}
|
7
|
+
function i(n) {
|
8
|
+
if (!n) return false;
|
9
|
+
let e = n.previousElementSibling;
|
10
|
+
for (; e !== null; ) {
|
11
|
+
if (e instanceof HTMLLegendElement) return false;
|
12
|
+
e = e.previousElementSibling;
|
13
|
+
}
|
14
|
+
return true;
|
15
|
+
}
|
16
|
+
export {
|
17
|
+
r
|
18
|
+
};
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
import { EAccordionSize } from './constants';
|
3
|
+
|
4
|
+
export type TAccordionProps = {
|
5
|
+
title: string;
|
6
|
+
children: ReactNode;
|
7
|
+
size?: EAccordionSize;
|
8
|
+
titleUppercase?: boolean;
|
9
|
+
};
|
10
|
+
export declare const Accordion: import('react').ForwardRefExoticComponent<TAccordionProps & import('react').RefAttributes<HTMLElement>>;
|
@@ -0,0 +1,176 @@
|
|
1
|
+
import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
|
2
|
+
import { c as classNames } from "../../index-CweZ_OcN.js";
|
3
|
+
import React__default, { createContext, useRef, Fragment, useReducer, useMemo, useId, useEffect, useContext, forwardRef } from "react";
|
4
|
+
import { AccordionItem } from "./AccordionItem/AccordionItem.js";
|
5
|
+
import { EAccordionSize, EAccordionIconSize } from "./constants.js";
|
6
|
+
import { Icon } from "../../icons/Icon.js";
|
7
|
+
import { M as M$1, W, y, T, o, a as u$1, H as H$1, I, $ as $f7dceffc5ad7768b$export$4e328f61c538687f, b as $6179b936705e76d3$export$ae780daf29e6d456, D, u as u$3, c as o$1 } from "../../keyboard-B256ZoM-.js";
|
8
|
+
import { w } from "../../use-active-press-B6yeSopF.js";
|
9
|
+
import { T as T$1 } from "../../use-resolve-button-type-B6LE6gU3.js";
|
10
|
+
import { c, i, u as u$2, V as V$1, A, s as s$1 } from "../../open-closed-CbXq00et.js";
|
11
|
+
import { r } from "../../bugs-CSBdWk0R.js";
|
12
|
+
import '../../assets/Accordion.css';let e = createContext(() => {
|
13
|
+
});
|
14
|
+
function u({ value: o2, children: t2 }) {
|
15
|
+
return React__default.createElement(e.Provider, { value: o2 }, t2);
|
16
|
+
}
|
17
|
+
var t;
|
18
|
+
let a = (t = React__default.startTransition) != null ? t : function(i2) {
|
19
|
+
i2();
|
20
|
+
};
|
21
|
+
var de = ((r2) => (r2[r2.Open = 0] = "Open", r2[r2.Closed = 1] = "Closed", r2))(de || {}), fe = ((t2) => (t2[t2.ToggleDisclosure = 0] = "ToggleDisclosure", t2[t2.CloseDisclosure = 1] = "CloseDisclosure", t2[t2.SetButtonId = 2] = "SetButtonId", t2[t2.SetPanelId = 3] = "SetPanelId", t2[t2.LinkPanel = 4] = "LinkPanel", t2[t2.UnlinkPanel = 5] = "UnlinkPanel", t2))(fe || {});
|
22
|
+
let Te = { [0]: (e2) => ({ ...e2, disclosureState: u$1(e2.disclosureState, { [0]: 1, [1]: 0 }) }), [1]: (e2) => e2.disclosureState === 1 ? e2 : { ...e2, disclosureState: 1 }, [4](e2) {
|
23
|
+
return e2.linkedPanel === true ? e2 : { ...e2, linkedPanel: true };
|
24
|
+
}, [5](e2) {
|
25
|
+
return e2.linkedPanel === false ? e2 : { ...e2, linkedPanel: false };
|
26
|
+
}, [2](e2, n) {
|
27
|
+
return e2.buttonId === n.buttonId ? e2 : { ...e2, buttonId: n.buttonId };
|
28
|
+
}, [3](e2, n) {
|
29
|
+
return e2.panelId === n.panelId ? e2 : { ...e2, panelId: n.panelId };
|
30
|
+
} }, M = createContext(null);
|
31
|
+
M.displayName = "DisclosureContext";
|
32
|
+
function F(e2) {
|
33
|
+
let n = useContext(M);
|
34
|
+
if (n === null) {
|
35
|
+
let r2 = new Error(`<${e2} /> is missing a parent <Disclosure /> component.`);
|
36
|
+
throw Error.captureStackTrace && Error.captureStackTrace(r2, F), r2;
|
37
|
+
}
|
38
|
+
return n;
|
39
|
+
}
|
40
|
+
let k = createContext(null);
|
41
|
+
k.displayName = "DisclosureAPIContext";
|
42
|
+
function V(e2) {
|
43
|
+
let n = useContext(k);
|
44
|
+
if (n === null) {
|
45
|
+
let r2 = new Error(`<${e2} /> is missing a parent <Disclosure /> component.`);
|
46
|
+
throw Error.captureStackTrace && Error.captureStackTrace(r2, V), r2;
|
47
|
+
}
|
48
|
+
return n;
|
49
|
+
}
|
50
|
+
let H = createContext(null);
|
51
|
+
H.displayName = "DisclosurePanelContext";
|
52
|
+
function De() {
|
53
|
+
return useContext(H);
|
54
|
+
}
|
55
|
+
function Pe(e2, n) {
|
56
|
+
return u$1(n.type, Te, e2, n);
|
57
|
+
}
|
58
|
+
let ye = Fragment;
|
59
|
+
function me(e2, n) {
|
60
|
+
let { defaultOpen: r2 = false, ...c$1 } = e2, s2 = useRef(null), d = y(n, T((u2) => {
|
61
|
+
s2.current = u2;
|
62
|
+
}, e2.as === void 0 || e2.as === Fragment)), t2 = useRef(null), o$12 = useRef(null), l = useReducer(Pe, { disclosureState: r2 ? 0 : 1, linkedPanel: false, buttonRef: o$12, panelRef: t2, buttonId: null, panelId: null }), [{ disclosureState: f, buttonId: i$1 }, T$12] = l, p = o((u2) => {
|
63
|
+
T$12({ type: 1 });
|
64
|
+
let P = u$3(s2);
|
65
|
+
if (!P || !i$1) return;
|
66
|
+
let y2 = (() => u2 ? u2 instanceof HTMLElement ? u2 : u2.current instanceof HTMLElement ? u2.current : P.getElementById(i$1) : P.getElementById(i$1))();
|
67
|
+
y2 == null || y2.focus();
|
68
|
+
}), E = useMemo(() => ({ close: p }), [p]), D2 = useMemo(() => ({ open: f === 0, close: p }), [f, p]), g = { ref: d };
|
69
|
+
return React__default.createElement(M.Provider, { value: l }, React__default.createElement(k.Provider, { value: E }, React__default.createElement(u, { value: p }, React__default.createElement(c, { value: u$1(f, { [0]: i.Open, [1]: i.Closed }) }, H$1({ ourProps: g, theirProps: c$1, slot: D2, defaultTag: ye, name: "Disclosure" })))));
|
70
|
+
}
|
71
|
+
let Ee = "button";
|
72
|
+
function ge(e2, n) {
|
73
|
+
let r$1 = useId(), { id: c2 = `headlessui-disclosure-button-${r$1}`, disabled: s2 = false, autoFocus: d = false, ...t2 } = e2, [o$2, l] = F("Disclosure.Button"), f = De(), i2 = f === null ? false : f === o$2.panelId, T2 = useRef(null), p = y(T2, n, i2 ? null : o$2.buttonRef), E = I();
|
74
|
+
useEffect(() => {
|
75
|
+
if (!i2) return l({ type: 2, buttonId: c2 }), () => {
|
76
|
+
l({ type: 2, buttonId: null });
|
77
|
+
};
|
78
|
+
}, [c2, l, i2]);
|
79
|
+
let D$1 = o((a2) => {
|
80
|
+
var S;
|
81
|
+
if (i2) {
|
82
|
+
if (o$2.disclosureState === 1) return;
|
83
|
+
switch (a2.key) {
|
84
|
+
case o$1.Space:
|
85
|
+
case o$1.Enter:
|
86
|
+
a2.preventDefault(), a2.stopPropagation(), l({ type: 0 }), (S = o$2.buttonRef.current) == null || S.focus();
|
87
|
+
break;
|
88
|
+
}
|
89
|
+
} else switch (a2.key) {
|
90
|
+
case o$1.Space:
|
91
|
+
case o$1.Enter:
|
92
|
+
a2.preventDefault(), a2.stopPropagation(), l({ type: 0 });
|
93
|
+
break;
|
94
|
+
}
|
95
|
+
}), g = o((a2) => {
|
96
|
+
switch (a2.key) {
|
97
|
+
case o$1.Space:
|
98
|
+
a2.preventDefault();
|
99
|
+
break;
|
100
|
+
}
|
101
|
+
}), u2 = o((a2) => {
|
102
|
+
var S;
|
103
|
+
r(a2.currentTarget) || s2 || (i2 ? (l({ type: 0 }), (S = o$2.buttonRef.current) == null || S.focus()) : l({ type: 0 }));
|
104
|
+
}), { isFocusVisible: P, focusProps: y$1 } = $f7dceffc5ad7768b$export$4e328f61c538687f({ autoFocus: d }), { isHovered: U, hoverProps: h } = $6179b936705e76d3$export$ae780daf29e6d456({ isDisabled: s2 }), { pressed: N, pressProps: w$1 } = w({ disabled: s2 }), q = useMemo(() => ({ open: o$2.disclosureState === 0, hover: U, active: N, disabled: s2, focus: P, autofocus: d }), [o$2, U, N, P, s2, d]), G = T$1(e2, T2), z = i2 ? D({ ref: p, type: G, disabled: s2 || void 0, autoFocus: d, onKeyDown: D$1, onClick: u2 }, y$1, h, w$1) : D({ ref: p, id: c2, type: G, "aria-expanded": o$2.disclosureState === 0, "aria-controls": o$2.linkedPanel ? o$2.panelId : void 0, disabled: s2 || void 0, autoFocus: d, onKeyDown: D$1, onKeyUp: g, onClick: u2 }, y$1, h, w$1);
|
105
|
+
return H$1({ mergeRefs: E, ourProps: z, theirProps: t2, slot: q, defaultTag: Ee, name: "Disclosure.Button" });
|
106
|
+
}
|
107
|
+
let Se = "div", be = M$1.RenderStrategy | M$1.Static;
|
108
|
+
function Re(e2, n) {
|
109
|
+
let r2 = useId(), { id: c2 = `headlessui-disclosure-panel-${r2}`, transition: s2 = false, ...d } = e2, [t2, o2] = F("Disclosure.Panel"), { close: l } = V("Disclosure.Panel"), f = I(), i$1 = y(n, t2.panelRef, (u2) => {
|
110
|
+
a(() => o2({ type: u2 ? 4 : 5 }));
|
111
|
+
});
|
112
|
+
useEffect(() => (o2({ type: 3, panelId: c2 }), () => {
|
113
|
+
o2({ type: 3, panelId: null });
|
114
|
+
}), [c2, o2]);
|
115
|
+
let T2 = u$2(), [p, E] = V$1(s2, t2.panelRef, T2 !== null ? (T2 & i.Open) === i.Open : t2.disclosureState === 0), D2 = useMemo(() => ({ open: t2.disclosureState === 0, close: l }), [t2.disclosureState, l]), g = { ref: i$1, id: c2, ...A(E) };
|
116
|
+
return React__default.createElement(s$1, null, React__default.createElement(H.Provider, { value: t2.panelId }, H$1({ mergeRefs: f, ourProps: g, theirProps: d, slot: D2, defaultTag: Se, features: be, visible: p, name: "Disclosure.Panel" })));
|
117
|
+
}
|
118
|
+
let Ae = W(me), Ce = W(ge), Ie = W(Re), We = Object.assign(Ae, { Button: Ce, Panel: Ie });
|
119
|
+
const accordion = "_accordion_18wwx_2";
|
120
|
+
const header = "_header_18wwx_10";
|
121
|
+
const title = "_title_18wwx_23";
|
122
|
+
const icon = "_icon_18wwx_30";
|
123
|
+
const panel = "_panel_18wwx_44";
|
124
|
+
const open = "_open_18wwx_48";
|
125
|
+
const m = "_m_18wwx_55";
|
126
|
+
const s = "_s_18wwx_63";
|
127
|
+
const cls = {
|
128
|
+
accordion,
|
129
|
+
header,
|
130
|
+
title,
|
131
|
+
"title-uppercase": "_title-uppercase_18wwx_26",
|
132
|
+
icon,
|
133
|
+
"icon-container": "_icon-container_18wwx_33",
|
134
|
+
panel,
|
135
|
+
open,
|
136
|
+
m,
|
137
|
+
s
|
138
|
+
};
|
139
|
+
const Accordion = forwardRef(
|
140
|
+
({ title: title2, children, size = EAccordionSize.M, titleUppercase }, ref) => {
|
141
|
+
return /* @__PURE__ */ jsx("div", { className: classNames(cls.accordion, cls[size]), children: /* @__PURE__ */ jsx(We, { ref, children: ({ open: open2 }) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
142
|
+
/* @__PURE__ */ jsxs(Ce, { className: cls.header, children: [
|
143
|
+
/* @__PURE__ */ jsx(
|
144
|
+
"span",
|
145
|
+
{
|
146
|
+
className: classNames(
|
147
|
+
cls.title,
|
148
|
+
titleUppercase && cls["title-uppercase"]
|
149
|
+
),
|
150
|
+
children: title2
|
151
|
+
}
|
152
|
+
),
|
153
|
+
/* @__PURE__ */ jsx(
|
154
|
+
"div",
|
155
|
+
{
|
156
|
+
className: classNames(
|
157
|
+
cls["icon-container"],
|
158
|
+
open2 && cls.open
|
159
|
+
),
|
160
|
+
children: /* @__PURE__ */ jsx(
|
161
|
+
Icon,
|
162
|
+
{
|
163
|
+
iconName: size === EAccordionSize.S ? EAccordionIconSize.S : EAccordionIconSize.M,
|
164
|
+
className: cls.icon
|
165
|
+
}
|
166
|
+
)
|
167
|
+
}
|
168
|
+
)
|
169
|
+
] }),
|
170
|
+
/* @__PURE__ */ jsx(Ie, { className: cls.panel, children: /* @__PURE__ */ jsx(AccordionItem, { size, children }) })
|
171
|
+
] }) }) });
|
172
|
+
}
|
173
|
+
);
|
174
|
+
export {
|
175
|
+
Accordion
|
176
|
+
};
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
2
|
+
import { c as classNames } from "../../../index-CweZ_OcN.js";
|
3
|
+
import '../../../assets/AccordionItem.css';const item = "_item_1k68o_2";
|
4
|
+
const m = "_m_1k68o_10";
|
5
|
+
const l = "_l_1k68o_15";
|
6
|
+
const cls = {
|
7
|
+
item,
|
8
|
+
m,
|
9
|
+
l
|
10
|
+
};
|
11
|
+
const AccordionItem = ({ children, size }) => {
|
12
|
+
return /* @__PURE__ */ jsx("div", { className: classNames(cls.item, cls[size]), children });
|
13
|
+
};
|
14
|
+
export {
|
15
|
+
AccordionItem
|
16
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export { AccordionItem, type TAccordionItemProps } from './AccordionItem';
|
@@ -0,0 +1,14 @@
|
|
1
|
+
var EAccordionSize = /* @__PURE__ */ ((EAccordionSize2) => {
|
2
|
+
EAccordionSize2["M"] = "m";
|
3
|
+
EAccordionSize2["S"] = "s";
|
4
|
+
return EAccordionSize2;
|
5
|
+
})(EAccordionSize || {});
|
6
|
+
var EAccordionIconSize = /* @__PURE__ */ ((EAccordionIconSize2) => {
|
7
|
+
EAccordionIconSize2["M"] = "ArrowDown24px";
|
8
|
+
EAccordionIconSize2["S"] = "ArrowDown16px";
|
9
|
+
return EAccordionIconSize2;
|
10
|
+
})(EAccordionIconSize || {});
|
11
|
+
export {
|
12
|
+
EAccordionIconSize,
|
13
|
+
EAccordionSize
|
14
|
+
};
|
@@ -26,7 +26,6 @@ export type TProps = TCommonButtonProps & ComponentProps<'button'> & {
|
|
26
26
|
};
|
27
27
|
/**
|
28
28
|
* Компонент кнопки, который можно настраивать с различными темами и размерами.
|
29
|
-
|
30
29
|
*/
|
31
30
|
export declare const Button: import('react').ForwardRefExoticComponent<(Omit<import('./types').TButtonDefaultFormProps & {
|
32
31
|
isIconButton: true;
|
@@ -1,21 +1,21 @@
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
2
|
-
import { forwardRef } from "react";
|
3
2
|
import { c as classNames } from "../../index-CweZ_OcN.js";
|
3
|
+
import { forwardRef } from "react";
|
4
4
|
import { EButtonVariantDefault, EButtonForm } from "./constants.js";
|
5
5
|
import { Icon } from "../../icons/Icon.js";
|
6
|
-
import '../../assets/Button.css';const button = "
|
7
|
-
const clear = "
|
8
|
-
const xs = "
|
9
|
-
const s = "
|
10
|
-
const m = "
|
11
|
-
const l = "
|
12
|
-
const xl = "
|
13
|
-
const xxl = "
|
14
|
-
const black = "
|
15
|
-
const gray = "
|
16
|
-
const white = "
|
17
|
-
const full = "
|
18
|
-
const disabled = "
|
6
|
+
import '../../assets/Button.css';const button = "_button_ycj38_2";
|
7
|
+
const clear = "_clear_ycj38_41";
|
8
|
+
const xs = "_xs_ycj38_53";
|
9
|
+
const s = "_s_ycj38_61";
|
10
|
+
const m = "_m_ycj38_69";
|
11
|
+
const l = "_l_ycj38_77";
|
12
|
+
const xl = "_xl_ycj38_85";
|
13
|
+
const xxl = "_xxl_ycj38_94";
|
14
|
+
const black = "_black_ycj38_176";
|
15
|
+
const gray = "_gray_ycj38_185";
|
16
|
+
const white = "_white_ycj38_194";
|
17
|
+
const full = "_full_ycj38_204";
|
18
|
+
const disabled = "_disabled_ycj38_210";
|
19
19
|
const cls = {
|
20
20
|
button,
|
21
21
|
clear,
|
@@ -25,20 +25,21 @@ const cls = {
|
|
25
25
|
l,
|
26
26
|
xl,
|
27
27
|
xxl,
|
28
|
-
"
|
29
|
-
"
|
30
|
-
"primary-
|
31
|
-
"
|
32
|
-
"secondary-
|
33
|
-
"secondary-
|
34
|
-
"secondary-
|
35
|
-
"
|
28
|
+
"m-s": "_m-s_ycj38_103",
|
29
|
+
"default-button": "_default-button_ycj38_111",
|
30
|
+
"primary-sapphire": "_primary-sapphire_ycj38_114",
|
31
|
+
"primary-citrine": "_primary-citrine_ycj38_123",
|
32
|
+
"secondary-asphalt": "_secondary-asphalt_ycj38_132",
|
33
|
+
"secondary-gray": "_secondary-gray_ycj38_141",
|
34
|
+
"secondary-white": "_secondary-white_ycj38_150",
|
35
|
+
"secondary-red": "_secondary-red_ycj38_159",
|
36
|
+
"round-button": "_round-button_ycj38_169",
|
36
37
|
black,
|
37
38
|
gray,
|
38
39
|
white,
|
39
40
|
full,
|
40
41
|
disabled,
|
41
|
-
"icon-button": "_icon-
|
42
|
+
"icon-button": "_icon-button_ycj38_221"
|
42
43
|
};
|
43
44
|
const Button = forwardRef(
|
44
45
|
(props, ref) => {
|
@@ -68,9 +69,9 @@ const Button = forwardRef(
|
|
68
69
|
};
|
69
70
|
const buttonClassNames = classNames(
|
70
71
|
cls.button,
|
72
|
+
className,
|
71
73
|
mods,
|
72
|
-
clear2 ? [] : [cls[form ?? ""], cls[size]]
|
73
|
-
className
|
74
|
+
clear2 ? [] : [cls[form ?? ""], cls[size]]
|
74
75
|
);
|
75
76
|
return /* @__PURE__ */ jsxs(
|
76
77
|
"button",
|
@@ -20,6 +20,7 @@ var EButtonSize = /* @__PURE__ */ ((EButtonSize2) => {
|
|
20
20
|
EButtonSize2["L"] = "l";
|
21
21
|
EButtonSize2["XL"] = "xl";
|
22
22
|
EButtonSize2["XXL"] = "xxl";
|
23
|
+
EButtonSize2["MS"] = "m-s";
|
23
24
|
return EButtonSize2;
|
24
25
|
})(EButtonSize || {});
|
25
26
|
var EButtonForm = /* @__PURE__ */ ((EButtonForm2) => {
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { TInputProps } from '../Input';
|
2
|
+
|
3
|
+
export type DatePicker = {
|
4
|
+
/**
|
5
|
+
* функция=callback, которая вызывается при изменении значения и передает имя и новое значение для обновления стейта (data),
|
6
|
+
*/
|
7
|
+
onChangeValue?: (e: TDatePickerValue) => void;
|
8
|
+
/**
|
9
|
+
* функция ограничения выбора даты
|
10
|
+
(до какой даты выбор не доступен)
|
11
|
+
*/
|
12
|
+
before?: Date | string;
|
13
|
+
/**
|
14
|
+
* значение из стейта (data)
|
15
|
+
*/
|
16
|
+
value?: string;
|
17
|
+
} & TInputProps;
|
18
|
+
export type TDatePickerValue = {
|
19
|
+
value?: Date;
|
20
|
+
name?: string;
|
21
|
+
};
|
22
|
+
export declare const DatePicker: import('react').MemoExoticComponent<import('react').ForwardRefExoticComponent<{
|
23
|
+
/**
|
24
|
+
* функция=callback, которая вызывается при изменении значения и передает имя и новое значение для обновления стейта (data),
|
25
|
+
*/
|
26
|
+
onChangeValue?: (e: TDatePickerValue) => void;
|
27
|
+
/**
|
28
|
+
* функция ограничения выбора даты
|
29
|
+
(до какой даты выбор не доступен)
|
30
|
+
*/
|
31
|
+
before?: Date | string;
|
32
|
+
/**
|
33
|
+
* значение из стейта (data)
|
34
|
+
*/
|
35
|
+
value?: string;
|
36
|
+
} & import('../Input/types').TInputProps & {
|
37
|
+
size?: import('../Input').TSize;
|
38
|
+
variant?: import('../Input').TVariant;
|
39
|
+
className?: string;
|
40
|
+
wrapperClassName?: string;
|
41
|
+
label?: import('react').ReactNode;
|
42
|
+
autofocus?: boolean;
|
43
|
+
readonly?: boolean;
|
44
|
+
} & import('react').RefAttributes<HTMLInputElement>>>;
|
@@ -0,0 +1,69 @@
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
2
|
+
import { c as classNames } from "../../index-CweZ_OcN.js";
|
3
|
+
import { memo, forwardRef, useState } from "react";
|
4
|
+
import { c as cls, D as DatePickerModal } from "../../DatePickerModal-BM0BgzTb.js";
|
5
|
+
import { useClickOutside } from "../../hooks/useClickOutside/useClickOutside.js";
|
6
|
+
import { formating } from "../../utils/index.js";
|
7
|
+
import { Button } from "../Button/Button.js";
|
8
|
+
import { Input } from "../Input/Input.js";
|
9
|
+
const DatePicker = memo(
|
10
|
+
forwardRef(
|
11
|
+
({ size, value, onChangeValue, name, before, ...props }, ref) => {
|
12
|
+
const [isActive, setActive] = useState(false);
|
13
|
+
const [date, setDate] = useState(
|
14
|
+
value ? new Date(value) : /* @__PURE__ */ new Date()
|
15
|
+
);
|
16
|
+
useClickOutside({
|
17
|
+
isActive,
|
18
|
+
setActive,
|
19
|
+
className: cls["calendar-block"]
|
20
|
+
});
|
21
|
+
const onOpen = () => {
|
22
|
+
setActive(true);
|
23
|
+
};
|
24
|
+
const onDate = (d) => {
|
25
|
+
setDate(d);
|
26
|
+
onChangeValue == null ? void 0 : onChangeValue({ value: d, name });
|
27
|
+
};
|
28
|
+
const wrapperClassNames = classNames(cls.wrapper, isActive && cls.active);
|
29
|
+
return /* @__PURE__ */ jsxs("div", { className: wrapperClassNames, children: [
|
30
|
+
/* @__PURE__ */ jsx("div", { className: cls["date-wrapper"], onClick: onOpen, children: /* @__PURE__ */ jsx(
|
31
|
+
Input,
|
32
|
+
{
|
33
|
+
ref,
|
34
|
+
className: cls.input,
|
35
|
+
wrapperClassName: cls["input-wrapper"],
|
36
|
+
size,
|
37
|
+
type: "text",
|
38
|
+
value: formating.Date(date, "dd.mm.yy"),
|
39
|
+
...props
|
40
|
+
}
|
41
|
+
) }),
|
42
|
+
/* @__PURE__ */ jsx("div", { className: cls["button-wrapper"], children: /* @__PURE__ */ jsx(
|
43
|
+
Button,
|
44
|
+
{
|
45
|
+
isIconButton: true,
|
46
|
+
clear: true,
|
47
|
+
type: "button",
|
48
|
+
className: cls.button,
|
49
|
+
onClick: onOpen,
|
50
|
+
iconName: isActive ? "DropdownArrowUp16px" : "DropdownArrowBottom16px"
|
51
|
+
}
|
52
|
+
) }),
|
53
|
+
isActive && /* @__PURE__ */ jsx(
|
54
|
+
DatePickerModal,
|
55
|
+
{
|
56
|
+
onChangeValue: onDate,
|
57
|
+
date,
|
58
|
+
setActive,
|
59
|
+
before: typeof before === "string" ? new Date(before) : before
|
60
|
+
}
|
61
|
+
)
|
62
|
+
] });
|
63
|
+
}
|
64
|
+
)
|
65
|
+
);
|
66
|
+
DatePicker.displayName = "DatePicker";
|
67
|
+
export {
|
68
|
+
DatePicker
|
69
|
+
};
|
@@ -0,0 +1,8 @@
|
|
1
|
+
type DatePickerModal = {
|
2
|
+
date: Date;
|
3
|
+
onChangeValue: (d: Date) => void;
|
4
|
+
setActive: (s: boolean) => void;
|
5
|
+
before?: Date;
|
6
|
+
};
|
7
|
+
export declare function DatePickerModal({ date, onChangeValue, setActive, before }: DatePickerModal): import("react/jsx-runtime").JSX.Element;
|
8
|
+
export {};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
var EDatePickerBeforeDate = /* @__PURE__ */ ((EDatePickerBeforeDate2) => {
|
2
|
+
EDatePickerBeforeDate2["CurrentDate1"] = "2024-08-01";
|
3
|
+
EDatePickerBeforeDate2["CurrentDate2"] = "2024-07-01";
|
4
|
+
EDatePickerBeforeDate2["CurrentDate3"] = "2024-07-11";
|
5
|
+
return EDatePickerBeforeDate2;
|
6
|
+
})(EDatePickerBeforeDate || {});
|
7
|
+
const week = ["пн", "вт", "ср", "чт", "пт", "сб", "вс"];
|
8
|
+
export {
|
9
|
+
EDatePickerBeforeDate,
|
10
|
+
week
|
11
|
+
};
|