@sellout/ui 0.0.143 → 0.0.146

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.
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface IAddress {
2
3
  address1?: string;
3
4
  address2?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { Colors } from '../Colors';
2
3
  export declare enum ButtonTypes {
3
4
  Next = "Next",
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare type CounterProps = {
2
3
  value: number;
3
4
  maxValue?: number;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { Colors } from "../Colors";
2
3
  export declare const Icons: {
3
4
  Amex: import("@fortawesome/fontawesome-common-types").IconDefinition;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { Colors } from "./../Colors";
2
3
  export declare enum LoaderSizes {
3
4
  FuckingTiny = "FuckingTiny",
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { CounterProps } from './Counter';
2
3
  export declare type ProductProps = {
3
4
  title: string;
@@ -6,5 +7,6 @@ export declare type ProductProps = {
6
7
  subtitle?: string;
7
8
  description?: string;
8
9
  imageUrl?: string;
10
+ remainingQty?: number;
9
11
  } & CounterProps;
10
- export default function Product({ title, price, isRSVP, subtitle, description, value, minValue, maxValue, onIncrement, onDecrement, }: ProductProps): JSX.Element;
12
+ export default function Product({ title, price, subtitle, description, isRSVP, value, minValue, maxValue, onIncrement, onDecrement, remainingQty, }: ProductProps): JSX.Element;
@@ -11,18 +11,19 @@ var Row = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObjec
11
11
  var Column = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
12
12
  var Container = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n background-color: ", ";\n margin: 0 24px;\n padding: 24px 0;\n border-bottom: 1px solid ", ";\n"], ["\n background-color: ", ";\n margin: 0 24px;\n padding: 24px 0;\n border-bottom: 1px solid ", ";\n"])), Colors.White, Colors.Grey6);
13
13
  var Title = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font-size: 1.8rem;\n color: ", ";\n font-weight: 600;\n margin-bottom: 5px;\n"], ["\n font-size: 1.8rem;\n color: ", ";\n font-weight: 600;\n margin-bottom: 5px;\n"])), Colors.Grey1);
14
- var Price = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n font-size: 1.6rem;\n font-weight: 500;\n color: ", ";\n margin-bottom: 5px;\n"], ["\n font-size: 1.6rem;\n font-weight: 500;\n color: ", ";\n margin-bottom: 5px;\n"])), Colors.Grey2);
14
+ var Price = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n font-size: 1.6rem;\n font-weight: 500;\n color: ", ";\n margin-bottom:5px;\n"], ["\n font-size: 1.6rem;\n font-weight: 500;\n color: ", ";\n margin-bottom:5px;\n"])), Colors.Grey2);
15
15
  var Subtitle = styled.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n font-size: 1.2rem;\n font-weight: 500;\n line-height: 160%;\n color: ", ";\n"], ["\n font-size: 1.2rem;\n font-weight: 500;\n line-height: 160%;\n color: ", ";\n"])), Colors.Grey3);
16
16
  var Description = styled.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n font-size: 1.2rem;\n font-weight: 500;\n line-height: 160%;\n color: ", ";\n margin-top: 10px;\n"], ["\n font-size: 1.2rem;\n font-weight: 500;\n line-height: 160%;\n color: ", ";\n margin-top: 10px;\n"])), Colors.Grey2);
17
- var Ellipsis = styled.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n display: -webkit-box;\n -webkit-line-clamp: ", ";\n -webkit-box-orient: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n"], ["\n display: -webkit-box;\n -webkit-line-clamp: ", ";\n -webkit-box-orient: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n"])), function (props) { return props.active ? 3 : null; }, function (props) { return props.active ? 'vertical' : null; });
18
- var ShowMore = styled.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n font-size: 1.2rem;\n font-weight: 500;\n line-height: 160%;\n color: ", ";\n transition: all 0.2s;\n"], ["\n font-size: 1.2rem;\n font-weight: 500;\n line-height: 160%;\n color: ", ";\n transition: all 0.2s;\n"])), Colors.Orange);
19
- var ShowMoreInner = styled.span(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n &:hover {\n cursor: pointer;\n color: ", ";\n }\n\n &:active {\n color: ", ";\n }\n"], ["\n &:hover {\n cursor: pointer;\n color: ", ";\n }\n\n &:active {\n color: ", ";\n }\n"])), lighten(0.025, Colors.Orange), darken(0.025, Colors.Orange));
17
+ var Tag = styled.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n font-size: 1.8rem;\n color: ", ";\n font-weight: 600;\n margin-bottom: 5px;\n"], ["\n font-size: 1.8rem;\n color: ", ";\n font-weight: 600;\n margin-bottom: 5px;\n"])), Colors.Orange);
18
+ var Ellipsis = styled.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n display: -webkit-box;\n -webkit-line-clamp: ", ";\n -webkit-box-orient: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n"], ["\n display: -webkit-box;\n -webkit-line-clamp: ", ";\n -webkit-box-orient: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n"])), function (props) { return props.active ? 3 : null; }, function (props) { return props.active ? 'vertical' : null; });
19
+ var ShowMore = styled.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n font-size: 1.2rem;\n font-weight: 500;\n line-height: 160%;\n color: ", ";\n transition: all 0.2s;\n"], ["\n font-size: 1.2rem;\n font-weight: 500;\n line-height: 160%;\n color: ", ";\n transition: all 0.2s;\n"])), Colors.Orange);
20
+ var ShowMoreInner = styled.span(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n &:hover {\n cursor: pointer;\n color: ", ";\n }\n\n &:active {\n color: ", ";\n }\n"], ["\n &:hover {\n cursor: pointer;\n color: ", ";\n }\n\n &:active {\n color: ", ";\n }\n"])), lighten(0.025, Colors.Orange), darken(0.025, Colors.Orange));
20
21
  function Product(_a) {
21
- var _b = _a.title, title = _b === void 0 ? '' : _b, _c = _a.price, price = _c === void 0 ? 0 : _c, _d = _a.isRSVP, isRSVP = _d === void 0 ? false : _d, _e = _a.subtitle, subtitle = _e === void 0 ? '' : _e, _f = _a.description, description = _f === void 0 ? '' : _f,
22
+ var _b = _a.title, title = _b === void 0 ? '' : _b, _c = _a.price, price = _c === void 0 ? 0 : _c, _d = _a.subtitle, subtitle = _d === void 0 ? '' : _d, _e = _a.description, description = _e === void 0 ? '' : _e, _f = _a.isRSVP, isRSVP = _f === void 0 ? false : _f,
22
23
  // Counter Props
23
- value = _a.value, minValue = _a.minValue, maxValue = _a.maxValue, onIncrement = _a.onIncrement, onDecrement = _a.onDecrement;
24
- var _g = useState(false), showMore = _g[0], setShowMore = _g[1];
25
- var _h = useState(true), showEllipsis = _h[0], setShowEllipsis = _h[1];
24
+ value = _a.value, minValue = _a.minValue, maxValue = _a.maxValue, onIncrement = _a.onIncrement, onDecrement = _a.onDecrement, _g = _a.remainingQty, remainingQty = _g === void 0 ? 0 : _g;
25
+ var _h = useState(false), showMore = _h[0], setShowMore = _h[1];
26
+ var _j = useState(true), showEllipsis = _j[0], setShowEllipsis = _j[1];
26
27
  var descModified = description;
27
28
  if (descModified.length > 210 && !showMore) {
28
29
  descModified = descModified.substring(0, 210) + '...';
@@ -35,8 +36,8 @@ function Product(_a) {
35
36
  React.createElement(Row, { justify: "space-between" },
36
37
  React.createElement(Column, null,
37
38
  React.createElement(Title, null, title),
38
- React.createElement(Price, null, isRSVP ? 'RSVP' : "$" + output(price, true))),
39
- React.createElement(Counter, { value: value, minValue: minValue, maxValue: maxValue, onIncrement: onIncrement, onDecrement: onDecrement })),
39
+ isRSVP ? ((output(price, true) === "0.00" || 0) ? React.createElement(Price, null, "RSVP") : React.createElement(Price, null, "$" + output(price, true) + " (Ticket value)")) : React.createElement(Price, null, "$" + output(price, true))),
40
+ remainingQty > 0 ? React.createElement(Counter, { value: value, minValue: minValue, maxValue: maxValue, onIncrement: onIncrement, onDecrement: onDecrement }) : React.createElement(Tag, null, " Sold out")),
40
41
  React.createElement(Row, null, subtitle && React.createElement(Subtitle, null, subtitle)),
41
42
  (function () {
42
43
  if (!description)
@@ -49,6 +50,6 @@ function Product(_a) {
49
50
  React.createElement(ShowMoreInner, { onClick: function () { return toggle(); } }, showMore ? "Show Less" : "Show More"))));
50
51
  })()));
51
52
  }
52
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10;
53
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11;
53
54
 
54
55
  export default Product;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellout/ui",
3
- "version": "0.0.143",
3
+ "version": "0.0.146",
4
4
  "main": "build/index.js",
5
5
  "module": "build/index.es.js",
6
6
  "files": [
@@ -64,13 +64,13 @@
64
64
  "csvtojson": "^2.0.10",
65
65
  "framer-motion": "^2.9.5",
66
66
  "polished": "^3.7.2",
67
- "react-animate-height": "^2.0.20",
67
+ "react-animate-height": "2.0.20",
68
68
  "react-phone-input-2": "^2.14.0",
69
69
  "rollup-plugin-url": "^3.0.1",
70
70
  "shortid": "^2.2.16",
71
71
  "use-places-autocomplete": "^1.9.4"
72
72
  },
73
- "gitHead": "52112c06ceedd3b820ae94913f84c51b02791c01",
73
+ "gitHead": "a6d5facb53f1ce3327713623c96c702921b083e7",
74
74
  "peerDependencies": {
75
75
  "react": "^16.13.0",
76
76
  "react-dom": "^16.13.0",