@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
package/dist/Form.cjs.js CHANGED
@@ -32,14 +32,13 @@ var __objRest = (source, exclude) => {
32
32
  };
33
33
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
34
34
  var React = require("react");
35
- var styled = require("styled-components");
36
35
  var formik = require("formik");
37
- var cssMediaRules = require("./cssMediaRules.cjs.js");
36
+ var css = require("@emotion/css");
38
37
  var next = require("./index.cjs.js");
39
38
  var jsxRuntime = require("react/jsx-runtime");
40
39
  var ColorHelper = require("color");
41
40
  var Button$1 = require("./Button.cjs.js");
42
- var index = require("./index.cjs3.js");
41
+ var index = require("./index.cjs2.js");
43
42
  var boxModels = require("./box-models.cjs.js");
44
43
  var client = require("@apollo/client");
45
44
  require("use-sync-external-store/shim/with-selector");
@@ -55,7 +54,6 @@ require("slate");
55
54
  require("./graphql.cjs.js");
56
55
  require("./text-input.cjs.js");
57
56
  require("./combobox.cjs.js");
58
- require("@emotion/css");
59
57
  require("scroll-into-view-if-needed");
60
58
  require("react-dom");
61
59
  require("html-react-parser");
@@ -94,7 +92,6 @@ function _interopNamespace(e) {
94
92
  return Object.freeze(n);
95
93
  }
96
94
  var React__namespace = /* @__PURE__ */ _interopNamespace(React);
97
- var styled__default = /* @__PURE__ */ _interopDefaultLegacy(styled);
98
95
  var ColorHelper__default = /* @__PURE__ */ _interopDefaultLegacy(ColorHelper);
99
96
  var _path;
100
97
  function _extends$1() {
@@ -211,36 +208,32 @@ function getContrastPlaceholderColor(contrast) {
211
208
  throw new Error(`Invalid form contrast "${contrast}"`);
212
209
  }
213
210
  }
214
- function cssField() {
215
- return styled.css`
216
- display: block;
217
- width: 100%;
218
- outline: none;
219
- border-width: 1px;
220
- border-style: solid;
221
- transition: border-color 200ms;
222
- ${(props) => cssMediaRules.cssMediaRules([props.shape, props.size, props.contrast, props.brandColor], ([
211
+ function responsiveField(props) {
212
+ return __spreadValues({
213
+ display: "block",
214
+ width: "100%",
215
+ outline: "none",
216
+ borderWidth: 1,
217
+ borderStyle: "solid",
218
+ transition: "border-color 200ms"
219
+ }, next.responsiveStyle([props.shape, props.size, props.contrast, props.brandColor], ([
223
220
  shape = next.Shapes.ROUNDED,
224
221
  size = next.Sizes.MEDIUM,
225
222
  contrast = next.Contrasts.LIGHT,
226
223
  brandColor = { swatch: { hue: 0, saturation: 0, lightness: 0 }, alpha: 1 }
227
- ]) => styled.css`
228
- padding: ${getSizeVerticalPadding(size)}px ${getSizeHorizontalPadding(size)}px;
229
- border-radius: ${getShapeBorderRadius(shape)}px;
230
- border-color: ${getContrastBorderColor(contrast, props.error)};
231
- color: ${getContrastColor$1(contrast)};
232
- background-color: ${getContrastBackgroundColor(contrast)};
233
-
234
- :focus,
235
- :focus-within {
236
- border-color: ${next.colorToString(brandColor)};
237
- }
238
-
239
- ::placeholder {
240
- color: ${getContrastPlaceholderColor(contrast)};
241
- }
242
- `)}
243
- `;
224
+ ]) => ({
225
+ padding: `${getSizeVerticalPadding(size)}px ${getSizeHorizontalPadding(size)}px`,
226
+ borderRadius: getShapeBorderRadius(shape),
227
+ borderColor: getContrastBorderColor(contrast, props.error),
228
+ color: getContrastColor$1(contrast),
229
+ backgroundColor: getContrastBackgroundColor(contrast),
230
+ ":focus, :focus-within": {
231
+ borderColor: next.colorToString(brandColor)
232
+ },
233
+ "::placeholder": {
234
+ color: getContrastPlaceholderColor(contrast)
235
+ }
236
+ })));
244
237
  }
245
238
  function getSizeHeight$1(size) {
246
239
  switch (size) {
@@ -254,22 +247,15 @@ function getSizeHeight$1(size) {
254
247
  throw new Error(`Invalid form size "${size}"`);
255
248
  }
256
249
  }
257
- const Base$2 = styled__default["default"].input.withConfig({
258
- shouldForwardProp: (prop, defaultValidator) => !["shape", "size", "contrast", "brandColor", "error"].includes(prop.toString()) && defaultValidator(prop)
259
- })`
260
- ${cssField()}
261
- ${(props) => cssMediaRules.cssMediaRules([props.size], ([size = next.Sizes.MEDIUM]) => styled.css`
262
- min-height: ${getSizeHeight$1(size)}px;
263
- max-height: ${getSizeHeight$1(size)}px;
264
- `)}
265
- `;
266
250
  var Input$2 = React.forwardRef(function Input2(_a, ref) {
267
251
  var _b = _a, {
268
252
  error = false,
269
- form
253
+ form,
254
+ className
270
255
  } = _b, restOfProps = __objRest(_b, [
271
256
  "error",
272
- "form"
257
+ "form",
258
+ "className"
273
259
  ]);
274
260
  const {
275
261
  shape,
@@ -277,58 +263,68 @@ var Input$2 = React.forwardRef(function Input2(_a, ref) {
277
263
  contrast,
278
264
  brandColor
279
265
  } = next.useFormContext();
280
- return /* @__PURE__ */ jsxRuntime.jsx(Base$2, __spreadProps(__spreadValues({}, restOfProps), {
266
+ return /* @__PURE__ */ jsxRuntime.jsx("input", __spreadProps(__spreadValues({}, restOfProps), {
281
267
  ref,
282
- error,
283
- shape,
284
- size,
285
- contrast,
286
- brandColor
268
+ className: css.cx(next.useStyle(responsiveField({
269
+ shape,
270
+ size,
271
+ contrast,
272
+ brandColor,
273
+ error
274
+ })), next.useStyle(next.responsiveStyle([size], ([size2 = next.Sizes.MEDIUM]) => ({
275
+ minHeight: getSizeHeight$1(size2),
276
+ maxHeight: getSizeHeight$1(size2)
277
+ }))), className)
287
278
  }));
288
279
  });
289
- const Container$3 = styled__default["default"].div.withConfig({
290
- shouldForwardProp: (prop) => !["width", "margin"].includes(prop.toString())
291
- })`
292
- display: flex;
293
- flex-direction: column;
294
- ${cssMediaRules.cssWidth()};
295
- ${cssMediaRules.cssMargin()};
296
- `;
297
- const Label$2 = styled__default["default"].div`
298
- max-width: 120px;
299
- min-width: 60px;
300
- height: 8px;
301
- border-radius: 2px;
302
- background-color: #a1a8c2;
303
- opacity: 0.4;
304
- margin-bottom: 8px;
305
- `;
306
- const Input$1 = styled__default["default"].div`
307
- min-width: 80px;
308
- height: 32px;
309
- border-radius: 4px;
310
- border-width: 2px;
311
- border-style: solid;
312
- border-color: #a1a8c2;
313
- opacity: 0.4;
314
- `;
315
- const Button = styled__default["default"].div`
316
- min-width: 140px;
317
- height: 32px;
318
- border-radius: 4px;
319
- background-color: #a1a8c2;
320
- opacity: 0.4;
321
- `;
280
+ function Label$2() {
281
+ return /* @__PURE__ */ jsxRuntime.jsx("div", {
282
+ className: next.useStyle({
283
+ maxWidth: 120,
284
+ minWidth: 60,
285
+ height: 8,
286
+ borderRadius: 2,
287
+ backgroundColor: "#a1a8c2",
288
+ opacity: 0.4,
289
+ marginBottom: 8
290
+ })
291
+ });
292
+ }
293
+ function Input$1() {
294
+ return /* @__PURE__ */ jsxRuntime.jsx("div", {
295
+ className: next.useStyle({
296
+ minWidth: 80,
297
+ height: 32,
298
+ borderRadius: 4,
299
+ borderWidth: 2,
300
+ borderStyle: "solid",
301
+ borderColor: "#a1a8c2",
302
+ opacity: 0.4
303
+ })
304
+ });
305
+ }
306
+ function Button() {
307
+ return /* @__PURE__ */ jsxRuntime.jsx("div", {
308
+ className: next.useStyle({
309
+ minWidth: 140,
310
+ height: 32,
311
+ borderRadius: 4,
312
+ backgroundColor: "#a1a8c2",
313
+ opacity: 0.4
314
+ })
315
+ });
316
+ }
322
317
  var Placeholder = React.forwardRef(function Placeholder2({
323
318
  className,
324
319
  width,
325
320
  margin
326
321
  }, ref) {
327
- return /* @__PURE__ */ jsxRuntime.jsxs(Container$3, {
322
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", {
328
323
  ref,
329
- className,
330
- width,
331
- margin,
324
+ className: css.cx(next.useStyle({
325
+ display: "flex",
326
+ flexDirection: "column"
327
+ }), width, margin, className),
332
328
  children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
333
329
  style: {
334
330
  display: "flex",
@@ -375,44 +371,46 @@ function getContrastColor(contrast) {
375
371
  throw new Error(`Invalid form contrast "${contrast}"`);
376
372
  }
377
373
  }
378
- const Base$1 = styled__default["default"].label.withConfig({
379
- shouldForwardProp: (prop, defaultValidator) => !["contrast", "size", "textStyle", "textColor"].includes(prop.toString()) && defaultValidator(prop)
380
- })`
381
- display: block;
382
- margin: 0 0 0.25em 0;
383
- ${cssMediaRules.cssTextStyle()}
384
- ${(props) => cssMediaRules.cssMediaRules([props.size, props.contrast, props.textColor], ([size = next.Sizes.MEDIUM, contrast = next.Contrasts.LIGHT, textColor]) => styled.css`
385
- min-height: ${getSizeHeight(size)}px;
386
- color: ${textColor == null ? getContrastColor(contrast) : next.colorToString(textColor)};
387
- `)}
388
- `;
389
- function Label$1(props) {
374
+ function Label$1(_c) {
375
+ var _d = _c, {
376
+ as,
377
+ className
378
+ } = _d, restOfProps = __objRest(_d, [
379
+ "as",
380
+ "className"
381
+ ]);
382
+ const Component = as != null ? as : "label";
390
383
  const {
391
384
  contrast,
392
385
  size,
393
386
  labelTextStyle,
394
387
  labelTextColor
395
388
  } = next.useFormContext();
396
- return /* @__PURE__ */ jsxRuntime.jsx(Base$1, __spreadProps(__spreadValues({}, props), {
397
- contrast,
398
- size,
399
- textStyle: labelTextStyle,
400
- textColor: labelTextColor
389
+ return /* @__PURE__ */ jsxRuntime.jsx(Component, __spreadProps(__spreadValues({}, restOfProps), {
390
+ className: css.cx(next.useStyle({
391
+ display: "block",
392
+ margin: "0 0 0.25em 0"
393
+ }), next.useStyle(next.responsiveTextStyle(labelTextStyle)), next.useStyle(next.responsiveStyle([size, contrast, labelTextColor], ([size2 = next.Sizes.MEDIUM, contrast2 = next.Contrasts.LIGHT, textColor]) => ({
394
+ minHeight: getSizeHeight(size2),
395
+ color: textColor == null ? getContrastColor(contrast2) : next.colorToString(textColor)
396
+ }))), className)
401
397
  }));
402
398
  }
403
- var SingleLineTextTableField = React.forwardRef(function SingleLineTextTableField2(_c, ref) {
404
- var _d = _c, {
399
+ var SingleLineTextTableField = React.forwardRef(function SingleLineTextTableField2(_e, ref) {
400
+ var _f = _e, {
405
401
  id,
406
402
  label = "",
407
403
  name,
408
404
  error,
409
- hideLabel = false
410
- } = _d, restOfProps = __objRest(_d, [
405
+ hideLabel = false,
406
+ tableColumn
407
+ } = _f, restOfProps = __objRest(_f, [
411
408
  "id",
412
409
  "label",
413
410
  "name",
414
411
  "error",
415
- "hideLabel"
412
+ "hideLabel",
413
+ "tableColumn"
416
414
  ]);
417
415
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
418
416
  children: [!hideLabel && /* @__PURE__ */ jsxRuntime.jsx(Label$1, {
@@ -428,17 +426,11 @@ var SingleLineTextTableField = React.forwardRef(function SingleLineTextTableFiel
428
426
  }))]
429
427
  });
430
428
  });
431
- const Base = styled__default["default"].textarea.withConfig({
432
- shouldForwardProp: (prop, defaultValidator) => !["error", "shape", "size", "contrast", "brandColor"].includes(prop.toString()) && defaultValidator(prop)
433
- })`
434
- resize: vertical;
435
- ${cssField()}
436
- `;
437
- var TextArea = React.forwardRef(function TextArea2(_e, ref) {
438
- var _f = _e, {
429
+ var TextArea = React.forwardRef(function TextArea2(_g2, ref) {
430
+ var _h = _g2, {
439
431
  error = false,
440
432
  form
441
- } = _f, restOfProps = __objRest(_f, [
433
+ } = _h, restOfProps = __objRest(_h, [
442
434
  "error",
443
435
  "form"
444
436
  ]);
@@ -448,27 +440,33 @@ var TextArea = React.forwardRef(function TextArea2(_e, ref) {
448
440
  contrast,
449
441
  brandColor
450
442
  } = next.useFormContext();
451
- return /* @__PURE__ */ jsxRuntime.jsx(Base, __spreadProps(__spreadValues({}, restOfProps), {
443
+ return /* @__PURE__ */ jsxRuntime.jsx("textarea", __spreadProps(__spreadValues({}, restOfProps), {
452
444
  ref,
453
- rows: 4,
454
- error,
455
- shape,
456
- size,
457
- contrast,
458
- brandColor
445
+ className: css.cx(next.useStyle({
446
+ resize: "vertical"
447
+ }), next.useStyle(responsiveField({
448
+ error,
449
+ shape,
450
+ size,
451
+ contrast,
452
+ brandColor
453
+ }))),
454
+ rows: 4
459
455
  }));
460
456
  });
461
- var LongTextTableField = React.forwardRef(function LongTextTableField2(_g2, ref) {
462
- var _h = _g2, {
457
+ var LongTextTableField = React.forwardRef(function LongTextTableField2(_i, ref) {
458
+ var _j = _i, {
463
459
  id,
464
460
  label = "",
465
461
  error,
466
- hideLabel = false
467
- } = _h, restOfProps = __objRest(_h, [
462
+ hideLabel = false,
463
+ tableColumn
464
+ } = _j, restOfProps = __objRest(_j, [
468
465
  "id",
469
466
  "label",
470
467
  "error",
471
- "hideLabel"
468
+ "hideLabel",
469
+ "tableColumn"
472
470
  ]);
473
471
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
474
472
  children: [!hideLabel && /* @__PURE__ */ jsxRuntime.jsx(Label$1, {
@@ -496,122 +494,124 @@ function getCheckmarkColor$1({
496
494
  l
497
495
  }).alpha(a).isLight() ? "rgba(0, 0, 0, 0.7)" : "rgba(255, 255, 255, 0.95)";
498
496
  }
499
- const Container$2 = styled__default["default"].div.withConfig({
500
- shouldForwardProp: (prop) => !["size"].includes(prop)
501
- })`
502
- position: relative;
503
- ${(props) => cssMediaRules.cssMediaRules([props.size], ([size = next.Sizes.MEDIUM]) => styled.css`
504
- height: ${getSizeHeight(size)}px;
505
- width: ${getSizeHeight(size)}px;
506
- `)}
507
- `;
508
- const FakeCheckbox = styled__default["default"].div.withConfig({
509
- shouldForwardProp: (prop) => !["contrast", "error"].includes(prop)
510
- })`
511
- position: absolute;
512
- width: 100%;
513
- height: 100%;
514
- border-style: solid;
515
- border-radius: 4px;
516
- pointer-events: none;
517
- border-width: 1px;
518
- ${(props) => cssMediaRules.cssMediaRules([props.contrast], ([contrast = next.Contrasts.LIGHT]) => styled.css`
519
- border-color: ${getContrastBorderColor(contrast, props.error)};
520
- background-color: ${getContrastBackgroundColor(contrast)};
521
- `)}
522
- `;
523
- const HiddenCheckbox = styled__default["default"].input.withConfig({
524
- shouldForwardProp: (prop, defaultValidator) => !["size", "brandColor", "contrast", "error"].includes(prop) && defaultValidator(prop)
525
- })`
526
- position: absolute;
527
- opacity: 0;
528
- width: 100%;
529
- height: 100%;
530
- cursor: pointer;
531
-
532
- &:disabled {
533
- cursor: no-drop;
534
-
535
- & ~ ${FakeCheckbox} {
536
- opacity: 0.5;
537
- }
538
- }
539
-
540
- &:checked ~ ${FakeCheckbox} {
541
- ${(props) => cssMediaRules.cssMediaRules([props.brandColor], ([{
542
- swatch = {
543
- hue: 0,
544
- saturation: 0,
545
- lightness: 0
546
- },
547
- alpha = 1
548
- } = {}]) => styled.css`
549
- background-color: ${next.colorToString({
550
- swatch,
551
- alpha
552
- })};
553
- `)}
554
- border-color: transparent;
555
-
556
- &::after {
557
- content: '';
558
- position: absolute;
559
- box-sizing: content-box;
560
- width: 25%;
561
- height: 50%;
562
- ${(props) => cssMediaRules.cssMediaRules([props.size], ([size = next.Sizes.MEDIUM]) => styled.css`
563
- border-width: ${getSizeHeight(size) * 0.1}px;
564
- border-left: 0;
565
- border-top: 0;
566
- `)}
567
- border-style: solid;
568
- ${(props) => cssMediaRules.cssMediaRules([props.brandColor], ([{
569
- swatch = {
570
- hue: 0,
571
- saturation: 0,
572
- lightness: 0
573
- },
574
- alpha = 1
575
- } = {}]) => styled.css`
576
- border-color: ${getCheckmarkColor$1({
577
- swatch,
578
- alpha
579
- })};
580
- `)}
581
- transform: rotate(45deg) translate3d(91%, -23%, 0);
582
- }
583
- }
584
-
585
- &:not(:disabled) {
586
- &:focus ~ ${FakeCheckbox} {
587
- ${(props) => cssMediaRules.cssMediaRules([props.brandColor], ([brandColor = {
588
- swatch: {
589
- hue: 0,
590
- saturation: 0,
591
- lightness: 0
592
- },
593
- alpha: 1
594
- }]) => styled.css`
595
- border-color: ${next.colorToString(brandColor)};
596
- `)}
597
- }
598
- }
599
-
600
- &:not(:disabled):checked {
601
- &:focus ~ ${FakeCheckbox} {
602
- ${(props) => cssMediaRules.cssMediaRules([props.contrast], ([contrast = next.Contrasts.LIGHT]) => styled.css`
603
- border-color: ${getContrastBorderColor(contrast, props.error)};
604
- `)}
605
- }
606
- }
607
- `;
608
- var Checkbox = React.forwardRef(function Checkbox2(_i, ref) {
609
- var _j = _i, {
497
+ const FAKE_CHECKBOX_CLASS_NAME = "fake-checkbox";
498
+ function FakeCheckbox({
499
+ className,
500
+ style,
501
+ contrast,
502
+ error
503
+ }) {
504
+ return /* @__PURE__ */ jsxRuntime.jsx("div", {
505
+ style,
506
+ className: css.cx(FAKE_CHECKBOX_CLASS_NAME, next.useStyle({
507
+ position: "absolute",
508
+ width: "100%",
509
+ height: "100%",
510
+ borderStyle: "solid",
511
+ borderRadius: 4,
512
+ pointerEvents: "none",
513
+ borderWidth: 1
514
+ }), next.useStyle(next.responsiveStyle([contrast], ([contrast2 = next.Contrasts.LIGHT]) => ({
515
+ borderColor: getContrastBorderColor(contrast2, error),
516
+ backgroundColor: getContrastBackgroundColor(contrast2)
517
+ }))), className)
518
+ });
519
+ }
520
+ const HiddenCheckbox = React.forwardRef(function HiddenCheckbox2(_k, ref) {
521
+ var _l = _k, {
522
+ size,
523
+ brandColor,
524
+ contrast,
525
+ error,
526
+ className
527
+ } = _l, restOfProps = __objRest(_l, [
528
+ "size",
529
+ "brandColor",
530
+ "contrast",
531
+ "error",
532
+ "className"
533
+ ]);
534
+ return /* @__PURE__ */ jsxRuntime.jsx("input", __spreadProps(__spreadValues({}, restOfProps), {
535
+ ref,
536
+ className: css.cx(next.useStyle({
537
+ position: "absolute",
538
+ opacity: 0,
539
+ width: "100%",
540
+ height: "100%",
541
+ cursor: "pointer",
542
+ "&:disabled": {
543
+ cursor: "no-drop",
544
+ [`& ~ .${FAKE_CHECKBOX_CLASS_NAME}`]: {
545
+ opacity: 0.5
546
+ }
547
+ },
548
+ [`&:checked ~ .${FAKE_CHECKBOX_CLASS_NAME}`]: __spreadProps(__spreadValues({}, next.responsiveStyle([brandColor], ([{
549
+ swatch = {
550
+ hue: 0,
551
+ saturation: 0,
552
+ lightness: 0
553
+ },
554
+ alpha = 1
555
+ } = {}]) => ({
556
+ backgroundColor: next.colorToString({
557
+ swatch,
558
+ alpha
559
+ })
560
+ }))), {
561
+ borderColor: "transparent",
562
+ "&::after": __spreadProps(__spreadValues({
563
+ content: '""',
564
+ position: "absolute",
565
+ boxSizing: "content-box",
566
+ width: "25%",
567
+ height: "50%",
568
+ borderStyle: "solid"
569
+ }, next.responsiveStyle([size, brandColor], ([size2 = next.Sizes.MEDIUM, {
570
+ swatch = {
571
+ hue: 0,
572
+ saturation: 0,
573
+ lightness: 0
574
+ },
575
+ alpha = 1
576
+ } = {}]) => ({
577
+ borderWidth: getSizeHeight(size2) * 0.1,
578
+ borderLeft: 0,
579
+ borderTop: 0,
580
+ borderColor: getCheckmarkColor$1({
581
+ swatch,
582
+ alpha
583
+ })
584
+ }))), {
585
+ transform: "rotate(45deg) translate3d(91%, -23%, 0)"
586
+ })
587
+ }),
588
+ "&:not(:disabled)": {
589
+ [`&:focus ~ .${FAKE_CHECKBOX_CLASS_NAME}`]: next.responsiveStyle([brandColor], ([brandColor2 = {
590
+ swatch: {
591
+ hue: 0,
592
+ saturation: 0,
593
+ lightness: 0
594
+ },
595
+ alpha: 1
596
+ }]) => ({
597
+ borderColor: next.colorToString(brandColor2)
598
+ }))
599
+ },
600
+ "&:not(:disabled):checked": {
601
+ [`&:focus ~ .${FAKE_CHECKBOX_CLASS_NAME}`]: next.responsiveStyle([contrast], ([contrast2 = next.Contrasts.LIGHT]) => ({
602
+ borderColor: getContrastBorderColor(contrast2, error)
603
+ }))
604
+ }
605
+ }), className)
606
+ }));
607
+ });
608
+ var Checkbox = React.forwardRef(function Checkbox2(_m, ref) {
609
+ var _n = _m, {
610
610
  error,
611
611
  className,
612
612
  style,
613
613
  form
614
- } = _j, restOfProps = __objRest(_j, [
614
+ } = _n, restOfProps = __objRest(_n, [
615
615
  "error",
616
616
  "className",
617
617
  "style",
@@ -622,8 +622,13 @@ var Checkbox = React.forwardRef(function Checkbox2(_i, ref) {
622
622
  contrast,
623
623
  brandColor
624
624
  } = next.useFormContext();
625
- return /* @__PURE__ */ jsxRuntime.jsxs(Container$2, {
626
- size,
625
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", {
626
+ className: css.cx(next.useStyle({
627
+ position: "relative"
628
+ }), next.useStyle(next.responsiveStyle([size], ([size2 = next.Sizes.MEDIUM]) => ({
629
+ height: getSizeHeight(size2),
630
+ width: getSizeHeight(size2)
631
+ })))),
627
632
  children: [/* @__PURE__ */ jsxRuntime.jsx(HiddenCheckbox, __spreadProps(__spreadValues({}, restOfProps), {
628
633
  type: "checkbox",
629
634
  ref,
@@ -639,33 +644,25 @@ var Checkbox = React.forwardRef(function Checkbox2(_i, ref) {
639
644
  })]
640
645
  });
641
646
  });
642
- const StyledLabel$2 = styled__default["default"](Label$1)`
643
- display: flex;
644
- align-items: center;
645
- margin: 0;
646
- ${(props) => cssMediaRules.cssMediaRules([props.size], ([size = next.Sizes.MEDIUM]) => styled.css`
647
- min-height: ${getSizeHeight$1(size)}px;
648
- max-height: ${getSizeHeight$1(size)}px;
649
- `)}
650
- `;
651
- const CheckboxContainer$1 = styled__default["default"].span`
652
- margin-right: 8px;
653
- `;
654
- var CheckboxTableField = React.forwardRef(function CheckboxTableField2(_k, ref) {
655
- var _l = _k, {
647
+ var CheckboxTableField = React.forwardRef(function CheckboxTableField2(_o, ref) {
648
+ var _p = _o, {
656
649
  form,
657
650
  id,
658
651
  name,
659
652
  label = "",
660
653
  value = false,
661
- error
662
- } = _l, restOfProps = __objRest(_l, [
654
+ error,
655
+ hideLabel,
656
+ tableColumn
657
+ } = _p, restOfProps = __objRest(_p, [
663
658
  "form",
664
659
  "id",
665
660
  "name",
666
661
  "label",
667
662
  "value",
668
- "error"
663
+ "error",
664
+ "hideLabel",
665
+ "tableColumn"
669
666
  ]);
670
667
  const {
671
668
  size
@@ -673,10 +670,20 @@ var CheckboxTableField = React.forwardRef(function CheckboxTableField2(_k, ref)
673
670
  function handleChange(event) {
674
671
  form.setFieldValue(name, event.currentTarget.checked);
675
672
  }
676
- return /* @__PURE__ */ jsxRuntime.jsxs(StyledLabel$2, {
673
+ return /* @__PURE__ */ jsxRuntime.jsxs(Label$1, {
674
+ className: css.cx(next.useStyle({
675
+ display: "flex",
676
+ alignItems: "center",
677
+ margin: 0
678
+ }), next.useStyle(next.responsiveStyle([size], ([size2 = next.Sizes.MEDIUM]) => ({
679
+ minHeight: getSizeHeight$1(size2),
680
+ maxHeight: getSizeHeight$1(size2)
681
+ })))),
677
682
  htmlFor: id,
678
- size,
679
- children: [/* @__PURE__ */ jsxRuntime.jsx(CheckboxContainer$1, {
683
+ children: [/* @__PURE__ */ jsxRuntime.jsx("span", {
684
+ className: next.useStyle({
685
+ marginRight: 8
686
+ }),
680
687
  children: /* @__PURE__ */ jsxRuntime.jsx(Checkbox, __spreadProps(__spreadValues({}, restOfProps), {
681
688
  "aria-label": label,
682
689
  checked: value,
@@ -688,30 +695,56 @@ var CheckboxTableField = React.forwardRef(function CheckboxTableField2(_k, ref)
688
695
  }), label]
689
696
  });
690
697
  });
691
- const MainLabel = styled__default["default"](Label$1)`
692
- margin: 0 0 4px 0;
693
- `;
694
- const StyledLabel$1 = styled__default["default"](Label$1)`
695
- display: flex;
696
- align-items: center;
697
- margin: 8px 0;
698
-
699
- &:last-of-type {
700
- margin-bottom: 0;
701
- }
702
- `;
703
- const CheckboxContainer = styled__default["default"].span`
704
- margin-right: 8px;
705
- `;
706
- var MultipleSelectTableField = React.forwardRef(function MultipleSelectTableField2(_m, ref) {
707
- var _n = _m, {
698
+ function MainLabel(_q) {
699
+ var _r = _q, {
700
+ className
701
+ } = _r, restOfProps = __objRest(_r, [
702
+ "className"
703
+ ]);
704
+ return /* @__PURE__ */ jsxRuntime.jsx(Label$1, __spreadProps(__spreadValues({}, restOfProps), {
705
+ className: css.cx(next.useStyle({
706
+ margin: "0 0 4px 0"
707
+ }), className)
708
+ }));
709
+ }
710
+ function StyledLabel$1(_s) {
711
+ var _t = _s, {
712
+ className
713
+ } = _t, restOfProps = __objRest(_t, [
714
+ "className"
715
+ ]);
716
+ return /* @__PURE__ */ jsxRuntime.jsx(Label$1, __spreadProps(__spreadValues({}, restOfProps), {
717
+ className: css.cx(next.useStyle({
718
+ display: "flex",
719
+ alignItems: "center",
720
+ margin: "8px 0",
721
+ "&:last-of-type": {
722
+ marginBottom: 0
723
+ }
724
+ }), className)
725
+ }));
726
+ }
727
+ function CheckboxContainer(_u) {
728
+ var _v = _u, {
729
+ className
730
+ } = _v, restOfProps = __objRest(_v, [
731
+ "className"
732
+ ]);
733
+ return /* @__PURE__ */ jsxRuntime.jsx("span", __spreadProps(__spreadValues({}, restOfProps), {
734
+ className: css.cx(next.useStyle({
735
+ marginRight: 8
736
+ }), className)
737
+ }));
738
+ }
739
+ var MultipleSelectTableField = React.forwardRef(function MultipleSelectTableField2(_w, ref) {
740
+ var _x = _w, {
708
741
  tableColumn,
709
742
  label = "",
710
743
  required,
711
744
  value = [],
712
745
  onChange,
713
746
  hideLabel = false
714
- } = _n, restOfProps = __objRest(_n, [
747
+ } = _x, restOfProps = __objRest(_x, [
715
748
  "tableColumn",
716
749
  "label",
717
750
  "required",
@@ -765,115 +798,130 @@ function getCheckmarkColor({
765
798
  l
766
799
  }).alpha(a).isLight() ? "rgba(0, 0, 0, 0.7)" : "rgba(255, 255, 255, 0.95)";
767
800
  }
768
- const Container$1 = styled__default["default"].div.withConfig({
769
- shouldForwardProp: (prop) => !["size"].includes(prop.toString())
770
- })`
771
- position: relative;
772
- ${(props) => cssMediaRules.cssMediaRules([props.size], ([size = next.Sizes.MEDIUM]) => styled.css`
773
- height: ${getSizeHeight(size)}px;
774
- width: ${getSizeHeight(size)}px;
775
- `)}
776
- `;
777
- const FakeRadioButton = styled__default["default"].div.withConfig({
778
- shouldForwardProp: (prop) => !["contrast", "error"].includes(prop.toString())
779
- })`
780
- position: absolute;
781
- width: 100%;
782
- height: 100%;
783
- border-style: solid;
784
- border-radius: 50%;
785
- pointer-events: none;
786
- border-width: 1px;
787
- ${(props) => cssMediaRules.cssMediaRules([props.contrast], ([contrast = next.Contrasts.LIGHT]) => styled.css`
788
- border-color: ${getContrastBorderColor(contrast, props.error)};
789
- background-color: ${getContrastBackgroundColor(contrast)};
790
- `)}
791
- `;
792
- const HiddenRadioButton = styled__default["default"].input.withConfig({
793
- shouldForwardProp: (prop) => !["brandColor", "contrast", "error"].includes(prop.toString())
794
- }).attrs({
795
- type: "radio"
796
- })`
797
- position: absolute;
798
- opacity: 0;
799
- width: 100%;
800
- height: 100%;
801
- cursor: pointer;
802
-
803
- &:disabled {
804
- cursor: no-drop;
805
-
806
- & ~ ${FakeRadioButton} {
807
- opacity: 0.5;
808
- }
809
- }
810
-
811
- &:checked ~ ${FakeRadioButton} {
812
- ${(props) => cssMediaRules.cssMediaRules([props.brandColor], ([brandColor = {
813
- swatch: {
814
- hue: 0,
815
- saturation: 0,
816
- lightness: 0
817
- },
818
- alpha: 1
819
- }]) => styled.css`
820
- background-color: ${next.colorToString(brandColor)};
821
- `)}
822
- border-color: transparent;
823
-
824
- &::after {
825
- content: '';
826
- position: absolute;
827
- box-sizing: content-box;
828
- top: 50%;
829
- left: 50%;
830
- width: 50%;
831
- height: 50%;
832
- border-radius: 50%;
833
- transform: translate(-50%, -50%);
834
- ${(props) => cssMediaRules.cssMediaRules([props.brandColor], ([brandColor = {
835
- swatch: {
836
- hue: 0,
837
- saturation: 0,
838
- lightness: 0
839
- },
840
- alpha: 1
841
- }]) => styled.css`
842
- background-color: ${getCheckmarkColor(brandColor)};
843
- `)}
844
- }
845
- }
846
-
847
- &:not(:disabled) {
848
- &:focus ~ ${FakeRadioButton} {
849
- ${(props) => cssMediaRules.cssMediaRules([props.brandColor], ([brandColor = {
850
- swatch: {
851
- hue: 0,
852
- saturation: 0,
853
- lightness: 0
854
- },
855
- alpha: 1
856
- }]) => styled.css`
857
- border-color: ${next.colorToString(brandColor)};
858
- `)}
859
- }
860
- }
861
-
862
- &:not(:disabled):checked {
863
- &:focus ~ ${FakeRadioButton} {
864
- ${(props) => cssMediaRules.cssMediaRules([props.contrast], ([contrast = next.Contrasts.LIGHT]) => styled.css`
865
- border-color: ${getContrastBorderColor(contrast, props.error)};
866
- `)}
867
- }
868
- }
869
- `;
870
- var RadioButton = React.forwardRef(function RadioButton2(_o, ref) {
871
- var _p = _o, {
801
+ function Container$1({
802
+ size
803
+ }) {
804
+ return /* @__PURE__ */ jsxRuntime.jsx("div", {
805
+ className: css.cx(next.useStyle({
806
+ position: "relative"
807
+ }), next.useStyle(next.responsiveStyle([size], ([size2 = next.Sizes.MEDIUM]) => ({
808
+ height: getSizeHeight(size2),
809
+ width: getSizeHeight(size2)
810
+ }))))
811
+ });
812
+ }
813
+ const FAKE_RADIO_BUTTON_CLASS_NAME = "fake-radio-button";
814
+ function FakeRadioButton(_y) {
815
+ var _z = _y, {
816
+ className,
817
+ contrast,
818
+ error
819
+ } = _z, restOfProps = __objRest(_z, [
820
+ "className",
821
+ "contrast",
822
+ "error"
823
+ ]);
824
+ return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadProps(__spreadValues({}, restOfProps), {
825
+ className: css.cx(FAKE_RADIO_BUTTON_CLASS_NAME, next.useStyle({
826
+ position: "absolute",
827
+ width: "100%",
828
+ height: "100%",
829
+ borderStyle: "solid",
830
+ borderRadius: "50%",
831
+ pointerEvents: "none",
832
+ borderWidth: 1
833
+ }), next.useStyle(next.responsiveStyle([contrast], ([contrast2 = next.Contrasts.LIGHT]) => ({
834
+ borderColor: getContrastBorderColor(contrast2, error),
835
+ backgroundColor: getContrastBackgroundColor(contrast2)
836
+ }))), className)
837
+ }));
838
+ }
839
+ const HiddenRadioButton = React.forwardRef(function HiddenRadioButton2(_A, ref) {
840
+ var _B = _A, {
841
+ className,
842
+ brandColor,
843
+ contrast,
844
+ error
845
+ } = _B, restOfProps = __objRest(_B, [
846
+ "className",
847
+ "brandColor",
848
+ "contrast",
849
+ "error"
850
+ ]);
851
+ return /* @__PURE__ */ jsxRuntime.jsx("input", __spreadProps(__spreadValues({}, restOfProps), {
852
+ type: "radio",
853
+ className: css.cx(next.useStyle({
854
+ position: "absolute",
855
+ opacity: 0,
856
+ width: "100%",
857
+ height: "100%",
858
+ cursor: "pointer",
859
+ "&:disabled": {
860
+ cursor: "no-drop",
861
+ [`& ~ .${FAKE_RADIO_BUTTON_CLASS_NAME}`]: {
862
+ opacity: 0.5
863
+ }
864
+ },
865
+ [`&:checked ~ .${FAKE_RADIO_BUTTON_CLASS_NAME}`]: __spreadProps(__spreadValues({}, next.responsiveStyle([brandColor], ([brandColor2 = {
866
+ swatch: {
867
+ hue: 0,
868
+ saturation: 0,
869
+ lightness: 0
870
+ },
871
+ alpha: 1
872
+ }]) => ({
873
+ backgroundColor: next.colorToString(brandColor2)
874
+ }))), {
875
+ borderColor: "transparent",
876
+ "&::after": __spreadValues({
877
+ content: '""',
878
+ position: "absolute",
879
+ boxSizing: "content-box",
880
+ top: "50%",
881
+ left: "50%",
882
+ width: "50%",
883
+ height: "50%",
884
+ borderRadius: "50%",
885
+ transform: "translate(-50%, -50%)"
886
+ }, next.responsiveStyle([brandColor], ([brandColor2 = {
887
+ swatch: {
888
+ hue: 0,
889
+ saturation: 0,
890
+ lightness: 0
891
+ },
892
+ alpha: 1
893
+ }]) => ({
894
+ backgroundColor: getCheckmarkColor(brandColor2)
895
+ })))
896
+ }),
897
+ "&:not(:disabled)": {
898
+ [`&:focus ~ .${FAKE_RADIO_BUTTON_CLASS_NAME}`]: next.responsiveStyle([brandColor], ([brandColor2 = {
899
+ swatch: {
900
+ hue: 0,
901
+ saturation: 0,
902
+ lightness: 0
903
+ },
904
+ alpha: 1
905
+ }]) => ({
906
+ borderColor: next.colorToString(brandColor2)
907
+ }))
908
+ },
909
+ "&:not(:disabled):checked": {
910
+ [`&:focus ~ .${FAKE_RADIO_BUTTON_CLASS_NAME}`]: next.responsiveStyle([contrast], ([contrast2 = next.Contrasts.LIGHT]) => ({
911
+ borderColor: getContrastBorderColor(contrast2, error)
912
+ }))
913
+ }
914
+ }), className),
915
+ ref
916
+ }));
917
+ });
918
+ var RadioButton = React.forwardRef(function RadioButton2(_C, ref) {
919
+ var _D = _C, {
872
920
  error,
873
921
  className,
874
922
  style,
875
923
  form
876
- } = _p, restOfProps = __objRest(_p, [
924
+ } = _D, restOfProps = __objRest(_D, [
877
925
  "error",
878
926
  "className",
879
927
  "style",
@@ -899,27 +947,44 @@ var RadioButton = React.forwardRef(function RadioButton2(_o, ref) {
899
947
  })]
900
948
  });
901
949
  });
902
- const StyledLabel = styled__default["default"](Label$1)`
903
- display: flex;
904
- align-items: center;
905
- margin: 8px 0;
906
-
907
- &:last-of-type {
908
- margin-bottom: 0;
909
- }
910
- `;
911
- const RadioButtonContainer = styled__default["default"].span`
912
- margin-right: 8px;
913
- `;
914
- var TableColumnRadioButtonGroup = React.forwardRef(function TableColumnRadioButtonGroup2(_q, ref) {
915
- var _r = _q, {
950
+ function StyledLabel(_E) {
951
+ var _F = _E, {
952
+ className
953
+ } = _F, restOfProps = __objRest(_F, [
954
+ "className"
955
+ ]);
956
+ return /* @__PURE__ */ jsxRuntime.jsx(Label$1, __spreadProps(__spreadValues({}, restOfProps), {
957
+ className: css.cx(next.useStyle({
958
+ display: "flex",
959
+ alignItems: "center",
960
+ margin: "8px 0",
961
+ "&:last-of-type": {
962
+ marginBottom: 0
963
+ }
964
+ }), className)
965
+ }));
966
+ }
967
+ function RadioButtonContainer(_G) {
968
+ var _H = _G, {
969
+ className
970
+ } = _H, restOfProps = __objRest(_H, [
971
+ "className"
972
+ ]);
973
+ return /* @__PURE__ */ jsxRuntime.jsx("span", __spreadProps(__spreadValues({}, restOfProps), {
974
+ className: css.cx(next.useStyle({
975
+ marginRight: 8
976
+ }), className)
977
+ }));
978
+ }
979
+ var TableColumnRadioButtonGroup = React.forwardRef(function TableColumnRadioButtonGroup2(_I, ref) {
980
+ var _J = _I, {
916
981
  tableColumn,
917
982
  label = "",
918
983
  value = "",
919
984
  required = false,
920
985
  hideLabel = false,
921
986
  onChange
922
- } = _r, restOfProps = __objRest(_r, [
987
+ } = _J, restOfProps = __objRest(_J, [
923
988
  "tableColumn",
924
989
  "label",
925
990
  "value",
@@ -956,47 +1021,74 @@ var TableColumnRadioButtonGroup = React.forwardRef(function TableColumnRadioButt
956
1021
  }, option.id))]
957
1022
  });
958
1023
  });
959
- const Container = styled__default["default"].div.withConfig({
960
- shouldForwardProp: (prop) => !["error", "shape", "size", "contrast", "brandColor"].includes(prop.toString())
961
- })`
962
- ${cssField()}
963
- display: flex;
964
- align-items: center;
965
- position: relative;
966
- user-select: none;
967
- border-color: #f19eb9;
968
-
969
- &:focus,
970
- &:focus-within {
971
- border-color: #e54e7f;
972
- }
973
-
974
- ${(props) => cssMediaRules.cssMediaRules([props.size, props.contrast], ([size = next.Sizes.MEDIUM, contrast = next.Contrasts.LIGHT]) => styled.css`
975
- min-height: ${getSizeHeight$2(size)}px;
976
- max-height: ${getSizeHeight$2(size)}px;
977
-
978
- &::after {
979
- content: '';
980
- position: absolute;
981
- right: ${getSizeHorizontalPadding(size)}px;
982
- top: 50%;
983
- transform: translate3d(0, -25%, 0);
984
- border: solid 0.35em transparent;
985
- border-top-color: ${getContrastColor$1(contrast)};
986
- }
987
- `)}
988
- `;
989
- const Select = styled__default["default"].select`
990
- appearance: none;
991
- position: absolute;
992
- top: 0;
993
- left: 0;
994
- opacity: 0;
995
- width: 100%;
996
- height: 100%;
997
- `;
998
- var TableColumnSingleSelect = React.forwardRef(function TableColumnSingleSelect2(_s, ref) {
999
- var _t = _s, {
1024
+ function Container(_K) {
1025
+ var _L = _K, {
1026
+ shape,
1027
+ size,
1028
+ contrast,
1029
+ brandColor,
1030
+ error,
1031
+ className
1032
+ } = _L, restOfProps = __objRest(_L, [
1033
+ "shape",
1034
+ "size",
1035
+ "contrast",
1036
+ "brandColor",
1037
+ "error",
1038
+ "className"
1039
+ ]);
1040
+ return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadProps(__spreadValues({}, restOfProps), {
1041
+ className: css.cx(next.useStyle(responsiveField({
1042
+ shape,
1043
+ size,
1044
+ contrast,
1045
+ brandColor,
1046
+ error
1047
+ })), next.useStyle(__spreadValues({
1048
+ display: "flex",
1049
+ alignItems: "center",
1050
+ position: "relative",
1051
+ userSelect: "none",
1052
+ borderColor: "#f19eb9",
1053
+ "&:focus, &:focus-within": {
1054
+ borderColor: "#e54e7f"
1055
+ }
1056
+ }, next.responsiveStyle([size, contrast], ([size2 = next.Sizes.MEDIUM, contrast2 = next.Contrasts.LIGHT]) => ({
1057
+ minHeight: getSizeHeight$2(size2),
1058
+ maxHeight: getSizeHeight$2(size2),
1059
+ "&::after": {
1060
+ content: '""',
1061
+ position: "absolute",
1062
+ right: getSizeHorizontalPadding(size2),
1063
+ top: "50%",
1064
+ transform: "translate3d(0, -25%, 0)",
1065
+ border: "solid 0.35em transparent",
1066
+ borderTopColor: getContrastColor$1(contrast2)
1067
+ }
1068
+ })))), className)
1069
+ }));
1070
+ }
1071
+ const Select = React.forwardRef(function Select2(_M, ref) {
1072
+ var _N = _M, {
1073
+ className
1074
+ } = _N, restOfProps = __objRest(_N, [
1075
+ "className"
1076
+ ]);
1077
+ return /* @__PURE__ */ jsxRuntime.jsx("select", __spreadProps(__spreadValues({}, restOfProps), {
1078
+ ref,
1079
+ className: css.cx(next.useStyle({
1080
+ appearance: "none",
1081
+ position: "absolute",
1082
+ top: 0,
1083
+ left: 0,
1084
+ opacity: 0,
1085
+ width: "100%",
1086
+ height: "100%"
1087
+ }), className)
1088
+ }));
1089
+ });
1090
+ var TableColumnSingleSelect = React.forwardRef(function TableColumnSingleSelect2(_O, ref) {
1091
+ var _P = _O, {
1000
1092
  id,
1001
1093
  tableColumn,
1002
1094
  value = "",
@@ -1004,7 +1096,7 @@ var TableColumnSingleSelect = React.forwardRef(function TableColumnSingleSelect2
1004
1096
  error = false,
1005
1097
  hideLabel = false,
1006
1098
  form
1007
- } = _t, restOfProps = __objRest(_t, [
1099
+ } = _P, restOfProps = __objRest(_P, [
1008
1100
  "id",
1009
1101
  "tableColumn",
1010
1102
  "value",
@@ -1047,10 +1139,10 @@ var TableColumnSingleSelect = React.forwardRef(function TableColumnSingleSelect2
1047
1139
  })]
1048
1140
  });
1049
1141
  });
1050
- var SingleSelectTableField = React.forwardRef(function SingleSelectTableField2(_u, ref) {
1051
- var _v = _u, {
1142
+ var SingleSelectTableField = React.forwardRef(function SingleSelectTableField2(_Q, ref) {
1143
+ var _R = _Q, {
1052
1144
  type
1053
- } = _v, restOfProps = __objRest(_v, [
1145
+ } = _R, restOfProps = __objRest(_R, [
1054
1146
  "type"
1055
1147
  ]);
1056
1148
  return type === "select" ? /* @__PURE__ */ jsxRuntime.jsx(TableColumnSingleSelect, __spreadProps(__spreadValues({}, restOfProps), {
@@ -1059,19 +1151,21 @@ var SingleSelectTableField = React.forwardRef(function SingleSelectTableField2(_
1059
1151
  ref
1060
1152
  }));
1061
1153
  });
1062
- var PhoneNumberTableField = React.forwardRef(function PhoneNumberTableField2(_w, ref) {
1063
- var _x = _w, {
1154
+ var PhoneNumberTableField = React.forwardRef(function PhoneNumberTableField2(_S, ref) {
1155
+ var _T = _S, {
1064
1156
  id,
1065
1157
  label = "",
1066
1158
  name,
1067
1159
  error,
1068
- hideLabel = false
1069
- } = _x, restOfProps = __objRest(_x, [
1160
+ hideLabel = false,
1161
+ tableColumn
1162
+ } = _T, restOfProps = __objRest(_T, [
1070
1163
  "id",
1071
1164
  "label",
1072
1165
  "name",
1073
1166
  "error",
1074
- "hideLabel"
1167
+ "hideLabel",
1168
+ "tableColumn"
1075
1169
  ]);
1076
1170
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
1077
1171
  children: [!hideLabel && /* @__PURE__ */ jsxRuntime.jsx(Label$1, {
@@ -1087,19 +1181,21 @@ var PhoneNumberTableField = React.forwardRef(function PhoneNumberTableField2(_w,
1087
1181
  }))]
1088
1182
  });
1089
1183
  });
1090
- var EmailTableField = React.forwardRef(function EmailTableField2(_y, ref) {
1091
- var _z = _y, {
1184
+ var EmailTableField = React.forwardRef(function EmailTableField2(_U, ref) {
1185
+ var _V = _U, {
1092
1186
  id,
1093
1187
  label = "",
1094
1188
  name,
1095
1189
  error,
1096
- hideLabel = false
1097
- } = _z, restOfProps = __objRest(_z, [
1190
+ hideLabel = false,
1191
+ tableColumn
1192
+ } = _V, restOfProps = __objRest(_V, [
1098
1193
  "id",
1099
1194
  "label",
1100
1195
  "name",
1101
1196
  "error",
1102
- "hideLabel"
1197
+ "hideLabel",
1198
+ "tableColumn"
1103
1199
  ]);
1104
1200
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
1105
1201
  children: [!hideLabel && /* @__PURE__ */ jsxRuntime.jsx(Label$1, {
@@ -1115,19 +1211,21 @@ var EmailTableField = React.forwardRef(function EmailTableField2(_y, ref) {
1115
1211
  }))]
1116
1212
  });
1117
1213
  });
1118
- var URLTableField = React.forwardRef(function URLTableField2(_A, ref) {
1119
- var _B = _A, {
1214
+ var URLTableField = React.forwardRef(function URLTableField2(_W, ref) {
1215
+ var _X = _W, {
1120
1216
  id,
1121
1217
  label = "",
1122
1218
  name,
1123
1219
  error,
1124
- hideLabel = false
1125
- } = _B, restOfProps = __objRest(_B, [
1220
+ hideLabel = false,
1221
+ tableColumn
1222
+ } = _X, restOfProps = __objRest(_X, [
1126
1223
  "id",
1127
1224
  "label",
1128
1225
  "name",
1129
1226
  "error",
1130
- "hideLabel"
1227
+ "hideLabel",
1228
+ "tableColumn"
1131
1229
  ]);
1132
1230
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
1133
1231
  children: [!hideLabel && /* @__PURE__ */ jsxRuntime.jsx(Label$1, {
@@ -1143,19 +1241,21 @@ var URLTableField = React.forwardRef(function URLTableField2(_A, ref) {
1143
1241
  }))]
1144
1242
  });
1145
1243
  });
1146
- var NumberTableField = React.forwardRef(function NumberTableField2(_C, ref) {
1147
- var _D = _C, {
1244
+ var NumberTableField = React.forwardRef(function NumberTableField2(_Y, ref) {
1245
+ var _Z = _Y, {
1148
1246
  id,
1149
1247
  label = "",
1150
1248
  name,
1151
1249
  error,
1152
- hideLabel = false
1153
- } = _D, restOfProps = __objRest(_D, [
1250
+ hideLabel = false,
1251
+ tableColumn
1252
+ } = _Z, restOfProps = __objRest(_Z, [
1154
1253
  "id",
1155
1254
  "label",
1156
1255
  "name",
1157
1256
  "error",
1158
- "hideLabel"
1257
+ "hideLabel",
1258
+ "tableColumn"
1159
1259
  ]);
1160
1260
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
1161
1261
  children: [!hideLabel && /* @__PURE__ */ jsxRuntime.jsx(Label$1, {
@@ -1171,36 +1271,43 @@ var NumberTableField = React.forwardRef(function NumberTableField2(_C, ref) {
1171
1271
  }))]
1172
1272
  });
1173
1273
  });
1174
- const Label = styled__default["default"].div.withConfig({
1175
- shouldForwardProp: (prop) => !["size"].includes(prop.toString())
1176
- })`
1177
- display: block;
1178
- max-width: 120px;
1179
- min-width: 60px;
1180
- border-radius: 2px;
1181
- background-color: #5f49f4;
1182
- opacity: 0.4;
1183
- ${(props) => cssMediaRules.cssMediaRules([props.size], ([size = next.Sizes.MEDIUM]) => styled.css`
1184
- margin: calc(0.25 * ${getSizeHeight(size)}px + 2px) 0;
1185
- min-height: ${0.5 * getSizeHeight(size)}px;
1186
- max-height: ${0.5 * getSizeHeight(size)}px;
1187
- `)}
1188
- `;
1189
- const Input = styled__default["default"].div.withConfig({
1190
- shouldForwardProp: (prop) => !["shape", "size"].includes(prop.toString())
1191
- })`
1192
- display: block;
1193
- width: 100%;
1194
- border-width: 2px;
1195
- border-style: solid;
1196
- border-color: #5f49f4;
1197
- opacity: 0.4;
1198
- ${(props) => cssMediaRules.cssMediaRules([props.shape, props.size], ([shape = next.Shapes.ROUNDED, size = next.Sizes.MEDIUM]) => styled.css`
1199
- min-height: ${getSizeHeight$1(size)}px;
1200
- max-height: ${getSizeHeight$1(size)}px;
1201
- border-radius: ${getShapeBorderRadius(shape)}px;
1202
- `)}
1203
- `;
1274
+ function Label({
1275
+ size
1276
+ }) {
1277
+ return /* @__PURE__ */ jsxRuntime.jsx("div", {
1278
+ className: css.cx(next.useStyle({
1279
+ display: "block",
1280
+ maxWidth: 120,
1281
+ minWidth: 60,
1282
+ borderRadius: 2,
1283
+ backgroundColor: "#5f49f4",
1284
+ opacity: 0.4
1285
+ }), next.useStyle(next.responsiveStyle([size], ([size2 = next.Sizes.MEDIUM]) => ({
1286
+ margin: `calc(0.25 * ${getSizeHeight(size2)}px + 2px) 0`,
1287
+ minHeight: 0.5 * getSizeHeight(size2),
1288
+ maxHeight: 0.5 * getSizeHeight(size2)
1289
+ }))))
1290
+ });
1291
+ }
1292
+ function Input({
1293
+ shape,
1294
+ size
1295
+ }) {
1296
+ return /* @__PURE__ */ jsxRuntime.jsx("div", {
1297
+ className: css.cx(next.useStyle({
1298
+ display: "block",
1299
+ width: "100%",
1300
+ borderWidth: 2,
1301
+ borderStyle: "solid",
1302
+ borderColor: "#5f49f4",
1303
+ opacity: 0.4
1304
+ }), next.useStyle(next.responsiveStyle([shape, size], ([shape2 = next.Shapes.ROUNDED, size2 = next.Sizes.MEDIUM]) => ({
1305
+ minHeight: getSizeHeight$1(size2),
1306
+ maxHeight: getSizeHeight$1(size2),
1307
+ borderRadius: getShapeBorderRadius(shape2)
1308
+ }))))
1309
+ });
1310
+ }
1204
1311
  function PlaceholderTableField() {
1205
1312
  const {
1206
1313
  size,
@@ -1347,7 +1454,7 @@ var SvgSpinner20 = function SvgSpinner202(props) {
1347
1454
  d: "M9 18A9 9 0 0 0 9 0"
1348
1455
  }))));
1349
1456
  };
1350
- const spin = styled.keyframes`
1457
+ const spin = css.keyframes`
1351
1458
  from {
1352
1459
  transform: rotate(0deg);
1353
1460
  }
@@ -1355,13 +1462,14 @@ const spin = styled.keyframes`
1355
1462
  transform: rotate(360deg);
1356
1463
  }
1357
1464
  `;
1358
- const Icon = styled__default["default"](SvgSpinner20)`
1359
- display: inline-flex;
1360
- animation: ${spin} 1s linear infinite;
1361
- stroke: currentColor;
1362
- `;
1363
1465
  function Spinner() {
1364
- return /* @__PURE__ */ jsxRuntime.jsx(Icon, {});
1466
+ return /* @__PURE__ */ jsxRuntime.jsx(SvgSpinner20, {
1467
+ className: next.useStyle({
1468
+ display: "inline-flex",
1469
+ animation: `${spin} 1s linear infinite`,
1470
+ stroke: "currentColor"
1471
+ })
1472
+ });
1365
1473
  }
1366
1474
  function useTableFormFieldRefs(propController, { fieldsCount }) {
1367
1475
  const [container, setContainer] = React.useState(null);
@@ -1405,25 +1513,52 @@ function getSizeFontSize(size) {
1405
1513
  throw new Error(`Invalid form size "${size}"`);
1406
1514
  }
1407
1515
  }
1408
- const GridForm = styled__default["default"].form.withConfig({
1409
- shouldForwardProp: (prop) => !["size", "width", "margin"].includes(prop)
1410
- })`
1411
- display: flex;
1412
- flex-wrap: wrap;
1413
- width: 100%;
1414
- ${(props) => cssMediaRules.cssMediaRules([props.size], ([size = next.Sizes.MEDIUM]) => styled.css`
1415
- font-size: ${getSizeFontSize(size)}px;
1416
- `)}
1417
- ${cssMediaRules.cssWidth()}
1418
- ${cssMediaRules.cssMargin()}
1419
- `;
1420
- const GridItem = styled__default["default"].div.withConfig({
1421
- shouldForwardProp: (prop) => !["grid", "index", "rowGap", "columnGap"].includes(prop)
1422
- })`
1423
- align-self: flex-end;
1424
- flex-direction: column;
1425
- ${cssMediaRules.cssGridItem()}
1426
- `;
1516
+ const GridForm = React.forwardRef(function GridFrom(__, ref) {
1517
+ var _$ = __, {
1518
+ className,
1519
+ size
1520
+ } = _$, restOfProps = __objRest(_$, [
1521
+ "className",
1522
+ "size"
1523
+ ]);
1524
+ return /* @__PURE__ */ jsxRuntime.jsx("form", __spreadProps(__spreadValues({}, restOfProps), {
1525
+ ref,
1526
+ className: css.cx(next.useStyle({
1527
+ display: "flex",
1528
+ flexWrap: "wrap",
1529
+ width: "100%"
1530
+ }), next.useStyle(next.responsiveStyle([size], ([size2 = next.Sizes.MEDIUM]) => ({
1531
+ fontSize: getSizeFontSize(size2)
1532
+ }))), className)
1533
+ }));
1534
+ });
1535
+ const GridItem = React.forwardRef(function GridItem2(_aa, ref) {
1536
+ var _ba = _aa, {
1537
+ className,
1538
+ grid,
1539
+ index: index2,
1540
+ rowGap,
1541
+ columnGap
1542
+ } = _ba, restOfProps = __objRest(_ba, [
1543
+ "className",
1544
+ "grid",
1545
+ "index",
1546
+ "rowGap",
1547
+ "columnGap"
1548
+ ]);
1549
+ return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadProps(__spreadValues({}, restOfProps), {
1550
+ ref,
1551
+ className: css.cx(next.useStyle({
1552
+ alignSelf: "flex-end",
1553
+ flexDirection: "column"
1554
+ }), next.useStyle(next.responsiveGridItem({
1555
+ grid,
1556
+ index: index2,
1557
+ rowGap,
1558
+ columnGap
1559
+ })), className)
1560
+ }));
1561
+ });
1427
1562
  function getAlignmentMargin(alignment) {
1428
1563
  switch (alignment) {
1429
1564
  case next.Alignments.LEFT:
@@ -1434,36 +1569,72 @@ function getAlignmentMargin(alignment) {
1434
1569
  return "0 auto";
1435
1570
  }
1436
1571
  }
1437
- const StyledButton = styled__default["default"]((props) => /* @__PURE__ */ jsxRuntime.jsx(Button$1["default"], __spreadProps(__spreadValues({}, props), {
1438
- as: "button"
1439
- }))).withConfig({
1440
- shouldForwardProp: (prop) => !["alignment"].includes(prop.toString())
1441
- })`
1442
- display: flex;
1443
- align-items: center;
1444
- justify-content: center;
1445
- ${(props) => cssMediaRules.cssMediaRules([props.size, props.alignment], ([size = next.Sizes.MEDIUM, alignment = next.Alignments.CENTER]) => styled.css`
1446
- min-height: ${getSizeHeight$1(size)}px;
1447
- max-height: ${getSizeHeight$1(size)}px;
1448
- margin: ${getAlignmentMargin(alignment)};
1449
- padding-top: 0;
1450
- padding-bottom: 0;
1451
- `)}
1452
- `;
1453
- const ErrorContainer = styled__default["default"].div`
1454
- padding: 8px 16px;
1455
- background-color: #f19eb9;
1456
- border-radius: 4px;
1457
- margin-top: 16px;
1458
- `;
1459
- const IconContainer = styled__default["default"].div`
1460
- fill: currentColor;
1461
- `;
1462
- const ErrorMessage = styled__default["default"].p`
1463
- font-size: 12px;
1464
- margin: 8px 0;
1465
- color: rgba(127, 0, 0, 0.95);
1466
- `;
1572
+ function StyledButton(_ca) {
1573
+ var _da = _ca, {
1574
+ className,
1575
+ size,
1576
+ alignment
1577
+ } = _da, restOfProps = __objRest(_da, [
1578
+ "className",
1579
+ "size",
1580
+ "alignment"
1581
+ ]);
1582
+ return /* @__PURE__ */ jsxRuntime.jsx(Button$1["default"], __spreadProps(__spreadValues({}, restOfProps), {
1583
+ as: "button",
1584
+ className: css.cx(next.useStyle({
1585
+ display: "flex",
1586
+ alignItems: "center",
1587
+ justifyContent: "center"
1588
+ }), next.useStyle(next.responsiveStyle([size, alignment], ([size2 = next.Sizes.MEDIUM, alignment2 = next.Alignments.CENTER]) => ({
1589
+ minHeight: getSizeHeight$1(size2),
1590
+ maxHeight: getSizeHeight$1(size2),
1591
+ margin: getAlignmentMargin(alignment2),
1592
+ paddingTop: 0,
1593
+ paddingBottom: 0
1594
+ }))), className)
1595
+ }));
1596
+ }
1597
+ function ErrorContainer(_ea) {
1598
+ var _fa = _ea, {
1599
+ className
1600
+ } = _fa, restOfProps = __objRest(_fa, [
1601
+ "className"
1602
+ ]);
1603
+ return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadProps(__spreadValues({}, restOfProps), {
1604
+ className: css.cx(next.useStyle({
1605
+ padding: "8px 16px",
1606
+ backgroundColor: "#f19eb9",
1607
+ borderRadius: 4,
1608
+ marginTop: 16
1609
+ }), className)
1610
+ }));
1611
+ }
1612
+ function IconContainer(_ga) {
1613
+ var _ha = _ga, {
1614
+ className
1615
+ } = _ha, restOfProps = __objRest(_ha, [
1616
+ "className"
1617
+ ]);
1618
+ return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadProps(__spreadValues({}, restOfProps), {
1619
+ className: css.cx(next.useStyle({
1620
+ fill: "currentColor"
1621
+ }), className)
1622
+ }));
1623
+ }
1624
+ function ErrorMessage(_ia) {
1625
+ var _ja = _ia, {
1626
+ className
1627
+ } = _ja, restOfProps = __objRest(_ja, [
1628
+ "className"
1629
+ ]);
1630
+ return /* @__PURE__ */ jsxRuntime.jsx("p", __spreadProps(__spreadValues({}, restOfProps), {
1631
+ className: css.cx(next.useStyle({
1632
+ fontSize: 12,
1633
+ margin: "8px 0",
1634
+ color: "rgba(127, 0, 0, 0.95)"
1635
+ }), className)
1636
+ }));
1637
+ }
1467
1638
  function getTableColumnDefaultValue(tableColumn) {
1468
1639
  switch (tableColumn.__typename) {
1469
1640
  case "CheckboxTableColumn":
@@ -1672,8 +1843,7 @@ const Form = React.forwardRef(function Form2({
1672
1843
  children: [/* @__PURE__ */ jsxRuntime.jsxs(GridForm, {
1673
1844
  ref: setRefEl,
1674
1845
  id,
1675
- width,
1676
- margin,
1846
+ className: css.cx(width, margin),
1677
1847
  size,
1678
1848
  onSubmit: formik$1.handleSubmit,
1679
1849
  onReset: formik$1.handleReset,