analytica-frontend-lib 1.0.79 → 1.0.81
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 +166 -0
- package/dist/Accordation/index.js.map +1 -1
- package/dist/Accordation/index.mjs +166 -0
- package/dist/Accordation/index.mjs.map +1 -1
- package/dist/Alternative/index.js +6 -0
- package/dist/Alternative/index.js.map +1 -1
- package/dist/Alternative/index.mjs +6 -0
- package/dist/Alternative/index.mjs.map +1 -1
- package/dist/Badge/index.d.mts +1 -1
- package/dist/Badge/index.d.ts +1 -1
- package/dist/Badge/index.js +6 -0
- package/dist/Badge/index.js.map +1 -1
- package/dist/Badge/index.mjs +6 -0
- package/dist/Badge/index.mjs.map +1 -1
- package/dist/Card/index.d.mts +19 -1
- package/dist/Card/index.d.ts +19 -1
- package/dist/Card/index.js +168 -0
- package/dist/Card/index.js.map +1 -1
- package/dist/Card/index.mjs +167 -0
- package/dist/Card/index.mjs.map +1 -1
- package/dist/index.css +38 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +168 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +167 -0
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +38 -0
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
package/dist/Badge/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/Badge/Badge.tsx"],"sourcesContent":["import { ReactNode, HTMLAttributes } from 'react';\nimport { Bell } from 'phosphor-react';\n\n/**\n * Lookup table for variant and action class combinations\n */\nconst VARIANT_ACTION_CLASSES = {\n solid: {\n error: 'bg-error-background text-error-700 focus-visible:outline-none',\n warning: 'bg-warning text-warning-800 focus-visible:outline-none',\n success: 'bg-success text-success-800 focus-visible:outline-none',\n info: 'bg-info text-info-800 focus-visible:outline-none',\n muted: 'bg-background-muted text-background-800 focus-visible:outline-none',\n },\n outlined: {\n error:\n 'bg-error text-error-700 border border-error-300 focus-visible:outline-none',\n warning:\n 'bg-warning text-warning-800 border border-warning-300 focus-visible:outline-none',\n success:\n 'bg-success text-success-800 border border-success-300 focus-visible:outline-none',\n info: 'bg-info text-info-800 border border-info-300 focus-visible:outline-none',\n muted:\n 'bg-background-muted text-background-800 border border-border-300 focus-visible:outline-none',\n },\n exams: {\n exam1: 'bg-exam-1 text-info-700 focus-visible:outline-none',\n exam2: 'bg-exam-2 text-typography-1 focus-visible:outline-none',\n exam3: 'bg-exam-3 text-typography-2 focus-visible:outline-none',\n exam4: 'bg-exam-4 text-success-700 focus-visible:outline-none',\n },\n resultStatus: {\n negative: 'bg-error text-error-800 focus-visible:outline-none',\n positive: 'bg-success text-success-800 focus-visible:outline-none',\n },\n notification: 'text-primary',\n} as const;\n\n/**\n * Lookup table for size classes\n */\nconst SIZE_CLASSES = {\n small: 'text-2xs px-2 py-1',\n medium: 'text-xs px-2 py-1',\n large: 'text-sm px-2 py-1',\n} as const;\n\nconst SIZE_CLASSES_ICON = {\n small: 'size-3',\n medium: 'size-3.5',\n large: 'size-4',\n} as const;\n\n/**\n * Badge component props interface\n */\ntype BadgeProps = {\n /** Content to be displayed inside the badge */\n children?: ReactNode;\n /** Ícone à direita do texto */\n iconRight?: ReactNode;\n /** Ícone à esquerda do texto */\n iconLeft?: ReactNode;\n /** Size of the badge */\n size?: 'small' | 'medium' | 'large';\n /** Visual variant of the badge */\n variant
|
|
1
|
+
{"version":3,"sources":["../../src/components/Badge/Badge.tsx"],"sourcesContent":["import { ReactNode, HTMLAttributes } from 'react';\nimport { Bell } from 'phosphor-react';\n\n/**\n * Lookup table for variant and action class combinations\n */\nconst VARIANT_ACTION_CLASSES = {\n solid: {\n error: 'bg-error-background text-error-700 focus-visible:outline-none',\n warning: 'bg-warning text-warning-800 focus-visible:outline-none',\n success: 'bg-success text-success-800 focus-visible:outline-none',\n info: 'bg-info text-info-800 focus-visible:outline-none',\n muted: 'bg-background-muted text-background-800 focus-visible:outline-none',\n },\n outlined: {\n error:\n 'bg-error text-error-700 border border-error-300 focus-visible:outline-none',\n warning:\n 'bg-warning text-warning-800 border border-warning-300 focus-visible:outline-none',\n success:\n 'bg-success text-success-800 border border-success-300 focus-visible:outline-none',\n info: 'bg-info text-info-800 border border-info-300 focus-visible:outline-none',\n muted:\n 'bg-background-muted text-background-800 border border-border-300 focus-visible:outline-none',\n },\n exams: {\n exam1: 'bg-exam-1 text-info-700 focus-visible:outline-none',\n exam2: 'bg-exam-2 text-typography-1 focus-visible:outline-none',\n exam3: 'bg-exam-3 text-typography-2 focus-visible:outline-none',\n exam4: 'bg-exam-4 text-success-700 focus-visible:outline-none',\n },\n examsOutlined: {\n exam1:\n 'bg-exam-1 text-info-700 border border-info-700 focus-visible:outline-none',\n exam2:\n 'bg-exam-2 text-typography-1 border border-typography-1 focus-visible:outline-none',\n exam3:\n 'bg-exam-3 text-typography-2 border border-typography-2 focus-visible:outline-none',\n exam4:\n 'bg-exam-4 text-success-700 border border-success-700 focus-visible:outline-none',\n },\n resultStatus: {\n negative: 'bg-error text-error-800 focus-visible:outline-none',\n positive: 'bg-success text-success-800 focus-visible:outline-none',\n },\n notification: 'text-primary',\n} as const;\n\n/**\n * Lookup table for size classes\n */\nconst SIZE_CLASSES = {\n small: 'text-2xs px-2 py-1',\n medium: 'text-xs px-2 py-1',\n large: 'text-sm px-2 py-1',\n} as const;\n\nconst SIZE_CLASSES_ICON = {\n small: 'size-3',\n medium: 'size-3.5',\n large: 'size-4',\n} as const;\n\n/**\n * Badge component props interface\n */\ntype BadgeProps = {\n /** Content to be displayed inside the badge */\n children?: ReactNode;\n /** Ícone à direita do texto */\n iconRight?: ReactNode;\n /** Ícone à esquerda do texto */\n iconLeft?: ReactNode;\n /** Size of the badge */\n size?: 'small' | 'medium' | 'large';\n /** Visual variant of the badge */\n variant?:\n | 'solid'\n | 'outlined'\n | 'exams'\n | 'examsOutlined'\n | 'resultStatus'\n | 'notification';\n /** Action type of the badge */\n action?:\n | 'error'\n | 'warning'\n | 'success'\n | 'info'\n | 'muted'\n | 'exam1'\n | 'exam2'\n | 'exam3'\n | 'exam4'\n | 'positive'\n | 'negative';\n /** Additional CSS classes to apply */\n className?: string;\n notificationActive?: boolean;\n} & HTMLAttributes<HTMLDivElement>;\n\n/**\n * Badge component for Analytica Ensino platforms\n *\n * A flexible button component with multiple variants, sizes and actions.\n *\n * @param children - The content to display inside the badge\n * @param size - The size variant (extra-small, small, medium, large, extra-large)\n * @param variant - The visual style variant (solid, outline, link)\n * @param action - The action type (primary, positive, negative)\n * @param className - Additional CSS classes\n * @param props - All other standard div HTML attributes\n * @returns A styled badge element\n *\n * @example\n * ```tsx\n * <Badge variant=\"solid\" action=\"info\" size=\"medium\">\n * Information\n * </Badge>\n * ```\n */\nconst Badge = ({\n children,\n iconLeft,\n iconRight,\n size = 'medium',\n variant = 'solid',\n action = 'error',\n className = '',\n notificationActive = false,\n ...props\n}: BadgeProps) => {\n // Get classes from lookup tables\n const sizeClasses = SIZE_CLASSES[size];\n const sizeClassesIcon = SIZE_CLASSES_ICON[size];\n const variantActionMap = VARIANT_ACTION_CLASSES[variant] || {};\n const variantClasses =\n typeof variantActionMap === 'string'\n ? variantActionMap\n : ((variantActionMap as Record<string, string>)[action] ??\n (variantActionMap as Record<string, string>).muted ??\n '');\n\n const baseClasses =\n 'inline-flex items-center justify-center rounded-xs font-normal gap-1 relative';\n\n const baseClassesIcon = 'flex items-center';\n if (variant === 'notification') {\n return (\n <div\n className={`${baseClasses} ${variantClasses} ${sizeClasses} ${className}`}\n {...props}\n >\n <Bell size={24} className=\"text-current\" aria-hidden=\"true\" />\n\n {notificationActive && (\n <span\n data-testid=\"notification-dot\"\n className=\"absolute top-[5px] right-[10px] block h-2 w-2 rounded-full bg-indicator-error ring-2 ring-white\"\n />\n )}\n </div>\n );\n }\n return (\n <div\n className={`${baseClasses} ${variantClasses} ${sizeClasses} ${className}`}\n {...props}\n >\n {iconLeft && (\n <span className={`${baseClassesIcon} ${sizeClassesIcon}`}>\n {iconLeft}\n </span>\n )}\n {children}\n {iconRight && (\n <span className={`${baseClassesIcon} ${sizeClassesIcon}`}>\n {iconRight}\n </span>\n )}\n </div>\n );\n};\n\nexport default Badge;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,4BAAqB;AAoJf;AA/IN,IAAM,yBAAyB;AAAA,EAC7B,OAAO;AAAA,IACL,OAAO;AAAA,IACP,SAAS;AAAA,IACT,SAAS;AAAA,IACT,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AAAA,EACA,UAAU;AAAA,IACR,OACE;AAAA,IACF,SACE;AAAA,IACF,SACE;AAAA,IACF,MAAM;AAAA,IACN,OACE;AAAA,EACJ;AAAA,EACA,OAAO;AAAA,IACL,OAAO;AAAA,IACP,OAAO;AAAA,IACP,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA,eAAe;AAAA,IACb,OACE;AAAA,IACF,OACE;AAAA,IACF,OACE;AAAA,IACF,OACE;AAAA,EACJ;AAAA,EACA,cAAc;AAAA,IACZ,UAAU;AAAA,IACV,UAAU;AAAA,EACZ;AAAA,EACA,cAAc;AAChB;AAKA,IAAM,eAAe;AAAA,EACnB,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AACT;AAEA,IAAM,oBAAoB;AAAA,EACxB,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AACT;AA4DA,IAAM,QAAQ,CAAC;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,UAAU;AAAA,EACV,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,qBAAqB;AAAA,EACrB,GAAG;AACL,MAAkB;AAEhB,QAAM,cAAc,aAAa,IAAI;AACrC,QAAM,kBAAkB,kBAAkB,IAAI;AAC9C,QAAM,mBAAmB,uBAAuB,OAAO,KAAK,CAAC;AAC7D,QAAM,iBACJ,OAAO,qBAAqB,WACxB,mBACE,iBAA4C,MAAM,KACnD,iBAA4C,SAC7C;AAEN,QAAM,cACJ;AAEF,QAAM,kBAAkB;AACxB,MAAI,YAAY,gBAAgB;AAC9B,WACE;AAAA,MAAC;AAAA;AAAA,QACC,WAAW,GAAG,WAAW,IAAI,cAAc,IAAI,WAAW,IAAI,SAAS;AAAA,QACtE,GAAG;AAAA,QAEJ;AAAA,sDAAC,8BAAK,MAAM,IAAI,WAAU,gBAAe,eAAY,QAAO;AAAA,UAE3D,sBACC;AAAA,YAAC;AAAA;AAAA,cACC,eAAY;AAAA,cACZ,WAAU;AAAA;AAAA,UACZ;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,GAAG,WAAW,IAAI,cAAc,IAAI,WAAW,IAAI,SAAS;AAAA,MACtE,GAAG;AAAA,MAEH;AAAA,oBACC,4CAAC,UAAK,WAAW,GAAG,eAAe,IAAI,eAAe,IACnD,oBACH;AAAA,QAED;AAAA,QACA,aACC,4CAAC,UAAK,WAAW,GAAG,eAAe,IAAI,eAAe,IACnD,qBACH;AAAA;AAAA;AAAA,EAEJ;AAEJ;AAEA,IAAO,gBAAQ;","names":[]}
|
package/dist/Badge/index.mjs
CHANGED
|
@@ -22,6 +22,12 @@ var VARIANT_ACTION_CLASSES = {
|
|
|
22
22
|
exam3: "bg-exam-3 text-typography-2 focus-visible:outline-none",
|
|
23
23
|
exam4: "bg-exam-4 text-success-700 focus-visible:outline-none"
|
|
24
24
|
},
|
|
25
|
+
examsOutlined: {
|
|
26
|
+
exam1: "bg-exam-1 text-info-700 border border-info-700 focus-visible:outline-none",
|
|
27
|
+
exam2: "bg-exam-2 text-typography-1 border border-typography-1 focus-visible:outline-none",
|
|
28
|
+
exam3: "bg-exam-3 text-typography-2 border border-typography-2 focus-visible:outline-none",
|
|
29
|
+
exam4: "bg-exam-4 text-success-700 border border-success-700 focus-visible:outline-none"
|
|
30
|
+
},
|
|
25
31
|
resultStatus: {
|
|
26
32
|
negative: "bg-error text-error-800 focus-visible:outline-none",
|
|
27
33
|
positive: "bg-success text-success-800 focus-visible:outline-none"
|
package/dist/Badge/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/Badge/Badge.tsx"],"sourcesContent":["import { ReactNode, HTMLAttributes } from 'react';\nimport { Bell } from 'phosphor-react';\n\n/**\n * Lookup table for variant and action class combinations\n */\nconst VARIANT_ACTION_CLASSES = {\n solid: {\n error: 'bg-error-background text-error-700 focus-visible:outline-none',\n warning: 'bg-warning text-warning-800 focus-visible:outline-none',\n success: 'bg-success text-success-800 focus-visible:outline-none',\n info: 'bg-info text-info-800 focus-visible:outline-none',\n muted: 'bg-background-muted text-background-800 focus-visible:outline-none',\n },\n outlined: {\n error:\n 'bg-error text-error-700 border border-error-300 focus-visible:outline-none',\n warning:\n 'bg-warning text-warning-800 border border-warning-300 focus-visible:outline-none',\n success:\n 'bg-success text-success-800 border border-success-300 focus-visible:outline-none',\n info: 'bg-info text-info-800 border border-info-300 focus-visible:outline-none',\n muted:\n 'bg-background-muted text-background-800 border border-border-300 focus-visible:outline-none',\n },\n exams: {\n exam1: 'bg-exam-1 text-info-700 focus-visible:outline-none',\n exam2: 'bg-exam-2 text-typography-1 focus-visible:outline-none',\n exam3: 'bg-exam-3 text-typography-2 focus-visible:outline-none',\n exam4: 'bg-exam-4 text-success-700 focus-visible:outline-none',\n },\n resultStatus: {\n negative: 'bg-error text-error-800 focus-visible:outline-none',\n positive: 'bg-success text-success-800 focus-visible:outline-none',\n },\n notification: 'text-primary',\n} as const;\n\n/**\n * Lookup table for size classes\n */\nconst SIZE_CLASSES = {\n small: 'text-2xs px-2 py-1',\n medium: 'text-xs px-2 py-1',\n large: 'text-sm px-2 py-1',\n} as const;\n\nconst SIZE_CLASSES_ICON = {\n small: 'size-3',\n medium: 'size-3.5',\n large: 'size-4',\n} as const;\n\n/**\n * Badge component props interface\n */\ntype BadgeProps = {\n /** Content to be displayed inside the badge */\n children?: ReactNode;\n /** Ícone à direita do texto */\n iconRight?: ReactNode;\n /** Ícone à esquerda do texto */\n iconLeft?: ReactNode;\n /** Size of the badge */\n size?: 'small' | 'medium' | 'large';\n /** Visual variant of the badge */\n variant
|
|
1
|
+
{"version":3,"sources":["../../src/components/Badge/Badge.tsx"],"sourcesContent":["import { ReactNode, HTMLAttributes } from 'react';\nimport { Bell } from 'phosphor-react';\n\n/**\n * Lookup table for variant and action class combinations\n */\nconst VARIANT_ACTION_CLASSES = {\n solid: {\n error: 'bg-error-background text-error-700 focus-visible:outline-none',\n warning: 'bg-warning text-warning-800 focus-visible:outline-none',\n success: 'bg-success text-success-800 focus-visible:outline-none',\n info: 'bg-info text-info-800 focus-visible:outline-none',\n muted: 'bg-background-muted text-background-800 focus-visible:outline-none',\n },\n outlined: {\n error:\n 'bg-error text-error-700 border border-error-300 focus-visible:outline-none',\n warning:\n 'bg-warning text-warning-800 border border-warning-300 focus-visible:outline-none',\n success:\n 'bg-success text-success-800 border border-success-300 focus-visible:outline-none',\n info: 'bg-info text-info-800 border border-info-300 focus-visible:outline-none',\n muted:\n 'bg-background-muted text-background-800 border border-border-300 focus-visible:outline-none',\n },\n exams: {\n exam1: 'bg-exam-1 text-info-700 focus-visible:outline-none',\n exam2: 'bg-exam-2 text-typography-1 focus-visible:outline-none',\n exam3: 'bg-exam-3 text-typography-2 focus-visible:outline-none',\n exam4: 'bg-exam-4 text-success-700 focus-visible:outline-none',\n },\n examsOutlined: {\n exam1:\n 'bg-exam-1 text-info-700 border border-info-700 focus-visible:outline-none',\n exam2:\n 'bg-exam-2 text-typography-1 border border-typography-1 focus-visible:outline-none',\n exam3:\n 'bg-exam-3 text-typography-2 border border-typography-2 focus-visible:outline-none',\n exam4:\n 'bg-exam-4 text-success-700 border border-success-700 focus-visible:outline-none',\n },\n resultStatus: {\n negative: 'bg-error text-error-800 focus-visible:outline-none',\n positive: 'bg-success text-success-800 focus-visible:outline-none',\n },\n notification: 'text-primary',\n} as const;\n\n/**\n * Lookup table for size classes\n */\nconst SIZE_CLASSES = {\n small: 'text-2xs px-2 py-1',\n medium: 'text-xs px-2 py-1',\n large: 'text-sm px-2 py-1',\n} as const;\n\nconst SIZE_CLASSES_ICON = {\n small: 'size-3',\n medium: 'size-3.5',\n large: 'size-4',\n} as const;\n\n/**\n * Badge component props interface\n */\ntype BadgeProps = {\n /** Content to be displayed inside the badge */\n children?: ReactNode;\n /** Ícone à direita do texto */\n iconRight?: ReactNode;\n /** Ícone à esquerda do texto */\n iconLeft?: ReactNode;\n /** Size of the badge */\n size?: 'small' | 'medium' | 'large';\n /** Visual variant of the badge */\n variant?:\n | 'solid'\n | 'outlined'\n | 'exams'\n | 'examsOutlined'\n | 'resultStatus'\n | 'notification';\n /** Action type of the badge */\n action?:\n | 'error'\n | 'warning'\n | 'success'\n | 'info'\n | 'muted'\n | 'exam1'\n | 'exam2'\n | 'exam3'\n | 'exam4'\n | 'positive'\n | 'negative';\n /** Additional CSS classes to apply */\n className?: string;\n notificationActive?: boolean;\n} & HTMLAttributes<HTMLDivElement>;\n\n/**\n * Badge component for Analytica Ensino platforms\n *\n * A flexible button component with multiple variants, sizes and actions.\n *\n * @param children - The content to display inside the badge\n * @param size - The size variant (extra-small, small, medium, large, extra-large)\n * @param variant - The visual style variant (solid, outline, link)\n * @param action - The action type (primary, positive, negative)\n * @param className - Additional CSS classes\n * @param props - All other standard div HTML attributes\n * @returns A styled badge element\n *\n * @example\n * ```tsx\n * <Badge variant=\"solid\" action=\"info\" size=\"medium\">\n * Information\n * </Badge>\n * ```\n */\nconst Badge = ({\n children,\n iconLeft,\n iconRight,\n size = 'medium',\n variant = 'solid',\n action = 'error',\n className = '',\n notificationActive = false,\n ...props\n}: BadgeProps) => {\n // Get classes from lookup tables\n const sizeClasses = SIZE_CLASSES[size];\n const sizeClassesIcon = SIZE_CLASSES_ICON[size];\n const variantActionMap = VARIANT_ACTION_CLASSES[variant] || {};\n const variantClasses =\n typeof variantActionMap === 'string'\n ? variantActionMap\n : ((variantActionMap as Record<string, string>)[action] ??\n (variantActionMap as Record<string, string>).muted ??\n '');\n\n const baseClasses =\n 'inline-flex items-center justify-center rounded-xs font-normal gap-1 relative';\n\n const baseClassesIcon = 'flex items-center';\n if (variant === 'notification') {\n return (\n <div\n className={`${baseClasses} ${variantClasses} ${sizeClasses} ${className}`}\n {...props}\n >\n <Bell size={24} className=\"text-current\" aria-hidden=\"true\" />\n\n {notificationActive && (\n <span\n data-testid=\"notification-dot\"\n className=\"absolute top-[5px] right-[10px] block h-2 w-2 rounded-full bg-indicator-error ring-2 ring-white\"\n />\n )}\n </div>\n );\n }\n return (\n <div\n className={`${baseClasses} ${variantClasses} ${sizeClasses} ${className}`}\n {...props}\n >\n {iconLeft && (\n <span className={`${baseClassesIcon} ${sizeClassesIcon}`}>\n {iconLeft}\n </span>\n )}\n {children}\n {iconRight && (\n <span className={`${baseClassesIcon} ${sizeClassesIcon}`}>\n {iconRight}\n </span>\n )}\n </div>\n );\n};\n\nexport default Badge;\n"],"mappings":";AACA,SAAS,YAAY;AAoJf,SAIE,KAJF;AA/IN,IAAM,yBAAyB;AAAA,EAC7B,OAAO;AAAA,IACL,OAAO;AAAA,IACP,SAAS;AAAA,IACT,SAAS;AAAA,IACT,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AAAA,EACA,UAAU;AAAA,IACR,OACE;AAAA,IACF,SACE;AAAA,IACF,SACE;AAAA,IACF,MAAM;AAAA,IACN,OACE;AAAA,EACJ;AAAA,EACA,OAAO;AAAA,IACL,OAAO;AAAA,IACP,OAAO;AAAA,IACP,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA,eAAe;AAAA,IACb,OACE;AAAA,IACF,OACE;AAAA,IACF,OACE;AAAA,IACF,OACE;AAAA,EACJ;AAAA,EACA,cAAc;AAAA,IACZ,UAAU;AAAA,IACV,UAAU;AAAA,EACZ;AAAA,EACA,cAAc;AAChB;AAKA,IAAM,eAAe;AAAA,EACnB,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AACT;AAEA,IAAM,oBAAoB;AAAA,EACxB,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AACT;AA4DA,IAAM,QAAQ,CAAC;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,UAAU;AAAA,EACV,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,qBAAqB;AAAA,EACrB,GAAG;AACL,MAAkB;AAEhB,QAAM,cAAc,aAAa,IAAI;AACrC,QAAM,kBAAkB,kBAAkB,IAAI;AAC9C,QAAM,mBAAmB,uBAAuB,OAAO,KAAK,CAAC;AAC7D,QAAM,iBACJ,OAAO,qBAAqB,WACxB,mBACE,iBAA4C,MAAM,KACnD,iBAA4C,SAC7C;AAEN,QAAM,cACJ;AAEF,QAAM,kBAAkB;AACxB,MAAI,YAAY,gBAAgB;AAC9B,WACE;AAAA,MAAC;AAAA;AAAA,QACC,WAAW,GAAG,WAAW,IAAI,cAAc,IAAI,WAAW,IAAI,SAAS;AAAA,QACtE,GAAG;AAAA,QAEJ;AAAA,8BAAC,QAAK,MAAM,IAAI,WAAU,gBAAe,eAAY,QAAO;AAAA,UAE3D,sBACC;AAAA,YAAC;AAAA;AAAA,cACC,eAAY;AAAA,cACZ,WAAU;AAAA;AAAA,UACZ;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,GAAG,WAAW,IAAI,cAAc,IAAI,WAAW,IAAI,SAAS;AAAA,MACtE,GAAG;AAAA,MAEH;AAAA,oBACC,oBAAC,UAAK,WAAW,GAAG,eAAe,IAAI,eAAe,IACnD,oBACH;AAAA,QAED;AAAA,QACA,aACC,oBAAC,UAAK,WAAW,GAAG,eAAe,IAAI,eAAe,IACnD,qBACH;AAAA;AAAA;AAAA,EAEJ;AAEJ;AAEA,IAAO,gBAAQ;","names":[]}
|
package/dist/Card/index.d.mts
CHANGED
|
@@ -131,5 +131,23 @@ interface CardTestProps extends Omit<HTMLAttributes<HTMLElement>, 'onSelect'> {
|
|
|
131
131
|
onSelect?: (selected: boolean) => void;
|
|
132
132
|
}
|
|
133
133
|
declare const CardTest: react.ForwardRefExoticComponent<CardTestProps & react.RefAttributes<HTMLElement>>;
|
|
134
|
+
interface SimulationItem {
|
|
135
|
+
id: string;
|
|
136
|
+
title: string;
|
|
137
|
+
type: 'enem' | 'prova' | 'simulado' | 'vestibular';
|
|
138
|
+
info: string;
|
|
139
|
+
}
|
|
140
|
+
interface SimulationHistoryData {
|
|
141
|
+
date: string;
|
|
142
|
+
simulations: SimulationItem[];
|
|
143
|
+
}
|
|
144
|
+
interface CardSimulationHistoryProps extends HTMLAttributes<HTMLDivElement> {
|
|
145
|
+
title?: string;
|
|
146
|
+
activeTab?: 'create' | 'history';
|
|
147
|
+
data: SimulationHistoryData[];
|
|
148
|
+
onTabChange?: (tab: 'create' | 'history') => void;
|
|
149
|
+
onSimulationClick?: (simulation: SimulationItem) => void;
|
|
150
|
+
}
|
|
151
|
+
declare const CardSimulationHistory: react.ForwardRefExoticComponent<CardSimulationHistoryProps & react.RefAttributes<HTMLDivElement>>;
|
|
134
152
|
|
|
135
|
-
export { CardActivitiesResults, CardAudio, CardBase, CardForum, CardPerformance, CardProgress, CardQuestions, CardResults, CardSettings, CardSimulado, CardStatus, CardSupport, CardTest, CardTopic };
|
|
153
|
+
export { CardActivitiesResults, CardAudio, CardBase, CardForum, CardPerformance, CardProgress, CardQuestions, CardResults, CardSettings, CardSimulado, CardSimulationHistory, CardStatus, CardSupport, CardTest, CardTopic };
|
package/dist/Card/index.d.ts
CHANGED
|
@@ -131,5 +131,23 @@ interface CardTestProps extends Omit<HTMLAttributes<HTMLElement>, 'onSelect'> {
|
|
|
131
131
|
onSelect?: (selected: boolean) => void;
|
|
132
132
|
}
|
|
133
133
|
declare const CardTest: react.ForwardRefExoticComponent<CardTestProps & react.RefAttributes<HTMLElement>>;
|
|
134
|
+
interface SimulationItem {
|
|
135
|
+
id: string;
|
|
136
|
+
title: string;
|
|
137
|
+
type: 'enem' | 'prova' | 'simulado' | 'vestibular';
|
|
138
|
+
info: string;
|
|
139
|
+
}
|
|
140
|
+
interface SimulationHistoryData {
|
|
141
|
+
date: string;
|
|
142
|
+
simulations: SimulationItem[];
|
|
143
|
+
}
|
|
144
|
+
interface CardSimulationHistoryProps extends HTMLAttributes<HTMLDivElement> {
|
|
145
|
+
title?: string;
|
|
146
|
+
activeTab?: 'create' | 'history';
|
|
147
|
+
data: SimulationHistoryData[];
|
|
148
|
+
onTabChange?: (tab: 'create' | 'history') => void;
|
|
149
|
+
onSimulationClick?: (simulation: SimulationItem) => void;
|
|
150
|
+
}
|
|
151
|
+
declare const CardSimulationHistory: react.ForwardRefExoticComponent<CardSimulationHistoryProps & react.RefAttributes<HTMLDivElement>>;
|
|
134
152
|
|
|
135
|
-
export { CardActivitiesResults, CardAudio, CardBase, CardForum, CardPerformance, CardProgress, CardQuestions, CardResults, CardSettings, CardSimulado, CardStatus, CardSupport, CardTest, CardTopic };
|
|
153
|
+
export { CardActivitiesResults, CardAudio, CardBase, CardForum, CardPerformance, CardProgress, CardQuestions, CardResults, CardSettings, CardSimulado, CardSimulationHistory, CardStatus, CardSupport, CardTest, CardTopic };
|
package/dist/Card/index.js
CHANGED
|
@@ -30,6 +30,7 @@ __export(Card_exports, {
|
|
|
30
30
|
CardResults: () => CardResults,
|
|
31
31
|
CardSettings: () => CardSettings,
|
|
32
32
|
CardSimulado: () => CardSimulado,
|
|
33
|
+
CardSimulationHistory: () => CardSimulationHistory,
|
|
33
34
|
CardStatus: () => CardStatus,
|
|
34
35
|
CardSupport: () => CardSupport,
|
|
35
36
|
CardTest: () => CardTest,
|
|
@@ -120,6 +121,12 @@ var VARIANT_ACTION_CLASSES2 = {
|
|
|
120
121
|
exam3: "bg-exam-3 text-typography-2 focus-visible:outline-none",
|
|
121
122
|
exam4: "bg-exam-4 text-success-700 focus-visible:outline-none"
|
|
122
123
|
},
|
|
124
|
+
examsOutlined: {
|
|
125
|
+
exam1: "bg-exam-1 text-info-700 border border-info-700 focus-visible:outline-none",
|
|
126
|
+
exam2: "bg-exam-2 text-typography-1 border border-typography-1 focus-visible:outline-none",
|
|
127
|
+
exam3: "bg-exam-3 text-typography-2 border border-typography-2 focus-visible:outline-none",
|
|
128
|
+
exam4: "bg-exam-4 text-success-700 border border-success-700 focus-visible:outline-none"
|
|
129
|
+
},
|
|
123
130
|
resultStatus: {
|
|
124
131
|
negative: "bg-error text-error-800 focus-visible:outline-none",
|
|
125
132
|
positive: "bg-success text-success-800 focus-visible:outline-none"
|
|
@@ -1713,6 +1720,166 @@ var CardTest = (0, import_react.forwardRef)(
|
|
|
1713
1720
|
);
|
|
1714
1721
|
}
|
|
1715
1722
|
);
|
|
1723
|
+
var SIMULATION_TYPE_STYLES = {
|
|
1724
|
+
enem: {
|
|
1725
|
+
background: "bg-exam-1",
|
|
1726
|
+
badge: "exam1",
|
|
1727
|
+
text: "Enem"
|
|
1728
|
+
},
|
|
1729
|
+
prova: {
|
|
1730
|
+
background: "bg-exam-2",
|
|
1731
|
+
badge: "exam2",
|
|
1732
|
+
text: "Prova"
|
|
1733
|
+
},
|
|
1734
|
+
simulado: {
|
|
1735
|
+
background: "bg-exam-3",
|
|
1736
|
+
badge: "exam3",
|
|
1737
|
+
text: "Simulado"
|
|
1738
|
+
},
|
|
1739
|
+
vestibular: {
|
|
1740
|
+
background: "bg-exam-4",
|
|
1741
|
+
badge: "exam4",
|
|
1742
|
+
text: "Vestibular"
|
|
1743
|
+
}
|
|
1744
|
+
};
|
|
1745
|
+
var CardSimulationHistory = (0, import_react.forwardRef)(
|
|
1746
|
+
({
|
|
1747
|
+
title = "Simulados",
|
|
1748
|
+
activeTab = "history",
|
|
1749
|
+
data,
|
|
1750
|
+
onTabChange,
|
|
1751
|
+
onSimulationClick,
|
|
1752
|
+
className,
|
|
1753
|
+
...props
|
|
1754
|
+
}, ref) => {
|
|
1755
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
1756
|
+
"div",
|
|
1757
|
+
{
|
|
1758
|
+
ref,
|
|
1759
|
+
className: `w-full max-w-[992px] h-auto ${className}`,
|
|
1760
|
+
...props,
|
|
1761
|
+
children: [
|
|
1762
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-row items-end justify-between gap-4 mb-4", children: [
|
|
1763
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text_default, { size: "2xl", weight: "bold", className: "text-text-950 flex-1", children: title }),
|
|
1764
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-row gap-2", children: [
|
|
1765
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
1766
|
+
"button",
|
|
1767
|
+
{
|
|
1768
|
+
type: "button",
|
|
1769
|
+
onClick: () => onTabChange?.("create"),
|
|
1770
|
+
className: `
|
|
1771
|
+
flex flex-row justify-center items-center px-4 py-3 gap-2 rounded-md relative
|
|
1772
|
+
${activeTab === "create" ? "text-text-950" : "text-text-950 hover:bg-background-50"}
|
|
1773
|
+
`,
|
|
1774
|
+
children: [
|
|
1775
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text_default, { size: "xs", weight: "bold", className: "leading-4 tracking-wide", children: "Criar Simulado" }),
|
|
1776
|
+
activeTab === "create" && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "absolute bottom-0 left-2 right-2 h-1 bg-primary-950 rounded-lg" })
|
|
1777
|
+
]
|
|
1778
|
+
}
|
|
1779
|
+
),
|
|
1780
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
1781
|
+
"button",
|
|
1782
|
+
{
|
|
1783
|
+
type: "button",
|
|
1784
|
+
onClick: () => onTabChange?.("history"),
|
|
1785
|
+
className: `
|
|
1786
|
+
flex flex-row justify-center items-center px-4 py-3 gap-2 rounded-md relative
|
|
1787
|
+
${activeTab === "history" ? "text-text-950" : "text-text-950 hover:bg-background-50"}
|
|
1788
|
+
`,
|
|
1789
|
+
children: [
|
|
1790
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text_default, { size: "xs", weight: "bold", className: "leading-4 tracking-wide", children: "Hist\xF3rico" }),
|
|
1791
|
+
activeTab === "history" && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "absolute bottom-0 left-2 right-2 h-1 bg-primary-950 rounded-lg" })
|
|
1792
|
+
]
|
|
1793
|
+
}
|
|
1794
|
+
)
|
|
1795
|
+
] })
|
|
1796
|
+
] }),
|
|
1797
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-col gap-0", children: [
|
|
1798
|
+
data.map((section, sectionIndex) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
1799
|
+
"div",
|
|
1800
|
+
{
|
|
1801
|
+
className: `
|
|
1802
|
+
flex flex-row justify-center items-start px-4 py-6 gap-2 w-full bg-white
|
|
1803
|
+
${sectionIndex === 0 ? "rounded-t-3xl" : ""}
|
|
1804
|
+
`,
|
|
1805
|
+
children: [
|
|
1806
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1807
|
+
Text_default,
|
|
1808
|
+
{
|
|
1809
|
+
size: "xs",
|
|
1810
|
+
weight: "bold",
|
|
1811
|
+
className: "text-text-800 w-11 flex-shrink-0",
|
|
1812
|
+
children: section.date
|
|
1813
|
+
}
|
|
1814
|
+
),
|
|
1815
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex flex-col gap-2 flex-1", children: section.simulations.map((simulation) => {
|
|
1816
|
+
const typeStyles = SIMULATION_TYPE_STYLES[simulation.type];
|
|
1817
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1818
|
+
CardBase,
|
|
1819
|
+
{
|
|
1820
|
+
layout: "horizontal",
|
|
1821
|
+
padding: "medium",
|
|
1822
|
+
minHeight: "none",
|
|
1823
|
+
cursor: "pointer",
|
|
1824
|
+
className: `
|
|
1825
|
+
${typeStyles.background} rounded-xl hover:shadow-soft-shadow-2
|
|
1826
|
+
transition-shadow duration-200 h-auto min-h-[61px]
|
|
1827
|
+
`,
|
|
1828
|
+
onClick: () => onSimulationClick?.(simulation),
|
|
1829
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex justify-between items-center w-full gap-2", children: [
|
|
1830
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-col gap-2 flex-1 min-w-0", children: [
|
|
1831
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1832
|
+
Text_default,
|
|
1833
|
+
{
|
|
1834
|
+
size: "lg",
|
|
1835
|
+
weight: "bold",
|
|
1836
|
+
className: "text-text-950 truncate",
|
|
1837
|
+
children: simulation.title
|
|
1838
|
+
}
|
|
1839
|
+
),
|
|
1840
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1841
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1842
|
+
Badge_default,
|
|
1843
|
+
{
|
|
1844
|
+
variant: "examsOutlined",
|
|
1845
|
+
action: typeStyles.badge,
|
|
1846
|
+
size: "medium",
|
|
1847
|
+
children: typeStyles.text
|
|
1848
|
+
}
|
|
1849
|
+
),
|
|
1850
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1851
|
+
Text_default,
|
|
1852
|
+
{
|
|
1853
|
+
size: "sm",
|
|
1854
|
+
className: "text-text-800 truncate",
|
|
1855
|
+
children: simulation.info
|
|
1856
|
+
}
|
|
1857
|
+
)
|
|
1858
|
+
] })
|
|
1859
|
+
] }),
|
|
1860
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1861
|
+
import_phosphor_react2.CaretRight,
|
|
1862
|
+
{
|
|
1863
|
+
size: 24,
|
|
1864
|
+
className: "text-text-800 flex-shrink-0",
|
|
1865
|
+
"data-testid": "caret-icon"
|
|
1866
|
+
}
|
|
1867
|
+
)
|
|
1868
|
+
] })
|
|
1869
|
+
},
|
|
1870
|
+
simulation.id
|
|
1871
|
+
);
|
|
1872
|
+
}) })
|
|
1873
|
+
]
|
|
1874
|
+
}
|
|
1875
|
+
) }, section.date)),
|
|
1876
|
+
data.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "w-full h-6 bg-white rounded-b-3xl" })
|
|
1877
|
+
] })
|
|
1878
|
+
]
|
|
1879
|
+
}
|
|
1880
|
+
);
|
|
1881
|
+
}
|
|
1882
|
+
);
|
|
1716
1883
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1717
1884
|
0 && (module.exports = {
|
|
1718
1885
|
CardActivitiesResults,
|
|
@@ -1725,6 +1892,7 @@ var CardTest = (0, import_react.forwardRef)(
|
|
|
1725
1892
|
CardResults,
|
|
1726
1893
|
CardSettings,
|
|
1727
1894
|
CardSimulado,
|
|
1895
|
+
CardSimulationHistory,
|
|
1728
1896
|
CardStatus,
|
|
1729
1897
|
CardSupport,
|
|
1730
1898
|
CardTest,
|