@odx/websites-react 1.1.4 → 1.1.5
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.
|
@@ -6,7 +6,7 @@ import { BodyText } from '../../typography/bodyText';
|
|
|
6
6
|
import { useFieldId } from '../../../hooks';
|
|
7
7
|
import { Icon } from '../..';
|
|
8
8
|
const checkboxIndicatorClasses = `
|
|
9
|
-
h-[1.125rem] w-[1.125rem] text-transparent
|
|
9
|
+
min-h-[1.125rem] min-w-[1.125rem] text-transparent
|
|
10
10
|
border-[1.5px] rounded-[3px] border-border-primary
|
|
11
11
|
data-[state=checked]:bg-border-primary data-[state=checked]:text-draeger-white data-[state=checked]:disabled:bg-draeger-cool-gray-250
|
|
12
12
|
disabled:cursor-not-allowed disabled:border-draeger-cool-gray-250
|
|
@@ -14,8 +14,8 @@ const checkboxIndicatorClasses = `
|
|
|
14
14
|
`;
|
|
15
15
|
const Checkbox = React.forwardRef(({ className, children, invalid, hidden, ...props }, ref) => {
|
|
16
16
|
const { id, labelId } = useFieldId();
|
|
17
|
-
return (_jsxs(CheckboxPrimitive.Root, { ...props, className: cn('inline-flex gap-2 items-
|
|
18
|
-
'data-[state=checked]:bg-draeger-error border-draeger-error'), children: _jsx(Icon, { name: "core::check", size: "sm", className: "justify-center" }) }), children && (_jsx(BodyText, { asChild: true, children: _jsxs("label", { id: labelId, htmlFor: id, className: 'text-left cursor-pointer peer-disabled:text-draeger-cool-gray-250 peer-disabled:cursor-not-allowed', children: [children, " ", props.required && ' *'] }) }))] }));
|
|
17
|
+
return (_jsxs(CheckboxPrimitive.Root, { ...props, className: cn('inline-flex gap-2 items-start font-text group outline-none', hidden && 'hidden', className), ref: ref, id: id, "aria-labelledby": children ? labelId : undefined, "aria-label": children ? undefined : 'checkbox', children: [_jsx(CheckboxPrimitive.Indicator, { forceMount: true, className: cn(checkboxIndicatorClasses, invalid &&
|
|
18
|
+
'data-[state=checked]:bg-draeger-error border-draeger-error'), children: _jsx(Icon, { name: "core::check", size: "sm", className: "justify-center" }) }), children && (_jsx(BodyText, { asChild: true, children: _jsxs("label", { id: labelId, htmlFor: id, className: '-mt-0.5 text-left cursor-pointer peer-disabled:text-draeger-cool-gray-250 peer-disabled:cursor-not-allowed', children: [children, " ", props.required && ' *'] }) }))] }));
|
|
19
19
|
});
|
|
20
20
|
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
21
21
|
export { Checkbox };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../../src/components/actions/checkbox/Checkbox.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAC;AAE9D,OAAO,EAAC,EAAE,EAAC,MAAM,gBAAgB,CAAC;AAClC,OAAO,EAAC,QAAQ,EAAC,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAC,IAAI,EAAC,MAAM,OAAO,CAAC;AAE3B,MAAM,wBAAwB,GAAG;;;;;;CAMhC,CAAC;AAOF,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAG/B,CAAC,EAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,KAAK,EAAC,EAAE,GAAG,EAAE,EAAE;IAC1D,MAAM,EAAC,EAAE,EAAE,OAAO,EAAC,GAAG,UAAU,EAAE,CAAC;IAEnC,OAAO,CACL,MAAC,iBAAiB,CAAC,IAAI,OACjB,KAAK,EACT,SAAS,EAAE,EAAE,CACX,
|
|
1
|
+
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../../src/components/actions/checkbox/Checkbox.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAC;AA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