@vervstack/chures 0.0.19 → 0.0.20
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
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
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%);--chures-dropdown-panel-gap: .375rem;--chures-dropdown-glass-bg: rgb(255 255 255 / 6%);--chures-dropdown-glass-blur: 1.25rem;--chures-dialog-glass-bg: rgb(255 255 255 / 6%);--chures-dialog-glass-blur: 1.25rem}}@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_1uu20_1{0%{background-position:-200% 0}to{background-position:200% 0}}:where(._InputContainer_1uu20_15){position:relative;width:100%;height:var(--chures-input-height, 3rem)}:where(._InputField_1uu20_21){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}:where(._InputField_1uu20_21._hasStartIcon_1uu20_35){padding-left:2.25rem}:where(._InputField_1uu20_21._hasEndIcon_1uu20_39){padding-right:2.25rem}:where(._StartIcon_1uu20_43){position:absolute;left:.875rem;top:50%;transform:translateY(-50%);display:flex;align-items:center;color:var(--chures-fg-muted, #9ca3af);pointer-events:none}:where(._EndIcon_1uu20_54){position:absolute;right:.875rem;top:50%;transform:translateY(-50%);display:flex;align-items:center;color:var(--chures-fg-muted, #9ca3af);pointer-events:none}:where(._InputField_1uu20_21):focus{border-color:#ffffff59}:where(._hasError_1uu20_69 ._InputField_1uu20_21),:where(._hasError_1uu20_69 ._InputField_1uu20_21):focus{border-color:var(--chures-error, #ef4444)}:where(._disabled_1uu20_74 ._InputField_1uu20_21){opacity:.45;cursor:not-allowed}:where(._Label_1uu20_79){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}:where(._Label_1uu20_79._lifted_1uu20_93){top:0;transform:translateY(-50%) scale(.82);background:var(--chures-input-bg, #111111);color:var(--chures-fg-muted, #9ca3af)}:where(._hasError_1uu20_69 ._Label_1uu20_79._lifted_1uu20_93){color:var(--chures-error, #ef4444)}:where(._ErrorText_1uu20_104){display:block;margin-top:.25rem;padding-left:.875rem;font-size:var(--chures-font-xs, .75rem);color:var(--chures-error, #ef4444)}:where(._Skeleton_1uu20_112){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_1uu20_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%);--chures-dropdown-panel-gap: .375rem;--chures-dropdown-glass-bg: rgb(255 255 255 / 6%);--chures-dropdown-glass-blur: 1.25rem;--chures-dialog-glass-bg: rgb(255 255 255 / 6%);--chures-dialog-glass-blur: 1.25rem}}@keyframes _panelIn_p7cfo_1{0%{opacity:0;transform:scale(.96) translateY(6px)}to{opacity:1;transform:none}}@keyframes _shimmer_p7cfo_1{0%{background-position:-200% center}to{background-position:200% center}}._DropdownContainer_p7cfo_13{position:relative;width:100%}._PanelWrapper_p7cfo_20{position:absolute;top:calc(100% + var(--chures-dropdown-panel-gap));left:0;width:100%;animation:_panelIn_p7cfo_1 .14s ease}._PanelWrapper_p7cfo_20._Portal_p7cfo_34{position:fixed;width:auto;margin-top:var(--chures-dropdown-panel-gap)}._PanelContainer_p7cfo_18{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}._PanelContainer_p7cfo_18._Glass_p7cfo_48{background:var(--chures-dropdown-glass-bg, rgb(255 255 255 / 6%));backdrop-filter:blur(var(--chures-dropdown-glass-blur, 1.25rem));-webkit-backdrop-filter:blur(var(--chures-dropdown-glass-blur, 1.25rem))}._Label_p7cfo_54{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_p7cfo_54._lifted_p7cfo_68{top:0;transform:translateY(-50%) scale(.82);background:var(--chures-input-bg);color:var(--chures-fg-muted)}._TriggerContainer_p7cfo_75{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_p7cfo_75:hover{border-color:var(--chures-dropdown-trigger-border-hover)}._TriggerContainer_p7cfo_75._Open_p7cfo_99{border-color:var(--chures-accent);box-shadow:0 0 0 .1875rem var(--chures-dropdown-trigger-focus-ring)}._TriggerPlaceholder_p7cfo_104{color:var(--chures-fg-muted);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._TriggerValue_p7cfo_112{color:var(--chures-fg);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._TriggerIcon_p7cfo_120{color:var(--chures-fg-muted);flex-shrink:0;display:flex;align-items:center}._ChipsWrapper_p7cfo_127{display:flex;flex-wrap:nowrap;gap:.25rem;flex:1;overflow-x:auto;overflow-y:hidden;min-width:0;align-items:center;margin:.375rem 0;scrollbar-width:none;-ms-overflow-style:none}._ChipsWrapper_p7cfo_127::-webkit-scrollbar{display:none}._ChipsWrapper_p7cfo_127._Expand_p7cfo_145{flex-wrap:wrap;overflow:visible;row-gap:.25rem}._TriggerContainer_p7cfo_75._MultiSelect_p7cfo_151 ._TriggerIcon_p7cfo_120{align-self:flex-start;height:var(--chures-input-height)}._TriggerContainer_p7cfo_75._ExpandHeight_p7cfo_156{height:auto;min-height:var(--chures-input-height)}._Chip_p7cfo_127{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_p7cfo_175{padding:.5rem;border-bottom:1px solid var(--chures-dropdown-border-subtle)}._SearchBox_p7cfo_180{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_p7cfo_190{display:flex;align-items:center;color:var(--chures-fg-muted);flex-shrink:0}._SearchInput_p7cfo_197{flex:1;background:transparent;border:none;outline:none;font-size:var(--chures-font-sm);color:var(--chures-fg);font-family:inherit}._SearchInput_p7cfo_197::placeholder{color:var(--chures-fg-muted)}._ResultsList_p7cfo_211{max-height:13rem;overflow-y:auto}._OptionRow_p7cfo_216{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_p7cfo_216:hover{background:var(--chures-dropdown-hover);color:var(--chures-fg)}._OptionRow_p7cfo_216._Selected_p7cfo_231{color:var(--chures-fg)}._Checkmark_p7cfo_236{color:var(--chures-accent);font-size:var(--chures-font-xs);flex-shrink:0}._CreateRow_p7cfo_242{display:flex;align-items:center;gap:.625rem;padding:.5625rem .875rem;cursor:pointer;background:var(--chures-dropdown-create-bg);transition:background .1s ease}._CreateRow_p7cfo_242:hover{background:var(--chures-dropdown-create-bg-hover)}._CreateRow_p7cfo_242._WithBorder_p7cfo_255{border-top:1px solid var(--chures-dropdown-border-subtle)}._CreateIcon_p7cfo_260{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_p7cfo_272{font-size:var(--chures-font-sm);font-weight:600;color:var(--chures-fg)}._EmptyHint_p7cfo_278{padding:.75rem .875rem;font-size:var(--chures-font-sm);color:var(--chures-fg-muted);font-style:italic}._SkeletonRow_p7cfo_285{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_p7cfo_1 1.4s infinite linear}:where(._Btn_1tozl_10){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)}:where(._Btn_1tozl_10):disabled{opacity:.4;cursor:not-allowed}:where(._Primary_1tozl_35){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}:where(._Primary_1tozl_35):hover:not(:disabled){filter:brightness(1.06)}:where(._Secondary_1tozl_50){background:transparent;border-color:#ffffff24;color:var(--chures-fg-muted, #9ca3af)}:where(._Secondary_1tozl_50):hover:not(:disabled){color:var(--chures-fg, #ffffff);border-color:#ffffff47}:where(._Ghost_1tozl_62){background:transparent;border-color:#ffffff24;color:var(--chures-fg-muted, #9ca3af)}:where(._Ghost_1tozl_62):hover:not(:disabled){color:var(--chures-fg, #ffffff);border-color:#ffffff47}:where(._IconDanger_1tozl_74){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}:where(._IconDanger_1tozl_74):hover:not(:disabled){background:#ef44441f;color:var(--chures-error, #ef4444)}:where(._Danger_1tozl_95){background:transparent;border-color:#ef444466;color:var(--chures-error, #ef4444);transition:background .16s ease,border-color .16s ease}:where(._Danger_1tozl_95):hover:not(:disabled){background:#ef44441a;border-color:var(--chures-error, #ef4444)}._ConfirmWrapper_1tq4o_4{width:100%;max-width:24rem;animation:_confirmIn_1tq4o_1 .28s cubic-bezier(.2,.7,.2,1) both}@keyframes _confirmIn_1tq4o_1{0%{opacity:0;transform:translateY(.75rem) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}._ConfirmContainer_1tq4o_1{width:100%;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}._Glass_1tq4o_24{background:var(--chures-dialog-glass-bg, rgb(255 255 255 / 6%));backdrop-filter:blur(var(--chures-dialog-glass-blur, 1.25rem));-webkit-backdrop-filter:blur(var(--chures-dialog-glass-blur, 1.25rem))}._ConfirmTitle_1tq4o_30{font-size:1.25rem;font-weight:600;letter-spacing:-.02em;color:var(--chures-fg, #ffffff);margin-bottom:.75rem}._ConfirmMessage_1tq4o_38{font-size:.875rem;color:var(--chures-fg-muted, #9ca3af);line-height:1.5;letter-spacing:-.005em}._ConfirmActions_1tq4o_45{display:flex;align-items:center;justify-content:flex-end;gap:.625rem;margin-top:1.5rem}._BtnCancel_1tq4o_53{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_1tq4o_53:hover:not(:disabled){background:#ffffff14;color:var(--chures-fg, #ffffff)}._BtnConfirm_1tq4o_73{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_1tq4o_73:hover:not(:disabled){filter:brightness(1.06)}._BtnDanger_1tq4o_92{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_1tq4o_92:hover:not(:disabled){background:#ef44441a;border-color:var(--chures-error, #ef4444)}._BtnConfirm_1tq4o_73:disabled,._BtnDanger_1tq4o_92:disabled,._BtnCancel_1tq4o_53:disabled{opacity:.4;cursor:not-allowed}._InfoWrapper_cqv58_4{width:100%;max-width:24rem;animation:_infoIn_cqv58_1 .28s cubic-bezier(.2,.7,.2,1) both}@keyframes _infoIn_cqv58_1{0%{opacity:0;transform:translateY(.75rem) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}._InfoContainer_cqv58_1{width:100%;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}._Glass_cqv58_24{background:var(--chures-dialog-glass-bg, rgb(255 255 255 / 6%));backdrop-filter:blur(var(--chures-dialog-glass-blur, 1.25rem));-webkit-backdrop-filter:blur(var(--chures-dialog-glass-blur, 1.25rem))}._InfoTitle_cqv58_30{font-size:1.25rem;font-weight:600;letter-spacing:-.02em;color:var(--chures-fg, #ffffff);margin-bottom:.75rem}._InfoMessage_cqv58_38{font-size:.875rem;color:var(--chures-fg-muted, #9ca3af);line-height:1.5;letter-spacing:-.005em}._InfoActions_cqv58_45{display:flex;align-items:center;justify-content:flex-end;margin-top:1.5rem}._BtnClose_cqv58_52{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_cqv58_52: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 n, jsxs as u, Fragment as
|
|
3
|
-
import { createContext as
|
|
4
|
-
import { AnimatePresence as
|
|
5
|
-
import { create as
|
|
6
|
-
import { createPortal as
|
|
7
|
-
function
|
|
2
|
+
import { jsx as n, jsxs as u, Fragment as b } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as ue, useContext as _e, useRef as U, useState as k, useEffect as j, forwardRef as fe, useCallback as oe, useLayoutEffect as pe } from "react";
|
|
4
|
+
import { AnimatePresence as he, motion as me } from "framer-motion";
|
|
5
|
+
import { create as ge } from "zustand";
|
|
6
|
+
import { createPortal as Ce } from "react-dom";
|
|
7
|
+
function ve(e) {
|
|
8
8
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
9
9
|
}
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
function
|
|
13
|
-
return
|
|
10
|
+
var Z = { exports: {} };
|
|
11
|
+
var re;
|
|
12
|
+
function we() {
|
|
13
|
+
return re || (re = 1, (function(e) {
|
|
14
14
|
(function() {
|
|
15
15
|
var t = {}.hasOwnProperty;
|
|
16
16
|
function o() {
|
|
@@ -39,53 +39,53 @@ function Ce() {
|
|
|
39
39
|
}
|
|
40
40
|
e.exports ? (o.default = o, e.exports = o) : window.classNames = o;
|
|
41
41
|
})();
|
|
42
|
-
})(
|
|
43
|
-
}
|
|
44
|
-
var
|
|
45
|
-
const _ = /* @__PURE__ */
|
|
46
|
-
LoaderContainer:
|
|
47
|
-
sm:
|
|
48
|
-
md:
|
|
49
|
-
lg:
|
|
50
|
-
Arc1:
|
|
51
|
-
Arc2:
|
|
52
|
-
Arc3:
|
|
53
|
-
spin:
|
|
54
|
-
Ring1:
|
|
55
|
-
Ring2:
|
|
56
|
-
Ring3:
|
|
57
|
-
ripple:
|
|
58
|
-
Dot1:
|
|
59
|
-
Dot2:
|
|
60
|
-
Dot3:
|
|
61
|
-
dotPulse:
|
|
62
|
-
Wave1:
|
|
63
|
-
Wave2:
|
|
64
|
-
Wave3:
|
|
65
|
-
Wave4:
|
|
66
|
-
Wave5:
|
|
67
|
-
waveBounce:
|
|
68
|
-
},
|
|
42
|
+
})(Z)), Z.exports;
|
|
43
|
+
}
|
|
44
|
+
var Ie = we();
|
|
45
|
+
const _ = /* @__PURE__ */ ve(Ie), ye = "_LoaderContainer_wa8op_24", Ne = "_sm_wa8op_31", ke = "_md_wa8op_32", Se = "_lg_wa8op_33", Le = "_Arc1_wa8op_37", Te = "_Arc2_wa8op_38", xe = "_Arc3_wa8op_39", De = "_spin_wa8op_1", be = "_Ring1_wa8op_71", Be = "_Ring2_wa8op_72", Re = "_Ring3_wa8op_73", We = "_ripple_wa8op_1", Ee = "_Dot1_wa8op_86", Pe = "_Dot2_wa8op_87", Ae = "_Dot3_wa8op_88", Me = "_dotPulse_wa8op_1", Oe = "_Wave1_wa8op_105", qe = "_Wave2_wa8op_106", je = "_Wave3_wa8op_107", Ge = "_Wave4_wa8op_108", Fe = "_Wave5_wa8op_109", $e = "_waveBounce_wa8op_1", J = {
|
|
46
|
+
LoaderContainer: ye,
|
|
47
|
+
sm: Ne,
|
|
48
|
+
md: ke,
|
|
49
|
+
lg: Se,
|
|
50
|
+
Arc1: Le,
|
|
51
|
+
Arc2: Te,
|
|
52
|
+
Arc3: xe,
|
|
53
|
+
spin: De,
|
|
54
|
+
Ring1: be,
|
|
55
|
+
Ring2: Be,
|
|
56
|
+
Ring3: Re,
|
|
57
|
+
ripple: We,
|
|
58
|
+
Dot1: Ee,
|
|
59
|
+
Dot2: Pe,
|
|
60
|
+
Dot3: Ae,
|
|
61
|
+
dotPulse: Me,
|
|
62
|
+
Wave1: Oe,
|
|
63
|
+
Wave2: qe,
|
|
64
|
+
Wave3: je,
|
|
65
|
+
Wave4: Ge,
|
|
66
|
+
Wave5: Fe,
|
|
67
|
+
waveBounce: $e
|
|
68
|
+
}, ae = ue({});
|
|
69
69
|
function w(e, t) {
|
|
70
|
-
const o =
|
|
70
|
+
const o = _e(ae);
|
|
71
71
|
return t ?? o[e];
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function ze(e, t) {
|
|
74
74
|
switch (e) {
|
|
75
75
|
case "ripple":
|
|
76
|
-
return /* @__PURE__ */ u(
|
|
76
|
+
return /* @__PURE__ */ u(b, { children: [
|
|
77
77
|
/* @__PURE__ */ n("div", { className: t.Ring1 }),
|
|
78
78
|
/* @__PURE__ */ n("div", { className: t.Ring2 }),
|
|
79
79
|
/* @__PURE__ */ n("div", { className: t.Ring3 })
|
|
80
80
|
] });
|
|
81
81
|
case "dots":
|
|
82
|
-
return /* @__PURE__ */ u(
|
|
82
|
+
return /* @__PURE__ */ u(b, { children: [
|
|
83
83
|
/* @__PURE__ */ n("div", { className: t.Dot1 }),
|
|
84
84
|
/* @__PURE__ */ n("div", { className: t.Dot2 }),
|
|
85
85
|
/* @__PURE__ */ n("div", { className: t.Dot3 })
|
|
86
86
|
] });
|
|
87
87
|
case "wave":
|
|
88
|
-
return /* @__PURE__ */ u(
|
|
88
|
+
return /* @__PURE__ */ u(b, { children: [
|
|
89
89
|
/* @__PURE__ */ n("div", { className: t.Wave1 }),
|
|
90
90
|
/* @__PURE__ */ n("div", { className: t.Wave2 }),
|
|
91
91
|
/* @__PURE__ */ n("div", { className: t.Wave3 }),
|
|
@@ -93,50 +93,50 @@ function Fe(e, t) {
|
|
|
93
93
|
/* @__PURE__ */ n("div", { className: t.Wave5 })
|
|
94
94
|
] });
|
|
95
95
|
default:
|
|
96
|
-
return /* @__PURE__ */ u(
|
|
96
|
+
return /* @__PURE__ */ u(b, { children: [
|
|
97
97
|
/* @__PURE__ */ n("div", { className: t.Arc1 }),
|
|
98
98
|
/* @__PURE__ */ n("div", { className: t.Arc2 }),
|
|
99
99
|
/* @__PURE__ */ n("div", { className: t.Arc3 })
|
|
100
100
|
] });
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function He({ variant: e = "arcs", size: t = "md", color: o, className: r }) {
|
|
104
104
|
const a = w("Loader", r);
|
|
105
105
|
return /* @__PURE__ */ n(
|
|
106
106
|
"div",
|
|
107
107
|
{
|
|
108
|
-
className: _(
|
|
108
|
+
className: _(J.LoaderContainer, J[t], J[e], a),
|
|
109
109
|
role: "status",
|
|
110
110
|
"aria-label": "Loading",
|
|
111
111
|
style: o ? { "--chures-accent": o } : void 0,
|
|
112
|
-
children:
|
|
112
|
+
children: ze(e, J)
|
|
113
113
|
}
|
|
114
114
|
);
|
|
115
115
|
}
|
|
116
|
-
const
|
|
117
|
-
LoadingWrapperContainer:
|
|
118
|
-
SkeletonWrapper:
|
|
116
|
+
const Ve = "_LoadingWrapperContainer_1q0w7_1", Ue = "_SkeletonWrapper_1q0w7_9", se = {
|
|
117
|
+
LoadingWrapperContainer: Ve,
|
|
118
|
+
SkeletonWrapper: Ue
|
|
119
119
|
};
|
|
120
|
-
function
|
|
120
|
+
function Jt({ isLoading: e, children: t, skeleton: o, loaderProps: r, className: a }) {
|
|
121
121
|
const s = w("LoadingWrapper", a);
|
|
122
|
-
return e ? o ? /* @__PURE__ */ n("div", { className: _(
|
|
122
|
+
return e ? o ? /* @__PURE__ */ n("div", { className: _(se.SkeletonWrapper, s), children: o }) : /* @__PURE__ */ n("div", { className: _(se.LoadingWrapperContainer, s), children: /* @__PURE__ */ n(He, { ...r }) }) : /* @__PURE__ */ n(b, { children: t });
|
|
123
123
|
}
|
|
124
|
-
const
|
|
125
|
-
function
|
|
126
|
-
const { botId: t, redirectUri: o, requestAccess: r = "write" } = e, a =
|
|
124
|
+
const Ke = "https://oauth.telegram.org/js/telegram-login.js?3";
|
|
125
|
+
function Qe(e) {
|
|
126
|
+
const { botId: t, redirectUri: o, requestAccess: r = "write" } = e, a = U(e.onSuccess);
|
|
127
127
|
a.current = e.onSuccess;
|
|
128
|
-
const s =
|
|
129
|
-
|
|
128
|
+
const s = U(!1), [c, i] = k(!1), [p, d] = k(!1);
|
|
129
|
+
j(function() {
|
|
130
130
|
if (!t) return;
|
|
131
131
|
const m = o ?? window.location.origin;
|
|
132
132
|
d(!0), i(!1);
|
|
133
133
|
const g = document.createElement("script");
|
|
134
|
-
return g.src =
|
|
135
|
-
const
|
|
136
|
-
|
|
134
|
+
return g.src = Ke, g.async = !0, g.onload = function() {
|
|
135
|
+
const I = window.Telegram;
|
|
136
|
+
I && (I.Login.init(
|
|
137
137
|
{ client_id: t, redirect_uri: m },
|
|
138
|
-
function(
|
|
139
|
-
s.current || (s.current = !0, a.current(
|
|
138
|
+
function(B) {
|
|
139
|
+
s.current || (s.current = !0, a.current(B));
|
|
140
140
|
}
|
|
141
141
|
), i(!0)), d(!1);
|
|
142
142
|
}, g.onerror = function() {
|
|
@@ -152,22 +152,22 @@ function Ue(e) {
|
|
|
152
152
|
const g = o ?? window.location.origin;
|
|
153
153
|
m.Login.auth(
|
|
154
154
|
{ client_id: t, redirect_uri: g, request_access: r },
|
|
155
|
-
function(
|
|
156
|
-
s.current || (s.current = !0, a.current(
|
|
155
|
+
function(I) {
|
|
156
|
+
s.current || (s.current = !0, a.current(I));
|
|
157
157
|
}
|
|
158
158
|
);
|
|
159
159
|
}
|
|
160
|
-
return { login: h, isReady: c, isLoading:
|
|
160
|
+
return { login: h, isReady: c, isLoading: p };
|
|
161
161
|
}
|
|
162
|
-
const
|
|
163
|
-
TelegramSignInButtonContainer:
|
|
164
|
-
FullSize:
|
|
165
|
-
Icon:
|
|
166
|
-
},
|
|
162
|
+
const Je = "_TelegramSignInButtonContainer_10wun_1", Xe = "_FullSize_10wun_46", Ye = "_Icon_10wun_50", ee = {
|
|
163
|
+
TelegramSignInButtonContainer: Je,
|
|
164
|
+
FullSize: Xe,
|
|
165
|
+
Icon: Ye
|
|
166
|
+
}, Ze = {
|
|
167
167
|
en: "Continue with Telegram",
|
|
168
168
|
ru: "Войти через Telegram"
|
|
169
169
|
};
|
|
170
|
-
function
|
|
170
|
+
function en() {
|
|
171
171
|
return /* @__PURE__ */ n(
|
|
172
172
|
"svg",
|
|
173
173
|
{
|
|
@@ -176,12 +176,12 @@ function Ye() {
|
|
|
176
176
|
height: "20",
|
|
177
177
|
fill: "currentColor",
|
|
178
178
|
"aria-hidden": "true",
|
|
179
|
-
className:
|
|
179
|
+
className: ee.Icon,
|
|
180
180
|
children: /* @__PURE__ */ n("path", { d: "M22 3.5L2.5 11l5 1.7L18 6 9.7 14l-.4 5.5 3.4-3.2 5.5 4c.9.5 1.5.2 1.7-.8L22 4.3c.2-.7-.2-1.1-.9-.8z" })
|
|
181
181
|
}
|
|
182
182
|
);
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function nn({
|
|
185
185
|
onClick: e,
|
|
186
186
|
disabled: t,
|
|
187
187
|
lang: o = "en",
|
|
@@ -190,19 +190,19 @@ function Ze({
|
|
|
190
190
|
fullSize: s,
|
|
191
191
|
className: c
|
|
192
192
|
}) {
|
|
193
|
-
|
|
193
|
+
j(function() {
|
|
194
194
|
const h = "comfortaa-font";
|
|
195
195
|
if (document.getElementById(h)) return;
|
|
196
196
|
const m = document.createElement("link");
|
|
197
197
|
m.id = h, m.rel = "stylesheet", m.href = "https://fonts.googleapis.com/css2?family=Comfortaa:wght@600&display=swap", document.head.appendChild(m);
|
|
198
198
|
}, []);
|
|
199
|
-
const i = a ?? r ??
|
|
199
|
+
const i = a ?? r ?? Ze[o], p = w("TelegramSignInButton", c), d = _(ee.TelegramSignInButtonContainer, { [ee.FullSize]: s }, p);
|
|
200
200
|
return /* @__PURE__ */ u("button", { type: "button", className: d, onClick: e, disabled: t, children: [
|
|
201
|
-
/* @__PURE__ */ n(
|
|
201
|
+
/* @__PURE__ */ n(en, {}),
|
|
202
202
|
i
|
|
203
203
|
] });
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function Xt({
|
|
206
206
|
botId: e,
|
|
207
207
|
onSuccess: t,
|
|
208
208
|
lang: o,
|
|
@@ -212,11 +212,11 @@ function Qt({
|
|
|
212
212
|
children: c,
|
|
213
213
|
className: i
|
|
214
214
|
}) {
|
|
215
|
-
const { login:
|
|
216
|
-
return c ? /* @__PURE__ */ n(
|
|
217
|
-
|
|
215
|
+
const { login: p, isReady: d } = Qe({ botId: e, onSuccess: t, redirectUri: a, requestAccess: s });
|
|
216
|
+
return c ? /* @__PURE__ */ n(b, { children: c({ login: p, isReady: d }) }) : /* @__PURE__ */ n(
|
|
217
|
+
nn,
|
|
218
218
|
{
|
|
219
|
-
onClick:
|
|
219
|
+
onClick: p,
|
|
220
220
|
disabled: !d,
|
|
221
221
|
lang: o,
|
|
222
222
|
title: r,
|
|
@@ -224,11 +224,11 @@ function Qt({
|
|
|
224
224
|
}
|
|
225
225
|
);
|
|
226
226
|
}
|
|
227
|
-
let
|
|
228
|
-
const
|
|
227
|
+
let tn = 0;
|
|
228
|
+
const ce = ge((e, t) => ({
|
|
229
229
|
toasts: [],
|
|
230
230
|
bake: (o) => {
|
|
231
|
-
const r =
|
|
231
|
+
const r = tn++;
|
|
232
232
|
e((a) => ({ toasts: [...a.toasts, { ...o, id: r }] })), setTimeout(() => {
|
|
233
233
|
t().dismiss(r);
|
|
234
234
|
}, 5e3);
|
|
@@ -238,132 +238,132 @@ const se = he((e, t) => ({
|
|
|
238
238
|
toasts: r.toasts.filter((a) => a.id !== o)
|
|
239
239
|
}));
|
|
240
240
|
}
|
|
241
|
-
})),
|
|
242
|
-
ToastContainer:
|
|
243
|
-
Toast:
|
|
244
|
-
error:
|
|
245
|
-
warn:
|
|
246
|
-
info:
|
|
247
|
-
Description:
|
|
248
|
-
DismissButton:
|
|
249
|
-
slideIn:
|
|
250
|
-
slideOut:
|
|
241
|
+
})), on = "_ToastContainer_1tme2_1", rn = "_Toast_1tme2_1", sn = "_error_1tme2_33", an = "_warn_1tme2_41", cn = "_info_1tme2_49", ln = "_Description_1tme2_53", dn = "_DismissButton_1tme2_59", un = "_slideIn_1tme2_79", _n = "_slideOut_1tme2_83", L = {
|
|
242
|
+
ToastContainer: on,
|
|
243
|
+
Toast: rn,
|
|
244
|
+
error: sn,
|
|
245
|
+
warn: an,
|
|
246
|
+
info: cn,
|
|
247
|
+
Description: ln,
|
|
248
|
+
DismissButton: dn,
|
|
249
|
+
slideIn: un,
|
|
250
|
+
slideOut: _n
|
|
251
251
|
};
|
|
252
|
-
function
|
|
253
|
-
const { toasts: t } =
|
|
254
|
-
return /* @__PURE__ */ n("div", { className: _(
|
|
255
|
-
|
|
252
|
+
function Yt({ className: e } = {}) {
|
|
253
|
+
const { toasts: t } = ce(), o = w("Toaster", e);
|
|
254
|
+
return /* @__PURE__ */ n("div", { className: _(L.ToastContainer, o), children: /* @__PURE__ */ n(he, { children: t.map((r) => /* @__PURE__ */ n(
|
|
255
|
+
me.div,
|
|
256
256
|
{
|
|
257
257
|
layout: !0,
|
|
258
258
|
initial: { opacity: 0, x: 100, y: 50 },
|
|
259
259
|
animate: { opacity: 1, x: 0, y: 0 },
|
|
260
260
|
exit: { opacity: 0, y: -50 },
|
|
261
261
|
transition: { type: "spring", stiffness: 300, damping: 20 },
|
|
262
|
-
children: /* @__PURE__ */ n(
|
|
262
|
+
children: /* @__PURE__ */ n(fn, { ...r })
|
|
263
263
|
},
|
|
264
264
|
r.id
|
|
265
265
|
)) }) });
|
|
266
266
|
}
|
|
267
|
-
function
|
|
268
|
-
const [s, c] =
|
|
269
|
-
return
|
|
267
|
+
function fn({ id: e, title: t, description: o, level: r, isDismissable: a }) {
|
|
268
|
+
const [s, c] = k(!1), i = ce();
|
|
269
|
+
return j(() => () => {
|
|
270
270
|
c(!0);
|
|
271
271
|
}, []), /* @__PURE__ */ u(
|
|
272
272
|
"div",
|
|
273
273
|
{
|
|
274
|
-
className: _(
|
|
275
|
-
[
|
|
276
|
-
[
|
|
277
|
-
[
|
|
278
|
-
[
|
|
279
|
-
[
|
|
274
|
+
className: _(L.Toast, {
|
|
275
|
+
[L.error]: r === "Error",
|
|
276
|
+
[L.warn]: r === "Warn",
|
|
277
|
+
[L.info]: r == null || r === "Info",
|
|
278
|
+
[L.slideIn]: !s,
|
|
279
|
+
[L.slideOut]: s
|
|
280
280
|
}),
|
|
281
281
|
children: [
|
|
282
282
|
/* @__PURE__ */ n("div", { children: t }),
|
|
283
|
-
/* @__PURE__ */ n("div", { className:
|
|
284
|
-
a && e !== void 0 && /* @__PURE__ */ n("div", { className:
|
|
283
|
+
/* @__PURE__ */ n("div", { className: L.Description, children: o }),
|
|
284
|
+
a && e !== void 0 && /* @__PURE__ */ n("div", { className: L.DismissButton, onClick: () => i.dismiss(e), children: "×" })
|
|
285
285
|
]
|
|
286
286
|
}
|
|
287
287
|
);
|
|
288
288
|
}
|
|
289
|
-
const
|
|
290
|
-
InputContainer:
|
|
291
|
-
InputField:
|
|
292
|
-
hasStartIcon:
|
|
293
|
-
hasEndIcon:
|
|
294
|
-
StartIcon:
|
|
295
|
-
EndIcon:
|
|
296
|
-
hasError:
|
|
297
|
-
disabled:
|
|
298
|
-
Label:
|
|
299
|
-
lifted:
|
|
300
|
-
ErrorText:
|
|
301
|
-
Skeleton:
|
|
302
|
-
},
|
|
303
|
-
const [
|
|
304
|
-
return a ? /* @__PURE__ */ n("div", { className: _(v.Skeleton,
|
|
289
|
+
const pn = "_InputContainer_1uu20_15", hn = "_InputField_1uu20_21", mn = "_hasStartIcon_1uu20_35", gn = "_hasEndIcon_1uu20_39", Cn = "_StartIcon_1uu20_43", vn = "_EndIcon_1uu20_54", wn = "_hasError_1uu20_69", In = "_disabled_1uu20_74", yn = "_Label_1uu20_79", Nn = "_lifted_1uu20_93", kn = "_ErrorText_1uu20_104", Sn = "_Skeleton_1uu20_112", v = {
|
|
290
|
+
InputContainer: pn,
|
|
291
|
+
InputField: hn,
|
|
292
|
+
hasStartIcon: mn,
|
|
293
|
+
hasEndIcon: gn,
|
|
294
|
+
StartIcon: Cn,
|
|
295
|
+
EndIcon: vn,
|
|
296
|
+
hasError: wn,
|
|
297
|
+
disabled: In,
|
|
298
|
+
Label: yn,
|
|
299
|
+
lifted: Nn,
|
|
300
|
+
ErrorText: kn,
|
|
301
|
+
Skeleton: Sn
|
|
302
|
+
}, Zt = fe(function({ value: t, setValue: o, label: r, isLoader: a, type: s = "text", disabled: c, error: i, className: p, inputClassName: d, startIcon: h, endIcon: m, ...g }, I) {
|
|
303
|
+
const [B, R] = k(!1), G = B || t.length > 0, T = w("Input", p), { onFocus: F, onBlur: M, ...y } = g;
|
|
304
|
+
return a ? /* @__PURE__ */ n("div", { className: _(v.Skeleton, T), "aria-hidden": "true" }) : /* @__PURE__ */ u("div", { className: _(v.InputContainer, { [v.hasError]: !!i, [v.disabled]: c }, T), children: [
|
|
305
305
|
h && /* @__PURE__ */ n("span", { className: v.StartIcon, children: h }),
|
|
306
306
|
/* @__PURE__ */ n(
|
|
307
307
|
"input",
|
|
308
308
|
{
|
|
309
|
-
ref:
|
|
309
|
+
ref: I,
|
|
310
310
|
className: _(v.InputField, { [v.hasStartIcon]: !!h, [v.hasEndIcon]: !!m }, d),
|
|
311
311
|
type: s,
|
|
312
312
|
value: t,
|
|
313
|
-
onChange: (
|
|
314
|
-
onFocus: (
|
|
315
|
-
|
|
313
|
+
onChange: (C) => o(C.target.value),
|
|
314
|
+
onFocus: (C) => {
|
|
315
|
+
R(!0), F?.(C);
|
|
316
316
|
},
|
|
317
|
-
onBlur: (
|
|
318
|
-
|
|
317
|
+
onBlur: (C) => {
|
|
318
|
+
R(!1), M?.(C);
|
|
319
319
|
},
|
|
320
320
|
disabled: c,
|
|
321
|
-
...
|
|
321
|
+
...y
|
|
322
322
|
}
|
|
323
323
|
),
|
|
324
|
-
r && /* @__PURE__ */ n("label", { className: _(v.Label, { [v.lifted]:
|
|
324
|
+
r && /* @__PURE__ */ n("label", { className: _(v.Label, { [v.lifted]: G }), children: r }),
|
|
325
325
|
m && /* @__PURE__ */ n("span", { className: v.EndIcon, children: m }),
|
|
326
326
|
i && /* @__PURE__ */ n("span", { className: v.ErrorText, children: i })
|
|
327
327
|
] });
|
|
328
|
-
}),
|
|
329
|
-
ToggleContainer:
|
|
330
|
-
disabled:
|
|
331
|
-
Track:
|
|
332
|
-
on:
|
|
333
|
-
Thumb:
|
|
334
|
-
Label:
|
|
335
|
-
LabelSkeleton:
|
|
336
|
-
Skeleton:
|
|
328
|
+
}), Ln = "_ToggleContainer_1jetc_6", Tn = "_disabled_1jetc_13", xn = "_Track_1jetc_18", Dn = "_on_1jetc_31", bn = "_Thumb_1jetc_39", Bn = "_Label_1jetc_57", Rn = "_LabelSkeleton_1jetc_63", Wn = "_Skeleton_1jetc_78", N = {
|
|
329
|
+
ToggleContainer: Ln,
|
|
330
|
+
disabled: Tn,
|
|
331
|
+
Track: xn,
|
|
332
|
+
on: Dn,
|
|
333
|
+
Thumb: bn,
|
|
334
|
+
Label: Bn,
|
|
335
|
+
LabelSkeleton: Rn,
|
|
336
|
+
Skeleton: Wn
|
|
337
337
|
};
|
|
338
|
-
function
|
|
339
|
-
const
|
|
340
|
-
return s ?
|
|
338
|
+
function eo({ checked: e, onChange: t, label: o, labelPosition: r = "right", disabled: a, isLoader: s, isLoadingLabel: c, className: i }) {
|
|
339
|
+
const p = !!o || c, d = w("Toggle", i), h = c ? /* @__PURE__ */ n("span", { className: N.LabelSkeleton, "aria-hidden": "true" }) : o ? /* @__PURE__ */ n("span", { className: N.Label, children: o }) : null;
|
|
340
|
+
return s ? p ? /* @__PURE__ */ u("div", { className: _(N.ToggleContainer, d), children: [
|
|
341
341
|
r === "left" && h,
|
|
342
|
-
/* @__PURE__ */ n("div", { className:
|
|
342
|
+
/* @__PURE__ */ n("div", { className: N.Skeleton, "aria-hidden": "true" }),
|
|
343
343
|
r === "right" && h
|
|
344
|
-
] }) : /* @__PURE__ */ n("div", { className: _(
|
|
344
|
+
] }) : /* @__PURE__ */ n("div", { className: _(N.Skeleton, d), "aria-hidden": "true" }) : /* @__PURE__ */ u("label", { className: _(N.ToggleContainer, { [N.disabled]: a }, d), children: [
|
|
345
345
|
r === "left" && h,
|
|
346
346
|
/* @__PURE__ */ n(
|
|
347
347
|
"button",
|
|
348
348
|
{
|
|
349
349
|
role: "switch",
|
|
350
350
|
"aria-checked": e,
|
|
351
|
-
className: _(
|
|
351
|
+
className: _(N.Track, { [N.on]: e }),
|
|
352
352
|
onClick: () => !a && t(!e),
|
|
353
353
|
disabled: a,
|
|
354
354
|
type: "button",
|
|
355
|
-
children: /* @__PURE__ */ n("span", { className:
|
|
355
|
+
children: /* @__PURE__ */ n("span", { className: N.Thumb })
|
|
356
356
|
}
|
|
357
357
|
),
|
|
358
358
|
r === "right" && h
|
|
359
359
|
] });
|
|
360
360
|
}
|
|
361
|
-
function
|
|
362
|
-
const [e, t] =
|
|
361
|
+
function En() {
|
|
362
|
+
const [e, t] = k(!1), o = U(null), r = oe(() => t((s) => !s), []), a = oe(() => t(!1), []);
|
|
363
363
|
return { isOpen: e, triggerRef: o, toggleOpen: r, close: a };
|
|
364
364
|
}
|
|
365
|
-
function
|
|
366
|
-
|
|
365
|
+
function Pn(e, t, o) {
|
|
366
|
+
j(() => {
|
|
367
367
|
function r(s) {
|
|
368
368
|
const c = s.target;
|
|
369
369
|
e.current?.contains(c) || o?.current?.contains(c) || t();
|
|
@@ -376,9 +376,9 @@ function Wn(e, t, o) {
|
|
|
376
376
|
};
|
|
377
377
|
}, [t, e, o]);
|
|
378
378
|
}
|
|
379
|
-
function
|
|
380
|
-
const [o, r] =
|
|
381
|
-
return
|
|
379
|
+
function An(e, t) {
|
|
380
|
+
const [o, r] = k([]);
|
|
381
|
+
return j(() => {
|
|
382
382
|
if (!t) return;
|
|
383
383
|
let a = !1;
|
|
384
384
|
return t(e).then((s) => {
|
|
@@ -388,49 +388,49 @@ function En(e, t) {
|
|
|
388
388
|
};
|
|
389
389
|
}, [e, t]), o;
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function A(e) {
|
|
392
392
|
return typeof e == "string" ? e : e.id;
|
|
393
393
|
}
|
|
394
|
-
function
|
|
394
|
+
function X(e) {
|
|
395
395
|
return typeof e == "string" ? e : e.name;
|
|
396
396
|
}
|
|
397
|
-
function
|
|
398
|
-
return e.map((o) => t.find((r) =>
|
|
399
|
-
}
|
|
400
|
-
const
|
|
401
|
-
DropdownContainer:
|
|
402
|
-
PanelWrapper:
|
|
403
|
-
Portal:
|
|
404
|
-
PanelContainer:
|
|
405
|
-
Glass:
|
|
406
|
-
Label:
|
|
407
|
-
lifted:
|
|
408
|
-
TriggerContainer:
|
|
409
|
-
Open:
|
|
410
|
-
TriggerPlaceholder:
|
|
411
|
-
TriggerValue:
|
|
412
|
-
TriggerIcon:
|
|
413
|
-
ChipsWrapper:
|
|
414
|
-
Expand:
|
|
415
|
-
MultiSelect:
|
|
416
|
-
ExpandHeight:
|
|
417
|
-
Chip:
|
|
418
|
-
SearchRow:
|
|
419
|
-
SearchBox:
|
|
420
|
-
SearchIcon:
|
|
421
|
-
SearchInput:
|
|
422
|
-
ResultsList:
|
|
423
|
-
OptionRow:
|
|
424
|
-
Selected:
|
|
425
|
-
Checkmark:
|
|
426
|
-
CreateRow:
|
|
427
|
-
WithBorder:
|
|
428
|
-
CreateIcon:
|
|
429
|
-
CreateLabel:
|
|
430
|
-
EmptyHint:
|
|
431
|
-
SkeletonRow:
|
|
397
|
+
function Mn(e, t) {
|
|
398
|
+
return e.map((o) => t.find((r) => A(r) === o) ?? o);
|
|
399
|
+
}
|
|
400
|
+
const On = "_DropdownContainer_p7cfo_13", qn = "_PanelWrapper_p7cfo_20", jn = "_Portal_p7cfo_34", Gn = "_PanelContainer_p7cfo_18", Fn = "_Glass_p7cfo_48", $n = "_Label_p7cfo_54", zn = "_lifted_p7cfo_68", Hn = "_TriggerContainer_p7cfo_75", Vn = "_Open_p7cfo_99", Un = "_TriggerPlaceholder_p7cfo_104", Kn = "_TriggerValue_p7cfo_112", Qn = "_TriggerIcon_p7cfo_120", Jn = "_ChipsWrapper_p7cfo_127", Xn = "_Expand_p7cfo_145", Yn = "_MultiSelect_p7cfo_151", Zn = "_ExpandHeight_p7cfo_156", et = "_Chip_p7cfo_127", nt = "_SearchRow_p7cfo_175", tt = "_SearchBox_p7cfo_180", ot = "_SearchIcon_p7cfo_190", rt = "_SearchInput_p7cfo_197", st = "_ResultsList_p7cfo_211", at = "_OptionRow_p7cfo_216", ct = "_Selected_p7cfo_231", it = "_Checkmark_p7cfo_236", lt = "_CreateRow_p7cfo_242", dt = "_WithBorder_p7cfo_255", ut = "_CreateIcon_p7cfo_260", _t = "_CreateLabel_p7cfo_272", ft = "_EmptyHint_p7cfo_278", pt = "_SkeletonRow_p7cfo_285", l = {
|
|
401
|
+
DropdownContainer: On,
|
|
402
|
+
PanelWrapper: qn,
|
|
403
|
+
Portal: jn,
|
|
404
|
+
PanelContainer: Gn,
|
|
405
|
+
Glass: Fn,
|
|
406
|
+
Label: $n,
|
|
407
|
+
lifted: zn,
|
|
408
|
+
TriggerContainer: Hn,
|
|
409
|
+
Open: Vn,
|
|
410
|
+
TriggerPlaceholder: Un,
|
|
411
|
+
TriggerValue: Kn,
|
|
412
|
+
TriggerIcon: Qn,
|
|
413
|
+
ChipsWrapper: Jn,
|
|
414
|
+
Expand: Xn,
|
|
415
|
+
MultiSelect: Yn,
|
|
416
|
+
ExpandHeight: Zn,
|
|
417
|
+
Chip: et,
|
|
418
|
+
SearchRow: nt,
|
|
419
|
+
SearchBox: tt,
|
|
420
|
+
SearchIcon: ot,
|
|
421
|
+
SearchInput: rt,
|
|
422
|
+
ResultsList: st,
|
|
423
|
+
OptionRow: at,
|
|
424
|
+
Selected: ct,
|
|
425
|
+
Checkmark: it,
|
|
426
|
+
CreateRow: lt,
|
|
427
|
+
WithBorder: dt,
|
|
428
|
+
CreateIcon: ut,
|
|
429
|
+
CreateLabel: _t,
|
|
430
|
+
EmptyHint: ft,
|
|
431
|
+
SkeletonRow: pt
|
|
432
432
|
};
|
|
433
|
-
function
|
|
433
|
+
function ht({ query: e, withBorder: t, onCreate: o }) {
|
|
434
434
|
function r(a) {
|
|
435
435
|
a.preventDefault(), o();
|
|
436
436
|
}
|
|
@@ -453,7 +453,7 @@ function pt({ query: e, withBorder: t, onCreate: o }) {
|
|
|
453
453
|
}
|
|
454
454
|
);
|
|
455
455
|
}
|
|
456
|
-
function
|
|
456
|
+
function mt({ opt: e, isSelected: t, multiSelect: o, onPick: r }) {
|
|
457
457
|
function a(s) {
|
|
458
458
|
s.preventDefault(), r(e);
|
|
459
459
|
}
|
|
@@ -464,12 +464,12 @@ function ft({ opt: e, isSelected: t, multiSelect: o, onPick: r }) {
|
|
|
464
464
|
onMouseDown: a,
|
|
465
465
|
children: [
|
|
466
466
|
o && t && /* @__PURE__ */ n("span", { className: l.Checkmark, children: "✓" }),
|
|
467
|
-
|
|
467
|
+
X(e)
|
|
468
468
|
]
|
|
469
469
|
}
|
|
470
470
|
);
|
|
471
471
|
}
|
|
472
|
-
function
|
|
472
|
+
function gt({ inputRef: e, query: t, onChange: o, onKeyDown: r, placeholder: a }) {
|
|
473
473
|
return /* @__PURE__ */ n("div", { className: l.SearchRow, children: /* @__PURE__ */ u("div", { className: l.SearchBox, children: [
|
|
474
474
|
/* @__PURE__ */ n("span", { className: l.SearchIcon, children: /* @__PURE__ */ u("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", children: [
|
|
475
475
|
/* @__PURE__ */ n("circle", { cx: "5", cy: "5", r: "3.5" }),
|
|
@@ -488,10 +488,10 @@ function ht({ inputRef: e, query: t, onChange: o, onKeyDown: r, placeholder: a }
|
|
|
488
488
|
)
|
|
489
489
|
] }) });
|
|
490
490
|
}
|
|
491
|
-
function
|
|
492
|
-
return /* @__PURE__ */ n(
|
|
491
|
+
function Ct({ count: e }) {
|
|
492
|
+
return /* @__PURE__ */ n(b, { children: Array.from({ length: e }).map((t, o) => /* @__PURE__ */ n("div", { className: l.SkeletonRow }, o)) });
|
|
493
493
|
}
|
|
494
|
-
function
|
|
494
|
+
function vt({
|
|
495
495
|
onSearch: e,
|
|
496
496
|
onCreate: t,
|
|
497
497
|
onPick: o,
|
|
@@ -500,93 +500,96 @@ function gt({
|
|
|
500
500
|
placeholder: s,
|
|
501
501
|
options: c = [],
|
|
502
502
|
excluded: i = [],
|
|
503
|
-
selected:
|
|
503
|
+
selected: p = [],
|
|
504
504
|
multiSelect: d = !1,
|
|
505
505
|
selectedAtTop: h = !1,
|
|
506
506
|
isLoading: m = !1,
|
|
507
507
|
emptyHint: g = "no results found",
|
|
508
|
-
skeletonRowCount:
|
|
509
|
-
onError:
|
|
510
|
-
glass:
|
|
508
|
+
skeletonRowCount: I = 4,
|
|
509
|
+
onError: B = console.error,
|
|
510
|
+
glass: R = !1,
|
|
511
|
+
portal: G = !1
|
|
511
512
|
}) {
|
|
512
|
-
const [
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
513
|
+
const [T, F] = k(""), [M, y] = k(!1), [C, $] = k(null), z = U(null), K = U(null), W = !!e, Q = An(T, e);
|
|
514
|
+
Pn(K, r, a);
|
|
515
|
+
const x = R || G;
|
|
516
|
+
pe(() => {
|
|
517
|
+
if (!x) return;
|
|
518
|
+
function f() {
|
|
519
|
+
a?.current && $(a.current.getBoundingClientRect());
|
|
517
520
|
}
|
|
518
|
-
return
|
|
519
|
-
window.removeEventListener("scroll",
|
|
521
|
+
return f(), window.addEventListener("scroll", f, !0), window.addEventListener("resize", f), () => {
|
|
522
|
+
window.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f);
|
|
520
523
|
};
|
|
521
|
-
}, [
|
|
522
|
-
|
|
523
|
-
}, [
|
|
524
|
-
const
|
|
525
|
-
(
|
|
524
|
+
}, [x, a]), j(() => {
|
|
525
|
+
W && z.current?.focus();
|
|
526
|
+
}, [W]);
|
|
527
|
+
const H = (e ? Q : c).filter(
|
|
528
|
+
(f) => !i.includes(A(f))
|
|
526
529
|
), D = h ? [
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
] :
|
|
530
|
-
(
|
|
531
|
-
),
|
|
532
|
-
async function
|
|
533
|
-
!
|
|
530
|
+
...H.filter((f) => p.includes(A(f))),
|
|
531
|
+
...H.filter((f) => !p.includes(A(f)))
|
|
532
|
+
] : H, E = T.trim(), O = D.some(
|
|
533
|
+
(f) => X(f).toLowerCase() === E.toLowerCase()
|
|
534
|
+
), V = !!t && E.length > 0 && !O;
|
|
535
|
+
async function ne() {
|
|
536
|
+
!E || M || !t || (y(!0), t(E).then(Y).catch(B).finally(() => y(!1)));
|
|
534
537
|
}
|
|
535
|
-
function
|
|
536
|
-
o(
|
|
538
|
+
function Y(f) {
|
|
539
|
+
o(f), d || r();
|
|
537
540
|
}
|
|
538
|
-
function
|
|
539
|
-
|
|
541
|
+
function ie(f) {
|
|
542
|
+
F(f.target.value);
|
|
540
543
|
}
|
|
541
|
-
function
|
|
542
|
-
|
|
544
|
+
function le(f) {
|
|
545
|
+
f.key === "Enter" && (f.preventDefault(), D.length > 0 ? Y(D[0]) : V && ne());
|
|
543
546
|
}
|
|
544
|
-
const
|
|
545
|
-
if (
|
|
546
|
-
const
|
|
547
|
+
const de = s ?? (t ? "search or add new…" : "search…");
|
|
548
|
+
if (x && !C) return null;
|
|
549
|
+
const te = /* @__PURE__ */ n(
|
|
547
550
|
"div",
|
|
548
551
|
{
|
|
549
|
-
ref:
|
|
550
|
-
className: _(l.PanelWrapper, { [l.Portal]:
|
|
551
|
-
style:
|
|
552
|
-
children: /* @__PURE__ */ u("div", { className: _(l.PanelContainer, { [l.Glass]:
|
|
553
|
-
|
|
554
|
-
|
|
552
|
+
ref: K,
|
|
553
|
+
className: _(l.PanelWrapper, { [l.Portal]: x }),
|
|
554
|
+
style: x && C ? { top: C.bottom, left: C.left, width: C.width } : void 0,
|
|
555
|
+
children: /* @__PURE__ */ u("div", { className: _(l.PanelContainer, { [l.Glass]: R }), children: [
|
|
556
|
+
W && /* @__PURE__ */ n(
|
|
557
|
+
gt,
|
|
555
558
|
{
|
|
556
|
-
inputRef:
|
|
557
|
-
query:
|
|
558
|
-
onChange:
|
|
559
|
-
onKeyDown:
|
|
560
|
-
placeholder:
|
|
559
|
+
inputRef: z,
|
|
560
|
+
query: T,
|
|
561
|
+
onChange: ie,
|
|
562
|
+
onKeyDown: le,
|
|
563
|
+
placeholder: de
|
|
561
564
|
}
|
|
562
565
|
),
|
|
563
|
-
/* @__PURE__ */ n("div", { className: l.ResultsList, children: m ? /* @__PURE__ */ n(
|
|
564
|
-
D.map((
|
|
565
|
-
|
|
566
|
+
/* @__PURE__ */ n("div", { className: l.ResultsList, children: m ? /* @__PURE__ */ n(Ct, { count: I }) : /* @__PURE__ */ u(b, { children: [
|
|
567
|
+
D.map((f) => /* @__PURE__ */ n(
|
|
568
|
+
mt,
|
|
566
569
|
{
|
|
567
|
-
opt:
|
|
568
|
-
isSelected:
|
|
570
|
+
opt: f,
|
|
571
|
+
isSelected: p.includes(A(f)),
|
|
569
572
|
multiSelect: d,
|
|
570
|
-
onPick:
|
|
573
|
+
onPick: Y
|
|
571
574
|
},
|
|
572
|
-
|
|
575
|
+
A(f)
|
|
573
576
|
)),
|
|
574
|
-
|
|
575
|
-
|
|
577
|
+
V && /* @__PURE__ */ n(
|
|
578
|
+
ht,
|
|
576
579
|
{
|
|
577
|
-
query:
|
|
580
|
+
query: E,
|
|
578
581
|
withBorder: D.length > 0,
|
|
579
|
-
onCreate:
|
|
582
|
+
onCreate: ne
|
|
580
583
|
}
|
|
581
584
|
),
|
|
582
|
-
D.length === 0 && !
|
|
585
|
+
D.length === 0 && !V && /* @__PURE__ */ n("div", { className: l.EmptyHint, children: g })
|
|
583
586
|
] }) })
|
|
584
587
|
] })
|
|
585
588
|
}
|
|
586
589
|
);
|
|
587
|
-
return
|
|
590
|
+
return x ? Ce(te, document.body) : te;
|
|
588
591
|
}
|
|
589
|
-
function
|
|
592
|
+
function wt({ size: e = 14, strokeWidth: t = 2, className: o }) {
|
|
590
593
|
return /* @__PURE__ */ n(
|
|
591
594
|
"svg",
|
|
592
595
|
{
|
|
@@ -603,7 +606,7 @@ function Ct({ size: e = 14, strokeWidth: t = 2, className: o }) {
|
|
|
603
606
|
}
|
|
604
607
|
);
|
|
605
608
|
}
|
|
606
|
-
function
|
|
609
|
+
function no({ size: e = 18, strokeWidth: t = 2.5, shrink: o = !0 }) {
|
|
607
610
|
return /* @__PURE__ */ n(
|
|
608
611
|
"svg",
|
|
609
612
|
{
|
|
@@ -620,7 +623,7 @@ function Zt({ size: e = 18, strokeWidth: t = 2.5, shrink: o = !0 }) {
|
|
|
620
623
|
}
|
|
621
624
|
);
|
|
622
625
|
}
|
|
623
|
-
function
|
|
626
|
+
function to() {
|
|
624
627
|
return /* @__PURE__ */ u(
|
|
625
628
|
"svg",
|
|
626
629
|
{
|
|
@@ -639,7 +642,7 @@ function eo() {
|
|
|
639
642
|
}
|
|
640
643
|
);
|
|
641
644
|
}
|
|
642
|
-
function
|
|
645
|
+
function oo() {
|
|
643
646
|
return /* @__PURE__ */ u(
|
|
644
647
|
"svg",
|
|
645
648
|
{
|
|
@@ -658,7 +661,7 @@ function no() {
|
|
|
658
661
|
}
|
|
659
662
|
);
|
|
660
663
|
}
|
|
661
|
-
function
|
|
664
|
+
function ro({ size: e = 14, strokeWidth: t = 2, className: o }) {
|
|
662
665
|
return /* @__PURE__ */ u(
|
|
663
666
|
"svg",
|
|
664
667
|
{
|
|
@@ -678,7 +681,7 @@ function to({ size: e = 14, strokeWidth: t = 2, className: o }) {
|
|
|
678
681
|
}
|
|
679
682
|
);
|
|
680
683
|
}
|
|
681
|
-
function
|
|
684
|
+
function It({ triggerRef: e, isOpen: t, onClick: o, selectedOptions: r, multiSelect: a, placeholder: s, onOverflow: c = "scroll" }) {
|
|
682
685
|
const i = c === "expand";
|
|
683
686
|
return /* @__PURE__ */ u(
|
|
684
687
|
"button",
|
|
@@ -695,13 +698,13 @@ function vt({ triggerRef: e, isOpen: t, onClick: o, selectedOptions: r, multiSel
|
|
|
695
698
|
"aria-expanded": t,
|
|
696
699
|
"aria-haspopup": "listbox",
|
|
697
700
|
children: [
|
|
698
|
-
a && r.length > 0 ? /* @__PURE__ */ n("div", { className: _(l.ChipsWrapper, i && l.Expand), children: r.map((
|
|
699
|
-
/* @__PURE__ */ n("span", { className: l.TriggerIcon, children: /* @__PURE__ */ n(
|
|
701
|
+
a && r.length > 0 ? /* @__PURE__ */ n("div", { className: _(l.ChipsWrapper, i && l.Expand), children: r.map((p, d) => /* @__PURE__ */ n("span", { className: l.Chip, children: X(p) }, d)) }) : /* @__PURE__ */ n("span", { className: r.length === 0 ? l.TriggerPlaceholder : l.TriggerValue, children: r.length === 0 ? s : r.map(X).join(", ") }),
|
|
702
|
+
/* @__PURE__ */ n("span", { className: l.TriggerIcon, children: /* @__PURE__ */ n(wt, { size: 12 }) })
|
|
700
703
|
]
|
|
701
704
|
}
|
|
702
705
|
);
|
|
703
706
|
}
|
|
704
|
-
function
|
|
707
|
+
function so({
|
|
705
708
|
options: e = [],
|
|
706
709
|
value: t,
|
|
707
710
|
onChange: o,
|
|
@@ -710,106 +713,108 @@ function oo({
|
|
|
710
713
|
excluded: s,
|
|
711
714
|
multiSelect: c = !1,
|
|
712
715
|
selectedAtTop: i = !1,
|
|
713
|
-
onOverflow:
|
|
716
|
+
onOverflow: p = "scroll",
|
|
714
717
|
label: d,
|
|
715
718
|
placeholder: h = "select…",
|
|
716
719
|
searchPlaceholder: m,
|
|
717
720
|
emptyHint: g,
|
|
718
|
-
isLoading:
|
|
719
|
-
skeletonRowCount:
|
|
720
|
-
onError:
|
|
721
|
-
className:
|
|
722
|
-
glass:
|
|
723
|
-
|
|
721
|
+
isLoading: I,
|
|
722
|
+
skeletonRowCount: B,
|
|
723
|
+
onError: R,
|
|
724
|
+
className: G,
|
|
725
|
+
glass: T = !1,
|
|
726
|
+
portal: F = !1,
|
|
727
|
+
children: M
|
|
724
728
|
}) {
|
|
725
|
-
const { isOpen:
|
|
726
|
-
function
|
|
727
|
-
const
|
|
729
|
+
const { isOpen: y, triggerRef: C, toggleOpen: $, close: z } = En(), K = w("Dropdown", G), W = Mn(t, e), Q = y || W.length > 0, x = d && !Q ? "" : h;
|
|
730
|
+
function H(E) {
|
|
731
|
+
const O = A(E);
|
|
728
732
|
o(
|
|
729
|
-
c ? t.includes(
|
|
733
|
+
c ? t.includes(O) ? t.filter((V) => V !== O) : [...t, O] : [O]
|
|
730
734
|
);
|
|
731
735
|
}
|
|
732
|
-
const
|
|
733
|
-
ref:
|
|
734
|
-
onClick:
|
|
735
|
-
"aria-expanded":
|
|
736
|
+
const D = {
|
|
737
|
+
ref: C,
|
|
738
|
+
onClick: $,
|
|
739
|
+
"aria-expanded": y,
|
|
736
740
|
"aria-haspopup": "listbox"
|
|
737
741
|
};
|
|
738
|
-
return /* @__PURE__ */ u("div", { className: _(l.DropdownContainer,
|
|
739
|
-
d && /* @__PURE__ */ n("label", { className: _(l.Label, { [l.lifted]:
|
|
740
|
-
|
|
741
|
-
|
|
742
|
+
return /* @__PURE__ */ u("div", { className: _(l.DropdownContainer, K), children: [
|
|
743
|
+
d && /* @__PURE__ */ n("label", { className: _(l.Label, { [l.lifted]: Q }), children: d }),
|
|
744
|
+
M ? M({ selectedOptions: W, isOpen: y, toggleOpen: $, close: z, triggerProps: D }) : /* @__PURE__ */ n(
|
|
745
|
+
It,
|
|
742
746
|
{
|
|
743
|
-
triggerRef:
|
|
744
|
-
isOpen:
|
|
745
|
-
onClick:
|
|
746
|
-
selectedOptions:
|
|
747
|
+
triggerRef: C,
|
|
748
|
+
isOpen: y,
|
|
749
|
+
onClick: $,
|
|
750
|
+
selectedOptions: W,
|
|
747
751
|
multiSelect: c,
|
|
748
|
-
onOverflow:
|
|
749
|
-
placeholder:
|
|
752
|
+
onOverflow: p,
|
|
753
|
+
placeholder: x
|
|
750
754
|
}
|
|
751
755
|
),
|
|
752
|
-
|
|
753
|
-
|
|
756
|
+
y && /* @__PURE__ */ n(
|
|
757
|
+
vt,
|
|
754
758
|
{
|
|
755
759
|
options: e,
|
|
756
760
|
onSearch: r,
|
|
757
761
|
onCreate: a,
|
|
758
|
-
onPick:
|
|
759
|
-
onClose:
|
|
760
|
-
anchorRef:
|
|
762
|
+
onPick: H,
|
|
763
|
+
onClose: z,
|
|
764
|
+
anchorRef: C,
|
|
761
765
|
excluded: s,
|
|
762
766
|
multiSelect: c,
|
|
763
767
|
selectedAtTop: i,
|
|
764
768
|
selected: t,
|
|
765
769
|
placeholder: m,
|
|
766
770
|
emptyHint: g,
|
|
767
|
-
isLoading:
|
|
768
|
-
skeletonRowCount:
|
|
769
|
-
onError:
|
|
770
|
-
glass:
|
|
771
|
+
isLoading: I,
|
|
772
|
+
skeletonRowCount: B,
|
|
773
|
+
onError: R,
|
|
774
|
+
glass: T,
|
|
775
|
+
portal: F
|
|
771
776
|
}
|
|
772
777
|
)
|
|
773
778
|
] });
|
|
774
779
|
}
|
|
775
|
-
const
|
|
776
|
-
Btn:
|
|
777
|
-
Primary:
|
|
778
|
-
Secondary:
|
|
779
|
-
Ghost:
|
|
780
|
-
IconDanger:
|
|
781
|
-
Danger:
|
|
782
|
-
},
|
|
783
|
-
primary:
|
|
784
|
-
secondary:
|
|
785
|
-
danger:
|
|
786
|
-
ghost:
|
|
787
|
-
iconDanger:
|
|
780
|
+
const yt = "_Btn_1tozl_10", Nt = "_Primary_1tozl_35", kt = "_Secondary_1tozl_50", St = "_Ghost_1tozl_62", Lt = "_IconDanger_1tozl_74", Tt = "_Danger_1tozl_95", q = {
|
|
781
|
+
Btn: yt,
|
|
782
|
+
Primary: Nt,
|
|
783
|
+
Secondary: kt,
|
|
784
|
+
Ghost: St,
|
|
785
|
+
IconDanger: Lt,
|
|
786
|
+
Danger: Tt
|
|
787
|
+
}, xt = {
|
|
788
|
+
primary: q.Primary,
|
|
789
|
+
secondary: q.Secondary,
|
|
790
|
+
danger: q.Danger,
|
|
791
|
+
ghost: q.Ghost,
|
|
792
|
+
iconDanger: q.IconDanger
|
|
788
793
|
};
|
|
789
|
-
function
|
|
794
|
+
function ao({ variant: e = "default", className: t, children: o, ...r }) {
|
|
790
795
|
const a = w("Button", t), s = e === "unstyled";
|
|
791
796
|
return /* @__PURE__ */ n(
|
|
792
797
|
"button",
|
|
793
798
|
{
|
|
794
799
|
type: "button",
|
|
795
800
|
...r,
|
|
796
|
-
className: _(!s &&
|
|
801
|
+
className: _(!s && q.Btn, !s && xt[e], a),
|
|
797
802
|
children: o
|
|
798
803
|
}
|
|
799
804
|
);
|
|
800
805
|
}
|
|
801
|
-
const
|
|
802
|
-
ConfirmWrapper:
|
|
803
|
-
ConfirmContainer:
|
|
804
|
-
Glass:
|
|
805
|
-
ConfirmTitle:
|
|
806
|
-
ConfirmMessage:
|
|
807
|
-
ConfirmActions:
|
|
808
|
-
BtnCancel:
|
|
809
|
-
BtnConfirm:
|
|
810
|
-
BtnDanger:
|
|
806
|
+
const Dt = "_ConfirmWrapper_1tq4o_4", bt = "_ConfirmContainer_1tq4o_1", Bt = "_Glass_1tq4o_24", Rt = "_ConfirmTitle_1tq4o_30", Wt = "_ConfirmMessage_1tq4o_38", Et = "_ConfirmActions_1tq4o_45", Pt = "_BtnCancel_1tq4o_53", At = "_BtnConfirm_1tq4o_73", Mt = "_BtnDanger_1tq4o_92", S = {
|
|
807
|
+
ConfirmWrapper: Dt,
|
|
808
|
+
ConfirmContainer: bt,
|
|
809
|
+
Glass: Bt,
|
|
810
|
+
ConfirmTitle: Rt,
|
|
811
|
+
ConfirmMessage: Wt,
|
|
812
|
+
ConfirmActions: Et,
|
|
813
|
+
BtnCancel: Pt,
|
|
814
|
+
BtnConfirm: At,
|
|
815
|
+
BtnDanger: Mt
|
|
811
816
|
};
|
|
812
|
-
function
|
|
817
|
+
function co({
|
|
813
818
|
title: e,
|
|
814
819
|
message: t,
|
|
815
820
|
confirmLabel: o = "Confirm",
|
|
@@ -818,23 +823,23 @@ function so({
|
|
|
818
823
|
onConfirm: s,
|
|
819
824
|
onClose: c,
|
|
820
825
|
className: i,
|
|
821
|
-
glass:
|
|
826
|
+
glass: p = !1
|
|
822
827
|
}) {
|
|
823
|
-
const [d, h] =
|
|
828
|
+
const [d, h] = k(!1), m = w("ConfirmDialog", i);
|
|
824
829
|
function g() {
|
|
825
830
|
h(!0), Promise.resolve(s()).finally(() => {
|
|
826
831
|
h(!1), c();
|
|
827
832
|
});
|
|
828
833
|
}
|
|
829
|
-
return /* @__PURE__ */ n("div", { className:
|
|
830
|
-
/* @__PURE__ */ n("h2", { className:
|
|
831
|
-
/* @__PURE__ */ n("p", { className:
|
|
832
|
-
/* @__PURE__ */ u("div", { className:
|
|
833
|
-
/* @__PURE__ */ n("button", { className:
|
|
834
|
+
return /* @__PURE__ */ n("div", { className: S.ConfirmWrapper, children: /* @__PURE__ */ u("div", { className: _(S.ConfirmContainer, { [S.Glass]: p }, m), role: "dialog", "aria-modal": "true", children: [
|
|
835
|
+
/* @__PURE__ */ n("h2", { className: S.ConfirmTitle, children: e }),
|
|
836
|
+
/* @__PURE__ */ n("p", { className: S.ConfirmMessage, children: t }),
|
|
837
|
+
/* @__PURE__ */ u("div", { className: S.ConfirmActions, children: [
|
|
838
|
+
/* @__PURE__ */ n("button", { className: S.BtnCancel, type: "button", onClick: c, disabled: d, children: r }),
|
|
834
839
|
/* @__PURE__ */ n(
|
|
835
840
|
"button",
|
|
836
841
|
{
|
|
837
|
-
className: _(a ?
|
|
842
|
+
className: _(a ? S.BtnDanger : S.BtnConfirm),
|
|
838
843
|
type: "button",
|
|
839
844
|
onClick: g,
|
|
840
845
|
disabled: d,
|
|
@@ -844,24 +849,24 @@ function so({
|
|
|
844
849
|
] })
|
|
845
850
|
] }) });
|
|
846
851
|
}
|
|
847
|
-
const
|
|
848
|
-
InfoWrapper:
|
|
849
|
-
InfoContainer:
|
|
850
|
-
Glass:
|
|
851
|
-
InfoTitle:
|
|
852
|
-
InfoMessage:
|
|
853
|
-
InfoActions:
|
|
854
|
-
BtnClose:
|
|
852
|
+
const Ot = "_InfoWrapper_cqv58_4", qt = "_InfoContainer_cqv58_1", jt = "_Glass_cqv58_24", Gt = "_InfoTitle_cqv58_30", Ft = "_InfoMessage_cqv58_38", $t = "_InfoActions_cqv58_45", zt = "_BtnClose_cqv58_52", P = {
|
|
853
|
+
InfoWrapper: Ot,
|
|
854
|
+
InfoContainer: qt,
|
|
855
|
+
Glass: jt,
|
|
856
|
+
InfoTitle: Gt,
|
|
857
|
+
InfoMessage: Ft,
|
|
858
|
+
InfoActions: $t,
|
|
859
|
+
BtnClose: zt
|
|
855
860
|
};
|
|
856
|
-
function
|
|
861
|
+
function io({ title: e, message: t, onClose: o, className: r, glass: a = !1 }) {
|
|
857
862
|
const s = w("InfoDialog", r);
|
|
858
|
-
return /* @__PURE__ */ n("div", { className:
|
|
859
|
-
/* @__PURE__ */ n("h2", { className:
|
|
860
|
-
/* @__PURE__ */ n("p", { className:
|
|
861
|
-
/* @__PURE__ */ n("div", { className:
|
|
863
|
+
return /* @__PURE__ */ n("div", { className: P.InfoWrapper, children: /* @__PURE__ */ u("div", { className: _(P.InfoContainer, { [P.Glass]: a }, s), role: "dialog", "aria-modal": "true", children: [
|
|
864
|
+
/* @__PURE__ */ n("h2", { className: P.InfoTitle, children: e }),
|
|
865
|
+
/* @__PURE__ */ n("p", { className: P.InfoMessage, children: t }),
|
|
866
|
+
/* @__PURE__ */ n("div", { className: P.InfoActions, children: /* @__PURE__ */ n("button", { className: P.BtnClose, type: "button", onClick: o, children: "Got it" }) })
|
|
862
867
|
] }) });
|
|
863
868
|
}
|
|
864
|
-
function
|
|
869
|
+
function lo({ buttons: e, containerClassName: t }) {
|
|
865
870
|
const o = w("ModalActions", t);
|
|
866
871
|
return /* @__PURE__ */ n("div", { className: o, children: e.map((r, a) => /* @__PURE__ */ n(
|
|
867
872
|
"button",
|
|
@@ -875,7 +880,7 @@ function co({ buttons: e, containerClassName: t }) {
|
|
|
875
880
|
a
|
|
876
881
|
)) });
|
|
877
882
|
}
|
|
878
|
-
function
|
|
883
|
+
function uo({ onClick: e, disabled: t, className: o }) {
|
|
879
884
|
const r = w("ModalClose", o);
|
|
880
885
|
return /* @__PURE__ */ n(
|
|
881
886
|
"button",
|
|
@@ -904,30 +909,30 @@ function io({ onClick: e, disabled: t, className: o }) {
|
|
|
904
909
|
}
|
|
905
910
|
);
|
|
906
911
|
}
|
|
907
|
-
function
|
|
908
|
-
return /* @__PURE__ */ n(
|
|
912
|
+
function _o({ classNames: e, children: t }) {
|
|
913
|
+
return /* @__PURE__ */ n(ae.Provider, { value: e, children: t });
|
|
909
914
|
}
|
|
910
915
|
export {
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
916
|
+
oo as AvatarFallbackIcon,
|
|
917
|
+
ao as Button,
|
|
918
|
+
no as CheckmarkIcon,
|
|
919
|
+
wt as ChevronDownIcon,
|
|
920
|
+
_o as ChuresConfigProvider,
|
|
921
|
+
co as ConfirmDialog,
|
|
922
|
+
so as Dropdown,
|
|
923
|
+
to as EditPencilIcon,
|
|
924
|
+
io as InfoDialog,
|
|
925
|
+
Zt as Input,
|
|
926
|
+
He as Loader,
|
|
927
|
+
Jt as LoadingWrapper,
|
|
928
|
+
lo as ModalActions,
|
|
929
|
+
uo as ModalClose,
|
|
930
|
+
ro as SearchIcon,
|
|
931
|
+
Xt as TelegramAuth,
|
|
932
|
+
nn as TelegramSignInButton,
|
|
933
|
+
Yt as Toaster,
|
|
934
|
+
eo as Toggle,
|
|
930
935
|
w as useComponentClassName,
|
|
931
|
-
|
|
932
|
-
|
|
936
|
+
Qe as useTelegramLogin,
|
|
937
|
+
ce as useToaster
|
|
933
938
|
};
|