tharaday 0.8.3 → 0.8.5

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 (92) hide show
  1. package/.gitignore +3 -0
  2. package/.storybook/preview.ts +2 -2
  3. package/dist/components/Box/Box.types.d.ts +1 -1
  4. package/dist/components/List/List.types.d.ts +2 -2
  5. package/dist/components/List/ListItem.types.d.ts +1 -1
  6. package/dist/ds.css +1 -1
  7. package/dist/ds.js +685 -685
  8. package/dist/ds.umd.cjs +1 -1
  9. package/dist/index.d.ts +32 -32
  10. package/eslint.config.js +15 -0
  11. package/package.json +4 -3
  12. package/src/components/Accordion/Accordion.stories.tsx +1 -1
  13. package/src/components/Accordion/Accordion.tsx +1 -1
  14. package/src/components/Avatar/Avatar.stories.tsx +1 -1
  15. package/src/components/Avatar/Avatar.test.tsx +1 -1
  16. package/src/components/Badge/Badge.stories.tsx +1 -1
  17. package/src/components/Box/Box.types.ts +1 -1
  18. package/src/components/Box/helpers/getSpacingStyles.ts +1 -0
  19. package/src/components/Breadcrumbs/Breadcrumbs.stories.tsx +1 -1
  20. package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +1 -1
  21. package/src/components/Breadcrumbs/Breadcrumbs.tsx +1 -1
  22. package/src/components/Breadcrumbs/Breadcrumbs.types.ts +1 -1
  23. package/src/components/Button/Button.stories.tsx +1 -1
  24. package/src/components/Card/Card.stories.tsx +1 -1
  25. package/src/components/Card/Card.test.tsx +1 -1
  26. package/src/components/Card/Card.tsx +2 -2
  27. package/src/components/Checkbox/Checkbox.stories.tsx +1 -1
  28. package/src/components/Checkbox/Checkbox.tsx +1 -1
  29. package/src/components/DatePicker/DatePicker.stories.tsx +3 -0
  30. package/src/components/DatePicker/DatePicker.tsx +2 -0
  31. package/src/components/Divider/Divider.stories.tsx +1 -1
  32. package/src/components/Drawer/Drawer.stories.tsx +1 -0
  33. package/src/components/Dropdown/Dropdown.tsx +7 -3
  34. package/src/components/Header/Header.tsx +2 -2
  35. package/src/components/Input/Input.stories.tsx +1 -1
  36. package/src/components/Input/Input.tsx +1 -1
  37. package/src/components/List/List.stories.tsx +1 -0
  38. package/src/components/List/List.tsx +1 -1
  39. package/src/components/List/List.types.ts +3 -2
  40. package/src/components/List/ListItem.tsx +2 -1
  41. package/src/components/List/ListItem.types.ts +1 -1
  42. package/src/components/Loader/Loader.stories.tsx +1 -1
  43. package/src/components/Modal/Modal.stories.tsx +1 -1
  44. package/src/components/Modal/Modal.tsx +2 -3
  45. package/src/components/NavBar/NavBar.stories.tsx +1 -1
  46. package/src/components/Notification/Notification.stories.tsx +1 -1
  47. package/src/components/Notification/Notification.tsx +1 -1
  48. package/src/components/Pagination/Pagination.tsx +2 -2
  49. package/src/components/Popover/Popover.tsx +1 -1
  50. package/src/components/ProgressBar/ProgressBar.stories.tsx +1 -1
  51. package/src/components/ProgressBar/ProgressBar.tsx +1 -1
  52. package/src/components/RadioButton/RadioButton.stories.tsx +1 -1
  53. package/src/components/RadioButton/RadioButton.tsx +1 -1
  54. package/src/components/Select/Select.stories.tsx +1 -1
  55. package/src/components/Select/Select.tsx +1 -1
  56. package/src/components/Select/Select.types.ts +1 -1
  57. package/src/components/Skeleton/Skeleton.stories.tsx +1 -1
  58. package/src/components/Skeleton/Skeleton.tsx +1 -1
  59. package/src/components/Slider/Slider.tsx +4 -1
  60. package/src/components/Stepper/Stepper.stories.tsx +1 -1
  61. package/src/components/Stepper/Stepper.tsx +1 -1
  62. package/src/components/Stepper/stepper.utils.ts +4 -1
  63. package/src/components/Switch/Switch.stories.tsx +1 -1
  64. package/src/components/Switch/Switch.tsx +1 -1
  65. package/src/components/Table/Table.stories.tsx +1 -1
  66. package/src/components/Table/Table.test.tsx +3 -3
  67. package/src/components/Table/Table.tsx +4 -4
  68. package/src/components/Tabs/Tabs.tsx +2 -2
  69. package/src/components/Text/Text.stories.tsx +1 -1
  70. package/src/components/Text/Text.types.ts +3 -3
  71. package/src/components/Textarea/Textarea.stories.tsx +1 -1
  72. package/src/components/Textarea/Textarea.tsx +1 -1
  73. package/src/components/Tooltip/Tooltip.stories.tsx +1 -1
  74. package/src/components/Tooltip/Tooltip.tsx +4 -3
  75. package/src/components/Tree/Tree.stories.tsx +1 -0
  76. package/src/components/Tree/Tree.tsx +3 -2
  77. package/src/components/Tree/TreeItem.tsx +5 -2
  78. package/src/hooks/useClickOutside.test.tsx +1 -0
  79. package/src/hooks/useClickOutside.ts +2 -1
  80. package/src/hooks/useComponentId.ts +1 -0
  81. package/src/hooks/useFocusTrap.test.tsx +2 -0
  82. package/src/hooks/useFocusTrap.ts +1 -0
  83. package/src/index.ts +38 -38
  84. package/src/layouts/AppLayout/AppLayout.stories.tsx +2 -2
  85. package/src/layouts/AppLayout/AppLayout.tsx +1 -1
  86. package/src/layouts/AuthLayout/AuthLayout.stories.tsx +1 -1
  87. package/src/layouts/AuthLayout/AuthLayout.tsx +2 -2
  88. package/src/layouts/AuthLayout/AuthLayout.types.tsx +2 -2
  89. package/src/layouts/DashboardLayout/DashboardLayout.stories.tsx +3 -3
  90. package/src/layouts/SettingsLayout/SettingsLayout.stories.tsx +3 -3
  91. package/src/styles/themes.browser.test.ts +1 -0
  92. package/vite.config.ts +1 -2
@@ -1,6 +1,6 @@
1
1
  import classnames from 'classnames';
2
- import { useComponentId } from '../../hooks/useComponentId.ts';
3
2
 
3
+ import { useComponentId } from '../../hooks/useComponentId.ts';
4
4
  import styles from './Textarea.module.css';
5
5
  import type { TextareaProps } from './Textarea.types.ts';
6
6
 
@@ -1,7 +1,7 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
2
 
3
- import { Tooltip } from './Tooltip.tsx';
4
3
  import { Button } from '../Button/Button.tsx';
4
+ import { Tooltip } from './Tooltip.tsx';
5
5
 
6
6
  const meta: Meta<typeof Tooltip> = {
7
7
  title: 'Components/Tooltip',
@@ -1,11 +1,11 @@
1
1
  import classnames from 'classnames';
2
2
  import {
3
- useState,
4
- useRef,
5
- isValidElement,
6
3
  cloneElement,
4
+ isValidElement,
7
5
  type KeyboardEvent,
8
6
  type ReactElement,
7
+ useRef,
8
+ useState,
9
9
  } from 'react';
10
10
 
11
11
  import { useComponentId } from '../../hooks/useComponentId.ts';
@@ -48,6 +48,7 @@ export const Tooltip = ({
48
48
  const trigger = isValidElement(children)
49
49
  ? (() => {
50
50
  const child = children as ReactElement<{ 'aria-describedby'?: string }>;
51
+
51
52
  return cloneElement(child, {
52
53
  'aria-describedby': [child.props['aria-describedby'], tooltipId]
53
54
  .filter(Boolean)
@@ -1,4 +1,5 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react-vite';
2
+
2
3
  import { Tree } from './Tree';
3
4
 
4
5
  const meta = {
@@ -1,8 +1,9 @@
1
1
  import classnames from 'classnames';
2
- import { useEffect, useRef } from 'react';
3
2
  import type { KeyboardEvent } from 'react';
4
- import type { TreeProps } from './Tree.types';
3
+ import { useEffect, useRef } from 'react';
4
+
5
5
  import styles from './Tree.module.css';
6
+ import type { TreeProps } from './Tree.types';
6
7
  import { TreeItem } from './TreeItem';
7
8
 
8
9
  export const Tree = ({
@@ -1,8 +1,9 @@
1
1
  import classnames from 'classnames';
2
- import { useRef, useState } from 'react';
3
2
  import type { FocusEvent, KeyboardEvent, MouseEvent } from 'react';
4
- import type { TreeItemProps } from './TreeItem.types';
3
+ import { useRef, useState } from 'react';
4
+
5
5
  import styles from './TreeItem.module.css';
6
+ import type { TreeItemProps } from './TreeItem.types';
6
7
 
7
8
  function focusTreeItem(item: HTMLElement) {
8
9
  const tree = item.closest('[role="tree"]');
@@ -43,6 +44,7 @@ export const TreeItem = ({
43
44
  if (Array.isArray(data)) {
44
45
  return (data as unknown[]).map((v, i) => ({ key: String(i), value: v }));
45
46
  }
47
+
46
48
  return Object.entries(data as Record<string, unknown>).map(([k, v]) => ({ key: k, value: v }));
47
49
  };
48
50
 
@@ -155,6 +157,7 @@ export const TreeItem = ({
155
157
  if (!Array.isArray(data) && Object.keys(data as object).length === 0) {
156
158
  return <span className={styles.empty}>{'{}'}</span>;
157
159
  }
160
+
158
161
  return null;
159
162
  };
160
163
 
@@ -12,6 +12,7 @@ interface Props {
12
12
  const TestComponent = ({ onClose, enabled }: Props) => {
13
13
  const ref = useRef<HTMLDivElement>(null);
14
14
  useClickOutside(ref, onClose, enabled);
15
+
15
16
  return (
16
17
  <div data-testid="container">
17
18
  <div ref={ref} data-testid="inside">
@@ -1,4 +1,4 @@
1
- import { useEffect, type RefObject } from 'react';
1
+ import { type RefObject, useEffect } from 'react';
2
2
 
3
3
  /**
4
4
  * Calls onClose when the user clicks outside the referenced element
@@ -27,6 +27,7 @@ export const useClickOutside = <T extends HTMLElement>(
27
27
 
28
28
  document.addEventListener('mousedown', handleClickOutside);
29
29
  document.addEventListener('keydown', handleKeyDown);
30
+
30
31
  return () => {
31
32
  document.removeEventListener('mousedown', handleClickOutside);
32
33
  document.removeEventListener('keydown', handleKeyDown);
@@ -6,5 +6,6 @@ import { useId } from 'react';
6
6
  */
7
7
  export const useComponentId = (prefix: string, id?: string): string => {
8
8
  const baseId = useId();
9
+
9
10
  return id ?? `ds-${prefix}-${baseId}`;
10
11
  };
@@ -14,6 +14,7 @@ const TestComponent = ({ isOpen, onClose, isLoading }: Props) => {
14
14
  if (!isOpen) {
15
15
  return <button data-testid="trigger">Open</button>;
16
16
  }
17
+
17
18
  return (
18
19
  <>
19
20
  <button data-testid="trigger">Open</button>
@@ -30,6 +31,7 @@ describe('useFocusTrap', () => {
30
31
  beforeEach(() => {
31
32
  vi.spyOn(window, 'requestAnimationFrame').mockImplementation((cb) => {
32
33
  cb(0);
34
+
33
35
  return 0;
34
36
  });
35
37
  });
@@ -36,6 +36,7 @@ export const useFocusTrap = <T extends HTMLElement>({
36
36
  const handleKeyDown = (event: KeyboardEvent) => {
37
37
  if (event.key === 'Escape' && !isLoading) {
38
38
  onCloseRef.current();
39
+
39
40
  return;
40
41
  }
41
42
 
package/src/index.ts CHANGED
@@ -3,109 +3,107 @@ import './styles/ds.css';
3
3
 
4
4
  // components
5
5
  export { Accordion } from './components/Accordion/Accordion.tsx';
6
- export type { AccordionProps, AccordionItem } from './components/Accordion/Accordion.types.ts';
6
+ export type { AccordionItem, AccordionProps } from './components/Accordion/Accordion.types.ts';
7
7
  export { Avatar } from './components/Avatar/Avatar.tsx';
8
8
  export type { AvatarProps, AvatarSize } from './components/Avatar/Avatar.types.ts';
9
9
  export { Badge } from './components/Badge/Badge.tsx';
10
10
  export type {
11
+ BadgeIntent,
11
12
  BadgeProps,
12
13
  BadgeSize,
13
- BadgeIntent,
14
14
  BadgeVariant,
15
15
  } from './components/Badge/Badge.types.ts';
16
16
  export { Box } from './components/Box/Box.tsx';
17
17
  export type {
18
- BoxProps,
19
- BoxPadding,
20
- BoxGap,
18
+ BoxAlignItems,
21
19
  BoxDisplay,
22
20
  BoxFlexDirection,
23
- BoxAlignItems,
21
+ BoxGap,
24
22
  BoxJustifyContent,
23
+ BoxPadding,
24
+ BoxProps,
25
25
  } from './components/Box/Box.types.ts';
26
- export { Breadcrumbs, BreadcrumbItem } from './components/Breadcrumbs/Breadcrumbs.tsx';
26
+ export { BreadcrumbItem, Breadcrumbs } from './components/Breadcrumbs/Breadcrumbs.tsx';
27
27
  export type {
28
- BreadcrumbsProps,
29
28
  BreadcrumbItemProps,
29
+ BreadcrumbsProps,
30
30
  } from './components/Breadcrumbs/Breadcrumbs.types.ts';
31
31
  export { Button } from './components/Button/Button.tsx';
32
32
  export type {
33
+ ButtonIntent,
33
34
  ButtonProps,
34
35
  ButtonSize,
35
36
  ButtonVariant,
36
- ButtonIntent,
37
37
  } from './components/Button/Button.types.ts';
38
38
  export { Card, CardContent, CardFooter, CardHeader } from './components/Card/Card.tsx';
39
39
  export type {
40
- CardProps,
41
40
  CardContentProps,
42
41
  CardFooterProps,
43
42
  CardHeaderProps,
43
+ CardProps,
44
44
  } from './components/Card/Card.types.ts';
45
45
  export { Checkbox } from './components/Checkbox/Checkbox.tsx';
46
46
  export type { CheckboxProps } from './components/Checkbox/Checkbox.types.ts';
47
47
  export { DatePicker } from './components/DatePicker/DatePicker.tsx';
48
48
  export type { DatePickerProps } from './components/DatePicker/DatePicker.types.ts';
49
+ export { Divider } from './components/Divider/Divider.tsx';
50
+ export type { DividerOrientation, DividerProps } from './components/Divider/Divider.types.ts';
51
+ export { Drawer } from './components/Drawer/Drawer.tsx';
52
+ export type { DrawerPlacement, DrawerProps, DrawerSize } from './components/Drawer/Drawer.types.ts';
49
53
  export { Dropdown } from './components/Dropdown/Dropdown.tsx';
50
54
  export type {
51
- DropdownProps,
52
55
  DropdownOption,
56
+ DropdownProps,
53
57
  DropdownSize,
54
58
  } from './components/Dropdown/Dropdown.types.ts';
55
- export { Divider } from './components/Divider/Divider.tsx';
56
- export type { DividerProps, DividerOrientation } from './components/Divider/Divider.types.ts';
57
- export { Drawer } from './components/Drawer/Drawer.tsx';
58
- export type { DrawerProps, DrawerPlacement, DrawerSize } from './components/Drawer/Drawer.types.ts';
59
59
  export { EmptyState } from './components/EmptyState/EmptyState.tsx';
60
60
  export type { EmptyStateProps, EmptyStateSize } from './components/EmptyState/EmptyState.types.ts';
61
61
  export { Header } from './components/Header/Header.tsx';
62
62
  export type { HeaderProps } from './components/Header/Header.types.ts';
63
- export { NavBar } from './components/NavBar/NavBar.tsx';
64
- export type { NavBarProps, NavBarItem } from './components/NavBar/NavBar.types.ts';
65
63
  export { Input } from './components/Input/Input.tsx';
66
64
  export type { InputProps } from './components/Input/Input.types.ts';
67
- export { Loader } from './components/Loader/Loader.tsx';
68
- export type { LoaderProps, LoaderSize } from './components/Loader/Loader.types.ts';
69
65
  export { List } from './components/List/List.tsx';
70
- export { ListItem } from './components/List/ListItem.tsx';
71
66
  export type { ListProps, ListVariant } from './components/List/List.types.ts';
67
+ export { ListItem } from './components/List/ListItem.tsx';
72
68
  export type { ListItemProps } from './components/List/ListItem.types.ts';
69
+ export { Loader } from './components/Loader/Loader.tsx';
70
+ export type { LoaderProps, LoaderSize } from './components/Loader/Loader.types.ts';
73
71
  export { Modal } from './components/Modal/Modal.tsx';
74
72
  export type { ModalProps } from './components/Modal/Modal.types.ts';
73
+ export { NavBar } from './components/NavBar/NavBar.tsx';
74
+ export type { NavBarItem, NavBarProps } from './components/NavBar/NavBar.types.ts';
75
75
  export { Notification } from './components/Notification/Notification.tsx';
76
76
  export type { NotificationProps } from './components/Notification/Notification.types.ts';
77
77
  export { Pagination } from './components/Pagination/Pagination.tsx';
78
78
  export type {
79
- PaginationProps,
80
79
  PaginationLabels,
80
+ PaginationProps,
81
81
  } from './components/Pagination/Pagination.types.ts';
82
82
  export { Popover } from './components/Popover/Popover.tsx';
83
- export type { PopoverProps, PopoverPlacement } from './components/Popover/Popover.types.ts';
83
+ export type { PopoverPlacement, PopoverProps } from './components/Popover/Popover.types.ts';
84
84
  export { ProgressBar } from './components/ProgressBar/ProgressBar.tsx';
85
85
  export type {
86
+ ProgressBarIntent,
86
87
  ProgressBarProps,
87
88
  ProgressBarSize,
88
- ProgressBarIntent,
89
89
  } from './components/ProgressBar/ProgressBar.types.ts';
90
- export { Slider } from './components/Slider/Slider.tsx';
91
- export type { SliderProps, SliderSize, SliderValue } from './components/Slider/Slider.types.ts';
92
90
  export { RadioButton } from './components/RadioButton/RadioButton.tsx';
93
91
  export type { RadioButtonProps } from './components/RadioButton/RadioButton.types.ts';
92
+ export { Select } from './components/Select/Select.tsx';
93
+ export type { SelectOption, SelectProps, SelectSize } from './components/Select/Select.types.ts';
94
94
  export { Skeleton } from './components/Skeleton/Skeleton.tsx';
95
95
  export type { SkeletonProps } from './components/Skeleton/Skeleton.types.ts';
96
+ export { Slider } from './components/Slider/Slider.tsx';
97
+ export type { SliderProps, SliderSize, SliderValue } from './components/Slider/Slider.types.ts';
98
+ export type { StepOptions, StepperStatus } from './components/Stepper/Step.types.ts';
96
99
  export { Stepper } from './components/Stepper/Stepper.tsx';
97
100
  export type {
98
- StepperProps,
99
101
  StepperOrientation,
102
+ StepperProps,
100
103
  StepperSize,
101
104
  } from './components/Stepper/Stepper.types.ts';
102
- export type { StepOptions, StepperStatus } from './components/Stepper/Step.types.ts';
103
- export { Select } from './components/Select/Select.tsx';
104
- export type { SelectProps, SelectOption, SelectSize } from './components/Select/Select.types.ts';
105
105
  export { Switch } from './components/Switch/Switch.tsx';
106
106
  export type { SwitchProps } from './components/Switch/Switch.types.ts';
107
- export { Tag } from './components/Tag/Tag.tsx';
108
- export type { TagProps, TagIntent, TagSize } from './components/Tag/Tag.types.ts';
109
107
  export {
110
108
  Table,
111
109
  TableBody,
@@ -116,31 +114,33 @@ export {
116
114
  TableRow,
117
115
  } from './components/Table/Table.tsx';
118
116
  export type {
119
- TableProps,
120
117
  TableBodyProps,
121
118
  TableCellProps,
122
119
  TableFooterProps,
120
+ TableHeaderProps,
123
121
  TableHeadProps,
122
+ TableProps,
124
123
  TableRowProps,
125
- TableHeaderProps,
126
124
  } from './components/Table/Table.types.ts';
127
125
  export { Tabs } from './components/Tabs/Tabs.tsx';
128
- export type { TabsProps, TabItem } from './components/Tabs/Tabs.types.ts';
126
+ export type { TabItem, TabsProps } from './components/Tabs/Tabs.types.ts';
127
+ export { Tag } from './components/Tag/Tag.tsx';
128
+ export type { TagIntent, TagProps, TagSize } from './components/Tag/Tag.types.ts';
129
129
  export { Text } from './components/Text/Text.tsx';
130
130
  export type {
131
- TextProps,
131
+ FontWeight,
132
132
  TextAlign,
133
133
  TextColor,
134
+ TextProps,
134
135
  TextVariant,
135
- FontWeight,
136
136
  } from './components/Text/Text.types.ts';
137
137
  export { Textarea } from './components/Textarea/Textarea.tsx';
138
138
  export type { TextareaProps, TextareaSize } from './components/Textarea/Textarea.types.ts';
139
139
  export { Tooltip } from './components/Tooltip/Tooltip.tsx';
140
- export type { TooltipProps, TooltipPosition } from './components/Tooltip/Tooltip.types.ts';
140
+ export type { TooltipPosition, TooltipProps } from './components/Tooltip/Tooltip.types.ts';
141
141
  export { Tree } from './components/Tree/Tree.tsx';
142
- export { TreeItem } from './components/Tree/TreeItem.tsx';
143
142
  export type { TreeProps } from './components/Tree/Tree.types.ts';
143
+ export { TreeItem } from './components/Tree/TreeItem.tsx';
144
144
  export type { TreeItemProps } from './components/Tree/TreeItem.types.ts';
145
145
 
146
146
  // layouts
@@ -1,13 +1,13 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { fn } from 'storybook/test';
3
3
 
4
- import { AppLayout } from './AppLayout.tsx';
5
4
  import { Box } from '../../components/Box/Box.tsx';
6
5
  import { Button } from '../../components/Button/Button.tsx';
7
- import { Card, CardHeader, CardContent } from '../../components/Card/Card.tsx';
6
+ import { Card, CardContent, CardHeader } from '../../components/Card/Card.tsx';
8
7
  import { Header } from '../../components/Header/Header.tsx';
9
8
  import { NavBar } from '../../components/NavBar/NavBar.tsx';
10
9
  import { Text } from '../../components/Text/Text.tsx';
10
+ import { AppLayout } from './AppLayout.tsx';
11
11
 
12
12
  const meta = {
13
13
  title: 'Layouts/AppLayout',
@@ -1,8 +1,8 @@
1
1
  import classnames from 'classnames';
2
2
 
3
+ import { Box } from '../../components/Box/Box.tsx';
3
4
  import styles from './AppLayout.module.css';
4
5
  import type { AppLayoutProps } from './AppLayout.types.ts';
5
- import { Box } from '../../components/Box/Box.tsx';
6
6
 
7
7
  export const AppLayout = ({
8
8
  header,
@@ -1,10 +1,10 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react-vite';
2
2
 
3
- import { AuthLayout } from './AuthLayout.tsx';
4
3
  import { Box } from '../../components/Box/Box.tsx';
5
4
  import { Button } from '../../components/Button/Button.tsx';
6
5
  import { Input } from '../../components/Input/Input.tsx';
7
6
  import { Text } from '../../components/Text/Text.tsx';
7
+ import { AuthLayout } from './AuthLayout.tsx';
8
8
 
9
9
  const meta = {
10
10
  title: 'Layouts/Auth',
@@ -1,9 +1,9 @@
1
1
  import classnames from 'classnames';
2
2
 
3
- import styles from './AuthLayout.module.css';
4
- import type { AuthLayoutProps } from './AuthLayout.types.tsx';
5
3
  import { Box } from '../../components/Box/Box.tsx';
6
4
  import { Text } from '../../components/Text/Text.tsx';
5
+ import styles from './AuthLayout.module.css';
6
+ import type { AuthLayoutProps } from './AuthLayout.types.tsx';
7
7
 
8
8
  export const AuthLayout = ({ logo, title, description, children, className }: AuthLayoutProps) => {
9
9
  return (
@@ -3,7 +3,7 @@ import type { ReactNode } from 'react';
3
3
  export interface AuthLayoutProps {
4
4
  className?: string;
5
5
  logo?: ReactNode;
6
- title?: string;
7
- description?: string;
6
+ title?: ReactNode;
7
+ description?: ReactNode;
8
8
  children: ReactNode;
9
9
  }
@@ -1,15 +1,15 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { fn } from 'storybook/test';
3
3
 
4
- import { DashboardLayout } from './DashboardLayout.tsx';
5
4
  import { Badge } from '../../components/Badge/Badge.tsx';
6
5
  import type { BadgeIntent } from '../../components/Badge/Badge.types.ts';
7
6
  import { Box } from '../../components/Box/Box.tsx';
8
- import { Breadcrumbs, BreadcrumbItem } from '../../components/Breadcrumbs/Breadcrumbs.tsx';
7
+ import { BreadcrumbItem, Breadcrumbs } from '../../components/Breadcrumbs/Breadcrumbs.tsx';
9
8
  import { Button } from '../../components/Button/Button.tsx';
10
- import { Card, CardHeader, CardContent } from '../../components/Card/Card.tsx';
9
+ import { Card, CardContent, CardHeader } from '../../components/Card/Card.tsx';
11
10
  import { Header } from '../../components/Header/Header.tsx';
12
11
  import { Text } from '../../components/Text/Text.tsx';
12
+ import { DashboardLayout } from './DashboardLayout.tsx';
13
13
 
14
14
  const meta = {
15
15
  title: 'Layouts/Dashboard',
@@ -1,16 +1,16 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { fn } from 'storybook/test';
3
3
 
4
- import { SettingsLayout } from './SettingsLayout.tsx';
5
4
  import { Box } from '../../components/Box/Box.tsx';
6
- import { Breadcrumbs, BreadcrumbItem } from '../../components/Breadcrumbs/Breadcrumbs.tsx';
5
+ import { BreadcrumbItem, Breadcrumbs } from '../../components/Breadcrumbs/Breadcrumbs.tsx';
7
6
  import { Button } from '../../components/Button/Button.tsx';
8
- import { Card, CardHeader, CardContent, CardFooter } from '../../components/Card/Card.tsx';
7
+ import { Card, CardContent, CardFooter, CardHeader } from '../../components/Card/Card.tsx';
9
8
  import { Header } from '../../components/Header/Header.tsx';
10
9
  import { Input } from '../../components/Input/Input.tsx';
11
10
  import { Notification } from '../../components/Notification/Notification.tsx';
12
11
  import { Text } from '../../components/Text/Text.tsx';
13
12
  import { Textarea } from '../../components/Textarea/Textarea.tsx';
13
+ import { SettingsLayout } from './SettingsLayout.tsx';
14
14
 
15
15
  const meta = {
16
16
  title: 'Layouts/Settings',
@@ -10,6 +10,7 @@ function resolveColorToken(token: string): string {
10
10
  document.body.appendChild(el);
11
11
  const color = getComputedStyle(el).backgroundColor;
12
12
  el.remove();
13
+
13
14
  return color;
14
15
  }
15
16
 
package/vite.config.ts CHANGED
@@ -1,8 +1,7 @@
1
+ import { resolve } from 'path';
1
2
  import { defineConfig } from 'vite';
2
3
  import dts from 'vite-plugin-dts';
3
4
 
4
- import { resolve } from 'path';
5
-
6
5
  export default defineConfig({
7
6
  plugins: [
8
7
  dts({