@sellout/ui 0.0.57 → 0.0.60

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 (76) hide show
  1. package/build/Colors.js +26 -0
  2. package/build/_virtual/_tslib.js +51 -0
  3. package/build/components/Button.d.ts +20 -6
  4. package/build/components/Button.js +210 -0
  5. package/build/components/CodeInput.d.ts +8 -0
  6. package/build/components/CodeInput.js +78 -0
  7. package/build/components/Counter.js +28 -0
  8. package/build/components/Dropdown.d.ts +24 -0
  9. package/build/components/Dropdown.js +49 -0
  10. package/build/components/Flex.d.ts +12 -0
  11. package/build/components/Flex.js +12 -0
  12. package/build/components/Icon.d.ts +49 -3
  13. package/build/components/Icon.js +39 -0
  14. package/build/components/Icons.d.ts +49 -3
  15. package/build/components/Icons.js +181 -0
  16. package/build/components/Input.d.ts +16 -1
  17. package/build/components/Input.js +177 -0
  18. package/build/components/InputOld.d.ts +23 -0
  19. package/build/components/InputOld.js +83 -0
  20. package/build/components/Label.d.ts +9 -0
  21. package/build/components/Label.js +22 -0
  22. package/build/components/Loader.js +37 -0
  23. package/build/components/MaxLength.d.ts +7 -0
  24. package/build/components/MaxLength.js +16 -0
  25. package/build/components/Motion.d.ts +30 -0
  26. package/build/components/Motion.js +39 -0
  27. package/build/components/PhoneNumberInput.d.ts +19 -0
  28. package/build/components/PhoneNumberInput.js +39 -0
  29. package/build/components/Product.js +54 -0
  30. package/build/components/TextButton.d.ts +15 -0
  31. package/build/components/TextButton.js +39 -0
  32. package/build/components/Tip.d.ts +7 -0
  33. package/build/components/Tip.js +18 -0
  34. package/build/components/UserImage.d.ts +13 -0
  35. package/build/components/UserImage.js +20 -0
  36. package/build/components/UserInfo.d.ts +12 -0
  37. package/build/components/UserInfo.js +38 -0
  38. package/build/components/ValidationError.d.ts +6 -0
  39. package/build/components/ValidationError.js +23 -0
  40. package/build/components/VerticalUserInfo.d.ts +12 -0
  41. package/build/index.d.ts +18 -126
  42. package/build/index.js +27 -453
  43. package/build/utils/ErrorUtil.d.ts +1 -0
  44. package/build/utils/ErrorUtil.js +18 -0
  45. package/build/utils/MediaQuery.d.ts +17 -0
  46. package/build/utils/MediaQuery.js +64 -0
  47. package/build/utils/Validation.d.ts +6 -0
  48. package/build/utils/Validation.js +53 -0
  49. package/build/utils/makeEventHandler.js +11 -0
  50. package/package.json +13 -5
  51. package/.storybook/config.js +0 -3
  52. package/.storybook/preview-head.html +0 -21
  53. package/.storybook/webpack.config.js +0 -19
  54. package/build/index.es.js +0 -443
  55. package/rollup.config.js +0 -20
  56. package/src/Colors.ts +0 -23
  57. package/src/assets/images/sellout-logo-long.svg +0 -11
  58. package/src/assets/images/sellout-logo-mono-white.svg +0 -4
  59. package/src/components/Button.tsx +0 -141
  60. package/src/components/Counter.tsx +0 -91
  61. package/src/components/Icon.tsx +0 -78
  62. package/src/components/Icons.ts +0 -251
  63. package/src/components/Input.tsx +0 -258
  64. package/src/components/Loader.tsx +0 -88
  65. package/src/components/Product.tsx +0 -156
  66. package/src/index.ts +0 -28
  67. package/src/stories/Button.stories.js +0 -30
  68. package/src/stories/Counter.stories.js +0 -28
  69. package/src/stories/Icon.stories.js +0 -25
  70. package/src/stories/Input.stories.js +0 -79
  71. package/src/stories/Loader.stories.js +0 -50
  72. package/src/stories/Product.stories.js +0 -67
  73. package/src/utils/makeEventHandler.ts +0 -8
  74. package/tsconfig.json +0 -24
  75. package/utils/generateIconLibrary.js +0 -49
  76. package/utils/icon-library.csv +0 -129
package/build/index.js CHANGED
@@ -1,453 +1,27 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
6
-
7
- var React = require('react');
8
- var React__default = _interopDefault(React);
9
- var styled = _interopDefault(require('styled-components'));
10
- var Polished = require('polished');
11
- var reactFontawesome = require('@fortawesome/react-fontawesome');
12
- var proLightSvgIcons = require('@fortawesome/pro-light-svg-icons');
13
- var proSolidSvgIcons = require('@fortawesome/pro-solid-svg-icons');
14
- var proRegularSvgIcons = require('@fortawesome/pro-regular-svg-icons');
15
- var freeSolidSvgIcons = require('@fortawesome/free-solid-svg-icons');
16
- var freeRegularSvgIcons = require('@fortawesome/free-regular-svg-icons');
17
- var AnimateHeight = _interopDefault(require('react-animate-height'));
18
- var PriceUtil = require('@sellout/utils/.dist/price');
19
-
20
- (function (Colors) {
21
- Colors["White"] = "#FFFFFF";
22
- Colors["Black"] = "#000000";
23
- Colors["Yellow"] = "#FFBA49";
24
- // Green = "#419D78",
25
- Colors["Green"] = "#42BB83";
26
- Colors["OffWhite"] = "#FCFCFC";
27
- Colors["LightBlue"] = "#39159C";
28
- Colors["Blue"] = "#2D0E84";
29
- Colors["DarkBlue"] = "#1D0858";
30
- Colors["Red"] = "#E63946";
31
- Colors["Orange"] = "#FF700F";
32
- Colors["FadedOrange"] = "#FFF1E7";
33
- Colors["LightOrange"] = "#FFBE93";
34
- Colors["DarkOrange"] = "#D65600";
35
- Colors["Grey1"] = "#333333";
36
- Colors["Grey2"] = "#4F4F4F";
37
- Colors["Grey3"] = "#828282";
38
- Colors["Grey4"] = "#BDBDBD";
39
- Colors["Grey5"] = "#E0E0E0";
40
- Colors["Grey6"] = "#F2F2F2";
41
- Colors["Grey7"] = "#F8F8F8";
42
- })(exports.Colors || (exports.Colors = {}));
43
-
44
- /*! *****************************************************************************
45
- Copyright (c) Microsoft Corporation. All rights reserved.
46
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
47
- this file except in compliance with the License. You may obtain a copy of the
48
- License at http://www.apache.org/licenses/LICENSE-2.0
49
-
50
- THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
51
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
52
- WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
53
- MERCHANTABLITY OR NON-INFRINGEMENT.
54
-
55
- See the Apache Version 2.0 License for specific language governing permissions
56
- and limitations under the License.
57
- ***************************************************************************** */
58
-
59
- function __makeTemplateObject(cooked, raw) {
60
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
61
- return cooked;
62
- }
63
-
64
- var _a;
65
- (function (LoaderSizes) {
66
- LoaderSizes["FuckingTiny"] = "FuckingTiny";
67
- LoaderSizes["SuperSmall"] = "SuperSmall";
68
- LoaderSizes["VerySmall"] = "VerySmall";
69
- LoaderSizes["Small"] = "Small";
70
- LoaderSizes["Medium"] = "Medium";
71
- LoaderSizes["Large"] = "Large";
72
- })(exports.LoaderSizes || (exports.LoaderSizes = {}));
73
- var LoaderSizesMap = (_a = {},
74
- _a[exports.LoaderSizes.FuckingTiny] = 14,
75
- _a[exports.LoaderSizes.SuperSmall] = 20,
76
- _a[exports.LoaderSizes.VerySmall] = 24,
77
- _a[exports.LoaderSizes.Small] = 30,
78
- _a[exports.LoaderSizes.Medium] = 40,
79
- _a[exports.LoaderSizes.Large] = 60,
80
- _a);
81
- var scale = function (size, scale) { return size * scale + "px"; };
82
- var StyledLoader = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n top: 1.5px;\n\n .lds-ring {\n display: inline-block;\n position: relative;\n width: ", ";\n height: ", ";\n }\n .lds-ring div {\n box-sizing: border-box;\n display: block;\n position: absolute;\n width: ", ";\n height: ", ";\n margin: ", ";\n border: ", " solid ", ";\n border-radius: 50%;\n animation: lds-ring 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: ", " transparent transparent transparent;\n }\n .lds-ring div:nth-child(1) {\n animation-delay: -0.3s;\n }\n .lds-ring div:nth-child(2) {\n animation-delay: -0.2s;\n }\n .lds-ring div:nth-child(3) {\n animation-delay: -0.1s;\n }\n @keyframes lds-ring {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n"], ["\n position: relative;\n top: 1.5px;\n\n .lds-ring {\n display: inline-block;\n position: relative;\n width: ", ";\n height: ", ";\n }\n .lds-ring div {\n box-sizing: border-box;\n display: block;\n position: absolute;\n width: ", ";\n height: ", ";\n margin: ", ";\n border: ", " solid ", ";\n border-radius: 50%;\n animation: lds-ring 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: ", " transparent transparent transparent;\n }\n .lds-ring div:nth-child(1) {\n animation-delay: -0.3s;\n }\n .lds-ring div:nth-child(2) {\n animation-delay: -0.2s;\n }\n .lds-ring div:nth-child(3) {\n animation-delay: -0.1s;\n }\n @keyframes lds-ring {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n"])), function (props) { return scale(props.size, 1); }, function (props) { return scale(props.size, 1); }, function (props) { return scale(props.size, .8); }, function (props) { return scale(props.size, .8); }, function (props) { return scale(props.size, .1); }, function (props) { return scale(props.size, 0.066); }, function (props) { return props.color; }, function (props) { return props.color; });
83
- function Loader(_a) {
84
- var _b = _a.size, size = _b === void 0 ? exports.LoaderSizes.Medium : _b, _c = _a.color, color = _c === void 0 ? exports.Colors.White : _c;
85
- return (React__default.createElement(StyledLoader, { size: LoaderSizesMap[size], color: color },
86
- React__default.createElement("div", { className: "lds-ring" },
87
- React__default.createElement("div", null),
88
- React__default.createElement("div", null),
89
- React__default.createElement("div", null))));
90
- }
91
- var templateObject_1;
92
-
93
- var IconEnum = {
94
- AnalyticsLight: proLightSvgIcons.faAnalytics,
95
- BellLight: proLightSvgIcons.faBell,
96
- BoxOfficeLight: proLightSvgIcons.faCashRegister,
97
- BullHornLight: proLightSvgIcons.faBullhorn,
98
- CalendarDayLight: proLightSvgIcons.faCalendarDay,
99
- CalendarLight: proLightSvgIcons.faCalendarAlt,
100
- CalendarStarLight: proLightSvgIcons.faCalendarStar,
101
- CheckLight: proLightSvgIcons.faCheck,
102
- EnvelopeLight: proLightSvgIcons.faEnvelope,
103
- EnvelopeOpenRegular: proLightSvgIcons.faEnvelopeOpenText,
104
- ExportLight: proLightSvgIcons.faFileExport,
105
- FilterLight: proLightSvgIcons.faFilter,
106
- HelpLight: proLightSvgIcons.faQuestionCircle,
107
- HomeLight: proLightSvgIcons.faHome,
108
- Lock: proLightSvgIcons.faLock,
109
- mapPinLight: proLightSvgIcons.faMapMarkerAlt,
110
- MicrophoneLight: proLightSvgIcons.faMicrophoneAlt,
111
- MinusCircleLight: proLightSvgIcons.faMinusCircle,
112
- MobileLight: proLightSvgIcons.faMobileAlt,
113
- PlusCircleLight: proLightSvgIcons.faPlusCircle,
114
- ReceiptLight: proLightSvgIcons.faReceipt,
115
- SearchLight: proLightSvgIcons.faSearch,
116
- SortByLight: proLightSvgIcons.faSortAlt,
117
- UnlockLight: proLightSvgIcons.faUnlock,
118
- UploadLight: proLightSvgIcons.faUpload,
119
- UserLight: proLightSvgIcons.faUser,
120
- UsersLight: proLightSvgIcons.faUsers,
121
- VenueLight: proLightSvgIcons.faLandmark,
122
- AnalyticsSolid: proSolidSvgIcons.faAnalytics,
123
- CalendarStarSolid: proSolidSvgIcons.faCalendarStar,
124
- CreditCardFront: proSolidSvgIcons.faCreditCardFront,
125
- FeeSolid: proSolidSvgIcons.faUsdSquare,
126
- KeySolid: proSolidSvgIcons.faKey,
127
- LongRightArrow: proSolidSvgIcons.faLongArrowRight,
128
- ReportSolid: proSolidSvgIcons.faFileChartLine,
129
- SortBy: proSolidSvgIcons.faSortAlt,
130
- UpgradeSolid: proSolidSvgIcons.faArrowAltSquareUp,
131
- AudienceRegular: proRegularSvgIcons.faUserFriends,
132
- BoldRegular: proRegularSvgIcons.faBold,
133
- CalculatorRegular: proRegularSvgIcons.faCalculator,
134
- CheckRegular: proRegularSvgIcons.faCheck,
135
- Cheers: proRegularSvgIcons.faGlassCheers,
136
- Clipboard: proRegularSvgIcons.faClipboardList,
137
- CrownRegular: proRegularSvgIcons.faCrown,
138
- DeleteRegular: proRegularSvgIcons.faTrash,
139
- Dollar: proRegularSvgIcons.faDollarSign,
140
- DownArrow: proRegularSvgIcons.faArrowAltDown,
141
- DownloadReport: proRegularSvgIcons.faFileDownload,
142
- Embed: proRegularSvgIcons.faCode,
143
- FeeRegular: proRegularSvgIcons.faUsdSquare,
144
- FilterRegular: proRegularSvgIcons.faFilter,
145
- GlobeRegular: proRegularSvgIcons.faGlobeAmericas,
146
- GraphGrowth: proRegularSvgIcons.faChartLine,
147
- ItalicRegular: proRegularSvgIcons.faItalic,
148
- KeyRegular: proRegularSvgIcons.faKey,
149
- LeftChevronRegular: proRegularSvgIcons.faChevronLeft,
150
- LinkRegular: proRegularSvgIcons.faLink,
151
- OListRegular: proRegularSvgIcons.faListOl,
152
- PrintRegular: proRegularSvgIcons.faPrint,
153
- ReportRegular: proRegularSvgIcons.faFileChartLine,
154
- SearchRegular: proRegularSvgIcons.faSearch,
155
- Settings: proRegularSvgIcons.faCog,
156
- SignOut: proRegularSvgIcons.faSignOut,
157
- SyncRegular: proRegularSvgIcons.faSync,
158
- TicketRegular: proRegularSvgIcons.faTicketAlt,
159
- UListRegular: proRegularSvgIcons.faListUl,
160
- UnderlineRegular: proRegularSvgIcons.faUnderline,
161
- UnlockRegular: proRegularSvgIcons.faUnlock,
162
- UpArrow: proRegularSvgIcons.faArrowAltUp,
163
- Update: proRegularSvgIcons.faMegaphone,
164
- UpgradeRegular: proRegularSvgIcons.faArrowAltSquareUp,
165
- UsersRegular: proRegularSvgIcons.faUsers,
166
- GiftRegular: proRegularSvgIcons.faGift,
167
- AudienceSolid: freeSolidSvgIcons.faUserFriends,
168
- BackArrow: freeSolidSvgIcons.faArrowLeft,
169
- BoxOfficeSolid: freeSolidSvgIcons.faCashRegister,
170
- BullhornSolid: freeSolidSvgIcons.faBullhorn,
171
- CalculatorSolid: freeSolidSvgIcons.faCalculator,
172
- CalendarDaySolid: freeSolidSvgIcons.faCalendarDay,
173
- Cancel: freeSolidSvgIcons.faTimes,
174
- CancelCircle: freeSolidSvgIcons.faTimesCircle,
175
- CaretDown: freeSolidSvgIcons.faCaretDown,
176
- Cash: freeSolidSvgIcons.faMoneyBill,
177
- CheckCircle: freeSolidSvgIcons.faCheckCircle,
178
- CopySolid: freeSolidSvgIcons.faCopy,
179
- CreditCardBack: freeSolidSvgIcons.faCreditCard,
180
- CrownSolid: freeSolidSvgIcons.faCrown,
181
- Cursor: freeSolidSvgIcons.faICursor,
182
- DeleteSolid: freeSolidSvgIcons.faTrash,
183
- EnvelopeSolid: freeSolidSvgIcons.faEnvelope,
184
- EyeSolid: freeSolidSvgIcons.faEye,
185
- HelpSolid: freeSolidSvgIcons.faQuestionCircle,
186
- HomeSolid: freeSolidSvgIcons.faHome,
187
- InfotipSolid: freeSolidSvgIcons.faInfoCircle,
188
- LeftArrowSolid: freeSolidSvgIcons.faArrowLeft,
189
- LeftChevronSolid: freeSolidSvgIcons.faChevronLeft,
190
- Menu: freeSolidSvgIcons.faBars,
191
- MicrophoneSolid: freeSolidSvgIcons.faMicrophoneAlt,
192
- MobileSolid: freeSolidSvgIcons.faMobileAlt,
193
- Plus: freeSolidSvgIcons.faPlus,
194
- PlusCircle: freeSolidSvgIcons.faPlusCircle,
195
- PrintSolid: freeSolidSvgIcons.faPrint,
196
- ReceiptSolid: freeSolidSvgIcons.faReceipt,
197
- RightChevronCircle: freeSolidSvgIcons.faChevronCircleRight,
198
- RightChevronSolid: freeSolidSvgIcons.faChevronRight,
199
- SearchSolid: freeSolidSvgIcons.faSearch,
200
- Sort: freeSolidSvgIcons.faSort,
201
- ThumbsDownSolid: freeSolidSvgIcons.faThumbsDown,
202
- ThumbsUpSolid: freeSolidSvgIcons.faThumbsUp,
203
- TicketSolid: freeSolidSvgIcons.faTicketAlt,
204
- UserCircle: freeSolidSvgIcons.faUserCircle,
205
- UserSolid: freeSolidSvgIcons.faUser,
206
- UsersSolid: freeSolidSvgIcons.faUsers,
207
- VenueSolid: freeSolidSvgIcons.faLandmark,
208
- Warning: freeSolidSvgIcons.faExclamationTriangle,
209
- CalendarRegular: freeRegularSvgIcons.faCalendarAlt,
210
- Clock: freeRegularSvgIcons.faClock,
211
- CopyRegular: freeRegularSvgIcons.faCopy,
212
- Edit: freeRegularSvgIcons.faEdit,
213
- EyeRegular: freeRegularSvgIcons.faEye,
214
- EyeSlashRegular: freeRegularSvgIcons.faEyeSlash,
215
- Help: freeRegularSvgIcons.faLifeRing,
216
- SadTear: freeRegularSvgIcons.faSadTear,
217
- UserRegular: freeRegularSvgIcons.faUser,
218
- };
219
-
220
- var Container = styled.div(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n color: ", ";\n\n &:hover {\n color: ", ";\n }\n"], ["\n color: ", ";\n\n &:hover {\n color: ",
221
- ";\n }\n"])), function (props) { return props.color; }, function (props) {
222
- if (props.color === "inherit")
223
- return null;
224
- return props.hoverColor;
225
- });
226
- var Icons = IconEnum;
227
- function Icon(_a) {
228
- 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;
229
- var cursor = onClick ? "pointer" : "";
230
- if (icon === Icons.TicketRegular)
231
- rotation = 90;
232
- if (icon === Icons.TicketSolid)
233
- rotation = 90;
234
- return (React__default.createElement(Container, { color: color, hoverColor: hoverColor, "data-tip": tip },
235
- React__default.createElement(reactFontawesome.FontAwesomeIcon, { icon: icon, onClick: onClick, style: {
236
- top: top,
237
- left: left,
238
- right: right,
239
- position: position,
240
- zIndex: zIndex,
241
- fontSize: size,
242
- transition: "all " + (transitionDuration || "0.2s"),
243
- transform: rotation ? "rotate(" + rotation + "deg)" : undefined,
244
- margin: margin,
245
- cursor: cursor,
246
- } })));
247
- }
248
- var templateObject_1$1;
249
-
250
- (function (ButtonTypes) {
251
- ButtonTypes["Submit"] = "Submit";
252
- })(exports.ButtonTypes || (exports.ButtonTypes = {}));
253
- (function (ButtonStates) {
254
- ButtonStates["Active"] = "Active";
255
- })(exports.ButtonStates || (exports.ButtonStates = {}));
256
- var StyledButton = styled.div(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n position: relative;\n height: 40px;\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n overflow: hidden;\n justify-content: center;\n white-space: nowrap;\n text-align: center;\n border-radius: 10px;\n transition: all 0.2s;\n margin: ", ";\n padding: ", ";\n background-color: ", ";\n\n &:hover {\n cursor: ", ";\n background-color: ", ";\n }\n\n &:active {\n cursor: ", ";\n background-color: ", ";\n }\n"], ["\n position: relative;\n height: 40px;\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n overflow: hidden;\n justify-content: center;\n white-space: nowrap;\n text-align: center;\n border-radius: 10px;\n transition: all 0.2s;\n margin: ", ";\n padding: ", ";\n background-color: ",
257
- ";\n\n &:hover {\n cursor: ", ";\n background-color: ",
258
- ";\n }\n\n &:active {\n cursor: ", ";\n background-color: ",
259
- ";\n }\n"])), function (props) { return (Boolean(props.margin) ? props.margin : "0px"); }, function (props) { return (Boolean(props.padding) ? props.padding : "0px"); }, function (props) {
260
- if (props.type === exports.ButtonTypes.Submit) {
261
- return exports.Colors.Orange;
262
- }
263
- return null;
264
- }, function (props) { return (props.onClick ? "pointer" : null); }, function (props) {
265
- if (props.onClick && props.type === exports.ButtonTypes.Submit) {
266
- return Polished.lighten(0.025, exports.Colors.Orange);
267
- }
268
- return null;
269
- }, function (props) { return (props.onClick ? "pointer" : null); }, function (props) {
270
- if (props.onClick && props.type === exports.ButtonTypes.Submit) {
271
- return Polished.darken(0.025, exports.Colors.Orange);
272
- }
273
- return null;
274
- });
275
- var Text = styled.span(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-size: 1.4rem;\n font-weight: 600;\n text-transform: uppercase;\n margin-left: ", ";\n color: ", ";\n"], ["\n font-size: 1.4rem;\n font-weight: 600;\n text-transform: uppercase;\n margin-left: ", ";\n color: ",
276
- ";\n"])), function (props) { return (props.icon ? "10px" : 0); }, function (props) {
277
- if (props.type === exports.ButtonTypes.Submit) {
278
- return exports.Colors.White;
279
- }
280
- return null;
281
- });
282
- function Button(_a) {
283
- var _b = _a.type, type = _b === void 0 ? exports.ButtonTypes.Submit : _b, _c = _a.state, state = _c === void 0 ? exports.ButtonStates.Active : _c, text = _a.text, _d = _a.onClick, onClick = _d === void 0 ? function () { } : _d, icon = _a.icon, margin = _a.margin, padding = _a.padding, _e = _a.loading, loading = _e === void 0 ? false : _e;
284
- return (React__default.createElement(StyledButton, { type: type, onClick: loading ? null : function () { return onClick(); }, margin: margin, padding: padding, state: state }, (function () {
285
- return (React__default.createElement(React.Fragment, null,
286
- icon && (React__default.createElement(Icon, { icon: icon, color: exports.Colors.White })),
287
- (function () {
288
- if (loading) {
289
- return React__default.createElement(Loader, { size: exports.LoaderSizes.VerySmall });
290
- }
291
- return (text && (React__default.createElement(Text, { type: type, icon: Boolean(icon) }, text)));
292
- })()));
293
- })()));
294
- }
295
- var templateObject_1$2, templateObject_2;
296
-
297
- var Container$1 = styled.div(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n position: relative;\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 85px;\n min-height: 42px;\n /* background-color: red; */\n"], ["\n position: relative;\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 85px;\n min-height: 42px;\n /* background-color: red; */\n"])));
298
- var IconContainer = styled.div(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: ", ";\n flex: 1;\n /* background-color: blue; */\n height: 100%;\n\n &:hover {\n cursor: ", ";\n }\n\n .svg-inline--fa {\n color: ", " !important;\n }\n"], ["\n display: flex;\n align-items: center;\n justify-content: ", ";\n flex: 1;\n /* background-color: blue; */\n height: 100%;\n\n &:hover {\n cursor: ", ";\n }\n\n .svg-inline--fa {\n color: ",
299
- " !important;\n }\n"])), function (props) { return props.justify; }, function (props) { return (props.active ? "pointer" : null); }, function (props) {
300
- return props.active ? Polished.lighten(0.025, exports.Colors.Orange) : null;
301
- });
302
- var Value = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-size: 2.4rem;\n color: ", ";\n min-width: 20px;\n text-align: center;\n"], ["\n font-size: 2.4rem;\n color: ", ";\n min-width: 20px;\n text-align: center;\n"])), exports.Colors.Grey1);
303
- function Counter(_a) {
304
- var value = _a.value, maxValue = _a.maxValue, _b = _a.minValue, minValue = _b === void 0 ? 0 : _b, onIncrement = _a.onIncrement, onDecrement = _a.onDecrement;
305
- var canDecrement = value > minValue;
306
- var canIncrement = Boolean(!Boolean(maxValue) || (maxValue && value < maxValue));
307
- return (React__default.createElement(Container$1, null,
308
- React__default.createElement(IconContainer, { active: canDecrement, onClick: function () { return (canDecrement ? onDecrement() : null); }, justify: "flex-start" },
309
- React__default.createElement(Icon, { icon: Icons.MinusCircleLight, color: canDecrement ? exports.Colors.Orange : exports.Colors.Grey5 })),
310
- React__default.createElement(Value, null, value),
311
- React__default.createElement(IconContainer, { active: canIncrement, onClick: function () { return (canIncrement ? onIncrement() : null); }, justify: "flex-end" },
312
- React__default.createElement(Icon, { icon: Icons.PlusCircleLight, color: canIncrement ? exports.Colors.Orange : exports.Colors.Grey5 }))));
313
- }
314
- var templateObject_1$3, templateObject_2$1, templateObject_3;
315
-
316
- var Form = styled.form(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject(["\n width: ", ";\n display: flex;\n flex-direction: row;\n position: relative;\n border-radius: 10px;\n transition: all 0.2s;\n border: 1px solid\n ", ";\n"], ["\n width: ", ";\n display: flex;\n flex-direction: row;\n position: relative;\n border-radius: 10px;\n transition: all 0.2s;\n border: 1px solid\n ",
317
- ";\n"])), function (props) { return props.width; }, function (props) {
318
- if (props.focused)
319
- return exports.Colors.Grey3;
320
- if (props.hovered)
321
- return exports.Colors.Grey4;
322
- return exports.Colors.Grey5;
323
- });
324
- var Button$1 = styled.div(templateObject_2$2 || (templateObject_2$2 = __makeTemplateObject(["\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n color: ", ";\n height: 50px;\n width: 50px;\n border-radius: 0 10px 10px 0;\n top: -1px;\n right: -1px;\n transition: all 0.2s;\n background-color: ", ";\n\n &:hover {\n cursor: ", ";\n background-color: ", ";\n }\n\n &:active {\n cursor: ", ";\n background-color: ", ";\n }\n"], ["\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n color: ", ";\n height: 50px;\n width: 50px;\n border-radius: 0 10px 10px 0;\n top: -1px;\n right: -1px;\n transition: all 0.2s;\n background-color: ",
325
- ";\n\n &:hover {\n cursor: ", ";\n background-color: ",
326
- ";\n }\n\n &:active {\n cursor: ", ";\n background-color: ",
327
- ";\n }\n"])), exports.Colors.White, function (props) {
328
- return props.canSubmit ? exports.Colors.Orange : exports.Colors.Grey6;
329
- }, function (props) { return (props.onClick ? "pointer" : null); }, function (props) {
330
- return props.canSubmit ? Polished.lighten(0.025, exports.Colors.Orange) : null;
331
- }, function (props) { return (props.onClick ? "pointer" : null); }, function (props) {
332
- return props.canSubmit ? Polished.darken(0.025, exports.Colors.Orange) : null;
333
- });
334
- var LeftContainer = styled.div(templateObject_3$1 || (templateObject_3$1 = __makeTemplateObject(["\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: 15px;\n top: 0px;\n left: 0px;\n"], ["\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: 15px;\n top: 0px;\n left: 0px;\n"])));
335
- var RightContainer = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 50px;\n width: 50px;\n top: -1px;\n right: -1px;\n\n &:hover {\n cursor: ", ";\n }\n"], ["\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 50px;\n width: 50px;\n top: -1px;\n right: -1px;\n\n &:hover {\n cursor: ", ";\n }\n"])), function (props) { return (props.onClick ? "pointer" : null); });
336
- var Spacer = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n width: 50px;\n"], ["\n width: 50px;\n"])));
337
- var InputStyled = styled.input(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n outline: none;\n border: 0px;\n border-radius: 10px;\n height: 48px;\n width: fill-available;\n font-size: 1.4rem;\n font-weight: 500;\n padding: 0 0 0 10px;\n transition: all 0.2s;\n margin: ", ";\n padding: ", ";\n \n ::placeholder {\n color: ", ";\n }\n"], ["\n background-color: ", ";\n color: ", ";\n outline: none;\n border: 0px;\n border-radius: 10px;\n height: 48px;\n width: fill-available;\n font-size: 1.4rem;\n font-weight: 500;\n padding: 0 0 0 10px;\n transition: all 0.2s;\n margin: ", ";\n padding: ", ";\n \n ::placeholder {\n color: ", ";\n }\n"])), exports.Colors.White, exports.Colors.Grey1, function (props) { return props.margin; }, function (props) { return props.padding; }, exports.Colors.Grey4);
338
- function Input(_a) {
339
- var inputRef = _a.inputRef, autoFocus = _a.autoFocus, placeholder = _a.placeholder, value = _a.value, defaultValue = _a.defaultValue, icon = _a.icon, _b = _a.type, type = _b === void 0 ? 'text' : _b, onMouseEnter = _a.onMouseEnter, onMouseLeave = _a.onMouseLeave, onChange = _a.onChange, onFocus = _a.onFocus, onBlur = _a.onBlur, onSubmit = _a.onSubmit, onClear = _a.onClear, _c = _a.canSubmit, canSubmit = _c === void 0 ? true : _c, loading = _a.loading, margin = _a.margin, padding = _a.padding, width = _a.width;
340
- var _d = React.useState(false), hovered = _d[0], setHovered = _d[1];
341
- var _e = React.useState(false), focused = _e[0], setFocused = _e[1];
342
- var submit = function (event) {
343
- event.preventDefault();
344
- if (onSubmit && canSubmit && !loading) {
345
- onSubmit();
346
- }
347
- };
348
- return (React__default.createElement(Form, { hovered: hovered, focused: focused, onSubmit: function (event) { return submit(event); }, width: width },
349
- icon && (React__default.createElement(LeftContainer, null,
350
- React__default.createElement(Icon, { icon: icon, size: 16, color: focused ? exports.Colors.Grey1 : exports.Colors.Grey4 }))),
351
- React__default.createElement(InputStyled, { ref: inputRef, autoFocus: autoFocus, placeholder: placeholder, value: value, defaultValue: defaultValue, type: type, onChange: onChange, onFocus: function (event) {
352
- setFocused(true);
353
- if (onFocus)
354
- onFocus(event);
355
- }, onBlur: function (event) {
356
- setFocused(false);
357
- if (onFocus)
358
- onBlur(event);
359
- }, onMouseEnter: function (event) {
360
- setHovered(true);
361
- if (onMouseEnter)
362
- onMouseEnter(event);
363
- }, onMouseLeave: function (event) {
364
- setHovered(false);
365
- if (onMouseLeave)
366
- onMouseLeave(event);
367
- }, margin: margin, padding: padding }),
368
- (function () {
369
- if (onSubmit) {
370
- return (React__default.createElement(React.Fragment, null,
371
- React__default.createElement(Spacer, null),
372
- React__default.createElement(Button$1, { canSubmit: canSubmit, onClick: function (event) { return submit(event); } }, (function () {
373
- if (loading) {
374
- return React__default.createElement(Loader, { size: exports.LoaderSizes.VerySmall });
375
- }
376
- return (React__default.createElement(Icon, { icon: Icons.RightChevronCircle, color: canSubmit ? exports.Colors.White : exports.Colors.Grey4, size: 16 }));
377
- })())));
378
- }
379
- if (Boolean(value) && onClear) {
380
- return (React__default.createElement(React.Fragment, null,
381
- React__default.createElement(Spacer, null),
382
- React__default.createElement(RightContainer, { onClick: function () { return onClear(); } },
383
- React__default.createElement(Icon, { icon: Icons.CancelCircle, color: exports.Colors.Grey3, size: 16 }))));
384
- }
385
- return React__default.createElement(Spacer, null);
386
- })()));
387
- }
388
- var templateObject_1$4, templateObject_2$2, templateObject_3$1, templateObject_4, templateObject_5, templateObject_6;
389
-
390
- var Row = styled.div(templateObject_1$5 || (templateObject_1$5 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n justify-content: ", ";\n"], ["\n display: flex;\n flex-direction: row;\n justify-content: ", ";\n"])), function (props) { return props.justify; });
391
- var Column = styled.div(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
392
- var Container$2 = styled.div(templateObject_3$2 || (templateObject_3$2 = __makeTemplateObject(["\n background-color: ", ";\n padding: 15px;\n border-bottom: 1px solid ", ";\n"], ["\n background-color: ", ";\n padding: 15px;\n border-bottom: 1px solid ", ";\n"])), exports.Colors.White, exports.Colors.Grey6);
393
- var Title = styled.div(templateObject_4$1 || (templateObject_4$1 = __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"])), exports.Colors.Grey1);
394
- var Price = styled.div(templateObject_5$1 || (templateObject_5$1 = __makeTemplateObject(["\n font-size: 1.4rem;\n font-weight: 500;\n color: ", ";\n margin-bottom: 5px;\n"], ["\n font-size: 1.4rem;\n font-weight: 500;\n color: ", ";\n margin-bottom: 5px;\n"])), exports.Colors.Grey2);
395
- var Subtitle = styled.div(templateObject_6$1 || (templateObject_6$1 = __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"])), exports.Colors.Grey3);
396
- 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"])), exports.Colors.Grey2);
397
- 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; });
398
- 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 &:hover {\n cursor: pointer;\n color: ", ";\n }\n\n &:active {\n color: ", ";\n }\n"], ["\n font-size: 1.2rem;\n font-weight: 500;\n line-height: 160%;\n color: ", ";\n transition: all 0.2s;\n\n &:hover {\n cursor: pointer;\n color: ", ";\n }\n\n &:active {\n color: ", ";\n }\n"])), exports.Colors.Orange, Polished.lighten(0.025, exports.Colors.Orange), Polished.darken(0.025, exports.Colors.Orange));
399
- function Product(_a) {
400
- 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,
401
- // Counter Props
402
- value = _a.value, minValue = _a.minValue, maxValue = _a.maxValue, onIncrement = _a.onIncrement, onDecrement = _a.onDecrement;
403
- var _f = React.useState(false), showMore = _f[0], setShowMore = _f[1];
404
- var _g = React.useState(true), showEllipsis = _g[0], setShowEllipsis = _g[1];
405
- var descModified = description;
406
- if (descModified.length > 210 && !showMore) {
407
- descModified = descModified.substring(0, 210) + '...';
408
- }
409
- var toggle = function () {
410
- setShowEllipsis(!showEllipsis);
411
- setShowMore(!showMore);
412
- };
413
- return (React__default.createElement(Container$2, null,
414
- React__default.createElement(Row, { justify: "space-between" },
415
- React__default.createElement(Column, null,
416
- React__default.createElement(Title, null, title),
417
- React__default.createElement(Price, null,
418
- "$",
419
- PriceUtil.output(price))),
420
- React__default.createElement(Counter, { value: value, minValue: minValue, maxValue: maxValue, onIncrement: onIncrement, onDecrement: onDecrement })),
421
- React__default.createElement(Row, null, subtitle && React__default.createElement(Subtitle, null, subtitle)),
422
- (function () {
423
- if (!description)
424
- return;
425
- return (React__default.createElement(React.Fragment, null,
426
- React__default.createElement(AnimateHeight, { height: showMore ? "auto" : 67 },
427
- React__default.createElement(Ellipsis, { active: showEllipsis },
428
- React__default.createElement(Description, null, description))),
429
- React__default.createElement(ShowMore, { onClick: function () { return toggle(); } }, showMore ? "Show Less" : "Show More")));
430
- })()));
431
- }
432
- var templateObject_1$5, templateObject_2$3, templateObject_3$2, templateObject_4$1, templateObject_5$1, templateObject_6$1, templateObject_7, templateObject_8, templateObject_9;
433
-
434
- function makeEventHandler(executeOnEvent) {
435
- if (executeOnEvent === void 0) { executeOnEvent = function () { }; }
436
- return function (eventHandler) {
437
- return function (event) {
438
- executeOnEvent();
439
- eventHandler(event.currentTarget.value);
440
- };
441
- };
442
- }
443
-
444
- var Icons$1 = IconEnum;
445
-
446
- exports.Button = Button;
447
- exports.Counter = Counter;
448
- exports.Icon = Icon;
449
- exports.Icons = Icons$1;
450
- exports.Input = Input;
451
- exports.Loader = Loader;
452
- exports.Product = Product;
453
- exports.makeEventHandler = makeEventHandler;
1
+ export { Colors } from './Colors.js';
2
+ export { default as Icon, Icons } from './components/Icon.js';
3
+ export { default as Loader, LoaderSizes } from './components/Loader.js';
4
+ export { default as Button } from './components/Button.js';
5
+ export { default as CodeInput } from './components/CodeInput.js';
6
+ export { default as Counter } from './components/Counter.js';
7
+ export { default as Tip } from './components/Tip.js';
8
+ export { default as Label } from './components/Label.js';
9
+ export { default as Flex } from './components/Flex.js';
10
+ export { default as Dropdown } from './components/Dropdown.js';
11
+ export { default as MaxLength } from './components/MaxLength.js';
12
+ import * as Motion from './components/Motion.js';
13
+ export { Motion };
14
+ export { default as ValidationError } from './components/ValidationError.js';
15
+ import * as MediaQuery from './utils/MediaQuery.js';
16
+ export { MediaQuery };
17
+ export { default as Input } from './components/Input.js';
18
+ export { default as PhoneNumberInput } from './components/PhoneNumberInput.js';
19
+ export { default as Product } from './components/Product.js';
20
+ export { default as TextButton } from './components/TextButton.js';
21
+ export { default as UserImage } from './components/UserImage.js';
22
+ export { default as UserInfo } from './components/UserInfo.js';
23
+ import * as ErrorUtil from './utils/ErrorUtil.js';
24
+ export { ErrorUtil };
25
+ export { default as makeEventHandler } from './utils/makeEventHandler.js';
26
+ import * as Validation from './utils/Validation.js';
27
+ export { Validation };
@@ -0,0 +1 @@
1
+ export declare function getErrorMessage(error: any): string;
@@ -0,0 +1,18 @@
1
+ function getErrorMessage(error) {
2
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
3
+ var defaultMessage = 'Something went wrong. Please contact support.';
4
+ if (!error)
5
+ return defaultMessage;
6
+ var errorMsg = (_c = (_b = (_a = error === null || error === void 0 ? void 0 : error.graphQLErrors) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.message) !== null && _c !== void 0 ? _c : null;
7
+ if (errorMsg)
8
+ return errorMsg;
9
+ errorMsg = (_h = (_g = (_f = (_e = (_d = error.networkError) === null || _d === void 0 ? void 0 : _d.result) === null || _e === void 0 ? void 0 : _e.errors) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.message) !== null && _h !== void 0 ? _h : null;
10
+ if (errorMsg)
11
+ return errorMsg;
12
+ errorMsg = (_o = (_m = (_l = (_k = (_j = error === null || error === void 0 ? void 0 : error.graphQLErrors) === null || _j === void 0 ? void 0 : _j[0]) === null || _k === void 0 ? void 0 : _k.extensions) === null || _l === void 0 ? void 0 : _l.exception) === null || _m === void 0 ? void 0 : _m.invalidArgs) !== null && _o !== void 0 ? _o : null;
13
+ if (errorMsg)
14
+ return errorMsg;
15
+ return defaultMessage;
16
+ }
17
+
18
+ export { getErrorMessage };
@@ -0,0 +1,17 @@
1
+ export declare const media: {
2
+ handheld: (rulesTemplate: any, ...rulesRest: any[]) => any;
3
+ tablet: (rulesTemplate: any, ...rulesRest: any[]) => any;
4
+ tabletOnly: (rulesTemplate: any, ...rulesRest: any[]) => any;
5
+ mobile: (rulesTemplate: any, ...rulesRest: any[]) => any;
6
+ desktop: (rulesTemplate: any, ...rulesRest: any[]) => any;
7
+ largeDesktop: (rulesTemplate: any, ...rulesRest: any[]) => any;
8
+ extraLargeDesktop: (rulesTemplate: any, ...rulesRest: any[]) => any;
9
+ giant: (rulesTemplate: any, ...rulesRest: any[]) => any;
10
+ print: (rulesTemplate: any, ...rulesRest: any[]) => any;
11
+ minWidth: (pxValue: any) => (rulesTemplate: any, ...rulesRest: any[]) => any;
12
+ };
13
+ export declare const useMedia: (query: any) => boolean;
14
+ export declare const useMobileMedia: () => boolean;
15
+ export declare const useDesktopMedia: () => boolean;
16
+ export declare const useLargeDesktopMedia: () => boolean;
17
+ export declare const useGiantMedia: () => boolean;
@@ -0,0 +1,64 @@
1
+ import { __makeTemplateObject, __spreadArrays } from '../_virtual/_tslib.js';
2
+ import { useState, useEffect } from 'react';
3
+ import { css } from 'styled-components';
4
+
5
+ var mediaQuery = function (queryTemplate) {
6
+ var queryRest = [];
7
+ for (var _i = 1; _i < arguments.length; _i++) {
8
+ queryRest[_i - 1] = arguments[_i];
9
+ }
10
+ return function (rulesTemplate) {
11
+ var rulesRest = [];
12
+ for (var _i = 1; _i < arguments.length; _i++) {
13
+ rulesRest[_i - 1] = arguments[_i];
14
+ }
15
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n @media ", " {\n ", "\n }\n "], ["\n @media ", " {\n ", "\n }\n "])), css.apply(void 0, __spreadArrays([queryTemplate], queryRest)), css.apply(void 0, __spreadArrays([rulesTemplate], rulesRest)));
16
+ };
17
+ };
18
+ var sizes = {
19
+ tablet: 768,
20
+ desktop: 992,
21
+ largeDesktop: 1200,
22
+ extraLargeDesktop: 1536,
23
+ giant: 1920,
24
+ };
25
+ var queryStrings = {
26
+ handheld: "(max-width: " + (sizes.tablet - 1) / 16 + "em)",
27
+ tablet: "(min-width: " + sizes.tablet / 16 + "em)",
28
+ tabletOnly: "(min-width: " + sizes.tablet / 16 + "em) and (max-width: " + (sizes.desktop - 1) / 16 + "em)",
29
+ mobile: "(max-width: " + (sizes.desktop - 1) / 16 + "em)",
30
+ desktop: "(min-width: " + sizes.desktop / 16 + "em)",
31
+ largeDesktop: "(min-width: " + sizes.largeDesktop / 16 + "em)",
32
+ extraLargeDesktop: "(min-width: " + sizes.extraLargeDesktop / 16 + "em)",
33
+ giant: "(min-width: " + sizes.giant / 16 + "em)",
34
+ print: 'print',
35
+ };
36
+ var media = {
37
+ handheld: mediaQuery(templateObject_2 || (templateObject_2 = __makeTemplateObject(["", ""], ["", ""])), queryStrings.handheld),
38
+ tablet: mediaQuery(templateObject_3 || (templateObject_3 = __makeTemplateObject(["", ""], ["", ""])), queryStrings.tablet),
39
+ tabletOnly: mediaQuery(templateObject_4 || (templateObject_4 = __makeTemplateObject(["", ""], ["", ""])), queryStrings.tabletOnly),
40
+ mobile: mediaQuery(templateObject_5 || (templateObject_5 = __makeTemplateObject(["", ""], ["", ""])), queryStrings.mobile),
41
+ desktop: mediaQuery(templateObject_6 || (templateObject_6 = __makeTemplateObject(["", ""], ["", ""])), queryStrings.desktop),
42
+ largeDesktop: mediaQuery(templateObject_7 || (templateObject_7 = __makeTemplateObject(["", ""], ["", ""])), queryStrings.largeDesktop),
43
+ extraLargeDesktop: mediaQuery(templateObject_8 || (templateObject_8 = __makeTemplateObject(["", ""], ["", ""])), queryStrings.extraLargeDesktop),
44
+ giant: mediaQuery(templateObject_9 || (templateObject_9 = __makeTemplateObject(["", ""], ["", ""])), queryStrings.giant),
45
+ print: mediaQuery(templateObject_10 || (templateObject_10 = __makeTemplateObject(["", ""], ["", ""])), queryStrings.print),
46
+ minWidth: function (pxValue) { return mediaQuery(templateObject_11 || (templateObject_11 = __makeTemplateObject(["(min-width: ", "em)"], ["(min-width: ", "em)"])), pxValue / 16); },
47
+ };
48
+ var useMedia = function (query) {
49
+ var matchQuery = window && window.matchMedia(query);
50
+ var _a = useState(matchQuery.matches), isMatch = _a[0], setIsMatch = _a[1];
51
+ useEffect(function () {
52
+ var handler = function () { return setIsMatch(matchQuery.matches); };
53
+ matchQuery.addListener(handler);
54
+ return function () { return matchQuery.removeListener(handler); };
55
+ }, [query, matchQuery]);
56
+ return isMatch;
57
+ };
58
+ var useMobileMedia = function () { return useMedia("" + queryStrings.mobile); };
59
+ var useDesktopMedia = function () { return useMedia("" + queryStrings.desktop); };
60
+ var useLargeDesktopMedia = function () { return useMedia("" + queryStrings.largeDesktop); };
61
+ var useGiantMedia = function () { return useMedia("" + queryStrings.giant); };
62
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11;
63
+
64
+ export { media, useDesktopMedia, useGiantMedia, useLargeDesktopMedia, useMedia, useMobileMedia };
@@ -0,0 +1,6 @@
1
+ /// <reference types="hapi__joi" />
2
+ import Joi from "@hapi/joi";
3
+ export declare const email: Joi.StringSchema;
4
+ export declare const password: Joi.StringSchema;
5
+ export declare const fullName: Joi.StringSchema;
6
+ export declare const phoneNumber: Joi.StringSchema;