@digigov/react-core 0.16.2 → 0.16.3

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 CHANGED
@@ -1,6 +1,14 @@
1
1
  # Change Log - @digigov/react-core
2
2
 
3
- This log was last generated on Tue, 13 Sep 2022 13:10:16 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 14 Sep 2022 12:03:44 GMT and should not be manually modified.
4
+
5
+ ## 0.16.3
6
+ Wed, 14 Sep 2022 12:03:44 GMT
7
+
8
+ ### Patches
9
+
10
+ - Make HellenicRepublicLogo's logo valid base64
11
+ - add new fileconteiner component
4
12
 
5
13
  ## 0.16.2
6
14
  Tue, 13 Sep 2022 13:10:16 GMT
@@ -0,0 +1,29 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`renders the FileUpload with hasUploadedFile prop 1`] = `
4
+ <ForwardRef(FileUploadContainer)
5
+ hasUploadedFile={true}
6
+ >
7
+ <ForwardRef(Base)
8
+ as="div"
9
+ className="govgr-uploaded-file"
10
+ >
11
+ <div
12
+ className="govgr-uploaded-file"
13
+ />
14
+ </ForwardRef(Base)>
15
+ </ForwardRef(FileUploadContainer)>
16
+ `;
17
+
18
+ exports[`renders the FileUpload with no props 1`] = `
19
+ <ForwardRef(FileUploadContainer)>
20
+ <ForwardRef(Base)
21
+ as="div"
22
+ className=""
23
+ >
24
+ <div
25
+ className=""
26
+ />
27
+ </ForwardRef(Base)>
28
+ </ForwardRef(FileUploadContainer)>
29
+ `;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { BaseProps } from '@digigov/react-core/Base';
3
+ export interface FileUploadContainerProps extends BaseProps<'div'> {
4
+ /**
5
+ * hasFiles is optional.
6
+ */
7
+ hasUploadedFile?: boolean;
8
+ }
9
+ /**
10
+ * Details for the FileUploadContainer.
11
+ * FileUploadContainer component is used for wrapping the FileUpload component
12
+ */
13
+ export declare const FileUploadContainer: React.ForwardRefExoticComponent<Pick<FileUploadContainerProps, "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "hasUploadedFile"> & React.RefAttributes<HTMLDivElement>>;
14
+ export default FileUploadContainer;
@@ -0,0 +1,41 @@
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.FileUploadContainer = void 0;
9
+
10
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
+
12
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
13
+
14
+ var _react = _interopRequireDefault(require("react"));
15
+
16
+ var _Base = _interopRequireDefault(require("@digigov/react-core/Base"));
17
+
18
+ var _clsx = _interopRequireDefault(require("clsx"));
19
+
20
+ var _excluded = ["className", "children", "hasUploadedFile"];
21
+
22
+ /**
23
+ * Details for the FileUploadContainer.
24
+ * FileUploadContainer component is used for wrapping the FileUpload component
25
+ */
26
+ var FileUploadContainer = /*#__PURE__*/_react["default"].forwardRef(function FileUploadContainer(_ref, ref) {
27
+ var className = _ref.className,
28
+ children = _ref.children,
29
+ _ref$hasUploadedFile = _ref.hasUploadedFile,
30
+ hasUploadedFile = _ref$hasUploadedFile === void 0 ? false : _ref$hasUploadedFile,
31
+ props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
32
+ return /*#__PURE__*/_react["default"].createElement(_Base["default"], (0, _extends2["default"])({
33
+ ref: ref,
34
+ as: "div",
35
+ className: (0, _clsx["default"])(className, hasUploadedFile && 'govgr-uploaded-file')
36
+ }, props), children);
37
+ });
38
+
39
+ exports.FileUploadContainer = FileUploadContainer;
40
+ var _default = FileUploadContainer;
41
+ exports["default"] = _default;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ var _react = _interopRequireDefault(require("react"));
6
+
7
+ var _enzyme = require("enzyme");
8
+
9
+ var _FileUploadContainer = _interopRequireDefault(require("@digigov/react-core/FileUploadContainer"));
10
+
11
+ var _ref = /*#__PURE__*/_react["default"].createElement(_FileUploadContainer["default"], null);
12
+
13
+ it('renders the FileUpload with no props', function () {
14
+ expect((0, _enzyme.mount)(_ref)).toMatchSnapshot();
15
+ });
16
+
17
+ var _ref2 = /*#__PURE__*/_react["default"].createElement(_FileUploadContainer["default"], {
18
+ hasUploadedFile: true
19
+ });
20
+
21
+ it('renders the FileUpload with hasUploadedFile prop', function () {
22
+ expect((0, _enzyme.mount)(_ref2)).toMatchSnapshot();
23
+ });