@vervstack/chures 0.0.12 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chures.js +400 -400
- package/dist/chures.umd.cjs +1 -1
- package/dist/components/Input/Input.d.ts +4 -3
- package/package.json +1 -1
package/dist/chures.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode("@layer chures-defaults{:root{--chures-accent: #229ED9;--chures-accent-muted: rgb(34 158 217 / 50%);--chures-btn-from: #2AABEE;--chures-btn-to: #229ED9;--chures-button-bg: var(--chures-accent);--chures-error: #ef4444;--chures-warn: #f59e0b;--chures-bg: #000000;--chures-fg: #ffffff;--chures-fg-muted: #9ca3af;--chures-surface: #000000;--chures-font-sm: .875rem;--chures-font-xs: .75rem;--chures-input-bg: #111111;--chures-input-height: 3rem;--chures-input-radius: .75rem;--chures-skeleton-shine: #1e1e1e;--chures-toggle-width: 2.75rem;--chures-toggle-height: 1.5rem;--chures-toggle-thumb: 1.125rem;--chures-toggle-bg-off: rgb(255 255 255 / 13%);--chures-toggle-bg-on: var(--chures-accent);--chures-toggle-thumb-color: #ffffff;--chures-toggle-label-skeleton-w: 5rem;--chures-dropdown-bg: var(--chures-bg);--chures-dropdown-radius: .75rem;--chures-dropdown-row-radius: .375rem;--chures-dropdown-border: var(--chures-accent);--chures-dropdown-border-subtle: var(--chures-accent-muted);--chures-dropdown-hover: rgb(255 255 255 / 8%);--chures-dropdown-create-bg: rgb(34 158 217 / 12%);--chures-dropdown-create-bg-hover: rgb(34 158 217 / 20%);--chures-dropdown-trigger-border: rgb(255 255 255 / 22%);--chures-dropdown-trigger-border-hover: rgb(255 255 255 / 38%);--chures-dropdown-trigger-focus-ring: rgb(34 158 217 / 15%);--chures-dropdown-chip-border: rgb(34 158 217 / 30%)}}@keyframes _spin_wa8op_1{to{transform:rotate(360deg)}}@keyframes _ripple_wa8op_1{0%{transform:scale(.08);opacity:.9}to{transform:scale(1);opacity:0}}@keyframes _dotPulse_wa8op_1{0%,to{transform:translate(-50%,-50%) scale(.55);opacity:.3}50%{transform:translate(-50%,calc(-50% - var(--sz) * .1)) scale(1);opacity:1}}@keyframes _waveBounce_wa8op_1{0%,55%,to{transform:translate(-50%,-50%) scale(.8);opacity:.4}27%{transform:translate(-50%,calc(-50% - var(--sz) * .28)) scale(1);opacity:1}}._LoaderContainer_wa8op_24{position:relative;flex-shrink:0}._sm_wa8op_31{width:1.5rem;height:1.5rem;--sz: 1.5rem;--arc-gap: .2rem;--arc-bw: .125rem}._md_wa8op_32{width:2.5rem;height:2.5rem;--sz: 2.5rem;--arc-gap: .35rem;--arc-bw: .1875rem}._lg_wa8op_33{width:4rem;height:4rem;--sz: 4rem;--arc-gap: .55rem;--arc-bw: .25rem}._Arc1_wa8op_37,._Arc2_wa8op_38,._Arc3_wa8op_39{position:absolute;border-radius:50%;border:var(--arc-bw) solid transparent}._Arc1_wa8op_37{inset:0;border-top-color:var(--chures-accent, #229ED9);border-left-color:var(--chures-accent, #229ED9);animation:_spin_wa8op_1 1.2s linear infinite;filter:drop-shadow(0 0 .25rem var(--chures-accent, #229ED9))}._Arc2_wa8op_38{inset:var(--arc-gap);border-bottom-color:var(--chures-accent, #229ED9);border-right-color:var(--chures-accent, #229ED9);animation:_spin_wa8op_1 1.8s linear infinite reverse;opacity:.8}._Arc3_wa8op_39{inset:calc(var(--arc-gap) * 2);border-top-color:var(--chures-accent, #229ED9);border-right-color:var(--chures-accent, #229ED9);animation:_spin_wa8op_1 2.4s linear infinite;opacity:.6}._Ring1_wa8op_71,._Ring2_wa8op_72,._Ring3_wa8op_73{position:absolute;inset:0;border-radius:50%;border:var(--arc-bw) solid var(--chures-accent, #229ED9);animation:_ripple_wa8op_1 1.8s ease-out infinite both}._Ring2_wa8op_72{animation-delay:.6s}._Ring3_wa8op_73{animation-delay:1.2s}._Dot1_wa8op_86,._Dot2_wa8op_87,._Dot3_wa8op_88{position:absolute;top:50%;border-radius:50%;width:calc(var(--sz) * .2);height:calc(var(--sz) * .2);background:var(--chures-accent, #229ED9);box-shadow:0 0 calc(var(--sz) * .14) var(--chures-accent, #229ED9);animation:_dotPulse_wa8op_1 1.1s ease-in-out infinite both}._Dot1_wa8op_86{left:22%}._Dot2_wa8op_87{left:50%;animation-delay:.18s}._Dot3_wa8op_88{left:78%;animation-delay:.36s}._Wave1_wa8op_105,._Wave2_wa8op_106,._Wave3_wa8op_107,._Wave4_wa8op_108,._Wave5_wa8op_109{position:absolute;top:50%;border-radius:50%;width:calc(var(--sz) * .16);height:calc(var(--sz) * .16);background:var(--chures-accent, #229ED9);box-shadow:0 0 calc(var(--sz) * .1) var(--chures-accent, #229ED9);animation:_waveBounce_wa8op_1 1s ease-in-out infinite both}._Wave1_wa8op_105{left:10%}._Wave2_wa8op_106{left:28%;animation-delay:.12s}._Wave3_wa8op_107{left:46%;animation-delay:.24s}._Wave4_wa8op_108{left:64%;animation-delay:.36s}._Wave5_wa8op_109{left:82%;animation-delay:.48s}._LoadingWrapperContainer_1q0w7_1{display:flex;align-items:center;justify-content:center;width:100%;min-height:4rem}._SkeletonWrapper_1q0w7_9{width:100%}._TelegramSignInButtonContainer_10wun_1{display:inline-flex;align-items:center;justify-content:center;gap:.625rem;width:100%;padding:1rem 1.375rem;background:linear-gradient(180deg,var(--chures-btn-from, #2AABEE) 0%,var(--chures-btn-to, #229ED9) 100%);border:0;border-radius:.875rem;color:#fff;font-family:Comfortaa,sans-serif;font-weight:600;font-size:1rem;letter-spacing:-.005em;cursor:pointer;box-shadow:inset 0 .0625rem #ffffff26,0 .75rem 2rem -.75rem #2aabee8c;transition:transform .14s ease,box-shadow .2s ease,filter .16s ease}._TelegramSignInButtonContainer_10wun_1:hover{transform:translateY(-.0625rem);box-shadow:inset 0 .0625rem #ffffff2e,0 1.125rem 2.375rem -.75rem #2aabeea6;filter:brightness(1.05)}._TelegramSignInButtonContainer_10wun_1:active{transform:translateY(0);filter:brightness(.97)}._TelegramSignInButtonContainer_10wun_1:focus-visible{outline:.125rem solid rgba(255,255,255,.8);outline-offset:.125rem}._TelegramSignInButtonContainer_10wun_1:disabled{opacity:.6;cursor:not-allowed}._FullSize_10wun_46{height:100%}._Icon_10wun_50{flex-shrink:0}._ToastContainer_1tme2_1{position:fixed;right:1.5rem;top:1.5rem;width:clamp(25vw,24.5rem,95vw);display:flex;flex-direction:column;gap:1rem;z-index:9999}._Toast_1tme2_1{min-height:4rem;border:var(--chures-accent, #229ED9) 1px solid;border-radius:1rem;padding:1rem;box-sizing:border-box;position:relative;background:var(--chures-surface, #000000);display:flex;flex-direction:column}._Toast_1tme2_1>div:first-child{font-weight:700;font-size:var(--chures-font-sm, .875rem);color:var(--chures-fg, #ffffff)}._Toast_1tme2_1._error_1tme2_33{border-color:var(--chures-error, #ef4444)}._Toast_1tme2_1._error_1tme2_33>div:first-child{color:var(--chures-error, #ef4444)}._Toast_1tme2_1._warn_1tme2_41{border-color:var(--chures-warn, #f59e0b)}._Toast_1tme2_1._warn_1tme2_41>div:first-child{color:var(--chures-warn, #f59e0b)}._Toast_1tme2_1._info_1tme2_49{border-color:var(--chures-accent, #229ED9)}._Toast_1tme2_1 ._Description_1tme2_53{color:var(--chures-fg-muted, #9ca3af);font-size:var(--chures-font-xs, .75rem);margin-top:.125rem}._Toast_1tme2_1 ._DismissButton_1tme2_59{position:absolute;width:1rem;height:1rem;display:flex;justify-content:center;align-items:center;top:0;right:1%;cursor:pointer;font-size:1.5rem;color:var(--chures-fg-muted, #9ca3af)}._slideIn_1tme2_79{animation:_slideIn_1tme2_79 .2s ease forwards}._slideOut_1tme2_83{animation:_slideOut_1tme2_83 .2s ease forwards}@keyframes _slideIn_1tme2_79{0%{opacity:0;transform:translate(2rem)}to{opacity:1;transform:translate(0)}}@keyframes _slideOut_1tme2_83{0%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(2rem)}}@keyframes _shimmer_1a08x_1{0%{background-position:-200% 0}to{background-position:200% 0}}._InputContainer_1a08x_6{position:relative;width:100%;height:var(--chures-input-height, 3rem)}._InputField_1a08x_12{width:100%;height:100%;background:var(--chures-input-bg, #111111);border:.0625rem solid rgb(255 255 255 / 13%);border-radius:var(--chures-input-radius, .75rem);color:var(--chures-fg, #ffffff);font-size:var(--chures-font-sm, .875rem);padding:0 .875rem;outline:none;transition:border-color .18s ease;box-sizing:border-box}._InputField_1a08x_12:focus{border-color:#ffffff59}._hasError_1a08x_30 ._InputField_1a08x_12,._hasError_1a08x_30 ._InputField_1a08x_12:focus{border-color:var(--chures-error, #ef4444)}._disabled_1a08x_35 ._InputField_1a08x_12{opacity:.45;cursor:not-allowed}._Label_1a08x_40{position:absolute;left:.875rem;top:50%;transform:translateY(-50%);transform-origin:left center;color:var(--chures-fg-muted, #9ca3af);font-size:var(--chures-font-sm, .875rem);pointer-events:none;transition:all .18s ease;padding:0 .25rem;border-radius:.1875rem}._Label_1a08x_40._lifted_1a08x_54{top:0;transform:translateY(-50%) scale(.82);background:var(--chures-input-bg, #111111);color:var(--chures-fg-muted, #9ca3af)}._hasError_1a08x_30 ._Label_1a08x_40._lifted_1a08x_54{color:var(--chures-error, #ef4444)}._ErrorText_1a08x_65{display:block;margin-top:.25rem;padding-left:.875rem;font-size:var(--chures-font-xs, .75rem);color:var(--chures-error, #ef4444)}._Skeleton_1a08x_73{width:100%;height:var(--chures-input-height, 3rem);border-radius:var(--chures-input-radius, .75rem);background:linear-gradient(90deg,var(--chures-input-bg, #111111) 25%,var(--chures-skeleton-shine, #1e1e1e) 50%,var(--chures-input-bg, #111111) 75%);background-size:200% 100%;animation:_shimmer_1a08x_1 1.5s ease-in-out infinite}@keyframes _shimmer_1jetc_1{0%{background-position:-200% 0}to{background-position:200% 0}}._ToggleContainer_1jetc_6{display:inline-flex;align-items:center;gap:.5rem;cursor:pointer}._disabled_1jetc_13{opacity:.45;cursor:not-allowed}._Track_1jetc_18{position:relative;width:var(--chures-toggle-width, 2.75rem);height:var(--chures-toggle-height, 1.5rem);border-radius:624.9375rem;background:var(--chures-toggle-bg-off, rgb(255 255 255 / 13%));border:none;padding:0;cursor:pointer;transition:background .2s ease;flex-shrink:0}._Track_1jetc_18._on_1jetc_31{background:var(--chures-toggle-bg-on, var(--chures-accent, #229ED9))}._disabled_1jetc_13 ._Track_1jetc_18{cursor:not-allowed}._Thumb_1jetc_39{position:absolute;top:0;bottom:0;margin:auto 0;left:.1875rem;width:var(--chures-toggle-thumb, 1.125rem);height:var(--chures-toggle-thumb, 1.125rem);border-radius:50%;background:var(--chures-toggle-thumb-color, #ffffff);transition:left .2s ease;pointer-events:none}._Track_1jetc_18._on_1jetc_31 ._Thumb_1jetc_39{left:calc(var(--chures-toggle-width, 2.75rem) - var(--chures-toggle-thumb, 1.125rem) - .1875rem)}._Label_1jetc_57{font-size:var(--chures-font-sm, .875rem);color:var(--chures-fg, #ffffff);-webkit-user-select:none;user-select:none}._LabelSkeleton_1jetc_63{display:inline-block;width:var(--chures-toggle-label-skeleton-w, 5rem);height:var(--chures-font-sm, .875rem);border-radius:624.9375rem;background:linear-gradient(90deg,var(--chures-input-bg, #111111) 25%,var(--chures-skeleton-shine, #1e1e1e) 50%,var(--chures-input-bg, #111111) 75%);background-size:200% 100%;animation:_shimmer_1jetc_1 1.5s ease-in-out infinite}._Skeleton_1jetc_78{width:var(--chures-toggle-width, 2.75rem);height:var(--chures-toggle-height, 1.5rem);border-radius:624.9375rem;background:linear-gradient(90deg,var(--chures-input-bg, #111111) 25%,var(--chures-skeleton-shine, #1e1e1e) 50%,var(--chures-input-bg, #111111) 75%);background-size:200% 100%;animation:_shimmer_1jetc_1 1.5s ease-in-out infinite}@layer chures-defaults{:root{--chures-accent: #229ED9;--chures-accent-muted: rgb(34 158 217 / 50%);--chures-btn-from: #2AABEE;--chures-btn-to: #229ED9;--chures-button-bg: var(--chures-accent);--chures-error: #ef4444;--chures-warn: #f59e0b;--chures-bg: #000000;--chures-fg: #ffffff;--chures-fg-muted: #9ca3af;--chures-surface: #000000;--chures-font-sm: .875rem;--chures-font-xs: .75rem;--chures-input-bg: #111111;--chures-input-height: 3rem;--chures-input-radius: .75rem;--chures-skeleton-shine: #1e1e1e;--chures-toggle-width: 2.75rem;--chures-toggle-height: 1.5rem;--chures-toggle-thumb: 1.125rem;--chures-toggle-bg-off: rgb(255 255 255 / 13%);--chures-toggle-bg-on: var(--chures-accent);--chures-toggle-thumb-color: #ffffff;--chures-toggle-label-skeleton-w: 5rem;--chures-dropdown-bg: var(--chures-bg);--chures-dropdown-radius: .75rem;--chures-dropdown-row-radius: .375rem;--chures-dropdown-border: var(--chures-accent);--chures-dropdown-border-subtle: var(--chures-accent-muted);--chures-dropdown-hover: rgb(255 255 255 / 8%);--chures-dropdown-create-bg: rgb(34 158 217 / 12%);--chures-dropdown-create-bg-hover: rgb(34 158 217 / 20%);--chures-dropdown-trigger-border: rgb(255 255 255 / 22%);--chures-dropdown-trigger-border-hover: rgb(255 255 255 / 38%);--chures-dropdown-trigger-focus-ring: rgb(34 158 217 / 15%);--chures-dropdown-chip-border: rgb(34 158 217 / 30%)}}@keyframes _panelIn_1v133_1{0%{opacity:0;transform:scale(.96) translateY(6px)}to{opacity:1;transform:none}}@keyframes _shimmer_1v133_1{0%{background-position:-200% center}to{background-position:200% center}}._DropdownContainer_1v133_13{position:relative;width:100%}._PanelContainer_1v133_18{position:absolute;top:100%;left:0;width:100%;background:var(--chures-dropdown-bg);border:1px solid var(--chures-dropdown-border);border-radius:var(--chures-dropdown-radius);overflow:hidden;box-shadow:0 1rem 3rem #000c;animation:_panelIn_1v133_1 .14s ease}._Label_1v133_31{position:absolute;left:.875rem;top:50%;transform:translateY(-50%);transform-origin:left center;color:var(--chures-fg-muted);font-size:var(--chures-font-sm);pointer-events:none;transition:all .18s ease;padding:0 .25rem;border-radius:.1875rem}._Label_1v133_31._lifted_1v133_45{top:0;transform:translateY(-50%) scale(.82);background:var(--chures-input-bg);color:var(--chures-fg-muted)}._TriggerContainer_1v133_52{width:100%;height:var(--chures-input-height);background:var(--chures-input-bg);border:1px solid var(--chures-dropdown-trigger-border);border-radius:var(--chures-input-radius);color:var(--chures-fg);font-size:var(--chures-font-sm);font-family:inherit;padding:0 .875rem;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:.5rem;text-align:left;overflow:hidden;transition:border-color .15s ease,box-shadow .15s ease}._TriggerContainer_1v133_52:hover{border-color:var(--chures-dropdown-trigger-border-hover)}._TriggerContainer_1v133_52._Open_1v133_76{border-color:var(--chures-accent);box-shadow:0 0 0 .1875rem var(--chures-dropdown-trigger-focus-ring)}._TriggerPlaceholder_1v133_81{color:var(--chures-fg-muted);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._TriggerValue_1v133_89{color:var(--chures-fg);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._TriggerIcon_1v133_97{color:var(--chures-fg-muted);flex-shrink:0;display:flex;align-items:center}._ChipsWrapper_1v133_104{display:flex;flex-wrap:nowrap;gap:.25rem;flex:1;overflow-x:auto;overflow-y:hidden;min-width:0;align-items:center;scrollbar-width:none;-ms-overflow-style:none}._ChipsWrapper_1v133_104::-webkit-scrollbar{display:none}._Chip_1v133_104{display:inline-flex;align-items:center;flex-shrink:0;background:var(--chures-dropdown-create-bg);border:1px solid var(--chures-dropdown-chip-border);border-radius:624.9375rem;padding:.15rem .5rem;font-size:var(--chures-font-xs);color:var(--chures-fg);white-space:nowrap;line-height:1.4}._SearchRow_1v133_135{padding:.5rem;border-bottom:1px solid var(--chures-dropdown-border-subtle)}._SearchBox_1v133_140{display:flex;align-items:center;gap:.5rem;background:var(--chures-input-bg);border:1px solid var(--chures-dropdown-border-subtle);border-radius:var(--chures-dropdown-row-radius);padding:.4rem .625rem}._SearchIcon_1v133_150{display:flex;align-items:center;color:var(--chures-fg-muted);flex-shrink:0}._SearchInput_1v133_157{flex:1;background:transparent;border:none;outline:none;font-size:var(--chures-font-sm);color:var(--chures-fg);font-family:inherit}._SearchInput_1v133_157::placeholder{color:var(--chures-fg-muted)}._ResultsList_1v133_171{max-height:13rem;overflow-y:auto}._OptionRow_1v133_176{padding:.5625rem .875rem;font-size:var(--chures-font-sm);color:var(--chures-fg-muted);cursor:pointer;transition:background .1s ease,color .1s ease;display:flex;align-items:center;gap:.5rem}._OptionRow_1v133_176:hover{background:var(--chures-dropdown-hover);color:var(--chures-fg)}._OptionRow_1v133_176._Selected_1v133_191{color:var(--chures-fg)}._Checkmark_1v133_196{color:var(--chures-accent);font-size:var(--chures-font-xs);flex-shrink:0}._CreateRow_1v133_202{display:flex;align-items:center;gap:.625rem;padding:.5625rem .875rem;cursor:pointer;background:var(--chures-dropdown-create-bg);transition:background .1s ease}._CreateRow_1v133_202:hover{background:var(--chures-dropdown-create-bg-hover)}._CreateRow_1v133_202._WithBorder_1v133_215{border-top:1px solid var(--chures-dropdown-border-subtle)}._CreateIcon_1v133_220{display:inline-flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;border-radius:50%;background:var(--chures-accent);color:#fff;flex-shrink:0}._CreateLabel_1v133_232{font-size:var(--chures-font-sm);font-weight:600;color:var(--chures-fg)}._EmptyHint_1v133_238{padding:.75rem .875rem;font-size:var(--chures-font-sm);color:var(--chures-fg-muted);font-style:italic}._SkeletonRow_1v133_245{height:2rem;margin:.375rem .875rem;border-radius:var(--chures-dropdown-row-radius);background:linear-gradient(90deg,var(--chures-dropdown-bg) 25%,var(--chures-skeleton-shine) 50%,var(--chures-dropdown-bg) 75%);background-size:200% 100%;animation:_shimmer_1v133_1 1.4s infinite linear}._Btn_1hwff_1{display:inline-flex;align-items:center;justify-content:center;gap:.375rem;border-radius:.625rem;border:1px solid transparent;font-family:inherit;font-size:.8125rem;font-weight:500;cursor:pointer;padding:.625rem 1rem;transition:all .16s ease;white-space:nowrap;color:var(--chures-fg, #ffffff);background:var(--chures-button-bg)}._Btn_1hwff_1:disabled{opacity:.4;cursor:not-allowed}._Primary_1hwff_26{background:var(--chures-accent, #229ED9);border-color:var(--chures-accent, #229ED9);color:#fff;font-weight:600;padding:.625rem 1.125rem;box-shadow:0 10px 28px -12px var(--chures-accent-muted, rgb(34 158 217 / 50%));transition:filter .16s ease,opacity .16s ease}._Primary_1hwff_26:hover:not(:disabled){filter:brightness(1.06)}._Secondary_1hwff_41{background:transparent;border-color:#ffffff24;color:var(--chures-fg-muted, #9ca3af)}._Secondary_1hwff_41:hover:not(:disabled){color:var(--chures-fg, #ffffff);border-color:#ffffff47}._Ghost_1hwff_53{background:transparent;border-color:#ffffff24;color:var(--chures-fg-muted, #9ca3af)}._Ghost_1hwff_53:hover:not(:disabled){color:var(--chures-fg, #ffffff);border-color:#ffffff47}._IconDanger_1hwff_65{width:1.375rem;height:1.375rem;padding:0;border:0;border-radius:.375rem;background:transparent;color:var(--chures-fg-muted, #9ca3af);font-size:1rem;line-height:1;justify-content:center;flex-shrink:0;transition:background .14s ease,color .14s ease}._IconDanger_1hwff_65:hover:not(:disabled){background:#ef44441f;color:var(--chures-error, #ef4444)}._Danger_1hwff_86{background:transparent;border-color:#ef444466;color:var(--chures-error, #ef4444);transition:background .16s ease,border-color .16s ease}._Danger_1hwff_86:hover:not(:disabled){background:#ef44441a;border-color:var(--chures-error, #ef4444)}._ConfirmContainer_b00ul_1{width:100%;max-width:24rem;background:var(--chures-surface, #000000);border:1px solid rgb(255 255 255 / 14%);border-radius:1.25rem;padding:1.75rem 1.75rem 1.5rem;box-shadow:0 32px 80px -20px #000c;animation:_confirmIn_b00ul_1 .28s cubic-bezier(.2,.7,.2,1) both}@keyframes _confirmIn_b00ul_1{0%{opacity:0;transform:translateY(.75rem) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}._ConfirmTitle_b00ul_17{font-size:1.25rem;font-weight:600;letter-spacing:-.02em;color:var(--chures-fg, #ffffff);margin-bottom:.75rem}._ConfirmMessage_b00ul_25{font-size:.875rem;color:var(--chures-fg-muted, #9ca3af);line-height:1.5;letter-spacing:-.005em}._ConfirmActions_b00ul_32{display:flex;align-items:center;justify-content:flex-end;gap:.625rem;margin-top:1.5rem}._BtnCancel_b00ul_40{display:inline-flex;align-items:center;padding:.625rem 1.125rem;border-radius:.625rem;border:1px solid rgb(255 255 255 / 14%);background:transparent;color:var(--chures-fg-muted, #9ca3af);font-size:.8125rem;font-weight:500;font-family:inherit;cursor:pointer;transition:background .16s ease,color .16s ease}._BtnCancel_b00ul_40:hover:not(:disabled){background:#ffffff14;color:var(--chures-fg, #ffffff)}._BtnConfirm_b00ul_60{display:inline-flex;align-items:center;padding:.625rem 1.125rem;border-radius:.625rem;border:1px solid var(--chures-accent, #229ED9);background:var(--chures-accent, #229ED9);color:#fff;font-size:.8125rem;font-weight:600;font-family:inherit;cursor:pointer;transition:filter .16s ease,opacity .16s ease}._BtnConfirm_b00ul_60:hover:not(:disabled){filter:brightness(1.06)}._BtnDanger_b00ul_79{display:inline-flex;align-items:center;padding:.625rem 1.125rem;border-radius:.625rem;border:1px solid rgb(239 68 68 / 40%);background:transparent;color:var(--chures-error, #ef4444);font-size:.8125rem;font-weight:600;font-family:inherit;cursor:pointer;transition:background .16s ease,border-color .16s ease}._BtnDanger_b00ul_79:hover:not(:disabled){background:#ef44441a;border-color:var(--chures-error, #ef4444)}._BtnConfirm_b00ul_60:disabled,._BtnDanger_b00ul_79:disabled,._BtnCancel_b00ul_40:disabled{opacity:.4;cursor:not-allowed}._InfoContainer_1meyp_1{width:100%;max-width:24rem;background:var(--chures-surface, #000000);border:1px solid rgb(255 255 255 / 14%);border-radius:1.25rem;padding:1.75rem 1.75rem 1.5rem;box-shadow:0 32px 80px -20px #000c;animation:_infoIn_1meyp_1 .28s cubic-bezier(.2,.7,.2,1) both}@keyframes _infoIn_1meyp_1{0%{opacity:0;transform:translateY(.75rem) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}._InfoTitle_1meyp_17{font-size:1.25rem;font-weight:600;letter-spacing:-.02em;color:var(--chures-fg, #ffffff);margin-bottom:.75rem}._InfoMessage_1meyp_25{font-size:.875rem;color:var(--chures-fg-muted, #9ca3af);line-height:1.5;letter-spacing:-.005em}._InfoActions_1meyp_32{display:flex;align-items:center;justify-content:flex-end;margin-top:1.5rem}._BtnClose_1meyp_39{display:inline-flex;align-items:center;padding:.625rem 1.125rem;border-radius:.625rem;border:1px solid rgb(255 255 255 / 14%);background:transparent;color:var(--chures-fg-muted, #9ca3af);font-size:.8125rem;font-weight:500;font-family:inherit;cursor:pointer;transition:background .16s ease,color .16s ease}._BtnClose_1meyp_39:hover{background:#ffffff14;color:var(--chures-fg, #ffffff)}")),document.head.appendChild(r)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
-
import { jsx as t, jsxs as
|
|
3
|
-
import { useRef as F, useState as
|
|
4
|
-
import { AnimatePresence as
|
|
5
|
-
import { create as
|
|
6
|
-
function
|
|
7
|
-
return
|
|
2
|
+
import { jsx as t, jsxs as d, Fragment as T } from "react/jsx-runtime";
|
|
3
|
+
import { useRef as F, useState as k, useEffect as A, forwardRef as ne, useCallback as Q } from "react";
|
|
4
|
+
import { AnimatePresence as te, motion as oe } from "framer-motion";
|
|
5
|
+
import { create as re } from "zustand";
|
|
6
|
+
function se(n) {
|
|
7
|
+
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
8
8
|
}
|
|
9
9
|
var V = { exports: {} };
|
|
10
10
|
var U;
|
|
11
|
-
function
|
|
12
|
-
return U || (U = 1, (function(
|
|
11
|
+
function ie() {
|
|
12
|
+
return U || (U = 1, (function(n) {
|
|
13
13
|
(function() {
|
|
14
|
-
var
|
|
14
|
+
var e = {}.hasOwnProperty;
|
|
15
15
|
function o() {
|
|
16
16
|
for (var s = "", a = 0; a < arguments.length; a++) {
|
|
17
17
|
var c = arguments[a];
|
|
@@ -30,137 +30,137 @@ function se() {
|
|
|
30
30
|
return s.toString();
|
|
31
31
|
var a = "";
|
|
32
32
|
for (var c in s)
|
|
33
|
-
|
|
33
|
+
e.call(s, c) && s[c] && (a = i(a, c));
|
|
34
34
|
return a;
|
|
35
35
|
}
|
|
36
36
|
function i(s, a) {
|
|
37
37
|
return a ? s ? s + " " + a : s + a : s;
|
|
38
38
|
}
|
|
39
|
-
|
|
39
|
+
n.exports ? (o.default = o, n.exports = o) : window.classNames = o;
|
|
40
40
|
})();
|
|
41
41
|
})(V)), V.exports;
|
|
42
42
|
}
|
|
43
|
-
var
|
|
44
|
-
const
|
|
45
|
-
LoaderContainer:
|
|
46
|
-
sm:
|
|
47
|
-
md:
|
|
48
|
-
lg:
|
|
49
|
-
Arc1:
|
|
50
|
-
Arc2:
|
|
51
|
-
Arc3:
|
|
52
|
-
spin:
|
|
53
|
-
Ring1:
|
|
54
|
-
Ring2:
|
|
55
|
-
Ring3:
|
|
56
|
-
ripple:
|
|
57
|
-
Dot1:
|
|
58
|
-
Dot2:
|
|
59
|
-
Dot3:
|
|
60
|
-
dotPulse:
|
|
61
|
-
Wave1:
|
|
62
|
-
Wave2:
|
|
63
|
-
Wave3:
|
|
43
|
+
var ae = ie();
|
|
44
|
+
const f = /* @__PURE__ */ se(ae), ce = "_LoaderContainer_wa8op_24", le = "_sm_wa8op_31", de = "_md_wa8op_32", ue = "_lg_wa8op_33", _e = "_Arc1_wa8op_37", fe = "_Arc2_wa8op_38", he = "_Arc3_wa8op_39", pe = "_spin_wa8op_1", me = "_Ring1_wa8op_71", ge = "_Ring2_wa8op_72", Ce = "_Ring3_wa8op_73", ve = "_ripple_wa8op_1", we = "_Dot1_wa8op_86", ye = "_Dot2_wa8op_87", ke = "_Dot3_wa8op_88", Ie = "_dotPulse_wa8op_1", Ne = "_Wave1_wa8op_105", Te = "_Wave2_wa8op_106", Le = "_Wave3_wa8op_107", be = "_Wave4_wa8op_108", Se = "_Wave5_wa8op_109", De = "_waveBounce_wa8op_1", G = {
|
|
45
|
+
LoaderContainer: ce,
|
|
46
|
+
sm: le,
|
|
47
|
+
md: de,
|
|
48
|
+
lg: ue,
|
|
49
|
+
Arc1: _e,
|
|
50
|
+
Arc2: fe,
|
|
51
|
+
Arc3: he,
|
|
52
|
+
spin: pe,
|
|
53
|
+
Ring1: me,
|
|
54
|
+
Ring2: ge,
|
|
55
|
+
Ring3: Ce,
|
|
56
|
+
ripple: ve,
|
|
57
|
+
Dot1: we,
|
|
58
|
+
Dot2: ye,
|
|
59
|
+
Dot3: ke,
|
|
60
|
+
dotPulse: Ie,
|
|
61
|
+
Wave1: Ne,
|
|
62
|
+
Wave2: Te,
|
|
63
|
+
Wave3: Le,
|
|
64
64
|
Wave4: be,
|
|
65
|
-
Wave5:
|
|
66
|
-
waveBounce:
|
|
65
|
+
Wave5: Se,
|
|
66
|
+
waveBounce: De
|
|
67
67
|
};
|
|
68
|
-
function
|
|
69
|
-
switch (
|
|
68
|
+
function Be(n, e) {
|
|
69
|
+
switch (n) {
|
|
70
70
|
case "ripple":
|
|
71
|
-
return /* @__PURE__ */
|
|
72
|
-
/* @__PURE__ */ t("div", { className:
|
|
73
|
-
/* @__PURE__ */ t("div", { className:
|
|
74
|
-
/* @__PURE__ */ t("div", { className:
|
|
71
|
+
return /* @__PURE__ */ d(T, { children: [
|
|
72
|
+
/* @__PURE__ */ t("div", { className: e.Ring1 }),
|
|
73
|
+
/* @__PURE__ */ t("div", { className: e.Ring2 }),
|
|
74
|
+
/* @__PURE__ */ t("div", { className: e.Ring3 })
|
|
75
75
|
] });
|
|
76
76
|
case "dots":
|
|
77
|
-
return /* @__PURE__ */
|
|
78
|
-
/* @__PURE__ */ t("div", { className:
|
|
79
|
-
/* @__PURE__ */ t("div", { className:
|
|
80
|
-
/* @__PURE__ */ t("div", { className:
|
|
77
|
+
return /* @__PURE__ */ d(T, { children: [
|
|
78
|
+
/* @__PURE__ */ t("div", { className: e.Dot1 }),
|
|
79
|
+
/* @__PURE__ */ t("div", { className: e.Dot2 }),
|
|
80
|
+
/* @__PURE__ */ t("div", { className: e.Dot3 })
|
|
81
81
|
] });
|
|
82
82
|
case "wave":
|
|
83
|
-
return /* @__PURE__ */
|
|
84
|
-
/* @__PURE__ */ t("div", { className:
|
|
85
|
-
/* @__PURE__ */ t("div", { className:
|
|
86
|
-
/* @__PURE__ */ t("div", { className:
|
|
87
|
-
/* @__PURE__ */ t("div", { className:
|
|
88
|
-
/* @__PURE__ */ t("div", { className:
|
|
83
|
+
return /* @__PURE__ */ d(T, { children: [
|
|
84
|
+
/* @__PURE__ */ t("div", { className: e.Wave1 }),
|
|
85
|
+
/* @__PURE__ */ t("div", { className: e.Wave2 }),
|
|
86
|
+
/* @__PURE__ */ t("div", { className: e.Wave3 }),
|
|
87
|
+
/* @__PURE__ */ t("div", { className: e.Wave4 }),
|
|
88
|
+
/* @__PURE__ */ t("div", { className: e.Wave5 })
|
|
89
89
|
] });
|
|
90
90
|
default:
|
|
91
|
-
return /* @__PURE__ */
|
|
92
|
-
/* @__PURE__ */ t("div", { className:
|
|
93
|
-
/* @__PURE__ */ t("div", { className:
|
|
94
|
-
/* @__PURE__ */ t("div", { className:
|
|
91
|
+
return /* @__PURE__ */ d(T, { children: [
|
|
92
|
+
/* @__PURE__ */ t("div", { className: e.Arc1 }),
|
|
93
|
+
/* @__PURE__ */ t("div", { className: e.Arc2 }),
|
|
94
|
+
/* @__PURE__ */ t("div", { className: e.Arc3 })
|
|
95
95
|
] });
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function Re({ variant: n = "arcs", size: e = "md", color: o, className: r }) {
|
|
99
99
|
return /* @__PURE__ */ t(
|
|
100
100
|
"div",
|
|
101
101
|
{
|
|
102
|
-
className:
|
|
102
|
+
className: f(G.LoaderContainer, G[e], G[n], r),
|
|
103
103
|
role: "status",
|
|
104
104
|
"aria-label": "Loading",
|
|
105
105
|
style: o ? { "--chures-accent": o } : void 0,
|
|
106
|
-
children:
|
|
106
|
+
children: Be(n, G)
|
|
107
107
|
}
|
|
108
108
|
);
|
|
109
109
|
}
|
|
110
|
-
const xe = "_LoadingWrapperContainer_1q0w7_1",
|
|
110
|
+
const xe = "_LoadingWrapperContainer_1q0w7_1", We = "_SkeletonWrapper_1q0w7_9", J = {
|
|
111
111
|
LoadingWrapperContainer: xe,
|
|
112
|
-
SkeletonWrapper:
|
|
112
|
+
SkeletonWrapper: We
|
|
113
113
|
};
|
|
114
|
-
function
|
|
115
|
-
return
|
|
116
|
-
}
|
|
117
|
-
const
|
|
118
|
-
function
|
|
119
|
-
const { botId:
|
|
120
|
-
i.current =
|
|
121
|
-
const s = F(!1), [a, c] =
|
|
114
|
+
function yt({ isLoading: n, children: e, skeleton: o, loaderProps: r, className: i }) {
|
|
115
|
+
return n ? o ? /* @__PURE__ */ t("div", { className: f(J.SkeletonWrapper, i), children: o }) : /* @__PURE__ */ t("div", { className: f(J.LoadingWrapperContainer, i), children: /* @__PURE__ */ t(Re, { ...r }) }) : /* @__PURE__ */ t(T, { children: e });
|
|
116
|
+
}
|
|
117
|
+
const Ae = "https://oauth.telegram.org/js/telegram-login.js?3";
|
|
118
|
+
function Ee(n) {
|
|
119
|
+
const { botId: e, redirectUri: o, requestAccess: r = "write" } = n, i = F(n.onSuccess);
|
|
120
|
+
i.current = n.onSuccess;
|
|
121
|
+
const s = F(!1), [a, c] = k(!1), [_, u] = k(!1);
|
|
122
122
|
A(function() {
|
|
123
|
-
if (!
|
|
123
|
+
if (!e) return;
|
|
124
124
|
const g = o ?? window.location.origin;
|
|
125
|
-
|
|
126
|
-
const
|
|
127
|
-
return
|
|
128
|
-
const
|
|
129
|
-
|
|
130
|
-
{ client_id:
|
|
131
|
-
function(
|
|
132
|
-
s.current || (s.current = !0, i.current(
|
|
125
|
+
u(!0), c(!1);
|
|
126
|
+
const h = document.createElement("script");
|
|
127
|
+
return h.src = Ae, h.async = !0, h.onload = function() {
|
|
128
|
+
const C = window.Telegram;
|
|
129
|
+
C && (C.Login.init(
|
|
130
|
+
{ client_id: e, redirect_uri: g },
|
|
131
|
+
function(w) {
|
|
132
|
+
s.current || (s.current = !0, i.current(w));
|
|
133
133
|
}
|
|
134
|
-
), c(!0)),
|
|
135
|
-
},
|
|
136
|
-
|
|
137
|
-
}, document.head.appendChild(
|
|
138
|
-
document.head.contains(
|
|
134
|
+
), c(!0)), u(!1);
|
|
135
|
+
}, h.onerror = function() {
|
|
136
|
+
u(!1);
|
|
137
|
+
}, document.head.appendChild(h), function() {
|
|
138
|
+
document.head.contains(h) && document.head.removeChild(h), c(!1), u(!1);
|
|
139
139
|
};
|
|
140
|
-
}, [
|
|
140
|
+
}, [e, o]);
|
|
141
141
|
function m() {
|
|
142
142
|
const g = window.Telegram;
|
|
143
143
|
if (!a || !g) return;
|
|
144
144
|
s.current = !1;
|
|
145
|
-
const
|
|
145
|
+
const h = o ?? window.location.origin;
|
|
146
146
|
g.Login.auth(
|
|
147
|
-
{ client_id:
|
|
148
|
-
function(
|
|
149
|
-
s.current || (s.current = !0, i.current(
|
|
147
|
+
{ client_id: e, redirect_uri: h, request_access: r },
|
|
148
|
+
function(C) {
|
|
149
|
+
s.current || (s.current = !0, i.current(C));
|
|
150
150
|
}
|
|
151
151
|
);
|
|
152
152
|
}
|
|
153
|
-
return { login: m, isReady: a, isLoading:
|
|
153
|
+
return { login: m, isReady: a, isLoading: _ };
|
|
154
154
|
}
|
|
155
|
-
const
|
|
156
|
-
TelegramSignInButtonContainer:
|
|
157
|
-
FullSize:
|
|
158
|
-
Icon:
|
|
159
|
-
},
|
|
155
|
+
const Pe = "_TelegramSignInButtonContainer_10wun_1", Oe = "_FullSize_10wun_46", je = "_Icon_10wun_50", K = {
|
|
156
|
+
TelegramSignInButtonContainer: Pe,
|
|
157
|
+
FullSize: Oe,
|
|
158
|
+
Icon: je
|
|
159
|
+
}, Me = {
|
|
160
160
|
en: "Continue with Telegram",
|
|
161
161
|
ru: "Войти через Telegram"
|
|
162
162
|
};
|
|
163
|
-
function
|
|
163
|
+
function Fe() {
|
|
164
164
|
return /* @__PURE__ */ t(
|
|
165
165
|
"svg",
|
|
166
166
|
{
|
|
@@ -174,9 +174,9 @@ function Me() {
|
|
|
174
174
|
}
|
|
175
175
|
);
|
|
176
176
|
}
|
|
177
|
-
function
|
|
178
|
-
onClick:
|
|
179
|
-
disabled:
|
|
177
|
+
function $e({
|
|
178
|
+
onClick: n,
|
|
179
|
+
disabled: e,
|
|
180
180
|
lang: o = "en",
|
|
181
181
|
title: r,
|
|
182
182
|
label: i,
|
|
@@ -184,20 +184,20 @@ function Fe({
|
|
|
184
184
|
className: a
|
|
185
185
|
}) {
|
|
186
186
|
A(function() {
|
|
187
|
-
const
|
|
188
|
-
if (document.getElementById(
|
|
187
|
+
const u = "comfortaa-font";
|
|
188
|
+
if (document.getElementById(u)) return;
|
|
189
189
|
const m = document.createElement("link");
|
|
190
|
-
m.id =
|
|
190
|
+
m.id = u, m.rel = "stylesheet", m.href = "https://fonts.googleapis.com/css2?family=Comfortaa:wght@600&display=swap", document.head.appendChild(m);
|
|
191
191
|
}, []);
|
|
192
|
-
const c = i ?? r ??
|
|
193
|
-
return /* @__PURE__ */
|
|
194
|
-
/* @__PURE__ */ t(
|
|
192
|
+
const c = i ?? r ?? Me[o], _ = [K.TelegramSignInButtonContainer, s && K.FullSize, a].filter(Boolean).join(" ");
|
|
193
|
+
return /* @__PURE__ */ d("button", { type: "button", className: _, onClick: n, disabled: e, children: [
|
|
194
|
+
/* @__PURE__ */ t(Fe, {}),
|
|
195
195
|
c
|
|
196
196
|
] });
|
|
197
197
|
}
|
|
198
|
-
function
|
|
199
|
-
botId:
|
|
200
|
-
onSuccess:
|
|
198
|
+
function kt({
|
|
199
|
+
botId: n,
|
|
200
|
+
onSuccess: e,
|
|
201
201
|
lang: o,
|
|
202
202
|
title: r,
|
|
203
203
|
redirectUri: i,
|
|
@@ -205,259 +205,259 @@ function yt({
|
|
|
205
205
|
children: a,
|
|
206
206
|
className: c
|
|
207
207
|
}) {
|
|
208
|
-
const { login:
|
|
209
|
-
return a ? /* @__PURE__ */ t(
|
|
210
|
-
|
|
208
|
+
const { login: _, isReady: u } = Ee({ botId: n, onSuccess: e, redirectUri: i, requestAccess: s });
|
|
209
|
+
return a ? /* @__PURE__ */ t(T, { children: a({ login: _, isReady: u }) }) : /* @__PURE__ */ t(
|
|
210
|
+
$e,
|
|
211
211
|
{
|
|
212
|
-
onClick:
|
|
213
|
-
disabled: !
|
|
212
|
+
onClick: _,
|
|
213
|
+
disabled: !u,
|
|
214
214
|
lang: o,
|
|
215
215
|
title: r,
|
|
216
216
|
className: c
|
|
217
217
|
}
|
|
218
218
|
);
|
|
219
219
|
}
|
|
220
|
-
let
|
|
221
|
-
const X =
|
|
220
|
+
let qe = 0;
|
|
221
|
+
const X = re((n, e) => ({
|
|
222
222
|
toasts: [],
|
|
223
223
|
bake: (o) => {
|
|
224
|
-
const r =
|
|
225
|
-
|
|
226
|
-
|
|
224
|
+
const r = qe++;
|
|
225
|
+
n((i) => ({ toasts: [...i.toasts, { ...o, id: r }] })), setTimeout(() => {
|
|
226
|
+
e().dismiss(r);
|
|
227
227
|
}, 5e3);
|
|
228
228
|
},
|
|
229
229
|
dismiss: (o) => {
|
|
230
|
-
|
|
230
|
+
n((r) => ({
|
|
231
231
|
toasts: r.toasts.filter((i) => i.id !== o)
|
|
232
232
|
}));
|
|
233
233
|
}
|
|
234
|
-
})),
|
|
235
|
-
ToastContainer:
|
|
236
|
-
Toast:
|
|
237
|
-
error:
|
|
238
|
-
warn:
|
|
239
|
-
info:
|
|
240
|
-
Description:
|
|
241
|
-
DismissButton:
|
|
242
|
-
slideIn:
|
|
243
|
-
slideOut:
|
|
234
|
+
})), Ge = "_ToastContainer_1tme2_1", ze = "_Toast_1tme2_1", He = "_error_1tme2_33", Ve = "_warn_1tme2_41", Ke = "_info_1tme2_49", Qe = "_Description_1tme2_53", Ue = "_DismissButton_1tme2_59", Je = "_slideIn_1tme2_79", Xe = "_slideOut_1tme2_83", y = {
|
|
235
|
+
ToastContainer: Ge,
|
|
236
|
+
Toast: ze,
|
|
237
|
+
error: He,
|
|
238
|
+
warn: Ve,
|
|
239
|
+
info: Ke,
|
|
240
|
+
Description: Qe,
|
|
241
|
+
DismissButton: Ue,
|
|
242
|
+
slideIn: Je,
|
|
243
|
+
slideOut: Xe
|
|
244
244
|
};
|
|
245
|
-
function
|
|
246
|
-
const { toasts:
|
|
247
|
-
return /* @__PURE__ */ t("div", { className:
|
|
248
|
-
|
|
245
|
+
function It() {
|
|
246
|
+
const { toasts: n } = X();
|
|
247
|
+
return /* @__PURE__ */ t("div", { className: y.ToastContainer, children: /* @__PURE__ */ t(te, { children: n.map((e) => /* @__PURE__ */ t(
|
|
248
|
+
oe.div,
|
|
249
249
|
{
|
|
250
250
|
layout: !0,
|
|
251
251
|
initial: { opacity: 0, x: 100, y: 50 },
|
|
252
252
|
animate: { opacity: 1, x: 0, y: 0 },
|
|
253
253
|
exit: { opacity: 0, y: -50 },
|
|
254
254
|
transition: { type: "spring", stiffness: 300, damping: 20 },
|
|
255
|
-
children: /* @__PURE__ */ t(
|
|
255
|
+
children: /* @__PURE__ */ t(Ye, { ...e })
|
|
256
256
|
},
|
|
257
|
-
|
|
257
|
+
e.id
|
|
258
258
|
)) }) });
|
|
259
259
|
}
|
|
260
|
-
function
|
|
261
|
-
const [s, a] =
|
|
260
|
+
function Ye({ id: n, title: e, description: o, level: r, isDismissable: i }) {
|
|
261
|
+
const [s, a] = k(!1), c = X();
|
|
262
262
|
return A(() => () => {
|
|
263
263
|
a(!0);
|
|
264
|
-
}, []), /* @__PURE__ */
|
|
264
|
+
}, []), /* @__PURE__ */ d(
|
|
265
265
|
"div",
|
|
266
266
|
{
|
|
267
|
-
className:
|
|
268
|
-
[
|
|
269
|
-
[
|
|
270
|
-
[
|
|
271
|
-
[
|
|
272
|
-
[
|
|
267
|
+
className: f(y.Toast, {
|
|
268
|
+
[y.error]: r === "Error",
|
|
269
|
+
[y.warn]: r === "Warn",
|
|
270
|
+
[y.info]: r == null || r === "Info",
|
|
271
|
+
[y.slideIn]: !s,
|
|
272
|
+
[y.slideOut]: s
|
|
273
273
|
}),
|
|
274
274
|
children: [
|
|
275
|
-
/* @__PURE__ */ t("div", { children:
|
|
276
|
-
/* @__PURE__ */ t("div", { className:
|
|
277
|
-
i &&
|
|
275
|
+
/* @__PURE__ */ t("div", { children: e }),
|
|
276
|
+
/* @__PURE__ */ t("div", { className: y.Description, children: o }),
|
|
277
|
+
i && n !== void 0 && /* @__PURE__ */ t("div", { className: y.DismissButton, onClick: () => c.dismiss(n), children: "×" })
|
|
278
278
|
]
|
|
279
279
|
}
|
|
280
280
|
);
|
|
281
281
|
}
|
|
282
|
-
const
|
|
283
|
-
InputContainer:
|
|
284
|
-
InputField:
|
|
285
|
-
hasError:
|
|
286
|
-
disabled:
|
|
287
|
-
Label:
|
|
288
|
-
lifted:
|
|
289
|
-
ErrorText:
|
|
290
|
-
Skeleton:
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
return r ? /* @__PURE__ */ t("div", { className: _(I.Skeleton, c), "aria-hidden": "true" }) : /* @__PURE__ */ u("div", { className: _(I.InputContainer, { [I.hasError]: !!a, [I.disabled]: s }, c), children: [
|
|
282
|
+
const Ze = "_InputContainer_1a08x_6", en = "_InputField_1a08x_12", nn = "_hasError_1a08x_30", tn = "_disabled_1a08x_35", on = "_Label_1a08x_40", rn = "_lifted_1a08x_54", sn = "_ErrorText_1a08x_65", an = "_Skeleton_1a08x_73", N = {
|
|
283
|
+
InputContainer: Ze,
|
|
284
|
+
InputField: en,
|
|
285
|
+
hasError: nn,
|
|
286
|
+
disabled: tn,
|
|
287
|
+
Label: on,
|
|
288
|
+
lifted: rn,
|
|
289
|
+
ErrorText: sn,
|
|
290
|
+
Skeleton: an
|
|
291
|
+
}, Nt = ne(function({ value: e, setValue: o, label: r, isLoader: i, type: s = "text", disabled: a, error: c, className: _, ...u }, m) {
|
|
292
|
+
const [g, h] = k(!1), C = g || e.length > 0;
|
|
293
|
+
return i ? /* @__PURE__ */ t("div", { className: f(N.Skeleton, _), "aria-hidden": "true" }) : /* @__PURE__ */ d("div", { className: f(N.InputContainer, { [N.hasError]: !!c, [N.disabled]: a }, _), children: [
|
|
295
294
|
/* @__PURE__ */ t(
|
|
296
295
|
"input",
|
|
297
296
|
{
|
|
298
|
-
|
|
299
|
-
|
|
297
|
+
ref: m,
|
|
298
|
+
className: N.InputField,
|
|
299
|
+
type: s,
|
|
300
300
|
value: e,
|
|
301
|
-
onChange: (
|
|
302
|
-
onFocus: () =>
|
|
303
|
-
onBlur: () =>
|
|
304
|
-
disabled:
|
|
301
|
+
onChange: (w) => o(w.target.value),
|
|
302
|
+
onFocus: () => h(!0),
|
|
303
|
+
onBlur: () => h(!1),
|
|
304
|
+
disabled: a,
|
|
305
|
+
...u
|
|
305
306
|
}
|
|
306
307
|
),
|
|
307
|
-
/* @__PURE__ */ t("label", { className:
|
|
308
|
-
|
|
308
|
+
r && /* @__PURE__ */ t("label", { className: f(N.Label, { [N.lifted]: C }), children: r }),
|
|
309
|
+
c && /* @__PURE__ */ t("span", { className: N.ErrorText, children: c })
|
|
309
310
|
] });
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
Skeleton: hn
|
|
311
|
+
}), cn = "_ToggleContainer_1jetc_6", ln = "_disabled_1jetc_13", dn = "_Track_1jetc_18", un = "_on_1jetc_31", _n = "_Thumb_1jetc_39", fn = "_Label_1jetc_57", hn = "_LabelSkeleton_1jetc_63", pn = "_Skeleton_1jetc_78", v = {
|
|
312
|
+
ToggleContainer: cn,
|
|
313
|
+
disabled: ln,
|
|
314
|
+
Track: dn,
|
|
315
|
+
on: un,
|
|
316
|
+
Thumb: _n,
|
|
317
|
+
Label: fn,
|
|
318
|
+
LabelSkeleton: hn,
|
|
319
|
+
Skeleton: pn
|
|
320
320
|
};
|
|
321
|
-
function
|
|
322
|
-
const
|
|
323
|
-
return s ?
|
|
324
|
-
r === "left" &&
|
|
325
|
-
/* @__PURE__ */ t("div", { className:
|
|
326
|
-
r === "right" &&
|
|
327
|
-
] }) : /* @__PURE__ */ t("div", { className:
|
|
328
|
-
r === "left" &&
|
|
321
|
+
function Tt({ checked: n, onChange: e, label: o, labelPosition: r = "right", disabled: i, isLoader: s, isLoadingLabel: a, className: c }) {
|
|
322
|
+
const _ = !!o || a, u = a ? /* @__PURE__ */ t("span", { className: v.LabelSkeleton, "aria-hidden": "true" }) : o ? /* @__PURE__ */ t("span", { className: v.Label, children: o }) : null;
|
|
323
|
+
return s ? _ ? /* @__PURE__ */ d("div", { className: f(v.ToggleContainer, c), children: [
|
|
324
|
+
r === "left" && u,
|
|
325
|
+
/* @__PURE__ */ t("div", { className: v.Skeleton, "aria-hidden": "true" }),
|
|
326
|
+
r === "right" && u
|
|
327
|
+
] }) : /* @__PURE__ */ t("div", { className: f(v.Skeleton, c), "aria-hidden": "true" }) : /* @__PURE__ */ d("label", { className: f(v.ToggleContainer, { [v.disabled]: i }, c), children: [
|
|
328
|
+
r === "left" && u,
|
|
329
329
|
/* @__PURE__ */ t(
|
|
330
330
|
"button",
|
|
331
331
|
{
|
|
332
332
|
role: "switch",
|
|
333
|
-
"aria-checked":
|
|
334
|
-
className:
|
|
335
|
-
onClick: () => !i &&
|
|
333
|
+
"aria-checked": n,
|
|
334
|
+
className: f(v.Track, { [v.on]: n }),
|
|
335
|
+
onClick: () => !i && e(!n),
|
|
336
336
|
disabled: i,
|
|
337
337
|
type: "button",
|
|
338
|
-
children: /* @__PURE__ */ t("span", { className:
|
|
338
|
+
children: /* @__PURE__ */ t("span", { className: v.Thumb })
|
|
339
339
|
}
|
|
340
340
|
),
|
|
341
|
-
r === "right" &&
|
|
341
|
+
r === "right" && u
|
|
342
342
|
] });
|
|
343
343
|
}
|
|
344
|
-
function
|
|
345
|
-
const [
|
|
346
|
-
return { isOpen:
|
|
344
|
+
function mn() {
|
|
345
|
+
const [n, e] = k(!1), o = F(null), r = Q(() => e((s) => !s), []), i = Q(() => e(!1), []);
|
|
346
|
+
return { isOpen: n, triggerRef: o, toggleOpen: r, close: i };
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function gn(n, e, o) {
|
|
349
349
|
A(() => {
|
|
350
350
|
function r(s) {
|
|
351
351
|
const a = s.target;
|
|
352
|
-
|
|
352
|
+
n.current?.contains(a) || o?.current?.contains(a) || e();
|
|
353
353
|
}
|
|
354
354
|
function i(s) {
|
|
355
|
-
s.key === "Escape" &&
|
|
355
|
+
s.key === "Escape" && e();
|
|
356
356
|
}
|
|
357
357
|
return document.addEventListener("mousedown", r, !0), document.addEventListener("keydown", i), () => {
|
|
358
358
|
document.removeEventListener("mousedown", r, !0), document.removeEventListener("keydown", i);
|
|
359
359
|
};
|
|
360
|
-
}, [
|
|
360
|
+
}, [e, n, o]);
|
|
361
361
|
}
|
|
362
|
-
function
|
|
363
|
-
const [o, r] =
|
|
362
|
+
function Cn(n, e) {
|
|
363
|
+
const [o, r] = k([]);
|
|
364
364
|
return A(() => {
|
|
365
|
-
if (!
|
|
365
|
+
if (!e) return;
|
|
366
366
|
let i = !1;
|
|
367
|
-
return n
|
|
367
|
+
return e(n).then((s) => {
|
|
368
368
|
i || r(s);
|
|
369
369
|
}), () => {
|
|
370
370
|
i = !0;
|
|
371
371
|
};
|
|
372
|
-
}, [
|
|
372
|
+
}, [n, e]), o;
|
|
373
373
|
}
|
|
374
|
-
function M(
|
|
375
|
-
return typeof
|
|
374
|
+
function M(n) {
|
|
375
|
+
return typeof n == "string" ? n : n.id;
|
|
376
376
|
}
|
|
377
|
-
function z(
|
|
378
|
-
return typeof
|
|
377
|
+
function z(n) {
|
|
378
|
+
return typeof n == "string" ? n : n.name;
|
|
379
379
|
}
|
|
380
|
-
function
|
|
381
|
-
return
|
|
380
|
+
function vn(n, e) {
|
|
381
|
+
return n.map((o) => e.find((r) => M(r) === o) ?? o);
|
|
382
382
|
}
|
|
383
|
-
const
|
|
384
|
-
DropdownContainer:
|
|
385
|
-
PanelContainer:
|
|
386
|
-
Label:
|
|
387
|
-
lifted:
|
|
388
|
-
TriggerContainer:
|
|
389
|
-
Open:
|
|
390
|
-
TriggerPlaceholder:
|
|
383
|
+
const wn = "_DropdownContainer_1v133_13", yn = "_PanelContainer_1v133_18", kn = "_Label_1v133_31", In = "_lifted_1v133_45", Nn = "_TriggerContainer_1v133_52", Tn = "_Open_1v133_76", Ln = "_TriggerPlaceholder_1v133_81", bn = "_TriggerValue_1v133_89", Sn = "_TriggerIcon_1v133_97", Dn = "_ChipsWrapper_1v133_104", Bn = "_Chip_1v133_104", Rn = "_SearchRow_1v133_135", xn = "_SearchBox_1v133_140", Wn = "_SearchIcon_1v133_150", An = "_SearchInput_1v133_157", En = "_ResultsList_1v133_171", Pn = "_OptionRow_1v133_176", On = "_Selected_1v133_191", jn = "_Checkmark_1v133_196", Mn = "_CreateRow_1v133_202", Fn = "_WithBorder_1v133_215", $n = "_CreateIcon_1v133_220", qn = "_CreateLabel_1v133_232", Gn = "_EmptyHint_1v133_238", zn = "_SkeletonRow_1v133_245", l = {
|
|
384
|
+
DropdownContainer: wn,
|
|
385
|
+
PanelContainer: yn,
|
|
386
|
+
Label: kn,
|
|
387
|
+
lifted: In,
|
|
388
|
+
TriggerContainer: Nn,
|
|
389
|
+
Open: Tn,
|
|
390
|
+
TriggerPlaceholder: Ln,
|
|
391
391
|
TriggerValue: bn,
|
|
392
|
-
TriggerIcon:
|
|
393
|
-
ChipsWrapper:
|
|
394
|
-
Chip:
|
|
395
|
-
SearchRow:
|
|
392
|
+
TriggerIcon: Sn,
|
|
393
|
+
ChipsWrapper: Dn,
|
|
394
|
+
Chip: Bn,
|
|
395
|
+
SearchRow: Rn,
|
|
396
396
|
SearchBox: xn,
|
|
397
|
-
SearchIcon:
|
|
398
|
-
SearchInput:
|
|
399
|
-
ResultsList:
|
|
400
|
-
OptionRow:
|
|
401
|
-
Selected:
|
|
402
|
-
Checkmark:
|
|
403
|
-
CreateRow:
|
|
404
|
-
WithBorder:
|
|
405
|
-
CreateIcon:
|
|
406
|
-
CreateLabel:
|
|
407
|
-
EmptyHint:
|
|
408
|
-
SkeletonRow:
|
|
397
|
+
SearchIcon: Wn,
|
|
398
|
+
SearchInput: An,
|
|
399
|
+
ResultsList: En,
|
|
400
|
+
OptionRow: Pn,
|
|
401
|
+
Selected: On,
|
|
402
|
+
Checkmark: jn,
|
|
403
|
+
CreateRow: Mn,
|
|
404
|
+
WithBorder: Fn,
|
|
405
|
+
CreateIcon: $n,
|
|
406
|
+
CreateLabel: qn,
|
|
407
|
+
EmptyHint: Gn,
|
|
408
|
+
SkeletonRow: zn
|
|
409
409
|
};
|
|
410
|
-
function
|
|
410
|
+
function Hn({ query: n, withBorder: e, onCreate: o }) {
|
|
411
411
|
function r(i) {
|
|
412
412
|
i.preventDefault(), o();
|
|
413
413
|
}
|
|
414
|
-
return /* @__PURE__ */
|
|
414
|
+
return /* @__PURE__ */ d(
|
|
415
415
|
"div",
|
|
416
416
|
{
|
|
417
|
-
className:
|
|
417
|
+
className: f(l.CreateRow, e && l.WithBorder),
|
|
418
418
|
onMouseDown: r,
|
|
419
419
|
children: [
|
|
420
|
-
/* @__PURE__ */ t("span", { className:
|
|
420
|
+
/* @__PURE__ */ t("span", { className: l.CreateIcon, children: /* @__PURE__ */ d("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", stroke: "currentColor", strokeWidth: "2.4", strokeLinecap: "round", children: [
|
|
421
421
|
/* @__PURE__ */ t("line", { x1: "5", y1: "1", x2: "5", y2: "9" }),
|
|
422
422
|
/* @__PURE__ */ t("line", { x1: "1", y1: "5", x2: "9", y2: "5" })
|
|
423
423
|
] }) }),
|
|
424
|
-
/* @__PURE__ */
|
|
424
|
+
/* @__PURE__ */ d("span", { className: l.CreateLabel, children: [
|
|
425
425
|
"create “",
|
|
426
|
-
|
|
426
|
+
n,
|
|
427
427
|
"”"
|
|
428
428
|
] })
|
|
429
429
|
]
|
|
430
430
|
}
|
|
431
431
|
);
|
|
432
432
|
}
|
|
433
|
-
function
|
|
433
|
+
function Vn({ opt: n, isSelected: e, multiSelect: o, onPick: r }) {
|
|
434
434
|
function i(s) {
|
|
435
|
-
s.preventDefault(), r(
|
|
435
|
+
s.preventDefault(), r(n);
|
|
436
436
|
}
|
|
437
|
-
return /* @__PURE__ */
|
|
437
|
+
return /* @__PURE__ */ d(
|
|
438
438
|
"div",
|
|
439
439
|
{
|
|
440
|
-
className:
|
|
440
|
+
className: f(l.OptionRow, e && l.Selected),
|
|
441
441
|
onMouseDown: i,
|
|
442
442
|
children: [
|
|
443
|
-
o &&
|
|
444
|
-
z(
|
|
443
|
+
o && e && /* @__PURE__ */ t("span", { className: l.Checkmark, children: "✓" }),
|
|
444
|
+
z(n)
|
|
445
445
|
]
|
|
446
446
|
}
|
|
447
447
|
);
|
|
448
448
|
}
|
|
449
|
-
function
|
|
450
|
-
return /* @__PURE__ */ t("div", { className:
|
|
451
|
-
/* @__PURE__ */ t("span", { className:
|
|
449
|
+
function Kn({ inputRef: n, query: e, onChange: o, onKeyDown: r, placeholder: i }) {
|
|
450
|
+
return /* @__PURE__ */ t("div", { className: l.SearchRow, children: /* @__PURE__ */ d("div", { className: l.SearchBox, children: [
|
|
451
|
+
/* @__PURE__ */ t("span", { className: l.SearchIcon, children: /* @__PURE__ */ d("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", children: [
|
|
452
452
|
/* @__PURE__ */ t("circle", { cx: "5", cy: "5", r: "3.5" }),
|
|
453
453
|
/* @__PURE__ */ t("line", { x1: "8", y1: "8", x2: "11", y2: "11" })
|
|
454
454
|
] }) }),
|
|
455
455
|
/* @__PURE__ */ t(
|
|
456
456
|
"input",
|
|
457
457
|
{
|
|
458
|
-
ref:
|
|
459
|
-
className:
|
|
460
|
-
value:
|
|
458
|
+
ref: n,
|
|
459
|
+
className: l.SearchInput,
|
|
460
|
+
value: e,
|
|
461
461
|
onChange: o,
|
|
462
462
|
onKeyDown: r,
|
|
463
463
|
placeholder: i
|
|
@@ -465,91 +465,91 @@ function Vn({ inputRef: e, query: n, onChange: o, onKeyDown: r, placeholder: i }
|
|
|
465
465
|
)
|
|
466
466
|
] }) });
|
|
467
467
|
}
|
|
468
|
-
function
|
|
469
|
-
return /* @__PURE__ */ t(
|
|
468
|
+
function Qn({ count: n }) {
|
|
469
|
+
return /* @__PURE__ */ t(T, { children: Array.from({ length: n }).map((e, o) => /* @__PURE__ */ t("div", { className: l.SkeletonRow }, o)) });
|
|
470
470
|
}
|
|
471
|
-
function
|
|
472
|
-
onSearch:
|
|
473
|
-
onCreate:
|
|
471
|
+
function Un({
|
|
472
|
+
onSearch: n,
|
|
473
|
+
onCreate: e,
|
|
474
474
|
onPick: o,
|
|
475
475
|
onClose: r,
|
|
476
476
|
anchorRef: i,
|
|
477
477
|
placeholder: s,
|
|
478
478
|
options: a = [],
|
|
479
479
|
excluded: c = [],
|
|
480
|
-
selected:
|
|
481
|
-
multiSelect:
|
|
480
|
+
selected: _ = [],
|
|
481
|
+
multiSelect: u = !1,
|
|
482
482
|
isLoading: m = !1,
|
|
483
483
|
emptyHint: g = "no results found",
|
|
484
|
-
skeletonRowCount:
|
|
485
|
-
onError:
|
|
484
|
+
skeletonRowCount: h = 4,
|
|
485
|
+
onError: C = console.error
|
|
486
486
|
}) {
|
|
487
|
-
const [
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
}, [
|
|
491
|
-
const
|
|
492
|
-
(
|
|
493
|
-
), S =
|
|
494
|
-
(
|
|
495
|
-
), P = !!
|
|
487
|
+
const [w, $] = k(""), [L, R] = k(!1), x = F(null), E = F(null), b = !!n, q = Cn(w, n);
|
|
488
|
+
gn(E, r, i), A(() => {
|
|
489
|
+
b && x.current?.focus();
|
|
490
|
+
}, [b]);
|
|
491
|
+
const I = (n ? q : a).filter(
|
|
492
|
+
(p) => !c.includes(M(p))
|
|
493
|
+
), S = w.trim(), H = I.some(
|
|
494
|
+
(p) => z(p).toLowerCase() === S.toLowerCase()
|
|
495
|
+
), P = !!e && S.length > 0 && !H;
|
|
496
496
|
async function D() {
|
|
497
|
-
!S ||
|
|
497
|
+
!S || L || !e || (R(!0), e(S).then(O).catch(C).finally(() => R(!1)));
|
|
498
498
|
}
|
|
499
|
-
function O(
|
|
500
|
-
o(
|
|
499
|
+
function O(p) {
|
|
500
|
+
o(p), u || r();
|
|
501
501
|
}
|
|
502
|
-
function Y(
|
|
503
|
-
$(
|
|
502
|
+
function Y(p) {
|
|
503
|
+
$(p.target.value);
|
|
504
504
|
}
|
|
505
|
-
function Z(
|
|
506
|
-
|
|
505
|
+
function Z(p) {
|
|
506
|
+
p.key === "Enter" && (p.preventDefault(), I.length > 0 ? O(I[0]) : P && D());
|
|
507
507
|
}
|
|
508
|
-
const ee = s ?? (
|
|
509
|
-
return /* @__PURE__ */
|
|
510
|
-
|
|
511
|
-
|
|
508
|
+
const ee = s ?? (e ? "search or add new…" : "search…");
|
|
509
|
+
return /* @__PURE__ */ d("div", { ref: E, className: l.PanelContainer, children: [
|
|
510
|
+
b && /* @__PURE__ */ t(
|
|
511
|
+
Kn,
|
|
512
512
|
{
|
|
513
|
-
inputRef:
|
|
514
|
-
query:
|
|
513
|
+
inputRef: x,
|
|
514
|
+
query: w,
|
|
515
515
|
onChange: Y,
|
|
516
516
|
onKeyDown: Z,
|
|
517
517
|
placeholder: ee
|
|
518
518
|
}
|
|
519
519
|
),
|
|
520
|
-
/* @__PURE__ */ t("div", { className:
|
|
521
|
-
|
|
522
|
-
|
|
520
|
+
/* @__PURE__ */ t("div", { className: l.ResultsList, children: m ? /* @__PURE__ */ t(Qn, { count: h }) : /* @__PURE__ */ d(T, { children: [
|
|
521
|
+
I.map((p) => /* @__PURE__ */ t(
|
|
522
|
+
Vn,
|
|
523
523
|
{
|
|
524
|
-
opt:
|
|
525
|
-
isSelected:
|
|
526
|
-
multiSelect:
|
|
524
|
+
opt: p,
|
|
525
|
+
isSelected: _.includes(M(p)),
|
|
526
|
+
multiSelect: u,
|
|
527
527
|
onPick: O
|
|
528
528
|
},
|
|
529
|
-
M(
|
|
529
|
+
M(p)
|
|
530
530
|
)),
|
|
531
531
|
P && /* @__PURE__ */ t(
|
|
532
|
-
|
|
532
|
+
Hn,
|
|
533
533
|
{
|
|
534
534
|
query: S,
|
|
535
|
-
withBorder:
|
|
535
|
+
withBorder: I.length > 0,
|
|
536
536
|
onCreate: D
|
|
537
537
|
}
|
|
538
538
|
),
|
|
539
|
-
|
|
539
|
+
I.length === 0 && !P && /* @__PURE__ */ t("div", { className: l.EmptyHint, children: g })
|
|
540
540
|
] }) })
|
|
541
541
|
] });
|
|
542
542
|
}
|
|
543
|
-
function
|
|
543
|
+
function Jn({ size: n = 14, strokeWidth: e = 2, className: o }) {
|
|
544
544
|
return /* @__PURE__ */ t(
|
|
545
545
|
"svg",
|
|
546
546
|
{
|
|
547
547
|
viewBox: "0 0 24 24",
|
|
548
|
-
width:
|
|
549
|
-
height:
|
|
548
|
+
width: n,
|
|
549
|
+
height: n,
|
|
550
550
|
fill: "none",
|
|
551
551
|
stroke: "currentColor",
|
|
552
|
-
strokeWidth:
|
|
552
|
+
strokeWidth: e,
|
|
553
553
|
strokeLinecap: "round",
|
|
554
554
|
strokeLinejoin: "round",
|
|
555
555
|
className: o,
|
|
@@ -557,16 +557,16 @@ function Un({ size: e = 14, strokeWidth: n = 2, className: o }) {
|
|
|
557
557
|
}
|
|
558
558
|
);
|
|
559
559
|
}
|
|
560
|
-
function
|
|
560
|
+
function Lt({ size: n = 18, strokeWidth: e = 2.5, shrink: o = !0 }) {
|
|
561
561
|
return /* @__PURE__ */ t(
|
|
562
562
|
"svg",
|
|
563
563
|
{
|
|
564
564
|
viewBox: "0 0 24 24",
|
|
565
|
-
width:
|
|
566
|
-
height:
|
|
565
|
+
width: n,
|
|
566
|
+
height: n,
|
|
567
567
|
fill: "none",
|
|
568
568
|
stroke: "currentColor",
|
|
569
|
-
strokeWidth:
|
|
569
|
+
strokeWidth: e,
|
|
570
570
|
strokeLinecap: "round",
|
|
571
571
|
strokeLinejoin: "round",
|
|
572
572
|
style: o ? { flexShrink: 0 } : void 0,
|
|
@@ -575,7 +575,7 @@ function Tt({ size: e = 18, strokeWidth: n = 2.5, shrink: o = !0 }) {
|
|
|
575
575
|
);
|
|
576
576
|
}
|
|
577
577
|
function bt() {
|
|
578
|
-
return /* @__PURE__ */
|
|
578
|
+
return /* @__PURE__ */ d(
|
|
579
579
|
"svg",
|
|
580
580
|
{
|
|
581
581
|
viewBox: "0 0 24 24",
|
|
@@ -593,8 +593,8 @@ function bt() {
|
|
|
593
593
|
}
|
|
594
594
|
);
|
|
595
595
|
}
|
|
596
|
-
function
|
|
597
|
-
return /* @__PURE__ */
|
|
596
|
+
function St() {
|
|
597
|
+
return /* @__PURE__ */ d(
|
|
598
598
|
"svg",
|
|
599
599
|
{
|
|
600
600
|
viewBox: "0 0 24 24",
|
|
@@ -612,148 +612,148 @@ function Lt() {
|
|
|
612
612
|
}
|
|
613
613
|
);
|
|
614
614
|
}
|
|
615
|
-
function
|
|
616
|
-
return /* @__PURE__ */
|
|
615
|
+
function Xn({ triggerRef: n, isOpen: e, onClick: o, selectedOptions: r, multiSelect: i, placeholder: s }) {
|
|
616
|
+
return /* @__PURE__ */ d(
|
|
617
617
|
"button",
|
|
618
618
|
{
|
|
619
619
|
type: "button",
|
|
620
|
-
ref:
|
|
621
|
-
className:
|
|
620
|
+
ref: n,
|
|
621
|
+
className: f(l.TriggerContainer, e && l.Open),
|
|
622
622
|
onClick: o,
|
|
623
|
-
"aria-expanded":
|
|
623
|
+
"aria-expanded": e,
|
|
624
624
|
"aria-haspopup": "listbox",
|
|
625
625
|
children: [
|
|
626
|
-
i && r.length > 0 ? /* @__PURE__ */ t("div", { className:
|
|
627
|
-
/* @__PURE__ */ t("span", { className:
|
|
626
|
+
i && r.length > 0 ? /* @__PURE__ */ t("div", { className: l.ChipsWrapper, children: r.map((a, c) => /* @__PURE__ */ t("span", { className: l.Chip, children: z(a) }, c)) }) : /* @__PURE__ */ t("span", { className: r.length === 0 ? l.TriggerPlaceholder : l.TriggerValue, children: r.length === 0 ? s : r.map(z).join(", ") }),
|
|
627
|
+
/* @__PURE__ */ t("span", { className: l.TriggerIcon, children: /* @__PURE__ */ t(Jn, { size: 12 }) })
|
|
628
628
|
]
|
|
629
629
|
}
|
|
630
630
|
);
|
|
631
631
|
}
|
|
632
|
-
function
|
|
633
|
-
options:
|
|
634
|
-
value:
|
|
632
|
+
function Dt({
|
|
633
|
+
options: n = [],
|
|
634
|
+
value: e,
|
|
635
635
|
onChange: o,
|
|
636
636
|
onSearch: r,
|
|
637
637
|
onCreate: i,
|
|
638
638
|
excluded: s,
|
|
639
639
|
multiSelect: a = !1,
|
|
640
640
|
label: c,
|
|
641
|
-
placeholder:
|
|
642
|
-
searchPlaceholder:
|
|
641
|
+
placeholder: _ = "select…",
|
|
642
|
+
searchPlaceholder: u,
|
|
643
643
|
emptyHint: m,
|
|
644
644
|
isLoading: g,
|
|
645
|
-
skeletonRowCount:
|
|
646
|
-
onError:
|
|
647
|
-
className:
|
|
645
|
+
skeletonRowCount: h,
|
|
646
|
+
onError: C,
|
|
647
|
+
className: w,
|
|
648
648
|
children: $
|
|
649
649
|
}) {
|
|
650
|
-
const { isOpen:
|
|
650
|
+
const { isOpen: L, triggerRef: R, toggleOpen: x, close: E } = mn(), b = vn(e, n), q = L || b.length > 0, I = c && !q ? "" : _;
|
|
651
651
|
function S(P) {
|
|
652
652
|
const D = M(P);
|
|
653
653
|
o(
|
|
654
|
-
a ?
|
|
654
|
+
a ? e.includes(D) ? e.filter((O) => O !== D) : [...e, D] : [D]
|
|
655
655
|
);
|
|
656
656
|
}
|
|
657
657
|
const H = {
|
|
658
|
-
ref:
|
|
659
|
-
onClick:
|
|
660
|
-
"aria-expanded":
|
|
658
|
+
ref: R,
|
|
659
|
+
onClick: x,
|
|
660
|
+
"aria-expanded": L,
|
|
661
661
|
"aria-haspopup": "listbox"
|
|
662
662
|
};
|
|
663
|
-
return /* @__PURE__ */
|
|
664
|
-
c && /* @__PURE__ */ t("label", { className:
|
|
665
|
-
$ ? $({ selectedOptions:
|
|
666
|
-
|
|
663
|
+
return /* @__PURE__ */ d("div", { className: f(l.DropdownContainer, w), children: [
|
|
664
|
+
c && /* @__PURE__ */ t("label", { className: f(l.Label, { [l.lifted]: q }), children: c }),
|
|
665
|
+
$ ? $({ selectedOptions: b, isOpen: L, toggleOpen: x, close: E, triggerProps: H }) : /* @__PURE__ */ t(
|
|
666
|
+
Xn,
|
|
667
667
|
{
|
|
668
|
-
triggerRef:
|
|
669
|
-
isOpen:
|
|
670
|
-
onClick:
|
|
671
|
-
selectedOptions:
|
|
668
|
+
triggerRef: R,
|
|
669
|
+
isOpen: L,
|
|
670
|
+
onClick: x,
|
|
671
|
+
selectedOptions: b,
|
|
672
672
|
multiSelect: a,
|
|
673
|
-
placeholder:
|
|
673
|
+
placeholder: I
|
|
674
674
|
}
|
|
675
675
|
),
|
|
676
|
-
|
|
677
|
-
|
|
676
|
+
L && /* @__PURE__ */ t(
|
|
677
|
+
Un,
|
|
678
678
|
{
|
|
679
|
-
options:
|
|
679
|
+
options: n,
|
|
680
680
|
onSearch: r,
|
|
681
681
|
onCreate: i,
|
|
682
682
|
onPick: S,
|
|
683
683
|
onClose: E,
|
|
684
|
-
anchorRef:
|
|
684
|
+
anchorRef: R,
|
|
685
685
|
excluded: s,
|
|
686
686
|
multiSelect: a,
|
|
687
|
-
selected:
|
|
688
|
-
placeholder:
|
|
687
|
+
selected: e,
|
|
688
|
+
placeholder: u,
|
|
689
689
|
emptyHint: m,
|
|
690
690
|
isLoading: g,
|
|
691
|
-
skeletonRowCount:
|
|
692
|
-
onError:
|
|
691
|
+
skeletonRowCount: h,
|
|
692
|
+
onError: C
|
|
693
693
|
}
|
|
694
694
|
)
|
|
695
695
|
] });
|
|
696
696
|
}
|
|
697
|
-
const
|
|
698
|
-
Btn:
|
|
699
|
-
Primary:
|
|
700
|
-
Secondary:
|
|
701
|
-
Ghost:
|
|
702
|
-
IconDanger:
|
|
703
|
-
Danger:
|
|
704
|
-
},
|
|
697
|
+
const Yn = "_Btn_1hwff_1", Zn = "_Primary_1hwff_26", et = "_Secondary_1hwff_41", nt = "_Ghost_1hwff_53", tt = "_IconDanger_1hwff_65", ot = "_Danger_1hwff_86", W = {
|
|
698
|
+
Btn: Yn,
|
|
699
|
+
Primary: Zn,
|
|
700
|
+
Secondary: et,
|
|
701
|
+
Ghost: nt,
|
|
702
|
+
IconDanger: tt,
|
|
703
|
+
Danger: ot
|
|
704
|
+
}, rt = {
|
|
705
705
|
primary: W.Primary,
|
|
706
706
|
secondary: W.Secondary,
|
|
707
707
|
danger: W.Danger,
|
|
708
708
|
ghost: W.Ghost,
|
|
709
709
|
iconDanger: W.IconDanger
|
|
710
710
|
};
|
|
711
|
-
function
|
|
711
|
+
function Bt({ variant: n, className: e, children: o, ...r }) {
|
|
712
712
|
return /* @__PURE__ */ t(
|
|
713
713
|
"button",
|
|
714
714
|
{
|
|
715
715
|
type: "button",
|
|
716
716
|
...r,
|
|
717
|
-
className:
|
|
717
|
+
className: f(W.Btn, n ? rt[n] : void 0, e),
|
|
718
718
|
children: o
|
|
719
719
|
}
|
|
720
720
|
);
|
|
721
721
|
}
|
|
722
|
-
const
|
|
723
|
-
ConfirmContainer:
|
|
724
|
-
ConfirmTitle:
|
|
725
|
-
ConfirmMessage:
|
|
726
|
-
ConfirmActions:
|
|
727
|
-
BtnCancel:
|
|
728
|
-
BtnConfirm:
|
|
729
|
-
BtnDanger:
|
|
722
|
+
const st = "_ConfirmContainer_b00ul_1", it = "_ConfirmTitle_b00ul_17", at = "_ConfirmMessage_b00ul_25", ct = "_ConfirmActions_b00ul_32", lt = "_BtnCancel_b00ul_40", dt = "_BtnConfirm_b00ul_60", ut = "_BtnDanger_b00ul_79", B = {
|
|
723
|
+
ConfirmContainer: st,
|
|
724
|
+
ConfirmTitle: it,
|
|
725
|
+
ConfirmMessage: at,
|
|
726
|
+
ConfirmActions: ct,
|
|
727
|
+
BtnCancel: lt,
|
|
728
|
+
BtnConfirm: dt,
|
|
729
|
+
BtnDanger: ut
|
|
730
730
|
};
|
|
731
|
-
function
|
|
732
|
-
title:
|
|
733
|
-
message:
|
|
731
|
+
function Rt({
|
|
732
|
+
title: n,
|
|
733
|
+
message: e,
|
|
734
734
|
confirmLabel: o = "Confirm",
|
|
735
735
|
cancelLabel: r = "Cancel",
|
|
736
736
|
danger: i = !1,
|
|
737
737
|
onConfirm: s,
|
|
738
738
|
onClose: a
|
|
739
739
|
}) {
|
|
740
|
-
const [c,
|
|
741
|
-
function
|
|
742
|
-
|
|
743
|
-
|
|
740
|
+
const [c, _] = k(!1);
|
|
741
|
+
function u() {
|
|
742
|
+
_(!0), Promise.resolve(s()).finally(() => {
|
|
743
|
+
_(!1), a();
|
|
744
744
|
});
|
|
745
745
|
}
|
|
746
|
-
return /* @__PURE__ */
|
|
747
|
-
/* @__PURE__ */ t("h2", { className: B.ConfirmTitle, children:
|
|
748
|
-
/* @__PURE__ */ t("p", { className: B.ConfirmMessage, children:
|
|
749
|
-
/* @__PURE__ */
|
|
746
|
+
return /* @__PURE__ */ d("div", { className: B.ConfirmContainer, role: "dialog", "aria-modal": "true", children: [
|
|
747
|
+
/* @__PURE__ */ t("h2", { className: B.ConfirmTitle, children: n }),
|
|
748
|
+
/* @__PURE__ */ t("p", { className: B.ConfirmMessage, children: e }),
|
|
749
|
+
/* @__PURE__ */ d("div", { className: B.ConfirmActions, children: [
|
|
750
750
|
/* @__PURE__ */ t("button", { className: B.BtnCancel, type: "button", onClick: a, disabled: c, children: r }),
|
|
751
751
|
/* @__PURE__ */ t(
|
|
752
752
|
"button",
|
|
753
753
|
{
|
|
754
|
-
className:
|
|
754
|
+
className: f(i ? B.BtnDanger : B.BtnConfirm),
|
|
755
755
|
type: "button",
|
|
756
|
-
onClick:
|
|
756
|
+
onClick: u,
|
|
757
757
|
disabled: c,
|
|
758
758
|
children: c ? "…" : o
|
|
759
759
|
}
|
|
@@ -761,22 +761,22 @@ function Bt({
|
|
|
761
761
|
] })
|
|
762
762
|
] });
|
|
763
763
|
}
|
|
764
|
-
const
|
|
765
|
-
InfoContainer:
|
|
766
|
-
InfoTitle:
|
|
767
|
-
InfoMessage:
|
|
768
|
-
InfoActions:
|
|
769
|
-
BtnClose:
|
|
764
|
+
const _t = "_InfoContainer_1meyp_1", ft = "_InfoTitle_1meyp_17", ht = "_InfoMessage_1meyp_25", pt = "_InfoActions_1meyp_32", mt = "_BtnClose_1meyp_39", j = {
|
|
765
|
+
InfoContainer: _t,
|
|
766
|
+
InfoTitle: ft,
|
|
767
|
+
InfoMessage: ht,
|
|
768
|
+
InfoActions: pt,
|
|
769
|
+
BtnClose: mt
|
|
770
770
|
};
|
|
771
|
-
function xt({ title:
|
|
772
|
-
return /* @__PURE__ */
|
|
773
|
-
/* @__PURE__ */ t("h2", { className: j.InfoTitle, children:
|
|
774
|
-
/* @__PURE__ */ t("p", { className: j.InfoMessage, children:
|
|
771
|
+
function xt({ title: n, message: e, onClose: o }) {
|
|
772
|
+
return /* @__PURE__ */ d("div", { className: j.InfoContainer, role: "dialog", "aria-modal": "true", children: [
|
|
773
|
+
/* @__PURE__ */ t("h2", { className: j.InfoTitle, children: n }),
|
|
774
|
+
/* @__PURE__ */ t("p", { className: j.InfoMessage, children: e }),
|
|
775
775
|
/* @__PURE__ */ t("div", { className: j.InfoActions, children: /* @__PURE__ */ t("button", { className: j.BtnClose, type: "button", onClick: o, children: "Got it" }) })
|
|
776
776
|
] });
|
|
777
777
|
}
|
|
778
|
-
function
|
|
779
|
-
return /* @__PURE__ */ t("div", { className:
|
|
778
|
+
function Wt({ buttons: n, containerClassName: e }) {
|
|
779
|
+
return /* @__PURE__ */ t("div", { className: e, children: n.map((o, r) => /* @__PURE__ */ t(
|
|
780
780
|
"button",
|
|
781
781
|
{
|
|
782
782
|
className: o.className,
|
|
@@ -788,16 +788,16 @@ function Rt({ buttons: e, containerClassName: n }) {
|
|
|
788
788
|
r
|
|
789
789
|
)) });
|
|
790
790
|
}
|
|
791
|
-
function
|
|
791
|
+
function At({ onClick: n, disabled: e, className: o }) {
|
|
792
792
|
return /* @__PURE__ */ t(
|
|
793
793
|
"button",
|
|
794
794
|
{
|
|
795
795
|
className: o,
|
|
796
796
|
type: "button",
|
|
797
|
-
onClick:
|
|
798
|
-
disabled:
|
|
797
|
+
onClick: n,
|
|
798
|
+
disabled: e,
|
|
799
799
|
"aria-label": "Close",
|
|
800
|
-
children: /* @__PURE__ */
|
|
800
|
+
children: /* @__PURE__ */ d(
|
|
801
801
|
"svg",
|
|
802
802
|
{
|
|
803
803
|
viewBox: "0 0 24 24",
|
|
@@ -817,23 +817,23 @@ function Wt({ onClick: e, disabled: n, className: o }) {
|
|
|
817
817
|
);
|
|
818
818
|
}
|
|
819
819
|
export {
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
820
|
+
St as AvatarFallbackIcon,
|
|
821
|
+
Bt as Button,
|
|
822
|
+
Lt as CheckmarkIcon,
|
|
823
|
+
Jn as ChevronDownIcon,
|
|
824
|
+
Rt as ConfirmDialog,
|
|
825
|
+
Dt as Dropdown,
|
|
826
826
|
bt as EditPencilIcon,
|
|
827
827
|
xt as InfoDialog,
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
828
|
+
Nt as Input,
|
|
829
|
+
Re as Loader,
|
|
830
|
+
yt as LoadingWrapper,
|
|
831
|
+
Wt as ModalActions,
|
|
832
|
+
At as ModalClose,
|
|
833
|
+
kt as TelegramAuth,
|
|
834
|
+
$e as TelegramSignInButton,
|
|
835
|
+
It as Toaster,
|
|
836
|
+
Tt as Toggle,
|
|
837
|
+
Ee as useTelegramLogin,
|
|
838
838
|
X as useToaster
|
|
839
839
|
};
|