@digigov/ui 0.17.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -1
- package/app/CopyToClipboard.d.ts +8 -0
- package/app/CopyToClipboard.js +75 -0
- package/app/PhaseBannerHeader.d.ts +8 -0
- package/app/PhaseBannerHeader.js +30 -0
- package/app/index.d.ts +2 -0
- package/app/index.js +26 -0
- package/core/Accordion/__snapshots__/index.spec.tsx.snap +2 -2
- package/core/Accordion/index.d.ts +4 -2
- package/core/Accordion/index.js +21 -4
- package/core/Card/index.d.ts +2 -0
- package/core/Card/index.js +17 -2
- package/core/ServiceBadge/index.d.ts +0 -1
- package/core/ServiceBadge/index.js +2 -3
- package/core/Table/index.d.ts +1 -0
- package/core/Table/index.js +13 -0
- package/es/app/CopyToClipboard.js +48 -0
- package/es/app/PhaseBannerHeader.js +12 -0
- package/es/app/index.js +3 -1
- package/es/core/Accordion/__snapshots__/index.spec.tsx.snap +2 -2
- package/es/core/Accordion/index.js +10 -3
- package/es/core/Card/index.js +3 -1
- package/es/core/ServiceBadge/index.js +2 -3
- package/es/core/Table/index.js +1 -0
- package/es/layouts/Grid/index.js +2 -1
- package/es/locales/el.js +3 -0
- package/es/locales/en.js +3 -0
- package/esm/app/CopyToClipboard.js +48 -0
- package/esm/app/PhaseBannerHeader.js +12 -0
- package/esm/app/index.js +3 -1
- package/esm/core/Accordion/__snapshots__/index.spec.tsx.snap +2 -2
- package/esm/core/Accordion/index.js +10 -3
- package/esm/core/Card/index.js +3 -1
- package/esm/core/ServiceBadge/index.js +2 -3
- package/esm/core/Table/index.js +1 -0
- package/esm/index.js +1 -1
- package/esm/layouts/Grid/index.js +2 -1
- package/esm/locales/el.js +3 -0
- package/esm/locales/en.js +3 -0
- package/layouts/Grid/index.d.ts +2 -1
- package/layouts/Grid/index.js +6 -11
- package/locales/el.d.ts +3 -0
- package/locales/el.js +3 -0
- package/locales/en.d.ts +3 -0
- package/locales/en.js +3 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,40 @@
|
|
|
1
1
|
# Change Log - @digigov/ui
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 10 May 2022 14:04:00 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 0.19.0
|
|
6
|
+
Tue, 10 May 2022 14:04:00 GMT
|
|
7
|
+
|
|
8
|
+
### Minor changes
|
|
9
|
+
|
|
10
|
+
- Create TestEnvironmentIndicator
|
|
11
|
+
- Replace TestEnvironmentIndicator with PhaseBannerHeader
|
|
12
|
+
|
|
13
|
+
### Patches
|
|
14
|
+
|
|
15
|
+
- Use PhaseBannerHeaderContainer in PhaseBannerHeader
|
|
16
|
+
- Reexport AccordionSectionSummary and AccordionSectionSummaryHeading
|
|
17
|
+
- Deprecate AccordionSectionHeader
|
|
18
|
+
- Update default exports for Card, Grid
|
|
19
|
+
- Fix PhaseBannerHeader typescript errors
|
|
20
|
+
|
|
21
|
+
## 0.18.0
|
|
22
|
+
Tue, 03 May 2022 10:27:10 GMT
|
|
23
|
+
|
|
24
|
+
### Minor changes
|
|
25
|
+
|
|
26
|
+
- Add CopyToClipboard component
|
|
27
|
+
|
|
28
|
+
### Patches
|
|
29
|
+
|
|
30
|
+
- reexport TableContainer
|
|
31
|
+
|
|
32
|
+
## 0.17.1
|
|
33
|
+
Wed, 20 Apr 2022 12:11:46 GMT
|
|
34
|
+
|
|
35
|
+
### Patches
|
|
36
|
+
|
|
37
|
+
- fix ServiceBadge component implementation to appear properly in pages
|
|
4
38
|
|
|
5
39
|
## 0.17.0
|
|
6
40
|
Mon, 18 Apr 2022 13:00:33 GMT
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type DivElementAttributes = JSX.IntrinsicElements['div'];
|
|
3
|
+
export interface CopyToClipboardProps extends DivElementAttributes {
|
|
4
|
+
text: string;
|
|
5
|
+
variant?: 'tooltip' | 'banner';
|
|
6
|
+
}
|
|
7
|
+
export declare const CopyToClipboard: React.ForwardRefExoticComponent<Pick<CopyToClipboardProps, "color" | "variant" | "className" | "children" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "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" | "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" | "text"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export default CopyToClipboard;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports["default"] = exports.CopyToClipboard = void 0;
|
|
11
|
+
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
+
|
|
14
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
|
+
|
|
16
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
17
|
+
|
|
18
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
19
|
+
|
|
20
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
21
|
+
|
|
22
|
+
var _CopyToClipboardMessage = _interopRequireDefault(require("@digigov/react-extensions/admin/CopyToClipboardMessage"));
|
|
23
|
+
|
|
24
|
+
var _NormalText = _interopRequireDefault(require("@digigov/ui/typography/NormalText"));
|
|
25
|
+
|
|
26
|
+
var _app = require("@digigov/ui/app");
|
|
27
|
+
|
|
28
|
+
var _excluded = ["text", "variant", "children"];
|
|
29
|
+
|
|
30
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
31
|
+
|
|
32
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
33
|
+
|
|
34
|
+
var CopyToClipboard = /*#__PURE__*/_react["default"].forwardRef(function CopyToClipboard(_ref, ref) {
|
|
35
|
+
var text = _ref.text,
|
|
36
|
+
variant = _ref.variant,
|
|
37
|
+
children = _ref.children,
|
|
38
|
+
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
39
|
+
|
|
40
|
+
var _useState = (0, _react.useState)(false),
|
|
41
|
+
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
42
|
+
enabled = _useState2[0],
|
|
43
|
+
setEnabled = _useState2[1];
|
|
44
|
+
|
|
45
|
+
var _useTranslation = (0, _app.useTranslation)(),
|
|
46
|
+
t = _useTranslation.t;
|
|
47
|
+
|
|
48
|
+
(0, _react.useEffect)(function () {
|
|
49
|
+
var timeout = setTimeout(function () {
|
|
50
|
+
if (enabled) setEnabled(false);
|
|
51
|
+
}, 3000);
|
|
52
|
+
return function () {
|
|
53
|
+
return clearTimeout(timeout);
|
|
54
|
+
};
|
|
55
|
+
}, [enabled]);
|
|
56
|
+
|
|
57
|
+
function copyToClipboard() {
|
|
58
|
+
navigator.clipboard.writeText(text);
|
|
59
|
+
setEnabled(true);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
|
|
63
|
+
ref: ref
|
|
64
|
+
}, props, {
|
|
65
|
+
onClick: copyToClipboard,
|
|
66
|
+
className: (0, _clsx["default"])(variant === 'tooltip' && 'govgr-copy-to-clipboard--root')
|
|
67
|
+
}), children, enabled && /*#__PURE__*/_react["default"].createElement(_CopyToClipboardMessage["default"], {
|
|
68
|
+
variant: variant,
|
|
69
|
+
enabled: enabled
|
|
70
|
+
}, /*#__PURE__*/_react["default"].createElement(_NormalText["default"], null, t('copy-to-clipboard.message'))));
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
exports.CopyToClipboard = CopyToClipboard;
|
|
74
|
+
var _default = CopyToClipboard;
|
|
75
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type DivElementAttributes = JSX.IntrinsicElements['div'];
|
|
3
|
+
export interface PhaseBannerHeaderProps extends DivElementAttributes {
|
|
4
|
+
tag?: string;
|
|
5
|
+
text?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const PhaseBannerHeader: React.ForwardRefExoticComponent<Pick<PhaseBannerHeaderProps, "color" | "className" | "children" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "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" | "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" | "text" | "tag"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export default PhaseBannerHeader;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = exports.PhaseBannerHeader = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _HeaderSection = _interopRequireDefault(require("@digigov/react-core/HeaderSection"));
|
|
13
|
+
|
|
14
|
+
var _PhaseBanner = _interopRequireDefault(require("@digigov/react-core/PhaseBanner"));
|
|
15
|
+
|
|
16
|
+
var _PhaseBannerTag = _interopRequireDefault(require("@digigov/react-core/PhaseBannerTag"));
|
|
17
|
+
|
|
18
|
+
var _PhaseBannerText = _interopRequireDefault(require("@digigov/react-core/PhaseBannerText"));
|
|
19
|
+
|
|
20
|
+
var _PhaseBannerHeaderContainer = _interopRequireDefault(require("@digigov/react-core/PhaseBannerHeaderContainer"));
|
|
21
|
+
|
|
22
|
+
var PhaseBannerHeader = /*#__PURE__*/_react["default"].forwardRef(function PhaseBannerHeader(_ref) {
|
|
23
|
+
var text = _ref.text,
|
|
24
|
+
tag = _ref.tag;
|
|
25
|
+
return /*#__PURE__*/_react["default"].createElement(_PhaseBannerHeaderContainer["default"], null, /*#__PURE__*/_react["default"].createElement(_HeaderSection["default"], null, /*#__PURE__*/_react["default"].createElement(_PhaseBanner["default"], null, /*#__PURE__*/_react["default"].createElement(_PhaseBannerTag["default"], null, tag), /*#__PURE__*/_react["default"].createElement(_PhaseBannerText["default"], null, text))));
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
exports.PhaseBannerHeader = PhaseBannerHeader;
|
|
29
|
+
var _default = PhaseBannerHeader;
|
|
30
|
+
exports["default"] = _default;
|
package/app/index.d.ts
CHANGED
|
@@ -4,3 +4,5 @@ export * from '@digigov/ui/app/QrCodeScanner';
|
|
|
4
4
|
export * from '@digigov/ui/app/Header';
|
|
5
5
|
export * from '@digigov/ui/app/i18n';
|
|
6
6
|
export * from '@digigov/ui/app/I18nText';
|
|
7
|
+
export * from '@digigov/ui/app/CopyToClipboard';
|
|
8
|
+
export * from '@digigov/ui/app/PhaseBannerHeader';
|
package/app/index.js
CHANGED
|
@@ -80,4 +80,30 @@ Object.keys(_I18nText).forEach(function (key) {
|
|
|
80
80
|
return _I18nText[key];
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
var _CopyToClipboard = require("@digigov/ui/app/CopyToClipboard");
|
|
86
|
+
|
|
87
|
+
Object.keys(_CopyToClipboard).forEach(function (key) {
|
|
88
|
+
if (key === "default" || key === "__esModule") return;
|
|
89
|
+
if (key in exports && exports[key] === _CopyToClipboard[key]) return;
|
|
90
|
+
Object.defineProperty(exports, key, {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function get() {
|
|
93
|
+
return _CopyToClipboard[key];
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
var _PhaseBannerHeader = require("@digigov/ui/app/PhaseBannerHeader");
|
|
99
|
+
|
|
100
|
+
Object.keys(_PhaseBannerHeader).forEach(function (key) {
|
|
101
|
+
if (key === "default" || key === "__esModule") return;
|
|
102
|
+
if (key in exports && exports[key] === _PhaseBannerHeader[key]) return;
|
|
103
|
+
Object.defineProperty(exports, key, {
|
|
104
|
+
enumerable: true,
|
|
105
|
+
get: function get() {
|
|
106
|
+
return _PhaseBannerHeader[key];
|
|
107
|
+
}
|
|
108
|
+
});
|
|
83
109
|
});
|
|
@@ -13,7 +13,7 @@ exports[`renders the Accordion 1`] = `
|
|
|
13
13
|
<withDeprecationComponent>
|
|
14
14
|
<ForwardRef(AccordionSectionHeader)>
|
|
15
15
|
<summary
|
|
16
|
-
className="govgr-accordion__section-
|
|
16
|
+
className="govgr-accordion__section-summary"
|
|
17
17
|
>
|
|
18
18
|
<h2
|
|
19
19
|
className="govgr-accordion__section-heading"
|
|
@@ -47,7 +47,7 @@ exports[`renders the Accordion 1`] = `
|
|
|
47
47
|
<withDeprecationComponent>
|
|
48
48
|
<ForwardRef(AccordionSectionHeader)>
|
|
49
49
|
<summary
|
|
50
|
-
className="govgr-accordion__section-
|
|
50
|
+
className="govgr-accordion__section-summary"
|
|
51
51
|
>
|
|
52
52
|
<h2
|
|
53
53
|
className="govgr-accordion__section-heading"
|
|
@@ -2,9 +2,11 @@ import React from 'react';
|
|
|
2
2
|
import Accordion from '@digigov/react-core/Accordion';
|
|
3
3
|
import AccordionSection from '@digigov/react-core/AccordionSection';
|
|
4
4
|
import AccordionSectionContent from '@digigov/react-core/AccordionSectionContent';
|
|
5
|
-
import
|
|
5
|
+
import AccordionSectionSummaryHeading from '@digigov/react-core/AccordionSectionSummaryHeading';
|
|
6
|
+
import AccordionSectionSummary from '@digigov/react-core/AccordionSectionSummary';
|
|
6
7
|
import AccordionControls from '@digigov/react-core/AccordionControls';
|
|
7
8
|
import { UseTogglableSectionsReturn } from '@digigov/ui/hooks/useTogglableSections';
|
|
9
|
+
export declare const AccordionSectionHeader: React.ForwardRefExoticComponent<Pick<import("@digigov/react-core/AccordionSectionHeader").AccordionSectionHeaderProps, "color" | "className" | "children" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "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" | "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"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
10
|
export declare const AccordionItemDetails: React.ForwardRefExoticComponent<Pick<import("@digigov/react-core/AccordionSectionContent").AccordionSectionContentProps, "color" | "className" | "children" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "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" | "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"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
11
|
export declare const AccordionItemSummary: React.ForwardRefExoticComponent<Pick<import("@digigov/react-core/AccordionSectionHeader").AccordionSectionHeaderProps, "color" | "className" | "children" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "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" | "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"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
12
|
export declare const AccordionItem: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<import("@digigov/react-core/AccordionSection").AccordionSectionProps, "color" | "className" | "children" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "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" | "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" | "open"> & React.RefAttributes<HTMLDivElement>>>;
|
|
@@ -14,5 +16,5 @@ export interface UseAccordionProps {
|
|
|
14
16
|
export interface UseAccordionReturn extends UseTogglableSectionsReturn {
|
|
15
17
|
}
|
|
16
18
|
declare const useAccordion: (props: UseAccordionProps) => UseAccordionReturn;
|
|
17
|
-
export { Accordion, AccordionControls, AccordionSection, AccordionSectionContent,
|
|
19
|
+
export { Accordion, AccordionControls, AccordionSection, AccordionSectionContent, AccordionSectionSummary, AccordionSectionSummaryHeading, useAccordion, };
|
|
18
20
|
export default Accordion;
|
package/core/Accordion/index.js
CHANGED
|
@@ -30,10 +30,17 @@ Object.defineProperty(exports, "AccordionSectionContent", {
|
|
|
30
30
|
return _AccordionSectionContent["default"];
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
|
-
|
|
33
|
+
exports.AccordionSectionHeader = void 0;
|
|
34
|
+
Object.defineProperty(exports, "AccordionSectionSummary", {
|
|
34
35
|
enumerable: true,
|
|
35
36
|
get: function get() {
|
|
36
|
-
return
|
|
37
|
+
return _AccordionSectionSummary["default"];
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
Object.defineProperty(exports, "AccordionSectionSummaryHeading", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
get: function get() {
|
|
43
|
+
return _AccordionSectionSummaryHeading["default"];
|
|
37
44
|
}
|
|
38
45
|
});
|
|
39
46
|
exports.useAccordion = exports["default"] = void 0;
|
|
@@ -52,6 +59,10 @@ var _AccordionSectionContent = _interopRequireDefault(require("@digigov/react-co
|
|
|
52
59
|
|
|
53
60
|
var _AccordionSectionHeader = _interopRequireDefault(require("@digigov/react-core/AccordionSectionHeader"));
|
|
54
61
|
|
|
62
|
+
var _AccordionSectionSummaryHeading = _interopRequireDefault(require("@digigov/react-core/AccordionSectionSummaryHeading"));
|
|
63
|
+
|
|
64
|
+
var _AccordionSectionSummary = _interopRequireDefault(require("@digigov/react-core/AccordionSectionSummary"));
|
|
65
|
+
|
|
55
66
|
var _AccordionControls = _interopRequireDefault(require("@digigov/react-core/AccordionControls"));
|
|
56
67
|
|
|
57
68
|
var _withDeprecation = _interopRequireDefault(require("@digigov/ui/utils/withDeprecation"));
|
|
@@ -59,14 +70,20 @@ var _withDeprecation = _interopRequireDefault(require("@digigov/ui/utils/withDep
|
|
|
59
70
|
var _useTogglableSections2 = require("@digigov/ui/hooks/useTogglableSections");
|
|
60
71
|
|
|
61
72
|
var _excluded = ["register", "setOpened", "opened", "registered"];
|
|
73
|
+
var AccordionSectionHeader = (0, _withDeprecation["default"])(_AccordionSectionHeader["default"], {
|
|
74
|
+
name: 'AccordionSectionHeader',
|
|
75
|
+
error: true
|
|
76
|
+
});
|
|
77
|
+
exports.AccordionSectionHeader = AccordionSectionHeader;
|
|
62
78
|
var AccordionItemDetails = (0, _withDeprecation["default"])(_AccordionSectionContent["default"], {
|
|
63
79
|
name: 'AccordionItemDetails',
|
|
64
80
|
rename: 'AccordionSectionContent'
|
|
65
81
|
});
|
|
66
82
|
exports.AccordionItemDetails = AccordionItemDetails;
|
|
67
|
-
var AccordionItemSummary = (0, _withDeprecation["default"])(
|
|
83
|
+
var AccordionItemSummary = (0, _withDeprecation["default"])(AccordionSectionHeader, {
|
|
68
84
|
name: 'AccordionItemSummary',
|
|
69
|
-
rename: 'AccordionSectionHeader'
|
|
85
|
+
rename: 'AccordionSectionHeader',
|
|
86
|
+
warning: 'There is no need to use AccordionSectionHeader components anymore. It will be removed in a later version and impelented using AccordionSectionSummary and AccordionSectionSummaryHeading'
|
|
70
87
|
});
|
|
71
88
|
exports.AccordionItemSummary = AccordionItemSummary;
|
|
72
89
|
var AccordionItem = (0, _withDeprecation["default"])( /*#__PURE__*/_react["default"].memo(_AccordionSection["default"], function (prev, next) {
|
package/core/Card/index.d.ts
CHANGED
package/core/Card/index.js
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
8
|
+
var _exportNames = {};
|
|
9
|
+
exports["default"] = void 0;
|
|
6
10
|
|
|
7
|
-
var _Card = require("@digigov/react-core/Card");
|
|
11
|
+
var _Card = _interopRequireWildcard(require("@digigov/react-core/Card"));
|
|
8
12
|
|
|
9
13
|
Object.keys(_Card).forEach(function (key) {
|
|
10
14
|
if (key === "default" || key === "__esModule") return;
|
|
15
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
11
16
|
if (key in exports && exports[key] === _Card[key]) return;
|
|
12
17
|
Object.defineProperty(exports, key, {
|
|
13
18
|
enumerable: true,
|
|
@@ -21,6 +26,7 @@ var _CardAction = require("@digigov/react-core/CardAction");
|
|
|
21
26
|
|
|
22
27
|
Object.keys(_CardAction).forEach(function (key) {
|
|
23
28
|
if (key === "default" || key === "__esModule") return;
|
|
29
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
24
30
|
if (key in exports && exports[key] === _CardAction[key]) return;
|
|
25
31
|
Object.defineProperty(exports, key, {
|
|
26
32
|
enumerable: true,
|
|
@@ -34,6 +40,7 @@ var _CardHeading = require("@digigov/react-core/CardHeading");
|
|
|
34
40
|
|
|
35
41
|
Object.keys(_CardHeading).forEach(function (key) {
|
|
36
42
|
if (key === "default" || key === "__esModule") return;
|
|
43
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
37
44
|
if (key in exports && exports[key] === _CardHeading[key]) return;
|
|
38
45
|
Object.defineProperty(exports, key, {
|
|
39
46
|
enumerable: true,
|
|
@@ -47,6 +54,7 @@ var _CardText = require("@digigov/react-core/CardText");
|
|
|
47
54
|
|
|
48
55
|
Object.keys(_CardText).forEach(function (key) {
|
|
49
56
|
if (key === "default" || key === "__esModule") return;
|
|
57
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
50
58
|
if (key in exports && exports[key] === _CardText[key]) return;
|
|
51
59
|
Object.defineProperty(exports, key, {
|
|
52
60
|
enumerable: true,
|
|
@@ -54,4 +62,11 @@ Object.keys(_CardText).forEach(function (key) {
|
|
|
54
62
|
return _CardText[key];
|
|
55
63
|
}
|
|
56
64
|
});
|
|
57
|
-
});
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
68
|
+
|
|
69
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
70
|
+
|
|
71
|
+
var _default = _Card["default"];
|
|
72
|
+
exports["default"] = _default;
|
|
@@ -3,7 +3,6 @@ import { PhaseBannerProps } from '@digigov/react-core/PhaseBanner';
|
|
|
3
3
|
interface ServiceBadgeProps extends PhaseBannerProps {
|
|
4
4
|
label?: string;
|
|
5
5
|
ref?: React.Ref<HTMLDivElement>;
|
|
6
|
-
text?: string;
|
|
7
6
|
}
|
|
8
7
|
export declare const ServiceBadge: React.FC<ServiceBadgeProps>;
|
|
9
8
|
export default ServiceBadge;
|
|
@@ -19,14 +19,13 @@ var _PhaseBannerTag = _interopRequireDefault(require("@digigov/react-core/PhaseB
|
|
|
19
19
|
|
|
20
20
|
var _PhaseBannerText = _interopRequireDefault(require("@digigov/react-core/PhaseBannerText"));
|
|
21
21
|
|
|
22
|
-
var _excluded = ["label", "
|
|
22
|
+
var _excluded = ["label", "children"];
|
|
23
23
|
var ServiceBadge = (0, _withDeprecation["default"])(function (_ref) {
|
|
24
24
|
var _ref$label = _ref.label,
|
|
25
25
|
label = _ref$label === void 0 ? 'BETA' : _ref$label,
|
|
26
|
-
text = _ref.text,
|
|
27
26
|
children = _ref.children,
|
|
28
27
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
29
|
-
return /*#__PURE__*/_react["default"].createElement(_PhaseBanner["default"], props,
|
|
28
|
+
return /*#__PURE__*/_react["default"].createElement(_PhaseBanner["default"], props, /*#__PURE__*/_react["default"].createElement(_PhaseBannerTag["default"], null, label), /*#__PURE__*/_react["default"].createElement(_PhaseBannerText["default"], null, children));
|
|
30
29
|
}, {
|
|
31
30
|
name: 'ServiceBadge',
|
|
32
31
|
rename: 'PhaseBanner'
|
package/core/Table/index.d.ts
CHANGED
package/core/Table/index.js
CHANGED
|
@@ -4,6 +4,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
+
var _TableContainer = require("@digigov/react-core/TableContainer");
|
|
8
|
+
|
|
9
|
+
Object.keys(_TableContainer).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
if (key in exports && exports[key] === _TableContainer[key]) return;
|
|
12
|
+
Object.defineProperty(exports, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _TableContainer[key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
|
|
7
20
|
var _Table = require("@digigov/react-core/Table");
|
|
8
21
|
|
|
9
22
|
Object.keys(_Table).forEach(function (key) {
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
+
var _excluded = ["text", "variant", "children"];
|
|
5
|
+
import React, { useState, useEffect } from 'react';
|
|
6
|
+
import clsx from 'clsx';
|
|
7
|
+
import CopyToClipboardMessage from '@digigov/react-extensions/admin/CopyToClipboardMessage';
|
|
8
|
+
import NormalText from '@digigov/ui/typography/NormalText';
|
|
9
|
+
import { useTranslation } from '@digigov/ui/app';
|
|
10
|
+
export var CopyToClipboard = /*#__PURE__*/React.forwardRef(function CopyToClipboard(_ref, ref) {
|
|
11
|
+
var text = _ref.text,
|
|
12
|
+
variant = _ref.variant,
|
|
13
|
+
children = _ref.children,
|
|
14
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
15
|
+
|
|
16
|
+
var _useState = useState(false),
|
|
17
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
18
|
+
enabled = _useState2[0],
|
|
19
|
+
setEnabled = _useState2[1];
|
|
20
|
+
|
|
21
|
+
var _useTranslation = useTranslation(),
|
|
22
|
+
t = _useTranslation.t;
|
|
23
|
+
|
|
24
|
+
useEffect(function () {
|
|
25
|
+
var timeout = setTimeout(function () {
|
|
26
|
+
if (enabled) setEnabled(false);
|
|
27
|
+
}, 3000);
|
|
28
|
+
return function () {
|
|
29
|
+
return clearTimeout(timeout);
|
|
30
|
+
};
|
|
31
|
+
}, [enabled]);
|
|
32
|
+
|
|
33
|
+
function copyToClipboard() {
|
|
34
|
+
navigator.clipboard.writeText(text);
|
|
35
|
+
setEnabled(true);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
39
|
+
ref: ref
|
|
40
|
+
}, props, {
|
|
41
|
+
onClick: copyToClipboard,
|
|
42
|
+
className: clsx(variant === 'tooltip' && 'govgr-copy-to-clipboard--root')
|
|
43
|
+
}), children, enabled && /*#__PURE__*/React.createElement(CopyToClipboardMessage, {
|
|
44
|
+
variant: variant,
|
|
45
|
+
enabled: enabled
|
|
46
|
+
}, /*#__PURE__*/React.createElement(NormalText, null, t('copy-to-clipboard.message'))));
|
|
47
|
+
});
|
|
48
|
+
export default CopyToClipboard;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import HeaderSection from '@digigov/react-core/HeaderSection';
|
|
3
|
+
import PhaseBanner from '@digigov/react-core/PhaseBanner';
|
|
4
|
+
import PhaseBannerTag from '@digigov/react-core/PhaseBannerTag';
|
|
5
|
+
import PhaseBannerText from '@digigov/react-core/PhaseBannerText';
|
|
6
|
+
import PhaseBannerHeaderContainer from '@digigov/react-core/PhaseBannerHeaderContainer';
|
|
7
|
+
export var PhaseBannerHeader = /*#__PURE__*/React.forwardRef(function PhaseBannerHeader(_ref) {
|
|
8
|
+
var text = _ref.text,
|
|
9
|
+
tag = _ref.tag;
|
|
10
|
+
return /*#__PURE__*/React.createElement(PhaseBannerHeaderContainer, null, /*#__PURE__*/React.createElement(HeaderSection, null, /*#__PURE__*/React.createElement(PhaseBanner, null, /*#__PURE__*/React.createElement(PhaseBannerTag, null, tag), /*#__PURE__*/React.createElement(PhaseBannerText, null, text))));
|
|
11
|
+
});
|
|
12
|
+
export default PhaseBannerHeader;
|
package/es/app/index.js
CHANGED
|
@@ -3,4 +3,6 @@ export * from '@digigov/ui/app/PageTitle';
|
|
|
3
3
|
export * from '@digigov/ui/app/QrCodeScanner';
|
|
4
4
|
export * from '@digigov/ui/app/Header';
|
|
5
5
|
export * from '@digigov/ui/app/i18n';
|
|
6
|
-
export * from '@digigov/ui/app/I18nText';
|
|
6
|
+
export * from '@digigov/ui/app/I18nText';
|
|
7
|
+
export * from '@digigov/ui/app/CopyToClipboard';
|
|
8
|
+
export * from '@digigov/ui/app/PhaseBannerHeader';
|
|
@@ -13,7 +13,7 @@ exports[`renders the Accordion 1`] = `
|
|
|
13
13
|
<withDeprecationComponent>
|
|
14
14
|
<ForwardRef(AccordionSectionHeader)>
|
|
15
15
|
<summary
|
|
16
|
-
className="govgr-accordion__section-
|
|
16
|
+
className="govgr-accordion__section-summary"
|
|
17
17
|
>
|
|
18
18
|
<h2
|
|
19
19
|
className="govgr-accordion__section-heading"
|
|
@@ -47,7 +47,7 @@ exports[`renders the Accordion 1`] = `
|
|
|
47
47
|
<withDeprecationComponent>
|
|
48
48
|
<ForwardRef(AccordionSectionHeader)>
|
|
49
49
|
<summary
|
|
50
|
-
className="govgr-accordion__section-
|
|
50
|
+
className="govgr-accordion__section-summary"
|
|
51
51
|
>
|
|
52
52
|
<h2
|
|
53
53
|
className="govgr-accordion__section-heading"
|
|
@@ -7,17 +7,24 @@ import React from 'react';
|
|
|
7
7
|
import Accordion from '@digigov/react-core/Accordion';
|
|
8
8
|
import AccordionSection from '@digigov/react-core/AccordionSection';
|
|
9
9
|
import AccordionSectionContent from '@digigov/react-core/AccordionSectionContent';
|
|
10
|
-
import
|
|
10
|
+
import CoreAccordionSectionHeader from '@digigov/react-core/AccordionSectionHeader';
|
|
11
|
+
import AccordionSectionSummaryHeading from '@digigov/react-core/AccordionSectionSummaryHeading';
|
|
12
|
+
import AccordionSectionSummary from '@digigov/react-core/AccordionSectionSummary';
|
|
11
13
|
import AccordionControls from '@digigov/react-core/AccordionControls';
|
|
12
14
|
import withDeprecation from '@digigov/ui/utils/withDeprecation';
|
|
13
15
|
import { useTogglableSections } from '@digigov/ui/hooks/useTogglableSections';
|
|
16
|
+
export var AccordionSectionHeader = withDeprecation(CoreAccordionSectionHeader, {
|
|
17
|
+
name: 'AccordionSectionHeader',
|
|
18
|
+
error: true
|
|
19
|
+
});
|
|
14
20
|
export var AccordionItemDetails = withDeprecation(AccordionSectionContent, {
|
|
15
21
|
name: 'AccordionItemDetails',
|
|
16
22
|
rename: 'AccordionSectionContent'
|
|
17
23
|
});
|
|
18
24
|
export var AccordionItemSummary = withDeprecation(AccordionSectionHeader, {
|
|
19
25
|
name: 'AccordionItemSummary',
|
|
20
|
-
rename: 'AccordionSectionHeader'
|
|
26
|
+
rename: 'AccordionSectionHeader',
|
|
27
|
+
warning: 'There is no need to use AccordionSectionHeader components anymore. It will be removed in a later version and impelented using AccordionSectionSummary and AccordionSectionSummaryHeading'
|
|
21
28
|
});
|
|
22
29
|
export var AccordionItem = withDeprecation( /*#__PURE__*/React.memo(AccordionSection, function (prev, next) {
|
|
23
30
|
return prev.open === next.open;
|
|
@@ -46,5 +53,5 @@ var useAccordion = function useAccordion(props) {
|
|
|
46
53
|
}, rest);
|
|
47
54
|
};
|
|
48
55
|
|
|
49
|
-
export { Accordion, AccordionControls, AccordionSection, AccordionSectionContent,
|
|
56
|
+
export { Accordion, AccordionControls, AccordionSection, AccordionSectionContent, AccordionSectionSummary, AccordionSectionSummaryHeading, useAccordion };
|
|
50
57
|
export default Accordion;
|
package/es/core/Card/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export * from '@digigov/react-core/Card';
|
|
2
2
|
export * from '@digigov/react-core/CardAction';
|
|
3
3
|
export * from '@digigov/react-core/CardHeading';
|
|
4
|
-
export * from '@digigov/react-core/CardText';
|
|
4
|
+
export * from '@digigov/react-core/CardText';
|
|
5
|
+
import Card from '@digigov/react-core/Card';
|
|
6
|
+
export default Card;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
|
-
var _excluded = ["label", "
|
|
2
|
+
var _excluded = ["label", "children"];
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import withDeprecation from '@digigov/ui/utils/withDeprecation';
|
|
5
5
|
import PhaseBanner from '@digigov/react-core/PhaseBanner';
|
|
@@ -8,11 +8,10 @@ import PhaseBannerText from '@digigov/react-core/PhaseBannerText';
|
|
|
8
8
|
export var ServiceBadge = withDeprecation(function (_ref) {
|
|
9
9
|
var _ref$label = _ref.label,
|
|
10
10
|
label = _ref$label === void 0 ? 'BETA' : _ref$label,
|
|
11
|
-
text = _ref.text,
|
|
12
11
|
children = _ref.children,
|
|
13
12
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
14
13
|
|
|
15
|
-
return /*#__PURE__*/React.createElement(PhaseBanner, props,
|
|
14
|
+
return /*#__PURE__*/React.createElement(PhaseBanner, props, /*#__PURE__*/React.createElement(PhaseBannerTag, null, label), /*#__PURE__*/React.createElement(PhaseBannerText, null, children));
|
|
16
15
|
}, {
|
|
17
16
|
name: 'ServiceBadge',
|
|
18
17
|
rename: 'PhaseBanner'
|
package/es/core/Table/index.js
CHANGED
package/es/layouts/Grid/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import Grid from '@digigov/react-core/Grid';
|
|
2
|
+
export default Grid;
|
package/es/locales/el.js
CHANGED
package/es/locales/en.js
CHANGED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
+
var _excluded = ["text", "variant", "children"];
|
|
5
|
+
import React, { useState, useEffect } from 'react';
|
|
6
|
+
import clsx from 'clsx';
|
|
7
|
+
import CopyToClipboardMessage from '@digigov/react-extensions/admin/CopyToClipboardMessage';
|
|
8
|
+
import NormalText from '@digigov/ui/typography/NormalText';
|
|
9
|
+
import { useTranslation } from '@digigov/ui/app';
|
|
10
|
+
export var CopyToClipboard = /*#__PURE__*/React.forwardRef(function CopyToClipboard(_ref, ref) {
|
|
11
|
+
var text = _ref.text,
|
|
12
|
+
variant = _ref.variant,
|
|
13
|
+
children = _ref.children,
|
|
14
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
15
|
+
|
|
16
|
+
var _useState = useState(false),
|
|
17
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
18
|
+
enabled = _useState2[0],
|
|
19
|
+
setEnabled = _useState2[1];
|
|
20
|
+
|
|
21
|
+
var _useTranslation = useTranslation(),
|
|
22
|
+
t = _useTranslation.t;
|
|
23
|
+
|
|
24
|
+
useEffect(function () {
|
|
25
|
+
var timeout = setTimeout(function () {
|
|
26
|
+
if (enabled) setEnabled(false);
|
|
27
|
+
}, 3000);
|
|
28
|
+
return function () {
|
|
29
|
+
return clearTimeout(timeout);
|
|
30
|
+
};
|
|
31
|
+
}, [enabled]);
|
|
32
|
+
|
|
33
|
+
function copyToClipboard() {
|
|
34
|
+
navigator.clipboard.writeText(text);
|
|
35
|
+
setEnabled(true);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
39
|
+
ref: ref
|
|
40
|
+
}, props, {
|
|
41
|
+
onClick: copyToClipboard,
|
|
42
|
+
className: clsx(variant === 'tooltip' && 'govgr-copy-to-clipboard--root')
|
|
43
|
+
}), children, enabled && /*#__PURE__*/React.createElement(CopyToClipboardMessage, {
|
|
44
|
+
variant: variant,
|
|
45
|
+
enabled: enabled
|
|
46
|
+
}, /*#__PURE__*/React.createElement(NormalText, null, t('copy-to-clipboard.message'))));
|
|
47
|
+
});
|
|
48
|
+
export default CopyToClipboard;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import HeaderSection from '@digigov/react-core/HeaderSection';
|
|
3
|
+
import PhaseBanner from '@digigov/react-core/PhaseBanner';
|
|
4
|
+
import PhaseBannerTag from '@digigov/react-core/PhaseBannerTag';
|
|
5
|
+
import PhaseBannerText from '@digigov/react-core/PhaseBannerText';
|
|
6
|
+
import PhaseBannerHeaderContainer from '@digigov/react-core/PhaseBannerHeaderContainer';
|
|
7
|
+
export var PhaseBannerHeader = /*#__PURE__*/React.forwardRef(function PhaseBannerHeader(_ref) {
|
|
8
|
+
var text = _ref.text,
|
|
9
|
+
tag = _ref.tag;
|
|
10
|
+
return /*#__PURE__*/React.createElement(PhaseBannerHeaderContainer, null, /*#__PURE__*/React.createElement(HeaderSection, null, /*#__PURE__*/React.createElement(PhaseBanner, null, /*#__PURE__*/React.createElement(PhaseBannerTag, null, tag), /*#__PURE__*/React.createElement(PhaseBannerText, null, text))));
|
|
11
|
+
});
|
|
12
|
+
export default PhaseBannerHeader;
|
package/esm/app/index.js
CHANGED
|
@@ -3,4 +3,6 @@ export * from '@digigov/ui/app/PageTitle';
|
|
|
3
3
|
export * from '@digigov/ui/app/QrCodeScanner';
|
|
4
4
|
export * from '@digigov/ui/app/Header';
|
|
5
5
|
export * from '@digigov/ui/app/i18n';
|
|
6
|
-
export * from '@digigov/ui/app/I18nText';
|
|
6
|
+
export * from '@digigov/ui/app/I18nText';
|
|
7
|
+
export * from '@digigov/ui/app/CopyToClipboard';
|
|
8
|
+
export * from '@digigov/ui/app/PhaseBannerHeader';
|
|
@@ -13,7 +13,7 @@ exports[`renders the Accordion 1`] = `
|
|
|
13
13
|
<withDeprecationComponent>
|
|
14
14
|
<ForwardRef(AccordionSectionHeader)>
|
|
15
15
|
<summary
|
|
16
|
-
className="govgr-accordion__section-
|
|
16
|
+
className="govgr-accordion__section-summary"
|
|
17
17
|
>
|
|
18
18
|
<h2
|
|
19
19
|
className="govgr-accordion__section-heading"
|
|
@@ -47,7 +47,7 @@ exports[`renders the Accordion 1`] = `
|
|
|
47
47
|
<withDeprecationComponent>
|
|
48
48
|
<ForwardRef(AccordionSectionHeader)>
|
|
49
49
|
<summary
|
|
50
|
-
className="govgr-accordion__section-
|
|
50
|
+
className="govgr-accordion__section-summary"
|
|
51
51
|
>
|
|
52
52
|
<h2
|
|
53
53
|
className="govgr-accordion__section-heading"
|
|
@@ -7,17 +7,24 @@ import React from 'react';
|
|
|
7
7
|
import Accordion from '@digigov/react-core/Accordion';
|
|
8
8
|
import AccordionSection from '@digigov/react-core/AccordionSection';
|
|
9
9
|
import AccordionSectionContent from '@digigov/react-core/AccordionSectionContent';
|
|
10
|
-
import
|
|
10
|
+
import CoreAccordionSectionHeader from '@digigov/react-core/AccordionSectionHeader';
|
|
11
|
+
import AccordionSectionSummaryHeading from '@digigov/react-core/AccordionSectionSummaryHeading';
|
|
12
|
+
import AccordionSectionSummary from '@digigov/react-core/AccordionSectionSummary';
|
|
11
13
|
import AccordionControls from '@digigov/react-core/AccordionControls';
|
|
12
14
|
import withDeprecation from '@digigov/ui/utils/withDeprecation';
|
|
13
15
|
import { useTogglableSections } from '@digigov/ui/hooks/useTogglableSections';
|
|
16
|
+
export var AccordionSectionHeader = withDeprecation(CoreAccordionSectionHeader, {
|
|
17
|
+
name: 'AccordionSectionHeader',
|
|
18
|
+
error: true
|
|
19
|
+
});
|
|
14
20
|
export var AccordionItemDetails = withDeprecation(AccordionSectionContent, {
|
|
15
21
|
name: 'AccordionItemDetails',
|
|
16
22
|
rename: 'AccordionSectionContent'
|
|
17
23
|
});
|
|
18
24
|
export var AccordionItemSummary = withDeprecation(AccordionSectionHeader, {
|
|
19
25
|
name: 'AccordionItemSummary',
|
|
20
|
-
rename: 'AccordionSectionHeader'
|
|
26
|
+
rename: 'AccordionSectionHeader',
|
|
27
|
+
warning: 'There is no need to use AccordionSectionHeader components anymore. It will be removed in a later version and impelented using AccordionSectionSummary and AccordionSectionSummaryHeading'
|
|
21
28
|
});
|
|
22
29
|
export var AccordionItem = withDeprecation( /*#__PURE__*/React.memo(AccordionSection, function (prev, next) {
|
|
23
30
|
return prev.open === next.open;
|
|
@@ -46,5 +53,5 @@ var useAccordion = function useAccordion(props) {
|
|
|
46
53
|
}, rest);
|
|
47
54
|
};
|
|
48
55
|
|
|
49
|
-
export { Accordion, AccordionControls, AccordionSection, AccordionSectionContent,
|
|
56
|
+
export { Accordion, AccordionControls, AccordionSection, AccordionSectionContent, AccordionSectionSummary, AccordionSectionSummaryHeading, useAccordion };
|
|
50
57
|
export default Accordion;
|
package/esm/core/Card/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export * from '@digigov/react-core/Card';
|
|
2
2
|
export * from '@digigov/react-core/CardAction';
|
|
3
3
|
export * from '@digigov/react-core/CardHeading';
|
|
4
|
-
export * from '@digigov/react-core/CardText';
|
|
4
|
+
export * from '@digigov/react-core/CardText';
|
|
5
|
+
import Card from '@digigov/react-core/Card';
|
|
6
|
+
export default Card;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
|
-
var _excluded = ["label", "
|
|
2
|
+
var _excluded = ["label", "children"];
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import withDeprecation from '@digigov/ui/utils/withDeprecation';
|
|
5
5
|
import PhaseBanner from '@digigov/react-core/PhaseBanner';
|
|
@@ -8,11 +8,10 @@ import PhaseBannerText from '@digigov/react-core/PhaseBannerText';
|
|
|
8
8
|
export var ServiceBadge = withDeprecation(function (_ref) {
|
|
9
9
|
var _ref$label = _ref.label,
|
|
10
10
|
label = _ref$label === void 0 ? 'BETA' : _ref$label,
|
|
11
|
-
text = _ref.text,
|
|
12
11
|
children = _ref.children,
|
|
13
12
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
14
13
|
|
|
15
|
-
return /*#__PURE__*/React.createElement(PhaseBanner, props,
|
|
14
|
+
return /*#__PURE__*/React.createElement(PhaseBanner, props, /*#__PURE__*/React.createElement(PhaseBannerTag, null, label), /*#__PURE__*/React.createElement(PhaseBannerText, null, children));
|
|
16
15
|
}, {
|
|
17
16
|
name: 'ServiceBadge',
|
|
18
17
|
rename: 'PhaseBanner'
|
package/esm/core/Table/index.js
CHANGED
package/esm/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import Grid from '@digigov/react-core/Grid';
|
|
2
|
+
export default Grid;
|
package/esm/locales/el.js
CHANGED
package/esm/locales/en.js
CHANGED
package/layouts/Grid/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import Grid from '@digigov/react-core/Grid';
|
|
2
|
+
export default Grid;
|
package/layouts/Grid/index.js
CHANGED
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
8
|
+
exports["default"] = void 0;
|
|
6
9
|
|
|
7
|
-
var _Grid = require("@digigov/react-core/Grid");
|
|
10
|
+
var _Grid = _interopRequireDefault(require("@digigov/react-core/Grid"));
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
if (key in exports && exports[key] === _Grid[key]) return;
|
|
12
|
-
Object.defineProperty(exports, key, {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _Grid[key];
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
});
|
|
12
|
+
var _default = _Grid["default"];
|
|
13
|
+
exports["default"] = _default;
|
package/locales/el.d.ts
CHANGED
package/locales/el.js
CHANGED
package/locales/en.d.ts
CHANGED
package/locales/en.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digigov/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "@digigov reusable components toolkit",
|
|
5
5
|
"module": "./esm/index.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"clsx": "1.1.1",
|
|
19
19
|
"react": "16.14.0",
|
|
20
20
|
"react-dom": "16.14.0",
|
|
21
|
-
"@digigov/react-core": "0.
|
|
22
|
-
"@digigov/react-extensions": "0.
|
|
21
|
+
"@digigov/react-core": "0.13.0",
|
|
22
|
+
"@digigov/react-extensions": "0.12.0"
|
|
23
23
|
},
|
|
24
24
|
"gitHead": "c903a46306f77f55ad7fc4d2e274006f39a6c871",
|
|
25
25
|
"private": false,
|