@semcore/accordion 4.2.8 → 4.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
+ ## [4.2.9] - 2023-01-18
6
+
7
+ ### Added
8
+
9
+ - Added `duration` property to `Accordion.Item` types.
10
+
5
11
  ## [4.2.8] - 2023-01-11
6
12
 
7
13
  ### Changed
@@ -56,16 +56,16 @@ var style = (
56
56
  /*__reshadow_css_start__*/
57
57
  _core.sstyled.insert(
58
58
  /*__inner_css_start__*/
59
- ".___SItemToggle_t7xev_gg_{cursor:pointer;outline:0}.___SItemToggle_t7xev_gg_.__keyboardFocused_t7xev_gg_{box-shadow:var(--intergalactic-keyboard-focus,0 0 0 3px rgba(0,143,248,.3))}.___SItemToggle_t7xev_gg_.__disabled_t7xev_gg_{opacity:var(--intergalactic-disabled-opacity,.3);cursor:default}.___SItemChevron_t7xev_gg_{transform:rotate(0deg);transition:transform .25s ease-out}.___SItemChevron_t7xev_gg_.__selected_t7xev_gg_{transform:rotate(90deg)}@media (prefers-reduced-motion){.___SItemChevron_t7xev_gg_{transition:none}}"
59
+ ".___SItemToggle_1tnlm_gg_{cursor:pointer;outline:0}.___SItemToggle_1tnlm_gg_.__keyboardFocused_1tnlm_gg_{box-shadow:var(--intergalactic-keyboard-focus,0 0 0 3px rgba(0,143,248,.3))}.___SItemToggle_1tnlm_gg_.__disabled_1tnlm_gg_{opacity:var(--intergalactic-disabled-opacity,.3);cursor:default}.___SItemChevron_1tnlm_gg_{transform:rotate(0deg);transition:transform .25s ease-out}.___SItemChevron_1tnlm_gg_.__selected_1tnlm_gg_{transform:rotate(90deg)}@media (prefers-reduced-motion){.___SItemChevron_1tnlm_gg_{transition:none}}"
60
60
  /*__inner_css_end__*/
61
- , "t7xev_gg_")
61
+ , "1tnlm_gg_")
62
62
  /*__reshadow_css_end__*/
63
63
  , {
64
- "__SItemToggle": "___SItemToggle_t7xev_gg_",
65
- "_keyboardFocused": "__keyboardFocused_t7xev_gg_",
66
- "_disabled": "__disabled_t7xev_gg_",
67
- "__SItemChevron": "___SItemChevron_t7xev_gg_",
68
- "_selected": "__selected_t7xev_gg_"
64
+ "__SItemToggle": "___SItemToggle_1tnlm_gg_",
65
+ "_keyboardFocused": "__keyboardFocused_1tnlm_gg_",
66
+ "_disabled": "__disabled_1tnlm_gg_",
67
+ "__SItemChevron": "___SItemChevron_1tnlm_gg_",
68
+ "_selected": "__selected_1tnlm_gg_"
69
69
  });
70
70
 
71
71
  var RootAccordion = /*#__PURE__*/function (_Component) {
@@ -1 +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":""}
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 of each Accordion.Item inside\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 /** Animation duration\n * @default 350 */\n duration?: number;\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":""}
@@ -32,16 +32,16 @@ var style = (
32
32
  /*__reshadow_css_start__*/
33
33
  _sstyled.insert(
34
34
  /*__inner_css_start__*/
35
- ".___SItemToggle_t7xev_gg_{cursor:pointer;outline:0}.___SItemToggle_t7xev_gg_.__keyboardFocused_t7xev_gg_{box-shadow:var(--intergalactic-keyboard-focus,0 0 0 3px rgba(0,143,248,.3))}.___SItemToggle_t7xev_gg_.__disabled_t7xev_gg_{opacity:var(--intergalactic-disabled-opacity,.3);cursor:default}.___SItemChevron_t7xev_gg_{transform:rotate(0deg);transition:transform .25s ease-out}.___SItemChevron_t7xev_gg_.__selected_t7xev_gg_{transform:rotate(90deg)}@media (prefers-reduced-motion){.___SItemChevron_t7xev_gg_{transition:none}}"
35
+ ".___SItemToggle_1tnlm_gg_{cursor:pointer;outline:0}.___SItemToggle_1tnlm_gg_.__keyboardFocused_1tnlm_gg_{box-shadow:var(--intergalactic-keyboard-focus,0 0 0 3px rgba(0,143,248,.3))}.___SItemToggle_1tnlm_gg_.__disabled_1tnlm_gg_{opacity:var(--intergalactic-disabled-opacity,.3);cursor:default}.___SItemChevron_1tnlm_gg_{transform:rotate(0deg);transition:transform .25s ease-out}.___SItemChevron_1tnlm_gg_.__selected_1tnlm_gg_{transform:rotate(90deg)}@media (prefers-reduced-motion){.___SItemChevron_1tnlm_gg_{transition:none}}"
36
36
  /*__inner_css_end__*/
37
- , "t7xev_gg_")
37
+ , "1tnlm_gg_")
38
38
  /*__reshadow_css_end__*/
39
39
  , {
40
- "__SItemToggle": "___SItemToggle_t7xev_gg_",
41
- "_keyboardFocused": "__keyboardFocused_t7xev_gg_",
42
- "_disabled": "__disabled_t7xev_gg_",
43
- "__SItemChevron": "___SItemChevron_t7xev_gg_",
44
- "_selected": "__selected_t7xev_gg_"
40
+ "__SItemToggle": "___SItemToggle_1tnlm_gg_",
41
+ "_keyboardFocused": "__keyboardFocused_1tnlm_gg_",
42
+ "_disabled": "__disabled_1tnlm_gg_",
43
+ "__SItemChevron": "___SItemChevron_1tnlm_gg_",
44
+ "_selected": "__selected_1tnlm_gg_"
45
45
  });
46
46
 
47
47
  var RootAccordion = /*#__PURE__*/function (_Component) {
@@ -1 +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":""}
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 of each Accordion.Item inside\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 /** Animation duration\n * @default 350 */\n duration?: number;\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":""}
@@ -19,7 +19,7 @@ export interface IAccordionProps<T extends AccordionValue = AccordionValue> exte
19
19
  * @type (value: AccordionValue, event?: React.SyntheticEvent) => void
20
20
  * */
21
21
  onChange?: (value: T, event?: React.SyntheticEvent) => void;
22
- /** Animation duration
22
+ /** Animation duration of each Accordion.Item inside
23
23
  * @default 350 */
24
24
  duration?: number;
25
25
  }
@@ -37,6 +37,9 @@ export interface IAccordionItemProps {
37
37
  value: string | number;
38
38
  /** Disabling selection changes */
39
39
  disabled?: boolean;
40
+ /** Animation duration
41
+ * @default 350 */
42
+ duration?: number;
40
43
  }
41
44
 
42
45
  export interface IAccordionItemContext {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/accordion",
3
3
  "description": "Semrush Accordion Component",
4
- "version": "4.2.8",
4
+ "version": "4.2.9",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",