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.mjs CHANGED
@@ -17,7 +17,9 @@ import {
17
17
  useBooleanState as useBooleanState9,
18
18
  useDebounceState as useDebounceState3,
19
19
  loaderControls,
20
- colorThemeControls as colorThemeControls2
20
+ colorThemeControls as colorThemeControls2,
21
+ generateApi,
22
+ generateEventEmitter
21
23
  } from "react-better-core";
22
24
 
23
25
  // src/components/BetterHtmlProvider.tsx
@@ -888,7 +890,7 @@ function useComponentInputFieldDateProps(props, holderRef, disabled) {
888
890
  );
889
891
  const insideInputFieldComponentProps = useMemo(
890
892
  () => ({
891
- border: `1px solid ${isFocused ? theme2.colors.primary : theme2.colors.border}`,
893
+ border: `${theme2.styles.borderWidth}px solid ${isFocused ? theme2.colors.primary : theme2.colors.border}`,
892
894
  borderTop: "none",
893
895
  opacity: !isOpen ? 0 : void 0,
894
896
  pointerEvents: !isOpen ? "none" : void 0,
@@ -1409,7 +1411,7 @@ Image.profileImage = forwardRef3(function ProfileImage({ size = 40, letters, let
1409
1411
  Div_default.row,
1410
1412
  {
1411
1413
  backgroundColor: backgroundColor ?? theme2.colors.backgroundSecondary,
1412
- border: `solid 1px ${theme2.colors.border}`,
1414
+ border: `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}`,
1413
1415
  borderRadius: 999,
1414
1416
  alignItems: "center",
1415
1417
  justifyContent: "center",
@@ -1424,7 +1426,7 @@ Image.profileImage = forwardRef3(function ProfileImage({ size = 40, letters, let
1424
1426
  {
1425
1427
  width: size,
1426
1428
  height: size,
1427
- border: `solid 1px ${theme2.colors.border}`,
1429
+ border: `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}`,
1428
1430
  borderRadius: 999,
1429
1431
  objectFit: "cover",
1430
1432
  ref,
@@ -1722,7 +1724,7 @@ DivComponent.box = forwardRef6(function Box({
1722
1724
  {
1723
1725
  color: isActive ? theme2.colors.base : void 0,
1724
1726
  backgroundColor: isActive ? readyActiveColor : theme2.colors.backgroundContent,
1725
- border: `1px solid ${isActive ? readyActiveColor : theme2.colors.border}`,
1727
+ border: `${theme2.styles.borderWidth}px solid ${isActive ? readyActiveColor : theme2.colors.border}`,
1726
1728
  borderRadius: theme2.styles.borderRadius,
1727
1729
  borderColorHover: withClick && !isActive ? readyActiveColor : void 0,
1728
1730
  filterHover: withClick && isActive ? "brightness(0.9)" : void 0,
@@ -1736,8 +1738,8 @@ DivComponent.box = forwardRef6(function Box({
1736
1738
  Div2,
1737
1739
  {
1738
1740
  backgroundColor: headerBackgroundColor,
1739
- borderTopLeftRadius: props.borderTopLeftRadius ?? props.borderRadius ?? theme2.styles.borderRadius - 1,
1740
- borderTopRightRadius: props.borderTopRightRadius ?? props.borderRadius ?? theme2.styles.borderRadius - 1,
1741
+ borderTopLeftRadius: props.borderTopLeftRadius ?? props.borderRadius ?? theme2.styles.borderRadius - theme2.styles.borderWidth,
1742
+ borderTopRightRadius: props.borderTopRightRadius ?? props.borderRadius ?? theme2.styles.borderRadius - theme2.styles.borderWidth,
1741
1743
  marginInline: -theme2.styles.space,
1742
1744
  marginTop: -theme2.styles.space,
1743
1745
  marginBottom: theme2.styles.space,
@@ -1764,7 +1766,7 @@ DivComponent.box = forwardRef6(function Box({
1764
1766
  marginBottom: theme2.styles.space
1765
1767
  }
1766
1768
  ),
1767
- /* @__PURE__ */ jsx6(Div2, { width: `calc(100% + ${theme2.styles.space * 2}px)`, marginLeft: -theme2.styles.space, children: /* @__PURE__ */ jsx6(Divider_default.horizontal, {}) })
1769
+ /* @__PURE__ */ jsx6(Div2, { width: `calc(100% + ${theme2.styles.space * 2}px)`, marginLeft: -theme2.styles.space, children: /* @__PURE__ */ jsx6(Divider_default.horizontal, { width: theme2.styles.borderWidth }) })
1768
1770
  ]
1769
1771
  }
1770
1772
  ),
@@ -1930,7 +1932,7 @@ var ButtonElement = styled6.button.withConfig({
1930
1932
  background-color: ${(props) => props.theme.colors.primary};
1931
1933
  border: none;
1932
1934
  border-radius: ${(props) => props.theme.styles.borderRadius}px;
1933
- 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`};
1935
+ 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`};
1934
1936
  user-select: none;
1935
1937
  flex-shrink: 0;
1936
1938
  transition: ${(props) => props.theme.styles.transition};
@@ -1952,7 +1954,7 @@ var ButtonElement = styled6.button.withConfig({
1952
1954
 
1953
1955
  &.secondary {
1954
1956
  padding-block: ${(props) => props.isSmall ? props.theme.styles.gap : (props.theme.styles.space + props.theme.styles.gap) / 2}px;
1955
- border: solid 1px ${(props) => props.theme.colors.border};
1957
+ border: solid ${(props) => props.theme.styles.borderWidth}px ${(props) => props.theme.colors.border};
1956
1958
  background-color: ${(props) => props.theme.colors.backgroundContent};
1957
1959
  background-image: none;
1958
1960
 
@@ -2428,7 +2430,7 @@ var ModalComponent = forwardRef7(function Modal({
2428
2430
  ]
2429
2431
  }
2430
2432
  ),
2431
- /* @__PURE__ */ jsx9(Divider_default.horizontal, {})
2433
+ /* @__PURE__ */ jsx9(Divider_default.horizontal, { width: theme2.styles.borderWidth })
2432
2434
  ] }) : /* @__PURE__ */ jsx9(Fragment, { children: !withoutCloseButton && /* @__PURE__ */ jsx9(Div_default, { position: "absolute", top: theme2.styles.space, right: theme2.styles.space, zIndex: 10, children: /* @__PURE__ */ jsx9(Button_default.icon, { icon: "XMark", iconColor: titleColor, onClick: onClickClose }) }) }),
2433
2435
  /* @__PURE__ */ jsx9(Div_default, { padding: title ? theme2.styles.space : void 0, children })
2434
2436
  ]
@@ -3001,8 +3003,7 @@ function BetterHtmlProviderInternal({ config, plugins, children }) {
3001
3003
  tabsWithDots,
3002
3004
  setTabsWithDots
3003
3005
  }
3004
- },
3005
- devMode: config?.devMode
3006
+ }
3006
3007
  }),
3007
3008
  [config, alerts, sideMenuIsCollapsed, sideMenuIsOpenMobile, plugins, tabGroups, tabsWithDots]
3008
3009
  );
@@ -3032,7 +3033,8 @@ function BetterHtmlProvider({ config, ...props }) {
3032
3033
  ...assets,
3033
3034
  ...config?.assets
3034
3035
  },
3035
- loaders: config?.loaders
3036
+ loaders: config?.loaders,
3037
+ devMode: config?.devMode
3036
3038
  }),
3037
3039
  [config]
3038
3040
  );
@@ -3041,8 +3043,7 @@ function BetterHtmlProvider({ config, ...props }) {
3041
3043
  app: config?.app,
3042
3044
  sideMenuIsCollapsed: config?.sideMenuIsCollapsed,
3043
3045
  sideMenuIsOpenMobile: config?.sideMenuIsOpenMobile,
3044
- components: config?.components,
3045
- devMode: config?.devMode
3046
+ components: config?.components
3046
3047
  }),
3047
3048
  [config]
3048
3049
  );
@@ -3202,12 +3203,6 @@ function findClosestNumber(numbers, target) {
3202
3203
  }
3203
3204
  return closest;
3204
3205
  }
3205
- var constructQuery = (query) => {
3206
- if (!query) return "";
3207
- return Object.entries(query).filter(([_, queryVale]) => queryVale !== void 0 && queryVale !== null).map(
3208
- ([queryName, queryVale]) => typeof queryVale === "object" ? queryVale.map((value) => `${queryName}=${value}`) : [`${queryName}=${queryVale}`]
3209
- ).flat().join("&");
3210
- };
3211
3206
 
3212
3207
  // src/utils/localStorage.ts
3213
3208
  function generateLocalStorage() {
@@ -3274,180 +3269,6 @@ function generateLocalStorage() {
3274
3269
  };
3275
3270
  }
3276
3271
 
3277
- // src/utils/logger.ts
3278
- var textColors = {
3279
- black: "#111111",
3280
- red: "#f83e4b",
3281
- green: "#5ac53a",
3282
- yellow: "#f8d770",
3283
- blue: "#3d6fdf",
3284
- magenta: "#9648eb",
3285
- cyan: "#53b2c8",
3286
- white: "#f8f8f8"
3287
- };
3288
- var backgroundColors = {
3289
- black: "#111111",
3290
- red: "#f83e4b",
3291
- green: "#5ac53a",
3292
- yellow: "#f8d770",
3293
- blue: "#3d6fdf",
3294
- magenta: "#9648eb",
3295
- cyan: "#53b2c8",
3296
- white: "#f8f8f8"
3297
- };
3298
- var logTypes = {
3299
- info: "cyan",
3300
- success: "green",
3301
- warn: "yellow",
3302
- error: "red"
3303
- };
3304
- function getCssString(options) {
3305
- const color = options.color ? textColors[options.color] : void 0;
3306
- const backgroundColor = options.backgroundColor ? backgroundColors[options.backgroundColor] : void 0;
3307
- const fontWeight = options.bold ? "bold" : "normal";
3308
- return `${color ? `color: ${color};` : ""}${backgroundColor ? `background-color: ${backgroundColor};` : ""}${fontWeight ? `font-weight: ${fontWeight};` : ""}`;
3309
- }
3310
- function logText(text, options) {
3311
- if (externalBetterHtmlContextValue?.devMode !== true) return;
3312
- console.log(`%c${text}`, getCssString(options ?? {}));
3313
- }
3314
- var log = {
3315
- ...Object.entries(logTypes).reduce(
3316
- (previousValue, [logType, color]) => {
3317
- previousValue[logType] = (text = "", bold) => {
3318
- logText(text, {
3319
- color,
3320
- bold
3321
- });
3322
- };
3323
- return previousValue;
3324
- },
3325
- {}
3326
- ),
3327
- /** @description Default log function */
3328
- log: (text, options) => {
3329
- logText(text, options);
3330
- },
3331
- /** @description Logs the value in pretty json format */
3332
- json: (jsonObject, options) => {
3333
- logText(JSON.stringify(jsonObject, null, 4), options);
3334
- },
3335
- /** @description Logs a -=-= pattern */
3336
- divider: (color) => {
3337
- logText("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-", {
3338
- color
3339
- });
3340
- },
3341
- trace: () => {
3342
- if (externalBetterHtmlContextValue?.devMode !== true) return;
3343
- console.trace();
3344
- }
3345
- };
3346
-
3347
- // src/utils/api.ts
3348
- var methodInitiateToString = {
3349
- GET: "GET request to ",
3350
- PUT: "PUT request to ",
3351
- POST: "POST request to ",
3352
- PATCH: "PATCH request to ",
3353
- DELETE: "DELETE request to ",
3354
- HEAD: "HEAD request to ",
3355
- OPTIONS: "OPTIONS request to ",
3356
- TRACE: "TRACE request to ",
3357
- CONNECT: "CONNECT request to "
3358
- };
3359
- var methodResponseToString = {
3360
- GET: "GET request from ",
3361
- PUT: "PUT request from ",
3362
- POST: "POST request from ",
3363
- PATCH: "PATCH request from ",
3364
- DELETE: "DELETE request from ",
3365
- HEAD: "HEAD request from ",
3366
- OPTIONS: "OPTIONS request from",
3367
- TRACE: "TRACE request from ",
3368
- CONNECT: "CONNECT request from"
3369
- };
3370
- function generateApi(config, apiConfig, getHeaders) {
3371
- return async function apiCall(name, payload = {}) {
3372
- if (!apiConfig[name]) {
3373
- return Promise.reject(
3374
- new Error(`Endpoint ${name.toString()} is not defined in the \`generateApi\` function.`, {
3375
- cause: "generateApi.apiConfig.missingEndpoint"
3376
- })
3377
- );
3378
- }
3379
- const baseURL = config.baseUrl;
3380
- const path = `${apiConfig[name].path}${payload.path?.length ? `/${payload.path.join("/")}` : ""}`;
3381
- const query = constructQuery(payload.query);
3382
- const url = `${baseURL}${path}${query ? `?${query}` : ""}`;
3383
- const requestHeaders = {
3384
- "Content-Type": apiConfig[name].bodyWithFormData ? "multipart/form-data" : "application/json",
3385
- ...getHeaders ? Object.entries(getHeaders).reduce((previousValue, [key, value]) => {
3386
- if (apiConfig[name].includeHeaders?.includes(key)) {
3387
- previousValue[key] = value?.();
3388
- }
3389
- return previousValue;
3390
- }, {}) : {}
3391
- };
3392
- const body = payload.body;
3393
- const bodyAsFormData = new FormData();
3394
- if (body && apiConfig[name].bodyWithFormData) {
3395
- Object.entries(body).forEach(([key, value]) => {
3396
- bodyAsFormData.append(key, value);
3397
- });
3398
- }
3399
- const readyBody = JSON.stringify((apiConfig[name].bodyWithFormData ? bodyAsFormData : body) ?? {});
3400
- log.log(`Initiate ${methodInitiateToString[apiConfig[name].method]} ${url} - ${name.toString()}`, {
3401
- color: "magenta"
3402
- });
3403
- return await call(
3404
- () => fetch(url, {
3405
- method: apiConfig[name].method,
3406
- body: apiConfig[name].method !== "GET" ? readyBody : void 0,
3407
- headers: requestHeaders
3408
- })
3409
- );
3410
- async function call(callAction) {
3411
- const response = await callAction();
3412
- const responseJson = await response.json();
3413
- log.log(`Response ${methodResponseToString[apiConfig[name].method]} ${url} - ${name.toString()}`, {
3414
- color: "blue"
3415
- });
3416
- return {
3417
- data: responseJson,
3418
- headers: response.headers,
3419
- statusCode: response.status,
3420
- statusText: response.statusText,
3421
- url: response.url,
3422
- ok: response.ok,
3423
- redirected: response.redirected
3424
- };
3425
- }
3426
- };
3427
- }
3428
-
3429
- // src/utils/eventEmitter.ts
3430
- function generateEventEmitter() {
3431
- const eventEmitter = new EventTarget();
3432
- return {
3433
- emit: (name, data) => {
3434
- const event = new CustomEvent(name.toString(), {
3435
- detail: data
3436
- });
3437
- eventEmitter.dispatchEvent(event);
3438
- },
3439
- listen: (name, callback) => {
3440
- const listener = (event) => {
3441
- callback?.(event.detail);
3442
- };
3443
- eventEmitter.addEventListener(name.toString(), listener);
3444
- return () => {
3445
- eventEmitter.removeEventListener(name.toString(), listener);
3446
- };
3447
- }
3448
- };
3449
- }
3450
-
3451
3272
  // src/components/PageHolder.tsx
3452
3273
  import { forwardRef as forwardRef8, memo as memo13 } from "react";
3453
3274
  import { useTheme as useTheme14 } from "react-better-core";
@@ -3601,7 +3422,7 @@ ChipComponent.colored = forwardRef9(function Colored({ color, withWhiteBackgroun
3601
3422
  {
3602
3423
  color: colorTheme === "light" ? darkenColor(readyColor, 0.7) : lightenColor(readyColor, 0.7),
3603
3424
  backgroundColor: readyColor + "40",
3604
- border: `1px solid ${readyColor}`,
3425
+ border: `${theme2.styles.borderWidth}px solid ${readyColor}`,
3605
3426
  ref,
3606
3427
  ...props
3607
3428
  }
@@ -3934,7 +3755,7 @@ var DropdownComponent = forwardRef10(function Dropdown({
3934
3755
  {
3935
3756
  width: "100%",
3936
3757
  backgroundColor: theme2.colors.backgroundContent,
3937
- border: `solid 1px ${theme2.colors.border}`,
3758
+ border: `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}`,
3938
3759
  borderColor: isFocused ? theme2.colors.primary : void 0,
3939
3760
  borderBottom: "none",
3940
3761
  borderTopLeftRadius: theme2.styles.borderRadius,
@@ -3981,7 +3802,7 @@ var DropdownComponent = forwardRef10(function Dropdown({
3981
3802
  width: "100%",
3982
3803
  maxHeight: 300,
3983
3804
  backgroundColor: theme2.colors.backgroundContent,
3984
- border: `1px solid ${isFocused ? theme2.colors.primary : theme2.colors.border}`,
3805
+ border: `${theme2.styles.borderWidth}px solid ${isFocused ? theme2.colors.primary : theme2.colors.border}`,
3985
3806
  borderTop: "none",
3986
3807
  borderBottomLeftRadius: theme2.styles.borderRadius,
3987
3808
  borderBottomRightRadius: theme2.styles.borderRadius,
@@ -4247,7 +4068,7 @@ function Calendar({ value, minDate, maxDate, onChange }) {
4247
4068
  justifyContent: "center",
4248
4069
  backgroundColor: isSelected ? theme2.colors.primary : theme2.colors.backgroundContent,
4249
4070
  filterHover: day && !isDisabled ? "brightness(0.9)" : void 0,
4250
- border: `1px solid ${isToday ? theme2.colors.primary : theme2.colors.primary + "00"}`,
4071
+ border: `${theme2.styles.borderWidth}px solid ${isToday ? theme2.colors.primary : theme2.colors.primary + "00"}`,
4251
4072
  borderRadius: theme2.styles.borderRadius / 2,
4252
4073
  padding: theme2.styles.space / 2,
4253
4074
  cursor: day ? !isDisabled ? "pointer" : "not-allowed" : void 0,
@@ -4324,7 +4145,7 @@ var InputElement = styled10.input.withConfig({
4324
4145
  line-height: 20px;
4325
4146
  color: ${(props) => props.theme.colors.textPrimary};
4326
4147
  background: ${(props) => props.theme.colors.backgroundContent};
4327
- border: 1px solid ${(props) => props.theme.colors.border};
4148
+ border: ${(props) => props.theme.styles.borderWidth}px solid ${(props) => props.theme.colors.border};
4328
4149
  border-radius: ${(props) => props.theme.styles.borderRadius}px;
4329
4150
  border-top-left-radius: ${(props) => props.withPrefix ? 0 : void 0};
4330
4151
  border-bottom-left-radius: ${(props) => props.withPrefix ? 0 : void 0};
@@ -4403,7 +4224,7 @@ var InputElement = styled10.input.withConfig({
4403
4224
  }
4404
4225
 
4405
4226
  &.react-better-html-dropdown {
4406
- padding-right: ${(props) => props.theme.styles.space + 16 + props.theme.styles.space - 1}px;
4227
+ padding-right: ${(props) => props.theme.styles.space + 16 + props.theme.styles.space - props.theme.styles.borderWidth}px;
4407
4228
 
4408
4229
  &.react-better-html-dropdown-multiselect {
4409
4230
  border-top: none;
@@ -4447,12 +4268,12 @@ var TextareaElement = styled10.textarea.withConfig({
4447
4268
  line-height: 20px;
4448
4269
  color: ${(props) => props.theme.colors.textPrimary};
4449
4270
  background: ${(props) => props.theme.colors.backgroundContent};
4450
- border: 1px solid ${(props) => props.theme.colors.border};
4271
+ border: ${(props) => props.theme.styles.borderWidth}px solid ${(props) => props.theme.colors.border};
4451
4272
  border-radius: ${(props) => props.theme.styles.borderRadius}px;
4452
4273
  outline: none;
4453
4274
  padding: ${(props) => `${(props.theme.styles.gap + props.theme.styles.space) / 2}px ${props.theme.styles.space}px`};
4454
- padding-left: ${(props) => props.withLeftIcon ? `${props.theme.styles.space + 16 + props.theme.styles.space - 1}px` : void 0};
4455
- padding-right: ${(props) => props.withRightIcon ? `${props.theme.styles.space + 16 + props.theme.styles.space - 1}px` : void 0};
4275
+ padding-left: ${(props) => props.withLeftIcon ? `${props.theme.styles.space + 16 + props.theme.styles.space - props.theme.styles.borderWidth}px` : void 0};
4276
+ padding-right: ${(props) => props.withRightIcon ? `${props.theme.styles.space + 16 + props.theme.styles.space - props.theme.styles.borderWidth}px` : void 0};
4456
4277
  resize: vertical;
4457
4278
  transition: border-color ${(props) => props.theme.styles.transition};
4458
4279
 
@@ -4538,7 +4359,7 @@ var InputFieldComponent = forwardRef11(function InputField({
4538
4359
  {
4539
4360
  alignItems: "center",
4540
4361
  justifyContent: "center",
4541
- border: `1px solid ${theme2.colors.border}`,
4362
+ border: `${theme2.styles.borderWidth}px solid ${theme2.colors.border}`,
4542
4363
  borderRight: "none",
4543
4364
  backgroundColor: prefixBackgroundColor ?? (colorTheme === "light" ? darkenColor2(theme2.colors.backgroundContent, 0.03) : lightenColor2(theme2.colors.backgroundContent, 0.1)),
4544
4365
  borderTopLeftRadius: theme2.styles.borderRadius,
@@ -4555,8 +4376,8 @@ var InputFieldComponent = forwardRef11(function InputField({
4555
4376
  {
4556
4377
  name: leftIcon,
4557
4378
  position: "absolute",
4558
- top: (props.type === "date" || props.type === "time" || props.type === "datetime-local" ? 48 : 46) / 2,
4559
- left: theme2.styles.space + 1,
4379
+ top: ((props.type === "date" || props.type === "time" || props.type === "datetime-local" ? 48 : 44) + theme2.styles.borderWidth * 2) / 2,
4380
+ left: theme2.styles.space + theme2.styles.borderWidth,
4560
4381
  transform: "translateY(-50%)",
4561
4382
  pointerEvents: "none",
4562
4383
  zIndex: leftIconZIndex
@@ -4587,8 +4408,8 @@ var InputFieldComponent = forwardRef11(function InputField({
4587
4408
  {
4588
4409
  icon: rightIcon,
4589
4410
  position: "absolute",
4590
- top: 46 / 2,
4591
- right: theme2.styles.space + 1 - theme2.styles.space / 2,
4411
+ top: (44 + theme2.styles.borderWidth * 2) / 2,
4412
+ right: theme2.styles.space + theme2.styles.borderWidth - theme2.styles.space / 2,
4592
4413
  transform: "translateY(-50%)",
4593
4414
  onClick: onClickRightIcon
4594
4415
  }
@@ -4597,8 +4418,8 @@ var InputFieldComponent = forwardRef11(function InputField({
4597
4418
  {
4598
4419
  name: rightIcon,
4599
4420
  position: "absolute",
4600
- top: 46 / 2,
4601
- right: theme2.styles.space + 1,
4421
+ top: (44 + theme2.styles.borderWidth * 2) / 2,
4422
+ right: theme2.styles.space + theme2.styles.borderWidth,
4602
4423
  transform: "translateY(-50%)",
4603
4424
  pointerEvents: "none"
4604
4425
  }
@@ -4611,7 +4432,7 @@ var InputFieldComponent = forwardRef11(function InputField({
4611
4432
  {
4612
4433
  alignItems: "center",
4613
4434
  justifyContent: "center",
4614
- border: `1px solid ${theme2.colors.border}`,
4435
+ border: `${theme2.styles.borderWidth}px solid ${theme2.colors.border}`,
4615
4436
  borderLeft: "none",
4616
4437
  backgroundColor: suffixBackgroundColor ?? (colorTheme === "light" ? darkenColor2(theme2.colors.backgroundContent, 0.03) : lightenColor2(theme2.colors.backgroundContent, 0.1)),
4617
4438
  borderTopRightRadius: theme2.styles.borderRadius,
@@ -4668,8 +4489,8 @@ InputFieldComponent.multiline = forwardRef11(function Multiline({
4668
4489
  {
4669
4490
  name: leftIcon,
4670
4491
  position: "absolute",
4671
- top: 46 / 2,
4672
- left: theme2.styles.space + 1,
4492
+ top: (44 + theme2.styles.borderWidth * 2) / 2,
4493
+ left: theme2.styles.space + theme2.styles.borderWidth,
4673
4494
  transform: "translateY(-50%)",
4674
4495
  pointerEvents: "none"
4675
4496
  }
@@ -4697,8 +4518,8 @@ InputFieldComponent.multiline = forwardRef11(function Multiline({
4697
4518
  {
4698
4519
  icon: rightIcon,
4699
4520
  position: "absolute",
4700
- top: 46 / 2,
4701
- right: theme2.styles.space + 1 - theme2.styles.space / 2,
4521
+ top: (44 + theme2.styles.borderWidth * 2) / 2,
4522
+ right: theme2.styles.space + theme2.styles.borderWidth - theme2.styles.space / 2,
4702
4523
  transform: "translateY(-50%)",
4703
4524
  onClick: onClickRightIcon
4704
4525
  }
@@ -4707,8 +4528,8 @@ InputFieldComponent.multiline = forwardRef11(function Multiline({
4707
4528
  {
4708
4529
  name: rightIcon,
4709
4530
  position: "absolute",
4710
- top: 46 / 2,
4711
- right: theme2.styles.space + 1,
4531
+ top: (44 + theme2.styles.borderWidth * 2) / 2,
4532
+ right: theme2.styles.space + theme2.styles.borderWidth,
4712
4533
  transform: "translateY(-50%)",
4713
4534
  pointerEvents: "none"
4714
4535
  }
@@ -5375,7 +5196,7 @@ var InputElement2 = styled11.input.withConfig({
5375
5196
  width: ${componentSize}px;
5376
5197
  height: ${componentSize}px;
5377
5198
  background-color: ${(props) => props.theme.colors.backgroundContent};
5378
- border: 1px solid ${(props) => props.theme.colors.border};
5199
+ border: ${(props) => props.theme.styles.borderWidth}px solid ${(props) => props.theme.colors.border};
5379
5200
  border-radius: ${(props) => props.theme.styles.borderRadius / 2}px;
5380
5201
  cursor: pointer;
5381
5202
  transition: ${(props) => props.theme.styles.transition};
@@ -5691,7 +5512,7 @@ var FormComponent = forwardRef13(function Form({
5691
5512
  return /* @__PURE__ */ jsx19(Div_default, { width: "100%", ...props, children: /* @__PURE__ */ jsxs16("form", { name, onSubmit: onSubmit ?? form?.onSubmit, ref, children: [
5692
5513
  gap !== void 0 || withDividers ? /* @__PURE__ */ jsx19(Div_default.column, { gap: gap ?? (withDividers ? theme2.styles.space : theme2.styles.gap), children: withDividers ? Children.toArray(children).map((child, index) => /* @__PURE__ */ jsxs16(Fragment5, { children: [
5693
5514
  child,
5694
- index < Children.toArray(children).length - 1 && /* @__PURE__ */ jsx19(Divider_default.horizontal, {})
5515
+ index < Children.toArray(children).length - 1 && /* @__PURE__ */ jsx19(Divider_default.horizontal, { width: theme2.styles.borderWidth })
5695
5516
  ] }, index)) : children }) : children,
5696
5517
  submitButtonText && /* @__PURE__ */ jsxs16(
5697
5518
  Div_default.row,
@@ -6021,45 +5842,45 @@ var TableStyledComponent = styled12.table.withConfig({
6021
5842
 
6022
5843
  thead {
6023
5844
  tr:first-child {
6024
- border-top-left-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
6025
- border-top-right-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
5845
+ border-top-left-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - props.theme.styles.borderWidth}px` : void 0};
5846
+ border-top-right-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - props.theme.styles.borderWidth}px` : void 0};
6026
5847
 
6027
5848
  th:first-child {
6028
- border-top-left-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
5849
+ border-top-left-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - props.theme.styles.borderWidth}px` : void 0};
6029
5850
  }
6030
5851
 
6031
5852
  th:last-child {
6032
- border-top-right-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
5853
+ border-top-right-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - props.theme.styles.borderWidth}px` : void 0};
6033
5854
  }
6034
5855
  }
6035
5856
  }
6036
5857
 
6037
5858
  tbody {
6038
5859
  tr:last-child {
6039
- border-bottom-left-radius: ${(props) => props.containsOverflowComponents && !props.withFooter ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
6040
- border-bottom-right-radius: ${(props) => props.containsOverflowComponents && !props.withFooter ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
5860
+ border-bottom-left-radius: ${(props) => props.containsOverflowComponents && !props.withFooter ? `${props.theme.styles.borderRadius * 2 - props.theme.styles.borderWidth}px` : void 0};
5861
+ border-bottom-right-radius: ${(props) => props.containsOverflowComponents && !props.withFooter ? `${props.theme.styles.borderRadius * 2 - props.theme.styles.borderWidth}px` : void 0};
6041
5862
 
6042
5863
  td:first-child {
6043
- border-bottom-left-radius: ${(props) => props.containsOverflowComponents && !props.withFooter ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
5864
+ border-bottom-left-radius: ${(props) => props.containsOverflowComponents && !props.withFooter ? `${props.theme.styles.borderRadius * 2 - props.theme.styles.borderWidth}px` : void 0};
6044
5865
  }
6045
5866
 
6046
5867
  td:last-child {
6047
- border-bottom-right-radius: ${(props) => props.containsOverflowComponents && !props.withFooter ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
5868
+ border-bottom-right-radius: ${(props) => props.containsOverflowComponents && !props.withFooter ? `${props.theme.styles.borderRadius * 2 - props.theme.styles.borderWidth}px` : void 0};
6048
5869
  }
6049
5870
  }
6050
5871
  }
6051
5872
 
6052
5873
  tfoot {
6053
5874
  tr:last-child {
6054
- border-bottom-left-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
6055
- border-bottom-right-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
5875
+ border-bottom-left-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - props.theme.styles.borderWidth}px` : void 0};
5876
+ border-bottom-right-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - props.theme.styles.borderWidth}px` : void 0};
6056
5877
 
6057
5878
  td:first-child {
6058
- border-bottom-left-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
5879
+ border-bottom-left-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - props.theme.styles.borderWidth}px` : void 0};
6059
5880
  }
6060
5881
 
6061
5882
  td:last-child {
6062
- border-bottom-right-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - 1}px` : void 0};
5883
+ border-bottom-right-radius: ${(props) => props.containsOverflowComponents ? `${props.theme.styles.borderRadius * 2 - props.theme.styles.borderWidth}px` : void 0};
6063
5884
  }
6064
5885
  }
6065
5886
  }
@@ -6109,7 +5930,8 @@ var TableStyledComponent = styled12.table.withConfig({
6109
5930
  }
6110
5931
 
6111
5932
  td {
6112
- border-top: 1px solid ${(props) => props.theme.colors.border + (props.colorTheme === "light" ? "60" : "40")};
5933
+ border-top: ${(props) => props.theme.styles.borderWidth}px solid
5934
+ ${(props) => props.theme.colors.border + (props.colorTheme === "light" ? "60" : "40")};
6113
5935
  padding: ${(props) => props.theme.styles.gap}px ${(props) => props.theme.styles.space}px;
6114
5936
 
6115
5937
  &.noData {
@@ -6513,25 +6335,21 @@ var TableComponent = forwardRef15(function Table({
6513
6335
  useEffect12(() => {
6514
6336
  onChangeFilterDataValue?.(dataAfterFilter);
6515
6337
  }, [onChangeFilterDataValue, dataAfterFilter]);
6516
- useImperativeHandle2(
6517
- ref,
6518
- () => {
6519
- return {
6520
- currentPage,
6521
- setCurrentPage,
6522
- pagesCount: pageCountInternal,
6523
- setCheckedItems
6524
- };
6525
- },
6526
- [currentPage, setCurrentPage, pageCountInternal, setCheckedItems]
6527
- );
6338
+ useImperativeHandle2(ref, () => {
6339
+ return {
6340
+ currentPage,
6341
+ setCurrentPage,
6342
+ pagesCount: pageCountInternal,
6343
+ setCheckedItems
6344
+ };
6345
+ }, [currentPage, setCurrentPage, pageCountInternal, setCheckedItems]);
6528
6346
  const withFooter = pageSize !== void 0 && pageCountInternal > 1;
6529
6347
  const mobileFooterBreakingPoint = mediaQuery.size700 && pageCountInternal > maximumVisiblePages / 1.4;
6530
6348
  return /* @__PURE__ */ jsxs20(Fragment7, { children: [
6531
6349
  /* @__PURE__ */ jsx23(
6532
6350
  Div_default,
6533
6351
  {
6534
- border: `1px solid ${theme2.colors.border}`,
6352
+ border: `${theme2.styles.borderWidth}px solid ${theme2.colors.border}`,
6535
6353
  borderRadius: theme2.styles.borderRadius * 2,
6536
6354
  overflow: !containsOverflowComponents ? "auto" : void 0,
6537
6355
  ...props,
@@ -6897,7 +6715,7 @@ var Arrow = memo24(function Arrow2(props) {
6897
6715
  }),
6898
6716
  [props, theme2]
6899
6717
  );
6900
- const borderWidth = 1;
6718
+ const borderWidth = theme2.styles.borderWidth;
6901
6719
  return /* @__PURE__ */ jsx24(
6902
6720
  Div_default,
6903
6721
  {
@@ -7017,17 +6835,13 @@ var TooltipComponent = forwardRef16(function Tooltip({
7017
6835
  if (!disabled) return;
7018
6836
  closeTooltip();
7019
6837
  }, [disabled]);
7020
- useImperativeHandle3(
7021
- ref,
7022
- () => {
7023
- return {
7024
- isOpen,
7025
- open: openTooltip,
7026
- close: closeTooltip
7027
- };
7028
- },
7029
- [isOpen, openTooltip, closeTooltip]
7030
- );
6838
+ useImperativeHandle3(ref, () => {
6839
+ return {
6840
+ isOpen,
6841
+ open: openTooltip,
6842
+ close: closeTooltip
6843
+ };
6844
+ }, [isOpen, openTooltip, closeTooltip]);
7031
6845
  return /* @__PURE__ */ jsxs21(
7032
6846
  Div_default,
7033
6847
  {
@@ -7151,7 +6965,7 @@ TooltipComponent.item = forwardRef16(function Item({
7151
6965
  });
7152
6966
  TooltipComponent.divider = forwardRef16(function DividerComponent(props, ref) {
7153
6967
  const theme2 = useTheme26();
7154
- return /* @__PURE__ */ jsx24(Divider_default.horizontal, { marginBlock: theme2.styles.gap, ...props, ref });
6968
+ return /* @__PURE__ */ jsx24(Divider_default.horizontal, { width: theme2.styles.borderWidth, marginBlock: theme2.styles.gap, ...props, ref });
7155
6969
  });
7156
6970
  TooltipComponent.sectionTitle = forwardRef16(function SectionTitle({ text, ...props }, ref) {
7157
6971
  const theme2 = useTheme26();
@@ -7268,16 +7082,12 @@ var TabsComponent = forwardRef17(function Tabs({ tabs, name, accentColor, style
7268
7082
  );
7269
7083
  };
7270
7084
  }, []);
7271
- useImperativeHandle4(
7272
- ref,
7273
- () => {
7274
- return {
7275
- selectedTab,
7276
- selectTab: onClickTab
7277
- };
7278
- },
7279
- [selectedTab, onClickTab]
7280
- );
7085
+ useImperativeHandle4(ref, () => {
7086
+ return {
7087
+ selectedTab,
7088
+ selectTab: onClickTab
7089
+ };
7090
+ }, [selectedTab, onClickTab]);
7281
7091
  return /* @__PURE__ */ jsxs22(Div_default.column, { width: "100%", gap: theme2.styles.space, ...props, children: [
7282
7092
  /* @__PURE__ */ jsxs22(Div_default, { position: "relative", className: "react-better-html-no-scrollbar", overflowY: "auto", children: [
7283
7093
  /* @__PURE__ */ jsx25(Div_default.row, { position: "relative", width: "fit-content", gap: tabsGap, userSelect: "none", children: tabs.map((tab) => {
@@ -7291,7 +7101,7 @@ var TabsComponent = forwardRef17(function Tabs({ tabs, name, accentColor, style
7291
7101
  borderRadius: style === "box" ? theme2.styles.borderRadius : void 0,
7292
7102
  borderTopLeftRadius: style === "borderRadiusTop" ? theme2.styles.borderRadius : void 0,
7293
7103
  borderTopRightRadius: style === "borderRadiusTop" ? theme2.styles.borderRadius : void 0,
7294
- border: style === "box" ? `1px solid ${selected ? "transparent" : theme2.colors.border}` : void 0,
7104
+ border: style === "box" ? `${theme2.styles.borderWidth}px solid ${selected ? "transparent" : theme2.colors.border}` : void 0,
7295
7105
  filterHover: colorTheme === "dark" ? style === "box" ? "brightness(1.2)" : "brightness(2)" : "brightness(0.9)",
7296
7106
  paddingInline: theme2.styles.space,
7297
7107
  paddingBlock: theme2.styles.gap,
@@ -7486,7 +7296,7 @@ var FoldableComponent = forwardRef18(function Foldable({
7486
7296
  ]
7487
7297
  }
7488
7298
  ),
7489
- /* @__PURE__ */ jsx26(Div_default, { height: isOpen ? 1 : 0, opacity: isOpen ? 1 : 0, transition: theme2.styles.transition, children: /* @__PURE__ */ jsx26(Divider_default.horizontal, {}) }),
7299
+ /* @__PURE__ */ jsx26(Div_default, { height: isOpen ? 1 : 0, opacity: isOpen ? 1 : 0, transition: theme2.styles.transition, children: /* @__PURE__ */ jsx26(Divider_default.horizontal, { width: theme2.styles.borderWidth }) }),
7490
7300
  /* @__PURE__ */ jsx26(
7491
7301
  Div_default,
7492
7302
  {
@@ -7507,7 +7317,7 @@ FoldableComponent.box = forwardRef18(function Box3({ ...props }, ref) {
7507
7317
  FoldableComponent,
7508
7318
  {
7509
7319
  backgroundColor: theme2.colors.backgroundContent,
7510
- border: `1px solid ${theme2.colors.border}`,
7320
+ border: `${theme2.styles.borderWidth}px solid ${theme2.colors.border}`,
7511
7321
  borderRadius: theme2.styles.borderRadius,
7512
7322
  headerPaddingBlock: (theme2.styles.gap + theme2.styles.space) / 2,
7513
7323
  headerPaddingInline: theme2.styles.space,
@@ -7787,7 +7597,7 @@ var SideMenuComponent = function SideMenu({
7787
7597
  top: topSpace,
7788
7598
  left: 0,
7789
7599
  backgroundColor: readyBackgroundColor,
7790
- borderRight: `solid 1px ${theme2.colors.border}`,
7600
+ borderRight: `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}`,
7791
7601
  transform: !mediaQuery.size1000 || sideMenuIsOpenMobile ? "translateX(0)" : "translateX(-100%)",
7792
7602
  paddingTop: paddingTop ?? (logoAssetName || logoUrl ? theme2.styles.gap : theme2.styles.space),
7793
7603
  transition: mediaQuery.size1000 ? !isCollapsed ? `transform ${theme2.styles.transition}` : "none" : theme2.styles.transition,
@@ -7855,7 +7665,7 @@ var SideMenuComponent = function SideMenu({
7855
7665
  readyBottomItems && /* @__PURE__ */ jsx27(
7856
7666
  Div_default.column,
7857
7667
  {
7858
- borderTop: mediaQuery.size1000 ? `solid 1px ${theme2.colors.border}` : void 0,
7668
+ borderTop: mediaQuery.size1000 ? `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}` : void 0,
7859
7669
  gap: theme2.styles.gap / 2,
7860
7670
  marginTop: "auto",
7861
7671
  paddingTop: mediaQuery.size1000 ? theme2.styles.space : void 0,
@@ -7877,7 +7687,7 @@ var SideMenuComponent = function SideMenu({
7877
7687
  isCollapsable && /* @__PURE__ */ jsx27(
7878
7688
  Div_default,
7879
7689
  {
7880
- borderTop: `solid 1px ${theme2.colors.border}`,
7690
+ borderTop: `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}`,
7881
7691
  marginTop: !readyBottomItems ? "auto" : void 0,
7882
7692
  paddingInline: theme2.styles.space,
7883
7693
  paddingBlock: theme2.styles.space,
@@ -7915,7 +7725,7 @@ var SideMenuComponent = function SideMenu({
7915
7725
  top: theme2.styles.space,
7916
7726
  left: "100%",
7917
7727
  backgroundColor: readyBackgroundColor,
7918
- border: `solid 1px ${theme2.colors.border}`,
7728
+ border: `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}`,
7919
7729
  borderLeft: "none",
7920
7730
  borderTopRightRadius: theme2.styles.borderRadius,
7921
7731
  borderBottomRightRadius: theme2.styles.borderRadius,