analytica-frontend-lib 1.0.72 → 1.0.73
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/Accordation/index.js +119 -0
- package/dist/Accordation/index.js.map +1 -1
- package/dist/Accordation/index.mjs +119 -0
- package/dist/Accordation/index.mjs.map +1 -1
- package/dist/Card/index.d.mts +10 -1
- package/dist/Card/index.d.ts +10 -1
- package/dist/Card/index.js +121 -0
- package/dist/Card/index.js.map +1 -1
- package/dist/Card/index.mjs +120 -0
- package/dist/Card/index.mjs.map +1 -1
- package/dist/index.css +48 -0
- package/dist/index.css.map +1 -1
- package/dist/index.js +119 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +119 -0
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +48 -0
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4090,6 +4090,125 @@ var CardSimulado = (0, import_react11.forwardRef)(
|
|
|
4090
4090
|
);
|
|
4091
4091
|
}
|
|
4092
4092
|
);
|
|
4093
|
+
var CardTest = (0, import_react11.forwardRef)(
|
|
4094
|
+
({
|
|
4095
|
+
title,
|
|
4096
|
+
duration,
|
|
4097
|
+
questionsCount,
|
|
4098
|
+
additionalInfo,
|
|
4099
|
+
selected = false,
|
|
4100
|
+
onSelect,
|
|
4101
|
+
className = "",
|
|
4102
|
+
...props
|
|
4103
|
+
}, ref) => {
|
|
4104
|
+
const handleClick = () => {
|
|
4105
|
+
if (onSelect) {
|
|
4106
|
+
onSelect(!selected);
|
|
4107
|
+
}
|
|
4108
|
+
};
|
|
4109
|
+
const handleKeyDown = (event) => {
|
|
4110
|
+
if ((event.key === "Enter" || event.key === " ") && onSelect) {
|
|
4111
|
+
event.preventDefault();
|
|
4112
|
+
onSelect(!selected);
|
|
4113
|
+
}
|
|
4114
|
+
};
|
|
4115
|
+
const isSelectable = !!onSelect;
|
|
4116
|
+
const getQuestionsText = (count) => {
|
|
4117
|
+
const singular = count === 1 ? "quest\xE3o" : "quest\xF5es";
|
|
4118
|
+
return `${count} ${singular}`;
|
|
4119
|
+
};
|
|
4120
|
+
const displayInfo = questionsCount ? getQuestionsText(questionsCount) : additionalInfo || "";
|
|
4121
|
+
const baseClasses = "flex flex-row items-center p-4 gap-2 w-full max-w-full bg-background shadow-soft-shadow-1 rounded-xl isolate border-0 text-left";
|
|
4122
|
+
const interactiveClasses = isSelectable ? "cursor-pointer focus:outline-none focus:ring-2 focus:ring-primary-950 focus:ring-offset-2" : "";
|
|
4123
|
+
const selectedClasses = selected ? "ring-2 ring-primary-950 ring-offset-2" : "";
|
|
4124
|
+
if (isSelectable) {
|
|
4125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4126
|
+
"button",
|
|
4127
|
+
{
|
|
4128
|
+
ref,
|
|
4129
|
+
type: "button",
|
|
4130
|
+
className: `${baseClasses} ${interactiveClasses} ${selectedClasses} ${className}`.trim(),
|
|
4131
|
+
onClick: handleClick,
|
|
4132
|
+
onKeyDown: handleKeyDown,
|
|
4133
|
+
"aria-pressed": selected,
|
|
4134
|
+
...props,
|
|
4135
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex flex-col justify-between gap-[27px] flex-grow min-h-[67px] w-full min-w-0", children: [
|
|
4136
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4137
|
+
Text_default,
|
|
4138
|
+
{
|
|
4139
|
+
size: "md",
|
|
4140
|
+
weight: "bold",
|
|
4141
|
+
className: "text-text-950 tracking-[0.2px] leading-[19px] truncate",
|
|
4142
|
+
children: title
|
|
4143
|
+
}
|
|
4144
|
+
),
|
|
4145
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex flex-row justify-start items-end gap-4 w-full", children: [
|
|
4146
|
+
duration && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex flex-row items-center gap-1 flex-shrink-0", children: [
|
|
4147
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_phosphor_react10.Clock, { size: 16, className: "text-text-700" }),
|
|
4148
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4149
|
+
Text_default,
|
|
4150
|
+
{
|
|
4151
|
+
size: "sm",
|
|
4152
|
+
className: "text-text-700 leading-[21px] whitespace-nowrap",
|
|
4153
|
+
children: duration
|
|
4154
|
+
}
|
|
4155
|
+
)
|
|
4156
|
+
] }),
|
|
4157
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4158
|
+
Text_default,
|
|
4159
|
+
{
|
|
4160
|
+
size: "sm",
|
|
4161
|
+
className: "text-text-700 leading-[21px] flex-grow truncate",
|
|
4162
|
+
children: displayInfo
|
|
4163
|
+
}
|
|
4164
|
+
)
|
|
4165
|
+
] })
|
|
4166
|
+
] })
|
|
4167
|
+
}
|
|
4168
|
+
);
|
|
4169
|
+
}
|
|
4170
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4171
|
+
"div",
|
|
4172
|
+
{
|
|
4173
|
+
ref,
|
|
4174
|
+
className: `${baseClasses} ${className}`.trim(),
|
|
4175
|
+
...props,
|
|
4176
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex flex-col justify-between gap-[27px] flex-grow min-h-[67px] w-full min-w-0", children: [
|
|
4177
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4178
|
+
Text_default,
|
|
4179
|
+
{
|
|
4180
|
+
size: "md",
|
|
4181
|
+
weight: "bold",
|
|
4182
|
+
className: "text-text-950 tracking-[0.2px] leading-[19px] truncate",
|
|
4183
|
+
children: title
|
|
4184
|
+
}
|
|
4185
|
+
),
|
|
4186
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex flex-row justify-start items-end gap-4 w-full", children: [
|
|
4187
|
+
duration && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex flex-row items-center gap-1 flex-shrink-0", children: [
|
|
4188
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_phosphor_react10.Clock, { size: 16, className: "text-text-700" }),
|
|
4189
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4190
|
+
Text_default,
|
|
4191
|
+
{
|
|
4192
|
+
size: "sm",
|
|
4193
|
+
className: "text-text-700 leading-[21px] whitespace-nowrap",
|
|
4194
|
+
children: duration
|
|
4195
|
+
}
|
|
4196
|
+
)
|
|
4197
|
+
] }),
|
|
4198
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4199
|
+
Text_default,
|
|
4200
|
+
{
|
|
4201
|
+
size: "sm",
|
|
4202
|
+
className: "text-text-700 leading-[21px] flex-grow truncate min-w-0",
|
|
4203
|
+
children: displayInfo
|
|
4204
|
+
}
|
|
4205
|
+
)
|
|
4206
|
+
] })
|
|
4207
|
+
] })
|
|
4208
|
+
}
|
|
4209
|
+
);
|
|
4210
|
+
}
|
|
4211
|
+
);
|
|
4093
4212
|
|
|
4094
4213
|
// src/components/Accordation/Accordation.tsx
|
|
4095
4214
|
var import_phosphor_react11 = require("phosphor-react");
|