@lumx/react 3.18.1 → 3.18.2-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +13 -8
- package/index.js +217 -152
- package/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/autocomplete/Autocomplete.tsx +5 -4
- package/src/components/autocomplete/AutocompleteMultiple.tsx +5 -3
- package/src/components/button/Button.stories.tsx +1 -0
- package/src/components/button/Button.test.tsx +41 -2
- package/src/components/button/ButtonRoot.tsx +10 -11
- package/src/components/checkbox/Checkbox.stories.tsx +13 -2
- package/src/components/checkbox/Checkbox.test.tsx +29 -0
- package/src/components/checkbox/Checkbox.tsx +8 -7
- package/src/components/chip/Chip.stories.tsx +17 -0
- package/src/components/chip/Chip.test.tsx +44 -0
- package/src/components/chip/Chip.tsx +10 -9
- package/src/components/date-picker/DatePickerField.stories.tsx +18 -0
- package/src/components/date-picker/DatePickerField.tsx +4 -4
- package/src/components/link/Link.stories.tsx +4 -1
- package/src/components/link/Link.test.tsx +45 -6
- package/src/components/link/Link.tsx +7 -6
- package/src/components/list/ListItem.stories.tsx +14 -48
- package/src/components/list/ListItem.test.tsx +78 -7
- package/src/components/list/ListItem.tsx +11 -9
- package/src/components/progress-tracker/ProgressTrackerStep.tsx +7 -7
- package/src/components/radio-button/RadioButton.stories.tsx +32 -0
- package/src/components/radio-button/RadioButton.test.tsx +30 -0
- package/src/components/radio-button/RadioButton.tsx +8 -7
- package/src/components/slider/Slider.tsx +6 -7
- package/src/components/switch/Switch.stories.tsx +11 -1
- package/src/components/switch/Switch.test.tsx +30 -0
- package/src/components/switch/Switch.tsx +8 -7
- package/src/components/table/TableRow.tsx +8 -6
- package/src/components/tabs/Tab.tsx +12 -9
- package/src/components/text-field/TextField.stories.tsx +22 -0
- package/src/components/text-field/TextField.test.tsx +56 -0
- package/src/components/text-field/TextField.tsx +12 -10
- package/src/utils/disabled/index.ts +1 -0
- package/src/utils/disabled/useDisableStateProps.tsx +34 -0
- package/src/utils/type/HasAriaDisabled.ts +6 -0
package/index.d.ts
CHANGED
|
@@ -578,12 +578,17 @@ interface BadgeWrapperProps extends GenericProps {
|
|
|
578
578
|
}
|
|
579
579
|
declare const BadgeWrapper: Comp<BadgeWrapperProps, HTMLDivElement>;
|
|
580
580
|
|
|
581
|
+
interface HasAriaDisabled {
|
|
582
|
+
/** Similar to `disabled` but does not block pointer events or focus */
|
|
583
|
+
'aria-disabled'?: AriaAttributes['aria-disabled'];
|
|
584
|
+
}
|
|
585
|
+
|
|
581
586
|
type HTMLButtonProps = DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
|
|
582
587
|
/**
|
|
583
588
|
* Button size definition.
|
|
584
589
|
*/
|
|
585
590
|
type ButtonSize = Extract<Size, 's' | 'm'>;
|
|
586
|
-
interface BaseButtonProps extends GenericProps, Pick<AriaAttributes, 'aria-expanded' | 'aria-haspopup' | 'aria-pressed' | 'aria-label'
|
|
591
|
+
interface BaseButtonProps extends GenericProps, Pick<AriaAttributes, 'aria-expanded' | 'aria-haspopup' | 'aria-pressed' | 'aria-label'>, HasTheme, HasAriaDisabled {
|
|
587
592
|
/** Color variant. */
|
|
588
593
|
color?: ColorPalette;
|
|
589
594
|
/** Emphasis variant. */
|
|
@@ -693,7 +698,7 @@ declare const ButtonGroup: Comp<ButtonGroupProps, HTMLDivElement>;
|
|
|
693
698
|
/**
|
|
694
699
|
* Defines the props of the component.
|
|
695
700
|
*/
|
|
696
|
-
interface CheckboxProps extends GenericProps, HasTheme {
|
|
701
|
+
interface CheckboxProps extends GenericProps, HasTheme, HasAriaDisabled {
|
|
697
702
|
/** Helper text. */
|
|
698
703
|
helper?: string;
|
|
699
704
|
/** Native input id property. */
|
|
@@ -731,7 +736,7 @@ type ChipSize = Extract<Size, 's' | 'm'>;
|
|
|
731
736
|
/**
|
|
732
737
|
* Defines the props of the component.
|
|
733
738
|
*/
|
|
734
|
-
interface ChipProps extends GenericProps, HasTheme {
|
|
739
|
+
interface ChipProps extends GenericProps, HasTheme, HasAriaDisabled {
|
|
735
740
|
/** A component to be rendered after the content. */
|
|
736
741
|
after?: ReactNode;
|
|
737
742
|
/** A component to be rendered before the content. */
|
|
@@ -1920,7 +1925,7 @@ type HTMLAnchorProps = React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAn
|
|
|
1920
1925
|
/**
|
|
1921
1926
|
* Defines the props of the component.
|
|
1922
1927
|
*/
|
|
1923
|
-
interface LinkProps extends GenericProps {
|
|
1928
|
+
interface LinkProps extends GenericProps, HasAriaDisabled {
|
|
1924
1929
|
/** Color variant. */
|
|
1925
1930
|
color?: ColorWithVariants;
|
|
1926
1931
|
/** Lightened or darkened variant of the selected icon color. */
|
|
@@ -2032,7 +2037,7 @@ type ListItemSize = Extract<Size, 'tiny' | 'regular' | 'big' | 'huge'>;
|
|
|
2032
2037
|
/**
|
|
2033
2038
|
* Defines the props of the component.
|
|
2034
2039
|
*/
|
|
2035
|
-
interface ListItemProps extends GenericProps {
|
|
2040
|
+
interface ListItemProps extends GenericProps, HasAriaDisabled {
|
|
2036
2041
|
/** A component to be rendered after the content. */
|
|
2037
2042
|
after?: ReactNode;
|
|
2038
2043
|
/** A component to be rendered before the content. */
|
|
@@ -2439,7 +2444,7 @@ declare const ProgressTrackerStepPanel: Comp<ProgressTrackerStepPanelProps, HTML
|
|
|
2439
2444
|
/**
|
|
2440
2445
|
* Defines the props of the component.
|
|
2441
2446
|
*/
|
|
2442
|
-
interface RadioButtonProps extends GenericProps, HasTheme {
|
|
2447
|
+
interface RadioButtonProps extends GenericProps, HasTheme, HasAriaDisabled {
|
|
2443
2448
|
/** Helper text. */
|
|
2444
2449
|
helper?: string;
|
|
2445
2450
|
/** Native input id property. */
|
|
@@ -2933,7 +2938,7 @@ declare const Slides: Comp<SlidesProps, HTMLDivElement>;
|
|
|
2933
2938
|
/**
|
|
2934
2939
|
* Defines the props of the component.
|
|
2935
2940
|
*/
|
|
2936
|
-
interface SwitchProps extends GenericProps, HasTheme {
|
|
2941
|
+
interface SwitchProps extends GenericProps, HasTheme, HasAriaDisabled {
|
|
2937
2942
|
/** Helper text. */
|
|
2938
2943
|
helper?: string;
|
|
2939
2944
|
/** Whether it is checked or not. */
|
|
@@ -3184,7 +3189,7 @@ declare const TabPanel: Comp<TabPanelProps, HTMLDivElement>;
|
|
|
3184
3189
|
/**
|
|
3185
3190
|
* Defines the props of the component.
|
|
3186
3191
|
*/
|
|
3187
|
-
interface TextFieldProps extends GenericProps, HasTheme {
|
|
3192
|
+
interface TextFieldProps extends GenericProps, HasTheme, HasAriaDisabled {
|
|
3188
3193
|
/** Chip Group to be rendered before the main text input. */
|
|
3189
3194
|
chips?: ReactNode;
|
|
3190
3195
|
/** Props to pass to the clear button (minus those already set by the TextField props). If not specified, the button won't be displayed. */
|