react-better-html 1.1.263 → 1.1.265

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.d.mts CHANGED
@@ -1049,24 +1049,14 @@ declare const Tooltip: typeof TooltipComponent & {
1049
1049
  type FoldableProps = {
1050
1050
  isOpen?: boolean;
1051
1051
  defaultOpen?: boolean;
1052
- title?: string;
1053
- /** @default "h3" */
1054
- titleAs?: TextAs;
1055
- /** @default textPrimary */
1056
- titleColor?: React.CSSProperties["color"];
1057
- titleRightElement?: React.ReactNode;
1058
- description?: string;
1059
- /** @default textSecondary */
1060
- descriptionColor?: React.CSSProperties["color"];
1061
- rightElement?: React.ReactNode;
1062
- icon?: IconName | AnyOtherString;
1063
- image?: AssetName | AnyOtherString;
1064
1052
  headerPaddingBlock?: React.CSSProperties["paddingBlock"];
1065
1053
  headerPaddingInline?: React.CSSProperties["paddingInline"];
1054
+ /** @default "right" */
1055
+ arrowPosition?: "left" | "right";
1066
1056
  renderHeader?: (isOpen: boolean, toggleOpen: () => void) => React.ReactNode;
1067
1057
  onOpenChange?: (isOpen: boolean) => void;
1068
1058
  children?: React.ReactNode;
1069
- } & OmitProps<DivProps, "ref">;
1059
+ } & OmitProps<PageHeaderProps, "marginBottom"> & OmitProps<DivProps, "ref">;
1070
1060
  type FoldableRef = {
1071
1061
  isOpen: boolean;
1072
1062
  open: () => void;
package/dist/index.d.ts CHANGED
@@ -1049,24 +1049,14 @@ declare const Tooltip: typeof TooltipComponent & {
1049
1049
  type FoldableProps = {
1050
1050
  isOpen?: boolean;
1051
1051
  defaultOpen?: boolean;
1052
- title?: string;
1053
- /** @default "h3" */
1054
- titleAs?: TextAs;
1055
- /** @default textPrimary */
1056
- titleColor?: React.CSSProperties["color"];
1057
- titleRightElement?: React.ReactNode;
1058
- description?: string;
1059
- /** @default textSecondary */
1060
- descriptionColor?: React.CSSProperties["color"];
1061
- rightElement?: React.ReactNode;
1062
- icon?: IconName | AnyOtherString;
1063
- image?: AssetName | AnyOtherString;
1064
1052
  headerPaddingBlock?: React.CSSProperties["paddingBlock"];
1065
1053
  headerPaddingInline?: React.CSSProperties["paddingInline"];
1054
+ /** @default "right" */
1055
+ arrowPosition?: "left" | "right";
1066
1056
  renderHeader?: (isOpen: boolean, toggleOpen: () => void) => React.ReactNode;
1067
1057
  onOpenChange?: (isOpen: boolean) => void;
1068
1058
  children?: React.ReactNode;
1069
- } & OmitProps<DivProps, "ref">;
1059
+ } & OmitProps<PageHeaderProps, "marginBottom"> & OmitProps<DivProps, "ref">;
1070
1060
  type FoldableRef = {
1071
1061
  isOpen: boolean;
1072
1062
  open: () => void;
package/dist/index.js CHANGED
@@ -7704,17 +7704,27 @@ var animationDurationOpen = animationDurationClose * 2;
7704
7704
  var FoldableComponent = (0, import_react30.forwardRef)(function Foldable({
7705
7705
  isOpen: controlledIsOpen,
7706
7706
  defaultOpen = false,
7707
+ icon,
7708
+ iconColor,
7709
+ iconSize,
7710
+ image,
7711
+ imageUrl,
7712
+ imageSize,
7713
+ imageAzProfileImage,
7707
7714
  title,
7708
7715
  titleAs = "h3",
7716
+ titleFontSize,
7709
7717
  titleColor,
7710
7718
  titleRightElement,
7711
7719
  description,
7720
+ descriptionFontSize,
7712
7721
  descriptionColor,
7722
+ textAlign,
7713
7723
  rightElement,
7714
- icon,
7715
- image,
7724
+ lightMode,
7716
7725
  headerPaddingBlock,
7717
7726
  headerPaddingInline,
7727
+ arrowPosition = "right",
7718
7728
  renderHeader,
7719
7729
  onOpenChange,
7720
7730
  children,
@@ -7768,6 +7778,7 @@ var FoldableComponent = (0, import_react30.forwardRef)(function Foldable({
7768
7778
  isOpen
7769
7779
  };
7770
7780
  }, [open, close, toggleOpen, isOpen]);
7781
+ const arrow = /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Icon_default, { name: "chevronDown", transform: `rotate(${isOpen ? 180 : 0}deg)`, transition: theme2.styles.transition });
7771
7782
  return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Div_default.column, { width: "100%", ...props, children: [
7772
7783
  renderHeader ? renderHeader(isOpen, toggleOpen) : /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
7773
7784
  Div_default.row,
@@ -7781,35 +7792,33 @@ var FoldableComponent = (0, import_react30.forwardRef)(function Foldable({
7781
7792
  onClick: toggleOpen,
7782
7793
  userSelect: "none",
7783
7794
  children: [
7784
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Div_default.row, { flex: 1, alignItems: "center", gap: theme2.styles.space, children: [
7785
- icon && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Icon_default, { name: icon, size: 20, flexShrink: 0 }),
7786
- image && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Image_default.profileImage, { name: image, size: 24, flexShrink: 0 }),
7787
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Div_default.column, { gap: theme2.styles.gap / 2, children: [
7788
- title && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Div_default.row, { alignItems: "center", gap: theme2.styles.space, children: [
7789
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7790
- Text_default,
7791
- {
7792
- as: titleAs,
7793
- fontWeight: 700,
7794
- lineHeight: "20px",
7795
- color: titleColor ?? theme2.colors.textPrimary,
7796
- children: title
7797
- }
7798
- ),
7799
- titleRightElement
7800
- ] }),
7801
- description && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text_default, { color: descriptionColor ?? theme2.colors.textSecondary, children: description })
7802
- ] })
7803
- ] }),
7804
- rightElement,
7805
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7806
- Icon_default,
7795
+ arrowPosition === "left" && arrow,
7796
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Div_default, { flex: 1, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7797
+ PageHeader_default,
7807
7798
  {
7808
- name: "chevronDown",
7809
- transform: `rotate(${isOpen ? 180 : 0}deg)`,
7810
- transition: theme2.styles.transition
7799
+ icon,
7800
+ iconColor,
7801
+ iconSize,
7802
+ image,
7803
+ imageUrl,
7804
+ imageSize,
7805
+ imageAzProfileImage,
7806
+ title,
7807
+ titleAs,
7808
+ titleFontSize,
7809
+ titleColor,
7810
+ titleRightElement,
7811
+ description,
7812
+ descriptionFontSize,
7813
+ descriptionColor,
7814
+ textAlign,
7815
+ rightElement,
7816
+ lightMode,
7817
+ marginBottom: 0
7811
7818
  }
7812
- )
7819
+ ) }),
7820
+ rightElement,
7821
+ arrowPosition === "right" && arrow
7813
7822
  ]
7814
7823
  }
7815
7824
  ),