@makeswift/runtime 0.2.19 → 0.3.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 (228) hide show
  1. package/dist/Box.cjs.js +35 -70
  2. package/dist/Box.cjs.js.map +1 -1
  3. package/dist/Box.es.js +34 -65
  4. package/dist/Box.es.js.map +1 -1
  5. package/dist/Button.cjs.js +176 -208
  6. package/dist/Button.cjs.js.map +1 -1
  7. package/dist/Button.es.js +177 -208
  8. package/dist/Button.es.js.map +1 -1
  9. package/dist/Carousel.cjs.js +227 -249
  10. package/dist/Carousel.cjs.js.map +1 -1
  11. package/dist/Carousel.es.js +229 -247
  12. package/dist/Carousel.es.js.map +1 -1
  13. package/dist/Countdown.cjs.js +270 -203
  14. package/dist/Countdown.cjs.js.map +1 -1
  15. package/dist/Countdown.es.js +273 -202
  16. package/dist/Countdown.es.js.map +1 -1
  17. package/dist/Divider.cjs.js +50 -71
  18. package/dist/Divider.cjs.js.map +1 -1
  19. package/dist/Divider.es.js +51 -68
  20. package/dist/Divider.es.js.map +1 -1
  21. package/dist/Embed.cjs.js +6 -17
  22. package/dist/Embed.cjs.js.map +1 -1
  23. package/dist/Embed.es.js +7 -14
  24. package/dist/Embed.es.js.map +1 -1
  25. package/dist/Form.cjs.js +723 -553
  26. package/dist/Form.cjs.js.map +1 -1
  27. package/dist/Form.es.js +723 -552
  28. package/dist/Form.es.js.map +1 -1
  29. package/dist/Image.cjs.js +16 -38
  30. package/dist/Image.cjs.js.map +1 -1
  31. package/dist/Image.es.js +17 -38
  32. package/dist/Image.es.js.map +1 -1
  33. package/dist/Navigation.cjs.js +318 -224
  34. package/dist/Navigation.cjs.js.map +1 -1
  35. package/dist/Navigation.es.js +318 -220
  36. package/dist/Navigation.es.js.map +1 -1
  37. package/dist/Root.cjs.js +116 -78
  38. package/dist/Root.cjs.js.map +1 -1
  39. package/dist/Root.es.js +99 -77
  40. package/dist/Root.es.js.map +1 -1
  41. package/dist/SocialLinks.cjs.js +119 -86
  42. package/dist/SocialLinks.cjs.js.map +1 -1
  43. package/dist/SocialLinks.es.js +120 -83
  44. package/dist/SocialLinks.es.js.map +1 -1
  45. package/dist/Text.cjs.js +83 -99
  46. package/dist/Text.cjs.js.map +1 -1
  47. package/dist/Text.es.js +84 -99
  48. package/dist/Text.es.js.map +1 -1
  49. package/dist/Video.cjs.js +8 -19
  50. package/dist/Video.cjs.js.map +1 -1
  51. package/dist/Video.es.js +8 -18
  52. package/dist/Video.es.js.map +1 -1
  53. package/dist/components.cjs.js +6 -18
  54. package/dist/components.cjs.js.map +1 -1
  55. package/dist/components.es.js +5 -8
  56. package/dist/components.es.js.map +1 -1
  57. package/dist/controls.es.js +1 -1
  58. package/dist/grid-item.cjs.js +612 -0
  59. package/dist/grid-item.cjs.js.map +1 -0
  60. package/dist/grid-item.es.js +604 -0
  61. package/dist/grid-item.es.js.map +1 -0
  62. package/dist/index.cjs.js +592 -275
  63. package/dist/index.cjs.js.map +1 -1
  64. package/dist/index.cjs2.js +98 -474
  65. package/dist/index.cjs2.js.map +1 -1
  66. package/dist/index.cjs3.js +20 -107
  67. package/dist/index.cjs3.js.map +1 -1
  68. package/dist/index.es.js +587 -274
  69. package/dist/index.es.js.map +1 -1
  70. package/dist/index.es2.js +99 -473
  71. package/dist/index.es2.js.map +1 -1
  72. package/dist/index.es3.js +21 -103
  73. package/dist/index.es3.js.map +1 -1
  74. package/dist/next.cjs.js +1 -2
  75. package/dist/next.cjs.js.map +1 -1
  76. package/dist/next.es.js +2 -3
  77. package/dist/next.es.js.map +1 -1
  78. package/dist/react-builder-preview.cjs.js +1 -2
  79. package/dist/react-builder-preview.cjs.js.map +1 -1
  80. package/dist/react-builder-preview.es.js +3 -4
  81. package/dist/react-builder-preview.es.js.map +1 -1
  82. package/dist/react.cjs.js +1 -2
  83. package/dist/react.cjs.js.map +1 -1
  84. package/dist/react.es.js +1 -2
  85. package/dist/react.es.js.map +1 -1
  86. package/dist/slot.cjs.js +41 -6
  87. package/dist/slot.cjs.js.map +1 -1
  88. package/dist/slot.es.js +36 -6
  89. package/dist/slot.es.js.map +1 -1
  90. package/dist/types/src/components/builtin/Box/Box.d.ts +7 -7
  91. package/dist/types/src/components/builtin/Box/Box.d.ts.map +1 -1
  92. package/dist/types/src/components/builtin/Box/components/Placeholder/index.d.ts.map +1 -1
  93. package/dist/types/src/components/builtin/Box/register.d.ts.map +1 -1
  94. package/dist/types/src/components/builtin/Button/Button.d.ts +46 -34
  95. package/dist/types/src/components/builtin/Button/Button.d.ts.map +1 -1
  96. package/dist/types/src/components/builtin/Carousel/Carousel.d.ts +5 -5
  97. package/dist/types/src/components/builtin/Carousel/Carousel.d.ts.map +1 -1
  98. package/dist/types/src/components/builtin/Carousel/register.d.ts.map +1 -1
  99. package/dist/types/src/components/builtin/Countdown/Countdown.d.ts +3 -3
  100. package/dist/types/src/components/builtin/Countdown/Countdown.d.ts.map +1 -1
  101. package/dist/types/src/components/builtin/Countdown/register.d.ts.map +1 -1
  102. package/dist/types/src/components/builtin/Divider/Divider.d.ts +3 -3
  103. package/dist/types/src/components/builtin/Divider/Divider.d.ts.map +1 -1
  104. package/dist/types/src/components/builtin/Divider/register.d.ts.map +1 -1
  105. package/dist/types/src/components/builtin/Embed/Embed.d.ts +3 -3
  106. package/dist/types/src/components/builtin/Embed/Embed.d.ts.map +1 -1
  107. package/dist/types/src/components/builtin/Form/Form.d.ts +3 -3
  108. package/dist/types/src/components/builtin/Form/Form.d.ts.map +1 -1
  109. package/dist/types/src/components/builtin/Form/components/Field/components/Checkbox/index.d.ts +4 -6
  110. package/dist/types/src/components/builtin/Form/components/Field/components/Checkbox/index.d.ts.map +1 -1
  111. package/dist/types/src/components/builtin/Form/components/Field/components/CheckboxTableField/index.d.ts +3 -0
  112. package/dist/types/src/components/builtin/Form/components/Field/components/CheckboxTableField/index.d.ts.map +1 -1
  113. package/dist/types/src/components/builtin/Form/components/Field/components/EmailTableField/index.d.ts +2 -0
  114. package/dist/types/src/components/builtin/Form/components/Field/components/EmailTableField/index.d.ts.map +1 -1
  115. package/dist/types/src/components/builtin/Form/components/Field/components/Input/index.d.ts +3 -7
  116. package/dist/types/src/components/builtin/Form/components/Field/components/Input/index.d.ts.map +1 -1
  117. package/dist/types/src/components/builtin/Form/components/Field/components/Label/index.d.ts +7 -13
  118. package/dist/types/src/components/builtin/Form/components/Field/components/Label/index.d.ts.map +1 -1
  119. package/dist/types/src/components/builtin/Form/components/Field/components/LongTextTableField/index.d.ts +2 -0
  120. package/dist/types/src/components/builtin/Form/components/Field/components/LongTextTableField/index.d.ts.map +1 -1
  121. package/dist/types/src/components/builtin/Form/components/Field/components/MultipleSelectTableField/index.d.ts.map +1 -1
  122. package/dist/types/src/components/builtin/Form/components/Field/components/NumberTableField/index.d.ts +2 -0
  123. package/dist/types/src/components/builtin/Form/components/Field/components/NumberTableField/index.d.ts.map +1 -1
  124. package/dist/types/src/components/builtin/Form/components/Field/components/PhoneNumberTableField/index.d.ts +2 -0
  125. package/dist/types/src/components/builtin/Form/components/Field/components/PhoneNumberTableField/index.d.ts.map +1 -1
  126. package/dist/types/src/components/builtin/Form/components/Field/components/PlaceholderTableField/index.d.ts.map +1 -1
  127. package/dist/types/src/components/builtin/Form/components/Field/components/RadioButton/index.d.ts +4 -8
  128. package/dist/types/src/components/builtin/Form/components/Field/components/RadioButton/index.d.ts.map +1 -1
  129. package/dist/types/src/components/builtin/Form/components/Field/components/SingleLineTextTableField/index.d.ts +2 -0
  130. package/dist/types/src/components/builtin/Form/components/Field/components/SingleLineTextTableField/index.d.ts.map +1 -1
  131. package/dist/types/src/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnRadioButtonGroup/index.d.ts.map +1 -1
  132. package/dist/types/src/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnSingleSelect/index.d.ts.map +1 -1
  133. package/dist/types/src/components/builtin/Form/components/Field/components/TextArea/index.d.ts +2 -7
  134. package/dist/types/src/components/builtin/Form/components/Field/components/TextArea/index.d.ts.map +1 -1
  135. package/dist/types/src/components/builtin/Form/components/Field/components/URLTableField/index.d.ts +2 -0
  136. package/dist/types/src/components/builtin/Form/components/Field/components/URLTableField/index.d.ts.map +1 -1
  137. package/dist/types/src/components/builtin/Form/components/Field/services/{cssField.d.ts → responsiveField.d.ts} +5 -4
  138. package/dist/types/src/components/builtin/Form/components/Field/services/responsiveField.d.ts.map +1 -0
  139. package/dist/types/src/components/builtin/Form/components/Placeholder/index.d.ts +2 -3
  140. package/dist/types/src/components/builtin/Form/components/Placeholder/index.d.ts.map +1 -1
  141. package/dist/types/src/components/builtin/Form/components/Spinner/index.d.ts.map +1 -1
  142. package/dist/types/src/components/builtin/Form/register.d.ts.map +1 -1
  143. package/dist/types/src/components/builtin/Image/Image.d.ts +7 -7
  144. package/dist/types/src/components/builtin/Image/Image.d.ts.map +1 -1
  145. package/dist/types/src/components/builtin/Navigation/Navigation.d.ts +3 -3
  146. package/dist/types/src/components/builtin/Navigation/Navigation.d.ts.map +1 -1
  147. package/dist/types/src/components/builtin/Navigation/components/DropDownButton/index.d.ts +8 -81
  148. package/dist/types/src/components/builtin/Navigation/components/DropDownButton/index.d.ts.map +1 -1
  149. package/dist/types/src/components/builtin/Navigation/components/LinksPlaceholder/index.d.ts.map +1 -1
  150. package/dist/types/src/components/builtin/Navigation/components/MobileMenu/components/MobileDropDownButton/index.d.ts +8 -81
  151. package/dist/types/src/components/builtin/Navigation/components/MobileMenu/components/MobileDropDownButton/index.d.ts.map +1 -1
  152. package/dist/types/src/components/builtin/Navigation/components/MobileMenu/index.d.ts.map +1 -1
  153. package/dist/types/src/components/builtin/Navigation/register.d.ts.map +1 -1
  154. package/dist/types/src/components/builtin/Root/Root.d.ts +1 -2
  155. package/dist/types/src/components/builtin/Root/Root.d.ts.map +1 -1
  156. package/dist/types/src/components/builtin/Root/components/Placeholder/index.d.ts +1 -2
  157. package/dist/types/src/components/builtin/Root/components/Placeholder/index.d.ts.map +1 -1
  158. package/dist/types/src/components/builtin/SocialLinks/SocialLinks.d.ts +3 -3
  159. package/dist/types/src/components/builtin/SocialLinks/SocialLinks.d.ts.map +1 -1
  160. package/dist/types/src/components/builtin/SocialLinks/components/SocialLinksPlaceholder/index.d.ts.map +1 -1
  161. package/dist/types/src/components/builtin/SocialLinks/register.d.ts.map +1 -1
  162. package/dist/types/src/components/builtin/Text/Text.d.ts +3 -3
  163. package/dist/types/src/components/builtin/Text/Text.d.ts.map +1 -1
  164. package/dist/types/src/components/builtin/Text/components/RichTextEditor/components/Block/index.d.ts +8 -11
  165. package/dist/types/src/components/builtin/Text/components/RichTextEditor/components/Block/index.d.ts.map +1 -1
  166. package/dist/types/src/components/builtin/Text/components/RichTextEditor/components/Mark/index.d.ts +3 -6
  167. package/dist/types/src/components/builtin/Text/components/RichTextEditor/components/Mark/index.d.ts.map +1 -1
  168. package/dist/types/src/components/builtin/Text/components/RichTextEditor/index.d.ts +1 -1
  169. package/dist/types/src/components/builtin/Text/components/RichTextEditor/index.d.ts.map +1 -1
  170. package/dist/types/src/components/builtin/Text/components/RichTextEditor/plugins/Link.d.ts.map +1 -1
  171. package/dist/types/src/components/builtin/Text/register.d.ts.map +1 -1
  172. package/dist/types/src/components/builtin/Video/Video.d.ts +4 -4
  173. package/dist/types/src/components/builtin/Video/Video.d.ts.map +1 -1
  174. package/dist/types/src/components/builtin/Video/register.d.ts.map +1 -1
  175. package/dist/types/src/components/hooks/useBackgrounds.d.ts +1 -1
  176. package/dist/types/src/components/hooks/useBackgrounds.d.ts.map +1 -1
  177. package/dist/types/src/components/index.d.ts +0 -1
  178. package/dist/types/src/components/index.d.ts.map +1 -1
  179. package/dist/types/src/components/shared/BackgroundsContainer/components/BackgroundVideo/index.d.ts.map +1 -1
  180. package/dist/types/src/components/shared/BackgroundsContainer/components/Backgrounds/index.d.ts.map +1 -1
  181. package/dist/types/src/components/shared/BackgroundsContainer/index.d.ts +255 -4
  182. package/dist/types/src/components/shared/BackgroundsContainer/index.d.ts.map +1 -1
  183. package/dist/types/src/components/shared/FallbackComponent/FallbackComponent.d.ts.map +1 -1
  184. package/dist/types/src/components/shared/GutterContainer/index.d.ts +8 -4
  185. package/dist/types/src/components/shared/GutterContainer/index.d.ts.map +1 -1
  186. package/dist/types/src/components/shared/grid-item.d.ts +17 -0
  187. package/dist/types/src/components/shared/grid-item.d.ts.map +1 -0
  188. package/dist/types/src/components/utils/responsive-style.d.ts +22 -1
  189. package/dist/types/src/components/utils/responsive-style.d.ts.map +1 -1
  190. package/dist/types/src/controls/style.d.ts +5 -65
  191. package/dist/types/src/controls/style.d.ts.map +1 -1
  192. package/dist/types/src/css/border-radius.d.ts +20 -0
  193. package/dist/types/src/css/border-radius.d.ts.map +1 -0
  194. package/dist/types/src/css/border.d.ts +31 -0
  195. package/dist/types/src/css/border.d.ts.map +1 -0
  196. package/dist/types/src/css/length-percentage.d.ts +10 -0
  197. package/dist/types/src/css/length-percentage.d.ts.map +1 -0
  198. package/dist/types/src/css/length.d.ts +14 -0
  199. package/dist/types/src/css/length.d.ts.map +1 -0
  200. package/dist/types/src/css/margin.d.ts +20 -0
  201. package/dist/types/src/css/margin.d.ts.map +1 -0
  202. package/dist/types/src/css/padding.d.ts +20 -0
  203. package/dist/types/src/css/padding.d.ts.map +1 -0
  204. package/dist/types/src/next/document.d.ts.map +1 -1
  205. package/dist/types/src/prop-controllers/descriptors.d.ts +96 -33
  206. package/dist/types/src/prop-controllers/descriptors.d.ts.map +1 -1
  207. package/dist/types/src/runtimes/react/controls/style.d.ts.map +1 -1
  208. package/dist/types/src/runtimes/react/controls.d.ts +10 -2
  209. package/dist/types/src/runtimes/react/controls.d.ts.map +1 -1
  210. package/dist/types/src/runtimes/react/use-global-style.d.ts +3 -0
  211. package/dist/types/src/runtimes/react/use-global-style.d.ts.map +1 -0
  212. package/dist/useMediaQuery.es.js +1 -1
  213. package/package.json +1 -3
  214. package/dist/cssMediaRules.cjs.js +0 -210
  215. package/dist/cssMediaRules.cjs.js.map +0 -1
  216. package/dist/cssMediaRules.es.js +0 -201
  217. package/dist/cssMediaRules.es.js.map +0 -1
  218. package/dist/index.cjs4.js +0 -18
  219. package/dist/index.cjs4.js.map +0 -1
  220. package/dist/index.es4.js +0 -13
  221. package/dist/index.es4.js.map +0 -1
  222. package/dist/types/src/components/builtin/Form/components/Field/services/cssField.d.ts.map +0 -1
  223. package/dist/types/src/components/utils/cssMediaRules.d.ts +0 -69
  224. package/dist/types/src/components/utils/cssMediaRules.d.ts.map +0 -1
  225. package/dist/useBoxShadow.cjs.js +0 -78
  226. package/dist/useBoxShadow.cjs.js.map +0 -1
  227. package/dist/useBoxShadow.es.js +0 -77
  228. package/dist/useBoxShadow.es.js.map +0 -1
@@ -30,17 +30,15 @@ var __objRest = (source, exclude) => {
30
30
  return target;
31
31
  };
32
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 { G as GutterContainer } from "./index.es4.js";
33
+ import { forwardRef, useRef, useState, createElement, Fragment as Fragment$1 } from "react";
34
+ import { G as GutterContainer } from "./index.es3.js";
36
35
  import ImageComponent from "./Image.es.js";
37
36
  import Button from "./Button.es.js";
37
+ import { q as useStyle, w as useIsomorphicLayoutEffect, l as useResponsiveColor, t as responsiveTextStyle, r as responsiveStyle, v as colorToString } from "./index.es.js";
38
38
  import { jsx, Fragment, jsxs } from "react/jsx-runtime";
39
- import { i as cssTextStyle, c as cssMediaRules, a as cssWidth, b as cssMargin } from "./cssMediaRules.es.js";
40
- import { q as useIsomorphicLayoutEffect, k as useResponsiveColor, p as colorToString } from "./index.es.js";
41
- import { L as Link } from "./index.es3.js";
39
+ import { L as Link } from "./index.es2.js";
40
+ import { keyframes, cx } from "@emotion/css";
42
41
  import "next/image";
43
- import "./useBoxShadow.es.js";
44
42
  import "./placeholders.es.js";
45
43
  import "use-sync-external-store/shim/with-selector";
46
44
  import "./react-page.es.js";
@@ -56,7 +54,6 @@ import "slate";
56
54
  import "./graphql.es.js";
57
55
  import "./text-input.es.js";
58
56
  import "./combobox.es.js";
59
- import "@emotion/css";
60
57
  import "color";
61
58
  import "scroll-into-view-if-needed";
62
59
  import "./box-models.es.js";
@@ -97,15 +94,20 @@ var SvgMobileMenu28 = function SvgMobileMenu282(props) {
97
94
  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"
98
95
  })));
99
96
  };
100
- const PlaceholderLink = styled.div.withConfig({
101
- shouldForwardProp: (prop) => !["width", "button"].includes(prop.toString())
102
- })`
103
- width: ${(props) => props.width}px;
104
- height: ${(props) => props.button === true ? 32 : 8}px;
105
- background-color: #a1a8c2;
106
- border-radius: ${(props) => props.button === true ? 6 : 2}px;
107
- opacity: 0.4;
108
- `;
97
+ function PlaceholderLink({
98
+ width,
99
+ button
100
+ }) {
101
+ return /* @__PURE__ */ jsx("div", {
102
+ className: useStyle({
103
+ width,
104
+ height: button === true ? 32 : 8,
105
+ backgroundColor: "#a1a8c2",
106
+ borderRadius: button === true ? 6 : 2,
107
+ opacity: 0.4
108
+ })
109
+ });
110
+ }
109
111
  const links = [{
110
112
  width: 50
111
113
  }, {
@@ -227,27 +229,37 @@ var SvgChevronDown8 = function SvgChevronDown82(props) {
227
229
  })));
228
230
  };
229
231
  const DROP_DOWN_MENU_WIDTH = 200;
230
- const DropDownMenu$1 = styled.div.withConfig({
231
- shouldForwardProp: (prop) => !["position"].includes(prop.toString())
232
- })`
233
- position: absolute;
234
- top: 100%;
235
- left: ${(props) => props.position === "left" ? 0 : "auto"};
236
- right: ${(props) => props.position === "right" ? 0 : "auto"};
237
- background: #fff;
238
- margin: 0;
239
- padding: 8px 0;
240
- border-radius: 4px;
241
- box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
242
- width: ${DROP_DOWN_MENU_WIDTH}px;
243
- z-index: 99;
244
- list-style: none;
245
- overflow: hidden;
246
- transform-origin: 50% 0;
247
- will-change: transform, opacity;
248
- transform-style: preserve-3d;
249
- display: none;
250
- `;
232
+ const DROP_DOWN_MENU_CLASS_NAME = "drop-down-menu";
233
+ function DropDownMenu$1(_a) {
234
+ var _b = _a, {
235
+ className,
236
+ position
237
+ } = _b, restOfProps = __objRest(_b, [
238
+ "className",
239
+ "position"
240
+ ]);
241
+ return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({}, restOfProps), {
242
+ className: cx(DROP_DOWN_MENU_CLASS_NAME, useStyle({
243
+ position: "absolute",
244
+ top: "100%",
245
+ left: position === "left" ? 0 : "auto",
246
+ right: position === "right" ? 0 : "auto",
247
+ background: "#fff",
248
+ margin: 0,
249
+ padding: "8px 0",
250
+ borderRadius: 4,
251
+ boxShadow: "0 3px 10px rgba(0, 0, 0, 0.15)",
252
+ width: DROP_DOWN_MENU_WIDTH,
253
+ zIndex: 99,
254
+ listStyle: "none",
255
+ overflow: "hidden",
256
+ transformOrigin: "50% 0",
257
+ willChange: "transform, opacity",
258
+ transformStyle: "preserve-3d",
259
+ display: "none"
260
+ }), className)
261
+ }));
262
+ }
251
263
  const dropIn = keyframes`
252
264
  0% {
253
265
  opacity: 0;
@@ -258,66 +270,75 @@ const dropIn = keyframes`
258
270
  transform: none;
259
271
  }
260
272
  `;
261
- const DropDownContainer = styled.div`
262
- position: relative;
263
-
264
- &:hover > ${DropDownMenu$1} {
265
- display: block;
266
- animation: ${dropIn} 0.25s;
267
- }
268
- `;
269
- const StyledDropDownItem = styled(Link).withConfig({
270
- shouldForwardProp: (prop) => !["color", "textStyle"].includes(prop.toString())
271
- })`
272
- display: block;
273
- text-decoration: none;
274
- line-height: 1.4;
275
- padding: 8px 16px;
276
- color: black;
277
- background-color: transparent;
278
- transition: background-color 0.2s;
279
- ${cssTextStyle()}
280
- ${(p) => cssMediaRules([p.color, p.textStyle], ([color, textStyle = {}]) => {
281
- const fontSize = textStyle.fontSize || {
282
- value: 14,
283
- unit: "px"
284
- };
285
- const fontWeight = textStyle.fontWeight == null ? "normal" : textStyle.fontWeight;
286
- const fontStyle = textStyle.fontStyle || [];
287
- const letterSpacing = textStyle.letterSpacing == null ? null : textStyle.letterSpacing;
288
- const textTransform = textStyle.textTransform || [];
289
- return css`
290
- color: ${color == null ? "black" : colorToString(color)};
291
- font-size: ${`${fontSize.value}${fontSize.unit}`};
292
- font-weight: ${fontWeight};
293
- font-style: ${fontStyle.includes("italic") ? "italic" : "normal"};
294
- letter-spacing: ${letterSpacing == null ? "normal" : `${letterSpacing}px`};
295
- text-transform: ${textTransform.includes("uppercase") ? "uppercase" : "none"};
296
- `;
297
- })}
298
-
299
- &:hover {
300
- background-color: rgba(0, 0, 0, 0.04);
301
- }
302
- `;
303
- function DropDownItem$1(_a) {
304
- var _b = _a, {
305
- color
306
- } = _b, restOfProps = __objRest(_b, [
307
- "color"
273
+ const DropDownContainer = forwardRef(function DropDownContainer2(_c, ref) {
274
+ var _d = _c, {
275
+ className
276
+ } = _d, restOfProps = __objRest(_d, [
277
+ "className"
308
278
  ]);
309
- return /* @__PURE__ */ jsx(StyledDropDownItem, __spreadProps(__spreadValues({}, restOfProps), {
310
- color: useResponsiveColor(color)
279
+ return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({}, restOfProps), {
280
+ ref,
281
+ className: cx(useStyle({
282
+ position: "relative",
283
+ [`&:hover .${DROP_DOWN_MENU_CLASS_NAME}`]: {
284
+ display: "block",
285
+ animation: `${dropIn} 0.25s`
286
+ }
287
+ }), className)
288
+ }));
289
+ });
290
+ function DropDownItem$1(_e) {
291
+ var _f = _e, {
292
+ className,
293
+ color,
294
+ textStyle
295
+ } = _f, restOfProps = __objRest(_f, [
296
+ "className",
297
+ "color",
298
+ "textStyle"
299
+ ]);
300
+ const colorData = useResponsiveColor(color);
301
+ return /* @__PURE__ */ jsx(Link, __spreadProps(__spreadValues({}, restOfProps), {
302
+ className: cx(useStyle({
303
+ display: "block",
304
+ textDecoration: "none",
305
+ lineHeight: 1.4,
306
+ padding: "8px 16px",
307
+ color: "black",
308
+ backgroundColor: "transparent",
309
+ transition: "background-color 0.2s"
310
+ }), useStyle(responsiveTextStyle(textStyle)), useStyle(responsiveStyle([colorData, textStyle], ([color2, textStyle2 = {}]) => {
311
+ const fontSize = textStyle2.fontSize || {
312
+ value: 14,
313
+ unit: "px"
314
+ };
315
+ const fontWeight = textStyle2.fontWeight == null ? "normal" : textStyle2.fontWeight;
316
+ const fontStyle = textStyle2.fontStyle || [];
317
+ const letterSpacing = textStyle2.letterSpacing == null ? null : textStyle2.letterSpacing;
318
+ const textTransform = textStyle2.textTransform || [];
319
+ return {
320
+ color: color2 == null ? "black" : colorToString(color2),
321
+ fontSize: `${fontSize.value}${fontSize.unit}`,
322
+ fontWeight,
323
+ fontStyle: fontStyle.includes("italic") ? "italic" : "normal",
324
+ letterSpacing: letterSpacing == null ? "normal" : `${letterSpacing}px`,
325
+ textTransform: textTransform.includes("uppercase") ? "uppercase" : "none"
326
+ };
327
+ })), useStyle({
328
+ "&:hover": {
329
+ backgroundColor: "rgba(0, 0, 0, 0.04)"
330
+ }
331
+ }), className)
311
332
  }));
312
333
  }
313
- function DropDownButton(_c) {
314
- var _d = _c, {
334
+ function DropDownButton(_g) {
335
+ var _h = _g, {
315
336
  label,
316
337
  caret = "caret",
317
338
  links: links2 = [],
318
339
  textColor,
319
340
  color
320
- } = _d, restOfProps = __objRest(_d, [
341
+ } = _h, restOfProps = __objRest(_h, [
321
342
  "label",
322
343
  "caret",
323
344
  "links",
@@ -393,40 +414,58 @@ var SvgTimes16 = function SvgTimes162(props) {
393
414
  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"
394
415
  })));
395
416
  };
396
- const DropDownMenu = styled.div.withConfig({
397
- shouldForwardProp: (prop) => !["open"].includes(prop.toString())
398
- })`
399
- display: ${(props) => props.open ? "flex" : "none"};
400
- flex-direction: column;
401
- padding: 8px;
402
- `;
403
- const ButtonLink$1 = styled(Button)`
404
- margin: 8px 0;
405
- `;
406
- const StyledLink = styled(Link).withConfig({
407
- shouldForwardProp: (prop) => !["textStyle", "color"].includes(prop.toString())
408
- })`
409
- text-decoration: none;
410
- line-height: 1.4;
411
- padding: 8px 16px;
412
- color: black;
413
- ${cssTextStyle()}
414
- ${(p) => cssMediaRules([p.color], ([color]) => css`
415
- color: ${color == null ? "black" : colorToString(color)};
416
- `)}
417
- `;
418
- function DropDownItem(_e) {
419
- var _f = _e, {
420
- color
421
- } = _f, restOfProps = __objRest(_f, [
422
- "color"
417
+ function DropDownMenu(_i) {
418
+ var _j = _i, {
419
+ className,
420
+ open
421
+ } = _j, restOfProps = __objRest(_j, [
422
+ "className",
423
+ "open"
423
424
  ]);
424
- return /* @__PURE__ */ jsx(StyledLink, __spreadProps(__spreadValues({}, restOfProps), {
425
- color: useResponsiveColor(color)
425
+ return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({}, restOfProps), {
426
+ className: cx(useStyle({
427
+ display: open ? "flex" : "none",
428
+ flexDirection: "column",
429
+ padding: 8
430
+ }), className)
426
431
  }));
427
432
  }
428
- function MobileDropDownButton(_g) {
429
- var _h = _g, {
433
+ function ButtonLink$1(_k) {
434
+ var _l = _k, {
435
+ className
436
+ } = _l, restOfProps = __objRest(_l, [
437
+ "className"
438
+ ]);
439
+ return /* @__PURE__ */ jsx(Button, __spreadProps(__spreadValues({}, restOfProps), {
440
+ className: cx(useStyle({
441
+ margin: "8px 0"
442
+ }), className)
443
+ }));
444
+ }
445
+ function DropDownItem(_m) {
446
+ var _n = _m, {
447
+ color,
448
+ className,
449
+ textStyle
450
+ } = _n, restOfProps = __objRest(_n, [
451
+ "color",
452
+ "className",
453
+ "textStyle"
454
+ ]);
455
+ const colorData = useResponsiveColor(color);
456
+ return /* @__PURE__ */ jsx(Link, __spreadProps(__spreadValues({}, restOfProps), {
457
+ className: cx(useStyle({
458
+ textDecoration: "none",
459
+ lineHeight: 1.4,
460
+ padding: "8px 16px",
461
+ color: "black"
462
+ }), useStyle(responsiveTextStyle(textStyle)), useStyle(responsiveStyle([colorData], ([color2]) => ({
463
+ color: color2 == null ? "black" : colorToString(color2)
464
+ }))), className)
465
+ }));
466
+ }
467
+ function MobileDropDownButton(_o) {
468
+ var _p = _o, {
430
469
  label,
431
470
  caret,
432
471
  links: links2 = [],
@@ -434,7 +473,7 @@ function MobileDropDownButton(_g) {
434
473
  },
435
474
  color,
436
475
  textColor
437
- } = _h, restOfProps = __objRest(_h, [
476
+ } = _p, restOfProps = __objRest(_p, [
438
477
  "label",
439
478
  "caret",
440
479
  "links",
@@ -480,71 +519,96 @@ function MobileDropDownButton(_g) {
480
519
  })]
481
520
  });
482
521
  }
483
- function NavigationButton$1(props) {
484
- const _a = props, {
522
+ function ButtonLink(_q) {
523
+ var _r = _q, {
524
+ className,
485
525
  textColor,
486
526
  color
487
- } = _a, restOfProps = __objRest(_a, [
527
+ } = _r, restOfProps = __objRest(_r, [
528
+ "className",
488
529
  "textColor",
489
530
  "color"
490
531
  ]);
491
532
  return /* @__PURE__ */ jsx(Button, __spreadProps(__spreadValues({}, restOfProps), {
533
+ className: cx(useStyle({
534
+ margin: "8px 0"
535
+ }), className),
492
536
  textColor: useResponsiveColor(textColor),
493
537
  color: useResponsiveColor(color)
494
538
  }));
495
539
  }
496
- const ButtonLink = styled(NavigationButton$1)`
497
- margin: 8px 0;
498
- `;
499
- const Container$1 = styled.div.withConfig({
500
- shouldForwardProp: (prop) => !["animation", "backgroundColor", "open"].includes(prop.toString())
501
- })`
502
- position: fixed;
503
- flex-direction: column;
504
- width: 100%;
505
- padding: 40px 15px;
506
- transition: transform 300ms ease-in-out;
507
- overflow-y: auto;
508
- z-index: 9999;
509
- max-width: 575px;
510
- ${(p) => cssMediaRules([p.animation, p.backgroundColor], ([animation, backgroundColor]) => animation == null ? css`
511
- display: none;
512
- ` : css`
513
- display: flex;
514
- background-color: ${backgroundColor == null ? "black" : colorToString(backgroundColor)};
515
- transform: ${p.open ? `translate3d(0,0,0)` : `translate3d(${{
516
- coverRight: "",
517
- coverLeft: "-"
518
- }[animation]}100%, 0, 0)`};
519
- ${{
520
- coverRight: {
521
- top: 0,
522
- bottom: 0,
523
- right: 0
524
- },
525
- coverLeft: {
526
- top: 0,
527
- bottom: 0,
528
- left: 0
529
- }
530
- }[animation]}
531
- `)}
532
- `;
533
- const CloseIconContainer = styled.button.withConfig({
534
- shouldForwardProp: (prop) => !["color"].includes(prop.toString())
535
- })`
536
- position: absolute;
537
- top: 15px;
538
- right: 15px;
539
- padding: 0;
540
- border: 0;
541
- outline: 0;
542
- background: none;
543
- fill: currentColor;
544
- ${(p) => cssMediaRules([p.color], ([color]) => css`
545
- color: ${color == null ? "rgba(161, 168, 194, 0.5)" : colorToString(color)};
546
- `)}
547
- `;
540
+ function Container$1(_s) {
541
+ var _t = _s, {
542
+ className,
543
+ animation,
544
+ backgroundColor,
545
+ open
546
+ } = _t, restOfProps = __objRest(_t, [
547
+ "className",
548
+ "animation",
549
+ "backgroundColor",
550
+ "open"
551
+ ]);
552
+ return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({}, restOfProps), {
553
+ className: cx(useStyle({
554
+ position: "fixed",
555
+ flexDirection: "column",
556
+ width: "100%",
557
+ padding: "40px 15px",
558
+ transition: "transform 300ms ease-in-out",
559
+ overflowY: "auto",
560
+ zIndex: 9999,
561
+ maxWidth: 575
562
+ }), useStyle(responsiveStyle([animation, backgroundColor], ([animation2, backgroundColor2]) => {
563
+ if (animation2 == null)
564
+ return {
565
+ display: "none"
566
+ };
567
+ return __spreadValues({
568
+ display: "flex",
569
+ backgroundColor: backgroundColor2 == null ? "black" : colorToString(backgroundColor2),
570
+ transform: open ? `translate3d(0,0,0)` : `translate3d(${{
571
+ coverRight: "",
572
+ coverLeft: "-"
573
+ }[animation2]}100%, 0, 0)`
574
+ }, {
575
+ coverRight: {
576
+ top: 0,
577
+ bottom: 0,
578
+ right: 0
579
+ },
580
+ coverLeft: {
581
+ top: 0,
582
+ bottom: 0,
583
+ left: 0
584
+ }
585
+ }[animation2]);
586
+ })), className)
587
+ }));
588
+ }
589
+ function CloseIconContainer(_u) {
590
+ var _v = _u, {
591
+ className,
592
+ color
593
+ } = _v, restOfProps = __objRest(_v, [
594
+ "className",
595
+ "color"
596
+ ]);
597
+ return /* @__PURE__ */ jsx("button", __spreadProps(__spreadValues({}, restOfProps), {
598
+ className: cx(useStyle({
599
+ position: "absolute",
600
+ top: 15,
601
+ right: 15,
602
+ padding: 0,
603
+ border: 0,
604
+ outline: 0,
605
+ background: "none",
606
+ fill: "currentcolor"
607
+ }), useStyle(responsiveStyle([color], ([color2]) => ({
608
+ color: color2 == null ? "rgba(161, 168, 194, 0.5)" : colorToString(color2)
609
+ }))), className)
610
+ }));
611
+ }
548
612
  function MobileMenu({
549
613
  animation,
550
614
  backgroundColor,
@@ -580,49 +644,83 @@ function MobileMenu({
580
644
  })]
581
645
  });
582
646
  }
583
- const Container = styled.nav.withConfig({
584
- shouldForwardProp: (prop) => !["width", "margin", "textStyle", "gutter"].includes(prop.toString())
585
- })`
586
- display: flex;
587
- align-items: center;
588
- ${cssWidth()}
589
- ${cssMargin()}
590
- ${cssTextStyle()}
591
- ${(p) => cssMediaRules([p.gutter], ([gutter = {
592
- value: 0,
593
- unit: "px"
594
- }]) => css`
595
- gap: ${gutter.value}${gutter.unit};
596
- `)}
597
- `;
598
- const LinksContainer = styled.div.withConfig({
599
- shouldForwardProp: (prop) => !["alignment", "mobileMenuAnimation"].includes(prop.toString())
600
- })`
601
- display: flex;
602
- align-items: center;
603
- flex-grow: 1;
604
- ${(p) => cssMediaRules([p.alignment, p.mobileMenuAnimation], ([alignment = "flex-end", mobileMenuAnimation]) => css`
605
- display: ${mobileMenuAnimation == null ? "flex" : "none"};
606
- justify-content: ${alignment};
607
- `)}
608
- `;
609
- const OpenIconContainer = styled.button.withConfig({
610
- shouldForwardProp: (prop) => !["mobileMenuAnimation", "alignment", "color"].includes(prop.toString())
611
- })`
612
- display: none;
613
- flex-grow: 1;
614
- align-items: center;
615
- background: none;
616
- outline: 0;
617
- border: 0;
618
- padding: 0;
619
- fill: currentColor;
620
- ${(p) => cssMediaRules([p.mobileMenuAnimation, p.alignment, p.color], ([mobileMenuAnimation, alignment = "flex-end", color]) => css`
621
- display: ${mobileMenuAnimation == null ? "none" : "flex"};
622
- justify-content: ${alignment};
623
- color: ${color == null ? "rgba(161, 168, 194, 0.5)" : colorToString(color)};
624
- `)}
625
- `;
647
+ const Container = forwardRef(function Container2(_w, ref) {
648
+ var _x = _w, {
649
+ className,
650
+ width,
651
+ margin,
652
+ textStyle,
653
+ gutter
654
+ } = _x, restOfProps = __objRest(_x, [
655
+ "className",
656
+ "width",
657
+ "margin",
658
+ "textStyle",
659
+ "gutter"
660
+ ]);
661
+ return /* @__PURE__ */ jsx("nav", __spreadProps(__spreadValues({}, restOfProps), {
662
+ ref,
663
+ className: cx(useStyle({
664
+ display: "flex",
665
+ alignItems: "center"
666
+ }), width, margin, useStyle(responsiveTextStyle(textStyle)), useStyle(responsiveStyle([gutter], ([gutter2 = {
667
+ value: 0,
668
+ unit: "px"
669
+ }]) => ({
670
+ gap: `${gutter2.value}${gutter2.unit}`
671
+ }))), className)
672
+ }));
673
+ });
674
+ function LinksContainer(_y) {
675
+ var _z = _y, {
676
+ className,
677
+ alignment,
678
+ mobileMenuAnimation
679
+ } = _z, restOfProps = __objRest(_z, [
680
+ "className",
681
+ "alignment",
682
+ "mobileMenuAnimation"
683
+ ]);
684
+ return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({}, restOfProps), {
685
+ className: cx(useStyle({
686
+ display: "flex",
687
+ alignItems: "center",
688
+ flexGrow: 1
689
+ }), useStyle(responsiveStyle([alignment, mobileMenuAnimation], ([alignment2 = "flex-end", mobileMenuAnimation2]) => ({
690
+ display: mobileMenuAnimation2 == null ? "flex" : "none",
691
+ justifyContent: alignment2
692
+ }))), className)
693
+ }));
694
+ }
695
+ function OpenIconContainer(_A) {
696
+ var _B = _A, {
697
+ className,
698
+ mobileMenuAnimation,
699
+ alignment,
700
+ color
701
+ } = _B, restOfProps = __objRest(_B, [
702
+ "className",
703
+ "mobileMenuAnimation",
704
+ "alignment",
705
+ "color"
706
+ ]);
707
+ return /* @__PURE__ */ jsx("button", __spreadProps(__spreadValues({}, restOfProps), {
708
+ className: cx(useStyle({
709
+ display: "none",
710
+ flexGrow: 1,
711
+ alignItems: "center",
712
+ background: "none",
713
+ outline: 0,
714
+ border: 0,
715
+ padding: 0,
716
+ fill: "currentcolor"
717
+ }), useStyle(responsiveStyle([mobileMenuAnimation, alignment, color], ([mobileMenuAnimation2, alignment2 = "flex-end", color2]) => ({
718
+ display: mobileMenuAnimation2 == null ? "none" : "flex",
719
+ justifyContent: alignment2,
720
+ color: color2 == null ? "rgba(161, 168, 194, 0.5)" : colorToString(color2)
721
+ }))), className)
722
+ }));
723
+ }
626
724
  function NavigationButton(props) {
627
725
  const _a = props, {
628
726
  textColor,