@digigov/react-core 0.26.0 → 0.27.0-0ba3b8b0
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/Accordion/index.d.ts +17 -1
- package/Accordion/index.js +6 -3
- package/Heading/index.d.ts +6 -1
- package/Heading/index.js +3 -2
- package/Hint/index.d.ts +6 -1
- package/Hint/index.js +3 -2
- package/NavVerticalItem/index.d.ts +7 -1
- package/NavVerticalItem/index.js +4 -2
- package/Table/index.d.ts +1 -1
- package/es/Accordion/index.js +6 -3
- package/es/Heading/index.js +3 -2
- package/es/Hint/index.js +3 -2
- package/es/NavVerticalItem/index.js +4 -2
- package/esm/Accordion/index.js +6 -3
- package/esm/Heading/index.js +3 -2
- package/esm/Hint/index.js +3 -2
- package/esm/NavVerticalItem/index.js +4 -2
- package/esm/index.js +1 -1
- package/package.json +2 -2
- package/src/Accordion/index.tsx +21 -2
- package/src/AccordionSectionSummary/index.tsx +1 -1
- package/src/Heading/index.tsx +7 -1
- package/src/Hint/index.tsx +7 -1
- package/src/NavVerticalItem/index.tsx +8 -1
package/Accordion/index.d.ts
CHANGED
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BaseProps } from '@digigov/react-core/Base';
|
|
3
3
|
export interface AccordionProps extends BaseProps<'div'> {
|
|
4
|
+
/**
|
|
5
|
+
* color is optional.
|
|
6
|
+
* 'primary' color gives AccordionSectionSummary the default color.
|
|
7
|
+
* @value primary
|
|
8
|
+
* @value secondary
|
|
9
|
+
* @default primary
|
|
10
|
+
* */
|
|
11
|
+
color?: 'primary' | 'secondary';
|
|
12
|
+
/**
|
|
13
|
+
* dense is optional.
|
|
14
|
+
* If true, AccordionSectionSummary will have a smaller padding.
|
|
15
|
+
* @value true
|
|
16
|
+
* @value false
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
dense?: boolean;
|
|
4
20
|
}
|
|
5
21
|
/**
|
|
6
22
|
* Accordion is the main component for an accordion.
|
|
7
23
|
* Inside this component must be a list of AccordionSection components.
|
|
8
24
|
*/
|
|
9
|
-
export declare const Accordion: React.ForwardRefExoticComponent<Pick<AccordionProps, "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" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden"> & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
export declare const Accordion: React.ForwardRefExoticComponent<Pick<AccordionProps, "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" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "dense"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
26
|
export default Accordion;
|
package/Accordion/index.js
CHANGED
|
@@ -17,20 +17,23 @@ var _Base = _interopRequireDefault(require("@digigov/react-core/Base"));
|
|
|
17
17
|
|
|
18
18
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
19
19
|
|
|
20
|
-
var _excluded = ["className", "children"];
|
|
20
|
+
var _excluded = ["color", "dense", "className", "children"];
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Accordion is the main component for an accordion.
|
|
24
24
|
* Inside this component must be a list of AccordionSection components.
|
|
25
25
|
*/
|
|
26
26
|
var Accordion = /*#__PURE__*/_react["default"].forwardRef(function Accordion(_ref, ref) {
|
|
27
|
-
var
|
|
27
|
+
var _ref$color = _ref.color,
|
|
28
|
+
color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
29
|
+
dense = _ref.dense,
|
|
30
|
+
className = _ref.className,
|
|
28
31
|
children = _ref.children,
|
|
29
32
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
30
33
|
return /*#__PURE__*/_react["default"].createElement(_Base["default"], (0, _extends2["default"])({
|
|
31
34
|
as: "div",
|
|
32
35
|
ref: ref,
|
|
33
|
-
className: (0, _clsx["default"])(className, true && 'govgr-accordion')
|
|
36
|
+
className: (0, _clsx["default"])(className, color === 'secondary' && 'govgr-accordion--secondary', dense && 'govgr-accordion--dense', true && 'govgr-accordion')
|
|
34
37
|
}, props), children);
|
|
35
38
|
});
|
|
36
39
|
|
package/Heading/index.d.ts
CHANGED
|
@@ -11,11 +11,16 @@ export interface HeadingProps extends BaseProps<'h1'> {
|
|
|
11
11
|
* Use 'h1' when this heading is the main page title.
|
|
12
12
|
*/
|
|
13
13
|
element?: HeadingHTMLElements;
|
|
14
|
+
/**
|
|
15
|
+
* breakWords is optional. false is the default value.
|
|
16
|
+
* Use true when you want to break words.
|
|
17
|
+
*/
|
|
18
|
+
breakWords?: boolean;
|
|
14
19
|
}
|
|
15
20
|
export declare type HeadingHTMLElements = 'h1' | 'h2' | 'h3' | 'h4';
|
|
16
21
|
/**
|
|
17
22
|
* Heading component is used to place a title in a the page.
|
|
18
23
|
* Heading component must be wraped inside Main component.
|
|
19
24
|
*/
|
|
20
|
-
export declare const Heading: React.ForwardRefExoticComponent<Pick<HeadingProps, "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" | "size" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "element"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
25
|
+
export declare const Heading: React.ForwardRefExoticComponent<Pick<HeadingProps, "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" | "size" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "element" | "breakWords"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
21
26
|
export default Heading;
|
package/Heading/index.js
CHANGED
|
@@ -17,7 +17,7 @@ var _Base = _interopRequireDefault(require("@digigov/react-core/Base"));
|
|
|
17
17
|
|
|
18
18
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
19
19
|
|
|
20
|
-
var _excluded = ["size", "element", "className", "children"];
|
|
20
|
+
var _excluded = ["size", "element", "breakWords", "className", "children"];
|
|
21
21
|
|
|
22
22
|
var getComponentBySize = function getComponentBySize(size) {
|
|
23
23
|
switch (size) {
|
|
@@ -47,6 +47,7 @@ var Heading = /*#__PURE__*/_react["default"].forwardRef(function Heading(_ref, r
|
|
|
47
47
|
var _ref$size = _ref.size,
|
|
48
48
|
size = _ref$size === void 0 ? 'xl' : _ref$size,
|
|
49
49
|
element = _ref.element,
|
|
50
|
+
breakWords = _ref.breakWords,
|
|
50
51
|
className = _ref.className,
|
|
51
52
|
children = _ref.children,
|
|
52
53
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
@@ -54,7 +55,7 @@ var Heading = /*#__PURE__*/_react["default"].forwardRef(function Heading(_ref, r
|
|
|
54
55
|
return /*#__PURE__*/_react["default"].createElement(_Base["default"], (0, _extends2["default"])({
|
|
55
56
|
as: Component,
|
|
56
57
|
ref: ref,
|
|
57
|
-
className: (0, _clsx["default"])(className, size === 'xl' && 'govgr-heading-xl', size === 'l' && 'govgr-heading-l', size === 'm' && 'govgr-heading-m', size === 's' && 'govgr-heading-s')
|
|
58
|
+
className: (0, _clsx["default"])(className, size === 'xl' && 'govgr-heading-xl', size === 'l' && 'govgr-heading-l', size === 'm' && 'govgr-heading-m', size === 's' && 'govgr-heading-s', breakWords && 'govgr-heading--break-words')
|
|
58
59
|
}, props), children);
|
|
59
60
|
});
|
|
60
61
|
|
package/Hint/index.d.ts
CHANGED
|
@@ -6,9 +6,14 @@ export interface HintProps extends BaseProps<'p'> {
|
|
|
6
6
|
* You can add this fontSize override prop in order to change the font size.
|
|
7
7
|
*/
|
|
8
8
|
fontSize?: '14' | '16' | '24';
|
|
9
|
+
/**
|
|
10
|
+
* breakWords is optional. false is the default value.
|
|
11
|
+
* Use true when you want to break words.
|
|
12
|
+
*/
|
|
13
|
+
breakWords?: boolean;
|
|
9
14
|
}
|
|
10
15
|
/**
|
|
11
16
|
* Hint component can be used in form pages and it gives an extra hint description to the form.
|
|
12
17
|
*/
|
|
13
|
-
export declare const Hint: React.ForwardRefExoticComponent<Pick<HintProps, "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "fontSize" | "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" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
18
|
+
export declare const Hint: React.ForwardRefExoticComponent<Pick<HintProps, "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "fontSize" | "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" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "breakWords"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
14
19
|
export default Hint;
|
package/Hint/index.js
CHANGED
|
@@ -17,7 +17,7 @@ var _Base = _interopRequireDefault(require("@digigov/react-core/Base"));
|
|
|
17
17
|
|
|
18
18
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
19
19
|
|
|
20
|
-
var _excluded = ["fontSize", "className", "children"];
|
|
20
|
+
var _excluded = ["fontSize", "className", "breakWords", "children"];
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Hint component can be used in form pages and it gives an extra hint description to the form.
|
|
@@ -25,12 +25,13 @@ var _excluded = ["fontSize", "className", "children"];
|
|
|
25
25
|
var Hint = /*#__PURE__*/_react["default"].forwardRef(function Hint(_ref, ref) {
|
|
26
26
|
var fontSize = _ref.fontSize,
|
|
27
27
|
className = _ref.className,
|
|
28
|
+
breakWords = _ref.breakWords,
|
|
28
29
|
children = _ref.children,
|
|
29
30
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
30
31
|
return /*#__PURE__*/_react["default"].createElement(_Base["default"], (0, _extends2["default"])({
|
|
31
32
|
as: "p",
|
|
32
33
|
ref: ref,
|
|
33
|
-
className: (0, _clsx["default"])(className, fontSize === '14' && 'govgr-!-font-size-14', fontSize === '16' && 'govgr-!-font-size-16', fontSize === '24' && 'govgr-!-font-size-24', true && 'govgr-hint')
|
|
34
|
+
className: (0, _clsx["default"])(className, fontSize === '14' && 'govgr-!-font-size-14', fontSize === '16' && 'govgr-!-font-size-16', fontSize === '24' && 'govgr-!-font-size-24', breakWords && 'govgr-hint--break-words', true && 'govgr-hint')
|
|
34
35
|
}, props), children);
|
|
35
36
|
});
|
|
36
37
|
|
|
@@ -6,9 +6,15 @@ export interface NavVerticalItemProps extends BaseProps<'a'> {
|
|
|
6
6
|
* When the NavVerticalItem is active, that means that we are in this option / title / page of the NavVertical.
|
|
7
7
|
*/
|
|
8
8
|
active?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* variant is optional.
|
|
11
|
+
* When variant is spaced, the NavVerticalItem has more padding.
|
|
12
|
+
* When variant is dense, the NavVerticalItem has less padding.
|
|
13
|
+
*/
|
|
14
|
+
variant?: 'spaced' | 'dense';
|
|
9
15
|
}
|
|
10
16
|
/**
|
|
11
17
|
* NavVerticalItem is an <a> element. It should be inside the NavVertical component.
|
|
12
18
|
*/
|
|
13
|
-
export declare const NavVerticalItem: React.ForwardRefExoticComponent<Pick<NavVerticalItemProps, "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "media" | "target" | "type" | "role" | "tabIndex" | "href" | "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" | "download" | "hrefLang" | "ping" | "rel" | "referrerPolicy" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "active"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
19
|
+
export declare const NavVerticalItem: React.ForwardRefExoticComponent<Pick<NavVerticalItemProps, "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "media" | "target" | "type" | "role" | "tabIndex" | "href" | "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" | "download" | "hrefLang" | "ping" | "rel" | "referrerPolicy" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "variant" | "active"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
14
20
|
export default NavVerticalItem;
|
package/NavVerticalItem/index.js
CHANGED
|
@@ -17,20 +17,22 @@ var _Base = _interopRequireDefault(require("@digigov/react-core/Base"));
|
|
|
17
17
|
|
|
18
18
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
19
19
|
|
|
20
|
-
var _excluded = ["active", "className", "children"];
|
|
20
|
+
var _excluded = ["active", "variant", "className", "children"];
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* NavVerticalItem is an <a> element. It should be inside the NavVertical component.
|
|
24
24
|
*/
|
|
25
25
|
var NavVerticalItem = /*#__PURE__*/_react["default"].forwardRef(function NavVerticalItem(_ref, ref) {
|
|
26
26
|
var active = _ref.active,
|
|
27
|
+
_ref$variant = _ref.variant,
|
|
28
|
+
variant = _ref$variant === void 0 ? 'spaced' : _ref$variant,
|
|
27
29
|
className = _ref.className,
|
|
28
30
|
children = _ref.children,
|
|
29
31
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
30
32
|
return /*#__PURE__*/_react["default"].createElement(_Base["default"], (0, _extends2["default"])({
|
|
31
33
|
as: "a",
|
|
32
34
|
ref: ref,
|
|
33
|
-
className: (0, _clsx["default"])(className, active === true && 'govgr-vertical-nav__item--active', true && ['govgr-link', 'govgr-vertical-nav__item'])
|
|
35
|
+
className: (0, _clsx["default"])(className, variant === 'spaced' && 'govgr-vertical-nav__item--spaced', active === true && 'govgr-vertical-nav__item--active', true && ['govgr-link', 'govgr-vertical-nav__item'])
|
|
34
36
|
}, props), children);
|
|
35
37
|
});
|
|
36
38
|
|
package/Table/index.d.ts
CHANGED
|
@@ -36,5 +36,5 @@ export interface TableProps extends BaseProps<'table'> {
|
|
|
36
36
|
/**
|
|
37
37
|
* Table component is used to wrap the sub components of a table
|
|
38
38
|
*/
|
|
39
|
-
export declare const Table: React.ForwardRefExoticComponent<Pick<TableProps, "slot" | "style" | "summary" | "title" | "as" | "className" | "color" | "id" | "lang" | "width" | "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" | "cellPadding" | "cellSpacing" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "variant" | "
|
|
39
|
+
export declare const Table: React.ForwardRefExoticComponent<Pick<TableProps, "slot" | "style" | "summary" | "title" | "as" | "className" | "color" | "id" | "lang" | "width" | "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" | "cellPadding" | "cellSpacing" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "variant" | "dense" | "zebra" | "verticalBorders" | "stacked"> & React.RefAttributes<HTMLTableElement>>;
|
|
40
40
|
export default Table;
|
package/es/Accordion/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["className", "children"];
|
|
3
|
+
var _excluded = ["color", "dense", "className", "children"];
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import Base from '@digigov/react-core/Base';
|
|
6
6
|
import clsx from 'clsx';
|
|
@@ -10,14 +10,17 @@ import clsx from 'clsx';
|
|
|
10
10
|
* Inside this component must be a list of AccordionSection components.
|
|
11
11
|
*/
|
|
12
12
|
export var Accordion = /*#__PURE__*/React.forwardRef(function Accordion(_ref, ref) {
|
|
13
|
-
var
|
|
13
|
+
var _ref$color = _ref.color,
|
|
14
|
+
color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
15
|
+
dense = _ref.dense,
|
|
16
|
+
className = _ref.className,
|
|
14
17
|
children = _ref.children,
|
|
15
18
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
16
19
|
|
|
17
20
|
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
18
21
|
as: "div",
|
|
19
22
|
ref: ref,
|
|
20
|
-
className: clsx(className, true && 'govgr-accordion')
|
|
23
|
+
className: clsx(className, color === 'secondary' && 'govgr-accordion--secondary', dense && 'govgr-accordion--dense', true && 'govgr-accordion')
|
|
21
24
|
}, props), children);
|
|
22
25
|
});
|
|
23
26
|
export default Accordion;
|
package/es/Heading/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["size", "element", "className", "children"];
|
|
3
|
+
var _excluded = ["size", "element", "breakWords", "className", "children"];
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import Base from '@digigov/react-core/Base';
|
|
6
6
|
import clsx from 'clsx';
|
|
@@ -33,6 +33,7 @@ export var Heading = /*#__PURE__*/React.forwardRef(function Heading(_ref, ref) {
|
|
|
33
33
|
var _ref$size = _ref.size,
|
|
34
34
|
size = _ref$size === void 0 ? 'xl' : _ref$size,
|
|
35
35
|
element = _ref.element,
|
|
36
|
+
breakWords = _ref.breakWords,
|
|
36
37
|
className = _ref.className,
|
|
37
38
|
children = _ref.children,
|
|
38
39
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -41,7 +42,7 @@ export var Heading = /*#__PURE__*/React.forwardRef(function Heading(_ref, ref) {
|
|
|
41
42
|
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
42
43
|
as: Component,
|
|
43
44
|
ref: ref,
|
|
44
|
-
className: clsx(className, size === 'xl' && 'govgr-heading-xl', size === 'l' && 'govgr-heading-l', size === 'm' && 'govgr-heading-m', size === 's' && 'govgr-heading-s')
|
|
45
|
+
className: clsx(className, size === 'xl' && 'govgr-heading-xl', size === 'l' && 'govgr-heading-l', size === 'm' && 'govgr-heading-m', size === 's' && 'govgr-heading-s', breakWords && 'govgr-heading--break-words')
|
|
45
46
|
}, props), children);
|
|
46
47
|
});
|
|
47
48
|
export default Heading;
|
package/es/Hint/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["fontSize", "className", "children"];
|
|
3
|
+
var _excluded = ["fontSize", "className", "breakWords", "children"];
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import Base from '@digigov/react-core/Base';
|
|
6
6
|
import clsx from 'clsx';
|
|
@@ -11,13 +11,14 @@ import clsx from 'clsx';
|
|
|
11
11
|
export var Hint = /*#__PURE__*/React.forwardRef(function Hint(_ref, ref) {
|
|
12
12
|
var fontSize = _ref.fontSize,
|
|
13
13
|
className = _ref.className,
|
|
14
|
+
breakWords = _ref.breakWords,
|
|
14
15
|
children = _ref.children,
|
|
15
16
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
16
17
|
|
|
17
18
|
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
18
19
|
as: "p",
|
|
19
20
|
ref: ref,
|
|
20
|
-
className: clsx(className, fontSize === '14' && 'govgr-!-font-size-14', fontSize === '16' && 'govgr-!-font-size-16', fontSize === '24' && 'govgr-!-font-size-24', true && 'govgr-hint')
|
|
21
|
+
className: clsx(className, fontSize === '14' && 'govgr-!-font-size-14', fontSize === '16' && 'govgr-!-font-size-16', fontSize === '24' && 'govgr-!-font-size-24', breakWords && 'govgr-hint--break-words', true && 'govgr-hint')
|
|
21
22
|
}, props), children);
|
|
22
23
|
});
|
|
23
24
|
export default Hint;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["active", "className", "children"];
|
|
3
|
+
var _excluded = ["active", "variant", "className", "children"];
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import Base from '@digigov/react-core/Base';
|
|
6
6
|
import clsx from 'clsx';
|
|
@@ -10,6 +10,8 @@ import clsx from 'clsx';
|
|
|
10
10
|
*/
|
|
11
11
|
export var NavVerticalItem = /*#__PURE__*/React.forwardRef(function NavVerticalItem(_ref, ref) {
|
|
12
12
|
var active = _ref.active,
|
|
13
|
+
_ref$variant = _ref.variant,
|
|
14
|
+
variant = _ref$variant === void 0 ? 'spaced' : _ref$variant,
|
|
13
15
|
className = _ref.className,
|
|
14
16
|
children = _ref.children,
|
|
15
17
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -17,7 +19,7 @@ export var NavVerticalItem = /*#__PURE__*/React.forwardRef(function NavVerticalI
|
|
|
17
19
|
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
18
20
|
as: "a",
|
|
19
21
|
ref: ref,
|
|
20
|
-
className: clsx(className, active === true && 'govgr-vertical-nav__item--active', true && ['govgr-link', 'govgr-vertical-nav__item'])
|
|
22
|
+
className: clsx(className, variant === 'spaced' && 'govgr-vertical-nav__item--spaced', active === true && 'govgr-vertical-nav__item--active', true && ['govgr-link', 'govgr-vertical-nav__item'])
|
|
21
23
|
}, props), children);
|
|
22
24
|
});
|
|
23
25
|
export default NavVerticalItem;
|
package/esm/Accordion/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["className", "children"];
|
|
3
|
+
var _excluded = ["color", "dense", "className", "children"];
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import Base from '@digigov/react-core/Base';
|
|
6
6
|
import clsx from 'clsx';
|
|
@@ -10,14 +10,17 @@ import clsx from 'clsx';
|
|
|
10
10
|
* Inside this component must be a list of AccordionSection components.
|
|
11
11
|
*/
|
|
12
12
|
export var Accordion = /*#__PURE__*/React.forwardRef(function Accordion(_ref, ref) {
|
|
13
|
-
var
|
|
13
|
+
var _ref$color = _ref.color,
|
|
14
|
+
color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
15
|
+
dense = _ref.dense,
|
|
16
|
+
className = _ref.className,
|
|
14
17
|
children = _ref.children,
|
|
15
18
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
16
19
|
|
|
17
20
|
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
18
21
|
as: "div",
|
|
19
22
|
ref: ref,
|
|
20
|
-
className: clsx(className, true && 'govgr-accordion')
|
|
23
|
+
className: clsx(className, color === 'secondary' && 'govgr-accordion--secondary', dense && 'govgr-accordion--dense', true && 'govgr-accordion')
|
|
21
24
|
}, props), children);
|
|
22
25
|
});
|
|
23
26
|
export default Accordion;
|
package/esm/Heading/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["size", "element", "className", "children"];
|
|
3
|
+
var _excluded = ["size", "element", "breakWords", "className", "children"];
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import Base from '@digigov/react-core/Base';
|
|
6
6
|
import clsx from 'clsx';
|
|
@@ -33,6 +33,7 @@ export var Heading = /*#__PURE__*/React.forwardRef(function Heading(_ref, ref) {
|
|
|
33
33
|
var _ref$size = _ref.size,
|
|
34
34
|
size = _ref$size === void 0 ? 'xl' : _ref$size,
|
|
35
35
|
element = _ref.element,
|
|
36
|
+
breakWords = _ref.breakWords,
|
|
36
37
|
className = _ref.className,
|
|
37
38
|
children = _ref.children,
|
|
38
39
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -41,7 +42,7 @@ export var Heading = /*#__PURE__*/React.forwardRef(function Heading(_ref, ref) {
|
|
|
41
42
|
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
42
43
|
as: Component,
|
|
43
44
|
ref: ref,
|
|
44
|
-
className: clsx(className, size === 'xl' && 'govgr-heading-xl', size === 'l' && 'govgr-heading-l', size === 'm' && 'govgr-heading-m', size === 's' && 'govgr-heading-s')
|
|
45
|
+
className: clsx(className, size === 'xl' && 'govgr-heading-xl', size === 'l' && 'govgr-heading-l', size === 'm' && 'govgr-heading-m', size === 's' && 'govgr-heading-s', breakWords && 'govgr-heading--break-words')
|
|
45
46
|
}, props), children);
|
|
46
47
|
});
|
|
47
48
|
export default Heading;
|
package/esm/Hint/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["fontSize", "className", "children"];
|
|
3
|
+
var _excluded = ["fontSize", "className", "breakWords", "children"];
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import Base from '@digigov/react-core/Base';
|
|
6
6
|
import clsx from 'clsx';
|
|
@@ -11,13 +11,14 @@ import clsx from 'clsx';
|
|
|
11
11
|
export var Hint = /*#__PURE__*/React.forwardRef(function Hint(_ref, ref) {
|
|
12
12
|
var fontSize = _ref.fontSize,
|
|
13
13
|
className = _ref.className,
|
|
14
|
+
breakWords = _ref.breakWords,
|
|
14
15
|
children = _ref.children,
|
|
15
16
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
16
17
|
|
|
17
18
|
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
18
19
|
as: "p",
|
|
19
20
|
ref: ref,
|
|
20
|
-
className: clsx(className, fontSize === '14' && 'govgr-!-font-size-14', fontSize === '16' && 'govgr-!-font-size-16', fontSize === '24' && 'govgr-!-font-size-24', true && 'govgr-hint')
|
|
21
|
+
className: clsx(className, fontSize === '14' && 'govgr-!-font-size-14', fontSize === '16' && 'govgr-!-font-size-16', fontSize === '24' && 'govgr-!-font-size-24', breakWords && 'govgr-hint--break-words', true && 'govgr-hint')
|
|
21
22
|
}, props), children);
|
|
22
23
|
});
|
|
23
24
|
export default Hint;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["active", "className", "children"];
|
|
3
|
+
var _excluded = ["active", "variant", "className", "children"];
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import Base from '@digigov/react-core/Base';
|
|
6
6
|
import clsx from 'clsx';
|
|
@@ -10,6 +10,8 @@ import clsx from 'clsx';
|
|
|
10
10
|
*/
|
|
11
11
|
export var NavVerticalItem = /*#__PURE__*/React.forwardRef(function NavVerticalItem(_ref, ref) {
|
|
12
12
|
var active = _ref.active,
|
|
13
|
+
_ref$variant = _ref.variant,
|
|
14
|
+
variant = _ref$variant === void 0 ? 'spaced' : _ref$variant,
|
|
13
15
|
className = _ref.className,
|
|
14
16
|
children = _ref.children,
|
|
15
17
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -17,7 +19,7 @@ export var NavVerticalItem = /*#__PURE__*/React.forwardRef(function NavVerticalI
|
|
|
17
19
|
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
18
20
|
as: "a",
|
|
19
21
|
ref: ref,
|
|
20
|
-
className: clsx(className, active === true && 'govgr-vertical-nav__item--active', true && ['govgr-link', 'govgr-vertical-nav__item'])
|
|
22
|
+
className: clsx(className, variant === 'spaced' && 'govgr-vertical-nav__item--spaced', active === true && 'govgr-vertical-nav__item--active', true && ['govgr-link', 'govgr-vertical-nav__item'])
|
|
21
23
|
}, props), children);
|
|
22
24
|
});
|
|
23
25
|
export default NavVerticalItem;
|
package/esm/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digigov/react-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0-0ba3b8b0",
|
|
4
4
|
"description": "@digigov react core components",
|
|
5
5
|
"author": "GRNET Developers <devs@lists.grnet.gr>",
|
|
6
6
|
"license": "BSD-2-Clause",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"directory": "dist"
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"@digigov/css": "0.
|
|
14
|
+
"@digigov/css": "0.39.0-0ba3b8b0",
|
|
15
15
|
"clsx": "1.1.1",
|
|
16
16
|
"react": "^16.8.0 || ^17.0.0",
|
|
17
17
|
"react-dom": "^16.8.0 || ^17.0.0"
|
package/src/Accordion/index.tsx
CHANGED
|
@@ -2,19 +2,38 @@ import React from 'react';
|
|
|
2
2
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
|
|
5
|
-
export interface AccordionProps extends BaseProps<'div'> {
|
|
5
|
+
export interface AccordionProps extends BaseProps<'div'> {
|
|
6
|
+
/**
|
|
7
|
+
* color is optional.
|
|
8
|
+
* 'primary' color gives AccordionSectionSummary the default color.
|
|
9
|
+
* @value primary
|
|
10
|
+
* @value secondary
|
|
11
|
+
* @default primary
|
|
12
|
+
* */
|
|
13
|
+
color?: 'primary' | 'secondary';
|
|
14
|
+
/**
|
|
15
|
+
* dense is optional.
|
|
16
|
+
* If true, AccordionSectionSummary will have a smaller padding.
|
|
17
|
+
* @value true
|
|
18
|
+
* @value false
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
dense?: boolean;
|
|
22
|
+
}
|
|
6
23
|
/**
|
|
7
24
|
* Accordion is the main component for an accordion.
|
|
8
25
|
* Inside this component must be a list of AccordionSection components.
|
|
9
26
|
*/
|
|
10
27
|
export const Accordion = React.forwardRef<HTMLDivElement, AccordionProps>(
|
|
11
|
-
function Accordion({ className, children, ...props }, ref) {
|
|
28
|
+
function Accordion({ color = 'primary', dense, className, children, ...props }, ref) {
|
|
12
29
|
return (
|
|
13
30
|
<Base
|
|
14
31
|
as="div"
|
|
15
32
|
ref={ref}
|
|
16
33
|
className={clsx(className, {
|
|
17
34
|
'govgr-accordion': true,
|
|
35
|
+
'govgr-accordion--secondary': color === 'secondary',
|
|
36
|
+
'govgr-accordion--dense': dense,
|
|
18
37
|
})}
|
|
19
38
|
{...props}
|
|
20
39
|
>
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
|
|
5
|
-
export interface AccordionSectionSummaryProps extends BaseProps<'summary'> {}
|
|
5
|
+
export interface AccordionSectionSummaryProps extends BaseProps<'summary'> { }
|
|
6
6
|
/**
|
|
7
7
|
* AccordionSectionSummary is used as a wrapper component for AccordionSectionSummaryHeading.
|
|
8
8
|
*/
|
package/src/Heading/index.tsx
CHANGED
|
@@ -13,6 +13,11 @@ export interface HeadingProps extends BaseProps<'h1'> {
|
|
|
13
13
|
* Use 'h1' when this heading is the main page title.
|
|
14
14
|
*/
|
|
15
15
|
element?: HeadingHTMLElements;
|
|
16
|
+
/**
|
|
17
|
+
* breakWords is optional. false is the default value.
|
|
18
|
+
* Use true when you want to break words.
|
|
19
|
+
*/
|
|
20
|
+
breakWords?: boolean;
|
|
16
21
|
}
|
|
17
22
|
export type HeadingHTMLElements = 'h1' | 'h2' | 'h3' | 'h4';
|
|
18
23
|
|
|
@@ -39,7 +44,7 @@ const getComponentBySize = (
|
|
|
39
44
|
*/
|
|
40
45
|
export const Heading = React.forwardRef<HTMLHeadingElement, HeadingProps>(
|
|
41
46
|
function Heading(
|
|
42
|
-
{ size = 'xl', element, className, children, ...props },
|
|
47
|
+
{ size = 'xl', element, breakWords, className, children, ...props },
|
|
43
48
|
ref
|
|
44
49
|
) {
|
|
45
50
|
const Component = element ? element : getComponentBySize(size);
|
|
@@ -52,6 +57,7 @@ export const Heading = React.forwardRef<HTMLHeadingElement, HeadingProps>(
|
|
|
52
57
|
'govgr-heading-l': size === 'l',
|
|
53
58
|
'govgr-heading-m': size === 'm',
|
|
54
59
|
'govgr-heading-s': size === 's',
|
|
60
|
+
'govgr-heading--break-words': breakWords,
|
|
55
61
|
})}
|
|
56
62
|
{...props}
|
|
57
63
|
>
|
package/src/Hint/index.tsx
CHANGED
|
@@ -8,12 +8,17 @@ export interface HintProps extends BaseProps<'p'> {
|
|
|
8
8
|
* You can add this fontSize override prop in order to change the font size.
|
|
9
9
|
*/
|
|
10
10
|
fontSize?: '14' | '16' | '24';
|
|
11
|
+
/**
|
|
12
|
+
* breakWords is optional. false is the default value.
|
|
13
|
+
* Use true when you want to break words.
|
|
14
|
+
*/
|
|
15
|
+
breakWords?: boolean;
|
|
11
16
|
}
|
|
12
17
|
/**
|
|
13
18
|
* Hint component can be used in form pages and it gives an extra hint description to the form.
|
|
14
19
|
*/
|
|
15
20
|
export const Hint = React.forwardRef<HTMLParagraphElement, HintProps>(
|
|
16
|
-
function Hint({ fontSize, className, children, ...props }, ref) {
|
|
21
|
+
function Hint({ fontSize, className, breakWords, children, ...props }, ref) {
|
|
17
22
|
return (
|
|
18
23
|
<Base
|
|
19
24
|
as="p"
|
|
@@ -23,6 +28,7 @@ export const Hint = React.forwardRef<HTMLParagraphElement, HintProps>(
|
|
|
23
28
|
'govgr-!-font-size-14': fontSize === '14',
|
|
24
29
|
'govgr-!-font-size-16': fontSize === '16',
|
|
25
30
|
'govgr-!-font-size-24': fontSize === '24',
|
|
31
|
+
'govgr-hint--break-words': breakWords,
|
|
26
32
|
})}
|
|
27
33
|
{...props}
|
|
28
34
|
>
|
|
@@ -8,6 +8,12 @@ export interface NavVerticalItemProps extends BaseProps<'a'> {
|
|
|
8
8
|
* When the NavVerticalItem is active, that means that we are in this option / title / page of the NavVertical.
|
|
9
9
|
*/
|
|
10
10
|
active?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* variant is optional.
|
|
13
|
+
* When variant is spaced, the NavVerticalItem has more padding.
|
|
14
|
+
* When variant is dense, the NavVerticalItem has less padding.
|
|
15
|
+
*/
|
|
16
|
+
variant?: 'spaced' | 'dense';
|
|
11
17
|
}
|
|
12
18
|
/**
|
|
13
19
|
* NavVerticalItem is an <a> element. It should be inside the NavVertical component.
|
|
@@ -15,7 +21,7 @@ export interface NavVerticalItemProps extends BaseProps<'a'> {
|
|
|
15
21
|
export const NavVerticalItem = React.forwardRef<
|
|
16
22
|
HTMLAnchorElement,
|
|
17
23
|
NavVerticalItemProps
|
|
18
|
-
>(function NavVerticalItem({ active, className, children, ...props }, ref) {
|
|
24
|
+
>(function NavVerticalItem({ active, variant = 'spaced', className, children, ...props }, ref) {
|
|
19
25
|
return (
|
|
20
26
|
<Base
|
|
21
27
|
as="a"
|
|
@@ -23,6 +29,7 @@ export const NavVerticalItem = React.forwardRef<
|
|
|
23
29
|
className={clsx(className, {
|
|
24
30
|
'govgr-link': true,
|
|
25
31
|
'govgr-vertical-nav__item': true,
|
|
32
|
+
'govgr-vertical-nav__item--spaced': variant === 'spaced',
|
|
26
33
|
'govgr-vertical-nav__item--active': active === true,
|
|
27
34
|
})}
|
|
28
35
|
{...props}
|