tharaday 0.3.2 → 0.5.0
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/Badge/Badge.types.d.ts +1 -0
- package/dist/components/Card/Card.types.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.types.d.ts +1 -0
- package/dist/components/Header/Header.d.ts +1 -1
- package/dist/components/Header/Header.stories.d.ts +1 -1
- package/dist/components/Header/Header.types.d.ts +2 -0
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Input/Input.stories.d.ts +4 -1
- package/dist/components/Input/Input.types.d.ts +2 -0
- package/dist/components/NavBar/NavBar.d.ts +1 -1
- package/dist/components/NavBar/NavBar.types.d.ts +4 -0
- package/dist/components/Notification/Notification.types.d.ts +1 -0
- package/dist/components/RadioButton/RadioButton.types.d.ts +1 -0
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Select/Select.stories.d.ts +4 -1
- package/dist/components/Select/Select.types.d.ts +2 -0
- package/dist/components/Skeleton/Skeleton.types.d.ts +1 -0
- package/dist/components/Stepper/Step.d.ts +1 -1
- package/dist/components/Stepper/Step.types.d.ts +1 -0
- package/dist/components/Stepper/Stepper.types.d.ts +1 -0
- package/dist/components/Switch/Switch.types.d.ts +1 -0
- package/dist/components/Table/Table.types.d.ts +1 -0
- package/dist/components/Text/Text.types.d.ts +2 -0
- package/dist/components/Textarea/Textarea.d.ts +1 -1
- package/dist/components/Textarea/Textarea.stories.d.ts +4 -1
- package/dist/components/Textarea/Textarea.types.d.ts +2 -0
- package/dist/ds.css +1 -1
- package/dist/ds.js +797 -777
- package/dist/ds.umd.cjs +1 -1
- package/dist/layouts/AppLayout/AppLayout.d.ts +1 -1
- package/dist/layouts/AppLayout/AppLayout.stories.d.ts +1 -1
- package/dist/layouts/AppLayout/AppLayout.types.d.ts +8 -0
- package/dist/layouts/AuthLayout/AuthLayout.d.ts +1 -1
- package/dist/layouts/AuthLayout/AuthLayout.stories.d.ts +1 -1
- package/dist/layouts/AuthLayout/AuthLayout.types.d.ts +1 -0
- package/dist/layouts/DashboardLayout/DashboardLayout.d.ts +1 -1
- package/dist/layouts/DashboardLayout/DashboardLayout.stories.d.ts +1 -1
- package/dist/layouts/DashboardLayout/DashboardLayout.types.d.ts +2 -0
- package/dist/layouts/SettingsLayout/SettingsLayout.d.ts +1 -1
- package/dist/layouts/SettingsLayout/SettingsLayout.stories.d.ts +1 -1
- package/dist/layouts/SettingsLayout/SettingsLayout.types.d.ts +2 -0
- package/package.json +1 -1
- package/src/components/Badge/Badge.types.ts +1 -0
- package/src/components/Card/Card.types.ts +1 -0
- package/src/components/Checkbox/Checkbox.types.ts +1 -0
- package/src/components/Header/Header.tsx +6 -2
- package/src/components/Header/Header.types.ts +2 -0
- package/src/components/Input/Input.module.css +11 -2
- package/src/components/Input/Input.stories.tsx +3 -0
- package/src/components/Input/Input.tsx +2 -1
- package/src/components/Input/Input.types.ts +2 -0
- package/src/components/NavBar/NavBar.tsx +2 -1
- package/src/components/NavBar/NavBar.types.ts +4 -0
- package/src/components/Notification/Notification.types.ts +1 -0
- package/src/components/RadioButton/RadioButton.types.ts +1 -0
- package/src/components/Select/Select.module.css +11 -2
- package/src/components/Select/Select.stories.tsx +3 -0
- package/src/components/Select/Select.tsx +2 -1
- package/src/components/Select/Select.types.ts +2 -0
- package/src/components/Skeleton/Skeleton.types.ts +1 -0
- package/src/components/Stepper/Step.tsx +2 -1
- package/src/components/Stepper/Step.types.ts +1 -0
- package/src/components/Stepper/Stepper.types.ts +1 -0
- package/src/components/Switch/Switch.types.ts +1 -0
- package/src/components/Table/Table.types.ts +1 -0
- package/src/components/Text/Text.types.ts +2 -0
- package/src/components/Textarea/Textarea.module.css +11 -2
- package/src/components/Textarea/Textarea.stories.tsx +3 -0
- package/src/components/Textarea/Textarea.tsx +2 -1
- package/src/components/Textarea/Textarea.types.ts +2 -0
- package/src/layouts/AppLayout/AppLayout.tsx +8 -2
- package/src/layouts/AppLayout/AppLayout.types.ts +8 -0
- package/src/layouts/AuthLayout/AuthLayout.tsx +4 -2
- package/src/layouts/AuthLayout/AuthLayout.types.tsx +1 -0
- package/src/layouts/DashboardLayout/DashboardLayout.tsx +7 -2
- package/src/layouts/DashboardLayout/DashboardLayout.types.tsx +2 -0
- package/src/layouts/SettingsLayout/SettingsLayout.tsx +7 -2
- package/src/layouts/SettingsLayout/SettingsLayout.types.tsx +2 -0
|
@@ -9,10 +9,12 @@ export interface SelectOption {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'size'> {
|
|
12
|
+
className?: string;
|
|
12
13
|
size?: SelectSize;
|
|
13
14
|
error?: boolean;
|
|
14
15
|
label?: string;
|
|
15
16
|
helperText?: string;
|
|
16
17
|
options?: SelectOption[];
|
|
17
18
|
children?: ReactNode;
|
|
19
|
+
fullWidth?: boolean;
|
|
18
20
|
}
|
|
@@ -3,6 +3,7 @@ import type { HTMLAttributes } from 'react';
|
|
|
3
3
|
export type SkeletonVariant = 'text' | 'circular' | 'rectangular' | 'rounded';
|
|
4
4
|
|
|
5
5
|
export interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
className?: string;
|
|
6
7
|
variant?: SkeletonVariant;
|
|
7
8
|
width?: string | number;
|
|
8
9
|
height?: string | number;
|
|
@@ -12,6 +12,7 @@ export const Step = ({
|
|
|
12
12
|
onStepClick,
|
|
13
13
|
isLast,
|
|
14
14
|
id,
|
|
15
|
+
className,
|
|
15
16
|
}: StepProps) => {
|
|
16
17
|
const isDisabled = Boolean(step.disabled);
|
|
17
18
|
const StepContent: ElementType = isInteractive ? 'button' : 'div';
|
|
@@ -31,7 +32,7 @@ export const Step = ({
|
|
|
31
32
|
};
|
|
32
33
|
|
|
33
34
|
return (
|
|
34
|
-
<li className={clsx(styles.step, styles[status], isDisabled && styles.disabled)}>
|
|
35
|
+
<li className={clsx(styles.step, styles[status], isDisabled && styles.disabled, className)}>
|
|
35
36
|
<StepContent
|
|
36
37
|
id={id}
|
|
37
38
|
type={isInteractive ? 'button' : undefined}
|
|
@@ -6,6 +6,7 @@ export type StepperOrientation = 'horizontal' | 'vertical';
|
|
|
6
6
|
export type StepperSize = 'sm' | 'md' | 'lg';
|
|
7
7
|
|
|
8
8
|
export interface StepperProps extends HTMLAttributes<HTMLOListElement> {
|
|
9
|
+
className?: string;
|
|
9
10
|
steps: StepOptions[];
|
|
10
11
|
currentStep?: number | string;
|
|
11
12
|
orientation?: StepperOrientation;
|
|
@@ -26,6 +26,8 @@ export type TextColor =
|
|
|
26
26
|
| 'info';
|
|
27
27
|
|
|
28
28
|
export interface TextProps extends HTMLAttributes<HTMLElement> {
|
|
29
|
+
/** Additional class name */
|
|
30
|
+
className?: string;
|
|
29
31
|
/** The content to display */
|
|
30
32
|
children: ReactNode;
|
|
31
33
|
/** The typographic style to apply */
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
.wrapper {
|
|
2
|
-
display: flex;
|
|
2
|
+
display: inline-flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: var(--ds-space-1);
|
|
5
|
+
width: fit-content;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.fullWidth {
|
|
5
9
|
width: 100%;
|
|
10
|
+
display: flex;
|
|
6
11
|
}
|
|
7
12
|
|
|
8
13
|
.label {
|
|
@@ -14,7 +19,7 @@
|
|
|
14
19
|
|
|
15
20
|
.textareaRoot {
|
|
16
21
|
box-sizing: border-box;
|
|
17
|
-
width:
|
|
22
|
+
width: auto;
|
|
18
23
|
font-family: var(--ds-font-family-base);
|
|
19
24
|
border: 1px solid var(--ds-border-1);
|
|
20
25
|
border-radius: var(--ds-radius-md);
|
|
@@ -27,6 +32,10 @@
|
|
|
27
32
|
resize: vertical;
|
|
28
33
|
}
|
|
29
34
|
|
|
35
|
+
.fullWidth .textareaRoot {
|
|
36
|
+
width: 100%;
|
|
37
|
+
}
|
|
38
|
+
|
|
30
39
|
.textareaRoot:focus {
|
|
31
40
|
outline: none;
|
|
32
41
|
border-color: var(--ds-ring);
|
|
@@ -9,6 +9,7 @@ export const Textarea = ({
|
|
|
9
9
|
error,
|
|
10
10
|
label,
|
|
11
11
|
helperText,
|
|
12
|
+
fullWidth = false,
|
|
12
13
|
className,
|
|
13
14
|
id,
|
|
14
15
|
rows = 4,
|
|
@@ -19,7 +20,7 @@ export const Textarea = ({
|
|
|
19
20
|
const helperId = helperText ? `${componentId}-help` : undefined;
|
|
20
21
|
|
|
21
22
|
return (
|
|
22
|
-
<div className={clsx(styles.wrapper, className)}>
|
|
23
|
+
<div className={clsx(styles.wrapper, fullWidth && styles.fullWidth, className)}>
|
|
23
24
|
{label && (
|
|
24
25
|
<label htmlFor={componentId} className={styles.label}>
|
|
25
26
|
{label}
|
|
@@ -3,9 +3,11 @@ import type { TextareaHTMLAttributes } from 'react';
|
|
|
3
3
|
export type TextareaSize = 'sm' | 'md' | 'lg';
|
|
4
4
|
|
|
5
5
|
export interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
6
|
+
className?: string;
|
|
6
7
|
size?: TextareaSize;
|
|
7
8
|
error?: boolean;
|
|
8
9
|
label?: string;
|
|
9
10
|
helperText?: string;
|
|
10
11
|
rows?: number;
|
|
12
|
+
fullWidth?: boolean;
|
|
11
13
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import clsx from 'clsx';
|
|
2
|
+
|
|
1
3
|
import styles from './AppLayout.module.css';
|
|
2
4
|
import type { AppLayoutProps } from './AppLayout.types.ts';
|
|
3
5
|
import { Header } from '../../components/Header/Header.tsx';
|
|
@@ -11,7 +13,7 @@ import { NavBar } from '../../components/NavBar/NavBar.tsx';
|
|
|
11
13
|
*/
|
|
12
14
|
export const AppLayout = ({
|
|
13
15
|
headerLogo,
|
|
14
|
-
headerTitle
|
|
16
|
+
headerTitle,
|
|
15
17
|
user,
|
|
16
18
|
navItems,
|
|
17
19
|
activeNavId,
|
|
@@ -21,9 +23,11 @@ export const AppLayout = ({
|
|
|
21
23
|
onLogout,
|
|
22
24
|
onCreateAccount,
|
|
23
25
|
onNavItemClick,
|
|
26
|
+
className,
|
|
27
|
+
maxWidth,
|
|
24
28
|
}: AppLayoutProps) => {
|
|
25
29
|
return (
|
|
26
|
-
<div className={styles.root}>
|
|
30
|
+
<div className={clsx(styles.root, className)}>
|
|
27
31
|
<Header
|
|
28
32
|
logo={headerLogo}
|
|
29
33
|
title={headerTitle}
|
|
@@ -31,12 +35,14 @@ export const AppLayout = ({
|
|
|
31
35
|
onLogin={onLogin}
|
|
32
36
|
onLogout={onLogout}
|
|
33
37
|
onCreateAccount={onCreateAccount}
|
|
38
|
+
maxWidth={maxWidth}
|
|
34
39
|
/>
|
|
35
40
|
<NavBar
|
|
36
41
|
items={navItems}
|
|
37
42
|
activeId={activeNavId}
|
|
38
43
|
actions={navActions}
|
|
39
44
|
onItemClick={onNavItemClick}
|
|
45
|
+
maxWidth={maxWidth}
|
|
40
46
|
/>
|
|
41
47
|
<main className={styles.main}>
|
|
42
48
|
<div className={styles.container}>{children}</div>
|
|
@@ -3,6 +3,14 @@ import type { ReactNode } from 'react';
|
|
|
3
3
|
import type { NavBarItem } from '../../components/NavBar/NavBar.types.ts';
|
|
4
4
|
|
|
5
5
|
export interface AppLayoutProps {
|
|
6
|
+
/**
|
|
7
|
+
* Additional class name for the layout root
|
|
8
|
+
*/
|
|
9
|
+
className?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Max width for header and navbar containers
|
|
12
|
+
*/
|
|
13
|
+
maxWidth?: string | number;
|
|
6
14
|
/**
|
|
7
15
|
* Header logo element
|
|
8
16
|
*/
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
import clsx from 'clsx';
|
|
2
|
+
|
|
1
3
|
import styles from './AuthLayout.module.css';
|
|
2
4
|
import type { AuthLayoutProps } from './AuthLayout.types.tsx';
|
|
3
5
|
import { Box } from '../../components/Box/Box.tsx';
|
|
4
6
|
import { Text } from '../../components/Text/Text.tsx';
|
|
5
7
|
|
|
6
|
-
export const AuthLayout = ({ logo, title, description, children }: AuthLayoutProps) => {
|
|
8
|
+
export const AuthLayout = ({ logo, title, description, children, className }: AuthLayoutProps) => {
|
|
7
9
|
return (
|
|
8
|
-
<Box className={styles.root}>
|
|
10
|
+
<Box className={clsx(styles.root, className)}>
|
|
9
11
|
<Box className={styles.card}>
|
|
10
12
|
<Box className={styles.header}>
|
|
11
13
|
{logo && <Box className={styles.logo}>{logo}</Box>}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import clsx from 'clsx';
|
|
2
|
+
|
|
1
3
|
import styles from './DashboardLayout.module.css';
|
|
2
4
|
import type { DashboardLayoutProps } from './DashboardLayout.types.tsx';
|
|
3
5
|
import { Header } from '../../components/Header/Header.tsx';
|
|
4
6
|
|
|
5
7
|
export const DashboardLayout = ({
|
|
6
8
|
headerLogo,
|
|
7
|
-
headerTitle
|
|
9
|
+
headerTitle,
|
|
8
10
|
breadcrumbs,
|
|
9
11
|
actions,
|
|
10
12
|
stats,
|
|
@@ -13,9 +15,11 @@ export const DashboardLayout = ({
|
|
|
13
15
|
onLogin,
|
|
14
16
|
onLogout,
|
|
15
17
|
onCreateAccount,
|
|
18
|
+
className,
|
|
19
|
+
maxWidth,
|
|
16
20
|
}: DashboardLayoutProps) => {
|
|
17
21
|
return (
|
|
18
|
-
<div className={styles.root}>
|
|
22
|
+
<div className={clsx(styles.root, className)}>
|
|
19
23
|
<Header
|
|
20
24
|
logo={headerLogo}
|
|
21
25
|
title={headerTitle}
|
|
@@ -23,6 +27,7 @@ export const DashboardLayout = ({
|
|
|
23
27
|
onLogin={onLogin}
|
|
24
28
|
onLogout={onLogout}
|
|
25
29
|
onCreateAccount={onCreateAccount}
|
|
30
|
+
maxWidth={maxWidth}
|
|
26
31
|
/>
|
|
27
32
|
<main className={styles.main}>
|
|
28
33
|
<div className={styles.container}>
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import clsx from 'clsx';
|
|
2
|
+
|
|
1
3
|
import styles from './SettingsLayout.module.css';
|
|
2
4
|
import type { SettingsLayoutProps } from './SettingsLayout.types.tsx';
|
|
3
5
|
import { Header } from '../../components/Header/Header.tsx';
|
|
4
6
|
|
|
5
7
|
export const SettingsLayout = ({
|
|
6
8
|
headerLogo,
|
|
7
|
-
headerTitle
|
|
9
|
+
headerTitle,
|
|
8
10
|
breadcrumbs,
|
|
9
11
|
sidebar,
|
|
10
12
|
children,
|
|
@@ -12,9 +14,11 @@ export const SettingsLayout = ({
|
|
|
12
14
|
onLogin,
|
|
13
15
|
onLogout,
|
|
14
16
|
onCreateAccount,
|
|
17
|
+
className,
|
|
18
|
+
maxWidth,
|
|
15
19
|
}: SettingsLayoutProps) => {
|
|
16
20
|
return (
|
|
17
|
-
<div className={styles.root}>
|
|
21
|
+
<div className={clsx(styles.root, className)}>
|
|
18
22
|
<Header
|
|
19
23
|
logo={headerLogo}
|
|
20
24
|
title={headerTitle}
|
|
@@ -22,6 +26,7 @@ export const SettingsLayout = ({
|
|
|
22
26
|
onLogin={onLogin}
|
|
23
27
|
onLogout={onLogout}
|
|
24
28
|
onCreateAccount={onCreateAccount}
|
|
29
|
+
maxWidth={maxWidth}
|
|
25
30
|
/>
|
|
26
31
|
<main className={styles.main}>
|
|
27
32
|
<div className={styles.container}>
|