1 | import "core-js/modules/es.array.index-of.js";
|
2 | import "core-js/modules/es.function.name.js";
|
3 | import "core-js/modules/es.object.assign.js";
|
4 | import "core-js/modules/es.object.keys.js";
|
5 |
|
6 | function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
7 |
|
8 | function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
9 |
|
10 | function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
11 |
|
12 | import React from 'react';
|
13 | import { styled } from '@storybook/theming';
|
14 | import { ResetWrapper } from '../typography/DocumentFormatting';
|
15 | import { getBlockBackgroundStyle } from './BlockBackgroundStyles';
|
16 | var ItemLabel = styled.div(function (_ref) {
|
17 | var theme = _ref.theme;
|
18 | return {
|
19 | fontFamily: theme.typography.fonts.base,
|
20 | fontSize: theme.typography.size.s2,
|
21 | color: theme.color.defaultText,
|
22 | marginLeft: 10,
|
23 | lineHeight: 1.2
|
24 | };
|
25 | });
|
26 | var ItemSpecimen = styled.div(function (_ref2) {
|
27 | var theme = _ref2.theme;
|
28 | return Object.assign({}, getBlockBackgroundStyle(theme), {
|
29 | overflow: 'hidden',
|
30 | height: 40,
|
31 | width: 40,
|
32 | display: 'flex',
|
33 | alignItems: 'center',
|
34 | justifyContent: 'center',
|
35 | flex: 'none',
|
36 | '> img, > svg': {
|
37 | width: 20,
|
38 | height: 20
|
39 | }
|
40 | });
|
41 | });
|
42 | var Item = styled.div({
|
43 | display: 'inline-flex',
|
44 | flexDirection: 'row',
|
45 | alignItems: 'center',
|
46 | flex: '0 1 calc(20% - 10px)',
|
47 | minWidth: 120,
|
48 | margin: '0px 10px 30px 0'
|
49 | });
|
50 | var List = styled.div({
|
51 | display: 'flex',
|
52 | flexFlow: 'row wrap'
|
53 | });
|
54 |
|
55 |
|
56 |
|
57 |
|
58 | export var IconItem = function IconItem(_ref3) {
|
59 | var name = _ref3.name,
|
60 | children = _ref3.children;
|
61 | return React.createElement(Item, null, React.createElement(ItemSpecimen, null, children), React.createElement(ItemLabel, null, name));
|
62 | };
|
63 | IconItem.displayName = "IconItem";
|
64 |
|
65 |
|
66 |
|
67 |
|
68 | export var IconGallery = function IconGallery(_ref4) {
|
69 | var children = _ref4.children,
|
70 | props = _objectWithoutProperties(_ref4, ["children"]);
|
71 |
|
72 | return React.createElement(ResetWrapper, null, React.createElement(List, _extends({}, props, {
|
73 | className: "docblock-icongallery"
|
74 | }), children));
|
75 | };
|
76 | IconGallery.displayName = "IconGallery"; |
\ | No newline at end of file |