polpo 0.1.6 → 0.1.7
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/.turbo/turbo-lint.log +1 -1
- package/dist/chunk-CF5MBMWG.js +3 -0
- package/dist/chunk-CF5MBMWG.js.map +1 -0
- package/dist/hooks.cjs +1 -1
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.d.cts +1 -1
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.js +1 -1
- package/dist/ui.cjs +378 -296
- package/dist/ui.cjs.map +1 -1
- package/dist/ui.d.cts +262 -193
- package/dist/ui.d.ts +262 -193
- package/dist/ui.js +376 -294
- package/dist/ui.js.map +1 -1
- package/dist/{use-modal-transition-DBAyFSqW.d.ts → use-modal-transition-DPZFWFFf.d.ts} +2 -5
- package/dist/{use-modal-transition-C6mR_NZh.d.cts → use-modal-transition-XQHye62R.d.cts} +2 -5
- package/package.json +1 -1
- package/src/components/accordion/accordion.tsx +28 -10
- package/src/components/form/checkbox/checkbox.stories.tsx +2 -1
- package/src/components/form/checkbox/checkbox.tsx +14 -4
- package/src/components/form/field/field.style.ts +22 -19
- package/src/components/form/field/field.tsx +1 -0
- package/src/components/form/radio/radio.stories.tsx +2 -1
- package/src/components/form/radio/radio.style.ts +2 -2
- package/src/components/form/radio/radio.tsx +13 -2
- package/src/components/form/select/data.stories.json +452 -0
- package/src/components/form/select/index.ts +1 -1
- package/src/components/form/select/option.tsx +101 -0
- package/src/components/form/select/options.tsx +93 -135
- package/src/components/form/select/select.stories.tsx +285 -66
- package/src/components/form/select/select.style.ts +44 -10
- package/src/components/form/select/select.tsx +174 -166
- package/src/components/form/select/select.types.ts +47 -26
- package/src/components/form/switch/switch.stories.tsx +52 -2
- package/src/components/form/switch/switch.style.ts +42 -25
- package/src/components/form/switch/switch.tsx +87 -21
- package/src/components/infinity-scroll/infinity-scroll.stories.tsx +58 -15
- package/src/components/infinity-scroll/infinity-scroll.tsx +7 -10
- package/src/components/loaders/icons/box-1.tsx +31 -0
- package/src/components/loaders/icons/box-2.tsx +30 -0
- package/src/components/loaders/icons/box-3.tsx +66 -0
- package/src/components/loaders/icons/clock-1.tsx +25 -0
- package/src/components/loaders/icons/clock-2.tsx +58 -0
- package/src/components/loaders/icons/dots-1.tsx +194 -0
- package/src/components/loaders/icons/dots-2.tsx +15 -0
- package/src/components/loaders/icons/dots-3.tsx +38 -0
- package/src/components/loaders/icons/dots-4.tsx +90 -0
- package/src/components/loaders/icons/dots-5.tsx +30 -0
- package/src/components/loaders/icons/dots-6.tsx +72 -0
- package/src/components/loaders/icons/dots-7.tsx +51 -0
- package/src/components/loaders/icons/dots-8.tsx +42 -0
- package/src/components/loaders/icons/dots-9.tsx +27 -0
- package/src/components/loaders/icons/lines-1.tsx +96 -0
- package/src/components/loaders/icons/lines-2.tsx +48 -0
- package/src/components/loaders/icons/pulse-1.tsx +69 -0
- package/src/components/loaders/icons/pulse-2.tsx +69 -0
- package/src/components/loaders/icons/pulse-3.tsx +105 -0
- package/src/components/loaders/icons/pulse-4.tsx +105 -0
- package/src/components/loaders/icons/pulse-5.tsx +56 -0
- package/src/components/loaders/icons/spinner-1.tsx +162 -0
- package/src/components/loaders/icons/spinner-2.tsx +147 -0
- package/src/components/loaders/icons/spinner-3.tsx +35 -0
- package/src/components/loaders/icons/spinner-4.tsx +16 -0
- package/src/components/loaders/simple-loader/simple-loader.stories.tsx +26 -5
- package/src/components/loaders/simple-loader/simple-loader.style.ts +1 -2
- package/src/components/loaders/simple-loader/simple-loader.tsx +92 -8
- package/src/components/modals/menu/menu.stories.tsx +10 -0
- package/src/components/modals/menu/menu.style.ts +50 -9
- package/src/components/modals/menu/menu.tsx +75 -33
- package/src/components/modals/modal/modal.tsx +15 -5
- package/src/components/ripple/ripple.tsx +3 -1
- package/src/components/typography/typography.tsx +1 -1
- package/src/contexts/theme-context/theme.defaults.ts +5 -1
- package/src/contexts/theme-context/themes.ts +2 -0
- package/src/hooks/use-dom-container.ts +2 -2
- package/src/hooks/use-modal-in-container.ts +0 -11
- package/src/hooks/use-modal-transition.ts +2 -4
- package/tsconfig.json +1 -0
- package/dist/chunk-LJM5NQBY.js +0 -3
- package/dist/chunk-LJM5NQBY.js.map +0 -1
package/dist/ui.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
|
-
import React__default, { HTMLAttributes, ButtonHTMLAttributes, CSSProperties, DetailedHTMLProps, ImgHTMLAttributes, RefObject,
|
|
3
|
+
import React__default, { HTMLAttributes, ButtonHTMLAttributes, CSSProperties, DetailedHTMLProps, ImgHTMLAttributes, RefObject, ReactNode } from 'react';
|
|
4
4
|
import { UseControllerProps, FieldValues, SubmitHandler, DefaultValues, Mode } from 'react-hook-form';
|
|
5
|
-
import { M as ModalState, U as UseModalTransitionParams, a as UseModalInContainerParams } from './use-modal-transition-
|
|
5
|
+
import { M as ModalState, U as UseModalTransitionParams, a as UseModalInContainerParams } from './use-modal-transition-XQHye62R.cjs';
|
|
6
6
|
import { P as PositionContainer } from './get-modal-position-drle0OjP.cjs';
|
|
7
7
|
import * as csstype from 'csstype';
|
|
8
8
|
import { AnyObjectSchema } from 'yup';
|
|
@@ -16,8 +16,10 @@ type AccordionProps = {
|
|
|
16
16
|
className?: string;
|
|
17
17
|
style?: React__default.CSSProperties;
|
|
18
18
|
noSeparators?: boolean;
|
|
19
|
+
multiple?: boolean;
|
|
20
|
+
defaultOpened?: Array<string> | string;
|
|
19
21
|
};
|
|
20
|
-
declare const Accordion: ({ children, className, noSeparators, style }: AccordionProps) => react_jsx_runtime.JSX.Element;
|
|
22
|
+
declare const Accordion: ({ children, className, noSeparators, multiple, style, defaultOpened, }: AccordionProps) => react_jsx_runtime.JSX.Element;
|
|
21
23
|
|
|
22
24
|
type ObjectIconsT = Record<'airplane' | 'bell' | 'bicycle' | 'book-open' | 'book-solid' | 'calendar' | 'camera' | 'clean-computer' | 'crossed-flags' | 'document' | 'door-closed' | 'door-open' | 'dropper' | 'envelope' | 'eye' | 'eye-hidden' | 'game-control' | 'gear' | 'house' | 'magnifying-glass' | 'moon' | 'pencil' | 'star' | 'star-empty' | 'sun' | 'trash-can', IconT>;
|
|
23
25
|
|
|
@@ -185,9 +187,10 @@ type CheckboxProps = {
|
|
|
185
187
|
placeholder?: never;
|
|
186
188
|
icon?: IconNameT;
|
|
187
189
|
color?: `${ColorVariants}`;
|
|
190
|
+
size?: `${SizeVariants}`;
|
|
188
191
|
};
|
|
189
192
|
declare const Checkbox: {
|
|
190
|
-
({ name, value, setValue, onBlur, onFocus, className, style, autoFocus, readOnly, disabled, autoComplete, icon, label, color, }: UnControlledComponentProps<CheckboxProps, boolean>): react_jsx_runtime.JSX.Element;
|
|
193
|
+
({ name, value, setValue, onBlur, onFocus, className, style, autoFocus, readOnly, disabled, autoComplete, icon, label, color, size, }: UnControlledComponentProps<CheckboxProps, boolean>): react_jsx_runtime.JSX.Element;
|
|
191
194
|
Controller: ({ rules, ...props }: ControllerGeneratorProps<CheckboxProps, boolean>) => react_jsx_runtime.JSX.Element;
|
|
192
195
|
};
|
|
193
196
|
|
|
@@ -296,18 +299,28 @@ type RadioProps = {
|
|
|
296
299
|
radioValue: string;
|
|
297
300
|
placeholder?: never;
|
|
298
301
|
color?: `${ColorVariants}`;
|
|
302
|
+
size?: `${SizeVariants}`;
|
|
299
303
|
};
|
|
300
304
|
declare const Radio: {
|
|
301
|
-
({ name, value, setValue, onBlur, onFocus, className, style, autoFocus, readOnly, disabled, autoComplete, radioValue, label, color, }: UnControlledComponentProps<RadioProps, string>): react_jsx_runtime.JSX.Element;
|
|
305
|
+
({ name, value, setValue, onBlur, onFocus, className, style, autoFocus, readOnly, disabled, autoComplete, radioValue, label, color, size, }: UnControlledComponentProps<RadioProps, string>): react_jsx_runtime.JSX.Element;
|
|
302
306
|
Controller: ({ rules, ...props }: ControllerGeneratorProps<RadioProps, string>) => react_jsx_runtime.JSX.Element;
|
|
303
307
|
};
|
|
304
308
|
|
|
305
309
|
type SelectItem = string | number | Record<string, unknown> | unknown;
|
|
306
310
|
type MultiValue<T extends SelectItem> = Array<T>;
|
|
307
311
|
type SingleValue<T extends SelectItem> = T | null;
|
|
312
|
+
type OptionComponentProps<T extends SelectItem> = {
|
|
313
|
+
value: T;
|
|
314
|
+
};
|
|
315
|
+
type ValueComponentProps<T extends SelectItem> = {
|
|
316
|
+
value: MultiValue<T>;
|
|
317
|
+
multiselect: true;
|
|
318
|
+
} | {
|
|
319
|
+
value: SingleValue<T>;
|
|
320
|
+
multiselect?: false;
|
|
321
|
+
};
|
|
308
322
|
type SharedSelectProps<T extends SelectItem> = InputFieldProps<{
|
|
309
323
|
options: Array<T>;
|
|
310
|
-
renderOption: (item: T) => React__default.ReactNode;
|
|
311
324
|
isEqualComparator?: (a: T, b: T) => boolean;
|
|
312
325
|
searchQueryValue?: string;
|
|
313
326
|
searchQueryPlaceholder?: string;
|
|
@@ -315,22 +328,36 @@ type SharedSelectProps<T extends SelectItem> = InputFieldProps<{
|
|
|
315
328
|
loadMore?: () => void;
|
|
316
329
|
isLoading?: boolean;
|
|
317
330
|
hasNextPage?: boolean;
|
|
331
|
+
emptyMessage?: string;
|
|
318
332
|
maxOptions?: number;
|
|
333
|
+
optionComponent?: React__default.FC<OptionComponentProps<T>>;
|
|
334
|
+
valueComponent?: React__default.FC<ValueComponentProps<T>>;
|
|
319
335
|
showClearOption?: boolean;
|
|
336
|
+
height?: number;
|
|
337
|
+
searchQueryClassName?: string;
|
|
338
|
+
searchQueryStyle?: React__default.CSSProperties;
|
|
339
|
+
children?: React__default.ReactNode;
|
|
320
340
|
}>;
|
|
321
341
|
type MultiSelectProps<T extends SelectItem> = SharedSelectProps<T> & {
|
|
322
342
|
multiselect: true;
|
|
323
343
|
};
|
|
324
344
|
type SingleSelectProps<T extends SelectItem> = SharedSelectProps<T> & {
|
|
325
345
|
multiselect?: false;
|
|
326
|
-
optionVariant?: never;
|
|
327
346
|
};
|
|
328
347
|
type UnControlledSelectProps<T extends SelectItem> = UnControlledComponentProps<MultiSelectProps<T>, MultiValue<T>> | UnControlledComponentProps<SingleSelectProps<T>, SingleValue<T>>;
|
|
329
348
|
type ControllerGeneratorSelectProps<T extends SelectItem> = ControllerGeneratorProps<MultiSelectProps<T>, MultiValue<T>> | ControllerGeneratorProps<SingleSelectProps<T>, SingleValue<T>>;
|
|
330
349
|
|
|
350
|
+
type OptionLabelProps = {
|
|
351
|
+
children: React__default.ReactNode;
|
|
352
|
+
};
|
|
331
353
|
declare const Select: {
|
|
332
|
-
<T extends SelectItem>({ options,
|
|
354
|
+
<T extends SelectItem>({ options, isEqualComparator, searchQueryValue, searchQueryPlaceholder, onSearchQuery, loadMore, isLoading, hasNextPage, emptyMessage, multiselect, optionComponent: OptionComponent, valueComponent: ValueComponent, maxOptions, children, name, value, setValue, onBlur, onFocus, className, style, showClearOption, height, searchQueryStyle, searchQueryClassName, autoFocus, readOnly, disabled, placeholder, autoComplete, isDirty, isTouched, invalid, error, ...fieldProps }: UnControlledSelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
333
355
|
Controller: <T extends SelectItem>(props: ControllerGeneratorSelectProps<T>) => react_jsx_runtime.JSX.Element;
|
|
356
|
+
Option: <T extends SelectItem>({ children, value }: {
|
|
357
|
+
children: React__default.ReactNode;
|
|
358
|
+
value: T;
|
|
359
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
360
|
+
OptionLabel: ({ children }: OptionLabelProps) => react_jsx_runtime.JSX.Element;
|
|
334
361
|
};
|
|
335
362
|
|
|
336
363
|
type SliderProps = InputFieldProps<{
|
|
@@ -355,33 +382,38 @@ declare const Textarea: {
|
|
|
355
382
|
};
|
|
356
383
|
|
|
357
384
|
type SwitchProps = {
|
|
385
|
+
leftLabel?: string;
|
|
386
|
+
rightLabel?: string;
|
|
358
387
|
label?: string;
|
|
359
|
-
width?: number;
|
|
360
|
-
dotSize?: number;
|
|
361
388
|
dotHoverSize?: number;
|
|
362
389
|
padding?: number;
|
|
363
390
|
leftIcon?: IconNameT;
|
|
364
391
|
rightIcon?: IconNameT;
|
|
392
|
+
internalLeftIcon?: IconNameT;
|
|
393
|
+
internalRightIcon?: IconNameT;
|
|
394
|
+
leftIconTooltip?: string;
|
|
395
|
+
rightIconTooltip?: string;
|
|
396
|
+
color?: `${ColorVariants}`;
|
|
397
|
+
size?: `${SizeVariants}`;
|
|
398
|
+
width?: `${SizeVariants}`;
|
|
365
399
|
};
|
|
366
400
|
declare const Switch: {
|
|
367
|
-
({ name, value, setValue, onBlur, onFocus, className, style, autoFocus, readOnly, disabled, placeholder, autoComplete, label, width,
|
|
401
|
+
({ name, value, setValue, onBlur, onFocus, className, style, autoFocus, readOnly, disabled, placeholder, autoComplete, label, leftLabel, rightLabel, width, size, dotHoverSize, padding, leftIcon, rightIcon, internalLeftIcon, internalRightIcon, leftIconTooltip, rightIconTooltip, color, }: UnControlledComponentProps<SwitchProps, boolean>): react_jsx_runtime.JSX.Element;
|
|
368
402
|
Controller: ({ rules, ...props }: ControllerGeneratorProps<SwitchProps, boolean>) => react_jsx_runtime.JSX.Element;
|
|
369
403
|
};
|
|
370
404
|
|
|
371
405
|
type ImageProps = DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement> & {};
|
|
372
406
|
declare const Image: ({ alt, loading, ...props }: ImageProps) => react_jsx_runtime.JSX.Element;
|
|
373
407
|
|
|
374
|
-
type InfinityScrollProps
|
|
408
|
+
type InfinityScrollProps = {
|
|
375
409
|
isLoading: boolean;
|
|
376
410
|
hasNextPage: boolean;
|
|
377
411
|
loadMore: () => void;
|
|
378
|
-
|
|
379
|
-
renderItem: (item: T, key: number) => React.ReactElement;
|
|
380
|
-
customLoadMoreElement?: (ref: RefObject<Element>) => React.ReactElement;
|
|
412
|
+
customLoadMoreElement?: (ref: RefObject<Element>) => React.ReactNode;
|
|
381
413
|
emptyMessage?: string;
|
|
382
414
|
children?: React.ReactNode;
|
|
383
415
|
};
|
|
384
|
-
declare const InfinityScroll:
|
|
416
|
+
declare const InfinityScroll: ({ isLoading: isLoadingProp, hasNextPage, loadMore, customLoadMoreElement, emptyMessage, children, }: InfinityScrollProps) => React.ReactElement;
|
|
385
417
|
|
|
386
418
|
declare enum LineOrientation {
|
|
387
419
|
VERTICAL = "vertical",
|
|
@@ -422,10 +454,37 @@ type LineDashedProps = LineCommonProps & {
|
|
|
422
454
|
type LineProps = LineSolidProps | LineDottedProps | LineDashedProps;
|
|
423
455
|
declare const Line: ({ orientation, className, style, color, lineWidth, lineStyle, dotSize, dashedSize, spacing, }: LineProps) => react_jsx_runtime.JSX.Element;
|
|
424
456
|
|
|
457
|
+
declare enum LoaderIcons {
|
|
458
|
+
BOX_1 = "box-1",
|
|
459
|
+
BOX_2 = "box-2",
|
|
460
|
+
BOX_3 = "box-3",
|
|
461
|
+
CLOCK_1 = "clock-1",
|
|
462
|
+
CLOCK_2 = "clock-2",
|
|
463
|
+
DOTS_1 = "dots-1",
|
|
464
|
+
DOTS_2 = "dots-2",
|
|
465
|
+
DOTS_3 = "dots-3",
|
|
466
|
+
DOTS_4 = "dots-4",
|
|
467
|
+
DOTS_5 = "dots-5",
|
|
468
|
+
DOTS_6 = "dots-6",
|
|
469
|
+
DOTS_7 = "dots-7",
|
|
470
|
+
DOTS_8 = "dots-8",
|
|
471
|
+
DOTS_9 = "dots-9",
|
|
472
|
+
LINES_1 = "lines-1",
|
|
473
|
+
LINES_2 = "lines-2",
|
|
474
|
+
PULSE_1 = "pulse-1",
|
|
475
|
+
PULSE_2 = "pulse-2",
|
|
476
|
+
PULSE_3 = "pulse-3",
|
|
477
|
+
PULSE_4 = "pulse-4",
|
|
478
|
+
PULSE_5 = "pulse-5",
|
|
479
|
+
SPINNER_1 = "spinner-1",
|
|
480
|
+
SPINNER_2 = "spinner-2",
|
|
481
|
+
SPINNER_3 = "spinner-3",
|
|
482
|
+
SPINNER_4 = "spinner-4"
|
|
483
|
+
}
|
|
425
484
|
type SimpleLoaderProps = {
|
|
426
|
-
|
|
485
|
+
icon?: `${LoaderIcons}`;
|
|
427
486
|
};
|
|
428
|
-
declare const SimpleLoader: ({
|
|
487
|
+
declare const SimpleLoader: ({ icon }: SimpleLoaderProps) => react_jsx_runtime.JSX.Element;
|
|
429
488
|
|
|
430
489
|
declare enum ModalBackdrop {
|
|
431
490
|
OPAQUE = "opaque",
|
|
@@ -445,12 +504,14 @@ declare const Backdrop: ({ opacity, backdrop, zIndex, backdropOnClick, modalStat
|
|
|
445
504
|
type ModalProps = Omit<BackdropProps, 'modalState'> & UseModalTransitionParams & Omit<UseModalInContainerParams, 'modalRef'> & {
|
|
446
505
|
id: string;
|
|
447
506
|
children: React__default.ReactNode;
|
|
507
|
+
onClose: () => void;
|
|
448
508
|
className?: string;
|
|
449
509
|
style?: React__default.CSSProperties;
|
|
450
510
|
rootStyle?: CSSProperties;
|
|
451
511
|
animation?: 'none' | 'fade-down' | 'bounce';
|
|
452
512
|
closeAnimationClassName?: string;
|
|
453
513
|
modalRef?: React__default.RefObject<HTMLElement>;
|
|
514
|
+
closeOnClickOutside?: boolean;
|
|
454
515
|
};
|
|
455
516
|
declare const Modal: ({ id, children, isOpen, onClose, className, style, rootStyle, animation, closeAnimationClassName, modalRef: modalRefProp, closeOnClickOutside, transitionDuration, windowOffset, offset, position, containerRef, zIndex, ...backdropProps }: ModalProps) => react_jsx_runtime.JSX.Element | null;
|
|
456
517
|
|
|
@@ -490,180 +551,6 @@ type ConfirmationModalProps = ActionModalProps & {
|
|
|
490
551
|
};
|
|
491
552
|
declare const ConfirmationModal: ({ title, onAccept, onReject, acceptText, rejectText, children, isLoading, ...actionModalProps }: ConfirmationModalProps) => react_jsx_runtime.JSX.Element;
|
|
492
553
|
|
|
493
|
-
type MenuOptionProps = {
|
|
494
|
-
id?: string;
|
|
495
|
-
children?: React__default.ReactNode;
|
|
496
|
-
label?: React__default.ReactNode;
|
|
497
|
-
disabled?: boolean;
|
|
498
|
-
selected?: boolean;
|
|
499
|
-
className?: string;
|
|
500
|
-
style?: React__default.CSSProperties;
|
|
501
|
-
asCheckbox?: boolean;
|
|
502
|
-
icon?: IconNameT;
|
|
503
|
-
onClick?: (newValue: boolean) => void;
|
|
504
|
-
onKeyDown?: (event: React__default.KeyboardEvent) => void;
|
|
505
|
-
};
|
|
506
|
-
type MenuProps = ModalProps & {
|
|
507
|
-
children: React__default.ReactNode;
|
|
508
|
-
};
|
|
509
|
-
declare const Menu: {
|
|
510
|
-
({ children, isOpen, onClose, id, ...modalProps }: MenuProps): react_jsx_runtime.JSX.Element;
|
|
511
|
-
Option: ({ children, label, asCheckbox, icon, id, disabled, selected, className, style, onClick, onKeyDown, }: MenuOptionProps) => react_jsx_runtime.JSX.Element;
|
|
512
|
-
Divider: () => react_jsx_runtime.JSX.Element;
|
|
513
|
-
OptionsGroup: <T>(p: MenuOptionsGroupProps<T> & {
|
|
514
|
-
ref?: ForwardedRef<HTMLUListElement>;
|
|
515
|
-
}) => ReactElement;
|
|
516
|
-
};
|
|
517
|
-
type MenuOptionsGroupProps<T> = InfinityScrollProps<T> & {
|
|
518
|
-
className?: string;
|
|
519
|
-
style?: React__default.CSSProperties;
|
|
520
|
-
};
|
|
521
|
-
|
|
522
|
-
type PortalProps = {
|
|
523
|
-
id: string;
|
|
524
|
-
children: ReactNode;
|
|
525
|
-
};
|
|
526
|
-
declare const Portal: React$1.ForwardRefExoticComponent<PortalProps & React$1.RefAttributes<unknown>>;
|
|
527
|
-
|
|
528
|
-
type RippleProps = {
|
|
529
|
-
color?: string;
|
|
530
|
-
duration?: number;
|
|
531
|
-
timingFunction?: React__default.CSSProperties['animationTimingFunction'];
|
|
532
|
-
times?: number;
|
|
533
|
-
className?: string;
|
|
534
|
-
style?: React__default.CSSProperties;
|
|
535
|
-
};
|
|
536
|
-
declare const Ripple: ({ color, duration, timingFunction, times, className, style, }: RippleProps) => react_jsx_runtime.JSX.Element;
|
|
537
|
-
|
|
538
|
-
type KeyValuesOf<T, V> = {
|
|
539
|
-
[P in keyof T]-?: T[P] extends V ? P : never;
|
|
540
|
-
}[keyof T];
|
|
541
|
-
type DeepPartial<T> = {
|
|
542
|
-
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
543
|
-
};
|
|
544
|
-
|
|
545
|
-
type Primitive = string | number | boolean;
|
|
546
|
-
type RowDataObject = {
|
|
547
|
-
[key: string]: Primitive | object;
|
|
548
|
-
};
|
|
549
|
-
type ColumnDataCommon<RowData extends RowDataObject> = {
|
|
550
|
-
header: React__default.ReactNode;
|
|
551
|
-
sortBy?: KeyValuesOf<RowData, Primitive>;
|
|
552
|
-
icon?: IconNameT;
|
|
553
|
-
width?: `${number}px` | `${number}em` | `${number}%`;
|
|
554
|
-
};
|
|
555
|
-
type ColumnDataField<RowData extends RowDataObject> = ColumnDataCommon<RowData> & {
|
|
556
|
-
field: KeyValuesOf<RowData, Primitive>;
|
|
557
|
-
sortBy?: never;
|
|
558
|
-
render?: never;
|
|
559
|
-
Component?: never;
|
|
560
|
-
};
|
|
561
|
-
type ColumnDataRender<RowData extends RowDataObject> = ColumnDataCommon<RowData> & {
|
|
562
|
-
field?: never;
|
|
563
|
-
render: (row: RowData, rowKey: React__default.Key) => React__default.ReactNode;
|
|
564
|
-
Component?: never;
|
|
565
|
-
};
|
|
566
|
-
type ColumnDataComponent<RowData extends RowDataObject> = ColumnDataCommon<RowData> & {
|
|
567
|
-
field?: never;
|
|
568
|
-
render?: never;
|
|
569
|
-
Component: React__default.FC<{
|
|
570
|
-
data: RowData;
|
|
571
|
-
rowKey: React__default.Key;
|
|
572
|
-
}>;
|
|
573
|
-
};
|
|
574
|
-
type ColumnData<RowData extends RowDataObject> = ColumnDataField<RowData> | ColumnDataRender<RowData> | ColumnDataComponent<RowData>;
|
|
575
|
-
|
|
576
|
-
type SmartTableProps<RowData extends RowDataObject> = {
|
|
577
|
-
columns: Array<ColumnData<RowData>>;
|
|
578
|
-
data: Array<RowData>;
|
|
579
|
-
width?: 'scroll' | 'content';
|
|
580
|
-
selectable?: boolean;
|
|
581
|
-
rowId: KeyValuesOf<RowData, React.Key>;
|
|
582
|
-
};
|
|
583
|
-
declare const SmartTable: <RowData extends RowDataObject>({ columns: initialColumns, data, width, selectable, rowId, }: SmartTableProps<RowData>) => react_jsx_runtime.JSX.Element;
|
|
584
|
-
|
|
585
|
-
declare enum TabListVariant {
|
|
586
|
-
SOLID = "solid",
|
|
587
|
-
GHOST = "ghost",
|
|
588
|
-
FLAT = "flat",
|
|
589
|
-
LINE = "line"
|
|
590
|
-
}
|
|
591
|
-
declare enum TabListColor {
|
|
592
|
-
PRIMARY = "primary",
|
|
593
|
-
SECONDARY = "secondary",
|
|
594
|
-
TERTIARY = "tertiary"
|
|
595
|
-
}
|
|
596
|
-
declare enum TabListDirection {
|
|
597
|
-
HORIZONTAL = "horizontal",
|
|
598
|
-
VERTICAL = "vertical"
|
|
599
|
-
}
|
|
600
|
-
type TabListProps = {
|
|
601
|
-
openTab: string;
|
|
602
|
-
variant?: `${TabListVariant}`;
|
|
603
|
-
children?: React__default.ReactNode;
|
|
604
|
-
size?: `${SizeVariants}`;
|
|
605
|
-
color?: `${TabListColor}`;
|
|
606
|
-
radius?: `${RadiusVariants}`;
|
|
607
|
-
direction?: `${TabListDirection}`;
|
|
608
|
-
className?: string;
|
|
609
|
-
style?: React__default.CSSProperties;
|
|
610
|
-
tabs?: Array<{
|
|
611
|
-
id: string;
|
|
612
|
-
label: React__default.ReactNode;
|
|
613
|
-
}>;
|
|
614
|
-
};
|
|
615
|
-
|
|
616
|
-
type TabsProps = {
|
|
617
|
-
children: React__default.ReactNode;
|
|
618
|
-
defaultOpenTab: string;
|
|
619
|
-
onChange?: (id: string) => void;
|
|
620
|
-
};
|
|
621
|
-
declare const Tabs: {
|
|
622
|
-
({ children, defaultOpenTab, onChange }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
623
|
-
Tab: React__default.ForwardRefExoticComponent<TabProps & React__default.RefAttributes<HTMLSpanElement>>;
|
|
624
|
-
TabPanel: ({ id, children }: TabPanelProps) => React__default.ReactNode;
|
|
625
|
-
TabList: ({ children, ...props }: Omit<TabListProps, "openTab">) => react_jsx_runtime.JSX.Element;
|
|
626
|
-
};
|
|
627
|
-
type TabProps = {
|
|
628
|
-
id: string;
|
|
629
|
-
children: React__default.ReactNode;
|
|
630
|
-
className?: string;
|
|
631
|
-
style?: React__default.CSSProperties;
|
|
632
|
-
onClick?: (e: React__default.MouseEvent<HTMLSpanElement>) => void;
|
|
633
|
-
};
|
|
634
|
-
type TabPanelProps = {
|
|
635
|
-
id: string;
|
|
636
|
-
children: React__default.ReactNode;
|
|
637
|
-
};
|
|
638
|
-
|
|
639
|
-
type TagProps = HTMLAttributes<HTMLElement> & {
|
|
640
|
-
children: React.ReactNode;
|
|
641
|
-
isSelected?: boolean;
|
|
642
|
-
size?: `${SizeVariants}`;
|
|
643
|
-
radius?: `${RadiusVariants}`;
|
|
644
|
-
};
|
|
645
|
-
declare const Tag: ({ children, className: customClassName, isSelected, size, radius, ...props }: TagProps) => react_jsx_runtime.JSX.Element;
|
|
646
|
-
|
|
647
|
-
type TooltipProps = {
|
|
648
|
-
position?: `${PositionContainer.TOP}` | `${PositionContainer.LEFT}` | `${PositionContainer.RIGHT}` | `${PositionContainer.BOTTOM}`;
|
|
649
|
-
offset?: number | `${number}`;
|
|
650
|
-
disabled?: boolean;
|
|
651
|
-
children: React__default.ReactElement;
|
|
652
|
-
content: React__default.ReactNode;
|
|
653
|
-
};
|
|
654
|
-
declare const Tooltip: ({ position, children, content, offset, disabled, }: TooltipProps) => react_jsx_runtime.JSX.Element;
|
|
655
|
-
|
|
656
|
-
type ClickToCopyProps = {
|
|
657
|
-
children?: React.ReactNode;
|
|
658
|
-
position?: TooltipProps['position'];
|
|
659
|
-
offset?: TooltipProps['offset'];
|
|
660
|
-
value: string;
|
|
661
|
-
tooltipText: string;
|
|
662
|
-
tooltipCopiedText?: string;
|
|
663
|
-
copiedTextTimeout?: number;
|
|
664
|
-
};
|
|
665
|
-
declare const ClickToCopy: ({ children, value, position, offset, tooltipText, tooltipCopiedText, copiedTextTimeout, }: ClickToCopyProps) => react_jsx_runtime.JSX.Element;
|
|
666
|
-
|
|
667
554
|
declare enum TypographyVariant {
|
|
668
555
|
HERO = "hero",
|
|
669
556
|
HEADER1 = "header1",
|
|
@@ -1803,6 +1690,186 @@ declare const Typography: React__default.ForwardRefExoticComponent<React__defaul
|
|
|
1803
1690
|
color?: `${ColorVariants}`;
|
|
1804
1691
|
} & React__default.RefAttributes<unknown>>;
|
|
1805
1692
|
|
|
1693
|
+
type MenuProps = ModalProps & {
|
|
1694
|
+
children: React__default.ReactNode;
|
|
1695
|
+
contentClassName?: string;
|
|
1696
|
+
contentStyle?: React__default.CSSProperties;
|
|
1697
|
+
menuContentRef?: RefObject<HTMLUListElement>;
|
|
1698
|
+
};
|
|
1699
|
+
declare const Menu: {
|
|
1700
|
+
({ children, isOpen, onClose, id, menuContentRef, contentClassName, contentStyle, ...modalProps }: MenuProps): react_jsx_runtime.JSX.Element;
|
|
1701
|
+
Option: ({ children, label, asCheckbox, icon, id, disabled, selected, className, style, onClick, ...liProps }: MenuOptionProps) => react_jsx_runtime.JSX.Element;
|
|
1702
|
+
Divider: () => react_jsx_runtime.JSX.Element;
|
|
1703
|
+
GroupLabel: ({ children, className, ...props }: Omit<TypographyProps, "variant">) => react_jsx_runtime.JSX.Element;
|
|
1704
|
+
Group: ({ children, label, className, style, contentClassName, contentStyle, ...props }: MenuGroupProps) => react_jsx_runtime.JSX.Element;
|
|
1705
|
+
};
|
|
1706
|
+
type MenuOptionProps = Omit<React__default.HTMLAttributes<HTMLLIElement>, 'onClick'> & {
|
|
1707
|
+
id?: string;
|
|
1708
|
+
children?: React__default.ReactNode;
|
|
1709
|
+
label?: React__default.ReactNode;
|
|
1710
|
+
disabled?: boolean;
|
|
1711
|
+
selected?: boolean;
|
|
1712
|
+
className?: string;
|
|
1713
|
+
style?: React__default.CSSProperties;
|
|
1714
|
+
asCheckbox?: boolean;
|
|
1715
|
+
icon?: IconNameT;
|
|
1716
|
+
onClick?: (newValue: boolean) => void;
|
|
1717
|
+
};
|
|
1718
|
+
type MenuGroupProps = Omit<React__default.HTMLAttributes<HTMLLIElement>, 'onClick'> & {
|
|
1719
|
+
children: React__default.ReactNode;
|
|
1720
|
+
label: React__default.ReactNode;
|
|
1721
|
+
className?: string;
|
|
1722
|
+
style?: React__default.CSSProperties;
|
|
1723
|
+
contentClassName?: string;
|
|
1724
|
+
contentStyle?: React__default.CSSProperties;
|
|
1725
|
+
};
|
|
1726
|
+
|
|
1727
|
+
type PortalProps = {
|
|
1728
|
+
id: string;
|
|
1729
|
+
children: ReactNode;
|
|
1730
|
+
};
|
|
1731
|
+
declare const Portal: React$1.ForwardRefExoticComponent<PortalProps & React$1.RefAttributes<unknown>>;
|
|
1732
|
+
|
|
1733
|
+
type RippleProps = {
|
|
1734
|
+
color?: string;
|
|
1735
|
+
duration?: number;
|
|
1736
|
+
timingFunction?: React__default.CSSProperties['animationTimingFunction'];
|
|
1737
|
+
times?: number;
|
|
1738
|
+
className?: string;
|
|
1739
|
+
style?: React__default.CSSProperties;
|
|
1740
|
+
zIndex?: React__default.CSSProperties['zIndex'];
|
|
1741
|
+
};
|
|
1742
|
+
declare const Ripple: ({ color, duration, timingFunction, times, className, style, zIndex, }: RippleProps) => react_jsx_runtime.JSX.Element;
|
|
1743
|
+
|
|
1744
|
+
type KeyValuesOf<T, V> = {
|
|
1745
|
+
[P in keyof T]-?: T[P] extends V ? P : never;
|
|
1746
|
+
}[keyof T];
|
|
1747
|
+
type DeepPartial<T> = {
|
|
1748
|
+
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
1749
|
+
};
|
|
1750
|
+
|
|
1751
|
+
type Primitive = string | number | boolean;
|
|
1752
|
+
type RowDataObject = {
|
|
1753
|
+
[key: string]: Primitive | object;
|
|
1754
|
+
};
|
|
1755
|
+
type ColumnDataCommon<RowData extends RowDataObject> = {
|
|
1756
|
+
header: React__default.ReactNode;
|
|
1757
|
+
sortBy?: KeyValuesOf<RowData, Primitive>;
|
|
1758
|
+
icon?: IconNameT;
|
|
1759
|
+
width?: `${number}px` | `${number}em` | `${number}%`;
|
|
1760
|
+
};
|
|
1761
|
+
type ColumnDataField<RowData extends RowDataObject> = ColumnDataCommon<RowData> & {
|
|
1762
|
+
field: KeyValuesOf<RowData, Primitive>;
|
|
1763
|
+
sortBy?: never;
|
|
1764
|
+
render?: never;
|
|
1765
|
+
Component?: never;
|
|
1766
|
+
};
|
|
1767
|
+
type ColumnDataRender<RowData extends RowDataObject> = ColumnDataCommon<RowData> & {
|
|
1768
|
+
field?: never;
|
|
1769
|
+
render: (row: RowData, rowKey: React__default.Key) => React__default.ReactNode;
|
|
1770
|
+
Component?: never;
|
|
1771
|
+
};
|
|
1772
|
+
type ColumnDataComponent<RowData extends RowDataObject> = ColumnDataCommon<RowData> & {
|
|
1773
|
+
field?: never;
|
|
1774
|
+
render?: never;
|
|
1775
|
+
Component: React__default.FC<{
|
|
1776
|
+
data: RowData;
|
|
1777
|
+
rowKey: React__default.Key;
|
|
1778
|
+
}>;
|
|
1779
|
+
};
|
|
1780
|
+
type ColumnData<RowData extends RowDataObject> = ColumnDataField<RowData> | ColumnDataRender<RowData> | ColumnDataComponent<RowData>;
|
|
1781
|
+
|
|
1782
|
+
type SmartTableProps<RowData extends RowDataObject> = {
|
|
1783
|
+
columns: Array<ColumnData<RowData>>;
|
|
1784
|
+
data: Array<RowData>;
|
|
1785
|
+
width?: 'scroll' | 'content';
|
|
1786
|
+
selectable?: boolean;
|
|
1787
|
+
rowId: KeyValuesOf<RowData, React.Key>;
|
|
1788
|
+
};
|
|
1789
|
+
declare const SmartTable: <RowData extends RowDataObject>({ columns: initialColumns, data, width, selectable, rowId, }: SmartTableProps<RowData>) => react_jsx_runtime.JSX.Element;
|
|
1790
|
+
|
|
1791
|
+
declare enum TabListVariant {
|
|
1792
|
+
SOLID = "solid",
|
|
1793
|
+
GHOST = "ghost",
|
|
1794
|
+
FLAT = "flat",
|
|
1795
|
+
LINE = "line"
|
|
1796
|
+
}
|
|
1797
|
+
declare enum TabListColor {
|
|
1798
|
+
PRIMARY = "primary",
|
|
1799
|
+
SECONDARY = "secondary",
|
|
1800
|
+
TERTIARY = "tertiary"
|
|
1801
|
+
}
|
|
1802
|
+
declare enum TabListDirection {
|
|
1803
|
+
HORIZONTAL = "horizontal",
|
|
1804
|
+
VERTICAL = "vertical"
|
|
1805
|
+
}
|
|
1806
|
+
type TabListProps = {
|
|
1807
|
+
openTab: string;
|
|
1808
|
+
variant?: `${TabListVariant}`;
|
|
1809
|
+
children?: React__default.ReactNode;
|
|
1810
|
+
size?: `${SizeVariants}`;
|
|
1811
|
+
color?: `${TabListColor}`;
|
|
1812
|
+
radius?: `${RadiusVariants}`;
|
|
1813
|
+
direction?: `${TabListDirection}`;
|
|
1814
|
+
className?: string;
|
|
1815
|
+
style?: React__default.CSSProperties;
|
|
1816
|
+
tabs?: Array<{
|
|
1817
|
+
id: string;
|
|
1818
|
+
label: React__default.ReactNode;
|
|
1819
|
+
}>;
|
|
1820
|
+
};
|
|
1821
|
+
|
|
1822
|
+
type TabsProps = {
|
|
1823
|
+
children: React__default.ReactNode;
|
|
1824
|
+
defaultOpenTab: string;
|
|
1825
|
+
onChange?: (id: string) => void;
|
|
1826
|
+
};
|
|
1827
|
+
declare const Tabs: {
|
|
1828
|
+
({ children, defaultOpenTab, onChange }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
1829
|
+
Tab: React__default.ForwardRefExoticComponent<TabProps & React__default.RefAttributes<HTMLSpanElement>>;
|
|
1830
|
+
TabPanel: ({ id, children }: TabPanelProps) => React__default.ReactNode;
|
|
1831
|
+
TabList: ({ children, ...props }: Omit<TabListProps, "openTab">) => react_jsx_runtime.JSX.Element;
|
|
1832
|
+
};
|
|
1833
|
+
type TabProps = {
|
|
1834
|
+
id: string;
|
|
1835
|
+
children: React__default.ReactNode;
|
|
1836
|
+
className?: string;
|
|
1837
|
+
style?: React__default.CSSProperties;
|
|
1838
|
+
onClick?: (e: React__default.MouseEvent<HTMLSpanElement>) => void;
|
|
1839
|
+
};
|
|
1840
|
+
type TabPanelProps = {
|
|
1841
|
+
id: string;
|
|
1842
|
+
children: React__default.ReactNode;
|
|
1843
|
+
};
|
|
1844
|
+
|
|
1845
|
+
type TagProps = HTMLAttributes<HTMLElement> & {
|
|
1846
|
+
children: React.ReactNode;
|
|
1847
|
+
isSelected?: boolean;
|
|
1848
|
+
size?: `${SizeVariants}`;
|
|
1849
|
+
radius?: `${RadiusVariants}`;
|
|
1850
|
+
};
|
|
1851
|
+
declare const Tag: ({ children, className: customClassName, isSelected, size, radius, ...props }: TagProps) => react_jsx_runtime.JSX.Element;
|
|
1852
|
+
|
|
1853
|
+
type TooltipProps = {
|
|
1854
|
+
position?: `${PositionContainer.TOP}` | `${PositionContainer.LEFT}` | `${PositionContainer.RIGHT}` | `${PositionContainer.BOTTOM}`;
|
|
1855
|
+
offset?: number | `${number}`;
|
|
1856
|
+
disabled?: boolean;
|
|
1857
|
+
children: React__default.ReactElement;
|
|
1858
|
+
content: React__default.ReactNode;
|
|
1859
|
+
};
|
|
1860
|
+
declare const Tooltip: ({ position, children, content, offset, disabled, }: TooltipProps) => react_jsx_runtime.JSX.Element;
|
|
1861
|
+
|
|
1862
|
+
type ClickToCopyProps = {
|
|
1863
|
+
children?: React.ReactNode;
|
|
1864
|
+
position?: TooltipProps['position'];
|
|
1865
|
+
offset?: TooltipProps['offset'];
|
|
1866
|
+
value: string;
|
|
1867
|
+
tooltipText: string;
|
|
1868
|
+
tooltipCopiedText?: string;
|
|
1869
|
+
copiedTextTimeout?: number;
|
|
1870
|
+
};
|
|
1871
|
+
declare const ClickToCopy: ({ children, value, position, offset, tooltipText, tooltipCopiedText, copiedTextTimeout, }: ClickToCopyProps) => react_jsx_runtime.JSX.Element;
|
|
1872
|
+
|
|
1806
1873
|
type FormProps<T extends FieldValues> = {
|
|
1807
1874
|
onSubmit: SubmitHandler<T>;
|
|
1808
1875
|
children: React.ReactNode;
|
|
@@ -1904,6 +1971,8 @@ type PaletteThemeEntity = {
|
|
|
1904
1971
|
main: string;
|
|
1905
1972
|
paper: string;
|
|
1906
1973
|
disabled: string;
|
|
1974
|
+
light: string;
|
|
1975
|
+
dark: string;
|
|
1907
1976
|
};
|
|
1908
1977
|
text: {
|
|
1909
1978
|
main: string;
|
|
@@ -3949,4 +4018,4 @@ type SectionLayoutProps = {
|
|
|
3949
4018
|
};
|
|
3950
4019
|
declare const SectionLayout: React$1.ForwardRefExoticComponent<SectionLayoutProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
3951
4020
|
|
|
3952
|
-
export { Accordion, AccordionItem, ActionModal, type ActionModalProps, AsideModal, Backdrop, type BackdropProps, Breakpoints, Button, type ButtonProps, ButtonVariant, Checkbox, ClickToCopy, CommonTheme, type CommonThemeEntity, ConfirmationModal, Controller, Cursor, DarkTheme, DatePicker, type DeepPartial, FetchProvider, Field, FieldOrientation, type FieldProps, FieldVariant, Flex, FlipCard, Form, Grid, HoverCard, HttpClient, Icon, type IconNameT, IconNames, Image, InfinityScroll, type InfinityScrollProps, Input, InputColor, type InputFieldProps, InputFile, InputPassword, type KeyValuesOf, LightTheme, Line, LineOrientation, LineStyle, Menu, type MenuOptionProps, Modal, ModalBackdrop, type ModalProps, type PaletteThemeEntity, Portal, Radio, Ripple, SectionLayout, Select, SimpleLoader, SlideCard, Slider, SmartTable, Switch, THEME, Tabs, Tag, Textarea, type ThemeColor, ThemeConstants, type ThemeConstantsEntity, type ThemeEntity, ThemeProvider, Tooltip, type TooltipProps, Typography, TypographyComponent, type TypographyEntity, TypographyVariant, TypographyVariants, TypographyVariantsClassNames, TypographyVariantsElements, TypographyWeight, useAccordionItem, useFetch, useMyTheme };
|
|
4021
|
+
export { Accordion, AccordionItem, ActionModal, type ActionModalProps, AsideModal, Backdrop, type BackdropProps, Breakpoints, Button, type ButtonProps, ButtonVariant, Checkbox, ClickToCopy, CommonTheme, type CommonThemeEntity, ConfirmationModal, Controller, Cursor, DarkTheme, DatePicker, type DeepPartial, FetchProvider, Field, FieldOrientation, type FieldProps, FieldVariant, Flex, FlipCard, Form, Grid, HoverCard, HttpClient, Icon, type IconNameT, IconNames, Image, InfinityScroll, type InfinityScrollProps, Input, InputColor, type InputFieldProps, InputFile, InputPassword, type KeyValuesOf, LightTheme, Line, LineOrientation, LineStyle, LoaderIcons, Menu, type MenuOptionProps, Modal, ModalBackdrop, type ModalProps, type PaletteThemeEntity, Portal, Radio, Ripple, SectionLayout, Select, SimpleLoader, SlideCard, Slider, SmartTable, Switch, THEME, Tabs, Tag, Textarea, type ThemeColor, ThemeConstants, type ThemeConstantsEntity, type ThemeEntity, ThemeProvider, Tooltip, type TooltipProps, Typography, TypographyComponent, type TypographyEntity, type TypographyProps, TypographyVariant, TypographyVariants, TypographyVariantsClassNames, TypographyVariantsElements, TypographyWeight, useAccordionItem, useFetch, useMyTheme };
|