@digigov/ui 0.32.0 → 0.32.2
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/CHANGELOG.md +16 -1
- package/admin/AccessibilityMenu/index.d.ts +6 -0
- package/admin/AccessibilityMenu/index.js +85 -30
- package/admin/AutoComplete/index.mdx +8 -30
- package/admin/CopyToClipboard/index.mdx +1 -5
- package/admin/Dropdown/Dropdown.stories.playwright.json +53 -0
- package/admin/Dropdown/__stories__/AlignRight.js +1 -2
- package/admin/Dropdown/__stories__/Default.js +1 -3
- package/admin/Dropdown/__stories__/PlacementTop.js +1 -2
- package/admin/Dropdown/index.mdx +3 -15
- package/admin/Modal/Modal.stories.playwright.json +37 -0
- package/admin/Modal/__stories__/AlertDialog.js +36 -12
- package/admin/Modal/__stories__/Default.js +34 -10
- package/admin/Modal/index.mdx +1 -5
- package/app/Footer/Footer.mdx +3 -14
- package/app/Header/index.mdx +3 -16
- package/app/QrCodeViewer/index.mdx +1 -5
- package/core/Accordion/index.d.ts +5 -1
- package/core/Accordion/index.js +46 -13
- package/core/Accordion/index.mdx +2 -10
- package/core/Button/__stories__/GroupingButtons.d.ts +1 -0
- package/core/Button/__stories__/GroupingButtons.js +4 -2
- package/core/Button/__stories__/GroupingButtonsAndLinks.d.ts +1 -0
- package/core/Button/__stories__/GroupingButtonsAndLinks.js +4 -2
- package/core/Button/__stories__/Warning.d.ts +1 -0
- package/core/Button/__stories__/Warning.js +4 -2
- package/core/Button/index.mdx +4 -20
- package/core/Card/card.mdx +7 -35
- package/core/Checkbox/checkbox.mdx +6 -30
- package/core/DateInputContainer/index.mdx +4 -20
- package/core/ErrorSummary/index.mdx +3 -15
- package/core/FileUpload/index.mdx +1 -5
- package/core/Link/link.mdx +4 -20
- package/core/List/index.mdx +1 -5
- package/core/NavList/index.mdx +1 -5
- package/core/NotificationBanner/index.mdx +1 -5
- package/core/PhaseBanner/index.mdx +1 -4
- package/core/RadioContainer/index.mdx +6 -30
- package/core/SelectContainer/index.mdx +3 -15
- package/core/SingleCharacterInputContainer/index.mdx +7 -10
- package/core/SummaryList/index.mdx +2 -10
- package/core/Table/index.mdx +6 -30
- package/core/TextArea/index.mdx +6 -30
- package/core/TextInput/index.mdx +6 -30
- package/core/index.d.ts +1 -0
- package/core/index.js +13 -0
- package/es/admin/AccessibilityMenu/index.js +49 -0
- package/es/admin/AutoComplete/index.mdx +8 -30
- package/es/admin/CopyToClipboard/index.mdx +1 -5
- package/es/admin/Dropdown/Dropdown.stories.playwright.json +53 -0
- package/es/admin/Dropdown/__stories__/AlignRight.js +1 -2
- package/es/admin/Dropdown/__stories__/Default.js +1 -3
- package/es/admin/Dropdown/__stories__/PlacementTop.js +1 -2
- package/es/admin/Dropdown/index.mdx +3 -15
- package/es/admin/Modal/Modal.stories.playwright.json +37 -0
- package/es/admin/Modal/__stories__/AlertDialog.js +29 -12
- package/es/admin/Modal/__stories__/Default.js +27 -10
- package/es/admin/Modal/index.mdx +1 -5
- package/es/app/Footer/Footer.mdx +3 -14
- package/es/app/Header/index.mdx +3 -16
- package/es/app/QrCodeViewer/index.mdx +1 -5
- package/es/core/Accordion/index.js +40 -6
- package/es/core/Accordion/index.mdx +2 -10
- package/es/core/Button/__stories__/GroupingButtons.js +2 -1
- package/es/core/Button/__stories__/GroupingButtonsAndLinks.js +2 -1
- package/es/core/Button/__stories__/Warning.js +2 -1
- package/es/core/Button/index.mdx +4 -20
- package/es/core/Card/card.mdx +7 -35
- package/es/core/Checkbox/checkbox.mdx +6 -30
- package/es/core/DateInputContainer/index.mdx +4 -20
- package/es/core/ErrorSummary/index.mdx +3 -15
- package/es/core/FileUpload/index.mdx +1 -5
- package/es/core/Link/link.mdx +4 -20
- package/es/core/List/index.mdx +1 -5
- package/es/core/NavList/index.mdx +1 -5
- package/es/core/NotificationBanner/index.mdx +1 -5
- package/es/core/PhaseBanner/index.mdx +1 -4
- package/es/core/RadioContainer/index.mdx +6 -30
- package/es/core/SelectContainer/index.mdx +3 -15
- package/es/core/SingleCharacterInputContainer/index.mdx +7 -10
- package/es/core/SummaryList/index.mdx +2 -10
- package/es/core/Table/index.mdx +6 -30
- package/es/core/TextArea/index.mdx +6 -30
- package/es/core/TextInput/index.mdx +6 -30
- package/es/core/index.js +1 -0
- package/es/typography/HeadingCaption/index.mdx +1 -5
- package/es/typography/Hint/index.mdx +1 -5
- package/es/typography/NormalText/index.mdx +3 -15
- package/es/typography/Paragraph/index.mdx +3 -15
- package/esm/admin/AccessibilityMenu/index.js +49 -0
- package/esm/admin/AutoComplete/index.mdx +8 -30
- package/esm/admin/CopyToClipboard/index.mdx +1 -5
- package/esm/admin/Dropdown/Dropdown.stories.playwright.json +53 -0
- package/esm/admin/Dropdown/__stories__/AlignRight.js +1 -2
- package/esm/admin/Dropdown/__stories__/Default.js +1 -3
- package/esm/admin/Dropdown/__stories__/PlacementTop.js +1 -2
- package/esm/admin/Dropdown/index.mdx +3 -15
- package/esm/admin/Modal/Modal.stories.playwright.json +37 -0
- package/esm/admin/Modal/__stories__/AlertDialog.js +29 -12
- package/esm/admin/Modal/__stories__/Default.js +27 -10
- package/esm/admin/Modal/index.mdx +1 -5
- package/esm/app/Footer/Footer.mdx +3 -14
- package/esm/app/Header/index.mdx +3 -16
- package/esm/app/QrCodeViewer/index.mdx +1 -5
- package/esm/core/Accordion/index.js +40 -6
- package/esm/core/Accordion/index.mdx +2 -10
- package/esm/core/Button/__stories__/GroupingButtons.js +2 -1
- package/esm/core/Button/__stories__/GroupingButtonsAndLinks.js +2 -1
- package/esm/core/Button/__stories__/Warning.js +2 -1
- package/esm/core/Button/index.mdx +4 -20
- package/esm/core/Card/card.mdx +7 -35
- package/esm/core/Checkbox/checkbox.mdx +6 -30
- package/esm/core/DateInputContainer/index.mdx +4 -20
- package/esm/core/ErrorSummary/index.mdx +3 -15
- package/esm/core/FileUpload/index.mdx +1 -5
- package/esm/core/Link/link.mdx +4 -20
- package/esm/core/List/index.mdx +1 -5
- package/esm/core/NavList/index.mdx +1 -5
- package/esm/core/NotificationBanner/index.mdx +1 -5
- package/esm/core/PhaseBanner/index.mdx +1 -4
- package/esm/core/RadioContainer/index.mdx +6 -30
- package/esm/core/SelectContainer/index.mdx +3 -15
- package/esm/core/SingleCharacterInputContainer/index.mdx +7 -10
- package/esm/core/SummaryList/index.mdx +2 -10
- package/esm/core/Table/index.mdx +6 -30
- package/esm/core/TextArea/index.mdx +6 -30
- package/esm/core/TextInput/index.mdx +6 -30
- package/esm/core/index.js +1 -0
- package/esm/index.js +1 -1
- package/esm/typography/HeadingCaption/index.mdx +1 -5
- package/esm/typography/Hint/index.mdx +1 -5
- package/esm/typography/NormalText/index.mdx +3 -15
- package/esm/typography/Paragraph/index.mdx +3 -15
- package/package.json +3 -3
- package/src/admin/AccessibilityMenu/index.tsx +52 -0
- package/src/admin/AutoComplete/index.mdx +8 -30
- package/src/admin/CopyToClipboard/index.mdx +1 -5
- package/src/admin/Dropdown/Dropdown.stories.playwright.json +53 -0
- package/src/admin/Dropdown/__stories__/AlignRight.tsx +1 -1
- package/src/admin/Dropdown/__stories__/Default.tsx +1 -1
- package/src/admin/Dropdown/__stories__/PlacementTop.tsx +1 -1
- package/src/admin/Dropdown/index.mdx +3 -15
- package/src/admin/Modal/Modal.stories.playwright.json +37 -0
- package/src/admin/Modal/__stories__/AlertDialog.tsx +18 -3
- package/src/admin/Modal/__stories__/Default.tsx +18 -3
- package/src/admin/Modal/index.mdx +1 -5
- package/src/app/Footer/Footer.mdx +3 -14
- package/src/app/Header/index.mdx +3 -16
- package/src/app/QrCodeViewer/index.mdx +1 -5
- package/src/core/Accordion/index.mdx +2 -10
- package/src/core/Accordion/index.tsx +38 -4
- package/src/core/Button/__stories__/GroupingButtons.tsx +1 -0
- package/src/core/Button/__stories__/GroupingButtonsAndLinks.tsx +1 -0
- package/src/core/Button/__stories__/Warning.tsx +1 -0
- package/src/core/Button/index.mdx +4 -20
- package/src/core/Card/card.mdx +7 -35
- package/src/core/Checkbox/checkbox.mdx +6 -30
- package/src/core/DateInputContainer/index.mdx +4 -20
- package/src/core/ErrorSummary/index.mdx +3 -15
- package/src/core/FileUpload/index.mdx +1 -5
- package/src/core/Link/link.mdx +4 -20
- package/src/core/List/index.mdx +1 -5
- package/src/core/NavList/index.mdx +1 -5
- package/src/core/NotificationBanner/index.mdx +1 -5
- package/src/core/PhaseBanner/index.mdx +1 -4
- package/src/core/RadioContainer/index.mdx +6 -30
- package/src/core/SelectContainer/index.mdx +3 -15
- package/src/core/SingleCharacterInputContainer/index.mdx +7 -10
- package/src/core/SummaryList/index.mdx +2 -10
- package/src/core/Table/index.mdx +6 -30
- package/src/core/TextArea/index.mdx +6 -30
- package/src/core/TextInput/index.mdx +6 -30
- package/src/core/index.ts +1 -0
- package/src/typography/HeadingCaption/index.mdx +1 -5
- package/src/typography/Hint/index.mdx +1 -5
- package/src/typography/NormalText/index.mdx +3 -15
- package/src/typography/Paragraph/index.mdx +3 -15
- package/typography/HeadingCaption/index.mdx +1 -5
- package/typography/Hint/index.mdx +1 -5
- package/typography/NormalText/index.mdx +3 -15
- package/typography/Paragraph/index.mdx +3 -15
|
@@ -11,11 +11,7 @@ import QrCodeViewer from '@digigov/ui/app/QrCodeViewer';
|
|
|
11
11
|
|
|
12
12
|
### Default QrCodeViewer
|
|
13
13
|
|
|
14
|
-
<Story
|
|
15
|
-
packageName="@digigov/ui"
|
|
16
|
-
component="app/QrCodeViewer"
|
|
17
|
-
story="Default.tsx"
|
|
18
|
-
/>
|
|
14
|
+
<Story packageName="@digigov/ui" component="app/QrCodeViewer" story="Default.tsx" />
|
|
19
15
|
|
|
20
16
|
### Custom QrCodeViewer
|
|
21
17
|
|
|
@@ -2,11 +2,15 @@ import React from 'react';
|
|
|
2
2
|
import Accordion from '@digigov/react-core/Accordion';
|
|
3
3
|
import AccordionSection from '@digigov/react-core/AccordionSection';
|
|
4
4
|
import AccordionSectionContent from '@digigov/react-core/AccordionSectionContent';
|
|
5
|
-
import
|
|
5
|
+
import { AccordionSectionSummaryHeadingProps as AccordionSectionSummaryHeadingBaseProps } from '@digigov/react-core/AccordionSectionSummaryHeading';
|
|
6
6
|
import AccordionSectionSummary from '@digigov/react-core/AccordionSectionSummary';
|
|
7
7
|
import AccordionControls from '@digigov/react-core/AccordionControls';
|
|
8
8
|
import { UseTogglableTabReturn } from '@digigov/ui/hooks/useTogglableTab';
|
|
9
9
|
export declare const AccordionItemDetails: React.ForwardRefExoticComponent<Pick<import("@digigov/react-core/AccordionSectionContent").AccordionSectionContentProps, "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export interface AccordionSectionSummaryHeadingProps extends AccordionSectionSummaryHeadingBaseProps {
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
declare const AccordionSectionSummaryHeading: React.ForwardRefExoticComponent<Pick<AccordionSectionSummaryHeadingProps, "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
10
14
|
export declare const AccordionItemSummary: ({ children, ...props }: {
|
|
11
15
|
[x: string]: any;
|
|
12
16
|
children: any;
|
package/core/Accordion/index.js
CHANGED
|
@@ -11,11 +11,11 @@ var _exportNames = {
|
|
|
11
11
|
AccordionItemDetails: true,
|
|
12
12
|
AccordionItemSummary: true,
|
|
13
13
|
AccordionItem: true,
|
|
14
|
+
AccordionSectionSummaryHeading: true,
|
|
14
15
|
useAccordion: true,
|
|
15
16
|
Accordion: true,
|
|
16
17
|
AccordionSection: true,
|
|
17
18
|
AccordionSectionContent: true,
|
|
18
|
-
AccordionSectionSummaryHeading: true,
|
|
19
19
|
AccordionSectionSummary: true,
|
|
20
20
|
AccordionControls: true
|
|
21
21
|
};
|
|
@@ -50,19 +50,15 @@ Object.defineProperty(exports, "AccordionSectionSummary", {
|
|
|
50
50
|
return _AccordionSectionSummary["default"];
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
|
-
|
|
54
|
-
enumerable: true,
|
|
55
|
-
get: function get() {
|
|
56
|
-
return _AccordionSectionSummaryHeading["default"];
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
exports.useAccordion = exports["default"] = void 0;
|
|
53
|
+
exports.useAccordion = exports["default"] = exports.AccordionSectionSummaryHeading = void 0;
|
|
60
54
|
|
|
61
55
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
62
56
|
|
|
57
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
58
|
+
|
|
63
59
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
64
60
|
|
|
65
|
-
var _react =
|
|
61
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
66
62
|
|
|
67
63
|
var _Accordion = _interopRequireWildcard(require("@digigov/react-core/Accordion"));
|
|
68
64
|
|
|
@@ -166,7 +162,8 @@ Object.keys(_AccordionSectionHeader).forEach(function (key) {
|
|
|
166
162
|
});
|
|
167
163
|
});
|
|
168
164
|
var _excluded = ["children"],
|
|
169
|
-
_excluded2 = ["
|
|
165
|
+
_excluded2 = ["children"],
|
|
166
|
+
_excluded3 = ["register", "setOpened", "opened", "registered"];
|
|
170
167
|
|
|
171
168
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
172
169
|
|
|
@@ -177,10 +174,46 @@ var AccordionItemDetails = (0, _withDeprecation["default"])(_AccordionSectionCon
|
|
|
177
174
|
rename: 'AccordionSectionContent'
|
|
178
175
|
});
|
|
179
176
|
exports.AccordionItemDetails = AccordionItemDetails;
|
|
180
|
-
|
|
177
|
+
|
|
178
|
+
var AccordionSectionSummaryHeading = /*#__PURE__*/_react["default"].forwardRef(function AccordionSectionSummaryHeading(_ref, ref) {
|
|
181
179
|
var children = _ref.children,
|
|
182
180
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
183
|
-
|
|
181
|
+
|
|
182
|
+
var toggleExpanded = function toggleExpanded() {
|
|
183
|
+
setExpanded(!isExpanded);
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
var _useState = (0, _react.useState)(false),
|
|
187
|
+
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
188
|
+
isExpanded = _useState2[0],
|
|
189
|
+
setExpanded = _useState2[1];
|
|
190
|
+
|
|
191
|
+
return /*#__PURE__*/_react["default"].createElement(_AccordionSectionSummaryHeading["default"], (0, _extends2["default"])({
|
|
192
|
+
ref: ref
|
|
193
|
+
}, props, {
|
|
194
|
+
onClick: toggleExpanded,
|
|
195
|
+
"aria-expanded": isExpanded
|
|
196
|
+
}), children);
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
exports.AccordionSectionSummaryHeading = AccordionSectionSummaryHeading;
|
|
200
|
+
var AccordionItemSummary = (0, _withDeprecation["default"])(function (_ref2) {
|
|
201
|
+
var children = _ref2.children,
|
|
202
|
+
props = (0, _objectWithoutProperties2["default"])(_ref2, _excluded2);
|
|
203
|
+
|
|
204
|
+
var toggleExpanded = function toggleExpanded() {
|
|
205
|
+
setExpanded(!isExpanded);
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
var _useState3 = (0, _react.useState)(false),
|
|
209
|
+
_useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
|
|
210
|
+
isExpanded = _useState4[0],
|
|
211
|
+
setExpanded = _useState4[1];
|
|
212
|
+
|
|
213
|
+
return /*#__PURE__*/_react["default"].createElement(_AccordionSectionSummary["default"], props, /*#__PURE__*/_react["default"].createElement(_AccordionSectionSummaryHeading["default"], {
|
|
214
|
+
onClick: toggleExpanded,
|
|
215
|
+
"aria-expanded": isExpanded
|
|
216
|
+
}, children));
|
|
184
217
|
}, {
|
|
185
218
|
name: 'AccordionItemSummary',
|
|
186
219
|
warning: 'There is no need to use AccordionSectionHeader components anymore. It will be removed in a later version and impelented using AccordionSectionSummary and AccordionSectionSummaryHeading'
|
|
@@ -204,7 +237,7 @@ var useAccordion = function useAccordion(props) {
|
|
|
204
237
|
setOpened = _useTogglableTab.setOpened,
|
|
205
238
|
opened = _useTogglableTab.opened,
|
|
206
239
|
registered = _useTogglableTab.registered,
|
|
207
|
-
rest = (0, _objectWithoutProperties2["default"])(_useTogglableTab,
|
|
240
|
+
rest = (0, _objectWithoutProperties2["default"])(_useTogglableTab, _excluded3);
|
|
208
241
|
|
|
209
242
|
return (0, _extends2["default"])({
|
|
210
243
|
register: register,
|
package/core/Accordion/index.mdx
CHANGED
|
@@ -15,21 +15,13 @@ import Accordion from '@digigov/ui/core/Accordion';
|
|
|
15
15
|
|
|
16
16
|
## How to use
|
|
17
17
|
|
|
18
|
-
<Story
|
|
19
|
-
packageName="@digigov/ui"
|
|
20
|
-
component="core/Accordion"
|
|
21
|
-
story="Default.tsx"
|
|
22
|
-
/>
|
|
18
|
+
<Story packageName="@digigov/ui" component="core/Accordion" story="Default.tsx" />
|
|
23
19
|
|
|
24
20
|
### Accordion with Hints
|
|
25
21
|
|
|
26
22
|
Accordions hide content, so the labels need to be clear. If necessary, you can add a summary line to help users understand what is in the section.
|
|
27
23
|
|
|
28
|
-
<Story
|
|
29
|
-
packageName="@digigov/ui"
|
|
30
|
-
component="core/Accordion"
|
|
31
|
-
story="WithHints.tsx"
|
|
32
|
-
/>
|
|
24
|
+
<Story packageName="@digigov/ui" component="core/Accordion" story="WithHints.tsx" />
|
|
33
25
|
|
|
34
26
|
## Accessibility
|
|
35
27
|
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.GroupingButtons = void 0;
|
|
8
|
+
exports["default"] = exports.GroupingButtons = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
|
|
@@ -22,4 +22,6 @@ var GroupingButtons = function GroupingButtons() {
|
|
|
22
22
|
return _ref;
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
exports.GroupingButtons = GroupingButtons;
|
|
25
|
+
exports.GroupingButtons = GroupingButtons;
|
|
26
|
+
var _default = GroupingButtons;
|
|
27
|
+
exports["default"] = _default;
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.GroupingButtonsAndLinks = void 0;
|
|
8
|
+
exports["default"] = exports.GroupingButtonsAndLinks = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
|
|
@@ -24,4 +24,6 @@ var GroupingButtonsAndLinks = function GroupingButtonsAndLinks() {
|
|
|
24
24
|
return _ref;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
exports.GroupingButtonsAndLinks = GroupingButtonsAndLinks;
|
|
27
|
+
exports.GroupingButtonsAndLinks = GroupingButtonsAndLinks;
|
|
28
|
+
var _default = GroupingButtonsAndLinks;
|
|
29
|
+
exports["default"] = _default;
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.Warning = void 0;
|
|
8
|
+
exports["default"] = exports.Warning = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
|
|
@@ -20,4 +20,6 @@ var Warning = function Warning() {
|
|
|
20
20
|
return _ref;
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
exports.Warning = Warning;
|
|
23
|
+
exports.Warning = Warning;
|
|
24
|
+
var _default = Warning;
|
|
25
|
+
exports["default"] = _default;
|
package/core/Button/index.mdx
CHANGED
|
@@ -24,21 +24,13 @@ Use a default button for the main call to action on a page.
|
|
|
24
24
|
|
|
25
25
|
Use a start button for the main call to action on your service’s start page. Start buttons do not submit form data, so they use a link tag rather than a button tag.
|
|
26
26
|
|
|
27
|
-
<Story
|
|
28
|
-
packageName="@digigov/ui"
|
|
29
|
-
component="core/Button"
|
|
30
|
-
story="CallToActionButton.tsx"
|
|
31
|
-
/>
|
|
27
|
+
<Story packageName="@digigov/ui" component="core/Button" story="CallToActionButton.tsx" />
|
|
32
28
|
|
|
33
29
|
### Secondary buttons
|
|
34
30
|
|
|
35
31
|
Use secondary buttons for secondary calls to action on a page.
|
|
36
32
|
|
|
37
|
-
<Story
|
|
38
|
-
packageName="@digigov/ui"
|
|
39
|
-
component="core/Button"
|
|
40
|
-
story="Secondary.tsx"
|
|
41
|
-
/>
|
|
33
|
+
<Story packageName="@digigov/ui" component="core/Button" story="Secondary.tsx" />
|
|
42
34
|
|
|
43
35
|
### Warning buttons
|
|
44
36
|
|
|
@@ -56,19 +48,11 @@ Disabled buttons have poor contrast and can confuse some users, so avoid them if
|
|
|
56
48
|
|
|
57
49
|
Use a button group when two or more buttons are placed together.
|
|
58
50
|
|
|
59
|
-
<Story
|
|
60
|
-
packageName="@digigov/ui"
|
|
61
|
-
component="core/Button"
|
|
62
|
-
story="GroupingButtons.tsx"
|
|
63
|
-
/>
|
|
51
|
+
<Story packageName="@digigov/ui"component="core/Button" story="GroupingButtons.tsx" />
|
|
64
52
|
|
|
65
53
|
Any links within a button group will automatically align with the buttons.
|
|
66
54
|
|
|
67
|
-
<Story
|
|
68
|
-
packageName="@digigov/ui"
|
|
69
|
-
component="core/Button"
|
|
70
|
-
story="GroupingButtonsAndLinks.tsx"
|
|
71
|
-
/>
|
|
55
|
+
<Story packageName="@digigov/ui" component="core/Button" story="GroupingButtonsAndLinks.tsx" />
|
|
72
56
|
|
|
73
57
|
Write button text in sentence case, describing the action it performs. For
|
|
74
58
|
example:'
|
package/core/Card/card.mdx
CHANGED
|
@@ -22,19 +22,11 @@ You can set the color of the Card's border. You can choose between `dark` and `g
|
|
|
22
22
|
|
|
23
23
|
#### Card with gray border color
|
|
24
24
|
|
|
25
|
-
<Story
|
|
26
|
-
packageName="@digigov/ui"
|
|
27
|
-
component="core/Card"
|
|
28
|
-
story="WithGrayBorder.tsx"
|
|
29
|
-
/>
|
|
25
|
+
<Story packageName="@digigov/ui" component="core/Card" story="WithGrayBorder.tsx" />
|
|
30
26
|
|
|
31
27
|
#### Card with dark border color
|
|
32
28
|
|
|
33
|
-
<Story
|
|
34
|
-
packageName="@digigov/ui"
|
|
35
|
-
component="core/Card"
|
|
36
|
-
story="WithDarkBorder.tsx"
|
|
37
|
-
/>
|
|
29
|
+
<Story packageName="@digigov/ui" component="core/Card" story="WithDarkBorder.tsx" />
|
|
38
30
|
|
|
39
31
|
### Card with top border
|
|
40
32
|
|
|
@@ -42,27 +34,15 @@ You can set the color of the Card's top border. You can choose between dark and
|
|
|
42
34
|
|
|
43
35
|
#### Card with grey top border
|
|
44
36
|
|
|
45
|
-
<Story
|
|
46
|
-
packageName="@digigov/ui"
|
|
47
|
-
component="core/Card"
|
|
48
|
-
story="WithGrayTopBorder.tsx"
|
|
49
|
-
/>
|
|
37
|
+
<Story packageName="@digigov/ui" component="core/Card" story="WithGrayTopBorder.tsx" />
|
|
50
38
|
|
|
51
39
|
#### Card with dark top border
|
|
52
40
|
|
|
53
|
-
<Story
|
|
54
|
-
packageName="@digigov/ui"
|
|
55
|
-
component="core/Card"
|
|
56
|
-
story="WithDarkTopBorder.tsx"
|
|
57
|
-
/>
|
|
41
|
+
<Story packageName="@digigov/ui" component="core/Card" story="WithDarkTopBorder.tsx" />
|
|
58
42
|
|
|
59
43
|
### Card with divider
|
|
60
44
|
|
|
61
|
-
<Story
|
|
62
|
-
packageName="@digigov/ui"
|
|
63
|
-
component="core/Card"
|
|
64
|
-
story="WithDivider.tsx"
|
|
65
|
-
/>
|
|
45
|
+
<Story packageName="@digigov/ui" component="core/Card" story="WithDivider.tsx" />
|
|
66
46
|
|
|
67
47
|
### Card with actions
|
|
68
48
|
|
|
@@ -70,21 +50,13 @@ You can set the color of the Card's top border. You can choose between dark and
|
|
|
70
50
|
|
|
71
51
|
Cards can be used without an action button, but with a clickable title.
|
|
72
52
|
|
|
73
|
-
<Story
|
|
74
|
-
packageName="@digigov/ui"
|
|
75
|
-
component="core/Card"
|
|
76
|
-
story="WithClickableLink.tsx"
|
|
77
|
-
/>
|
|
53
|
+
<Story packageName="@digigov/ui" component="core/Card" story="WithClickableLink.tsx" />
|
|
78
54
|
|
|
79
55
|
#### Card with clickable content
|
|
80
56
|
|
|
81
57
|
You can expand the clickable area of the link to fill Card's content.
|
|
82
58
|
|
|
83
|
-
<Story
|
|
84
|
-
packageName="@digigov/ui"
|
|
85
|
-
component="core/Card"
|
|
86
|
-
story="WithClickableContent.tsx"
|
|
87
|
-
/>
|
|
59
|
+
<Story packageName="@digigov/ui" component="core/Card" story="WithClickableContent.tsx" />
|
|
88
60
|
|
|
89
61
|
Cards also provides styles for actionable elements such as Buttons or Links.
|
|
90
62
|
|
|
@@ -11,57 +11,33 @@ import Checkbox from '@digigov/ui/core/Checkbox';
|
|
|
11
11
|
|
|
12
12
|
## How to use
|
|
13
13
|
|
|
14
|
-
<Story
|
|
15
|
-
packageName="@digigov/ui"
|
|
16
|
-
component="core/Checkbox"
|
|
17
|
-
story="Default.tsx"
|
|
18
|
-
/>
|
|
14
|
+
<Story packageName="@digigov/ui" component="core/Checkbox" story="Default.tsx" />
|
|
19
15
|
|
|
20
16
|
### If you’re asking more than one question on the page
|
|
21
17
|
|
|
22
|
-
<Story
|
|
23
|
-
packageName="@digigov/ui"
|
|
24
|
-
component="core/Checkbox"
|
|
25
|
-
story="MultipleQuestions.tsx"
|
|
26
|
-
/>
|
|
18
|
+
<Story packageName="@digigov/ui" component="core/Checkbox" story="MultipleQuestions.tsx" />
|
|
27
19
|
|
|
28
20
|
### Checkbox items with hints
|
|
29
21
|
|
|
30
22
|
You can add hints to checkbox items to provide additional information about the options.
|
|
31
23
|
|
|
32
|
-
<Story
|
|
33
|
-
packageName="@digigov/ui"
|
|
34
|
-
component="core/Checkbox"
|
|
35
|
-
story="WithHint.tsx"
|
|
36
|
-
/>
|
|
24
|
+
<Story packageName="@digigov/ui" component="core/Checkbox" story="WithHint.tsx" />
|
|
37
25
|
|
|
38
26
|
### Add an option for ‘none’
|
|
39
27
|
|
|
40
28
|
When ‘none’ would be a valid answer, give users the option to check a box to say none of the other options apply to them — without this option, users would have to leave all of the boxes unchecked. Giving users this option also makes sure they do not skip the question by accident.
|
|
41
29
|
|
|
42
|
-
<Story
|
|
43
|
-
packageName="@digigov/ui"
|
|
44
|
-
component="core/Checkbox"
|
|
45
|
-
story="NoneAnswer.tsx"
|
|
46
|
-
/>
|
|
30
|
+
<Story packageName="@digigov/ui" component="core/Checkbox" story="NoneAnswer.tsx" />
|
|
47
31
|
|
|
48
32
|
If JavaScript is unavailable, and a user selects both the ‘none’ checkbox and another checkbox, display an error message.
|
|
49
33
|
|
|
50
|
-
<Story
|
|
51
|
-
packageName="@digigov/ui"
|
|
52
|
-
component="core/Checkbox"
|
|
53
|
-
story="NoneAnswerWithError.tsx"
|
|
54
|
-
/>
|
|
34
|
+
<Story packageName="@digigov/ui" component="core/Checkbox" story="NoneAnswerWithError.tsx" />
|
|
55
35
|
|
|
56
36
|
### Error messages
|
|
57
37
|
|
|
58
38
|
Error messages should be styled like this:
|
|
59
39
|
|
|
60
|
-
<Story
|
|
61
|
-
packageName="@digigov/ui"
|
|
62
|
-
component="core/Checkbox"
|
|
63
|
-
story="WithErrorMessage.tsx"
|
|
64
|
-
/>
|
|
40
|
+
<Story packageName="@digigov/ui" component="core/Checkbox" story="WithErrorMessage.tsx" />
|
|
65
41
|
|
|
66
42
|
## Conditionally revealing a related question
|
|
67
43
|
|
|
@@ -11,34 +11,18 @@ import DateInputContainer from '@digigov/ui/core/DateInputContainer';
|
|
|
11
11
|
|
|
12
12
|
## How to use
|
|
13
13
|
|
|
14
|
-
<Story
|
|
15
|
-
packageName="@digigov/ui"
|
|
16
|
-
component="core/DateInputContainer"
|
|
17
|
-
story="Default.tsx"
|
|
18
|
-
/>
|
|
14
|
+
<Story packageName="@digigov/ui" component="core/DateInputContainer" story="Default.tsx" />
|
|
19
15
|
|
|
20
16
|
### If you’re asking more than one question on the page
|
|
21
17
|
|
|
22
|
-
<Story
|
|
23
|
-
packageName="@digigov/ui"
|
|
24
|
-
component="core/DateInputContainer"
|
|
25
|
-
story="MultipleQuestions.tsx"
|
|
26
|
-
/>
|
|
18
|
+
<Story packageName="@digigov/ui" component="core/DateInputContainer" story="MultipleQuestions.tsx" />
|
|
27
19
|
|
|
28
20
|
### Error message
|
|
29
21
|
|
|
30
22
|
If you’re highlighting the whole date, style all the fields like this:
|
|
31
23
|
|
|
32
|
-
<Story
|
|
33
|
-
packageName="@digigov/ui"
|
|
34
|
-
component="core/DateInputContainer"
|
|
35
|
-
story="WithErrorMessage.tsx"
|
|
36
|
-
/>
|
|
24
|
+
<Story packageName="@digigov/ui" component="core/DateInputContainer" story="WithErrorMessage.tsx" />
|
|
37
25
|
|
|
38
26
|
If you’re highlighting just one field - either the day, month or year - only style the field that has an error. The error message must say which field has an error, like this:
|
|
39
27
|
|
|
40
|
-
<Story
|
|
41
|
-
packageName="@digigov/ui"
|
|
42
|
-
component="core/DateInputContainer"
|
|
43
|
-
story="WithErrorMessageForSingleField.tsx"
|
|
44
|
-
/>
|
|
28
|
+
<Story packageName="@digigov/ui" component="core/DateInputContainer" story="WithErrorMessageForSingleField.tsx" />
|
|
@@ -15,11 +15,7 @@ import ErrorSummary from '@digigov/ui/core/ErrorSummary';
|
|
|
15
15
|
|
|
16
16
|
## How to use
|
|
17
17
|
|
|
18
|
-
<Story
|
|
19
|
-
packageName="@digigov/ui"
|
|
20
|
-
component="core/ErrorSummary"
|
|
21
|
-
story="Default.tsx"
|
|
22
|
-
/>
|
|
18
|
+
<Story packageName="@digigov/ui" component="core/ErrorSummary" story="Default.tsx" />
|
|
23
19
|
|
|
24
20
|
### Linking from the error summary to each answer
|
|
25
21
|
|
|
@@ -27,21 +23,13 @@ You must link the errors in the error summary to the answer they relate to.
|
|
|
27
23
|
|
|
28
24
|
For questions that require a user to answer using a single field, like a file upload, select, textarea, text input or character count, link to the field.
|
|
29
25
|
|
|
30
|
-
<Story
|
|
31
|
-
packageName="@digigov/ui"
|
|
32
|
-
component="core/ErrorSummary"
|
|
33
|
-
story="LinkedToInput.tsx"
|
|
34
|
-
/>
|
|
26
|
+
<Story packageName="@digigov/ui" component="core/ErrorSummary" story="LinkedToInput.tsx" />
|
|
35
27
|
|
|
36
28
|
When a user has to enter their answer into multiple fields, such as the day, month and year fields in the date input component, link to the first field that contains an error.
|
|
37
29
|
|
|
38
30
|
If you do not know which field contains an error, link to the first field.
|
|
39
31
|
|
|
40
|
-
<Story
|
|
41
|
-
packageName="@digigov/ui"
|
|
42
|
-
component="core/ErrorSummary"
|
|
43
|
-
story="LinkedToField.tsx"
|
|
44
|
-
/>
|
|
32
|
+
<Story packageName="@digigov/ui" component="core/ErrorSummary" story="LinkedToField.tsx" />
|
|
45
33
|
|
|
46
34
|
For questions that require a user to select one or more options from a list using radios or checkboxes, link to the first radio or checkbox.
|
|
47
35
|
|
|
@@ -11,11 +11,7 @@ import FileUpload from '@digigov/ui/core/FileUpload';
|
|
|
11
11
|
|
|
12
12
|
## How to use
|
|
13
13
|
|
|
14
|
-
<Story
|
|
15
|
-
packageName="@digigov/ui"
|
|
16
|
-
component="core/FileUpload"
|
|
17
|
-
story="Default.tsx"
|
|
18
|
-
/>
|
|
14
|
+
<Story packageName="@digigov/ui" component="core/FileUpload" story="Default.tsx" />
|
|
19
15
|
|
|
20
16
|
### Error message
|
|
21
17
|
|
package/core/Link/link.mdx
CHANGED
|
@@ -15,35 +15,19 @@ import Link from '@digigov/ui/core/Link';
|
|
|
15
15
|
|
|
16
16
|
### No Underline
|
|
17
17
|
|
|
18
|
-
<Story
|
|
19
|
-
packageName="@digigov/ui"
|
|
20
|
-
component="core/Link"
|
|
21
|
-
story="NoUnderline.tsx"
|
|
22
|
-
/>
|
|
18
|
+
<Story packageName="@digigov/ui" component="core/Link" story="NoUnderline.tsx" />
|
|
23
19
|
|
|
24
20
|
### Opens in a new tab
|
|
25
21
|
|
|
26
|
-
<Story
|
|
27
|
-
packageName="@digigov/ui"
|
|
28
|
-
component="core/Link"
|
|
29
|
-
story="OpensInNewTab.tsx"
|
|
30
|
-
/>
|
|
22
|
+
<Story packageName="@digigov/ui" component="core/Link" story="OpensInNewTab.tsx" />
|
|
31
23
|
|
|
32
24
|
### At dark background
|
|
33
25
|
|
|
34
|
-
<Story
|
|
35
|
-
packageName="@digigov/ui"
|
|
36
|
-
component="core/Link"
|
|
37
|
-
story="DarkBackground.tsx"
|
|
38
|
-
/>
|
|
26
|
+
<Story packageName="@digigov/ui" component="core/Link" story="DarkBackground.tsx" />
|
|
39
27
|
|
|
40
28
|
### At dark background and no underline
|
|
41
29
|
|
|
42
|
-
<Story
|
|
43
|
-
packageName="@digigov/ui"
|
|
44
|
-
component="core/Link"
|
|
45
|
-
story="DarkBackgroundNoUnderline.tsx"
|
|
46
|
-
/>
|
|
30
|
+
<Story packageName="@digigov/ui" component="core/Link" story="DarkBackgroundNoUnderline.tsx" />
|
|
47
31
|
|
|
48
32
|
You can read more about the accessibility patterns used in our Link
|
|
49
33
|
implementation in the ARIA Authoring Practices Guide (APG) at
|
package/core/List/index.mdx
CHANGED
|
@@ -19,11 +19,7 @@ import List from '@digigov/ui/core/List';
|
|
|
19
19
|
|
|
20
20
|
### List with numbers
|
|
21
21
|
|
|
22
|
-
<Story
|
|
23
|
-
packageName="@digigov/ui"
|
|
24
|
-
component="core/List"
|
|
25
|
-
story="NumberedList.tsx"
|
|
26
|
-
/>
|
|
22
|
+
<Story packageName="@digigov/ui" component="core/List" story="NumberedList.tsx" />
|
|
27
23
|
|
|
28
24
|
### List with extra space
|
|
29
25
|
|
package/core/NavList/index.mdx
CHANGED
|
@@ -15,11 +15,7 @@ import NavList, { NavListItem } from '@digigov/ui/core/NavList';
|
|
|
15
15
|
|
|
16
16
|
### Horizontal NavList
|
|
17
17
|
|
|
18
|
-
<Story
|
|
19
|
-
packageName="@digigov/ui"
|
|
20
|
-
component="core/NavList"
|
|
21
|
-
story="NavHorizontalLayout.tsx"
|
|
22
|
-
/>
|
|
18
|
+
<Story packageName="@digigov/ui" component="core/NavList" story="NavVerticalLayout.tsx" />
|
|
23
19
|
|
|
24
20
|
## Accessibility
|
|
25
21
|
|
|
@@ -19,11 +19,7 @@ Use a ‘neutral’ blue notification banner if the user needs to know about a p
|
|
|
19
19
|
|
|
20
20
|
Use a ‘neutral’ notification banner if the user needs to know about something that’s happening elsewhere in the service.
|
|
21
21
|
|
|
22
|
-
<Story
|
|
23
|
-
packageName="@digigov/ui"
|
|
24
|
-
component="core/NotificationBanner"
|
|
25
|
-
story="Default.tsx"
|
|
26
|
-
/>
|
|
22
|
+
<Story packageName="@digigov/ui" component="core/NotificationBanner" story="Default.tsx" />
|
|
27
23
|
|
|
28
24
|
You can also use a notification banner to tell the user about the outcome of something they’ve just done - but they have not finished using the service, so it does not make sense to use a confirmation page.
|
|
29
25
|
|
|
@@ -15,10 +15,7 @@ import PhaseBanner from '@digigov/ui/core/PhaseBanner';
|
|
|
15
15
|
|
|
16
16
|
Your banner must be directly under the blue GOV.GR header and colour bar.
|
|
17
17
|
|
|
18
|
-
<Story
|
|
19
|
-
packageName="@digigov/ui"
|
|
20
|
-
component="core/PhaseBanner"
|
|
21
|
-
story="Default.tsx"
|
|
18
|
+
<Story packageName="@digigov/ui" component="core/PhaseBanner" story="Default.tsx"
|
|
22
19
|
/>
|
|
23
20
|
|
|
24
21
|
### Underlined
|