@x15ventures/x15-ui-library 3.13.5 → 3.15.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/skeleton/Skeleton.js +48 -0
- package/dist/cjs/components/design/skeleton/Skeleton.js.map +1 -0
- package/dist/cjs/components/design/skeleton/_skeletonVariables.css +0 -0
- package/dist/cjs/components/design/skeleton/skeleton.css +86 -0
- 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/components/index.js +7 -0
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/index.js +7 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/package.json +1 -1
- package/dist/cjs/styles/index.css +39 -0
- package/dist/cjs/styles/shared/_allPartials.css +25 -0
- package/dist/cjs/styles/shared/forms/_forms.css +25 -0
- package/dist/cjs/styles/variables/cssVars/_darkModeVariables.css +3 -0
- package/dist/cjs/styles/variables/cssVars/_designVariables.css +11 -0
- package/dist/components/design/skeleton/Skeleton.d.ts +27 -0
- package/dist/components/design/skeleton/Skeleton.d.ts.map +1 -0
- 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/components/index.d.ts +2 -0
- package/dist/components/index.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/skeleton/Skeleton.js +40 -0
- package/dist/esm/components/design/skeleton/Skeleton.js.map +1 -0
- package/dist/esm/components/design/skeleton/_skeletonVariables.css +0 -0
- package/dist/esm/components/design/skeleton/skeleton.css +86 -0
- 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/components/index.js +1 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/package.json +1 -1
- package/dist/esm/styles/index.css +39 -0
- package/dist/esm/styles/shared/_allPartials.css +25 -0
- package/dist/esm/styles/shared/forms/_forms.css +25 -0
- package/dist/esm/styles/variables/cssVars/_darkModeVariables.css +3 -0
- package/dist/esm/styles/variables/cssVars/_designVariables.css +11 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
- package/readme.md +1 -0
|
@@ -1,19 +1,49 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import React from 'react';
|
|
3
|
+
import React, { useMemo, useState } from 'react';
|
|
4
4
|
import { useFormContext } from 'react-hook-form';
|
|
5
5
|
import { HookFormWrapper } from '../../../hookFormWrapper/HookFormWrapper';
|
|
6
6
|
import { NoHookFormContext } from '../../utilities/formUtilities';
|
|
7
|
+
import { extractError, ValidationMessages } from '../../../validation/ValidationMessages';
|
|
8
|
+
/**
|
|
9
|
+
* Counts user-perceived characters (grapheme clusters).
|
|
10
|
+
* Treats emojis and composed characters (e.g. accented letters) as a single character.
|
|
11
|
+
* Falls back to basic code-point counting if Intl.Segmenter is not available.
|
|
12
|
+
*/
|
|
13
|
+
function getCharacterCount(value) {
|
|
14
|
+
if (typeof Intl !== 'undefined' && 'Segmenter' in Intl) {
|
|
15
|
+
const segmenter = new Intl.Segmenter(undefined, {
|
|
16
|
+
granularity: 'grapheme'
|
|
17
|
+
});
|
|
18
|
+
return Array.from(segmenter.segment(value)).length;
|
|
19
|
+
}
|
|
20
|
+
return Array.from(value).length;
|
|
21
|
+
}
|
|
22
|
+
function clampToGraphemeMax(value, maxAllowed) {
|
|
23
|
+
if (getCharacterCount(value) <= maxAllowed) {
|
|
24
|
+
return value;
|
|
25
|
+
}
|
|
26
|
+
if (typeof Intl !== 'undefined' && 'Segmenter' in Intl) {
|
|
27
|
+
const segmenter = new Intl.Segmenter(undefined, {
|
|
28
|
+
granularity: 'grapheme'
|
|
29
|
+
});
|
|
30
|
+
return Array.from(segmenter.segment(value)).slice(0, maxAllowed).map(segment => segment.segment).join('');
|
|
31
|
+
}
|
|
32
|
+
return Array.from(value).slice(0, maxAllowed).join('');
|
|
33
|
+
}
|
|
7
34
|
export const Textarea = ({
|
|
8
35
|
field: {
|
|
9
36
|
id,
|
|
10
37
|
name,
|
|
11
38
|
placeholder,
|
|
12
39
|
defaultValue,
|
|
40
|
+
maxLength,
|
|
41
|
+
enforceMaxLength,
|
|
13
42
|
onBlur = () => {},
|
|
14
43
|
onChange = () => {},
|
|
15
44
|
onKeyDown = () => {},
|
|
16
|
-
onTouched = () => {}
|
|
45
|
+
onTouched = () => {},
|
|
46
|
+
...htmlNativeDomProps
|
|
17
47
|
},
|
|
18
48
|
validation,
|
|
19
49
|
showSpinner,
|
|
@@ -22,17 +52,101 @@ export const Textarea = ({
|
|
|
22
52
|
}) => {
|
|
23
53
|
const {
|
|
24
54
|
register,
|
|
25
|
-
getFieldState
|
|
55
|
+
getFieldState,
|
|
56
|
+
formState: {
|
|
57
|
+
errors
|
|
58
|
+
}
|
|
26
59
|
} = useFormContext() || NoHookFormContext;
|
|
27
60
|
const fieldState = getFieldState(name);
|
|
28
|
-
const
|
|
61
|
+
const hasFieldError = Boolean(extractError(errors, name));
|
|
62
|
+
// Combine fieldState.invalid with a direct errors lookup so this component re-renders
|
|
63
|
+
// whenever formState.errors changes (getFieldState alone does not subscribe to errors).
|
|
64
|
+
const isInvalid = Boolean(fieldState?.invalid ?? hasFieldError);
|
|
65
|
+
const [count, setCount] = useState(() => getCharacterCount(defaultValue?.toString() || ''));
|
|
66
|
+
const [hasStartedTyping, setHasStartedTyping] = useState(false);
|
|
67
|
+
const hasMaxLength = typeof maxLength === 'number';
|
|
68
|
+
const isAtLimit = hasMaxLength ? count >= maxLength : false;
|
|
69
|
+
// Only hide counter for 'required' error. All other errors (maxLength, pattern, etc)
|
|
70
|
+
// should show counter instead of error message.
|
|
71
|
+
const isRequiredError = fieldState?.error?.type === 'required';
|
|
72
|
+
const characterCounter = !hasStartedTyping || !hasMaxLength || isRequiredError ? undefined : `${count}/${maxLength}`;
|
|
73
|
+
const cssClass = `${customCssClasses?.input || ''}${isInvalid ? ' invalidField' : ''}`;
|
|
74
|
+
const normalizedValidation = useMemo(() => {
|
|
75
|
+
if (!validation || typeof validation.maxLength === 'undefined') {
|
|
76
|
+
return validation;
|
|
77
|
+
}
|
|
78
|
+
const maxLengthRule = validation.maxLength;
|
|
79
|
+
const maxLengthValue = typeof maxLengthRule === 'number' ? maxLengthRule : typeof maxLengthRule === 'object' && maxLengthRule && 'value' in maxLengthRule ? Number(maxLengthRule.value) : undefined;
|
|
80
|
+
if (typeof maxLengthValue !== 'number' || Number.isNaN(maxLengthValue)) {
|
|
81
|
+
return validation;
|
|
82
|
+
}
|
|
83
|
+
const maxLengthMessage = `Maximum length is ${maxLengthValue}`;
|
|
84
|
+
const graphemeMaxLengthValidator = value => getCharacterCount(value || '') <= maxLengthValue || maxLengthMessage;
|
|
85
|
+
|
|
86
|
+
// eslint-disable-next-line no-unused-vars
|
|
29
87
|
const {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
88
|
+
maxLength: _maxLength,
|
|
89
|
+
validate,
|
|
90
|
+
...restValidation
|
|
91
|
+
} = validation;
|
|
92
|
+
if (typeof validate === 'function') {
|
|
93
|
+
return {
|
|
94
|
+
...restValidation,
|
|
95
|
+
validate: async (value, formValues) => {
|
|
96
|
+
const validationResult = await validate(value, formValues);
|
|
97
|
+
if (validationResult !== true) {
|
|
98
|
+
return validationResult;
|
|
99
|
+
}
|
|
100
|
+
return graphemeMaxLengthValidator(value);
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
if (validate && typeof validate === 'object') {
|
|
105
|
+
return {
|
|
106
|
+
...restValidation,
|
|
107
|
+
validate: {
|
|
108
|
+
...validate,
|
|
109
|
+
graphemeMaxLength: graphemeMaxLengthValidator
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
return {
|
|
114
|
+
...restValidation,
|
|
115
|
+
validate: graphemeMaxLengthValidator
|
|
116
|
+
};
|
|
117
|
+
}, [validation]);
|
|
118
|
+
const registered = register(name, normalizedValidation);
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Prevents input that would exceed the maxLength when counting grapheme clusters.
|
|
122
|
+
* Native <textarea maxLength> counts UTF-16 units, so emojis and composed characters
|
|
123
|
+
* can be treated as multiple characters. We avoid using native maxLength and enforce
|
|
124
|
+
* the limit here instead.
|
|
125
|
+
*/
|
|
126
|
+
const HandleBeforeInput = event => {
|
|
127
|
+
if (enforceMaxLength !== true || !hasMaxLength) return;
|
|
128
|
+
const nativeEvent = event.nativeEvent;
|
|
129
|
+
const inserted = nativeEvent.data ?? '';
|
|
130
|
+
if (!inserted) return;
|
|
131
|
+
const target = event.currentTarget;
|
|
132
|
+
const start = target.selectionStart ?? target.value.length;
|
|
133
|
+
const end = target.selectionEnd ?? target.value.length;
|
|
134
|
+
const nextValue = target.value.slice(0, start) + inserted + target.value.slice(end);
|
|
135
|
+
if (getCharacterCount(nextValue) > maxLength) {
|
|
136
|
+
event.preventDefault();
|
|
34
137
|
}
|
|
35
138
|
};
|
|
139
|
+
const HandleChange = event => {
|
|
140
|
+
const rawValue = event.target.value || '';
|
|
141
|
+
const newValue = enforceMaxLength === true && hasMaxLength ? clampToGraphemeMax(rawValue, maxLength) : rawValue;
|
|
142
|
+
if (newValue !== rawValue) {
|
|
143
|
+
event.target.value = newValue;
|
|
144
|
+
}
|
|
145
|
+
setHasStartedTyping(true);
|
|
146
|
+
setCount(getCharacterCount(newValue));
|
|
147
|
+
const onTextareaChange = onChange;
|
|
148
|
+
onTextareaChange?.(event);
|
|
149
|
+
};
|
|
36
150
|
const HandleOnBlur = event => {
|
|
37
151
|
const {
|
|
38
152
|
target
|
|
@@ -44,9 +158,14 @@ export const Textarea = ({
|
|
|
44
158
|
};
|
|
45
159
|
const HandleKeyEvent = event => {
|
|
46
160
|
onTouched();
|
|
47
|
-
onKeyDown
|
|
161
|
+
const onTextareaKeyDown = onKeyDown;
|
|
162
|
+
onTextareaKeyDown?.(event);
|
|
48
163
|
};
|
|
49
|
-
const
|
|
164
|
+
const characterCounterId = `${id}_characterCount`;
|
|
165
|
+
const errorsId = `${name}_errors`;
|
|
166
|
+
const existingDescribedBy = typeof htmlNativeDomProps['aria-describedby'] === 'string' ? htmlNativeDomProps['aria-describedby'] : undefined;
|
|
167
|
+
const showsRequiredError = isInvalid && isRequiredError;
|
|
168
|
+
const mergedDescribedBy = showsRequiredError ? [existingDescribedBy, errorsId].filter(Boolean).join(' ') : characterCounter !== undefined ? [existingDescribedBy, characterCounterId].filter(Boolean).join(' ') : existingDescribedBy;
|
|
50
169
|
const textareaProps = {
|
|
51
170
|
id,
|
|
52
171
|
className: cssClass,
|
|
@@ -58,16 +177,38 @@ export const Textarea = ({
|
|
|
58
177
|
...(validation && typeof validation.required !== 'undefined' ? {
|
|
59
178
|
required: true
|
|
60
179
|
} : {}),
|
|
61
|
-
...
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
180
|
+
...registered,
|
|
181
|
+
onBeforeInput: HandleBeforeInput,
|
|
182
|
+
onChange: event => {
|
|
183
|
+
HandleChange(event);
|
|
184
|
+
registered?.onChange?.(event);
|
|
185
|
+
},
|
|
186
|
+
onBlur: event => {
|
|
187
|
+
HandleOnBlur(event);
|
|
188
|
+
registered?.onBlur?.(event);
|
|
189
|
+
},
|
|
190
|
+
onKeyDown: HandleKeyEvent,
|
|
191
|
+
...htmlNativeDomProps,
|
|
192
|
+
'aria-describedby': mergedDescribedBy
|
|
67
193
|
};
|
|
68
194
|
return /*#__PURE__*/React.createElement(HookFormWrapper, null, customContent?.preField && /*#__PURE__*/React.createElement("span", {
|
|
69
195
|
className: "preField"
|
|
70
|
-
}, customContent?.preField), /*#__PURE__*/React.createElement("
|
|
196
|
+
}, customContent?.preField), /*#__PURE__*/React.createElement("div", {
|
|
197
|
+
className: "textareaFieldContainer"
|
|
198
|
+
}, /*#__PURE__*/React.createElement("textarea", textareaProps), /*#__PURE__*/React.createElement("div", {
|
|
199
|
+
className: "textareaFooter"
|
|
200
|
+
}, isInvalid && isRequiredError ? /*#__PURE__*/React.createElement(ValidationMessages, {
|
|
201
|
+
name: name,
|
|
202
|
+
validation: {
|
|
203
|
+
required: validation?.required
|
|
204
|
+
}
|
|
205
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
206
|
+
id: characterCounterId,
|
|
207
|
+
className: `textareaCharacterCount ${isAtLimit ? 'textareaCharacterCountExceeded' : ''}`,
|
|
208
|
+
role: isAtLimit ? 'status' : undefined,
|
|
209
|
+
"aria-live": isAtLimit ? 'polite' : undefined,
|
|
210
|
+
"aria-atomic": isAtLimit ? 'true' : undefined
|
|
211
|
+
}, characterCounter))), customContent?.postField && /*#__PURE__*/React.createElement("span", {
|
|
71
212
|
className: "postField"
|
|
72
213
|
}, customContent?.postField));
|
|
73
214
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.js","names":["React","useFormContext","HookFormWrapper","NoHookFormContext","Textarea","field","id","name","placeholder","defaultValue","onBlur","onChange","onKeyDown","onTouched","validation","showSpinner","customCssClasses","customContent","register","getFieldState","fieldState","HandleAutoFill","event","target","HandleOnBlur","HandleKeyEvent","cssClass","input","invalid","textareaProps","className","disabled","required","createElement","preField","postField"],"sources":["../../../../../../../src/components/form/formFields/subComponents/textarea/Textarea.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { HookFormWrapper } from '../../../hookFormWrapper/HookFormWrapper';\nimport { FormFieldProps } from '../../formFieldWrapper/formFieldProps';\nimport { NoHookFormContext } from '../../utilities/formUtilities';\n\ninterface TextareaProps extends FormFieldProps, React.TextareaHTMLAttributes<HTMLTextAreaElement> {}\n\nexport const Textarea: React.FC<TextareaProps> = (\n {\n field: {\n id,\n name,\n placeholder,\n defaultValue,\n onBlur = () => {},\n onChange = () => {},\n onKeyDown = () => {},\n onTouched = () => {}\n },\n validation,\n showSpinner,\n customCssClasses,\n customContent\n }\n) => {\n const { register, getFieldState } = useFormContext() || NoHookFormContext;\n const fieldState = getFieldState(name);\n\n const HandleAutoFill = (event: React.FocusEvent<HTMLInputElement>) => {\n const { target } = event;\n if (target) {\n onChange(event);\n }\n };\n\n const HandleOnBlur = (event: React.FocusEvent<HTMLInputElement>) => {\n const { target } = event;\n if (target) {\n onTouched();\n onBlur(event);\n }\n };\n\n const HandleKeyEvent = (\n event: React.KeyboardEvent<HTMLInputElement> &\n React.KeyboardEvent<HTMLSelectElement> &\n React.KeyboardEvent<HTMLTextAreaElement>\n ) => {\n onTouched();\n onKeyDown(event);\n };\n\n const cssClass = `${ customCssClasses?.input || '' }${ fieldState && fieldState?.invalid ? ' invalidField' : '' }`;\n\n const textareaProps = {\n id,\n className: cssClass,\n placeholder,\n defaultValue,\n ...(showSpinner ? { disabled: true } : {}),\n ...(validation && typeof validation.required !== 'undefined' ? { required: true } : {}),\n ...register(\n name,\n {\n onChange: HandleAutoFill,\n onBlur: HandleOnBlur,\n ...validation\n }\n ),\n onKeyDown: HandleKeyEvent\n };\n\n return (\n <HookFormWrapper>\n { customContent?.preField && <span className=\"preField\">{ customContent?.preField }</span> }\n\n <textarea { ...textareaProps } />\n\n { customContent?.postField && <span className=\"postField\">{ customContent?.postField }</span> }\n </HookFormWrapper>\n );\n};\n"],"mappings":"AAAA,YAAY;;AAEZ,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,QAAQ,iBAAiB;AAChD,SAASC,eAAe,QAAQ,0CAA0C;AAE1E,SAASC,iBAAiB,QAAQ,+BAA+B;AAIjE,OAAO,MAAMC,QAAiC,GAAGA,CAC/C;EACEC,KAAK,EAAE;IACLC,EAAE;IACFC,IAAI;IACJC,WAAW;IACXC,YAAY;IACZC,MAAM,GAAGA,CAAA,KAAM,CAAC,CAAC;IACjBC,QAAQ,GAAGA,CAAA,KAAM,CAAC,CAAC;IACnBC,SAAS,GAAGA,CAAA,KAAM,CAAC,CAAC;IACpBC,SAAS,GAAGA,CAAA,KAAM,CAAC;EACrB,CAAC;EACDC,UAAU;EACVC,WAAW;EACXC,gBAAgB;EAChBC;AACF,C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e,QACZe,aAAa,EAAEiB,QAAQ,iBAAIlC,KAAA,CAAAiC,aAAA;IAAMH,SAAS,EAAC;EAAU,GAAGb,aAAa,EAAEiB,QAAgB,CAAC,eAE1FlC,KAAA,CAAAiC,aAAA,aAAeJ,aAAiB,CAAC,EAE/BZ,aAAa,EAAEkB,SAAS,iBAAInC,KAAA,CAAAiC,aAAA;IAAMH,SAAS,EAAC;EAAW,GAAGb,aAAa,EAAEkB,SAAiB,CAC7E,CAAC;AAEtB,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Textarea.js","names":["React","useMemo","useState","useFormContext","HookFormWrapper","NoHookFormContext","extractError","ValidationMessages","getCharacterCount","value","Intl","segmenter","Segmenter","undefined","granularity","Array","from","segment","length","clampToGraphemeMax","maxAllowed","slice","map","join","Textarea","field","id","name","placeholder","defaultValue","maxLength","enforceMaxLength","onBlur","onChange","onKeyDown","onTouched","htmlNativeDomProps","validation","showSpinner","customCssClasses","customContent","register","getFieldState","formState","errors","fieldState","hasFieldError","Boolean","isInvalid","invalid","count","setCount","toString","hasStartedTyping","setHasStartedTyping","hasMaxLength","isAtLimit","isRequiredError","error","type","characterCounter","cssClass","input","normalizedValidation","maxLengthRule","maxLengthValue","Number","isNaN","maxLengthMessage","graphemeMaxLengthValidator","_maxLength","validate","restValidation","formValues","validationResult","graphemeMaxLength","registered","HandleBeforeInput","event","nativeEvent","inserted","data","target","currentTarget","start","selectionStart","end","selectionEnd","nextValue","preventDefault","HandleChange","rawValue","newValue","onTextareaChange","HandleOnBlur","HandleKeyEvent","onTextareaKeyDown","characterCounterId","errorsId","existingDescribedBy","showsRequiredError","mergedDescribedBy","filter","textareaProps","className","disabled","required","onBeforeInput","createElement","preField","role","postField"],"sources":["../../../../../../../src/components/form/formFields/subComponents/textarea/Textarea.tsx"],"sourcesContent":["'use client';\n\nimport React, { useMemo, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { HookFormWrapper } from '../../../hookFormWrapper/HookFormWrapper';\nimport { FormFieldProps } from '../../formFieldWrapper/formFieldProps';\nimport { NoHookFormContext } from '../../utilities/formUtilities';\nimport { extractError, ValidationMessages } from '../../../validation/ValidationMessages';\n\ninterface TextareaProps extends FormFieldProps, React.TextareaHTMLAttributes<HTMLTextAreaElement> {}\n\n/**\n* Counts user-perceived characters (grapheme clusters).\n* Treats emojis and composed characters (e.g. accented letters) as a single character.\n* Falls back to basic code-point counting if Intl.Segmenter is not available.\n*/\nfunction getCharacterCount(value: string): number {\n if (typeof Intl !== 'undefined' && 'Segmenter' in Intl) {\n const segmenter = new Intl.Segmenter(undefined, {\n granularity: 'grapheme',\n });\n return Array.from(segmenter.segment(value)).length;\n }\n return Array.from(value).length;\n}\n\nfunction clampToGraphemeMax(value: string, maxAllowed: number): string {\n if (getCharacterCount(value) <= maxAllowed) {\n return value;\n }\n\n if (typeof Intl !== 'undefined' && 'Segmenter' in Intl) {\n const segmenter = new Intl.Segmenter(undefined, {\n granularity: 'grapheme',\n });\n\n return Array.from(segmenter.segment(value))\n .slice(0, maxAllowed)\n .map((segment) => segment.segment)\n .join('');\n }\n\n return Array.from(value).slice(0, maxAllowed).join('');\n}\n\nexport const Textarea: React.FC<TextareaProps> = (\n {\n field: {\n id,\n name,\n placeholder,\n defaultValue,\n maxLength,\n enforceMaxLength,\n onBlur = () => {},\n onChange = () => {},\n onKeyDown = () => {},\n onTouched = () => {},\n ...htmlNativeDomProps\n },\n validation,\n showSpinner,\n customCssClasses,\n customContent\n }\n) => {\n const { register, getFieldState, formState: { errors } } = useFormContext() || NoHookFormContext;\n const fieldState = getFieldState(name);\n const hasFieldError = Boolean(extractError(errors, name));\n // Combine fieldState.invalid with a direct errors lookup so this component re-renders\n // whenever formState.errors changes (getFieldState alone does not subscribe to errors).\n const isInvalid = Boolean(fieldState?.invalid ?? hasFieldError);\n const [count, setCount] = useState<number>(() =>\n getCharacterCount(defaultValue?.toString() || '')\n );\n const [hasStartedTyping, setHasStartedTyping] = useState(false);\n const hasMaxLength = typeof maxLength === 'number';\n const isAtLimit = hasMaxLength ? count >= maxLength : false;\n // Only hide counter for 'required' error. All other errors (maxLength, pattern, etc)\n // should show counter instead of error message.\n const isRequiredError = fieldState?.error?.type === 'required';\n const characterCounter =\n !hasStartedTyping || !hasMaxLength || isRequiredError\n ? undefined\n : `${ count }/${ maxLength }`;\n const cssClass = `${ customCssClasses?.input || '' }${ isInvalid ? ' invalidField' : '' }`;\n\n const normalizedValidation = useMemo(() => {\n if (!validation || typeof validation.maxLength === 'undefined') {\n return validation;\n }\n\n const maxLengthRule = validation.maxLength;\n const maxLengthValue =\n typeof maxLengthRule === 'number'\n ? maxLengthRule\n : typeof maxLengthRule === 'object' && maxLengthRule && 'value' in maxLengthRule\n ? Number(maxLengthRule.value)\n : undefined;\n\n if (typeof maxLengthValue !== 'number' || Number.isNaN(maxLengthValue)) {\n return validation;\n }\n\n const maxLengthMessage = `Maximum length is ${ maxLengthValue }`;\n\n const graphemeMaxLengthValidator = (value: string) =>\n getCharacterCount(value || '') <= maxLengthValue || maxLengthMessage;\n\n // eslint-disable-next-line no-unused-vars\n const { maxLength: _maxLength, validate, ...restValidation } = validation;\n\n if (typeof validate === 'function') {\n return {\n ...restValidation,\n validate: async (value: string, formValues?: unknown) => {\n const validationResult = await validate(value, formValues);\n if (validationResult !== true) {\n return validationResult;\n }\n return graphemeMaxLengthValidator(value);\n },\n };\n }\n\n if (validate && typeof validate === 'object') {\n return {\n ...restValidation,\n validate: {\n ...validate,\n graphemeMaxLength: graphemeMaxLengthValidator,\n },\n };\n }\n\n return {\n ...restValidation,\n validate: graphemeMaxLengthValidator,\n };\n }, [validation]);\n\n const registered = register(name, normalizedValidation);\n\n /**\n * Prevents input that would exceed the maxLength when counting grapheme clusters.\n * Native <textarea maxLength> counts UTF-16 units, so emojis and composed characters\n * can be treated as multiple characters. We avoid using native maxLength and enforce\n * the limit here instead.\n */\n const HandleBeforeInput = (event: React.FormEvent<HTMLTextAreaElement>) => {\n if (enforceMaxLength !== true || !hasMaxLength) return;\n\n const nativeEvent = event.nativeEvent as InputEvent;\n const inserted = nativeEvent.data ?? '';\n\n if (!inserted) return;\n\n const target = event.currentTarget;\n const start = target.selectionStart ?? target.value.length;\n const end = target.selectionEnd ?? target.value.length;\n\n const nextValue =\n target.value.slice(0, start) +\n inserted +\n target.value.slice(end);\n\n if (getCharacterCount(nextValue) > maxLength) {\n event.preventDefault();\n }\n };\n\n const HandleChange = (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n const rawValue = event.target.value || '';\n const newValue =\n enforceMaxLength === true && hasMaxLength\n ? clampToGraphemeMax(rawValue, maxLength)\n : rawValue;\n\n if (newValue !== rawValue) {\n event.target.value = newValue;\n }\n\n setHasStartedTyping(true);\n setCount(getCharacterCount(newValue));\n const onTextareaChange = onChange as\n | React.ChangeEventHandler<HTMLTextAreaElement>\n | undefined;\n onTextareaChange?.(event);\n };\n\n const HandleOnBlur = (event: React.FocusEvent<HTMLTextAreaElement>) => {\n const { target } = event;\n if (target) {\n onTouched();\n onBlur(event);\n }\n };\n\n const HandleKeyEvent = (event: React.KeyboardEvent<HTMLTextAreaElement>) => {\n onTouched();\n const onTextareaKeyDown = onKeyDown as\n | React.KeyboardEventHandler<HTMLTextAreaElement>\n | undefined;\n onTextareaKeyDown?.(event);\n };\n\n const characterCounterId = `${ id }_characterCount`;\n const errorsId = `${ name }_errors`;\n const existingDescribedBy =\n typeof htmlNativeDomProps['aria-describedby'] === 'string'\n ? htmlNativeDomProps['aria-describedby']\n : undefined;\n const showsRequiredError = isInvalid && isRequiredError;\n const mergedDescribedBy = showsRequiredError\n ? [existingDescribedBy, errorsId].filter(Boolean).join(' ')\n : characterCounter !== undefined\n ? [existingDescribedBy, characterCounterId].filter(Boolean).join(' ')\n : existingDescribedBy;\n \n const textareaProps = {\n id,\n className: cssClass,\n placeholder,\n defaultValue,\n ...(showSpinner ? { disabled: true } : {}),\n ...(validation && typeof validation.required !== 'undefined' ? { required: true } : {}),\n ...registered,\n onBeforeInput: HandleBeforeInput,\n onChange: (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n HandleChange(event);\n registered?.onChange?.(event);\n },\n onBlur: (event: React.FocusEvent<HTMLTextAreaElement>) => {\n HandleOnBlur(event);\n registered?.onBlur?.(event);\n },\n onKeyDown: HandleKeyEvent,\n ...htmlNativeDomProps,\n 'aria-describedby': mergedDescribedBy,\n };\n\n return (\n <HookFormWrapper>\n { customContent?.preField && <span className=\"preField\">{ customContent?.preField }</span> }\n\n <div className=\"textareaFieldContainer\">\n <textarea { ...textareaProps } /> \n\n <div className=\"textareaFooter\">\n { isInvalid && isRequiredError\n ? <ValidationMessages name={ name } validation={ { required: validation?.required } } />\n : (\n <div\n id={ characterCounterId }\n className={ `textareaCharacterCount ${\n isAtLimit\n ? 'textareaCharacterCountExceeded'\n : ''\n }` }\n role={ isAtLimit ? 'status' : undefined }\n aria-live={ isAtLimit ? 'polite' : undefined }\n aria-atomic={ isAtLimit ? 'true' : undefined }\n >\n { characterCounter }\n </div>\n )\n }\n </div>\n </div>\n\n { customContent?.postField && <span className=\"postField\">{ customContent?.postField }</span> }\n </HookFormWrapper>\n );\n};\n"],"mappings":"AAAA,YAAY;;AAEZ,OAAOA,KAAK,IAAIC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAChD,SAASC,cAAc,QAAQ,iBAAiB;AAChD,SAASC,eAAe,QAAQ,0CAA0C;AAE1E,SAASC,iBAAiB,QAAQ,+BAA+B;AACjE,SAASC,YAAY,EAAEC,kBAAkB,QAAQ,wCAAwC;AAIzF;AACA;AACA;AACA;AACA;AACA,SAASC,iBAAiBA,CAACC,KAAa,EAAU;EAChD,IAAI,OAAOC,IAAI,KAAK,WAAW,IAAI,WAAW,IAAIA,IAAI,EAAE;IACtD,MAAMC,SAAS,GAAG,IAAID,IAAI,CAACE,SAAS,CAACC,SAAS,EAAE;MAC9CC,WAAW,EAAE;IACf,CAAC,CAAC;IACF,OAAOC,KAAK,CAACC,IAAI,CAACL,SAA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AG3C;EAAW,GAE5C+C,gBACC,CAGN,CACF,CAAC,EAEJpB,aAAa,EAAEuE,SAAS,iBAAI/G,KAAA,CAAA4G,aAAA;IAAMJ,SAAS,EAAC;EAAW,GAAGhE,aAAa,EAAEuE,SAAiB,CAC7E,CAAC;AAEtB,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidationMessages.js","names":["React","ErrorMessage","useFormContext","NoHookFormContext","GenericErrorMessages","required","minLength","value","maxLength","min","max","unknown","extractError","errors","fieldName","undefined","pathComponents","split","reduce","accumulator","pathComponent","ValidationMessages","name","validation","formState","fieldError","Object","entries","forEach","validatorKey","validator","type","types","message","createElement","className","id","render"],"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\
|
|
1
|
+
{"version":3,"file":"ValidationMessages.js","names":["React","ErrorMessage","useFormContext","NoHookFormContext","GenericErrorMessages","required","minLength","value","maxLength","min","max","unknown","extractError","errors","fieldName","undefined","pathComponents","split","reduce","accumulator","pathComponent","ValidationMessages","name","validation","formState","fieldError","Object","entries","forEach","validatorKey","validator","type","types","message","createElement","className","id","render"],"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;;AAEZ,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,YAAY,QAAQ,yBAAyB;AACtD,SAISC,cAAc,QAChB,iBAAiB;AAIxB,SAASC,iBAAiB,QAAQ,uCAAuC;AAGzE;AACA,OAAO,MAAMC,oBAA+D,GAAG;EAC7EC,QAAQ,EAAEA,CAAA,KAAM,+CAA+C;EAC/DC,SAAS,EAAGC,KAAK,IAAK,+BAAgCA,KAAK,cAAe;EAC1EC,SAAS,EAAGD,KAAK,IAAK,+BAAgCA,KAAK,cAAe;EAC1EE,GAAG,EAAGF,KAAK,IAAK,kCAAmCA,KAAK,GAAI;EAC5DG,GAAG,EAAGH,KAAK,IAAK,kCAAmCA,KAAK,GAAI;EAC5DI,OAAO,EAAEA,CAAA,KAAM;AACjB,CAAC;;AAED;AACA,OAAO,MAAMC,YAAY,GAAGA,CAC1BC,MAAmB,EACnBC,SAAiB,KACsD;EACvE,IAAI,CAACD,MAAM,EAAE;IACX,OAAOE,SAAS;EAClB;EAEA,MAAMC,cAAc,GAAGF,SAAS,CAACG,KAAK,CAAC,GAAG,CAAC;EAE3C,OAAOD,cAAc,CAACE,MAAM,CAC1B,CAACC,WAAW,EAAEC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AkC,aAAA;IAAMC,SAAS,EAAC,YAAY;IAACC,EAAE,EAAG,GAAId,IAAI;EAAY,gBACpDtB,KAAA,CAAAkC,aAAA;IAAMC,SAAS,EAAC;EAAS,GACrB,CAACV,UAAU,EAAEQ,OAAO,iBACpBjC,KAAA,CAAAkC,aAAA;IAAMC,SAAS,EAAC;EAAO,GAAG/B,oBAAoB,CAACO,OAAO,CAAC,CAAS,CACjE,eAEDX,KAAA,CAAAkC,aAAA,CAACjC,YAAY;IACXY,MAAM,EAAGA,MAAQ;IACjBS,IAAI,EAAGA,IAAM;IACbe,MAAM,EAAGA,CAAC;MAAEJ;IAAQ,CAAC,kBAAKjC,KAAA,CAAAkC,aAAA;MAAMC,SAAS,EAAC;IAAO,GAAGF,OAAe;EAAG,CACvE,CACG,CACF,CAAC;AAEX,CAAC;AAED,eAAeZ,kBAAkB","ignoreList":[]}
|
|
@@ -14,6 +14,7 @@ export { KitLogo } from './design/logos/ventures/kit-logo';
|
|
|
14
14
|
export { DoshiiLogo } from './design/logos/ventures/doshii-logo';
|
|
15
15
|
export { TruyuLogo } from './design/logos/ventures/truyu-logo';
|
|
16
16
|
export { SidePanel } from './design/sidePanel/SidePanel';
|
|
17
|
+
export { Skeleton } from './design/skeleton/Skeleton';
|
|
17
18
|
export { Spinner } from './design/spinner/Spinner';
|
|
18
19
|
export { StatusIconButton } from './design/statusIndicators/statusIconButton/StatusIconButton';
|
|
19
20
|
export { StatusLight } from './design/statusIndicators/statusLight/StatusLight';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Accordion","Chip","Pill","Badge","Dialog","HeaderBar","Icon","NotificationIcon","VentureLogo","CreditSavvyLogo","HomeInLogo","KitLogo","DoshiiLogo","TruyuLogo","SidePanel","Spinner","StatusIconButton","StatusLight","StatusLightsBar","Tabs","Tooltip","EllipsisTooltip","RevealMore","CopyText","Paginator","PageBanner","Banner","Alert","SimpleButton","Button","FormField","InputCheckbox","CheckboxInput","StyledRadioGroup","StyledRadioInput","StyledRadioLabel","HookFormWrapper","TextInput","EmailInput","FileInput","SearchInput","NumberInput","PhoneInput","UrlInput","PasswordInput","PasswordInputSignup","SelectDropdown","Combobox","Textarea","InputDate","DateInput","Card","ReportFooter","MainHeader","ThemeLoader","DevToolbar","ThemeSwitch","LoremIpsum","GlobalDashboard","Menu","PopupMenu","SearchPanelMenu","Link","TemplateForm","TemplateLoading","TemplateDashboard","TemplatePage","Select","Checkbox"],"sources":["../../../src/components/index.ts"],"sourcesContent":["'use client';\n\n// UI components\nexport { Accordion } from './design/accordion/Accordion';\nexport { Chip, Pill, Badge } from './design/chip/Chip';\nexport { Dialog } from './design/dialog/Dialog';\nexport { HeaderBar } from './design/headerBar/HeaderBar';\nexport { Icon } from './design/icons/basicIcon/Icon';\nexport { NotificationIcon } from './design/icons/notificationIcon/NotificationIcon';\nexport { VentureLogo } from './design/logos/VentureLogo';\n\nexport { CreditSavvyLogo } from './design/logos/ventures/credit-savvy-logo';\nexport { HomeInLogo } from './design/logos/ventures/home-in-logo';\nexport { KitLogo } from './design/logos/ventures/kit-logo';\nexport { DoshiiLogo } from './design/logos/ventures/doshii-logo';\nexport { TruyuLogo } from './design/logos/ventures/truyu-logo';\n\nexport { SidePanel } from './design/sidePanel/SidePanel';\nexport { Spinner } from './design/spinner/Spinner';\nexport { StatusIconButton } from './design/statusIndicators/statusIconButton/StatusIconButton';\nexport { StatusLight } from './design/statusIndicators/statusLight/StatusLight';\nexport { StatusLightsBar } from './design/statusIndicators/statusLightsBar/StatusLightsBar';\nexport { Tabs } from './design/tabs/Tabs';\nexport { Tooltip } from './design/tooltip/Tooltip';\nexport { EllipsisTooltip } from './design/tooltip/ellipsisTooltip/EllipsisTooltip';\nexport { RevealMore } from './design/revealMore/RevealMore';\nexport { CopyText } from './design/copyText/CopyText';\nexport { Paginator } from './design/paginators/Paginator';\nexport { PageBanner, Banner, Alert } from './design/banners/pageBanner/PageBanner';\nexport type { PageBannerProps } from './design/banners/pageBanner/PageBanner';\n\n// Form components\nexport { SimpleButton, Button } from './form/buttons/SimpleButton';\nexport { FormField } from './form/formFields/formFieldWrapper/FormField';\nexport { InputCheckbox, CheckboxInput } from './form/formFields/subComponents/inputs/checkbox/InputCheckbox';\nexport { StyledRadioGroup } from './form/formFields/subComponents/inputs/radio/styled/StyledRadioGroup';\nexport { StyledRadioInput } from './form/formFields/subComponents/inputs/radio/styled/StyledRadioInput';\nexport { StyledRadioLabel } from './form/formFields/subComponents/inputs/radio/styled/StyledRadioLabel';\nexport { HookFormWrapper } from './form/hookFormWrapper/HookFormWrapper';\n\nexport {\n TextInput,\n EmailInput,\n FileInput,\n SearchInput,\n NumberInput,\n PhoneInput,\n UrlInput,\n PasswordInput,\n PasswordInputSignup,\n SelectDropdown,\n Combobox,\n Textarea\n} from './form/formFields/subComponents/InputVariants';\nexport type {\n FormComponentProps,\n DropdownSelectProps,\n PasswordInputProps\n} from './form/formFields/subComponents/InputVariants';\n\nexport {\n InputDate\n} from './form/formFields/subComponents/inputs/date/InputDate';\nexport { DateInput } from './form/formFields/subComponents/inputs/date/DateInput';\nexport type { StyledRadioGroupProps } from './form/formFields/subComponents/inputs/radio/radioInputsProps';\n\n// Layout\nexport { Card } from './design/card/Card';\nexport { ReportFooter } from './layout/footers/reports/ReportFooter';\nexport { MainHeader } from './layout/mainHeader/MainHeader';\n\nexport { ThemeLoader } from './design/themeLoader/ThemeLoader';\nexport type { ThemeStructure } from './design/themeLoader/ThemeLoader';\n\n// Testing\nexport { DevToolbar } from './testing/devToolbar/DevToolbar';\nexport { ThemeSwitch } from './testing/themeSwitch/ThemeSwitch';\nexport { LoremIpsum } from './testing/loremIpsum/LoremIpsum';\n\nexport { GlobalDashboard } from './layout/dashboard/layouts/globalDashboard/GlobalDashboard';\nexport { Menu } from './navigation/menu/Menu';\nexport { PopupMenu } from './navigation/popupMenu/PopupMenu';\nexport { SearchPanelMenu } from './navigation/searchPanelMenu/SearchPanelMenu';\nexport { Link } from './navigation/link/Link';\n\nexport type { MenuItemPropTypes, MenuButtonPropTypes, MenuItemIconStates } from './navigation/menu/Menu.interfaces';\n\n// Templates\nexport { TemplateForm } from './templates/templateForm/TemplateForm';\nexport type { TemplateFormProps } from './templates/templateForm/TemplateForm';\nexport { TemplateLoading } from './templates/templateLoading/TemplateLoading';\nexport type { TemplateLoadingProps } from './templates/templateLoading/TemplateLoading';\nexport { TemplateDashboard } from './templates/templateDashboard/TemplateDashboard';\nexport type { TemplateDashboardProps } from './templates/templateDashboard/TemplateDashboard';\nexport { TemplatePage } from './templates/templatePage/TemplatePage';\nexport type { TemplatePageProps } from './templates/templatePage/TemplatePage';\n\n// Aliases to match common libraries\nexport { SelectDropdown as Select } from './form/formFields/subComponents/InputVariants';\nexport { InputCheckbox as Checkbox } from './form/formFields/subComponents/inputs/checkbox/InputCheckbox';"],"mappings":"AAAA,YAAY;;AAEZ;AACA,SAASA,SAAS,QAAQ,8BAA8B;AACxD,SAASC,IAAI,EAAEC,IAAI,EAAEC,KAAK,QAAQ,oBAAoB;AACtD,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,SAAS,QAAQ,8BAA8B;AACxD,SAASC,IAAI,QAAQ,+BAA+B;AACpD,SAASC,gBAAgB,QAAQ,kDAAkD;AACnF,SAASC,WAAW,QAAQ,4BAA4B;AAExD,SAASC,eAAe,QAAQ,2CAA2C;AAC3E,SAASC,UAAU,QAAQ,sCAAsC;AACjE,SAASC,OAAO,QAAQ,kCAAkC;AAC1D,SAASC,UAAU,QAAQ,qCAAqC;AAChE,SAASC,SAAS,QAAQ,oCAAoC;AAE9D,SAASC,SAAS,QAAQ,8BAA8B;AACxD,SAASC,OAAO,QAAQ,0BAA0B;AAClD,SAASC,gBAAgB,QAAQ,6DAA6D;AAC9F,SAASC,WAAW,QAAQ,mDAAmD;AAC/E,SAASC,eAAe,QAAQ,2DAA2D;AAC3F,SAASC,IAAI,QAAQ,oBAAoB;AACzC,SAASC,OAAO,QAAQ,0BAA0B;AAClD,S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Q,iDAAiD;AAEnF,SAASC,YAAY,QAAQ,uCAAuC;AAGpE;AACA,SAASpB,cAAc,IAAIqB,MAAM,QAAQ,+CAA+C;AACxF,SAASpC,aAAa,IAAIqC,QAAQ,QAAQ,+DAA+D","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["Accordion","Chip","Pill","Badge","Dialog","HeaderBar","Icon","NotificationIcon","VentureLogo","CreditSavvyLogo","HomeInLogo","KitLogo","DoshiiLogo","TruyuLogo","SidePanel","Skeleton","Spinner","StatusIconButton","StatusLight","StatusLightsBar","Tabs","Tooltip","EllipsisTooltip","RevealMore","CopyText","Paginator","PageBanner","Banner","Alert","SimpleButton","Button","FormField","InputCheckbox","CheckboxInput","StyledRadioGroup","StyledRadioInput","StyledRadioLabel","HookFormWrapper","TextInput","EmailInput","FileInput","SearchInput","NumberInput","PhoneInput","UrlInput","PasswordInput","PasswordInputSignup","SelectDropdown","Combobox","Textarea","InputDate","DateInput","Card","ReportFooter","MainHeader","ThemeLoader","DevToolbar","ThemeSwitch","LoremIpsum","GlobalDashboard","Menu","PopupMenu","SearchPanelMenu","Link","TemplateForm","TemplateLoading","TemplateDashboard","TemplatePage","Select","Checkbox"],"sources":["../../../src/components/index.ts"],"sourcesContent":["'use client';\n\n// UI components\nexport { Accordion } from './design/accordion/Accordion';\nexport { Chip, Pill, Badge } from './design/chip/Chip';\nexport { Dialog } from './design/dialog/Dialog';\nexport { HeaderBar } from './design/headerBar/HeaderBar';\nexport { Icon } from './design/icons/basicIcon/Icon';\nexport { NotificationIcon } from './design/icons/notificationIcon/NotificationIcon';\nexport { VentureLogo } from './design/logos/VentureLogo';\n\nexport { CreditSavvyLogo } from './design/logos/ventures/credit-savvy-logo';\nexport { HomeInLogo } from './design/logos/ventures/home-in-logo';\nexport { KitLogo } from './design/logos/ventures/kit-logo';\nexport { DoshiiLogo } from './design/logos/ventures/doshii-logo';\nexport { TruyuLogo } from './design/logos/ventures/truyu-logo';\n\nexport { SidePanel } from './design/sidePanel/SidePanel';\nexport { Skeleton } from './design/skeleton/Skeleton';\nexport type { SkeletonProps } from './design/skeleton/Skeleton';\nexport { Spinner } from './design/spinner/Spinner';\nexport { StatusIconButton } from './design/statusIndicators/statusIconButton/StatusIconButton';\nexport { StatusLight } from './design/statusIndicators/statusLight/StatusLight';\nexport { StatusLightsBar } from './design/statusIndicators/statusLightsBar/StatusLightsBar';\nexport { Tabs } from './design/tabs/Tabs';\nexport { Tooltip } from './design/tooltip/Tooltip';\nexport { EllipsisTooltip } from './design/tooltip/ellipsisTooltip/EllipsisTooltip';\nexport { RevealMore } from './design/revealMore/RevealMore';\nexport { CopyText } from './design/copyText/CopyText';\nexport { Paginator } from './design/paginators/Paginator';\nexport { PageBanner, Banner, Alert } from './design/banners/pageBanner/PageBanner';\nexport type { PageBannerProps } from './design/banners/pageBanner/PageBanner';\n\n// Form components\nexport { SimpleButton, Button } from './form/buttons/SimpleButton';\nexport { FormField } from './form/formFields/formFieldWrapper/FormField';\nexport { InputCheckbox, CheckboxInput } from './form/formFields/subComponents/inputs/checkbox/InputCheckbox';\nexport { StyledRadioGroup } from './form/formFields/subComponents/inputs/radio/styled/StyledRadioGroup';\nexport { StyledRadioInput } from './form/formFields/subComponents/inputs/radio/styled/StyledRadioInput';\nexport { StyledRadioLabel } from './form/formFields/subComponents/inputs/radio/styled/StyledRadioLabel';\nexport { HookFormWrapper } from './form/hookFormWrapper/HookFormWrapper';\n\nexport {\n TextInput,\n EmailInput,\n FileInput,\n SearchInput,\n NumberInput,\n PhoneInput,\n UrlInput,\n PasswordInput,\n PasswordInputSignup,\n SelectDropdown,\n Combobox,\n Textarea\n} from './form/formFields/subComponents/InputVariants';\nexport type {\n FormComponentProps,\n DropdownSelectProps,\n PasswordInputProps\n} from './form/formFields/subComponents/InputVariants';\n\nexport {\n InputDate\n} from './form/formFields/subComponents/inputs/date/InputDate';\nexport { DateInput } from './form/formFields/subComponents/inputs/date/DateInput';\nexport type { StyledRadioGroupProps } from './form/formFields/subComponents/inputs/radio/radioInputsProps';\n\n// Layout\nexport { Card } from './design/card/Card';\nexport { ReportFooter } from './layout/footers/reports/ReportFooter';\nexport { MainHeader } from './layout/mainHeader/MainHeader';\n\nexport { ThemeLoader } from './design/themeLoader/ThemeLoader';\nexport type { ThemeStructure } from './design/themeLoader/ThemeLoader';\n\n// Testing\nexport { DevToolbar } from './testing/devToolbar/DevToolbar';\nexport { ThemeSwitch } from './testing/themeSwitch/ThemeSwitch';\nexport { LoremIpsum } from './testing/loremIpsum/LoremIpsum';\n\nexport { GlobalDashboard } from './layout/dashboard/layouts/globalDashboard/GlobalDashboard';\nexport { Menu } from './navigation/menu/Menu';\nexport { PopupMenu } from './navigation/popupMenu/PopupMenu';\nexport { SearchPanelMenu } from './navigation/searchPanelMenu/SearchPanelMenu';\nexport { Link } from './navigation/link/Link';\n\nexport type { MenuItemPropTypes, MenuButtonPropTypes, MenuItemIconStates } from './navigation/menu/Menu.interfaces';\n\n// Templates\nexport { TemplateForm } from './templates/templateForm/TemplateForm';\nexport type { TemplateFormProps } from './templates/templateForm/TemplateForm';\nexport { TemplateLoading } from './templates/templateLoading/TemplateLoading';\nexport type { TemplateLoadingProps } from './templates/templateLoading/TemplateLoading';\nexport { TemplateDashboard } from './templates/templateDashboard/TemplateDashboard';\nexport type { TemplateDashboardProps } from './templates/templateDashboard/TemplateDashboard';\nexport { TemplatePage } from './templates/templatePage/TemplatePage';\nexport type { TemplatePageProps } from './templates/templatePage/TemplatePage';\n\n// Aliases to match common libraries\nexport { SelectDropdown as Select } from './form/formFields/subComponents/InputVariants';\nexport { InputCheckbox as Checkbox } from './form/formFields/subComponents/inputs/checkbox/InputCheckbox';"],"mappings":"AAAA,YAAY;;AAEZ;AACA,SAASA,SAAS,QAAQ,8BAA8B;AACxD,SAASC,IAAI,EAAEC,IAAI,EAAEC,KAAK,QAAQ,oBAAoB;AACtD,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,SAAS,QAAQ,8BAA8B;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AC9D,SAASC,SAAS,QAAQ,uDAAuD;AAGjF;AACA,SAASC,IAAI,QAAQ,oBAAoB;AACzC,SAASC,YAAY,QAAQ,uCAAuC;AACpE,SAASC,UAAU,QAAQ,gCAAgC;AAE3D,SAASC,WAAW,QAAQ,kCAAkC;AAG9D;AACA,SAASC,UAAU,QAAQ,iCAAiC;AAC5D,SAASC,WAAW,QAAQ,mCAAmC;AAC/D,SAASC,UAAU,QAAQ,iCAAiC;AAE5D,SAASC,eAAe,QAAQ,4DAA4D;AAC5F,SAASC,IAAI,QAAQ,wBAAwB;AAC7C,SAASC,SAAS,QAAQ,kCAAkC;AAC5D,SAASC,eAAe,QAAQ,8CAA8C;AAC9E,SAASC,IAAI,QAAQ,wBAAwB;AAI7C;AACA,SAASC,YAAY,QAAQ,uCAAuC;AAEpE,SAASC,eAAe,QAAQ,6CAA6C;AAE7E,SAASC,iBAAiB,QAAQ,iDAAiD;AAEnF,SAASC,YAAY,QAAQ,uCAAuC;AAGpE;AACA,SAASpB,cAAc,IAAIqB,MAAM,QAAQ,+CAA+C;AACxF,SAASpC,aAAa,IAAIqC,QAAQ,QAAQ,+DAA+D","ignoreList":[]}
|
package/dist/esm/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import './styles/index.css';
|
|
|
2
2
|
import './icons/style.css';
|
|
3
3
|
|
|
4
4
|
// Components
|
|
5
|
-
export { Accordion, Chip, Pill, Badge, Dialog, HeaderBar, Icon, NotificationIcon, VentureLogo, CreditSavvyLogo, HomeInLogo, KitLogo, DoshiiLogo, TruyuLogo, SidePanel, Spinner, StatusIconButton, StatusLight, StatusLightsBar, Tabs, Tooltip, EllipsisTooltip, RevealMore, CopyText, Paginator, PageBanner, Banner, Alert, SimpleButton, Button, FormField, InputCheckbox, CheckboxInput, StyledRadioGroup, StyledRadioInput, StyledRadioLabel, HookFormWrapper, TextInput, EmailInput, FileInput, SearchInput, NumberInput, PhoneInput, UrlInput, PasswordInput, PasswordInputSignup, SelectDropdown, Select, Combobox, Textarea, InputDate, DateInput, Card, ReportFooter, MainHeader, ThemeLoader, DevToolbar, ThemeSwitch, LoremIpsum, GlobalDashboard, Menu, PopupMenu, SearchPanelMenu, Link, TemplateForm, TemplateLoading, TemplateDashboard, TemplatePage } from './components';
|
|
5
|
+
export { Accordion, Chip, Pill, Badge, Dialog, HeaderBar, Icon, NotificationIcon, VentureLogo, CreditSavvyLogo, HomeInLogo, KitLogo, DoshiiLogo, TruyuLogo, SidePanel, Skeleton, Spinner, StatusIconButton, StatusLight, StatusLightsBar, Tabs, Tooltip, EllipsisTooltip, RevealMore, CopyText, Paginator, PageBanner, Banner, Alert, SimpleButton, Button, FormField, InputCheckbox, CheckboxInput, StyledRadioGroup, StyledRadioInput, StyledRadioLabel, HookFormWrapper, TextInput, EmailInput, FileInput, SearchInput, NumberInput, PhoneInput, UrlInput, PasswordInput, PasswordInputSignup, SelectDropdown, Select, Combobox, Textarea, InputDate, DateInput, Card, ReportFooter, MainHeader, ThemeLoader, DevToolbar, ThemeSwitch, LoremIpsum, GlobalDashboard, Menu, PopupMenu, SearchPanelMenu, Link, TemplateForm, TemplateLoading, TemplateDashboard, TemplatePage } from './components';
|
|
6
6
|
// Hooks
|
|
7
7
|
export { useOnClickOutside, usePopupKeys, useOnEdgeProximityDetect, useFirstCapital, useTabbableInputGroup, useDialogOverlay, useEllipsisBookends, useFocusTrap, useInertAttribute } from './hooks';
|
|
8
8
|
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Accordion","Chip","Pill","Badge","Dialog","HeaderBar","Icon","NotificationIcon","VentureLogo","CreditSavvyLogo","HomeInLogo","KitLogo","DoshiiLogo","TruyuLogo","SidePanel","Spinner","StatusIconButton","StatusLight","StatusLightsBar","Tabs","Tooltip","EllipsisTooltip","RevealMore","CopyText","Paginator","PageBanner","Banner","Alert","SimpleButton","Button","FormField","InputCheckbox","CheckboxInput","StyledRadioGroup","StyledRadioInput","StyledRadioLabel","HookFormWrapper","TextInput","EmailInput","FileInput","SearchInput","NumberInput","PhoneInput","UrlInput","PasswordInput","PasswordInputSignup","SelectDropdown","Select","Combobox","Textarea","InputDate","DateInput","Card","ReportFooter","MainHeader","ThemeLoader","DevToolbar","ThemeSwitch","LoremIpsum","GlobalDashboard","Menu","PopupMenu","SearchPanelMenu","Link","TemplateForm","TemplateLoading","TemplateDashboard","TemplatePage","useOnClickOutside","usePopupKeys","useOnEdgeProximityDetect","useFirstCapital","useTabbableInputGroup","useDialogOverlay","useEllipsisBookends","useFocusTrap","useInertAttribute","getMinAge","getMaxAge","getMinAndMaxAges","validateBirthdate","isDateEntryComplete","getAgeInWeeks","getAgeInYears","binaryFindInArray","addAndSortArray","moveItemInArrayMutate","moveItemInArrayCopy","getRandomItemFromArray","getItemIndexWithinArray","getRoundedMedian","getMostOccurringBoolean","cssClassesArrayToString","transformPlacesData","extractNamePieces","dateToShortIsoString","isValidDate","dateToShortReadableDate","dateToShortReadableMonth","timeStampToShortReadableDate","dateToReadableTime","dateToShortReadableDateTime","getLastDateOfMonth","daysSince","USER_CURRENCY","intlCurrencyFormatter","intlNumberFormatter","formatNumberForLocale","formatAsCurrencyForLocale","getNumberAbbreviation","formatRoundedNumberWithAbbreviation","formatNumberWithAbbreviation","formatNumberForChartAxis","formatAsSimpleCurrencyForChartAxis","formatAsInternationalCurrencyForChartAxis","formatAsCurrencyWithAbbreviation","formatFileSize","getRandomNumberBelow","getRandomBetweenInclusive","getRandomBetweenExclusive","hashCode","roundToDecimal","formatNumberToMinDigits","formatDigitalTime","richTextParser","capitalize","capitalizeFirstLetter","lowerCaseFirstLetter","useAnInsteadOfA","splitCamelCase","pluralize","pluralizeIfNeeded","getInitialsOrAcronym","objectsAreTheSame","isAnObject","createCompareValueOverride","deepMergeObjects","overrideMergeObjects","makeInheritanceObject","updateNestedProperty","filterObject","getArrayOfObjectKeys","getArrayOfReadableObjectKeys","getBranchFromPath","deepRemoveProps","UserMock","MenuMock","xGraphTopMenuMock","xGraphMainMenuMock","DashboardMenuMock","UserMenuMock","CBA_ORG_STRUCTURE","CBA_LOGO","VENTURES","DEFAULT_PASSWORD_REGEX","DEFAULT_EMAIL_REGEX","DEFAULT_PHONE_REGEX","DEFAULT_NUMBER_REGEX","DEFAULT_URL_REGEX","DATA_CLASSIFICATIONS","BLACKLISTED_FILE_TYPES","DEFAULT_UPLOAD_FILE_TYPES","DEFAULT_UPLOAD_FILE_EXTENSIONS","LIBRARY_CDN_BASE_URL","LIBRARY_CDN_BASE_URL_PROD","LIBRARY_CDN_BUCKET_NAME","LIBRARY_CDN_BUCKET_FOLDER","LIBRARY_CDN_DEV_BASE_URL","LIBRARY_CDN_PROD_BASE_URL","LIBRARY_VERSION","UserContextProvider","AppContextProvider"],"sources":["../../src/index.ts"],"sourcesContent":["import './styles/index.scss';\nimport './icons/style.scss';\n\n// Components\nexport {\n Accordion,\n Chip,\n Pill,\n Badge,\n Dialog,\n HeaderBar,\n Icon,\n NotificationIcon,\n VentureLogo,\n CreditSavvyLogo,\n HomeInLogo,\n KitLogo,\n DoshiiLogo,\n TruyuLogo,\n SidePanel,\n Spinner,\n StatusIconButton,\n StatusLight,\n StatusLightsBar,\n Tabs,\n Tooltip,\n EllipsisTooltip,\n RevealMore,\n CopyText,\n Paginator,\n PageBanner,\n Banner,\n Alert,\n SimpleButton,\n Button,\n FormField,\n InputCheckbox,\n CheckboxInput,\n StyledRadioGroup,\n StyledRadioInput,\n StyledRadioLabel,\n HookFormWrapper,\n TextInput,\n EmailInput,\n FileInput,\n SearchInput,\n NumberInput,\n PhoneInput,\n UrlInput,\n PasswordInput,\n PasswordInputSignup,\n SelectDropdown,\n Select,\n Combobox,\n Textarea,\n InputDate,\n DateInput,\n Card,\n ReportFooter,\n MainHeader,\n ThemeLoader,\n DevToolbar,\n ThemeSwitch,\n LoremIpsum,\n GlobalDashboard,\n Menu,\n PopupMenu,\n SearchPanelMenu,\n Link,\n TemplateForm,\n TemplateLoading,\n TemplateDashboard,\n TemplatePage\n} from './components';\n\nexport type {\n PageBannerProps,\n FormComponentProps,\n DropdownSelectProps,\n PasswordInputProps,\n StyledRadioGroupProps,\n ThemeStructure,\n MenuItemPropTypes,\n MenuButtonPropTypes,\n MenuItemIconStates,\n TemplateFormProps,\n TemplateLoadingProps,\n TemplateDashboardProps,\n TemplatePageProps\n} from './components';\n\n// Hooks\nexport {\n useOnClickOutside,\n usePopupKeys,\n useOnEdgeProximityDetect,\n useFirstCapital,\n useTabbableInputGroup,\n useDialogOverlay,\n useEllipsisBookends,\n useFocusTrap,\n useInertAttribute\n} from './hooks';\n\n// Interfaces (types only - safe to keep export *)\nexport * from './interfaces';\n\n// Helpers\nexport {\n getMinAge,\n getMaxAge,\n getMinAndMaxAges,\n validateBirthdate,\n isDateEntryComplete,\n getAgeInWeeks,\n getAgeInYears\n} from './helpers/ageHelpers';\n\nexport {\n binaryFindInArray,\n addAndSortArray,\n moveItemInArrayMutate,\n moveItemInArrayCopy,\n getRandomItemFromArray,\n getItemIndexWithinArray,\n getRoundedMedian,\n getMostOccurringBoolean,\n cssClassesArrayToString\n} from './helpers/arrayHelpers';\n\nexport {\n transformPlacesData,\n extractNamePieces\n} from './helpers/dataHelpers';\nexport type { NamePieces } from './helpers/dataHelpers';\n\nexport {\n dateToShortIsoString,\n isValidDate,\n dateToShortReadableDate,\n dateToShortReadableMonth,\n timeStampToShortReadableDate,\n dateToReadableTime,\n dateToShortReadableDateTime,\n getLastDateOfMonth,\n daysSince\n} from './helpers/dateHelpers';\n\nexport {\n USER_CURRENCY,\n intlCurrencyFormatter,\n intlNumberFormatter,\n formatNumberForLocale,\n formatAsCurrencyForLocale,\n getNumberAbbreviation,\n formatRoundedNumberWithAbbreviation,\n formatNumberWithAbbreviation,\n formatNumberForChartAxis,\n formatAsSimpleCurrencyForChartAxis,\n formatAsInternationalCurrencyForChartAxis,\n formatAsCurrencyWithAbbreviation,\n formatFileSize\n} from './helpers/formatters';\n\nexport {\n getRandomNumberBelow,\n getRandomBetweenInclusive,\n getRandomBetweenExclusive,\n hashCode,\n roundToDecimal,\n formatNumberToMinDigits,\n formatDigitalTime\n} from './helpers/numberHelpers';\n\nexport {\n richTextParser,\n capitalize,\n capitalizeFirstLetter,\n lowerCaseFirstLetter,\n useAnInsteadOfA,\n splitCamelCase,\n pluralize,\n pluralizeIfNeeded,\n getInitialsOrAcronym\n} from './helpers/stringHelpers';\n\nexport {\n objectsAreTheSame,\n isAnObject,\n createCompareValueOverride,\n deepMergeObjects,\n overrideMergeObjects,\n makeInheritanceObject,\n updateNestedProperty,\n filterObject,\n getArrayOfObjectKeys,\n getArrayOfReadableObjectKeys,\n getBranchFromPath,\n deepRemoveProps\n} from './helpers/objectHelpers';\n\n// Mocks\nexport {\n UserMock,\n MenuMock,\n xGraphTopMenuMock,\n xGraphMainMenuMock,\n DashboardMenuMock,\n UserMenuMock\n} from './mocks';\n\n// Constants\nexport {\n CBA_ORG_STRUCTURE,\n CBA_LOGO,\n VENTURES,\n DEFAULT_PASSWORD_REGEX,\n DEFAULT_EMAIL_REGEX,\n DEFAULT_PHONE_REGEX,\n DEFAULT_NUMBER_REGEX,\n DEFAULT_URL_REGEX,\n DATA_CLASSIFICATIONS,\n BLACKLISTED_FILE_TYPES,\n DEFAULT_UPLOAD_FILE_TYPES,\n DEFAULT_UPLOAD_FILE_EXTENSIONS,\n LIBRARY_CDN_BASE_URL,\n LIBRARY_CDN_BASE_URL_PROD,\n LIBRARY_CDN_BUCKET_NAME,\n LIBRARY_CDN_BUCKET_FOLDER,\n LIBRARY_CDN_DEV_BASE_URL,\n LIBRARY_CDN_PROD_BASE_URL,\n LIBRARY_VERSION\n} from './constants';\n\nexport type {\n USER,\n GlobalUserRole,\n ScopedUserRole,\n UserAuthType,\n VentureSite,\n VentureSites,\n VentureDefinition,\n VentureDefinitions\n} from './constants';\n\n// Context Providers\nexport { UserContextProvider, AppContextProvider } from './contextProviders';\n"],"mappings":"AAAA,OAAO,qBAAqB;AAC5B,OAAO,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,iBAAiB,EACjBC,oBAAoB,EACpBC,sBAAsB,EACtBC,yBAAyB,EACzBC,8BAA8B,EAC9BC,oBAAoB,EACpBC,yBAAyB,EACzBC,uBAAuB,EACvBC,yBAAyB,EACzBC,wBAAwB,EACxBC,yBAAyB,EACzBC,eAAe,QACV,aAAa;AAapB;AACA,SAASC,mBAAmB,EAAEC,kBAAkB,QAAQ,oBAAoB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["Accordion","Chip","Pill","Badge","Dialog","HeaderBar","Icon","NotificationIcon","VentureLogo","CreditSavvyLogo","HomeInLogo","KitLogo","DoshiiLogo","TruyuLogo","SidePanel","Skeleton","Spinner","StatusIconButton","StatusLight","StatusLightsBar","Tabs","Tooltip","EllipsisTooltip","RevealMore","CopyText","Paginator","PageBanner","Banner","Alert","SimpleButton","Button","FormField","InputCheckbox","CheckboxInput","StyledRadioGroup","StyledRadioInput","StyledRadioLabel","HookFormWrapper","TextInput","EmailInput","FileInput","SearchInput","NumberInput","PhoneInput","UrlInput","PasswordInput","PasswordInputSignup","SelectDropdown","Select","Combobox","Textarea","InputDate","DateInput","Card","ReportFooter","MainHeader","ThemeLoader","DevToolbar","ThemeSwitch","LoremIpsum","GlobalDashboard","Menu","PopupMenu","SearchPanelMenu","Link","TemplateForm","TemplateLoading","TemplateDashboard","TemplatePage","useOnClickOutside","usePopupKeys","useOnEdgeProximityDetect","useFirstCapital","useTabbableInputGroup","useDialogOverlay","useEllipsisBookends","useFocusTrap","useInertAttribute","getMinAge","getMaxAge","getMinAndMaxAges","validateBirthdate","isDateEntryComplete","getAgeInWeeks","getAgeInYears","binaryFindInArray","addAndSortArray","moveItemInArrayMutate","moveItemInArrayCopy","getRandomItemFromArray","getItemIndexWithinArray","getRoundedMedian","getMostOccurringBoolean","cssClassesArrayToString","transformPlacesData","extractNamePieces","dateToShortIsoString","isValidDate","dateToShortReadableDate","dateToShortReadableMonth","timeStampToShortReadableDate","dateToReadableTime","dateToShortReadableDateTime","getLastDateOfMonth","daysSince","USER_CURRENCY","intlCurrencyFormatter","intlNumberFormatter","formatNumberForLocale","formatAsCurrencyForLocale","getNumberAbbreviation","formatRoundedNumberWithAbbreviation","formatNumberWithAbbreviation","formatNumberForChartAxis","formatAsSimpleCurrencyForChartAxis","formatAsInternationalCurrencyForChartAxis","formatAsCurrencyWithAbbreviation","formatFileSize","getRandomNumberBelow","getRandomBetweenInclusive","getRandomBetweenExclusive","hashCode","roundToDecimal","formatNumberToMinDigits","formatDigitalTime","richTextParser","capitalize","capitalizeFirstLetter","lowerCaseFirstLetter","useAnInsteadOfA","splitCamelCase","pluralize","pluralizeIfNeeded","getInitialsOrAcronym","objectsAreTheSame","isAnObject","createCompareValueOverride","deepMergeObjects","overrideMergeObjects","makeInheritanceObject","updateNestedProperty","filterObject","getArrayOfObjectKeys","getArrayOfReadableObjectKeys","getBranchFromPath","deepRemoveProps","UserMock","MenuMock","xGraphTopMenuMock","xGraphMainMenuMock","DashboardMenuMock","UserMenuMock","CBA_ORG_STRUCTURE","CBA_LOGO","VENTURES","DEFAULT_PASSWORD_REGEX","DEFAULT_EMAIL_REGEX","DEFAULT_PHONE_REGEX","DEFAULT_NUMBER_REGEX","DEFAULT_URL_REGEX","DATA_CLASSIFICATIONS","BLACKLISTED_FILE_TYPES","DEFAULT_UPLOAD_FILE_TYPES","DEFAULT_UPLOAD_FILE_EXTENSIONS","LIBRARY_CDN_BASE_URL","LIBRARY_CDN_BASE_URL_PROD","LIBRARY_CDN_BUCKET_NAME","LIBRARY_CDN_BUCKET_FOLDER","LIBRARY_CDN_DEV_BASE_URL","LIBRARY_CDN_PROD_BASE_URL","LIBRARY_VERSION","UserContextProvider","AppContextProvider"],"sources":["../../src/index.ts"],"sourcesContent":["import './styles/index.scss';\nimport './icons/style.scss';\n\n// Components\nexport {\n Accordion,\n Chip,\n Pill,\n Badge,\n Dialog,\n HeaderBar,\n Icon,\n NotificationIcon,\n VentureLogo,\n CreditSavvyLogo,\n HomeInLogo,\n KitLogo,\n DoshiiLogo,\n TruyuLogo,\n SidePanel,\n Skeleton,\n Spinner,\n StatusIconButton,\n StatusLight,\n StatusLightsBar,\n Tabs,\n Tooltip,\n EllipsisTooltip,\n RevealMore,\n CopyText,\n Paginator,\n PageBanner,\n Banner,\n Alert,\n SimpleButton,\n Button,\n FormField,\n InputCheckbox,\n CheckboxInput,\n StyledRadioGroup,\n StyledRadioInput,\n StyledRadioLabel,\n HookFormWrapper,\n TextInput,\n EmailInput,\n FileInput,\n SearchInput,\n NumberInput,\n PhoneInput,\n UrlInput,\n PasswordInput,\n PasswordInputSignup,\n SelectDropdown,\n Select,\n Combobox,\n Textarea,\n InputDate,\n DateInput,\n Card,\n ReportFooter,\n MainHeader,\n ThemeLoader,\n DevToolbar,\n ThemeSwitch,\n LoremIpsum,\n GlobalDashboard,\n Menu,\n PopupMenu,\n SearchPanelMenu,\n Link,\n TemplateForm,\n TemplateLoading,\n TemplateDashboard,\n TemplatePage\n} from './components';\n\nexport type {\n PageBannerProps,\n FormComponentProps,\n DropdownSelectProps,\n PasswordInputProps,\n StyledRadioGroupProps,\n SkeletonProps,\n ThemeStructure,\n MenuItemPropTypes,\n MenuButtonPropTypes,\n MenuItemIconStates,\n TemplateFormProps,\n TemplateLoadingProps,\n TemplateDashboardProps,\n TemplatePageProps\n} from './components';\n\n// Hooks\nexport {\n useOnClickOutside,\n usePopupKeys,\n useOnEdgeProximityDetect,\n useFirstCapital,\n useTabbableInputGroup,\n useDialogOverlay,\n useEllipsisBookends,\n useFocusTrap,\n useInertAttribute\n} from './hooks';\n\n// Interfaces (types only - safe to keep export *)\nexport * from './interfaces';\n\n// Helpers\nexport {\n getMinAge,\n getMaxAge,\n getMinAndMaxAges,\n validateBirthdate,\n isDateEntryComplete,\n getAgeInWeeks,\n getAgeInYears\n} from './helpers/ageHelpers';\n\nexport {\n binaryFindInArray,\n addAndSortArray,\n moveItemInArrayMutate,\n moveItemInArrayCopy,\n getRandomItemFromArray,\n getItemIndexWithinArray,\n getRoundedMedian,\n getMostOccurringBoolean,\n cssClassesArrayToString\n} from './helpers/arrayHelpers';\n\nexport {\n transformPlacesData,\n extractNamePieces\n} from './helpers/dataHelpers';\nexport type { NamePieces } from './helpers/dataHelpers';\n\nexport {\n dateToShortIsoString,\n isValidDate,\n dateToShortReadableDate,\n dateToShortReadableMonth,\n timeStampToShortReadableDate,\n dateToReadableTime,\n dateToShortReadableDateTime,\n getLastDateOfMonth,\n daysSince\n} from './helpers/dateHelpers';\n\nexport {\n USER_CURRENCY,\n intlCurrencyFormatter,\n intlNumberFormatter,\n formatNumberForLocale,\n formatAsCurrencyForLocale,\n getNumberAbbreviation,\n formatRoundedNumberWithAbbreviation,\n formatNumberWithAbbreviation,\n formatNumberForChartAxis,\n formatAsSimpleCurrencyForChartAxis,\n formatAsInternationalCurrencyForChartAxis,\n formatAsCurrencyWithAbbreviation,\n formatFileSize\n} from './helpers/formatters';\n\nexport {\n getRandomNumberBelow,\n getRandomBetweenInclusive,\n getRandomBetweenExclusive,\n hashCode,\n roundToDecimal,\n formatNumberToMinDigits,\n formatDigitalTime\n} from './helpers/numberHelpers';\n\nexport {\n richTextParser,\n capitalize,\n capitalizeFirstLetter,\n lowerCaseFirstLetter,\n useAnInsteadOfA,\n splitCamelCase,\n pluralize,\n pluralizeIfNeeded,\n getInitialsOrAcronym\n} from './helpers/stringHelpers';\n\nexport {\n objectsAreTheSame,\n isAnObject,\n createCompareValueOverride,\n deepMergeObjects,\n overrideMergeObjects,\n makeInheritanceObject,\n updateNestedProperty,\n filterObject,\n getArrayOfObjectKeys,\n getArrayOfReadableObjectKeys,\n getBranchFromPath,\n deepRemoveProps\n} from './helpers/objectHelpers';\n\n// Mocks\nexport {\n UserMock,\n MenuMock,\n xGraphTopMenuMock,\n xGraphMainMenuMock,\n DashboardMenuMock,\n UserMenuMock\n} from './mocks';\n\n// Constants\nexport {\n CBA_ORG_STRUCTURE,\n CBA_LOGO,\n VENTURES,\n DEFAULT_PASSWORD_REGEX,\n DEFAULT_EMAIL_REGEX,\n DEFAULT_PHONE_REGEX,\n DEFAULT_NUMBER_REGEX,\n DEFAULT_URL_REGEX,\n DATA_CLASSIFICATIONS,\n BLACKLISTED_FILE_TYPES,\n DEFAULT_UPLOAD_FILE_TYPES,\n DEFAULT_UPLOAD_FILE_EXTENSIONS,\n LIBRARY_CDN_BASE_URL,\n LIBRARY_CDN_BASE_URL_PROD,\n LIBRARY_CDN_BUCKET_NAME,\n LIBRARY_CDN_BUCKET_FOLDER,\n LIBRARY_CDN_DEV_BASE_URL,\n LIBRARY_CDN_PROD_BASE_URL,\n LIBRARY_VERSION\n} from './constants';\n\nexport type {\n USER,\n GlobalUserRole,\n ScopedUserRole,\n UserAuthType,\n VentureSite,\n VentureSites,\n VentureDefinition,\n VentureDefinitions\n} from './constants';\n\n// Context Providers\nexport { UserContextProvider, AppContextProvider } from './contextProviders';\n"],"mappings":"AAAA,OAAO,qBAAqB;AAC5B,OAAO,oBAAoB;;AAE3B;AACA,SACEA,SAAS,EACTC,IAAI,EACJC,IAAI,EACJC,KAAK,EACLC,MAAM,EACNC,SAAS,EACTC,IAAI,EACJC,gBAAgB,EAChBC,WAAW,EACXC,eAAe,EACfC,UAAU,EACVC,OAAO,EACPC,UAAU,EACVC,SAAS,EACTC,SAAS,EACTC,QAAQ,EACRC,OAAO,EACPC,gBAAgB,EAChBC,WAAW,EACXC,eAAe,EACfC,IAAI,EACJC,OAAO,EACPC,eAAe,EACfC,UAAU,EACVC,QAAQ,EACRC,SAAS,EACTC,UAAU,EACVC,MAAM,EACNC,KAAK,EACLC,YAAY,EACZC,MAAM,EACNC,SAAS,EACTC,aAAa,EACbC,aAAa,EACbC,gBAAgB,EAChBC,gBAAgB,EAChBC,gBAAgB,EAChBC,eAAe,EACfC,SAAS,EACTC,UAAU,EACVC,SAAS,EACTC,WAAW,EACXC,WAAW,EACXC,UAAU,EACVC,QAAQ,EACRC,aAAa,EACbC,mBAAmB,EACnBC,cAAc,EACdC,MAAM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AAuB,EACvBC,iBAAiB,QACZ,yBAAyB;AAEhC,SACEC,cAAc,EACdC,UAAU,EACVC,qBAAqB,EACrBC,oBAAoB,EACpBC,eAAe,EACfC,cAAc,EACdC,SAAS,EACTC,iBAAiB,EACjBC,oBAAoB,QACf,yBAAyB;AAEhC,SACEC,iBAAiB,EACjBC,UAAU,EACVC,0BAA0B,EAC1BC,gBAAgB,EAChBC,oBAAoB,EACpBC,qBAAqB,EACrBC,oBAAoB,EACpBC,YAAY,EACZC,oBAAoB,EACpBC,4BAA4B,EAC5BC,iBAAiB,EACjBC,eAAe,QACV,yBAAyB;;AAEhC;AACA,SACEC,QAAQ,EACRC,QAAQ,EACRC,iBAAiB,EACjBC,kBAAkB,EAClBC,iBAAiB,EACjBC,YAAY,QACP,SAAS;;AAEhB;AACA,SACEC,iBAAiB,EACjBC,QAAQ,EACRC,QAAQ,EACRC,sBAAsB,EACtBC,mBAAmB,EACnBC,mBAAmB,EACnBC,oBAAoB,EACpBC,iBAAiB,EACjBC,oBAAoB,EACpBC,sBAAsB,EACtBC,yBAAyB,EACzBC,8BAA8B,EAC9BC,oBAAoB,EACpBC,yBAAyB,EACzBC,uBAAuB,EACvBC,yBAAyB,EACzBC,wBAAwB,EACxBC,yBAAyB,EACzBC,eAAe,QACV,aAAa;AAapB;AACA,SAASC,mBAAmB,EAAEC,kBAAkB,QAAQ,oBAAoB","ignoreList":[]}
|
package/dist/esm/package.json
CHANGED
|
@@ -254,6 +254,17 @@
|
|
|
254
254
|
--notificationIconFg: #fff;
|
|
255
255
|
--notificationIconBorder: 4px solid #c00;
|
|
256
256
|
--notificationIconBoxShadow: none;
|
|
257
|
+
--skeletonBg: #eef2f4;
|
|
258
|
+
--skeletonOpaqueBg: #d3dee4;
|
|
259
|
+
--skeletonHighlight: #f6f8fa;
|
|
260
|
+
--skeletonBorderRadius: 3px;
|
|
261
|
+
--skeletonRoundedBorderRadius: 8px;
|
|
262
|
+
--skeletonLineHeight: 1em;
|
|
263
|
+
--skeletonLineGap: 8px;
|
|
264
|
+
--skeletonBlockHeight: 120px;
|
|
265
|
+
--skeletonCircleSize: 40px;
|
|
266
|
+
--skeletonLastLineWidth: 60%;
|
|
267
|
+
--skeletonAnimationDuration: 1.6s;
|
|
257
268
|
}
|
|
258
269
|
|
|
259
270
|
:root {
|
|
@@ -597,6 +608,9 @@
|
|
|
597
608
|
--sidePanelCloseButtonShadow: 0 0 5px 0 #110d0b;
|
|
598
609
|
--sidePanelCloseIconColor: #dbd7d5;
|
|
599
610
|
--sidePanelFg: #dbd7d5;
|
|
611
|
+
--skeletonBg: #1a1410;
|
|
612
|
+
--skeletonHighlight: #3d2f26;
|
|
613
|
+
--skeletonOpaqueBg: #2c211b;
|
|
600
614
|
--statusAlertColor: #000;
|
|
601
615
|
--statusDefCon3Bg: radial-gradient(circle at 60% 40%, #003, #000, #333); /* gradient stops inverted */
|
|
602
616
|
--statusDefCon3Color: #003;
|
|
@@ -1914,6 +1928,31 @@ form select:placeholder-shown {
|
|
|
1914
1928
|
font-weight: 200;
|
|
1915
1929
|
font-family: var(--bodyFont);
|
|
1916
1930
|
}
|
|
1931
|
+
form .textareaFieldContainer {
|
|
1932
|
+
display: flex;
|
|
1933
|
+
flex-direction: column;
|
|
1934
|
+
row-gap: 5px;
|
|
1935
|
+
align-items: stretch;
|
|
1936
|
+
justify-content: flex-start;
|
|
1937
|
+
width: 100%;
|
|
1938
|
+
}
|
|
1939
|
+
form .textareaFooter {
|
|
1940
|
+
min-height: 1.5em;
|
|
1941
|
+
}
|
|
1942
|
+
form .textarea_Field.stacked label .textareaFooter .validation {
|
|
1943
|
+
position: static;
|
|
1944
|
+
height: auto;
|
|
1945
|
+
}
|
|
1946
|
+
form .textarea_Field.withValidation label {
|
|
1947
|
+
padding-bottom: 0;
|
|
1948
|
+
}
|
|
1949
|
+
form .textareaCharacterCount {
|
|
1950
|
+
line-height: 1.5;
|
|
1951
|
+
color: var(--inputLabelColor);
|
|
1952
|
+
}
|
|
1953
|
+
form .textareaCharacterCountExceeded {
|
|
1954
|
+
color: var(--inputErrorColor);
|
|
1955
|
+
}
|
|
1917
1956
|
form input[type=number] {
|
|
1918
1957
|
padding-right: 0;
|
|
1919
1958
|
}
|
|
@@ -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
|
}
|
|
@@ -233,6 +233,9 @@
|
|
|
233
233
|
--sidePanelCloseButtonShadow: 0 0 5px 0 #110d0b;
|
|
234
234
|
--sidePanelCloseIconColor: #dbd7d5;
|
|
235
235
|
--sidePanelFg: #dbd7d5;
|
|
236
|
+
--skeletonBg: #1a1410;
|
|
237
|
+
--skeletonHighlight: #3d2f26;
|
|
238
|
+
--skeletonOpaqueBg: #2c211b;
|
|
236
239
|
--statusAlertColor: #000;
|
|
237
240
|
--statusDefCon3Bg: radial-gradient(circle at 60% 40%, #003, #000, #333); /* gradient stops inverted */
|
|
238
241
|
--statusDefCon3Color: #003;
|
|
@@ -216,4 +216,15 @@
|
|
|
216
216
|
--notificationIconFg: #fff;
|
|
217
217
|
--notificationIconBorder: 4px solid #c00;
|
|
218
218
|
--notificationIconBoxShadow: none;
|
|
219
|
+
--skeletonBg: #eef2f4;
|
|
220
|
+
--skeletonOpaqueBg: #d3dee4;
|
|
221
|
+
--skeletonHighlight: #f6f8fa;
|
|
222
|
+
--skeletonBorderRadius: 3px;
|
|
223
|
+
--skeletonRoundedBorderRadius: 8px;
|
|
224
|
+
--skeletonLineHeight: 1em;
|
|
225
|
+
--skeletonLineGap: 8px;
|
|
226
|
+
--skeletonBlockHeight: 120px;
|
|
227
|
+
--skeletonCircleSize: 40px;
|
|
228
|
+
--skeletonLastLineWidth: 60%;
|
|
229
|
+
--skeletonAnimationDuration: 1.6s;
|
|
219
230
|
}
|