@uncinc/uncinc-react-kitchen-sink 2.13.1 → 2.13.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.
@@ -9,6 +9,7 @@ import c from 'classnames';
9
9
  import AnimateHeight from 'react-animate-height';
10
10
  import useControlledState from 'ucs';
11
11
  import WysiwygField from '../../WysiwygField';
12
+ import Icon from '../../Icon';
12
13
  var ContentParsed = function ContentParsed(_ref) {
13
14
  var children = _ref.children;
14
15
  if (typeof children === 'string') {
@@ -29,6 +30,7 @@ var AccordionItem = function AccordionItem(props) {
29
30
  var title = props.title,
30
31
  content = props.content,
31
32
  iconClassName = props.iconClassName,
33
+ materialIconName = props.materialIconName,
32
34
  duration = props.duration,
33
35
  easing = props.easing,
34
36
  titleComponent = props.titleComponent,
@@ -54,7 +56,11 @@ var AccordionItem = function AccordionItem(props) {
54
56
  onClick: function onClick() {
55
57
  return setCollapsed(!collapsed);
56
58
  }
57
- }, /*#__PURE__*/React.createElement("span", {
59
+ }, materialIconName ? /*#__PURE__*/React.createElement(Icon, {
60
+ name: materialIconName,
61
+ flair: "outlined",
62
+ className: iconClassName
63
+ }) : /*#__PURE__*/React.createElement("span", {
58
64
  className: iconClasses
59
65
  }), title)), /*#__PURE__*/React.createElement(AnimateHeight, {
60
66
  duration: duration,
@@ -9,7 +9,7 @@
9
9
 
10
10
  button {
11
11
  display: block;
12
- border: none;
12
+ border: 0;
13
13
  background: none;
14
14
  padding: 0;
15
15
  font-size: inherit;
@@ -5,6 +5,7 @@ export interface DownloadProps {
5
5
  description?: string;
6
6
  filesize?: number;
7
7
  filename?: string;
8
+ materialIconName?: string;
8
9
  mime: string;
9
10
  target?: HTMLAnchorElement['target'];
10
11
  className?: string;
@@ -7,6 +7,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import React from 'react';
8
8
  import c from 'classnames';
9
9
  import prettyBytes from 'pretty-bytes';
10
+ import Icon from '../Icon';
10
11
  var Download = function Download(_ref) {
11
12
  var source = _ref.source,
12
13
  title = _ref.title,
@@ -16,6 +17,7 @@ var Download = function Download(_ref) {
16
17
  filesize = _ref$filesize === void 0 ? null : _ref$filesize,
17
18
  _ref$filename = _ref.filename,
18
19
  filename = _ref$filename === void 0 ? '' : _ref$filename,
20
+ materialIconName = _ref.materialIconName,
19
21
  mime = _ref.mime,
20
22
  _ref$target = _ref.target,
21
23
  target = _ref$target === void 0 ? '_self' : _ref$target,
@@ -31,7 +33,11 @@ var Download = function Download(_ref) {
31
33
  target: target,
32
34
  href: source,
33
35
  rel: "noreferrer"
34
- }, /*#__PURE__*/React.createElement("span", {
36
+ }, materialIconName ? /*#__PURE__*/React.createElement(Icon, {
37
+ className: "Download__icon Icon-".concat(mimeType, " Icon-").concat(mimeSubType),
38
+ name: materialIconName,
39
+ flair: "outlined"
40
+ }) : /*#__PURE__*/React.createElement("span", {
35
41
  className: "Download__icon icon icon-download icon-".concat(mimeType, " icon-").concat(mimeSubType)
36
42
  }), /*#__PURE__*/React.createElement("div", {
37
43
  className: "Download__content"
@@ -43,7 +49,7 @@ var Download = function Download(_ref) {
43
49
  className: "Download__attributes"
44
50
  }, extension && /*#__PURE__*/React.createElement("span", {
45
51
  className: "Download__extension"
46
- }, extension[0]), filesize && /*#__PURE__*/React.createElement("span", {
52
+ }, extension[0], "\xA0"), filesize && /*#__PURE__*/React.createElement("span", {
47
53
  className: "Download__filesize"
48
54
  }, "(", prettyBytes(filesize), ")")));
49
55
  };
@@ -5,6 +5,7 @@ export interface DownloadsProps {
5
5
  text?: string;
6
6
  downloads: DownloadProps[];
7
7
  target?: HTMLAnchorElement['target'];
8
+ materialIconName?: string;
8
9
  className?: string;
9
10
  }
10
11
  declare const Downloads: React.FC<DownloadsProps>;
@@ -7,6 +7,7 @@ var Downloads = function Downloads(_ref) {
7
7
  text = _ref.text,
8
8
  downloads = _ref.downloads,
9
9
  target = _ref.target,
10
+ materialIconName = _ref.materialIconName,
10
11
  className = _ref.className;
11
12
  var classes = c('Downloads', className);
12
13
  return /*#__PURE__*/React.createElement("div", {
@@ -23,6 +24,7 @@ var Downloads = function Downloads(_ref) {
23
24
  description: download.description,
24
25
  filesize: download.filesize,
25
26
  filename: download.filename,
27
+ materialIconName: materialIconName,
26
28
  target: target,
27
29
  mime: download.mime
28
30
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uncinc/uncinc-react-kitchen-sink",
3
- "version": "2.13.1",
3
+ "version": "2.13.3",
4
4
  "description": "Default React components that are easily extended.",
5
5
  "author": "uncinc",
6
6
  "license": "MIT",