@humu-tech/ui 0.4.0 → 0.5.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.
package/dist/index.mjs CHANGED
@@ -7765,11 +7765,18 @@ Switch.displayName = "Switch";
7765
7765
 
7766
7766
  // src/primitives/Tabs/Tabs.tsx
7767
7767
  import {
7768
+ Children,
7768
7769
  createContext as createContext2,
7769
7770
  forwardRef as forwardRef46,
7770
- useContext as useContext2
7771
+ isValidElement,
7772
+ useCallback as useCallback5,
7773
+ useContext as useContext2,
7774
+ useLayoutEffect as useLayoutEffect5,
7775
+ useRef as useRef9,
7776
+ useState as useState21
7771
7777
  } from "react";
7772
7778
  import * as TabsPrimitive from "@radix-ui/react-tabs";
7779
+ import { ChevronDownIcon as ChevronDownIcon5 } from "lucide-react";
7773
7780
 
7774
7781
  // src/primitives/Tabs/Tabs.styles.ts
7775
7782
  import { cva as cva15 } from "class-variance-authority";
@@ -7852,16 +7859,174 @@ var tabsContentStyles = cva15(
7852
7859
  // src/primitives/Tabs/Tabs.tsx
7853
7860
  import { Fragment as Fragment11, jsx as jsx68, jsxs as jsxs44 } from "react/jsx-runtime";
7854
7861
  var TabsVariantContext = createContext2("pill");
7855
- var List2 = forwardRef46(
7856
- ({ className, variant = "pill", ...props }, ref) => /* @__PURE__ */ jsx68(TabsVariantContext.Provider, { value: variant, children: /* @__PURE__ */ jsx68(
7857
- TabsPrimitive.List,
7858
- {
7859
- ref,
7860
- "data-variant": variant,
7861
- className: cn(tabsListStyles({ variant }), className),
7862
- ...props
7862
+ var TabsValueContext = createContext2(null);
7863
+ var isTrigger = (child) => isValidElement(child) && typeof child.props.value === "string";
7864
+ function pickVisible(values, widths, active, available, gap, moreWidth) {
7865
+ const width = (value) => widths.get(value) ?? 0;
7866
+ const total = values.reduce((sum, value) => sum + width(value), 0) + gap * Math.max(values.length - 1, 0);
7867
+ if (total <= available) return values;
7868
+ const room = available - moreWidth - gap;
7869
+ const activeIndex = active ? values.indexOf(active) : -1;
7870
+ let used = 0;
7871
+ const visible = [];
7872
+ for (const value of values) {
7873
+ const next = used + width(value) + (visible.length > 0 ? gap : 0);
7874
+ if (next > room) break;
7875
+ visible.push(value);
7876
+ used = next;
7877
+ }
7878
+ if (activeIndex >= 0 && !visible.includes(values[activeIndex])) {
7879
+ const activeValue = values[activeIndex];
7880
+ while (visible.length > 0 && used + width(activeValue) + gap > room) {
7881
+ const removed = visible.pop();
7882
+ used -= width(removed) + (visible.length > 0 ? gap : 0);
7863
7883
  }
7864
- ) })
7884
+ visible.push(activeValue);
7885
+ }
7886
+ return visible;
7887
+ }
7888
+ var List2 = forwardRef46(
7889
+ ({
7890
+ className,
7891
+ variant = "pill",
7892
+ overflow = "none",
7893
+ moreLabel = "Mais",
7894
+ children,
7895
+ ...props
7896
+ }, ref) => {
7897
+ const valueContext = useContext2(TabsValueContext);
7898
+ const active = valueContext?.value;
7899
+ const wrapperRef = useRef9(null);
7900
+ const moreRef = useRef9(null);
7901
+ const widthsRef = useRef9(/* @__PURE__ */ new Map());
7902
+ const moreWidthRef = useRef9(0);
7903
+ const childArray = Children.toArray(children);
7904
+ const triggers = childArray.filter(isTrigger);
7905
+ const signature = triggers.map((trigger) => trigger.props.value).join("\0");
7906
+ const enabled = overflow === "menu" && triggers.length > 1;
7907
+ const layoutKey = `${signature}${active ?? ""}`;
7908
+ const [measuredKey, setMeasuredKey] = useState21(null);
7909
+ const [visibleValues, setVisibleValues] = useState21(null);
7910
+ const measuring = enabled && measuredKey !== layoutKey;
7911
+ useLayoutEffect5(() => {
7912
+ if (!measuring) return;
7913
+ const wrapper = wrapperRef.current;
7914
+ if (!wrapper) return;
7915
+ wrapper.querySelectorAll("[data-tab-value]").forEach((element) => {
7916
+ const value = element.dataset.tabValue;
7917
+ if (value) widthsRef.current.set(value, element.offsetWidth);
7918
+ });
7919
+ moreWidthRef.current = moreRef.current?.offsetWidth ?? 0;
7920
+ setMeasuredKey(layoutKey);
7921
+ }, [measuring, layoutKey]);
7922
+ useLayoutEffect5(() => {
7923
+ if (!enabled || measuring) return;
7924
+ const wrapper = wrapperRef.current;
7925
+ const list2 = wrapper?.firstElementChild;
7926
+ if (!wrapper || !(list2 instanceof HTMLElement)) return;
7927
+ const update = () => {
7928
+ const style = getComputedStyle(list2);
7929
+ const gap = parseFloat(style.columnGap) || 0;
7930
+ const padding = (parseFloat(style.paddingLeft) || 0) + (parseFloat(style.paddingRight) || 0) + (parseFloat(style.borderLeftWidth) || 0) + (parseFloat(style.borderRightWidth) || 0);
7931
+ const next = pickVisible(
7932
+ signature ? signature.split("\0") : [],
7933
+ widthsRef.current,
7934
+ active,
7935
+ wrapper.clientWidth - padding,
7936
+ gap,
7937
+ moreWidthRef.current
7938
+ );
7939
+ setVisibleValues(
7940
+ (previous) => previous && previous.join("\0") === next.join("\0") ? previous : next
7941
+ );
7942
+ };
7943
+ update();
7944
+ if (typeof ResizeObserver === "undefined") return;
7945
+ const observer = new ResizeObserver(update);
7946
+ observer.observe(wrapper);
7947
+ return () => observer.disconnect();
7948
+ }, [enabled, measuring, signature, active]);
7949
+ const shown = !enabled || measuring || !visibleValues ? null : new Set(visibleValues);
7950
+ const hidden = shown ? triggers.filter((trigger) => !shown.has(trigger.props.value)) : [];
7951
+ const showMore = enabled && (measuring || hidden.length > 0);
7952
+ const hiddenHasError = hidden.some((trigger) => trigger.props.hasError);
7953
+ const moreClassName = cn(
7954
+ variant === "underline" ? tabsUnderlineTriggerStyles() : tabsTriggerStyles({ tone: "brand" }),
7955
+ "data-[state=open]:text-humu-content-title"
7956
+ );
7957
+ const more = showMore ? /* @__PURE__ */ jsxs44(Dropdown, { children: [
7958
+ /* @__PURE__ */ jsx68(Dropdown.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs44(
7959
+ "button",
7960
+ {
7961
+ ref: moreRef,
7962
+ type: "button",
7963
+ className: moreClassName,
7964
+ "aria-label": hiddenHasError ? `${moreLabel}, com erro` : void 0,
7965
+ children: [
7966
+ moreLabel,
7967
+ hiddenHasError && /* @__PURE__ */ jsx68(
7968
+ "span",
7969
+ {
7970
+ "aria-hidden": "true",
7971
+ className: "inline-block size-1.5 shrink-0 rounded-full bg-humu-status-background-error"
7972
+ }
7973
+ ),
7974
+ /* @__PURE__ */ jsx68(ChevronDownIcon5, { "aria-hidden": "true" })
7975
+ ]
7976
+ }
7977
+ ) }),
7978
+ /* @__PURE__ */ jsx68(Dropdown.Content, { align: "end", className: "min-w-48 gap-0.5 p-1", children: hidden.map((trigger) => /* @__PURE__ */ jsxs44(
7979
+ Dropdown.Item,
7980
+ {
7981
+ disabled: trigger.props.disabled,
7982
+ onSelect: () => valueContext?.setValue(trigger.props.value),
7983
+ className: "text-humu-body-xs [&_svg]:size-4",
7984
+ children: [
7985
+ trigger.props.icon && /* @__PURE__ */ jsx68("span", { "aria-hidden": "true", className: "flex", children: trigger.props.icon }),
7986
+ trigger.props.children,
7987
+ trigger.props.count !== void 0 && trigger.props.count !== null && /* @__PURE__ */ jsx68("span", { className: tabsUnderlineCountStyles(), children: trigger.props.count }),
7988
+ trigger.props.hasError && /* @__PURE__ */ jsxs44(Fragment11, { children: [
7989
+ /* @__PURE__ */ jsx68(
7990
+ "span",
7991
+ {
7992
+ "aria-hidden": "true",
7993
+ className: "inline-block size-1.5 shrink-0 rounded-full bg-humu-status-background-error"
7994
+ }
7995
+ ),
7996
+ /* @__PURE__ */ jsx68("span", { className: "sr-only", children: `, ${trigger.props.errorLabel ?? "com erro"}` })
7997
+ ] })
7998
+ ]
7999
+ },
8000
+ trigger.props.value
8001
+ )) })
8002
+ ] }) : null;
8003
+ const list = /* @__PURE__ */ jsx68(
8004
+ TabsPrimitive.List,
8005
+ {
8006
+ ref,
8007
+ "data-variant": variant,
8008
+ className: cn(tabsListStyles({ variant }), className),
8009
+ ...props,
8010
+ children: childArray.map(
8011
+ (child) => isTrigger(child) && shown && !shown.has(child.props.value) ? null : child
8012
+ )
8013
+ }
8014
+ );
8015
+ return /* @__PURE__ */ jsx68(TabsVariantContext.Provider, { value: variant, children: enabled ? /* @__PURE__ */ jsxs44(
8016
+ "div",
8017
+ {
8018
+ ref: wrapperRef,
8019
+ className: cn(
8020
+ "flex w-full min-w-0 items-center",
8021
+ variant === "pill" && "gap-1"
8022
+ ),
8023
+ children: [
8024
+ list,
8025
+ more
8026
+ ]
8027
+ }
8028
+ ) : list });
8029
+ }
7865
8030
  );
7866
8031
  List2.displayName = "Tabs.List";
7867
8032
  var Trigger12 = forwardRef46(
@@ -7886,41 +8051,51 @@ var Trigger12 = forwardRef46(
7886
8051
  TabsPrimitive.Trigger,
7887
8052
  {
7888
8053
  ref,
8054
+ "data-tab-value": props.value,
7889
8055
  className: triggerClassName,
7890
8056
  ...props,
7891
8057
  children
7892
8058
  }
7893
8059
  );
7894
8060
  }
7895
- return /* @__PURE__ */ jsxs44(TabsPrimitive.Trigger, { ref, className: triggerClassName, ...props, children: [
7896
- icon && /* @__PURE__ */ jsx68(
7897
- "span",
7898
- {
7899
- "aria-hidden": "true",
7900
- className: underline ? "flex" : tabsTriggerIconStyles({ tone }),
7901
- children: icon
7902
- }
7903
- ),
7904
- children,
7905
- count !== void 0 && count !== null && /* @__PURE__ */ jsx68(
7906
- "span",
7907
- {
7908
- className: underline ? tabsUnderlineCountStyles() : tabsTriggerCountStyles({ tone }),
7909
- children: count
7910
- }
7911
- ),
7912
- hasError && /* @__PURE__ */ jsxs44(Fragment11, { children: [
7913
- /* @__PURE__ */ jsx68(
7914
- "span",
7915
- {
7916
- "aria-hidden": "true",
7917
- "data-tab-error": "",
7918
- className: "inline-block size-1.5 shrink-0 rounded-full bg-humu-status-background-error"
7919
- }
7920
- ),
7921
- /* @__PURE__ */ jsx68("span", { className: "sr-only", children: `, ${errorLabel}` })
7922
- ] })
7923
- ] });
8061
+ return /* @__PURE__ */ jsxs44(
8062
+ TabsPrimitive.Trigger,
8063
+ {
8064
+ ref,
8065
+ "data-tab-value": props.value,
8066
+ className: triggerClassName,
8067
+ ...props,
8068
+ children: [
8069
+ icon && /* @__PURE__ */ jsx68(
8070
+ "span",
8071
+ {
8072
+ "aria-hidden": "true",
8073
+ className: underline ? "flex" : tabsTriggerIconStyles({ tone }),
8074
+ children: icon
8075
+ }
8076
+ ),
8077
+ children,
8078
+ count !== void 0 && count !== null && /* @__PURE__ */ jsx68(
8079
+ "span",
8080
+ {
8081
+ className: underline ? tabsUnderlineCountStyles() : tabsTriggerCountStyles({ tone }),
8082
+ children: count
8083
+ }
8084
+ ),
8085
+ hasError && /* @__PURE__ */ jsxs44(Fragment11, { children: [
8086
+ /* @__PURE__ */ jsx68(
8087
+ "span",
8088
+ {
8089
+ "aria-hidden": "true",
8090
+ "data-tab-error": "",
8091
+ className: "inline-block size-1.5 shrink-0 rounded-full bg-humu-status-background-error"
8092
+ }
8093
+ ),
8094
+ /* @__PURE__ */ jsx68("span", { className: "sr-only", children: `, ${errorLabel}` })
8095
+ ] })
8096
+ ]
8097
+ }
8098
+ );
7924
8099
  }
7925
8100
  );
7926
8101
  Trigger12.displayName = "Tabs.Trigger";
@@ -7933,15 +8108,33 @@ var Content12 = forwardRef46(({ className, ...props }, ref) => /* @__PURE__ */ j
7933
8108
  }
7934
8109
  ));
7935
8110
  Content12.displayName = "Tabs.Content";
7936
- function TabsRoot({ children, className, ...props }) {
7937
- return /* @__PURE__ */ jsx68(
8111
+ function TabsRoot({
8112
+ children,
8113
+ className,
8114
+ value,
8115
+ defaultValue,
8116
+ onValueChange,
8117
+ ...props
8118
+ }) {
8119
+ const [innerValue, setInnerValue] = useState21(defaultValue);
8120
+ const current = value ?? innerValue;
8121
+ const setValue = useCallback5(
8122
+ (next) => {
8123
+ if (value === void 0) setInnerValue(next);
8124
+ onValueChange?.(next);
8125
+ },
8126
+ [value, onValueChange]
8127
+ );
8128
+ return /* @__PURE__ */ jsx68(TabsValueContext.Provider, { value: { value: current, setValue }, children: /* @__PURE__ */ jsx68(
7938
8129
  TabsPrimitive.Root,
7939
8130
  {
7940
8131
  className: cn("group/tabs w-full", className),
8132
+ value: current,
8133
+ onValueChange: setValue,
7941
8134
  ...props,
7942
8135
  children
7943
8136
  }
7944
- );
8137
+ ) });
7945
8138
  }
7946
8139
  TabsRoot.displayName = "Tabs";
7947
8140
  var Tabs = Object.assign(TabsRoot, {
@@ -8027,7 +8220,7 @@ var ThemeToggle = forwardRef47(
8027
8220
  ThemeToggle.displayName = "ThemeToggle";
8028
8221
 
8029
8222
  // src/primitives/TextArea/TextArea.tsx
8030
- import { forwardRef as forwardRef48, useId as useId19, useState as useState21 } from "react";
8223
+ import { forwardRef as forwardRef48, useId as useId19, useState as useState22 } from "react";
8031
8224
  import { jsx as jsx70, jsxs as jsxs45 } from "react/jsx-runtime";
8032
8225
  var TextArea = forwardRef48(
8033
8226
  ({
@@ -8051,7 +8244,7 @@ var TextArea = forwardRef48(
8051
8244
  const helperId = helper ? `${textareaId}-helper` : void 0;
8052
8245
  const errorId = error ? `${textareaId}-error` : void 0;
8053
8246
  const describedBy = (error ? errorId : helperId) || void 0;
8054
- const [uncontrolledLength, setUncontrolledLength] = useState21(
8247
+ const [uncontrolledLength, setUncontrolledLength] = useState22(
8055
8248
  typeof defaultValue === "string" ? defaultValue.length : 0
8056
8249
  );
8057
8250
  const currentLength = typeof value === "string" ? value.length : uncontrolledLength;
@@ -8138,7 +8331,7 @@ TextArea.displayName = "TextArea";
8138
8331
  // src/primitives/ToggleChip/ToggleChip.tsx
8139
8332
  import {
8140
8333
  forwardRef as forwardRef49,
8141
- useState as useState22
8334
+ useState as useState23
8142
8335
  } from "react";
8143
8336
  import { jsx as jsx71, jsxs as jsxs46 } from "react/jsx-runtime";
8144
8337
  var ToggleChip = forwardRef49(
@@ -8155,7 +8348,7 @@ var ToggleChip = forwardRef49(
8155
8348
  type = "button",
8156
8349
  ...props
8157
8350
  }, ref) => {
8158
- const [uncontrolled, setUncontrolled] = useState22(defaultPressed);
8351
+ const [uncontrolled, setUncontrolled] = useState23(defaultPressed);
8159
8352
  const isPressed = pressed ?? uncontrolled;
8160
8353
  return /* @__PURE__ */ jsxs46(
8161
8354
  "button",
@@ -8368,7 +8561,7 @@ function useToast() {
8368
8561
  }
8369
8562
 
8370
8563
  // src/primitives/TitleSelect/TitleSelect.tsx
8371
- import { CheckIcon as CheckIcon10, ChevronDownIcon as ChevronDownIcon5 } from "lucide-react";
8564
+ import { CheckIcon as CheckIcon10, ChevronDownIcon as ChevronDownIcon6 } from "lucide-react";
8372
8565
  import { forwardRef as forwardRef51 } from "react";
8373
8566
  import { jsx as jsx75, jsxs as jsxs48 } from "react/jsx-runtime";
8374
8567
  var labelClass2 = "truncate text-humu-body-xxs font-semibold uppercase";
@@ -8424,7 +8617,7 @@ var TitleSelect = forwardRef51(
8424
8617
  /* @__PURE__ */ jsx75("span", { className: labelClass2, children: current?.label }),
8425
8618
  ariaLabel && /* @__PURE__ */ jsx75("span", { className: "sr-only", children: `, ${ariaLabel}` }),
8426
8619
  /* @__PURE__ */ jsx75(
8427
- ChevronDownIcon5,
8620
+ ChevronDownIcon6,
8428
8621
  {
8429
8622
  className: "size-4 shrink-0 transition-transform duration-humu-normal group-data-[state=open]/title:rotate-180 motion-reduce:transition-none",
8430
8623
  "aria-hidden": "true"
@@ -8470,7 +8663,7 @@ import {
8470
8663
 
8471
8664
  // src/patterns/Sidebar/Sidebar.tsx
8472
8665
  import { ChevronsLeftRightIcon, ChevronsRightLeftIcon } from "lucide-react";
8473
- import { forwardRef as forwardRef52, useCallback as useCallback5, useEffect as useEffect11, useState as useState23 } from "react";
8666
+ import { forwardRef as forwardRef52, useCallback as useCallback6, useEffect as useEffect11, useState as useState24 } from "react";
8474
8667
  import "./Sidebar-RBBNUVDV.css";
8475
8668
  import { Fragment as Fragment12, jsx as jsx76, jsxs as jsxs49 } from "react/jsx-runtime";
8476
8669
  var LINK_BASE_CLASS = "flex w-full rounded-humu-md focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-humu-focus";
@@ -8628,11 +8821,11 @@ var Sidebar = forwardRef52(function Sidebar2({
8628
8821
  ...rest
8629
8822
  }, ref) {
8630
8823
  const isControlled = controlledCollapsed !== void 0;
8631
- const [internalCollapsed, setInternalCollapsed] = useState23(
8824
+ const [internalCollapsed, setInternalCollapsed] = useState24(
8632
8825
  () => readStoredCollapsed(defaultCollapsed)
8633
8826
  );
8634
8827
  const collapsed = isControlled ? controlledCollapsed : internalCollapsed;
8635
- const toggleCollapse = useCallback5(() => {
8828
+ const toggleCollapse = useCallback6(() => {
8636
8829
  const next = !collapsed;
8637
8830
  if (!isControlled) {
8638
8831
  setInternalCollapsed(next);
@@ -8689,10 +8882,10 @@ var Sidebar = forwardRef52(function Sidebar2({
8689
8882
  style: { width: collapsed ? collapsedWidth : expandedWidth, ...style },
8690
8883
  ...rest,
8691
8884
  children: [
8692
- /* @__PURE__ */ jsx76("div", { className: "flex h-20 shrink-0 items-center border-b border-humu-background-border px-8", children: header }),
8885
+ header && /* @__PURE__ */ jsx76("div", { className: "flex h-20 shrink-0 items-center border-b border-humu-background-border px-8", children: header }),
8693
8886
  /* @__PURE__ */ jsxs49("div", { className: "humu-sidebar-nav flex min-h-0 flex-1 flex-col overflow-y-auto", children: [
8694
8887
  /* @__PURE__ */ jsxs49("nav", { className: "flex flex-1 flex-col", children: [
8695
- /* @__PURE__ */ jsx76("div", { className: "flex flex-col gap-6 pt-6", children: topGroups.map((group, idx) => /* @__PURE__ */ jsx76(
8888
+ /* @__PURE__ */ jsx76("div", { className: cn("flex flex-col gap-6", header ? "pt-6" : "pt-4"), children: topGroups.map((group, idx) => /* @__PURE__ */ jsx76(
8696
8889
  GroupItems,
8697
8890
  {
8698
8891
  group,
@@ -8736,8 +8929,10 @@ var Sidebar = forwardRef52(function Sidebar2({
8736
8929
 
8737
8930
  // src/patterns/Topbar/Topbar.tsx
8738
8931
  import { forwardRef as forwardRef53 } from "react";
8739
- import { jsx as jsx77, jsxs as jsxs50 } from "react/jsx-runtime";
8932
+ import { Fragment as Fragment13, jsx as jsx77, jsxs as jsxs50 } from "react/jsx-runtime";
8740
8933
  var Topbar = forwardRef53(function Topbar2({
8934
+ brandSlot,
8935
+ compactBrandSlot,
8741
8936
  pageTitle,
8742
8937
  searchTrigger,
8743
8938
  notificationCenter,
@@ -8747,6 +8942,7 @@ var Topbar = forwardRef53(function Topbar2({
8747
8942
  className,
8748
8943
  ...props
8749
8944
  }, ref) {
8945
+ const hasBrand = Boolean(brandSlot);
8750
8946
  return /* @__PURE__ */ jsxs50(
8751
8947
  "header",
8752
8948
  {
@@ -8754,16 +8950,30 @@ var Topbar = forwardRef53(function Topbar2({
8754
8950
  role: "banner",
8755
8951
  "aria-label": ariaLabel,
8756
8952
  className: cn(
8757
- "z-30 flex h-20 shrink-0 items-center gap-6 border-b border-humu-background-border bg-humu-background-surface px-6 font-humu-ibm-plex-sans",
8953
+ "z-30 flex h-20 shrink-0 items-center border-b border-humu-background-border bg-humu-background-surface font-humu-ibm-plex-sans",
8954
+ hasBrand ? "gap-4 pr-4 sm:pr-6" : "gap-6 px-6",
8758
8955
  className
8759
8956
  ),
8760
8957
  ...props,
8761
8958
  children: [
8762
- /* @__PURE__ */ jsxs50("div", { className: "flex min-w-0 flex-1 items-center gap-6", children: [
8763
- pageTitle && /* @__PURE__ */ jsx77("h2", { className: "truncate text-humu-heading-xm font-bold text-humu-content-title", children: pageTitle }),
8764
- searchTrigger
8765
- ] }),
8766
- /* @__PURE__ */ jsxs50("div", { className: "flex shrink-0 items-center gap-4", children: [
8959
+ hasBrand && /* @__PURE__ */ jsx77("div", { className: "flex h-full shrink-0 items-center pl-4 sm:px-8", children: compactBrandSlot ? /* @__PURE__ */ jsxs50(Fragment13, { children: [
8960
+ /* @__PURE__ */ jsx77("span", { className: "flex items-center md:hidden", children: compactBrandSlot }),
8961
+ /* @__PURE__ */ jsx77("span", { className: "hidden items-center md:flex", children: brandSlot })
8962
+ ] }) : brandSlot }),
8963
+ /* @__PURE__ */ jsxs50(
8964
+ "div",
8965
+ {
8966
+ className: cn(
8967
+ "flex min-w-0 flex-1 items-center gap-6",
8968
+ hasBrand && "justify-center"
8969
+ ),
8970
+ children: [
8971
+ pageTitle && /* @__PURE__ */ jsx77("h2", { className: "truncate text-humu-heading-xm font-bold text-humu-content-title", children: pageTitle }),
8972
+ searchTrigger
8973
+ ]
8974
+ }
8975
+ ),
8976
+ /* @__PURE__ */ jsxs50("div", { className: "flex shrink-0 items-center gap-2 sm:gap-4", children: [
8767
8977
  notificationCenter,
8768
8978
  themeToggle,
8769
8979
  userMenu
@@ -8781,25 +8991,47 @@ import { jsx as jsx78, jsxs as jsxs51 } from "react/jsx-runtime";
8781
8991
  var TopbarSearchButton = forwardRef54(
8782
8992
  ({
8783
8993
  placeholder = "Buscar cliente, opera\xE7\xE3o ou organiza\xE7\xE3o...",
8994
+ shortcutKeys,
8784
8995
  className,
8785
8996
  type = "button",
8786
8997
  ...props
8787
- }, ref) => /* @__PURE__ */ jsxs51(
8788
- "button",
8789
- {
8790
- ref,
8791
- type,
8792
- className: cn(
8793
- "inline-flex h-10 w-[346px] max-w-full items-center gap-4 rounded-humu-md bg-humu-background-interaction-hover-tabs px-3.5 text-left text-humu-body-xs font-medium text-humu-content-subtitle transition-colors duration-humu-fast hover:bg-humu-background-interaction-hover focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-humu-focus motion-reduce:transition-none",
8794
- className
8795
- ),
8796
- ...props,
8797
- children: [
8798
- /* @__PURE__ */ jsx78(SearchIcon3, { className: "size-6 shrink-0", "aria-hidden": "true" }),
8799
- /* @__PURE__ */ jsx78("span", { className: "truncate", children: placeholder })
8800
- ]
8801
- }
8802
- )
8998
+ }, ref) => {
8999
+ const hasShortcut = Boolean(shortcutKeys?.length);
9000
+ return /* @__PURE__ */ jsxs51(
9001
+ "button",
9002
+ {
9003
+ ref,
9004
+ type,
9005
+ className: cn(
9006
+ "inline-flex h-10 max-w-full items-center gap-2 rounded-humu-md bg-humu-background-interaction-hover-tabs pl-3.5 text-left text-humu-body-xs font-medium text-humu-content-subtitle transition-colors duration-humu-fast hover:bg-humu-background-interaction-hover focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-humu-focus motion-reduce:transition-none",
9007
+ hasShortcut ? "w-[424px] pr-4" : "w-[346px] pr-3.5",
9008
+ className
9009
+ ),
9010
+ ...props,
9011
+ children: [
9012
+ /* @__PURE__ */ jsxs51("span", { className: "flex min-w-0 flex-1 items-center gap-4", children: [
9013
+ /* @__PURE__ */ jsx78(SearchIcon3, { className: "size-6 shrink-0", "aria-hidden": "true" }),
9014
+ /* @__PURE__ */ jsx78("span", { className: "truncate", children: placeholder })
9015
+ ] }),
9016
+ hasShortcut && /* @__PURE__ */ jsx78(
9017
+ "span",
9018
+ {
9019
+ "aria-hidden": "true",
9020
+ className: "hidden shrink-0 items-center gap-1 md:flex",
9021
+ children: shortcutKeys?.map((key) => /* @__PURE__ */ jsx78(
9022
+ "kbd",
9023
+ {
9024
+ className: "inline-flex h-5 min-w-5 items-center justify-center rounded-humu-sm bg-humu-content-subtitle/15 px-1 font-humu-ibm-plex-sans text-humu-body-xxs font-normal text-humu-content-subtitle",
9025
+ children: key
9026
+ },
9027
+ key
9028
+ ))
9029
+ }
9030
+ )
9031
+ ]
9032
+ }
9033
+ );
9034
+ }
8803
9035
  );
8804
9036
  TopbarSearchButton.displayName = "TopbarSearchButton";
8805
9037
  var TopbarIconButton = forwardRef54(({ className, type = "button", ...props }, ref) => /* @__PURE__ */ jsx78(
@@ -8906,7 +9138,7 @@ function AppShell({
8906
9138
  collapsedHeaderSlot,
8907
9139
  defaultSidebarCollapsed = false
8908
9140
  }) {
8909
- return /* @__PURE__ */ jsxs52("div", { className: "flex h-screen overflow-hidden bg-humu-background-base text-humu-content-title", children: [
9141
+ return /* @__PURE__ */ jsxs52("div", { className: "flex h-screen flex-col overflow-hidden bg-humu-background-base text-humu-content-title", children: [
8910
9142
  /* @__PURE__ */ jsx79(
8911
9143
  "a",
8912
9144
  {
@@ -8916,25 +9148,25 @@ function AppShell({
8916
9148
  }
8917
9149
  ),
8918
9150
  /* @__PURE__ */ jsx79(
8919
- Sidebar,
9151
+ Topbar,
8920
9152
  {
8921
- groups: sidebarGroups ?? DEFAULT_GROUPS,
8922
- currentPath,
8923
- linkComponent,
8924
- defaultCollapsed: defaultSidebarCollapsed,
8925
- headerSlot: headerSlot ?? DEFAULT_HEADER_SLOT,
8926
- collapsedHeaderSlot: collapsedHeaderSlot ?? (headerSlot ? void 0 : DEFAULT_COLLAPSED_HEADER_SLOT)
9153
+ brandSlot: headerSlot ?? DEFAULT_HEADER_SLOT,
9154
+ compactBrandSlot: collapsedHeaderSlot ?? (headerSlot ? void 0 : DEFAULT_COLLAPSED_HEADER_SLOT),
9155
+ pageTitle,
9156
+ searchTrigger,
9157
+ notificationCenter,
9158
+ themeToggle,
9159
+ userMenu
8927
9160
  }
8928
9161
  ),
8929
- /* @__PURE__ */ jsxs52("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col", children: [
9162
+ /* @__PURE__ */ jsxs52("div", { className: "flex min-h-0 min-w-0 flex-1", children: [
8930
9163
  /* @__PURE__ */ jsx79(
8931
- Topbar,
9164
+ Sidebar,
8932
9165
  {
8933
- pageTitle,
8934
- searchTrigger,
8935
- notificationCenter,
8936
- themeToggle,
8937
- userMenu
9166
+ groups: sidebarGroups ?? DEFAULT_GROUPS,
9167
+ currentPath,
9168
+ linkComponent,
9169
+ defaultCollapsed: defaultSidebarCollapsed
8938
9170
  }
8939
9171
  ),
8940
9172
  /* @__PURE__ */ jsx79(
@@ -8955,7 +9187,7 @@ AppShell.displayName = "AppShell";
8955
9187
  // src/patterns/KpiHero/KpiHero.tsx
8956
9188
  import { useId as useId20 } from "react";
8957
9189
  import { ArrowDownIcon as ArrowDownIcon2, ArrowUpIcon as ArrowUpIcon2, MinusIcon as MinusIcon4 } from "lucide-react";
8958
- import { Fragment as Fragment13, jsx as jsx80, jsxs as jsxs53 } from "react/jsx-runtime";
9190
+ import { Fragment as Fragment14, jsx as jsx80, jsxs as jsxs53 } from "react/jsx-runtime";
8959
9191
  var resolveTone = (tone) => tone === "warn" ? "warning" : tone === "danger" ? "error" : tone;
8960
9192
  var iconClass = {
8961
9193
  brand: "bg-humu-background-brand-subtle text-humu-content-brand",
@@ -9033,7 +9265,7 @@ function KpiHero({
9033
9265
  const gradientId = `spark-${rawId.replace(/[:]/g, "")}`;
9034
9266
  const hasSparkline = sparkline !== void 0 && sparkline.length >= 2;
9035
9267
  const sparkPaths = sparkline !== void 0 && hasSparkline ? buildSparklinePaths(sparkline) : null;
9036
- const inner = /* @__PURE__ */ jsxs53(Fragment13, { children: [
9268
+ const inner = /* @__PURE__ */ jsxs53(Fragment14, { children: [
9037
9269
  /* @__PURE__ */ jsxs53("div", { className: "flex items-center gap-2", children: [
9038
9270
  /* @__PURE__ */ jsx80(
9039
9271
  "span",
@@ -9139,7 +9371,7 @@ function KpiHero({
9139
9371
  }
9140
9372
 
9141
9373
  // src/patterns/DashboardBlock/DashboardBlock.tsx
9142
- import { Fragment as Fragment14, jsx as jsx81, jsxs as jsxs54 } from "react/jsx-runtime";
9374
+ import { Fragment as Fragment15, jsx as jsx81, jsxs as jsxs54 } from "react/jsx-runtime";
9143
9375
  function DashboardBlock({
9144
9376
  available,
9145
9377
  reason,
@@ -9179,13 +9411,13 @@ function DashboardBlock({
9179
9411
  if (isEmpty2) {
9180
9412
  return /* @__PURE__ */ jsx81("div", { className: "flex min-h-40 items-center justify-center rounded-humu-lg border border-humu-border-default bg-humu-background-surface p-5 text-center", children: /* @__PURE__ */ jsx81(Text, { size: "sm", color: "muted", children: emptyLabel }) });
9181
9413
  }
9182
- return /* @__PURE__ */ jsx81(Fragment14, { children });
9414
+ return /* @__PURE__ */ jsx81(Fragment15, { children });
9183
9415
  }
9184
9416
 
9185
9417
  // src/patterns/LegalDocumentRenderer/LegalDocumentRenderer.tsx
9186
9418
  import ReactMarkdown from "react-markdown";
9187
9419
  import remarkGfm from "remark-gfm";
9188
- import { Fragment as Fragment15, jsx as jsx82, jsxs as jsxs55 } from "react/jsx-runtime";
9420
+ import { Fragment as Fragment16, jsx as jsx82, jsxs as jsxs55 } from "react/jsx-runtime";
9189
9421
  function formatLastUpdated(iso) {
9190
9422
  if (!iso) return "";
9191
9423
  const date = new Date(iso);
@@ -9250,7 +9482,7 @@ function LegalDocumentRenderer({
9250
9482
  className
9251
9483
  }) {
9252
9484
  if (isLoading) {
9253
- return /* @__PURE__ */ jsx82("div", { className: cn("flex flex-col gap-3", className), children: loadingState ?? /* @__PURE__ */ jsxs55(Fragment15, { children: [
9485
+ return /* @__PURE__ */ jsx82("div", { className: cn("flex flex-col gap-3", className), children: loadingState ?? /* @__PURE__ */ jsxs55(Fragment16, { children: [
9254
9486
  /* @__PURE__ */ jsx82(Skeleton, { shape: "text", style: { width: "60%", height: 24 } }),
9255
9487
  /* @__PURE__ */ jsx82(Skeleton, { shape: "text", style: { width: "100%", height: 14 } }),
9256
9488
  /* @__PURE__ */ jsx82(Skeleton, { shape: "text", style: { width: "95%", height: 14 } }),
@@ -9302,7 +9534,7 @@ import { forwardRef as forwardRef56 } from "react";
9302
9534
  // src/patterns/SortableColumnHeader/SortableColumnHeader.tsx
9303
9535
  import { forwardRef as forwardRef55 } from "react";
9304
9536
  import {
9305
- ChevronDownIcon as ChevronDownIcon6,
9537
+ ChevronDownIcon as ChevronDownIcon7,
9306
9538
  ChevronsUpDownIcon,
9307
9539
  ChevronUpIcon
9308
9540
  } from "lucide-react";
@@ -9350,7 +9582,7 @@ var SortableColumnHeader = forwardRef55(
9350
9582
  ...props,
9351
9583
  children: [
9352
9584
  /* @__PURE__ */ jsx83("span", { children: label }),
9353
- direction === "asc" ? /* @__PURE__ */ jsx83(ChevronUpIcon, { className: "size-4", "aria-hidden": "true" }) : direction === "desc" ? /* @__PURE__ */ jsx83(ChevronDownIcon6, { className: "size-4", "aria-hidden": "true" }) : /* @__PURE__ */ jsx83(
9585
+ direction === "asc" ? /* @__PURE__ */ jsx83(ChevronUpIcon, { className: "size-4", "aria-hidden": "true" }) : direction === "desc" ? /* @__PURE__ */ jsx83(ChevronDownIcon7, { className: "size-4", "aria-hidden": "true" }) : /* @__PURE__ */ jsx83(
9354
9586
  ChevronsUpDownIcon,
9355
9587
  {
9356
9588
  className: "size-4 text-humu-content-body-text",
@@ -9582,14 +9814,14 @@ var DataTableActionButton = forwardRef57(({ className, type = "button", asChild
9582
9814
  DataTableActionButton.displayName = "DataTableActionButton";
9583
9815
 
9584
9816
  // src/patterns/DataTablePagination/DataTablePagination.tsx
9585
- import { forwardRef as forwardRef58, useState as useState24 } from "react";
9817
+ import { forwardRef as forwardRef58, useState as useState25 } from "react";
9586
9818
  import {
9587
9819
  CheckIcon as CheckIcon11,
9588
- ChevronDownIcon as ChevronDownIcon7,
9820
+ ChevronDownIcon as ChevronDownIcon8,
9589
9821
  ChevronLeftIcon,
9590
9822
  ChevronRightIcon as ChevronRightIcon2
9591
9823
  } from "lucide-react";
9592
- import { Fragment as Fragment16, jsx as jsx86, jsxs as jsxs59 } from "react/jsx-runtime";
9824
+ import { Fragment as Fragment17, jsx as jsx86, jsxs as jsxs59 } from "react/jsx-runtime";
9593
9825
  var DEFAULT_PER_PAGE_OPTIONS = [5, 10, 20, 30, 50, 70, 100];
9594
9826
  var pageBoxStyles = "inline-flex size-[34px] items-center justify-center rounded-humu-md border border-humu-background-border text-humu-body-xs tabular-nums transition-colors duration-humu-fast motion-reduce:transition-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-humu-focus [&_svg]:size-4";
9595
9827
  var pageButtonStyles = cn(
@@ -9634,7 +9866,7 @@ var DataTablePagination = forwardRef58(
9634
9866
  className,
9635
9867
  ...props
9636
9868
  }, ref) => {
9637
- const [perPageOpen, setPerPageOpen] = useState24(false);
9869
+ const [perPageOpen, setPerPageOpen] = useState25(false);
9638
9870
  const first = (page - 1) * perPage + 1;
9639
9871
  const last = Math.min(page * perPage, total);
9640
9872
  const totalPages = Math.max(1, Math.ceil(total / perPage));
@@ -9665,7 +9897,7 @@ var DataTablePagination = forwardRef58(
9665
9897
  className: "inline-flex h-[34px] items-center gap-1 rounded-humu-md border border-humu-background-border bg-humu-background-surface px-3 text-humu-body-xs text-humu-content-title transition-colors duration-humu-fast motion-reduce:transition-none hover:bg-humu-background-interaction-hover focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-humu-focus",
9666
9898
  children: [
9667
9899
  /* @__PURE__ */ jsx86("span", { className: "tabular-nums", children: perPage }),
9668
- /* @__PURE__ */ jsx86(ChevronDownIcon7, { className: "size-4", "aria-hidden": "true" })
9900
+ /* @__PURE__ */ jsx86(ChevronDownIcon8, { className: "size-4", "aria-hidden": "true" })
9669
9901
  ]
9670
9902
  }
9671
9903
  ) }),
@@ -9705,7 +9937,7 @@ var DataTablePagination = forwardRef58(
9705
9937
  className
9706
9938
  ),
9707
9939
  ...props,
9708
- children: variant === "buttons" ? /* @__PURE__ */ jsxs59(Fragment16, { children: [
9940
+ children: variant === "buttons" ? /* @__PURE__ */ jsxs59(Fragment17, { children: [
9709
9941
  /* @__PURE__ */ jsxs59("div", { className: "flex flex-wrap items-center gap-4", children: [
9710
9942
  showing,
9711
9943
  perPageSelector
@@ -9732,7 +9964,7 @@ var DataTablePagination = forwardRef58(
9732
9964
  }
9733
9965
  )
9734
9966
  ] })
9735
- ] }) : /* @__PURE__ */ jsxs59(Fragment16, { children: [
9967
+ ] }) : /* @__PURE__ */ jsxs59(Fragment17, { children: [
9736
9968
  showing,
9737
9969
  /* @__PURE__ */ jsxs59("div", { className: "flex flex-wrap items-center gap-4", children: [
9738
9970
  perPageSelector,
@@ -9798,12 +10030,12 @@ DataTablePagination.displayName = "DataTablePagination";
9798
10030
 
9799
10031
  // src/patterns/ReadOnlyDataView/ReadOnlyDataView.tsx
9800
10032
  import {
9801
- ChevronDownIcon as ChevronDownIcon8,
10033
+ ChevronDownIcon as ChevronDownIcon9,
9802
10034
  ChevronUpIcon as ChevronUpIcon2,
9803
10035
  ChevronsUpDownIcon as ChevronsUpDownIcon2
9804
10036
  } from "lucide-react";
9805
- import { useState as useState25 } from "react";
9806
- import { Fragment as Fragment17, jsx as jsx87, jsxs as jsxs60 } from "react/jsx-runtime";
10037
+ import { useState as useState26 } from "react";
10038
+ import { Fragment as Fragment18, jsx as jsx87, jsxs as jsxs60 } from "react/jsx-runtime";
9807
10039
  function formatDate(value, format3) {
9808
10040
  if (!value) return "\u2014";
9809
10041
  const date = value instanceof Date ? value : new Date(String(value));
@@ -9840,7 +10072,7 @@ function ReadOnlyDataView({
9840
10072
  density = "normal",
9841
10073
  className
9842
10074
  }) {
9843
- const [activeDialog, setActiveDialog] = useState25(null);
10075
+ const [activeDialog, setActiveDialog] = useState26(null);
9844
10076
  const cellPadding = density === "compact" ? "px-3 py-2" : "px-4 py-3";
9845
10077
  const headerPadding = density === "compact" ? "px-3 py-2" : "px-4 py-3";
9846
10078
  const handleHeaderClick = (column) => {
@@ -9857,7 +10089,7 @@ function ReadOnlyDataView({
9857
10089
  setActiveDialog({ dialog, row, details: result });
9858
10090
  };
9859
10091
  const hasTriggerColumn = (column) => column.type !== "action" && Boolean(detailsDialogs?.some((d) => d.triggerColumn === column.key));
9860
- return /* @__PURE__ */ jsxs60(Fragment17, { children: [
10092
+ return /* @__PURE__ */ jsxs60(Fragment18, { children: [
9861
10093
  /* @__PURE__ */ jsx87(
9862
10094
  Card,
9863
10095
  {
@@ -9897,7 +10129,7 @@ function ReadOnlyDataView({
9897
10129
  "aria-hidden": "true"
9898
10130
  }
9899
10131
  ) : /* @__PURE__ */ jsx87(
9900
- ChevronDownIcon8,
10132
+ ChevronDownIcon9,
9901
10133
  {
9902
10134
  size: 12,
9903
10135
  strokeWidth: 2.5,
@@ -10010,7 +10242,7 @@ function renderCell(column, row) {
10010
10242
  }
10011
10243
 
10012
10244
  // src/patterns/NotificationCenter/NotificationCenter.tsx
10013
- import { forwardRef as forwardRef59, useState as useState26 } from "react";
10245
+ import { forwardRef as forwardRef59, useState as useState27 } from "react";
10014
10246
  import { BellIcon } from "lucide-react";
10015
10247
  import { jsx as jsx88, jsxs as jsxs61 } from "react/jsx-runtime";
10016
10248
  var severityDotClass = {
@@ -10048,7 +10280,7 @@ var NotificationCenter = forwardRef59(
10048
10280
  triggerAriaLabel = "Notifica\xE7\xF5es",
10049
10281
  relativeTime
10050
10282
  }, ref) => {
10051
- const [filter, setFilter] = useState26("unread");
10283
+ const [filter, setFilter] = useState27("unread");
10052
10284
  const relativeTimeFn = relativeTime ?? defaultRelativeTime;
10053
10285
  const filteredNotifs = filter === "unread" ? notifications.filter((n) => !n.read) : notifications;
10054
10286
  return /* @__PURE__ */ jsxs61(Popover, { children: [
@@ -10185,7 +10417,7 @@ NotificationCenter.displayName = "NotificationCenter";
10185
10417
  // src/patterns/NavigatorTile/NavigatorTile.tsx
10186
10418
  import { ChevronRightIcon as ChevronRightIcon3 } from "lucide-react";
10187
10419
  import { forwardRef as forwardRef60 } from "react";
10188
- import { Fragment as Fragment18, jsx as jsx89, jsxs as jsxs62 } from "react/jsx-runtime";
10420
+ import { Fragment as Fragment19, jsx as jsx89, jsxs as jsxs62 } from "react/jsx-runtime";
10189
10421
  var NavigatorTile = forwardRef60(
10190
10422
  ({
10191
10423
  icon,
@@ -10212,7 +10444,7 @@ var NavigatorTile = forwardRef60(
10212
10444
  className
10213
10445
  ),
10214
10446
  ...props,
10215
- children: asChild ? children : /* @__PURE__ */ jsxs62(Fragment18, { children: [
10447
+ children: asChild ? children : /* @__PURE__ */ jsxs62(Fragment19, { children: [
10216
10448
  /* @__PURE__ */ jsxs62("div", { className: "flex min-w-0 items-center gap-3", children: [
10217
10449
  icon && /* @__PURE__ */ jsx89("span", { className: "inline-flex size-10 shrink-0 items-center justify-center rounded-humu-pill bg-humu-background-brand-brand text-humu-content-on-brand [&_svg]:size-6", children: icon }),
10218
10450
  /* @__PURE__ */ jsx89(
@@ -10448,9 +10680,9 @@ PageTitle.displayName = "PageTitle";
10448
10680
  import {
10449
10681
  cloneElement,
10450
10682
  forwardRef as forwardRef64,
10451
- isValidElement
10683
+ isValidElement as isValidElement2
10452
10684
  } from "react";
10453
- import { Fragment as Fragment19, jsx as jsx93, jsxs as jsxs66 } from "react/jsx-runtime";
10685
+ import { Fragment as Fragment20, jsx as jsx93, jsxs as jsxs66 } from "react/jsx-runtime";
10454
10686
  var TutorialCard = forwardRef64(
10455
10687
  ({
10456
10688
  title,
@@ -10463,7 +10695,7 @@ var TutorialCard = forwardRef64(
10463
10695
  children,
10464
10696
  ...props
10465
10697
  }, ref) => {
10466
- const content = /* @__PURE__ */ jsxs66(Fragment19, { children: [
10698
+ const content = /* @__PURE__ */ jsxs66(Fragment20, { children: [
10467
10699
  media && /* @__PURE__ */ jsxs66("div", { className: "relative aspect-video w-full overflow-hidden bg-humu-background-inactive", children: [
10468
10700
  media,
10469
10701
  category && /* @__PURE__ */ jsx93("div", { className: "absolute left-3 top-3", children: /* @__PURE__ */ jsx93(Badge, { variant: "default", size: "sm", children: category }) })
@@ -10474,7 +10706,7 @@ var TutorialCard = forwardRef64(
10474
10706
  duration && /* @__PURE__ */ jsx93("div", { className: "mt-auto pt-2", children: /* @__PURE__ */ jsx93(Badge, { variant: "info", size: "sm", children: duration }) })
10475
10707
  ] })
10476
10708
  ] });
10477
- const emptyChild = asChild && isValidElement(children) && children.props.children == null ? children : null;
10709
+ const emptyChild = asChild && isValidElement2(children) && children.props.children == null ? children : null;
10478
10710
  return /* @__PURE__ */ jsx93(
10479
10711
  Card,
10480
10712
  {
@@ -10492,9 +10724,9 @@ var TutorialCard = forwardRef64(
10492
10724
  TutorialCard.displayName = "TutorialCard";
10493
10725
 
10494
10726
  // src/patterns/KpiCard/KpiCard.tsx
10495
- import { ChevronDownIcon as ChevronDownIcon9 } from "lucide-react";
10727
+ import { ChevronDownIcon as ChevronDownIcon10 } from "lucide-react";
10496
10728
  import { forwardRef as forwardRef65, useId as useId21 } from "react";
10497
- import { Fragment as Fragment20, jsx as jsx94, jsxs as jsxs67 } from "react/jsx-runtime";
10729
+ import { Fragment as Fragment21, jsx as jsx94, jsxs as jsxs67 } from "react/jsx-runtime";
10498
10730
  var resolveVariant = (variant) => variant === "danger" ? "error" : variant;
10499
10731
  var stripeClass = {
10500
10732
  neutral: "bg-humu-content-subtitle",
@@ -10556,7 +10788,7 @@ var KpiCard = forwardRef65(
10556
10788
  const progressLabelId = useId21();
10557
10789
  const progressValue = progress && Number.isFinite(progress.value) ? Math.min(100, Math.max(0, progress.value)) : 0;
10558
10790
  const progressTone = progress?.tone ?? "default";
10559
- const title = /* @__PURE__ */ jsxs67(Fragment20, { children: [
10791
+ const title = /* @__PURE__ */ jsxs67(Fragment21, { children: [
10560
10792
  icon && /* @__PURE__ */ jsx94(
10561
10793
  "span",
10562
10794
  {
@@ -10569,7 +10801,7 @@ var KpiCard = forwardRef65(
10569
10801
  }
10570
10802
  ),
10571
10803
  /* @__PURE__ */ jsx94("span", { className: "truncate text-humu-body-xxs font-semibold uppercase", children: label }),
10572
- onLabelClick && /* @__PURE__ */ jsx94(ChevronDownIcon9, { className: "size-4 shrink-0", "aria-hidden": "true" })
10804
+ onLabelClick && /* @__PURE__ */ jsx94(ChevronDownIcon10, { className: "size-4 shrink-0", "aria-hidden": "true" })
10573
10805
  ] });
10574
10806
  return /* @__PURE__ */ jsxs67(
10575
10807
  "div",
@@ -10671,9 +10903,9 @@ KpiCard.displayName = "KpiCard";
10671
10903
 
10672
10904
  // src/patterns/CommandPalette/CommandPalette.tsx
10673
10905
  import { SearchIcon as SearchIcon4 } from "lucide-react";
10674
- import { useEffect as useEffect12, useRef as useRef9, useState as useState27 } from "react";
10906
+ import { useEffect as useEffect12, useRef as useRef10, useState as useState28 } from "react";
10675
10907
  import { createPortal } from "react-dom";
10676
- import { Fragment as Fragment21, jsx as jsx95, jsxs as jsxs68 } from "react/jsx-runtime";
10908
+ import { Fragment as Fragment22, jsx as jsx95, jsxs as jsxs68 } from "react/jsx-runtime";
10677
10909
  function CommandPalette({
10678
10910
  open,
10679
10911
  onOpenChange,
@@ -10687,9 +10919,9 @@ function CommandPalette({
10687
10919
  emptyMessage = "Sem resultados.",
10688
10920
  ariaLabel = "Paleta de comandos"
10689
10921
  }) {
10690
- const [queryValue, setQueryValue] = useState27(query ?? "");
10691
- const [highlightedId, setHighlightedId] = useState27(null);
10692
- const inputRef = useRef9(null);
10922
+ const [queryValue, setQueryValue] = useState28(query ?? "");
10923
+ const [highlightedId, setHighlightedId] = useState28(null);
10924
+ const inputRef = useRef10(null);
10693
10925
  const flatItems = groups.flatMap((g) => g.items.filter((i) => !i.disabled));
10694
10926
  const filteredGroups = groups.filter((g) => g.loading || g.items.length > 0);
10695
10927
  useEffect12(() => {
@@ -10835,7 +11067,7 @@ function CommandPalette({
10835
11067
  isHighlighted ? "bg-humu-background-brand-brand text-humu-content-on-brand" : "text-humu-content-title",
10836
11068
  item.disabled && "pointer-events-none opacity-50"
10837
11069
  ),
10838
- children: renderItem ? renderItem(item, isHighlighted) : /* @__PURE__ */ jsxs68(Fragment21, { children: [
11070
+ children: renderItem ? renderItem(item, isHighlighted) : /* @__PURE__ */ jsxs68(Fragment22, { children: [
10839
11071
  /* @__PURE__ */ jsxs68("div", { className: "flex min-w-0 flex-1 flex-col", children: [
10840
11072
  /* @__PURE__ */ jsx95("span", { className: "truncate font-medium", children: item.label }),
10841
11073
  item.description && /* @__PURE__ */ jsx95(
@@ -10880,8 +11112,8 @@ function CommandPalette({
10880
11112
  }
10881
11113
 
10882
11114
  // src/patterns/ChartTimeSeries/ChartTimeSeries.tsx
10883
- import { forwardRef as forwardRef66, useId as useId22, useState as useState28 } from "react";
10884
- import { Fragment as Fragment22, jsx as jsx96, jsxs as jsxs69 } from "react/jsx-runtime";
11115
+ import { forwardRef as forwardRef66, useId as useId22, useState as useState29 } from "react";
11116
+ import { Fragment as Fragment23, jsx as jsx96, jsxs as jsxs69 } from "react/jsx-runtime";
10885
11117
  var DEFAULT_RANGES = ["3m", "6m", "12m", "YTD"];
10886
11118
  var DEFAULT_EMPTY_MESSAGE = "Sem dados no per\xEDodo.";
10887
11119
  function buildChartPaths(data) {
@@ -10937,7 +11169,7 @@ var ChartTimeSeries = forwardRef66(
10937
11169
  className,
10938
11170
  ...props
10939
11171
  }, ref) {
10940
- const [internalRange, setInternalRange] = useState28(
11172
+ const [internalRange, setInternalRange] = useState29(
10941
11173
  defaultRange ?? ranges[0]
10942
11174
  );
10943
11175
  const activeRange = range ?? internalRange;
@@ -11007,7 +11239,7 @@ var ChartTimeSeries = forwardRef66(
11007
11239
  },
11008
11240
  y
11009
11241
  )),
11010
- paths && /* @__PURE__ */ jsxs69(Fragment22, { children: [
11242
+ paths && /* @__PURE__ */ jsxs69(Fragment23, { children: [
11011
11243
  /* @__PURE__ */ jsx96(
11012
11244
  "path",
11013
11245
  {
@@ -11059,7 +11291,7 @@ var ChartTimeSeries = forwardRef66(
11059
11291
  );
11060
11292
 
11061
11293
  // src/patterns/DonutChart/DonutChart.tsx
11062
- import { forwardRef as forwardRef67, useState as useState29 } from "react";
11294
+ import { forwardRef as forwardRef67, useState as useState30 } from "react";
11063
11295
  import { Cell, Pie, PieChart, ResponsiveContainer, Tooltip as Tooltip2 } from "recharts";
11064
11296
  import { jsx as jsx97, jsxs as jsxs70 } from "react/jsx-runtime";
11065
11297
  var DEFAULT_COLORS = [
@@ -11144,7 +11376,7 @@ var DonutChart = forwardRef67(
11144
11376
  const total = totalProp ?? data.reduce((acc, s) => acc + s.value, 0);
11145
11377
  const slices = buildSlices(data, topN, othersLabel, defaultColors);
11146
11378
  const isEmpty2 = data.length === 0 || total === 0;
11147
- const [activeIdx, setActiveIdx] = useState29(null);
11379
+ const [activeIdx, setActiveIdx] = useState30(null);
11148
11380
  return /* @__PURE__ */ jsxs70(
11149
11381
  "div",
11150
11382
  {
@@ -11305,7 +11537,7 @@ EmptyState.displayName = "EmptyState";
11305
11537
  import {
11306
11538
  forwardRef as forwardRef69
11307
11539
  } from "react";
11308
- import { Fragment as Fragment23, jsx as jsx99, jsxs as jsxs72 } from "react/jsx-runtime";
11540
+ import { Fragment as Fragment24, jsx as jsx99, jsxs as jsxs72 } from "react/jsx-runtime";
11309
11541
  var ActionBar = forwardRef69(
11310
11542
  ({ start, end, children, sticky = false, className, ...props }, ref) => /* @__PURE__ */ jsx99(
11311
11543
  "section",
@@ -11317,7 +11549,7 @@ var ActionBar = forwardRef69(
11317
11549
  className
11318
11550
  ),
11319
11551
  ...props,
11320
- children: children ?? /* @__PURE__ */ jsxs72(Fragment23, { children: [
11552
+ children: children ?? /* @__PURE__ */ jsxs72(Fragment24, { children: [
11321
11553
  /* @__PURE__ */ jsx99("div", { className: "flex flex-wrap items-center gap-4", children: start }),
11322
11554
  /* @__PURE__ */ jsx99("div", { className: "ml-auto flex flex-wrap items-center justify-end gap-4", children: end })
11323
11555
  ] })
@@ -11327,8 +11559,8 @@ var ActionBar = forwardRef69(
11327
11559
  ActionBar.displayName = "ActionBar";
11328
11560
 
11329
11561
  // src/patterns/CookieConsent/CookieConsent.tsx
11330
- import { useState as useState30 } from "react";
11331
- import { Fragment as Fragment24, jsx as jsx100, jsxs as jsxs73 } from "react/jsx-runtime";
11562
+ import { useState as useState31 } from "react";
11563
+ import { Fragment as Fragment25, jsx as jsx100, jsxs as jsxs73 } from "react/jsx-runtime";
11332
11564
  var readConsent = (cookieName) => typeof document !== "undefined" && document.cookie.split("; ").some((cookie) => cookie.startsWith(`${cookieName}=`));
11333
11565
  function CookieConsent({
11334
11566
  cookieName,
@@ -11339,7 +11571,7 @@ function CookieConsent({
11339
11571
  onAccept,
11340
11572
  className
11341
11573
  }) {
11342
- const [open, setOpen] = useState30(() => !readConsent(cookieName));
11574
+ const [open, setOpen] = useState31(() => !readConsent(cookieName));
11343
11575
  if (!open) return null;
11344
11576
  const accept = () => {
11345
11577
  document.cookie = `${cookieName}=true; max-age=${maxAgeDays * 24 * 60 * 60}; path=/; SameSite=Lax`;
@@ -11357,7 +11589,7 @@ function CookieConsent({
11357
11589
  children: [
11358
11590
  /* @__PURE__ */ jsxs73("p", { className: "min-w-0 flex-1", children: [
11359
11591
  message,
11360
- policyLink ? /* @__PURE__ */ jsxs73(Fragment24, { children: [
11592
+ policyLink ? /* @__PURE__ */ jsxs73(Fragment25, { children: [
11361
11593
  " ",
11362
11594
  policyLink,
11363
11595
  "."
@@ -11408,9 +11640,9 @@ var ErrorBoundary = class extends Component {
11408
11640
  };
11409
11641
 
11410
11642
  // src/patterns/QuickFilters/QuickFilters.tsx
11411
- import { ChevronDownIcon as ChevronDownIcon10, EllipsisIcon } from "lucide-react";
11412
- import { useState as useState31 } from "react";
11413
- import { Fragment as Fragment25, jsx as jsx102, jsxs as jsxs74 } from "react/jsx-runtime";
11643
+ import { ChevronDownIcon as ChevronDownIcon11, EllipsisIcon } from "lucide-react";
11644
+ import { useState as useState32 } from "react";
11645
+ import { Fragment as Fragment26, jsx as jsx102, jsxs as jsxs74 } from "react/jsx-runtime";
11414
11646
  var visibleFrom = {
11415
11647
  0: "inline-flex",
11416
11648
  1: "hidden sm:inline-flex",
@@ -11437,7 +11669,7 @@ function QuickFilters({
11437
11669
  onValueChange,
11438
11670
  moreLabel = "Mais"
11439
11671
  }) {
11440
- const [moreOpen, setMoreOpen] = useState31(false);
11672
+ const [moreOpen, setMoreOpen] = useState32(false);
11441
11673
  if (items.length === 0) return null;
11442
11674
  const toggle = (id) => {
11443
11675
  onValueChange(id === value ? null : id);
@@ -11459,7 +11691,7 @@ function QuickFilters({
11459
11691
  },
11460
11692
  key
11461
11693
  );
11462
- return /* @__PURE__ */ jsxs74(Fragment25, { children: [
11694
+ return /* @__PURE__ */ jsxs74(Fragment26, { children: [
11463
11695
  items.map(
11464
11696
  (item) => chip(item, visibleFrom[item.priority ?? 0], item.id)
11465
11697
  ),
@@ -11473,7 +11705,7 @@ function QuickFilters({
11473
11705
  className: "inline-flex data-[state=open]:bg-humu-background-brand-brand data-[state=open]:font-medium data-[state=open]:text-humu-content-on-brand lg:hidden",
11474
11706
  children: [
11475
11707
  moreLabel,
11476
- /* @__PURE__ */ jsx102(ChevronDownIcon10, { "aria-hidden": "true" })
11708
+ /* @__PURE__ */ jsx102(ChevronDownIcon11, { "aria-hidden": "true" })
11477
11709
  ]
11478
11710
  }
11479
11711
  ) }),
@@ -11754,8 +11986,8 @@ import {
11754
11986
  CircleAlertIcon as CircleAlertIcon4,
11755
11987
  XIcon as XIcon9
11756
11988
  } from "lucide-react";
11757
- import { useState as useState32 } from "react";
11758
- import { Fragment as Fragment26, jsx as jsx107, jsxs as jsxs77 } from "react/jsx-runtime";
11989
+ import { useState as useState33 } from "react";
11990
+ import { Fragment as Fragment27, jsx as jsx107, jsxs as jsxs77 } from "react/jsx-runtime";
11759
11991
  var stepIndicatorClass = {
11760
11992
  completed: "bg-humu-status-background-success text-humu-content-on-brand border-humu-status-background-success",
11761
11993
  active: "bg-humu-background-brand-brand text-humu-content-on-brand border-humu-background-brand-brand",
@@ -11768,7 +12000,7 @@ function StepIndicator({
11768
12000
  index,
11769
12001
  onStepChange
11770
12002
  }) {
11771
- const inner = /* @__PURE__ */ jsxs77(Fragment26, { children: [
12003
+ const inner = /* @__PURE__ */ jsxs77(Fragment27, { children: [
11772
12004
  /* @__PURE__ */ jsx107(
11773
12005
  "span",
11774
12006
  {
@@ -11830,7 +12062,7 @@ function WizardAside({
11830
12062
  defaultCollapsed,
11831
12063
  children
11832
12064
  }) {
11833
- const [collapsed, setCollapsed] = useState32(Boolean(defaultCollapsed));
12065
+ const [collapsed, setCollapsed] = useState33(Boolean(defaultCollapsed));
11834
12066
  const isCollapsed = Boolean(collapsible && collapsed);
11835
12067
  return /* @__PURE__ */ jsxs77(
11836
12068
  "aside",
@@ -12011,7 +12243,7 @@ function WizardShell(props) {
12011
12243
  WizardShell.displayName = "WizardShell";
12012
12244
 
12013
12245
  // src/patterns/DSAccordion/DSAccordion.tsx
12014
- import { ChevronDownIcon as ChevronDownIcon11 } from "lucide-react";
12246
+ import { ChevronDownIcon as ChevronDownIcon12 } from "lucide-react";
12015
12247
  import {
12016
12248
  forwardRef as forwardRef72
12017
12249
  } from "react";
@@ -12073,7 +12305,7 @@ var Trigger16 = forwardRef72(
12073
12305
  /* @__PURE__ */ jsxs78("span", { className: "flex shrink-0 items-center gap-3", children: [
12074
12306
  meta,
12075
12307
  /* @__PURE__ */ jsx108(
12076
- ChevronDownIcon11,
12308
+ ChevronDownIcon12,
12077
12309
  {
12078
12310
  size: 16,
12079
12311
  strokeWidth: 2.5,
@@ -12168,9 +12400,9 @@ function DataField({
12168
12400
  import { ListFilterIcon } from "lucide-react";
12169
12401
  import {
12170
12402
  useEffect as useEffect14,
12171
- useState as useState33
12403
+ useState as useState34
12172
12404
  } from "react";
12173
- import { Fragment as Fragment27, jsx as jsx110, jsxs as jsxs80 } from "react/jsx-runtime";
12405
+ import { Fragment as Fragment28, jsx as jsx110, jsxs as jsxs80 } from "react/jsx-runtime";
12174
12406
  function isStringValue(v) {
12175
12407
  return typeof v === "string";
12176
12408
  }
@@ -12235,7 +12467,7 @@ function NumberRangeField({
12235
12467
  const minLabel = field.minLabel ?? `${field.label} (maior ou igual)`;
12236
12468
  const maxLabel = field.maxLabel ?? `${field.label} (menor ou igual)`;
12237
12469
  if (field.format === "money") {
12238
- return /* @__PURE__ */ jsxs80(Fragment27, { children: [
12470
+ return /* @__PURE__ */ jsxs80(Fragment28, { children: [
12239
12471
  /* @__PURE__ */ jsx110(
12240
12472
  MoneyInput,
12241
12473
  {
@@ -12255,7 +12487,7 @@ function NumberRangeField({
12255
12487
  ] });
12256
12488
  }
12257
12489
  if (field.format === "percent") {
12258
- return /* @__PURE__ */ jsxs80(Fragment27, { children: [
12490
+ return /* @__PURE__ */ jsxs80(Fragment28, { children: [
12259
12491
  /* @__PURE__ */ jsx110(
12260
12492
  PercentInput,
12261
12493
  {
@@ -12281,7 +12513,7 @@ function NumberRangeField({
12281
12513
  const digits = raw.replace(/\D/g, "");
12282
12514
  return maxDigits === void 0 ? digits : digits.slice(0, maxDigits);
12283
12515
  };
12284
- return /* @__PURE__ */ jsxs80(Fragment27, { children: [
12516
+ return /* @__PURE__ */ jsxs80(Fragment28, { children: [
12285
12517
  /* @__PURE__ */ jsx110(
12286
12518
  Input,
12287
12519
  {
@@ -12311,7 +12543,7 @@ function NumberRangeField({
12311
12543
  const blockNonDecimalKeys = (e) => {
12312
12544
  if (BLOCKED_DECIMAL_KEYS.has(e.key)) e.preventDefault();
12313
12545
  };
12314
- return /* @__PURE__ */ jsxs80(Fragment27, { children: [
12546
+ return /* @__PURE__ */ jsxs80(Fragment28, { children: [
12315
12547
  /* @__PURE__ */ jsx110(
12316
12548
  Input,
12317
12549
  {
@@ -12408,13 +12640,13 @@ function FilterBar({
12408
12640
  onOpenChange
12409
12641
  }) {
12410
12642
  const isOpenControlled = controlledOpen !== void 0;
12411
- const [internalOpen, setInternalOpen] = useState33(defaultOpen);
12643
+ const [internalOpen, setInternalOpen] = useState34(defaultOpen);
12412
12644
  const open = isOpenControlled ? controlledOpen : internalOpen;
12413
12645
  const setOpen = (next) => {
12414
12646
  if (!isOpenControlled) setInternalOpen(next);
12415
12647
  onOpenChange?.(next);
12416
12648
  };
12417
- const [draftValues, setDraftValues] = useState33(
12649
+ const [draftValues, setDraftValues] = useState34(
12418
12650
  controlledValues ?? defaultValues ?? {}
12419
12651
  );
12420
12652
  useEffect14(() => {
@@ -12458,7 +12690,7 @@ function FilterBar({
12458
12690
  }
12459
12691
  ),
12460
12692
  triggerLabel,
12461
- hasActive && /* @__PURE__ */ jsxs80(Fragment27, { children: [
12693
+ hasActive && /* @__PURE__ */ jsxs80(Fragment28, { children: [
12462
12694
  /* @__PURE__ */ jsx110("span", { className: "sr-only", children: `: ${activeCount} ${activeCount === 1 ? "filtro aplicado" : "filtros aplicados"}` }),
12463
12695
  /* @__PURE__ */ jsx110(
12464
12696
  "span",
@@ -12614,9 +12846,9 @@ function FormSection({
12614
12846
  }
12615
12847
 
12616
12848
  // src/patterns/FormWithAside/FormWithAside.tsx
12617
- import { useState as useState34 } from "react";
12849
+ import { useState as useState35 } from "react";
12618
12850
  import { ChevronsLeftIcon as ChevronsLeftIcon2, ChevronsRightIcon as ChevronsRightIcon2 } from "lucide-react";
12619
- import { Fragment as Fragment28, jsx as jsx113, jsxs as jsxs83 } from "react/jsx-runtime";
12851
+ import { Fragment as Fragment29, jsx as jsx113, jsxs as jsxs83 } from "react/jsx-runtime";
12620
12852
  function scrollToId(id) {
12621
12853
  const el = document.getElementById(id);
12622
12854
  if (!el) return;
@@ -12629,7 +12861,7 @@ function FormWithAside({
12629
12861
  overallPercent,
12630
12862
  asideExtra
12631
12863
  }) {
12632
- const [collapsed, setCollapsed] = useState34(false);
12864
+ const [collapsed, setCollapsed] = useState35(false);
12633
12865
  const computedOverall = overallPercent ?? (sections.length > 0 ? Math.round(
12634
12866
  sections.reduce((sum, s) => sum + (s.percent ?? 0), 0) / sections.length
12635
12867
  ) : 0);
@@ -12688,7 +12920,7 @@ function FormWithAside({
12688
12920
  s.id
12689
12921
  );
12690
12922
  })
12691
- ] }) : /* @__PURE__ */ jsxs83(Fragment28, { children: [
12923
+ ] }) : /* @__PURE__ */ jsxs83(Fragment29, { children: [
12692
12924
  /* @__PURE__ */ jsx113(
12693
12925
  ProgressTitle,
12694
12926
  {
@@ -13438,10 +13670,10 @@ function WorkflowDesigner({
13438
13670
  import {
13439
13671
  forwardRef as forwardRef75,
13440
13672
  useId as useId23,
13441
- useState as useState35
13673
+ useState as useState36
13442
13674
  } from "react";
13443
- import { ChevronDownIcon as ChevronDownIcon12 } from "lucide-react";
13444
- import { Fragment as Fragment29, jsx as jsx121, jsxs as jsxs91 } from "react/jsx-runtime";
13675
+ import { ChevronDownIcon as ChevronDownIcon13 } from "lucide-react";
13676
+ import { Fragment as Fragment30, jsx as jsx121, jsxs as jsxs91 } from "react/jsx-runtime";
13445
13677
  var TONE_ICON = {
13446
13678
  neutral: "border border-humu-background-border bg-humu-background-surface",
13447
13679
  success: "bg-humu-status-background-success-subtle",
@@ -13478,10 +13710,10 @@ var TimelineItem = forwardRef75(
13478
13710
  ...props
13479
13711
  }, ref) => {
13480
13712
  const contentId = useId23();
13481
- const [uncontrolled, setUncontrolled] = useState35(defaultOpen);
13713
+ const [uncontrolled, setUncontrolled] = useState36(defaultOpen);
13482
13714
  const isOpen = open ?? uncontrolled;
13483
13715
  const expandable = children !== void 0 && children !== null;
13484
- const row = /* @__PURE__ */ jsxs91(Fragment29, { children: [
13716
+ const row = /* @__PURE__ */ jsxs91(Fragment30, { children: [
13485
13717
  /* @__PURE__ */ jsx121(
13486
13718
  "span",
13487
13719
  {
@@ -13510,7 +13742,7 @@ var TimelineItem = forwardRef75(
13510
13742
  "aria-hidden": "true",
13511
13743
  className: "inline-flex size-6 shrink-0 items-center justify-center text-humu-content-body-text",
13512
13744
  children: /* @__PURE__ */ jsx121(
13513
- ChevronDownIcon12,
13745
+ ChevronDownIcon13,
13514
13746
  {
13515
13747
  className: cn(
13516
13748
  "size-4 transition-transform duration-humu-fast motion-reduce:transition-none",