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