@bspk/ui 1.3.4 → 1.3.5
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/Avatar/Avatar.d.ts +3 -3
- package/dist/components/Avatar/Avatar.js +8 -8
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Avatar/AvatarExample.js +1 -1
- package/dist/components/Avatar/AvatarExample.js.map +1 -1
- package/dist/components/Avatar/avatar.css +5 -1
- package/dist/components/Avatar/avatar.css.js +5 -1
- package/dist/components/AvatarGroup/AvatarGroup.d.ts +11 -6
- package/dist/components/AvatarGroup/AvatarGroup.js +5 -6
- package/dist/components/AvatarGroup/AvatarGroup.js.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroupExample.js +36 -9
- package/dist/components/AvatarGroup/AvatarGroupExample.js.map +1 -1
- package/dist/components/AvatarGroup/Overflow.d.ts +11 -0
- package/dist/components/AvatarGroup/Overflow.js +37 -0
- package/dist/components/AvatarGroup/Overflow.js.map +1 -0
- package/dist/components/AvatarGroup/avatar-group.css +27 -13
- package/dist/components/AvatarGroup/avatar-group.css.js +27 -13
- package/dist/components/Badge/BadgeExample.js +1 -1
- package/dist/components/Badge/BadgeExample.js.map +1 -1
- package/dist/components/BadgeDot/BadgeDotExample.js +1 -1
- package/dist/components/BadgeDot/BadgeDotExample.js.map +1 -1
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/Card/Card.d.ts +2 -1
- package/dist/components/Card/Card.js +2 -2
- package/dist/components/Card/Card.js.map +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +4 -4
- package/dist/components/CheckboxGroup/CheckboxGroup.js +4 -4
- package/dist/components/CheckboxGroupField/CheckboxGroupField.d.ts +1 -1
- package/dist/components/CheckboxGroupField/CheckboxGroupField.js +2 -2
- package/dist/components/CheckboxGroupField/CheckboxGroupField.js.map +1 -1
- package/dist/components/CheckboxOption/CheckboxOption.d.ts +3 -2
- package/dist/components/CheckboxOption/CheckboxOption.js +2 -2
- package/dist/components/CheckboxOption/CheckboxOption.js.map +1 -1
- package/dist/components/DatePickerField/DatePickerField.d.ts +1 -1
- package/dist/components/DatePickerField/DatePickerField.js +2 -2
- package/dist/components/DatePickerField/DatePickerField.js.map +1 -1
- package/dist/components/Fab/Fab.d.ts +2 -2
- package/dist/components/Fab/Fab.js.map +1 -1
- package/dist/components/FormField/FormField.d.ts +3 -2
- package/dist/components/FormField/FormField.js +2 -2
- package/dist/components/FormField/FormField.js.map +1 -1
- package/dist/components/InputField/InputField.d.ts +1 -1
- package/dist/components/InputField/InputField.js +2 -2
- package/dist/components/InputField/InputField.js.map +1 -1
- package/dist/components/InputNumberField/InputNumberField.d.ts +1 -1
- package/dist/components/InputNumberField/InputNumberField.js +2 -2
- package/dist/components/InputNumberField/InputNumberField.js.map +1 -1
- package/dist/components/InputPhoneField/InputPhoneField.d.ts +1 -1
- package/dist/components/InputPhoneField/InputPhoneField.js +2 -2
- package/dist/components/InputPhoneField/InputPhoneField.js.map +1 -1
- package/dist/components/Layout/Layout.d.ts +2 -2
- package/dist/components/Layout/Layout.js.map +1 -1
- package/dist/components/ListItem/ListItem.d.ts +1 -1
- package/dist/components/Menu/Menu.d.ts +8 -1
- package/dist/components/Menu/Menu.js +1 -1
- package/dist/components/Menu/Menu.js.map +1 -1
- package/dist/components/Menu/MenuExample.js +1 -1
- package/dist/components/Menu/MenuExample.js.map +1 -1
- package/dist/components/PasswordField/PasswordField.d.ts +1 -1
- package/dist/components/PasswordField/PasswordField.js +2 -2
- package/dist/components/PasswordField/PasswordField.js.map +1 -1
- package/dist/components/ProgressCircle/progress-circle.css +2 -0
- package/dist/components/ProgressCircle/progress-circle.css.js +2 -0
- package/dist/components/RadioGroup/RadioGroup.js +3 -3
- package/dist/components/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/components/RadioGroupField/RadioGroupField.d.ts +1 -1
- package/dist/components/RadioGroupField/RadioGroupField.js +2 -2
- package/dist/components/RadioGroupField/RadioGroupField.js.map +1 -1
- package/dist/components/SearchBar/SearchBar.d.ts +2 -2
- package/dist/components/SearchBar/SearchBar.js +2 -2
- package/dist/components/SearchBar/SearchBar.js.map +1 -1
- package/dist/components/Select/Select.d.ts +9 -2
- package/dist/components/Select/Select.js +4 -3
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/Select/SelectExample.js +36 -1
- package/dist/components/Select/SelectExample.js.map +1 -1
- package/dist/components/SelectField/SelectField.d.ts +1 -1
- package/dist/components/SelectField/SelectField.js +2 -2
- package/dist/components/SelectField/SelectField.js.map +1 -1
- package/dist/components/SkeletonText/SkeletonText.js +1 -1
- package/dist/components/SkeletonText/SkeletonText.js.map +1 -1
- package/dist/components/Slider/slider.css +1 -0
- package/dist/components/Slider/slider.css.js +1 -0
- package/dist/components/Textarea/Textarea.d.ts +3 -9
- package/dist/components/Textarea/Textarea.js +2 -2
- package/dist/components/Textarea/Textarea.js.map +1 -1
- package/dist/components/TextareaField/TextareaField.d.ts +1 -1
- package/dist/components/TextareaField/TextareaField.js +2 -2
- package/dist/components/TextareaField/TextareaField.js.map +1 -1
- package/dist/components/TimePicker/TimePicker.js +10 -4
- package/dist/components/TimePicker/TimePicker.js.map +1 -1
- package/dist/components/TimePickerField/TimePickerField.d.ts +1 -1
- package/dist/components/TimePickerField/TimePickerField.js +2 -2
- package/dist/components/TimePickerField/TimePickerField.js.map +1 -1
- package/dist/components/ToggleOption/ToggleOption.d.ts +3 -3
- package/dist/components/ToggleOption/ToggleOption.js +2 -2
- package/dist/components/ToggleOption/ToggleOption.js.map +1 -1
- package/dist/components/Truncated/Truncated.d.ts +2 -2
- package/dist/components/Truncated/Truncated.js.map +1 -1
- package/dist/components/Txt/Txt.d.ts +2 -2
- package/dist/components/Txt/Txt.js.map +1 -1
- package/dist/hooks/useArrowNavigation.d.ts +0 -2
- package/dist/hooks/useArrowNavigation.js +0 -2
- package/dist/hooks/useArrowNavigation.js.map +1 -1
- package/dist/hooks/useCheckboxGroupState.d.ts +7 -10
- package/dist/hooks/useCheckboxGroupState.js +7 -10
- package/dist/hooks/useCheckboxGroupState.js.map +1 -1
- package/dist/hooks/useFloating.js +8 -7
- package/dist/hooks/useFloating.js.map +1 -1
- package/dist/styles/base.css +4 -0
- package/dist/styles/base.css.js +4 -0
- package/dist/types/common.d.ts +12 -1
- package/dist/types/common.js.map +1 -1
- package/meta.ts +4 -4
- package/package.json +1 -3
- package/src/components/Avatar/Avatar.tsx +10 -11
- package/src/components/Avatar/AvatarExample.tsx +1 -1
- package/src/components/Avatar/avatar.scss +6 -1
- package/src/components/AvatarGroup/AvatarGroup.tsx +20 -24
- package/src/components/AvatarGroup/AvatarGroupExample.tsx +35 -9
- package/src/components/AvatarGroup/Overflow.tsx +91 -0
- package/src/components/AvatarGroup/avatar-group.scss +34 -14
- package/src/components/Badge/BadgeExample.tsx +1 -1
- package/src/components/BadgeDot/BadgeDotExample.tsx +1 -1
- package/src/components/Button/Button.tsx +2 -2
- package/src/components/Card/Card.tsx +3 -2
- package/src/components/CheckboxGroup/CheckboxGroup.tsx +4 -4
- package/src/components/CheckboxGroupField/CheckboxGroupField.tsx +3 -2
- package/src/components/CheckboxOption/CheckboxOption.tsx +4 -1
- package/src/components/DatePickerField/DatePickerField.tsx +8 -1
- package/src/components/Fab/Fab.tsx +2 -2
- package/src/components/FormField/FormField.tsx +13 -3
- package/src/components/InputField/InputField.tsx +15 -2
- package/src/components/InputNumberField/InputNumberField.tsx +8 -1
- package/src/components/InputPhoneField/InputPhoneField.tsx +8 -1
- package/src/components/Layout/Layout.tsx +2 -2
- package/src/components/ListItem/ListItem.tsx +1 -1
- package/src/components/Menu/Menu.tsx +9 -1
- package/src/components/Menu/MenuExample.tsx +1 -1
- package/src/components/PasswordField/PasswordField.tsx +15 -2
- package/src/components/ProgressCircle/progress-circle.scss +2 -0
- package/src/components/RadioGroup/RadioGroup.tsx +18 -20
- package/src/components/RadioGroupField/RadioGroupField.tsx +2 -1
- package/src/components/SearchBar/SearchBar.tsx +3 -1
- package/src/components/Select/Select.tsx +12 -3
- package/src/components/Select/SelectExample.tsx +36 -1
- package/src/components/SelectField/SelectField.tsx +15 -2
- package/src/components/SkeletonText/SkeletonText.tsx +1 -1
- package/src/components/Slider/slider.scss +1 -0
- package/src/components/Textarea/Textarea.tsx +34 -39
- package/src/components/TextareaField/TextareaField.tsx +15 -2
- package/src/components/TimePicker/TimePicker.tsx +13 -3
- package/src/components/TimePickerField/TimePickerField.tsx +8 -1
- package/src/components/ToggleOption/ToggleOption.tsx +20 -19
- package/src/components/Truncated/Truncated.tsx +2 -2
- package/src/components/Txt/Txt.tsx +2 -2
- package/src/hooks/useArrowNavigation.ts +0 -2
- package/src/hooks/useCheckboxGroupState.ts +7 -10
- package/src/hooks/useFloating.ts +8 -7
- package/src/styles/base.scss +4 -0
- package/src/types/common.ts +11 -0
- package/dist/components/MenuButton/MenuButton.d.ts +0 -19
- package/dist/components/MenuButton/MenuButton.js +0 -20
- package/dist/components/MenuButton/MenuButton.js.map +0 -1
- package/dist/components/MenuButton/index.d.ts +0 -1
- package/dist/components/MenuButton/index.js +0 -2
- package/dist/components/MenuButton/index.js.map +0 -1
- package/dist/components/MenuButton/menu-button.css +0 -16
- package/dist/components/MenuButton/menu-button.css.js +0 -21
- package/src/components/MenuButton/MenuButton.rtl.test.tsx +0 -15
- package/src/components/MenuButton/MenuButton.tsx +0 -29
- package/src/components/MenuButton/index.tsx +0 -1
- package/src/components/MenuButton/menu-button.scss +0 -16
|
@@ -11,7 +11,7 @@ import { Field, FieldDescription, FieldError, FieldLabel } from '../Field';
|
|
|
11
11
|
*
|
|
12
12
|
* @generated
|
|
13
13
|
*/
|
|
14
|
-
export function CheckboxGroupField({ label, helperText, labelTrailing, errorMessage, ...controlProps }) {
|
|
15
|
-
return (_jsxs(Field, { as: "fieldset", children: [_jsx(FieldLabel, { as: "legend", labelTrailing: labelTrailing, children: label }), _jsx(CheckboxGroup, { ...controlProps }), !errorMessage && helperText && _jsx(FieldDescription, { children: helperText }), errorMessage && _jsx(FieldError, { children: errorMessage })] }));
|
|
14
|
+
export function CheckboxGroupField({ label, helperText, labelTrailing, errorMessage, style, ...controlProps }) {
|
|
15
|
+
return (_jsxs(Field, { as: "fieldset", style: style, children: [_jsx(FieldLabel, { as: "legend", labelTrailing: labelTrailing, style: style, children: label }), _jsx(CheckboxGroup, { ...controlProps }), !errorMessage && helperText && _jsx(FieldDescription, { children: helperText }), errorMessage && _jsx(FieldError, { children: errorMessage })] }));
|
|
16
16
|
}
|
|
17
17
|
//# sourceMappingURL=CheckboxGroupField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxGroupField.js","sourceRoot":"","sources":["../../../src/components/CheckboxGroupField/CheckboxGroupField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAsB,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAKrF;;;;;;;;;GASG;AACH,MAAM,UAAU,kBAAkB,CAAC,EAC/B,KAAK,EACL,UAAU,EACV,aAAa,EACb,YAAY,EACZ,GAAG,YAAY,EACO;IACtB,OAAO,CACH,MAAC,KAAK,IAAC,EAAE,EAAC,UAAU,
|
|
1
|
+
{"version":3,"file":"CheckboxGroupField.js","sourceRoot":"","sources":["../../../src/components/CheckboxGroupField/CheckboxGroupField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAsB,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAKrF;;;;;;;;;GASG;AACH,MAAM,UAAU,kBAAkB,CAAC,EAC/B,KAAK,EACL,UAAU,EACV,aAAa,EACb,YAAY,EACZ,KAAK,EACL,GAAG,YAAY,EACO;IACtB,OAAO,CACH,MAAC,KAAK,IAAC,EAAE,EAAC,UAAU,EAAC,KAAK,EAAE,KAAK,aAC7B,KAAC,UAAU,IAAC,EAAE,EAAC,QAAQ,EAAC,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,YAC7D,KAAK,GACG,EACb,KAAC,aAAa,OAAK,YAAY,GAAI,EAClC,CAAC,YAAY,IAAI,UAAU,IAAI,KAAC,gBAAgB,cAAE,UAAU,GAAoB,EAChF,YAAY,IAAI,KAAC,UAAU,cAAE,YAAY,GAAc,IACpD,CACX,CAAC;AACN,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CheckboxProps } from '-/components/Checkbox';
|
|
2
2
|
import { ToggleOptionControlProps } from '-/components/ToggleOption';
|
|
3
|
-
|
|
3
|
+
import { CommonProps } from '-/types/common';
|
|
4
|
+
export type CheckboxOptionProps = CommonProps<'style'> & ToggleOptionControlProps<CheckboxProps>;
|
|
4
5
|
/**
|
|
5
6
|
* A control that allows users to choose one or more items from a list or turn an feature on or off.
|
|
6
7
|
*
|
|
@@ -29,5 +30,5 @@ export type CheckboxOptionProps = ToggleOptionControlProps<CheckboxProps>;
|
|
|
29
30
|
* @name CheckboxOption
|
|
30
31
|
* @phase UXReview
|
|
31
32
|
*/
|
|
32
|
-
export declare function CheckboxOption({ label: labelProp, description, disabled, readOnly, ...checkboxProps }: CheckboxOptionProps): "" | import("react/jsx-runtime").JSX.Element | undefined;
|
|
33
|
+
export declare function CheckboxOption({ label: labelProp, description, disabled, readOnly, style, ...checkboxProps }: CheckboxOptionProps): "" | import("react/jsx-runtime").JSX.Element | undefined;
|
|
33
34
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -29,9 +29,9 @@ import { ToggleOption } from '../ToggleOption';
|
|
|
29
29
|
* @name CheckboxOption
|
|
30
30
|
* @phase UXReview
|
|
31
31
|
*/
|
|
32
|
-
export function CheckboxOption({ label: labelProp, description, disabled, readOnly, ...checkboxProps }) {
|
|
32
|
+
export function CheckboxOption({ label: labelProp, description, disabled, readOnly, style, ...checkboxProps }) {
|
|
33
33
|
const label = labelProp || description;
|
|
34
34
|
const ariaLabel = description ? `${labelProp} - ${description}` : labelProp;
|
|
35
|
-
return (label && (_jsx(ToggleOption, { "data-bspk": "checkbox-option", description: description, disabled: disabled, label: label, readOnly: readOnly, children: _jsx(Checkbox, { ...checkboxProps, "aria-label": ariaLabel, disabled: disabled, readOnly: readOnly }) })));
|
|
35
|
+
return (label && (_jsx(ToggleOption, { "data-bspk": "checkbox-option", description: description, disabled: disabled, label: label, readOnly: readOnly, style: style, children: _jsx(Checkbox, { ...checkboxProps, "aria-label": ariaLabel, disabled: disabled, readOnly: readOnly }) })));
|
|
36
36
|
}
|
|
37
37
|
//# sourceMappingURL=CheckboxOption.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxOption.js","sourceRoot":"","sources":["../../../src/components/CheckboxOption/CheckboxOption.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAiB,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,YAAY,EAA4B,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"CheckboxOption.js","sourceRoot":"","sources":["../../../src/components/CheckboxOption/CheckboxOption.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAiB,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,YAAY,EAA4B,MAAM,2BAA2B,CAAC;AAKnF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,UAAU,cAAc,CAAC,EAC3B,KAAK,EAAE,SAAS,EAChB,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,GAAG,aAAa,EACE;IAClB,MAAM,KAAK,GAAG,SAAS,IAAI,WAAW,CAAC;IACvC,MAAM,SAAS,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,SAAS,MAAM,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IAC5E,OAAO,CACH,KAAK,IAAI,CACL,KAAC,YAAY,iBACC,iBAAiB,EAC3B,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,YAEZ,KAAC,QAAQ,OAAK,aAAa,gBAAc,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,GAAI,GACnF,CAClB,CACJ,CAAC;AACN,CAAC"}
|
|
@@ -11,5 +11,5 @@ export type DatePickerFieldProps = FormFieldControlProps<DatePickerProps>;
|
|
|
11
11
|
*
|
|
12
12
|
* @generated
|
|
13
13
|
*/
|
|
14
|
-
export declare function DatePickerField({ label, helperText, labelTrailing, errorMessage, ...controlProps }: DatePickerFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function DatePickerField({ label, helperText, labelTrailing, errorMessage, style, ...controlProps }: DatePickerFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -11,7 +11,7 @@ import { FormField } from '../FormField';
|
|
|
11
11
|
*
|
|
12
12
|
* @generated
|
|
13
13
|
*/
|
|
14
|
-
export function DatePickerField({ label, helperText, labelTrailing, errorMessage, ...controlProps }) {
|
|
15
|
-
return (_jsx(FormField, { errorMessage: errorMessage, helperText: helperText, label: label, labelTrailing: labelTrailing, children: _jsx(DatePicker, { ...controlProps }) }));
|
|
14
|
+
export function DatePickerField({ label, helperText, labelTrailing, errorMessage, style, ...controlProps }) {
|
|
15
|
+
return (_jsx(FormField, { errorMessage: errorMessage, helperText: helperText, label: label, labelTrailing: labelTrailing, style: style, children: _jsx(DatePicker, { ...controlProps }) }));
|
|
16
16
|
}
|
|
17
17
|
//# sourceMappingURL=DatePickerField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePickerField.js","sourceRoot":"","sources":["../../../src/components/DatePickerField/DatePickerField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,SAAS,EAAyB,MAAM,wBAAwB,CAAC;AAI1E;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAAC,EAC5B,KAAK,EACL,UAAU,EACV,aAAa,EACb,YAAY,EACZ,GAAG,YAAY,EACI;IACnB,OAAO,CACH,KAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"DatePickerField.js","sourceRoot":"","sources":["../../../src/components/DatePickerField/DatePickerField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,SAAS,EAAyB,MAAM,wBAAwB,CAAC;AAI1E;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAAC,EAC5B,KAAK,EACL,UAAU,EACV,aAAa,EACb,YAAY,EACZ,KAAK,EACL,GAAG,YAAY,EACI;IACnB,OAAO,CACH,KAAC,SAAS,IACN,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,aAAa,EAC5B,KAAK,EAAE,KAAK,YAEZ,KAAC,UAAU,OAAK,YAAY,GAAI,GACxB,CACf,CAAC;AACN,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { AriaAttributes, ElementType } from 'react';
|
|
|
3
3
|
import { ButtonProps } from '-/components/Button';
|
|
4
4
|
import { ElementProps } from '-/types/common';
|
|
5
5
|
export type FabVariant = 'neutral' | 'primary' | 'secondary';
|
|
6
|
-
export type FabProps<As extends ElementType =
|
|
6
|
+
export type FabProps<As extends ElementType = ElementType> = Pick<ButtonProps<As>, 'as' | 'icon' | 'iconOnly' | 'onClick' | 'toolTip'> & Required<Pick<ButtonProps<As>, 'label'>> & {
|
|
7
7
|
/**
|
|
8
8
|
* The size of the button.
|
|
9
9
|
*
|
|
@@ -44,5 +44,5 @@ export type FabProps<As extends ElementType = 'button'> = Pick<ButtonProps<As>,
|
|
|
44
44
|
* @name Fab
|
|
45
45
|
* @phase UXReview
|
|
46
46
|
*/
|
|
47
|
-
export declare function Fab<As extends ElementType =
|
|
47
|
+
export declare function Fab<As extends ElementType = ElementType>(props: AriaAttributes & ElementProps<FabProps<As>, As>): import("react/jsx-runtime").JSX.Element;
|
|
48
48
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fab.js","sourceRoot":"","sources":["../../../src/components/Fab/Fab.tsx"],"names":[],"mappings":";AAAA,OAAO,YAAY,CAAC;AACpB,OAAO,EAA+B,cAAc,EAAE,MAAM,OAAO,CAAC;AAEpE,OAAO,EAAE,OAAO,EAAuB,MAAM,sBAAsB,CAAC;AAoCpE;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,GAAG,
|
|
1
|
+
{"version":3,"file":"Fab.js","sourceRoot":"","sources":["../../../src/components/Fab/Fab.tsx"],"names":[],"mappings":";AAAA,OAAO,YAAY,CAAC;AACpB,OAAO,EAA+B,cAAc,EAAE,MAAM,OAAO,CAAC;AAEpE,OAAO,EAAE,OAAO,EAAuB,MAAM,sBAAsB,CAAC;AAoCpE;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,GAAG,CAAuC,KAAsD;IAC5G,MAAM,EACF,IAAI,GAAG,OAAO,EACd,OAAO,GAAG,SAAS,EACnB,QAAQ,EAAE,YAAY,GAAG,KAAK,EAC9B,EAAE,EAAE,EAAE,GAAG,QAAQ,EACjB,SAAS,GAAG,cAAc,EAC1B,SAAS,GAAG,OAAO,EACnB,KAAK,EACL,IAAI,EACJ,OAAO,EACP,GAAG,UAAU,EAChB,GAAG,KAAK,CAAC;IAEV,2CAA2C;IAC3C,MAAM,QAAQ,GAAG,YAAY,KAAK,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC;IAEjD,MAAM,MAAM,GAA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/common';
|
|
2
3
|
export type FormFieldControlProps<P extends Record<string, unknown>> = Omit<FormFieldProps, 'children'> & Omit<P, keyof FormFieldProps>;
|
|
3
|
-
export type FormFieldProps<As extends ElementType = ElementType> = {
|
|
4
|
+
export type FormFieldProps<As extends ElementType = ElementType> = CommonProps<'style'> & {
|
|
4
5
|
/** Displays an error message and marks the field as invalid. */
|
|
5
6
|
errorMessage?: string;
|
|
6
7
|
/**
|
|
@@ -72,5 +73,5 @@ export type FormFieldProps<As extends ElementType = ElementType> = {
|
|
|
72
73
|
* @name FormField
|
|
73
74
|
* @phase Utility
|
|
74
75
|
*/
|
|
75
|
-
export declare function FormField({ label, errorMessage, helperText, children, labelTrailing, required, as }: FormFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
76
|
+
export declare function FormField({ label, errorMessage, helperText, children, labelTrailing, required, as, style, }: FormFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
76
77
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -34,9 +34,9 @@ import { Field, FieldLabel, FieldDescription, FieldError } from '../Field';
|
|
|
34
34
|
* @name FormField
|
|
35
35
|
* @phase Utility
|
|
36
36
|
*/
|
|
37
|
-
export function FormField({ label, errorMessage, helperText, children, labelTrailing, required, as }) {
|
|
37
|
+
export function FormField({ label, errorMessage, helperText, children, labelTrailing, required, as, style, }) {
|
|
38
38
|
const fieldAs = as || 'div';
|
|
39
39
|
const labelAs = fieldAs === 'fieldset' ? 'legend' : undefined;
|
|
40
|
-
return (_jsxs(Field, { as: fieldAs, children: [_jsx(FieldLabel, { as: labelAs, labelTrailing: labelTrailing, required: required, children: label }), children, !errorMessage && helperText && _jsx(FieldDescription, { children: helperText }), _jsx(FieldError, { children: errorMessage })] }));
|
|
40
|
+
return (_jsxs(Field, { as: fieldAs, style: style, children: [_jsx(FieldLabel, { as: labelAs, labelTrailing: labelTrailing, required: required, children: label }), children, !errorMessage && helperText && _jsx(FieldDescription, { children: helperText }), _jsx(FieldError, { children: errorMessage })] }));
|
|
41
41
|
}
|
|
42
42
|
//# sourceMappingURL=FormField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormField.js","sourceRoot":"","sources":["../../../src/components/FormField/FormField.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"FormField.js","sourceRoot":"","sources":["../../../src/components/FormField/FormField.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AA6CrF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,UAAU,SAAS,CAAC,EACtB,KAAK,EACL,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,EAAE,EACF,KAAK,GACQ;IACb,MAAM,OAAO,GAAG,EAAE,IAAI,KAAK,CAAC;IAE5B,MAAM,OAAO,GAAG,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;IAC9D,OAAO,CACH,MAAC,KAAK,IAAC,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,aAC5B,KAAC,UAAU,IAAC,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,YACpE,KAAK,GACG,EACZ,QAAQ,EACR,CAAC,YAAY,IAAI,UAAU,IAAI,KAAC,gBAAgB,cAAE,UAAU,GAAoB,EACjF,KAAC,UAAU,cAAE,YAAY,GAAc,IACnC,CACX,CAAC;AACN,CAAC"}
|
|
@@ -11,5 +11,5 @@ export type InputFieldProps = FormFieldControlProps<InputProps>;
|
|
|
11
11
|
*
|
|
12
12
|
* @generated
|
|
13
13
|
*/
|
|
14
|
-
export declare function InputField({ label, helperText, labelTrailing, errorMessage, ...controlProps }: InputFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function InputField({ label, helperText, labelTrailing, errorMessage, style, ...controlProps }: InputFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -11,7 +11,7 @@ import { Input } from '../Input';
|
|
|
11
11
|
*
|
|
12
12
|
* @generated
|
|
13
13
|
*/
|
|
14
|
-
export function InputField({ label, helperText, labelTrailing, errorMessage, ...controlProps }) {
|
|
15
|
-
return (_jsx(FormField, { errorMessage: errorMessage, helperText: helperText, label: label, labelTrailing: labelTrailing, children: _jsx(Input, { ...controlProps }) }));
|
|
14
|
+
export function InputField({ label, helperText, labelTrailing, errorMessage, style, ...controlProps }) {
|
|
15
|
+
return (_jsx(FormField, { errorMessage: errorMessage, helperText: helperText, label: label, labelTrailing: labelTrailing, style: style, children: _jsx(Input, { ...controlProps }) }));
|
|
16
16
|
}
|
|
17
17
|
//# sourceMappingURL=InputField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputField.js","sourceRoot":"","sources":["../../../src/components/InputField/InputField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAyB,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,KAAK,EAAc,MAAM,oBAAoB,CAAC;AAIvD;;;;;;;;;GASG;AACH,MAAM,UAAU,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"InputField.js","sourceRoot":"","sources":["../../../src/components/InputField/InputField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAyB,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,KAAK,EAAc,MAAM,oBAAoB,CAAC;AAIvD;;;;;;;;;GASG;AACH,MAAM,UAAU,UAAU,CAAC,EACvB,KAAK,EACL,UAAU,EACV,aAAa,EACb,YAAY,EACZ,KAAK,EACL,GAAG,YAAY,EACD;IACd,OAAO,CACH,KAAC,SAAS,IACN,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,aAAa,EAC5B,KAAK,EAAE,KAAK,YAEZ,KAAC,KAAK,OAAK,YAAY,GAAI,GACnB,CACf,CAAC;AACN,CAAC"}
|
|
@@ -11,5 +11,5 @@ export type InputNumberFieldProps = FormFieldControlProps<InputNumberProps>;
|
|
|
11
11
|
*
|
|
12
12
|
* @generated
|
|
13
13
|
*/
|
|
14
|
-
export declare function InputNumberField({ label, helperText, labelTrailing, errorMessage, ...controlProps }: InputNumberFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function InputNumberField({ label, helperText, labelTrailing, errorMessage, style, ...controlProps }: InputNumberFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -11,7 +11,7 @@ import { InputNumber } from '../InputNumber';
|
|
|
11
11
|
*
|
|
12
12
|
* @generated
|
|
13
13
|
*/
|
|
14
|
-
export function InputNumberField({ label, helperText, labelTrailing, errorMessage, ...controlProps }) {
|
|
15
|
-
return (_jsx(FormField, { errorMessage: errorMessage, helperText: helperText, label: label, labelTrailing: labelTrailing, children: _jsx(InputNumber, { ...controlProps }) }));
|
|
14
|
+
export function InputNumberField({ label, helperText, labelTrailing, errorMessage, style, ...controlProps }) {
|
|
15
|
+
return (_jsx(FormField, { errorMessage: errorMessage, helperText: helperText, label: label, labelTrailing: labelTrailing, style: style, children: _jsx(InputNumber, { ...controlProps }) }));
|
|
16
16
|
}
|
|
17
17
|
//# sourceMappingURL=InputNumberField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputNumberField.js","sourceRoot":"","sources":["../../../src/components/InputNumberField/InputNumberField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAyB,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAoB,MAAM,0BAA0B,CAAC;AAIzE;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAC7B,KAAK,EACL,UAAU,EACV,aAAa,EACb,YAAY,EACZ,GAAG,YAAY,EACK;IACpB,OAAO,CACH,KAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"InputNumberField.js","sourceRoot":"","sources":["../../../src/components/InputNumberField/InputNumberField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAyB,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAoB,MAAM,0BAA0B,CAAC;AAIzE;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAC7B,KAAK,EACL,UAAU,EACV,aAAa,EACb,YAAY,EACZ,KAAK,EACL,GAAG,YAAY,EACK;IACpB,OAAO,CACH,KAAC,SAAS,IACN,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,aAAa,EAC5B,KAAK,EAAE,KAAK,YAEZ,KAAC,WAAW,OAAK,YAAY,GAAI,GACzB,CACf,CAAC;AACN,CAAC"}
|
|
@@ -11,5 +11,5 @@ export type InputPhoneFieldProps = FormFieldControlProps<InputPhoneProps>;
|
|
|
11
11
|
*
|
|
12
12
|
* @generated
|
|
13
13
|
*/
|
|
14
|
-
export declare function InputPhoneField({ label, helperText, labelTrailing, errorMessage, ...controlProps }: InputPhoneFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function InputPhoneField({ label, helperText, labelTrailing, errorMessage, style, ...controlProps }: InputPhoneFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -11,7 +11,7 @@ import { InputPhone } from '../InputPhone';
|
|
|
11
11
|
*
|
|
12
12
|
* @generated
|
|
13
13
|
*/
|
|
14
|
-
export function InputPhoneField({ label, helperText, labelTrailing, errorMessage, ...controlProps }) {
|
|
15
|
-
return (_jsx(FormField, { errorMessage: errorMessage, helperText: helperText, label: label, labelTrailing: labelTrailing, children: _jsx(InputPhone, { ...controlProps }) }));
|
|
14
|
+
export function InputPhoneField({ label, helperText, labelTrailing, errorMessage, style, ...controlProps }) {
|
|
15
|
+
return (_jsx(FormField, { errorMessage: errorMessage, helperText: helperText, label: label, labelTrailing: labelTrailing, style: style, children: _jsx(InputPhone, { ...controlProps }) }));
|
|
16
16
|
}
|
|
17
17
|
//# sourceMappingURL=InputPhoneField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputPhoneField.js","sourceRoot":"","sources":["../../../src/components/InputPhoneField/InputPhoneField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAyB,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAmB,MAAM,yBAAyB,CAAC;AAItE;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAAC,EAC5B,KAAK,EACL,UAAU,EACV,aAAa,EACb,YAAY,EACZ,GAAG,YAAY,EACI;IACnB,OAAO,CACH,KAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"InputPhoneField.js","sourceRoot":"","sources":["../../../src/components/InputPhoneField/InputPhoneField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAyB,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAmB,MAAM,yBAAyB,CAAC;AAItE;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAAC,EAC5B,KAAK,EACL,UAAU,EACV,aAAa,EACb,YAAY,EACZ,KAAK,EACL,GAAG,YAAY,EACI;IACnB,OAAO,CACH,KAAC,SAAS,IACN,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,aAAa,EAC5B,KAAK,EAAE,KAAK,YAEZ,KAAC,UAAU,OAAK,YAAY,GAAI,GACxB,CACf,CAAC;AACN,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ElementType, ReactNode } from 'react';
|
|
2
2
|
import { ElementProps } from '-/types/common';
|
|
3
|
-
export type LayoutProps<As extends ElementType =
|
|
3
|
+
export type LayoutProps<As extends ElementType = ElementType> = {
|
|
4
4
|
/**
|
|
5
5
|
* The content of the Layout.
|
|
6
6
|
*
|
|
@@ -48,5 +48,5 @@ export type LayoutProps<As extends ElementType = 'div'> = {
|
|
|
48
48
|
* @name Layout
|
|
49
49
|
* @phase Utility
|
|
50
50
|
*/
|
|
51
|
-
export declare function Layout<As extends ElementType =
|
|
51
|
+
export declare function Layout<As extends ElementType = ElementType>({ children, column, gap, style, as, align, justify, ...props }: ElementProps<LayoutProps<As>, As>): import("react/jsx-runtime").JSX.Element;
|
|
52
52
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Layout.js","sourceRoot":"","sources":["../../../src/components/Layout/Layout.tsx"],"names":[],"mappings":";AAwCA;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,MAAM,
|
|
1
|
+
{"version":3,"file":"Layout.js","sourceRoot":"","sources":["../../../src/components/Layout/Layout.tsx"],"names":[],"mappings":";AAwCA;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,MAAM,CAAuC,EACzD,QAAQ,EACR,MAAM,EACN,GAAG,GAAG,IAAI,EACV,KAAK,EACL,EAAE,EACF,KAAK,GAAG,YAAY,EACpB,OAAO,GAAG,YAAY,EACtB,GAAG,KAAK,EACwB;IAChC,MAAM,EAAE,GAAgB,EAAE,IAAI,KAAK,CAAC;IAEpC,MAAM,UAAU,GAAG,KAAK,IAAI,YAAY,CAAC;IACzC,MAAM,cAAc,GAAG,OAAO,IAAI,YAAY,CAAC;IAE/C,OAAO,CACH,KAAC,EAAE,OACK,KAAK;QACT,6EAA6E;QAC7E,KAAK,EAAE;YACH,GAAG,KAAK;YACR,OAAO,EAAE,MAAM;YACf,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK;YACxC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI;YAC5B,UAAU;YACV,cAAc;SACjB,YAEA,QAAQ,GACR,CACR,CAAC;AACN,CAAC"}
|
|
@@ -2,7 +2,7 @@ import './list-item.scss';
|
|
|
2
2
|
import { AnchorHTMLAttributes, ElementType, ReactNode, MouseEvent, AriaAttributes, AriaRole, ComponentProps } from 'react';
|
|
3
3
|
import { ListItemButton } from './ListItemButton';
|
|
4
4
|
import { CommonProps, ElementProps, SetRef } from '-/types/common';
|
|
5
|
-
export type ListItemProps<As extends ElementType = ElementType> = CommonProps<'active' | 'owner'> & Pick<AriaAttributes, 'aria-label'> & {
|
|
5
|
+
export type ListItemProps<As extends ElementType = ElementType> = CommonProps<'active' | 'owner' | 'style'> & Pick<AriaAttributes, 'aria-label'> & {
|
|
6
6
|
/**
|
|
7
7
|
* The element type to render as.
|
|
8
8
|
*
|
|
@@ -2,7 +2,7 @@ import './menu.scss';
|
|
|
2
2
|
import { ElementType, ReactNode } from 'react';
|
|
3
3
|
import { CommonProps, ElementProps, SetRef } from '-/types/common';
|
|
4
4
|
export declare function menuItemId(menuId: string, index: number): string;
|
|
5
|
-
export type MenuProps<As extends ElementType = ElementType> = CommonProps<'id' | 'owner' | 'role'> & {
|
|
5
|
+
export type MenuProps<As extends ElementType = ElementType> = CommonProps<'id' | 'owner' | 'role' | 'style'> & {
|
|
6
6
|
/** A ref to the inner div element. */
|
|
7
7
|
innerRef?: SetRef<HTMLDivElement>;
|
|
8
8
|
/**
|
|
@@ -24,6 +24,13 @@ export type MenuProps<As extends ElementType = ElementType> = CommonProps<'id' |
|
|
|
24
24
|
* @type ElementType
|
|
25
25
|
*/
|
|
26
26
|
as?: As;
|
|
27
|
+
/**
|
|
28
|
+
* The width of the menu.
|
|
29
|
+
*
|
|
30
|
+
* @type HTMLElement.style.width
|
|
31
|
+
* @exampleType string
|
|
32
|
+
*/
|
|
33
|
+
width?: HTMLElement['style']['width'];
|
|
27
34
|
};
|
|
28
35
|
/**
|
|
29
36
|
* A container housing a simple list of options presented to the customer to select one option at a time.
|
|
@@ -28,6 +28,6 @@ export function menuItemId(menuId, index) {
|
|
|
28
28
|
export function Menu({ as, innerRef, id: idProp, children, owner, label, ...props }) {
|
|
29
29
|
const menuId = useId(idProp);
|
|
30
30
|
const As = as || 'div';
|
|
31
|
-
return (_jsx(As, { ...props, "aria-label": label || undefined, "data-bspk-owner": owner || undefined, "data-bspk-utility": "menu", id: menuId, ref: innerRef, children: children }));
|
|
31
|
+
return (_jsx(As, { ...props, "aria-label": label || undefined, "data-bspk-owner": owner || undefined, "data-bspk-utility": "menu", id: menuId, ref: innerRef, style: { ...props.style, width: props.width }, children: children }));
|
|
32
32
|
}
|
|
33
33
|
//# sourceMappingURL=Menu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.js","sourceRoot":"","sources":["../../../src/components/Menu/Menu.tsx"],"names":[],"mappings":";AAAA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGtC,MAAM,UAAU,UAAU,CAAC,MAAc,EAAE,KAAa;IACpD,OAAO,QAAQ,MAAM,SAAS,KAAK,EAAE,CAAC;AAC1C,CAAC;
|
|
1
|
+
{"version":3,"file":"Menu.js","sourceRoot":"","sources":["../../../src/components/Menu/Menu.tsx"],"names":[],"mappings":";AAAA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGtC,MAAM,UAAU,UAAU,CAAC,MAAc,EAAE,KAAa;IACpD,OAAO,QAAQ,MAAM,SAAS,KAAK,EAAE,CAAC;AAC1C,CAAC;AAiCD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,IAAI,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,KAAK,EAAkC;IAC/G,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAE7B,MAAM,EAAE,GAAG,EAAE,IAAI,KAAK,CAAC;IAEvB,OAAO,CACH,KAAC,EAAE,OACK,KAAK,gBACG,KAAK,IAAI,SAAS,qBACb,KAAK,IAAI,SAAS,uBACjB,MAAM,EACxB,EAAE,EAAE,MAAM,EACV,GAAG,EAAE,QAAQ,EACb,KAAK,EAAE,EAAE,GAAG,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,YAE5C,QAAQ,GACR,CACR,CAAC;AACN,CAAC"}
|
|
@@ -13,7 +13,7 @@ import { ListItem } from '../ListItem';
|
|
|
13
13
|
import { Switch } from '../Switch';
|
|
14
14
|
export const MenuExample = ({ action, }) => ({
|
|
15
15
|
render: ({ props, Component, setState }) => {
|
|
16
|
-
return (_jsxs(Component, { ...props, style: { padding: 'var(--spacing-sizing-02) var(--spacing-sizing-02)' }, children: [_jsx(ListItem, { label: "Michael Scott", leading: _jsx(Avatar, { image: "/
|
|
16
|
+
return (_jsxs(Component, { ...props, style: { padding: 'var(--spacing-sizing-02) var(--spacing-sizing-02)' }, children: [_jsx(ListItem, { label: "Michael Scott", leading: _jsx(Avatar, { image: "/avatar-01.png", name: "Michael Scott" }), subText: "michael.scott@email.com" }), _jsx(Divider, { inset: 2, padding: true }), _jsx(ListItem, { href: "#/my-profile", label: "My profile", leading: _jsx(SvgAccountCircle, {}) }), _jsx(ListItem, { href: "#/settings", label: "Settings", leading: _jsx(SvgSettings, {}) }), _jsx(ListItem, { as: "label", label: "Dark mode", leading: props['data-dark-mode'] ? _jsx(SvgDarkModeFill, {}) : _jsx(SvgDarkMode, {}), trailing: _jsx(Switch, { "aria-label": "Toggle dark mode", checked: !!props['data-dark-mode'], name: "dark-mode", onChange: () => {
|
|
17
17
|
setState((prev) => ({ 'data-dark-mode': !prev['data-dark-mode'] }));
|
|
18
18
|
action('Dark mode toggled');
|
|
19
19
|
}, value: "dark-mode" }) }), _jsx(Divider, { inset: 2, padding: false, thickness: "light" }), _jsx(ListItem, { href: "#/guide-tutorial", label: "Guide and tutorial", leading: _jsx(SvgMenuBook, {}) }), _jsx(ListItem, { href: "#/help-center", label: "Help center", leading: _jsx(SvgHelp, {}) }), _jsx(Divider, { inset: 2, padding: true }), _jsx(ListItem, { href: "#/go-premium", label: "Go premium", leading: _jsx(SvgLicense, {}) }), _jsx(ListItem, { label: "Log out", leading: _jsx(SvgLogout, {}), onClick: () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuExample.js","sourceRoot":"","sources":["../../../src/components/Menu/MenuExample.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGnD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG7C,MAAM,CAAC,MAAM,WAAW,G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E,KAAC,WAAW,KAAG,GAAI,EACzF,KAAC,QAAQ,IAAC,IAAI,EAAC,eAAe,EAAC,KAAK,EAAC,aAAa,EAAC,OAAO,EAAE,KAAC,OAAO,KAAG,GAAI,EAC3E,KAAC,OAAO,IAAC,KAAK,EAAE,CAAC,EAAE,OAAO,SAAG,EAC7B,KAAC,QAAQ,IAAC,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,YAAY,EAAC,OAAO,EAAE,KAAC,UAAU,KAAG,GAAI,EAC5E,KAAC,QAAQ,IACL,KAAK,EAAC,SAAS,EACf,OAAO,EAAE,KAAC,SAAS,KAAG,EACtB,OAAO,EAAE,GAAG,EAAE;wBACV,MAAM,CAAC,iBAAiB,CAAC,CAAC;oBAC9B,CAAC,EACD,IAAI,EAAC,QAAQ,GACf,IACM,CACf,CAAC;IACN,CAAC;IACD,QAAQ,EAAE,KAAK;CAClB,CAAC,CAAC"}
|
|
@@ -11,5 +11,5 @@ export type PasswordFieldProps = FormFieldControlProps<PasswordProps>;
|
|
|
11
11
|
*
|
|
12
12
|
* @generated
|
|
13
13
|
*/
|
|
14
|
-
export declare function PasswordField({ label, helperText, labelTrailing, errorMessage, ...controlProps }: PasswordFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function PasswordField({ label, helperText, labelTrailing, errorMessage, style, ...controlProps }: PasswordFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -11,7 +11,7 @@ import { Password } from '../Password';
|
|
|
11
11
|
*
|
|
12
12
|
* @generated
|
|
13
13
|
*/
|
|
14
|
-
export function PasswordField({ label, helperText, labelTrailing, errorMessage, ...controlProps }) {
|
|
15
|
-
return (_jsx(FormField, { errorMessage: errorMessage, helperText: helperText, label: label, labelTrailing: labelTrailing, children: _jsx(Password, { ...controlProps }) }));
|
|
14
|
+
export function PasswordField({ label, helperText, labelTrailing, errorMessage, style, ...controlProps }) {
|
|
15
|
+
return (_jsx(FormField, { errorMessage: errorMessage, helperText: helperText, label: label, labelTrailing: labelTrailing, style: style, children: _jsx(Password, { ...controlProps }) }));
|
|
16
16
|
}
|
|
17
17
|
//# sourceMappingURL=PasswordField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordField.js","sourceRoot":"","sources":["../../../src/components/PasswordField/PasswordField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAyB,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAiB,MAAM,uBAAuB,CAAC;AAIhE;;;;;;;;;GASG;AACH,MAAM,UAAU,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"PasswordField.js","sourceRoot":"","sources":["../../../src/components/PasswordField/PasswordField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAyB,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAiB,MAAM,uBAAuB,CAAC;AAIhE;;;;;;;;;GASG;AACH,MAAM,UAAU,aAAa,CAAC,EAC1B,KAAK,EACL,UAAU,EACV,aAAa,EACb,YAAY,EACZ,KAAK,EACL,GAAG,YAAY,EACE;IACjB,OAAO,CACH,KAAC,SAAS,IACN,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,aAAa,EAC5B,KAAK,EAAE,KAAK,YAEZ,KAAC,QAAQ,OAAK,YAAY,GAAI,GACtB,CACf,CAAC;AACN,CAAC"}
|
|
@@ -8,6 +8,8 @@ style.appendChild(document.createTextNode(`[data-bspk=progress-circle] {
|
|
|
8
8
|
gap: var(--spacing-sizing-02);
|
|
9
9
|
align-items: center;
|
|
10
10
|
justify-content: center;
|
|
11
|
+
width: fit-content;
|
|
12
|
+
max-width: 100%;
|
|
11
13
|
}
|
|
12
14
|
[data-bspk=progress-circle][data-label-position=top] {
|
|
13
15
|
flex-direction: column-reverse;
|
|
@@ -41,8 +41,8 @@ export function RadioGroup({ onChange, options = [], name, value: groupValue, di
|
|
|
41
41
|
readOnly,
|
|
42
42
|
invalidProp,
|
|
43
43
|
});
|
|
44
|
-
return (_jsx("div", { ...props, "aria-describedby": ariaDescribedByProp || ariaDescribedBy || undefined, "data-bspk": "radio-group", id: id, role: "radiogroup", children:
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
return (_jsx("div", { ...props, "aria-describedby": ariaDescribedByProp || ariaDescribedBy || undefined, "data-bspk": "radio-group", id: id, role: "radiogroup", children: options.map(({ label, description, value, ...option }, index) => {
|
|
45
|
+
return (_jsx(RadioOption, { "aria-describedby": ariaDescribedByProp || ariaDescribedBy || undefined, "aria-errormessage": ariaErrorMessageProp || ariaErrorMessage || undefined, checked: groupValue === value, description: description, disabled: disabled || option.disabled, invalid: invalid || undefined, label: label, name: name, onChange: (checked) => checked && onChange(value), required: required, value: value }, `radio-option-${value || index}`));
|
|
46
|
+
}) }));
|
|
47
47
|
}
|
|
48
48
|
//# sourceMappingURL=RadioGroup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.js","sourceRoot":"","sources":["../../../src/components/RadioGroup/RadioGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,WAAW,EAAoB,MAAM,0BAA0B,CAAC;AA8BzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,UAAU,UAAU,CAAC,EACvB,QAAQ,EACR,OAAO,GAAG,EAAE,EACZ,IAAI,EACJ,KAAK,EAAE,UAAU,EACjB,QAAQ,GAAG,KAAK,EAChB,QAAQ,EACR,OAAO,EAAE,WAAW,EACpB,QAAQ,EACR,EAAE,EAAE,MAAM,EACV,kBAAkB,EAAE,mBAAmB,EACvC,mBAAmB,EAAE,oBAAoB,EACzC,GAAG,KAAK,E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AAM,EAAE,EAAE,KAAK,EAAE,EAAE;YAC7D,OAAO,CACH,KAAC,WAAW,wBACU,mBAAmB,IAAI,eAAe,IAAI,SAAS,uBAClD,oBAAoB,IAAI,gBAAgB,IAAI,SAAS,EACxE,OAAO,EAAE,UAAU,KAAK,KAAK,EAC7B,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,IAAI,MAAM,CAAC,QAAQ,EACrC,OAAO,EAAE,OAAO,IAAI,SAAS,EAE7B,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,IAAI,QAAQ,CAAC,KAAK,CAAC,EACjD,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,IALP,gBAAgB,KAAK,IAAI,KAAK,EAAE,CAMvC,CACL,CAAC;QACN,CAAC,CAAC,GACA,CACT,CAAC;AACN,CAAC"}
|
|
@@ -11,5 +11,5 @@ export type RadioGroupFieldProps = FormFieldControlProps<RadioGroupProps>;
|
|
|
11
11
|
*
|
|
12
12
|
* @generated
|
|
13
13
|
*/
|
|
14
|
-
export declare function RadioGroupField({ label, helperText, labelTrailing, errorMessage, ...controlProps }: RadioGroupFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function RadioGroupField({ label, helperText, labelTrailing, errorMessage, style, ...controlProps }: RadioGroupFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -11,7 +11,7 @@ import { RadioGroup } from '../RadioGroup';
|
|
|
11
11
|
*
|
|
12
12
|
* @generated
|
|
13
13
|
*/
|
|
14
|
-
export function RadioGroupField({ label, helperText, labelTrailing, errorMessage, ...controlProps }) {
|
|
15
|
-
return (_jsxs(Field, { as: "fieldset", children: [_jsx(FieldLabel, { as: "legend", labelTrailing: labelTrailing, children: label }), _jsx(RadioGroup, { ...controlProps }), !errorMessage && helperText && _jsx(FieldDescription, { children: helperText }), errorMessage && _jsx(FieldError, { children: errorMessage })] }));
|
|
14
|
+
export function RadioGroupField({ label, helperText, labelTrailing, errorMessage, style, ...controlProps }) {
|
|
15
|
+
return (_jsxs(Field, { as: "fieldset", children: [_jsx(FieldLabel, { as: "legend", labelTrailing: labelTrailing, style: style, children: label }), _jsx(RadioGroup, { ...controlProps }), !errorMessage && helperText && _jsx(FieldDescription, { children: helperText }), errorMessage && _jsx(FieldError, { children: errorMessage })] }));
|
|
16
16
|
}
|
|
17
17
|
//# sourceMappingURL=RadioGroupField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroupField.js","sourceRoot":"","sources":["../../../src/components/RadioGroupField/RadioGroupField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErF,OAAO,EAAE,UAAU,EAAmB,MAAM,yBAAyB,CAAC;AAItE;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAAC,EAC5B,KAAK,EACL,UAAU,EACV,aAAa,EACb,YAAY,EACZ,GAAG,YAAY,EACI;IACnB,OAAO,CACH,MAAC,KAAK,IAAC,EAAE,EAAC,UAAU,aAChB,KAAC,UAAU,IAAC,EAAE,EAAC,QAAQ,EAAC,aAAa,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"RadioGroupField.js","sourceRoot":"","sources":["../../../src/components/RadioGroupField/RadioGroupField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErF,OAAO,EAAE,UAAU,EAAmB,MAAM,yBAAyB,CAAC;AAItE;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAAC,EAC5B,KAAK,EACL,UAAU,EACV,aAAa,EACb,YAAY,EACZ,KAAK,EACL,GAAG,YAAY,EACI;IACnB,OAAO,CACH,MAAC,KAAK,IAAC,EAAE,EAAC,UAAU,aAChB,KAAC,UAAU,IAAC,EAAE,EAAC,QAAQ,EAAC,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,YAC7D,KAAK,GACG,EACb,KAAC,UAAU,OAAK,YAAY,GAAI,EAC/B,CAAC,YAAY,IAAI,UAAU,IAAI,KAAC,gBAAgB,cAAE,UAAU,GAAoB,EAChF,YAAY,IAAI,KAAC,UAAU,cAAE,YAAY,GAAc,IACpD,CACX,CAAC;AACN,CAAC"}
|
|
@@ -9,7 +9,7 @@ import { ScrollListItemsStyleProps } from '-/utils/scrollListItemsStyle';
|
|
|
9
9
|
* Essentially the props for a ListItem.
|
|
10
10
|
*/
|
|
11
11
|
export type SearchBarOption = Pick<ListItemProps, 'label' | 'leading' | 'trailing'>;
|
|
12
|
-
export type SearchBarProps<O extends SearchBarOption = SearchBarOption> = FieldControlProps<string, O> & Pick<InputProps, 'inputRef' | 'size'> & ScrollListItemsStyleProps & {
|
|
12
|
+
export type SearchBarProps<O extends SearchBarOption = SearchBarOption> = FieldControlProps<string, O> & Pick<InputProps, 'inputRef' | 'size' | 'trailing'> & ScrollListItemsStyleProps & {
|
|
13
13
|
/**
|
|
14
14
|
* The placeholder of the field.
|
|
15
15
|
*
|
|
@@ -81,5 +81,5 @@ export type SearchBarProps<O extends SearchBarOption = SearchBarOption> = FieldC
|
|
|
81
81
|
* @name SearchBar
|
|
82
82
|
* @phase UXReview
|
|
83
83
|
*/
|
|
84
|
-
export declare function SearchBar<O extends SearchBarOption>({ items: itemsProp, noResultsMessage, placeholder, id: idProp, inputRef, name, size, value, onChange, disabled, scrollLimit, }: SearchBarProps<O>): import("react/jsx-runtime").JSX.Element;
|
|
84
|
+
export declare function SearchBar<O extends SearchBarOption>({ items: itemsProp, noResultsMessage, placeholder, id: idProp, inputRef, name, size, value, onChange, disabled, scrollLimit, trailing, }: SearchBarProps<O>): import("react/jsx-runtime").JSX.Element;
|
|
85
85
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -51,7 +51,7 @@ import { useIds } from '../../utils/useIds';
|
|
|
51
51
|
* @name SearchBar
|
|
52
52
|
* @phase UXReview
|
|
53
53
|
*/
|
|
54
|
-
export function SearchBar({ items: itemsProp, noResultsMessage, placeholder = 'Search', id: idProp, inputRef, name, size = 'medium', value, onChange, disabled = false, scrollLimit, }) {
|
|
54
|
+
export function SearchBar({ items: itemsProp, noResultsMessage, placeholder = 'Search', id: idProp, inputRef, name, size = 'medium', value, onChange, disabled = false, scrollLimit, trailing, }) {
|
|
55
55
|
const id = useId(idProp);
|
|
56
56
|
const menuId = `${id}-menu`;
|
|
57
57
|
const items = useIds(`search-bar-${id}`, itemsProp || []);
|
|
@@ -126,7 +126,7 @@ export function SearchBar({ items: itemsProp, noResultsMessage, placeholder = 'S
|
|
|
126
126
|
Space: spaceEnter,
|
|
127
127
|
Enter: spaceEnter,
|
|
128
128
|
'Ctrl+Option+Space': spaceEnter,
|
|
129
|
-
}, { preventDefault: true, stopPropagation: true }), owner: "search-bar", placeholder: placeholder, size: size, value: value }) }), _jsxs(Menu, { "aria-autocomplete": undefined, as: "div", id: menuId, innerRef: elements.setFloating, label: "Search results", onClickCapture: () => {
|
|
129
|
+
}, { preventDefault: true, stopPropagation: true }), owner: "search-bar", placeholder: placeholder, size: size, trailing: trailing, value: value }) }), _jsxs(Menu, { "aria-autocomplete": undefined, as: "div", id: menuId, innerRef: elements.setFloating, label: "Search results", onClickCapture: () => {
|
|
130
130
|
// Prevent the menu from closing when clicking inside it
|
|
131
131
|
// maintain focus on the select control
|
|
132
132
|
elements.reference?.focus();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchBar.js","sourceRoot":"","sources":["../../../src/components/SearchBar/SearchBar.tsx"],"names":[],"mappings":";AAAA,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OA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@@ -1,6 +1,7 @@
|
|
|
1
1
|
import './select.scss';
|
|
2
2
|
import { KeyboardEvent, MouseEvent } from 'react';
|
|
3
3
|
import { ListItemProps } from '-/components/ListItem';
|
|
4
|
+
import { MenuProps } from '-/components/Menu';
|
|
4
5
|
import { CommonProps, ElementProps, FieldControlProps } from '-/types/common';
|
|
5
6
|
import { ScrollListItemsStyleProps } from '-/utils/scrollListItemsStyle';
|
|
6
7
|
/**
|
|
@@ -8,7 +9,7 @@ import { ScrollListItemsStyleProps } from '-/utils/scrollListItemsStyle';
|
|
|
8
9
|
*
|
|
9
10
|
* Essentially the props of ListItemProps.
|
|
10
11
|
*/
|
|
11
|
-
export type SelectOption = CommonProps<'disabled'> & Omit<ListItemProps, 'id' | 'onClick' | '
|
|
12
|
+
export type SelectOption = CommonProps<'disabled'> & Omit<ListItemProps, 'id' | 'onClick' | 'value'> & {
|
|
12
13
|
value: string;
|
|
13
14
|
};
|
|
14
15
|
export type SelectItem = SelectOption & {
|
|
@@ -42,6 +43,12 @@ export type SelectProps = CommonProps<'size'> & FieldControlProps<string, Keyboa
|
|
|
42
43
|
* @default Select one
|
|
43
44
|
*/
|
|
44
45
|
placeholder?: string;
|
|
46
|
+
/**
|
|
47
|
+
* The width of the menu.
|
|
48
|
+
*
|
|
49
|
+
* If not provided, the menu will match the width of the select control.
|
|
50
|
+
*/
|
|
51
|
+
menuWidth?: MenuProps['width'];
|
|
45
52
|
};
|
|
46
53
|
/**
|
|
47
54
|
* A field element that allows users to select one option from a list of available choices.
|
|
@@ -101,5 +108,5 @@ export type SelectProps = CommonProps<'size'> & FieldControlProps<string, Keyboa
|
|
|
101
108
|
* @name Select
|
|
102
109
|
* @phase UXReview
|
|
103
110
|
*/
|
|
104
|
-
export declare function Select({ options: optionsProp, value, onChange, placeholder, size, disabled, id: idProp, invalid: invalidProp, readOnly, name, scrollLimit, required, 'aria-label': ariaLabel, ...elementProps }: ElementProps<SelectProps, 'button'>): import("react/jsx-runtime").JSX.Element;
|
|
111
|
+
export declare function Select({ options: optionsProp, value, onChange, placeholder, size, disabled, id: idProp, invalid: invalidProp, readOnly, name, scrollLimit, required, 'aria-label': ariaLabel, menuWidth, ...elementProps }: ElementProps<SelectProps, 'button'>): import("react/jsx-runtime").JSX.Element;
|
|
105
112
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -69,7 +69,7 @@ import { scrollListItemsStyle } from '../../utils/scrollListItemsStyle';
|
|
|
69
69
|
* @name Select
|
|
70
70
|
* @phase UXReview
|
|
71
71
|
*/
|
|
72
|
-
export function Select({ options: optionsProp = [], value = '', onChange, placeholder = 'Select one', size = 'medium', disabled, id: idProp, invalid: invalidProp, readOnly, name, scrollLimit, required = false, 'aria-label': ariaLabel, ...elementProps }) {
|
|
72
|
+
export function Select({ options: optionsProp = [], value = '', onChange, placeholder = 'Select one', size = 'medium', disabled, id: idProp, invalid: invalidProp, readOnly, name, scrollLimit, required = false, 'aria-label': ariaLabel, menuWidth, ...elementProps }) {
|
|
73
73
|
const { id, ariaDescribedBy, ariaErrorMessage, invalid } = useFieldInit({
|
|
74
74
|
idProp,
|
|
75
75
|
required,
|
|
@@ -96,7 +96,8 @@ export function Select({ options: optionsProp = [], value = '', onChange, placeh
|
|
|
96
96
|
const { elements, floatingStyles } = useFloating({
|
|
97
97
|
hide: !open,
|
|
98
98
|
offsetOptions: 4,
|
|
99
|
-
|
|
99
|
+
//match reference width if menuWidth not provided
|
|
100
|
+
refWidth: !menuWidth,
|
|
100
101
|
});
|
|
101
102
|
useOutsideClick({
|
|
102
103
|
elements: [elements.floating, elements.reference],
|
|
@@ -143,7 +144,7 @@ export function Select({ options: optionsProp = [], value = '', onChange, placeh
|
|
|
143
144
|
}, owner: "select", role: "listbox", style: {
|
|
144
145
|
...(open ? scrollListItemsStyle(scrollLimit, items.length) : {}),
|
|
145
146
|
...floatingStyles,
|
|
146
|
-
}, tabIndex: -1, children: items.map((item) => {
|
|
147
|
+
}, tabIndex: -1, width: menuWidth, children: items.map((item) => {
|
|
147
148
|
const isActive = activeElementId === item.id;
|
|
148
149
|
const isSelected = value === item.value;
|
|
149
150
|
return (_jsx(ListItem, { ...item, active: isActive || undefined, "aria-label": undefined, "aria-selected": isSelected, as: "li", onClick: () => {
|