@box/blueprint-web 7.23.0 → 7.24.1
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/lib-esm/combobox/combobox.js +4 -6
- package/lib-esm/combobox/types.d.ts +2 -5
- package/lib-esm/date-picker/date-picker.js +5 -2
- package/lib-esm/date-picker/types.d.ts +6 -3
- package/lib-esm/icon-toggle-button/icon-toggle-button.d.ts +4 -0
- package/lib-esm/icon-toggle-button/icon-toggle-button.js +34 -0
- package/lib-esm/icon-toggle-button/icon-toggle-button.module.js +4 -0
- package/lib-esm/icon-toggle-button/index.d.ts +2 -0
- package/lib-esm/icon-toggle-button/types.d.ts +28 -0
- package/lib-esm/index.css +69 -0
- package/lib-esm/index.d.ts +1 -0
- package/lib-esm/index.js +1 -0
- package/lib-esm/primitives/base-text-input/base-text-input.js +4 -6
- package/lib-esm/primitives/base-text-input/types.d.ts +2 -3
- package/lib-esm/primitives/icon-button/icon-button.d.ts +1 -1
- package/lib-esm/primitives/icon-button/icon-button.js +2 -4
- package/lib-esm/select/select.js +3 -5
- package/lib-esm/select/types.d.ts +2 -5
- package/lib-esm/text/types.d.ts +6 -3
- package/lib-esm/text-area/text-area.d.ts +2 -4
- package/lib-esm/text-area/text-area.js +4 -6
- package/lib-esm/text-area/types.d.ts +2 -3
- package/lib-esm/text-toggle-button/text-toggle-button.js +3 -24
- package/lib-esm/text-toggle-button/types.d.ts +2 -16
- package/lib-esm/util-components/base-toggle-button/base-toggle-button.d.ts +3 -0
- package/lib-esm/util-components/base-toggle-button/base-toggle-button.js +36 -0
- package/lib-esm/util-components/base-toggle-button/types.d.ts +17 -0
- package/lib-esm/util-components/labelable/index.d.ts +1 -0
- package/lib-esm/util-components/labelable/types.d.ts +15 -0
- package/lib-esm/util-components/labelable/useLabelable.d.ts +3 -0
- package/lib-esm/util-components/labelable/useLabelable.js +69 -0
- package/package.json +4 -5
|
@@ -11,9 +11,9 @@ import { InlineError } from '../primitives/inline-error/inline-error.js';
|
|
|
11
11
|
import { TextArea } from '../text-area/text-area.js';
|
|
12
12
|
import { useForkRef } from '../utils/useForkRef.js';
|
|
13
13
|
import { useUniqueId } from '../utils/useUniqueId.js';
|
|
14
|
-
import { VisuallyHidden } from '../visually-hidden/visually-hidden.js';
|
|
15
14
|
import { ChipsGroup } from './chips-group.js';
|
|
16
15
|
import styles from './combobox.module.js';
|
|
16
|
+
import { useLabelable } from '../util-components/labelable/useLabelable.js';
|
|
17
17
|
|
|
18
18
|
const getOptionValue = option => typeof option === 'string' ? option : option.value;
|
|
19
19
|
const getOptionFromValue = (value, options) => options.find(option => typeof option === 'string' ? option === value : option.value === value);
|
|
@@ -236,15 +236,13 @@ const RootInner = ({
|
|
|
236
236
|
const reference = useForkRef(inputRef, ref);
|
|
237
237
|
const showChipsGroup = Array.isArray(selectedValue) && selectedValue.length > 0;
|
|
238
238
|
const showComboboxCancelButton = clearButtonAriaLabel && (inputValue.length > 0 || (Array.isArray(selectedValue) ? selectedValue.length > 0 : !!selectedValue));
|
|
239
|
+
const Label = useLabelable(label, comboboxId);
|
|
239
240
|
const inputComponent = isInput ? jsxs(Fragment, {
|
|
240
|
-
children: [jsx(
|
|
241
|
+
children: [jsx(Label, {
|
|
241
242
|
className: clsx(styles.label, {
|
|
242
243
|
[styles.hiddenLabel]: hideLabel
|
|
243
244
|
}),
|
|
244
|
-
|
|
245
|
-
children: hideLabel ? jsx(VisuallyHidden, {
|
|
246
|
-
children: label
|
|
247
|
-
}) : label
|
|
245
|
+
hideLabel: hideLabel
|
|
248
246
|
}), jsx(PopoverAnchor, {
|
|
249
247
|
store: comboboxStore,
|
|
250
248
|
children: jsxs("div", {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { type SelectItemProps } from '@ariakit/react-core/select/select-item';
|
|
3
3
|
import { type SelectRendererProps } from '@ariakit/react-core/select/select-renderer';
|
|
4
4
|
import { type TextAreaProps } from '../text-area/types';
|
|
5
|
+
import { type Labelable } from '../util-components/labelable/types';
|
|
5
6
|
export type OptionValue = {
|
|
6
7
|
value: string;
|
|
7
8
|
disabled?: boolean;
|
|
@@ -9,11 +10,7 @@ export type OptionValue = {
|
|
|
9
10
|
export type SingleSelectComboboxValue<FreeInput, T> = FreeInput extends true ? string : T;
|
|
10
11
|
export type MultiSelectComboboxValue<FreeInput, T> = FreeInput extends true ? string[] : T[];
|
|
11
12
|
export type ComboboxValue<Multiple, FreeInput, T> = Multiple extends true ? MultiSelectComboboxValue<FreeInput, T> : SingleSelectComboboxValue<FreeInput, T>;
|
|
12
|
-
export interface ComboboxBaseProps<Multiple extends boolean, FreeInput extends boolean, T extends OptionValue> {
|
|
13
|
-
/**
|
|
14
|
-
* The label for the combobox.
|
|
15
|
-
*/
|
|
16
|
-
label: string;
|
|
13
|
+
export interface ComboboxBaseProps<Multiple extends boolean, FreeInput extends boolean, T extends OptionValue> extends Labelable {
|
|
17
14
|
/**
|
|
18
15
|
* The list of values for the combobox items.
|
|
19
16
|
*/
|
|
@@ -4,12 +4,13 @@ import { Gray65, Size4 } from '@box/blueprint-web-assets/tokens/tokens';
|
|
|
4
4
|
import * as RadixPopover from '@radix-ui/react-popover';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { forwardRef, useState, useEffect, useRef, useCallback } from 'react';
|
|
7
|
-
import { DatePicker as DatePicker$1,
|
|
7
|
+
import { DatePicker as DatePicker$1, Group, DateInput, DateSegment, Button } from 'react-aria-components';
|
|
8
8
|
import { Calendar as Calendar$1 } from '../primitives/calendar/calendar.js';
|
|
9
9
|
import '@internationalized/date';
|
|
10
10
|
import { IconButton } from '../primitives/icon-button/icon-button.js';
|
|
11
11
|
import { InlineError } from '../primitives/inline-error/inline-error.js';
|
|
12
12
|
import styles from './date-picker.module.js';
|
|
13
|
+
import { useLabelable } from '../util-components/labelable/useLabelable.js';
|
|
13
14
|
|
|
14
15
|
const XMarkIcon = label => () => jsx(XMark, {
|
|
15
16
|
"aria-label": label,
|
|
@@ -23,6 +24,7 @@ const DatePicker = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
23
24
|
onChange,
|
|
24
25
|
value,
|
|
25
26
|
defaultValue,
|
|
27
|
+
hideLabel = false,
|
|
26
28
|
label,
|
|
27
29
|
openCalendarDropdownAriaLabel,
|
|
28
30
|
clearDatePickerAriaLabel,
|
|
@@ -108,6 +110,7 @@ const DatePicker = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
108
110
|
}
|
|
109
111
|
}, []);
|
|
110
112
|
const displayValue = value !== undefined ? value : internalValue;
|
|
113
|
+
const Label = useLabelable(label, '');
|
|
111
114
|
return jsx(RadixPopover.Root, {
|
|
112
115
|
onOpenChange: setIsCalendarOpen,
|
|
113
116
|
open: isCalendarOpen,
|
|
@@ -124,7 +127,7 @@ const DatePicker = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
124
127
|
className: clsx(styles.label, {
|
|
125
128
|
[styles.disabled]: isDisabled
|
|
126
129
|
}),
|
|
127
|
-
|
|
130
|
+
hideLabel: hideLabel
|
|
128
131
|
}), jsx(RadixPopover.Anchor, {
|
|
129
132
|
asChild: true,
|
|
130
133
|
children: jsxs(Group, {
|
|
@@ -3,11 +3,14 @@ import { type DatePickerProps as RACDatePickerProps, type DateValue } from 'reac
|
|
|
3
3
|
import { type CalendarBase } from '../primitives/calendar/types';
|
|
4
4
|
import { type InputValueProps } from '../types/input-value-props';
|
|
5
5
|
import { type Modify } from '../types/modify';
|
|
6
|
-
|
|
6
|
+
import { type Labelable } from '../util-components/labelable/types';
|
|
7
|
+
interface DatePickerPropsBase extends Omit<RACDatePickerProps<DateValue>, 'children'>, Labelable {
|
|
7
8
|
/**
|
|
8
|
-
*
|
|
9
|
+
* When `true`, label text is hidden.
|
|
10
|
+
*
|
|
11
|
+
* @default false
|
|
9
12
|
*/
|
|
10
|
-
|
|
13
|
+
hideLabel?: boolean;
|
|
11
14
|
/**
|
|
12
15
|
* Aria label for button opening calendar in DatePicker
|
|
13
16
|
*/
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type IconToggleButtonProps } from './types';
|
|
3
|
+
export declare const iconSizeMap: Record<NonNullable<IconToggleButtonProps['size']>, string>;
|
|
4
|
+
export declare const IconToggleButton: import("react").ForwardRefExoticComponent<Omit<IconToggleButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Size4, Size5, Size6 } from '@box/blueprint-web-assets/tokens/tokens';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { forwardRef, createElement } from 'react';
|
|
5
|
+
import { BaseToggleButton } from '../util-components/base-toggle-button/base-toggle-button.js';
|
|
6
|
+
import styles from './icon-toggle-button.module.js';
|
|
7
|
+
|
|
8
|
+
const iconSizeMap = {
|
|
9
|
+
'x-small': Size4,
|
|
10
|
+
small: Size5,
|
|
11
|
+
medium: Size6
|
|
12
|
+
};
|
|
13
|
+
const IconToggleButton = /*#__PURE__*/forwardRef(({
|
|
14
|
+
className,
|
|
15
|
+
icon,
|
|
16
|
+
variant = 'default',
|
|
17
|
+
size = 'medium',
|
|
18
|
+
...rest
|
|
19
|
+
}, ref) => {
|
|
20
|
+
return jsx(BaseToggleButton, {
|
|
21
|
+
...rest,
|
|
22
|
+
ref: ref,
|
|
23
|
+
className: clsx(styles.iconToggleButton, styles[variant], styles[size], className),
|
|
24
|
+
children: /*#__PURE__*/createElement(icon, {
|
|
25
|
+
className: styles.icon,
|
|
26
|
+
height: iconSizeMap[size],
|
|
27
|
+
width: iconSizeMap[size],
|
|
28
|
+
role: 'presentation'
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
IconToggleButton.displayName = 'IconToggleButton';
|
|
33
|
+
|
|
34
|
+
export { IconToggleButton, iconSizeMap };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import '../index.css';
|
|
2
|
+
var styles = {"iconToggleButton":"bp_icon_toggle_button_module_iconToggleButton--bf96b","high-contrast":"bp_icon_toggle_button_module_high-contrast--bf96b","icon":"bp_icon_toggle_button_module_icon--bf96b","default":"bp_icon_toggle_button_module_default--bf96b","medium":"bp_icon_toggle_button_module_medium--bf96b","small":"bp_icon_toggle_button_module_small--bf96b","x-small":"bp_icon_toggle_button_module_x-small--bf96b"};
|
|
3
|
+
|
|
4
|
+
export { styles as default };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type FunctionComponent, type PropsWithChildren, type SVGProps } from 'react';
|
|
2
|
+
import { type BaseToggleButtonProps } from '../util-components/base-toggle-button/types';
|
|
3
|
+
export declare const IconToggleButtonSizes: readonly ["x-small", "small", "medium"];
|
|
4
|
+
export declare const IconButtonVariants: readonly ["default", "high-contrast"];
|
|
5
|
+
export type IconToggleButtonSize = (typeof IconToggleButtonSizes)[number];
|
|
6
|
+
export type IconButtonVariant = (typeof IconButtonVariants)[number];
|
|
7
|
+
export interface IconToggleButtonProps extends Omit<BaseToggleButtonProps, 'children'> {
|
|
8
|
+
/**
|
|
9
|
+
* Size of the button.
|
|
10
|
+
*
|
|
11
|
+
* @default 'medium'
|
|
12
|
+
*/
|
|
13
|
+
size?: IconToggleButtonSize;
|
|
14
|
+
/**
|
|
15
|
+
* The variant of the button.
|
|
16
|
+
*
|
|
17
|
+
* @default 'default'
|
|
18
|
+
*/
|
|
19
|
+
variant?: IconButtonVariant;
|
|
20
|
+
/**
|
|
21
|
+
* Accessible label for the button.
|
|
22
|
+
*/
|
|
23
|
+
'aria-label': NonNullable<BaseToggleButtonProps['aria-label']>;
|
|
24
|
+
/**
|
|
25
|
+
* Icon that will be rendered.
|
|
26
|
+
*/
|
|
27
|
+
icon: FunctionComponent<PropsWithChildren<SVGProps<SVGSVGElement>>>;
|
|
28
|
+
}
|
package/lib-esm/index.css
CHANGED
|
@@ -3464,6 +3464,75 @@
|
|
|
3464
3464
|
height:var(--size-8);
|
|
3465
3465
|
width:var(--size-8);
|
|
3466
3466
|
}
|
|
3467
|
+
|
|
3468
|
+
.bp_icon_toggle_button_module_iconToggleButton--bf96b{
|
|
3469
|
+
align-items:center;
|
|
3470
|
+
background:#0000;
|
|
3471
|
+
border:none;
|
|
3472
|
+
border-radius:var(--radius-2);
|
|
3473
|
+
color:var(--text-text-on-light);
|
|
3474
|
+
cursor:pointer;
|
|
3475
|
+
display:flex;
|
|
3476
|
+
font-family:Lato, -apple-system, BlinkMacSystemFont, "San Francisco", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
|
|
3477
|
+
font-size:.875rem;
|
|
3478
|
+
font-weight:400;
|
|
3479
|
+
justify-content:center;
|
|
3480
|
+
letter-spacing:.01875rem;
|
|
3481
|
+
line-height:1.25rem;
|
|
3482
|
+
outline:0;
|
|
3483
|
+
padding-inline:0;
|
|
3484
|
+
text-decoration:none;
|
|
3485
|
+
text-transform:none;
|
|
3486
|
+
}
|
|
3487
|
+
.bp_icon_toggle_button_module_iconToggleButton--bf96b:disabled{
|
|
3488
|
+
opacity:.3;
|
|
3489
|
+
pointer-events:none;
|
|
3490
|
+
}
|
|
3491
|
+
.bp_icon_toggle_button_module_iconToggleButton--bf96b:hover{
|
|
3492
|
+
background-color:var(--surface-toggle-surface-off-hover);
|
|
3493
|
+
}
|
|
3494
|
+
.bp_icon_toggle_button_module_iconToggleButton--bf96b[data-focus-visible]{
|
|
3495
|
+
outline:var(--border-2) solid var(--outline-focus-on-light);
|
|
3496
|
+
}
|
|
3497
|
+
.bp_icon_toggle_button_module_iconToggleButton--bf96b:active{
|
|
3498
|
+
background-color:var(--surface-toggle-surface-off-pressed);
|
|
3499
|
+
}
|
|
3500
|
+
.bp_icon_toggle_button_module_iconToggleButton--bf96b.bp_icon_toggle_button_module_high-contrast--bf96b .bp_icon_toggle_button_module_icon--bf96b *{
|
|
3501
|
+
fill:var(--icon-icon-on-light);
|
|
3502
|
+
}
|
|
3503
|
+
.bp_icon_toggle_button_module_iconToggleButton--bf96b.bp_icon_toggle_button_module_default--bf96b .bp_icon_toggle_button_module_icon--bf96b *{
|
|
3504
|
+
fill:var(--icon-icon-on-light-secondary);
|
|
3505
|
+
}
|
|
3506
|
+
.bp_icon_toggle_button_module_iconToggleButton--bf96b[aria-pressed=true]{
|
|
3507
|
+
background:var(--surface-toggle-surface-on);
|
|
3508
|
+
border:var(--border-1) solid var(--border-toggle-border-on);
|
|
3509
|
+
color:var(--text-text-on-dark);
|
|
3510
|
+
}
|
|
3511
|
+
.bp_icon_toggle_button_module_iconToggleButton--bf96b[aria-pressed=true] .bp_icon_toggle_button_module_icon--bf96b *{
|
|
3512
|
+
fill:var(--icon-icon-blue);
|
|
3513
|
+
}
|
|
3514
|
+
.bp_icon_toggle_button_module_iconToggleButton--bf96b[aria-pressed=true]:hover{
|
|
3515
|
+
background-color:var(--surface-toggle-surface-on-hover);
|
|
3516
|
+
}
|
|
3517
|
+
.bp_icon_toggle_button_module_iconToggleButton--bf96b[aria-pressed=true][data-focus-visible]{
|
|
3518
|
+
border:var(--border-1) solid #fff;
|
|
3519
|
+
outline:var(--border-2) solid var(--outline-focus-on-light);
|
|
3520
|
+
}
|
|
3521
|
+
.bp_icon_toggle_button_module_iconToggleButton--bf96b[aria-pressed=true]:active{
|
|
3522
|
+
background-color:var(--surface-toggle-surface-on-pressed);
|
|
3523
|
+
}
|
|
3524
|
+
.bp_icon_toggle_button_module_iconToggleButton--bf96b.bp_icon_toggle_button_module_medium--bf96b{
|
|
3525
|
+
height:var(--size-10);
|
|
3526
|
+
width:var(--size-10);
|
|
3527
|
+
}
|
|
3528
|
+
.bp_icon_toggle_button_module_iconToggleButton--bf96b.bp_icon_toggle_button_module_small--bf96b{
|
|
3529
|
+
height:var(--size-8);
|
|
3530
|
+
width:var(--size-8);
|
|
3531
|
+
}
|
|
3532
|
+
.bp_icon_toggle_button_module_iconToggleButton--bf96b.bp_icon_toggle_button_module_x-small--bf96b{
|
|
3533
|
+
height:var(--size-6);
|
|
3534
|
+
width:var(--size-6);
|
|
3535
|
+
}
|
|
3467
3536
|
table.bp_inline_table_module_inlineTable--b023b{
|
|
3468
3537
|
background:var(--gray-white);
|
|
3469
3538
|
border:var(--border-1) solid var(--gray-10);
|
package/lib-esm/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export * from './ghost';
|
|
|
19
19
|
export * from './grid-list-item';
|
|
20
20
|
export * from './guided-tooltip';
|
|
21
21
|
export * from './icon-dual-state-button';
|
|
22
|
+
export * from './icon-toggle-button';
|
|
22
23
|
export * from './inline-notice/inline-notice';
|
|
23
24
|
export * from './inline-table/inline-table';
|
|
24
25
|
export * from './input-chip';
|
package/lib-esm/index.js
CHANGED
|
@@ -23,6 +23,7 @@ export { GridList } from './grid-list-item/index.js';
|
|
|
23
23
|
export { GuidedTooltip } from './guided-tooltip/guided-tooltip.js';
|
|
24
24
|
export { GuidedTooltipContext } from './guided-tooltip/utils/guided-tooltip-context.js';
|
|
25
25
|
export { IconDualStateButton } from './icon-dual-state-button/icon-dual-state-button.js';
|
|
26
|
+
export { IconToggleButton } from './icon-toggle-button/icon-toggle-button.js';
|
|
26
27
|
export { InlineNotice } from './inline-notice/inline-notice.js';
|
|
27
28
|
export { InlineTable } from './inline-table/inline-table.js';
|
|
28
29
|
export { InputChip } from './input-chip/input-chip.js';
|
|
@@ -2,9 +2,9 @@ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { forwardRef, useMemo, cloneElement } from 'react';
|
|
4
4
|
import { useUniqueId } from '../../utils/useUniqueId.js';
|
|
5
|
-
import { VisuallyHidden } from '../../visually-hidden/visually-hidden.js';
|
|
6
5
|
import { InlineError } from '../inline-error/inline-error.js';
|
|
7
6
|
import styles from './base-text-input.module.js';
|
|
7
|
+
import { useLabelable } from '../../util-components/labelable/useLabelable.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* This extends a default HTML <input/> and accepts the same props as well as some custom ones listed below.<br/>
|
|
@@ -34,20 +34,18 @@ const BaseTextInput = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
34
34
|
const IconComponent = useMemo(() => icon && /*#__PURE__*/cloneElement(icon, {
|
|
35
35
|
className: clsx(icon.props?.className, styles.iconShared)
|
|
36
36
|
}), [icon]);
|
|
37
|
+
const Label = useLabelable(label, inputId);
|
|
37
38
|
return jsxs(Fragment, {
|
|
38
39
|
children: [jsxs("div", {
|
|
39
40
|
className: clsx([styles.textInputContainer], {
|
|
40
41
|
[styles.disabled]: disabled,
|
|
41
42
|
[styles.error]: shouldMarkError
|
|
42
43
|
}, className),
|
|
43
|
-
children: [jsx(
|
|
44
|
+
children: [jsx(Label, {
|
|
44
45
|
className: clsx([styles.label], {
|
|
45
46
|
[styles.hidden]: hideLabel
|
|
46
47
|
}),
|
|
47
|
-
|
|
48
|
-
children: hideLabel ? jsx(VisuallyHidden, {
|
|
49
|
-
children: label
|
|
50
|
-
}) : label
|
|
48
|
+
hideLabel: hideLabel
|
|
51
49
|
}), jsx("input", {
|
|
52
50
|
...rest,
|
|
53
51
|
...(hasError && {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
label: string;
|
|
2
|
+
import { type Labelable } from '../../util-components/labelable/types';
|
|
3
|
+
export type BaseTextInputProps = React.ComponentPropsWithRef<'input'> & Labelable & {
|
|
5
4
|
/** Input type, defaults to 'text' */
|
|
6
5
|
type?: 'text' | 'password';
|
|
7
6
|
/** When true label text is hidden */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const IconButton: import("react").ForwardRefExoticComponent<(Omit<import("./types").IconButtonVariantsProps, "ref"> | Omit<import("./types").IconButtonSmallUtilityVariantProps, "ref">) & import("react").RefAttributes<
|
|
2
|
+
export declare const IconButton: import("react").ForwardRefExoticComponent<(Omit<import("./types").IconButtonVariantsProps, "ref"> | Omit<import("./types").IconButtonSmallUtilityVariantProps, "ref">) & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { Button } from '@ariakit/react';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
-
import { forwardRef,
|
|
5
|
-
import { useForkRef } from '../../utils/useForkRef.js';
|
|
4
|
+
import { forwardRef, createElement } from 'react';
|
|
6
5
|
import styles from './icon-button.module.js';
|
|
7
6
|
import { iconSizeMap } from './utils.js';
|
|
8
7
|
|
|
@@ -13,10 +12,9 @@ const IconButton = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
13
12
|
icon,
|
|
14
13
|
...rest
|
|
15
14
|
} = props;
|
|
16
|
-
const ref = useRef(null);
|
|
17
15
|
return jsx(Button, {
|
|
18
16
|
...rest,
|
|
19
|
-
ref:
|
|
17
|
+
ref: forwardedRef,
|
|
20
18
|
className: clsx(styles.iconButton, styles[variant], styles[size], props.className),
|
|
21
19
|
children: /*#__PURE__*/createElement(icon, {
|
|
22
20
|
className: styles.icon,
|
package/lib-esm/select/select.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { Caret, Checkmark } from '@box/blueprint-web-assets/icons/Fill';
|
|
3
|
-
import { Label } from '@radix-ui/react-label';
|
|
4
3
|
import * as ScrollArea from '@radix-ui/react-scroll-area';
|
|
5
4
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
6
5
|
import clsx from 'clsx';
|
|
@@ -8,6 +7,7 @@ import { forwardRef, useCallback } from 'react';
|
|
|
8
7
|
import { InlineError } from '../primitives/inline-error/inline-error.js';
|
|
9
8
|
import { useUniqueId } from '../utils/useUniqueId.js';
|
|
10
9
|
import styles from './select.module.js';
|
|
10
|
+
import { useLabelable } from '../util-components/labelable/useLabelable.js';
|
|
11
11
|
|
|
12
12
|
const Root = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
13
13
|
const {
|
|
@@ -50,21 +50,19 @@ const Root = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
50
50
|
onValueChange,
|
|
51
51
|
onOpenChange: handleOnChange
|
|
52
52
|
};
|
|
53
|
+
const Label = useLabelable(label, selectId);
|
|
53
54
|
return jsxs("div", {
|
|
54
55
|
className: clsx(styles.container, {
|
|
55
56
|
[styles.disabled]: disabled
|
|
56
57
|
}, className),
|
|
57
58
|
children: [jsx(Label, {
|
|
58
59
|
className: styles.label,
|
|
59
|
-
|
|
60
|
-
htmlFor: selectId,
|
|
61
|
-
children: label
|
|
60
|
+
hideLabel: hideLabel
|
|
62
61
|
}), jsxs(SelectPrimitive.Root, {
|
|
63
62
|
...selectProps,
|
|
64
63
|
children: [jsxs(SelectPrimitive.Trigger, {
|
|
65
64
|
...triggerProps,
|
|
66
65
|
ref: forwardedRef,
|
|
67
|
-
"aria-label": label,
|
|
68
66
|
...(hasError && {
|
|
69
67
|
'aria-invalid': 'true'
|
|
70
68
|
}),
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { type SelectItemProps as RadixItemProps, type SelectContentProps as RadixSelectContentProps, type SelectProps as RadixSelectProps, type SelectTriggerProps as RadixSelectTriggerProps } from '@radix-ui/react-select';
|
|
2
2
|
import { type ReactElement } from 'react';
|
|
3
3
|
import { type Modify } from '../types/modify';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* The label for the select.
|
|
7
|
-
*/
|
|
8
|
-
label: string;
|
|
4
|
+
import { type Labelable } from '../util-components/labelable/types';
|
|
5
|
+
export interface ExtraProps extends Labelable {
|
|
9
6
|
/**
|
|
10
7
|
* The placeholder value displayed within the select trigger button when no values has been selected yet.
|
|
11
8
|
*/
|
package/lib-esm/text/types.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { type HTMLAttributes } from 'react';
|
|
1
|
+
import { type HTMLAttributes, type LabelHTMLAttributes } from 'react';
|
|
2
2
|
import { type StyledText } from '../utils/commonTypes';
|
|
3
3
|
type TypographyVariant = 'titleMondo' | 'titleXLarge' | 'titleLarge' | 'titleMedium' | 'titleSmall' | 'subtitle' | 'bodyLargeBold' | 'bodyLarge' | 'bodyDefaultBold' | 'bodyDefaultSemibold' | 'bodyDefault' | 'caption' | 'labelBold' | 'label';
|
|
4
4
|
type TypographyColors = 'textOnLightDefault' | 'textOnLightSecondary' | 'textOnLightLink' | 'textOnDarkDefault';
|
|
5
|
-
type Element = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'legend';
|
|
5
|
+
type Element = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'legend' | 'label';
|
|
6
6
|
interface HeadingProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
7
7
|
as: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
8
8
|
}
|
|
@@ -15,8 +15,11 @@ interface SpanProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
15
15
|
interface LegendProps extends HTMLAttributes<HTMLLegendElement> {
|
|
16
16
|
as: 'legend';
|
|
17
17
|
}
|
|
18
|
+
interface LabelProps extends LabelHTMLAttributes<HTMLLabelElement> {
|
|
19
|
+
as: 'label';
|
|
20
|
+
}
|
|
18
21
|
/** Supported HTML elements for text */
|
|
19
|
-
export type ElementTypes = HeadingProps | ParagraphProps | LegendProps | SpanProps;
|
|
22
|
+
export type ElementTypes = HeadingProps | ParagraphProps | LegendProps | SpanProps | LabelProps;
|
|
20
23
|
export type TextProps = {
|
|
21
24
|
/** The HTML element type which will render */
|
|
22
25
|
as: Element;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const TextArea: import("react").ForwardRefExoticComponent<(Omit<Omit<import("./text-area-autosize/types").TextareaAutosizeProps, "hasError"> & {
|
|
3
|
-
label: string;
|
|
2
|
+
export declare const TextArea: import("react").ForwardRefExoticComponent<(Omit<import("../util-components/labelable/types").Labelable & Omit<import("./text-area-autosize/types").TextareaAutosizeProps, "hasError"> & {
|
|
4
3
|
hideLabel?: boolean | undefined;
|
|
5
4
|
disabled?: boolean | undefined;
|
|
6
5
|
required?: boolean | undefined;
|
|
7
6
|
error?: import("react").ReactNode;
|
|
8
|
-
} & Required<Pick<import("./types").Loading, keyof import("./types").Loading>> & Omit<import("./types").Loading, keyof import("./types").Loading>, "ref"> | Omit<Omit<import("./text-area-autosize/types").TextareaAutosizeProps, "hasError"> & {
|
|
9
|
-
label: string;
|
|
7
|
+
} & Required<Pick<import("./types").Loading, keyof import("./types").Loading>> & Omit<import("./types").Loading, keyof import("./types").Loading>, "ref"> | Omit<import("../util-components/labelable/types").Labelable & Omit<import("./text-area-autosize/types").TextareaAutosizeProps, "hasError"> & {
|
|
10
8
|
hideLabel?: boolean | undefined;
|
|
11
9
|
disabled?: boolean | undefined;
|
|
12
10
|
required?: boolean | undefined;
|
|
@@ -3,9 +3,9 @@ import clsx from 'clsx';
|
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import { InlineError } from '../primitives/inline-error/inline-error.js';
|
|
5
5
|
import { useUniqueId } from '../utils/useUniqueId.js';
|
|
6
|
-
import { VisuallyHidden } from '../visually-hidden/visually-hidden.js';
|
|
7
6
|
import { TextAreaAutosize } from './text-area-autosize/text-area-autosize.js';
|
|
8
7
|
import styles from './text-area.module.js';
|
|
8
|
+
import { useLabelable } from '../util-components/labelable/useLabelable.js';
|
|
9
9
|
|
|
10
10
|
const TextArea = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
11
11
|
const {
|
|
@@ -22,19 +22,17 @@ const TextArea = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
22
22
|
} = props;
|
|
23
23
|
const textAreaId = useUniqueId('text-area-');
|
|
24
24
|
const hasError = !!error && !disabled;
|
|
25
|
+
const Label = useLabelable(label, textAreaId);
|
|
25
26
|
return jsxs("div", {
|
|
26
27
|
className: clsx([styles.textAreaContainer], {
|
|
27
28
|
[styles.disabled]: disabled,
|
|
28
29
|
[styles.error]: hasError
|
|
29
30
|
}, className),
|
|
30
|
-
children: [jsx(
|
|
31
|
+
children: [jsx(Label, {
|
|
31
32
|
className: clsx([styles.label], {
|
|
32
33
|
[styles.hidden]: hideLabel
|
|
33
34
|
}),
|
|
34
|
-
|
|
35
|
-
children: hideLabel ? jsx(VisuallyHidden, {
|
|
36
|
-
children: label
|
|
37
|
-
}) : label
|
|
35
|
+
hideLabel: hideLabel
|
|
38
36
|
}), jsx(TextAreaAutosize, {
|
|
39
37
|
...rest,
|
|
40
38
|
ref: forwardedRef,
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type RequireAllOrNone } from 'type-fest';
|
|
3
3
|
import { type TextareaAutosizeProps } from './text-area-autosize/types';
|
|
4
|
+
import { type Labelable } from '../util-components/labelable/types';
|
|
4
5
|
export interface Loading {
|
|
5
6
|
/** When `true` TextArea is rendered with loading indicator. When this is true `loadingAriaLabel` must also be provided. */
|
|
6
7
|
loading?: boolean;
|
|
7
8
|
/** The aria-label for the loading indicator. */
|
|
8
9
|
loadingAriaLabel?: string;
|
|
9
10
|
}
|
|
10
|
-
export type TextAreaProps = Omit<TextareaAutosizeProps, 'hasError'> & {
|
|
11
|
-
/** The label for text area */
|
|
12
|
-
label: string;
|
|
11
|
+
export type TextAreaProps = Labelable & Omit<TextareaAutosizeProps, 'hasError'> & {
|
|
13
12
|
/** When true label text is hidden */
|
|
14
13
|
hideLabel?: boolean;
|
|
15
14
|
/** When true prevents user interaction with text area */
|
|
@@ -1,38 +1,17 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { Button } from '@ariakit/react';
|
|
3
2
|
import clsx from 'clsx';
|
|
4
3
|
import { forwardRef } from 'react';
|
|
5
|
-
import {
|
|
6
|
-
import { useControllableState } from '../utils/useControllableState.js';
|
|
4
|
+
import { BaseToggleButton } from '../util-components/base-toggle-button/base-toggle-button.js';
|
|
7
5
|
import styles from './text-toggle-button.module.js';
|
|
8
6
|
|
|
9
7
|
const TextToggleButton = /*#__PURE__*/forwardRef(({
|
|
10
|
-
pressed: pressedProp,
|
|
11
|
-
defaultPressed = false,
|
|
12
|
-
onPressedChange,
|
|
13
|
-
disabled,
|
|
14
|
-
onClick,
|
|
15
8
|
className,
|
|
16
9
|
...rest
|
|
17
10
|
}, ref) => {
|
|
18
|
-
|
|
19
|
-
prop: pressedProp,
|
|
20
|
-
onChange: onPressedChange,
|
|
21
|
-
defaultProp: defaultPressed
|
|
22
|
-
});
|
|
23
|
-
return jsx(Button, {
|
|
24
|
-
"aria-pressed": pressed,
|
|
25
|
-
"data-disabled": disabled ? '' : undefined,
|
|
26
|
-
"data-state": pressed ? 'on' : 'off',
|
|
11
|
+
return jsx(BaseToggleButton, {
|
|
27
12
|
...rest,
|
|
28
13
|
ref: ref,
|
|
29
|
-
className: clsx(styles.textToggleButton, className)
|
|
30
|
-
disabled: disabled,
|
|
31
|
-
onClick: composeEventHandlers(onClick, () => {
|
|
32
|
-
if (!disabled) {
|
|
33
|
-
setPressed(!pressed);
|
|
34
|
-
}
|
|
35
|
-
})
|
|
14
|
+
className: clsx(styles.textToggleButton, className)
|
|
36
15
|
});
|
|
37
16
|
});
|
|
38
17
|
TextToggleButton.displayName = 'TextToggleButton';
|
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
export interface TextToggleButtonProps extends
|
|
1
|
+
import { type BaseToggleButtonProps } from '../util-components/base-toggle-button/types';
|
|
2
|
+
export interface TextToggleButtonProps extends BaseToggleButtonProps {
|
|
3
3
|
/**
|
|
4
4
|
* The text content of the button.
|
|
5
5
|
*/
|
|
6
6
|
children: string;
|
|
7
|
-
/**
|
|
8
|
-
* The controlled state of the toggle.
|
|
9
|
-
*/
|
|
10
|
-
pressed?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* The state of the toggle when initially rendered. Use `defaultPressed`
|
|
13
|
-
* if you do not need to control the state of the toggle.
|
|
14
|
-
* @defaultValue false
|
|
15
|
-
*/
|
|
16
|
-
defaultPressed?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* The callback that fires when the state of the toggle changes.
|
|
19
|
-
*/
|
|
20
|
-
onPressedChange?(pressed: boolean): void;
|
|
21
7
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Button } from '@ariakit/react';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { composeEventHandlers } from '../../utils/composeEventHandlers.js';
|
|
5
|
+
import { useControllableState } from '../../utils/useControllableState.js';
|
|
6
|
+
|
|
7
|
+
const BaseToggleButton = /*#__PURE__*/forwardRef(({
|
|
8
|
+
pressed: pressedProp,
|
|
9
|
+
defaultPressed = false,
|
|
10
|
+
onPressedChange,
|
|
11
|
+
disabled,
|
|
12
|
+
onClick,
|
|
13
|
+
...rest
|
|
14
|
+
}, ref) => {
|
|
15
|
+
const [pressed = false, setPressed] = useControllableState({
|
|
16
|
+
prop: pressedProp,
|
|
17
|
+
onChange: onPressedChange,
|
|
18
|
+
defaultProp: defaultPressed
|
|
19
|
+
});
|
|
20
|
+
return jsx(Button, {
|
|
21
|
+
...rest,
|
|
22
|
+
ref: ref,
|
|
23
|
+
"aria-pressed": pressed,
|
|
24
|
+
"data-disabled": disabled ? '' : undefined,
|
|
25
|
+
"data-state": pressed ? 'on' : 'off',
|
|
26
|
+
disabled: disabled,
|
|
27
|
+
onClick: composeEventHandlers(onClick, () => {
|
|
28
|
+
if (!disabled) {
|
|
29
|
+
setPressed(!pressed);
|
|
30
|
+
}
|
|
31
|
+
})
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
BaseToggleButton.displayName = 'BaseToggleButton';
|
|
35
|
+
|
|
36
|
+
export { BaseToggleButton };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ButtonProps as AriakitButtonProps } from '@ariakit/react';
|
|
2
|
+
export interface BaseToggleButtonProps extends AriakitButtonProps {
|
|
3
|
+
/**
|
|
4
|
+
* The controlled state of the toggle.
|
|
5
|
+
*/
|
|
6
|
+
pressed?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* The state of the toggle when initially rendered. Use `defaultPressed`
|
|
9
|
+
* if you do not need to control the state of the toggle.
|
|
10
|
+
* @defaultValue false
|
|
11
|
+
*/
|
|
12
|
+
defaultPressed?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* The callback that fires when the state of the toggle changes.
|
|
15
|
+
*/
|
|
16
|
+
onPressedChange?(pressed: boolean): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useLabelable';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export type RenderProp<P = React.HTMLAttributes<never> & {
|
|
3
|
+
ref?: React.Ref<never>;
|
|
4
|
+
}> = (props: P) => React.ReactElement;
|
|
5
|
+
type HtmlForable = Pick<React.LabelHTMLAttributes<HTMLLabelElement>, 'htmlFor'>;
|
|
6
|
+
export interface Labelable {
|
|
7
|
+
label: string | React.ReactElement<HtmlForable> | RenderProp<HtmlForable>;
|
|
8
|
+
}
|
|
9
|
+
export interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
|
|
10
|
+
htmlFor: string;
|
|
11
|
+
hideLabel?: boolean;
|
|
12
|
+
ref: React.ForwardedRef<HTMLLabelElement>;
|
|
13
|
+
elementType?: 'span' | 'label';
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type Labelable, type LabelProps } from './types';
|
|
3
|
+
export declare const useLabelable: (label: Labelable['label'], inputId: string) => import("react").ForwardRefExoticComponent<Omit<Omit<LabelProps, "htmlFor">, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useMemo, forwardRef } from 'react';
|
|
3
|
+
import { Role } from '@ariakit/react';
|
|
4
|
+
import { useContextProps, LabelContext } from 'react-aria-components';
|
|
5
|
+
import { VisuallyHidden } from '../../visually-hidden/visually-hidden.js';
|
|
6
|
+
|
|
7
|
+
const useLabelable = (label, inputId) => {
|
|
8
|
+
return useMemo(() => {
|
|
9
|
+
const Label = /*#__PURE__*/forwardRef((props, ref) => {
|
|
10
|
+
// If this component is rendered within LabelContext from RAC, we can have props like htmlFor, id, elementType.
|
|
11
|
+
[props, ref] = useContextProps(props, ref, LabelContext);
|
|
12
|
+
const {
|
|
13
|
+
hideLabel,
|
|
14
|
+
elementType = 'label',
|
|
15
|
+
...rest
|
|
16
|
+
} = props;
|
|
17
|
+
const labelProps = {
|
|
18
|
+
...rest,
|
|
19
|
+
htmlFor: inputId,
|
|
20
|
+
ref
|
|
21
|
+
};
|
|
22
|
+
if (!label) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
if (typeof label === 'string') {
|
|
26
|
+
if (elementType === 'label') {
|
|
27
|
+
return hideLabel ? jsx(VisuallyHidden, {
|
|
28
|
+
render: jsx(Role.label, {
|
|
29
|
+
...labelProps,
|
|
30
|
+
children: label
|
|
31
|
+
})
|
|
32
|
+
}) : jsx(Role.label, {
|
|
33
|
+
...labelProps,
|
|
34
|
+
children: label
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
return hideLabel ? jsx(VisuallyHidden, {
|
|
38
|
+
render: jsx(Role.span, {
|
|
39
|
+
...rest,
|
|
40
|
+
ref: ref,
|
|
41
|
+
children: label
|
|
42
|
+
})
|
|
43
|
+
}) : jsx(Role.span, {
|
|
44
|
+
...rest,
|
|
45
|
+
ref: ref,
|
|
46
|
+
children: label
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return elementType === 'label' ? jsx(Role.label, {
|
|
50
|
+
...labelProps,
|
|
51
|
+
// @ts-expect-error: Otherwise we have a conflict of HTMLAttributes and our Blueprint components props.
|
|
52
|
+
render: hideLabel ? jsx(VisuallyHidden, {
|
|
53
|
+
render: label
|
|
54
|
+
}) : label
|
|
55
|
+
}) : jsx(Role.span, {
|
|
56
|
+
...rest,
|
|
57
|
+
ref: ref,
|
|
58
|
+
// @ts-expect-error: Otherwise we have a conflict of HTMLAttributes and our Blueprint components props.
|
|
59
|
+
render: hideLabel ? jsx(VisuallyHidden, {
|
|
60
|
+
render: label
|
|
61
|
+
}) : label
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
Label.displayName = 'Label';
|
|
65
|
+
return Label;
|
|
66
|
+
}, [label, inputId]);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export { useLabelable };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/blueprint-web",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.24.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"publishConfig": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@ariakit/react": "0.4.5",
|
|
26
26
|
"@ariakit/react-core": "0.4.5",
|
|
27
|
-
"@box/blueprint-web-assets": "^4.21.
|
|
27
|
+
"@box/blueprint-web-assets": "^4.21.5",
|
|
28
28
|
"@internationalized/date": "^3.5.4",
|
|
29
29
|
"@radix-ui/react-accordion": "1.1.2",
|
|
30
30
|
"@radix-ui/react-checkbox": "1.0.4",
|
|
@@ -32,7 +32,6 @@
|
|
|
32
32
|
"@radix-ui/react-context-menu": "2.1.5",
|
|
33
33
|
"@radix-ui/react-dialog": "1.0.5",
|
|
34
34
|
"@radix-ui/react-dropdown-menu": "2.0.6",
|
|
35
|
-
"@radix-ui/react-label": "2.0.2",
|
|
36
35
|
"@radix-ui/react-popover": "1.0.7",
|
|
37
36
|
"@radix-ui/react-radio-group": "1.1.3",
|
|
38
37
|
"@radix-ui/react-scroll-area": "1.0.5",
|
|
@@ -55,7 +54,7 @@
|
|
|
55
54
|
"type-fest": "^3.2.0"
|
|
56
55
|
},
|
|
57
56
|
"devDependencies": {
|
|
58
|
-
"@box/storybook-utils": "^0.
|
|
57
|
+
"@box/storybook-utils": "^0.6.1",
|
|
59
58
|
"@types/react": "^18.0.0",
|
|
60
59
|
"@types/react-dom": "^18.0.0",
|
|
61
60
|
"react": "^18.3.0",
|
|
@@ -63,7 +62,7 @@
|
|
|
63
62
|
"react-stately": "^3.31.1",
|
|
64
63
|
"tsx": "^4.16.5"
|
|
65
64
|
},
|
|
66
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "bb2a831c3e3b11c1af207a693263069f26f7076a",
|
|
67
66
|
"module": "lib-esm/index.js",
|
|
68
67
|
"main": "lib-esm/index.js",
|
|
69
68
|
"exports": {
|