oneslash-design-system 1.1.14 → 1.1.16
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 +4 -4
- package/components/iconButton.tsx +54 -66
- package/components/menuItem.tsx +1 -1
- package/components/tabsContainer.tsx +1 -1
- package/components/tag.tsx +39 -67
- package/designTokens.js +3 -3
- package/dist/components/button.jsx +4 -4
- package/dist/components/iconButton.d.ts +6 -5
- package/dist/components/iconButton.jsx +47 -113
- package/dist/components/menuItem.jsx +1 -1
- package/dist/components/tabsContainer.jsx +1 -1
- package/dist/components/tag.d.ts +6 -8
- package/dist/components/tag.jsx +28 -108
- package/dist/designTokens.js +3 -3
- package/dist/output.css +40 -37
- package/package.json +3 -3
package/components/button.tsx
CHANGED
|
@@ -70,15 +70,15 @@ export default function Button({
|
|
|
70
70
|
// Define classes for button types
|
|
71
71
|
const baseTypeClasses = {
|
|
72
72
|
primary: 'bg-light-accent-main dark:bg-dark-accent-main text-light-text-primary dark:text-dark-text-contrast',
|
|
73
|
-
secondary: 'bg-light-
|
|
74
|
-
tertiary: 'bg-light-background-
|
|
73
|
+
secondary: 'bg-light-secondary-main dark:bg-dark-secondary-main text-light-text-primary dark:text-dark-text-primary',
|
|
74
|
+
tertiary: 'bg-light-background-accent100 dark:bg-dark-background-accent100 text-light-text-primary dark:text-dark-text-primary',
|
|
75
75
|
textOnly: 'text-light-text-primary dark:text-dark-text-primary',
|
|
76
76
|
}[type];
|
|
77
77
|
|
|
78
78
|
const hoverTypeClasses = {
|
|
79
79
|
primary: 'hover:bg-light-accent-dark hover:dark:bg-dark-accent-dark',
|
|
80
|
-
secondary: 'hover:bg-light-
|
|
81
|
-
tertiary: 'hover:bg-light-background-
|
|
80
|
+
secondary: 'hover:bg-light-secondary-dark dark:hover:bg-dark-secondary-dark',
|
|
81
|
+
tertiary: 'hover:bg-light-background-accent200 hover:dark:bg-dark-background-accent200',
|
|
82
82
|
textOnly: 'hover:bg-light-background-accent100 hover:dark:bg-dark-background-accent100',
|
|
83
83
|
}[type];
|
|
84
84
|
|
|
@@ -1,84 +1,74 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import React, { useState
|
|
3
|
-
import * as
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
|
+
import * as HeroIcons24 from '@heroicons/react/24/outline';
|
|
4
|
+
import * as HeroIcons20 from '@heroicons/react/20/solid';
|
|
4
5
|
|
|
5
|
-
interface IconButtonProps{
|
|
6
|
-
|
|
7
|
-
color: "primary" | "secondary";
|
|
6
|
+
interface IconButtonProps {
|
|
7
|
+
color: "primary" | "secondary" | "tertiary" | "iconOnly";
|
|
8
8
|
state: "enabled" | "selected" | "disabled";
|
|
9
|
-
|
|
9
|
+
size: "large" | "medium" | "small";
|
|
10
|
+
iconName: keyof typeof HeroIcons24 & keyof typeof HeroIcons20;
|
|
10
11
|
onClick?: any;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
type IconType = React.ComponentType<React.SVGProps<SVGSVGElement>>;
|
|
14
15
|
|
|
15
16
|
export default function IconButton({
|
|
16
|
-
variant,
|
|
17
17
|
color,
|
|
18
18
|
state,
|
|
19
|
+
size,
|
|
19
20
|
iconName,
|
|
20
|
-
|
|
21
|
+
onClick,
|
|
21
22
|
}: IconButtonProps) {
|
|
22
|
-
|
|
23
23
|
const [isHovered, setIsHovered] = useState(false);
|
|
24
|
-
const [Icon, setIcon] = useState<React.ComponentType<React.SVGProps<SVGSVGElement>> | null>(null);
|
|
25
|
-
|
|
26
|
-
// import icon
|
|
27
|
-
const loadIcon = useCallback(async (iconName?: string) => {
|
|
28
|
-
if (!iconName) return null;
|
|
29
|
-
try {
|
|
30
|
-
const module = await import('@heroicons/react/24/outline');
|
|
31
|
-
const Icon = module[iconName as keyof typeof module] as IconType;
|
|
32
|
-
return Icon || null;
|
|
33
|
-
} catch (error) {
|
|
34
|
-
console.error(`Failed to load icon ${iconName}:`, error);
|
|
35
|
-
return null;
|
|
36
|
-
}
|
|
37
|
-
}, []);
|
|
38
24
|
|
|
39
|
-
//
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
setIcon(await loadIcon(iconName));
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
fetchIcons();
|
|
47
|
-
}, [iconName, loadIcon]);
|
|
25
|
+
// Select icon based on size
|
|
26
|
+
const Icon: IconType = size === 'small'
|
|
27
|
+
? HeroIcons20[iconName]
|
|
28
|
+
: HeroIcons24[iconName];
|
|
48
29
|
|
|
30
|
+
// Size-based classes
|
|
31
|
+
const sizeClasses = {
|
|
32
|
+
large: 'p-2', // 8px padding
|
|
33
|
+
medium: 'p-1', // 4px padding
|
|
34
|
+
small: 'p-1', // 4px padding
|
|
35
|
+
};
|
|
49
36
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
: '
|
|
37
|
+
const iconSizeClasses = {
|
|
38
|
+
large: 'size-6', // 24px
|
|
39
|
+
medium: 'size-6', // 24px
|
|
40
|
+
small: 'size-5', // 20px
|
|
41
|
+
};
|
|
54
42
|
|
|
55
|
-
//
|
|
56
|
-
const
|
|
57
|
-
? color === 'primary'
|
|
58
|
-
? 'bg-light-primary-main dark:bg-dark-primary-main' // contained && primary
|
|
59
|
-
: 'bg-light-background-accent200 dark:bg-dark-background-accent200' // contained && secondary
|
|
60
|
-
: color === 'primary'
|
|
61
|
-
? ' ' // textOnly && primary
|
|
62
|
-
: ' '; // textOnly && secondary
|
|
43
|
+
// Base classes (padding and corner radius)
|
|
44
|
+
const baseClasses = `${sizeClasses[size]} rounded-[8px] leading-none`;
|
|
63
45
|
|
|
64
|
-
//
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
46
|
+
// Background color
|
|
47
|
+
const bgColor = color === 'primary'
|
|
48
|
+
? 'bg-light-accent-main dark:bg-dark-accent-main' // Primary
|
|
49
|
+
: color === 'secondary'
|
|
50
|
+
? 'bg-light-secondary-main dark:bg-dark-secondary-main' // Secondary
|
|
51
|
+
: color === 'tertiary'
|
|
52
|
+
? 'bg-light-background-accent100 dark:bg-dark-background-accent100' // Tertiary
|
|
53
|
+
: ' '; // iconOnly: none
|
|
72
54
|
|
|
73
|
-
//
|
|
74
|
-
const
|
|
75
|
-
?
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
: color === '
|
|
79
|
-
? '
|
|
80
|
-
: '
|
|
55
|
+
// Background hover color
|
|
56
|
+
const bgColorHover = color === 'primary'
|
|
57
|
+
? 'hover:bg-light-accent-dark hover:dark:bg-dark-accent-dark' // Primary
|
|
58
|
+
: color === 'secondary'
|
|
59
|
+
? 'hover:bg-light-secondary-dark hover:dark:bg-dark-secondary-dark' // Secondary
|
|
60
|
+
: color === 'tertiary'
|
|
61
|
+
? 'hover:bg-light-background-accent200 hover:dark:bg-dark-background-accent200' // Tertiary
|
|
62
|
+
: 'hover:bg-light-background-accent100 hover:dark:bg-dark-background-accent100'; // iconOnly
|
|
81
63
|
|
|
64
|
+
// Icon color
|
|
65
|
+
const iconColor = color === 'primary'
|
|
66
|
+
? 'text-light-text-primary dark:text-dark-text-contrast' // Primary
|
|
67
|
+
: color === 'secondary'
|
|
68
|
+
? 'text-light-text-primary dark:text-dark-text-primary' // Secondary
|
|
69
|
+
: color === 'tertiary'
|
|
70
|
+
? 'text-light-text-primary dark:text-dark-text-primary' // Tertiary
|
|
71
|
+
: 'text-light-text-primary dark:text-dark-text-primary'; // iconOnly
|
|
82
72
|
|
|
83
73
|
// state
|
|
84
74
|
const stateClasses = state === 'disabled'
|
|
@@ -89,17 +79,15 @@ export default function IconButton({
|
|
|
89
79
|
? 'cursor-pointer hover:bg-opacity-75'
|
|
90
80
|
: 'cursor-pointer';
|
|
91
81
|
|
|
92
|
-
|
|
93
|
-
|
|
94
82
|
return (
|
|
95
83
|
<button
|
|
96
|
-
className={`${baseClasses} ${bgColor} ${iconColor} ${bgColorHover} ${stateClasses}
|
|
84
|
+
className={`${baseClasses} ${bgColor} ${iconColor} ${bgColorHover} ${stateClasses}`}
|
|
97
85
|
disabled={state === 'disabled'}
|
|
98
86
|
onMouseEnter={() => setIsHovered(true)}
|
|
99
87
|
onMouseLeave={() => setIsHovered(false)}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
88
|
+
onClick={onClick}
|
|
89
|
+
>
|
|
90
|
+
{Icon && <Icon className={iconSizeClasses[size]} />}
|
|
103
91
|
</button>
|
|
104
92
|
);
|
|
105
93
|
}
|
package/components/menuItem.tsx
CHANGED
|
@@ -70,7 +70,7 @@ export default function MenuItem({
|
|
|
70
70
|
)}
|
|
71
71
|
|
|
72
72
|
{/* label */}
|
|
73
|
-
<span className="whitespace-nowrap text-body1 px-2 text-light-text-
|
|
73
|
+
<span className="whitespace-nowrap text-body1 px-2 text-light-text-secondary dark:text-dark-text-secondary">
|
|
74
74
|
{label}
|
|
75
75
|
</span>
|
|
76
76
|
</div>
|
|
@@ -14,7 +14,7 @@ export default function TabsContainer({
|
|
|
14
14
|
<div
|
|
15
15
|
className={`
|
|
16
16
|
flex space-x-2 p-1 rounded-[12px]
|
|
17
|
-
${tabCount > 0 ? 'bg-light-background-
|
|
17
|
+
${tabCount > 0 ? 'bg-light-background-accent100 dark:bg-dark-background-accent100' : 'bg-transparent'}
|
|
18
18
|
`}
|
|
19
19
|
>
|
|
20
20
|
{children}
|
package/components/tag.tsx
CHANGED
|
@@ -1,109 +1,81 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import React, { useState, useEffect
|
|
2
|
+
import React, { useState, useEffect } from 'react';
|
|
3
3
|
import * as HeroIcons from '@heroicons/react/24/outline';
|
|
4
4
|
|
|
5
|
-
interface TagProps{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
label: any;
|
|
5
|
+
interface TagProps {
|
|
6
|
+
variant: 'contained' | 'textOnly';
|
|
7
|
+
size: 'medium' | 'small';
|
|
8
|
+
state?: 'enabled' | 'selected';
|
|
9
|
+
label: string;
|
|
11
10
|
iconName?: keyof typeof HeroIcons;
|
|
12
|
-
|
|
13
|
-
onClick?: any;
|
|
11
|
+
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
14
12
|
color?: 'default' | 'info';
|
|
15
13
|
}
|
|
16
14
|
|
|
17
15
|
type IconType = React.ComponentType<React.SVGProps<SVGSVGElement>>;
|
|
18
16
|
|
|
19
17
|
export default function Tag({
|
|
20
|
-
key,
|
|
21
18
|
variant,
|
|
22
19
|
size,
|
|
23
|
-
state,
|
|
20
|
+
state = 'enabled',
|
|
24
21
|
label,
|
|
25
22
|
iconName,
|
|
26
|
-
isDeletable,
|
|
27
23
|
onClick,
|
|
28
24
|
color = 'default',
|
|
29
|
-
}: TagProps) {
|
|
25
|
+
}: TagProps): JSX.Element {
|
|
30
26
|
const [isHovered, setIsHovered] = useState(false);
|
|
31
27
|
const [Icon, setIcon] = useState<IconType | null>(null);
|
|
32
|
-
const [DeleteIcon, setDeleteIcon] = useState<IconType | null>(null);
|
|
33
|
-
|
|
34
|
-
const loadIcon = useCallback(async (iconName?: string) => {
|
|
35
|
-
if (!iconName) return null;
|
|
36
|
-
try {
|
|
37
|
-
const module = await import('@heroicons/react/24/outline');
|
|
38
|
-
const Icon = module[iconName as keyof typeof module] as IconType;
|
|
39
|
-
return Icon || null;
|
|
40
|
-
} catch (error) {
|
|
41
|
-
console.error(`Failed to load icon ${iconName}:`, error);
|
|
42
|
-
return null;
|
|
43
|
-
}
|
|
44
|
-
}, []);
|
|
45
28
|
|
|
29
|
+
// Load icon directly from HeroIcons
|
|
46
30
|
useEffect(() => {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
if (typeof isDeletable === 'string') {
|
|
52
|
-
setDeleteIcon(await loadIcon(isDeletable));
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
fetchIcons();
|
|
56
|
-
}, [iconName, isDeletable, loadIcon]);
|
|
31
|
+
if (iconName) {
|
|
32
|
+
setIcon(HeroIcons[iconName] as IconType);
|
|
33
|
+
}
|
|
34
|
+
}, [iconName]);
|
|
57
35
|
|
|
58
|
-
//
|
|
36
|
+
// Size and padding
|
|
59
37
|
const sizeClasses = size === 'medium' ? 'text-body2 px-2 py-1' : 'text-caption px-2 py-[3px]';
|
|
60
38
|
|
|
61
|
-
|
|
62
|
-
// bg color
|
|
39
|
+
// Background color
|
|
63
40
|
const bgClasses = variant === 'contained'
|
|
64
41
|
? (color === 'info'
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
: '';
|
|
42
|
+
? 'bg-light-info-main dark:bg-dark-info-main'
|
|
43
|
+
: 'bg-light-background-accent300 dark:bg-dark-background-accent300')
|
|
44
|
+
: '';
|
|
68
45
|
|
|
69
|
-
//
|
|
46
|
+
// Font color
|
|
70
47
|
const fontClasses = variant === 'textOnly'
|
|
71
48
|
? (color === 'info'
|
|
72
|
-
? 'text-light-info-main dark:text-dark-info-main'
|
|
73
|
-
: 'text-light-text-primary dark:text-dark-text-primary')
|
|
74
|
-
: 'text-light-text-primary dark:text-dark-text-primary';
|
|
49
|
+
? 'text-light-info-main dark:text-dark-info-main'
|
|
50
|
+
: 'text-light-text-primary dark:text-dark-text-primary')
|
|
51
|
+
: 'text-light-text-primary dark:text-dark-text-primary';
|
|
75
52
|
|
|
76
|
-
//
|
|
77
|
-
const
|
|
78
|
-
? '
|
|
79
|
-
: '
|
|
53
|
+
// Border for contained variant
|
|
54
|
+
const borderClasses = variant === 'contained'
|
|
55
|
+
? 'border border-light-misc-divider dark:border-dark-misc-divider'
|
|
56
|
+
: '';
|
|
80
57
|
|
|
81
|
-
// hover
|
|
82
|
-
const
|
|
58
|
+
// State and hover
|
|
59
|
+
const stateClasses = state === 'selected'
|
|
60
|
+
? 'bg-light-accent-main dark:bg-dark-accent-main text-white'
|
|
61
|
+
: 'cursor-pointer';
|
|
62
|
+
const hoverClasses = variant === 'contained' && isHovered
|
|
63
|
+
? 'bg-light-background-accent200 dark:bg-dark-background-accent200'
|
|
64
|
+
: '';
|
|
83
65
|
|
|
84
66
|
return (
|
|
85
67
|
<div
|
|
86
|
-
className={`
|
|
87
|
-
|
|
88
|
-
|
|
68
|
+
className={`
|
|
69
|
+
flex items-center space-x-1 rounded-full
|
|
70
|
+
${sizeClasses} ${bgClasses} ${fontClasses} ${borderClasses} ${stateClasses} ${hoverClasses}
|
|
71
|
+
transition-colors duration-300 ease-in-out
|
|
72
|
+
`}
|
|
89
73
|
onMouseEnter={() => setIsHovered(true)}
|
|
90
74
|
onMouseLeave={() => setIsHovered(false)}
|
|
91
75
|
onClick={onClick}
|
|
92
76
|
>
|
|
93
77
|
{Icon && <Icon className="w-4 h-4" />}
|
|
94
78
|
<span>{label}</span>
|
|
95
|
-
{isDeletable && (
|
|
96
|
-
<button
|
|
97
|
-
className="ml-2 text-red-500"
|
|
98
|
-
onClick={(e) => {
|
|
99
|
-
e.stopPropagation();
|
|
100
|
-
// Handle delete action
|
|
101
|
-
}}
|
|
102
|
-
>
|
|
103
|
-
{DeleteIcon && <DeleteIcon className="w-4 h-4" />}
|
|
104
|
-
</button>
|
|
105
|
-
|
|
106
|
-
)}
|
|
107
79
|
</div>
|
|
108
80
|
);
|
|
109
81
|
}
|
package/designTokens.js
CHANGED
|
@@ -106,14 +106,14 @@ export default function Button(_a) {
|
|
|
106
106
|
// Define classes for button types
|
|
107
107
|
var baseTypeClasses = {
|
|
108
108
|
primary: 'bg-light-accent-main dark:bg-dark-accent-main text-light-text-primary dark:text-dark-text-contrast',
|
|
109
|
-
secondary: 'bg-light-
|
|
110
|
-
tertiary: 'bg-light-background-
|
|
109
|
+
secondary: 'bg-light-secondary-main dark:bg-dark-secondary-main text-light-text-primary dark:text-dark-text-primary',
|
|
110
|
+
tertiary: 'bg-light-background-accent100 dark:bg-dark-background-accent100 text-light-text-primary dark:text-dark-text-primary',
|
|
111
111
|
textOnly: 'text-light-text-primary dark:text-dark-text-primary',
|
|
112
112
|
}[type];
|
|
113
113
|
var hoverTypeClasses = {
|
|
114
114
|
primary: 'hover:bg-light-accent-dark hover:dark:bg-dark-accent-dark',
|
|
115
|
-
secondary: 'hover:bg-light-
|
|
116
|
-
tertiary: 'hover:bg-light-background-
|
|
115
|
+
secondary: 'hover:bg-light-secondary-dark dark:hover:bg-dark-secondary-dark',
|
|
116
|
+
tertiary: 'hover:bg-light-background-accent200 hover:dark:bg-dark-background-accent200',
|
|
117
117
|
textOnly: 'hover:bg-light-background-accent100 hover:dark:bg-dark-background-accent100',
|
|
118
118
|
}[type];
|
|
119
119
|
// State classes
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import * as
|
|
2
|
+
import * as HeroIcons24 from '@heroicons/react/24/outline';
|
|
3
|
+
import * as HeroIcons20 from '@heroicons/react/20/solid';
|
|
3
4
|
interface IconButtonProps {
|
|
4
|
-
|
|
5
|
-
color: "primary" | "secondary";
|
|
5
|
+
color: "primary" | "secondary" | "tertiary" | "iconOnly";
|
|
6
6
|
state: "enabled" | "selected" | "disabled";
|
|
7
|
-
|
|
7
|
+
size: "large" | "medium" | "small";
|
|
8
|
+
iconName: keyof typeof HeroIcons24 & keyof typeof HeroIcons20;
|
|
8
9
|
onClick?: any;
|
|
9
10
|
}
|
|
10
|
-
export default function IconButton({
|
|
11
|
+
export default function IconButton({ color, state, size, iconName, onClick, }: IconButtonProps): React.JSX.Element;
|
|
11
12
|
export {};
|
|
@@ -1,117 +1,51 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
import React, { useState, useEffect, useCallback } from 'react';
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
|
+
import * as HeroIcons24 from '@heroicons/react/24/outline';
|
|
4
|
+
import * as HeroIcons20 from '@heroicons/react/20/solid';
|
|
39
5
|
export default function IconButton(_a) {
|
|
40
|
-
var
|
|
41
|
-
var variant = _a.variant, color = _a.color, state = _a.state, iconName = _a.iconName, onClick = _a.onClick;
|
|
6
|
+
var color = _a.color, state = _a.state, size = _a.size, iconName = _a.iconName, onClick = _a.onClick;
|
|
42
7
|
var _b = useState(false), isHovered = _b[0], setIsHovered = _b[1];
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
//
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}); };
|
|
85
|
-
fetchIcons();
|
|
86
|
-
}, [iconName, loadIcon]);
|
|
87
|
-
// padding, corner
|
|
88
|
-
var baseClasses = variant === 'contained'
|
|
89
|
-
? 'p-2 rounded-[8px] leading-none '
|
|
90
|
-
: 'p-2 rounded-[8px] leading-none ';
|
|
91
|
-
// bg color
|
|
92
|
-
var bgColor = variant === 'contained'
|
|
93
|
-
? color === 'primary'
|
|
94
|
-
? 'bg-light-primary-main dark:bg-dark-primary-main' // contained && primary
|
|
95
|
-
: 'bg-light-background-accent200 dark:bg-dark-background-accent200' // contained && secondary
|
|
96
|
-
: color === 'primary'
|
|
97
|
-
? ' ' // textOnly && primary
|
|
98
|
-
: ' '; // textOnly && secondary
|
|
99
|
-
// bg color hover
|
|
100
|
-
var bgColorHover = variant === 'contained'
|
|
101
|
-
? color === 'primary'
|
|
102
|
-
? 'hover:bg-light-primary-dark hover:dark:bg-dark-primary-dark' // contained && primary
|
|
103
|
-
: 'hover:bg-light-background-accent300 hover:dark:bg-dark-background-accent300' // contained && secondary
|
|
104
|
-
: color === 'primary'
|
|
105
|
-
? 'hover:bg-light-action-hover hover:dark:bg-dark-action-hover' // textOnly && primary
|
|
106
|
-
: 'hover:bg-light-action-hover hover:dark:bg-dark-action-hover'; // textOnly && secondary
|
|
107
|
-
// icon color
|
|
108
|
-
var iconColor = variant === 'contained'
|
|
109
|
-
? color === 'primary'
|
|
110
|
-
? 'text-light-primary-contrast dark:text-dark-primary-contrast' // contained && primary
|
|
111
|
-
: 'text-light-text-primary dark:text-dark-text-primary' // contained && secondary
|
|
112
|
-
: color === 'primary'
|
|
113
|
-
? ' text-light-text-primary dark:text-dark-text-primary' // textOnly && primary
|
|
114
|
-
: ' text-light-text-primary dark:text-dark-text-primary'; // textOnly && secondary
|
|
8
|
+
// Select icon based on size
|
|
9
|
+
var Icon = size === 'small'
|
|
10
|
+
? HeroIcons20[iconName]
|
|
11
|
+
: HeroIcons24[iconName];
|
|
12
|
+
// Size-based classes
|
|
13
|
+
var sizeClasses = {
|
|
14
|
+
large: 'p-2', // 8px padding
|
|
15
|
+
medium: 'p-1', // 4px padding
|
|
16
|
+
small: 'p-1', // 4px padding
|
|
17
|
+
};
|
|
18
|
+
var iconSizeClasses = {
|
|
19
|
+
large: 'size-6', // 24px
|
|
20
|
+
medium: 'size-6', // 24px
|
|
21
|
+
small: 'size-5', // 20px
|
|
22
|
+
};
|
|
23
|
+
// Base classes (padding and corner radius)
|
|
24
|
+
var baseClasses = "".concat(sizeClasses[size], " rounded-[8px] leading-none");
|
|
25
|
+
// Background color
|
|
26
|
+
var bgColor = color === 'primary'
|
|
27
|
+
? 'bg-light-accent-main dark:bg-dark-accent-main' // Primary
|
|
28
|
+
: color === 'secondary'
|
|
29
|
+
? 'bg-light-secondary-main dark:bg-dark-secondary-main' // Secondary
|
|
30
|
+
: color === 'tertiary'
|
|
31
|
+
? 'bg-light-background-accent100 dark:bg-dark-background-accent100' // Tertiary
|
|
32
|
+
: ' '; // iconOnly: none
|
|
33
|
+
// Background hover color
|
|
34
|
+
var bgColorHover = color === 'primary'
|
|
35
|
+
? 'hover:bg-light-accent-dark hover:dark:bg-dark-accent-dark' // Primary
|
|
36
|
+
: color === 'secondary'
|
|
37
|
+
? 'hover:bg-light-secondary-dark hover:dark:bg-dark-secondary-dark' // Secondary
|
|
38
|
+
: color === 'tertiary'
|
|
39
|
+
? 'hover:bg-light-background-accent200 hover:dark:bg-dark-background-accent200' // Tertiary
|
|
40
|
+
: 'hover:bg-light-background-accent100 hover:dark:bg-dark-background-accent100'; // iconOnly
|
|
41
|
+
// Icon color
|
|
42
|
+
var iconColor = color === 'primary'
|
|
43
|
+
? 'text-light-text-primary dark:text-dark-text-contrast' // Primary
|
|
44
|
+
: color === 'secondary'
|
|
45
|
+
? 'text-light-text-primary dark:text-dark-text-primary' // Secondary
|
|
46
|
+
: color === 'tertiary'
|
|
47
|
+
? 'text-light-text-primary dark:text-dark-text-primary' // Tertiary
|
|
48
|
+
: 'text-light-text-primary dark:text-dark-text-primary'; // iconOnly
|
|
115
49
|
// state
|
|
116
50
|
var stateClasses = state === 'disabled'
|
|
117
51
|
? 'cursor-not-allowed opacity-50'
|
|
@@ -120,7 +54,7 @@ export default function IconButton(_a) {
|
|
|
120
54
|
: isHovered
|
|
121
55
|
? 'cursor-pointer hover:bg-opacity-75'
|
|
122
56
|
: 'cursor-pointer';
|
|
123
|
-
return (<button className={"".concat(baseClasses, " ").concat(bgColor, " ").concat(iconColor, " ").concat(bgColorHover, " ").concat(stateClasses
|
|
124
|
-
|
|
57
|
+
return (<button className={"".concat(baseClasses, " ").concat(bgColor, " ").concat(iconColor, " ").concat(bgColorHover, " ").concat(stateClasses)} disabled={state === 'disabled'} onMouseEnter={function () { return setIsHovered(true); }} onMouseLeave={function () { return setIsHovered(false); }} onClick={onClick}>
|
|
58
|
+
{Icon && <Icon className={iconSizeClasses[size]}/>}
|
|
125
59
|
</button>);
|
|
126
60
|
}
|
|
@@ -92,7 +92,7 @@ export default function MenuItem(_a) {
|
|
|
92
92
|
{userImgUrl || userHandle ? (<UserImage userHandle={userHandle || ''} userImgUrl={userImgUrl || ''}/>) : (IconLeft && <IconLeft className="w-6 h-6"/>)}
|
|
93
93
|
|
|
94
94
|
{/* label */}
|
|
95
|
-
<span className="whitespace-nowrap text-body1 px-2 text-light-text-
|
|
95
|
+
<span className="whitespace-nowrap text-body1 px-2 text-light-text-secondary dark:text-dark-text-secondary">
|
|
96
96
|
{label}
|
|
97
97
|
</span>
|
|
98
98
|
</div>
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
export default function TabsContainer(_a) {
|
|
4
4
|
var children = _a.children;
|
|
5
5
|
var tabCount = React.Children.count(children);
|
|
6
|
-
return (<div className={"\n flex space-x-2 p-1 rounded-[12px]\n ".concat(tabCount > 0 ? 'bg-light-background-
|
|
6
|
+
return (<div className={"\n flex space-x-2 p-1 rounded-[12px]\n ".concat(tabCount > 0 ? 'bg-light-background-accent100 dark:bg-dark-background-accent100' : 'bg-transparent', "\n ")}>
|
|
7
7
|
{children}
|
|
8
8
|
</div>);
|
|
9
9
|
}
|
package/dist/components/tag.d.ts
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import * as HeroIcons from '@heroicons/react/24/outline';
|
|
3
3
|
interface TagProps {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
label: any;
|
|
4
|
+
variant: 'contained' | 'textOnly';
|
|
5
|
+
size: 'medium' | 'small';
|
|
6
|
+
state?: 'enabled' | 'selected';
|
|
7
|
+
label: string;
|
|
9
8
|
iconName?: keyof typeof HeroIcons;
|
|
10
|
-
|
|
11
|
-
onClick?: any;
|
|
9
|
+
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
12
10
|
color?: 'default' | 'info';
|
|
13
11
|
}
|
|
14
|
-
export default function Tag({
|
|
12
|
+
export default function Tag({ variant, size, state, label, iconName, onClick, color, }: TagProps): JSX.Element;
|
|
15
13
|
export {};
|
package/dist/components/tag.jsx
CHANGED
|
@@ -1,123 +1,43 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
import React, { useState, useEffect, useCallback } from 'react';
|
|
2
|
+
import React, { useState, useEffect } from 'react';
|
|
3
|
+
import * as HeroIcons from '@heroicons/react/24/outline';
|
|
39
4
|
export default function Tag(_a) {
|
|
40
|
-
var
|
|
41
|
-
var
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
var _e = useState(null), DeleteIcon = _e[0], setDeleteIcon = _e[1];
|
|
45
|
-
var loadIcon = useCallback(function (iconName) { return __awaiter(_this, void 0, void 0, function () {
|
|
46
|
-
var module_1, Icon_1, error_1;
|
|
47
|
-
return __generator(this, function (_a) {
|
|
48
|
-
switch (_a.label) {
|
|
49
|
-
case 0:
|
|
50
|
-
if (!iconName)
|
|
51
|
-
return [2 /*return*/, null];
|
|
52
|
-
_a.label = 1;
|
|
53
|
-
case 1:
|
|
54
|
-
_a.trys.push([1, 3, , 4]);
|
|
55
|
-
return [4 /*yield*/, import('@heroicons/react/24/outline')];
|
|
56
|
-
case 2:
|
|
57
|
-
module_1 = _a.sent();
|
|
58
|
-
Icon_1 = module_1[iconName];
|
|
59
|
-
return [2 /*return*/, Icon_1 || null];
|
|
60
|
-
case 3:
|
|
61
|
-
error_1 = _a.sent();
|
|
62
|
-
console.error("Failed to load icon ".concat(iconName, ":"), error_1);
|
|
63
|
-
return [2 /*return*/, null];
|
|
64
|
-
case 4: return [2 /*return*/];
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
}); }, []);
|
|
5
|
+
var variant = _a.variant, size = _a.size, _b = _a.state, state = _b === void 0 ? 'enabled' : _b, label = _a.label, iconName = _a.iconName, onClick = _a.onClick, _c = _a.color, color = _c === void 0 ? 'default' : _c;
|
|
6
|
+
var _d = useState(false), isHovered = _d[0], setIsHovered = _d[1];
|
|
7
|
+
var _e = useState(null), Icon = _e[0], setIcon = _e[1];
|
|
8
|
+
// Load icon directly from HeroIcons
|
|
68
9
|
useEffect(function () {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
if (!(typeof iconName === 'string')) return [3 /*break*/, 2];
|
|
75
|
-
_a = setIcon;
|
|
76
|
-
return [4 /*yield*/, loadIcon(iconName)];
|
|
77
|
-
case 1:
|
|
78
|
-
_a.apply(void 0, [_c.sent()]);
|
|
79
|
-
_c.label = 2;
|
|
80
|
-
case 2:
|
|
81
|
-
if (!(typeof isDeletable === 'string')) return [3 /*break*/, 4];
|
|
82
|
-
_b = setDeleteIcon;
|
|
83
|
-
return [4 /*yield*/, loadIcon(isDeletable)];
|
|
84
|
-
case 3:
|
|
85
|
-
_b.apply(void 0, [_c.sent()]);
|
|
86
|
-
_c.label = 4;
|
|
87
|
-
case 4: return [2 /*return*/];
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
}); };
|
|
91
|
-
fetchIcons();
|
|
92
|
-
}, [iconName, isDeletable, loadIcon]);
|
|
93
|
-
// size and padding
|
|
10
|
+
if (iconName) {
|
|
11
|
+
setIcon(HeroIcons[iconName]);
|
|
12
|
+
}
|
|
13
|
+
}, [iconName]);
|
|
14
|
+
// Size and padding
|
|
94
15
|
var sizeClasses = size === 'medium' ? 'text-body2 px-2 py-1' : 'text-caption px-2 py-[3px]';
|
|
95
|
-
//
|
|
16
|
+
// Background color
|
|
96
17
|
var bgClasses = variant === 'contained'
|
|
97
18
|
? (color === 'info'
|
|
98
|
-
? 'bg-light-info-main dark:bg-dark-info-main'
|
|
99
|
-
: 'bg-light-background-
|
|
100
|
-
: '';
|
|
101
|
-
//
|
|
19
|
+
? 'bg-light-info-main dark:bg-dark-info-main'
|
|
20
|
+
: 'bg-light-background-accent300 dark:bg-dark-background-accent300')
|
|
21
|
+
: '';
|
|
22
|
+
// Font color
|
|
102
23
|
var fontClasses = variant === 'textOnly'
|
|
103
24
|
? (color === 'info'
|
|
104
|
-
? 'text-light-info-main dark:text-dark-info-main'
|
|
105
|
-
: 'text-light-text-primary dark:text-dark-text-primary')
|
|
106
|
-
: 'text-light-text-primary dark:text-dark-text-primary';
|
|
107
|
-
//
|
|
25
|
+
? 'text-light-info-main dark:text-dark-info-main'
|
|
26
|
+
: 'text-light-text-primary dark:text-dark-text-primary')
|
|
27
|
+
: 'text-light-text-primary dark:text-dark-text-primary';
|
|
28
|
+
// Border for contained variant
|
|
29
|
+
var borderClasses = variant === 'contained'
|
|
30
|
+
? 'border border-light-misc-divider dark:border-dark-misc-divider'
|
|
31
|
+
: '';
|
|
32
|
+
// State and hover
|
|
108
33
|
var stateClasses = state === 'selected'
|
|
109
34
|
? 'bg-light-accent-main dark:bg-dark-accent-main text-white'
|
|
110
35
|
: 'cursor-pointer';
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
36
|
+
var hoverClasses = variant === 'contained' && isHovered
|
|
37
|
+
? 'bg-light-background-accent200 dark:bg-dark-background-accent200'
|
|
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-300 ease-in-out\n ")} onMouseEnter={function () { return setIsHovered(true); }} onMouseLeave={function () { return setIsHovered(false); }} onClick={onClick}>
|
|
114
40
|
{Icon && <Icon className="w-4 h-4"/>}
|
|
115
41
|
<span>{label}</span>
|
|
116
|
-
{isDeletable && (<button className="ml-2 text-red-500" onClick={function (e) {
|
|
117
|
-
e.stopPropagation();
|
|
118
|
-
// Handle delete action
|
|
119
|
-
}}>
|
|
120
|
-
{DeleteIcon && <DeleteIcon className="w-4 h-4"/>}
|
|
121
|
-
</button>)}
|
|
122
42
|
</div>);
|
|
123
43
|
}
|
package/dist/designTokens.js
CHANGED
|
@@ -47,9 +47,9 @@ module.exports = {
|
|
|
47
47
|
light: '#67C16B',
|
|
48
48
|
},
|
|
49
49
|
background: {
|
|
50
|
-
default: '#
|
|
51
|
-
accent100: '#
|
|
52
|
-
accent200: '#
|
|
50
|
+
default: '#e8e8e8',
|
|
51
|
+
accent100: '#f1f1f1',
|
|
52
|
+
accent200: '#f7f7f7',
|
|
53
53
|
accent300: '#FFFFFF',
|
|
54
54
|
},
|
|
55
55
|
action: {
|
package/dist/output.css
CHANGED
|
@@ -556,6 +556,10 @@ video {
|
|
|
556
556
|
.flex {
|
|
557
557
|
display: flex;
|
|
558
558
|
}
|
|
559
|
+
.size-5 {
|
|
560
|
+
width: 1.25rem;
|
|
561
|
+
height: 1.25rem;
|
|
562
|
+
}
|
|
559
563
|
.size-6 {
|
|
560
564
|
width: 1.5rem;
|
|
561
565
|
height: 1.5rem;
|
|
@@ -727,6 +731,10 @@ video {
|
|
|
727
731
|
--tw-border-opacity: 1;
|
|
728
732
|
border-color: rgb(238 174 3 / var(--tw-border-opacity));
|
|
729
733
|
}
|
|
734
|
+
.border-light-misc-divider {
|
|
735
|
+
--tw-border-opacity: 1;
|
|
736
|
+
border-color: rgb(209 209 209 / var(--tw-border-opacity));
|
|
737
|
+
}
|
|
730
738
|
.border-light-text-primary {
|
|
731
739
|
--tw-border-opacity: 1;
|
|
732
740
|
border-color: rgb(0 0 0 / var(--tw-border-opacity));
|
|
@@ -764,15 +772,19 @@ video {
|
|
|
764
772
|
}
|
|
765
773
|
.bg-light-background-accent100 {
|
|
766
774
|
--tw-bg-opacity: 1;
|
|
767
|
-
background-color: rgb(
|
|
775
|
+
background-color: rgb(241 241 241 / var(--tw-bg-opacity));
|
|
768
776
|
}
|
|
769
777
|
.bg-light-background-accent200 {
|
|
770
778
|
--tw-bg-opacity: 1;
|
|
771
|
-
background-color: rgb(
|
|
779
|
+
background-color: rgb(247 247 247 / var(--tw-bg-opacity));
|
|
780
|
+
}
|
|
781
|
+
.bg-light-background-accent300 {
|
|
782
|
+
--tw-bg-opacity: 1;
|
|
783
|
+
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
|
|
772
784
|
}
|
|
773
785
|
.bg-light-background-default {
|
|
774
786
|
--tw-bg-opacity: 1;
|
|
775
|
-
background-color: rgb(
|
|
787
|
+
background-color: rgb(232 232 232 / var(--tw-bg-opacity));
|
|
776
788
|
}
|
|
777
789
|
.bg-light-error-main {
|
|
778
790
|
--tw-bg-opacity: 1;
|
|
@@ -786,9 +798,9 @@ video {
|
|
|
786
798
|
--tw-bg-opacity: 1;
|
|
787
799
|
background-color: rgb(38 38 38 / var(--tw-bg-opacity));
|
|
788
800
|
}
|
|
789
|
-
.bg-light-
|
|
801
|
+
.bg-light-secondary-main {
|
|
790
802
|
--tw-bg-opacity: 1;
|
|
791
|
-
background-color: rgb(
|
|
803
|
+
background-color: rgb(176 176 176 / var(--tw-bg-opacity));
|
|
792
804
|
}
|
|
793
805
|
.bg-light-success-main {
|
|
794
806
|
--tw-bg-opacity: 1;
|
|
@@ -902,10 +914,6 @@ video {
|
|
|
902
914
|
--tw-text-opacity: 1;
|
|
903
915
|
color: rgb(109 109 109 / var(--tw-text-opacity));
|
|
904
916
|
}
|
|
905
|
-
.text-red-500 {
|
|
906
|
-
--tw-text-opacity: 1;
|
|
907
|
-
color: rgb(239 68 68 / var(--tw-text-opacity));
|
|
908
|
-
}
|
|
909
917
|
.text-white {
|
|
910
918
|
--tw-text-opacity: 1;
|
|
911
919
|
color: rgb(255 255 255 / var(--tw-text-opacity));
|
|
@@ -942,7 +950,7 @@ video {
|
|
|
942
950
|
--tw-ring-offset-width: 4px;
|
|
943
951
|
}
|
|
944
952
|
.ring-offset-light-background-default {
|
|
945
|
-
--tw-ring-offset-color: #
|
|
953
|
+
--tw-ring-offset-color: #e8e8e8;
|
|
946
954
|
}
|
|
947
955
|
.blur {
|
|
948
956
|
--tw-blur: blur(8px);
|
|
@@ -975,29 +983,19 @@ body {
|
|
|
975
983
|
background-color: rgb(227 227 227 / var(--tw-bg-opacity));
|
|
976
984
|
}
|
|
977
985
|
|
|
978
|
-
.hover\:bg-dark-background-accent300:hover {
|
|
979
|
-
--tw-bg-opacity: 1;
|
|
980
|
-
background-color: rgb(79 79 79 / var(--tw-bg-opacity));
|
|
981
|
-
}
|
|
982
|
-
|
|
983
986
|
.hover\:bg-light-accent-dark:hover {
|
|
984
987
|
--tw-bg-opacity: 1;
|
|
985
988
|
background-color: rgb(206 134 2 / var(--tw-bg-opacity));
|
|
986
989
|
}
|
|
987
990
|
|
|
988
|
-
.hover\:bg-light-action-hover:hover {
|
|
989
|
-
--tw-bg-opacity: 1;
|
|
990
|
-
background-color: rgb(243 243 243 / var(--tw-bg-opacity));
|
|
991
|
-
}
|
|
992
|
-
|
|
993
991
|
.hover\:bg-light-background-accent100:hover {
|
|
994
992
|
--tw-bg-opacity: 1;
|
|
995
|
-
background-color: rgb(
|
|
993
|
+
background-color: rgb(241 241 241 / var(--tw-bg-opacity));
|
|
996
994
|
}
|
|
997
995
|
|
|
998
996
|
.hover\:bg-light-background-accent200:hover {
|
|
999
997
|
--tw-bg-opacity: 1;
|
|
1000
|
-
background-color: rgb(
|
|
998
|
+
background-color: rgb(247 247 247 / var(--tw-bg-opacity));
|
|
1001
999
|
}
|
|
1002
1000
|
|
|
1003
1001
|
.hover\:bg-light-background-accent300:hover {
|
|
@@ -1005,9 +1003,9 @@ body {
|
|
|
1005
1003
|
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
|
|
1006
1004
|
}
|
|
1007
1005
|
|
|
1008
|
-
.hover\:bg-light-
|
|
1006
|
+
.hover\:bg-light-secondary-dark:hover {
|
|
1009
1007
|
--tw-bg-opacity: 1;
|
|
1010
|
-
background-color: rgb(
|
|
1008
|
+
background-color: rgb(136 136 136 / var(--tw-bg-opacity));
|
|
1011
1009
|
}
|
|
1012
1010
|
|
|
1013
1011
|
.hover\:bg-opacity-75:hover {
|
|
@@ -1026,6 +1024,11 @@ body {
|
|
|
1026
1024
|
|
|
1027
1025
|
@media (prefers-color-scheme: dark) {
|
|
1028
1026
|
|
|
1027
|
+
.dark\:border-dark-misc-divider {
|
|
1028
|
+
--tw-border-opacity: 1;
|
|
1029
|
+
border-color: rgb(64 64 64 / var(--tw-border-opacity));
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1029
1032
|
.dark\:border-dark-text-primary {
|
|
1030
1033
|
--tw-border-opacity: 1;
|
|
1031
1034
|
border-color: rgb(255 255 255 / var(--tw-border-opacity));
|
|
@@ -1056,6 +1059,11 @@ body {
|
|
|
1056
1059
|
background-color: rgb(69 69 69 / var(--tw-bg-opacity));
|
|
1057
1060
|
}
|
|
1058
1061
|
|
|
1062
|
+
.dark\:bg-dark-background-accent300 {
|
|
1063
|
+
--tw-bg-opacity: 1;
|
|
1064
|
+
background-color: rgb(79 79 79 / var(--tw-bg-opacity));
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1059
1067
|
.dark\:bg-dark-background-default {
|
|
1060
1068
|
--tw-bg-opacity: 1;
|
|
1061
1069
|
background-color: rgb(38 38 38 / var(--tw-bg-opacity));
|
|
@@ -1076,9 +1084,9 @@ body {
|
|
|
1076
1084
|
background-color: rgb(233 233 233 / var(--tw-bg-opacity));
|
|
1077
1085
|
}
|
|
1078
1086
|
|
|
1079
|
-
.dark\:bg-dark-
|
|
1087
|
+
.dark\:bg-dark-secondary-main {
|
|
1080
1088
|
--tw-bg-opacity: 1;
|
|
1081
|
-
background-color: rgb(
|
|
1089
|
+
background-color: rgb(79 79 79 / var(--tw-bg-opacity));
|
|
1082
1090
|
}
|
|
1083
1091
|
|
|
1084
1092
|
.dark\:bg-dark-success-main {
|
|
@@ -1155,9 +1163,9 @@ body {
|
|
|
1155
1163
|
background-color: rgb(79 79 79 / var(--tw-bg-opacity));
|
|
1156
1164
|
}
|
|
1157
1165
|
|
|
1158
|
-
.dark\:hover\:bg-dark-
|
|
1166
|
+
.dark\:hover\:bg-dark-secondary-dark:hover {
|
|
1159
1167
|
--tw-bg-opacity: 1;
|
|
1160
|
-
background-color: rgb(
|
|
1168
|
+
background-color: rgb(69 69 69 / var(--tw-bg-opacity));
|
|
1161
1169
|
}
|
|
1162
1170
|
|
|
1163
1171
|
.hover\:dark\:bg-dark-accent-dark:hover {
|
|
@@ -1165,24 +1173,19 @@ body {
|
|
|
1165
1173
|
background-color: rgb(206 134 2 / var(--tw-bg-opacity));
|
|
1166
1174
|
}
|
|
1167
1175
|
|
|
1168
|
-
.hover\:dark\:bg-dark-action-hover:hover {
|
|
1169
|
-
--tw-bg-opacity: 1;
|
|
1170
|
-
background-color: rgb(61 61 61 / var(--tw-bg-opacity));
|
|
1171
|
-
}
|
|
1172
|
-
|
|
1173
1176
|
.hover\:dark\:bg-dark-background-accent100:hover {
|
|
1174
1177
|
--tw-bg-opacity: 1;
|
|
1175
1178
|
background-color: rgb(51 51 51 / var(--tw-bg-opacity));
|
|
1176
1179
|
}
|
|
1177
1180
|
|
|
1178
|
-
.hover\:dark\:bg-dark-background-
|
|
1181
|
+
.hover\:dark\:bg-dark-background-accent200:hover {
|
|
1179
1182
|
--tw-bg-opacity: 1;
|
|
1180
|
-
background-color: rgb(
|
|
1183
|
+
background-color: rgb(69 69 69 / var(--tw-bg-opacity));
|
|
1181
1184
|
}
|
|
1182
1185
|
|
|
1183
|
-
.hover\:dark\:bg-dark-
|
|
1186
|
+
.hover\:dark\:bg-dark-secondary-dark:hover {
|
|
1184
1187
|
--tw-bg-opacity: 1;
|
|
1185
|
-
background-color: rgb(
|
|
1188
|
+
background-color: rgb(69 69 69 / var(--tw-bg-opacity));
|
|
1186
1189
|
}
|
|
1187
1190
|
|
|
1188
1191
|
.focus\:dark\:border-dark-accent-main:focus {
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oneslash-design-system",
|
|
3
3
|
"description": "A design system for the Oneslash projects",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.16",
|
|
5
5
|
"private": false,
|
|
6
|
-
"main": "./dist/index.js",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"dev": "next dev",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"lint": "next lint"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@heroicons/react": "^2.
|
|
16
|
+
"@heroicons/react": "^2.2.0",
|
|
17
17
|
"@popperjs/core": "^2.11.8",
|
|
18
18
|
"next": "14.2.13",
|
|
19
19
|
"react": "^18",
|