@x15ventures/x15-ui-library 3.13.4 → 3.14.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/cjs/autoGenerated/libraryThemes.js +12 -12
- package/dist/cjs/autoGenerated/libraryThemes.js.map +1 -1
- package/dist/cjs/autoGenerated/libraryThemes.json +12 -12
- package/dist/cjs/components/design/banners/pageBanner/PageBanner.js +4 -1
- package/dist/cjs/components/design/banners/pageBanner/PageBanner.js.map +1 -1
- package/dist/cjs/components/form/formFields/formFieldWrapper/FormField.js +1 -1
- package/dist/cjs/components/form/formFields/formFieldWrapper/FormField.js.map +1 -1
- package/dist/cjs/components/form/formFields/formFieldWrapper/formFieldProps.js.map +1 -1
- package/dist/cjs/components/form/formFields/subComponents/textarea/Textarea.js +159 -18
- package/dist/cjs/components/form/formFields/subComponents/textarea/Textarea.js.map +1 -1
- package/dist/cjs/components/form/validation/ValidationMessages.js +2 -1
- package/dist/cjs/components/form/validation/ValidationMessages.js.map +1 -1
- package/dist/cjs/package.json +17 -15
- package/dist/cjs/styles/index.css +25 -0
- package/dist/cjs/styles/shared/_allPartials.css +25 -0
- package/dist/cjs/styles/shared/forms/_forms.css +25 -0
- package/dist/components/design/banners/pageBanner/PageBanner.d.ts.map +1 -1
- package/dist/components/form/formFields/formFieldWrapper/FormField.test.d.ts +5 -0
- package/dist/components/form/formFields/formFieldWrapper/FormField.test.d.ts.map +1 -0
- package/dist/components/form/formFields/formFieldWrapper/formFieldProps.d.ts +11 -1
- package/dist/components/form/formFields/formFieldWrapper/formFieldProps.d.ts.map +1 -1
- package/dist/components/form/formFields/subComponents/textarea/Textarea.d.ts.map +1 -1
- package/dist/components/form/formFields/subComponents/textarea/Textarea.test.d.ts +5 -0
- package/dist/components/form/formFields/subComponents/textarea/Textarea.test.d.ts.map +1 -0
- package/dist/components/form/validation/ValidationMessages.d.ts +2 -0
- package/dist/components/form/validation/ValidationMessages.d.ts.map +1 -1
- package/dist/esm/autoGenerated/libraryThemes.js +12 -12
- package/dist/esm/autoGenerated/libraryThemes.js.map +1 -1
- package/dist/esm/autoGenerated/libraryThemes.json +12 -12
- package/dist/esm/components/design/banners/pageBanner/PageBanner.js +5 -2
- package/dist/esm/components/design/banners/pageBanner/PageBanner.js.map +1 -1
- package/dist/esm/components/form/formFields/formFieldWrapper/FormField.js +1 -1
- package/dist/esm/components/form/formFields/formFieldWrapper/FormField.js.map +1 -1
- package/dist/esm/components/form/formFields/formFieldWrapper/formFieldProps.js.map +1 -1
- package/dist/esm/components/form/formFields/subComponents/textarea/Textarea.js +158 -17
- package/dist/esm/components/form/formFields/subComponents/textarea/Textarea.js.map +1 -1
- package/dist/esm/components/form/validation/ValidationMessages.js +1 -1
- package/dist/esm/components/form/validation/ValidationMessages.js.map +1 -1
- package/dist/esm/package.json +17 -15
- package/dist/esm/styles/index.css +25 -0
- package/dist/esm/styles/shared/_allPartials.css +25 -0
- package/dist/esm/styles/shared/forms/_forms.css +25 -0
- package/dist/package.json +17 -15
- package/package.json +17 -15
- package/readme.md +1 -0
|
@@ -7,7 +7,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports.default = exports.ValidationMessages = exports.GenericErrorMessages = void 0;
|
|
10
|
+
exports.extractError = exports.default = exports.ValidationMessages = exports.GenericErrorMessages = void 0;
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
12
|
var _errorMessage = require("@hookform/error-message");
|
|
13
13
|
var _reactHookForm = require("react-hook-form");
|
|
@@ -35,6 +35,7 @@ const extractError = (errors, fieldName) => {
|
|
|
35
35
|
return accumulator[pathComponent];
|
|
36
36
|
}, errors);
|
|
37
37
|
};
|
|
38
|
+
exports.extractError = extractError;
|
|
38
39
|
const ValidationMessages = ({
|
|
39
40
|
name,
|
|
40
41
|
validation
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidationMessages.js","names":["_interopRequireDefault","require","Object","defineProperty","exports","value","default","ValidationMessages","GenericErrorMessages","_react","_errorMessage","_reactHookForm","_formUtilities","required","minLength","maxLength","min","max","unknown","
|
|
1
|
+
{"version":3,"file":"ValidationMessages.js","names":["_interopRequireDefault","require","Object","defineProperty","exports","value","extractError","default","ValidationMessages","GenericErrorMessages","_react","_errorMessage","_reactHookForm","_formUtilities","required","minLength","maxLength","min","max","unknown","errors","fieldName","undefined","pathComponents","split","reduce","accumulator","pathComponent","name","validation","formState","useFormContext","NoHookFormContext","fieldError","entries","forEach","validatorKey","validator","type","types","message","createElement","className","id","ErrorMessage","render","_default"],"sources":["../../../../../src/components/form/validation/ValidationMessages.tsx"],"sourcesContent":["/* eslint-disable no-unused-vars */\n\n'use client';\n\nimport React from 'react';\nimport { ErrorMessage } from '@hookform/error-message';\nimport {\n FieldError,\n FieldErrors,\n FieldErrorsImpl,\n Merge, useFormContext\n} from 'react-hook-form';\nimport {\n ValidationProps\n} from '../formFields/formFieldWrapper/formFieldProps';\nimport { NoHookFormContext } from '../formFields/utilities/formUtilities';\nimport { InputCheckboxValidationProps } from '../formFields/subComponents/inputs/checkbox/inputCheckboxProps';\n\n// Type for generic error messages\nexport const GenericErrorMessages: Record<string, (value?: never) => string> = {\n required: () => 'This field is required. Please enter a value.',\n minLength: (value) => `Please provide a minimum of ${ value } characters.`,\n maxLength: (value) => `Please provide a maximum of ${ value } characters.`,\n min: (value) => `The value must be a minimum of ${ value }.`,\n max: (value) => `The value must be a maximum of ${ value }.`,\n unknown: () => 'An unknown error has occurred.'\n};\n\n// Helper function to extract nested errors\nexport const extractError = (\n errors: FieldErrors,\n fieldName: string\n): FieldError | Merge<FieldError, FieldErrorsImpl<never>> | undefined => {\n if (!errors) {\n return undefined;\n }\n\n const pathComponents = fieldName.split('.');\n\n return pathComponents.reduce<FieldError | Merge<FieldError, FieldErrorsImpl<never>> | undefined>(\n (accumulator, pathComponent) => {\n if (!accumulator) {\n return undefined;\n }\n\n return (accumulator as never)[pathComponent];\n },\n errors as never\n );\n};\n\ninterface ValidationMessagesProps {\n name: string;\n validation?: ValidationProps | InputCheckboxValidationProps\n}\n\nexport const ValidationMessages: React.FC<ValidationMessagesProps> = (\n {\n name,\n validation\n }\n) => {\n const { formState: { errors } } = useFormContext() || NoHookFormContext;\n\n const fieldError = extractError(errors, name);\n\n if (!fieldError) {\n return null;\n }\n\n // Check all the validators have a message\n if (validation) {\n Object.entries(validation).forEach(([validatorKey, validator]) => {\n if (GenericErrorMessages[validatorKey]) {\n if (typeof validator === 'boolean') {\n if (\n fieldError.type &&\n fieldError.types &&\n typeof fieldError.types[fieldError.type] === 'string'\n ) {\n fieldError.message = fieldError.types[fieldError.type] as string;\n } else {\n fieldError.message = GenericErrorMessages[validatorKey]();\n }\n } else if (typeof validator === 'object' && 'value' in validator) {\n // @ts-ignore The hook form types don't seem to cater for versions with value properties properly\n fieldError.message = GenericErrorMessages[validatorKey](validator.value || undefined);\n }\n }\n });\n }\n\n return (\n <span className=\"validation\" id={ `${ name }_errors` }>\n <span className=\"message\">\n { !fieldError?.message && (\n <span className=\"error\">{ GenericErrorMessages.unknown() }</span>\n ) }\n\n <ErrorMessage\n errors={ errors }\n name={ name }\n render={ ({ message }) => <span className=\"error\">{ message }</span> }\n />\n </span>\n </span>\n );\n};\n\nexport default ValidationMessages;\n"],"mappings":";AAAA;;AAEA,YAAY;;AAAC,IAAAA,sBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,KAAA;AAAA;AAAAD,OAAA,CAAAE,YAAA,GAAAF,OAAA,CAAAG,OAAA,GAAAH,OAAA,CAAAI,kBAAA,GAAAJ,OAAA,CAAAK,oBAAA;AAEb,IAAAC,MAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,aAAA,GAAAV,OAAA;AACA,IAAAW,cAAA,GAAAX,OAAA;AASA,IAAAY,cAAA,GA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EAAG,CACvE,CACG,CACF,CAAC;AAEX,CAAC;AAACpC,OAAA,CAAAI,kBAAA,GAAAA,kBAAA;AAAA,IAAAsC,QAAA,GAAA1C,OAAA,CAAAG,OAAA,GAEaC,kBAAkB","ignoreList":[]}
|
package/dist/cjs/package.json
CHANGED
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"files": [
|
|
138
138
|
"dist"
|
|
139
139
|
],
|
|
140
|
-
"version": "3.13.
|
|
140
|
+
"version": "3.13.5",
|
|
141
141
|
"packageManager": "pnpm@10.11.0",
|
|
142
142
|
"repository": {
|
|
143
143
|
"type": "git",
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
"dependencies": {
|
|
176
176
|
"@hookform/error-message": "^2.0.1",
|
|
177
177
|
"@x15stack/aws": "^1.7.2",
|
|
178
|
-
"@x15ventures/x15-ui-library-icons": "^1.1.
|
|
178
|
+
"@x15ventures/x15-ui-library-icons": "^1.1.3",
|
|
179
179
|
"babel-plugin-transform-imports": "^2.0.0",
|
|
180
180
|
"html-react-parser": "^5.2.17",
|
|
181
181
|
"jsdom": "^26.1.0",
|
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
},
|
|
196
196
|
"devDependencies": {
|
|
197
197
|
"@babel/cli": "^7.28.6",
|
|
198
|
-
"@babel/core": "
|
|
198
|
+
"@babel/core": "7.29.6",
|
|
199
199
|
"@babel/eslint-parser": "^7.28.6",
|
|
200
200
|
"@babel/eslint-plugin": "^7.27.1",
|
|
201
201
|
"@babel/plugin-syntax-jsx": "^7.28.6",
|
|
@@ -256,7 +256,7 @@
|
|
|
256
256
|
"babel-loader": "^9.2.1",
|
|
257
257
|
"babel-plugin-macros": "^3.1.0",
|
|
258
258
|
"chromatic": "^11.29.0",
|
|
259
|
-
"commitlint": "^20.5.
|
|
259
|
+
"commitlint": "^20.5.3",
|
|
260
260
|
"copy-webpack-plugin": "^12.0.2",
|
|
261
261
|
"cors": "^2.8.6",
|
|
262
262
|
"cross-env": "^7.0.3",
|
|
@@ -301,32 +301,34 @@
|
|
|
301
301
|
"ttab": "^0.9.0",
|
|
302
302
|
"typescript": "5.5.4",
|
|
303
303
|
"url-loader": "^4.1.1",
|
|
304
|
-
"vitest": "3.
|
|
304
|
+
"vitest": "3.2.6"
|
|
305
305
|
},
|
|
306
306
|
"pnpm": {
|
|
307
307
|
"overrides": {
|
|
308
|
+
"@babel/plugin-transform-modules-systemjs": "7.29.4",
|
|
308
309
|
"@tootallnate/once@<3.0.1": ">=3.0.1",
|
|
309
|
-
"brace-expansion": "
|
|
310
|
+
"brace-expansion": "5.0.6",
|
|
311
|
+
"fast-uri": "3.1.2",
|
|
312
|
+
"form-data": "4.0.6",
|
|
310
313
|
"flatted": ">=3.4.2",
|
|
311
314
|
"flatted@<3.4.0": ">=3.4.0",
|
|
312
315
|
"handlebars": ">=4.7.9",
|
|
313
316
|
"immutable@>=5.0.0 <5.1.5": ">=5.1.5",
|
|
314
|
-
"
|
|
317
|
+
"js-yaml": "4.2.0",
|
|
318
|
+
"minimatch": "9.0.7",
|
|
315
319
|
"path-to-regexp": ">=8.4.0",
|
|
316
320
|
"picomatch": ">=4.0.4",
|
|
317
|
-
"qs": "
|
|
321
|
+
"qs": "6.15.2",
|
|
318
322
|
"rollup": ">=4.59.0",
|
|
319
323
|
"serialize-javascript": ">=7.0.3",
|
|
324
|
+
"shell-quote": "1.8.4",
|
|
320
325
|
"storybook": ">=10.2.10",
|
|
321
|
-
"undici": "
|
|
326
|
+
"undici": "8.5.0",
|
|
327
|
+
"uuid": "11.1.1",
|
|
328
|
+
"vite": "6.4.3",
|
|
322
329
|
"webpack": ">=5.104.1",
|
|
330
|
+
"ws": "8.21.0",
|
|
323
331
|
"yaml": ">=1.10.3"
|
|
324
|
-
},
|
|
325
|
-
"auditConfig": {
|
|
326
|
-
"ignoreCves": [
|
|
327
|
-
"GHSA-rx8g-88g5-qh64",
|
|
328
|
-
"CVE-2025-57352"
|
|
329
|
-
]
|
|
330
332
|
}
|
|
331
333
|
}
|
|
332
334
|
}
|
|
@@ -1914,6 +1914,31 @@ form select:placeholder-shown {
|
|
|
1914
1914
|
font-weight: 200;
|
|
1915
1915
|
font-family: var(--bodyFont);
|
|
1916
1916
|
}
|
|
1917
|
+
form .textareaFieldContainer {
|
|
1918
|
+
display: flex;
|
|
1919
|
+
flex-direction: column;
|
|
1920
|
+
row-gap: 5px;
|
|
1921
|
+
align-items: stretch;
|
|
1922
|
+
justify-content: flex-start;
|
|
1923
|
+
width: 100%;
|
|
1924
|
+
}
|
|
1925
|
+
form .textareaFooter {
|
|
1926
|
+
min-height: 1.5em;
|
|
1927
|
+
}
|
|
1928
|
+
form .textarea_Field.stacked label .textareaFooter .validation {
|
|
1929
|
+
position: static;
|
|
1930
|
+
height: auto;
|
|
1931
|
+
}
|
|
1932
|
+
form .textarea_Field.withValidation label {
|
|
1933
|
+
padding-bottom: 0;
|
|
1934
|
+
}
|
|
1935
|
+
form .textareaCharacterCount {
|
|
1936
|
+
line-height: 1.5;
|
|
1937
|
+
color: var(--inputLabelColor);
|
|
1938
|
+
}
|
|
1939
|
+
form .textareaCharacterCountExceeded {
|
|
1940
|
+
color: var(--inputErrorColor);
|
|
1941
|
+
}
|
|
1917
1942
|
form input[type=number] {
|
|
1918
1943
|
padding-right: 0;
|
|
1919
1944
|
}
|
|
@@ -1262,6 +1262,31 @@ form select:placeholder-shown {
|
|
|
1262
1262
|
font-weight: 200;
|
|
1263
1263
|
font-family: var(--bodyFont);
|
|
1264
1264
|
}
|
|
1265
|
+
form .textareaFieldContainer {
|
|
1266
|
+
display: flex;
|
|
1267
|
+
flex-direction: column;
|
|
1268
|
+
row-gap: 5px;
|
|
1269
|
+
align-items: stretch;
|
|
1270
|
+
justify-content: flex-start;
|
|
1271
|
+
width: 100%;
|
|
1272
|
+
}
|
|
1273
|
+
form .textareaFooter {
|
|
1274
|
+
min-height: 1.5em;
|
|
1275
|
+
}
|
|
1276
|
+
form .textarea_Field.stacked label .textareaFooter .validation {
|
|
1277
|
+
position: static;
|
|
1278
|
+
height: auto;
|
|
1279
|
+
}
|
|
1280
|
+
form .textarea_Field.withValidation label {
|
|
1281
|
+
padding-bottom: 0;
|
|
1282
|
+
}
|
|
1283
|
+
form .textareaCharacterCount {
|
|
1284
|
+
line-height: 1.5;
|
|
1285
|
+
color: var(--inputLabelColor);
|
|
1286
|
+
}
|
|
1287
|
+
form .textareaCharacterCountExceeded {
|
|
1288
|
+
color: var(--inputErrorColor);
|
|
1289
|
+
}
|
|
1265
1290
|
form input[type=number] {
|
|
1266
1291
|
padding-right: 0;
|
|
1267
1292
|
}
|
|
@@ -261,6 +261,31 @@ form select:placeholder-shown {
|
|
|
261
261
|
font-weight: 200;
|
|
262
262
|
font-family: var(--bodyFont);
|
|
263
263
|
}
|
|
264
|
+
form .textareaFieldContainer {
|
|
265
|
+
display: flex;
|
|
266
|
+
flex-direction: column;
|
|
267
|
+
row-gap: 5px;
|
|
268
|
+
align-items: stretch;
|
|
269
|
+
justify-content: flex-start;
|
|
270
|
+
width: 100%;
|
|
271
|
+
}
|
|
272
|
+
form .textareaFooter {
|
|
273
|
+
min-height: 1.5em;
|
|
274
|
+
}
|
|
275
|
+
form .textarea_Field.stacked label .textareaFooter .validation {
|
|
276
|
+
position: static;
|
|
277
|
+
height: auto;
|
|
278
|
+
}
|
|
279
|
+
form .textarea_Field.withValidation label {
|
|
280
|
+
padding-bottom: 0;
|
|
281
|
+
}
|
|
282
|
+
form .textareaCharacterCount {
|
|
283
|
+
line-height: 1.5;
|
|
284
|
+
color: var(--inputLabelColor);
|
|
285
|
+
}
|
|
286
|
+
form .textareaCharacterCountExceeded {
|
|
287
|
+
color: var(--inputErrorColor);
|
|
288
|
+
}
|
|
264
289
|
form input[type=number] {
|
|
265
290
|
padding-right: 0;
|
|
266
291
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageBanner.d.ts","sourceRoot":"","sources":["../../../../../src/components/design/banners/pageBanner/PageBanner.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAY,SAAS,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"PageBanner.d.ts","sourceRoot":"","sources":["../../../../../src/components/design/banners/pageBanner/PageBanner.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAY,SAAS,EAAE,YAAY,EAAa,MAAM,OAAO,CAAC;AAI5E,OAAO,oBAAoB,CAAC;AAE5B,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,SAAS,GAAG,YAAY,CAAC;IACnC,SAAS,CAAC,EAAE,aAAa,GAAG,cAAc,GAAG,aAAa,GAAG,MAAM,CAAC;IACpE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;IAC/B,WAAW,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,YAAY,CAAC;IACnE,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IACvD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAClC,cAAc,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;CAC1C;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAwEhD,CAAC;AAEF,eAAe,UAAU,CAAC;AAE1B,OAAO,EAAE,UAAU,IAAI,MAAM,EAAE,CAAC;AAChC,OAAO,EAAE,UAAU,IAAI,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormField.test.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/formFields/formFieldWrapper/FormField.test.tsx"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -111,6 +111,12 @@ export interface FieldProps extends NativeFieldProps {
|
|
|
111
111
|
min?: string | number;
|
|
112
112
|
/** Maximum value or length. */
|
|
113
113
|
max?: string | number;
|
|
114
|
+
/**
|
|
115
|
+
* Whether to enforce grapheme-aware max-length handling (used by textarea).
|
|
116
|
+
* Uses `field.maxLength` (native field prop) as the source for the UI/input limit.
|
|
117
|
+
* Keep `field.maxLength` and `validation.maxLength` aligned to avoid mixed UX/validation behaviour.
|
|
118
|
+
*/
|
|
119
|
+
enforceMaxLength?: boolean;
|
|
114
120
|
}
|
|
115
121
|
/**
|
|
116
122
|
* Validation rules for fields.
|
|
@@ -127,7 +133,11 @@ export interface ValidationProps<TFieldValue = unknown | string | boolean, TForm
|
|
|
127
133
|
min?: MinMaxRule<TFieldValue>;
|
|
128
134
|
/** Maximum value or length. */
|
|
129
135
|
max?: MinMaxRule<TFieldValue>;
|
|
130
|
-
/**
|
|
136
|
+
/**
|
|
137
|
+
* Maximum length validation rule.
|
|
138
|
+
* Used for validation outcome/messages, while textarea UI/input limiting is driven by `field.maxLength`.
|
|
139
|
+
* If both are provided, keep them equal.
|
|
140
|
+
*/
|
|
131
141
|
maxLength?: ValidationRule<number>;
|
|
132
142
|
/** Minimum length of the field. */
|
|
133
143
|
minLength?: ValidationRule<number>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formFieldProps.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/formFields/formFieldWrapper/formFieldProps.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,WAAW,EAAE,kBAAkB,EAAE,gBAAgB,EACjD,aAAa,EACb,YAAY,EACZ,SAAS,EACV,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,OAAO,CAAC;AAEf,OAAO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/B,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,GAAG,aAAa,CAAC,iBAAiB,CAAC,GAAG,aAAa,CAAC,mBAAmB,CAAC,KACzG,IAAI,GAAG,eAAe,CAAC,CAAC;IAC7B,kCAAkC;IAClC,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,mCAAmC;IACnC,OAAO,CAAC,EAAE,gBAAgB,CACxB,gBAAgB,GAAG,iBAAiB,GAAG,mBAAmB,CAC3D,CAAC;IACF,qCAAqC;IACrC,SAAS,CAAC,EAAE,oBAAoB,GAAG,CAAC,CAClC,KAAK,EAAE,aAAa,CAAC,gBAAgB,CAAC,GAAG,aAAa,CAAC,iBAAiB,CAAC,GAAG,aAAa,CAAC,mBAAmB,CAAC,KAC3G,IAAI,GAAG,eAAe,CAAC,CAAC;IAC7B,gDAAgD;IAChD,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,wDAAwD;IACxD,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,kCAAkC;IAClC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oCAAoC;IACpC,OAAO,CAAC,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,CAAC;IAChD,6CAA6C;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8HAA8H;IAC9H,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sHAAsH;IACtH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+BAA+B;IAC/B,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,+BAA+B;IAC/B,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"formFieldProps.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/formFields/formFieldWrapper/formFieldProps.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,WAAW,EAAE,kBAAkB,EAAE,gBAAgB,EACjD,aAAa,EACb,YAAY,EACZ,SAAS,EACV,MAAM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C;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,2BAA2B;IAC3B,KAAK,EAAE,UAAU,CAAC;IAClB,2BAA2B;IAC3B,KAAK,EAAE,UAAU,CAAC;IAClB,sCAAsC;IACtC,MAAM,CAAC,EAAE,SAAS,GAAG,YAAY,GAAG,MAAM,CAAC;IAC3C,sCAAsC;IACtC,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,iCAAiC;IACjC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,wCAAwC;IACxC,gBAAgB,CAAC,EAAE,0BAA0B,CAAC;IAC9C,oCAAoC;IACpC,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC,kEAAkE;IAClE,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/formFields/subComponents/textarea/Textarea.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/formFields/subComponents/textarea/Textarea.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAGjD,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAIvE,UAAU,aAAc,SAAQ,cAAc,EAAE,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC;CAAG;AAoCpG,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAoO5C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Textarea.test.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/formFields/subComponents/textarea/Textarea.test.tsx"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { FieldError, FieldErrors, FieldErrorsImpl, Merge } from 'react-hook-form';
|
|
2
3
|
import { ValidationProps } from '../formFields/formFieldWrapper/formFieldProps';
|
|
3
4
|
import { InputCheckboxValidationProps } from '../formFields/subComponents/inputs/checkbox/inputCheckboxProps';
|
|
4
5
|
export declare const GenericErrorMessages: Record<string, (value?: never) => string>;
|
|
6
|
+
export declare const extractError: (errors: FieldErrors, fieldName: string) => FieldError | Merge<FieldError, FieldErrorsImpl<never>> | undefined;
|
|
5
7
|
interface ValidationMessagesProps {
|
|
6
8
|
name: string;
|
|
7
9
|
validation?: ValidationProps | InputCheckboxValidationProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidationMessages.d.ts","sourceRoot":"","sources":["../../../../src/components/form/validation/ValidationMessages.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ValidationMessages.d.ts","sourceRoot":"","sources":["../../../../src/components/form/validation/ValidationMessages.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,UAAU,EACV,WAAW,EACX,eAAe,EACf,KAAK,EACN,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,eAAe,EAChB,MAAM,+CAA+C,CAAC;AAEvD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gEAAgE,CAAC;AAG9G,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,MAAM,CAO1E,CAAC;AAGF,eAAO,MAAM,YAAY,WACf,WAAW,aACR,MAAM,KAChB,UAAU,GAAG,KAAK,CAAC,UAAU,EAAE,eAAe,CAAC,KAAK,CAAC,CAAC,GAAG,SAiB3D,CAAC;AAEF,UAAU,uBAAuB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,eAAe,GAAG,4BAA4B,CAAA;CAC5D;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAmDhE,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -11,8 +11,8 @@ export const libraryThemes = {
|
|
|
11
11
|
"map": "index.min.css.map"
|
|
12
12
|
},
|
|
13
13
|
"versioned": {
|
|
14
|
-
"css": "index.min.3.
|
|
15
|
-
"map": "index.min.3.
|
|
14
|
+
"css": "index.min.3.14.0.css",
|
|
15
|
+
"map": "index.min.3.14.0.css.map"
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"cba": {
|
|
@@ -26,8 +26,8 @@ export const libraryThemes = {
|
|
|
26
26
|
"map": "cba.min.css.map"
|
|
27
27
|
},
|
|
28
28
|
"versioned": {
|
|
29
|
-
"css": "cba.min.3.
|
|
30
|
-
"map": "cba.min.3.
|
|
29
|
+
"css": "cba.min.3.14.0.css",
|
|
30
|
+
"map": "cba.min.3.14.0.css.map"
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"creditSavvy": {
|
|
@@ -41,8 +41,8 @@ export const libraryThemes = {
|
|
|
41
41
|
"map": "creditSavvy.min.css.map"
|
|
42
42
|
},
|
|
43
43
|
"versioned": {
|
|
44
|
-
"css": "creditSavvy.min.3.
|
|
45
|
-
"map": "creditSavvy.min.3.
|
|
44
|
+
"css": "creditSavvy.min.3.14.0.css",
|
|
45
|
+
"map": "creditSavvy.min.3.14.0.css.map"
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
"doshii": {
|
|
@@ -56,8 +56,8 @@ export const libraryThemes = {
|
|
|
56
56
|
"map": "doshii.min.css.map"
|
|
57
57
|
},
|
|
58
58
|
"versioned": {
|
|
59
|
-
"css": "doshii.min.3.
|
|
60
|
-
"map": "doshii.min.3.
|
|
59
|
+
"css": "doshii.min.3.14.0.css",
|
|
60
|
+
"map": "doshii.min.3.14.0.css.map"
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
"homeIn": {
|
|
@@ -71,8 +71,8 @@ export const libraryThemes = {
|
|
|
71
71
|
"map": "homeIn.min.css.map"
|
|
72
72
|
},
|
|
73
73
|
"versioned": {
|
|
74
|
-
"css": "homeIn.min.3.
|
|
75
|
-
"map": "homeIn.min.3.
|
|
74
|
+
"css": "homeIn.min.3.14.0.css",
|
|
75
|
+
"map": "homeIn.min.3.14.0.css.map"
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
78
|
"x15Core": {
|
|
@@ -86,8 +86,8 @@ export const libraryThemes = {
|
|
|
86
86
|
"map": "x15Core.min.css.map"
|
|
87
87
|
},
|
|
88
88
|
"versioned": {
|
|
89
|
-
"css": "x15Core.min.3.
|
|
90
|
-
"map": "x15Core.min.3.
|
|
89
|
+
"css": "x15Core.min.3.14.0.css",
|
|
90
|
+
"map": "x15Core.min.3.14.0.css.map"
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"libraryThemes.js","names":["libraryThemes"],"sources":["../../../src/autoGenerated/libraryThemes.ts"],"sourcesContent":["/* eslint-disable */\nexport const libraryThemes = {\n \"base\": {\n \"buildPath\": \"styles\",\n \"dev\": {\n \"css\": \"index.css\",\n \"map\": \"index.css.map\"\n },\n \"min\": {\n \"css\": \"index.min.css\",\n \"map\": \"index.min.css.map\"\n },\n \"versioned\": {\n \"css\": \"index.min.3.
|
|
1
|
+
{"version":3,"file":"libraryThemes.js","names":["libraryThemes"],"sources":["../../../src/autoGenerated/libraryThemes.ts"],"sourcesContent":["/* eslint-disable */\nexport const libraryThemes = {\n \"base\": {\n \"buildPath\": \"styles\",\n \"dev\": {\n \"css\": \"index.css\",\n \"map\": \"index.css.map\"\n },\n \"min\": {\n \"css\": \"index.min.css\",\n \"map\": \"index.min.css.map\"\n },\n \"versioned\": {\n \"css\": \"index.min.3.14.0.css\",\n \"map\": \"index.min.3.14.0.css.map\"\n }\n },\n \"cba\": {\n \"buildPath\": \"styles/themes/cba\",\n \"dev\": {\n \"css\": \"cba.css\",\n \"map\": \"cba.css.map\"\n },\n \"min\": {\n \"css\": \"cba.min.css\",\n \"map\": \"cba.min.css.map\"\n },\n \"versioned\": {\n \"css\": \"cba.min.3.14.0.css\",\n \"map\": \"cba.min.3.14.0.css.map\"\n }\n },\n \"creditSavvy\": {\n \"buildPath\": \"styles/themes/creditSavvy\",\n \"dev\": {\n \"css\": \"creditSavvy.css\",\n \"map\": \"creditSavvy.css.map\"\n },\n \"min\": {\n \"css\": \"creditSavvy.min.css\",\n \"map\": \"creditSavvy.min.css.map\"\n },\n \"versioned\": {\n \"css\": \"creditSavvy.min.3.14.0.css\",\n \"map\": \"creditSavvy.min.3.14.0.css.map\"\n }\n },\n \"doshii\": {\n \"buildPath\": \"styles/themes/doshii\",\n \"dev\": {\n \"css\": \"doshii.css\",\n \"map\": \"doshii.css.map\"\n },\n \"min\": {\n \"css\": \"doshii.min.css\",\n \"map\": \"doshii.min.css.map\"\n },\n \"versioned\": {\n \"css\": \"doshii.min.3.14.0.css\",\n \"map\": \"doshii.min.3.14.0.css.map\"\n }\n },\n \"homeIn\": {\n \"buildPath\": \"styles/themes/homeIn\",\n \"dev\": {\n \"css\": \"homeIn.css\",\n \"map\": \"homeIn.css.map\"\n },\n \"min\": {\n \"css\": \"homeIn.min.css\",\n \"map\": \"homeIn.min.css.map\"\n },\n \"versioned\": {\n \"css\": \"homeIn.min.3.14.0.css\",\n \"map\": \"homeIn.min.3.14.0.css.map\"\n }\n },\n \"x15Core\": {\n \"buildPath\": \"styles/themes/x15Core\",\n \"dev\": {\n \"css\": \"x15Core.css\",\n \"map\": \"x15Core.css.map\"\n },\n \"min\": {\n \"css\": \"x15Core.min.css\",\n \"map\": \"x15Core.min.css.map\"\n },\n \"versioned\": {\n \"css\": \"x15Core.min.3.14.0.css\",\n \"map\": \"x15Core.min.3.14.0.css.map\"\n }\n }\n}; export default libraryThemes;"],"mappings":"AAAA;AACA,OAAO,MAAM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CAAC;IACD,WAAW,EAAE;MACX,KAAK,EAAE,uBAAuB;MAC9B,KAAK,EAAE;IACT;EACF,CAAC;EACD,SAAS,EAAE;IACT,WAAW,EAAE,uBAAuB;IACpC,KAAK,EAAE;MACL,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE;IACT,CAAC;IACD,KAAK,EAAE;MACL,KAAK,EAAE,iBAAiB;MACxB,KAAK,EAAE;IACT,CAAC;IACD,WAAW,EAAE;MACX,KAAK,EAAE,wBAAwB;MAC/B,KAAK,EAAE;IACT;EACF;AACF,CAAC;AAAE,eAAeA,aAAa","ignoreList":[]}
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"map": "index.min.css.map"
|
|
11
11
|
},
|
|
12
12
|
"versioned": {
|
|
13
|
-
"css": "base.min.3.
|
|
14
|
-
"map": "base.min.3.
|
|
13
|
+
"css": "base.min.3.14.0.css",
|
|
14
|
+
"map": "base.min.3.14.0.css.map"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"cba": {
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"map": "cba.min.css.map"
|
|
26
26
|
},
|
|
27
27
|
"versioned": {
|
|
28
|
-
"css": "cba.min.3.
|
|
29
|
-
"map": "cba.min.3.
|
|
28
|
+
"css": "cba.min.3.14.0.css",
|
|
29
|
+
"map": "cba.min.3.14.0.css.map"
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
"creditSavvy": {
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"map": "creditSavvy.min.css.map"
|
|
41
41
|
},
|
|
42
42
|
"versioned": {
|
|
43
|
-
"css": "creditSavvy.min.3.
|
|
44
|
-
"map": "creditSavvy.min.3.
|
|
43
|
+
"css": "creditSavvy.min.3.14.0.css",
|
|
44
|
+
"map": "creditSavvy.min.3.14.0.css.map"
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"doshii": {
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"map": "doshii.min.css.map"
|
|
56
56
|
},
|
|
57
57
|
"versioned": {
|
|
58
|
-
"css": "doshii.min.3.
|
|
59
|
-
"map": "doshii.min.3.
|
|
58
|
+
"css": "doshii.min.3.14.0.css",
|
|
59
|
+
"map": "doshii.min.3.14.0.css.map"
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
"homeIn": {
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
"map": "homeIn.min.css.map"
|
|
71
71
|
},
|
|
72
72
|
"versioned": {
|
|
73
|
-
"css": "homeIn.min.3.
|
|
74
|
-
"map": "homeIn.min.3.
|
|
73
|
+
"css": "homeIn.min.3.14.0.css",
|
|
74
|
+
"map": "homeIn.min.3.14.0.css.map"
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
77
|
"x15Core": {
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
"map": "x15Core.min.css.map"
|
|
86
86
|
},
|
|
87
87
|
"versioned": {
|
|
88
|
-
"css": "x15Core.min.3.
|
|
89
|
-
"map": "x15Core.min.3.
|
|
88
|
+
"css": "x15Core.min.3.14.0.css",
|
|
89
|
+
"map": "x15Core.min.3.14.0.css.map"
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import React, { useState } from 'react';
|
|
3
|
+
import React, { useState, useEffect } from 'react';
|
|
4
4
|
import { Icon } from '../../icons/basicIcon/Icon';
|
|
5
5
|
import { SimpleButton } from '../../../form/buttons/SimpleButton';
|
|
6
6
|
import './pageBanners.css';
|
|
@@ -20,7 +20,10 @@ export const PageBanner = ({
|
|
|
20
20
|
backgroundFill = 'primary'
|
|
21
21
|
}) => {
|
|
22
22
|
const StorageKey = `pageBanner_${id}`;
|
|
23
|
-
const StorageValue =
|
|
23
|
+
const [StorageValue, setStorageValue] = useState(null);
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
setStorageValue(localStorage.getItem(StorageKey));
|
|
26
|
+
}, [StorageKey]);
|
|
24
27
|
const UserPreferences = StorageValue && JSON.parse(StorageValue);
|
|
25
28
|
const {
|
|
26
29
|
shouldDisplay
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageBanner.js","names":["React","useState","Icon","SimpleButton","PageBanner","animation","reDisplayOnClose","autoHide","autoHideDelay","children","displayMode","icon","id","position","type","disableClose","widthVariant","backgroundFill","StorageKey","StorageValue","localStorage","getItem","UserPreferences","JSON","parse","shouldDisplay","isVisible","setVisibility","autoHideCssClass","cssClass","handleBannerClose","setItem","stringify","createElement","className","label","onClickHandler","hideLabel","leftIcon","Banner","Alert"],"sources":["../../../../../../src/components/design/banners/pageBanner/PageBanner.tsx"],"sourcesContent":["'use client';\n\nimport React, { useState, ReactNode, ReactElement } from 'react';\nimport { Icon } from '../../icons/basicIcon/Icon';\nimport { SimpleButton } from '../../../form/buttons/SimpleButton';\n\nimport './pageBanners.scss';\n\nexport interface PageBannerProps {\n id: string;\n children: ReactNode | ReactElement;\n animation?: 'slideInLeft' | 'slideInRight' | 'growOnHover' | 'none';\n reDisplayOnClose?: boolean;\n autoHide?: boolean;\n autoHideDelay?: 1 | 3 | 5 | 10;\n displayMode?: 'fixed' | 'inline';\n icon?: string;\n position?: 'topRight' | 'topCentre' | 'bottomRight' | 'bottomLeft'; // Only applicable with fixed display\n type?: 'alert' | 'info' | 'warn' | 'error' | 'success';\n disableClose?: boolean;\n widthVariant?: 'sm' | 'md' | 'lg';\n backgroundFill?: 'primary' | 'secondary';\n}\n\nexport const PageBanner: React.FC<PageBannerProps> = ({\n animation = 'none',\n reDisplayOnClose = false,\n autoHide = false,\n autoHideDelay = 10,\n children,\n displayMode = 'fixed',\n icon = 'info',\n id = 'pageBanner',\n position = 'topCentre', \n type = 'info',\n disableClose = false,\n widthVariant = 'lg',\n backgroundFill = 'primary',\n}) => {\n const StorageKey = `pageBanner_${ id }`;\n const StorageValue = localStorage.getItem(StorageKey);\n const UserPreferences = StorageValue && JSON.parse(StorageValue);\n\n const { shouldDisplay } = UserPreferences || { shouldDisplay: true };\n\n const [isVisible, setVisibility] = useState<boolean>(shouldDisplay);\n\n const autoHideCssClass = autoHide ? `autoHide_${ autoHideDelay }` : 'noAutoHide';\n\n const cssClass = `\n pageBanner \n ${ type } \n ${ position } \n ${ displayMode } \n ${ autoHideCssClass }_${ animation }\n width_${ widthVariant }\n backgroundFill_${ backgroundFill }\n `;\n\n const handleBannerClose = () => {\n setVisibility(false);\n localStorage.setItem(StorageKey, JSON.stringify({ shouldDisplay: reDisplayOnClose }));\n };\n\n if (isVisible) {\n return (\n <aside className={ cssClass }>\n { !disableClose && (\n <SimpleButton\n cssClass=\"closeBannerButton\"\n label=\"Close page banner\"\n id={ `${ id }_CloseBannerButton` }\n onClickHandler={ handleBannerClose }\n hideLabel\n leftIcon={ { icon: 'close' } }\n />\n ) }\n\n <div className=\"pageBannerMainIcon\">\n <Icon icon={ icon } />\n </div>\n\n <div className=\"pageBannerContent\">\n { children }\n </div>\n </aside>\n );\n }\n\n return null;\n};\n\nexport default PageBanner;\n\nexport { PageBanner as Banner };\nexport { PageBanner as Alert };"],"mappings":"AAAA,YAAY;;AAEZ,OAAOA,KAAK,IAAIC,QAAQ,
|
|
1
|
+
{"version":3,"file":"PageBanner.js","names":["React","useState","useEffect","Icon","SimpleButton","PageBanner","animation","reDisplayOnClose","autoHide","autoHideDelay","children","displayMode","icon","id","position","type","disableClose","widthVariant","backgroundFill","StorageKey","StorageValue","setStorageValue","localStorage","getItem","UserPreferences","JSON","parse","shouldDisplay","isVisible","setVisibility","autoHideCssClass","cssClass","handleBannerClose","setItem","stringify","createElement","className","label","onClickHandler","hideLabel","leftIcon","Banner","Alert"],"sources":["../../../../../../src/components/design/banners/pageBanner/PageBanner.tsx"],"sourcesContent":["'use client';\n\nimport React, { useState, ReactNode, ReactElement, useEffect } from 'react';\nimport { Icon } from '../../icons/basicIcon/Icon';\nimport { SimpleButton } from '../../../form/buttons/SimpleButton';\n\nimport './pageBanners.scss';\n\nexport interface PageBannerProps {\n id: string;\n children: ReactNode | ReactElement;\n animation?: 'slideInLeft' | 'slideInRight' | 'growOnHover' | 'none';\n reDisplayOnClose?: boolean;\n autoHide?: boolean;\n autoHideDelay?: 1 | 3 | 5 | 10;\n displayMode?: 'fixed' | 'inline';\n icon?: string;\n position?: 'topRight' | 'topCentre' | 'bottomRight' | 'bottomLeft'; // Only applicable with fixed display\n type?: 'alert' | 'info' | 'warn' | 'error' | 'success';\n disableClose?: boolean;\n widthVariant?: 'sm' | 'md' | 'lg';\n backgroundFill?: 'primary' | 'secondary';\n}\n\nexport const PageBanner: React.FC<PageBannerProps> = ({\n animation = 'none',\n reDisplayOnClose = false,\n autoHide = false,\n autoHideDelay = 10,\n children,\n displayMode = 'fixed',\n icon = 'info',\n id = 'pageBanner',\n position = 'topCentre', \n type = 'info',\n disableClose = false,\n widthVariant = 'lg',\n backgroundFill = 'primary',\n}) => {\n const StorageKey = `pageBanner_${ id }`;\n\n const [StorageValue, setStorageValue] = useState<string | null>(null);\n\n useEffect(() => {\n setStorageValue(localStorage.getItem(StorageKey));\n }, [StorageKey]);\n\n const UserPreferences = StorageValue && JSON.parse(StorageValue);\n\n const { shouldDisplay } = UserPreferences || { shouldDisplay: true };\n\n const [isVisible, setVisibility] = useState<boolean>(shouldDisplay);\n\n const autoHideCssClass = autoHide ? `autoHide_${ autoHideDelay }` : 'noAutoHide';\n\n const cssClass = `\n pageBanner \n ${ type } \n ${ position } \n ${ displayMode } \n ${ autoHideCssClass }_${ animation }\n width_${ widthVariant }\n backgroundFill_${ backgroundFill }\n `;\n\n const handleBannerClose = () => {\n setVisibility(false);\n localStorage.setItem(StorageKey, JSON.stringify({ shouldDisplay: reDisplayOnClose }));\n };\n\n if (isVisible) {\n return (\n <aside className={ cssClass }>\n { !disableClose && (\n <SimpleButton\n cssClass=\"closeBannerButton\"\n label=\"Close page banner\"\n id={ `${ id }_CloseBannerButton` }\n onClickHandler={ handleBannerClose }\n hideLabel\n leftIcon={ { icon: 'close' } }\n />\n ) }\n\n <div className=\"pageBannerMainIcon\">\n <Icon icon={ icon } />\n </div>\n\n <div className=\"pageBannerContent\">\n { children }\n </div>\n </aside>\n );\n }\n\n return null;\n};\n\nexport default PageBanner;\n\nexport { PageBanner as Banner };\nexport { PageBanner as Alert };"],"mappings":"AAAA,YAAY;;AAEZ,OAAOA,KAAK,IAAIC,QAAQ,EAA2BC,SAAS,QAAQ,OAAO;AAC3E,SAASC,IAAI,QAAQ,4BAA4B;AACjD,SAASC,YAAY,QAAQ,oCAAoC;AAEjE,OAAO,oBAAoB;AAkB3B,OAAO,MAAMC,UAAqC,GAAGA,CAAC;EACpDC,SAAS,GAAG,MAAM;EAClBC,gBAAgB,GAAG,KAAK;EACxBC,QAAQ,GAAG,KAAK;EAChBC,aAAa,GAAG,EAAE;EAClBC,QAAQ;EACRC,WAAW,GAAG,OAAO;EACrBC,IAAI,GAAG,MAAM;EACbC,EAAE,GAAG,YAAY;EACjBC,QAAQ,GAAG,WAAW;EACtBC,IAAI,GAAG,MAAM;EACbC,YAAY,GAAG,KAAK;EACpBC,YAAY,GAAG,IAAI;EACnBC,cAAc,GAAG;AACnB,CAAC,KAAK;EACJ,MAAMC,UAAU,GAAG,cAAeN,EAAE,EAAG;EAEvC,MAAM,CAACO,YAAY,EAAEC,eAAe,CAAC,GAAGpB,QAAQ,CAAgB,IAAI,CAAC;EAErEC,SAAS,CAAC,MAAM;IACdmB,eAAe,CAACC,YAAY,CAACC,OAAO,CAACJ,UAAU,CAAC,CAAC;EACnD,CAAC,EAAE,CAACA,UAAU,CAAC,CAAC;EAEhB,MAAMK,eAAe,GAAGJ,YAAY,IAAIK,IAAI,CAACC,KAAK,CAACN,YAAY,CAAC;EAEhE,MAAM;IAAEO;EAAc,CAAC,GAAGH,eAAe,IAAI;IAAEG,aAAa,EAAE;EAAK,CAAC;EAEpE,MAAM,CAACC,SAAS,EAAEC,aAAa,CAAC,GAAG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({
|
|
|
94
94
|
htmlFor: field.id
|
|
95
95
|
}, (!label?.position || label.position === 'left' || separateLabelAndField) && /*#__PURE__*/React.createElement(FormFieldLabel, labelProps), !separateLabelAndField && /*#__PURE__*/React.createElement("span", {
|
|
96
96
|
className: "inputContainer"
|
|
97
|
-
}, getFieldElement(), label?.position === 'inset' && /*#__PURE__*/React.createElement(FormFieldLabel, labelProps)), label?.position === 'right' && /*#__PURE__*/React.createElement(FormFieldLabel, labelProps), showSpinner && /*#__PURE__*/React.createElement(Spinner, null), /*#__PURE__*/React.createElement(ValidationMessages, {
|
|
97
|
+
}, getFieldElement(), label?.position === 'inset' && /*#__PURE__*/React.createElement(FormFieldLabel, labelProps)), label?.position === 'right' && /*#__PURE__*/React.createElement(FormFieldLabel, labelProps), showSpinner && /*#__PURE__*/React.createElement(Spinner, null), field.type !== 'textarea' && /*#__PURE__*/React.createElement(ValidationMessages, {
|
|
98
98
|
name: field.name,
|
|
99
99
|
validation: validation
|
|
100
100
|
})), separateLabelAndField && /*#__PURE__*/React.createElement("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormField.js","names":["React","useState","HookFormWrapper","FormFieldLabel","InputText","ValidationMessages","Spinner","InputSearch","InputDate","Select","Textarea","Autocomplete","FormField","label","field","layout","showSpinner","validation","customContent","customCssClasses","separateLabelAndField","isTouched","setIsTouched","wrapperCssClass","type","wrapper","position","wrapperHoverText","hide","undefined","placeholder","text","getFieldElement","fieldType","toLowerCase","fieldProps","defaultValue","onTouched","createElement","Error","labelProps","inputId","id","isRequired","required","className","title","labelId","htmlFor","name"],"sources":["../../../../../../src/components/form/formFields/formFieldWrapper/FormField.tsx"],"sourcesContent":["'use client';\n\nimport React, { ReactNode, useState } from 'react';\nimport { HookFormWrapper } from '../../hookFormWrapper/HookFormWrapper';\nimport { FormFieldLabel } from '../subComponents/labels/FormFieldLabel';\nimport { FormFieldProps } from './formFieldProps';\nimport { InputText } from '../subComponents/inputs/text/InputText';\nimport { ValidationMessages } from '../../validation/ValidationMessages';\nimport { Spinner } from '../../../design/spinner/Spinner';\nimport { InputSearch } from '../subComponents/inputs/search/InputSearch';\nimport { InputDate } from '../subComponents/inputs/date/InputDate';\nimport { Select } from '../subComponents/select/Select';\nimport { Textarea } from '../subComponents/textarea/Textarea';\nimport { Autocomplete } from '../subComponents/inputs/autocomplete/Autocomplete';\n\nexport const FormField: React.FC<FormFieldProps> = (\n {\n label,\n field,\n layout = 'stacked',\n showSpinner,\n validation,\n customContent,\n customCssClasses,\n separateLabelAndField = false\n }\n) => {\n const [isTouched, setIsTouched] = useState(false);\n\n const wrapperCssClass = `\n formField \n ${ layout } \n ${ field.type }_Field \n ${ customCssClasses?.wrapper || '' } \n ${ isTouched ? 'touched' : '' } \n ${ typeof validation !== 'undefined' ? 'withValidation' : '' } \n ${ label?.position === 'inset' ? 'insetLabel' : '' }\n `;\n\n const wrapperHoverText = (): string | undefined => {\n if (!label.hide) {\n return undefined;\n }\n\n if (field.placeholder) {\n return field.placeholder;\n }\n\n if (typeof label.text === 'string') {\n return label.text;\n }\n\n return undefined;\n };\n\n const getFieldElement = () => {\n const fieldType = field.type.toLowerCase();\n const fieldProps = {\n field: {\n ...field,\n ...(fieldType !== 'checkbox' ? { defaultValue: field.defaultValue || '' } : {}),\n onTouched: () => setIsTouched(true)\n },\n label,\n showSpinner,\n validation,\n customContent\n };\n\n switch (fieldType) {\n case 'textarea':\n return <Textarea { ...fieldProps } />;\n case 'select':\n return <Select { ...fieldProps } />;\n case 'checkbox':\n return new Error('Checkboxes require special handling. Please use the InputCheckbox component instead.');\n case 'file':\n return new Error('File inputs require special handling. Please use the DragAndDropFileUpload component instead.');\n case 'password':\n return <InputText { ...fieldProps } />;\n case 'date':\n return <InputDate { ...fieldProps } />;\n case 'search':\n return <InputSearch { ...fieldProps } />;\n case 'combobox':\n return <Autocomplete { ...fieldProps } />;\n default:\n return <InputText { ...fieldProps } />;\n }\n };\n\n const labelProps = {\n ...label,\n inputId: field.id,\n isRequired: validation && typeof validation.required !== 'undefined',\n customContent\n };\n\n return (\n <HookFormWrapper>\n <div\n className={ wrapperCssClass }\n title={ wrapperHoverText() }\n >\n <label\n id={ label.labelId || `${ field.id }_label` }\n className={ `${ customCssClasses?.label || '' } ${ showSpinner ? 'withSpinner' : '' } ${ label.hide ? 'hiddenLabel' : '' }` }\n htmlFor={ field.id }\n >\n\n { (!label?.position || label.position === 'left' || separateLabelAndField)\n && <FormFieldLabel { ...labelProps } /> }\n\n {\n !separateLabelAndField && (\n <span className=\"inputContainer\">\n {\n getFieldElement() as ReactNode\n }\n { label?.position === 'inset'\n && <FormFieldLabel { ...labelProps } /> }\n </span>\n )\n }\n\n { label?.position === 'right'\n && <FormFieldLabel { ...labelProps } /> }\n\n {\n showSpinner && <Spinner />\n }\n\n <ValidationMessages name={ field.name } validation={ validation }
|
|
1
|
+
{"version":3,"file":"FormField.js","names":["React","useState","HookFormWrapper","FormFieldLabel","InputText","ValidationMessages","Spinner","InputSearch","InputDate","Select","Textarea","Autocomplete","FormField","label","field","layout","showSpinner","validation","customContent","customCssClasses","separateLabelAndField","isTouched","setIsTouched","wrapperCssClass","type","wrapper","position","wrapperHoverText","hide","undefined","placeholder","text","getFieldElement","fieldType","toLowerCase","fieldProps","defaultValue","onTouched","createElement","Error","labelProps","inputId","id","isRequired","required","className","title","labelId","htmlFor","name"],"sources":["../../../../../../src/components/form/formFields/formFieldWrapper/FormField.tsx"],"sourcesContent":["'use client';\n\nimport React, { ReactNode, useState } from 'react';\nimport { HookFormWrapper } from '../../hookFormWrapper/HookFormWrapper';\nimport { FormFieldLabel } from '../subComponents/labels/FormFieldLabel';\nimport { FormFieldProps } from './formFieldProps';\nimport { InputText } from '../subComponents/inputs/text/InputText';\nimport { ValidationMessages } from '../../validation/ValidationMessages';\nimport { Spinner } from '../../../design/spinner/Spinner';\nimport { InputSearch } from '../subComponents/inputs/search/InputSearch';\nimport { InputDate } from '../subComponents/inputs/date/InputDate';\nimport { Select } from '../subComponents/select/Select';\nimport { Textarea } from '../subComponents/textarea/Textarea';\nimport { Autocomplete } from '../subComponents/inputs/autocomplete/Autocomplete';\n\nexport const FormField: React.FC<FormFieldProps> = (\n {\n label,\n field,\n layout = 'stacked',\n showSpinner,\n validation,\n customContent,\n customCssClasses,\n separateLabelAndField = false\n }\n) => {\n const [isTouched, setIsTouched] = useState(false);\n\n const wrapperCssClass = `\n formField \n ${ layout } \n ${ field.type }_Field \n ${ customCssClasses?.wrapper || '' } \n ${ isTouched ? 'touched' : '' } \n ${ typeof validation !== 'undefined' ? 'withValidation' : '' } \n ${ label?.position === 'inset' ? 'insetLabel' : '' }\n `;\n\n const wrapperHoverText = (): string | undefined => {\n if (!label.hide) {\n return undefined;\n }\n\n if (field.placeholder) {\n return field.placeholder;\n }\n\n if (typeof label.text === 'string') {\n return label.text;\n }\n\n return undefined;\n };\n\n const getFieldElement = () => {\n const fieldType = field.type.toLowerCase();\n const fieldProps = {\n field: {\n ...field,\n ...(fieldType !== 'checkbox' ? { defaultValue: field.defaultValue || '' } : {}),\n onTouched: () => setIsTouched(true)\n },\n label,\n showSpinner,\n validation,\n customContent\n };\n\n switch (fieldType) {\n case 'textarea':\n return <Textarea { ...fieldProps } />;\n case 'select':\n return <Select { ...fieldProps } />;\n case 'checkbox':\n return new Error('Checkboxes require special handling. Please use the InputCheckbox component instead.');\n case 'file':\n return new Error('File inputs require special handling. Please use the DragAndDropFileUpload component instead.');\n case 'password':\n return <InputText { ...fieldProps } />;\n case 'date':\n return <InputDate { ...fieldProps } />;\n case 'search':\n return <InputSearch { ...fieldProps } />;\n case 'combobox':\n return <Autocomplete { ...fieldProps } />;\n default:\n return <InputText { ...fieldProps } />;\n }\n };\n\n const labelProps = {\n ...label,\n inputId: field.id,\n isRequired: validation && typeof validation.required !== 'undefined',\n customContent\n };\n\n return (\n <HookFormWrapper>\n <div\n className={ wrapperCssClass }\n title={ wrapperHoverText() }\n >\n <label\n id={ label.labelId || `${ field.id }_label` }\n className={ `${ customCssClasses?.label || '' } ${ showSpinner ? 'withSpinner' : '' } ${ label.hide ? 'hiddenLabel' : '' }` }\n htmlFor={ field.id }\n >\n\n { (!label?.position || label.position === 'left' || separateLabelAndField)\n && <FormFieldLabel { ...labelProps } /> }\n\n {\n !separateLabelAndField && (\n <span className=\"inputContainer\">\n {\n getFieldElement() as ReactNode\n }\n { label?.position === 'inset'\n && <FormFieldLabel { ...labelProps } /> }\n </span>\n )\n }\n\n { label?.position === 'right'\n && <FormFieldLabel { ...labelProps } /> }\n\n {\n showSpinner && <Spinner />\n }\n\n { field.type !== 'textarea' && <ValidationMessages name={ field.name } validation={ validation } /> }\n </label>\n\n {\n separateLabelAndField && (\n <div className=\"inputContainer\">\n {\n getFieldElement() as ReactNode\n }\n </div>\n )\n }\n </div>\n </HookFormWrapper>\n );\n};\n\nexport default FormField;\n"],"mappings":"AAAA,YAAY;;AAEZ,OAAOA,KAAK,IAAeC,QAAQ,QAAQ,OAAO;AAClD,SAASC,eAAe,QAAQ,uCAAuC;AACvE,SAASC,cAAc,QAAQ,wCAAwC;AAEvE,SAASC,SAAS,QAAQ,wCAAwC;AAClE,SAASC,kBAAkB,QAAQ,qCAAqC;AACxE,SAASC,OAAO,QAAQ,iCAAiC;AACzD,SAASC,WAAW,QAAQ,4CAA4C;AACxE,SAASC,SAAS,QAAQ,wCAAwC;AAClE,SAASC,MAAM,QAAQ,gCAAgC;AACvD,SAASC,QAAQ,QAAQ,oCAAoC;AAC7D,SAASC,YAAY,QAAQ,mDAAmD;AAEhF,OAAO,MAAMC,SAAmC,GAAGA,CACjD;EACEC,KAAK;EACLC,KAAK;EACLC,MAAM,GAAG,SAAS;EAClBC,WAAW;EACXC,UAAU;EACVC,aAAa;EACbC,gBAAgB;EAChBC,qBAAqB,GAAG;AAC1B,CAAC,KACE;EACH,MAAM,CAACC,SAAS,EAAEC,YAAY,CAAC,GAAGrB,QAAQ,CAAC,KAAK,CAAC;EAEjD,MAAMsB,eAAe,GAAG;AAC1B;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