@zendeskgarden/react-accordions 8.49.2 → 8.49.3
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/dist/index.cjs.js +188 -188
- package/dist/index.esm.js +187 -187
- package/dist/typings/elements/accordion/Accordion.d.ts +2 -25
- package/dist/typings/elements/stepper/Stepper.d.ts +2 -7
- package/dist/typings/elements/stepper/components/Label.d.ts +2 -7
- package/dist/typings/elements/timeline/Timeline.d.ts +2 -5
- package/dist/typings/elements/timeline/components/Item.d.ts +2 -7
- package/dist/typings/index.d.ts +4 -6
- package/dist/typings/styled/accordion/StyledButton.d.ts +2 -1
- package/dist/typings/styled/accordion/StyledHeader.d.ts +2 -1
- package/dist/typings/styled/accordion/StyledInnerPanel.d.ts +2 -1
- package/dist/typings/styled/accordion/StyledPanel.d.ts +2 -1
- package/dist/typings/styled/accordion/StyledRotateIcon.d.ts +2 -1
- package/dist/typings/styled/stepper/StyledInnerContent.d.ts +2 -1
- package/dist/typings/styled/stepper/StyledStep.d.ts +2 -1
- package/dist/typings/styled/stepper/StyledStepper.d.ts +2 -1
- package/dist/typings/types/index.d.ts +53 -0
- package/package.json +4 -4
|
@@ -4,13 +4,8 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
import React
|
|
8
|
-
|
|
9
|
-
/** Replaces the dot with an icon */
|
|
10
|
-
icon?: ReactNode;
|
|
11
|
-
/** Provides surface color for an icon placed on a non-white background */
|
|
12
|
-
surfaceColor?: string;
|
|
13
|
-
}
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { ITimelineItemProps } from 'packages/accordions/src/types';
|
|
14
9
|
/**
|
|
15
10
|
* @deprecated use ITimelineItemProps instead
|
|
16
11
|
*/
|
package/dist/typings/index.d.ts
CHANGED
|
@@ -4,11 +4,9 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
export { Stepper } from './elements/stepper/Stepper';
|
|
8
|
-
export type { IStepperProps } from './elements/stepper/Stepper';
|
|
9
|
-
export type { IStepperLabelProps } from './elements/stepper/components/Label';
|
|
10
7
|
export { Accordion } from './elements/accordion/Accordion';
|
|
11
|
-
export
|
|
8
|
+
export { Stepper } from './elements/stepper/Stepper';
|
|
12
9
|
export { Timeline } from './elements/timeline/Timeline';
|
|
13
|
-
|
|
14
|
-
export type {
|
|
10
|
+
/** @deprecated */
|
|
11
|
+
export type { IItem } from './elements/timeline/components/Item';
|
|
12
|
+
export type { IAccordionProps, IStepperProps, IStepperLabelProps, ITimelineProps, ITimelineItemProps } from './types';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { DefaultTheme } from 'styled-components';
|
|
8
8
|
export declare const COMPONENT_ID = "accordions.button";
|
|
9
|
-
|
|
9
|
+
interface IStyledButton {
|
|
10
10
|
isCompact?: boolean;
|
|
11
11
|
isHovered?: boolean;
|
|
12
12
|
isCollapsible?: boolean;
|
|
@@ -17,3 +17,4 @@ export interface IStyledButton {
|
|
|
17
17
|
* 2. Remove dotted outline from Firefox on focus.
|
|
18
18
|
*/
|
|
19
19
|
export declare const StyledButton: import("styled-components").StyledComponent<"button", DefaultTheme, IStyledButton, never>;
|
|
20
|
+
export {};
|
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
interface IStyledHeader {
|
|
8
8
|
isFocused?: boolean;
|
|
9
9
|
isExpanded?: boolean;
|
|
10
10
|
isCollapsible?: boolean;
|
|
11
11
|
}
|
|
12
12
|
export declare const StyledHeader: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, IStyledHeader, never>;
|
|
13
|
+
export {};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
interface IStyledInnerPanel {
|
|
8
8
|
isExpanded?: boolean;
|
|
9
9
|
isAnimated?: boolean;
|
|
10
10
|
}
|
|
@@ -12,3 +12,4 @@ export interface IStyledInnerPanel {
|
|
|
12
12
|
* 1. Override the inline max-height style used for animation.
|
|
13
13
|
*/
|
|
14
14
|
export declare const StyledInnerPanel: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, IStyledInnerPanel, never>;
|
|
15
|
+
export {};
|
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import { DefaultTheme } from 'styled-components';
|
|
8
|
-
|
|
8
|
+
interface IStyledPanel {
|
|
9
9
|
isBare?: boolean;
|
|
10
10
|
isCompact?: boolean;
|
|
11
11
|
isExpanded?: boolean;
|
|
12
12
|
isAnimated?: boolean;
|
|
13
13
|
}
|
|
14
14
|
export declare const StyledPanel: import("styled-components").StyledComponent<"section", DefaultTheme, IStyledPanel, never>;
|
|
15
|
+
export {};
|
|
@@ -6,10 +6,11 @@
|
|
|
6
6
|
*/
|
|
7
7
|
/// <reference types="react" />
|
|
8
8
|
import { DefaultTheme } from 'styled-components';
|
|
9
|
-
|
|
9
|
+
interface IStyledRotateIcon {
|
|
10
10
|
isCompact?: boolean;
|
|
11
11
|
}
|
|
12
12
|
export declare const StyledRotateIcon: import("styled-components").StyledComponent<({ children, isRotated, isHovered, isCompact, isCollapsible, ...props }: any) => import("react").DetailedReactHTMLElement<any, HTMLElement>, DefaultTheme, {
|
|
13
13
|
'data-garden-id': string;
|
|
14
14
|
'data-garden-version': string;
|
|
15
15
|
} & IStyledRotateIcon, "data-garden-id" | "data-garden-version">;
|
|
16
|
+
export {};
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
interface IStyledInnerContent {
|
|
8
8
|
isActive?: boolean;
|
|
9
9
|
}
|
|
10
10
|
export declare const StyledInnerContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, IStyledInnerContent, never>;
|
|
11
|
+
export {};
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
interface IStyledStep {
|
|
8
8
|
isHorizontal?: boolean;
|
|
9
9
|
}
|
|
10
10
|
export declare const StyledStep: import("styled-components").StyledComponent<"li", import("styled-components").DefaultTheme, IStyledStep, never>;
|
|
11
|
+
export {};
|
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
interface IStyledStepper {
|
|
8
8
|
isHorizontal?: boolean;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* 1. <ol> reset.
|
|
12
12
|
*/
|
|
13
13
|
export declare const StyledStepper: import("styled-components").StyledComponent<"ol", import("styled-components").DefaultTheme, IStyledStepper, never>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import { HTMLAttributes, LiHTMLAttributes, OlHTMLAttributes, ReactNode } from 'react';
|
|
8
|
+
export interface IAccordionProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
9
|
+
/** Sets `aria-level` heading rank in the document structure */
|
|
10
|
+
level: number;
|
|
11
|
+
/** Sets the expanded sections in a controlled accordion */
|
|
12
|
+
expandedSections?: number[];
|
|
13
|
+
/** Sets the default expanded sections in an uncontrolled accordion */
|
|
14
|
+
defaultExpandedSections?: number[];
|
|
15
|
+
/** Hides section borders */
|
|
16
|
+
isBare?: boolean;
|
|
17
|
+
/** Allows uncontrolled accordion sections to collapse */
|
|
18
|
+
isCollapsible?: boolean;
|
|
19
|
+
/** Applies compact styling */
|
|
20
|
+
isCompact?: boolean;
|
|
21
|
+
/** Animates section expansion and collapse */
|
|
22
|
+
isAnimated?: boolean;
|
|
23
|
+
/** Enables simultaneous expansion of uncontrolled accordion sections */
|
|
24
|
+
isExpandable?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Handles accordion expansion changes
|
|
27
|
+
*
|
|
28
|
+
* @param {number} index A section index
|
|
29
|
+
*/
|
|
30
|
+
onChange?: (index: number) => void;
|
|
31
|
+
}
|
|
32
|
+
export interface IStepperProps extends OlHTMLAttributes<HTMLOListElement> {
|
|
33
|
+
/** Defines the currently active step, starting at 0 */
|
|
34
|
+
activeIndex?: number;
|
|
35
|
+
/** Applies horizontal layout styling */
|
|
36
|
+
isHorizontal?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export interface IStepperLabelProps extends HTMLAttributes<HTMLDivElement> {
|
|
39
|
+
/** Replaces the label number with an icon */
|
|
40
|
+
icon?: React.ReactNode;
|
|
41
|
+
/** Hides the label text */
|
|
42
|
+
isHidden?: boolean;
|
|
43
|
+
}
|
|
44
|
+
export interface ITimelineProps extends OlHTMLAttributes<HTMLOListElement> {
|
|
45
|
+
/** Applies alternate styling */
|
|
46
|
+
isAlternate?: boolean;
|
|
47
|
+
}
|
|
48
|
+
export interface ITimelineItemProps extends LiHTMLAttributes<HTMLLIElement> {
|
|
49
|
+
/** Replaces the dot with an icon */
|
|
50
|
+
icon?: ReactNode;
|
|
51
|
+
/** Provides surface color for an icon placed on a non-white background */
|
|
52
|
+
surfaceColor?: string;
|
|
53
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-accordions",
|
|
3
|
-
"version": "8.49.
|
|
3
|
+
"version": "8.49.3",
|
|
4
4
|
"description": "Components related to accordions in the Garden Design System",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Zendesk Garden <garden@zendesk.com>",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/lodash.debounce": "4.0.6",
|
|
39
|
-
"@zendeskgarden/react-theming": "^8.49.
|
|
40
|
-
"@zendeskgarden/svg-icons": "6.
|
|
39
|
+
"@zendeskgarden/react-theming": "^8.49.3",
|
|
40
|
+
"@zendeskgarden/svg-icons": "6.31.1"
|
|
41
41
|
},
|
|
42
42
|
"keywords": [
|
|
43
43
|
"accordions",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
52
|
"zendeskgarden:src": "src/index.ts",
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "983322364971c051ca6ce478770edfc3310e4c4b"
|
|
54
54
|
}
|