@jars-labs/jars-components 1.0.3 → 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.
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';
@@ -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,CAAA;AACrC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,yBAAyB,CAAA;AACvC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,mCAAmC,CAAA;AACjD,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,uBAAuB,CAAA;AACrC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,yBAAyB,CAAA;AACvC,cAAc,2BAA2B,CAAA;AACzC,cAAc,qCAAqC,CAAA;AACnD,cAAc,iBAAiB,CAAA;AAC/B,cAAc,2BAA2B,CAAA;AACzC,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa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 
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
+
1168
1212
  const link = "mc234e3a09_link";
1169
1213
  const s = "mc234e3a09_s";
1170
1214
  const m$1 = "mc234e3a09_m";
@@ -1772,14 +1816,6 @@ var Dog = function (props) {
1772
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" })] })));
1773
1817
  };
1774
1818
 
1775
- var EyeHide = function (props) {
1776
- 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" }) })));
1777
- };
1778
-
1779
- var EyeShow = function (props) {
1780
- 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" })] })));
1781
- };
1782
-
1783
1819
  var Fingerprint = function (_a) {
1784
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;
1785
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" })] }));
@@ -21982,5 +22018,5 @@ var lottie$1 = /*#__PURE__*/_mergeNamespaces({
21982
22018
  default: lottie
21983
22019
  }, [lottieExports]);
21984
22020
 
21985
- 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, capitalizeFirstSentenceLetter, 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 };
21986
22022
  //# sourceMappingURL=index.esm.js.map