oneslash-design-system 1.1.19 → 1.1.21
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/button.tsx +2 -2
- package/components/checkBox.tsx +3 -3
- package/components/iconButton.tsx +1 -1
- package/components/menuItem.tsx +1 -1
- package/components/tab.tsx +1 -1
- package/components/tag.tsx +1 -1
- package/components/textField.tsx +1 -1
- package/designTokens.js +1 -1
- package/dist/components/checkBox.jsx +1 -1
- package/dist/components/tab.jsx +1 -1
- package/dist/components/tag.jsx +1 -1
- package/dist/components/textField.jsx +1 -1
- package/dist/designTokens.js +1 -1
- package/package.json +1 -1
package/components/button.tsx
CHANGED
|
@@ -93,7 +93,7 @@ export default function Button({
|
|
|
93
93
|
|
|
94
94
|
// Build the button classes dynamically
|
|
95
95
|
const buttonClasses = `
|
|
96
|
-
flex flex-row space-x-2 items-center rounded-[8px]
|
|
96
|
+
flex flex-row space-x-2 items-center rounded-[8px] transition-colors duration-200 ease-in-out
|
|
97
97
|
${sizeClasses}
|
|
98
98
|
${state === 'enabled' ? baseTypeClasses : ''}
|
|
99
99
|
${state === 'focused' ? stateClasses.focused : ''}
|
|
@@ -103,7 +103,7 @@ export default function Button({
|
|
|
103
103
|
|
|
104
104
|
return (
|
|
105
105
|
<button
|
|
106
|
-
className={buttonClasses}
|
|
106
|
+
className={buttonClasses}
|
|
107
107
|
onMouseEnter={() => { if (state !== 'disabled') setIsHovered(true); }}
|
|
108
108
|
onMouseLeave={() => { if (state !== 'disabled') setIsHovered(false); }}
|
|
109
109
|
onClick={onClickButton} // Button click action
|
package/components/checkBox.tsx
CHANGED
|
@@ -26,11 +26,11 @@ export default function Checkbox({
|
|
|
26
26
|
<label className="flex items-center cursor-pointer">
|
|
27
27
|
<div
|
|
28
28
|
onClick={handleToggle}
|
|
29
|
-
className="relative flex items-center justify-center w-6 h-6 group"
|
|
29
|
+
className="relative flex items-center justify-center w-6 h-6 group transition-colors duration-200 ease-in-out"
|
|
30
30
|
>
|
|
31
31
|
{/* Circle behind the checkbox */}
|
|
32
32
|
<div
|
|
33
|
-
className="absolute w-6 h-6 rounded-full group-hover:bg-light-action-selected dark:group-hover:bg-dark-action-selected
|
|
33
|
+
className="absolute w-6 h-6 rounded-full group-hover:bg-light-action-selected dark:group-hover:bg-dark-action-selected"
|
|
34
34
|
></div>
|
|
35
35
|
|
|
36
36
|
{/* Checkbox */}
|
|
@@ -39,7 +39,7 @@ export default function Checkbox({
|
|
|
39
39
|
isChecked
|
|
40
40
|
? 'bg-light-text-primary dark:bg-dark-text-primary border-none'
|
|
41
41
|
: 'border-light-text-secondary dark:border-dark-text-secondary'
|
|
42
|
-
} flex items-center justify-center
|
|
42
|
+
} flex items-center justify-center`}
|
|
43
43
|
>
|
|
44
44
|
{isChecked && (
|
|
45
45
|
<svg
|
|
@@ -81,7 +81,7 @@ export default function IconButton({
|
|
|
81
81
|
|
|
82
82
|
return (
|
|
83
83
|
<button
|
|
84
|
-
className={`${baseClasses} ${bgColor} ${iconColor} ${bgColorHover} ${stateClasses}`}
|
|
84
|
+
className={`${baseClasses} ${bgColor} ${iconColor} ${bgColorHover} ${stateClasses} transition-colors duration-200 ease-in-out`}
|
|
85
85
|
disabled={state === 'disabled'}
|
|
86
86
|
onMouseEnter={() => setIsHovered(true)}
|
|
87
87
|
onMouseLeave={() => setIsHovered(false)}
|
package/components/menuItem.tsx
CHANGED
|
@@ -51,7 +51,7 @@ export default function MenuItem({
|
|
|
51
51
|
<NextLink href={href}>
|
|
52
52
|
<div
|
|
53
53
|
className={`
|
|
54
|
-
flex items-center space-x-2 p-2 rounded-[8px] cursor-pointer justify-start
|
|
54
|
+
flex items-center space-x-2 p-2 rounded-[8px] cursor-pointer justify-start transition-colors duration-200 ease-in-out
|
|
55
55
|
${isSelected
|
|
56
56
|
? 'bg-light-background-accent200 dark:bg-dark-background-accent200 hover:bg-light-background-accent300 dark:hover:bg-dark-background-accent300'
|
|
57
57
|
: 'hover:bg-light-background-accent100 hover:dark:bg-dark-background-accent100'}
|
package/components/tab.tsx
CHANGED
|
@@ -64,7 +64,7 @@ export default function Tab({
|
|
|
64
64
|
return (
|
|
65
65
|
<div
|
|
66
66
|
className={`
|
|
67
|
-
flex items-center space-x-1 py-1 px-[6px] rounded-[8px] cursor-pointer justify-start transition-
|
|
67
|
+
flex items-center space-x-1 py-1 px-[6px] rounded-[8px] cursor-pointer justify-start transition-colors duration-200 ease-in-out
|
|
68
68
|
${isSelected
|
|
69
69
|
? 'bg-light-primary-dark dark:bg-dark-primary-dark text-light-text-contrast dark:text-dark-text-contrast'
|
|
70
70
|
: 'hover:bg-light-background-accent200 dark:hover:bg-dark-background-accent200'}
|
package/components/tag.tsx
CHANGED
|
@@ -68,7 +68,7 @@ export default function Tag({
|
|
|
68
68
|
className={`
|
|
69
69
|
flex items-center space-x-1 rounded-full
|
|
70
70
|
${sizeClasses} ${bgClasses} ${fontClasses} ${borderClasses} ${stateClasses} ${hoverClasses}
|
|
71
|
-
transition-colors duration-
|
|
71
|
+
transition-colors duration-200 ease-in-out
|
|
72
72
|
`}
|
|
73
73
|
onMouseEnter={() => setIsHovered(true)}
|
|
74
74
|
onMouseLeave={() => setIsHovered(false)}
|
package/components/textField.tsx
CHANGED
|
@@ -37,7 +37,7 @@ export default function TextField({
|
|
|
37
37
|
const [isFocused, setIsFocused] = useState(false);
|
|
38
38
|
|
|
39
39
|
const baseClasses = 'w-full border rounded-[8px] p-2';
|
|
40
|
-
const bgColor = 'bg-light-background-default dark:bg-dark-background-default transition-colors duration-
|
|
40
|
+
const bgColor = 'bg-light-background-default dark:bg-dark-background-default transition-colors duration-200 ease-in-out';
|
|
41
41
|
const borderColor = 'border-light-outlinedBorder-active dark:border-dark-outlinedBorder-active';
|
|
42
42
|
const containerClasses = `
|
|
43
43
|
${bgColor}
|
package/designTokens.js
CHANGED
|
@@ -18,7 +18,7 @@ export default function Checkbox(_a) {
|
|
|
18
18
|
{/* Checkbox */}
|
|
19
19
|
<div className={"relative z-10 w-4 h-4 border-2 rounded ".concat(isChecked
|
|
20
20
|
? 'bg-light-text-primary dark:bg-dark-text-primary border-none'
|
|
21
|
-
: 'border-light-text-secondary dark:border-dark-text-secondary', " flex items-center justify-center transition-colors")}>
|
|
21
|
+
: 'border-light-text-secondary dark:border-dark-text-secondary', " flex items-center justify-center transition-colors duration-200 ease-in-out")}>
|
|
22
22
|
{isChecked && (<svg className="w-3 h-3 text-light-text-contrast dark:text-dark-text-contrast" fill="none" stroke="currentColor" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">
|
|
23
23
|
<path strokeWidth="2" d="M1 6l4 3 6-7"/>
|
|
24
24
|
</svg>)}
|
package/dist/components/tab.jsx
CHANGED
|
@@ -99,7 +99,7 @@ export default function Tab(_a) {
|
|
|
99
99
|
router.push(href);
|
|
100
100
|
}
|
|
101
101
|
};
|
|
102
|
-
return (<div className={"\n flex items-center space-x-1 py-1 px-[6px] rounded-[8px] cursor-pointer justify-start transition-
|
|
102
|
+
return (<div className={"\n flex items-center space-x-1 py-1 px-[6px] rounded-[8px] cursor-pointer justify-start transition-colors duration-200 ease-in-outh\n ".concat(isSelected
|
|
103
103
|
? 'bg-light-primary-dark dark:bg-dark-primary-dark text-light-text-contrast dark:text-dark-text-contrast'
|
|
104
104
|
: 'hover:bg-light-background-accent200 dark:hover:bg-dark-background-accent200', "\n ")} onClick={handleClick}>
|
|
105
105
|
{IconLeft && <IconLeft className="w-6 h-6"/>}
|
package/dist/components/tag.jsx
CHANGED
|
@@ -36,7 +36,7 @@ export default function Tag(_a) {
|
|
|
36
36
|
var hoverClasses = variant === 'contained' && isHovered
|
|
37
37
|
? 'bg-light-background-accent200 dark:bg-dark-background-accent200'
|
|
38
38
|
: '';
|
|
39
|
-
return (<div className={"\n flex items-center space-x-1 rounded-full \n ".concat(sizeClasses, " ").concat(bgClasses, " ").concat(fontClasses, " ").concat(borderClasses, " ").concat(stateClasses, " ").concat(hoverClasses, "\n transition-colors duration-
|
|
39
|
+
return (<div className={"\n flex items-center space-x-1 rounded-full \n ".concat(sizeClasses, " ").concat(bgClasses, " ").concat(fontClasses, " ").concat(borderClasses, " ").concat(stateClasses, " ").concat(hoverClasses, "\n transition-colors duration-200 ease-in-out\n ")} onMouseEnter={function () { return setIsHovered(true); }} onMouseLeave={function () { return setIsHovered(false); }} onClick={onClick}>
|
|
40
40
|
{Icon && <Icon className="w-4 h-4"/>}
|
|
41
41
|
<span>{label}</span>
|
|
42
42
|
</div>);
|
|
@@ -5,7 +5,7 @@ export default function TextField(_a) {
|
|
|
5
5
|
iconLeft = _a.iconLeft, iconRight = _a.iconRight, _c = _a.multiline, multiline = _c === void 0 ? false : _c, _d = _a.maxRows, maxRows = _d === void 0 ? 6 : _d, _e = _a.disabled, disabled = _e === void 0 ? false : _e, _f = _a.error, error = _f === void 0 ? false : _f;
|
|
6
6
|
var _g = useState(false), isFocused = _g[0], setIsFocused = _g[1];
|
|
7
7
|
var baseClasses = 'w-full border rounded-[8px] p-2';
|
|
8
|
-
var bgColor = 'bg-light-background-default dark:bg-dark-background-default transition-colors duration-
|
|
8
|
+
var bgColor = 'bg-light-background-default dark:bg-dark-background-default transition-colors duration-200 ease-in-out';
|
|
9
9
|
var borderColor = 'border-light-outlinedBorder-active dark:border-dark-outlinedBorder-active';
|
|
10
10
|
var containerClasses = "\n ".concat(bgColor, "\n ").concat(borderColor, "\n ").concat(baseClasses, "\n ").concat(disabled ? 'bg-gray-200 cursor-not-allowed' : '', "\n ").concat(error ? 'border-red-500 focus:ring-red-500' : '', "\n ").concat(isFocused ? 'focus:border-light-accent-main focus:dark:border-dark-accent-main outline-none' : '', "\n ").concat(!disabled && !error ? 'hover:border-light-outlinedBorder-hover' : '', "\n border-gray-300\n ");
|
|
11
11
|
var renderIconRight = function () {
|
package/dist/designTokens.js
CHANGED