aural-ui 3.0.1 → 3.0.2
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.
|
@@ -67,7 +67,7 @@ export const Secondary: Story = {
|
|
|
67
67
|
variant: "secondary",
|
|
68
68
|
children: "Secondary Button",
|
|
69
69
|
size: "md",
|
|
70
|
-
noise: "
|
|
70
|
+
noise: "low",
|
|
71
71
|
},
|
|
72
72
|
}
|
|
73
73
|
|
|
@@ -242,9 +242,7 @@ export const AllVariants: Story = {
|
|
|
242
242
|
<Button variant="primary" noise="medium">
|
|
243
243
|
Primary
|
|
244
244
|
</Button>
|
|
245
|
-
<Button variant="secondary"
|
|
246
|
-
Secondary
|
|
247
|
-
</Button>
|
|
245
|
+
<Button variant="secondary">Secondary</Button>
|
|
248
246
|
<Button variant="outline" noise="none">
|
|
249
247
|
Outline
|
|
250
248
|
</Button>
|
|
@@ -287,13 +285,12 @@ export const WithToolTip: Story = {
|
|
|
287
285
|
</Button>
|
|
288
286
|
<Button
|
|
289
287
|
variant="secondary"
|
|
290
|
-
tooltip="Secondary
|
|
288
|
+
tooltip="Secondary (default: low noise)"
|
|
291
289
|
tooltipContentProps={{
|
|
292
290
|
align: "center",
|
|
293
291
|
side: "bottom",
|
|
294
292
|
sideOffset: 10,
|
|
295
293
|
}}
|
|
296
|
-
noise="low"
|
|
297
294
|
>
|
|
298
295
|
Secondary
|
|
299
296
|
</Button>
|
|
@@ -133,7 +133,7 @@ export const innerButtonVariants = cva(
|
|
|
133
133
|
variant: "primary",
|
|
134
134
|
disabled: "default",
|
|
135
135
|
size: "md",
|
|
136
|
-
noise: "
|
|
136
|
+
noise: "none",
|
|
137
137
|
},
|
|
138
138
|
}
|
|
139
139
|
)
|
|
@@ -156,7 +156,7 @@ export const RawButton = forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
156
156
|
{
|
|
157
157
|
variant = "primary",
|
|
158
158
|
size = "md",
|
|
159
|
-
noise
|
|
159
|
+
noise: noiseProp,
|
|
160
160
|
children,
|
|
161
161
|
className = "",
|
|
162
162
|
innerClassName = "",
|
|
@@ -168,6 +168,14 @@ export const RawButton = forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
168
168
|
},
|
|
169
169
|
ref
|
|
170
170
|
) => {
|
|
171
|
+
const noise =
|
|
172
|
+
noiseProp ??
|
|
173
|
+
(variant === "primary"
|
|
174
|
+
? "medium"
|
|
175
|
+
: variant === "secondary"
|
|
176
|
+
? "low"
|
|
177
|
+
: "none")
|
|
178
|
+
|
|
171
179
|
const iconColor = isDisabled
|
|
172
180
|
? "var(--icon-fm-inactive)"
|
|
173
181
|
: variant === "text"
|
|
@@ -32,7 +32,7 @@ interface InputComponent extends ForwardRefExoticComponent<
|
|
|
32
32
|
// CVA for input variants
|
|
33
33
|
export const inputVariants = cva(
|
|
34
34
|
// Base styles
|
|
35
|
-
"block w-full focus:outline-none transition-all duration-200 border-solid tracking-wide placeholder:text-fm-
|
|
35
|
+
"block w-full focus:outline-none transition-all duration-200 border-solid tracking-wide placeholder:text-fm-tertiary font-fm-text text-fm-primary",
|
|
36
36
|
{
|
|
37
37
|
variants: {
|
|
38
38
|
variant: {
|
|
@@ -157,7 +157,7 @@ function Slider({
|
|
|
157
157
|
key={index}
|
|
158
158
|
aria-label={getThumbAriaLabel(index, _values[index])}
|
|
159
159
|
className={cn(
|
|
160
|
-
"block shrink-0 transition-[color,box-shadow] hover:ring-2 focus-visible:ring-2 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50",
|
|
160
|
+
"block shrink-0 cursor-pointer transition-[color,box-shadow] hover:ring-2 focus-visible:ring-2 focus-visible:outline-hidden disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
161
161
|
sliderThumbVariants({ size, variant }),
|
|
162
162
|
classes?.thumb
|
|
163
163
|
)}
|