@firecms/ui 3.0.0-canary.141 → 3.0.0-canary.143
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/components/BooleanSwitchWithLabel.d.ts +4 -1
- package/dist/index.es.js +10 -5
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +10 -5
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/components/BooleanSwitchWithLabel.tsx +11 -3
- package/src/components/Table.tsx +2 -2
@@ -6,9 +6,12 @@ export type BooleanSwitchWithLabelProps = BooleanSwitchProps & {
|
|
6
6
|
label?: React.ReactNode;
|
7
7
|
error?: boolean;
|
8
8
|
autoFocus?: boolean;
|
9
|
+
fullWidth?: boolean;
|
10
|
+
className?: string;
|
11
|
+
inputClassName?: string;
|
9
12
|
};
|
10
13
|
/**
|
11
14
|
* Simple boolean switch.
|
12
15
|
*
|
13
16
|
*/
|
14
|
-
export declare const BooleanSwitchWithLabel: ({ value, position, invisible, onValueChange, error, label, autoFocus, disabled, size, ...props }: BooleanSwitchWithLabelProps) => import("react/jsx-runtime").JSX.Element;
|
17
|
+
export declare const BooleanSwitchWithLabel: ({ value, position, invisible, onValueChange, error, label, autoFocus, disabled, size, className, fullWidth, inputClassName, ...props }: BooleanSwitchWithLabelProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/index.es.js
CHANGED
@@ -485,6 +485,9 @@ const BooleanSwitchWithLabel = function BooleanSwitchWithLabel2({
|
|
485
485
|
autoFocus,
|
486
486
|
disabled,
|
487
487
|
size,
|
488
|
+
className,
|
489
|
+
fullWidth = true,
|
490
|
+
inputClassName,
|
488
491
|
...props
|
489
492
|
}) {
|
490
493
|
const ref = React__default.useRef(null);
|
@@ -506,13 +509,15 @@ const BooleanSwitchWithLabel = function BooleanSwitchWithLabel2({
|
|
506
509
|
!invisible && fieldBackgroundMixin,
|
507
510
|
!invisible && (disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin),
|
508
511
|
disabled ? "cursor-default" : "cursor-pointer",
|
509
|
-
"rounded-md max-w-full justify-between
|
512
|
+
"rounded-md max-w-full justify-between box-border relative inline-flex items-center",
|
510
513
|
!invisible && focus && !disabled ? focusedClasses : "",
|
511
514
|
error ? "text-red-500 dark:text-red-600" : focus && !disabled ? "text-primary" : !disabled ? "text-text-primary dark:text-text-primary-dark" : "text-text-secondary dark:text-text-secondary-dark",
|
512
515
|
size === "smallest" ? "min-h-[40px]" : size === "small" ? "min-h-[48px]" : "min-h-[64px]",
|
513
516
|
size === "smallest" ? "pl-2" : "pl-4",
|
514
517
|
size === "smallest" ? "pr-4" : "pr-6",
|
515
|
-
position === "end" ? "flex-row-reverse" : "flex-row"
|
518
|
+
position === "end" ? "flex-row-reverse" : "flex-row",
|
519
|
+
fullWidth ? "w-full" : "",
|
520
|
+
className
|
516
521
|
),
|
517
522
|
onClick: disabled ? void 0 : (e) => {
|
518
523
|
if (props.allowIndeterminate) {
|
@@ -530,7 +535,7 @@ const BooleanSwitchWithLabel = function BooleanSwitchWithLabel2({
|
|
530
535
|
value,
|
531
536
|
ref: refInput,
|
532
537
|
size,
|
533
|
-
className: invisible && focus ? focusedClasses : "",
|
538
|
+
className: cls(invisible && focus ? focusedClasses : "", inputClassName),
|
534
539
|
disabled,
|
535
540
|
...props
|
536
541
|
}
|
@@ -16081,7 +16086,7 @@ const TableBody = ({
|
|
16081
16086
|
}) => /* @__PURE__ */ jsx(
|
16082
16087
|
"tbody",
|
16083
16088
|
{
|
16084
|
-
className: cls("bg-white dark:bg-gray-950 text-sm divide-y divide-gray-100 dark:divide-gray-
|
16089
|
+
className: cls("bg-white dark:bg-gray-950 text-sm divide-y divide-gray-100 dark:divide-gray-700 dark:divide-opacity-70", className),
|
16085
16090
|
...rest,
|
16086
16091
|
children
|
16087
16092
|
}
|
@@ -16115,7 +16120,7 @@ const TableRow = ({
|
|
16115
16120
|
style,
|
16116
16121
|
className: cls(
|
16117
16122
|
"bg-white dark:bg-gray-950",
|
16118
|
-
onClick ? "hover:bg-slate-100 dark:hover:bg-
|
16123
|
+
onClick ? "hover:bg-slate-100 dark:hover:bg-slate-800 cursor-pointer" : "",
|
16119
16124
|
className
|
16120
16125
|
),
|
16121
16126
|
...rest,
|