@digigov/react-core 0.27.0-03965c75 → 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/AccordionSectionSummary/index.d.ts +1 -17
- package/AccordionSectionSummary/index.js +3 -6
- 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/es/Accordion/index.js +6 -3
- package/es/AccordionSectionSummary/index.js +3 -6
- package/es/Heading/index.js +3 -2
- package/es/Hint/index.js +3 -2
- package/esm/Accordion/index.js +6 -3
- package/esm/AccordionSectionSummary/index.js +3 -6
- package/esm/Heading/index.js +3 -2
- package/esm/Hint/index.js +3 -2
- package/esm/index.js +1 -1
- package/package.json +2 -2
- package/src/Accordion/index.tsx +21 -2
- package/src/AccordionSectionSummary/index.tsx +2 -21
- package/src/Heading/index.tsx +7 -1
- package/src/Hint/index.tsx +7 -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
|
|
|
@@ -1,25 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BaseProps } from '@digigov/react-core/Base';
|
|
3
3
|
export interface AccordionSectionSummaryProps extends BaseProps<'summary'> {
|
|
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;
|
|
20
4
|
}
|
|
21
5
|
/**
|
|
22
6
|
* AccordionSectionSummary is used as a wrapper component for AccordionSectionSummaryHeading.
|
|
23
7
|
*/
|
|
24
|
-
export declare const AccordionSectionSummary: React.ForwardRefExoticComponent<Pick<AccordionSectionSummaryProps, "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"
|
|
8
|
+
export declare const AccordionSectionSummary: React.ForwardRefExoticComponent<Pick<AccordionSectionSummaryProps, "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
9
|
export default AccordionSectionSummary;
|
|
@@ -17,22 +17,19 @@ var _Base = _interopRequireDefault(require("@digigov/react-core/Base"));
|
|
|
17
17
|
|
|
18
18
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
19
19
|
|
|
20
|
-
var _excluded = ["
|
|
20
|
+
var _excluded = ["className", "children"];
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* AccordionSectionSummary is used as a wrapper component for AccordionSectionSummaryHeading.
|
|
24
24
|
*/
|
|
25
25
|
var AccordionSectionSummary = /*#__PURE__*/_react["default"].forwardRef(function AccordionSectionSummary(_ref, ref) {
|
|
26
|
-
var
|
|
27
|
-
color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
28
|
-
dense = _ref.dense,
|
|
29
|
-
className = _ref.className,
|
|
26
|
+
var className = _ref.className,
|
|
30
27
|
children = _ref.children,
|
|
31
28
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
32
29
|
return /*#__PURE__*/_react["default"].createElement(_Base["default"], (0, _extends2["default"])({
|
|
33
30
|
as: "summary",
|
|
34
31
|
ref: ref,
|
|
35
|
-
className: (0, _clsx["default"])(className,
|
|
32
|
+
className: (0, _clsx["default"])(className, true && 'govgr-accordion__section-summary'),
|
|
36
33
|
role: "heading"
|
|
37
34
|
}, props), children);
|
|
38
35
|
});
|
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
|
|
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;
|
|
@@ -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 = ["
|
|
3
|
+
var _excluded = ["className", "children"];
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import Base from '@digigov/react-core/Base';
|
|
6
6
|
import clsx from 'clsx';
|
|
@@ -9,17 +9,14 @@ import clsx from 'clsx';
|
|
|
9
9
|
* AccordionSectionSummary is used as a wrapper component for AccordionSectionSummaryHeading.
|
|
10
10
|
*/
|
|
11
11
|
export var AccordionSectionSummary = /*#__PURE__*/React.forwardRef(function AccordionSectionSummary(_ref, ref) {
|
|
12
|
-
var
|
|
13
|
-
color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
14
|
-
dense = _ref.dense,
|
|
15
|
-
className = _ref.className,
|
|
12
|
+
var className = _ref.className,
|
|
16
13
|
children = _ref.children,
|
|
17
14
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
18
15
|
|
|
19
16
|
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
20
17
|
as: "summary",
|
|
21
18
|
ref: ref,
|
|
22
|
-
className: clsx(className,
|
|
19
|
+
className: clsx(className, true && 'govgr-accordion__section-summary'),
|
|
23
20
|
role: "heading"
|
|
24
21
|
}, props), children);
|
|
25
22
|
});
|
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;
|
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;
|
|
@@ -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 = ["
|
|
3
|
+
var _excluded = ["className", "children"];
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import Base from '@digigov/react-core/Base';
|
|
6
6
|
import clsx from 'clsx';
|
|
@@ -9,17 +9,14 @@ import clsx from 'clsx';
|
|
|
9
9
|
* AccordionSectionSummary is used as a wrapper component for AccordionSectionSummaryHeading.
|
|
10
10
|
*/
|
|
11
11
|
export var AccordionSectionSummary = /*#__PURE__*/React.forwardRef(function AccordionSectionSummary(_ref, ref) {
|
|
12
|
-
var
|
|
13
|
-
color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
14
|
-
dense = _ref.dense,
|
|
15
|
-
className = _ref.className,
|
|
12
|
+
var className = _ref.className,
|
|
16
13
|
children = _ref.children,
|
|
17
14
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
18
15
|
|
|
19
16
|
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
20
17
|
as: "summary",
|
|
21
18
|
ref: ref,
|
|
22
|
-
className: clsx(className,
|
|
19
|
+
className: clsx(className, true && 'govgr-accordion__section-summary'),
|
|
23
20
|
role: "heading"
|
|
24
21
|
}, props), children);
|
|
25
22
|
});
|
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;
|
package/esm/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digigov/react-core",
|
|
3
|
-
"version": "0.27.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.39.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,39 +2,20 @@ 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'> {
|
|
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
|
-
}
|
|
5
|
+
export interface AccordionSectionSummaryProps extends BaseProps<'summary'> { }
|
|
23
6
|
/**
|
|
24
7
|
* AccordionSectionSummary is used as a wrapper component for AccordionSectionSummaryHeading.
|
|
25
8
|
*/
|
|
26
9
|
export const AccordionSectionSummary = React.forwardRef<
|
|
27
10
|
HTMLDivElement,
|
|
28
11
|
AccordionSectionSummaryProps
|
|
29
|
-
>(function AccordionSectionSummary({
|
|
12
|
+
>(function AccordionSectionSummary({ className, children, ...props }, ref) {
|
|
30
13
|
return (
|
|
31
14
|
<Base
|
|
32
15
|
as="summary"
|
|
33
16
|
ref={ref}
|
|
34
17
|
className={clsx(className, {
|
|
35
18
|
'govgr-accordion__section-summary': true,
|
|
36
|
-
'govgr-accordion__section-summary--secondary': color === 'secondary',
|
|
37
|
-
'govgr-accordion__section-summary--dense': dense,
|
|
38
19
|
})}
|
|
39
20
|
role="heading"
|
|
40
21
|
{...props}
|
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
|
>
|