@sb1/ffe-tags-react 100.12.3 → 101.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.
Files changed (3) hide show
  1. package/es/Tag.js +2 -26
  2. package/lib/Tag.js +4 -28
  3. package/package.json +5 -5
package/es/Tag.js CHANGED
@@ -1,29 +1,5 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __rest = (this && this.__rest) || function (s, e) {
13
- var t = {};
14
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
- t[p] = s[p];
16
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
- t[p[i]] = s[p[i]];
20
- }
21
- return t;
22
- };
23
1
  import classNames from 'classnames';
24
2
  import React from 'react';
25
- export function Tag(_a) {
26
- var _b;
27
- var className = _a.className, _c = _a.type, type = _c === void 0 ? 'emphasis' : _c, _d = _a.variant, variant = _d === void 0 ? 'neutral' : _d, _e = _a.size, size = _e === void 0 ? 'md' : _e, children = _a.children, rest = __rest(_a, ["className", "type", "variant", "size", "children"]);
28
- return (React.createElement("span", __assign({ className: classNames('ffe-tag', "ffe-tag--".concat(variant, "-").concat(type), (_b = {}, _b["ffe-tag--".concat(size)] = size !== 'md', _b), className) }, rest), children));
3
+ export function Tag({ className, type = 'emphasis', variant = 'neutral', size = 'md', children, ...rest }) {
4
+ return (React.createElement("span", { className: classNames('ffe-tag', `ffe-tag--${variant}-${type}`, { [`ffe-tag--${size}`]: size !== 'md' }, className), ...rest }, children));
29
5
  }
package/lib/Tag.js CHANGED
@@ -1,35 +1,11 @@
1
1
  "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __rest = (this && this.__rest) || function (s, e) {
14
- var t = {};
15
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
- t[p] = s[p];
17
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
- t[p[i]] = s[p[i]];
21
- }
22
- return t;
23
- };
24
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
25
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
26
4
  };
27
5
  Object.defineProperty(exports, "__esModule", { value: true });
28
6
  exports.Tag = Tag;
29
- var classnames_1 = __importDefault(require("classnames"));
30
- var react_1 = __importDefault(require("react"));
31
- function Tag(_a) {
32
- var _b;
33
- var className = _a.className, _c = _a.type, type = _c === void 0 ? 'emphasis' : _c, _d = _a.variant, variant = _d === void 0 ? 'neutral' : _d, _e = _a.size, size = _e === void 0 ? 'md' : _e, children = _a.children, rest = __rest(_a, ["className", "type", "variant", "size", "children"]);
34
- return (react_1.default.createElement("span", __assign({ className: (0, classnames_1.default)('ffe-tag', "ffe-tag--".concat(variant, "-").concat(type), (_b = {}, _b["ffe-tag--".concat(size)] = size !== 'md', _b), className) }, rest), children));
7
+ const classnames_1 = __importDefault(require("classnames"));
8
+ const react_1 = __importDefault(require("react"));
9
+ function Tag({ className, type = 'emphasis', variant = 'neutral', size = 'md', children, ...rest }) {
10
+ return (react_1.default.createElement("span", { className: (0, classnames_1.default)('ffe-tag', `ffe-tag--${variant}-${type}`, { [`ffe-tag--${size}`]: size !== 'md' }, className), ...rest }, children));
35
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sb1/ffe-tags-react",
3
- "version": "100.12.3",
3
+ "version": "101.0.0",
4
4
  "description": "React implementation of ffe-tags component",
5
5
  "keywords": [
6
6
  "ffe",
@@ -32,9 +32,9 @@
32
32
  "test:watch": "ffe-buildtool jest --watch"
33
33
  },
34
34
  "dependencies": {
35
- "@sb1/ffe-core": "^100.12.3",
36
- "@sb1/ffe-icons-react": "^100.12.3",
37
- "@sb1/ffe-tags": "^100.12.3",
35
+ "@sb1/ffe-core": "^101.0.0",
36
+ "@sb1/ffe-icons-react": "^101.0.0",
37
+ "@sb1/ffe-tags": "^101.0.0",
38
38
  "classnames": "^2.5.1"
39
39
  },
40
40
  "peerDependencies": {
@@ -43,5 +43,5 @@
43
43
  "publishConfig": {
44
44
  "access": "public"
45
45
  },
46
- "gitHead": "c250edc3d20e5ed115c5c5951495d700e96a3be3"
46
+ "gitHead": "7714019dbb9001551cb5d1c262c58afd609d4fb0"
47
47
  }