@zendeskgarden/react-typography 9.0.0-next.8 → 9.0.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.
@@ -5,31 +5,20 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  import styled, { css } from 'styled-components';
8
- import React, { Children } from 'react';
9
- import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
8
+ import { StyledBaseIcon, retrieveComponentStyles } from '@zendeskgarden/react-theming';
10
9
 
11
10
  const COMPONENT_ID = 'typography.icon';
12
11
  const sizeStyles = props => {
13
- const margin = props.isStart && `${props.theme.space.base * 2}px`;
12
+ const margin = props.$isStart && `${props.theme.space.base * 2}px`;
14
13
  const size = props.theme.iconSizes.md;
15
14
  return css(["margin-", ":", ";width:", ";height:", ";"], props.theme.rtl ? 'left' : 'right', margin, size, size);
16
15
  };
17
- const StyledIcon = styled(_ref => {
18
- let {
19
- children,
20
- isStart,
21
- ...props
22
- } = _ref;
23
- return React.cloneElement(Children.only(children), props);
24
- }).attrs({
16
+ const StyledIcon = styled(StyledBaseIcon).attrs({
25
17
  'data-garden-id': COMPONENT_ID,
26
- 'data-garden-version': '9.0.0-next.8'
18
+ 'data-garden-version': '9.0.0'
27
19
  }).withConfig({
28
20
  displayName: "StyledIcon",
29
21
  componentId: "sc-10rfb5b-0"
30
22
  })(["position:relative;top:-1px;vertical-align:middle;", ";", ";"], props => sizeStyles(props), props => retrieveComponentStyles(COMPONENT_ID, props));
31
- StyledIcon.defaultProps = {
32
- theme: DEFAULT_THEME
33
- };
34
23
 
35
24
  export { StyledIcon };
@@ -5,7 +5,7 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  import styled, { css } from 'styled-components';
8
- import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
8
+ import { retrieveComponentStyles } from '@zendeskgarden/react-theming';
9
9
 
10
10
  const listStyles = props => {
11
11
  const rtl = props.theme.rtl;
@@ -14,24 +14,18 @@ const listStyles = props => {
14
14
  const ORDERED_ID = 'typography.ordered_list';
15
15
  const StyledOrderedList = styled.ol.attrs({
16
16
  'data-garden-id': ORDERED_ID,
17
- 'data-garden-version': '9.0.0-next.8'
17
+ 'data-garden-version': '9.0.0'
18
18
  }).withConfig({
19
19
  displayName: "StyledList__StyledOrderedList",
20
20
  componentId: "sc-jdbsfi-0"
21
21
  })(["", ";", ";"], props => listStyles(props), props => retrieveComponentStyles(ORDERED_ID, props));
22
- StyledOrderedList.defaultProps = {
23
- theme: DEFAULT_THEME
24
- };
25
22
  const UNORDERED_ID = 'typography.unordered_list';
26
23
  const StyledUnorderedList = styled.ul.attrs({
27
24
  'data-garden-id': UNORDERED_ID,
28
- 'data-garden-version': '9.0.0-next.8'
25
+ 'data-garden-version': '9.0.0'
29
26
  }).withConfig({
30
27
  displayName: "StyledList__StyledUnorderedList",
31
28
  componentId: "sc-jdbsfi-1"
32
29
  })(["", ";", ";"], props => listStyles(props), props => retrieveComponentStyles(UNORDERED_ID, props));
33
- StyledUnorderedList.defaultProps = {
34
- theme: DEFAULT_THEME
35
- };
36
30
 
37
31
  export { StyledOrderedList, StyledUnorderedList };
@@ -13,7 +13,7 @@ import { StyledFont } from './StyledFont.js';
13
13
  const listItemPaddingStyles = props => {
14
14
  const base = props.theme.space.base;
15
15
  const paddingTop = props.space === 'large' ? `${base * 2}px` : `${base}px`;
16
- return css(["padding-top:", ";", " > &:first-child,", " > &:first-child{padding-top:0;}", " ", " > &:first-child,", " ", " > &:first-child,", " ", " > &:first-child,", " ", " > &:first-child{padding-top:", ";}"], paddingTop, StyledOrderedList, StyledUnorderedList, StyledOrderedList, StyledOrderedList, StyledOrderedList, StyledUnorderedList, StyledUnorderedList, StyledUnorderedList, StyledUnorderedList, StyledUnorderedList, paddingTop);
16
+ return css(["padding-top:", ";", " > &:first-child,", " > &:first-child{padding-top:0;}", " ", " > &:first-child,", " ", " > &:first-child,", " ", " > &:first-child,", " ", " > &:first-child{padding-top:", ";}"], paddingTop, StyledOrderedList, StyledUnorderedList, StyledOrderedList, StyledOrderedList, StyledOrderedList, StyledUnorderedList, StyledUnorderedList, StyledUnorderedList, StyledUnorderedList, StyledOrderedList, paddingTop);
17
17
  };
18
18
  const listItemStyles = props => {
19
19
  return css(["line-height:", ";", ";"], getLineHeight(props.theme.lineHeights.md, props.theme.fontSizes.md), props.space !== 'small' && listItemPaddingStyles(props));
@@ -21,7 +21,7 @@ const listItemStyles = props => {
21
21
  const ORDERED_ID = 'typography.ordered_list_item';
22
22
  const StyledOrderedListItem = styled(StyledFont).attrs({
23
23
  'data-garden-id': ORDERED_ID,
24
- 'data-garden-version': '9.0.0-next.8',
24
+ 'data-garden-version': '9.0.0',
25
25
  as: 'li'
26
26
  }).withConfig({
27
27
  displayName: "StyledListItem__StyledOrderedListItem",
@@ -34,7 +34,7 @@ StyledOrderedListItem.defaultProps = {
34
34
  const UNORDERED_ID = 'typography.unordered_list_item';
35
35
  const StyledUnorderedListItem = styled(StyledFont).attrs({
36
36
  'data-garden-id': UNORDERED_ID,
37
- 'data-garden-version': '9.0.0-next.8',
37
+ 'data-garden-version': '9.0.0',
38
38
  as: 'li'
39
39
  }).withConfig({
40
40
  displayName: "StyledListItem__StyledUnorderedListItem",
@@ -5,19 +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 { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
8
+ import { retrieveComponentStyles } from '@zendeskgarden/react-theming';
9
9
  import { THEME_SIZES } from './StyledFont.js';
10
10
 
11
11
  const COMPONENT_ID = 'typography.paragraph';
12
12
  const StyledParagraph = styled.p.attrs({
13
13
  'data-garden-id': COMPONENT_ID,
14
- 'data-garden-version': '9.0.0-next.8'
14
+ 'data-garden-version': '9.0.0'
15
15
  }).withConfig({
16
16
  displayName: "StyledParagraph",
17
17
  componentId: "sc-zkuftz-0"
18
18
  })(["margin:0;padding:0;direction:", ";& + &,blockquote + &{margin-top:", ";}", ";"], props => props.theme.rtl ? 'rtl' : 'ltr', props => props.theme.lineHeights[THEME_SIZES[props.size]], props => retrieveComponentStyles(COMPONENT_ID, props));
19
- StyledParagraph.defaultProps = {
20
- theme: DEFAULT_THEME
21
- };
22
19
 
23
20
  export { StyledParagraph };
@@ -9,6 +9,6 @@ const SIZE = ['small', 'medium', 'large'];
9
9
  const INHERIT_SIZE = ['inherit', ...SIZE];
10
10
  const TYPE_ORDERED_LIST = ['decimal', 'decimal-leading-zero', 'lower-alpha', 'lower-roman', 'upper-alpha', 'upper-roman'];
11
11
  const TYPE_UNORDERED_LIST = ['circle', 'disc', 'square'];
12
- const LANGUAGES = ['markup', 'bash', 'clike', 'c', 'cpp', 'css', 'javascript', 'jsx', 'coffeescript', 'actionscript', 'css-extr', 'diff', 'git', 'go', 'graphql', 'handlebars', 'json', 'less', 'makefile', 'markdown', 'objectivec', 'ocaml', 'python', 'reason', 'sass', 'scss', 'sql', 'stylus', 'tsx', 'typescript', 'wasm', 'yaml'];
12
+ const LANGUAGES = ['bash', 'css', 'diff', 'graphql', 'javascript', 'json', 'jsx', 'markdown', 'markup', 'python', 'typescript', 'tsx', 'yaml'];
13
13
 
14
14
  export { HUE, INHERIT_SIZE, LANGUAGES, SIZE, TYPE_ORDERED_LIST, TYPE_UNORDERED_LIST };