@hbuesing/ui-library 5.0.0 → 6.0.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/dist/components/breadcrumbs/breadcrumbs.d.ts +3 -0
- package/dist/components/breadcrumbs/index.d.ts +1 -0
- package/dist/components/breadcrumbs/types.d.ts +12 -0
- package/dist/components/button/types.d.ts +1 -0
- package/dist/components/check/checkbox/types.d.ts +1 -3
- package/dist/components/check/radio/types.d.ts +1 -3
- package/dist/components/check/radioGroup/types.d.ts +1 -3
- package/dist/components/collapsible/accordion/accordion.d.ts +3 -0
- package/dist/components/collapsible/accordion/index.d.ts +1 -0
- package/dist/components/collapsible/accordion/types.d.ts +11 -0
- package/dist/components/collapsible/details/details.d.ts +3 -0
- package/dist/components/collapsible/details/index.d.ts +1 -0
- package/dist/components/collapsible/details/types.d.ts +9 -0
- package/dist/components/common/types.d.ts +2 -2
- package/dist/components/dialog/types.d.ts +1 -1
- package/dist/components/input/index.d.ts +1 -0
- package/dist/components/input/internal/types.d.ts +13 -0
- package/dist/components/input/internal/wrapper.d.ts +3 -0
- package/dist/components/input/textarea.d.ts +3 -0
- package/dist/components/input/types.d.ts +7 -3
- package/dist/components/pagination/page/index.d.ts +2 -0
- package/dist/components/pagination/page/pagination.d.ts +3 -0
- package/dist/components/pagination/page/types.d.ts +25 -0
- package/dist/components/pagination/table/index.d.ts +1 -0
- package/dist/components/pagination/table/tablePagination.d.ts +3 -0
- package/dist/components/pagination/table/types.d.ts +14 -0
- package/dist/components/progress/circularProgress.d.ts +3 -0
- package/dist/components/progress/index.d.ts +2 -0
- package/dist/components/progress/linearProgress.d.ts +3 -0
- package/dist/components/progress/types.d.ts +8 -0
- package/dist/components/skeleton/index.d.ts +1 -0
- package/dist/components/skeleton/skeleton.d.ts +3 -0
- package/dist/components/skeleton/types.d.ts +8 -0
- package/dist/components/switch/index.d.ts +1 -0
- package/dist/components/switch/switch.d.ts +3 -0
- package/dist/components/switch/types.d.ts +6 -0
- package/dist/components/tag/index.d.ts +1 -0
- package/dist/components/tag/tag.d.ts +3 -0
- package/dist/components/tag/types.d.ts +23 -0
- package/dist/components/toast/index.d.ts +3 -0
- package/dist/components/toast/toast.d.ts +3 -0
- package/dist/components/toast/toaster.d.ts +6 -0
- package/dist/components/toast/types.d.ts +36 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +12 -3
- package/dist/index.js +1 -1
- package/dist/utils/addAttribution.d.ts +2 -0
- package/dist/utils/checkTypes.d.ts +2 -0
- package/dist/utils/colorConvert.d.ts +1 -0
- package/dist/utils/conditionalClass.d.ts +1 -1
- package/dist/utils/getFontsize.d.ts +2 -0
- package/package.json +14 -7
- package/dist/components/backdrop/backdrop.d.ts +0 -3
- package/dist/components/backdrop/index.d.ts +0 -1
- package/dist/components/backdrop/types.d.ts +0 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './breadcrumbs';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import type { BaseProps } from '../common/types';
|
|
3
|
+
export type BreadcrumbsType = BaseProps & {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
afterCollapse?: number;
|
|
6
|
+
beforeCollapse?: number;
|
|
7
|
+
expandButtonLabel?: string;
|
|
8
|
+
highlightLast?: boolean;
|
|
9
|
+
maxEntries?: number;
|
|
10
|
+
separator?: ReactNode;
|
|
11
|
+
'aria-label'?: ComponentProps<'nav'>['aria-label'];
|
|
12
|
+
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { BaseComponentProps } from '../../common/types';
|
|
2
2
|
import type { CSSProperties, ReactNode } from 'react';
|
|
3
|
-
export type CheckboxProps = BaseComponentProps<'input'> &
|
|
4
|
-
type AdditionalCheckboxProps = {
|
|
3
|
+
export type CheckboxProps = BaseComponentProps<'input'> & {
|
|
5
4
|
children?: ReactNode;
|
|
6
5
|
color?: CSSProperties['backgroundColor'];
|
|
7
6
|
};
|
|
8
|
-
export {};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { BaseComponentProps } from '../../common/types';
|
|
2
2
|
import type { CSSProperties, ReactNode } from 'react';
|
|
3
|
-
export type RadioProps = BaseComponentProps<'input'> &
|
|
4
|
-
type AdditionalRadioProps = {
|
|
3
|
+
export type RadioProps = BaseComponentProps<'input'> & {
|
|
5
4
|
children?: ReactNode;
|
|
6
5
|
color?: CSSProperties['backgroundColor'];
|
|
7
6
|
};
|
|
8
|
-
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ChangeEventHandler, CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import type { BaseProps } from '../../common/types';
|
|
3
|
-
export type RadioGroupProps = BaseProps &
|
|
4
|
-
type AdditionalRadioGroupProps = {
|
|
3
|
+
export type RadioGroupProps = BaseProps & {
|
|
5
4
|
options: RadioOption[];
|
|
6
5
|
color?: CSSProperties['backgroundColor'];
|
|
7
6
|
direction?: 'row' | 'column';
|
|
@@ -17,4 +16,3 @@ export type RadioOption = {
|
|
|
17
16
|
id?: string | undefined;
|
|
18
17
|
title?: string | undefined;
|
|
19
18
|
};
|
|
20
|
-
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './accordion';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import type { DetailsProps } from '../details/types';
|
|
3
|
+
import type { BaseProps } from '../../common/types';
|
|
4
|
+
import type { Details } from '../details';
|
|
5
|
+
export type AccordionProps = BaseProps & {
|
|
6
|
+
children: ReactElement<DetailsProps, typeof Details>[];
|
|
7
|
+
divider?: boolean;
|
|
8
|
+
icon?: ReactNode;
|
|
9
|
+
iconPosition?: 'start' | 'end' | undefined;
|
|
10
|
+
name?: string;
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './details';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { BaseComponentProps } from '../../common/types';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export type DetailsProps = BaseComponentProps<'details'> & {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
summary: ReactNode;
|
|
6
|
+
divider?: boolean;
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
iconPosition?: 'start' | 'end' | undefined;
|
|
9
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ComponentPropsWithRef, ElementType } from 'react';
|
|
2
2
|
export type Size = 'small' | 'medium' | 'large';
|
|
3
|
-
export type Status = 'success' | 'warning' | 'error';
|
|
3
|
+
export type Status = 'info' | 'success' | 'warning' | 'error';
|
|
4
4
|
export type BaseComponentProps<T extends ElementType> = ComponentPropsWithRef<T> & BaseProps;
|
|
5
5
|
export type BaseProps = {
|
|
6
|
-
dark?: boolean;
|
|
6
|
+
dark?: boolean | undefined;
|
|
7
7
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export type WrapperProps = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
dark: boolean | undefined;
|
|
5
|
+
error: boolean | undefined;
|
|
6
|
+
helpId: string | undefined;
|
|
7
|
+
helpText: string | undefined;
|
|
8
|
+
id: string;
|
|
9
|
+
label: string | undefined;
|
|
10
|
+
required: boolean | undefined;
|
|
11
|
+
isTextarea?: boolean;
|
|
12
|
+
variant?: 'outlined' | 'basic';
|
|
13
|
+
};
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import type { BaseComponentProps } from '../common/types';
|
|
2
2
|
import type { InputDecorator } from './inputDecorator';
|
|
3
3
|
import type { ReactElement, ReactNode } from 'react';
|
|
4
|
-
export type InputProps = BaseComponentProps<'input'> &
|
|
5
|
-
type AdditionalInputProps = {
|
|
4
|
+
export type InputProps = BaseComponentProps<'input'> & {
|
|
6
5
|
label: string;
|
|
7
6
|
variant: 'outlined' | 'basic';
|
|
8
7
|
children?: ReactElement<InputDecoratorProps, typeof InputDecorator>;
|
|
9
8
|
error?: boolean;
|
|
10
9
|
helpText?: string;
|
|
11
10
|
};
|
|
11
|
+
export type TextareaProps = BaseComponentProps<'textarea'> & {
|
|
12
|
+
label: string;
|
|
13
|
+
error?: boolean;
|
|
14
|
+
helpText?: string;
|
|
15
|
+
resize?: 'both' | 'vertical' | 'horizontal' | 'none';
|
|
16
|
+
};
|
|
12
17
|
export type InputDecoratorProps = {
|
|
13
18
|
children: ReactNode;
|
|
14
19
|
position?: 'start' | 'end';
|
|
15
20
|
onFocus?: boolean;
|
|
16
21
|
};
|
|
17
|
-
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { BaseProps } from '../../common/types';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export type PaginationProps = BaseProps & {
|
|
4
|
+
pages: number;
|
|
5
|
+
activePage?: number;
|
|
6
|
+
ariaLabels?: AriaLabels;
|
|
7
|
+
boundary?: number;
|
|
8
|
+
disableFirstButton?: boolean;
|
|
9
|
+
disableLastButton?: boolean;
|
|
10
|
+
disableNextButton?: boolean;
|
|
11
|
+
disablePrevButton?: boolean;
|
|
12
|
+
firstButton?: ReactNode;
|
|
13
|
+
lastButton?: ReactNode;
|
|
14
|
+
nextButton?: ReactNode;
|
|
15
|
+
onChange?: (page: number) => void;
|
|
16
|
+
prevButton?: ReactNode;
|
|
17
|
+
siblings?: number;
|
|
18
|
+
};
|
|
19
|
+
export type AriaLabels = {
|
|
20
|
+
first?: string;
|
|
21
|
+
last?: string;
|
|
22
|
+
next?: string;
|
|
23
|
+
prev?: string;
|
|
24
|
+
page?: string;
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './tablePagination';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { BaseProps } from '../../common/types';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export type TablePaginationProps = BaseProps & {
|
|
4
|
+
entries: number;
|
|
5
|
+
activePage?: number;
|
|
6
|
+
entriesDescription?: string;
|
|
7
|
+
nextButton?: ReactNode;
|
|
8
|
+
nextLabel?: string;
|
|
9
|
+
onChange?: (page: number, count: number) => void;
|
|
10
|
+
prevButton?: ReactNode;
|
|
11
|
+
prevLabel?: string;
|
|
12
|
+
rowLabel?: string;
|
|
13
|
+
rows?: number[];
|
|
14
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { BaseProps, Status } from '../common/types';
|
|
2
|
+
import type { CSSProperties } from 'react';
|
|
3
|
+
export type ProgressProps = BaseProps & {
|
|
4
|
+
color?: CSSProperties['stroke'] | Status;
|
|
5
|
+
size?: CSSProperties['height'];
|
|
6
|
+
value?: number;
|
|
7
|
+
'aria-label'?: string;
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './skeleton';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { BaseProps } from '../common/types';
|
|
2
|
+
import type { CSSProperties } from 'react';
|
|
3
|
+
export type SkeletonProps = BaseProps & {
|
|
4
|
+
disableAnimation?: boolean;
|
|
5
|
+
height?: CSSProperties['height'];
|
|
6
|
+
radius?: CSSProperties['borderRadius'];
|
|
7
|
+
width?: CSSProperties['width'];
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './switch';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './tag';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { HTMLAttributeAnchorTarget, ReactNode } from 'react';
|
|
2
|
+
import type { BaseProps, Size, Status } from '../common/types';
|
|
3
|
+
export type TagProps = BaseProps & {
|
|
4
|
+
color: Status | `#${string}`;
|
|
5
|
+
variant: 'filled' | 'outlined';
|
|
6
|
+
deleteIcon?: ReactNode;
|
|
7
|
+
elevated?: boolean;
|
|
8
|
+
onDelete?: () => void;
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
size?: Size;
|
|
11
|
+
} & ({
|
|
12
|
+
href: string;
|
|
13
|
+
target?: HTMLAttributeAnchorTarget;
|
|
14
|
+
} | {
|
|
15
|
+
href?: never;
|
|
16
|
+
target?: never;
|
|
17
|
+
}) & ({
|
|
18
|
+
label: string;
|
|
19
|
+
children?: never;
|
|
20
|
+
} | {
|
|
21
|
+
label?: never;
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ToasterContext, ToasterProps } from './types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const ToasterContext: React.Context<ToasterContext>;
|
|
4
|
+
export declare function ToastProvider(props: ToasterProps): React.JSX.Element;
|
|
5
|
+
export declare function useToastContext(): ToasterContext;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { BaseProps, Status } from '../common/types';
|
|
2
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
3
|
+
import { Toast } from './toast';
|
|
4
|
+
export type ToasterProps = {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
alignment?: {
|
|
7
|
+
vertical: 'top' | 'center' | 'bottom';
|
|
8
|
+
horizontal: 'left' | 'center' | 'right';
|
|
9
|
+
};
|
|
10
|
+
dark?: boolean;
|
|
11
|
+
dismissible?: boolean;
|
|
12
|
+
limit?: number;
|
|
13
|
+
timeout?: number | 'persistent';
|
|
14
|
+
};
|
|
15
|
+
export type ToasterContext = {
|
|
16
|
+
queueToast: (message: string, options?: ToastOptions) => string;
|
|
17
|
+
closeToast: (id?: string) => void;
|
|
18
|
+
};
|
|
19
|
+
export type ToastOptions = {
|
|
20
|
+
action?: ReactNode;
|
|
21
|
+
closeCallback?: () => void;
|
|
22
|
+
dark?: boolean;
|
|
23
|
+
dismissible?: boolean;
|
|
24
|
+
timeout?: number | 'persistent';
|
|
25
|
+
variant?: Status;
|
|
26
|
+
};
|
|
27
|
+
export type ToastProps = BaseProps & {
|
|
28
|
+
closeCallback: () => void;
|
|
29
|
+
id: string;
|
|
30
|
+
message: string;
|
|
31
|
+
timeout: number | 'persistent';
|
|
32
|
+
action?: ReactNode;
|
|
33
|
+
dismissible?: boolean;
|
|
34
|
+
variant?: Status | undefined;
|
|
35
|
+
};
|
|
36
|
+
export type InternalToast = ReactElement<ToastProps, typeof Toast>;
|
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--uil-black: #000000;--uil-black-alt: #222222;--uil-black-light: #2b2b2b;--uil-black-lighter: #333333;--uil-white: #ffffff;--uil-white-alt: #ffffff;--uil-grey: #f3f3f3;--uil-grey-alt: #cfcfcf;--uil-grey-dark: #878787;--uil-outline-focus: #2779ca;--uil-default-hover: 39, 121, 202;--uil-success-hover: 0, 156, 115;--uil-warning-hover: 255, 215, 0;--uil-error-hover: 207, 9, 52;--uil-custom-hover: 0, 0, 0;--uil-success: #009c73;--uil-error: #CF0934;--uil-warning: #FFD700;--uil-warning-alt: #d1b21a;--uil-xxxs: .125rem;--uil-xxs: .25rem;--uil-xs: .5rem;--uil-s: .75rem;--uil-m: 1rem;--uil-l: 1.25rem;--uil-xl: 1.5rem;--uil-xxl: 1.75rem;--uil-xxxl: 2rem}.K{min-height:fit-content;min-width:fit-content;height:fit-content;width:fit-content}.L{font-size:var(--uil-m);line-height:var(--uil-m)}.M{font-size:var(--uil-l);line-height:var(--uil-l)}.N{font-size:var(--uil-xxl);line-height:var(--uil-xxl)}.O{--uil-black: #ffffff;--uil-outline-focus: #7bb4ff;--uil-grey-dark: #a3a3a3;--uil-grey-alt: #5c5c5c;--uil-white-alt: #3a3a3a;--uil-default-hover: 50, 121, 202;--uil-black-alt: #c3c3c3;--uil-success: #00cc96;--uil-success-hover: 0, 163, 115;--uil-warning: #FFFF3E;--uil-warning-alt: #dcdc38;--uil-warning-hover: 255, 255, 30;--uil-error: #fb0b41;--uil-error-hover: 239, 34, 79;--uil-custom-hover: 255, 255, 255}.e{margin:auto;border-radius:5px;background-color:var(--uil-white-alt)}.e::backdrop{background-color:#00000080}.e.P{width:25%}.e.Q{width:50%}.e.R{width:75%}.e .f{font-weight:700;padding:.5rem}.e .f.S{background-color:var(--uil-outline-focus);color:var(--uil-white)}.e .f.A{background-color:var(--uil-success);color:var(--uil-white)}.e .f.B{background-color:var(--uil-warning);color:var(--uil-black-light)}.e .f.G{background-color:var(--uil-error);color:var(--uil-white)}.e .f.T,.e .f.A,.e .f.B,.e .f.G{border-top-left-radius:4px;border-top-right-radius:4px}.e .H{display:flex;flex-direction:column;padding:.5rem}.e .H.U{border-top:1px solid var(--uil-grey-alt);border-bottom:1px solid var(--uil-grey-alt)}.e .z{display:flex;gap:2rem;padding:.5rem}.e .z.V{justify-content:start}.e .z.W{justify-content:end}.e .z.X{justify-content:space-between}.n{display:flex;align-items:center;gap:var(--uil-s)}.n:has(input:disabled) .I{color:var(--uil-grey-dark)}.n .I{color:var(--uil-black)}.n .b{position:relative;display:block;min-height:var(--uil-l);min-width:var(--uil-l);border:2px solid var(--uil-grey-dark);box-sizing:border-box;cursor:pointer}.n .b:hover,.n .b:has(input:checked){border-color:var(--uil-black)}.n .b.Y{border-radius:2px}.n .b.J,.n .b.J .Z{border-radius:50%}.n .b:has(input:disabled){border-color:var(--uil-grey-alt);cursor:default}.n .b input{position:absolute;cursor:pointer;height:0;width:0;opacity:0}.n .b input:checked~.j{transform:scale(1)}.n .b input:disabled~.j{background-color:var(--uil-grey-dark)}.n .b .j{position:absolute;top:25%;left:25%;background-color:var(--uil-outline-focus);width:var(--uil-xs);height:var(--uil-xs);transform:scale(0);transition:.1s ease}.C{display:flex;gap:var(--uil-m)}.C._{flex-direction:row}.C.rr{flex-direction:column}.r{width:100%}.r .o{position:relative;display:flex;align-items:center}.r .o.d{border-bottom:1px solid var(--uil-grey-dark)}.r .o.d .i{padding-left:0}.r .o.d .u{left:0}.r .o.d .a{border-bottom:1px solid var(--uil-grey-dark)}.r .o.d .t.F{margin-right:.875rem}.r .o.s,.r .o.s .a{border:1px solid var(--uil-grey-dark);border-radius:5px}.r .o.s .t.F{margin-left:.875rem}.r .o.s .t.or{margin-right:.875rem}.r .o.d:not(:has(.i:disabled)):not(.c):not(:focus-within):has(.i:placeholder-shown):hover,.r .o.s:not(:has(.i:disabled)):not(.c):not(:focus-within):has(.i:placeholder-shown):hover{border-color:var(--uil-black)}.r .o.d:not(:has(.i:disabled)):not(.c):not(:focus-within):has(.i:placeholder-shown):hover .a,.r .o.s:not(:has(.i:disabled)):not(.c):not(:focus-within):has(.i:placeholder-shown):hover .a{border-color:var(--uil-black)}.r .o.d:not(:has(.i:disabled)):not(.c):not(:focus-within):has(:not(.i:placeholder-shown)):hover .a,.r .o.s:not(:has(.i:disabled)):not(.c):not(:focus-within):has(:not(.i:placeholder-shown)):hover .a{border-color:var(--uil-black)}.r .o.d:focus-within,.r .o.d:has(.i:not(:placeholder-shown)),.r .o.s:focus-within,.r .o.s:has(.i:not(:placeholder-shown)){border-color:transparent}.r .o.d:has(.t.F),.r .o.s:has(.t.F){flex-direction:row-reverse}.r .o.d:has(.t.w),.r .o.s:has(.t.w){border:transparent}.r .o.d:has(.i:disabled),.r .o.s:has(.i:disabled){border-color:var(--uil-grey-alt)}.r .o.d:has(.i:disabled:not(:placeholder-shown)),.r .o.s:has(.i:disabled:not(:placeholder-shown)){border-color:transparent}.r .o.c{border-color:var(--uil-error)}.r .o.c .a,.r .o.c .i:focus~.a,.r .o.c .i:not(:placeholder-shown)~.a{border-color:var(--uil-error)}.r .o.c .u{color:var(--uil-error);opacity:1}.r .o .a{border-radius:0;padding:var(--uil-s);margin:0;position:absolute;top:-.8125rem;left:0;right:0;bottom:0;pointer-events:none;visibility:hidden;border:none}.r .o .a .ir{visibility:hidden;padding:0 2px}.r .o .u{position:absolute;top:20%;left:var(--uil-m);cursor:text;color:var(--uil-black);opacity:.6;transition:top .25s ease-in-out}.r .o .h{font-size:var(--uil-l);line-height:var(--uil-l);transition:font-size .25s ease,line-height .25s ease}.r .o .h.lr{margin-left:var(--uil-xxxs)}.r .o .i{box-sizing:border-box;width:100%;color:var(--uil-black);background-color:transparent;border-radius:0;padding:var(--uil-xs);padding-left:.875rem;border:none;outline:none}.r .o .i:disabled{color:var(--uil-grey-dark)}.r .o .i:disabled~.a{border-color:var(--uil-grey-alt)}.r .o .i:disabled:not(:placeholder-shown)~.a{border-color:var(--uil-grey-alt)}.r .o .i:disabled~.u{color:var(--uil-grey-dark);opacity:1;cursor:default}.r .o .t{min-width:fit-content;opacity:.75}.r .o .t.x{visibility:hidden}.r .o .i:focus~.t.x,.r .o .i:not(:placeholder-shown)~.t.x{visibility:visible}.r .o .i:focus~.u,.r .o .i:not(:placeholder-shown)~.u,.r .o .i:focus~.t.x~.u,.r .o .t.w~.u{top:-35%}.r .o:not(.c) .i:not(:disabled):focus~.u{opacity:1;color:var(--uil-outline-focus)}.r .o .i:focus~.a,.r .o .i:not(:placeholder-shown)~.a,.r .o .i:focus~.t.x~.a,.r .o .t.w~.a{visibility:visible}.r .o .i:focus~.a{border-color:var(--uil-outline-focus);border-width:2px}.r .o .i:focus~.u .h,.r .o .i:not(:placeholder-shown)~.u .h,.r .o .i:focus~.t.x~.u .h,.r .o .t.w~.u .h,.r .o .i:focus~.a .h,.r .o .i:not(:placeholder-shown)~.a .h,.r .o .i:focus~.t.x~.a .h,.r .o .t.w~.a .h{font-size:var(--uil-s);line-height:var(--uil-s)}.r .D{color:var(--uil-grey-dark);font-size:var(--uil-m);line-height:var(--uil-m);margin-left:var(--uil-s);margin-top:var(--uil-xxs);min-height:var(--uil-m)}.r .D.c{color:var(--uil-error)}.r .o.d~.D{margin-left:0}.ar{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background-color:#00000080;z-index:auto}.l{display:block;border:1px solid transparent;border-radius:5px;box-sizing:border-box;background-color:transparent;cursor:pointer}.l:not(:disabled).v{color:var(--uil-white);background-color:var(--uil-outline-focus);box-shadow:0 0 2px 0 var(--uil-black-alt)}.l:not(:disabled).v:hover{background-color:rgba(var(--uil-default-hover),.9)}.l:not(:disabled).g{color:var(--uil-outline-focus);border-color:var(--uil-outline-focus)}.l:not(:disabled).g:not(:disabled):hover{background-color:rgba(var(--uil-default-hover),.12)}.l:not(:disabled).p{color:var(--uil-outline-focus)}.l:not(:disabled).p:not(:disabled):hover{background-color:rgba(var(--uil-default-hover),.08)}.l:not(:disabled).k.v{color:var(--uil-white);background-color:var(--uil-success)}.l:not(:disabled).k.v:hover{background-color:rgba(var(--uil-success-hover),.9)}.l:not(:disabled).k.g{color:var(--uil-success);border-color:var(--uil-success)}.l:not(:disabled).k.g:hover{background-color:rgba(var(--uil-success-hover),.15)}.l:not(:disabled).k.p{color:var(--uil-success)}.l:not(:disabled).k.p:hover{background-color:rgba(var(--uil-success-hover),.07)}.l:not(:disabled).m.v{color:var(--uil-black-light);background-color:var(--uil-warning)}.l:not(:disabled).m.v:hover{background-color:rgba(var(--uil-warning-hover),.7)}.l:not(:disabled).m.g{color:var(--uil-warning-alt);border-color:var(--uil-warning)}.l:not(:disabled).m.g:hover{background-color:rgba(var(--uil-warning-hover),.1)}.l:not(:disabled).m.p{color:var(--uil-warning-alt)}.l:not(:disabled).m.p:hover{background-color:rgba(var(--uil-warning-hover),.1)}.l:not(:disabled).y.v{color:var(--uil-white);background-color:var(--uil-error)}.l:not(:disabled).y.v:hover{background-color:rgba(var(--uil-error-hover),.9)}.l:not(:disabled).y.g{color:var(--uil-error);border-color:var(--uil-error)}.l:not(:disabled).y.g:hover{background-color:rgba(var(--uil-error-hover),.12)}.l:not(:disabled).y.p{color:var(--uil-error)}.l:not(:disabled).y.p:hover{background-color:rgba(var(--uil-error-hover),.08)}.l:not(:disabled).E.v:hover,.l:not(:disabled).E.g:hover,.l:not(:disabled).E.p:hover{opacity:.9;background-color:rgba(var(--uil-custom-hover),.05)}.l.q{cursor:default;color:var(--uil-grey-dark)}.l.q.v{background-color:var(--uil-grey)}.l.q.g{border-color:var(--uil-grey-dark)}.l.er{letter-spacing:1px;padding:var(--uil-xxs)}.l.tr{letter-spacing:2px;padding:var(--uil-xs)}.l.dr{letter-spacing:2px;padding:var(--uil-s)}
|
|
1
|
+
:root{--uil-black: #000000;--uil-black-w: #000000;--uil-black-alt: #222222;--uil-black-light: #2b2b2b;--uil-black-lighter: #333333;--uil-box-shadow-w: rgba(0, 0, 0, .3);--uil-switch-hover-w: rgba(0, 0, 0, .05);--uil-white: #ffffff;--uil-white-b: #ffffff;--uil-white-alt: #ffffff;--uil-grey-light: #f3f3f3;--uil-grey: #e9e9e9;--uil-grey-alt: #cfcfcf;--uil-grey-dark: #757575;--uil-info-hover: 39, 121, 202;--uil-success-hover: 0, 156, 115;--uil-warning-hover: 255, 215, 0;--uil-error-hover: 207, 9, 52;--uil-info: #2876CD;--uil-success: #00875A;--uil-warning: #FFD700;--uil-warning-alt: #84722A;--uil-error: #CF0934;--uil-info-o: rgba(39, 121, 202, .3);--uil-success-o: rgba(0, 156, 115, .3);--uil-warning-o: rgba(255, 215, 0, .3);--uil-error-o: rgba(207, 9, 52, .3);--uil-top: initial;--uil-bottom: initial;--uil-left: initial;--uil-right: initial;--uil-progress-delay: .25s;--uil-pulse-anim: 2.5s;--uil-xxxs: .125rem;--uil-xxs: .25rem;--uil-xs: .5rem;--uil-s: .75rem;--uil-m: 1rem;--uil-l: 1.25rem;--uil-xl: 1.5rem;--uil-xxl: 1.75rem;--uil-xxxl: 2rem}.qr{min-height:fit-content;min-width:fit-content;height:fit-content;width:fit-content}.Br{font-size:var(--uil-m);line-height:var(--uil-xl)}.Gr{font-size:var(--uil-l);line-height:var(--uil-xxl)}.Hr{font-size:var(--uil-xxl);line-height:2.25rem}.Ir{--uil-black-w: #ffffff;--uil-black-alt: #c3c3c3;--uil-black-lighter: #dddddd;--uil-grey: #616161;--uil-grey-dark: #a3a3a3;--uil-grey-alt: #5c5c5c;--uil-white-alt: #3a3a3a;--uil-white-b: #000000;--uil-info: #7bb4ff;--uil-info-hover: 123, 180, 255;--uil-success: #00cc96;--uil-success-hover: 0, 204, 150;--uil-warning: #FFFF3E;--uil-warning-alt: #dcdc38;--uil-warning-hover: 255, 255, 30;--uil-error: #fb0b41;--uil-error-hover: 239, 34, 79;--uil-info-o: rgba(123, 180, 255, .3);--uil-success-o: rgba(0, 204, 150, .3);--uil-warning-o: rgba(255, 255, 62, .3);--uil-error-o: rgba(251, 11, 65, .3);--uil-box-shadow-w: rgba(150, 150, 150, .3);--uil-switch-hover-w: rgba(255, 255, 255, .1)}.e{margin:auto;border-radius:5px;background-color:var(--uil-white-alt);padding:0;border:transparent}.e::backdrop{background-color:#00000080}.e.Jr{width:25%}.e.Kr{width:50%}.e.Lr{width:75%}.e .f{font-weight:700;padding:.5rem}.e .f.Mr{background-color:var(--uil-info);color:var(--uil-white)}.e .f.tr{background-color:var(--uil-success);color:var(--uil-white)}.e .f.ur{background-color:var(--uil-warning);color:var(--uil-black-light)}.e .f.nr{background-color:var(--uil-error);color:var(--uil-white)}.e .f.Nr,.e .f.tr,.e .f.ur,.e .f.nr{border-top-left-radius:4px;border-top-right-radius:4px}.e .sr{display:flex;flex-direction:column;padding:.5rem}.e .sr.Or{border-top:1px solid var(--uil-grey-alt);border-bottom:1px solid var(--uil-grey-alt)}.e .B{display:flex;gap:2rem;padding:.5rem}.e .B.Pr{justify-content:start}.e .B.Qr{justify-content:end}.e .B.Rr{justify-content:space-between}.u{display:flex;flex-direction:column;gap:var(--uil-m);background-color:transparent;border:none;padding:var(--uil-xs);height:60%;max-height:60%;overflow-y:scroll;scrollbar-width:none;-ms-overflow-style:none;z-index:2147483647;position:fixed;top:var(--uil-top);bottom:var(--uil-bottom);left:var(--uil-left);right:var(--uil-right)}.u.Sr{--uil-top: var(--uil-l)}.u.Tr{--uil-bottom: var(--uil-l);flex-direction:column-reverse}.u.Ur{left:50%;transform:translate(-50%)}.u.Vr{top:50%;transform:translateY(-50%)}.u.Wr{left:50%;top:50%;transform:translate(-50%)}.u.Zr{--uil-left: var(--uil-l)}.u._r{--uil-right: var(--uil-l);align-items:end}.u::-webkit-scrollbar{display:none}.u .w{display:flex;align-items:center;gap:var(--uil-s);opacity:0;color:var(--uil-white-alt);background-color:var(--uil-black-lighter);padding:var(--uil-xs);width:fit-content;border-radius:3px;transition:all .5s linear;transform:translateY(6px);box-shadow:1px 5px 6px -1px var(--uil-box-shadow-w);-webkit-box-shadow:1px 5px 6px -1px var(--uil-box-shadow-w);-moz-box-shadow:1px 5px 6px -1px var(--uil-box-shadow-w)}.u .w.ri{opacity:1;transform:translateY(0)}.u .w.ii{opacity:0;transform:translateY(-6px)}.u .w.oi{color:var(--uil-white);background-color:var(--uil-info)}.u .w.li{color:var(--uil-white);background-color:var(--uil-success)}.u .w.ai{color:var(--uil-black);background-color:var(--uil-warning)}.u .w.ei{color:var(--uil-white);background-color:var(--uil-error)}.u .w .dr{height:var(--uil-s);width:var(--uil-s);box-sizing:content-box;padding:var(--uil-xs);border-radius:50%;cursor:pointer;border:none;background-color:transparent;fill:var(--uil-white-b)}.u .w .dr:hover{background-color:#0000001a}.h{display:flex;align-items:center;gap:var(--uil-s)}.h:has(input:disabled) .cr{color:var(--uil-grey-dark)}.h .cr{color:var(--uil-black-w)}.h .p{position:relative;display:block;min-height:var(--uil-l);min-width:var(--uil-l);border:2px solid var(--uil-grey-dark);box-sizing:border-box;cursor:pointer}.h .p:hover,.h .p:has(input:checked){border-color:var(--uil-black-w)}.h .p.ti{border-radius:2px}.h .p.hr,.h .p.hr .ui{border-radius:50%}.h .p:has(input:disabled){border-color:var(--uil-grey-alt);cursor:default}.h .p input{position:absolute;cursor:pointer;height:0;width:0;opacity:0}.h .p input:checked~.P{transform:scale(1)}.h .p input:disabled~.P{background-color:var(--uil-grey-dark)}.h .p .P{position:absolute;top:25%;left:25%;background-color:var(--uil-info);width:var(--uil-xs);height:var(--uil-xs);transform:scale(0);transition:.1s ease}.Q{display:flex;gap:var(--uil-m)}.Q.ni{flex-direction:row}.Q.si{flex-direction:column}.y{--uil-pagination-size: var(--uil-xl);color:var(--uil-black-w);display:flex;align-items:center;margin:0;padding:0;min-height:var(--uil-pagination-size);font-size:calc(var(--uil-pagination-size) - var(--uil-xs))}@media (min-width: 760px){.y{--uil-pagination-size: var(--uil-xxl)}}.y .A{border:none;outline:none;background-color:transparent;padding:var(--uil-xxs);display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:6px;height:var(--uil-pagination-size);width:var(--uil-pagination-size);font-size:calc(var(--uil-pagination-size) - var(--uil-xs))}.y .A:disabled{cursor:default}.y .A:disabled .vr{fill:var(--uil-grey-alt)}.y .A.di,.y .A:not(:disabled):hover{background-color:var(--uil-grey)}.y .A .vr{fill:var(--uil-black-lighter);height:100%;width:100%}.G{list-style:none;gap:var(--uil-xs)}@media (min-width: 760px){.G{gap:var(--uil-s)}}.G .gr{height:var(--uil-pagination-size);width:var(--uil-pagination-size)}.G .gr .ci{fill:var(--uil-grey-dark)}.z{height:1.875rem;width:1.875rem;transform:rotate(-90deg)}.z.br{animation:1.5s ease-in-out 0s infinite pr}.z.br .C{animation:1.5s ease-in-out 0s infinite xr}.z .C{transition:stroke-dashoffset var(--uil-progress-delay) ease-in-out 0ms}.z .C.R{stroke:var(--uil-info)}.z .C.S{stroke:var(--uil-success)}.z .C.T{stroke:var(--uil-warning)}.z .C.U{stroke:var(--uil-error)}@keyframes xr{0%{stroke-dasharray:1px,120px;stroke-dashoffset:0}50%{stroke-dasharray:90px,120px;stroke-dashoffset:-10px}to{stroke-dasharray:1px,120px;stroke-dashoffset:-120px}}@keyframes pr{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.g{overflow:hidden;position:relative;min-width:5rem;width:100%;height:5px}.g.R{background-color:var(--uil-info-o)}.g.S{background-color:var(--uil-success-o)}.g.T{background-color:var(--uil-warning-o)}.g.U{background-color:var(--uil-error-o)}.g.hi{background-color:var(--uil-grey-alt)}.g .j{position:absolute;right:0;left:0;height:100%;width:auto;transition:right var(--uil-progress-delay) ease-in-out 0ms}.g .j.vi{animation:2.5s ease-in-out 0s infinite fr}.g .j.gi{animation:2.5s ease-in-out 0s infinite wr}.g .j.R{background-color:var(--uil-info)}.g .j.S{background-color:var(--uil-success)}.g .j.T{background-color:var(--uil-warning)}.g .j.U{background-color:var(--uil-error)}@keyframes fr{0%{left:-25%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@keyframes wr{0%{left:-25%;right:100%}55%{left:-35%;right:100%}to{left:100%;right:-150%}}.r{width:100%;--uil-input-focus-color: var(--uil-info)}.r .i{position:relative;display:flex;align-items:center;width:fit-content;max-width:100%}.r .i.v{border-bottom:1px solid var(--uil-grey-dark)}.r .i.v .o{padding-left:0}.r .i.v .m{left:0}.r .i.v .s{border-bottom:1px solid var(--uil-grey-dark)}.r .i.v .n.H{margin-right:.875rem}.r .i.v~.V{margin-left:0}.r .i.b,.r .i.b .s{border:1px solid var(--uil-grey-dark);border-radius:5px}.r .i.b .n.H{margin-left:.875rem}.r .i.b .n.bi{margin-right:.875rem}.r .i.v:not(:has(.o:disabled)):not(.x):not(:focus-within):not(:has(.n.Y)):has(.o:placeholder-shown):hover,.r .i.v:not(:has(.o:disabled)):not(.x):not(:focus-within):has(:not(.o:placeholder-shown)):hover .s,.r .i.b:not(:has(.o:disabled)):not(.x):not(:focus-within):not(:has(.n.Y)):has(.o:placeholder-shown):hover,.r .i.b:not(:has(.o:disabled)):not(.x):not(:focus-within):has(:not(.o:placeholder-shown)):hover .s{border-color:var(--uil-black-w)}.r .i.v:focus-within,.r .i.v:has(.o:not(:placeholder-shown)),.r .i.v:has(.o:disabled:not(:placeholder-shown)),.r .i.v:has(.n.Y),.r .i.b:focus-within,.r .i.b:has(.o:not(:placeholder-shown)),.r .i.b:has(.o:disabled:not(:placeholder-shown)),.r .i.b:has(.n.Y){border-color:transparent}.r .i.v:has(.n.H),.r .i.b:has(.n.H){flex-direction:row-reverse}.r .i.v:has(.o:disabled),.r .i.b:has(.o:disabled){border-color:var(--uil-grey-alt)}.r .i.x .m{color:var(--uil-error);opacity:1}.r .i.x,.r .i.x .s{border-color:var(--uil-error)}.r .i:not(.x) .o:not(:disabled):focus~.m{opacity:1;color:var(--uil-input-focus-color)}.r .i:not(.x) .o:focus~.s{border-color:var(--uil-input-focus-color)}.r .i .s{border-radius:0;padding:var(--uil-xs);margin:0;position:absolute;left:0;right:0;bottom:0;pointer-events:none;visibility:hidden;border:none;min-height:2.1875rem}.r .i .s .pi{visibility:hidden;padding:0 2px}.r .i .m{position:absolute;top:25%;left:.6rem;cursor:text;color:var(--uil-black-w);opacity:.6;transition:top .25s ease}.r .i .m.xi{top:var(--uil-m)}.r .i .D{font-size:var(--uil-l);line-height:var(--uil-l);transition:font-size .2s ease}.r .i .D.fi{margin-left:var(--uil-xxxs)}.r .i .o{box-sizing:border-box;width:100%;color:var(--uil-black-w);background-color:transparent;border-radius:0;padding:var(--uil-xs);padding-left:.65rem;border:none;outline:none}.r .i .o:disabled{color:var(--uil-grey-dark)}.r .i .o:disabled~.s,.r .i .o:disabled:not(:placeholder-shown)~.s{border-color:var(--uil-grey-alt)}.r .i .o:disabled~.m{color:var(--uil-grey-dark);opacity:1;cursor:default}.r .i .o:focus~.n.W,.r .i .o:not(:placeholder-shown)~.n.W{visibility:visible}.r .i .o:focus~.s{border-width:2px;padding:7px}.r .i .mr{min-width:fit-content;min-height:fit-content;margin:var(--uil-xxs);resize:var(--uil-textarea-resize)}.r .i .mr~.s{top:-.5rem}.r .i .n{min-width:fit-content;opacity:.75}.r .i .n.W{visibility:hidden}.r .i .o:focus~*.s,.r .i .o:not(:placeholder-shown)~*.s,.r .i .n.Y~*.s{visibility:visible}.r .i .o:focus~*.m,.r .i .o:not(:placeholder-shown)~*.m,.r .i .n.Y~*.m{top:-.65rem}.r .i .o:focus~* .D,.r .i .o:not(:placeholder-shown)~* .D,.r .i .n.Y~* .D{font-size:var(--uil-m);line-height:var(--uil-m)}.r .V{color:var(--uil-grey-dark);font-size:var(--uil-m);line-height:var(--uil-m);margin-left:var(--uil-s);margin-top:var(--uil-xxs);min-height:var(--uil-m)}.r .V.x{color:var(--uil-error)}.E{gap:var(--uil-xs)}@media (min-width: 760px){.E{gap:var(--uil-m)}}.E .wi{color:var(--uil-black-alt);background-color:var(--uil-white-alt);border:1px solid var(--uil-black-alt);border-radius:3px;outline:none;padding:var(--uil-xxs) var(--uil-xxs) var(--uil-xxs) 0;height:100%}.E p{margin:0}.E .mi{display:flex;gap:var(--uil-xxs);height:100%}.d{width:100%;color:var(--uil-black-w);background-color:var(--uil-white-alt);box-shadow:0 1px 3px -1px var(--uil-grey-alt);border:1px solid var(--uil-grey-alt);border-radius:5px}.d[open]{overflow-x:auto}.d[open] .k.ki{border-bottom:1px solid var(--uil-grey-alt);box-shadow:0 0 1px 0 var(--uil-grey-alt)}.d[open] .k .I{rotate:90deg}.d .k{width:100%;cursor:pointer;display:flex;align-items:center;padding:var(--uil-xs);box-sizing:border-box}.d .k::marker{content:none}.d .k::-webkit-details-marker{display:none}.d .k.yi .I{margin-right:var(--uil-s)}.d .k.kr{flex-direction:row-reverse;justify-content:space-between}.d .k.kr .I{margin-left:var(--uil-s)}.d .k .I{height:var(--uil-s);width:var(--uil-s);fill:var(--uil-black-lighter);transition:rotate .2s ease-in-out}.d .zi{padding:var(--uil-xs)}.J{display:flex;flex-direction:column}.J .d{border-radius:unset;border-bottom:none}.J .d:first-of-type{border-top-left-radius:5px;border-top-right-radius:5px}.J .d:last-of-type{border-bottom-left-radius:5px;border-bottom-right-radius:5px;border-bottom:1px solid var(--uil-grey-alt)}.F{list-style:none;display:flex;align-items:center;flex-wrap:wrap;gap:.5rem}.F.Fi li:last-child{font-weight:700}.F li{cursor:default;color:var(--uil-grey-dark);display:flex;align-items:center}.F .yr:last-child,.F .yr:hover{color:var(--uil-black-w)}.F .Z{background-color:transparent;border:none;padding:0;margin:0}.F .Z svg{cursor:pointer;fill:var(--uil-grey-dark);height:var(--uil-xl);width:var(--uil-xl)}.F .Z svg:hover{fill:var(--uil-black-w)}.zr{background-color:var(--uil-grey-alt);height:var(--uil-m);width:100%}.zr.ji{animation:ease-in-out var(--uil-pulse-anim) infinite Fr}@keyframes Fr{0%{opacity:1}50%{opacity:.45}to{opacity:1}}.a{display:block;border:1px solid transparent;border-radius:5px;box-sizing:border-box;background-color:transparent;cursor:pointer;text-decoration:none}.a.K{box-shadow:0 0 2px 0 var(--uil-black-alt)}.a.Yi{--uil-button-font-color: var(--uil-white-b);--uil-button-color: var(--uil-info);--uil-button-hover-color: var(--uil-info-hover)}.a.Ai{--uil-button-font-color: var(--uil-white-b);--uil-button-color: var(--uil-success);--uil-button-hover-color: var(--uil-success-hover)}.a._{--uil-button-font-color: var(--uil-black-light);--uil-button-color: var(--uil-warning);--uil-button-hover-color: var(--uil-warning-hover)}.a._.L,.a._.rr{--uil-button-color: var(--uil-warning-alt)}.a.Ci{--uil-button-font-color: var(--uil-white-b);--uil-button-color: var(--uil-error);--uil-button-hover-color: var(--uil-error-hover)}.a:not(:disabled).K{color:var(--uil-button-font-color);background-color:var(--uil-button-color)}.a:not(:disabled).K:hover{background-color:rgba(var(--uil-button-hover-color),.8)}.a:not(:disabled).L{color:var(--uil-button-color);border-color:var(--uil-button-color)}.a:not(:disabled).L:hover{background-color:rgba(var(--uil-button-hover-color),.08)}.a:not(:disabled).rr{color:var(--uil-button-color)}.a:not(:disabled).rr:hover{background-color:rgba(var(--uil-button-hover-color),.08)}.a.ir{cursor:default;color:var(--uil-grey-dark)}.a.ir.K{background-color:var(--uil-grey-light)}.a.ir.L{border-color:var(--uil-grey-dark)}.a.jr{letter-spacing:1px;padding:var(--uil-xxs) var(--uil-xs)}.a.jr.or{border-radius:var(--uil-m)}.a.Yr{letter-spacing:2px;padding:var(--uil-xs) var(--uil-s)}.a.Yr.or{border-radius:var(--uil-xl)}.a.Ar{letter-spacing:2px;padding:var(--uil-xs) var(--uil-s)}.a.Ar.or{border-radius:var(--uil-xxl)}.l{height:var(--uil-xxxl);position:relative;display:inline-flex;box-sizing:border-box}.l.M{padding:.7rem 0;width:var(--uil-xxxl)}.l.M .c{width:var(--uil-m);height:var(--uil-m);top:var(--uil-xs)}.l.M .c:has(input:checked){left:calc(100% - var(--uil-m))}.l.M .X{border-radius:6px}.l.N{padding:var(--uil-xs) 0;width:2.75rem}.l.N .c{width:var(--uil-l);height:var(--uil-l);top:.375rem}.l.N .c:has(input:checked){left:calc(100% - var(--uil-l))}.l.N .X{border-radius:9px}.l.O{padding:var(--uil-xxs) 0;width:4.25rem}.l.O .c{width:var(--uil-xxxl);height:var(--uil-xxxl);top:.0125rem}.l.O .c:has(input:checked){left:calc(100% - var(--uil-xxxl))}.l.O .X{border-radius:var(--uil-s)}.l.Di{--uil-switch-color: var(--uil-info)}.l.Ei{--uil-switch-color: var(--uil-success)}.l.Xi{--uil-switch-color: var(--uil-warning)}.l.qi{--uil-switch-color: var(--uil-error)}.l .X{height:100%;width:100%;opacity:.25;z-index:-1;background-color:var(--uil-black-lighter);transition:background-color .1s ease-in-out}.l .c{position:absolute;left:0;cursor:pointer;transition:left .15s ease-in-out;border-radius:50%}.l .c:not(:has(input:disabled)):hover,.l .c:not(:has(input:disabled)):has(input:focus){outline:6px solid var(--uil-switch-hover-w)}.l .c:not(:has(input:disabled)):has(input:checked)~.X{background-color:var(--uil-switch-color)}.l .c:not(:has(input:disabled)):has(input:checked) .lr{background-color:var(--uil-switch-color)}.l .c:has(input:disabled){cursor:default}.l .c:has(input:disabled) .lr{background-color:var(--uil-grey-dark)}.l .c .lr{width:100%;height:100%;border-radius:50%;background-color:var(--uil-white);box-shadow:1px 1px 3px -1px var(--uil-black-alt)}.l .c input{clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;padding:0;position:absolute}.t{display:flex;align-items:center;gap:var(--uil-s);cursor:default;outline:none;border-width:2px;border-style:solid}.t.ar{cursor:pointer}.t.ar:focus,.t.ar:hover{opacity:.85}.t.Cr{padding:var(--uil-xxs) var(--uil-xs);border-radius:var(--uil-m)}.t.Dr{padding:var(--uil-xs) var(--uil-s);border-radius:var(--uil-xl)}.t.Er{padding:var(--uil-xs) var(--uil-s);border-radius:var(--uil-xxl)}.t.Bi{border:transparent;color:var(--uil-tag-font-color);background-color:var(--uil-tag-color)}.t.er{background-color:transparent;color:var(--uil-tag-color);border-color:var(--uil-tag-color)}.t.er .q{fill:var(--uil-tag-color)}.t.Gi{box-shadow:0 0 2px 0 var(--uil-black-alt)}.t.Hi{--uil-tag-font-color: var(--uil-white-b);--uil-tag-color: var(--uil-info)}.t.Ii{--uil-tag-font-color: var(--uil-white-b);--uil-tag-color: var(--uil-success)}.t.Xr{--uil-tag-font-color: var(--uil-black-light);--uil-tag-color: var(--uil-warning)}.t.Xr.er{--uil-tag-color: var(--uil-warning-alt)}.t.Ji{--uil-tag-font-color: var(--uil-white-b);--uil-tag-color: var(--uil-error)}.t .q{cursor:pointer}.t .q.Cr{width:var(--uil-m);height:var(--uil-m)}.t .q.Dr{width:var(--uil-xl);height:var(--uil-xl)}.t .q.Er{width:var(--uil-xxl);height:var(--uil-xxl)}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
export { Dialog, DialogTitle, DialogContent, DialogControls } from './components/dialog';
|
|
2
|
+
export { ToastProvider, useToastContext, type ToastOptions } from './components/toast';
|
|
2
3
|
export { RadioGroup, type RadioOption } from './components/check/radioGroup';
|
|
3
|
-
export {
|
|
4
|
+
export { Pagination, type AriaLabels } from './components/pagination/page';
|
|
5
|
+
export { CircularProgress, LinearProgress } from './components/progress';
|
|
6
|
+
export { Input, InputDecorator, Textarea } from './components/input';
|
|
7
|
+
export { TablePagination } from './components/pagination/table';
|
|
8
|
+
export { Accordion } from './components/collapsible/accordion';
|
|
9
|
+
export { Details } from './components/collapsible/details';
|
|
4
10
|
export { Checkbox } from './components/check/checkbox';
|
|
5
|
-
export {
|
|
11
|
+
export { Breadcrumbs } from './components/breadcrumbs';
|
|
6
12
|
export { Radio } from './components/check/radio';
|
|
13
|
+
export { Skeleton } from './components/skeleton';
|
|
7
14
|
export { Button } from './components/button';
|
|
8
|
-
export {
|
|
15
|
+
export { Switch } from './components/switch';
|
|
16
|
+
export { Tag } from './components/tag';
|
|
17
|
+
export { useContrastColor } from './hooks/index';
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var d={fit:"K",fontSmall:"L",fontMedium:"M",fontLarge:"N",dark:"O"};import L,{useEffect as M,useRef as B}from"react";function i(r){let e="";return r.forEach(o=>{o==null||o===!1||(e!==""&&(e+=" "),e+=o)}),e}var g={dialog:"e",small:"P",medium:"Q",large:"R",title:"f",info:"S",success:"A",warning:"B",error:"G",default:"T",content:"H",divider:"U",controls:"z",start:"V",end:"W","space-between":"X"};function H(r){let{ariaModal:e,children:o,dark:l=!1,describedby:n,disableEscapeKey:p,labelledby:u,onCancel:m,onClickBackdrop:s,open:c,scrollable:a=!1,size:b}=r,h=B(null);M(()=>(h.current?.addEventListener("keydown",k),h.current?.addEventListener("mousedown",y),c?(a||(document.body.style.paddingRight="15px",document.body.style.overflow="hidden"),h.current?.showModal()):(a||(document.body.style.paddingRight="",document.body.style.overflow=""),h.current?.close()),()=>{h.current?.removeEventListener("keydown",k),h.current?.removeEventListener("mousedown",y)}),[c]);function k(W){p&&W.key==="Escape"&&W.preventDefault()}function y(W){s&&W.target===W.currentTarget&&s()}return L.createElement("dialog",{ref:h,"aria-describedby":n,"aria-labelledby":u,"aria-modal":e,className:i([g.dialog,l&&d.dark,b&&g[b]]),onCancel:m,role:e?"alertdialog":"dialog"},o)}import K from"react";function G(r){let{children:e,color:o,id:l}=r;return K.createElement("div",{className:i([g.title,o&&g[o],d.fontLarge]),id:l},e)}import O from"react";function j(r){let{children:e,divider:o=!1,id:l}=r;return O.createElement("div",{className:i([g.content,o&&g.divider]),id:l},e)}import q from"react";function A(r){let{children:e,position:o="end"}=r;return q.createElement("div",{className:i([g.controls,g[o]])},e)}import P from"react";var f={checkWrapper:"n",label:"I",check:"b",box:"Y",radio:"J",radioCheck:"Z",checkmark:"j",radioWrapper:"C",row:"_",column:"rr"};import F from"react";function x(){let r=new Uint32Array(2);return crypto.getRandomValues(r),`uil${r[0].toString(32)}${r[1].toString(16)}`}function E(r){let{checked:e,children:o,color:l,dark:n,disabled:p,id:u,name:m,onChange:s,value:c,...a}=r,b=u??x();function h(y){!p&&s&&s(y)}function k(){document.querySelector(`#${b}`).click()}return F.createElement("div",{className:i([f.checkWrapper,n&&d.dark])},F.createElement("div",{className:`${f.check} ${f.radio}`,onClick:()=>{k()}},F.createElement("input",{id:b,name:m,type:"radio",value:c,checked:e,onChange:y=>{h(y)},disabled:p,tabIndex:p?-1:a.tabIndex??void 0,...a}),F.createElement("div",{className:`${f.checkmark} ${f.radioCheck}`,style:p?void 0:{backgroundColor:l}})),o&&F.createElement("label",{htmlFor:b,className:`${d.fontMedium} ${f.label}`},o))}function U(r){let{color:e,dark:o=!1,direction:l="column",disabled:n,name:p,onChange:u,options:m,selected:s}=r;function c(a){!n&&u&&u(a)}return P.createElement("div",{className:i([f.radioWrapper,f[l]])},m.map((a,b)=>P.createElement(E,{key:b,dark:o,color:e,onChange:c,checked:s===a.value,disabled:n??a.disabled,name:p,...a},a.label)))}var t={inputField:"r",inputWrapper:"o",basic:"d",input:"i",label:"u",fieldset:"a",decorator:"t",start:"F",outlined:"s",end:"or",error:"c",visible:"w",legend:"ir",labelText:"h",asterisk:"lr",focus:"x",helpText:"D"};import _ from"react";function I(r){let{children:e,onFocus:o,position:l}=r;return _.createElement("div",{className:i([t.decorator,d.fontSmall,l==="start"?t.start:t.end,o?t.focus:t.visible])},e)}import v,{isValidElement as D}from"react";function J(r){let{children:e,dark:o,error:l,helpText:n,id:p,label:u,required:m,variant:s,...c}=r;if(e&&(!D(e)||e.type!==I))throw new Error(`<Input> received an invalid child. Expected <InputDecorator />, but got: ${D(e)?String(e.type):typeof e}.`);let a=p??x(),b=n?x():void 0;return v.createElement("div",{className:i([t.inputField,o&&d.dark])},v.createElement("div",{className:i([t.inputWrapper,s==="basic"?t.basic:t.outlined,l&&t.error])},v.createElement("input",{id:a,className:`${t.input} ${d.fontMedium}`,placeholder:"",required:m,...c,"aria-describedby":b}),e&&e,v.createElement("fieldset",{className:t.fieldset,"aria-hidden":!0},v.createElement("legend",{className:t.legend},v.createElement("span",{className:t.labelText},u),m&&v.createElement("span",{className:`${t.labelText} ${t.asterisk}`,"aria-hidden":!0},"*"))),v.createElement("label",{htmlFor:a,className:t.label},v.createElement("span",{className:t.labelText},u),m&&v.createElement("span",{className:`${t.labelText} ${t.asterisk}`,"aria-hidden":!0},"*"))),n&&v.createElement("div",{className:i([t.helpText,l&&t.error]),id:b},n))}import C from"react";function Q(r){let{checked:e,children:o,color:l,dark:n,disabled:p,onChange:u,...m}=r,s=m.id??x();function c(b){!p&&u&&u(b)}function a(){document.querySelector(`#${s}`).click()}return C.createElement("div",{className:i([f.checkWrapper,n&&d.dark])},C.createElement("div",{className:i([f.check,f.box]),onClick:a},C.createElement("input",{type:"checkbox",checked:e,onChange:c,id:s,disabled:p,...m}),C.createElement("div",{className:i([f.checkmark]),style:p?void 0:{backgroundColor:l}})),o&&C.createElement("label",{htmlFor:s,className:`${d.fontMedium} ${f.label}`},o))}var N={backdrop:"ar"};import{createPortal as Z}from"react-dom";import R from"react";function rr(r){let{children:e,onClick:o,open:l,zIndex:n}=r;return l?Z(R.createElement("div",{className:N.backdrop,style:{zIndex:n},onClick:o},e),document.body):null}var er=new RegExp(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/);function T(r){if(!er.test(r))throw new Error(`useContrastColor received an invalid hex color format. Expected '#000' or '#000000', but got: ${r}`);r=r.replace("#","");let e;r.length===3?e=[parseInt(r.substring(0),16)/255,parseInt(r.substring(1),16)/255,parseInt(r.substring(2),16)/255]:e=[parseInt(r.substring(0,2),16)/255,parseInt(r.substring(2,4),16)/255,parseInt(r.substring(4,6),16)/255];let[o,l,n]=e.map(u=>u<=.04045?u/12.92:((u+.055)/1.055)**2.4);return .2126*o+.7152*l+.0722*n>.179?"#000000":"#ffffff"}import $ from"react";var w={button:"l",filled:"v",outlined:"g",text:"p",success:"k",warning:"m",error:"y",custom:"E",disabled:"q",small:"er",medium:"tr",large:"dr"};function ir(r){let{children:e,color:o,dark:l,disabled:n,href:p,size:u="medium",target:m,variant:s,...c}=r,a=b();function b(){if(!(n||!o?.includes("#")))switch(s){case"filled":return{color:T(o),backgroundColor:o};case"outlined":return{color:o,borderColor:o};case"text":return{color:o};default:throw new Error(`<Button> received an unexpected variant. Expected 'filled', 'outline' or 'text', but got: ${String(s)}'`)}}function h(){let k;switch(u){case"small":k=d.fontSmall;break;case"medium":k=d.fontMedium;break;case"large":k=d.fontLarge;break;default:throw new Error(`<Button> received an unsupported size. Expected 'small', 'medium' or 'large', but got: ${String(u)}`)}return i([w.button,d.fit,k,w[u],w[s],l&&d.dark,o&&!o.includes("#")&&w[o],a&&w.custom,n&&w.disabled])}return p||p===""?$.createElement("a",{href:p,target:m,id:c.id,title:c.title,style:a,className:h()},e):$.createElement("button",{style:a,className:h(),type:c.type??"button",disabled:n,"aria-disabled":n,tabIndex:n?-1:c.tabIndex,...c},e)}export{rr as Backdrop,ir as Button,Q as Checkbox,H as Dialog,j as DialogContent,A as DialogControls,G as DialogTitle,J as Input,I as InputDecorator,E as Radio,U as RadioGroup,T as useContrastColor};
|
|
1
|
+
var p={fit:"qr",fontSmall:"Br",fontMedium:"Gr",fontLarge:"Hr",dark:"Ir"};import Fr,{useEffect as Sr,useRef as Lr}from"react";function l(e){let r=[];return e.forEach(t=>{!t||typeof t=="boolean"||r.push(...Array.isArray(t)?t:[t])}),r.join(" ")}var z={dialog:"e",small:"Jr",medium:"Kr",large:"Lr",title:"f",info:"Mr",success:"tr",warning:"ur",error:"nr",default:"Nr",content:"sr",divider:"Or",controls:"B",start:"Pr",end:"Qr","space-between":"Rr"};function zr(e){let{ariaModal:r,children:t,dark:o=!1,describedby:i,disableEscapeKey:n,labelledby:c,onCancel:a,onClickBackdrop:d,open:s,scrollable:u=!1,size:m}=e,b=Lr(null);Sr(()=>(b.current?.addEventListener("keydown",f),b.current?.addEventListener("mousedown",y),s?(u||(document.body.style.paddingRight="15px",document.body.style.overflow="hidden"),b.current?.showModal()):(u||(document.body.style.paddingRight="",document.body.style.overflow=""),b.current?.close()),()=>{b.current?.removeEventListener("keydown",f),b.current?.removeEventListener("mousedown",y)}),[s]);function f(g){n&&g.key==="Escape"&&g.preventDefault()}function y(g){d&&g.target===g.currentTarget&&d()}return Fr.createElement("dialog",{ref:b,"aria-describedby":i,"aria-labelledby":c,"aria-modal":r,className:l([z.dialog,o&&p.dark,m&&z[m]]),onCancel:a,role:r?"alertdialog":"dialog"},t)}import Ir from"react";function Br(e){let{children:r,color:t,id:o}=e;return Ir.createElement("div",{className:l([z.title,t&&z[t],p.fontLarge]),id:o},r)}import Dr from"react";function Mr(e){let{children:r,divider:t=!1,id:o}=e;return Dr.createElement("div",{className:l([z.content,t&&z.divider]),id:o},r)}import $r from"react";function Gr(e){let{children:r,position:t="end"}=e;return $r.createElement("div",{className:l([z.controls,z[t]])},r)}import{useLayoutEffect as Ar}from"react";function I(e){Ar(()=>{let r=document.createComment("Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.");e.current&&!e.current.innerHTML.includes("https://fontawesome.com License")&&e.current?.appendChild(r)},[])}import _,{useEffect as Or,useRef as mr}from"react";var E={toaster:"u",top:"Sr",bottom:"Tr",centerX:"Ur",centerY:"Vr",centerXY:"Wr",left:"Zr",right:"_r",toast:"w",fadeIn:"ri",fadeOut:"ii",info:"oi",success:"li",warning:"ai",error:"ei",closeButton:"dr"};function nr(e){let{action:r,closeCallback:t,dark:o=!1,dismissible:i,id:n,message:c,timeout:a,variant:d}=e,s=mr(null),u=mr(null);I(u),Or(()=>{if(setTimeout(()=>{s.current&&s.current.classList.add(E.fadeIn)}),a==="persistent")return;let b,f=setTimeout(()=>{s.current&&s.current.classList.replace(E.fadeIn,E.fadeOut),b=setTimeout(()=>{t()},500)},a);return()=>{clearTimeout(f),clearTimeout(b)}},[a,t]);function m(){s.current&&s.current.classList.replace(E.fadeIn,E.fadeOut),setTimeout(()=>{t()},500)}return _.createElement("div",{className:l([E.toast,d&&E[d],p.fontMedium,o&&p.dark]),id:n,ref:s,role:"status"},c,r&&_.createElement("div",null,r),i&&_.createElement("button",{className:E.closeButton,onClick:m},_.createElement("svg",{ref:u,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512"},_.createElement("path",{d:"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"}))))}import er,{createContext as Hr,useContext as qr,useRef as fr,useState as Kr}from"react";function F(){let e=new Uint32Array(2);return crypto.getRandomValues(e),`uil${e[0].toString(32)}${e[1].toString(16)}`}var Yr={queueToast:()=>{throw new Error("You must wrap your component tree with <ToastProvider> in order to use the queueToast function.")},closeToast:()=>{throw new Error("You must wrap your component tree with <ToastProvider> in order to use the closeToast function.")}},gr=Hr(Yr);function jr(e){let{alignment:r={horizontal:"left",vertical:"bottom"},children:t,dark:o=!1,dismissible:i=!1,limit:n=4,timeout:c=5e3}=e,[a,d]=Kr([]),s=fr(null),u=fr([]);function m(h,v){let{id:W,toast:D}=f(h,v),k=a.length+u.current.length;if(u.current.push(D),k>=n){for(let M=0;M<k-n+1;M++)y(a[M].props.id);s.current=new Promise(M=>{setTimeout(()=>{b(D),M(),s.current=null},500)})}else b(D);return W}function b(h){d(v=>(u.current=u.current.filter(W=>W!==h),[...v,h]))}function f(h,v){let W=F(),D={action:v?.action,closeCallback:()=>{g(W,v?.closeCallback)},dark:v?.dark??o,dismissible:v?.dismissible??i,id:W,message:h,timeout:v?.timeout??c,variant:v?.variant};return{id:W,toast:er.createElement(nr,{...D})}}function y(h){if(!h)return d([]);d(v=>v.filter(W=>W.props.id!==h))}function g(h,v){y(h),v?.()}function P(){let h=r.horizontal,v=r.vertical;return h==="center"&&v==="center"?[E.centerXY]:[h==="center"?E.centerX:E[h],v==="center"?E.centerY:E[v]]}return er.createElement(gr.Provider,{value:{queueToast:m,closeToast:y}},t,er.createElement("div",{className:l([E.toaster,P()])},a.map(h=>er.createElement(nr,{...h.props,key:h.props.id}))))}function Xr(){return qr(gr)}import br from"react";var N={checkWrapper:"h",label:"cr",check:"p",box:"ti",radio:"hr",radioCheck:"ui",checkmark:"P",radioWrapper:"Q",row:"ni",column:"si"};import J from"react";function sr(e){let{checked:r,children:t,color:o,dark:i,disabled:n,id:c,name:a,onChange:d,value:s,...u}=e,m=c??F();function b(y){!n&&d&&d(y)}function f(){document.querySelector(`#${m}`).click()}return J.createElement("div",{className:l([N.checkWrapper,i&&p.dark])},J.createElement("div",{className:`${N.check} ${N.radio}`,onClick:()=>{f()}},J.createElement("input",{id:m,name:a,type:"radio",value:s,checked:r,onChange:y=>{b(y)},disabled:n,tabIndex:n?-1:u.tabIndex??void 0,...u}),J.createElement("div",{className:`${N.checkmark} ${N.radioCheck}`,style:n?void 0:{backgroundColor:o}})),t&&J.createElement("label",{htmlFor:m,className:`${p.fontMedium} ${N.label}`},t))}function Jr(e){let{color:r,dark:t=!1,direction:o="column",disabled:i,name:n,onChange:c,options:a,selected:d}=e;function s(u){!i&&c&&c(u)}return br.createElement("div",{className:l([N.radioWrapper,N[o]]),role:"radiogroup"},a.map((u,m)=>br.createElement(sr,{key:m,dark:t,color:r,onChange:s,checked:d===u.value,disabled:i??u.disabled,name:n,...u},u.label)))}var T={pagination:"y",button:"A",svg:"vr",active:"di"};var q={pagination:"G",item:"gr",dots:"ci"};import w,{useRef as tr,useState as Zr}from"react";function Rr(e){let{activePage:r=1,ariaLabels:t,boundary:o=1,dark:i=!1,disablePrevButton:n=!1,disableNextButton:c=!1,disableFirstButton:a=!1,disableLastButton:d=!1,firstButton:s,lastButton:u,nextButton:m,onChange:b,pages:f,prevButton:y,siblings:g=1}=e;if(o<=0||o>f)throw new Error(`<Pagination/> received an invalid boundary. Expected boundary to be greater than 0 and smaller or equal to pages (${f}), but got: ${o}`);if(r<1||r>f)throw new Error(`<Pagination/> activePage out of bounds. Expected activePage to be greater than 0 and smaller or equal to pages (${f}), but got: ${r}`);let[P,h]=Zr(r),v=Math.max(Math.min(P-g,f-o-g*2-1),o+2),W=Math.min(Math.max(P+g,o+g*2+2),f-o-1),D=[...new Set([...M(1,o),...v>o+2?["ellipsis-a"]:o<f-o?[o+1]:[],...M(v,W),...W<f-o-1?["ellipsis-b"]:f-o>o?[f-o]:[],...M(f-o+1,f)])],k=[tr(null),tr(null),tr(null),tr(null)];k.forEach(I);function M(C,$){let Tr=$-C+1;return Array.from({length:Tr},(Le,Wr)=>C+Wr)}function V(C){h(C),b?.(C)}return w.createElement("nav",{className:l([i&&p.dark])},w.createElement("ul",{className:l([T.pagination,q.pagination])},!a&&w.createElement("li",{className:q.item},w.createElement("button",{className:T.button,onClick:()=>{V(1)},disabled:P<=1,"aria-label":t?.first??"Go to first page"},s??w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",ref:k[0],className:T.svg},w.createElement("path",{d:"M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160zm352-160l-160 160c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L301.3 256 438.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0z"})))),!n&&w.createElement("li",{className:q.item},w.createElement("button",{className:T.button,onClick:()=>{V(P-1)},disabled:P<=1,"aria-label":t?.prev??"Go to previous page"},y??w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",ref:k[1],className:T.svg},w.createElement("path",{d:"M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"})))),D.map((C,$)=>w.createElement("li",{key:$,className:q.item},typeof C=="number"?w.createElement("button",{className:l([P===C&&T.active,T.button]),onClick:()=>{V(C)},"aria-label":t?.page?`${t.page} ${C}`:`Go to page ${C}`},C):w.createElement("svg",{className:q.dots,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},w.createElement("circle",{cx:4,cy:14,r:1}),w.createElement("circle",{cx:12,cy:14,r:1}),w.createElement("circle",{cx:20,cy:14,r:1})))),!c&&w.createElement("li",{className:q.item},w.createElement("button",{className:T.button,onClick:()=>{V(P+1)},disabled:P>=f,"aria-label":t?.next??"Go to next page"},m??w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",ref:k[2],className:T.svg},w.createElement("path",{d:"M278.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-160 160c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L210.7 256 73.4 118.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l160 160z"})))),!d&&w.createElement("li",{className:q.item},w.createElement("button",{className:T.button,onClick:()=>{V(f)},disabled:P>=f,"aria-label":t?.last??"Go to last page"},u??w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",ref:k[3],className:T.svg},w.createElement("path",{d:"M470.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 256 265.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160zm-352 160l160-160c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L210.7 256 73.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0z"}))))))}var S={circularProgress:"z",indeterminate:"br",rotate:"pr",spinner:"C",spinning:"xr",info:"R",success:"S",warning:"T",error:"U",linearProgress:"g",custom:"hi",progressBar:"j",first:"vi",moving:"fr",second:"gi","moving-alt":"wr"};function L(e){return typeof e=="string"&&["info","success","warning","error"].includes(e)}import ur from"react";function ee(e){let{color:r="info",dark:t,size:o,value:i}=e;if(typeof i=="number"&&(i>100||i<0))throw new Error(`invalid value. Expected 100 >= value >= 0, but got ${i}`);let n=L(r);return ur.createElement("div",{"aria-valuenow":i,className:l([S.circularProgress,typeof i!="number"&&S.indeterminate,t&&p.dark]),role:"progressbar",style:{width:o,height:o},"aria-label":e["aria-label"]??"Circular progressbar"},ur.createElement("svg",{viewBox:"0 0 40 40"},ur.createElement("circle",{className:l([S.spinner,n&&S[r]]),cx:20,cy:20,fill:"none",r:19,stroke:n?void 0:r,strokeDasharray:typeof i=="number"?"120":void 0,strokeDashoffset:typeof i=="number"?`${1.2*(100-i)}px`:void 0,strokeWidth:2})))}import pr from"react";function te(e){let{color:r="info",dark:t,size:o,value:i}=e;if(typeof i=="number"&&(i>100||i<0))throw new Error(`invalid value. Expected 100 >= value >= 0, but got ${i}`);let n=L(r);return pr.createElement("div",{"aria-valuenow":i,className:l([S.linearProgress,n?S[r]:S.custom,t&&p.dark]),role:"progressbar",style:{height:o},"aria-label":e["aria-label"]??"Linear progressbar"},pr.createElement("div",{className:l([S.progressBar,typeof i!="number"&&S.first,n&&S[r]]),style:{backgroundColor:n?void 0:r,right:typeof i=="number"?`${100-i}%`:void 0}}),typeof i!="number"&&pr.createElement("div",{className:l([S.progressBar,S.second,n&&S[r]]),style:{backgroundColor:n?void 0:r}}))}var x={inputField:"r",inputWrapper:"i",basic:"v",input:"o",label:"m",fieldset:"s",decorator:"n",start:"H",helpText:"V",outlined:"b",end:"bi",error:"x",visible:"Y",legend:"pi",textareaLabel:"xi",labelText:"D",asterisk:"fi",onFocus:"W",textarea:"mr"};import ie from"react";function dr(e){let{children:r,onFocus:t,position:o}=e;return ie.createElement("div",{className:l([x.decorator,p.fontSmall,o==="start"?x.start:x.end,t?x.onFocus:x.visible])},r)}import hr,{isValidElement as vr}from"react";import G from"react";function U(e){let{children:r,dark:t,error:o,helpId:i,helpText:n,id:c,isTextarea:a=!1,label:d,required:s,variant:u="outlined"}=e;return G.createElement("div",{className:l([x.inputField,t&&p.dark])},G.createElement("div",{className:l([x.inputWrapper,x[u],o&&x.error])},r,G.createElement("fieldset",{className:x.fieldset,"aria-hidden":!0},G.createElement("legend",{className:x.legend},G.createElement("span",{className:x.labelText},d),s&&G.createElement("span",{className:`${x.labelText} ${x.asterisk}`,"aria-hidden":!0},"*"))),G.createElement("label",{htmlFor:c,className:l([x.label,a&&x.textareaLabel])},G.createElement("span",{className:x.labelText},d),s&&G.createElement("span",{className:`${x.labelText} ${x.asterisk}`,"aria-hidden":!0},"*"))),n&&G.createElement("div",{className:l([x.helpText,o&&x.error]),id:i},n))}function ae(e){let{children:r,dark:t,error:o,helpText:i,id:n,label:c,required:a,variant:d,...s}=e;if(r&&(!vr(r)||r.type!==dr))throw new Error(`<Input> received an invalid child. Expected <InputDecorator />, but got: ${vr(r)?String(r.type):typeof r}.`);let u=n??F(),m=i?F():void 0;return hr.createElement(U,{dark:t,error:o,helpId:m,helpText:i,id:u,label:c,required:a,variant:d},hr.createElement("input",{id:u,className:`${x.input} ${p.fontMedium}`,placeholder:"",required:a,...s,"aria-describedby":m}),r)}import xr from"react";function le(e){let{dark:r=!1,error:t=!1,helpText:o,id:i,label:n,resize:c="both",required:a,...d}=e,s=i??F(),u=o?F():void 0,m={"--uil-textarea-resize":c,...d.style};return xr.createElement(U,{dark:r,error:t,helpId:u,helpText:o,id:s,label:n,required:a,isTextarea:!0},xr.createElement("textarea",{id:s,className:l([x.input,x.textarea,p.fontMedium]),placeholder:"",required:a,...d,"aria-describedby":u,style:m}))}import B,{useRef as yr,useState as wr}from"react";var or={pagination:"E",select:"wi",controls:"mi"};function se(e){let{activePage:r=1,dark:t=!1,entries:o,entriesDescription:i="of",nextButton:n,nextLabel:c="Go to next page",onChange:a,prevButton:d,prevLabel:s="Go to previous page",rowLabel:u="Rows per page",rows:m=[10,25,50,100]}=e,b=F(),f=yr(null),y=yr(null);I(f),I(y);let[g,P]=wr(m[0]),h=Math.ceil(o/g),[v,W]=wr(r>h?h:r<=0?1:r),D=g*(v-1)+1,k=g*v;function M(C){let $=Number(C.target.value);P($),V(1,$)}function V(C,$){W(C),a?.(C,$??g)}return B.createElement("nav",{className:l([T.pagination,or.pagination,t&&p.dark])},B.createElement("label",{htmlFor:b},u),B.createElement("select",{id:b,className:or.select,value:g,onChange:M},m.map((C,$)=>B.createElement("option",{key:$,value:C},C))),B.createElement("p",null,D,"-",k>o?o:k," ",i," ",o),B.createElement("div",{className:or.controls},B.createElement("button",{className:T.button,onClick:()=>{V(v-1)},disabled:v<=1,"aria-label":c},d??B.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:T.svg,ref:f},B.createElement("path",{d:"M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"}))),B.createElement("button",{className:T.button,onClick:()=>{V(v+1)},disabled:v>=h,"aria-label":s},n??B.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:T.svg,ref:y},B.createElement("path",{d:"M278.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-160 160c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L210.7 256 73.4 118.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l160 160z"})))))}var O={details:"d",summary:"k",divider:"ki",chevron:"I",start:"yi",end:"kr",content:"zi",accordion:"J"};import kr,{isValidElement as Cr}from"react";import Q,{useRef as pe}from"react";function ir(e){let{children:r,dark:t=!1,divider:o=!1,icon:i,iconPosition:n="start",summary:c,...a}=e,d=pe(null);return I(d),Q.createElement("details",{className:l([O.details,t&&p.dark]),...a},Q.createElement("summary",{className:l([O.summary,o&&O.divider,O[n]])},i??Q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:O.chevron,ref:d},Q.createElement("path",{d:"M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"})),c),Q.createElement("div",{className:O.content},r))}function de(e){let{children:r,dark:t=!1,divider:o=!1,icon:i,iconPosition:n,name:c}=e;return r&&r.forEach(a=>{if(!Cr(a)||a.type!==ir)throw new Error(`<Accordion> received an invalid child. Expected <Details />, but got: ${Cr(a)?String(a.type):typeof a}.`)}),kr.createElement("div",{className:l([O.accordion])},r.map((a,d)=>kr.createElement(ir,{key:d,...a.props,dark:a.props.dark??t,divider:a.props.divider??o,icon:a.props.icon??i,iconPosition:a.props.iconPosition??n,name:a.props.name??c})))}import Z from"react";function ce(e){let{checked:r,children:t,color:o,dark:i,disabled:n,onChange:c,...a}=e,d=a.id??F();function s(m){!n&&c&&c(m)}function u(){document.querySelector(`#${d}`).click()}return Z.createElement("div",{className:l([N.checkWrapper,i&&p.dark])},Z.createElement("div",{className:l([N.check,N.box]),onClick:u},Z.createElement("input",{type:"checkbox",checked:r,onChange:s,id:d,disabled:n,...a}),Z.createElement("div",{className:l([N.checkmark]),style:n?void 0:{backgroundColor:o}})),t&&Z.createElement("label",{htmlFor:d,className:`${p.fontMedium} ${N.label}`},t))}import A,{Children as fe,useState as ge}from"react";var j={breadcrumbs:"F",highlight:"Fi",li:"yr",hiddenEntries:"Z"};function be(e){let{afterCollapse:r=2,beforeCollapse:t=1,children:o,dark:i=!1,expandButtonLabel:n="expand",highlightLast:c=!1,maxEntries:a=5,separator:d="/"}=e,s=fe.toArray(o).map((y,g)=>A.createElement("li",{className:j.li,key:g},y)),[u,m]=ge(!1);function b(y){return y.reduce((g,P,h)=>(g.push(P),h<y.length-1&&g.push(A.createElement("li",{key:`sep-${h}`,"aria-hidden":!0},d)),g),[])}function f(){return t+r>=s.length?(console.error(`<Breadcrumbs/> received an invalid collapse configuration. Expected (beforeCollapse + afterCollapse) < allEntries, but got: ${t+r} >= ${s.length}.`),s):[...s.slice(0,t),A.createElement("li",{className:j.li,key:"hidden-entries"},A.createElement("button",{className:j.hiddenEntries,type:"button","aria-label":n,onClick:()=>{m(!0)}},A.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},A.createElement("circle",{cx:"04",cy:"18",r:"1"}),A.createElement("circle",{cx:"12",cy:"18",r:"1"}),A.createElement("circle",{cx:"20",cy:"18",r:"1"})))),...s.slice(s.length-r,s.length)]}return A.createElement("nav",{"aria-label":e["aria-label"]},A.createElement("ol",{className:l([j.breadcrumbs,c&&j.highlight,i&&p.dark])},b(u||s.length<=a?s:f())))}var cr={skeleton:"zr",animation:"ji",pulse:"Fr"};import ve from"react";function xe(e){let{dark:r=!1,disableAnimation:t=!1,height:o,width:i,radius:n}=e;return ve.createElement("div",{className:l([cr.skeleton,!t&&cr.animation,r&&p.dark]),style:{height:o,width:i,borderRadius:n}})}var ye=new RegExp(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/);function ar(e,r){if(!ye.test(e))throw new Error(`${r} received an invalid hex color format. Expected '#000' or '#000000', but got: ${e}`);return e=e.replace("#",""),e.length===3?[parseInt(e.substring(0,1),16),parseInt(e.substring(1,2),16),parseInt(e.substring(2,2),16)]:[parseInt(e.substring(0,2),16),parseInt(e.substring(2,4),16),parseInt(e.substring(4,6),16)]}function X(e){let t=ar(e,"useContrastColor").map(a=>a/255),[o,i,n]=t.map(a=>a<=.04045?a/12.92:((a+.055)/1.055)**2.4);return .2126*o+.7152*i+.0722*n>.179?"#000000":"#ffffff"}import Pr from"react";function R(e){let r;switch(e){case"small":r=p.fontSmall;break;case"medium":r=p.fontMedium;break;case"large":r=p.fontLarge;break;default:throw new Error(`Error: unsupported size. Expected 'small', 'medium' or 'large', but got: ${String(e)}`)}return r}var K={button:"a",filled:"K",info:"Yi",success:"Ai",warning:"_",outlined:"L",text:"rr",error:"Ci",disabled:"ir",small:"jr",rounded:"or",medium:"Yr",large:"Ar"};function ke(e){let{children:r,color:t="info",dark:o=!1,disabled:i=!1,href:n,rounded:c=!1,size:a="medium",target:d,variant:s,...u}=e,m=f(),b=y();function f(){return l([K.button,p.fit,K[a],K[s],o&&p.dark,i&&K.disabled,L(t)&&K[t],R(a),c&&K.rounded])}function y(){if(i||L(t))return;let g=ar(t,"<Button>");return{"--uil-button-font-color":X(t),"--uil-button-color":t,"--uil-button-hover-color":`${g[0]}, ${g[1]}, ${g[2]}`}}return n||n===""?Pr.createElement("a",{href:n,target:d,id:u.id,title:u.title,style:b,className:m},r):Pr.createElement("button",{style:b,className:m,type:u.type??"button",disabled:i,"aria-disabled":i,tabIndex:i?-1:u.tabIndex,...u},r)}import rr,{useRef as Pe}from"react";var Y={switch:"l",small:"M",thumbWrapper:"c",track:"X",medium:"N",large:"O",info:"Di",success:"Ei",warning:"Xi",error:"qi",thumb:"lr"};function Te(e){let{color:r="info",dark:t=!1,disabled:o,onChange:i,size:n="medium",...c}=e,a=L(r),d=a?void 0:{"--uil-switch-color":r},s=Pe(null);function u(b){o||i?.(b)}function m(){s.current?.click()}return rr.createElement("div",{className:l([Y.switch,Y[n],a&&Y[r],t&&p.dark]),onClick:()=>{m()},style:d},rr.createElement("div",{className:Y.thumbWrapper},rr.createElement("div",{className:Y.thumb}),rr.createElement("input",{type:"checkbox",disabled:o,ref:s,onChange:u,...c})),rr.createElement("div",{className:Y.track}))}import lr,{cloneElement as Ee,isValidElement as Ne,useRef as Fe}from"react";var H={tag:"t",clickable:"ar",small:"Cr",medium:"Dr",large:"Er",filled:"Bi",outlined:"er",delIcon:"q",elevated:"Gi",info:"Hi",success:"Ii",warning:"Xr",error:"Ji"};function Se(e){let{children:r,color:t,dark:o=!1,deleteIcon:i,elevated:n=!1,href:c,label:a,onDelete:d,onClick:s,size:u="medium",target:m,variant:b}=e,f=Fe(null),y=v(),g=W(),P=null;if(d){let k;if(b==="filled")switch(t){case"info":case"success":case"error":k=o?"black":"white";break;case"warning":k="black";break;default:k=X(t)}else L(t)?k=void 0:k=t;P=i&&Ne(i)?Ee(i,{onClick:h}):lr.createElement("svg",{ref:f,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",onClick:h,className:l([H.delIcon,H[u]]),fill:k},lr.createElement("path",{d:"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"}))}I(f);function h(k){k.stopPropagation(),d?.()}function v(){if(!L(t))return{"--uil-tag-font-color":X(t),"--uil-tag-color":t}}function W(){return l([H.tag,L(t)&&H[t],H[b],p.fit,n&&H.elevated,o&&p.dark,R(u),H[u],(s??c)&&H.clickable])}function D(k){(k.key==="Enter"||k.key===" ")&&s?.()}return c?lr.createElement("a",{href:c,target:m,style:y,className:g},a??r,P):lr.createElement("div",{className:g,onClick:()=>{s?.()},onKeyDown:s&&D,role:s&&"button",style:y,tabIndex:s&&0},a??r,P)}export{de as Accordion,be as Breadcrumbs,ke as Button,ce as Checkbox,ee as CircularProgress,ir as Details,zr as Dialog,Mr as DialogContent,Gr as DialogControls,Br as DialogTitle,ae as Input,dr as InputDecorator,te as LinearProgress,Rr as Pagination,sr as Radio,Jr as RadioGroup,xe as Skeleton,Te as Switch,se as TablePagination,Se as Tag,le as Textarea,jr as ToastProvider,X as useContrastColor,Xr as useToastContext};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function hexToRgb(hex: string, component: string): number[];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": false,
|
|
3
3
|
"name": "@hbuesing/ui-library",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "6.0.0",
|
|
5
5
|
"description": "Collection of reusable ui components for react based applications",
|
|
6
6
|
"source": "src/index.ts",
|
|
7
7
|
"type": "module",
|
|
@@ -30,10 +30,11 @@
|
|
|
30
30
|
"build:dev": "NODE_ENV=dev node esbuild.js",
|
|
31
31
|
"build": "NODE_ENV=production node esbuild.js",
|
|
32
32
|
"postbuild": "npm run build:types",
|
|
33
|
-
"build:types": "tsc
|
|
33
|
+
"build:types": "tsc -p tsconfig.build.json",
|
|
34
34
|
"test": "vitest run",
|
|
35
35
|
"test:watch": "vitest -w",
|
|
36
|
-
"test:coverage": "vitest run --coverage"
|
|
36
|
+
"test:coverage": "vitest run --coverage",
|
|
37
|
+
"storybook": "storybook dev -p 3001"
|
|
37
38
|
},
|
|
38
39
|
"license": "MIT",
|
|
39
40
|
"homepage": "https://www.ui-library.hbsng.com",
|
|
@@ -48,11 +49,17 @@
|
|
|
48
49
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
49
50
|
},
|
|
50
51
|
"devDependencies": {
|
|
52
|
+
"@storybook/addon-a11y": "^9.1.3",
|
|
53
|
+
"@storybook/react-vite": "^9.1.3",
|
|
51
54
|
"@testing-library/react": "^16.3.0",
|
|
52
|
-
"@
|
|
53
|
-
"
|
|
55
|
+
"@testing-library/user-event": "^14.6.1",
|
|
56
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
57
|
+
"esbuild": "0.25.9",
|
|
54
58
|
"esbuild-sass-plugin": "^3.3.1",
|
|
55
|
-
"
|
|
56
|
-
"
|
|
59
|
+
"eslint-plugin-storybook": "^9.1.3",
|
|
60
|
+
"jsdom": "^26.1.0",
|
|
61
|
+
"storybook": "^9.1.2",
|
|
62
|
+
"typescript-plugin-css-modules": "^5.2.0",
|
|
63
|
+
"vitest": "^3.2.4"
|
|
57
64
|
}
|
|
58
65
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './backdrop';
|