@westpac/ui 0.50.0 → 0.52.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/CHANGELOG.md +53 -0
- package/dist/component-type.json +1 -1
- package/dist/components/accordion/components/accordion-item/accordion-item.component.js +55 -25
- package/dist/components/accordion/components/accordion-item/accordion-item.styles.d.ts +45 -6
- package/dist/components/accordion/components/accordion-item/accordion-item.styles.js +19 -6
- package/dist/components/autocomplete/autocomplete.component.d.ts +1 -1
- package/dist/components/autocomplete/autocomplete.component.js +3 -2
- package/dist/components/autocomplete/autocomplete.types.d.ts +6 -0
- package/dist/components/badge/badge.styles.js +1 -1
- package/dist/components/bottom-sheet/components/bottom-sheet-dialog/bottom-sheet-dialog.styles.js +1 -1
- package/dist/components/footer/footer.component.js +4 -11
- package/dist/components/footer/footer.styles.d.ts +3 -21
- package/dist/components/footer/footer.styles.js +3 -9
- package/dist/components/header/header.component.d.ts +1 -1
- package/dist/components/header/header.component.js +13 -10
- package/dist/components/header/header.types.d.ts +7 -1
- package/dist/components/modal/components/modal-dialog/index.d.ts +1 -0
- package/dist/components/modal/index.d.ts +1 -0
- package/dist/components/popover/components/panel/panel.component.js +5 -4
- package/dist/components/select/components/index.d.ts +2 -0
- package/dist/components/select/components/index.js +2 -0
- package/dist/components/select/components/select-with-tooltip/select-with-tooltip.component.d.ts +13 -0
- package/dist/components/select/components/select-with-tooltip/select-with-tooltip.component.js +22 -0
- package/dist/components/select/components/select-with-tooltip/select-with-tooltip.styles.d.ts +56 -0
- package/dist/components/select/components/select-with-tooltip/select-with-tooltip.styles.js +30 -0
- package/dist/components/select/components/styled-select/styled-select.component.d.ts +13 -0
- package/dist/components/select/components/styled-select/styled-select.component.js +19 -0
- package/dist/components/select/components/styled-select/styled-select.styles.d.ts +104 -0
- package/dist/components/select/components/styled-select/styled-select.styles.js +46 -0
- package/dist/components/select/select.component.d.ts +1 -0
- package/dist/components/select/select.component.js +7 -14
- package/dist/components/select/select.styles.d.ts +180 -45
- package/dist/components/select/select.styles.js +60 -15
- package/dist/components/select/select.types.d.ts +6 -0
- package/dist/components/tooltip/components/tooltip-content/tooltip-content.component.d.ts +2 -0
- package/dist/components/tooltip/components/tooltip-content/tooltip-content.component.js +9 -0
- package/dist/components/tooltip/components/tooltip-content/tooltip-content.styles.d.ts +1 -0
- package/dist/components/tooltip/components/tooltip-content/tooltip-content.styles.js +4 -0
- package/dist/components/tooltip/components/tooltip-content/tooltip-content.types.d.ts +5 -0
- package/dist/components/tooltip/components/tooltip-content/tooltip-content.types.js +1 -0
- package/dist/components/tooltip/index.d.ts +1 -0
- package/dist/components/tooltip/index.js +1 -0
- package/dist/components/tooltip/tooltip.component.d.ts +2 -0
- package/dist/components/tooltip/tooltip.component.js +55 -0
- package/dist/components/tooltip/tooltip.styles.d.ts +1 -0
- package/dist/components/tooltip/tooltip.styles.js +4 -0
- package/dist/components/tooltip/tooltip.types.d.ts +7 -0
- package/dist/components/tooltip/tooltip.types.js +1 -0
- package/dist/css/westpac-ui.css +69 -36
- package/dist/css/westpac-ui.min.css +69 -36
- package/dist/hook/breakpoints.hook.js +59 -10
- package/dist/hook/index.d.ts +1 -0
- package/dist/hook/index.js +1 -0
- package/package.json +4 -3
- package/src/components/accordion/components/accordion-item/accordion-item.component.tsx +64 -28
- package/src/components/accordion/components/accordion-item/accordion-item.styles.ts +19 -6
- package/src/components/autocomplete/autocomplete.component.tsx +3 -1
- package/src/components/autocomplete/autocomplete.types.ts +6 -0
- package/src/components/badge/badge.styles.ts +1 -1
- package/src/components/bottom-sheet/components/bottom-sheet-dialog/bottom-sheet-dialog.styles.ts +1 -1
- package/src/components/footer/footer.component.tsx +8 -12
- package/src/components/footer/footer.styles.ts +2 -6
- package/src/components/header/header.component.tsx +17 -4
- package/src/components/header/header.types.ts +7 -1
- package/src/components/modal/components/modal-dialog/index.ts +1 -0
- package/src/components/modal/index.ts +1 -0
- package/src/components/popover/components/panel/panel.component.tsx +8 -5
- package/src/components/select/components/index.ts +2 -0
- package/src/components/select/components/select-with-tooltip/select-with-tooltip.component.tsx +31 -0
- package/src/components/select/components/select-with-tooltip/select-with-tooltip.styles.ts +26 -0
- package/src/components/select/components/styled-select/styled-select.component.tsx +25 -0
- package/src/components/select/components/styled-select/styled-select.styles.ts +42 -0
- package/src/components/select/select.component.tsx +9 -14
- package/src/components/select/select.styles.ts +18 -15
- package/src/components/select/select.types.ts +6 -0
- package/src/components/tooltip/components/tooltip-content/tooltip-content.component.tsx +12 -0
- package/src/components/tooltip/components/tooltip-content/tooltip-content.styles.ts +5 -0
- package/src/components/tooltip/components/tooltip-content/tooltip-content.types.ts +6 -0
- package/src/components/tooltip/index.ts +1 -0
- package/src/components/tooltip/tooltip.component.tsx +61 -0
- package/src/components/tooltip/tooltip.styles.ts +3 -0
- package/src/components/tooltip/tooltip.types.ts +8 -0
- package/src/hook/breakpoints.hook.ts +71 -11
- package/src/hook/index.ts +1 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { tv } from 'tailwind-variants';
|
|
2
|
+
export const styles = tv({
|
|
3
|
+
base: '',
|
|
4
|
+
variants: {
|
|
5
|
+
width: {
|
|
6
|
+
auto: 'flex-1',
|
|
7
|
+
full: 'w-full flex-1',
|
|
8
|
+
1: 'w-[1.81ex]',
|
|
9
|
+
2: 'w-[3.62ex]',
|
|
10
|
+
3: 'w-[5.43ex]',
|
|
11
|
+
4: 'w-[7.24ex]',
|
|
12
|
+
5: 'w-[9.05ex]',
|
|
13
|
+
6: 'w-[10.86ex]',
|
|
14
|
+
7: 'w-[12.67ex]',
|
|
15
|
+
8: 'w-[14.48ex]',
|
|
16
|
+
9: 'w-[16.29ex]',
|
|
17
|
+
10: 'w-[18.1ex]',
|
|
18
|
+
20: 'w-[36.2ex]',
|
|
19
|
+
30: 'w-[54.3ex]'
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}, {
|
|
23
|
+
responsiveVariants: [
|
|
24
|
+
'xsl',
|
|
25
|
+
'sm',
|
|
26
|
+
'md',
|
|
27
|
+
'lg',
|
|
28
|
+
'xl'
|
|
29
|
+
]
|
|
30
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const StyledSelect: React.ForwardRefExoticComponent<{
|
|
3
|
+
enableTooltip?: boolean;
|
|
4
|
+
invalid?: boolean | {
|
|
5
|
+
[x: string]: boolean | undefined;
|
|
6
|
+
} | undefined;
|
|
7
|
+
size?: "small" | "xlarge" | "medium" | "large" | {
|
|
8
|
+
[x: string]: "small" | "xlarge" | "medium" | "large" | undefined;
|
|
9
|
+
} | undefined;
|
|
10
|
+
width?: "auto" | 1 | 2 | "full" | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 20 | 30 | {
|
|
11
|
+
[x: string]: "auto" | 1 | 2 | "full" | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 20 | 30 | undefined;
|
|
12
|
+
} | undefined;
|
|
13
|
+
} & Omit<React.SelectHTMLAttributes<HTMLSelectElement>, "size"> & React.RefAttributes<HTMLSelectElement>>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
import { mergeProps, useFocusRing } from 'react-aria';
|
|
3
|
+
import { styles } from './styled-select.styles.js';
|
|
4
|
+
function BaseSelect({ className, size = 'medium', invalid = false, width = 'auto', children, ...props }, ref) {
|
|
5
|
+
const { isFocused, isFocusVisible, focusProps } = useFocusRing();
|
|
6
|
+
return React.createElement("select", {
|
|
7
|
+
ref: ref,
|
|
8
|
+
className: styles({
|
|
9
|
+
className,
|
|
10
|
+
size,
|
|
11
|
+
invalid,
|
|
12
|
+
isFocused,
|
|
13
|
+
isFocusVisible,
|
|
14
|
+
width
|
|
15
|
+
}),
|
|
16
|
+
...mergeProps(props, focusProps)
|
|
17
|
+
}, children);
|
|
18
|
+
}
|
|
19
|
+
export const StyledSelect = forwardRef(BaseSelect);
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
export declare const styles: import("tailwind-variants").TVReturnType<{
|
|
2
|
+
size: {
|
|
3
|
+
small: string;
|
|
4
|
+
medium: string;
|
|
5
|
+
large: string;
|
|
6
|
+
xlarge: string;
|
|
7
|
+
};
|
|
8
|
+
invalid: {
|
|
9
|
+
true: string;
|
|
10
|
+
false: string;
|
|
11
|
+
};
|
|
12
|
+
isFocusVisible: {
|
|
13
|
+
true: string;
|
|
14
|
+
};
|
|
15
|
+
isFocused: {
|
|
16
|
+
true: string;
|
|
17
|
+
};
|
|
18
|
+
width: {
|
|
19
|
+
auto: string;
|
|
20
|
+
full: string;
|
|
21
|
+
1: string;
|
|
22
|
+
2: string;
|
|
23
|
+
3: string;
|
|
24
|
+
4: string;
|
|
25
|
+
5: string;
|
|
26
|
+
6: string;
|
|
27
|
+
7: string;
|
|
28
|
+
8: string;
|
|
29
|
+
9: string;
|
|
30
|
+
10: string;
|
|
31
|
+
20: string;
|
|
32
|
+
30: string;
|
|
33
|
+
};
|
|
34
|
+
}, undefined, "form-control overflow-hidden overflow-ellipsis whitespace-nowrap bg-no-repeat select-caret disabled:form-control-disabled group-first/add-on-before:!rounded-l group-first/add-on-before:rounded-r-none group-first/add-on-before:!border-x group-last/add-on-after:!rounded-r group-last/add-on-after:rounded-l-none group-last/add-on-after:!border-x group-[.input-group-after]:rounded-r-none group-[.input-group-before]:rounded-l-none group-[.input-group-after]:border-r-0 group-[.input-group-before]:border-l-0", {
|
|
35
|
+
responsiveVariants: string[];
|
|
36
|
+
}, {
|
|
37
|
+
size: {
|
|
38
|
+
small: string;
|
|
39
|
+
medium: string;
|
|
40
|
+
large: string;
|
|
41
|
+
xlarge: string;
|
|
42
|
+
};
|
|
43
|
+
invalid: {
|
|
44
|
+
true: string;
|
|
45
|
+
false: string;
|
|
46
|
+
};
|
|
47
|
+
isFocusVisible: {
|
|
48
|
+
true: string;
|
|
49
|
+
};
|
|
50
|
+
isFocused: {
|
|
51
|
+
true: string;
|
|
52
|
+
};
|
|
53
|
+
width: {
|
|
54
|
+
auto: string;
|
|
55
|
+
full: string;
|
|
56
|
+
1: string;
|
|
57
|
+
2: string;
|
|
58
|
+
3: string;
|
|
59
|
+
4: string;
|
|
60
|
+
5: string;
|
|
61
|
+
6: string;
|
|
62
|
+
7: string;
|
|
63
|
+
8: string;
|
|
64
|
+
9: string;
|
|
65
|
+
10: string;
|
|
66
|
+
20: string;
|
|
67
|
+
30: string;
|
|
68
|
+
};
|
|
69
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
70
|
+
size: {
|
|
71
|
+
small: string;
|
|
72
|
+
medium: string;
|
|
73
|
+
large: string;
|
|
74
|
+
xlarge: string;
|
|
75
|
+
};
|
|
76
|
+
invalid: {
|
|
77
|
+
true: string;
|
|
78
|
+
false: string;
|
|
79
|
+
};
|
|
80
|
+
isFocusVisible: {
|
|
81
|
+
true: string;
|
|
82
|
+
};
|
|
83
|
+
isFocused: {
|
|
84
|
+
true: string;
|
|
85
|
+
};
|
|
86
|
+
width: {
|
|
87
|
+
auto: string;
|
|
88
|
+
full: string;
|
|
89
|
+
1: string;
|
|
90
|
+
2: string;
|
|
91
|
+
3: string;
|
|
92
|
+
4: string;
|
|
93
|
+
5: string;
|
|
94
|
+
6: string;
|
|
95
|
+
7: string;
|
|
96
|
+
8: string;
|
|
97
|
+
9: string;
|
|
98
|
+
10: string;
|
|
99
|
+
20: string;
|
|
100
|
+
30: string;
|
|
101
|
+
};
|
|
102
|
+
}, undefined, "form-control overflow-hidden overflow-ellipsis whitespace-nowrap bg-no-repeat select-caret disabled:form-control-disabled group-first/add-on-before:!rounded-l group-first/add-on-before:rounded-r-none group-first/add-on-before:!border-x group-last/add-on-after:!rounded-r group-last/add-on-after:rounded-l-none group-last/add-on-after:!border-x group-[.input-group-after]:rounded-r-none group-[.input-group-before]:rounded-l-none group-[.input-group-after]:border-r-0 group-[.input-group-before]:border-l-0", {
|
|
103
|
+
responsiveVariants: string[];
|
|
104
|
+
}, unknown, unknown, undefined>>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { tv } from 'tailwind-variants';
|
|
2
|
+
export const styles = tv({
|
|
3
|
+
base: 'form-control overflow-hidden overflow-ellipsis whitespace-nowrap bg-no-repeat select-caret disabled:form-control-disabled group-first/add-on-before:!rounded-l group-first/add-on-before:rounded-r-none group-first/add-on-before:!border-x group-last/add-on-after:!rounded-r group-last/add-on-after:rounded-l-none group-last/add-on-after:!border-x group-[.input-group-after]:rounded-r-none group-[.input-group-before]:rounded-l-none group-[.input-group-after]:border-r-0 group-[.input-group-before]:border-l-0',
|
|
4
|
+
variants: {
|
|
5
|
+
size: {
|
|
6
|
+
small: 'form-control-small bg-[right_0.5625rem_center] pr-[calc(0.5rem+14px+0.5625rem)]',
|
|
7
|
+
medium: 'form-control-medium bg-[right_0.75rem_center] pr-[calc(0.5rem+14px+0.75rem)]',
|
|
8
|
+
large: 'form-control-large bg-[right_0.9375rem_center] pr-[calc(0.5rem+14px+0.9375rem)]',
|
|
9
|
+
xlarge: 'form-control-xlarge bg-[right_1.125rem_center] pr-[calc(0.5rem+14px+1.125rem)]'
|
|
10
|
+
},
|
|
11
|
+
invalid: {
|
|
12
|
+
true: 'border-danger',
|
|
13
|
+
false: 'border-borderDark'
|
|
14
|
+
},
|
|
15
|
+
isFocusVisible: {
|
|
16
|
+
true: 'focus-outline'
|
|
17
|
+
},
|
|
18
|
+
isFocused: {
|
|
19
|
+
true: 'outline-none'
|
|
20
|
+
},
|
|
21
|
+
width: {
|
|
22
|
+
auto: 'flex-1',
|
|
23
|
+
full: 'w-full flex-1',
|
|
24
|
+
1: 'box-content w-[1.81ex]',
|
|
25
|
+
2: 'box-content w-[3.62ex]',
|
|
26
|
+
3: 'box-content w-[5.43ex]',
|
|
27
|
+
4: 'box-content w-[7.24ex]',
|
|
28
|
+
5: 'box-content w-[9.05ex]',
|
|
29
|
+
6: 'box-content w-[10.86ex]',
|
|
30
|
+
7: 'box-content w-[12.67ex]',
|
|
31
|
+
8: 'box-content w-[14.48ex]',
|
|
32
|
+
9: 'box-content w-[16.29ex]',
|
|
33
|
+
10: 'box-content w-[18.1ex]',
|
|
34
|
+
20: 'box-content w-[36.2ex]',
|
|
35
|
+
30: 'box-content w-[54.3ex]'
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}, {
|
|
39
|
+
responsiveVariants: [
|
|
40
|
+
'xsl',
|
|
41
|
+
'sm',
|
|
42
|
+
'md',
|
|
43
|
+
'lg',
|
|
44
|
+
'xl'
|
|
45
|
+
]
|
|
46
|
+
});
|
|
@@ -1,20 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import React, { forwardRef } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const { isFocused, isFocusVisible, focusProps } = useFocusRing();
|
|
7
|
-
return React.createElement("select", {
|
|
3
|
+
import { SelectWithTooltip, StyledSelect } from './components/index.js';
|
|
4
|
+
function BaseSelect({ children, enableTooltip, ...props }, ref) {
|
|
5
|
+
return enableTooltip ? React.createElement(SelectWithTooltip, {
|
|
8
6
|
ref: ref,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
isFocused,
|
|
14
|
-
isFocusVisible,
|
|
15
|
-
width
|
|
16
|
-
}),
|
|
17
|
-
...mergeProps(props, focusProps)
|
|
7
|
+
...props
|
|
8
|
+
}, children) : React.createElement(StyledSelect, {
|
|
9
|
+
ref: ref,
|
|
10
|
+
...props
|
|
18
11
|
}, children);
|
|
19
12
|
}
|
|
20
13
|
export const Select = forwardRef(BaseSelect);
|
|
@@ -16,22 +16,67 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
|
|
|
16
16
|
true: string;
|
|
17
17
|
};
|
|
18
18
|
width: {
|
|
19
|
-
auto:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
19
|
+
auto: {
|
|
20
|
+
base: string;
|
|
21
|
+
tooltip: string;
|
|
22
|
+
};
|
|
23
|
+
full: {
|
|
24
|
+
base: string;
|
|
25
|
+
tooltip: string;
|
|
26
|
+
};
|
|
27
|
+
1: {
|
|
28
|
+
base: string;
|
|
29
|
+
tooltip: string;
|
|
30
|
+
};
|
|
31
|
+
2: {
|
|
32
|
+
base: string;
|
|
33
|
+
tooltip: string;
|
|
34
|
+
};
|
|
35
|
+
3: {
|
|
36
|
+
base: string;
|
|
37
|
+
tooltip: string;
|
|
38
|
+
};
|
|
39
|
+
4: {
|
|
40
|
+
base: string;
|
|
41
|
+
tooltip: string;
|
|
42
|
+
};
|
|
43
|
+
5: {
|
|
44
|
+
base: string;
|
|
45
|
+
tooltip: string;
|
|
46
|
+
};
|
|
47
|
+
6: {
|
|
48
|
+
base: string;
|
|
49
|
+
tooltip: string;
|
|
50
|
+
};
|
|
51
|
+
7: {
|
|
52
|
+
base: string;
|
|
53
|
+
tooltip: string;
|
|
54
|
+
};
|
|
55
|
+
8: {
|
|
56
|
+
base: string;
|
|
57
|
+
tooltip: string;
|
|
58
|
+
};
|
|
59
|
+
9: {
|
|
60
|
+
base: string;
|
|
61
|
+
tooltip: string;
|
|
62
|
+
};
|
|
63
|
+
10: {
|
|
64
|
+
base: string;
|
|
65
|
+
tooltip: string;
|
|
66
|
+
};
|
|
67
|
+
20: {
|
|
68
|
+
base: string;
|
|
69
|
+
tooltip: string;
|
|
70
|
+
};
|
|
71
|
+
30: {
|
|
72
|
+
base: string;
|
|
73
|
+
tooltip: string;
|
|
74
|
+
};
|
|
33
75
|
};
|
|
34
|
-
},
|
|
76
|
+
}, {
|
|
77
|
+
base: string;
|
|
78
|
+
tooltip: string;
|
|
79
|
+
}, undefined, {
|
|
35
80
|
responsiveVariants: string[];
|
|
36
81
|
}, {
|
|
37
82
|
size: {
|
|
@@ -51,22 +96,67 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
|
|
|
51
96
|
true: string;
|
|
52
97
|
};
|
|
53
98
|
width: {
|
|
54
|
-
auto:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
99
|
+
auto: {
|
|
100
|
+
base: string;
|
|
101
|
+
tooltip: string;
|
|
102
|
+
};
|
|
103
|
+
full: {
|
|
104
|
+
base: string;
|
|
105
|
+
tooltip: string;
|
|
106
|
+
};
|
|
107
|
+
1: {
|
|
108
|
+
base: string;
|
|
109
|
+
tooltip: string;
|
|
110
|
+
};
|
|
111
|
+
2: {
|
|
112
|
+
base: string;
|
|
113
|
+
tooltip: string;
|
|
114
|
+
};
|
|
115
|
+
3: {
|
|
116
|
+
base: string;
|
|
117
|
+
tooltip: string;
|
|
118
|
+
};
|
|
119
|
+
4: {
|
|
120
|
+
base: string;
|
|
121
|
+
tooltip: string;
|
|
122
|
+
};
|
|
123
|
+
5: {
|
|
124
|
+
base: string;
|
|
125
|
+
tooltip: string;
|
|
126
|
+
};
|
|
127
|
+
6: {
|
|
128
|
+
base: string;
|
|
129
|
+
tooltip: string;
|
|
130
|
+
};
|
|
131
|
+
7: {
|
|
132
|
+
base: string;
|
|
133
|
+
tooltip: string;
|
|
134
|
+
};
|
|
135
|
+
8: {
|
|
136
|
+
base: string;
|
|
137
|
+
tooltip: string;
|
|
138
|
+
};
|
|
139
|
+
9: {
|
|
140
|
+
base: string;
|
|
141
|
+
tooltip: string;
|
|
142
|
+
};
|
|
143
|
+
10: {
|
|
144
|
+
base: string;
|
|
145
|
+
tooltip: string;
|
|
146
|
+
};
|
|
147
|
+
20: {
|
|
148
|
+
base: string;
|
|
149
|
+
tooltip: string;
|
|
150
|
+
};
|
|
151
|
+
30: {
|
|
152
|
+
base: string;
|
|
153
|
+
tooltip: string;
|
|
154
|
+
};
|
|
68
155
|
};
|
|
69
|
-
},
|
|
156
|
+
}, {
|
|
157
|
+
base: string;
|
|
158
|
+
tooltip: string;
|
|
159
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
70
160
|
size: {
|
|
71
161
|
small: string;
|
|
72
162
|
medium: string;
|
|
@@ -84,21 +174,66 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
|
|
|
84
174
|
true: string;
|
|
85
175
|
};
|
|
86
176
|
width: {
|
|
87
|
-
auto:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
177
|
+
auto: {
|
|
178
|
+
base: string;
|
|
179
|
+
tooltip: string;
|
|
180
|
+
};
|
|
181
|
+
full: {
|
|
182
|
+
base: string;
|
|
183
|
+
tooltip: string;
|
|
184
|
+
};
|
|
185
|
+
1: {
|
|
186
|
+
base: string;
|
|
187
|
+
tooltip: string;
|
|
188
|
+
};
|
|
189
|
+
2: {
|
|
190
|
+
base: string;
|
|
191
|
+
tooltip: string;
|
|
192
|
+
};
|
|
193
|
+
3: {
|
|
194
|
+
base: string;
|
|
195
|
+
tooltip: string;
|
|
196
|
+
};
|
|
197
|
+
4: {
|
|
198
|
+
base: string;
|
|
199
|
+
tooltip: string;
|
|
200
|
+
};
|
|
201
|
+
5: {
|
|
202
|
+
base: string;
|
|
203
|
+
tooltip: string;
|
|
204
|
+
};
|
|
205
|
+
6: {
|
|
206
|
+
base: string;
|
|
207
|
+
tooltip: string;
|
|
208
|
+
};
|
|
209
|
+
7: {
|
|
210
|
+
base: string;
|
|
211
|
+
tooltip: string;
|
|
212
|
+
};
|
|
213
|
+
8: {
|
|
214
|
+
base: string;
|
|
215
|
+
tooltip: string;
|
|
216
|
+
};
|
|
217
|
+
9: {
|
|
218
|
+
base: string;
|
|
219
|
+
tooltip: string;
|
|
220
|
+
};
|
|
221
|
+
10: {
|
|
222
|
+
base: string;
|
|
223
|
+
tooltip: string;
|
|
224
|
+
};
|
|
225
|
+
20: {
|
|
226
|
+
base: string;
|
|
227
|
+
tooltip: string;
|
|
228
|
+
};
|
|
229
|
+
30: {
|
|
230
|
+
base: string;
|
|
231
|
+
tooltip: string;
|
|
232
|
+
};
|
|
101
233
|
};
|
|
102
|
-
},
|
|
234
|
+
}, {
|
|
235
|
+
base: string;
|
|
236
|
+
tooltip: string;
|
|
237
|
+
}, undefined, {
|
|
103
238
|
responsiveVariants: string[];
|
|
104
239
|
}, unknown, unknown, undefined>>;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { tv } from 'tailwind-variants';
|
|
2
2
|
export const styles = tv({
|
|
3
|
-
|
|
3
|
+
slots: {
|
|
4
|
+
base: 'form-control overflow-hidden overflow-ellipsis whitespace-nowrap bg-no-repeat select-caret disabled:form-control-disabled group-first/add-on-before:!rounded-l group-first/add-on-before:rounded-r-none group-first/add-on-before:!border-x group-last/add-on-after:!rounded-r group-last/add-on-after:rounded-l-none group-last/add-on-after:!border-x group-[.input-group-after]:rounded-r-none group-[.input-group-before]:rounded-l-none group-[.input-group-after]:border-r-0 group-[.input-group-before]:border-l-0',
|
|
5
|
+
tooltip: ''
|
|
6
|
+
},
|
|
4
7
|
variants: {
|
|
5
8
|
size: {
|
|
6
9
|
small: 'form-control-small bg-[right_0.5625rem_center] pr-[calc(0.5rem+14px+0.5625rem)]',
|
|
@@ -19,20 +22,62 @@ export const styles = tv({
|
|
|
19
22
|
true: 'outline-none'
|
|
20
23
|
},
|
|
21
24
|
width: {
|
|
22
|
-
auto:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
25
|
+
auto: {
|
|
26
|
+
base: 'flex-1',
|
|
27
|
+
tooltip: 'flex-1'
|
|
28
|
+
},
|
|
29
|
+
full: {
|
|
30
|
+
base: 'w-full flex-1',
|
|
31
|
+
tooltip: 'w-full flex-1'
|
|
32
|
+
},
|
|
33
|
+
1: {
|
|
34
|
+
base: 'box-content w-[1.81ex]',
|
|
35
|
+
tooltip: 'w-[1.81ex]'
|
|
36
|
+
},
|
|
37
|
+
2: {
|
|
38
|
+
base: 'box-content w-[3.62ex]',
|
|
39
|
+
tooltip: 'w-[3.62ex]'
|
|
40
|
+
},
|
|
41
|
+
3: {
|
|
42
|
+
base: 'box-content w-[5.43ex]',
|
|
43
|
+
tooltip: 'w-[5.43ex]'
|
|
44
|
+
},
|
|
45
|
+
4: {
|
|
46
|
+
base: 'box-content w-[7.24ex]',
|
|
47
|
+
tooltip: 'w-[7.24ex]'
|
|
48
|
+
},
|
|
49
|
+
5: {
|
|
50
|
+
base: 'box-content w-[9.05ex]',
|
|
51
|
+
tooltip: 'w-[9.05ex]'
|
|
52
|
+
},
|
|
53
|
+
6: {
|
|
54
|
+
base: 'box-content w-[10.86ex]',
|
|
55
|
+
tooltip: 'w-[10.86ex]'
|
|
56
|
+
},
|
|
57
|
+
7: {
|
|
58
|
+
base: 'box-content w-[12.67ex]',
|
|
59
|
+
tooltip: 'w-[12.67ex]'
|
|
60
|
+
},
|
|
61
|
+
8: {
|
|
62
|
+
base: 'box-content w-[14.48ex]',
|
|
63
|
+
tooltip: 'w-[14.48ex]'
|
|
64
|
+
},
|
|
65
|
+
9: {
|
|
66
|
+
base: 'box-content w-[16.29ex]',
|
|
67
|
+
tooltip: 'w-[16.29ex]'
|
|
68
|
+
},
|
|
69
|
+
10: {
|
|
70
|
+
base: 'box-content w-[18.1ex]',
|
|
71
|
+
tooltip: 'w-[18.1ex]'
|
|
72
|
+
},
|
|
73
|
+
20: {
|
|
74
|
+
base: 'box-content w-[36.2ex]',
|
|
75
|
+
tooltip: 'w-[36.2ex]'
|
|
76
|
+
},
|
|
77
|
+
30: {
|
|
78
|
+
base: 'box-content w-[54.3ex]',
|
|
79
|
+
tooltip: 'w-[54.3ex]'
|
|
80
|
+
}
|
|
36
81
|
}
|
|
37
82
|
}
|
|
38
83
|
}, {
|
|
@@ -3,6 +3,12 @@ import { type VariantProps } from 'tailwind-variants';
|
|
|
3
3
|
import { styles } from './select.styles.js';
|
|
4
4
|
type Variants = VariantProps<typeof styles>;
|
|
5
5
|
export type SelectProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Whether to set the title for the select to the currently selected option for use with truncation.
|
|
8
|
+
* Optional for accessibility reasons as it should only be enabled when required. Will not be read by screen readers.
|
|
9
|
+
* @default false
|
|
10
|
+
*/
|
|
11
|
+
enableTooltip?: boolean;
|
|
6
12
|
/**
|
|
7
13
|
* Whether select is invalid
|
|
8
14
|
* @default false
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "absolute left-1 top-full z-10 mt-2 whitespace-nowrap rounded-sm border border-border bg-background p-0.5 text-text", TVConfig<V, EV>, {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "absolute left-1 top-full z-10 mt-2 whitespace-nowrap rounded-sm border border-border bg-background p-0.5 text-text", TVConfig<V, EV>, unknown, unknown, undefined>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Tooltip } from './tooltip.component.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Tooltip } from './tooltip.component.js';
|