react-better-html 1.1.288 → 1.1.289

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
@@ -70,6 +70,7 @@ type ButtonComponent = {
70
70
  <Value>(props: ButtonProps<Value>): React.ReactElement;
71
71
  secondary: <Value>(props: ButtonProps<Value>) => React.ReactElement;
72
72
  destructive: <Value>(props: ButtonProps<Value>) => React.ReactElement;
73
+ text: <Value>(props: ButtonProps<Value>) => React.ReactElement;
73
74
  icon: <Value>(props: OmitProps<ButtonProps<Value>, "icon" | "width" | "height" | "isSmall"> & {
74
75
  icon: IconName | AnyOtherString;
75
76
  /** @default 16 */
@@ -89,6 +90,7 @@ declare const ButtonComponent: ButtonComponent;
89
90
  declare const Button: typeof ButtonComponent & {
90
91
  secondary: typeof ButtonComponent.secondary;
91
92
  destructive: typeof ButtonComponent.destructive;
93
+ text: typeof ButtonComponent.text;
92
94
  icon: typeof ButtonComponent.icon;
93
95
  upload: typeof ButtonComponent.upload;
94
96
  };
@@ -581,7 +583,7 @@ type BetterHtmlConfig = {
581
583
  language: Language | undefined;
582
584
  components: {
583
585
  button?: {
584
- style?: ComponentStyleConfig<ButtonProps, "default" | "secondary" | "destructive" | "icon" | "upload">;
586
+ style?: ComponentStyleConfig<ButtonProps, "default" | "secondary" | "destructive" | "text" | "icon" | "upload">;
585
587
  tagReplacement?: ComponentTagReplacementConfig<"buttonComponent" | "linkComponent">;
586
588
  };
587
589
  inputField?: {
@@ -712,7 +714,7 @@ declare const sideMenuControls: {
712
714
  close: () => void;
713
715
  toggleOpened: () => void;
714
716
  };
715
- declare const filterHover: () => Record<"z05" | "z1" | "z2" | "z3", React.CSSProperties["filter"]>;
717
+ declare const filterHover: () => Record<"z05" | "z1" | "z2" | "z3" | "b05" | "b1" | "b2" | "b3", React.CSSProperties["filter"]>;
716
718
 
717
719
  declare function generateLocalStorage<LocalStorage extends object>(): {
718
720
  setItem: <StorageName extends keyof LocalStorage>(name: StorageName, value: LocalStorage[StorageName]) => void;
package/dist/index.d.ts CHANGED
@@ -70,6 +70,7 @@ type ButtonComponent = {
70
70
  <Value>(props: ButtonProps<Value>): React.ReactElement;
71
71
  secondary: <Value>(props: ButtonProps<Value>) => React.ReactElement;
72
72
  destructive: <Value>(props: ButtonProps<Value>) => React.ReactElement;
73
+ text: <Value>(props: ButtonProps<Value>) => React.ReactElement;
73
74
  icon: <Value>(props: OmitProps<ButtonProps<Value>, "icon" | "width" | "height" | "isSmall"> & {
74
75
  icon: IconName | AnyOtherString;
75
76
  /** @default 16 */
@@ -89,6 +90,7 @@ declare const ButtonComponent: ButtonComponent;
89
90
  declare const Button: typeof ButtonComponent & {
90
91
  secondary: typeof ButtonComponent.secondary;
91
92
  destructive: typeof ButtonComponent.destructive;
93
+ text: typeof ButtonComponent.text;
92
94
  icon: typeof ButtonComponent.icon;
93
95
  upload: typeof ButtonComponent.upload;
94
96
  };
@@ -581,7 +583,7 @@ type BetterHtmlConfig = {
581
583
  language: Language | undefined;
582
584
  components: {
583
585
  button?: {
584
- style?: ComponentStyleConfig<ButtonProps, "default" | "secondary" | "destructive" | "icon" | "upload">;
586
+ style?: ComponentStyleConfig<ButtonProps, "default" | "secondary" | "destructive" | "text" | "icon" | "upload">;
585
587
  tagReplacement?: ComponentTagReplacementConfig<"buttonComponent" | "linkComponent">;
586
588
  };
587
589
  inputField?: {
@@ -712,7 +714,7 @@ declare const sideMenuControls: {
712
714
  close: () => void;
713
715
  toggleOpened: () => void;
714
716
  };
715
- declare const filterHover: () => Record<"z05" | "z1" | "z2" | "z3", React.CSSProperties["filter"]>;
717
+ declare const filterHover: () => Record<"z05" | "z1" | "z2" | "z3" | "b05" | "b1" | "b2" | "b3", React.CSSProperties["filter"]>;
716
718
 
717
719
  declare function generateLocalStorage<LocalStorage extends object>(): {
718
720
  setItem: <StorageName extends keyof LocalStorage>(name: StorageName, value: LocalStorage[StorageName]) => void;
package/dist/index.js CHANGED
@@ -2080,7 +2080,11 @@ var filterHover = () => {
2080
2080
  z05: externalBetterCoreContextValue.colorTheme === "dark" ? "brightness(1.2)" : "brightness(0.95)",
2081
2081
  z1: externalBetterCoreContextValue.colorTheme === "dark" ? "brightness(1.3)" : "brightness(0.9)",
2082
2082
  z2: externalBetterCoreContextValue.colorTheme === "dark" ? "brightness(1.6)" : "brightness(0.8)",
2083
- z3: externalBetterCoreContextValue.colorTheme === "dark" ? "brightness(1.9)" : "brightness(0.7)"
2083
+ z3: externalBetterCoreContextValue.colorTheme === "dark" ? "brightness(1.9)" : "brightness(0.7)",
2084
+ b05: externalBetterCoreContextValue.colorTheme === "dark" ? "brightness(0.8)" : "brightness(1.05)",
2085
+ b1: externalBetterCoreContextValue.colorTheme === "dark" ? "brightness(0.7)" : "brightness(1.1)",
2086
+ b2: externalBetterCoreContextValue.colorTheme === "dark" ? "brightness(0.4)" : "brightness(1.2)",
2087
+ b3: externalBetterCoreContextValue.colorTheme === "dark" ? "brightness(0.1)" : "brightness(1.3)"
2084
2088
  };
2085
2089
  };
2086
2090
 
@@ -2384,6 +2388,29 @@ ButtonComponent.destructive = function Destructive(buttonProps) {
2384
2388
  }
2385
2389
  );
2386
2390
  };
2391
+ ButtonComponent.text = function Text3(buttonProps) {
2392
+ const betterHtmlContextInternal = useBetterHtmlContextInternal();
2393
+ const { color, ...props } = useComponentsPropsMerger(
2394
+ betterHtmlContextInternal.components.button?.style?.text,
2395
+ buttonProps
2396
+ );
2397
+ const theme2 = (0, import_react_better_core9.useTheme)();
2398
+ const readyColor = color ?? theme2.colors.textPrimary;
2399
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2400
+ ButtonComponent,
2401
+ {
2402
+ color: readyColor,
2403
+ colorHover: (0, import_react_better_core9.lightenColor)(readyColor, 0.3),
2404
+ backgroundColor: "transparent",
2405
+ backgroundColorHover: "transparent",
2406
+ borderRadius: 0,
2407
+ loaderSize: 12,
2408
+ isSmall: true,
2409
+ ...fromSubcomponentProps,
2410
+ ...props
2411
+ }
2412
+ );
2413
+ };
2387
2414
  ButtonComponent.icon = function Icon3({ size = 16, buttonSize, backgroundButtonColor, ...buttonProps }) {
2388
2415
  const betterHtmlContextInternal = useBetterHtmlContextInternal();
2389
2416
  const { ...props } = useComponentsPropsMerger(
@@ -2443,6 +2470,7 @@ ButtonComponent.upload = function Upload({ accept, multiple, onUpload, ...button
2443
2470
  var Button2 = (0, import_react10.memo)(ButtonComponent);
2444
2471
  Button2.secondary = ButtonComponent.secondary;
2445
2472
  Button2.destructive = ButtonComponent.destructive;
2473
+ Button2.text = ButtonComponent.text;
2446
2474
  Button2.icon = ButtonComponent.icon;
2447
2475
  Button2.upload = ButtonComponent.upload;
2448
2476
  var Button_default = Button2;