@salutejs/plasma-new-hope 0.328.0-canary.2047.15885229046.0 → 0.328.0-canary.2047.15976223953.0

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 (245) hide show
  1. package/cjs/components/Autocomplete/Autocomplete.css +1 -1
  2. package/cjs/components/Calendar/utils/getDateWithModification.js +2 -2
  3. package/cjs/components/Calendar/utils/getDateWithModification.js.map +1 -1
  4. package/cjs/components/Combobox/ComboboxNew/Combobox.css +1 -1
  5. package/cjs/components/DatePicker/RangeDate/RangeDate.css +1 -1
  6. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +1 -1
  7. package/cjs/components/DatePicker/SingleDate/SingleDate.css +1 -1
  8. package/cjs/components/Pagination/Pagination.css +1 -1
  9. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +1 -1
  10. package/cjs/components/Range/Range.css +1 -1
  11. package/cjs/components/Select/Select.css +1 -1
  12. package/cjs/components/Select/ui/Target/Target.css +1 -1
  13. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +1 -1
  14. package/cjs/components/Slider/Slider.css +1 -1
  15. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +1 -1
  16. package/cjs/components/Table/Table.css +1 -1
  17. package/cjs/components/Table/ui/Cell/Cell.css +1 -1
  18. package/cjs/components/Table/ui/EditableCell/EditableCell.css +1 -1
  19. package/cjs/components/Table/ui/HeadCell/HeadCell.css +1 -1
  20. package/cjs/components/Table/ui/HeadCell/ui/Filter/Filter.css +1 -1
  21. package/cjs/components/TextArea/TextArea.js +7 -3
  22. package/cjs/components/TextArea/TextArea.js.map +1 -1
  23. package/cjs/components/TextArea/TextArea.tokens.js +4 -1
  24. package/cjs/components/TextArea/TextArea.tokens.js.map +1 -1
  25. package/cjs/components/TextArea/variations/_size/base.js +1 -1
  26. package/cjs/components/TextArea/variations/_size/base.js.map +1 -1
  27. package/cjs/components/TextArea/variations/_size/base_1mq4sb2.css +1 -0
  28. package/cjs/components/TextField/TextField.js +12 -3
  29. package/cjs/components/TextField/TextField.js.map +1 -1
  30. package/cjs/components/TextField/TextField.tokens.js +4 -1
  31. package/cjs/components/TextField/TextField.tokens.js.map +1 -1
  32. package/cjs/components/TextField/variations/_size/base.js +1 -1
  33. package/cjs/components/TextField/variations/_size/base.js.map +1 -1
  34. package/cjs/components/TextField/variations/_size/base_1oec4lw.css +1 -0
  35. package/cjs/components/Tour/Tour.css +4 -0
  36. package/cjs/components/Tour/Tour.js +223 -0
  37. package/cjs/components/Tour/Tour.js.map +1 -0
  38. package/cjs/components/Tour/Tour.styles.js +58 -0
  39. package/cjs/components/Tour/Tour.styles.js.map +1 -0
  40. package/cjs/components/Tour/Tour.styles_hmd79i.css +4 -0
  41. package/cjs/components/Tour/Tour.tokens.js +21 -0
  42. package/cjs/components/Tour/Tour.tokens.js.map +1 -0
  43. package/cjs/components/Tour/utils/index.js +126 -0
  44. package/cjs/components/Tour/utils/index.js.map +1 -0
  45. package/cjs/components/Tour/variatoins/_size/base.js +9 -0
  46. package/cjs/components/Tour/variatoins/_size/base.js.map +1 -0
  47. package/cjs/components/Tour/variatoins/_view/base.js +9 -0
  48. package/cjs/components/Tour/variatoins/_view/base.js.map +1 -0
  49. package/cjs/index.css +8 -1
  50. package/cjs/index.js +6 -0
  51. package/cjs/index.js.map +1 -1
  52. package/emotion/cjs/components/Calendar/utils/getDateWithModification.js +2 -2
  53. package/emotion/cjs/components/TextArea/TextArea.js +8 -4
  54. package/emotion/cjs/components/TextArea/TextArea.tokens.js +3 -1
  55. package/emotion/cjs/components/TextArea/variations/_size/base.js +2 -1
  56. package/emotion/cjs/components/TextField/TextField.js +13 -4
  57. package/emotion/cjs/components/TextField/TextField.tokens.js +3 -1
  58. package/emotion/cjs/components/TextField/variations/_size/base.js +1 -1
  59. package/emotion/cjs/components/Tour/Tour.js +387 -0
  60. package/emotion/cjs/components/Tour/Tour.styles.js +55 -0
  61. package/emotion/cjs/components/Tour/Tour.tokens.js +31 -0
  62. package/emotion/cjs/components/Tour/Tour.types.js +4 -0
  63. package/emotion/cjs/components/Tour/index.js +26 -0
  64. package/emotion/cjs/components/Tour/utils/index.js +157 -0
  65. package/emotion/cjs/components/Tour/variatoins/_size/base.js +12 -0
  66. package/emotion/cjs/components/Tour/variatoins/_view/base.js +12 -0
  67. package/emotion/cjs/examples/plasma_b2c/components/Tour/Tour.config.js +26 -0
  68. package/emotion/cjs/examples/plasma_b2c/components/Tour/Tour.js +15 -0
  69. package/emotion/cjs/examples/plasma_web/components/Tour/Tour.config.js +26 -0
  70. package/emotion/cjs/examples/plasma_web/components/Tour/Tour.js +15 -0
  71. package/emotion/cjs/index.js +1 -0
  72. package/emotion/es/components/Calendar/utils/getDateWithModification.js +2 -2
  73. package/emotion/es/components/TextArea/TextArea.js +8 -4
  74. package/emotion/es/components/TextArea/TextArea.tokens.js +3 -1
  75. package/emotion/es/components/TextArea/variations/_size/base.js +2 -1
  76. package/emotion/es/components/TextField/TextField.js +13 -4
  77. package/emotion/es/components/TextField/TextField.tokens.js +3 -1
  78. package/emotion/es/components/TextField/variations/_size/base.js +1 -1
  79. package/emotion/es/components/Tour/Tour.js +328 -0
  80. package/emotion/es/components/Tour/Tour.styles.js +26 -0
  81. package/emotion/es/components/Tour/Tour.tokens.js +13 -0
  82. package/emotion/es/components/Tour/Tour.types.js +1 -0
  83. package/emotion/es/components/Tour/index.js +2 -0
  84. package/emotion/es/components/Tour/utils/index.js +127 -0
  85. package/emotion/es/components/Tour/variatoins/_size/base.js +2 -0
  86. package/emotion/es/components/Tour/variatoins/_view/base.js +2 -0
  87. package/emotion/es/examples/plasma_b2c/components/Tour/Tour.config.js +16 -0
  88. package/emotion/es/examples/plasma_b2c/components/Tour/Tour.js +5 -0
  89. package/emotion/es/examples/plasma_web/components/Tour/Tour.config.js +16 -0
  90. package/emotion/es/examples/plasma_web/components/Tour/Tour.js +5 -0
  91. package/emotion/es/index.js +1 -0
  92. package/es/components/Autocomplete/Autocomplete.css +1 -1
  93. package/es/components/Calendar/utils/getDateWithModification.js +2 -2
  94. package/es/components/Calendar/utils/getDateWithModification.js.map +1 -1
  95. package/es/components/Combobox/ComboboxNew/Combobox.css +1 -1
  96. package/es/components/DatePicker/RangeDate/RangeDate.css +1 -1
  97. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +1 -1
  98. package/es/components/DatePicker/SingleDate/SingleDate.css +1 -1
  99. package/es/components/Pagination/Pagination.css +1 -1
  100. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +1 -1
  101. package/es/components/Range/Range.css +1 -1
  102. package/es/components/Select/Select.css +1 -1
  103. package/es/components/Select/ui/Target/Target.css +1 -1
  104. package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +1 -1
  105. package/es/components/Slider/Slider.css +1 -1
  106. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +1 -1
  107. package/es/components/Table/Table.css +1 -1
  108. package/es/components/Table/ui/Cell/Cell.css +1 -1
  109. package/es/components/Table/ui/EditableCell/EditableCell.css +1 -1
  110. package/es/components/Table/ui/HeadCell/HeadCell.css +1 -1
  111. package/es/components/Table/ui/HeadCell/ui/Filter/Filter.css +1 -1
  112. package/es/components/TextArea/TextArea.js +7 -3
  113. package/es/components/TextArea/TextArea.js.map +1 -1
  114. package/es/components/TextArea/TextArea.tokens.js +4 -1
  115. package/es/components/TextArea/TextArea.tokens.js.map +1 -1
  116. package/es/components/TextArea/variations/_size/base.js +1 -1
  117. package/es/components/TextArea/variations/_size/base.js.map +1 -1
  118. package/es/components/TextArea/variations/_size/base_1mq4sb2.css +1 -0
  119. package/es/components/TextField/TextField.js +12 -3
  120. package/es/components/TextField/TextField.js.map +1 -1
  121. package/es/components/TextField/TextField.tokens.js +4 -1
  122. package/es/components/TextField/TextField.tokens.js.map +1 -1
  123. package/es/components/TextField/variations/_size/base.js +1 -1
  124. package/es/components/TextField/variations/_size/base.js.map +1 -1
  125. package/es/components/TextField/variations/_size/base_1oec4lw.css +1 -0
  126. package/es/components/Tour/Tour.css +4 -0
  127. package/es/components/Tour/Tour.js +214 -0
  128. package/es/components/Tour/Tour.js.map +1 -0
  129. package/es/components/Tour/Tour.styles.js +51 -0
  130. package/es/components/Tour/Tour.styles.js.map +1 -0
  131. package/es/components/Tour/Tour.styles_hmd79i.css +4 -0
  132. package/es/components/Tour/Tour.tokens.js +16 -0
  133. package/es/components/Tour/Tour.tokens.js.map +1 -0
  134. package/es/components/Tour/utils/index.js +117 -0
  135. package/es/components/Tour/utils/index.js.map +1 -0
  136. package/es/components/Tour/variatoins/_size/base.js +5 -0
  137. package/es/components/Tour/variatoins/_size/base.js.map +1 -0
  138. package/es/components/Tour/variatoins/_size/base_x642ct.css +1 -0
  139. package/es/components/Tour/variatoins/_view/base.js +5 -0
  140. package/es/components/Tour/variatoins/_view/base.js.map +1 -0
  141. package/es/components/Tour/variatoins/_view/base_x642ct.css +1 -0
  142. package/es/index.css +8 -1
  143. package/es/index.js +2 -0
  144. package/es/index.js.map +1 -1
  145. package/package.json +5 -5
  146. package/styled-components/cjs/components/Calendar/utils/getDateWithModification.js +2 -2
  147. package/styled-components/cjs/components/TextArea/TextArea.js +7 -3
  148. package/styled-components/cjs/components/TextArea/TextArea.tokens.js +3 -1
  149. package/styled-components/cjs/components/TextArea/variations/_size/base.js +5 -2
  150. package/styled-components/cjs/components/TextField/TextField.js +12 -3
  151. package/styled-components/cjs/components/TextField/TextField.tokens.js +3 -1
  152. package/styled-components/cjs/components/TextField/variations/_size/base.js +3 -1
  153. package/styled-components/cjs/components/Tour/Tour.js +387 -0
  154. package/styled-components/cjs/components/Tour/Tour.styles.js +66 -0
  155. package/styled-components/cjs/components/Tour/Tour.tokens.js +31 -0
  156. package/styled-components/cjs/components/Tour/Tour.types.js +4 -0
  157. package/styled-components/cjs/components/Tour/index.js +26 -0
  158. package/styled-components/cjs/components/Tour/utils/index.js +157 -0
  159. package/styled-components/cjs/components/Tour/variatoins/_size/base.js +14 -0
  160. package/styled-components/cjs/components/Tour/variatoins/_view/base.js +14 -0
  161. package/styled-components/cjs/examples/plasma_b2c/components/Tour/Tour.config.js +33 -0
  162. package/styled-components/cjs/examples/plasma_b2c/components/Tour/Tour.js +15 -0
  163. package/styled-components/cjs/examples/plasma_web/components/Tour/Tour.config.js +33 -0
  164. package/styled-components/cjs/examples/plasma_web/components/Tour/Tour.js +15 -0
  165. package/styled-components/cjs/index.js +1 -0
  166. package/styled-components/es/components/Calendar/utils/getDateWithModification.js +2 -2
  167. package/styled-components/es/components/TextArea/TextArea.js +7 -3
  168. package/styled-components/es/components/TextArea/TextArea.tokens.js +3 -1
  169. package/styled-components/es/components/TextArea/variations/_size/base.js +5 -2
  170. package/styled-components/es/components/TextField/TextField.js +12 -3
  171. package/styled-components/es/components/TextField/TextField.tokens.js +3 -1
  172. package/styled-components/es/components/TextField/variations/_size/base.js +3 -1
  173. package/styled-components/es/components/Tour/Tour.js +328 -0
  174. package/styled-components/es/components/Tour/Tour.styles.js +37 -0
  175. package/styled-components/es/components/Tour/Tour.tokens.js +13 -0
  176. package/styled-components/es/components/Tour/Tour.types.js +1 -0
  177. package/styled-components/es/components/Tour/index.js +2 -0
  178. package/styled-components/es/components/Tour/utils/index.js +127 -0
  179. package/styled-components/es/components/Tour/variatoins/_size/base.js +4 -0
  180. package/styled-components/es/components/Tour/variatoins/_view/base.js +4 -0
  181. package/styled-components/es/examples/plasma_b2c/components/Tour/Tour.config.js +23 -0
  182. package/styled-components/es/examples/plasma_b2c/components/Tour/Tour.js +5 -0
  183. package/styled-components/es/examples/plasma_web/components/Tour/Tour.config.js +23 -0
  184. package/styled-components/es/examples/plasma_web/components/Tour/Tour.js +5 -0
  185. package/styled-components/es/index.js +1 -0
  186. package/types/components/Autocomplete/Autocomplete.d.ts +1 -1
  187. package/types/components/Autocomplete/Autocomplete.types.d.ts +1 -1
  188. package/types/components/Carousel/CarouselNew/Carousel.d.ts +1 -1
  189. package/types/components/Carousel/CarouselOld/Carousel.d.ts +1 -1
  190. package/types/components/Carousel/CarouselOld/Carousel.types.d.ts +1 -1
  191. package/types/components/CodeField/CodeField.d.ts +1 -1
  192. package/types/components/CodeInput/CodeInput.d.ts +1 -1
  193. package/types/components/DatePicker/RangeDate/RangeDate.d.ts +1 -1
  194. package/types/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.d.ts +1 -1
  195. package/types/components/DatePicker/SingleDate/SingleDate.d.ts +2 -2
  196. package/types/components/Drawer/Drawer.d.ts +1 -1
  197. package/types/components/Dropdown/ui/DropdownDivider/DropdownDivider.d.ts +1 -1
  198. package/types/components/Dropdown/ui/DropdownFooter/DropdownFooter.d.ts +1 -1
  199. package/types/components/Dropdown/ui/DropdownGroup/DropdownGroup.d.ts +1 -1
  200. package/types/components/Dropdown/ui/DropdownHeader/DropdownHeader.d.ts +1 -1
  201. package/types/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.d.ts +1 -1
  202. package/types/components/Dropdown/ui/DropdownOld/DropdownOld.d.ts +1 -1
  203. package/types/components/Modal/Modal.d.ts +1 -1
  204. package/types/components/Popup/Popup.d.ts +1 -1
  205. package/types/components/Radiobox/Radiobox.d.ts +2 -2
  206. package/types/components/Segment/ui/SegmentGroup/SegmentGroup.d.ts +1 -1
  207. package/types/components/Segment/ui/SegmentItem/SegmentItem.d.ts +1 -1
  208. package/types/components/Select/Select.d.ts +1 -1
  209. package/types/components/Select/ui/Inner/ui/Item/Item.styles.d.ts +1 -1
  210. package/types/components/Select/ui/Target/ui/Button/Button.styles.d.ts +2 -2
  211. package/types/components/Spinner/Spinner.d.ts +1 -1
  212. package/types/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.d.ts +1 -1
  213. package/types/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.d.ts +1 -1
  214. package/types/components/TextArea/TextArea.d.ts.map +1 -1
  215. package/types/components/TextArea/TextArea.tokens.d.ts +1 -0
  216. package/types/components/TextArea/TextArea.tokens.d.ts.map +1 -1
  217. package/types/components/TextArea/variations/_size/base.d.ts.map +1 -1
  218. package/types/components/TextField/TextField.d.ts +1 -1
  219. package/types/components/TextField/TextField.d.ts.map +1 -1
  220. package/types/components/TextField/TextField.tokens.d.ts +1 -0
  221. package/types/components/TextField/TextField.tokens.d.ts.map +1 -1
  222. package/types/components/TextField/variations/_size/base.d.ts.map +1 -1
  223. package/types/components/Toast/ToastNew/ToastNew.d.ts +1 -1
  224. package/types/components/Tour/Tour.d.ts +23 -0
  225. package/types/components/Tour/Tour.d.ts.map +1 -0
  226. package/types/components/Tour/Tour.styles.d.ts +11 -0
  227. package/types/components/Tour/Tour.styles.d.ts.map +1 -0
  228. package/types/components/Tour/Tour.tokens.d.ts +14 -0
  229. package/types/components/Tour/Tour.tokens.d.ts.map +1 -0
  230. package/types/components/Tour/Tour.types.d.ts +86 -0
  231. package/types/components/Tour/Tour.types.d.ts.map +1 -0
  232. package/types/components/Tour/index.d.ts +4 -0
  233. package/types/components/Tour/index.d.ts.map +1 -0
  234. package/types/components/Tour/utils/index.d.ts +7 -0
  235. package/types/components/Tour/utils/index.d.ts.map +1 -0
  236. package/types/components/Tour/variatoins/_size/base.d.ts +2 -0
  237. package/types/components/Tour/variatoins/_size/base.d.ts.map +1 -0
  238. package/types/components/Tour/variatoins/_view/base.d.ts +2 -0
  239. package/types/components/Tour/variatoins/_view/base.d.ts.map +1 -0
  240. package/types/index.d.ts +1 -0
  241. package/types/index.d.ts.map +1 -1
  242. package/cjs/components/TextField/variations/_size/base_uulqii.css +0 -1
  243. package/es/components/TextField/variations/_size/base_uulqii.css +0 -1
  244. /package/cjs/components/{TextArea/variations → Tour/variatoins}/_size/base_x642ct.css +0 -0
  245. /package/{es/components/TextArea/variations/_size → cjs/components/Tour/variatoins/_view}/base_x642ct.css +0 -0
@@ -0,0 +1,387 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
+ });
10
+ }
11
+ _export(exports, {
12
+ get tourConfig () {
13
+ return tourConfig;
14
+ },
15
+ get tourRoot () {
16
+ return tourRoot;
17
+ }
18
+ });
19
+ var _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
20
+ var _reactdom = require("react-dom");
21
+ var _reactdom1 = require("@floating-ui/react-dom");
22
+ var _utils = require("../../utils");
23
+ var _utils1 = require("./utils");
24
+ var _Tourstyles = require("./Tour.styles");
25
+ var _base = require("./variatoins/_view/base");
26
+ var _base1 = require("./variatoins/_size/base");
27
+ var _Tourtokens = require("./Tour.tokens");
28
+ function _array_like_to_array(arr, len) {
29
+ if (len == null || len > arr.length) len = arr.length;
30
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
31
+ return arr2;
32
+ }
33
+ function _array_with_holes(arr) {
34
+ if (Array.isArray(arr)) return arr;
35
+ }
36
+ function _define_property(obj, key, value) {
37
+ if (key in obj) {
38
+ Object.defineProperty(obj, key, {
39
+ value: value,
40
+ enumerable: true,
41
+ configurable: true,
42
+ writable: true
43
+ });
44
+ } else {
45
+ obj[key] = value;
46
+ }
47
+ return obj;
48
+ }
49
+ function _getRequireWildcardCache(nodeInterop) {
50
+ if (typeof WeakMap !== "function") return null;
51
+ var cacheBabelInterop = new WeakMap();
52
+ var cacheNodeInterop = new WeakMap();
53
+ return (_getRequireWildcardCache = function(nodeInterop) {
54
+ return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
55
+ })(nodeInterop);
56
+ }
57
+ function _interop_require_wildcard(obj, nodeInterop) {
58
+ if (!nodeInterop && obj && obj.__esModule) {
59
+ return obj;
60
+ }
61
+ if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
62
+ return {
63
+ default: obj
64
+ };
65
+ }
66
+ var cache = _getRequireWildcardCache(nodeInterop);
67
+ if (cache && cache.has(obj)) {
68
+ return cache.get(obj);
69
+ }
70
+ var newObj = {
71
+ __proto__: null
72
+ };
73
+ var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
74
+ for(var key in obj){
75
+ if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
76
+ var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
77
+ if (desc && (desc.get || desc.set)) {
78
+ Object.defineProperty(newObj, key, desc);
79
+ } else {
80
+ newObj[key] = obj[key];
81
+ }
82
+ }
83
+ }
84
+ newObj.default = obj;
85
+ if (cache) {
86
+ cache.set(obj, newObj);
87
+ }
88
+ return newObj;
89
+ }
90
+ function _iterable_to_array_limit(arr, i) {
91
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
92
+ if (_i == null) return;
93
+ var _arr = [];
94
+ var _n = true;
95
+ var _d = false;
96
+ var _s, _e;
97
+ try {
98
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
99
+ _arr.push(_s.value);
100
+ if (i && _arr.length === i) break;
101
+ }
102
+ } catch (err) {
103
+ _d = true;
104
+ _e = err;
105
+ } finally{
106
+ try {
107
+ if (!_n && _i["return"] != null) _i["return"]();
108
+ } finally{
109
+ if (_d) throw _e;
110
+ }
111
+ }
112
+ return _arr;
113
+ }
114
+ function _non_iterable_rest() {
115
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
116
+ }
117
+ function _object_spread(target) {
118
+ for(var i = 1; i < arguments.length; i++){
119
+ var source = arguments[i] != null ? arguments[i] : {};
120
+ var ownKeys = Object.keys(source);
121
+ if (typeof Object.getOwnPropertySymbols === "function") {
122
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
123
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
124
+ }));
125
+ }
126
+ ownKeys.forEach(function(key) {
127
+ _define_property(target, key, source[key]);
128
+ });
129
+ }
130
+ return target;
131
+ }
132
+ function ownKeys(object, enumerableOnly) {
133
+ var keys = Object.keys(object);
134
+ if (Object.getOwnPropertySymbols) {
135
+ var symbols = Object.getOwnPropertySymbols(object);
136
+ if (enumerableOnly) {
137
+ symbols = symbols.filter(function(sym) {
138
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
139
+ });
140
+ }
141
+ keys.push.apply(keys, symbols);
142
+ }
143
+ return keys;
144
+ }
145
+ function _object_spread_props(target, source) {
146
+ source = source != null ? source : {};
147
+ if (Object.getOwnPropertyDescriptors) {
148
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
149
+ } else {
150
+ ownKeys(Object(source)).forEach(function(key) {
151
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
152
+ });
153
+ }
154
+ return target;
155
+ }
156
+ function _object_without_properties(source, excluded) {
157
+ if (source == null) return {};
158
+ var target = _object_without_properties_loose(source, excluded);
159
+ var key, i;
160
+ if (Object.getOwnPropertySymbols) {
161
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
162
+ for(i = 0; i < sourceSymbolKeys.length; i++){
163
+ key = sourceSymbolKeys[i];
164
+ if (excluded.indexOf(key) >= 0) continue;
165
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
166
+ target[key] = source[key];
167
+ }
168
+ }
169
+ return target;
170
+ }
171
+ function _object_without_properties_loose(source, excluded) {
172
+ if (source == null) return {};
173
+ var target = {};
174
+ var sourceKeys = Object.keys(source);
175
+ var key, i;
176
+ for(i = 0; i < sourceKeys.length; i++){
177
+ key = sourceKeys[i];
178
+ if (excluded.indexOf(key) >= 0) continue;
179
+ target[key] = source[key];
180
+ }
181
+ return target;
182
+ }
183
+ function _sliced_to_array(arr, i) {
184
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
185
+ }
186
+ function _unsupported_iterable_to_array(o, minLen) {
187
+ if (!o) return;
188
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
189
+ var n = Object.prototype.toString.call(o).slice(8, -1);
190
+ if (n === "Object" && o.constructor) n = o.constructor.name;
191
+ if (n === "Map" || n === "Set") return Array.from(n);
192
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
193
+ }
194
+ var tourRoot = function(Root) {
195
+ return /*#__PURE__*/ (0, _react.forwardRef)(function(_param, outerRef) {
196
+ var steps = _param.steps, current = _param.current, _param_defaultCurrent = _param.defaultCurrent, defaultCurrent = _param_defaultCurrent === void 0 ? 0 : _param_defaultCurrent, open = _param.open, _param_defaultOpen = _param.defaultOpen, defaultOpen = _param_defaultOpen === void 0 ? false : _param_defaultOpen, onClose = _param.onClose, _param_withOverlay = _param.withOverlay, withOverlay = _param_withOverlay === void 0 ? true : _param_withOverlay, overlayColor = _param.overlayColor, _param_zIndex = _param.zIndex, zIndex = _param_zIndex === void 0 ? 9000 : _param_zIndex, view = _param.view, size = _param.size, tmp = _param.offset, offsetProp = tmp === void 0 ? [
197
+ 12,
198
+ 12
199
+ ] : tmp, _param_highlightOffset = _param.highlightOffset, highlightOffset = _param_highlightOffset === void 0 ? 4 : _param_highlightOffset, renderStep = _param.renderStep, rest = _object_without_properties(_param, [
200
+ "steps",
201
+ "current",
202
+ "defaultCurrent",
203
+ "open",
204
+ "defaultOpen",
205
+ "onClose",
206
+ "withOverlay",
207
+ "overlayColor",
208
+ "zIndex",
209
+ "view",
210
+ "size",
211
+ "offset",
212
+ "highlightOffset",
213
+ "renderStep"
214
+ ]);
215
+ var TOUR_PORTAL_ID = "plasma-tour-portal-".concat(Date.now());
216
+ var isCurrentControlled = typeof current === 'number';
217
+ var isOpenControlled = typeof open === 'boolean';
218
+ var _useState = _sliced_to_array((0, _react.useState)(defaultCurrent), 2), innerCurrent = _useState[0], setInnerCurrent = _useState[1];
219
+ var _useState1 = _sliced_to_array((0, _react.useState)(defaultOpen), 2), innerOpen = _useState1[0], setInnerOpen = _useState1[1];
220
+ var _useState2 = _sliced_to_array((0, _react.useState)(null), 2), highlightRect = _useState2[0], setHighlightRect = _useState2[1];
221
+ var _useState3 = _sliced_to_array((0, _react.useState)(null), 2), highlightBorderRadius = _useState3[0], setHighlightBorderRadius = _useState3[1];
222
+ var _useState4 = _sliced_to_array((0, _react.useState)(null), 2), targetElement = _useState4[0], setTargetElement = _useState4[1];
223
+ var portalRef = (0, _react.useRef)(null);
224
+ var active = isCurrentControlled ? current : innerCurrent;
225
+ var isOpen = isOpenControlled ? open : innerOpen;
226
+ var currentStep = steps[active];
227
+ var rawPlacement = currentStep === null || currentStep === void 0 ? void 0 : currentStep.placement;
228
+ var placement = (Array.isArray(rawPlacement) ? rawPlacement[0] : rawPlacement) || 'bottom';
229
+ var middleware = [
230
+ (0, _reactdom1.offset)(offsetProp[0]),
231
+ (0, _reactdom1.flip)({
232
+ fallbackPlacements: Array.isArray(currentStep === null || currentStep === void 0 ? void 0 : currentStep.placement) ? currentStep.placement : undefined
233
+ }),
234
+ (0, _reactdom1.shift)({
235
+ padding: offsetProp[1]
236
+ })
237
+ ];
238
+ var _useFloating = (0, _reactdom1.useFloating)({
239
+ placement: placement,
240
+ middleware: middleware,
241
+ whileElementsMounted: _reactdom1.autoUpdate
242
+ }), refs = _useFloating.refs, floatingStyles = _useFloating.floatingStyles, calculatedPlacement = _useFloating.placement;
243
+ var handleSetOpen = function(value) {
244
+ if (!isOpenControlled) {
245
+ setInnerOpen(value);
246
+ }
247
+ if (!value) {
248
+ onClose === null || onClose === void 0 ? void 0 : onClose();
249
+ setInnerCurrent(0);
250
+ setHighlightRect(null);
251
+ setTargetElement(null);
252
+ }
253
+ };
254
+ var handleClose = function() {
255
+ handleSetOpen(false);
256
+ };
257
+ var updateHighlight = function() {
258
+ if (!isOpen || !currentStep) {
259
+ return;
260
+ }
261
+ var rootItem = (0, _utils1.findRootElement)(currentStep.target);
262
+ var highlightElement = (0, _utils1.getHTMLElement)(rootItem);
263
+ if (highlightElement) {
264
+ var rect = highlightElement.getBoundingClientRect();
265
+ setHighlightRect(rect);
266
+ setTargetElement(highlightElement);
267
+ var _currentStep_borderRadius;
268
+ var borderRadius = currentStep.borderRadius === 'auto' || currentStep.borderRadius === undefined || currentStep.borderRadius === null ? (0, _utils1.getIncreasedRadius)(rootItem, highlightOffset) : (_currentStep_borderRadius = currentStep === null || currentStep === void 0 ? void 0 : currentStep.borderRadius) !== null && _currentStep_borderRadius !== void 0 ? _currentStep_borderRadius : '0px';
269
+ setHighlightBorderRadius(borderRadius);
270
+ } else {
271
+ setHighlightRect(null);
272
+ setTargetElement(null);
273
+ }
274
+ };
275
+ (0, _react.useEffect)(function() {
276
+ refs.setReference(targetElement);
277
+ }, [
278
+ refs,
279
+ targetElement
280
+ ]);
281
+ (0, _react.useEffect)(function() {
282
+ if (!_utils.canUseDOM) {
283
+ return;
284
+ }
285
+ var portal = document.getElementById(TOUR_PORTAL_ID);
286
+ if (!portal) {
287
+ portal = document.createElement('div');
288
+ portal.setAttribute('id', TOUR_PORTAL_ID);
289
+ document.body.appendChild(portal);
290
+ }
291
+ portalRef.current = portal;
292
+ return function() {
293
+ if (portal) {
294
+ portal.remove();
295
+ }
296
+ };
297
+ }, []);
298
+ (0, _react.useEffect)(function() {
299
+ updateHighlight();
300
+ window.addEventListener('resize', updateHighlight);
301
+ window.addEventListener('scroll', updateHighlight, true);
302
+ return function() {
303
+ window.removeEventListener('resize', updateHighlight);
304
+ window.removeEventListener('scroll', updateHighlight, true);
305
+ };
306
+ }, [
307
+ currentStep
308
+ ]);
309
+ (0, _react.useEffect)(function() {
310
+ if (isOpen && targetElement) {
311
+ targetElement.scrollIntoView({
312
+ block: 'center',
313
+ inline: 'center',
314
+ behavior: 'smooth'
315
+ });
316
+ }
317
+ }, [
318
+ isOpen,
319
+ active,
320
+ targetElement
321
+ ]);
322
+ (0, _react.useEffect)(function() {
323
+ var handleKeyDown = function(e) {
324
+ if (e.key === 'Escape') {
325
+ handleClose();
326
+ }
327
+ };
328
+ if (isOpen) {
329
+ window.addEventListener('keydown', handleKeyDown);
330
+ }
331
+ return function() {
332
+ window.removeEventListener('keydown', handleKeyDown);
333
+ };
334
+ }, [
335
+ isOpen,
336
+ handleClose
337
+ ]);
338
+ if (!currentStep || !_utils.canUseDOM || !portalRef.current) {
339
+ return null;
340
+ }
341
+ var _highlightRect_left, _highlightRect_top, _highlightRect_width, _highlightRect_height;
342
+ var tourContent = /*#__PURE__*/ _react.default.createElement(Root, _object_spread({
343
+ renderStep: renderStep,
344
+ steps: steps,
345
+ ref: outerRef,
346
+ view: view,
347
+ size: size
348
+ }, rest), isOpen && withOverlay && /*#__PURE__*/ _react.default.createElement(_Tourstyles.MaskContainer, {
349
+ className: _Tourtokens.classes.mask,
350
+ zIndex: zIndex
351
+ }, /*#__PURE__*/ _react.default.createElement(_Tourstyles.Mask, null), Boolean(highlightRect) && /*#__PURE__*/ _react.default.createElement(_Tourstyles.Highlight, {
352
+ overlayColor: overlayColor,
353
+ borderRadius: highlightBorderRadius,
354
+ style: {
355
+ left: ((_highlightRect_left = highlightRect === null || highlightRect === void 0 ? void 0 : highlightRect.left) !== null && _highlightRect_left !== void 0 ? _highlightRect_left : 0) - highlightOffset,
356
+ top: ((_highlightRect_top = highlightRect === null || highlightRect === void 0 ? void 0 : highlightRect.top) !== null && _highlightRect_top !== void 0 ? _highlightRect_top : 0) - highlightOffset,
357
+ width: ((_highlightRect_width = highlightRect === null || highlightRect === void 0 ? void 0 : highlightRect.width) !== null && _highlightRect_width !== void 0 ? _highlightRect_width : 0) + highlightOffset * 2,
358
+ height: ((_highlightRect_height = highlightRect === null || highlightRect === void 0 ? void 0 : highlightRect.height) !== null && _highlightRect_height !== void 0 ? _highlightRect_height : 0) + highlightOffset * 2
359
+ }
360
+ })), isOpen && Boolean(targetElement) && /*#__PURE__*/ _react.default.createElement(_Tourstyles.TourPortal, {
361
+ ref: refs.setFloating,
362
+ style: _object_spread_props(_object_spread({}, floatingStyles), {
363
+ zIndex: Number(zIndex)
364
+ }),
365
+ "data-placement": calculatedPlacement
366
+ }, renderStep && renderStep(active, steps.length, active === steps.length - 1, steps[active])));
367
+ return /*#__PURE__*/ (0, _reactdom.createPortal)(tourContent, portalRef.current);
368
+ });
369
+ };
370
+ var tourConfig = {
371
+ name: 'Tour',
372
+ tag: 'div',
373
+ layout: tourRoot,
374
+ base: '',
375
+ variations: {
376
+ view: {
377
+ css: _base.base
378
+ },
379
+ size: {
380
+ css: _base1.base
381
+ }
382
+ },
383
+ defaults: {
384
+ view: 'default',
385
+ size: 'm'
386
+ }
387
+ };
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
+ });
10
+ }
11
+ _export(exports, {
12
+ get Highlight () {
13
+ return Highlight;
14
+ },
15
+ get Mask () {
16
+ return Mask;
17
+ },
18
+ get MaskContainer () {
19
+ return MaskContainer;
20
+ },
21
+ get TourPortal () {
22
+ return TourPortal;
23
+ }
24
+ });
25
+ var _styled = /*#__PURE__*/ _interop_require_default(require("@emotion/styled"));
26
+ function _interop_require_default(obj) {
27
+ return obj && obj.__esModule ? obj : {
28
+ default: obj
29
+ };
30
+ }
31
+ var MaskContainer = (0, /*#__PURE__*/ _styled.default)("div", {
32
+ target: "e21u2800",
33
+ label: "MaskContainer"
34
+ })("z-index:", function(param) {
35
+ var zIndex = param.zIndex;
36
+ return zIndex || 9000;
37
+ }, ";", "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3JjLWVtb3Rpb24vY29tcG9uZW50cy9Ub3VyL1RvdXIuc3R5bGVzLnRzeCIsInNvdXJjZXMiOlsic3JjLWVtb3Rpb24vY29tcG9uZW50cy9Ub3VyL1RvdXIuc3R5bGVzLnRzeCJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBDU1NQcm9wZXJ0aWVzIH0gZnJvbSAncmVhY3QnO1xuXG5leHBvcnQgY29uc3QgTWFza0NvbnRhaW5lciA9IHN0eWxlZC5kaXY8eyB6SW5kZXg6IENTU1Byb3BlcnRpZXNbJ3pJbmRleCddIH0+YFxuICAgIHotaW5kZXg6ICR7KHsgekluZGV4IH0pID0+IHpJbmRleCB8fCA5MDAwfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBNYXNrID0gc3R5bGVkLmRpdmBcbiAgICBwb3NpdGlvbjogZml4ZWQ7XG4gICAgaW5zZXQ6IDA7XG4gICAgcG9pbnRlci1ldmVudHM6IGFsbDtcbmA7XG5cbmV4cG9ydCBjb25zdCBIaWdobGlnaHQgPSBzdHlsZWQuZGl2PHtcbiAgICBvdmVybGF5Q29sb3I/OiBDU1NQcm9wZXJ0aWVzWydjb2xvciddO1xuICAgIGJvcmRlclJhZGl1cz86IENTU1Byb3BlcnRpZXNbJ2JvcmRlclJhZGl1cyddIHwgbnVsbDtcbn0+YFxuICAgIC0tcHJpdmF0ZS1tYXNrLWNvbG9yOiAkeyh7IG92ZXJsYXlDb2xvciB9KSA9PiBgJHtvdmVybGF5Q29sb3IgfHwgJ3JnYmEoMCwgMCwgMCwgMC40NSknfWB9O1xuICAgIHBvc2l0aW9uOiBmaXhlZDtcbiAgICBiYWNrZ3JvdW5kOiB0cmFuc3BhcmVudDtcbiAgICBib3JkZXItcmFkaXVzOiAkeyh7IGJvcmRlclJhZGl1cyB9KSA9PiBib3JkZXJSYWRpdXMgPz8gMH07XG4gICAgYm94LXNoYWRvdzogMCAwIDAgOTk5OXB4IHZhcigtLXByaXZhdGUtbWFzay1jb2xvcik7XG4gICAgcG9pbnRlci1ldmVudHM6IG5vbmU7XG4gICAgdHJhbnNpdGlvbjogYWxsIDAuM3MgY3ViaWMtYmV6aWVyKDAuNCwgMCwgMC4yLCAxKTtcbmA7XG5cbmV4cG9ydCBjb25zdCBUb3VyUG9ydGFsID0gc3R5bGVkLmRpdmBcbiAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG5gO1xuIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUc2QiJ9 */");
38
+ var Mask = (0, /*#__PURE__*/ _styled.default)("div", {
39
+ target: "e21u2801",
40
+ label: "Mask"
41
+ })("position:fixed;inset:0;pointer-events:all;", "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3JjLWVtb3Rpb24vY29tcG9uZW50cy9Ub3VyL1RvdXIuc3R5bGVzLnRzeCIsInNvdXJjZXMiOlsic3JjLWVtb3Rpb24vY29tcG9uZW50cy9Ub3VyL1RvdXIuc3R5bGVzLnRzeCJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBDU1NQcm9wZXJ0aWVzIH0gZnJvbSAncmVhY3QnO1xuXG5leHBvcnQgY29uc3QgTWFza0NvbnRhaW5lciA9IHN0eWxlZC5kaXY8eyB6SW5kZXg6IENTU1Byb3BlcnRpZXNbJ3pJbmRleCddIH0+YFxuICAgIHotaW5kZXg6ICR7KHsgekluZGV4IH0pID0+IHpJbmRleCB8fCA5MDAwfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBNYXNrID0gc3R5bGVkLmRpdmBcbiAgICBwb3NpdGlvbjogZml4ZWQ7XG4gICAgaW5zZXQ6IDA7XG4gICAgcG9pbnRlci1ldmVudHM6IGFsbDtcbmA7XG5cbmV4cG9ydCBjb25zdCBIaWdobGlnaHQgPSBzdHlsZWQuZGl2PHtcbiAgICBvdmVybGF5Q29sb3I/OiBDU1NQcm9wZXJ0aWVzWydjb2xvciddO1xuICAgIGJvcmRlclJhZGl1cz86IENTU1Byb3BlcnRpZXNbJ2JvcmRlclJhZGl1cyddIHwgbnVsbDtcbn0+YFxuICAgIC0tcHJpdmF0ZS1tYXNrLWNvbG9yOiAkeyh7IG92ZXJsYXlDb2xvciB9KSA9PiBgJHtvdmVybGF5Q29sb3IgfHwgJ3JnYmEoMCwgMCwgMCwgMC40NSknfWB9O1xuICAgIHBvc2l0aW9uOiBmaXhlZDtcbiAgICBiYWNrZ3JvdW5kOiB0cmFuc3BhcmVudDtcbiAgICBib3JkZXItcmFkaXVzOiAkeyh7IGJvcmRlclJhZGl1cyB9KSA9PiBib3JkZXJSYWRpdXMgPz8gMH07XG4gICAgYm94LXNoYWRvdzogMCAwIDAgOTk5OXB4IHZhcigtLXByaXZhdGUtbWFzay1jb2xvcik7XG4gICAgcG9pbnRlci1ldmVudHM6IG5vbmU7XG4gICAgdHJhbnNpdGlvbjogYWxsIDAuM3MgY3ViaWMtYmV6aWVyKDAuNCwgMCwgMC4yLCAxKTtcbmA7XG5cbmV4cG9ydCBjb25zdCBUb3VyUG9ydGFsID0gc3R5bGVkLmRpdmBcbiAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG5gO1xuIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQU9vQiJ9 */");
42
+ var Highlight = (0, /*#__PURE__*/ _styled.default)("div", {
43
+ target: "e21u2802",
44
+ label: "Highlight"
45
+ })("--private-mask-color:", function(param) {
46
+ var overlayColor = param.overlayColor;
47
+ return "".concat(overlayColor || 'rgba(0, 0, 0, 0.45)');
48
+ }, ";position:fixed;background:transparent;border-radius:", function(param) {
49
+ var borderRadius = param.borderRadius;
50
+ return borderRadius !== null && borderRadius !== void 0 ? borderRadius : 0;
51
+ }, ";box-shadow:0 0 0 9999px var(--private-mask-color);pointer-events:none;transition:all 0.3s cubic-bezier(0.4,0,0.2,1);", "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3JjLWVtb3Rpb24vY29tcG9uZW50cy9Ub3VyL1RvdXIuc3R5bGVzLnRzeCIsInNvdXJjZXMiOlsic3JjLWVtb3Rpb24vY29tcG9uZW50cy9Ub3VyL1RvdXIuc3R5bGVzLnRzeCJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBDU1NQcm9wZXJ0aWVzIH0gZnJvbSAncmVhY3QnO1xuXG5leHBvcnQgY29uc3QgTWFza0NvbnRhaW5lciA9IHN0eWxlZC5kaXY8eyB6SW5kZXg6IENTU1Byb3BlcnRpZXNbJ3pJbmRleCddIH0+YFxuICAgIHotaW5kZXg6ICR7KHsgekluZGV4IH0pID0+IHpJbmRleCB8fCA5MDAwfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBNYXNrID0gc3R5bGVkLmRpdmBcbiAgICBwb3NpdGlvbjogZml4ZWQ7XG4gICAgaW5zZXQ6IDA7XG4gICAgcG9pbnRlci1ldmVudHM6IGFsbDtcbmA7XG5cbmV4cG9ydCBjb25zdCBIaWdobGlnaHQgPSBzdHlsZWQuZGl2PHtcbiAgICBvdmVybGF5Q29sb3I/OiBDU1NQcm9wZXJ0aWVzWydjb2xvciddO1xuICAgIGJvcmRlclJhZGl1cz86IENTU1Byb3BlcnRpZXNbJ2JvcmRlclJhZGl1cyddIHwgbnVsbDtcbn0+YFxuICAgIC0tcHJpdmF0ZS1tYXNrLWNvbG9yOiAkeyh7IG92ZXJsYXlDb2xvciB9KSA9PiBgJHtvdmVybGF5Q29sb3IgfHwgJ3JnYmEoMCwgMCwgMCwgMC40NSknfWB9O1xuICAgIHBvc2l0aW9uOiBmaXhlZDtcbiAgICBiYWNrZ3JvdW5kOiB0cmFuc3BhcmVudDtcbiAgICBib3JkZXItcmFkaXVzOiAkeyh7IGJvcmRlclJhZGl1cyB9KSA9PiBib3JkZXJSYWRpdXMgPz8gMH07XG4gICAgYm94LXNoYWRvdzogMCAwIDAgOTk5OXB4IHZhcigtLXByaXZhdGUtbWFzay1jb2xvcik7XG4gICAgcG9pbnRlci1ldmVudHM6IG5vbmU7XG4gICAgdHJhbnNpdGlvbjogYWxsIDAuM3MgY3ViaWMtYmV6aWVyKDAuNCwgMCwgMC4yLCAxKTtcbmA7XG5cbmV4cG9ydCBjb25zdCBUb3VyUG9ydGFsID0gc3R5bGVkLmRpdmBcbiAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG5gO1xuIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWF5QiJ9 */");
52
+ var TourPortal = (0, /*#__PURE__*/ _styled.default)("div", {
53
+ target: "e21u2803",
54
+ label: "TourPortal"
55
+ })("position:absolute;", "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3JjLWVtb3Rpb24vY29tcG9uZW50cy9Ub3VyL1RvdXIuc3R5bGVzLnRzeCIsInNvdXJjZXMiOlsic3JjLWVtb3Rpb24vY29tcG9uZW50cy9Ub3VyL1RvdXIuc3R5bGVzLnRzeCJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBDU1NQcm9wZXJ0aWVzIH0gZnJvbSAncmVhY3QnO1xuXG5leHBvcnQgY29uc3QgTWFza0NvbnRhaW5lciA9IHN0eWxlZC5kaXY8eyB6SW5kZXg6IENTU1Byb3BlcnRpZXNbJ3pJbmRleCddIH0+YFxuICAgIHotaW5kZXg6ICR7KHsgekluZGV4IH0pID0+IHpJbmRleCB8fCA5MDAwfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBNYXNrID0gc3R5bGVkLmRpdmBcbiAgICBwb3NpdGlvbjogZml4ZWQ7XG4gICAgaW5zZXQ6IDA7XG4gICAgcG9pbnRlci1ldmVudHM6IGFsbDtcbmA7XG5cbmV4cG9ydCBjb25zdCBIaWdobGlnaHQgPSBzdHlsZWQuZGl2PHtcbiAgICBvdmVybGF5Q29sb3I/OiBDU1NQcm9wZXJ0aWVzWydjb2xvciddO1xuICAgIGJvcmRlclJhZGl1cz86IENTU1Byb3BlcnRpZXNbJ2JvcmRlclJhZGl1cyddIHwgbnVsbDtcbn0+YFxuICAgIC0tcHJpdmF0ZS1tYXNrLWNvbG9yOiAkeyh7IG92ZXJsYXlDb2xvciB9KSA9PiBgJHtvdmVybGF5Q29sb3IgfHwgJ3JnYmEoMCwgMCwgMCwgMC40NSknfWB9O1xuICAgIHBvc2l0aW9uOiBmaXhlZDtcbiAgICBiYWNrZ3JvdW5kOiB0cmFuc3BhcmVudDtcbiAgICBib3JkZXItcmFkaXVzOiAkeyh7IGJvcmRlclJhZGl1cyB9KSA9PiBib3JkZXJSYWRpdXMgPz8gMH07XG4gICAgYm94LXNoYWRvdzogMCAwIDAgOTk5OXB4IHZhcigtLXByaXZhdGUtbWFzay1jb2xvcik7XG4gICAgcG9pbnRlci1ldmVudHM6IG5vbmU7XG4gICAgdHJhbnNpdGlvbjogYWxsIDAuM3MgY3ViaWMtYmV6aWVyKDAuNCwgMCwgMC4yLCAxKTtcbmA7XG5cbmV4cG9ydCBjb25zdCBUb3VyUG9ydGFsID0gc3R5bGVkLmRpdmBcbiAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG5gO1xuIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTBCMEIifQ== */");
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
+ });
10
+ }
11
+ _export(exports, {
12
+ get classes () {
13
+ return classes;
14
+ },
15
+ get tokens () {
16
+ return tokens;
17
+ }
18
+ });
19
+ var classes = {
20
+ mask: 'tour-mask'
21
+ };
22
+ var tokens = {
23
+ cardPadding: '--plasma-tour-card-padding',
24
+ cardRadius: '--plasma-tour-card-radius',
25
+ cardBgColor: '--plasma-tour-card-bg',
26
+ cardShadow: '--plasma-tour-card-shadow',
27
+ maskBgColor: '--plasma-tour-mask-bg',
28
+ titleColor: '--plasma-tour-title-color',
29
+ descriptionColor: '--plasma-tour-description-color',
30
+ highlightRadius: '--plasma-tour-highlight-radius'
31
+ };
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
+ });
10
+ }
11
+ _export(exports, {
12
+ get tourClasses () {
13
+ return _Tourtokens.classes;
14
+ },
15
+ get tourConfig () {
16
+ return _Tour.tourConfig;
17
+ },
18
+ get tourRoot () {
19
+ return _Tour.tourRoot;
20
+ },
21
+ get tourTokens () {
22
+ return _Tourtokens.tokens;
23
+ }
24
+ });
25
+ var _Tour = require("./Tour");
26
+ var _Tourtokens = require("./Tour.tokens");
@@ -0,0 +1,157 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
+ });
10
+ }
11
+ _export(exports, {
12
+ get ROOT_COMPONENT () {
13
+ return ROOT_COMPONENT;
14
+ },
15
+ get TOUR_BORDER_RADIUS_TOKEN () {
16
+ return TOUR_BORDER_RADIUS_TOKEN;
17
+ },
18
+ get TOUR_FINDER_MARK () {
19
+ return TOUR_FINDER_MARK;
20
+ },
21
+ get findRootElement () {
22
+ return findRootElement;
23
+ },
24
+ get getHTMLElement () {
25
+ return getHTMLElement;
26
+ },
27
+ get getIncreasedRadius () {
28
+ return getIncreasedRadius;
29
+ }
30
+ });
31
+ var _utils = require("../../../utils");
32
+ var TOUR_FINDER_MARK = 'data-tour';
33
+ var ROOT_COMPONENT = 'data-root';
34
+ var TOUR_BORDER_RADIUS_TOKEN = '--plasma-tour__border-radius';
35
+ var getHTMLElement = function(target) {
36
+ if (!target || !_utils.canUseDOM) {
37
+ return null;
38
+ }
39
+ if (typeof target === 'string') {
40
+ return document.querySelector(target);
41
+ }
42
+ if ('current' in target) {
43
+ return target.current;
44
+ }
45
+ return target;
46
+ };
47
+ var getIncreasedRadius = function(ref, offset) {
48
+ if (!ref.current) {
49
+ return '';
50
+ }
51
+ var element = ref.current;
52
+ var computedStyle = getComputedStyle(element);
53
+ var borderRadiusComponent = computedStyle.getPropertyValue(TOUR_BORDER_RADIUS_TOKEN);
54
+ var currentRadius = computedStyle.borderRadius !== undefined && computedStyle.borderRadius !== null && computedStyle.borderRadius !== '0px' ? computedStyle.borderRadius : borderRadiusComponent;
55
+ var parseValue = function(value, context) {
56
+ var num = parseFloat(value);
57
+ if (Number.isNaN(num)) return 0;
58
+ if (value.endsWith('px')) return num;
59
+ if (value.endsWith('%')) return num / 100 * context.width;
60
+ if (value.endsWith('em')) return num * parseFloat(computedStyle.fontSize);
61
+ if (value.endsWith('rem')) {
62
+ return num * parseFloat(getComputedStyle(document.documentElement).fontSize);
63
+ }
64
+ if (value.endsWith('vw')) return num / 100 * window.innerWidth;
65
+ if (value.endsWith('vh')) return num / 100 * window.innerHeight;
66
+ if (value.endsWith('vmin')) return num / 100 * Math.min(window.innerWidth, window.innerHeight);
67
+ if (value.endsWith('vmax')) return num / 100 * Math.max(window.innerWidth, window.innerHeight);
68
+ return num;
69
+ };
70
+ var context = {
71
+ width: element.offsetWidth,
72
+ height: element.offsetHeight
73
+ };
74
+ var parseRadius = function(radius) {
75
+ var parts = radius.split('/').map(function(part) {
76
+ return part.trim();
77
+ });
78
+ var horizontal = parts[0].split(/\s+/).map(function(val) {
79
+ return parseValue(val, context);
80
+ });
81
+ var normalize = function(values) {
82
+ if (values.length === 1) return [
83
+ values[0],
84
+ values[0],
85
+ values[0],
86
+ values[0]
87
+ ];
88
+ if (values.length === 2) return [
89
+ values[0],
90
+ values[1],
91
+ values[0],
92
+ values[1]
93
+ ];
94
+ if (values.length === 3) return [
95
+ values[0],
96
+ values[1],
97
+ values[2],
98
+ values[1]
99
+ ];
100
+ return values.slice(0, 4);
101
+ };
102
+ return {
103
+ horizontal: normalize(horizontal),
104
+ vertical: parts[1] ? normalize(parts[1].split(/\s+/).map(function(val) {
105
+ return parseValue(val, context);
106
+ })) : normalize(horizontal)
107
+ };
108
+ };
109
+ try {
110
+ var parsed = parseRadius(currentRadius);
111
+ var newHorizontal = parsed.horizontal.map(function(val) {
112
+ return val !== 0 ? Math.max(0, val + offset) : 0;
113
+ });
114
+ var newVertical = parsed.vertical.map(function(val) {
115
+ return val !== 0 ? Math.max(0, val + offset) : 0;
116
+ });
117
+ var format = function(values) {
118
+ return values.map(function(v) {
119
+ return "".concat(v, "px");
120
+ }).join(' ');
121
+ };
122
+ var horizontalStr = format(newHorizontal);
123
+ var verticalStr = format(newVertical);
124
+ return horizontalStr === verticalStr ? horizontalStr : "".concat(horizontalStr, " / ").concat(verticalStr);
125
+ } catch (error) {
126
+ return '';
127
+ }
128
+ };
129
+ var findRootElement = function(ref) {
130
+ if (!ref.current) {
131
+ return '';
132
+ }
133
+ var currentElement = ref.current;
134
+ if (!(currentElement === null || currentElement === void 0 ? void 0 : currentElement.hasAttribute(TOUR_FINDER_MARK))) {
135
+ return {
136
+ current: currentElement
137
+ };
138
+ }
139
+ while(currentElement !== null && currentElement !== document.documentElement){
140
+ if (currentElement.hasAttribute(ROOT_COMPONENT)) {
141
+ return {
142
+ current: currentElement
143
+ };
144
+ }
145
+ var parent = currentElement.parentElement;
146
+ if (parent === null) {
147
+ break;
148
+ }
149
+ currentElement = parent;
150
+ }
151
+ if (currentElement === null || currentElement === void 0 ? void 0 : currentElement.hasAttribute(ROOT_COMPONENT)) {
152
+ return {
153
+ current: currentElement
154
+ };
155
+ }
156
+ return ref;
157
+ };
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "base", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return base;
9
+ }
10
+ });
11
+ var _react = require("@emotion/react");
12
+ var base = (0, /*#__PURE__*/ _react.css)("base", "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3JjLWVtb3Rpb24vY29tcG9uZW50cy9Ub3VyL3ZhcmlhdG9pbnMvX3NpemUvYmFzZS50cyIsInNvdXJjZXMiOlsic3JjLWVtb3Rpb24vY29tcG9uZW50cy9Ub3VyL3ZhcmlhdG9pbnMvX3NpemUvYmFzZS50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmV4cG9ydCBjb25zdCBiYXNlID0gY3NzYGA7XG4iXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRW9CIn0= */");