@kvell-group/ui 1.18.11 → 1.18.13
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/package.json
CHANGED
|
@@ -10,7 +10,7 @@ import { CardLogoByPan } from '../../CardLogoByPan'
|
|
|
10
10
|
|
|
11
11
|
const mask = IMask.createMask({ mask: CARD_NUMBER_MASK })
|
|
12
12
|
|
|
13
|
-
type CardInputProps = Omit<MaskedInputProps, 'value'> & { value
|
|
13
|
+
type CardInputProps = Omit<MaskedInputProps, 'value'> & { value?: string }
|
|
14
14
|
|
|
15
15
|
// ----------------------------------------------------------------------
|
|
16
16
|
|
|
@@ -22,7 +22,7 @@ export const CardInput = forwardRef<HTMLInputElement, CardInputProps>((props, re
|
|
|
22
22
|
autoComplete='cc-number'
|
|
23
23
|
{...props}
|
|
24
24
|
mask={mask}
|
|
25
|
-
rightSection={<CardLogoByPan value={props
|
|
25
|
+
rightSection={<CardLogoByPan value={props?.value || ''} />}
|
|
26
26
|
leftSection={<CardSVG size={20} />}
|
|
27
27
|
placeholder='____ ____ ____ ____'
|
|
28
28
|
/>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
.section
|
|
2
|
-
|
|
1
|
+
.root .section {
|
|
2
|
+
--right-section-end: rem(5px);
|
|
3
3
|
}
|
|
@@ -1,14 +1,19 @@
|
|
|
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 { RiEyeLine, RiEyeOffLine } from '@remixicon/react'
|
|
5
|
+
import clsx from 'clsx'
|
|
4
6
|
|
|
5
7
|
// ----------------------------------------------------------------------
|
|
6
8
|
|
|
7
9
|
export const PasswordInput = PasswordInputBase.withProps({
|
|
8
10
|
classNames: {
|
|
9
11
|
...classNames,
|
|
10
|
-
|
|
12
|
+
root: clsx(classNames.root, sectionClassNames.root),
|
|
13
|
+
section: clsx(classNames.section, sectionClassNames.section),
|
|
11
14
|
},
|
|
12
15
|
autoComplete: 'current-password',
|
|
13
16
|
inputWrapperOrder: ['label', 'input', 'error', 'description'],
|
|
17
|
+
visibilityToggleIcon: ({ reveal }) =>
|
|
18
|
+
reveal ? <RiEyeOffLine size={20} /> : <RiEyeLine size={20} />,
|
|
14
19
|
})
|