@makeswift/runtime 0.0.21 → 0.1.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 (196) hide show
  1. package/dist/Box.cjs.js +502 -0
  2. package/dist/Box.cjs.js.map +1 -0
  3. package/dist/Box.es.js +496 -0
  4. package/dist/Box.es.js.map +1 -0
  5. package/dist/Button.cjs.js +308 -0
  6. package/dist/Button.cjs.js.map +1 -0
  7. package/dist/Button.es.js +301 -0
  8. package/dist/Button.es.js.map +1 -0
  9. package/dist/Carousel.cjs.js +487 -0
  10. package/dist/Carousel.cjs.js.map +1 -0
  11. package/dist/Carousel.es.js +481 -0
  12. package/dist/Carousel.es.js.map +1 -0
  13. package/dist/Countdown.cjs.js +340 -0
  14. package/dist/Countdown.cjs.js.map +1 -0
  15. package/dist/Countdown.es.js +334 -0
  16. package/dist/Countdown.es.js.map +1 -0
  17. package/dist/Divider.cjs.js +115 -0
  18. package/dist/Divider.cjs.js.map +1 -0
  19. package/dist/Divider.es.js +109 -0
  20. package/dist/Divider.es.js.map +1 -0
  21. package/dist/Embed.cjs.js +129 -0
  22. package/dist/Embed.cjs.js.map +1 -0
  23. package/dist/Embed.es.js +123 -0
  24. package/dist/Embed.es.js.map +1 -0
  25. package/dist/Form.cjs.js +1705 -0
  26. package/dist/Form.cjs.js.map +1 -0
  27. package/dist/Form.es.js +1677 -0
  28. package/dist/Form.es.js.map +1 -0
  29. package/dist/Image.cjs2.js +148 -0
  30. package/dist/Image.cjs2.js.map +1 -0
  31. package/dist/Image.es2.js +141 -0
  32. package/dist/Image.es2.js.map +1 -0
  33. package/dist/Navigation.cjs.js +736 -0
  34. package/dist/Navigation.cjs.js.map +1 -0
  35. package/dist/Navigation.es.js +710 -0
  36. package/dist/Navigation.es.js.map +1 -0
  37. package/dist/Root.cjs.js +143 -0
  38. package/dist/Root.cjs.js.map +1 -0
  39. package/dist/Root.es.js +137 -0
  40. package/dist/Root.es.js.map +1 -0
  41. package/dist/SocialLinks.cjs.js +900 -0
  42. package/dist/SocialLinks.cjs.js.map +1 -0
  43. package/dist/SocialLinks.es.js +874 -0
  44. package/dist/SocialLinks.es.js.map +1 -0
  45. package/dist/Text.cjs.js +475 -0
  46. package/dist/Text.cjs.js.map +1 -0
  47. package/dist/Text.es.js +467 -0
  48. package/dist/Text.es.js.map +1 -0
  49. package/dist/Video.cjs.js +121 -0
  50. package/dist/Video.cjs.js.map +1 -0
  51. package/dist/Video.es.js +114 -0
  52. package/dist/Video.es.js.map +1 -0
  53. package/dist/components.cjs.js +80 -58
  54. package/dist/components.cjs.js.map +1 -1
  55. package/dist/components.es.js +41 -18
  56. package/dist/components.es.js.map +1 -1
  57. package/dist/cssMediaRules.cjs.js +222 -0
  58. package/dist/cssMediaRules.cjs.js.map +1 -0
  59. package/dist/cssMediaRules.es.js +213 -0
  60. package/dist/cssMediaRules.es.js.map +1 -0
  61. package/dist/descriptors.es.js +1 -1
  62. package/dist/index.cjs.js +1411 -7742
  63. package/dist/index.cjs.js.map +1 -1
  64. package/dist/index.cjs2.js +522 -0
  65. package/dist/index.cjs2.js.map +1 -0
  66. package/dist/index.cjs3.js +141 -0
  67. package/dist/index.cjs3.js.map +1 -0
  68. package/dist/index.cjs4.js +18 -0
  69. package/dist/index.cjs4.js.map +1 -0
  70. package/dist/index.es.js +1342 -7698
  71. package/dist/index.es.js.map +1 -1
  72. package/dist/index.es2.js +514 -0
  73. package/dist/index.es2.js.map +1 -0
  74. package/dist/index.es3.js +134 -0
  75. package/dist/index.es3.js.map +1 -0
  76. package/dist/index.es4.js +13 -0
  77. package/dist/index.es4.js.map +1 -0
  78. package/dist/next.cjs.js +19 -201
  79. package/dist/next.cjs.js.map +1 -1
  80. package/dist/next.es.js +12 -192
  81. package/dist/next.es.js.map +1 -1
  82. package/dist/placeholders.cjs.js +13 -0
  83. package/dist/placeholders.cjs.js.map +1 -0
  84. package/dist/placeholders.es.js +12 -0
  85. package/dist/placeholders.es.js.map +1 -0
  86. package/dist/react-builder-preview.cjs.js +23 -33
  87. package/dist/react-builder-preview.cjs.js.map +1 -1
  88. package/dist/react-builder-preview.es.js +13 -23
  89. package/dist/react-builder-preview.es.js.map +1 -1
  90. package/dist/react-page.es.js +1 -1
  91. package/dist/react.cjs.js +16 -28
  92. package/dist/react.cjs.js.map +1 -1
  93. package/dist/react.es.js +8 -20
  94. package/dist/react.es.js.map +1 -1
  95. package/dist/types/components/builtin/Box/Box.d.ts +1 -4
  96. package/dist/types/components/builtin/Box/Box.d.ts.map +1 -1
  97. package/dist/types/components/builtin/Box/animations.d.ts +1 -8
  98. package/dist/types/components/builtin/Box/animations.d.ts.map +1 -1
  99. package/dist/types/components/builtin/Box/constants.d.ts +9 -0
  100. package/dist/types/components/builtin/Box/constants.d.ts.map +1 -0
  101. package/dist/types/components/builtin/Box/index.d.ts +2 -2
  102. package/dist/types/components/builtin/Box/index.d.ts.map +1 -1
  103. package/dist/types/components/builtin/Box/register.d.ts +3 -0
  104. package/dist/types/components/builtin/Box/register.d.ts.map +1 -0
  105. package/dist/types/components/builtin/Button/Button.d.ts +1 -4
  106. package/dist/types/components/builtin/Button/Button.d.ts.map +1 -1
  107. package/dist/types/components/builtin/Button/contants.d.ts +2 -0
  108. package/dist/types/components/builtin/Button/contants.d.ts.map +1 -0
  109. package/dist/types/components/builtin/Button/index.d.ts +1 -1
  110. package/dist/types/components/builtin/Button/index.d.ts.map +1 -1
  111. package/dist/types/components/builtin/Button/register.d.ts +3 -0
  112. package/dist/types/components/builtin/Button/register.d.ts.map +1 -0
  113. package/dist/types/components/builtin/Carousel/Carousel.d.ts +0 -3
  114. package/dist/types/components/builtin/Carousel/Carousel.d.ts.map +1 -1
  115. package/dist/types/components/builtin/Carousel/index.d.ts +1 -1
  116. package/dist/types/components/builtin/Carousel/index.d.ts.map +1 -1
  117. package/dist/types/components/builtin/Carousel/register.d.ts +3 -0
  118. package/dist/types/components/builtin/Carousel/register.d.ts.map +1 -0
  119. package/dist/types/components/builtin/Countdown/Countdown.d.ts +0 -3
  120. package/dist/types/components/builtin/Countdown/Countdown.d.ts.map +1 -1
  121. package/dist/types/components/builtin/Countdown/index.d.ts +1 -1
  122. package/dist/types/components/builtin/Countdown/index.d.ts.map +1 -1
  123. package/dist/types/components/builtin/Countdown/register.d.ts +3 -0
  124. package/dist/types/components/builtin/Countdown/register.d.ts.map +1 -0
  125. package/dist/types/components/builtin/Divider/Divider.d.ts +0 -3
  126. package/dist/types/components/builtin/Divider/Divider.d.ts.map +1 -1
  127. package/dist/types/components/builtin/Divider/index.d.ts +1 -1
  128. package/dist/types/components/builtin/Divider/index.d.ts.map +1 -1
  129. package/dist/types/components/builtin/Divider/register.d.ts +3 -0
  130. package/dist/types/components/builtin/Divider/register.d.ts.map +1 -0
  131. package/dist/types/components/builtin/Embed/Embed.d.ts +0 -3
  132. package/dist/types/components/builtin/Embed/Embed.d.ts.map +1 -1
  133. package/dist/types/components/builtin/Embed/index.d.ts +1 -1
  134. package/dist/types/components/builtin/Embed/index.d.ts.map +1 -1
  135. package/dist/types/components/builtin/Embed/register.d.ts +3 -0
  136. package/dist/types/components/builtin/Embed/register.d.ts.map +1 -0
  137. package/dist/types/components/builtin/Form/Form.d.ts +1 -10
  138. package/dist/types/components/builtin/Form/Form.d.ts.map +1 -1
  139. package/dist/types/components/builtin/Form/context/FormContext.d.ts +6 -0
  140. package/dist/types/components/builtin/Form/context/FormContext.d.ts.map +1 -1
  141. package/dist/types/components/builtin/Form/index.d.ts +1 -1
  142. package/dist/types/components/builtin/Form/index.d.ts.map +1 -1
  143. package/dist/types/components/builtin/Form/register.d.ts +3 -0
  144. package/dist/types/components/builtin/Form/register.d.ts.map +1 -0
  145. package/dist/types/components/builtin/Image/Image.d.ts +0 -3
  146. package/dist/types/components/builtin/Image/Image.d.ts.map +1 -1
  147. package/dist/types/components/builtin/Image/index.d.ts +1 -1
  148. package/dist/types/components/builtin/Image/index.d.ts.map +1 -1
  149. package/dist/types/components/builtin/Image/register.d.ts +3 -0
  150. package/dist/types/components/builtin/Image/register.d.ts.map +1 -0
  151. package/dist/types/components/builtin/Navigation/Navigation.d.ts +0 -3
  152. package/dist/types/components/builtin/Navigation/Navigation.d.ts.map +1 -1
  153. package/dist/types/components/builtin/Navigation/index.d.ts +1 -1
  154. package/dist/types/components/builtin/Navigation/index.d.ts.map +1 -1
  155. package/dist/types/components/builtin/Navigation/register.d.ts +3 -0
  156. package/dist/types/components/builtin/Navigation/register.d.ts.map +1 -0
  157. package/dist/types/components/builtin/Root/Root.d.ts +0 -2
  158. package/dist/types/components/builtin/Root/Root.d.ts.map +1 -1
  159. package/dist/types/components/builtin/Root/index.d.ts +1 -1
  160. package/dist/types/components/builtin/Root/index.d.ts.map +1 -1
  161. package/dist/types/components/builtin/Root/register.d.ts +3 -0
  162. package/dist/types/components/builtin/Root/register.d.ts.map +1 -0
  163. package/dist/types/components/builtin/SocialLinks/SocialLinks.d.ts +0 -3
  164. package/dist/types/components/builtin/SocialLinks/SocialLinks.d.ts.map +1 -1
  165. package/dist/types/components/builtin/SocialLinks/index.d.ts +1 -1
  166. package/dist/types/components/builtin/SocialLinks/index.d.ts.map +1 -1
  167. package/dist/types/components/builtin/SocialLinks/register.d.ts +3 -0
  168. package/dist/types/components/builtin/SocialLinks/register.d.ts.map +1 -0
  169. package/dist/types/components/builtin/Text/Text.d.ts +0 -3
  170. package/dist/types/components/builtin/Text/Text.d.ts.map +1 -1
  171. package/dist/types/components/builtin/Text/index.d.ts +1 -1
  172. package/dist/types/components/builtin/Text/index.d.ts.map +1 -1
  173. package/dist/types/components/builtin/Text/register.d.ts +3 -0
  174. package/dist/types/components/builtin/Text/register.d.ts.map +1 -0
  175. package/dist/types/components/builtin/Video/Video.d.ts +0 -3
  176. package/dist/types/components/builtin/Video/Video.d.ts.map +1 -1
  177. package/dist/types/components/builtin/Video/index.d.ts +1 -1
  178. package/dist/types/components/builtin/Video/index.d.ts.map +1 -1
  179. package/dist/types/components/builtin/Video/register.d.ts +3 -0
  180. package/dist/types/components/builtin/Video/register.d.ts.map +1 -0
  181. package/dist/types/components/builtin/index.d.ts +1 -2
  182. package/dist/types/components/builtin/index.d.ts.map +1 -1
  183. package/dist/types/components/builtin/register.d.ts +3 -0
  184. package/dist/types/components/builtin/register.d.ts.map +1 -0
  185. package/dist/types/next.d.ts +12 -2
  186. package/dist/types/next.d.ts.map +1 -1
  187. package/dist/useBoxShadow.cjs.js +78 -0
  188. package/dist/useBoxShadow.cjs.js.map +1 -0
  189. package/dist/useBoxShadow.es.js +77 -0
  190. package/dist/useBoxShadow.es.js.map +1 -0
  191. package/dist/useMediaQuery.cjs.js +26 -0
  192. package/dist/useMediaQuery.cjs.js.map +1 -0
  193. package/dist/useMediaQuery.es.js +25 -0
  194. package/dist/useMediaQuery.es.js.map +1 -0
  195. package/next/plugin.js +1 -0
  196. package/package.json +4 -1
@@ -0,0 +1,736 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __defProps = Object.defineProperties;
4
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
5
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
8
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
+ var __spreadValues = (a, b) => {
10
+ for (var prop in b || (b = {}))
11
+ if (__hasOwnProp.call(b, prop))
12
+ __defNormalProp(a, prop, b[prop]);
13
+ if (__getOwnPropSymbols)
14
+ for (var prop of __getOwnPropSymbols(b)) {
15
+ if (__propIsEnum.call(b, prop))
16
+ __defNormalProp(a, prop, b[prop]);
17
+ }
18
+ return a;
19
+ };
20
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
21
+ var __objRest = (source, exclude) => {
22
+ var target = {};
23
+ for (var prop in source)
24
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
25
+ target[prop] = source[prop];
26
+ if (source != null && __getOwnPropSymbols)
27
+ for (var prop of __getOwnPropSymbols(source)) {
28
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
29
+ target[prop] = source[prop];
30
+ }
31
+ return target;
32
+ };
33
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
34
+ var React = require("react");
35
+ var styled = require("styled-components");
36
+ var css = require("@emotion/css");
37
+ var index = require("./index.cjs4.js");
38
+ var Image = require("./Image.cjs2.js");
39
+ var Button = require("./Button.cjs.js");
40
+ var jsxRuntime = require("react/jsx-runtime");
41
+ var cssMediaRules = require("./cssMediaRules.cjs.js");
42
+ var next = require("./index.cjs.js");
43
+ var index$1 = require("./index.cjs3.js");
44
+ require("next/image");
45
+ require("./useBoxShadow.cjs.js");
46
+ require("./placeholders.cjs.js");
47
+ require("use-sync-external-store/shim/with-selector");
48
+ require("./react-page.cjs.js");
49
+ require("redux");
50
+ require("redux-thunk");
51
+ require("./actions.cjs.js");
52
+ require("./descriptors.cjs.js");
53
+ require("./style.cjs.js");
54
+ require("./color.cjs.js");
55
+ require("./image.cjs.js");
56
+ require("next/dynamic");
57
+ require("next/document");
58
+ require("slate");
59
+ require("@emotion/server/create-instance");
60
+ require("@apollo/client");
61
+ require("@apollo/client/link/batch-http");
62
+ require("./graphql.cjs.js");
63
+ require("./text-input.cjs.js");
64
+ require("./shape.cjs.js");
65
+ require("color");
66
+ require("react-dom");
67
+ require("html-react-parser");
68
+ require("next/head");
69
+ require("uuid/v4");
70
+ require("corporate-ipsum");
71
+ require("scroll-into-view-if-needed");
72
+ require("next/link");
73
+ function _interopDefaultLegacy(e) {
74
+ return e && typeof e === "object" && "default" in e ? e : { "default": e };
75
+ }
76
+ function _interopNamespace(e) {
77
+ if (e && e.__esModule)
78
+ return e;
79
+ var n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
80
+ if (e) {
81
+ Object.keys(e).forEach(function(k) {
82
+ if (k !== "default") {
83
+ var d = Object.getOwnPropertyDescriptor(e, k);
84
+ Object.defineProperty(n, k, d.get ? d : {
85
+ enumerable: true,
86
+ get: function() {
87
+ return e[k];
88
+ }
89
+ });
90
+ }
91
+ });
92
+ }
93
+ n["default"] = e;
94
+ return Object.freeze(n);
95
+ }
96
+ var React__namespace = /* @__PURE__ */ _interopNamespace(React);
97
+ var styled__default = /* @__PURE__ */ _interopDefaultLegacy(styled);
98
+ var _path$5;
99
+ function _extends$5() {
100
+ _extends$5 = Object.assign || function(target) {
101
+ for (var i = 1; i < arguments.length; i++) {
102
+ var source = arguments[i];
103
+ for (var key in source) {
104
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
105
+ target[key] = source[key];
106
+ }
107
+ }
108
+ }
109
+ return target;
110
+ };
111
+ return _extends$5.apply(this, arguments);
112
+ }
113
+ var SvgMobileMenu28 = function SvgMobileMenu282(props) {
114
+ return /* @__PURE__ */ React__namespace.createElement("svg", _extends$5({
115
+ xmlns: "http://www.w3.org/2000/svg",
116
+ width: 28,
117
+ height: 28
118
+ }, props), _path$5 || (_path$5 = /* @__PURE__ */ React__namespace.createElement("path", {
119
+ d: "M27 15H1a1 1 0 0 1-1-1 1 1 0 0 1 1-1h26a1 1 0 0 1 1 1 1 1 0 0 1-1 1zm0-10H1a1 1 0 0 0-1 1 1 1 0 0 0 1 1h26a1 1 0 0 0 1-1 1 1 0 0 0-1-1zm0 16H1a1 1 0 0 0-1 1 1 1 0 0 0 1 1h26a1 1 0 0 0 1-1 1 1 0 0 0-1-1z"
120
+ })));
121
+ };
122
+ const PlaceholderLink = styled__default["default"].div.withConfig({
123
+ shouldForwardProp: (prop) => !["width", "button"].includes(prop.toString())
124
+ })`
125
+ width: ${(props) => props.width}px;
126
+ height: ${(props) => props.button === true ? 32 : 8}px;
127
+ background-color: #a1a8c2;
128
+ border-radius: ${(props) => props.button === true ? 6 : 2}px;
129
+ opacity: 0.4;
130
+ `;
131
+ const links = [{
132
+ width: 50
133
+ }, {
134
+ width: 70
135
+ }, {
136
+ width: 60
137
+ }, {
138
+ width: 80,
139
+ button: true
140
+ }];
141
+ function LinksPlaceholder({
142
+ gutter
143
+ }) {
144
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {
145
+ children: links.map((link, i) => /* @__PURE__ */ jsxRuntime.jsx(index.GutterContainer, {
146
+ gutter,
147
+ first: i === 0,
148
+ last: i === links.length - 1,
149
+ children: /* @__PURE__ */ jsxRuntime.jsx(PlaceholderLink, __spreadValues({}, link))
150
+ }, i))
151
+ });
152
+ }
153
+ var _path$4;
154
+ function _extends$4() {
155
+ _extends$4 = Object.assign || function(target) {
156
+ for (var i = 1; i < arguments.length; i++) {
157
+ var source = arguments[i];
158
+ for (var key in source) {
159
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
160
+ target[key] = source[key];
161
+ }
162
+ }
163
+ }
164
+ return target;
165
+ };
166
+ return _extends$4.apply(this, arguments);
167
+ }
168
+ var SvgCaretDown8 = function SvgCaretDown82(props) {
169
+ return /* @__PURE__ */ React__namespace.createElement("svg", _extends$4({
170
+ width: 8,
171
+ height: 8,
172
+ xmlns: "http://www.w3.org/2000/svg"
173
+ }, props), _path$4 || (_path$4 = /* @__PURE__ */ React__namespace.createElement("path", {
174
+ d: "M1 2a1 1 0 0 0-.707 1.707l3 3a1 1 0 0 0 1.414 0l3-3A1 1 0 0 0 7 2H1z"
175
+ })));
176
+ };
177
+ var _path$3;
178
+ function _extends$3() {
179
+ _extends$3 = Object.assign || function(target) {
180
+ for (var i = 1; i < arguments.length; i++) {
181
+ var source = arguments[i];
182
+ for (var key in source) {
183
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
184
+ target[key] = source[key];
185
+ }
186
+ }
187
+ }
188
+ return target;
189
+ };
190
+ return _extends$3.apply(this, arguments);
191
+ }
192
+ var SvgPlus8 = function SvgPlus82(props) {
193
+ return /* @__PURE__ */ React__namespace.createElement("svg", _extends$3({
194
+ width: 8,
195
+ height: 8,
196
+ xmlns: "http://www.w3.org/2000/svg"
197
+ }, props), _path$3 || (_path$3 = /* @__PURE__ */ React__namespace.createElement("path", {
198
+ d: "M4 0a1 1 0 0 0-1 1v2H1a1 1 0 1 0 0 2h2v2a1 1 0 0 0 2 0V5h2a1 1 0 0 0 0-2H5V1a1 1 0 0 0-1-1z"
199
+ })));
200
+ };
201
+ var _path$2;
202
+ function _extends$2() {
203
+ _extends$2 = Object.assign || function(target) {
204
+ for (var i = 1; i < arguments.length; i++) {
205
+ var source = arguments[i];
206
+ for (var key in source) {
207
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
208
+ target[key] = source[key];
209
+ }
210
+ }
211
+ }
212
+ return target;
213
+ };
214
+ return _extends$2.apply(this, arguments);
215
+ }
216
+ var SvgArrowDown8 = function SvgArrowDown82(props) {
217
+ return /* @__PURE__ */ React__namespace.createElement("svg", _extends$2({
218
+ width: 8,
219
+ height: 8,
220
+ xmlns: "http://www.w3.org/2000/svg"
221
+ }, props), _path$2 || (_path$2 = /* @__PURE__ */ React__namespace.createElement("path", {
222
+ d: "M5 1a1 1 0 0 0-2 0v3.586l-.293-.293a1 1 0 0 0-1.414 1.414l2 2a1 1 0 0 0 1.414 0l2-2a1 1 0 0 0-1.414-1.414L5 4.586V1z"
223
+ })));
224
+ };
225
+ var _path$1;
226
+ function _extends$1() {
227
+ _extends$1 = Object.assign || function(target) {
228
+ for (var i = 1; i < arguments.length; i++) {
229
+ var source = arguments[i];
230
+ for (var key in source) {
231
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
232
+ target[key] = source[key];
233
+ }
234
+ }
235
+ }
236
+ return target;
237
+ };
238
+ return _extends$1.apply(this, arguments);
239
+ }
240
+ var SvgChevronDown8 = function SvgChevronDown82(props) {
241
+ return /* @__PURE__ */ React__namespace.createElement("svg", _extends$1({
242
+ width: 8,
243
+ height: 8,
244
+ xmlns: "http://www.w3.org/2000/svg"
245
+ }, props), _path$1 || (_path$1 = /* @__PURE__ */ React__namespace.createElement("path", {
246
+ fillRule: "evenodd",
247
+ clipRule: "evenodd",
248
+ d: "M.293 2.293a1 1 0 0 1 1.414 0L4 4.586l2.293-2.293a1 1 0 0 1 1.414 1.414l-3 3a1 1 0 0 1-1.414 0l-3-3a1 1 0 0 1 0-1.414z"
249
+ })));
250
+ };
251
+ const DROP_DOWN_MENU_WIDTH = 200;
252
+ const DropDownMenu$1 = styled__default["default"].div.withConfig({
253
+ shouldForwardProp: (prop) => !["position"].includes(prop.toString())
254
+ })`
255
+ position: absolute;
256
+ top: 100%;
257
+ left: ${(props) => props.position === "left" ? 0 : "auto"};
258
+ right: ${(props) => props.position === "right" ? 0 : "auto"};
259
+ background: #fff;
260
+ margin: 0;
261
+ padding: 8px 0;
262
+ border-radius: 4px;
263
+ box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
264
+ width: ${DROP_DOWN_MENU_WIDTH}px;
265
+ z-index: 99;
266
+ list-style: none;
267
+ overflow: hidden;
268
+ transform-origin: 50% 0;
269
+ will-change: transform, opacity;
270
+ transform-style: preserve-3d;
271
+ display: none;
272
+ `;
273
+ const dropIn = styled.keyframes`
274
+ 0% {
275
+ opacity: 0;
276
+ transform: rotateX(-20deg);
277
+ }
278
+ 100% {
279
+ opacity: 1;
280
+ transform: none;
281
+ }
282
+ `;
283
+ const DropDownContainer = styled__default["default"].div`
284
+ position: relative;
285
+
286
+ &:hover > ${DropDownMenu$1} {
287
+ display: block;
288
+ animation: ${dropIn} 0.25s;
289
+ }
290
+ `;
291
+ const StyledDropDownItem = styled__default["default"](index$1.Link).withConfig({
292
+ shouldForwardProp: (prop) => !["color", "textStyle"].includes(prop.toString())
293
+ })`
294
+ display: block;
295
+ text-decoration: none;
296
+ line-height: 1.4;
297
+ padding: 8px 16px;
298
+ color: black;
299
+ background-color: transparent;
300
+ transition: background-color 0.2s;
301
+ ${cssMediaRules.cssTextStyle()}
302
+ ${(p) => cssMediaRules.cssMediaRules([p.color, p.textStyle], ([color, textStyle = {}]) => {
303
+ const fontSize = textStyle.fontSize || {
304
+ value: 14,
305
+ unit: "px"
306
+ };
307
+ const fontWeight = textStyle.fontWeight == null ? "normal" : textStyle.fontWeight;
308
+ const fontStyle = textStyle.fontStyle || [];
309
+ const letterSpacing = textStyle.letterSpacing == null ? null : textStyle.letterSpacing;
310
+ const textTransform = textStyle.textTransform || [];
311
+ return styled.css`
312
+ color: ${color == null ? "black" : next.colorToString(color)};
313
+ font-size: ${`${fontSize.value}${fontSize.unit}`};
314
+ font-weight: ${fontWeight};
315
+ font-style: ${fontStyle.includes("italic") ? "italic" : "normal"};
316
+ letter-spacing: ${letterSpacing == null ? "normal" : `${letterSpacing}px`};
317
+ text-transform: ${textTransform.includes("uppercase") ? "uppercase" : "none"};
318
+ `;
319
+ })}
320
+
321
+ &:hover {
322
+ background-color: rgba(0, 0, 0, 0.04);
323
+ }
324
+ `;
325
+ function DropDownItem$1(_a) {
326
+ var _b = _a, {
327
+ color
328
+ } = _b, restOfProps = __objRest(_b, [
329
+ "color"
330
+ ]);
331
+ return /* @__PURE__ */ jsxRuntime.jsx(StyledDropDownItem, __spreadProps(__spreadValues({}, restOfProps), {
332
+ color: next.useResponsiveColor(color)
333
+ }));
334
+ }
335
+ function DropDownButton(_c) {
336
+ var _d = _c, {
337
+ label,
338
+ caret = "caret",
339
+ links: links2 = [],
340
+ textColor,
341
+ color
342
+ } = _d, restOfProps = __objRest(_d, [
343
+ "label",
344
+ "caret",
345
+ "links",
346
+ "textColor",
347
+ "color"
348
+ ]);
349
+ const container = React.useRef(null);
350
+ const [position, setPosition] = React.useState("left");
351
+ next.useIsomorphicLayoutEffect(() => {
352
+ if (container.current && container.current.ownerDocument.defaultView.innerWidth < container.current.offsetLeft + DROP_DOWN_MENU_WIDTH) {
353
+ setPosition("right");
354
+ } else {
355
+ setPosition("left");
356
+ }
357
+ }, [setPosition]);
358
+ return /* @__PURE__ */ jsxRuntime.jsxs(DropDownContainer, {
359
+ ref: container,
360
+ children: [/* @__PURE__ */ jsxRuntime.jsx(Button["default"], __spreadProps(__spreadValues({}, restOfProps), {
361
+ textColor: next.useResponsiveColor(textColor),
362
+ color: next.useResponsiveColor(color),
363
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", {
364
+ style: {
365
+ display: "flex",
366
+ alignItems: "center"
367
+ },
368
+ children: [/* @__PURE__ */ jsxRuntime.jsx("span", {
369
+ style: {
370
+ marginRight: 6
371
+ },
372
+ children: label
373
+ }), /* @__PURE__ */ jsxRuntime.jsxs("span", {
374
+ style: {
375
+ display: "inline-flex",
376
+ fill: "currentColor"
377
+ },
378
+ children: [caret === "caret" && /* @__PURE__ */ jsxRuntime.jsx(SvgCaretDown8, {}), caret === "plus" && /* @__PURE__ */ jsxRuntime.jsx(SvgPlus8, {}), caret === "arrow-down" && /* @__PURE__ */ jsxRuntime.jsx(SvgArrowDown8, {}), caret === "chevron-down" && /* @__PURE__ */ jsxRuntime.jsx(SvgChevronDown8, {})]
379
+ })]
380
+ })
381
+ })), /* @__PURE__ */ jsxRuntime.jsx(DropDownMenu$1, {
382
+ position,
383
+ children: links2.map(({
384
+ id,
385
+ payload
386
+ }) => /* @__PURE__ */ React.createElement(DropDownItem$1, __spreadProps(__spreadValues({}, payload), {
387
+ key: id
388
+ }), payload.label))
389
+ })]
390
+ });
391
+ }
392
+ var _path;
393
+ function _extends() {
394
+ _extends = Object.assign || function(target) {
395
+ for (var i = 1; i < arguments.length; i++) {
396
+ var source = arguments[i];
397
+ for (var key in source) {
398
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
399
+ target[key] = source[key];
400
+ }
401
+ }
402
+ }
403
+ return target;
404
+ };
405
+ return _extends.apply(this, arguments);
406
+ }
407
+ var SvgTimes16 = function SvgTimes162(props) {
408
+ return /* @__PURE__ */ React__namespace.createElement("svg", _extends({
409
+ width: 16,
410
+ height: 16,
411
+ xmlns: "http://www.w3.org/2000/svg"
412
+ }, props), _path || (_path = /* @__PURE__ */ React__namespace.createElement("path", {
413
+ fillRule: "evenodd",
414
+ clipRule: "evenodd",
415
+ d: "M13.707 3.707a1 1 0 0 0-1.414-1.414L8 6.586 3.707 2.293a1 1 0 0 0-1.414 1.414L6.586 8l-4.293 4.293a1 1 0 1 0 1.414 1.414L8 9.414l4.293 4.293a1 1 0 0 0 1.414-1.414L9.414 8l4.293-4.293Z"
416
+ })));
417
+ };
418
+ const DropDownMenu = styled__default["default"].div.withConfig({
419
+ shouldForwardProp: (prop) => !["open"].includes(prop.toString())
420
+ })`
421
+ display: ${(props) => props.open ? "flex" : "none"};
422
+ flex-direction: column;
423
+ padding: 8px;
424
+ `;
425
+ const ButtonLink$1 = styled__default["default"](Button["default"])`
426
+ margin: 8px 0;
427
+ `;
428
+ const StyledLink = styled__default["default"](index$1.Link).withConfig({
429
+ shouldForwardProp: (prop) => !["textStyle", "color"].includes(prop.toString())
430
+ })`
431
+ text-decoration: none;
432
+ line-height: 1.4;
433
+ padding: 8px 16px;
434
+ color: black;
435
+ ${cssMediaRules.cssTextStyle()}
436
+ ${(p) => cssMediaRules.cssMediaRules([p.color], ([color]) => styled.css`
437
+ color: ${color == null ? "black" : next.colorToString(color)};
438
+ `)}
439
+ `;
440
+ function DropDownItem(_e) {
441
+ var _f = _e, {
442
+ color
443
+ } = _f, restOfProps = __objRest(_f, [
444
+ "color"
445
+ ]);
446
+ return /* @__PURE__ */ jsxRuntime.jsx(StyledLink, __spreadProps(__spreadValues({}, restOfProps), {
447
+ color: next.useResponsiveColor(color)
448
+ }));
449
+ }
450
+ function MobileDropDownButton(_g) {
451
+ var _h = _g, {
452
+ label,
453
+ caret,
454
+ links: links2 = [],
455
+ onClose = () => {
456
+ },
457
+ color,
458
+ textColor
459
+ } = _h, restOfProps = __objRest(_h, [
460
+ "label",
461
+ "caret",
462
+ "links",
463
+ "onClose",
464
+ "color",
465
+ "textColor"
466
+ ]);
467
+ const [isOpen, setIsOpen] = React.useState(false);
468
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
469
+ children: [/* @__PURE__ */ jsxRuntime.jsx(ButtonLink$1, __spreadProps(__spreadValues({}, restOfProps), {
470
+ textColor: next.useResponsiveColor(textColor),
471
+ color: next.useResponsiveColor(color),
472
+ onPointerDown: () => setIsOpen((prev) => !prev),
473
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", {
474
+ style: {
475
+ display: "flex",
476
+ alignItems: "center"
477
+ },
478
+ children: [/* @__PURE__ */ jsxRuntime.jsx("span", {
479
+ style: {
480
+ marginRight: 6
481
+ },
482
+ children: label
483
+ }), /* @__PURE__ */ jsxRuntime.jsx("span", {
484
+ style: {
485
+ display: "inline-flex",
486
+ fill: "currentColor"
487
+ },
488
+ children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
489
+ children: [caret === "caret" && /* @__PURE__ */ jsxRuntime.jsx(SvgCaretDown8, {}), caret === "plus" && /* @__PURE__ */ jsxRuntime.jsx(SvgPlus8, {}), caret === "arrow-down" && /* @__PURE__ */ jsxRuntime.jsx(SvgArrowDown8, {}), caret === "chevron-down" && /* @__PURE__ */ jsxRuntime.jsx(SvgChevronDown8, {})]
490
+ })
491
+ })]
492
+ })
493
+ })), /* @__PURE__ */ jsxRuntime.jsx(DropDownMenu, {
494
+ open: isOpen,
495
+ children: links2.map(({
496
+ id,
497
+ payload
498
+ }) => /* @__PURE__ */ React.createElement(DropDownItem, __spreadProps(__spreadValues({}, payload), {
499
+ key: id,
500
+ onClick: onClose
501
+ }), payload.label))
502
+ })]
503
+ });
504
+ }
505
+ function NavigationButton$1(props) {
506
+ const _a = props, {
507
+ textColor,
508
+ color
509
+ } = _a, restOfProps = __objRest(_a, [
510
+ "textColor",
511
+ "color"
512
+ ]);
513
+ return /* @__PURE__ */ jsxRuntime.jsx(Button["default"], __spreadProps(__spreadValues({}, restOfProps), {
514
+ textColor: next.useResponsiveColor(textColor),
515
+ color: next.useResponsiveColor(color)
516
+ }));
517
+ }
518
+ const ButtonLink = styled__default["default"](NavigationButton$1)`
519
+ margin: 8px 0;
520
+ `;
521
+ const Container$1 = styled__default["default"].div.withConfig({
522
+ shouldForwardProp: (prop) => !["animation", "backgroundColor", "open"].includes(prop.toString())
523
+ })`
524
+ position: fixed;
525
+ flex-direction: column;
526
+ width: 100%;
527
+ padding: 40px 15px;
528
+ transition: transform 300ms ease-in-out;
529
+ overflow-y: auto;
530
+ z-index: 9999;
531
+ max-width: 575px;
532
+ ${(p) => cssMediaRules.cssMediaRules([p.animation, p.backgroundColor], ([animation, backgroundColor]) => animation == null ? styled.css`
533
+ display: none;
534
+ ` : styled.css`
535
+ display: flex;
536
+ background-color: ${backgroundColor == null ? "black" : next.colorToString(backgroundColor)};
537
+ transform: ${p.open ? `translate3d(0,0,0)` : `translate3d(${{
538
+ coverRight: "",
539
+ coverLeft: "-"
540
+ }[animation]}100%, 0, 0)`};
541
+ ${{
542
+ coverRight: {
543
+ top: 0,
544
+ bottom: 0,
545
+ right: 0
546
+ },
547
+ coverLeft: {
548
+ top: 0,
549
+ bottom: 0,
550
+ left: 0
551
+ }
552
+ }[animation]}
553
+ `)}
554
+ `;
555
+ const CloseIconContainer = styled__default["default"].button.withConfig({
556
+ shouldForwardProp: (prop) => !["color"].includes(prop.toString())
557
+ })`
558
+ position: absolute;
559
+ top: 15px;
560
+ right: 15px;
561
+ padding: 0;
562
+ border: 0;
563
+ outline: 0;
564
+ background: none;
565
+ fill: currentColor;
566
+ ${(p) => cssMediaRules.cssMediaRules([p.color], ([color]) => styled.css`
567
+ color: ${color == null ? "rgba(161, 168, 194, 0.5)" : next.colorToString(color)};
568
+ `)}
569
+ `;
570
+ function MobileMenu({
571
+ animation,
572
+ backgroundColor,
573
+ open = false,
574
+ closeIconColor,
575
+ links: links2 = [],
576
+ onClose = () => {
577
+ }
578
+ }) {
579
+ return /* @__PURE__ */ jsxRuntime.jsxs(Container$1, {
580
+ animation,
581
+ backgroundColor,
582
+ open,
583
+ children: [/* @__PURE__ */ jsxRuntime.jsx(CloseIconContainer, {
584
+ color: closeIconColor,
585
+ onClick: onClose,
586
+ children: /* @__PURE__ */ jsxRuntime.jsx(SvgTimes16, {})
587
+ }), /* @__PURE__ */ jsxRuntime.jsx("div", {
588
+ style: {
589
+ display: "flex",
590
+ flexDirection: "column",
591
+ alignItems: "center",
592
+ flexShrink: 0
593
+ },
594
+ children: links2.map((link) => /* @__PURE__ */ jsxRuntime.jsxs(React.Fragment, {
595
+ children: [link.type === "button" && /* @__PURE__ */ jsxRuntime.jsx(ButtonLink, __spreadProps(__spreadValues({}, link.payload), {
596
+ onClick: onClose,
597
+ children: link.payload.label
598
+ })), link.type === "dropdown" && /* @__PURE__ */ jsxRuntime.jsx(MobileDropDownButton, __spreadProps(__spreadValues({}, link.payload), {
599
+ onClose
600
+ }))]
601
+ }, link.id))
602
+ })]
603
+ });
604
+ }
605
+ const Container = styled__default["default"].nav.withConfig({
606
+ shouldForwardProp: (prop) => !["margin", "textStyle", "gutter"].includes(prop.toString())
607
+ })`
608
+ display: flex;
609
+ align-items: center;
610
+ ${cssMediaRules.cssMargin()}
611
+ ${cssMediaRules.cssTextStyle()}
612
+ ${(p) => cssMediaRules.cssMediaRules([p.gutter], ([gutter = {
613
+ value: 0,
614
+ unit: "px"
615
+ }]) => styled.css`
616
+ gap: ${gutter.value}${gutter.unit};
617
+ `)}
618
+ `;
619
+ const LinksContainer = styled__default["default"].div.withConfig({
620
+ shouldForwardProp: (prop) => !["alignment", "mobileMenuAnimation"].includes(prop.toString())
621
+ })`
622
+ display: flex;
623
+ align-items: center;
624
+ flex-grow: 1;
625
+ ${(p) => cssMediaRules.cssMediaRules([p.alignment, p.mobileMenuAnimation], ([alignment = "flex-end", mobileMenuAnimation]) => styled.css`
626
+ display: ${mobileMenuAnimation == null ? "flex" : "none"};
627
+ justify-content: ${alignment};
628
+ `)}
629
+ `;
630
+ const OpenIconContainer = styled__default["default"].button.withConfig({
631
+ shouldForwardProp: (prop) => !["mobileMenuAnimation", "alignment", "color"].includes(prop.toString())
632
+ })`
633
+ display: none;
634
+ flex-grow: 1;
635
+ align-items: center;
636
+ background: none;
637
+ outline: 0;
638
+ border: 0;
639
+ padding: 0;
640
+ fill: currentColor;
641
+ ${(p) => cssMediaRules.cssMediaRules([p.mobileMenuAnimation, p.alignment, p.color], ([mobileMenuAnimation, alignment = "flex-end", color]) => styled.css`
642
+ display: ${mobileMenuAnimation == null ? "none" : "flex"};
643
+ justify-content: ${alignment};
644
+ color: ${color == null ? "rgba(161, 168, 194, 0.5)" : next.colorToString(color)};
645
+ `)}
646
+ `;
647
+ function NavigationButton(props) {
648
+ const _a = props, {
649
+ textColor,
650
+ color
651
+ } = _a, restOfProps = __objRest(_a, [
652
+ "textColor",
653
+ "color"
654
+ ]);
655
+ return /* @__PURE__ */ jsxRuntime.jsx(Button["default"], __spreadProps(__spreadValues({}, restOfProps), {
656
+ textColor: next.useResponsiveColor(textColor),
657
+ color: next.useResponsiveColor(color)
658
+ }));
659
+ }
660
+ const placeholder = {
661
+ src: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='93.12' height='36' viewBox='0 0 93.12 36'%3E%3Cg id='Layer_2' data-name='Layer 2'%3E%3Cg id='Layer_1-2' data-name='Layer 1'%3E%3Cpath d='M18,0A18,18,0,1,1,0,18,18,18,0,0,1,18,0ZM49.36,21.94h6.36V24H46.8V10h2.56Zm9.06.72a4.88,4.88,0,0,1-1.64-3.72,5,5,0,0,1,1.64-3.74,5.57,5.57,0,0,1,7.7,0,5.09,5.09,0,0,1,.26,7.18l-.26.26a5.56,5.56,0,0,1-7.7,0Zm1.68-6a3.39,3.39,0,0,0,0,4.52,3,3,0,0,0,4.24.08l.08-.08a3.39,3.39,0,0,0,0-4.52,3,3,0,0,0-4.24-.08Zm10,10.68,1-1.92a5.28,5.28,0,0,0,3.3,1.22,3.6,3.6,0,0,0,2.32-.72,2.73,2.73,0,0,0,.9-2.26V22.5a3.61,3.61,0,0,1-1.45,1.26,4.35,4.35,0,0,1-2,.46,4.57,4.57,0,0,1-3.58-1.54A5.48,5.48,0,0,1,69.2,18.9a5.42,5.42,0,0,1,1.36-3.74,4.64,4.64,0,0,1,3.62-1.5,4,4,0,0,1,3.44,1.72v-1.5h2.46v9a6.13,6.13,0,0,1-1.43,4.46,5.27,5.27,0,0,1-4,1.44,7.09,7.09,0,0,1-4.53-1.42Zm1.54-8.44a3.4,3.4,0,0,0,.82,2.3,2.72,2.72,0,0,0,2.17.94,3.13,3.13,0,0,0,1.21-.22,2.89,2.89,0,0,0,1-.62,3.08,3.08,0,0,0,.63-1,3.62,3.62,0,0,0,.21-1.3,4,4,0,0,0-.23-1.33,3.3,3.3,0,0,0-.63-1.05,2.74,2.74,0,0,0-1-.68,3.35,3.35,0,0,0-1.25-.24,2.92,2.92,0,0,0-1.2.24,2.58,2.58,0,0,0-.93.67,3,3,0,0,0-.59,1,3.89,3.89,0,0,0-.19,1.31ZM83.8,22.66a4.88,4.88,0,0,1-1.64-3.72A5,5,0,0,1,83.8,15.2a5.57,5.57,0,0,1,7.7,0,5.09,5.09,0,0,1,.26,7.18,3.19,3.19,0,0,1-.26.26,5.56,5.56,0,0,1-7.7,0Zm1.68-6a3.39,3.39,0,0,0,0,4.52,3,3,0,0,0,4.24.08l.08-.08a3.39,3.39,0,0,0,0-4.52,3,3,0,0,0-4.24-.08Z' fill='%23a1a8c2' opacity='0.4' style='isolation: isolate'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A",
662
+ dimensions: {
663
+ width: 93,
664
+ height: 36
665
+ }
666
+ };
667
+ const Navigation = React.forwardRef(function Navigation2({
668
+ id,
669
+ links: links2 = [],
670
+ linkTextStyle,
671
+ showLogo,
672
+ logoFile,
673
+ logoWidth,
674
+ logoAltText,
675
+ logoLink,
676
+ alignment,
677
+ gutter,
678
+ mobileMenuAnimation,
679
+ mobileMenuOpenIconColor,
680
+ mobileMenuCloseIconColor,
681
+ mobileMenuBackgroundColor,
682
+ width,
683
+ margin
684
+ }, ref) {
685
+ const [isOpen, setIsOpen] = React.useState(false);
686
+ return /* @__PURE__ */ jsxRuntime.jsxs(Container, {
687
+ ref,
688
+ id,
689
+ className: css.cx(width),
690
+ margin,
691
+ textStyle: linkTextStyle,
692
+ gutter,
693
+ children: [showLogo === true && /* @__PURE__ */ jsxRuntime.jsx(Image["default"], {
694
+ altText: logoAltText,
695
+ file: logoFile,
696
+ link: logoLink,
697
+ placeholder,
698
+ width: logoWidth
699
+ }), /* @__PURE__ */ jsxRuntime.jsxs("div", {
700
+ style: {
701
+ display: "flex",
702
+ flexGrow: 1,
703
+ justifyContent: "flex-end"
704
+ },
705
+ children: [/* @__PURE__ */ jsxRuntime.jsx(LinksContainer, {
706
+ alignment,
707
+ mobileMenuAnimation,
708
+ children: links2.length > 0 ? links2.map((link, i) => /* @__PURE__ */ jsxRuntime.jsxs(index.GutterContainer, {
709
+ gutter,
710
+ first: i === 0,
711
+ last: i === links2.length - 1,
712
+ children: [link.type === "button" && /* @__PURE__ */ jsxRuntime.jsx(NavigationButton, __spreadProps(__spreadValues({}, link.payload), {
713
+ children: link.payload.label
714
+ })), link.type === "dropdown" && /* @__PURE__ */ jsxRuntime.jsx(DropDownButton, __spreadValues({}, link.payload))]
715
+ }, link.id)) : /* @__PURE__ */ jsxRuntime.jsx(LinksPlaceholder, {
716
+ gutter
717
+ })
718
+ }), /* @__PURE__ */ jsxRuntime.jsx(OpenIconContainer, {
719
+ alignment,
720
+ color: mobileMenuOpenIconColor,
721
+ mobileMenuAnimation,
722
+ onClick: () => setIsOpen(true),
723
+ children: /* @__PURE__ */ jsxRuntime.jsx(SvgMobileMenu28, {})
724
+ }), /* @__PURE__ */ jsxRuntime.jsx(MobileMenu, {
725
+ animation: mobileMenuAnimation,
726
+ backgroundColor: mobileMenuBackgroundColor,
727
+ closeIconColor: mobileMenuCloseIconColor,
728
+ links: links2,
729
+ onClose: () => setIsOpen(false),
730
+ open: isOpen
731
+ })]
732
+ })]
733
+ });
734
+ });
735
+ exports["default"] = Navigation;
736
+ //# sourceMappingURL=Navigation.cjs.js.map