@axzydev/axzy_ui_system 1.7.4 → 1.8.0

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 (34) hide show
  1. package/dist/index.cjs +204 -107
  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 +200 -104
  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/page-header/page-header.tsx +22 -6
  19. package/src/components/organisms/sidebar/sidebar.tsx +8 -5
  20. package/src/components/organisms/topbar/topbar.props.ts +2 -0
  21. package/src/components/organisms/topbar/topbar.tsx +56 -34
  22. package/src/components/templates/layout/layout.tsx +3 -2
  23. package/src/components/theme-provider/themeProvider.props.ts +1 -1
  24. package/src/components/theme-provider/themeProvider.tsx +54 -1
  25. package/src/index.ts +4 -4
  26. package/src/json-renderer/catalog/axzyCatalog.ts +5 -0
  27. package/src/sandbox/axzyConfig.test.ts +4 -0
  28. package/src/sandbox/axzyConfig.ts +1 -1
  29. package/src/sandbox/i18n.ts +6 -0
  30. package/src/showcases/FeedbackShowcases.tsx +2 -1
  31. package/src/showcases/StructureShowcases.tsx +17 -2
  32. package/src/theme/theme-context.ts +10 -2
  33. package/src/theme/theme.ts +1 -1
  34. 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;
@@ -7471,7 +7494,9 @@ function ITPageHeader({
7471
7494
  }) {
7472
7495
  const { t } = useITTranslation();
7473
7496
  const showTopRow = breadcrumbs?.length || backAction;
7474
- const flat = useITFlatAppearance();
7497
+ const appearance = useITAppearance();
7498
+ const bento = appearance === "bento";
7499
+ const flat = appearance === "flat";
7475
7500
  return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: `${className} space-y-3`, children: [
7476
7501
  showTopRow && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
7477
7502
  /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-center gap-2 min-w-0", children: [
@@ -7479,7 +7504,8 @@ function ITPageHeader({
7479
7504
  "button",
7480
7505
  {
7481
7506
  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",
7507
+ 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",
7508
+ style: bento ? { backgroundColor: "var(--it-bento-control-bg, #f1f5f9)", color: "var(--it-bento-control-text, #475569)" } : void 0,
7483
7509
  "aria-label": t("pageHeader.back"),
7484
7510
  children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_fa21.FaChevronLeft, { size: 14 })
7485
7511
  }
@@ -7490,7 +7516,7 @@ function ITPageHeader({
7490
7516
  ] }),
7491
7517
  /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-start justify-between gap-6", children: [
7492
7518
  /* @__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)(
7519
+ icon && !flat && !bento && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
7494
7520
  "div",
7495
7521
  {
7496
7522
  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 +7529,7 @@ function ITPageHeader({
7503
7529
  ITText,
7504
7530
  {
7505
7531
  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",
7532
+ 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
7533
  children: title
7508
7534
  }
7509
7535
  ),
@@ -7511,7 +7537,7 @@ function ITPageHeader({
7511
7537
  ITText,
7512
7538
  {
7513
7539
  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",
7540
+ 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
7541
  children: description
7516
7542
  }
7517
7543
  )
@@ -8423,16 +8449,19 @@ function ITSegmentedControl({
8423
8449
  disabled = false
8424
8450
  }) {
8425
8451
  const { button, container } = sizeMap3[size];
8452
+ const bento = useITAppearance() === "bento";
8426
8453
  return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
8427
8454
  "div",
8428
8455
  {
8429
8456
  role: "group",
8430
8457
  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",
8458
+ "inline-flex",
8459
+ bento ? "rounded-full" : "rounded-xl bg-slate-100 dark:bg-slate-800 border border-slate-200 dark:border-slate-700",
8432
8460
  container,
8433
8461
  disabled && "opacity-50 cursor-not-allowed",
8434
8462
  className
8435
8463
  ),
8464
+ style: bento ? { backgroundColor: "var(--it-bento-control-bg, #f1f5f9)" } : void 0,
8436
8465
  children: options.map((opt) => {
8437
8466
  const isActive = opt.value === value;
8438
8467
  return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
@@ -8444,10 +8473,14 @@ function ITSegmentedControl({
8444
8473
  disabled,
8445
8474
  className: (0, import_clsx40.default)(
8446
8475
  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",
8476
+ "font-semibold transition-all flex items-center gap-1.5",
8477
+ 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
8478
  disabled && "pointer-events-none"
8450
8479
  ),
8480
+ style: bento ? {
8481
+ backgroundColor: isActive ? "var(--it-bento-ink-bg, #0f172a)" : "transparent",
8482
+ color: isActive ? "var(--it-bento-ink-text, #ffffff)" : "var(--it-bento-control-text, #475569)"
8483
+ } : void 0,
8451
8484
  children: [
8452
8485
  opt.icon && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { children: opt.icon }),
8453
8486
  /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(ITText, { as: "span", children: opt.label })
@@ -8500,7 +8533,9 @@ function ITSidebar({
8500
8533
  onToggleCollapse,
8501
8534
  expandOnHover = true
8502
8535
  }) {
8503
- const flat = useITFlatAppearance();
8536
+ const appearance = useITAppearance();
8537
+ const bento = appearance === "bento";
8538
+ const flat = appearance === "flat" || bento;
8504
8539
  const { t } = useITTranslation();
8505
8540
  const [expandedItems, setExpandedItems] = (0, import_react41.useState)(/* @__PURE__ */ new Set());
8506
8541
  const [isHovering, setIsHovering] = (0, import_react41.useState)(false);
@@ -8592,7 +8627,7 @@ function ITSidebar({
8592
8627
  color: subitem.isActive ? "var(--it-sidebar-active-color, var(--color-secondary-900))" : "var(--it-sidebar-label-color, var(--color-secondary-600))",
8593
8628
  backgroundColor: subitem.isActive ? "var(--it-sidebar-active-bg, var(--color-secondary-50))" : "transparent",
8594
8629
  fontSize: flat ? "0.84rem" : "0.78rem",
8595
- fontWeight: subitem.isActive ? 600 : 500,
8630
+ fontWeight: subitem.isActive ? bento ? 700 : 600 : 500,
8596
8631
  letterSpacing: "0.01em",
8597
8632
  marginLeft: subitemConnector === "|" ? "-1px" : "0"
8598
8633
  },
@@ -8749,7 +8784,7 @@ function ITSidebar({
8749
8784
  style: {
8750
8785
  zIndex: 50,
8751
8786
  backgroundColor: "var(--it-sidebar-bg, rgba(255, 255, 255, 0.90))",
8752
- borderRight: "1px solid var(--it-sidebar-border, var(--color-secondary-200))",
8787
+ borderRight: bento ? "none" : "1px solid var(--it-sidebar-border, var(--color-secondary-200))",
8753
8788
  ...flat ? {} : { WebkitBackdropFilter: "blur(12px)", backdropFilter: "blur(12px)" }
8754
8789
  },
8755
8790
  children: [
@@ -8843,7 +8878,7 @@ function ITSidebar({
8843
8878
  style: {
8844
8879
  color: active ? "var(--it-sidebar-active-color, #ffffff)" : "var(--it-sidebar-label-color, var(--color-secondary-300))",
8845
8880
  fontSize: flat ? "0.875rem" : "0.8rem",
8846
- fontWeight: active ? "600" : "500"
8881
+ fontWeight: active ? bento ? "700" : "600" : "500"
8847
8882
  },
8848
8883
  children: item.label
8849
8884
  }
@@ -10006,6 +10041,7 @@ var ITTabs = ({
10006
10041
  className = "",
10007
10042
  containerClassName = ""
10008
10043
  }) => {
10044
+ const bento = useITAppearance() === "bento" && variant === "pill";
10009
10045
  const [activeId, setActiveId] = (0, import_react46.useState)(defaultActiveId || items[0]?.id);
10010
10046
  const handleTabClick = (id, disabled) => {
10011
10047
  if (disabled) return;
@@ -10014,39 +10050,50 @@ var ITTabs = ({
10014
10050
  };
10015
10051
  const activeContent = items.find((item) => item.id === activeId)?.content;
10016
10052
  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
- }) }),
10053
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
10054
+ "div",
10055
+ {
10056
+ className: (0, import_clsx47.clsx)(
10057
+ "flex border-secondary-200 mb-4",
10058
+ variant === "line" ? "border-b" : bento ? "gap-2 p-1 rounded-full w-fit" : "gap-2 p-1 bg-secondary-100 rounded-lg w-fit",
10059
+ className
10060
+ ),
10061
+ style: bento ? { backgroundColor: "var(--it-bento-control-bg, #f1f5f9)", borderColor: "transparent" } : void 0,
10062
+ children: items.map((item) => {
10063
+ const isActive = item.id === activeId;
10064
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
10065
+ "button",
10066
+ {
10067
+ onClick: () => handleTabClick(item.id, item.disabled),
10068
+ disabled: item.disabled,
10069
+ className: (0, import_clsx47.clsx)(
10070
+ "flex items-center gap-2 px-4 py-2 text-sm font-medium transition-all duration-200 outline-none",
10071
+ // LINE VARIANT
10072
+ variant === "line" && [
10073
+ "border-b-2 -mb-[2px]",
10074
+ isActive ? "border-primary-500 text-primary-600" : "border-transparent text-secondary-500 hover:text-secondary-700 hover:border-secondary-300"
10075
+ ],
10076
+ // PILL VARIANT
10077
+ variant === "pill" && (bento ? "rounded-full" : [
10078
+ "rounded-md",
10079
+ isActive ? "bg-white text-primary-600 shadow-sm" : "text-secondary-500 hover:text-secondary-700"
10080
+ ]),
10081
+ item.disabled && "opacity-50 cursor-not-allowed"
10082
+ ),
10083
+ style: bento ? {
10084
+ backgroundColor: isActive ? "var(--it-bento-ink-bg, #0f172a)" : "transparent",
10085
+ color: isActive ? "var(--it-bento-ink-text, #ffffff)" : "var(--it-bento-control-text, #475569)"
10086
+ } : void 0,
10087
+ children: [
10088
+ item.icon && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "w-4 h-4", children: item.icon }),
10089
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(ITText, { as: "span", children: item.label })
10090
+ ]
10091
+ },
10092
+ item.id
10093
+ );
10094
+ })
10095
+ }
10096
+ ),
10050
10097
  /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "tab-content animate-fadeIn", children: activeContent })
10051
10098
  ] });
10052
10099
  };
@@ -12511,6 +12558,11 @@ var AXZY_CATALOG_ENTRIES = [
12511
12558
  summary: "Tarjeta con t\xEDtulo, imagen y contenido.",
12512
12559
  props: {
12513
12560
  title: { kind: "string" },
12561
+ tone: {
12562
+ kind: "enum",
12563
+ values: ["primary", "secondary", "ternary", "success", "info", "warning", "danger"],
12564
+ doc: "Tinte pastel de la tarjeta (token --color-<tone>-soft)."
12565
+ },
12514
12566
  image: { kind: "string", doc: "URL de la imagen de cabecera." },
12515
12567
  alt: { kind: "string" },
12516
12568
  onClick: { kind: "action" },
@@ -15164,9 +15216,13 @@ function ITTopBar({
15164
15216
  hideBrandOnDesktop = false,
15165
15217
  showDesktopMenuButton = false
15166
15218
  }) {
15167
- const flat = useITFlatAppearance();
15219
+ const appearance = useITAppearance();
15220
+ const bento = appearance === "bento";
15221
+ const flat = appearance === "flat" || bento;
15168
15222
  const { t } = useITTranslation();
15169
15223
  const initials = (userMenu?.userName ?? "").trim().split(/\s+/).slice(0, 2).map((word) => word.charAt(0).toUpperCase()).join("");
15224
+ const userRestBg = bento ? "var(--it-bento-control-bg, #f1f5f9)" : "transparent";
15225
+ const userHoverBg = bento ? "var(--it-bento-control-bg-hover, #e2e8f0)" : "var(--it-topbar-user-hover, #f1f5f9)";
15170
15226
  const [isUserMenuOpen, setIsUserMenuOpen] = (0, import_react59.useState)(false);
15171
15227
  const userMenuRef = (0, import_react59.useRef)(null);
15172
15228
  useClickOutside_default(userMenuRef, () => setIsUserMenuOpen(false));
@@ -15175,8 +15231,8 @@ function ITTopBar({
15175
15231
  {
15176
15232
  className: `sticky top-0 z-40 transition-all duration-300 ${flat ? "" : "backdrop-blur-md"}`,
15177
15233
  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))",
15234
+ backgroundColor: bento ? "var(--it-layout-bg, #f4f4f6)" : "var(--it-topbar-bg, rgba(255, 255, 255, 0.9))",
15235
+ borderBottom: bento ? "none" : "1px solid var(--it-topbar-border, rgba(15, 23, 42, 0.06))",
15180
15236
  boxShadow: flat ? "none" : "var(--shadow-xs)"
15181
15237
  },
15182
15238
  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 +15242,13 @@ function ITTopBar({
15186
15242
  {
15187
15243
  type: "button",
15188
15244
  "aria-label": t("common.menu"),
15189
- className: `${showDesktopMenuButton ? "" : "lg:hidden"} p-2.5 -ml-2.5 rounded-xl transition-colors duration-200`,
15245
+ 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
15246
  style: {
15191
- color: "var(--it-topbar-icon, #64748b)"
15247
+ color: bento ? "var(--it-bento-control-text, #475569)" : "var(--it-topbar-icon, #64748b)",
15248
+ backgroundColor: bento ? "var(--it-bento-control-bg, #f1f5f9)" : void 0
15192
15249
  },
15193
- onMouseEnter: (e) => e.currentTarget.style.backgroundColor = "var(--it-topbar-user-hover, #f1f5f9)",
15194
- onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "transparent",
15250
+ onMouseEnter: (e) => e.currentTarget.style.backgroundColor = bento ? "var(--it-bento-control-bg-hover, #e2e8f0)" : "var(--it-topbar-user-hover, #f1f5f9)",
15251
+ onMouseLeave: (e) => e.currentTarget.style.backgroundColor = bento ? "var(--it-bento-control-bg, #f1f5f9)" : "transparent",
15195
15252
  onClick: onToggleMobileMenu,
15196
15253
  children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_fa32.FaBars, { className: "w-[1.125rem] h-[1.125rem]" })
15197
15254
  }
@@ -15208,27 +15265,40 @@ function ITTopBar({
15208
15265
  }
15209
15266
  )
15210
15267
  ] }),
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",
15268
+ navItems && navItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15269
+ "nav",
15213
15270
  {
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
- )) })
15271
+ className: bento ? "hidden md:flex ml-4 gap-2" : "hidden md:flex ml-8 space-x-1 border-l pl-8",
15272
+ style: bento ? void 0 : { borderColor: "var(--it-topbar-border, rgba(15, 23, 42, 0.06))" },
15273
+ children: navItems.map((item) => {
15274
+ 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";
15275
+ const restColor = bento ? item.isActive ? "var(--it-bento-ink-text, #ffffff)" : "var(--it-bento-control-text, #475569)" : "var(--it-topbar-text, #475569)";
15276
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
15277
+ "button",
15278
+ {
15279
+ onClick: () => onNavItemClick?.(item.id),
15280
+ "aria-current": item.isActive ? "page" : void 0,
15281
+ 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)]`,
15282
+ style: { color: restColor, backgroundColor: restBg },
15283
+ onMouseEnter: (e) => {
15284
+ if (bento && item.isActive) return;
15285
+ e.currentTarget.style.color = bento ? "var(--it-bento-control-text, #0f172a)" : "var(--it-topbar-text, #0f172a)";
15286
+ e.currentTarget.style.backgroundColor = bento ? "var(--it-bento-control-bg-hover, #e2e8f0)" : "var(--it-topbar-user-hover, #f1f5f9)";
15287
+ },
15288
+ onMouseLeave: (e) => {
15289
+ e.currentTarget.style.color = restColor;
15290
+ e.currentTarget.style.backgroundColor = restBg;
15291
+ },
15292
+ children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex items-center gap-2", children: [
15293
+ item.icon && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "opacity-70", children: item.icon }),
15294
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(ITText, { as: "span", children: item.label })
15295
+ ] })
15296
+ },
15297
+ item.id
15298
+ );
15299
+ })
15300
+ }
15301
+ )
15232
15302
  ] }),
15233
15303
  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
15304
  (children || userMenu) && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex items-center gap-2", children: [
@@ -15238,15 +15308,15 @@ function ITTopBar({
15238
15308
  "button",
15239
15309
  {
15240
15310
  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"}`,
15311
+ 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
15312
  style: {
15243
- backgroundColor: isUserMenuOpen ? "var(--it-topbar-user-hover, #f1f5f9)" : "transparent"
15313
+ backgroundColor: isUserMenuOpen ? userHoverBg : userRestBg
15244
15314
  },
15245
15315
  onMouseEnter: (e) => {
15246
- if (!isUserMenuOpen) e.currentTarget.style.backgroundColor = "var(--it-topbar-user-hover, #f1f5f9)";
15316
+ if (!isUserMenuOpen) e.currentTarget.style.backgroundColor = userHoverBg;
15247
15317
  },
15248
15318
  onMouseLeave: (e) => {
15249
- if (!isUserMenuOpen) e.currentTarget.style.backgroundColor = "transparent";
15319
+ if (!isUserMenuOpen) e.currentTarget.style.backgroundColor = userRestBg;
15250
15320
  },
15251
15321
  onClick: () => setIsUserMenuOpen(!isUserMenuOpen),
15252
15322
  children: [
@@ -15358,7 +15428,7 @@ function ITLayout({
15358
15428
  }) {
15359
15429
  const [internalCollapsed, setInternalCollapsed] = (0, import_react60.useState)(true);
15360
15430
  const [mobileSidebarOpen, setMobileSidebarOpen] = (0, import_react60.useState)(false);
15361
- const flat = useITFlatAppearance();
15431
+ const flat = useITAppearance() !== "soft";
15362
15432
  const isControlled = sidebar.isCollapsed !== void 0;
15363
15433
  const desktopCollapsed = isControlled ? sidebar.isCollapsed : internalCollapsed;
15364
15434
  const handleToggleCollapse = isControlled ? sidebar.onToggleCollapse ?? (() => {
@@ -16084,6 +16154,32 @@ function ITThemeProvider({
16084
16154
  surfaceStyle?.remove();
16085
16155
  };
16086
16156
  }, [radius, shadow]);
16157
+ (0, import_react62.useLayoutEffect)(() => {
16158
+ const STYLE_ID = "it-theme-bento-tokens";
16159
+ let tag = document.getElementById(STYLE_ID);
16160
+ if (appearance !== "bento") {
16161
+ tag?.remove();
16162
+ return;
16163
+ }
16164
+ if (!tag) {
16165
+ tag = document.createElement("style");
16166
+ tag.id = STYLE_ID;
16167
+ document.head.appendChild(tag);
16168
+ }
16169
+ const hasRadius = typeof radius === "number" && isFinite(radius);
16170
+ const hasShadow = shadowLevel(shadow) !== null;
16171
+ 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);";
16172
+ 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);";
16173
+ 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);";
16174
+ 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);";
16175
+ 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;
16176
+ 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;
16177
+ const A = '[data-it-appearance="bento"]';
16178
+ 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}}`;
16179
+ return () => {
16180
+ tag?.remove();
16181
+ };
16182
+ }, [appearance, radius, shadow]);
16087
16183
  (0, import_react62.useEffect)(() => {
16088
16184
  const injectStyles = (obj, prefix = "") => {
16089
16185
  Object.entries(obj).forEach(([key, val]) => {
@@ -17641,6 +17737,7 @@ var createValidationSchema = (fields) => Yup.object().shape(
17641
17737
  useDebouncedSearch,
17642
17738
  useEditableRow,
17643
17739
  useFloatingPanel,
17740
+ useITAppearance,
17644
17741
  useITFlatAppearance,
17645
17742
  useITTheme,
17646
17743
  useITThemeSafe,