@linzjs/lui 11.9.0 → 11.10.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/CHANGELOG.md +7 -0
- package/dist/components/LuiFormElements/LuiSelectInput/LuiSelectInput.d.ts +1 -0
- package/dist/components/LuiFormElements/LuiSelectInput/LuiSelectInput.stories.d.ts +4 -0
- package/dist/components/LuiFormElements/LuiTextAreaInput/LuiTextAreaInput.d.ts +1 -0
- package/dist/components/LuiFormElements/LuiTextAreaInput/LuiTextAreaInput.stories.d.ts +4 -0
- package/dist/lui.cjs.development.js +6 -2
- package/dist/lui.cjs.development.js.map +1 -1
- package/dist/lui.cjs.production.min.js +1 -1
- package/dist/lui.cjs.production.min.js.map +1 -1
- package/dist/lui.css +14 -0
- package/dist/lui.css.map +1 -1
- package/dist/lui.esm.js +6 -2
- package/dist/lui.esm.js.map +1 -1
- package/dist/scss/Components/LuiFormElements/LuiSelectInput/LuiSelectInput.scss +7 -0
- package/dist/scss/Components/LuiFormElements/LuiTextAreaInput/LuiTextAreaInput.scss +8 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [11.10.0](https://github.com/linz/lui/compare/v11.9.0...v11.10.0) (2022-01-11)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **LuiSelectInput & LuiTextAreaInput:** Added Mandatory star ([#506](https://github.com/linz/lui/issues/506)) ([cd296bf](https://github.com/linz/lui/commit/cd296bf67a686bccfd05b0c1d143da5298b7ee12))
|
|
7
|
+
|
|
1
8
|
# [11.9.0](https://github.com/linz/lui/compare/v11.8.0...v11.9.0) (2022-01-11)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -9,6 +9,7 @@ export interface SelectProps {
|
|
|
9
9
|
onChange?: ChangeEventHandler<HTMLSelectElement>;
|
|
10
10
|
options: SelectOptions[];
|
|
11
11
|
value: string;
|
|
12
|
+
mandatory?: boolean;
|
|
12
13
|
hideLabel?: boolean;
|
|
13
14
|
selectProps?: SelectHTMLAttributes<HTMLSelectElement>;
|
|
14
15
|
label: JSX.Element | string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ChangeEventHandler, InputHTMLAttributes } from 'react';
|
|
2
2
|
export interface LuiTextAreaInputProps {
|
|
3
3
|
label: JSX.Element | string;
|
|
4
|
+
mandatory?: boolean;
|
|
4
5
|
inputProps?: InputHTMLAttributes<HTMLTextAreaElement>;
|
|
5
6
|
onChange?: ChangeEventHandler<HTMLTextAreaElement>;
|
|
6
7
|
value: string;
|
|
@@ -1174,7 +1174,9 @@ var LuiSelectInput = function LuiSelectInput(props) {
|
|
|
1174
1174
|
}, React__default.createElement("label", {
|
|
1175
1175
|
htmlFor: id,
|
|
1176
1176
|
className: "LuiSelect-label"
|
|
1177
|
-
}, React__default.createElement("span", {
|
|
1177
|
+
}, props.mandatory && React__default.createElement("span", {
|
|
1178
|
+
className: "LuiSelect-mandatory"
|
|
1179
|
+
}, "*"), React__default.createElement("span", {
|
|
1178
1180
|
className: clsx('LuiSelect-label-text', props.hideLabel ? 'LuiScreenReadersOnly' : '')
|
|
1179
1181
|
}, props.label), React__default.createElement("div", {
|
|
1180
1182
|
className: "LuiSelect-wrapper"
|
|
@@ -1215,7 +1217,9 @@ var LuiTextAreaInput = function LuiTextAreaInput(props) {
|
|
|
1215
1217
|
className: clsx('LuiTextAreaInput')
|
|
1216
1218
|
}, React__default.createElement("label", {
|
|
1217
1219
|
htmlFor: id
|
|
1218
|
-
}, React__default.createElement("span", {
|
|
1220
|
+
}, props.mandatory && React__default.createElement("span", {
|
|
1221
|
+
className: "LuiTextAreaInput-mandatory"
|
|
1222
|
+
}, "*"), React__default.createElement("span", {
|
|
1219
1223
|
className: "LuiTextAreaInput-label"
|
|
1220
1224
|
}, props.label), React__default.createElement("textarea", Object.assign({
|
|
1221
1225
|
id: id,
|