@linzjs/lui 15.1.13 → 16.0.1

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,32 @@
1
+ ## [16.0.1](https://github.com/linz/lui/compare/v16.0.0...v16.0.1) (2022-03-21)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * corrects test for global variable in LuiModal ([#628](https://github.com/linz/lui/issues/628)) ([8e7a8b0](https://github.com/linz/lui/commit/8e7a8b0db48cab84789b35bf17b9a9de289dc336))
7
+
8
+ # [16.0.0](https://github.com/linz/lui/compare/v15.1.14...v16.0.0) (2022-03-17)
9
+
10
+
11
+ ### Features
12
+
13
+ * Style changes to align with FIGLUI ([16b85a5](https://github.com/linz/lui/commit/16b85a51d07fed0d413d1449b67dc70717630f67))
14
+
15
+
16
+ ### BREAKING CHANGES
17
+
18
+ * button sizes and btn icon are now smaller
19
+
20
+ ## [15.1.14](https://github.com/linz/lui/compare/v15.1.13...v15.1.14) (2022-03-17)
21
+
22
+
23
+ ### Reverts
24
+
25
+ * Revert "fix: Style changes to align with FIGLUI" ([55930bf](https://github.com/linz/lui/commit/55930bf00621464443e437daefd2801fb30a7bdd))
26
+ * Revert "fix: button sizes and btn icon fixes" ([a7502c1](https://github.com/linz/lui/commit/a7502c128a2ad31f2c7072e5c55536e9ca3871a4))
27
+ * Revert "fix: more fixes for button sizing" ([70a2ed4](https://github.com/linz/lui/commit/70a2ed4eb1ba6ff85e31c01977ca46f540549ff6))
28
+ * Revert "fixes lint issues" ([49a0337](https://github.com/linz/lui/commit/49a0337538690275f28ee6919bd31ea71acffcd1))
29
+
1
30
  ## [15.1.13](https://github.com/linz/lui/compare/v15.1.12...v15.1.13) (2022-03-17)
2
31
 
3
32
 
@@ -0,0 +1,14 @@
1
+ import { ChangeEventHandler, InputHTMLAttributes } from 'react';
2
+ export interface ClearableLuiTextInputProps {
3
+ onChange?: ChangeEventHandler<HTMLInputElement>;
4
+ inputProps?: InputHTMLAttributes<HTMLInputElement>;
5
+ error?: string;
6
+ hideLabel?: boolean;
7
+ label: JSX.Element | string;
8
+ /**
9
+ * A red star will be shown next to the label, no validation will be performed based on this prop.
10
+ */
11
+ mandatory?: boolean;
12
+ startingValue?: string;
13
+ }
14
+ export declare const ClearableLuiTextInput: (props: ClearableLuiTextInputProps) => JSX.Element;
@@ -14,6 +14,7 @@ export interface LuiTextInputProps {
14
14
  */
15
15
  showPadlockIcon?: boolean;
16
16
  value: string;
17
+ icon?: JSX.Element;
17
18
  }
18
19
  export declare function useGenerateOrDefaultId(idFromProps?: string): string;
19
20
  export declare const LuiTextInput: (props: LuiTextInputProps) => JSX.Element;
package/dist/index.js CHANGED
@@ -878,7 +878,8 @@ var LuiTextInput = function (props) {
878
878
  clsx(props.hideLabel ? 'LuiScreenReadersOnly' : '') }, props.label),
879
879
  React__default["default"].createElement("span", { className: "LuiTextInput-inputWrapper" },
880
880
  React__default["default"].createElement("input", __assign({ type: 'text', className: (props.showPadlockIcon ? 'LuiTextInput-padlock-icon ' : '') +
881
- clsx('LuiTextInput-input'), min: "0", value: props.value, onChange: props.onChange }, props.inputProps, { id: id }))),
881
+ clsx('LuiTextInput-input'), min: "0", value: props.value, onChange: props.onChange }, props.inputProps, { id: id })),
882
+ props.icon),
882
883
  props.error && (React__default["default"].createElement("span", { className: "LuiTextInput-error" },
883
884
  React__default["default"].createElement(LuiIcon, { alt: "error", name: "ic_error", className: "LuiTextInput-error-icon", size: "sm", status: "error" }),
884
885
  props.error)))));
@@ -55632,7 +55633,7 @@ var LuiModal = function (props) {
55632
55633
  }, [handleClickOutside]);
55633
55634
  var isTest = false;
55634
55635
  // this is here for the tests
55635
- if (process !== undefined) {
55636
+ if (typeof process !== 'undefined') {
55636
55637
  isTest = ((_a = process === null || process === void 0 ? void 0 : process.env) === null || _a === void 0 ? void 0 : _a.NODE_ENV) === 'test';
55637
55638
  if (!isTest) {
55638
55639
  Modal.setAppElement('#root');