@linzjs/lui 11.8.0 → 11.10.2
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 +28 -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/components/LuiTooltip/LuiTooltip.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/lui.cjs.development.js +37 -9
- 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 +17 -0
- package/dist/lui.css.map +1 -1
- package/dist/lui.esm.js +37 -10
- 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/dist/scss/Foundation/Variables/_ExportColors.scss +4 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
## [11.10.2](https://github.com/linz/lui/compare/v11.10.1...v11.10.2) (2022-01-12)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* Allow LuiTooltip animation to be disabled. ([#512](https://github.com/linz/lui/issues/512)) ([686b752](https://github.com/linz/lui/commit/686b75217f883c3ab5d288273e51e3e741d06ee5))
|
|
7
|
+
|
|
8
|
+
## [11.10.1](https://github.com/linz/lui/compare/v11.10.0...v11.10.1) (2022-01-11)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* forgot to export LuiBadge 😅 ([#509](https://github.com/linz/lui/issues/509)) ([e347919](https://github.com/linz/lui/commit/e3479192c579e1316c4b7c8e7234fad1bd8ee0f0))
|
|
14
|
+
|
|
15
|
+
# [11.10.0](https://github.com/linz/lui/compare/v11.9.0...v11.10.0) (2022-01-11)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* **LuiSelectInput & LuiTextAreaInput:** Added Mandatory star ([#506](https://github.com/linz/lui/issues/506)) ([cd296bf](https://github.com/linz/lui/commit/cd296bf67a686bccfd05b0c1d143da5298b7ee12))
|
|
21
|
+
|
|
22
|
+
# [11.9.0](https://github.com/linz/lui/compare/v11.8.0...v11.9.0) (2022-01-11)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* **LuiComboSelect:** Change colors to match LuiTextInput ([#510](https://github.com/linz/lui/issues/510)) ([c9bc9ee](https://github.com/linz/lui/commit/c9bc9eebfbed6411cf332c530c27728085c6603e))
|
|
28
|
+
|
|
1
29
|
# [11.8.0](https://github.com/linz/lui/compare/v11.7.0...v11.8.0) (2022-01-11)
|
|
2
30
|
|
|
3
31
|
|
|
@@ -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;
|
package/dist/index.d.ts
CHANGED
|
@@ -48,3 +48,4 @@ export { LOLAuthorisedLink } from './components/lol/LOLAuthorisedLink';
|
|
|
48
48
|
export { LOLCommonDrawerMenu, LOLCommonDrawerMenuAfterLinks, LOLDrawerMenu, } from './components/lol/LOLCommonDrawerMenu';
|
|
49
49
|
export { LuiTooltip, ILuiTooltipProperties, } from './components/LuiTooltip/LuiTooltip';
|
|
50
50
|
export * from './hooks';
|
|
51
|
+
export { LuiBadge } from './components/LuiBadge/LuiBadge';
|
|
@@ -947,7 +947,7 @@ var LuiIcon = function LuiIcon(_ref) {
|
|
|
947
947
|
|
|
948
948
|
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
949
949
|
|
|
950
|
-
var css = "/**\n @deprecated\n */\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n:root {\n --grey-80: #2a292c;\n --grey-60: #6b6966;\n --$gray: #989189;\n --grey-20: #beb9b4;\n --grey-10: #eaeaea;\n --grey-05: #f9f9f9;\n --teal: #00425d;\n --sea: #007198;\n --electric: #0096cc;\n --spray: #73c8e1;\n --polar: #e2f3f7;\n --sherpa: #004b50;\n --surfie: #017a76;\n --persian: #00a599;\n --downy: #73cdc8;\n --iceberg: #dcf5f0;\n --sacramento: #004e32;\n --salem: #08814d;\n --pigment: #0aa245;\n --granny: #9bd79b;\n --panache: #e9fae7;\n --brand-primary: #004b50;\n --brand-secondary: #017a76;\n --success: #0aa245;\n --success-bg: #e9fae7;\n --info: #3a7cdf;\n --info-bg: #d8e5f9;\n --warning: #ea6a2e;\n --warning-bg: #fbdfd2;\n --error: #cc0000;\n --error-focus: #5a0000;\n --error-bg: #f5cccc;\n --visited: #00425d;\n --green-hover: #08814d;\n --color-green-active: #004e32;\n --green-btn: #0aa245;\n --txt-link: #0096cc;\n --color-primary-hover-btn: #007198;\n --color-selection: #c7e9f3;\n --heading-color: #017a76;\n --heading-color--secondary: #2a292c;\n --base-type-color: #2a292c;\n --base-icon-color: #007198;\n --disabled-color: #989189;\n --disabled-color-dark: #6b6966;\n --linz-color-primary: #023d48;\n --linz-color-primary-hover: #01818a;\n --linz-color-tertiary: #e1e44a;\n --linz-color-tertiary-hover: #cdcf59;\n --color-test-pink: #f09;\n --linz-linear-gradient-blue: linear-gradient(70deg, #00425d 12%, #007198 100%);\n --linz-linear-gradient-teal: linear-gradient(270deg, #00a599 1%, #73cdc8 100%);\n}\n\n.
|
|
950
|
+
var css = "/**\n @deprecated\n */\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n:root {\n --grey-80: #2a292c;\n --grey-60: #6b6966;\n --$gray: #989189;\n --grey-20: #beb9b4;\n --grey-10: #eaeaea;\n --grey-05: #f9f9f9;\n --teal: #00425d;\n --sea: #007198;\n --electric: #0096cc;\n --spray: #73c8e1;\n --polar: #e2f3f7;\n --sherpa: #004b50;\n --surfie: #017a76;\n --persian: #00a599;\n --downy: #73cdc8;\n --iceberg: #dcf5f0;\n --sacramento: #004e32;\n --salem: #08814d;\n --pigment: #0aa245;\n --granny: #9bd79b;\n --panache: #e9fae7;\n --brand-primary: #004b50;\n --brand-secondary: #017a76;\n --success: #0aa245;\n --success-bg: #e9fae7;\n --info: #3a7cdf;\n --info-bg: #d8e5f9;\n --warning: #ea6a2e;\n --warning-bg: #fbdfd2;\n --error: #cc0000;\n --error-focus: #5a0000;\n --error-bg: #f5cccc;\n --visited: #00425d;\n --green-hover: #08814d;\n --color-green-active: #004e32;\n --green-btn: #0aa245;\n --txt-link: #0096cc;\n --color-primary-hover-btn: #007198;\n --color-selection: #c7e9f3;\n --heading-color: #017a76;\n --heading-color--secondary: #2a292c;\n --base-type-color: #2a292c;\n --base-icon-color: #007198;\n --disabled-color: #989189;\n --disabled-color-dark: #6b6966;\n --linz-color-primary: #023d48;\n --linz-color-primary-hover: #01818a;\n --linz-color-tertiary: #e1e44a;\n --linz-color-tertiary-hover: #cdcf59;\n --color-test-pink: #f09;\n --linz-linear-gradient-blue: linear-gradient(70deg, #00425d 12%, #007198 100%);\n --linz-linear-gradient-teal: linear-gradient(270deg, #00a599 1%, #73cdc8 100%);\n}\n\n.LuiError_LuiError__d1e63d50 {\n font-family: \"Open Sans\", system-ui, sans-serif;\n font-style: normal;\n font-weight: 600;\n margin-bottom: 0.5rem;\n font-size: 0.875rem;\n line-height: 1.5rem;\n color: #2a292c;\n}\n.LuiError_LuiErrorErrorIcon__d1e63d50 {\n vertical-align: middle;\n display: inline-block;\n}\n.LuiError_LuiErrorErrorText__d1e63d50 {\n margin-left: 0.5rem;\n}";
|
|
951
951
|
n(css,{});
|
|
952
952
|
|
|
953
953
|
var LuiError = function LuiError(_ref) {
|
|
@@ -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,
|
|
@@ -18102,7 +18106,7 @@ function isChromatic() {
|
|
|
18102
18106
|
}
|
|
18103
18107
|
|
|
18104
18108
|
var css$1 = ":root {\n --grey-80: #2a292c;\n --grey-60: #6b6966;\n --$gray: #989189;\n --grey-20: #beb9b4;\n --grey-10: #eaeaea;\n --grey-05: #f9f9f9;\n --teal: #00425d;\n --sea: #007198;\n --electric: #0096cc;\n --spray: #73c8e1;\n --polar: #e2f3f7;\n --sherpa: #004b50;\n --surfie: #017a76;\n --persian: #00a599;\n --downy: #73cdc8;\n --iceberg: #dcf5f0;\n --sacramento: #004e32;\n --salem: #08814d;\n --pigment: #0aa245;\n --granny: #9bd79b;\n --panache: #e9fae7;\n --brand-primary: #004b50;\n --brand-secondary: #017a76;\n --success: #0aa245;\n --success-bg: #e9fae7;\n --info: #3a7cdf;\n --info-bg: #d8e5f9;\n --warning: #ea6a2e;\n --warning-bg: #fbdfd2;\n --error: #cc0000;\n --error-focus: #5a0000;\n --error-bg: #f5cccc;\n --visited: #00425d;\n --green-hover: #08814d;\n --color-green-active: #004e32;\n --green-btn: #0aa245;\n --txt-link: #0096cc;\n --color-primary-hover-btn: #007198;\n --color-selection: #c7e9f3;\n --heading-color: #017a76;\n --heading-color--secondary: #2a292c;\n --base-type-color: #2a292c;\n --base-icon-color: #007198;\n --disabled-color: #989189;\n --disabled-color-dark: #6b6966;\n --linz-color-primary: #023d48;\n --linz-color-primary-hover: #01818a;\n --linz-color-tertiary: #e1e44a;\n --linz-color-tertiary-hover: #cdcf59;\n --color-test-pink: #f09;\n --linz-linear-gradient-blue: linear-gradient(70deg, #00425d 12%, #007198 100%);\n --linz-linear-gradient-teal: linear-gradient(270deg, #00a599 1%, #73cdc8 100%);\n}";
|
|
18105
|
-
var modules_5b17bb95 = {"charcoal":"#2a292c","fuscous":"#6b6966","gray":"#989189","silver":"#beb9b4","lily":"#eaeaea","hint":"#f9f9f9","snow":"#ffffff","white":"#ffffff","teal":"#00425d","sea":"#007198","electric":"#0096cc","spray":"#73c8e1","polar":"#e2f3f7","sherpa":"#004b50","surfie":"#017a76","persian":"#00a599","downy":"#73cdc8","iceberg":"#dcf5f0","sacramento":"#004e32","salem":"#08814d","pigment":"#0aa245","granny":"#9bd79b","panache":"#e9fae7","brand-primary":"#004b50","brand-secondary":"#017a76","error":"#cc0000","error-bg":"#f5cccc","error-focus":"#5a0000","warning":"#ea6a2e","warning-bg":"#fbdfd2","warning-focus":"#b33a01","success":"#0aa245","success-bg":"#e9fae7","info":"#3a7cdf","info-bg":"#d8e5f9","visited":"#00425d","green-hover":"#08814d","green-active":"#004e32","green-btn":"#0aa245","txt-link":"#0096cc","primary-hover-btn":"#007198","selection":"#c7e9f3","heading-color":"#017a76","heading-color--secondary":"#2a292c","base-type-color":"#2a292c","base-icon-color":"#007198","disabled-color":"#989189","disabled-color-dark":"#6b6966","linz-color-primary":"#023d48","linz-color-primary-hover":"#01818a","linz-color-tertiary":"#e1e44a","linz-color-tertiary-hover":"#cdcf59","color-test-pink":"#f09","linz-linear-gradient-blue":"linear-gradient(70deg, #00425d 12%, #007198 100%)","linz-linear-gradient-teal":"linear-gradient(270deg, #00a599 1%, #73cdc8 100%)"};
|
|
18109
|
+
var modules_5b17bb95 = {"charcoal":"#2a292c","fuscous":"#6b6966","gray":"#989189","silver":"#beb9b4","lily":"#eaeaea","hint":"#f9f9f9","snow":"#ffffff","white":"#ffffff","teal":"#00425d","sea":"#007198","electric":"#0096cc","spray":"#73c8e1","polar":"#e2f3f7","sherpa":"#004b50","surfie":"#017a76","persian":"#00a599","downy":"#73cdc8","iceberg":"#dcf5f0","sacramento":"#004e32","salem":"#08814d","pigment":"#0aa245","granny":"#9bd79b","panache":"#e9fae7","brand-primary":"#004b50","brand-secondary":"#017a76","error":"#cc0000","error-bg":"#f5cccc","error-focus":"#5a0000","warning":"#ea6a2e","warning-bg":"#fbdfd2","warning-focus":"#b33a01","success":"#0aa245","success-bg":"#e9fae7","info":"#3a7cdf","info-bg":"#d8e5f9","visited":"#00425d","green-hover":"#08814d","green-active":"#004e32","green-btn":"#0aa245","txt-link":"#0096cc","primary-hover-btn":"#007198","selection":"#c7e9f3","heading-color":"#017a76","heading-color--secondary":"#2a292c","base-type-color":"#2a292c","input-text":"#2a292c","input-placeholder":"#6b6966","input-placeholder-when-disabled":"#989189","base-icon-color":"#007198","disabled-color":"#989189","disabled-color-dark":"#6b6966","linz-color-primary":"#023d48","linz-color-primary-hover":"#01818a","linz-color-tertiary":"#e1e44a","linz-color-tertiary-hover":"#cdcf59","color-test-pink":"#f09","linz-linear-gradient-blue":"linear-gradient(70deg, #00425d 12%, #007198 100%)","linz-linear-gradient-teal":"linear-gradient(270deg, #00a599 1%, #73cdc8 100%)"};
|
|
18106
18110
|
n(css$1,{});
|
|
18107
18111
|
|
|
18108
18112
|
/**
|
|
@@ -18155,6 +18159,15 @@ function LuiComboSelectActual(givenProps, ref) {
|
|
|
18155
18159
|
});
|
|
18156
18160
|
},
|
|
18157
18161
|
styles: {
|
|
18162
|
+
control: function control(provided, state) {
|
|
18163
|
+
return _extends({}, provided, {
|
|
18164
|
+
/* matches style of .LuiTextInput-input */
|
|
18165
|
+
border: state.isFocused ? '1px solid #053d52' : '1px solid #b2b2b2',
|
|
18166
|
+
'&:hover, &:active': {
|
|
18167
|
+
borderColor: '#053d52'
|
|
18168
|
+
}
|
|
18169
|
+
});
|
|
18170
|
+
},
|
|
18158
18171
|
indicatorSeparator: function indicatorSeparator(provided) {
|
|
18159
18172
|
return _extends({}, provided, {
|
|
18160
18173
|
width: 0
|
|
@@ -18181,9 +18194,14 @@ function LuiComboSelectActual(givenProps, ref) {
|
|
|
18181
18194
|
/* please keep this in sync with FormVars.scss/mixin.formPlaceholder */
|
|
18182
18195
|
fontWeight: 'normal',
|
|
18183
18196
|
fontStyle: 'italic',
|
|
18184
|
-
color: '
|
|
18185
|
-
|
|
18186
|
-
|
|
18197
|
+
color: modules_5b17bb95['input-placeholder']
|
|
18198
|
+
});
|
|
18199
|
+
},
|
|
18200
|
+
option: function option(provided, _ref) {
|
|
18201
|
+
var isSelected = _ref.isSelected;
|
|
18202
|
+
return _extends({}, provided, {
|
|
18203
|
+
color: modules_5b17bb95['input-text'],
|
|
18204
|
+
backgroundColor: isSelected ? modules_5b17bb95['selection'] : modules_5b17bb95['white']
|
|
18187
18205
|
});
|
|
18188
18206
|
}
|
|
18189
18207
|
}
|
|
@@ -20318,7 +20336,9 @@ var LuiTooltip = function LuiTooltip(props) {
|
|
|
20318
20336
|
var children = props.children,
|
|
20319
20337
|
message = props.message,
|
|
20320
20338
|
placement = props.placement,
|
|
20321
|
-
trigger = props.trigger
|
|
20339
|
+
trigger = props.trigger,
|
|
20340
|
+
_props$animation = props.animation,
|
|
20341
|
+
animation = _props$animation === void 0 ? true : _props$animation;
|
|
20322
20342
|
var id = "LuiToolTip_" + React.useMemo(getKey, []);
|
|
20323
20343
|
|
|
20324
20344
|
if (typeof message !== 'string') {
|
|
@@ -20332,7 +20352,8 @@ var LuiTooltip = function LuiTooltip(props) {
|
|
|
20332
20352
|
trigger: trigger,
|
|
20333
20353
|
theme: 'LUI',
|
|
20334
20354
|
placement: placement,
|
|
20335
|
-
offset: [0, 24]
|
|
20355
|
+
offset: [0, 24],
|
|
20356
|
+
animation: animation
|
|
20336
20357
|
});
|
|
20337
20358
|
return function () {
|
|
20338
20359
|
var _document$getElementB, _document$getElementB2;
|
|
@@ -20375,6 +20396,12 @@ function useClickedOutsideElement(refElement, handleClickOutside) {
|
|
|
20375
20396
|
}, []);
|
|
20376
20397
|
}
|
|
20377
20398
|
|
|
20399
|
+
var LuiBadge = function LuiBadge(props) {
|
|
20400
|
+
return React__default.createElement("p", {
|
|
20401
|
+
className: clsx('LuiBadge', props.size === 'sm' && 'LuiBadge--sm', props.size === 'lg' && 'LuiBadge--lg', props.backgroundFill && 'LuiBadge--fill', props.variation === 'warning' && 'LuiBadge--warning')
|
|
20402
|
+
}, props.children);
|
|
20403
|
+
};
|
|
20404
|
+
|
|
20378
20405
|
exports.FIRM_KEY = FIRM_KEY;
|
|
20379
20406
|
exports.FIRM_NAME_KEY = FIRM_NAME_KEY;
|
|
20380
20407
|
exports.GLOBAL_CLIENT_REFERENCE_KEY = GLOBAL_CLIENT_REFERENCE_KEY;
|
|
@@ -20392,6 +20419,7 @@ exports.LOLUserContextProvider = LOLUserContextProvider;
|
|
|
20392
20419
|
exports.LOLUserLastLogin = LOLUserLastLogin;
|
|
20393
20420
|
exports.LuiAlertModal = LuiAlertModal;
|
|
20394
20421
|
exports.LuiAlertModalButtons = LuiAlertModalButtons;
|
|
20422
|
+
exports.LuiBadge = LuiBadge;
|
|
20395
20423
|
exports.LuiBanner = LuiBanner;
|
|
20396
20424
|
exports.LuiBannerContent = LuiBannerContent;
|
|
20397
20425
|
exports.LuiBearingFormikInput = LuiBearingFormikInput;
|