react-better-html 1.1.165 → 1.1.167

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
@@ -647,7 +647,12 @@ type FormRowComponentType = {
647
647
  withTitle: (props: ComponentPropWithRef<HTMLDivElement, FormRowProps & {
648
648
  icon?: IconName | AnyOtherString;
649
649
  title?: string;
650
+ /** @default "h3" */
651
+ titleAs?: TextAs;
652
+ titleFontSize?: React.CSSProperties["fontSize"];
650
653
  description?: string;
654
+ descriptionFontSize?: React.CSSProperties["fontSize"];
655
+ alignChildren?: React.CSSProperties["justifyContent"];
651
656
  isLoading?: boolean;
652
657
  withActions?: boolean;
653
658
  saveButtonLoaderName?: LoaderName | AnyOtherString;
@@ -987,11 +992,7 @@ declare const alertControls: {
987
992
  declare const colorThemeControls: {
988
993
  toggleTheme: (theme?: ColorTheme) => void;
989
994
  };
990
- declare const filterHover: {
991
- z1: string;
992
- z2: string;
993
- z3: string;
994
- };
995
+ declare const filterHover: () => Record<"z1" | "z2" | "z3", React.CSSProperties["filter"]>;
995
996
 
996
997
  declare function generateLocalStorage<LocalStorage extends object>(): {
997
998
  setItem: <StorageName extends keyof LocalStorage>(name: StorageName, value: LocalStorage[StorageName]) => void;
package/dist/index.d.ts CHANGED
@@ -647,7 +647,12 @@ type FormRowComponentType = {
647
647
  withTitle: (props: ComponentPropWithRef<HTMLDivElement, FormRowProps & {
648
648
  icon?: IconName | AnyOtherString;
649
649
  title?: string;
650
+ /** @default "h3" */
651
+ titleAs?: TextAs;
652
+ titleFontSize?: React.CSSProperties["fontSize"];
650
653
  description?: string;
654
+ descriptionFontSize?: React.CSSProperties["fontSize"];
655
+ alignChildren?: React.CSSProperties["justifyContent"];
651
656
  isLoading?: boolean;
652
657
  withActions?: boolean;
653
658
  saveButtonLoaderName?: LoaderName | AnyOtherString;
@@ -987,11 +992,7 @@ declare const alertControls: {
987
992
  declare const colorThemeControls: {
988
993
  toggleTheme: (theme?: ColorTheme) => void;
989
994
  };
990
- declare const filterHover: {
991
- z1: string;
992
- z2: string;
993
- z3: string;
994
- };
995
+ declare const filterHover: () => Record<"z1" | "z2" | "z3", React.CSSProperties["filter"]>;
995
996
 
996
997
  declare function generateLocalStorage<LocalStorage extends object>(): {
997
998
  setItem: <StorageName extends keyof LocalStorage>(name: StorageName, value: LocalStorage[StorageName]) => void;
package/dist/index.js CHANGED
@@ -5548,10 +5548,13 @@ var colorThemeControls = {
5548
5548
  }, 0.01 * 1e3);
5549
5549
  }
5550
5550
  };
5551
- var filterHover = {
5552
- z1: externalBetterHtmlContextValue?.colorTheme === "dark" ? "brightness(1.1)" : "brightness(0.9)",
5553
- z2: externalBetterHtmlContextValue?.colorTheme === "dark" ? "brightness(1.2)" : "brightness(0.8)",
5554
- z3: externalBetterHtmlContextValue?.colorTheme === "dark" ? "brightness(1.3)" : "brightness(0.7)"
5551
+ var filterHover = () => {
5552
+ if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "filterHover")) return void 0;
5553
+ return {
5554
+ z1: externalBetterHtmlContextValue.colorTheme === "dark" ? "brightness(1.2)" : "brightness(0.9)",
5555
+ z2: externalBetterHtmlContextValue.colorTheme === "dark" ? "brightness(1.4)" : "brightness(0.8)",
5556
+ z3: externalBetterHtmlContextValue.colorTheme === "dark" ? "brightness(1.6)" : "brightness(0.7)"
5557
+ };
5555
5558
  };
5556
5559
 
5557
5560
  // src/utils/functions.ts
@@ -7565,7 +7568,11 @@ var FormRowComponent = (0, import_react23.forwardRef)(function FormRow({ oneItem
7565
7568
  FormRowComponent.withTitle = (0, import_react23.forwardRef)(function WithTitle({
7566
7569
  icon,
7567
7570
  title,
7571
+ titleAs = "h3",
7572
+ titleFontSize,
7568
7573
  description,
7574
+ descriptionFontSize,
7575
+ alignChildren = "flex-start",
7569
7576
  isLoading,
7570
7577
  withActions,
7571
7578
  saveButtonLoaderName,
@@ -7582,8 +7589,8 @@ FormRowComponent.withTitle = (0, import_react23.forwardRef)(function WithTitle({
7582
7589
  /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Div_default.row, { width: "100%", alignItems: "center", gap: titleGap, children: [
7583
7590
  icon && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Icon_default, { name: icon }),
7584
7591
  /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Div_default.column, { flex: 1, gap: theme2.styles.gap / 2, children: [
7585
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text_default, { as: "h3", children: title }),
7586
- description && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text_default, { color: theme2.colors.textSecondary, children: description })
7592
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text_default, { as: titleAs, fontSize: titleFontSize, children: title }),
7593
+ description && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text_default, { fontSize: descriptionFontSize, color: theme2.colors.textSecondary, children: description })
7587
7594
  ] }),
7588
7595
  isLoading && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Div_default, { width: 26 - titleGap })
7589
7596
  ] }),
@@ -7593,6 +7600,7 @@ FormRowComponent.withTitle = (0, import_react23.forwardRef)(function WithTitle({
7593
7600
  position: "relative",
7594
7601
  width: props.noBreakingPoint && mediaQuery.size900 ? void 0 : "100%",
7595
7602
  alignItems: "center",
7603
+ justifyContent: alignChildren,
7596
7604
  gap: theme2.styles.gap,
7597
7605
  children: [
7598
7606
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(