@axzydev/axzy_ui_system 1.3.2 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +29 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +29 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/table/table.tsx +2 -1
- package/src/components/organisms/data-table/dataTable.tsx +2 -1
- package/src/components/theme-provider/themePresets.ts +6 -0
- package/src/components/theme-provider/themeProvider.doc.mdx +1 -0
- package/src/components/theme-provider/themeProvider.props.ts +2 -0
- package/src/components/theme-provider/themeProvider.tsx +13 -2
- package/src/sandbox/LandingShowcase.tsx +416 -227
- package/src/theme/theme.types.ts +2 -0
- package/src/utils/styles.ts +3 -1
package/dist/index.d.cts
CHANGED
|
@@ -3708,6 +3708,8 @@ interface ITThemePalette$1 {
|
|
|
3708
3708
|
rowBg: string;
|
|
3709
3709
|
/** Text color of table body rows. @default "#1e293b" */
|
|
3710
3710
|
rowText: string;
|
|
3711
|
+
/** Background color applied to a table body row while the pointer is over it (hex). @default "#f1f5f9" */
|
|
3712
|
+
rowHover: string;
|
|
3711
3713
|
};
|
|
3712
3714
|
}
|
|
3713
3715
|
interface ITThemeProviderProps {
|
|
@@ -3776,6 +3778,8 @@ interface ITThemePalette {
|
|
|
3776
3778
|
rowBg: string;
|
|
3777
3779
|
/** Text color of table body rows. @default "#1e293b" */
|
|
3778
3780
|
rowText: string;
|
|
3781
|
+
/** Background color applied to a table body row while the pointer is over it (hex). @default "#f1f5f9" */
|
|
3782
|
+
rowHover: string;
|
|
3779
3783
|
};
|
|
3780
3784
|
}
|
|
3781
3785
|
type SemanticThemeColors = {
|
package/dist/index.d.ts
CHANGED
|
@@ -3708,6 +3708,8 @@ interface ITThemePalette$1 {
|
|
|
3708
3708
|
rowBg: string;
|
|
3709
3709
|
/** Text color of table body rows. @default "#1e293b" */
|
|
3710
3710
|
rowText: string;
|
|
3711
|
+
/** Background color applied to a table body row while the pointer is over it (hex). @default "#f1f5f9" */
|
|
3712
|
+
rowHover: string;
|
|
3711
3713
|
};
|
|
3712
3714
|
}
|
|
3713
3715
|
interface ITThemeProviderProps {
|
|
@@ -3776,6 +3778,8 @@ interface ITThemePalette {
|
|
|
3776
3778
|
rowBg: string;
|
|
3777
3779
|
/** Text color of table body rows. @default "#1e293b" */
|
|
3778
3780
|
rowText: string;
|
|
3781
|
+
/** Background color applied to a table body row while the pointer is over it (hex). @default "#f1f5f9" */
|
|
3782
|
+
rowHover: string;
|
|
3779
3783
|
};
|
|
3780
3784
|
}
|
|
3781
3785
|
type SemanticThemeColors = {
|
package/dist/index.js
CHANGED
|
@@ -2093,9 +2093,10 @@ function tableHeaderCell(className, density = "normal") {
|
|
|
2093
2093
|
return clsx11(densityStyles[density].header, "align-top", className);
|
|
2094
2094
|
}
|
|
2095
2095
|
var tableBody = "divide-y divide-secondary-100";
|
|
2096
|
-
var tableRow = "hover:bg-secondary-50
|
|
2096
|
+
var tableRow = "hover:bg-[var(--color-table-rowHover,var(--color-secondary-50))] transition-colors duration-150 group";
|
|
2097
2097
|
var tableRowClickable = "cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-inset";
|
|
2098
2098
|
var tableCardClickable = "cursor-pointer rounded-lg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500";
|
|
2099
|
+
var tableCardHover = "hover:bg-[var(--color-table-rowHover,var(--color-secondary-50))] transition-colors duration-150";
|
|
2099
2100
|
function tableCell(className, density = "normal") {
|
|
2100
2101
|
return clsx11(densityStyles[density].cell, "align-middle", className);
|
|
2101
2102
|
}
|
|
@@ -4286,7 +4287,7 @@ function ITDataTable({
|
|
|
4286
4287
|
effectiveView === "cards" ? /* @__PURE__ */ jsx21("div", { className: "p-4 space-y-3 max-h-[400px] overflow-y-auto", children: data.length > 0 ? data.map((row, i) => /* @__PURE__ */ jsx21(
|
|
4287
4288
|
"div",
|
|
4288
4289
|
{
|
|
4289
|
-
className: clsx21(onRowClick && !isLoading && tableCardClickable),
|
|
4290
|
+
className: clsx21(tableCardHover, onRowClick && !isLoading && tableCardClickable),
|
|
4290
4291
|
role: onRowClick && !isLoading ? "button" : void 0,
|
|
4291
4292
|
tabIndex: onRowClick && !isLoading ? 0 : void 0,
|
|
4292
4293
|
onClick: onRowClick && !isLoading ? handleRowClick(row) : void 0,
|
|
@@ -8231,7 +8232,7 @@ function ITTable({
|
|
|
8231
8232
|
effectiveView === "cards" ? /* @__PURE__ */ jsx59("div", { className: "p-4 space-y-3 max-h-[400px] overflow-y-auto", children: currentData.length > 0 ? currentData.map((row, i) => /* @__PURE__ */ jsx59(
|
|
8232
8233
|
"div",
|
|
8233
8234
|
{
|
|
8234
|
-
className: clsx43(onRowClick && tableCardClickable),
|
|
8235
|
+
className: clsx43(tableCardHover, onRowClick && tableCardClickable),
|
|
8235
8236
|
role: onRowClick ? "button" : void 0,
|
|
8236
8237
|
tabIndex: onRowClick ? 0 : void 0,
|
|
8237
8238
|
onClick: onRowClick ? handleRowClick(row) : void 0,
|
|
@@ -10178,8 +10179,10 @@ var DEFAULT_PALETTE = {
|
|
|
10178
10179
|
// Slate-700
|
|
10179
10180
|
rowBg: "#ffffff",
|
|
10180
10181
|
// White
|
|
10181
|
-
rowText: "#1e293b"
|
|
10182
|
+
rowText: "#1e293b",
|
|
10182
10183
|
// Slate-800
|
|
10184
|
+
rowHover: "#f1f5f9"
|
|
10185
|
+
// Slate-100
|
|
10183
10186
|
}
|
|
10184
10187
|
};
|
|
10185
10188
|
var PRESETS = [
|
|
@@ -10204,7 +10207,8 @@ var PRESETS = [
|
|
|
10204
10207
|
headerBg: "#f1f5f9",
|
|
10205
10208
|
headerText: "#334155",
|
|
10206
10209
|
rowBg: "#ffffff",
|
|
10207
|
-
rowText: "#0f172a"
|
|
10210
|
+
rowText: "#0f172a",
|
|
10211
|
+
rowHover: "#1e293b"
|
|
10208
10212
|
}
|
|
10209
10213
|
}
|
|
10210
10214
|
},
|
|
@@ -10229,7 +10233,8 @@ var PRESETS = [
|
|
|
10229
10233
|
headerBg: "#fff1f2",
|
|
10230
10234
|
headerText: "#881337",
|
|
10231
10235
|
rowBg: "#ffffff",
|
|
10232
|
-
rowText: "#1c1212"
|
|
10236
|
+
rowText: "#1c1212",
|
|
10237
|
+
rowHover: "#fff1f2"
|
|
10233
10238
|
}
|
|
10234
10239
|
}
|
|
10235
10240
|
},
|
|
@@ -10254,7 +10259,8 @@ var PRESETS = [
|
|
|
10254
10259
|
headerBg: "#f0fdfa",
|
|
10255
10260
|
headerText: "#115e59",
|
|
10256
10261
|
rowBg: "#ffffff",
|
|
10257
|
-
rowText: "#042f2e"
|
|
10262
|
+
rowText: "#042f2e",
|
|
10263
|
+
rowHover: "#f0fdfa"
|
|
10258
10264
|
}
|
|
10259
10265
|
}
|
|
10260
10266
|
},
|
|
@@ -10279,7 +10285,8 @@ var PRESETS = [
|
|
|
10279
10285
|
headerBg: "#fefce8",
|
|
10280
10286
|
headerText: "#713f12",
|
|
10281
10287
|
rowBg: "#ffffff",
|
|
10282
|
-
rowText: "#292524"
|
|
10288
|
+
rowText: "#292524",
|
|
10289
|
+
rowHover: "#fefce8"
|
|
10283
10290
|
}
|
|
10284
10291
|
}
|
|
10285
10292
|
},
|
|
@@ -10304,7 +10311,8 @@ var PRESETS = [
|
|
|
10304
10311
|
headerBg: "#f0fdf4",
|
|
10305
10312
|
headerText: "#166534",
|
|
10306
10313
|
rowBg: "#ffffff",
|
|
10307
|
-
rowText: "#052e16"
|
|
10314
|
+
rowText: "#052e16",
|
|
10315
|
+
rowHover: "#f0fdf4"
|
|
10308
10316
|
}
|
|
10309
10317
|
}
|
|
10310
10318
|
}
|
|
@@ -10584,6 +10592,7 @@ function ITThemeProvider({
|
|
|
10584
10592
|
let tableRowText = palette2.table.rowText;
|
|
10585
10593
|
let tableHeaderBg = palette2.table.headerBg;
|
|
10586
10594
|
let tableHeaderText = palette2.table.headerText;
|
|
10595
|
+
let tableRowHover = palette2.table.rowHover;
|
|
10587
10596
|
let navbarBg = palette2.layout.navbarBg;
|
|
10588
10597
|
let navbarText = palette2.layout.navbarText;
|
|
10589
10598
|
let sidebarBg = palette2.layout.sidebarBg;
|
|
@@ -10601,6 +10610,9 @@ function ITThemeProvider({
|
|
|
10601
10610
|
if (!isLightColor2(tableHeaderText)) {
|
|
10602
10611
|
tableHeaderText = `color-mix(in srgb, ${palette2.table.headerText} 20%, #f9fafb)`;
|
|
10603
10612
|
}
|
|
10613
|
+
if (isLightColor2(tableRowHover)) {
|
|
10614
|
+
tableRowHover = `color-mix(in srgb, ${palette2.table.rowHover} 12%, #1f2937)`;
|
|
10615
|
+
}
|
|
10604
10616
|
if (isLightColor2(navbarBg)) {
|
|
10605
10617
|
navbarBg = `color-mix(in srgb, ${palette2.layout.navbarBg} 8%, #111827)`;
|
|
10606
10618
|
}
|
|
@@ -10626,7 +10638,10 @@ function ITThemeProvider({
|
|
|
10626
10638
|
}
|
|
10627
10639
|
if (isLightColor2(tableHeaderText)) {
|
|
10628
10640
|
tableHeaderText = `color-mix(in srgb, ${palette2.table.headerText} 30%, #334155)`;
|
|
10629
|
-
} else if (!isLightColor2(tableHeaderText) && isVeryDarkColor(
|
|
10641
|
+
} else if (!isLightColor2(tableHeaderText) && isVeryDarkColor(tableHeaderText)) {
|
|
10642
|
+
}
|
|
10643
|
+
if (!isLightColor2(tableRowHover)) {
|
|
10644
|
+
tableRowHover = isVeryDarkColor(palette2.table.rowHover) ? "#f1f5f9" : `color-mix(in srgb, ${palette2.table.rowHover} 12%, #f8fafc)`;
|
|
10630
10645
|
}
|
|
10631
10646
|
if (!isLightColor2(navbarBg)) {
|
|
10632
10647
|
navbarBg = isVeryDarkColor(palette2.layout.navbarBg) ? "#ffffff" : `color-mix(in srgb, ${palette2.layout.navbarBg} 8%, #ffffff)`;
|
|
@@ -10836,6 +10851,7 @@ function ITThemeProvider({
|
|
|
10836
10851
|
--color-table-headerText: ${tableHeaderText} !important;
|
|
10837
10852
|
--color-table-rowBg: ${tableRowBg} !important;
|
|
10838
10853
|
--color-table-rowText: ${tableRowText} !important;
|
|
10854
|
+
--color-table-rowHover: ${tableRowHover} !important;
|
|
10839
10855
|
|
|
10840
10856
|
/* Native library variables integration */
|
|
10841
10857
|
--it-sidebar-bg: var(--color-sidebarBg);
|
|
@@ -11179,7 +11195,7 @@ function ITThemeProvider({
|
|
|
11179
11195
|
color: var(--color-table-rowText) !important;
|
|
11180
11196
|
}
|
|
11181
11197
|
tbody tr:hover {
|
|
11182
|
-
background-color:
|
|
11198
|
+
background-color: var(--color-table-rowHover) !important;
|
|
11183
11199
|
}
|
|
11184
11200
|
|
|
11185
11201
|
/* Animation for Saved Indicator */
|
|
@@ -11941,7 +11957,8 @@ function ITThemeProvider({
|
|
|
11941
11957
|
"table.headerBg",
|
|
11942
11958
|
"table.headerText",
|
|
11943
11959
|
"table.rowBg",
|
|
11944
|
-
"table.rowText"
|
|
11960
|
+
"table.rowText",
|
|
11961
|
+
"table.rowHover"
|
|
11945
11962
|
].map((key) => /* @__PURE__ */ jsx71(ColorRow, { colorKey: key }, key)) })
|
|
11946
11963
|
}
|
|
11947
11964
|
]
|