iticket-seatingplan-dev 1.5.3 → 1.5.4
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.
- package/dist/components/Badge.js +9 -16
- package/dist/components/Button.js +17 -20
- package/dist/components/Flexi.tsx +59 -0
- package/dist/components/Map.tsx +756 -0
- package/dist/components/PriceButton.tsx +74 -0
- package/dist/components/PricingPopup.tsx +178 -0
- package/dist/components/SeatingPlan.tsx +786 -0
- package/dist/components/assets/encodedSvgs.js +26 -11
- package/dist/components/icons/CloseIcon.tsx +26 -0
- package/dist/components/icons/FlexiIcon.tsx +32 -0
- package/dist/components/icons/TicketIcon.tsx +32 -0
- package/dist/components/styles/flexi.css +180 -0
- package/dist/components/styles/index.css +111 -21
- package/dist/components/styles/pos.css +233 -0
- package/dist/index.js +5 -27
- package/dist/utils/enums.js +14 -2
- package/dist/utils/helpers.js +10 -1
- package/dist/utils/index.js +2 -27
- package/dist/utils/types.d.js +5 -0
- package/package.json +12 -3
package/dist/components/Badge.js
CHANGED
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
11
|
-
className: "badge ".concat(!props.value ? 'badge--none' : '', " ")
|
|
12
|
-
}, /*#__PURE__*/_react.default.createElement("h4", {
|
|
13
|
-
className: "heavy"
|
|
14
|
-
}, props.value || 0));
|
|
15
|
-
};
|
|
16
|
-
var _default = exports.default = Badge;
|
|
1
|
+
import React from 'react'
|
|
2
|
+
const Badge = (props) => {
|
|
3
|
+
return (
|
|
4
|
+
<div className={`badge ${!props.value ? 'badge--none' : ''} `}>
|
|
5
|
+
<h4 className="heavy">{props.value || 0}</h4>
|
|
6
|
+
</div>
|
|
7
|
+
)
|
|
8
|
+
}
|
|
9
|
+
export default Badge
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}, /*#__PURE__*/_react.default.createElement("h4", null, props.label));
|
|
19
|
-
};
|
|
20
|
-
var _default = exports.default = Button;
|
|
1
|
+
import React from 'react'
|
|
2
|
+
const Button = (props) => {
|
|
3
|
+
return (
|
|
4
|
+
<button
|
|
5
|
+
className={`btn btn--${props.kind} CTA`}
|
|
6
|
+
data-id={props.id}
|
|
7
|
+
type={props.type}
|
|
8
|
+
name={props.name}
|
|
9
|
+
value={props.value}
|
|
10
|
+
disabled={props.disabled}
|
|
11
|
+
onClick={props.handleClick}
|
|
12
|
+
>
|
|
13
|
+
<h4>{props.label}</h4>
|
|
14
|
+
</button>
|
|
15
|
+
)
|
|
16
|
+
}
|
|
17
|
+
export default Button
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import { Price } from "../utils/types";
|
|
3
|
+
import { NZDollar } from "../utils";
|
|
4
|
+
|
|
5
|
+
export default function Flexi({
|
|
6
|
+
price,
|
|
7
|
+
onClose,
|
|
8
|
+
buttonText,
|
|
9
|
+
onConfirm,
|
|
10
|
+
isOpen,
|
|
11
|
+
panMap,
|
|
12
|
+
}: {
|
|
13
|
+
price: Price;
|
|
14
|
+
onClose: () => void;
|
|
15
|
+
buttonText: string;
|
|
16
|
+
onConfirm: (newPrice: number) => void;
|
|
17
|
+
isOpen?: boolean;
|
|
18
|
+
panMap?: () => void;
|
|
19
|
+
}) {
|
|
20
|
+
const [value, setValue] = useState(price.p ?? price.pMin);
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<div className="flexi-popup-content">
|
|
24
|
+
<div
|
|
25
|
+
className={isOpen ? "flexi-content open" : "flexi-content"}
|
|
26
|
+
onTransitionEnd={() => {
|
|
27
|
+
if (isOpen && panMap) {
|
|
28
|
+
panMap();
|
|
29
|
+
}
|
|
30
|
+
}}
|
|
31
|
+
>
|
|
32
|
+
<div className="slider-container">
|
|
33
|
+
<p className="value">{NZDollar.format(value)}</p>
|
|
34
|
+
<input
|
|
35
|
+
type="range"
|
|
36
|
+
className="slider"
|
|
37
|
+
min={price.pMin}
|
|
38
|
+
max={price.pMax}
|
|
39
|
+
value={value.toString()}
|
|
40
|
+
onChange={(e) => setValue(parseInt(e.target.value))}
|
|
41
|
+
/>
|
|
42
|
+
<div className="min-max">
|
|
43
|
+
<p>{NZDollar.format(price.pMin)}</p>
|
|
44
|
+
<p>{NZDollar.format(price.pMax)}</p>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
<button
|
|
48
|
+
className="add-cart"
|
|
49
|
+
onClick={() => {
|
|
50
|
+
onConfirm(value);
|
|
51
|
+
onClose();
|
|
52
|
+
}}
|
|
53
|
+
>
|
|
54
|
+
{buttonText}
|
|
55
|
+
</button>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
);
|
|
59
|
+
}
|