@semcore/accordion 4.0.18 → 4.0.20
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 +12 -0
- package/lib/cjs/Accordion.js +7 -7
- package/lib/cjs/index.d.js +2 -0
- package/lib/cjs/index.d.js.map +1 -0
- package/lib/es6/Accordion.js +7 -7
- package/lib/es6/index.d.js +2 -0
- package/lib/es6/index.d.js.map +1 -0
- package/package.json +3 -2
- package/lib/cjs/index.d.ts +0 -61
- package/lib/es6/index.d.ts +0 -61
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
+
## [4.0.20] - 2022-10-03
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Version patch update due to children dependencies update (`@semcore/icon` [2.32.0 ~> 2.32.1]).
|
|
10
|
+
|
|
11
|
+
## [4.0.19] - 2022-09-29
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Version patch update due to children dependencies update (`@semcore/icon` [2.30.4 ~> 2.31.0]).
|
|
16
|
+
|
|
5
17
|
## [4.0.18] - 2022-09-21
|
|
6
18
|
|
|
7
19
|
### Changed
|
package/lib/cjs/Accordion.js
CHANGED
|
@@ -56,16 +56,16 @@ var style = (
|
|
|
56
56
|
/*__reshadow_css_start__*/
|
|
57
57
|
_core.sstyled.insert(
|
|
58
58
|
/*__inner_css_start__*/
|
|
59
|
-
".
|
|
59
|
+
".___SItemToggle_17dib_gg_{cursor:pointer;outline:0}.___SItemToggle_17dib_gg_.__keyboardFocused_17dib_gg_{box-shadow:0 0 0 3px rgba(0, 143, 248, 0.2)}.___SItemToggle_17dib_gg_.__disabled_17dib_gg_{opacity:0.3;cursor:default}.___SItemChevron_17dib_gg_{transform:rotate(0deg);transition:transform .25s ease-out}.___SItemChevron_17dib_gg_.__selected_17dib_gg_{transform:rotate(90deg)}@media (prefers-reduced-motion){.___SItemChevron_17dib_gg_{transition:none}}"
|
|
60
60
|
/*__inner_css_end__*/
|
|
61
|
-
, "
|
|
61
|
+
, "17dib_gg_")
|
|
62
62
|
/*__reshadow_css_end__*/
|
|
63
63
|
, {
|
|
64
|
-
"__SItemToggle": "
|
|
65
|
-
"_keyboardFocused": "
|
|
66
|
-
"_disabled": "
|
|
67
|
-
"__SItemChevron": "
|
|
68
|
-
"_selected": "
|
|
64
|
+
"__SItemToggle": "___SItemToggle_17dib_gg_",
|
|
65
|
+
"_keyboardFocused": "__keyboardFocused_17dib_gg_",
|
|
66
|
+
"_disabled": "__disabled_17dib_gg_",
|
|
67
|
+
"__SItemChevron": "___SItemChevron_17dib_gg_",
|
|
68
|
+
"_selected": "__selected_17dib_gg_"
|
|
69
69
|
});
|
|
70
70
|
|
|
71
71
|
var RootAccordion = /*#__PURE__*/function (_Component) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { Box, IFlexProps } from '@semcore/flex-box';\nimport { CProps, PropGetterFn, ReturnEl } from '@semcore/core';\nimport { ICollapseProps } from '@semcore/animation';\n\nexport type AccordionValue = null | number | string | Array<number | string | null>;\n\nexport interface IAccordionProps<T extends AccordionValue = AccordionValue> extends IFlexProps {\n /** Value for the active tab. Can be set as stroke, number, null or as array.\n * @type AccordionValue\n * */\n value?: T;\n /**\n * Value of the active tabs selected by default\n * @type AccordionValue\n * @default []\n */\n defaultValue?: T;\n /** Called when the selection is changed\n * @type (value: AccordionValue, event?: React.SyntheticEvent) => void\n * */\n onChange?: (value: T, event?: React.SyntheticEvent) => void;\n /** Animation duration\n * @default 350 */\n duration?: number;\n}\n\nexport interface IAccordionContext {\n getItemProps: PropGetterFn;\n}\n\nexport interface IAccordionHandlers {\n value: (value: AccordionValue) => void;\n}\n\nexport interface IAccordionItemProps {\n /** Tab value */\n value: string | number;\n /** Disabling selection changes */\n disabled?: boolean;\n}\n\nexport interface IAccordionItemContext {\n getToggleProps?: PropGetterFn;\n getCollapseProps?: PropGetterFn;\n getChevronProps?: PropGetterFn;\n selected?: boolean;\n}\n\ndeclare const Accordion: (<T, V extends AccordionValue = AccordionValue>(\n props: CProps<IAccordionProps<V> & T, IAccordionContext, IAccordionHandlers>,\n) => ReturnEl) & {\n Item: (<T>(\n props: CProps<IAccordionItemProps & T, IAccordionItemContext, IAccordionHandlers>,\n ) => ReturnEl) & {\n Toggle: typeof Box;\n Chevron: typeof Box;\n Collapse: <T>(props: ICollapseProps & T) => ReturnEl;\n };\n};\n\nexport default Accordion;\n"],"mappings":""}
|
package/lib/es6/Accordion.js
CHANGED
|
@@ -32,16 +32,16 @@ var style = (
|
|
|
32
32
|
/*__reshadow_css_start__*/
|
|
33
33
|
_sstyled.insert(
|
|
34
34
|
/*__inner_css_start__*/
|
|
35
|
-
".
|
|
35
|
+
".___SItemToggle_17dib_gg_{cursor:pointer;outline:0}.___SItemToggle_17dib_gg_.__keyboardFocused_17dib_gg_{box-shadow:0 0 0 3px rgba(0, 143, 248, 0.2)}.___SItemToggle_17dib_gg_.__disabled_17dib_gg_{opacity:0.3;cursor:default}.___SItemChevron_17dib_gg_{transform:rotate(0deg);transition:transform .25s ease-out}.___SItemChevron_17dib_gg_.__selected_17dib_gg_{transform:rotate(90deg)}@media (prefers-reduced-motion){.___SItemChevron_17dib_gg_{transition:none}}"
|
|
36
36
|
/*__inner_css_end__*/
|
|
37
|
-
, "
|
|
37
|
+
, "17dib_gg_")
|
|
38
38
|
/*__reshadow_css_end__*/
|
|
39
39
|
, {
|
|
40
|
-
"__SItemToggle": "
|
|
41
|
-
"_keyboardFocused": "
|
|
42
|
-
"_disabled": "
|
|
43
|
-
"__SItemChevron": "
|
|
44
|
-
"_selected": "
|
|
40
|
+
"__SItemToggle": "___SItemToggle_17dib_gg_",
|
|
41
|
+
"_keyboardFocused": "__keyboardFocused_17dib_gg_",
|
|
42
|
+
"_disabled": "__disabled_17dib_gg_",
|
|
43
|
+
"__SItemChevron": "___SItemChevron_17dib_gg_",
|
|
44
|
+
"_selected": "__selected_17dib_gg_"
|
|
45
45
|
});
|
|
46
46
|
|
|
47
47
|
var RootAccordion = /*#__PURE__*/function (_Component) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { Box, IFlexProps } from '@semcore/flex-box';\nimport { CProps, PropGetterFn, ReturnEl } from '@semcore/core';\nimport { ICollapseProps } from '@semcore/animation';\n\nexport type AccordionValue = null | number | string | Array<number | string | null>;\n\nexport interface IAccordionProps<T extends AccordionValue = AccordionValue> extends IFlexProps {\n /** Value for the active tab. Can be set as stroke, number, null or as array.\n * @type AccordionValue\n * */\n value?: T;\n /**\n * Value of the active tabs selected by default\n * @type AccordionValue\n * @default []\n */\n defaultValue?: T;\n /** Called when the selection is changed\n * @type (value: AccordionValue, event?: React.SyntheticEvent) => void\n * */\n onChange?: (value: T, event?: React.SyntheticEvent) => void;\n /** Animation duration\n * @default 350 */\n duration?: number;\n}\n\nexport interface IAccordionContext {\n getItemProps: PropGetterFn;\n}\n\nexport interface IAccordionHandlers {\n value: (value: AccordionValue) => void;\n}\n\nexport interface IAccordionItemProps {\n /** Tab value */\n value: string | number;\n /** Disabling selection changes */\n disabled?: boolean;\n}\n\nexport interface IAccordionItemContext {\n getToggleProps?: PropGetterFn;\n getCollapseProps?: PropGetterFn;\n getChevronProps?: PropGetterFn;\n selected?: boolean;\n}\n\ndeclare const Accordion: (<T, V extends AccordionValue = AccordionValue>(\n props: CProps<IAccordionProps<V> & T, IAccordionContext, IAccordionHandlers>,\n) => ReturnEl) & {\n Item: (<T>(\n props: CProps<IAccordionItemProps & T, IAccordionItemContext, IAccordionHandlers>,\n ) => ReturnEl) & {\n Toggle: typeof Box;\n Chevron: typeof Box;\n Collapse: <T>(props: ICollapseProps & T) => ReturnEl;\n };\n};\n\nexport default Accordion;\n"],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/accordion",
|
|
3
3
|
"description": "Semrush Accordion Component",
|
|
4
|
-
"version": "4.0.
|
|
4
|
+
"version": "4.0.20",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"author": "UI-kit team <ui-kit-team@semrush.com>",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"scripts": {
|
|
12
|
-
"build": "
|
|
12
|
+
"build": "pnpm semcore-builder --source=js",
|
|
13
13
|
"test": "jest"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"directory": "semcore/accordion"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
+
"@types/react": "16.8 - 17",
|
|
34
35
|
"@guidepup/playwright": "0.6.1",
|
|
35
36
|
"@playwright/test": "1.25.1",
|
|
36
37
|
"@semcore/jest-preset-ui": "1.0.0"
|
package/lib/cjs/index.d.ts
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { Box, IFlexProps } from '@semcore/flex-box';
|
|
2
|
-
import { CProps, PropGetterFn, ReturnEl } from '@semcore/core';
|
|
3
|
-
import { ICollapseProps } from '@semcore/animation';
|
|
4
|
-
|
|
5
|
-
export type AccordionValue = null | number | string | Array<number | string | null>;
|
|
6
|
-
|
|
7
|
-
export interface IAccordionProps<T extends AccordionValue = AccordionValue> extends IFlexProps {
|
|
8
|
-
/** Value for the active tab. Can be set as stroke, number, null or as array.
|
|
9
|
-
* @type AccordionValue
|
|
10
|
-
* */
|
|
11
|
-
value?: T;
|
|
12
|
-
/**
|
|
13
|
-
* Value of the active tabs selected by default
|
|
14
|
-
* @type AccordionValue
|
|
15
|
-
* @default []
|
|
16
|
-
*/
|
|
17
|
-
defaultValue?: T;
|
|
18
|
-
/** Called when the selection is changed
|
|
19
|
-
* @type (value: AccordionValue, event?: React.SyntheticEvent) => void
|
|
20
|
-
* */
|
|
21
|
-
onChange?: (value: T, event?: React.SyntheticEvent) => void;
|
|
22
|
-
/** Animation duration
|
|
23
|
-
* @default 350 */
|
|
24
|
-
duration?: number;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface IAccordionContext {
|
|
28
|
-
getItemProps: PropGetterFn;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface IAccordionHandlers {
|
|
32
|
-
value: (value: AccordionValue) => void;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export interface IAccordionItemProps {
|
|
36
|
-
/** Tab value */
|
|
37
|
-
value: string | number;
|
|
38
|
-
/** Disabling selection changes */
|
|
39
|
-
disabled?: boolean;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface IAccordionItemContext {
|
|
43
|
-
getToggleProps?: PropGetterFn;
|
|
44
|
-
getCollapseProps?: PropGetterFn;
|
|
45
|
-
getChevronProps?: PropGetterFn;
|
|
46
|
-
selected?: boolean;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
declare const Accordion: (<T, V extends AccordionValue = AccordionValue>(
|
|
50
|
-
props: CProps<IAccordionProps<V> & T, IAccordionContext, IAccordionHandlers>,
|
|
51
|
-
) => ReturnEl) & {
|
|
52
|
-
Item: (<T>(
|
|
53
|
-
props: CProps<IAccordionItemProps & T, IAccordionItemContext, IAccordionHandlers>,
|
|
54
|
-
) => ReturnEl) & {
|
|
55
|
-
Toggle: typeof Box;
|
|
56
|
-
Chevron: typeof Box;
|
|
57
|
-
Collapse: <T>(props: ICollapseProps & T) => ReturnEl;
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export default Accordion;
|
package/lib/es6/index.d.ts
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { Box, IFlexProps } from '@semcore/flex-box';
|
|
2
|
-
import { CProps, PropGetterFn, ReturnEl } from '@semcore/core';
|
|
3
|
-
import { ICollapseProps } from '@semcore/animation';
|
|
4
|
-
|
|
5
|
-
export type AccordionValue = null | number | string | Array<number | string | null>;
|
|
6
|
-
|
|
7
|
-
export interface IAccordionProps<T extends AccordionValue = AccordionValue> extends IFlexProps {
|
|
8
|
-
/** Value for the active tab. Can be set as stroke, number, null or as array.
|
|
9
|
-
* @type AccordionValue
|
|
10
|
-
* */
|
|
11
|
-
value?: T;
|
|
12
|
-
/**
|
|
13
|
-
* Value of the active tabs selected by default
|
|
14
|
-
* @type AccordionValue
|
|
15
|
-
* @default []
|
|
16
|
-
*/
|
|
17
|
-
defaultValue?: T;
|
|
18
|
-
/** Called when the selection is changed
|
|
19
|
-
* @type (value: AccordionValue, event?: React.SyntheticEvent) => void
|
|
20
|
-
* */
|
|
21
|
-
onChange?: (value: T, event?: React.SyntheticEvent) => void;
|
|
22
|
-
/** Animation duration
|
|
23
|
-
* @default 350 */
|
|
24
|
-
duration?: number;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface IAccordionContext {
|
|
28
|
-
getItemProps: PropGetterFn;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface IAccordionHandlers {
|
|
32
|
-
value: (value: AccordionValue) => void;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export interface IAccordionItemProps {
|
|
36
|
-
/** Tab value */
|
|
37
|
-
value: string | number;
|
|
38
|
-
/** Disabling selection changes */
|
|
39
|
-
disabled?: boolean;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface IAccordionItemContext {
|
|
43
|
-
getToggleProps?: PropGetterFn;
|
|
44
|
-
getCollapseProps?: PropGetterFn;
|
|
45
|
-
getChevronProps?: PropGetterFn;
|
|
46
|
-
selected?: boolean;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
declare const Accordion: (<T, V extends AccordionValue = AccordionValue>(
|
|
50
|
-
props: CProps<IAccordionProps<V> & T, IAccordionContext, IAccordionHandlers>,
|
|
51
|
-
) => ReturnEl) & {
|
|
52
|
-
Item: (<T>(
|
|
53
|
-
props: CProps<IAccordionItemProps & T, IAccordionItemContext, IAccordionHandlers>,
|
|
54
|
-
) => ReturnEl) & {
|
|
55
|
-
Toggle: typeof Box;
|
|
56
|
-
Chevron: typeof Box;
|
|
57
|
-
Collapse: <T>(props: ICollapseProps & T) => ReturnEl;
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export default Accordion;
|