@hh.ru/magritte-ui-form-label 3.2.41
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/FormLabel.d.ts +4 -0
- package/FormLabel.js +64 -0
- package/FormLabel.js.map +1 -0
- package/index.css +85 -0
- package/index.d.ts +3 -0
- package/index.js +16 -0
- package/index.js.map +1 -0
- package/index.mock.d.ts +5 -0
- package/index.mock.js +11 -0
- package/index.mock.js.map +1 -0
- package/package.json +46 -0
- package/types.d.ts +8 -0
- package/types.js +3 -0
- package/types.js.map +1 -0
package/FormLabel.d.ts
ADDED
package/FormLabel.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useState, useRef, useCallback } from 'react';
|
|
4
|
+
import classNames from 'classnames';
|
|
5
|
+
import '@hh.ru/magritte-common-focus-visible';
|
|
6
|
+
import { keyboardMatches, keyboardKeys } from '@hh.ru/magritte-common-keyboard';
|
|
7
|
+
import { useDisabled } from '@hh.ru/magritte-common-use-disabled';
|
|
8
|
+
import { BottomSheet } from '@hh.ru/magritte-ui-bottom-sheet';
|
|
9
|
+
import { Counter } from '@hh.ru/magritte-ui-counter';
|
|
10
|
+
import { QuestionCircleOutlinedSize16, CrossOutlinedSize24 } from '@hh.ru/magritte-ui-icon/icon';
|
|
11
|
+
import { NavigationBar } from '@hh.ru/magritte-ui-navigation-bar';
|
|
12
|
+
import { Tooltip } from '@hh.ru/magritte-ui-tooltip';
|
|
13
|
+
import { Text } from '@hh.ru/magritte-ui-typography';
|
|
14
|
+
|
|
15
|
+
var styles = {"form-label":"magritte-form-label___Yzcxs_3-2-41","formLabel":"magritte-form-label___Yzcxs_3-2-41","form-label__counter":"magritte-form-label__counter___a2cSH_3-2-41","formLabelCounter":"magritte-form-label__counter___a2cSH_3-2-41","form-label_disabled":"magritte-form-label_disabled___rq0Rq_3-2-41","formLabelDisabled":"magritte-form-label_disabled___rq0Rq_3-2-41","form-label__icon":"magritte-form-label__icon___H57oS_3-2-41","formLabelIcon":"magritte-form-label__icon___H57oS_3-2-41"};
|
|
16
|
+
|
|
17
|
+
const FormLabel = (props) => {
|
|
18
|
+
const disabled = useDisabled();
|
|
19
|
+
const [showBottomSheet, setShowBottomSheet] = useState(false);
|
|
20
|
+
const [showTooltip, setShowTooltip] = useState(false);
|
|
21
|
+
const activatorRef = useRef(null);
|
|
22
|
+
const { children, info, counter, 'data-qa': dataQa = 'form-label', ...restProps } = props;
|
|
23
|
+
const onClick = useCallback((event) => {
|
|
24
|
+
if (info) {
|
|
25
|
+
event.preventDefault();
|
|
26
|
+
}
|
|
27
|
+
if (!disabled) {
|
|
28
|
+
setShowBottomSheet(true);
|
|
29
|
+
}
|
|
30
|
+
}, [disabled, info]);
|
|
31
|
+
const onKeyDown = useCallback((event) => {
|
|
32
|
+
if (disabled || !onClick) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
if (keyboardMatches(event.nativeEvent, [keyboardKeys.Enter, keyboardKeys.Space])) {
|
|
36
|
+
onClick(event);
|
|
37
|
+
}
|
|
38
|
+
}, [onClick, disabled]);
|
|
39
|
+
const propsForInfo = info
|
|
40
|
+
? {
|
|
41
|
+
tabIndex: disabled ? -1 : 0,
|
|
42
|
+
role: 'button',
|
|
43
|
+
onKeyDown,
|
|
44
|
+
onClick,
|
|
45
|
+
onMouseEnter: () => setShowTooltip(true),
|
|
46
|
+
onMouseLeave: () => setShowTooltip(false),
|
|
47
|
+
onFocus: () => setShowTooltip(true),
|
|
48
|
+
onBlur: () => setShowTooltip(false),
|
|
49
|
+
}
|
|
50
|
+
: {};
|
|
51
|
+
return (jsxs(Fragment, { children: [jsxs("label", { className: classNames(styles['form-label'], {
|
|
52
|
+
[styles[`form-label_disabled`]]: disabled,
|
|
53
|
+
}), "data-qa": dataQa, ...propsForInfo, ...restProps, children: [children, !!counter && (jsx("span", { className: styles['form-label__counter'], children: jsx(Counter, { label: counter, style: "attention", mode: "secondary", size: "medium", "data-qa": "form-label-counter" }) })), info && (jsxs(Fragment, { children: [jsx("span", { "data-qa": "form-label-info-icon", className: styles['form-label__icon'], ref: activatorRef, children: jsx(QuestionCircleOutlinedSize16, {}) }), jsx(Tooltip, { maxWidth: 300, visible: showTooltip, activatorRef: activatorRef, alignment: "center", direction: "top", "data-qa": "form-label-tooltip", children: info })] }))] }), info && (jsx(BottomSheet, { visible: showBottomSheet, onClose: () => {
|
|
54
|
+
setShowBottomSheet(false);
|
|
55
|
+
}, header: jsx(NavigationBar, { title: children, right: {
|
|
56
|
+
icon: CrossOutlinedSize24,
|
|
57
|
+
onClick: () => {
|
|
58
|
+
setShowBottomSheet(false);
|
|
59
|
+
},
|
|
60
|
+
}, showDivider: true }), "data-qa": "form-label-bottom-sheet", children: jsx(Text, { typography: "label-2-regular", children: info }) }))] }));
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export { FormLabel };
|
|
64
|
+
//# sourceMappingURL=FormLabel.js.map
|
package/FormLabel.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormLabel.js","sources":["../src/FormLabel.tsx"],"sourcesContent":["import { FC, useCallback, KeyboardEvent, MouseEvent, useState, useRef } from 'react';\nimport classNames from 'classnames';\n\nimport '@hh.ru/magritte-common-focus-visible';\nimport { keyboardMatches, keyboardKeys } from '@hh.ru/magritte-common-keyboard';\nimport { useDisabled } from '@hh.ru/magritte-common-use-disabled';\nimport { BottomSheet } from '@hh.ru/magritte-ui-bottom-sheet';\nimport { Counter } from '@hh.ru/magritte-ui-counter';\nimport { FormLabelProps } from '@hh.ru/magritte-ui-form-label/types';\nimport { QuestionCircleOutlinedSize16, CrossOutlinedSize24 } from '@hh.ru/magritte-ui-icon/icon';\nimport { NavigationBar } from '@hh.ru/magritte-ui-navigation-bar';\nimport { Tooltip } from '@hh.ru/magritte-ui-tooltip';\nimport { Text } from '@hh.ru/magritte-ui-typography';\n\nimport styles from './form-label.less';\n\nexport const FormLabel: FC<FormLabelProps> = (props: FormLabelProps) => {\n const disabled = useDisabled();\n const [showBottomSheet, setShowBottomSheet] = useState<boolean>(false);\n const [showTooltip, setShowTooltip] = useState<boolean>(false);\n const activatorRef = useRef<HTMLSpanElement | null>(null);\n\n const { children, info, counter, 'data-qa': dataQa = 'form-label', ...restProps } = props;\n\n const onClick = useCallback(\n (event: MouseEvent) => {\n if (info) {\n event.preventDefault();\n }\n\n if (!disabled) {\n setShowBottomSheet(true);\n }\n },\n [disabled, info]\n );\n\n const onKeyDown = useCallback(\n (event: KeyboardEvent<HTMLLabelElement>) => {\n if (disabled || !onClick) {\n return;\n }\n\n if (keyboardMatches(event.nativeEvent, [keyboardKeys.Enter, keyboardKeys.Space])) {\n onClick(event as unknown as MouseEvent<HTMLLabelElement>);\n }\n },\n [onClick, disabled]\n );\n\n const propsForInfo = info\n ? {\n tabIndex: disabled ? -1 : 0,\n role: 'button',\n onKeyDown,\n onClick,\n onMouseEnter: () => setShowTooltip(true),\n onMouseLeave: () => setShowTooltip(false),\n onFocus: () => setShowTooltip(true),\n onBlur: () => setShowTooltip(false),\n }\n : {};\n\n return (\n <>\n <label\n className={classNames(styles['form-label'], {\n [styles[`form-label_disabled`]]: disabled,\n })}\n data-qa={dataQa}\n {...propsForInfo}\n {...restProps}\n >\n {children}\n {!!counter && (\n <span className={styles['form-label__counter']}>\n <Counter\n label={counter}\n style=\"attention\"\n mode=\"secondary\"\n size=\"medium\"\n data-qa=\"form-label-counter\"\n />\n </span>\n )}\n {info && (\n <>\n <span data-qa=\"form-label-info-icon\" className={styles['form-label__icon']} ref={activatorRef}>\n <QuestionCircleOutlinedSize16 />\n </span>\n <Tooltip\n maxWidth={300}\n visible={showTooltip}\n activatorRef={activatorRef}\n alignment=\"center\"\n direction=\"top\"\n data-qa=\"form-label-tooltip\"\n >\n {info}\n </Tooltip>\n </>\n )}\n </label>\n {info && (\n <BottomSheet\n visible={showBottomSheet}\n onClose={() => {\n setShowBottomSheet(false);\n }}\n header={\n <NavigationBar\n title={children}\n right={{\n icon: CrossOutlinedSize24,\n onClick: () => {\n setShowBottomSheet(false);\n },\n }}\n showDivider\n />\n }\n data-qa=\"form-label-bottom-sheet\"\n >\n <Text typography=\"label-2-regular\">{info}</Text>\n </BottomSheet>\n )}\n </>\n );\n};\n"],"names":["_jsxs","_Fragment","_jsx"],"mappings":"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"}
|
package/index.css
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
:root{
|
|
2
|
+
--magritte-color-component-form-label-stroke-state-focused-accessible-v18-1-1:#0070ff7a;
|
|
3
|
+
--magritte-color-component-form-label-text-content-v18-1-1:#768694;
|
|
4
|
+
--magritte-color-component-form-label-text-state-content-hovered-v18-1-1:#768694;
|
|
5
|
+
--magritte-color-component-form-label-text-state-content-pressed-v18-1-1:#768694;
|
|
6
|
+
--magritte-color-component-form-label-text-state-content-disabled-v18-1-1:#768694;
|
|
7
|
+
--magritte-color-component-form-label-icon-content-v18-1-1:#768694;
|
|
8
|
+
--magritte-color-component-form-label-icon-state-content-hovered-v18-1-1:#768694;
|
|
9
|
+
--magritte-color-component-form-label-icon-state-content-pressed-v18-1-1:#768694;
|
|
10
|
+
--magritte-color-component-form-label-icon-state-content-disabled-v18-1-1:#768694;
|
|
11
|
+
--magritte-color-component-form-label-counter-content-v18-1-1:#AABBCA;
|
|
12
|
+
--magritte-color-component-form-label-counter-state-content-disabled-v18-1-1:#AABBCA;
|
|
13
|
+
}
|
|
14
|
+
:root{
|
|
15
|
+
--magritte-typography-label-2-regular-font-family-v18-1-1:"Inter";
|
|
16
|
+
--magritte-typography-label-2-regular-font-weight-v18-1-1:400;
|
|
17
|
+
--magritte-typography-label-2-regular-line-height-v18-1-1:22px;
|
|
18
|
+
--magritte-typography-label-2-regular-font-size-v18-1-1:16px;
|
|
19
|
+
--magritte-typography-label-2-regular-letter-spacing-v18-1-1:0em;
|
|
20
|
+
--magritte-typography-label-2-regular-text-indent-v18-1-1:0px;
|
|
21
|
+
--magritte-typography-label-2-regular-text-transform-v18-1-1:none;
|
|
22
|
+
--magritte-typography-label-2-regular-text-decoration-v18-1-1:none;
|
|
23
|
+
}
|
|
24
|
+
.magritte-night-theme{
|
|
25
|
+
--magritte-color-component-form-label-stroke-state-focused-accessible-v18-1-1:#0070ff7a;
|
|
26
|
+
--magritte-color-component-form-label-text-content-v18-1-1:#ABABAB;
|
|
27
|
+
--magritte-color-component-form-label-text-state-content-hovered-v18-1-1:#ABABAB;
|
|
28
|
+
--magritte-color-component-form-label-text-state-content-pressed-v18-1-1:#ABABAB;
|
|
29
|
+
--magritte-color-component-form-label-text-state-content-disabled-v18-1-1:#ABABAB;
|
|
30
|
+
--magritte-color-component-form-label-icon-content-v18-1-1:#ABABAB;
|
|
31
|
+
--magritte-color-component-form-label-icon-state-content-hovered-v18-1-1:#ABABAB;
|
|
32
|
+
--magritte-color-component-form-label-icon-state-content-pressed-v18-1-1:#ABABAB;
|
|
33
|
+
--magritte-color-component-form-label-icon-state-content-disabled-v18-1-1:#ABABAB;
|
|
34
|
+
--magritte-color-component-form-label-counter-content-v18-1-1:#767676;
|
|
35
|
+
--magritte-color-component-form-label-counter-state-content-disabled-v18-1-1:#ABABAB;
|
|
36
|
+
}
|
|
37
|
+
.magritte-form-label___Yzcxs_3-2-41{
|
|
38
|
+
font-family:var(--magritte-typography-label-2-regular-font-family-v18-1-1);
|
|
39
|
+
font-weight:var(--magritte-typography-label-2-regular-font-weight-v18-1-1);
|
|
40
|
+
line-height:var(--magritte-typography-label-2-regular-line-height-v18-1-1);
|
|
41
|
+
font-size:var(--magritte-typography-label-2-regular-font-size-v18-1-1);
|
|
42
|
+
letter-spacing:var(--magritte-typography-label-2-regular-letter-spacing-v18-1-1);
|
|
43
|
+
text-indent:var(--magritte-typography-label-2-regular-text-indent-v18-1-1);
|
|
44
|
+
text-transform:var(--magritte-typography-label-2-regular-text-transform-v18-1-1);
|
|
45
|
+
text-decoration:var(--magritte-typography-label-2-regular-text-decoration-v18-1-1);
|
|
46
|
+
display:inline-flex;
|
|
47
|
+
gap:6px;
|
|
48
|
+
align-items:center;
|
|
49
|
+
border-radius:50vh;
|
|
50
|
+
color:var(--magritte-color-component-form-label-text-content-v18-1-1);
|
|
51
|
+
--magritte-ui-icon-color-override:var(--magritte-color-component-form-label-icon-content-v18-1-1);
|
|
52
|
+
}
|
|
53
|
+
.magritte-form-label___Yzcxs_3-2-41.focus-visible{
|
|
54
|
+
outline:var(--magritte-color-component-form-label-stroke-state-focused-accessible-v18-1-1) solid 4px;
|
|
55
|
+
}
|
|
56
|
+
.magritte-form-label___Yzcxs_3-2-41:active{
|
|
57
|
+
color:var(--magritte-color-component-form-label-text-state-content-pressed-v18-1-1);
|
|
58
|
+
--magritte-ui-icon-color-override:var(--magritte-color-component-form-label-icon-state-content-pressed-v18-1-1);
|
|
59
|
+
}
|
|
60
|
+
@media (min-width: 1020px){
|
|
61
|
+
body.magritte-old-layout .magritte-form-label___Yzcxs_3-2-41:hover:not(:disabled):not(:active){
|
|
62
|
+
color:var(--magritte-color-component-form-label-text-state-content-hovered-v18-1-1);
|
|
63
|
+
--magritte-ui-icon-color-override:var(--magritte-color-component-form-label-icon-state-content-hovered-v18-1-1);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
@media (min-width: 1024px){
|
|
67
|
+
body:not(.magritte-old-layout) .magritte-form-label___Yzcxs_3-2-41:hover:not(:disabled):not(:active){
|
|
68
|
+
color:var(--magritte-color-component-form-label-text-state-content-hovered-v18-1-1);
|
|
69
|
+
--magritte-ui-icon-color-override:var(--magritte-color-component-form-label-icon-state-content-hovered-v18-1-1);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
.magritte-form-label__counter___a2cSH_3-2-41{
|
|
73
|
+
--magritte-counter-label-color:var(--magritte-color-component-form-label-counter-content-v18-1-1);
|
|
74
|
+
}
|
|
75
|
+
.magritte-form-label_disabled___rq0Rq_3-2-41{
|
|
76
|
+
color:var(--magritte-color-component-form-label-text-state-content-disabled-v18-1-1);
|
|
77
|
+
--magritte-ui-icon-color-override:var(--magritte-color-component-form-label-icon-state-content-disabled-v18-1-1);
|
|
78
|
+
}
|
|
79
|
+
.magritte-form-label_disabled___rq0Rq_3-2-41 .magritte-form-label__counter___a2cSH_3-2-41{
|
|
80
|
+
--magritte-counter-label-color:var(--magritte-color-component-form-label-counter-state-content-disabled-v18-1-1);
|
|
81
|
+
}
|
|
82
|
+
.magritte-form-label__icon___H57oS_3-2-41{
|
|
83
|
+
display:inline-flex;
|
|
84
|
+
align-items:center;
|
|
85
|
+
}
|
package/index.d.ts
ADDED
package/index.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
export { FormLabel } from './FormLabel.js';
|
|
3
|
+
export * from '@hh.ru/magritte-ui-theme-provider';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'react';
|
|
6
|
+
import 'classnames';
|
|
7
|
+
import '@hh.ru/magritte-common-focus-visible';
|
|
8
|
+
import '@hh.ru/magritte-common-keyboard';
|
|
9
|
+
import '@hh.ru/magritte-common-use-disabled';
|
|
10
|
+
import '@hh.ru/magritte-ui-bottom-sheet';
|
|
11
|
+
import '@hh.ru/magritte-ui-counter';
|
|
12
|
+
import '@hh.ru/magritte-ui-icon/icon';
|
|
13
|
+
import '@hh.ru/magritte-ui-navigation-bar';
|
|
14
|
+
import '@hh.ru/magritte-ui-tooltip';
|
|
15
|
+
import '@hh.ru/magritte-ui-typography';
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
|
package/index.mock.d.ts
ADDED
package/index.mock.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
import { mockComponent } from '@hh.ru/magritte-ui-mock-component';
|
|
3
|
+
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
5
|
+
const { ThemeProvider } = jest.requireActual('@hh.ru/magritte-ui-theme-provider/index');
|
|
6
|
+
const FormLabel = mockComponent('FormLabel', undefined, {
|
|
7
|
+
withChildren: false,
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export { FormLabel, ThemeProvider };
|
|
11
|
+
//# sourceMappingURL=index.mock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mock.js","sources":["../src/index.mock.ts"],"sourcesContent":["import { FC } from 'react';\n\nimport { mockComponent } from '@hh.ru/magritte-ui-mock-component';\n\nexport * from '@hh.ru/magritte-ui-form-label/types';\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\nconst { ThemeProvider } = jest.requireActual('@hh.ru/magritte-ui-theme-provider/index');\n\nexport { ThemeProvider };\n\nexport const FormLabel: FC<Record<string, unknown>> = mockComponent('FormLabel', undefined, {\n withChildren: false,\n});\n"],"names":[],"mappings":";;AAMA;AACM,MAAA,EAAE,aAAa,EAAE,GAAG,IAAI,CAAC,aAAa,CAAC,yCAAyC,EAAE;MAI3E,SAAS,GAAgC,aAAa,CAAC,WAAW,EAAE,SAAS,EAAE;AACxF,IAAA,YAAY,EAAE,KAAK;AACtB,CAAA;;;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hh.ru/magritte-ui-form-label",
|
|
3
|
+
"version": "3.2.41",
|
|
4
|
+
"main": "index.js",
|
|
5
|
+
"types": "index.d.ts",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"index.css"
|
|
8
|
+
],
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "yarn root:build $(pwd)",
|
|
11
|
+
"build-test-branch": "yarn root:build-test-branch $(pwd)",
|
|
12
|
+
"changelog": "yarn root:changelog $(pwd)",
|
|
13
|
+
"prepack": "yarn root:prepack $(pwd)",
|
|
14
|
+
"postpublish": "yarn root:postpublish $(pwd)",
|
|
15
|
+
"stylelint-test": "yarn root:stylelint-test $(pwd)",
|
|
16
|
+
"eslint-test": "yarn root:eslint-test $(pwd)",
|
|
17
|
+
"ts-config": "yarn root:ts-config $(pwd)",
|
|
18
|
+
"ts-check": "yarn root:ts-check $(pwd)",
|
|
19
|
+
"test": "jest $(pwd)"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@hh.ru/magritte-common-focus-visible": "0.1.3",
|
|
23
|
+
"@hh.ru/magritte-common-keyboard": "3.0.2",
|
|
24
|
+
"@hh.ru/magritte-common-use-disabled": "1.0.8",
|
|
25
|
+
"@hh.ru/magritte-design-tokens": "18.1.1",
|
|
26
|
+
"@hh.ru/magritte-types": "4.0.1",
|
|
27
|
+
"@hh.ru/magritte-ui-action": "4.3.3",
|
|
28
|
+
"@hh.ru/magritte-ui-bottom-sheet": "4.1.22",
|
|
29
|
+
"@hh.ru/magritte-ui-breakpoint": "4.0.1",
|
|
30
|
+
"@hh.ru/magritte-ui-counter": "4.0.8",
|
|
31
|
+
"@hh.ru/magritte-ui-icon": "7.1.3",
|
|
32
|
+
"@hh.ru/magritte-ui-mock-component": "1.0.10",
|
|
33
|
+
"@hh.ru/magritte-ui-navigation-bar": "4.1.8",
|
|
34
|
+
"@hh.ru/magritte-ui-theme-provider": "1.1.21",
|
|
35
|
+
"@hh.ru/magritte-ui-tooltip": "6.0.10",
|
|
36
|
+
"@hh.ru/magritte-ui-typography": "3.0.8"
|
|
37
|
+
},
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"classnames": ">=2.3.2",
|
|
40
|
+
"react": ">=18.2.0"
|
|
41
|
+
},
|
|
42
|
+
"publishConfig": {
|
|
43
|
+
"access": "public"
|
|
44
|
+
},
|
|
45
|
+
"gitHead": "b660dd64fca3eaad5ec44ea9a73f92bb0d9694aa"
|
|
46
|
+
}
|
package/types.d.ts
ADDED
package/types.js
ADDED
package/types.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|