analytica-frontend-lib 1.0.30 → 1.0.31
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.css +15 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +32 -4
- package/dist/index.d.ts +32 -4
- package/dist/index.js +46 -21
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +40 -16
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +15 -0
- package/dist/styles.css.map +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -24,6 +24,7 @@ __export(src_exports, {
|
|
|
24
24
|
Badge: () => Badge_default,
|
|
25
25
|
Button: () => Button_default,
|
|
26
26
|
CheckBox: () => CheckBox_default,
|
|
27
|
+
Divider: () => Divider_default,
|
|
27
28
|
DropdownMenu: () => DropdownMenu_default,
|
|
28
29
|
DropdownMenuContent: () => MenuContent,
|
|
29
30
|
DropdownMenuItem: () => MenuItem,
|
|
@@ -1051,10 +1052,33 @@ var Toaster = () => {
|
|
|
1051
1052
|
};
|
|
1052
1053
|
var Toaster_default = Toaster;
|
|
1053
1054
|
|
|
1055
|
+
// src/components/Divider/Divider.tsx
|
|
1056
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1057
|
+
var Divider = ({
|
|
1058
|
+
orientation = "horizontal",
|
|
1059
|
+
className = "",
|
|
1060
|
+
...props
|
|
1061
|
+
}) => {
|
|
1062
|
+
const baseClasses = "bg-border-200 border-0";
|
|
1063
|
+
const orientationClasses = {
|
|
1064
|
+
horizontal: "w-full h-px",
|
|
1065
|
+
vertical: "h-full w-px"
|
|
1066
|
+
};
|
|
1067
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1068
|
+
"hr",
|
|
1069
|
+
{
|
|
1070
|
+
className: `${baseClasses} ${orientationClasses[orientation]} ${className}`,
|
|
1071
|
+
"aria-orientation": orientation,
|
|
1072
|
+
...props
|
|
1073
|
+
}
|
|
1074
|
+
);
|
|
1075
|
+
};
|
|
1076
|
+
var Divider_default = Divider;
|
|
1077
|
+
|
|
1054
1078
|
// src/components/Input/Input.tsx
|
|
1055
1079
|
var import_phosphor_react5 = require("phosphor-react");
|
|
1056
1080
|
var import_react7 = require("react");
|
|
1057
|
-
var
|
|
1081
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1058
1082
|
var SIZE_CLASSES5 = {
|
|
1059
1083
|
small: "text-sm",
|
|
1060
1084
|
medium: "text-md",
|
|
@@ -1093,7 +1117,7 @@ var getPasswordToggleConfig = (type, disabled, readOnly, showPassword, iconRight
|
|
|
1093
1117
|
let actualIconRight = iconRight;
|
|
1094
1118
|
let ariaLabel;
|
|
1095
1119
|
if (shouldShowPasswordToggle) {
|
|
1096
|
-
actualIconRight = showPassword ? /* @__PURE__ */ (0,
|
|
1120
|
+
actualIconRight = showPassword ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_phosphor_react5.EyeSlash, {}) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_phosphor_react5.Eye, {});
|
|
1097
1121
|
ariaLabel = showPassword ? "Ocultar senha" : "Mostrar senha";
|
|
1098
1122
|
}
|
|
1099
1123
|
return { shouldShowPasswordToggle, actualIconRight, ariaLabel };
|
|
@@ -1145,8 +1169,8 @@ var Input = (0, import_react7.forwardRef)(
|
|
|
1145
1169
|
showPassword,
|
|
1146
1170
|
iconRight
|
|
1147
1171
|
);
|
|
1148
|
-
return /* @__PURE__ */ (0,
|
|
1149
|
-
label && /* @__PURE__ */ (0,
|
|
1172
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: `${containerClassName}`, children: [
|
|
1173
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1150
1174
|
"label",
|
|
1151
1175
|
{
|
|
1152
1176
|
htmlFor: inputId,
|
|
@@ -1154,15 +1178,15 @@ var Input = (0, import_react7.forwardRef)(
|
|
|
1154
1178
|
children: label
|
|
1155
1179
|
}
|
|
1156
1180
|
),
|
|
1157
|
-
/* @__PURE__ */ (0,
|
|
1158
|
-
iconLeft && /* @__PURE__ */ (0,
|
|
1181
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "relative", children: [
|
|
1182
|
+
iconLeft && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "absolute left-3 top-1/2 transform -translate-y-1/2 pointer-events-none", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1159
1183
|
"span",
|
|
1160
1184
|
{
|
|
1161
1185
|
className: `${iconSize} text-text-400 flex items-center justify-center`,
|
|
1162
1186
|
children: iconLeft
|
|
1163
1187
|
}
|
|
1164
1188
|
) }),
|
|
1165
|
-
/* @__PURE__ */ (0,
|
|
1189
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1166
1190
|
"input",
|
|
1167
1191
|
{
|
|
1168
1192
|
ref,
|
|
@@ -1175,14 +1199,14 @@ var Input = (0, import_react7.forwardRef)(
|
|
|
1175
1199
|
...props
|
|
1176
1200
|
}
|
|
1177
1201
|
),
|
|
1178
|
-
actualIconRight && (shouldShowPasswordToggle ? /* @__PURE__ */ (0,
|
|
1202
|
+
actualIconRight && (shouldShowPasswordToggle ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1179
1203
|
"button",
|
|
1180
1204
|
{
|
|
1181
1205
|
type: "button",
|
|
1182
1206
|
className: "absolute right-3 top-1/2 transform -translate-y-1/2 cursor-pointer border-0 bg-transparent p-0",
|
|
1183
1207
|
onClick: togglePasswordVisibility,
|
|
1184
1208
|
"aria-label": ariaLabel,
|
|
1185
|
-
children: /* @__PURE__ */ (0,
|
|
1209
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1186
1210
|
"span",
|
|
1187
1211
|
{
|
|
1188
1212
|
className: `${iconSize} text-text-400 flex items-center justify-center hover:text-text-600 transition-colors`,
|
|
@@ -1190,7 +1214,7 @@ var Input = (0, import_react7.forwardRef)(
|
|
|
1190
1214
|
}
|
|
1191
1215
|
)
|
|
1192
1216
|
}
|
|
1193
|
-
) : /* @__PURE__ */ (0,
|
|
1217
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "absolute right-3 top-1/2 transform -translate-y-1/2 pointer-events-none", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1194
1218
|
"span",
|
|
1195
1219
|
{
|
|
1196
1220
|
className: `${iconSize} text-text-400 flex items-center justify-center`,
|
|
@@ -1198,10 +1222,10 @@ var Input = (0, import_react7.forwardRef)(
|
|
|
1198
1222
|
}
|
|
1199
1223
|
) }))
|
|
1200
1224
|
] }),
|
|
1201
|
-
/* @__PURE__ */ (0,
|
|
1202
|
-
helperText && /* @__PURE__ */ (0,
|
|
1203
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
1204
|
-
/* @__PURE__ */ (0,
|
|
1225
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "mt-1.5 gap-1.5", children: [
|
|
1226
|
+
helperText && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "text-sm text-text-500", children: helperText }),
|
|
1227
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { className: "flex gap-1 items-center text-sm text-indicator-error", children: [
|
|
1228
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_phosphor_react5.WarningCircle, { size: 16 }),
|
|
1205
1229
|
" ",
|
|
1206
1230
|
errorMessage
|
|
1207
1231
|
] })
|
|
@@ -1213,7 +1237,7 @@ var Input_default = Input;
|
|
|
1213
1237
|
|
|
1214
1238
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
1215
1239
|
var import_react8 = require("react");
|
|
1216
|
-
var
|
|
1240
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1217
1241
|
var DropdownMenuContext = (0, import_react8.createContext)(
|
|
1218
1242
|
void 0
|
|
1219
1243
|
);
|
|
@@ -1276,14 +1300,14 @@ var DropdownMenu = ({ children, open, onOpenChange }) => {
|
|
|
1276
1300
|
() => ({ open: currentOpen, setOpen }),
|
|
1277
1301
|
[currentOpen, setOpen]
|
|
1278
1302
|
);
|
|
1279
|
-
return /* @__PURE__ */ (0,
|
|
1303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DropdownMenuContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "relative", ref: menuRef, children }) });
|
|
1280
1304
|
};
|
|
1281
1305
|
var DropdownMenuTrigger = (0, import_react8.forwardRef)(({ className, children, onClick, ...props }, ref) => {
|
|
1282
1306
|
const context = (0, import_react8.useContext)(DropdownMenuContext);
|
|
1283
1307
|
if (!context)
|
|
1284
1308
|
throw new Error("DropdownMenuTrigger must be used within a DropdownMenu");
|
|
1285
1309
|
const { open, setOpen } = context;
|
|
1286
|
-
return /* @__PURE__ */ (0,
|
|
1310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1287
1311
|
"button",
|
|
1288
1312
|
{
|
|
1289
1313
|
ref,
|
|
@@ -1315,7 +1339,7 @@ var ALIGN_CLASSES = {
|
|
|
1315
1339
|
center: "left-1/2 -translate-x-1/2",
|
|
1316
1340
|
end: "right-0"
|
|
1317
1341
|
};
|
|
1318
|
-
var MenuLabel = (0, import_react8.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1342
|
+
var MenuLabel = (0, import_react8.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1319
1343
|
"fieldset",
|
|
1320
1344
|
{
|
|
1321
1345
|
ref,
|
|
@@ -1350,7 +1374,7 @@ var MenuContent = (0, import_react8.forwardRef)(
|
|
|
1350
1374
|
const horizontal = ALIGN_CLASSES[align];
|
|
1351
1375
|
return `absolute ${vertical} ${horizontal}`;
|
|
1352
1376
|
};
|
|
1353
|
-
return /* @__PURE__ */ (0,
|
|
1377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1354
1378
|
"div",
|
|
1355
1379
|
{
|
|
1356
1380
|
ref,
|
|
@@ -1395,7 +1419,7 @@ var MenuItem = (0, import_react8.forwardRef)(
|
|
|
1395
1419
|
}
|
|
1396
1420
|
onClick?.(e);
|
|
1397
1421
|
};
|
|
1398
|
-
return /* @__PURE__ */ (0,
|
|
1422
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1399
1423
|
"div",
|
|
1400
1424
|
{
|
|
1401
1425
|
ref,
|
|
@@ -1425,7 +1449,7 @@ var MenuItem = (0, import_react8.forwardRef)(
|
|
|
1425
1449
|
}
|
|
1426
1450
|
);
|
|
1427
1451
|
MenuItem.displayName = "MenuItem";
|
|
1428
|
-
var MenuSeparator = (0, import_react8.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1452
|
+
var MenuSeparator = (0, import_react8.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1429
1453
|
"div",
|
|
1430
1454
|
{
|
|
1431
1455
|
ref,
|
|
@@ -1441,6 +1465,7 @@ var DropdownMenu_default = DropdownMenu;
|
|
|
1441
1465
|
Badge,
|
|
1442
1466
|
Button,
|
|
1443
1467
|
CheckBox,
|
|
1468
|
+
Divider,
|
|
1444
1469
|
DropdownMenu,
|
|
1445
1470
|
DropdownMenuContent,
|
|
1446
1471
|
DropdownMenuItem,
|