@kvell-group/ui 1.18.2 → 1.18.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/mantine/index.ts +1 -0
- package/package.json +2 -1
- package/src/assets/error.svg +2 -2
- package/src/components/ActionIcon/ActionIcon.module.css +110 -0
- package/src/components/ActionIcon/ActionIcon.tsx +25 -0
- package/src/components/ActionIcon/constants.ts +13 -0
- package/src/components/ActionIcon/index.ts +1 -0
- package/src/components/ActionIcon/types.ts +8 -0
- package/src/components/Button/Button.module.css +61 -4
- package/src/components/Button/Button.tsx +1 -1
- package/src/components/Button/constants.ts +2 -0
- package/src/components/Button/index.ts +1 -1
- package/src/components/Card/Card.module.css +16 -0
- package/src/components/Card/Card.ts +5 -0
- package/src/components/Card/index.ts +1 -0
- package/src/components/Inputs/Checkbox/Checkbox.module.css +1 -1
- package/src/components/Inputs/CvvInput/CvvInput.module.css +2 -4
- package/src/components/Inputs/Input/Input.module.css +53 -17
- package/src/components/Inputs/Input/Input.tsx +3 -14
- package/src/components/Inputs/PasswordInput/PasswordInput.tsx +2 -15
- package/src/components/Inputs/Select/Select.ts +9 -0
- package/src/components/Inputs/Select/index.ts +1 -0
- package/src/components/Inputs/Switch/Switch.module.css +1 -1
- package/src/components/Inputs/Textarea/Textarea.ts +9 -0
- package/src/components/Inputs/Textarea/index.ts +1 -0
- package/src/components/KvellUiProvider/KvellUiProvider.module.css +31 -0
- package/src/components/Modal/Modal.module.css +1 -1
- package/src/constants/font-variants.ts +4 -0
- package/src/index.ts +5 -1
- package/src/styles/typography.module.css +24 -0
- package/src/theme/index.ts +1 -7
package/mantine/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@kvell-group/ui",
|
|
3
3
|
"author": "Kvell Group",
|
|
4
4
|
"private": false,
|
|
5
|
-
"version": "1.18.
|
|
5
|
+
"version": "1.18.4",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "src/index.ts",
|
|
8
8
|
"types": "src/index.ts",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@mantine/carousel": "^8.1.3",
|
|
24
24
|
"@mantine/core": "^8.1.3",
|
|
25
|
+
"@mantine/form": "^8.1.3",
|
|
25
26
|
"@mantine/hooks": "^8.1.3"
|
|
26
27
|
},
|
|
27
28
|
"peerDependencies": {
|
package/src/assets/error.svg
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
<path d="M8.
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M8.00004 14.6667C4.31804 14.6667 1.33337 11.682 1.33337 8.00004C1.33337 4.31804 4.31804 1.33337 8.00004 1.33337C11.682 1.33337 14.6667 4.31804 14.6667 8.00004C14.6667 11.682 11.682 14.6667 8.00004 14.6667ZM8.00004 13.3334C9.41453 13.3334 10.7711 12.7715 11.7713 11.7713C12.7715 10.7711 13.3334 9.41453 13.3334 8.00004C13.3334 6.58555 12.7715 5.229 11.7713 4.2288C10.7711 3.22861 9.41453 2.66671 8.00004 2.66671C6.58555 2.66671 5.229 3.22861 4.2288 4.2288C3.22861 5.229 2.66671 6.58555 2.66671 8.00004C2.66671 9.41453 3.22861 10.7711 4.2288 11.7713C5.229 12.7715 6.58555 13.3334 8.00004 13.3334ZM7.33337 4.66671H8.66671V6.00004H7.33337V4.66671ZM7.33337 7.33337H8.66671V11.3334H7.33337V7.33337Z" fill="currentColor"/>
|
|
3
3
|
</svg>
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
--ai-size-xs: rem(24px);
|
|
3
|
+
--ai-size-sm: rem(32px);
|
|
4
|
+
--ai-size-md: rem(40px);
|
|
5
|
+
--ai-size-lg: rem(48px);
|
|
6
|
+
|
|
7
|
+
--ai-radius-xs: var(--mantine-radius-md);
|
|
8
|
+
--ai-radius-sm: var(--mantine-radius-sm);
|
|
9
|
+
--ai-radius-md: var(--mantine-radius-md);
|
|
10
|
+
--ai-radius-lg: var(--mantine-radius-lg);
|
|
11
|
+
|
|
12
|
+
background-color: var(--ai-bg);
|
|
13
|
+
color: var(--ai-color);
|
|
14
|
+
|
|
15
|
+
&[data-size='xs'] {
|
|
16
|
+
--ai-radius: var(--ai-radius-xs);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&[data-size='sm'] {
|
|
20
|
+
--ai-radius: var(--ai-radius-lg);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&[data-size='md'] {
|
|
24
|
+
--ai-radius: var(--ai-radius-xl);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&[data-size='lg'] {
|
|
28
|
+
--ai-radius: var(--ai-radius-xl);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&[data-variant='primary'] {
|
|
32
|
+
--ai-bg: var(--color-background-button-primary);
|
|
33
|
+
--ai-color: var(--color-icon-base-inverted);
|
|
34
|
+
|
|
35
|
+
box-shadow: var(--mantine-shadow-xs);
|
|
36
|
+
|
|
37
|
+
&:focus-visible {
|
|
38
|
+
border: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:hover {
|
|
42
|
+
--ai-bg: var(--color-background-button-primary-hover);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&:disabled,
|
|
46
|
+
&[data-disabled] {
|
|
47
|
+
--ai-bg: var(--color-background-button-primary-disabled);
|
|
48
|
+
--ai-color: var(--color-icon-base-quaternary);
|
|
49
|
+
|
|
50
|
+
box-shadow: none;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&[data-variant='secondary'] {
|
|
55
|
+
--ai-bg: var(--color-background-button-secondary);
|
|
56
|
+
--ai-color: var(--color-icon-base-secondary);
|
|
57
|
+
|
|
58
|
+
border: rem(1px) solid var(--color-border-action-normal);
|
|
59
|
+
box-shadow: var(--mantine-shadow-xs);
|
|
60
|
+
|
|
61
|
+
&:hover {
|
|
62
|
+
--ai-bg: var(--color-background-button-secondary-hover);
|
|
63
|
+
border-color: var(--color-border-action-hover);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&:disabled,
|
|
67
|
+
&[data-disabled] {
|
|
68
|
+
--ai-bg: var(--color-background-button-secondary-disabled);
|
|
69
|
+
--ai-color: var(--color-icon-base-quaternary);
|
|
70
|
+
|
|
71
|
+
border-color: var(--color-border-action-disabled);
|
|
72
|
+
box-shadow: none;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&[data-variant='tertiary'] {
|
|
77
|
+
--ai-bg: var(--color-background-button-tertiary);
|
|
78
|
+
--ai-color: var(--color-icon-base-secondary);
|
|
79
|
+
|
|
80
|
+
&:hover {
|
|
81
|
+
--ai-bg: var(--color-background-button-tertiary-hover);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&:disabled,
|
|
85
|
+
&[data-disabled] {
|
|
86
|
+
--ai-bg: var(--color-background-button-tertiary);
|
|
87
|
+
--ai-color: var(--color-icon-base-quaternary);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&[data-variant='ghost'] {
|
|
92
|
+
--ai-bg: transparent;
|
|
93
|
+
--ai-color: var(--color-icon-base-secondary);
|
|
94
|
+
|
|
95
|
+
&:hover {
|
|
96
|
+
--ai-bg: var(--color-background-button-ghost-hover);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&:disabled,
|
|
100
|
+
&[data-disabled] {
|
|
101
|
+
--ai-bg: transparent;
|
|
102
|
+
--ai-color: var(--color-icon-base-quaternary);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&:focus-visible {
|
|
107
|
+
border: rem(1px) solid var(--color-border-action-focus-light);
|
|
108
|
+
box-shadow: var(--shadow-focus-ring-light);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { createPolymorphicComponent, ActionIcon as MantineActionIcon } from '@mantine/core'
|
|
2
|
+
import type { ActionIconProps as BaseActionIconProps } from '@mantine/core'
|
|
3
|
+
import '@mantine/core/styles/UnstyledButton.layer.css'
|
|
4
|
+
import '@mantine/core/styles/Button.layer.css'
|
|
5
|
+
import classNames from './ActionIcon.module.css'
|
|
6
|
+
import { forwardRef } from 'react'
|
|
7
|
+
import type { ExtendedActionIconVariant } from './types'
|
|
8
|
+
|
|
9
|
+
// ----------------------------------------------------------------------
|
|
10
|
+
|
|
11
|
+
export type ActionIconProps = BaseActionIconProps & { variant?: ExtendedActionIconVariant }
|
|
12
|
+
|
|
13
|
+
export const ActionIcon = createPolymorphicComponent<'button', ActionIconProps>(
|
|
14
|
+
forwardRef<HTMLButtonElement, ActionIconProps>((props, ref) => {
|
|
15
|
+
const { size = 'md', ...resProps } = props
|
|
16
|
+
return (
|
|
17
|
+
<MantineActionIcon
|
|
18
|
+
ref={ref}
|
|
19
|
+
size={size}
|
|
20
|
+
{...resProps}
|
|
21
|
+
classNames={classNames}
|
|
22
|
+
/>
|
|
23
|
+
)
|
|
24
|
+
})
|
|
25
|
+
)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ActionIcon'
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ACTION_ICON_VARIANT } from './constants'
|
|
2
|
+
import type { ActionIconVariant } from '@mantine/core'
|
|
3
|
+
|
|
4
|
+
// ----------------------------------------------------------------------
|
|
5
|
+
|
|
6
|
+
type ActionIconVariantsTypes = (typeof ACTION_ICON_VARIANT)[keyof typeof ACTION_ICON_VARIANT]
|
|
7
|
+
|
|
8
|
+
export type ExtendedActionIconVariant = ActionIconVariant | ActionIconVariantsTypes
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
.root {
|
|
2
|
-
box-shadow: var(--mantine-shadow-xs);
|
|
3
2
|
--button-height-sm: 2rem;
|
|
4
3
|
--button-height-md: 2.5rem;
|
|
5
4
|
--button-height-lg: 3rem;
|
|
@@ -17,12 +16,38 @@
|
|
|
17
16
|
&[data-variant='primary'] {
|
|
18
17
|
background-color: var(--mantine-color-primary-0);
|
|
19
18
|
color: var(--mantine-color-white);
|
|
19
|
+
box-shadow: var(--mantine-shadow-xs);
|
|
20
|
+
|
|
21
|
+
&:focus-visible {
|
|
22
|
+
border: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&:hover {
|
|
26
|
+
background-color: var(--color-background-button-primary-hover);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&:disabled,
|
|
30
|
+
&[data-disabled] {
|
|
31
|
+
background-color: var(--color-background-button-primary-disabled);
|
|
32
|
+
}
|
|
20
33
|
}
|
|
21
34
|
|
|
22
35
|
&[data-variant='secondary'] {
|
|
23
36
|
background-color: var(--mantine-color-secondary-0);
|
|
24
37
|
color: var(--mantine-color-primary);
|
|
25
38
|
border: 1px solid var(--mantine-color-border-action-normal-0);
|
|
39
|
+
box-shadow: var(--mantine-shadow-xs);
|
|
40
|
+
|
|
41
|
+
&:hover {
|
|
42
|
+
background-color: var(--color-background-button-secondary-hover);
|
|
43
|
+
border: 1px solid var(--color-border-action-hover);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&:disabled,
|
|
47
|
+
&[data-disabled] {
|
|
48
|
+
background-color: var(--color-background-button-secondary-disabled);
|
|
49
|
+
border: 1px solid var(--color-border-action-disabled);
|
|
50
|
+
}
|
|
26
51
|
|
|
27
52
|
.loader {
|
|
28
53
|
--button-color: var(--mantine-color-gray-5);
|
|
@@ -30,9 +55,37 @@
|
|
|
30
55
|
}
|
|
31
56
|
|
|
32
57
|
&[data-variant='tertiary'] {
|
|
33
|
-
background-color: var(--
|
|
58
|
+
background-color: var(--color-background-button-tertiary);
|
|
34
59
|
color: var(--mantine-color-primary);
|
|
35
60
|
|
|
61
|
+
&:hover {
|
|
62
|
+
background-color: var(--color-background-button-tertiary-hover);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&:disabled,
|
|
66
|
+
&[data-disabled] {
|
|
67
|
+
background-color: var(--color-background-button-tertiary);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.loader {
|
|
71
|
+
--button-color: var(--mantine-color-gray-5);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&[data-variant='ghost'] {
|
|
76
|
+
background-color: transparent;
|
|
77
|
+
color: var(--mantine-color-text-base-secondary-0);
|
|
78
|
+
box-shadow: none;
|
|
79
|
+
|
|
80
|
+
&:hover {
|
|
81
|
+
background-color: var(--color-background-button-ghost-hover);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&:disabled,
|
|
85
|
+
&[data-disabled] {
|
|
86
|
+
background-color: transparent;
|
|
87
|
+
}
|
|
88
|
+
|
|
36
89
|
.loader {
|
|
37
90
|
--button-color: var(--mantine-color-gray-5);
|
|
38
91
|
}
|
|
@@ -40,8 +93,12 @@
|
|
|
40
93
|
|
|
41
94
|
&:disabled,
|
|
42
95
|
&[data-disabled] {
|
|
43
|
-
|
|
44
|
-
|
|
96
|
+
color: var(--color-text-base-quaternary);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&:focus-visible {
|
|
100
|
+
border: rem(1px) solid var(--color-border-action-focus-light);
|
|
101
|
+
box-shadow: var(--shadow-focus-ring-light);
|
|
45
102
|
}
|
|
46
103
|
}
|
|
47
104
|
|
|
@@ -8,7 +8,7 @@ import type { ExtendedButtonVariant } from './types'
|
|
|
8
8
|
|
|
9
9
|
// ----------------------------------------------------------------------
|
|
10
10
|
|
|
11
|
-
type ButtonProps = BaseButtonProps & { variant?: ExtendedButtonVariant }
|
|
11
|
+
export type ButtonProps = BaseButtonProps & { variant?: ExtendedButtonVariant }
|
|
12
12
|
|
|
13
13
|
export const Button = createPolymorphicComponent<'button', ButtonProps>(
|
|
14
14
|
forwardRef<HTMLButtonElement, ButtonProps>((props, ref) => {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
export const PRIMARY_BUTTON_VARIANT = 'primary' as const
|
|
2
2
|
export const SECONDARY_BUTTON_VARIANT = 'secondary' as const
|
|
3
3
|
export const TERTIARY_BUTTON_VARIANT = 'tertiary' as const
|
|
4
|
+
export const GHOST_BUTTON_VARIANT = 'ghost' as const
|
|
4
5
|
|
|
5
6
|
export const ButtonVariants = [
|
|
6
7
|
PRIMARY_BUTTON_VARIANT,
|
|
7
8
|
SECONDARY_BUTTON_VARIANT,
|
|
8
9
|
TERTIARY_BUTTON_VARIANT,
|
|
10
|
+
GHOST_BUTTON_VARIANT,
|
|
9
11
|
]
|
|
10
12
|
|
|
11
13
|
// ----------------------------------------------------------------------
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './Button'
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.root:where([data-with-border]) {
|
|
2
|
+
position: relative;
|
|
3
|
+
border: none;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.root:where([data-with-border])::after {
|
|
7
|
+
content: '';
|
|
8
|
+
position: absolute;
|
|
9
|
+
top: 0;
|
|
10
|
+
left: 0;
|
|
11
|
+
width: 100%;
|
|
12
|
+
height: 100%;
|
|
13
|
+
pointer-events: none;
|
|
14
|
+
border: calc(0.0625rem * var(--mantine-scale)) solid #0a0f2914;
|
|
15
|
+
border-radius: inherit;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Card } from './Card'
|
|
@@ -1,39 +1,75 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-flow: column;
|
|
4
|
+
gap: rem(8px);
|
|
5
|
+
}
|
|
6
|
+
|
|
1
7
|
.input {
|
|
8
|
+
--input-height: 2.5rem;
|
|
9
|
+
|
|
2
10
|
border-radius: var(--mantine-radius-xl);
|
|
3
11
|
border: 1px solid var(--mantine-color-border-action-normal-0);
|
|
4
12
|
box-shadow: var(--mantine-shadow-xs);
|
|
5
13
|
color: var(--mantine-color-text-base-primary-0);
|
|
6
14
|
|
|
7
|
-
|
|
15
|
+
[data-position='left'] ~ & {
|
|
16
|
+
--input-padding-inline-start: 2.5rem;
|
|
17
|
+
}
|
|
8
18
|
|
|
9
|
-
|
|
10
|
-
border:
|
|
11
|
-
margin-bottom: -0.125px;
|
|
12
|
-
color: var(--mantine-color-text-status-destructive-0);
|
|
19
|
+
&:hover {
|
|
20
|
+
border-color: var(--color-border-action-hover);
|
|
13
21
|
}
|
|
14
22
|
|
|
15
|
-
|
|
16
|
-
--
|
|
23
|
+
&:focus-within {
|
|
24
|
+
border-color: var(--mantine-color-text-base-primary-0);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&[data-error] {
|
|
28
|
+
border: 1px solid var(--color-border-action-destructive);
|
|
29
|
+
color: var(--color-text-status-destructive);
|
|
30
|
+
|
|
31
|
+
&:hover {
|
|
32
|
+
border-color: var(--color-border-action-destructive-hover);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&:focus-within {
|
|
36
|
+
border-color: var(--color-border-action-focus-destructive-light);
|
|
37
|
+
}
|
|
17
38
|
}
|
|
18
39
|
}
|
|
19
40
|
|
|
41
|
+
.wrapper {
|
|
42
|
+
margin-bottom: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
20
45
|
.section {
|
|
21
46
|
--right-section-end: 0.75rem;
|
|
22
47
|
--left-section-start: 0.25rem;
|
|
23
48
|
}
|
|
24
49
|
|
|
25
|
-
.
|
|
26
|
-
margin-bottom: 0.2rem;
|
|
27
|
-
}
|
|
28
|
-
|
|
50
|
+
.description,
|
|
29
51
|
.error {
|
|
30
|
-
|
|
31
|
-
|
|
52
|
+
padding-block: rem(2px);
|
|
53
|
+
font-size: var(--mantine-font-size-caption-l);
|
|
54
|
+
line-height: var(--mantine-line-height-caption-l);
|
|
55
|
+
letter-spacing: var(--mantine-spacing-caption-l);
|
|
32
56
|
|
|
33
57
|
&::before {
|
|
34
|
-
content:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
58
|
+
content: '';
|
|
59
|
+
display: inline-block;
|
|
60
|
+
width: rem(16px);
|
|
61
|
+
height: rem(16px);
|
|
62
|
+
background: currentColor;
|
|
63
|
+
mask: url('../../../assets/error.svg');
|
|
64
|
+
margin-right: rem(4px);
|
|
65
|
+
vertical-align: sub;
|
|
38
66
|
}
|
|
39
67
|
}
|
|
68
|
+
|
|
69
|
+
.description {
|
|
70
|
+
color: var(--color-text-base-tertiary);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.error {
|
|
74
|
+
color: var(--color-text-status-destructive);
|
|
75
|
+
}
|
|
@@ -1,21 +1,10 @@
|
|
|
1
|
-
import '@mantine/core/styles/Input.layer.css'
|
|
2
1
|
import { TextInput } from '@mantine/core'
|
|
2
|
+
import '@mantine/core/styles/Input.layer.css'
|
|
3
3
|
import classNames from './Input.module.css'
|
|
4
|
-
import textClassNames from '../../../styles/typography.module.css'
|
|
5
|
-
import clsx from 'clsx'
|
|
6
|
-
import { CAPTION_L_REGULAR_FONT_VARIANT } from '../../../constants/font-variants'
|
|
7
|
-
|
|
8
|
-
// ----------------------------------------------------------------------
|
|
9
|
-
|
|
10
|
-
const { input, error, ...restClassNames } = classNames
|
|
11
|
-
|
|
12
|
-
const captionLRegular = textClassNames[CAPTION_L_REGULAR_FONT_VARIANT]
|
|
13
|
-
|
|
14
|
-
const inputClassNames = clsx(input, captionLRegular)
|
|
15
|
-
const errorClassNames = clsx(error, captionLRegular)
|
|
16
4
|
|
|
17
5
|
// ----------------------------------------------------------------------
|
|
18
6
|
|
|
19
7
|
export const Input = TextInput.withProps({
|
|
20
|
-
classNames
|
|
8
|
+
classNames,
|
|
9
|
+
inputWrapperOrder: ['label', 'input', 'error', 'description'],
|
|
21
10
|
})
|
|
@@ -1,27 +1,14 @@
|
|
|
1
1
|
import { PasswordInput as PasswordInputBase } from '@mantine/core'
|
|
2
2
|
import classNames from '../Input/Input.module.css'
|
|
3
3
|
import sectionClassNames from './PasswordInput.module.css'
|
|
4
|
-
import textClassNames from '../../../styles/typography.module.css'
|
|
5
|
-
import clsx from 'clsx'
|
|
6
|
-
import { CAPTION_L_REGULAR_FONT_VARIANT } from '../../../constants/font-variants'
|
|
7
|
-
|
|
8
|
-
// ----------------------------------------------------------------------
|
|
9
|
-
|
|
10
|
-
const { input, error, ...restClassNames } = classNames
|
|
11
|
-
|
|
12
|
-
const captionLRegular = textClassNames[CAPTION_L_REGULAR_FONT_VARIANT]
|
|
13
|
-
|
|
14
|
-
const inputClassNames = clsx(input, captionLRegular)
|
|
15
|
-
const errorClassNames = clsx(error, captionLRegular)
|
|
16
4
|
|
|
17
5
|
// ----------------------------------------------------------------------
|
|
18
6
|
|
|
19
7
|
export const PasswordInput = PasswordInputBase.withProps({
|
|
20
8
|
classNames: {
|
|
21
|
-
...
|
|
22
|
-
input: inputClassNames,
|
|
23
|
-
error: errorClassNames,
|
|
9
|
+
...classNames,
|
|
24
10
|
section: sectionClassNames.section,
|
|
25
11
|
},
|
|
26
12
|
autoComplete: 'current-password',
|
|
13
|
+
inputWrapperOrder: ['label', 'input', 'error', 'description'],
|
|
27
14
|
})
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Select as MantineSelect } from '@mantine/core'
|
|
2
|
+
import classNames from '../Input/Input.module.css'
|
|
3
|
+
|
|
4
|
+
// ----------------------------------------------------------------------
|
|
5
|
+
|
|
6
|
+
export const Select = MantineSelect.withProps({
|
|
7
|
+
classNames,
|
|
8
|
+
inputWrapperOrder: ['label', 'input', 'error', 'description'],
|
|
9
|
+
})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Select } from './Select'
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Textarea as MantineTextarea } from '@mantine/core'
|
|
2
|
+
import classNames from '../Input/Input.module.css'
|
|
3
|
+
|
|
4
|
+
// ----------------------------------------------------------------------
|
|
5
|
+
|
|
6
|
+
export const Textarea = MantineTextarea.withProps({
|
|
7
|
+
classNames,
|
|
8
|
+
inputWrapperOrder: ['label', 'input', 'error', 'description'],
|
|
9
|
+
})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Textarea } from './Textarea'
|
|
@@ -42,3 +42,34 @@
|
|
|
42
42
|
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
|
|
43
43
|
U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
44
44
|
}
|
|
45
|
+
|
|
46
|
+
:root {
|
|
47
|
+
--color-background-accent-gray-accent: #717684;
|
|
48
|
+
--color-background-accent-gray-subtle: #e9eaec;
|
|
49
|
+
--color-background-accent-green-accent: #26bd6c;
|
|
50
|
+
--color-background-button-primary: #14151a;
|
|
51
|
+
--color-background-button-primary-hover: #1f2228;
|
|
52
|
+
--color-background-button-primary-disabled: #e9eaec;
|
|
53
|
+
--color-background-button-secondary: #ffffff;
|
|
54
|
+
--color-background-button-secondary-hover: #f7f7f8;
|
|
55
|
+
--color-background-button-secondary-disabled: #fff;
|
|
56
|
+
--color-background-button-tertiary: #0a0f290a;
|
|
57
|
+
--color-background-button-tertiary-hover: #0a0f2914;
|
|
58
|
+
--color-background-button-ghost-hover: #0a0f290a;
|
|
59
|
+
--color-border-action-normal: #dee0e3;
|
|
60
|
+
--color-border-action-hover: #c8cad0;
|
|
61
|
+
--color-border-action-disabled: #e9eaec;
|
|
62
|
+
--color-border-action-focus-light: #b78af0;
|
|
63
|
+
--color-border-action-destructive: #f7c3c0;
|
|
64
|
+
--color-border-action-destructive-hover: #f5b2ad;
|
|
65
|
+
--color-border-action-focus-destructive-light: #f08b85;
|
|
66
|
+
--color-text-accent-blue-accent: #4778f5;
|
|
67
|
+
--color-text-base-tertiary: #0d112666;
|
|
68
|
+
--color-text-base-quaternary: #0a0f2940;
|
|
69
|
+
--color-text-status-destructive: #e6483d;
|
|
70
|
+
--color-icon-base-secondary: #0f132499;
|
|
71
|
+
--color-icon-base-tertiary: #0d112666;
|
|
72
|
+
--color-icon-base-quaternary: #0a0f2940;
|
|
73
|
+
--color-icon-base-inverted: #ffffff;
|
|
74
|
+
--shadow-focus-ring-light: 0px 0px 0px 2px #c8b2ff80;
|
|
75
|
+
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
//heading
|
|
2
2
|
export const H5_MEDIUM_FONT_VARIANT = 'h5-medium' as const
|
|
3
|
+
export const H5_SEMIBOLD_FONT_VARIANT = 'h5-semibold' as const
|
|
3
4
|
export const H6_BOLD_FONT_VARIANT = 'h6-bold' as const
|
|
4
5
|
|
|
5
6
|
//body
|
|
7
|
+
export const BODY_M_REGULAR_FONT_VARIANT = 'body-m-regular' as const
|
|
6
8
|
export const BODY_M_MEDIUM_FONT_VARIANT = 'body-m-medium' as const
|
|
7
9
|
export const BODY_M_BOLD_FONT_VARIANT = 'body-m-bold' as const
|
|
8
10
|
export const BODY_L_BOLD_FONT_VARIANT = 'body-l-bold' as const
|
|
@@ -20,9 +22,11 @@ export const CAPTION_M_REGULAR_FONT_VARIANT = 'caption-m-regular' as const
|
|
|
20
22
|
export const FontVariants = [
|
|
21
23
|
//heading
|
|
22
24
|
H5_MEDIUM_FONT_VARIANT,
|
|
25
|
+
H5_SEMIBOLD_FONT_VARIANT,
|
|
23
26
|
H6_BOLD_FONT_VARIANT,
|
|
24
27
|
//body
|
|
25
28
|
BODY_L_BOLD_FONT_VARIANT,
|
|
29
|
+
BODY_M_REGULAR_FONT_VARIANT,
|
|
26
30
|
BODY_M_MEDIUM_FONT_VARIANT,
|
|
27
31
|
BODY_M_BOLD_FONT_VARIANT,
|
|
28
32
|
BODY_S_MEDIUM_FONT_VARIANT,
|
package/src/index.ts
CHANGED
|
@@ -9,18 +9,22 @@ export { PasswordInput } from './components/Inputs/PasswordInput'
|
|
|
9
9
|
export { CvvInput } from './components/Inputs/CvvInput'
|
|
10
10
|
export { Checkbox } from './components/Inputs/Checkbox'
|
|
11
11
|
export { Switch } from './components/Inputs/Switch'
|
|
12
|
+
export { Select } from './components/Inputs/Select'
|
|
13
|
+
export { Textarea } from './components/Inputs/Textarea'
|
|
12
14
|
|
|
13
15
|
//providers
|
|
14
16
|
export { KvellUiProvider } from './components/KvellUiProvider'
|
|
15
17
|
|
|
16
18
|
//components
|
|
17
|
-
export
|
|
19
|
+
export * from './components/Button'
|
|
18
20
|
export { CardLogoByPan } from './components/CardLogoByPan'
|
|
19
21
|
export { Loader } from './components/Loader'
|
|
20
22
|
export { Modal } from './components/Modal'
|
|
21
23
|
export { Text } from './components/Text'
|
|
22
24
|
export { Badge } from './components/Badge'
|
|
23
25
|
export { Carousel } from './components/Carousel'
|
|
26
|
+
export { Card } from './components/Card'
|
|
27
|
+
export * from './components/ActionIcon'
|
|
24
28
|
|
|
25
29
|
// core-components ------------------------------------------------------
|
|
26
30
|
|
|
@@ -6,6 +6,14 @@
|
|
|
6
6
|
letter-spacing: var(--mantine-spacing-h5);
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
.h5-semibold {
|
|
10
|
+
font-family: var(--mantine-font-family);
|
|
11
|
+
font-weight: 600;
|
|
12
|
+
font-size: var(--mantine-font-size-h5);
|
|
13
|
+
line-height: var(--mantine-line-height-h5);
|
|
14
|
+
letter-spacing: var(--mantine-spacing-h5);
|
|
15
|
+
}
|
|
16
|
+
|
|
9
17
|
/* heading */
|
|
10
18
|
.h6-bold {
|
|
11
19
|
font-family: var(--mantine-font-family);
|
|
@@ -16,6 +24,14 @@
|
|
|
16
24
|
}
|
|
17
25
|
|
|
18
26
|
/* body */
|
|
27
|
+
.body-l-medium {
|
|
28
|
+
font-family: var(--mantine-font-family);
|
|
29
|
+
font-weight: 500;
|
|
30
|
+
font-size: var(--mantine-font-size-body-l);
|
|
31
|
+
line-height: var(--mantine-line-height-body-l);
|
|
32
|
+
letter-spacing: var(--mantine-spacing-body-l);
|
|
33
|
+
}
|
|
34
|
+
|
|
19
35
|
.body-l-bold {
|
|
20
36
|
font-family: var(--mantine-font-family);
|
|
21
37
|
font-weight: 700;
|
|
@@ -24,6 +40,14 @@
|
|
|
24
40
|
letter-spacing: var(--mantine-spacing-body-l);
|
|
25
41
|
}
|
|
26
42
|
|
|
43
|
+
.body-m-regular {
|
|
44
|
+
font-family: var(--mantine-font-family);
|
|
45
|
+
font-weight: 400;
|
|
46
|
+
font-size: var(--mantine-font-size-body-m);
|
|
47
|
+
line-height: var(--mantine-line-height-body-m);
|
|
48
|
+
letter-spacing: var(--mantine-spacing-body-m);
|
|
49
|
+
}
|
|
50
|
+
|
|
27
51
|
.body-m-bold {
|
|
28
52
|
font-family: var(--mantine-font-family);
|
|
29
53
|
font-weight: 700;
|
package/src/theme/index.ts
CHANGED
|
@@ -19,17 +19,13 @@ export const theme: MantineThemeOverride = {
|
|
|
19
19
|
//borders
|
|
20
20
|
'border-action-normal': colorsTuple('#dee0e3'),
|
|
21
21
|
'border-action-destructive': colorsTuple('#f7c3c0'),
|
|
22
|
-
'border-action-hover': colorsTuple('#C8CAD0'),
|
|
23
22
|
'border-base-alpha': colorsTuple('#0a0f2914'),
|
|
24
23
|
'border-base-surface': colorsTuple('#ffffff'),
|
|
25
24
|
|
|
26
|
-
//buttons
|
|
27
|
-
'background-button-tertiary': colorsTuple('#0a0f290a'),
|
|
28
|
-
'background-button-primary-disabled': colorsTuple('#e9eaec'),
|
|
29
|
-
|
|
30
25
|
//icons
|
|
31
26
|
'icon-base-secondary': colorsTuple('#0f132499'),
|
|
32
27
|
'icon-base-tertiary': colorsTuple('#0D112666'),
|
|
28
|
+
'icon-base-quaternary': colorsTuple('#0A0F2940'),
|
|
33
29
|
'icon-status-success': colorsTuple('#26BD6C'),
|
|
34
30
|
// icon/base/secondary
|
|
35
31
|
|
|
@@ -37,8 +33,6 @@ export const theme: MantineThemeOverride = {
|
|
|
37
33
|
'text-base-primary': colorsTuple('#14151a'),
|
|
38
34
|
'text-base-secondary': colorsTuple('#0f132499'),
|
|
39
35
|
'text-base-tertiary': colorsTuple('#0d112666'),
|
|
40
|
-
'text-base-quaternary': colorsTuple('#0a0f2940'),
|
|
41
|
-
'text-status-destructive': colorsTuple('#e6483d'),
|
|
42
36
|
'text-accent-blue-accent': colorsTuple('#4778F5'),
|
|
43
37
|
|
|
44
38
|
//toggle
|