@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
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { Label, HintText } from '@flipdish/ui-library/components/atoms/Input';
|
|
3
|
+
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
4
|
+
import { useResolvedTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
5
|
+
import { CheckboxGroup as CheckboxGroup$1 } from 'react-aria-components';
|
|
6
|
+
import { CheckboxGroupContext } from '../providers/CheckboxGroup.context.js';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* A named set of `Checkbox` options, built on react-aria-components' `CheckboxGroup`: it holds the ticked values as a
|
|
10
|
+
* list and shows one hint or error for the set. Use it whenever the user ticks any number of related options.
|
|
11
|
+
*
|
|
12
|
+
* @summary named set of checkboxes whose ticked values form a list
|
|
13
|
+
*/
|
|
14
|
+
const CheckboxGroup = ({ children, label, hint, size = 'sm', className, 'data-testid': dataTestId, ...props }) => {
|
|
15
|
+
const rootTestId = useResolvedTestId({ testId: dataTestId, segment: 'checkbox-group', rootName: 'checkbox-group' });
|
|
16
|
+
return (jsx(CheckboxGroupContext.Provider, { value: { size, testIdPrefix: rootTestId, validationBehavior: props.validationBehavior }, children: jsx(CheckboxGroup$1, { ...props, "data-testid": rootTestId, className: cx('flex flex-col gap-3', className), children: ({ isInvalid, isRequired }) => (jsxs(Fragment, { children: [label && (jsx(Label, { isRequired: isRequired, isInvalid: isInvalid, children: label })), children, hint && jsx(HintText, { isInvalid: isInvalid, children: hint })] })) }) }));
|
|
17
|
+
};
|
|
18
|
+
CheckboxGroup.displayName = 'CheckboxGroup';
|
|
19
|
+
|
|
20
|
+
export { CheckboxGroup };
|
|
21
|
+
//# sourceMappingURL=CheckboxGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckboxGroup.js","sources":["../../../../../src/components/atoms/Checkboxes/CheckboxGroup/CheckboxGroup.tsx"],"sourcesContent":[null],"names":["_jsx","AriaCheckboxGroup","_jsxs","_Fragment"],"mappings":";;;;;;;AAwBA;;;;;AAKG;AACI,MAAM,aAAa,GAAG,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,EAAsB,KAAI;AAC1I,IAAA,MAAM,UAAU,GAAG,iBAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC;AAEnH,IAAA,QACEA,GAAA,CAAC,oBAAoB,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,KAAK,CAAC,kBAAkB,EAAE,EAAA,QAAA,EACpHA,IAACC,eAAiB,EAAA,EAAA,GAAK,KAAK,EAAA,aAAA,EAAe,UAAU,EAAE,SAAS,EAAE,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,EAAA,QAAA,EACnG,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,MACzBC,IAAA,CAAAC,QAAA,EAAA,EAAA,QAAA,EAAA,CACG,KAAK,KACJH,GAAA,CAAC,KAAK,EAAA,EAAC,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAA,QAAA,EAChD,KAAK,EAAA,CACA,CACT,EACA,QAAQ,EAER,IAAI,IAAIA,GAAA,CAAC,QAAQ,EAAA,EAAC,SAAS,EAAE,SAAS,EAAA,QAAA,EAAG,IAAI,EAAA,CAAY,CAAA,EAAA,CACzD,CACJ,EAAA,CACiB,EAAA,CACU;AAEpC;AACA,aAAa,CAAC,WAAW,GAAG,eAAe;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var Checkbox = require('./Checkbox/Checkbox.cjs');
|
|
4
|
+
var CheckboxBase = require('./Checkbox/CheckboxBase.cjs');
|
|
5
|
+
var CheckboxGroup = require('./CheckboxGroup/CheckboxGroup.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
exports.Checkbox = Checkbox.Checkbox;
|
|
10
|
+
exports.CheckboxBase = CheckboxBase.CheckboxBase;
|
|
11
|
+
exports.CheckboxGroup = CheckboxGroup.CheckboxGroup;
|
|
12
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checkboxes for ticking any number of options: `Checkbox` for one option, `CheckboxGroup` for a named set of them,
|
|
3
|
+
* and `CheckboxBase` for the bare box when building a custom selectable control.
|
|
4
|
+
*
|
|
5
|
+
* Explicit named re-exports on purpose: `export *` would publish every symbol of every member and private file
|
|
6
|
+
* (import paths are the public API here), so this list is the single source of truth for what Checkboxes exposes.
|
|
7
|
+
* Each member's implementation, stories and docs live in its own folder (`Checkbox/Checkbox.tsx`), never as
|
|
8
|
+
* `index.tsx`: the `exports` wildcard would make that folder a public path.
|
|
9
|
+
*/
|
|
10
|
+
export type { CheckboxProps } from './Checkbox/Checkbox';
|
|
11
|
+
export { Checkbox } from './Checkbox/Checkbox';
|
|
12
|
+
export type { CheckboxBaseProps } from './Checkbox/CheckboxBase';
|
|
13
|
+
export { CheckboxBase } from './Checkbox/CheckboxBase';
|
|
14
|
+
export type { CheckboxGroupProps } from './CheckboxGroup/CheckboxGroup';
|
|
15
|
+
export { CheckboxGroup } from './CheckboxGroup/CheckboxGroup';
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Checkboxes/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,YAAY,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,YAAY,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
|
|
5
|
+
/** What a web `CheckboxGroup` shares with the `Checkbox`es beneath it. */
|
|
6
|
+
const CheckboxGroupContext = React.createContext(null);
|
|
7
|
+
|
|
8
|
+
exports.CheckboxGroupContext = CheckboxGroupContext;
|
|
9
|
+
//# sourceMappingURL=CheckboxGroup.context.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckboxGroup.context.cjs","sources":["../../../../../src/components/atoms/Checkboxes/providers/CheckboxGroup.context.ts"],"sourcesContent":[null],"names":["createContext"],"mappings":";;;;AASA;MACa,oBAAoB,GAAGA,mBAAa,CAAkC,IAAI;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CheckboxGroupProps as AriaCheckboxGroupProps } from 'react-aria-components';
|
|
2
|
+
interface CheckboxGroupContextType {
|
|
3
|
+
size: 'sm' | 'md';
|
|
4
|
+
testIdPrefix: string;
|
|
5
|
+
validationBehavior: AriaCheckboxGroupProps['validationBehavior'];
|
|
6
|
+
}
|
|
7
|
+
/** What a web `CheckboxGroup` shares with the `Checkbox`es beneath it. */
|
|
8
|
+
export declare const CheckboxGroupContext: import("react").Context<CheckboxGroupContextType | null>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=CheckboxGroup.context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckboxGroup.context.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/Checkboxes/providers/CheckboxGroup.context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,IAAI,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE1F,UAAU,wBAAwB;IAChC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,sBAAsB,CAAC,oBAAoB,CAAC,CAAC;CAClE;AAED,0EAA0E;AAC1E,eAAO,MAAM,oBAAoB,0DAAuD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckboxGroup.context.js","sources":["../../../../../src/components/atoms/Checkboxes/providers/CheckboxGroup.context.ts"],"sourcesContent":[null],"names":[],"mappings":";;AASA;MACa,oBAAoB,GAAG,aAAa,CAAkC,IAAI;;"}
|
|
@@ -1,21 +1,9 @@
|
|
|
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');
|
|
6
|
-
var Divider_styles = require('./Divider.styles.cjs');
|
|
3
|
+
var Dividers = require('@flipdish/ui-library/components/atoms/Dividers');
|
|
7
4
|
|
|
8
|
-
/**
|
|
9
|
-
|
|
10
|
-
* stretching across its container. `border-0` clears Preflight's default rule so the line
|
|
11
|
-
* comes from the background colour.
|
|
12
|
-
*
|
|
13
|
-
* @summary thin 1px rule that separates sections of content
|
|
14
|
-
*/
|
|
15
|
-
const Divider = ({ orientation = 'horizontal', className, 'data-testid': dataTestId, ...props }) => {
|
|
16
|
-
const dividerTestId = testIdUtils.useResolvedTestId({ testId: dataTestId, segment: 'divider', rootName: 'divider' });
|
|
17
|
-
return (jsxRuntime.jsx("hr", { "aria-orientation": orientation, className: cx.cx(Divider_styles.styles.base, Divider_styles.styles.orientations[orientation], className), ...props, "data-testid": dividerTestId }));
|
|
18
|
-
};
|
|
5
|
+
/** @deprecated Import from `@flipdish/ui-library/components/atoms/Dividers`. Removed in the next major. */
|
|
6
|
+
const Divider = Dividers.Divider;
|
|
19
7
|
|
|
20
8
|
exports.Divider = Divider;
|
|
21
9
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../src/components/atoms/Divider/index.tsx"],"sourcesContent":[null],"names":["
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../src/components/atoms/Divider/index.tsx"],"sourcesContent":[null],"names":["DividerNext"],"mappings":";;;;AAUA;AACO,MAAM,OAAO,GAAGA;;"}
|
|
@@ -1,21 +1,8 @@
|
|
|
1
|
-
import type
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*/
|
|
9
|
-
orientation?: DividerOrientation;
|
|
10
|
-
/** Overrides the `data-testid` (defaults to `fd-divider`). */
|
|
11
|
-
'data-testid'?: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* A thin rule that separates content: a native `<hr>` drawn with the `border-secondary` token,
|
|
15
|
-
* stretching across its container. `border-0` clears Preflight's default rule so the line
|
|
16
|
-
* comes from the background colour.
|
|
17
|
-
*
|
|
18
|
-
* @summary thin 1px rule that separates sections of content
|
|
19
|
-
*/
|
|
20
|
-
export declare const Divider: ({ orientation, className, "data-testid": dataTestId, ...props }: DividerProps) => import("react").JSX.Element;
|
|
1
|
+
import { type DividerOrientation as DividerOrientationNext, type DividerProps as DividerPropsNext } 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 Divider: ({ orientation, className, "data-testid": dataTestId, ...props }: DividerPropsNext) => import("react").JSX.Element;
|
|
4
|
+
/** @deprecated Import from `@flipdish/ui-library/components/atoms/Dividers`. Removed in the next major. */
|
|
5
|
+
export type DividerProps = DividerPropsNext;
|
|
6
|
+
/** @deprecated Import from `@flipdish/ui-library/components/atoms/Dividers`. Removed in the next major. */
|
|
7
|
+
export type DividerOrientation = DividerOrientationNext;
|
|
21
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Divider/index.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Divider/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,kBAAkB,IAAI,sBAAsB,EACjD,KAAK,YAAY,IAAI,gBAAgB,EACtC,MAAM,gDAAgD,CAAC;AAExD,2GAA2G;AAC3G,eAAO,MAAM,OAAO,oHAAc,CAAC;AACnC,2GAA2G;AAC3G,MAAM,MAAM,YAAY,GAAG,gBAAgB,CAAC;AAC5C,2GAA2G;AAC3G,MAAM,MAAM,kBAAkB,GAAG,sBAAsB,CAAC"}
|
|
@@ -1,19 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
3
|
-
import { useResolvedTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
4
|
-
import { styles } from './Divider.styles.js';
|
|
1
|
+
import { Divider as Divider$1 } from '@flipdish/ui-library/components/atoms/Dividers';
|
|
5
2
|
|
|
6
|
-
/**
|
|
7
|
-
|
|
8
|
-
* stretching across its container. `border-0` clears Preflight's default rule so the line
|
|
9
|
-
* comes from the background colour.
|
|
10
|
-
*
|
|
11
|
-
* @summary thin 1px rule that separates sections of content
|
|
12
|
-
*/
|
|
13
|
-
const Divider = ({ orientation = 'horizontal', className, 'data-testid': dataTestId, ...props }) => {
|
|
14
|
-
const dividerTestId = useResolvedTestId({ testId: dataTestId, segment: 'divider', rootName: 'divider' });
|
|
15
|
-
return (jsx("hr", { "aria-orientation": orientation, className: cx(styles.base, styles.orientations[orientation], className), ...props, "data-testid": dividerTestId }));
|
|
16
|
-
};
|
|
3
|
+
/** @deprecated Import from `@flipdish/ui-library/components/atoms/Dividers`. Removed in the next major. */
|
|
4
|
+
const Divider = Divider$1;
|
|
17
5
|
|
|
18
6
|
export { Divider };
|
|
19
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/atoms/Divider/index.tsx"],"sourcesContent":[null],"names":["
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/atoms/Divider/index.tsx"],"sourcesContent":[null],"names":["DividerNext"],"mappings":";;AAUA;AACO,MAAM,OAAO,GAAGA;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
5
|
+
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* A full-width horizontal divider with a centred label. Use to separate distinct sections,
|
|
9
|
+
* such as "Or" between a primary and an alternative action.
|
|
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
|
+
};
|
|
22
|
+
|
|
23
|
+
exports.ContentDivider = ContentDivider;
|
|
24
|
+
//# sourceMappingURL=ContentDivider.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentDivider.cjs","sources":["../../../../../src/components/atoms/Dividers/ContentDivider/ContentDivider.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","_jsxs","cx","_jsx"],"mappings":";;;;;;AAeA;;;;;AAKG;AACI,MAAM,cAAc,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAuB,KAAI;AAC9G,IAAA,MAAM,oBAAoB,GAAGA,6BAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC;AAE/H,IAAA,MAAM,MAAM,GAAG;AACb,QAAA,aAAa,EAAE,2BAA2B;AAC1C,QAAA,WAAW,EAAE,4DAA4D;AACzE,QAAA,iBAAiB,EAAE,0DAA0D;KAC9E;AAED,IAAA,QACEC,eAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAEC,KAAE,CAAC,iBAAiB,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,EAAA,aAAA,EAAe,oBAAoB,aAC9F,IAAI,KAAK,aAAa,IAAIC,wBAAK,SAAS,EAAC,iCAAiC,EAAA,CAAG,EAC7E,QAAQ,EACR,IAAI,KAAK,aAAa,IAAIA,wBAAK,SAAS,EAAC,iCAAiC,EAAA,CAAG,CAAA,EAAA,CAC1E;AAEV;;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface ContentDividerProps {
|
|
3
|
+
/** `single-line` draws a rule either side of the label, `dual-line` rules above and below, `background-fill` a filled band. */
|
|
4
|
+
type: 'single-line' | 'dual-line' | 'background-fill';
|
|
5
|
+
/** Label shown in the centre of the divider. */
|
|
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;
|
|
19
|
+
//# sourceMappingURL=ContentDivider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentDivider.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/Dividers/ContentDivider/ContentDivider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,mBAAmB;IAClC,+HAA+H;IAC/H,IAAI,EAAE,aAAa,GAAG,WAAW,GAAG,iBAAiB,CAAC;IACtD,gDAAgD;IAChD,QAAQ,EAAE,SAAS,CAAC;IACpB,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sEAAsE;IACtE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,0DAA0D,mBAAmB,gCAgB3G,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
3
|
+
import { useResolvedTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A full-width horizontal divider with a centred label. Use to separate distinct sections,
|
|
7
|
+
* such as "Or" between a primary and an alternative action.
|
|
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
|
+
};
|
|
20
|
+
|
|
21
|
+
export { ContentDivider };
|
|
22
|
+
//# sourceMappingURL=ContentDivider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentDivider.js","sources":["../../../../../src/components/atoms/Dividers/ContentDivider/ContentDivider.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;;AAeA;;;;;AAKG;AACI,MAAM,cAAc,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAuB,KAAI;AAC9G,IAAA,MAAM,oBAAoB,GAAG,iBAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC;AAE/H,IAAA,MAAM,MAAM,GAAG;AACb,QAAA,aAAa,EAAE,2BAA2B;AAC1C,QAAA,WAAW,EAAE,4DAA4D;AACzE,QAAA,iBAAiB,EAAE,0DAA0D;KAC9E;AAED,IAAA,QACEA,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,EAAE,CAAC,iBAAiB,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,EAAA,aAAA,EAAe,oBAAoB,aAC9F,IAAI,KAAK,aAAa,IAAIC,aAAK,SAAS,EAAC,iCAAiC,EAAA,CAAG,EAC7E,QAAQ,EACR,IAAI,KAAK,aAAa,IAAIA,aAAK,SAAS,EAAC,iCAAiC,EAAA,CAAG,CAAA,EAAA,CAC1E;AAEV;;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
5
|
+
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
6
|
+
var Divider_styles = require('./Divider.styles.cjs');
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* A thin rule that separates content: a native `<hr>` drawn with the `border-secondary` token,
|
|
10
|
+
* stretching across its container. `border-0` clears Preflight's default rule so the line
|
|
11
|
+
* comes from the background colour.
|
|
12
|
+
*
|
|
13
|
+
* @summary thin 1px rule that separates sections of content
|
|
14
|
+
*/
|
|
15
|
+
const Divider = ({ orientation = 'horizontal', className, 'data-testid': dataTestId, ...props }) => {
|
|
16
|
+
const dividerTestId = testIdUtils.useResolvedTestId({ testId: dataTestId, segment: 'divider', rootName: 'divider' });
|
|
17
|
+
return (jsxRuntime.jsx("hr", { "aria-orientation": orientation, className: cx.cx(Divider_styles.styles.base, Divider_styles.styles.orientations[orientation], className), ...props, "data-testid": dividerTestId }));
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
exports.Divider = Divider;
|
|
21
|
+
//# sourceMappingURL=Divider.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Divider.cjs","sources":["../../../../../src/components/atoms/Dividers/Divider/Divider.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","_jsx","cx","styles"],"mappings":";;;;;;;AAiBA;;;;;;AAMG;MACU,OAAO,GAAG,CAAC,EAAE,WAAW,GAAG,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,EAAgB,KAAI;AACtH,IAAA,MAAM,aAAa,GAAGA,6BAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAExG,QACEC,cAAA,CAAA,IAAA,EAAA,EAAA,kBAAA,EACoB,WAAW,EAC7B,SAAS,EAAEC,KAAE,CAACC,qBAAM,CAAC,IAAI,EAAEA,qBAAM,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC,EAAA,GACnE,KAAK,EAAA,aAAA,EACI,aAAa,EAAA,CAC1B;AAEN;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
import { type DividerOrientation } from './Divider.styles';
|
|
3
|
+
export interface DividerProps extends HTMLAttributes<HTMLHRElement> {
|
|
4
|
+
/**
|
|
5
|
+
* The axis the divider is drawn along.
|
|
6
|
+
* @default "horizontal"
|
|
7
|
+
*/
|
|
8
|
+
orientation?: DividerOrientation;
|
|
9
|
+
/** Overrides the `data-testid` (defaults to `fd-divider`). */
|
|
10
|
+
'data-testid'?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A thin rule that separates content: a native `<hr>` drawn with the `border-secondary` token,
|
|
14
|
+
* stretching across its container. `border-0` clears Preflight's default rule so the line
|
|
15
|
+
* comes from the background colour.
|
|
16
|
+
*
|
|
17
|
+
* @summary thin 1px rule that separates sections of content
|
|
18
|
+
*/
|
|
19
|
+
export declare const Divider: ({ orientation, className, "data-testid": dataTestId, ...props }: DividerProps) => import("react").JSX.Element;
|
|
20
|
+
//# sourceMappingURL=Divider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/Dividers/Divider/Divider.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,KAAK,kBAAkB,EAAU,MAAM,kBAAkB,CAAC;AAEnE,MAAM,WAAW,YAAa,SAAQ,cAAc,CAAC,aAAa,CAAC;IACjE;;;OAGG;IACH,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,8DAA8D;IAC9D,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,GAAI,iEAAgF,YAAY,gCAWnH,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
3
|
+
import { useResolvedTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
4
|
+
import { styles } from './Divider.styles.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A thin rule that separates content: a native `<hr>` drawn with the `border-secondary` token,
|
|
8
|
+
* stretching across its container. `border-0` clears Preflight's default rule so the line
|
|
9
|
+
* comes from the background colour.
|
|
10
|
+
*
|
|
11
|
+
* @summary thin 1px rule that separates sections of content
|
|
12
|
+
*/
|
|
13
|
+
const Divider = ({ orientation = 'horizontal', className, 'data-testid': dataTestId, ...props }) => {
|
|
14
|
+
const dividerTestId = useResolvedTestId({ testId: dataTestId, segment: 'divider', rootName: 'divider' });
|
|
15
|
+
return (jsx("hr", { "aria-orientation": orientation, className: cx(styles.base, styles.orientations[orientation], className), ...props, "data-testid": dividerTestId }));
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { Divider };
|
|
19
|
+
//# sourceMappingURL=Divider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Divider.js","sources":["../../../../../src/components/atoms/Dividers/Divider/Divider.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;AAiBA;;;;;;AAMG;MACU,OAAO,GAAG,CAAC,EAAE,WAAW,GAAG,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,EAAgB,KAAI;AACtH,IAAA,MAAM,aAAa,GAAG,iBAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAExG,QACEA,GAAA,CAAA,IAAA,EAAA,EAAA,kBAAA,EACoB,WAAW,EAC7B,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC,EAAA,GACnE,KAAK,EAAA,aAAA,EACI,aAAa,EAAA,CAC1B;AAEN;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Shared `Divider` style config, read by both `
|
|
4
|
+
* Shared `Divider` style config, read by both `Divider.tsx` and `Divider.native.tsx`.
|
|
5
5
|
*
|
|
6
6
|
* `base` fills the rule with the `border-secondary` token via `bg-*` rather than an
|
|
7
7
|
* actual border — both a web `<hr>` and a native `View` render that identically, so
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Divider.styles.cjs","sources":["../../../../../src/components/atoms/Dividers/Divider/Divider.styles.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;;;;;;;;;AAWG;AACI,MAAM,MAAM,GAAG;AACpB,IAAA,IAAI,EAAE,uCAAuC;AAC7C,IAAA,YAAY,EAAE;AACZ,QAAA,UAAU,EAAE,aAAa;AACzB,QAAA,QAAQ,EAAE,aAAa;AACxB,KAAA;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Shared `Divider` style config, read by both `
|
|
2
|
+
* Shared `Divider` style config, read by both `Divider.tsx` and `Divider.native.tsx`.
|
|
3
3
|
*
|
|
4
4
|
* `base` fills the rule with the `border-secondary` token via `bg-*` rather than an
|
|
5
5
|
* actual border — both a web `<hr>` and a native `View` render that identically, so
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Divider.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/Dividers/Divider/Divider.styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,MAAM;;;;;;CAMlB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,MAAM,CAAC,YAAY,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Shared `Divider` style config, read by both `
|
|
2
|
+
* Shared `Divider` style config, read by both `Divider.tsx` and `Divider.native.tsx`.
|
|
3
3
|
*
|
|
4
4
|
* `base` fills the rule with the `border-secondary` token via `bg-*` rather than an
|
|
5
5
|
* actual border — both a web `<hr>` and a native `View` render that identically, so
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Divider.styles.js","sources":["../../../../../src/components/atoms/Dividers/Divider/Divider.styles.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;;;;;;;;;;AAWG;AACI,MAAM,MAAM,GAAG;AACpB,IAAA,IAAI,EAAE,uCAAuC;AAC7C,IAAA,YAAY,EAAE;AACZ,QAAA,UAAU,EAAE,aAAa;AACzB,QAAA,QAAQ,EAAE,aAAa;AACxB,KAAA;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var ContentDivider = require('./ContentDivider/ContentDivider.cjs');
|
|
4
|
+
var Divider = require('./Divider/Divider.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
exports.ContentDivider = ContentDivider.ContentDivider;
|
|
9
|
+
exports.Divider = Divider.Divider;
|
|
10
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rules that separate content: `Divider` for a plain line, and `ContentDivider` for a line with a label in the middle.
|
|
3
|
+
*
|
|
4
|
+
* Explicit named re-exports on purpose: `export *` would publish every symbol of every member and private file
|
|
5
|
+
* (import paths are the public API here), so this list is the single source of truth for what Dividers exposes.
|
|
6
|
+
* Each member's implementation, stories and docs live in its own folder (`Divider/Divider.tsx`), never as
|
|
7
|
+
* `index.tsx`: the `exports` wildcard would make that folder a public path.
|
|
8
|
+
*/
|
|
9
|
+
export type { ContentDividerProps } from './ContentDivider/ContentDivider';
|
|
10
|
+
export { ContentDivider } from './ContentDivider/ContentDivider';
|
|
11
|
+
export type { DividerProps } from './Divider/Divider';
|
|
12
|
+
export { Divider } from './Divider/Divider';
|
|
13
|
+
export type { DividerOrientation } from './Divider/Divider.styles';
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Dividers/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,YAAY,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,YAAY,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,40 +1,13 @@
|
|
|
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');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var reactAriaComponents = require('react-aria-components');
|
|
8
|
-
var selectionControl_styles = require('../../__internal__/selectionControl/selectionControl.styles.cjs');
|
|
3
|
+
var Radios = require('@flipdish/ui-library/components/atoms/Radios');
|
|
9
4
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Single-select option rendered inside a `RadioGroup`. Enforces mutual exclusivity
|
|
18
|
-
* across all sibling radios and manages ARIA roles automatically via react-aria.
|
|
19
|
-
*
|
|
20
|
-
* @summary single-select option used within a mutually exclusive group
|
|
21
|
-
*/
|
|
22
|
-
const RadioButton = ({ label, hint, className, size = 'sm', 'data-testid': dataTestId, ...ariaRadioProps }) => {
|
|
23
|
-
const context = React.useContext(RadioGroupContext);
|
|
24
|
-
size = context?.size ?? size;
|
|
25
|
-
const fallbackTestId = testIdUtils.useResolvedTestId({ testId: dataTestId, segment: 'radio-button', rootName: 'radio-button' });
|
|
26
|
-
const radioTestId = !dataTestId && context?.testIdPrefix ? testIdUtils.joinTestId(context.testIdPrefix, `option-${testIdUtils.slugifyTestId(String(ariaRadioProps.value))}`) : fallbackTestId;
|
|
27
|
-
return (jsxRuntime.jsx(reactAriaComponents.Radio, { ...ariaRadioProps, "data-testid": radioTestId, className: (state) => cx.cx('relative flex items-start', state.isDisabled && 'cursor-not-allowed', selectionControl_styles.selectionControlSizes[size].root, typeof className === 'function' ? className(state) : className), children: ({ isSelected, isDisabled, isFocusVisible }) => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(RadioButtonBase, { size: size, isSelected: isSelected, isDisabled: isDisabled, isFocusVisible: isFocusVisible, className: label || hint ? 'mt-0.5' : '' }), (label || hint) && (jsxRuntime.jsxs("div", { className: cx.cx('inline-flex flex-col', selectionControl_styles.selectionControlSizes[size].textWrapper), children: [label && jsxRuntime.jsx("p", { className: cx.cx('text-secondary select-none', selectionControl_styles.selectionControlSizes[size].label), children: label }), hint && (
|
|
28
|
-
// biome-ignore lint/a11y/noStaticElementInteractions: This is a hint that is not interactive
|
|
29
|
-
// biome-ignore lint/a11y/useKeyWithClickEvents: This is a hint that is not interactive
|
|
30
|
-
jsxRuntime.jsx("span", { className: cx.cx('text-tertiary', selectionControl_styles.selectionControlSizes[size].hint), onClick: (event) => event.stopPropagation(), children: hint }))] }))] })) }));
|
|
31
|
-
};
|
|
32
|
-
RadioButton.displayName = 'RadioButton';
|
|
33
|
-
/** Wrapper around react-aria-components' `RadioGroup` that stacks its `RadioButton` children and passes them `size` and a derived `data-testid`. */
|
|
34
|
-
const RadioGroup = ({ children, className, size = 'sm', 'data-testid': dataTestId, ...props }) => {
|
|
35
|
-
const rootTestId = testIdUtils.useResolvedTestId({ testId: dataTestId, segment: 'radio-group', rootName: 'radio-group' });
|
|
36
|
-
return (jsxRuntime.jsx(RadioGroupContext.Provider, { value: { size, testIdPrefix: rootTestId }, children: jsxRuntime.jsx(reactAriaComponents.RadioGroup, { ...props, "data-testid": rootTestId, className: cx.cx('flex flex-col gap-4', className), children: children }) }));
|
|
37
|
-
};
|
|
5
|
+
/** @deprecated Import from `@flipdish/ui-library/components/atoms/Radios`. Removed in the next major. */
|
|
6
|
+
const RadioButton = Radios.RadioButton;
|
|
7
|
+
/** @deprecated Import from `@flipdish/ui-library/components/atoms/Radios`. Removed in the next major. */
|
|
8
|
+
const RadioButtonBase = Radios.RadioButtonBase;
|
|
9
|
+
/** @deprecated Import from `@flipdish/ui-library/components/atoms/Radios`. Removed in the next major. */
|
|
10
|
+
const RadioGroup = Radios.RadioGroup;
|
|
38
11
|
|
|
39
12
|
exports.RadioButton = RadioButton;
|
|
40
13
|
exports.RadioButtonBase = RadioButtonBase;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../src/components/atoms/RadioButton/index.tsx"],"sourcesContent":[null],"names":["
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../src/components/atoms/RadioButton/index.tsx"],"sourcesContent":[null],"names":["RadioButtonNext","RadioButtonBaseNext","RadioGroupNext"],"mappings":";;;;AAcA;AACO,MAAM,WAAW,GAAGA;AAC3B;AACO,MAAM,eAAe,GAAGC;AAC/B;AACO,MAAM,UAAU,GAAGC;;;;"}
|