@shopgate/pwa-ui-shared 7.30.3 → 7.31.0-alpha.1

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 (326) hide show
  1. package/ActionButton/index.js +66 -67
  2. package/AddToCartButton/index.js +217 -185
  3. package/Availability/index.js +24 -6
  4. package/Button/index.js +105 -82
  5. package/Button/spec.js +3 -4
  6. package/Card/index.js +26 -7
  7. package/CardList/components/Item/index.js +15 -3
  8. package/CartTotalLine/components/Amount/index.js +13 -4
  9. package/CartTotalLine/components/Hint/index.js +13 -4
  10. package/CartTotalLine/components/Label/index.js +23 -10
  11. package/CartTotalLine/index.js +41 -7
  12. package/Checkbox/index.js +41 -17
  13. package/Chip/index.js +82 -7
  14. package/ContextMenu/components/Item/index.js +38 -20
  15. package/ContextMenu/components/Position/index.js +38 -56
  16. package/ContextMenu/index.js +64 -28
  17. package/Dialog/components/BasicDialog/index.js +1 -0
  18. package/Dialog/components/HtmlContentDialog/spec.js +39 -0
  19. package/Dialog/components/PipelineErrorDialog/index.js +108 -157
  20. package/Dialog/components/PipelineErrorDialog/spec.js +12 -18
  21. package/Dialog/components/TextMessageDialog/index.js +1 -1
  22. package/Dialog/components/VariantSelectModal/index.js +1 -1
  23. package/Dialog/index.js +1 -1
  24. package/DiscountBadge/index.js +48 -15
  25. package/FavoritesButton/index.js +95 -100
  26. package/FavoritesButton/spec.js +5 -2
  27. package/Form/Builder/classes/ActionListener/index.js +1 -0
  28. package/Form/Checkbox/index.js +64 -56
  29. package/Form/InfoField/index.js +18 -6
  30. package/Form/Password/index.js +39 -52
  31. package/Form/RadioGroup/components/Item/index.js +72 -56
  32. package/Form/RadioGroup/index.js +79 -90
  33. package/Form/Select/index.js +108 -130
  34. package/Form/SelectContextChoices/index.js +30 -8
  35. package/Form/TextField/index.js +106 -82
  36. package/Form/TextField/spec.js +4 -3
  37. package/FormElement/components/ErrorText/index.js +32 -14
  38. package/FormElement/components/Label/index.js +56 -6
  39. package/FormElement/components/Placeholder/index.js +44 -11
  40. package/FormElement/components/Underline/index.js +63 -12
  41. package/FormElement/index.js +62 -85
  42. package/Glow/index.js +73 -83
  43. package/IndicatorCircle/index.js +73 -17
  44. package/IndicatorCircle/spec.js +2 -5
  45. package/LoadingIndicator/index.js +34 -12
  46. package/Manufacturer/index.js +21 -10
  47. package/MessageBar/index.js +12 -38
  48. package/NoResults/components/Icon/index.js +30 -14
  49. package/NoResults/index.js +35 -7
  50. package/Placeholder/index.js +34 -23
  51. package/PlaceholderLabel/index.js +17 -3
  52. package/Price/index.js +34 -21
  53. package/PriceInfo/index.js +23 -9
  54. package/PriceStriked/index.js +67 -77
  55. package/ProgressBar/index.js +112 -77
  56. package/RadioButton/index.js +29 -11
  57. package/RatingStars/index.js +122 -137
  58. package/Ripple/components/RippleAnimation/index.js +13 -3
  59. package/Ripple/index.js +158 -212
  60. package/RippleButton/index.js +63 -60
  61. package/RippleButton/spec.js +15 -9
  62. package/ScannerOverlay/components/CameraOverlay/index.js +54 -10
  63. package/ScannerOverlay/components/ScannerBar/components/FlashlightButton/index.js +53 -27
  64. package/ScannerOverlay/components/ScannerBar/index.js +50 -26
  65. package/Sheet/components/Header/components/SearchBar/index.js +54 -10
  66. package/Sheet/components/Header/index.js +96 -76
  67. package/Sheet/index.js +295 -157
  68. package/Sheet/spec.js +8 -6
  69. package/TaxDisclaimer/index.js +17 -4
  70. package/TaxDisclaimer/spec.js +16 -5
  71. package/TextField/components/ErrorText/index.js +35 -14
  72. package/TextField/components/FormElement/index.js +29 -4
  73. package/TextField/components/Hint/index.js +39 -10
  74. package/TextField/components/Label/index.js +43 -6
  75. package/TextField/components/Underline/index.js +64 -13
  76. package/TextField/index.js +157 -171
  77. package/TextField/spec.js +5 -3
  78. package/icons/AccountBoxIcon.d.ts +7 -0
  79. package/icons/AccountBoxIcon.d.ts.map +1 -0
  80. package/icons/AccountBoxIcon.js +1 -4
  81. package/icons/AddMoreIcon.d.ts +7 -0
  82. package/icons/AddMoreIcon.d.ts.map +1 -0
  83. package/icons/AddMoreIcon.js +0 -3
  84. package/icons/ArrowDropIcon.d.ts +7 -0
  85. package/icons/ArrowDropIcon.d.ts.map +1 -0
  86. package/icons/ArrowDropIcon.js +0 -3
  87. package/icons/ArrowIcon.d.ts +10 -0
  88. package/icons/ArrowIcon.d.ts.map +1 -0
  89. package/icons/ArrowIcon.js +2 -11
  90. package/icons/BarcodeScannerIcon.d.ts +7 -0
  91. package/icons/BarcodeScannerIcon.d.ts.map +1 -0
  92. package/icons/BarcodeScannerIcon.js +0 -3
  93. package/icons/BoxIcon.d.ts +7 -0
  94. package/icons/BoxIcon.d.ts.map +1 -0
  95. package/icons/BoxIcon.js +0 -3
  96. package/icons/BrowseIcon.d.ts +7 -0
  97. package/icons/BrowseIcon.d.ts.map +1 -0
  98. package/icons/BrowseIcon.js +1 -3
  99. package/icons/BurgerIcon.d.ts +7 -0
  100. package/icons/BurgerIcon.d.ts.map +1 -0
  101. package/icons/BurgerIcon.js +0 -3
  102. package/icons/CalendarIcon.d.ts +7 -0
  103. package/icons/CalendarIcon.d.ts.map +1 -0
  104. package/icons/CalendarIcon.js +0 -2
  105. package/icons/CartCouponIcon.d.ts +7 -0
  106. package/icons/CartCouponIcon.d.ts.map +1 -0
  107. package/icons/CartCouponIcon.js +0 -2
  108. package/icons/CartIcon.d.ts +7 -0
  109. package/icons/CartIcon.d.ts.map +1 -0
  110. package/icons/CartIcon.js +0 -2
  111. package/icons/CartPlusIcon.d.ts +7 -0
  112. package/icons/CartPlusIcon.d.ts.map +1 -0
  113. package/icons/CartPlusIcon.js +0 -2
  114. package/icons/CheckIcon.d.ts +7 -0
  115. package/icons/CheckIcon.d.ts.map +1 -0
  116. package/icons/CheckIcon.js +0 -2
  117. package/icons/CheckedIcon.d.ts +7 -0
  118. package/icons/CheckedIcon.d.ts.map +1 -0
  119. package/icons/CheckedIcon.js +0 -3
  120. package/icons/ChevronIcon.d.ts +7 -0
  121. package/icons/ChevronIcon.d.ts.map +1 -0
  122. package/icons/ChevronIcon.js +0 -2
  123. package/icons/CreditCardIcon.d.ts +7 -0
  124. package/icons/CreditCardIcon.d.ts.map +1 -0
  125. package/icons/CreditCardIcon.js +0 -2
  126. package/icons/CrossIcon.d.ts +7 -0
  127. package/icons/CrossIcon.d.ts.map +1 -0
  128. package/icons/CrossIcon.js +0 -2
  129. package/icons/DescriptionIcon.d.ts +7 -0
  130. package/icons/DescriptionIcon.d.ts.map +1 -0
  131. package/icons/DescriptionIcon.js +0 -2
  132. package/icons/FilterIcon.d.ts +7 -0
  133. package/icons/FilterIcon.d.ts.map +1 -0
  134. package/icons/FilterIcon.js +0 -2
  135. package/icons/FlashDisabledIcon.d.ts +7 -0
  136. package/icons/FlashDisabledIcon.d.ts.map +1 -0
  137. package/icons/FlashDisabledIcon.js +0 -2
  138. package/icons/FlashEnabledIcon.d.ts +7 -0
  139. package/icons/FlashEnabledIcon.d.ts.map +1 -0
  140. package/icons/FlashEnabledIcon.js +0 -2
  141. package/icons/GridIcon.d.ts +7 -0
  142. package/icons/GridIcon.d.ts.map +1 -0
  143. package/icons/GridIcon.js +1 -3
  144. package/icons/HeartIcon.d.ts +7 -0
  145. package/icons/HeartIcon.d.ts.map +1 -0
  146. package/icons/HeartIcon.js +0 -2
  147. package/icons/HeartOutlineIcon.d.ts +7 -0
  148. package/icons/HeartOutlineIcon.d.ts.map +1 -0
  149. package/icons/HeartOutlineIcon.js +1 -3
  150. package/icons/HeartPlusIcon.d.ts +7 -0
  151. package/icons/HeartPlusIcon.d.ts.map +1 -0
  152. package/icons/HeartPlusIcon.js +1 -3
  153. package/icons/HeartPlusOutlineIcon.d.ts +7 -0
  154. package/icons/HeartPlusOutlineIcon.d.ts.map +1 -0
  155. package/icons/HeartPlusOutlineIcon.js +1 -3
  156. package/icons/HomeIcon.d.ts +7 -0
  157. package/icons/HomeIcon.d.ts.map +1 -0
  158. package/icons/HomeIcon.js +0 -2
  159. package/icons/InfoIcon.d.ts +7 -0
  160. package/icons/InfoIcon.d.ts.map +1 -0
  161. package/icons/InfoIcon.js +0 -2
  162. package/icons/InfoOutlineIcon.d.ts +7 -0
  163. package/icons/InfoOutlineIcon.d.ts.map +1 -0
  164. package/icons/InfoOutlineIcon.js +0 -2
  165. package/icons/ListIcon.d.ts +7 -0
  166. package/icons/ListIcon.d.ts.map +1 -0
  167. package/icons/ListIcon.js +0 -2
  168. package/icons/LocalShippingIcon.d.ts +7 -0
  169. package/icons/LocalShippingIcon.d.ts.map +1 -0
  170. package/icons/LocalShippingIcon.js +0 -2
  171. package/icons/LocationIcon.d.ts +7 -0
  172. package/icons/LocationIcon.d.ts.map +1 -0
  173. package/icons/LocationIcon.js +1 -4
  174. package/icons/LocatorIcon.d.ts +7 -0
  175. package/icons/LocatorIcon.d.ts.map +1 -0
  176. package/icons/LocatorIcon.js +1 -3
  177. package/icons/LockIcon.d.ts +9 -0
  178. package/icons/LockIcon.d.ts.map +1 -0
  179. package/icons/LockIcon.js +1 -2
  180. package/icons/LogoutIcon.d.ts +7 -0
  181. package/icons/LogoutIcon.d.ts.map +1 -0
  182. package/icons/LogoutIcon.js +0 -2
  183. package/icons/MagnifierIcon.d.ts +7 -0
  184. package/icons/MagnifierIcon.d.ts.map +1 -0
  185. package/icons/MagnifierIcon.js +0 -2
  186. package/icons/MapMarkerIcon.d.ts +7 -0
  187. package/icons/MapMarkerIcon.d.ts.map +1 -0
  188. package/icons/MapMarkerIcon.js +1 -3
  189. package/icons/MoreIcon.d.ts +7 -0
  190. package/icons/MoreIcon.d.ts.map +1 -0
  191. package/icons/MoreIcon.js +1 -3
  192. package/icons/MoreVertIcon.d.ts +7 -0
  193. package/icons/MoreVertIcon.d.ts.map +1 -0
  194. package/icons/MoreVertIcon.js +1 -3
  195. package/icons/NotificationIcon.d.ts +7 -0
  196. package/icons/NotificationIcon.d.ts.map +1 -0
  197. package/icons/NotificationIcon.js +1 -3
  198. package/icons/PersonIcon.d.ts +9 -0
  199. package/icons/PersonIcon.d.ts.map +1 -0
  200. package/icons/PersonIcon.js +0 -3
  201. package/icons/PhoneIcon.d.ts +7 -0
  202. package/icons/PhoneIcon.d.ts.map +1 -0
  203. package/icons/PhoneIcon.js +1 -4
  204. package/icons/PlaceholderIcon.d.ts +7 -0
  205. package/icons/PlaceholderIcon.d.ts.map +1 -0
  206. package/icons/PlaceholderIcon.js +0 -2
  207. package/icons/RadioCheckedIcon.d.ts +10 -0
  208. package/icons/RadioCheckedIcon.d.ts.map +1 -0
  209. package/icons/RadioCheckedIcon.js +0 -2
  210. package/icons/RadioUncheckedIcon.d.ts +10 -0
  211. package/icons/RadioUncheckedIcon.d.ts.map +1 -0
  212. package/icons/RadioUncheckedIcon.js +0 -2
  213. package/icons/SecurityIcon.d.ts +7 -0
  214. package/icons/SecurityIcon.d.ts.map +1 -0
  215. package/icons/SecurityIcon.js +0 -2
  216. package/icons/ShippingMethodIcon.d.ts +7 -0
  217. package/icons/ShippingMethodIcon.d.ts.map +1 -0
  218. package/icons/ShippingMethodIcon.js +0 -2
  219. package/icons/ShoppingCartIcon.d.ts +7 -0
  220. package/icons/ShoppingCartIcon.d.ts.map +1 -0
  221. package/icons/ShoppingCartIcon.js +0 -2
  222. package/icons/SortIcon.d.ts +7 -0
  223. package/icons/SortIcon.d.ts.map +1 -0
  224. package/icons/SortIcon.js +0 -2
  225. package/icons/StarHalfIcon.d.ts +7 -0
  226. package/icons/StarHalfIcon.d.ts.map +1 -0
  227. package/icons/StarHalfIcon.js +0 -9
  228. package/icons/StarIcon.d.ts +7 -0
  229. package/icons/StarIcon.d.ts.map +1 -0
  230. package/icons/StarIcon.js +0 -9
  231. package/icons/StarOutlineIcon.d.ts +7 -0
  232. package/icons/StarOutlineIcon.d.ts.map +1 -0
  233. package/icons/StarOutlineIcon.js +0 -2
  234. package/icons/StopIcon.d.ts +7 -0
  235. package/icons/StopIcon.d.ts.map +1 -0
  236. package/icons/StopIcon.js +0 -2
  237. package/icons/TickIcon.d.ts +7 -0
  238. package/icons/TickIcon.d.ts.map +1 -0
  239. package/icons/TickIcon.js +0 -2
  240. package/icons/TimeIcon.d.ts +7 -0
  241. package/icons/TimeIcon.d.ts.map +1 -0
  242. package/icons/TimeIcon.js +0 -2
  243. package/icons/TrashIcon.d.ts +7 -0
  244. package/icons/TrashIcon.d.ts.map +1 -0
  245. package/icons/TrashIcon.js +0 -3
  246. package/icons/TrashOutlineIcon.d.ts +8 -0
  247. package/icons/TrashOutlineIcon.d.ts.map +1 -0
  248. package/icons/TrashOutlineIcon.js +0 -2
  249. package/icons/UncheckedIcon.d.ts +7 -0
  250. package/icons/UncheckedIcon.d.ts.map +1 -0
  251. package/icons/UncheckedIcon.js +0 -2
  252. package/icons/ViewListIcon.d.ts +7 -0
  253. package/icons/ViewListIcon.d.ts.map +1 -0
  254. package/icons/ViewListIcon.js +0 -2
  255. package/icons/VisibilityIcon.d.ts +8 -0
  256. package/icons/VisibilityIcon.d.ts.map +1 -0
  257. package/icons/VisibilityIcon.js +2 -4
  258. package/icons/VisibilityOffIcon.d.ts +8 -0
  259. package/icons/VisibilityOffIcon.d.ts.map +1 -0
  260. package/icons/VisibilityOffIcon.js +2 -4
  261. package/icons/WarningIcon.d.ts +7 -0
  262. package/icons/WarningIcon.d.ts.map +1 -0
  263. package/icons/WarningIcon.js +1 -3
  264. package/package.json +5 -5
  265. package/tsconfig.build.json +16 -0
  266. package/tsconfig.json +3 -0
  267. package/ActionButton/style.js +0 -22
  268. package/AddToCartButton/style.js +0 -148
  269. package/Availability/style.js +0 -19
  270. package/Button/style.js +0 -155
  271. package/Card/style.js +0 -11
  272. package/CardList/components/Item/style.js +0 -7
  273. package/CartTotalLine/components/Amount/style.js +0 -8
  274. package/CartTotalLine/components/Hint/style.js +0 -12
  275. package/CartTotalLine/components/Label/style.js +0 -17
  276. package/CartTotalLine/style.js +0 -31
  277. package/Checkbox/style.js +0 -18
  278. package/Chip/style.js +0 -78
  279. package/ContextMenu/components/Item/style.js +0 -34
  280. package/ContextMenu/components/Position/style.js +0 -11
  281. package/ContextMenu/style.js +0 -45
  282. package/DiscountBadge/style.js +0 -36
  283. package/FavoritesButton/style.js +0 -26
  284. package/Form/Checkbox/style.js +0 -25
  285. package/Form/InfoField/style.js +0 -11
  286. package/Form/Password/style.js +0 -11
  287. package/Form/RadioGroup/components/Item/style.js +0 -32
  288. package/Form/RadioGroup/style.js +0 -20
  289. package/Form/Select/style.js +0 -27
  290. package/Form/SelectContextChoices/style.js +0 -23
  291. package/Form/TextField/style.js +0 -70
  292. package/FormElement/components/ErrorText/style.js +0 -13
  293. package/FormElement/components/Label/style.js +0 -89
  294. package/FormElement/components/Placeholder/style.js +0 -56
  295. package/FormElement/components/Underline/style.js +0 -60
  296. package/FormElement/style.js +0 -14
  297. package/Glow/style.js +0 -18
  298. package/IndicatorCircle/style.js +0 -65
  299. package/LoadingIndicator/style.js +0 -20
  300. package/Manufacturer/style.js +0 -5
  301. package/MessageBar/spec.js +0 -80
  302. package/MessageBar/style.js +0 -38
  303. package/NoResults/components/Icon/style.js +0 -17
  304. package/NoResults/style.js +0 -31
  305. package/Placeholder/style.js +0 -11
  306. package/PlaceholderLabel/style.js +0 -12
  307. package/Price/style.js +0 -22
  308. package/PriceInfo/style.js +0 -5
  309. package/PriceStriked/style.js +0 -36
  310. package/ProgressBar/style.js +0 -85
  311. package/RadioButton/style.js +0 -21
  312. package/RatingStars/style.js +0 -53
  313. package/Ripple/style.js +0 -18
  314. package/ScannerOverlay/components/CameraOverlay/style.js +0 -40
  315. package/ScannerOverlay/components/ScannerBar/components/FlashlightButton/style.js +0 -28
  316. package/ScannerOverlay/components/ScannerBar/style.js +0 -20
  317. package/Sheet/components/Header/components/SearchBar/style.js +0 -47
  318. package/Sheet/components/Header/style.js +0 -50
  319. package/Sheet/style.js +0 -143
  320. package/TaxDisclaimer/style.js +0 -9
  321. package/TextField/components/ErrorText/style.js +0 -27
  322. package/TextField/components/FormElement/style.js +0 -34
  323. package/TextField/components/Hint/style.js +0 -46
  324. package/TextField/components/Label/style.js +0 -80
  325. package/TextField/components/Underline/style.js +0 -60
  326. package/TextField/style.js +0 -35
package/Button/style.js DELETED
@@ -1,155 +0,0 @@
1
- import { css } from 'glamor';
2
- import { themeConfig } from '@shopgate/pwa-common/helpers/config';
3
- const {
4
- colors
5
- } = themeConfig;
6
- const buttonPadding = `0 ${themeConfig.variables.gap.big}px 0`;
7
-
8
- /**
9
- * Creates the button style.
10
- * @param {string} text The text color.
11
- * @param {string|null} background The fill color.
12
- * @return {Object} The button style.
13
- */
14
- const button = (text, background) => ({
15
- position: 'relative',
16
- display: 'inline-block',
17
- outline: 0,
18
- color: text,
19
- backgroundColor: background,
20
- minWidth: 64,
21
- overflow: 'hidden',
22
- ':disabled': {
23
- cursor: 'not-allowed'
24
- },
25
- ...themeConfig.variables.buttonBase
26
- });
27
-
28
- /**
29
- * The basic content wrapper styles.
30
- */
31
- const contentWrapper = css({
32
- padding: buttonPadding
33
- }).toString();
34
-
35
- /**
36
- * Creates the button styles object.
37
- * @param {string} textColor The text color.
38
- * @param {string|null} fillColor The fill color.
39
- * @return {Object} The styles object.
40
- */
41
- const createButtonStyles = (textColor, fillColor) => {
42
- const buttonStyle = {
43
- ...button(textColor, fillColor)
44
- };
45
- const contentStyle = {
46
- padding: buttonPadding,
47
- color: buttonStyle.color
48
- };
49
- return {
50
- button: css(buttonStyle).toString(),
51
- content: css(contentStyle).toString()
52
- };
53
- };
54
-
55
- /**
56
- * Creates a plain button style object without any styling.
57
- * @return {Object}
58
- */
59
- const plain = () => ({
60
- button: css({
61
- padding: 0,
62
- outline: 0,
63
- border: 0,
64
- textAlign: 'left'
65
- }).toString(),
66
- content: ''
67
- });
68
-
69
- /**
70
- * Creates a simple button style object.
71
- * @param {boolean} disabled Whether this button is disabled.
72
- * @return {Object}
73
- */
74
- const simple = disabled => {
75
- if (disabled) {
76
- // simple disabled button style.
77
- return createButtonStyles(themeConfig.colors.shade4, themeConfig.colors.shade7);
78
- }
79
-
80
- // simple enabled button style.
81
- return createButtonStyles(themeConfig.colors.dark, themeConfig.colors.shade7);
82
- };
83
-
84
- /**
85
- * The regular flat button style.
86
- * @param {boolean} disabled Whether this button is disabled.
87
- * @return {Object} An object of style definitions.
88
- */
89
- const regular = disabled => {
90
- if (disabled) {
91
- // Flat disabled button style.
92
- return createButtonStyles(colors.shade4, null);
93
- }
94
-
95
- // Flat enabled button style.
96
- return createButtonStyles(colors.dark, null);
97
- };
98
-
99
- /**
100
- * The primary button style.
101
- * @param {boolean} disabled Whether this button is disabled.
102
- * @param {boolean} flat Whether this button should be rendered flat.
103
- * @return {Object} An object of style definitions.
104
- */
105
- const primary = (disabled, flat) => {
106
- if (!flat) {
107
- if (disabled) {
108
- // Regular disabled button style.
109
- return createButtonStyles(colors.shade4, colors.shade7);
110
- }
111
-
112
- // Regular enabled button style.
113
- return createButtonStyles(`var(--color-secondary-contrast, ${colors.accentContrast})`, `var(--color-secondary, ${colors.accent})`);
114
- }
115
- if (disabled) {
116
- // Flat disabled button style.
117
- return createButtonStyles(colors.shade4, null);
118
- }
119
-
120
- // Flat enabled button style.
121
- return createButtonStyles(`var(--color-secondary, ${colors.accent})`, null);
122
- };
123
-
124
- /**
125
- * The secondary button style.
126
- * @param {boolean} disabled Whether this button is disabled.
127
- * @param {boolean} flat Whether this button should be rendered flat.
128
- * @return {Object} An object of style definitions.
129
- */
130
- const secondary = (disabled, flat) => {
131
- if (!flat) {
132
- if (disabled) {
133
- // Regular disabled button style.
134
- return createButtonStyles(colors.shade4, colors.shade7);
135
- }
136
-
137
- // Regular enabled button style.
138
- return createButtonStyles(`var(--color-primary-contrast, ${colors.primaryContrast})`, `var(--color-primary, ${colors.primary})`);
139
- }
140
- if (disabled) {
141
- // Flat disabled button style.
142
- return createButtonStyles(colors.shade4, null);
143
- }
144
-
145
- // Flat enabled button style.
146
- return createButtonStyles(`var(--color-primary, ${colors.primary})`, null);
147
- };
148
- export default {
149
- plain,
150
- regular,
151
- simple,
152
- primary,
153
- secondary,
154
- contentWrapper
155
- };
package/Card/style.js DELETED
@@ -1,11 +0,0 @@
1
- import { css } from 'glamor';
2
- import { themeConfig, themeName } from '@shopgate/pwa-common/helpers/config';
3
- const isIOS = themeName.includes('ios');
4
- export default css({
5
- boxShadow: themeConfig.shadows.productCard,
6
- margin: '5px 5px 10px',
7
- borderRadius: isIOS ? 10 : 2,
8
- background: themeConfig.colors.light,
9
- overflow: 'hidden',
10
- position: 'relative'
11
- }).toString();
@@ -1,7 +0,0 @@
1
- import { css } from 'glamor';
2
- import { themeConfig } from '@shopgate/pwa-common/helpers/config';
3
- export default css({
4
- background: themeConfig.colors.light,
5
- marginBottom: themeConfig.variables.gap.small / 2,
6
- position: 'relative'
7
- }).toString();
@@ -1,8 +0,0 @@
1
- import { css } from 'glamor';
2
- const amount = css({
3
- textAlign: 'right',
4
- order: 4
5
- }).toString();
6
- export default {
7
- amount
8
- };
@@ -1,12 +0,0 @@
1
- import { css } from 'glamor';
2
- import { themeConfig } from '@shopgate/pwa-common/helpers/config';
3
- const {
4
- variables
5
- } = themeConfig;
6
- const hint = css({
7
- paddingLeft: variables.gap.small,
8
- order: 5
9
- }).toString();
10
- export default {
11
- hint
12
- };
@@ -1,17 +0,0 @@
1
- import { css } from 'glamor';
2
- import { themeConfig } from '@shopgate/pwa-common/helpers/config';
3
- const {
4
- variables
5
- } = themeConfig;
6
- const label = css({
7
- flexGrow: 1,
8
- paddingRight: variables.gap.small,
9
- order: 3
10
- }).toString();
11
- const labelWithSuffix = css({
12
- paddingRight: variables.gap.small
13
- });
14
- export default {
15
- label,
16
- labelWithSuffix
17
- };
@@ -1,31 +0,0 @@
1
- import { css } from 'glamor';
2
- import { themeConfig } from '@shopgate/pwa-common/helpers/config';
3
- const {
4
- colors
5
- } = themeConfig;
6
- const disabled = css({
7
- color: `${colors.shade4} !important`
8
- }).toString();
9
- const base = css({
10
- color: colors.shade9
11
- }).toString();
12
- const subTotal = css({
13
- color: `${colors.dark}`
14
- }).toString();
15
- const grandTotal = css({
16
- color: `${colors.dark}`,
17
- fontSize: '1rem !important'
18
- }).toString();
19
- const line = css({
20
- display: 'flex',
21
- justifyContent: 'space-between',
22
- fontSize: '0.875rem',
23
- alignItems: 'baseline'
24
- }).toString();
25
- export default {
26
- subTotal,
27
- grandTotal,
28
- base,
29
- line,
30
- disabled
31
- };
package/Checkbox/style.js DELETED
@@ -1,18 +0,0 @@
1
- import { css } from 'glamor';
2
- import { themeConfig } from '@shopgate/pwa-common/helpers/config';
3
- const icon = css({
4
- width: 24,
5
- height: 24,
6
- flexShrink: 0
7
- }).toString();
8
- const checkedIcon = css({
9
- color: `var(--color-secondary, ${themeConfig.colors.accent})`
10
- }).toString();
11
- const uncheckedIcon = css({
12
- color: themeConfig.colors.shade6
13
- }).toString();
14
- export default {
15
- icon,
16
- checkedIcon,
17
- uncheckedIcon
18
- };
package/Chip/style.js DELETED
@@ -1,78 +0,0 @@
1
- import { css } from 'glamor';
2
- import { responsiveMediaQuery } from '@shopgate/engage/styles';
3
- import { hasNewServices } from '@shopgate/engage/core/helpers';
4
- import { themeConfig } from '@shopgate/engage';
5
-
6
- /**
7
- * Gets a basic style object for the chip layout.
8
- * @param {boolean} hasRemoveButton Whether this chip has a remove button.
9
- * @returns {Object} The style object.
10
- */
11
- const chipBase = (hasRemoveButton = true) => ({
12
- display: 'flex',
13
- alignItems: 'center',
14
- borderRadius: 26,
15
- outline: 0,
16
- height: 26,
17
- paddingRight: themeConfig.variables.gap.small,
18
- paddingLeft: themeConfig.variables.gap.small * (hasRemoveButton ? 0.5 : 1),
19
- marginRight: 5,
20
- marginTop: 4,
21
- marginBottom: 4,
22
- minWidth: 0
23
- });
24
-
25
- /**
26
- * Gets a style class for the chip layout.
27
- * @param {boolean} hasRemoveButton Whether this chip has a remove button.
28
- * @param {boolean} inverted Whether the colors of the chip are inverted.
29
- * @returns {string} The style class name.
30
- */
31
- const chip = (hasRemoveButton = true, inverted = false) => css({
32
- ...chipBase(hasRemoveButton),
33
- ...(hasNewServices() ? {
34
- backgroundColor: inverted ? 'var(--color-primary)' : 'var(--color-primary-contrast)',
35
- color: inverted ? 'var(--color-primary-contrast)' : 'var(--color-primary)'
36
- } : {
37
- backgroundColor: inverted ? 'var(--color-secondary)' : 'var(--color-secondary-contrast)',
38
- color: inverted ? 'var(--color-secondary-contrast)' : 'var(--color-secondary)',
39
- '--color-text-high-emphasis': inverted ? 'var(--color-secondary-contrast)' : 'var(--color-secondary)'
40
- })
41
- }).toString();
42
- const removeButton = css({
43
- flexShrink: 0,
44
- padding: 0,
45
- [responsiveMediaQuery('>xs', {
46
- webOnly: true
47
- })]: {
48
- padding: '0 5px',
49
- fontSize: '1.125rem'
50
- }
51
- }).toString();
52
- const name = css({
53
- paddingLeft: themeConfig.variables.gap.small * 0.5,
54
- paddingRight: themeConfig.variables.gap.small * 0.5,
55
- paddingTop: 3,
56
- paddingBottom: 3,
57
- fontSize: 12,
58
- fontWeight: 500,
59
- textOverflow: 'ellipsis',
60
- maxWidth: '100%',
61
- whiteSpace: 'nowrap',
62
- overflow: 'hidden',
63
- display: 'block',
64
- lineHeight: '1',
65
- color: 'inherit',
66
- [responsiveMediaQuery('>xs', {
67
- webOnly: true
68
- })]: {
69
- fontSize: '0.875rem',
70
- lineHeight: '1.25rem',
71
- padding: '6px 8px 6px 0'
72
- }
73
- }).toString();
74
- export default {
75
- chip,
76
- removeButton,
77
- name
78
- };
@@ -1,34 +0,0 @@
1
- import { css } from 'glamor';
2
- import Color from 'color';
3
- import { themeConfig } from '@shopgate/pwa-common/helpers/config';
4
- import { getCSSCustomProp } from '@shopgate/engage/styles';
5
-
6
- /**
7
- * Get the item class.
8
- * @param {boolean} disabled Disabled.
9
- * @returns {string}
10
- */
11
- export const getItemClass = disabled => {
12
- let background = themeConfig.colors.shade8;
13
- const customPropColor = getCSSCustomProp('--color-primary');
14
- if (customPropColor) {
15
- background = Color(customPropColor).alpha(0.04);
16
- }
17
- return css({
18
- position: 'relative',
19
- whiteSpace: 'nowrap',
20
- marginBottom: 2,
21
- padding: `${themeConfig.variables.gap.big * 0.875}px ${themeConfig.variables.gap.big * 1.375}px`,
22
- lineHeight: 1,
23
- zIndex: 1,
24
- color: disabled ? 'var(--color-text-low-emphasis)' : 'inherits',
25
- ...(!disabled ? {
26
- cursor: 'pointer',
27
- ':hover': {
28
- background
29
- }
30
- } : {
31
- cursor: 'default'
32
- })
33
- }).toString();
34
- };
@@ -1,11 +0,0 @@
1
- import { css } from 'glamor';
2
- import { themeConfig } from '@shopgate/pwa-common/helpers/config';
3
- const outerGap = themeConfig.variables.gap.small;
4
- const container = css({
5
- position: 'absolute',
6
- margin: outerGap
7
- }).toString();
8
- export default {
9
- container,
10
- outerGap
11
- };
@@ -1,45 +0,0 @@
1
- import { css } from 'glamor';
2
- import { themeConfig } from '@shopgate/pwa-common/helpers/config';
3
- const container = css({
4
- position: 'relative'
5
- }).toString();
6
- const button = css({
7
- display: 'block',
8
- fontSize: '1.5rem',
9
- outline: 0,
10
- padding: 0,
11
- color: 'inherit'
12
- }).toString();
13
- const disabled = css({
14
- cursor: 'not-allowed'
15
- }).toString();
16
- const overlay = css({
17
- position: 'fixed',
18
- top: 0,
19
- right: 0,
20
- bottom: 0,
21
- left: 0,
22
- zIndex: 10
23
- }).toString();
24
- const menu = css({
25
- position: 'absolute',
26
- top: 0,
27
- left: 0,
28
- padding: `${themeConfig.variables.gap.small}px 0`,
29
- minWidth: 130,
30
- background: themeConfig.colors.light,
31
- borderRadius: 2,
32
- boxShadow: themeConfig.shadows.contextMenu
33
- }).toString();
34
- const scrollable = css({
35
- maxHeight: '30vh',
36
- overflowY: 'auto'
37
- }).toString();
38
- export default {
39
- container,
40
- button,
41
- menu,
42
- overlay,
43
- disabled,
44
- scrollable
45
- };
@@ -1,36 +0,0 @@
1
- import { css } from 'glamor';
2
- import { themeConfig } from '@shopgate/pwa-common/helpers/config';
3
- const {
4
- colors
5
- } = themeConfig;
6
- const badge = {
7
- background: `var(--color-primary, ${colors.primary})`,
8
- borderRadius: 2,
9
- color: `var(--color-primary-contrast, ${colors.primaryContrast})`,
10
- padding: 5,
11
- width: '100%',
12
- fontWeight: 700,
13
- textAlign: 'center',
14
- display: 'flex',
15
- justifyContent: 'center',
16
- alignItems: 'center',
17
- lineHeight: 1,
18
- whiteSpace: 'nowrap',
19
- ...themeConfig.variables.discountBadgeBase
20
- };
21
-
22
- /**
23
- * The discount badge styles that can be selected by passing the style key.
24
- * @type {Object}
25
- */
26
- export default {
27
- small: css({
28
- ...badge
29
- }).toString(),
30
- big: css({
31
- ...badge,
32
- paddingTop: 5,
33
- paddingLeft: 5,
34
- paddingRight: 5
35
- }).toString()
36
- };
@@ -1,26 +0,0 @@
1
- import { css } from 'glamor';
2
- import { themeShadows, themeColors } from '@shopgate/pwa-common/helpers/config';
3
- const buttonProto = {
4
- display: 'block',
5
- position: 'relative',
6
- background: themeColors.light,
7
- borderRadius: '50%',
8
- padding: 0,
9
- fontSize: 20,
10
- lineHeight: 1,
11
- color: `var(--color-secondary, ${themeColors.accent})`,
12
- outline: 0
13
- };
14
- const buttonFlat = css(buttonProto).toString();
15
- const button = css({
16
- ...buttonProto,
17
- boxShadow: themeShadows.buttons.elevated
18
- }).toString();
19
- const ripple = css({
20
- padding: 6
21
- }).toString();
22
- export default {
23
- buttonFlat,
24
- button,
25
- ripple
26
- };
@@ -1,25 +0,0 @@
1
- import { css } from 'glamor';
2
- import { themeConfig } from '@shopgate/pwa-common/helpers/config';
3
- const root = css({
4
- marginLeft: -2,
5
- // Removes margin caused by svg.
6
- cursor: 'pointer',
7
- '& svg': {
8
- float: 'left'
9
- }
10
- }).toString();
11
- const label = css({
12
- lineHeight: 1.6
13
- }).toString();
14
- const labelWrapper = css({
15
- marginLeft: themeConfig.variables.gap.xbig
16
- }).toString();
17
- const checked = css({
18
- color: `var(--color-primary, ${themeConfig.colors.primary})`
19
- }).toString();
20
- export default {
21
- root,
22
- label,
23
- labelWrapper,
24
- checked
25
- };
@@ -1,11 +0,0 @@
1
- import { css } from 'glamor';
2
- const info = css({
3
- paddingTop: 24
4
- }).toString();
5
- const element = css({
6
- marginTop: 16
7
- }).toString();
8
- export default {
9
- info,
10
- element
11
- };
@@ -1,11 +0,0 @@
1
- import { css } from 'glamor';
2
- import { themeConfig } from '@shopgate/pwa-common/helpers/config';
3
- const {
4
- colors
5
- } = themeConfig;
6
- const visOff = css({
7
- color: colors.shade4
8
- }).toString();
9
- export default {
10
- visOff
11
- };
@@ -1,32 +0,0 @@
1
- import { css } from 'glamor';
2
- import { themeConfig } from '@shopgate/pwa-common/helpers/config';
3
- const container = css({
4
- display: 'flex',
5
- marginLeft: -1 // Removes margin of svg.
6
- }).toString();
7
- const icon = css({
8
- width: 24,
9
- height: 24,
10
- flexShrink: 0
11
- }).toString();
12
- const disabled = css({
13
- opacity: 0.25,
14
- pointerEvents: 'none'
15
- }).toString();
16
- const label = css({
17
- flex: 1,
18
- fontSize: '1rem',
19
- lineHeight: 1.5,
20
- marginLeft: themeConfig.variables.gap.small,
21
- marginBottom: themeConfig.variables.gap.small
22
- }).toString();
23
- const active = css({
24
- color: `var(--color-primary, ${themeConfig.colors.primary})`
25
- }).toString();
26
- export default {
27
- icon,
28
- disabled,
29
- container,
30
- label,
31
- active
32
- };
@@ -1,20 +0,0 @@
1
- import { css } from 'glamor';
2
- import { themeConfig } from '@shopgate/pwa-common/helpers/config';
3
-
4
- /**
5
- * @param {string} direction flex direction
6
- * @returns {*}
7
- */
8
- const container = direction => css({
9
- display: 'flex',
10
- flexDirection: direction
11
- }).toString();
12
- const label = css({
13
- fontSize: '0.8rem',
14
- paddingBottom: themeConfig.variables.gap.small,
15
- color: themeConfig.colors.shade12
16
- }).toString();
17
- export default {
18
- container,
19
- label
20
- };
@@ -1,27 +0,0 @@
1
- import { css } from 'glamor';
2
- const select = css({
3
- appearance: 'none',
4
- position: 'relative',
5
- overflow: 'hidden',
6
- whiteSpace: 'nowrap',
7
- textOverflow: 'ellipsis',
8
- padding: '0 20px 0 0',
9
- width: '100%',
10
- margin: '24px 0 0 0',
11
- outline: 0,
12
- fontSize: 16,
13
- lineHeight: '19px',
14
- zIndex: 10
15
- }).toString();
16
- const chevron = css({
17
- position: 'absolute',
18
- top: '50%',
19
- right: 0,
20
- transform: 'translateY(-50%) rotateZ(-90deg)',
21
- fontSize: '1.3em !important',
22
- marginTop: -3
23
- }).toString();
24
- export default {
25
- select,
26
- chevron
27
- };
@@ -1,23 +0,0 @@
1
- import { css } from 'glamor';
2
- import { themeConfig } from '@shopgate/pwa-common/helpers/config';
3
- const chevron = css({
4
- position: 'absolute',
5
- top: '50%',
6
- right: 0,
7
- transform: 'translateY(-50%) rotateZ(-90deg)',
8
- fontSize: '1.3em !important',
9
- marginTop: -3
10
- }).toString();
11
- const toggle = css({
12
- fontSize: '1rem',
13
- paddingRight: '2rem'
14
- });
15
- const itemSelected = css({
16
- backgroundColor: themeConfig.colors.shade8,
17
- fontWeight: 500
18
- }).toString();
19
- export default {
20
- chevron,
21
- toggle,
22
- itemSelected
23
- };