@react-ui-org/react-ui 0.65.0 → 0.66.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/dist/react-ui.css +10 -10
- package/dist/react-ui.d.ts +35 -27
- package/dist/react-ui.development.css +732 -145
- package/dist/react-ui.development.js +34 -34
- package/dist/react-ui.js +1 -1
- package/package.json +2 -2
- package/src/components/Button/helpers/getRootLabelVisibilityClassName.ts +1 -1
- package/src/components/CheckboxField/CheckboxField.module.scss +7 -3
- package/src/components/CheckboxField/CheckboxField.tsx +3 -3
- package/src/components/CheckboxField/CheckboxField.types.ts +4 -3
- package/src/components/CheckboxField/README.md +25 -3
- package/src/components/FileInputField/FileInputField.module.scss +7 -3
- package/src/components/FileInputField/FileInputField.tsx +3 -3
- package/src/components/FileInputField/FileInputField.types.ts +4 -3
- package/src/components/FileInputField/README.md +20 -3
- package/src/components/FormLayout/FormLayout.module.scss +4 -6
- package/src/components/FormLayout/FormLayoutCustomField.module.scss +7 -3
- package/src/components/FormLayout/FormLayoutCustomField.tsx +3 -3
- package/src/components/FormLayout/FormLayoutCustomField.types.ts +4 -3
- package/src/components/FormLayout/README.md +2 -9
- package/src/components/Grid/_helpers/generateResponsiveCustomProperties.ts +1 -0
- package/src/components/InputGroup/InputGroup.module.scss +7 -3
- package/src/components/InputGroup/InputGroup.tsx +8 -14
- package/src/components/InputGroup/README.md +35 -7
- package/src/components/Modal/_helpers/getPositionClassName.ts +1 -1
- package/src/components/Modal/_helpers/getScrollingClassName.ts +1 -1
- package/src/components/Radio/README.md +40 -3
- package/src/components/Radio/Radio.module.scss +7 -3
- package/src/components/Radio/Radio.tsx +3 -3
- package/src/components/Radio/Radio.types.ts +4 -3
- package/src/components/SelectField/README.md +53 -6
- package/src/components/SelectField/SelectField.module.scss +7 -3
- package/src/components/SelectField/SelectField.tsx +3 -3
- package/src/components/SelectField/SelectField.types.ts +4 -3
- package/src/components/Text/_helpers/getRootClampClassName.ts +1 -1
- package/src/components/Text/_helpers/getRootHyphensClassName.ts +1 -1
- package/src/components/Text/_helpers/getRootWordWrappingClassName.ts +1 -1
- package/src/components/TextArea/README.md +30 -6
- package/src/components/TextArea/TextArea.module.scss +7 -3
- package/src/components/TextArea/TextArea.tsx +3 -3
- package/src/components/TextArea/TextArea.types.ts +4 -3
- package/src/components/TextField/README.md +30 -6
- package/src/components/TextField/TextField.module.scss +7 -3
- package/src/components/TextField/TextField.tsx +3 -3
- package/src/components/TextField/TextField.types.ts +6 -5
- package/src/components/TextLink/README.md +1 -1
- package/src/components/Toggle/README.md +25 -3
- package/src/components/Toggle/Toggle.module.scss +7 -3
- package/src/components/Toggle/Toggle.tsx +3 -3
- package/src/components/Toggle/Toggle.types.ts +4 -3
- package/src/components/_helpers/getRootColorClassName.ts +1 -1
- package/src/components/_helpers/getRootPriorityClassName.ts +1 -1
- package/src/components/_helpers/getRootSizeClassName.ts +1 -1
- package/src/components/_helpers/getRootStateClassName.ts +24 -0
- package/src/index.ts +1 -1
- package/src/styles/settings/_form-fields.scss +2 -1
- package/src/styles/theme/_form-fields.scss +16 -11
- package/src/styles/theme-constants/_colors.scss +21 -0
- package/src/styles/tools/form-fields/_box-field-layout.scss +5 -8
- package/src/styles/tools/form-fields/_inline-field-elements.scss +0 -7
- package/src/styles/tools/form-fields/_inline-field-layout.scss +0 -8
- package/src/styles/tools/form-fields/_variants.scss +7 -7
- package/src/theme.scss +37 -12
- package/src/types/index.ts +1 -1
- package/src/types/states.ts +1 -0
- package/src/components/_helpers/getRootValidationStateClassName.ts +0 -20
- package/src/types/validationStates.ts +0 -1
package/dist/react-ui.d.ts
CHANGED
|
@@ -12,11 +12,11 @@ export type LabelPosition = "before" | "after";
|
|
|
12
12
|
export type Layout = "horizontal" | "vertical";
|
|
13
13
|
export type Priority = "filled" | "outline" | "flat";
|
|
14
14
|
export type Size = "small" | "medium" | "large";
|
|
15
|
+
export type State = "changed" | "invalid" | "valid" | "warning";
|
|
15
16
|
/**
|
|
16
17
|
* Class names exported by a CSS Module.
|
|
17
18
|
*/
|
|
18
19
|
export type CssModuleClasses = Readonly<Record<string, string>>;
|
|
19
|
-
export type ValidationState = "invalid" | "valid" | "warning";
|
|
20
20
|
export type AlertProps = Omit<React$1.HTMLAttributes<HTMLDivElement>, "color"> & {
|
|
21
21
|
/**
|
|
22
22
|
* Alert body.
|
|
@@ -306,9 +306,10 @@ export type CheckboxFieldProps = Omit<React$1.InputHTMLAttributes<HTMLInputEleme
|
|
|
306
306
|
*/
|
|
307
307
|
required?: boolean;
|
|
308
308
|
/**
|
|
309
|
-
* Alter the field to
|
|
309
|
+
* Alter the field to reflect the state of its data, e.g. a validation result or a change
|
|
310
|
+
* against the saved value.
|
|
310
311
|
*/
|
|
311
|
-
|
|
312
|
+
state?: State;
|
|
312
313
|
/**
|
|
313
314
|
* Validation message to be displayed.
|
|
314
315
|
*/
|
|
@@ -323,7 +324,7 @@ declare const CheckboxFieldWithGlobalProps: React$1.ForwardRefExoticComponent<Om
|
|
|
323
324
|
labelPosition?: CheckboxFieldLabelPosition;
|
|
324
325
|
renderAsRequired?: boolean;
|
|
325
326
|
required?: boolean;
|
|
326
|
-
|
|
327
|
+
state?: State;
|
|
327
328
|
validationText?: React$1.ReactNode;
|
|
328
329
|
} & React$1.RefAttributes<HTMLInputElement>>;
|
|
329
330
|
export type FileInputFieldFilesChangedEvent = React$1.ChangeEvent<HTMLInputElement> | React$1.DragEvent<HTMLDivElement> | Event | null;
|
|
@@ -401,9 +402,10 @@ export type FileInputFieldProps = Omit<React$1.InputHTMLAttributes<HTMLInputElem
|
|
|
401
402
|
*/
|
|
402
403
|
size?: Size;
|
|
403
404
|
/**
|
|
404
|
-
* Alter the field to
|
|
405
|
+
* Alter the field to reflect the state of its data, e.g. a validation result or a change
|
|
406
|
+
* against the saved value.
|
|
405
407
|
*/
|
|
406
|
-
|
|
408
|
+
state?: State;
|
|
407
409
|
/**
|
|
408
410
|
* Validation message to be displayed.
|
|
409
411
|
*
|
|
@@ -424,7 +426,7 @@ declare const FileInputFieldWithGlobalProps: React$1.ForwardRefExoticComponent<O
|
|
|
424
426
|
onFilesChanged: (files: FileList | File[], event: FileInputFieldFilesChangedEvent) => void;
|
|
425
427
|
required?: boolean;
|
|
426
428
|
size?: Size;
|
|
427
|
-
|
|
429
|
+
state?: State;
|
|
428
430
|
validationText?: React$1.ReactNode;
|
|
429
431
|
} & React$1.RefAttributes<FileInputFieldRef>>;
|
|
430
432
|
export type FormLayoutPredefinedLabelWidth = "auto" | "default" | "limited";
|
|
@@ -519,9 +521,10 @@ export type FormLayoutCustomFieldProps = React$1.HTMLAttributes<HTMLDivElement>
|
|
|
519
521
|
*/
|
|
520
522
|
required?: boolean;
|
|
521
523
|
/**
|
|
522
|
-
* Alter the field to
|
|
524
|
+
* Alter the field to reflect the state of its data, e.g. a validation result or a change
|
|
525
|
+
* against the saved value.
|
|
523
526
|
*/
|
|
524
|
-
|
|
527
|
+
state?: State;
|
|
525
528
|
};
|
|
526
529
|
/**
|
|
527
530
|
* `true` when rendered inside `FormLayoutCustomField`.
|
|
@@ -536,7 +539,7 @@ declare const FormLayoutCustomFieldWithGlobalProps: React$1.ForwardRefExoticComp
|
|
|
536
539
|
label?: string;
|
|
537
540
|
labelForId?: string;
|
|
538
541
|
required?: boolean;
|
|
539
|
-
|
|
542
|
+
state?: State;
|
|
540
543
|
} & React$1.RefAttributes<never>>;
|
|
541
544
|
/**
|
|
542
545
|
* A value that is either the same for all breakpoints or defined per breakpoint.
|
|
@@ -1065,9 +1068,10 @@ export type RadioProps = Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "ty
|
|
|
1065
1068
|
*/
|
|
1066
1069
|
required?: boolean;
|
|
1067
1070
|
/**
|
|
1068
|
-
* Alter the field to
|
|
1071
|
+
* Alter the field to reflect the state of its data, e.g. a validation result or a change
|
|
1072
|
+
* against the saved value.
|
|
1069
1073
|
*/
|
|
1070
|
-
|
|
1074
|
+
state?: State;
|
|
1071
1075
|
/**
|
|
1072
1076
|
* Validation message to be displayed.
|
|
1073
1077
|
*/
|
|
@@ -1087,7 +1091,7 @@ declare const RadioWithGlobalProps: React$1.ForwardRefExoticComponent<Omit<React
|
|
|
1087
1091
|
options: RadioOption[];
|
|
1088
1092
|
renderAsRequired?: boolean;
|
|
1089
1093
|
required?: boolean;
|
|
1090
|
-
|
|
1094
|
+
state?: State;
|
|
1091
1095
|
validationText?: React$1.ReactNode;
|
|
1092
1096
|
value?: string | number;
|
|
1093
1097
|
} & React$1.RefAttributes<never>>;
|
|
@@ -1309,9 +1313,10 @@ export type SelectFieldProps = Omit<React$1.SelectHTMLAttributes<HTMLSelectEleme
|
|
|
1309
1313
|
*/
|
|
1310
1314
|
size?: Size;
|
|
1311
1315
|
/**
|
|
1312
|
-
* Alter the field to
|
|
1316
|
+
* Alter the field to reflect the state of its data, e.g. a validation result or a change
|
|
1317
|
+
* against the saved value.
|
|
1313
1318
|
*/
|
|
1314
|
-
|
|
1319
|
+
state?: State;
|
|
1315
1320
|
/**
|
|
1316
1321
|
* Validation message to be displayed.
|
|
1317
1322
|
*
|
|
@@ -1336,7 +1341,7 @@ declare const SelectFieldWithGlobalProps: React$1.ForwardRefExoticComponent<Omit
|
|
|
1336
1341
|
renderAsRequired?: boolean;
|
|
1337
1342
|
required?: boolean;
|
|
1338
1343
|
size?: Size;
|
|
1339
|
-
|
|
1344
|
+
state?: State;
|
|
1340
1345
|
validationText?: React$1.ReactNode;
|
|
1341
1346
|
variant?: SelectFieldVariant;
|
|
1342
1347
|
} & React$1.RefAttributes<HTMLSelectElement>>;
|
|
@@ -1534,9 +1539,10 @@ export type TextAreaProps = React$1.TextareaHTMLAttributes<HTMLTextAreaElement>
|
|
|
1534
1539
|
*/
|
|
1535
1540
|
size?: Size;
|
|
1536
1541
|
/**
|
|
1537
|
-
* Alter the field to
|
|
1542
|
+
* Alter the field to reflect the state of its data, e.g. a validation result or a change
|
|
1543
|
+
* against the saved value.
|
|
1538
1544
|
*/
|
|
1539
|
-
|
|
1545
|
+
state?: State;
|
|
1540
1546
|
/**
|
|
1541
1547
|
* Validation message to be displayed.
|
|
1542
1548
|
*/
|
|
@@ -1556,7 +1562,7 @@ declare const TextAreaWithGlobalProps: React$1.ForwardRefExoticComponent<React$1
|
|
|
1556
1562
|
layout?: Layout;
|
|
1557
1563
|
required?: boolean;
|
|
1558
1564
|
size?: Size;
|
|
1559
|
-
|
|
1565
|
+
state?: State;
|
|
1560
1566
|
validationText?: React$1.ReactNode;
|
|
1561
1567
|
variant?: TextAreaVariant;
|
|
1562
1568
|
} & React$1.RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -1623,13 +1629,14 @@ export type TextFieldProps = Omit<React$1.InputHTMLAttributes<HTMLInputElement>,
|
|
|
1623
1629
|
*/
|
|
1624
1630
|
size?: Size;
|
|
1625
1631
|
/**
|
|
1626
|
-
*
|
|
1632
|
+
* Alter the field to reflect the state of its data, e.g. a validation result or a change
|
|
1633
|
+
* against the saved value.
|
|
1627
1634
|
*/
|
|
1628
|
-
|
|
1635
|
+
state?: State;
|
|
1629
1636
|
/**
|
|
1630
|
-
*
|
|
1637
|
+
* HTML input type, translated as `type` attribute of the input.
|
|
1631
1638
|
*/
|
|
1632
|
-
|
|
1639
|
+
type?: TextFieldType;
|
|
1633
1640
|
/**
|
|
1634
1641
|
* Validation message to be displayed.
|
|
1635
1642
|
*
|
|
@@ -1653,8 +1660,8 @@ declare const TextFieldWithGlobalProps: React$1.ForwardRefExoticComponent<Omit<R
|
|
|
1653
1660
|
layout?: Layout;
|
|
1654
1661
|
required?: boolean;
|
|
1655
1662
|
size?: Size;
|
|
1663
|
+
state?: State;
|
|
1656
1664
|
type?: TextFieldType;
|
|
1657
|
-
validationState?: ValidationState;
|
|
1658
1665
|
validationText?: React$1.ReactNode;
|
|
1659
1666
|
variant?: TextFieldVariant;
|
|
1660
1667
|
} & React$1.RefAttributes<HTMLInputElement>>;
|
|
@@ -1712,9 +1719,10 @@ export type ToggleProps = Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "t
|
|
|
1712
1719
|
*/
|
|
1713
1720
|
required?: boolean;
|
|
1714
1721
|
/**
|
|
1715
|
-
* Alter the field to
|
|
1722
|
+
* Alter the field to reflect the state of its data, e.g. a validation result or a change
|
|
1723
|
+
* against the saved value.
|
|
1716
1724
|
*/
|
|
1717
|
-
|
|
1725
|
+
state?: State;
|
|
1718
1726
|
/**
|
|
1719
1727
|
* Validation message to be displayed.
|
|
1720
1728
|
*/
|
|
@@ -1729,7 +1737,7 @@ declare const ToggleWithGlobalProps: React$1.ForwardRefExoticComponent<Omit<Reac
|
|
|
1729
1737
|
labelPosition?: ToggleLabelPosition;
|
|
1730
1738
|
renderAsRequired?: boolean;
|
|
1731
1739
|
required?: boolean;
|
|
1732
|
-
|
|
1740
|
+
state?: State;
|
|
1733
1741
|
validationText?: React$1.ReactNode;
|
|
1734
1742
|
} & React$1.RefAttributes<HTMLInputElement>>;
|
|
1735
1743
|
export type ToolbarAlign = "top" | "middle" | "bottom" | "baseline";
|