react-better-html 1.1.242 → 1.1.243
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 +39 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +64 -34
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2034,7 +2034,9 @@ var Loader_default = Loader2;
|
|
|
2034
2034
|
// src/components/Button.tsx
|
|
2035
2035
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
2036
2036
|
var ButtonElement = import_styled_components6.default.button.withConfig({
|
|
2037
|
-
shouldForwardProp: (prop) => !["theme", "colorTheme", "style", "hoverStyle", "isSmall", "withText", "isLoading"].includes(
|
|
2037
|
+
shouldForwardProp: (prop) => !["theme", "colorTheme", "style", "hoverStyle", "isSmall", "withText", "isLoading", "withNoBorder"].includes(
|
|
2038
|
+
prop
|
|
2039
|
+
)
|
|
2038
2040
|
})`
|
|
2039
2041
|
display: block;
|
|
2040
2042
|
position: relative;
|
|
@@ -4295,7 +4297,17 @@ var colorPickerSpacing = 4;
|
|
|
4295
4297
|
var colorPickerColorWidth = 12 + 27 + colorPickerSpacing;
|
|
4296
4298
|
var colorPickerValueWidth = 12 + 74 + colorPickerSpacing;
|
|
4297
4299
|
var InputElement = import_styled_components11.default.input.withConfig({
|
|
4298
|
-
shouldForwardProp: (prop) => ![
|
|
4300
|
+
shouldForwardProp: (prop) => ![
|
|
4301
|
+
"theme",
|
|
4302
|
+
"colorTheme",
|
|
4303
|
+
"withLeftIcon",
|
|
4304
|
+
"withRightIcon",
|
|
4305
|
+
"withPrefix",
|
|
4306
|
+
"withSuffix",
|
|
4307
|
+
"style",
|
|
4308
|
+
"hoverStyle",
|
|
4309
|
+
"withNoBorder"
|
|
4310
|
+
].includes(prop)
|
|
4299
4311
|
})`
|
|
4300
4312
|
position: relative;
|
|
4301
4313
|
width: 100%;
|
|
@@ -4321,7 +4333,11 @@ var InputElement = import_styled_components11.default.input.withConfig({
|
|
|
4321
4333
|
}
|
|
4322
4334
|
|
|
4323
4335
|
&:focus {
|
|
4324
|
-
|
|
4336
|
+
${(props) => props.withNoBorder ? import_styled_components11.css`
|
|
4337
|
+
filter: ${props.colorTheme === "dark" ? "brightness(1.2)" : "brightness(0.9)"};
|
|
4338
|
+
` : import_styled_components11.css`
|
|
4339
|
+
border-color: ${props.theme.colors.primary};
|
|
4340
|
+
`}
|
|
4325
4341
|
}
|
|
4326
4342
|
|
|
4327
4343
|
&:disabled {
|
|
@@ -4417,7 +4433,7 @@ var InputElement = import_styled_components11.default.input.withConfig({
|
|
|
4417
4433
|
}
|
|
4418
4434
|
`;
|
|
4419
4435
|
var TextareaElement = import_styled_components11.default.textarea.withConfig({
|
|
4420
|
-
shouldForwardProp: (prop) => !["theme", "withLeftIcon", "withRightIcon", "style", "hoverStyle"].includes(prop)
|
|
4436
|
+
shouldForwardProp: (prop) => !["theme", "colorTheme", "withLeftIcon", "withRightIcon", "style", "hoverStyle", "withNoBorder"].includes(prop)
|
|
4421
4437
|
})`
|
|
4422
4438
|
width: 100%;
|
|
4423
4439
|
min-height: 3lh;
|
|
@@ -4440,9 +4456,11 @@ var TextareaElement = import_styled_components11.default.textarea.withConfig({
|
|
|
4440
4456
|
color: ${(props) => props.theme.colors.textSecondary}80;
|
|
4441
4457
|
}
|
|
4442
4458
|
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4459
|
+
${(props) => props.withNoBorder ? import_styled_components11.css`
|
|
4460
|
+
filter: ${props.colorTheme === "dark" ? "brightness(1.2)" : "brightness(0.9)"};
|
|
4461
|
+
` : import_styled_components11.css`
|
|
4462
|
+
border-color: ${props.theme.colors.primary};
|
|
4463
|
+
`}
|
|
4446
4464
|
|
|
4447
4465
|
${(props) => props.style}
|
|
4448
4466
|
|
|
@@ -4566,6 +4584,7 @@ var InputFieldComponent = (0, import_react21.forwardRef)(function InputField(inp
|
|
|
4566
4584
|
InputElement,
|
|
4567
4585
|
{
|
|
4568
4586
|
theme: theme2,
|
|
4587
|
+
colorTheme,
|
|
4569
4588
|
withLeftIcon: leftIcon !== void 0,
|
|
4570
4589
|
withRightIcon: rightIcon !== void 0,
|
|
4571
4590
|
withPrefix: prefix !== void 0,
|
|
@@ -4576,6 +4595,7 @@ var InputFieldComponent = (0, import_react21.forwardRef)(function InputField(inp
|
|
|
4576
4595
|
onChange: onChangeElement,
|
|
4577
4596
|
style,
|
|
4578
4597
|
hoverStyle,
|
|
4598
|
+
withNoBorder: theme2.styles.borderWidth === 0,
|
|
4579
4599
|
...restProps,
|
|
4580
4600
|
...dataProps,
|
|
4581
4601
|
...ariaProps,
|
|
@@ -4660,6 +4680,7 @@ InputFieldComponent.multiline = (0, import_react21.forwardRef)(function Multilin
|
|
|
4660
4680
|
);
|
|
4661
4681
|
const theme2 = (0, import_react_better_core19.useTheme)();
|
|
4662
4682
|
const internalId = (0, import_react21.useId)();
|
|
4683
|
+
const { colorTheme } = (0, import_react_better_core19.useBetterCoreContext)();
|
|
4663
4684
|
const { style, hoverStyle, restProps } = useComponentPropsGrouper(props);
|
|
4664
4685
|
const dataProps = useComponentPropsWithPrefix(restProps, "data");
|
|
4665
4686
|
const ariaProps = useComponentPropsWithPrefix(restProps, "aria");
|
|
@@ -4702,6 +4723,7 @@ InputFieldComponent.multiline = (0, import_react21.forwardRef)(function Multilin
|
|
|
4702
4723
|
TextareaElement,
|
|
4703
4724
|
{
|
|
4704
4725
|
theme: theme2,
|
|
4726
|
+
colorTheme,
|
|
4705
4727
|
withLeftIcon: leftIcon !== void 0,
|
|
4706
4728
|
withRightIcon: rightIcon !== void 0,
|
|
4707
4729
|
required,
|
|
@@ -4710,6 +4732,7 @@ InputFieldComponent.multiline = (0, import_react21.forwardRef)(function Multilin
|
|
|
4710
4732
|
id: readyId,
|
|
4711
4733
|
style,
|
|
4712
4734
|
hoverStyle,
|
|
4735
|
+
withNoBorder: theme2.styles.borderWidth === 0,
|
|
4713
4736
|
...restProps,
|
|
4714
4737
|
...dataProps,
|
|
4715
4738
|
...ariaProps,
|
|
@@ -5468,7 +5491,7 @@ var componentSize = 26;
|
|
|
5468
5491
|
var switchComponentBallGap = 3;
|
|
5469
5492
|
var switchComponentMouseDownDifference = 4;
|
|
5470
5493
|
var InputElement2 = import_styled_components12.default.input.withConfig({
|
|
5471
|
-
shouldForwardProp: (prop) => !["theme", "style", "hoverStyle", "size"].includes(prop)
|
|
5494
|
+
shouldForwardProp: (prop) => !["theme", "colorTheme", "style", "hoverStyle", "size", "withNoBorder"].includes(prop)
|
|
5472
5495
|
})`
|
|
5473
5496
|
position: relative;
|
|
5474
5497
|
appearance: none;
|
|
@@ -5498,7 +5521,11 @@ var InputElement2 = import_styled_components12.default.input.withConfig({
|
|
|
5498
5521
|
${(props) => props.style}
|
|
5499
5522
|
|
|
5500
5523
|
&:hover {
|
|
5501
|
-
|
|
5524
|
+
${(props) => props.withNoBorder ? import_styled_components12.css`
|
|
5525
|
+
filter: ${props.colorTheme === "dark" ? "brightness(1.2)" : "brightness(0.9)"};
|
|
5526
|
+
` : import_styled_components12.css`
|
|
5527
|
+
border-color: ${props.theme.colors.primary};
|
|
5528
|
+
`}
|
|
5502
5529
|
|
|
5503
5530
|
${(props) => props.hoverStyle}
|
|
5504
5531
|
}
|
|
@@ -5583,6 +5610,7 @@ var ToggleInputComponent = (0, import_react22.forwardRef)(function ToggleInput({
|
|
|
5583
5610
|
}, ref) {
|
|
5584
5611
|
const theme2 = (0, import_react_better_core20.useTheme)();
|
|
5585
5612
|
const internalId = (0, import_react22.useId)();
|
|
5613
|
+
const { colorTheme } = (0, import_react_better_core20.useBetterCoreContext)();
|
|
5586
5614
|
const { style, hoverStyle, excludeStyle, restProps } = useComponentPropsGrouper(props, true);
|
|
5587
5615
|
const dataProps = useComponentPropsWithPrefix(restProps, "data");
|
|
5588
5616
|
const ariaProps = useComponentPropsWithPrefix(restProps, "aria");
|
|
@@ -5623,7 +5651,9 @@ var ToggleInputComponent = (0, import_react22.forwardRef)(function ToggleInput({
|
|
|
5623
5651
|
InputElement2,
|
|
5624
5652
|
{
|
|
5625
5653
|
theme: theme2,
|
|
5654
|
+
colorTheme,
|
|
5626
5655
|
size,
|
|
5656
|
+
withNoBorder: theme2.styles.borderWidth === 0,
|
|
5627
5657
|
type: props.type ?? "checkbox",
|
|
5628
5658
|
checked,
|
|
5629
5659
|
onChange: onChangeElement,
|