@infinityloop.labs/ui-kit 0.0.10 → 0.0.12
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/atoms/Breadcrumbs/index.d.ts +1 -0
- package/dist/components/atoms/Button/index.d.ts +21 -10
- package/dist/components/atoms/Calendar/index.d.ts +19 -0
- package/dist/components/atoms/Dropdown/index.d.ts +39 -0
- package/dist/components/atoms/Image/index.d.ts +53 -0
- package/dist/components/atoms/Input/index.d.ts +38 -1
- package/dist/components/atoms/Paper/index.d.ts +36 -3
- package/dist/components/atoms/Tag/index.d.ts +16 -0
- package/dist/components/atoms/Timer/index.d.ts +20 -0
- package/dist/components/atoms/Toggle/index.d.ts +9 -0
- package/dist/components/atoms/Typography/index.d.ts +16 -5
- package/dist/components/atoms/index.d.ts +7 -0
- package/dist/components/atoms/shared/calendar-picker.d.ts +42 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/molecules/Accordion/index.d.ts +27 -0
- package/dist/components/molecules/CodeBrick/index.d.ts +80 -0
- package/dist/components/molecules/CodeBrick/lib/highlight.d.ts +2 -0
- package/dist/components/molecules/EditableTypography/index.d.ts +21 -0
- package/dist/components/molecules/MathEquationBlock/index.d.ts +14 -0
- package/dist/components/molecules/SlideTemplates/StoreSlide/index.d.ts +46 -0
- package/dist/components/molecules/SlideTemplates/index.d.ts +1 -0
- package/dist/components/molecules/Slider/index.d.ts +19 -0
- package/dist/components/molecules/Slider/slides/BigHorizontalSlide.d.ts +15 -0
- package/dist/components/molecules/Slider/slides/MediumHorizontalSlide.d.ts +10 -0
- package/dist/components/molecules/Slider/slides/MediumVerticalSlide.d.ts +4 -0
- package/dist/components/molecules/Slider/slides/examples.d.ts +35 -0
- package/dist/components/molecules/Slider/slides/index.d.ts +4 -0
- package/dist/components/molecules/index.d.ts +7 -0
- package/dist/components/templates/TableLight/TableLight.d.ts +23 -0
- package/dist/components/templates/TableLight/index.d.ts +1 -0
- package/dist/components/templates/index.d.ts +1 -0
- package/dist/components/ui/breadcrumbs.d.ts +18 -0
- package/dist/components/ui/index.d.ts +2 -1
- package/dist/components/ui/shadcn-io/color-picker/index.d.ts +1 -1
- package/dist/constants/css.d.ts +4 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +46943 -7237
- package/dist/index.umd.js +287 -35
- package/dist/style.css +1 -1
- package/package.json +29 -6
- package/dist/components/ui/button.d.ts +0 -10
- package/dist/components/ui/input.d.ts +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Breadcrumbs, type BreadcrumbsItemObjectType, type BreadcrumbsItemType, } from '../../ui/breadcrumbs';
|
|
@@ -1,10 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
declare
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { ButtonHTMLAttributes, MouseEvent, PropsWithChildren, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
type ButtonAnimationType = 'default' | 'active' | 'loading';
|
|
4
|
+
type ButtonSizeType = 's' | 'm' | 'l' | 'icon-s' | 'icon-m' | 'icon-l' | 'default' | 'sm' | 'lg' | 'icon' | 'icon-sm' | 'icon-lg' | 'icon-circle';
|
|
5
|
+
export declare const BUTTON_VARIANT_OPTIONS: readonly ["filled", "outline", "text"];
|
|
6
|
+
export type ButtonVariantType = (typeof BUTTON_VARIANT_OPTIONS)[number];
|
|
7
|
+
export declare const BUTTON_COLOR_OPTIONS: readonly ["primary", "secondary", "accent", "muted", "constructive", "cautionary", "destructive", "chart-1", "chart-2", "chart-3", "chart-4", "chart-5"];
|
|
8
|
+
export type ButtonColorType = (typeof BUTTON_COLOR_OPTIONS)[number];
|
|
9
|
+
type ButtonPropertyType = PropsWithChildren<ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
leftIcon?: ReactNode;
|
|
12
|
+
rightIcon?: ReactNode;
|
|
13
|
+
onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
14
|
+
animation?: ButtonAnimationType;
|
|
15
|
+
isLoading?: boolean;
|
|
16
|
+
color?: ButtonColorType;
|
|
17
|
+
variant?: ButtonVariantType;
|
|
18
|
+
size?: ButtonSizeType;
|
|
19
|
+
}>;
|
|
20
|
+
export declare const Button: ({ icon, leftIcon, rightIcon, onClick, animation, isLoading, color, variant, size, className, children, style, ...property }: ButtonPropertyType) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DayPicker } from 'react-day-picker';
|
|
2
|
+
import { CalendarPickerSelectionScopeType } from '../shared/calendar-picker';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
type DayPickerPropertyType = React.ComponentProps<typeof DayPicker>;
|
|
5
|
+
type CalendarModeType = 'single' | 'range' | 'ranged';
|
|
6
|
+
export type CalendarPropertyType = Omit<DayPickerPropertyType, 'mode'> & {
|
|
7
|
+
mode?: CalendarModeType;
|
|
8
|
+
selectionScope?: CalendarPickerSelectionScopeType;
|
|
9
|
+
selected?: any;
|
|
10
|
+
onSelect?: (...args: any[]) => void;
|
|
11
|
+
isLoading?: boolean;
|
|
12
|
+
value?: unknown;
|
|
13
|
+
onChange?: (...args: any[]) => void;
|
|
14
|
+
};
|
|
15
|
+
export declare const Calendar: {
|
|
16
|
+
({ className, classNames, isLoading, showOutsideDays, fixedWeeks, value, onChange, month, onMonthChange, onDayClick, mode, selectionScope, ...props }: CalendarPropertyType): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
displayName: string;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { CalendarPropertyType } from '../Calendar';
|
|
2
|
+
import { CalendarPickerCalendarSlotPropertyType, CalendarPickerControlStatePropertyType, CalendarPickerPopoverSlotPropertyType } from '../shared/calendar-picker';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
export type DropdownOptionType = {
|
|
5
|
+
value: string;
|
|
6
|
+
label: string;
|
|
7
|
+
};
|
|
8
|
+
type DropdownListPropertyType = Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> & {
|
|
9
|
+
type?: 'default';
|
|
10
|
+
popoverComponent?: React.ComponentType<{
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
}>;
|
|
13
|
+
options: DropdownOptionType[];
|
|
14
|
+
value?: string;
|
|
15
|
+
defaultValue?: string;
|
|
16
|
+
onValueChange?: (value: string) => void;
|
|
17
|
+
label?: React.ReactNode;
|
|
18
|
+
required?: boolean;
|
|
19
|
+
isError?: boolean;
|
|
20
|
+
errorText?: React.ReactNode;
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
isSearchable?: boolean;
|
|
23
|
+
searchPlaceholder?: string;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
emptyText?: string;
|
|
26
|
+
};
|
|
27
|
+
export type DropdownCalendarPropertyType = Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> & Omit<CalendarPropertyType, 'mode' | 'value' | 'onChange' | 'selected' | 'onSelect'> & CalendarPickerControlStatePropertyType & CalendarPickerPopoverSlotPropertyType & CalendarPickerCalendarSlotPropertyType<CalendarPropertyType> & {
|
|
28
|
+
label?: React.ReactNode;
|
|
29
|
+
isRequired?: boolean;
|
|
30
|
+
isError?: boolean;
|
|
31
|
+
errorText?: React.ReactNode;
|
|
32
|
+
triggerClassName?: string;
|
|
33
|
+
};
|
|
34
|
+
export type DropdownPropertyType = DropdownListPropertyType | (DropdownCalendarPropertyType & {
|
|
35
|
+
type: 'calendar';
|
|
36
|
+
});
|
|
37
|
+
export declare const Dropdown: (property: DropdownPropertyType) => import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export declare const DropdownCalendar: ({ className, triggerClassName, label, isRequired, isError, errorText, placeholder, mode, selectionScope, value, defaultValue, onChange, isOpen, isOpenByDefault, onIsOpenChange, disabled, isLoading, popoverComponent: PopoverComponent, calendarComponent: CalendarComponent, numberOfMonths, ...calendarProperty }: DropdownCalendarPropertyType) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { TypographyColorType } from '../Typography';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export declare const IMAGE_MASK_OPTIONS: readonly [{
|
|
4
|
+
readonly value: 0;
|
|
5
|
+
readonly label: "No Mask";
|
|
6
|
+
}, {
|
|
7
|
+
readonly value: 1;
|
|
8
|
+
readonly label: "Octagon Crop";
|
|
9
|
+
}, {
|
|
10
|
+
readonly value: 2;
|
|
11
|
+
readonly label: "Circle Crop";
|
|
12
|
+
}, {
|
|
13
|
+
readonly value: 3;
|
|
14
|
+
readonly label: "Square Crop";
|
|
15
|
+
}];
|
|
16
|
+
export type ImageMaskType = (typeof IMAGE_MASK_OPTIONS)[number]['value'];
|
|
17
|
+
export declare const IMAGE_SIDE_SHADE_SIDE_OPTIONS: readonly ["left", "right"];
|
|
18
|
+
export type ImageSideShadeSideType = (typeof IMAGE_SIDE_SHADE_SIDE_OPTIONS)[number];
|
|
19
|
+
export type ImageMaskPositionValueType = {
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
};
|
|
23
|
+
export type ImageCropPositionValueType = {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
};
|
|
27
|
+
export declare const getImageMaskUrlByType: (maskType: number) => string | undefined;
|
|
28
|
+
export type ImagePropertyType = Omit<React.ImgHTMLAttributes<HTMLImageElement>, 'className'> & {
|
|
29
|
+
className?: string;
|
|
30
|
+
isLoading?: boolean;
|
|
31
|
+
maskType?: ImageMaskType;
|
|
32
|
+
isEditModeDisabled?: boolean;
|
|
33
|
+
imagePosition?: string;
|
|
34
|
+
isSquareCrop?: boolean;
|
|
35
|
+
cropX?: number;
|
|
36
|
+
cropY?: number;
|
|
37
|
+
cropPositionValue?: ImageCropPositionValueType;
|
|
38
|
+
defaultCropPositionValue?: ImageCropPositionValueType;
|
|
39
|
+
onCropPositionChange?: (value: ImageCropPositionValueType) => void;
|
|
40
|
+
maskSize?: string;
|
|
41
|
+
maskPositionValue?: ImageMaskPositionValueType;
|
|
42
|
+
maskFillColor?: string;
|
|
43
|
+
maskStrokeColor?: string;
|
|
44
|
+
maskStrokeWidth?: number;
|
|
45
|
+
isTopShadeVisible?: boolean;
|
|
46
|
+
topShadeColor?: string;
|
|
47
|
+
isBottomShadeVisible?: boolean;
|
|
48
|
+
bottomShadeColor?: string;
|
|
49
|
+
isSideShadeVisible?: boolean;
|
|
50
|
+
sideShadeSide?: ImageSideShadeSideType;
|
|
51
|
+
sideShadeColorToken?: TypographyColorType;
|
|
52
|
+
};
|
|
53
|
+
export declare const Image: ({ className, isLoading, maskType, isEditModeDisabled, imagePosition, isSquareCrop, cropX, cropY, cropPositionValue, defaultCropPositionValue, onCropPositionChange, maskSize, maskPositionValue, maskFillColor, maskStrokeColor, maskStrokeWidth, isTopShadeVisible, topShadeColor, isBottomShadeVisible, bottomShadeColor, isSideShadeVisible, sideShadeSide, sideShadeColorToken, alt, style, ...property }: ImagePropertyType) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,40 @@
|
|
|
1
|
+
import { CalendarPropertyType } from '../Calendar';
|
|
2
|
+
import { CalendarPickerCalendarSlotPropertyType, CalendarPickerControlStatePropertyType, CalendarPickerPopoverSlotPropertyType } from '../shared/calendar-picker';
|
|
3
|
+
import { TypographyType } from '../Typography';
|
|
1
4
|
import * as React from 'react';
|
|
2
|
-
|
|
5
|
+
export type InputVariantType = 'outline' | 'text';
|
|
6
|
+
type InputSharedPropertyType = {
|
|
7
|
+
className?: string;
|
|
8
|
+
variant?: InputVariantType;
|
|
9
|
+
typography?: TypographyType;
|
|
10
|
+
isTextarea?: boolean;
|
|
11
|
+
isResizableX?: boolean;
|
|
12
|
+
isResizableY?: boolean;
|
|
13
|
+
textareaRowsCount?: number;
|
|
14
|
+
isError?: boolean;
|
|
15
|
+
label?: React.ReactNode;
|
|
16
|
+
errorText?: React.ReactNode;
|
|
17
|
+
};
|
|
18
|
+
type SingleLineInputPropertyType = InputSharedPropertyType & React.ComponentProps<'input'> & {
|
|
19
|
+
isTextarea?: false;
|
|
20
|
+
};
|
|
21
|
+
type MultiLineInputPropertyType = InputSharedPropertyType & Omit<React.ComponentProps<'textarea'>, 'rows' | 'type'> & {
|
|
22
|
+
isTextarea: true;
|
|
23
|
+
};
|
|
24
|
+
type CalendarInputModePropertyType = InputCalendarPropertyType & {
|
|
25
|
+
type: 'calendar';
|
|
26
|
+
isTextarea?: false;
|
|
27
|
+
};
|
|
28
|
+
type InputPropertyType = SingleLineInputPropertyType | MultiLineInputPropertyType | CalendarInputModePropertyType;
|
|
29
|
+
export type InputCalendarPropertyType = Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> & Omit<CalendarPropertyType, 'mode' | 'value' | 'onChange' | 'selected' | 'onSelect'> & CalendarPickerControlStatePropertyType & CalendarPickerPopoverSlotPropertyType & CalendarPickerCalendarSlotPropertyType<CalendarPropertyType> & {
|
|
30
|
+
label?: React.ReactNode;
|
|
31
|
+
isRequired?: boolean;
|
|
32
|
+
isError?: boolean;
|
|
33
|
+
errorText?: React.ReactNode;
|
|
34
|
+
inputClassName?: string;
|
|
35
|
+
name?: string;
|
|
36
|
+
id?: string;
|
|
37
|
+
};
|
|
38
|
+
declare function Input(property: InputPropertyType): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export declare const InputCalendar: ({ className, inputClassName, label, isRequired, isError, errorText, placeholder, mode, selectionScope, value, defaultValue, onChange, isOpen, isOpenByDefault, onIsOpenChange, disabled, isLoading, popoverComponent: PopoverComponent, calendarComponent: CalendarComponent, numberOfMonths, name, id, ...calendarProperty }: InputCalendarPropertyType) => import("react/jsx-runtime").JSX.Element;
|
|
3
40
|
export { Input };
|
|
@@ -1,5 +1,38 @@
|
|
|
1
|
-
|
|
1
|
+
import { CSSProperties, ComponentPropsWithoutRef, ElementType, PropsWithChildren, ReactElement } from 'react';
|
|
2
|
+
|
|
3
|
+
declare const paperStyleDictionary: {
|
|
4
|
+
readonly light: "bg-(--card)";
|
|
5
|
+
readonly dark: "bg-(--background)";
|
|
6
|
+
readonly glass: "backdrop-blur-xl bg-opacity-95 bg-(--background)/5";
|
|
7
|
+
readonly transparent: "bg-transparent";
|
|
8
|
+
};
|
|
9
|
+
export type PaperType = keyof typeof paperStyleDictionary;
|
|
10
|
+
export declare const PAPER_RADIUS_CLASS_OPTIONS: readonly ["rounded-none", "rounded-sm", "rounded-md", "rounded-lg", "rounded-xl", "rounded-2xl", "rounded-3xl", "rounded-full", "rounded-(--radius)"];
|
|
11
|
+
export type PaperRadiusClassType = (typeof PAPER_RADIUS_CLASS_OPTIONS)[number];
|
|
12
|
+
export declare const PAPER_PATTERN_COLOR_OPTIONS: readonly ["chart-1", "chart-2", "chart-3", "chart-4", "chart-5"];
|
|
13
|
+
export type PaperPatternColorType = (typeof PAPER_PATTERN_COLOR_OPTIONS)[number];
|
|
14
|
+
export type PaperBasePropertyType<T extends ElementType> = {
|
|
15
|
+
as?: T;
|
|
16
|
+
type?: PaperType;
|
|
2
17
|
className?: string;
|
|
3
|
-
|
|
18
|
+
style?: CSSProperties;
|
|
19
|
+
isColored?: boolean;
|
|
20
|
+
isGradientEnabled?: boolean;
|
|
21
|
+
isBorderDisabled?: boolean;
|
|
22
|
+
isPaddingDisabled?: boolean;
|
|
23
|
+
radiusClassName?: PaperRadiusClassType;
|
|
24
|
+
isRoundedCornersDisabled?: boolean;
|
|
25
|
+
isLoading?: boolean;
|
|
26
|
+
patternIconComponent?: ElementType | ReactElement;
|
|
27
|
+
patternIconFile?: string;
|
|
28
|
+
patternColor?: PaperPatternColorType;
|
|
29
|
+
patternAngle?: number;
|
|
30
|
+
patternSize?: number | string;
|
|
31
|
+
patternGap?: number;
|
|
32
|
+
patternOpacity?: number;
|
|
33
|
+
isPatternFixed?: boolean;
|
|
4
34
|
};
|
|
5
|
-
export
|
|
35
|
+
export type PaperPropertyType<T extends ElementType = 'div'> = PropsWithChildren<PaperBasePropertyType<T> & Omit<ComponentPropsWithoutRef<T>, 'as' | 'className' | 'children' | 'style'>>;
|
|
36
|
+
declare const defaultElement = "div";
|
|
37
|
+
export declare const Paper: <T extends ElementType = typeof defaultElement>({ as, type, className, style, children, isColored, isGradientEnabled, isBorderDisabled, isPaddingDisabled, radiusClassName, isRoundedCornersDisabled, isLoading, patternIconComponent, patternIconFile, patternColor, patternAngle, patternSize, patternGap, patternOpacity, isPatternFixed, ...property }: PaperPropertyType<T>) => import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { TypographyColorType } from '../Typography';
|
|
3
|
+
|
|
4
|
+
export declare const TAG_TYPE_OPTIONS: readonly ["default", "time"];
|
|
5
|
+
export type TagType = (typeof TAG_TYPE_OPTIONS)[number];
|
|
6
|
+
export type TagPropertyType = HTMLAttributes<HTMLSpanElement> & {
|
|
7
|
+
label: string;
|
|
8
|
+
type?: TagType;
|
|
9
|
+
color?: TypographyColorType;
|
|
10
|
+
textColor?: TypographyColorType;
|
|
11
|
+
isLoading?: boolean;
|
|
12
|
+
isEditModeEnabled?: boolean;
|
|
13
|
+
isEditModeDisabled?: boolean;
|
|
14
|
+
onLabelChange?: (value: string) => void;
|
|
15
|
+
};
|
|
16
|
+
export declare const Tag: ({ label, type, color, textColor, className, isLoading, isEditModeEnabled, isEditModeDisabled, onLabelChange, ...property }: TagPropertyType) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
type TimerLabelsType = {
|
|
4
|
+
days: React.ReactNode;
|
|
5
|
+
hours: React.ReactNode;
|
|
6
|
+
minutes: React.ReactNode;
|
|
7
|
+
seconds: React.ReactNode;
|
|
8
|
+
};
|
|
9
|
+
export type TimerPropertyType = {
|
|
10
|
+
targetDate: Date | number | string;
|
|
11
|
+
className?: string;
|
|
12
|
+
itemClassName?: string;
|
|
13
|
+
labels?: Partial<TimerLabelsType>;
|
|
14
|
+
onComplete?: () => void;
|
|
15
|
+
};
|
|
16
|
+
export declare const Timer: {
|
|
17
|
+
({ targetDate, className, itemClassName, labels, onComplete, }: TimerPropertyType): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type TogglePropertyType = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'className'> & {
|
|
3
|
+
className?: string;
|
|
4
|
+
leftLabel?: React.ReactNode;
|
|
5
|
+
rightLabel?: React.ReactNode;
|
|
6
|
+
labelClassName?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const Toggle: ({ className, leftLabel, rightLabel, labelClassName, id, disabled, ...property }: TogglePropertyType) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -1,11 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { default as React, ElementType, HTMLAttributes } from 'react';
|
|
2
2
|
|
|
3
|
-
export type TypographyType = '
|
|
4
|
-
|
|
3
|
+
export type TypographyType = 'Heading' | 'SectionHeader' | 'CompactHeader' | 'Action' | 'Subheader' | 'Body' | 'BodySmall' | 'Caption' | 'CompactCaption';
|
|
4
|
+
export declare const TYPOGRAPHY_COLOR_OPTIONS: readonly ["background", "foreground", "card", "card-foreground", "popover", "popover-foreground", "muted-foreground", "muted", "primary", "primary-foreground", "secondary", "secondary-foreground", "accent", "accent-foreground", "destructive", "constructive", "constructive-foreground", "cautionary", "cautionary-foreground", "border", "input", "ring", "chart-1", "chart-2", "chart-3", "chart-4", "chart-5"];
|
|
5
|
+
export type TypographyColorType = (typeof TYPOGRAPHY_COLOR_OPTIONS)[number];
|
|
6
|
+
export declare const TYPOGRAPHY_OPTIONS: TypographyType[];
|
|
7
|
+
export declare const getTypographyClassName: (typography: TypographyType) => string;
|
|
8
|
+
export declare const getDefaultElementTagByTypography: (typography: TypographyType) => "h1" | "h4" | "h5" | "p" | "span";
|
|
9
|
+
export declare const getDefaultColorByTypography: (typography: TypographyType) => "foreground" | "muted-foreground";
|
|
10
|
+
export declare const getPlaceholderTypographyClassName: (typography: TypographyType) => string;
|
|
5
11
|
type OwnPropertyType = {
|
|
6
12
|
typography: TypographyType;
|
|
7
13
|
element?: ElementType;
|
|
14
|
+
color?: TypographyColorType;
|
|
8
15
|
className?: string;
|
|
9
|
-
|
|
10
|
-
|
|
16
|
+
isLoading?: boolean;
|
|
17
|
+
} & HTMLAttributes<HTMLElement>;
|
|
18
|
+
export declare const Typography: {
|
|
19
|
+
({ typography, element, color, style, className: clsname, isLoading, children, ...props }: OwnPropertyType): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
11
22
|
export {};
|
|
@@ -2,5 +2,12 @@ export * from './Flex';
|
|
|
2
2
|
export * from './Grid';
|
|
3
3
|
export * from './Typography';
|
|
4
4
|
export * from './Paper';
|
|
5
|
+
export * from './Breadcrumbs';
|
|
5
6
|
export * from './Button';
|
|
6
7
|
export * from './Input';
|
|
8
|
+
export * from './Dropdown';
|
|
9
|
+
export * from './Toggle';
|
|
10
|
+
export * from './Image';
|
|
11
|
+
export * from './Timer';
|
|
12
|
+
export * from './Tag';
|
|
13
|
+
export * from './Calendar';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { DateRange } from 'react-day-picker';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export type CalendarPickerModeType = 'single' | 'range' | 'ranged';
|
|
4
|
+
export type CalendarPickerSelectionScopeType = 'date' | 'month' | 'monthYear';
|
|
5
|
+
export type CalendarSelectionType = Date | DateRange | undefined;
|
|
6
|
+
export type CalendarPickerControlStatePropertyType = {
|
|
7
|
+
mode?: CalendarPickerModeType;
|
|
8
|
+
selectionScope?: CalendarPickerSelectionScopeType;
|
|
9
|
+
value?: CalendarSelectionType;
|
|
10
|
+
defaultValue?: CalendarSelectionType;
|
|
11
|
+
onChange?: (value: CalendarSelectionType) => void;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
isOpen?: boolean;
|
|
14
|
+
isOpenByDefault?: boolean;
|
|
15
|
+
onIsOpenChange?: (isOpen: boolean) => void;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
isLoading?: boolean;
|
|
18
|
+
};
|
|
19
|
+
export type CalendarPickerCalendarSlotPropertyType<CalendarComponentPropertyType> = {
|
|
20
|
+
calendarComponent?: React.ComponentType<CalendarComponentPropertyType>;
|
|
21
|
+
};
|
|
22
|
+
export type CalendarPickerPopoverSlotPropertyType = {
|
|
23
|
+
popoverComponent?: React.ComponentType<{
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
}>;
|
|
26
|
+
};
|
|
27
|
+
export declare const isDateRangeValue: (value: CalendarSelectionType) => value is DateRange;
|
|
28
|
+
export declare const normalizeCalendarPickerMode: (mode: CalendarPickerModeType) => "single" | "range";
|
|
29
|
+
export declare const formatCalendarValue: ({ mode, selectionScope, value, placeholder, }: {
|
|
30
|
+
mode: CalendarPickerModeType;
|
|
31
|
+
selectionScope?: CalendarPickerSelectionScopeType;
|
|
32
|
+
value: CalendarSelectionType;
|
|
33
|
+
placeholder: string;
|
|
34
|
+
}) => string;
|
|
35
|
+
export declare const usePickerOpenState: <PropertyType extends {
|
|
36
|
+
isOpen?: boolean;
|
|
37
|
+
isOpenByDefault?: boolean;
|
|
38
|
+
}>(property: PropertyType, onIsOpenChange?: (isOpen: boolean) => void) => {
|
|
39
|
+
isOpen: boolean;
|
|
40
|
+
setIsOpen: (nextIsOpen: boolean) => void;
|
|
41
|
+
};
|
|
42
|
+
export declare const useOutsideDismiss: (rootReference: React.RefObject<HTMLElement | null>, isOpen: boolean, onDismiss: () => void) => void;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { TypographyColorType, TypographyType } from '../../atoms/Typography';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export declare const ACCORDION_PAPER_TYPE_OPTIONS: readonly ["dark", "light", "glass", "transparent"];
|
|
4
|
+
export type AccordionPaperType = (typeof ACCORDION_PAPER_TYPE_OPTIONS)[number];
|
|
5
|
+
export type AccordionPropertyType = Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> & {
|
|
6
|
+
title?: React.ReactNode;
|
|
7
|
+
content?: React.ReactNode;
|
|
8
|
+
isOpen?: boolean;
|
|
9
|
+
isOpenByDefault?: boolean;
|
|
10
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
11
|
+
isToggleDisabled?: boolean;
|
|
12
|
+
isLoading?: boolean;
|
|
13
|
+
isEditModeEnabled?: boolean;
|
|
14
|
+
isEditModeDisabled?: boolean;
|
|
15
|
+
onTitleChange?: (value: string) => void;
|
|
16
|
+
onContentChange?: (value: string) => void;
|
|
17
|
+
titleTypography?: TypographyType;
|
|
18
|
+
contentTypography?: TypographyType;
|
|
19
|
+
titleColor?: TypographyColorType;
|
|
20
|
+
contentColor?: TypographyColorType;
|
|
21
|
+
titlePlaceholder?: string;
|
|
22
|
+
contentPlaceholder?: string;
|
|
23
|
+
paperType?: AccordionPaperType;
|
|
24
|
+
isPaperColored?: boolean;
|
|
25
|
+
isRoundedCornersDisabled?: boolean;
|
|
26
|
+
};
|
|
27
|
+
export declare const Accordion: ({ className, title, content, children, isOpen, isOpenByDefault, onOpenChange, isToggleDisabled, isLoading, isEditModeEnabled, isEditModeDisabled, onTitleChange, onContentChange, titleTypography, contentTypography, titleColor, contentColor, titlePlaceholder, contentPlaceholder, paperType, isPaperColored, isRoundedCornersDisabled, ...property }: AccordionPropertyType) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { PaperPropertyType } from '../../atoms/Paper';
|
|
3
|
+
import { TypographyColorType } from '../../atoms/Typography';
|
|
4
|
+
|
|
5
|
+
type CodeBrickBadSmellType = {
|
|
6
|
+
pattern: string;
|
|
7
|
+
message: string;
|
|
8
|
+
};
|
|
9
|
+
export type CodeBrickHintStatusType = 'success' | 'warn' | 'error';
|
|
10
|
+
export type CodeBrickHintType = {
|
|
11
|
+
id: string;
|
|
12
|
+
value: string;
|
|
13
|
+
status: CodeBrickHintStatusType;
|
|
14
|
+
};
|
|
15
|
+
type CodeBrickHintStatusColorsType = {
|
|
16
|
+
success: TypographyColorType;
|
|
17
|
+
warn: TypographyColorType;
|
|
18
|
+
error: TypographyColorType;
|
|
19
|
+
};
|
|
20
|
+
type CodeBrickCommonPropertyType = {
|
|
21
|
+
title?: string;
|
|
22
|
+
onTitleChange?: (value: string) => void;
|
|
23
|
+
subtitle?: string;
|
|
24
|
+
onSubtitleChange?: (value: string) => void;
|
|
25
|
+
hintsLabel?: string;
|
|
26
|
+
onHintsLabelChange?: (value: string) => void;
|
|
27
|
+
bufferLabel?: string;
|
|
28
|
+
onBufferLabelChange?: (value: string) => void;
|
|
29
|
+
bufferHelperText?: string;
|
|
30
|
+
onBufferHelperTextChange?: (value: string) => void;
|
|
31
|
+
hints?: ReadonlyArray<string | CodeBrickHintType>;
|
|
32
|
+
hintStatusColors?: Partial<CodeBrickHintStatusColorsType>;
|
|
33
|
+
onHintsChange?: (hints: CodeBrickHintType[]) => void;
|
|
34
|
+
onHintValueChange?: (index: number, value: string) => void;
|
|
35
|
+
onHintStatusChange?: (index: number, status: CodeBrickHintStatusType) => void;
|
|
36
|
+
onHintAdd?: (hint: CodeBrickHintType, nextHints: CodeBrickHintType[]) => void;
|
|
37
|
+
onHintRemove?: (index: number, removedHint: CodeBrickHintType, nextHints: CodeBrickHintType[]) => void;
|
|
38
|
+
activeHintIndex?: number;
|
|
39
|
+
onActiveHintIndexChange?: (index: number) => void;
|
|
40
|
+
initialCode?: string;
|
|
41
|
+
language?: string;
|
|
42
|
+
isEditMode?: boolean;
|
|
43
|
+
isEditModeDisabled?: boolean;
|
|
44
|
+
badSmells?: ReadonlyArray<CodeBrickBadSmellType>;
|
|
45
|
+
};
|
|
46
|
+
type CodeBrickPlaygroundPropertyType = CodeBrickCommonPropertyType;
|
|
47
|
+
export type CodeBrickSnippetType = {
|
|
48
|
+
id: string;
|
|
49
|
+
code: string;
|
|
50
|
+
language: string;
|
|
51
|
+
};
|
|
52
|
+
type CodeBrickNormalizedSnippetType = {
|
|
53
|
+
code: string;
|
|
54
|
+
language: string;
|
|
55
|
+
};
|
|
56
|
+
export type CodeBrickDraftPropertyType = CodeBrickCommonPropertyType & {
|
|
57
|
+
codeSnippets: CodeBrickSnippetType[];
|
|
58
|
+
activeSnippetId: string;
|
|
59
|
+
normalizedCodeSnippets: CodeBrickNormalizedSnippetType[];
|
|
60
|
+
activeSnippet?: CodeBrickSnippetType;
|
|
61
|
+
languagePlaceholder?: string;
|
|
62
|
+
snippetPlaceholder?: string;
|
|
63
|
+
actionButtonLabel?: string;
|
|
64
|
+
isCodeBlockLoading?: boolean;
|
|
65
|
+
isUpdateCodeBlockLoading?: boolean;
|
|
66
|
+
isEditMode?: boolean;
|
|
67
|
+
isEditModeDisabled?: boolean;
|
|
68
|
+
onAddCodeSnippetTabHandler: VoidFunction;
|
|
69
|
+
onRemoveCodeSnippetTabHandler: (snippetId: string) => void;
|
|
70
|
+
onSelectCodeSnippetTabHandler: (snippetId: string) => void;
|
|
71
|
+
onChangeCodeSnippetValueHandler: (value: string) => void;
|
|
72
|
+
onChangeCodeSnippetLanguageHandler: (value: string) => void;
|
|
73
|
+
onCreateCodeBlockHandler?: VoidFunction;
|
|
74
|
+
onUpdateCodeBlockHandler?: VoidFunction;
|
|
75
|
+
};
|
|
76
|
+
type CodeBrickVariantPropertyType = CodeBrickPlaygroundPropertyType | CodeBrickDraftPropertyType;
|
|
77
|
+
export type CodeBrickPropertyType = CodeBrickVariantPropertyType & Omit<PaperPropertyType<'div'>, 'children'>;
|
|
78
|
+
export declare const Code: FC<CodeBrickPropertyType>;
|
|
79
|
+
export declare const CodeBrick: FC<CodeBrickPropertyType>;
|
|
80
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ElementType } from 'react';
|
|
2
|
+
import { TypographyColorType, TypographyType } from '../../atoms/Typography';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
type EditableTypographyPropertyType = {
|
|
5
|
+
className?: string;
|
|
6
|
+
contentClassName?: string;
|
|
7
|
+
typography?: TypographyType;
|
|
8
|
+
element?: ElementType;
|
|
9
|
+
color?: TypographyColorType;
|
|
10
|
+
isEditModeDisabled?: boolean;
|
|
11
|
+
isEditModeOn?: boolean;
|
|
12
|
+
isLoading?: boolean;
|
|
13
|
+
value?: string;
|
|
14
|
+
defaultValue?: string;
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
onValueChange?: (value: string) => void;
|
|
17
|
+
onEditModeChange?: (isEditModeOn: boolean) => void;
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
};
|
|
20
|
+
export declare const EditableTypography: ({ className, contentClassName, typography, element, color, isEditModeDisabled, isEditModeOn, isLoading, value, defaultValue, placeholder, onValueChange, onEditModeChange, children, }: EditableTypographyPropertyType) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { PaperPropertyType } from '../../atoms/Paper';
|
|
3
|
+
|
|
4
|
+
export type MathEquationBlockPropertyType = {
|
|
5
|
+
title: string;
|
|
6
|
+
value: string;
|
|
7
|
+
isEditMode: boolean;
|
|
8
|
+
isSubmitting?: boolean;
|
|
9
|
+
actionLabel?: string;
|
|
10
|
+
onChangeTitle?: (value: string) => void;
|
|
11
|
+
onChangeValue?: (value: string) => void;
|
|
12
|
+
onSubmit?: VoidFunction;
|
|
13
|
+
} & Omit<PaperPropertyType<'div'>, 'children'>;
|
|
14
|
+
export declare const MathEquationBlock: FC<MathEquationBlockPropertyType>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ImagePropertyType } from '../../../atoms/Image';
|
|
2
|
+
import { TagType } from '../../../atoms/Tag';
|
|
3
|
+
import { TypographyColorType } from '../../../atoms/Typography';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
export type StoreSlideImageChangePayloadType = {
|
|
6
|
+
file: File;
|
|
7
|
+
objectUrl: string;
|
|
8
|
+
};
|
|
9
|
+
export type StoreSlideTagItemType = {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
type?: TagType;
|
|
13
|
+
position?: 'top-left' | 'bottom-right';
|
|
14
|
+
color?: TypographyColorType;
|
|
15
|
+
textColor?: TypographyColorType;
|
|
16
|
+
isLoading?: boolean;
|
|
17
|
+
onClick?: (id: string) => void;
|
|
18
|
+
onLabelChange?: (id: string, value: string) => void;
|
|
19
|
+
};
|
|
20
|
+
export type StoreSlidePropertyType = Omit<React.HTMLAttributes<HTMLElement>, 'title'> & {
|
|
21
|
+
isSetModeEnabled?: boolean;
|
|
22
|
+
isEditModeEnabled?: boolean;
|
|
23
|
+
isEditModeDisabled?: boolean;
|
|
24
|
+
setModelEnabled?: boolean;
|
|
25
|
+
coverImageSrc: string;
|
|
26
|
+
coverImageAlt?: string;
|
|
27
|
+
isImageLoading?: boolean;
|
|
28
|
+
imageProps?: Omit<ImagePropertyType, 'src' | 'alt' | 'className'>;
|
|
29
|
+
imageAccept?: string;
|
|
30
|
+
onImageChange?: (payload: StoreSlideImageChangePayloadType) => void;
|
|
31
|
+
brandName: React.ReactNode;
|
|
32
|
+
brandIcon?: React.ReactNode;
|
|
33
|
+
heading: React.ReactNode;
|
|
34
|
+
accentText?: React.ReactNode;
|
|
35
|
+
description?: React.ReactNode;
|
|
36
|
+
priceText: React.ReactNode;
|
|
37
|
+
tagText?: string;
|
|
38
|
+
tagType?: TagType;
|
|
39
|
+
tagColor?: TypographyColorType;
|
|
40
|
+
tagTextColor?: TypographyColorType;
|
|
41
|
+
tags?: StoreSlideTagItemType[];
|
|
42
|
+
onTagClick?: (id: string) => void;
|
|
43
|
+
onTagLabelChange?: (id: string, value: string) => void;
|
|
44
|
+
badgeText?: React.ReactNode;
|
|
45
|
+
};
|
|
46
|
+
export declare const StoreSlide: ({ className, isSetModeEnabled, isEditModeEnabled, isEditModeDisabled, setModelEnabled, coverImageSrc, coverImageAlt, isImageLoading, imageProps, imageAccept, onImageChange, brandName, brandIcon, heading, accentText, description, priceText, tagText, tagType, tagColor, tagTextColor, tags, onTagClick, onTagLabelChange, badgeText, ...property }: StoreSlidePropertyType) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './StoreSlide';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type SliderPropertyType = Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> & {
|
|
3
|
+
slides?: React.ReactNode[];
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
slidesPerView?: number | 'auto';
|
|
6
|
+
spaceBetween?: number;
|
|
7
|
+
isLoopEnabled?: boolean;
|
|
8
|
+
isPaginationVisible?: boolean;
|
|
9
|
+
isNavigationVisible?: boolean;
|
|
10
|
+
isNavigationEnabled?: boolean;
|
|
11
|
+
isArrowsVisible?: boolean;
|
|
12
|
+
isMousewheelEnabled?: boolean;
|
|
13
|
+
isKeyboardEnabled?: boolean;
|
|
14
|
+
isGrabCursorVisible?: boolean;
|
|
15
|
+
isFreeScrollEnabled?: boolean;
|
|
16
|
+
activeSlideIndex?: number;
|
|
17
|
+
onSlideChange?: (activeSlideIndex: number) => void;
|
|
18
|
+
};
|
|
19
|
+
export declare const Slider: ({ slides, children, className, slidesPerView, spaceBetween, isLoopEnabled, isPaginationVisible, isNavigationVisible, isNavigationEnabled, isArrowsVisible, isMousewheelEnabled, isKeyboardEnabled, isGrabCursorVisible, isFreeScrollEnabled, activeSlideIndex, onSlideChange, style, ...property }: SliderPropertyType) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { StoreSlideTagItemType } from '../../SlideTemplates';
|
|
2
|
+
|
|
3
|
+
export type BigHorizontalSlidePropertyType = {
|
|
4
|
+
coverImageSrc: string;
|
|
5
|
+
brandName: string;
|
|
6
|
+
heading: string;
|
|
7
|
+
description: string;
|
|
8
|
+
tagText?: string;
|
|
9
|
+
tags?: StoreSlideTagItemType[];
|
|
10
|
+
isEditModeEnabled?: boolean;
|
|
11
|
+
isEditModeDisabled?: boolean;
|
|
12
|
+
onTagClick?: (id: string) => void;
|
|
13
|
+
onTagLabelChange?: (id: string, value: string) => void;
|
|
14
|
+
};
|
|
15
|
+
export declare const BigHorizontalSlide: ({ coverImageSrc, brandName, heading, description, tagText, tags, isEditModeEnabled, isEditModeDisabled, onTagClick, onTagLabelChange, }: BigHorizontalSlidePropertyType) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type MediumHorizontalSlidePropertyType = {
|
|
2
|
+
coverImageSrc: string;
|
|
3
|
+
brandName: string;
|
|
4
|
+
heading: string;
|
|
5
|
+
viewsText: string;
|
|
6
|
+
tagText?: string;
|
|
7
|
+
isEditModeEnabled?: boolean;
|
|
8
|
+
isEditModeDisabled?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare const MediumHorizontalSlide: ({ coverImageSrc, brandName, heading, viewsText, tagText, isEditModeEnabled, isEditModeDisabled, }: MediumHorizontalSlidePropertyType) => import("react/jsx-runtime").JSX.Element;
|