@flipdish/ui-library 0.57.0 → 0.58.0
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/atoms/Checkbox/index.cjs +7 -61
- package/dist/components/atoms/Checkbox/index.cjs.map +1 -1
- package/dist/components/atoms/Checkbox/index.d.ts +15 -55
- package/dist/components/atoms/Checkbox/index.d.ts.map +1 -1
- package/dist/components/atoms/Checkbox/index.js +7 -61
- package/dist/components/atoms/Checkbox/index.js.map +1 -1
- package/dist/components/atoms/Checkboxes/Checkbox/Checkbox.cjs +56 -0
- package/dist/components/atoms/Checkboxes/Checkbox/Checkbox.cjs.map +1 -0
- package/dist/components/atoms/Checkboxes/Checkbox/Checkbox.d.ts +25 -0
- package/dist/components/atoms/Checkboxes/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/atoms/Checkboxes/Checkbox/Checkbox.js +54 -0
- package/dist/components/atoms/Checkboxes/Checkbox/Checkbox.js.map +1 -0
- package/dist/components/atoms/Checkboxes/Checkbox/CheckboxBase.cjs +13 -0
- package/dist/components/atoms/Checkboxes/Checkbox/CheckboxBase.cjs.map +1 -0
- package/dist/components/atoms/Checkboxes/Checkbox/CheckboxBase.d.ts +20 -0
- package/dist/components/atoms/Checkboxes/Checkbox/CheckboxBase.d.ts.map +1 -0
- package/dist/components/atoms/Checkboxes/Checkbox/CheckboxBase.js +11 -0
- package/dist/components/atoms/Checkboxes/Checkbox/CheckboxBase.js.map +1 -0
- package/dist/components/atoms/Checkboxes/CheckboxGroup/CheckboxGroup.cjs +23 -0
- package/dist/components/atoms/Checkboxes/CheckboxGroup/CheckboxGroup.cjs.map +1 -0
- package/dist/components/atoms/Checkboxes/CheckboxGroup/CheckboxGroup.d.ts +27 -0
- package/dist/components/atoms/Checkboxes/CheckboxGroup/CheckboxGroup.d.ts.map +1 -0
- package/dist/components/atoms/Checkboxes/CheckboxGroup/CheckboxGroup.js +21 -0
- package/dist/components/atoms/Checkboxes/CheckboxGroup/CheckboxGroup.js.map +1 -0
- package/dist/components/atoms/Checkboxes/index.cjs +12 -0
- package/dist/components/atoms/Checkboxes/index.cjs.map +1 -0
- package/dist/components/atoms/Checkboxes/index.d.ts +16 -0
- package/dist/components/atoms/Checkboxes/index.d.ts.map +1 -0
- package/dist/components/atoms/Checkboxes/index.js +4 -0
- package/dist/components/atoms/Checkboxes/index.js.map +1 -0
- package/dist/components/atoms/Checkboxes/providers/CheckboxGroup.context.cjs +9 -0
- package/dist/components/atoms/Checkboxes/providers/CheckboxGroup.context.cjs.map +1 -0
- package/dist/components/atoms/Checkboxes/providers/CheckboxGroup.context.d.ts +10 -0
- package/dist/components/atoms/Checkboxes/providers/CheckboxGroup.context.d.ts.map +1 -0
- package/dist/components/atoms/Checkboxes/providers/CheckboxGroup.context.js +7 -0
- package/dist/components/atoms/Checkboxes/providers/CheckboxGroup.context.js.map +1 -0
- package/dist/components/atoms/Divider/index.cjs +3 -15
- package/dist/components/atoms/Divider/index.cjs.map +1 -1
- package/dist/components/atoms/Divider/index.d.ts +7 -20
- package/dist/components/atoms/Divider/index.d.ts.map +1 -1
- package/dist/components/atoms/Divider/index.js +3 -15
- package/dist/components/atoms/Divider/index.js.map +1 -1
- package/dist/components/atoms/Dividers/ContentDivider/ContentDivider.cjs +24 -0
- package/dist/components/atoms/Dividers/ContentDivider/ContentDivider.cjs.map +1 -0
- package/dist/components/atoms/Dividers/ContentDivider/ContentDivider.d.ts +19 -0
- package/dist/components/atoms/Dividers/ContentDivider/ContentDivider.d.ts.map +1 -0
- package/dist/components/atoms/Dividers/ContentDivider/ContentDivider.js +22 -0
- package/dist/components/atoms/Dividers/ContentDivider/ContentDivider.js.map +1 -0
- package/dist/components/atoms/Dividers/Divider/Divider.cjs +21 -0
- package/dist/components/atoms/Dividers/Divider/Divider.cjs.map +1 -0
- package/dist/components/atoms/Dividers/Divider/Divider.d.ts +20 -0
- package/dist/components/atoms/Dividers/Divider/Divider.d.ts.map +1 -0
- package/dist/components/atoms/Dividers/Divider/Divider.js +19 -0
- package/dist/components/atoms/Dividers/Divider/Divider.js.map +1 -0
- package/dist/components/atoms/{Divider → Dividers/Divider}/Divider.styles.cjs +1 -1
- package/dist/components/atoms/Dividers/Divider/Divider.styles.cjs.map +1 -0
- package/dist/components/atoms/{Divider → Dividers/Divider}/Divider.styles.d.ts +1 -1
- package/dist/components/atoms/Dividers/Divider/Divider.styles.d.ts.map +1 -0
- package/dist/components/atoms/{Divider → Dividers/Divider}/Divider.styles.js +1 -1
- package/dist/components/atoms/Dividers/Divider/Divider.styles.js.map +1 -0
- package/dist/components/atoms/Dividers/index.cjs +10 -0
- package/dist/components/atoms/Dividers/index.cjs.map +1 -0
- package/dist/components/atoms/Dividers/index.d.ts +14 -0
- package/dist/components/atoms/Dividers/index.d.ts.map +1 -0
- package/dist/components/atoms/Dividers/index.js +3 -0
- package/dist/components/atoms/Dividers/index.js.map +1 -0
- package/dist/components/atoms/RadioButton/index.cjs +7 -34
- package/dist/components/atoms/RadioButton/index.cjs.map +1 -1
- package/dist/components/atoms/RadioButton/index.d.ts +16 -51
- package/dist/components/atoms/RadioButton/index.d.ts.map +1 -1
- package/dist/components/atoms/RadioButton/index.js +7 -34
- package/dist/components/atoms/RadioButton/index.js.map +1 -1
- package/dist/components/atoms/Radios/RadioButton/RadioButton.cjs +31 -0
- package/dist/components/atoms/Radios/RadioButton/RadioButton.cjs.map +1 -0
- package/dist/components/atoms/Radios/RadioButton/RadioButton.d.ts +25 -0
- package/dist/components/atoms/Radios/RadioButton/RadioButton.d.ts.map +1 -0
- package/dist/components/atoms/Radios/RadioButton/RadioButton.js +29 -0
- package/dist/components/atoms/Radios/RadioButton/RadioButton.js.map +1 -0
- package/dist/components/atoms/Radios/RadioButton/RadioButtonBase.cjs +13 -0
- package/dist/components/atoms/Radios/RadioButton/RadioButtonBase.cjs.map +1 -0
- package/dist/components/atoms/Radios/RadioButton/RadioButtonBase.d.ts +18 -0
- package/dist/components/atoms/Radios/RadioButton/RadioButtonBase.d.ts.map +1 -0
- package/dist/components/atoms/Radios/RadioButton/RadioButtonBase.js +11 -0
- package/dist/components/atoms/Radios/RadioButton/RadioButtonBase.js.map +1 -0
- package/dist/components/atoms/Radios/RadioGroup/RadioGroup.cjs +22 -0
- package/dist/components/atoms/Radios/RadioGroup/RadioGroup.cjs.map +1 -0
- package/dist/components/atoms/Radios/RadioGroup/RadioGroup.d.ts +20 -0
- package/dist/components/atoms/Radios/RadioGroup/RadioGroup.d.ts.map +1 -0
- package/dist/components/atoms/Radios/RadioGroup/RadioGroup.js +20 -0
- package/dist/components/atoms/Radios/RadioGroup/RadioGroup.js.map +1 -0
- package/dist/components/atoms/Radios/index.cjs +12 -0
- package/dist/components/atoms/Radios/index.cjs.map +1 -0
- package/dist/components/atoms/Radios/index.d.ts +16 -0
- package/dist/components/atoms/Radios/index.d.ts.map +1 -0
- package/dist/components/atoms/Radios/index.js +4 -0
- package/dist/components/atoms/Radios/index.js.map +1 -0
- package/dist/components/atoms/Radios/providers/RadioGroup.context.cjs +9 -0
- package/dist/components/atoms/Radios/providers/RadioGroup.context.cjs.map +1 -0
- package/dist/components/atoms/Radios/providers/RadioGroup.context.d.ts +8 -0
- package/dist/components/atoms/Radios/providers/RadioGroup.context.d.ts.map +1 -0
- package/dist/components/atoms/Radios/providers/RadioGroup.context.js +7 -0
- package/dist/components/atoms/Radios/providers/RadioGroup.context.js.map +1 -0
- package/dist/components/forms/FormSection/index.cjs +2 -2
- package/dist/components/forms/FormSection/index.cjs.map +1 -1
- package/dist/components/forms/FormSection/index.js +1 -1
- package/dist/components/forms/fields/FormCheckbox/index.cjs +2 -2
- package/dist/components/forms/fields/FormCheckbox/index.d.ts +1 -1
- package/dist/components/forms/fields/FormCheckbox/index.d.ts.map +1 -1
- package/dist/components/forms/fields/FormCheckbox/index.js +1 -1
- package/dist/components/forms/fields/FormCheckboxGroup/index.cjs +2 -2
- package/dist/components/forms/fields/FormCheckboxGroup/index.d.ts +1 -1
- package/dist/components/forms/fields/FormCheckboxGroup/index.d.ts.map +1 -1
- package/dist/components/forms/fields/FormCheckboxGroup/index.js +1 -1
- package/dist/components/forms/fields/FormRadioGroup/index.cjs +2 -2
- package/dist/components/forms/fields/FormRadioGroup/index.d.ts +1 -1
- package/dist/components/forms/fields/FormRadioGroup/index.d.ts.map +1 -1
- package/dist/components/forms/fields/FormRadioGroup/index.js +1 -1
- package/dist/components/molecules/Breadcrumbs/components/BreadcrumbAccountItem.cjs +2 -2
- package/dist/components/molecules/Breadcrumbs/components/BreadcrumbAccountItem.cjs.map +1 -1
- package/dist/components/molecules/Breadcrumbs/components/BreadcrumbAccountItem.js +1 -1
- package/dist/components/molecules/ContentDivider/index.cjs +5 -18
- package/dist/components/molecules/ContentDivider/index.cjs.map +1 -1
- package/dist/components/molecules/ContentDivider/index.d.ts +5 -18
- package/dist/components/molecules/ContentDivider/index.d.ts.map +1 -1
- package/dist/components/molecules/ContentDivider/index.js +5 -18
- package/dist/components/molecules/ContentDivider/index.js.map +1 -1
- package/dist/components/molecules/Dropdown/components/DropdownSelectionIndicator.cjs +4 -4
- package/dist/components/molecules/Dropdown/components/DropdownSelectionIndicator.cjs.map +1 -1
- package/dist/components/molecules/Dropdown/components/DropdownSelectionIndicator.js +2 -2
- package/dist/components/molecules/RadioGroup/components/RadioGroupAvatar.cjs +2 -2
- package/dist/components/molecules/RadioGroup/components/RadioGroupAvatar.cjs.map +1 -1
- package/dist/components/molecules/RadioGroup/components/RadioGroupAvatar.js +1 -1
- package/dist/components/molecules/RadioGroup/components/RadioGroupAvatarCard.cjs +3 -3
- package/dist/components/molecules/RadioGroup/components/RadioGroupAvatarCard.cjs.map +1 -1
- package/dist/components/molecules/RadioGroup/components/RadioGroupAvatarCard.js +2 -2
- package/dist/components/molecules/RadioGroup/components/RadioGroupCheckbox.cjs +2 -2
- package/dist/components/molecules/RadioGroup/components/RadioGroupCheckbox.cjs.map +1 -1
- package/dist/components/molecules/RadioGroup/components/RadioGroupCheckbox.js +1 -1
- package/dist/components/molecules/RadioGroup/components/RadioGroupIconCard.cjs +2 -2
- package/dist/components/molecules/RadioGroup/components/RadioGroupIconCard.cjs.map +1 -1
- package/dist/components/molecules/RadioGroup/components/RadioGroupIconCard.js +1 -1
- package/dist/components/molecules/RadioGroup/components/RadioGroupIconSimple.cjs +2 -2
- package/dist/components/molecules/RadioGroup/components/RadioGroupIconSimple.cjs.map +1 -1
- package/dist/components/molecules/RadioGroup/components/RadioGroupIconSimple.js +1 -1
- package/dist/components/molecules/RadioGroup/components/RadioGroupPaymentIcon.cjs +2 -2
- package/dist/components/molecules/RadioGroup/components/RadioGroupPaymentIcon.cjs.map +1 -1
- package/dist/components/molecules/RadioGroup/components/RadioGroupPaymentIcon.js +1 -1
- package/dist/components/molecules/Selects/components/SelectItem.cjs +2 -2
- package/dist/components/molecules/Selects/components/SelectItem.cjs.map +1 -1
- package/dist/components/molecules/Selects/components/SelectItem.js +1 -1
- package/dist/components/organisms/HeaderNavigation/components/NavAccountCard.cjs +2 -2
- package/dist/components/organisms/HeaderNavigation/components/NavAccountCard.cjs.map +1 -1
- package/dist/components/organisms/HeaderNavigation/components/NavAccountCard.js +1 -1
- package/dist/components/organisms/PageHeader/index.cjs +2 -2
- package/dist/components/organisms/PageHeader/index.cjs.map +1 -1
- package/dist/components/organisms/PageHeader/index.js +1 -1
- package/dist/components/organisms/Table/index.cjs +3 -3
- package/dist/components/organisms/Table/index.cjs.map +1 -1
- package/dist/components/organisms/Table/index.js +1 -1
- package/dist/components/organisms/TreeView/index.cjs +2 -2
- package/dist/components/organisms/TreeView/index.cjs.map +1 -1
- package/dist/components/organisms/TreeView/index.js +1 -1
- package/dist/native/components/atoms/Checkbox/index.d.ts +9 -65
- package/dist/native/components/atoms/Checkbox/index.d.ts.map +1 -1
- package/dist/native/components/atoms/Checkbox/index.js +9 -72
- package/dist/native/components/atoms/Checkbox/index.js.map +1 -1
- package/dist/native/components/atoms/Checkboxes/Checkbox/Checkbox.d.ts +36 -0
- package/dist/native/components/atoms/Checkboxes/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/native/components/atoms/Checkboxes/Checkbox/Checkbox.js +51 -0
- package/dist/native/components/atoms/Checkboxes/Checkbox/Checkbox.js.map +1 -0
- package/dist/native/components/atoms/Checkboxes/CheckboxGroup/CheckboxGroup.d.ts +37 -0
- package/dist/native/components/atoms/Checkboxes/CheckboxGroup/CheckboxGroup.d.ts.map +1 -0
- package/dist/native/components/atoms/Checkboxes/CheckboxGroup/CheckboxGroup.js +41 -0
- package/dist/native/components/atoms/Checkboxes/CheckboxGroup/CheckboxGroup.js.map +1 -0
- package/dist/native/components/atoms/Checkboxes/index.d.ts +6 -0
- package/dist/native/components/atoms/Checkboxes/index.d.ts.map +1 -0
- package/dist/native/components/atoms/Checkboxes/index.js +3 -0
- package/dist/native/components/atoms/Checkboxes/index.js.map +1 -0
- package/dist/native/components/atoms/Checkboxes/providers/CheckboxGroup.context.d.ts +15 -0
- package/dist/native/components/atoms/Checkboxes/providers/CheckboxGroup.context.d.ts.map +1 -0
- package/dist/native/components/atoms/Checkboxes/providers/CheckboxGroup.context.js +7 -0
- package/dist/native/components/atoms/Checkboxes/providers/CheckboxGroup.context.js.map +1 -0
- package/dist/native/components/atoms/Divider/index.d.ts +7 -33
- package/dist/native/components/atoms/Divider/index.d.ts.map +1 -1
- package/dist/native/components/atoms/Divider/index.js +6 -21
- package/dist/native/components/atoms/Divider/index.js.map +1 -1
- package/dist/native/components/atoms/Dividers/Divider/Divider.d.ts +33 -0
- package/dist/native/components/atoms/Dividers/Divider/Divider.d.ts.map +1 -0
- package/dist/native/components/atoms/Dividers/Divider/Divider.js +25 -0
- package/dist/native/components/atoms/Dividers/Divider/Divider.js.map +1 -0
- package/dist/native/components/atoms/{Divider → Dividers/Divider}/Divider.styles.d.ts +1 -1
- package/dist/native/components/atoms/Dividers/Divider/Divider.styles.d.ts.map +1 -0
- package/dist/native/components/atoms/{Divider → Dividers/Divider}/Divider.styles.js +1 -1
- package/dist/native/components/atoms/Dividers/Divider/Divider.styles.js.map +1 -0
- package/dist/native/components/atoms/Dividers/index.d.ts +5 -0
- package/dist/native/components/atoms/Dividers/index.d.ts.map +1 -0
- package/dist/native/components/atoms/Dividers/index.js +2 -0
- package/dist/native/components/atoms/Dividers/index.js.map +1 -0
- package/dist/native/components/atoms/RadioButton/index.d.ts +9 -49
- package/dist/native/components/atoms/RadioButton/index.d.ts.map +1 -1
- package/dist/native/components/atoms/RadioButton/index.js +9 -39
- package/dist/native/components/atoms/RadioButton/index.js.map +1 -1
- package/dist/native/components/atoms/Radios/RadioButton/RadioButton.d.ts +28 -0
- package/dist/native/components/atoms/Radios/RadioButton/RadioButton.d.ts.map +1 -0
- package/dist/native/components/atoms/Radios/RadioButton/RadioButton.js +29 -0
- package/dist/native/components/atoms/Radios/RadioButton/RadioButton.js.map +1 -0
- package/dist/native/components/atoms/Radios/RadioGroup/RadioGroup.d.ts +29 -0
- package/dist/native/components/atoms/Radios/RadioGroup/RadioGroup.d.ts.map +1 -0
- package/dist/native/components/atoms/Radios/RadioGroup/RadioGroup.js +29 -0
- package/dist/native/components/atoms/Radios/RadioGroup/RadioGroup.js.map +1 -0
- package/dist/native/components/atoms/Radios/index.d.ts +6 -0
- package/dist/native/components/atoms/Radios/index.d.ts.map +1 -0
- package/dist/native/components/atoms/Radios/index.js +3 -0
- package/dist/native/components/atoms/Radios/index.js.map +1 -0
- package/dist/native/components/atoms/Radios/providers/RadioGroup.context.d.ts +11 -0
- package/dist/native/components/atoms/Radios/providers/RadioGroup.context.d.ts.map +1 -0
- package/dist/native/components/atoms/Radios/providers/RadioGroup.context.js +7 -0
- package/dist/native/components/atoms/Radios/providers/RadioGroup.context.js.map +1 -0
- package/package.json +1 -1
- package/dist/components/atoms/Divider/Divider.styles.cjs.map +0 -1
- package/dist/components/atoms/Divider/Divider.styles.d.ts.map +0 -1
- package/dist/components/atoms/Divider/Divider.styles.js.map +0 -1
- package/dist/native/components/atoms/Divider/Divider.styles.d.ts.map +0 -1
- package/dist/native/components/atoms/Divider/Divider.styles.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var
|
|
4
|
+
var Checkboxes = require('@flipdish/ui-library/components/atoms/Checkboxes');
|
|
5
5
|
var useFocusTarget = require('../../__internal__/formField/hooks/useFocusTarget.cjs');
|
|
6
6
|
var useFormField = require('../../__internal__/formField/hooks/useFormField.cjs');
|
|
7
7
|
|
|
@@ -15,7 +15,7 @@ const FormCheckboxGroup = ({ name, revalidates, hint, children, ...groupProps })
|
|
|
15
15
|
const { value, ref, onCommit, onBlur, isInvalid, errorMessage, isDisabled, isLocked } = useFormField.useFormField(name, revalidates);
|
|
16
16
|
// `CheckboxGroup` takes no ref, so a layout-neutral wrapper hands the form the first box.
|
|
17
17
|
const focusRef = useFocusTarget.useFocusTarget(ref, 'input:not(:disabled)');
|
|
18
|
-
return (jsxRuntime.jsx("div", { ref: focusRef, className: "contents", children: jsxRuntime.jsx(
|
|
18
|
+
return (jsxRuntime.jsx("div", { ref: focusRef, className: "contents", children: jsxRuntime.jsx(Checkboxes.CheckboxGroup
|
|
19
19
|
// The form's schema validates; the browser's own `required` check would block the submit before it runs.
|
|
20
20
|
, {
|
|
21
21
|
// The form's schema validates; the browser's own `required` check would block the submit before it runs.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CheckboxGroupProps } from '@flipdish/ui-library/components/atoms/
|
|
1
|
+
import { type CheckboxGroupProps } from '@flipdish/ui-library/components/atoms/Checkboxes';
|
|
2
2
|
import type { FieldPath, FieldValues } from 'react-hook-form';
|
|
3
3
|
export interface FormCheckboxGroupProps<TValues extends FieldValues = FieldValues> extends Omit<CheckboxGroupProps, 'name' | 'value' | 'defaultValue' | 'onChange' | 'onBlur' | 'isInvalid'> {
|
|
4
4
|
/** The field's path in the form values, such as `orderTypes` or `delivery.days`; the field holds a list of the ticked values. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/forms/fields/FormCheckboxGroup/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/forms/fields/FormCheckboxGroup/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,kDAAkD,CAAC;AAC1G,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAI9D,MAAM,WAAW,sBAAsB,CAAC,OAAO,SAAS,WAAW,GAAG,WAAW,CAC/E,SAAQ,IAAI,CAAC,kBAAkB,EAAE,MAAM,GAAG,OAAO,GAAG,cAAc,GAAG,UAAU,GAAG,QAAQ,GAAG,WAAW,CAAC;IACzG,iIAAiI;IACjI,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;IACzB;;;OAGG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;CACzD;AAED;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAAI,OAAO,SAAS,WAAW,GAAG,WAAW,EAAE,sDAM1E,sBAAsB,CAAC,OAAO,CAAC,gCA4BjC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { CheckboxGroup } from '@flipdish/ui-library/components/atoms/
|
|
2
|
+
import { CheckboxGroup } from '@flipdish/ui-library/components/atoms/Checkboxes';
|
|
3
3
|
import { useFocusTarget } from '../../__internal__/formField/hooks/useFocusTarget.js';
|
|
4
4
|
import { useFormField } from '../../__internal__/formField/hooks/useFormField.js';
|
|
5
5
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var Input = require('@flipdish/ui-library/components/atoms/Input');
|
|
5
|
-
var
|
|
5
|
+
var Radios = require('@flipdish/ui-library/components/atoms/Radios');
|
|
6
6
|
var useFocusTarget = require('../../__internal__/formField/hooks/useFocusTarget.cjs');
|
|
7
7
|
var useFormField = require('../../__internal__/formField/hooks/useFormField.cjs');
|
|
8
8
|
|
|
@@ -16,7 +16,7 @@ const FormRadioGroup = ({ name, revalidates, children, ...radioGroupProps }) =>
|
|
|
16
16
|
const { value, ref, onCommit, onBlur, isInvalid, errorMessage, isDisabled, isLocked } = useFormField.useFormField(name, revalidates);
|
|
17
17
|
// `RadioGroup` takes no ref, so a layout-neutral wrapper hands the form the chosen radio, or the first when none is.
|
|
18
18
|
const focusRef = useFocusTarget.useFocusTarget(ref, 'input:checked:not(:disabled)', 'input:not(:disabled)');
|
|
19
|
-
return (jsxRuntime.jsx("div", { ref: focusRef, className: "contents", children: jsxRuntime.jsxs(
|
|
19
|
+
return (jsxRuntime.jsx("div", { ref: focusRef, className: "contents", children: jsxRuntime.jsxs(Radios.RadioGroup
|
|
20
20
|
// The form's schema validates; the browser's own `required` check would block the submit before it runs.
|
|
21
21
|
, {
|
|
22
22
|
// The form's schema validates; the browser's own `required` check would block the submit before it runs.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RadioGroup } from '@flipdish/ui-library/components/atoms/
|
|
1
|
+
import { RadioGroup } from '@flipdish/ui-library/components/atoms/Radios';
|
|
2
2
|
import type { ComponentProps } from 'react';
|
|
3
3
|
import type { FieldPath, FieldValues } from 'react-hook-form';
|
|
4
4
|
export interface FormRadioGroupProps<TValues extends FieldValues = FieldValues> extends Omit<ComponentProps<typeof RadioGroup>, 'name' | 'value' | 'defaultValue' | 'onChange' | 'onBlur' | 'isInvalid' | 'ref'> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/forms/fields/FormRadioGroup/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/forms/fields/FormRadioGroup/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAC1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAI9D,MAAM,WAAW,mBAAmB,CAAC,OAAO,SAAS,WAAW,GAAG,WAAW,CAC5E,SAAQ,IAAI,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,cAAc,GAAG,UAAU,GAAG,QAAQ,GAAG,WAAW,GAAG,KAAK,CAAC;IAChI,gFAAgF;IAChF,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;IACzB;;;OAGG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;CACzD;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,OAAO,SAAS,WAAW,GAAG,WAAW,EAAE,qDAKvE,mBAAmB,CAAC,OAAO,CAAC,gCA+B9B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { HintText } from '@flipdish/ui-library/components/atoms/Input';
|
|
3
|
-
import { RadioGroup } from '@flipdish/ui-library/components/atoms/
|
|
3
|
+
import { RadioGroup } from '@flipdish/ui-library/components/atoms/Radios';
|
|
4
4
|
import { useFocusTarget } from '../../__internal__/formField/hooks/useFocusTarget.js';
|
|
5
5
|
import { useFormField } from '../../__internal__/formField/hooks/useFormField.js';
|
|
6
6
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var uiIcons = require('@flipdish/ui-icons');
|
|
5
5
|
var Avatar = require('@flipdish/ui-library/components/atoms/Avatar');
|
|
6
|
-
var
|
|
6
|
+
var Radios = require('@flipdish/ui-library/components/atoms/Radios');
|
|
7
7
|
var Dropdown = require('@flipdish/ui-library/components/molecules/Dropdown');
|
|
8
8
|
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
9
9
|
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
@@ -16,7 +16,7 @@ const BreadcrumbAccountItem = ({ items, selectedKey, onSelectionChange }) => {
|
|
|
16
16
|
const divider = context.divider || 'chevron';
|
|
17
17
|
const selectedAccount = items.find((item) => item.id === selectedKey);
|
|
18
18
|
const accountTestId = context.testIdPrefix ? testIdUtils.joinTestId(context.testIdPrefix, 'account') : undefined;
|
|
19
|
-
return (jsxRuntime.jsx(reactAriaComponents.Breadcrumb, { className: "flex items-center gap-1.5 md:gap-2", children: ({ isCurrent }) => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(Dropdown.Dropdown.Root, { children: [jsxRuntime.jsxs(reactAriaComponents.Button, { "data-testid": accountTestId, "aria-label": "Switch account", className: ({ isPressed, isFocusVisible }) => cx.cx('flex cursor-pointer items-center gap-1.5 rounded-lg outline-0 outline-offset-2 outline-focus-ring', (isPressed || isFocusVisible) && 'outline-2'), children: [jsxRuntime.jsx("div", { className: "flex rounded-lg bg-primary p-0.5 ring-[0.5px] ring-secondary ring-inset", children: jsxRuntime.jsx(Avatar.Avatar, { size: "xs", src: selectedAccount?.avatar, className: "shadow-md", contentClassName: "rounded-md before:hidden" }) }), jsxRuntime.jsx("span", { className: "text-sm font-semibold text-primary", children: selectedAccount?.name }), jsxRuntime.jsx(uiIcons.ChevronSelectorVertical, { className: "size-3 shrink-0 stroke-3 text-fg-quaternary" })] }), jsxRuntime.jsx(Dropdown.Dropdown.Popover, { className: "w-62", placement: "bottom left", children: jsxRuntime.jsx(Dropdown.Dropdown.Menu, { disallowEmptySelection: true, selectionMode: "single", selectedKeys: [selectedKey], onSelectionChange: (keys) => onSelectionChange(Array.from(keys).join()), className: "flex flex-col gap-1 px-1.5 py-1.5", children: items.map((account) => (jsxRuntime.jsx(reactAriaComponents.MenuItem, { id: account.id, textValue: account.name, "data-testid": accountTestId ? testIdUtils.joinTestId(accountTestId, `menu-item-${account.id}`) : undefined, className: (state) => cx.cx('relative w-full cursor-pointer rounded-md px-2 py-2 text-left outline-0 outline-offset-2 outline-focus-ring transition duration-100 ease-linear hover:bg-primary_hover focus:z-10 focus-visible:outline-2', state.isSelected && 'bg-primary_hover'), children: ({ isSelected }) => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("figure", { className: "group flex min-w-0 flex-1 items-center gap-1.5", children: [jsxRuntime.jsx("div", { className: "flex rounded-[10px] bg-primary p-0.5 ring-[0.5px] ring-secondary ring-inset", children: jsxRuntime.jsx(Avatar.Avatar, { size: "sm", src: account.avatar, className: "shadow-md", contentClassName: "rounded-lg before:hidden" }) }), jsxRuntime.jsxs("figcaption", { className: "min-w-0 flex-1", children: [jsxRuntime.jsx("p", { className: "text-sm font-semibold text-primary", children: account.name }), jsxRuntime.jsx("p", { className: "truncate text-sm text-tertiary", children: account.email })] })] }), jsxRuntime.jsx(
|
|
19
|
+
return (jsxRuntime.jsx(reactAriaComponents.Breadcrumb, { className: "flex items-center gap-1.5 md:gap-2", children: ({ isCurrent }) => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(Dropdown.Dropdown.Root, { children: [jsxRuntime.jsxs(reactAriaComponents.Button, { "data-testid": accountTestId, "aria-label": "Switch account", className: ({ isPressed, isFocusVisible }) => cx.cx('flex cursor-pointer items-center gap-1.5 rounded-lg outline-0 outline-offset-2 outline-focus-ring', (isPressed || isFocusVisible) && 'outline-2'), children: [jsxRuntime.jsx("div", { className: "flex rounded-lg bg-primary p-0.5 ring-[0.5px] ring-secondary ring-inset", children: jsxRuntime.jsx(Avatar.Avatar, { size: "xs", src: selectedAccount?.avatar, className: "shadow-md", contentClassName: "rounded-md before:hidden" }) }), jsxRuntime.jsx("span", { className: "text-sm font-semibold text-primary", children: selectedAccount?.name }), jsxRuntime.jsx(uiIcons.ChevronSelectorVertical, { className: "size-3 shrink-0 stroke-3 text-fg-quaternary" })] }), jsxRuntime.jsx(Dropdown.Dropdown.Popover, { className: "w-62", placement: "bottom left", children: jsxRuntime.jsx(Dropdown.Dropdown.Menu, { disallowEmptySelection: true, selectionMode: "single", selectedKeys: [selectedKey], onSelectionChange: (keys) => onSelectionChange(Array.from(keys).join()), className: "flex flex-col gap-1 px-1.5 py-1.5", children: items.map((account) => (jsxRuntime.jsx(reactAriaComponents.MenuItem, { id: account.id, textValue: account.name, "data-testid": accountTestId ? testIdUtils.joinTestId(accountTestId, `menu-item-${account.id}`) : undefined, className: (state) => cx.cx('relative w-full cursor-pointer rounded-md px-2 py-2 text-left outline-0 outline-offset-2 outline-focus-ring transition duration-100 ease-linear hover:bg-primary_hover focus:z-10 focus-visible:outline-2', state.isSelected && 'bg-primary_hover'), children: ({ isSelected }) => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("figure", { className: "group flex min-w-0 flex-1 items-center gap-1.5", children: [jsxRuntime.jsx("div", { className: "flex rounded-[10px] bg-primary p-0.5 ring-[0.5px] ring-secondary ring-inset", children: jsxRuntime.jsx(Avatar.Avatar, { size: "sm", src: account.avatar, className: "shadow-md", contentClassName: "rounded-lg before:hidden" }) }), jsxRuntime.jsxs("figcaption", { className: "min-w-0 flex-1", children: [jsxRuntime.jsx("p", { className: "text-sm font-semibold text-primary", children: account.name }), jsxRuntime.jsx("p", { className: "truncate text-sm text-tertiary", children: account.email })] })] }), jsxRuntime.jsx(Radios.RadioButtonBase, { isSelected: isSelected, className: "absolute top-2 right-2" })] })) }, account.id))) }) })] }), !isCurrent &&
|
|
20
20
|
(divider === 'slash' ? (jsxRuntime.jsx(uiIcons.SlashDivider, { className: "size-4 shrink-0 stroke-[2.25px] text-utility-neutral-300" })) : (jsxRuntime.jsx(uiIcons.ChevronRight, { className: "size-4 shrink-0 stroke-[2.25px] text-utility-neutral-300" })))] })) }));
|
|
21
21
|
};
|
|
22
22
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BreadcrumbAccountItem.cjs","sources":["../../../../../src/components/molecules/Breadcrumbs/components/BreadcrumbAccountItem.tsx"],"sourcesContent":[null],"names":["useContext","BreadcrumbsContext","joinTestId","_jsx","AriaBreadcrumb","_jsxs","_Fragment","Dropdown","AriaButton","cx","Avatar","ChevronSelectorVertical","AriaMenuItem","RadioButtonBase","SlashDivider","ChevronRight"],"mappings":";;;;;;;;;;;;;AA4BO,MAAM,qBAAqB,GAAG,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAA8B,KAAI;AAC7G,IAAA,MAAM,OAAO,GAAGA,gBAAU,CAACC,sCAAkB,CAAC;AAC9C,IAAA,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,SAAS;AAC5C,IAAA,MAAM,eAAe,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,EAAE,KAAK,WAAW,CAAC;IAErE,MAAM,aAAa,GAAG,OAAO,CAAC,YAAY,GAAGC,sBAAU,CAAC,OAAO,CAAC,YAAY,EAAE,SAAS,CAAC,GAAG,SAAS;AAEpG,IAAA,QACEC,cAAA,CAACC,8BAAc,EAAA,EAAC,SAAS,EAAC,oCAAoC,EAAA,QAAA,EAC3D,CAAC,EAAE,SAAS,EAAE,MACbC,eAAA,CAAAC,mBAAA,EAAA,EAAA,QAAA,EAAA,CACED,eAAA,CAACE,iBAAQ,CAAC,IAAI,EAAA,EAAA,QAAA,EAAA,CACZF,eAAA,CAACG,0BAAU,mBACI,aAAa,EAAA,YAAA,EACf,gBAAgB,EAC3B,S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EAC3M,KAAK,CAAC,UAAU,IAAI,kBAAkB,CACvC,YAGF,CAAC,EAAE,UAAU,EAAE,MACdJ,eAAA,CAAAC,mBAAA,EAAA,EAAA,QAAA,EAAA,CACED,4BAAQ,SAAS,EAAC,gDAAgD,EAAA,QAAA,EAAA,CAChEF,wBAAK,SAAS,EAAC,6EAA6E,EAAA,QAAA,EAC1FA,cAAA,CAACO,aAAM,EAAA,EAAC,IAAI,EAAC,IAAI,EAAC,GAAG,EAAE,OAAO,CAAC,MAAM,EAAE,SAAS,EAAC,WAAW,EAAC,gBAAgB,EAAC,0BAA0B,EAAA,CAAG,EAAA,CACvG,EACNL,eAAA,CAAA,YAAA,EAAA,EAAY,SAAS,EAAC,gBAAgB,EAAA,QAAA,EAAA,CACpCF,cAAA,CAAA,GAAA,EAAA,EAAG,SAAS,EAAC,oCAAoC,EAAA,QAAA,EAAE,OAAO,CAAC,IAAI,EAAA,CAAK,EACpEA,cAAA,CAAA,GAAA,EAAA,EAAG,SAAS,EAAC,gCAAgC,EAAA,QAAA,EAAE,OAAO,CAAC,KAAK,EAAA,CAAK,CAAA,EAAA,CACtD,CAAA,EAAA,CACN,EACTA,cAAA,CAACU,
|
|
1
|
+
{"version":3,"file":"BreadcrumbAccountItem.cjs","sources":["../../../../../src/components/molecules/Breadcrumbs/components/BreadcrumbAccountItem.tsx"],"sourcesContent":[null],"names":["useContext","BreadcrumbsContext","joinTestId","_jsx","AriaBreadcrumb","_jsxs","_Fragment","Dropdown","AriaButton","cx","Avatar","ChevronSelectorVertical","AriaMenuItem","RadioButtonBase","SlashDivider","ChevronRight"],"mappings":";;;;;;;;;;;;;AA4BO,MAAM,qBAAqB,GAAG,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAA8B,KAAI;AAC7G,IAAA,MAAM,OAAO,GAAGA,gBAAU,CAACC,sCAAkB,CAAC;AAC9C,IAAA,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,SAAS;AAC5C,IAAA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A,CAACU,sBAAe,EAAA,EAAC,UAAU,EAAE,UAAU,EAAE,SAAS,EAAC,wBAAwB,EAAA,CAAG,CAAA,EAAA,CAC7E,CACJ,EAAA,EAvBI,OAAO,CAAC,EAAE,CAwBF,CAChB,CAAC,EAAA,CACY,EAAA,CACC,CAAA,EAAA,CACL,EAEf,CAAC,SAAS;AACT,qBAAC,OAAO,KAAK,OAAO,IAClBV,cAAA,CAACW,oBAAY,EAAA,EAAC,SAAS,EAAC,0DAA0D,GAAG,KAErFX,cAAA,CAACY,oBAAY,EAAA,EAAC,SAAS,EAAC,0DAA0D,EAAA,CAAG,CACtF,CAAC,CAAA,EAAA,CACH,CACJ,EAAA,CACc;AAErB;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { ChevronSelectorVertical, SlashDivider, ChevronRight } from '@flipdish/ui-icons';
|
|
3
3
|
import { Avatar } from '@flipdish/ui-library/components/atoms/Avatar';
|
|
4
|
-
import { RadioButtonBase } from '@flipdish/ui-library/components/atoms/
|
|
4
|
+
import { RadioButtonBase } from '@flipdish/ui-library/components/atoms/Radios';
|
|
5
5
|
import { Dropdown } from '@flipdish/ui-library/components/molecules/Dropdown';
|
|
6
6
|
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
7
7
|
import { joinTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
@@ -1,24 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
5
|
-
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
3
|
+
var Dividers = require('@flipdish/ui-library/components/atoms/Dividers');
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
* @summary separate content sections with a labelled horizontal divider
|
|
12
|
-
*/
|
|
13
|
-
const ContentDivider = ({ type, children, className, 'data-testid': dataTestId }) => {
|
|
14
|
-
const contentDividerTestId = testIdUtils.useResolvedTestId({ testId: dataTestId, segment: 'content-divider', rootName: 'content-divider' });
|
|
15
|
-
const styles = {
|
|
16
|
-
'single-line': 'flex items-center gap-x-2',
|
|
17
|
-
'dual-line': 'flex justify-center gap-x-2 border-y border-secondary py-3',
|
|
18
|
-
'background-fill': 'flex justify-center gap-x-2 rounded-lg bg-secondary py-2',
|
|
19
|
-
};
|
|
20
|
-
return (jsxRuntime.jsxs("div", { className: cx.cx('w-full shrink-0', styles[type], className), "data-testid": contentDividerTestId, children: [type === 'single-line' && jsxRuntime.jsx("div", { className: "h-px flex-1 bg-border-secondary" }), children, type === 'single-line' && jsxRuntime.jsx("div", { className: "h-px flex-1 bg-border-secondary" })] }));
|
|
21
|
-
};
|
|
5
|
+
// Deprecated path, kept so existing imports keep working until the next major: `ContentDivider` now lives in
|
|
6
|
+
// `atoms/Dividers` beside `Divider`. A re-export file is banned elsewhere; this one is a temporary deprecation path.
|
|
7
|
+
/** @deprecated Import from `@flipdish/ui-library/components/atoms/Dividers`. Removed in the next major. */
|
|
8
|
+
const ContentDivider = Dividers.ContentDivider;
|
|
22
9
|
|
|
23
10
|
exports.ContentDivider = ContentDivider;
|
|
24
11
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../src/components/molecules/ContentDivider/index.tsx"],"sourcesContent":[null],"names":["
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../src/components/molecules/ContentDivider/index.tsx"],"sourcesContent":[null],"names":["ContentDividerNext"],"mappings":";;;;AAAA;AACA;AAMA;AACO,MAAM,cAAc,GAAGA;;"}
|
|
@@ -1,19 +1,6 @@
|
|
|
1
|
-
import type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
children: ReactNode;
|
|
7
|
-
/** Extra classes merged onto the root element. */
|
|
8
|
-
className?: string;
|
|
9
|
-
/** Overrides the `data-testid` (defaults to `fd-content-divider`). */
|
|
10
|
-
'data-testid'?: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* A full-width horizontal divider with a centred label. Use to separate distinct sections,
|
|
14
|
-
* such as "Or" between a primary and an alternative action.
|
|
15
|
-
*
|
|
16
|
-
* @summary separate content sections with a labelled horizontal divider
|
|
17
|
-
*/
|
|
18
|
-
export declare const ContentDivider: ({ type, children, className, "data-testid": dataTestId }: ContentDividerProps) => import("react").JSX.Element;
|
|
1
|
+
import { type ContentDividerProps as ContentDividerPropsNext } from '@flipdish/ui-library/components/atoms/Dividers';
|
|
2
|
+
/** @deprecated Import from `@flipdish/ui-library/components/atoms/Dividers`. Removed in the next major. */
|
|
3
|
+
export declare const ContentDivider: ({ type, children, className, "data-testid": dataTestId }: ContentDividerPropsNext) => import("react").JSX.Element;
|
|
4
|
+
/** @deprecated Import from `@flipdish/ui-library/components/atoms/Dividers`. Removed in the next major. */
|
|
5
|
+
export type ContentDividerProps = ContentDividerPropsNext;
|
|
19
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/ContentDivider/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/ContentDivider/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,mBAAmB,IAAI,uBAAuB,EACpD,MAAM,gDAAgD,CAAC;AAExD,2GAA2G;AAC3G,eAAO,MAAM,cAAc,oHAAqB,CAAC;AACjD,2GAA2G;AAC3G,MAAM,MAAM,mBAAmB,GAAG,uBAAuB,CAAC"}
|
|
@@ -1,22 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
3
|
-
import { useResolvedTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
1
|
+
import { ContentDivider as ContentDivider$1 } from '@flipdish/ui-library/components/atoms/Dividers';
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
* @summary separate content sections with a labelled horizontal divider
|
|
10
|
-
*/
|
|
11
|
-
const ContentDivider = ({ type, children, className, 'data-testid': dataTestId }) => {
|
|
12
|
-
const contentDividerTestId = useResolvedTestId({ testId: dataTestId, segment: 'content-divider', rootName: 'content-divider' });
|
|
13
|
-
const styles = {
|
|
14
|
-
'single-line': 'flex items-center gap-x-2',
|
|
15
|
-
'dual-line': 'flex justify-center gap-x-2 border-y border-secondary py-3',
|
|
16
|
-
'background-fill': 'flex justify-center gap-x-2 rounded-lg bg-secondary py-2',
|
|
17
|
-
};
|
|
18
|
-
return (jsxs("div", { className: cx('w-full shrink-0', styles[type], className), "data-testid": contentDividerTestId, children: [type === 'single-line' && jsx("div", { className: "h-px flex-1 bg-border-secondary" }), children, type === 'single-line' && jsx("div", { className: "h-px flex-1 bg-border-secondary" })] }));
|
|
19
|
-
};
|
|
3
|
+
// Deprecated path, kept so existing imports keep working until the next major: `ContentDivider` now lives in
|
|
4
|
+
// `atoms/Dividers` beside `Divider`. A re-export file is banned elsewhere; this one is a temporary deprecation path.
|
|
5
|
+
/** @deprecated Import from `@flipdish/ui-library/components/atoms/Dividers`. Removed in the next major. */
|
|
6
|
+
const ContentDivider = ContentDivider$1;
|
|
20
7
|
|
|
21
8
|
export { ContentDivider };
|
|
22
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/molecules/ContentDivider/index.tsx"],"sourcesContent":[null],"names":["
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/molecules/ContentDivider/index.tsx"],"sourcesContent":[null],"names":["ContentDividerNext"],"mappings":";;AAAA;AACA;AAMA;AACO,MAAM,cAAc,GAAGA;;"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var uiIcons = require('@flipdish/ui-icons');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var Checkboxes = require('@flipdish/ui-library/components/atoms/Checkboxes');
|
|
6
|
+
var Radios = require('@flipdish/ui-library/components/atoms/Radios');
|
|
7
7
|
var Toggle = require('@flipdish/ui-library/components/atoms/Toggle');
|
|
8
8
|
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
9
9
|
|
|
@@ -12,12 +12,12 @@ const DropdownSelectionIndicator = ({ selectionIndicator, isSelected, hasSubmenu
|
|
|
12
12
|
return (jsxRuntime.jsx(uiIcons.Check, { "aria-hidden": "true", className: cx.cx('size-4 shrink-0 stroke-[2.25px] text-fg-brand-primary', !isSelected && 'invisible', className) }));
|
|
13
13
|
}
|
|
14
14
|
if (selectionIndicator === 'checkbox') {
|
|
15
|
-
return (jsxRuntime.jsx(
|
|
15
|
+
return (jsxRuntime.jsx(Checkboxes.CheckboxBase, { isSelected: isSelected && !hasSubmenu,
|
|
16
16
|
// A selected item that opens a submenu is only partly chosen, so the box is mixed rather than checked.
|
|
17
17
|
isIndeterminate: isSelected && hasSubmenu, size: "sm", className: cx.cx('shrink-0', className) }));
|
|
18
18
|
}
|
|
19
19
|
if (selectionIndicator === 'radio') {
|
|
20
|
-
return jsxRuntime.jsx(
|
|
20
|
+
return jsxRuntime.jsx(Radios.RadioButtonBase, { isSelected: isSelected, className: cx.cx('shrink-0', className) });
|
|
21
21
|
}
|
|
22
22
|
if (selectionIndicator === 'toggle') {
|
|
23
23
|
return jsxRuntime.jsx(Toggle.ToggleBase, { slim: true, size: "sm", isSelected: isSelected, className: cx.cx('shrink-0', className) });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownSelectionIndicator.cjs","sources":["../../../../../src/components/molecules/Dropdown/components/DropdownSelectionIndicator.tsx"],"sourcesContent":[null],"names":["_jsx","Check","cx","CheckboxBase","RadioButtonBase","ToggleBase"],"mappings":";;;;;;;;;AAeO,MAAM,0BAA0B,GAAG,CAAC,EAAE,kBAAkB,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAmC,KAAI;AACvI,IAAA,IAAI,kBAAkB,KAAK,WAAW,EAAE;QACtC,QACEA,eAACC,aAAK,EAAA,EAAA,aAAA,EAAa,MAAM,EAAC,SAAS,EAAEC,KAAE,CAAC,uDAAuD,EAAE,CAAC,UAAU,IAAI,WAAW,EAAE,SAAS,CAAC,EAAA,CAAI;IAE/I;AACA,IAAA,IAAI,kBAAkB,KAAK,UAAU,EAAE;QACrC,QACEF,eAACG,
|
|
1
|
+
{"version":3,"file":"DropdownSelectionIndicator.cjs","sources":["../../../../../src/components/molecules/Dropdown/components/DropdownSelectionIndicator.tsx"],"sourcesContent":[null],"names":["_jsx","Check","cx","CheckboxBase","RadioButtonBase","ToggleBase"],"mappings":";;;;;;;;;AAeO,MAAM,0BAA0B,GAAG,CAAC,EAAE,kBAAkB,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAmC,KAAI;AACvI,IAAA,IAAI,kBAAkB,KAAK,WAAW,EAAE;QACtC,QACEA,eAACC,aAAK,EAAA,EAAA,aAAA,EAAa,MAAM,EAAC,SAAS,EAAEC,KAAE,CAAC,uDAAuD,EAAE,CAAC,UAAU,IAAI,WAAW,EAAE,SAAS,CAAC,EAAA,CAAI;IAE/I;AACA,IAAA,IAAI,kBAAkB,KAAK,UAAU,EAAE;QACrC,QACEF,eAACG,uBAAY,EAAA,EACX,UAAU,EAAE,UAAU,IAAI,CAAC,UAAU;;AAErC,YAAA,eAAe,EAAE,UAAU,IAAI,UAAU,EACzC,IAAI,EAAC,IAAI,EACT,SAAS,EAAED,KAAE,CAAC,UAAU,EAAE,SAAS,CAAC,EAAA,CACpC;IAEN;AACA,IAAA,IAAI,kBAAkB,KAAK,OAAO,EAAE;AAClC,QAAA,OAAOF,eAACI,sBAAe,EAAA,EAAC,UAAU,EAAE,UAAU,EAAE,SAAS,EAAEF,KAAE,CAAC,UAAU,EAAE,SAAS,CAAC,GAAI;IAC1F;AACA,IAAA,IAAI,kBAAkB,KAAK,QAAQ,EAAE;QACnC,OAAOF,cAAA,CAACK,iBAAU,EAAA,EAAC,IAAI,QAAC,IAAI,EAAC,IAAI,EAAC,UAAU,EAAE,UAAU,EAAE,SAAS,EAAEH,KAAE,CAAC,UAAU,EAAE,SAAS,CAAC,EAAA,CAAI;IACpG;AACA,IAAA,OAAO,IAAI;AACb;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { Check } from '@flipdish/ui-icons';
|
|
3
|
-
import { CheckboxBase } from '@flipdish/ui-library/components/atoms/
|
|
4
|
-
import { RadioButtonBase } from '@flipdish/ui-library/components/atoms/
|
|
3
|
+
import { CheckboxBase } from '@flipdish/ui-library/components/atoms/Checkboxes';
|
|
4
|
+
import { RadioButtonBase } from '@flipdish/ui-library/components/atoms/Radios';
|
|
5
5
|
import { ToggleBase } from '@flipdish/ui-library/components/atoms/Toggle';
|
|
6
6
|
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
7
7
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var Avatar = require('@flipdish/ui-library/components/atoms/Avatar');
|
|
5
|
-
var
|
|
5
|
+
var Checkboxes = require('@flipdish/ui-library/components/atoms/Checkboxes');
|
|
6
6
|
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
7
7
|
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
8
8
|
var reactAriaComponents = require('react-aria-components');
|
|
@@ -20,7 +20,7 @@ const RadioGroupAvatar = ({ items, size = 'sm', className, 'data-testid': dataTe
|
|
|
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((person, index) => {
|
|
22
22
|
const ids = optionIds(index, { name: person.name, username: person.username, title: person.title });
|
|
23
|
-
return (jsxRuntime.jsx(reactAriaComponents.Radio, { isDisabled: person.disabled, value: person.id, "aria-labelledby": ariaIds_utils.joinIds(ids.name, ids.username), "aria-describedby": ids.title, "data-testid": testIdUtils.joinTestId(rootTestId, `option-${person.id}`), 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_subtle', isFocusVisible && 'outline-2 outline-offset-2'), children: ({ isDisabled, isSelected, isFocusVisible }) => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: cx.cx('flex flex-1', size === 'md' ? 'gap-3 md:gap-4' : 'gap-3'), children: [jsxRuntime.jsx(Avatar.Avatar, { alt: person.name, src: person.avatarUrl, size: size === 'md' ? 'md' : 'sm' }), 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.name, className: cx.cx('text-secondary', size === 'md' ? 'text-md font-medium' : 'text-sm font-medium'), children: person.name }), person.username && (jsxRuntime.jsx("span", { id: ids.username, className: cx.cx('text-tertiary', size === 'md' ? 'text-md' : 'text-sm'), children: person.username }))] }), person.title && (jsxRuntime.jsx("span", { id: ids.title, className: cx.cx('text-tertiary', size === 'md' ? 'text-md' : 'text-sm'), children: person.title }))] })] }), jsxRuntime.jsx(
|
|
23
|
+
return (jsxRuntime.jsx(reactAriaComponents.Radio, { isDisabled: person.disabled, value: person.id, "aria-labelledby": ariaIds_utils.joinIds(ids.name, ids.username), "aria-describedby": ids.title, "data-testid": testIdUtils.joinTestId(rootTestId, `option-${person.id}`), 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_subtle', isFocusVisible && 'outline-2 outline-offset-2'), children: ({ isDisabled, isSelected, isFocusVisible }) => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: cx.cx('flex flex-1', size === 'md' ? 'gap-3 md:gap-4' : 'gap-3'), children: [jsxRuntime.jsx(Avatar.Avatar, { alt: person.name, src: person.avatarUrl, size: size === 'md' ? 'md' : 'sm' }), 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.name, className: cx.cx('text-secondary', size === 'md' ? 'text-md font-medium' : 'text-sm font-medium'), children: person.name }), person.username && (jsxRuntime.jsx("span", { id: ids.username, className: cx.cx('text-tertiary', size === 'md' ? 'text-md' : 'text-sm'), children: person.username }))] }), person.title && (jsxRuntime.jsx("span", { id: ids.title, className: cx.cx('text-tertiary', size === 'md' ? 'text-md' : 'text-sm'), children: person.title }))] })] }), jsxRuntime.jsx(Checkboxes.CheckboxBase, { size: size === 'md' ? 'md' : 'sm', isDisabled: isDisabled, isSelected: isSelected, isFocusVisible: isFocusVisible })] })) }, person.id));
|
|
24
24
|
}) }));
|
|
25
25
|
};
|
|
26
26
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroupAvatar.cjs","sources":["../../../../../src/components/molecules/RadioGroup/components/RadioGroupAvatar.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","useOptionIds","_jsx","AriaRadioGroup","cx","AriaRadio","joinIds","joinTestId","_jsxs","_Fragment","AvatarComponent","CheckboxBase"],"mappings":";;;;;;;;;;;AA6BA;;;;;AAKG;MACU,gBAAgB,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,GAAG,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,EAAyB,KAAI;AAChI,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,MAAM,EAAE,KAAK,KAAI;YAC3B,MAAM,GAAG,GAAG,SAAS,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC;AAEnG,YAAA,QACEF,cAAA,CAACG,yBAAS,EAAA,EACR,UAAU,EAAE,MAAM,CAAC,QAAQ,EAE3B,KAAK,EAAE,MAAM,CAAC,EAAE,qBACCC,qBAAO,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,QAAQ,CAAC,EAAA,kBAAA,EAC9B,GAAG,CAAC,KAAK,iBACdC,sBAAU,CAAC,UAAU,EAAE,CAAA,OAAA,EAAU,MAAM,CAAC,EAAE,CAAA,CAAE,CAAC,EAC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,GAAG,SAAS,CAAC,YAC1F,MAAM,CAAC,QAAQ,EAAA,CACX,CACR,CAAA,EAAA,CACI,EACN,MAAM,CAAC,KAAK,KACXF,cAAA,CAAA,MAAA,EAAA,EAAM,EAAE,EAAE,GAAG,CAAC,KAAK,EAAE,SAAS,EAAEE,KAAE,CAAC,eAAe,EAAE,IAAI,KAAK,IAAI,GAAG,SAAS,GAAG,SAAS,CAAC,YACvF,MAAM,CAAC,KAAK,EAAA,CACR,CACR,CAAA,EAAA,CACG,CAAA,EAAA,CACF,EACNF,cAAA,CAACS,
|
|
1
|
+
{"version":3,"file":"RadioGroupAvatar.cjs","sources":["../../../../../src/components/molecules/RadioGroup/components/RadioGroupAvatar.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","useOptionIds","_jsx","AriaRadioGroup","cx","AriaRadio","joinIds","joinTestId","_jsxs","_Fragment","AvatarComponent","CheckboxBase"],"mappings":";;;;;;;;;;;AA6BA;;;;;AAKG;MACU,gBAAgB,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,GAAG,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,EAAyB,KAAI;AAChI,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,MAAM,EAAE,KAAK,KAAI;YAC3B,MAAM,GAAG,GAAG,SAAS,CAAC,KAAK,EAAE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,KAAE,CAAC,MAAM,EAAE,IAAI,KAAK,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC,aAC9DF,cAAA,CAAA,MAAA,EAAA,EAAM,EAAE,EAAE,GAAG,CAAC,IAAI,EAAE,SAAS,EAAEE,KAAE,CAAC,gBAAgB,EAAE,IAAI,KAAK,IAAI,GAAG,qBAAqB,GAAG,qBAAqB,CAAC,YAC/G,MAAM,CAAC,IAAI,EAAA,CACP,EACN,MAAM,CAAC,QAAQ,KACdF,cAAA,CAAA,MAAA,EAAA,EAAM,EAAE,EAAE,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAEE,KAAE,CAAC,eAAe,EAAE,IAAI,KAAK,IAAI,GAAG,SAAS,GAAG,SAAS,CAAC,YAC1F,MAAM,CAAC,QAAQ,EAAA,CACX,CACR,CAAA,EAAA,CACI,EACN,MAAM,CAAC,KAAK,KACXF,cAAA,CAAA,MAAA,EAAA,EAAM,EAAE,EAAE,GAAG,CAAC,KAAK,EAAE,SAAS,EAAEE,KAAE,CAAC,eAAe,EAAE,IAAI,KAAK,IAAI,GAAG,SAAS,GAAG,SAAS,CAAC,YACvF,MAAM,CAAC,KAAK,EAAA,CACR,CACR,CAAA,EAAA,CACG,CAAA,EAAA,CACF,EACNF,cAAA,CAACS,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,EAAA,EAxCI,MAAM,CAAC,EAAE,CAyCJ;QAEhB,CAAC,CAAC,EAAA,CACa;AAErB;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { Avatar } from '@flipdish/ui-library/components/atoms/Avatar';
|
|
3
|
-
import { CheckboxBase } from '@flipdish/ui-library/components/atoms/
|
|
3
|
+
import { CheckboxBase } from '@flipdish/ui-library/components/atoms/Checkboxes';
|
|
4
4
|
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
5
5
|
import { useResolvedTestId, joinTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
6
6
|
import { RadioGroup, Radio } from 'react-aria-components';
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var Avatar = require('@flipdish/ui-library/components/atoms/Avatar');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var Checkboxes = require('@flipdish/ui-library/components/atoms/Checkboxes');
|
|
6
|
+
var Radios = require('@flipdish/ui-library/components/atoms/Radios');
|
|
7
7
|
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
8
8
|
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
9
9
|
var React = require('react');
|
|
@@ -19,7 +19,7 @@ var useCommitOnPress = require('../hooks/useCommitOnPress.cjs');
|
|
|
19
19
|
*/
|
|
20
20
|
const RadioGroupAvatarCard = ({ items, size = 'sm', indicator = 'radio', commitOn = 'change', value, defaultValue, onChange, onOptionPress, className, 'data-testid': dataTestId, ...props }) => {
|
|
21
21
|
const rootTestId = testIdUtils.useResolvedTestId({ testId: dataTestId, segment: 'radio-group', rootName: 'radio-group' });
|
|
22
|
-
const Indicator = indicator === 'checkbox' ?
|
|
22
|
+
const Indicator = indicator === 'checkbox' ? Checkboxes.CheckboxBase : Radios.RadioButtonBase;
|
|
23
23
|
// Ids, not test ids: two groups with the same values on one page must not describe each other's options.
|
|
24
24
|
const groupId = React.useId();
|
|
25
25
|
const { selectionProps, optionHandlers } = useCommitOnPress.useCommitOnPress({ commitOn, value, defaultValue, onChange, onOptionPress });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroupAvatarCard.cjs","sources":["../../../../../src/components/molecules/RadioGroup/components/RadioGroupAvatarCard.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","CheckboxBase","RadioButtonBase","useId","useCommitOnPress","_jsx","AriaRadioGroup","cx","joinTestId","slugifyTestId","_jsxs","AriaRadio","_Fragment","Avatar"],"mappings":";;;;;;;;;;;;AAkCA;;;;;;AAMG;AACI,MAAM,oBAAoB,GAAG,CAAC,EACnC,KAAK,EACL,IAAI,GAAG,IAAI,EACX,SAAS,GAAG,OAAO,EACnB,QAAQ,GAAG,QAAQ,EACnB,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,SAAS,EACT,aAAa,EAAE,UAAU,EACzB,GAAG,KAAK,EACkB,KAAI;AAC9B,IAAA,MAAM,UAAU,GAAGA,6BAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;AAC7G,IAAA,MAAM,SAAS,GAAG,SAAS,KAAK,UAAU,GAAGC,
|
|
1
|
+
{"version":3,"file":"RadioGroupAvatarCard.cjs","sources":["../../../../../src/components/molecules/RadioGroup/components/RadioGroupAvatarCard.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","CheckboxBase","RadioButtonBase","useId","useCommitOnPress","_jsx","AriaRadioGroup","cx","joinTestId","slugifyTestId","_jsxs","AriaRadio","_Fragment","Avatar"],"mappings":";;;;;;;;;;;;AAkCA;;;;;;AAMG;AACI,MAAM,oBAAoB,GAAG,CAAC,EACnC,KAAK,EACL,IAAI,GAAG,IAAI,EACX,SAAS,GAAG,OAAO,EACnB,QAAQ,GAAG,QAAQ,EACnB,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,SAAS,EACT,aAAa,EAAE,UAAU,EACzB,GAAG,KAAK,EACkB,KAAI;AAC9B,IAAA,MAAM,UAAU,GAAGA,6BAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;AAC7G,IAAA,MAAM,SA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AA,CACT,CACR,CAAA,EAAA,CACG,EACNF,cAAA,CAAC,SAAS,EAAA,EAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,EAAA,CAAI,CAAA,EAAA,CACxG,CACJ,GACS,EAEX,IAAI,CAAC,MAAM,KACVA,cAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAEE,KAAE,CAAC,sDAAsD,EAAE,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAC,EAAA,QAAA,EAAG,IAAI,CAAC,MAAM,EAAA,CAAO,CACjI,CAAA,EAAA,EA7CI,IAAI,CAAC,KAAK,CA8CX;QAEV,CAAC,CAAC,EAAA,CAEW;AAErB;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { Avatar } from '@flipdish/ui-library/components/atoms/Avatar';
|
|
3
|
-
import { CheckboxBase } from '@flipdish/ui-library/components/atoms/
|
|
4
|
-
import { RadioButtonBase } from '@flipdish/ui-library/components/atoms/
|
|
3
|
+
import { CheckboxBase } from '@flipdish/ui-library/components/atoms/Checkboxes';
|
|
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, slugifyTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
7
7
|
import { useId } from 'react';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var
|
|
4
|
+
var Checkboxes = require('@flipdish/ui-library/components/atoms/Checkboxes');
|
|
5
5
|
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
6
6
|
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
7
7
|
var reactAriaComponents = require('react-aria-components');
|
|
@@ -19,7 +19,7 @@ const RadioGroupCheckbox = ({ items, size = 'sm', className, 'data-testid': data
|
|
|
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 (jsxRuntime.jsx(reactAriaComponents.Radio, { isDisabled: plan.disabled, value: plan.value, "aria-labelledby": ariaIds_utils.joinIds(ids.title, ids.secondaryTitle), "aria-describedby": ids.description, "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(
|
|
22
|
+
return (jsxRuntime.jsx(reactAriaComponents.Radio, { isDisabled: plan.disabled, value: plan.value, "aria-labelledby": ariaIds_utils.joinIds(ids.title, ids.secondaryTitle), "aria-describedby": ids.description, "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
23
|
}) }));
|
|
24
24
|
};
|
|
25
25
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroupCheckbox.cjs","sources":["../../../../../src/components/molecules/RadioGroup/components/RadioGroupCheckbox.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","useOptionIds","_jsx","AriaRadioGroup","cx","AriaRadio","joinIds","joinTestId","_jsxs","_Fragment","CheckboxBase"],"mappings":";;;;;;;;;;AAmBA;;;;;AAKG;MACU,kBAAkB,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,GAAG,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,EAA2B,KAAI;AACpI,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,yBAA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src/components/molecules/RadioGroup/components/RadioGroupCheckbox.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","useOptionIds","_jsx","AriaRadioGroup","cx","AriaRadio","joinIds","joinTestId","_jsxs","_Fragment","CheckboxBase"],"mappings":";;;;;;;;;;AAmBA;;;;;AAKG;MACU,kBAAkB,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,GAAG,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,EAA2B,KAAI;AACpI,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;AAEvH,YAAA,QACEF,cAAA,CAACG,yBAAS,EAAA,EACR,UAAU,EAAE,IAAI,CAAC,QAAQ,EAEzB,KAAK,EAAE,IAAI,CAAC,KAAK,EAAA,iBAAA,EACAC,qBAAO,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,cAAc,CAAC,EAAA,kBAAA,EACrC,GAAG,CAAC,WAAW,EAAA,aAAA,EACpBC,sBAAU,CAAC,UAAU,EAAE,CAAA,OAAA,E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AS,GAAG,SAAS,CAAC,EAAA,QAAA,EAChG,IAAI,CAAC,cAAc,EAAA,CACf,CACR,CAAA,EAAA,CACI,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,CACL,CACJ,IA5CI,IAAI,CAAC,KAAK,CA6CL;QAEhB,CAAC,CAAC,EAAA,CACa;AAErB;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import { CheckboxBase } from '@flipdish/ui-library/components/atoms/
|
|
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
5
|
import { RadioGroup, Radio } from 'react-aria-components';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var Badge = require('@flipdish/ui-library/components/atoms/Badge');
|
|
5
|
-
var
|
|
5
|
+
var Checkboxes = require('@flipdish/ui-library/components/atoms/Checkboxes');
|
|
6
6
|
var FeaturedIcon = require('@flipdish/ui-library/components/atoms/FeaturedIcon');
|
|
7
7
|
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
8
8
|
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
@@ -27,7 +27,7 @@ const RadioGroupIconCard = ({ items, size = 'sm', className, 'data-testid': data
|
|
|
27
27
|
description: plan.description,
|
|
28
28
|
badge: plan.badge,
|
|
29
29
|
});
|
|
30
|
-
return (jsxRuntime.jsx(reactAriaComponents.Radio, { isDisabled: plan.disabled, value: plan.value, "aria-labelledby": ids.title, "aria-describedby": ariaIds_utils.joinIds(ids.price, ids.secondaryTitle, ids.description, ids.badge), "data-testid": testIdUtils.joinTestId(rootTestId, `option-${plan.value}`), className: ({ isDisabled, isSelected, isFocusVisible }) => cx.cx('relative block cursor-pointer rounded-xl bg-primary outline-focus-ring ring-inset', isSelected ? 'ring-2 ring-brand' : 'ring-1 ring-secondary', isDisabled && 'cursor-not-allowed bg-disabled_subtle ring-disabled', isSelected && isDisabled && 'ring-disabled_subtle', isFocusVisible && 'outline-2 outline-offset-2'), children: ({ isDisabled, isSelected, isFocusVisible }) => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: cx.cx('flex items-center gap-3 rounded-t-xl p-3 pr-5 ring-inset', isSelected ? 'ring-2 ring-brand' : 'ring-1 ring-secondary', isDisabled && 'ring-disabled', isSelected && isDisabled && 'ring-disabled_subtle', isFocusVisible && 'outline-hidden'), children: [jsxRuntime.jsx(FeaturedIcon.FeaturedIcon, { size: size === 'md' ? 'md' : 'sm', icon: plan.icon, color: "gray", theme: "modern", className: cx.cx(isDisabled && 'bg-disabled text-fg-disabled') }), jsxRuntime.jsx("span", { id: ids.title, className: cx.cx('mr-1 text-secondary', size === 'md' ? 'text-lg font-semibold' : 'text-md font-semibold'), children: plan.title }), jsxRuntime.jsx(
|
|
30
|
+
return (jsxRuntime.jsx(reactAriaComponents.Radio, { isDisabled: plan.disabled, value: plan.value, "aria-labelledby": ids.title, "aria-describedby": ariaIds_utils.joinIds(ids.price, ids.secondaryTitle, ids.description, ids.badge), "data-testid": testIdUtils.joinTestId(rootTestId, `option-${plan.value}`), className: ({ isDisabled, isSelected, isFocusVisible }) => cx.cx('relative block cursor-pointer rounded-xl bg-primary outline-focus-ring ring-inset', isSelected ? 'ring-2 ring-brand' : 'ring-1 ring-secondary', isDisabled && 'cursor-not-allowed bg-disabled_subtle ring-disabled', isSelected && isDisabled && 'ring-disabled_subtle', isFocusVisible && 'outline-2 outline-offset-2'), children: ({ isDisabled, isSelected, isFocusVisible }) => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: cx.cx('flex items-center gap-3 rounded-t-xl p-3 pr-5 ring-inset', isSelected ? 'ring-2 ring-brand' : 'ring-1 ring-secondary', isDisabled && 'ring-disabled', isSelected && isDisabled && 'ring-disabled_subtle', isFocusVisible && 'outline-hidden'), children: [jsxRuntime.jsx(FeaturedIcon.FeaturedIcon, { size: size === 'md' ? 'md' : 'sm', icon: plan.icon, color: "gray", theme: "modern", className: cx.cx(isDisabled && 'bg-disabled text-fg-disabled') }), jsxRuntime.jsx("span", { id: ids.title, className: cx.cx('mr-1 text-secondary', size === 'md' ? 'text-lg font-semibold' : 'text-md font-semibold'), children: plan.title }), jsxRuntime.jsx(Checkboxes.CheckboxBase, { size: size === 'md' ? 'md' : 'sm', className: "ml-auto", isDisabled: isDisabled, isSelected: isSelected, isFocusVisible: isFocusVisible })] }), jsxRuntime.jsxs("div", { className: "flex flex-col-reverse items-start justify-between gap-4 rounded-b-lg p-4 sm:flex-row sm:gap-1", children: [jsxRuntime.jsxs("div", { className: cx.cx('flex flex-col', size === 'md' ? 'gap-2' : 'gap-1'), children: [jsxRuntime.jsxs("p", { className: "flex items-baseline gap-1", children: [jsxRuntime.jsx("span", { id: ids.price, className: cx.cx('text-secondary', size === 'md' ? 'text-display-md font-semibold' : 'text-display-sm font-semibold'), children: plan.price }), jsxRuntime.jsx("span", { id: ids.secondaryTitle, className: cx.cx('text-tertiary', size === 'md' ? 'text-md' : 'text-sm'), children: plan.secondaryTitle })] }), jsxRuntime.jsx("p", { id: ids.description, className: cx.cx('text-tertiary', size === 'md' ? 'text-md' : 'text-sm'), children: plan.description })] }), plan.badge && (jsxRuntime.jsx(Badge.BadgeWithDot, { size: "sm", type: "modern", color: "success", children: jsxRuntime.jsx("span", { id: ids.badge, children: plan.badge }) }))] })] })) }, plan.value));
|
|
31
31
|
}) }));
|
|
32
32
|
};
|
|
33
33
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroupIconCard.cjs","sources":["../../../../../src/components/molecules/RadioGroup/components/RadioGroupIconCard.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","useOptionIds","_jsx","AriaRadioGroup","cx","AriaRadio","joinIds","joinTestId","_jsxs","FeaturedIcon","CheckboxBase","BadgeWithDot"],"mappings":";;;;;;;;;;;;AAiCA;;;;;AAKG;MACU,kBAAkB,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,GAAG,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,EAA2B,KAAI;AACpI,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;AACzB,YAAA,MAAM,GAAG,GAAG,SAAS,CAAC,KAAK,EAAE;gBAC3B,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,cAAc,EAAE,IAAI,CAAC,cAAc;gBACnC,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,KAAK,EAAE,IAAI,CAAC,KAAK;AAClB,aAAA,CAAC;YAEF,QACEF,eAACG,yBAAS,EAAA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K,IAAI,GAAG,uBAAuB,GAAG,uBAAuB,CAAC,EAAA,QAAA,EACzH,IAAI,CAAC,KAAK,EAAA,CACN,EAEPF,cAAA,CAACQ,
|
|
1
|
+
{"version":3,"file":"RadioGroupIconCard.cjs","sources":["../../../../../src/components/molecules/RadioGroup/components/RadioGroupIconCard.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","useOptionIds","_jsx","AriaRadioGroup","cx","AriaRadio","joinIds","joinTestId","_jsxs","FeaturedIcon","CheckboxBase","BadgeWithDot"],"mappings":";;;;;;;;;;;;AAiCA;;;;;AAKG;MACU,kBAAkB,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,GAAG,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,EAA2B,KAAI;AACpI,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;AACzB,YAAA,MAAM,GAAG,GAAG,SAAS,CAAC,KAAK,EAAE;gBAC3B,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,cAAc,EAAE,IAAI,CAAC,cAAc;gBACnC,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,KAAK,EAAE,IAAI,CAAC,KAAK;AAClB,aAAA,CAAC;YAEF,QACEF,eAACG,yB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,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,SAAS,EAAA,QAAA,EACnDT,cAAA,CAAA,MAAA,EAAA,EAAM,EAAE,EAAE,GAAG,CAAC,KAAK,EAAA,QAAA,EAAG,IAAI,CAAC,KAAK,EAAA,CAAQ,GAC3B,CAChB,CAAA,EAAA,CACG,IACL,CACJ,EAAA,EAxEI,IAAI,CAAC,KAAK,CAyEL;QAEhB,CAAC,CAAC,EAAA,CACa;AAErB;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { BadgeWithDot } from '@flipdish/ui-library/components/atoms/Badge';
|
|
3
|
-
import { CheckboxBase } from '@flipdish/ui-library/components/atoms/
|
|
3
|
+
import { CheckboxBase } from '@flipdish/ui-library/components/atoms/Checkboxes';
|
|
4
4
|
import { FeaturedIcon } from '@flipdish/ui-library/components/atoms/FeaturedIcon';
|
|
5
5
|
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
6
6
|
import { useResolvedTestId, joinTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var
|
|
4
|
+
var Checkboxes = require('@flipdish/ui-library/components/atoms/Checkboxes');
|
|
5
5
|
var FeaturedIcon = require('@flipdish/ui-library/components/atoms/FeaturedIcon');
|
|
6
6
|
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
7
7
|
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
@@ -20,7 +20,7 @@ const RadioGroupIconSimple = ({ items, size = 'sm', className, 'data-testid': da
|
|
|
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 (jsxRuntime.jsx(reactAriaComponents.Radio, { isDisabled: plan.disabled, value: plan.value, "aria-labelledby": ariaIds_utils.joinIds(ids.title, ids.secondaryTitle), "aria-describedby": ids.description, "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(
|
|
23
|
+
return (jsxRuntime.jsx(reactAriaComponents.Radio, { isDisabled: plan.disabled, value: plan.value, "aria-labelledby": ariaIds_utils.joinIds(ids.title, ids.secondaryTitle), "aria-describedby": ids.description, "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
24
|
}) }));
|
|
25
25
|
};
|
|
26
26
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroupIconSimple.cjs","sources":["../../../../../src/components/molecules/RadioGroup/components/RadioGroupIconSimple.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","useOptionIds","_jsx","AriaRadioGroup","cx","AriaRadio","joinIds","joinTestId","_jsxs","_Fragment","FeaturedIcon","CheckboxBase"],"mappings":";;;;;;;;;;;AAqBA;;;;;AAKG;MACU,oBAAoB,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,GAAG,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,EAA6B,KAAI;AACxI,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;AAEvH,YAAA,QACEF,cAAA,CAACG,yBAAS,EAAA,EACR,UAAU,EAAE,IAAI,CAAC,QAAQ,EAEzB,KAAK,EAAE,IAAI,CAAC,KAAK,qBACAC,qBAAO,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,cAAc,CAAC,EAAA,kBAAA,EACrC,GAAG,CAAC,WAAW,iBACpBC,sBAAU,CAAC,UAAU,EAAE,UAAU,IAAI,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AK,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,eAACS,
|
|
1
|
+
{"version":3,"file":"RadioGroupIconSimple.cjs","sources":["../../../../../src/components/molecules/RadioGroup/components/RadioGroupIconSimple.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","useOptionIds","_jsx","AriaRadioGroup","cx","AriaRadio","joinIds","joinTestId","_jsxs","_Fragment","FeaturedIcon","CheckboxBase"],"mappings":";;;;;;;;;;;AAqBA;;;;;AAKG;MACU,oBAAoB,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,GAAG,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,EAA6B,KAAI;AACxI,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,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