tharaday 0.5.11 → 0.6.1
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/List/List.d.ts +5 -0
- package/dist/components/List/List.stories.d.ts +25 -0
- package/dist/components/List/List.types.d.ts +42 -0
- package/dist/components/List/ListItem.d.ts +2 -0
- package/dist/components/List/ListItem.types.d.ts +9 -0
- package/dist/components/Slider/Slider.d.ts +1 -1
- package/dist/components/Slider/Slider.stories.d.ts +2 -1
- package/dist/components/Slider/Slider.types.d.ts +1 -0
- package/dist/components/Tree/Tree.d.ts +5 -0
- package/dist/components/Tree/Tree.stories.d.ts +20 -0
- package/dist/components/Tree/Tree.types.d.ts +14 -0
- package/dist/components/Tree/TreeItem.d.ts +2 -0
- package/dist/components/Tree/TreeItem.types.d.ts +15 -0
- package/dist/ds.css +1 -1
- package/dist/ds.js +1557 -1254
- package/dist/ds.umd.cjs +1 -1
- package/dist/index.d.ts +8 -0
- package/package.json +5 -5
- package/src/components/List/List.module.css +85 -0
- package/src/components/List/List.stories.tsx +92 -0
- package/src/components/List/List.tsx +93 -0
- package/src/components/List/List.types.ts +45 -0
- package/src/components/List/ListItem.module.css +12 -0
- package/src/components/List/ListItem.tsx +12 -0
- package/src/components/List/ListItem.types.ts +10 -0
- package/src/components/Slider/Slider.module.css +19 -0
- package/src/components/Slider/Slider.stories.tsx +19 -0
- package/src/components/Slider/Slider.tsx +101 -2
- package/src/components/Slider/Slider.types.ts +1 -0
- package/src/components/Tree/Tree.module.css +5 -0
- package/src/components/Tree/Tree.stories.tsx +113 -0
- package/src/components/Tree/Tree.tsx +27 -0
- package/src/components/Tree/Tree.types.ts +16 -0
- package/src/components/Tree/TreeItem.module.css +63 -0
- package/src/components/Tree/TreeItem.tsx +146 -0
- package/src/components/Tree/TreeItem.types.ts +16 -0
- package/src/index.ts +8 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ListProps } from './List.types';
|
|
2
|
+
export declare const List: {
|
|
3
|
+
({ children, variant, spacing, className, margin, marginX, marginY, marginTop, marginBottom, marginLeft, marginRight, padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight, style, ...props }: ListProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
Item: ({ children, icon, className, ...props }: import('./ListItem.types').ListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: {
|
|
5
|
+
({ children, variant, spacing, className, margin, marginX, marginY, marginTop, marginBottom, marginLeft, marginRight, padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight, style, ...props }: import('./List.types').ListProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
Item: ({ children, icon, className, ...props }: import('./ListItem.types').ListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
};
|
|
8
|
+
tags: string[];
|
|
9
|
+
argTypes: {
|
|
10
|
+
variant: {
|
|
11
|
+
control: "select";
|
|
12
|
+
options: string[];
|
|
13
|
+
};
|
|
14
|
+
spacing: {
|
|
15
|
+
control: "number";
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default meta;
|
|
20
|
+
type Story = StoryObj<typeof meta>;
|
|
21
|
+
export declare const Unordered: Story;
|
|
22
|
+
export declare const Ordered: Story;
|
|
23
|
+
export declare const Spacing: Story;
|
|
24
|
+
export declare const WithIcons: Story;
|
|
25
|
+
export declare const Nested: Story;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ReactNode, HTMLAttributes } from 'react';
|
|
2
|
+
import { BoxPadding, BoxMargin } from '../Box/Box.types';
|
|
3
|
+
export type ListVariant = 'unordered' | 'ordered' | 'none';
|
|
4
|
+
export interface ListProps extends HTMLAttributes<HTMLUListElement | HTMLOListElement> {
|
|
5
|
+
/** The content of the list, usually ListItem components */
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
/** The visual variant of the list */
|
|
8
|
+
variant?: ListVariant;
|
|
9
|
+
/** Spacing between list items */
|
|
10
|
+
spacing?: BoxPadding;
|
|
11
|
+
/** Additional class name */
|
|
12
|
+
className?: string;
|
|
13
|
+
/** Margin for the entire list */
|
|
14
|
+
margin?: BoxMargin;
|
|
15
|
+
/** Horizontal margin */
|
|
16
|
+
marginX?: BoxMargin;
|
|
17
|
+
/** Vertical margin */
|
|
18
|
+
marginY?: BoxMargin;
|
|
19
|
+
/** Top margin */
|
|
20
|
+
marginTop?: BoxMargin;
|
|
21
|
+
/** Bottom margin */
|
|
22
|
+
marginBottom?: BoxMargin;
|
|
23
|
+
/** Left margin */
|
|
24
|
+
marginLeft?: BoxMargin;
|
|
25
|
+
/** Right margin */
|
|
26
|
+
marginRight?: BoxMargin;
|
|
27
|
+
/** Padding for the entire list */
|
|
28
|
+
padding?: BoxPadding;
|
|
29
|
+
/** Horizontal padding */
|
|
30
|
+
paddingX?: BoxPadding;
|
|
31
|
+
/** Vertical padding */
|
|
32
|
+
paddingY?: BoxPadding;
|
|
33
|
+
/** Top padding */
|
|
34
|
+
paddingTop?: BoxPadding;
|
|
35
|
+
/** Bottom padding */
|
|
36
|
+
paddingBottom?: BoxPadding;
|
|
37
|
+
/** Left padding */
|
|
38
|
+
paddingLeft?: BoxPadding;
|
|
39
|
+
/** Right padding */
|
|
40
|
+
paddingRight?: BoxPadding;
|
|
41
|
+
}
|
|
42
|
+
export * from './ListItem.types';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode, HTMLAttributes } from 'react';
|
|
2
|
+
export interface ListItemProps extends HTMLAttributes<HTMLLIElement> {
|
|
3
|
+
/** The content of the list item */
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
/** Additional class name */
|
|
6
|
+
className?: string;
|
|
7
|
+
/** Optional icon or element to display before the content */
|
|
8
|
+
icon?: ReactNode;
|
|
9
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { SliderProps } from './Slider.types.ts';
|
|
2
|
-
export declare const Slider: ({ size, label, helperText, fullWidth, showValue, className, id, value, defaultValue, onValueChange, ...props }: SliderProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const Slider: ({ size, label, helperText, fullWidth, showValue, showInputs, className, id, value, defaultValue, onValueChange, ...props }: SliderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ size, label, helperText, fullWidth, showValue, className, id, value, defaultValue, onValueChange, ...props }: import('./Slider.types.ts').SliderProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
component: ({ size, label, helperText, fullWidth, showValue, showInputs, className, id, value, defaultValue, onValueChange, ...props }: import('./Slider.types.ts').SliderProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
parameters: {
|
|
7
7
|
layout: string;
|
|
@@ -20,3 +20,4 @@ export declare const Disabled: Story;
|
|
|
20
20
|
export declare const Sizes: Story;
|
|
21
21
|
export declare const FullWidth: Story;
|
|
22
22
|
export declare const DualValue: Story;
|
|
23
|
+
export declare const WithInputs: Story;
|
|
@@ -8,6 +8,7 @@ export interface SliderProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
|
|
|
8
8
|
helperText?: string;
|
|
9
9
|
fullWidth?: boolean;
|
|
10
10
|
showValue?: boolean;
|
|
11
|
+
showInputs?: boolean;
|
|
11
12
|
value?: SliderValue;
|
|
12
13
|
defaultValue?: SliderValue;
|
|
13
14
|
onValueChange?: (value: SliderValue) => void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { TreeProps } from './Tree.types';
|
|
2
|
+
export declare const Tree: {
|
|
3
|
+
({ data, className, defaultExpanded, expandIcon, collapseIcon, ...props }: TreeProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
Item: ({ data, label, defaultExpanded, expandIcon, collapseIcon, isRoot, }: import('./TreeItem.types').TreeItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: {
|
|
5
|
+
({ data, className, defaultExpanded, expandIcon, collapseIcon, ...props }: import('./Tree.types').TreeProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
Item: ({ data, label, defaultExpanded, expandIcon, collapseIcon, isRoot, }: import('./TreeItem.types').TreeItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
};
|
|
8
|
+
tags: string[];
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Simple: Story;
|
|
13
|
+
export declare const Nested: Story;
|
|
14
|
+
export declare const ArrayOnly: Story;
|
|
15
|
+
export declare const Primitive: Story;
|
|
16
|
+
export declare const NullValue: Story;
|
|
17
|
+
export declare const Collapsed: Story;
|
|
18
|
+
export declare const ExpandedByDefault: Story;
|
|
19
|
+
export declare const CustomIcons: Story;
|
|
20
|
+
export declare const EmptyStructures: Story;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface TreeProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/** The data to be displayed in the tree */
|
|
4
|
+
data: unknown;
|
|
5
|
+
/** Additional class name */
|
|
6
|
+
className?: string;
|
|
7
|
+
/** Whether the tree items should be expanded by default */
|
|
8
|
+
defaultExpanded?: boolean;
|
|
9
|
+
/** Custom icon for expanded state */
|
|
10
|
+
expandIcon?: ReactNode;
|
|
11
|
+
/** Custom icon for collapsed state */
|
|
12
|
+
collapseIcon?: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export * from './TreeItem.types';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface TreeItemProps {
|
|
3
|
+
/** The data to be displayed in the tree item */
|
|
4
|
+
data: unknown;
|
|
5
|
+
/** Label for the tree item (e.g., object key) */
|
|
6
|
+
label?: string;
|
|
7
|
+
/** Whether the tree items should be expanded by default */
|
|
8
|
+
defaultExpanded?: boolean;
|
|
9
|
+
/** Custom icon for expanded state */
|
|
10
|
+
expandIcon?: ReactNode;
|
|
11
|
+
/** Custom icon for collapsed state */
|
|
12
|
+
collapseIcon?: ReactNode;
|
|
13
|
+
/** Whether the tree item is a root element */
|
|
14
|
+
isRoot?: boolean;
|
|
15
|
+
}
|