@nurihaus/web-design-system 1.4.45 → 1.4.47
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/drop-down/drop-down.d.ts +1 -1
- package/dist/components/tabs/base-tabs.d.ts +11 -0
- package/dist/components/tabs/tabs-props.d.ts +9 -0
- package/dist/components/tabs/tabs-type.d.ts +40 -0
- package/dist/components/tabs/tabs.d.ts +7 -0
- package/dist/components/tabs/tabs.stories.d.ts +23 -0
- package/dist/index.js +2486 -2406
- package/package.json +4 -3
- package/styles/align-items.css +19 -0
- package/styles/display.css +31 -0
- package/styles/flex-direction.css +15 -0
- package/styles/index.css +33 -0
- package/styles/justify-content.css +23 -0
- package/styles/overflow.css +47 -0
- package/styles/position.css +19 -0
- package/styles/reset.css +52 -0
- package/styles/token/color.css +119 -0
- package/styles/token/colors.ts +105 -0
- package/styles/token/cursor.css +5 -0
- package/styles/token/font.css +56 -0
- package/styles/token/radius.css +6 -0
- package/styles/token/space.css +13 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { size } from './drop-down-props';
|
|
3
3
|
export interface DropDownProps {
|
|
4
|
-
size?: typeof size;
|
|
4
|
+
size?: (typeof size)[number];
|
|
5
5
|
defaultValue?: string;
|
|
6
6
|
value?: string;
|
|
7
7
|
onValueChange?: (value: string) => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { TabsContentProps, TabsIndicatorProps, TabsListProps, TabsRootProps, TabsTriggerProps } from './tabs-type';
|
|
3
|
+
declare const TabsRoot: {
|
|
4
|
+
(props: PropsWithChildren<TabsRootProps>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
List: (props: PropsWithChildren<TabsListProps>) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
Trigger: (props: PropsWithChildren<TabsTriggerProps>) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
Content: (props: PropsWithChildren<TabsContentProps>) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
Indicator: (props: TabsIndicatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
};
|
|
10
|
+
export default TabsRoot;
|
|
11
|
+
export type { TabsRootProps, TabsListProps, TabsTriggerProps, TabsContentProps, TabsIndicatorProps };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef, ReactNode, CSSProperties } from 'react';
|
|
2
|
+
export type TabsValue = string | null;
|
|
3
|
+
export type TabsVariant = 'underline' | 'filled';
|
|
4
|
+
export interface TabsItem {
|
|
5
|
+
id: string;
|
|
6
|
+
label: ReactNode;
|
|
7
|
+
content: ReactNode;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
leftIcon?: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export interface TabsProps {
|
|
12
|
+
items: TabsItem[];
|
|
13
|
+
variant?: TabsVariant;
|
|
14
|
+
value?: TabsValue;
|
|
15
|
+
defaultValue?: TabsValue;
|
|
16
|
+
onValueChange?: (id: TabsValue) => void;
|
|
17
|
+
className?: string;
|
|
18
|
+
style?: CSSProperties;
|
|
19
|
+
}
|
|
20
|
+
export interface TabsRootProps {
|
|
21
|
+
value?: TabsValue;
|
|
22
|
+
defaultValue?: TabsValue;
|
|
23
|
+
onValueChange?: (id: TabsValue) => void;
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface TabsListProps extends ComponentPropsWithRef<'div'> {
|
|
27
|
+
asChild?: boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface TabsTriggerProps extends Omit<ComponentPropsWithRef<'button'>, 'value'> {
|
|
30
|
+
asChild?: boolean;
|
|
31
|
+
id: string;
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface TabsContentProps extends Omit<ComponentPropsWithRef<'div'>, 'value'> {
|
|
35
|
+
asChild?: boolean;
|
|
36
|
+
id: string;
|
|
37
|
+
}
|
|
38
|
+
export interface TabsIndicatorProps extends ComponentPropsWithRef<'div'> {
|
|
39
|
+
asChild?: boolean;
|
|
40
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { TabsProps } from './tabs-type';
|
|
2
|
+
import '../../styles/token/color.css';
|
|
3
|
+
import '../../styles/token/font.css';
|
|
4
|
+
import './tabs-style.css';
|
|
5
|
+
declare const Tabs: (props: TabsProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default Tabs;
|
|
7
|
+
export type { TabsProps };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: (props: import("./tabs-type").TabsProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
args: {
|
|
6
|
+
variant: "underline";
|
|
7
|
+
defaultValue: string;
|
|
8
|
+
items: ({
|
|
9
|
+
id: string;
|
|
10
|
+
label: string;
|
|
11
|
+
content: import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
leftIcon: import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
} | {
|
|
14
|
+
id: string;
|
|
15
|
+
label: string;
|
|
16
|
+
content: import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
leftIcon?: undefined;
|
|
18
|
+
})[];
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export default meta;
|
|
22
|
+
type Story = StoryObj<typeof meta>;
|
|
23
|
+
export declare const Default: Story;
|