@dss-kit/ui-kit 0.1.8 → 0.1.10

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 (84) hide show
  1. package/dist/components/builders/Box/Box.d.ts +72 -74
  2. package/dist/components/builders/Box/index.d.ts +2 -2
  3. package/dist/components/builders/Box/type.d.ts +38 -53
  4. package/dist/components/builders/Loader/Loader.d.ts +3 -3
  5. package/dist/components/builders/Loader/index.d.ts +2 -2
  6. package/dist/components/builders/Modal/Modal.d.ts +30 -32
  7. package/dist/components/builders/Modal/Modal.stories.d.ts +3 -3
  8. package/dist/components/builders/Modal/ModalFooter/ModalFooter.d.ts +3 -5
  9. package/dist/components/builders/Modal/ModalFooter/index.d.ts +2 -2
  10. package/dist/components/builders/Modal/ModalHeader/ModalHeader.d.ts +12 -18
  11. package/dist/components/builders/Modal/ModalHeader/index.d.ts +2 -2
  12. package/dist/components/builders/Modal/ModalMain/ModalMain.d.ts +28 -30
  13. package/dist/components/builders/Modal/ModalMain/index.d.ts +3 -3
  14. package/dist/components/builders/Modal/index.d.ts +9 -12
  15. package/dist/components/builders/Ripple/Ripple.d.ts +16 -13
  16. package/dist/components/builders/Ripple/index.d.ts +2 -2
  17. package/dist/components/builders/Text/Text.d.ts +329 -476
  18. package/dist/components/builders/Text/Text.stories.d.ts +3 -3
  19. package/dist/components/builders/Text/index.d.ts +2 -2
  20. package/dist/components/builders/Text/utils/systemToClass.d.ts +23 -23
  21. package/dist/components/builders/index.d.ts +5 -5
  22. package/dist/components/controls/Button/Button.d.ts +78 -76
  23. package/dist/components/controls/Button/Button.d.ts.map +1 -1
  24. package/dist/components/controls/Button/Button.stories.d.ts +3 -3
  25. package/dist/components/controls/Button/index.d.ts +3 -3
  26. package/dist/components/controls/Button/styles.d.ts +4 -9
  27. package/dist/components/controls/Button/types.d.ts +3 -14
  28. package/dist/components/controls/Checkbox/Checkbox.d.ts +28 -29
  29. package/dist/components/controls/Checkbox/Checkbox.stories.d.ts +3 -3
  30. package/dist/components/controls/Checkbox/index.d.ts +2 -2
  31. package/dist/components/controls/IconButton/IconButton.d.ts +3 -11
  32. package/dist/components/controls/IconButton/IconButton.stories.d.ts +3 -3
  33. package/dist/components/controls/IconButton/IconButton.types.d.ts +10 -33
  34. package/dist/components/controls/IconButton/index.d.ts +3 -3
  35. package/dist/components/controls/Input/Input.d.ts +38 -47
  36. package/dist/components/controls/Input/Input.stories.d.ts +3 -3
  37. package/dist/components/controls/Input/index.d.ts +2 -2
  38. package/dist/components/controls/Select/Select.d.ts +23 -44
  39. package/dist/components/controls/Select/Select.d.ts.map +1 -1
  40. package/dist/components/controls/Select/Select.stories.d.ts +5 -5
  41. package/dist/components/controls/Select/index.d.ts +2 -2
  42. package/dist/components/controls/Switch/Switch.d.ts +83 -89
  43. package/dist/components/controls/Switch/Switch.stories.d.ts +3 -3
  44. package/dist/components/controls/Switch/index.d.ts +3 -3
  45. package/dist/components/controls/index.d.ts +7 -7
  46. package/dist/components/index.d.ts +4 -4
  47. package/dist/components/shared/Avatar/Avatar.d.ts +3 -10
  48. package/dist/components/shared/Avatar/Avatar.stories.d.ts +6 -6
  49. package/dist/components/shared/Avatar/Avatar.types.d.ts +8 -21
  50. package/dist/components/shared/Avatar/index.d.ts +3 -3
  51. package/dist/components/shared/Hint/Hint.d.ts +23 -34
  52. package/dist/components/shared/Hint/Hint.stories.d.ts +3 -3
  53. package/dist/components/shared/Hint/index.d.ts +2 -2
  54. package/dist/components/shared/Portal/Portal.d.ts +2 -2
  55. package/dist/components/shared/Portal/index.d.ts +2 -2
  56. package/dist/components/shared/Tag/Tag.d.ts +13 -20
  57. package/dist/components/shared/Tag/Tag.stories.d.ts +3 -3
  58. package/dist/components/shared/Tag/index.d.ts +3 -3
  59. package/dist/components/shared/index.d.ts +5 -5
  60. package/dist/index.d.ts +5 -5
  61. package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.d.ts +3 -7
  62. package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.types.d.ts +4 -4
  63. package/dist/providers/ThemeProviderScoped/index.d.ts +3 -3
  64. package/dist/providers/index.d.ts +2 -2
  65. package/dist/root.css +1 -886
  66. package/dist/types/children.types.d.ts +2 -2
  67. package/dist/types/index.d.ts +2 -2
  68. package/dist/types/tokens.types.d.ts +9 -74
  69. package/dist/ui-kit.cjs.js +4 -9322
  70. package/dist/ui-kit.cjs.js.map +1 -1
  71. package/dist/ui-kit.es.js +4029 -6922
  72. package/dist/ui-kit.es.js.map +1 -1
  73. package/dist/utils/hooks/index.d.ts +3 -3
  74. package/dist/utils/hooks/useControlled.d.ts +2 -5
  75. package/dist/utils/hooks/useDropdownPosition.d.ts +5 -8
  76. package/dist/utils/index.d.ts +3 -3
  77. package/dist/utils/styles/getFontWeightClass/getFontWeightClass.d.ts +3 -7
  78. package/dist/utils/styles/getFontWeightClass/index.d.ts +2 -2
  79. package/dist/utils/styles/getSizeClass/getSizeClass.d.ts +3 -7
  80. package/dist/utils/styles/getSizeClass/index.d.ts +2 -2
  81. package/dist/utils/styles/getStyleClass/getStyleClass.d.ts +2 -11
  82. package/dist/utils/styles/getStyleClass/index.d.ts +2 -2
  83. package/dist/utils/styles/index.d.ts +3 -3
  84. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- import { Meta, StoryObj } from "@storybook/react";
2
- import { TextProps } from "./Text";
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { TextProps } from './Text';
3
3
  declare const meta: Meta<TextProps>;
4
4
  export default meta;
5
5
  type Story = StoryObj<TextProps>;
@@ -8,4 +8,4 @@ export declare const Variants: Story;
8
8
  export declare const Colors: Story;
9
9
  export declare const Weights: Story;
10
10
  export declare const Clickable: Story;
11
- //# sourceMappingURL=Text.stories.d.ts.map
11
+ //# sourceMappingURL=Text.stories.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from "./Text.tsx";
2
- //# sourceMappingURL=index.d.ts.map
1
+ export * from './Text.tsx';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -1,26 +1,26 @@
1
1
  export type SystemStyleProps = {
2
- /** margin-top */
3
- mt?: number | string;
4
- /** margin-bottom */
5
- mb?: number | string;
6
- ml?: number | string;
7
- mr?: number | string;
8
- flex?: number | string;
9
- cursor?: React.CSSProperties["cursor"];
10
- wordBreak?: React.CSSProperties["wordBreak"];
11
- whiteSpace?: React.CSSProperties["whiteSpace"];
12
- textOverflow?: React.CSSProperties["textOverflow"];
13
- decoration?: React.CSSProperties["textDecoration"];
14
- /** @deprecated TODO: remove this after deprecation of color prop @use colorName or style.color instead */
15
- color?: React.CSSProperties["color"];
16
- center?: boolean;
17
- left?: boolean;
18
- right?: boolean;
19
- uppercase?: boolean;
20
- lowercase?: boolean;
21
- capitalize?: boolean;
22
- disabled?: boolean;
23
- overflow?: React.CSSProperties["overflow"];
2
+ /** margin-top */
3
+ mt?: number | string;
4
+ /** margin-bottom */
5
+ mb?: number | string;
6
+ ml?: number | string;
7
+ mr?: number | string;
8
+ flex?: number | string;
9
+ cursor?: React.CSSProperties["cursor"];
10
+ wordBreak?: React.CSSProperties["wordBreak"];
11
+ whiteSpace?: React.CSSProperties["whiteSpace"];
12
+ textOverflow?: React.CSSProperties["textOverflow"];
13
+ decoration?: React.CSSProperties["textDecoration"];
14
+ /** @deprecated TODO: remove this after deprecation of color prop @use colorName or style.color instead */
15
+ color?: React.CSSProperties["color"];
16
+ center?: boolean;
17
+ left?: boolean;
18
+ right?: boolean;
19
+ uppercase?: boolean;
20
+ lowercase?: boolean;
21
+ capitalize?: boolean;
22
+ disabled?: boolean;
23
+ overflow?: React.CSSProperties["overflow"];
24
24
  };
25
25
  export declare const systemToClass: (props: SystemStyleProps) => string;
26
- //# sourceMappingURL=systemToClass.d.ts.map
26
+ //# sourceMappingURL=systemToClass.d.ts.map
@@ -1,5 +1,5 @@
1
- export * from "./Box";
2
- export * from "./Modal";
3
- export * from "./Ripple";
4
- export * from "./Text";
5
- //# sourceMappingURL=index.d.ts.map
1
+ export * from './Box';
2
+ export * from './Modal';
3
+ export * from './Ripple';
4
+ export * from './Text';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -1,79 +1,81 @@
1
- import { HTMLMotionProps } from "framer-motion";
2
- import { default as React, FC } from "react";
3
- import { CornerRadius, Size } from "../../../types/tokens.types";
4
- import { ButtonColor, ButtonType } from "./types";
1
+ import { HTMLMotionProps } from 'framer-motion';
2
+ import { default as React, FC } from 'react';
3
+ import { CornerRadius, Size } from '../../../types/tokens.types';
4
+ import { ButtonColor, ButtonType } from './types';
5
5
  export interface ButtonProps extends Omit<HTMLMotionProps<"button">, "type"> {
6
- /**
7
- * Отключает кнопку.
8
- * При `true` блокирует клики, добавляет стиль `not-allowed` и понижает прозрачность.
9
- * @default false
10
- */
11
- disabled?: boolean;
12
- /**
13
- * Состояние загрузки.
14
- * При `true` текст скрывается и отображается Loader.
15
- * @default false
16
- */
17
- loading?: boolean;
18
- /**
19
- * Вариант отображения кнопки.
20
- * @default "filled"
21
- */
22
- variant?: ButtonType;
23
- /**
24
- * Цветовая схема (токен).
25
- * @default "accent"
26
- */
27
- color?: ButtonColor;
28
- /**
29
- * Скругление углов.
30
- * Использует системные значения из CornerRadius.
31
- * @default "lg"
32
- */
33
- borderRadius?: CornerRadius;
34
- /**
35
- * Интенсивность цвета (градация).
36
- * - `primary` — основной оттенок
37
- * - `secondary` — вторичный оттенок
38
- * @default "primary"
39
- */
40
- intensity?: "primary" | "secondary";
41
- wrapperClassName?: string;
42
- buttonClassName?: string;
43
- buttonDisabledClassName?: string;
44
- textClassName?: string;
45
- /**
46
- * Принудительно задать цвет фона (перекрывает токены).
47
- */
48
- backgroundColor?: string;
49
- /**
50
- * Принудительно задать цвет текста (перекрывает токены).
51
- */
52
- textColor?: string;
53
- /**
54
- * Принудительно задать цвет текста (перекрывает токены).
55
- */
56
- textFontWeight?: string;
57
- /**
58
- * Принудительно задать цвет рамки (перекрывает токены).
59
- */
60
- borderColor?: string;
61
- iconLeft?: React.ReactNode;
62
- iconRight?: React.ReactNode;
63
- /**
64
- * Ширина кнопки.
65
- * - `full` — 100%
66
- * - `auto` — по содержимому
67
- * - `number` — в px
68
- * @default "full"
69
- */
70
- width?: "full" | "auto" | number;
71
- /**
72
- * Размер кнопки (высота и размер текста).
73
- * Доступны: `xs`, `sm`, `md`, `lg` (без `xl`).
74
- * @default "md"
75
- */
76
- size?: Exclude<Size, "xl">;
6
+ /**
7
+ * Отключает кнопку.
8
+ * При `true` блокирует клики, добавляет стиль `not-allowed` и понижает прозрачность.
9
+ * @default false
10
+ */
11
+ disabled?: boolean;
12
+ /**
13
+ * Состояние загрузки.
14
+ * При `true` текст скрывается и отображается Loader.
15
+ * @default false
16
+ */
17
+ loading?: boolean;
18
+ /**
19
+ * Вариант отображения кнопки.
20
+ * @default "filled"
21
+ */
22
+ variant?: ButtonType;
23
+ /**
24
+ * Цветовая схема (токен).
25
+ * @default "accent"
26
+ */
27
+ color?: ButtonColor;
28
+ /**
29
+ * Скругление углов.
30
+ * Использует системные значения из CornerRadius.
31
+ * @default "lg"
32
+ */
33
+ borderRadius?: CornerRadius;
34
+ /**
35
+ * Интенсивность цвета (градация).
36
+ * - `primary` — основной оттенок
37
+ * - `secondary` — вторичный оттенок
38
+ * @default "primary"
39
+ */
40
+ intensity?: "primary" | "secondary";
41
+ wrapperClassName?: string;
42
+ buttonClassName?: string;
43
+ buttonDisabledClassName?: string;
44
+ textClassName?: string;
45
+ /**
46
+ * Принудительно задать цвет фона (перекрывает токены).
47
+ */
48
+ backgroundColor?: string;
49
+ /**
50
+ * Принудительно задать цвет текста (перекрывает токены).
51
+ */
52
+ textColor?: string;
53
+ /**
54
+ * Принудительно задать цвет текста (перекрывает токены).
55
+ */
56
+ textFontWeight?: string;
57
+ /**
58
+ * Принудительно задать цвет рамки (перекрывает токены).
59
+ */
60
+ borderColor?: string;
61
+ iconLeft?: React.ReactNode;
62
+ iconRight?: React.ReactNode;
63
+ /**
64
+ * Ширина кнопки.
65
+ * - `full` — 100%
66
+ * - `auto` — по содержимому
67
+ * - `number` — в px
68
+ * @default "full"
69
+ */
70
+ width?: "full" | "auto" | number;
71
+ /**
72
+ * Размер кнопки (высота и размер текста).
73
+ * Доступны: `xs`, `sm`, `md`, `lg` (без `xl`).
74
+ * @default "md"
75
+ */
76
+ size?: Exclude<Size, "xl">;
77
+ /** Значение flex свойства. true эквивалентно 1 */
78
+ flex?: true | number | string;
77
79
  }
78
80
  export declare const Button: FC<ButtonProps>;
79
- //# sourceMappingURL=Button.d.ts.map
81
+ //# sourceMappingURL=Button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/controls/Button/Button.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,eAAe,EAAU,MAAM,eAAe,CAAC;AAC7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,EAAW,MAAM,OAAO,CAAC;AAKzC,OAAO,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAQ/D,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEvD,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC1E;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,OAAO,CAAC,EAAE,UAAU,CAAC;IAErB;;;OAGG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IAEpB;;;;OAIG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAE5B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IACpC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE5B;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAEjC;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;CAC5B;AAED,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,CAkKlC,CAAC"}
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/controls/Button/Button.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,eAAe,EAAU,MAAM,eAAe,CAAC;AAC7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,EAAW,MAAM,OAAO,CAAC;AAKzC,OAAO,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAQ/D,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEvD,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC1E;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,OAAO,CAAC,EAAE,UAAU,CAAC;IAErB;;;OAGG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IAEpB;;;;OAIG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAE5B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IACpC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE5B;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAEjC;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAE3B,kDAAkD;IAClD,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;CAC/B;AAED,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,CAqKlC,CAAC"}
@@ -1,5 +1,5 @@
1
- import { Meta, StoryObj } from "@storybook/react";
2
- import { Button } from "./Button";
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Button } from './Button';
3
3
  declare const meta: Meta<typeof Button>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof Button>;
@@ -11,4 +11,4 @@ export declare const Loading: Story;
11
11
  export declare const WithIcon: Story;
12
12
  export declare const AutoWidth: Story;
13
13
  export declare const CustomColors: Story;
14
- //# sourceMappingURL=Button.stories.d.ts.map
14
+ //# sourceMappingURL=Button.stories.d.ts.map
@@ -1,3 +1,3 @@
1
- export type { ButtonProps } from "./Button";
2
- export { Button } from "./Button";
3
- //# sourceMappingURL=index.d.ts.map
1
+ export type { ButtonProps } from './Button';
2
+ export { Button } from './Button';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -1,13 +1,8 @@
1
- import { CornerRadius, Size } from "../../../types/tokens.types";
2
- import { ButtonColor, ButtonType } from "./types";
1
+ import { CornerRadius, Size } from '../../../types/tokens.types';
2
+ import { ButtonColor, ButtonType } from './types';
3
3
  export declare const baseButton: string;
4
4
  export declare const cornerRadiusValues: Record<CornerRadius, string>;
5
5
  export declare const sizeValues: Record<Exclude<Size, "xl">, string>;
6
6
  export declare const typeStyles: Record<ButtonType, string>;
7
- export declare const getVariantStyles: (
8
- variant: ButtonType,
9
- color: ButtonColor,
10
- intensity: "primary" | "secondary",
11
- disabled?: boolean
12
- ) => string;
13
- //# sourceMappingURL=styles.d.ts.map
7
+ export declare const getVariantStyles: (variant: ButtonType, color: ButtonColor, intensity: "primary" | "secondary", disabled?: boolean) => string;
8
+ //# sourceMappingURL=styles.d.ts.map
@@ -1,10 +1,4 @@
1
- import {
2
- AccentType,
3
- NegativeType,
4
- NeutralType,
5
- PositiveType,
6
- WarningType,
7
- } from "../../../types/tokens.types";
1
+ import { AccentType, NegativeType, NeutralType, PositiveType, WarningType } from '../../../types/tokens.types';
8
2
  /**
9
3
  * Тип варианта кнопки
10
4
  * - `clear` — прозрачная, без границ и фона
@@ -21,10 +15,5 @@ export type ButtonType = "clear" | "filled" | "outline";
21
15
  * - `positive` — позитивный (успех)
22
16
  * - `warning` — предупреждение
23
17
  */
24
- export type ButtonColor =
25
- | AccentType
26
- | NeutralType
27
- | NegativeType
28
- | PositiveType
29
- | WarningType;
30
- //# sourceMappingURL=types.d.ts.map
18
+ export type ButtonColor = AccentType | NeutralType | NegativeType | PositiveType | WarningType;
19
+ //# sourceMappingURL=types.d.ts.map
@@ -1,31 +1,30 @@
1
- import { default as React } from "react";
2
- import { TextColor } from "../../builders";
1
+ import { default as React } from 'react';
2
+ import { TextColor } from '../../builders';
3
3
  interface CheckboxProps {
4
- checked?: boolean;
5
- onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
6
- disabled?: boolean;
7
- indeterminate?: boolean;
8
- size?: "sm" | "md";
9
- title?: string;
10
- titleColor?: TextColor;
11
- subtitle?: string;
12
- /** @default "secondary" */
13
- subtitleColor?: TextColor;
14
- name?: string;
15
- required?: boolean;
16
- error?: boolean;
17
- /** Вариант заднего фона.
18
- *
19
- * primary - серый
20
- *
21
- * secondary - белый
22
- *
23
- * @default primary
24
- */
25
- variant?: "primary" | "secondary";
26
- flex?: React.CSSProperties["flex"];
4
+ checked?: boolean;
5
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
6
+ disabled?: boolean;
7
+ indeterminate?: boolean;
8
+ size?: "sm" | "md";
9
+ title?: string;
10
+ titleColor?: TextColor;
11
+ subtitle?: string;
12
+ /** @default "secondary" */
13
+ subtitleColor?: TextColor;
14
+ name?: string;
15
+ required?: boolean;
16
+ error?: boolean;
17
+ /** Вариант заднего фона.
18
+ *
19
+ * primary - серый
20
+ *
21
+ * secondary - белый
22
+ *
23
+ * @default primary
24
+ */
25
+ variant?: "primary" | "secondary";
26
+ flex?: React.CSSProperties["flex"];
27
27
  }
28
- export declare const Checkbox: React.ForwardRefExoticComponent<
29
- CheckboxProps & React.RefAttributes<HTMLInputElement>
30
- >;
31
- //# sourceMappingURL=Checkbox.d.ts.map
28
+ export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
29
+ export {};
30
+ //# sourceMappingURL=Checkbox.d.ts.map
@@ -1,5 +1,5 @@
1
- import { Meta, StoryObj } from "@storybook/react";
2
- import { Checkbox } from "./Checkbox";
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Checkbox } from './Checkbox';
3
3
  declare const meta: Meta<typeof Checkbox>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof Checkbox>;
@@ -9,4 +9,4 @@ export declare const Colors: Story;
9
9
  export declare const States: Story;
10
10
  export declare const Controlled: Story;
11
11
  export declare const WithLabel: Story;
12
- //# sourceMappingURL=Checkbox.stories.d.ts.map
12
+ //# sourceMappingURL=Checkbox.stories.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from "./Checkbox";
2
- //# sourceMappingURL=index.d.ts.map
1
+ export * from './Checkbox';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -1,11 +1,3 @@
1
- import { IIconButtonProps } from "./IconButton.types.ts";
2
- export declare function IconButton({
3
- attr,
4
- children,
5
- className,
6
- type,
7
- color,
8
- size,
9
- ...props
10
- }: IIconButtonProps): import("react/jsx-runtime").JSX.Element;
11
- //# sourceMappingURL=IconButton.d.ts.map
1
+ import { IIconButtonProps } from './IconButton.types.ts';
2
+ export declare function IconButton({ attr, children, className, type, color, size, ...props }: IIconButtonProps): import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=IconButton.d.ts.map
@@ -1,8 +1,8 @@
1
- import { Meta, StoryObj } from "@storybook/react-vite";
2
- import { IIconButtonProps } from "./IconButton.types";
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { IIconButtonProps } from './IconButton.types';
3
3
  declare const meta: Meta<IIconButtonProps>;
4
4
  type Story = StoryObj<typeof meta>;
5
5
  export declare const SvgIcon: Story;
6
6
  export declare const ImgTag: Story;
7
7
  export default meta;
8
- //# sourceMappingURL=IconButton.stories.d.ts.map
8
+ //# sourceMappingURL=IconButton.stories.d.ts.map
@@ -1,36 +1,13 @@
1
- import { ComponentProps } from "react";
2
- import {
3
- CustomType,
4
- NegativeType,
5
- NeutralType,
6
- PositiveType,
7
- PrimaryType,
8
- SecondaryType,
9
- Size,
10
- WarningType,
11
- } from "../../../types/tokens.types.ts";
12
- type IconButtonAttributes = Pick<
13
- ComponentProps<"button">,
14
- "className" | "onClick" | "disabled" | "type" | "children"
15
- >;
16
- type IconButtonRestAttributes = Omit<
17
- ComponentProps<"button">,
18
- keyof IconButtonAttributes
19
- >;
1
+ import { ComponentProps } from 'react';
2
+ import { CustomType, NegativeType, NeutralType, PositiveType, PrimaryType, SecondaryType, Size, WarningType } from '../../../types/tokens.types.ts';
3
+ type IconButtonAttributes = Pick<ComponentProps<"button">, "className" | "onClick" | "disabled" | "type" | "children">;
4
+ type IconButtonRestAttributes = Omit<ComponentProps<"button">, keyof IconButtonAttributes>;
20
5
  type IconButtonSize = Extract<Size, "xs" | "sm" | "md"> | CustomType;
21
- type IconButtonColor =
22
- | PrimaryType
23
- | SecondaryType
24
- | NegativeType
25
- | PositiveType
26
- | WarningType
27
- | NeutralType
28
- | CustomType
29
- | "neutral-white"
30
- | "no-bg";
6
+ type IconButtonColor = PrimaryType | SecondaryType | NegativeType | PositiveType | WarningType | NeutralType | CustomType | "neutral-white" | "no-bg";
31
7
  export interface IIconButtonProps extends IconButtonAttributes {
32
- size?: IconButtonSize;
33
- color?: IconButtonColor;
34
- attr?: IconButtonRestAttributes;
8
+ size?: IconButtonSize;
9
+ color?: IconButtonColor;
10
+ attr?: IconButtonRestAttributes;
35
11
  }
36
- //# sourceMappingURL=IconButton.types.d.ts.map
12
+ export {};
13
+ //# sourceMappingURL=IconButton.types.d.ts.map
@@ -1,3 +1,3 @@
1
- export * from "./IconButton";
2
- export type * from "./IconButton.types";
3
- //# sourceMappingURL=index.d.ts.map
1
+ export * from './IconButton';
2
+ export type * from './IconButton.types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -1,66 +1,58 @@
1
- import { default as React } from "react";
1
+ import { default as React } from 'react';
2
2
  /**
3
3
  * Императивный интерфейс для работы с Input через ref.
4
4
  */
5
5
  export interface InputRef {
6
- /** Фокус на поле */
7
- focus: () => void;
8
- /** Снятие фокуса */
9
- blur: () => void;
10
- /** Текущее значение поля */
11
- value: string | undefined;
6
+ /** Фокус на поле */
7
+ focus: () => void;
8
+ /** Снятие фокуса */
9
+ blur: () => void;
10
+ /** Текущее значение поля */
11
+ value: string | undefined;
12
12
  }
13
13
  /**
14
14
  * Общие пропсы для Input и Textarea.
15
15
  */
16
16
  type CommonProps = {
17
- /** Заголовок над полем */
18
- label?: string;
19
- /** Подсказка или JSX-элемент под полем */
20
- prompt?: string | React.ReactNode;
21
- /** Есть ли ошибка */
22
- error?: boolean;
23
- /** Текст ошибки */
24
- errorText?: string;
25
- /** Размер поля */
26
- size?: "sm" | "md";
27
- /** Префикс (иконка/элемент перед полем) */
28
- prefix?: React.ReactNode;
29
- /** Суффикс (элемент после поля) */
30
- suffix?: React.ReactNode;
31
- /** Цвет фона */
32
- background?: "white" | "gray";
33
- /** Кнопка очистки значения */
34
- showClearButton?: boolean;
35
- /** Заблокированное состояние */
36
- disabled?: boolean;
37
- /** Контролируемое значение */
38
- value?: string | number;
39
- /** Неконтролируемое значение по умолчанию */
40
- defaultValue?: string | number;
17
+ /** Заголовок над полем */
18
+ label?: string;
19
+ /** Подсказка или JSX-элемент под полем */
20
+ prompt?: string | React.ReactNode;
21
+ /** Есть ли ошибка */
22
+ error?: boolean;
23
+ /** Текст ошибки */
24
+ errorText?: string;
25
+ /** Размер поля */
26
+ size?: "sm" | "md";
27
+ /** Префикс (иконка/элемент перед полем) */
28
+ prefix?: React.ReactNode;
29
+ /** Суффикс (элемент после поля) */
30
+ suffix?: React.ReactNode;
31
+ /** Цвет фона */
32
+ background?: "white" | "gray";
33
+ /** Кнопка очистки значения */
34
+ showClearButton?: boolean;
35
+ /** Заблокированное состояние */
36
+ disabled?: boolean;
37
+ /** Контролируемое значение */
38
+ value?: string | number;
39
+ /** Неконтролируемое значение по умолчанию */
40
+ defaultValue?: string | number;
41
41
  };
42
42
  /**
43
43
  * Пропсы для input (однострочный режим).
44
44
  */
45
- type InputElementProps = CommonProps &
46
- Omit<
47
- React.InputHTMLAttributes<HTMLInputElement>,
48
- "size" | "prefix" | "onChange" | "value" | "defaultValue"
49
- > & {
45
+ type InputElementProps = CommonProps & Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "prefix" | "onChange" | "value" | "defaultValue"> & {
50
46
  multiline?: false;
51
47
  /** Обработчик изменения (только для input) */
52
48
  onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
53
49
  /** Тип поля (text, password и т.д.) */
54
50
  type?: "text" | "password" | string;
55
- };
51
+ };
56
52
  /**
57
53
  * Пропсы для textarea (многострочный режим).
58
54
  */
59
- type TextareaElementProps = CommonProps &
60
- Omit<
61
- React.TextareaHTMLAttributes<HTMLTextAreaElement>,
62
- "size" | "prefix" | "onChange" | "value" | "defaultValue"
63
- > & {
55
+ type TextareaElementProps = CommonProps & Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "size" | "prefix" | "onChange" | "value" | "defaultValue"> & {
64
56
  multiline: true;
65
57
  /** Количество строк по умолчанию */
66
58
  rows?: number;
@@ -68,7 +60,7 @@ type TextareaElementProps = CommonProps &
68
60
  autoResize?: boolean;
69
61
  /** Обработчик изменения (только для textarea) */
70
62
  onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
71
- };
63
+ };
72
64
  export type InputProps = InputElementProps | TextareaElementProps;
73
65
  /**
74
66
  * Компонент Input — универсальное поле ввода (input/textarea) с поддержкой:
@@ -80,7 +72,6 @@ export type InputProps = InputElementProps | TextareaElementProps;
80
72
  *
81
73
  * Поддерживает ref для императивного API (focus/blur/value).
82
74
  */
83
- export declare const Input: React.ForwardRefExoticComponent<
84
- InputProps & React.RefAttributes<InputRef>
85
- >;
86
- //# sourceMappingURL=Input.d.ts.map
75
+ export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<InputRef>>;
76
+ export {};
77
+ //# sourceMappingURL=Input.d.ts.map
@@ -1,5 +1,5 @@
1
- import { Meta, StoryObj } from "@storybook/react";
2
- import { Input } from "./Input";
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Input } from './Input';
3
3
  declare const meta: Meta<typeof Input>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof Input>;
@@ -16,4 +16,4 @@ export declare const Password: Story;
16
16
  export declare const WithPrompt: Story;
17
17
  export declare const Controlled: Story;
18
18
  export declare const DifferentBackgrounds: Story;
19
- //# sourceMappingURL=Input.stories.d.ts.map
19
+ //# sourceMappingURL=Input.stories.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from "./Input";
2
- //# sourceMappingURL=index.d.ts.map
1
+ export * from './Input';
2
+ //# sourceMappingURL=index.d.ts.map