@neo4j-ndl/react 4.24.2 → 4.25.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/lib/cjs/_common/form-control/FormFieldLabel.js +1 -1
- package/lib/cjs/_common/form-control/FormFieldLabel.js.map +1 -1
- package/lib/cjs/_common/form-control/FormFieldMessage.js +1 -1
- package/lib/cjs/_common/form-control/FormFieldMessage.js.map +1 -1
- package/lib/cjs/_common/form-control/form-control-types.js +1 -1
- package/lib/cjs/_common/form-control/form-control-types.js.map +1 -1
- package/lib/cjs/_common/form-control/form-field-group-context.js +32 -0
- package/lib/cjs/_common/form-control/form-field-group-context.js.map +1 -0
- package/lib/cjs/_common/form-control/index.js +5 -2
- package/lib/cjs/_common/form-control/index.js.map +1 -1
- package/lib/cjs/_common/form-control/use-form-field.js +1 -1
- package/lib/cjs/_common/form-control/use-form-field.js.map +1 -1
- package/lib/cjs/_common/form-control/use-inline-field-label.js +1 -1
- package/lib/cjs/_common/form-control/use-inline-field-label.js.map +1 -1
- package/lib/cjs/_generated/style-rules/color-utils.js +1 -1
- package/lib/cjs/_generated/style-rules/numeric-utils.js +1 -1
- package/lib/cjs/accordion/accordion-types.js +1 -1
- package/lib/cjs/announcement-banner/AnnouncementBanner.js +1 -1
- package/lib/cjs/announcement-banner/AnnouncementBanner.js.map +1 -1
- package/lib/cjs/announcement-banner/index.js +1 -1
- package/lib/cjs/announcement-banner/index.js.map +1 -1
- package/lib/cjs/announcement-banner/stories/announcement-banner-closeable.story.js +1 -1
- package/lib/cjs/announcement-banner/stories/announcement-banner-closeable.story.js.map +1 -1
- package/lib/cjs/announcement-banner/stories/announcement-banner-custom-icons.story.js +1 -1
- package/lib/cjs/announcement-banner/stories/announcement-banner-custom-icons.story.js.map +1 -1
- package/lib/cjs/announcement-banner/stories/announcement-banner-default.story.js +1 -1
- package/lib/cjs/announcement-banner/stories/announcement-banner-default.story.js.map +1 -1
- package/lib/cjs/announcement-banner/stories/announcement-banner-injected-non-urgent.story.js +1 -1
- package/lib/cjs/announcement-banner/stories/announcement-banner-injected-non-urgent.story.js.map +1 -1
- package/lib/cjs/announcement-banner/stories/announcement-banner-injected-urgent.story.js +1 -1
- package/lib/cjs/announcement-banner/stories/announcement-banner-injected-urgent.story.js.map +1 -1
- package/lib/cjs/announcement-banner/stories/announcement-banner-present-at-page-render.story.js +1 -1
- package/lib/cjs/announcement-banner/stories/announcement-banner-present-at-page-render.story.js.map +1 -1
- package/lib/cjs/announcement-banner/stories/announcement-banner-variants.story.js +1 -1
- package/lib/cjs/announcement-banner/stories/announcement-banner-variants.story.js.map +1 -1
- package/lib/cjs/announcement-banner/stories/announcement-banner-with-actions.story.js +1 -1
- package/lib/cjs/announcement-banner/stories/announcement-banner-with-actions.story.js.map +1 -1
- package/lib/cjs/announcement-banner/stories/announcement-banner-with-page-content.story.js +1 -1
- package/lib/cjs/announcement-banner/stories/announcement-banner-with-page-content.story.js.map +1 -1
- package/lib/cjs/announcement-banner/stories/index.js +1 -1
- package/lib/cjs/announcement-banner/stories/index.js.map +1 -1
- package/lib/cjs/box/Box.js +1 -1
- package/lib/cjs/checkbox/Checkbox.js +6 -3
- package/lib/cjs/checkbox/Checkbox.js.map +1 -1
- package/lib/cjs/checkbox-group/CheckboxGroup.js +52 -0
- package/lib/cjs/checkbox-group/CheckboxGroup.js.map +1 -0
- package/lib/cjs/checkbox-group/index.js +26 -0
- package/lib/cjs/checkbox-group/index.js.map +1 -0
- package/lib/cjs/checkbox-group/stories/checkbox-group-default.story.js +30 -0
- package/lib/cjs/checkbox-group/stories/checkbox-group-default.story.js.map +1 -0
- package/lib/cjs/checkbox-group/stories/checkbox-group-disabled.story.js +30 -0
- package/lib/cjs/checkbox-group/stories/checkbox-group-disabled.story.js.map +1 -0
- package/lib/cjs/checkbox-group/stories/checkbox-group-error.story.js +30 -0
- package/lib/cjs/checkbox-group/stories/checkbox-group-error.story.js.map +1 -0
- package/lib/cjs/checkbox-group/stories/checkbox-group-optional.story.js +30 -0
- package/lib/cjs/checkbox-group/stories/checkbox-group-optional.story.js.map +1 -0
- package/lib/cjs/checkbox-group/stories/checkbox-group-required.story.js +30 -0
- package/lib/cjs/checkbox-group/stories/checkbox-group-required.story.js.map +1 -0
- package/lib/cjs/checkbox-group/stories/checkbox-group-visually-hidden-label.story.js +30 -0
- package/lib/cjs/checkbox-group/stories/checkbox-group-visually-hidden-label.story.js.map +1 -0
- package/lib/cjs/checkbox-group/stories/index.js +52 -0
- package/lib/cjs/checkbox-group/stories/index.js.map +1 -0
- package/lib/cjs/clean-icon-button/CleanIconButton.js +1 -1
- package/lib/cjs/data-grid/DataGrid.js +1 -1
- package/lib/cjs/data-grid/data-grid-context.js +1 -1
- package/lib/cjs/data-grid/data-grid-nav/index.js +1 -1
- package/lib/cjs/data-grid/helpers/index.js +1 -1
- package/lib/cjs/data-grid/stories/staticData.js +1 -1
- package/lib/cjs/dismissible-tag/DismissibleTag.js +1 -1
- package/lib/cjs/fieldset/Fieldset.js +78 -0
- package/lib/cjs/fieldset/Fieldset.js.map +1 -0
- package/lib/cjs/fieldset/index.js +26 -0
- package/lib/cjs/fieldset/index.js.map +1 -0
- package/lib/cjs/fieldset/stories/fieldset-default.story.js +30 -0
- package/lib/cjs/fieldset/stories/fieldset-default.story.js.map +1 -0
- package/lib/cjs/fieldset/stories/fieldset-disabled.story.js +30 -0
- package/lib/cjs/fieldset/stories/fieldset-disabled.story.js.map +1 -0
- package/lib/cjs/fieldset/stories/fieldset-error.story.js +30 -0
- package/lib/cjs/fieldset/stories/fieldset-error.story.js.map +1 -0
- package/lib/cjs/fieldset/stories/fieldset-optional.story.js +30 -0
- package/lib/cjs/fieldset/stories/fieldset-optional.story.js.map +1 -0
- package/lib/cjs/fieldset/stories/fieldset-required.story.js +30 -0
- package/lib/cjs/fieldset/stories/fieldset-required.story.js.map +1 -0
- package/lib/cjs/fieldset/stories/fieldset-visually-hidden-label.story.js +30 -0
- package/lib/cjs/fieldset/stories/fieldset-visually-hidden-label.story.js.map +1 -0
- package/lib/cjs/fieldset/stories/index.js +52 -0
- package/lib/cjs/fieldset/stories/index.js.map +1 -0
- package/lib/cjs/filled-button/FilledButton.js +1 -1
- package/lib/cjs/icon-button/IconButton.js +1 -1
- package/lib/cjs/icons/generated/custom/FloppyDiskArrowTopRight.js +1 -1
- package/lib/cjs/icons/generated/custom/FloppyDiskArrowTopRight.js.map +1 -1
- package/lib/cjs/index.js +8 -2
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/kbd/kbd-utils.js +1 -1
- package/lib/cjs/logo/Logo.js +1 -1
- package/lib/cjs/outlined-button/OutlinedButton.js +1 -1
- package/lib/cjs/radio/Radio.js +16 -3
- package/lib/cjs/radio/Radio.js.map +1 -1
- package/lib/cjs/radio-group/RadioGroup.js +62 -0
- package/lib/cjs/radio-group/RadioGroup.js.map +1 -0
- package/lib/cjs/radio-group/index.js +26 -0
- package/lib/cjs/radio-group/index.js.map +1 -0
- package/lib/cjs/radio-group/stories/index.js +60 -0
- package/lib/cjs/radio-group/stories/index.js.map +1 -0
- package/lib/cjs/radio-group/stories/radio-group-controlled.story.js +32 -0
- package/lib/cjs/radio-group/stories/radio-group-controlled.story.js.map +1 -0
- package/lib/cjs/radio-group/stories/radio-group-default.story.js +30 -0
- package/lib/cjs/radio-group/stories/radio-group-default.story.js.map +1 -0
- package/lib/cjs/radio-group/stories/radio-group-disabled.story.js +30 -0
- package/lib/cjs/radio-group/stories/radio-group-disabled.story.js.map +1 -0
- package/lib/cjs/radio-group/stories/radio-group-error.story.js +30 -0
- package/lib/cjs/radio-group/stories/radio-group-error.story.js.map +1 -0
- package/lib/cjs/radio-group/stories/radio-group-horizontal.story.js +30 -0
- package/lib/cjs/radio-group/stories/radio-group-horizontal.story.js.map +1 -0
- package/lib/cjs/radio-group/stories/radio-group-optional.story.js +30 -0
- package/lib/cjs/radio-group/stories/radio-group-optional.story.js.map +1 -0
- package/lib/cjs/radio-group/stories/radio-group-required.story.js +30 -0
- package/lib/cjs/radio-group/stories/radio-group-required.story.js.map +1 -0
- package/lib/cjs/radio-group/stories/radio-group-visually-hidden-label.story.js +30 -0
- package/lib/cjs/radio-group/stories/radio-group-visually-hidden-label.story.js.map +1 -0
- package/lib/cjs/read-only-tag/ReadOnlyTag.js +1 -1
- package/lib/cjs/select/types.js +1 -1
- package/lib/cjs/spotlight/SpotlightTour.js +1 -1
- package/lib/cjs/text-button/TextButton.js +1 -1
- package/lib/cjs/tree-view/TreeViewItem.js +1 -1
- package/lib/cjs/tree-view/TreeViewTextItem.js +1 -1
- package/lib/cjs/tree-view/TreeViewTrail.js +1 -1
- package/lib/cjs/tree-view/tree-view-types.js +1 -1
- package/lib/cjs/tree-view/tree-view-utils.js +1 -1
- package/lib/cjs/typography/Typography.js +1 -1
- package/lib/esm/_common/form-control/FormFieldLabel.js +1 -1
- package/lib/esm/_common/form-control/FormFieldLabel.js.map +1 -1
- package/lib/esm/_common/form-control/FormFieldMessage.js +1 -1
- package/lib/esm/_common/form-control/FormFieldMessage.js.map +1 -1
- package/lib/esm/_common/form-control/form-control-types.js +1 -1
- package/lib/esm/_common/form-control/form-control-types.js.map +1 -1
- package/lib/esm/_common/form-control/form-field-group-context.js +28 -0
- package/lib/esm/_common/form-control/form-field-group-context.js.map +1 -0
- package/lib/esm/_common/form-control/index.js +2 -1
- package/lib/esm/_common/form-control/index.js.map +1 -1
- package/lib/esm/_common/form-control/use-form-field.js +1 -1
- package/lib/esm/_common/form-control/use-form-field.js.map +1 -1
- package/lib/esm/_common/form-control/use-inline-field-label.js +1 -1
- package/lib/esm/_common/form-control/use-inline-field-label.js.map +1 -1
- package/lib/esm/_generated/style-rules/color-utils.js +1 -1
- package/lib/esm/_generated/style-rules/numeric-utils.js +1 -1
- package/lib/esm/accordion/accordion-types.js +1 -1
- package/lib/esm/announcement-banner/AnnouncementBanner.js +1 -1
- package/lib/esm/announcement-banner/AnnouncementBanner.js.map +1 -1
- package/lib/esm/announcement-banner/index.js +1 -1
- package/lib/esm/announcement-banner/index.js.map +1 -1
- package/lib/esm/announcement-banner/stories/announcement-banner-closeable.story.js +1 -1
- package/lib/esm/announcement-banner/stories/announcement-banner-closeable.story.js.map +1 -1
- package/lib/esm/announcement-banner/stories/announcement-banner-custom-icons.story.js +1 -1
- package/lib/esm/announcement-banner/stories/announcement-banner-custom-icons.story.js.map +1 -1
- package/lib/esm/announcement-banner/stories/announcement-banner-default.story.js +1 -1
- package/lib/esm/announcement-banner/stories/announcement-banner-default.story.js.map +1 -1
- package/lib/esm/announcement-banner/stories/announcement-banner-injected-non-urgent.story.js +1 -1
- package/lib/esm/announcement-banner/stories/announcement-banner-injected-non-urgent.story.js.map +1 -1
- package/lib/esm/announcement-banner/stories/announcement-banner-injected-urgent.story.js +1 -1
- package/lib/esm/announcement-banner/stories/announcement-banner-injected-urgent.story.js.map +1 -1
- package/lib/esm/announcement-banner/stories/announcement-banner-present-at-page-render.story.js +1 -1
- package/lib/esm/announcement-banner/stories/announcement-banner-present-at-page-render.story.js.map +1 -1
- package/lib/esm/announcement-banner/stories/announcement-banner-variants.story.js +1 -1
- package/lib/esm/announcement-banner/stories/announcement-banner-variants.story.js.map +1 -1
- package/lib/esm/announcement-banner/stories/announcement-banner-with-actions.story.js +1 -1
- package/lib/esm/announcement-banner/stories/announcement-banner-with-actions.story.js.map +1 -1
- package/lib/esm/announcement-banner/stories/announcement-banner-with-page-content.story.js +1 -1
- package/lib/esm/announcement-banner/stories/announcement-banner-with-page-content.story.js.map +1 -1
- package/lib/esm/announcement-banner/stories/index.js +1 -1
- package/lib/esm/announcement-banner/stories/index.js.map +1 -1
- package/lib/esm/box/Box.js +1 -1
- package/lib/esm/checkbox/Checkbox.js +7 -4
- package/lib/esm/checkbox/Checkbox.js.map +1 -1
- package/lib/esm/checkbox-group/CheckboxGroup.js +49 -0
- package/lib/esm/checkbox-group/CheckboxGroup.js.map +1 -0
- package/lib/esm/checkbox-group/index.js +22 -0
- package/lib/esm/checkbox-group/index.js.map +1 -0
- package/lib/esm/checkbox-group/stories/checkbox-group-default.story.js +28 -0
- package/lib/esm/checkbox-group/stories/checkbox-group-default.story.js.map +1 -0
- package/lib/esm/checkbox-group/stories/checkbox-group-disabled.story.js +28 -0
- package/lib/esm/checkbox-group/stories/checkbox-group-disabled.story.js.map +1 -0
- package/lib/esm/checkbox-group/stories/checkbox-group-error.story.js +28 -0
- package/lib/esm/checkbox-group/stories/checkbox-group-error.story.js.map +1 -0
- package/lib/esm/checkbox-group/stories/checkbox-group-optional.story.js +28 -0
- package/lib/esm/checkbox-group/stories/checkbox-group-optional.story.js.map +1 -0
- package/lib/esm/checkbox-group/stories/checkbox-group-required.story.js +28 -0
- package/lib/esm/checkbox-group/stories/checkbox-group-required.story.js.map +1 -0
- package/lib/esm/checkbox-group/stories/checkbox-group-visually-hidden-label.story.js +28 -0
- package/lib/esm/checkbox-group/stories/checkbox-group-visually-hidden-label.story.js.map +1 -0
- package/lib/esm/checkbox-group/stories/index.js +40 -0
- package/lib/esm/checkbox-group/stories/index.js.map +1 -0
- package/lib/esm/clean-icon-button/CleanIconButton.js +1 -1
- package/lib/esm/data-grid/DataGrid.js +1 -1
- package/lib/esm/data-grid/data-grid-context.js +1 -1
- package/lib/esm/data-grid/data-grid-nav/index.js +1 -1
- package/lib/esm/data-grid/helpers/index.js +1 -1
- package/lib/esm/data-grid/stories/staticData.js +1 -1
- package/lib/esm/dismissible-tag/DismissibleTag.js +1 -1
- package/lib/esm/fieldset/Fieldset.js +71 -0
- package/lib/esm/fieldset/Fieldset.js.map +1 -0
- package/lib/esm/fieldset/index.js +22 -0
- package/lib/esm/fieldset/index.js.map +1 -0
- package/lib/esm/fieldset/stories/fieldset-default.story.js +28 -0
- package/lib/esm/fieldset/stories/fieldset-default.story.js.map +1 -0
- package/lib/esm/fieldset/stories/fieldset-disabled.story.js +28 -0
- package/lib/esm/fieldset/stories/fieldset-disabled.story.js.map +1 -0
- package/lib/esm/fieldset/stories/fieldset-error.story.js +28 -0
- package/lib/esm/fieldset/stories/fieldset-error.story.js.map +1 -0
- package/lib/esm/fieldset/stories/fieldset-optional.story.js +28 -0
- package/lib/esm/fieldset/stories/fieldset-optional.story.js.map +1 -0
- package/lib/esm/fieldset/stories/fieldset-required.story.js +28 -0
- package/lib/esm/fieldset/stories/fieldset-required.story.js.map +1 -0
- package/lib/esm/fieldset/stories/fieldset-visually-hidden-label.story.js +28 -0
- package/lib/esm/fieldset/stories/fieldset-visually-hidden-label.story.js.map +1 -0
- package/lib/esm/fieldset/stories/index.js +40 -0
- package/lib/esm/fieldset/stories/index.js.map +1 -0
- package/lib/esm/filled-button/FilledButton.js +1 -1
- package/lib/esm/icon-button/IconButton.js +1 -1
- package/lib/esm/icons/generated/custom/FloppyDiskArrowTopRight.js +1 -1
- package/lib/esm/icons/generated/custom/FloppyDiskArrowTopRight.js.map +1 -1
- package/lib/esm/index.js +3 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/kbd/kbd-utils.js +1 -1
- package/lib/esm/logo/Logo.js +1 -1
- package/lib/esm/outlined-button/OutlinedButton.js +1 -1
- package/lib/esm/radio/Radio.js +17 -4
- package/lib/esm/radio/Radio.js.map +1 -1
- package/lib/esm/radio-group/RadioGroup.js +59 -0
- package/lib/esm/radio-group/RadioGroup.js.map +1 -0
- package/lib/esm/radio-group/index.js +22 -0
- package/lib/esm/radio-group/index.js.map +1 -0
- package/lib/esm/radio-group/stories/index.js +46 -0
- package/lib/esm/radio-group/stories/index.js.map +1 -0
- package/lib/esm/radio-group/stories/radio-group-controlled.story.js +30 -0
- package/lib/esm/radio-group/stories/radio-group-controlled.story.js.map +1 -0
- package/lib/esm/radio-group/stories/radio-group-default.story.js +28 -0
- package/lib/esm/radio-group/stories/radio-group-default.story.js.map +1 -0
- package/lib/esm/radio-group/stories/radio-group-disabled.story.js +28 -0
- package/lib/esm/radio-group/stories/radio-group-disabled.story.js.map +1 -0
- package/lib/esm/radio-group/stories/radio-group-error.story.js +28 -0
- package/lib/esm/radio-group/stories/radio-group-error.story.js.map +1 -0
- package/lib/esm/radio-group/stories/radio-group-horizontal.story.js +28 -0
- package/lib/esm/radio-group/stories/radio-group-horizontal.story.js.map +1 -0
- package/lib/esm/radio-group/stories/radio-group-optional.story.js +28 -0
- package/lib/esm/radio-group/stories/radio-group-optional.story.js.map +1 -0
- package/lib/esm/radio-group/stories/radio-group-required.story.js +28 -0
- package/lib/esm/radio-group/stories/radio-group-required.story.js.map +1 -0
- package/lib/esm/radio-group/stories/radio-group-visually-hidden-label.story.js +28 -0
- package/lib/esm/radio-group/stories/radio-group-visually-hidden-label.story.js.map +1 -0
- package/lib/esm/read-only-tag/ReadOnlyTag.js +1 -1
- package/lib/esm/select/types.js +1 -1
- package/lib/esm/spotlight/SpotlightTour.js +1 -1
- package/lib/esm/text-button/TextButton.js +1 -1
- package/lib/esm/tree-view/TreeViewItem.js +1 -1
- package/lib/esm/tree-view/TreeViewTextItem.js +1 -1
- package/lib/esm/tree-view/TreeViewTrail.js +1 -1
- package/lib/esm/tree-view/tree-view-types.js +1 -1
- package/lib/esm/tree-view/tree-view-utils.js +1 -1
- package/lib/esm/typography/Typography.js +1 -1
- package/lib/types/_common/ButtonSpinner.d.ts +1 -1
- package/lib/types/_common/TruncatedTextWithTooltip.d.ts +1 -1
- package/lib/types/_common/form-control/FormFieldLabel.d.ts +1 -1
- package/lib/types/_common/form-control/FormFieldMessage.d.ts +1 -1
- package/lib/types/_common/form-control/form-control-types.d.ts +1 -1
- package/lib/types/_common/form-control/form-field-group-context.d.ts +36 -0
- package/lib/types/_common/form-control/form-field-group-context.d.ts.map +1 -0
- package/lib/types/_common/form-control/index.d.ts +2 -1
- package/lib/types/_common/form-control/index.d.ts.map +1 -1
- package/lib/types/_common/form-control/use-form-field.d.ts +1 -1
- package/lib/types/_common/form-control/use-inline-field-label.d.ts +1 -1
- package/lib/types/_common/utils.d.ts +1 -1
- package/lib/types/_generated/style-rules/date-utils.d.ts +1 -1
- package/lib/types/_generated/style-rules/range-utils.d.ts +1 -1
- package/lib/types/accordion/Accordion.d.ts +1 -1
- package/lib/types/accordion/accordion-context.d.ts +1 -1
- package/lib/types/ai/response/stories/response-all-components.story.d.ts +1 -1
- package/lib/types/ai/response/stories/response-code-examples.story.d.ts +1 -1
- package/lib/types/ai/response/stories/response-full-example.story.d.ts +1 -1
- package/lib/types/ai/response/stories/response-headings.story.d.ts +1 -1
- package/lib/types/ai/response/stories/response-lists.story.d.ts +1 -1
- package/lib/types/announcement-banner/AnnouncementBanner.d.ts +1 -1
- package/lib/types/announcement-banner/index.d.ts +1 -1
- package/lib/types/announcement-banner/stories/announcement-banner-closeable.story.d.ts +1 -1
- package/lib/types/announcement-banner/stories/announcement-banner-custom-icons.story.d.ts +1 -1
- package/lib/types/announcement-banner/stories/announcement-banner-default.story.d.ts +1 -1
- package/lib/types/announcement-banner/stories/announcement-banner-injected-non-urgent.story.d.ts +1 -1
- package/lib/types/announcement-banner/stories/announcement-banner-injected-urgent.story.d.ts +1 -1
- package/lib/types/announcement-banner/stories/announcement-banner-present-at-page-render.story.d.ts +1 -1
- package/lib/types/announcement-banner/stories/announcement-banner-variants.story.d.ts +1 -1
- package/lib/types/announcement-banner/stories/announcement-banner-with-actions.story.d.ts +1 -1
- package/lib/types/announcement-banner/stories/announcement-banner-with-page-content.story.d.ts +1 -1
- package/lib/types/announcement-banner/stories/index.d.ts +1 -1
- package/lib/types/avatar/Avatar.d.ts +1 -1
- package/lib/types/banner/Banner.d.ts +1 -1
- package/lib/types/button/ButtonBase.d.ts +1 -1
- package/lib/types/checkbox/Checkbox.d.ts.map +1 -1
- package/lib/types/checkbox-group/CheckboxGroup.d.ts +40 -0
- package/lib/types/checkbox-group/CheckboxGroup.d.ts.map +1 -0
- package/lib/types/checkbox-group/index.d.ts +22 -0
- package/lib/types/checkbox-group/index.d.ts.map +1 -0
- package/lib/types/checkbox-group/stories/checkbox-group-default.story.d.ts +24 -0
- package/lib/types/checkbox-group/stories/checkbox-group-default.story.d.ts.map +1 -0
- package/lib/types/checkbox-group/stories/checkbox-group-disabled.story.d.ts +24 -0
- package/lib/types/checkbox-group/stories/checkbox-group-disabled.story.d.ts.map +1 -0
- package/lib/types/checkbox-group/stories/checkbox-group-error.story.d.ts +24 -0
- package/lib/types/checkbox-group/stories/checkbox-group-error.story.d.ts.map +1 -0
- package/lib/types/checkbox-group/stories/checkbox-group-optional.story.d.ts +24 -0
- package/lib/types/checkbox-group/stories/checkbox-group-optional.story.d.ts.map +1 -0
- package/lib/types/checkbox-group/stories/checkbox-group-required.story.d.ts +24 -0
- package/lib/types/checkbox-group/stories/checkbox-group-required.story.d.ts.map +1 -0
- package/lib/types/checkbox-group/stories/checkbox-group-visually-hidden-label.story.d.ts +24 -0
- package/lib/types/checkbox-group/stories/checkbox-group-visually-hidden-label.story.d.ts.map +1 -0
- package/lib/types/checkbox-group/stories/index.d.ts +33 -0
- package/lib/types/checkbox-group/stories/index.d.ts.map +1 -0
- package/lib/types/code-block/CodeBlock.d.ts +1 -1
- package/lib/types/combobox/use-combobox-popover.d.ts +1 -1
- package/lib/types/data-grid/Components.d.ts +1 -1
- package/lib/types/data-grid/data-grid-nav/data-grid-nav.d.ts +1 -1
- package/lib/types/date-picker/DatePicker.d.ts +1 -1
- package/lib/types/dialog/Dialog.d.ts +1 -1
- package/lib/types/divider/Divider.d.ts +1 -1
- package/lib/types/dropdown-button/DropdownButton.d.ts +1 -1
- package/lib/types/dropzone/Dropzone.d.ts +1 -1
- package/lib/types/dropzone/stories/dropzone-csv-files.story.d.ts +1 -1
- package/lib/types/dropzone/stories/dropzone-custom-extensions.story.d.ts +1 -1
- package/lib/types/dropzone/stories/dropzone-default.story.d.ts +1 -1
- package/lib/types/dropzone/stories/dropzone-disabled.story.d.ts +1 -1
- package/lib/types/dropzone/stories/dropzone-full.story.d.ts +1 -1
- package/lib/types/dropzone/stories/dropzone-loading-progress.story.d.ts +1 -1
- package/lib/types/fieldset/Fieldset.d.ts +59 -0
- package/lib/types/fieldset/Fieldset.d.ts.map +1 -0
- package/lib/types/fieldset/index.d.ts +22 -0
- package/lib/types/fieldset/index.d.ts.map +1 -0
- package/lib/types/fieldset/stories/fieldset-default.story.d.ts +24 -0
- package/lib/types/fieldset/stories/fieldset-default.story.d.ts.map +1 -0
- package/lib/types/fieldset/stories/fieldset-disabled.story.d.ts +24 -0
- package/lib/types/fieldset/stories/fieldset-disabled.story.d.ts.map +1 -0
- package/lib/types/fieldset/stories/fieldset-error.story.d.ts +24 -0
- package/lib/types/fieldset/stories/fieldset-error.story.d.ts.map +1 -0
- package/lib/types/fieldset/stories/fieldset-optional.story.d.ts +24 -0
- package/lib/types/fieldset/stories/fieldset-optional.story.d.ts.map +1 -0
- package/lib/types/fieldset/stories/fieldset-required.story.d.ts +24 -0
- package/lib/types/fieldset/stories/fieldset-required.story.d.ts.map +1 -0
- package/lib/types/fieldset/stories/fieldset-visually-hidden-label.story.d.ts +24 -0
- package/lib/types/fieldset/stories/fieldset-visually-hidden-label.story.d.ts.map +1 -0
- package/lib/types/fieldset/stories/index.d.ts +33 -0
- package/lib/types/fieldset/stories/index.d.ts.map +1 -0
- package/lib/types/graph-label/GraphLabel.d.ts +1 -1
- package/lib/types/graph-label/color.d.ts +1 -1
- package/lib/types/hooks/index.d.ts +1 -1
- package/lib/types/icon-button-array/IconButtonArray.d.ts +1 -1
- package/lib/types/icon-button-base/IconButtonBase.d.ts +1 -1
- package/lib/types/icons/generated/custom/FloppyDiskArrowTopRight.d.ts +1 -1
- package/lib/types/icons/manual/Neo4JAiColor.d.ts +1 -1
- package/lib/types/index.d.ts +3 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/inline-edit/InlineEdit.d.ts +1 -1
- package/lib/types/kbd/Kbd.d.ts +1 -1
- package/lib/types/loading-bar/LoadingBar.d.ts +1 -1
- package/lib/types/loading-spinner/LoadingSpinner.d.ts +1 -1
- package/lib/types/menu/Menu.d.ts +1 -1
- package/lib/types/modal/Modal.d.ts +1 -1
- package/lib/types/portal/Portal.d.ts +1 -1
- package/lib/types/progress-bar/ProgressBar.d.ts +1 -1
- package/lib/types/radio/Radio.d.ts +2 -2
- package/lib/types/radio/Radio.d.ts.map +1 -1
- package/lib/types/radio-group/RadioGroup.d.ts +50 -0
- package/lib/types/radio-group/RadioGroup.d.ts.map +1 -0
- package/lib/types/radio-group/index.d.ts +22 -0
- package/lib/types/radio-group/index.d.ts.map +1 -0
- package/lib/types/radio-group/stories/index.d.ts +37 -0
- package/lib/types/radio-group/stories/index.d.ts.map +1 -0
- package/lib/types/radio-group/stories/radio-group-controlled.story.d.ts +24 -0
- package/lib/types/radio-group/stories/radio-group-controlled.story.d.ts.map +1 -0
- package/lib/types/radio-group/stories/radio-group-default.story.d.ts +24 -0
- package/lib/types/radio-group/stories/radio-group-default.story.d.ts.map +1 -0
- package/lib/types/radio-group/stories/radio-group-disabled.story.d.ts +24 -0
- package/lib/types/radio-group/stories/radio-group-disabled.story.d.ts.map +1 -0
- package/lib/types/radio-group/stories/radio-group-error.story.d.ts +24 -0
- package/lib/types/radio-group/stories/radio-group-error.story.d.ts.map +1 -0
- package/lib/types/radio-group/stories/radio-group-horizontal.story.d.ts +24 -0
- package/lib/types/radio-group/stories/radio-group-horizontal.story.d.ts.map +1 -0
- package/lib/types/radio-group/stories/radio-group-optional.story.d.ts +24 -0
- package/lib/types/radio-group/stories/radio-group-optional.story.d.ts.map +1 -0
- package/lib/types/radio-group/stories/radio-group-required.story.d.ts +24 -0
- package/lib/types/radio-group/stories/radio-group-required.story.d.ts.map +1 -0
- package/lib/types/radio-group/stories/radio-group-visually-hidden-label.story.d.ts +24 -0
- package/lib/types/radio-group/stories/radio-group-visually-hidden-label.story.d.ts.map +1 -0
- package/lib/types/segmented-control/SegmentedControl.d.ts +1 -1
- package/lib/types/select/Select.d.ts +1 -1
- package/lib/types/select-icon-button/SelectIconButton.d.ts +1 -1
- package/lib/types/selectable-tag/SelectableTag.d.ts +1 -1
- package/lib/types/skeleton/Skeleton.d.ts +1 -1
- package/lib/types/slider/Slider.d.ts +1 -1
- package/lib/types/slider/stories/slider-custom-step-length.story.d.ts +1 -1
- package/lib/types/slider/stories/slider-default.story.d.ts +1 -1
- package/lib/types/slider/stories/slider-disabled.story.d.ts +1 -1
- package/lib/types/slider/stories/slider-range.story.d.ts +1 -1
- package/lib/types/slider/stories/slider-show-steps.story.d.ts +1 -1
- package/lib/types/slider/stories/slider-show-values.story.d.ts +1 -1
- package/lib/types/slider/stories/slider-single.story.d.ts +1 -1
- package/lib/types/spotlight/Spotlight.d.ts +1 -1
- package/lib/types/spotlight/SpotlightProvider.d.ts +1 -1
- package/lib/types/spotlight/SpotlightTarget.d.ts +1 -1
- package/lib/types/status-indicator/StatusIndicator.d.ts +1 -1
- package/lib/types/status-label/StatusLabel.d.ts +1 -1
- package/lib/types/tabs/Tabs.d.ts +1 -1
- package/lib/types/tabs/use-tabs-scroll-overflow.d.ts +1 -1
- package/lib/types/tag/Tag.d.ts +1 -1
- package/lib/types/tag-base/TagBase.d.ts +1 -1
- package/lib/types/text-area/TextArea.d.ts +1 -1
- package/lib/types/text-link/TextLink.d.ts +1 -1
- package/lib/types/text-overflow/TextOverflow.d.ts +1 -1
- package/lib/types/theme/ThemeProvider.d.ts +1 -1
- package/lib/types/theme/agnostic.d.ts +1 -1
- package/lib/types/time-picker/TimePicker.d.ts +1 -1
- package/lib/types/time-picker/time-picker-hooks.d.ts +1 -1
- package/lib/types/timezone-picker/TimeZonePicker.d.ts +1 -1
- package/lib/types/timezone-picker/timezone-picker-hooks.d.ts +1 -1
- package/lib/types/toast/Toast.d.ts +1 -1
- package/lib/types/toast/ToastControlled.d.ts +1 -1
- package/lib/types/tree-view/TreeItemWrapper.d.ts +1 -1
- package/lib/types/tree-view/tree-view-keyboard-helpers.d.ts +1 -1
- package/lib/types/typography/stories/typography-anchor.story.d.ts +1 -1
- package/lib/types/wizard/Wizard.d.ts +1 -1
- package/package.json +17 -2
- package/skills/ndl-react/SKILL.md +5 -2
- package/skills/ndl-react/components/checkbox-group.md +195 -0
- package/skills/ndl-react/components/fieldset.md +235 -0
- package/skills/ndl-react/components/radio-group.md +259 -0
- package/skills/ndl-react/components/radio.md +1 -1
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
[//]: # (This file is auto-generated by the docs:generate-skills script, do not edit it manually)
|
|
2
|
+
|
|
3
|
+
# CheckboxGroup
|
|
4
|
+
|
|
5
|
+
Import: `import { CheckboxGroup } from '@neo4j-ndl/react'`
|
|
6
|
+
|
|
7
|
+
## Props
|
|
8
|
+
|
|
9
|
+
### CheckboxGroup
|
|
10
|
+
|
|
11
|
+
| Prop | Type | Required | Default | Description |
|
|
12
|
+
|------|------|----------|---------|-------------|
|
|
13
|
+
| `children` | `ReactNode` | ✅ | | The controls grouped by the fieldset |
|
|
14
|
+
| `errorText` | `ReactNode` | | | Error message displayed below the grouped controls. When provided, it replaces `helpText` |
|
|
15
|
+
| `hasRequiredIndicator` | `boolean` | | | Whether Required or Optional is shown at the end of the legend row |
|
|
16
|
+
| `hasVisuallyHiddenLabel` | `boolean` | | | Whether the legend is clipped out of the layout, leaving it to screen readers only |
|
|
17
|
+
| `helpText` | `ReactNode` | | | Assistive text displayed below the grouped controls |
|
|
18
|
+
| `isDisabled` | `boolean` | | `false` | Whether all native form controls in the fieldset are disabled |
|
|
19
|
+
| `isRequired` | `boolean` | | `false` | Whether the grouped field is required |
|
|
20
|
+
| `label` | `ReactNode` | ✅ | | The accessible label displayed in the fieldset legend |
|
|
21
|
+
| `name` | `string` | | | Shared native name for checkbox form values |
|
|
22
|
+
| `ref` | `Ref<HTMLFieldSetElement>` | | | A ref to apply to the root element. |
|
|
23
|
+
|
|
24
|
+
Checked state remains on each `Checkbox`. Browsers cannot natively validate
|
|
25
|
+
an “at least one” checkbox requirement, so applications should set
|
|
26
|
+
`errorText` after validating a required group.
|
|
27
|
+
|
|
28
|
+
## Accessibility
|
|
29
|
+
|
|
30
|
+
`CheckboxGroup` renders a native `<fieldset>` and `<legend>`. The legend names
|
|
31
|
+
the group, while every `Checkbox` keeps its own label. A shared `name` can be
|
|
32
|
+
provided when checked values should be submitted under the same form key.
|
|
33
|
+
|
|
34
|
+
Each native checkbox remains a separate Tab stop and Space toggles the focused
|
|
35
|
+
checkbox. `isDisabled` disables the fieldset and every descendant control.
|
|
36
|
+
|
|
37
|
+
Browsers cannot express an “at least one checkbox” constraint with native
|
|
38
|
+
`required`; applying `required` to every checkbox would require every option.
|
|
39
|
+
Use `isRequired` for the group’s required presentation, validate the selected
|
|
40
|
+
values in the application, and provide `errorText` when validation fails.
|
|
41
|
+
“Required” is included in the legend's accessible name.
|
|
42
|
+
|
|
43
|
+
Help and error text are associated with the group through `aria-describedby`;
|
|
44
|
+
individual checkboxes retain only descriptions supplied directly to them. An
|
|
45
|
+
error replaces help text and sets `aria-invalid` on the group and its
|
|
46
|
+
checkboxes.
|
|
47
|
+
|
|
48
|
+
## Examples
|
|
49
|
+
|
|
50
|
+
### Default
|
|
51
|
+
|
|
52
|
+
```tsx
|
|
53
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
54
|
+
|
|
55
|
+
import { Checkbox, CheckboxGroup } from '@neo4j-ndl/react';
|
|
56
|
+
|
|
57
|
+
const Component = () => {
|
|
58
|
+
return (
|
|
59
|
+
<CheckboxGroup
|
|
60
|
+
label="Notification channels"
|
|
61
|
+
name="notification-channel"
|
|
62
|
+
helpText="Choose every channel you want to use."
|
|
63
|
+
>
|
|
64
|
+
<Checkbox label="Email" value="email" isDefaultChecked />
|
|
65
|
+
<Checkbox label="In-app" value="in-app" />
|
|
66
|
+
<Checkbox label="Mobile push" value="push" />
|
|
67
|
+
</CheckboxGroup>
|
|
68
|
+
);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export default Component;
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Disabled
|
|
75
|
+
|
|
76
|
+
```tsx
|
|
77
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
78
|
+
|
|
79
|
+
import { Checkbox, CheckboxGroup } from '@neo4j-ndl/react';
|
|
80
|
+
|
|
81
|
+
const Component = () => {
|
|
82
|
+
return (
|
|
83
|
+
<CheckboxGroup
|
|
84
|
+
label="Notification channels"
|
|
85
|
+
name="notification-channel-disabled"
|
|
86
|
+
isDisabled
|
|
87
|
+
>
|
|
88
|
+
<Checkbox label="Email" value="email" isDefaultChecked />
|
|
89
|
+
<Checkbox label="In-app" value="in-app" />
|
|
90
|
+
<Checkbox label="Mobile push" value="push" />
|
|
91
|
+
</CheckboxGroup>
|
|
92
|
+
);
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export default Component;
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Error
|
|
99
|
+
|
|
100
|
+
```tsx
|
|
101
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
102
|
+
|
|
103
|
+
import { Checkbox, CheckboxGroup } from '@neo4j-ndl/react';
|
|
104
|
+
|
|
105
|
+
const Component = () => {
|
|
106
|
+
return (
|
|
107
|
+
<CheckboxGroup
|
|
108
|
+
label="Notification channels"
|
|
109
|
+
name="notification-channel-error"
|
|
110
|
+
errorText="Select at least one notification channel."
|
|
111
|
+
>
|
|
112
|
+
<Checkbox label="Email" value="email" isDefaultChecked />
|
|
113
|
+
<Checkbox label="In-app" value="in-app" />
|
|
114
|
+
<Checkbox label="Mobile push" value="push" />
|
|
115
|
+
</CheckboxGroup>
|
|
116
|
+
);
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
export default Component;
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Optional
|
|
123
|
+
|
|
124
|
+
```tsx
|
|
125
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
126
|
+
|
|
127
|
+
import { Checkbox, CheckboxGroup } from '@neo4j-ndl/react';
|
|
128
|
+
|
|
129
|
+
const Component = () => {
|
|
130
|
+
return (
|
|
131
|
+
<CheckboxGroup
|
|
132
|
+
label="Notification channels"
|
|
133
|
+
name="notification-channel-optional"
|
|
134
|
+
hasRequiredIndicator
|
|
135
|
+
>
|
|
136
|
+
<Checkbox label="Email" value="email" isDefaultChecked />
|
|
137
|
+
<Checkbox label="In-app" value="in-app" />
|
|
138
|
+
<Checkbox label="Mobile push" value="push" />
|
|
139
|
+
</CheckboxGroup>
|
|
140
|
+
);
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
export default Component;
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Required
|
|
147
|
+
|
|
148
|
+
```tsx
|
|
149
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
150
|
+
|
|
151
|
+
import { Checkbox, CheckboxGroup } from '@neo4j-ndl/react';
|
|
152
|
+
|
|
153
|
+
const Component = () => {
|
|
154
|
+
return (
|
|
155
|
+
<CheckboxGroup
|
|
156
|
+
label="Notification channels"
|
|
157
|
+
name="notification-channel-required"
|
|
158
|
+
hasRequiredIndicator
|
|
159
|
+
isRequired
|
|
160
|
+
>
|
|
161
|
+
<Checkbox label="Email" value="email" isDefaultChecked />
|
|
162
|
+
<Checkbox label="In-app" value="in-app" />
|
|
163
|
+
<Checkbox label="Mobile push" value="push" />
|
|
164
|
+
</CheckboxGroup>
|
|
165
|
+
);
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
export default Component;
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Visually Hidden Label
|
|
172
|
+
|
|
173
|
+
```tsx
|
|
174
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
175
|
+
|
|
176
|
+
import { Checkbox, CheckboxGroup } from '@neo4j-ndl/react';
|
|
177
|
+
|
|
178
|
+
const Component = () => {
|
|
179
|
+
return (
|
|
180
|
+
<>
|
|
181
|
+
<CheckboxGroup
|
|
182
|
+
label="Notification channels"
|
|
183
|
+
name="notification-channel-hidden"
|
|
184
|
+
hasVisuallyHiddenLabel
|
|
185
|
+
>
|
|
186
|
+
<Checkbox label="Email" value="email" isDefaultChecked />
|
|
187
|
+
<Checkbox label="In-app" value="in-app" />
|
|
188
|
+
<Checkbox label="Mobile push" value="push" />
|
|
189
|
+
</CheckboxGroup>
|
|
190
|
+
</>
|
|
191
|
+
);
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
export default Component;
|
|
195
|
+
```
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
[//]: # (This file is auto-generated by the docs:generate-skills script, do not edit it manually)
|
|
2
|
+
|
|
3
|
+
# Fieldset
|
|
4
|
+
|
|
5
|
+
Import: `import { Fieldset } from '@neo4j-ndl/react'`
|
|
6
|
+
|
|
7
|
+
## Props
|
|
8
|
+
|
|
9
|
+
### Fieldset
|
|
10
|
+
|
|
11
|
+
| Prop | Type | Required | Default | Description |
|
|
12
|
+
|------|------|----------|---------|-------------|
|
|
13
|
+
| `children` | `ReactNode` | ✅ | | The controls grouped by the fieldset |
|
|
14
|
+
| `errorText` | `ReactNode` | | | Error message displayed below the grouped controls. When provided, it replaces `helpText` |
|
|
15
|
+
| `hasRequiredIndicator` | `boolean` | | `false` | Whether Required or Optional is shown at the end of the legend row |
|
|
16
|
+
| `hasVisuallyHiddenLabel` | `boolean` | | `false` | Whether the legend is clipped out of the layout, leaving it to screen readers only |
|
|
17
|
+
| `helpText` | `ReactNode` | | | Assistive text displayed below the grouped controls |
|
|
18
|
+
| `isDisabled` | `boolean` | | `false` | Whether all native form controls in the fieldset are disabled |
|
|
19
|
+
| `isRequired` | `boolean` | | `false` | Whether the grouped field is required |
|
|
20
|
+
| `label` | `ReactNode` | ✅ | | The accessible label displayed in the fieldset legend |
|
|
21
|
+
| `ref` | `Ref<HTMLFieldSetElement>` | | | A ref to apply to the root element. |
|
|
22
|
+
|
|
23
|
+
Use `RadioGroup` or `CheckboxGroup` when the children are exclusively
|
|
24
|
+
radios or checkboxes and should inherit shared group attributes.
|
|
25
|
+
|
|
26
|
+
## Accessibility
|
|
27
|
+
|
|
28
|
+
`Fieldset` renders a native `<fieldset>` whose first child is a `<legend>`.
|
|
29
|
+
This gives the grouped controls a shared accessible name while each control
|
|
30
|
+
keeps its own label.
|
|
31
|
+
|
|
32
|
+
Help and error text are associated with the fieldset through
|
|
33
|
+
`aria-describedby`. An error replaces help text, sets `aria-invalid`, and is
|
|
34
|
+
announced by the shared polite live region. `isDisabled` uses the native
|
|
35
|
+
`disabled` attribute, which disables descendant form controls. Because a
|
|
36
|
+
generic fieldset cannot apply native required behavior to arbitrary children,
|
|
37
|
+
`isRequired` adds “Required” to the legend's accessible name; consumers remain
|
|
38
|
+
responsible for validating the controls.
|
|
39
|
+
|
|
40
|
+
Use `hasVisuallyHiddenLabel` only when the same group name is already visible
|
|
41
|
+
elsewhere. The legend remains available to assistive technology.
|
|
42
|
+
|
|
43
|
+
Use `RadioGroup` for one-of-many radio choices and `CheckboxGroup` for related
|
|
44
|
+
checkboxes. Use `Fieldset` directly for mixed or other related form controls.
|
|
45
|
+
|
|
46
|
+
## Examples
|
|
47
|
+
|
|
48
|
+
### Default
|
|
49
|
+
|
|
50
|
+
```tsx
|
|
51
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
52
|
+
|
|
53
|
+
import { Checkbox, Fieldset, TextArea, TextInput } from '@neo4j-ndl/react';
|
|
54
|
+
|
|
55
|
+
const Component = () => {
|
|
56
|
+
return (
|
|
57
|
+
<Fieldset
|
|
58
|
+
label="Team settings"
|
|
59
|
+
helpText="These settings apply to the whole team."
|
|
60
|
+
>
|
|
61
|
+
<TextInput label="Team name" placeholder="Graph Platform" />
|
|
62
|
+
<TextInput
|
|
63
|
+
label="Contact email"
|
|
64
|
+
placeholder="team@example.com"
|
|
65
|
+
htmlAttributes={{ type: 'email' }}
|
|
66
|
+
/>
|
|
67
|
+
<TextArea
|
|
68
|
+
label="Team description"
|
|
69
|
+
placeholder="Describe what your team works on"
|
|
70
|
+
/>
|
|
71
|
+
<Checkbox label="Allow other members to invite people" />
|
|
72
|
+
</Fieldset>
|
|
73
|
+
);
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export default Component;
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Disabled
|
|
80
|
+
|
|
81
|
+
```tsx
|
|
82
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
83
|
+
|
|
84
|
+
import {
|
|
85
|
+
Checkbox,
|
|
86
|
+
Fieldset,
|
|
87
|
+
Radio,
|
|
88
|
+
Switch,
|
|
89
|
+
TextArea,
|
|
90
|
+
TextInput,
|
|
91
|
+
TimePicker,
|
|
92
|
+
TimeZonePicker,
|
|
93
|
+
} from '@neo4j-ndl/react';
|
|
94
|
+
|
|
95
|
+
const Component = () => {
|
|
96
|
+
return (
|
|
97
|
+
<Fieldset label="Team settings" isDisabled>
|
|
98
|
+
<TextInput label="Team name" placeholder="Graph Platform" />
|
|
99
|
+
<TextInput
|
|
100
|
+
label="Contact email"
|
|
101
|
+
placeholder="team@example.com"
|
|
102
|
+
htmlAttributes={{ type: 'email' }}
|
|
103
|
+
/>
|
|
104
|
+
<TextArea
|
|
105
|
+
label="Team description"
|
|
106
|
+
placeholder="Describe what your team works on"
|
|
107
|
+
/>
|
|
108
|
+
<Checkbox label="Allow other members to invite people" />
|
|
109
|
+
<Radio label="Use team defaults" />
|
|
110
|
+
<Switch label="Enable team notifications" />
|
|
111
|
+
<TimePicker label="Daily reminder time" />
|
|
112
|
+
<TimeZonePicker label="Team time zone" value="Europe/Stockholm" />
|
|
113
|
+
</Fieldset>
|
|
114
|
+
);
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
export default Component;
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Error
|
|
121
|
+
|
|
122
|
+
```tsx
|
|
123
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
124
|
+
|
|
125
|
+
import { Checkbox, Fieldset, TextArea, TextInput } from '@neo4j-ndl/react';
|
|
126
|
+
|
|
127
|
+
const Component = () => {
|
|
128
|
+
return (
|
|
129
|
+
<Fieldset
|
|
130
|
+
label="Team settings"
|
|
131
|
+
errorText="Review the team settings before continuing."
|
|
132
|
+
>
|
|
133
|
+
<TextInput label="Team name" placeholder="Graph Platform" />
|
|
134
|
+
<TextInput
|
|
135
|
+
label="Contact email"
|
|
136
|
+
placeholder="team@example.com"
|
|
137
|
+
htmlAttributes={{ type: 'email' }}
|
|
138
|
+
/>
|
|
139
|
+
<TextArea
|
|
140
|
+
label="Team description"
|
|
141
|
+
placeholder="Describe what your team works on"
|
|
142
|
+
/>
|
|
143
|
+
<Checkbox label="Allow other members to invite people" />
|
|
144
|
+
</Fieldset>
|
|
145
|
+
);
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
export default Component;
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Optional
|
|
152
|
+
|
|
153
|
+
```tsx
|
|
154
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
155
|
+
|
|
156
|
+
import { Checkbox, Fieldset, TextArea, TextInput } from '@neo4j-ndl/react';
|
|
157
|
+
|
|
158
|
+
const Component = () => {
|
|
159
|
+
return (
|
|
160
|
+
<Fieldset label="Team settings" hasRequiredIndicator>
|
|
161
|
+
<TextInput label="Team name" placeholder="Graph Platform" />
|
|
162
|
+
<TextInput
|
|
163
|
+
label="Contact email"
|
|
164
|
+
placeholder="team@example.com"
|
|
165
|
+
htmlAttributes={{ type: 'email' }}
|
|
166
|
+
/>
|
|
167
|
+
<TextArea
|
|
168
|
+
label="Team description"
|
|
169
|
+
placeholder="Describe what your team works on"
|
|
170
|
+
/>
|
|
171
|
+
<Checkbox label="Allow other members to invite people" />
|
|
172
|
+
</Fieldset>
|
|
173
|
+
);
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
export default Component;
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### Required
|
|
180
|
+
|
|
181
|
+
```tsx
|
|
182
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
183
|
+
|
|
184
|
+
import { Checkbox, Fieldset, TextArea, TextInput } from '@neo4j-ndl/react';
|
|
185
|
+
|
|
186
|
+
const Component = () => {
|
|
187
|
+
return (
|
|
188
|
+
<Fieldset label="Team settings" hasRequiredIndicator isRequired>
|
|
189
|
+
<TextInput label="Team name" placeholder="Graph Platform" />
|
|
190
|
+
<TextInput
|
|
191
|
+
label="Contact email"
|
|
192
|
+
placeholder="team@example.com"
|
|
193
|
+
htmlAttributes={{ type: 'email' }}
|
|
194
|
+
/>
|
|
195
|
+
<TextArea
|
|
196
|
+
label="Team description"
|
|
197
|
+
placeholder="Describe what your team works on"
|
|
198
|
+
/>
|
|
199
|
+
<Checkbox label="Allow other members to invite people" />
|
|
200
|
+
</Fieldset>
|
|
201
|
+
);
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
export default Component;
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### Visually Hidden Label
|
|
208
|
+
|
|
209
|
+
```tsx
|
|
210
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
211
|
+
|
|
212
|
+
import { Checkbox, Fieldset, TextArea, TextInput } from '@neo4j-ndl/react';
|
|
213
|
+
|
|
214
|
+
const Component = () => {
|
|
215
|
+
return (
|
|
216
|
+
<>
|
|
217
|
+
<Fieldset label="Team settings" hasVisuallyHiddenLabel>
|
|
218
|
+
<TextInput label="Team name" placeholder="Graph Platform" />
|
|
219
|
+
<TextInput
|
|
220
|
+
label="Contact email"
|
|
221
|
+
placeholder="team@example.com"
|
|
222
|
+
htmlAttributes={{ type: 'email' }}
|
|
223
|
+
/>
|
|
224
|
+
<TextArea
|
|
225
|
+
label="Team description"
|
|
226
|
+
placeholder="Describe what your team works on"
|
|
227
|
+
/>
|
|
228
|
+
<Checkbox label="Allow other members to invite people" />
|
|
229
|
+
</Fieldset>
|
|
230
|
+
</>
|
|
231
|
+
);
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
export default Component;
|
|
235
|
+
```
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
[//]: # (This file is auto-generated by the docs:generate-skills script, do not edit it manually)
|
|
2
|
+
|
|
3
|
+
# RadioGroup
|
|
4
|
+
|
|
5
|
+
Import: `import { RadioGroup } from '@neo4j-ndl/react'`
|
|
6
|
+
|
|
7
|
+
## Props
|
|
8
|
+
|
|
9
|
+
### RadioGroup
|
|
10
|
+
|
|
11
|
+
| Prop | Type | Required | Default | Description |
|
|
12
|
+
|------|------|----------|---------|-------------|
|
|
13
|
+
| `children` | `ReactNode` | ✅ | | The controls grouped by the fieldset |
|
|
14
|
+
| `errorText` | `ReactNode` | | | Error message displayed below the grouped controls. When provided, it replaces `helpText` |
|
|
15
|
+
| `hasRequiredIndicator` | `boolean` | | | Whether Required or Optional is shown at the end of the legend row |
|
|
16
|
+
| `hasVisuallyHiddenLabel` | `boolean` | | | Whether the legend is clipped out of the layout, leaving it to screen readers only |
|
|
17
|
+
| `helpText` | `ReactNode` | | | Assistive text displayed below the grouped controls |
|
|
18
|
+
| `isDisabled` | `boolean` | | `false` | Whether all native form controls in the fieldset are disabled |
|
|
19
|
+
| `isRequired` | `boolean` | | `false` | Whether the grouped field is required |
|
|
20
|
+
| `label` | `ReactNode` | ✅ | | The accessible label displayed in the fieldset legend |
|
|
21
|
+
| `name` | `string` | ✅ | | Shared native name for the radios in the group |
|
|
22
|
+
| `onChange` | `((value: string, event: ChangeEvent<HTMLInputElement, Element>) => void)` | | | Called with the newly selected radio's value when the selection changes |
|
|
23
|
+
| `orientation` | `'horizontal' \| 'vertical'` | | `vertical` | Whether the radios are stacked vertically or laid out in a wrapping row |
|
|
24
|
+
| `ref` | `Ref<HTMLFieldSetElement>` | | | A ref to apply to the root element. |
|
|
25
|
+
| `value` | `string \| null` | | | The value of the selected radio. Pass `null` when no radio is selected. Leave undefined for uncontrolled usage |
|
|
26
|
+
|
|
27
|
+
Pass `value` and `onChange` to control the selection from the group; each
|
|
28
|
+
`Radio` is then checked when its `value` matches the group's `value`, and
|
|
29
|
+
its own `isChecked` is ignored. Without `value`, selection state remains on
|
|
30
|
+
each `Radio` (for example via `isDefaultChecked`), and `onChange` can still
|
|
31
|
+
be used to observe changes. Radios inherit `name`, disabled, required,
|
|
32
|
+
help, and validation semantics from the group.
|
|
33
|
+
|
|
34
|
+
## Accessibility
|
|
35
|
+
|
|
36
|
+
`RadioGroup` renders a native `<fieldset>` and `<legend>` with
|
|
37
|
+
`role="radiogroup"`. The legend names the group, while every `Radio` keeps its
|
|
38
|
+
own label. The required shared `name` is inherited by the radios so browsers
|
|
39
|
+
treat them as one native choice.
|
|
40
|
+
|
|
41
|
+
Native radios provide the keyboard behavior: Tab enters or leaves the group,
|
|
42
|
+
arrow keys move and select within a same-name group, and Space selects the
|
|
43
|
+
focused radio. No custom roving focus is added. Both up/down and left/right
|
|
44
|
+
arrows work regardless of `orientation`, so the horizontal layout needs no
|
|
45
|
+
extra keyboard handling.
|
|
46
|
+
|
|
47
|
+
When `isRequired` is set, the group has `aria-required="true"` and its radios
|
|
48
|
+
inherit native `required`. `isDisabled` disables the fieldset and every
|
|
49
|
+
descendant control.
|
|
50
|
+
|
|
51
|
+
Help and error text are associated with the radiogroup through
|
|
52
|
+
`aria-describedby`; individual radios retain only descriptions supplied
|
|
53
|
+
directly to them. An error replaces help text and sets `aria-invalid` on the
|
|
54
|
+
radiogroup.
|
|
55
|
+
|
|
56
|
+
## Examples
|
|
57
|
+
|
|
58
|
+
### Default
|
|
59
|
+
|
|
60
|
+
```tsx
|
|
61
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
62
|
+
|
|
63
|
+
import { Radio, RadioGroup } from '@neo4j-ndl/react';
|
|
64
|
+
|
|
65
|
+
const Component = () => {
|
|
66
|
+
return (
|
|
67
|
+
<RadioGroup
|
|
68
|
+
label="Default project size"
|
|
69
|
+
name="project-size"
|
|
70
|
+
helpText="Choose the size used for new projects."
|
|
71
|
+
>
|
|
72
|
+
<Radio label="Small" value="small" />
|
|
73
|
+
<Radio label="Medium" value="medium" isDefaultChecked />
|
|
74
|
+
<Radio label="Large" value="large" />
|
|
75
|
+
</RadioGroup>
|
|
76
|
+
);
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export default Component;
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Controlled
|
|
83
|
+
|
|
84
|
+
```tsx
|
|
85
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
86
|
+
|
|
87
|
+
import { Radio, RadioGroup, Typography } from '@neo4j-ndl/react';
|
|
88
|
+
import { useState } from 'react';
|
|
89
|
+
|
|
90
|
+
const Component = () => {
|
|
91
|
+
const [projectSize, setProjectSize] = useState('medium');
|
|
92
|
+
|
|
93
|
+
return (
|
|
94
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '16px' }}>
|
|
95
|
+
<RadioGroup
|
|
96
|
+
label="Default project size"
|
|
97
|
+
name="project-size"
|
|
98
|
+
value={projectSize}
|
|
99
|
+
onChange={setProjectSize}
|
|
100
|
+
>
|
|
101
|
+
<Radio label="Small" value="small" />
|
|
102
|
+
<Radio label="Medium" value="medium" />
|
|
103
|
+
<Radio label="Large" value="large" />
|
|
104
|
+
</RadioGroup>
|
|
105
|
+
<Typography variant="body-medium">Selected: {projectSize}</Typography>
|
|
106
|
+
</div>
|
|
107
|
+
);
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export default Component;
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Disabled
|
|
114
|
+
|
|
115
|
+
```tsx
|
|
116
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
117
|
+
|
|
118
|
+
import { Radio, RadioGroup } from '@neo4j-ndl/react';
|
|
119
|
+
|
|
120
|
+
const Component = () => {
|
|
121
|
+
return (
|
|
122
|
+
<RadioGroup
|
|
123
|
+
label="Default project size"
|
|
124
|
+
name="project-size-disabled"
|
|
125
|
+
isDisabled
|
|
126
|
+
>
|
|
127
|
+
<Radio label="Small" value="small" />
|
|
128
|
+
<Radio label="Medium" value="medium" isDefaultChecked />
|
|
129
|
+
<Radio label="Large" value="large" />
|
|
130
|
+
</RadioGroup>
|
|
131
|
+
);
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
export default Component;
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Error
|
|
138
|
+
|
|
139
|
+
```tsx
|
|
140
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
141
|
+
|
|
142
|
+
import { Radio, RadioGroup } from '@neo4j-ndl/react';
|
|
143
|
+
|
|
144
|
+
const Component = () => {
|
|
145
|
+
return (
|
|
146
|
+
<RadioGroup
|
|
147
|
+
label="Default project size"
|
|
148
|
+
name="project-size-error"
|
|
149
|
+
errorText="Select a project size."
|
|
150
|
+
>
|
|
151
|
+
<Radio label="Small" value="small" />
|
|
152
|
+
<Radio label="Medium" value="medium" isDefaultChecked />
|
|
153
|
+
<Radio label="Large" value="large" />
|
|
154
|
+
</RadioGroup>
|
|
155
|
+
);
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
export default Component;
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Horizontal
|
|
162
|
+
|
|
163
|
+
```tsx
|
|
164
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
165
|
+
|
|
166
|
+
import { Radio, RadioGroup } from '@neo4j-ndl/react';
|
|
167
|
+
|
|
168
|
+
const Component = () => {
|
|
169
|
+
return (
|
|
170
|
+
<RadioGroup
|
|
171
|
+
label="Default project size"
|
|
172
|
+
name="project-size"
|
|
173
|
+
helpText="Choose the size used for new projects."
|
|
174
|
+
orientation="horizontal"
|
|
175
|
+
>
|
|
176
|
+
<Radio label="Small" value="small" />
|
|
177
|
+
<Radio label="Medium" value="medium" isDefaultChecked />
|
|
178
|
+
<Radio label="Large" value="large" />
|
|
179
|
+
</RadioGroup>
|
|
180
|
+
);
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
export default Component;
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Optional
|
|
187
|
+
|
|
188
|
+
```tsx
|
|
189
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
190
|
+
|
|
191
|
+
import { Radio, RadioGroup } from '@neo4j-ndl/react';
|
|
192
|
+
|
|
193
|
+
const Component = () => {
|
|
194
|
+
return (
|
|
195
|
+
<RadioGroup
|
|
196
|
+
label="Default project size"
|
|
197
|
+
name="project-size-optional"
|
|
198
|
+
hasRequiredIndicator
|
|
199
|
+
>
|
|
200
|
+
<Radio label="Small" value="small" />
|
|
201
|
+
<Radio label="Medium" value="medium" isDefaultChecked />
|
|
202
|
+
<Radio label="Large" value="large" />
|
|
203
|
+
</RadioGroup>
|
|
204
|
+
);
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
export default Component;
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Required
|
|
211
|
+
|
|
212
|
+
```tsx
|
|
213
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
214
|
+
|
|
215
|
+
import { Radio, RadioGroup } from '@neo4j-ndl/react';
|
|
216
|
+
|
|
217
|
+
const Component = () => {
|
|
218
|
+
return (
|
|
219
|
+
<RadioGroup
|
|
220
|
+
label="Default project size"
|
|
221
|
+
name="project-size-required"
|
|
222
|
+
hasRequiredIndicator
|
|
223
|
+
isRequired
|
|
224
|
+
>
|
|
225
|
+
<Radio label="Small" value="small" />
|
|
226
|
+
<Radio label="Medium" value="medium" isDefaultChecked />
|
|
227
|
+
<Radio label="Large" value="large" />
|
|
228
|
+
</RadioGroup>
|
|
229
|
+
);
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
export default Component;
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### Visually Hidden Label
|
|
236
|
+
|
|
237
|
+
```tsx
|
|
238
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
239
|
+
|
|
240
|
+
import { Radio, RadioGroup } from '@neo4j-ndl/react';
|
|
241
|
+
|
|
242
|
+
const Component = () => {
|
|
243
|
+
return (
|
|
244
|
+
<>
|
|
245
|
+
<RadioGroup
|
|
246
|
+
label="Default project size"
|
|
247
|
+
name="project-size-hidden"
|
|
248
|
+
hasVisuallyHiddenLabel
|
|
249
|
+
>
|
|
250
|
+
<Radio label="Small" value="small" />
|
|
251
|
+
<Radio label="Medium" value="medium" isDefaultChecked />
|
|
252
|
+
<Radio label="Large" value="large" />
|
|
253
|
+
</RadioGroup>
|
|
254
|
+
</>
|
|
255
|
+
);
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
export default Component;
|
|
259
|
+
```
|
|
@@ -12,7 +12,7 @@ Import: `import { Radio } from '@neo4j-ndl/react'`
|
|
|
12
12
|
|------|------|----------|---------|-------------|
|
|
13
13
|
| `ariaLabel` | `string` | | | The aria label of the radio. Required if the label is not a string. |
|
|
14
14
|
| `hasLeadingLabel` | `boolean` | | | Whether the label should be displayed before the radio |
|
|
15
|
-
| `isChecked` | `boolean` | | | Whether the radio is checked |
|
|
15
|
+
| `isChecked` | `boolean` | | | Whether the radio is checked. Ignored when a parent `RadioGroup` has a `value` |
|
|
16
16
|
| `isDefaultChecked` | `boolean` | | | Selects the radio by default in uncontrolled mode |
|
|
17
17
|
| `isDisabled` | `boolean` | | `false` | Whether the radio is disabled |
|
|
18
18
|
| `isFluid` | `boolean` | | `false` | Whether the radio & label should take the full available width of its container |
|