@mbao01/common 0.0.42 → 0.0.43
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mbao01/common",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.43",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Ayomide Bakare",
|
|
7
7
|
"license": "MIT",
|
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
"test:coverage": "vitest run --coverage",
|
|
63
63
|
"test:ui": "vitest --ui",
|
|
64
64
|
"test:visual": "test-storybook --url http://127.0.0.1:6006",
|
|
65
|
+
"test:visual:coverage": "test-storybook --coverage",
|
|
65
66
|
"test:visual:ci": "test-storybook --ci --verbose --url http://127.0.0.1:6006",
|
|
66
67
|
"test:visual:watch": "test-storybook --watch",
|
|
67
68
|
"test:watch": "vitest"
|
|
@@ -109,6 +110,7 @@
|
|
|
109
110
|
"devDependencies": {
|
|
110
111
|
"@ianvs/prettier-plugin-sort-imports": "^4.3.1",
|
|
111
112
|
"@storybook/addon-a11y": "^8.3.4",
|
|
113
|
+
"@storybook/addon-coverage": "^1.0.4",
|
|
112
114
|
"@storybook/addon-essentials": "^8.3.4",
|
|
113
115
|
"@storybook/addon-interactions": "^8.3.4",
|
|
114
116
|
"@storybook/addon-links": "^8.3.4",
|
|
@@ -133,6 +135,7 @@
|
|
|
133
135
|
"@vitest/coverage-v8": "^2.1.1",
|
|
134
136
|
"@vitest/ui": "^2.1.1",
|
|
135
137
|
"autoprefixer": "^10.4.20",
|
|
138
|
+
"axe-playwright": "^2.0.3",
|
|
136
139
|
"date-fns": "^4.1.0",
|
|
137
140
|
"eslint": "^8.57.1",
|
|
138
141
|
"eslint-plugin-react": "^7.37.0",
|
|
@@ -160,5 +163,5 @@
|
|
|
160
163
|
"react-dom": "^18.2.0",
|
|
161
164
|
"typescript": "^5.2.2"
|
|
162
165
|
},
|
|
163
|
-
"gitHead": "
|
|
166
|
+
"gitHead": "a1d0e5c38ce829a3fcf38487bee6bfffba27e2b8"
|
|
164
167
|
}
|
|
@@ -52,7 +52,8 @@ export const Calendar = ({
|
|
|
52
52
|
weekdays: "flex",
|
|
53
53
|
weekday: "rounded-md w-9 font-normal text-[0.8rem]",
|
|
54
54
|
week: "flex w-full mt-2",
|
|
55
|
-
week_number: "flex items-center text-sm italic",
|
|
55
|
+
week_number: "flex items-center text-sm italic w-6",
|
|
56
|
+
week_number_header: "w-6",
|
|
56
57
|
...classNames,
|
|
57
58
|
}}
|
|
58
59
|
components={{
|
|
@@ -2,11 +2,11 @@ import type { DescriptionDetailProps, DescriptionProps, DescriptionTermProps } f
|
|
|
2
2
|
import { cn } from "../../utilities";
|
|
3
3
|
|
|
4
4
|
const Description = (props: DescriptionProps) => {
|
|
5
|
-
return <dl
|
|
5
|
+
return <dl {...props} />;
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
const DescriptionTerm = ({ className, ...props }: DescriptionTermProps) => {
|
|
9
|
-
return <dt
|
|
9
|
+
return <dt className={cn("py-2 text-sm font-semibold", className)} {...props} />;
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
const DescriptionDetail = ({ className, ...props }: DescriptionDetailProps) => {
|
|
@@ -12,27 +12,42 @@ import {
|
|
|
12
12
|
import { type SliderProps } from "./types";
|
|
13
13
|
|
|
14
14
|
const Slider = React.forwardRef<React.ElementRef<typeof SliderPrimitive.Root>, SliderProps>(
|
|
15
|
-
(
|
|
15
|
+
(
|
|
16
|
+
{
|
|
17
|
+
className,
|
|
18
|
+
size,
|
|
19
|
+
variant,
|
|
20
|
+
wide,
|
|
21
|
+
disabled,
|
|
22
|
+
name,
|
|
23
|
+
"aria-label": ariaLabel,
|
|
24
|
+
"aria-labelledby": ariaLabelledBy,
|
|
25
|
+
...props
|
|
26
|
+
},
|
|
27
|
+
ref
|
|
28
|
+
) => (
|
|
16
29
|
<SliderPrimitive.Root
|
|
17
30
|
ref={ref}
|
|
18
31
|
name={name}
|
|
19
32
|
disabled={disabled}
|
|
20
33
|
className={cn(getSliderRootClasses({ wide, disabled }), className)}
|
|
21
|
-
data-testid={`${name}-slider-root`}
|
|
34
|
+
data-testid={name ? `${name}-slider-root` : null}
|
|
22
35
|
{...props}
|
|
23
36
|
>
|
|
24
37
|
<SliderPrimitive.Track
|
|
25
38
|
className={cn(getSliderTrackClasses({ size, variant }))}
|
|
26
|
-
data-testid={`${name}-slider-track`}
|
|
39
|
+
data-testid={name ? `${name}-slider-track` : null}
|
|
27
40
|
>
|
|
28
41
|
<SliderPrimitive.Range
|
|
29
42
|
className={cn(getSliderClasses({ variant }))}
|
|
30
|
-
data-testid={`${name}-slider-range`}
|
|
43
|
+
data-testid={name ? `${name}-slider-range` : null}
|
|
31
44
|
/>
|
|
32
45
|
</SliderPrimitive.Track>
|
|
33
46
|
<SliderPrimitive.Thumb
|
|
34
47
|
className={cn(getSliderThumbClasses({ size, variant }))}
|
|
35
|
-
data-testid={`${name}-slider-thumb`}
|
|
48
|
+
data-testid={name ? `${name}-slider-thumb` : null}
|
|
49
|
+
aria-label={ariaLabel}
|
|
50
|
+
aria-labelledby={ariaLabelledBy}
|
|
36
51
|
/>
|
|
37
52
|
</SliderPrimitive.Root>
|
|
38
53
|
)
|
|
@@ -5,7 +5,7 @@ import { type TextFieldProps } from "./types";
|
|
|
5
5
|
|
|
6
6
|
export const TextField = React.forwardRef<HTMLInputElement, TextFieldProps>(
|
|
7
7
|
({ id, name, info, error, label, ...props }: TextFieldProps, ref) => {
|
|
8
|
-
const feedbackId = `${name}-information
|
|
8
|
+
const feedbackId = name ? `${name}-information` : undefined;
|
|
9
9
|
|
|
10
10
|
return (
|
|
11
11
|
<FormControl as="label" htmlFor={id}>
|