@jars-labs/jars-components 1.0.2 → 1.0.4

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.
@@ -13,5 +13,35 @@ export interface InputProps extends TextInputProps {
13
13
  rightSection?: React.ReactNode;
14
14
  hideLabel?: boolean;
15
15
  }
16
- export declare const Input: ({ error, name, placeholder, value, onChange, label, description, leftSection, rightSection, type, holdSpace, hideLabel, ...rest }: InputProps) => import("react/jsx-runtime").JSX.Element;
16
+ /**
17
+ * Input component that extends the TextInput component from Mantine.
18
+ * It includes additional features like error handling, description, and label visibility.
19
+ *
20
+ * @param {string} name - The name of the input field.
21
+ * @param {string} label - The label for the input field.
22
+ * @param {string} placeholder - The placeholder text for the input field.
23
+ * @param {string} value - The value of the input field.
24
+ * @param {function} onChange - The function to call when the input value changes.
25
+ * @param {function} onBlur - The function to call when the input loses focus.
26
+ * @param {string} error - The error message to display.
27
+ * @param {string} description - The description text to display below the input field.
28
+ * @param {boolean} holdSpace - Whether to hold space for the error message even when there is no error.
29
+ * @param {React.ReactNode} leftSection - The icon to display on the left side of the input field.
30
+ * @param {React.ReactNode} rightSection - The icon to display on the right side of the input field.
31
+ * @param {boolean} hideLabel - Whether to hide the label when it's not required.
32
+ * @param {string} type - The type of the input field (default is 'text').
33
+ *
34
+ * @example
35
+ * <Input
36
+ * name="username"
37
+ * label="Username"
38
+ * placeholder="Enter your username"
39
+ * value={username}
40
+ * onChange={(e) => setUsername(e.target.value)}
41
+ * onBlur={() => console.log('Input blurred')}
42
+ * error="Username is required"
43
+ * description="Your unique username"
44
+ * />
45
+ */
46
+ export declare const Input: ({ error, name, placeholder, value, onChange, label, description, leftSection, rightSection, type, holdSpace, hideLabel, disabled, ...rest }: InputProps) => import("react/jsx-runtime").JSX.Element;
17
47
  //# sourceMappingURL=Input.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../src/Input/Input.tsx"],"names":[],"mappings":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CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,eAAO,MAAM,KAAK,gJAef,UAAU,4CA8EZ,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"NavBar.d.ts","sourceRoot":"","sources":["../../src/NavBar/NavBar.tsx"],"names":[],"mappings":"AACA,OAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAIhD,eAAO,MAAM,MAAM,iBAAkB,iBAAiB,4CAcrD,CAAA"}
1
+ {"version":3,"file":"NavBar.d.ts","sourceRoot":"","sources":["../../src/NavBar/NavBar.tsx"],"names":[],"mappings":"AACA,OAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAIhD,eAAO,MAAM,MAAM,iBAAkB,iBAAiB,4CAmBrD,CAAA"}
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+ import { Input } from '../Input/Input';
3
+ export interface PasswordInputProps extends React.ComponentProps<typeof Input> {
4
+ }
5
+ /**
6
+ * PasswordInput component
7
+ * It allows toggling visibility of the password.
8
+ * It extends the Input component.
9
+ *
10
+ * @param {string} name - The name of the input password field.
11
+ * @param {string} label - The label for the input password field.
12
+ * @param {string} placeholder - The placeholder text for the input password field.
13
+ * @param {string} value - The value of the input password field.
14
+ * @param {function} onChange - The function to call when the input password value changes.
15
+ * @param {function} onBlur - The function to call when the input password loses focus.
16
+ * @param {string} error - The error message to display.
17
+ *
18
+ * @return Attaches PasswordInput to target element and displays options
19
+ *
20
+ * @example
21
+ * <PasswordInput
22
+ * name="password"
23
+ * label="Password"
24
+ * placeholder="Password"
25
+ * value={password}
26
+ * onChange={(e) => setPassword(e.target.value)}
27
+ * onBlur={() => console.log('Password blurred')}
28
+ * error="Password is required"
29
+ * />
30
+ *
31
+ */
32
+ export declare const PasswordInput: ({ name, label, placeholder, value, onChange, onBlur, error, }: PasswordInputProps) => import("react/jsx-runtime").JSX.Element;
33
+ //# sourceMappingURL=PasswordInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PasswordInput.d.ts","sourceRoot":"","sources":["../../src/PasswordInput/PasswordInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAIvC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAEtC,MAAM,WAAW,kBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC;CAAG;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,eAAO,MAAM,aAAa,kEAQvB,kBAAkB,4CAwCpB,CAAA"}
@@ -150,6 +150,10 @@
150
150
  color: var(--color-red-300);
151
151
  }
152
152
 
153
+ .mcfb7df269_labelDisabled {
154
+ color: var(--color-neutral-500);
155
+ }
156
+
153
157
  .mcfb7df269_input:focus,
154
158
  .mcfb7df269_input:hover {
155
159
  border: 1px solid var(--color-primary-300);
package/dist/index.d.ts CHANGED
@@ -16,6 +16,7 @@ export * from './FileInput/FileInput';
16
16
  export * from './FileInput/FileUpload';
17
17
  export * from './IncrementNumber/IncrementNumber';
18
18
  export * from './Input/Input';
19
+ export * from './PasswordInput/PasswordInput';
19
20
  export * from './Link/Link';
20
21
  export * from './LinkModal/LinkModal';
21
22
  export * from './Loader/Loader';
@@ -79,4 +80,5 @@ export * from './Icons/Upload';
79
80
  export * from './Icons/Visa';
80
81
  export * from './Icons/Warning';
81
82
  export * from './Icons/World';
83
+ export * from './utils/stringUtils';
82
84
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,CAAA;AAGnB,cAAc,uBAAuB,CAAA;AACrC,cAAc,yBAAyB,CAAA;AACvC,cAAc,uBAAuB,CA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B,CAAA;AACtC,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAE7B,cAAc,qBAAqB,CAAA"}
package/dist/index.esm.js CHANGED
@@ -375,6 +375,7 @@ const inputRightIcon = "mcfb7df269_inputRightIcon";
375
375
  const label$6 = "mcfb7df269_label";
376
376
  const labelFocused$1 = "mcfb7df269_labelFocused";
377
377
  const labelError$1 = "mcfb7df269_labelError";
378
+ const labelDisabled$1 = "mcfb7df269_labelDisabled";
378
379
  const description$1 = "mcfb7df269_description";
379
380
  const error$1 = "mcfb7df269_error";
380
381
  const errorText$1 = "mcfb7df269_errorText";
@@ -389,6 +390,7 @@ inputRightIcon,
389
390
  label: label$6,
390
391
  labelFocused: labelFocused$1,
391
392
  labelError: labelError$1,
393
+ labelDisabled: labelDisabled$1,
392
394
  description: description$1,
393
395
  error: error$1,
394
396
  errorText: errorText$1,
@@ -486,32 +488,81 @@ var elementType = {
486
488
  h4: 'h4',
487
489
  };
488
490
  var Text = t.forwardRef(function (props, ref) {
489
- var children = props.children, variant = props.variant, weight = props.weight, color = props.color, style = props.style, className = props.className, rest = __rest(props, ["children", "variant", "weight", "color", "style", "className"]);
491
+ var as = props.as, children = props.children, className = props.className, color = props.color, style = props.style, variant = props.variant, weight = props.weight, rest = __rest(props, ["as", "children", "className", "color", "style", "variant", "weight"]);
490
492
  var combinedStyle = __assign(__assign({}, style), { color: color });
491
493
  var combinedClassName = classNames(className, styles$j['text'], styles$j[variant || ''], styles$j[weight || '']);
492
- return t.createElement(props.as || elementType[variant] || 'p', __assign({ ref: ref, className: combinedClassName, style: combinedStyle }, rest), children);
494
+ return t.createElement(as || elementType[variant] || 'p', __assign({ ref: ref, className: combinedClassName, style: combinedStyle }, rest), children);
493
495
  });
494
496
 
497
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
498
+ function capitalizeFirstSentenceLetter(input) {
499
+ var str;
500
+ if (typeof input !== 'string') {
501
+ if (Array.isArray(input)) {
502
+ str = input.join(' ');
503
+ }
504
+ else {
505
+ return String(input);
506
+ }
507
+ }
508
+ else {
509
+ str = input;
510
+ }
511
+ var lowerCaseString = str.toLowerCase().replace(/_/g, ' ');
512
+ return lowerCaseString.charAt(0).toUpperCase() + lowerCaseString.slice(1);
513
+ }
514
+
515
+ /**
516
+ * Input component that extends the TextInput component from Mantine.
517
+ * It includes additional features like error handling, description, and label visibility.
518
+ *
519
+ * @param {string} name - The name of the input field.
520
+ * @param {string} label - The label for the input field.
521
+ * @param {string} placeholder - The placeholder text for the input field.
522
+ * @param {string} value - The value of the input field.
523
+ * @param {function} onChange - The function to call when the input value changes.
524
+ * @param {function} onBlur - The function to call when the input loses focus.
525
+ * @param {string} error - The error message to display.
526
+ * @param {string} description - The description text to display below the input field.
527
+ * @param {boolean} holdSpace - Whether to hold space for the error message even when there is no error.
528
+ * @param {React.ReactNode} leftSection - The icon to display on the left side of the input field.
529
+ * @param {React.ReactNode} rightSection - The icon to display on the right side of the input field.
530
+ * @param {boolean} hideLabel - Whether to hide the label when it's not required.
531
+ * @param {string} type - The type of the input field (default is 'text').
532
+ *
533
+ * @example
534
+ * <Input
535
+ * name="username"
536
+ * label="Username"
537
+ * placeholder="Enter your username"
538
+ * value={username}
539
+ * onChange={(e) => setUsername(e.target.value)}
540
+ * onBlur={() => console.log('Input blurred')}
541
+ * error="Username is required"
542
+ * description="Your unique username"
543
+ * />
544
+ */
495
545
  var Input = function (_a) {
496
546
  var _b, _c;
497
- var _d = _a.error, error = _d === void 0 ? '' : _d, name = _a.name, placeholder = _a.placeholder, _e = _a.value, value = _e === void 0 ? '' : _e, onChange = _a.onChange, label = _a.label, description = _a.description, leftSection = _a.leftSection, rightSection = _a.rightSection, _f = _a.type, type = _f === void 0 ? 'text' : _f, _g = _a.holdSpace, holdSpace = _g === void 0 ? true : _g, _h = _a.hideLabel, hideLabel = _h === void 0 ? false : _h, rest = __rest(_a, ["error", "name", "placeholder", "value", "onChange", "label", "description", "leftSection", "rightSection", "type", "holdSpace", "hideLabel"]);
498
- var _j = useState(false), isFocused = _j[0], setIsFocused = _j[1];
499
- var _k = useState(false), isHovered = _k[0], setIsHovered = _k[1];
547
+ var _d = _a.error, error = _d === void 0 ? '' : _d, name = _a.name, placeholder = _a.placeholder, _e = _a.value, value = _e === void 0 ? '' : _e, onChange = _a.onChange, label = _a.label, description = _a.description, leftSection = _a.leftSection, rightSection = _a.rightSection, _f = _a.type, type = _f === void 0 ? 'text' : _f, _g = _a.holdSpace, holdSpace = _g === void 0 ? true : _g, _h = _a.hideLabel, hideLabel = _h === void 0 ? false : _h, _j = _a.disabled, disabled = _j === void 0 ? false : _j, rest = __rest(_a, ["error", "name", "placeholder", "value", "onChange", "label", "description", "leftSection", "rightSection", "type", "holdSpace", "hideLabel", "disabled"]);
548
+ var _k = useState(false), isFocused = _k[0], setIsFocused = _k[1];
549
+ var _l = useState(false), isHovered = _l[0], setIsHovered = _l[1];
500
550
  var showLabel = !hideLabel && (isFocused || value.trim());
501
551
  var placeHolderValue = showLabel ? placeholder : label;
502
552
  var ErrorSection = useMemo(function () {
503
- return holdSpace && (jsxs(Flex, { className: styles$k.error, gap: 4, ml: 0, style: { visibility: error ? 'visible' : 'hidden' }, children: [jsx(Info, { width: "18px", height: "18px", viewBox: "0 0 24 24", stroke: "var(--color-red-300)" }), jsx(Text, { variant: "xs", className: classNames(styles$k.errorText), children: error })] }));
553
+ return holdSpace && (jsxs(Flex, { className: styles$k.error, gap: 4, ml: 0, style: { visibility: error ? 'visible' : 'hidden' }, children: [jsx(Info, { width: "18px", height: "18px", viewBox: "0 0 24 24", stroke: "var(--color-red-300)" }), jsx(Text, { variant: "xs", className: classNames(styles$k.errorText), children: capitalizeFirstSentenceLetter(error) })] }));
504
554
  }, [error]);
505
555
  return (jsxs("div", { className: styles$k.container, children: [showLabel && (jsx("label", { className: classNames(styles$k.label, (_b = {},
506
556
  _b[styles$k.labelError] = error && !isFocused,
507
557
  _b[styles$k.labelFocused] = isFocused || isHovered,
558
+ _b[styles$k.labelDisabled] = disabled,
508
559
  _b)), children: label })), jsx("div", { onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onFocus: function () { return setIsFocused(true); }, onBlur: function () { return setIsFocused(false); }, children: jsx(TextInput, __assign({ classNames: {
509
560
  input: classNames(styles$k.input, (_c = {},
510
561
  _c[styles$k.inputLeftIcon] = leftSection,
511
562
  _c[styles$k.inputRightIcon] = rightSection,
512
563
  _c[styles$k.inputError] = error,
513
564
  _c)),
514
- }, placeholder: placeHolderValue, name: name, error: ErrorSection, description: !error && jsx(Text, { variant: "xs", children: description }), descriptionProps: { className: styles$k.description }, errorProps: { className: styles$k.error }, inputWrapperOrder: ['label', 'input', 'description', 'error'], value: value, onChange: onChange, leftSection: leftSection, rightSection: rightSection, leftSectionProps: { className: styles$k.leftSection }, rightSectionProps: { className: styles$k.rightSection } }, rest, { type: type })) })] }));
565
+ }, placeholder: placeHolderValue, name: name, error: ErrorSection, description: !error && jsx(Text, { variant: "xs", children: description }), descriptionProps: { className: styles$k.description }, errorProps: { className: styles$k.error }, inputWrapperOrder: ['label', 'input', 'description', 'error'], value: value, onChange: onChange, leftSection: leftSection, rightSection: rightSection, leftSectionProps: { className: styles$k.leftSection }, rightSectionProps: { className: styles$k.rightSection }, type: type, disabled: disabled }, rest)) })] }));
515
566
  };
516
567
 
517
568
  var Loader = function (props) {
@@ -1114,6 +1165,50 @@ var IncrementNumber = function (props) {
1114
1165
  } }) }))] }));
1115
1166
  };
1116
1167
 
1168
+ var EyeHide = function (props) {
1169
+ return (jsx(Icon, __assign({}, props, { children: jsx("path", { stroke: props.stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "M16 25.333c-1.123 0-2.247-.237-3.339-.66M16 25.333c4.66 0 9.32-4.044 11.843-8.709.209-.388.209-.859 0-1.247a20.174 20.174 0 00-2.404-3.482M6.667 25.333L25.333 6.667M13.031 18.969a4.2 4.2 0 015.94-5.94m3.754-3.754C20.663 7.679 18.331 6.667 16 6.667c-4.66 0-9.32 4.044-11.843 8.71-.209.388-.209.859 0 1.247 1.262 2.332 3.056 4.508 5.118 6.103" }) })));
1170
+ };
1171
+
1172
+ var EyeShow = function (props) {
1173
+ return (jsxs(Icon, __assign({}, props, { children: [jsx("path", { fillRule: "evenodd", stroke: props.stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "M18.83 13.173a4.005 4.005 0 010 5.66 4.005 4.005 0 01-5.66 0 4.005 4.005 0 010-5.66 4 4 0 015.66 0z", clipRule: "evenodd" }), jsx("path", { fillRule: "evenodd", stroke: props.stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "M4 16c0-.879.203-1.748.595-2.55C6.615 9.322 11.079 6.668 16 6.668c4.921 0 9.385 2.654 11.405 6.784.392.801.595 1.67.595 2.549s-.203 1.748-.595 2.55c-2.02 4.129-6.484 6.783-11.405 6.783-4.921 0-9.385-2.654-11.405-6.784A5.795 5.795 0 014 16z", clipRule: "evenodd" })] })));
1174
+ };
1175
+
1176
+ /**
1177
+ * PasswordInput component
1178
+ * It allows toggling visibility of the password.
1179
+ * It extends the Input component.
1180
+ *
1181
+ * @param {string} name - The name of the input password field.
1182
+ * @param {string} label - The label for the input password field.
1183
+ * @param {string} placeholder - The placeholder text for the input password field.
1184
+ * @param {string} value - The value of the input password field.
1185
+ * @param {function} onChange - The function to call when the input password value changes.
1186
+ * @param {function} onBlur - The function to call when the input password loses focus.
1187
+ * @param {string} error - The error message to display.
1188
+ *
1189
+ * @return Attaches PasswordInput to target element and displays options
1190
+ *
1191
+ * @example
1192
+ * <PasswordInput
1193
+ * name="password"
1194
+ * label="Password"
1195
+ * placeholder="Password"
1196
+ * value={password}
1197
+ * onChange={(e) => setPassword(e.target.value)}
1198
+ * onBlur={() => console.log('Password blurred')}
1199
+ * error="Password is required"
1200
+ * />
1201
+ *
1202
+ */
1203
+ var PasswordInput = function (_a) {
1204
+ var name = _a.name, label = _a.label, placeholder = _a.placeholder, value = _a.value, onChange = _a.onChange, onBlur = _a.onBlur, error = _a.error;
1205
+ var _b = useState(false), showPassword = _b[0], setShowPassword = _b[1];
1206
+ var togglePasswordVisibility = function () {
1207
+ setShowPassword(function (prevShowPassword) { return !prevShowPassword; });
1208
+ };
1209
+ return (jsx(Input, { "data-testid": name, name: name, label: label, placeholder: placeholder, type: showPassword ? 'text' : 'password', value: value, onChange: onChange, onBlur: onBlur, error: error, rightSection: jsx(Flex, { onClick: togglePasswordVisibility, align: 'center', style: { cursor: 'pointer' }, children: showPassword ? (jsx(EyeShow, { width: "32px", height: "32px", stroke: "var(--color-neutral-600)" })) : (jsx(EyeHide, { width: "32px", height: "32px", stroke: "var(--color-neutral-600)" })) }) }));
1210
+ };
1211
+
1117
1212
  const link = "mc234e3a09_link";
1118
1213
  const s = "mc234e3a09_s";
1119
1214
  const m$1 = "mc234e3a09_m";
@@ -1251,7 +1346,7 @@ var Umbrello = function (props) {
1251
1346
 
1252
1347
  var NavBar = function (_a) {
1253
1348
  var children = _a.children;
1254
- return (jsxs(Flex, { p: "24px 120px", bg: "var(--color-white)", children: [jsx("a", { href: "/dashboard/management-companies", children: jsx(Umbrello, { fill: "var(--color-neutral-600)", width: "200", height: "40", viewBox: "0 0 200 40" }) }), children] }));
1349
+ return (jsxs(Flex, { p: "24px 120px", bg: "var(--color-white)", align: "center", justify: "space-between", children: [jsx("a", { href: "/dashboard/management-companies", children: jsx(Umbrello, { fill: "var(--color-neutral-600)", width: "200", height: "40", viewBox: "0 0 200 40" }) }), children] }));
1255
1350
  };
1256
1351
 
1257
1352
  var Pagination = function (_a) {
@@ -1721,14 +1816,6 @@ var Dog = function (props) {
1721
1816
  return (jsxs(Icon, __assign({}, props, { children: [jsx("path", { fillRule: "evenodd", stroke: props.stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "M15.642 18.223v0a.66.66 0 01-.652-.667v0a.22.22 0 01.218-.222h.87c.12 0 .216.1.216.222v0a.66.66 0 01-.652.667z", clipRule: "evenodd" }), jsx("path", { stroke: props.stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "M23.467 17.334c0 .737.584 1.334 1.304 1.334v0c1.44 0 2.608-1.195 2.608-2.668v-4.002c0-2.21-1.752-4.001-3.912-4.001h-.544M10.493 23.798l-1.371 4.207M20.792 23.798l1.37 4.207M8.362 7.997h-.544c-2.16 0-3.912 1.791-3.912 4.001V16c0 1.473 1.167 2.668 2.608 2.668v0c.72 0 1.304-.597 1.304-1.334M18.25 23.775v.895c0 1.105-.875 2.001-1.956 2.001H14.99c-1.08 0-1.956-.896-1.956-2v-.896" }), jsx("path", { fillRule: "evenodd", stroke: props.stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "M15.642 18.223v1.779c0 2.21-1.751 4.001-3.912 4.001v0c-2.16 0-3.912-1.791-3.912-4.001v-9.338c0-3.683 2.92-6.669 6.52-6.669h2.609c3.6 0 6.52 2.986 6.52 6.67v9.337c0 2.21-1.752 4.001-3.912 4.001v0c-2.161 0-3.913-1.791-3.913-4.001v-1.779z", clipRule: "evenodd" }), jsx("path", { stroke: props.stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "M18.577 12.666a.33.33 0 01-.327.333.33.33 0 01-.326-.334.33.33 0 01.326-.333c.087 0 .17.035.231.098a.337.337 0 01.096.236M13.36 12.666a.33.33 0 01-.326.333.33.33 0 01-.326-.334.33.33 0 01.326-.333c.086 0 .17.035.23.098a.337.337 0 01.096.236" })] })));
1722
1817
  };
1723
1818
 
1724
- var EyeHide = function (props) {
1725
- return (jsx(Icon, __assign({}, props, { children: jsx("path", { stroke: props.stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "M16 25.333c-1.123 0-2.247-.237-3.339-.66M16 25.333c4.66 0 9.32-4.044 11.843-8.709.209-.388.209-.859 0-1.247a20.174 20.174 0 00-2.404-3.482M6.667 25.333L25.333 6.667M13.031 18.969a4.2 4.2 0 015.94-5.94m3.754-3.754C20.663 7.679 18.331 6.667 16 6.667c-4.66 0-9.32 4.044-11.843 8.71-.209.388-.209.859 0 1.247 1.262 2.332 3.056 4.508 5.118 6.103" }) })));
1726
- };
1727
-
1728
- var EyeShow = function (props) {
1729
- return (jsxs(Icon, __assign({}, props, { children: [jsx("path", { fillRule: "evenodd", stroke: props.stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "M18.83 13.173a4.005 4.005 0 010 5.66 4.005 4.005 0 01-5.66 0 4.005 4.005 0 010-5.66 4 4 0 015.66 0z", clipRule: "evenodd" }), jsx("path", { fillRule: "evenodd", stroke: props.stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "M4 16c0-.879.203-1.748.595-2.55C6.615 9.322 11.079 6.668 16 6.668c4.921 0 9.385 2.654 11.405 6.784.392.801.595 1.67.595 2.549s-.203 1.748-.595 2.55c-2.02 4.129-6.484 6.783-11.405 6.783-4.921 0-9.385-2.654-11.405-6.784A5.795 5.795 0 014 16z", clipRule: "evenodd" })] })));
1730
- };
1731
-
1732
1819
  var Fingerprint = function (_a) {
1733
1820
  var _b = _a.width, width = _b === void 0 ? '32px' : _b, _c = _a.height, height = _c === void 0 ? '32px' : _c, _d = _a.viewBox, viewBox = _d === void 0 ? '0 0 32 32' : _d, _e = _a.stroke, stroke = _e === void 0 ? 'currentColor' : _e, _f = _a.fill, fill = _f === void 0 ? 'none' : _f;
1734
1821
  return (jsxs(Icon, { width: width, height: height, viewBox: viewBox, fill: fill, children: [jsx("path", { stroke: stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "M10.272 23.728l.452-.452A3.22 3.22 0 0113 22.333v0c.854 0 1.672.34 2.276.943l.452.452A4.342 4.342 0 0018.798 25h.526a4.343 4.343 0 004.343-4.343v0a4.343 4.343 0 00-1.934-3.613v0a10.638 10.638 0 01-3.31-3.527l-1.226-2.122A4.793 4.793 0 0013.047 9v0a4.793 4.793 0 00-4.11 2.327l-1.373 2.288a10.637 10.637 0 01-3.22 3.378l-.077.051a4.343 4.343 0 00-1.934 3.613v0A4.343 4.343 0 006.676 25H7.2a4.343 4.343 0 003.07-1.272v0z", clipRule: "evenodd" }), jsx("circle", { cx: "3", cy: "9.667", r: "2", stroke: stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }), jsx("circle", { cx: "23", cy: "9.667", r: "2", stroke: stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }), jsx("ellipse", { cx: "8.714", cy: "3", stroke: stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", rx: "2", ry: "2" }), jsx("circle", { cx: "17.286", cy: "3", r: "2", stroke: stroke, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" })] }));
@@ -21931,5 +22018,5 @@ var lottie$1 = /*#__PURE__*/_mergeNamespaces({
21931
22018
  default: lottie
21932
22019
  }, [lottieExports]);
21933
22020
 
21934
- export { Accordion, AccordionControl, AccordionItem, AccordionPanel, ActionIcon, Alert, Animation, Arrow, Attachment, Autocomplete, AvatarPlaceholder, Badge, Bell, Button, Calendar, Card, CardStatus, Cat, Checkbox, Chevron, Clock, Close, Cloud, DateInput, Delete, Document, Dog, Dropdown, EnterCodeInput, EyeHide, EyeShow, FileInput, FileUpload, Fingerprint, Google, Grid, HappyFace, House, HouseTime, Identification, IncrementNumber, Info, Input, Link, LinkModal, Loader, Location, Mail, Menu, MenuTouched, Message, Modal, Multiselect, NavBar, Notification, Open, Pagination, Pets, Phone, Plaid, Plus, RadioButton, Remove, Search, SegmentedControl, Select, StatusBadge, Table, Tabs, Text, Textarea, ThreeDots, ThumbsDown, Tick, ToastContainer, Tooltip, Umbrello, Upload, Visa, Warning, World, badgeVariantMap, cardStatusVariantMap };
22021
+ export { Accordion, AccordionControl, AccordionItem, AccordionPanel, ActionIcon, Alert, Animation, Arrow, Attachment, Autocomplete, AvatarPlaceholder, Badge, Bell, Button, Calendar, Card, CardStatus, Cat, Checkbox, Chevron, Clock, Close, Cloud, DateInput, Delete, Document, Dog, Dropdown, EnterCodeInput, EyeHide, EyeShow, FileInput, FileUpload, Fingerprint, Google, Grid, HappyFace, House, HouseTime, Identification, IncrementNumber, Info, Input, Link, LinkModal, Loader, Location, Mail, Menu, MenuTouched, Message, Modal, Multiselect, NavBar, Notification, Open, Pagination, PasswordInput, Pets, Phone, Plaid, Plus, RadioButton, Remove, Search, SegmentedControl, Select, StatusBadge, Table, Tabs, Text, Textarea, ThreeDots, ThumbsDown, Tick, ToastContainer, Tooltip, Umbrello, Upload, Visa, Warning, World, badgeVariantMap, capitalizeFirstSentenceLetter, cardStatusVariantMap };
21935
22022
  //# sourceMappingURL=index.esm.js.map