@indigoai/indigo-design-system 0.10.3
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/README.md +77 -0
- package/dist/components/accordion/accordion.d.ts +14 -0
- package/dist/components/accordion/accordion.stories.d.ts +8 -0
- package/dist/components/accordion/index.d.ts +2 -0
- package/dist/components/accordion/types.d.ts +8 -0
- package/dist/components/ai-chat/ai-chat.d.ts +6 -0
- package/dist/components/ai-chat/ai-chat.stories.d.ts +7 -0
- package/dist/components/ai-chat/chat-content/chat-content.d.ts +6 -0
- package/dist/components/ai-chat/chat-header/chat-header.d.ts +11 -0
- package/dist/components/ai-chat/chat-input/chat-input.d.ts +11 -0
- package/dist/components/ai-chat/chat-item/chat-item.d.ts +12 -0
- package/dist/components/ai-chat/constants.d.ts +1 -0
- package/dist/components/ai-chat/hooks/useAutoResizeTextArea.d.ts +1 -0
- package/dist/components/ai-chat/index.d.ts +4 -0
- package/dist/components/ai-chat/types.d.ts +99 -0
- package/dist/components/avatar-bot/avatar-bot.d.ts +6 -0
- package/dist/components/avatar-bot/avatar-bot.stories.d.ts +12 -0
- package/dist/components/avatar-bot/index.d.ts +2 -0
- package/dist/components/avatar-bot/types.d.ts +20 -0
- package/dist/components/avatar-default/avatar.d.ts +6 -0
- package/dist/components/avatar-default/avatar.stories.d.ts +10 -0
- package/dist/components/avatar-default/constants.d.ts +1 -0
- package/dist/components/avatar-default/index.d.ts +3 -0
- package/dist/components/avatar-default/types.d.ts +19 -0
- package/dist/components/avatar-workspace/avatar-workspace.d.ts +6 -0
- package/dist/components/avatar-workspace/avatar-workspace.stories.d.ts +9 -0
- package/dist/components/avatar-workspace/constants.d.ts +2 -0
- package/dist/components/avatar-workspace/index.d.ts +3 -0
- package/dist/components/avatar-workspace/types.d.ts +13 -0
- package/dist/components/badge/badge.d.ts +6 -0
- package/dist/components/badge/badge.stories.d.ts +9 -0
- package/dist/components/badge/index.d.ts +2 -0
- package/dist/components/badge/types.d.ts +7 -0
- package/dist/components/block-builders/atom-top-modulo/atom-top-modulo.d.ts +7 -0
- package/dist/components/block-builders/atom-top-modulo/atom-top_modulo.stories.d.ts +9 -0
- package/dist/components/block-builders/atom-top-modulo/index.d.ts +2 -0
- package/dist/components/block-builders/atom-top-modulo/types.d.ts +13 -0
- package/dist/components/block-builders/block/block.d.ts +7 -0
- package/dist/components/block-builders/block/block.stories.d.ts +9 -0
- package/dist/components/block-builders/block/constants.d.ts +1 -0
- package/dist/components/block-builders/block/index.d.ts +2 -0
- package/dist/components/block-builders/block/types.d.ts +10 -0
- package/dist/components/block-builders/empty-state/constants.d.ts +1 -0
- package/dist/components/block-builders/empty-state/empty-state-image/empty-state-image.d.ts +6 -0
- package/dist/components/block-builders/empty-state/empty-state-image/types.d.ts +7 -0
- package/dist/components/block-builders/empty-state/empty-state.d.ts +3 -0
- package/dist/components/block-builders/empty-state/empty-state.stories.d.ts +8 -0
- package/dist/components/block-builders/empty-state/index.d.ts +3 -0
- package/dist/components/block-builders/empty-state/types.d.ts +8 -0
- package/dist/components/block-builders/image-uploader/image-uploader.d.ts +12 -0
- package/dist/components/block-builders/image-uploader/index.d.ts +2 -0
- package/dist/components/block-builders/image-uploader/types.d.ts +7 -0
- package/dist/components/block-builders/title-block-module/index.d.ts +2 -0
- package/dist/components/block-builders/title-block-module/title-block-module.d.ts +4 -0
- package/dist/components/block-builders/title-block-module/title-block-module.stories.d.ts +8 -0
- package/dist/components/block-builders/title-block-module/types.d.ts +7 -0
- package/dist/components/block-builders/toolbar-icon/constants.d.ts +1 -0
- package/dist/components/block-builders/toolbar-icon/index.d.ts +4 -0
- package/dist/components/block-builders/toolbar-icon/toolbar-icon.d.ts +3 -0
- package/dist/components/block-builders/toolbar-icon/toolbar-icon.stories.d.ts +8 -0
- package/dist/components/block-builders/toolbar-icon/types.d.ts +9 -0
- package/dist/components/blocks/image-block/image-block.d.ts +6 -0
- package/dist/components/blocks/image-block/image-block.stories.d.ts +7 -0
- package/dist/components/blocks/image-block/index.d.ts +2 -0
- package/dist/components/blocks/image-block/types.d.ts +15 -0
- package/dist/components/blocks/reroute-block/index.d.ts +2 -0
- package/dist/components/blocks/reroute-block/reroute-block.d.ts +7 -0
- package/dist/components/blocks/reroute-block/reroute-block.stories.d.ts +8 -0
- package/dist/components/blocks/reroute-block/types.d.ts +6 -0
- package/dist/components/blocks/text-block/index.d.ts +2 -0
- package/dist/components/blocks/text-block/text-block.d.ts +7 -0
- package/dist/components/blocks/text-block/text-block.stories.d.ts +8 -0
- package/dist/components/blocks/text-block/types.d.ts +12 -0
- package/dist/components/blocks/video-block/index.d.ts +2 -0
- package/dist/components/blocks/video-block/types.d.ts +11 -0
- package/dist/components/blocks/video-block/video-block.d.ts +6 -0
- package/dist/components/blocks/video-block/video-block.stories.d.ts +7 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +6 -0
- package/dist/components/breadcrumb/breadcrumb.stories.d.ts +9 -0
- package/dist/components/breadcrumb/constants.d.ts +0 -0
- package/dist/components/breadcrumb/index.d.ts +2 -0
- package/dist/components/breadcrumb/types.d.ts +11 -0
- package/dist/components/builder-block-toolbar/builder-block-toolbar.d.ts +9 -0
- package/dist/components/builder-block-toolbar/builder-block-toolbar.stories.d.ts +8 -0
- package/dist/components/builder-block-toolbar/constants.d.ts +2 -0
- package/dist/components/builder-block-toolbar/index.d.ts +2 -0
- package/dist/components/builder-block-toolbar/types.d.ts +29 -0
- package/dist/components/button/button.d.ts +6 -0
- package/dist/components/button/button.stories.d.ts +15 -0
- package/dist/components/button/constants.d.ts +4 -0
- package/dist/components/button/index.d.ts +3 -0
- package/dist/components/button/types.d.ts +19 -0
- package/dist/components/caption/caption.d.ts +6 -0
- package/dist/components/caption/caption.stories.d.ts +8 -0
- package/dist/components/caption/constants.d.ts +2 -0
- package/dist/components/caption/index.d.ts +3 -0
- package/dist/components/caption/types.d.ts +12 -0
- package/dist/components/divider/constants.d.ts +2 -0
- package/dist/components/divider/divider.d.ts +6 -0
- package/dist/components/divider/divider.stories.d.ts +8 -0
- package/dist/components/divider/index.d.ts +3 -0
- package/dist/components/divider/types.d.ts +12 -0
- package/dist/components/dropdown/ai-dropdown/ai-dropdown/ai-dropdown.d.ts +43 -0
- package/dist/components/dropdown/ai-dropdown/ai-dropdown/ai-dropdown.stories.d.ts +53 -0
- package/dist/components/dropdown/ai-dropdown/ai-dropdown/index.d.ts +2 -0
- package/dist/components/dropdown/ai-dropdown/ai-dropdown/types.d.ts +42 -0
- package/dist/components/dropdown/ai-dropdown/atom-head-item-ai-dropdown/atom-head-item-ai-dropdown.d.ts +3 -0
- package/dist/components/dropdown/ai-dropdown/atom-head-item-ai-dropdown/index.d.ts +2 -0
- package/dist/components/dropdown/ai-dropdown/atom-head-item-ai-dropdown/types.d.ts +4 -0
- package/dist/components/dropdown/ai-dropdown/atom-item-ai-dropdown/atom-item-ai-dropdown.d.ts +31 -0
- package/dist/components/dropdown/ai-dropdown/atom-item-ai-dropdown/constants.d.ts +1 -0
- package/dist/components/dropdown/ai-dropdown/atom-item-ai-dropdown/index.d.ts +2 -0
- package/dist/components/dropdown/ai-dropdown/atom-item-ai-dropdown/types.d.ts +25 -0
- package/dist/components/dropdown/ai-dropdown/atom-item-tag-ai-dropdown/atom-item-tag-ai-dropdown.d.ts +6 -0
- package/dist/components/dropdown/ai-dropdown/atom-item-tag-ai-dropdown/index.d.ts +2 -0
- package/dist/components/dropdown/ai-dropdown/atom-item-tag-ai-dropdown/types.d.ts +9 -0
- package/dist/components/dropdown/ai-dropdown/atom-sub-ai-dropdown/atom-sub-ai-dropdown.d.ts +14 -0
- package/dist/components/dropdown/ai-dropdown/atom-sub-ai-dropdown/index.d.ts +2 -0
- package/dist/components/dropdown/ai-dropdown/atom-sub-ai-dropdown/types.d.ts +7 -0
- package/dist/components/dropdown/ai-dropdown/atom-top-ai-dropdown/atom-top-ai-dropdown.d.ts +3 -0
- package/dist/components/dropdown/ai-dropdown/atom-top-ai-dropdown/index.d.ts +2 -0
- package/dist/components/dropdown/ai-dropdown/atom-top-ai-dropdown/types.d.ts +20 -0
- package/dist/components/heading/constants.d.ts +2 -0
- package/dist/components/heading/heading.d.ts +6 -0
- package/dist/components/heading/heading.stories.d.ts +8 -0
- package/dist/components/heading/index.d.ts +3 -0
- package/dist/components/heading/types.d.ts +11 -0
- package/dist/components/icon-button/constants.d.ts +3 -0
- package/dist/components/icon-button/icon-button.d.ts +6 -0
- package/dist/components/icon-button/icon-button.stories.d.ts +12 -0
- package/dist/components/icon-button/index.d.ts +3 -0
- package/dist/components/icon-button/types.d.ts +11 -0
- package/dist/components/input/atom-name-div-block-module/atom-name-div-block-module.d.ts +6 -0
- package/dist/components/input/atom-name-div-block-module/atom-name-div-block-module.stories.d.ts +7 -0
- package/dist/components/input/atom-name-div-block-module/index.d.ts +2 -0
- package/dist/components/input/atom-name-div-block-module/types.d.ts +6 -0
- package/dist/components/input/checkbox/checkbox.d.ts +13 -0
- package/dist/components/input/checkbox/checkbox.stories.d.ts +20 -0
- package/dist/components/input/checkbox/constants.d.ts +1 -0
- package/dist/components/input/checkbox/index.d.ts +2 -0
- package/dist/components/input/checkbox/types.d.ts +19 -0
- package/dist/components/input/multiple-values/index.d.ts +2 -0
- package/dist/components/input/multiple-values/multiple-values.d.ts +5 -0
- package/dist/components/input/multiple-values/multiple-values.stories.d.ts +23 -0
- package/dist/components/input/multiple-values/types.d.ts +17 -0
- package/dist/components/input/radio/index.d.ts +3 -0
- package/dist/components/input/radio/radio-group.d.ts +9 -0
- package/dist/components/input/radio/radio.d.ts +7 -0
- package/dist/components/input/radio/radio.stories.d.ts +12 -0
- package/dist/components/input/radio/types.d.ts +13 -0
- package/dist/components/input/select/components/index.d.ts +1 -0
- package/dist/components/input/select/components/select-item.d.ts +7 -0
- package/dist/components/input/select/constants.d.ts +3 -0
- package/dist/components/input/select/index.d.ts +2 -0
- package/dist/components/input/select/select.d.ts +7 -0
- package/dist/components/input/select/select.stories.d.ts +12 -0
- package/dist/components/input/select/types.d.ts +32 -0
- package/dist/components/input/text-field/constants.d.ts +2 -0
- package/dist/components/input/text-field/field-sizing-content.d.ts +23 -0
- package/dist/components/input/text-field/index.d.ts +3 -0
- package/dist/components/input/text-field/text-field.d.ts +6 -0
- package/dist/components/input/text-field/text-field.stories.d.ts +11 -0
- package/dist/components/input/text-field/types.d.ts +21 -0
- package/dist/components/input/text-field-multiline/index.d.ts +2 -0
- package/dist/components/input/text-field-multiline/text-field-multiline.d.ts +6 -0
- package/dist/components/input/text-field-multiline/text-field-multiline.stories.d.ts +11 -0
- package/dist/components/input/text-field-multiline/types.d.ts +33 -0
- package/dist/components/input/toggle/constants.d.ts +1 -0
- package/dist/components/input/toggle/index.d.ts +3 -0
- package/dist/components/input/toggle/toggle.d.ts +7 -0
- package/dist/components/input/toggle/toggle.stories.d.ts +11 -0
- package/dist/components/input/toggle/types.d.ts +18 -0
- package/dist/components/label/constants.d.ts +2 -0
- package/dist/components/label/index.d.ts +3 -0
- package/dist/components/label/label.d.ts +6 -0
- package/dist/components/label/label.stories.d.ts +8 -0
- package/dist/components/label/types.d.ts +11 -0
- package/dist/components/logo/constants.d.ts +2 -0
- package/dist/components/logo/index.d.ts +1 -0
- package/dist/components/logo/logo.d.ts +6 -0
- package/dist/components/logo/logo.stories.d.ts +9 -0
- package/dist/components/logo/types.d.ts +6 -0
- package/dist/components/modal/index.d.ts +2 -0
- package/dist/components/modal/modal.d.ts +15 -0
- package/dist/components/modal/modal.stories.d.ts +15 -0
- package/dist/components/modal/types.d.ts +12 -0
- package/dist/components/pagination/hooks/useControlled.d.ts +1 -0
- package/dist/components/pagination/hooks/usePagination.d.ts +74 -0
- package/dist/components/pagination/index.d.ts +2 -0
- package/dist/components/pagination/pagination.d.ts +7 -0
- package/dist/components/pagination/pagination.stories.d.ts +11 -0
- package/dist/components/pagination/types.d.ts +17 -0
- package/dist/components/progress-bar/constants.d.ts +1 -0
- package/dist/components/progress-bar/index.d.ts +2 -0
- package/dist/components/progress-bar/progress-bar.d.ts +6 -0
- package/dist/components/progress-bar/progress-bar.stories.d.ts +12 -0
- package/dist/components/progress-bar/types.d.ts +11 -0
- package/dist/components/quality-metric-icon/index.d.ts +2 -0
- package/dist/components/quality-metric-icon/quality-metric-icon.d.ts +6 -0
- package/dist/components/quality-metric-icon/quality-metric-icon.stories.d.ts +14 -0
- package/dist/components/quality-metric-icon/types.d.ts +9 -0
- package/dist/components/tabs/index.d.ts +2 -0
- package/dist/components/tabs/tabs.d.ts +23 -0
- package/dist/components/tabs/tabs.stories.d.ts +8 -0
- package/dist/components/tabs/types.d.ts +7 -0
- package/dist/components/tag/constants.d.ts +4 -0
- package/dist/components/tag/index.d.ts +2 -0
- package/dist/components/tag/tag.d.ts +6 -0
- package/dist/components/tag/tag.stories.d.ts +8 -0
- package/dist/components/tag/types.d.ts +16 -0
- package/dist/components/tag-quality-metric/index.d.ts +2 -0
- package/dist/components/tag-quality-metric/tag-quality-metric.d.ts +6 -0
- package/dist/components/tag-quality-metric/tag-quality-metric.stories.d.ts +8 -0
- package/dist/components/tag-quality-metric/types.d.ts +11 -0
- package/dist/components/text/constants.d.ts +2 -0
- package/dist/components/text/index.d.ts +3 -0
- package/dist/components/text/text.d.ts +6 -0
- package/dist/components/text/text.stories.d.ts +8 -0
- package/dist/components/text/types.d.ts +11 -0
- package/dist/components/toast/constants.d.ts +2 -0
- package/dist/components/toast/hooks/use-toast.d.ts +41 -0
- package/dist/components/toast/index.d.ts +5 -0
- package/dist/components/toast/toast.d.ts +17 -0
- package/dist/components/toast/toast.stories.d.ts +17 -0
- package/dist/components/toast/toaster.d.ts +1 -0
- package/dist/components/toast/types.d.ts +14 -0
- package/dist/components/toast/utils.d.ts +9 -0
- package/dist/components/tooltip/constants.d.ts +0 -0
- package/dist/components/tooltip/index.d.ts +2 -0
- package/dist/components/tooltip/tooltip.d.ts +25 -0
- package/dist/components/tooltip/tooltip.stories.d.ts +22 -0
- package/dist/components/tooltip/types.d.ts +20 -0
- package/dist/components/tooltip-quality-metric/constants.d.ts +0 -0
- package/dist/components/tooltip-quality-metric/index.d.ts +2 -0
- package/dist/components/tooltip-quality-metric/tooltip-quality-metric.d.ts +29 -0
- package/dist/components/tooltip-quality-metric/tooltip-quality-metric.stories.d.ts +31 -0
- package/dist/components/tooltip-quality-metric/types.d.ts +15 -0
- package/dist/components/vertical-tab-chat/index.d.ts +2 -0
- package/dist/components/vertical-tab-chat/types.d.ts +15 -0
- package/dist/components/vertical-tab-chat/vertical-tab-chat.d.ts +31 -0
- package/dist/components/vertical-tab-chat/vertical-tab-chat.stories.d.ts +19 -0
- package/dist/constants/index.d.ts +3 -0
- package/dist/index.d.ts +90 -0
- package/dist/indigo-design-system.js +27285 -0
- package/dist/indigo-design-system.js.map +1 -0
- package/dist/indigo-design-system.umd.cjs +157 -0
- package/dist/indigo-design-system.umd.cjs.map +1 -0
- package/dist/style.css +5 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/utils/index.d.ts +18 -0
- package/package.json +84 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import { Toggle, ToggleProps } from '.';
|
|
4
|
+
|
|
5
|
+
declare const _default: import('@storybook/csf').ComponentAnnotations<import('@storybook/react/dist/types-a5624094').R, Omit<ToggleProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
export default _default;
|
|
7
|
+
type Story = StoryObj<typeof Toggle>;
|
|
8
|
+
export declare const Template: {
|
|
9
|
+
render: (args: ToggleProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
};
|
|
11
|
+
export declare const Disabled: Story;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from 'react';
|
|
2
|
+
import { TOGGLE_POSITIONS } from './constants';
|
|
3
|
+
|
|
4
|
+
export type TogglePositions = (typeof TOGGLE_POSITIONS)[number];
|
|
5
|
+
export type ToggleProps = {
|
|
6
|
+
id?: string;
|
|
7
|
+
checked?: boolean;
|
|
8
|
+
label?: string;
|
|
9
|
+
labelPosition?: TogglePositions;
|
|
10
|
+
small?: boolean;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
onCheckedChanged: (checked: boolean) => void;
|
|
13
|
+
} & ComponentPropsWithRef<'button'>;
|
|
14
|
+
export type LabelProps = {
|
|
15
|
+
id?: string;
|
|
16
|
+
small?: boolean;
|
|
17
|
+
label?: string | React.ReactNode;
|
|
18
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { LabelProps } from '.';
|
|
3
|
+
|
|
4
|
+
declare const _default: import('@storybook/csf').ComponentAnnotations<import('@storybook/react/dist/types-a5624094').R, Omit<LabelProps, "ref"> & React.RefAttributes<HTMLLabelElement>>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const Template: {
|
|
7
|
+
render: (args: LabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from 'react';
|
|
2
|
+
import { ColorVariants } from '../../types';
|
|
3
|
+
import { LABEL_VARIANT, LABEL_FONT_WEIGHTS } from '.';
|
|
4
|
+
|
|
5
|
+
export type LabelVariant = (typeof LABEL_VARIANT)[number];
|
|
6
|
+
export type LabelFontWeights = (typeof LABEL_FONT_WEIGHTS)[number];
|
|
7
|
+
export type LabelProps = {
|
|
8
|
+
variant: LabelVariant;
|
|
9
|
+
fontWeight?: LabelFontWeights;
|
|
10
|
+
color?: ColorVariants;
|
|
11
|
+
} & ComponentPropsWithRef<'label'>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Logo } from './logo';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React, RefAttributes } from 'react';
|
|
2
|
+
import { LogoProps } from './types';
|
|
3
|
+
|
|
4
|
+
type Props = LogoProps & RefAttributes<SVGSVGElement>;
|
|
5
|
+
declare const _default: import('@storybook/csf').ComponentAnnotations<import('@storybook/react/dist/types-a5624094').R, Omit<LogoProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const Template: {
|
|
8
|
+
render: (args: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as ModalPrimitive from '@radix-ui/react-dialog';
|
|
3
|
+
export declare const Modal: import('react').FC<ModalPrimitive.DialogProps>;
|
|
4
|
+
export declare const ModalTrigger: import('react').ForwardRefExoticComponent<Omit<any, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
/**
|
|
6
|
+
* ModalContent component
|
|
7
|
+
*/
|
|
8
|
+
export declare const ModalContent: import('react').ForwardRefExoticComponent<{
|
|
9
|
+
title?: import('react').ReactNode;
|
|
10
|
+
description?: import('react').ReactNode;
|
|
11
|
+
closeIcon?: boolean | undefined;
|
|
12
|
+
checkboxProps?: import('../input/checkbox').CheckboxProps | undefined;
|
|
13
|
+
leftButton?: import('../button').ButtonProps | undefined;
|
|
14
|
+
rightButton?: import('../button').ButtonProps | undefined;
|
|
15
|
+
} & Omit<ModalPrimitive.DialogContentProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ModalContentProps } from '.';
|
|
3
|
+
|
|
4
|
+
declare const _default: import('@storybook/csf').ComponentAnnotations<import('@storybook/react/dist/types-a5624094').R, {
|
|
5
|
+
title?: React.ReactNode;
|
|
6
|
+
description?: React.ReactNode;
|
|
7
|
+
closeIcon?: boolean | undefined;
|
|
8
|
+
checkboxProps?: import('../..').CheckboxProps | undefined;
|
|
9
|
+
leftButton?: import('../button').ButtonProps | undefined;
|
|
10
|
+
rightButton?: import('../button').ButtonProps | undefined;
|
|
11
|
+
} & Omit<import('@radix-ui/react-dialog').DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export default _default;
|
|
13
|
+
export declare const Template: {
|
|
14
|
+
render: (args: ModalContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ButtonProps } from '../button';
|
|
2
|
+
import { CheckboxProps } from '../input/checkbox';
|
|
3
|
+
|
|
4
|
+
import * as ModalPrimitive from '@radix-ui/react-dialog';
|
|
5
|
+
export type ModalContentProps = {
|
|
6
|
+
title?: React.ReactNode;
|
|
7
|
+
description?: React.ReactNode;
|
|
8
|
+
closeIcon?: boolean;
|
|
9
|
+
checkboxProps?: CheckboxProps;
|
|
10
|
+
leftButton?: ButtonProps;
|
|
11
|
+
rightButton?: ButtonProps;
|
|
12
|
+
} & React.ComponentPropsWithoutRef<typeof ModalPrimitive.Content>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useControlled({ controlled, default: defaultProp, name, state }: any): any[];
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface UsePaginationProps {
|
|
3
|
+
/**
|
|
4
|
+
* Number of always visible pages at the beginning and end.
|
|
5
|
+
* @default 1
|
|
6
|
+
*/
|
|
7
|
+
boundaryCount?: number;
|
|
8
|
+
/**
|
|
9
|
+
* The name of the component where this hook is used.
|
|
10
|
+
*/
|
|
11
|
+
componentName?: string;
|
|
12
|
+
/**
|
|
13
|
+
* The total number of pages.
|
|
14
|
+
* @default 1
|
|
15
|
+
*/
|
|
16
|
+
count?: number;
|
|
17
|
+
/**
|
|
18
|
+
* The page selected by default when the component is uncontrolled.
|
|
19
|
+
* @default 1
|
|
20
|
+
*/
|
|
21
|
+
defaultPage?: number;
|
|
22
|
+
/**
|
|
23
|
+
* If `true`, the component is disabled.
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* If `true`, hide the next-page button.
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
hideNextButton?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* If `true`, hide the previous-page button.
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
36
|
+
hidePrevButton?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Callback fired when the page is changed.
|
|
39
|
+
*
|
|
40
|
+
* @param {React.ChangeEvent<unknown>} event The event source of the callback.
|
|
41
|
+
* @param {number} page The page selected.
|
|
42
|
+
*/
|
|
43
|
+
onChange?: (event: React.ChangeEvent<unknown>, page: number) => void;
|
|
44
|
+
/**
|
|
45
|
+
* The current page.
|
|
46
|
+
*/
|
|
47
|
+
page?: number;
|
|
48
|
+
/**
|
|
49
|
+
* If `true`, show the first-page button.
|
|
50
|
+
* @default false
|
|
51
|
+
*/
|
|
52
|
+
showFirstButton?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* If `true`, show the last-page button.
|
|
55
|
+
* @default false
|
|
56
|
+
*/
|
|
57
|
+
showLastButton?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Number of always visible pages before and after the current page.
|
|
60
|
+
* @default 1
|
|
61
|
+
*/
|
|
62
|
+
siblingCount?: number;
|
|
63
|
+
}
|
|
64
|
+
export interface UsePaginationItem {
|
|
65
|
+
onClick: React.ReactEventHandler;
|
|
66
|
+
type: 'page' | 'first' | 'last' | 'next' | 'previous' | 'start-ellipsis' | 'end-ellipsis';
|
|
67
|
+
page: number | null;
|
|
68
|
+
selected: boolean;
|
|
69
|
+
disabled: boolean;
|
|
70
|
+
}
|
|
71
|
+
export interface UsePaginationResult {
|
|
72
|
+
items: UsePaginationItem[];
|
|
73
|
+
}
|
|
74
|
+
export declare function usePagination(props: UsePaginationProps): UsePaginationResult;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PaginationProps, PaginationButtonProps } from './types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Pagination component for displaying and navigating through multiple pages
|
|
5
|
+
*/
|
|
6
|
+
export declare const Pagination: import('react').ForwardRefExoticComponent<PaginationProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export declare const PaginationButton: import('react').ForwardRefExoticComponent<Omit<PaginationButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import { Pagination, PaginationProps } from '.';
|
|
4
|
+
|
|
5
|
+
declare const _default: import('@storybook/csf').ComponentAnnotations<import('@storybook/react/dist/types-a5624094').R, PaginationProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export default _default;
|
|
7
|
+
type Story = StoryObj<typeof Pagination>;
|
|
8
|
+
export declare const Template: {
|
|
9
|
+
render: (args: PaginationProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
};
|
|
11
|
+
export declare const Disabled: Story;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const PAGINATION_SIZES: readonly ["sm", "md"];
|
|
3
|
+
type PaginationSize = (typeof PAGINATION_SIZES)[number];
|
|
4
|
+
export type PaginationProps = {
|
|
5
|
+
size: PaginationSize;
|
|
6
|
+
numberOfPages: number;
|
|
7
|
+
currentPage: number;
|
|
8
|
+
onChangePage: (event: React.ChangeEvent<unknown>, page: number) => void;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
};
|
|
12
|
+
export type PaginationButtonProps = {
|
|
13
|
+
size: PaginationSize;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
active?: boolean;
|
|
16
|
+
} & Omit<React.ComponentPropsWithRef<'button'>, 'size'>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PROGRESS_BAR_SIZES: readonly ["sm", "lg"];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import { ProgressBar, ProgressBarProps } from '.';
|
|
4
|
+
|
|
5
|
+
declare const _default: import('@storybook/csf').ComponentAnnotations<import('@storybook/react/dist/types-a5624094').R, Omit<ProgressBarProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export default _default;
|
|
7
|
+
type Story = StoryObj<typeof ProgressBar>;
|
|
8
|
+
export declare const Template: {
|
|
9
|
+
render: (args: ProgressBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
};
|
|
11
|
+
export declare const NotStarted: Story;
|
|
12
|
+
export declare const NumericValue: Story;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PROGRESS_BAR_SIZES } from './constants';
|
|
2
|
+
import { ComponentPropsWithRef } from 'react';
|
|
3
|
+
|
|
4
|
+
export type ProgressBarSize = (typeof PROGRESS_BAR_SIZES)[number];
|
|
5
|
+
export type ProgressBarProps = {
|
|
6
|
+
value: number;
|
|
7
|
+
size?: ProgressBarSize;
|
|
8
|
+
description?: string;
|
|
9
|
+
showPercentage?: boolean;
|
|
10
|
+
numericValue?: number;
|
|
11
|
+
} & ComponentPropsWithRef<'div'>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { QualityMetricIcon } from '.';
|
|
3
|
+
|
|
4
|
+
declare const _default: import('@storybook/csf').ComponentAnnotations<import('@storybook/react/dist/types-a5624094').R, Omit<import('.').QualityMetricIconProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export default _default;
|
|
6
|
+
type Story = StoryObj<typeof QualityMetricIcon>;
|
|
7
|
+
export declare const Green: Story;
|
|
8
|
+
export declare const Red: Story;
|
|
9
|
+
export declare const Yellow: Story;
|
|
10
|
+
export declare const Gray: {
|
|
11
|
+
args: {
|
|
12
|
+
color: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from 'react';
|
|
2
|
+
|
|
3
|
+
export declare const QUALITY_METRIC_ICON_COLORS: readonly ["red", "green", "yellow", "gray"];
|
|
4
|
+
type QualityMetricIconColor = (typeof QUALITY_METRIC_ICON_COLORS)[number];
|
|
5
|
+
export type QualityMetricIconProps = {
|
|
6
|
+
color: QualityMetricIconColor;
|
|
7
|
+
filled?: boolean;
|
|
8
|
+
} & ComponentPropsWithRef<'div'>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
3
|
+
/**
|
|
4
|
+
* The Tabs component is a wrapper around the Radix TabsPrimitive.Root component
|
|
5
|
+
*/
|
|
6
|
+
declare const Tabs: import('react').ForwardRefExoticComponent<TabsPrimitive.TabsProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
7
|
+
/**
|
|
8
|
+
* TabList component
|
|
9
|
+
*/
|
|
10
|
+
declare const TabsList: import('react').ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
11
|
+
/**
|
|
12
|
+
* A component that renders a trigger button for the Tabs component
|
|
13
|
+
*/
|
|
14
|
+
declare const TabsTrigger: import('react').ForwardRefExoticComponent<{
|
|
15
|
+
value: string;
|
|
16
|
+
label: import('react').ReactNode;
|
|
17
|
+
hasIcon?: boolean | undefined;
|
|
18
|
+
} & Omit<TabsPrimitive.TabsTriggerProps & import('react').RefAttributes<HTMLButtonElement>, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
19
|
+
/**
|
|
20
|
+
* TabsContent component
|
|
21
|
+
*/
|
|
22
|
+
declare const TabsContent: import('react').ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
23
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TabsProps } from '@radix-ui/react-tabs';
|
|
3
|
+
|
|
4
|
+
declare const _default: import('@storybook/csf').ComponentAnnotations<import('@storybook/react/dist/types-a5624094').R, TabsProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const Template: {
|
|
7
|
+
render: (args: TabsProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const TAG_COLORS: readonly ["gray", "sand", "purple", "green", "red", "salmon", "orange", "pink", "yellow", "darkblue", "lightblue", "mint"];
|
|
2
|
+
export declare const TAG_TYPES: readonly ["soft", "outlined", "filled"];
|
|
3
|
+
export declare const TAG_ICON_SIZE = 12;
|
|
4
|
+
export declare const TAG_FONT_WEIGHTS: readonly ["semibold", "regular"];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TagProps } from '.';
|
|
3
|
+
|
|
4
|
+
declare const _default: import('@storybook/csf').ComponentAnnotations<import('@storybook/react/dist/types-a5624094').R, Omit<TagProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const Template: {
|
|
7
|
+
render: (args: TagProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TAG_TYPES, TAG_COLORS, TAG_FONT_WEIGHTS } from './constants';
|
|
2
|
+
import { ComponentPropsWithRef, SVGProps } from 'react';
|
|
3
|
+
|
|
4
|
+
export type TagColor = (typeof TAG_COLORS)[number];
|
|
5
|
+
export type TagVariant = (typeof TAG_TYPES)[number];
|
|
6
|
+
export type TagFontWeights = (typeof TAG_FONT_WEIGHTS)[number];
|
|
7
|
+
export type TagProps = {
|
|
8
|
+
id?: string;
|
|
9
|
+
label: React.ReactNode;
|
|
10
|
+
color?: TagColor;
|
|
11
|
+
variant?: TagVariant;
|
|
12
|
+
fontWeight?: TagFontWeights;
|
|
13
|
+
closeIcon?: boolean;
|
|
14
|
+
renderIcon?: ((props?: Partial<SVGProps<SVGSVGElement>>) => React.ReactNode) | null;
|
|
15
|
+
onCloseIconClicked?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
16
|
+
} & ComponentPropsWithRef<'div'>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TagQualityMetricProps } from '.';
|
|
3
|
+
|
|
4
|
+
declare const _default: import('@storybook/csf').ComponentAnnotations<import('@storybook/react/dist/types-a5624094').R, Omit<TagQualityMetricProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const Template: {
|
|
7
|
+
render: (args: TagQualityMetricProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { QualityMetricIconProps } from '../quality-metric-icon';
|
|
2
|
+
import { ComponentPropsWithRef } from 'react';
|
|
3
|
+
|
|
4
|
+
export type TagQualityMetricProps = {
|
|
5
|
+
label: string;
|
|
6
|
+
qualityMetricIcon?: QualityMetricIconProps;
|
|
7
|
+
startIcon?: boolean;
|
|
8
|
+
endIcon?: boolean;
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
onEndIconClicked?: () => void;
|
|
11
|
+
} & ComponentPropsWithRef<'div'>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TextProps } from '.';
|
|
3
|
+
|
|
4
|
+
declare const _default: import('@storybook/csf').ComponentAnnotations<import('@storybook/react/dist/types-a5624094').R, Omit<TextProps, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const Template: {
|
|
7
|
+
render: (args: TextProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TEXT_SIZE, TEXT_FONT_WEIGHTS } from '.';
|
|
2
|
+
import { ColorVariants } from '../../types';
|
|
3
|
+
import { ComponentPropsWithRef } from 'react';
|
|
4
|
+
|
|
5
|
+
export type TextSize = (typeof TEXT_SIZE)[number];
|
|
6
|
+
export type TextFontWeights = (typeof TEXT_FONT_WEIGHTS)[number];
|
|
7
|
+
export type TextProps = {
|
|
8
|
+
size?: TextSize;
|
|
9
|
+
fontWeight?: TextFontWeights;
|
|
10
|
+
color?: ColorVariants;
|
|
11
|
+
} & ComponentPropsWithRef<'p'>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ToastProps as Props } from '..';
|
|
2
|
+
|
|
3
|
+
type ToastProps = {
|
|
4
|
+
id: string;
|
|
5
|
+
} & Props;
|
|
6
|
+
declare const actionTypes: {
|
|
7
|
+
readonly ADD_TOAST: "ADD_TOAST";
|
|
8
|
+
readonly UPDATE_TOAST: "UPDATE_TOAST";
|
|
9
|
+
readonly DISMISS_TOAST: "DISMISS_TOAST";
|
|
10
|
+
readonly REMOVE_TOAST: "REMOVE_TOAST";
|
|
11
|
+
};
|
|
12
|
+
type ActionType = typeof actionTypes;
|
|
13
|
+
type Action = {
|
|
14
|
+
type: ActionType['ADD_TOAST'];
|
|
15
|
+
toast: ToastProps;
|
|
16
|
+
} | {
|
|
17
|
+
type: ActionType['UPDATE_TOAST'];
|
|
18
|
+
toast: Partial<ToastProps>;
|
|
19
|
+
} | {
|
|
20
|
+
type: ActionType['DISMISS_TOAST'];
|
|
21
|
+
toastId?: ToastProps['id'];
|
|
22
|
+
} | {
|
|
23
|
+
type: ActionType['REMOVE_TOAST'];
|
|
24
|
+
toastId?: ToastProps['id'];
|
|
25
|
+
};
|
|
26
|
+
interface State {
|
|
27
|
+
toasts: ToastProps[];
|
|
28
|
+
}
|
|
29
|
+
export declare const reducer: (state: State, action: Action) => State;
|
|
30
|
+
type Toast = Omit<ToastProps, 'id'>;
|
|
31
|
+
declare function toast({ ...props }: Toast): {
|
|
32
|
+
id: string;
|
|
33
|
+
dismiss: () => void;
|
|
34
|
+
update: (props: ToastProps) => void;
|
|
35
|
+
};
|
|
36
|
+
declare function useToast(): {
|
|
37
|
+
toast: typeof toast;
|
|
38
|
+
dismiss: (toastId?: string) => void;
|
|
39
|
+
toasts: ToastProps[];
|
|
40
|
+
};
|
|
41
|
+
export { useToast, toast };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { ToastProvider, ToastViewport, Toast } from './toast';
|
|
2
|
+
export { Toaster } from './toaster';
|
|
3
|
+
export type { ToastProps, ToastColor, ToastVariant } from './types';
|
|
4
|
+
export { TOAST_COLOR, TOAST_VARIANT } from './constants';
|
|
5
|
+
export { useToast } from './hooks/use-toast';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as ToastPrimitive from '@radix-ui/react-toast';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the ToastProvider component
|
|
5
|
+
*/
|
|
6
|
+
declare const ToastProvider: import('react').FC<ToastPrimitive.ToastProviderProps>;
|
|
7
|
+
declare const ToastViewport: import('react').ForwardRefExoticComponent<Omit<ToastPrimitive.ToastViewportProps & import('react').RefAttributes<HTMLOListElement>, "ref"> & import('react').RefAttributes<HTMLOListElement>>;
|
|
8
|
+
declare const Toast: import('react').ForwardRefExoticComponent<{
|
|
9
|
+
variant?: "dark" | "outlined" | "soft" | undefined;
|
|
10
|
+
color?: "red" | "green" | "gray" | undefined;
|
|
11
|
+
title?: import('react').ReactNode;
|
|
12
|
+
description?: import('react').ReactNode;
|
|
13
|
+
leftIcon?: import('react').ReactNode;
|
|
14
|
+
hasCloseIcon?: boolean | undefined;
|
|
15
|
+
action?: import('react').ReactNode;
|
|
16
|
+
} & Omit<ToastPrimitive.ToastProps & import('react').RefAttributes<HTMLLIElement>, "ref"> & import('react').RefAttributes<HTMLLIElement>>;
|
|
17
|
+
export { Toast, ToastProvider, ToastViewport };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import { Toast } from '.';
|
|
4
|
+
|
|
5
|
+
declare const _default: import('@storybook/csf').ComponentAnnotations<import('@storybook/react/dist/types-a5624094').R, {
|
|
6
|
+
variant?: "dark" | "outlined" | "soft" | undefined;
|
|
7
|
+
color?: "red" | "green" | "gray" | undefined;
|
|
8
|
+
title?: React.ReactNode;
|
|
9
|
+
description?: React.ReactNode;
|
|
10
|
+
leftIcon?: React.ReactNode;
|
|
11
|
+
hasCloseIcon?: boolean | undefined;
|
|
12
|
+
action?: React.ReactNode;
|
|
13
|
+
} & Omit<import('@radix-ui/react-toast').ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
|
|
14
|
+
export default _default;
|
|
15
|
+
type Story = StoryObj<typeof Toast>;
|
|
16
|
+
export declare const Template: Story;
|
|
17
|
+
export declare const WithAction: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Toaster: () => JSX.Element;
|