@zendeskgarden/react-theming 9.2.0 → 9.3.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/dist/esm/utils/StyledBaseIcon.js +4 -3
- package/dist/index.cjs.js +3 -2
- package/dist/typings/index.d.ts +1 -1
- package/dist/typings/types/index.d.ts +5 -1
- package/dist/typings/utils/StyledBaseIcon.d.ts +3 -2
- package/dist/typings/utils/arrowStyles.d.ts +1 -1
- package/dist/typings/utils/focusStyles.d.ts +1 -1
- package/dist/typings/utils/menuStyles.d.ts +1 -1
- package/package.json +3 -3
|
@@ -5,15 +5,16 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import styled from 'styled-components';
|
|
8
|
-
import
|
|
8
|
+
import { cloneElement, Children } from 'react';
|
|
9
9
|
|
|
10
|
-
const StyledBaseIcon = styled(
|
|
10
|
+
const StyledBaseIcon = styled(
|
|
11
|
+
_ref => {
|
|
11
12
|
let {
|
|
12
13
|
children,
|
|
13
14
|
theme,
|
|
14
15
|
...props
|
|
15
16
|
} = _ref;
|
|
16
|
-
return
|
|
17
|
+
return cloneElement(Children.only(children), props);
|
|
17
18
|
}).withConfig({
|
|
18
19
|
displayName: "StyledBaseIcon",
|
|
19
20
|
componentId: "sc-1moykgb-0"
|
package/dist/index.cjs.js
CHANGED
|
@@ -1454,13 +1454,14 @@ const focusStyles = _ref => {
|
|
|
1454
1454
|
return styled.css(["&:focus{outline:none;}", "{outline:", ";outline-offset:", ";box-shadow:", ";", "}"], selector, outline, outlineOffset, _boxShadow, styles);
|
|
1455
1455
|
};
|
|
1456
1456
|
|
|
1457
|
-
const StyledBaseIcon = styled__default.default(
|
|
1457
|
+
const StyledBaseIcon = styled__default.default(
|
|
1458
|
+
_ref => {
|
|
1458
1459
|
let {
|
|
1459
1460
|
children,
|
|
1460
1461
|
theme,
|
|
1461
1462
|
...props
|
|
1462
1463
|
} = _ref;
|
|
1463
|
-
return
|
|
1464
|
+
return React.cloneElement(React.Children.only(children), props);
|
|
1464
1465
|
}).withConfig({
|
|
1465
1466
|
displayName: "StyledBaseIcon",
|
|
1466
1467
|
componentId: "sc-1moykgb-0"
|
package/dist/typings/index.d.ts
CHANGED
|
@@ -24,4 +24,4 @@ export { useText } from './utils/useText';
|
|
|
24
24
|
export { default as menuStyles } from './utils/menuStyles';
|
|
25
25
|
export { focusStyles, SELECTOR_FOCUS_VISIBLE } from './utils/focusStyles';
|
|
26
26
|
export { StyledBaseIcon } from './utils/StyledBaseIcon';
|
|
27
|
-
export { ARROW_POSITION, MENU_POSITION, PLACEMENT, type IGardenTheme, type IThemeProviderProps, type ArrowPosition, type CheckeredBackgroundParameters, type ColorParameters, type FocusBoxShadowParameters, type FocusStylesParameters, type MenuPosition, type Placement } from './types';
|
|
27
|
+
export { ARROW_POSITION, MENU_POSITION, PLACEMENT, type IGardenTheme, type IStyledBaseIconProps, type IThemeProviderProps, type ArrowPosition, type CheckeredBackgroundParameters, type ColorParameters, type FocusBoxShadowParameters, type FocusStylesParameters, type MenuPosition, type Placement } from './types';
|
|
@@ -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
|
-
import {
|
|
7
|
+
import { PropsWithChildren, SVGAttributes } from 'react';
|
|
8
|
+
import { CSSObject, DefaultTheme, ThemeProviderProps } from 'styled-components';
|
|
8
9
|
export declare const ARROW_POSITION: readonly ["top", "top-left", "top-right", "right", "right-top", "right-bottom", "bottom", "bottom-left", "bottom-right", "left", "left-top", "left-bottom"];
|
|
9
10
|
export type ArrowPosition = (typeof ARROW_POSITION)[number];
|
|
10
11
|
export declare const MENU_POSITION: readonly ["top", "right", "bottom", "left"];
|
|
@@ -172,3 +173,6 @@ export interface IThemeProviderProps extends Partial<ThemeProviderProps<IGardenT
|
|
|
172
173
|
*/
|
|
173
174
|
theme?: IGardenTheme | ((theme: IGardenTheme) => IGardenTheme);
|
|
174
175
|
}
|
|
176
|
+
export interface IStyledBaseIconProps extends PropsWithChildren<SVGAttributes<SVGElement>> {
|
|
177
|
+
theme?: DefaultTheme;
|
|
178
|
+
}
|
|
@@ -4,5 +4,6 @@
|
|
|
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
|
|
8
|
-
|
|
7
|
+
import { ReactElement } from 'react';
|
|
8
|
+
import { IStyledBaseIconProps } from '../types';
|
|
9
|
+
export declare const StyledBaseIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<IStyledBaseIconProps, never>> & string & Omit<({ children, theme, ...props }: IStyledBaseIconProps) => ReactElement<any, string | import("react").JSXElementConstructor<any>>, keyof import("react").Component<any, {}, any>>;
|
|
@@ -45,5 +45,5 @@ type ArrowOptions = {
|
|
|
45
45
|
*
|
|
46
46
|
* @component
|
|
47
47
|
*/
|
|
48
|
-
export default function arrowStyles(position: ArrowPosition, options?: ArrowOptions): import("styled-components").
|
|
48
|
+
export default function arrowStyles(position: ArrowPosition, options?: ArrowOptions): import("styled-components").RuleSet<object>;
|
|
49
49
|
export {};
|
|
@@ -36,4 +36,4 @@ export declare const SELECTOR_FOCUS_VISIBLE = "&:focus-visible";
|
|
|
36
36
|
* }
|
|
37
37
|
* ```
|
|
38
38
|
*/
|
|
39
|
-
export declare const focusStyles: ({ condition, selector, shadowWidth, spacerWidth, styles: { boxShadow, ...styles }, theme, ...options }: FocusStylesParameters) => import("styled-components").
|
|
39
|
+
export declare const focusStyles: ({ condition, selector, shadowWidth, spacerWidth, styles: { boxShadow, ...styles }, theme, ...options }: FocusStylesParameters) => import("styled-components").RuleSet<object>;
|
|
@@ -33,5 +33,5 @@ type MenuOptions = {
|
|
|
33
33
|
* @param {string} [options.animationModifier] A CSS class or attribute selector
|
|
34
34
|
* which, when applied, animates the menu's appearance.
|
|
35
35
|
*/
|
|
36
|
-
export default function menuStyles(position: MenuPosition, options?: MenuOptions): import("styled-components").
|
|
36
|
+
export default function menuStyles(position: MenuPosition, options?: MenuOptions): import("styled-components").RuleSet<object>;
|
|
37
37
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-theming",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.3.0",
|
|
4
4
|
"description": "Theming utilities and components within the Garden Design System",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Zendesk Garden <garden@zendesk.com>",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
33
33
|
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
34
|
-
"styled-components": "^4.2.0 || ^5.3.1"
|
|
34
|
+
"styled-components": "^4.2.0 || ^5.3.1 || ^6.0.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/lodash.get": "4.4.9",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
49
|
"zendeskgarden:src": "src/index.ts",
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "fa6461e0d9fae27956980056006e8013daedc6b9"
|
|
51
51
|
}
|