@infinityloop.labs/ui-kit 0.0.11 → 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.
Files changed (39) hide show
  1. package/dist/components/atoms/Breadcrumbs/index.d.ts +1 -1
  2. package/dist/components/atoms/Button/index.d.ts +2 -1
  3. package/dist/components/atoms/Calendar/index.d.ts +19 -0
  4. package/dist/components/atoms/Dropdown/index.d.ts +19 -2
  5. package/dist/components/atoms/Flex/index.d.ts +4 -3
  6. package/dist/components/atoms/Grid/index.d.ts +3 -2
  7. package/dist/components/atoms/Image/index.d.ts +7 -1
  8. package/dist/components/atoms/Input/index.d.ts +18 -2
  9. package/dist/components/atoms/Paper/index.d.ts +25 -6
  10. package/dist/components/atoms/Tag/index.d.ts +3 -2
  11. package/dist/components/atoms/Timer/index.d.ts +2 -1
  12. package/dist/components/atoms/Typography/index.d.ts +2 -1
  13. package/dist/components/atoms/index.d.ts +1 -0
  14. package/dist/components/atoms/shared/calendar-picker.d.ts +42 -0
  15. package/dist/components/index.d.ts +1 -0
  16. package/dist/components/molecules/Accordion/index.d.ts +27 -0
  17. package/dist/components/molecules/CodeBrick/index.d.ts +80 -0
  18. package/dist/components/molecules/CodeBrick/lib/highlight.d.ts +2 -0
  19. package/dist/components/molecules/EditableTypography/index.d.ts +6 -3
  20. package/dist/components/molecules/MathEquationBlock/index.d.ts +14 -0
  21. package/dist/components/molecules/SlideTemplates/StoreSlide/index.d.ts +3 -3
  22. package/dist/components/molecules/Slider/index.d.ts +5 -4
  23. package/dist/components/molecules/Slider/slides/BigHorizontalSlide.d.ts +15 -0
  24. package/dist/components/molecules/Slider/slides/MediumVerticalSlide.d.ts +2 -1
  25. package/dist/components/molecules/Slider/slides/examples.d.ts +8 -4
  26. package/dist/components/molecules/Slider/slides/index.d.ts +1 -0
  27. package/dist/components/molecules/index.d.ts +3 -0
  28. package/dist/components/templates/TableLight/TableLight.d.ts +23 -0
  29. package/dist/components/templates/TableLight/index.d.ts +1 -0
  30. package/dist/components/templates/index.d.ts +1 -0
  31. package/dist/components/ui/index.d.ts +1 -1
  32. package/dist/components/ui/shadcn-io/color-picker/index.d.ts +6 -5
  33. package/dist/constants/index.d.ts +1 -1
  34. package/dist/index.d.ts +1 -0
  35. package/dist/index.es.js +46117 -11995
  36. package/dist/index.umd.js +283 -36
  37. package/dist/lib/utils.d.ts +2 -1
  38. package/dist/style.css +1 -1
  39. package/package.json +24 -9
@@ -1 +1 @@
1
- export { Breadcrumbs, type BreadcrumbsItemObjectType, type BreadcrumbsItemType, } from '../../../components/ui/breadcrumbs';
1
+ export { Breadcrumbs, type BreadcrumbsItemObjectType, type BreadcrumbsItemType, } from '../../ui/breadcrumbs';
@@ -1,4 +1,5 @@
1
- import type { ButtonHTMLAttributes, MouseEvent, PropsWithChildren, ReactNode } from 'react';
1
+ import { ButtonHTMLAttributes, MouseEvent, PropsWithChildren, ReactNode } from 'react';
2
+
2
3
  type ButtonAnimationType = 'default' | 'active' | 'loading';
3
4
  type ButtonSizeType = 's' | 'm' | 'l' | 'icon-s' | 'icon-m' | 'icon-l' | 'default' | 'sm' | 'lg' | 'icon' | 'icon-sm' | 'icon-lg' | 'icon-circle';
4
5
  export declare const BUTTON_VARIANT_OPTIONS: readonly ["filled", "outline", "text"];
@@ -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 {};
@@ -1,9 +1,15 @@
1
+ import { CalendarPropertyType } from '../Calendar';
2
+ import { CalendarPickerCalendarSlotPropertyType, CalendarPickerControlStatePropertyType, CalendarPickerPopoverSlotPropertyType } from '../shared/calendar-picker';
1
3
  import * as React from 'react';
2
4
  export type DropdownOptionType = {
3
5
  value: string;
4
6
  label: string;
5
7
  };
6
- type DropdownPropertyType = Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> & {
8
+ type DropdownListPropertyType = Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> & {
9
+ type?: 'default';
10
+ popoverComponent?: React.ComponentType<{
11
+ children: React.ReactNode;
12
+ }>;
7
13
  options: DropdownOptionType[];
8
14
  value?: string;
9
15
  defaultValue?: string;
@@ -18,5 +24,16 @@ type DropdownPropertyType = Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange
18
24
  disabled?: boolean;
19
25
  emptyText?: string;
20
26
  };
21
- export declare const Dropdown: ({ options, value, defaultValue, onValueChange, label, required, isError, errorText, placeholder, isSearchable, searchPlaceholder, disabled, emptyText, id, "aria-invalid": ariaInvalid, className, ...property }: DropdownPropertyType) => import("react/jsx-runtime").JSX.Element;
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;
22
39
  export {};
@@ -1,8 +1,9 @@
1
1
  import { HTMLAttributes } from 'react';
2
- import type { JustifyContentType, AlignItemsType } from './lib/types';
3
- export declare const Flex: import("react").ForwardRefExoticComponent<{
2
+ import { JustifyContentType, AlignItemsType } from './lib/types';
3
+
4
+ export declare const Flex: import('react').ForwardRefExoticComponent<{
4
5
  column?: boolean;
5
6
  middle?: boolean;
6
7
  'justify-content'?: JustifyContentType;
7
8
  'align-items'?: AlignItemsType;
8
- } & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
9
+ } & HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,4 +1,5 @@
1
1
  import { HTMLAttributes } from 'react';
2
- export declare const Grid: import("react").ForwardRefExoticComponent<{
2
+
3
+ export declare const Grid: import('react').ForwardRefExoticComponent<{
3
4
  column?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
4
- } & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
5
+ } & HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,3 +1,4 @@
1
+ import { TypographyColorType } from '../Typography';
1
2
  import * as React from 'react';
2
3
  export declare const IMAGE_MASK_OPTIONS: readonly [{
3
4
  readonly value: 0;
@@ -13,6 +14,8 @@ export declare const IMAGE_MASK_OPTIONS: readonly [{
13
14
  readonly label: "Square Crop";
14
15
  }];
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];
16
19
  export type ImageMaskPositionValueType = {
17
20
  x: number;
18
21
  y: number;
@@ -43,5 +46,8 @@ export type ImagePropertyType = Omit<React.ImgHTMLAttributes<HTMLImageElement>,
43
46
  topShadeColor?: string;
44
47
  isBottomShadeVisible?: boolean;
45
48
  bottomShadeColor?: string;
49
+ isSideShadeVisible?: boolean;
50
+ sideShadeSide?: ImageSideShadeSideType;
51
+ sideShadeColorToken?: TypographyColorType;
46
52
  };
47
- export declare const Image: ({ className, isLoading, maskType, isEditModeDisabled, imagePosition, isSquareCrop, cropX, cropY, cropPositionValue, defaultCropPositionValue, onCropPositionChange, maskSize, maskPositionValue, maskFillColor, maskStrokeColor, maskStrokeWidth, isTopShadeVisible, topShadeColor, isBottomShadeVisible, bottomShadeColor, alt, style, ...property }: ImagePropertyType) => import("react/jsx-runtime").JSX.Element;
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,5 +1,7 @@
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
- import { type TypographyType } from '../../../components/atoms/Typography';
3
5
  export type InputVariantType = 'outline' | 'text';
4
6
  type InputSharedPropertyType = {
5
7
  className?: string;
@@ -19,6 +21,20 @@ type SingleLineInputPropertyType = InputSharedPropertyType & React.ComponentProp
19
21
  type MultiLineInputPropertyType = InputSharedPropertyType & Omit<React.ComponentProps<'textarea'>, 'rows' | 'type'> & {
20
22
  isTextarea: true;
21
23
  };
22
- type InputPropertyType = SingleLineInputPropertyType | MultiLineInputPropertyType;
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
+ };
23
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;
24
40
  export { Input };
@@ -1,19 +1,38 @@
1
- import type { ComponentPropsWithoutRef, ElementType, PropsWithChildren } from 'react';
1
+ import { CSSProperties, ComponentPropsWithoutRef, ElementType, PropsWithChildren, ReactElement } from 'react';
2
+
2
3
  declare const paperStyleDictionary: {
3
4
  readonly light: "bg-(--card)";
4
5
  readonly dark: "bg-(--background)";
5
- readonly gradient: "bg-[radial-gradient(120%_120%_at_0%_0%,color-mix(in_oklab,var(--chart-1)_10%,transparent),transparent_55%),linear-gradient(180deg,color-mix(in_oklab,var(--card)_93%,black_7%),var(--card))]";
6
+ readonly glass: "backdrop-blur-xl bg-opacity-95 bg-(--background)/5";
7
+ readonly transparent: "bg-transparent";
6
8
  };
7
- type PaperType = keyof typeof paperStyleDictionary;
8
- type PaperBasePropertyType<T extends ElementType> = {
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> = {
9
15
  as?: T;
10
16
  type?: PaperType;
11
17
  className?: string;
18
+ style?: CSSProperties;
12
19
  isColored?: boolean;
20
+ isGradientEnabled?: boolean;
21
+ isBorderDisabled?: boolean;
22
+ isPaddingDisabled?: boolean;
23
+ radiusClassName?: PaperRadiusClassType;
13
24
  isRoundedCornersDisabled?: boolean;
14
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;
15
34
  };
16
- type PaperPropertyType<T extends ElementType> = PropsWithChildren<PaperBasePropertyType<T> & Omit<ComponentPropsWithoutRef<T>, 'as' | 'className' | 'children'>>;
35
+ export type PaperPropertyType<T extends ElementType = 'div'> = PropsWithChildren<PaperBasePropertyType<T> & Omit<ComponentPropsWithoutRef<T>, 'as' | 'className' | 'children' | 'style'>>;
17
36
  declare const defaultElement = "div";
18
- export declare const Paper: <T extends ElementType = typeof defaultElement>({ as, type, className, children, isColored, isRoundedCornersDisabled, isLoading, ...property }: PaperPropertyType<T>) => import("react/jsx-runtime").JSX.Element;
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;
19
38
  export {};
@@ -1,5 +1,6 @@
1
- import { type HTMLAttributes } from 'react';
2
- import { type TypographyColorType } from '../../../components/atoms/Typography';
1
+ import { HTMLAttributes } from 'react';
2
+ import { TypographyColorType } from '../Typography';
3
+
3
4
  export declare const TAG_TYPE_OPTIONS: readonly ["default", "time"];
4
5
  export type TagType = (typeof TAG_TYPE_OPTIONS)[number];
5
6
  export type TagPropertyType = HTMLAttributes<HTMLSpanElement> & {
@@ -1,4 +1,5 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
+
2
3
  type TimerLabelsType = {
3
4
  days: React.ReactNode;
4
5
  hours: React.ReactNode;
@@ -1,4 +1,5 @@
1
- import React, { type ElementType, type HTMLAttributes } from 'react';
1
+ import { default as React, ElementType, HTMLAttributes } from 'react';
2
+
2
3
  export type TypographyType = 'Heading' | 'SectionHeader' | 'CompactHeader' | 'Action' | 'Subheader' | 'Body' | 'BodySmall' | 'Caption' | 'CompactCaption';
3
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"];
4
5
  export type TypographyColorType = (typeof TYPOGRAPHY_COLOR_OPTIONS)[number];
@@ -10,3 +10,4 @@ export * from './Toggle';
10
10
  export * from './Image';
11
11
  export * from './Timer';
12
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;
@@ -2,3 +2,4 @@ export * from './atoms';
2
2
  export * from './molecules';
3
3
  export * from './ui';
4
4
  export * from './ui/shadcn-io/color-picker';
5
+ export * from './templates';
@@ -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,2 @@
1
+ export declare const resolveHighlightLanguage: (language?: string) => string | undefined;
2
+ export declare const highlightCodeToHtml: (code: string, language?: string) => string;
@@ -1,18 +1,21 @@
1
+ import { ElementType } from 'react';
2
+ import { TypographyColorType, TypographyType } from '../../atoms/Typography';
1
3
  import * as React from 'react';
2
- import type { ElementType } from 'react';
3
- import { type TypographyColorType, type TypographyType } from '../../../components/atoms/Typography';
4
4
  type EditableTypographyPropertyType = {
5
5
  className?: string;
6
+ contentClassName?: string;
6
7
  typography?: TypographyType;
7
8
  element?: ElementType;
8
9
  color?: TypographyColorType;
9
10
  isEditModeDisabled?: boolean;
11
+ isEditModeOn?: boolean;
10
12
  isLoading?: boolean;
11
13
  value?: string;
12
14
  defaultValue?: string;
13
15
  placeholder?: string;
14
16
  onValueChange?: (value: string) => void;
17
+ onEditModeChange?: (isEditModeOn: boolean) => void;
15
18
  children?: React.ReactNode;
16
19
  };
17
- export declare const EditableTypography: ({ className, typography, element, color, isEditModeDisabled, isLoading, value, defaultValue, placeholder, onValueChange, children, }: EditableTypographyPropertyType) => import("react/jsx-runtime").JSX.Element;
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;
18
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>;
@@ -1,7 +1,7 @@
1
+ import { ImagePropertyType } from '../../../atoms/Image';
2
+ import { TagType } from '../../../atoms/Tag';
3
+ import { TypographyColorType } from '../../../atoms/Typography';
1
4
  import * as React from 'react';
2
- import { type ImagePropertyType } from '../../../../components/atoms/Image';
3
- import { type TagType } from '../../../../components/atoms/Tag';
4
- import { type TypographyColorType } from '../../../../components/atoms/Typography';
5
5
  export type StoreSlideImageChangePayloadType = {
6
6
  file: File;
7
7
  objectUrl: string;
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
- type SliderPropertyType = Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> & {
3
- slides: React.ReactNode[];
2
+ export type SliderPropertyType = Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> & {
3
+ slides?: React.ReactNode[];
4
+ children?: React.ReactNode;
4
5
  slidesPerView?: number | 'auto';
5
6
  spaceBetween?: number;
6
7
  isLoopEnabled?: boolean;
@@ -12,7 +13,7 @@ type SliderPropertyType = Omit<React.HTMLAttributes<HTMLDivElement>, 'children'>
12
13
  isKeyboardEnabled?: boolean;
13
14
  isGrabCursorVisible?: boolean;
14
15
  isFreeScrollEnabled?: boolean;
16
+ activeSlideIndex?: number;
15
17
  onSlideChange?: (activeSlideIndex: number) => void;
16
18
  };
17
- export declare const Slider: ({ slides, className, slidesPerView, spaceBetween, isLoopEnabled, isPaginationVisible, isNavigationVisible, isNavigationEnabled, isArrowsVisible, isMousewheelEnabled, isKeyboardEnabled, isGrabCursorVisible, isFreeScrollEnabled, onSlideChange, ...property }: SliderPropertyType) => import("react/jsx-runtime").JSX.Element;
18
- export {};
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;
@@ -1,3 +1,4 @@
1
- import { type StoreSlidePropertyType } from '../../../../components/molecules/SlideTemplates';
1
+ import { StoreSlidePropertyType } from '../../SlideTemplates';
2
+
2
3
  export type MediumVerticalSlidePropertyType = StoreSlidePropertyType;
3
4
  export declare const MediumVerticalSlide: (property: MediumVerticalSlidePropertyType) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
+ import { StoreSlideTagItemType } from '../../SlideTemplates';
1
2
  import * as React from 'react';
2
- import type { StoreSlideTagItemType } from '../../../../components/molecules/SlideTemplates';
3
3
  export type SliderDemoSlideItemType = {
4
4
  id: string;
5
5
  coverImageSrc: string;
@@ -11,10 +11,14 @@ export type SliderDemoSlideItemType = {
11
11
  tagText: string;
12
12
  };
13
13
  export declare const courseSlideData: SliderDemoSlideItemType[];
14
- export declare const sliderSlideComponentTypeOptions: readonly ["MediumVerticalSlide", "MediumHorizontalSlide"];
14
+ export declare const sliderSlideComponentTypeOptions: readonly ["MediumVerticalSlide", "MediumHorizontalSlide", "BigHorizontalSlide"];
15
15
  export type SliderSlideComponentType = (typeof sliderSlideComponentTypeOptions)[number];
16
- export declare const mediumVerticalSlideWidthClassName = "w-[460px] min-w-[460px]";
17
- export declare const mediumHorizontalSlideWidthClassName = "w-[520px] min-w-[520px]";
16
+ export declare const mediumVerticalSlideWidth = 460;
17
+ export declare const mediumHorizontalSlideWidth = 520;
18
+ export declare const bigHorizontalSlideWidth = 620;
19
+ export declare const mediumVerticalSlideWidthStyle: React.CSSProperties;
20
+ export declare const mediumHorizontalSlideWidthStyle: React.CSSProperties;
21
+ export declare const bigHorizontalSlideWidthStyle: React.CSSProperties;
18
22
  type TagVariantType = 'no-tags' | 'one-tag' | 'two-tags' | 'two-other-tags';
19
23
  export declare const getTagsByVariant: (variant: TagVariantType, slideId: string, baseLabel: string) => {
20
24
  tags: StoreSlideTagItemType[];
@@ -1,3 +1,4 @@
1
+ export * from './BigHorizontalSlide';
1
2
  export * from './MediumHorizontalSlide';
2
3
  export * from './MediumVerticalSlide';
3
4
  export * from './examples';
@@ -1,4 +1,7 @@
1
1
  export * from './EditableTypography';
2
+ export * from './Accordion';
2
3
  export * from './Slider';
3
4
  export * from './Slider/slides';
4
5
  export * from './SlideTemplates';
6
+ export * from './MathEquationBlock';
7
+ export * from './CodeBrick';
@@ -0,0 +1,23 @@
1
+ import { TypographyColorType, TypographyType } from '../../atoms/Typography';
2
+ import * as React from 'react';
3
+ export type TableLightRowType = Record<string, string | number | null | undefined>;
4
+ export type TableLightColumnType = {
5
+ key: string;
6
+ header: string;
7
+ typography?: TypographyType;
8
+ color?: TypographyColorType;
9
+ width?: number | string;
10
+ isEditable?: boolean;
11
+ placeholder?: string;
12
+ contentClassName?: string;
13
+ className?: string;
14
+ };
15
+ export type TableLightPropertyType = Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> & {
16
+ columns: TableLightColumnType[];
17
+ rows: TableLightRowType[];
18
+ isEditModeEnabled?: boolean;
19
+ isEditModeDisabled?: boolean;
20
+ isInlineEditingLocked?: boolean;
21
+ onRowsChange?: (rows: TableLightRowType[]) => void;
22
+ };
23
+ export declare const TableLight: ({ columns, rows, className, isEditModeEnabled, isEditModeDisabled, isInlineEditingLocked, onRowsChange, ...property }: TableLightPropertyType) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './TableLight';
@@ -0,0 +1 @@
1
+ export * from './TableLight';
@@ -1,3 +1,3 @@
1
+ export * from './avatar';
1
2
  export * from './breadcrumb';
2
3
  export * from './breadcrumbs';
3
- export * from './avatar';
@@ -1,8 +1,9 @@
1
- import Color from 'color';
1
+ import { default as Color } from 'color';
2
2
  import { Slider } from 'radix-ui';
3
- import { type ComponentProps, type HTMLAttributes } from 'react';
4
- import { Button } from '../../../../components/atoms/Button';
5
- import { SelectTrigger } from '../../../../components/ui/select';
3
+ import { ComponentProps, HTMLAttributes } from 'react';
4
+ import { Button } from '../../../atoms/Button';
5
+ import { SelectTrigger } from '../../select';
6
+
6
7
  interface ColorPickerContextValue {
7
8
  hue: number;
8
9
  saturation: number;
@@ -23,7 +24,7 @@ export type ColorPickerProps = HTMLAttributes<HTMLDivElement> & {
23
24
  };
24
25
  export declare const ColorPicker: ({ value, defaultValue, onChange, className, ...props }: ColorPickerProps) => import("react/jsx-runtime").JSX.Element;
25
26
  export type ColorPickerSelectionProps = HTMLAttributes<HTMLDivElement>;
26
- export declare const ColorPickerSelection: import("react").MemoExoticComponent<({ className, ...props }: ColorPickerSelectionProps) => import("react/jsx-runtime").JSX.Element>;
27
+ export declare const ColorPickerSelection: import('react').MemoExoticComponent<({ className, ...props }: ColorPickerSelectionProps) => import("react/jsx-runtime").JSX.Element>;
27
28
  export type ColorPickerHueProps = ComponentProps<typeof Slider.Root>;
28
29
  export declare const ColorPickerHue: ({ className, ...props }: ColorPickerHueProps) => import("react/jsx-runtime").JSX.Element;
29
30
  export type ColorPickerAlphaProps = ComponentProps<typeof Slider.Root>;
@@ -1 +1 @@
1
- export * from "./css";
1
+ export * from './css';
package/dist/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
+
1
2
  export * from './components';
2
3
  export * from './constants';