@emeraldemperaur/vector-sigma 1.4.17 → 1.4.19
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/README.md +12 -1
- package/lib/index.cjs +24 -29
- package/lib/index.esm.js +24 -29
- package/lib/types/components/datepicker/datepicker.d.ts +64 -0
- package/lib/types/components/daterangepicker/daterangepicker.d.ts +64 -0
- package/lib/types/components/datetimepicker/datetimepicker.d.ts +64 -0
- package/lib/types/components/dropdown/dropdown.d.ts +88 -14
- package/lib/types/components/file/file.d.ts +71 -6
- package/lib/types/components/file/filemultiple.d.ts +75 -4
- package/lib/types/components/icons/flagicon.d.ts +5 -0
- package/lib/types/components/image/image.d.ts +61 -0
- package/lib/types/components/input/input.d.ts +83 -4
- package/lib/types/components/input/uuidInput.d.ts +1 -1
- package/lib/types/components/inputcurrency/inputcurrency.d.ts +88 -0
- package/lib/types/components/inputcurrency/stockInput.d.ts +70 -0
- package/lib/types/components/radio/radio.d.ts +89 -6
- package/lib/types/components/select/select.d.ts +88 -14
- package/lib/types/components/selectmultiple/selectmultiple.d.ts +80 -4
- package/lib/types/components/slider/range.d.ts +86 -7
- package/lib/types/components/slider/slider.d.ts +84 -9
- package/lib/types/components/toggle/toggle.d.ts +62 -1
- package/lib/types/components/xtitle/xtitle.d.ts +73 -1
- package/lib/types/layouts/column/column.d.ts +44 -0
- package/lib/types/layouts/container/container.d.ts +15 -0
- package/lib/types/layouts/row/row.d.ts +20 -0
- package/lib/types/teletraan1.d.ts +2 -1
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -96,7 +96,7 @@ const App = () => {
|
|
|
96
96
|
|
|
97
97
|
<li><strong>🧩Exported UI Components</strong></br>
|
|
98
98
|
<p align="justify">Explicitly exported reusable form UI components with material, outline and neumorphic design variants from package entry point <code>src/index.ts</code> to enable developer-friendly use as lightweight component library.</p>
|
|
99
|
-
<p><em>Container, Row, Column, Theme, AvatarInput, ButtonInput, CheckboxGroupInput, ConditionalTrigger, DatePicker, DateRangePicker, DateTimePicker, Dropdown, File, FileMultiple, FlagIcon, Icon, Image, Input, PasswordInput, PhoneInput,
|
|
99
|
+
<p><em>Container, Row, Column, Theme, AvatarInput, ButtonInput, CheckboxGroupInput, ConditionalTrigger, DatePicker, DateRangePicker, DateTimePicker, Dropdown, File, FileMultiple, FlagIcon, Icon, Image, Input, PasswordInput, PhoneInput, CreditCardInput, CurrencyInput, StockInput, RadioGroupInput, OptionSelect, MultipleSelect, RangeSlider, SliderInput, Toggle, SectionTitle</em></p>
|
|
100
100
|
|
|
101
101
|
```javascript
|
|
102
102
|
import { Container, Column, Row, CheckboxGroup, Dropdown, File, RangeSlider }
|
|
@@ -190,6 +190,8 @@ const App = () => {
|
|
|
190
190
|
|
|
191
191
|
```bash
|
|
192
192
|
npm install --save-dev @changesets/cli
|
|
193
|
+
# Changeset project initializer
|
|
194
|
+
npx changeset init
|
|
193
195
|
```
|
|
194
196
|
</li>
|
|
195
197
|
<li>
|
|
@@ -208,6 +210,15 @@ git checkout -b new-changeset-branchname
|
|
|
208
210
|
```bash
|
|
209
211
|
# Changeset - patch, minor, major versioning
|
|
210
212
|
npx changeset
|
|
213
|
+
|
|
214
|
+
# PreRelease mode (alpha)
|
|
215
|
+
npx changeset pre enter alpha
|
|
216
|
+
|
|
217
|
+
# PreRelease mode (beta)
|
|
218
|
+
npx changeset pre enter beta
|
|
219
|
+
|
|
220
|
+
# Exit PreRelease mode
|
|
221
|
+
npx changeset pre exit
|
|
211
222
|
```
|
|
212
223
|
</li>
|
|
213
224
|
|
package/lib/index.cjs
CHANGED
|
@@ -26538,7 +26538,7 @@ const DateTimePicker = ({ alias, inputLabel, inputtype = 'datetimepicker-outline
|
|
|
26538
26538
|
};
|
|
26539
26539
|
|
|
26540
26540
|
const Dropdown = (_a) => {
|
|
26541
|
-
var { inputtype = 'dropdown-outline', alias, readOnly, width, inputLabel, placeholder,
|
|
26541
|
+
var { inputtype = 'dropdown-outline', alias, readOnly, width, inputLabel, placeholder, inputOptions, style, newRow, isHinted, hintText, hintUrl, errorText, className } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "placeholder", "inputOptions", "style", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "className"]);
|
|
26542
26542
|
const triggerRef = React.useRef(null);
|
|
26543
26543
|
const [neuVars, setNeuVars] = React.useState({});
|
|
26544
26544
|
const { setFieldValue, setFieldTouched } = formik.useFormikContext();
|
|
@@ -26673,7 +26673,7 @@ const getFileIcon$1 = (type, name) => {
|
|
|
26673
26673
|
};
|
|
26674
26674
|
const File$1 = (_a) => {
|
|
26675
26675
|
var _b;
|
|
26676
|
-
var { inputtype = 'fileinput-outline', alias, readOnly, width, inputLabel,
|
|
26676
|
+
var { inputtype = 'fileinput-outline', alias, readOnly, width, inputLabel, newRow, isHinted, hintText, hintUrl, errorText, preview = false, className, style } = _a; __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "preview", "className", "style"]);
|
|
26677
26677
|
const { setFieldValue, setFieldTouched } = formik.useFormikContext();
|
|
26678
26678
|
const [field, meta] = formik.useField(alias);
|
|
26679
26679
|
const selectedFile = field.value;
|
|
@@ -34198,7 +34198,7 @@ var Flags = /*#__PURE__*/Object.freeze({
|
|
|
34198
34198
|
|
|
34199
34199
|
const FlagIcon = ({ country }) => {
|
|
34200
34200
|
const FlagComponent = Flags[country];
|
|
34201
|
-
//
|
|
34201
|
+
// Renders the flag or a fallback placeholder if not found
|
|
34202
34202
|
if (country === 'EU') {
|
|
34203
34203
|
return React.createElement(EU, { style: { width: '18px', height: '12px', borderRadius: '2px' } });
|
|
34204
34204
|
}
|
|
@@ -41905,11 +41905,12 @@ const safeParseUuidFormat = (typeString) => {
|
|
|
41905
41905
|
}
|
|
41906
41906
|
};
|
|
41907
41907
|
const UUIDInput = (_a) => {
|
|
41908
|
-
var { alias, type = "uuid", inputLabel, width, delimiter = "-", format = [
|
|
41908
|
+
var { alias, type = "uuid-4-4-4-4", inputLabel, width, delimiter = "-", format = [4, 4, 4, 4], placeholder = 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX', newRow, isHinted, hintText, hintUrl, errorText, readOnly = false, inputVariant = 'uuid-outline', size = "2", className } = _a, props = __rest$1(_a, ["alias", "type", "inputLabel", "width", "delimiter", "format", "placeholder", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "readOnly", "inputVariant", "size", "className"]);
|
|
41909
41909
|
const { setFieldValue, setFieldTouched } = formik.useFormikContext();
|
|
41910
41910
|
const [field, meta] = formik.useField(alias);
|
|
41911
41911
|
const hasError = Boolean(meta.touched && meta.error);
|
|
41912
41912
|
const [copied, setCopied] = React.useState(false);
|
|
41913
|
+
const [uuidNumber, setUUIDNumber] = React.useState("");
|
|
41913
41914
|
const errorId = `${alias}-error`;
|
|
41914
41915
|
const activeFormat = React.useMemo(() => {
|
|
41915
41916
|
const parsed = safeParseUuidFormat(type);
|
|
@@ -41921,28 +41922,22 @@ const UUIDInput = (_a) => {
|
|
|
41921
41922
|
if (!value)
|
|
41922
41923
|
return "";
|
|
41923
41924
|
const clean = value.replace(/[^0-9a-fA-F]/g, "").toUpperCase().slice(0, maxHexChars);
|
|
41924
|
-
|
|
41925
|
+
const parts = [];
|
|
41925
41926
|
let currentIdx = 0;
|
|
41926
|
-
for (
|
|
41927
|
-
|
|
41928
|
-
if (currentIdx < clean.length) {
|
|
41929
|
-
const chunk = clean.substring(currentIdx, chunkLen);
|
|
41930
|
-
result += chunk;
|
|
41931
|
-
if (chunk.length === chunkLen && i < activeFormat.length - 1 && (currentIdx + chunkLen) < clean.length) {
|
|
41932
|
-
result += delimiter;
|
|
41933
|
-
}
|
|
41934
|
-
currentIdx += chunkLen;
|
|
41935
|
-
}
|
|
41936
|
-
else {
|
|
41927
|
+
for (const len of activeFormat) {
|
|
41928
|
+
if (currentIdx >= clean.length)
|
|
41937
41929
|
break;
|
|
41938
|
-
|
|
41930
|
+
const chunk = clean.slice(currentIdx, currentIdx + len);
|
|
41931
|
+
parts.push(chunk);
|
|
41932
|
+
currentIdx += len;
|
|
41939
41933
|
}
|
|
41940
|
-
return
|
|
41934
|
+
return parts.join(delimiter);
|
|
41941
41935
|
};
|
|
41942
41936
|
const handleChange = (e) => {
|
|
41943
41937
|
const val = e.target.value;
|
|
41944
41938
|
const formatted = formatUUID(val);
|
|
41945
|
-
|
|
41939
|
+
setUUIDNumber(formatted);
|
|
41940
|
+
setFieldValue(alias, uuidNumber);
|
|
41946
41941
|
};
|
|
41947
41942
|
const handleCopy = () => {
|
|
41948
41943
|
if (field.value) {
|
|
@@ -41951,10 +41946,10 @@ const UUIDInput = (_a) => {
|
|
|
41951
41946
|
setTimeout(() => setCopied(false), 2000);
|
|
41952
41947
|
}
|
|
41953
41948
|
};
|
|
41954
|
-
const variantClass = inputVariant !== '
|
|
41949
|
+
const variantClass = inputVariant !== 'uuid-outline' ? `input-${inputVariant}` : '';
|
|
41955
41950
|
return (React.createElement(Column, { span: width, newLine: newRow },
|
|
41956
41951
|
React.createElement(p$5, { direction: "column", gap: "2", style: { width: '100%' } },
|
|
41957
|
-
React.createElement(u, Object.assign({ size: size, variant: "surface", color: hasError ? 'red' : undefined, className: `${variantClass} ${className || ''}` }, props),
|
|
41952
|
+
React.createElement(u, Object.assign({ size: size, name: `${alias}UUIDFormInput`, variant: "surface", color: hasError ? 'red' : undefined, className: `${variantClass} ${className || ''}` }, props),
|
|
41958
41953
|
React.createElement("input", { id: `${alias}FormInput`, name: alias, "aria-describedby": `${alias}InputLabel`, value: field.value || '', onChange: handleChange, onBlur: () => setFieldTouched(alias, true), maxLength: maxTotalLength, readOnly: readOnly, placeholder: placeholder, autoComplete: "off", spellCheck: false, style: {
|
|
41959
41954
|
flex: 1,
|
|
41960
41955
|
border: 'none',
|
|
@@ -47459,7 +47454,7 @@ const StockInput = (_a) => {
|
|
|
47459
47454
|
};
|
|
47460
47455
|
|
|
47461
47456
|
const RadioGroupInput = (_a) => {
|
|
47462
|
-
var { inputtype = 'radio-outline', alias, readOnly, width, inputLabel,
|
|
47457
|
+
var { inputtype = 'radio-outline', alias, readOnly, width, inputLabel, newRow, isHinted, hintText, hintUrl, errorText, style, inputOptions, direction = 'column', columns, className } = _a; __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "style", "inputOptions", "direction", "columns", "className"]);
|
|
47463
47458
|
const { setFieldValue, setFieldTouched } = formik.useFormikContext();
|
|
47464
47459
|
const [field, meta] = formik.useField(alias);
|
|
47465
47460
|
const hasError = Boolean(meta.touched && meta.error);
|
|
@@ -47541,7 +47536,7 @@ const RadioGroupInput = (_a) => {
|
|
|
47541
47536
|
};
|
|
47542
47537
|
|
|
47543
47538
|
const OptionSelect = (_a) => {
|
|
47544
|
-
var { inputtype = 'dropdown-outline', alias, readOnly, width, inputLabel, placeholder,
|
|
47539
|
+
var { inputtype = 'dropdown-outline', alias, readOnly, width, inputLabel, placeholder, inputOptions, style, newRow, isHinted, hintText, hintUrl, errorText } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "placeholder", "inputOptions", "style", "newRow", "isHinted", "hintText", "hintUrl", "errorText"]);
|
|
47545
47540
|
const triggerRef = React.useRef(null);
|
|
47546
47541
|
const [neuVars, setNeuVars] = React.useState({});
|
|
47547
47542
|
const { setFieldValue, setFieldTouched } = formik.useFormikContext();
|
|
@@ -47754,10 +47749,10 @@ const MultipleSelect = (_a) => {
|
|
|
47754
47749
|
};
|
|
47755
47750
|
|
|
47756
47751
|
const SliderInput = (_a) => {
|
|
47757
|
-
var { inputtype = 'slider-outline', alias, readOnly, width, inputLabel,
|
|
47752
|
+
var { inputtype = 'slider-outline', alias, readOnly, width, inputLabel, newRow, isHinted, hintText, hintUrl, errorText, minvalue = 0, maxvalue = 100, stepvalue = 1, className, style } = _a; __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "minvalue", "maxvalue", "stepvalue", "className", "style"]);
|
|
47758
47753
|
const { setFieldValue, setFieldTouched } = formik.useFormikContext();
|
|
47759
47754
|
const [field, meta] = formik.useField(alias);
|
|
47760
|
-
const fieldValue = Array.isArray(field.value) ? field.value : [field.value ||
|
|
47755
|
+
const fieldValue = Array.isArray(field.value) ? field.value : [field.value || minvalue];
|
|
47761
47756
|
const hasError = Boolean(meta.touched && meta.error);
|
|
47762
47757
|
const containerRef = React.useRef(null);
|
|
47763
47758
|
const [neuVars, setNeuVars] = React.useState({});
|
|
@@ -47834,7 +47829,7 @@ const SliderInput = (_a) => {
|
|
|
47834
47829
|
box-shadow: none;
|
|
47835
47830
|
}
|
|
47836
47831
|
` } }),
|
|
47837
|
-
React.createElement(s, { name: alias, id: `${alias}FormInput`, disabled: readOnly, "aria-describedby": `${alias}InputLabel`, min:
|
|
47832
|
+
React.createElement(s, { name: alias, id: `${alias}FormInput`, disabled: readOnly, "aria-describedby": `${alias}InputLabel`, min: minvalue, max: maxvalue, step: stepvalue, value: fieldValue, onValueChange: (val) => {
|
|
47838
47833
|
setFieldValue(alias, val[0]);
|
|
47839
47834
|
}, onValueCommit: () => {
|
|
47840
47835
|
setFieldTouched(alias, true);
|
|
@@ -47853,7 +47848,7 @@ const SliderInput = (_a) => {
|
|
|
47853
47848
|
};
|
|
47854
47849
|
|
|
47855
47850
|
const RangeSlider = (_a) => {
|
|
47856
|
-
var { inputtype = 'range-outline', alias, readOnly, width, inputLabel,
|
|
47851
|
+
var { inputtype = 'range-outline', alias, readOnly, width, inputLabel, newRow, isHinted, hintText, hintUrl, errorText, minvalue = 0, maxvalue = 100, stepvalue = 1, minStepsBetweenThumbs = 0, className, style } = _a; __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "minvalue", "maxvalue", "stepvalue", "minStepsBetweenThumbs", "className", "style"]);
|
|
47857
47852
|
const { setFieldValue, setFieldTouched } = formik.useFormikContext();
|
|
47858
47853
|
const [field, meta] = formik.useField(alias);
|
|
47859
47854
|
// Range Formik Logic
|
|
@@ -47973,7 +47968,6 @@ const Toggle = (_a) => {
|
|
|
47973
47968
|
setFieldTouched(alias, true);
|
|
47974
47969
|
}
|
|
47975
47970
|
};
|
|
47976
|
-
// Determine Icon Color: Deep accent if Checked & Active, Grey otherwise
|
|
47977
47971
|
const iconColor = field.value && !readOnly ? 'var(--accent-9)' : 'var(--gray-8)';
|
|
47978
47972
|
return (React.createElement(Column, { span: width, newLine: newRow },
|
|
47979
47973
|
React.createElement("div", { ref: containerRef, style: { width: '100%', display: 'flex', flexDirection: 'column', gap: '4px' } },
|
|
@@ -48080,7 +48074,8 @@ const SectionTitle = ({ title, width = 12, newRow = true, size = "5", subsize =
|
|
|
48080
48074
|
subTitle && (React.createElement(p$d, { size: subsize, style: {
|
|
48081
48075
|
color: subtitleColor || 'var(--gray-11)',
|
|
48082
48076
|
maxWidth: '80%',
|
|
48083
|
-
margin: align === 'center' ? '0 auto' : undefined
|
|
48077
|
+
margin: align === 'center' ? '0 auto' : undefined,
|
|
48078
|
+
letterSpacing: `${letterSpacing}`
|
|
48084
48079
|
} }, subTitle)),
|
|
48085
48080
|
withSeparator && (React.createElement(o$2, { size: "4", style: {
|
|
48086
48081
|
width: '100%',
|
package/lib/index.esm.js
CHANGED
|
@@ -26518,7 +26518,7 @@ const DateTimePicker = ({ alias, inputLabel, inputtype = 'datetimepicker-outline
|
|
|
26518
26518
|
};
|
|
26519
26519
|
|
|
26520
26520
|
const Dropdown = (_a) => {
|
|
26521
|
-
var { inputtype = 'dropdown-outline', alias, readOnly, width, inputLabel, placeholder,
|
|
26521
|
+
var { inputtype = 'dropdown-outline', alias, readOnly, width, inputLabel, placeholder, inputOptions, style, newRow, isHinted, hintText, hintUrl, errorText, className } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "placeholder", "inputOptions", "style", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "className"]);
|
|
26522
26522
|
const triggerRef = useRef(null);
|
|
26523
26523
|
const [neuVars, setNeuVars] = useState({});
|
|
26524
26524
|
const { setFieldValue, setFieldTouched } = useFormikContext();
|
|
@@ -26653,7 +26653,7 @@ const getFileIcon$1 = (type, name) => {
|
|
|
26653
26653
|
};
|
|
26654
26654
|
const File$1 = (_a) => {
|
|
26655
26655
|
var _b;
|
|
26656
|
-
var { inputtype = 'fileinput-outline', alias, readOnly, width, inputLabel,
|
|
26656
|
+
var { inputtype = 'fileinput-outline', alias, readOnly, width, inputLabel, newRow, isHinted, hintText, hintUrl, errorText, preview = false, className, style } = _a; __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "preview", "className", "style"]);
|
|
26657
26657
|
const { setFieldValue, setFieldTouched } = useFormikContext();
|
|
26658
26658
|
const [field, meta] = useField(alias);
|
|
26659
26659
|
const selectedFile = field.value;
|
|
@@ -34178,7 +34178,7 @@ var Flags = /*#__PURE__*/Object.freeze({
|
|
|
34178
34178
|
|
|
34179
34179
|
const FlagIcon = ({ country }) => {
|
|
34180
34180
|
const FlagComponent = Flags[country];
|
|
34181
|
-
//
|
|
34181
|
+
// Renders the flag or a fallback placeholder if not found
|
|
34182
34182
|
if (country === 'EU') {
|
|
34183
34183
|
return React__default.createElement(EU, { style: { width: '18px', height: '12px', borderRadius: '2px' } });
|
|
34184
34184
|
}
|
|
@@ -41885,11 +41885,12 @@ const safeParseUuidFormat = (typeString) => {
|
|
|
41885
41885
|
}
|
|
41886
41886
|
};
|
|
41887
41887
|
const UUIDInput = (_a) => {
|
|
41888
|
-
var { alias, type = "uuid", inputLabel, width, delimiter = "-", format = [
|
|
41888
|
+
var { alias, type = "uuid-4-4-4-4", inputLabel, width, delimiter = "-", format = [4, 4, 4, 4], placeholder = 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX', newRow, isHinted, hintText, hintUrl, errorText, readOnly = false, inputVariant = 'uuid-outline', size = "2", className } = _a, props = __rest$1(_a, ["alias", "type", "inputLabel", "width", "delimiter", "format", "placeholder", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "readOnly", "inputVariant", "size", "className"]);
|
|
41889
41889
|
const { setFieldValue, setFieldTouched } = useFormikContext();
|
|
41890
41890
|
const [field, meta] = useField(alias);
|
|
41891
41891
|
const hasError = Boolean(meta.touched && meta.error);
|
|
41892
41892
|
const [copied, setCopied] = useState(false);
|
|
41893
|
+
const [uuidNumber, setUUIDNumber] = useState("");
|
|
41893
41894
|
const errorId = `${alias}-error`;
|
|
41894
41895
|
const activeFormat = useMemo(() => {
|
|
41895
41896
|
const parsed = safeParseUuidFormat(type);
|
|
@@ -41901,28 +41902,22 @@ const UUIDInput = (_a) => {
|
|
|
41901
41902
|
if (!value)
|
|
41902
41903
|
return "";
|
|
41903
41904
|
const clean = value.replace(/[^0-9a-fA-F]/g, "").toUpperCase().slice(0, maxHexChars);
|
|
41904
|
-
|
|
41905
|
+
const parts = [];
|
|
41905
41906
|
let currentIdx = 0;
|
|
41906
|
-
for (
|
|
41907
|
-
|
|
41908
|
-
if (currentIdx < clean.length) {
|
|
41909
|
-
const chunk = clean.substring(currentIdx, chunkLen);
|
|
41910
|
-
result += chunk;
|
|
41911
|
-
if (chunk.length === chunkLen && i < activeFormat.length - 1 && (currentIdx + chunkLen) < clean.length) {
|
|
41912
|
-
result += delimiter;
|
|
41913
|
-
}
|
|
41914
|
-
currentIdx += chunkLen;
|
|
41915
|
-
}
|
|
41916
|
-
else {
|
|
41907
|
+
for (const len of activeFormat) {
|
|
41908
|
+
if (currentIdx >= clean.length)
|
|
41917
41909
|
break;
|
|
41918
|
-
|
|
41910
|
+
const chunk = clean.slice(currentIdx, currentIdx + len);
|
|
41911
|
+
parts.push(chunk);
|
|
41912
|
+
currentIdx += len;
|
|
41919
41913
|
}
|
|
41920
|
-
return
|
|
41914
|
+
return parts.join(delimiter);
|
|
41921
41915
|
};
|
|
41922
41916
|
const handleChange = (e) => {
|
|
41923
41917
|
const val = e.target.value;
|
|
41924
41918
|
const formatted = formatUUID(val);
|
|
41925
|
-
|
|
41919
|
+
setUUIDNumber(formatted);
|
|
41920
|
+
setFieldValue(alias, uuidNumber);
|
|
41926
41921
|
};
|
|
41927
41922
|
const handleCopy = () => {
|
|
41928
41923
|
if (field.value) {
|
|
@@ -41931,10 +41926,10 @@ const UUIDInput = (_a) => {
|
|
|
41931
41926
|
setTimeout(() => setCopied(false), 2000);
|
|
41932
41927
|
}
|
|
41933
41928
|
};
|
|
41934
|
-
const variantClass = inputVariant !== '
|
|
41929
|
+
const variantClass = inputVariant !== 'uuid-outline' ? `input-${inputVariant}` : '';
|
|
41935
41930
|
return (React__default.createElement(Column, { span: width, newLine: newRow },
|
|
41936
41931
|
React__default.createElement(p$5, { direction: "column", gap: "2", style: { width: '100%' } },
|
|
41937
|
-
React__default.createElement(u, Object.assign({ size: size, variant: "surface", color: hasError ? 'red' : undefined, className: `${variantClass} ${className || ''}` }, props),
|
|
41932
|
+
React__default.createElement(u, Object.assign({ size: size, name: `${alias}UUIDFormInput`, variant: "surface", color: hasError ? 'red' : undefined, className: `${variantClass} ${className || ''}` }, props),
|
|
41938
41933
|
React__default.createElement("input", { id: `${alias}FormInput`, name: alias, "aria-describedby": `${alias}InputLabel`, value: field.value || '', onChange: handleChange, onBlur: () => setFieldTouched(alias, true), maxLength: maxTotalLength, readOnly: readOnly, placeholder: placeholder, autoComplete: "off", spellCheck: false, style: {
|
|
41939
41934
|
flex: 1,
|
|
41940
41935
|
border: 'none',
|
|
@@ -47439,7 +47434,7 @@ const StockInput = (_a) => {
|
|
|
47439
47434
|
};
|
|
47440
47435
|
|
|
47441
47436
|
const RadioGroupInput = (_a) => {
|
|
47442
|
-
var { inputtype = 'radio-outline', alias, readOnly, width, inputLabel,
|
|
47437
|
+
var { inputtype = 'radio-outline', alias, readOnly, width, inputLabel, newRow, isHinted, hintText, hintUrl, errorText, style, inputOptions, direction = 'column', columns, className } = _a; __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "style", "inputOptions", "direction", "columns", "className"]);
|
|
47443
47438
|
const { setFieldValue, setFieldTouched } = useFormikContext();
|
|
47444
47439
|
const [field, meta] = useField(alias);
|
|
47445
47440
|
const hasError = Boolean(meta.touched && meta.error);
|
|
@@ -47521,7 +47516,7 @@ const RadioGroupInput = (_a) => {
|
|
|
47521
47516
|
};
|
|
47522
47517
|
|
|
47523
47518
|
const OptionSelect = (_a) => {
|
|
47524
|
-
var { inputtype = 'dropdown-outline', alias, readOnly, width, inputLabel, placeholder,
|
|
47519
|
+
var { inputtype = 'dropdown-outline', alias, readOnly, width, inputLabel, placeholder, inputOptions, style, newRow, isHinted, hintText, hintUrl, errorText } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "placeholder", "inputOptions", "style", "newRow", "isHinted", "hintText", "hintUrl", "errorText"]);
|
|
47525
47520
|
const triggerRef = useRef(null);
|
|
47526
47521
|
const [neuVars, setNeuVars] = useState({});
|
|
47527
47522
|
const { setFieldValue, setFieldTouched } = useFormikContext();
|
|
@@ -47734,10 +47729,10 @@ const MultipleSelect = (_a) => {
|
|
|
47734
47729
|
};
|
|
47735
47730
|
|
|
47736
47731
|
const SliderInput = (_a) => {
|
|
47737
|
-
var { inputtype = 'slider-outline', alias, readOnly, width, inputLabel,
|
|
47732
|
+
var { inputtype = 'slider-outline', alias, readOnly, width, inputLabel, newRow, isHinted, hintText, hintUrl, errorText, minvalue = 0, maxvalue = 100, stepvalue = 1, className, style } = _a; __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "minvalue", "maxvalue", "stepvalue", "className", "style"]);
|
|
47738
47733
|
const { setFieldValue, setFieldTouched } = useFormikContext();
|
|
47739
47734
|
const [field, meta] = useField(alias);
|
|
47740
|
-
const fieldValue = Array.isArray(field.value) ? field.value : [field.value ||
|
|
47735
|
+
const fieldValue = Array.isArray(field.value) ? field.value : [field.value || minvalue];
|
|
47741
47736
|
const hasError = Boolean(meta.touched && meta.error);
|
|
47742
47737
|
const containerRef = useRef(null);
|
|
47743
47738
|
const [neuVars, setNeuVars] = useState({});
|
|
@@ -47814,7 +47809,7 @@ const SliderInput = (_a) => {
|
|
|
47814
47809
|
box-shadow: none;
|
|
47815
47810
|
}
|
|
47816
47811
|
` } }),
|
|
47817
|
-
React__default.createElement(s, { name: alias, id: `${alias}FormInput`, disabled: readOnly, "aria-describedby": `${alias}InputLabel`, min:
|
|
47812
|
+
React__default.createElement(s, { name: alias, id: `${alias}FormInput`, disabled: readOnly, "aria-describedby": `${alias}InputLabel`, min: minvalue, max: maxvalue, step: stepvalue, value: fieldValue, onValueChange: (val) => {
|
|
47818
47813
|
setFieldValue(alias, val[0]);
|
|
47819
47814
|
}, onValueCommit: () => {
|
|
47820
47815
|
setFieldTouched(alias, true);
|
|
@@ -47833,7 +47828,7 @@ const SliderInput = (_a) => {
|
|
|
47833
47828
|
};
|
|
47834
47829
|
|
|
47835
47830
|
const RangeSlider = (_a) => {
|
|
47836
|
-
var { inputtype = 'range-outline', alias, readOnly, width, inputLabel,
|
|
47831
|
+
var { inputtype = 'range-outline', alias, readOnly, width, inputLabel, newRow, isHinted, hintText, hintUrl, errorText, minvalue = 0, maxvalue = 100, stepvalue = 1, minStepsBetweenThumbs = 0, className, style } = _a; __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "newRow", "isHinted", "hintText", "hintUrl", "errorText", "minvalue", "maxvalue", "stepvalue", "minStepsBetweenThumbs", "className", "style"]);
|
|
47837
47832
|
const { setFieldValue, setFieldTouched } = useFormikContext();
|
|
47838
47833
|
const [field, meta] = useField(alias);
|
|
47839
47834
|
// Range Formik Logic
|
|
@@ -47953,7 +47948,6 @@ const Toggle = (_a) => {
|
|
|
47953
47948
|
setFieldTouched(alias, true);
|
|
47954
47949
|
}
|
|
47955
47950
|
};
|
|
47956
|
-
// Determine Icon Color: Deep accent if Checked & Active, Grey otherwise
|
|
47957
47951
|
const iconColor = field.value && !readOnly ? 'var(--accent-9)' : 'var(--gray-8)';
|
|
47958
47952
|
return (React__default.createElement(Column, { span: width, newLine: newRow },
|
|
47959
47953
|
React__default.createElement("div", { ref: containerRef, style: { width: '100%', display: 'flex', flexDirection: 'column', gap: '4px' } },
|
|
@@ -48060,7 +48054,8 @@ const SectionTitle = ({ title, width = 12, newRow = true, size = "5", subsize =
|
|
|
48060
48054
|
subTitle && (React__default.createElement(p$d, { size: subsize, style: {
|
|
48061
48055
|
color: subtitleColor || 'var(--gray-11)',
|
|
48062
48056
|
maxWidth: '80%',
|
|
48063
|
-
margin: align === 'center' ? '0 auto' : undefined
|
|
48057
|
+
margin: align === 'center' ? '0 auto' : undefined,
|
|
48058
|
+
letterSpacing: `${letterSpacing}`
|
|
48064
48059
|
} }, subTitle)),
|
|
48065
48060
|
withSeparator && (React__default.createElement(o$2, { size: "4", style: {
|
|
48066
48061
|
width: '100%',
|
|
@@ -3,17 +3,81 @@ import "react-datepicker/dist/react-datepicker.css";
|
|
|
3
3
|
import '../../styles/main.scss';
|
|
4
4
|
export type DatePickerDesign = 'datepicker' | 'datepicker-outline' | 'datepicker-material' | 'datepicker-neumorphic';
|
|
5
5
|
interface DatePickerProps {
|
|
6
|
+
/**
|
|
7
|
+
* * The required unique identifier for the DatePicker input field in useFormikContext().
|
|
8
|
+
* Alias referenced as `name` attribute and Formik state key.
|
|
9
|
+
* * @example
|
|
10
|
+
* alias="citizenshipDateCA"
|
|
11
|
+
*/
|
|
6
12
|
alias: string;
|
|
13
|
+
/**
|
|
14
|
+
* * The optional input label or description for the DatePicker input field.
|
|
15
|
+
* * @example
|
|
16
|
+
* inputLabel="Canadian Citizenship Date"
|
|
17
|
+
*/
|
|
7
18
|
inputLabel?: string;
|
|
19
|
+
/**
|
|
20
|
+
* * The design variation of the DatePicker input.
|
|
21
|
+
* Default: 'datepicker-outline'
|
|
22
|
+
* Variants: 'datepicker', 'datepicker-outline', 'datepicker-material', 'datepicker-neumorphic',
|
|
23
|
+
* * @example
|
|
24
|
+
* inputtype="datepicker-neumorphic"
|
|
25
|
+
*/
|
|
8
26
|
inputtype?: DatePickerDesign;
|
|
27
|
+
/**
|
|
28
|
+
* * The required viewport column width for the DatePicker input field.
|
|
29
|
+
* i.e. 1 - 12
|
|
30
|
+
* * @example
|
|
31
|
+
* width={6}
|
|
32
|
+
*/
|
|
9
33
|
width?: number;
|
|
34
|
+
/**
|
|
35
|
+
* * Option to render DatePicker input field on new row.
|
|
36
|
+
* * @example
|
|
37
|
+
* newRow
|
|
38
|
+
*/
|
|
10
39
|
newRow?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* * Option to set the default placeholder text for the DatePicker input field.
|
|
42
|
+
* * @example
|
|
43
|
+
* placeholder="Select Citizenship Date"
|
|
44
|
+
*/
|
|
11
45
|
placeholder?: string;
|
|
46
|
+
/**
|
|
47
|
+
* * Option to enable a hint for DatePicker input field.
|
|
48
|
+
* * @example
|
|
49
|
+
* isHinted
|
|
50
|
+
*/
|
|
12
51
|
isHinted?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* * Option to specify hint text for DatePicker input field.
|
|
54
|
+
* * @example
|
|
55
|
+
* hintText="This is a hint for a VΣ DatePicker"
|
|
56
|
+
*/
|
|
13
57
|
hintText?: string;
|
|
58
|
+
/**
|
|
59
|
+
* * Option to specify a hint url reference or resource for DatePicker input field.
|
|
60
|
+
* * @example
|
|
61
|
+
* hintUrl="https://www.mekaegwim.ca"
|
|
62
|
+
*/
|
|
14
63
|
hintUrl?: string;
|
|
64
|
+
/**
|
|
65
|
+
* * Option to specify the isRequired error text for the DatePicker input field.
|
|
66
|
+
* * @example
|
|
67
|
+
* errorText="VΣ Citizenship date is required"
|
|
68
|
+
*/
|
|
15
69
|
errorText?: string;
|
|
70
|
+
/**
|
|
71
|
+
* * Option to disable edits for DatePicker input field.
|
|
72
|
+
* * @example
|
|
73
|
+
* readOnly
|
|
74
|
+
*/
|
|
16
75
|
readOnly?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* * Option to specify the .scss class selector for the DatePicker input field.
|
|
78
|
+
* * @example
|
|
79
|
+
* className="teletraan-1-datepicker"
|
|
80
|
+
*/
|
|
17
81
|
className?: string;
|
|
18
82
|
}
|
|
19
83
|
export declare const DatePicker: ({ alias, inputLabel, inputtype, width, newRow, placeholder, isHinted, hintText, hintUrl, errorText, readOnly, className }: DatePickerProps) => React.JSX.Element;
|
|
@@ -3,17 +3,81 @@ import "react-datepicker/dist/react-datepicker.css";
|
|
|
3
3
|
import '../../styles/main.scss';
|
|
4
4
|
export type DateRangePickerDesign = 'daterangepicker' | 'daterangepicker-outline' | 'daterangepicker-material' | 'daterangepicker-neumorphic';
|
|
5
5
|
interface DateRangePickerProps {
|
|
6
|
+
/**
|
|
7
|
+
* * The required unique identifier for the DateRangePicker input field in useFormikContext().
|
|
8
|
+
* Alias referenced as `name` attribute and Formik state key.
|
|
9
|
+
* * @example
|
|
10
|
+
* alias="hotelReservationDays"
|
|
11
|
+
*/
|
|
6
12
|
alias: string;
|
|
13
|
+
/**
|
|
14
|
+
* * The optional input label or description for the DateRangePicker input field.
|
|
15
|
+
* * @example
|
|
16
|
+
* inputLabel="VΣ Hotel Reservation Dates"
|
|
17
|
+
*/
|
|
7
18
|
inputLabel?: string;
|
|
19
|
+
/**
|
|
20
|
+
* * The design variation of the DateRangePicker input.
|
|
21
|
+
* Default: 'daterangepicker-outline'
|
|
22
|
+
* Variants: 'daterangepicker', 'daterangepicker-outline', 'daterangepicker-material', 'daterangepicker-neumorphic',
|
|
23
|
+
* * @example
|
|
24
|
+
* inputtype="daterangepicker-neumorphic"
|
|
25
|
+
*/
|
|
8
26
|
inputtype?: DateRangePickerDesign;
|
|
27
|
+
/**
|
|
28
|
+
* * The required viewport column width for the DateRangePicker input field.
|
|
29
|
+
* i.e. 1 - 12
|
|
30
|
+
* * @example
|
|
31
|
+
* width={6}
|
|
32
|
+
*/
|
|
9
33
|
width?: number;
|
|
34
|
+
/**
|
|
35
|
+
* * Option to render DateRangePicker input field on new row.
|
|
36
|
+
* * @example
|
|
37
|
+
* newRow
|
|
38
|
+
*/
|
|
10
39
|
newRow?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* * Option to set the default placeholder text for the DateRangePicker input field.
|
|
42
|
+
* * @example
|
|
43
|
+
* placeholder="Select VΣ reservation dates"
|
|
44
|
+
*/
|
|
11
45
|
placeholder?: string;
|
|
46
|
+
/**
|
|
47
|
+
* * Option to enable a hint for DateRangePicker input field.
|
|
48
|
+
* * @example
|
|
49
|
+
* isHinted
|
|
50
|
+
*/
|
|
12
51
|
isHinted?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* * Option to specify hint text for DateRangePicker input field.
|
|
54
|
+
* * @example
|
|
55
|
+
* hintText="This is a hint for a VΣ DateRangePicker"
|
|
56
|
+
*/
|
|
13
57
|
hintText?: string;
|
|
58
|
+
/**
|
|
59
|
+
* * Option to specify a hint url reference or resource for DateRangePicker input field.
|
|
60
|
+
* * @example
|
|
61
|
+
* hintUrl="https://www.mekaegwim.ca"
|
|
62
|
+
*/
|
|
14
63
|
hintUrl?: string;
|
|
64
|
+
/**
|
|
65
|
+
* * Option to specify the isRequired error text for the DateRangePicker input field.
|
|
66
|
+
* * @example
|
|
67
|
+
* errorText="VΣ resrvation dates required"
|
|
68
|
+
*/
|
|
15
69
|
errorText?: string;
|
|
70
|
+
/**
|
|
71
|
+
* * Option to disable edits for DateRangePicker input field.
|
|
72
|
+
* * @example
|
|
73
|
+
* readOnly
|
|
74
|
+
*/
|
|
16
75
|
readOnly?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* * Option to specify the .scss class selector for the DateRangePicker input field.
|
|
78
|
+
* * @example
|
|
79
|
+
* className="teletraan-1-daterangepicker"
|
|
80
|
+
*/
|
|
17
81
|
className?: string;
|
|
18
82
|
}
|
|
19
83
|
export declare const DateRangePicker: ({ alias, inputLabel, inputtype, width, newRow, placeholder, isHinted, hintText, hintUrl, errorText, readOnly, className }: DateRangePickerProps) => React.JSX.Element;
|
|
@@ -3,17 +3,81 @@ import "react-datepicker/dist/react-datepicker.css";
|
|
|
3
3
|
import '../../styles/main.scss';
|
|
4
4
|
export type DateTimePickerDesign = 'datetimepicker' | 'datetimepicker-outline' | 'datetimepicker-material' | 'datetimepicker-neumorphic';
|
|
5
5
|
interface DateTimePickerProps {
|
|
6
|
+
/**
|
|
7
|
+
* * The required unique identifier for the DateTimePicker input field in useFormikContext().
|
|
8
|
+
* Alias referenced as `name` attribute and Formik state key.
|
|
9
|
+
* * @example
|
|
10
|
+
* alias="esppEnrollmentWindowStart"
|
|
11
|
+
*/
|
|
6
12
|
alias: string;
|
|
13
|
+
/**
|
|
14
|
+
* * The optional input label or description for the DateTimePicker input field.
|
|
15
|
+
* * @example
|
|
16
|
+
* inputLabel="ESPP Enrollment Window (Start)"
|
|
17
|
+
*/
|
|
7
18
|
inputLabel?: string;
|
|
19
|
+
/**
|
|
20
|
+
* * The design variation of the DateTimePicker input.
|
|
21
|
+
* Default: 'datetimepicker-outline'
|
|
22
|
+
* Variants: 'datetimepicker', 'datetimepicker-outline', 'datetimepicker-material', 'datetimepicker-neumorphic',
|
|
23
|
+
* * @example
|
|
24
|
+
* inputtype="datetimepicker-neumorphic"
|
|
25
|
+
*/
|
|
8
26
|
inputtype?: DateTimePickerDesign;
|
|
27
|
+
/**
|
|
28
|
+
* * The required viewport column width for the DateTimePicker input field.
|
|
29
|
+
* i.e. 1 - 12
|
|
30
|
+
* * @example
|
|
31
|
+
* width={6}
|
|
32
|
+
*/
|
|
9
33
|
width?: number;
|
|
34
|
+
/**
|
|
35
|
+
* * Option to render DateTimePicker input field on new row.
|
|
36
|
+
* * @example
|
|
37
|
+
* newRow
|
|
38
|
+
*/
|
|
10
39
|
newRow?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* * Option to set the default placeholder text for the DateTimePicker input field.
|
|
42
|
+
* * @example
|
|
43
|
+
* placeholder="Select VΣCG ESPP enrollment start date & time"
|
|
44
|
+
*/
|
|
11
45
|
placeholder?: string;
|
|
46
|
+
/**
|
|
47
|
+
* * Option to enable a hint for DateTimePicker input field.
|
|
48
|
+
* * @example
|
|
49
|
+
* isHinted
|
|
50
|
+
*/
|
|
12
51
|
isHinted?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* * Option to specify hint text for DateTimePicker input field.
|
|
54
|
+
* * @example
|
|
55
|
+
* hintText="This is a hint for a VΣ DateTimePicker"
|
|
56
|
+
*/
|
|
13
57
|
hintText?: string;
|
|
58
|
+
/**
|
|
59
|
+
* * Option to specify a hint url reference or resource for DateTimePicker input field.
|
|
60
|
+
* * @example
|
|
61
|
+
* hintUrl="https://www.mekaegwim.ca"
|
|
62
|
+
*/
|
|
14
63
|
hintUrl?: string;
|
|
64
|
+
/**
|
|
65
|
+
* * Option to specify the isRequired error text for the DateTimePicker input field.
|
|
66
|
+
* * @example
|
|
67
|
+
* errorText="VΣ resrvation dates required"
|
|
68
|
+
*/
|
|
15
69
|
errorText?: string;
|
|
70
|
+
/**
|
|
71
|
+
* * Option to disable edits for DateTimePicker input field.
|
|
72
|
+
* * @example
|
|
73
|
+
* readOnly
|
|
74
|
+
*/
|
|
16
75
|
readOnly?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* * Option to specify the .scss class selector for the DateTimePicker input field.
|
|
78
|
+
* * @example
|
|
79
|
+
* className="teletraan-1-datetimepicker"
|
|
80
|
+
*/
|
|
17
81
|
className?: string;
|
|
18
82
|
}
|
|
19
83
|
export declare const DateTimePicker: ({ alias, inputLabel, inputtype, width, newRow, placeholder, isHinted, hintText, hintUrl, errorText, readOnly, className }: DateTimePickerProps) => React.JSX.Element;
|