@clicktap/ui 0.14.12 → 0.14.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/components/Accordion/Accordion.tsx +82 -0
- package/components/Accordion/index.ts +3 -0
- package/components/Avatar/Avatar.stories.tsx +99 -0
- package/components/Avatar/Avatar.tsx +120 -0
- package/components/Avatar/Avatar.types.ts +3 -0
- package/components/Avatar/AvatarGroup/AvatarGroup.tsx +32 -0
- package/components/Avatar/AvatarGroup/AvatarGroup.types.ts +8 -0
- package/components/Avatar/index.ts +4 -0
- package/components/Badge/Badge.stories.tsx +72 -0
- package/components/Badge/Badge.tsx +169 -0
- package/components/Badge/Badge.types.ts +3 -0
- package/components/Badge/index.ts +2 -0
- package/components/Breadcrumbs/BreadcrumbEllipsis.tsx +47 -0
- package/components/Breadcrumbs/BreadcrumbEllipsis.types.ts +5 -0
- package/components/Breadcrumbs/BreadcrumbItem.tsx +23 -0
- package/components/Breadcrumbs/BreadcrumbItem.types.ts +3 -0
- package/components/Breadcrumbs/BreadcrumbLink.tsx +30 -0
- package/components/Breadcrumbs/BreadcrumbLink.types.ts +3 -0
- package/components/Breadcrumbs/BreadcrumbSeparator.tsx +41 -0
- package/components/Breadcrumbs/BreadcrumbSeparator.types.ts +9 -0
- package/components/Breadcrumbs/Breadcrumbs.tsx +28 -0
- package/components/Breadcrumbs/Breadcrumbs.types.ts +6 -0
- package/components/Breadcrumbs/index.ts +10 -0
- package/components/Button/Button.tsx +72 -0
- package/components/Button/Button.types.ts +7 -0
- package/components/Button/index.ts +2 -0
- package/components/Card/Card.tsx +15 -0
- package/components/Card/Card.types.ts +3 -0
- package/components/Card/index.ts +2 -0
- package/components/Checkbox/Checkbox.tsx +122 -0
- package/components/Checkbox/Checkbox.types.ts +15 -0
- package/components/Checkbox/index.ts +2 -0
- package/components/Collapsible/Collapsible.tsx +34 -0
- package/components/Collapsible/Collapsible.types.ts +5 -0
- package/components/Collapsible/CollapsibleTrigger.tsx +57 -0
- package/components/Collapsible/CollapsibleTrigger.types.ts +14 -0
- package/components/Collapsible/index.ts +10 -0
- package/components/Container/Container.tsx +26 -0
- package/components/Container/Container.types.ts +3 -0
- package/components/Container/index.ts +2 -0
- package/components/ContextMenu/ContextMenu.tsx +74 -0
- package/components/ContextMenu/ContextMenu.types.ts +17 -0
- package/components/ContextMenu/index.ts +2 -0
- package/components/CreditCardExpirationInput/CreditCardExpirationInput.tsx +115 -0
- package/components/CreditCardExpirationInput/CreditCardExpirationInput.types.ts +10 -0
- package/components/CreditCardExpirationInput/index.ts +2 -0
- package/components/CreditCardInput/CreditCardInput.tsx +147 -0
- package/components/CreditCardInput/CreditCardInput.types.ts +12 -0
- package/components/CreditCardInput/index.ts +2 -0
- package/components/DateInput/DateInput.tsx +81 -0
- package/components/DateInput/DateInput.types.ts +15 -0
- package/components/DateInput/index.ts +2 -0
- package/components/DateTimeFormat/DateTimeFormat.tsx +16 -0
- package/components/DateTimeFormat/DateTimeFormat.types.ts +7 -0
- package/components/DateTimeFormat/index.ts +2 -0
- package/components/Dialog/Dialog.tsx +65 -0
- package/components/Dialog/Dialog.types.ts +9 -0
- package/components/Dialog/index.ts +2 -0
- package/components/DialogTrigger/DialogTrigger.tsx +45 -0
- package/components/DialogTrigger/DialogTrigger.types.ts +6 -0
- package/components/DialogTrigger/index.ts +5 -0
- package/components/Divider/Divider.stories.tsx +37 -0
- package/components/Divider/Divider.tsx +34 -0
- package/components/Divider/Divider.types.ts +5 -0
- package/components/Divider/index.ts +2 -0
- package/components/DobInput/DobInput.tsx +120 -0
- package/components/DobInput/index.ts +2 -0
- package/components/Drawer/Drawer.tsx +126 -0
- package/components/Drawer/Drawer.types.ts +11 -0
- package/components/Drawer/index.ts +2 -0
- package/components/Icon/Account.tsx +50 -0
- package/components/Icon/Cart.tsx +43 -0
- package/components/Icon/Checkmark.tsx +34 -0
- package/components/Icon/Cross.tsx +36 -0
- package/components/Icon/DownArrow.tsx +23 -0
- package/components/Icon/Hamburger.tsx +23 -0
- package/components/Icon/Icon.types.ts +8 -0
- package/components/Icon/LinkArrow.tsx +32 -0
- package/components/Icon/Minus.tsx +20 -0
- package/components/Icon/Plus.tsx +20 -0
- package/components/Icon/Search.tsx +36 -0
- package/components/Icon/Trash.tsx +27 -0
- package/components/Icon/Verified.tsx +20 -0
- package/components/Icon/index.ts +14 -0
- package/components/Image/Image.tsx +32 -0
- package/components/Image/index.ts +2 -0
- package/components/Input/Input.tsx +109 -0
- package/components/Input/Input.types.ts +17 -0
- package/components/Input/index.ts +2 -0
- package/components/Link/Link.stories.tsx +96 -0
- package/components/Link/Link.tsx +34 -0
- package/components/Link/Link.types.ts +3 -0
- package/components/Link/index.ts +2 -0
- package/components/Loader/CircularEasing.tsx +66 -0
- package/components/Loader/CircularEasing.types.ts +8 -0
- package/components/Loader/Pulse.tsx +45 -0
- package/components/Loader/Pulse.types.ts +5 -0
- package/components/Loader/index.ts +4 -0
- package/components/Menu/ContextMenu.tsx +83 -0
- package/components/Menu/Menu.tsx +143 -0
- package/components/Menu/Menu.types.ts +44 -0
- package/components/Menu/index.ts +4 -0
- package/components/Meter/Meter.stories.tsx +111 -0
- package/components/Meter/Meter.tsx +68 -0
- package/components/Meter/Meter.types.ts +10 -0
- package/components/Meter/index.ts +2 -0
- package/components/Modal/Modal.tsx +16 -0
- package/components/Modal/Modal.types.ts +6 -0
- package/components/Modal/index.ts +2 -0
- package/components/ModalOverlay/ModalOverlay.tsx +121 -0
- package/components/ModalOverlay/ModalOverlay.types.ts +18 -0
- package/components/ModalOverlay/index.ts +2 -0
- package/components/NumberFormat/NumberFormat.tsx +19 -0
- package/components/NumberFormat/NumberFormat.types.ts +8 -0
- package/components/NumberFormat/index.ts +2 -0
- package/components/NumberInput/NumberInput.tsx +164 -0
- package/components/NumberInput/NumberInput.types.ts +22 -0
- package/components/NumberInput/index.ts +2 -0
- package/components/NumberTicker/DigitResolver.tsx +119 -0
- package/components/NumberTicker/DigitResolver.types.ts +18 -0
- package/components/NumberTicker/NumberTicker.tsx +56 -0
- package/components/NumberTicker/NumberTicker.types.ts +96 -0
- package/components/NumberTicker/hooks/useColumnTransition.ts +36 -0
- package/components/NumberTicker/hooks/useNumberDelta.ts +19 -0
- package/components/NumberTicker/hooks/useNumberTicker.ts +36 -0
- package/components/NumberTicker/index.ts +10 -0
- package/components/Pagination/Pagination.tsx +44 -0
- package/components/Pagination/index.ts +2 -0
- package/components/PasswordCheck/PasswordCheck.tsx +59 -0
- package/components/PasswordCheck/PasswordCheck.types.ts +4 -0
- package/components/PasswordCheck/PasswordCheck.utils.ts +47 -0
- package/components/PasswordCheck/index.ts +2 -0
- package/components/PhoneInput/PhoneInput.tsx +191 -0
- package/components/PhoneInput/index.ts +2 -0
- package/components/PinInput/PinInput.tsx +314 -0
- package/components/PinInput/PinInput.types.ts +21 -0
- package/components/PinInput/index.ts +2 -0
- package/components/Progressbar/CircularProgressbar.tsx +71 -0
- package/components/Progressbar/CircularProgressbar.types.ts +10 -0
- package/components/Progressbar/LinearProgressbar.tsx +75 -0
- package/components/Progressbar/LinearProgressbar.types.ts +11 -0
- package/components/Progressbar/index.ts +4 -0
- package/components/Radio/Radio.tsx +88 -0
- package/components/Radio/Radio.types.ts +16 -0
- package/components/Radio/index.ts +2 -0
- package/components/RadioGroup/RadioGroup.tsx +49 -0
- package/components/RadioGroup/RadioGroup.types.ts +7 -0
- package/components/RadioGroup/index.ts +2 -0
- package/components/Select/Option.tsx +32 -0
- package/components/Select/Option.types.ts +3 -0
- package/components/Select/Select.tsx +253 -0
- package/components/Select/Select.types.ts +42 -0
- package/components/Select/index.ts +8 -0
- package/components/Skeleton/Skeleton.tsx +15 -0
- package/components/Skeleton/Skeleton.types.ts +3 -0
- package/components/Skeleton/index.ts +2 -0
- package/components/Slider/Slider.tsx +110 -0
- package/components/Slider/Slider.types.ts +11 -0
- package/components/Slider/index.ts +2 -0
- package/components/Switch/Switch.tsx +63 -0
- package/components/Switch/Switch.types.ts +8 -0
- package/components/Switch/index.ts +2 -0
- package/components/Table/Table.tsx +52 -0
- package/components/Table/Table.types.ts +22 -0
- package/components/Table/index.ts +2 -0
- package/components/Tabs/Tab.tsx +118 -0
- package/components/Tabs/Tab.types.ts +10 -0
- package/components/Tabs/TabList.tsx +51 -0
- package/components/Tabs/TabList.types.ts +12 -0
- package/components/Tabs/TabPanel.tsx +19 -0
- package/components/Tabs/TabPanel.types.ts +3 -0
- package/components/Tabs/Tabs.context.tsx +9 -0
- package/components/Tabs/Tabs.tsx +39 -0
- package/components/Tabs/Tabs.types.ts +3 -0
- package/components/Tabs/index.ts +9 -0
- package/components/TimeInput/TimeInput.stories.tsx +125 -0
- package/components/TimeInput/TimeInput.tsx +81 -0
- package/components/TimeInput/TimeInput.types.ts +15 -0
- package/components/TimeInput/index.ts +2 -0
- package/components/ToggleButton/ToggleButton.stories.tsx +89 -0
- package/components/ToggleButton/ToggleButton.tsx +69 -0
- package/components/ToggleButton/ToggleButton.types.ts +6 -0
- package/components/ToggleButton/index.ts +2 -0
- package/components/Tooltip/Tooltip.tsx +59 -0
- package/components/Tooltip/Tooltip.types.ts +3 -0
- package/components/Tooltip/index.ts +2 -0
- package/components/UploadImage/UploadImage.tsx +206 -0
- package/components/UploadImage/UploadImage.types.ts +15 -0
- package/components/UploadImage/index.ts +2 -0
- package/package.json +1 -1
- package/tailwind.config.js +3 -1
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { useEffect, useId, useState } from 'react';
|
|
4
|
+
import { FieldError, Input, Label, TextField } from 'react-aria-components';
|
|
5
|
+
import {
|
|
6
|
+
type InputAttributes,
|
|
7
|
+
NumberFormatBase,
|
|
8
|
+
type NumberFormatValues,
|
|
9
|
+
} from 'react-number-format';
|
|
10
|
+
import { cn } from '../../utils/cn';
|
|
11
|
+
// import { ErrorMessage } from '../ErrorMessage';
|
|
12
|
+
// import { FieldLabel } from '../FieldLabel';
|
|
13
|
+
import type { InputProps } from '../Input/Input.types';
|
|
14
|
+
// import { inputBaseClasses } from '../Input/Input';
|
|
15
|
+
|
|
16
|
+
function AriaInput({ className, ...props }: InputAttributes) {
|
|
17
|
+
return (
|
|
18
|
+
<Input
|
|
19
|
+
className={cn('peer h-11', /** inputBaseClasses, */ className)}
|
|
20
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
21
|
+
{...props}
|
|
22
|
+
/>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function DobInput({
|
|
27
|
+
label,
|
|
28
|
+
description,
|
|
29
|
+
errorMessage,
|
|
30
|
+
type,
|
|
31
|
+
className,
|
|
32
|
+
classNames,
|
|
33
|
+
// inputProps,
|
|
34
|
+
id,
|
|
35
|
+
value,
|
|
36
|
+
onChange,
|
|
37
|
+
...props
|
|
38
|
+
}: InputProps) {
|
|
39
|
+
const inputId = useId();
|
|
40
|
+
const [inputValue, setInputValue] = useState(value || '');
|
|
41
|
+
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
setInputValue(value || '');
|
|
44
|
+
}, [value]);
|
|
45
|
+
|
|
46
|
+
const format = (val: string) => {
|
|
47
|
+
if (val === '') return '';
|
|
48
|
+
const cleanedVal = val.replace(/\s+/g, '');
|
|
49
|
+
const cardFormat = '##-##-####';
|
|
50
|
+
|
|
51
|
+
let formattedVal = '';
|
|
52
|
+
let position = 0;
|
|
53
|
+
|
|
54
|
+
for (let i = 0; i < cardFormat.length; i += 1) {
|
|
55
|
+
if (cardFormat[i] === '#') {
|
|
56
|
+
if (position < cleanedVal.length) {
|
|
57
|
+
formattedVal += cleanedVal[position];
|
|
58
|
+
position += 1;
|
|
59
|
+
} else {
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
} else {
|
|
63
|
+
formattedVal += cardFormat[i];
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return formattedVal;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const handleValueChange = (values: NumberFormatValues) => {
|
|
71
|
+
setInputValue(values.formattedValue);
|
|
72
|
+
if (onChange) {
|
|
73
|
+
onChange(values.formattedValue);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
return (
|
|
78
|
+
<TextField
|
|
79
|
+
className={cn('flex flex-col w-full text-slate-900', className)}
|
|
80
|
+
type={type}
|
|
81
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
82
|
+
{...props}
|
|
83
|
+
>
|
|
84
|
+
<Label
|
|
85
|
+
className={cn('flex text-slate-500 text-xs', classNames?.label)}
|
|
86
|
+
htmlFor={id || inputId}
|
|
87
|
+
>
|
|
88
|
+
{label}
|
|
89
|
+
</Label>
|
|
90
|
+
<NumberFormatBase
|
|
91
|
+
id={id || inputId}
|
|
92
|
+
value={inputValue}
|
|
93
|
+
format={format}
|
|
94
|
+
customInput={AriaInput}
|
|
95
|
+
className={cn(
|
|
96
|
+
'border-solid border border-slate-300 rounded-md',
|
|
97
|
+
'text-sm text-slate-900 placeholder-slate-400',
|
|
98
|
+
'h-10 px-2 py-0 m-0 w-full',
|
|
99
|
+
'bg-white',
|
|
100
|
+
'transition-all duration-200 ease-in-out',
|
|
101
|
+
'hover:border-slate-400',
|
|
102
|
+
'focus:outline-2 focus:outline focus:outline-slate-200 focus:border-slate-400',
|
|
103
|
+
'disabled:border-slate-200 disabled:bg-slate-100',
|
|
104
|
+
'invalid:border-red-500 invalid:bg-red-100 invalid:text-red-600',
|
|
105
|
+
'invalid:hover:border-red-600 invalid:focus:border-red-600 invalid:focus:outline-red-200',
|
|
106
|
+
classNames?.input
|
|
107
|
+
)}
|
|
108
|
+
onValueChange={handleValueChange}
|
|
109
|
+
/>
|
|
110
|
+
|
|
111
|
+
{errorMessage && (
|
|
112
|
+
<FieldError className={cn(classNames?.error)}>
|
|
113
|
+
{errorMessage}
|
|
114
|
+
</FieldError>
|
|
115
|
+
)}
|
|
116
|
+
</TextField>
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export default DobInput;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import type { Ref, ReactNode, CSSProperties } from 'react';
|
|
5
|
+
import { Dialog } from 'react-aria-components';
|
|
6
|
+
import { motion } from 'framer-motion';
|
|
7
|
+
import { cn } from '../../utils/cn';
|
|
8
|
+
import type { DrawerProps } from './Drawer.types';
|
|
9
|
+
|
|
10
|
+
const directionAnimatation = {
|
|
11
|
+
top: {
|
|
12
|
+
hidden: {
|
|
13
|
+
y: '-100%',
|
|
14
|
+
transition: {
|
|
15
|
+
ease: 'easeIn',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
visible: {
|
|
19
|
+
y: 0,
|
|
20
|
+
transition: {
|
|
21
|
+
ease: 'easeOut',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
bottom: {
|
|
26
|
+
hidden: {
|
|
27
|
+
y: '100%',
|
|
28
|
+
transition: {
|
|
29
|
+
ease: 'easeIn',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
visible: {
|
|
33
|
+
y: 0,
|
|
34
|
+
transition: {
|
|
35
|
+
ease: 'easeOut',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
right: {
|
|
40
|
+
hidden: {
|
|
41
|
+
x: '100%',
|
|
42
|
+
transition: {
|
|
43
|
+
ease: 'easeIn',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
visible: {
|
|
47
|
+
x: 0,
|
|
48
|
+
transition: {
|
|
49
|
+
ease: 'easeOut',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
left: {
|
|
54
|
+
hidden: {
|
|
55
|
+
x: '-100%',
|
|
56
|
+
transition: {
|
|
57
|
+
ease: 'easeIn',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
visible: {
|
|
61
|
+
x: 0,
|
|
62
|
+
transition: {
|
|
63
|
+
ease: 'easeOut',
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
70
|
+
const ForwardedDialog = forwardRef<HTMLElement, any>(
|
|
71
|
+
({ style, size = '20rem', ...props }, ref: Ref<HTMLElement>) => {
|
|
72
|
+
// Separate the dynamic style logic
|
|
73
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
74
|
+
const ariaStyle =
|
|
75
|
+
typeof style === 'function'
|
|
76
|
+
? // eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
|
77
|
+
style(props)
|
|
78
|
+
: ({
|
|
79
|
+
...style,
|
|
80
|
+
'--drawer-size': `${size as string}`,
|
|
81
|
+
} as CSSProperties);
|
|
82
|
+
|
|
83
|
+
return (
|
|
84
|
+
// Pass only static styles to framer-motion
|
|
85
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, react/jsx-props-no-spreading
|
|
86
|
+
<Dialog {...props} ref={ref} style={ariaStyle} />
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
|
|
91
|
+
const MotionDrawer = motion.create(ForwardedDialog);
|
|
92
|
+
|
|
93
|
+
export function Drawer({
|
|
94
|
+
direction = 'right',
|
|
95
|
+
children,
|
|
96
|
+
className,
|
|
97
|
+
animationVariants,
|
|
98
|
+
...props
|
|
99
|
+
}: DrawerProps) {
|
|
100
|
+
return (
|
|
101
|
+
<MotionDrawer
|
|
102
|
+
className={cn(
|
|
103
|
+
'fixed p-8 outline-0 bg-white',
|
|
104
|
+
'border-solid border-slate-200',
|
|
105
|
+
'max-w-full max-h-[var(--visual-viewport-height)]',
|
|
106
|
+
direction === 'top' &&
|
|
107
|
+
'top-0 left-0 right-0 bottom-auto border-b shadow-[0_8px_24px_rgba(0,0,0,0.1)] h-[var(--drawer-size)]',
|
|
108
|
+
direction === 'right' &&
|
|
109
|
+
'top-0 left-auto bottom-0 right-0 border-l shadow-[-8px_0_24px_rgba(0,0,0,0.1)] w-[var(--drawer-size)]',
|
|
110
|
+
direction === 'bottom' &&
|
|
111
|
+
'bottom-0 left-0 right-0 top-auto border-t shadow-[0_-8px_24px_rgba(0,0,0,0.1)] h-[var(--drawer-size)]',
|
|
112
|
+
direction === 'left' &&
|
|
113
|
+
'top-0 bottom-0 left-0 right-auto border-r shadow-[8px_0_24px_rgba(0,0,0,0.1)] w-[var(--drawer-size)]',
|
|
114
|
+
className
|
|
115
|
+
)}
|
|
116
|
+
data-direction={direction}
|
|
117
|
+
variants={animationVariants || directionAnimatation[direction]}
|
|
118
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
119
|
+
{...props}
|
|
120
|
+
>
|
|
121
|
+
{children as ReactNode}
|
|
122
|
+
</MotionDrawer>
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export default Drawer;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Key } from 'react';
|
|
2
|
+
import type { DialogProps } from 'react-aria-components';
|
|
3
|
+
import type { MotionStyle, Variants } from 'framer-motion';
|
|
4
|
+
|
|
5
|
+
export type DrawerProps = DialogProps & {
|
|
6
|
+
direction?: 'top' | 'right' | 'bottom' | 'left';
|
|
7
|
+
key?: Key;
|
|
8
|
+
style?: MotionStyle;
|
|
9
|
+
animationVariants?: Variants;
|
|
10
|
+
size?: string;
|
|
11
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from '../../utils/cn';
|
|
4
|
+
import type { IconProps } from './Icon.types';
|
|
5
|
+
|
|
6
|
+
export function Account({ className, ...rest }: IconProps) {
|
|
7
|
+
return (
|
|
8
|
+
<svg
|
|
9
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
10
|
+
width="20"
|
|
11
|
+
height="20"
|
|
12
|
+
viewBox="0 0 20 20"
|
|
13
|
+
fill="none"
|
|
14
|
+
className={cn(className)}
|
|
15
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
16
|
+
{...rest}
|
|
17
|
+
>
|
|
18
|
+
<g clipPath="url(#clip0_283_14902)">
|
|
19
|
+
<path
|
|
20
|
+
d="M15 16.668C15 15.3419 14.4732 14.0701 13.5355 13.1324C12.5979 12.1948 11.3261 11.668 10 11.668C8.67392 11.668 7.40215 12.1948 6.46447 13.1324C5.52678 14.0701 5 15.3419 5 16.668"
|
|
21
|
+
stroke="#20293A"
|
|
22
|
+
strokeWidth="1.5"
|
|
23
|
+
strokeLinecap="round"
|
|
24
|
+
strokeLinejoin="round"
|
|
25
|
+
/>
|
|
26
|
+
<path
|
|
27
|
+
d="M9.99996 11.6667C11.8409 11.6667 13.3333 10.1743 13.3333 8.33333C13.3333 6.49238 11.8409 5 9.99996 5C8.15901 5 6.66663 6.49238 6.66663 8.33333C6.66663 10.1743 8.15901 11.6667 9.99996 11.6667Z"
|
|
28
|
+
stroke="#20293A"
|
|
29
|
+
strokeWidth="1.5"
|
|
30
|
+
strokeLinecap="round"
|
|
31
|
+
strokeLinejoin="round"
|
|
32
|
+
/>
|
|
33
|
+
<path
|
|
34
|
+
d="M10.0001 18.3346C14.6025 18.3346 18.3334 14.6037 18.3334 10.0013C18.3334 5.39893 14.6025 1.66797 10.0001 1.66797C5.39771 1.66797 1.66675 5.39893 1.66675 10.0013C1.66675 14.6037 5.39771 18.3346 10.0001 18.3346Z"
|
|
35
|
+
stroke="#20293A"
|
|
36
|
+
strokeWidth="1.5"
|
|
37
|
+
strokeLinecap="round"
|
|
38
|
+
strokeLinejoin="round"
|
|
39
|
+
/>
|
|
40
|
+
</g>
|
|
41
|
+
<defs>
|
|
42
|
+
<clipPath id="clip0_283_14902">
|
|
43
|
+
<rect width="20" height="20" fill="white" />
|
|
44
|
+
</clipPath>
|
|
45
|
+
</defs>
|
|
46
|
+
</svg>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export default Account;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from '../../utils/cn';
|
|
4
|
+
import type { IconProps } from './Icon.types';
|
|
5
|
+
|
|
6
|
+
export function Cart({ className, ...rest }: IconProps) {
|
|
7
|
+
return (
|
|
8
|
+
<svg
|
|
9
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
10
|
+
width="20"
|
|
11
|
+
height="20"
|
|
12
|
+
viewBox="0 0 20 20"
|
|
13
|
+
fill="none"
|
|
14
|
+
className={cn(className)}
|
|
15
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
16
|
+
{...rest}
|
|
17
|
+
>
|
|
18
|
+
<path
|
|
19
|
+
d="M5 1.66797L2.5 5.0013V16.668C2.5 17.11 2.67559 17.5339 2.98816 17.8465C3.30072 18.159 3.72464 18.3346 4.16667 18.3346H15.8333C16.2754 18.3346 16.6993 18.159 17.0118 17.8465C17.3244 17.5339 17.5 17.11 17.5 16.668V5.0013L15 1.66797H5Z"
|
|
20
|
+
stroke="#20293A"
|
|
21
|
+
strokeWidth="1.5"
|
|
22
|
+
strokeLinecap="round"
|
|
23
|
+
strokeLinejoin="round"
|
|
24
|
+
/>
|
|
25
|
+
<path
|
|
26
|
+
d="M2.5 5H17.5"
|
|
27
|
+
stroke="#20293A"
|
|
28
|
+
strokeWidth="1.5"
|
|
29
|
+
strokeLinecap="round"
|
|
30
|
+
strokeLinejoin="round"
|
|
31
|
+
/>
|
|
32
|
+
<path
|
|
33
|
+
d="M13.3334 8.33203C13.3334 9.21609 12.9822 10.0639 12.3571 10.6891C11.732 11.3142 10.8841 11.6654 10.0001 11.6654C9.11603 11.6654 8.26818 11.3142 7.64306 10.6891C7.01794 10.0639 6.66675 9.21609 6.66675 8.33203"
|
|
34
|
+
stroke="#20293A"
|
|
35
|
+
strokeWidth="1.5"
|
|
36
|
+
strokeLinecap="round"
|
|
37
|
+
strokeLinejoin="round"
|
|
38
|
+
/>
|
|
39
|
+
</svg>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export default Cart;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
export function Checkmark() {
|
|
4
|
+
return (
|
|
5
|
+
<svg
|
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
+
viewBox="0 0 52 52"
|
|
8
|
+
strokeWidth="5"
|
|
9
|
+
strokeMiterlimit="10"
|
|
10
|
+
className="w-6 h-6 rounded-full block stroke-[#20293A] animate-[CheckMarkFill_0.4s_ease-in-out_0.4s_forwards,CheckMarkScale_0.3s_ease-in-out_0.9s_both]"
|
|
11
|
+
>
|
|
12
|
+
<circle
|
|
13
|
+
cx="26"
|
|
14
|
+
cy="26"
|
|
15
|
+
r="25"
|
|
16
|
+
fill="none"
|
|
17
|
+
strokeDasharray="166"
|
|
18
|
+
strokeDashoffset="166"
|
|
19
|
+
strokeWidth="5"
|
|
20
|
+
strokeMiterlimit="10"
|
|
21
|
+
className="animate-[CheckMarkStroke_0.6s_cubic-bezier(0.65,0,0.45,1)_forwards] stroke-[#20293A]"
|
|
22
|
+
/>
|
|
23
|
+
<path
|
|
24
|
+
fill="none"
|
|
25
|
+
d="M14.1 27.2l7.1 7.2 16.7-16.8"
|
|
26
|
+
strokeDasharray="48"
|
|
27
|
+
strokeDashoffset="48"
|
|
28
|
+
className="animate-[CheckMarkStroke_0.3s_cubic-bezier(0.65,0,0.45,1)_0.8s_forwards] origin-[50%_50%]"
|
|
29
|
+
/>
|
|
30
|
+
</svg>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export default Checkmark;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from '../../utils/cn';
|
|
4
|
+
import type { IconProps } from './Icon.types';
|
|
5
|
+
|
|
6
|
+
export function Cross({ className, ...rest }: IconProps) {
|
|
7
|
+
return (
|
|
8
|
+
<svg
|
|
9
|
+
width="20"
|
|
10
|
+
height="20"
|
|
11
|
+
viewBox="0 0 16 16"
|
|
12
|
+
fill="none"
|
|
13
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
14
|
+
className={cn(className)}
|
|
15
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
16
|
+
{...rest}
|
|
17
|
+
>
|
|
18
|
+
<path
|
|
19
|
+
d="M12 4L4 12"
|
|
20
|
+
stroke="#20293A"
|
|
21
|
+
strokeWidth="1.5"
|
|
22
|
+
strokeLinecap="round"
|
|
23
|
+
strokeLinejoin="round"
|
|
24
|
+
/>
|
|
25
|
+
<path
|
|
26
|
+
d="M4 4L12 12"
|
|
27
|
+
stroke="#20293A"
|
|
28
|
+
strokeWidth="1.5"
|
|
29
|
+
strokeLinecap="round"
|
|
30
|
+
strokeLinejoin="round"
|
|
31
|
+
/>
|
|
32
|
+
</svg>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export default Cross;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from '../../utils/cn';
|
|
4
|
+
import type { IconProps } from './Icon.types';
|
|
5
|
+
|
|
6
|
+
export function DownArrow({ className, ...rest }: IconProps) {
|
|
7
|
+
return (
|
|
8
|
+
<svg
|
|
9
|
+
width="14"
|
|
10
|
+
height="8"
|
|
11
|
+
viewBox="0 0 14 8"
|
|
12
|
+
fill="none"
|
|
13
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
14
|
+
className={cn(className)}
|
|
15
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
16
|
+
{...rest}
|
|
17
|
+
>
|
|
18
|
+
<path d="M13 0.5L7 6.5L1 0.499999" stroke="currentColor" />
|
|
19
|
+
</svg>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default DownArrow;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from '../../utils/cn';
|
|
4
|
+
import type { IconProps } from './Icon.types';
|
|
5
|
+
|
|
6
|
+
export function Hamburger({ className, ...rest }: IconProps) {
|
|
7
|
+
return (
|
|
8
|
+
<svg
|
|
9
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
10
|
+
viewBox="0 0 21 14"
|
|
11
|
+
width="20"
|
|
12
|
+
height="20"
|
|
13
|
+
fill="#20293A"
|
|
14
|
+
className={cn(className)}
|
|
15
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
16
|
+
{...rest}
|
|
17
|
+
>
|
|
18
|
+
<path d="M0.583333 14H20.4167C20.7433 14 21 13.7433 21 13.4167V12.25C21 11.9233 20.7433 11.6667 20.4167 11.6667H0.583333C0.256667 11.6667 0 11.9233 0 12.25V13.4167C0 13.7433 0.256667 14 0.583333 14ZM0.583333 8.16667H20.4167C20.7433 8.16667 21 7.91 21 7.58333V6.41667C21 6.09 20.7433 5.83333 20.4167 5.83333H0.583333C0.256667 5.83333 0 6.09 0 6.41667V7.58333C0 7.91 0.256667 8.16667 0.583333 8.16667ZM0 0.583333V1.75C0 2.07667 0.256667 2.33333 0.583333 2.33333H20.4167C20.7433 2.33333 21 2.07667 21 1.75V0.583333C21 0.256667 20.7433 0 20.4167 0H0.583333C0.256667 0 0 0.256667 0 0.583333Z" />
|
|
19
|
+
</svg>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default Hamburger;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from '../../utils/cn';
|
|
4
|
+
import type { IconProps } from './Icon.types';
|
|
5
|
+
|
|
6
|
+
export function LinkArrow({ className, ...rest }: IconProps) {
|
|
7
|
+
return (
|
|
8
|
+
<svg
|
|
9
|
+
width="20"
|
|
10
|
+
height="20"
|
|
11
|
+
viewBox="0 0 20 20"
|
|
12
|
+
fill="none"
|
|
13
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
14
|
+
className={cn(
|
|
15
|
+
'text-inherit transition duration-100 ease-linear',
|
|
16
|
+
className
|
|
17
|
+
)}
|
|
18
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
19
|
+
{...rest}
|
|
20
|
+
>
|
|
21
|
+
<path
|
|
22
|
+
d="M7.5 15L12.5 10L7.5 5"
|
|
23
|
+
stroke="#20293A"
|
|
24
|
+
strokeWidth="1.5"
|
|
25
|
+
strokeLinecap="round"
|
|
26
|
+
strokeLinejoin="round"
|
|
27
|
+
/>
|
|
28
|
+
</svg>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export default LinkArrow;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
export function Minus() {
|
|
4
|
+
return (
|
|
5
|
+
<svg
|
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
+
width="7"
|
|
8
|
+
height="3"
|
|
9
|
+
viewBox="0 0 7 3"
|
|
10
|
+
fill="none"
|
|
11
|
+
>
|
|
12
|
+
<path
|
|
13
|
+
d="M6.36603 0.684659V2.09091H0.638761V0.684659H6.36603Z"
|
|
14
|
+
fill="#D5D5D5"
|
|
15
|
+
/>
|
|
16
|
+
</svg>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export default Minus;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
export function Plus() {
|
|
4
|
+
return (
|
|
5
|
+
<svg
|
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
+
width="9"
|
|
8
|
+
height="10"
|
|
9
|
+
viewBox="0 0 9 10"
|
|
10
|
+
fill="none"
|
|
11
|
+
>
|
|
12
|
+
<path
|
|
13
|
+
d="M3.78329 9.10511V0.667613H5.21511V9.10511H3.78329ZM0.280451 5.60227V4.17045H8.71795V5.60227H0.280451Z"
|
|
14
|
+
fill="#D5D5D5"
|
|
15
|
+
/>
|
|
16
|
+
</svg>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export default Plus;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from '../../utils/cn';
|
|
4
|
+
import type { IconProps } from './Icon.types';
|
|
5
|
+
|
|
6
|
+
export function Search({ className, ...rest }: IconProps) {
|
|
7
|
+
return (
|
|
8
|
+
<svg
|
|
9
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
10
|
+
width="20"
|
|
11
|
+
height="20"
|
|
12
|
+
viewBox="0 0 20 20"
|
|
13
|
+
fill="none"
|
|
14
|
+
className={cn('', className)}
|
|
15
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
16
|
+
{...rest}
|
|
17
|
+
>
|
|
18
|
+
<path
|
|
19
|
+
d="M9.16667 15.8333C12.8486 15.8333 15.8333 12.8486 15.8333 9.16667C15.8333 5.48477 12.8486 2.5 9.16667 2.5C5.48477 2.5 2.5 5.48477 2.5 9.16667C2.5 12.8486 5.48477 15.8333 9.16667 15.8333Z"
|
|
20
|
+
stroke="#20293A"
|
|
21
|
+
strokeWidth="1.5"
|
|
22
|
+
strokeLinecap="round"
|
|
23
|
+
strokeLinejoin="round"
|
|
24
|
+
/>
|
|
25
|
+
<path
|
|
26
|
+
d="M17.5001 17.5013L13.9167 13.918"
|
|
27
|
+
stroke="#20293A"
|
|
28
|
+
strokeWidth="1.5"
|
|
29
|
+
strokeLinecap="round"
|
|
30
|
+
strokeLinejoin="round"
|
|
31
|
+
/>
|
|
32
|
+
</svg>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export default Search;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
export function Trash() {
|
|
4
|
+
return (
|
|
5
|
+
<svg
|
|
6
|
+
width="14"
|
|
7
|
+
height="18"
|
|
8
|
+
viewBox="0 0 14 18"
|
|
9
|
+
fill="none"
|
|
10
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
+
>
|
|
12
|
+
<g clipPath="url(#clip0_1432_3747)">
|
|
13
|
+
<path
|
|
14
|
+
d="M1 16C1 17.1 1.9 18 3 18H11C12.1 18 13 17.1 13 16V4H1V16ZM3 6H11V16H3V6ZM10.5 1L9.5 0H4.5L3.5 1H0V3H14V1H10.5Z"
|
|
15
|
+
fill="white"
|
|
16
|
+
/>
|
|
17
|
+
</g>
|
|
18
|
+
<defs>
|
|
19
|
+
<clipPath id="clip0_1432_3747">
|
|
20
|
+
<rect width="14" height="18" fill="white" />
|
|
21
|
+
</clipPath>
|
|
22
|
+
</defs>
|
|
23
|
+
</svg>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export default Trash;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
export function Verified() {
|
|
4
|
+
return (
|
|
5
|
+
<svg
|
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
+
width="21"
|
|
8
|
+
height="21"
|
|
9
|
+
fill="none"
|
|
10
|
+
viewBox="0 0 21 21"
|
|
11
|
+
>
|
|
12
|
+
<path
|
|
13
|
+
fill="currentColor"
|
|
14
|
+
d="M10.5 0a10.5 10.5 0 1 0 0 21 10.5 10.5 0 0 0 0-21ZM8.4 15.8l-5.3-5.3L4.7 9l3.8 3.8 8-8 1.5 1.5-9.5 9.4Z"
|
|
15
|
+
/>
|
|
16
|
+
</svg>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export default Verified;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { Account } from './Account';
|
|
2
|
+
export { Cart } from './Cart';
|
|
3
|
+
export { Checkmark } from './Checkmark';
|
|
4
|
+
export { Cross } from './Cross';
|
|
5
|
+
export { DownArrow } from './DownArrow';
|
|
6
|
+
export { Hamburger } from './Hamburger';
|
|
7
|
+
export { LinkArrow } from './LinkArrow';
|
|
8
|
+
export { Minus } from './Minus';
|
|
9
|
+
export { Plus } from './Plus';
|
|
10
|
+
export { Search } from './Search';
|
|
11
|
+
export { Trash } from './Trash';
|
|
12
|
+
export { Verified } from './Verified';
|
|
13
|
+
|
|
14
|
+
export type { IconProps } from './Icon.types';
|