@box/blueprint-web 9.3.1 → 9.4.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.
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type RadioTilesProps } from './types';
|
|
2
|
-
export declare const RadioTiles: (<T extends string | null = string>({ children, name, value, variant, columns, disabled, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, onChange, }: RadioTilesProps<T>) => import("react/jsx-runtime").JSX.Element) & {
|
|
2
|
+
export declare const RadioTiles: (<T extends string | null = string>({ children, name, value, variant, columns, disabled, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, onChange, }: RadioTilesProps<T>) => import("react/jsx-runtime").JSX.Element) & {
|
|
3
3
|
Option: <T extends string>({ children, value, label, icon, disabled: disabledProp, className, "aria-label": ariaLabel, }: import("./types").RadioTilesOptionProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { useMemo } from 'react';
|
|
3
2
|
import clsx from 'clsx';
|
|
3
|
+
import { useMemo } from 'react';
|
|
4
4
|
import { RadioTilesOption } from './radio-tiles-option.js';
|
|
5
5
|
import { RadioTilesContext } from './radio-tiles.context.js';
|
|
6
6
|
import styles from './radio-tiles.module.js';
|
|
@@ -12,6 +12,7 @@ const RadioTilesRoot = ({
|
|
|
12
12
|
variant = 'default',
|
|
13
13
|
columns,
|
|
14
14
|
disabled,
|
|
15
|
+
className,
|
|
15
16
|
'aria-label': ariaLabel,
|
|
16
17
|
'aria-labelledby': ariaLabelledBy,
|
|
17
18
|
onChange
|
|
@@ -22,7 +23,7 @@ const RadioTilesRoot = ({
|
|
|
22
23
|
const containerClassNames = clsx(styles.radioTiles, {
|
|
23
24
|
[styles.hasColumns]: Number(columns) > 0,
|
|
24
25
|
[variant === 'compact' ? styles.compact : styles.default]: true
|
|
25
|
-
});
|
|
26
|
+
}, className);
|
|
26
27
|
const contextValue = useMemo(() => ({
|
|
27
28
|
name,
|
|
28
29
|
selectedValue: value,
|
|
@@ -18,6 +18,7 @@ export type RadioTilesProps<T extends string | null = string | null> = {
|
|
|
18
18
|
columns?: number;
|
|
19
19
|
variant?: 'default' | 'compact';
|
|
20
20
|
disabled?: boolean;
|
|
21
|
+
className?: string;
|
|
21
22
|
onChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
22
23
|
} & (WithAriaLabel | WithAriaLabelledBy);
|
|
23
24
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/blueprint-web",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"publishConfig": {
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"react-stately": "^3.31.1",
|
|
64
64
|
"tsx": "^4.16.5"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "54b7ea2666cfeaedb3792148822d4b50578a565b",
|
|
67
67
|
"module": "lib-esm/index.js",
|
|
68
68
|
"main": "lib-esm/index.js",
|
|
69
69
|
"exports": {
|