react-better-html 1.1.241 → 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.d.mts +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +63 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +88 -37
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -87,6 +87,7 @@ declare const Button: typeof ButtonComponent & {
|
|
|
87
87
|
type InputFieldProps = {
|
|
88
88
|
label?: string;
|
|
89
89
|
labelFontFamily?: React.CSSProperties["fontFamily"];
|
|
90
|
+
labelFontSize?: React.CSSProperties["fontSize"];
|
|
90
91
|
labelLetterSpacing?: React.CSSProperties["letterSpacing"];
|
|
91
92
|
labelTextTransform?: React.CSSProperties["textTransform"];
|
|
92
93
|
labelColor?: React.CSSProperties["color"];
|
|
@@ -285,6 +286,7 @@ type DropdownOption<Value, Data = unknown> = {
|
|
|
285
286
|
type DropdownProps<Value = unknown, Data = unknown> = {
|
|
286
287
|
label?: string;
|
|
287
288
|
labelFontFamily?: React.CSSProperties["fontFamily"];
|
|
289
|
+
labelFontSize?: React.CSSProperties["fontSize"];
|
|
288
290
|
labelLetterSpacing?: React.CSSProperties["letterSpacing"];
|
|
289
291
|
labelTextTransform?: React.CSSProperties["textTransform"];
|
|
290
292
|
labelColor?: React.CSSProperties["color"];
|
|
@@ -340,20 +342,24 @@ type ToggleInputRef = {};
|
|
|
340
342
|
type InternalToggleInputProps<Value> = {
|
|
341
343
|
label?: string;
|
|
342
344
|
labelFontFamily?: React.CSSProperties["fontFamily"];
|
|
345
|
+
labelFontSize?: React.CSSProperties["fontSize"];
|
|
343
346
|
labelLetterSpacing?: React.CSSProperties["letterSpacing"];
|
|
344
347
|
labelTextTransform?: React.CSSProperties["textTransform"];
|
|
345
348
|
labelColor?: React.CSSProperties["color"];
|
|
346
349
|
labelGap?: React.CSSProperties["gap"];
|
|
347
350
|
text?: string;
|
|
348
351
|
textFontFamily?: React.CSSProperties["fontFamily"];
|
|
352
|
+
textFontSize?: React.CSSProperties["fontSize"];
|
|
349
353
|
textLetterSpacing?: React.CSSProperties["letterSpacing"];
|
|
350
354
|
textTextTransform?: React.CSSProperties["textTransform"];
|
|
351
355
|
textAdvanced?: React.ReactNode;
|
|
352
356
|
errorText?: string;
|
|
353
357
|
infoText?: string;
|
|
358
|
+
/** @default 26 */
|
|
359
|
+
size?: number;
|
|
354
360
|
value?: Value;
|
|
355
361
|
onChange?: (checked: boolean, value?: Value) => void;
|
|
356
|
-
} & OmitProps<React.ComponentProps<"input">, "style" | "value" | "ref" | "onChange"> & ComponentStyle & ComponentHoverStyle;
|
|
362
|
+
} & OmitProps<React.ComponentProps<"input">, "style" | "value" | "ref" | "onChange" | "size"> & ComponentStyle & ComponentHoverStyle;
|
|
357
363
|
type ToggleInputProps<Value = unknown> = ComponentPropWithRef<ToggleInputRef, OmitProps<InternalToggleInputProps<Value>, "type">>;
|
|
358
364
|
type ToggleInputComponentType = <Value>(props: ToggleInputProps<Value>) => React.ReactElement;
|
|
359
365
|
declare const _default$5: {
|
|
@@ -411,7 +417,7 @@ declare function Label(labelProps: LabelProps): react_jsx_runtime.JSX.Element;
|
|
|
411
417
|
declare const _default$3: react.MemoExoticComponent<typeof Label>;
|
|
412
418
|
|
|
413
419
|
type ComponentStyleConfig<ComponentProps, Subcomponents extends string> = {
|
|
414
|
-
[key in Subcomponents]?: ComponentProps
|
|
420
|
+
[key in Subcomponents]?: Partial<ComponentProps>;
|
|
415
421
|
};
|
|
416
422
|
type ComponentTagReplacementConfig<Subcomponents extends string> = {
|
|
417
423
|
[key in Subcomponents]?: React.ElementType;
|
package/dist/index.d.ts
CHANGED
|
@@ -87,6 +87,7 @@ declare const Button: typeof ButtonComponent & {
|
|
|
87
87
|
type InputFieldProps = {
|
|
88
88
|
label?: string;
|
|
89
89
|
labelFontFamily?: React.CSSProperties["fontFamily"];
|
|
90
|
+
labelFontSize?: React.CSSProperties["fontSize"];
|
|
90
91
|
labelLetterSpacing?: React.CSSProperties["letterSpacing"];
|
|
91
92
|
labelTextTransform?: React.CSSProperties["textTransform"];
|
|
92
93
|
labelColor?: React.CSSProperties["color"];
|
|
@@ -285,6 +286,7 @@ type DropdownOption<Value, Data = unknown> = {
|
|
|
285
286
|
type DropdownProps<Value = unknown, Data = unknown> = {
|
|
286
287
|
label?: string;
|
|
287
288
|
labelFontFamily?: React.CSSProperties["fontFamily"];
|
|
289
|
+
labelFontSize?: React.CSSProperties["fontSize"];
|
|
288
290
|
labelLetterSpacing?: React.CSSProperties["letterSpacing"];
|
|
289
291
|
labelTextTransform?: React.CSSProperties["textTransform"];
|
|
290
292
|
labelColor?: React.CSSProperties["color"];
|
|
@@ -340,20 +342,24 @@ type ToggleInputRef = {};
|
|
|
340
342
|
type InternalToggleInputProps<Value> = {
|
|
341
343
|
label?: string;
|
|
342
344
|
labelFontFamily?: React.CSSProperties["fontFamily"];
|
|
345
|
+
labelFontSize?: React.CSSProperties["fontSize"];
|
|
343
346
|
labelLetterSpacing?: React.CSSProperties["letterSpacing"];
|
|
344
347
|
labelTextTransform?: React.CSSProperties["textTransform"];
|
|
345
348
|
labelColor?: React.CSSProperties["color"];
|
|
346
349
|
labelGap?: React.CSSProperties["gap"];
|
|
347
350
|
text?: string;
|
|
348
351
|
textFontFamily?: React.CSSProperties["fontFamily"];
|
|
352
|
+
textFontSize?: React.CSSProperties["fontSize"];
|
|
349
353
|
textLetterSpacing?: React.CSSProperties["letterSpacing"];
|
|
350
354
|
textTextTransform?: React.CSSProperties["textTransform"];
|
|
351
355
|
textAdvanced?: React.ReactNode;
|
|
352
356
|
errorText?: string;
|
|
353
357
|
infoText?: string;
|
|
358
|
+
/** @default 26 */
|
|
359
|
+
size?: number;
|
|
354
360
|
value?: Value;
|
|
355
361
|
onChange?: (checked: boolean, value?: Value) => void;
|
|
356
|
-
} & OmitProps<React.ComponentProps<"input">, "style" | "value" | "ref" | "onChange"> & ComponentStyle & ComponentHoverStyle;
|
|
362
|
+
} & OmitProps<React.ComponentProps<"input">, "style" | "value" | "ref" | "onChange" | "size"> & ComponentStyle & ComponentHoverStyle;
|
|
357
363
|
type ToggleInputProps<Value = unknown> = ComponentPropWithRef<ToggleInputRef, OmitProps<InternalToggleInputProps<Value>, "type">>;
|
|
358
364
|
type ToggleInputComponentType = <Value>(props: ToggleInputProps<Value>) => React.ReactElement;
|
|
359
365
|
declare const _default$5: {
|
|
@@ -411,7 +417,7 @@ declare function Label(labelProps: LabelProps): react_jsx_runtime.JSX.Element;
|
|
|
411
417
|
declare const _default$3: react.MemoExoticComponent<typeof Label>;
|
|
412
418
|
|
|
413
419
|
type ComponentStyleConfig<ComponentProps, Subcomponents extends string> = {
|
|
414
|
-
[key in Subcomponents]?: ComponentProps
|
|
420
|
+
[key in Subcomponents]?: Partial<ComponentProps>;
|
|
415
421
|
};
|
|
416
422
|
type ComponentTagReplacementConfig<Subcomponents extends string> = {
|
|
417
423
|
[key in Subcomponents]?: React.ElementType;
|
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;
|
|
@@ -2064,7 +2066,11 @@ var ButtonElement = import_styled_components6.default.button.withConfig({
|
|
|
2064
2066
|
}
|
|
2065
2067
|
|
|
2066
2068
|
&.secondary:hover {
|
|
2067
|
-
|
|
2069
|
+
${props.withNoBorder ? import_styled_components6.css`
|
|
2070
|
+
filter: ${props.colorTheme === "dark" ? "brightness(1.2)" : "brightness(0.9)"};
|
|
2071
|
+
` : import_styled_components6.css`
|
|
2072
|
+
border-color: ${props.theme.colors.primary};
|
|
2073
|
+
`}
|
|
2068
2074
|
}
|
|
2069
2075
|
` : ""}
|
|
2070
2076
|
|
|
@@ -2162,6 +2168,7 @@ var ButtonComponent = function Button(buttonProps) {
|
|
|
2162
2168
|
isSmall,
|
|
2163
2169
|
withText: text !== void 0,
|
|
2164
2170
|
isLoading: isLoadingElement,
|
|
2171
|
+
withNoBorder: theme2.styles.borderWidth === 0,
|
|
2165
2172
|
disabled,
|
|
2166
2173
|
to: href,
|
|
2167
2174
|
href,
|
|
@@ -3632,6 +3639,7 @@ var DropdownComponent = (0, import_react18.forwardRef)(function Dropdown(dropdow
|
|
|
3632
3639
|
const {
|
|
3633
3640
|
label,
|
|
3634
3641
|
labelFontFamily,
|
|
3642
|
+
labelFontSize,
|
|
3635
3643
|
labelLetterSpacing,
|
|
3636
3644
|
labelTextTransform,
|
|
3637
3645
|
labelColor,
|
|
@@ -3875,6 +3883,7 @@ var DropdownComponent = (0, import_react18.forwardRef)(function Dropdown(dropdow
|
|
|
3875
3883
|
{
|
|
3876
3884
|
label,
|
|
3877
3885
|
labelFontFamily,
|
|
3886
|
+
labelFontSize,
|
|
3878
3887
|
labelLetterSpacing,
|
|
3879
3888
|
labelTextTransform,
|
|
3880
3889
|
labelColor,
|
|
@@ -4288,7 +4297,17 @@ var colorPickerSpacing = 4;
|
|
|
4288
4297
|
var colorPickerColorWidth = 12 + 27 + colorPickerSpacing;
|
|
4289
4298
|
var colorPickerValueWidth = 12 + 74 + colorPickerSpacing;
|
|
4290
4299
|
var InputElement = import_styled_components11.default.input.withConfig({
|
|
4291
|
-
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)
|
|
4292
4311
|
})`
|
|
4293
4312
|
position: relative;
|
|
4294
4313
|
width: 100%;
|
|
@@ -4314,7 +4333,11 @@ var InputElement = import_styled_components11.default.input.withConfig({
|
|
|
4314
4333
|
}
|
|
4315
4334
|
|
|
4316
4335
|
&:focus {
|
|
4317
|
-
|
|
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
|
+
`}
|
|
4318
4341
|
}
|
|
4319
4342
|
|
|
4320
4343
|
&:disabled {
|
|
@@ -4410,7 +4433,7 @@ var InputElement = import_styled_components11.default.input.withConfig({
|
|
|
4410
4433
|
}
|
|
4411
4434
|
`;
|
|
4412
4435
|
var TextareaElement = import_styled_components11.default.textarea.withConfig({
|
|
4413
|
-
shouldForwardProp: (prop) => !["theme", "withLeftIcon", "withRightIcon", "style", "hoverStyle"].includes(prop)
|
|
4436
|
+
shouldForwardProp: (prop) => !["theme", "colorTheme", "withLeftIcon", "withRightIcon", "style", "hoverStyle", "withNoBorder"].includes(prop)
|
|
4414
4437
|
})`
|
|
4415
4438
|
width: 100%;
|
|
4416
4439
|
min-height: 3lh;
|
|
@@ -4433,9 +4456,11 @@ var TextareaElement = import_styled_components11.default.textarea.withConfig({
|
|
|
4433
4456
|
color: ${(props) => props.theme.colors.textSecondary}80;
|
|
4434
4457
|
}
|
|
4435
4458
|
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
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
|
+
`}
|
|
4439
4464
|
|
|
4440
4465
|
${(props) => props.style}
|
|
4441
4466
|
|
|
@@ -4450,6 +4475,7 @@ var InputFieldComponent = (0, import_react21.forwardRef)(function InputField(inp
|
|
|
4450
4475
|
const {
|
|
4451
4476
|
label,
|
|
4452
4477
|
labelFontFamily,
|
|
4478
|
+
labelFontSize,
|
|
4453
4479
|
labelLetterSpacing,
|
|
4454
4480
|
labelTextTransform,
|
|
4455
4481
|
labelColor,
|
|
@@ -4515,6 +4541,7 @@ var InputFieldComponent = (0, import_react21.forwardRef)(function InputField(inp
|
|
|
4515
4541
|
{
|
|
4516
4542
|
text: label,
|
|
4517
4543
|
fontFamily: labelFontFamily,
|
|
4544
|
+
fontSize: labelFontSize,
|
|
4518
4545
|
letterSpacing: labelLetterSpacing,
|
|
4519
4546
|
textTransform: labelTextTransform,
|
|
4520
4547
|
color: labelColor,
|
|
@@ -4557,6 +4584,7 @@ var InputFieldComponent = (0, import_react21.forwardRef)(function InputField(inp
|
|
|
4557
4584
|
InputElement,
|
|
4558
4585
|
{
|
|
4559
4586
|
theme: theme2,
|
|
4587
|
+
colorTheme,
|
|
4560
4588
|
withLeftIcon: leftIcon !== void 0,
|
|
4561
4589
|
withRightIcon: rightIcon !== void 0,
|
|
4562
4590
|
withPrefix: prefix !== void 0,
|
|
@@ -4567,6 +4595,7 @@ var InputFieldComponent = (0, import_react21.forwardRef)(function InputField(inp
|
|
|
4567
4595
|
onChange: onChangeElement,
|
|
4568
4596
|
style,
|
|
4569
4597
|
hoverStyle,
|
|
4598
|
+
withNoBorder: theme2.styles.borderWidth === 0,
|
|
4570
4599
|
...restProps,
|
|
4571
4600
|
...dataProps,
|
|
4572
4601
|
...ariaProps,
|
|
@@ -4629,6 +4658,7 @@ InputFieldComponent.multiline = (0, import_react21.forwardRef)(function Multilin
|
|
|
4629
4658
|
const {
|
|
4630
4659
|
label,
|
|
4631
4660
|
labelFontFamily,
|
|
4661
|
+
labelFontSize,
|
|
4632
4662
|
labelLetterSpacing,
|
|
4633
4663
|
labelTextTransform,
|
|
4634
4664
|
labelColor,
|
|
@@ -4650,6 +4680,7 @@ InputFieldComponent.multiline = (0, import_react21.forwardRef)(function Multilin
|
|
|
4650
4680
|
);
|
|
4651
4681
|
const theme2 = (0, import_react_better_core19.useTheme)();
|
|
4652
4682
|
const internalId = (0, import_react21.useId)();
|
|
4683
|
+
const { colorTheme } = (0, import_react_better_core19.useBetterCoreContext)();
|
|
4653
4684
|
const { style, hoverStyle, restProps } = useComponentPropsGrouper(props);
|
|
4654
4685
|
const dataProps = useComponentPropsWithPrefix(restProps, "data");
|
|
4655
4686
|
const ariaProps = useComponentPropsWithPrefix(restProps, "aria");
|
|
@@ -4667,6 +4698,7 @@ InputFieldComponent.multiline = (0, import_react21.forwardRef)(function Multilin
|
|
|
4667
4698
|
{
|
|
4668
4699
|
text: label,
|
|
4669
4700
|
fontFamily: labelFontFamily,
|
|
4701
|
+
fontSize: labelFontSize,
|
|
4670
4702
|
letterSpacing: labelLetterSpacing,
|
|
4671
4703
|
textTransform: labelTextTransform,
|
|
4672
4704
|
color: labelColor,
|
|
@@ -4691,6 +4723,7 @@ InputFieldComponent.multiline = (0, import_react21.forwardRef)(function Multilin
|
|
|
4691
4723
|
TextareaElement,
|
|
4692
4724
|
{
|
|
4693
4725
|
theme: theme2,
|
|
4726
|
+
colorTheme,
|
|
4694
4727
|
withLeftIcon: leftIcon !== void 0,
|
|
4695
4728
|
withRightIcon: rightIcon !== void 0,
|
|
4696
4729
|
required,
|
|
@@ -4699,6 +4732,7 @@ InputFieldComponent.multiline = (0, import_react21.forwardRef)(function Multilin
|
|
|
4699
4732
|
id: readyId,
|
|
4700
4733
|
style,
|
|
4701
4734
|
hoverStyle,
|
|
4735
|
+
withNoBorder: theme2.styles.borderWidth === 0,
|
|
4702
4736
|
...restProps,
|
|
4703
4737
|
...dataProps,
|
|
4704
4738
|
...ariaProps,
|
|
@@ -4834,6 +4868,7 @@ InputFieldComponent.phoneNumber = (0, import_react21.forwardRef)(function PhoneN
|
|
|
4834
4868
|
const {
|
|
4835
4869
|
label,
|
|
4836
4870
|
labelFontFamily,
|
|
4871
|
+
labelFontSize,
|
|
4837
4872
|
labelLetterSpacing,
|
|
4838
4873
|
labelTextTransform,
|
|
4839
4874
|
labelColor,
|
|
@@ -4906,6 +4941,7 @@ InputFieldComponent.phoneNumber = (0, import_react21.forwardRef)(function PhoneN
|
|
|
4906
4941
|
{
|
|
4907
4942
|
text: readyLabel,
|
|
4908
4943
|
fontFamily: betterHtmlContextInternal.components.inputField?.style?.phoneNumber?.labelFontFamily ?? labelFontFamily,
|
|
4944
|
+
fontSize: betterHtmlContextInternal.components.inputField?.style?.phoneNumber?.labelFontSize ?? labelFontSize,
|
|
4909
4945
|
letterSpacing: betterHtmlContextInternal.components.inputField?.style?.phoneNumber?.labelLetterSpacing ?? labelLetterSpacing,
|
|
4910
4946
|
textTransform: betterHtmlContextInternal.components.inputField?.style?.phoneNumber?.labelTextTransform ?? labelTextTransform,
|
|
4911
4947
|
color: betterHtmlContextInternal.components.inputField?.style?.phoneNumber?.labelColor ?? labelColor,
|
|
@@ -5455,12 +5491,12 @@ var componentSize = 26;
|
|
|
5455
5491
|
var switchComponentBallGap = 3;
|
|
5456
5492
|
var switchComponentMouseDownDifference = 4;
|
|
5457
5493
|
var InputElement2 = import_styled_components12.default.input.withConfig({
|
|
5458
|
-
shouldForwardProp: (prop) => !["theme", "style", "hoverStyle"].includes(prop)
|
|
5494
|
+
shouldForwardProp: (prop) => !["theme", "colorTheme", "style", "hoverStyle", "size", "withNoBorder"].includes(prop)
|
|
5459
5495
|
})`
|
|
5460
5496
|
position: relative;
|
|
5461
5497
|
appearance: none;
|
|
5462
|
-
width: ${componentSize}px;
|
|
5463
|
-
height: ${componentSize}px;
|
|
5498
|
+
width: ${(props) => props.size ?? componentSize}px;
|
|
5499
|
+
height: ${(props) => props.size ?? componentSize}px;
|
|
5464
5500
|
background-color: ${(props) => props.theme.colors.backgroundContent};
|
|
5465
5501
|
border: ${(props) => props.theme.styles.borderWidth}px solid ${(props) => props.theme.colors.border};
|
|
5466
5502
|
border-radius: ${(props) => props.theme.styles.borderRadius / 2}px;
|
|
@@ -5485,7 +5521,11 @@ var InputElement2 = import_styled_components12.default.input.withConfig({
|
|
|
5485
5521
|
${(props) => props.style}
|
|
5486
5522
|
|
|
5487
5523
|
&:hover {
|
|
5488
|
-
|
|
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
|
+
`}
|
|
5489
5529
|
|
|
5490
5530
|
${(props) => props.hoverStyle}
|
|
5491
5531
|
}
|
|
@@ -5546,17 +5586,20 @@ var SwitchElement = import_styled_components12.default.div.withConfig({
|
|
|
5546
5586
|
var ToggleInputComponent = (0, import_react22.forwardRef)(function ToggleInput({
|
|
5547
5587
|
label,
|
|
5548
5588
|
labelFontFamily,
|
|
5589
|
+
labelFontSize,
|
|
5549
5590
|
labelLetterSpacing,
|
|
5550
5591
|
labelTextTransform,
|
|
5551
5592
|
labelColor,
|
|
5552
5593
|
labelGap,
|
|
5553
5594
|
text,
|
|
5554
5595
|
textFontFamily,
|
|
5596
|
+
textFontSize,
|
|
5555
5597
|
textLetterSpacing,
|
|
5556
5598
|
textTextTransform,
|
|
5557
5599
|
textAdvanced,
|
|
5558
5600
|
errorText,
|
|
5559
5601
|
infoText,
|
|
5602
|
+
size,
|
|
5560
5603
|
value,
|
|
5561
5604
|
onChange,
|
|
5562
5605
|
checked: controlledChecked,
|
|
@@ -5567,6 +5610,7 @@ var ToggleInputComponent = (0, import_react22.forwardRef)(function ToggleInput({
|
|
|
5567
5610
|
}, ref) {
|
|
5568
5611
|
const theme2 = (0, import_react_better_core20.useTheme)();
|
|
5569
5612
|
const internalId = (0, import_react22.useId)();
|
|
5613
|
+
const { colorTheme } = (0, import_react_better_core20.useBetterCoreContext)();
|
|
5570
5614
|
const { style, hoverStyle, excludeStyle, restProps } = useComponentPropsGrouper(props, true);
|
|
5571
5615
|
const dataProps = useComponentPropsWithPrefix(restProps, "data");
|
|
5572
5616
|
const ariaProps = useComponentPropsWithPrefix(restProps, "aria");
|
|
@@ -5592,6 +5636,7 @@ var ToggleInputComponent = (0, import_react22.forwardRef)(function ToggleInput({
|
|
|
5592
5636
|
{
|
|
5593
5637
|
text: label,
|
|
5594
5638
|
fontFamily: labelFontFamily,
|
|
5639
|
+
fontSize: labelFontSize,
|
|
5595
5640
|
letterSpacing: labelLetterSpacing,
|
|
5596
5641
|
textTransform: labelTextTransform,
|
|
5597
5642
|
color: labelColor,
|
|
@@ -5606,6 +5651,9 @@ var ToggleInputComponent = (0, import_react22.forwardRef)(function ToggleInput({
|
|
|
5606
5651
|
InputElement2,
|
|
5607
5652
|
{
|
|
5608
5653
|
theme: theme2,
|
|
5654
|
+
colorTheme,
|
|
5655
|
+
size,
|
|
5656
|
+
withNoBorder: theme2.styles.borderWidth === 0,
|
|
5609
5657
|
type: props.type ?? "checkbox",
|
|
5610
5658
|
checked,
|
|
5611
5659
|
onChange: onChangeElement,
|
|
@@ -5651,6 +5699,7 @@ var ToggleInputComponent = (0, import_react22.forwardRef)(function ToggleInput({
|
|
|
5651
5699
|
Text_default,
|
|
5652
5700
|
{
|
|
5653
5701
|
fontFamily: textFontFamily,
|
|
5702
|
+
fontSize: textFontSize,
|
|
5654
5703
|
letterSpacing: textLetterSpacing,
|
|
5655
5704
|
textTransform: textTextTransform,
|
|
5656
5705
|
color,
|
|
@@ -5707,6 +5756,7 @@ var ToggleInput_default = {
|
|
|
5707
5756
|
const {
|
|
5708
5757
|
label,
|
|
5709
5758
|
labelFontFamily,
|
|
5759
|
+
labelFontSize,
|
|
5710
5760
|
labelLetterSpacing,
|
|
5711
5761
|
labelTextTransform,
|
|
5712
5762
|
labelColor,
|
|
@@ -5744,6 +5794,7 @@ var ToggleInput_default = {
|
|
|
5744
5794
|
{
|
|
5745
5795
|
text: label,
|
|
5746
5796
|
fontFamily: labelFontFamily,
|
|
5797
|
+
fontSize: labelFontSize,
|
|
5747
5798
|
letterSpacing: labelLetterSpacing,
|
|
5748
5799
|
textTransform: labelTextTransform,
|
|
5749
5800
|
color: labelColor,
|