react-better-html 1.1.290 → 1.1.292

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
@@ -394,6 +394,10 @@ type InternalToggleInputProps<Value> = {
394
394
  errorText?: string;
395
395
  infoText?: string;
396
396
  infoTextColor?: React.CSSProperties["color"];
397
+ inactiveColor?: React.CSSProperties["color"];
398
+ activeColor?: React.CSSProperties["color"];
399
+ inactiveBackgroundColor?: React.CSSProperties["backgroundColor"];
400
+ activeBackgroundColor?: React.CSSProperties["backgroundColor"];
397
401
  /** @default 26 */
398
402
  size?: number;
399
403
  value?: Value;
@@ -401,7 +405,7 @@ type InternalToggleInputProps<Value> = {
401
405
  } & OmitProps<React.ComponentProps<"input">, "style" | "value" | "ref" | "onChange" | "size"> & ComponentStyle & ComponentHoverStyle;
402
406
  type ToggleInputProps<Value = unknown> = ComponentPropWithRef<ToggleInputRef, OmitProps<InternalToggleInputProps<Value>, "type">>;
403
407
  type ToggleInputComponentType = <Value>(props: ToggleInputProps<Value>) => React.ReactElement;
404
- declare const _default$5: {
408
+ declare const _default$6: {
405
409
  checkbox: ToggleInputComponentType;
406
410
  radiobutton: ToggleInputComponentType;
407
411
  switch: ToggleInputComponentType;
@@ -431,7 +435,7 @@ type DividerComponentType = {
431
435
  vertical: (props: ComponentPropWithRef<HTMLDivElement, VerticalDividerProps>) => React.ReactElement;
432
436
  horizontal: (props: ComponentPropWithRef<HTMLDivElement, HorizontalDividerProps>) => React.ReactElement;
433
437
  };
434
- declare const _default$4: {
438
+ declare const _default$5: {
435
439
  vertical: DividerComponentType["vertical"];
436
440
  horizontal: DividerComponentType["horizontal"];
437
441
  };
@@ -453,7 +457,7 @@ type LabelProps = {
453
457
  htmlFor?: string;
454
458
  };
455
459
  declare function Label(labelProps: LabelProps): react.JSX.Element;
456
- declare const _default$3: react.MemoExoticComponent<typeof Label>;
460
+ declare const _default$4: react.MemoExoticComponent<typeof Label>;
457
461
 
458
462
  type ImageProps = {
459
463
  name?: AssetName | AnyOtherString;
@@ -469,7 +473,7 @@ type ImageComponent = {
469
473
  }>) => React.ReactElement;
470
474
  };
471
475
  declare const Image: ImageComponent;
472
- declare const _default$2: ImageComponent & {
476
+ declare const _default$3: ImageComponent & {
473
477
  profileImage: typeof Image.profileImage;
474
478
  };
475
479
 
@@ -695,7 +699,7 @@ type BetterHtmlProviderProps = BetterProviderCommonProps & {
695
699
  config?: BetterHtmlProviderConfig;
696
700
  };
697
701
  declare function BetterHtmlProvider({ config, ...props }: BetterHtmlProviderProps): react.JSX.Element;
698
- declare const _default$1: react.MemoExoticComponent<typeof BetterHtmlProvider>;
702
+ declare const _default$2: react.MemoExoticComponent<typeof BetterHtmlProvider>;
699
703
 
700
704
  declare const isMobileDevice: boolean;
701
705
 
@@ -792,7 +796,7 @@ type IconProps = {
792
796
  type IconComponent = {
793
797
  (props: ComponentPropWithRef<SVGSVGElement, IconProps>): React.ReactElement;
794
798
  };
795
- declare const _default: IconComponent;
799
+ declare const _default$1: IconComponent;
796
800
 
797
801
  type InternalModalProps = {
798
802
  /**
@@ -1236,6 +1240,21 @@ type PaginationComponentType = {
1236
1240
  declare const PaginationComponent: PaginationComponentType;
1237
1241
  declare const Pagination: typeof PaginationComponent & {};
1238
1242
 
1243
+ type DeveloperPageSection = {
1244
+ title: string;
1245
+ description?: string;
1246
+ children?: React.ReactNode;
1247
+ };
1248
+ type DeveloperPageProps = {
1249
+ /** @default 24 */
1250
+ iconSize?: number;
1251
+ /** @default 120 */
1252
+ assetSize?: number;
1253
+ sections?: DeveloperPageSection[];
1254
+ };
1255
+ declare function DeveloperPage({ iconSize, assetSize, sections }: DeveloperPageProps): react.JSX.Element | undefined;
1256
+ declare const _default: react.MemoExoticComponent<typeof DeveloperPage>;
1257
+
1239
1258
  type AlertsPluginOptions = {
1240
1259
  /** @default "bottom" */
1241
1260
  position?: "top" | "bottom";
@@ -1278,4 +1297,4 @@ type LocalStoragePluginOptions = {
1278
1297
  declare const defaultLocalStoragePluginOptions: Required<LocalStoragePluginOptions>;
1279
1298
  declare const localStoragePlugin: BetterHtmlPluginConstructor<LocalStoragePluginOptions>;
1280
1299
 
1281
- export { type Alert, type AlertDisplay, type AlertDuration, type AlertType, type AlertsPluginOptions, type AppConfig, type BetterHtmlConfig, type BetterHtmlPlugin, _default$1 as BetterHtmlProvider, type BetterHtmlProviderConfig, type BrowserName, type BurgerButtonProps, Button, type ButtonProps, Chip, type ChipProps, ColorThemeSwitch, type ColorThemeSwitchProps, type ComponentHoverStyle, type ComponentMarginProps, type ComponentPaddingProps, Div, type DivProps, _default$4 as Divider, Dropdown, type DropdownOption, type DropdownProps, Foldable, type FoldableProps, type FoldableRef, Form, type FormProps, FormRow, type FormRowProps, type HorizontalDividerProps, _default as Icon, type IconProps, _default$2 as Image, type ImageProps, InputField, type InputFieldProps, _default$3 as Label, type LabelProps, type Language, type LanguageData, Loader, type LoaderProps, type LocalStoragePluginOptions, Modal, type ModalProps, type ModalRef, PageHeader, type PageHeaderProps, PageHolder, type PageHolderProps, Pagination, type PluginName, type ReactRouterDomPluginOptions, SideMenu, type SideMenuItem, type SideMenuProps, type Tab, type TabGroup, Table, type TableColumn, type TableFilterData, type TableListFilterListItem, type TableProps, type TableRef, Tabs, type TabsProps, type TabsRef, Text, type TextAs, type TextProps, type TextareaFieldProps, _default$5 as ToggleInput, type ToggleInputProps, type ToggleInputRef, Tooltip, type TooltipProps, type TooltipRef, type VerticalDividerProps, alertControls, alertsPlugin, defaultAlertsPluginOptions, defaultLocalStoragePluginOptions, defaultReactRouterDomPluginOptions, filterHover, generateI18n, generateLocalStorage, getBrowser, getFormErrorObject, isMobileDevice, localStoragePlugin, missingTranslation, reactRouterDomPlugin, sideMenuControls, useAlertControls, useBetterHtmlContext, useForm, useMediaQuery, usePageResize, usePageScroll, useUrlQuery };
1300
+ export { type Alert, type AlertDisplay, type AlertDuration, type AlertType, type AlertsPluginOptions, type AppConfig, type BetterHtmlConfig, type BetterHtmlPlugin, _default$2 as BetterHtmlProvider, type BetterHtmlProviderConfig, type BrowserName, type BurgerButtonProps, Button, type ButtonProps, Chip, type ChipProps, ColorThemeSwitch, type ColorThemeSwitchProps, type ComponentHoverStyle, type ComponentMarginProps, type ComponentPaddingProps, _default as DeveloperPage, type DeveloperPageSection, Div, type DivProps, _default$5 as Divider, Dropdown, type DropdownOption, type DropdownProps, Foldable, type FoldableProps, type FoldableRef, Form, type FormProps, FormRow, type FormRowProps, type HorizontalDividerProps, _default$1 as Icon, type IconProps, _default$3 as Image, type ImageProps, InputField, type InputFieldProps, _default$4 as Label, type LabelProps, type Language, type LanguageData, Loader, type LoaderProps, type LocalStoragePluginOptions, Modal, type ModalProps, type ModalRef, PageHeader, type PageHeaderProps, PageHolder, type PageHolderProps, Pagination, type PluginName, type ReactRouterDomPluginOptions, SideMenu, type SideMenuItem, type SideMenuProps, type Tab, type TabGroup, Table, type TableColumn, type TableFilterData, type TableListFilterListItem, type TableProps, type TableRef, Tabs, type TabsProps, type TabsRef, Text, type TextAs, type TextProps, type TextareaFieldProps, _default$6 as ToggleInput, type ToggleInputProps, type ToggleInputRef, Tooltip, type TooltipProps, type TooltipRef, type VerticalDividerProps, alertControls, alertsPlugin, defaultAlertsPluginOptions, defaultLocalStoragePluginOptions, defaultReactRouterDomPluginOptions, filterHover, generateI18n, generateLocalStorage, getBrowser, getFormErrorObject, isMobileDevice, localStoragePlugin, missingTranslation, reactRouterDomPlugin, sideMenuControls, useAlertControls, useBetterHtmlContext, useForm, useMediaQuery, usePageResize, usePageScroll, useUrlQuery };
package/dist/index.d.ts CHANGED
@@ -394,6 +394,10 @@ type InternalToggleInputProps<Value> = {
394
394
  errorText?: string;
395
395
  infoText?: string;
396
396
  infoTextColor?: React.CSSProperties["color"];
397
+ inactiveColor?: React.CSSProperties["color"];
398
+ activeColor?: React.CSSProperties["color"];
399
+ inactiveBackgroundColor?: React.CSSProperties["backgroundColor"];
400
+ activeBackgroundColor?: React.CSSProperties["backgroundColor"];
397
401
  /** @default 26 */
398
402
  size?: number;
399
403
  value?: Value;
@@ -401,7 +405,7 @@ type InternalToggleInputProps<Value> = {
401
405
  } & OmitProps<React.ComponentProps<"input">, "style" | "value" | "ref" | "onChange" | "size"> & ComponentStyle & ComponentHoverStyle;
402
406
  type ToggleInputProps<Value = unknown> = ComponentPropWithRef<ToggleInputRef, OmitProps<InternalToggleInputProps<Value>, "type">>;
403
407
  type ToggleInputComponentType = <Value>(props: ToggleInputProps<Value>) => React.ReactElement;
404
- declare const _default$5: {
408
+ declare const _default$6: {
405
409
  checkbox: ToggleInputComponentType;
406
410
  radiobutton: ToggleInputComponentType;
407
411
  switch: ToggleInputComponentType;
@@ -431,7 +435,7 @@ type DividerComponentType = {
431
435
  vertical: (props: ComponentPropWithRef<HTMLDivElement, VerticalDividerProps>) => React.ReactElement;
432
436
  horizontal: (props: ComponentPropWithRef<HTMLDivElement, HorizontalDividerProps>) => React.ReactElement;
433
437
  };
434
- declare const _default$4: {
438
+ declare const _default$5: {
435
439
  vertical: DividerComponentType["vertical"];
436
440
  horizontal: DividerComponentType["horizontal"];
437
441
  };
@@ -453,7 +457,7 @@ type LabelProps = {
453
457
  htmlFor?: string;
454
458
  };
455
459
  declare function Label(labelProps: LabelProps): react.JSX.Element;
456
- declare const _default$3: react.MemoExoticComponent<typeof Label>;
460
+ declare const _default$4: react.MemoExoticComponent<typeof Label>;
457
461
 
458
462
  type ImageProps = {
459
463
  name?: AssetName | AnyOtherString;
@@ -469,7 +473,7 @@ type ImageComponent = {
469
473
  }>) => React.ReactElement;
470
474
  };
471
475
  declare const Image: ImageComponent;
472
- declare const _default$2: ImageComponent & {
476
+ declare const _default$3: ImageComponent & {
473
477
  profileImage: typeof Image.profileImage;
474
478
  };
475
479
 
@@ -695,7 +699,7 @@ type BetterHtmlProviderProps = BetterProviderCommonProps & {
695
699
  config?: BetterHtmlProviderConfig;
696
700
  };
697
701
  declare function BetterHtmlProvider({ config, ...props }: BetterHtmlProviderProps): react.JSX.Element;
698
- declare const _default$1: react.MemoExoticComponent<typeof BetterHtmlProvider>;
702
+ declare const _default$2: react.MemoExoticComponent<typeof BetterHtmlProvider>;
699
703
 
700
704
  declare const isMobileDevice: boolean;
701
705
 
@@ -792,7 +796,7 @@ type IconProps = {
792
796
  type IconComponent = {
793
797
  (props: ComponentPropWithRef<SVGSVGElement, IconProps>): React.ReactElement;
794
798
  };
795
- declare const _default: IconComponent;
799
+ declare const _default$1: IconComponent;
796
800
 
797
801
  type InternalModalProps = {
798
802
  /**
@@ -1236,6 +1240,21 @@ type PaginationComponentType = {
1236
1240
  declare const PaginationComponent: PaginationComponentType;
1237
1241
  declare const Pagination: typeof PaginationComponent & {};
1238
1242
 
1243
+ type DeveloperPageSection = {
1244
+ title: string;
1245
+ description?: string;
1246
+ children?: React.ReactNode;
1247
+ };
1248
+ type DeveloperPageProps = {
1249
+ /** @default 24 */
1250
+ iconSize?: number;
1251
+ /** @default 120 */
1252
+ assetSize?: number;
1253
+ sections?: DeveloperPageSection[];
1254
+ };
1255
+ declare function DeveloperPage({ iconSize, assetSize, sections }: DeveloperPageProps): react.JSX.Element | undefined;
1256
+ declare const _default: react.MemoExoticComponent<typeof DeveloperPage>;
1257
+
1239
1258
  type AlertsPluginOptions = {
1240
1259
  /** @default "bottom" */
1241
1260
  position?: "top" | "bottom";
@@ -1278,4 +1297,4 @@ type LocalStoragePluginOptions = {
1278
1297
  declare const defaultLocalStoragePluginOptions: Required<LocalStoragePluginOptions>;
1279
1298
  declare const localStoragePlugin: BetterHtmlPluginConstructor<LocalStoragePluginOptions>;
1280
1299
 
1281
- export { type Alert, type AlertDisplay, type AlertDuration, type AlertType, type AlertsPluginOptions, type AppConfig, type BetterHtmlConfig, type BetterHtmlPlugin, _default$1 as BetterHtmlProvider, type BetterHtmlProviderConfig, type BrowserName, type BurgerButtonProps, Button, type ButtonProps, Chip, type ChipProps, ColorThemeSwitch, type ColorThemeSwitchProps, type ComponentHoverStyle, type ComponentMarginProps, type ComponentPaddingProps, Div, type DivProps, _default$4 as Divider, Dropdown, type DropdownOption, type DropdownProps, Foldable, type FoldableProps, type FoldableRef, Form, type FormProps, FormRow, type FormRowProps, type HorizontalDividerProps, _default as Icon, type IconProps, _default$2 as Image, type ImageProps, InputField, type InputFieldProps, _default$3 as Label, type LabelProps, type Language, type LanguageData, Loader, type LoaderProps, type LocalStoragePluginOptions, Modal, type ModalProps, type ModalRef, PageHeader, type PageHeaderProps, PageHolder, type PageHolderProps, Pagination, type PluginName, type ReactRouterDomPluginOptions, SideMenu, type SideMenuItem, type SideMenuProps, type Tab, type TabGroup, Table, type TableColumn, type TableFilterData, type TableListFilterListItem, type TableProps, type TableRef, Tabs, type TabsProps, type TabsRef, Text, type TextAs, type TextProps, type TextareaFieldProps, _default$5 as ToggleInput, type ToggleInputProps, type ToggleInputRef, Tooltip, type TooltipProps, type TooltipRef, type VerticalDividerProps, alertControls, alertsPlugin, defaultAlertsPluginOptions, defaultLocalStoragePluginOptions, defaultReactRouterDomPluginOptions, filterHover, generateI18n, generateLocalStorage, getBrowser, getFormErrorObject, isMobileDevice, localStoragePlugin, missingTranslation, reactRouterDomPlugin, sideMenuControls, useAlertControls, useBetterHtmlContext, useForm, useMediaQuery, usePageResize, usePageScroll, useUrlQuery };
1300
+ export { type Alert, type AlertDisplay, type AlertDuration, type AlertType, type AlertsPluginOptions, type AppConfig, type BetterHtmlConfig, type BetterHtmlPlugin, _default$2 as BetterHtmlProvider, type BetterHtmlProviderConfig, type BrowserName, type BurgerButtonProps, Button, type ButtonProps, Chip, type ChipProps, ColorThemeSwitch, type ColorThemeSwitchProps, type ComponentHoverStyle, type ComponentMarginProps, type ComponentPaddingProps, _default as DeveloperPage, type DeveloperPageSection, Div, type DivProps, _default$5 as Divider, Dropdown, type DropdownOption, type DropdownProps, Foldable, type FoldableProps, type FoldableRef, Form, type FormProps, FormRow, type FormRowProps, type HorizontalDividerProps, _default$1 as Icon, type IconProps, _default$3 as Image, type ImageProps, InputField, type InputFieldProps, _default$4 as Label, type LabelProps, type Language, type LanguageData, Loader, type LoaderProps, type LocalStoragePluginOptions, Modal, type ModalProps, type ModalRef, PageHeader, type PageHeaderProps, PageHolder, type PageHolderProps, Pagination, type PluginName, type ReactRouterDomPluginOptions, SideMenu, type SideMenuItem, type SideMenuProps, type Tab, type TabGroup, Table, type TableColumn, type TableFilterData, type TableListFilterListItem, type TableProps, type TableRef, Tabs, type TabsProps, type TabsRef, Text, type TextAs, type TextProps, type TextareaFieldProps, _default$6 as ToggleInput, type ToggleInputProps, type ToggleInputRef, Tooltip, type TooltipProps, type TooltipRef, type VerticalDividerProps, alertControls, alertsPlugin, defaultAlertsPluginOptions, defaultLocalStoragePluginOptions, defaultReactRouterDomPluginOptions, filterHover, generateI18n, generateLocalStorage, getBrowser, getFormErrorObject, isMobileDevice, localStoragePlugin, missingTranslation, reactRouterDomPlugin, sideMenuControls, useAlertControls, useBetterHtmlContext, useForm, useMediaQuery, usePageResize, usePageScroll, useUrlQuery };
package/dist/index.js CHANGED
@@ -34,6 +34,7 @@ __export(index_exports, {
34
34
  Button: () => Button_default,
35
35
  Chip: () => Chip_default,
36
36
  ColorThemeSwitch: () => ColorThemeSwitch_default,
37
+ DeveloperPage: () => DeveloperPage_default,
37
38
  Div: () => Div_default,
38
39
  Divider: () => Divider_default,
39
40
  Dropdown: () => Dropdown_default,
@@ -57,52 +58,52 @@ __export(index_exports, {
57
58
  Tooltip: () => Tooltip_default,
58
59
  alertControls: () => alertControls,
59
60
  alertsPlugin: () => alertsPlugin,
60
- calculateColorContrast: () => import_react_better_core30.calculateColorContrast,
61
- colorThemeControls: () => import_react_better_core30.colorThemeControls,
62
- countries: () => import_react_better_core30.countries,
63
- darkenColor: () => import_react_better_core30.darkenColor,
61
+ calculateColorContrast: () => import_react_better_core31.calculateColorContrast,
62
+ colorThemeControls: () => import_react_better_core31.colorThemeControls,
63
+ countries: () => import_react_better_core31.countries,
64
+ darkenColor: () => import_react_better_core31.darkenColor,
64
65
  defaultAlertsPluginOptions: () => defaultAlertsPluginOptions,
65
66
  defaultLocalStoragePluginOptions: () => defaultLocalStoragePluginOptions,
66
67
  defaultReactRouterDomPluginOptions: () => defaultReactRouterDomPluginOptions,
67
- desaturateColor: () => import_react_better_core30.desaturateColor,
68
- eventPreventDefault: () => import_react_better_core30.eventPreventDefault,
69
- eventPreventStop: () => import_react_better_core30.eventPreventStop,
70
- eventStopPropagation: () => import_react_better_core30.eventStopPropagation,
68
+ desaturateColor: () => import_react_better_core31.desaturateColor,
69
+ eventPreventDefault: () => import_react_better_core31.eventPreventDefault,
70
+ eventPreventStop: () => import_react_better_core31.eventPreventStop,
71
+ eventStopPropagation: () => import_react_better_core31.eventStopPropagation,
71
72
  filterHover: () => filterHover,
72
- formatPhoneNumber: () => import_react_better_core30.formatPhoneNumber,
73
- generateApi: () => import_react_better_core30.generateApi,
74
- generateEventEmitter: () => import_react_better_core30.generateEventEmitter,
73
+ formatPhoneNumber: () => import_react_better_core31.formatPhoneNumber,
74
+ generateApi: () => import_react_better_core31.generateApi,
75
+ generateEventEmitter: () => import_react_better_core31.generateEventEmitter,
75
76
  generateI18n: () => generateI18n,
76
77
  generateLocalStorage: () => generateLocalStorage,
77
- generateRandomString: () => import_react_better_core30.generateRandomString,
78
+ generateRandomString: () => import_react_better_core31.generateRandomString,
78
79
  getBrowser: () => getBrowser,
79
80
  getFormErrorObject: () => getFormErrorObject,
80
- getPluralWord: () => import_react_better_core30.getPluralWord,
81
- isApiError: () => import_react_better_core30.isApiError,
81
+ getPluralWord: () => import_react_better_core31.getPluralWord,
82
+ isApiError: () => import_react_better_core31.isApiError,
82
83
  isMobileDevice: () => isMobileDevice,
83
- lightenColor: () => import_react_better_core30.lightenColor,
84
- loaderControls: () => import_react_better_core30.loaderControls,
84
+ lightenColor: () => import_react_better_core31.lightenColor,
85
+ loaderControls: () => import_react_better_core31.loaderControls,
85
86
  localStoragePlugin: () => localStoragePlugin,
86
- log: () => import_react_better_core30.log,
87
+ log: () => import_react_better_core31.log,
87
88
  missingTranslation: () => missingTranslation,
88
89
  reactRouterDomPlugin: () => reactRouterDomPlugin,
89
- saturateColor: () => import_react_better_core30.saturateColor,
90
+ saturateColor: () => import_react_better_core31.saturateColor,
90
91
  sideMenuControls: () => sideMenuControls,
91
92
  useAlertControls: () => useAlertControls,
92
93
  useBetterHtmlContext: () => useBetterHtmlContext,
93
- useBooleanState: () => import_react_better_core30.useBooleanState,
94
- useDebounceState: () => import_react_better_core30.useDebounceState,
94
+ useBooleanState: () => import_react_better_core31.useBooleanState,
95
+ useDebounceState: () => import_react_better_core31.useDebounceState,
95
96
  useForm: () => useForm,
96
- useLoader: () => import_react_better_core30.useLoader,
97
- useLoaderControls: () => import_react_better_core30.useLoaderControls,
97
+ useLoader: () => import_react_better_core31.useLoader,
98
+ useLoaderControls: () => import_react_better_core31.useLoaderControls,
98
99
  useMediaQuery: () => useMediaQuery,
99
100
  usePageResize: () => usePageResize,
100
101
  usePageScroll: () => usePageScroll,
101
- useTheme: () => import_react_better_core30.useTheme,
102
+ useTheme: () => import_react_better_core31.useTheme,
102
103
  useUrlQuery: () => useUrlQuery
103
104
  });
104
105
  module.exports = __toCommonJS(index_exports);
105
- var import_react_better_core30 = require("react-better-core");
106
+ var import_react_better_core31 = require("react-better-core");
106
107
 
107
108
  // src/components/BetterHtmlProvider.tsx
108
109
  var import_react14 = require("react");
@@ -3913,6 +3914,8 @@ var DropdownComponent = (0, import_react19.forwardRef)(function Dropdown(dropdow
3913
3914
  withMultiselect,
3914
3915
  id,
3915
3916
  textAlign,
3917
+ backgroundColor,
3918
+ borderRadius,
3916
3919
  ...props
3917
3920
  } = useComponentsPropsMerger(
3918
3921
  betterHtmlContextInternal.components.dropdown?.style?.default,
@@ -4138,6 +4141,8 @@ var DropdownComponent = (0, import_react19.forwardRef)(function Dropdown(dropdow
4138
4141
  infoTextColor,
4139
4142
  required: withMultiselect ? (Array.isArray(value) ? value.length > 0 : value !== void 0) ? false : required : required,
4140
4143
  textAlign,
4144
+ backgroundColor,
4145
+ borderRadius,
4141
4146
  name,
4142
4147
  disabled,
4143
4148
  readOnly: !withSearch,
@@ -5850,13 +5855,24 @@ var componentSize = 26;
5850
5855
  var switchComponentBallGap = 3;
5851
5856
  var switchComponentMouseDownDifference = 4;
5852
5857
  var InputElement2 = import_styled_components12.default.input.withConfig({
5853
- shouldForwardProp: (prop) => !["theme", "colorTheme", "style", "hoverStyle", "size", "withNoBorder"].includes(prop)
5858
+ shouldForwardProp: (prop) => ![
5859
+ "theme",
5860
+ "colorTheme",
5861
+ "style",
5862
+ "hoverStyle",
5863
+ "size",
5864
+ "withNoBorder",
5865
+ "inactiveColor",
5866
+ "activeColor",
5867
+ "inactiveBackgroundColor",
5868
+ "activeBackgroundColor"
5869
+ ].includes(prop)
5854
5870
  })`
5855
5871
  position: relative;
5856
5872
  appearance: none;
5857
5873
  width: ${(props) => props.size ?? componentSize}px;
5858
5874
  height: ${(props) => props.size ?? componentSize}px;
5859
- background-color: ${(props) => props.theme.colors.backgroundContent};
5875
+ background-color: ${(props) => props.inactiveBackgroundColor ?? props.theme.colors.backgroundContent};
5860
5876
  border: ${(props) => props.theme.styles.borderWidth}px solid ${(props) => props.theme.colors.border};
5861
5877
  border-radius: ${(props) => props.theme.styles.borderRadius / 2}px;
5862
5878
  cursor: pointer;
@@ -5868,8 +5884,8 @@ var InputElement2 = import_styled_components12.default.input.withConfig({
5868
5884
  }
5869
5885
 
5870
5886
  &:checked {
5871
- background-color: ${(props) => props.theme.colors.primary};
5872
- border-color: ${(props) => props.theme.colors.primary};
5887
+ background-color: ${(props) => props.activeBackgroundColor ?? props.theme.colors.primary};
5888
+ border-color: ${(props) => props.activeBackgroundColor ?? props.theme.colors.primary};
5873
5889
  }
5874
5890
 
5875
5891
  &:disabled {
@@ -5890,7 +5906,18 @@ var InputElement2 = import_styled_components12.default.input.withConfig({
5890
5906
  }
5891
5907
  `;
5892
5908
  var SwitchElement = import_styled_components12.default.div.withConfig({
5893
- shouldForwardProp: (prop) => !["theme", "checked", "disabled", "isMouseDown", "style", "hoverStyle"].includes(prop)
5909
+ shouldForwardProp: (prop) => ![
5910
+ "theme",
5911
+ "checked",
5912
+ "disabled",
5913
+ "isMouseDown",
5914
+ "style",
5915
+ "hoverStyle",
5916
+ "activeColor",
5917
+ "inactiveColor",
5918
+ "inactiveBackgroundColor",
5919
+ "activeBackgroundColor"
5920
+ ].includes(prop)
5894
5921
  })`
5895
5922
  --width: ${(props) => componentSize * 2 - props.theme.styles.gap / 2}px;
5896
5923
  --ball-size: ${componentSize - switchComponentBallGap * 2}px;
@@ -5898,7 +5925,7 @@ var SwitchElement = import_styled_components12.default.div.withConfig({
5898
5925
  position: relative;
5899
5926
  width: var(--width);
5900
5927
  height: ${componentSize}px;
5901
- background-color: ${(props) => props.checked ? props.theme.colors.primary : props.theme.colors.border};
5928
+ background-color: ${(props) => props.checked ? props.activeBackgroundColor ?? props.theme.colors.primary : props.inactiveBackgroundColor ?? props.theme.colors.border};
5902
5929
  border-radius: 999px;
5903
5930
  cursor: ${(props) => props.disabled ? "not-allowed" : "pointer"};
5904
5931
  opacity: ${(props) => props.disabled ? 0.5 : 1};
@@ -5909,7 +5936,7 @@ var SwitchElement = import_styled_components12.default.div.withConfig({
5909
5936
  position: absolute;
5910
5937
  width: ${(props) => componentSize - switchComponentBallGap * 2 + (props.isMouseDown ? switchComponentMouseDownDifference : 0)}px;
5911
5938
  height: ${componentSize - switchComponentBallGap * 2}px;
5912
- background-color: ${(props) => props.theme.colors.base};
5939
+ background-color: ${(props) => props.checked ? props.activeColor ?? props.theme.colors.base : props.inactiveColor ?? props.theme.colors.base};
5913
5940
  border-radius: 999px;
5914
5941
  top: ${switchComponentBallGap}px;
5915
5942
  left: ${switchComponentBallGap}px;
@@ -5925,7 +5952,7 @@ var SwitchElement = import_styled_components12.default.div.withConfig({
5925
5952
  position: absolute;
5926
5953
  width: ${(props) => componentSize - switchComponentBallGap * 2 + (props.isMouseDown ? switchComponentMouseDownDifference : 0)}px;
5927
5954
  height: ${componentSize - switchComponentBallGap * 2}px;
5928
- background-color: ${(props) => props.checked ? props.theme.colors.primary : "transparent"};
5955
+ background-color: ${(props) => props.checked ? props.activeBackgroundColor ?? props.theme.colors.primary : "transparent"};
5929
5956
  border-radius: 999px;
5930
5957
  top: ${switchComponentBallGap}px;
5931
5958
  left: ${switchComponentBallGap}px;
@@ -5959,6 +5986,10 @@ var ToggleInputComponent = (0, import_react23.forwardRef)(function ToggleInput({
5959
5986
  errorText,
5960
5987
  infoText,
5961
5988
  infoTextColor,
5989
+ inactiveColor,
5990
+ activeColor,
5991
+ inactiveBackgroundColor,
5992
+ activeBackgroundColor,
5962
5993
  size = componentSize,
5963
5994
  value,
5964
5995
  onChange,
@@ -6014,6 +6045,10 @@ var ToggleInputComponent = (0, import_react23.forwardRef)(function ToggleInput({
6014
6045
  colorTheme,
6015
6046
  size,
6016
6047
  withNoBorder: theme2.styles.borderWidth === 0,
6048
+ inactiveColor,
6049
+ activeColor,
6050
+ inactiveBackgroundColor,
6051
+ activeBackgroundColor,
6017
6052
  type: props.type ?? "checkbox",
6018
6053
  checked,
6019
6054
  onChange: onChangeElement,
@@ -6032,7 +6067,7 @@ var ToggleInputComponent = (0, import_react23.forwardRef)(function ToggleInput({
6032
6067
  position: "absolute",
6033
6068
  top: "50%",
6034
6069
  left: "50%",
6035
- color: theme2.colors.base,
6070
+ color: activeColor ?? theme2.colors.base,
6036
6071
  size: size / 1.8,
6037
6072
  transform: `translate(-50%, -50%)${checked ? "" : " scale(0.4)"}`,
6038
6073
  opacity: checked ? 1 : 0,
@@ -6047,7 +6082,7 @@ var ToggleInputComponent = (0, import_react23.forwardRef)(function ToggleInput({
6047
6082
  height: size / 2,
6048
6083
  top: "50%",
6049
6084
  left: "50%",
6050
- backgroundColor: theme2.colors.base,
6085
+ backgroundColor: activeColor ?? theme2.colors.base,
6051
6086
  borderRadius: 999,
6052
6087
  transform: `translate(-50%, -50%)${checked ? "" : " scale(0.4)"}`,
6053
6088
  opacity: checked ? 1 : 0,
@@ -8757,12 +8792,80 @@ var SideMenu2 = (0, import_react32.memo)(SideMenuComponent);
8757
8792
  SideMenu2.pageHolder = SideMenuComponent.pageHolder;
8758
8793
  SideMenu2.burgerButton = SideMenuComponent.burgerButton;
8759
8794
  var SideMenu_default = SideMenu2;
8795
+
8796
+ // src/components/DeveloperPage.tsx
8797
+ var import_react33 = require("react");
8798
+ var import_react_better_core30 = require("react-better-core");
8799
+ var import_jsx_runtime30 = require("react/jsx-runtime");
8800
+ function DeveloperPage({ iconSize = 24, assetSize = 120, sections }) {
8801
+ const theme2 = (0, import_react_better_core30.useTheme)();
8802
+ const { devMode, icons: icons2, assets: assets2 } = (0, import_react_better_core30.useBetterCoreContext)();
8803
+ const gridGap = theme2.styles.space;
8804
+ const iconNameFontSie = 12;
8805
+ return devMode ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Div_default.column, { gap: theme2.styles.space, children: [
8806
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Div_default.box, { title: "Icons", titleAs: "h2", description: "List of all icons in the config", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Div_default.row, { alignItems: "center", justifyContent: "center", flexWrap: "wrap", gap: gridGap, children: Object.keys(icons2).map((icon) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
8807
+ Div_default.row,
8808
+ {
8809
+ position: "relative",
8810
+ width: iconSize + gridGap * 2 + iconNameFontSie,
8811
+ height: iconSize + gridGap * 2 + iconNameFontSie,
8812
+ alignItems: "center",
8813
+ justifyContent: "center",
8814
+ children: [
8815
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon_default, { name: icon, color: theme2.colors.primary, size: iconSize }),
8816
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
8817
+ Text_default,
8818
+ {
8819
+ position: "absolute",
8820
+ width: "100%",
8821
+ top: `calc(100% - ${iconNameFontSie}px)`,
8822
+ fontSize: iconNameFontSie,
8823
+ textAlign: "center",
8824
+ wordBreak: "break-all",
8825
+ color: theme2.colors.textSecondary,
8826
+ children: icon
8827
+ }
8828
+ )
8829
+ ]
8830
+ },
8831
+ icon
8832
+ )) }) }),
8833
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Div_default.box, { title: "Assets", titleAs: "h2", description: "List of all assets in the config", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Div_default.row, { alignItems: "center", justifyContent: "center", flexWrap: "wrap", gap: gridGap, children: Object.keys(assets2).map((asset) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
8834
+ Div_default.column,
8835
+ {
8836
+ position: "relative",
8837
+ width: assetSize,
8838
+ alignItems: "center",
8839
+ justifyContent: "center",
8840
+ gap: theme2.styles.gap,
8841
+ children: [
8842
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Image_default, { name: asset, width: "100%", height: assetSize, objectFit: "contain" }),
8843
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
8844
+ Text_default,
8845
+ {
8846
+ width: "100%",
8847
+ fontSize: iconNameFontSie,
8848
+ textAlign: "center",
8849
+ wordBreak: "break-all",
8850
+ color: theme2.colors.textSecondary,
8851
+ children: asset
8852
+ }
8853
+ )
8854
+ ]
8855
+ },
8856
+ asset
8857
+ )) }) }),
8858
+ sections?.map((section) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Div_default.box, { title: section.title, titleAs: "h2", description: section.description, children: section.children }, section.title))
8859
+ ] }) : void 0;
8860
+ }
8861
+ var DeveloperPage_default = (0, import_react33.memo)(DeveloperPage);
8760
8862
  // Annotate the CommonJS export names for ESM import in node:
8761
8863
  0 && (module.exports = {
8762
8864
  BetterHtmlProvider,
8763
8865
  Button,
8764
8866
  Chip,
8765
8867
  ColorThemeSwitch,
8868
+ DeveloperPage,
8766
8869
  Div,
8767
8870
  Divider,
8768
8871
  Dropdown,