@digigov/ui 0.13.0 → 0.15.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 +27 -1
- package/admin/Dropdown/index.d.ts +15 -0
- package/admin/Dropdown/index.js +90 -0
- package/admin/index.d.ts +1 -0
- package/admin/index.js +18 -0
- package/app/Header/HeaderContent.d.ts +3 -0
- package/app/Header/HeaderContent.js +19 -0
- package/core/Accordion/index.d.ts +1 -4
- package/core/Accordion/index.js +5 -30
- package/core/Link/index.js +3 -1
- package/core/PaginationLabel/index.d.ts +21 -0
- package/core/PaginationLabel/index.js +34 -0
- package/core/Table/index.d.ts +1 -1
- package/core/Table/index.js +4 -4
- package/core/index.d.ts +9 -5
- package/core/index.js +88 -18
- package/es/admin/Dropdown/index.js +41 -0
- package/es/admin/index.js +1 -0
- package/es/app/Header/HeaderContent.js +3 -0
- package/es/core/Accordion/index.js +2 -19
- package/es/core/Link/index.js +2 -1
- package/es/core/PaginationLabel/index.js +20 -0
- package/es/core/Table/index.js +1 -1
- package/es/core/index.js +9 -5
- package/es/index.js +2 -1
- package/es/locales/el.js +6 -0
- package/es/locales/en.js +6 -0
- package/esm/admin/Dropdown/index.js +41 -0
- package/esm/admin/index.js +1 -0
- package/esm/app/Header/HeaderContent.js +3 -0
- package/esm/core/Accordion/index.js +2 -19
- package/esm/core/Link/index.js +2 -1
- package/esm/core/PaginationLabel/index.js +20 -0
- package/esm/core/Table/index.js +1 -1
- package/esm/core/index.js +9 -5
- package/esm/index.js +3 -2
- package/esm/locales/el.js +6 -0
- package/esm/locales/en.js +6 -0
- package/index.d.ts +1 -0
- package/index.js +13 -0
- package/locales/el.d.ts +6 -0
- package/locales/el.js +6 -0
- package/locales/en.d.ts +6 -0
- package/locales/en.js +6 -0
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,32 @@
|
|
|
1
1
|
# Change Log - @digigov/ui
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 17 Mar 2022 10:24:06 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 0.15.0
|
|
6
|
+
Thu, 17 Mar 2022 10:24:06 GMT
|
|
7
|
+
|
|
8
|
+
### Minor changes
|
|
9
|
+
|
|
10
|
+
- Integrate @digigov/react-extensions/Dropdown component
|
|
11
|
+
- rename TableHeaderCell to TableHeadCell export
|
|
12
|
+
|
|
13
|
+
## 0.14.0
|
|
14
|
+
Wed, 09 Mar 2022 13:21:47 GMT
|
|
15
|
+
|
|
16
|
+
### Minor changes
|
|
17
|
+
|
|
18
|
+
- Add react-extensions library / add PaginationLabel with translations / use Link from react-core
|
|
19
|
+
|
|
20
|
+
### Patches
|
|
21
|
+
|
|
22
|
+
- export HeaderContent component
|
|
23
|
+
|
|
24
|
+
## 0.13.1
|
|
25
|
+
Thu, 03 Mar 2022 09:55:59 GMT
|
|
26
|
+
|
|
27
|
+
### Patches
|
|
28
|
+
|
|
29
|
+
- Fix useAccordion toggle functionality
|
|
4
30
|
|
|
5
31
|
## 0.13.0
|
|
6
32
|
Tue, 01 Mar 2022 10:56:06 GMT
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DropdownProps as CoreDropdownProps } from '@digigov/react-extensions/admin/Dropdown';
|
|
3
|
+
export * from '@digigov/react-extensions/admin/DropdownButton';
|
|
4
|
+
export * from '@digigov/react-extensions/admin/DropdownContent';
|
|
5
|
+
export interface DropdownProps extends CoreDropdownProps {
|
|
6
|
+
/**
|
|
7
|
+
* Use closeBehaviour to set the way that the Dropdown will close.
|
|
8
|
+
*/
|
|
9
|
+
closeBehaviour?: 'clickButton' | 'clickOutside';
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Dropdown component is used for showing more options with a button.
|
|
13
|
+
*/
|
|
14
|
+
export declare const Dropdown: ({ closeBehaviour, ...props }: DropdownProps) => React.ReactElement;
|
|
15
|
+
export default Dropdown;
|
|
@@ -0,0 +1,90 @@
|
|
|
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
|
+
var _exportNames = {
|
|
11
|
+
Dropdown: true
|
|
12
|
+
};
|
|
13
|
+
exports["default"] = exports.Dropdown = void 0;
|
|
14
|
+
|
|
15
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
16
|
+
|
|
17
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
18
|
+
|
|
19
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
20
|
+
|
|
21
|
+
var _Dropdown = _interopRequireDefault(require("@digigov/react-extensions/admin/Dropdown"));
|
|
22
|
+
|
|
23
|
+
var _DropdownButton = require("@digigov/react-extensions/admin/DropdownButton");
|
|
24
|
+
|
|
25
|
+
Object.keys(_DropdownButton).forEach(function (key) {
|
|
26
|
+
if (key === "default" || key === "__esModule") return;
|
|
27
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
28
|
+
if (key in exports && exports[key] === _DropdownButton[key]) return;
|
|
29
|
+
Object.defineProperty(exports, key, {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function get() {
|
|
32
|
+
return _DropdownButton[key];
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
var _DropdownContent = require("@digigov/react-extensions/admin/DropdownContent");
|
|
38
|
+
|
|
39
|
+
Object.keys(_DropdownContent).forEach(function (key) {
|
|
40
|
+
if (key === "default" || key === "__esModule") return;
|
|
41
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
42
|
+
if (key in exports && exports[key] === _DropdownContent[key]) return;
|
|
43
|
+
Object.defineProperty(exports, key, {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function get() {
|
|
46
|
+
return _DropdownContent[key];
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
var _excluded = ["closeBehaviour"];
|
|
51
|
+
|
|
52
|
+
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); }
|
|
53
|
+
|
|
54
|
+
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; }
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Dropdown component is used for showing more options with a button.
|
|
58
|
+
*/
|
|
59
|
+
var Dropdown = function Dropdown(_ref) {
|
|
60
|
+
var _ref$closeBehaviour = _ref.closeBehaviour,
|
|
61
|
+
closeBehaviour = _ref$closeBehaviour === void 0 ? 'clickOutside' : _ref$closeBehaviour,
|
|
62
|
+
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
63
|
+
var innerRef = (0, _react.useRef)();
|
|
64
|
+
(0, _react.useEffect)(function () {
|
|
65
|
+
var handleClickOutside = function handleClickOutside(event) {
|
|
66
|
+
if (innerRef.current && !innerRef.current.contains(event.target)) {
|
|
67
|
+
innerRef.current.open = false;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
if (closeBehaviour === 'clickOutside') {
|
|
72
|
+
document.addEventListener('click', handleClickOutside, true);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return function () {
|
|
76
|
+
if (closeBehaviour === 'clickOutside') {
|
|
77
|
+
document.removeEventListener('click', handleClickOutside, true);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
}, []); // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
81
|
+
// @ts-ignore
|
|
82
|
+
|
|
83
|
+
return /*#__PURE__*/_react["default"].createElement(_Dropdown["default"], (0, _extends2["default"])({
|
|
84
|
+
ref: innerRef
|
|
85
|
+
}, props));
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
exports.Dropdown = Dropdown;
|
|
89
|
+
var _default = Dropdown;
|
|
90
|
+
exports["default"] = _default;
|
package/admin/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@digigov/ui/admin/Dropdown';
|
package/admin/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _Dropdown = require("@digigov/ui/admin/Dropdown");
|
|
8
|
+
|
|
9
|
+
Object.keys(_Dropdown).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
if (key in exports && exports[key] === _Dropdown[key]) return;
|
|
12
|
+
Object.defineProperty(exports, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _Dropdown[key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
Object.defineProperty(exports, "HeaderContent", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function get() {
|
|
11
|
+
return _HeaderContent["default"];
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
exports["default"] = void 0;
|
|
15
|
+
|
|
16
|
+
var _HeaderContent = _interopRequireDefault(require("@digigov/react-core/HeaderContent"));
|
|
17
|
+
|
|
18
|
+
var _default = _HeaderContent["default"];
|
|
19
|
+
exports["default"] = _default;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import Accordion from '@digigov/react-core/Accordion';
|
|
2
3
|
import AccordionSection from '@digigov/react-core/AccordionSection';
|
|
3
4
|
import AccordionSectionContent from '@digigov/react-core/AccordionSectionContent';
|
|
4
5
|
import AccordionSectionHeader from '@digigov/react-core/AccordionSectionHeader';
|
|
5
6
|
import AccordionControls from '@digigov/react-core/AccordionControls';
|
|
6
7
|
import { UseTogglableSectionsReturn } from '@digigov/ui/hooks/useTogglableSections';
|
|
7
|
-
import React from 'react';
|
|
8
8
|
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
9
|
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
10
|
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>>>;
|
|
@@ -12,9 +12,6 @@ export interface UseAccordionProps {
|
|
|
12
12
|
singleOpen?: boolean;
|
|
13
13
|
}
|
|
14
14
|
export interface UseAccordionReturn extends UseTogglableSectionsReturn {
|
|
15
|
-
isOpenAll: boolean;
|
|
16
|
-
openAll: () => void;
|
|
17
|
-
closeAll: () => void;
|
|
18
15
|
}
|
|
19
16
|
declare const useAccordion: (props: UseAccordionProps) => UseAccordionReturn;
|
|
20
17
|
export { Accordion, AccordionControls, AccordionSection, AccordionSectionContent, AccordionSectionHeader, useAccordion, };
|
package/core/Accordion/index.js
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
@@ -40,12 +38,12 @@ Object.defineProperty(exports, "AccordionSectionHeader", {
|
|
|
40
38
|
});
|
|
41
39
|
exports.useAccordion = exports["default"] = void 0;
|
|
42
40
|
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
var _extends3 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
41
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
46
42
|
|
|
47
43
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
48
44
|
|
|
45
|
+
var _react = _interopRequireDefault(require("react"));
|
|
46
|
+
|
|
49
47
|
var _Accordion = _interopRequireDefault(require("@digigov/react-core/Accordion"));
|
|
50
48
|
|
|
51
49
|
var _AccordionSection = _interopRequireDefault(require("@digigov/react-core/AccordionSection"));
|
|
@@ -60,14 +58,7 @@ var _withDeprecation = _interopRequireDefault(require("@digigov/ui/utils/withDep
|
|
|
60
58
|
|
|
61
59
|
var _useTogglableSections2 = require("@digigov/ui/hooks/useTogglableSections");
|
|
62
60
|
|
|
63
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
64
|
-
|
|
65
61
|
var _excluded = ["register", "setOpened", "opened", "registered"];
|
|
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
62
|
var AccordionItemDetails = (0, _withDeprecation["default"])(_AccordionSectionContent["default"], {
|
|
72
63
|
name: 'AccordionItemDetails',
|
|
73
64
|
rename: 'AccordionSectionContent'
|
|
@@ -89,7 +80,7 @@ exports.AccordionItem = AccordionItem;
|
|
|
89
80
|
var useAccordion = function useAccordion(props) {
|
|
90
81
|
var _useTogglableSections = (0, _useTogglableSections2.useTogglableSections)({
|
|
91
82
|
toggleProperty: 'open',
|
|
92
|
-
onToggleProperty: '
|
|
83
|
+
onToggleProperty: 'onToggle',
|
|
93
84
|
singleOpen: props && !!props.singleOpen
|
|
94
85
|
}),
|
|
95
86
|
register = _useTogglableSections.register,
|
|
@@ -98,24 +89,8 @@ var useAccordion = function useAccordion(props) {
|
|
|
98
89
|
registered = _useTogglableSections.registered,
|
|
99
90
|
rest = (0, _objectWithoutProperties2["default"])(_useTogglableSections, _excluded);
|
|
100
91
|
|
|
101
|
-
|
|
102
|
-
return Object.keys(registered.current);
|
|
103
|
-
}, [registered.current.length]);
|
|
104
|
-
var openAll = (0, _react.useCallback)(function () {
|
|
105
|
-
setOpened(keys.reduce(function (newOpened, key) {
|
|
106
|
-
return (0, _extends3["default"])({}, newOpened, (0, _defineProperty2["default"])({}, key, true));
|
|
107
|
-
}, {}));
|
|
108
|
-
}, [keys]);
|
|
109
|
-
var closeAll = (0, _react.useCallback)(function () {
|
|
110
|
-
return setOpened({});
|
|
111
|
-
}, []);
|
|
112
|
-
return (0, _extends3["default"])({
|
|
92
|
+
return (0, _extends2["default"])({
|
|
113
93
|
register: register,
|
|
114
|
-
openAll: openAll,
|
|
115
|
-
closeAll: closeAll,
|
|
116
|
-
isOpenAll: keys.length ? keys.every(function (v) {
|
|
117
|
-
return opened[v];
|
|
118
|
-
}) : false,
|
|
119
94
|
setOpened: setOpened,
|
|
120
95
|
opened: opened,
|
|
121
96
|
registered: registered
|
package/core/Link/index.js
CHANGED
|
@@ -15,6 +15,8 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
15
15
|
|
|
16
16
|
var React = _interopRequireWildcard(require("react"));
|
|
17
17
|
|
|
18
|
+
var _Link = _interopRequireDefault(require("@digigov/react-core/Link"));
|
|
19
|
+
|
|
18
20
|
var _excluded = ["children", "href"];
|
|
19
21
|
|
|
20
22
|
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); }
|
|
@@ -26,7 +28,7 @@ var CommonLink = function CommonLink(props) {
|
|
|
26
28
|
};
|
|
27
29
|
|
|
28
30
|
exports.CommonLink = CommonLink;
|
|
29
|
-
var LinkComponentContext = /*#__PURE__*/React.createContext(
|
|
31
|
+
var LinkComponentContext = /*#__PURE__*/React.createContext(_Link["default"]);
|
|
30
32
|
|
|
31
33
|
var LinkProvider = function LinkProvider(props) {
|
|
32
34
|
return /*#__PURE__*/React.createElement(LinkComponentContext.Provider, {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PaginationLabelProps as CorePaginationLabelProps } from '@digigov/react-extensions/admin/PaginationLabel';
|
|
3
|
+
export interface PaginationLabelProps extends CorePaginationLabelProps {
|
|
4
|
+
/**
|
|
5
|
+
* Use start to set the value of the start point of the results shown.
|
|
6
|
+
*/
|
|
7
|
+
start: number;
|
|
8
|
+
/**
|
|
9
|
+
* Use end to set the value of the end point of the results shown.
|
|
10
|
+
*/
|
|
11
|
+
end: number;
|
|
12
|
+
/**
|
|
13
|
+
* Use total to set the value of the total results.
|
|
14
|
+
*/
|
|
15
|
+
total: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* PaginationLabel component is used for placing the pagination results label.
|
|
19
|
+
*/
|
|
20
|
+
export declare const PaginationLabel: React.ForwardRefExoticComponent<Pick<PaginationLabelProps, "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" | "end" | "start" | "total"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
21
|
+
export default PaginationLabel;
|
|
@@ -0,0 +1,34 @@
|
|
|
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.PaginationLabel = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _PaginationLabel = _interopRequireDefault(require("@digigov/react-extensions/admin/PaginationLabel"));
|
|
13
|
+
|
|
14
|
+
var _app = require("@digigov/ui/app");
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* PaginationLabel component is used for placing the pagination results label.
|
|
18
|
+
*/
|
|
19
|
+
var PaginationLabel = /*#__PURE__*/_react["default"].forwardRef(function PaginationLabel(_ref, ref) {
|
|
20
|
+
var start = _ref.start,
|
|
21
|
+
end = _ref.end,
|
|
22
|
+
total = _ref.total;
|
|
23
|
+
|
|
24
|
+
var _useTranslation = (0, _app.useTranslation)(),
|
|
25
|
+
t = _useTranslation.t;
|
|
26
|
+
|
|
27
|
+
return /*#__PURE__*/_react["default"].createElement(_PaginationLabel["default"], {
|
|
28
|
+
ref: ref
|
|
29
|
+
}, t('pagination.show'), " ", /*#__PURE__*/_react["default"].createElement("b", null, start), " ", t('pagination.to'), " ", /*#__PURE__*/_react["default"].createElement("b", null, end), ' ', t('pagination.of'), " ", /*#__PURE__*/_react["default"].createElement("b", null, total), " ", t('pagination.results'));
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
exports.PaginationLabel = PaginationLabel;
|
|
33
|
+
var _default = PaginationLabel;
|
|
34
|
+
exports["default"] = _default;
|
package/core/Table/index.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ export * from '@digigov/react-core/TableBody';
|
|
|
3
3
|
export * from '@digigov/react-core/TableCaption';
|
|
4
4
|
export * from '@digigov/react-core/TableDataCell';
|
|
5
5
|
export * from '@digigov/react-core/TableHead';
|
|
6
|
-
export * from '@digigov/react-core/
|
|
6
|
+
export * from '@digigov/react-core/TableHeadCell';
|
|
7
7
|
export * from '@digigov/react-core/TableRow';
|
package/core/Table/index.js
CHANGED
|
@@ -69,15 +69,15 @@ Object.keys(_TableHead).forEach(function (key) {
|
|
|
69
69
|
});
|
|
70
70
|
});
|
|
71
71
|
|
|
72
|
-
var
|
|
72
|
+
var _TableHeadCell = require("@digigov/react-core/TableHeadCell");
|
|
73
73
|
|
|
74
|
-
Object.keys(
|
|
74
|
+
Object.keys(_TableHeadCell).forEach(function (key) {
|
|
75
75
|
if (key === "default" || key === "__esModule") return;
|
|
76
|
-
if (key in exports && exports[key] ===
|
|
76
|
+
if (key in exports && exports[key] === _TableHeadCell[key]) return;
|
|
77
77
|
Object.defineProperty(exports, key, {
|
|
78
78
|
enumerable: true,
|
|
79
79
|
get: function get() {
|
|
80
|
-
return
|
|
80
|
+
return _TableHeadCell[key];
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
83
|
});
|
package/core/index.d.ts
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
export { default as Button } from '@digigov/ui/core/Button';
|
|
2
2
|
export * from '@digigov/ui/core/Button';
|
|
3
|
-
export { default as WarningText } from '@digigov/ui/core/WarningText';
|
|
4
3
|
export * from '@digigov/ui/core/Accordion';
|
|
5
4
|
export * from '@digigov/ui/core/Blockquote';
|
|
5
|
+
export * from '@digigov/ui/core/Breadcrumbs';
|
|
6
|
+
export * from '@digigov/ui/core/Card';
|
|
6
7
|
export * from '@digigov/ui/core/Details';
|
|
8
|
+
export * from '@digigov/ui/core/Divider';
|
|
7
9
|
export * from '@digigov/ui/core/ErrorSummary';
|
|
10
|
+
export * from '@digigov/ui/core/Hidden';
|
|
8
11
|
export * from '@digigov/ui/core/Link';
|
|
9
12
|
export * from '@digigov/ui/core/List';
|
|
10
13
|
export * from '@digigov/ui/core/NavList';
|
|
11
14
|
export * from '@digigov/ui/core/ServiceBadge';
|
|
12
|
-
export * from '@digigov/ui/core/SummaryList';
|
|
13
|
-
export * from '@digigov/ui/core/Tabs';
|
|
14
15
|
export * from '@digigov/ui/core/NotificationBanner';
|
|
16
|
+
export * from '@digigov/ui/core/SummaryList';
|
|
15
17
|
export * from '@digigov/ui/core/Table';
|
|
16
|
-
export * from '@digigov/ui/core/
|
|
17
|
-
export * from '@digigov/ui/core/
|
|
18
|
+
export * from '@digigov/ui/core/Tabs';
|
|
19
|
+
export * from '@digigov/ui/core/VisuallyHidden';
|
|
20
|
+
export { default as WarningText } from '@digigov/ui/core/WarningText';
|
|
21
|
+
export * from '@digigov/ui/core/PaginationLabel';
|
package/core/index.js
CHANGED
|
@@ -38,8 +38,6 @@ Object.keys(_Button).forEach(function (key) {
|
|
|
38
38
|
});
|
|
39
39
|
});
|
|
40
40
|
|
|
41
|
-
var _WarningText = _interopRequireDefault(require("@digigov/ui/core/WarningText"));
|
|
42
|
-
|
|
43
41
|
var _Accordion = require("@digigov/ui/core/Accordion");
|
|
44
42
|
|
|
45
43
|
Object.keys(_Accordion).forEach(function (key) {
|
|
@@ -68,6 +66,34 @@ Object.keys(_Blockquote).forEach(function (key) {
|
|
|
68
66
|
});
|
|
69
67
|
});
|
|
70
68
|
|
|
69
|
+
var _Breadcrumbs = require("@digigov/ui/core/Breadcrumbs");
|
|
70
|
+
|
|
71
|
+
Object.keys(_Breadcrumbs).forEach(function (key) {
|
|
72
|
+
if (key === "default" || key === "__esModule") return;
|
|
73
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
74
|
+
if (key in exports && exports[key] === _Breadcrumbs[key]) return;
|
|
75
|
+
Object.defineProperty(exports, key, {
|
|
76
|
+
enumerable: true,
|
|
77
|
+
get: function get() {
|
|
78
|
+
return _Breadcrumbs[key];
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
var _Card = require("@digigov/ui/core/Card");
|
|
84
|
+
|
|
85
|
+
Object.keys(_Card).forEach(function (key) {
|
|
86
|
+
if (key === "default" || key === "__esModule") return;
|
|
87
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
88
|
+
if (key in exports && exports[key] === _Card[key]) return;
|
|
89
|
+
Object.defineProperty(exports, key, {
|
|
90
|
+
enumerable: true,
|
|
91
|
+
get: function get() {
|
|
92
|
+
return _Card[key];
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
|
|
71
97
|
var _Details = require("@digigov/ui/core/Details");
|
|
72
98
|
|
|
73
99
|
Object.keys(_Details).forEach(function (key) {
|
|
@@ -82,6 +108,20 @@ Object.keys(_Details).forEach(function (key) {
|
|
|
82
108
|
});
|
|
83
109
|
});
|
|
84
110
|
|
|
111
|
+
var _Divider = require("@digigov/ui/core/Divider");
|
|
112
|
+
|
|
113
|
+
Object.keys(_Divider).forEach(function (key) {
|
|
114
|
+
if (key === "default" || key === "__esModule") return;
|
|
115
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
116
|
+
if (key in exports && exports[key] === _Divider[key]) return;
|
|
117
|
+
Object.defineProperty(exports, key, {
|
|
118
|
+
enumerable: true,
|
|
119
|
+
get: function get() {
|
|
120
|
+
return _Divider[key];
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
|
|
85
125
|
var _ErrorSummary = require("@digigov/ui/core/ErrorSummary");
|
|
86
126
|
|
|
87
127
|
Object.keys(_ErrorSummary).forEach(function (key) {
|
|
@@ -96,6 +136,20 @@ Object.keys(_ErrorSummary).forEach(function (key) {
|
|
|
96
136
|
});
|
|
97
137
|
});
|
|
98
138
|
|
|
139
|
+
var _Hidden = require("@digigov/ui/core/Hidden");
|
|
140
|
+
|
|
141
|
+
Object.keys(_Hidden).forEach(function (key) {
|
|
142
|
+
if (key === "default" || key === "__esModule") return;
|
|
143
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
144
|
+
if (key in exports && exports[key] === _Hidden[key]) return;
|
|
145
|
+
Object.defineProperty(exports, key, {
|
|
146
|
+
enumerable: true,
|
|
147
|
+
get: function get() {
|
|
148
|
+
return _Hidden[key];
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
|
|
99
153
|
var _Link = require("@digigov/ui/core/Link");
|
|
100
154
|
|
|
101
155
|
Object.keys(_Link).forEach(function (key) {
|
|
@@ -152,6 +206,20 @@ Object.keys(_ServiceBadge).forEach(function (key) {
|
|
|
152
206
|
});
|
|
153
207
|
});
|
|
154
208
|
|
|
209
|
+
var _NotificationBanner = require("@digigov/ui/core/NotificationBanner");
|
|
210
|
+
|
|
211
|
+
Object.keys(_NotificationBanner).forEach(function (key) {
|
|
212
|
+
if (key === "default" || key === "__esModule") return;
|
|
213
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
214
|
+
if (key in exports && exports[key] === _NotificationBanner[key]) return;
|
|
215
|
+
Object.defineProperty(exports, key, {
|
|
216
|
+
enumerable: true,
|
|
217
|
+
get: function get() {
|
|
218
|
+
return _NotificationBanner[key];
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
});
|
|
222
|
+
|
|
155
223
|
var _SummaryList = require("@digigov/ui/core/SummaryList");
|
|
156
224
|
|
|
157
225
|
Object.keys(_SummaryList).forEach(function (key) {
|
|
@@ -166,58 +234,60 @@ Object.keys(_SummaryList).forEach(function (key) {
|
|
|
166
234
|
});
|
|
167
235
|
});
|
|
168
236
|
|
|
169
|
-
var
|
|
237
|
+
var _Table = require("@digigov/ui/core/Table");
|
|
170
238
|
|
|
171
|
-
Object.keys(
|
|
239
|
+
Object.keys(_Table).forEach(function (key) {
|
|
172
240
|
if (key === "default" || key === "__esModule") return;
|
|
173
241
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
174
|
-
if (key in exports && exports[key] ===
|
|
242
|
+
if (key in exports && exports[key] === _Table[key]) return;
|
|
175
243
|
Object.defineProperty(exports, key, {
|
|
176
244
|
enumerable: true,
|
|
177
245
|
get: function get() {
|
|
178
|
-
return
|
|
246
|
+
return _Table[key];
|
|
179
247
|
}
|
|
180
248
|
});
|
|
181
249
|
});
|
|
182
250
|
|
|
183
|
-
var
|
|
251
|
+
var _Tabs = require("@digigov/ui/core/Tabs");
|
|
184
252
|
|
|
185
|
-
Object.keys(
|
|
253
|
+
Object.keys(_Tabs).forEach(function (key) {
|
|
186
254
|
if (key === "default" || key === "__esModule") return;
|
|
187
255
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
188
|
-
if (key in exports && exports[key] ===
|
|
256
|
+
if (key in exports && exports[key] === _Tabs[key]) return;
|
|
189
257
|
Object.defineProperty(exports, key, {
|
|
190
258
|
enumerable: true,
|
|
191
259
|
get: function get() {
|
|
192
|
-
return
|
|
260
|
+
return _Tabs[key];
|
|
193
261
|
}
|
|
194
262
|
});
|
|
195
263
|
});
|
|
196
264
|
|
|
197
|
-
var
|
|
265
|
+
var _VisuallyHidden = require("@digigov/ui/core/VisuallyHidden");
|
|
198
266
|
|
|
199
|
-
Object.keys(
|
|
267
|
+
Object.keys(_VisuallyHidden).forEach(function (key) {
|
|
200
268
|
if (key === "default" || key === "__esModule") return;
|
|
201
269
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
202
|
-
if (key in exports && exports[key] ===
|
|
270
|
+
if (key in exports && exports[key] === _VisuallyHidden[key]) return;
|
|
203
271
|
Object.defineProperty(exports, key, {
|
|
204
272
|
enumerable: true,
|
|
205
273
|
get: function get() {
|
|
206
|
-
return
|
|
274
|
+
return _VisuallyHidden[key];
|
|
207
275
|
}
|
|
208
276
|
});
|
|
209
277
|
});
|
|
210
278
|
|
|
211
|
-
var
|
|
279
|
+
var _WarningText = _interopRequireDefault(require("@digigov/ui/core/WarningText"));
|
|
212
280
|
|
|
213
|
-
|
|
281
|
+
var _PaginationLabel = require("@digigov/ui/core/PaginationLabel");
|
|
282
|
+
|
|
283
|
+
Object.keys(_PaginationLabel).forEach(function (key) {
|
|
214
284
|
if (key === "default" || key === "__esModule") return;
|
|
215
285
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
216
|
-
if (key in exports && exports[key] ===
|
|
286
|
+
if (key in exports && exports[key] === _PaginationLabel[key]) return;
|
|
217
287
|
Object.defineProperty(exports, key, {
|
|
218
288
|
enumerable: true,
|
|
219
289
|
get: function get() {
|
|
220
|
-
return
|
|
290
|
+
return _PaginationLabel[key];
|
|
221
291
|
}
|
|
222
292
|
});
|
|
223
293
|
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["closeBehaviour"];
|
|
4
|
+
import React, { useEffect, useRef } from 'react';
|
|
5
|
+
import CoreDropdown from '@digigov/react-extensions/admin/Dropdown';
|
|
6
|
+
export * from '@digigov/react-extensions/admin/DropdownButton';
|
|
7
|
+
export * from '@digigov/react-extensions/admin/DropdownContent';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Dropdown component is used for showing more options with a button.
|
|
11
|
+
*/
|
|
12
|
+
export var Dropdown = function Dropdown(_ref) {
|
|
13
|
+
var _ref$closeBehaviour = _ref.closeBehaviour,
|
|
14
|
+
closeBehaviour = _ref$closeBehaviour === void 0 ? 'clickOutside' : _ref$closeBehaviour,
|
|
15
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
16
|
+
|
|
17
|
+
var innerRef = useRef();
|
|
18
|
+
useEffect(function () {
|
|
19
|
+
var handleClickOutside = function handleClickOutside(event) {
|
|
20
|
+
if (innerRef.current && !innerRef.current.contains(event.target)) {
|
|
21
|
+
innerRef.current.open = false;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
if (closeBehaviour === 'clickOutside') {
|
|
26
|
+
document.addEventListener('click', handleClickOutside, true);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return function () {
|
|
30
|
+
if (closeBehaviour === 'clickOutside') {
|
|
31
|
+
document.removeEventListener('click', handleClickOutside, true);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}, []); // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
|
|
37
|
+
return /*#__PURE__*/React.createElement(CoreDropdown, _extends({
|
|
38
|
+
ref: innerRef
|
|
39
|
+
}, props));
|
|
40
|
+
};
|
|
41
|
+
export default Dropdown;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@digigov/ui/admin/Dropdown';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
3
|
var _excluded = ["register", "setOpened", "opened", "registered"];
|
|
5
4
|
|
|
6
5
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
6
|
+
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';
|
|
@@ -11,7 +11,6 @@ import AccordionSectionHeader from '@digigov/react-core/AccordionSectionHeader';
|
|
|
11
11
|
import AccordionControls from '@digigov/react-core/AccordionControls';
|
|
12
12
|
import withDeprecation from '@digigov/ui/utils/withDeprecation';
|
|
13
13
|
import { useTogglableSections } from '@digigov/ui/hooks/useTogglableSections';
|
|
14
|
-
import React, { useCallback, useMemo } from 'react';
|
|
15
14
|
export var AccordionItemDetails = withDeprecation(AccordionSectionContent, {
|
|
16
15
|
name: 'AccordionItemDetails',
|
|
17
16
|
rename: 'AccordionSectionContent'
|
|
@@ -30,7 +29,7 @@ export var AccordionItem = withDeprecation( /*#__PURE__*/React.memo(AccordionSec
|
|
|
30
29
|
var useAccordion = function useAccordion(props) {
|
|
31
30
|
var _useTogglableSections = useTogglableSections({
|
|
32
31
|
toggleProperty: 'open',
|
|
33
|
-
onToggleProperty: '
|
|
32
|
+
onToggleProperty: 'onToggle',
|
|
34
33
|
singleOpen: props && !!props.singleOpen
|
|
35
34
|
}),
|
|
36
35
|
register = _useTogglableSections.register,
|
|
@@ -39,24 +38,8 @@ var useAccordion = function useAccordion(props) {
|
|
|
39
38
|
registered = _useTogglableSections.registered,
|
|
40
39
|
rest = _objectWithoutProperties(_useTogglableSections, _excluded);
|
|
41
40
|
|
|
42
|
-
var keys = useMemo(function () {
|
|
43
|
-
return Object.keys(registered.current);
|
|
44
|
-
}, [registered.current.length]);
|
|
45
|
-
var openAll = useCallback(function () {
|
|
46
|
-
setOpened(keys.reduce(function (newOpened, key) {
|
|
47
|
-
return _extends({}, newOpened, _defineProperty({}, key, true));
|
|
48
|
-
}, {}));
|
|
49
|
-
}, [keys]);
|
|
50
|
-
var closeAll = useCallback(function () {
|
|
51
|
-
return setOpened({});
|
|
52
|
-
}, []);
|
|
53
41
|
return _extends({
|
|
54
42
|
register: register,
|
|
55
|
-
openAll: openAll,
|
|
56
|
-
closeAll: closeAll,
|
|
57
|
-
isOpenAll: keys.length ? keys.every(function (v) {
|
|
58
|
-
return opened[v];
|
|
59
|
-
}) : false,
|
|
60
43
|
setOpened: setOpened,
|
|
61
44
|
opened: opened,
|
|
62
45
|
registered: registered
|
package/es/core/Link/index.js
CHANGED
|
@@ -2,10 +2,11 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["children", "href"];
|
|
4
4
|
import * as React from 'react';
|
|
5
|
+
import CoreLink from '@digigov/react-core/Link';
|
|
5
6
|
export var CommonLink = function CommonLink(props) {
|
|
6
7
|
return /*#__PURE__*/React.createElement("a", props, props.children);
|
|
7
8
|
};
|
|
8
|
-
var LinkComponentContext = /*#__PURE__*/React.createContext(
|
|
9
|
+
var LinkComponentContext = /*#__PURE__*/React.createContext(CoreLink);
|
|
9
10
|
export var LinkProvider = function LinkProvider(props) {
|
|
10
11
|
return /*#__PURE__*/React.createElement(LinkComponentContext.Provider, {
|
|
11
12
|
value: props.component
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import CorePaginationLabel from '@digigov/react-extensions/admin/PaginationLabel';
|
|
3
|
+
import { useTranslation } from '@digigov/ui/app';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* PaginationLabel component is used for placing the pagination results label.
|
|
7
|
+
*/
|
|
8
|
+
export var PaginationLabel = /*#__PURE__*/React.forwardRef(function PaginationLabel(_ref, ref) {
|
|
9
|
+
var start = _ref.start,
|
|
10
|
+
end = _ref.end,
|
|
11
|
+
total = _ref.total;
|
|
12
|
+
|
|
13
|
+
var _useTranslation = useTranslation(),
|
|
14
|
+
t = _useTranslation.t;
|
|
15
|
+
|
|
16
|
+
return /*#__PURE__*/React.createElement(CorePaginationLabel, {
|
|
17
|
+
ref: ref
|
|
18
|
+
}, t('pagination.show'), " ", /*#__PURE__*/React.createElement("b", null, start), " ", t('pagination.to'), " ", /*#__PURE__*/React.createElement("b", null, end), ' ', t('pagination.of'), " ", /*#__PURE__*/React.createElement("b", null, total), " ", t('pagination.results'));
|
|
19
|
+
});
|
|
20
|
+
export default PaginationLabel;
|
package/es/core/Table/index.js
CHANGED
|
@@ -3,5 +3,5 @@ export * from '@digigov/react-core/TableBody';
|
|
|
3
3
|
export * from '@digigov/react-core/TableCaption';
|
|
4
4
|
export * from '@digigov/react-core/TableDataCell';
|
|
5
5
|
export * from '@digigov/react-core/TableHead';
|
|
6
|
-
export * from '@digigov/react-core/
|
|
6
|
+
export * from '@digigov/react-core/TableHeadCell';
|
|
7
7
|
export * from '@digigov/react-core/TableRow';
|
package/es/core/index.js
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
export { default as Button } from '@digigov/ui/core/Button';
|
|
2
2
|
export * from '@digigov/ui/core/Button';
|
|
3
|
-
export { default as WarningText } from '@digigov/ui/core/WarningText';
|
|
4
3
|
export * from '@digigov/ui/core/Accordion';
|
|
5
4
|
export * from '@digigov/ui/core/Blockquote';
|
|
5
|
+
export * from '@digigov/ui/core/Breadcrumbs';
|
|
6
|
+
export * from '@digigov/ui/core/Card';
|
|
6
7
|
export * from '@digigov/ui/core/Details';
|
|
8
|
+
export * from '@digigov/ui/core/Divider';
|
|
7
9
|
export * from '@digigov/ui/core/ErrorSummary';
|
|
10
|
+
export * from '@digigov/ui/core/Hidden';
|
|
8
11
|
export * from '@digigov/ui/core/Link';
|
|
9
12
|
export * from '@digigov/ui/core/List';
|
|
10
13
|
export * from '@digigov/ui/core/NavList';
|
|
11
14
|
export * from '@digigov/ui/core/ServiceBadge';
|
|
12
|
-
export * from '@digigov/ui/core/SummaryList';
|
|
13
|
-
export * from '@digigov/ui/core/Tabs';
|
|
14
15
|
export * from '@digigov/ui/core/NotificationBanner';
|
|
16
|
+
export * from '@digigov/ui/core/SummaryList';
|
|
15
17
|
export * from '@digigov/ui/core/Table';
|
|
16
|
-
export * from '@digigov/ui/core/
|
|
17
|
-
export * from '@digigov/ui/core/
|
|
18
|
+
export * from '@digigov/ui/core/Tabs';
|
|
19
|
+
export * from '@digigov/ui/core/VisuallyHidden';
|
|
20
|
+
export { default as WarningText } from '@digigov/ui/core/WarningText';
|
|
21
|
+
export * from '@digigov/ui/core/PaginationLabel';
|
package/es/index.js
CHANGED
package/es/locales/el.js
CHANGED
|
@@ -51,5 +51,11 @@ export default {
|
|
|
51
51
|
outdated: {
|
|
52
52
|
mobile: 'Η ιστοσελίδα ενδέχεται να μην λειτουργεί σωστά καθώς ο browser σας είτε δεν υποστηρίζεται είτε είναι μη επικαιροποιημένος. Παρακαλούμε επικαιροποιήστε τον browser σας.',
|
|
53
53
|
web: 'Η ιστοσελίδα ενδέχεται να μην λειτουργεί σωστά καθώς ο browser σας είναι μη επικαιροποιημένος. Για να επικαιροποιήσετε τον browser σας επισκεφθείτε την ιστοσελίδα: '
|
|
54
|
+
},
|
|
55
|
+
pagination: {
|
|
56
|
+
show: 'Εμφανίζονται',
|
|
57
|
+
to: 'έως',
|
|
58
|
+
of: 'από',
|
|
59
|
+
results: 'αποτελέσματα'
|
|
54
60
|
}
|
|
55
61
|
};
|
package/es/locales/en.js
CHANGED
|
@@ -51,5 +51,11 @@ export default {
|
|
|
51
51
|
outdated: {
|
|
52
52
|
mobile: 'This site may not work properly because your browser is either not supported or outdated. Please update your browser',
|
|
53
53
|
web: 'This site may not work properly because your browser outdated. To update your browser visit: '
|
|
54
|
+
},
|
|
55
|
+
pagination: {
|
|
56
|
+
show: 'Showing',
|
|
57
|
+
to: 'to',
|
|
58
|
+
of: 'of',
|
|
59
|
+
results: 'results'
|
|
54
60
|
}
|
|
55
61
|
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["closeBehaviour"];
|
|
4
|
+
import React, { useEffect, useRef } from 'react';
|
|
5
|
+
import CoreDropdown from '@digigov/react-extensions/admin/Dropdown';
|
|
6
|
+
export * from '@digigov/react-extensions/admin/DropdownButton';
|
|
7
|
+
export * from '@digigov/react-extensions/admin/DropdownContent';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Dropdown component is used for showing more options with a button.
|
|
11
|
+
*/
|
|
12
|
+
export var Dropdown = function Dropdown(_ref) {
|
|
13
|
+
var _ref$closeBehaviour = _ref.closeBehaviour,
|
|
14
|
+
closeBehaviour = _ref$closeBehaviour === void 0 ? 'clickOutside' : _ref$closeBehaviour,
|
|
15
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
16
|
+
|
|
17
|
+
var innerRef = useRef();
|
|
18
|
+
useEffect(function () {
|
|
19
|
+
var handleClickOutside = function handleClickOutside(event) {
|
|
20
|
+
if (innerRef.current && !innerRef.current.contains(event.target)) {
|
|
21
|
+
innerRef.current.open = false;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
if (closeBehaviour === 'clickOutside') {
|
|
26
|
+
document.addEventListener('click', handleClickOutside, true);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return function () {
|
|
30
|
+
if (closeBehaviour === 'clickOutside') {
|
|
31
|
+
document.removeEventListener('click', handleClickOutside, true);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}, []); // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
|
|
37
|
+
return /*#__PURE__*/React.createElement(CoreDropdown, _extends({
|
|
38
|
+
ref: innerRef
|
|
39
|
+
}, props));
|
|
40
|
+
};
|
|
41
|
+
export default Dropdown;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@digigov/ui/admin/Dropdown';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
3
|
var _excluded = ["register", "setOpened", "opened", "registered"];
|
|
5
4
|
|
|
6
5
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
6
|
+
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';
|
|
@@ -11,7 +11,6 @@ import AccordionSectionHeader from '@digigov/react-core/AccordionSectionHeader';
|
|
|
11
11
|
import AccordionControls from '@digigov/react-core/AccordionControls';
|
|
12
12
|
import withDeprecation from '@digigov/ui/utils/withDeprecation';
|
|
13
13
|
import { useTogglableSections } from '@digigov/ui/hooks/useTogglableSections';
|
|
14
|
-
import React, { useCallback, useMemo } from 'react';
|
|
15
14
|
export var AccordionItemDetails = withDeprecation(AccordionSectionContent, {
|
|
16
15
|
name: 'AccordionItemDetails',
|
|
17
16
|
rename: 'AccordionSectionContent'
|
|
@@ -30,7 +29,7 @@ export var AccordionItem = withDeprecation( /*#__PURE__*/React.memo(AccordionSec
|
|
|
30
29
|
var useAccordion = function useAccordion(props) {
|
|
31
30
|
var _useTogglableSections = useTogglableSections({
|
|
32
31
|
toggleProperty: 'open',
|
|
33
|
-
onToggleProperty: '
|
|
32
|
+
onToggleProperty: 'onToggle',
|
|
34
33
|
singleOpen: props && !!props.singleOpen
|
|
35
34
|
}),
|
|
36
35
|
register = _useTogglableSections.register,
|
|
@@ -39,24 +38,8 @@ var useAccordion = function useAccordion(props) {
|
|
|
39
38
|
registered = _useTogglableSections.registered,
|
|
40
39
|
rest = _objectWithoutProperties(_useTogglableSections, _excluded);
|
|
41
40
|
|
|
42
|
-
var keys = useMemo(function () {
|
|
43
|
-
return Object.keys(registered.current);
|
|
44
|
-
}, [registered.current.length]);
|
|
45
|
-
var openAll = useCallback(function () {
|
|
46
|
-
setOpened(keys.reduce(function (newOpened, key) {
|
|
47
|
-
return _extends({}, newOpened, _defineProperty({}, key, true));
|
|
48
|
-
}, {}));
|
|
49
|
-
}, [keys]);
|
|
50
|
-
var closeAll = useCallback(function () {
|
|
51
|
-
return setOpened({});
|
|
52
|
-
}, []);
|
|
53
41
|
return _extends({
|
|
54
42
|
register: register,
|
|
55
|
-
openAll: openAll,
|
|
56
|
-
closeAll: closeAll,
|
|
57
|
-
isOpenAll: keys.length ? keys.every(function (v) {
|
|
58
|
-
return opened[v];
|
|
59
|
-
}) : false,
|
|
60
43
|
setOpened: setOpened,
|
|
61
44
|
opened: opened,
|
|
62
45
|
registered: registered
|
package/esm/core/Link/index.js
CHANGED
|
@@ -2,10 +2,11 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["children", "href"];
|
|
4
4
|
import * as React from 'react';
|
|
5
|
+
import CoreLink from '@digigov/react-core/Link';
|
|
5
6
|
export var CommonLink = function CommonLink(props) {
|
|
6
7
|
return /*#__PURE__*/React.createElement("a", props, props.children);
|
|
7
8
|
};
|
|
8
|
-
var LinkComponentContext = /*#__PURE__*/React.createContext(
|
|
9
|
+
var LinkComponentContext = /*#__PURE__*/React.createContext(CoreLink);
|
|
9
10
|
export var LinkProvider = function LinkProvider(props) {
|
|
10
11
|
return /*#__PURE__*/React.createElement(LinkComponentContext.Provider, {
|
|
11
12
|
value: props.component
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import CorePaginationLabel from '@digigov/react-extensions/admin/PaginationLabel';
|
|
3
|
+
import { useTranslation } from '@digigov/ui/app';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* PaginationLabel component is used for placing the pagination results label.
|
|
7
|
+
*/
|
|
8
|
+
export var PaginationLabel = /*#__PURE__*/React.forwardRef(function PaginationLabel(_ref, ref) {
|
|
9
|
+
var start = _ref.start,
|
|
10
|
+
end = _ref.end,
|
|
11
|
+
total = _ref.total;
|
|
12
|
+
|
|
13
|
+
var _useTranslation = useTranslation(),
|
|
14
|
+
t = _useTranslation.t;
|
|
15
|
+
|
|
16
|
+
return /*#__PURE__*/React.createElement(CorePaginationLabel, {
|
|
17
|
+
ref: ref
|
|
18
|
+
}, t('pagination.show'), " ", /*#__PURE__*/React.createElement("b", null, start), " ", t('pagination.to'), " ", /*#__PURE__*/React.createElement("b", null, end), ' ', t('pagination.of'), " ", /*#__PURE__*/React.createElement("b", null, total), " ", t('pagination.results'));
|
|
19
|
+
});
|
|
20
|
+
export default PaginationLabel;
|
package/esm/core/Table/index.js
CHANGED
|
@@ -3,5 +3,5 @@ export * from '@digigov/react-core/TableBody';
|
|
|
3
3
|
export * from '@digigov/react-core/TableCaption';
|
|
4
4
|
export * from '@digigov/react-core/TableDataCell';
|
|
5
5
|
export * from '@digigov/react-core/TableHead';
|
|
6
|
-
export * from '@digigov/react-core/
|
|
6
|
+
export * from '@digigov/react-core/TableHeadCell';
|
|
7
7
|
export * from '@digigov/react-core/TableRow';
|
package/esm/core/index.js
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
export { default as Button } from '@digigov/ui/core/Button';
|
|
2
2
|
export * from '@digigov/ui/core/Button';
|
|
3
|
-
export { default as WarningText } from '@digigov/ui/core/WarningText';
|
|
4
3
|
export * from '@digigov/ui/core/Accordion';
|
|
5
4
|
export * from '@digigov/ui/core/Blockquote';
|
|
5
|
+
export * from '@digigov/ui/core/Breadcrumbs';
|
|
6
|
+
export * from '@digigov/ui/core/Card';
|
|
6
7
|
export * from '@digigov/ui/core/Details';
|
|
8
|
+
export * from '@digigov/ui/core/Divider';
|
|
7
9
|
export * from '@digigov/ui/core/ErrorSummary';
|
|
10
|
+
export * from '@digigov/ui/core/Hidden';
|
|
8
11
|
export * from '@digigov/ui/core/Link';
|
|
9
12
|
export * from '@digigov/ui/core/List';
|
|
10
13
|
export * from '@digigov/ui/core/NavList';
|
|
11
14
|
export * from '@digigov/ui/core/ServiceBadge';
|
|
12
|
-
export * from '@digigov/ui/core/SummaryList';
|
|
13
|
-
export * from '@digigov/ui/core/Tabs';
|
|
14
15
|
export * from '@digigov/ui/core/NotificationBanner';
|
|
16
|
+
export * from '@digigov/ui/core/SummaryList';
|
|
15
17
|
export * from '@digigov/ui/core/Table';
|
|
16
|
-
export * from '@digigov/ui/core/
|
|
17
|
-
export * from '@digigov/ui/core/
|
|
18
|
+
export * from '@digigov/ui/core/Tabs';
|
|
19
|
+
export * from '@digigov/ui/core/VisuallyHidden';
|
|
20
|
+
export { default as WarningText } from '@digigov/ui/core/WarningText';
|
|
21
|
+
export * from '@digigov/ui/core/PaginationLabel';
|
package/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license Digigov v0.
|
|
1
|
+
/** @license Digigov v0.15.0
|
|
2
2
|
*
|
|
3
3
|
* This source code is licensed under the MIT license found in the
|
|
4
4
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -7,4 +7,5 @@ export * from '@digigov/ui/core';
|
|
|
7
7
|
export * from '@digigov/ui/layouts';
|
|
8
8
|
export * from '@digigov/ui/typography';
|
|
9
9
|
export * from '@digigov/ui/app';
|
|
10
|
-
export * from '@digigov/ui/govgr';
|
|
10
|
+
export * from '@digigov/ui/govgr';
|
|
11
|
+
export * from '@digigov/ui/admin';
|
package/esm/locales/el.js
CHANGED
|
@@ -51,5 +51,11 @@ export default {
|
|
|
51
51
|
outdated: {
|
|
52
52
|
mobile: 'Η ιστοσελίδα ενδέχεται να μην λειτουργεί σωστά καθώς ο browser σας είτε δεν υποστηρίζεται είτε είναι μη επικαιροποιημένος. Παρακαλούμε επικαιροποιήστε τον browser σας.',
|
|
53
53
|
web: 'Η ιστοσελίδα ενδέχεται να μην λειτουργεί σωστά καθώς ο browser σας είναι μη επικαιροποιημένος. Για να επικαιροποιήσετε τον browser σας επισκεφθείτε την ιστοσελίδα: '
|
|
54
|
+
},
|
|
55
|
+
pagination: {
|
|
56
|
+
show: 'Εμφανίζονται',
|
|
57
|
+
to: 'έως',
|
|
58
|
+
of: 'από',
|
|
59
|
+
results: 'αποτελέσματα'
|
|
54
60
|
}
|
|
55
61
|
};
|
package/esm/locales/en.js
CHANGED
|
@@ -51,5 +51,11 @@ export default {
|
|
|
51
51
|
outdated: {
|
|
52
52
|
mobile: 'This site may not work properly because your browser is either not supported or outdated. Please update your browser',
|
|
53
53
|
web: 'This site may not work properly because your browser outdated. To update your browser visit: '
|
|
54
|
+
},
|
|
55
|
+
pagination: {
|
|
56
|
+
show: 'Showing',
|
|
57
|
+
to: 'to',
|
|
58
|
+
of: 'of',
|
|
59
|
+
results: 'results'
|
|
54
60
|
}
|
|
55
61
|
};
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -67,4 +67,17 @@ Object.keys(_govgr).forEach(function (key) {
|
|
|
67
67
|
return _govgr[key];
|
|
68
68
|
}
|
|
69
69
|
});
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
var _admin = require("@digigov/ui/admin");
|
|
73
|
+
|
|
74
|
+
Object.keys(_admin).forEach(function (key) {
|
|
75
|
+
if (key === "default" || key === "__esModule") return;
|
|
76
|
+
if (key in exports && exports[key] === _admin[key]) return;
|
|
77
|
+
Object.defineProperty(exports, key, {
|
|
78
|
+
enumerable: true,
|
|
79
|
+
get: function get() {
|
|
80
|
+
return _admin[key];
|
|
81
|
+
}
|
|
82
|
+
});
|
|
70
83
|
});
|
package/locales/el.d.ts
CHANGED
package/locales/el.js
CHANGED
|
@@ -57,6 +57,12 @@ var _default = {
|
|
|
57
57
|
outdated: {
|
|
58
58
|
mobile: 'Η ιστοσελίδα ενδέχεται να μην λειτουργεί σωστά καθώς ο browser σας είτε δεν υποστηρίζεται είτε είναι μη επικαιροποιημένος. Παρακαλούμε επικαιροποιήστε τον browser σας.',
|
|
59
59
|
web: 'Η ιστοσελίδα ενδέχεται να μην λειτουργεί σωστά καθώς ο browser σας είναι μη επικαιροποιημένος. Για να επικαιροποιήσετε τον browser σας επισκεφθείτε την ιστοσελίδα: '
|
|
60
|
+
},
|
|
61
|
+
pagination: {
|
|
62
|
+
show: 'Εμφανίζονται',
|
|
63
|
+
to: 'έως',
|
|
64
|
+
of: 'από',
|
|
65
|
+
results: 'αποτελέσματα'
|
|
60
66
|
}
|
|
61
67
|
};
|
|
62
68
|
exports["default"] = _default;
|
package/locales/en.d.ts
CHANGED
package/locales/en.js
CHANGED
|
@@ -57,6 +57,12 @@ var _default = {
|
|
|
57
57
|
outdated: {
|
|
58
58
|
mobile: 'This site may not work properly because your browser is either not supported or outdated. Please update your browser',
|
|
59
59
|
web: 'This site may not work properly because your browser outdated. To update your browser visit: '
|
|
60
|
+
},
|
|
61
|
+
pagination: {
|
|
62
|
+
show: 'Showing',
|
|
63
|
+
to: 'to',
|
|
64
|
+
of: 'of',
|
|
65
|
+
results: 'results'
|
|
60
66
|
}
|
|
61
67
|
};
|
|
62
68
|
exports["default"] = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digigov/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "@digigov reusable components toolkit",
|
|
5
5
|
"module": "./esm/index.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -18,7 +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.
|
|
21
|
+
"@digigov/react-core": "0.9.0",
|
|
22
|
+
"@digigov/react-extensions": "0.9.0"
|
|
22
23
|
},
|
|
23
24
|
"gitHead": "c903a46306f77f55ad7fc4d2e274006f39a6c871",
|
|
24
25
|
"private": false,
|