@digigov/react-core 0.23.1 → 0.24.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 +8 -1
- package/CaretContainer/__snapshots__/index.test.tsx.snap +16 -0
- package/CaretContainer/index.d.ts +11 -0
- package/CaretContainer/index.js +40 -0
- package/CaretContainer/index.test.d.ts +1 -0
- package/CaretContainer/index.test.js +15 -0
- package/es/CaretContainer/__snapshots__/index.test.tsx.snap +16 -0
- package/es/CaretContainer/index.js +24 -0
- package/es/CaretContainer/index.test.js +9 -0
- package/es/index.js +1 -0
- package/es/registry.js +2 -0
- package/esm/CaretContainer/__snapshots__/index.test.tsx.snap +16 -0
- package/esm/CaretContainer/index.js +24 -0
- package/esm/CaretContainer/index.test.js +9 -0
- package/esm/index.js +2 -1
- package/esm/registry.js +2 -0
- package/index.d.ts +1 -0
- package/index.js +13 -0
- package/package.json +2 -2
- package/registry.d.ts +1 -0
- package/registry.js +3 -0
- package/src/CaretContainer/__snapshots__/index.test.tsx.snap +16 -0
- package/src/CaretContainer/index.test.tsx +8 -0
- package/src/CaretContainer/index.tsx +29 -0
- package/src/index.ts +1 -0
- package/src/registry.js +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
# Change Log - @digigov/react-core
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Fri, 19 May 2023 13:15:06 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 0.24.0
|
|
6
|
+
Fri, 19 May 2023 13:15:06 GMT
|
|
7
|
+
|
|
8
|
+
### Minor changes
|
|
9
|
+
|
|
10
|
+
- Create CaretContainer component
|
|
4
11
|
|
|
5
12
|
## 0.23.1
|
|
6
13
|
Tue, 16 May 2023 13:42:28 GMT
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`renders the CaretContainer with no props 1`] = `
|
|
4
|
+
<ForwardRef(CaretContainer)>
|
|
5
|
+
<ForwardRef(Base)
|
|
6
|
+
as="div"
|
|
7
|
+
className="govgr-caret-container"
|
|
8
|
+
>
|
|
9
|
+
<div
|
|
10
|
+
className="govgr-caret-container"
|
|
11
|
+
>
|
|
12
|
+
hello
|
|
13
|
+
</div>
|
|
14
|
+
</ForwardRef(Base)>
|
|
15
|
+
</ForwardRef(CaretContainer)>
|
|
16
|
+
`;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseProps } from '@digigov/react-core/Base';
|
|
3
|
+
export interface CaretContainerProps extends BaseProps<'div'> {
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
* Use CaretContainer to wrap CaretIcon like ascending descending style.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
export declare const CaretContainer: React.ForwardRefExoticComponent<Pick<CaretContainerProps, "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" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export default CaretContainer;
|
|
@@ -0,0 +1,40 @@
|
|
|
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.CaretContainer = 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"];
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* Use CaretContainer to wrap CaretIcon like ascending descending style.
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
var CaretContainer = /*#__PURE__*/_react["default"].forwardRef(function CaretContainer(_ref, ref) {
|
|
28
|
+
var className = _ref.className,
|
|
29
|
+
children = _ref.children,
|
|
30
|
+
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
31
|
+
return /*#__PURE__*/_react["default"].createElement(_Base["default"], (0, _extends2["default"])({
|
|
32
|
+
as: "div",
|
|
33
|
+
ref: ref,
|
|
34
|
+
className: (0, _clsx["default"])(className, true && 'govgr-caret-container')
|
|
35
|
+
}, props), children);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
exports.CaretContainer = CaretContainer;
|
|
39
|
+
var _default = CaretContainer;
|
|
40
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
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 _CaretContainer = _interopRequireDefault(require("@digigov/react-core/CaretContainer"));
|
|
10
|
+
|
|
11
|
+
var _ref = /*#__PURE__*/_react["default"].createElement(_CaretContainer["default"], null, "hello");
|
|
12
|
+
|
|
13
|
+
it('renders the CaretContainer with no props', function () {
|
|
14
|
+
expect((0, _enzyme.mount)(_ref)).toMatchSnapshot();
|
|
15
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`renders the CaretContainer with no props 1`] = `
|
|
4
|
+
<ForwardRef(CaretContainer)>
|
|
5
|
+
<ForwardRef(Base)
|
|
6
|
+
as="div"
|
|
7
|
+
className="govgr-caret-container"
|
|
8
|
+
>
|
|
9
|
+
<div
|
|
10
|
+
className="govgr-caret-container"
|
|
11
|
+
>
|
|
12
|
+
hello
|
|
13
|
+
</div>
|
|
14
|
+
</ForwardRef(Base)>
|
|
15
|
+
</ForwardRef(CaretContainer)>
|
|
16
|
+
`;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["className", "children"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import Base from '@digigov/react-core/Base';
|
|
6
|
+
import clsx from 'clsx';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* Use CaretContainer to wrap CaretIcon like ascending descending style.
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
export var CaretContainer = /*#__PURE__*/React.forwardRef(function CaretContainer(_ref, ref) {
|
|
14
|
+
var className = _ref.className,
|
|
15
|
+
children = _ref.children,
|
|
16
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
17
|
+
|
|
18
|
+
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
19
|
+
as: "div",
|
|
20
|
+
ref: ref,
|
|
21
|
+
className: clsx(className, true && 'govgr-caret-container')
|
|
22
|
+
}, props), children);
|
|
23
|
+
});
|
|
24
|
+
export default CaretContainer;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { mount } from 'enzyme';
|
|
3
|
+
import CaretContainer from '@digigov/react-core/CaretContainer';
|
|
4
|
+
|
|
5
|
+
var _ref = /*#__PURE__*/React.createElement(CaretContainer, null, "hello");
|
|
6
|
+
|
|
7
|
+
it('renders the CaretContainer with no props', function () {
|
|
8
|
+
expect(mount(_ref)).toMatchSnapshot();
|
|
9
|
+
});
|
package/es/index.js
CHANGED
|
@@ -24,6 +24,7 @@ export * from '@digigov/react-core/Card';
|
|
|
24
24
|
export * from '@digigov/react-core/CardAction';
|
|
25
25
|
export * from '@digigov/react-core/CardHeading';
|
|
26
26
|
export * from '@digigov/react-core/CardText';
|
|
27
|
+
export * from '@digigov/react-core/CaretContainer';
|
|
27
28
|
export * from '@digigov/react-core/CaretIcon';
|
|
28
29
|
export * from '@digigov/react-core/Checkbox';
|
|
29
30
|
export * from '@digigov/react-core/CheckboxConditional';
|
package/es/registry.js
CHANGED
|
@@ -25,6 +25,7 @@ import * as _digigov_react_core_Card from '@digigov/react-core/Card';
|
|
|
25
25
|
import * as _digigov_react_core_CardAction from '@digigov/react-core/CardAction';
|
|
26
26
|
import * as _digigov_react_core_CardHeading from '@digigov/react-core/CardHeading';
|
|
27
27
|
import * as _digigov_react_core_CardText from '@digigov/react-core/CardText';
|
|
28
|
+
import * as _digigov_react_core_CaretContainer from '@digigov/react-core/CaretContainer';
|
|
28
29
|
import * as _digigov_react_core_CaretIcon from '@digigov/react-core/CaretIcon';
|
|
29
30
|
import * as _digigov_react_core_Checkbox from '@digigov/react-core/Checkbox';
|
|
30
31
|
import * as _digigov_react_core_CheckboxConditional from '@digigov/react-core/CheckboxConditional';
|
|
@@ -203,6 +204,7 @@ export default {
|
|
|
203
204
|
'@digigov/react-core/CardAction': lazyImport(_digigov_react_core_CardAction),
|
|
204
205
|
'@digigov/react-core/CardHeading': lazyImport(_digigov_react_core_CardHeading),
|
|
205
206
|
'@digigov/react-core/CardText': lazyImport(_digigov_react_core_CardText),
|
|
207
|
+
'@digigov/react-core/CaretContainer': lazyImport(_digigov_react_core_CaretContainer),
|
|
206
208
|
'@digigov/react-core/CaretIcon': lazyImport(_digigov_react_core_CaretIcon),
|
|
207
209
|
'@digigov/react-core/Checkbox': lazyImport(_digigov_react_core_Checkbox),
|
|
208
210
|
'@digigov/react-core/CheckboxConditional': lazyImport(_digigov_react_core_CheckboxConditional),
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`renders the CaretContainer with no props 1`] = `
|
|
4
|
+
<ForwardRef(CaretContainer)>
|
|
5
|
+
<ForwardRef(Base)
|
|
6
|
+
as="div"
|
|
7
|
+
className="govgr-caret-container"
|
|
8
|
+
>
|
|
9
|
+
<div
|
|
10
|
+
className="govgr-caret-container"
|
|
11
|
+
>
|
|
12
|
+
hello
|
|
13
|
+
</div>
|
|
14
|
+
</ForwardRef(Base)>
|
|
15
|
+
</ForwardRef(CaretContainer)>
|
|
16
|
+
`;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["className", "children"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import Base from '@digigov/react-core/Base';
|
|
6
|
+
import clsx from 'clsx';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* Use CaretContainer to wrap CaretIcon like ascending descending style.
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
export var CaretContainer = /*#__PURE__*/React.forwardRef(function CaretContainer(_ref, ref) {
|
|
14
|
+
var className = _ref.className,
|
|
15
|
+
children = _ref.children,
|
|
16
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
17
|
+
|
|
18
|
+
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
19
|
+
as: "div",
|
|
20
|
+
ref: ref,
|
|
21
|
+
className: clsx(className, true && 'govgr-caret-container')
|
|
22
|
+
}, props), children);
|
|
23
|
+
});
|
|
24
|
+
export default CaretContainer;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { mount } from 'enzyme';
|
|
3
|
+
import CaretContainer from '@digigov/react-core/CaretContainer';
|
|
4
|
+
|
|
5
|
+
var _ref = /*#__PURE__*/React.createElement(CaretContainer, null, "hello");
|
|
6
|
+
|
|
7
|
+
it('renders the CaretContainer with no props', function () {
|
|
8
|
+
expect(mount(_ref)).toMatchSnapshot();
|
|
9
|
+
});
|
package/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license Digigov v0.
|
|
1
|
+
/** @license Digigov v0.24.0
|
|
2
2
|
*
|
|
3
3
|
* This source code is licensed under the BSD-2-Clause license found in the
|
|
4
4
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -29,6 +29,7 @@ export * from '@digigov/react-core/Card';
|
|
|
29
29
|
export * from '@digigov/react-core/CardAction';
|
|
30
30
|
export * from '@digigov/react-core/CardHeading';
|
|
31
31
|
export * from '@digigov/react-core/CardText';
|
|
32
|
+
export * from '@digigov/react-core/CaretContainer';
|
|
32
33
|
export * from '@digigov/react-core/CaretIcon';
|
|
33
34
|
export * from '@digigov/react-core/Checkbox';
|
|
34
35
|
export * from '@digigov/react-core/CheckboxConditional';
|
package/esm/registry.js
CHANGED
|
@@ -25,6 +25,7 @@ import * as _digigov_react_core_Card from '@digigov/react-core/Card';
|
|
|
25
25
|
import * as _digigov_react_core_CardAction from '@digigov/react-core/CardAction';
|
|
26
26
|
import * as _digigov_react_core_CardHeading from '@digigov/react-core/CardHeading';
|
|
27
27
|
import * as _digigov_react_core_CardText from '@digigov/react-core/CardText';
|
|
28
|
+
import * as _digigov_react_core_CaretContainer from '@digigov/react-core/CaretContainer';
|
|
28
29
|
import * as _digigov_react_core_CaretIcon from '@digigov/react-core/CaretIcon';
|
|
29
30
|
import * as _digigov_react_core_Checkbox from '@digigov/react-core/Checkbox';
|
|
30
31
|
import * as _digigov_react_core_CheckboxConditional from '@digigov/react-core/CheckboxConditional';
|
|
@@ -203,6 +204,7 @@ export default {
|
|
|
203
204
|
'@digigov/react-core/CardAction': lazyImport(_digigov_react_core_CardAction),
|
|
204
205
|
'@digigov/react-core/CardHeading': lazyImport(_digigov_react_core_CardHeading),
|
|
205
206
|
'@digigov/react-core/CardText': lazyImport(_digigov_react_core_CardText),
|
|
207
|
+
'@digigov/react-core/CaretContainer': lazyImport(_digigov_react_core_CaretContainer),
|
|
206
208
|
'@digigov/react-core/CaretIcon': lazyImport(_digigov_react_core_CaretIcon),
|
|
207
209
|
'@digigov/react-core/Checkbox': lazyImport(_digigov_react_core_Checkbox),
|
|
208
210
|
'@digigov/react-core/CheckboxConditional': lazyImport(_digigov_react_core_CheckboxConditional),
|
package/index.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export * from '@digigov/react-core/Card';
|
|
|
24
24
|
export * from '@digigov/react-core/CardAction';
|
|
25
25
|
export * from '@digigov/react-core/CardHeading';
|
|
26
26
|
export * from '@digigov/react-core/CardText';
|
|
27
|
+
export * from '@digigov/react-core/CaretContainer';
|
|
27
28
|
export * from '@digigov/react-core/CaretIcon';
|
|
28
29
|
export * from '@digigov/react-core/Checkbox';
|
|
29
30
|
export * from '@digigov/react-core/CheckboxConditional';
|
package/index.js
CHANGED
|
@@ -342,6 +342,19 @@ Object.keys(_CardText).forEach(function (key) {
|
|
|
342
342
|
});
|
|
343
343
|
});
|
|
344
344
|
|
|
345
|
+
var _CaretContainer = require("@digigov/react-core/CaretContainer");
|
|
346
|
+
|
|
347
|
+
Object.keys(_CaretContainer).forEach(function (key) {
|
|
348
|
+
if (key === "default" || key === "__esModule") return;
|
|
349
|
+
if (key in exports && exports[key] === _CaretContainer[key]) return;
|
|
350
|
+
Object.defineProperty(exports, key, {
|
|
351
|
+
enumerable: true,
|
|
352
|
+
get: function get() {
|
|
353
|
+
return _CaretContainer[key];
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
});
|
|
357
|
+
|
|
345
358
|
var _CaretIcon = require("@digigov/react-core/CaretIcon");
|
|
346
359
|
|
|
347
360
|
Object.keys(_CaretIcon).forEach(function (key) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digigov/react-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "@digigov react core components",
|
|
5
5
|
"author": "GRNET Developers <devs@lists.grnet.gr>",
|
|
6
6
|
"license": "BSD-2-Clause",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"directory": "dist"
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"@digigov/css": "0.
|
|
14
|
+
"@digigov/css": "0.36.0",
|
|
15
15
|
"clsx": "1.1.1",
|
|
16
16
|
"react": "^16.8.0 || ^17.0.0",
|
|
17
17
|
"react-dom": "^16.8.0 || ^17.0.0"
|
package/registry.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ declare var _default: {
|
|
|
26
26
|
'@digigov/react-core/CardAction': {};
|
|
27
27
|
'@digigov/react-core/CardHeading': {};
|
|
28
28
|
'@digigov/react-core/CardText': {};
|
|
29
|
+
'@digigov/react-core/CaretContainer': {};
|
|
29
30
|
'@digigov/react-core/CaretIcon': {};
|
|
30
31
|
'@digigov/react-core/Checkbox': {};
|
|
31
32
|
'@digigov/react-core/CheckboxConditional': {};
|
package/registry.js
CHANGED
|
@@ -61,6 +61,8 @@ var _digigov_react_core_CardHeading = _interopRequireWildcard(require("@digigov/
|
|
|
61
61
|
|
|
62
62
|
var _digigov_react_core_CardText = _interopRequireWildcard(require("@digigov/react-core/CardText"));
|
|
63
63
|
|
|
64
|
+
var _digigov_react_core_CaretContainer = _interopRequireWildcard(require("@digigov/react-core/CaretContainer"));
|
|
65
|
+
|
|
64
66
|
var _digigov_react_core_CaretIcon = _interopRequireWildcard(require("@digigov/react-core/CaretIcon"));
|
|
65
67
|
|
|
66
68
|
var _digigov_react_core_Checkbox = _interopRequireWildcard(require("@digigov/react-core/Checkbox"));
|
|
@@ -377,6 +379,7 @@ var _default = {
|
|
|
377
379
|
'@digigov/react-core/CardAction': lazyImport(_digigov_react_core_CardAction),
|
|
378
380
|
'@digigov/react-core/CardHeading': lazyImport(_digigov_react_core_CardHeading),
|
|
379
381
|
'@digigov/react-core/CardText': lazyImport(_digigov_react_core_CardText),
|
|
382
|
+
'@digigov/react-core/CaretContainer': lazyImport(_digigov_react_core_CaretContainer),
|
|
380
383
|
'@digigov/react-core/CaretIcon': lazyImport(_digigov_react_core_CaretIcon),
|
|
381
384
|
'@digigov/react-core/Checkbox': lazyImport(_digigov_react_core_Checkbox),
|
|
382
385
|
'@digigov/react-core/CheckboxConditional': lazyImport(_digigov_react_core_CheckboxConditional),
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`renders the CaretContainer with no props 1`] = `
|
|
4
|
+
<ForwardRef(CaretContainer)>
|
|
5
|
+
<ForwardRef(Base)
|
|
6
|
+
as="div"
|
|
7
|
+
className="govgr-caret-container"
|
|
8
|
+
>
|
|
9
|
+
<div
|
|
10
|
+
className="govgr-caret-container"
|
|
11
|
+
>
|
|
12
|
+
hello
|
|
13
|
+
</div>
|
|
14
|
+
</ForwardRef(Base)>
|
|
15
|
+
</ForwardRef(CaretContainer)>
|
|
16
|
+
`;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { mount } from 'enzyme';
|
|
3
|
+
|
|
4
|
+
import CaretContainer from '@digigov/react-core/CaretContainer';
|
|
5
|
+
|
|
6
|
+
it('renders the CaretContainer with no props', () => {
|
|
7
|
+
expect(mount(<CaretContainer>hello</CaretContainer>)).toMatchSnapshot();
|
|
8
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
|
|
5
|
+
export interface CaretContainerProps extends BaseProps<'div'> {}
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
* Use CaretContainer to wrap CaretIcon like ascending descending style.
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
export const CaretContainer = React.forwardRef<
|
|
12
|
+
HTMLDivElement,
|
|
13
|
+
CaretContainerProps
|
|
14
|
+
>(function CaretContainer({ className, children, ...props }, ref) {
|
|
15
|
+
return (
|
|
16
|
+
<Base
|
|
17
|
+
as="div"
|
|
18
|
+
ref={ref}
|
|
19
|
+
className={clsx(className, {
|
|
20
|
+
'govgr-caret-container': true,
|
|
21
|
+
})}
|
|
22
|
+
{...props}
|
|
23
|
+
>
|
|
24
|
+
{children}
|
|
25
|
+
</Base>
|
|
26
|
+
);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export default CaretContainer;
|
package/src/index.ts
CHANGED
|
@@ -24,6 +24,7 @@ export * from '@digigov/react-core/Card';
|
|
|
24
24
|
export * from '@digigov/react-core/CardAction';
|
|
25
25
|
export * from '@digigov/react-core/CardHeading';
|
|
26
26
|
export * from '@digigov/react-core/CardText';
|
|
27
|
+
export * from '@digigov/react-core/CaretContainer';
|
|
27
28
|
export * from '@digigov/react-core/CaretIcon';
|
|
28
29
|
export * from '@digigov/react-core/Checkbox';
|
|
29
30
|
export * from '@digigov/react-core/CheckboxConditional';
|
package/src/registry.js
CHANGED
|
@@ -26,6 +26,7 @@ import * as _digigov_react_core_Card from '@digigov/react-core/Card';
|
|
|
26
26
|
import * as _digigov_react_core_CardAction from '@digigov/react-core/CardAction';
|
|
27
27
|
import * as _digigov_react_core_CardHeading from '@digigov/react-core/CardHeading';
|
|
28
28
|
import * as _digigov_react_core_CardText from '@digigov/react-core/CardText';
|
|
29
|
+
import * as _digigov_react_core_CaretContainer from '@digigov/react-core/CaretContainer';
|
|
29
30
|
import * as _digigov_react_core_CaretIcon from '@digigov/react-core/CaretIcon';
|
|
30
31
|
import * as _digigov_react_core_Checkbox from '@digigov/react-core/Checkbox';
|
|
31
32
|
import * as _digigov_react_core_CheckboxConditional from '@digigov/react-core/CheckboxConditional';
|
|
@@ -207,6 +208,7 @@ export default {
|
|
|
207
208
|
'@digigov/react-core/CardAction': lazyImport(_digigov_react_core_CardAction),
|
|
208
209
|
'@digigov/react-core/CardHeading': lazyImport(_digigov_react_core_CardHeading),
|
|
209
210
|
'@digigov/react-core/CardText': lazyImport(_digigov_react_core_CardText),
|
|
211
|
+
'@digigov/react-core/CaretContainer': lazyImport(_digigov_react_core_CaretContainer),
|
|
210
212
|
'@digigov/react-core/CaretIcon': lazyImport(_digigov_react_core_CaretIcon),
|
|
211
213
|
'@digigov/react-core/Checkbox': lazyImport(_digigov_react_core_Checkbox),
|
|
212
214
|
'@digigov/react-core/CheckboxConditional': lazyImport(_digigov_react_core_CheckboxConditional),
|