@elliemae/ds-form-checkbox 3.80.0-next.72 → 3.80.0-next.75

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.
@@ -74,19 +74,25 @@ const StyledTooltipText = (0, import_ds_system.styled)(import_ds_typography.DSTy
74
74
  const TruncatedTooltipText = ({
75
75
  value = "",
76
76
  placement = "top",
77
+ disabled = false,
77
78
  getOwnerProps,
78
79
  getOwnerPropsArguments
79
80
  }) => {
80
81
  const [showTooltip, setShowTooltip] = (0, import_react.useState)(false);
82
+ const isTooltipOpen = showTooltip && !disabled;
81
83
  const { refs, floatingStyles, arrowStyles, context } = (0, import_ds_floating_context.useFloatingContext)({
82
84
  placement,
83
- externallyControlledIsOpen: showTooltip,
85
+ externallyControlledIsOpen: isTooltipOpen,
84
86
  withoutAnimation: true
85
87
  });
86
- const handleMouseEnter = (0, import_react.useCallback)((e) => {
87
- const el = e.currentTarget;
88
- setShowTooltip(el.offsetWidth < el.scrollWidth);
89
- }, []);
88
+ const handleMouseEnter = (0, import_react.useCallback)(
89
+ (e) => {
90
+ if (disabled) return;
91
+ const el = e.currentTarget;
92
+ setShowTooltip(el.offsetWidth < el.scrollWidth);
93
+ },
94
+ [disabled]
95
+ );
90
96
  const handleMouseLeave = (0, import_react.useCallback)(() => {
91
97
  setShowTooltip(false);
92
98
  }, []);
@@ -109,7 +115,7 @@ const TruncatedTooltipText = ({
109
115
  import_ds_floating_context.FloatingWrapper,
110
116
  {
111
117
  innerRef: refs.setFloating,
112
- isOpen: showTooltip,
118
+ isOpen: isTooltipOpen,
113
119
  floatingStyles,
114
120
  context,
115
121
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TooltipContainer, { getOwnerProps, getOwnerPropsArguments, children: [
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/TruncatedTooltipText.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useCallback, useState } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { DSTypography } from '@elliemae/ds-typography';\nimport {\n useFloatingContext,\n FloatingWrapper,\n PopoverArrow,\n type DSHookFloatingContextT,\n} from '@elliemae/ds-floating-context';\nimport { DSCheckboxName, DSCheckboxSlots, DSCheckboxDataTestIds } from './constants/index.js';\n\nconst TruncatedSpan = styled(DSTypography, {\n name: DSCheckboxName,\n slot: DSCheckboxSlots.TRUNCATED_LABEL,\n})`\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n display: inline-block;\n max-width: 100%;\n`;\n\n// Matches DSTooltipV3's StyledTooltipContainer styles for visual consistency\nconst TooltipContainer = styled('div', {\n name: DSCheckboxName,\n slot: DSCheckboxSlots.TOOLTIP_CONTAINER,\n})`\n text-align: center;\n min-width: ${({ theme }) => theme.space.l};\n max-width: 250px;\n overflow-wrap: break-word;\n word-break: break-word;\n min-height: 30px;\n display: grid;\n align-items: center;\n padding: ${({ theme }) => `${theme.space.xxs} ${theme.space.xs}`};\n position: relative;\n background-color: white;\n border-radius: 2px;\n pointer-events: none;\n`;\n\nconst StyledTooltipText = styled(DSTypography, {\n name: DSCheckboxName,\n slot: DSCheckboxSlots.TOOLTIP_TEXT,\n})``;\n\ninterface TruncatedTooltipTextProps {\n value?: string;\n placement?: DSHookFloatingContextT.PopperPlacementsT;\n getOwnerProps?: () => object;\n getOwnerPropsArguments?: () => object;\n}\n\nconst TruncatedTooltipText = ({\n value = '',\n placement = 'top',\n getOwnerProps,\n getOwnerPropsArguments,\n}: TruncatedTooltipTextProps) => {\n const [showTooltip, setShowTooltip] = useState(false);\n\n const { refs, floatingStyles, arrowStyles, context } = useFloatingContext({\n placement,\n externallyControlledIsOpen: showTooltip,\n withoutAnimation: true,\n });\n\n const handleMouseEnter = useCallback((e: React.MouseEvent<HTMLSpanElement>) => {\n const el = e.currentTarget;\n setShowTooltip(el.offsetWidth < el.scrollWidth);\n }, []);\n\n const handleMouseLeave = useCallback(() => {\n setShowTooltip(false);\n }, []);\n\n return (\n <>\n <TruncatedSpan\n component=\"span\"\n variant=\"b2\"\n data-testid={DSCheckboxDataTestIds.TRUNCATED_LABEL}\n innerRef={refs.setReference}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {value}\n </TruncatedSpan>\n <FloatingWrapper\n innerRef={refs.setFloating}\n isOpen={showTooltip}\n floatingStyles={floatingStyles}\n context={context}\n >\n <TooltipContainer getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <StyledTooltipText\n component=\"span\"\n variant=\"b2-light\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {value}\n </StyledTooltipText>\n <PopoverArrow {...arrowStyles} />\n </TooltipContainer>\n </FloatingWrapper>\n </>\n );\n};\n\nexport { TruncatedTooltipText };\nexport default TruncatedTooltipText;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD8EnB;AA9EJ,mBAA6C;AAC7C,uBAAuB;AACvB,2BAA6B;AAC7B,iCAKO;AACP,uBAAuE;AAEvE,MAAM,oBAAgB,yBAAO,mCAAc;AAAA,EACzC,MAAM;AAAA,EACN,MAAM,iCAAgB;AACxB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASD,MAAM,uBAAmB,yBAAO,OAAO;AAAA,EACrC,MAAM;AAAA,EACN,MAAM,iCAAgB;AACxB,CAAC;AAAA;AAAA,eAEc,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAO9B,CAAC,EAAE,MAAM,MAAM,GAAG,MAAM,MAAM,GAAG,IAAI,MAAM,MAAM,EAAE,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAOlE,MAAM,wBAAoB,yBAAO,mCAAc;AAAA,EAC7C,MAAM;AAAA,EACN,MAAM,iCAAgB;AACxB,CAAC;AASD,MAAM,uBAAuB,CAAC;AAAA,EAC5B,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ;AAAA,EACA;AACF,MAAiC;AAC/B,QAAM,CAAC,aAAa,cAAc,QAAI,uBAAS,KAAK;AAEpD,QAAM,EAAE,MAAM,gBAAgB,aAAa,QAAQ,QAAI,+CAAmB;AAAA,IACxE;AAAA,IACA,4BAA4B;AAAA,IAC5B,kBAAkB;AAAA,EACpB,CAAC;AAED,QAAM,uBAAmB,0BAAY,CAAC,MAAyC;AAC7E,UAAM,KAAK,EAAE;AACb,mBAAe,GAAG,cAAc,GAAG,WAAW;AAAA,EAChD,GAAG,CAAC,CAAC;AAEL,QAAM,uBAAmB,0BAAY,MAAM;AACzC,mBAAe,KAAK;AAAA,EACtB,GAAG,CAAC,CAAC;AAEL,SACE,4EACE;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,SAAQ;AAAA,QACR,eAAa,uCAAsB;AAAA,QACnC,UAAU,KAAK;AAAA,QACf,cAAc;AAAA,QACd,cAAc;AAAA,QACd;AAAA,QACA;AAAA,QAEC;AAAA;AAAA,IACH;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,UAAU,KAAK;AAAA,QACf,QAAQ;AAAA,QACR;AAAA,QACA;AAAA,QAEA,uDAAC,oBAAiB,eAA8B,wBAC9C;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,SAAQ;AAAA,cACR;AAAA,cACA;AAAA,cAEC;AAAA;AAAA,UACH;AAAA,UACA,4CAAC,2CAAc,GAAG,aAAa;AAAA,WACjC;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;AAGA,IAAO,+BAAQ;",
4
+ "sourcesContent": ["import React, { useCallback, useState } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { DSTypography } from '@elliemae/ds-typography';\nimport {\n useFloatingContext,\n FloatingWrapper,\n PopoverArrow,\n type DSHookFloatingContextT,\n} from '@elliemae/ds-floating-context';\nimport { DSCheckboxName, DSCheckboxSlots, DSCheckboxDataTestIds } from './constants/index.js';\n\nconst TruncatedSpan = styled(DSTypography, {\n name: DSCheckboxName,\n slot: DSCheckboxSlots.TRUNCATED_LABEL,\n})`\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n display: inline-block;\n max-width: 100%;\n`;\n\n// Matches DSTooltipV3's StyledTooltipContainer styles for visual consistency\nconst TooltipContainer = styled('div', {\n name: DSCheckboxName,\n slot: DSCheckboxSlots.TOOLTIP_CONTAINER,\n})`\n text-align: center;\n min-width: ${({ theme }) => theme.space.l};\n max-width: 250px;\n overflow-wrap: break-word;\n word-break: break-word;\n min-height: 30px;\n display: grid;\n align-items: center;\n padding: ${({ theme }) => `${theme.space.xxs} ${theme.space.xs}`};\n position: relative;\n background-color: white;\n border-radius: 2px;\n pointer-events: none;\n`;\n\nconst StyledTooltipText = styled(DSTypography, {\n name: DSCheckboxName,\n slot: DSCheckboxSlots.TOOLTIP_TEXT,\n})``;\n\ninterface TruncatedTooltipTextProps {\n value?: string;\n placement?: DSHookFloatingContextT.PopperPlacementsT;\n /** hard lock: a disabled label has no hover behavior, so its full-value tooltip never opens */\n disabled?: boolean;\n getOwnerProps?: () => object;\n getOwnerPropsArguments?: () => object;\n}\n\nconst TruncatedTooltipText = ({\n value = '',\n placement = 'top',\n disabled = false,\n getOwnerProps,\n getOwnerPropsArguments,\n}: TruncatedTooltipTextProps) => {\n const [showTooltip, setShowTooltip] = useState(false);\n // a lock that lands while the tooltip is open closes it immediately, it does not wait for the mouseleave\n const isTooltipOpen = showTooltip && !disabled;\n\n const { refs, floatingStyles, arrowStyles, context } = useFloatingContext({\n placement,\n externallyControlledIsOpen: isTooltipOpen,\n withoutAnimation: true,\n });\n\n const handleMouseEnter = useCallback(\n (e: React.MouseEvent<HTMLSpanElement>) => {\n if (disabled) return;\n const el = e.currentTarget;\n setShowTooltip(el.offsetWidth < el.scrollWidth);\n },\n [disabled],\n );\n\n const handleMouseLeave = useCallback(() => {\n setShowTooltip(false);\n }, []);\n\n return (\n <>\n <TruncatedSpan\n component=\"span\"\n variant=\"b2\"\n data-testid={DSCheckboxDataTestIds.TRUNCATED_LABEL}\n innerRef={refs.setReference}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {value}\n </TruncatedSpan>\n <FloatingWrapper\n innerRef={refs.setFloating}\n isOpen={isTooltipOpen}\n floatingStyles={floatingStyles}\n context={context}\n >\n <TooltipContainer getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <StyledTooltipText\n component=\"span\"\n variant=\"b2-light\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {value}\n </StyledTooltipText>\n <PopoverArrow {...arrowStyles} />\n </TooltipContainer>\n </FloatingWrapper>\n </>\n );\n};\n\nexport { TruncatedTooltipText };\nexport default TruncatedTooltipText;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADuFnB;AAvFJ,mBAA6C;AAC7C,uBAAuB;AACvB,2BAA6B;AAC7B,iCAKO;AACP,uBAAuE;AAEvE,MAAM,oBAAgB,yBAAO,mCAAc;AAAA,EACzC,MAAM;AAAA,EACN,MAAM,iCAAgB;AACxB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASD,MAAM,uBAAmB,yBAAO,OAAO;AAAA,EACrC,MAAM;AAAA,EACN,MAAM,iCAAgB;AACxB,CAAC;AAAA;AAAA,eAEc,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM,CAAC;AAAA;AAAA;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ACR;AAAA,cACA;AAAA,cAEC;AAAA;AAAA,UACH;AAAA,UACA,4CAAC,2CAAc,GAAG,aAAa;AAAA,WACjC;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;AAGA,IAAO,+BAAQ;",
6
6
  "names": []
7
7
  }
@@ -33,37 +33,55 @@ __export(useEventHandlers_exports, {
33
33
  module.exports = __toCommonJS(useEventHandlers_exports);
34
34
  var React = __toESM(require("react"));
35
35
  var import_react = __toESM(require("react"));
36
+ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
36
37
  const useEventHandlers = (props) => {
37
- const { checked, onChange, onKeyDown, readOnly, applyAriaDisabled } = props;
38
+ const { checked, onChange, onKeyDown, disabled, readOnly, applyAriaDisabled } = props;
39
+ const locked = (0, import_ds_props_helpers.isLocked)({ disabled, applyAriaDisabled, readOnly });
38
40
  const handleOnChange = import_react.default.useCallback(
39
41
  (e) => {
40
- if (applyAriaDisabled) return;
41
- if (onChange && !readOnly) {
42
+ if (locked) return;
43
+ if (onChange) {
42
44
  if (checked === "mixed") onChange(true, e);
43
45
  if (checked === true) onChange(false, e);
44
46
  if (checked === false) onChange(true, e);
45
47
  }
46
48
  },
47
- [checked, onChange, readOnly, applyAriaDisabled]
49
+ [checked, onChange, locked]
48
50
  );
49
51
  const handleMixedCheckboxOnKeyDown = import_react.default.useCallback(
50
52
  (e) => {
53
+ const isActivationKey = e.code === "Space" || e.code === "Enter";
54
+ if (locked && isActivationKey) {
55
+ e.preventDefault();
56
+ return;
57
+ }
51
58
  if (onKeyDown) {
52
59
  onKeyDown(e);
53
60
  }
54
- if ((e.code === "Space" || e.code === "Enter") && !readOnly) {
61
+ if (isActivationKey) {
62
+ handleOnChange(e);
63
+ e.preventDefault();
64
+ }
65
+ },
66
+ [handleOnChange, locked, onKeyDown]
67
+ );
68
+ const handleNativeCheckboxOnKeyDown = import_react.default.useCallback(
69
+ (e) => {
70
+ onKeyDown?.(e);
71
+ if (!locked && (e.code === "Space" || e.code === "Enter")) {
55
72
  handleOnChange(e);
56
73
  e.preventDefault();
57
74
  }
58
75
  },
59
- [handleOnChange, onKeyDown, readOnly]
76
+ [handleOnChange, locked, onKeyDown]
60
77
  );
61
78
  return import_react.default.useMemo(
62
79
  () => ({
63
80
  handleOnChange,
64
- handleMixedCheckboxOnKeyDown
81
+ handleMixedCheckboxOnKeyDown,
82
+ handleNativeCheckboxOnKeyDown
65
83
  }),
66
- [handleMixedCheckboxOnKeyDown, handleOnChange]
84
+ [handleMixedCheckboxOnKeyDown, handleNativeCheckboxOnKeyDown, handleOnChange]
67
85
  );
68
86
  };
69
87
  //# sourceMappingURL=useEventHandlers.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/config/useEventHandlers.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport type { DSControlledCheckboxT } from '../react-desc-prop-types.js';\n\nexport const useEventHandlers = (props: DSControlledCheckboxT.InternalProps) => {\n const { checked, onChange, onKeyDown, readOnly, applyAriaDisabled } = props;\n const handleOnChange = React.useCallback(\n (\n e:\n | React.ChangeEvent<HTMLInputElement>\n | React.MouseEvent<HTMLLabelElement>\n | React.MouseEvent<HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>,\n ) => {\n if (applyAriaDisabled) return;\n if (onChange && !readOnly) {\n if (checked === 'mixed') onChange(true, e);\n if (checked === true) onChange(false, e);\n if (checked === false) onChange(true, e);\n }\n },\n [checked, onChange, readOnly, applyAriaDisabled],\n );\n const handleMixedCheckboxOnKeyDown = React.useCallback(\n (e: React.KeyboardEvent<HTMLDivElement>) => {\n if (onKeyDown) {\n // if user provides 'onKeyDown' event, he is in charge of what happens\n onKeyDown(e);\n }\n if ((e.code === 'Space' || e.code === 'Enter') && !readOnly) {\n handleOnChange(e);\n e.preventDefault(); // when selecting a checkbox we don't want to scroll for example\n }\n },\n [handleOnChange, onKeyDown, readOnly],\n );\n\n return React.useMemo(\n () => ({\n handleOnChange,\n handleMixedCheckboxOnKeyDown,\n }),\n [handleMixedCheckboxOnKeyDown, handleOnChange],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAGX,MAAM,mBAAmB,CAAC,UAA+C;AAC9E,QAAM,EAAE,SAAS,UAAU,WAAW,UAAU,kBAAkB,IAAI;AACtE,QAAM,iBAAiB,aAAAA,QAAM;AAAA,IAC3B,CACE,MAKG;AACH,UAAI,kBAAmB;AACvB,UAAI,YAAY,CAAC,UAAU;AACzB,YAAI,YAAY,QAAS,UAAS,MAAM,CAAC;AACzC,YAAI,YAAY,KAAM,UAAS,OAAO,CAAC;AACvC,YAAI,YAAY,MAAO,UAAS,MAAM,CAAC;AAAA,MACzC;AAAA,IACF;AAAA,IACA,CAAC,SAAS,UAAU,UAAU,iBAAiB;AAAA,EACjD;AACA,QAAM,+BAA+B,aAAAA,QAAM;AAAA,IACzC,CAAC,MAA2C;AAC1C,UAAI,WAAW;AAEb,kBAAU,CAAC;AAAA,MACb;AACA,WAAK,EAAE,SAAS,WAAW,EAAE,SAAS,YAAY,CAAC,UAAU;AAC3D,uBAAe,CAAC;AAChB,UAAE,eAAe;AAAA,MACnB;AAAA,IACF;AAAA,IACA,CAAC,gBAAgB,WAAW,QAAQ;AAAA,EACtC;AAEA,SAAO,aAAAA,QAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,8BAA8B,cAAc;AAAA,EAC/C;AACF;",
4
+ "sourcesContent": ["import React from 'react';\nimport { isLocked } from '@elliemae/ds-props-helpers';\nimport type { DSControlledCheckboxT } from '../react-desc-prop-types.js';\n\nexport const useEventHandlers = (props: DSControlledCheckboxT.InternalProps) => {\n const { checked, onChange, onKeyDown, disabled, readOnly, applyAriaDisabled } = props;\n const locked = isLocked({ disabled, applyAriaDisabled, readOnly });\n const handleOnChange = React.useCallback(\n (\n e:\n | React.ChangeEvent<HTMLInputElement>\n | React.MouseEvent<HTMLLabelElement>\n | React.MouseEvent<HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>,\n ) => {\n if (locked) return;\n if (onChange) {\n if (checked === 'mixed') onChange(true, e);\n if (checked === true) onChange(false, e);\n if (checked === false) onChange(true, e);\n }\n },\n [checked, onChange, locked],\n );\n const handleMixedCheckboxOnKeyDown = React.useCallback(\n (e: React.KeyboardEvent<HTMLDivElement>) => {\n const isActivationKey = e.code === 'Space' || e.code === 'Enter';\n // locked: activation keys neither toggle nor reach the consumer onKeyDown\n if (locked && isActivationKey) {\n e.preventDefault();\n return;\n }\n if (onKeyDown) {\n // if user provides 'onKeyDown' event, he is in charge of what happens\n onKeyDown(e);\n }\n if (isActivationKey) {\n handleOnChange(e);\n e.preventDefault(); // when selecting a checkbox we don't want to scroll for example\n }\n },\n [handleOnChange, locked, onKeyDown],\n );\n\n // the native checkbox has a change event: the lock gates the change (`handleOnChange` does nothing while locked) and\n // the keys are only observed, so the consumer onKeyDown always receives them. Enter and Space still toggle it.\n const handleNativeCheckboxOnKeyDown = React.useCallback(\n (e: React.KeyboardEvent<HTMLInputElement>) => {\n onKeyDown?.(e as unknown as React.KeyboardEvent<HTMLDivElement>);\n if (!locked && (e.code === 'Space' || e.code === 'Enter')) {\n handleOnChange(e as unknown as React.KeyboardEvent<HTMLDivElement>);\n e.preventDefault(); // when selecting a checkbox we don't want to scroll for example\n }\n },\n [handleOnChange, locked, onKeyDown],\n );\n\n return React.useMemo(\n () => ({\n handleOnChange,\n handleMixedCheckboxOnKeyDown,\n handleNativeCheckboxOnKeyDown,\n }),\n [handleMixedCheckboxOnKeyDown, handleNativeCheckboxOnKeyDown, handleOnChange],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACA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ACF;",
6
6
  "names": ["React"]
7
7
  }
@@ -85,9 +85,9 @@ const ControlledCheckBoxContent = () => {
85
85
  device,
86
86
  checked,
87
87
  hasError,
88
- disabled,
89
- applyAriaDisabled,
90
- readOnly,
88
+ $disabled: disabled,
89
+ $applyAriaDisabled: applyAriaDisabled,
90
+ $readOnly: readOnly,
91
91
  getOwnerProps,
92
92
  getOwnerPropsArguments,
93
93
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_MainInput.MainInput, {})
@@ -98,9 +98,9 @@ const ControlledCheckBoxContent = () => {
98
98
  {
99
99
  id: `${instanceUid}_label`,
100
100
  htmlFor: instanceUid,
101
- disabled,
102
- applyAriaDisabled,
103
- readOnly,
101
+ $disabled: disabled,
102
+ $applyAriaDisabled: applyAriaDisabled,
103
+ $readOnly: readOnly,
104
104
  checked,
105
105
  "data-testid": "ds-checkbox-label",
106
106
  wrapLabel,
@@ -121,6 +121,7 @@ const ControlledCheckBoxContent = () => {
121
121
  import_TruncatedTooltipText.TruncatedTooltipText,
122
122
  {
123
123
  value: label,
124
+ disabled: Boolean(disabled),
124
125
  getOwnerProps,
125
126
  getOwnerPropsArguments
126
127
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/parts/ControlledCheckBoxContent.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { useOwnerProps } from '@elliemae/ds-props-helpers';\nimport { TruncatedTooltipText } from '../TruncatedTooltipText.js';\nimport { StyledContainer, StyledLabelTypography, StyledLabel, StyledCheckBox, StyledHiddenP } from '../styles.js';\nimport { MainInput } from './MainInput.js';\nimport { ControlledCheckBoxContext } from '../ControlledCheckboxCTX.js';\nimport { DSCheckboxDataTestIds } from '../constants/index.js';\n\nexport const ControlledCheckBoxContent = () => {\n const { propsWithDefault, globalProps, instanceUid, xstyledProps, handleOnChange } =\n React.useContext(ControlledCheckBoxContext);\n const {\n checked,\n device,\n label,\n hasError,\n wrapLabel,\n ariaControls: legacyAriaControls,\n applyAriaDisabled,\n } = propsWithDefault;\n const { disabled, readOnly, 'aria-controls': ariaControls, className } = globalProps;\n\n const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps(propsWithDefault);\n\n const { ariaControls: camelCaseAriaControls } = propsWithDefault;\n // if components doesn't define 'aria-controls' it would be \"a11y invalid\" to allow 'mixed' state\n // so\n // if they are NOT provided we use <input type='checkbox' /> that has no 'mixed' state support in html5\n // if they ARE provided we use <input /> (no type checkbox) in which we super-charge the 'mixed' state via css\n // props slightly differ because of this\n // also, because of this, \"onChange\" may be an onClick (or keyboard activation) or the native \"onChange\"\n const canShowMixedState = ariaControls || camelCaseAriaControls;\n\n const handleLabelClick = React.useCallback(\n (\n e:\n | React.ChangeEvent<HTMLInputElement>\n | React.MouseEvent<HTMLLabelElement>\n | React.MouseEvent<HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>,\n ) => {\n handleOnChange(e);\n // if we are in a mixed state, we want to focus the input when the label is clicked\n // this is because the auto-focus work only on the input itself, not a div with role=checkbox\n // so we need to manually focus the input: https://jira.elliemae.io/browse/PUI-15422\n if (canShowMixedState) {\n const input = document.getElementById(instanceUid);\n if (input) {\n input.focus();\n }\n }\n },\n [canShowMixedState, handleOnChange, instanceUid],\n );\n\n return (\n <StyledContainer\n wrapLabel={wrapLabel}\n device={device}\n data-testid=\"ds-checkbox-container\"\n className={className}\n hasLabel={Boolean(label)}\n {...xstyledProps}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledCheckBox\n device={device}\n checked={checked}\n hasError={hasError}\n disabled={disabled}\n applyAriaDisabled={applyAriaDisabled}\n readOnly={readOnly}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <MainInput />\n </StyledCheckBox>\n {label && (\n <StyledLabel\n id={`${instanceUid}_label`}\n htmlFor={instanceUid}\n disabled={disabled}\n applyAriaDisabled={applyAriaDisabled}\n readOnly={readOnly}\n checked={checked}\n data-testid=\"ds-checkbox-label\"\n wrapLabel={wrapLabel}\n device={device}\n {...(!disabled && (ariaControls || legacyAriaControls) ? { onClick: handleLabelClick } : {})}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {wrapLabel ? (\n <StyledLabelTypography\n component=\"span\"\n variant=\"b2\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {label}\n </StyledLabelTypography>\n ) : (\n <TruncatedTooltipText\n value={label}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n )}\n </StyledLabel>\n )}\n {readOnly ? (\n // READ_ONLY_HELPER is a display:none, SR-only helper \u2014 intentionally NOT a getOwnerProps\n // injection point (no consumer use case). The slot/data-testid exist only for naming +\n // QA targeting consistency. Tracked in KNOWN_INTENTIONAL_DEVIATIONS.md.\n <StyledHiddenP id={`${instanceUid}-read-only-helper-msg`} data-testid={DSCheckboxDataTestIds.READ_ONLY_HELPER}>\n Read only\n </StyledHiddenP>\n ) : null}\n </StyledContainer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADwDnB;AAxDJ,mBAAkB;AAClB,8BAA8B;AAC9B,kCAAqC;AACrC,oBAAmG;AACnG,uBAA0B;AAC1B,mCAA0C;AAC1C,uBAAsC;AAE/B,MAAM,4BAA4B,MAAM;AAC7C,QAAM,EAAE,kBAAkB,aAAa,aAAa,cAAc,eAAe,IAC/E,aAAAA,QAAM,WAAW,sDAAyB;AAC5C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,cAAc;AAAA,IACd;AAAA,EACF,IAAI;AACJ,QAAM,EAAE,UAAU,UAAU,iBAAiB,cAAc,UAAU,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A,UAIC,4CAAC,+BAAc,IAAI,GAAG,WAAW,yBAAyB,eAAa,uCAAsB,kBAAkB,uBAE/G;AAAA,YACE;AAAA;AAAA;AAAA,EACN;AAEJ;",
4
+ "sourcesContent": ["import React from 'react';\nimport { useOwnerProps } from '@elliemae/ds-props-helpers';\nimport { TruncatedTooltipText } from '../TruncatedTooltipText.js';\nimport { StyledContainer, StyledLabelTypography, StyledLabel, StyledCheckBox, StyledHiddenP } from '../styles.js';\nimport { MainInput } from './MainInput.js';\nimport { ControlledCheckBoxContext } from '../ControlledCheckboxCTX.js';\nimport { DSCheckboxDataTestIds } from '../constants/index.js';\n\nexport const ControlledCheckBoxContent = () => {\n const { propsWithDefault, globalProps, instanceUid, xstyledProps, handleOnChange } =\n React.useContext(ControlledCheckBoxContext);\n const {\n checked,\n device,\n label,\n hasError,\n wrapLabel,\n ariaControls: legacyAriaControls,\n applyAriaDisabled,\n } = propsWithDefault;\n const { disabled, readOnly, 'aria-controls': ariaControls, className } = globalProps;\n\n const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps(propsWithDefault);\n\n const { ariaControls: camelCaseAriaControls } = propsWithDefault;\n // if components doesn't define 'aria-controls' it would be \"a11y invalid\" to allow 'mixed' state\n // so\n // if they are NOT provided we use <input type='checkbox' /> that has no 'mixed' state support in html5\n // if they ARE provided we use <input /> (no type checkbox) in which we super-charge the 'mixed' state via css\n // props slightly differ because of this\n // also, because of this, \"onChange\" may be an onClick (or keyboard activation) or the native \"onChange\"\n const canShowMixedState = ariaControls || camelCaseAriaControls;\n\n const handleLabelClick = React.useCallback(\n (\n e:\n | React.ChangeEvent<HTMLInputElement>\n | React.MouseEvent<HTMLLabelElement>\n | React.MouseEvent<HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>,\n ) => {\n handleOnChange(e);\n // if we are in a mixed state, we want to focus the input when the label is clicked\n // this is because the auto-focus work only on the input itself, not a div with role=checkbox\n // so we need to manually focus the input: https://jira.elliemae.io/browse/PUI-15422\n if (canShowMixedState) {\n const input = document.getElementById(instanceUid);\n if (input) {\n input.focus();\n }\n }\n },\n [canShowMixedState, handleOnChange, instanceUid],\n );\n\n return (\n <StyledContainer\n wrapLabel={wrapLabel}\n device={device}\n data-testid=\"ds-checkbox-container\"\n className={className}\n hasLabel={Boolean(label)}\n {...xstyledProps}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledCheckBox\n device={device}\n checked={checked}\n hasError={hasError}\n $disabled={disabled}\n $applyAriaDisabled={applyAriaDisabled}\n $readOnly={readOnly}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <MainInput />\n </StyledCheckBox>\n {label && (\n <StyledLabel\n id={`${instanceUid}_label`}\n htmlFor={instanceUid}\n $disabled={disabled}\n $applyAriaDisabled={applyAriaDisabled}\n $readOnly={readOnly}\n checked={checked}\n data-testid=\"ds-checkbox-label\"\n wrapLabel={wrapLabel}\n device={device}\n {...(!disabled && (ariaControls || legacyAriaControls) ? { onClick: handleLabelClick } : {})}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {wrapLabel ? (\n <StyledLabelTypography\n component=\"span\"\n variant=\"b2\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {label}\n </StyledLabelTypography>\n ) : (\n <TruncatedTooltipText\n value={label}\n disabled={Boolean(disabled)}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n )}\n </StyledLabel>\n )}\n {readOnly ? (\n // READ_ONLY_HELPER is a display:none, SR-only helper \u2014 intentionally NOT a getOwnerProps\n // injection point (no consumer use case). The slot/data-testid exist only for naming +\n // QA targeting consistency. Tracked in KNOWN_INTENTIONAL_DEVIATIONS.md.\n <StyledHiddenP id={`${instanceUid}-read-only-helper-msg`} data-testid={DSCheckboxDataTestIds.READ_ONLY_HELPER}>\n Read only\n </StyledHiddenP>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A,sDAAC,8BAAU;AAAA;AAAA,QACb;AAAA,QACC,SACC;AAAA,UAAC;AAAA;AAAA,YACC,IAAI,GAAG,WAAW;AAAA,YAClB,SAAS;AAAA,YACT,WAAW;AAAA,YACX,oBAAoB;AAAA,YACpB,WAAW;AAAA,YACX;AAAA,YACA,eAAY;AAAA,YACZ;AAAA,YACA;AAAA,YACC,GAAI,CAAC,aAAa,gBAAgB,sBAAsB,EAAE,SAAS,iBAAiB,IAAI,CAAC;AAAA,YAC1F;AAAA,YACA;AAAA,YAEC,sBACC;AAAA,cAAC;AAAA;AAAA,gBACC,WAAU;AAAA,gBACV,SAAQ;AAAA,gBACR;AAAA,gBACA;AAAA,gBAEC;AAAA;AAAA,YACH,IAEA;AAAA,cAAC;AAAA;AAAA,gBACC,OAAO;AAAA,gBACP,UAAU,QAAQ,QAAQ;AAAA,gBAC1B;AAAA,gBACA;AAAA;AAAA,YACF;AAAA;AAAA,QAEJ;AAAA,QAED;AAAA;AAAA;AAAA;AAAA,UAIC,4CAAC,+BAAc,IAAI,GAAG,WAAW,yBAAyB,eAAa,uCAAsB,kBAAkB,uBAE/G;AAAA,YACE;AAAA;AAAA;AAAA,EACN;AAEJ;",
6
6
  "names": ["React"]
7
7
  }
@@ -38,9 +38,15 @@ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
38
38
  var import_styles = require("../styles.js");
39
39
  var import_ControlledCheckboxCTX = require("../ControlledCheckboxCTX.js");
40
40
  const MainInput = () => {
41
- const { propsWithDefault, globalProps, instanceUid, handleOnChange, handleMixedCheckboxOnKeyDown } = import_react.default.useContext(import_ControlledCheckboxCTX.ControlledCheckBoxContext);
42
41
  const {
43
- disabled,
42
+ propsWithDefault,
43
+ globalProps,
44
+ instanceUid,
45
+ handleOnChange,
46
+ handleMixedCheckboxOnKeyDown,
47
+ handleNativeCheckboxOnKeyDown
48
+ } = import_react.default.useContext(import_ControlledCheckboxCTX.ControlledCheckBoxContext);
49
+ const {
44
50
  // label,
45
51
  tabIndex,
46
52
  innerRef,
@@ -53,7 +59,9 @@ const MainInput = () => {
53
59
  hasError,
54
60
  applyAriaDisabled
55
61
  } = propsWithDefault;
56
- const { readOnly, ...restProps } = globalProps;
62
+ const { disabled, readOnly } = globalProps;
63
+ const restProps = (0, import_ds_props_helpers.omitLockAttributes)(globalProps);
64
+ const locked = (0, import_ds_props_helpers.isLocked)({ disabled, applyAriaDisabled, readOnly });
57
65
  const { "aria-controls": ariaControls } = restProps;
58
66
  const { getOwnerProps, getOwnerPropsArguments } = (0, import_ds_props_helpers.useOwnerProps)(propsWithDefault);
59
67
  const canShowMixedState = ariaControls || camelCaseAriaControls;
@@ -64,14 +72,13 @@ const MainInput = () => {
64
72
  "aria-checked": checked,
65
73
  // if user doesn't provide aria-checked, we make this the same as the actual value
66
74
  "aria-labelledby": outOfTheBoxAriaLabelledBy,
67
- // if the user provides an aria-readonly we still do print it anyway, so this should work for both internal scenarios and final integrations
68
75
  // if the user provides an aria-labelledby we still do print it anyway, so this should work for both internal scenarios and final integrations
69
- ...restProps
70
- // any props provided by the user will over-ride ours
76
+ // any props provided by the user will over-ride ours; while locked the consumer's activation handlers are dropped
77
+ // inversion of control: a consumer-provided aria-readonly passes through in this spread (Dimsum never writes one itself)
78
+ // the mixed-state div has no native change element (its change IS the click / keyboard activation); the native
79
+ // checkbox has one, so its gate is the change
80
+ ...(0, import_ds_props_helpers.omitLockedHandlers)(restProps, locked, canShowMixedState ? "activation" : "change")
71
81
  };
72
- if (readOnly) {
73
- mainInputProps["aria-readonly"] = "true";
74
- }
75
82
  if (visualOnly) return null;
76
83
  if (canShowMixedState)
77
84
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
@@ -80,9 +87,10 @@ const MainInput = () => {
80
87
  ...mainInputProps,
81
88
  role: "checkbox",
82
89
  "aria-controls": ariaControls || camelCaseAriaControls,
83
- "aria-disabled": disabled || applyAriaDisabled || readOnly,
90
+ "aria-disabled": (0, import_ds_props_helpers.resolveAriaDisabled)({ softLocked: locked, consumerValue: restProps["aria-disabled"] }),
91
+ $disabled: Boolean(disabled),
84
92
  "aria-invalid": hasError,
85
- onClick: !disabled && !readOnly ? handleOnChange : void 0,
93
+ onClick: locked ? void 0 : handleOnChange,
86
94
  onKeyDown: handleMixedCheckboxOnKeyDown,
87
95
  tabIndex: disabled ? -1 : tabIndex,
88
96
  innerRef,
@@ -101,12 +109,16 @@ const MainInput = () => {
101
109
  type: "checkbox",
102
110
  checked,
103
111
  onChange: handleOnChange,
104
- onKeyDown: handleMixedCheckboxOnKeyDown,
112
+ onKeyDown: handleNativeCheckboxOnKeyDown,
105
113
  disabled,
106
114
  tabIndex,
107
115
  innerRef,
108
116
  "aria-invalid": hasError,
109
- "aria-disabled": applyAriaDisabled || readOnly,
117
+ "aria-disabled": (0, import_ds_props_helpers.resolveAriaDisabled)({
118
+ disabled,
119
+ softLocked: applyAriaDisabled || readOnly,
120
+ consumerValue: restProps["aria-disabled"]
121
+ }),
110
122
  "aria-describedby": readOnly ? `${instanceUid}-read-only-helper-msg` : void 0,
111
123
  getOwnerProps,
112
124
  getOwnerPropsArguments
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/parts/MainInput.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable complexity */\nimport React from 'react';\nimport { useOwnerProps } from '@elliemae/ds-props-helpers';\nimport { StyledInput, StyledInputMixed } from '../styles.js';\nimport { ControlledCheckBoxContext } from '../ControlledCheckboxCTX.js';\n\nexport const MainInput = () => {\n const { propsWithDefault, globalProps, instanceUid, handleOnChange, handleMixedCheckboxOnKeyDown } =\n React.useContext(ControlledCheckBoxContext);\n const {\n disabled,\n // label,\n tabIndex,\n innerRef,\n checked,\n visualOnly,\n ariaControls: camelCaseAriaControls,\n withRelatedBlockLabel,\n // ariaLabel: camelCaseAriaLabel,\n // externalLabel,\n hasError,\n applyAriaDisabled,\n } = propsWithDefault;\n const { readOnly, ...restProps } = globalProps;\n const { 'aria-controls': ariaControls } = restProps;\n\n const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps(propsWithDefault);\n\n // if components doesn't define 'aria-controls' it would be \"a11y invalid\" to allow 'mixed' state\n // so\n // if they are NOT provided we use <input type='checkbox' /> that has no 'mixed' state support in html5\n // if they ARE provided we use <input /> (no type checkbox) in which we super-charge the 'mixed' state via css\n // props slightly differ because of this\n // also, because of this, \"onChange\" may be an onClick (or keyboard activation) or the native \"onChange\"\n const canShowMixedState = ariaControls || camelCaseAriaControls;\n // if aria-label is provided we are probably printing a 'label-less' checkbox (like data-table, or mixed parent in a group)\n // in such scenarios having the aria-labelledby may results in 'referencing a non-existing element' error\n const outOfTheBoxAriaLabelledBy = !globalProps['aria-label']\n ? `${instanceUid}_label${withRelatedBlockLabel ? ` ${instanceUid}_block_label` : ''}`\n : undefined;\n\n const mainInputProps = {\n id: instanceUid,\n 'data-testid': 'ds-checkbox',\n 'aria-checked': checked, // if user doesn't provide aria-checked, we make this the same as the actual value\n 'aria-labelledby': outOfTheBoxAriaLabelledBy, // if the user provides an aria-readonly we still do print it anyway, so this should work for both internal scenarios and final integrations\n // if the user provides an aria-labelledby we still do print it anyway, so this should work for both internal scenarios and final integrations\n ...restProps, // any props provided by the user will over-ride ours\n };\n\n if (readOnly) {\n mainInputProps['aria-readonly'] = 'true';\n }\n if (visualOnly) return null;\n\n if (canShowMixedState)\n return (\n <StyledInputMixed\n {...mainInputProps}\n role=\"checkbox\"\n aria-controls={ariaControls || camelCaseAriaControls}\n aria-disabled={disabled || applyAriaDisabled || readOnly}\n aria-invalid={hasError}\n onClick={!disabled && !readOnly ? handleOnChange : undefined}\n onKeyDown={handleMixedCheckboxOnKeyDown}\n tabIndex={disabled ? -1 : tabIndex}\n innerRef={innerRef}\n onMouseDown={(e: React.MouseEvent) => {\n if (disabled) e.preventDefault();\n }}\n aria-describedby={readOnly ? `${instanceUid}-read-only-helper-msg` : undefined}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n );\n return (\n <StyledInput\n {...mainInputProps}\n type=\"checkbox\"\n checked={checked as boolean | undefined}\n onChange={handleOnChange}\n onKeyDown={handleMixedCheckboxOnKeyDown}\n disabled={disabled}\n tabIndex={tabIndex}\n innerRef={innerRef}\n aria-invalid={hasError}\n aria-disabled={applyAriaDisabled || readOnly}\n aria-describedby={readOnly ? `${instanceUid}-read-only-helper-msg` : undefined}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADyDjB;AAxDN,mBAAkB;AAClB,8BAA8B;AAC9B,oBAA8C;AAC9C,mCAA0C;AAEnC,MAAM,YAAY,MAAM;AAC7B,QAAM,EAAE,kBAAkB,aAAa,aAAa,gBAAgB,6BAA6B,IAC/F,aAAAA,QAAM,WAAW,sDAAyB;AAC5C,QAAM;AAAA,IACJ;AAAA;AAAA,IAEA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,cAAc;AAAA,IACd;AAAA;AAAA;AAAA,IAGA;AAAA,IACA;AAAA,EACF,IAAI;AACJ,QAAM,EAAE,UAAU,GAAG,UAAU,IAAI;AACnC,QAAM,EAAE,iBAAiB,aAAa,IAAI;AAE1C,QAAM,EAAE,eAAe,uBAAuB,QAAI,uCAAc,gBAAgB;AAQhF,QAAM,oBAAoB,gBAAgB;AAG1C,QAAM,4BAA4B,CAAC,YAAY,YAAY,IACvD,GAAG,WAAW,SAAS,wBAAwB,IAAI,WAAW,iBAAiB,EAAE,KACjF;AAEJ,QAAM,iBAAiB;AAAA,IACrB,IAAI;AAAA,IACJ,eAAe;AAAA,IACf,gBAAgB;AAAA;AAAA,IAChB,mBAAmB;AAAA;AAAA;AAAA,IAEnB,GAAG;AAAA;AAAA,EACL;AAEA,MAAI,UAAU;AACZ,mBAAe,eAAe,IAAI;AAAA,EACpC;AACA,MAAI,WAAY,QAAO;AAEvB,MAAI;AACF,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,MAAK;AAAA,QACL,iBAAe,gBAAgB;AAAA,QAC/B,iBAAe,YAAY,qBAAqB;AAAA,QAChD,gBAAc;AAAA,QACd,SAAS,CAAC,YAAY,CAAC,WAAW,iBAAiB;AAAA,QACnD,WAAW;AAAA,QACX,UAAU,WAAW,KAAK;AAAA,QAC1B;AAAA,QACA,aAAa,CAAC,MAAwB;AACpC,cAAI,SAAU,GAAE,eAAe;AAAA,QACjC;AAAA,QACA,oBAAkB,WAAW,GAAG,WAAW,0BAA0B;AAAA,QACrE;AAAA,QACA;AAAA;AAAA,IACF;AAEJ,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,MAAK;AAAA,MACL;AAAA,MACA,UAAU;AAAA,MACV,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA,gBAAc;AAAA,MACd,iBAAe,qBAAqB;AAAA,MACpC,oBAAkB,WAAW,GAAG,WAAW,0BAA0B;AAAA,MACrE;AAAA,MACA;AAAA;AAAA,EACF;AAEJ;",
4
+ "sourcesContent": ["/* eslint-disable complexity */\nimport React from 'react';\nimport { omitLockAttributes, useOwnerProps, omitLockedHandlers, isLocked, resolveAriaDisabled } from '@elliemae/ds-props-helpers';\nimport { StyledInput, StyledInputMixed } from '../styles.js';\nimport { ControlledCheckBoxContext } from '../ControlledCheckboxCTX.js';\n\nexport const MainInput = () => {\n const {\n propsWithDefault,\n globalProps,\n instanceUid,\n handleOnChange,\n handleMixedCheckboxOnKeyDown,\n handleNativeCheckboxOnKeyDown,\n } = React.useContext(ControlledCheckBoxContext);\n const {\n // label,\n tabIndex,\n innerRef,\n checked,\n visualOnly,\n ariaControls: camelCaseAriaControls,\n withRelatedBlockLabel,\n // ariaLabel: camelCaseAriaLabel,\n // externalLabel,\n hasError,\n applyAriaDisabled,\n } = propsWithDefault;\n // disabled is a global attribute: it is taken out of the spread here, so the mixed-state div never prints it\n // (the native input sets it explicitly below)\n const { disabled, readOnly } = globalProps;\n const restProps = omitLockAttributes(globalProps);\n const locked = isLocked({ disabled, applyAriaDisabled, readOnly });\n const { 'aria-controls': ariaControls } = restProps;\n\n const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps(propsWithDefault);\n\n // if components doesn't define 'aria-controls' it would be \"a11y invalid\" to allow 'mixed' state\n // so\n // if they are NOT provided we use <input type='checkbox' /> that has no 'mixed' state support in html5\n // if they ARE provided we use <input /> (no type checkbox) in which we super-charge the 'mixed' state via css\n // props slightly differ because of this\n // also, because of this, \"onChange\" may be an onClick (or keyboard activation) or the native \"onChange\"\n const canShowMixedState = ariaControls || camelCaseAriaControls;\n // if aria-label is provided we are probably printing a 'label-less' checkbox (like data-table, or mixed parent in a group)\n // in such scenarios having the aria-labelledby may results in 'referencing a non-existing element' error\n const outOfTheBoxAriaLabelledBy = !globalProps['aria-label']\n ? `${instanceUid}_label${withRelatedBlockLabel ? ` ${instanceUid}_block_label` : ''}`\n : undefined;\n\n const mainInputProps = {\n id: instanceUid,\n 'data-testid': 'ds-checkbox',\n 'aria-checked': checked, // if user doesn't provide aria-checked, we make this the same as the actual value\n 'aria-labelledby': outOfTheBoxAriaLabelledBy,\n // if the user provides an aria-labelledby we still do print it anyway, so this should work for both internal scenarios and final integrations\n // any props provided by the user will over-ride ours; while locked the consumer's activation handlers are dropped\n // inversion of control: a consumer-provided aria-readonly passes through in this spread (Dimsum never writes one itself)\n // the mixed-state div has no native change element (its change IS the click / keyboard activation); the native\n // checkbox has one, so its gate is the change\n ...omitLockedHandlers(restProps, locked, canShowMixedState ? 'activation' : 'change'),\n };\n\n if (visualOnly) return null;\n\n if (canShowMixedState)\n return (\n <StyledInputMixed\n {...mainInputProps}\n role=\"checkbox\"\n aria-controls={ariaControls || camelCaseAriaControls}\n // a locked mixed checkbox prints \"true\" whatever the consumer passes, otherwise the consumer's own value passes\n aria-disabled={resolveAriaDisabled({ softLocked: locked, consumerValue: restProps['aria-disabled'] })}\n $disabled={Boolean(disabled)}\n aria-invalid={hasError}\n onClick={locked ? undefined : handleOnChange}\n onKeyDown={handleMixedCheckboxOnKeyDown}\n tabIndex={disabled ? -1 : tabIndex}\n innerRef={innerRef}\n onMouseDown={(e: React.MouseEvent) => {\n if (disabled) e.preventDefault();\n }}\n aria-describedby={readOnly ? `${instanceUid}-read-only-helper-msg` : undefined}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n );\n return (\n <StyledInput\n {...mainInputProps}\n type=\"checkbox\"\n checked={checked as boolean | undefined}\n onChange={handleOnChange}\n onKeyDown={handleNativeCheckboxOnKeyDown}\n disabled={disabled}\n tabIndex={tabIndex}\n innerRef={innerRef}\n aria-invalid={hasError}\n // a soft lock prints \"true\" whatever the consumer passes, a natively disabled checkbox prints none of its own,\n // otherwise the consumer's own aria-disabled passes through (inversion of control)\n aria-disabled={resolveAriaDisabled({\n disabled: disabled,\n softLocked: applyAriaDisabled || readOnly,\n consumerValue: restProps['aria-disabled'],\n })}\n aria-describedby={readOnly ? `${instanceUid}-read-only-helper-msg` : undefined}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADmEjB;AAlEN,mBAAkB;AAClB,8BAAqG;AACrG,oBAA8C;AAC9C,mCAA0C;AAEnC,MAAM,YAAY,MAAM;AAC7B,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,aAAAA,QAAM,WAAW,sDAAyB;AAC9C,QAAM;AAAA;AAAA,IAEJ;AAAA,IACA;AAAA,IACA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A,MACL;AAAA,MACA,UAAU;AAAA,MACV,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA,gBAAc;AAAA,MAGd,qBAAe,6CAAoB;AAAA,QACjC;AAAA,QACA,YAAY,qBAAqB;AAAA,QACjC,eAAe,UAAU,eAAe;AAAA,MAC1C,CAAC;AAAA,MACD,oBAAkB,WAAW,GAAG,WAAW,0BAA0B;AAAA,MACrE;AAAA,MACA;AAAA;AAAA,EACF;AAEJ;",
6
6
  "names": ["React"]
7
7
  }
@@ -69,9 +69,11 @@ const propTypes = {
69
69
  hasError: import_ds_props_helpers.PropTypes.bool.description("Whether the checkbox has error or not.").defaultValue(false),
70
70
  disabled: import_ds_props_helpers.PropTypes.bool.description("Whether the checkbox is disabled or not.").defaultValue(false),
71
71
  applyAriaDisabled: import_ds_props_helpers.PropTypes.bool.description(
72
- "Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. PREVENTS ONLY MAIN ACTION."
72
+ "Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. WITHHOLDS THE CHANGE: onChange is not called and the checked state does not change. Clicks and keys are only observed (they still reach your handlers), except on the mixed-state checkbox (rendered with aria-controls), which has no native change element: there click, Enter and Space are withheld too."
73
+ ).defaultValue(false),
74
+ readOnly: import_ds_props_helpers.PropTypes.bool.description(
75
+ 'Soft lock, same as applyAriaDisabled: aria-disabled="true", CAN STILL RECEIVE FOCUS, WITHHOLDS THE CHANGE: onChange is not called and the checked state does not change. Clicks and keys are only observed (they still reach your handlers), except on the mixed-state checkbox (rendered with aria-controls), which has no native change element: there click, Enter and Space are withheld too. Also announces "Read only" through a hidden description. Dimsum never writes aria-readonly.'
73
76
  ).defaultValue(false),
74
- readOnly: import_ds_props_helpers.PropTypes.bool.description("Whether the checkbox is readOnly or not.").defaultValue(false),
75
77
  wrapLabel: import_ds_props_helpers.PropTypes.bool.description("Whether to wrap or truncate the label").defaultValue(false),
76
78
  withRelatedBlockLabel: import_ds_props_helpers.PropTypes.bool.description("wheter the autogenerated aria-labelledby should also include a reference to the block label").defaultValue(false),
77
79
  device: import_ds_props_helpers.PropTypes.oneOf(Object.values(import_device.DEVICE)).description(
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/react-desc-prop-types.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import type React from 'react';\nimport type { GlobalAttributesT } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n getPropsPerSlotPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSCheckboxName, DSCheckboxSlots } from './constants/index.js';\nimport { DEVICE } from './constants/device.js';\n\nexport declare namespace DSControlledCheckboxT {\n type DevicesKeys = keyof typeof DEVICE;\n type Devices = (typeof DEVICE)[DevicesKeys];\n\n export type SlotFunctionArguments = {\n dsCheckboxRoot: () => object;\n dsCheckboxInputWrapper: () => object;\n dsCheckboxInput: () => object;\n dsCheckboxLabel: () => object;\n dsCheckboxLabelTypography: () => object;\n dsCheckboxReadOnlyHelper: () => object;\n dsCheckboxTruncatedLabel: () => object;\n dsCheckboxTooltipContainer: () => object;\n dsCheckboxTooltipText: () => object;\n };\n\n export interface RequiredProps {}\n\n export interface DefaultProps {\n checked: boolean | 'mixed';\n tabIndex: TypescriptHelpersT.WCAGTabIndex;\n hasError: boolean;\n wrapLabel: boolean;\n disabled: boolean;\n applyAriaDisabled: boolean;\n readOnly: boolean;\n visualOnly: boolean;\n withRelatedBlockLabel: boolean;\n onChange: (\n newVal: boolean,\n e:\n | React.ChangeEvent<HTMLInputElement>\n | React.MouseEvent<HTMLLabelElement>\n | React.MouseEvent<HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>,\n ) => void;\n }\n\n export interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSCheckboxName,\n typeof DSCheckboxSlots\n > {\n onKeyDown?: React.KeyboardEventHandler;\n innerRef?: React.MutableRefObject<HTMLInputElement | null> | React.RefCallback<HTMLInputElement>;\n 'data-testid'?: string;\n device?: Devices;\n }\n\n export interface LegacyAriaProps {\n ariaControls?: string;\n ariaLabel?: string;\n }\n\n export interface Props\n extends\n Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT, keyof DefaultProps | keyof OptionalProps>,\n LegacyAriaProps {}\n\n export interface InternalProps\n extends\n DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT, keyof DefaultProps | keyof OptionalProps>,\n LegacyAriaProps {}\n\n export interface StyledCheckBoxT {\n checked: boolean | 'mixed';\n readOnly?: boolean;\n hasError?: boolean;\n disabled?: boolean;\n applyAriaDisabled?: boolean;\n device?: Devices;\n }\n\n export interface StyledLabelT {\n disabled?: boolean;\n applyAriaDisabled?: boolean;\n readOnly?: boolean;\n checked: boolean | 'mixed';\n wrapLabel: boolean;\n device?: Devices;\n }\n}\n\nexport const defaultProps: DSControlledCheckboxT.DefaultProps = {\n wrapLabel: false,\n hasError: false,\n checked: false,\n disabled: false,\n applyAriaDisabled: false,\n readOnly: false,\n tabIndex: 0,\n onChange: () => {},\n visualOnly: false,\n withRelatedBlockLabel: false,\n};\n\nexport const propTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n ...getPropsPerSlotPropTypes(DSCheckboxName, DSCheckboxSlots),\n checked: PropTypes.oneOfType([PropTypes.bool, PropTypes.string])\n .description('Wheter the checkbox is set as bool or mixed')\n .isRequiredIf((props: DSControlledCheckboxT.Props) => !props.disabled && !props.readOnly)\n .defaultValue(false),\n onChange: PropTypes.func\n .description('function executed when the checkbox changes state')\n .signature('(( newIsChecked: boolean, e: React.SyntheticEvent ) => void )')\n .isRequiredIf(\n (props: DSControlledCheckboxT.Props) => !props.disabled && !props.readOnly && !props.applyAriaDisabled,\n ),\n 'aria-controls': PropTypes.string\n .description('a11y required attribute when \"mixed\" state is to be supported')\n .isRequiredIf(\n (props: DSControlledCheckboxT.Props) => props.checked === 'mixed' && typeof props.ariaControls !== 'string',\n ),\n ariaControls: PropTypes.string\n .description('deprecated equivalent of \"aria-controls\", please use \"aria-controls\" instead')\n .deprecated({ version: '3.x', message: 'use \"aria-controls\" instead' })\n .isRequiredIf(\n (props: DSControlledCheckboxT.Props) => props.checked === 'mixed' && typeof props['aria-controls'] !== 'string',\n ),\n label: PropTypes.string.description(\n 'Checkbox Label property. This label is also going to be used as an aria-label for screen readers.',\n ),\n hasError: PropTypes.bool.description('Whether the checkbox has error or not.').defaultValue(false),\n disabled: PropTypes.bool.description('Whether the checkbox is disabled or not.').defaultValue(false),\n applyAriaDisabled: PropTypes.bool\n .description(\n 'Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. PREVENTS ONLY MAIN ACTION.',\n )\n .defaultValue(false),\n readOnly: PropTypes.bool.description('Whether the checkbox is readOnly or not.').defaultValue(false),\n wrapLabel: PropTypes.bool.description('Whether to wrap or truncate the label').defaultValue(false),\n withRelatedBlockLabel: PropTypes.bool\n .description('wheter the autogenerated aria-labelledby should also include a reference to the block label')\n .defaultValue(false),\n device: PropTypes.oneOf(Object.values(DEVICE)).description(\n 'When not provide will scale via css breakpoint media queries, if provided, breakpoint will be ignored in favor of explicit devide declaration',\n ),\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).description('Checkbox input ref.'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,8BAKO;AAEP,uBAAgD;AAChD,oBAAuB;AAwFhB,MAAM,eAAmD;AAAA,EAC9D,WAAW;AAAA,EACX,UAAU;AAAA,EACV,SAAS;AAAA,EACT,UAAU;AAAA,EACV,mBAAmB;AAAA,EACnB,UAAU;AAAA,EACV,UAAU;AAAA,EACV,UAAU,MAAM;AAAA,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AAAA,EACrB,QAAQ,kCAAU,MAAM,OAAO,OAAO,oBAAM,CAAC,EAAE;AAAA,IAC7C;AAAA,EACF;AAAA,EACA,UAAU,kCAAU,UAAU,CAAC,kCAAU,MAAM,kCAAU,MAAM,CAAC,EAAE,YAAY,qBAAqB;AACrG;",
4
+ "sourcesContent": ["import type React from 'react';\nimport type { GlobalAttributesT } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n getPropsPerSlotPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSCheckboxName, DSCheckboxSlots } from './constants/index.js';\nimport { DEVICE } from './constants/device.js';\n\nexport declare namespace DSControlledCheckboxT {\n type DevicesKeys = keyof typeof DEVICE;\n type Devices = (typeof DEVICE)[DevicesKeys];\n\n export type SlotFunctionArguments = {\n dsCheckboxRoot: () => object;\n dsCheckboxInputWrapper: () => object;\n dsCheckboxInput: () => object;\n dsCheckboxLabel: () => object;\n dsCheckboxLabelTypography: () => object;\n dsCheckboxReadOnlyHelper: () => object;\n dsCheckboxTruncatedLabel: () => object;\n dsCheckboxTooltipContainer: () => object;\n dsCheckboxTooltipText: () => object;\n };\n\n export interface RequiredProps {}\n\n export interface DefaultProps {\n checked: boolean | 'mixed';\n tabIndex: TypescriptHelpersT.WCAGTabIndex;\n hasError: boolean;\n wrapLabel: boolean;\n disabled: boolean;\n applyAriaDisabled: boolean;\n readOnly: boolean;\n visualOnly: boolean;\n withRelatedBlockLabel: boolean;\n onChange: (\n newVal: boolean,\n e:\n | React.ChangeEvent<HTMLInputElement>\n | React.MouseEvent<HTMLLabelElement>\n | React.MouseEvent<HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>,\n ) => void;\n }\n\n export interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSCheckboxName,\n typeof DSCheckboxSlots\n > {\n onKeyDown?: React.KeyboardEventHandler;\n innerRef?: React.MutableRefObject<HTMLInputElement | null> | React.RefCallback<HTMLInputElement>;\n 'data-testid'?: string;\n device?: Devices;\n }\n\n export interface LegacyAriaProps {\n ariaControls?: string;\n ariaLabel?: string;\n }\n\n export interface Props\n extends\n Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT, keyof DefaultProps | keyof OptionalProps>,\n LegacyAriaProps {}\n\n export interface InternalProps\n extends\n DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT, keyof DefaultProps | keyof OptionalProps>,\n LegacyAriaProps {}\n\n export interface StyledCheckBoxT {\n checked: boolean | 'mixed';\n $readOnly?: boolean;\n hasError?: boolean;\n $disabled?: boolean;\n $applyAriaDisabled?: boolean;\n device?: Devices;\n }\n\n export interface StyledLabelT {\n $disabled?: boolean;\n $applyAriaDisabled?: boolean;\n $readOnly?: boolean;\n checked: boolean | 'mixed';\n wrapLabel: boolean;\n device?: Devices;\n }\n}\n\nexport const defaultProps: DSControlledCheckboxT.DefaultProps = {\n wrapLabel: false,\n hasError: false,\n checked: false,\n disabled: false,\n applyAriaDisabled: false,\n readOnly: false,\n tabIndex: 0,\n onChange: () => {},\n visualOnly: false,\n withRelatedBlockLabel: false,\n};\n\nexport const propTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n ...getPropsPerSlotPropTypes(DSCheckboxName, DSCheckboxSlots),\n checked: PropTypes.oneOfType([PropTypes.bool, PropTypes.string])\n .description('Wheter the checkbox is set as bool or mixed')\n .isRequiredIf((props: DSControlledCheckboxT.Props) => !props.disabled && !props.readOnly)\n .defaultValue(false),\n onChange: PropTypes.func\n .description('function executed when the checkbox changes state')\n .signature('(( newIsChecked: boolean, e: React.SyntheticEvent ) => void )')\n .isRequiredIf(\n (props: DSControlledCheckboxT.Props) => !props.disabled && !props.readOnly && !props.applyAriaDisabled,\n ),\n 'aria-controls': PropTypes.string\n .description('a11y required attribute when \"mixed\" state is to be supported')\n .isRequiredIf(\n (props: DSControlledCheckboxT.Props) => props.checked === 'mixed' && typeof props.ariaControls !== 'string',\n ),\n ariaControls: PropTypes.string\n .description('deprecated equivalent of \"aria-controls\", please use \"aria-controls\" instead')\n .deprecated({ version: '3.x', message: 'use \"aria-controls\" instead' })\n .isRequiredIf(\n (props: DSControlledCheckboxT.Props) => props.checked === 'mixed' && typeof props['aria-controls'] !== 'string',\n ),\n label: PropTypes.string.description(\n 'Checkbox Label property. This label is also going to be used as an aria-label for screen readers.',\n ),\n hasError: PropTypes.bool.description('Whether the checkbox has error or not.').defaultValue(false),\n disabled: PropTypes.bool.description('Whether the checkbox is disabled or not.').defaultValue(false),\n applyAriaDisabled: PropTypes.bool\n .description(\n 'Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. WITHHOLDS THE CHANGE: onChange is not called and the checked state does not change. Clicks and keys are only observed (they still reach your handlers), except on the mixed-state checkbox (rendered with aria-controls), which has no native change element: there click, Enter and Space are withheld too.',\n )\n .defaultValue(false),\n readOnly: PropTypes.bool\n .description(\n 'Soft lock, same as applyAriaDisabled: aria-disabled=\"true\", CAN STILL RECEIVE FOCUS, WITHHOLDS THE CHANGE: onChange is not called and the checked state does not change. Clicks and keys are only observed (they still reach your handlers), except on the mixed-state checkbox (rendered with aria-controls), which has no native change element: there click, Enter and Space are withheld too. Also announces \"Read only\" through a hidden description. Dimsum never writes aria-readonly.',\n )\n .defaultValue(false),\n wrapLabel: PropTypes.bool.description('Whether to wrap or truncate the label').defaultValue(false),\n withRelatedBlockLabel: PropTypes.bool\n .description('wheter the autogenerated aria-labelledby should also include a reference to the block label')\n .defaultValue(false),\n device: PropTypes.oneOf(Object.values(DEVICE)).description(\n 'When not provide will scale via css breakpoint media queries, if provided, breakpoint will be ignored in favor of explicit devide declaration',\n ),\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).description('Checkbox input ref.'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAA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,EACnG,mBAAmB,kCAAU,KAC1B;AAAA,IACC;AAAA,EACF,EACC,aAAa,KAAK;AAAA,EACrB,UAAU,kCAAU,KACjB;AAAA,IACC;AAAA,EACF,EACC,aAAa,KAAK;AAAA,EACrB,WAAW,kCAAU,KAAK,YAAY,uCAAuC,EAAE,aAAa,KAAK;AAAA,EACjG,uBAAuB,kCAAU,KAC9B,YAAY,6FAA6F,EACzG,aAAa,KAAK;AAAA,EACrB,QAAQ,kCAAU,MAAM,OAAO,OAAO,oBAAM,CAAC,EAAE;AAAA,IAC7C;AAAA,EACF;AAAA,EACA,UAAU,kCAAU,UAAU,CAAC,kCAAU,MAAM,kCAAU,MAAM,CAAC,EAAE,YAAY,qBAAqB;AACrG;",
6
6
  "names": []
7
7
  }
@@ -47,7 +47,7 @@ const StyledCheckBox = (0, import_ds_system.styled)("span", {
47
47
  slot: import_constants.DSCheckboxSlots.INPUT_WRAPPER
48
48
  })`
49
49
  position: relative;
50
- background: ${({ theme, disabled, applyAriaDisabled, readOnly }) => (0, import_styleHelpers.handleBackgroundColor)(theme, disabled, applyAriaDisabled, readOnly)};
50
+ background: ${({ theme, $disabled, $applyAriaDisabled, $readOnly }) => (0, import_styleHelpers.handleBackgroundColor)(theme, $disabled, $applyAriaDisabled, $readOnly)};
51
51
 
52
52
  ${({ device, theme }) => {
53
53
  if (device === "mobile") {
@@ -79,7 +79,7 @@ const StyledCheckBox = (0, import_ds_system.styled)("span", {
79
79
  `;
80
80
  }}
81
81
 
82
- ${({ theme, checked, disabled, applyAriaDisabled, readOnly, hasError, device }) => (0, import_styleHelpers.handleCheckmark)(theme, checked, disabled, applyAriaDisabled, readOnly, hasError, false, device)}
82
+ ${({ theme, checked, $disabled, $applyAriaDisabled, $readOnly, hasError, device }) => (0, import_styleHelpers.handleCheckmark)(theme, checked, $disabled, $applyAriaDisabled, $readOnly, hasError, false, device)}
83
83
 
84
84
  &:after {
85
85
  content: '';
@@ -92,22 +92,22 @@ const StyledCheckBox = (0, import_ds_system.styled)("span", {
92
92
  border: 1px solid ${({ theme, hasError }) => hasError ? theme.colors.danger[900] : theme.colors.neutral[400]};
93
93
  }
94
94
  &:hover {
95
- background: ${({ theme, applyAriaDisabled, disabled, readOnly }) => !disabled && !applyAriaDisabled && !readOnly ? theme.colors.brand[200] : void 0};
95
+ background: ${({ theme, $applyAriaDisabled, $disabled, $readOnly }) => !$disabled && !$applyAriaDisabled && !$readOnly ? theme.colors.brand[200] : void 0};
96
96
 
97
97
  &:after {
98
98
  border: 1px solid
99
- ${({ theme, hasError, disabled, applyAriaDisabled, readOnly }) => {
99
+ ${({ theme, hasError, $disabled, $applyAriaDisabled, $readOnly }) => {
100
100
  if (hasError) return theme.colors.danger[900];
101
- if (applyAriaDisabled || readOnly) return theme.colors.brand[700];
102
- if (disabled) return theme.colors.neutral[400];
101
+ if ($applyAriaDisabled || $readOnly) return theme.colors.brand[700];
102
+ if ($disabled) return theme.colors.neutral[400];
103
103
  return theme.colors.brand[600];
104
104
  }};
105
105
  }
106
106
  }
107
107
  &:focus-within {
108
- background: ${({ theme, checked, disabled, applyAriaDisabled, readOnly, hasError }) => checked === true && !disabled && !applyAriaDisabled && !readOnly && !hasError ? theme.colors.brand[200] : void 0};
108
+ background: ${({ theme, checked, $disabled, $applyAriaDisabled, $readOnly, hasError }) => checked === true && !$disabled && !$applyAriaDisabled && !$readOnly && !hasError ? theme.colors.brand[200] : void 0};
109
109
  &:hover {
110
- ${({ theme, checked, disabled, applyAriaDisabled, readOnly, hasError, device }) => (0, import_styleHelpers.handleCheckmark)(theme, checked, disabled, applyAriaDisabled, readOnly, hasError, true, device)}
110
+ ${({ theme, checked, $disabled, $applyAriaDisabled, $readOnly, hasError, device }) => (0, import_styleHelpers.handleCheckmark)(theme, checked, $disabled, $applyAriaDisabled, $readOnly, hasError, true, device)}
111
111
  }
112
112
  &:after {
113
113
  border: 2px solid ${({ theme }) => theme.colors.brand[700]};
@@ -115,7 +115,7 @@ const StyledCheckBox = (0, import_ds_system.styled)("span", {
115
115
  }
116
116
  &:active {
117
117
  &:after {
118
- border: ${({ disabled, theme }) => disabled ? `1px solid ${theme.colors.neutral[400]}` : `1px solid ${theme.colors.brand[600]}`};
118
+ border: ${({ $disabled, theme }) => $disabled ? `1px solid ${theme.colors.neutral[400]}` : `1px solid ${theme.colors.brand[600]}`};
119
119
  }
120
120
  }
121
121
  `;
@@ -136,21 +136,14 @@ const StyledInput = (0, import_ds_system.styled)("input", {
136
136
  slot: import_constants.DSCheckboxSlots.INPUT
137
137
  })`
138
138
  ${checkboxStyles}
139
- &:disabled {
140
- cursor: not-allowed;
141
- }
142
- &[aria-disabled='true'] {
143
- cursor: not-allowed;
144
- }
139
+ ${import_ds_system.lockedStateInteractionCss}
145
140
  `;
146
141
  const StyledInputMixed = (0, import_ds_system.styled)("div", {
147
142
  name: import_constants.DSCheckboxName,
148
143
  slot: import_constants.DSCheckboxSlots.INPUT
149
144
  })`
150
145
  ${checkboxStyles}
151
- ${({ "aria-disabled": disabled }) => disabled ? `&:hover {
152
- cursor: not-allowed;
153
- }` : ""}
146
+ ${import_ds_system.lockedStateInteractionCss}
154
147
  `;
155
148
  const StyledLabel = (0, import_ds_system.styled)("label", {
156
149
  name: import_constants.DSCheckboxName,
@@ -162,14 +155,11 @@ const StyledLabel = (0, import_ds_system.styled)("label", {
162
155
  word-break: break-word;
163
156
  `};
164
157
  width: fit-content;
165
- color: ${({ theme, disabled }) => disabled ? theme.colors.neutral[500] : theme.colors.neutral[700]};
158
+ color: ${({ theme, $disabled }) => $disabled ? theme.colors.neutral[500] : theme.colors.neutral[700]};
166
159
  /* Typography metrics delegated to child DSTypography b2 */
167
160
  display: inherit;
168
- ${({ disabled }) => disabled ? `&:hover {
169
- cursor: not-allowed;
170
- }` : `&:hover {
171
- cursor: pointer;
172
- }`}
161
+ cursor: pointer;
162
+ ${import_ds_system.lockedStateInteractionCss}
173
163
  `;
174
164
  const StyledLabelTypography = (0, import_ds_system.styled)(import_ds_typography.DSTypography, {
175
165
  name: import_constants.DSCheckboxName,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/styles.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable max-lines */\nimport { styled, css, xStyledCommonProps } from '@elliemae/ds-system';\nimport { DSTypography } from '@elliemae/ds-typography';\nimport type { DSControlledCheckboxT } from './react-desc-prop-types.js';\nimport { handleBackgroundColor, handleCheckmark } from './utils/styleHelpers.js';\nimport { DSCheckboxName, DSCheckboxSlots } from './constants/index.js';\n\nexport const StyledCheckBox = styled('span', {\n name: DSCheckboxName,\n slot: DSCheckboxSlots.INPUT_WRAPPER,\n})<DSControlledCheckboxT.StyledCheckBoxT>`\n position: relative;\n background: ${({ theme, disabled, applyAriaDisabled, readOnly }) =>\n handleBackgroundColor(theme, disabled, applyAriaDisabled, readOnly)};\n\n ${({ device, theme }) => {\n if (device === 'mobile') {\n return ` \n @media (max-width: ${theme.breakpoints.small}) {\n width: 1.5rem; /* 24px / 16 */\n height: 1.5rem; /* 24px / 16 */\n }\n width: 1.846rem; /* 24px / 13 */\n height: 1.846rem; /* 24px / 13 */`;\n }\n if (device === undefined) {\n return `\n @media (max-width: ${theme.breakpoints.small}) {\n width: 1.5rem; /* 24px / 16 */\n height: 1.5rem; /* 24px / 16 */\n }\n width: 1.2307rem;\n height: 1.2307rem;\n `;\n }\n return `\n @media (max-width: ${theme.breakpoints.small}) {\n width: 1rem; /* 16px / 16 */\n height: 1rem; /* 16px / 16 */\n }\n width: 1.2307rem; /* 16px / 13 */\n height: 1.2307rem; /* 16px / 13 */\n `;\n }}\n\n ${({ theme, checked, disabled, applyAriaDisabled, readOnly, hasError, device }) =>\n handleCheckmark(theme, checked, disabled, applyAriaDisabled, readOnly, hasError, false, device)}\n\n &:after {\n content: '';\n border-radius: 2px;\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n border: 1px solid ${({ theme, hasError }) => (hasError ? theme.colors.danger[900] : theme.colors.neutral[400])};\n }\n &:hover {\n background: ${({ theme, applyAriaDisabled, disabled, readOnly }) =>\n !disabled && !applyAriaDisabled && !readOnly ? theme.colors.brand[200] : undefined};\n\n &:after {\n border: 1px solid\n ${({ theme, hasError, disabled, applyAriaDisabled, readOnly }) => {\n if (hasError) return theme.colors.danger[900];\n if (applyAriaDisabled || readOnly) return theme.colors.brand[700];\n if (disabled) return theme.colors.neutral[400];\n return theme.colors.brand[600];\n }};\n }\n }\n &:focus-within {\n background: ${({ theme, checked, disabled, applyAriaDisabled, readOnly, hasError }) =>\n checked === true && !disabled && !applyAriaDisabled && !readOnly && !hasError\n ? theme.colors.brand[200]\n : undefined};\n &:hover {\n ${({ theme, checked, disabled, applyAriaDisabled, readOnly, hasError, device }) =>\n handleCheckmark(theme, checked, disabled, applyAriaDisabled, readOnly, hasError, true, device)}\n }\n &:after {\n border: 2px solid ${({ theme }) => theme.colors.brand[700]};\n }\n }\n &:active {\n &:after {\n border: ${({ disabled, theme }) =>\n disabled ? `1px solid ${theme.colors.neutral[400]}` : `1px solid ${theme.colors.brand[600]}`};\n }\n }\n`;\n\nconst checkboxStyles = css`\n &:hover {\n cursor: pointer;\n }\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n opacity: 0;\n z-index: 1;\n`;\n\nexport const StyledInput = styled('input', {\n name: DSCheckboxName,\n slot: DSCheckboxSlots.INPUT,\n})`\n ${checkboxStyles}\n &:disabled {\n cursor: not-allowed;\n }\n &[aria-disabled='true'] {\n cursor: not-allowed;\n }\n`;\n\nexport const StyledInputMixed = styled('div', {\n name: DSCheckboxName,\n slot: DSCheckboxSlots.INPUT,\n})`\n ${checkboxStyles}\n ${({ 'aria-disabled': disabled }) =>\n disabled\n ? `&:hover {\n cursor: not-allowed;\n }`\n : ''}\n`;\n\nexport const StyledLabel = styled('label', {\n name: DSCheckboxName,\n slot: DSCheckboxSlots.LABEL,\n})<DSControlledCheckboxT.StyledLabelT>`\n ${({ wrapLabel }) =>\n wrapLabel &&\n `\n overflow-wrap: break-word;\n white-space: pre-wrap;\n word-break: break-word;\n`};\n width: fit-content;\n color: ${({ theme, disabled }) => (disabled ? theme.colors.neutral[500] : theme.colors.neutral[700])};\n /* Typography metrics delegated to child DSTypography b2 */\n display: inherit;\n ${({ disabled }) =>\n disabled\n ? `&:hover {\n cursor: not-allowed;\n }`\n : `&:hover {\n cursor: pointer;\n }`}\n`;\n\nexport const StyledLabelTypography = styled(DSTypography, {\n name: DSCheckboxName,\n slot: DSCheckboxSlots.LABEL_TYPOGRAPHY,\n})``;\n\nexport const StyledContainer = styled('div', {\n name: DSCheckboxName,\n slot: DSCheckboxSlots.CONTAINER,\n})<{ device?: 'mobile' | 'desktop'; wrapLabel?: boolean; hasLabel: boolean }>`\n ${({ device, theme }) => {\n if (device === 'mobile') {\n return ` \n @media (max-width: ${theme.breakpoints.small}) {\n grid-template-columns: 1.5rem auto; /* 24px / 16px */\n }\n grid-template-columns: 1.846rem auto;\n `;\n }\n if (device === undefined) {\n return `\n @media (max-width: ${theme.breakpoints.small}) {\n grid-template-columns: 1.5rem auto;\n }\n grid-template-columns: 1.23rem auto;\n `;\n }\n return `\n @media (max-width: ${theme.breakpoints.small}) {\n grid-template-columns: 1rem auto; /* 16px / 16px */\n }\n grid-template-columns: 1.2307rem auto; /* 16px / 13 */\n\n `;\n }}\n column-gap: ${({ hasLabel }) => (hasLabel ? '8px' : '0px')};\n display: inline-grid;\n grid-template-rows: min-content;\n align-items: ${({ wrapLabel }) => (wrapLabel ? 'flex-start' : 'center')};\n ${xStyledCommonProps}\n`;\n\nexport const StyledHiddenP = styled('p', {\n name: DSCheckboxName,\n slot: DSCheckboxSlots.READ_ONLY_HELPER,\n})`\n display: none;\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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AAM,iCAAgB;AACxB,CAAC;AAAA,IACG,CAAC,EAAE,UAAU,MACb,aACA;AAAA;AAAA;AAAA;AAAA,CAIH;AAAA;AAAA,WAEU,CAAC,EAAE,OAAO,SAAS,MAAO,WAAW,MAAM,OAAO,QAAQ,GAAG,IAAI,MAAM,OAAO,QAAQ,GAAG,CAAE;AAAA;AAAA;AAAA,IAGlG,CAAC,EAAE,SAAS,MACZ,WACI;AAAA;AAAA,OAGA;AAAA;AAAA,IAEJ;AAAA;AAGG,MAAM,4BAAwB,yBAAO,mCAAc;AAAA,EACxD,MAAM;AAAA,EACN,MAAM,iCAAgB;AACxB,CAAC;AAEM,MAAM,sBAAkB,yBAAO,OAAO;AAAA,EAC3C,MAAM;AAAA,EACN,MAAM,iCAAgB;AACxB,CAAC;AAAA,IACG,CAAC,EAAE,QAAQ,MAAM,MAAM;AACvB,MAAI,WAAW,UAAU;AACvB,WAAO;AAAA,2BACc,MAAM,YAAY,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,EAK9C;AACA,MAAI,WAAW,QAAW;AACxB,WAAO;AAAA,6BACgB,MAAM,YAAY,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,EAKhD;AACA,SAAO;AAAA,yBACc,MAAM,YAAY,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAM9C,CAAC;AAAA,gBACa,CAAC,EAAE,SAAS,MAAO,WAAW,QAAQ,KAAM;AAAA;AAAA;AAAA,iBAG3C,CAAC,EAAE,UAAU,MAAO,YAAY,eAAe,QAAS;AAAA,IACrE,mCAAkB;AAAA;AAGf,MAAM,oBAAgB,yBAAO,KAAK;AAAA,EACvC,MAAM;AAAA,EACN,MAAM,iCAAgB;AACxB,CAAC;AAAA;AAAA;",
4
+ "sourcesContent": ["/* eslint-disable max-lines */\nimport { styled, css, xStyledCommonProps, lockedStateInteractionCss } from '@elliemae/ds-system';\nimport { DSTypography } from '@elliemae/ds-typography';\nimport type { DSControlledCheckboxT } from './react-desc-prop-types.js';\nimport { handleBackgroundColor, handleCheckmark } from './utils/styleHelpers.js';\nimport { DSCheckboxName, DSCheckboxSlots } from './constants/index.js';\n\nexport const StyledCheckBox = styled('span', {\n name: DSCheckboxName,\n slot: DSCheckboxSlots.INPUT_WRAPPER,\n})<DSControlledCheckboxT.StyledCheckBoxT>`\n position: relative;\n background: ${({ theme, $disabled, $applyAriaDisabled, $readOnly }) =>\n handleBackgroundColor(theme, $disabled, $applyAriaDisabled, $readOnly)};\n\n ${({ device, theme }) => {\n if (device === 'mobile') {\n return ` \n @media (max-width: ${theme.breakpoints.small}) {\n width: 1.5rem; /* 24px / 16 */\n height: 1.5rem; /* 24px / 16 */\n }\n width: 1.846rem; /* 24px / 13 */\n height: 1.846rem; /* 24px / 13 */`;\n }\n if (device === undefined) {\n return `\n @media (max-width: ${theme.breakpoints.small}) {\n width: 1.5rem; /* 24px / 16 */\n height: 1.5rem; /* 24px / 16 */\n }\n width: 1.2307rem;\n height: 1.2307rem;\n `;\n }\n return `\n @media (max-width: ${theme.breakpoints.small}) {\n width: 1rem; /* 16px / 16 */\n height: 1rem; /* 16px / 16 */\n }\n width: 1.2307rem; /* 16px / 13 */\n height: 1.2307rem; /* 16px / 13 */\n `;\n }}\n\n ${({ theme, checked, $disabled, $applyAriaDisabled, $readOnly, hasError, device }) =>\n handleCheckmark(theme, checked, $disabled, $applyAriaDisabled, $readOnly, hasError, false, device)}\n\n &:after {\n content: '';\n border-radius: 2px;\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n border: 1px solid ${({ theme, hasError }) => (hasError ? theme.colors.danger[900] : theme.colors.neutral[400])};\n }\n &:hover {\n background: ${({ theme, $applyAriaDisabled, $disabled, $readOnly }) =>\n !$disabled && !$applyAriaDisabled && !$readOnly ? theme.colors.brand[200] : undefined};\n\n &:after {\n border: 1px solid\n ${({ theme, hasError, $disabled, $applyAriaDisabled, $readOnly }) => {\n if (hasError) return theme.colors.danger[900];\n if ($applyAriaDisabled || $readOnly) return theme.colors.brand[700];\n if ($disabled) return theme.colors.neutral[400];\n return theme.colors.brand[600];\n }};\n }\n }\n &:focus-within {\n background: ${({ theme, checked, $disabled, $applyAriaDisabled, $readOnly, hasError }) =>\n checked === true && !$disabled && !$applyAriaDisabled && !$readOnly && !hasError\n ? theme.colors.brand[200]\n : undefined};\n &:hover {\n ${({ theme, checked, $disabled, $applyAriaDisabled, $readOnly, hasError, device }) =>\n handleCheckmark(theme, checked, $disabled, $applyAriaDisabled, $readOnly, hasError, true, device)}\n }\n &:after {\n border: 2px solid ${({ theme }) => theme.colors.brand[700]};\n }\n }\n &:active {\n &:after {\n border: ${({ $disabled, theme }) =>\n $disabled ? `1px solid ${theme.colors.neutral[400]}` : `1px solid ${theme.colors.brand[600]}`};\n }\n }\n`;\n\nconst checkboxStyles = css`\n &:hover {\n cursor: pointer;\n }\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n opacity: 0;\n z-index: 1;\n`;\n\nexport const StyledInput = styled('input', {\n name: DSCheckboxName,\n slot: DSCheckboxSlots.INPUT,\n})`\n ${checkboxStyles}\n ${lockedStateInteractionCss}\n`;\n\nexport const StyledInputMixed = styled('div', {\n name: DSCheckboxName,\n slot: DSCheckboxSlots.INPUT,\n})<{ $disabled?: boolean }>`\n ${checkboxStyles}\n ${lockedStateInteractionCss}\n`;\n\nexport const StyledLabel = styled('label', {\n name: DSCheckboxName,\n slot: DSCheckboxSlots.LABEL,\n})<DSControlledCheckboxT.StyledLabelT>`\n ${({ wrapLabel }) =>\n wrapLabel &&\n `\n overflow-wrap: break-word;\n white-space: pre-wrap;\n word-break: break-word;\n`};\n width: fit-content;\n color: ${({ theme, $disabled }) => ($disabled ? theme.colors.neutral[500] : theme.colors.neutral[700])};\n /* Typography metrics delegated to child DSTypography b2 */\n display: inherit;\n cursor: pointer;\n ${lockedStateInteractionCss}\n`;\n\nexport const StyledLabelTypography = styled(DSTypography, {\n name: DSCheckboxName,\n slot: DSCheckboxSlots.LABEL_TYPOGRAPHY,\n})``;\n\nexport const StyledContainer = styled('div', {\n name: DSCheckboxName,\n slot: DSCheckboxSlots.CONTAINER,\n})<{ device?: 'mobile' | 'desktop'; wrapLabel?: boolean; hasLabel: boolean }>`\n ${({ device, theme }) => {\n if (device === 'mobile') {\n return ` \n @media (max-width: ${theme.breakpoints.small}) {\n grid-template-columns: 1.5rem auto; /* 24px / 16px */\n }\n grid-template-columns: 1.846rem auto;\n `;\n }\n if (device === undefined) {\n return `\n @media (max-width: ${theme.breakpoints.small}) {\n grid-template-columns: 1.5rem auto;\n }\n grid-template-columns: 1.23rem auto;\n `;\n }\n return `\n @media (max-width: ${theme.breakpoints.small}) {\n grid-template-columns: 1rem auto; /* 16px / 16px */\n }\n grid-template-columns: 1.2307rem auto; /* 16px / 13 */\n\n `;\n }}\n column-gap: ${({ hasLabel }) => (hasLabel ? '8px' : '0px')};\n display: inline-grid;\n grid-template-rows: min-content;\n align-items: ${({ wrapLabel }) => (wrapLabel ? 'flex-start' : 'center')};\n ${xStyledCommonProps}\n`;\n\nexport const StyledHiddenP = styled('p', {\n name: DSCheckboxName,\n slot: DSCheckboxSlots.READ_ONLY_HELPER,\n})`\n display: none;\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,uBAA2E;AAC3E,2BAA6B;AAE7B,0BAAuD;AACvD,uBAAgD;AAEzC,MAAM,qBAAiB,yBAAO,QAAQ;AAAA,EAC3C,MAAM;AAAA,EACN,MAAM,iCAAgB;AACxB,CAAC;AAAA;AAAA,gBAEe,CAAC,EAAE,OAAO,WAAW,oBAAoB,UAAU,UAC/D,2CAAsB,OAAO,WAAW,oBAAoB,SAAS,CAAC;AAAA;AAAA,IAEtE,CAAC,EAAE,QAAQ,MAAM,MAAM;AACvB,MAAI,WAAW,UAA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