analytica-frontend-lib 1.0.71 → 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 +41 -77
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +119 -160
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +119 -159
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +41 -77
- package/dist/styles.css.map +1 -1
- package/package.json +1 -2
- package/dist/Tab/index.d.mts +0 -37
- package/dist/Tab/index.d.ts +0 -37
- package/dist/Tab/index.js +0 -182
- package/dist/Tab/index.js.map +0 -1
- package/dist/Tab/index.mjs +0 -161
- package/dist/Tab/index.mjs.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "analytica-frontend-lib",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.73",
|
|
4
4
|
"description": "Repositório público dos componentes utilizados nas plataformas da Analytica Ensino",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -46,7 +46,6 @@
|
|
|
46
46
|
"./selection-button": "./dist/SelectionButton/index.js",
|
|
47
47
|
"./skeleton": "./dist/Skeleton/index.js",
|
|
48
48
|
"./stepper": "./dist/Stepper/index.js",
|
|
49
|
-
"./tab": "./dist/Tab/index.js",
|
|
50
49
|
"./table": "./dist/Table/index.js",
|
|
51
50
|
"./text": "./dist/Text/index.js",
|
|
52
51
|
"./text-area": "./dist/TextArea/index.js",
|
package/dist/Tab/index.d.mts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { HTMLAttributes } from 'react';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Individual tab item interface
|
|
6
|
-
*/
|
|
7
|
-
interface TabItem {
|
|
8
|
-
/** Unique identifier for the tab */
|
|
9
|
-
id: string;
|
|
10
|
-
/** Label text for the tab */
|
|
11
|
-
label: string;
|
|
12
|
-
/** Alternative label for mobile (optional) */
|
|
13
|
-
mobileLabel?: string;
|
|
14
|
-
/** Whether the tab is disabled */
|
|
15
|
-
disabled?: boolean;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Tab component props interface
|
|
19
|
-
*/
|
|
20
|
-
interface TabProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
21
|
-
/** Array of tab items */
|
|
22
|
-
tabs: TabItem[];
|
|
23
|
-
/** Currently active tab ID */
|
|
24
|
-
activeTab: string;
|
|
25
|
-
/** Callback when tab changes */
|
|
26
|
-
onTabChange: (tabId: string) => void;
|
|
27
|
-
/** Size variant of the tabs */
|
|
28
|
-
size?: 'small' | 'medium' | 'large';
|
|
29
|
-
/** Whether to enable responsive behavior */
|
|
30
|
-
responsive?: boolean;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Tab component following the established architecture patterns
|
|
34
|
-
*/
|
|
35
|
-
declare const Tab: react.ForwardRefExoticComponent<TabProps & react.RefAttributes<HTMLDivElement>>;
|
|
36
|
-
|
|
37
|
-
export { type TabItem, type TabProps, Tab as default };
|
package/dist/Tab/index.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { HTMLAttributes } from 'react';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Individual tab item interface
|
|
6
|
-
*/
|
|
7
|
-
interface TabItem {
|
|
8
|
-
/** Unique identifier for the tab */
|
|
9
|
-
id: string;
|
|
10
|
-
/** Label text for the tab */
|
|
11
|
-
label: string;
|
|
12
|
-
/** Alternative label for mobile (optional) */
|
|
13
|
-
mobileLabel?: string;
|
|
14
|
-
/** Whether the tab is disabled */
|
|
15
|
-
disabled?: boolean;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Tab component props interface
|
|
19
|
-
*/
|
|
20
|
-
interface TabProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
21
|
-
/** Array of tab items */
|
|
22
|
-
tabs: TabItem[];
|
|
23
|
-
/** Currently active tab ID */
|
|
24
|
-
activeTab: string;
|
|
25
|
-
/** Callback when tab changes */
|
|
26
|
-
onTabChange: (tabId: string) => void;
|
|
27
|
-
/** Size variant of the tabs */
|
|
28
|
-
size?: 'small' | 'medium' | 'large';
|
|
29
|
-
/** Whether to enable responsive behavior */
|
|
30
|
-
responsive?: boolean;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Tab component following the established architecture patterns
|
|
34
|
-
*/
|
|
35
|
-
declare const Tab: react.ForwardRefExoticComponent<TabProps & react.RefAttributes<HTMLDivElement>>;
|
|
36
|
-
|
|
37
|
-
export { type TabItem, type TabProps, Tab as default };
|
package/dist/Tab/index.js
DELETED
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/components/Tab/Tab.tsx
|
|
21
|
-
var Tab_exports = {};
|
|
22
|
-
__export(Tab_exports, {
|
|
23
|
-
default: () => Tab_default
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(Tab_exports);
|
|
26
|
-
var import_react = require("react");
|
|
27
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
28
|
-
var TAB_SIZE_CLASSES = {
|
|
29
|
-
small: {
|
|
30
|
-
container: "h-10 gap-1",
|
|
31
|
-
tab: "px-3 py-2 text-sm",
|
|
32
|
-
indicator: "h-0.5"
|
|
33
|
-
},
|
|
34
|
-
medium: {
|
|
35
|
-
container: "h-12 gap-2",
|
|
36
|
-
tab: "px-4 py-4 text-sm",
|
|
37
|
-
indicator: "h-1"
|
|
38
|
-
},
|
|
39
|
-
large: {
|
|
40
|
-
container: "h-14 gap-2",
|
|
41
|
-
tab: "px-6 py-4 text-base",
|
|
42
|
-
indicator: "h-1"
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
var RESPONSIVE_WIDTH_CLASSES = {
|
|
46
|
-
twoTabs: "w-[115px] sm:w-[204px]",
|
|
47
|
-
threeTabs: "w-[100px] sm:w-[160px]",
|
|
48
|
-
fourTabs: "w-[80px] sm:w-[140px]",
|
|
49
|
-
fiveTabs: "w-[70px] sm:w-[120px]",
|
|
50
|
-
default: "flex-1"
|
|
51
|
-
};
|
|
52
|
-
var Tab = (0, import_react.forwardRef)(
|
|
53
|
-
({
|
|
54
|
-
tabs,
|
|
55
|
-
activeTab,
|
|
56
|
-
onTabChange,
|
|
57
|
-
size = "medium",
|
|
58
|
-
responsive = true,
|
|
59
|
-
className = "",
|
|
60
|
-
...props
|
|
61
|
-
}, ref) => {
|
|
62
|
-
const sizeClasses = TAB_SIZE_CLASSES[size];
|
|
63
|
-
const getResponsiveWidthClass = (tabCount) => {
|
|
64
|
-
if (!responsive) return RESPONSIVE_WIDTH_CLASSES.default;
|
|
65
|
-
switch (tabCount) {
|
|
66
|
-
case 2:
|
|
67
|
-
return RESPONSIVE_WIDTH_CLASSES.twoTabs;
|
|
68
|
-
case 3:
|
|
69
|
-
return RESPONSIVE_WIDTH_CLASSES.threeTabs;
|
|
70
|
-
case 4:
|
|
71
|
-
return RESPONSIVE_WIDTH_CLASSES.fourTabs;
|
|
72
|
-
case 5:
|
|
73
|
-
return RESPONSIVE_WIDTH_CLASSES.fiveTabs;
|
|
74
|
-
default:
|
|
75
|
-
return RESPONSIVE_WIDTH_CLASSES.default;
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
const handleTabClick = (tabId) => {
|
|
79
|
-
const tab = tabs.find((t) => t.id === tabId);
|
|
80
|
-
if (tab && !tab.disabled) {
|
|
81
|
-
onTabChange(tabId);
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
const wrapAroundIndex = (index, maxLength) => {
|
|
85
|
-
if (index < 0) return maxLength - 1;
|
|
86
|
-
if (index >= maxLength) return 0;
|
|
87
|
-
return index;
|
|
88
|
-
};
|
|
89
|
-
const findNextValidTab = (startIndex, direction) => {
|
|
90
|
-
let nextIndex = wrapAroundIndex(startIndex + direction, tabs.length);
|
|
91
|
-
let attempts = 0;
|
|
92
|
-
while (tabs[nextIndex]?.disabled && attempts < tabs.length) {
|
|
93
|
-
nextIndex = wrapAroundIndex(nextIndex + direction, tabs.length);
|
|
94
|
-
attempts++;
|
|
95
|
-
}
|
|
96
|
-
return nextIndex;
|
|
97
|
-
};
|
|
98
|
-
const handleArrowNavigation = (direction) => {
|
|
99
|
-
const currentIndex = tabs.findIndex((tab) => tab.id === activeTab);
|
|
100
|
-
const nextIndex = findNextValidTab(currentIndex, direction);
|
|
101
|
-
if (!tabs[nextIndex]?.disabled && nextIndex !== currentIndex) {
|
|
102
|
-
handleTabClick(tabs[nextIndex].id);
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
const handleKeyDown = (event, tabId) => {
|
|
106
|
-
if (event.key === "Enter" || event.key === " ") {
|
|
107
|
-
event.preventDefault();
|
|
108
|
-
handleTabClick(tabId);
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
if (event.key === "ArrowLeft" || event.key === "ArrowRight") {
|
|
112
|
-
event.preventDefault();
|
|
113
|
-
const direction = event.key === "ArrowLeft" ? -1 : 1;
|
|
114
|
-
handleArrowNavigation(direction);
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
|
-
const getTabClassNames = (isDisabled, isActive) => {
|
|
118
|
-
if (isDisabled) {
|
|
119
|
-
return "text-text-400 cursor-not-allowed opacity-50";
|
|
120
|
-
}
|
|
121
|
-
if (isActive) {
|
|
122
|
-
return "text-text-950";
|
|
123
|
-
}
|
|
124
|
-
return "text-text-700 hover:text-text-800";
|
|
125
|
-
};
|
|
126
|
-
const tabWidthClass = getResponsiveWidthClass(tabs.length);
|
|
127
|
-
const containerWidth = responsive && tabs.length <= 2 ? "w-[240px] sm:w-[416px]" : "w-full";
|
|
128
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
129
|
-
"div",
|
|
130
|
-
{
|
|
131
|
-
ref,
|
|
132
|
-
className: `flex flex-row items-start ${sizeClasses.container} ${containerWidth} ${className}`,
|
|
133
|
-
role: "tablist",
|
|
134
|
-
...props,
|
|
135
|
-
children: tabs.map((tab) => {
|
|
136
|
-
const isActive = tab.id === activeTab;
|
|
137
|
-
const isDisabled = Boolean(tab.disabled);
|
|
138
|
-
const tabClassNames = getTabClassNames(isDisabled, isActive);
|
|
139
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
140
|
-
"button",
|
|
141
|
-
{
|
|
142
|
-
type: "button",
|
|
143
|
-
role: "tab",
|
|
144
|
-
"aria-selected": isActive,
|
|
145
|
-
"aria-disabled": isDisabled,
|
|
146
|
-
tabIndex: isActive ? 0 : -1,
|
|
147
|
-
className: `
|
|
148
|
-
relative flex flex-row justify-center items-center gap-2 rounded transition-colors isolate
|
|
149
|
-
${sizeClasses.tab}
|
|
150
|
-
${tabWidthClass}
|
|
151
|
-
${tabClassNames}
|
|
152
|
-
${!isDisabled && !isActive ? "hover:bg-background-50" : ""}
|
|
153
|
-
focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2
|
|
154
|
-
`,
|
|
155
|
-
onClick: () => handleTabClick(tab.id),
|
|
156
|
-
onKeyDown: (e) => handleKeyDown(e, tab.id),
|
|
157
|
-
disabled: isDisabled,
|
|
158
|
-
"data-testid": `tab-${tab.id}`,
|
|
159
|
-
children: [
|
|
160
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "font-bold leading-4 tracking-[0.2px] truncate", children: responsive && tab.mobileLabel ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
161
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sm:hidden", children: tab.mobileLabel }),
|
|
162
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "hidden sm:inline", children: tab.label })
|
|
163
|
-
] }) : tab.label }),
|
|
164
|
-
isActive && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
165
|
-
"div",
|
|
166
|
-
{
|
|
167
|
-
className: `absolute bottom-0 left-2 right-2 bg-primary-700 rounded-lg z-[2] ${sizeClasses.indicator}`,
|
|
168
|
-
"data-testid": "active-indicator"
|
|
169
|
-
}
|
|
170
|
-
)
|
|
171
|
-
]
|
|
172
|
-
},
|
|
173
|
-
tab.id
|
|
174
|
-
);
|
|
175
|
-
})
|
|
176
|
-
}
|
|
177
|
-
);
|
|
178
|
-
}
|
|
179
|
-
);
|
|
180
|
-
Tab.displayName = "Tab";
|
|
181
|
-
var Tab_default = Tab;
|
|
182
|
-
//# sourceMappingURL=index.js.map
|
package/dist/Tab/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/Tab/Tab.tsx"],"sourcesContent":["import { forwardRef, HTMLAttributes, KeyboardEvent } from 'react';\n\n/**\n * Individual tab item interface\n */\nexport interface TabItem {\n /** Unique identifier for the tab */\n id: string;\n /** Label text for the tab */\n label: string;\n /** Alternative label for mobile (optional) */\n mobileLabel?: string;\n /** Whether the tab is disabled */\n disabled?: boolean;\n}\n\n/**\n * Tab component props interface\n */\nexport interface TabProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {\n /** Array of tab items */\n tabs: TabItem[];\n /** Currently active tab ID */\n activeTab: string;\n /** Callback when tab changes */\n onTabChange: (tabId: string) => void;\n /** Size variant of the tabs */\n size?: 'small' | 'medium' | 'large';\n /** Whether to enable responsive behavior */\n responsive?: boolean;\n}\n\n/**\n * Size configuration lookup table\n */\nconst TAB_SIZE_CLASSES = {\n small: {\n container: 'h-10 gap-1',\n tab: 'px-3 py-2 text-sm',\n indicator: 'h-0.5',\n },\n medium: {\n container: 'h-12 gap-2',\n tab: 'px-4 py-4 text-sm',\n indicator: 'h-1',\n },\n large: {\n container: 'h-14 gap-2',\n tab: 'px-6 py-4 text-base',\n indicator: 'h-1',\n },\n} as const;\n\n/**\n * Responsive width classes for tabs\n */\nconst RESPONSIVE_WIDTH_CLASSES = {\n twoTabs: 'w-[115px] sm:w-[204px]',\n threeTabs: 'w-[100px] sm:w-[160px]',\n fourTabs: 'w-[80px] sm:w-[140px]',\n fiveTabs: 'w-[70px] sm:w-[120px]',\n default: 'flex-1',\n} as const;\n\n/**\n * Tab component following the established architecture patterns\n */\nconst Tab = forwardRef<HTMLDivElement, TabProps>(\n (\n {\n tabs,\n activeTab,\n onTabChange,\n size = 'medium',\n responsive = true,\n className = '',\n ...props\n },\n ref\n ) => {\n const sizeClasses = TAB_SIZE_CLASSES[size];\n\n /**\n * Get responsive width class based on number of tabs\n */\n const getResponsiveWidthClass = (tabCount: number): string => {\n if (!responsive) return RESPONSIVE_WIDTH_CLASSES.default;\n\n switch (tabCount) {\n case 2:\n return RESPONSIVE_WIDTH_CLASSES.twoTabs;\n case 3:\n return RESPONSIVE_WIDTH_CLASSES.threeTabs;\n case 4:\n return RESPONSIVE_WIDTH_CLASSES.fourTabs;\n case 5:\n return RESPONSIVE_WIDTH_CLASSES.fiveTabs;\n default:\n return RESPONSIVE_WIDTH_CLASSES.default;\n }\n };\n\n /**\n * Handle tab click\n */\n const handleTabClick = (tabId: string) => {\n const tab = tabs.find((t) => t.id === tabId);\n if (tab && !tab.disabled) {\n onTabChange(tabId);\n }\n };\n\n /**\n * Wrap index around array bounds\n */\n const wrapAroundIndex = (index: number, maxLength: number): number => {\n if (index < 0) return maxLength - 1;\n if (index >= maxLength) return 0;\n return index;\n };\n\n /**\n * Find next valid (non-disabled) tab index\n */\n const findNextValidTab = (\n startIndex: number,\n direction: number\n ): number => {\n let nextIndex = wrapAroundIndex(startIndex + direction, tabs.length);\n let attempts = 0;\n\n while (tabs[nextIndex]?.disabled && attempts < tabs.length) {\n nextIndex = wrapAroundIndex(nextIndex + direction, tabs.length);\n attempts++;\n }\n\n return nextIndex;\n };\n\n /**\n * Handle arrow key navigation\n */\n const handleArrowNavigation = (direction: number): void => {\n const currentIndex = tabs.findIndex((tab) => tab.id === activeTab);\n const nextIndex = findNextValidTab(currentIndex, direction);\n\n if (!tabs[nextIndex]?.disabled && nextIndex !== currentIndex) {\n handleTabClick(tabs[nextIndex].id);\n }\n };\n\n /**\n * Handle keyboard navigation\n */\n const handleKeyDown = (\n event: KeyboardEvent<HTMLButtonElement>,\n tabId: string\n ) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n handleTabClick(tabId);\n return;\n }\n\n if (event.key === 'ArrowLeft' || event.key === 'ArrowRight') {\n event.preventDefault();\n const direction = event.key === 'ArrowLeft' ? -1 : 1;\n handleArrowNavigation(direction);\n }\n };\n\n /**\n * Get tab text and interaction classes based on state\n */\n const getTabClassNames = (\n isDisabled: boolean,\n isActive: boolean\n ): string => {\n if (isDisabled) {\n return 'text-text-400 cursor-not-allowed opacity-50';\n }\n\n if (isActive) {\n return 'text-text-950';\n }\n\n return 'text-text-700 hover:text-text-800';\n };\n\n const tabWidthClass = getResponsiveWidthClass(tabs.length);\n const containerWidth =\n responsive && tabs.length <= 2 ? 'w-[240px] sm:w-[416px]' : 'w-full';\n\n return (\n <div\n ref={ref}\n className={`flex flex-row items-start ${sizeClasses.container} ${containerWidth} ${className}`}\n role=\"tablist\"\n {...props}\n >\n {tabs.map((tab) => {\n const isActive = tab.id === activeTab;\n const isDisabled = Boolean(tab.disabled);\n const tabClassNames = getTabClassNames(isDisabled, isActive);\n\n return (\n <button\n key={tab.id}\n type=\"button\"\n role=\"tab\"\n aria-selected={isActive}\n aria-disabled={isDisabled}\n tabIndex={isActive ? 0 : -1}\n className={`\n relative flex flex-row justify-center items-center gap-2 rounded transition-colors isolate\n ${sizeClasses.tab}\n ${tabWidthClass}\n ${tabClassNames}\n ${!isDisabled && !isActive ? 'hover:bg-background-50' : ''}\n focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2\n `}\n onClick={() => handleTabClick(tab.id)}\n onKeyDown={(e) => handleKeyDown(e, tab.id)}\n disabled={isDisabled}\n data-testid={`tab-${tab.id}`}\n >\n <span className=\"font-bold leading-4 tracking-[0.2px] truncate\">\n {responsive && tab.mobileLabel ? (\n <>\n <span className=\"sm:hidden\">{tab.mobileLabel}</span>\n <span className=\"hidden sm:inline\">{tab.label}</span>\n </>\n ) : (\n tab.label\n )}\n </span>\n {isActive && (\n <div\n className={`absolute bottom-0 left-2 right-2 bg-primary-700 rounded-lg z-[2] ${sizeClasses.indicator}`}\n data-testid=\"active-indicator\"\n />\n )}\n </button>\n );\n })}\n </div>\n );\n }\n);\n\nTab.displayName = 'Tab';\n\nexport default Tab;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA0D;AAqOxC;AAjMlB,IAAM,mBAAmB;AAAA,EACvB,OAAO;AAAA,IACL,WAAW;AAAA,IACX,KAAK;AAAA,IACL,WAAW;AAAA,EACb;AAAA,EACA,QAAQ;AAAA,IACN,WAAW;AAAA,IACX,KAAK;AAAA,IACL,WAAW;AAAA,EACb;AAAA,EACA,OAAO;AAAA,IACL,WAAW;AAAA,IACX,KAAK;AAAA,IACL,WAAW;AAAA,EACb;AACF;AAKA,IAAM,2BAA2B;AAAA,EAC/B,SAAS;AAAA,EACT,WAAW;AAAA,EACX,UAAU;AAAA,EACV,UAAU;AAAA,EACV,SAAS;AACX;AAKA,IAAM,UAAM;AAAA,EACV,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,GAAG;AAAA,EACL,GACA,QACG;AACH,UAAM,cAAc,iBAAiB,IAAI;AAKzC,UAAM,0BAA0B,CAAC,aAA6B;AAC5D,UAAI,CAAC,WAAY,QAAO,yBAAyB;AAEjD,cAAQ,UAAU;AAAA,QAChB,KAAK;AACH,iBAAO,yBAAyB;AAAA,QAClC,KAAK;AACH,iBAAO,yBAAyB;AAAA,QAClC,KAAK;AACH,iBAAO,yBAAyB;AAAA,QAClC,KAAK;AACH,iBAAO,yBAAyB;AAAA,QAClC;AACE,iBAAO,yBAAyB;AAAA,MACpC;AAAA,IACF;AAKA,UAAM,iBAAiB,CAAC,UAAkB;AACxC,YAAM,MAAM,KAAK,KAAK,CAAC,MAAM,EAAE,OAAO,KAAK;AAC3C,UAAI,OAAO,CAAC,IAAI,UAAU;AACxB,oBAAY,KAAK;AAAA,MACnB;AAAA,IACF;AAKA,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xs } from "react/jsx-runtime";
|
|
4
|
-
var TAB_SIZE_CLASSES = {
|
|
5
|
-
small: {
|
|
6
|
-
container: "h-10 gap-1",
|
|
7
|
-
tab: "px-3 py-2 text-sm",
|
|
8
|
-
indicator: "h-0.5"
|
|
9
|
-
},
|
|
10
|
-
medium: {
|
|
11
|
-
container: "h-12 gap-2",
|
|
12
|
-
tab: "px-4 py-4 text-sm",
|
|
13
|
-
indicator: "h-1"
|
|
14
|
-
},
|
|
15
|
-
large: {
|
|
16
|
-
container: "h-14 gap-2",
|
|
17
|
-
tab: "px-6 py-4 text-base",
|
|
18
|
-
indicator: "h-1"
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
var RESPONSIVE_WIDTH_CLASSES = {
|
|
22
|
-
twoTabs: "w-[115px] sm:w-[204px]",
|
|
23
|
-
threeTabs: "w-[100px] sm:w-[160px]",
|
|
24
|
-
fourTabs: "w-[80px] sm:w-[140px]",
|
|
25
|
-
fiveTabs: "w-[70px] sm:w-[120px]",
|
|
26
|
-
default: "flex-1"
|
|
27
|
-
};
|
|
28
|
-
var Tab = forwardRef(
|
|
29
|
-
({
|
|
30
|
-
tabs,
|
|
31
|
-
activeTab,
|
|
32
|
-
onTabChange,
|
|
33
|
-
size = "medium",
|
|
34
|
-
responsive = true,
|
|
35
|
-
className = "",
|
|
36
|
-
...props
|
|
37
|
-
}, ref) => {
|
|
38
|
-
const sizeClasses = TAB_SIZE_CLASSES[size];
|
|
39
|
-
const getResponsiveWidthClass = (tabCount) => {
|
|
40
|
-
if (!responsive) return RESPONSIVE_WIDTH_CLASSES.default;
|
|
41
|
-
switch (tabCount) {
|
|
42
|
-
case 2:
|
|
43
|
-
return RESPONSIVE_WIDTH_CLASSES.twoTabs;
|
|
44
|
-
case 3:
|
|
45
|
-
return RESPONSIVE_WIDTH_CLASSES.threeTabs;
|
|
46
|
-
case 4:
|
|
47
|
-
return RESPONSIVE_WIDTH_CLASSES.fourTabs;
|
|
48
|
-
case 5:
|
|
49
|
-
return RESPONSIVE_WIDTH_CLASSES.fiveTabs;
|
|
50
|
-
default:
|
|
51
|
-
return RESPONSIVE_WIDTH_CLASSES.default;
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
const handleTabClick = (tabId) => {
|
|
55
|
-
const tab = tabs.find((t) => t.id === tabId);
|
|
56
|
-
if (tab && !tab.disabled) {
|
|
57
|
-
onTabChange(tabId);
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
const wrapAroundIndex = (index, maxLength) => {
|
|
61
|
-
if (index < 0) return maxLength - 1;
|
|
62
|
-
if (index >= maxLength) return 0;
|
|
63
|
-
return index;
|
|
64
|
-
};
|
|
65
|
-
const findNextValidTab = (startIndex, direction) => {
|
|
66
|
-
let nextIndex = wrapAroundIndex(startIndex + direction, tabs.length);
|
|
67
|
-
let attempts = 0;
|
|
68
|
-
while (tabs[nextIndex]?.disabled && attempts < tabs.length) {
|
|
69
|
-
nextIndex = wrapAroundIndex(nextIndex + direction, tabs.length);
|
|
70
|
-
attempts++;
|
|
71
|
-
}
|
|
72
|
-
return nextIndex;
|
|
73
|
-
};
|
|
74
|
-
const handleArrowNavigation = (direction) => {
|
|
75
|
-
const currentIndex = tabs.findIndex((tab) => tab.id === activeTab);
|
|
76
|
-
const nextIndex = findNextValidTab(currentIndex, direction);
|
|
77
|
-
if (!tabs[nextIndex]?.disabled && nextIndex !== currentIndex) {
|
|
78
|
-
handleTabClick(tabs[nextIndex].id);
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
const handleKeyDown = (event, tabId) => {
|
|
82
|
-
if (event.key === "Enter" || event.key === " ") {
|
|
83
|
-
event.preventDefault();
|
|
84
|
-
handleTabClick(tabId);
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
if (event.key === "ArrowLeft" || event.key === "ArrowRight") {
|
|
88
|
-
event.preventDefault();
|
|
89
|
-
const direction = event.key === "ArrowLeft" ? -1 : 1;
|
|
90
|
-
handleArrowNavigation(direction);
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
const getTabClassNames = (isDisabled, isActive) => {
|
|
94
|
-
if (isDisabled) {
|
|
95
|
-
return "text-text-400 cursor-not-allowed opacity-50";
|
|
96
|
-
}
|
|
97
|
-
if (isActive) {
|
|
98
|
-
return "text-text-950";
|
|
99
|
-
}
|
|
100
|
-
return "text-text-700 hover:text-text-800";
|
|
101
|
-
};
|
|
102
|
-
const tabWidthClass = getResponsiveWidthClass(tabs.length);
|
|
103
|
-
const containerWidth = responsive && tabs.length <= 2 ? "w-[240px] sm:w-[416px]" : "w-full";
|
|
104
|
-
return /* @__PURE__ */ jsx(
|
|
105
|
-
"div",
|
|
106
|
-
{
|
|
107
|
-
ref,
|
|
108
|
-
className: `flex flex-row items-start ${sizeClasses.container} ${containerWidth} ${className}`,
|
|
109
|
-
role: "tablist",
|
|
110
|
-
...props,
|
|
111
|
-
children: tabs.map((tab) => {
|
|
112
|
-
const isActive = tab.id === activeTab;
|
|
113
|
-
const isDisabled = Boolean(tab.disabled);
|
|
114
|
-
const tabClassNames = getTabClassNames(isDisabled, isActive);
|
|
115
|
-
return /* @__PURE__ */ jsxs(
|
|
116
|
-
"button",
|
|
117
|
-
{
|
|
118
|
-
type: "button",
|
|
119
|
-
role: "tab",
|
|
120
|
-
"aria-selected": isActive,
|
|
121
|
-
"aria-disabled": isDisabled,
|
|
122
|
-
tabIndex: isActive ? 0 : -1,
|
|
123
|
-
className: `
|
|
124
|
-
relative flex flex-row justify-center items-center gap-2 rounded transition-colors isolate
|
|
125
|
-
${sizeClasses.tab}
|
|
126
|
-
${tabWidthClass}
|
|
127
|
-
${tabClassNames}
|
|
128
|
-
${!isDisabled && !isActive ? "hover:bg-background-50" : ""}
|
|
129
|
-
focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2
|
|
130
|
-
`,
|
|
131
|
-
onClick: () => handleTabClick(tab.id),
|
|
132
|
-
onKeyDown: (e) => handleKeyDown(e, tab.id),
|
|
133
|
-
disabled: isDisabled,
|
|
134
|
-
"data-testid": `tab-${tab.id}`,
|
|
135
|
-
children: [
|
|
136
|
-
/* @__PURE__ */ jsx("span", { className: "font-bold leading-4 tracking-[0.2px] truncate", children: responsive && tab.mobileLabel ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
137
|
-
/* @__PURE__ */ jsx("span", { className: "sm:hidden", children: tab.mobileLabel }),
|
|
138
|
-
/* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: tab.label })
|
|
139
|
-
] }) : tab.label }),
|
|
140
|
-
isActive && /* @__PURE__ */ jsx(
|
|
141
|
-
"div",
|
|
142
|
-
{
|
|
143
|
-
className: `absolute bottom-0 left-2 right-2 bg-primary-700 rounded-lg z-[2] ${sizeClasses.indicator}`,
|
|
144
|
-
"data-testid": "active-indicator"
|
|
145
|
-
}
|
|
146
|
-
)
|
|
147
|
-
]
|
|
148
|
-
},
|
|
149
|
-
tab.id
|
|
150
|
-
);
|
|
151
|
-
})
|
|
152
|
-
}
|
|
153
|
-
);
|
|
154
|
-
}
|
|
155
|
-
);
|
|
156
|
-
Tab.displayName = "Tab";
|
|
157
|
-
var Tab_default = Tab;
|
|
158
|
-
export {
|
|
159
|
-
Tab_default as default
|
|
160
|
-
};
|
|
161
|
-
//# sourceMappingURL=index.mjs.map
|
package/dist/Tab/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/Tab/Tab.tsx"],"sourcesContent":["import { forwardRef, HTMLAttributes, KeyboardEvent } from 'react';\n\n/**\n * Individual tab item interface\n */\nexport interface TabItem {\n /** Unique identifier for the tab */\n id: string;\n /** Label text for the tab */\n label: string;\n /** Alternative label for mobile (optional) */\n mobileLabel?: string;\n /** Whether the tab is disabled */\n disabled?: boolean;\n}\n\n/**\n * Tab component props interface\n */\nexport interface TabProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {\n /** Array of tab items */\n tabs: TabItem[];\n /** Currently active tab ID */\n activeTab: string;\n /** Callback when tab changes */\n onTabChange: (tabId: string) => void;\n /** Size variant of the tabs */\n size?: 'small' | 'medium' | 'large';\n /** Whether to enable responsive behavior */\n responsive?: boolean;\n}\n\n/**\n * Size configuration lookup table\n */\nconst TAB_SIZE_CLASSES = {\n small: {\n container: 'h-10 gap-1',\n tab: 'px-3 py-2 text-sm',\n indicator: 'h-0.5',\n },\n medium: {\n container: 'h-12 gap-2',\n tab: 'px-4 py-4 text-sm',\n indicator: 'h-1',\n },\n large: {\n container: 'h-14 gap-2',\n tab: 'px-6 py-4 text-base',\n indicator: 'h-1',\n },\n} as const;\n\n/**\n * Responsive width classes for tabs\n */\nconst RESPONSIVE_WIDTH_CLASSES = {\n twoTabs: 'w-[115px] sm:w-[204px]',\n threeTabs: 'w-[100px] sm:w-[160px]',\n fourTabs: 'w-[80px] sm:w-[140px]',\n fiveTabs: 'w-[70px] sm:w-[120px]',\n default: 'flex-1',\n} as const;\n\n/**\n * Tab component following the established architecture patterns\n */\nconst Tab = forwardRef<HTMLDivElement, TabProps>(\n (\n {\n tabs,\n activeTab,\n onTabChange,\n size = 'medium',\n responsive = true,\n className = '',\n ...props\n },\n ref\n ) => {\n const sizeClasses = TAB_SIZE_CLASSES[size];\n\n /**\n * Get responsive width class based on number of tabs\n */\n const getResponsiveWidthClass = (tabCount: number): string => {\n if (!responsive) return RESPONSIVE_WIDTH_CLASSES.default;\n\n switch (tabCount) {\n case 2:\n return RESPONSIVE_WIDTH_CLASSES.twoTabs;\n case 3:\n return RESPONSIVE_WIDTH_CLASSES.threeTabs;\n case 4:\n return RESPONSIVE_WIDTH_CLASSES.fourTabs;\n case 5:\n return RESPONSIVE_WIDTH_CLASSES.fiveTabs;\n default:\n return RESPONSIVE_WIDTH_CLASSES.default;\n }\n };\n\n /**\n * Handle tab click\n */\n const handleTabClick = (tabId: string) => {\n const tab = tabs.find((t) => t.id === tabId);\n if (tab && !tab.disabled) {\n onTabChange(tabId);\n }\n };\n\n /**\n * Wrap index around array bounds\n */\n const wrapAroundIndex = (index: number, maxLength: number): number => {\n if (index < 0) return maxLength - 1;\n if (index >= maxLength) return 0;\n return index;\n };\n\n /**\n * Find next valid (non-disabled) tab index\n */\n const findNextValidTab = (\n startIndex: number,\n direction: number\n ): number => {\n let nextIndex = wrapAroundIndex(startIndex + direction, tabs.length);\n let attempts = 0;\n\n while (tabs[nextIndex]?.disabled && attempts < tabs.length) {\n nextIndex = wrapAroundIndex(nextIndex + direction, tabs.length);\n attempts++;\n }\n\n return nextIndex;\n };\n\n /**\n * Handle arrow key navigation\n */\n const handleArrowNavigation = (direction: number): void => {\n const currentIndex = tabs.findIndex((tab) => tab.id === activeTab);\n const nextIndex = findNextValidTab(currentIndex, direction);\n\n if (!tabs[nextIndex]?.disabled && nextIndex !== currentIndex) {\n handleTabClick(tabs[nextIndex].id);\n }\n };\n\n /**\n * Handle keyboard navigation\n */\n const handleKeyDown = (\n event: KeyboardEvent<HTMLButtonElement>,\n tabId: string\n ) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n handleTabClick(tabId);\n return;\n }\n\n if (event.key === 'ArrowLeft' || event.key === 'ArrowRight') {\n event.preventDefault();\n const direction = event.key === 'ArrowLeft' ? -1 : 1;\n handleArrowNavigation(direction);\n }\n };\n\n /**\n * Get tab text and interaction classes based on state\n */\n const getTabClassNames = (\n isDisabled: boolean,\n isActive: boolean\n ): string => {\n if (isDisabled) {\n return 'text-text-400 cursor-not-allowed opacity-50';\n }\n\n if (isActive) {\n return 'text-text-950';\n }\n\n return 'text-text-700 hover:text-text-800';\n };\n\n const tabWidthClass = getResponsiveWidthClass(tabs.length);\n const containerWidth =\n responsive && tabs.length <= 2 ? 'w-[240px] sm:w-[416px]' : 'w-full';\n\n return (\n <div\n ref={ref}\n className={`flex flex-row items-start ${sizeClasses.container} ${containerWidth} ${className}`}\n role=\"tablist\"\n {...props}\n >\n {tabs.map((tab) => {\n const isActive = tab.id === activeTab;\n const isDisabled = Boolean(tab.disabled);\n const tabClassNames = getTabClassNames(isDisabled, isActive);\n\n return (\n <button\n key={tab.id}\n type=\"button\"\n role=\"tab\"\n aria-selected={isActive}\n aria-disabled={isDisabled}\n tabIndex={isActive ? 0 : -1}\n className={`\n relative flex flex-row justify-center items-center gap-2 rounded transition-colors isolate\n ${sizeClasses.tab}\n ${tabWidthClass}\n ${tabClassNames}\n ${!isDisabled && !isActive ? 'hover:bg-background-50' : ''}\n focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2\n `}\n onClick={() => handleTabClick(tab.id)}\n onKeyDown={(e) => handleKeyDown(e, tab.id)}\n disabled={isDisabled}\n data-testid={`tab-${tab.id}`}\n >\n <span className=\"font-bold leading-4 tracking-[0.2px] truncate\">\n {responsive && tab.mobileLabel ? (\n <>\n <span className=\"sm:hidden\">{tab.mobileLabel}</span>\n <span className=\"hidden sm:inline\">{tab.label}</span>\n </>\n ) : (\n tab.label\n )}\n </span>\n {isActive && (\n <div\n className={`absolute bottom-0 left-2 right-2 bg-primary-700 rounded-lg z-[2] ${sizeClasses.indicator}`}\n data-testid=\"active-indicator\"\n />\n )}\n </button>\n );\n })}\n </div>\n );\n }\n);\n\nTab.displayName = 'Tab';\n\nexport default Tab;\n"],"mappings":";AAAA,SAAS,kBAAiD;AAqOxC,mBACE,KADF;AAjMlB,IAAM,mBAAmB;AAAA,EACvB,OAAO;AAAA,IACL,WAAW;AAAA,IACX,KAAK;AAAA,IACL,WAAW;AAAA,EACb;AAAA,EACA,QAAQ;AAAA,IACN,WAAW;AAAA,IACX,KAAK;AAAA,IACL,WAAW;AAAA,EACb;AAAA,EACA,OAAO;AAAA,IACL,WAAW;AAAA,IACX,KAAK;AAAA,IACL,WAAW;AAAA,EACb;AACF;AAKA,IAAM,2BAA2B;AAAA,EAC/B,SAAS;AAAA,EACT,WAAW;AAAA,EACX,UAAU;AAAA,EACV,UAAU;AAAA,EACV,SAAS;AACX;AAKA,IAAM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