@aristobyte-ui/label 2.12.0 → 2.13.0
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/es/.tsbuildinfo +1 -1
- package/es/components/Label/Label.scss +160 -135
- package/es/components/Label/index.d.ts +1 -0
- package/es/components/Label/index.js +9 -1
- package/lib/.tsbuildinfo +1 -1
- package/lib/components/Label/Label.scss +160 -135
- package/lib/components/Label/index.d.ts +1 -0
- package/lib/components/Label/index.js +9 -1
- package/package.json +2 -2
|
@@ -9,153 +9,178 @@
|
|
|
9
9
|
font-weight: 500;
|
|
10
10
|
line-height: 1rem;
|
|
11
11
|
padding: 0.25rem 0.6875rem;
|
|
12
|
+
transition: all 150ms ease-out;
|
|
12
13
|
user-select: none;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.label-xsm {
|
|
16
|
-
font-size: 0.75rem;
|
|
17
|
-
padding: 0.125rem 0.5rem;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.label-sm {
|
|
21
|
-
font-size: 0.875rem;
|
|
22
|
-
padding: 0.25rem 0.625rem;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.label-md {
|
|
26
|
-
font-size: 1rem;
|
|
27
|
-
padding: 0.375rem 0.75rem;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.label-lg {
|
|
31
|
-
font-size: 1.125rem;
|
|
32
|
-
padding: 0.5rem 1rem;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.label-xlg {
|
|
36
|
-
font-size: 1.25rem;
|
|
37
|
-
padding: 0.625rem 1.25rem;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.label-radius-none {
|
|
41
|
-
border-radius: 0;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.label-radius-sm {
|
|
45
|
-
border-radius: 0.125rem;
|
|
46
|
-
}
|
|
47
14
|
|
|
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
|
-
border-color: rgba($color, 0.5);
|
|
74
|
-
color: rgba($color, 0.5);
|
|
75
|
-
cursor: not-allowed;
|
|
76
|
-
opacity: 0.5;
|
|
15
|
+
&-size {
|
|
16
|
+
&--xsm {
|
|
17
|
+
font-size: 0.75rem;
|
|
18
|
+
padding: 0.125rem 0.5rem;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&--sm {
|
|
22
|
+
font-size: 0.875rem;
|
|
23
|
+
padding: 0.25rem 0.625rem;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&--md {
|
|
27
|
+
font-size: 1rem;
|
|
28
|
+
padding: 0.375rem 0.75rem;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&--lg {
|
|
32
|
+
font-size: 1.125rem;
|
|
33
|
+
padding: 0.5rem 1rem;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&--xlg {
|
|
37
|
+
font-size: 1.25rem;
|
|
38
|
+
padding: 0.625rem 1.25rem;
|
|
39
|
+
}
|
|
77
40
|
}
|
|
78
41
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
42
|
+
&-radius {
|
|
43
|
+
&--none {
|
|
44
|
+
border-radius: 0;
|
|
45
|
+
}
|
|
84
46
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
47
|
+
&--sm {
|
|
48
|
+
border-radius: 0.125rem;
|
|
49
|
+
}
|
|
88
50
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
color: rgba($color, 0.5);
|
|
93
|
-
cursor: not-allowed;
|
|
94
|
-
opacity: 0.5;
|
|
95
|
-
}
|
|
51
|
+
&--md {
|
|
52
|
+
border-radius: 0.375rem;
|
|
53
|
+
}
|
|
96
54
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
border-style: dashed;
|
|
101
|
-
color: $color;
|
|
102
|
-
}
|
|
55
|
+
&--lg {
|
|
56
|
+
border-radius: 0.75rem;
|
|
57
|
+
}
|
|
103
58
|
|
|
104
|
-
|
|
105
|
-
|
|
59
|
+
&--full {
|
|
60
|
+
border-radius: 9999px;
|
|
61
|
+
}
|
|
106
62
|
}
|
|
107
63
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
border
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
64
|
+
@mixin label-style(
|
|
65
|
+
$bg,
|
|
66
|
+
$border,
|
|
67
|
+
$text,
|
|
68
|
+
$hover-bg,
|
|
69
|
+
$hover-border,
|
|
70
|
+
$disabled-bg,
|
|
71
|
+
$disabled-border,
|
|
72
|
+
$disabled-text,
|
|
73
|
+
$glow: false
|
|
74
|
+
) {
|
|
75
|
+
background-color: $bg;
|
|
76
|
+
border-color: $border;
|
|
77
|
+
color: $text;
|
|
78
|
+
|
|
79
|
+
@if $glow {
|
|
80
|
+
box-shadow: 0 0 6px rgba($border, 0.5);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&:hover {
|
|
84
|
+
background-color: $hover-bg;
|
|
85
|
+
border-color: $hover-border;
|
|
86
|
+
|
|
87
|
+
@if $glow {
|
|
88
|
+
box-shadow: 0 0 8px rgba($hover-border, 0.5);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&:disabled {
|
|
93
|
+
background-color: $disabled-bg;
|
|
94
|
+
border-color: $disabled-border;
|
|
95
|
+
color: $disabled-text;
|
|
96
|
+
cursor: not-allowed;
|
|
97
|
+
opacity: 0.5;
|
|
98
|
+
|
|
99
|
+
@if $glow {
|
|
100
|
+
box-shadow: 0 0 6px rgba($disabled-border, 0.5);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
114
103
|
}
|
|
115
104
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
105
|
+
@mixin label-variant($name, $color, $text, $hover-color, $disabled-color) {
|
|
106
|
+
&.label-variant--#{$name}.label-appearance--solid {
|
|
107
|
+
@include label-style(
|
|
108
|
+
rgba($color, 0.2),
|
|
109
|
+
$color,
|
|
110
|
+
$text,
|
|
111
|
+
rgba($hover-color, 0.27),
|
|
112
|
+
$hover-color,
|
|
113
|
+
rgba($disabled-color, 0.5),
|
|
114
|
+
rgba($disabled-color, 0.5),
|
|
115
|
+
rgba($disabled-color, 0.5)
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&.label-variant--#{$name}.label-appearance--outline {
|
|
120
|
+
@include label-style(
|
|
121
|
+
transparent,
|
|
122
|
+
$color,
|
|
123
|
+
$text,
|
|
124
|
+
rgba($color, 0.07),
|
|
125
|
+
$color,
|
|
126
|
+
transparent,
|
|
127
|
+
rgba($disabled-color, 0.5),
|
|
128
|
+
rgba($disabled-color, 0.5)
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&.label-variant--#{$name}.label-appearance--outline-dashed {
|
|
133
|
+
border-style: dashed;
|
|
134
|
+
@include label-style(
|
|
135
|
+
transparent,
|
|
136
|
+
$color,
|
|
137
|
+
$text,
|
|
138
|
+
rgba($color, 0.07),
|
|
139
|
+
$color,
|
|
140
|
+
transparent,
|
|
141
|
+
rgba($disabled-color, 0.5),
|
|
142
|
+
rgba($disabled-color, 0.5)
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&.label-variant--#{$name}.label-appearance--no-outline {
|
|
147
|
+
@include label-style(
|
|
148
|
+
rgba($color, 0.2),
|
|
149
|
+
transparent,
|
|
150
|
+
$text,
|
|
151
|
+
rgba($hover-color, 0.27),
|
|
152
|
+
transparent,
|
|
153
|
+
rgba($disabled-color, 0.5),
|
|
154
|
+
transparent,
|
|
155
|
+
rgba($disabled-color, 0.5)
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&.label-variant--#{$name}.label-appearance--glowing {
|
|
160
|
+
@include label-style(
|
|
161
|
+
rgba($color, 0.2),
|
|
162
|
+
$color,
|
|
163
|
+
$text,
|
|
164
|
+
rgba($hover-color, 0.27),
|
|
165
|
+
$hover-color,
|
|
166
|
+
$hover-color,
|
|
167
|
+
$disabled-color,
|
|
168
|
+
rgba($disabled-color, 0.5),
|
|
169
|
+
true
|
|
170
|
+
);
|
|
171
|
+
}
|
|
120
172
|
}
|
|
121
173
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
.label-#{$name}-glowing {
|
|
135
|
-
background-color: rgba($color, 0.2);
|
|
136
|
-
border-color: transparent;
|
|
137
|
-
box-shadow: 0 0 6px rgba($color, 0.5);
|
|
138
|
-
color: $color;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.label-#{$name}-glowing:hover {
|
|
142
|
-
background-color: rgba($hover-color, 0.27);
|
|
143
|
-
box-shadow: 0 0 8px rgba($hover-color, 0.5);
|
|
144
|
-
color: $hover-color;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.label-#{$name}-glowing:disabled {
|
|
148
|
-
background-color: rgba($color, 0.5);
|
|
149
|
-
box-shadow: 0 0 6px rgba($color, 0.5);
|
|
150
|
-
color: rgba($color, 0.5);
|
|
151
|
-
cursor: not-allowed;
|
|
152
|
-
opacity: 0.5;
|
|
153
|
-
}
|
|
174
|
+
@include label-variant('default', $color-default, $color-default-text, $color-default-hover, $color-default-disabled);
|
|
175
|
+
@include label-variant('primary', $color-primary, $color-primary-text, $color-primary-hover, $color-primary-disabled);
|
|
176
|
+
@include label-variant(
|
|
177
|
+
'secondary',
|
|
178
|
+
$color-secondary,
|
|
179
|
+
$color-secondary-text,
|
|
180
|
+
$color-secondary-hover,
|
|
181
|
+
$color-secondary-disabled
|
|
182
|
+
);
|
|
183
|
+
@include label-variant('success', $color-success, $color-success-text, $color-success-hover, $color-success-disabled);
|
|
184
|
+
@include label-variant('warning', $color-warning, $color-warning-text, $color-warning-hover, $color-warning-disabled);
|
|
185
|
+
@include label-variant('error', $color-error, $color-error-text, $color-error-hover, $color-error-disabled);
|
|
154
186
|
}
|
|
155
|
-
|
|
156
|
-
@include label-variant('default', $color-default, $color-default-hover);
|
|
157
|
-
@include label-variant('primary', $color-primary, $color-primary-hover);
|
|
158
|
-
@include label-variant('secondary', $color-secondary, $color-secondary-hover);
|
|
159
|
-
@include label-variant('success', $color-success, $color-success-hover);
|
|
160
|
-
@include label-variant('warning', $color-warning, $color-warning-hover);
|
|
161
|
-
@include label-variant('error', $color-error, $color-error-hover);
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
import './Label.scss';
|
|
3
4
|
export var Label = function (_a) {
|
|
4
5
|
var text = _a.text, _b = _a.variant, variant = _b === void 0 ? 'default' : _b, _c = _a.appearance, appearance = _c === void 0 ? 'solid' : _c, _d = _a.size, size = _d === void 0 ? 'md' : _d, _e = _a.radius, radius = _e === void 0 ? 'md' : _e, className = _a.className, color = _a.color, backgroundColor = _a.backgroundColor, borderColor = _a.borderColor;
|
|
5
|
-
return (React.createElement("label", { className: [
|
|
6
|
+
return (React.createElement("label", { className: [
|
|
7
|
+
'label',
|
|
8
|
+
"label-appearance--".concat(appearance),
|
|
9
|
+
"label-variant--".concat(variant),
|
|
10
|
+
"label-size--".concat(size),
|
|
11
|
+
"label-radius--".concat(radius),
|
|
12
|
+
className,
|
|
13
|
+
]
|
|
6
14
|
.filter(Boolean)
|
|
7
15
|
.join(' '), style: {
|
|
8
16
|
color: color,
|