@linzjs/lui 11.10.3 → 11.11.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 CHANGED
@@ -1,3 +1,10 @@
1
+ # [11.11.0](https://github.com/linz/lui/compare/v11.10.3...v11.11.0) (2022-01-12)
2
+
3
+
4
+ ### Features
5
+
6
+ * **LuiTextInput:** Add option for padlock icon ([#514](https://github.com/linz/lui/issues/514)) ([654f913](https://github.com/linz/lui/commit/654f9132b5f43b93cb9f57ef7b81fd0f01a0e18c))
7
+
1
8
  ## [11.10.3](https://github.com/linz/lui/compare/v11.10.2...v11.10.3) (2022-01-12)
2
9
 
3
10
 
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 22"><path d="M14 7.5H13V5.5C13 2.74 10.76 0.5 8 0.5C5.24 0.5 3 2.74 3 5.5V7.5H2C0.9 7.5 0 8.4 0 9.5V19.5C0 20.6 0.9 21.5 2 21.5H14C15.1 21.5 16 20.6 16 19.5V9.5C16 8.4 15.1 7.5 14 7.5ZM8 16.5C6.9 16.5 6 15.6 6 14.5C6 13.4 6.9 12.5 8 12.5C9.1 12.5 10 13.4 10 14.5C10 15.6 9.1 16.5 8 16.5ZM11.1 7.5H4.9V5.5C4.9 3.79 6.29 2.4 8 2.4C9.71 2.4 11.1 3.79 11.1 5.5V7.5Z" fill="#6B6966" /></svg>
@@ -9,6 +9,10 @@ export interface LuiTextInputProps {
9
9
  * A red star will be shown next to the label, no validation will be performed based on this prop.
10
10
  */
11
11
  mandatory?: boolean;
12
+ /**
13
+ * A padlock will be displayed on right side of input
14
+ */
15
+ showPadlockIcon?: boolean;
12
16
  value: string;
13
17
  }
14
18
  export declare function useGenerateOrDefaultId(idFromProps?: string): string;
@@ -33,3 +33,7 @@ export declare const Mandatory: {
33
33
  (): JSX.Element;
34
34
  storyName: string;
35
35
  };
36
+ export declare const PadlockIcon: {
37
+ (): JSX.Element;
38
+ storyName: string;
39
+ };
@@ -989,7 +989,7 @@ var LuiTextInput = function LuiTextInput(props) {
989
989
  className: "LuiTextInput-inputWrapper"
990
990
  }, React__default.createElement("input", Object.assign({
991
991
  type: 'text',
992
- className: clsx('LuiTextInput-input'),
992
+ className: (props.showPadlockIcon ? 'LuiTextInput-padlock-icon ' : '') + clsx('LuiTextInput-input'),
993
993
  min: "0",
994
994
  value: props.value,
995
995
  onChange: props.onChange