react-better-html 1.1.233 → 1.1.234

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.js CHANGED
@@ -69,8 +69,8 @@ __export(index_exports, {
69
69
  eventStopPropagation: () => import_react_better_core30.eventStopPropagation,
70
70
  filterHover: () => filterHover,
71
71
  formatPhoneNumber: () => import_react_better_core30.formatPhoneNumber,
72
- generateApi: () => generateApi,
73
- generateEventEmitter: () => generateEventEmitter,
72
+ generateApi: () => import_react_better_core30.generateApi,
73
+ generateEventEmitter: () => import_react_better_core30.generateEventEmitter,
74
74
  generateLocalStorage: () => generateLocalStorage,
75
75
  generateRandomString: () => import_react_better_core30.generateRandomString,
76
76
  getBrowser: () => getBrowser,
@@ -961,7 +961,7 @@ function useComponentInputFieldDateProps(props, holderRef, disabled) {
961
961
  );
962
962
  const insideInputFieldComponentProps = (0, import_react.useMemo)(
963
963
  () => ({
964
- border: `1px solid ${isFocused ? theme2.colors.primary : theme2.colors.border}`,
964
+ border: `${theme2.styles.borderWidth}px solid ${isFocused ? theme2.colors.primary : theme2.colors.border}`,
965
965
  borderTop: "none",
966
966
  opacity: !isOpen ? 0 : void 0,
967
967
  pointerEvents: !isOpen ? "none" : void 0,
@@ -1482,7 +1482,7 @@ Image.profileImage = (0, import_react4.forwardRef)(function ProfileImage({ size
1482
1482
  Div_default.row,
1483
1483
  {
1484
1484
  backgroundColor: backgroundColor ?? theme2.colors.backgroundSecondary,
1485
- border: `solid 1px ${theme2.colors.border}`,
1485
+ border: `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}`,
1486
1486
  borderRadius: 999,
1487
1487
  alignItems: "center",
1488
1488
  justifyContent: "center",
@@ -1497,7 +1497,7 @@ Image.profileImage = (0, import_react4.forwardRef)(function ProfileImage({ size
1497
1497
  {
1498
1498
  width: size,
1499
1499
  height: size,
1500
- border: `solid 1px ${theme2.colors.border}`,
1500
+ border: `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}`,
1501
1501
  borderRadius: 999,
1502
1502
  objectFit: "cover",
1503
1503
  ref,
@@ -1795,7 +1795,7 @@ DivComponent.box = (0, import_react8.forwardRef)(function Box({
1795
1795
  {
1796
1796
  color: isActive ? theme2.colors.base : void 0,
1797
1797
  backgroundColor: isActive ? readyActiveColor : theme2.colors.backgroundContent,
1798
- border: `1px solid ${isActive ? readyActiveColor : theme2.colors.border}`,
1798
+ border: `${theme2.styles.borderWidth}px solid ${isActive ? readyActiveColor : theme2.colors.border}`,
1799
1799
  borderRadius: theme2.styles.borderRadius,
1800
1800
  borderColorHover: withClick && !isActive ? readyActiveColor : void 0,
1801
1801
  filterHover: withClick && isActive ? "brightness(0.9)" : void 0,
@@ -1809,8 +1809,8 @@ DivComponent.box = (0, import_react8.forwardRef)(function Box({
1809
1809
  Div2,
1810
1810
  {
1811
1811
  backgroundColor: headerBackgroundColor,
1812
- borderTopLeftRadius: props.borderTopLeftRadius ?? props.borderRadius ?? theme2.styles.borderRadius - 1,
1813
- borderTopRightRadius: props.borderTopRightRadius ?? props.borderRadius ?? theme2.styles.borderRadius - 1,
1812
+ borderTopLeftRadius: props.borderTopLeftRadius ?? props.borderRadius ?? theme2.styles.borderRadius - theme2.styles.borderWidth,
1813
+ borderTopRightRadius: props.borderTopRightRadius ?? props.borderRadius ?? theme2.styles.borderRadius - theme2.styles.borderWidth,
1814
1814
  marginInline: -theme2.styles.space,
1815
1815
  marginTop: -theme2.styles.space,
1816
1816
  marginBottom: theme2.styles.space,
@@ -1837,7 +1837,7 @@ DivComponent.box = (0, import_react8.forwardRef)(function Box({
1837
1837
  marginBottom: theme2.styles.space
1838
1838
  }
1839
1839
  ),
1840
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Div2, { width: `calc(100% + ${theme2.styles.space * 2}px)`, marginLeft: -theme2.styles.space, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Divider_default.horizontal, {}) })
1840
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Div2, { width: `calc(100% + ${theme2.styles.space * 2}px)`, marginLeft: -theme2.styles.space, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Divider_default.horizontal, { width: theme2.styles.borderWidth }) })
1841
1841
  ]
1842
1842
  }
1843
1843
  ),
@@ -1999,7 +1999,7 @@ var ButtonElement = import_styled_components6.default.button.withConfig({
1999
1999
  background-color: ${(props) => props.theme.colors.primary};
2000
2000
  border: none;
2001
2001
  border-radius: ${(props) => props.theme.styles.borderRadius}px;
2002
- padding: ${(props) => props.isSmall ? `${props.theme.styles.gap + 1}px ${props.theme.styles.space}px` : `${(props.theme.styles.gap + props.theme.styles.space) / 2 + 1}px ${props.theme.styles.space + (props.withText ? props.theme.styles.gap : 0)}px`};
2002
+ padding: ${(props) => props.isSmall ? `${props.theme.styles.gap + props.theme.styles.borderWidth}px ${props.theme.styles.space}px` : `${(props.theme.styles.gap + props.theme.styles.space) / 2 + props.theme.styles.borderWidth}px ${props.theme.styles.space + (props.withText ? props.theme.styles.gap : 0)}px`};
2003
2003
  user-select: none;
2004
2004
  flex-shrink: 0;
2005
2005
  transition: ${(props) => props.theme.styles.transition};
@@ -2021,7 +2021,7 @@ var ButtonElement = import_styled_components6.default.button.withConfig({
2021
2021
 
2022
2022
  &.secondary {
2023
2023
  padding-block: ${(props) => props.isSmall ? props.theme.styles.gap : (props.theme.styles.space + props.theme.styles.gap) / 2}px;
2024
- border: solid 1px ${(props) => props.theme.colors.border};
2024
+ border: solid ${(props) => props.theme.styles.borderWidth}px ${(props) => props.theme.colors.border};
2025
2025
  background-color: ${(props) => props.theme.colors.backgroundContent};
2026
2026
  background-image: none;
2027
2027
 
@@ -2493,7 +2493,7 @@ var ModalComponent = (0, import_react11.forwardRef)(function Modal({
2493
2493
  ]
2494
2494
  }
2495
2495
  ),
2496
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Divider_default.horizontal, {})
2496
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Divider_default.horizontal, { width: theme2.styles.borderWidth })
2497
2497
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: !withoutCloseButton && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Div_default, { position: "absolute", top: theme2.styles.space, right: theme2.styles.space, zIndex: 10, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Button_default.icon, { icon: "XMark", iconColor: titleColor, onClick: onClickClose }) }) }),
2498
2498
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Div_default, { padding: title ? theme2.styles.space : void 0, children })
2499
2499
  ]
@@ -3066,8 +3066,7 @@ function BetterHtmlProviderInternal({ config, plugins, children }) {
3066
3066
  tabsWithDots,
3067
3067
  setTabsWithDots
3068
3068
  }
3069
- },
3070
- devMode: config?.devMode
3069
+ }
3071
3070
  }),
3072
3071
  [config, alerts, sideMenuIsCollapsed, sideMenuIsOpenMobile, plugins, tabGroups, tabsWithDots]
3073
3072
  );
@@ -3097,7 +3096,8 @@ function BetterHtmlProvider({ config, ...props }) {
3097
3096
  ...assets,
3098
3097
  ...config?.assets
3099
3098
  },
3100
- loaders: config?.loaders
3099
+ loaders: config?.loaders,
3100
+ devMode: config?.devMode
3101
3101
  }),
3102
3102
  [config]
3103
3103
  );
@@ -3106,8 +3106,7 @@ function BetterHtmlProvider({ config, ...props }) {
3106
3106
  app: config?.app,
3107
3107
  sideMenuIsCollapsed: config?.sideMenuIsCollapsed,
3108
3108
  sideMenuIsOpenMobile: config?.sideMenuIsOpenMobile,
3109
- components: config?.components,
3110
- devMode: config?.devMode
3109
+ components: config?.components
3111
3110
  }),
3112
3111
  [config]
3113
3112
  );
@@ -3267,12 +3266,6 @@ function findClosestNumber(numbers, target) {
3267
3266
  }
3268
3267
  return closest;
3269
3268
  }
3270
- var constructQuery = (query) => {
3271
- if (!query) return "";
3272
- return Object.entries(query).filter(([_, queryVale]) => queryVale !== void 0 && queryVale !== null).map(
3273
- ([queryName, queryVale]) => typeof queryVale === "object" ? queryVale.map((value) => `${queryName}=${value}`) : [`${queryName}=${queryVale}`]
3274
- ).flat().join("&");
3275
- };
3276
3269
 
3277
3270
  // src/utils/localStorage.ts
3278
3271
  function generateLocalStorage() {
@@ -3339,180 +3332,6 @@ function generateLocalStorage() {
3339
3332
  };
3340
3333
  }
3341
3334
 
3342
- // src/utils/logger.ts
3343
- var textColors = {
3344
- black: "#111111",
3345
- red: "#f83e4b",
3346
- green: "#5ac53a",
3347
- yellow: "#f8d770",
3348
- blue: "#3d6fdf",
3349
- magenta: "#9648eb",
3350
- cyan: "#53b2c8",
3351
- white: "#f8f8f8"
3352
- };
3353
- var backgroundColors = {
3354
- black: "#111111",
3355
- red: "#f83e4b",
3356
- green: "#5ac53a",
3357
- yellow: "#f8d770",
3358
- blue: "#3d6fdf",
3359
- magenta: "#9648eb",
3360
- cyan: "#53b2c8",
3361
- white: "#f8f8f8"
3362
- };
3363
- var logTypes = {
3364
- info: "cyan",
3365
- success: "green",
3366
- warn: "yellow",
3367
- error: "red"
3368
- };
3369
- function getCssString(options) {
3370
- const color = options.color ? textColors[options.color] : void 0;
3371
- const backgroundColor = options.backgroundColor ? backgroundColors[options.backgroundColor] : void 0;
3372
- const fontWeight = options.bold ? "bold" : "normal";
3373
- return `${color ? `color: ${color};` : ""}${backgroundColor ? `background-color: ${backgroundColor};` : ""}${fontWeight ? `font-weight: ${fontWeight};` : ""}`;
3374
- }
3375
- function logText(text, options) {
3376
- if (externalBetterHtmlContextValue?.devMode !== true) return;
3377
- console.log(`%c${text}`, getCssString(options ?? {}));
3378
- }
3379
- var log = {
3380
- ...Object.entries(logTypes).reduce(
3381
- (previousValue, [logType, color]) => {
3382
- previousValue[logType] = (text = "", bold) => {
3383
- logText(text, {
3384
- color,
3385
- bold
3386
- });
3387
- };
3388
- return previousValue;
3389
- },
3390
- {}
3391
- ),
3392
- /** @description Default log function */
3393
- log: (text, options) => {
3394
- logText(text, options);
3395
- },
3396
- /** @description Logs the value in pretty json format */
3397
- json: (jsonObject, options) => {
3398
- logText(JSON.stringify(jsonObject, null, 4), options);
3399
- },
3400
- /** @description Logs a -=-= pattern */
3401
- divider: (color) => {
3402
- logText("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-", {
3403
- color
3404
- });
3405
- },
3406
- trace: () => {
3407
- if (externalBetterHtmlContextValue?.devMode !== true) return;
3408
- console.trace();
3409
- }
3410
- };
3411
-
3412
- // src/utils/api.ts
3413
- var methodInitiateToString = {
3414
- GET: "GET request to ",
3415
- PUT: "PUT request to ",
3416
- POST: "POST request to ",
3417
- PATCH: "PATCH request to ",
3418
- DELETE: "DELETE request to ",
3419
- HEAD: "HEAD request to ",
3420
- OPTIONS: "OPTIONS request to ",
3421
- TRACE: "TRACE request to ",
3422
- CONNECT: "CONNECT request to "
3423
- };
3424
- var methodResponseToString = {
3425
- GET: "GET request from ",
3426
- PUT: "PUT request from ",
3427
- POST: "POST request from ",
3428
- PATCH: "PATCH request from ",
3429
- DELETE: "DELETE request from ",
3430
- HEAD: "HEAD request from ",
3431
- OPTIONS: "OPTIONS request from",
3432
- TRACE: "TRACE request from ",
3433
- CONNECT: "CONNECT request from"
3434
- };
3435
- function generateApi(config, apiConfig, getHeaders) {
3436
- return async function apiCall(name, payload = {}) {
3437
- if (!apiConfig[name]) {
3438
- return Promise.reject(
3439
- new Error(`Endpoint ${name.toString()} is not defined in the \`generateApi\` function.`, {
3440
- cause: "generateApi.apiConfig.missingEndpoint"
3441
- })
3442
- );
3443
- }
3444
- const baseURL = config.baseUrl;
3445
- const path = `${apiConfig[name].path}${payload.path?.length ? `/${payload.path.join("/")}` : ""}`;
3446
- const query = constructQuery(payload.query);
3447
- const url = `${baseURL}${path}${query ? `?${query}` : ""}`;
3448
- const requestHeaders = {
3449
- "Content-Type": apiConfig[name].bodyWithFormData ? "multipart/form-data" : "application/json",
3450
- ...getHeaders ? Object.entries(getHeaders).reduce((previousValue, [key, value]) => {
3451
- if (apiConfig[name].includeHeaders?.includes(key)) {
3452
- previousValue[key] = value?.();
3453
- }
3454
- return previousValue;
3455
- }, {}) : {}
3456
- };
3457
- const body = payload.body;
3458
- const bodyAsFormData = new FormData();
3459
- if (body && apiConfig[name].bodyWithFormData) {
3460
- Object.entries(body).forEach(([key, value]) => {
3461
- bodyAsFormData.append(key, value);
3462
- });
3463
- }
3464
- const readyBody = JSON.stringify((apiConfig[name].bodyWithFormData ? bodyAsFormData : body) ?? {});
3465
- log.log(`Initiate ${methodInitiateToString[apiConfig[name].method]} ${url} - ${name.toString()}`, {
3466
- color: "magenta"
3467
- });
3468
- return await call(
3469
- () => fetch(url, {
3470
- method: apiConfig[name].method,
3471
- body: apiConfig[name].method !== "GET" ? readyBody : void 0,
3472
- headers: requestHeaders
3473
- })
3474
- );
3475
- async function call(callAction) {
3476
- const response = await callAction();
3477
- const responseJson = await response.json();
3478
- log.log(`Response ${methodResponseToString[apiConfig[name].method]} ${url} - ${name.toString()}`, {
3479
- color: "blue"
3480
- });
3481
- return {
3482
- data: responseJson,
3483
- headers: response.headers,
3484
- statusCode: response.status,
3485
- statusText: response.statusText,
3486
- url: response.url,
3487
- ok: response.ok,
3488
- redirected: response.redirected
3489
- };
3490
- }
3491
- };
3492
- }
3493
-
3494
- // src/utils/eventEmitter.ts
3495
- function generateEventEmitter() {
3496
- const eventEmitter = new EventTarget();
3497
- return {
3498
- emit: (name, data) => {
3499
- const event = new CustomEvent(name.toString(), {
3500
- detail: data
3501
- });
3502
- eventEmitter.dispatchEvent(event);
3503
- },
3504
- listen: (name, callback) => {
3505
- const listener = (event) => {
3506
- callback?.(event.detail);
3507
- };
3508
- eventEmitter.addEventListener(name.toString(), listener);
3509
- return () => {
3510
- eventEmitter.removeEventListener(name.toString(), listener);
3511
- };
3512
- }
3513
- };
3514
- }
3515
-
3516
3335
  // src/components/PageHolder.tsx
3517
3336
  var import_react15 = require("react");
3518
3337
  var import_react_better_core14 = require("react-better-core");
@@ -3666,7 +3485,7 @@ ChipComponent.colored = (0, import_react16.forwardRef)(function Colored({ color,
3666
3485
  {
3667
3486
  color: colorTheme === "light" ? (0, import_react_better_core15.darkenColor)(readyColor, 0.7) : (0, import_react_better_core15.lightenColor)(readyColor, 0.7),
3668
3487
  backgroundColor: readyColor + "40",
3669
- border: `1px solid ${readyColor}`,
3488
+ border: `${theme2.styles.borderWidth}px solid ${readyColor}`,
3670
3489
  ref,
3671
3490
  ...props
3672
3491
  }
@@ -3985,7 +3804,7 @@ var DropdownComponent = (0, import_react18.forwardRef)(function Dropdown({
3985
3804
  {
3986
3805
  width: "100%",
3987
3806
  backgroundColor: theme2.colors.backgroundContent,
3988
- border: `solid 1px ${theme2.colors.border}`,
3807
+ border: `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}`,
3989
3808
  borderColor: isFocused ? theme2.colors.primary : void 0,
3990
3809
  borderBottom: "none",
3991
3810
  borderTopLeftRadius: theme2.styles.borderRadius,
@@ -4032,7 +3851,7 @@ var DropdownComponent = (0, import_react18.forwardRef)(function Dropdown({
4032
3851
  width: "100%",
4033
3852
  maxHeight: 300,
4034
3853
  backgroundColor: theme2.colors.backgroundContent,
4035
- border: `1px solid ${isFocused ? theme2.colors.primary : theme2.colors.border}`,
3854
+ border: `${theme2.styles.borderWidth}px solid ${isFocused ? theme2.colors.primary : theme2.colors.border}`,
4036
3855
  borderTop: "none",
4037
3856
  borderBottomLeftRadius: theme2.styles.borderRadius,
4038
3857
  borderBottomRightRadius: theme2.styles.borderRadius,
@@ -4298,7 +4117,7 @@ function Calendar({ value, minDate, maxDate, onChange }) {
4298
4117
  justifyContent: "center",
4299
4118
  backgroundColor: isSelected ? theme2.colors.primary : theme2.colors.backgroundContent,
4300
4119
  filterHover: day && !isDisabled ? "brightness(0.9)" : void 0,
4301
- border: `1px solid ${isToday ? theme2.colors.primary : theme2.colors.primary + "00"}`,
4120
+ border: `${theme2.styles.borderWidth}px solid ${isToday ? theme2.colors.primary : theme2.colors.primary + "00"}`,
4302
4121
  borderRadius: theme2.styles.borderRadius / 2,
4303
4122
  padding: theme2.styles.space / 2,
4304
4123
  cursor: day ? !isDisabled ? "pointer" : "not-allowed" : void 0,
@@ -4375,7 +4194,7 @@ var InputElement = import_styled_components11.default.input.withConfig({
4375
4194
  line-height: 20px;
4376
4195
  color: ${(props) => props.theme.colors.textPrimary};
4377
4196
  background: ${(props) => props.theme.colors.backgroundContent};
4378
- border: 1px solid ${(props) => props.theme.colors.border};
4197
+ border: ${(props) => props.theme.styles.borderWidth}px solid ${(props) => props.theme.colors.border};
4379
4198
  border-radius: ${(props) => props.theme.styles.borderRadius}px;
4380
4199
  border-top-left-radius: ${(props) => props.withPrefix ? 0 : void 0};
4381
4200
  border-bottom-left-radius: ${(props) => props.withPrefix ? 0 : void 0};
@@ -4454,7 +4273,7 @@ var InputElement = import_styled_components11.default.input.withConfig({
4454
4273
  }
4455
4274
 
4456
4275
  &.react-better-html-dropdown {
4457
- padding-right: ${(props) => props.theme.styles.space + 16 + props.theme.styles.space - 1}px;
4276
+ padding-right: ${(props) => props.theme.styles.space + 16 + props.theme.styles.space - props.theme.styles.borderWidth}px;
4458
4277
 
4459
4278
  &.react-better-html-dropdown-multiselect {
4460
4279
  border-top: none;
@@ -4498,12 +4317,12 @@ var TextareaElement = import_styled_components11.default.textarea.withConfig({
4498
4317
  line-height: 20px;
4499
4318
  color: ${(props) => props.theme.colors.textPrimary};
4500
4319
  background: ${(props) => props.theme.colors.backgroundContent};
4501
- border: 1px solid ${(props) => props.theme.colors.border};
4320
+ border: ${(props) => props.theme.styles.borderWidth}px solid ${(props) => props.theme.colors.border};
4502
4321
  border-radius: ${(props) => props.theme.styles.borderRadius}px;
4503
4322
  outline: none;
4504
4323
  padding: ${(props) => `${(props.theme.styles.gap + props.theme.styles.space) / 2}px ${props.theme.styles.space}px`};
4505
- padding-left: ${(props) => props.withLeftIcon ? `${props.theme.styles.space + 16 + props.theme.styles.space - 1}px` : void 0};
4506
- padding-right: ${(props) => props.withRightIcon ? `${props.theme.styles.space + 16 + props.theme.styles.space - 1}px` : void 0};
4324
+ padding-left: ${(props) => props.withLeftIcon ? `${props.theme.styles.space + 16 + props.theme.styles.space - props.theme.styles.borderWidth}px` : void 0};
4325
+ padding-right: ${(props) => props.withRightIcon ? `${props.theme.styles.space + 16 + props.theme.styles.space - props.theme.styles.borderWidth}px` : void 0};
4507
4326
  resize: vertical;
4508
4327
  transition: border-color ${(props) => props.theme.styles.transition};
4509
4328
 
@@ -4589,7 +4408,7 @@ var InputFieldComponent = (0, import_react21.forwardRef)(function InputField({
4589
4408
  {
4590
4409
  alignItems: "center",
4591
4410
  justifyContent: "center",
4592
- border: `1px solid ${theme2.colors.border}`,
4411
+ border: `${theme2.styles.borderWidth}px solid ${theme2.colors.border}`,
4593
4412
  borderRight: "none",
4594
4413
  backgroundColor: prefixBackgroundColor ?? (colorTheme === "light" ? (0, import_react_better_core19.darkenColor)(theme2.colors.backgroundContent, 0.03) : (0, import_react_better_core19.lightenColor)(theme2.colors.backgroundContent, 0.1)),
4595
4414
  borderTopLeftRadius: theme2.styles.borderRadius,
@@ -4606,8 +4425,8 @@ var InputFieldComponent = (0, import_react21.forwardRef)(function InputField({
4606
4425
  {
4607
4426
  name: leftIcon,
4608
4427
  position: "absolute",
4609
- top: (props.type === "date" || props.type === "time" || props.type === "datetime-local" ? 48 : 46) / 2,
4610
- left: theme2.styles.space + 1,
4428
+ top: ((props.type === "date" || props.type === "time" || props.type === "datetime-local" ? 48 : 44) + theme2.styles.borderWidth * 2) / 2,
4429
+ left: theme2.styles.space + theme2.styles.borderWidth,
4611
4430
  transform: "translateY(-50%)",
4612
4431
  pointerEvents: "none",
4613
4432
  zIndex: leftIconZIndex
@@ -4638,8 +4457,8 @@ var InputFieldComponent = (0, import_react21.forwardRef)(function InputField({
4638
4457
  {
4639
4458
  icon: rightIcon,
4640
4459
  position: "absolute",
4641
- top: 46 / 2,
4642
- right: theme2.styles.space + 1 - theme2.styles.space / 2,
4460
+ top: (44 + theme2.styles.borderWidth * 2) / 2,
4461
+ right: theme2.styles.space + theme2.styles.borderWidth - theme2.styles.space / 2,
4643
4462
  transform: "translateY(-50%)",
4644
4463
  onClick: onClickRightIcon
4645
4464
  }
@@ -4648,8 +4467,8 @@ var InputFieldComponent = (0, import_react21.forwardRef)(function InputField({
4648
4467
  {
4649
4468
  name: rightIcon,
4650
4469
  position: "absolute",
4651
- top: 46 / 2,
4652
- right: theme2.styles.space + 1,
4470
+ top: (44 + theme2.styles.borderWidth * 2) / 2,
4471
+ right: theme2.styles.space + theme2.styles.borderWidth,
4653
4472
  transform: "translateY(-50%)",
4654
4473
  pointerEvents: "none"
4655
4474
  }
@@ -4662,7 +4481,7 @@ var InputFieldComponent = (0, import_react21.forwardRef)(function InputField({
4662
4481
  {
4663
4482
  alignItems: "center",
4664
4483
  justifyContent: "center",
4665
- border: `1px solid ${theme2.colors.border}`,
4484
+ border: `${theme2.styles.borderWidth}px solid ${theme2.colors.border}`,
4666
4485
  borderLeft: "none",
4667
4486
  backgroundColor: suffixBackgroundColor ?? (colorTheme === "light" ? (0, import_react_better_core19.darkenColor)(theme2.colors.backgroundContent, 0.03) : (0, import_react_better_core19.lightenColor)(theme2.colors.backgroundContent, 0.1)),
4668
4487
  borderTopRightRadius: theme2.styles.borderRadius,
@@ -4719,8 +4538,8 @@ InputFieldComponent.multiline = (0, import_react21.forwardRef)(function Multilin
4719
4538
  {
4720
4539
  name: leftIcon,
4721
4540
  position: "absolute",
4722
- top: 46 / 2,
4723
- left: theme2.styles.space + 1,
4541
+ top: (44 + theme2.styles.borderWidth * 2) / 2,
4542
+ left: theme2.styles.space + theme2.styles.borderWidth,
4724
4543
  transform: "translateY(-50%)",
4725
4544
  pointerEvents: "none"
4726
4545
  }
@@ -4748,8 +4567,8 @@ InputFieldComponent.multiline = (0, import_react21.forwardRef)(function Multilin
4748
4567
  {
4749
4568
  icon: rightIcon,
4750
4569
  position: "absolute",
4751
- top: 46 / 2,
4752
- right: theme2.styles.space + 1 - theme2.styles.space / 2,
4570
+ top: (44 + theme2.styles.borderWidth * 2) / 2,
4571
+ right: theme2.styles.space + theme2.styles.borderWidth - theme2.styles.space / 2,
4753
4572
  transform: "translateY(-50%)",
4754
4573
  onClick: onClickRightIcon
4755
4574
  }
@@ -4758,8 +4577,8 @@ InputFieldComponent.multiline = (0, import_react21.forwardRef)(function Multilin
4758
4577
  {
4759
4578
  name: rightIcon,
4760
4579
  position: "absolute",
4761
- top: 46 / 2,
4762
- right: theme2.styles.space + 1,
4580
+ top: (44 + theme2.styles.borderWidth * 2) / 2,
4581
+ right: theme2.styles.space + theme2.styles.borderWidth,
4763
4582
  transform: "translateY(-50%)",
4764
4583
  pointerEvents: "none"
4765
4584
  }
@@ -5426,7 +5245,7 @@ var InputElement2 = import_styled_components12.default.input.withConfig({
5426
5245
  width: ${componentSize}px;
5427
5246
  height: ${componentSize}px;
5428
5247
  background-color: ${(props) => props.theme.colors.backgroundContent};
5429
- border: 1px solid ${(props) => props.theme.colors.border};
5248
+ border: ${(props) => props.theme.styles.borderWidth}px solid ${(props) => props.theme.colors.border};
5430
5249
  border-radius: ${(props) => props.theme.styles.borderRadius / 2}px;
5431
5250
  cursor: pointer;
5432
5251
  transition: ${(props) => props.theme.styles.transition};
@@ -5742,7 +5561,7 @@ var FormComponent = (0, import_react23.forwardRef)(function Form({
5742
5561
  return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Div_default, { width: "100%", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("form", { name, onSubmit: onSubmit ?? form?.onSubmit, ref, children: [
5743
5562
  gap !== void 0 || withDividers ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Div_default.column, { gap: gap ?? (withDividers ? theme2.styles.space : theme2.styles.gap), children: withDividers ? import_react23.Children.toArray(children).map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react23.Fragment, { children: [
5744
5563
  child,
5745
- index < import_react23.Children.toArray(children).length - 1 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Divider_default.horizontal, {})
5564
+ index < import_react23.Children.toArray(children).length - 1 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Divider_default.horizontal, { width: theme2.styles.borderWidth })
5746
5565
  ] }, index)) : children }) : children,
5747
5566
  submitButtonText && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
5748
5567
  Div_default.row,
@@ -6062,45 +5881,45 @@ var TableStyledComponent = import_styled_components13.default.table.withConfig({
6062
5881
 
6063
5882
  thead {
6064
5883
  tr:first-child {
6065
- border-top-left-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
6066
- border-top-right-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
5884
+ border-top-left-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - props.theme.styles.borderWidth}px` : void 0};
5885
+ border-top-right-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - props.theme.styles.borderWidth}px` : void 0};
6067
5886
 
6068
5887
  th:first-child {
6069
- border-top-left-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
5888
+ border-top-left-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - props.theme.styles.borderWidth}px` : void 0};
6070
5889
  }
6071
5890
 
6072
5891
  th:last-child {
6073
- border-top-right-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
5892
+ border-top-right-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - props.theme.styles.borderWidth}px` : void 0};
6074
5893
  }
6075
5894
  }
6076
5895
  }
6077
5896
 
6078
5897
  tbody {
6079
5898
  tr:last-child {
6080
- border-bottom-left-radius: ${(props) => props.containsOverflowComponents && !props.withFooter ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
6081
- border-bottom-right-radius: ${(props) => props.containsOverflowComponents && !props.withFooter ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
5899
+ border-bottom-left-radius: ${(props) => props.containsOverflowComponents && !props.withFooter ? `${props.theme.styles.borderRadius * 2 - props.theme.styles.borderWidth}px` : void 0};
5900
+ border-bottom-right-radius: ${(props) => props.containsOverflowComponents && !props.withFooter ? `${props.theme.styles.borderRadius * 2 - props.theme.styles.borderWidth}px` : void 0};
6082
5901
 
6083
5902
  td:first-child {
6084
- border-bottom-left-radius: ${(props) => props.containsOverflowComponents && !props.withFooter ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
5903
+ border-bottom-left-radius: ${(props) => props.containsOverflowComponents && !props.withFooter ? `${props.theme.styles.borderRadius * 2 - props.theme.styles.borderWidth}px` : void 0};
6085
5904
  }
6086
5905
 
6087
5906
  td:last-child {
6088
- border-bottom-right-radius: ${(props) => props.containsOverflowComponents && !props.withFooter ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
5907
+ border-bottom-right-radius: ${(props) => props.containsOverflowComponents && !props.withFooter ? `${props.theme.styles.borderRadius * 2 - props.theme.styles.borderWidth}px` : void 0};
6089
5908
  }
6090
5909
  }
6091
5910
  }
6092
5911
 
6093
5912
  tfoot {
6094
5913
  tr:last-child {
6095
- border-bottom-left-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
6096
- border-bottom-right-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
5914
+ border-bottom-left-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - props.theme.styles.borderWidth}px` : void 0};
5915
+ border-bottom-right-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - props.theme.styles.borderWidth}px` : void 0};
6097
5916
 
6098
5917
  td:first-child {
6099
- border-bottom-left-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
5918
+ border-bottom-left-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - props.theme.styles.borderWidth}px` : void 0};
6100
5919
  }
6101
5920
 
6102
5921
  td:last-child {
6103
- border-bottom-right-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
5922
+ border-bottom-right-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - props.theme.styles.borderWidth}px` : void 0};
6104
5923
  }
6105
5924
  }
6106
5925
  }
@@ -6150,7 +5969,8 @@ var TableStyledComponent = import_styled_components13.default.table.withConfig({
6150
5969
  }
6151
5970
 
6152
5971
  td {
6153
- border-top: 1px solid ${(props) => props.theme.colors.border + (props.colorTheme === "light" ? "60" : "40")};
5972
+ border-top: ${(props) => props.theme.styles.borderWidth}px solid
5973
+ ${(props) => props.theme.colors.border + (props.colorTheme === "light" ? "60" : "40")};
6154
5974
  padding: ${(props) => props.theme.styles.gap}px ${(props) => props.theme.styles.space}px;
6155
5975
 
6156
5976
  &.noData {
@@ -6554,25 +6374,21 @@ var TableComponent = (0, import_react27.forwardRef)(function Table({
6554
6374
  (0, import_react27.useEffect)(() => {
6555
6375
  onChangeFilterDataValue?.(dataAfterFilter);
6556
6376
  }, [onChangeFilterDataValue, dataAfterFilter]);
6557
- (0, import_react27.useImperativeHandle)(
6558
- ref,
6559
- () => {
6560
- return {
6561
- currentPage,
6562
- setCurrentPage,
6563
- pagesCount: pageCountInternal,
6564
- setCheckedItems
6565
- };
6566
- },
6567
- [currentPage, setCurrentPage, pageCountInternal, setCheckedItems]
6568
- );
6377
+ (0, import_react27.useImperativeHandle)(ref, () => {
6378
+ return {
6379
+ currentPage,
6380
+ setCurrentPage,
6381
+ pagesCount: pageCountInternal,
6382
+ setCheckedItems
6383
+ };
6384
+ }, [currentPage, setCurrentPage, pageCountInternal, setCheckedItems]);
6569
6385
  const withFooter = pageSize !== void 0 && pageCountInternal > 1;
6570
6386
  const mobileFooterBreakingPoint = mediaQuery.size700 && pageCountInternal > maximumVisiblePages / 1.4;
6571
6387
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
6572
6388
  /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
6573
6389
  Div_default,
6574
6390
  {
6575
- border: `1px solid ${theme2.colors.border}`,
6391
+ border: `${theme2.styles.borderWidth}px solid ${theme2.colors.border}`,
6576
6392
  borderRadius: theme2.styles.borderRadius * 2,
6577
6393
  overflow: !containsOverflowComponents ? "auto" : void 0,
6578
6394
  ...props,
@@ -6938,7 +6754,7 @@ var Arrow = (0, import_react28.memo)(function Arrow2(props) {
6938
6754
  }),
6939
6755
  [props, theme2]
6940
6756
  );
6941
- const borderWidth = 1;
6757
+ const borderWidth = theme2.styles.borderWidth;
6942
6758
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
6943
6759
  Div_default,
6944
6760
  {
@@ -7058,17 +6874,13 @@ var TooltipComponent = (0, import_react28.forwardRef)(function Tooltip({
7058
6874
  if (!disabled) return;
7059
6875
  closeTooltip();
7060
6876
  }, [disabled]);
7061
- (0, import_react28.useImperativeHandle)(
7062
- ref,
7063
- () => {
7064
- return {
7065
- isOpen,
7066
- open: openTooltip,
7067
- close: closeTooltip
7068
- };
7069
- },
7070
- [isOpen, openTooltip, closeTooltip]
7071
- );
6877
+ (0, import_react28.useImperativeHandle)(ref, () => {
6878
+ return {
6879
+ isOpen,
6880
+ open: openTooltip,
6881
+ close: closeTooltip
6882
+ };
6883
+ }, [isOpen, openTooltip, closeTooltip]);
7072
6884
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
7073
6885
  Div_default,
7074
6886
  {
@@ -7192,7 +7004,7 @@ TooltipComponent.item = (0, import_react28.forwardRef)(function Item({
7192
7004
  });
7193
7005
  TooltipComponent.divider = (0, import_react28.forwardRef)(function DividerComponent(props, ref) {
7194
7006
  const theme2 = (0, import_react_better_core26.useTheme)();
7195
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Divider_default.horizontal, { marginBlock: theme2.styles.gap, ...props, ref });
7007
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Divider_default.horizontal, { width: theme2.styles.borderWidth, marginBlock: theme2.styles.gap, ...props, ref });
7196
7008
  });
7197
7009
  TooltipComponent.sectionTitle = (0, import_react28.forwardRef)(function SectionTitle({ text, ...props }, ref) {
7198
7010
  const theme2 = (0, import_react_better_core26.useTheme)();
@@ -7309,16 +7121,12 @@ var TabsComponent = (0, import_react29.forwardRef)(function Tabs({ tabs, name, a
7309
7121
  );
7310
7122
  };
7311
7123
  }, []);
7312
- (0, import_react29.useImperativeHandle)(
7313
- ref,
7314
- () => {
7315
- return {
7316
- selectedTab,
7317
- selectTab: onClickTab
7318
- };
7319
- },
7320
- [selectedTab, onClickTab]
7321
- );
7124
+ (0, import_react29.useImperativeHandle)(ref, () => {
7125
+ return {
7126
+ selectedTab,
7127
+ selectTab: onClickTab
7128
+ };
7129
+ }, [selectedTab, onClickTab]);
7322
7130
  return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Div_default.column, { width: "100%", gap: theme2.styles.space, ...props, children: [
7323
7131
  /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Div_default, { position: "relative", className: "react-better-html-no-scrollbar", overflowY: "auto", children: [
7324
7132
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Div_default.row, { position: "relative", width: "fit-content", gap: tabsGap, userSelect: "none", children: tabs.map((tab) => {
@@ -7332,7 +7140,7 @@ var TabsComponent = (0, import_react29.forwardRef)(function Tabs({ tabs, name, a
7332
7140
  borderRadius: style === "box" ? theme2.styles.borderRadius : void 0,
7333
7141
  borderTopLeftRadius: style === "borderRadiusTop" ? theme2.styles.borderRadius : void 0,
7334
7142
  borderTopRightRadius: style === "borderRadiusTop" ? theme2.styles.borderRadius : void 0,
7335
- border: style === "box" ? `1px solid ${selected ? "transparent" : theme2.colors.border}` : void 0,
7143
+ border: style === "box" ? `${theme2.styles.borderWidth}px solid ${selected ? "transparent" : theme2.colors.border}` : void 0,
7336
7144
  filterHover: colorTheme === "dark" ? style === "box" ? "brightness(1.2)" : "brightness(2)" : "brightness(0.9)",
7337
7145
  paddingInline: theme2.styles.space,
7338
7146
  paddingBlock: theme2.styles.gap,
@@ -7527,7 +7335,7 @@ var FoldableComponent = (0, import_react30.forwardRef)(function Foldable({
7527
7335
  ]
7528
7336
  }
7529
7337
  ),
7530
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Div_default, { height: isOpen ? 1 : 0, opacity: isOpen ? 1 : 0, transition: theme2.styles.transition, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Divider_default.horizontal, {}) }),
7338
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Div_default, { height: isOpen ? 1 : 0, opacity: isOpen ? 1 : 0, transition: theme2.styles.transition, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Divider_default.horizontal, { width: theme2.styles.borderWidth }) }),
7531
7339
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7532
7340
  Div_default,
7533
7341
  {
@@ -7548,7 +7356,7 @@ FoldableComponent.box = (0, import_react30.forwardRef)(function Box3({ ...props
7548
7356
  FoldableComponent,
7549
7357
  {
7550
7358
  backgroundColor: theme2.colors.backgroundContent,
7551
- border: `1px solid ${theme2.colors.border}`,
7359
+ border: `${theme2.styles.borderWidth}px solid ${theme2.colors.border}`,
7552
7360
  borderRadius: theme2.styles.borderRadius,
7553
7361
  headerPaddingBlock: (theme2.styles.gap + theme2.styles.space) / 2,
7554
7362
  headerPaddingInline: theme2.styles.space,
@@ -7823,7 +7631,7 @@ var SideMenuComponent = function SideMenu({
7823
7631
  top: topSpace,
7824
7632
  left: 0,
7825
7633
  backgroundColor: readyBackgroundColor,
7826
- borderRight: `solid 1px ${theme2.colors.border}`,
7634
+ borderRight: `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}`,
7827
7635
  transform: !mediaQuery.size1000 || sideMenuIsOpenMobile ? "translateX(0)" : "translateX(-100%)",
7828
7636
  paddingTop: paddingTop ?? (logoAssetName || logoUrl ? theme2.styles.gap : theme2.styles.space),
7829
7637
  transition: mediaQuery.size1000 ? !isCollapsed ? `transform ${theme2.styles.transition}` : "none" : theme2.styles.transition,
@@ -7891,7 +7699,7 @@ var SideMenuComponent = function SideMenu({
7891
7699
  readyBottomItems && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
7892
7700
  Div_default.column,
7893
7701
  {
7894
- borderTop: mediaQuery.size1000 ? `solid 1px ${theme2.colors.border}` : void 0,
7702
+ borderTop: mediaQuery.size1000 ? `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}` : void 0,
7895
7703
  gap: theme2.styles.gap / 2,
7896
7704
  marginTop: "auto",
7897
7705
  paddingTop: mediaQuery.size1000 ? theme2.styles.space : void 0,
@@ -7913,7 +7721,7 @@ var SideMenuComponent = function SideMenu({
7913
7721
  isCollapsable && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
7914
7722
  Div_default,
7915
7723
  {
7916
- borderTop: `solid 1px ${theme2.colors.border}`,
7724
+ borderTop: `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}`,
7917
7725
  marginTop: !readyBottomItems ? "auto" : void 0,
7918
7726
  paddingInline: theme2.styles.space,
7919
7727
  paddingBlock: theme2.styles.space,
@@ -7951,7 +7759,7 @@ var SideMenuComponent = function SideMenu({
7951
7759
  top: theme2.styles.space,
7952
7760
  left: "100%",
7953
7761
  backgroundColor: readyBackgroundColor,
7954
- border: `solid 1px ${theme2.colors.border}`,
7762
+ border: `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}`,
7955
7763
  borderLeft: "none",
7956
7764
  borderTopRightRadius: theme2.styles.borderRadius,
7957
7765
  borderBottomRightRadius: theme2.styles.borderRadius,