oneslash-design-system 1.1.7 → 1.1.9
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/iconButton.tsx +2 -2
- package/components/menuItem.tsx +1 -1
- package/components/modal.tsx +1 -1
- package/components/radioGroup.tsx +11 -27
- package/components/tab.tsx +3 -3
- package/package.json +1 -1
- package/tailwind.config.js +0 -2
|
@@ -49,8 +49,8 @@ export default function IconButton({
|
|
|
49
49
|
|
|
50
50
|
// padding, corner
|
|
51
51
|
const baseClasses = variant === 'contained'
|
|
52
|
-
? 'p-
|
|
53
|
-
: 'p-
|
|
52
|
+
? 'p-1 rounded-[8px] leading-none '
|
|
53
|
+
: 'p-1 rounded-[8px] leading-none ';
|
|
54
54
|
|
|
55
55
|
// bg color
|
|
56
56
|
const bgColor = variant === 'contained'
|
package/components/menuItem.tsx
CHANGED
package/components/modal.tsx
CHANGED
|
@@ -10,7 +10,6 @@ interface RadioGroupProps {
|
|
|
10
10
|
options: RadioOption[];
|
|
11
11
|
selectedValue: string;
|
|
12
12
|
onChange: (value: string) => void;
|
|
13
|
-
name: string;
|
|
14
13
|
direction?: 'horizontal' | 'vertical';
|
|
15
14
|
}
|
|
16
15
|
|
|
@@ -18,45 +17,30 @@ export default function RadioGroup({
|
|
|
18
17
|
options,
|
|
19
18
|
selectedValue,
|
|
20
19
|
onChange,
|
|
21
|
-
name,
|
|
22
20
|
direction = 'vertical',
|
|
23
21
|
}: RadioGroupProps) {
|
|
24
22
|
return (
|
|
25
23
|
<div
|
|
26
|
-
className={`flex ${
|
|
27
|
-
direction === 'horizontal' ? 'space-x-4' : 'flex-col space-y-2'
|
|
28
|
-
}`}
|
|
24
|
+
className={`flex ${ direction === 'horizontal' ? 'space-x-4' : 'flex-col space-y-2' }`}
|
|
29
25
|
>
|
|
30
26
|
{options.map((option) => (
|
|
31
27
|
<label
|
|
32
28
|
key={option.value}
|
|
33
29
|
className="flex items-center cursor-pointer"
|
|
30
|
+
onClick={() => onChange(option.value)}
|
|
34
31
|
>
|
|
32
|
+
{/* outer circle */}
|
|
35
33
|
<div
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
className={`relative flex justify-center items-center w-4 h-4 rounded-full border-2
|
|
35
|
+
${selectedValue === option.value
|
|
36
|
+
? 'border-light-text-primary dark:border-dark-text-primary'
|
|
37
|
+
: 'border-light-text-secondary dark:border-dark-text-secondary'}
|
|
38
|
+
`}
|
|
38
39
|
>
|
|
39
|
-
{/*
|
|
40
|
-
|
|
41
|
-
className=
|
|
42
|
-
hover:bg-light-action-hovered dark:group-hover:bg-dark-action-hovered
|
|
43
|
-
bg-transparent group-hover:w-7 group-hover:h-7`}
|
|
44
|
-
></div>
|
|
45
|
-
|
|
46
|
-
{/* Outer circle */}
|
|
47
|
-
<div
|
|
48
|
-
className={`relative z-10 w-4 h-4 border-2 rounded-full transition-colors
|
|
49
|
-
${selectedValue === option.value ? 'border-light-text-primary dark:border-dark-text-primary' : 'border-light-text-secondary dark:border-dark-text-secondary'}
|
|
50
|
-
`}
|
|
51
|
-
>
|
|
52
|
-
|
|
53
|
-
{/* Inner circle when selected */}
|
|
54
|
-
{selectedValue === option.value && (
|
|
55
|
-
<div
|
|
56
|
-
className="w-2 h-2 bg-light-text-primary dark:bg-dark-text-primary rounded-full absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2"
|
|
57
|
-
/>
|
|
40
|
+
{/* Inner circle */}
|
|
41
|
+
{selectedValue === option.value && (
|
|
42
|
+
<div className='absolute w-2 h-2 rounded-full bg-light-text-primary dark:bg-dark-text-primary'/>
|
|
58
43
|
)}
|
|
59
|
-
</div>
|
|
60
44
|
</div>
|
|
61
45
|
<span className="ml-2 text-body1">{option.label}</span>
|
|
62
46
|
</label>
|
package/components/tab.tsx
CHANGED
|
@@ -64,10 +64,10 @@ export default function Tab({
|
|
|
64
64
|
return (
|
|
65
65
|
<div
|
|
66
66
|
className={`
|
|
67
|
-
flex items-center space-x-2 p-
|
|
67
|
+
flex items-center space-x-2 p-1 rounded-[8px] cursor-pointer justify-start
|
|
68
68
|
${isSelected
|
|
69
|
-
? 'bg-light-primary-
|
|
70
|
-
: 'bg-
|
|
69
|
+
? 'bg-light-primary-dark dark:bg-dark-primary-dark text-light-text-contrast dark:text-dark-text-contrast'
|
|
70
|
+
: 'bg-transparent dark:bg-transparent hover:bg-light-background-accent200 dark:hover:bg-dark-background-accent200'}
|
|
71
71
|
`}
|
|
72
72
|
onClick={handleClick}
|
|
73
73
|
>
|
package/package.json
CHANGED