@digigov/react-core 1.0.3 → 1.1.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 +10 -1
- package/Code/__snapshots__/index.test.tsx.snap +109 -0
- package/Code/index.d.ts +18 -0
- package/Code/index.js +23 -0
- package/Code/index.test/index.js +31 -0
- package/Code/index.test/package.json +6 -0
- package/Code/index.test.d.ts +1 -0
- package/Code/package.json +6 -0
- package/CodeBlock/__snapshots__/index.test.tsx.snap +22 -0
- package/CodeBlock/index.d.ts +10 -0
- package/CodeBlock/index.js +23 -0
- package/CodeBlock/index.test/index.js +7 -0
- package/CodeBlock/index.test/package.json +6 -0
- package/CodeBlock/index.test.d.ts +1 -0
- package/CodeBlock/package.json +6 -0
- package/DropdownButton/index.d.ts +1 -1
- package/Hidden/index.d.ts +31 -1
- package/Hidden/index.js +16 -3
- package/TabsHeading/index.d.ts +1 -1
- package/Typography/index.d.ts +1 -1
- package/cjs/Code/__snapshots__/index.test.tsx.snap +109 -0
- package/cjs/Code/index.js +30 -0
- package/cjs/Code/index.test/index.js +34 -0
- package/cjs/CodeBlock/__snapshots__/index.test.tsx.snap +22 -0
- package/cjs/CodeBlock/index.js +30 -0
- package/cjs/CodeBlock/index.test/index.js +10 -0
- package/cjs/Hidden/index.js +16 -3
- package/cjs/index.js +22 -0
- package/cjs/registry/index.js +4 -0
- package/index.d.ts +2 -0
- package/index.js +3 -1
- package/package.json +3 -3
- package/registry/index.js +4 -0
- package/registry.d.ts +2 -0
- package/src/Code/__snapshots__/index.test.tsx.snap +109 -0
- package/src/Code/index.test.tsx +24 -0
- package/src/Code/index.tsx +44 -0
- package/src/CodeBlock/__snapshots__/index.test.tsx.snap +22 -0
- package/src/CodeBlock/index.test.tsx +8 -0
- package/src/CodeBlock/index.tsx +38 -0
- package/src/DropdownButton/index.tsx +1 -1
- package/src/Hidden/index.tsx +41 -9
- package/src/Typography/index.tsx +1 -1
- package/src/index.ts +2 -0
- package/src/registry.js +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
# Change Log - @digigov/react-core
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Mon, 29 Jan 2024 10:46:50 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 1.1.0
|
|
6
|
+
Mon, 29 Jan 2024 10:46:50 GMT
|
|
7
|
+
|
|
8
|
+
### Minor changes
|
|
9
|
+
|
|
10
|
+
- Create Code component
|
|
11
|
+
- add specific screen sizes in Hidden component
|
|
12
|
+
- Upgrade typescript to v5
|
|
4
13
|
|
|
5
14
|
## 1.0.2
|
|
6
15
|
Fri, 22 Dec 2023 14:28:35 GMT
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`renders the Code with color="attribute" prop 1`] = `
|
|
4
|
+
<ForwardRef(Code)
|
|
5
|
+
color="attribute"
|
|
6
|
+
>
|
|
7
|
+
<ForwardRef(Typography)
|
|
8
|
+
as="code"
|
|
9
|
+
className="govgr-code--attr govgr-code"
|
|
10
|
+
>
|
|
11
|
+
<ForwardRef(Base)
|
|
12
|
+
as="code"
|
|
13
|
+
className="govgr-code--attr govgr-code"
|
|
14
|
+
>
|
|
15
|
+
<code
|
|
16
|
+
className="govgr-code--attr govgr-code"
|
|
17
|
+
>
|
|
18
|
+
hello
|
|
19
|
+
</code>
|
|
20
|
+
</ForwardRef(Base)>
|
|
21
|
+
</ForwardRef(Typography)>
|
|
22
|
+
</ForwardRef(Code)>
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
exports[`renders the Code with color="info" prop 1`] = `
|
|
26
|
+
<ForwardRef(Code)
|
|
27
|
+
color="info"
|
|
28
|
+
>
|
|
29
|
+
<ForwardRef(Typography)
|
|
30
|
+
as="code"
|
|
31
|
+
className="govgr-code"
|
|
32
|
+
>
|
|
33
|
+
<ForwardRef(Base)
|
|
34
|
+
as="code"
|
|
35
|
+
className="govgr-code"
|
|
36
|
+
>
|
|
37
|
+
<code
|
|
38
|
+
className="govgr-code"
|
|
39
|
+
>
|
|
40
|
+
hello
|
|
41
|
+
</code>
|
|
42
|
+
</ForwardRef(Base)>
|
|
43
|
+
</ForwardRef(Typography)>
|
|
44
|
+
</ForwardRef(Code)>
|
|
45
|
+
`;
|
|
46
|
+
|
|
47
|
+
exports[`renders the Code with color="keyword" prop 1`] = `
|
|
48
|
+
<ForwardRef(Code)
|
|
49
|
+
color="keyword"
|
|
50
|
+
>
|
|
51
|
+
<ForwardRef(Typography)
|
|
52
|
+
as="code"
|
|
53
|
+
className="govgr-code--keyword govgr-code"
|
|
54
|
+
>
|
|
55
|
+
<ForwardRef(Base)
|
|
56
|
+
as="code"
|
|
57
|
+
className="govgr-code--keyword govgr-code"
|
|
58
|
+
>
|
|
59
|
+
<code
|
|
60
|
+
className="govgr-code--keyword govgr-code"
|
|
61
|
+
>
|
|
62
|
+
hello
|
|
63
|
+
</code>
|
|
64
|
+
</ForwardRef(Base)>
|
|
65
|
+
</ForwardRef(Typography)>
|
|
66
|
+
</ForwardRef(Code)>
|
|
67
|
+
`;
|
|
68
|
+
|
|
69
|
+
exports[`renders the Code with color="name" prop 1`] = `
|
|
70
|
+
<ForwardRef(Code)
|
|
71
|
+
color="name"
|
|
72
|
+
>
|
|
73
|
+
<ForwardRef(Typography)
|
|
74
|
+
as="code"
|
|
75
|
+
className="govgr-code--name govgr-code"
|
|
76
|
+
>
|
|
77
|
+
<ForwardRef(Base)
|
|
78
|
+
as="code"
|
|
79
|
+
className="govgr-code--name govgr-code"
|
|
80
|
+
>
|
|
81
|
+
<code
|
|
82
|
+
className="govgr-code--name govgr-code"
|
|
83
|
+
>
|
|
84
|
+
hello
|
|
85
|
+
</code>
|
|
86
|
+
</ForwardRef(Base)>
|
|
87
|
+
</ForwardRef(Typography)>
|
|
88
|
+
</ForwardRef(Code)>
|
|
89
|
+
`;
|
|
90
|
+
|
|
91
|
+
exports[`renders the Code with no props 1`] = `
|
|
92
|
+
<ForwardRef(Code)>
|
|
93
|
+
<ForwardRef(Typography)
|
|
94
|
+
as="code"
|
|
95
|
+
className="govgr-code"
|
|
96
|
+
>
|
|
97
|
+
<ForwardRef(Base)
|
|
98
|
+
as="code"
|
|
99
|
+
className="govgr-code"
|
|
100
|
+
>
|
|
101
|
+
<code
|
|
102
|
+
className="govgr-code"
|
|
103
|
+
>
|
|
104
|
+
hello
|
|
105
|
+
</code>
|
|
106
|
+
</ForwardRef(Base)>
|
|
107
|
+
</ForwardRef(Typography)>
|
|
108
|
+
</ForwardRef(Code)>
|
|
109
|
+
`;
|
package/Code/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TypographyProps } from '@digigov/react-core/Typography';
|
|
3
|
+
export interface CodeProps extends TypographyProps {
|
|
4
|
+
/**
|
|
5
|
+
* size is optional.
|
|
6
|
+
* @value 'lg' Use it when a lg text is an introductory paragraph that you can use at the top of a page to summarize the content.
|
|
7
|
+
* @value 'md' The majority of your body should use the standard 'md' size.
|
|
8
|
+
* @value 'sm' Use it sparingly to make your text font size smaller: 16px on larger screens and 14px on smaller screens.
|
|
9
|
+
* @default 'md'
|
|
10
|
+
*/
|
|
11
|
+
color?: 'default' | 'info' | 'attribute' | 'string' | 'keyword' | 'name';
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Code component is used for text formatting.
|
|
15
|
+
* If you need a paragraph, use the Paragraph component instead.
|
|
16
|
+
*/
|
|
17
|
+
export declare const Code: React.ForwardRefExoticComponent<Pick<CodeProps, "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "fontSize" | "fontWeight" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden"> & React.RefAttributes<HTMLElement | HTMLParagraphElement>>;
|
|
18
|
+
export default Code;
|
package/Code/index.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["color", "className", "children"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import clsx from 'clsx';
|
|
6
|
+
import Typography from '@digigov/react-core/Typography';
|
|
7
|
+
/**
|
|
8
|
+
* Code component is used for text formatting.
|
|
9
|
+
* If you need a paragraph, use the Paragraph component instead.
|
|
10
|
+
*/
|
|
11
|
+
export var Code = /*#__PURE__*/React.forwardRef(function Code(_ref, ref) {
|
|
12
|
+
var _ref$color = _ref.color,
|
|
13
|
+
color = _ref$color === void 0 ? 'default' : _ref$color,
|
|
14
|
+
className = _ref.className,
|
|
15
|
+
children = _ref.children,
|
|
16
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
17
|
+
return /*#__PURE__*/React.createElement(Typography, _extends({
|
|
18
|
+
as: "code",
|
|
19
|
+
ref: ref,
|
|
20
|
+
className: clsx(className, color === 'attribute' && 'govgr-code--attr', color === 'keyword' && 'govgr-code--keyword', color === 'string' && 'govgr-code--string', color === 'name' && 'govgr-code--name', true && 'govgr-code')
|
|
21
|
+
}, props), children);
|
|
22
|
+
});
|
|
23
|
+
export default Code;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { mount } from 'enzyme';
|
|
3
|
+
import Code from '@digigov/react-core/Code';
|
|
4
|
+
var _ref = /*#__PURE__*/React.createElement(Code, null, "hello");
|
|
5
|
+
it('renders the Code with no props', function () {
|
|
6
|
+
expect(mount(_ref)).toMatchSnapshot();
|
|
7
|
+
});
|
|
8
|
+
var _ref2 = /*#__PURE__*/React.createElement(Code, {
|
|
9
|
+
color: "info"
|
|
10
|
+
}, "hello");
|
|
11
|
+
it('renders the Code with color="info" prop', function () {
|
|
12
|
+
expect(mount(_ref2)).toMatchSnapshot();
|
|
13
|
+
});
|
|
14
|
+
var _ref3 = /*#__PURE__*/React.createElement(Code, {
|
|
15
|
+
color: "attribute"
|
|
16
|
+
}, "hello");
|
|
17
|
+
it('renders the Code with color="attribute" prop', function () {
|
|
18
|
+
expect(mount(_ref3)).toMatchSnapshot();
|
|
19
|
+
});
|
|
20
|
+
var _ref4 = /*#__PURE__*/React.createElement(Code, {
|
|
21
|
+
color: "name"
|
|
22
|
+
}, "hello");
|
|
23
|
+
it('renders the Code with color="name" prop', function () {
|
|
24
|
+
expect(mount(_ref4)).toMatchSnapshot();
|
|
25
|
+
});
|
|
26
|
+
var _ref5 = /*#__PURE__*/React.createElement(Code, {
|
|
27
|
+
color: "keyword"
|
|
28
|
+
}, "hello");
|
|
29
|
+
it('renders the Code with color="keyword" prop', function () {
|
|
30
|
+
expect(mount(_ref5)).toMatchSnapshot();
|
|
31
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`renders the CodeBlock with no props 1`] = `
|
|
4
|
+
<ForwardRef(Card)>
|
|
5
|
+
<ForwardRef(Base)
|
|
6
|
+
as="div"
|
|
7
|
+
className="govgr-code-block__container"
|
|
8
|
+
>
|
|
9
|
+
<div
|
|
10
|
+
className="govgr-code-block__container"
|
|
11
|
+
>
|
|
12
|
+
<pre>
|
|
13
|
+
<code
|
|
14
|
+
className="govgr-code-block__content"
|
|
15
|
+
>
|
|
16
|
+
hello
|
|
17
|
+
</code>
|
|
18
|
+
</pre>
|
|
19
|
+
</div>
|
|
20
|
+
</ForwardRef(Base)>
|
|
21
|
+
</ForwardRef(Card)>
|
|
22
|
+
`;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseProps } from '@digigov/react-core/Base';
|
|
3
|
+
export interface CodeBlockProps extends BaseProps<'div'> {
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* CodeBlock can be used as a colored container for text.
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
export declare const CodeBlock: React.ForwardRefExoticComponent<Pick<CodeBlockProps, "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export default CodeBlock;
|
|
@@ -0,0 +1,23 @@
|
|
|
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 clsx from 'clsx';
|
|
6
|
+
import Base from '@digigov/react-core/Base';
|
|
7
|
+
/**
|
|
8
|
+
* CodeBlock can be used as a colored container for text.
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
export var CodeBlock = /*#__PURE__*/React.forwardRef(function Card(_ref, ref) {
|
|
12
|
+
var className = _ref.className,
|
|
13
|
+
children = _ref.children,
|
|
14
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
15
|
+
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
16
|
+
as: "div",
|
|
17
|
+
ref: ref,
|
|
18
|
+
className: clsx(className, true && 'govgr-code-block__container')
|
|
19
|
+
}, props), /*#__PURE__*/React.createElement("pre", null, /*#__PURE__*/React.createElement("code", {
|
|
20
|
+
className: clsx(true && 'govgr-code-block__content')
|
|
21
|
+
}, children)));
|
|
22
|
+
});
|
|
23
|
+
export default CodeBlock;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { mount } from 'enzyme';
|
|
3
|
+
import CodeBlock from '@digigov/react-core/CodeBlock';
|
|
4
|
+
var _ref = /*#__PURE__*/React.createElement(CodeBlock, null, "hello");
|
|
5
|
+
it('renders the CodeBlock with no props', function () {
|
|
6
|
+
expect(mount(_ref)).toMatchSnapshot();
|
|
7
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -32,7 +32,7 @@ export interface DropdownButtonProps extends BaseProps<'summary'> {
|
|
|
32
32
|
arrow?: boolean;
|
|
33
33
|
/**
|
|
34
34
|
* underline is optional.
|
|
35
|
-
* Use this prop when you want to use Dropdown button as
|
|
35
|
+
* Use this prop when you want to use Dropdown button as \<th\> header in sorted table.
|
|
36
36
|
* @value true
|
|
37
37
|
* @value false
|
|
38
38
|
*/
|
package/Hidden/index.d.ts
CHANGED
|
@@ -31,11 +31,41 @@ export interface HiddenProps extends BaseProps<'div'> {
|
|
|
31
31
|
* @default false
|
|
32
32
|
*/
|
|
33
33
|
xlUp?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* @value true
|
|
36
|
+
* @value false
|
|
37
|
+
* @default false
|
|
38
|
+
*/
|
|
39
|
+
xs?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* @value true
|
|
42
|
+
* @value false
|
|
43
|
+
* @default false
|
|
44
|
+
*/
|
|
45
|
+
sm?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* @value true
|
|
48
|
+
* @value false
|
|
49
|
+
* @default false
|
|
50
|
+
*/
|
|
51
|
+
md?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* @value true
|
|
54
|
+
* @value false
|
|
55
|
+
* @default false
|
|
56
|
+
*/
|
|
57
|
+
lg?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* @value true
|
|
60
|
+
* @value false
|
|
61
|
+
* @default false
|
|
62
|
+
*/
|
|
63
|
+
xl?: boolean;
|
|
34
64
|
}
|
|
35
65
|
/**
|
|
36
66
|
* Hidden is used to responsively hide children based on the screen size.
|
|
37
67
|
* Each property refers to a specific screen sizes and applies the "invisible"
|
|
38
68
|
* property at the selected screen size and above.
|
|
39
69
|
*/
|
|
40
|
-
export declare const Hidden: React.ForwardRefExoticComponent<Pick<HiddenProps, "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "xsUp" | "smUp" | "mdUp" | "lgUp" | "xlUp"> & React.RefAttributes<HTMLDivElement>>;
|
|
70
|
+
export declare const Hidden: React.ForwardRefExoticComponent<Pick<HiddenProps, "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "xs" | "sm" | "md" | "lg" | "xl" | "xsUp" | "smUp" | "mdUp" | "lgUp" | "xlUp"> & React.RefAttributes<HTMLDivElement>>;
|
|
41
71
|
export default Hidden;
|
package/Hidden/index.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["className", "children", "xsUp", "smUp", "mdUp", "lgUp", "xlUp"];
|
|
3
|
+
var _excluded = ["className", "children", "xsUp", "smUp", "mdUp", "lgUp", "xlUp", "xs", "sm", "md", "lg", "xl"];
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import clsx from 'clsx';
|
|
6
5
|
import Base from '@digigov/react-core/Base';
|
|
7
6
|
/**
|
|
8
7
|
* Hidden is used to responsively hide children based on the screen size.
|
|
@@ -18,11 +17,25 @@ export var Hidden = /*#__PURE__*/React.forwardRef(function Hidden(_ref, ref) {
|
|
|
18
17
|
mdUp = _ref.mdUp,
|
|
19
18
|
lgUp = _ref.lgUp,
|
|
20
19
|
xlUp = _ref.xlUp,
|
|
20
|
+
xs = _ref.xs,
|
|
21
|
+
sm = _ref.sm,
|
|
22
|
+
md = _ref.md,
|
|
23
|
+
lg = _ref.lg,
|
|
24
|
+
xl = _ref.xl,
|
|
21
25
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
22
26
|
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
23
27
|
as: "div",
|
|
24
28
|
ref: ref,
|
|
25
|
-
|
|
29
|
+
xsUpHidden: xsUp,
|
|
30
|
+
smUpHidden: smUp,
|
|
31
|
+
mdUpHidden: mdUp,
|
|
32
|
+
lgUpHidden: lgUp,
|
|
33
|
+
xlUpHidden: xlUp,
|
|
34
|
+
xsHidden: xs,
|
|
35
|
+
smHidden: sm,
|
|
36
|
+
mdHidden: md,
|
|
37
|
+
lgHidden: lg,
|
|
38
|
+
xlHidden: xl
|
|
26
39
|
}, props), children);
|
|
27
40
|
});
|
|
28
41
|
export default Hidden;
|
package/TabsHeading/index.d.ts
CHANGED
|
@@ -14,5 +14,5 @@ export interface TabsHeadingProps extends HiddenProps {
|
|
|
14
14
|
/**
|
|
15
15
|
* TabsHeading should be inside the Tabs component. This heading is hidden on desktop screens, but it is always useful for accessibility.
|
|
16
16
|
*/
|
|
17
|
-
export declare const TabsHeading: React.ForwardRefExoticComponent<Pick<TabsHeadingProps, "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "size" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "xsUp" | "smUp" | "mdUp" | "lgUp" | "xlUp"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
17
|
+
export declare const TabsHeading: React.ForwardRefExoticComponent<Pick<TabsHeadingProps, "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "size" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "xs" | "sm" | "md" | "lg" | "xl" | "xsUp" | "smUp" | "mdUp" | "lgUp" | "xlUp"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
18
18
|
export default TabsHeading;
|
package/Typography/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BaseProps } from '@digigov/react-core/Base';
|
|
3
|
-
export interface TypographyProps extends BaseProps<'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'span' | 'p'> {
|
|
3
|
+
export interface TypographyProps extends BaseProps<'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'span' | 'p' | 'code'> {
|
|
4
4
|
/**
|
|
5
5
|
* fontSize is optional.
|
|
6
6
|
* Add this fontSize override prop in order to change the font size.
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`renders the Code with color="attribute" prop 1`] = `
|
|
4
|
+
<ForwardRef(Code)
|
|
5
|
+
color="attribute"
|
|
6
|
+
>
|
|
7
|
+
<ForwardRef(Typography)
|
|
8
|
+
as="code"
|
|
9
|
+
className="govgr-code--attr govgr-code"
|
|
10
|
+
>
|
|
11
|
+
<ForwardRef(Base)
|
|
12
|
+
as="code"
|
|
13
|
+
className="govgr-code--attr govgr-code"
|
|
14
|
+
>
|
|
15
|
+
<code
|
|
16
|
+
className="govgr-code--attr govgr-code"
|
|
17
|
+
>
|
|
18
|
+
hello
|
|
19
|
+
</code>
|
|
20
|
+
</ForwardRef(Base)>
|
|
21
|
+
</ForwardRef(Typography)>
|
|
22
|
+
</ForwardRef(Code)>
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
exports[`renders the Code with color="info" prop 1`] = `
|
|
26
|
+
<ForwardRef(Code)
|
|
27
|
+
color="info"
|
|
28
|
+
>
|
|
29
|
+
<ForwardRef(Typography)
|
|
30
|
+
as="code"
|
|
31
|
+
className="govgr-code"
|
|
32
|
+
>
|
|
33
|
+
<ForwardRef(Base)
|
|
34
|
+
as="code"
|
|
35
|
+
className="govgr-code"
|
|
36
|
+
>
|
|
37
|
+
<code
|
|
38
|
+
className="govgr-code"
|
|
39
|
+
>
|
|
40
|
+
hello
|
|
41
|
+
</code>
|
|
42
|
+
</ForwardRef(Base)>
|
|
43
|
+
</ForwardRef(Typography)>
|
|
44
|
+
</ForwardRef(Code)>
|
|
45
|
+
`;
|
|
46
|
+
|
|
47
|
+
exports[`renders the Code with color="keyword" prop 1`] = `
|
|
48
|
+
<ForwardRef(Code)
|
|
49
|
+
color="keyword"
|
|
50
|
+
>
|
|
51
|
+
<ForwardRef(Typography)
|
|
52
|
+
as="code"
|
|
53
|
+
className="govgr-code--keyword govgr-code"
|
|
54
|
+
>
|
|
55
|
+
<ForwardRef(Base)
|
|
56
|
+
as="code"
|
|
57
|
+
className="govgr-code--keyword govgr-code"
|
|
58
|
+
>
|
|
59
|
+
<code
|
|
60
|
+
className="govgr-code--keyword govgr-code"
|
|
61
|
+
>
|
|
62
|
+
hello
|
|
63
|
+
</code>
|
|
64
|
+
</ForwardRef(Base)>
|
|
65
|
+
</ForwardRef(Typography)>
|
|
66
|
+
</ForwardRef(Code)>
|
|
67
|
+
`;
|
|
68
|
+
|
|
69
|
+
exports[`renders the Code with color="name" prop 1`] = `
|
|
70
|
+
<ForwardRef(Code)
|
|
71
|
+
color="name"
|
|
72
|
+
>
|
|
73
|
+
<ForwardRef(Typography)
|
|
74
|
+
as="code"
|
|
75
|
+
className="govgr-code--name govgr-code"
|
|
76
|
+
>
|
|
77
|
+
<ForwardRef(Base)
|
|
78
|
+
as="code"
|
|
79
|
+
className="govgr-code--name govgr-code"
|
|
80
|
+
>
|
|
81
|
+
<code
|
|
82
|
+
className="govgr-code--name govgr-code"
|
|
83
|
+
>
|
|
84
|
+
hello
|
|
85
|
+
</code>
|
|
86
|
+
</ForwardRef(Base)>
|
|
87
|
+
</ForwardRef(Typography)>
|
|
88
|
+
</ForwardRef(Code)>
|
|
89
|
+
`;
|
|
90
|
+
|
|
91
|
+
exports[`renders the Code with no props 1`] = `
|
|
92
|
+
<ForwardRef(Code)>
|
|
93
|
+
<ForwardRef(Typography)
|
|
94
|
+
as="code"
|
|
95
|
+
className="govgr-code"
|
|
96
|
+
>
|
|
97
|
+
<ForwardRef(Base)
|
|
98
|
+
as="code"
|
|
99
|
+
className="govgr-code"
|
|
100
|
+
>
|
|
101
|
+
<code
|
|
102
|
+
className="govgr-code"
|
|
103
|
+
>
|
|
104
|
+
hello
|
|
105
|
+
</code>
|
|
106
|
+
</ForwardRef(Base)>
|
|
107
|
+
</ForwardRef(Typography)>
|
|
108
|
+
</ForwardRef(Code)>
|
|
109
|
+
`;
|