@axzydev/axzy_ui_system 1.7.4 → 1.8.1

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.
Files changed (35) hide show
  1. package/dist/index.cjs +224 -110
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +1 -1
  4. package/dist/index.d.cts +22 -5
  5. package/dist/index.d.ts +22 -5
  6. package/dist/index.js +220 -107
  7. package/dist/index.js.map +1 -1
  8. package/dist/layered.css +1 -1
  9. package/package.json +1 -1
  10. package/src/components/atoms/button/button.tsx +7 -0
  11. package/src/components/atoms/input/input.tsx +5 -0
  12. package/src/components/atoms/segmented-control/segmented-control.tsx +22 -5
  13. package/src/components/molecules/card/card.props.ts +12 -0
  14. package/src/components/molecules/card/card.tsx +52 -22
  15. package/src/components/molecules/chip-input/chip-input.tsx +2 -0
  16. package/src/components/molecules/multi-select/multi-select.tsx +2 -0
  17. package/src/components/molecules/tabs/tabs.tsx +22 -8
  18. package/src/components/organisms/data-table/dataTable.tsx +29 -3
  19. package/src/components/organisms/page-header/page-header.tsx +22 -6
  20. package/src/components/organisms/sidebar/sidebar.tsx +8 -5
  21. package/src/components/organisms/topbar/topbar.props.ts +2 -0
  22. package/src/components/organisms/topbar/topbar.tsx +56 -34
  23. package/src/components/templates/layout/layout.tsx +3 -2
  24. package/src/components/theme-provider/themeProvider.props.ts +1 -1
  25. package/src/components/theme-provider/themeProvider.tsx +54 -1
  26. package/src/index.ts +4 -4
  27. package/src/json-renderer/catalog/axzyCatalog.ts +5 -0
  28. package/src/sandbox/axzyConfig.test.ts +4 -0
  29. package/src/sandbox/axzyConfig.ts +1 -1
  30. package/src/sandbox/i18n.ts +6 -0
  31. package/src/showcases/FeedbackShowcases.tsx +2 -1
  32. package/src/showcases/StructureShowcases.tsx +17 -2
  33. package/src/theme/theme-context.ts +10 -2
  34. package/src/theme/theme.ts +1 -1
  35. package/src/theme/theme.types.ts +2 -1
package/dist/index.cjs CHANGED
@@ -146,6 +146,7 @@ __export(index_exports, {
146
146
  useDebouncedSearch: () => useDebouncedSearch,
147
147
  useEditableRow: () => useEditableRow,
148
148
  useFloatingPanel: () => useFloatingPanel,
149
+ useITAppearance: () => useITAppearance,
149
150
  useITFlatAppearance: () => useITFlatAppearance,
150
151
  useITTheme: () => useITTheme,
151
152
  useITThemeSafe: () => useITThemeSafe,
@@ -520,7 +521,7 @@ var buttonIconPadding = {
520
521
 
521
522
  // src/components/atoms/button/button.tsx
522
523
  var import_clsx = __toESM(require("clsx"), 1);
523
- var import_react6 = require("react");
524
+ var import_react7 = require("react");
524
525
 
525
526
  // src/theme/theme.ts
526
527
  var inputSizeTokens = {
@@ -859,7 +860,7 @@ var components = {
859
860
  input: {
860
861
  backgroundColor: "var(--it-input-bg, #ffffff)",
861
862
  borderColor: `var(--it-input-border, ${semanticColors.gray[300]})`,
862
- borderRadius: "var(--radius-md)",
863
+ borderRadius: "var(--it-input-radius, var(--radius-md))",
863
864
  focus: {
864
865
  borderColor: `var(--it-input-focus-border, ${semanticColors.primary[500]})`,
865
866
  ring: `var(--it-input-focus-ring, 0 0 0 3px ${semanticColors.primary[100]})`
@@ -1028,6 +1029,26 @@ function ITText({
1028
1029
  );
1029
1030
  }
1030
1031
 
1032
+ // src/theme/theme-context.ts
1033
+ var import_react6 = require("react");
1034
+ var ITThemeContext = (0, import_react6.createContext)(void 0);
1035
+ var useITTheme = () => {
1036
+ const context = (0, import_react6.useContext)(ITThemeContext);
1037
+ if (!context) {
1038
+ throw new Error("useITTheme must be used within an ITThemeProvider");
1039
+ }
1040
+ return context;
1041
+ };
1042
+ var useITThemeSafe = () => {
1043
+ return (0, import_react6.useContext)(ITThemeContext);
1044
+ };
1045
+ var useITAppearance = () => {
1046
+ return (0, import_react6.useContext)(ITThemeContext)?.appearance ?? "soft";
1047
+ };
1048
+ var useITFlatAppearance = () => {
1049
+ return useITAppearance() === "flat";
1050
+ };
1051
+
1031
1052
  // src/components/atoms/button/button.tsx
1032
1053
  var import_jsx_runtime2 = (
1033
1054
  // Icono solo: sin wrapper con `gap` ni `ITText` vacío, que lo desplazaban a la izquierda.
@@ -1047,8 +1068,9 @@ function ITButton({
1047
1068
  ariaLabel,
1048
1069
  title
1049
1070
  }) {
1050
- const [isHovered, setIsHovered] = (0, import_react6.useState)(false);
1051
- const [isFocused, setIsFocused] = (0, import_react6.useState)(false);
1071
+ const [isHovered, setIsHovered] = (0, import_react7.useState)(false);
1072
+ const [isFocused, setIsFocused] = (0, import_react7.useState)(false);
1073
+ const bento = useITAppearance() === "bento";
1052
1074
  const isIconOnly = variant === "icon-only";
1053
1075
  const isIconOnlyContent = isIconOnly && Boolean(icon) && !children;
1054
1076
  const themeBtn = theme.button;
@@ -1068,6 +1090,9 @@ function ITButton({
1068
1090
  // Default from theme
1069
1091
  transition: themeConfig.transition || "all 0.2s"
1070
1092
  };
1093
+ if (bento) {
1094
+ style.borderRadius = `var(--it-bento-pill-radius, ${themeConfig.borderRadius})`;
1095
+ }
1071
1096
  if (variant === "rounded") {
1072
1097
  style.borderRadius = "9999px";
1073
1098
  }
@@ -1133,23 +1158,6 @@ function ITButton({
1133
1158
  var import_clsx2 = __toESM(require("clsx"), 1);
1134
1159
  var import_react11 = require("react");
1135
1160
 
1136
- // src/theme/theme-context.ts
1137
- var import_react7 = require("react");
1138
- var ITThemeContext = (0, import_react7.createContext)(void 0);
1139
- var useITTheme = () => {
1140
- const context = (0, import_react7.useContext)(ITThemeContext);
1141
- if (!context) {
1142
- throw new Error("useITTheme must be used within an ITThemeProvider");
1143
- }
1144
- return context;
1145
- };
1146
- var useITThemeSafe = () => {
1147
- return (0, import_react7.useContext)(ITThemeContext);
1148
- };
1149
- var useITFlatAppearance = () => {
1150
- return (0, import_react7.useContext)(ITThemeContext)?.appearance === "flat";
1151
- };
1152
-
1153
1161
  // src/i18n/provider.tsx
1154
1162
  var import_react9 = require("react");
1155
1163
 
@@ -1656,6 +1664,7 @@ function useITTranslation() {
1656
1664
  var import_jsx_runtime4 = require("react/jsx-runtime");
1657
1665
  function ITCard({
1658
1666
  title,
1667
+ tone,
1659
1668
  headerActions,
1660
1669
  image,
1661
1670
  alt,
@@ -1670,26 +1679,35 @@ function ITCard({
1670
1679
  }) {
1671
1680
  const { t } = useITTranslation();
1672
1681
  const [isHovered, setIsHovered] = (0, import_react11.useState)(false);
1673
- const flat = useITFlatAppearance();
1682
+ const appearance = useITAppearance();
1683
+ const bento = appearance === "bento";
1684
+ const flat = appearance === "flat";
1674
1685
  const resolvedAlt = alt ?? t("card.imageAlt");
1675
1686
  const containerStyle = {
1676
1687
  backgroundColor: "var(--it-card-bg, #ffffff)",
1677
- borderColor: flat ? "var(--it-card-flat-border, var(--color-secondary-200))" : "var(--it-card-border, rgba(15, 23, 42, 0.06))",
1678
- borderWidth: "1px",
1688
+ borderColor: bento ? "transparent" : flat ? "var(--it-card-flat-border, var(--color-secondary-200))" : "var(--it-card-border, rgba(15, 23, 42, 0.06))",
1689
+ borderWidth: bento ? "0px" : "1px",
1679
1690
  borderStyle: "solid",
1680
- borderRadius: flat ? "var(--it-card-radius, var(--radius-lg))" : "var(--it-card-radius, var(--radius-2xl))",
1691
+ borderRadius: bento ? "var(--it-card-radius, var(--it-bento-card-radius, var(--radius-2xl)))" : flat ? "var(--it-card-radius, var(--radius-lg))" : "var(--it-card-radius, var(--radius-2xl))",
1681
1692
  // Soft depth: every card floats a little at rest; interactive cards
1682
1693
  // gain visual weight on hover instead of appearing flat until clicked.
1683
1694
  // Flat appearance: the hairline border carries the surface, so a card
1684
1695
  // only gets a shadow as hover feedback when it is clickable.
1685
- boxShadow: flat ? onClick && isHovered ? "var(--shadow-sm)" : "none" : onClick ? isHovered ? "var(--shadow-lg)" : "var(--shadow-sm)" : "var(--shadow-sm)",
1696
+ // Bento: borderless, a diffuse shadow at rest and a stronger one on hover.
1697
+ boxShadow: bento ? onClick && isHovered ? "var(--it-bento-card-shadow-hover, var(--shadow-lg))" : "var(--it-bento-card-shadow, var(--shadow-sm))" : flat ? onClick && isHovered ? "var(--shadow-sm)" : "none" : onClick ? isHovered ? "var(--shadow-lg)" : "var(--shadow-sm)" : "var(--shadow-sm)",
1686
1698
  transition: onClick ? "box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out" : "none",
1687
- transform: onClick && isHovered && !flat ? "translateY(-2px)" : "translateY(0)",
1699
+ transform: onClick && isHovered && !flat && !bento ? "translateY(-2px)" : "translateY(0)",
1688
1700
  cursor: onClick ? "pointer" : "default"
1689
1701
  };
1702
+ if (tone) {
1703
+ const soft = `var(--color-${tone}-soft)`;
1704
+ containerStyle.backgroundImage = `linear-gradient(${soft}, ${soft})`;
1705
+ if (!bento) containerStyle.borderColor = `var(--color-${tone}-soft-border)`;
1706
+ }
1690
1707
  const bodyStyle = {
1691
- padding: "1.25rem"
1708
+ padding: bento ? "var(--it-bento-card-padding, 1.5rem)" : "1.25rem"
1692
1709
  };
1710
+ const titleTypography = bento ? "text-lg font-bold" : flat ? "text-base font-semibold" : "text-xl font-semibold";
1693
1711
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1694
1712
  "div",
1695
1713
  {
@@ -1721,7 +1739,7 @@ function ITCard({
1721
1739
  ITText,
1722
1740
  {
1723
1741
  as: "h3",
1724
- className: (0, import_clsx2.default)(flat ? "text-base font-semibold" : "text-xl font-semibold", titleClassName),
1742
+ className: (0, import_clsx2.default)(titleTypography, titleClassName),
1725
1743
  children: title
1726
1744
  }
1727
1745
  ),
@@ -1730,7 +1748,7 @@ function ITCard({
1730
1748
  ITText,
1731
1749
  {
1732
1750
  as: "h3",
1733
- className: (0, import_clsx2.default)(flat ? "text-base font-semibold mb-3" : "text-xl font-semibold mb-2", titleClassName),
1751
+ className: (0, import_clsx2.default)(titleTypography, flat ? "mb-3" : bento ? "mb-4" : "mb-2", titleClassName),
1734
1752
  children: title
1735
1753
  }
1736
1754
  ) : null,
@@ -3172,6 +3190,7 @@ function ITChipInput({
3172
3190
  style.alignItems = "center";
3173
3191
  style.gap = "0.375rem";
3174
3192
  style.minHeight = "2.5rem";
3193
+ style.borderRadius = "var(--it-bento-field-radius, var(--radius-md))";
3175
3194
  if (disabled) {
3176
3195
  style.backgroundColor = inputTheme.disabled?.backgroundColor || style.backgroundColor;
3177
3196
  style.borderColor = inputTheme.disabled?.borderColor || style.borderColor;
@@ -3568,6 +3587,9 @@ function ITInput({
3568
3587
  const inputTheme = theme.input || {};
3569
3588
  const getStyle = () => {
3570
3589
  const style = inputFieldStyle(inputTheme, size);
3590
+ if (isTextArea) {
3591
+ style.borderRadius = "var(--it-bento-field-radius, var(--radius-md))";
3592
+ }
3571
3593
  if (disabled) {
3572
3594
  style.backgroundColor = inputTheme.disabled?.backgroundColor || style.backgroundColor;
3573
3595
  style.borderColor = inputTheme.disabled?.borderColor || style.borderColor;
@@ -4250,6 +4272,7 @@ function ITMultiSelect({
4250
4272
  style.alignItems = "center";
4251
4273
  style.gap = "0.375rem";
4252
4274
  style.minHeight = "2.5rem";
4275
+ style.borderRadius = "var(--it-bento-field-radius, var(--radius-md))";
4253
4276
  if (disabled) {
4254
4277
  style.backgroundColor = inputTheme.disabled?.backgroundColor || style.backgroundColor;
4255
4278
  style.borderColor = inputTheme.disabled?.borderColor || style.borderColor;
@@ -5526,6 +5549,20 @@ function ITDataTable({
5526
5549
  const isTableVirtual = virtualized && effectiveView === "table";
5527
5550
  const isStickyHeader = stickyHeader && isTableVirtual;
5528
5551
  const resolvedRowHeight = rowHeight ?? getRowHeight(size, density);
5552
+ const headRef = (0, import_react29.useRef)(null);
5553
+ const [headHeight, setHeadHeight] = (0, import_react29.useState)(0);
5554
+ (0, import_react29.useEffect)(() => {
5555
+ if (!isTableVirtual) return;
5556
+ const el = headRef.current;
5557
+ if (!el) return;
5558
+ const measure = () => setHeadHeight(el.getBoundingClientRect().height);
5559
+ measure();
5560
+ if (typeof ResizeObserver === "undefined") return;
5561
+ const ro = new ResizeObserver(measure);
5562
+ ro.observe(el);
5563
+ return () => ro.disconnect();
5564
+ }, [isTableVirtual, resolvedRowHeight]);
5565
+ const snappedMaxHeight = isTableVirtual && headHeight > 0 ? headHeight + Math.max(1, Math.floor((virtualizedMaxHeight - headHeight) / resolvedRowHeight)) * resolvedRowHeight : virtualizedMaxHeight;
5529
5566
  const columnCount = columns.length;
5530
5567
  const pinnedMeta = import_react29.default.useMemo(() => getPinnedColumnMeta(columns), [columns]);
5531
5568
  const scrollOuterClass = isTableVirtual ? "relative min-h-[200px]" : "overflow-x-auto relative min-h-[200px]";
@@ -5825,7 +5862,7 @@ function ITDataTable({
5825
5862
  },
5826
5863
  col.key
5827
5864
  )) }),
5828
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5865
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("thead", { ref: headRef, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5829
5866
  "tr",
5830
5867
  {
5831
5868
  className: (0, import_clsx27.default)(tableHeaderRow, "dark:text-slate-200", headerSlot.className),
@@ -5891,7 +5928,10 @@ function ITDataTable({
5891
5928
  onRowClick && !isLoading && tableRowClickable,
5892
5929
  rowSlot.className
5893
5930
  ),
5894
- style: rowSlot.style,
5931
+ style: {
5932
+ ...isTableVirtual ? { height: resolvedRowHeight } : null,
5933
+ ...rowSlot.style
5934
+ },
5895
5935
  tabIndex: onRowClick && !isLoading ? 0 : void 0,
5896
5936
  onClick: onRowClick && !isLoading ? handleRowClick(row) : void 0,
5897
5937
  onKeyDown: onRowClick && !isLoading ? handleRowKeyDown(row) : void 0,
@@ -5988,7 +6028,7 @@ function ITDataTable({
5988
6028
  {
5989
6029
  ref: scrollRef,
5990
6030
  className: "overflow-x-auto overflow-y-auto",
5991
- style: { maxHeight: virtualizedMaxHeight },
6031
+ style: { maxHeight: snappedMaxHeight },
5992
6032
  children: tableEl
5993
6033
  }
5994
6034
  ) : tableEl
@@ -7471,7 +7511,9 @@ function ITPageHeader({
7471
7511
  }) {
7472
7512
  const { t } = useITTranslation();
7473
7513
  const showTopRow = breadcrumbs?.length || backAction;
7474
- const flat = useITFlatAppearance();
7514
+ const appearance = useITAppearance();
7515
+ const bento = appearance === "bento";
7516
+ const flat = appearance === "flat";
7475
7517
  return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: `${className} space-y-3`, children: [
7476
7518
  showTopRow && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
7477
7519
  /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-center gap-2 min-w-0", children: [
@@ -7479,7 +7521,8 @@ function ITPageHeader({
7479
7521
  "button",
7480
7522
  {
7481
7523
  onClick: backAction,
7482
- className: "flex items-center justify-center w-9 h-9 rounded-full border border-slate-200 dark:border-slate-700 text-slate-400 hover:text-slate-700 dark:hover:text-slate-200 hover:border-slate-300 dark:hover:border-slate-600 hover:bg-slate-50 dark:hover:bg-slate-800/60 transition-all duration-200 flex-shrink-0",
7524
+ className: bento ? "flex items-center justify-center w-10 h-10 rounded-full hover:opacity-80 transition-opacity duration-200 flex-shrink-0" : "flex items-center justify-center w-9 h-9 rounded-full border border-slate-200 dark:border-slate-700 text-slate-400 hover:text-slate-700 dark:hover:text-slate-200 hover:border-slate-300 dark:hover:border-slate-600 hover:bg-slate-50 dark:hover:bg-slate-800/60 transition-all duration-200 flex-shrink-0",
7525
+ style: bento ? { backgroundColor: "var(--it-bento-control-bg, #f1f5f9)", color: "var(--it-bento-control-text, #475569)" } : void 0,
7483
7526
  "aria-label": t("pageHeader.back"),
7484
7527
  children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_fa21.FaChevronLeft, { size: 14 })
7485
7528
  }
@@ -7490,7 +7533,7 @@ function ITPageHeader({
7490
7533
  ] }),
7491
7534
  /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-start justify-between gap-6", children: [
7492
7535
  /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-start gap-4 min-w-0", children: [
7493
- icon && !flat && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
7536
+ icon && !flat && !bento && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
7494
7537
  "div",
7495
7538
  {
7496
7539
  className: "flex items-center justify-center w-12 h-12 rounded-full border border-slate-200 dark:border-slate-700 bg-slate-50/50 dark:bg-slate-800/50 text-slate-600 dark:text-slate-300 flex-shrink-0 transition-all duration-200 hover:border-slate-300 dark:hover:border-slate-500 hover:shadow-sm",
@@ -7503,7 +7546,7 @@ function ITPageHeader({
7503
7546
  ITText,
7504
7547
  {
7505
7548
  as: "h1",
7506
- className: flat ? "text-[1.625rem] font-bold text-slate-900 dark:text-white tracking-tight leading-tight" : "text-3xl font-bold text-slate-800 dark:text-white tracking-tight leading-tight",
7549
+ className: bento ? "text-3xl font-bold text-slate-900 dark:text-white tracking-tighter leading-tight" : flat ? "text-[1.625rem] font-bold text-slate-900 dark:text-white tracking-tight leading-tight" : "text-3xl font-bold text-slate-800 dark:text-white tracking-tight leading-tight",
7507
7550
  children: title
7508
7551
  }
7509
7552
  ),
@@ -7511,7 +7554,7 @@ function ITPageHeader({
7511
7554
  ITText,
7512
7555
  {
7513
7556
  as: "p",
7514
- className: flat ? "text-sm font-normal text-slate-500 dark:text-slate-400 mt-0.5 leading-relaxed" : "text-sm font-light text-slate-500 dark:text-slate-400 mt-1 leading-relaxed",
7557
+ className: bento ? "text-sm font-normal text-slate-500 dark:text-slate-400 mt-1.5 leading-relaxed" : flat ? "text-sm font-normal text-slate-500 dark:text-slate-400 mt-0.5 leading-relaxed" : "text-sm font-light text-slate-500 dark:text-slate-400 mt-1 leading-relaxed",
7515
7558
  children: description
7516
7559
  }
7517
7560
  )
@@ -8423,16 +8466,19 @@ function ITSegmentedControl({
8423
8466
  disabled = false
8424
8467
  }) {
8425
8468
  const { button, container } = sizeMap3[size];
8469
+ const bento = useITAppearance() === "bento";
8426
8470
  return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
8427
8471
  "div",
8428
8472
  {
8429
8473
  role: "group",
8430
8474
  className: (0, import_clsx40.default)(
8431
- "inline-flex rounded-xl bg-slate-100 dark:bg-slate-800 border border-slate-200 dark:border-slate-700",
8475
+ "inline-flex",
8476
+ bento ? "rounded-full" : "rounded-xl bg-slate-100 dark:bg-slate-800 border border-slate-200 dark:border-slate-700",
8432
8477
  container,
8433
8478
  disabled && "opacity-50 cursor-not-allowed",
8434
8479
  className
8435
8480
  ),
8481
+ style: bento ? { backgroundColor: "var(--it-bento-control-bg, #f1f5f9)" } : void 0,
8436
8482
  children: options.map((opt) => {
8437
8483
  const isActive = opt.value === value;
8438
8484
  return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
@@ -8444,10 +8490,14 @@ function ITSegmentedControl({
8444
8490
  disabled,
8445
8491
  className: (0, import_clsx40.default)(
8446
8492
  button,
8447
- "rounded-lg font-semibold transition-all flex items-center gap-1.5",
8448
- isActive ? "bg-white dark:bg-slate-700 text-slate-800 dark:text-white shadow-sm border border-slate-200 dark:border-slate-600" : "text-slate-500 dark:text-slate-400 hover:text-slate-700 dark:hover:text-slate-300 border border-transparent",
8493
+ "font-semibold transition-all flex items-center gap-1.5",
8494
+ bento ? "rounded-full border border-transparent" : isActive ? "rounded-lg bg-white dark:bg-slate-700 text-slate-800 dark:text-white shadow-sm border border-slate-200 dark:border-slate-600" : "rounded-lg text-slate-500 dark:text-slate-400 hover:text-slate-700 dark:hover:text-slate-300 border border-transparent",
8449
8495
  disabled && "pointer-events-none"
8450
8496
  ),
8497
+ style: bento ? {
8498
+ backgroundColor: isActive ? "var(--it-bento-ink-bg, #0f172a)" : "transparent",
8499
+ color: isActive ? "var(--it-bento-ink-text, #ffffff)" : "var(--it-bento-control-text, #475569)"
8500
+ } : void 0,
8451
8501
  children: [
8452
8502
  opt.icon && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { children: opt.icon }),
8453
8503
  /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(ITText, { as: "span", children: opt.label })
@@ -8500,7 +8550,9 @@ function ITSidebar({
8500
8550
  onToggleCollapse,
8501
8551
  expandOnHover = true
8502
8552
  }) {
8503
- const flat = useITFlatAppearance();
8553
+ const appearance = useITAppearance();
8554
+ const bento = appearance === "bento";
8555
+ const flat = appearance === "flat" || bento;
8504
8556
  const { t } = useITTranslation();
8505
8557
  const [expandedItems, setExpandedItems] = (0, import_react41.useState)(/* @__PURE__ */ new Set());
8506
8558
  const [isHovering, setIsHovering] = (0, import_react41.useState)(false);
@@ -8592,7 +8644,7 @@ function ITSidebar({
8592
8644
  color: subitem.isActive ? "var(--it-sidebar-active-color, var(--color-secondary-900))" : "var(--it-sidebar-label-color, var(--color-secondary-600))",
8593
8645
  backgroundColor: subitem.isActive ? "var(--it-sidebar-active-bg, var(--color-secondary-50))" : "transparent",
8594
8646
  fontSize: flat ? "0.84rem" : "0.78rem",
8595
- fontWeight: subitem.isActive ? 600 : 500,
8647
+ fontWeight: subitem.isActive ? bento ? 700 : 600 : 500,
8596
8648
  letterSpacing: "0.01em",
8597
8649
  marginLeft: subitemConnector === "|" ? "-1px" : "0"
8598
8650
  },
@@ -8749,7 +8801,7 @@ function ITSidebar({
8749
8801
  style: {
8750
8802
  zIndex: 50,
8751
8803
  backgroundColor: "var(--it-sidebar-bg, rgba(255, 255, 255, 0.90))",
8752
- borderRight: "1px solid var(--it-sidebar-border, var(--color-secondary-200))",
8804
+ borderRight: bento ? "none" : "1px solid var(--it-sidebar-border, var(--color-secondary-200))",
8753
8805
  ...flat ? {} : { WebkitBackdropFilter: "blur(12px)", backdropFilter: "blur(12px)" }
8754
8806
  },
8755
8807
  children: [
@@ -8843,7 +8895,7 @@ function ITSidebar({
8843
8895
  style: {
8844
8896
  color: active ? "var(--it-sidebar-active-color, #ffffff)" : "var(--it-sidebar-label-color, var(--color-secondary-300))",
8845
8897
  fontSize: flat ? "0.875rem" : "0.8rem",
8846
- fontWeight: active ? "600" : "500"
8898
+ fontWeight: active ? bento ? "700" : "600" : "500"
8847
8899
  },
8848
8900
  children: item.label
8849
8901
  }
@@ -10006,6 +10058,7 @@ var ITTabs = ({
10006
10058
  className = "",
10007
10059
  containerClassName = ""
10008
10060
  }) => {
10061
+ const bento = useITAppearance() === "bento" && variant === "pill";
10009
10062
  const [activeId, setActiveId] = (0, import_react46.useState)(defaultActiveId || items[0]?.id);
10010
10063
  const handleTabClick = (id, disabled) => {
10011
10064
  if (disabled) return;
@@ -10014,39 +10067,50 @@ var ITTabs = ({
10014
10067
  };
10015
10068
  const activeContent = items.find((item) => item.id === activeId)?.content;
10016
10069
  return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: (0, import_clsx47.clsx)("w-full", containerClassName), children: [
10017
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: (0, import_clsx47.clsx)(
10018
- "flex border-secondary-200 mb-4",
10019
- variant === "line" ? "border-b" : "gap-2 p-1 bg-secondary-100 rounded-lg w-fit",
10020
- className
10021
- ), children: items.map((item) => {
10022
- const isActive = item.id === activeId;
10023
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
10024
- "button",
10025
- {
10026
- onClick: () => handleTabClick(item.id, item.disabled),
10027
- disabled: item.disabled,
10028
- className: (0, import_clsx47.clsx)(
10029
- "flex items-center gap-2 px-4 py-2 text-sm font-medium transition-all duration-200 outline-none",
10030
- // LINE VARIANT
10031
- variant === "line" && [
10032
- "border-b-2 -mb-[2px]",
10033
- isActive ? "border-primary-500 text-primary-600" : "border-transparent text-secondary-500 hover:text-secondary-700 hover:border-secondary-300"
10034
- ],
10035
- // PILL VARIANT
10036
- variant === "pill" && [
10037
- "rounded-md",
10038
- isActive ? "bg-white text-primary-600 shadow-sm" : "text-secondary-500 hover:text-secondary-700"
10039
- ],
10040
- item.disabled && "opacity-50 cursor-not-allowed"
10041
- ),
10042
- children: [
10043
- item.icon && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "w-4 h-4", children: item.icon }),
10044
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(ITText, { as: "span", children: item.label })
10045
- ]
10046
- },
10047
- item.id
10048
- );
10049
- }) }),
10070
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
10071
+ "div",
10072
+ {
10073
+ className: (0, import_clsx47.clsx)(
10074
+ "flex border-secondary-200 mb-4",
10075
+ variant === "line" ? "border-b" : bento ? "gap-2 p-1 rounded-full w-fit" : "gap-2 p-1 bg-secondary-100 rounded-lg w-fit",
10076
+ className
10077
+ ),
10078
+ style: bento ? { backgroundColor: "var(--it-bento-control-bg, #f1f5f9)", borderColor: "transparent" } : void 0,
10079
+ children: items.map((item) => {
10080
+ const isActive = item.id === activeId;
10081
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
10082
+ "button",
10083
+ {
10084
+ onClick: () => handleTabClick(item.id, item.disabled),
10085
+ disabled: item.disabled,
10086
+ className: (0, import_clsx47.clsx)(
10087
+ "flex items-center gap-2 px-4 py-2 text-sm font-medium transition-all duration-200 outline-none",
10088
+ // LINE VARIANT
10089
+ variant === "line" && [
10090
+ "border-b-2 -mb-[2px]",
10091
+ isActive ? "border-primary-500 text-primary-600" : "border-transparent text-secondary-500 hover:text-secondary-700 hover:border-secondary-300"
10092
+ ],
10093
+ // PILL VARIANT
10094
+ variant === "pill" && (bento ? "rounded-full" : [
10095
+ "rounded-md",
10096
+ isActive ? "bg-white text-primary-600 shadow-sm" : "text-secondary-500 hover:text-secondary-700"
10097
+ ]),
10098
+ item.disabled && "opacity-50 cursor-not-allowed"
10099
+ ),
10100
+ style: bento ? {
10101
+ backgroundColor: isActive ? "var(--it-bento-ink-bg, #0f172a)" : "transparent",
10102
+ color: isActive ? "var(--it-bento-ink-text, #ffffff)" : "var(--it-bento-control-text, #475569)"
10103
+ } : void 0,
10104
+ children: [
10105
+ item.icon && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "w-4 h-4", children: item.icon }),
10106
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(ITText, { as: "span", children: item.label })
10107
+ ]
10108
+ },
10109
+ item.id
10110
+ );
10111
+ })
10112
+ }
10113
+ ),
10050
10114
  /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "tab-content animate-fadeIn", children: activeContent })
10051
10115
  ] });
10052
10116
  };
@@ -12511,6 +12575,11 @@ var AXZY_CATALOG_ENTRIES = [
12511
12575
  summary: "Tarjeta con t\xEDtulo, imagen y contenido.",
12512
12576
  props: {
12513
12577
  title: { kind: "string" },
12578
+ tone: {
12579
+ kind: "enum",
12580
+ values: ["primary", "secondary", "ternary", "success", "info", "warning", "danger"],
12581
+ doc: "Tinte pastel de la tarjeta (token --color-<tone>-soft)."
12582
+ },
12514
12583
  image: { kind: "string", doc: "URL de la imagen de cabecera." },
12515
12584
  alt: { kind: "string" },
12516
12585
  onClick: { kind: "action" },
@@ -15164,9 +15233,13 @@ function ITTopBar({
15164
15233
  hideBrandOnDesktop = false,
15165
15234
  showDesktopMenuButton = false
15166
15235
  }) {
15167
- const flat = useITFlatAppearance();
15236
+ const appearance = useITAppearance();
15237
+ const bento = appearance === "bento";
15238
+ const flat = appearance === "flat" || bento;
15168
15239
  const { t } = useITTranslation();
15169
15240
  const initials = (userMenu?.userName ?? "").trim().split(/\s+/).slice(0, 2).map((word) => word.charAt(0).toUpperCase()).join("");
15241
+ const userRestBg = bento ? "var(--it-bento-control-bg, #f1f5f9)" : "transparent";
15242
+ const userHoverBg = bento ? "var(--it-bento-control-bg-hover, #e2e8f0)" : "var(--it-topbar-user-hover, #f1f5f9)";
15170
15243
  const [isUserMenuOpen, setIsUserMenuOpen] = (0, import_react59.useState)(false);
15171
15244
  const userMenuRef = (0, import_react59.useRef)(null);
15172
15245
  useClickOutside_default(userMenuRef, () => setIsUserMenuOpen(false));
@@ -15175,8 +15248,8 @@ function ITTopBar({
15175
15248
  {
15176
15249
  className: `sticky top-0 z-40 transition-all duration-300 ${flat ? "" : "backdrop-blur-md"}`,
15177
15250
  style: {
15178
- backgroundColor: "var(--it-topbar-bg, rgba(255, 255, 255, 0.9))",
15179
- borderBottom: "1px solid var(--it-topbar-border, rgba(15, 23, 42, 0.06))",
15251
+ backgroundColor: bento ? "var(--it-layout-bg, #f4f4f6)" : "var(--it-topbar-bg, rgba(255, 255, 255, 0.9))",
15252
+ borderBottom: bento ? "none" : "1px solid var(--it-topbar-border, rgba(15, 23, 42, 0.06))",
15180
15253
  boxShadow: flat ? "none" : "var(--shadow-xs)"
15181
15254
  },
15182
15255
  children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: `flex items-center justify-between px-6 lg:px-8 ${flat ? "h-[64px]" : "h-[72px]"}`, children: [
@@ -15186,12 +15259,13 @@ function ITTopBar({
15186
15259
  {
15187
15260
  type: "button",
15188
15261
  "aria-label": t("common.menu"),
15189
- className: `${showDesktopMenuButton ? "" : "lg:hidden"} p-2.5 -ml-2.5 rounded-xl transition-colors duration-200`,
15262
+ className: `${showDesktopMenuButton ? "" : "lg:hidden"} ${bento ? "w-10 h-10 flex items-center justify-center rounded-full" : "p-2.5 -ml-2.5 rounded-xl"} transition-colors duration-200`,
15190
15263
  style: {
15191
- color: "var(--it-topbar-icon, #64748b)"
15264
+ color: bento ? "var(--it-bento-control-text, #475569)" : "var(--it-topbar-icon, #64748b)",
15265
+ backgroundColor: bento ? "var(--it-bento-control-bg, #f1f5f9)" : void 0
15192
15266
  },
15193
- onMouseEnter: (e) => e.currentTarget.style.backgroundColor = "var(--it-topbar-user-hover, #f1f5f9)",
15194
- onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "transparent",
15267
+ onMouseEnter: (e) => e.currentTarget.style.backgroundColor = bento ? "var(--it-bento-control-bg-hover, #e2e8f0)" : "var(--it-topbar-user-hover, #f1f5f9)",
15268
+ onMouseLeave: (e) => e.currentTarget.style.backgroundColor = bento ? "var(--it-bento-control-bg, #f1f5f9)" : "transparent",
15195
15269
  onClick: onToggleMobileMenu,
15196
15270
  children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_fa32.FaBars, { className: "w-[1.125rem] h-[1.125rem]" })
15197
15271
  }
@@ -15208,27 +15282,40 @@ function ITTopBar({
15208
15282
  }
15209
15283
  )
15210
15284
  ] }),
15211
- navItems && navItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("nav", { className: "hidden md:flex ml-8 space-x-1 border-l pl-8", style: { borderColor: "var(--it-topbar-border, rgba(15, 23, 42, 0.06))" }, children: navItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15212
- "button",
15285
+ navItems && navItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15286
+ "nav",
15213
15287
  {
15214
- onClick: () => onNavItemClick?.(item.id),
15215
- className: "px-4 py-2 rounded-lg font-medium text-[0.9rem] transition-all duration-200 ease-[cubic-bezier(0.2,0,0,1)]",
15216
- style: { color: "var(--it-topbar-text, #475569)" },
15217
- onMouseEnter: (e) => {
15218
- e.currentTarget.style.color = "var(--it-topbar-text, #0f172a)";
15219
- e.currentTarget.style.backgroundColor = "var(--it-topbar-user-hover, #f1f5f9)";
15220
- },
15221
- onMouseLeave: (e) => {
15222
- e.currentTarget.style.color = "var(--it-topbar-text, #475569)";
15223
- e.currentTarget.style.backgroundColor = "transparent";
15224
- },
15225
- children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex items-center gap-2", children: [
15226
- item.icon && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "opacity-70", children: item.icon }),
15227
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(ITText, { as: "span", children: item.label })
15228
- ] })
15229
- },
15230
- item.id
15231
- )) })
15288
+ className: bento ? "hidden md:flex ml-4 gap-2" : "hidden md:flex ml-8 space-x-1 border-l pl-8",
15289
+ style: bento ? void 0 : { borderColor: "var(--it-topbar-border, rgba(15, 23, 42, 0.06))" },
15290
+ children: navItems.map((item) => {
15291
+ const restBg = bento ? item.isActive ? "var(--it-bento-ink-bg, #0f172a)" : "var(--it-bento-control-bg, #f1f5f9)" : item.isActive ? "var(--it-topbar-user-hover, #f1f5f9)" : "transparent";
15292
+ const restColor = bento ? item.isActive ? "var(--it-bento-ink-text, #ffffff)" : "var(--it-bento-control-text, #475569)" : "var(--it-topbar-text, #475569)";
15293
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15294
+ "button",
15295
+ {
15296
+ onClick: () => onNavItemClick?.(item.id),
15297
+ "aria-current": item.isActive ? "page" : void 0,
15298
+ className: `px-4 py-2 ${bento ? "rounded-full" : "rounded-lg"} font-medium text-[0.9rem] transition-all duration-200 ease-[cubic-bezier(0.2,0,0,1)]`,
15299
+ style: { color: restColor, backgroundColor: restBg },
15300
+ onMouseEnter: (e) => {
15301
+ if (bento && item.isActive) return;
15302
+ e.currentTarget.style.color = bento ? "var(--it-bento-control-text, #0f172a)" : "var(--it-topbar-text, #0f172a)";
15303
+ e.currentTarget.style.backgroundColor = bento ? "var(--it-bento-control-bg-hover, #e2e8f0)" : "var(--it-topbar-user-hover, #f1f5f9)";
15304
+ },
15305
+ onMouseLeave: (e) => {
15306
+ e.currentTarget.style.color = restColor;
15307
+ e.currentTarget.style.backgroundColor = restBg;
15308
+ },
15309
+ children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex items-center gap-2", children: [
15310
+ item.icon && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "opacity-70", children: item.icon }),
15311
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(ITText, { as: "span", children: item.label })
15312
+ ] })
15313
+ },
15314
+ item.id
15315
+ );
15316
+ })
15317
+ }
15318
+ )
15232
15319
  ] }),
15233
15320
  centerContent && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: `hidden lg:flex flex-1 min-w-0 items-center ${hideBrandOnDesktop ? "justify-start pr-4" : "justify-center px-4"}`, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "w-full max-w-[420px]", children: centerContent }) }),
15234
15321
  (children || userMenu) && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex items-center gap-2", children: [
@@ -15238,15 +15325,15 @@ function ITTopBar({
15238
15325
  "button",
15239
15326
  {
15240
15327
  type: "button",
15241
- className: `flex items-center gap-3 rounded-full py-1.5 transition-all duration-200 ease-[cubic-bezier(0.2,0,0,1)] border border-transparent hover:border-secondary-200 ${flat ? "flex-row-reverse pl-4 pr-2" : "pl-2 pr-4"}`,
15328
+ className: `flex items-center gap-3 rounded-full py-1.5 transition-all duration-200 ease-[cubic-bezier(0.2,0,0,1)] border border-transparent ${bento ? "" : "hover:border-secondary-200"} ${flat ? "flex-row-reverse pl-4 pr-2" : "pl-2 pr-4"}`,
15242
15329
  style: {
15243
- backgroundColor: isUserMenuOpen ? "var(--it-topbar-user-hover, #f1f5f9)" : "transparent"
15330
+ backgroundColor: isUserMenuOpen ? userHoverBg : userRestBg
15244
15331
  },
15245
15332
  onMouseEnter: (e) => {
15246
- if (!isUserMenuOpen) e.currentTarget.style.backgroundColor = "var(--it-topbar-user-hover, #f1f5f9)";
15333
+ if (!isUserMenuOpen) e.currentTarget.style.backgroundColor = userHoverBg;
15247
15334
  },
15248
15335
  onMouseLeave: (e) => {
15249
- if (!isUserMenuOpen) e.currentTarget.style.backgroundColor = "transparent";
15336
+ if (!isUserMenuOpen) e.currentTarget.style.backgroundColor = userRestBg;
15250
15337
  },
15251
15338
  onClick: () => setIsUserMenuOpen(!isUserMenuOpen),
15252
15339
  children: [
@@ -15358,7 +15445,7 @@ function ITLayout({
15358
15445
  }) {
15359
15446
  const [internalCollapsed, setInternalCollapsed] = (0, import_react60.useState)(true);
15360
15447
  const [mobileSidebarOpen, setMobileSidebarOpen] = (0, import_react60.useState)(false);
15361
- const flat = useITFlatAppearance();
15448
+ const flat = useITAppearance() !== "soft";
15362
15449
  const isControlled = sidebar.isCollapsed !== void 0;
15363
15450
  const desktopCollapsed = isControlled ? sidebar.isCollapsed : internalCollapsed;
15364
15451
  const handleToggleCollapse = isControlled ? sidebar.onToggleCollapse ?? (() => {
@@ -16084,6 +16171,32 @@ function ITThemeProvider({
16084
16171
  surfaceStyle?.remove();
16085
16172
  };
16086
16173
  }, [radius, shadow]);
16174
+ (0, import_react62.useLayoutEffect)(() => {
16175
+ const STYLE_ID = "it-theme-bento-tokens";
16176
+ let tag = document.getElementById(STYLE_ID);
16177
+ if (appearance !== "bento") {
16178
+ tag?.remove();
16179
+ return;
16180
+ }
16181
+ if (!tag) {
16182
+ tag = document.createElement("style");
16183
+ tag.id = STYLE_ID;
16184
+ document.head.appendChild(tag);
16185
+ }
16186
+ const hasRadius = typeof radius === "number" && isFinite(radius);
16187
+ const hasShadow = shadowLevel(shadow) !== null;
16188
+ const shapeLight = hasRadius ? "" : "--it-bento-card-radius:24px;--it-bento-pill-radius:9999px;--it-bento-field-radius:1rem;--it-input-radius:var(--it-bento-pill-radius);";
16189
+ const shadowLight = hasShadow ? "" : "--it-bento-card-shadow:0 1px 2px rgba(16,24,40,.04),0 12px 32px -16px rgba(16,24,40,.10);--it-bento-card-shadow-hover:0 1px 2px rgba(16,24,40,.06),0 18px 40px -16px rgba(16,24,40,.18);";
16190
+ const shadowDark = hasShadow ? "" : "--it-bento-card-shadow:0 1px 2px rgba(0,0,0,.4),0 12px 32px -16px rgba(0,0,0,.55);--it-bento-card-shadow-hover:0 1px 2px rgba(0,0,0,.5),0 18px 40px -16px rgba(0,0,0,.7);";
16191
+ const navTokens = "--it-sidebar-active-bg:var(--it-bento-nav-active-bg);--it-sidebar-active-color:var(--it-bento-nav-active-text);--it-sidebar-active-icon:var(--it-bento-nav-active-text);";
16192
+ const light = "--it-layout-bg:#f4f4f6;--it-card-bg:#ffffff;--it-bento-card-padding:1.5rem;--it-input-bg:#f1f5f9;--it-input-border:transparent;--it-input-focus-ring:0 0 0 2px color-mix(in srgb,var(--color-primary) 50%,transparent);--it-bento-control-bg:#f1f5f9;--it-bento-control-bg-hover:#e2e8f0;--it-bento-control-text:#475569;--it-bento-ink-bg:#0f172a;--it-bento-ink-text:#ffffff;--it-bento-nav-active-bg:#f1f5f9;--it-bento-nav-active-text:#0f172a;" + navTokens;
16193
+ const dark = "--it-layout-bg:#020617;--it-card-bg:#0f172a;--it-input-bg:#1e293b;--it-input-border:transparent;--it-bento-control-bg:#1e293b;--it-bento-control-bg-hover:#334155;--it-bento-control-text:#cbd5e1;--it-bento-ink-bg:#ffffff;--it-bento-ink-text:#0f172a;--it-bento-nav-active-bg:#1e293b;--it-bento-nav-active-text:#ffffff;" + navTokens;
16194
+ const A = '[data-it-appearance="bento"]';
16195
+ tag.textContent = `:root${A}{${light}${shapeLight}${shadowLight}}:root${A}.dark,:root${A} .dark,:root${A} [data-theme="dark"]{${dark}${shadowDark}}:root${A} [data-theme="light"]{${light}${shadowLight}}`;
16196
+ return () => {
16197
+ tag?.remove();
16198
+ };
16199
+ }, [appearance, radius, shadow]);
16087
16200
  (0, import_react62.useEffect)(() => {
16088
16201
  const injectStyles = (obj, prefix = "") => {
16089
16202
  Object.entries(obj).forEach(([key, val]) => {
@@ -17641,6 +17754,7 @@ var createValidationSchema = (fields) => Yup.object().shape(
17641
17754
  useDebouncedSearch,
17642
17755
  useEditableRow,
17643
17756
  useFloatingPanel,
17757
+ useITAppearance,
17644
17758
  useITFlatAppearance,
17645
17759
  useITTheme,
17646
17760
  useITThemeSafe,