react-better-html 1.1.242 → 1.1.244
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 +114 -86
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +139 -111
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1901,6 +1901,75 @@ import {
|
|
|
1901
1901
|
} from "react-better-core";
|
|
1902
1902
|
import styled6, { css } from "styled-components";
|
|
1903
1903
|
|
|
1904
|
+
// src/utils/variableFunctions.ts
|
|
1905
|
+
var checkBetterCoreContextValue = (value, functionsName) => {
|
|
1906
|
+
if (value === void 0) {
|
|
1907
|
+
throw new Error(
|
|
1908
|
+
`\`${functionsName}()\` must be used within a \`<BetterCoreProvider>\`. Make sure to add one at the root of your component tree.`
|
|
1909
|
+
);
|
|
1910
|
+
}
|
|
1911
|
+
return value !== void 0;
|
|
1912
|
+
};
|
|
1913
|
+
var checkBetterHtmlContextValue = (value, functionsName) => {
|
|
1914
|
+
if (value === void 0) {
|
|
1915
|
+
throw new Error(
|
|
1916
|
+
`\`${functionsName}()\` must be used within a \`<BetterHtmlProvider>\`. Make sure to add one at the root of your component tree.`
|
|
1917
|
+
);
|
|
1918
|
+
}
|
|
1919
|
+
return value !== void 0;
|
|
1920
|
+
};
|
|
1921
|
+
var alertControls = {
|
|
1922
|
+
createAlert: (alert) => {
|
|
1923
|
+
if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "alertControls.createAlert"))
|
|
1924
|
+
return void 0;
|
|
1925
|
+
const readyAlert = {
|
|
1926
|
+
id: crypto.randomUUID(),
|
|
1927
|
+
...alert
|
|
1928
|
+
};
|
|
1929
|
+
externalBetterHtmlContextValue.setAlerts((oldValue) => [...oldValue, readyAlert]);
|
|
1930
|
+
return readyAlert;
|
|
1931
|
+
},
|
|
1932
|
+
removeAlert: (alertId) => {
|
|
1933
|
+
if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "alertControls.removeAlert")) return;
|
|
1934
|
+
externalBetterHtmlContextValue.setAlerts((oldValue) => oldValue.filter((alert) => alert.id !== alertId));
|
|
1935
|
+
}
|
|
1936
|
+
};
|
|
1937
|
+
var sideMenuControls = {
|
|
1938
|
+
expand: () => {
|
|
1939
|
+
if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "sideMenuControls.expand")) return;
|
|
1940
|
+
externalBetterHtmlContextValue.setSideMenuIsCollapsed.setFalse();
|
|
1941
|
+
},
|
|
1942
|
+
collapse: () => {
|
|
1943
|
+
if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "sideMenuControls.collapse")) return;
|
|
1944
|
+
externalBetterHtmlContextValue.setSideMenuIsCollapsed.setTrue();
|
|
1945
|
+
},
|
|
1946
|
+
toggleExpanded: () => {
|
|
1947
|
+
if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "sideMenuControls.toggleExpanded")) return;
|
|
1948
|
+
externalBetterHtmlContextValue.setSideMenuIsCollapsed.toggle();
|
|
1949
|
+
},
|
|
1950
|
+
open: () => {
|
|
1951
|
+
if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "sideMenuControls.open")) return;
|
|
1952
|
+
externalBetterHtmlContextValue.setSideMenuIsOpenMobile.setTrue();
|
|
1953
|
+
},
|
|
1954
|
+
close: () => {
|
|
1955
|
+
if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "sideMenuControls.close")) return;
|
|
1956
|
+
externalBetterHtmlContextValue.setSideMenuIsOpenMobile.setFalse();
|
|
1957
|
+
},
|
|
1958
|
+
toggleOpened: () => {
|
|
1959
|
+
if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "sideMenuControls.toggleOpened")) return;
|
|
1960
|
+
externalBetterHtmlContextValue.setSideMenuIsOpenMobile.toggle();
|
|
1961
|
+
}
|
|
1962
|
+
};
|
|
1963
|
+
var filterHover = () => {
|
|
1964
|
+
if (!checkBetterCoreContextValue(externalBetterCoreContextValue, "filterHover")) return void 0;
|
|
1965
|
+
return {
|
|
1966
|
+
z05: externalBetterCoreContextValue.colorTheme === "dark" ? "brightness(1.2)" : "brightness(0.95)",
|
|
1967
|
+
z1: externalBetterCoreContextValue.colorTheme === "dark" ? "brightness(1.3)" : "brightness(0.9)",
|
|
1968
|
+
z2: externalBetterCoreContextValue.colorTheme === "dark" ? "brightness(1.6)" : "brightness(0.8)",
|
|
1969
|
+
z3: externalBetterCoreContextValue.colorTheme === "dark" ? "brightness(1.9)" : "brightness(0.7)"
|
|
1970
|
+
};
|
|
1971
|
+
};
|
|
1972
|
+
|
|
1904
1973
|
// src/components/Loader.tsx
|
|
1905
1974
|
import { memo as memo7 } from "react";
|
|
1906
1975
|
import { useTheme as useTheme8 } from "react-better-core";
|
|
@@ -1967,7 +2036,9 @@ var Loader_default = Loader2;
|
|
|
1967
2036
|
// src/components/Button.tsx
|
|
1968
2037
|
import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1969
2038
|
var ButtonElement = styled6.button.withConfig({
|
|
1970
|
-
shouldForwardProp: (prop) => !["theme", "colorTheme", "style", "hoverStyle", "isSmall", "withText", "isLoading"].includes(
|
|
2039
|
+
shouldForwardProp: (prop) => !["theme", "colorTheme", "style", "hoverStyle", "isSmall", "withText", "isLoading", "withNoBorder"].includes(
|
|
2040
|
+
prop
|
|
2041
|
+
)
|
|
1971
2042
|
})`
|
|
1972
2043
|
display: block;
|
|
1973
2044
|
position: relative;
|
|
@@ -1993,12 +2064,12 @@ var ButtonElement = styled6.button.withConfig({
|
|
|
1993
2064
|
cursor: pointer;
|
|
1994
2065
|
|
|
1995
2066
|
&:not(.secondary):hover {
|
|
1996
|
-
filter: ${props.
|
|
2067
|
+
filter: ${props.hoverStyle.filter ?? filterHover().z1};
|
|
1997
2068
|
}
|
|
1998
2069
|
|
|
1999
2070
|
&.secondary:hover {
|
|
2000
2071
|
${props.withNoBorder ? css`
|
|
2001
|
-
filter: ${props.
|
|
2072
|
+
filter: ${props.hoverStyle.filter ?? filterHover().z1};
|
|
2002
2073
|
` : css`
|
|
2003
2074
|
border-color: ${props.theme.colors.primary};
|
|
2004
2075
|
`}
|
|
@@ -3136,77 +3207,6 @@ var BetterHtmlProvider_default = memo12(BetterHtmlProvider);
|
|
|
3136
3207
|
|
|
3137
3208
|
// src/utils/functions.ts
|
|
3138
3209
|
import CryptoJS from "crypto-js";
|
|
3139
|
-
|
|
3140
|
-
// src/utils/variableFunctions.ts
|
|
3141
|
-
var checkBetterCoreContextValue = (value, functionsName) => {
|
|
3142
|
-
if (value === void 0) {
|
|
3143
|
-
throw new Error(
|
|
3144
|
-
`\`${functionsName}()\` must be used within a \`<BetterCoreProvider>\`. Make sure to add one at the root of your component tree.`
|
|
3145
|
-
);
|
|
3146
|
-
}
|
|
3147
|
-
return value !== void 0;
|
|
3148
|
-
};
|
|
3149
|
-
var checkBetterHtmlContextValue = (value, functionsName) => {
|
|
3150
|
-
if (value === void 0) {
|
|
3151
|
-
throw new Error(
|
|
3152
|
-
`\`${functionsName}()\` must be used within a \`<BetterHtmlProvider>\`. Make sure to add one at the root of your component tree.`
|
|
3153
|
-
);
|
|
3154
|
-
}
|
|
3155
|
-
return value !== void 0;
|
|
3156
|
-
};
|
|
3157
|
-
var alertControls = {
|
|
3158
|
-
createAlert: (alert) => {
|
|
3159
|
-
if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "alertControls.createAlert"))
|
|
3160
|
-
return void 0;
|
|
3161
|
-
const readyAlert = {
|
|
3162
|
-
id: crypto.randomUUID(),
|
|
3163
|
-
...alert
|
|
3164
|
-
};
|
|
3165
|
-
externalBetterHtmlContextValue.setAlerts((oldValue) => [...oldValue, readyAlert]);
|
|
3166
|
-
return readyAlert;
|
|
3167
|
-
},
|
|
3168
|
-
removeAlert: (alertId) => {
|
|
3169
|
-
if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "alertControls.removeAlert")) return;
|
|
3170
|
-
externalBetterHtmlContextValue.setAlerts((oldValue) => oldValue.filter((alert) => alert.id !== alertId));
|
|
3171
|
-
}
|
|
3172
|
-
};
|
|
3173
|
-
var sideMenuControls = {
|
|
3174
|
-
expand: () => {
|
|
3175
|
-
if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "sideMenuControls.expand")) return;
|
|
3176
|
-
externalBetterHtmlContextValue.setSideMenuIsCollapsed.setFalse();
|
|
3177
|
-
},
|
|
3178
|
-
collapse: () => {
|
|
3179
|
-
if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "sideMenuControls.collapse")) return;
|
|
3180
|
-
externalBetterHtmlContextValue.setSideMenuIsCollapsed.setTrue();
|
|
3181
|
-
},
|
|
3182
|
-
toggleExpanded: () => {
|
|
3183
|
-
if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "sideMenuControls.toggleExpanded")) return;
|
|
3184
|
-
externalBetterHtmlContextValue.setSideMenuIsCollapsed.toggle();
|
|
3185
|
-
},
|
|
3186
|
-
open: () => {
|
|
3187
|
-
if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "sideMenuControls.open")) return;
|
|
3188
|
-
externalBetterHtmlContextValue.setSideMenuIsOpenMobile.setTrue();
|
|
3189
|
-
},
|
|
3190
|
-
close: () => {
|
|
3191
|
-
if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "sideMenuControls.close")) return;
|
|
3192
|
-
externalBetterHtmlContextValue.setSideMenuIsOpenMobile.setFalse();
|
|
3193
|
-
},
|
|
3194
|
-
toggleOpened: () => {
|
|
3195
|
-
if (!checkBetterHtmlContextValue(externalBetterHtmlContextValue, "sideMenuControls.toggleOpened")) return;
|
|
3196
|
-
externalBetterHtmlContextValue.setSideMenuIsOpenMobile.toggle();
|
|
3197
|
-
}
|
|
3198
|
-
};
|
|
3199
|
-
var filterHover = () => {
|
|
3200
|
-
if (!checkBetterCoreContextValue(externalBetterCoreContextValue, "filterHover")) return void 0;
|
|
3201
|
-
return {
|
|
3202
|
-
z05: externalBetterCoreContextValue.colorTheme === "dark" ? "brightness(1.2)" : "brightness(0.95)",
|
|
3203
|
-
z1: externalBetterCoreContextValue.colorTheme === "dark" ? "brightness(1.3)" : "brightness(0.9)",
|
|
3204
|
-
z2: externalBetterCoreContextValue.colorTheme === "dark" ? "brightness(1.6)" : "brightness(0.8)",
|
|
3205
|
-
z3: externalBetterCoreContextValue.colorTheme === "dark" ? "brightness(1.9)" : "brightness(0.7)"
|
|
3206
|
-
};
|
|
3207
|
-
};
|
|
3208
|
-
|
|
3209
|
-
// src/utils/functions.ts
|
|
3210
3210
|
var getBrowser = () => {
|
|
3211
3211
|
const userAgent = navigator.userAgent.toLowerCase();
|
|
3212
3212
|
if (userAgent.includes("firefox")) return "firefox";
|
|
@@ -3516,7 +3516,7 @@ import {
|
|
|
3516
3516
|
useTheme as useTheme19,
|
|
3517
3517
|
useBetterCoreContext as useBetterCoreContext7
|
|
3518
3518
|
} from "react-better-core";
|
|
3519
|
-
import styled10 from "styled-components";
|
|
3519
|
+
import styled10, { css as css2 } from "styled-components";
|
|
3520
3520
|
|
|
3521
3521
|
// src/components/Label.tsx
|
|
3522
3522
|
import { memo as memo15 } from "react";
|
|
@@ -4246,7 +4246,17 @@ var colorPickerSpacing = 4;
|
|
|
4246
4246
|
var colorPickerColorWidth = 12 + 27 + colorPickerSpacing;
|
|
4247
4247
|
var colorPickerValueWidth = 12 + 74 + colorPickerSpacing;
|
|
4248
4248
|
var InputElement = styled10.input.withConfig({
|
|
4249
|
-
shouldForwardProp: (prop) => ![
|
|
4249
|
+
shouldForwardProp: (prop) => ![
|
|
4250
|
+
"theme",
|
|
4251
|
+
"colorTheme",
|
|
4252
|
+
"withLeftIcon",
|
|
4253
|
+
"withRightIcon",
|
|
4254
|
+
"withPrefix",
|
|
4255
|
+
"withSuffix",
|
|
4256
|
+
"style",
|
|
4257
|
+
"hoverStyle",
|
|
4258
|
+
"withNoBorder"
|
|
4259
|
+
].includes(prop)
|
|
4250
4260
|
})`
|
|
4251
4261
|
position: relative;
|
|
4252
4262
|
width: 100%;
|
|
@@ -4272,7 +4282,11 @@ var InputElement = styled10.input.withConfig({
|
|
|
4272
4282
|
}
|
|
4273
4283
|
|
|
4274
4284
|
&:focus {
|
|
4275
|
-
|
|
4285
|
+
${(props) => props.withNoBorder ? css2`
|
|
4286
|
+
filter: ${props.hoverStyle.filter ?? filterHover().z1};
|
|
4287
|
+
` : css2`
|
|
4288
|
+
border-color: ${props.theme.colors.primary};
|
|
4289
|
+
`}
|
|
4276
4290
|
}
|
|
4277
4291
|
|
|
4278
4292
|
&:disabled {
|
|
@@ -4368,7 +4382,7 @@ var InputElement = styled10.input.withConfig({
|
|
|
4368
4382
|
}
|
|
4369
4383
|
`;
|
|
4370
4384
|
var TextareaElement = styled10.textarea.withConfig({
|
|
4371
|
-
shouldForwardProp: (prop) => !["theme", "withLeftIcon", "withRightIcon", "style", "hoverStyle"].includes(prop)
|
|
4385
|
+
shouldForwardProp: (prop) => !["theme", "colorTheme", "withLeftIcon", "withRightIcon", "style", "hoverStyle", "withNoBorder"].includes(prop)
|
|
4372
4386
|
})`
|
|
4373
4387
|
width: 100%;
|
|
4374
4388
|
min-height: 3lh;
|
|
@@ -4391,9 +4405,11 @@ var TextareaElement = styled10.textarea.withConfig({
|
|
|
4391
4405
|
color: ${(props) => props.theme.colors.textSecondary}80;
|
|
4392
4406
|
}
|
|
4393
4407
|
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4408
|
+
${(props) => props.withNoBorder ? css2`
|
|
4409
|
+
filter: ${props.hoverStyle.filter ?? filterHover().z1};
|
|
4410
|
+
` : css2`
|
|
4411
|
+
border-color: ${props.theme.colors.primary};
|
|
4412
|
+
`}
|
|
4397
4413
|
|
|
4398
4414
|
${(props) => props.style}
|
|
4399
4415
|
|
|
@@ -4517,6 +4533,7 @@ var InputFieldComponent = forwardRef11(function InputField(inputFieldProps, ref)
|
|
|
4517
4533
|
InputElement,
|
|
4518
4534
|
{
|
|
4519
4535
|
theme: theme2,
|
|
4536
|
+
colorTheme,
|
|
4520
4537
|
withLeftIcon: leftIcon !== void 0,
|
|
4521
4538
|
withRightIcon: rightIcon !== void 0,
|
|
4522
4539
|
withPrefix: prefix !== void 0,
|
|
@@ -4527,6 +4544,7 @@ var InputFieldComponent = forwardRef11(function InputField(inputFieldProps, ref)
|
|
|
4527
4544
|
onChange: onChangeElement,
|
|
4528
4545
|
style,
|
|
4529
4546
|
hoverStyle,
|
|
4547
|
+
withNoBorder: theme2.styles.borderWidth === 0,
|
|
4530
4548
|
...restProps,
|
|
4531
4549
|
...dataProps,
|
|
4532
4550
|
...ariaProps,
|
|
@@ -4611,6 +4629,7 @@ InputFieldComponent.multiline = forwardRef11(function Multiline(inputFieldProps,
|
|
|
4611
4629
|
);
|
|
4612
4630
|
const theme2 = useTheme19();
|
|
4613
4631
|
const internalId = useId2();
|
|
4632
|
+
const { colorTheme } = useBetterCoreContext7();
|
|
4614
4633
|
const { style, hoverStyle, restProps } = useComponentPropsGrouper(props);
|
|
4615
4634
|
const dataProps = useComponentPropsWithPrefix(restProps, "data");
|
|
4616
4635
|
const ariaProps = useComponentPropsWithPrefix(restProps, "aria");
|
|
@@ -4653,6 +4672,7 @@ InputFieldComponent.multiline = forwardRef11(function Multiline(inputFieldProps,
|
|
|
4653
4672
|
TextareaElement,
|
|
4654
4673
|
{
|
|
4655
4674
|
theme: theme2,
|
|
4675
|
+
colorTheme,
|
|
4656
4676
|
withLeftIcon: leftIcon !== void 0,
|
|
4657
4677
|
withRightIcon: rightIcon !== void 0,
|
|
4658
4678
|
required,
|
|
@@ -4661,6 +4681,7 @@ InputFieldComponent.multiline = forwardRef11(function Multiline(inputFieldProps,
|
|
|
4661
4681
|
id: readyId,
|
|
4662
4682
|
style,
|
|
4663
4683
|
hoverStyle,
|
|
4684
|
+
withNoBorder: theme2.styles.borderWidth === 0,
|
|
4664
4685
|
...restProps,
|
|
4665
4686
|
...dataProps,
|
|
4666
4687
|
...ariaProps,
|
|
@@ -5412,14 +5433,14 @@ var InputField_default = InputField2;
|
|
|
5412
5433
|
|
|
5413
5434
|
// src/components/ToggleInput.tsx
|
|
5414
5435
|
import { forwardRef as forwardRef12, useCallback as useCallback11, useId as useId3, useState as useState8 } from "react";
|
|
5415
|
-
import { useBooleanState as useBooleanState6, useTheme as useTheme20 } from "react-better-core";
|
|
5416
|
-
import styled11 from "styled-components";
|
|
5436
|
+
import { useBetterCoreContext as useBetterCoreContext8, useBooleanState as useBooleanState6, useTheme as useTheme20 } from "react-better-core";
|
|
5437
|
+
import styled11, { css as css3 } from "styled-components";
|
|
5417
5438
|
import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
5418
5439
|
var componentSize = 26;
|
|
5419
5440
|
var switchComponentBallGap = 3;
|
|
5420
5441
|
var switchComponentMouseDownDifference = 4;
|
|
5421
5442
|
var InputElement2 = styled11.input.withConfig({
|
|
5422
|
-
shouldForwardProp: (prop) => !["theme", "style", "hoverStyle", "size"].includes(prop)
|
|
5443
|
+
shouldForwardProp: (prop) => !["theme", "colorTheme", "style", "hoverStyle", "size", "withNoBorder"].includes(prop)
|
|
5423
5444
|
})`
|
|
5424
5445
|
position: relative;
|
|
5425
5446
|
appearance: none;
|
|
@@ -5449,7 +5470,11 @@ var InputElement2 = styled11.input.withConfig({
|
|
|
5449
5470
|
${(props) => props.style}
|
|
5450
5471
|
|
|
5451
5472
|
&:hover {
|
|
5452
|
-
|
|
5473
|
+
${(props) => props.withNoBorder ? css3`
|
|
5474
|
+
filter: ${props.hoverStyle.filter ?? filterHover().z1};
|
|
5475
|
+
` : css3`
|
|
5476
|
+
border-color: ${props.theme.colors.primary};
|
|
5477
|
+
`}
|
|
5453
5478
|
|
|
5454
5479
|
${(props) => props.hoverStyle}
|
|
5455
5480
|
}
|
|
@@ -5523,7 +5548,7 @@ var ToggleInputComponent = forwardRef12(function ToggleInput({
|
|
|
5523
5548
|
textAdvanced,
|
|
5524
5549
|
errorText,
|
|
5525
5550
|
infoText,
|
|
5526
|
-
size,
|
|
5551
|
+
size = componentSize,
|
|
5527
5552
|
value,
|
|
5528
5553
|
onChange,
|
|
5529
5554
|
checked: controlledChecked,
|
|
@@ -5534,6 +5559,7 @@ var ToggleInputComponent = forwardRef12(function ToggleInput({
|
|
|
5534
5559
|
}, ref) {
|
|
5535
5560
|
const theme2 = useTheme20();
|
|
5536
5561
|
const internalId = useId3();
|
|
5562
|
+
const { colorTheme } = useBetterCoreContext8();
|
|
5537
5563
|
const { style, hoverStyle, excludeStyle, restProps } = useComponentPropsGrouper(props, true);
|
|
5538
5564
|
const dataProps = useComponentPropsWithPrefix(restProps, "data");
|
|
5539
5565
|
const ariaProps = useComponentPropsWithPrefix(restProps, "aria");
|
|
@@ -5574,7 +5600,9 @@ var ToggleInputComponent = forwardRef12(function ToggleInput({
|
|
|
5574
5600
|
InputElement2,
|
|
5575
5601
|
{
|
|
5576
5602
|
theme: theme2,
|
|
5603
|
+
colorTheme,
|
|
5577
5604
|
size,
|
|
5605
|
+
withNoBorder: theme2.styles.borderWidth === 0,
|
|
5578
5606
|
type: props.type ?? "checkbox",
|
|
5579
5607
|
checked,
|
|
5580
5608
|
onChange: onChangeElement,
|
|
@@ -5594,7 +5622,7 @@ var ToggleInputComponent = forwardRef12(function ToggleInput({
|
|
|
5594
5622
|
top: "50%",
|
|
5595
5623
|
left: "50%",
|
|
5596
5624
|
color: theme2.colors.base,
|
|
5597
|
-
size:
|
|
5625
|
+
size: size / 1.8,
|
|
5598
5626
|
transform: `translate(-50%, -50%)${checked ? "" : " scale(0.4)"}`,
|
|
5599
5627
|
opacity: checked ? 1 : 0,
|
|
5600
5628
|
pointerEvents: "none",
|
|
@@ -5604,8 +5632,8 @@ var ToggleInputComponent = forwardRef12(function ToggleInput({
|
|
|
5604
5632
|
Div_default,
|
|
5605
5633
|
{
|
|
5606
5634
|
position: "absolute",
|
|
5607
|
-
width:
|
|
5608
|
-
height:
|
|
5635
|
+
width: size / 2,
|
|
5636
|
+
height: size / 2,
|
|
5609
5637
|
top: "50%",
|
|
5610
5638
|
left: "50%",
|
|
5611
5639
|
backgroundColor: theme2.colors.base,
|
|
@@ -6008,8 +6036,8 @@ import {
|
|
|
6008
6036
|
useEffect as useEffect12,
|
|
6009
6037
|
Fragment as Fragment6
|
|
6010
6038
|
} from "react";
|
|
6011
|
-
import { darkenColor as darkenColor3, useBetterCoreContext as
|
|
6012
|
-
import styled12, { css as
|
|
6039
|
+
import { darkenColor as darkenColor3, useBetterCoreContext as useBetterCoreContext9, useTheme as useTheme25 } from "react-better-core";
|
|
6040
|
+
import styled12, { css as css4 } from "styled-components";
|
|
6013
6041
|
|
|
6014
6042
|
// src/components/Pagination.tsx
|
|
6015
6043
|
import { memo as memo22, useCallback as useCallback13, useEffect as useEffect11, useMemo as useMemo8, useState as useState10 } from "react";
|
|
@@ -6209,13 +6237,13 @@ var TableStyledComponent = styled12.table.withConfig({
|
|
|
6209
6237
|
}
|
|
6210
6238
|
}
|
|
6211
6239
|
|
|
6212
|
-
${(props) => props.isStriped ?
|
|
6240
|
+
${(props) => props.isStriped ? css4`
|
|
6213
6241
|
&:nth-child(even) {
|
|
6214
6242
|
background-color: ${props.theme.colors.backgroundSecondary};
|
|
6215
6243
|
}
|
|
6216
6244
|
` : ""}
|
|
6217
6245
|
|
|
6218
|
-
${(props) => props.withHover ?
|
|
6246
|
+
${(props) => props.withHover ? css4`
|
|
6219
6247
|
transition: ${props.theme.styles.transition};
|
|
6220
6248
|
|
|
6221
6249
|
&:not(.isHeader):not(.isFooter):not(.withoutHover):hover {
|
|
@@ -6298,7 +6326,7 @@ var TableComponent = forwardRef15(function Table({
|
|
|
6298
6326
|
}, ref) {
|
|
6299
6327
|
const theme2 = useTheme25();
|
|
6300
6328
|
const mediaQuery = useMediaQuery();
|
|
6301
|
-
const { colorTheme } =
|
|
6329
|
+
const { colorTheme } = useBetterCoreContext9();
|
|
6302
6330
|
const filterModalRef = useRef6(null);
|
|
6303
6331
|
const readyColumns = useMemo9(() => columns.filter((column) => !column.hidden), [columns]);
|
|
6304
6332
|
const columnsRef = useRef6(readyColumns);
|
|
@@ -6906,56 +6934,56 @@ var Table_default = Table2;
|
|
|
6906
6934
|
// src/components/Tooltip.tsx
|
|
6907
6935
|
import { memo as memo24, useCallback as useCallback15, useRef as useRef7, useState as useState12, useEffect as useEffect13, forwardRef as forwardRef16, useImperativeHandle as useImperativeHandle3, useMemo as useMemo10 } from "react";
|
|
6908
6936
|
import { useTheme as useTheme26 } from "react-better-core";
|
|
6909
|
-
import styled13, { css as
|
|
6937
|
+
import styled13, { css as css5 } from "styled-components";
|
|
6910
6938
|
import { jsx as jsx24, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
6911
6939
|
var tooltipContainerStyle = (props) => ({
|
|
6912
|
-
top:
|
|
6940
|
+
top: css5`
|
|
6913
6941
|
bottom: calc(100% + ${props.gap}px + ${props.arrowSize}px);
|
|
6914
6942
|
${props.align === "center" ? "left: 50%;" : props.align === "left" ? "left: 0;" : "right: 0;"}
|
|
6915
6943
|
`,
|
|
6916
|
-
bottom:
|
|
6944
|
+
bottom: css5`
|
|
6917
6945
|
top: calc(100% + ${props.gap}px + ${props.arrowSize}px);
|
|
6918
6946
|
${props.align === "center" ? "left: 50%;" : props.align === "left" ? "left: 0;" : "right: 0;"};
|
|
6919
6947
|
`,
|
|
6920
|
-
left:
|
|
6948
|
+
left: css5`
|
|
6921
6949
|
${props.align === "center" ? "top: 50%;" : props.align === "top" ? "top: 0;" : "bottom: 0;"};
|
|
6922
6950
|
right: calc(100% + ${props.gap}px + ${props.arrowSize}px);
|
|
6923
6951
|
`,
|
|
6924
|
-
right:
|
|
6952
|
+
right: css5`
|
|
6925
6953
|
${props.align === "center" ? "top: 50%;" : props.align === "top" ? "top: 0;" : "bottom: 0;"};
|
|
6926
6954
|
left: calc(100% + ${props.gap}px + ${props.arrowSize}px);
|
|
6927
6955
|
`
|
|
6928
6956
|
});
|
|
6929
6957
|
var tooltipPositionStyle = (props) => ({
|
|
6930
6958
|
top: {
|
|
6931
|
-
opened:
|
|
6959
|
+
opened: css5`
|
|
6932
6960
|
transform: translateX(${props.align === "center" ? "-50%" : "0"});
|
|
6933
6961
|
`,
|
|
6934
|
-
closed:
|
|
6962
|
+
closed: css5`
|
|
6935
6963
|
transform: translateX(${props.align === "center" ? "-50%" : "0"}) translateY(${props.theme.styles.gap}px);
|
|
6936
6964
|
`
|
|
6937
6965
|
},
|
|
6938
6966
|
bottom: {
|
|
6939
|
-
opened:
|
|
6967
|
+
opened: css5`
|
|
6940
6968
|
transform: translateX(${props.align === "center" ? "-50%" : "0"});
|
|
6941
6969
|
`,
|
|
6942
|
-
closed:
|
|
6970
|
+
closed: css5`
|
|
6943
6971
|
transform: translateX(${props.align === "center" ? "-50%" : "0"}) translateY(-${props.theme.styles.gap}px);
|
|
6944
6972
|
`
|
|
6945
6973
|
},
|
|
6946
6974
|
left: {
|
|
6947
|
-
opened:
|
|
6975
|
+
opened: css5`
|
|
6948
6976
|
transform: translateY(${props.align === "center" ? "-50%" : "0"});
|
|
6949
6977
|
`,
|
|
6950
|
-
closed:
|
|
6978
|
+
closed: css5`
|
|
6951
6979
|
transform: translateX(${props.theme.styles.gap}px) translateY(${props.align === "center" ? "-50%" : "0"});
|
|
6952
6980
|
`
|
|
6953
6981
|
},
|
|
6954
6982
|
right: {
|
|
6955
|
-
opened:
|
|
6983
|
+
opened: css5`
|
|
6956
6984
|
transform: translateY(${props.align === "center" ? "-50%" : "0"});
|
|
6957
6985
|
`,
|
|
6958
|
-
closed:
|
|
6986
|
+
closed: css5`
|
|
6959
6987
|
transform: translateX(-${props.theme.styles.gap}px) translateY(${props.align === "center" ? "-50%" : "0"});
|
|
6960
6988
|
`
|
|
6961
6989
|
}
|
|
@@ -7303,7 +7331,7 @@ var Tooltip_default = Tooltip2;
|
|
|
7303
7331
|
|
|
7304
7332
|
// src/components/Tabs.tsx
|
|
7305
7333
|
import { forwardRef as forwardRef17, memo as memo25, useCallback as useCallback16, useEffect as useEffect14, useImperativeHandle as useImperativeHandle4, useMemo as useMemo11, useRef as useRef8, useState as useState13 } from "react";
|
|
7306
|
-
import { useBetterCoreContext as
|
|
7334
|
+
import { useBetterCoreContext as useBetterCoreContext10, useTheme as useTheme27 } from "react-better-core";
|
|
7307
7335
|
import { jsx as jsx25, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
7308
7336
|
var tabBottomLineWidth = 2;
|
|
7309
7337
|
var tabDotSize = 6;
|
|
@@ -7313,7 +7341,7 @@ var TabsComponent = forwardRef17(function Tabs({ tabs, name, accentColor, style
|
|
|
7313
7341
|
const theme2 = useTheme27();
|
|
7314
7342
|
const urlQuery = reactRouterDomPlugin2 ? useUrlQuery() : void 0;
|
|
7315
7343
|
const { componentsState } = useBetterHtmlContextInternal();
|
|
7316
|
-
const { colorTheme } =
|
|
7344
|
+
const { colorTheme } = useBetterCoreContext10();
|
|
7317
7345
|
const firstRenderPassedRef = useRef8(false);
|
|
7318
7346
|
const tabsRef = useRef8({});
|
|
7319
7347
|
const [selectedTab, setSelectedTab] = useState13(() => {
|
|
@@ -7647,7 +7675,7 @@ import { createContext as createContext2, memo as memo27, useCallback as useCall
|
|
|
7647
7675
|
import {
|
|
7648
7676
|
calculateColorContrast,
|
|
7649
7677
|
lightenColor as lightenColor3,
|
|
7650
|
-
useBetterCoreContext as
|
|
7678
|
+
useBetterCoreContext as useBetterCoreContext11,
|
|
7651
7679
|
useBooleanState as useBooleanState8,
|
|
7652
7680
|
useTheme as useTheme29
|
|
7653
7681
|
} from "react-better-core";
|
|
@@ -7680,7 +7708,7 @@ var MenuItemComponent = memo27(function MenuItemComponent2({
|
|
|
7680
7708
|
const mediaQuery = useMediaQuery();
|
|
7681
7709
|
const location = reactRouterDomPluginConfig.useLocation();
|
|
7682
7710
|
const { components, sideMenuIsCollapsed, setSideMenuIsCollapsed } = useBetterHtmlContextInternal();
|
|
7683
|
-
const { colorTheme } =
|
|
7711
|
+
const { colorTheme } = useBetterCoreContext11();
|
|
7684
7712
|
const { activeItem, setActiveItem } = useSideMenuContext();
|
|
7685
7713
|
const [isOpened, setIsOpened] = useBooleanState8();
|
|
7686
7714
|
const isCollapsed = sideMenuIsCollapsed && !mediaQuery.size1000;
|