@kvell-group/ui 1.14.2 → 1.15.1

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 (141) hide show
  1. package/package.json +4 -7
  2. package/src/assets/arrow-left.svg +3 -0
  3. package/src/assets/calendar.svg +3 -0
  4. package/src/assets/card-logos/maestro.svg +8 -0
  5. package/src/assets/card-logos/mastercard.svg +5 -0
  6. package/src/assets/card-logos/mir.svg +10 -0
  7. package/src/assets/card-logos/unionpay.svg +4 -0
  8. package/src/assets/card-logos/visa-electron.svg +12 -0
  9. package/src/assets/card-logos/visa.svg +4 -0
  10. package/src/assets/error.svg +3 -0
  11. package/src/assets/fonts/password.woff2 +0 -0
  12. package/src/assets/lead-icon.svg +3 -0
  13. package/src/components/Button/Button.module.css +50 -0
  14. package/src/components/Button/Button.stories.tsx +90 -0
  15. package/src/components/Button/Button.tsx +25 -0
  16. package/src/components/Button/constants.ts +17 -0
  17. package/src/components/Button/index.ts +1 -0
  18. package/src/components/Button/types.ts +8 -0
  19. package/src/components/Inputs/CardInput/CardInput.stories.tsx +42 -0
  20. package/src/components/Inputs/CardInput/CardInput.tsx +28 -0
  21. package/src/components/Inputs/CardInput/index.ts +1 -0
  22. package/src/components/Inputs/CardInput/useCardLogo.ts +88 -0
  23. package/src/components/Inputs/CvvInput/CvvInput.module.css +12 -0
  24. package/src/components/Inputs/CvvInput/CvvInput.stories.tsx +42 -0
  25. package/src/components/Inputs/CvvInput/CvvInput.tsx +27 -0
  26. package/src/components/Inputs/CvvInput/index.ts +1 -0
  27. package/src/components/Inputs/Input.module.css +38 -0
  28. package/src/components/Inputs/Input.stories.tsx +44 -0
  29. package/src/components/Inputs/Input.tsx +20 -0
  30. package/src/components/Inputs/MaskedInput/MaskedInput.stories.tsx +58 -0
  31. package/src/components/Inputs/MaskedInput/MaskedInput.tsx +16 -0
  32. package/src/components/Inputs/MaskedInput/index.ts +1 -0
  33. package/src/components/Inputs/PasswordInput/PasswordInput.module.css +3 -0
  34. package/src/components/Inputs/PasswordInput/PasswordInput.stories.tsx +42 -0
  35. package/src/components/Inputs/PasswordInput/PasswordInput.tsx +26 -0
  36. package/src/components/Inputs/PasswordInput/index.ts +1 -0
  37. package/src/components/Inputs/index.ts +1 -0
  38. package/src/components/Inputs/types.ts +6 -0
  39. package/src/components/Loader/Loader.module.css +46 -0
  40. package/src/components/Loader/Loader.stories.tsx +39 -0
  41. package/src/components/Loader/Loader.tsx +36 -0
  42. package/src/components/Loader/constants.ts +8 -0
  43. package/src/components/Loader/index.ts +1 -0
  44. package/src/components/MainProvider/MantineProvider.tsx +15 -0
  45. package/src/components/MainProvider/index.ts +1 -0
  46. package/src/components/Modal/Modal.module.css +43 -0
  47. package/src/components/Modal/Modal.stories.tsx +83 -0
  48. package/src/components/Modal/Modal.tsx +10 -0
  49. package/src/components/Modal/index.ts +1 -0
  50. package/src/components/Switch/Switch.module.css +28 -0
  51. package/src/components/Switch/Switch.stories.tsx +39 -0
  52. package/src/components/Switch/Switch.tsx +19 -0
  53. package/src/components/Switch/index.tsx +1 -0
  54. package/src/components/Text/Text.stories.tsx +40 -0
  55. package/src/components/Text/Text.tsx +21 -0
  56. package/src/components/Text/index.ts +1 -0
  57. package/src/components/Text/types.ts +8 -0
  58. package/src/components/theme.ts +180 -0
  59. package/src/constants/font-variants.ts +31 -0
  60. package/src/constants/masks.ts +7 -0
  61. package/src/index.ts +17 -0
  62. package/src/styles/typography.module.css +76 -0
  63. package/src/vite-env.d.ts +2 -0
  64. package/dist/Input.module-CPh0cNNI.js +0 -9
  65. package/dist/assets/Button.css +0 -1
  66. package/dist/assets/CvvInput.css +0 -1
  67. package/dist/assets/Input.css +0 -1
  68. package/dist/assets/Loader.css +0 -1
  69. package/dist/assets/Modal.css +0 -1
  70. package/dist/assets/PasswordInput.css +0 -1
  71. package/dist/assets/Switch.css +0 -1
  72. package/dist/assets/typography.css +0 -1
  73. package/dist/clsx-OuTLNxxd.js +0 -16
  74. package/dist/components/Button/Button.d.ts +0 -19
  75. package/dist/components/Button/Button.js +0 -24
  76. package/dist/components/Button/constants.d.ts +0 -8
  77. package/dist/components/Button/constants.js +0 -15
  78. package/dist/components/Button/index.d.ts +0 -1
  79. package/dist/components/Button/index.js +0 -4
  80. package/dist/components/Button/types.d.ts +0 -5
  81. package/dist/components/Button/types.js +0 -1
  82. package/dist/components/Inputs/CardInput/CardInput.d.ts +0 -2
  83. package/dist/components/Inputs/CardInput/CardInput.js +0 -28
  84. package/dist/components/Inputs/CardInput/index.d.ts +0 -1
  85. package/dist/components/Inputs/CardInput/index.js +0 -4
  86. package/dist/components/Inputs/CardInput/useCardLogo.d.ts +0 -1
  87. package/dist/components/Inputs/CardInput/useCardLogo.js +0 -49
  88. package/dist/components/Inputs/CardInputTest.d.ts +0 -2
  89. package/dist/components/Inputs/CardInputTest.js +0 -23
  90. package/dist/components/Inputs/CvvInput/CvvInput.d.ts +0 -2
  91. package/dist/components/Inputs/CvvInput/CvvInput.js +0 -21
  92. package/dist/components/Inputs/CvvInput/index.d.ts +0 -1
  93. package/dist/components/Inputs/CvvInput/index.js +0 -4
  94. package/dist/components/Inputs/Input.d.ts +0 -4
  95. package/dist/components/Inputs/Input.js +0 -11
  96. package/dist/components/Inputs/MaskedInput/MaskedInput.d.ts +0 -2
  97. package/dist/components/Inputs/MaskedInput/MaskedInput.js +0 -15
  98. package/dist/components/Inputs/MaskedInput/index.d.ts +0 -1
  99. package/dist/components/Inputs/MaskedInput/index.js +0 -4
  100. package/dist/components/Inputs/PasswordInput/PasswordInput.d.ts +0 -4
  101. package/dist/components/Inputs/PasswordInput/PasswordInput.js +0 -18
  102. package/dist/components/Inputs/PasswordInput/index.d.ts +0 -1
  103. package/dist/components/Inputs/PasswordInput/index.js +0 -4
  104. package/dist/components/Inputs/index.d.ts +0 -1
  105. package/dist/components/Inputs/index.js +0 -4
  106. package/dist/components/Inputs/types.d.ts +0 -3
  107. package/dist/components/Inputs/types.js +0 -1
  108. package/dist/components/Loader/Loader.d.ts +0 -7
  109. package/dist/components/Loader/Loader.js +0 -25
  110. package/dist/components/Loader/constants.d.ts +0 -5
  111. package/dist/components/Loader/constants.js +0 -8
  112. package/dist/components/Loader/index.d.ts +0 -1
  113. package/dist/components/Loader/index.js +0 -4
  114. package/dist/components/MainProvider/MantineProvider.d.ts +0 -2
  115. package/dist/components/MainProvider/MantineProvider.js +0 -15
  116. package/dist/components/MainProvider/index.d.ts +0 -1
  117. package/dist/components/MainProvider/index.js +0 -4
  118. package/dist/components/Modal/Modal.d.ts +0 -4
  119. package/dist/components/Modal/Modal.js +0 -15
  120. package/dist/components/Modal/index.d.ts +0 -1
  121. package/dist/components/Modal/index.js +0 -4
  122. package/dist/components/Switch/Switch.d.ts +0 -4
  123. package/dist/components/Switch/Switch.js +0 -18
  124. package/dist/components/Switch/index.d.ts +0 -1
  125. package/dist/components/Switch/index.js +0 -4
  126. package/dist/components/Text/Text.d.ts +0 -7
  127. package/dist/components/Text/Text.js +0 -15
  128. package/dist/components/Text/index.d.ts +0 -1
  129. package/dist/components/Text/index.js +0 -4
  130. package/dist/components/Text/types.d.ts +0 -5
  131. package/dist/components/Text/types.js +0 -1
  132. package/dist/components/theme.d.ts +0 -2
  133. package/dist/components/theme.js +0 -184
  134. package/dist/constants/font-variants.d.ts +0 -10
  135. package/dist/constants/font-variants.js +0 -26
  136. package/dist/constants/masks.d.ts +0 -4
  137. package/dist/constants/masks.js +0 -7
  138. package/dist/main.d.ts +0 -14
  139. package/dist/main.js +0 -31
  140. package/dist/typography.module-krUfTmwf.js +0 -14
  141. /package/{dist → src}/assets/card.svg +0 -0
@@ -1,184 +0,0 @@
1
- import { colorsTuple as e } from "@mantine/core";
2
- const r = {
3
- focusRing: "never",
4
- scale: 1,
5
- //default value
6
- fontSmoothing: !0,
7
- //default value
8
- // white: 'ffffff',
9
- black: "#14151a",
10
- colors: {
11
- primary: e("#14151a"),
12
- secondary: e("#ffffff"),
13
- tertiary: e("#0a0f290a"),
14
- //borders
15
- "border-action-normal": e("#dee0e3"),
16
- "border-action-destructive": e("#f7c3c0"),
17
- "border-base-alpha": e("#0a0f2914"),
18
- //buttons
19
- "background-button-tertiary": e("#0a0f290a"),
20
- "background-button-primary-disabled": e("#e9eaec"),
21
- //icons
22
- "icon-base-secondary": e("#0f132499"),
23
- "icon-base-tertiary": e("#0D112666"),
24
- "icon-status-success": e("#26BD6C"),
25
- // icon/base/secondary
26
- //text
27
- "text-base-secondary": e("#0f132499"),
28
- "text-base-tertiary": e("#0d112666"),
29
- "text-base-quaternary": e("#0a0f2940"),
30
- "text-status-destructive": e("#e6483d"),
31
- //toggle
32
- "background-toggle-active": e("#26bd6c"),
33
- "background-toggle-default": e("#babdc5"),
34
- //typography
35
- "typography-secondary": e("#91989e")
36
- },
37
- primaryShade: 6,
38
- // { light: 6, dark: 8 } default mantine by theme
39
- primaryColor: "primary",
40
- /* variantColorResolver: ({ color, variant, gradient, theme }) => {
41
- if (variant === 'primary') {
42
- return {
43
- background: 'var(--mantine-color-red-9)',
44
- hover: 'var(--mantine-color-red-8)',
45
- color: 'var(--mantine-color-white)',
46
- border: 'none',
47
- }
48
- }
49
-
50
- return {
51
- background: 'var(--mantine-color-red-9)',
52
- hover: 'var(--mantine-color-red-8)',
53
- color: 'var(--mantine-color-white)',
54
- border: 'none',
55
- }
56
- }, //color by variant */
57
- autoContrast: !1,
58
- //default value
59
- luminanceThreshold: 0.3,
60
- //default value
61
- fontFamily: "Inter, sans-serif",
62
- /* headings: {
63
- fontFamily: 'Inter',
64
- fontWeight: '600',
65
- textWrap: 'wrap', // 'nowrap', 'balance', 'pretty', 'stable',
66
- sizes: {
67
- h1: { fontSize: '24px', fontWeight: '600', lineHeight: '1.3' }, //{ fontSize: string; fontWeight?: string; lineHeight: string; }
68
- //..
69
- },
70
- }, */
71
- radius: {
72
- // same name from blank and mantine
73
- xl: "0.75rem",
74
- xs: "0.25rem",
75
- sm: "0.375rem",
76
- md: "0.5rem",
77
- lg: "0.625rem"
78
- },
79
- defaultRadius: "xl",
80
- spacing: {
81
- //blank variables
82
- h6: "-0.30000001192092896px",
83
- "body-m": "-0.20000000298023224px",
84
- "body-s": "-0.20000000298023224px",
85
- "body-l": "-0.20000000298023224px",
86
- "caption-l": "-0.10000000149011612px;",
87
- "caption-m": "0",
88
- //mantine default variables
89
- xs: "0.625rem",
90
- sm: "0.75rem",
91
- md: "1rem",
92
- lg: "1.25rem",
93
- xl: "2rem"
94
- },
95
- //for example
96
- fontSizes: {
97
- //blank variables
98
- h6: "24px",
99
- "body-m": "18px",
100
- "body-l": "20px",
101
- "body-s": "16px",
102
- "caption-l": "14px",
103
- "caption-m": "12px",
104
- // mantine default variables
105
- xs: "0.75rem",
106
- sm: "0.875rem",
107
- md: "1rem",
108
- lg: "1.125rem",
109
- xl: "1.25rem"
110
- },
111
- //for example
112
- lineHeights: {
113
- //blank variables
114
- h6: "32px",
115
- "body-m": "26px",
116
- "body-s": "24px",
117
- "body-l": "28px",
118
- "caption-l": "20px",
119
- "caption-m": "16px",
120
- // mantine default variables
121
- xs: "1.4",
122
- sm: "1.45",
123
- md: "1.55",
124
- lg: "1.6",
125
- xl: "1.65"
126
- },
127
- // mantine default variables
128
- breakpoints: { xs: "36em", sm: "48em", md: "62em", lg: "75em", xl: "88em" },
129
- shadows: {
130
- //same name for mantine and
131
- xs: "0px 1px 2px 0px #14151A0D",
132
- // sm: '1px 1px 3px rgba(0, 0, 0, .25)',
133
- // md: '1px 1px 3px rgba(0, 0, 0, .25)',
134
- lg: "0px 3px 6px -2px #14151a0d, 0px 10px 16px -3px #14151a14"
135
- // xl: '1px 1px 3px rgba(0, 0, 0, .25)',
136
- },
137
- //for example
138
- respectReducedMotion: !1,
139
- //default
140
- cursorType: "default",
141
- defaultGradient: { from: "black", to: "yellow", deg: 25 },
142
- //for example
143
- // activeClassName: 'class-name', //for example
144
- // focusClassName: 'class-name', //for example
145
- /* components: {
146
- Title: Title.extend({
147
- classNames: { root: 'classnames' },
148
- styles: {},
149
- vars: { order: 5 },
150
- defaultProps: {},
151
- }), //for example
152
- }, */
153
- other: {
154
- // any additional vars
155
- /* usage:
156
- import { createStyles } from '@mantine/core';
157
-
158
- const useStyles = createStyles((theme) => ({
159
- customBox: {
160
- padding: theme.other.customSpacing,
161
- backgroundColor: theme.other.brandColor,
162
- },
163
- }));
164
-
165
- function MyComponent() {
166
- const { classes } = useStyles();
167
-
168
- return <div className={classes.customBox}>Hello Mantine</div>;
169
- }
170
-
171
- // theme-override.d.ts
172
- import '@mantine/core';
173
-
174
- declare module '@mantine/core' {
175
- export interface MantineThemeOther {
176
- customSpacing: string;
177
- brandColor: string;
178
- }
179
- }*/
180
- }
181
- };
182
- export {
183
- r as theme
184
- };
@@ -1,10 +0,0 @@
1
- export declare const H6_BOLD_FONT_VARIANT: "h6-bold";
2
- export declare const BODY_M_MEDIUM_FONT_VARIANT: "body-m-medium";
3
- export declare const BODY_M_BOLD_FONT_VARIANT: "body-m-bold";
4
- export declare const BODY_L_BOLD_FONT_VARIANT: "body-l-bold";
5
- export declare const BODY_S_MEDIUM_FONT_VARIANT: "body-s-medium";
6
- export declare const BODY_S_REGULAR_FONT_VARIANT: "body-s-regular";
7
- export declare const CAPTION_L_MEDIUM_FONT_VARIANT: "caption-l-medium";
8
- export declare const CAPTION_L_REGULAR_FONT_VARIANT: "caption-l-regular";
9
- export declare const CAPTION_M_REGULAR_FONT_VARIANT: "caption-m-regular";
10
- export declare const FontVariants: ("h6-bold" | "body-m-medium" | "body-m-bold" | "body-l-bold" | "body-s-medium" | "body-s-regular" | "caption-l-medium" | "caption-l-regular" | "caption-m-regular")[];
@@ -1,26 +0,0 @@
1
- const _ = "h6-bold", A = "body-m-medium", o = "body-m-bold", N = "body-l-bold", T = "body-s-medium", O = "body-s-regular", t = "caption-l-medium", n = "caption-l-regular", I = "caption-m-regular", R = [
2
- //heading
3
- _,
4
- //body
5
- N,
6
- A,
7
- o,
8
- T,
9
- O,
10
- //caption
11
- t,
12
- n,
13
- I
14
- ];
15
- export {
16
- N as BODY_L_BOLD_FONT_VARIANT,
17
- o as BODY_M_BOLD_FONT_VARIANT,
18
- A as BODY_M_MEDIUM_FONT_VARIANT,
19
- T as BODY_S_MEDIUM_FONT_VARIANT,
20
- O as BODY_S_REGULAR_FONT_VARIANT,
21
- t as CAPTION_L_MEDIUM_FONT_VARIANT,
22
- n as CAPTION_L_REGULAR_FONT_VARIANT,
23
- I as CAPTION_M_REGULAR_FONT_VARIANT,
24
- R as FontVariants,
25
- _ as H6_BOLD_FONT_VARIANT
26
- };
@@ -1,4 +0,0 @@
1
- export declare const CARD_NUMBER_MASK: "0000 0000 0000 0000 000";
2
- export declare const CARD_CVV_MASK: "000";
3
- export declare const CARD_EXPIRY_DATE_MASK: "00/00";
4
- export declare const PHONE_MASK: "+7 000 000 00 00";
@@ -1,7 +0,0 @@
1
- const A = "0000 0000 0000 0000 000", _ = "000", o = "00/00", t = "+7 000 000 00 00";
2
- export {
3
- _ as CARD_CVV_MASK,
4
- o as CARD_EXPIRY_DATE_MASK,
5
- A as CARD_NUMBER_MASK,
6
- t as PHONE_MASK
7
- };
package/dist/main.d.ts DELETED
@@ -1,14 +0,0 @@
1
- export { ColorSchemeScript, mantineHtmlProps } from '@mantine/core';
2
- export { MantineProvider } from './components/MainProvider';
3
- export { theme } from './components/theme';
4
- export { Button } from './components/Button';
5
- export { Input } from './components/Inputs';
6
- export { CardInput } from './components/Inputs/CardInput';
7
- export { MaskedInput } from './components/Inputs/MaskedInput';
8
- export { PasswordInput } from './components/Inputs/PasswordInput';
9
- export { CvvInput } from './components/Inputs/CvvInput';
10
- export { CardInputTest } from './components/Inputs/CardInputTest';
11
- export { Loader } from './components/Loader';
12
- export { Modal } from './components/Modal';
13
- export { Switch } from './components/Switch';
14
- export { Text } from './components/Text';
package/dist/main.js DELETED
@@ -1,31 +0,0 @@
1
- import { ColorSchemeScript as t, mantineHtmlProps as e } from "@mantine/core";
2
- import { MantineProvider as m } from "./components/MainProvider/MantineProvider.js";
3
- import { theme as f } from "./components/theme.js";
4
- import { Button as a } from "./components/Button/Button.js";
5
- import { Input as u } from "./components/Inputs/Input.js";
6
- import { CardInput as i } from "./components/Inputs/CardInput/CardInput.js";
7
- import { MaskedInput as C } from "./components/Inputs/MaskedInput/MaskedInput.js";
8
- import { PasswordInput as h } from "./components/Inputs/PasswordInput/PasswordInput.js";
9
- import { CvvInput as v } from "./components/Inputs/CvvInput/CvvInput.js";
10
- import { CardInputTest as P } from "./components/Inputs/CardInputTest.js";
11
- import { Loader as w } from "./components/Loader/Loader.js";
12
- import { Modal as k } from "./components/Modal/Modal.js";
13
- import { Switch as H } from "./components/Switch/Switch.js";
14
- import { Text as b } from "./components/Text/Text.js";
15
- export {
16
- a as Button,
17
- i as CardInput,
18
- P as CardInputTest,
19
- t as ColorSchemeScript,
20
- v as CvvInput,
21
- u as Input,
22
- w as Loader,
23
- m as MantineProvider,
24
- C as MaskedInput,
25
- k as Modal,
26
- h as PasswordInput,
27
- H as Switch,
28
- b as Text,
29
- e as mantineHtmlProps,
30
- f as theme
31
- };
@@ -1,14 +0,0 @@
1
- import './assets/typography.css';const l = {
2
- "h6-bold": "_h6-bold_k821l_2",
3
- "body-l-bold": "_body-l-bold_k821l_11",
4
- "body-m-bold": "_body-m-bold_k821l_19",
5
- "body-m-medium": "_body-m-medium_k821l_27",
6
- "body-s-medium": "_body-s-medium_k821l_36",
7
- "body-s-regular": "_body-s-regular_k821l_44",
8
- "caption-l-medium": "_caption-l-medium_k821l_53",
9
- "caption-l-regular": "_caption-l-regular_k821l_61",
10
- "caption-m-regular": "_caption-m-regular_k821l_70"
11
- };
12
- export {
13
- l as c
14
- };
File without changes