@epam/statgpt-ui-components 0.1.0-rc.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 EPAM Systems
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,75 @@
1
+ # UI Components
2
+
3
+ This library contains reusable UI components
4
+ for the StatGPT portal frontend.
5
+ It includes buttons, forms, modals,
6
+ and other visual elements to ensure a consistent
7
+ user interface across the application.
8
+
9
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/mit)
10
+ [![React](https://img.shields.io/badge/React-19+-61dafb.svg)](https://reactjs.org/)
11
+ [![Typescript](https://img.shields.io/badge/Typescript-5+-61dafb.svg)](https://www.typescriptlang.org/)
12
+
13
+
14
+ ## Table of Contents
15
+
16
+ - [Features](#features)
17
+ - [Installation](#installation)
18
+ - [Usage](#usage)
19
+ - [Styling & Customization](#styling--customization)
20
+ - [Contributing](#contributing)
21
+ - [Security](#security)
22
+ - [License](#license)
23
+
24
+ ## Features
25
+ -
26
+ - Consistent, accessible, and customizable UI components
27
+ - Components for forms, buttons, inputs, modals, loaders, and more
28
+ - Built with TypeScript and Tailwind CSS
29
+ - Designed for easy integration and extension
30
+ - Customizable styles and icons
31
+
32
+ ## Installation
33
+
34
+ ```bash
35
+ npm install @epam/statgpt-ui-components
36
+ ```
37
+
38
+ ## Usage
39
+
40
+ ```tsx
41
+ import { Button } from '@epam/statgpt-ui-components';
42
+
43
+ // Example usage
44
+ <Button
45
+ title={buttonTitle}
46
+ buttonClassName="classnames"
47
+ isSmallButton={true}
48
+ disabled={isDisabled}
49
+ onClick={() => alert('Clicked!')}
50
+ />
51
+ ```
52
+
53
+
54
+ ## Styling & Customization
55
+
56
+ You can customize components by using `...ClassName` props.
57
+ This allows you to override default styles with your own CSS styles.
58
+ You also can provide custom icons through corresponding props.
59
+
60
+ ## Contributing
61
+
62
+ We welcome contributions! Please see our [Contributing Guide](https://github.com/epam/statgpt-portal-frontend/blob/development/CONTRIBUTING.md) for details on:
63
+
64
+ - Code style guidelines
65
+ - Testing requirements
66
+ - Pull request process
67
+
68
+
69
+ ## Security
70
+
71
+ If you discover a security vulnerability, please refer to our [Security Policy](https://github.com/epam/statgpt-portal-frontend/blob/development/SECURITY.md).
72
+
73
+ ## License
74
+
75
+ [MIT](https://github.com/epam/statgpt-portal-frontend/blob/development/LICENSE) - see the [LICENSE](https://github.com/epam/statgpt-portal-frontend/blob/development/LICENSE) file for details.
@@ -0,0 +1,11 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { AlertDetails } from '../../models/alert';
3
+ interface Props {
4
+ alertDetails?: AlertDetails;
5
+ successIcon?: ReactNode;
6
+ errorIcon?: ReactNode;
7
+ onClose?: () => void;
8
+ closeButtonTitle?: string;
9
+ }
10
+ export declare const Alert: FC<Props>;
11
+ export {};
@@ -0,0 +1,13 @@
1
+ import { FC, MouseEvent, ReactNode } from 'react';
2
+ interface Props {
3
+ title?: string;
4
+ buttonClassName: string;
5
+ isLoading?: boolean;
6
+ disabled?: boolean;
7
+ iconBefore?: ReactNode;
8
+ iconAfter?: ReactNode;
9
+ isSmallButton?: boolean;
10
+ onClick?: (e: MouseEvent<HTMLButtonElement>) => void;
11
+ }
12
+ export declare const Button: FC<Props>;
13
+ export {};
@@ -0,0 +1,14 @@
1
+ import { OptionsType } from 'react-flatpickr';
2
+ import { FC, ReactNode } from 'react';
3
+ import { CalendarResolution } from '../../../../shared-toolkit/src/types/calendar';
4
+ interface Props {
5
+ onChange: (date: Date) => void;
6
+ value: Date;
7
+ options: OptionsType;
8
+ label: string;
9
+ calendarResolution?: CalendarResolution;
10
+ id?: string;
11
+ icon?: ReactNode;
12
+ }
13
+ export declare const Calendar: FC<Props>;
14
+ export {};
@@ -0,0 +1,10 @@
1
+ import { FC, ReactNode } from 'react';
2
+ interface Props {
3
+ id: string;
4
+ label?: string;
5
+ checked: boolean;
6
+ checkboxIcon?: ReactNode;
7
+ onChange?: (id: string, isChecked?: boolean) => void;
8
+ }
9
+ export declare const Checkbox: FC<Props>;
10
+ export {};
@@ -0,0 +1,10 @@
1
+ import { FC, MouseEvent } from 'react';
2
+ interface Props {
3
+ title?: string;
4
+ btnClassNames?: string;
5
+ iconWidth?: number;
6
+ iconHeight?: number;
7
+ onClick?: (event?: MouseEvent<HTMLButtonElement>) => void;
8
+ }
9
+ export declare const CloseButton: FC<Props>;
10
+ export {};
@@ -0,0 +1,9 @@
1
+ import { FC, ReactNode } from 'react';
2
+ interface Props {
3
+ title: string;
4
+ icon?: ReactNode;
5
+ children: ReactNode;
6
+ value?: string;
7
+ }
8
+ export declare const CollapsibleBlock: FC<Props>;
9
+ export {};
@@ -0,0 +1,13 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { DropdownItem } from '../../models/dropdown-item';
3
+ interface Props {
4
+ triggerButton: ReactNode;
5
+ options: DropdownItem[];
6
+ selectedOption?: string;
7
+ disabled?: boolean;
8
+ containerClassName?: string;
9
+ openedClassName?: string;
10
+ onOptionSelect?: (key: string) => void;
11
+ }
12
+ export declare const Dropdown: FC<Props>;
13
+ export {};
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ interface Props {
3
+ text?: string;
4
+ highlightText?: string;
5
+ }
6
+ export declare const HighlightText: FC<Props>;
7
+ export {};
@@ -0,0 +1,10 @@
1
+ import { FC, MouseEvent, ReactNode } from 'react';
2
+ interface Props {
3
+ title?: string;
4
+ buttonClassName: string;
5
+ icon?: ReactNode;
6
+ disabled?: boolean;
7
+ onClick?: (e: MouseEvent<HTMLButtonElement>) => void;
8
+ }
9
+ export declare const IconButton: FC<Props>;
10
+ export {};
@@ -0,0 +1,14 @@
1
+ import { FC, KeyboardEvent } from 'react';
2
+ export interface InputProps {
3
+ type?: string;
4
+ value?: string | number | null;
5
+ placeholder?: string;
6
+ inputId: string;
7
+ cssClass?: string;
8
+ disabled?: boolean;
9
+ invalid?: boolean;
10
+ readonly?: boolean;
11
+ onChange?: (value: string) => void;
12
+ onKeyDown?: (value: KeyboardEvent<HTMLInputElement>) => void;
13
+ }
14
+ export declare const Input: FC<InputProps>;
@@ -0,0 +1,9 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { InputProps } from './Input';
3
+ interface Props extends InputProps {
4
+ iconAfterInput?: ReactNode;
5
+ containerClasses?: string;
6
+ iconBeforeInput?: ReactNode;
7
+ }
8
+ export declare const InputWithIcon: FC<Props>;
9
+ export {};
@@ -0,0 +1,10 @@
1
+ import { FC, ReactNode } from 'react';
2
+ interface Props {
3
+ url: string;
4
+ title?: string;
5
+ linkClassName?: string;
6
+ iconBefore?: ReactNode;
7
+ iconAfter?: ReactNode;
8
+ }
9
+ export declare const Link: FC<Props>;
10
+ export {};
@@ -0,0 +1 @@
1
+ export declare const Loader: () => import("react").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { FC, FormHTMLAttributes, ReactNode } from 'react';
2
+ import { PopUpSize, PopUpState } from '../../types/pop-up';
3
+ interface Props extends FormHTMLAttributes<HTMLFormElement> {
4
+ heading?: string | ReactNode;
5
+ portalId: string;
6
+ overlayClassName?: string;
7
+ containerClassName?: string;
8
+ state?: PopUpState | boolean;
9
+ size?: PopUpSize;
10
+ children: ReactNode[];
11
+ dividers?: boolean;
12
+ onClose: () => void;
13
+ dataTestId?: string;
14
+ closeButtonTitle?: string;
15
+ }
16
+ export declare const Popup: FC<Props>;
17
+ export {};
@@ -0,0 +1,11 @@
1
+ import { FC, ReactNode } from 'react';
2
+ interface Props {
3
+ id: string;
4
+ label?: string;
5
+ checked: boolean;
6
+ radioIcon?: ReactNode;
7
+ description?: string;
8
+ onChange?: (id: string, isChecked?: boolean) => void;
9
+ }
10
+ export declare const Radio: FC<Props>;
11
+ export {};
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ interface Props {
3
+ title?: string;
4
+ text?: string;
5
+ onClick?: (text?: string) => void;
6
+ }
7
+ export declare const Tag: FC<Props>;
8
+ export {};
@@ -0,0 +1,16 @@
1
+ export { Alert } from './Alert/Alert';
2
+ export { Button } from './Button/Button';
3
+ export { Calendar } from './Calendar/Calendar';
4
+ export { Checkbox } from './Checkbox/Checkbox';
5
+ export { CloseButton } from './CloseButton/CloseButton';
6
+ export { CollapsibleBlock } from './CollapsibleBlock/CollapsibleBlock';
7
+ export { HighlightText } from './HighlightText/HighlightText';
8
+ export { IconButton } from './IconButton/IconButton';
9
+ export { Input } from './Input/Input';
10
+ export { InputWithIcon } from './Input/InputWithIcon';
11
+ export { Link } from './Link/Link';
12
+ export { Loader } from './Loader/Loader';
13
+ export { Tag } from './Tag/Tag';
14
+ export { Radio } from './Radio/Radio';
15
+ export { Popup } from './Popup/Popup';
16
+ export { Dropdown } from './Dropdown/Dropdown';
@@ -0,0 +1,5 @@
1
+ export declare enum AlertType {
2
+ ERROR = "error",
3
+ SUCCESS = "success",
4
+ IN_PROGRESS = "in_progress"
5
+ }
@@ -0,0 +1,2 @@
1
+ export * from './alert';
2
+ export * from './tree-view';
@@ -0,0 +1,2 @@
1
+ export declare const TREE_NODE_ARROW_SIZE = 24;
2
+ export declare const TREE_NODE_PADDING = 24;
@@ -0,0 +1 @@
1
+ export { useIsMobile } from './isMobile';
@@ -0,0 +1 @@
1
+ export declare function useIsMobile(breakpoint?: number): boolean;
package/index.css ADDED
@@ -0,0 +1 @@
1
+ *,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.\!container{width:100%!important}.container{width:100%}@media (min-width:429px){.\!container{max-width:429px!important}.container{max-width:429px}}@media (min-width:720px){.\!container{max-width:720px!important}.container{max-width:720px}}@media (min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em;margin-top:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-bottom:1.2em;margin-top:1.2em}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);font-weight:500;text-decoration:underline}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal;margin-bottom:1.25em;margin-top:1.25em;padding-inline-start:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:disc;margin-bottom:1.25em;margin-top:1.25em;padding-inline-start:1.625em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-counters);font-weight:400}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-bottom:3em;margin-top:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){border-inline-start-color:var(--tw-prose-quote-borders);border-inline-start-width:.25rem;color:var(--tw-prose-quotes);font-style:italic;font-weight:500;margin-bottom:1.6em;margin-top:1.6em;padding-inline-start:1em;quotes:"\201C""\201D""\2018""\2019"}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-size:2.25em;font-weight:800;line-height:1.1111111;margin-bottom:.8888889em;margin-top:0}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:900}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-size:1.5em;font-weight:700;line-height:1.3333333;margin-bottom:1em;margin-top:2em}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:800}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-size:1.25em;font-weight:600;line-height:1.6;margin-bottom:.6em;margin-top:1.6em}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:700}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;line-height:1.5;margin-bottom:.5em;margin-top:1.5em}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:700}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:2em;margin-top:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-bottom:2em;margin-top:2em}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:2em;margin-top:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){border-radius:.3125rem;box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows)/10%),0 3px 0 rgb(var(--tw-prose-kbd-shadows)/10%);color:var(--tw-prose-kbd);font-family:inherit;font-size:.875em;font-weight:500;padding-inline-end:.375em;padding-bottom:.1875em;padding-top:.1875em;padding-inline-start:.375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-size:.875em;font-weight:600}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:var(--tw-prose-pre-bg);border-radius:.375rem;color:var(--tw-prose-pre-code);font-size:.875em;font-weight:400;line-height:1.7142857;margin-bottom:1.7142857em;margin-top:1.7142857em;overflow-x:auto;padding-inline-end:1.1428571em;padding-bottom:.8571429em;padding-top:.8571429em;padding-inline-start:1.1428571em}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:transparent;border-radius:0;border-width:0;color:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;padding:0}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.875em;line-height:1.7142857;margin-bottom:2em;margin-top:2em;table-layout:auto;width:100%}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-color:var(--tw-prose-th-borders);border-bottom-width:1px}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em;vertical-align:bottom}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-color:var(--tw-prose-td-borders);border-bottom-width:1px}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-color:var(--tw-prose-th-borders);border-top-width:1px}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(th,td):not(:where([class~=not-prose],[class~=not-prose] *)){text-align:start}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0;margin-top:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose{--tw-prose-body:#374151;--tw-prose-headings:#111827;--tw-prose-lead:#4b5563;--tw-prose-links:#111827;--tw-prose-bold:#111827;--tw-prose-counters:#6b7280;--tw-prose-bullets:#d1d5db;--tw-prose-hr:#e5e7eb;--tw-prose-quotes:#111827;--tw-prose-quote-borders:#e5e7eb;--tw-prose-captions:#6b7280;--tw-prose-kbd:#111827;--tw-prose-kbd-shadows:17 24 39;--tw-prose-code:#111827;--tw-prose-pre-code:#e5e7eb;--tw-prose-pre-bg:#1f2937;--tw-prose-th-borders:#d1d5db;--tw-prose-td-borders:#e5e7eb;--tw-prose-invert-body:#d1d5db;--tw-prose-invert-headings:#fff;--tw-prose-invert-lead:#9ca3af;--tw-prose-invert-links:#fff;--tw-prose-invert-bold:#fff;--tw-prose-invert-counters:#9ca3af;--tw-prose-invert-bullets:#4b5563;--tw-prose-invert-hr:#374151;--tw-prose-invert-quotes:#f3f4f6;--tw-prose-invert-quote-borders:#374151;--tw-prose-invert-captions:#9ca3af;--tw-prose-invert-kbd:#fff;--tw-prose-invert-kbd-shadows:255 255 255;--tw-prose-invert-code:#fff;--tw-prose-invert-pre-code:#d1d5db;--tw-prose-invert-pre-bg:rgba(0,0,0,.5);--tw-prose-invert-th-borders:#4b5563;--tw-prose-invert-td-borders:#374151;font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0;margin-top:0}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.5em;margin-top:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.75em;margin-top:.75em}.prose :where(.prose>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.75em;margin-top:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em;margin-top:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-inline-start:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-top:.5714286em;padding-inline-start:.5714286em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:2em;margin-top:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.pointer-events-none{pointer-events:none}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.bottom-3{bottom:.75rem}.left-0{left:0}.right-3{right:.75rem}.right-\[11px\]{right:11px}.top-\[26px\]{top:26px}.top-\[29px\]{top:29px}.z-10{z-index:10}.z-\[4\]{z-index:4}.z-\[52\]{z-index:52}.order-2{order:2}.order-3{order:3}.mx-\[-8px\]{margin-left:-8px;margin-right:-8px}.my-4{margin-bottom:1rem;margin-top:1rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-12{margin-left:3rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-6{margin-left:1.5rem}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-auto{margin-top:auto}.line-clamp-4{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:4}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.\!h-5{height:1.25rem!important}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-\[20px\]{height:20px}.h-\[40px\]{height:40px}.h-\[44px\]{height:44px}.h-\[4px\]{height:4px}.h-\[80\%\]{height:80%}.h-auto{height:auto}.h-full{height:100%}.max-h-96{max-height:24rem}.max-h-\[32px\]{max-height:32px}.max-h-\[400px\]{max-height:400px}.max-h-\[48px\]{max-height:48px}.max-h-full{max-height:100%}.min-h-0{min-height:0}.min-h-\[100px\]{min-height:100px}.min-h-\[200px\]{min-height:200px}.min-h-\[300px\]{min-height:300px}.min-h-\[400px\]{min-height:400px}.min-h-\[80px\]{min-height:80px}.\!w-5{width:1.25rem!important}.w-3{width:.75rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-\[176px\]{width:176px}.w-\[20px\]{width:20px}.w-\[24px\]{width:24px}.w-\[300px\]{width:300px}.w-\[363px\]{width:363px}.w-\[44px\]{width:44px}.w-\[fit-content\]{width:-moz-fit-content;width:fit-content}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.min-w-0{min-width:0}.min-w-\[200px\]{min-width:200px}.max-w-\[130px\]{max-width:130px}.max-w-\[250px\]{max-width:250px}.max-w-\[30\%\]{max-width:30%}.max-w-\[300px\]{max-width:300px}.max-w-\[500px\]{max-width:500px}.max-w-\[65\%\]{max-width:65%}.max-w-full{max-width:100%}.max-w-none{max-width:none}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.rotate-0{--tw-rotate:0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180,.rotate-\[180deg\]{--tw-rotate:180deg}.rotate-180,.rotate-\[180deg\],.rotate-\[90deg\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-\[90deg\]{--tw-rotate:90deg}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-8{-moz-column-gap:2rem;column-gap:2rem}.gap-y-1{row-gap:.25rem}.gap-y-3{row-gap:.75rem}.gap-y-4{row-gap:1rem}.gap-y-6{row-gap:1.5rem}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-left-width:calc(1px*(1 - var(--tw-divide-x-reverse)));border-right-width:calc(1px*var(--tw-divide-x-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.divide-neutrals-400>:not([hidden])~:not([hidden]){border-color:var(--neutrals-400,#e9eef6)}.divide-neutrals-500>:not([hidden])~:not([hidden]){border-color:var(--neutrals-500,#dddfe8)}.self-center{align-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-\[20px\]{border-radius:20px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.border{border-width:1px}.border-0{border-width:0}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-t-2{border-top-width:2px}.\!border-none{border-style:none!important}.border-none{border-style:none}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.border-neutrals-200{border-color:var(--neutrals-200,#f3f5ff)}.border-neutrals-400{border-color:var(--neutrals-400,#e9eef6)}.border-neutrals-600{border-color:var(--neutrals-600,#cfcfcf)}.border-neutrals-800{border-color:var(--neutrals-800,#757575)}.border-transparent{border-color:transparent}.border-b-transparent{border-bottom-color:transparent}.bg-blackout{background-color:var(--blackout,#090d13b3)}.bg-highlight{background-color:var(--highlight,#bedaff)}.bg-hues-100{background-color:var(--hues-100,#dfe6ff)}.bg-neutral-300{--tw-bg-opacity:1;background-color:rgb(212 212 212/var(--tw-bg-opacity,1))}.bg-neutrals-100{background-color:var(--neutrals-100,#f3f6fb)}.bg-neutrals-300{background-color:var(--neutrals-300,#f0f4f8)}.bg-neutrals-700{background-color:var(--neutrals-700,#89898b)}.bg-primary{background-color:var(--primary,#414fff)}.bg-transparent{background-color:transparent}.bg-white{background-color:var(--white,#fff)}.\!p-0{padding:0!important}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-\[16px\]{padding-left:16px;padding-right:16px}.py-0{padding-bottom:0;padding-top:0}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-4{padding-bottom:1rem;padding-top:1rem}.py-6{padding-bottom:1.5rem;padding-top:1.5rem}.py-\[6px\]{padding-bottom:6px;padding-top:6px}.pb-0{padding-bottom:0}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pb-8{padding-bottom:2rem}.pl-1{padding-left:.25rem}.pl-2{padding-left:.5rem}.pl-4{padding-left:1rem}.pr-0\.5{padding-right:.125rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pt-0{padding-top:0}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.pt-6{padding-top:1.5rem}.pt-\[20px\]{padding-top:20px}.pt-\[8px\]{padding-top:8px}.text-center{text-align:center}.text-right{text-align:right}.text-end{text-align:end}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.font-semibold{font-weight:600}.\!text-neutrals-1000{color:var(--neutrals-1000,#2b2b2d)!important}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.text-hues-800{color:var(--hues-800,#354487)}.text-neutral-700{--tw-text-opacity:1;color:rgb(64 64 64/var(--tw-text-opacity,1))}.text-neutrals-1000{color:var(--neutrals-1000,#2b2b2d)}.text-neutrals-400{color:var(--neutrals-400,#e9eef6)}.text-neutrals-500{color:var(--neutrals-500,#dddfe8)}.text-neutrals-600{color:var(--neutrals-600,#cfcfcf)}.text-neutrals-700{color:var(--neutrals-700,#89898b)}.text-neutrals-800{color:var(--neutrals-800,#757575)}.text-neutrals-900{color:var(--neutrals-900,#3f404a)}.text-primary{color:var(--primary,#414fff)}.text-white{color:var(--white,#fff)}.opacity-\[0\.7\]{opacity:.7}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-none{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.outline-none{outline:2px solid transparent;outline-offset:2px}.\!filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}body,html{color:var(--neutrals-1000,#2b2b2d);height:100%;overflow:hidden;width:100%}.base-icon-button{align-items:center;border-style:solid;border-width:1px;display:flex;flex-direction:row;justify-content:center;&:disabled{pointer-events:none}}.base-button{align-items:center;border-style:solid;border-width:1px;display:flex;flex-direction:row;justify-content:center;&:disabled{pointer-events:none}}.text-button-primary{background-color:var(--primary,#414fff);border-color:var(--primary,#414fff);color:var(--white,#fff);&:hover{color:var(--primary,#414fff)}}.text-button-secondary{border-color:var(--primary,#414fff)}.text-button-secondary,.text-button-tertiary{background-color:transparent;color:var(--primary,#414fff)}.text-button-tertiary{border-color:transparent}.loader{animation:spin 1s linear infinite;@keyframes spin{to{transform:rotate(1turn)}}&:before{content:"";display:block}}.two-lines{display:block;text-overflow:ellipsis}.two-lines:first-line{overflow:hidden}.two-lines{-webkit-box-orient:vertical;-webkit-line-clamp:2}.base-link{color:var(--primary,#414fff);&:hover{text-decoration-line:underline}}input{-moz-appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}}.padding-0{padding:0!important}.flatpickr-input{border-bottom:2px var(--primary,#414fff);border-style:solid;color:var(--neutrals-1000,#2b2b2d);height:40px;padding:8px 6px;width:100%;&:focus-visible{outline:2px solid transparent;outline-offset:2px}&:active,&:hover{border-color:var(--neutrals-1000,#2b2b2d)}}.last\:mb-8:last-child{margin-bottom:2rem}.last\:mr-4:last-child{margin-right:1rem}.last\:pb-0:last-child{padding-bottom:0}.hover\:border-hues-600:hover{border-color:var(--hues-600,#9da4ff)}.hover\:bg-hues-100:hover{background-color:var(--hues-100,#dfe6ff)}.group:hover .group-hover\:opacity-100{opacity:1}@media (max-width:719px){.sm\:top-4{top:1rem}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:h-3{height:.75rem}.sm\:h-\[24px\]{height:24px}.sm\:w-\[24px\]{width:24px}.sm\:w-\[calc\(100\%-30px\)\]{width:calc(100% - 30px)}.sm\:w-full{width:100%}.sm\:max-w-full{max-width:100%}.sm\:flex-col-reverse{flex-direction:column-reverse}.sm\:flex-nowrap{flex-wrap:nowrap}.sm\:items-center{align-items:center}.sm\:gap-y-5{row-gap:1.25rem}.sm\:border-0{border-width:0}.sm\:p-0{padding:0}.sm\:px-0{padding-left:0;padding-right:0}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:py-4{padding-bottom:1rem;padding-top:1rem}.sm\:py-6{padding-bottom:1.5rem;padding-top:1.5rem}.sm\:pb-2{padding-bottom:.5rem}.sm\:pt-10{padding-top:2.5rem}.sm\:hover\:bg-white:hover{background-color:var(--white,#fff)}}@media (min-width:720px){.sm-min\:px-4{padding-left:1rem;padding-right:1rem}}
package/index.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ export * from './components';
2
+ export * from './constants';
3
+ export * from './models';
4
+ export * from './hooks';
5
+ export * from './types';
package/index.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),f=require("react"),d=require("classnames"),k=require("@tabler/icons-react"),H=require("react-flatpickr"),m=require("@floating-ui/react"),_=()=>s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"loader"})}),M=({title:e,btnClassNames:t,iconWidth:r,iconHeight:n,onClick:c})=>s.jsx("button",{type:"button","aria-label":"button",className:t,title:e,onClick:c,children:s.jsx(k.IconX,{height:n||20,width:r||20})});var w=(e=>(e.ERROR="error",e.SUCCESS="success",e.IN_PROGRESS="in_progress",e))(w||{});const T=({alertDetails:e,successIcon:t,errorIcon:r,onClose:n,closeButtonTitle:c})=>{const o=()=>(e==null?void 0:e.type)===w.IN_PROGRESS?"alert-in-progress":(e==null?void 0:e.type)===w.SUCCESS?"alert-success":"alert-error";return f.useEffect(()=>{(e==null?void 0:e.type)!==w.IN_PROGRESS&&setTimeout(()=>{n==null||n()},5e3)},[e==null?void 0:e.type,n]),s.jsx("div",{className:d("alert alert-shadow fixed bottom-3 right-3 z-10",o()),children:s.jsxs("div",{className:"alert-content flex items-start",children:[s.jsx("div",{className:"alert-icon",children:(e==null?void 0:e.type)===w.IN_PROGRESS?s.jsx(_,{}):(e==null?void 0:e.type)===w.SUCCESS?t:r}),s.jsxs("div",{className:"flex flex-col gap-2 max-w-[300px]",children:[s.jsx("h3",{className:"truncate",children:e==null?void 0:e.title}),(e==null?void 0:e.text)&&s.jsx("div",{className:"alert-text truncate",title:e==null?void 0:e.text,children:e==null?void 0:e.text})]}),s.jsx(M,{title:c,onClick:n})]})})},W=({buttonClassName:e,isLoading:t=!1,title:r,disabled:n,iconAfter:c,iconBefore:o,onClick:i,isSmallButton:l})=>{const u=d(l?"font-semibold":"",c?"mr-2":"",o?"ml-2":"");return s.jsxs("button",{type:"button",className:d("base-button",e,l?"small-button":""),disabled:n||t,"aria-label":"button",onClick:h=>i==null?void 0:i(h),title:r,children:[o,t&&s.jsx(_,{}),r?l?s.jsx("h4",{className:u,children:r}):s.jsx("h3",{className:u,children:r}):null,c]})};var E=(e=>(e.MONTH="month",e.DAY="day",e))(E||{});const $=({label:e,onChange:t,value:r,options:n,calendarResolution:c=E.DAY,id:o,icon:i})=>{var g;const l=f.useRef(null);f.useEffect(()=>{var j;const p=l==null?void 0:l.current;p&&((j=p.querySelector("input"))==null||j.setAttribute("aria-label",e))},[e]);const u={...n,defaultDate:c===E.MONTH?new Date(r.getFullYear(),r.getMonth()):r},h=(p,j,N)=>{const x=`calendar__${c===E.MONTH?"month":"day"}`;N.calendarContainer&&N.calendarContainer.classList.add(x)},b=(p,j,N)=>{if(c===E.MONTH&&p.length>0){const x=n.minDate,a=n.maxDate,y=p[0].getFullYear(),R=N.calendarContainer,F="flatpickr-disabled",Y=R.querySelectorAll(".flatpickr-monthSelect-month"),A=R.querySelectorAll(".flatpickr-next-month")[0],I=R.querySelectorAll(".flatpickr-prev-month")[0];y===a.getFullYear()&&A.classList.add(F),y===x.getFullYear()&&I.classList.add(F),(y===x.getFullYear()||y===a.getFullYear())&&Y.forEach(O=>{O.classList.remove(F);const v=new Date(O.getAttribute("aria-label")),q=v.getFullYear()===x.getFullYear()&&v.getMonth()===x.getMonth(),G=v.getFullYear()===a.getFullYear()&&v.getMonth()===a.getMonth();q||G||(v<x||v>a)&&O.classList.add(F)})}};return s.jsxs("div",{className:"relative calendar",ref:l,children:[s.jsx("div",{className:"mb-1 calendar-title",children:e}),s.jsx("label",{htmlFor:o,className:"absolute cursor-pointer right-[11px] top-[29px]",children:i||s.jsx(k.IconCalendarEvent,{})}),s.jsx(H,{defaultValue:(g=c===E.MONTH?new Date(r.getFullYear(),r.getMonth()):r)==null?void 0:g.toDateString(),options:u,onChange:p=>{t(p[0])},onOpen:[b],onReady:[h],id:o})]})},B=({label:e,id:t,checked:r,checkboxIcon:n,onChange:c})=>{const o=f.useCallback(i=>{i.stopPropagation(),c==null||c(t,i.target.checked)},[c,t]);return s.jsxs("label",{className:"flex items-center cursor-pointer min-w-0 py-1",htmlFor:t,children:[s.jsx("span",{className:d("flex justify-center items-center w-4 h-4 mr-2 relative","checkbox-button"),children:r&&n}),e&&s.jsx("p",{className:d("text-neutrals-1000 flex-1 min-w-0 truncate pr-2","checkbox-button-text"),title:e,children:e}),s.jsx("input",{type:"checkbox",onChange:o,id:t,checked:r,className:"hidden"})]})},U=({title:e,icon:t,children:r,value:n})=>{const[c,o]=f.useState(!1);return s.jsxs("div",{className:`collapsible-block flex flex-col border-t-2 border-neutrals-600 ${c?"collapsible-block-open":""}`,children:[s.jsxs("div",{className:"collapsible-block-title flex cursor-pointer items-center py-4",onClick:()=>o(!c),children:[s.jsx("div",{className:`${c?"rotate-180":""} transition-transform`,children:t||s.jsx(k.IconChevronDown,{className:"w-5 h-5 mr-3"})}),s.jsxs("div",{className:"flex flex-1 items-center justify-between",children:[s.jsx("span",{children:e}),n&&s.jsx("p",{className:"body-1 text-neutrals-800",children:n})]})]}),c&&s.jsx("div",{className:"collapsible-block-content pb-4",children:r})]})},z=({text:e,highlightText:t})=>{const r=f.useMemo(()=>{var i;const n=[];if(!t)return[{id:0,text:e,highlight:!1}];const c=(t==null?void 0:t.toLowerCase())||"",o=((i=e==null?void 0:e.toLowerCase())==null?void 0:i.split(c))||"";for(let l=0,u=0;l<(o==null?void 0:o.length);l++){const h=o==null?void 0:o[l],b=h.length;h!==""&&n.push({id:n.length,highlight:!1,text:e==null?void 0:e.substring(u,u+b)}),u+=b,l!==(o==null?void 0:o.length)-1&&(n.push({id:n.length,highlight:!0,text:e==null?void 0:e.substring(u,u+t.length)}),u+=t.length)}return n},[t,e]);return s.jsx(s.Fragment,{children:r.map(n=>s.jsx("span",{className:d((n==null?void 0:n.highlight)&&"bg-highlight"),children:n==null?void 0:n.text},n==null?void 0:n.id))})},K=({icon:e,onClick:t,buttonClassName:r,disabled:n,title:c})=>s.jsx("button",{type:"button",className:d(r,"base-icon-button"),onClick:o=>t==null?void 0:t(o),disabled:n,title:c,"aria-label":"button",children:e}),P=({value:e,inputId:t,placeholder:r="",cssClass:n="",type:c="text",disabled:o,readonly:i,onChange:l,onKeyDown:u})=>{const h=d("truncate outline-none shadow-none body-1",n,i?"pointer-events-none":"");return s.jsx("input",{type:c,autoComplete:"off",id:t,placeholder:r,value:e||"",title:e?String(e):"",disabled:o,className:h,onKeyDown:u,onChange:b=>l==null?void 0:l(b.currentTarget.value)})},V=({iconBeforeInput:e,iconAfterInput:t,containerClasses:r,cssClass:n,...c})=>s.jsxs("div",{className:d("input w-full flex flex-row",r),children:[e,s.jsx(P,{cssClass:d("border-0 bg-transparent p-0 h-full shadow-none flex-1 min-w-0 rounded-none",n),...c}),t]}),Z=({url:e,title:t,linkClassName:r="",iconBefore:n,iconAfter:c})=>{const o=d(c?"mr-2":"",n?"ml-2":"");return s.jsxs("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:d("base-link",r),title:t,children:[n,s.jsx("span",{className:o,children:t}),c]})},Q=({title:e,text:t,onClick:r})=>s.jsx("button",{type:"button",className:"tag flex items-center justify-center",onClick:()=>r==null?void 0:r(t||e),"aria-label":"button",children:s.jsx("h4",{children:e})}),X=({label:e,id:t,checked:r,radioIcon:n,description:c,onChange:o})=>{const i=f.useCallback(l=>{l.stopPropagation(),o==null||o(t,l.target.checked)},[o,t]);return s.jsxs("label",{className:"flex flex-col cursor-pointer min-w-0 py-[6px]",htmlFor:t,children:[s.jsxs("p",{className:"radio-label flex items-center min-w-0",children:[s.jsx("span",{className:d("flex justify-center items-center w-4 h-4 mr-2 relative","radio-button",r?"radio-button-active":""),children:r&&n}),e&&s.jsx("span",{className:"radio-title body-1 text-neutrals-1000 flex-1 min-w-0 truncate pr-2",title:e,children:e})]}),c&&s.jsx("span",{className:"radio-description ml-6 text-neutrals-800 body-2 w-auto flex items-center",title:c,children:c}),s.jsx("input",{type:"radio",onChange:i,id:t,checked:r,className:"hidden"})]})};var S=(e=>(e.Closed="Closed",e.Opened="Opened",e))(S||{}),C=(e=>(e.LG="Large",e.SM="Small",e))(C||{});const J=({portalId:e,state:t=S.Opened,heading:r,size:n,onClose:c,children:o,overlayClassName:i,containerClassName:l,dividers:u=!0,closeButtonTitle:h})=>{const{refs:b,context:g}=m.useFloating({open:t!==S.Closed&&!!t,onOpenChange:c}),p=m.useRole(g,{role:"dialog"}),j=m.useDismiss(g,{outsidePress:!0}),{getFloatingProps:N}=m.useInteractions([p,j]),x=f.useCallback(a=>{a==null||a.preventDefault(),a==null||a.stopPropagation(),c()},[c]);return s.jsx(m.FloatingPortal,{id:e,children:t!==S.Closed&&s.jsx(m.FloatingOverlay,{className:d("z-[52] flex items-center justify-center bg-blackout p-4",i),children:s.jsx(m.FloatingFocusManager,{context:g,children:s.jsxs("div",{className:d("relative max-h-full modal rounded bg-white flex flex-col shadow w-full",n===C.LG&&"max-w-[65%]",n===C.SM&&"max-w-[30%]",u&&"divide-neutrals-400 divide-y",l,"sm:w-full sm:max-w-full sm:px-4 sm:py-6"),ref:b.setFloating,...N({onClick(a){a.stopPropagation()}}),children:[s.jsxs("div",{className:"flex flex-row justify-between py-3 px-6 items-center mb-2 modal-heading sm:p-0 sm:pb-2",children:[r&&(typeof r=="string"?s.jsx("h2",{className:"flex-1 min-w-0 mr-3 modal-heading-title sm:h3",children:r}):r),s.jsx(M,{title:h,onClick:x,btnClassNames:"sm:h-[24px] sm:w-[24px] sm:top-4"})]}),o.map(a=>a)]})})})})},D=e=>e.state===S.Closed?null:s.jsx(J,{...e}),ee=({triggerButton:e,options:t,selectedOption:r,disabled:n,containerClassName:c,openedClassName:o,onOptionSelect:i})=>{const[l,u]=f.useState(!1),{refs:h,floatingStyles:b,context:g}=m.useFloating({open:l,onOpenChange:n?void 0:u,placement:"bottom-end",middleware:[m.offset(8),m.flip(),m.shift()],whileElementsMounted:m.autoUpdate}),p=m.useClick(g),j=m.useDismiss(g,{outsidePress:!0}),{getReferenceProps:N,getFloatingProps:x}=m.useInteractions([p,j]);return s.jsxs(s.Fragment,{children:[s.jsx("div",{ref:h.setReference,...N({onClick(a){a.stopPropagation()}}),className:d(c,l&&o),children:e}),l&&s.jsx("div",{ref:h.setFloating,style:b,className:"flex flex-col z-10 dropdown-menu-shadow bg-white dropdown-container rounded",...x(),children:t.map(a=>s.jsx("div",{onClick:y=>{y.stopPropagation(),i==null||i(a.key),u(!1)},className:d("text-neutrals-900 body-3 cursor-pointer dropdown-item min-w-[200px]",r===a.key&&"bg-hues-100"),children:s.jsxs("div",{className:"p-2 hover:bg-hues-100 h-full dropdown-item-text flex items-center gap-x-2",title:a.title,children:[a.icon?a.icon:null,s.jsx("p",{children:a==null?void 0:a.title})]})},a.key))})]})},se=24,ne=24;function te(e=719){const[t,r]=f.useState(()=>typeof window<"u"?window.innerWidth<e:!1);return f.useEffect(()=>{const n=window.matchMedia(`(max-width: ${e}px)`),c=o=>{r(o.matches)};return r(n.matches),n.addEventListener("change",c),()=>n.removeEventListener("change",c)},[e]),t}var L=(e=>(e.Enter="Enter",e))(L||{});exports.Alert=T;exports.AlertType=w;exports.Button=W;exports.Calendar=$;exports.Checkbox=B;exports.CloseButton=M;exports.CollapsibleBlock=U;exports.Dropdown=ee;exports.HighlightText=z;exports.IconButton=K;exports.Input=P;exports.InputWithIcon=V;exports.KeyboardKey=L;exports.Link=Z;exports.Loader=_;exports.PopUpSize=C;exports.PopUpState=S;exports.Popup=D;exports.Radio=X;exports.TREE_NODE_ARROW_SIZE=se;exports.TREE_NODE_PADDING=ne;exports.Tag=Q;exports.useIsMobile=te;
package/index.mjs ADDED
@@ -0,0 +1,605 @@
1
+ import { jsx as s, jsxs as m, Fragment as P } from "react/jsx-runtime";
2
+ import { useEffect as k, useRef as U, useCallback as R, useState as _, useMemo as V } from "react";
3
+ import u from "classnames";
4
+ import { IconX as z, IconCalendarEvent as Q, IconChevronDown as T } from "@tabler/icons-react";
5
+ import X from "react-flatpickr";
6
+ import { useFloating as Y, useRole as Z, useDismiss as L, useInteractions as j, FloatingPortal as B, FloatingOverlay as J, FloatingFocusManager as K, autoUpdate as D, offset as ee, flip as ne, shift as re, useClick as te } from "@floating-ui/react";
7
+ const A = () => /* @__PURE__ */ s("div", { className: "flex items-center justify-center h-full", children: /* @__PURE__ */ s("div", { className: "loader" }) }), G = ({
8
+ title: e,
9
+ btnClassNames: r,
10
+ iconWidth: t,
11
+ iconHeight: n,
12
+ onClick: c
13
+ }) => /* @__PURE__ */ s(
14
+ "button",
15
+ {
16
+ type: "button",
17
+ "aria-label": "button",
18
+ className: r,
19
+ title: e,
20
+ onClick: c,
21
+ children: /* @__PURE__ */ s(z, { height: n || 20, width: t || 20 })
22
+ }
23
+ );
24
+ var x = /* @__PURE__ */ ((e) => (e.ERROR = "error", e.SUCCESS = "success", e.IN_PROGRESS = "in_progress", e))(x || {});
25
+ const he = ({
26
+ alertDetails: e,
27
+ successIcon: r,
28
+ errorIcon: t,
29
+ onClose: n,
30
+ closeButtonTitle: c
31
+ }) => {
32
+ const o = () => (e == null ? void 0 : e.type) === x.IN_PROGRESS ? "alert-in-progress" : (e == null ? void 0 : e.type) === x.SUCCESS ? "alert-success" : "alert-error";
33
+ return k(() => {
34
+ (e == null ? void 0 : e.type) !== x.IN_PROGRESS && setTimeout(() => {
35
+ n == null || n();
36
+ }, 5e3);
37
+ }, [e == null ? void 0 : e.type, n]), /* @__PURE__ */ s(
38
+ "div",
39
+ {
40
+ className: u(
41
+ "alert alert-shadow fixed bottom-3 right-3 z-10",
42
+ o()
43
+ ),
44
+ children: /* @__PURE__ */ m("div", { className: "alert-content flex items-start", children: [
45
+ /* @__PURE__ */ s("div", { className: "alert-icon", children: (e == null ? void 0 : e.type) === x.IN_PROGRESS ? /* @__PURE__ */ s(A, {}) : (e == null ? void 0 : e.type) === x.SUCCESS ? r : t }),
46
+ /* @__PURE__ */ m("div", { className: "flex flex-col gap-2 max-w-[300px]", children: [
47
+ /* @__PURE__ */ s("h3", { className: "truncate", children: e == null ? void 0 : e.title }),
48
+ (e == null ? void 0 : e.text) && /* @__PURE__ */ s("div", { className: "alert-text truncate", title: e == null ? void 0 : e.text, children: e == null ? void 0 : e.text })
49
+ ] }),
50
+ /* @__PURE__ */ s(G, { title: c, onClick: n })
51
+ ] })
52
+ }
53
+ );
54
+ }, pe = ({
55
+ buttonClassName: e,
56
+ isLoading: r = !1,
57
+ title: t,
58
+ disabled: n,
59
+ iconAfter: c,
60
+ iconBefore: o,
61
+ onClick: i,
62
+ isSmallButton: l
63
+ }) => {
64
+ const d = u(
65
+ l ? "font-semibold" : "",
66
+ c ? "mr-2" : "",
67
+ o ? "ml-2" : ""
68
+ );
69
+ return /* @__PURE__ */ m(
70
+ "button",
71
+ {
72
+ type: "button",
73
+ className: u(
74
+ "base-button",
75
+ e,
76
+ l ? "small-button" : ""
77
+ ),
78
+ disabled: n || r,
79
+ "aria-label": "button",
80
+ onClick: (h) => i == null ? void 0 : i(h),
81
+ title: t,
82
+ children: [
83
+ o,
84
+ r && /* @__PURE__ */ s(A, {}),
85
+ t ? l ? /* @__PURE__ */ s("h4", { className: d, children: t }) : /* @__PURE__ */ s("h3", { className: d, children: t }) : null,
86
+ c
87
+ ]
88
+ }
89
+ );
90
+ };
91
+ var E = /* @__PURE__ */ ((e) => (e.MONTH = "month", e.DAY = "day", e))(E || {});
92
+ const fe = ({
93
+ label: e,
94
+ onChange: r,
95
+ value: t,
96
+ options: n,
97
+ calendarResolution: c = E.DAY,
98
+ id: o,
99
+ icon: i
100
+ }) => {
101
+ var g;
102
+ const l = U(null);
103
+ k(() => {
104
+ var N;
105
+ const p = l == null ? void 0 : l.current;
106
+ p && ((N = p.querySelector("input")) == null || N.setAttribute("aria-label", e));
107
+ }, [e]);
108
+ const d = {
109
+ ...n,
110
+ defaultDate: c === E.MONTH ? new Date(t.getFullYear(), t.getMonth()) : t
111
+ }, h = (p, N, w) => {
112
+ const f = `calendar__${c === E.MONTH ? "month" : "day"}`;
113
+ w.calendarContainer && w.calendarContainer.classList.add(f);
114
+ }, b = (p, N, w) => {
115
+ if (c === E.MONTH && p.length > 0) {
116
+ const f = n.minDate, a = n.maxDate, y = p[0].getFullYear(), M = w.calendarContainer, S = "flatpickr-disabled", H = M.querySelectorAll(
117
+ ".flatpickr-monthSelect-month"
118
+ ), q = M.querySelectorAll(
119
+ ".flatpickr-next-month"
120
+ )[0], $ = M.querySelectorAll(
121
+ ".flatpickr-prev-month"
122
+ )[0];
123
+ y === a.getFullYear() && q.classList.add(S), y === f.getFullYear() && $.classList.add(S), (y === f.getFullYear() || y === a.getFullYear()) && H.forEach((O) => {
124
+ O.classList.remove(S);
125
+ const v = new Date(O.getAttribute("aria-label")), I = v.getFullYear() === f.getFullYear() && v.getMonth() === f.getMonth(), W = v.getFullYear() === a.getFullYear() && v.getMonth() === a.getMonth();
126
+ I || W || (v < f || v > a) && O.classList.add(S);
127
+ });
128
+ }
129
+ };
130
+ return /* @__PURE__ */ m("div", { className: "relative calendar", ref: l, children: [
131
+ /* @__PURE__ */ s("div", { className: "mb-1 calendar-title", children: e }),
132
+ /* @__PURE__ */ s(
133
+ "label",
134
+ {
135
+ htmlFor: o,
136
+ className: "absolute cursor-pointer right-[11px] top-[29px]",
137
+ children: i || /* @__PURE__ */ s(Q, {})
138
+ }
139
+ ),
140
+ /* @__PURE__ */ s(
141
+ X,
142
+ {
143
+ defaultValue: (g = c === E.MONTH ? new Date(t.getFullYear(), t.getMonth()) : t) == null ? void 0 : g.toDateString(),
144
+ options: d,
145
+ onChange: (p) => {
146
+ r(p[0]);
147
+ },
148
+ onOpen: [b],
149
+ onReady: [h],
150
+ id: o
151
+ }
152
+ )
153
+ ] });
154
+ }, be = ({
155
+ label: e,
156
+ id: r,
157
+ checked: t,
158
+ checkboxIcon: n,
159
+ onChange: c
160
+ }) => {
161
+ const o = R(
162
+ (i) => {
163
+ i.stopPropagation(), c == null || c(r, i.target.checked);
164
+ },
165
+ [c, r]
166
+ );
167
+ return /* @__PURE__ */ m(
168
+ "label",
169
+ {
170
+ className: "flex items-center cursor-pointer min-w-0 py-1",
171
+ htmlFor: r,
172
+ children: [
173
+ /* @__PURE__ */ s(
174
+ "span",
175
+ {
176
+ className: u(
177
+ "flex justify-center items-center w-4 h-4 mr-2 relative",
178
+ "checkbox-button"
179
+ ),
180
+ children: t && n
181
+ }
182
+ ),
183
+ e && /* @__PURE__ */ s(
184
+ "p",
185
+ {
186
+ className: u(
187
+ "text-neutrals-1000 flex-1 min-w-0 truncate pr-2",
188
+ "checkbox-button-text"
189
+ ),
190
+ title: e,
191
+ children: e
192
+ }
193
+ ),
194
+ /* @__PURE__ */ s(
195
+ "input",
196
+ {
197
+ type: "checkbox",
198
+ onChange: o,
199
+ id: r,
200
+ checked: t,
201
+ className: "hidden"
202
+ }
203
+ )
204
+ ]
205
+ }
206
+ );
207
+ }, ge = ({
208
+ title: e,
209
+ icon: r,
210
+ children: t,
211
+ value: n
212
+ }) => {
213
+ const [c, o] = _(!1);
214
+ return /* @__PURE__ */ m(
215
+ "div",
216
+ {
217
+ className: `collapsible-block flex flex-col border-t-2 border-neutrals-600 ${c ? "collapsible-block-open" : ""}`,
218
+ children: [
219
+ /* @__PURE__ */ m(
220
+ "div",
221
+ {
222
+ className: "collapsible-block-title flex cursor-pointer items-center py-4",
223
+ onClick: () => o(!c),
224
+ children: [
225
+ /* @__PURE__ */ s("div", { className: `${c ? "rotate-180" : ""} transition-transform`, children: r || /* @__PURE__ */ s(T, { className: "w-5 h-5 mr-3" }) }),
226
+ /* @__PURE__ */ m("div", { className: "flex flex-1 items-center justify-between", children: [
227
+ /* @__PURE__ */ s("span", { children: e }),
228
+ n && /* @__PURE__ */ s("p", { className: "body-1 text-neutrals-800", children: n })
229
+ ] })
230
+ ]
231
+ }
232
+ ),
233
+ c && /* @__PURE__ */ s("div", { className: "collapsible-block-content pb-4", children: t })
234
+ ]
235
+ }
236
+ );
237
+ }, Ne = ({ text: e, highlightText: r }) => {
238
+ const t = V(() => {
239
+ var i;
240
+ const n = [];
241
+ if (!r)
242
+ return [{ id: 0, text: e, highlight: !1 }];
243
+ const c = (r == null ? void 0 : r.toLowerCase()) || "", o = ((i = e == null ? void 0 : e.toLowerCase()) == null ? void 0 : i.split(c)) || "";
244
+ for (let l = 0, d = 0; l < (o == null ? void 0 : o.length); l++) {
245
+ const h = o == null ? void 0 : o[l], b = h.length;
246
+ h !== "" && n.push({
247
+ id: n.length,
248
+ highlight: !1,
249
+ text: e == null ? void 0 : e.substring(
250
+ d,
251
+ d + b
252
+ )
253
+ }), d += b, l !== (o == null ? void 0 : o.length) - 1 && (n.push({
254
+ id: n.length,
255
+ highlight: !0,
256
+ text: e == null ? void 0 : e.substring(
257
+ d,
258
+ d + r.length
259
+ )
260
+ }), d += r.length);
261
+ }
262
+ return n;
263
+ }, [r, e]);
264
+ return /* @__PURE__ */ s(P, { children: t.map((n) => /* @__PURE__ */ s(
265
+ "span",
266
+ {
267
+ className: u((n == null ? void 0 : n.highlight) && "bg-highlight"),
268
+ children: n == null ? void 0 : n.text
269
+ },
270
+ n == null ? void 0 : n.id
271
+ )) });
272
+ }, we = ({
273
+ icon: e,
274
+ onClick: r,
275
+ buttonClassName: t,
276
+ disabled: n,
277
+ title: c
278
+ }) => /* @__PURE__ */ s(
279
+ "button",
280
+ {
281
+ type: "button",
282
+ className: u(t, "base-icon-button"),
283
+ onClick: (o) => r == null ? void 0 : r(o),
284
+ disabled: n,
285
+ title: c,
286
+ "aria-label": "button",
287
+ children: e
288
+ }
289
+ ), se = ({
290
+ value: e,
291
+ inputId: r,
292
+ placeholder: t = "",
293
+ cssClass: n = "",
294
+ type: c = "text",
295
+ disabled: o,
296
+ readonly: i,
297
+ onChange: l,
298
+ onKeyDown: d
299
+ }) => {
300
+ const h = u(
301
+ "truncate outline-none shadow-none body-1",
302
+ n,
303
+ i ? "pointer-events-none" : ""
304
+ );
305
+ return /* @__PURE__ */ s(
306
+ "input",
307
+ {
308
+ type: c,
309
+ autoComplete: "off",
310
+ id: r,
311
+ placeholder: t,
312
+ value: e || "",
313
+ title: e ? String(e) : "",
314
+ disabled: o,
315
+ className: h,
316
+ onKeyDown: d,
317
+ onChange: (b) => l == null ? void 0 : l(b.currentTarget.value)
318
+ }
319
+ );
320
+ }, ye = ({
321
+ iconBeforeInput: e,
322
+ iconAfterInput: r,
323
+ containerClasses: t,
324
+ cssClass: n,
325
+ ...c
326
+ }) => /* @__PURE__ */ m("div", { className: u("input w-full flex flex-row", t), children: [
327
+ e,
328
+ /* @__PURE__ */ s(
329
+ se,
330
+ {
331
+ cssClass: u(
332
+ "border-0 bg-transparent p-0 h-full shadow-none flex-1 min-w-0 rounded-none",
333
+ n
334
+ ),
335
+ ...c
336
+ }
337
+ ),
338
+ r
339
+ ] }), ve = ({
340
+ url: e,
341
+ title: r,
342
+ linkClassName: t = "",
343
+ iconBefore: n,
344
+ iconAfter: c
345
+ }) => {
346
+ const o = u(
347
+ c ? "mr-2" : "",
348
+ n ? "ml-2" : ""
349
+ );
350
+ return /* @__PURE__ */ m(
351
+ "a",
352
+ {
353
+ href: e,
354
+ target: "_blank",
355
+ rel: "noopener noreferrer",
356
+ className: u("base-link", t),
357
+ title: r,
358
+ children: [
359
+ n,
360
+ /* @__PURE__ */ s("span", { className: o, children: r }),
361
+ c
362
+ ]
363
+ }
364
+ );
365
+ }, xe = ({ title: e, text: r, onClick: t }) => /* @__PURE__ */ s(
366
+ "button",
367
+ {
368
+ type: "button",
369
+ className: "tag flex items-center justify-center",
370
+ onClick: () => t == null ? void 0 : t(r || e),
371
+ "aria-label": "button",
372
+ children: /* @__PURE__ */ s("h4", { children: e })
373
+ }
374
+ ), Ee = ({
375
+ label: e,
376
+ id: r,
377
+ checked: t,
378
+ radioIcon: n,
379
+ description: c,
380
+ onChange: o
381
+ }) => {
382
+ const i = R(
383
+ (l) => {
384
+ l.stopPropagation(), o == null || o(r, l.target.checked);
385
+ },
386
+ [o, r]
387
+ );
388
+ return /* @__PURE__ */ m(
389
+ "label",
390
+ {
391
+ className: "flex flex-col cursor-pointer min-w-0 py-[6px]",
392
+ htmlFor: r,
393
+ children: [
394
+ /* @__PURE__ */ m("p", { className: "radio-label flex items-center min-w-0", children: [
395
+ /* @__PURE__ */ s(
396
+ "span",
397
+ {
398
+ className: u(
399
+ "flex justify-center items-center w-4 h-4 mr-2 relative",
400
+ "radio-button",
401
+ t ? "radio-button-active" : ""
402
+ ),
403
+ children: t && n
404
+ }
405
+ ),
406
+ e && /* @__PURE__ */ s(
407
+ "span",
408
+ {
409
+ className: "radio-title body-1 text-neutrals-1000 flex-1 min-w-0 truncate pr-2",
410
+ title: e,
411
+ children: e
412
+ }
413
+ )
414
+ ] }),
415
+ c && /* @__PURE__ */ s(
416
+ "span",
417
+ {
418
+ className: "radio-description ml-6 text-neutrals-800 body-2 w-auto flex items-center",
419
+ title: c,
420
+ children: c
421
+ }
422
+ ),
423
+ /* @__PURE__ */ s(
424
+ "input",
425
+ {
426
+ type: "radio",
427
+ onChange: i,
428
+ id: r,
429
+ checked: t,
430
+ className: "hidden"
431
+ }
432
+ )
433
+ ]
434
+ }
435
+ );
436
+ };
437
+ var F = /* @__PURE__ */ ((e) => (e.Closed = "Closed", e.Opened = "Opened", e))(F || {}), C = /* @__PURE__ */ ((e) => (e.LG = "Large", e.SM = "Small", e))(C || {});
438
+ const ce = ({
439
+ portalId: e,
440
+ state: r = F.Opened,
441
+ heading: t,
442
+ size: n,
443
+ onClose: c,
444
+ children: o,
445
+ overlayClassName: i,
446
+ containerClassName: l,
447
+ dividers: d = !0,
448
+ closeButtonTitle: h
449
+ }) => {
450
+ const { refs: b, context: g } = Y({
451
+ open: r !== F.Closed && !!r,
452
+ onOpenChange: c
453
+ }), p = Z(g, { role: "dialog" }), N = L(g, { outsidePress: !0 }), { getFloatingProps: w } = j([p, N]), f = R(
454
+ (a) => {
455
+ a == null || a.preventDefault(), a == null || a.stopPropagation(), c();
456
+ },
457
+ [c]
458
+ );
459
+ return /* @__PURE__ */ s(B, { id: e, children: r !== F.Closed && /* @__PURE__ */ s(
460
+ J,
461
+ {
462
+ className: u(
463
+ "z-[52] flex items-center justify-center bg-blackout p-4",
464
+ i
465
+ ),
466
+ children: /* @__PURE__ */ s(K, { context: g, children: /* @__PURE__ */ m(
467
+ "div",
468
+ {
469
+ className: u(
470
+ "relative max-h-full modal rounded bg-white flex flex-col shadow w-full",
471
+ n === C.LG && "max-w-[65%]",
472
+ n === C.SM && "max-w-[30%]",
473
+ d && "divide-neutrals-400 divide-y",
474
+ l,
475
+ "sm:w-full sm:max-w-full sm:px-4 sm:py-6"
476
+ ),
477
+ ref: b.setFloating,
478
+ ...w({
479
+ onClick(a) {
480
+ a.stopPropagation();
481
+ }
482
+ }),
483
+ children: [
484
+ /* @__PURE__ */ m("div", { className: "flex flex-row justify-between py-3 px-6 items-center mb-2 modal-heading sm:p-0 sm:pb-2", children: [
485
+ t && (typeof t == "string" ? /* @__PURE__ */ s("h2", { className: "flex-1 min-w-0 mr-3 modal-heading-title sm:h3", children: t }) : t),
486
+ /* @__PURE__ */ s(
487
+ G,
488
+ {
489
+ title: h,
490
+ onClick: f,
491
+ btnClassNames: "sm:h-[24px] sm:w-[24px] sm:top-4"
492
+ }
493
+ )
494
+ ] }),
495
+ o.map((a) => a)
496
+ ]
497
+ }
498
+ ) })
499
+ }
500
+ ) });
501
+ }, Fe = (e) => e.state === F.Closed ? null : /* @__PURE__ */ s(ce, { ...e }), Se = ({
502
+ triggerButton: e,
503
+ options: r,
504
+ selectedOption: t,
505
+ disabled: n,
506
+ containerClassName: c,
507
+ openedClassName: o,
508
+ onOptionSelect: i
509
+ }) => {
510
+ const [l, d] = _(!1), { refs: h, floatingStyles: b, context: g } = Y({
511
+ open: l,
512
+ onOpenChange: n ? void 0 : d,
513
+ placement: "bottom-end",
514
+ middleware: [ee(8), ne(), re()],
515
+ whileElementsMounted: D
516
+ }), p = te(g), N = L(g, { outsidePress: !0 }), { getReferenceProps: w, getFloatingProps: f } = j([
517
+ p,
518
+ N
519
+ ]);
520
+ return /* @__PURE__ */ m(P, { children: [
521
+ /* @__PURE__ */ s(
522
+ "div",
523
+ {
524
+ ref: h.setReference,
525
+ ...w({
526
+ onClick(a) {
527
+ a.stopPropagation();
528
+ }
529
+ }),
530
+ className: u(c, l && o),
531
+ children: e
532
+ }
533
+ ),
534
+ l && /* @__PURE__ */ s(
535
+ "div",
536
+ {
537
+ ref: h.setFloating,
538
+ style: b,
539
+ className: "flex flex-col z-10 dropdown-menu-shadow bg-white dropdown-container rounded",
540
+ ...f(),
541
+ children: r.map((a) => /* @__PURE__ */ s(
542
+ "div",
543
+ {
544
+ onClick: (y) => {
545
+ y.stopPropagation(), i == null || i(a.key), d(!1);
546
+ },
547
+ className: u(
548
+ "text-neutrals-900 body-3 cursor-pointer dropdown-item min-w-[200px]",
549
+ t === a.key && "bg-hues-100"
550
+ ),
551
+ children: /* @__PURE__ */ m(
552
+ "div",
553
+ {
554
+ className: "p-2 hover:bg-hues-100 h-full dropdown-item-text flex items-center gap-x-2",
555
+ title: a.title,
556
+ children: [
557
+ a.icon ? a.icon : null,
558
+ /* @__PURE__ */ s("p", { children: a == null ? void 0 : a.title })
559
+ ]
560
+ }
561
+ )
562
+ },
563
+ a.key
564
+ ))
565
+ }
566
+ )
567
+ ] });
568
+ }, Me = 24, Oe = 24;
569
+ function Ce(e = 719) {
570
+ const [r, t] = _(
571
+ () => typeof window < "u" ? window.innerWidth < e : !1
572
+ );
573
+ return k(() => {
574
+ const n = window.matchMedia(`(max-width: ${e}px)`), c = (o) => {
575
+ t(o.matches);
576
+ };
577
+ return t(n.matches), n.addEventListener("change", c), () => n.removeEventListener("change", c);
578
+ }, [e]), r;
579
+ }
580
+ var oe = /* @__PURE__ */ ((e) => (e.Enter = "Enter", e))(oe || {});
581
+ export {
582
+ he as Alert,
583
+ x as AlertType,
584
+ pe as Button,
585
+ fe as Calendar,
586
+ be as Checkbox,
587
+ G as CloseButton,
588
+ ge as CollapsibleBlock,
589
+ Se as Dropdown,
590
+ Ne as HighlightText,
591
+ we as IconButton,
592
+ se as Input,
593
+ ye as InputWithIcon,
594
+ oe as KeyboardKey,
595
+ ve as Link,
596
+ A as Loader,
597
+ C as PopUpSize,
598
+ F as PopUpState,
599
+ Fe as Popup,
600
+ Ee as Radio,
601
+ Me as TREE_NODE_ARROW_SIZE,
602
+ Oe as TREE_NODE_PADDING,
603
+ xe as Tag,
604
+ Ce as useIsMobile
605
+ };
@@ -0,0 +1,6 @@
1
+ import { AlertType } from '../constants/alert';
2
+ export interface AlertDetails {
3
+ title?: string;
4
+ text?: string;
5
+ type: AlertType;
6
+ }
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from 'react';
2
+ export interface DropdownItem {
3
+ key: string;
4
+ title: string;
5
+ icon?: ReactNode;
6
+ }
@@ -0,0 +1,2 @@
1
+ export * from './alert';
2
+ export * from './dropdown-item';
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@epam/statgpt-ui-components",
3
+ "version": "0.1.0-rc.0",
4
+ "license": "MIT",
5
+ "dependencies": {
6
+ "react-flatpickr": "^4.0.11",
7
+ "react": "19.1.0",
8
+ "classnames": "^2.5.1",
9
+ "@epam/statgpt-shared-toolkit": "0.1.0-rc.0",
10
+ "@tabler/icons-react": "^3.34.1",
11
+ "@floating-ui/react": "^0.27.14"
12
+ },
13
+ "exports": {
14
+ ".": {
15
+ "import": "./index.mjs",
16
+ "require": "./index.js",
17
+ "types": "./index.d.ts"
18
+ },
19
+ "./index.css": "./index.css"
20
+ },
21
+ "main": "index",
22
+ "browser": "index.js",
23
+ "module": "index.mjs",
24
+ "types": "./index.d.ts"
25
+ }
@@ -0,0 +1,2 @@
1
+ export * from './keyboard';
2
+ export * from './pop-up';
@@ -0,0 +1,3 @@
1
+ export declare enum KeyboardKey {
2
+ Enter = "Enter"
3
+ }
@@ -0,0 +1,8 @@
1
+ export declare enum PopUpState {
2
+ Closed = "Closed",
3
+ Opened = "Opened"
4
+ }
5
+ export declare enum PopUpSize {
6
+ LG = "Large",
7
+ SM = "Small"
8
+ }