@rebasepro/ui 0.17.2 → 0.17.3-canary.g785baa2
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/dist/components/Select.d.ts +9 -0
- package/dist/index.es.js +2 -2
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Select.tsx +11 -1
|
@@ -26,6 +26,15 @@ export type SelectProps<T extends SelectValue = string> = {
|
|
|
26
26
|
children?: React.ReactNode;
|
|
27
27
|
dataType?: "string" | "number" | "boolean";
|
|
28
28
|
portalContainer?: HTMLElement | null;
|
|
29
|
+
/**
|
|
30
|
+
* Accessible name for the trigger, for a select whose `label` is a node
|
|
31
|
+
* rather than a string — or which shows no label at all.
|
|
32
|
+
*
|
|
33
|
+
* Without it such a select announces the literal fallback "Select an
|
|
34
|
+
* option", which is indistinguishable from every other unlabelled select
|
|
35
|
+
* on the screen.
|
|
36
|
+
*/
|
|
37
|
+
"aria-label"?: string;
|
|
29
38
|
};
|
|
30
39
|
export declare const Select: React.ForwardRefExoticComponent<SelectProps<string> & React.RefAttributes<HTMLDivElement>>;
|
|
31
40
|
export type SelectItemProps<T extends SelectValue = string> = {
|
package/dist/index.es.js
CHANGED
|
@@ -4990,7 +4990,7 @@ function SearchBar({ onClick, onTextSearch, placeholder = "Search", expandable =
|
|
|
4990
4990
|
}
|
|
4991
4991
|
//#endregion
|
|
4992
4992
|
//#region src/components/Select.tsx
|
|
4993
|
-
var Select = forwardRef(({ inputRef, open, name, fullWidth = false, id, onOpenChange, value, onChange, onValueChange, className, inputClassName, viewportClassName, placeholder, renderValue, label, size = "large", error, disabled, padding = true, position = "item-aligned", endAdornment, invisible, children, dataType = "string", portalContainer: manualContainer, ...props }, ref) => {
|
|
4993
|
+
var Select = forwardRef(({ inputRef, open, name, fullWidth = false, id, onOpenChange, value, onChange, onValueChange, className, inputClassName, viewportClassName, placeholder, renderValue, label, size = "large", error, disabled, padding = true, position = "item-aligned", endAdornment, invisible, children, dataType = "string", portalContainer: manualContainer, "aria-label": ariaLabel, ...props }, ref) => {
|
|
4994
4994
|
const [openInternal, setOpenInternal] = useState(open ?? false);
|
|
4995
4995
|
useEffect(() => {
|
|
4996
4996
|
setOpenInternal(open ?? false);
|
|
@@ -5061,7 +5061,7 @@ var Select = forwardRef(({ inputRef, open, name, fullWidth = false, id, onOpenCh
|
|
|
5061
5061
|
id,
|
|
5062
5062
|
asChild: false,
|
|
5063
5063
|
type: "button",
|
|
5064
|
-
"aria-label": typeof label === "string" ? label : typeof renderValue === "string" ? renderValue : "Select an option",
|
|
5064
|
+
"aria-label": ariaLabel ?? (typeof label === "string" ? label : typeof renderValue === "string" ? renderValue : "Select an option"),
|
|
5065
5065
|
"aria-invalid": error || void 0,
|
|
5066
5066
|
className: cls("h-full", padding ? {
|
|
5067
5067
|
"px-4": size === "large",
|