tcce-design-system-test 0.3.24 → 0.3.26

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.
@@ -768,6 +768,24 @@ export declare const LinkVariantStyles: {
768
768
  plain: RuleSet<object>;
769
769
  };
770
770
 
771
+ /**
772
+ * Renders a sidebar menu item with optional nested children, permissions, and navigation handling.
773
+ *
774
+ * @param item - The menu item data, including label, icon, href (internal), path (external), permissions, and optional children.
775
+ * @param userRoles - The current user's roles, used to determine permission to view the item.
776
+ * @param level - The nesting level of the menu item (default is 0).
777
+ * @param activePath - The current active navigation path, used to highlight the active item.
778
+ *
779
+ * @returns The rendered menu item, or `null` if the user does not have permission to view it.
780
+ *
781
+ * @remarks
782
+ * - Supports collapsing/expanding of nested menu items.
783
+ * - Handles permission checks for both the item and its children.
784
+ * - Integrates with sidebar collapse state and highlights the active path.
785
+ * - Internal navigation usa `href`; external usa `path` (URL completo provisto por `navigationConfig`).
786
+ */
787
+ export declare const MenuItem: default_2.FC<Props>;
788
+
771
789
  /**
772
790
  * Button to open sidebar on mobile devices.
773
791
  * @param $hidden - Whether the button is hidden.
@@ -881,6 +899,14 @@ export declare interface PinSpecificProps {
881
899
  onPinComplete?: (value: string) => void;
882
900
  }
883
901
 
902
+ declare interface Props {
903
+ item: NavigationItem;
904
+ userRoles: string[];
905
+ level?: number;
906
+ activePath?: string;
907
+ onNavigate?: (href: string) => void;
908
+ }
909
+
884
910
  export declare const RadioInput: ForwardRefExoticComponent<RadioInputProps & RefAttributes<HTMLInputElement>>;
885
911
 
886
912
  export declare const RadioInputDot: default_2.ForwardRefExoticComponent<RadioInputDotProps & default_2.RefAttributes<HTMLInputElement>>;
@@ -1170,6 +1196,7 @@ declare interface SpinnerProps {
1170
1196
  export declare interface Step {
1171
1197
  id: string | number;
1172
1198
  label?: string;
1199
+ content?: React.ReactNode | string;
1173
1200
  }
1174
1201
 
1175
1202
  /**
@@ -9544,7 +9544,13 @@ const Ks = T.div`
9544
9544
  transform: rotate(${({ $open: e }) => e ? "90deg" : "0deg"});
9545
9545
  pointer-events: none;
9546
9546
  transition: transform 0.3s ease-out;
9547
- `, vc = ({ item: e, userRoles: t, level: n = 0, activePath: r, onNavigate: o }) => {
9547
+ `, vc = ({
9548
+ item: e,
9549
+ userRoles: t,
9550
+ level: n = 0,
9551
+ activePath: r,
9552
+ onNavigate: o
9553
+ }) => {
9548
9554
  const [s, i] = ze(!1), { isCollapsed: a, setIsMobileOpen: c } = gc(), u = Fe(
9549
9555
  () => (e.children || []).filter((S) => Ys(t, S.permissions)),
9550
9556
  [e.children, t]
@@ -10722,7 +10728,7 @@ function jv(e) {
10722
10728
  const rn = {
10723
10729
  sm: {
10724
10730
  circle: "2rem",
10725
- fontSize: N[16],
10731
+ fontSize: N[14],
10726
10732
  line: "2px"
10727
10733
  },
10728
10734
  md: {
@@ -10732,7 +10738,7 @@ const rn = {
10732
10738
  },
10733
10739
  lg: {
10734
10740
  circle: "3.25rem",
10735
- fontSize: N[24],
10741
+ fontSize: N[20],
10736
10742
  line: "3px"
10737
10743
  }
10738
10744
  }, sv = T.div`
@@ -10810,7 +10816,8 @@ const rn = {
10810
10816
  position: absolute;
10811
10817
  ${N[14]}
10812
10818
  font-weight: 500;
10813
- color: var(--color-main-blue-primary);
10819
+ color: var(--color-main-white);
10820
+ background-color: var(--color-main-blue-primary);
10814
10821
  padding: 0.5rem 0.75rem;
10815
10822
  border-radius: 0.375rem;
10816
10823
  white-space: nowrap;
@@ -10818,11 +10825,23 @@ const rn = {
10818
10825
  pointer-events: none;
10819
10826
  transition: opacity 0.2s ease;
10820
10827
  z-index: 10;
10828
+ box-shadow: var(--shadow-black-button);
10821
10829
 
10822
- right: calc(100%);
10830
+ right: calc(100% + 0.75rem);
10823
10831
  top: 50%;
10824
10832
  transform: translateY(-50%);
10825
10833
 
10834
+ /* Arrow pointing to the circle */
10835
+ &::after {
10836
+ content: '';
10837
+ position: absolute;
10838
+ left: 100%;
10839
+ top: 50%;
10840
+ transform: translateY(-50%);
10841
+ border: 6px solid transparent;
10842
+ border-left-color: var(--color-main-blue-primary);
10843
+ }
10844
+
10826
10845
  ${Pc}:hover & {
10827
10846
  opacity: 1;
10828
10847
  }
@@ -10856,7 +10875,7 @@ const rn = {
10856
10875
  l && (h.key === "Enter" || h.key === " ") && (h.preventDefault(), i(c));
10857
10876
  },
10858
10877
  children: [
10859
- c + 1,
10878
+ a.content ?? c + 1,
10860
10879
  a.label && n === "vertical" && /* @__PURE__ */ m(uv, { children: a.label })
10861
10880
  ]
10862
10881
  }
@@ -10908,6 +10927,7 @@ export {
10908
10927
  Cy as LinkDisabledStyles,
10909
10928
  ky as LinkSizeStyles,
10910
10929
  Ty as LinkVariantStyles,
10930
+ vc as MenuItem,
10911
10931
  Sy as MobileOpenBtn,
10912
10932
  xy as Nav,
10913
10933
  gy as Overlay,