@kenlo/kdls-design-system 2.0.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.
Files changed (160) hide show
  1. package/README.md +27 -0
  2. package/dist/components/Accordion/Accordion.d.ts +44 -0
  3. package/dist/components/Accordion/Accordion.test.d.ts +1 -0
  4. package/dist/components/Accordion/index.d.ts +1 -0
  5. package/dist/components/AccordionGroup/AccordionGroup.d.ts +13 -0
  6. package/dist/components/AccordionGroup/AccordionGroup.test.d.ts +1 -0
  7. package/dist/components/AccordionGroup/index.d.ts +1 -0
  8. package/dist/components/Alert/Alert.d.ts +37 -0
  9. package/dist/components/Alert/Alert.test.d.ts +1 -0
  10. package/dist/components/Alert/index.d.ts +2 -0
  11. package/dist/components/AttachmentList/AttachmentList.d.ts +63 -0
  12. package/dist/components/AttachmentList/AttachmentList.test.d.ts +1 -0
  13. package/dist/components/AttachmentList/index.d.ts +2 -0
  14. package/dist/components/Avatar/Avatar.d.ts +18 -0
  15. package/dist/components/Avatar/Avatar.test.d.ts +1 -0
  16. package/dist/components/Avatar/index.d.ts +2 -0
  17. package/dist/components/Badge/Badge.d.ts +32 -0
  18. package/dist/components/Badge/Badge.test.d.ts +1 -0
  19. package/dist/components/Badge/index.d.ts +2 -0
  20. package/dist/components/BottomSheet/BottomSheet.d.ts +59 -0
  21. package/dist/components/BottomSheet/BottomSheet.test.d.ts +1 -0
  22. package/dist/components/BottomSheet/index.d.ts +2 -0
  23. package/dist/components/BulkActionBar/BulkActionBar.d.ts +69 -0
  24. package/dist/components/BulkActionBar/BulkActionBar.test.d.ts +1 -0
  25. package/dist/components/BulkActionBar/index.d.ts +1 -0
  26. package/dist/components/Button/Button.d.ts +39 -0
  27. package/dist/components/Button/Button.test.d.ts +1 -0
  28. package/dist/components/Button/index.d.ts +2 -0
  29. package/dist/components/Card/Card.d.ts +126 -0
  30. package/dist/components/Card/Card.test.d.ts +1 -0
  31. package/dist/components/Card/index.d.ts +1 -0
  32. package/dist/components/Checkbox/Checkbox.d.ts +36 -0
  33. package/dist/components/Checkbox/Checkbox.test.d.ts +1 -0
  34. package/dist/components/Checkbox/index.d.ts +2 -0
  35. package/dist/components/ColorPicker/ColorPicker.d.ts +22 -0
  36. package/dist/components/ColorPicker/ColorPicker.test.d.ts +1 -0
  37. package/dist/components/ColorPicker/index.d.ts +1 -0
  38. package/dist/components/ColorScheme/ColorScheme.d.ts +15 -0
  39. package/dist/components/ColorScheme/index.d.ts +1 -0
  40. package/dist/components/DatePicker/DatePicker.d.ts +84 -0
  41. package/dist/components/DatePicker/DatePicker.test.d.ts +1 -0
  42. package/dist/components/DatePicker/dateUtils.d.ts +18 -0
  43. package/dist/components/DatePicker/index.d.ts +3 -0
  44. package/dist/components/Drawer/Drawer.d.ts +90 -0
  45. package/dist/components/Drawer/Drawer.test.d.ts +1 -0
  46. package/dist/components/Drawer/index.d.ts +2 -0
  47. package/dist/components/Field/Field.d.ts +44 -0
  48. package/dist/components/Field/Field.test.d.ts +1 -0
  49. package/dist/components/Field/index.d.ts +1 -0
  50. package/dist/components/Floating/Floating.d.ts +25 -0
  51. package/dist/components/Form/Form.d.ts +13 -0
  52. package/dist/components/Form/index.d.ts +3 -0
  53. package/dist/components/Grid/Grid.d.ts +35 -0
  54. package/dist/components/Grid/index.d.ts +2 -0
  55. package/dist/components/Header/Header.d.ts +48 -0
  56. package/dist/components/Header/Header.test.d.ts +1 -0
  57. package/dist/components/Header/index.d.ts +2 -0
  58. package/dist/components/Icon/Icon.d.ts +31 -0
  59. package/dist/components/Icon/Icon.test.d.ts +1 -0
  60. package/dist/components/Icon/custom/index.d.ts +10 -0
  61. package/dist/components/Icon/products/index.d.ts +27 -0
  62. package/dist/components/Icon/social/index.d.ts +24 -0
  63. package/dist/components/IconButton/IconButton.d.ts +24 -0
  64. package/dist/components/IconButton/IconButton.test.d.ts +1 -0
  65. package/dist/components/IconButton/index.d.ts +2 -0
  66. package/dist/components/Incrementer/Incrementer.d.ts +20 -0
  67. package/dist/components/Incrementer/index.d.ts +2 -0
  68. package/dist/components/Input/Input.d.ts +136 -0
  69. package/dist/components/Input/Input.test.d.ts +1 -0
  70. package/dist/components/Input/index.d.ts +2 -0
  71. package/dist/components/KenloLogo/KenloLogo.d.ts +13 -0
  72. package/dist/components/KenloLogo/KenloLogo.test.d.ts +1 -0
  73. package/dist/components/KenloLogo/index.d.ts +2 -0
  74. package/dist/components/LyaLogo/LyaLogo.d.ts +11 -0
  75. package/dist/components/LyaLogo/LyaLogo.test.d.ts +1 -0
  76. package/dist/components/LyaLogo/index.d.ts +2 -0
  77. package/dist/components/Menu/Menu.d.ts +171 -0
  78. package/dist/components/Menu/Menu.test.d.ts +1 -0
  79. package/dist/components/Menu/index.d.ts +1 -0
  80. package/dist/components/Modal/Modal.d.ts +81 -0
  81. package/dist/components/Modal/Modal.test.d.ts +1 -0
  82. package/dist/components/Modal/index.d.ts +2 -0
  83. package/dist/components/Nav/Nav.d.ts +42 -0
  84. package/dist/components/Nav/index.d.ts +1 -0
  85. package/dist/components/Notification/Notification.d.ts +24 -0
  86. package/dist/components/Notification/Notification.test.d.ts +1 -0
  87. package/dist/components/Notification/index.d.ts +2 -0
  88. package/dist/components/Pagination/Pagination.d.ts +24 -0
  89. package/dist/components/Pagination/Pagination.test.d.ts +1 -0
  90. package/dist/components/Pagination/index.d.ts +1 -0
  91. package/dist/components/Pill/Pill.d.ts +38 -0
  92. package/dist/components/Pill/Pill.test.d.ts +1 -0
  93. package/dist/components/Pill/index.d.ts +2 -0
  94. package/dist/components/Popover/Popover.d.ts +24 -0
  95. package/dist/components/Popover/Popover.test.d.ts +1 -0
  96. package/dist/components/Popover/index.d.ts +1 -0
  97. package/dist/components/Radio/Radio.d.ts +21 -0
  98. package/dist/components/Radio/index.d.ts +2 -0
  99. package/dist/components/RadioGroup/RadioGroup.d.ts +43 -0
  100. package/dist/components/RadioGroup/RadioGroup.test.d.ts +1 -0
  101. package/dist/components/RadioGroup/index.d.ts +2 -0
  102. package/dist/components/SearchBar/SearchBar.d.ts +31 -0
  103. package/dist/components/SearchBar/SearchBar.test.d.ts +1 -0
  104. package/dist/components/SearchBar/index.d.ts +1 -0
  105. package/dist/components/Select/Select.d.ts +117 -0
  106. package/dist/components/Select/Select.test.d.ts +1 -0
  107. package/dist/components/Select/index.d.ts +1 -0
  108. package/dist/components/Separator/Separator.d.ts +11 -0
  109. package/dist/components/Separator/Separator.test.d.ts +1 -0
  110. package/dist/components/Separator/index.d.ts +2 -0
  111. package/dist/components/Skeleton/Skeleton.d.ts +62 -0
  112. package/dist/components/Skeleton/Skeleton.test.d.ts +1 -0
  113. package/dist/components/Skeleton/index.d.ts +1 -0
  114. package/dist/components/Spinner/Spinner.d.ts +20 -0
  115. package/dist/components/Spinner/Spinner.test.d.ts +1 -0
  116. package/dist/components/Spinner/index.d.ts +1 -0
  117. package/dist/components/StatCard/StatCard.d.ts +23 -0
  118. package/dist/components/StatCard/StatCard.test.d.ts +1 -0
  119. package/dist/components/StatCard/index.d.ts +1 -0
  120. package/dist/components/Switch/Switch.d.ts +27 -0
  121. package/dist/components/Switch/Switch.test.d.ts +1 -0
  122. package/dist/components/Switch/index.d.ts +2 -0
  123. package/dist/components/Table/Table.d.ts +88 -0
  124. package/dist/components/Table/Table.test.d.ts +1 -0
  125. package/dist/components/Table/index.d.ts +1 -0
  126. package/dist/components/Text/Text.d.ts +24 -0
  127. package/dist/components/Text/Text.test.d.ts +1 -0
  128. package/dist/components/Text/index.d.ts +1 -0
  129. package/dist/components/TextEditor/TextEditor.d.ts +11 -0
  130. package/dist/components/TextEditor/index.d.ts +1 -0
  131. package/dist/components/Toast/Toast.d.ts +30 -0
  132. package/dist/components/Toast/Toast.imperative.test.d.ts +1 -0
  133. package/dist/components/Toast/Toast.test.d.ts +1 -0
  134. package/dist/components/Toast/Toaster.d.ts +4 -0
  135. package/dist/components/Toast/index.d.ts +5 -0
  136. package/dist/components/Toast/toast-api.d.ts +19 -0
  137. package/dist/components/Toast/toast-store.d.ts +47 -0
  138. package/dist/components/Toggle/Toggle.d.ts +33 -0
  139. package/dist/components/Toggle/Toggle.test.d.ts +1 -0
  140. package/dist/components/Toggle/index.d.ts +2 -0
  141. package/dist/components/Tooltip/Tooltip.d.ts +15 -0
  142. package/dist/components/Tooltip/Tooltip.test.d.ts +1 -0
  143. package/dist/components/Tooltip/index.d.ts +2 -0
  144. package/dist/components/Uploader/Uploader.d.ts +34 -0
  145. package/dist/components/Uploader/Uploader.test.d.ts +1 -0
  146. package/dist/components/Uploader/index.d.ts +1 -0
  147. package/dist/components/getVisibleBounds.d.ts +6 -0
  148. package/dist/components/index.d.ts +51 -0
  149. package/dist/components/useFloatingPosition.d.ts +54 -0
  150. package/dist/components/useFloatingPosition.test.d.ts +1 -0
  151. package/dist/components/useIsMobile.d.ts +1 -0
  152. package/dist/foundations/Scrollbar/index.d.ts +5 -0
  153. package/dist/index.cjs +3 -0
  154. package/dist/index.css +1 -0
  155. package/dist/index.js +6509 -0
  156. package/foundations/Scrollbar/Scrollbar.css +26 -0
  157. package/foundations/styles.css +269 -0
  158. package/foundations/tailwind-preset.cjs +39 -0
  159. package/foundations/tokens.css +1338 -0
  160. package/package.json +73 -0
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Popover';
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import type { InputFeedback } from '../Input/Input';
3
+ import './Radio.css';
4
+ export type RadioSize = 'sm' | 'md';
5
+ /**
6
+ * @internal
7
+ * Visual primitive for a single option — used only by RadioGroup (not exported publicly).
8
+ * The public API is RadioGroup (options). All props here are defined by the group.
9
+ */
10
+ export interface RadioProps {
11
+ value: string;
12
+ label: string;
13
+ hint?: string;
14
+ size?: RadioSize;
15
+ checked?: boolean;
16
+ disabled?: boolean;
17
+ feedback?: InputFeedback;
18
+ onChange?: () => void;
19
+ }
20
+ export declare const Radio: React.FC<RadioProps>;
21
+ export default Radio;
@@ -0,0 +1,2 @@
1
+ export { Radio } from './Radio';
2
+ export type { RadioProps, RadioSize } from './Radio';
@@ -0,0 +1,43 @@
1
+ import React from 'react';
2
+ import type { InputFeedback } from '../Input/Input';
3
+ import type { RadioSize } from '../Radio/Radio';
4
+ import './RadioGroup.css';
5
+ export type { RadioSize };
6
+ export interface RadioOption {
7
+ /** Option value — what RadioGroup returns in onChange and stores as selected */
8
+ value: string;
9
+ /** Text shown next to the circle */
10
+ label: string;
11
+ /** Helper text shown below this option's label */
12
+ hint?: string;
13
+ /** Disables only this option */
14
+ disabled?: boolean;
15
+ }
16
+ export interface RadioGroupProps {
17
+ /** Group's options — each becomes a radio */
18
+ options: RadioOption[];
19
+ /** Group label shown above the options — anchor for the required asterisk */
20
+ label?: string;
21
+ /** Size applied to all radios in the group */
22
+ size?: RadioSize;
23
+ /** Selected value (controlled) — the active option's value. Use with onChange */
24
+ value?: string;
25
+ /** Initial selected value (uncontrolled) — ignored when value is passed */
26
+ defaultValue?: string;
27
+ /** Callback when the selection changes — receives the chosen option's value */
28
+ onChange?: (value: string) => void;
29
+ /** Disables all radios in the group */
30
+ disabled?: boolean;
31
+ /** Validation visual state — cascades to the radios and colors the hint */
32
+ feedback?: InputFeedback;
33
+ /** Message shown below the options — hint or error (color follows the feedback) */
34
+ hint?: string;
35
+ /** Field name for native form submission — renders an input[type=hidden] with the selected value */
36
+ name?: string;
37
+ /** Marks the field as required — asterisk on the label and aria-required on the group */
38
+ required?: boolean;
39
+ /** Additional CSS classes */
40
+ className?: string;
41
+ }
42
+ export declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
43
+ export default RadioGroup;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export { RadioGroup } from './RadioGroup';
2
+ export type { RadioGroupProps, RadioOption, RadioSize } from './RadioGroup';
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ import './SearchBar.css';
3
+ export interface SearchBarProps {
4
+ /** Controlled field value — the component is controlled */
5
+ value: string;
6
+ /** Called on every text change — updates the external state (required) */
7
+ onChange: (value: string) => void;
8
+ /** Floating label (size 'lg') or placeholder text (size 'md'/'sm') */
9
+ label?: string;
10
+ /** Height: 'lg' = floating label · 'md' and 'sm' = label as placeholder */
11
+ size?: 'sm' | 'md' | 'lg';
12
+ /** 'fill' = 100% of the container · 'hug' = fits content */
13
+ width?: 'hug' | 'fill';
14
+ /** Suggestions shown in the panel's "Suggestions" section on focus */
15
+ suggestions?: string[];
16
+ /** Previous searches in the panel's "Recent" section (clock icon) */
17
+ recentSearches?: string[];
18
+ /** Called when pressing Enter — triggers the search */
19
+ onSearch?: (value: string) => void;
20
+ /** Called when selecting a suggestion or recent search from the panel */
21
+ onSuggestionSelect?: (value: string) => void;
22
+ /** Called on every keystroke — fires after internal Enter/Escape handling */
23
+ onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
24
+ /** Shows a spinner and blocks typing while the async search loads */
25
+ isLoading?: boolean;
26
+ /** Disables the field and blocks typing */
27
+ disabled?: boolean;
28
+ /** Additional CSS class on the root element */
29
+ className?: string;
30
+ }
31
+ export declare function SearchBar({ value, onChange, label, size, width, suggestions, recentSearches, onSearch, onSuggestionSelect, onKeyDown, isLoading, disabled, className, }: SearchBarProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './SearchBar';
@@ -0,0 +1,117 @@
1
+ import React from 'react';
2
+ import { IconElement } from '../Icon/Icon';
3
+ import './Select.css';
4
+ import '../../foundations/Scrollbar/Scrollbar.css';
5
+ import { InputFeedback } from '../Input/Input';
6
+ export interface SelectFieldNames {
7
+ label?: string;
8
+ value?: string;
9
+ /** Field of the option object that holds the icon (an IconElement, e.g. <DocumentPdfRegular />). Default: 'icon' */
10
+ icon?: string;
11
+ }
12
+ export interface SelectLabeledValue {
13
+ label: string;
14
+ value: string;
15
+ }
16
+ type RawOption = Record<string, any>;
17
+ type SelectValue = string | string[] | SelectLabeledValue | SelectLabeledValue[] | null;
18
+ interface SelectBase {
19
+ /** List of options — flat or grouped (item with `options[]`) */
20
+ options: RawOption[];
21
+ /** Maps the label/value fields when the API uses different names */
22
+ fieldNames?: SelectFieldNames;
23
+ /** Selected value (controlled). Single: string | null. Multiple: string[]. With labelInValue: equivalent SelectLabeledValue */
24
+ value?: SelectValue;
25
+ /** Initial value (uncontrolled) — same shape as value; ignored when value is passed */
26
+ defaultValue?: SelectValue;
27
+ /** Callback on select or clear. Receives the same shape as value */
28
+ onChange?: (value: SelectValue) => void;
29
+ /** When true, onChange returns { label, value } instead of just the value */
30
+ labelInValue?: boolean;
31
+ /** Enables multiple selection */
32
+ multiple?: boolean;
33
+ /** Shows a search field inside the menu */
34
+ searchable?: boolean;
35
+ /** Search field placeholder */
36
+ searchPlaceholder?: string;
37
+ /** When false, disables the frontend filter — dev controls the options via onSearch + options */
38
+ filterOption?: boolean;
39
+ /** Callback fired on every change in the search field */
40
+ onSearch?: (query: string) => void;
41
+ /** Shows a loading state in the menu — use with server-side search */
42
+ loading?: boolean;
43
+ /** Callback fired when scrolling the list — use for infinite scroll */
44
+ onMenuScroll?: (e: React.UIEvent<HTMLUListElement>) => void;
45
+ /** Shows a "Select all" checkbox as the list's first row — requires multiple */
46
+ showSelectAll?: boolean;
47
+ /** Shows a spinner on the trigger and blocks interaction — use while the initial options are loading from the API */
48
+ isLoading?: boolean;
49
+ /** Disables interaction and applies disabled visual style */
50
+ disabled?: boolean;
51
+ /** Shows a clear button when a value is selected — default true */
52
+ clearable?: boolean;
53
+ /** Controlled open state — overrides the internal toggle */
54
+ open?: boolean;
55
+ /** Trigger element ID — auto-generated when omitted */
56
+ id?: string;
57
+ /** Field name for native form submission */
58
+ name?: string;
59
+ /** Additional CSS classes applied to the trigger (pill or input) */
60
+ triggerClassName?: string;
61
+ /** Additional CSS classes applied to the menu */
62
+ menuClassName?: string;
63
+ /** Additional CSS classes applied to the wrapper */
64
+ className?: string;
65
+ /** Maximum menu height in pixels (plain number, no unit) — default 360 */
66
+ menuMaxHeight?: number;
67
+ }
68
+ /**
69
+ * Width properties — menuMaxWidth and triggerMaxWidth only take effect with width="hug".
70
+ * Passing these props with width="fill" is a type error.
71
+ */
72
+ type SelectWidthProps = {
73
+ width?: 'hug';
74
+ triggerMaxWidth?: number;
75
+ menuMaxWidth?: number;
76
+ } | {
77
+ width: 'fill';
78
+ triggerMaxWidth?: never;
79
+ menuMaxWidth?: never;
80
+ };
81
+ /**
82
+ * Form validation props — only exist on trigger="input".
83
+ * On trigger="pill" they're forbidden (never) → using feedback/hint/required
84
+ * with pill is a type error.
85
+ */
86
+ interface SelectFormProps {
87
+ /** Validation visual state — input trigger only */
88
+ feedback?: InputFeedback;
89
+ /** Message shown below the input trigger */
90
+ hint?: string;
91
+ /** Marks the field as required — asterisk on the label and aria-required. Input trigger only */
92
+ required?: boolean;
93
+ }
94
+ type SelectNoFormProps = {
95
+ [K in keyof SelectFormProps]?: never;
96
+ };
97
+ /** trigger="input" — label required, iconLeft optional, form props allowed */
98
+ export type SelectInputProps = SelectBase & SelectWidthProps & SelectFormProps & {
99
+ trigger: 'input';
100
+ label: string;
101
+ iconLeft?: IconElement;
102
+ };
103
+ /** trigger="pill" with label — iconLeft optional, no form props */
104
+ export type SelectPillWithLabel = SelectBase & SelectWidthProps & SelectNoFormProps & {
105
+ trigger?: 'pill';
106
+ label: string;
107
+ iconLeft?: IconElement;
108
+ };
109
+ /** trigger="pill" with icon — label optional, no form props */
110
+ export type SelectPillWithIcon = SelectBase & SelectWidthProps & SelectNoFormProps & {
111
+ trigger?: 'pill';
112
+ label?: string;
113
+ iconLeft: IconElement;
114
+ };
115
+ export type SelectProps = SelectInputProps | SelectPillWithLabel | SelectPillWithIcon;
116
+ export declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLDivElement>>;
117
+ export default Select;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Select';
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import './Separator.css';
3
+ export type SeparatorOrientation = 'horizontal' | 'vertical';
4
+ export interface SeparatorProps {
5
+ /** Separator direction: horizontal = full-width line | vertical = full-height line */
6
+ orientation?: SeparatorOrientation;
7
+ /** Additional CSS classes */
8
+ className?: string;
9
+ }
10
+ export declare const Separator: React.FC<SeparatorProps>;
11
+ export default Separator;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export { Separator, type SeparatorProps, type SeparatorOrientation } from './Separator';
2
+ export { default } from './Separator';
@@ -0,0 +1,62 @@
1
+ import React from 'react';
2
+ import './Skeleton.css';
3
+ export interface SkeletonProps {
4
+ /** Real content, shown when loading is false. Without children, the skeleton works on its own as a placeholder — useful in lists before data arrives */
5
+ children?: React.ReactNode;
6
+ /** Number of lines in the paragraph block, below the title */
7
+ rows?: number;
8
+ /** Shows an avatar circle to the left of the title — always round, no shape option */
9
+ avatar?: boolean;
10
+ /** Shows the title line, wider and taller than the paragraph lines */
11
+ title?: boolean;
12
+ /** Turns on the shimmer animation sweeping across the blocks. Without it, the blocks stay static */
13
+ active?: boolean;
14
+ /** Shows the skeleton in place of children. false displays children normally */
15
+ loading?: boolean;
16
+ /** Additional CSS classes */
17
+ className?: string;
18
+ }
19
+ export interface SkeletonAvatarProps {
20
+ /** Circle size — same scale as the real Avatar */
21
+ size?: 'sm' | 'md' | 'lg';
22
+ /** Turns on the shimmer animation */
23
+ active?: boolean;
24
+ /** Additional CSS classes */
25
+ className?: string;
26
+ }
27
+ export interface SkeletonButtonProps {
28
+ /** Block height — sm = 40px (same as Button variant="pill"), md = 48px (default, same as the default Button), lg = 56px (same as Button lg) */
29
+ size?: 'sm' | 'md' | 'lg';
30
+ /** Turns on the shimmer animation */
31
+ active?: boolean;
32
+ /** Additional CSS classes */
33
+ className?: string;
34
+ }
35
+ export interface SkeletonInputProps {
36
+ /** Block height — sm = 40px, md = 48px, lg = 56px (default, same as the real Input, which has no size prop) */
37
+ size?: 'sm' | 'md' | 'lg';
38
+ /** Turns on the shimmer animation */
39
+ active?: boolean;
40
+ /** Additional CSS classes */
41
+ className?: string;
42
+ }
43
+ export interface SkeletonImageProps {
44
+ /** Fills 100% of the parent's width and height, instead of the default fixed size — use when the real container (e.g. a Card's cover) has a variable size */
45
+ fill?: boolean;
46
+ /** Turns on the shimmer animation */
47
+ active?: boolean;
48
+ /** Additional CSS classes */
49
+ className?: string;
50
+ }
51
+ declare const SkeletonAvatar: React.FC<SkeletonAvatarProps>;
52
+ declare const SkeletonButton: React.FC<SkeletonButtonProps>;
53
+ declare const SkeletonInput: React.FC<SkeletonInputProps>;
54
+ declare const SkeletonImage: React.FC<SkeletonImageProps>;
55
+ export interface SkeletonComponent extends React.FC<SkeletonProps> {
56
+ Avatar: typeof SkeletonAvatar;
57
+ Button: typeof SkeletonButton;
58
+ Input: typeof SkeletonInput;
59
+ Image: typeof SkeletonImage;
60
+ }
61
+ declare const Skeleton: SkeletonComponent;
62
+ export { Skeleton };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Skeleton';
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import './Spinner.css';
3
+ export type SpinnerSize = 'sm' | 'md' | 'lg';
4
+ export type SpinnerVariant = 'gradient' | 'solid';
5
+ export interface SpinnerProps {
6
+ /** Arc style: solid scheme color or animated gradient (scheme→secondary→tertiary). Default: 'solid' */
7
+ variant?: SpinnerVariant;
8
+ /** Spinner size: 'sm' = 24px · 'md' = 40px · 'lg' = 56px. Default: 'md' */
9
+ size?: SpinnerSize;
10
+ /** When true, stops the animation and shows a filled circle with a checkmark — use to confirm an action's completion */
11
+ done?: boolean;
12
+ /** Fired once when the completion (done) animation finishes playing — use to hide the spinner or advance to the next step */
13
+ onComplete?: () => void;
14
+ /** When true, shows the spinner centered in a fixed overlay covering the whole screen — use to block the UI during a global loading state */
15
+ fullscreen?: boolean;
16
+ /** Additional CSS class applied to the root element */
17
+ className?: string;
18
+ }
19
+ export declare const Spinner: React.FC<SpinnerProps>;
20
+ export default Spinner;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Spinner';
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import { IconElement } from '../Icon/Icon';
3
+ import './StatCard.css';
4
+ export interface StatCardProps {
5
+ /** Numeric value or highlighted text — the card's big number */
6
+ value: string | number;
7
+ /** Descriptive label shown below the value */
8
+ label: string;
9
+ /** Icon (24px) shown next to the value */
10
+ icon?: IconElement;
11
+ /** Card width — 'hug' hugs the content (clamped 200–240px), 'fill' takes the container's width */
12
+ width?: 'hug' | 'fill';
13
+ /** Additional CSS classes */
14
+ className?: string;
15
+ }
16
+ export declare const StatCard: React.FC<StatCardProps>;
17
+ export interface StatCardGroupProps {
18
+ /** The group's StatCards — as many as you want; they adjust per row (2 per row on mobile) */
19
+ children: React.ReactNode;
20
+ /** Additional CSS classes */
21
+ className?: string;
22
+ }
23
+ export declare const StatCardGroup: React.FC<StatCardGroupProps>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './StatCard';
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import './Switch.css';
3
+ export type SwitchSize = 'sm' | 'md';
4
+ export interface SwitchProps {
5
+ /** Text associated with the switch */
6
+ label?: string;
7
+ /** Switch's visual size */
8
+ size?: SwitchSize;
9
+ /** Width: 'hug' = fits content | 'fill' = 100% */
10
+ width?: 'hug' | 'fill';
11
+ /** Helper text shown below the label */
12
+ hint?: string;
13
+ /** On/off state (controlled) — use with onChange */
14
+ checked?: boolean;
15
+ /** Initial state (uncontrolled) — ignored when checked is passed */
16
+ defaultChecked?: boolean;
17
+ /** Callback fired when toggling — receives the new state */
18
+ onChange?: (value: boolean) => void;
19
+ /** Shows a wrapper with padding and border */
20
+ container?: boolean;
21
+ /** Disables interaction and applies disabled visual style */
22
+ disabled?: boolean;
23
+ /** Additional CSS classes */
24
+ className?: string;
25
+ }
26
+ export declare const Switch: React.FC<SwitchProps>;
27
+ export default Switch;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export { Switch } from './Switch';
2
+ export type { SwitchProps, SwitchSize } from './Switch';
@@ -0,0 +1,88 @@
1
+ import React from 'react';
2
+ import './Table.css';
3
+ import '../../foundations/Scrollbar/Scrollbar.css';
4
+ import { type PaginationProps } from '../Pagination';
5
+ export interface TableColumn<T = Record<string, unknown>> {
6
+ /** Unique key — matches the row object's property and identifies the column */
7
+ key: string;
8
+ /** Title shown in the header. '' or omitted shows no visible label — the column stays aligned with the grid */
9
+ title?: string;
10
+ /** Fixed column width — number (px) or any grid-track value ('120px', '1fr'). Don't combine with minWidth/maxWidth */
11
+ width?: number | string;
12
+ /** Floor of the flexible column — ignored when width is set */
13
+ minWidth?: number;
14
+ /** Ceiling of the flexible column — ignored when width is set */
15
+ maxWidth?: number;
16
+ /** Content alignment — omitted = start (default) */
17
+ align?: 'center' | 'end';
18
+ /** Truncates the content to one line with ellipsis and shows the full value in a Tooltip on hover */
19
+ ellipsis?: boolean;
20
+ /** true = sortable, sorting done by the backend (the component only reports state via onSortChange, doesn't reorder `rows`) · function = sorts on the frontend using this comparator — handle dates and numbers inside it, don't let the component guess the type */
21
+ sortable?: boolean | ((a: T, b: T) => number);
22
+ /** Custom cell rendering — when omitted, displays row[key] directly */
23
+ render?: (value: unknown, row: T, index: number) => React.ReactNode;
24
+ }
25
+ export interface TableSort {
26
+ key: string;
27
+ direction: 'asc' | 'desc';
28
+ }
29
+ export interface TableProps<T extends Record<string, unknown> = Record<string, unknown>> {
30
+ /** Column definitions */
31
+ columns: TableColumn<T>[];
32
+ /** Row data */
33
+ rows: T[];
34
+ /**
35
+ * Shows a 1px neutral-20 border around the component. `false` by default.
36
+ * Use `true` when the surrounding background matches the Table's background (--color-neutral-00) —
37
+ * the border is what distinguishes the two.
38
+ */
39
+ bordered?: boolean;
40
+ /** Header with title and/or filters, rendered inside the Table itself, above the list — use Table.Header */
41
+ header?: React.ReactNode;
42
+ /** Field used as each row's unique identifier */
43
+ keyField?: string;
44
+ /** Enables multi-select checkbox on all rows */
45
+ rowSelection?: boolean;
46
+ /** Set of selected ids — controlled mode */
47
+ selectedIds?: string[];
48
+ /** Fired when checking or unchecking rows */
49
+ onSelectionChange?: (ids: string[]) => void;
50
+ /** Controlled sorting — { key, direction } or null (no sorting) */
51
+ sort?: TableSort | null;
52
+ /** Initial sorting — uncontrolled mode */
53
+ defaultSort?: TableSort | null;
54
+ /** Fired when clicking a sortable header, with the new state (or null when returning to the neutral state) */
55
+ onSortChange?: (sort: TableSort | null) => void;
56
+ /** Makes the entire row clickable (cursor, focus, and highlight) — like Card's hoverable. No effect without onRowClick */
57
+ hoverable?: boolean;
58
+ /** Fired when clicking anywhere on the row that isn't an interactive element (button, link, checkbox) — use with hoverable */
59
+ onRowClick?: (row: T) => void;
60
+ /** Pagination config — passed straight through to the Pagination component, rendered below the list */
61
+ pagination?: Omit<PaginationProps, 'className'>;
62
+ className?: string;
63
+ }
64
+ export interface TableHeaderProps {
65
+ /** Title shown on the left */
66
+ title?: React.ReactNode;
67
+ /** Filters and other controls — always right-aligned. When it doesn't fit next to the title, wraps to a line below it */
68
+ filters?: React.ReactNode;
69
+ /** Extra free-form content, rendered after title/filters */
70
+ children?: React.ReactNode;
71
+ /** Additional CSS classes */
72
+ className?: string;
73
+ }
74
+ export declare const TableHeader: React.FC<TableHeaderProps>;
75
+ export interface TableCellProps {
76
+ /** Primary line */
77
+ primary?: React.ReactNode;
78
+ /** Secondary / complement line */
79
+ secondary?: React.ReactNode;
80
+ /** Highlight secondary as alert (error color) */
81
+ alert?: boolean;
82
+ }
83
+ export declare const TableCell: React.FC<TableCellProps>;
84
+ export interface TableComponent {
85
+ <T extends Record<string, unknown>>(props: TableProps<T>): React.ReactElement;
86
+ Header: typeof TableHeader;
87
+ }
88
+ export declare const Table: TableComponent;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Table';
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import './Text.css';
3
+ export type TextVariant = 'displayLg' | 'displayMd' | 'displaySm' | 'titleLg' | 'titleMd' | 'titleSm' | 'bodyMd' | 'bodySm' | 'labelSemiBold' | 'labelRegular';
4
+ export type TextColor = 'default' | 'inherit' | 'primary' | 'error' | 'success' | 'alert';
5
+ export interface TextProps {
6
+ /** Displayed text content — free-form */
7
+ children: React.ReactNode;
8
+ /** Typographic style — brings font-size, line-height, and weight from the matching token */
9
+ variant?: TextVariant;
10
+ /** Rendered HTML tag (required) — the dev chooses the semantic element (h1..h6, p, span, label…). Doesn't change the style, only the DOM */
11
+ as: React.ElementType;
12
+ /** Text color (token). 'inherit' takes the parent's computed color — use when the real color is
13
+ * decided by an ancestor (e.g. a component's own variant, like Alert's tinted surface).
14
+ * 'primary' follows the selected scheme/custom — automatically becomes a gradient when the active scheme is lya */
15
+ color?: TextColor;
16
+ /** Associates a <label> with its control by id — only meaningful when as="label" */
17
+ htmlFor?: string;
18
+ /** Element id — e.g. to be referenced by another element's aria-labelledby/aria-describedby */
19
+ id?: string;
20
+ /** Additional CSS classes */
21
+ className?: string;
22
+ }
23
+ export declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLElement>>;
24
+ export default Text;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Text';
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import './TextEditor.css';
3
+ export interface TextEditorProps {
4
+ placeholder?: string;
5
+ defaultValue?: string;
6
+ onChange?: (html: string) => void;
7
+ minHeight?: number;
8
+ className?: string;
9
+ }
10
+ export declare const TextEditor: React.FC<TextEditorProps>;
11
+ export default TextEditor;
@@ -0,0 +1 @@
1
+ export * from './TextEditor';
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+ import { TooltipPosition } from '../Tooltip';
3
+ import './Toast.css';
4
+ export type ToastFeedback = 'neutral' | 'success' | 'alert' | 'error';
5
+ export interface ToastProps {
6
+ /** Message text shown in the toast */
7
+ message: string;
8
+ /** Visual state — defines icon and color: success (green), alert (yellow), error (red), neutral (no icon) */
9
+ feedback?: ToastFeedback;
10
+ /** Action button label shown to the right of the message */
11
+ actionLabel?: string;
12
+ /** Callback for the action button click */
13
+ onAction?: () => void;
14
+ /** Disables the action button */
15
+ actionDisabled?: boolean;
16
+ /** Tooltip text shown when the action button is disabled */
17
+ actionDisabledTooltip?: string;
18
+ /** Position of the disabled action button's tooltip — default 'top' */
19
+ actionDisabledTooltipPosition?: TooltipPosition;
20
+ /** Shows the close (✕) button on the right — on by default */
21
+ showDismiss?: boolean;
22
+ /** Callback for the close button click */
23
+ onDismiss?: () => void;
24
+ /** @internal Applies the exit animation — controlled by Toaster, don't use directly */
25
+ leaving?: boolean;
26
+ /** Additional CSS classes */
27
+ className?: string;
28
+ }
29
+ export declare const Toast: React.FC<ToastProps>;
30
+ export default Toast;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './Toast.css';
3
+ export declare const Toaster: React.FC;
4
+ export default Toaster;
@@ -0,0 +1,5 @@
1
+ export { toast } from './toast-api';
2
+ export { Toaster } from './Toaster';
3
+ export { Toast } from './Toast';
4
+ export type { ToastProps, ToastFeedback } from './Toast';
5
+ export type { ToastOptions } from './toast-store';
@@ -0,0 +1,19 @@
1
+ import { type ToastOptions } from './toast-store';
2
+ /** Options for the shortcuts — the feedback is already defined by the shortcut itself */
3
+ type ShorthandOptions = Omit<ToastOptions, 'feedback'>;
4
+ interface ToastApi {
5
+ /** Fires a toast. Returns the id (use it with toast.dismiss). */
6
+ (message: string, opts?: ToastOptions): number;
7
+ /** Green success shortcut */
8
+ success: (message: string, opts?: ShorthandOptions) => number;
9
+ /** Red error shortcut (stays 8s instead of 4s) */
10
+ error: (message: string, opts?: ShorthandOptions) => number;
11
+ /** Yellow alert shortcut */
12
+ alert: (message: string, opts?: ShorthandOptions) => number;
13
+ /** Neutral shortcut (no icon) */
14
+ neutral: (message: string, opts?: ShorthandOptions) => number;
15
+ /** Closes a toast by id (triggers the exit animation) */
16
+ dismiss: (id: number) => void;
17
+ }
18
+ export declare const toast: ToastApi;
19
+ export type { ToastOptions };