@flipdish/ui-library 0.65.0 → 0.66.1
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/__internal__/selectionControl/utilities/fieldProps.utils.cjs +30 -0
- package/dist/components/__internal__/selectionControl/utilities/fieldProps.utils.cjs.map +1 -0
- package/dist/components/__internal__/selectionControl/utilities/fieldProps.utils.d.ts +16 -0
- package/dist/components/__internal__/selectionControl/utilities/fieldProps.utils.d.ts.map +1 -0
- package/dist/components/__internal__/selectionControl/utilities/fieldProps.utils.js +28 -0
- package/dist/components/__internal__/selectionControl/utilities/fieldProps.utils.js.map +1 -0
- package/dist/components/atoms/Checkboxes/Checkbox/Checkbox.cjs +23 -16
- package/dist/components/atoms/Checkboxes/Checkbox/Checkbox.cjs.map +1 -1
- package/dist/components/atoms/Checkboxes/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/atoms/Checkboxes/Checkbox/Checkbox.js +24 -17
- package/dist/components/atoms/Checkboxes/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/atoms/Checkboxes/Checkbox/components/CheckboxBase.cjs +1 -1
- package/dist/components/atoms/Checkboxes/Checkbox/components/CheckboxBase.d.ts +1 -1
- package/dist/components/atoms/Checkboxes/Checkbox/components/CheckboxBase.d.ts.map +1 -1
- package/dist/components/atoms/Checkboxes/Checkbox/components/CheckboxBase.js +1 -1
- package/dist/components/atoms/Radios/RadioButton/RadioButton.cjs +11 -4
- package/dist/components/atoms/Radios/RadioButton/RadioButton.cjs.map +1 -1
- package/dist/components/atoms/Radios/RadioButton/RadioButton.d.ts.map +1 -1
- package/dist/components/atoms/Radios/RadioButton/RadioButton.js +12 -5
- package/dist/components/atoms/Radios/RadioButton/RadioButton.js.map +1 -1
- package/dist/components/atoms/Radios/RadioButton/components/RadioButtonBase.cjs +1 -1
- package/dist/components/atoms/Radios/RadioButton/components/RadioButtonBase.d.ts +1 -1
- package/dist/components/atoms/Radios/RadioButton/components/RadioButtonBase.d.ts.map +1 -1
- package/dist/components/atoms/Radios/RadioButton/components/RadioButtonBase.js +1 -1
- package/dist/components/atoms/Toggle/index.cjs +17 -7
- package/dist/components/atoms/Toggle/index.cjs.map +1 -1
- package/dist/components/atoms/Toggle/index.d.ts +2 -2
- package/dist/components/atoms/Toggle/index.d.ts.map +1 -1
- package/dist/components/atoms/Toggle/index.js +18 -8
- package/dist/components/atoms/Toggle/index.js.map +1 -1
- package/dist/components/molecules/RadioCards/RadioCardAvatar/RadioCardAvatar.cjs +3 -1
- package/dist/components/molecules/RadioCards/RadioCardAvatar/RadioCardAvatar.cjs.map +1 -1
- package/dist/components/molecules/RadioCards/RadioCardAvatar/RadioCardAvatar.d.ts.map +1 -1
- package/dist/components/molecules/RadioCards/RadioCardAvatar/RadioCardAvatar.js +4 -2
- package/dist/components/molecules/RadioCards/RadioCardAvatar/RadioCardAvatar.js.map +1 -1
- package/dist/components/molecules/RadioCards/RadioCardAvatar/hooks/useCommitOnPress.cjs +9 -3
- package/dist/components/molecules/RadioCards/RadioCardAvatar/hooks/useCommitOnPress.cjs.map +1 -1
- package/dist/components/molecules/RadioCards/RadioCardAvatar/hooks/useCommitOnPress.d.ts.map +1 -1
- package/dist/components/molecules/RadioCards/RadioCardAvatar/hooks/useCommitOnPress.js +9 -3
- package/dist/components/molecules/RadioCards/RadioCardAvatar/hooks/useCommitOnPress.js.map +1 -1
- package/dist/components/molecules/RadioCards/RadioCardBullet/RadioCardBullet.cjs +3 -1
- package/dist/components/molecules/RadioCards/RadioCardBullet/RadioCardBullet.cjs.map +1 -1
- package/dist/components/molecules/RadioCards/RadioCardBullet/RadioCardBullet.d.ts.map +1 -1
- package/dist/components/molecules/RadioCards/RadioCardBullet/RadioCardBullet.js +4 -2
- package/dist/components/molecules/RadioCards/RadioCardBullet/RadioCardBullet.js.map +1 -1
- package/dist/components/molecules/RadioCards/RadioCardCheck/RadioCardCheck.cjs +3 -1
- package/dist/components/molecules/RadioCards/RadioCardCheck/RadioCardCheck.cjs.map +1 -1
- package/dist/components/molecules/RadioCards/RadioCardCheck/RadioCardCheck.d.ts.map +1 -1
- package/dist/components/molecules/RadioCards/RadioCardCheck/RadioCardCheck.js +4 -2
- package/dist/components/molecules/RadioCards/RadioCardCheck/RadioCardCheck.js.map +1 -1
- package/dist/components/molecules/RadioCards/RadioCardIcon/RadioCardIcon.cjs +3 -1
- package/dist/components/molecules/RadioCards/RadioCardIcon/RadioCardIcon.cjs.map +1 -1
- package/dist/components/molecules/RadioCards/RadioCardIcon/RadioCardIcon.d.ts.map +1 -1
- package/dist/components/molecules/RadioCards/RadioCardIcon/RadioCardIcon.js +4 -2
- package/dist/components/molecules/RadioCards/RadioCardIcon/RadioCardIcon.js.map +1 -1
- package/dist/components/molecules/RadioCards/RadioCardIconFeatured/RadioCardIconFeatured.cjs +3 -1
- package/dist/components/molecules/RadioCards/RadioCardIconFeatured/RadioCardIconFeatured.cjs.map +1 -1
- package/dist/components/molecules/RadioCards/RadioCardIconFeatured/RadioCardIconFeatured.d.ts.map +1 -1
- package/dist/components/molecules/RadioCards/RadioCardIconFeatured/RadioCardIconFeatured.js +4 -2
- package/dist/components/molecules/RadioCards/RadioCardIconFeatured/RadioCardIconFeatured.js.map +1 -1
- package/dist/components/molecules/RadioCards/RadioCardPayment/RadioCardPayment.cjs +3 -1
- package/dist/components/molecules/RadioCards/RadioCardPayment/RadioCardPayment.cjs.map +1 -1
- package/dist/components/molecules/RadioCards/RadioCardPayment/RadioCardPayment.d.ts.map +1 -1
- package/dist/components/molecules/RadioCards/RadioCardPayment/RadioCardPayment.js +4 -2
- package/dist/components/molecules/RadioCards/RadioCardPayment/RadioCardPayment.js.map +1 -1
- package/dist/components/molecules/RadioCards/hooks/useOptionIds.cjs +2 -2
- package/dist/components/molecules/RadioCards/hooks/useOptionIds.d.ts +2 -2
- package/dist/components/molecules/RadioCards/hooks/useOptionIds.js +2 -2
- package/dist/components/molecules/RadioGroup/components/RadioGroupAvatar.cjs +3 -1
- package/dist/components/molecules/RadioGroup/components/RadioGroupAvatar.cjs.map +1 -1
- package/dist/components/molecules/RadioGroup/components/RadioGroupAvatar.d.ts.map +1 -1
- package/dist/components/molecules/RadioGroup/components/RadioGroupAvatar.js +4 -2
- package/dist/components/molecules/RadioGroup/components/RadioGroupAvatar.js.map +1 -1
- package/dist/components/organisms/TextEditor/components/TextEditorExtensions.cjs +6 -4
- package/dist/components/organisms/TextEditor/components/TextEditorExtensions.cjs.map +1 -1
- package/dist/components/organisms/TextEditor/components/TextEditorExtensions.d.ts.map +1 -1
- package/dist/components/organisms/TextEditor/components/TextEditorExtensions.js +7 -5
- package/dist/components/organisms/TextEditor/components/TextEditorExtensions.js.map +1 -1
- package/dist/components/organisms/TreeView/index.cjs +3 -1
- package/dist/components/organisms/TreeView/index.cjs.map +1 -1
- package/dist/components/organisms/TreeView/index.d.ts.map +1 -1
- package/dist/components/organisms/TreeView/index.js +4 -2
- package/dist/components/organisms/TreeView/index.js.map +1 -1
- package/dist/native/components/atoms/Checkboxes/Checkbox/Checkbox.d.ts +1 -1
- package/dist/native/components/atoms/Checkboxes/Checkbox/Checkbox.js +1 -1
- package/dist/native/components/atoms/Radios/RadioButton/RadioButton.d.ts +1 -1
- package/dist/native/components/atoms/Radios/RadioButton/RadioButton.js +1 -1
- package/dist/native/components/atoms/Toggle/index.d.ts +1 -1
- package/dist/native/components/atoms/Toggle/index.js +1 -1
- package/package.json +1 -1
- package/dist/components/layouts/PageHubLayout/components/PageHubLayoutSectionNav.cjs +0 -26
- package/dist/components/layouts/PageHubLayout/components/PageHubLayoutSectionNav.cjs.map +0 -1
- package/dist/components/layouts/PageHubLayout/components/PageHubLayoutSectionNav.d.ts +0 -20
- package/dist/components/layouts/PageHubLayout/components/PageHubLayoutSectionNav.d.ts.map +0 -1
- package/dist/components/layouts/PageHubLayout/components/PageHubLayoutSectionNav.js +0 -24
- package/dist/components/layouts/PageHubLayout/components/PageHubLayoutSectionNav.js.map +0 -1
- package/dist/components/layouts/PageHubLayout/index.cjs +0 -65
- package/dist/components/layouts/PageHubLayout/index.cjs.map +0 -1
- package/dist/components/layouts/PageHubLayout/index.d.ts +0 -56
- package/dist/components/layouts/PageHubLayout/index.d.ts.map +0 -1
- package/dist/components/layouts/PageHubLayout/index.js +0 -63
- package/dist/components/layouts/PageHubLayout/index.js.map +0 -1
- package/dist/components/layouts/PageHubLayout/pageHubLayout.types.d.ts +0 -20
- package/dist/components/layouts/PageHubLayout/pageHubLayout.types.d.ts.map +0 -1
- package/dist/components/layouts/PageHubLayout/utilities/pageHubLayout.utils.cjs +0 -27
- package/dist/components/layouts/PageHubLayout/utilities/pageHubLayout.utils.cjs.map +0 -1
- package/dist/components/layouts/PageHubLayout/utilities/pageHubLayout.utils.d.ts +0 -21
- package/dist/components/layouts/PageHubLayout/utilities/pageHubLayout.utils.d.ts.map +0 -1
- package/dist/components/layouts/PageHubLayout/utilities/pageHubLayout.utils.js +0 -24
- package/dist/components/layouts/PageHubLayout/utilities/pageHubLayout.utils.js.map +0 -1
- package/dist/components/templates/PageHubLayout/index.cjs +0 -9
- package/dist/components/templates/PageHubLayout/index.cjs.map +0 -1
- package/dist/components/templates/PageHubLayout/index.d.ts +0 -8
- package/dist/components/templates/PageHubLayout/index.d.ts.map +0 -1
- package/dist/components/templates/PageHubLayout/index.js +0 -7
- package/dist/components/templates/PageHubLayout/index.js.map +0 -1
- package/dist/native/components/layouts/PageHubLayout/index.d.ts +0 -12
- package/dist/native/components/templates/PageHubLayout/index.d.ts +0 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Toggle/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Toggle/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAc,MAAM,OAAO,CAAC;AACnD,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAK5E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,YAAY,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,UAAU,eAAe;IACvB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,uJAAuJ;AACvJ,eAAO,MAAM,UAAU,GAAI,8EAAqF,eAAe,gCAmC9H,CAAC;AAEF,MAAM,WAAW,WAAY,SAAQ,eAAe;IAClD,6DAA6D;IAC7D,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,qFAAqF;IACrF,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,6DAA6D;IAC7D,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;GAIG;AACH,eAAO,MAAM,MAAM,GAAI,uFAA8F,WAAW,gCA2D/H,CAAC"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
3
3
|
import { useResolvedTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
4
|
-
import {
|
|
4
|
+
import { useContext } from 'react';
|
|
5
|
+
import { TextContext, SwitchField, SwitchButton } from 'react-aria-components';
|
|
5
6
|
import { selectionControlSizes } from '../../__internal__/selectionControl/selectionControl.styles.js';
|
|
7
|
+
import { splitFieldProps } from '../../__internal__/selectionControl/utilities/fieldProps.utils.js';
|
|
6
8
|
import { styles } from './Toggle.styles.js';
|
|
7
9
|
|
|
8
|
-
/** Visual-only switch track and knob with no input behaviour, for building custom controls; `Toggle` renders it inside a react-aria `
|
|
10
|
+
/** Visual-only switch track and knob with no input behaviour, for building custom controls; `Toggle` renders it inside a react-aria `SwitchButton`. */
|
|
9
11
|
const ToggleBase = ({ className, isHovered, isDisabled, isFocusVisible, isSelected, slim, size = 'sm' }) => {
|
|
10
12
|
return (jsx("div", { className: cx(
|
|
11
13
|
// Never narrower than its size: beside long text in a narrow container the text wraps, not the track.
|
|
@@ -20,12 +22,20 @@ const ToggleBase = ({ className, isHovered, isDisabled, isFocusVisible, isSelect
|
|
|
20
22
|
*/
|
|
21
23
|
const Toggle = ({ label, hint, className, size = 'sm', slim, 'data-testid': dataTestId, ...ariaSwitchProps }) => {
|
|
22
24
|
const toggleTestId = useResolvedTestId({ testId: dataTestId, segment: 'toggle', rootName: 'toggle' });
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
const outerTextContext = useContext(TextContext);
|
|
26
|
+
const { fieldProps, buttonProps } = splitFieldProps(ariaSwitchProps);
|
|
27
|
+
return (jsx(SwitchField, { ...fieldProps,
|
|
28
|
+
// `SwitchField` would default to the browser's own check; the one-element `Switch` only ever set `aria-invalid`.
|
|
29
|
+
validationBehavior: "aria",
|
|
30
|
+
// No box of its own, so the `<label>` is still what the parent lays out.
|
|
31
|
+
className: "contents", children: jsx(SwitchButton, { ...buttonProps, "data-testid": toggleTestId, className: (state) => cx(
|
|
32
|
+
// As wide as its text, up to the container: past that the label and hint wrap instead of overflowing it.
|
|
33
|
+
'relative flex w-max max-w-full items-start', state.isDisabled && 'cursor-not-allowed', selectionControlSizes[size].root, typeof className === 'function' ? className(state) : className), children: ({ isSelected, isDisabled, isFocusVisible, isHovered }) => (jsxs(Fragment, { children: [jsx(ToggleBase, { slim: slim, size: size, isHovered: isHovered, isDisabled: isDisabled, isFocusVisible: isFocusVisible, isSelected: isSelected, className: slim ? 'mt-0.5' : '' }), (label || hint) && (
|
|
34
|
+
// The field scopes a react-aria `Text` to its own slots; `label` and `hint` keep the context they had before the field existed.
|
|
35
|
+
jsx(TextContext.Provider, { value: outerTextContext, children: jsxs("div", { className: cx('flex flex-col', selectionControlSizes[size].textWrapper), children: [label && jsx("p", { className: cx('text-secondary select-none', selectionControlSizes[size].label), children: label }), hint && (
|
|
36
|
+
// biome-ignore lint/a11y/noStaticElementInteractions: This is a hint that is not interactive
|
|
37
|
+
// biome-ignore lint/a11y/useKeyWithClickEvents: This is a hint that is not interactive
|
|
38
|
+
jsx("span", { className: cx('text-tertiary', selectionControlSizes[size].hint), onClick: (event) => event.stopPropagation(), children: hint }))] }) }))] })) }) }));
|
|
29
39
|
};
|
|
30
40
|
|
|
31
41
|
export { Toggle, ToggleBase };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/atoms/Toggle/index.tsx"],"sourcesContent":[null],"names":["_jsx","
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/atoms/Toggle/index.tsx"],"sourcesContent":[null],"names":["_jsx","AriaSwitchField","AriaSwitchButton","_jsxs"],"mappings":";;;;;;;;;AAwBA;MACa,UAAU,GAAG,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,EAAmB,KAAI;AACjI,IAAA,QACEA,GAAA,CAAA,KAAA,EAAA,EACE,SAAS,EAAE,EAAE;;QAEX,gJAAgJ,EAChJ,UAAU,IAAI,gBAAgB,EAC9B,UAAU,IAAI,SAAS,IAAI,sBAAsB,EACjD,UAAU,IAAI,+BAA+B,EAC7C,cAAc,IAAI,4BAA4B,EAE9C,IAAI,IAAI,QAAQ,EAChB,IAAI,IAAI,UAAU,IAAI,kBAAkB,EACx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,oBAAoB,EACxC,qBAAqB,CAAC,IAAI,CAAC,CAAC,IAAI,EAChC,OAAO,SAAS,KAAK,UAAU,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,SAAS,CAC/D,YAGF,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,SAAS,EAAE,MACrDC,4BACEH,GAAA,CAAC,UAAU,IACT,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,IAAI,GAAG,QAAQ,GAAG,EAAE,GAC/B,EAED,CAAC,KAAK,IAAI,IAAI;;oBAEbA,GAAA,CAAC,WAAW,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,gBAAgB,YAC3CG,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,EAAE,CAAC,eAAe,EAAE,qBAAqB,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,aACzE,KAAK,IAAIH,WAAG,SAAS,EAAE,EAAE,CAAC,4BAA4B,EAAE,qBAAqB,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,EAAA,QAAA,EAAG,KAAK,EAAA,CAAK,EACvG,IAAI;;;AAGH,gCAAAA,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAE,EAAE,CAAC,eAAe,EAAE,qBAAqB,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,eAAe,EAAE,YAChH,IAAI,EAAA,CACA,CACR,CAAA,EAAA,CACG,GACe,CACxB,CAAA,EAAA,CACA,CACJ,EAAA,CACgB,EAAA,CACH;AAEtB;;"}
|
|
@@ -29,7 +29,9 @@ const RadioCardAvatar = ({ items, size = 'sm', avatarShape = 'square', indicator
|
|
|
29
29
|
const { subtitle: subtitleId } = optionIds(index, { subtitle: item.subtitle });
|
|
30
30
|
return (
|
|
31
31
|
// The card, not the radio, carries the selected ring so the footer sits inside it.
|
|
32
|
-
jsxRuntime.jsxs("div", { ...optionHandlers(item.value, { isDisabled, isReadOnly }), className: cx.cx('relative flex flex-col rounded-xl bg-primary ring-inset', isSelected ? 'ring-2 ring-brand' : 'ring-1 ring-secondary', isDisabled && 'bg-disabled_subtle ring-disabled_subtle'), children: [jsxRuntime.
|
|
32
|
+
jsxRuntime.jsxs("div", { ...optionHandlers(item.value, { isDisabled, isReadOnly }), className: cx.cx('relative flex flex-col rounded-xl bg-primary ring-inset', isSelected ? 'ring-2 ring-brand' : 'ring-1 ring-secondary', isDisabled && 'bg-disabled_subtle ring-disabled_subtle'), children: [jsxRuntime.jsxs(reactAriaComponents.RadioField, { isDisabled: item.disabled, value: item.value, "aria-label": [item.title, item.secondaryTitle].filter(Boolean).join(' '), "aria-describedby": subtitleId,
|
|
33
|
+
// No box of its own, so the `<label>` and the outline are still laid out by the card.
|
|
34
|
+
className: "contents", children: [jsxRuntime.jsx(reactAriaComponents.RadioButton, { "data-testid": optionTestId, className: ({ isDisabled }) => cx.cx('peer flex cursor-pointer items-center', size === 'md' ? 'gap-4 p-5' : 'gap-3 px-4 py-5', isDisabled && 'cursor-not-allowed'), children: ({ isDisabled, isSelected, isFocusVisible }) => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Avatar.Avatar, { size: size === 'md' ? 'xl' : 'lg', rounded: avatarShape === 'round', border: avatarShape === 'square', src: item.src, alt: "", initials: item.initials, placeholderIcon: item.placeholderIcon }), jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-1 flex-col", children: [jsxRuntime.jsxs("div", { className: cx.cx('flex items-center', size === 'md' ? 'gap-4' : 'gap-3'), children: [jsxRuntime.jsxs("span", { className: cx.cx('flex min-w-0 flex-1 gap-1.5', size === 'md' ? 'text-lg' : 'text-md'), children: [jsxRuntime.jsx("span", { className: "truncate font-semibold text-primary", children: item.title }), item.secondaryTitle && jsxRuntime.jsx("span", { className: "max-w-1/2 shrink-0 truncate text-tertiary", children: item.secondaryTitle })] }), jsxRuntime.jsx(Indicator, { size: size, isDisabled: isDisabled, isSelected: isSelected, isFocusVisible: isFocusVisible })] }), item.subtitle && (jsxRuntime.jsx("span", { id: subtitleId, className: cx.cx('truncate text-tertiary', size === 'md' ? 'text-md' : 'text-sm'), children: item.subtitle }))] })] })) }), jsxRuntime.jsx("span", { "aria-hidden": "true", className: "pointer-events-none absolute inset-0 rounded-xl outline-focus-ring peer-data-[focus-visible]:outline-2 peer-data-[focus-visible]:outline-offset-2" })] }), item.footer && (jsxRuntime.jsx("div", { className: cx.cx('flex justify-end border-t border-secondary px-4 py-3', isSelected ? 'mx-0.5' : 'mx-px'), children: item.footer }))] }, item.value));
|
|
33
35
|
}) }));
|
|
34
36
|
};
|
|
35
37
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioCardAvatar.cjs","sources":["../../../../../src/components/molecules/RadioCards/RadioCardAvatar/RadioCardAvatar.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","CheckboxBase","RadioButtonBase","useOptionIds","useCommitOnPress","_jsx","AriaRadioGroup","cx","joinTestId","_jsxs","
|
|
1
|
+
{"version":3,"file":"RadioCardAvatar.cjs","sources":["../../../../../src/components/molecules/RadioCards/RadioCardAvatar/RadioCardAvatar.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","CheckboxBase","RadioButtonBase","useOptionIds","useCommitOnPress","_jsx","AriaRadioGroup","cx","joinTestId","_jsxs","AriaRadioField","AriaRadioButton","_Fragment","Avatar"],"mappings":";;;;;;;;;;;;AAoCA;;;;;;AAMG;AACI,MAAM,eAAe,GAAG,CAAC,EAC9B,KAAK,EACL,IAAI,GAAG,IAAI,EACX,WAAW,GAAG,QAAQ,EACtB,SAAS,GAAG,OAAO,EACnB,QAAQ,GAAG,QAAQ,EACnB,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,SAA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AM,EAAA,CAAO,CACjI,CAAA,EAAA,EA7DI,IAAI,CAAC,KAAK,CA8DX;QAEV,CAAC,CAAC,EAAA,CAEW;AAErB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioCardAvatar.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/RadioCards/RadioCardAvatar/RadioCardAvatar.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAG7D,OAAO,KAAK,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAG7F,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC;IAC7E,uDAAuD;IACvD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,2EAA2E;IAC3E,KAAK,EAAE,uBAAuB,EAAE,CAAC;IACjC,kGAAkG;IAClG,WAAW,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IACjC,8EAA8E;IAC9E,SAAS,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IACjC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC9B,wIAAwI;IACxI,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,wBAAwB,KAAK,IAAI,CAAC;IACrE,gKAAgK;IAChK,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,wBAAwB,KAAK,IAAI,CAAC;IACzE,gGAAgG;IAChG,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,GAAI,iJAa7B,oBAAoB,
|
|
1
|
+
{"version":3,"file":"RadioCardAvatar.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/RadioCards/RadioCardAvatar/RadioCardAvatar.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAG7D,OAAO,KAAK,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAG7F,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC;IAC7E,uDAAuD;IACvD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,2EAA2E;IAC3E,KAAK,EAAE,uBAAuB,EAAE,CAAC;IACjC,kGAAkG;IAClG,WAAW,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IACjC,8EAA8E;IAC9E,SAAS,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IACjC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC9B,wIAAwI;IACxI,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,wBAAwB,KAAK,IAAI,CAAC;IACrE,gKAAgK;IAChK,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,wBAAwB,KAAK,IAAI,CAAC;IACzE,gGAAgG;IAChG,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,GAAI,iJAa7B,oBAAoB,gCA4FtB,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { CheckboxBase } from '@flipdish/ui-library/components/atoms/Checkboxes';
|
|
|
4
4
|
import { RadioButtonBase } from '@flipdish/ui-library/components/atoms/Radios';
|
|
5
5
|
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
6
6
|
import { useResolvedTestId, joinTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
7
|
-
import { RadioGroup,
|
|
7
|
+
import { RadioGroup, RadioField, RadioButton } from 'react-aria-components';
|
|
8
8
|
import { useOptionIds } from '../hooks/useOptionIds.js';
|
|
9
9
|
import { useCommitOnPress } from './hooks/useCommitOnPress.js';
|
|
10
10
|
|
|
@@ -27,7 +27,9 @@ const RadioCardAvatar = ({ items, size = 'sm', avatarShape = 'square', indicator
|
|
|
27
27
|
const { subtitle: subtitleId } = optionIds(index, { subtitle: item.subtitle });
|
|
28
28
|
return (
|
|
29
29
|
// The card, not the radio, carries the selected ring so the footer sits inside it.
|
|
30
|
-
jsxs("div", { ...optionHandlers(item.value, { isDisabled, isReadOnly }), className: cx('relative flex flex-col rounded-xl bg-primary ring-inset', isSelected ? 'ring-2 ring-brand' : 'ring-1 ring-secondary', isDisabled && 'bg-disabled_subtle ring-disabled_subtle'), children: [
|
|
30
|
+
jsxs("div", { ...optionHandlers(item.value, { isDisabled, isReadOnly }), className: cx('relative flex flex-col rounded-xl bg-primary ring-inset', isSelected ? 'ring-2 ring-brand' : 'ring-1 ring-secondary', isDisabled && 'bg-disabled_subtle ring-disabled_subtle'), children: [jsxs(RadioField, { isDisabled: item.disabled, value: item.value, "aria-label": [item.title, item.secondaryTitle].filter(Boolean).join(' '), "aria-describedby": subtitleId,
|
|
31
|
+
// No box of its own, so the `<label>` and the outline are still laid out by the card.
|
|
32
|
+
className: "contents", children: [jsx(RadioButton, { "data-testid": optionTestId, className: ({ isDisabled }) => cx('peer flex cursor-pointer items-center', size === 'md' ? 'gap-4 p-5' : 'gap-3 px-4 py-5', isDisabled && 'cursor-not-allowed'), children: ({ isDisabled, isSelected, isFocusVisible }) => (jsxs(Fragment, { children: [jsx(Avatar, { size: size === 'md' ? 'xl' : 'lg', rounded: avatarShape === 'round', border: avatarShape === 'square', src: item.src, alt: "", initials: item.initials, placeholderIcon: item.placeholderIcon }), jsxs("div", { className: "flex min-w-0 flex-1 flex-col", children: [jsxs("div", { className: cx('flex items-center', size === 'md' ? 'gap-4' : 'gap-3'), children: [jsxs("span", { className: cx('flex min-w-0 flex-1 gap-1.5', size === 'md' ? 'text-lg' : 'text-md'), children: [jsx("span", { className: "truncate font-semibold text-primary", children: item.title }), item.secondaryTitle && jsx("span", { className: "max-w-1/2 shrink-0 truncate text-tertiary", children: item.secondaryTitle })] }), jsx(Indicator, { size: size, isDisabled: isDisabled, isSelected: isSelected, isFocusVisible: isFocusVisible })] }), item.subtitle && (jsx("span", { id: subtitleId, className: cx('truncate text-tertiary', size === 'md' ? 'text-md' : 'text-sm'), children: item.subtitle }))] })] })) }), jsx("span", { "aria-hidden": "true", className: "pointer-events-none absolute inset-0 rounded-xl outline-focus-ring peer-data-[focus-visible]:outline-2 peer-data-[focus-visible]:outline-offset-2" })] }), item.footer && (jsx("div", { className: cx('flex justify-end border-t border-secondary px-4 py-3', isSelected ? 'mx-0.5' : 'mx-px'), children: item.footer }))] }, item.value));
|
|
31
33
|
}) }));
|
|
32
34
|
};
|
|
33
35
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioCardAvatar.js","sources":["../../../../../src/components/molecules/RadioCards/RadioCardAvatar/RadioCardAvatar.tsx"],"sourcesContent":[null],"names":["_jsx","AriaRadioGroup","_jsxs","
|
|
1
|
+
{"version":3,"file":"RadioCardAvatar.js","sources":["../../../../../src/components/molecules/RadioCards/RadioCardAvatar/RadioCardAvatar.tsx"],"sourcesContent":[null],"names":["_jsx","AriaRadioGroup","_jsxs","AriaRadioField","AriaRadioButton","_Fragment"],"mappings":";;;;;;;;;;AAoCA;;;;;;AAMG;AACI,MAAM,eAAe,GAAG,CAAC,EAC9B,KAAK,EACL,IAAI,GAAG,IAAI,EACX,WAAW,GAAG,QAAQ,EACtB,SAAS,GAAG,OAAO,EACnB,QAAQ,GAAG,QAAQ,EACnB,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,SAAS,EACT,aAAa,EAAE,UAAU,EACzB,GAAG,KAAK,EACa,KAAI;AACzB,IAAA,MAAM,UAAU,GAAG,iBAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC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.type === 'radio';
|
|
6
|
+
// The option's field comes before the footer, so the card's first radio is the option's; a later one is the footer's, whatever its value.
|
|
7
|
+
const optionRadioOf = (card) => card.querySelector('input[type="radio"]');
|
|
6
8
|
/**
|
|
7
9
|
* Reads the modifier keys off the event that pressed an option.
|
|
8
10
|
*
|
|
@@ -77,8 +79,8 @@ const useCommitOnPress = ({ commitOn, value, defaultValue, onChange, onOptionPre
|
|
|
77
79
|
onChange?.(optionValue, press);
|
|
78
80
|
};
|
|
79
81
|
const optionHandlers = (optionValue, { isDisabled, isReadOnly }) => ({
|
|
80
|
-
//
|
|
81
|
-
// footer's own and not an option press. Capture phase, because react-aria stops the radio's click from bubbling.
|
|
82
|
+
// Only the `<label>` around the card's radio is the option; a press in the footer, even on a labelled control there, is
|
|
83
|
+
// the footer's own and not an option press. Capture phase, because react-aria stops the radio's click from bubbling.
|
|
82
84
|
onClickCapture: (event) => {
|
|
83
85
|
if (spaceInFlightRef.current && pressSourceOf(event) === 'keyboard') {
|
|
84
86
|
spaceInFlightRef.current = false;
|
|
@@ -86,7 +88,8 @@ const useCommitOnPress = ({ commitOn, value, defaultValue, onChange, onOptionPre
|
|
|
86
88
|
}
|
|
87
89
|
if (isDisabled || !(event.target instanceof Element))
|
|
88
90
|
return;
|
|
89
|
-
|
|
91
|
+
const control = event.target.closest('label')?.control;
|
|
92
|
+
if (!control || control !== optionRadioOf(event.currentTarget))
|
|
90
93
|
return;
|
|
91
94
|
pressOption(optionValue, toOptionPress(event, pressSourceOf(event)), isReadOnly);
|
|
92
95
|
},
|
|
@@ -94,6 +97,9 @@ const useCommitOnPress = ({ commitOn, value, defaultValue, onChange, onOptionPre
|
|
|
94
97
|
// A held key repeats the keydown, and a repeat is not another press.
|
|
95
98
|
if (!pressesKeys || isDisabled || event.repeat || !isPressKey(event))
|
|
96
99
|
return;
|
|
100
|
+
// A radio in the footer is the footer's own, as it is for a click.
|
|
101
|
+
if (event.target !== optionRadioOf(event.currentTarget))
|
|
102
|
+
return;
|
|
97
103
|
// Enter would submit a surrounding form.
|
|
98
104
|
if (event.key === 'Enter')
|
|
99
105
|
event.preventDefault();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCommitOnPress.cjs","sources":["../../../../../../src/components/molecules/RadioCards/RadioCardAvatar/hooks/useCommitOnPress.ts"],"sourcesContent":[null],"names":["useState","useRef"],"mappings":";;;;AA4CA,MAAM,YAAY,GAAG,CAAC,MAAmB,KAAiC,MAAM,YAAY,gBAAgB,IAAI,MAAM,CAAC,IAAI,KAAK,OAAO;AAEvI;;;;;;AAMG;AACI,MAAM,aAAa,GAAG,CAAC,KAAiC,EAAE,MAA0C,MAAgC;IACzI,OAAO,EAAE,KAAK,CAAC,OAAO;IACtB,OAAO,EAAE,KAAK,CAAC,OAAO;IACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ;IACxB,MAAM,EAAE,KAAK,CAAC,MAAM;IACpB,MAAM;AACP,CAAA;AAED;;;;;AAKG;AACI,MAAM,aAAa,GAAG,CAAC,KAAiB,MAA0C,KAAK,CAAC,MAAM,KAAK,CAAC,GAAG,UAAU,GAAG,SAAS;AAEpI;;;;;;;AAOG;AACI,MAAM,UAAU,GAAG,CAAC,KAAoB,KAAa;AAC1D,IAAA,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC;AAAE,QAAA,OAAO,KAAK;AAC7C,IAAA,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO;AAAE,QAAA,OAAO,IAAI;IACtC,OAAO,KAAK,CAAC,GAAG,KAAK,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,OAAO;AAClD;AAEA;;;;;;;AAOG;AACI,MAAM,gBAAgB,GAAG,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,aAAa,EAA2B,KAAI;AACtH,IAAA,MAAM,cAAc,GAAG,QAAQ,KAAK,OAAO;;AAE3C,IAAA,MAAM,CAAC,iBAAiB,EAAE,oBAAoB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MAAsB;;;AAGxG,QAAA,cAAc,EAAE,CAAC,KAAK,KAAI;YACxB,IAAI,gBAAgB,CAAC,OAAO,IAAI,aAAa,CAAC,KAAK,CAAC,KAAK,UAAU,EAAE;AACnE,gBAAA,gBAAgB,CAAC,OAAO,GAAG,KAAK;gBAChC;YACF;YACA,IAAI,UAAU,IAAI,EAAE,KAAK,CAAC,MAAM,YAAY,OAAO,CAAC;gBAAE;AACtD,YAAA,
|
|
1
|
+
{"version":3,"file":"useCommitOnPress.cjs","sources":["../../../../../../src/components/molecules/RadioCards/RadioCardAvatar/hooks/useCommitOnPress.ts"],"sourcesContent":[null],"names":["useState","useRef"],"mappings":";;;;AA4CA,MAAM,YAAY,GAAG,CAAC,MAAmB,KAAiC,MAAM,YAAY,gBAAgB,IAAI,MAAM,CAAC,IAAI,KAAK,OAAO;AAEvI;AACA,MAAM,aAAa,GAAG,CAAC,IAAa,KAAK,IAAI,CAAC,aAAa,CAAC,qBAAqB,CAAC;AAElF;;;;;;AAMG;AACI,MAAM,aAAa,GAAG,CAAC,KAAiC,EAAE,MAA0C,MAAgC;IACzI,OAAO,EAAE,KAAK,CAAC,OAAO;IACtB,OAAO,EAAE,KAAK,CAAC,OAAO;IACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ;IACxB,MAAM,EAAE,KAAK,CAAC,MAAM;IACpB,MAAM;AACP,CAAA;AAED;;;;;AAKG;AACI,MAAM,aAAa,GAAG,CAAC,KAAiB,MAA0C,KAAK,CAAC,MAAM,KAAK,CAAC,GAAG,UAAU,GAAG,SAAS;AAEpI;;;;;;;AAOG;AACI,MAAM,UAAU,GAAG,CAAC,KAAoB,KAAa;AAC1D,IAAA,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC;AAAE,QAAA,OAAO,KAAK;AAC7C,IAAA,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO;AAAE,QAAA,OAAO,IAAI;IACtC,OAAO,KAAK,CAAC,GAAG,KAAK,GAAG,IAAI,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C,KAAK,EAAE,UAAU,CAAC,EAAE,UAAU,CAAC;QACxE,CAAC;;;AAGD,QAAA,cAAc,EAAE,CAAC,KAAK,KAAI;YACxB,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO;gBAAE;YACpD,UAAU,CAAC,MAAK;AACd,gBAAA,gBAAgB,CAAC,OAAO,GAAG,KAAK;YAClC,CAAC,EAAE,CAAC,CAAC;QACP,CAAC;;;AAGD,QAAA,MAAM,EAAE,CAAC,KAAK,KAAI;AAChB,YAAA,gBAAgB,CAAC,OAAO,GAAG,KAAK;AAChC,YAAA,IAAI,cAAc,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,aAAa,EAAE,QAAQ,CAAC,KAAK,CAAC,aAAa,CAAC;gBAAE,UAAU,CAAC,IAAI,CAAC;QAC3G,CAAC;AACF,KAAA,CAAC;AAEF,IAAA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE;AAC3C;;;;;"}
|
package/dist/components/molecules/RadioCards/RadioCardAvatar/hooks/useCommitOnPress.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCommitOnPress.d.ts","sourceRoot":"","sources":["../../../../../../src/components/molecules/RadioCards/RadioCardAvatar/hooks/useCommitOnPress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAEvE,UAAU,uBAAuB;IAC/B,gIAAgI;IAChI,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC7B,sEAAsE;IACtE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACjC,gDAAgD;IAChD,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACxC,4GAA4G;IAC5G,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,wBAAwB,KAAK,IAAI,CAAC;IACrE,8FAA8F;IAC9F,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,wBAAwB,KAAK,IAAI,CAAC;CAC1E;AAQD,kHAAkH;AAClH,UAAU,cAAc;IACtB,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACjC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAED,UAAU,WAAW;IACnB,uCAAuC;IACvC,UAAU,EAAE,OAAO,CAAC;IACpB,qEAAqE;IACrE,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,UAAU,cAAc;IACtB,cAAc,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACzD,gBAAgB,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAC9D,cAAc,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAC5D,MAAM,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;CAClD;
|
|
1
|
+
{"version":3,"file":"useCommitOnPress.d.ts","sourceRoot":"","sources":["../../../../../../src/components/molecules/RadioCards/RadioCardAvatar/hooks/useCommitOnPress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAEvE,UAAU,uBAAuB;IAC/B,gIAAgI;IAChI,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC7B,sEAAsE;IACtE,KAAK,EAAE,MAA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;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,aAAa,KAAG,OAIjD,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,GAAI,4DAA4D,uBAAuB;;kCA4B7E,MAAM,8BAA8B,WAAW,KAAG,cAAc;CAwCtG,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { useState, useRef } from 'react';
|
|
2
2
|
|
|
3
3
|
const isRadioInput = (target) => target instanceof HTMLInputElement && target.type === 'radio';
|
|
4
|
+
// The option's field comes before the footer, so the card's first radio is the option's; a later one is the footer's, whatever its value.
|
|
5
|
+
const optionRadioOf = (card) => card.querySelector('input[type="radio"]');
|
|
4
6
|
/**
|
|
5
7
|
* Reads the modifier keys off the event that pressed an option.
|
|
6
8
|
*
|
|
@@ -75,8 +77,8 @@ const useCommitOnPress = ({ commitOn, value, defaultValue, onChange, onOptionPre
|
|
|
75
77
|
onChange?.(optionValue, press);
|
|
76
78
|
};
|
|
77
79
|
const optionHandlers = (optionValue, { isDisabled, isReadOnly }) => ({
|
|
78
|
-
//
|
|
79
|
-
// footer's own and not an option press. Capture phase, because react-aria stops the radio's click from bubbling.
|
|
80
|
+
// Only the `<label>` around the card's radio is the option; a press in the footer, even on a labelled control there, is
|
|
81
|
+
// the footer's own and not an option press. Capture phase, because react-aria stops the radio's click from bubbling.
|
|
80
82
|
onClickCapture: (event) => {
|
|
81
83
|
if (spaceInFlightRef.current && pressSourceOf(event) === 'keyboard') {
|
|
82
84
|
spaceInFlightRef.current = false;
|
|
@@ -84,7 +86,8 @@ const useCommitOnPress = ({ commitOn, value, defaultValue, onChange, onOptionPre
|
|
|
84
86
|
}
|
|
85
87
|
if (isDisabled || !(event.target instanceof Element))
|
|
86
88
|
return;
|
|
87
|
-
|
|
89
|
+
const control = event.target.closest('label')?.control;
|
|
90
|
+
if (!control || control !== optionRadioOf(event.currentTarget))
|
|
88
91
|
return;
|
|
89
92
|
pressOption(optionValue, toOptionPress(event, pressSourceOf(event)), isReadOnly);
|
|
90
93
|
},
|
|
@@ -92,6 +95,9 @@ const useCommitOnPress = ({ commitOn, value, defaultValue, onChange, onOptionPre
|
|
|
92
95
|
// A held key repeats the keydown, and a repeat is not another press.
|
|
93
96
|
if (!pressesKeys || isDisabled || event.repeat || !isPressKey(event))
|
|
94
97
|
return;
|
|
98
|
+
// A radio in the footer is the footer's own, as it is for a click.
|
|
99
|
+
if (event.target !== optionRadioOf(event.currentTarget))
|
|
100
|
+
return;
|
|
95
101
|
// Enter would submit a surrounding form.
|
|
96
102
|
if (event.key === 'Enter')
|
|
97
103
|
event.preventDefault();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCommitOnPress.js","sources":["../../../../../../src/components/molecules/RadioCards/RadioCardAvatar/hooks/useCommitOnPress.ts"],"sourcesContent":[null],"names":[],"mappings":";;AA4CA,MAAM,YAAY,GAAG,CAAC,MAAmB,KAAiC,MAAM,YAAY,gBAAgB,IAAI,MAAM,CAAC,IAAI,KAAK,OAAO;AAEvI;;;;;;AAMG;AACI,MAAM,aAAa,GAAG,CAAC,KAAiC,EAAE,MAA0C,MAAgC;IACzI,OAAO,EAAE,KAAK,CAAC,OAAO;IACtB,OAAO,EAAE,KAAK,CAAC,OAAO;IACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ;IACxB,MAAM,EAAE,KAAK,CAAC,MAAM;IACpB,MAAM;AACP,CAAA;AAED;;;;;AAKG;AACI,MAAM,aAAa,GAAG,CAAC,KAAiB,MAA0C,KAAK,CAAC,MAAM,KAAK,CAAC,GAAG,UAAU,GAAG,SAAS;AAEpI;;;;;;;AAOG;AACI,MAAM,UAAU,GAAG,CAAC,KAAoB,KAAa;AAC1D,IAAA,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC;AAAE,QAAA,OAAO,KAAK;AAC7C,IAAA,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO;AAAE,QAAA,OAAO,IAAI;IACtC,O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;QACrB,UAAU,CAAC,IAAI,CAAC;;AAEhB,QAAA,IAAI,UAAU,IAAI,WAAW,KAAK,cAAc;YAAE;QAClD,IAAI,KAAK,KAAK,SAAS;YAAE,oBAAoB,CAAC,WAAW,CAAC;AAC1D,QAAA,QAAQ,GAAG,WAAW,EAAE,KAAK,CAAC;AAChC,IAAA,CAAC;AAED,IAAA,MAAM,cAAc,GAAG,CAAC,WAAmB,EAAE,EAAE,UAAU,EAAE,UAAU,EAAe,MAAsB;;;AAGxG,QAAA,cAAc,EAAE,CAAC,KAAK,KAAI;YACxB,IAAI,gBAAgB,CAAC,OAAO,IAAI,aAAa,CAAC,KAAK,CAAC,KAAK,UAAU,EAAE;AACnE,gBAAA,gBAAgB,CAAC,OAAO,GAAG,KAAK;gBAChC;YACF;YACA,IAAI,UAAU,IAAI,EAAE,KAAK,CAAC,MAAM,YAAY,OAAO,CAAC;gBAAE;AACtD,YAAA,
|
|
1
|
+
{"version":3,"file":"useCommitOnPress.js","sources":["../../../../../../src/components/molecules/RadioCards/RadioCardAvatar/hooks/useCommitOnPress.ts"],"sourcesContent":[null],"names":[],"mappings":";;AA4CA,MAAM,YAAY,GAAG,CAAC,MAAmB,KAAiC,MAAM,YAAY,gBAAgB,IAAI,MAAM,CAAC,IAAI,KAAK,OAAO;AAEvI;AACA,MAAM,aAAa,GAAG,CAAC,IAAa,KAAK,IAAI,CAAC,aAAa,CAAC,qBAAqB,CAAC;AAElF;;;;;;AAMG;AACI,MAAM,aAAa,GAAG,CAAC,KAAiC,EAAE,MAA0C,MAAgC;IACzI,OAAO,EAAE,KAAK,CAAC,OAAO;IACtB,OAAO,EAAE,KAAK,CAAC,OAAO;IACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ;IACxB,MAAM,EAAE,KAAK,CAAC,MAAM;IACpB,MAAM;AACP,CAAA;AAED;;;;;AAKG;AACI,MAAM,aAAa,GAAG,CAAC,KAAiB,MAA0C,KAAK,CAAC,MAAM,KAAK,CAAC,GAAG,UAA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AC,KAAK,CAAC;gBAAE;;YAEtE,IAAI,KAAK,CAAC,MAAM,KAAK,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC;gBAAE;;AAEzD,YAAA,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO;gBAAE,KAAK,CAAC,cAAc,EAAE;;AAC5C,gBAAA,gBAAgB,CAAC,OAAO,GAAG,IAAI;AACpC,YAAA,WAAW,CAAC,WAAW,EAAE,aAAa,CAAC,KAAK,EAAE,UAAU,CAAC,EAAE,UAAU,CAAC;QACxE,CAAC;;;AAGD,QAAA,cAAc,EAAE,CAAC,KAAK,KAAI;YACxB,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO;gBAAE;YACpD,UAAU,CAAC,MAAK;AACd,gBAAA,gBAAgB,CAAC,OAAO,GAAG,KAAK;YAClC,CAAC,EAAE,CAAC,CAAC;QACP,CAAC;;;AAGD,QAAA,MAAM,EAAE,CAAC,KAAK,KAAI;AAChB,YAAA,gBAAgB,CAAC,OAAO,GAAG,KAAK;AAChC,YAAA,IAAI,cAAc,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,aAAa,EAAE,QAAQ,CAAC,KAAK,CAAC,aAAa,CAAC;gBAAE,UAAU,CAAC,IAAI,CAAC;QAC3G,CAAC;AACF,KAAA,CAAC;AAEF,IAAA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE;AAC3C;;"}
|
|
@@ -19,7 +19,9 @@ const RadioCardBullet = ({ items, size = 'sm', className, 'data-testid': dataTes
|
|
|
19
19
|
const optionIds = useOptionIds.useOptionIds();
|
|
20
20
|
return (jsxRuntime.jsx(reactAriaComponents.RadioGroup, { ...props, "data-testid": rootTestId, className: (state) => cx.cx('flex flex-col gap-3', isHorizontal && 'sm:flex-row', typeof className === 'function' ? className(state) : className), children: items.map((plan, index) => {
|
|
21
21
|
const ids = optionIds(index, { title: plan.title, secondaryTitle: plan.secondaryTitle, description: plan.description });
|
|
22
|
-
return (
|
|
22
|
+
return (
|
|
23
|
+
// No box of its own, so the `<label>` is still the card the group lays out.
|
|
24
|
+
jsxRuntime.jsx(reactAriaComponents.RadioField, { isDisabled: plan.disabled, value: plan.value, "aria-labelledby": ariaIds_utils.joinIds(ids.title, ids.secondaryTitle), "aria-describedby": ids.description, className: "contents", children: jsxRuntime.jsx(reactAriaComponents.RadioButton, { "data-testid": testIdUtils.joinTestId(rootTestId, `option-${plan.value}`), className: ({ isDisabled, isSelected, isFocusVisible }) => cx.cx('relative flex cursor-pointer rounded-xl bg-primary p-4 outline-focus-ring ring-inset', size === 'md' ? 'gap-3' : 'gap-2', isHorizontal && 'sm:min-w-0 sm:flex-1', isSelected ? 'ring-2 ring-brand' : 'ring-1 ring-secondary', isDisabled && 'cursor-not-allowed bg-disabled_subtle ring-disabled_subtle', isFocusVisible && 'outline-2 outline-offset-2'), children: ({ isSelected, isDisabled, isFocusVisible }) => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: cx.cx('relative mt-0.5 inline-flex shrink-0 items-center justify-center rounded-full ring-inset', size === 'md' ? 'size-5' : 'size-4', isSelected ? 'bg-brand-solid' : 'ring-1 ring-primary', isDisabled && 'bg-disabled_subtle ring-1 ring-disabled', isFocusVisible && 'outline-2 outline-offset-2 outline-focus-ring'), children: jsxRuntime.jsx("div", { className: cx.cx('absolute rounded-full bg-fg-white opacity-0', size === 'md' ? 'size-2' : 'size-1.5', isSelected ? 'opacity-100' : 'opacity-0', isDisabled && 'bg-fg-disabled_subtle') }) }), jsxRuntime.jsxs("div", { className: cx.cx('flex flex-col', size === 'md' ? 'gap-0.5' : ''), children: [jsxRuntime.jsxs("span", { className: cx.cx('flex', size === 'md' ? 'gap-1.5' : 'gap-1'), children: [jsxRuntime.jsx("span", { id: ids.title, className: cx.cx('text-sm font-medium text-secondary', size === 'md' ? 'text-md font-medium' : 'text-sm font-medium'), children: plan.title }), plan.secondaryTitle && (jsxRuntime.jsx("span", { id: ids.secondaryTitle, className: cx.cx('text-tertiary', size === 'md' ? 'text-md' : 'text-sm'), children: plan.secondaryTitle }))] }), plan.description && (jsxRuntime.jsx("span", { id: ids.description, className: cx.cx('text-tertiary', size === 'md' ? 'text-md' : 'text-sm'), children: plan.description }))] })] })) }) }, plan.value));
|
|
23
25
|
}) }));
|
|
24
26
|
};
|
|
25
27
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioCardBullet.cjs","sources":["../../../../../src/components/molecules/RadioCards/RadioCardBullet/RadioCardBullet.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","useOptionIds","_jsx","AriaRadioGroup","cx","
|
|
1
|
+
{"version":3,"file":"RadioCardBullet.cjs","sources":["../../../../../src/components/molecules/RadioCards/RadioCardBullet/RadioCardBullet.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","useOptionIds","_jsx","AriaRadioGroup","cx","AriaRadioField","joinIds","AriaRadioButton","joinTestId","_jsxs","_Fragment"],"mappings":";;;;;;;;;AAqBA;;;;;AAKG;MACU,eAAe,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,GAAG,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,EAAwB,KAAI;AAC9H,IAAA,MAAM,UAAU,GAAGA,6BAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;AAC7G,IAAA,MAAM,YAAY,GAAG,KAAK,CAAC,WAAW,KAAK,YAAY;AACvD,IAAA,MAAM,SAAS,GAAGC,yBAAY,EAAE;IAEhC,QACEC,eAACC,8BAAc,EAAA,EAAA,GACT,KAAK,EAAA,aAAA,EACI,UAAU,EACvB,SAAS,EAAE,CAAC,KAAK,KAAKC,KAAE,CAAC,qBAAqB,EAAE,YAAY,IAAI,aAAa,EAAE,OAAO,SAAS,KAAK,UAAU,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,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A,CACa;AAErB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioCardBullet.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/RadioCards/RadioCardBullet/RadioCardBullet.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAI7D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAEnE,MAAM,WAAW,oBAAqB,SAAQ,eAAe;IAC3D,6DAA6D;IAC7D,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,gEAAgE;IAChE,KAAK,EAAE,uBAAuB,EAAE,CAAC;IACjC,oIAAoI;IACpI,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,gGAAgG;IAChG,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAAI,iEAAwE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"RadioCardBullet.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/RadioCards/RadioCardBullet/RadioCardBullet.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAI7D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAEnE,MAAM,WAAW,oBAAqB,SAAQ,eAAe;IAC3D,6DAA6D;IAC7D,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,gEAAgE;IAChE,KAAK,EAAE,uBAAuB,EAAE,CAAC;IACjC,oIAAoI;IACpI,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,gGAAgG;IAChG,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAAI,iEAAwE,oBAAoB,gCAuF3H,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
3
3
|
import { useResolvedTestId, joinTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
4
|
-
import { RadioGroup,
|
|
4
|
+
import { RadioGroup, RadioField, RadioButton } from 'react-aria-components';
|
|
5
5
|
import { joinIds } from '../../../../utilities/__internal__/ariaIdsUtils/ariaIds.utils.js';
|
|
6
6
|
import { useOptionIds } from '../hooks/useOptionIds.js';
|
|
7
7
|
|
|
@@ -17,7 +17,9 @@ const RadioCardBullet = ({ items, size = 'sm', className, 'data-testid': dataTes
|
|
|
17
17
|
const optionIds = useOptionIds();
|
|
18
18
|
return (jsx(RadioGroup, { ...props, "data-testid": rootTestId, className: (state) => cx('flex flex-col gap-3', isHorizontal && 'sm:flex-row', typeof className === 'function' ? className(state) : className), children: items.map((plan, index) => {
|
|
19
19
|
const ids = optionIds(index, { title: plan.title, secondaryTitle: plan.secondaryTitle, description: plan.description });
|
|
20
|
-
return (
|
|
20
|
+
return (
|
|
21
|
+
// No box of its own, so the `<label>` is still the card the group lays out.
|
|
22
|
+
jsx(RadioField, { isDisabled: plan.disabled, value: plan.value, "aria-labelledby": joinIds(ids.title, ids.secondaryTitle), "aria-describedby": ids.description, className: "contents", children: jsx(RadioButton, { "data-testid": joinTestId(rootTestId, `option-${plan.value}`), className: ({ isDisabled, isSelected, isFocusVisible }) => cx('relative flex cursor-pointer rounded-xl bg-primary p-4 outline-focus-ring ring-inset', size === 'md' ? 'gap-3' : 'gap-2', isHorizontal && 'sm:min-w-0 sm:flex-1', isSelected ? 'ring-2 ring-brand' : 'ring-1 ring-secondary', isDisabled && 'cursor-not-allowed bg-disabled_subtle ring-disabled_subtle', isFocusVisible && 'outline-2 outline-offset-2'), children: ({ isSelected, isDisabled, isFocusVisible }) => (jsxs(Fragment, { children: [jsx("div", { className: cx('relative mt-0.5 inline-flex shrink-0 items-center justify-center rounded-full ring-inset', size === 'md' ? 'size-5' : 'size-4', isSelected ? 'bg-brand-solid' : 'ring-1 ring-primary', isDisabled && 'bg-disabled_subtle ring-1 ring-disabled', isFocusVisible && 'outline-2 outline-offset-2 outline-focus-ring'), children: jsx("div", { className: cx('absolute rounded-full bg-fg-white opacity-0', size === 'md' ? 'size-2' : 'size-1.5', isSelected ? 'opacity-100' : 'opacity-0', isDisabled && 'bg-fg-disabled_subtle') }) }), jsxs("div", { className: cx('flex flex-col', size === 'md' ? 'gap-0.5' : ''), children: [jsxs("span", { className: cx('flex', size === 'md' ? 'gap-1.5' : 'gap-1'), children: [jsx("span", { id: ids.title, className: cx('text-sm font-medium text-secondary', size === 'md' ? 'text-md font-medium' : 'text-sm font-medium'), children: plan.title }), plan.secondaryTitle && (jsx("span", { id: ids.secondaryTitle, className: cx('text-tertiary', size === 'md' ? 'text-md' : 'text-sm'), children: plan.secondaryTitle }))] }), plan.description && (jsx("span", { id: ids.description, className: cx('text-tertiary', size === 'md' ? 'text-md' : 'text-sm'), children: plan.description }))] })] })) }) }, plan.value));
|
|
21
23
|
}) }));
|
|
22
24
|
};
|
|
23
25
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioCardBullet.js","sources":["../../../../../src/components/molecules/RadioCards/RadioCardBullet/RadioCardBullet.tsx"],"sourcesContent":[null],"names":["_jsx","AriaRadioGroup","
|
|
1
|
+
{"version":3,"file":"RadioCardBullet.js","sources":["../../../../../src/components/molecules/RadioCards/RadioCardBullet/RadioCardBullet.tsx"],"sourcesContent":[null],"names":["_jsx","AriaRadioGroup","AriaRadioField","AriaRadioButton","_jsxs","_Fragment"],"mappings":";;;;;;;AAqBA;;;;;AAKG;MACU,eAAe,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,GAAG,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,EAAwB,KAAI;AAC9H,IAAA,MAAM,UAAU,GAAG,iBAAiB,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AAC,EAAA,QAAA,EAChG,IAAI,CAAC,cAAc,EAAA,CACf,CACR,IACI,EACN,IAAI,CAAC,WAAW,KACfA,GAAA,CAAA,MAAA,EAAA,EAAM,EAAE,EAAE,GAAG,CAAC,WAAW,EAAE,SAAS,EAAE,EAAE,CAAC,eAAe,EAAE,IAAI,KAAK,IAAI,GAAG,SAAS,GAAG,SAAS,CAAC,EAAA,QAAA,EAC7F,IAAI,CAAC,WAAW,GACZ,CACR,CAAA,EAAA,CACG,CAAA,EAAA,CACL,CACJ,GACe,EAAA,EA/Db,IAAI,CAAC,KAAK,CAgEA;QAErB,CAAC,CAAC,EAAA,CACa;AAErB;;"}
|
|
@@ -19,7 +19,9 @@ const RadioCardCheck = ({ items, size = 'sm', className, 'data-testid': dataTest
|
|
|
19
19
|
const optionIds = useOptionIds.useOptionIds();
|
|
20
20
|
return (jsxRuntime.jsx(reactAriaComponents.RadioGroup, { ...props, "data-testid": rootTestId, className: (state) => cx.cx('flex flex-col gap-3', typeof className === 'function' ? className(state) : className), children: items.map((plan, index) => {
|
|
21
21
|
const ids = optionIds(index, { title: plan.title, secondaryTitle: plan.secondaryTitle, description: plan.description });
|
|
22
|
-
return (
|
|
22
|
+
return (
|
|
23
|
+
// No box of its own, so the `<label>` is still the card the group lays out.
|
|
24
|
+
jsxRuntime.jsx(reactAriaComponents.RadioField, { isDisabled: plan.disabled, value: plan.value, "aria-labelledby": ariaIds_utils.joinIds(ids.title, ids.secondaryTitle), "aria-describedby": ids.description, className: "contents", children: jsxRuntime.jsx(reactAriaComponents.RadioButton, { "data-testid": testIdUtils.joinTestId(rootTestId, `option-${plan.value}`), className: ({ isDisabled, isFocusVisible, isSelected }) => cx.cx('relative flex cursor-pointer items-start gap-1 rounded-xl bg-primary p-4 outline-focus-ring ring-inset', size === 'md' ? 'gap-3' : 'gap-2', isSelected ? 'ring-2 ring-brand' : 'ring-1 ring-secondary', isDisabled && 'cursor-not-allowed bg-disabled_subtle ring-disabled_subtle', isFocusVisible && 'outline-2 outline-offset-2'), children: ({ isDisabled, isSelected, isFocusVisible }) => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Checkboxes.CheckboxBase, { size: size === 'md' ? 'md' : 'sm', isDisabled: isDisabled, isSelected: isSelected, isFocusVisible: isFocusVisible, className: "mt-0.5" }), jsxRuntime.jsxs("div", { className: cx.cx('flex flex-col', size === 'md' ? 'gap-0.5' : ''), children: [jsxRuntime.jsxs("span", { className: cx.cx('flex', size === 'md' ? 'gap-1.5' : 'gap-1'), children: [jsxRuntime.jsx("span", { id: ids.title, className: cx.cx('text-secondary', size === 'md' ? 'text-md font-medium' : 'text-sm font-medium'), children: plan.title }), plan.secondaryTitle && (jsxRuntime.jsx("span", { id: ids.secondaryTitle, className: cx.cx('text-tertiary', size === 'md' ? 'text-md' : 'text-sm'), children: plan.secondaryTitle }))] }), plan.description && (jsxRuntime.jsx("span", { id: ids.description, className: cx.cx('text-tertiary', size === 'md' ? 'text-md' : 'text-sm'), children: plan.description }))] })] })) }) }, plan.value));
|
|
23
25
|
}) }));
|
|
24
26
|
};
|
|
25
27
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioCardCheck.cjs","sources":["../../../../../src/components/molecules/RadioCards/RadioCardCheck/RadioCardCheck.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","useOptionIds","_jsx","AriaRadioGroup","cx","
|
|
1
|
+
{"version":3,"file":"RadioCardCheck.cjs","sources":["../../../../../src/components/molecules/RadioCards/RadioCardCheck/RadioCardCheck.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","useOptionIds","_jsx","AriaRadioGroup","cx","AriaRadioField","joinIds","AriaRadioButton","joinTestId","_jsxs","CheckboxBase"],"mappings":";;;;;;;;;;AAwBA;;;;;AAKG;MACU,cAAc,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,GAAG,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,EAAu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AI,CAAC,WAAW,EAAA,CACZ,CACR,CAAA,EAAA,CACG,CAAA,EAAA,CACL,CACJ,EAAA,CACe,IAhDb,IAAI,CAAC,KAAK,CAiDA;QAErB,CAAC,CAAC,EAAA,CACa;AAErB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioCardCheck.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/RadioCards/RadioCardCheck/RadioCardCheck.tsx"],"names":[],"mappings":"AAKA,OAAO,
|
|
1
|
+
{"version":3,"file":"RadioCardCheck.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/RadioCards/RadioCardCheck/RadioCardCheck.tsx"],"names":[],"mappings":"AAKA,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,MAAM,WAAW,mBAAoB,SAAQ,eAAe;IAC1D,6DAA6D;IAC7D,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,gEAAgE;IAChE,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,gGAAgG;IAChG,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,iEAAwE,mBAAmB,gCAwEzH,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
2
2
|
import { CheckboxBase } from '@flipdish/ui-library/components/atoms/Checkboxes';
|
|
3
3
|
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
4
4
|
import { useResolvedTestId, joinTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
5
|
-
import { RadioGroup,
|
|
5
|
+
import { RadioGroup, RadioField, RadioButton } from 'react-aria-components';
|
|
6
6
|
import { joinIds } from '../../../../utilities/__internal__/ariaIdsUtils/ariaIds.utils.js';
|
|
7
7
|
import { useOptionIds } from '../hooks/useOptionIds.js';
|
|
8
8
|
|
|
@@ -17,7 +17,9 @@ const RadioCardCheck = ({ items, size = 'sm', className, 'data-testid': dataTest
|
|
|
17
17
|
const optionIds = useOptionIds();
|
|
18
18
|
return (jsx(RadioGroup, { ...props, "data-testid": rootTestId, className: (state) => cx('flex flex-col gap-3', typeof className === 'function' ? className(state) : className), children: items.map((plan, index) => {
|
|
19
19
|
const ids = optionIds(index, { title: plan.title, secondaryTitle: plan.secondaryTitle, description: plan.description });
|
|
20
|
-
return (
|
|
20
|
+
return (
|
|
21
|
+
// No box of its own, so the `<label>` is still the card the group lays out.
|
|
22
|
+
jsx(RadioField, { isDisabled: plan.disabled, value: plan.value, "aria-labelledby": joinIds(ids.title, ids.secondaryTitle), "aria-describedby": ids.description, className: "contents", children: jsx(RadioButton, { "data-testid": joinTestId(rootTestId, `option-${plan.value}`), className: ({ isDisabled, isFocusVisible, isSelected }) => cx('relative flex cursor-pointer items-start gap-1 rounded-xl bg-primary p-4 outline-focus-ring ring-inset', size === 'md' ? 'gap-3' : 'gap-2', isSelected ? 'ring-2 ring-brand' : 'ring-1 ring-secondary', isDisabled && 'cursor-not-allowed bg-disabled_subtle ring-disabled_subtle', isFocusVisible && 'outline-2 outline-offset-2'), children: ({ isDisabled, isSelected, isFocusVisible }) => (jsxs(Fragment, { children: [jsx(CheckboxBase, { size: size === 'md' ? 'md' : 'sm', isDisabled: isDisabled, isSelected: isSelected, isFocusVisible: isFocusVisible, className: "mt-0.5" }), jsxs("div", { className: cx('flex flex-col', size === 'md' ? 'gap-0.5' : ''), children: [jsxs("span", { className: cx('flex', size === 'md' ? 'gap-1.5' : 'gap-1'), children: [jsx("span", { id: ids.title, className: cx('text-secondary', size === 'md' ? 'text-md font-medium' : 'text-sm font-medium'), children: plan.title }), plan.secondaryTitle && (jsx("span", { id: ids.secondaryTitle, className: cx('text-tertiary', size === 'md' ? 'text-md' : 'text-sm'), children: plan.secondaryTitle }))] }), plan.description && (jsx("span", { id: ids.description, className: cx('text-tertiary', size === 'md' ? 'text-md' : 'text-sm'), children: plan.description }))] })] })) }) }, plan.value));
|
|
21
23
|
}) }));
|
|
22
24
|
};
|
|
23
25
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioCardCheck.js","sources":["../../../../../src/components/molecules/RadioCards/RadioCardCheck/RadioCardCheck.tsx"],"sourcesContent":[null],"names":["_jsx","AriaRadioGroup","
|
|
1
|
+
{"version":3,"file":"RadioCardCheck.js","sources":["../../../../../src/components/molecules/RadioCards/RadioCardCheck/RadioCardCheck.tsx"],"sourcesContent":[null],"names":["_jsx","AriaRadioGroup","AriaRadioField","AriaRadioButton","_jsxs"],"mappings":";;;;;;;;AAwBA;;;;;AAKG;MACU,cAAc,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,GAAG,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,EAAuB,KAAI;AAC5H,IAAA,MAAM,UAAU,GAAG,iBAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;AAE7G,IAAA,MAAM,SAAS,GAAG,YAAY,EAAE;IAEhC,QACEA,IAACC,UAAc,EAAA,EAAA,GACT,KAAK,EAAA,aAAA,EACI,UAAU,EACvB,SAAS,EAAE,CAAC,KAAK,KAAK,EAAE,CAAC,qBAAqB,EAAE,OAAO,SAAS,KAAK,UAAU,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,EAAA,QAAA,EAE9G,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,KAAI;YACzB,MAAM,GAAG,GAAG,SAAS,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,cAAc,EAAE,IAAI,CAAC,cAAc,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;YAEvH;;AAEE,YAAAD,GAAA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,IAAI,KAAK,IAAI,GAAG,qBAAqB,GAAG,qBAAqB,CAAC,EAAA,QAAA,EAChH,IAAI,CAAC,KAAK,EAAA,CACN,EACN,IAAI,CAAC,cAAc,KAClBA,GAAA,CAAA,MAAA,EAAA,EAAM,EAAE,EAAE,GAAG,CAAC,cAAc,EAAE,SAAS,EAAE,EAAE,CAAC,eAAe,EAAE,IAAI,KAAK,IAAI,GAAG,SAAS,GAAG,SAAS,CAAC,EAAA,QAAA,EAChG,IAAI,CAAC,cAAc,EAAA,CACf,CACR,CAAA,EAAA,CACI,EACN,IAAI,CAAC,WAAW,KACfA,GAAA,CAAA,MAAA,EAAA,EAAM,EAAE,EAAE,GAAG,CAAC,WAAW,EAAE,SAAS,EAAE,EAAE,CAAC,eAAe,EAAE,IAAI,KAAK,IAAI,GAAG,SAAS,GAAG,SAAS,CAAC,EAAA,QAAA,EAC7F,IAAI,CAAC,WAAW,EAAA,CACZ,CACR,CAAA,EAAA,CACG,CAAA,EAAA,CACL,CACJ,EAAA,CACe,IAhDb,IAAI,CAAC,KAAK,CAiDA;QAErB,CAAC,CAAC,EAAA,CACa;AAErB;;"}
|
|
@@ -20,7 +20,9 @@ const RadioCardIcon = ({ items, size = 'sm', className, 'data-testid': dataTestI
|
|
|
20
20
|
const optionIds = useOptionIds.useOptionIds();
|
|
21
21
|
return (jsxRuntime.jsx(reactAriaComponents.RadioGroup, { ...props, "data-testid": rootTestId, className: (state) => cx.cx('flex flex-col gap-3', typeof className === 'function' ? className(state) : className), children: items.map((plan, index) => {
|
|
22
22
|
const ids = optionIds(index, { title: plan.title, secondaryTitle: plan.secondaryTitle, description: plan.description });
|
|
23
|
-
return (
|
|
23
|
+
return (
|
|
24
|
+
// No box of its own, so the `<label>` is still the card the group lays out.
|
|
25
|
+
jsxRuntime.jsx(reactAriaComponents.RadioField, { isDisabled: plan.disabled, value: plan.value, "aria-labelledby": ariaIds_utils.joinIds(ids.title, ids.secondaryTitle), "aria-describedby": ids.description, className: "contents", children: jsxRuntime.jsx(reactAriaComponents.RadioButton, { "data-testid": testIdUtils.joinTestId(rootTestId, `option-${plan.value}`), className: ({ isDisabled, isSelected, isFocusVisible }) => cx.cx('relative flex cursor-pointer items-start gap-1 rounded-xl bg-primary p-4 outline-focus-ring ring-inset', isSelected ? 'ring-2 ring-brand' : 'ring-1 ring-secondary', isDisabled && 'cursor-not-allowed bg-disabled_subtle ring-disabled', isFocusVisible && 'outline-2 outline-offset-2'), children: ({ isDisabled, isSelected, isFocusVisible }) => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: "flex flex-1 gap-3", children: [jsxRuntime.jsx(FeaturedIcon.FeaturedIcon, { icon: plan.icon, size: size === 'md' ? 'md' : 'sm', color: "gray", theme: "modern", className: cx.cx(isDisabled && 'bg-disabled text-fg-disabled') }), jsxRuntime.jsxs("div", { className: cx.cx('flex flex-col', size === 'md' ? 'gap-0.5' : ''), children: [jsxRuntime.jsxs("span", { className: cx.cx('flex', size === 'md' ? 'gap-1.5' : 'gap-1'), children: [jsxRuntime.jsx("span", { id: ids.title, className: cx.cx('text-secondary', size === 'md' ? 'text-md font-medium' : 'text-sm font-medium'), children: plan.title }), plan.secondaryTitle && (jsxRuntime.jsx("span", { id: ids.secondaryTitle, className: cx.cx('text-tertiary', size === 'md' ? 'text-md' : 'text-sm'), children: plan.secondaryTitle }))] }), plan.description && (jsxRuntime.jsx("span", { id: ids.description, className: cx.cx('text-tertiary', size === 'md' ? 'text-md' : 'text-sm'), children: plan.description }))] })] }), jsxRuntime.jsx(Checkboxes.CheckboxBase, { size: size === 'md' ? 'md' : 'sm', isDisabled: isDisabled, isSelected: isSelected, isFocusVisible: isFocusVisible })] })) }) }, plan.value));
|
|
24
26
|
}) }));
|
|
25
27
|
};
|
|
26
28
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioCardIcon.cjs","sources":["../../../../../src/components/molecules/RadioCards/RadioCardIcon/RadioCardIcon.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","useOptionIds","_jsx","AriaRadioGroup","cx","
|
|
1
|
+
{"version":3,"file":"RadioCardIcon.cjs","sources":["../../../../../src/components/molecules/RadioCards/RadioCardIcon/RadioCardIcon.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","useOptionIds","_jsx","AriaRadioGroup","cx","AriaRadioField","joinIds","AriaRadioButton","joinTestId","_jsxs","_Fragment","FeaturedIcon","CheckboxBase"],"mappings":";;;;;;;;;;;AAqBA;;;;;AAKG;MACU,aAAa,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,GAAG,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,EAAsB,KAAI;AAC1H,IAAA,MAAM,UAAU,GAAGA,6BAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;AAE7G,IAAA,MAAM,SAAS,GAAGC,yBAAY,EAAE;IAEhC,QACEC,eAACC,8BAAc,EAAA,EAAA,GACT,KAAK,EAAA,aAAA,EACI,UAAU,EACvB,SAAS,EAAE,CAAC,KAAK,KAAKC,KAAE,CAAC,qBAAqB,EAAE,OAAO,SAAS,KAAK,UAAU,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,EAAA,QAAA,EAE9G,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,KAAI;YACzB,MAAM,GAAG,GAAG,SAAS,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,cAAc,EAAE,IAAI,CAAC,cAAc,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;YAEvH;;AAEE,YAAAF,cAAA,CAACG,8BAAc,EAAA,EACb,UAAU,EAAE,IAAI,CAAC,QAAQ,EAEzB,KAAK,EAAE,IAAI,CAAC,KAAK,EAAA,iBAAA,EACAC,qBAAO,CAAC,GA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AI,KAAK,IAAI,GAAG,qBAAqB,GAAG,qBAAqB,CAAC,YAChH,IAAI,CAAC,KAAK,EAAA,CACN,EACN,IAAI,CAAC,cAAc,KAClBF,cAAA,CAAA,MAAA,EAAA,EAAM,EAAE,EAAE,GAAG,CAAC,cAAc,EAAE,SAAS,EAAEE,KAAE,CAAC,eAAe,EAAE,IAAI,KAAK,IAAI,GAAG,SAAS,GAAG,SAAS,CAAC,EAAA,QAAA,EAChG,IAAI,CAAC,cAAc,EAAA,CACf,CACR,IACI,EACN,IAAI,CAAC,WAAW,KACfF,cAAA,CAAA,MAAA,EAAA,EAAM,EAAE,EAAE,GAAG,CAAC,WAAW,EAAE,SAAS,EAAEE,KAAE,CAAC,eAAe,EAAE,IAAI,KAAK,IAAI,GAAG,SAAS,GAAG,SAAS,CAAC,EAAA,QAAA,EAC7F,IAAI,CAAC,WAAW,GACZ,CACR,CAAA,EAAA,CACG,CAAA,EAAA,CACF,EAENF,eAACU,uBAAY,EAAA,EAAC,IAAI,EAAE,IAAI,KAAK,IAAI,GAAG,IAAI,GAAG,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,EAAA,CAAI,CAAA,EAAA,CAClI,CACJ,GACe,EAAA,EAnDb,IAAI,CAAC,KAAK,CAoDA;QAErB,CAAC,CAAC,EAAA,CACa;AAErB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioCardIcon.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/RadioCards/RadioCardIcon/RadioCardIcon.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAI7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,MAAM,WAAW,kBAAmB,SAAQ,eAAe;IACzD,6DAA6D;IAC7D,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,yEAAyE;IACzE,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,gGAAgG;IAChG,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GAAI,iEAAwE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"RadioCardIcon.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/RadioCards/RadioCardIcon/RadioCardIcon.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAI7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,MAAM,WAAW,kBAAmB,SAAQ,eAAe;IACzD,6DAA6D;IAC7D,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,yEAAyE;IACzE,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,gGAAgG;IAChG,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GAAI,iEAAwE,kBAAkB,gCA2EvH,CAAC"}
|