intelicoreact 2.0.22 → 2.0.24
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/Atomic/FormElements/InputDateRange/InputDateRange.interface.d.ts +7 -0
- package/dist/Molecular/FilterChip/model/types.d.ts +4 -1
- package/dist/Molecular/FilterChip/model/values.d.ts +7 -3
- package/dist/css/filter-chip.css +1 -1
- package/dist/es/Atomic/FormElements/InputDateRange/components/OpenedPart.js +31 -10
- package/dist/es/Atomic/FormElements/InputDateRange/components/OpenedPart.js.map +1 -1
- package/dist/es/Molecular/FilterChip/FilterChip.js +11 -2
- package/dist/es/Molecular/FilterChip/FilterChip.js.map +1 -1
- package/dist/es/Molecular/FilterChip/FilterChip.styles.css +9 -0
- package/dist/es/Molecular/FilterChip/model/values.js +20 -28
- package/dist/es/Molecular/FilterChip/model/values.js.map +1 -1
- package/dist/intelicoreact.css +1 -1
- package/package.json +1 -1
|
@@ -117,6 +117,8 @@ export interface IOpenedPartProps extends IUniProps {
|
|
|
117
117
|
withMobileLogic?: boolean;
|
|
118
118
|
isDoNotPullOutListOfMainContainer?: IDropdownProps['isDoNotPullOutListOfMainContainer'];
|
|
119
119
|
renderIntervals?: string[];
|
|
120
|
+
/** Пресет только выбирается (подсвечивается, его даты — в календаре), период применяется кнопкой Apply. */
|
|
121
|
+
isApplyRequired?: boolean;
|
|
120
122
|
}
|
|
121
123
|
/** Что получает свой триггер (renderTrigger). */
|
|
122
124
|
export interface IInputDateRangeTriggerApi {
|
|
@@ -159,4 +161,9 @@ export interface IInputDateRangeProps extends IUniProps {
|
|
|
159
161
|
onOpenChange?: (isOpen: boolean) => void;
|
|
160
162
|
/** Свой триггер вместо поля с периодом и стрелками (например, чип-фильтр). Раскрытая часть остаётся прежней. */
|
|
161
163
|
renderTrigger?: (api: IInputDateRangeTriggerApi) => ReactNode;
|
|
164
|
+
/**
|
|
165
|
+
* Новый период применяется только кнопкой Apply: клик по пресету выбирает его и показывает его даты в календаре,
|
|
166
|
+
* Cancel и клик снаружи оставляют прежний период. Без него — как раньше: пресет применяется сразу.
|
|
167
|
+
*/
|
|
168
|
+
isApplyRequired?: boolean;
|
|
162
169
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
export type FilterKind = 'list' | 'tags' | 'range' | 'choice' | 'date';
|
|
3
3
|
export type OptionValue = string | number;
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* Список значений. `values` — выбор в порядке добавления; полностью выбранная группа — ещё и ключом в `groups`
|
|
6
|
+
* (FIN-15293). В прежнем формате значения такой группы в `values` не входили — он читается так же.
|
|
7
|
+
*/
|
|
5
8
|
export interface ListFilterValue {
|
|
6
9
|
op: 'any' | 'none';
|
|
7
10
|
values: OptionValue[];
|
|
@@ -18,11 +18,15 @@ export interface RangeCheck {
|
|
|
18
18
|
*/
|
|
19
19
|
export declare function checkRange(field: FilterFieldDef, value: RangeFilterValue, texts: FilterChipTexts, lastEdited?: 'min' | 'max'): RangeCheck;
|
|
20
20
|
export declare function isValidValue(field: FilterFieldDef, value: FilterValue | undefined): boolean;
|
|
21
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* Все выбранные значения в порядке добавления (FIN-15293): `values` — как их выбирали (целая группа добавляется
|
|
23
|
+
* в порядке списка), затем значения полностью выбранных групп, которых в `values` нет: добавленные в группу позже
|
|
24
|
+
* и сохранённые в прежнем формате, где значения группы в `values` не входили.
|
|
25
|
+
*/
|
|
22
26
|
export declare function expandListSelection(field: FilterFieldDef, value: ListFilterValue): OptionValue[];
|
|
23
27
|
/**
|
|
24
|
-
* Обратно в формат хранения (US-5):
|
|
25
|
-
*
|
|
28
|
+
* Обратно в формат хранения (US-5): `values` — весь выбор в порядке добавления (FIN-15293), полностью выбранная
|
|
29
|
+
* группа ещё и ключом в `groups` — значение, добавленное в группу позже, попадёт в фильтр автоматически.
|
|
26
30
|
*/
|
|
27
31
|
export declare function normalizeListSelection(field: FilterFieldDef, selected: OptionValue[], op: ListFilterValue['op']): ListFilterValue;
|
|
28
32
|
export interface ChipToken {
|
package/dist/css/filter-chip.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:export{primaryColor:#3f51b5;secondaryColor:#f50057;successColor:#4caf50;warningColor:#ff9800;errorColor:#f44336;infoColor:#2196f3;backgroundColor:#fff;textColor:#212121;textSecondaryColor:#757575}.dropdown{position:relative;display:flex;overflow:hidden;flex-wrap:nowrap;justify-content:flex-start;align-items:center;width:100%;border:1px solid #e2e5ec;border-radius:4px;background:#fff}.dropdown--focused{border-color:#6b81dd;filter:drop-shadow(0 0 4px rgba(93, 120, 255, 0.5))}.dropdown--with-custom-trigger{border:none !important;background:none !important;filter:none !important}.dropdown--with-actions{border-top-right-radius:0;border-bottom-right-radius:0}.dropdown__actions{display:flex;overflow:hidden;justify-content:center;align-items:center;align-self:stretch;box-sizing:border-box;min-width:56px;border-radius:0px 2px 2px 0px}.dropdown__actions-item{display:flex;justify-content:center;align-items:center;align-self:stretch;gap:4px;box-sizing:border-box;min-width:28px;height:100%;padding:4px;cursor:pointer;border-left:1px solid var(--Border-Input, #e2e5ec);background:var(--Background-Light-action, #f4f6ff)}.dropdown__actions svg{width:16px;height:16px;color:#1e1e2d}.dropdown__container{position:fixed;z-index:99999;display:block;box-sizing:border-box}.dropdown__trigger{position:relative;display:block;align-items:center;box-sizing:border-box;width:100%;height:28px;font-weight:400;cursor:pointer;text-align:left;border:none !important;filter:none}.dropdown__trigger .text{overflow:hidden;max-width:calc(100% - 5px);padding:0 16px 0 8px;white-space:nowrap;text-overflow:ellipsis}.dropdown__trigger.error{border-color:#f06d8d}.dropdown__trigger.placeholder .text{opacity:.7}.dropdown__trigger input{box-sizing:border-box}.dropdown__input{width:100%;height:16px;padding:0 16px 0 8px;font-weight:400;text-overflow:ellipsis;border:none;background:none}.dropdown__list{position:relative;z-index:6;top:100%;overflow-y:auto;box-sizing:border-box;min-width:100%;max-height:320px;padding:4px 0}.dropdown__list-wrapper{position:relative;z-index:6;top:100%;box-sizing:border-box;margin-top:4px;border:1px solid #e2e5ec;background:#fff;box-shadow:0 5px 20px rgba(0,0,0,.15)}.dropdown__list-header{display:none}.dropdown__list::-webkit-scrollbar{width:4px}.dropdown__list::-webkit-scrollbar-track{background:rgba(0,0,0,0)}.dropdown__list::-webkit-scrollbar-thumb{border-radius:4px;background:#9aa0b9}.dropdown__list-top{top:auto;bottom:calc(100% + 4px);box-shadow:0 -3px 10px rgba(0,0,0,.15)}.dropdown__list-item{position:relative;display:flex;overflow:hidden;align-items:center;width:100%;min-height:24px;padding:0 20px 0 30px;font-size:13px;font-weight:400;line-height:24px;cursor:pointer;white-space:nowrap;color:#1e1e2d;border:none;background:rgba(0,0,0,0)}.dropdown__list-item-label{text-align:left;white-space:wrap}.dropdown__list-item-description{margin-left:4px;color:#757f8c}.dropdown__list-item--modal{position:relative;width:100%;font-size:14px;line-height:20px;text-align:left;letter-spacing:.2px;color:#1f7499}.dropdown__list-item--modal::after{position:absolute;bottom:-2px;width:300%;height:1px;content:"";background-color:#e8e9ec;transform:translateX(-50%)}.dropdown__list-item--no-options{box-sizing:border-box}.dropdown__list-item:hover,.dropdown__list-item_active{background:#f2f2f8}.dropdown__list-item_disabled{pointer-events:none;opacity:.3}.dropdown__list-item-postfix{margin-left:4px}.dropdown__list--with-label{top:45px}.dropdown__arrow{position:absolute;top:50%;right:4px;display:flex;align-items:center;width:16px;height:16px;transform:translate(0, -50%)}.dropdown__arrow svg{width:16px;height:16px}.dropdown__active-icon{position:absolute;top:0;bottom:0;left:9px;display:none;align-items:center;margin:auto}.dropdown__active-icon_active{display:flex}.dropdown__active-icon_active svg{width:16px;height:16px}.dropdown-group{margin-top:10px}.dropdown-group__name{margin-bottom:6px;margin-left:17px;font-size:10px;text-transform:uppercase;color:#9aa0b9}.dropdown-label{margin-bottom:4px}.dropdown__error{position:absolute;top:50px;left:2px;display:block;font-size:10px;color:#f06d8d}.dropdown__footer{position:relative;z-index:2;display:flex;justify-content:space-between;align-items:center;box-sizing:border-box;width:100%;height:30px;padding:4px 32px 6px;background:#f8fbff}.dropdown.disabled{pointer-events:none;opacity:.5}@keyframes slideup{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@media(max-width: 768px),screen and (max-width: 1024px)and (orientation: landscape){.dropdown-mobile .dropdown__arrow{top:50% !important;right:16px !important;width:16px;height:16px;text-align:center;transform:translateY(-50%) rotate(90deg) !important}.dropdown-mobile .dropdown__arrow svg.mobile-icon{position:relative !important;top:5px !important;right:unset !important;display:flex;height:12px}.dropdown-mobile .dropdown__container{overflow:hidden !important}.dropdown-mobile .dropdown__container--opened{position:fixed;top:0 !important;left:0 !important;width:100dvw;height:100dvh;max-height:100dvh;background:rgba(23,29,51,.5);animation-name:fadeIn;animation-duration:.25s;animation-timing-function:ease;animation-fill-mode:forwards}.dropdown-mobile .dropdown__container-wrapper{position:fixed;top:0 !important;left:0 !important;overflow:hidden !important;box-sizing:border-box;width:100dvw;height:100dvh;max-height:100dvh;padding:8px;animation-name:slideup;animation-duration:.4s}.dropdown-mobile .dropdown__list{top:0;padding:16px !important}.dropdown-mobile .dropdown__list-wrapper{position:sticky;bottom:0;overflow:hidden;box-sizing:border-box;max-height:500px;border-radius:24px !important}.dropdown-mobile .dropdown__list-wrapper--with-bottom-shadow::after{position:absolute;z-index:6;bottom:0;width:100%;height:15px;content:"";opacity:1;background:linear-gradient(180deg, rgba(212, 218, 230, 0.5) 0%, rgba(212, 218, 230, 0.3) 21.35%, rgba(247, 248, 250, 0) 100%);transition:all .2s;transform:rotate(180deg)}.dropdown-mobile .dropdown__list-wrapper--with-bottom-shadow-hidden::after{opacity:0}.dropdown-mobile .dropdown__list-wrapper--fixed-height{height:500px !important}.dropdown-mobile .dropdown__list-header{position:relative;display:flex;flex-direction:column;justify-content:space-between;gap:16px;padding:16px;font-size:16px;font-weight:600;line-height:24px;letter-spacing:.1px;color:#3b414b}.dropdown-mobile .dropdown__list-header-row{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;min-height:24px}.dropdown-mobile .dropdown__list-header-row:first-child{padding-right:50px}.dropdown-mobile .dropdown__list-header-row .input__wrap{display:flex;align-items:center;width:100%;padding-right:8px;border:1px solid var(--form-input-border, #e1e8f1);border-radius:6px;background:var(--black-bg-color, #f8fbff) !important}.dropdown-mobile .dropdown__list-header-row .input__wrap input{background:unset !important}.dropdown-mobile .dropdown__list-header-row .input__close{display:flex;align-items:center;box-sizing:border-box;width:24px;min-width:24px;height:24px;padding:4px;border-radius:2px;background:var(--bg-gray-box, #f0f1f4)}.dropdown-mobile .dropdown__list-header-row .input__close::before,.dropdown-mobile .dropdown__list-header-row .input__close::after{top:50%;height:12px;border-radius:8px;background-color:#171d33;transform:translateY(-50%) rotate(45deg)}.dropdown-mobile .dropdown__list-header-row .input__close::after{transform:translateY(-50%) rotate(-45deg)}.dropdown-mobile .dropdown__list-header-with-shadow::after{position:absolute;z-index:10;bottom:-15px;left:0;width:100%;height:15px;content:"";opacity:1;background:linear-gradient(180deg, rgba(212, 218, 230, 0.5) 0%, rgba(212, 218, 230, 0.3) 21.35%, rgba(247, 248, 250, 0) 100%);transition:all .2s}.dropdown-mobile .dropdown__list-header-with-shadow-hidden::after{opacity:0}.dropdown-mobile .dropdown__list-close-icon{position:absolute;top:0;right:0;display:flex;justify-content:center;align-items:center;box-sizing:border-box;width:50px;height:50px;padding:16px}.dropdown-mobile .dropdown__list-close-icon svg{width:16px;height:16px;color:#a0a4b0}.dropdown-mobile .dropdown-group{margin:0 0 4px}.dropdown-mobile .dropdown-group:last-child{margin-bottom:16px}.dropdown-mobile .dropdown-group__name{margin:0 0 8px;padding:10px 0px 6px;font-size:11px;border-bottom:1px solid rgba(58,72,122,.15)}.dropdown-mobile .dropdown__list-item{display:flex;justify-content:space-between;height:auto !important;padding:10px 8px !important;line-height:24px}.dropdown-mobile .dropdown__list-item-label{white-space:wrap !important}.dropdown-mobile .dropdown__list-item-label span.bg--yellow{font-weight:600;background-color:unset !important}.dropdown-mobile .dropdown__list-item_active{border-radius:6px;background:var(--bg-gray-box, #f0f1f4) !important}.dropdown-mobile .dropdown__footer{position:absolute;z-index:4;bottom:0;display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;box-sizing:border-box;height:unset;padding:0;border:none;background:none}.dropdown-mobile .dropdown__footer-with-shadow::after{position:absolute;top:-15px;bottom:0;left:0;width:100%;height:15px;content:"";opacity:1;background:linear-gradient(180deg, rgba(212, 218, 230, 0.5) 0%, rgba(212, 218, 230, 0.3) 21.35%, rgba(247, 248, 250, 0) 100%);transition:all .2s;transform:rotate(180deg)}.dropdown-mobile .dropdown__footer-with-shadow-hidden::after{opacity:0}.dropdown-mobile .dropdown__footer button{box-sizing:border-box;width:100%;padding:8px 16px}}.dropdown-loader-box{position:absolute;z-index:100;opacity:.1;background:#fff;top:0;left:0;width:100%;height:100%}.lds-ring{position:relative;display:inline-block;width:100px;height:100px}.lds-ring.lds-ring_little{width:20px;height:20px}.lds-ring div{position:absolute;display:block;box-sizing:border-box;width:84px;height:84px;margin:8px;border:8px solid #000;border-color:#000 rgba(0,0,0,0) rgba(0,0,0,0);border-radius:50%;animation:lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite}.lds-ring_little div{width:20px;height:20px}.lds-ring div:nth-child(1){animation-delay:-0.45s}.lds-ring div:nth-child(2){animation-delay:-0.3s}.lds-ring div:nth-child(3){animation-delay:-0.15s}@keyframes lds-ring{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.date-range-input{--input-height: 28px;--label-line-height: 16px;--border-color: #e2e5ec;--calendar-range-point-color: #6b81dd;--font-family: roboto, sans-serif;--font-size: 13px;--line-height: 20px;--border-radius: 3px;position:relative;z-index:1}.date-range-input input::-webkit-outer-spin-button,.date-range-input input::-webkit-inner-spin-button{appearance:none}.date-range-input__label{margin-bottom:2px;font-family:var(--font-family);font-size:var(--font-size);line-height:var(--label-line-height)}.date-range-input__wraper{position:relative;box-sizing:border-box;width:100%;height:100%}.date-range-input__absolut-wraper{position:relative;z-index:1;display:flex;flex-flow:column nowrap;justify-content:flex-start;align-items:flex-start;width:100%;height:fit-content;background:rgba(0,0,0,0)}.date-range-input__absolut-wraper_right-position{right:0;left:auto}.date-range-input__static-part{display:flex;flex-flow:row nowrap;justify-content:flex-end;align-items:flex-start;box-sizing:border-box;width:100%;height:var(--input-height);border:1px solid var(--border-color);border-radius:var(--border-radius);background:#fff}.date-range-input_focused{z-index:2}.date-range-input_focused .date-range-input__static-part{border:1px solid blue;filter:drop-shadow(0 0 4px rgba(93, 120, 255, 0.5))}.date-range-input__toggle-button{display:flex;flex-direction:row;flex-flow:row nowrap;justify-content:flex-start;align-items:center;width:100%;height:100%;padding:0 10px;cursor:pointer}.date-range-input__interval-key{display:inline-block;margin-right:5px;text-align:left;white-space:nowrap;text-transform:capitalize;pointer-events:none}.date-range-input__range{display:flex;flex-flow:row wrap;justify-content:flex-start;align-items:center;word-wrap:break-word;pointer-events:none}.date-range-input__range-text{display:inline-block}.date-range-input__range-text:first-of-type{margin-right:5px}.date-range-input__range-text_little{font-size:calc(var(--font-size) - 2px)}.date-range-input__arrows-block{display:flex;flex-flow:row nowrap;justify-content:flex-start;align-items:center;box-sizing:border-box;width:fit-content;height:100%}.date-range-input__arrow{box-sizing:border-box;height:100%;cursor:pointer}.date-range-input__compact .date-range-input__toggle-button{padding-right:18px}.date-range-input_hide-arrows .date-range-input__toggle-button{padding:9px 18px}.date-range-input_error .date-range-input__wraper{border-color:#fa564c}.date-range-input_disabled .date-range-input__wraper{pointer-events:none;opacity:.7}.date-range-input_disabled .date-range-input__toggle-button{cursor:auto}.date-range-input__error-block{position:absolute;bottom:-20px;left:8px;font-size:var(--font-size);line-height:var(--line-height);color:#fa564c}.date-range-input__opened-part{width:fit-content;height:fit-content;background-color:rgba(0,0,0,0)}.opened-part{position:absolute;top:31px;left:0}.opened-part__wrapper{display:flex;flex-flow:row nowrap;justify-content:flex-start;align-items:stretch;border:1px solid var(--border-color);border-radius:var(--border-radius);background:#fff;box-shadow:0 4px 25px rgba(0,0,0,.25)}.opened-part__wrapper_right-position-once-element{justify-content:flex-end}.opened-part__intervals-list{width:fit-content;padding:6px 0;border-right:1px solid var(--border-color)}.opened-part__intervals-item{position:relative;display:flex;flex-flow:row nowrap;justify-content:flex-start;align-items:center;box-sizing:border-box;width:100%;padding:0 20px 0 30px;font-family:var(--font-family);font-size:12px;font-weight:300;font-style:normal;line-height:24px;cursor:pointer;white-space:nowrap;text-transform:capitalize}.opened-part__intervals-item:hover{background-color:#f2f2f8}.opened-part__intervals-item_active{background:#f2f2f8}.opened-part__intervals-item-icon-active{position:absolute;top:5px;left:10px}.opened-part__intervals-item_disabled{pointer-events:none;color:rgba(0,0,0,.3)}.opened-part__date-picker{width:fit-content;border:none}.opened-part--left{right:0;left:auto}.opened-part--top{top:auto;bottom:31px}.date-picker{display:flex;flex-flow:column nowrap;justify-content:space-between;align-items:flex-start}.date-picker__header{display:flex;flex-flow:column nowrap;justify-content:flex-start;align-items:flex-start;box-sizing:border-box;width:100%;height:fit-content;padding:7.5px 15px;border:none;background-color:#f7fafc}.date-picker__date-row{gap:8px;margin-right:0 !important}.date-picker__date-row .input__wrap{width:100% !important;margin:0 !important}.date-picker__inputs-block{display:flex;flex-flow:row nowrap;justify-content:flex-start;align-items:center;gap:8px;width:100%;height:fit-content;font-size:var(--font-size);line-height:var(--line-height)}.date-picker__inputs-block .date-picker__date-row>div:not(.date-picker__inputs-separator):not(.date-picker__date-input){box-sizing:border-box;min-width:100px;min-height:100%;margin-right:9px;border:1px solid var(--border-color)}.date-picker__inputs-block .date-picker__date-row>div:not(.date-picker__inputs-separator):not(.date-picker__date-input):last-child{margin-right:0}.date-picker__inputs-block .date-picker__date-row>div:not(.date-picker__inputs-separator):not(.date-picker__date-input).input__wrap{box-sizing:border-box;border-radius:var(--border-radius);box-shadow:none}.date-picker__inputs-block .date-picker__date-row>div:not(.date-picker__inputs-separator):not(.date-picker__date-input).input__wrap_focus{border:1px solid blue;box-shadow:none}.date-picker__inputs-block>div.dropdown{width:80px;border-radius:var(--border-radius)}.date-picker__inputs-block .date-picker__inputs-separator{margin:0 !important}.date-picker__inputs-block input{font-weight:300}.date-picker__date-row{display:flex;align-items:stretch;width:100%}.date-picker__date-input{box-sizing:border-box;padding:3px 10px;font-family:var(--font-family);font-size:var(--font-size);font-weight:300;font-style:normal;line-height:calc(var(--input-height)/2);letter-spacing:inherit;color:inherit;border-radius:var(--border-radius);background-color:#fff}.date-picker__date-input-emulation{display:flex;flex-flow:row nowrap;justify-content:flex-start;align-items:center;width:100%;height:100%;min-height:40px;padding:0px 15px !important;font-family:inherit;font-size:16px;font-weight:500;font-style:normal;line-height:22px;cursor:pointer;white-space:nowrap;letter-spacing:.2px;color:#3b414b;background-color:#fff}.date-picker__date-input-emulation span{display:block;width:100%;height:100%;padding-top:2px;line-height:24px}.date-picker__date-input-emulation_disabled{cursor:auto;pointer-events:none;opacity:.5}.date-picker__hour-select-input{box-sizing:border-box;width:70px;height:100%;min-height:100%;border-radius:var(--border-radius)}.date-picker__hour-select-input button{min-height:38px !important}.date-picker__hour-select-input>.dropdown__trigger{box-sizing:border-box;width:100%;height:28px;padding-right:15px;padding-left:10px;font-family:inherit;font-size:inherit;font-weight:inherit;font-style:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;border:none;box-shadow:none}.date-picker__hour-select-input>.dropdown__trigger>.text{padding:0}.date-picker__hour-select-input .dropdown__list-item{font-family:inherit;font-size:inherit;font-weight:inherit;font-style:inherit;line-height:inherit;letter-spacing:inherit;color:inherit}.date-picker__calendars{display:flex;flex-flow:row nowrap;justify-content:center;align-items:flex-start;box-sizing:border-box;width:100%;height:100%;padding:10px 16px;border-top:1px solid var(--border-color);border-bottom:1px solid var(--border-color);background-color:#fff}.date-picker__calendars-wrapper{display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:flex-start;width:100%}.date-picker__calendars .date-picker__calendar:first-child{margin-right:10px}.date-picker__calendars .range-calendar{box-sizing:border-box;width:fit-content;height:fit-content}.date-picker__calendars .range-calendar-header{display:flex;justify-content:space-between;align-items:center;height:fit-content;margin-bottom:12px;font-size:calc(var(--font-size) + 2px);font-weight:500;font-style:normal;line-height:calc(var(--line-height) + 4px)}.date-picker__calendars .range-calendar-header__title{text-align:center}.date-picker__calendars .range-calendar-header__next,.date-picker__calendars .range-calendar-header__prev{cursor:pointer;background-color:rgba(0,0,0,0)}.date-picker__calendars .range-calendar__week{display:flex}.date-picker__calendars .range-calendar__week-title{margin-bottom:5px}.date-picker__calendars .range-calendar__day{position:relative;display:flex;flex-grow:1;flex-basis:0;justify-content:center;align-items:center;box-sizing:border-box;width:29px;height:22px;margin:1px 0;font-size:var(--font-size);line-height:var(--line-height);user-select:none;text-align:center}.date-picker__calendars .range-calendar__day--clickable{cursor:pointer}.date-picker__calendars .range-calendar__day--clickable:hover{background:#e2e6f8}.date-picker__calendars .range-calendar__day--disabled{cursor:default;pointer-events:none;opacity:.2}.date-picker__calendars .range-calendar__day--disabled:hover{background:inherit}.date-picker__calendars .range-calendar__day--range-start,.date-picker__calendars .range-calendar__day--range-end{box-sizing:border-box;color:#f8fbff;border:1px solid var(--calendar-range-point-color);border-radius:var(--border-radius);background:var(--calendar-range-point-color)}.date-picker__calendars .range-calendar__day--range-start:hover,.date-picker__calendars .range-calendar__day--range-end:hover{color:#f8fbff;background:var(--calendar-range-point-color)}.date-picker__calendars .range-calendar__day--range-inside{background:#eaf2ff}.date-picker__calendars .range-calendar__day--prev-range-end{border-radius:var(--border-radius);background:#e2e5ec}.date-picker__calendars .range-calendar__day--prev-range-inside{background:#f7f8fa}.date-picker__calendars .range-calendar__day--title{font-size:var(--font-size);line-height:var(--line-height)}.date-picker__calendars .range-calendar__day--title:hover{background:inherit}.date-picker__footer{display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center;box-sizing:border-box;width:100%;padding:8px 16px;border:none;border-radius:0 0 var(--border-radius) 0;background-color:#f7fafc}.date-picker__footer_once-element{justify-content:flex-end}.date-picker__buttons-block{box-sizing:border-box;width:fit-content;height:100%}.date-picker__button{text-transform:capitalize}.date-picker__button:first-child{width:80px;margin-right:16px;border:1px solid #a6acb1;border-radius:var(--border-radius);background-color:#fff}.date-picker__button:last-child{width:110px;border-radius:var(--border-radius)}.date-picker__compare-block{box-sizing:border-box;width:fit-content;height:100%}@media screen and (max-width: 992px){.opened-part__intervals-list{display:none}}@media screen and (max-width: 768px){.date-picker-modal .modal__body{display:flex;flex-direction:column;gap:16px}.date-picker-modal .modal__footer button{height:40px;box-shadow:none}.date-picker-modal .modal__footer button.button_dark-outline{font-family:Sarabun;font-size:14.4px;font-weight:500;font-style:normal;line-height:150%;text-align:center;color:#171d33;border:1px solid #e1e8f1;border-radius:32px;background:var(--white, #fff)}.date-picker-modal .modal__footer button.button_primary{font-family:Sarabun;font-size:14.4px;font-weight:600;font-style:normal;line-height:150%;text-align:center;color:var(--white, #fff)}.date-picker.opened-part__date-picker{display:flex;flex-direction:column;gap:16px}.date-picker__header{padding:0 !important}.date-picker__inputs-block{display:flex;flex-direction:column;gap:16px}.date-picker__inputs-separator{display:none}.date-picker__hour-select-input{box-sizing:border-box}.date-picker__hour-select-input button{min-height:38px !important}.date-picker__calendars{border:1px solid var(--border-color);border-radius:var(--border-radius)}.date-picker__calendars-wrapper{display:flex;justify-content:center;align-items:center}.date-picker__calendar{margin:0 !important}}.input{position:relative;width:100%;padding:0 10px;word-break:break-all;border:none;background:none}.input::-webkit-outer-spin-button,.input::-webkit-inner-spin-button{appearance:none}.input__wrap{position:relative;display:flex;align-items:center;box-sizing:border-box;height:28px;border:1px solid #e2e5ec;border-radius:4px;background-color:#fff}.input__wrap_focus{border-color:#6b81dd;filter:drop-shadow(0 0 4px rgba(93, 120, 255, 0.5))}.input__wrap--disabled{pointer-events:none;opacity:.5;border-color:#a6acb1;background:#f7f8fa}.input__wrap_error{border-color:#f06d8d !important}.input__wrap .lds-ring.lds-ring_small{top:calc(50% - 18px)}.input_disabled{pointer-events:none;opacity:.5;border-color:#a6acb1;background:#f7f8fa}.input_error{border-color:#f06d8d}.input svg{margin-right:4px}.input__input{box-sizing:border-box;width:100%;height:100%;padding:0 5px;font-size:13px;font-weight:400;color:#1e1e2d;border:none;border-radius:4px}.input__close{position:relative;visibility:hidden;width:14px;height:14px;margin-right:4px;cursor:pointer;pointer-events:none;opacity:.6;background:none}.input__close:hover{opacity:1}.input__close::before,.input__close::after{position:absolute;top:0;right:0;left:0;width:2px;height:14px;margin:auto;content:"";background-color:#9aa0b9}.input__close::before{transform:rotate(45deg)}.input__close::after{transform:rotate(-45deg)}.input__nums{display:flex;align-items:center;height:100%}.input__num-btn{display:flex;justify-content:center;align-items:center;width:24px;height:100%;font-size:20px;cursor:pointer;user-select:none;border-left:1px solid #e2e5ec;background:none}.input__num-btn.disabled{opacity:.3}.input__num-btn svg{margin-right:0}.input-label{margin-bottom:5px}.input--with-icon{padding:0 40px 0 10px}.input__wrap:hover .input__close{visibility:visible;pointer-events:all}.radio-input{display:inline-flex;align-items:center;cursor:pointer}.radio-input_disabled .radio-input__input{cursor:auto;pointer-events:none;opacity:.3}.radio-input:hover .radio-input__input{background-color:#e2e5ec}.radio-input__input{position:relative;width:14px;min-width:14px;height:14px;min-height:14px;border:1px solid #a6acb1;border-radius:50%;background-color:#fff}.radio-input__mark{position:absolute;z-index:1;inset:0;display:none;width:10px;height:10px;margin:auto;border-radius:50%;background-color:#6b81dd}.radio-input .radio-input__radio:checked~.radio-input__mark{display:block}.radio-input__radio{position:absolute;width:0;height:0;opacity:0}.radio-input__label{margin-left:5px;font-size:13px;font-weight:400;user-select:none}.range-calendar,.calendar{display:flex;flex-direction:column;width:195px;min-height:195px;user-select:none}.range-calendar-header,.calendar-header{display:flex;justify-content:space-between;align-items:center;height:24px;margin-bottom:12px}.range-calendar-header__title,.calendar-header__title{display:flex;flex-grow:1;justify-content:center;align-items:center;font-weight:500;line-height:20px;text-align:center;color:#000}.range-calendar-header__next,.range-calendar-header__prev,.calendar-header__next,.calendar-header__prev{width:16px;height:16px;color:#171d33;border-radius:5px}.range-calendar__week,.calendar__week{display:flex}.range-calendar__day,.calendar__day{flex-grow:1;flex-basis:0;margin:1px 0;padding:1px 6px;font-size:13px;line-height:20px;user-select:none;text-align:center}.range-calendar__day--clickable,.calendar__day--clickable{cursor:pointer}.range-calendar__day--clickable:hover,.calendar__day--clickable:hover{background:#e2e6f8}.range-calendar__day--disabled,.calendar__day--disabled{cursor:default;pointer-events:none;color:#9aa0b9}.range-calendar__day--disabled:hover,.calendar__day--disabled:hover{background:inherit}.range-calendar__day--range-start,.range-calendar__day--range-end,.calendar__day--range-start,.calendar__day--range-end{color:#fff;border-radius:4px;background:#6b81dd}.range-calendar__day--range-start:hover,.range-calendar__day--range-end:hover,.calendar__day--range-start:hover,.calendar__day--range-end:hover{background:#6b81dd}.range-calendar__day--range-inside,.calendar__day--range-inside{background:#e2e6f8}.range-calendar__day--prev-range-end,.calendar__day--prev-range-end{border-radius:4px;background:#e2e5ec}.range-calendar__day--prev-range-inside,.calendar__day--prev-range-inside{background:#f7f8fa}.range-calendar__day--title,.calendar__day--title{font-size:10px;font-weight:normal;color:#9aa0b9}.range-calendar__day--title:hover,.calendar__day--title:hover{background:inherit}.switcher__button{display:inline-flex;align-items:center;font-family:inherit;font-size:inherit;font-weight:inherit;font-style:inherit;cursor:pointer;color:inherit}.switcher_disabled{pointer-events:none;opacity:.5}.switcher__button-content{box-sizing:border-box;width:26px;min-width:26px;height:16px;padding:1px;border-radius:8px;background-color:rgba(166,172,177,.5)}.switcher__button-content_active{background-color:#6b81dd}.switcher__button-content_active .switcher__ball{transform:translateX(calc(100% - 4px))}.switcher__ball{width:14px;height:14px;border-radius:50%;background-color:#fff;box-shadow:0 0 2px rgba(0,0,0,.5);transition:transform .2s ease}.switcher__label{margin-left:4px;font-family:inherit;font-size:inherit;font-weight:inherit;font-style:inherit;line-height:24px;user-select:none;text-align:left;color:inherit}.switcher__label_bold{font-weight:500}.switcher__wrap{display:inline-flex;align-items:center}.switcher__hint{margin-left:5px}.switcher__hint .hint__button svg{width:16px;min-width:16px}:root{--spinner-opacity: 0.1;--spinner-background: #fff;--spinner-width: 100px;--spinner-height: 100px;--spinner-small-width: 30px;--spinner-small-height: 30px;--spinner-border-width: 8px;--spinner-border-color: #000;--spinner-animation-duration: 1.2s;--spinner-animation-timing-function: cubic-bezier(0.5, 0, 0.5, 1);--spinner-animation-delay-1: -0.45s;--spinner-animation-delay-2: -0.3s;--spinner-animation-delay-3: -0.15s}.loader-box{position:absolute;z-index:100;opacity:var(--spinner-opacity, 0.1);background:var(--spinner-background, #fff);top:0;left:0;width:100%;height:100%}.lds-ring{position:relative;display:inline-block;width:var(--spinner-width, 100px);height:var(--spinner-height, 100px)}.lds-ring.lds-ring_small{top:calc(50% - 15px);width:var(--spinner-small-width, 30px);height:var(--spinner-small-height, 30px)}.lds-ring div{position:absolute;display:block;box-sizing:border-box;width:calc(var(--spinner-width, 100px) - 16px);height:calc(var(--spinner-height, 100px) - 16px);margin:8px;border:var(--spinner-border-width, 8px) solid var(--spinner-border-color, #000);border-color:var(--spinner-border-color, #000) rgba(0,0,0,0) rgba(0,0,0,0);border-radius:50%;animation:lds-ring var(--spinner-animation-duration, 1.2s) var(--spinner-animation-timing-function, cubic-bezier(0.5, 0, 0.5, 1)) infinite}.lds-ring_small div{top:-15%;left:-15%;width:100% !important;height:100% !important;border:calc(var(--spinner-border-width, 8px)/2) solid var(--spinner-border-color, #000) !important;border-color:var(--spinner-border-color, #000) rgba(0,0,0,0) rgba(0,0,0,0) !important}.lds-ring div:nth-child(1){animation-delay:var(--spinner-animation-delay-1, -0.45s)}.lds-ring div:nth-child(2){animation-delay:var(--spinner-animation-delay-2, -0.3s)}.lds-ring div:nth-child(3){animation-delay:var(--spinner-animation-delay-3, -0.15s)}@keyframes lds-ring{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.arrow{width:24px;height:24px}.arrow_disabled{pointer-events:none;opacity:.5}.arrow>svg{width:100%;height:100%;pointer-events:none}.button{position:relative;display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;height:28px;padding:3px 10px;font-size:13px;line-height:20px;cursor:pointer;user-select:none;text-align:center;white-space:nowrap;border-radius:3px;box-shadow:0 2px 5px rgba(0,0,0,.1)}.button:disabled{pointer-events:none;opacity:.5}.button_warning{color:#fff;border:1px solid #f06d8d;background-color:#f06d8d}.button_warning:hover{filter:brightness(1.1)}.button_dark-outline{color:#1e1e2d;border:1px solid #bac2c9}.button_dark-outline:hover{background-color:#f2f2f8}.button_primary{color:#fff;border:1px solid #6b81dd;background-color:#6b81dd}.button_primary:hover{filter:brightness(1.1)}.button_secondary{color:#fff;border:1px solid #bac2c9;background-color:#bac2c9}.button_secondary:hover{filter:brightness(1.1)}.button_ellipse-apply{padding:8px 16px;font-family:Sarabun,sans-serif;font-size:16px;font-weight:500;font-style:normal;line-height:24px;letter-spacing:.1px;color:#fff;border-radius:40px;background:#1f7499}.button_ellipse-cancel{padding:8px 18px;font-family:Sarabun,sans-serif;font-size:14px;font-weight:normal;font-style:normal;line-height:20px;letter-spacing:.2px;color:#1f7499;border-radius:32px}.button_link{color:#6b81dd;box-shadow:none}.button_link svg{display:none}.button_success{color:#fff;border:1px solid #7ac48c;background-color:#7ac48c}.button_success:hover{filter:brightness(1.1)}.button__text{display:flex;justify-content:center;align-items:center;width:100%;box-shadow:none}.button:active{filter:brightness(1.1)}.button__icon{width:auto;min-width:15px;height:25px}.button_icon-left .button__text{margin-left:5px}.button_icon-right .button__text{order:1;margin-right:5px;margin-left:0}.button_icon-right svg{order:2}.text-ellipsis{display:block;overflow:hidden;width:100%;white-space:nowrap;text-overflow:ellipsis}.hint{position:relative;display:inline-block;font-size:0}.hint__container{position:fixed;z-index:99999;display:block;box-sizing:border-box}.hint__button{display:flex;cursor:pointer}.hint__button svg{width:16px;height:16px;margin-right:5px}.hint__button:hover,.hint__button_active{color:#6b81dd}.hint__button:hover svg,.hint__button_active svg{color:#6b81dd}.hint__text{position:absolute;z-index:1;min-width:80px;max-width:250px;padding:8px;font-size:10px;line-height:16px;color:#fff;border-radius:4px;background-color:#6b81dd}.hint__text a{text-decoration:underline;color:#fff}.hint__text::before{position:absolute;width:8.5px;height:8.5px;content:"";background-color:#6b81dd;transform:rotate(45deg)}.hint__text_bottom{top:26px;left:-4px}.hint__text_bottom::before{top:-4.25px;left:8px}.hint__text_centeredBottom{top:26px;left:50%;transform:translateX(-50%)}.hint__text_centeredBottom::before{top:-4.25px;left:calc(50% - 8px)}.hint__text_right{top:-4px;left:calc(100% + 8px)}.hint__text_right::before{top:8px;left:-4.25px}.hint__text_left{top:-4px;right:calc(100% + 8px);left:unset}.hint__text_left::before{top:8px;right:-4.25px}.hint__text_top{bottom:8px;left:-4px}.hint__text_top::before{bottom:-4.25px;left:8px}.hint__text_centeredTop{bottom:8px;left:50%;transform:translateX(-50%)}.hint__text_centeredTop::before{bottom:-4.25px;left:calc(50% - 8px)}.hint__icon.outlined{color:#9aa0b9}.hint__icon.filled{color:#fff}.modal{--modal-overlay-bg: black;--modal-overlay-opacity: 0.5;--modal-bg: #fff;--modal-header-bg: #f7fafc;--modal-body-bg: #f7fafc;--modal-footer-bg: #f7fafc;--modal-border-color: #e2e5ec;--modal-title-color: vars.$color--primary;--modal-title-font-size: 16px;--modal-title-font-weight: 400;--modal-width: 600px;--modal-min-height: 300px;--modal-margin: 0 10px;--modal-padding: 15px;--modal-header-padding: 10px 15px;--modal-footer-padding: 7.5px 15px;--modal-border-radius: 6px;--modal-inner-radius: 4px;--modal-box-shadow: 0 20px 20px rgb(0 0 0 / 20%);--modal-close-btn-size: 40px;--modal-close-icon-size: 20px;--modal-close-btn-color: #1e1e2d;--modal-close-hover-bg: #e2e5ec;--modal-primary-bg: #6b81dd;--modal-primary-title-color: #ffffff;--modal-primary-close-hover: #5162d4;--max-height: calc(100% - 30px);position:relative;z-index:5;display:flex;flex-direction:column;width:var(--modal-width, 600px);min-height:var(--modal-min-height, 300px);max-height:var(--max-height, calc(100% - 30px));margin:var(--modal-margin, 0 10px);border-radius:var(--modal-border-radius, 6px);background-color:var(--modal-bg, #fff);box-shadow:var(--modal-box-shadow, 0 20px 20px rgba(0, 0, 0, 0.2))}.modal__header{position:relative;display:flex;justify-content:space-between;align-items:center;padding:var(--modal-header-padding, 10px 15px);border-bottom:1px solid var(--modal-border-color, #e2e5ec);border-top-left-radius:var(--modal-inner-radius, 4px);border-top-right-radius:var(--modal-inner-radius, 4px);background-color:var(--modal-header-bg, #f7fafc)}.modal__header-primary{background-color:var(--modal-primary-bg, #6b81dd)}.modal__header-primary-title{font-size:var(--modal-title-font-size, 16px);font-weight:var(--modal-title-font-weight, 400);color:var(--modal-primary-title-color, #ffffff)}.modal__header-title{font-size:var(--modal-title-font-size, 16px);font-weight:normal;color:var(--modal-title-color, #6b81dd)}.modal__body{overflow-y:auto;flex-grow:1;box-sizing:border-box;padding:var(--modal-padding, 15px);border-bottom-right-radius:var(--modal-inner-radius, 4px);border-bottom-left-radius:var(--modal-inner-radius, 4px);background-color:var(--modal-body-bg, #f7fafc)}.modal__body scrollbar{-moz-appearance:none !important}.modal__body scrollbarbutton{-moz-appearance:none !important}.modal__body thumb{-moz-appearance:none !important}.modal__body scrollcorner{-moz-appearance:none !important;resize:both}.modal__body::-webkit-scrollbar{width:4px}.modal__body::-webkit-scrollbar-thumb{-webkit-border-radius:3px;border-radius:3px;background:#bac2c9}.modal__body::-webkit-scrollbar-thumb:hover{background:#9aa0b9}.modal__body::-webkit-scrollbar:horizontal{height:8px}.modal__body::-webkit-scrollbar-track:horizontal{background:inherit}.modal__body::-webkit-scrollbar-thumb:horizontal{-webkit-border-radius:6px;border-radius:6px;background:#bac2c9;background-clip:padding-box;border:2px solid rgba(0,0,0,0)}.modal__body::-webkit-scrollbar-thumb:horizontal:hover{background:#9aa0b9;border:1px solid rgba(0,0,0,0);background-clip:padding-box}.modal__body:first-of-type{overflow-x:hidden;border-top-left-radius:var(--modal-inner-radius, 4px);border-top-right-radius:var(--modal-inner-radius, 4px)}.modal__body--no-footer{padding:var(--modal-padding, 15px)}.modal__footer{display:flex;justify-content:flex-end;align-items:center;padding:var(--modal-footer-padding, 7.5px 15px);border-top:1px solid var(--modal-border-color, #e2e5ec);border-bottom-right-radius:var(--modal-inner-radius, 4px);border-bottom-left-radius:var(--modal-inner-radius, 4px);background-color:var(--modal-footer-bg, #f7fafc)}.modal__footer_with-left-content{justify-content:space-between}.modal__footer--inbody{position:absolute;bottom:0;left:0;width:calc(100% - 30px);background-color:var(--modal-bg, #fff)}.modal__buttons-block{display:flex;flex-flow:row nowrap;justify-content:flex-start;align-items:center}.modal-overlay{position:fixed;z-index:4;top:0;left:0;width:100%;height:100%;opacity:var(--modal-overlay-opacity, 0.5);background-color:var(--modal-overlay-bg, black);transition:opacity .2s ease}.modal__footer--noborder{border-top:none}.modal-box{position:fixed;z-index:100;inset:0;animation-name:fadeIn;animation-duration:.25s;animation-timing-function:ease;animation-fill-mode:forwards}@keyframes fadeIn{from{opacity:0}to{opacity:1}}.consumer-info-modal{overflow-x:auto}.consumer-info-modal .button-fin{background-color:#fff}.consumer-info-modal .modal__body{min-height:200px;padding:0 15px}.modal-close-icon-box{position:absolute;top:0;right:0;display:flex;justify-content:center;align-items:center;width:var(--modal-close-btn-size, 40px);height:100%;cursor:pointer;color:var(--modal-close-btn-color, #1e1e2d);border-top-right-radius:var(--modal-inner-radius, 4px);background:rgba(0,0,0,0)}.modal-close-icon-box:hover{background-color:var(--modal-close-hover-bg, #e2e5ec)}.modal-close-icon-box-primary{color:var(--modal-close-btn-color, #1e1e2d)}.modal-close-icon-box-primary:hover{opacity:1;background-color:var(--modal-primary-close-hover, #5162d4)}.modal-close-icon-box-merchant{color:var(--modal-close-btn-color, #1e1e2d)}.modal-close-icon-box-merchant:hover{opacity:1;background-color:var(--modal-primary-close-hover, #5162d4)}.modal-close-icon{width:var(--modal-close-icon-size, 20px);min-width:var(--modal-close-icon-size, 20px);height:var(--modal-close-icon-size, 20px)}.modal-text-card{padding:15px 0;font-size:13px;font-weight:400;line-height:20px;text-align:left;white-space:normal}.prompt-text-card{padding:0}.included-selector-modal--box{overflow-x:auto;max-height:calc(100% - 32px)}.included-selector-modal__th--id{width:1%}.included-selector-modal__td--id{color:#9aa0b9}.included-selector-modal .simple-table{overflow-x:unset;min-height:400px;max-height:500px}.included-selector-modal .simple-table thead{background-color:unset}.included-selector-modal .simple-table thead th{padding:10px 15px;font-weight:400;border-right:1px solid var(--modal-border-color, #e2e5ec)}.included-selector-modal .simple-table thead th:first-child,.included-selector-modal .simple-table thead th:last-child{border:none}.included-selector-modal .simple-table tbody tr:first-child{position:relative}.included-selector-modal .simple-table tbody tr:first-child::after{position:absolute;top:0;left:0;width:100%;height:8px;content:"";background:linear-gradient(180deg, rgba(0, 0, 0, 0.152) 0%, rgba(0, 0, 0, 0) 100%)}.included-selector-modal .simple-table tbody tr:last-child{border-bottom:none}.included-selector-modal .simple-table td{padding:2.25px 15px}.included-selector-modal .simple-table .tr-as-selector:hover td{background-color:#ffedc8}.reports-settings-modal-box .modal__body{padding:0}.confirm-modal{border-radius:var(--modal-inner-radius, 4px)}.confirm-modal .modal__header-title{font-size:13px;font-weight:700}.confirm-modal .modal__body .modal-text-card{padding:0}.confirm-modal .modal__footer{background-color:var(--modal-bg, #fff)}.modal-close-icon-box--hidden{display:none}@keyframes slideup{from{transform:translateY(100%)}to{transform:translateY(0)}}@media only screen and (max-width: 768px),(width <= 1024px)and (orientation: landscape){.modal-mobile-container{--modal-container-z-index: 100;--modal-container-width: 100dvw;--modal-container-height: 100dvh;--modal-container-border-radius: 16px;--modal-content-margin-top: 16px;--modal-animation-duration: 0.4s;--modal-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.15);position:relative;z-index:var(--modal-container-z-index, 100);overflow-y:auto;box-sizing:border-box;width:var(--modal-container-width, 100dvw);height:var(--modal-container-height, 100dvh);border-radius:var(--modal-container-border-radius, 16px) var(--modal-container-border-radius, 16px) 0 0}.modal-mobile-container .modal{--modal-header-footer-width: 100%;--modal-header-top: 0;--modal-footer-bottom: 0;max-width:100vw;max-height:unset !important;margin-top:var(--modal-content-margin-top, 16px) !important;border-radius:var(--modal-container-border-radius, 16px) var(--modal-container-border-radius, 16px) 0 0;animation-name:slideup;animation-duration:var(--modal-animation-duration, 0.4s)}.modal-mobile-container .modal__header,.modal-mobile-container .modal__footer{z-index:2;left:0;box-sizing:border-box;width:var(--modal-header-footer-width, 100%)}.modal-mobile-container .modal__header--hidden,.modal-mobile-container .modal__footer--hidden{position:relative}.modal-mobile-container .modal__header--sticky,.modal-mobile-container .modal__footer--sticky{position:sticky;box-shadow:var(--modal-shadow, 0px 0px 16px 0px rgba(0, 0, 0, 0.15))}.modal-mobile-container .modal__header{top:var(--modal-header-top, 0)}.modal-mobile-container .modal__footer{bottom:var(--modal-footer-bottom, 0);border-radius:0 !important}.modal-mobile-container .modal:not(.modal--no-header) .modal__body{border-radius:0 !important}}.filter-chip{position:relative;display:inline-flex;max-width:100%;font-size:13px;color:#1e1e2d}.filter-chip button{font-family:inherit}.filter-chip__box{display:inline-flex;overflow:hidden;flex:1 1 auto;align-items:center;box-sizing:border-box;min-width:0;min-height:28px;border:1px solid #d3daf5;border-radius:999px;background:#eef1fb;transition:background-color 120ms ease-out,border-color 120ms ease-out}.filter-chip--editing .filter-chip__box{border-color:#6b81dd;background:#e2e6f8}.filter-chip--empty .filter-chip__box{border:1px dashed #bac2c9;background:#fff}.filter-chip--invalid .filter-chip__box{border:1px dashed #d92d20;background:#fff5f5}.filter-chip--paused .filter-chip__box{opacity:.4;filter:grayscale(1)}.filter-chip--expanded .filter-chip__box{align-items:flex-start;max-width:min(560px,100vw - 80px);border-radius:14px}.filter-chip--expanded .filter-chip__body{flex-wrap:wrap;align-items:baseline;height:auto;min-height:26px;padding-top:3px;padding-bottom:3px;white-space:normal}.filter-chip--permanent .filter-chip__box{border:1px solid #e2e5ec;border-radius:4px;background:#fff}.filter-chip--permanent.filter-chip--editing .filter-chip__box{border-color:#6b81dd}.filter-chip--permanent .filter-chip__body{padding-right:6px}.filter-chip--permanent .filter-chip__label{font-weight:500;color:#1e1e2d}.filter-chip--permanent .filter-chip__value{font-weight:400}.filter-chip--mobile .filter-chip__box{min-height:32px}.filter-chip--mobile .filter-chip__body,.filter-chip--mobile .filter-chip__x,.filter-chip--mobile .filter-chip__arrow{height:30px}.filter-chip__body{display:inline-flex;flex:1 1 auto;align-items:center;gap:4px;min-width:0;height:26px;padding:0 4px 0 10px;font-size:13px;line-height:20px;cursor:pointer;text-align:left;white-space:nowrap;color:#1e1e2d;border:0;background:rgba(0,0,0,0)}.filter-chip__body:disabled{cursor:default}.filter-chip__body:focus-visible{outline:2px solid #6b81dd;outline-offset:-2px}.filter-chip__arrow+.filter-chip__body{padding-left:2px}.filter-chip__label{color:#5b6178}.filter-chip__value{overflow:hidden;min-width:0;font-weight:500;text-overflow:ellipsis}.filter-chip__value--placeholder{font-weight:400;color:#9aa0b9}.filter-chip--invalid .filter-chip__value{color:#d92d20}.filter-chip__badges{display:inline-flex;flex-wrap:wrap;align-items:center;gap:4px;min-width:0}.filter-chip__badge-slot{display:inline-flex}.filter-chip__group-badge{display:inline-flex;align-items:center;box-sizing:border-box;height:20px;padding:0 8px;font-size:11px;font-weight:500;line-height:20px;white-space:nowrap;border:1px solid #d5d9e2;border-radius:15px;background:#eef0f4}.filter-chip__tag{display:inline-flex;align-items:center;padding:1px 4px;font-size:11px;font-weight:400;line-height:20px;white-space:nowrap;color:#1e1e2d;border-radius:3px;background:#f1f0f0}.filter-chip__excluded{text-decoration:line-through;text-decoration-color:#c81e4b}.filter-chip__more{font-size:12px;font-weight:500;white-space:nowrap;color:#5b6178}.filter-chip__arrow,.filter-chip__x{display:inline-flex;flex:none;justify-content:center;align-items:center;height:26px;padding:0;cursor:pointer;color:#5b6178;border:0;background:rgba(0,0,0,0)}.filter-chip__arrow:disabled,.filter-chip__x:disabled{cursor:default;color:#bac2c9}.filter-chip__arrow:focus-visible,.filter-chip__x:focus-visible{outline:2px solid #6b81dd;outline-offset:-2px}.filter-chip__arrow{width:22px;color:#1e1e2d}.filter-chip__arrow:first-child{margin-left:4px}.filter-chip__x{width:24px}.filter-chip__sr-only{position:absolute;overflow:hidden;clip:rect(0 0 0 0);width:1px;height:1px;white-space:nowrap}.filter-chip__popover{position:absolute;z-index:30;top:calc(100% + 4px);left:0;box-sizing:border-box;padding:12px;border:1px solid #e2e5ec;border-radius:6px;background:#fff;box-shadow:0 12px 32px rgba(30,30,45,.14)}.filter-chip__popover--right{right:0;left:auto}.filter-chip .date-range-input_custom-trigger{display:inline-flex;max-width:100%}.filter-chip .date-range-input_custom-trigger>.date-range-input__label{display:none}.filter-chip .date-range-input_custom-trigger .date-range-input__wraper,.filter-chip .date-range-input_custom-trigger .date-range-input__absolut-wraper{width:auto;max-width:100%}.filter-chip .date-range-input_custom-trigger .opened-part{top:calc(100% + 4px)}.filter-chip-editor{display:flex;flex-direction:column;gap:10px;font-size:13px;text-align:left;color:#1e1e2d}.filter-chip-editor button{font-family:inherit}.filter-chip-editor__sr-only{position:absolute;overflow:hidden;clip:rect(0 0 0 0);width:1px;height:1px;white-space:nowrap}.filter-chip-editor__head{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:24px}.filter-chip-editor__title{font-size:12px;font-weight:500;letter-spacing:.04em;text-transform:uppercase;color:#5b6178}.filter-chip-editor__switch{display:inline-flex;align-items:center;gap:8px;height:24px;padding:0 2px;font-size:13px;cursor:pointer;white-space:nowrap;color:#1e1e2d;border:0;background:rgba(0,0,0,0)}.filter-chip-editor__switch-track{position:relative;flex:none;width:28px;height:16px;border-radius:999px;background:#bac2c9;transition:background 120ms ease-out}.filter-chip-editor__switch-track--on{background:#6b81dd}.filter-chip-editor__switch-knob{position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(30,30,45,.25);transition:transform 120ms ease-out}.filter-chip-editor__switch-track--on .filter-chip-editor__switch-knob{transform:translateX(12px)}.filter-chip-editor__segmented{display:flex;gap:2px;padding:2px;border-radius:4px;background:#eef0f4}.filter-chip-editor__segment{flex:1 1 0;min-width:0;height:24px;padding:0 8px;font-size:13px;cursor:pointer;white-space:nowrap;color:#5b6178;border:0;border-radius:3px;background:rgba(0,0,0,0)}.filter-chip-editor__segment--on{font-weight:500;color:#1e1e2d;background:#fff;box-shadow:0 1px 2px rgba(30,30,45,.14)}.filter-chip-editor__input{box-sizing:border-box;width:100%;min-width:0;height:28px;padding:0 12px;font-size:13px;color:#1e1e2d;border:1px solid #e2e5ec;border-radius:4px;background:#fff;transition:border-color 160ms ease-out,background-color 160ms ease-out}.filter-chip-editor__input::placeholder{opacity:1;color:#9aa0b9}.filter-chip-editor__input:focus{border-color:#6b81dd;outline:none}.filter-chip-editor__input[aria-invalid=true],.filter-chip-editor__input--error{border-color:#d92d20;background-color:#fff5f5}.filter-chip-editor__search{position:relative;display:flex;align-items:center}.filter-chip-editor__search-icon{position:absolute;left:10px;display:inline-flex;pointer-events:none;color:#9aa0b9}.filter-chip-editor__search-input{padding-left:30px}.filter-chip-editor__list-block{display:flex;flex-direction:column;gap:6px}.filter-chip-editor__selection{display:flex;justify-content:space-between;align-items:center;min-height:24px;font-size:12px;color:#5b6178}.filter-chip-editor__link{height:24px;padding:0 6px;font-size:13px;cursor:pointer;color:#4f66c9;border:0;border-radius:3px;background:rgba(0,0,0,0)}.filter-chip-editor__link--danger{color:#c81e4b}.filter-chip-editor__list{display:flex;overflow-y:auto;flex-direction:column;max-height:320px;margin:0 -6px;padding:0 6px}.filter-chip-editor__note{padding:16px 4px;color:#5b6178}.filter-chip-editor__option{display:flex;align-items:center;gap:10px;min-height:28px;padding:0 4px;cursor:pointer;border-radius:3px}.filter-chip-editor__option input{flex:none;width:14px;height:14px;margin:1px;accent-color:#6b81dd}.filter-chip-editor__option:hover{background:#f5f7fb}.filter-chip-editor__option-label{min-width:0}.filter-chip-editor__mark{padding:0;color:inherit;border-radius:2px;background:#fff3a8}.filter-chip-editor__group{display:flex;flex-direction:column;padding:4px 0 6px;border-bottom:1px solid #eef0f4}.filter-chip-editor__group-head{display:flex;align-items:center;gap:2px}.filter-chip-editor__chevron{display:inline-flex;flex:none;justify-content:center;align-items:center;width:22px;height:28px;padding:0;cursor:pointer;color:#5b6178;border:0;border-radius:3px;background:rgba(0,0,0,0)}.filter-chip-editor__chevron svg{transition:transform 160ms ease-out}.filter-chip-editor__chevron--open svg{transform:rotate(90deg)}.filter-chip-editor__group-toggle{display:flex;flex:1;align-items:center;gap:10px;min-height:28px;padding:0 4px;cursor:pointer;text-align:left;border:0;border-radius:3px;background:rgba(0,0,0,0)}.filter-chip-editor__box{display:inline-flex;flex:none;justify-content:center;align-items:center;box-sizing:border-box;width:14px;height:14px;margin:1px;border:1.5px solid #767c86;border-radius:3px;background:#fff}.filter-chip-editor__box--on{border:1px solid #6b81dd;background:#6b81dd}.filter-chip-editor__group-name{font-size:11px;font-weight:500;letter-spacing:.05em;text-transform:uppercase;color:#5b6178}.filter-chip-editor__group-count{font-size:11px;color:#5b6178}.filter-chip-editor__group-items{display:flex;flex-direction:column;margin-left:35px;padding-left:4px;border-left:1px solid #e2e5ec}.filter-chip-editor__tag-row{display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:34px;padding:0 4px;border-bottom:1px solid #eef0f4}.filter-chip-editor__tag-label{min-width:0}.filter-chip-editor__tag-actions{display:flex;flex:none;gap:4px}.filter-chip-editor__toggle{box-sizing:border-box;height:24px;padding:0 8px;font-size:12px;cursor:pointer;color:#1e1e2d;border:1px solid #bac2c9;border-radius:3px;background:rgba(0,0,0,0)}.filter-chip-editor__toggle--include{color:#fff;border-color:#1f7a3a;background:#1f7a3a}.filter-chip-editor__toggle--exclude{color:#fff;border-color:#c81e4b;background:#c81e4b}.filter-chip-editor__hint{font-size:12px;line-height:16px;color:#5b6178}.filter-chip-editor__range-block{display:flex;flex-direction:column;gap:6px}.filter-chip-editor__range{display:flex;align-items:flex-end;gap:8px}.filter-chip-editor__range-field{display:flex;flex:1 1 0;flex-direction:column;gap:2px;min-width:0;font-size:12px;font-weight:500;line-height:20px}.filter-chip-editor__range-dash{flex:none;padding-bottom:5px;color:#5b6178}.filter-chip-editor__error{font-size:12px;line-height:16px;color:#c81e1e}.filter-chip-editor__radios{display:flex;flex-direction:column}.filter-chip-editor__radio{display:flex;justify-content:space-between;align-items:center;min-height:32px;padding:0 4px;font-size:13px;cursor:pointer;text-align:left;color:#1e1e2d;border:0;border-bottom:1px solid #eef0f4;background:rgba(0,0,0,0)}.filter-chip-editor__radio--on{font-weight:500}.filter-chip-editor__radio--on::after{content:"✓";color:#6b81dd}.filter-chip-editor__radio--static{cursor:default}.filter-chip-editor__footer{display:flex;justify-content:space-between;align-items:center;padding-top:10px;border-top:1px solid #eef0f4}.filter-chip-editor__btn{box-sizing:border-box;height:28px;padding:0 12px;font-size:13px;cursor:pointer;color:#fff;border:1px solid #6b81dd;border-radius:3px;background:#6b81dd;box-shadow:0 0 1px rgba(0,0,0,.15),0 4px 2px rgba(0,0,0,.05)}.filter-chip-editor--mobile .filter-chip-editor__input{height:32px}.filter-chip-editor--mobile .filter-chip-editor__list{max-height:none}.filter-chip-editor--mobile .filter-chip-editor__option{min-height:32px}.filter-chip-editor--mobile .filter-chip-editor__btn{height:32px;padding:0 16px}@media(prefers-reduced-motion: reduce){.filter-chip__box,.filter-chip-editor__chevron svg,.filter-chip-editor__switch-track,.filter-chip-editor__switch-knob{transition:none}}
|
|
1
|
+
:export{primaryColor:#3f51b5;secondaryColor:#f50057;successColor:#4caf50;warningColor:#ff9800;errorColor:#f44336;infoColor:#2196f3;backgroundColor:#fff;textColor:#212121;textSecondaryColor:#757575}.dropdown{position:relative;display:flex;overflow:hidden;flex-wrap:nowrap;justify-content:flex-start;align-items:center;width:100%;border:1px solid #e2e5ec;border-radius:4px;background:#fff}.dropdown--focused{border-color:#6b81dd;filter:drop-shadow(0 0 4px rgba(93, 120, 255, 0.5))}.dropdown--with-custom-trigger{border:none !important;background:none !important;filter:none !important}.dropdown--with-actions{border-top-right-radius:0;border-bottom-right-radius:0}.dropdown__actions{display:flex;overflow:hidden;justify-content:center;align-items:center;align-self:stretch;box-sizing:border-box;min-width:56px;border-radius:0px 2px 2px 0px}.dropdown__actions-item{display:flex;justify-content:center;align-items:center;align-self:stretch;gap:4px;box-sizing:border-box;min-width:28px;height:100%;padding:4px;cursor:pointer;border-left:1px solid var(--Border-Input, #e2e5ec);background:var(--Background-Light-action, #f4f6ff)}.dropdown__actions svg{width:16px;height:16px;color:#1e1e2d}.dropdown__container{position:fixed;z-index:99999;display:block;box-sizing:border-box}.dropdown__trigger{position:relative;display:block;align-items:center;box-sizing:border-box;width:100%;height:28px;font-weight:400;cursor:pointer;text-align:left;border:none !important;filter:none}.dropdown__trigger .text{overflow:hidden;max-width:calc(100% - 5px);padding:0 16px 0 8px;white-space:nowrap;text-overflow:ellipsis}.dropdown__trigger.error{border-color:#f06d8d}.dropdown__trigger.placeholder .text{opacity:.7}.dropdown__trigger input{box-sizing:border-box}.dropdown__input{width:100%;height:16px;padding:0 16px 0 8px;font-weight:400;text-overflow:ellipsis;border:none;background:none}.dropdown__list{position:relative;z-index:6;top:100%;overflow-y:auto;box-sizing:border-box;min-width:100%;max-height:320px;padding:4px 0}.dropdown__list-wrapper{position:relative;z-index:6;top:100%;box-sizing:border-box;margin-top:4px;border:1px solid #e2e5ec;background:#fff;box-shadow:0 5px 20px rgba(0,0,0,.15)}.dropdown__list-header{display:none}.dropdown__list::-webkit-scrollbar{width:4px}.dropdown__list::-webkit-scrollbar-track{background:rgba(0,0,0,0)}.dropdown__list::-webkit-scrollbar-thumb{border-radius:4px;background:#9aa0b9}.dropdown__list-top{top:auto;bottom:calc(100% + 4px);box-shadow:0 -3px 10px rgba(0,0,0,.15)}.dropdown__list-item{position:relative;display:flex;overflow:hidden;align-items:center;width:100%;min-height:24px;padding:0 20px 0 30px;font-size:13px;font-weight:400;line-height:24px;cursor:pointer;white-space:nowrap;color:#1e1e2d;border:none;background:rgba(0,0,0,0)}.dropdown__list-item-label{text-align:left;white-space:wrap}.dropdown__list-item-description{margin-left:4px;color:#757f8c}.dropdown__list-item--modal{position:relative;width:100%;font-size:14px;line-height:20px;text-align:left;letter-spacing:.2px;color:#1f7499}.dropdown__list-item--modal::after{position:absolute;bottom:-2px;width:300%;height:1px;content:"";background-color:#e8e9ec;transform:translateX(-50%)}.dropdown__list-item--no-options{box-sizing:border-box}.dropdown__list-item:hover,.dropdown__list-item_active{background:#f2f2f8}.dropdown__list-item_disabled{pointer-events:none;opacity:.3}.dropdown__list-item-postfix{margin-left:4px}.dropdown__list--with-label{top:45px}.dropdown__arrow{position:absolute;top:50%;right:4px;display:flex;align-items:center;width:16px;height:16px;transform:translate(0, -50%)}.dropdown__arrow svg{width:16px;height:16px}.dropdown__active-icon{position:absolute;top:0;bottom:0;left:9px;display:none;align-items:center;margin:auto}.dropdown__active-icon_active{display:flex}.dropdown__active-icon_active svg{width:16px;height:16px}.dropdown-group{margin-top:10px}.dropdown-group__name{margin-bottom:6px;margin-left:17px;font-size:10px;text-transform:uppercase;color:#9aa0b9}.dropdown-label{margin-bottom:4px}.dropdown__error{position:absolute;top:50px;left:2px;display:block;font-size:10px;color:#f06d8d}.dropdown__footer{position:relative;z-index:2;display:flex;justify-content:space-between;align-items:center;box-sizing:border-box;width:100%;height:30px;padding:4px 32px 6px;background:#f8fbff}.dropdown.disabled{pointer-events:none;opacity:.5}@keyframes slideup{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@media(max-width: 768px),screen and (max-width: 1024px)and (orientation: landscape){.dropdown-mobile .dropdown__arrow{top:50% !important;right:16px !important;width:16px;height:16px;text-align:center;transform:translateY(-50%) rotate(90deg) !important}.dropdown-mobile .dropdown__arrow svg.mobile-icon{position:relative !important;top:5px !important;right:unset !important;display:flex;height:12px}.dropdown-mobile .dropdown__container{overflow:hidden !important}.dropdown-mobile .dropdown__container--opened{position:fixed;top:0 !important;left:0 !important;width:100dvw;height:100dvh;max-height:100dvh;background:rgba(23,29,51,.5);animation-name:fadeIn;animation-duration:.25s;animation-timing-function:ease;animation-fill-mode:forwards}.dropdown-mobile .dropdown__container-wrapper{position:fixed;top:0 !important;left:0 !important;overflow:hidden !important;box-sizing:border-box;width:100dvw;height:100dvh;max-height:100dvh;padding:8px;animation-name:slideup;animation-duration:.4s}.dropdown-mobile .dropdown__list{top:0;padding:16px !important}.dropdown-mobile .dropdown__list-wrapper{position:sticky;bottom:0;overflow:hidden;box-sizing:border-box;max-height:500px;border-radius:24px !important}.dropdown-mobile .dropdown__list-wrapper--with-bottom-shadow::after{position:absolute;z-index:6;bottom:0;width:100%;height:15px;content:"";opacity:1;background:linear-gradient(180deg, rgba(212, 218, 230, 0.5) 0%, rgba(212, 218, 230, 0.3) 21.35%, rgba(247, 248, 250, 0) 100%);transition:all .2s;transform:rotate(180deg)}.dropdown-mobile .dropdown__list-wrapper--with-bottom-shadow-hidden::after{opacity:0}.dropdown-mobile .dropdown__list-wrapper--fixed-height{height:500px !important}.dropdown-mobile .dropdown__list-header{position:relative;display:flex;flex-direction:column;justify-content:space-between;gap:16px;padding:16px;font-size:16px;font-weight:600;line-height:24px;letter-spacing:.1px;color:#3b414b}.dropdown-mobile .dropdown__list-header-row{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;min-height:24px}.dropdown-mobile .dropdown__list-header-row:first-child{padding-right:50px}.dropdown-mobile .dropdown__list-header-row .input__wrap{display:flex;align-items:center;width:100%;padding-right:8px;border:1px solid var(--form-input-border, #e1e8f1);border-radius:6px;background:var(--black-bg-color, #f8fbff) !important}.dropdown-mobile .dropdown__list-header-row .input__wrap input{background:unset !important}.dropdown-mobile .dropdown__list-header-row .input__close{display:flex;align-items:center;box-sizing:border-box;width:24px;min-width:24px;height:24px;padding:4px;border-radius:2px;background:var(--bg-gray-box, #f0f1f4)}.dropdown-mobile .dropdown__list-header-row .input__close::before,.dropdown-mobile .dropdown__list-header-row .input__close::after{top:50%;height:12px;border-radius:8px;background-color:#171d33;transform:translateY(-50%) rotate(45deg)}.dropdown-mobile .dropdown__list-header-row .input__close::after{transform:translateY(-50%) rotate(-45deg)}.dropdown-mobile .dropdown__list-header-with-shadow::after{position:absolute;z-index:10;bottom:-15px;left:0;width:100%;height:15px;content:"";opacity:1;background:linear-gradient(180deg, rgba(212, 218, 230, 0.5) 0%, rgba(212, 218, 230, 0.3) 21.35%, rgba(247, 248, 250, 0) 100%);transition:all .2s}.dropdown-mobile .dropdown__list-header-with-shadow-hidden::after{opacity:0}.dropdown-mobile .dropdown__list-close-icon{position:absolute;top:0;right:0;display:flex;justify-content:center;align-items:center;box-sizing:border-box;width:50px;height:50px;padding:16px}.dropdown-mobile .dropdown__list-close-icon svg{width:16px;height:16px;color:#a0a4b0}.dropdown-mobile .dropdown-group{margin:0 0 4px}.dropdown-mobile .dropdown-group:last-child{margin-bottom:16px}.dropdown-mobile .dropdown-group__name{margin:0 0 8px;padding:10px 0px 6px;font-size:11px;border-bottom:1px solid rgba(58,72,122,.15)}.dropdown-mobile .dropdown__list-item{display:flex;justify-content:space-between;height:auto !important;padding:10px 8px !important;line-height:24px}.dropdown-mobile .dropdown__list-item-label{white-space:wrap !important}.dropdown-mobile .dropdown__list-item-label span.bg--yellow{font-weight:600;background-color:unset !important}.dropdown-mobile .dropdown__list-item_active{border-radius:6px;background:var(--bg-gray-box, #f0f1f4) !important}.dropdown-mobile .dropdown__footer{position:absolute;z-index:4;bottom:0;display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;box-sizing:border-box;height:unset;padding:0;border:none;background:none}.dropdown-mobile .dropdown__footer-with-shadow::after{position:absolute;top:-15px;bottom:0;left:0;width:100%;height:15px;content:"";opacity:1;background:linear-gradient(180deg, rgba(212, 218, 230, 0.5) 0%, rgba(212, 218, 230, 0.3) 21.35%, rgba(247, 248, 250, 0) 100%);transition:all .2s;transform:rotate(180deg)}.dropdown-mobile .dropdown__footer-with-shadow-hidden::after{opacity:0}.dropdown-mobile .dropdown__footer button{box-sizing:border-box;width:100%;padding:8px 16px}}.dropdown-loader-box{position:absolute;z-index:100;opacity:.1;background:#fff;top:0;left:0;width:100%;height:100%}.lds-ring{position:relative;display:inline-block;width:100px;height:100px}.lds-ring.lds-ring_little{width:20px;height:20px}.lds-ring div{position:absolute;display:block;box-sizing:border-box;width:84px;height:84px;margin:8px;border:8px solid #000;border-color:#000 rgba(0,0,0,0) rgba(0,0,0,0);border-radius:50%;animation:lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite}.lds-ring_little div{width:20px;height:20px}.lds-ring div:nth-child(1){animation-delay:-0.45s}.lds-ring div:nth-child(2){animation-delay:-0.3s}.lds-ring div:nth-child(3){animation-delay:-0.15s}@keyframes lds-ring{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.date-range-input{--input-height: 28px;--label-line-height: 16px;--border-color: #e2e5ec;--calendar-range-point-color: #6b81dd;--font-family: roboto, sans-serif;--font-size: 13px;--line-height: 20px;--border-radius: 3px;position:relative;z-index:1}.date-range-input input::-webkit-outer-spin-button,.date-range-input input::-webkit-inner-spin-button{appearance:none}.date-range-input__label{margin-bottom:2px;font-family:var(--font-family);font-size:var(--font-size);line-height:var(--label-line-height)}.date-range-input__wraper{position:relative;box-sizing:border-box;width:100%;height:100%}.date-range-input__absolut-wraper{position:relative;z-index:1;display:flex;flex-flow:column nowrap;justify-content:flex-start;align-items:flex-start;width:100%;height:fit-content;background:rgba(0,0,0,0)}.date-range-input__absolut-wraper_right-position{right:0;left:auto}.date-range-input__static-part{display:flex;flex-flow:row nowrap;justify-content:flex-end;align-items:flex-start;box-sizing:border-box;width:100%;height:var(--input-height);border:1px solid var(--border-color);border-radius:var(--border-radius);background:#fff}.date-range-input_focused{z-index:2}.date-range-input_focused .date-range-input__static-part{border:1px solid blue;filter:drop-shadow(0 0 4px rgba(93, 120, 255, 0.5))}.date-range-input__toggle-button{display:flex;flex-direction:row;flex-flow:row nowrap;justify-content:flex-start;align-items:center;width:100%;height:100%;padding:0 10px;cursor:pointer}.date-range-input__interval-key{display:inline-block;margin-right:5px;text-align:left;white-space:nowrap;text-transform:capitalize;pointer-events:none}.date-range-input__range{display:flex;flex-flow:row wrap;justify-content:flex-start;align-items:center;word-wrap:break-word;pointer-events:none}.date-range-input__range-text{display:inline-block}.date-range-input__range-text:first-of-type{margin-right:5px}.date-range-input__range-text_little{font-size:calc(var(--font-size) - 2px)}.date-range-input__arrows-block{display:flex;flex-flow:row nowrap;justify-content:flex-start;align-items:center;box-sizing:border-box;width:fit-content;height:100%}.date-range-input__arrow{box-sizing:border-box;height:100%;cursor:pointer}.date-range-input__compact .date-range-input__toggle-button{padding-right:18px}.date-range-input_hide-arrows .date-range-input__toggle-button{padding:9px 18px}.date-range-input_error .date-range-input__wraper{border-color:#fa564c}.date-range-input_disabled .date-range-input__wraper{pointer-events:none;opacity:.7}.date-range-input_disabled .date-range-input__toggle-button{cursor:auto}.date-range-input__error-block{position:absolute;bottom:-20px;left:8px;font-size:var(--font-size);line-height:var(--line-height);color:#fa564c}.date-range-input__opened-part{width:fit-content;height:fit-content;background-color:rgba(0,0,0,0)}.opened-part{position:absolute;top:31px;left:0}.opened-part__wrapper{display:flex;flex-flow:row nowrap;justify-content:flex-start;align-items:stretch;border:1px solid var(--border-color);border-radius:var(--border-radius);background:#fff;box-shadow:0 4px 25px rgba(0,0,0,.25)}.opened-part__wrapper_right-position-once-element{justify-content:flex-end}.opened-part__intervals-list{width:fit-content;padding:6px 0;border-right:1px solid var(--border-color)}.opened-part__intervals-item{position:relative;display:flex;flex-flow:row nowrap;justify-content:flex-start;align-items:center;box-sizing:border-box;width:100%;padding:0 20px 0 30px;font-family:var(--font-family);font-size:12px;font-weight:300;font-style:normal;line-height:24px;cursor:pointer;white-space:nowrap;text-transform:capitalize}.opened-part__intervals-item:hover{background-color:#f2f2f8}.opened-part__intervals-item_active{background:#f2f2f8}.opened-part__intervals-item-icon-active{position:absolute;top:5px;left:10px}.opened-part__intervals-item_disabled{pointer-events:none;color:rgba(0,0,0,.3)}.opened-part__date-picker{width:fit-content;border:none}.opened-part--left{right:0;left:auto}.opened-part--top{top:auto;bottom:31px}.date-picker{display:flex;flex-flow:column nowrap;justify-content:space-between;align-items:flex-start}.date-picker__header{display:flex;flex-flow:column nowrap;justify-content:flex-start;align-items:flex-start;box-sizing:border-box;width:100%;height:fit-content;padding:7.5px 15px;border:none;background-color:#f7fafc}.date-picker__date-row{gap:8px;margin-right:0 !important}.date-picker__date-row .input__wrap{width:100% !important;margin:0 !important}.date-picker__inputs-block{display:flex;flex-flow:row nowrap;justify-content:flex-start;align-items:center;gap:8px;width:100%;height:fit-content;font-size:var(--font-size);line-height:var(--line-height)}.date-picker__inputs-block .date-picker__date-row>div:not(.date-picker__inputs-separator):not(.date-picker__date-input){box-sizing:border-box;min-width:100px;min-height:100%;margin-right:9px;border:1px solid var(--border-color)}.date-picker__inputs-block .date-picker__date-row>div:not(.date-picker__inputs-separator):not(.date-picker__date-input):last-child{margin-right:0}.date-picker__inputs-block .date-picker__date-row>div:not(.date-picker__inputs-separator):not(.date-picker__date-input).input__wrap{box-sizing:border-box;border-radius:var(--border-radius);box-shadow:none}.date-picker__inputs-block .date-picker__date-row>div:not(.date-picker__inputs-separator):not(.date-picker__date-input).input__wrap_focus{border:1px solid blue;box-shadow:none}.date-picker__inputs-block>div.dropdown{width:80px;border-radius:var(--border-radius)}.date-picker__inputs-block .date-picker__inputs-separator{margin:0 !important}.date-picker__inputs-block input{font-weight:300}.date-picker__date-row{display:flex;align-items:stretch;width:100%}.date-picker__date-input{box-sizing:border-box;padding:3px 10px;font-family:var(--font-family);font-size:var(--font-size);font-weight:300;font-style:normal;line-height:calc(var(--input-height)/2);letter-spacing:inherit;color:inherit;border-radius:var(--border-radius);background-color:#fff}.date-picker__date-input-emulation{display:flex;flex-flow:row nowrap;justify-content:flex-start;align-items:center;width:100%;height:100%;min-height:40px;padding:0px 15px !important;font-family:inherit;font-size:16px;font-weight:500;font-style:normal;line-height:22px;cursor:pointer;white-space:nowrap;letter-spacing:.2px;color:#3b414b;background-color:#fff}.date-picker__date-input-emulation span{display:block;width:100%;height:100%;padding-top:2px;line-height:24px}.date-picker__date-input-emulation_disabled{cursor:auto;pointer-events:none;opacity:.5}.date-picker__hour-select-input{box-sizing:border-box;width:70px;height:100%;min-height:100%;border-radius:var(--border-radius)}.date-picker__hour-select-input button{min-height:38px !important}.date-picker__hour-select-input>.dropdown__trigger{box-sizing:border-box;width:100%;height:28px;padding-right:15px;padding-left:10px;font-family:inherit;font-size:inherit;font-weight:inherit;font-style:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;border:none;box-shadow:none}.date-picker__hour-select-input>.dropdown__trigger>.text{padding:0}.date-picker__hour-select-input .dropdown__list-item{font-family:inherit;font-size:inherit;font-weight:inherit;font-style:inherit;line-height:inherit;letter-spacing:inherit;color:inherit}.date-picker__calendars{display:flex;flex-flow:row nowrap;justify-content:center;align-items:flex-start;box-sizing:border-box;width:100%;height:100%;padding:10px 16px;border-top:1px solid var(--border-color);border-bottom:1px solid var(--border-color);background-color:#fff}.date-picker__calendars-wrapper{display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:flex-start;width:100%}.date-picker__calendars .date-picker__calendar:first-child{margin-right:10px}.date-picker__calendars .range-calendar{box-sizing:border-box;width:fit-content;height:fit-content}.date-picker__calendars .range-calendar-header{display:flex;justify-content:space-between;align-items:center;height:fit-content;margin-bottom:12px;font-size:calc(var(--font-size) + 2px);font-weight:500;font-style:normal;line-height:calc(var(--line-height) + 4px)}.date-picker__calendars .range-calendar-header__title{text-align:center}.date-picker__calendars .range-calendar-header__next,.date-picker__calendars .range-calendar-header__prev{cursor:pointer;background-color:rgba(0,0,0,0)}.date-picker__calendars .range-calendar__week{display:flex}.date-picker__calendars .range-calendar__week-title{margin-bottom:5px}.date-picker__calendars .range-calendar__day{position:relative;display:flex;flex-grow:1;flex-basis:0;justify-content:center;align-items:center;box-sizing:border-box;width:29px;height:22px;margin:1px 0;font-size:var(--font-size);line-height:var(--line-height);user-select:none;text-align:center}.date-picker__calendars .range-calendar__day--clickable{cursor:pointer}.date-picker__calendars .range-calendar__day--clickable:hover{background:#e2e6f8}.date-picker__calendars .range-calendar__day--disabled{cursor:default;pointer-events:none;opacity:.2}.date-picker__calendars .range-calendar__day--disabled:hover{background:inherit}.date-picker__calendars .range-calendar__day--range-start,.date-picker__calendars .range-calendar__day--range-end{box-sizing:border-box;color:#f8fbff;border:1px solid var(--calendar-range-point-color);border-radius:var(--border-radius);background:var(--calendar-range-point-color)}.date-picker__calendars .range-calendar__day--range-start:hover,.date-picker__calendars .range-calendar__day--range-end:hover{color:#f8fbff;background:var(--calendar-range-point-color)}.date-picker__calendars .range-calendar__day--range-inside{background:#eaf2ff}.date-picker__calendars .range-calendar__day--prev-range-end{border-radius:var(--border-radius);background:#e2e5ec}.date-picker__calendars .range-calendar__day--prev-range-inside{background:#f7f8fa}.date-picker__calendars .range-calendar__day--title{font-size:var(--font-size);line-height:var(--line-height)}.date-picker__calendars .range-calendar__day--title:hover{background:inherit}.date-picker__footer{display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center;box-sizing:border-box;width:100%;padding:8px 16px;border:none;border-radius:0 0 var(--border-radius) 0;background-color:#f7fafc}.date-picker__footer_once-element{justify-content:flex-end}.date-picker__buttons-block{box-sizing:border-box;width:fit-content;height:100%}.date-picker__button{text-transform:capitalize}.date-picker__button:first-child{width:80px;margin-right:16px;border:1px solid #a6acb1;border-radius:var(--border-radius);background-color:#fff}.date-picker__button:last-child{width:110px;border-radius:var(--border-radius)}.date-picker__compare-block{box-sizing:border-box;width:fit-content;height:100%}@media screen and (max-width: 992px){.opened-part__intervals-list{display:none}}@media screen and (max-width: 768px){.date-picker-modal .modal__body{display:flex;flex-direction:column;gap:16px}.date-picker-modal .modal__footer button{height:40px;box-shadow:none}.date-picker-modal .modal__footer button.button_dark-outline{font-family:Sarabun;font-size:14.4px;font-weight:500;font-style:normal;line-height:150%;text-align:center;color:#171d33;border:1px solid #e1e8f1;border-radius:32px;background:var(--white, #fff)}.date-picker-modal .modal__footer button.button_primary{font-family:Sarabun;font-size:14.4px;font-weight:600;font-style:normal;line-height:150%;text-align:center;color:var(--white, #fff)}.date-picker.opened-part__date-picker{display:flex;flex-direction:column;gap:16px}.date-picker__header{padding:0 !important}.date-picker__inputs-block{display:flex;flex-direction:column;gap:16px}.date-picker__inputs-separator{display:none}.date-picker__hour-select-input{box-sizing:border-box}.date-picker__hour-select-input button{min-height:38px !important}.date-picker__calendars{border:1px solid var(--border-color);border-radius:var(--border-radius)}.date-picker__calendars-wrapper{display:flex;justify-content:center;align-items:center}.date-picker__calendar{margin:0 !important}}.input{position:relative;width:100%;padding:0 10px;word-break:break-all;border:none;background:none}.input::-webkit-outer-spin-button,.input::-webkit-inner-spin-button{appearance:none}.input__wrap{position:relative;display:flex;align-items:center;box-sizing:border-box;height:28px;border:1px solid #e2e5ec;border-radius:4px;background-color:#fff}.input__wrap_focus{border-color:#6b81dd;filter:drop-shadow(0 0 4px rgba(93, 120, 255, 0.5))}.input__wrap--disabled{pointer-events:none;opacity:.5;border-color:#a6acb1;background:#f7f8fa}.input__wrap_error{border-color:#f06d8d !important}.input__wrap .lds-ring.lds-ring_small{top:calc(50% - 18px)}.input_disabled{pointer-events:none;opacity:.5;border-color:#a6acb1;background:#f7f8fa}.input_error{border-color:#f06d8d}.input svg{margin-right:4px}.input__input{box-sizing:border-box;width:100%;height:100%;padding:0 5px;font-size:13px;font-weight:400;color:#1e1e2d;border:none;border-radius:4px}.input__close{position:relative;visibility:hidden;width:14px;height:14px;margin-right:4px;cursor:pointer;pointer-events:none;opacity:.6;background:none}.input__close:hover{opacity:1}.input__close::before,.input__close::after{position:absolute;top:0;right:0;left:0;width:2px;height:14px;margin:auto;content:"";background-color:#9aa0b9}.input__close::before{transform:rotate(45deg)}.input__close::after{transform:rotate(-45deg)}.input__nums{display:flex;align-items:center;height:100%}.input__num-btn{display:flex;justify-content:center;align-items:center;width:24px;height:100%;font-size:20px;cursor:pointer;user-select:none;border-left:1px solid #e2e5ec;background:none}.input__num-btn.disabled{opacity:.3}.input__num-btn svg{margin-right:0}.input-label{margin-bottom:5px}.input--with-icon{padding:0 40px 0 10px}.input__wrap:hover .input__close{visibility:visible;pointer-events:all}.radio-input{display:inline-flex;align-items:center;cursor:pointer}.radio-input_disabled .radio-input__input{cursor:auto;pointer-events:none;opacity:.3}.radio-input:hover .radio-input__input{background-color:#e2e5ec}.radio-input__input{position:relative;width:14px;min-width:14px;height:14px;min-height:14px;border:1px solid #a6acb1;border-radius:50%;background-color:#fff}.radio-input__mark{position:absolute;z-index:1;inset:0;display:none;width:10px;height:10px;margin:auto;border-radius:50%;background-color:#6b81dd}.radio-input .radio-input__radio:checked~.radio-input__mark{display:block}.radio-input__radio{position:absolute;width:0;height:0;opacity:0}.radio-input__label{margin-left:5px;font-size:13px;font-weight:400;user-select:none}.range-calendar,.calendar{display:flex;flex-direction:column;width:195px;min-height:195px;user-select:none}.range-calendar-header,.calendar-header{display:flex;justify-content:space-between;align-items:center;height:24px;margin-bottom:12px}.range-calendar-header__title,.calendar-header__title{display:flex;flex-grow:1;justify-content:center;align-items:center;font-weight:500;line-height:20px;text-align:center;color:#000}.range-calendar-header__next,.range-calendar-header__prev,.calendar-header__next,.calendar-header__prev{width:16px;height:16px;color:#171d33;border-radius:5px}.range-calendar__week,.calendar__week{display:flex}.range-calendar__day,.calendar__day{flex-grow:1;flex-basis:0;margin:1px 0;padding:1px 6px;font-size:13px;line-height:20px;user-select:none;text-align:center}.range-calendar__day--clickable,.calendar__day--clickable{cursor:pointer}.range-calendar__day--clickable:hover,.calendar__day--clickable:hover{background:#e2e6f8}.range-calendar__day--disabled,.calendar__day--disabled{cursor:default;pointer-events:none;color:#9aa0b9}.range-calendar__day--disabled:hover,.calendar__day--disabled:hover{background:inherit}.range-calendar__day--range-start,.range-calendar__day--range-end,.calendar__day--range-start,.calendar__day--range-end{color:#fff;border-radius:4px;background:#6b81dd}.range-calendar__day--range-start:hover,.range-calendar__day--range-end:hover,.calendar__day--range-start:hover,.calendar__day--range-end:hover{background:#6b81dd}.range-calendar__day--range-inside,.calendar__day--range-inside{background:#e2e6f8}.range-calendar__day--prev-range-end,.calendar__day--prev-range-end{border-radius:4px;background:#e2e5ec}.range-calendar__day--prev-range-inside,.calendar__day--prev-range-inside{background:#f7f8fa}.range-calendar__day--title,.calendar__day--title{font-size:10px;font-weight:normal;color:#9aa0b9}.range-calendar__day--title:hover,.calendar__day--title:hover{background:inherit}.switcher__button{display:inline-flex;align-items:center;font-family:inherit;font-size:inherit;font-weight:inherit;font-style:inherit;cursor:pointer;color:inherit}.switcher_disabled{pointer-events:none;opacity:.5}.switcher__button-content{box-sizing:border-box;width:26px;min-width:26px;height:16px;padding:1px;border-radius:8px;background-color:rgba(166,172,177,.5)}.switcher__button-content_active{background-color:#6b81dd}.switcher__button-content_active .switcher__ball{transform:translateX(calc(100% - 4px))}.switcher__ball{width:14px;height:14px;border-radius:50%;background-color:#fff;box-shadow:0 0 2px rgba(0,0,0,.5);transition:transform .2s ease}.switcher__label{margin-left:4px;font-family:inherit;font-size:inherit;font-weight:inherit;font-style:inherit;line-height:24px;user-select:none;text-align:left;color:inherit}.switcher__label_bold{font-weight:500}.switcher__wrap{display:inline-flex;align-items:center}.switcher__hint{margin-left:5px}.switcher__hint .hint__button svg{width:16px;min-width:16px}:root{--spinner-opacity: 0.1;--spinner-background: #fff;--spinner-width: 100px;--spinner-height: 100px;--spinner-small-width: 30px;--spinner-small-height: 30px;--spinner-border-width: 8px;--spinner-border-color: #000;--spinner-animation-duration: 1.2s;--spinner-animation-timing-function: cubic-bezier(0.5, 0, 0.5, 1);--spinner-animation-delay-1: -0.45s;--spinner-animation-delay-2: -0.3s;--spinner-animation-delay-3: -0.15s}.loader-box{position:absolute;z-index:100;opacity:var(--spinner-opacity, 0.1);background:var(--spinner-background, #fff);top:0;left:0;width:100%;height:100%}.lds-ring{position:relative;display:inline-block;width:var(--spinner-width, 100px);height:var(--spinner-height, 100px)}.lds-ring.lds-ring_small{top:calc(50% - 15px);width:var(--spinner-small-width, 30px);height:var(--spinner-small-height, 30px)}.lds-ring div{position:absolute;display:block;box-sizing:border-box;width:calc(var(--spinner-width, 100px) - 16px);height:calc(var(--spinner-height, 100px) - 16px);margin:8px;border:var(--spinner-border-width, 8px) solid var(--spinner-border-color, #000);border-color:var(--spinner-border-color, #000) rgba(0,0,0,0) rgba(0,0,0,0);border-radius:50%;animation:lds-ring var(--spinner-animation-duration, 1.2s) var(--spinner-animation-timing-function, cubic-bezier(0.5, 0, 0.5, 1)) infinite}.lds-ring_small div{top:-15%;left:-15%;width:100% !important;height:100% !important;border:calc(var(--spinner-border-width, 8px)/2) solid var(--spinner-border-color, #000) !important;border-color:var(--spinner-border-color, #000) rgba(0,0,0,0) rgba(0,0,0,0) !important}.lds-ring div:nth-child(1){animation-delay:var(--spinner-animation-delay-1, -0.45s)}.lds-ring div:nth-child(2){animation-delay:var(--spinner-animation-delay-2, -0.3s)}.lds-ring div:nth-child(3){animation-delay:var(--spinner-animation-delay-3, -0.15s)}@keyframes lds-ring{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.arrow{width:24px;height:24px}.arrow_disabled{pointer-events:none;opacity:.5}.arrow>svg{width:100%;height:100%;pointer-events:none}.button{position:relative;display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;height:28px;padding:3px 10px;font-size:13px;line-height:20px;cursor:pointer;user-select:none;text-align:center;white-space:nowrap;border-radius:3px;box-shadow:0 2px 5px rgba(0,0,0,.1)}.button:disabled{pointer-events:none;opacity:.5}.button_warning{color:#fff;border:1px solid #f06d8d;background-color:#f06d8d}.button_warning:hover{filter:brightness(1.1)}.button_dark-outline{color:#1e1e2d;border:1px solid #bac2c9}.button_dark-outline:hover{background-color:#f2f2f8}.button_primary{color:#fff;border:1px solid #6b81dd;background-color:#6b81dd}.button_primary:hover{filter:brightness(1.1)}.button_secondary{color:#fff;border:1px solid #bac2c9;background-color:#bac2c9}.button_secondary:hover{filter:brightness(1.1)}.button_ellipse-apply{padding:8px 16px;font-family:Sarabun,sans-serif;font-size:16px;font-weight:500;font-style:normal;line-height:24px;letter-spacing:.1px;color:#fff;border-radius:40px;background:#1f7499}.button_ellipse-cancel{padding:8px 18px;font-family:Sarabun,sans-serif;font-size:14px;font-weight:normal;font-style:normal;line-height:20px;letter-spacing:.2px;color:#1f7499;border-radius:32px}.button_link{color:#6b81dd;box-shadow:none}.button_link svg{display:none}.button_success{color:#fff;border:1px solid #7ac48c;background-color:#7ac48c}.button_success:hover{filter:brightness(1.1)}.button__text{display:flex;justify-content:center;align-items:center;width:100%;box-shadow:none}.button:active{filter:brightness(1.1)}.button__icon{width:auto;min-width:15px;height:25px}.button_icon-left .button__text{margin-left:5px}.button_icon-right .button__text{order:1;margin-right:5px;margin-left:0}.button_icon-right svg{order:2}.text-ellipsis{display:block;overflow:hidden;width:100%;white-space:nowrap;text-overflow:ellipsis}.hint{position:relative;display:inline-block;font-size:0}.hint__container{position:fixed;z-index:99999;display:block;box-sizing:border-box}.hint__button{display:flex;cursor:pointer}.hint__button svg{width:16px;height:16px;margin-right:5px}.hint__button:hover,.hint__button_active{color:#6b81dd}.hint__button:hover svg,.hint__button_active svg{color:#6b81dd}.hint__text{position:absolute;z-index:1;min-width:80px;max-width:250px;padding:8px;font-size:10px;line-height:16px;color:#fff;border-radius:4px;background-color:#6b81dd}.hint__text a{text-decoration:underline;color:#fff}.hint__text::before{position:absolute;width:8.5px;height:8.5px;content:"";background-color:#6b81dd;transform:rotate(45deg)}.hint__text_bottom{top:26px;left:-4px}.hint__text_bottom::before{top:-4.25px;left:8px}.hint__text_centeredBottom{top:26px;left:50%;transform:translateX(-50%)}.hint__text_centeredBottom::before{top:-4.25px;left:calc(50% - 8px)}.hint__text_right{top:-4px;left:calc(100% + 8px)}.hint__text_right::before{top:8px;left:-4.25px}.hint__text_left{top:-4px;right:calc(100% + 8px);left:unset}.hint__text_left::before{top:8px;right:-4.25px}.hint__text_top{bottom:8px;left:-4px}.hint__text_top::before{bottom:-4.25px;left:8px}.hint__text_centeredTop{bottom:8px;left:50%;transform:translateX(-50%)}.hint__text_centeredTop::before{bottom:-4.25px;left:calc(50% - 8px)}.hint__icon.outlined{color:#9aa0b9}.hint__icon.filled{color:#fff}.modal{--modal-overlay-bg: black;--modal-overlay-opacity: 0.5;--modal-bg: #fff;--modal-header-bg: #f7fafc;--modal-body-bg: #f7fafc;--modal-footer-bg: #f7fafc;--modal-border-color: #e2e5ec;--modal-title-color: vars.$color--primary;--modal-title-font-size: 16px;--modal-title-font-weight: 400;--modal-width: 600px;--modal-min-height: 300px;--modal-margin: 0 10px;--modal-padding: 15px;--modal-header-padding: 10px 15px;--modal-footer-padding: 7.5px 15px;--modal-border-radius: 6px;--modal-inner-radius: 4px;--modal-box-shadow: 0 20px 20px rgb(0 0 0 / 20%);--modal-close-btn-size: 40px;--modal-close-icon-size: 20px;--modal-close-btn-color: #1e1e2d;--modal-close-hover-bg: #e2e5ec;--modal-primary-bg: #6b81dd;--modal-primary-title-color: #ffffff;--modal-primary-close-hover: #5162d4;--max-height: calc(100% - 30px);position:relative;z-index:5;display:flex;flex-direction:column;width:var(--modal-width, 600px);min-height:var(--modal-min-height, 300px);max-height:var(--max-height, calc(100% - 30px));margin:var(--modal-margin, 0 10px);border-radius:var(--modal-border-radius, 6px);background-color:var(--modal-bg, #fff);box-shadow:var(--modal-box-shadow, 0 20px 20px rgba(0, 0, 0, 0.2))}.modal__header{position:relative;display:flex;justify-content:space-between;align-items:center;padding:var(--modal-header-padding, 10px 15px);border-bottom:1px solid var(--modal-border-color, #e2e5ec);border-top-left-radius:var(--modal-inner-radius, 4px);border-top-right-radius:var(--modal-inner-radius, 4px);background-color:var(--modal-header-bg, #f7fafc)}.modal__header-primary{background-color:var(--modal-primary-bg, #6b81dd)}.modal__header-primary-title{font-size:var(--modal-title-font-size, 16px);font-weight:var(--modal-title-font-weight, 400);color:var(--modal-primary-title-color, #ffffff)}.modal__header-title{font-size:var(--modal-title-font-size, 16px);font-weight:normal;color:var(--modal-title-color, #6b81dd)}.modal__body{overflow-y:auto;flex-grow:1;box-sizing:border-box;padding:var(--modal-padding, 15px);border-bottom-right-radius:var(--modal-inner-radius, 4px);border-bottom-left-radius:var(--modal-inner-radius, 4px);background-color:var(--modal-body-bg, #f7fafc)}.modal__body scrollbar{-moz-appearance:none !important}.modal__body scrollbarbutton{-moz-appearance:none !important}.modal__body thumb{-moz-appearance:none !important}.modal__body scrollcorner{-moz-appearance:none !important;resize:both}.modal__body::-webkit-scrollbar{width:4px}.modal__body::-webkit-scrollbar-thumb{-webkit-border-radius:3px;border-radius:3px;background:#bac2c9}.modal__body::-webkit-scrollbar-thumb:hover{background:#9aa0b9}.modal__body::-webkit-scrollbar:horizontal{height:8px}.modal__body::-webkit-scrollbar-track:horizontal{background:inherit}.modal__body::-webkit-scrollbar-thumb:horizontal{-webkit-border-radius:6px;border-radius:6px;background:#bac2c9;background-clip:padding-box;border:2px solid rgba(0,0,0,0)}.modal__body::-webkit-scrollbar-thumb:horizontal:hover{background:#9aa0b9;border:1px solid rgba(0,0,0,0);background-clip:padding-box}.modal__body:first-of-type{overflow-x:hidden;border-top-left-radius:var(--modal-inner-radius, 4px);border-top-right-radius:var(--modal-inner-radius, 4px)}.modal__body--no-footer{padding:var(--modal-padding, 15px)}.modal__footer{display:flex;justify-content:flex-end;align-items:center;padding:var(--modal-footer-padding, 7.5px 15px);border-top:1px solid var(--modal-border-color, #e2e5ec);border-bottom-right-radius:var(--modal-inner-radius, 4px);border-bottom-left-radius:var(--modal-inner-radius, 4px);background-color:var(--modal-footer-bg, #f7fafc)}.modal__footer_with-left-content{justify-content:space-between}.modal__footer--inbody{position:absolute;bottom:0;left:0;width:calc(100% - 30px);background-color:var(--modal-bg, #fff)}.modal__buttons-block{display:flex;flex-flow:row nowrap;justify-content:flex-start;align-items:center}.modal-overlay{position:fixed;z-index:4;top:0;left:0;width:100%;height:100%;opacity:var(--modal-overlay-opacity, 0.5);background-color:var(--modal-overlay-bg, black);transition:opacity .2s ease}.modal__footer--noborder{border-top:none}.modal-box{position:fixed;z-index:100;inset:0;animation-name:fadeIn;animation-duration:.25s;animation-timing-function:ease;animation-fill-mode:forwards}@keyframes fadeIn{from{opacity:0}to{opacity:1}}.consumer-info-modal{overflow-x:auto}.consumer-info-modal .button-fin{background-color:#fff}.consumer-info-modal .modal__body{min-height:200px;padding:0 15px}.modal-close-icon-box{position:absolute;top:0;right:0;display:flex;justify-content:center;align-items:center;width:var(--modal-close-btn-size, 40px);height:100%;cursor:pointer;color:var(--modal-close-btn-color, #1e1e2d);border-top-right-radius:var(--modal-inner-radius, 4px);background:rgba(0,0,0,0)}.modal-close-icon-box:hover{background-color:var(--modal-close-hover-bg, #e2e5ec)}.modal-close-icon-box-primary{color:var(--modal-close-btn-color, #1e1e2d)}.modal-close-icon-box-primary:hover{opacity:1;background-color:var(--modal-primary-close-hover, #5162d4)}.modal-close-icon-box-merchant{color:var(--modal-close-btn-color, #1e1e2d)}.modal-close-icon-box-merchant:hover{opacity:1;background-color:var(--modal-primary-close-hover, #5162d4)}.modal-close-icon{width:var(--modal-close-icon-size, 20px);min-width:var(--modal-close-icon-size, 20px);height:var(--modal-close-icon-size, 20px)}.modal-text-card{padding:15px 0;font-size:13px;font-weight:400;line-height:20px;text-align:left;white-space:normal}.prompt-text-card{padding:0}.included-selector-modal--box{overflow-x:auto;max-height:calc(100% - 32px)}.included-selector-modal__th--id{width:1%}.included-selector-modal__td--id{color:#9aa0b9}.included-selector-modal .simple-table{overflow-x:unset;min-height:400px;max-height:500px}.included-selector-modal .simple-table thead{background-color:unset}.included-selector-modal .simple-table thead th{padding:10px 15px;font-weight:400;border-right:1px solid var(--modal-border-color, #e2e5ec)}.included-selector-modal .simple-table thead th:first-child,.included-selector-modal .simple-table thead th:last-child{border:none}.included-selector-modal .simple-table tbody tr:first-child{position:relative}.included-selector-modal .simple-table tbody tr:first-child::after{position:absolute;top:0;left:0;width:100%;height:8px;content:"";background:linear-gradient(180deg, rgba(0, 0, 0, 0.152) 0%, rgba(0, 0, 0, 0) 100%)}.included-selector-modal .simple-table tbody tr:last-child{border-bottom:none}.included-selector-modal .simple-table td{padding:2.25px 15px}.included-selector-modal .simple-table .tr-as-selector:hover td{background-color:#ffedc8}.reports-settings-modal-box .modal__body{padding:0}.confirm-modal{border-radius:var(--modal-inner-radius, 4px)}.confirm-modal .modal__header-title{font-size:13px;font-weight:700}.confirm-modal .modal__body .modal-text-card{padding:0}.confirm-modal .modal__footer{background-color:var(--modal-bg, #fff)}.modal-close-icon-box--hidden{display:none}@keyframes slideup{from{transform:translateY(100%)}to{transform:translateY(0)}}@media only screen and (max-width: 768px),(width <= 1024px)and (orientation: landscape){.modal-mobile-container{--modal-container-z-index: 100;--modal-container-width: 100dvw;--modal-container-height: 100dvh;--modal-container-border-radius: 16px;--modal-content-margin-top: 16px;--modal-animation-duration: 0.4s;--modal-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.15);position:relative;z-index:var(--modal-container-z-index, 100);overflow-y:auto;box-sizing:border-box;width:var(--modal-container-width, 100dvw);height:var(--modal-container-height, 100dvh);border-radius:var(--modal-container-border-radius, 16px) var(--modal-container-border-radius, 16px) 0 0}.modal-mobile-container .modal{--modal-header-footer-width: 100%;--modal-header-top: 0;--modal-footer-bottom: 0;max-width:100vw;max-height:unset !important;margin-top:var(--modal-content-margin-top, 16px) !important;border-radius:var(--modal-container-border-radius, 16px) var(--modal-container-border-radius, 16px) 0 0;animation-name:slideup;animation-duration:var(--modal-animation-duration, 0.4s)}.modal-mobile-container .modal__header,.modal-mobile-container .modal__footer{z-index:2;left:0;box-sizing:border-box;width:var(--modal-header-footer-width, 100%)}.modal-mobile-container .modal__header--hidden,.modal-mobile-container .modal__footer--hidden{position:relative}.modal-mobile-container .modal__header--sticky,.modal-mobile-container .modal__footer--sticky{position:sticky;box-shadow:var(--modal-shadow, 0px 0px 16px 0px rgba(0, 0, 0, 0.15))}.modal-mobile-container .modal__header{top:var(--modal-header-top, 0)}.modal-mobile-container .modal__footer{bottom:var(--modal-footer-bottom, 0);border-radius:0 !important}.modal-mobile-container .modal:not(.modal--no-header) .modal__body{border-radius:0 !important}}.filter-chip{position:relative;display:inline-flex;max-width:100%;font-size:13px;color:#1e1e2d}.filter-chip button{font-family:inherit}.filter-chip__box{display:inline-flex;overflow:hidden;flex:1 1 auto;align-items:center;box-sizing:border-box;min-width:0;min-height:28px;border:1px solid #d3daf5;border-radius:999px;background:#eef1fb;transition:background-color 120ms ease-out,border-color 120ms ease-out}.filter-chip--editing .filter-chip__box{border-color:#6b81dd;background:#e2e6f8}.filter-chip--empty .filter-chip__box{border:1px dashed #bac2c9;background:#fff}.filter-chip--invalid .filter-chip__box{border:1px dashed #d92d20;background:#fff5f5}.filter-chip--paused .filter-chip__box{opacity:.4;filter:grayscale(1)}.filter-chip--expanded .filter-chip__box{align-items:flex-start;max-width:min(560px,100vw - 80px);border-radius:14px}.filter-chip--expanded .filter-chip__body{flex-wrap:wrap;align-items:baseline;height:auto;min-height:26px;padding-top:3px;padding-bottom:3px;white-space:normal}.filter-chip--permanent .filter-chip__box{border:1px solid #e2e5ec;border-radius:4px;background:#fff}.filter-chip--permanent.filter-chip--editing .filter-chip__box{border-color:#6b81dd}.filter-chip--permanent .filter-chip__body{padding-right:6px}.filter-chip--permanent .filter-chip__label{font-weight:500;color:#1e1e2d}.filter-chip--permanent .filter-chip__value{font-weight:400}.filter-chip--mobile .filter-chip__box{min-height:32px}.filter-chip--mobile .filter-chip__body,.filter-chip--mobile .filter-chip__x,.filter-chip--mobile .filter-chip__arrow{height:30px}.filter-chip__body{display:inline-flex;flex:1 1 auto;align-items:center;gap:4px;min-width:0;height:26px;padding:0 4px 0 10px;font-size:13px;line-height:20px;cursor:pointer;text-align:left;white-space:nowrap;color:#1e1e2d;border:0;background:rgba(0,0,0,0)}.filter-chip__body:disabled{cursor:default}.filter-chip__body:focus-visible{outline:2px solid #6b81dd;outline-offset:-2px}.filter-chip__arrow+.filter-chip__body{padding-left:2px}.filter-chip__label{color:#5b6178}.filter-chip__value{overflow:hidden;min-width:0;font-weight:500;text-overflow:ellipsis}.filter-chip__value--placeholder{font-weight:400;color:#9aa0b9}.filter-chip--invalid .filter-chip__value{color:#d92d20}.filter-chip__badges{display:inline-flex;flex-wrap:wrap;align-items:center;gap:4px;min-width:0}.filter-chip__badge-slot{display:inline-flex}.filter-chip__group-badge{display:inline-flex;align-items:center;box-sizing:border-box;height:20px;padding:0 8px;font-size:11px;font-weight:500;line-height:20px;white-space:nowrap;border:1px solid #d5d9e2;border-radius:15px;background:#eef0f4}.filter-chip__tag{display:inline-flex;align-items:center;padding:1px 4px;font-size:11px;font-weight:400;line-height:20px;white-space:nowrap;color:#1e1e2d;border-radius:3px;background:#f1f0f0}.filter-chip__excluded{text-decoration:line-through;text-decoration-color:#c81e4b}.filter-chip__more{font-size:12px;font-weight:500;white-space:nowrap;color:#5b6178}.filter-chip__arrow,.filter-chip__x{display:inline-flex;flex:none;justify-content:center;align-items:center;height:26px;padding:0;cursor:pointer;color:#5b6178;border:0;background:rgba(0,0,0,0)}.filter-chip__arrow:disabled,.filter-chip__x:disabled{cursor:default;color:#bac2c9}.filter-chip__arrow:focus-visible,.filter-chip__x:focus-visible{outline:2px solid #6b81dd;outline-offset:-2px}.filter-chip__arrow{width:22px;color:#1e1e2d}.filter-chip__arrow:first-child{margin-left:4px}.filter-chip__x{width:24px}.filter-chip__sr-only{position:absolute;overflow:hidden;clip:rect(0 0 0 0);width:1px;height:1px;white-space:nowrap}.filter-chip__popover{position:absolute;z-index:30;top:calc(100% + 4px);left:0;box-sizing:border-box;padding:12px;border:1px solid #e2e5ec;border-radius:6px;background:#fff;box-shadow:0 12px 32px rgba(30,30,45,.14)}.filter-chip__popover--right{right:0;left:auto}.filter-chip .date-range-input_custom-trigger{display:inline-flex;max-width:100%}.filter-chip .date-range-input_custom-trigger>.date-range-input__label{display:none}.filter-chip .date-range-input_custom-trigger .date-range-input__wraper,.filter-chip .date-range-input_custom-trigger .date-range-input__absolut-wraper{width:auto;max-width:100%}.filter-chip .date-range-input_custom-trigger .opened-part{top:calc(100% + 4px)}.filter-chip-editor{display:flex;flex-direction:column;gap:10px;font-size:13px;text-align:left;color:#1e1e2d}.filter-chip-editor button{font-family:inherit}.filter-chip-editor__sr-only{position:absolute;overflow:hidden;clip:rect(0 0 0 0);width:1px;height:1px;white-space:nowrap}.filter-chip-editor__head{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:24px}.filter-chip-editor__title{font-size:12px;font-weight:500;letter-spacing:.04em;text-transform:uppercase;color:#5b6178}.filter-chip-editor__switch{display:inline-flex;align-items:center;gap:8px;height:24px;padding:0 2px;font-size:13px;cursor:pointer;white-space:nowrap;color:#1e1e2d;border:0;background:rgba(0,0,0,0)}.filter-chip-editor__switch-track{position:relative;flex:none;width:28px;height:16px;border-radius:999px;background:#bac2c9;transition:background 120ms ease-out}.filter-chip-editor__switch-track--on{background:#6b81dd}.filter-chip-editor__switch-knob{position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(30,30,45,.25);transition:transform 120ms ease-out}.filter-chip-editor__switch-track--on .filter-chip-editor__switch-knob{transform:translateX(12px)}.filter-chip-editor__segmented{display:flex;gap:2px;padding:2px;border-radius:4px;background:#eef0f4}.filter-chip-editor__segment{flex:1 1 0;min-width:0;height:24px;padding:0 8px;font-size:13px;cursor:pointer;white-space:nowrap;color:#5b6178;border:0;border-radius:3px;background:rgba(0,0,0,0)}.filter-chip-editor__segment--on{font-weight:500;color:#1e1e2d;background:#fff;box-shadow:0 1px 2px rgba(30,30,45,.14)}.filter-chip-editor__input{box-sizing:border-box;width:100%;min-width:0;height:28px;padding:0 12px;font-size:13px;color:#1e1e2d;border:1px solid #e2e5ec;border-radius:4px;background:#fff;transition:border-color 160ms ease-out,background-color 160ms ease-out}.filter-chip-editor__input::placeholder{opacity:1;color:#9aa0b9}.filter-chip-editor__input:focus{border-color:#6b81dd;outline:none}.filter-chip-editor__input[aria-invalid=true],.filter-chip-editor__input--error{border-color:#d92d20;background-color:#fff5f5}.filter-chip-editor__search{position:relative;display:flex;align-items:center}.filter-chip-editor__search-icon{position:absolute;left:10px;display:inline-flex;pointer-events:none;color:#9aa0b9}.filter-chip-editor__search-input{padding-left:30px}.filter-chip-editor__list-block{display:flex;flex-direction:column;gap:6px}.filter-chip-editor__selection{display:flex;justify-content:space-between;align-items:center;min-height:24px;font-size:12px;color:#5b6178}.filter-chip-editor__link{height:24px;padding:0 6px;font-size:13px;cursor:pointer;color:#4f66c9;border:0;border-radius:3px;background:rgba(0,0,0,0)}.filter-chip-editor__link--danger{color:#c81e4b}.filter-chip-editor__list{display:flex;overflow-y:auto;flex-direction:column;max-height:320px;margin:0 -6px;padding:0 6px}.filter-chip-editor__note{padding:16px 4px;color:#5b6178}.filter-chip-editor__option{display:flex;align-items:center;gap:10px;min-height:28px;padding:0 4px;cursor:pointer;border-radius:3px}.filter-chip-editor__option input{flex:none;width:14px;height:14px;margin:1px;accent-color:#6b81dd}.filter-chip-editor__option:hover{background:#f5f7fb}.filter-chip-editor__option-label{min-width:0}.filter-chip-editor__mark{padding:0;color:inherit;border-radius:2px;background:#fff3a8}.filter-chip-editor__group{display:flex;flex-direction:column;padding:4px 0 6px;border-bottom:1px solid #eef0f4}.filter-chip-editor__group-head{display:flex;align-items:center;gap:2px}.filter-chip-editor__chevron{display:inline-flex;flex:none;justify-content:center;align-items:center;width:22px;height:28px;padding:0;cursor:pointer;color:#5b6178;border:0;border-radius:3px;background:rgba(0,0,0,0)}.filter-chip-editor__chevron svg{transition:transform 160ms ease-out}.filter-chip-editor__chevron--open svg{transform:rotate(90deg)}.filter-chip-editor__group-toggle{display:flex;flex:1;align-items:center;gap:10px;min-height:28px;padding:0 4px;cursor:pointer;text-align:left;border:0;border-radius:3px;background:rgba(0,0,0,0)}.filter-chip-editor__box{display:inline-flex;flex:none;justify-content:center;align-items:center;box-sizing:border-box;width:14px;height:14px;margin:1px;border:1.5px solid #767c86;border-radius:3px;background:#fff}.filter-chip-editor__box--on{border:1px solid #6b81dd;background:#6b81dd}.filter-chip-editor__group-name{font-size:11px;font-weight:500;letter-spacing:.05em;text-transform:uppercase;color:#5b6178}.filter-chip-editor__group-count{font-size:11px;color:#5b6178}.filter-chip-editor__group-items{display:flex;flex-direction:column;margin-left:35px;padding-left:4px;border-left:1px solid #e2e5ec}.filter-chip-editor__tag-row{display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:34px;padding:0 4px;border-bottom:1px solid #eef0f4}.filter-chip-editor__tag-label{min-width:0}.filter-chip-editor__tag-actions{display:flex;flex:none;gap:4px}.filter-chip-editor__toggle{box-sizing:border-box;height:24px;padding:0 8px;font-size:12px;cursor:pointer;color:#1e1e2d;border:1px solid #bac2c9;border-radius:3px;background:rgba(0,0,0,0)}.filter-chip-editor__toggle--include{color:#fff;border-color:#1f7a3a;background:#1f7a3a}.filter-chip-editor__toggle--exclude{color:#fff;border-color:#c81e4b;background:#c81e4b}.filter-chip-editor__hint{font-size:12px;line-height:16px;color:#5b6178}.filter-chip-editor__range-block{display:flex;flex-direction:column;gap:6px}.filter-chip-editor__range{display:flex;align-items:flex-end;gap:8px}.filter-chip-editor__range-field{display:flex;flex:1 1 0;flex-direction:column;gap:2px;min-width:0;font-size:12px;font-weight:500;line-height:20px}.filter-chip-editor__range-field .filter-chip-editor__input{padding-right:4px}.filter-chip-editor__range-field .filter-chip-editor__input::-webkit-inner-spin-button{appearance:auto}.filter-chip-editor__range-field .filter-chip-editor__input[type=number]{appearance:auto}.filter-chip-editor__range-dash{flex:none;padding-bottom:5px;color:#5b6178}.filter-chip-editor__error{font-size:12px;line-height:16px;color:#c81e1e}.filter-chip-editor__radios{display:flex;flex-direction:column}.filter-chip-editor__radio{display:flex;justify-content:space-between;align-items:center;min-height:32px;padding:0 4px;font-size:13px;cursor:pointer;text-align:left;color:#1e1e2d;border:0;border-bottom:1px solid #eef0f4;background:rgba(0,0,0,0)}.filter-chip-editor__radio--on{font-weight:500}.filter-chip-editor__radio--on::after{content:"✓";color:#6b81dd}.filter-chip-editor__radio--static{cursor:default}.filter-chip-editor__footer{display:flex;justify-content:space-between;align-items:center;padding-top:10px;border-top:1px solid #eef0f4}.filter-chip-editor__btn{box-sizing:border-box;height:28px;padding:0 12px;font-size:13px;cursor:pointer;color:#fff;border:1px solid #6b81dd;border-radius:3px;background:#6b81dd;box-shadow:0 0 1px rgba(0,0,0,.15),0 4px 2px rgba(0,0,0,.05)}.filter-chip-editor--mobile .filter-chip-editor__input{height:32px}.filter-chip-editor--mobile .filter-chip-editor__list{max-height:none}.filter-chip-editor--mobile .filter-chip-editor__option{min-height:32px}.filter-chip-editor--mobile .filter-chip-editor__btn{height:32px;padding:0 16px}@media(prefers-reduced-motion: reduce){.filter-chip__box,.filter-chip-editor__chevron svg,.filter-chip-editor__switch-track,.filter-chip-editor__switch-knob{transition:none}}
|
|
@@ -3,7 +3,7 @@ import { useResize } from "../../../../Functions/useResize.js";
|
|
|
3
3
|
import { capitalized } from "../../../../Functions/utils.js";
|
|
4
4
|
import Modal from "../../../UI/Modal/Modal.js";
|
|
5
5
|
import Dropdown from "../../Dropdown/Dropdown.js";
|
|
6
|
-
import { CUSTOM_INTERVAL_KEY, INTERVALS } from "../dependencies.js";
|
|
6
|
+
import { CUSTOM_INTERVAL_KEY, INTERVALS, MAIN_FORMAT } from "../dependencies.js";
|
|
7
7
|
import Datepicker from "./Datepicker.js";
|
|
8
8
|
import SelectItem from "./SelectItem.js";
|
|
9
9
|
import cn from "classnames";
|
|
@@ -13,7 +13,7 @@ import { createPortal } from "react-dom";
|
|
|
13
13
|
import moment from "moment-timezone";
|
|
14
14
|
// src/Atomic/FormElements/InputDateRange/components/OpenedPart.tsx
|
|
15
15
|
var OpenedPart = (props) => {
|
|
16
|
-
const { dateRangeContainerId, txt, buttonsTypes, actualValues, onChange = () => {}, isCompact = false, isIntervalsHidden = false, isCompareHidden = false, limitRange, isOptionsRight, current, setCurrent, isCompare, setIsCompare, toggleOff, isShortWeekNames, minDate, maxDate, momentMinDate, momentMaxDate, isDontLimitFuture, isListTop, mainId, testId, withMobileLogic, isDoNotPullOutListOfMainContainer, renderIntervals = [
|
|
16
|
+
const { dateRangeContainerId, txt, buttonsTypes, actualValues, onChange = () => {}, isCompact = false, isIntervalsHidden = false, isCompareHidden = false, limitRange, isOptionsRight, current, setCurrent, isCompare, setIsCompare, toggleOff, isShortWeekNames, minDate, maxDate, momentMinDate, momentMaxDate, isDontLimitFuture, isListTop, mainId, testId, withMobileLogic, isDoNotPullOutListOfMainContainer, isApplyRequired = false, renderIntervals = [
|
|
17
17
|
"today",
|
|
18
18
|
"yesterday",
|
|
19
19
|
"thisWeek",
|
|
@@ -42,8 +42,21 @@ var OpenedPart = (props) => {
|
|
|
42
42
|
}, {}) : INTERVALS;
|
|
43
43
|
const items = isCompact ? [...Object.keys(filteredIntervals)] : [...Object.keys(filteredIntervals), CUSTOM_INTERVAL_KEY];
|
|
44
44
|
const [activeInterval, setActiveInterval] = useState(actualValues?.intervalKey ?? "");
|
|
45
|
+
const [pendingPreset, setPendingPreset] = useState(null);
|
|
46
|
+
const [pickerValues, setPickerValues] = useState(actualValues);
|
|
47
|
+
const [pickerKey, setPickerKey] = useState(0);
|
|
45
48
|
const handleItemClick = (item) => {
|
|
46
|
-
if (item !== "customDate") {
|
|
49
|
+
if (item !== "customDate" && isApplyRequired) {
|
|
50
|
+
const interval = filteredIntervals[item];
|
|
51
|
+
setPendingPreset(item);
|
|
52
|
+
setActiveInterval(item);
|
|
53
|
+
setPickerValues({
|
|
54
|
+
start: moment(interval.start()).format(MAIN_FORMAT),
|
|
55
|
+
end: moment(interval.end()).format(MAIN_FORMAT),
|
|
56
|
+
compare: isCompare
|
|
57
|
+
});
|
|
58
|
+
setPickerKey((key) => key + 1);
|
|
59
|
+
} else if (item !== "customDate") {
|
|
47
60
|
onChange({
|
|
48
61
|
intervalKey: item,
|
|
49
62
|
compare: isCompare
|
|
@@ -52,6 +65,17 @@ var OpenedPart = (props) => {
|
|
|
52
65
|
}
|
|
53
66
|
setCurrent(item);
|
|
54
67
|
};
|
|
68
|
+
const isSameDates = (dates) => !!pendingPreset && dates.start === pickerValues.start && dates.end === pickerValues.end;
|
|
69
|
+
const shownInterval = isSameDates(mobileChange) ? pendingPreset : activeInterval;
|
|
70
|
+
const applyDates = (data) => {
|
|
71
|
+
onChange(isSameDates(data) ? {
|
|
72
|
+
intervalKey: pendingPreset,
|
|
73
|
+
compare: isCompare
|
|
74
|
+
} : {
|
|
75
|
+
intervalKey: current,
|
|
76
|
+
...data
|
|
77
|
+
});
|
|
78
|
+
};
|
|
55
79
|
const getSelectedMode = (newValues) => {
|
|
56
80
|
const { start, end } = newValues;
|
|
57
81
|
if (moment(start).get("hour") !== 0 || moment(end).get("hour") !== 0) return CUSTOM_INTERVAL_KEY;
|
|
@@ -64,13 +88,10 @@ var OpenedPart = (props) => {
|
|
|
64
88
|
testId,
|
|
65
89
|
className: cn("opened-part__date-picker"),
|
|
66
90
|
buttonsTypes,
|
|
67
|
-
values: actualValues,
|
|
91
|
+
values: isApplyRequired ? pickerValues : actualValues,
|
|
68
92
|
onChangeMobile: setMobileChange,
|
|
69
93
|
onChange: (data) => {
|
|
70
|
-
|
|
71
|
-
intervalKey: current,
|
|
72
|
-
...data
|
|
73
|
-
});
|
|
94
|
+
applyDates(data);
|
|
74
95
|
toggleOff();
|
|
75
96
|
},
|
|
76
97
|
getSelectedMode,
|
|
@@ -88,7 +109,7 @@ var OpenedPart = (props) => {
|
|
|
88
109
|
isDontLimitFuture,
|
|
89
110
|
withMobileLogic: withMobileLogic && isMobile,
|
|
90
111
|
isDoNotPullOutListOfMainContainer
|
|
91
|
-
});
|
|
112
|
+
}, pickerKey);
|
|
92
113
|
};
|
|
93
114
|
const renderOpenedPart = () => {
|
|
94
115
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -104,7 +125,7 @@ var OpenedPart = (props) => {
|
|
|
104
125
|
testId,
|
|
105
126
|
item,
|
|
106
127
|
label: txt?.labels && txt?.labels[item] || filteredIntervals[item]?.label || (item === "customDate" ? "Custom Date" : item),
|
|
107
|
-
isActive:
|
|
128
|
+
isActive: shownInterval === item,
|
|
108
129
|
onItemClick: () => handleItemClick(item),
|
|
109
130
|
disabled: !!(item === "customDate" || minDate && filteredIntervals[item]?.start?.()?.isBefore?.(momentMinDate))
|
|
110
131
|
}, index);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenedPart.js","names":["intervals","customKey","_Fragment"],"sources":["../../../../../../src/Atomic/FormElements/InputDateRange/components/OpenedPart.tsx"],"sourcesContent":["import type { Moment } from 'moment-timezone';\nimport type { LegacyRef, ReactElement, ReactNode } from 'react';\n\nimport type { IIntervalItem, IOpenedPartProps } from '../InputDateRange.interface';\nimport cn from 'classnames';\nimport moment from 'moment-timezone';\nimport React, { useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\n\nimport useIsMobile from '../../../../Functions/useIsMobile/useIsMobile';\nimport { useResize } from '../../../../Functions/useResize';\n\nimport { capitalized } from '../../../../Functions/utils';\n\nimport Modal from '../../../UI/Modal/Modal';\nimport Dropdown from '../../Dropdown/Dropdown';\n\nimport {\n CUSTOM_INTERVAL_KEY_TEXT,\n CUSTOM_INTERVAL_KEY as customKey,\n INTERVALS as intervals,\n} from '../dependencies';\nimport Datepicker from './Datepicker';\nimport SelectItem from './SelectItem';\n\nconst OpenedPart: React.FC<IOpenedPartProps> = (props): ReactElement => {\n const {\n dateRangeContainerId,\n txt,\n buttonsTypes,\n actualValues,\n onChange = () => {},\n isCompact = false,\n isIntervalsHidden = false,\n isCompareHidden = false,\n limitRange,\n isOptionsRight,\n current,\n setCurrent,\n isCompare,\n setIsCompare,\n toggleOff,\n isShortWeekNames,\n minDate,\n maxDate,\n momentMinDate,\n momentMaxDate,\n isDontLimitFuture,\n isListTop,\n mainId,\n testId,\n withMobileLogic,\n isDoNotPullOutListOfMainContainer,\n renderIntervals = ['today', 'yesterday', 'thisWeek', 'lastWeek', 'last7Days', 'last14Days', 'last30Days', 'thisMonth', 'lastMonth', 'last6Months', 'thisYear', 'lastYear', 'allTime'],\n } = props;\n const { isMobile } = useIsMobile();\n\n const boxRef = useRef<HTMLDivElement>();\n const { elemPosition } = useResize(boxRef);\n const [mobileChange, setMobileChange] = useState({});\n\n const openedPartClass = cn(\n 'date-range-input__opened-part',\n 'opened-part',\n { [`opened-part--${elemPosition}`]: elemPosition },\n { 'opened-part--top': isListTop },\n );\n const openedPartWrapperClass = cn('opened-part__wrapper', {\n 'opened-part__wrapper_right-position-once-element':\n isOptionsRight && (isCompact || isIntervalsHidden),\n });\n\n const filteredIntervals: { [key: string]: IIntervalItem } = renderIntervals\n ? Object.keys(intervals).filter(key => renderIntervals.includes(key)).reduce((result, key) => {\n return {\n ...result,\n [key]: intervals?.[key],\n }\n }, {})\n : intervals;\n\n const items = isCompact\n ? [...Object.keys(filteredIntervals)]\n : [...Object.keys(filteredIntervals), customKey];\n\n const [activeInterval, setActiveInterval] = useState<string>(\n actualValues?.intervalKey ?? '',\n );\n\n const handleItemClick = (item: string): void => {\n if (item !== customKey) {\n onChange({\n intervalKey: item,\n compare: isCompare,\n });\n setTimeout(() => toggleOff(), 0);\n }\n setCurrent(item);\n };\n\n const getSelectedMode = (newValues: { start: Moment | Date | string; end: Moment | Date | string; }): string => {\n const { start, end } = newValues;\n if (moment(start).get('hour') !== 0 || moment(end).get('hour') !== 0) {\n return customKey;\n }\n for (const [key, interval] of Object.entries(filteredIntervals)) {\n if (\n moment(start).isSame((interval as IIntervalItem).start())\n && moment(end).isSame((interval as IIntervalItem).end())\n ) {\n return key;\n }\n }\n return customKey;\n };\n\n const renderDatepicker = (): ReactElement => {\n return (\n <Datepicker\n mainId={mainId}\n testId={testId}\n className={cn('opened-part__date-picker')}\n buttonsTypes={buttonsTypes}\n values={actualValues}\n onChangeMobile={setMobileChange}\n onChange={(data) => {\n onChange({\n intervalKey: current,\n ...data,\n });\n toggleOff();\n }}\n getSelectedMode={getSelectedMode}\n onChangeInterval={val => setCurrent(val)}\n onChangeCompare={data => setIsCompare?.(data)}\n onCancel={toggleOff}\n isCompareHidden={isCompareHidden}\n limitRange={limitRange}\n setActiveInterval={setActiveInterval}\n isShortWeekNames={isShortWeekNames}\n minDate={minDate}\n maxDate={maxDate}\n momentMinDate={momentMinDate}\n momentMaxDate={momentMaxDate}\n isDontLimitFuture={isDontLimitFuture}\n withMobileLogic={withMobileLogic && isMobile}\n isDoNotPullOutListOfMainContainer={isDoNotPullOutListOfMainContainer}\n />\n );\n };\n\n const renderOpenedPart = (): JSX.Element => {\n return (\n <div className={openedPartClass} ref={boxRef as LegacyRef<HTMLDivElement>}>\n <div className={openedPartWrapperClass}>\n {!isIntervalsHidden && (\n <div className={cn('opened-part__intervals-list')}>\n {items.map((item, index) => {\n if (filteredIntervals[item]?.isHidden) return null;\n return (\n <SelectItem\n testId={testId}\n key={index}\n item={item}\n label={\n (txt?.labels && txt?.labels[item])\n || filteredIntervals[item]?.label\n || (item === customKey ? CUSTOM_INTERVAL_KEY_TEXT : item)\n }\n isActive={activeInterval === item}\n onItemClick={() => handleItemClick(item)}\n disabled={\n !!(item === customKey\n || (minDate\n && filteredIntervals[item]?.start?.()?.isBefore?.(momentMinDate)))\n }\n />\n );\n })}\n </div>\n )}\n {!isCompact && renderDatepicker()}\n </div>\n </div>\n );\n };\n\n const renderMobileOpenedPart = (): ReactNode => {\n return (\n <Modal\n zIndex={101}\n variant=\"title\"\n className=\"modal-fin date-picker-modal\"\n isOpen\n title=\"Select Interval\"\n onlyTitle\n confirmBtnLabel=\"Apply\"\n onConfirm={() => {\n onChange({\n intervalKey: current,\n ...mobileChange,\n });\n setMobileChange({});\n toggleOff();\n }}\n closeModal={() => {\n setMobileChange({});\n toggleOff();\n }}\n onDecline={() => {\n setMobileChange({});\n toggleOff();\n }}\n withMobileLogic={withMobileLogic}\n >\n <Dropdown\n label=\"Select Interval\"\n value={activeInterval}\n className=\"dropdown-fin\"\n onChange={v => handleItemClick(v.toString())}\n options={items\n ?.filter(item => !filteredIntervals[item]?.isHidden)\n ?.map((item) => {\n return {\n label: capitalized(\n (txt?.labels && txt?.labels[item])\n || filteredIntervals[item]?.label\n || (item === customKey ? CUSTOM_INTERVAL_KEY_TEXT : item),\n ),\n value: item,\n };\n })}\n withMobileLogic={withMobileLogic}\n sortAlphabetical={false}\n />\n {renderDatepicker()}\n </Modal>\n );\n };\n\n const getDateRangeContainer = (): HTMLElement | null => {\n return document.getElementById(dateRangeContainerId);\n };\n const renderDateRangeMobileContainer = (): JSX.Element => {\n const dateRangeContainer = getDateRangeContainer();\n\n if (!dateRangeContainer) return <></>;\n\n return createPortal(renderMobileOpenedPart(), dateRangeContainer);\n };\n\n return withMobileLogic && isMobile\n ? renderDateRangeMobileContainer()\n : renderOpenedPart();\n}\nexport default OpenedPart;\n"],"mappings":";;;;;;;;;;;;;;AAyBA,IAAM,cAA0C,UAAwB;CACtE,MAAM,EACJ,sBACA,KACA,cACA,cACA,iBAAiB,CAAC,GAClB,YAAY,OACZ,oBAAoB,OACpB,kBAAkB,OAClB,YACA,gBACA,SACA,YACA,WACA,cACA,WACA,kBACA,SACA,SACA,eACA,eACA,mBACA,WACA,QACA,QACA,iBACA,mCACA,kBAAkB;EAAC;EAAS;EAAa;EAAY;EAAY;EAAa;EAAc;EAAc;EAAa;EAAa;EAAe;EAAY;EAAY;CAAS,MAClL;CACJ,MAAM,EAAE,aAAa,YAAY;CAEjC,MAAM,SAAS,OAAuB;CACtC,MAAM,EAAE,iBAAiB,UAAU,MAAM;CACzC,MAAM,CAAC,cAAc,mBAAmB,SAAS,CAAC,CAAC;CAEnD,MAAM,kBAAkB,GACtB,iCACA,eACA,GAAG,gBAAgB,iBA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BAAgB,EAAE,SAAS,CAAC;IAC3C,SAAS,OACL,QAAO,SAAQ,CAAC,kBAAkB,KAAK,EAAE,QAAQ,CAAC,EAClD,KAAK,SAAS;KACd,OAAO;MACL,OAAO,YACJ,KAAK,UAAU,KAAK,OAAO,SACzB,kBAAkB,KAAK,EAAE,UACxB,SAAA,eAAA,gBAAgD,KACtD;MACA,OAAO;KACT;IACF,CAAC;IACc;IACjB,kBAAkB;GACnB,CAAA,GACA,iBAAiB,CACb;;CAEX;CAEA,MAAM,8BAAkD;EACtD,OAAO,SAAS,eAAe,oBAAoB;CACrD;CACA,MAAM,uCAAoD;EACxD,MAAM,qBAAqB,sBAAsB;EAEjD,IAAI,CAAC,oBAAoB,OAAO,oBAAAC,UAAA,CAAI,CAAA;EAEpC,OAAO,aAAa,uBAAuB,GAAG,kBAAkB;CAClE;CAEA,OAAO,mBAAmB,WACtB,+BAA+B,IAC/B,iBAAiB;AACvB"}
|
|
1
|
+
{"version":3,"file":"OpenedPart.js","names":["intervals","customKey","_Fragment"],"sources":["../../../../../../src/Atomic/FormElements/InputDateRange/components/OpenedPart.tsx"],"sourcesContent":["import type { Moment } from 'moment-timezone';\nimport type { LegacyRef, ReactElement, ReactNode } from 'react';\n\nimport type { IIntervalItem, IOpenedPartProps } from '../InputDateRange.interface';\nimport cn from 'classnames';\nimport moment from 'moment-timezone';\nimport React, { useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\n\nimport useIsMobile from '../../../../Functions/useIsMobile/useIsMobile';\nimport { useResize } from '../../../../Functions/useResize';\n\nimport { capitalized } from '../../../../Functions/utils';\n\nimport Modal from '../../../UI/Modal/Modal';\nimport Dropdown from '../../Dropdown/Dropdown';\n\nimport {\n CUSTOM_INTERVAL_KEY_TEXT,\n CUSTOM_INTERVAL_KEY as customKey,\n INTERVALS as intervals,\n MAIN_FORMAT,\n} from '../dependencies';\nimport Datepicker from './Datepicker';\nimport SelectItem from './SelectItem';\n\nconst OpenedPart: React.FC<IOpenedPartProps> = (props): ReactElement => {\n const {\n dateRangeContainerId,\n txt,\n buttonsTypes,\n actualValues,\n onChange = () => {},\n isCompact = false,\n isIntervalsHidden = false,\n isCompareHidden = false,\n limitRange,\n isOptionsRight,\n current,\n setCurrent,\n isCompare,\n setIsCompare,\n toggleOff,\n isShortWeekNames,\n minDate,\n maxDate,\n momentMinDate,\n momentMaxDate,\n isDontLimitFuture,\n isListTop,\n mainId,\n testId,\n withMobileLogic,\n isDoNotPullOutListOfMainContainer,\n isApplyRequired = false,\n renderIntervals = ['today', 'yesterday', 'thisWeek', 'lastWeek', 'last7Days', 'last14Days', 'last30Days', 'thisMonth', 'lastMonth', 'last6Months', 'thisYear', 'lastYear', 'allTime'],\n } = props;\n const { isMobile } = useIsMobile();\n\n const boxRef = useRef<HTMLDivElement>();\n const { elemPosition } = useResize(boxRef);\n const [mobileChange, setMobileChange] = useState({});\n\n const openedPartClass = cn(\n 'date-range-input__opened-part',\n 'opened-part',\n { [`opened-part--${elemPosition}`]: elemPosition },\n { 'opened-part--top': isListTop },\n );\n const openedPartWrapperClass = cn('opened-part__wrapper', {\n 'opened-part__wrapper_right-position-once-element':\n isOptionsRight && (isCompact || isIntervalsHidden),\n });\n\n const filteredIntervals: { [key: string]: IIntervalItem } = renderIntervals\n ? Object.keys(intervals).filter(key => renderIntervals.includes(key)).reduce((result, key) => {\n return {\n ...result,\n [key]: intervals?.[key],\n }\n }, {})\n : intervals;\n\n const items = isCompact\n ? [...Object.keys(filteredIntervals)]\n : [...Object.keys(filteredIntervals), customKey];\n\n const [activeInterval, setActiveInterval] = useState<string>(\n actualValues?.intervalKey ?? '',\n );\n\n // isApplyRequired: выбранный, но ещё не применённый пресет и даты, которые показывает календарь. Календарь хранит\n // выбор у себя, поэтому при выборе пресета он создаётся заново (pickerKey) уже с датами пресета\n const [pendingPreset, setPendingPreset] = useState<string | null>(null);\n const [pickerValues, setPickerValues] = useState(actualValues);\n const [pickerKey, setPickerKey] = useState(0);\n\n const handleItemClick = (item: string): void => {\n if (item !== customKey && isApplyRequired) {\n const interval = filteredIntervals[item];\n setPendingPreset(item);\n setActiveInterval(item);\n setPickerValues({\n start: moment(interval.start()).format(MAIN_FORMAT),\n end: moment(interval.end()).format(MAIN_FORMAT),\n compare: isCompare,\n });\n setPickerKey(key => key + 1);\n }\n else if (item !== customKey) {\n onChange({\n intervalKey: item,\n compare: isCompare,\n });\n setTimeout(() => toggleOff(), 0);\n }\n setCurrent(item);\n };\n\n // Пресет выбран, и его даты в календаре не меняли. Календарь сообщает свои даты через onChangeMobile (mobileChange);\n // All Time и другие периоды «до сейчас» он как пресет не узнаёт — подсветка и Apply опираются на эту проверку\n const isSameDates = (dates: { start?: string; end?: string }): boolean => (\n !!pendingPreset && dates.start === pickerValues.start && dates.end === pickerValues.end\n );\n const shownInterval = isSameDates(mobileChange as { start?: string; end?: string }) ? pendingPreset : activeInterval;\n\n // Apply: выбранный пресет, если его даты не меняли, иначе — даты календаря\n const applyDates = (data: { start: string; end: string }): void => {\n onChange(isSameDates(data) ? { intervalKey: pendingPreset as string, compare: isCompare } : { intervalKey: current, ...data });\n };\n\n const getSelectedMode = (newValues: { start: Moment | Date | string; end: Moment | Date | string; }): string => {\n const { start, end } = newValues;\n if (moment(start).get('hour') !== 0 || moment(end).get('hour') !== 0) {\n return customKey;\n }\n for (const [key, interval] of Object.entries(filteredIntervals)) {\n if (\n moment(start).isSame((interval as IIntervalItem).start())\n && moment(end).isSame((interval as IIntervalItem).end())\n ) {\n return key;\n }\n }\n return customKey;\n };\n\n const renderDatepicker = (): ReactElement => {\n return (\n <Datepicker\n key={pickerKey}\n mainId={mainId}\n testId={testId}\n className={cn('opened-part__date-picker')}\n buttonsTypes={buttonsTypes}\n values={isApplyRequired ? pickerValues : actualValues}\n onChangeMobile={setMobileChange}\n onChange={(data) => {\n applyDates(data);\n toggleOff();\n }}\n getSelectedMode={getSelectedMode}\n onChangeInterval={val => setCurrent(val)}\n onChangeCompare={data => setIsCompare?.(data)}\n onCancel={toggleOff}\n isCompareHidden={isCompareHidden}\n limitRange={limitRange}\n setActiveInterval={setActiveInterval}\n isShortWeekNames={isShortWeekNames}\n minDate={minDate}\n maxDate={maxDate}\n momentMinDate={momentMinDate}\n momentMaxDate={momentMaxDate}\n isDontLimitFuture={isDontLimitFuture}\n withMobileLogic={withMobileLogic && isMobile}\n isDoNotPullOutListOfMainContainer={isDoNotPullOutListOfMainContainer}\n />\n );\n };\n\n const renderOpenedPart = (): JSX.Element => {\n return (\n <div className={openedPartClass} ref={boxRef as LegacyRef<HTMLDivElement>}>\n <div className={openedPartWrapperClass}>\n {!isIntervalsHidden && (\n <div className={cn('opened-part__intervals-list')}>\n {items.map((item, index) => {\n if (filteredIntervals[item]?.isHidden) return null;\n return (\n <SelectItem\n testId={testId}\n key={index}\n item={item}\n label={\n (txt?.labels && txt?.labels[item])\n || filteredIntervals[item]?.label\n || (item === customKey ? CUSTOM_INTERVAL_KEY_TEXT : item)\n }\n isActive={shownInterval === item}\n onItemClick={() => handleItemClick(item)}\n disabled={\n !!(item === customKey\n || (minDate\n && filteredIntervals[item]?.start?.()?.isBefore?.(momentMinDate)))\n }\n />\n );\n })}\n </div>\n )}\n {!isCompact && renderDatepicker()}\n </div>\n </div>\n );\n };\n\n const renderMobileOpenedPart = (): ReactNode => {\n return (\n <Modal\n zIndex={101}\n variant=\"title\"\n className=\"modal-fin date-picker-modal\"\n isOpen\n title=\"Select Interval\"\n onlyTitle\n confirmBtnLabel=\"Apply\"\n onConfirm={() => {\n onChange({\n intervalKey: current,\n ...mobileChange,\n });\n setMobileChange({});\n toggleOff();\n }}\n closeModal={() => {\n setMobileChange({});\n toggleOff();\n }}\n onDecline={() => {\n setMobileChange({});\n toggleOff();\n }}\n withMobileLogic={withMobileLogic}\n >\n <Dropdown\n label=\"Select Interval\"\n value={activeInterval}\n className=\"dropdown-fin\"\n onChange={v => handleItemClick(v.toString())}\n options={items\n ?.filter(item => !filteredIntervals[item]?.isHidden)\n ?.map((item) => {\n return {\n label: capitalized(\n (txt?.labels && txt?.labels[item])\n || filteredIntervals[item]?.label\n || (item === customKey ? CUSTOM_INTERVAL_KEY_TEXT : item),\n ),\n value: item,\n };\n })}\n withMobileLogic={withMobileLogic}\n sortAlphabetical={false}\n />\n {renderDatepicker()}\n </Modal>\n );\n };\n\n const getDateRangeContainer = (): HTMLElement | null => {\n return document.getElementById(dateRangeContainerId);\n };\n const renderDateRangeMobileContainer = (): JSX.Element => {\n const dateRangeContainer = getDateRangeContainer();\n\n if (!dateRangeContainer) return <></>;\n\n return createPortal(renderMobileOpenedPart(), dateRangeContainer);\n };\n\n return withMobileLogic && isMobile\n ? renderDateRangeMobileContainer()\n : renderOpenedPart();\n}\nexport default OpenedPart;\n"],"mappings":";;;;;;;;;;;;;;AA0BA,IAAM,cAA0C,UAAwB;CACtE,MAAM,EACJ,sBACA,KACA,cACA,cACA,iBAAiB,CAAC,GAClB,YAAY,OACZ,oBAAoB,OACpB,kBAAkB,OAClB,YACA,gBACA,SACA,YACA,WACA,cACA,WACA,kBACA,SACA,SACA,eACA,eACA,mBACA,WACA,QACA,QACA,iBACA,mCACA,kBAAkB,OAClB,kBAAkB;EAAC;EAAS;EAAa;EAAY;EAAY;EAAa;EAAc;EAAc;EAAa;EAAa;EAAe;EAAY;EAAY;CAAS,MAClL;CACJ,MAAM,EAAE,aAAa,YAAY;CAEjC,MAAM,SAAS,OAAuB;CACtC,MAAM,EAAE,iBAAiB,UAAU,MAAM;CACzC,MAAM,CAAC,cAAc,mBAAmB,SAAS,CAAC,CAAC;CAEnD,MAAM,kBAAkB,GACtB,iCACA,eACA,GAAG,gBAAgB,iBAAiB,aAAa,GACjD,EAAE,oBAAoB,UAAU,CAClC;CACA,MAAM,yBAAyB,GAAG,wBAAwB,EACxD,oDACE,mBAAmB,aAAa,mBACpC,CAAC;CAED,MAAM,oBAAsD,kBACxD,OAAO,KAAKA,SAAS,CAAC,CAAC,QAAO,QAAO,gBAAgB,SAAS,GAAG,CAAC,CAAC,CAAC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AEN,CAAC,aAAa,iBAAiB,CAC7B;;EACF,CAAA;CAET;CAEA,MAAM,+BAA0C;EAC9C,OACE,qBAAC,OAAD;GACE,QAAQ;GACR,SAAQ;GACR,WAAU;GACV,QAAA;GACA,OAAM;GACN,WAAA;GACA,iBAAgB;GAChB,iBAAiB;IACf,SAAS;KACP,aAAa;KACb,GAAG;IACL,CAAC;IACD,gBAAgB,CAAC,CAAC;IAClB,UAAU;GACZ;GACA,kBAAkB;IAChB,gBAAgB,CAAC,CAAC;IAClB,UAAU;GACZ;GACA,iBAAiB;IACf,gBAAgB,CAAC,CAAC;IAClB,UAAU;GACZ;GACiB;GAxBnB,UAAA,CA0BE,oBAAC,UAAD;IACE,OAAM;IACN,OAAO;IACP,WAAU;IACV,WAAU,MAAK,gBAAgB,EAAE,SAAS,CAAC;IAC3C,SAAS,OACL,QAAO,SAAQ,CAAC,kBAAkB,KAAK,EAAE,QAAQ,CAAC,EAClD,KAAK,SAAS;KACd,OAAO;MACL,OAAO,YACJ,KAAK,UAAU,KAAK,OAAO,SACzB,kBAAkB,KAAK,EAAE,UACxB,SAAA,eAAA,gBAAgD,KACtD;MACA,OAAO;KACT;IACF,CAAC;IACc;IACjB,kBAAkB;GACnB,CAAA,GACA,iBAAiB,CACb;;CAEX;CAEA,MAAM,8BAAkD;EACtD,OAAO,SAAS,eAAe,oBAAoB;CACrD;CACA,MAAM,uCAAoD;EACxD,MAAM,qBAAqB,sBAAsB;EAEjD,IAAI,CAAC,oBAAoB,OAAO,oBAAAC,UAAA,CAAI,CAAA;EAEpC,OAAO,aAAa,uBAAuB,GAAG,kBAAkB;CAClE;CAEA,OAAO,mBAAmB,WACtB,+BAA+B,IAC/B,iBAAiB;AACvB"}
|
|
@@ -38,8 +38,15 @@ function FilterChip({ field, entry, isOpen, isMobile = false, isPaused = false,
|
|
|
38
38
|
onDismiss: onClose
|
|
39
39
|
});
|
|
40
40
|
useLayoutEffect(() => {
|
|
41
|
-
if (!isEditorOpen
|
|
42
|
-
|
|
41
|
+
if (!isEditorOpen) return void 0;
|
|
42
|
+
let frame = 0;
|
|
43
|
+
const update = () => {
|
|
44
|
+
const root = rootRef.current;
|
|
45
|
+
if (root) setAlignRight(root.getBoundingClientRect().left + width > window.innerWidth - 16);
|
|
46
|
+
frame = requestAnimationFrame(update);
|
|
47
|
+
};
|
|
48
|
+
update();
|
|
49
|
+
return () => cancelAnimationFrame(frame);
|
|
43
50
|
}, [isEditorOpen, width]);
|
|
44
51
|
const closeEditor = () => {
|
|
45
52
|
onClose();
|
|
@@ -56,6 +63,7 @@ function FilterChip({ field, entry, isOpen, isMobile = false, isPaused = false,
|
|
|
56
63
|
};
|
|
57
64
|
const hasArrows = isDate && !!getDateBounds(value);
|
|
58
65
|
const shift = (direction) => {
|
|
66
|
+
if (isOpen) onClose();
|
|
59
67
|
const next = shiftDate(value, direction);
|
|
60
68
|
if (next) onChange({ value: next }, { commit: 300 });
|
|
61
69
|
};
|
|
@@ -137,6 +145,7 @@ function FilterChip({ field, entry, isOpen, isMobile = false, isPaused = false,
|
|
|
137
145
|
isOpen: isOpen && !isPaused,
|
|
138
146
|
onOpenChange: (open) => open ? onOpen() : onClose(),
|
|
139
147
|
renderTrigger: () => box,
|
|
148
|
+
isApplyRequired: true,
|
|
140
149
|
isCompareHidden: true,
|
|
141
150
|
buttonsTypes: { cancel: "dark-outline" }
|
|
142
151
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterChip.js","names":["InputDateRange"],"sources":["../../../../src/Molecular/FilterChip/FilterChip.tsx"],"sourcesContent":["import type { DateFilterValue, FilterChipProps } from './model/types';\nimport cn from 'classnames';\n\nimport { useLayoutEffect, useMemo, useRef, useState } from 'react';\n\nimport InputDateRange from '../../Atomic/FormElements/InputDateRange/InputDateRange';\nimport ChipValue from './components/ChipValue';\nimport { ChevronIcon, CloseIcon } from './components/controls';\nimport FilterChipEditor from './FilterChipEditor';\nimport { useDismiss } from './hooks/useDismiss';\nimport { CLEAR_GUARD_MS, DATE_ARROWS_COMMIT_MS, mergeChipTexts, POPOVER_WIDTH } from './model/constants';\nimport { canShiftForward, fromPickerValue, getDateBounds, shiftDate, toPickerValue } from './model/dates';\nimport { getChipLabel, getMeta, getOperatorText, isEmptyValue, isValidValue } from './model/values';\n\nimport './FilterChip.scss';\n\n/**\n * Чип-фильтр (FIN-15128): «Поле оператор значение», ✕ и окно редактирования.\n * Дата открывает InputDateRange; постоянный фильтр (Created) — без ✕, со стрелками ‹ ›.\n * На мобильном окно не открывается: ряд фильтров показывает FilterChipEditor в панели снизу.\n */\nfunction FilterChip({\n field,\n entry,\n isOpen,\n isMobile = false,\n isPaused = false,\n onOpen,\n onClose,\n onChange,\n onClear,\n onRemove,\n labels,\n className,\n}: FilterChipProps): JSX.Element {\n const texts = useMemo(() => mergeChipTexts(labels), [labels]);\n const meta = getMeta(field);\n const { value } = entry;\n const isDate = field.kind === 'date';\n const isEmpty = isEmptyValue(field.kind, value);\n const isInvalid = !isEmpty && !isValidValue(field, value);\n const isEditorOpen = isOpen && !isMobile && !isDate && !isPaused;\n const opText = getOperatorText(field, value);\n const width = meta.popoverWidth\n ?? (field.kind === 'tags' ? POPOVER_WIDTH.tags : field.optionGroups?.length ? POPOVER_WIDTH.grouped : POPOVER_WIDTH.list);\n\n const rootRef = useRef<HTMLDivElement>(null);\n const bodyRef = useRef<HTMLButtonElement>(null);\n const clearedAt = useRef(0);\n const [alignRight, setAlignRight] = useState(false);\n\n useDismiss({ isOpen: isEditorOpen, refs: [rootRef], returnFocusRef: bodyRef, onDismiss: onClose });\n\n // Окно не выходит за правый край экрана\n useLayoutEffect(() => {\n if (!isEditorOpen || !rootRef.current) return;\n setAlignRight(rootRef.current.getBoundingClientRect().left + width > window.innerWidth - 16);\n }, [isEditorOpen, width]);\n\n const closeEditor = (): void => {\n onClose();\n bodyRef.current?.focus();\n };\n\n // ✕ (US-4): со значениями — очистить, пустой — удалить; 400 мс после очистки повторный клик игнорируется\n const onX = (): void => {\n if (Date.now() - clearedAt.current < CLEAR_GUARD_MS) return;\n if (isEmpty) {\n onRemove();\n return;\n }\n clearedAt.current = Date.now();\n onClear();\n };\n\n // ‹ › (US-9): сдвиг на длину периода, запрос через 300 мс после последнего клика; для All Time стрелок нет\n const hasArrows = isDate && !!getDateBounds(value as DateFilterValue);\n const shift = (direction: -1 | 1): void => {\n const next = shiftDate(value as DateFilterValue, direction);\n if (next) onChange({ value: next }, { commit: DATE_ARROWS_COMMIT_MS });\n };\n const prevButton = (\n <button type=\"button\" className=\"filter-chip__arrow\" aria-label={texts.previousPeriod} title={texts.previousPeriod} disabled={isPaused} onClick={() => shift(-1)}>\n <ChevronIcon direction=\"left\" />\n </button>\n );\n const nextButton = (\n <button\n type=\"button\"\n className=\"filter-chip__arrow\"\n aria-label={texts.nextPeriod}\n title={texts.nextPeriod}\n disabled={isPaused || !canShiftForward(value as DateFilterValue)}\n onClick={() => shift(1)}\n >\n <ChevronIcon />\n </button>\n );\n\n const rootClass = cn('filter-chip', {\n 'filter-chip--empty': isEmpty,\n 'filter-chip--invalid': isInvalid,\n 'filter-chip--editing': isOpen && !isPaused,\n 'filter-chip--paused': isPaused,\n 'filter-chip--permanent': field.permanent,\n 'filter-chip--expanded': !!entry.showValues && !isEmpty,\n 'filter-chip--mobile': isMobile,\n }, className);\n\n const box = (\n <div className=\"filter-chip__box\">\n {hasArrows && !field.permanent && prevButton}\n <button\n ref={bodyRef}\n type=\"button\"\n className=\"filter-chip__body\"\n disabled={isPaused}\n aria-haspopup=\"dialog\"\n aria-expanded={isOpen}\n onClick={() => (isOpen ? onClose() : onOpen())}\n >\n <span className=\"filter-chip__label\">{getChipLabel(field)}</span>\n {!!opText && <span className=\"filter-chip__label\">{opText}</span>}\n <ChipValue field={field} value={value} showValues={!!entry.showValues} texts={texts} />\n </button>\n {hasArrows && field.permanent && prevButton}\n {hasArrows && nextButton}\n {!field.permanent && (\n <button\n type=\"button\"\n className=\"filter-chip__x\"\n disabled={isPaused}\n aria-label={isEmpty ? texts.removeFilter : texts.clearValues}\n title={isEmpty ? texts.removeFilter : texts.clearValues}\n onClick={onX}\n >\n <CloseIcon />\n </button>\n )}\n </div>\n );\n\n // Дата на десктопе: существующий пикер, открытый по клику на чип; применяется по Apply или выбору пресета\n if (isDate && !isMobile) {\n return (\n <div ref={rootRef} className={rootClass}>\n <InputDateRange\n value={toPickerValue(value as DateFilterValue)}\n onChange={picked => onChange({ value: fromPickerValue(picked) }, { commit: 'now' })}\n isOpen={isOpen && !isPaused}\n onOpenChange={open => (open ? onOpen() : onClose())}\n renderTrigger={() => box}\n isCompareHidden\n buttonsTypes={{ cancel: 'dark-outline' }}\n />\n </div>\n );\n }\n\n return (\n <div ref={rootRef} className={rootClass}>\n {box}\n {isEditorOpen && (\n <div\n className={cn('filter-chip__popover', { 'filter-chip__popover--right': alignRight })}\n style={{ width: `min(${width}px, calc(100vw - 32px))` }}\n role=\"dialog\"\n aria-label={field.label}\n >\n <FilterChipEditor field={field} entry={entry} onChange={onChange} onClose={closeEditor} onRemove={onRemove} labels={labels} />\n </div>\n )}\n </div>\n );\n}\n\nexport default FilterChip;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAqBA,SAAS,WAAW,EAClB,OACA,OACA,QACA,WAAW,OACX,WAAW,OACX,QACA,SACA,UACA,SACA,UACA,QACA,aAC+B;CAC/B,MAAM,QAAQ,cAAc,eAAe,MAAM,GAAG,CAAC,MAAM,CAAC;CAC5D,MAAM,OAAO,QAAQ,KAAK;CAC1B,MAAM,EAAE,UAAU;CAClB,MAAM,SAAS,MAAM,SAAS;CAC9B,MAAM,UAAU,aAAa,MAAM,MAAM,KAAK;CAC9C,MAAM,YAAY,CAAC,WAAW,CAAC,aAAa,OAAO,KAAK;CACxD,MAAM,eAAe,UAAU,CAAC,YAAY,CAAC,UAAU,CAAC;CACxD,MAAM,SAAS,gBAAgB,OAAO,KAAK;CAC3C,MAAM,QAAQ,KAAK,iBACb,MAAM,SAAS,SAAS,cAAc,OAAO,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c,EAAE,QAAQ,eAAe;EACxC,CAAA;CACE,CAAA;CAIT,OACE,qBAAC,OAAD;EAAK,KAAK;EAAS,WAAW;EAA9B,UAAA,CACG,KACA,gBACC,oBAAC,OAAD;GACE,WAAW,GAAG,wBAAwB,EAAE,+BAA+B,WAAW,CAAC;GACnF,OAAO,EAAE,OAAO,OAAO,MAAM,yBAAyB;GACtD,MAAK;GACL,cAAY,MAAM;GAElB,UAAA,oBAAC,kBAAD;IAAyB;IAAc;IAAiB;IAAU,SAAS;IAAuB;IAAkB;GAAS,CAAA;EAC1H,CAAA,CAEJ;;AAET"}
|
|
1
|
+
{"version":3,"file":"FilterChip.js","names":["InputDateRange"],"sources":["../../../../src/Molecular/FilterChip/FilterChip.tsx"],"sourcesContent":["import type { DateFilterValue, FilterChipProps } from './model/types';\nimport cn from 'classnames';\n\nimport { useLayoutEffect, useMemo, useRef, useState } from 'react';\n\nimport InputDateRange from '../../Atomic/FormElements/InputDateRange/InputDateRange';\nimport ChipValue from './components/ChipValue';\nimport { ChevronIcon, CloseIcon } from './components/controls';\nimport FilterChipEditor from './FilterChipEditor';\nimport { useDismiss } from './hooks/useDismiss';\nimport { CLEAR_GUARD_MS, DATE_ARROWS_COMMIT_MS, mergeChipTexts, POPOVER_WIDTH } from './model/constants';\nimport { canShiftForward, fromPickerValue, getDateBounds, shiftDate, toPickerValue } from './model/dates';\nimport { getChipLabel, getMeta, getOperatorText, isEmptyValue, isValidValue } from './model/values';\n\nimport './FilterChip.scss';\n\n/**\n * Чип-фильтр (FIN-15128): «Поле оператор значение», ✕ и окно редактирования.\n * Дата открывает InputDateRange; постоянный фильтр (Created) — без ✕, со стрелками ‹ ›.\n * На мобильном окно не открывается: ряд фильтров показывает FilterChipEditor в панели снизу.\n */\nfunction FilterChip({\n field,\n entry,\n isOpen,\n isMobile = false,\n isPaused = false,\n onOpen,\n onClose,\n onChange,\n onClear,\n onRemove,\n labels,\n className,\n}: FilterChipProps): JSX.Element {\n const texts = useMemo(() => mergeChipTexts(labels), [labels]);\n const meta = getMeta(field);\n const { value } = entry;\n const isDate = field.kind === 'date';\n const isEmpty = isEmptyValue(field.kind, value);\n const isInvalid = !isEmpty && !isValidValue(field, value);\n const isEditorOpen = isOpen && !isMobile && !isDate && !isPaused;\n const opText = getOperatorText(field, value);\n const width = meta.popoverWidth\n ?? (field.kind === 'tags' ? POPOVER_WIDTH.tags : field.optionGroups?.length ? POPOVER_WIDTH.grouped : POPOVER_WIDTH.list);\n\n const rootRef = useRef<HTMLDivElement>(null);\n const bodyRef = useRef<HTMLButtonElement>(null);\n const clearedAt = useRef(0);\n const [alignRight, setAlignRight] = useState(false);\n\n useDismiss({ isOpen: isEditorOpen, refs: [rootRef], returnFocusRef: bodyRef, onDismiss: onClose });\n\n // Окно не выходит за правый край экрана. Пока оно открыто, чип может переехать: выбранные значения делают его шире,\n // и он переносится на другую строку (окно, выровненное по правому краю, уходило за левый край экрана). Поэтому\n // сторона сверяется каждый кадр; без изменений состояние не меняется и перерисовки нет\n useLayoutEffect(() => {\n if (!isEditorOpen) return undefined;\n let frame = 0;\n const update = (): void => {\n const root = rootRef.current;\n if (root) setAlignRight(root.getBoundingClientRect().left + width > window.innerWidth - 16);\n frame = requestAnimationFrame(update);\n };\n update();\n return () => cancelAnimationFrame(frame);\n }, [isEditorOpen, width]);\n\n const closeEditor = (): void => {\n onClose();\n bodyRef.current?.focus();\n };\n\n // ✕ (US-4): со значениями — очистить, пустой — удалить; 400 мс после очистки повторный клик игнорируется\n const onX = (): void => {\n if (Date.now() - clearedAt.current < CLEAR_GUARD_MS) return;\n if (isEmpty) {\n onRemove();\n return;\n }\n clearedAt.current = Date.now();\n onClear();\n };\n\n // ‹ › (US-9): сдвиг на длину периода, запрос через 300 мс после последнего клика; для All Time стрелок нет.\n // Открытый календарь стрелки закрывают, ничего в нём не применяя (FIN-15295)\n const hasArrows = isDate && !!getDateBounds(value as DateFilterValue);\n const shift = (direction: -1 | 1): void => {\n if (isOpen) onClose();\n const next = shiftDate(value as DateFilterValue, direction);\n if (next) onChange({ value: next }, { commit: DATE_ARROWS_COMMIT_MS });\n };\n const prevButton = (\n <button type=\"button\" className=\"filter-chip__arrow\" aria-label={texts.previousPeriod} title={texts.previousPeriod} disabled={isPaused} onClick={() => shift(-1)}>\n <ChevronIcon direction=\"left\" />\n </button>\n );\n const nextButton = (\n <button\n type=\"button\"\n className=\"filter-chip__arrow\"\n aria-label={texts.nextPeriod}\n title={texts.nextPeriod}\n disabled={isPaused || !canShiftForward(value as DateFilterValue)}\n onClick={() => shift(1)}\n >\n <ChevronIcon />\n </button>\n );\n\n const rootClass = cn('filter-chip', {\n 'filter-chip--empty': isEmpty,\n 'filter-chip--invalid': isInvalid,\n 'filter-chip--editing': isOpen && !isPaused,\n 'filter-chip--paused': isPaused,\n 'filter-chip--permanent': field.permanent,\n 'filter-chip--expanded': !!entry.showValues && !isEmpty,\n 'filter-chip--mobile': isMobile,\n }, className);\n\n const box = (\n <div className=\"filter-chip__box\">\n {hasArrows && !field.permanent && prevButton}\n <button\n ref={bodyRef}\n type=\"button\"\n className=\"filter-chip__body\"\n disabled={isPaused}\n aria-haspopup=\"dialog\"\n aria-expanded={isOpen}\n onClick={() => (isOpen ? onClose() : onOpen())}\n >\n <span className=\"filter-chip__label\">{getChipLabel(field)}</span>\n {!!opText && <span className=\"filter-chip__label\">{opText}</span>}\n <ChipValue field={field} value={value} showValues={!!entry.showValues} texts={texts} />\n </button>\n {hasArrows && field.permanent && prevButton}\n {hasArrows && nextButton}\n {!field.permanent && (\n <button\n type=\"button\"\n className=\"filter-chip__x\"\n disabled={isPaused}\n aria-label={isEmpty ? texts.removeFilter : texts.clearValues}\n title={isEmpty ? texts.removeFilter : texts.clearValues}\n onClick={onX}\n >\n <CloseIcon />\n </button>\n )}\n </div>\n );\n\n // Дата на десктопе: существующий пикер, открытый по клику на чип; применяется по Apply или выбору пресета\n if (isDate && !isMobile) {\n return (\n <div ref={rootRef} className={rootClass}>\n <InputDateRange\n value={toPickerValue(value as DateFilterValue)}\n onChange={picked => onChange({ value: fromPickerValue(picked) }, { commit: 'now' })}\n isOpen={isOpen && !isPaused}\n onOpenChange={open => (open ? onOpen() : onClose())}\n renderTrigger={() => box}\n // Новый период — только по Apply; Cancel и клик снаружи оставляют прежний (US-9, FIN-15295)\n isApplyRequired\n isCompareHidden\n buttonsTypes={{ cancel: 'dark-outline' }}\n />\n </div>\n );\n }\n\n return (\n <div ref={rootRef} className={rootClass}>\n {box}\n {isEditorOpen && (\n <div\n className={cn('filter-chip__popover', { 'filter-chip__popover--right': alignRight })}\n style={{ width: `min(${width}px, calc(100vw - 32px))` }}\n role=\"dialog\"\n aria-label={field.label}\n >\n <FilterChipEditor field={field} entry={entry} onChange={onChange} onClose={closeEditor} onRemove={onRemove} labels={labels} />\n </div>\n )}\n </div>\n );\n}\n\nexport default FilterChip;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAqBA,SAAS,WAAW,EAClB,OACA,OACA,QACA,WAAW,OACX,WAAW,OACX,QACA,SACA,UACA,SACA,UACA,QACA,aAC+B;CAC/B,MAAM,QAAQ,cAAc,eAAe,MAAM,GAAG,CAAC,MAAM,CAAC;CAC5D,MAAM,OAAO,QAAQ,KAAK;CAC1B,MAAM,EAAE,UAAU;CAClB,MAAM,SAAS,MAAM,SAAS;CAC9B,MAAM,UAAU,aAAa,MAAM,MAAM,KAAK;CAC9C,MAAM,YAAY,CAAC,WAAW,CAAC,aAAa,OAAO,KAAK;CACxD,MAAM,eAAe,UAAU,CAAC,YAAY,CAAC,UAAU,CAAC;CACxD,MAAM,SAAS,gBAAgB,OAAO,KAAK;CAC3C,MAAM,QAAQ,KAAK,iBACb,MAAM,SAAS,SAAS,cAAc,OAAO,MAAM,cAAc,SAAS,cAAc,UAAU,cAAc;CAEtH,MAAM,UAAU,OAAuB,IAAI;CAC3C,MAAM,UAAU,OAA0B,IAAI;CAC9C,MAAM,YAAY,OAAO,CAAC;CAC1B,MAAM,CAAC,YAAY,iBAAiB,SA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,EAAE,QAAQ,eAAe;EACxC,CAAA;CACE,CAAA;CAIT,OACE,qBAAC,OAAD;EAAK,KAAK;EAAS,WAAW;EAA9B,UAAA,CACG,KACA,gBACC,oBAAC,OAAD;GACE,WAAW,GAAG,wBAAwB,EAAE,+BAA+B,WAAW,CAAC;GACnF,OAAO,EAAE,OAAO,OAAO,MAAM,yBAAyB;GACtD,MAAK;GACL,cAAY,MAAM;GAElB,UAAA,oBAAC,kBAAD;IAAyB;IAAc;IAAiB;IAAU,SAAS;IAAuB;IAAkB;GAAS,CAAA;EAC1H,CAAA,CAEJ;;AAET"}
|
|
@@ -581,6 +581,15 @@
|
|
|
581
581
|
font-weight: 500;
|
|
582
582
|
line-height: 20px;
|
|
583
583
|
}
|
|
584
|
+
.filter-chip-editor__range-field .filter-chip-editor__input {
|
|
585
|
+
padding-right: 4px;
|
|
586
|
+
}
|
|
587
|
+
.filter-chip-editor__range-field .filter-chip-editor__input::-webkit-inner-spin-button {
|
|
588
|
+
appearance: auto;
|
|
589
|
+
}
|
|
590
|
+
.filter-chip-editor__range-field .filter-chip-editor__input[type=number] {
|
|
591
|
+
appearance: auto;
|
|
592
|
+
}
|
|
584
593
|
.filter-chip-editor__range-dash {
|
|
585
594
|
flex: none;
|
|
586
595
|
padding-bottom: 5px;
|