@sellout/ui 0.0.48 → 0.0.50

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.
@@ -140,5 +140,6 @@ export declare type IconProps = {
140
140
  margin?: string | number | undefined;
141
141
  tip?: string;
142
142
  transitionDuration?: string;
143
+ rotation?: number;
143
144
  };
144
- export default function Icon({ icon, color, hoverColor, onClick, size, top, left, right, position, zIndex, margin, tip, transitionDuration, }: IconProps): JSX.Element;
145
+ export default function Icon({ icon, color, hoverColor, onClick, size, top, left, right, position, zIndex, margin, tip, transitionDuration, rotation, }: IconProps): JSX.Element;
package/build/index.d.ts CHANGED
@@ -64,6 +64,7 @@ declare const Icons: {
64
64
  KeyRegular: import("@fortawesome/fontawesome-common-types").IconDefinition;
65
65
  LeftChevronRegular: import("@fortawesome/fontawesome-common-types").IconDefinition;
66
66
  LinkRegular: import("@fortawesome/fontawesome-common-types").IconDefinition;
67
+ OListRegular: import("@fortawesome/fontawesome-common-types").IconDefinition;
67
68
  PrintRegular: import("@fortawesome/fontawesome-common-types").IconDefinition;
68
69
  ReportRegular: import("@fortawesome/fontawesome-common-types").IconDefinition;
69
70
  SearchRegular: import("@fortawesome/fontawesome-common-types").IconDefinition;
@@ -71,12 +72,14 @@ declare const Icons: {
71
72
  SignOut: import("@fortawesome/fontawesome-common-types").IconDefinition;
72
73
  SyncRegular: import("@fortawesome/fontawesome-common-types").IconDefinition;
73
74
  TicketRegular: import("@fortawesome/fontawesome-common-types").IconDefinition;
75
+ UListRegular: import("@fortawesome/fontawesome-common-types").IconDefinition;
74
76
  UnderlineRegular: import("@fortawesome/fontawesome-common-types").IconDefinition;
75
77
  UnlockRegular: import("@fortawesome/fontawesome-common-types").IconDefinition;
76
78
  UpArrow: import("@fortawesome/fontawesome-common-types").IconDefinition;
77
79
  Update: import("@fortawesome/fontawesome-common-types").IconDefinition;
78
80
  UpgradeRegular: import("@fortawesome/fontawesome-common-types").IconDefinition;
79
81
  UsersRegular: import("@fortawesome/fontawesome-common-types").IconDefinition;
82
+ GiftRegular: import("@fortawesome/fontawesome-common-types").IconDefinition;
80
83
  AudienceSolid: import("@fortawesome/fontawesome-common-types").IconDefinition;
81
84
  BackArrow: import("@fortawesome/fontawesome-common-types").IconDefinition;
82
85
  BoxOfficeSolid: import("@fortawesome/fontawesome-common-types").IconDefinition;
@@ -111,8 +114,8 @@ declare const Icons: {
111
114
  RightChevronSolid: import("@fortawesome/fontawesome-common-types").IconDefinition;
112
115
  SearchSolid: import("@fortawesome/fontawesome-common-types").IconDefinition;
113
116
  Sort: import("@fortawesome/fontawesome-common-types").IconDefinition;
114
- ThumbsUpSolid: import("@fortawesome/fontawesome-common-types").IconDefinition;
115
117
  ThumbsDownSolid: import("@fortawesome/fontawesome-common-types").IconDefinition;
118
+ ThumbsUpSolid: import("@fortawesome/fontawesome-common-types").IconDefinition;
116
119
  TicketSolid: import("@fortawesome/fontawesome-common-types").IconDefinition;
117
120
  UserCircle: import("@fortawesome/fontawesome-common-types").IconDefinition;
118
121
  UserSolid: import("@fortawesome/fontawesome-common-types").IconDefinition;
package/build/index.es.js CHANGED
@@ -219,8 +219,12 @@ var Container = styled.div(templateObject_1$1 || (templateObject_1$1 = __makeTem
219
219
  });
220
220
  var Icons = IconEnum;
221
221
  function Icon(_a) {
222
- var _b = _a.icon, icon = _b === void 0 ? Icons.AudienceRegular : _b, _c = _a.color, color = _c === void 0 ? Colors.Orange : _c, _d = _a.hoverColor, hoverColor = _d === void 0 ? null : _d, onClick = _a.onClick, _e = _a.size, size = _e === void 0 ? 20 : _e, top = _a.top, left = _a.left, right = _a.right, _f = _a.position, position = _f === void 0 ? "relative" : _f, zIndex = _a.zIndex, margin = _a.margin, tip = _a.tip, transitionDuration = _a.transitionDuration;
222
+ var _b = _a.icon, icon = _b === void 0 ? Icons.AudienceRegular : _b, _c = _a.color, color = _c === void 0 ? Colors.Orange : _c, _d = _a.hoverColor, hoverColor = _d === void 0 ? null : _d, onClick = _a.onClick, _e = _a.size, size = _e === void 0 ? 20 : _e, top = _a.top, left = _a.left, right = _a.right, _f = _a.position, position = _f === void 0 ? "relative" : _f, zIndex = _a.zIndex, margin = _a.margin, tip = _a.tip, transitionDuration = _a.transitionDuration, rotation = _a.rotation;
223
223
  var cursor = onClick ? "pointer" : "";
224
+ if (icon === Icons.TicketRegular)
225
+ rotation = 90;
226
+ if (icon === Icons.TicketSolid)
227
+ rotation = 90;
224
228
  return (React.createElement(Container, { color: color, hoverColor: hoverColor, "data-tip": tip },
225
229
  React.createElement(FontAwesomeIcon, { icon: icon, onClick: onClick, style: {
226
230
  top: top,
@@ -229,7 +233,8 @@ function Icon(_a) {
229
233
  position: position,
230
234
  zIndex: zIndex,
231
235
  fontSize: size,
232
- transition: "all " + (transitionDuration || '0.2s'),
236
+ transition: "all " + (transitionDuration || "0.2s"),
237
+ transform: rotation ? "rotate(" + rotation + "deg)" : undefined,
233
238
  margin: margin,
234
239
  cursor: cursor,
235
240
  } })));
package/build/index.js CHANGED
@@ -224,8 +224,12 @@ var Container = styled.div(templateObject_1$1 || (templateObject_1$1 = __makeTem
224
224
  });
225
225
  var Icons = IconEnum;
226
226
  function Icon(_a) {
227
- var _b = _a.icon, icon = _b === void 0 ? Icons.AudienceRegular : _b, _c = _a.color, color = _c === void 0 ? exports.Colors.Orange : _c, _d = _a.hoverColor, hoverColor = _d === void 0 ? null : _d, onClick = _a.onClick, _e = _a.size, size = _e === void 0 ? 20 : _e, top = _a.top, left = _a.left, right = _a.right, _f = _a.position, position = _f === void 0 ? "relative" : _f, zIndex = _a.zIndex, margin = _a.margin, tip = _a.tip, transitionDuration = _a.transitionDuration;
227
+ var _b = _a.icon, icon = _b === void 0 ? Icons.AudienceRegular : _b, _c = _a.color, color = _c === void 0 ? exports.Colors.Orange : _c, _d = _a.hoverColor, hoverColor = _d === void 0 ? null : _d, onClick = _a.onClick, _e = _a.size, size = _e === void 0 ? 20 : _e, top = _a.top, left = _a.left, right = _a.right, _f = _a.position, position = _f === void 0 ? "relative" : _f, zIndex = _a.zIndex, margin = _a.margin, tip = _a.tip, transitionDuration = _a.transitionDuration, rotation = _a.rotation;
228
228
  var cursor = onClick ? "pointer" : "";
229
+ if (icon === Icons.TicketRegular)
230
+ rotation = 90;
231
+ if (icon === Icons.TicketSolid)
232
+ rotation = 90;
229
233
  return (React__default.createElement(Container, { color: color, hoverColor: hoverColor, "data-tip": tip },
230
234
  React__default.createElement(reactFontawesome.FontAwesomeIcon, { icon: icon, onClick: onClick, style: {
231
235
  top: top,
@@ -234,7 +238,8 @@ function Icon(_a) {
234
238
  position: position,
235
239
  zIndex: zIndex,
236
240
  fontSize: size,
237
- transition: "all " + (transitionDuration || '0.2s'),
241
+ transition: "all " + (transitionDuration || "0.2s"),
242
+ transform: rotation ? "rotate(" + rotation + "deg)" : undefined,
238
243
  margin: margin,
239
244
  cursor: cursor,
240
245
  } })));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellout/ui",
3
- "version": "0.0.48",
3
+ "version": "0.0.50",
4
4
  "main": "build/index.js",
5
5
  "module": "build/index.es.js",
6
6
  "jsnext:main": "build/index.es.js",
@@ -46,13 +46,13 @@
46
46
  "@fortawesome/pro-regular-svg-icons": "^5.12.1",
47
47
  "@fortawesome/pro-solid-svg-icons": "^5.12.1",
48
48
  "@fortawesome/react-fontawesome": "^0.1.9",
49
- "@sellout/utils": "^0.0.48",
49
+ "@sellout/utils": "^0.0.50",
50
50
  "@types/escape-html": "^1.0.0",
51
51
  "csvtojson": "^2.0.10",
52
52
  "polished": "^3.4.4",
53
53
  "react-animate-height": "^2.0.20"
54
54
  },
55
- "gitHead": "5ace4adc0a8766efc6863bf63c66fde1acaeee3c",
55
+ "gitHead": "6888751c5d7908a61606cbc6b2b0144d74872f81",
56
56
  "peerDependencies": {
57
57
  "react": "^16.13.0",
58
58
  "react-dom": "^16.13.0",
@@ -31,6 +31,8 @@ export type IconProps = {
31
31
  margin?: string | number | undefined;
32
32
  tip?: string;
33
33
  transitionDuration?: string;
34
+ rotation?: number;
35
+
34
36
  };
35
37
 
36
38
  export default function Icon({
@@ -47,9 +49,13 @@ export default function Icon({
47
49
  margin,
48
50
  tip,
49
51
  transitionDuration,
52
+ rotation,
50
53
  }: IconProps) {
51
54
  const cursor: string = onClick ? "pointer" : "";
52
55
 
56
+ if (icon === Icons.TicketRegular) rotation = 90;
57
+ if (icon === Icons.TicketSolid) rotation = 90;
58
+
53
59
  return (
54
60
  <Container color={color} hoverColor={hoverColor} data-tip={tip}>
55
61
  <FontAwesomeIcon
@@ -62,7 +68,8 @@ export default function Icon({
62
68
  position: position as any,
63
69
  zIndex: zIndex as any,
64
70
  fontSize: size,
65
- transition: `all ${transitionDuration || '0.2s'}`,
71
+ transition: `all ${transitionDuration || "0.2s"}`,
72
+ transform: rotation ? `rotate(${rotation}deg)` : undefined,
66
73
  margin,
67
74
  cursor,
68
75
  }}