@axzydev/axzy_ui_system 1.2.11 → 1.2.13
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/README.md +21 -9
- package/dist/index.cjs +294 -257
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +25 -1
- package/dist/index.d.ts +25 -1
- package/dist/index.js +300 -263
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/avatar/avatar.tsx +1 -1
- package/src/components/calendar/calendar.tsx +1 -1
- package/src/components/card/card.tsx +11 -8
- package/src/components/data-table/dataTable.tsx +3 -3
- package/src/components/dialog/dialog.tsx +2 -2
- package/src/components/divider/divider.tsx +1 -1
- package/src/components/dropfile/dropfile.doc.mdx +15 -0
- package/src/components/dropfile/dropfile.props.ts +13 -0
- package/src/components/dropfile/dropfile.stories.tsx +21 -0
- package/src/components/dropfile/dropfile.tsx +90 -27
- package/src/components/form-builder/fieldRenderer.tsx +3 -3
- package/src/components/input/input.tsx +7 -7
- package/src/components/loader/loader.tsx +1 -1
- package/src/components/navbar/navbar.tsx +10 -10
- package/src/components/pagination/pagination.tsx +11 -11
- package/src/components/search-select/search-select.tsx +8 -8
- package/src/components/searchTable/components/EditableCell.tsx +1 -1
- package/src/components/searchTable/components/PaginationControls.tsx +2 -2
- package/src/components/searchTable/components/PaginationInfo.tsx +1 -1
- package/src/components/searchTable/components/SearchAndSortBar.tsx +1 -1
- package/src/components/searchTable/components/SearchInput.tsx +1 -1
- package/src/components/searchTable/components/SortButton.tsx +3 -3
- package/src/components/searchTable/components/TableHeader.tsx +1 -1
- package/src/components/searchTable/components/TableRow.tsx +4 -4
- package/src/components/searchTable/searchTable.tsx +2 -2
- package/src/components/select/select.tsx +2 -2
- package/src/components/sidebar/sidebar.tsx +15 -15
- package/src/components/slider/slider.tsx +3 -3
- package/src/components/stepper/stepper.tsx +5 -5
- package/src/components/table/table.tsx +3 -3
- package/src/components/tabs/tabs.tsx +4 -4
- package/src/components/textarea/textarea.tsx +3 -3
- package/src/components/theme-provider/themeProvider.tsx +32 -32
- package/src/components/time-picker/timePicker.tsx +5 -5
- package/src/components/topbar/topbar.tsx +6 -6
- package/src/index.css +23 -0
- package/src/theme/theme.ts +17 -17
- package/src/utils/styles.ts +5 -5
|
@@ -146,8 +146,8 @@ export default function ITPagination({
|
|
|
146
146
|
className={clsx(
|
|
147
147
|
baseItemClass,
|
|
148
148
|
currentPage === 1
|
|
149
|
-
? "text-
|
|
150
|
-
: "text-
|
|
149
|
+
? "text-secondary-300 cursor-not-allowed"
|
|
150
|
+
: "text-secondary-500 hover:bg-secondary-100"
|
|
151
151
|
)}
|
|
152
152
|
onClick={handlePrevious}
|
|
153
153
|
aria-disabled={currentPage === 1}
|
|
@@ -162,7 +162,7 @@ export default function ITPagination({
|
|
|
162
162
|
<ITText
|
|
163
163
|
as="div"
|
|
164
164
|
key={`dots-${idx}`}
|
|
165
|
-
className="flex items-center justify-center w-8 h-8 select-none text-
|
|
165
|
+
className="flex items-center justify-center w-8 h-8 select-none text-secondary-400"
|
|
166
166
|
>
|
|
167
167
|
…
|
|
168
168
|
</ITText>
|
|
@@ -177,7 +177,7 @@ export default function ITPagination({
|
|
|
177
177
|
key={pageNumber}
|
|
178
178
|
className={clsx(
|
|
179
179
|
baseItemClass,
|
|
180
|
-
isActive ? "text-white" : "text-
|
|
180
|
+
isActive ? "text-white" : "text-secondary-600 hover:bg-secondary-100"
|
|
181
181
|
)}
|
|
182
182
|
style={{
|
|
183
183
|
backgroundColor: isActive ? resolvedBgColor : undefined,
|
|
@@ -196,8 +196,8 @@ export default function ITPagination({
|
|
|
196
196
|
className={clsx(
|
|
197
197
|
baseItemClass,
|
|
198
198
|
currentPage === totalPages
|
|
199
|
-
? "text-
|
|
200
|
-
: "text-
|
|
199
|
+
? "text-secondary-300 cursor-not-allowed"
|
|
200
|
+
: "text-secondary-500 hover:bg-secondary-100"
|
|
201
201
|
)}
|
|
202
202
|
onClick={handleNext}
|
|
203
203
|
aria-disabled={currentPage === totalPages}
|
|
@@ -214,8 +214,8 @@ export default function ITPagination({
|
|
|
214
214
|
|
|
215
215
|
return (
|
|
216
216
|
<div className={clsx("flex flex-col sm:flex-row justify-between items-center gap-4 w-full", className)}>
|
|
217
|
-
<div className="flex items-center gap-4 text-sm text-
|
|
218
|
-
<div className="flex items-center gap-2 bg-
|
|
217
|
+
<div className="flex items-center gap-4 text-sm text-secondary-500">
|
|
218
|
+
<div className="flex items-center gap-2 bg-secondary-50 px-3 py-1 rounded-lg border border-secondary-200">
|
|
219
219
|
<ITText as="span" className="text-xs font-medium">Mostrar</ITText>
|
|
220
220
|
<ITSelect
|
|
221
221
|
name="itemsPerPage"
|
|
@@ -227,16 +227,16 @@ export default function ITPagination({
|
|
|
227
227
|
onChange={(e) => onItemsPerPageChange(Number(e.target.value))}
|
|
228
228
|
onBlur={() => {}}
|
|
229
229
|
size="small"
|
|
230
|
-
className="!w-14 !h-6 !text-xs !py-0 !px-1! !border-none !bg-transparent !ring-0 focus:!ring-0 cursor-pointer font-bold text-
|
|
230
|
+
className="!w-14 !h-6 !text-xs !py-0 !px-1! !border-none !bg-transparent !ring-0 focus:!ring-0 cursor-pointer font-bold text-secondary-700"
|
|
231
231
|
placeholder=""
|
|
232
232
|
/>
|
|
233
233
|
</div>
|
|
234
234
|
|
|
235
235
|
{totalItems !== undefined && (
|
|
236
236
|
<>
|
|
237
|
-
<ITText as="span" className="text-
|
|
237
|
+
<ITText as="span" className="text-secondary-300">|</ITText>
|
|
238
238
|
<ITText as="span" className="text-xs">
|
|
239
|
-
<ITText as="span" className="font-semibold text-
|
|
239
|
+
<ITText as="span" className="font-semibold text-secondary-700">{startItem}</ITText><ITText as="span"> - </ITText><ITText as="span" className="font-semibold text-secondary-700">{endItem}</ITText><ITText as="span"> de </ITText><ITText as="span" className="font-semibold text-secondary-900">{totalItems}</ITText>
|
|
240
240
|
</ITText>
|
|
241
241
|
</>
|
|
242
242
|
)}
|
|
@@ -184,12 +184,12 @@ export default function ITSearchSelect({
|
|
|
184
184
|
{label && (
|
|
185
185
|
<ITText
|
|
186
186
|
as="label"
|
|
187
|
-
className={clsx("text-sm font-medium text-
|
|
188
|
-
"text-
|
|
187
|
+
className={clsx("text-sm font-medium text-secondary-700 dark:text-slate-300", {
|
|
188
|
+
"text-danger-500": hasError,
|
|
189
189
|
})}
|
|
190
190
|
>
|
|
191
191
|
<ITText as="span">{label}</ITText>
|
|
192
|
-
{required && <ITText as="span" className="text-
|
|
192
|
+
{required && <ITText as="span" className="text-danger-500 ml-1">*</ITText>}
|
|
193
193
|
</ITText>
|
|
194
194
|
)}
|
|
195
195
|
|
|
@@ -209,7 +209,7 @@ export default function ITSearchSelect({
|
|
|
209
209
|
style={getInputStyle()}
|
|
210
210
|
autoComplete="off"
|
|
211
211
|
/>
|
|
212
|
-
<div className="absolute right-3 flex items-center gap-2 text-
|
|
212
|
+
<div className="absolute right-3 flex items-center gap-2 text-secondary-400 pointer-events-none">
|
|
213
213
|
{isLoading && <div className="animate-spin h-4 w-4 border-2 border-primary-500 border-t-transparent rounded-full" />}
|
|
214
214
|
{!isLoading && <FaSearch size={14} className={clsx({ "text-primary-500": isFocused })} />}
|
|
215
215
|
</div>
|
|
@@ -217,7 +217,7 @@ export default function ITSearchSelect({
|
|
|
217
217
|
|
|
218
218
|
{/* Dropdown Panel */}
|
|
219
219
|
{isOpen && (
|
|
220
|
-
<div className="absolute z-[70] w-full mt-1 bg-white dark:bg-slate-900 border border-
|
|
220
|
+
<div className="absolute z-[70] w-full mt-1 bg-white dark:bg-slate-900 border border-secondary-200 dark:border-slate-800 rounded-lg shadow-xl overflow-hidden animate-in fade-in zoom-in duration-200 origin-top">
|
|
221
221
|
<div className="max-h-60 overflow-y-auto">
|
|
222
222
|
{filteredOptions.length > 0 ? (
|
|
223
223
|
filteredOptions.map((option) => (
|
|
@@ -229,14 +229,14 @@ export default function ITSearchSelect({
|
|
|
229
229
|
"px-4 py-2 text-sm cursor-pointer transition-colors",
|
|
230
230
|
value === option[valueField]
|
|
231
231
|
? "bg-primary-50 dark:bg-primary-950/40 text-primary-700 dark:text-primary-300 font-medium"
|
|
232
|
-
: "hover:bg-
|
|
232
|
+
: "hover:bg-secondary-50 dark:hover:bg-slate-800 text-secondary-700 dark:text-slate-300"
|
|
233
233
|
)}
|
|
234
234
|
>
|
|
235
235
|
<ITText as="span">{option[labelField]}</ITText>
|
|
236
236
|
</ITText>
|
|
237
237
|
))
|
|
238
238
|
) : (
|
|
239
|
-
<ITText as="div" className="px-4 py-6 text-sm text-center text-
|
|
239
|
+
<ITText as="div" className="px-4 py-6 text-sm text-center text-secondary-500 italic">
|
|
240
240
|
{isLoading ? "Cargando..." : noResultsMessage}
|
|
241
241
|
</ITText>
|
|
242
242
|
)}
|
|
@@ -247,7 +247,7 @@ export default function ITSearchSelect({
|
|
|
247
247
|
|
|
248
248
|
{/* Error Message */}
|
|
249
249
|
{hasError && (
|
|
250
|
-
<ITText as="p" className="text-
|
|
250
|
+
<ITText as="p" className="text-danger-500 text-xs mt-1">{errorMessage}</ITText>
|
|
251
251
|
)}
|
|
252
252
|
</div>
|
|
253
253
|
);
|
|
@@ -143,7 +143,7 @@ export default function EditableCell<T>({
|
|
|
143
143
|
return (
|
|
144
144
|
<div className="w-full">
|
|
145
145
|
{renderInput()}
|
|
146
|
-
{error && <div className="text-
|
|
146
|
+
{error && <div className="text-danger-500 text-xs mt-1"><ITText as="span">{error}</ITText></div>}
|
|
147
147
|
</div>
|
|
148
148
|
);
|
|
149
149
|
}
|
|
@@ -36,7 +36,7 @@ export default function PaginationControls({
|
|
|
36
36
|
<PaginationInfo currentCount={currentCount} totalCount={totalCount} />
|
|
37
37
|
|
|
38
38
|
<div className="flex items-center space-x-2">
|
|
39
|
-
<ITText as="span" className="text-sm text-
|
|
39
|
+
<ITText as="span" className="text-sm text-secondary-700">Mostrar:</ITText>
|
|
40
40
|
<ITSelect
|
|
41
41
|
name="itemsPerPage"
|
|
42
42
|
options={itemsPerPageOptions.map((option) => ({
|
|
@@ -65,7 +65,7 @@ export default function PaginationControls({
|
|
|
65
65
|
<FaArrowLeft aria-hidden="true" />
|
|
66
66
|
</ITButton>
|
|
67
67
|
|
|
68
|
-
<ITText as="span" className="px-4 py-2 text-sm text-
|
|
68
|
+
<ITText as="span" className="px-4 py-2 text-sm text-secondary-700" aria-live="polite">
|
|
69
69
|
Página {pageIndex} de {totalPages}
|
|
70
70
|
</ITText>
|
|
71
71
|
|
|
@@ -13,7 +13,7 @@ export default function PaginationInfo({
|
|
|
13
13
|
className = "",
|
|
14
14
|
}: PaginationInfoProps) {
|
|
15
15
|
return (
|
|
16
|
-
<ITText as="span" className={`text-sm text-
|
|
16
|
+
<ITText as="span" className={`text-sm text-secondary-700 ${className}`}>
|
|
17
17
|
Mostrando {currentCount} de {totalCount} resultados
|
|
18
18
|
</ITText>
|
|
19
19
|
);
|
|
@@ -25,7 +25,7 @@ export default function SearchAndSortBar({
|
|
|
25
25
|
searchInputPlaceholder = "Buscar en todos los campos...",
|
|
26
26
|
}: SearchAndSortBarProps) {
|
|
27
27
|
return (
|
|
28
|
-
<div className="bg-
|
|
28
|
+
<div className="bg-secondary-50 px-6 py-4 border-b border-secondary-200">
|
|
29
29
|
<div className="flex items-center gap-4">
|
|
30
30
|
<SearchInput
|
|
31
31
|
placeholder={searchInputPlaceholder}
|
|
@@ -18,7 +18,7 @@ export default function SearchInput({
|
|
|
18
18
|
return (
|
|
19
19
|
<div className={`relative flex-1 ${className}`}>
|
|
20
20
|
<div className="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
|
|
21
|
-
<FaSearch className="h-5 w-5 text-
|
|
21
|
+
<FaSearch className="h-5 w-5 text-secondary-400" />
|
|
22
22
|
</div>
|
|
23
23
|
<ITInput
|
|
24
24
|
name="global-search"
|
|
@@ -19,7 +19,7 @@ export default function SortButton({
|
|
|
19
19
|
return (
|
|
20
20
|
<button
|
|
21
21
|
onClick={onClick}
|
|
22
|
-
className={`p-3 rounded-lg bg-white border border-
|
|
22
|
+
className={`p-3 rounded-lg bg-white border border-secondary-300 hover:bg-secondary-50 transition-colors duration-200 flex items-center gap-2 min-w-[120px] ${className}`}
|
|
23
23
|
aria-label={`Ordenar tabla ${
|
|
24
24
|
sortConfig
|
|
25
25
|
? sortConfig.direction === "asc"
|
|
@@ -36,9 +36,9 @@ export default function SortButton({
|
|
|
36
36
|
<FaSortDown className="w-4 h-4 text-slate-500" />
|
|
37
37
|
)
|
|
38
38
|
) : (
|
|
39
|
-
<FaSort className="w-4 h-4 text-
|
|
39
|
+
<FaSort className="w-4 h-4 text-secondary-500" />
|
|
40
40
|
)}
|
|
41
|
-
<ITText as="span" className="text-sm font-medium text-
|
|
41
|
+
<ITText as="span" className="text-sm font-medium text-secondary-700">
|
|
42
42
|
{sortConfig
|
|
43
43
|
? sortConfig.direction === "asc"
|
|
44
44
|
? "Asc ↑"
|
|
@@ -18,7 +18,7 @@ export default function TableHeader<T>({
|
|
|
18
18
|
}: TableHeaderProps<T>) {
|
|
19
19
|
return (
|
|
20
20
|
<thead>
|
|
21
|
-
<tr className="bg-white border-b border-
|
|
21
|
+
<tr className="bg-white border-b border-secondary-200">
|
|
22
22
|
{columns.map((col) => (
|
|
23
23
|
<TableHeaderCell
|
|
24
24
|
key={col.key}
|
|
@@ -66,7 +66,7 @@ export default function TableRow<T>({
|
|
|
66
66
|
title="Verdadero"
|
|
67
67
|
/>
|
|
68
68
|
) : (
|
|
69
|
-
<FaTimes className="text-
|
|
69
|
+
<FaTimes className="text-danger-500" aria-label="Falso" title="Falso" />
|
|
70
70
|
);
|
|
71
71
|
|
|
72
72
|
case "actions":
|
|
@@ -99,13 +99,13 @@ export default function TableRow<T>({
|
|
|
99
99
|
<tr
|
|
100
100
|
onMouseEnter={() => setIsHovered(true)}
|
|
101
101
|
onMouseLeave={() => setIsHovered(false)}
|
|
102
|
-
className={`border-b border-
|
|
102
|
+
className={`border-b border-secondary-200 transition-colors duration-150 ${
|
|
103
103
|
isEditing
|
|
104
104
|
? "bg-slate-50"
|
|
105
105
|
: rowIndex % 2 === 0
|
|
106
106
|
? "bg-white"
|
|
107
|
-
: "bg-
|
|
108
|
-
} ${isHovered && !isEditing ? "bg-
|
|
107
|
+
: "bg-secondary-50"
|
|
108
|
+
} ${isHovered && !isEditing ? "bg-secondary-100" : ""}`}
|
|
109
109
|
>
|
|
110
110
|
{columns.map((col) => (
|
|
111
111
|
<td
|
|
@@ -139,7 +139,7 @@ return (
|
|
|
139
139
|
{/* Contenido con scroll */}
|
|
140
140
|
<div className="bg-white">
|
|
141
141
|
{/* Barra de búsqueda y ordenamiento */}
|
|
142
|
-
<div className="p-4 border-b border-
|
|
142
|
+
<div className="p-4 border-b border-secondary-200">
|
|
143
143
|
<SearchAndSortBar
|
|
144
144
|
searchTerm={searchTerm}
|
|
145
145
|
onSearchChange={handleSearchChange}
|
|
@@ -154,7 +154,7 @@ return (
|
|
|
154
154
|
<div className="overflow-x-auto">
|
|
155
155
|
<table
|
|
156
156
|
className={clsx(
|
|
157
|
-
"min-w-full text-sm text-left bg-white text-
|
|
157
|
+
"min-w-full text-sm text-left bg-white text-secondary-900 table-auto",
|
|
158
158
|
variantStyles[variant],
|
|
159
159
|
sizeStyles[size]
|
|
160
160
|
)}
|
|
@@ -84,7 +84,7 @@ export default function ITSelect({
|
|
|
84
84
|
className={inputLabel(hasError)}
|
|
85
85
|
>
|
|
86
86
|
<ITText as="span">{label}</ITText>
|
|
87
|
-
{required && <ITText as="span" className="text-
|
|
87
|
+
{required && <ITText as="span" className="text-danger-500 ml-1">*</ITText>}
|
|
88
88
|
</ITText>
|
|
89
89
|
)}
|
|
90
90
|
<div className="flex flex-col w-full">
|
|
@@ -127,7 +127,7 @@ export default function ITSelect({
|
|
|
127
127
|
)
|
|
128
128
|
}
|
|
129
129
|
</select>
|
|
130
|
-
<div className="absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-
|
|
130
|
+
<div className="absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-secondary-500">
|
|
131
131
|
<FaAngleDown />
|
|
132
132
|
</div>
|
|
133
133
|
</div>
|
|
@@ -121,7 +121,7 @@ export default function ITSidebar({
|
|
|
121
121
|
${sidebarWidth}
|
|
122
122
|
${className}
|
|
123
123
|
${!visibleOnMobile ? "hidden lg:flex" : "flex"}
|
|
124
|
-
shadow-[
|
|
124
|
+
shadow-[4px_0_32px_rgba(15,23,42,0.04)]
|
|
125
125
|
`}
|
|
126
126
|
style={{
|
|
127
127
|
zIndex: 50,
|
|
@@ -144,7 +144,7 @@ export default function ITSidebar({
|
|
|
144
144
|
`}
|
|
145
145
|
style={{
|
|
146
146
|
backgroundColor: item.isActive ? "var(--sidebar-active-bg, var(--color-secondary-50))" : 'transparent',
|
|
147
|
-
boxShadow: item.isActive ? '
|
|
147
|
+
boxShadow: item.isActive ? 'var(--shadow-xs)' : 'none',
|
|
148
148
|
border: item.isActive ? "1px solid var(--sidebar-border, var(--color-secondary-200))" : '1px solid transparent'
|
|
149
149
|
}}
|
|
150
150
|
onMouseEnter={(e) => {
|
|
@@ -158,7 +158,7 @@ export default function ITSidebar({
|
|
|
158
158
|
{item.isActive && !isSidebarCollapsed && (
|
|
159
159
|
<div
|
|
160
160
|
className="absolute left-0 top-1/4 bottom-1/4 w-[3px] rounded-r-full transition-all"
|
|
161
|
-
style={{ backgroundColor: "var(--sidebar-active-icon,
|
|
161
|
+
style={{ backgroundColor: "var(--sidebar-active-icon, var(--color-primary-500))", boxShadow: "0 0 10px var(--sidebar-active-icon, var(--color-primary-500))" }}
|
|
162
162
|
/>
|
|
163
163
|
)}
|
|
164
164
|
|
|
@@ -167,7 +167,7 @@ export default function ITSidebar({
|
|
|
167
167
|
<div
|
|
168
168
|
className={`transition-all duration-300 flex-shrink-0 flex items-center justify-center`}
|
|
169
169
|
style={{
|
|
170
|
-
color: item.isActive ? "var(--sidebar-active-icon,
|
|
170
|
+
color: item.isActive ? "var(--sidebar-active-icon, var(--color-primary-500))" : "var(--sidebar-icon-color, #9ca3af)",
|
|
171
171
|
opacity: item.isActive ? 1 : 0.8,
|
|
172
172
|
fontSize: item.isActive ? '1.35rem' : '1.25rem',
|
|
173
173
|
filter: item.isActive ? 'drop-shadow(0 0 8px rgba(255,255,255,0.2))' : 'none'
|
|
@@ -181,7 +181,7 @@ export default function ITSidebar({
|
|
|
181
181
|
<ITText as="span"
|
|
182
182
|
className={`transition-all duration-300 truncate tracking-wide`}
|
|
183
183
|
style={{
|
|
184
|
-
color: item.isActive ? "var(--sidebar-active-color, #ffffff)" : "var(--sidebar-label-color,
|
|
184
|
+
color: item.isActive ? "var(--sidebar-active-color, #ffffff)" : "var(--sidebar-label-color, var(--color-secondary-300))",
|
|
185
185
|
fontSize: '0.9rem',
|
|
186
186
|
fontWeight: item.isActive ? '600' : '500'
|
|
187
187
|
}}
|
|
@@ -207,9 +207,9 @@ export default function ITSidebar({
|
|
|
207
207
|
: "right-3 top-1/2 transform -translate-y-1/2 px-2 py-0.5 text-[10px] rounded-full backdrop-blur-sm"}
|
|
208
208
|
`}
|
|
209
209
|
style={{
|
|
210
|
-
backgroundColor: "var(--sidebar-badge-bg,
|
|
210
|
+
backgroundColor: "var(--sidebar-badge-bg, var(--color-primary-500))",
|
|
211
211
|
color: "var(--sidebar-badge-color, #ffffff)",
|
|
212
|
-
boxShadow: isSidebarCollapsed ? "0 0 0 2px var(--sidebar-bg,
|
|
212
|
+
boxShadow: isSidebarCollapsed ? "0 0 0 2px var(--sidebar-bg, var(--color-secondary-900))" : 'none'
|
|
213
213
|
}}
|
|
214
214
|
>
|
|
215
215
|
{isSidebarCollapsed ? "" : item.badge}
|
|
@@ -229,7 +229,7 @@ export default function ITSidebar({
|
|
|
229
229
|
}}
|
|
230
230
|
>
|
|
231
231
|
<div className="px-5 py-4 flex items-center gap-3 font-semibold border-b" style={{ borderColor: "var(--sidebar-border, var(--color-secondary-200))", color: "var(--sidebar-active-color, var(--color-secondary-900))" }}>
|
|
232
|
-
{item.icon && <span style={{ color: "var(--sidebar-active-icon,
|
|
232
|
+
{item.icon && <span style={{ color: "var(--sidebar-active-icon, var(--color-primary-500))" }} className="text-xl drop-shadow-sm">{item.icon}</span>}
|
|
233
233
|
<ITText as="span" className="tracking-wide text-[15px]">{item.label}</ITText>
|
|
234
234
|
</div>
|
|
235
235
|
|
|
@@ -244,18 +244,18 @@ export default function ITSidebar({
|
|
|
244
244
|
<div
|
|
245
245
|
className="absolute left-0 top-1/3 bottom-1/3 w-[2.5px] rounded-r-full"
|
|
246
246
|
style={{
|
|
247
|
-
backgroundColor: "var(--sidebar-active-icon,
|
|
248
|
-
boxShadow: "0 0 6px color-mix(in srgb, var(--sidebar-active-icon,
|
|
247
|
+
backgroundColor: "var(--sidebar-active-icon, var(--color-primary-500))",
|
|
248
|
+
boxShadow: "0 0 6px color-mix(in srgb, var(--sidebar-active-icon, var(--color-primary-500)) 25%, transparent)",
|
|
249
249
|
}}
|
|
250
250
|
/>
|
|
251
251
|
)}
|
|
252
|
-
<span className={`w-1.5 h-1.5 rounded-full transition-all ${subitem.isActive ? "scale-125" : ""}`} style={{ backgroundColor: subitem.isActive ? "var(--sidebar-active-icon,
|
|
252
|
+
<span className={`w-1.5 h-1.5 rounded-full transition-all ${subitem.isActive ? "scale-125" : ""}`} style={{ backgroundColor: subitem.isActive ? "var(--sidebar-active-icon, var(--color-primary-500))" : "var(--sidebar-icon-color, var(--color-secondary-400))" }} />
|
|
253
253
|
<ITText as="span" style={{ color: subitem.isActive ? "var(--sidebar-active-color, var(--color-secondary-900))" : "var(--sidebar-label-color, var(--color-secondary-600))", fontWeight: subitem.isActive ? 600 : 500 }}>{subitem.label}</ITText>
|
|
254
254
|
</div>
|
|
255
255
|
))}
|
|
256
256
|
</div>
|
|
257
257
|
) : (
|
|
258
|
-
<ITText as="div" className="px-5 py-3 text-sm italic" style={{ color: "var(--sidebar-label-color,
|
|
258
|
+
<ITText as="div" className="px-5 py-3 text-sm italic" style={{ color: "var(--sidebar-label-color, var(--color-secondary-400))" }}>No hay submenú</ITText>
|
|
259
259
|
)}
|
|
260
260
|
</div>
|
|
261
261
|
)}
|
|
@@ -304,8 +304,8 @@ export default function ITSidebar({
|
|
|
304
304
|
<div
|
|
305
305
|
className="absolute left-0 top-1/3 bottom-1/3 w-[2.5px] rounded-r-full transition-all"
|
|
306
306
|
style={{
|
|
307
|
-
backgroundColor: "var(--sidebar-active-icon,
|
|
308
|
-
boxShadow: "0 0 6px color-mix(in srgb, var(--sidebar-active-icon,
|
|
307
|
+
backgroundColor: "var(--sidebar-active-icon, var(--color-primary-500))",
|
|
308
|
+
boxShadow: "0 0 6px color-mix(in srgb, var(--sidebar-active-icon, var(--color-primary-500)) 25%, transparent)",
|
|
309
309
|
}}
|
|
310
310
|
/>
|
|
311
311
|
)}
|
|
@@ -314,7 +314,7 @@ export default function ITSidebar({
|
|
|
314
314
|
className={`w-1.5 h-1.5 rounded-full flex-shrink-0 transition-all duration-300 ${subitem.isActive ? 'scale-125' : ''}`}
|
|
315
315
|
style={{
|
|
316
316
|
backgroundColor: subitem.isActive
|
|
317
|
-
? "var(--sidebar-active-icon,
|
|
317
|
+
? "var(--sidebar-active-icon, var(--color-primary-500))"
|
|
318
318
|
: "var(--sidebar-icon-color, var(--color-secondary-400))"
|
|
319
319
|
}}
|
|
320
320
|
/>
|
|
@@ -30,7 +30,7 @@ export default function ITSlider({
|
|
|
30
30
|
return (
|
|
31
31
|
<div className={clsx("flex flex-col gap-1.5", className)}>
|
|
32
32
|
{label && (
|
|
33
|
-
<ITText as="label" className="text-xs font-semibold text-
|
|
33
|
+
<ITText as="label" className="text-xs font-semibold text-secondary-600 dark:text-secondary-400">
|
|
34
34
|
{label}: {value}
|
|
35
35
|
</ITText>
|
|
36
36
|
)}
|
|
@@ -45,7 +45,7 @@ export default function ITSlider({
|
|
|
45
45
|
disabled={disabled}
|
|
46
46
|
className={clsx(
|
|
47
47
|
"w-full h-1.5 appearance-none rounded-full outline-none cursor-pointer",
|
|
48
|
-
"bg-
|
|
48
|
+
"bg-secondary-200 dark:bg-secondary-700",
|
|
49
49
|
"accent-primary-500",
|
|
50
50
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
51
51
|
"[&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:h-4",
|
|
@@ -54,7 +54,7 @@ export default function ITSlider({
|
|
|
54
54
|
"[&::-webkit-slider-thumb]:hover:bg-primary-600 [&::-webkit-slider-thumb]:transition-colors",
|
|
55
55
|
"[&::-moz-range-thumb]:w-4 [&::-moz-range-thumb]:h-4 [&::-moz-range-thumb]:rounded-full",
|
|
56
56
|
"[&::-moz-range-thumb]:bg-primary-500 [&::-moz-range-thumb]:border-2 [&::-moz-range-thumb]:border-white",
|
|
57
|
-
"[&::-moz-range-track]:bg-
|
|
57
|
+
"[&::-moz-range-track]:bg-secondary-200 dark:[&::-moz-range-track]:bg-secondary-700",
|
|
58
58
|
"[&::-moz-range-track]:rounded-full [&::-moz-range-track]:h-1.5"
|
|
59
59
|
)}
|
|
60
60
|
/>
|
|
@@ -128,7 +128,7 @@ export default function ITStepper({
|
|
|
128
128
|
<div className={clsx("w-full max-w-5xl mx-auto px-4", containerClassName)}>
|
|
129
129
|
<div className="relative mb-8">
|
|
130
130
|
<div
|
|
131
|
-
className="absolute left-6 right-6 top-5 h-1 bg-
|
|
131
|
+
className="absolute left-6 right-6 top-5 h-1 bg-secondary-200 rounded-full z-0"
|
|
132
132
|
aria-hidden
|
|
133
133
|
/>
|
|
134
134
|
<div
|
|
@@ -161,7 +161,7 @@ export default function ITStepper({
|
|
|
161
161
|
hasIcon && "p-2",
|
|
162
162
|
isCompleted && "bg-slate-400 border-slate-400 text-white scale-100 shadow",
|
|
163
163
|
isActive && "text-white scale-110 shadow-lg",
|
|
164
|
-
!isActive && !isCompleted && "bg-white border-
|
|
164
|
+
!isActive && !isCompleted && "bg-white border-secondary-300 text-secondary-400"
|
|
165
165
|
)}
|
|
166
166
|
style={isActive ? { backgroundColor: resolvedColor, borderColor: resolvedColor } : undefined}
|
|
167
167
|
>
|
|
@@ -172,7 +172,7 @@ export default function ITStepper({
|
|
|
172
172
|
as="span"
|
|
173
173
|
className={clsx(
|
|
174
174
|
"mt-2 text-xs sm:text-sm font-medium transition-colors text-center",
|
|
175
|
-
isCompleted ? "text-slate-400" : !isActive && "text-
|
|
175
|
+
isCompleted ? "text-slate-400" : !isActive && "text-secondary-400"
|
|
176
176
|
)}
|
|
177
177
|
style={isActive ? { color: resolvedColor } : undefined}
|
|
178
178
|
>
|
|
@@ -193,7 +193,7 @@ export default function ITStepper({
|
|
|
193
193
|
aria-labelledby={`step-${currentStep}`}
|
|
194
194
|
className={clsx(
|
|
195
195
|
stepClassName,
|
|
196
|
-
"bg-white border border-
|
|
196
|
+
"bg-white border border-secondary-100 rounded-2xl shadow-lg min-h-[280px] transition-transform duration-400 no-scrollbar p-6",
|
|
197
197
|
scrollableContent && "overflow-y-auto hide-scrollbar"
|
|
198
198
|
)}
|
|
199
199
|
style={
|
|
@@ -220,7 +220,7 @@ export default function ITStepper({
|
|
|
220
220
|
</ITButton>
|
|
221
221
|
|
|
222
222
|
<div className="flex items-center gap-3">
|
|
223
|
-
<ITText as="div" className="text-sm text-
|
|
223
|
+
<ITText as="div" className="text-sm text-secondary-500 mr-2 hidden sm:block">
|
|
224
224
|
Paso {currentStep + 1} de {steps.length}
|
|
225
225
|
</ITText>
|
|
226
226
|
|
|
@@ -194,14 +194,14 @@ export default function ITTable<T extends Record<string, unknown>>({
|
|
|
194
194
|
aria-label={`${getToggleLabel()} para ${col.label}`}
|
|
195
195
|
title={`${getToggleLabel()} para ${col.label}`}
|
|
196
196
|
>
|
|
197
|
-
<div className="relative w-10 h-5 bg-
|
|
197
|
+
<div className="relative w-10 h-5 bg-secondary-300 rounded-full">
|
|
198
198
|
<div
|
|
199
199
|
className={clsx(
|
|
200
200
|
"absolute top-0.5 w-4 h-4 rounded-full transition-all duration-300 shadow-sm",
|
|
201
201
|
{
|
|
202
|
-
"left-0.5 bg-
|
|
202
|
+
"left-0.5 bg-secondary-400": currentValue === undefined,
|
|
203
203
|
"left-5 bg-slate-500": currentValue === true,
|
|
204
|
-
"left-0.5 bg-
|
|
204
|
+
"left-0.5 bg-secondary-500": currentValue === false,
|
|
205
205
|
}
|
|
206
206
|
)}
|
|
207
207
|
/>
|
|
@@ -39,8 +39,8 @@ const ITTabs: React.FC<ITTabsProps> = ({
|
|
|
39
39
|
<div className={clsx("w-full", containerClassName)}>
|
|
40
40
|
{/* HEADER */}
|
|
41
41
|
<div className={clsx(
|
|
42
|
-
"flex border-
|
|
43
|
-
variant === 'line' ? "border-b" : "gap-2 p-1 bg-
|
|
42
|
+
"flex border-secondary-200 mb-4",
|
|
43
|
+
variant === 'line' ? "border-b" : "gap-2 p-1 bg-secondary-100 rounded-lg w-fit",
|
|
44
44
|
className
|
|
45
45
|
)}>
|
|
46
46
|
{items.map((item) => {
|
|
@@ -58,14 +58,14 @@ const ITTabs: React.FC<ITTabsProps> = ({
|
|
|
58
58
|
"border-b-2 -mb-[2px]",
|
|
59
59
|
isActive
|
|
60
60
|
? "border-primary-500 text-primary-600"
|
|
61
|
-
: "border-transparent text-
|
|
61
|
+
: "border-transparent text-secondary-500 hover:text-secondary-700 hover:border-secondary-300",
|
|
62
62
|
],
|
|
63
63
|
// PILL VARIANT
|
|
64
64
|
variant === 'pill' && [
|
|
65
65
|
"rounded-md",
|
|
66
66
|
isActive
|
|
67
67
|
? "bg-white text-primary-600 shadow-sm"
|
|
68
|
-
: "text-
|
|
68
|
+
: "text-secondary-500 hover:text-secondary-700",
|
|
69
69
|
],
|
|
70
70
|
item.disabled && "opacity-50 cursor-not-allowed"
|
|
71
71
|
)}
|
|
@@ -60,9 +60,9 @@ export default function ITTextarea({
|
|
|
60
60
|
"focus:ring-2",
|
|
61
61
|
resizeMap[resize],
|
|
62
62
|
error
|
|
63
|
-
? "border-
|
|
64
|
-
: "border-
|
|
65
|
-
disabled && "opacity-50 cursor-not-allowed bg-
|
|
63
|
+
? "border-danger-500 ring-danger-100 focus:border-danger-500 focus:ring-danger-100"
|
|
64
|
+
: "border-secondary-300 focus:border-primary-500 focus:ring-primary-100",
|
|
65
|
+
disabled && "opacity-50 cursor-not-allowed bg-secondary-100 dark:bg-slate-800"
|
|
66
66
|
)}
|
|
67
67
|
/>
|
|
68
68
|
{error && <ITText as="span" className={inputError}>{error}</ITText>}
|