@makeswift/runtime 0.2.18 → 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 (235) 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/actions.cjs.js +6 -1
  54. package/dist/actions.cjs.js.map +1 -1
  55. package/dist/actions.es.js +6 -2
  56. package/dist/actions.es.js.map +1 -1
  57. package/dist/components.cjs.js +6 -18
  58. package/dist/components.cjs.js.map +1 -1
  59. package/dist/components.es.js +5 -8
  60. package/dist/components.es.js.map +1 -1
  61. package/dist/controls.es.js +1 -1
  62. package/dist/grid-item.cjs.js +612 -0
  63. package/dist/grid-item.cjs.js.map +1 -0
  64. package/dist/grid-item.es.js +604 -0
  65. package/dist/grid-item.es.js.map +1 -0
  66. package/dist/index.cjs.js +592 -275
  67. package/dist/index.cjs.js.map +1 -1
  68. package/dist/index.cjs2.js +98 -474
  69. package/dist/index.cjs2.js.map +1 -1
  70. package/dist/index.cjs3.js +20 -107
  71. package/dist/index.cjs3.js.map +1 -1
  72. package/dist/index.es.js +587 -274
  73. package/dist/index.es.js.map +1 -1
  74. package/dist/index.es2.js +99 -473
  75. package/dist/index.es2.js.map +1 -1
  76. package/dist/index.es3.js +21 -103
  77. package/dist/index.es3.js.map +1 -1
  78. package/dist/next.cjs.js +1 -2
  79. package/dist/next.cjs.js.map +1 -1
  80. package/dist/next.es.js +2 -3
  81. package/dist/next.es.js.map +1 -1
  82. package/dist/react-builder-preview.cjs.js +16 -3
  83. package/dist/react-builder-preview.cjs.js.map +1 -1
  84. package/dist/react-builder-preview.es.js +19 -6
  85. package/dist/react-builder-preview.es.js.map +1 -1
  86. package/dist/react.cjs.js +1 -2
  87. package/dist/react.cjs.js.map +1 -1
  88. package/dist/react.es.js +1 -2
  89. package/dist/react.es.js.map +1 -1
  90. package/dist/slot.cjs.js +41 -6
  91. package/dist/slot.cjs.js.map +1 -1
  92. package/dist/slot.es.js +36 -6
  93. package/dist/slot.es.js.map +1 -1
  94. package/dist/types/src/components/builtin/Box/Box.d.ts +7 -7
  95. package/dist/types/src/components/builtin/Box/Box.d.ts.map +1 -1
  96. package/dist/types/src/components/builtin/Box/components/Placeholder/index.d.ts.map +1 -1
  97. package/dist/types/src/components/builtin/Box/register.d.ts.map +1 -1
  98. package/dist/types/src/components/builtin/Button/Button.d.ts +46 -34
  99. package/dist/types/src/components/builtin/Button/Button.d.ts.map +1 -1
  100. package/dist/types/src/components/builtin/Carousel/Carousel.d.ts +5 -5
  101. package/dist/types/src/components/builtin/Carousel/Carousel.d.ts.map +1 -1
  102. package/dist/types/src/components/builtin/Carousel/register.d.ts.map +1 -1
  103. package/dist/types/src/components/builtin/Countdown/Countdown.d.ts +3 -3
  104. package/dist/types/src/components/builtin/Countdown/Countdown.d.ts.map +1 -1
  105. package/dist/types/src/components/builtin/Countdown/register.d.ts.map +1 -1
  106. package/dist/types/src/components/builtin/Divider/Divider.d.ts +3 -3
  107. package/dist/types/src/components/builtin/Divider/Divider.d.ts.map +1 -1
  108. package/dist/types/src/components/builtin/Divider/register.d.ts.map +1 -1
  109. package/dist/types/src/components/builtin/Embed/Embed.d.ts +3 -3
  110. package/dist/types/src/components/builtin/Embed/Embed.d.ts.map +1 -1
  111. package/dist/types/src/components/builtin/Form/Form.d.ts +3 -3
  112. package/dist/types/src/components/builtin/Form/Form.d.ts.map +1 -1
  113. package/dist/types/src/components/builtin/Form/components/Field/components/Checkbox/index.d.ts +4 -6
  114. package/dist/types/src/components/builtin/Form/components/Field/components/Checkbox/index.d.ts.map +1 -1
  115. package/dist/types/src/components/builtin/Form/components/Field/components/CheckboxTableField/index.d.ts +3 -0
  116. package/dist/types/src/components/builtin/Form/components/Field/components/CheckboxTableField/index.d.ts.map +1 -1
  117. package/dist/types/src/components/builtin/Form/components/Field/components/EmailTableField/index.d.ts +2 -0
  118. package/dist/types/src/components/builtin/Form/components/Field/components/EmailTableField/index.d.ts.map +1 -1
  119. package/dist/types/src/components/builtin/Form/components/Field/components/Input/index.d.ts +3 -7
  120. package/dist/types/src/components/builtin/Form/components/Field/components/Input/index.d.ts.map +1 -1
  121. package/dist/types/src/components/builtin/Form/components/Field/components/Label/index.d.ts +7 -13
  122. package/dist/types/src/components/builtin/Form/components/Field/components/Label/index.d.ts.map +1 -1
  123. package/dist/types/src/components/builtin/Form/components/Field/components/LongTextTableField/index.d.ts +2 -0
  124. package/dist/types/src/components/builtin/Form/components/Field/components/LongTextTableField/index.d.ts.map +1 -1
  125. package/dist/types/src/components/builtin/Form/components/Field/components/MultipleSelectTableField/index.d.ts.map +1 -1
  126. package/dist/types/src/components/builtin/Form/components/Field/components/NumberTableField/index.d.ts +2 -0
  127. package/dist/types/src/components/builtin/Form/components/Field/components/NumberTableField/index.d.ts.map +1 -1
  128. package/dist/types/src/components/builtin/Form/components/Field/components/PhoneNumberTableField/index.d.ts +2 -0
  129. package/dist/types/src/components/builtin/Form/components/Field/components/PhoneNumberTableField/index.d.ts.map +1 -1
  130. package/dist/types/src/components/builtin/Form/components/Field/components/PlaceholderTableField/index.d.ts.map +1 -1
  131. package/dist/types/src/components/builtin/Form/components/Field/components/RadioButton/index.d.ts +4 -8
  132. package/dist/types/src/components/builtin/Form/components/Field/components/RadioButton/index.d.ts.map +1 -1
  133. package/dist/types/src/components/builtin/Form/components/Field/components/SingleLineTextTableField/index.d.ts +2 -0
  134. package/dist/types/src/components/builtin/Form/components/Field/components/SingleLineTextTableField/index.d.ts.map +1 -1
  135. package/dist/types/src/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnRadioButtonGroup/index.d.ts.map +1 -1
  136. package/dist/types/src/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnSingleSelect/index.d.ts.map +1 -1
  137. package/dist/types/src/components/builtin/Form/components/Field/components/TextArea/index.d.ts +2 -7
  138. package/dist/types/src/components/builtin/Form/components/Field/components/TextArea/index.d.ts.map +1 -1
  139. package/dist/types/src/components/builtin/Form/components/Field/components/URLTableField/index.d.ts +2 -0
  140. package/dist/types/src/components/builtin/Form/components/Field/components/URLTableField/index.d.ts.map +1 -1
  141. package/dist/types/src/components/builtin/Form/components/Field/services/{cssField.d.ts → responsiveField.d.ts} +5 -4
  142. package/dist/types/src/components/builtin/Form/components/Field/services/responsiveField.d.ts.map +1 -0
  143. package/dist/types/src/components/builtin/Form/components/Placeholder/index.d.ts +2 -3
  144. package/dist/types/src/components/builtin/Form/components/Placeholder/index.d.ts.map +1 -1
  145. package/dist/types/src/components/builtin/Form/components/Spinner/index.d.ts.map +1 -1
  146. package/dist/types/src/components/builtin/Form/register.d.ts.map +1 -1
  147. package/dist/types/src/components/builtin/Image/Image.d.ts +7 -7
  148. package/dist/types/src/components/builtin/Image/Image.d.ts.map +1 -1
  149. package/dist/types/src/components/builtin/Navigation/Navigation.d.ts +3 -3
  150. package/dist/types/src/components/builtin/Navigation/Navigation.d.ts.map +1 -1
  151. package/dist/types/src/components/builtin/Navigation/components/DropDownButton/index.d.ts +8 -81
  152. package/dist/types/src/components/builtin/Navigation/components/DropDownButton/index.d.ts.map +1 -1
  153. package/dist/types/src/components/builtin/Navigation/components/LinksPlaceholder/index.d.ts.map +1 -1
  154. package/dist/types/src/components/builtin/Navigation/components/MobileMenu/components/MobileDropDownButton/index.d.ts +8 -81
  155. package/dist/types/src/components/builtin/Navigation/components/MobileMenu/components/MobileDropDownButton/index.d.ts.map +1 -1
  156. package/dist/types/src/components/builtin/Navigation/components/MobileMenu/index.d.ts.map +1 -1
  157. package/dist/types/src/components/builtin/Navigation/register.d.ts.map +1 -1
  158. package/dist/types/src/components/builtin/Root/Root.d.ts +1 -2
  159. package/dist/types/src/components/builtin/Root/Root.d.ts.map +1 -1
  160. package/dist/types/src/components/builtin/Root/components/Placeholder/index.d.ts +1 -2
  161. package/dist/types/src/components/builtin/Root/components/Placeholder/index.d.ts.map +1 -1
  162. package/dist/types/src/components/builtin/SocialLinks/SocialLinks.d.ts +3 -3
  163. package/dist/types/src/components/builtin/SocialLinks/SocialLinks.d.ts.map +1 -1
  164. package/dist/types/src/components/builtin/SocialLinks/components/SocialLinksPlaceholder/index.d.ts.map +1 -1
  165. package/dist/types/src/components/builtin/SocialLinks/register.d.ts.map +1 -1
  166. package/dist/types/src/components/builtin/Text/Text.d.ts +3 -3
  167. package/dist/types/src/components/builtin/Text/Text.d.ts.map +1 -1
  168. package/dist/types/src/components/builtin/Text/components/RichTextEditor/components/Block/index.d.ts +8 -11
  169. package/dist/types/src/components/builtin/Text/components/RichTextEditor/components/Block/index.d.ts.map +1 -1
  170. package/dist/types/src/components/builtin/Text/components/RichTextEditor/components/Mark/index.d.ts +3 -6
  171. package/dist/types/src/components/builtin/Text/components/RichTextEditor/components/Mark/index.d.ts.map +1 -1
  172. package/dist/types/src/components/builtin/Text/components/RichTextEditor/index.d.ts +1 -1
  173. package/dist/types/src/components/builtin/Text/components/RichTextEditor/index.d.ts.map +1 -1
  174. package/dist/types/src/components/builtin/Text/components/RichTextEditor/plugins/Link.d.ts.map +1 -1
  175. package/dist/types/src/components/builtin/Text/register.d.ts.map +1 -1
  176. package/dist/types/src/components/builtin/Video/Video.d.ts +4 -4
  177. package/dist/types/src/components/builtin/Video/Video.d.ts.map +1 -1
  178. package/dist/types/src/components/builtin/Video/register.d.ts.map +1 -1
  179. package/dist/types/src/components/hooks/useBackgrounds.d.ts +1 -1
  180. package/dist/types/src/components/hooks/useBackgrounds.d.ts.map +1 -1
  181. package/dist/types/src/components/index.d.ts +0 -1
  182. package/dist/types/src/components/index.d.ts.map +1 -1
  183. package/dist/types/src/components/shared/BackgroundsContainer/components/BackgroundVideo/index.d.ts.map +1 -1
  184. package/dist/types/src/components/shared/BackgroundsContainer/components/Backgrounds/index.d.ts.map +1 -1
  185. package/dist/types/src/components/shared/BackgroundsContainer/index.d.ts +255 -4
  186. package/dist/types/src/components/shared/BackgroundsContainer/index.d.ts.map +1 -1
  187. package/dist/types/src/components/shared/FallbackComponent/FallbackComponent.d.ts.map +1 -1
  188. package/dist/types/src/components/shared/GutterContainer/index.d.ts +8 -4
  189. package/dist/types/src/components/shared/GutterContainer/index.d.ts.map +1 -1
  190. package/dist/types/src/components/shared/grid-item.d.ts +17 -0
  191. package/dist/types/src/components/shared/grid-item.d.ts.map +1 -0
  192. package/dist/types/src/components/utils/responsive-style.d.ts +22 -1
  193. package/dist/types/src/components/utils/responsive-style.d.ts.map +1 -1
  194. package/dist/types/src/controls/style.d.ts +5 -65
  195. package/dist/types/src/controls/style.d.ts.map +1 -1
  196. package/dist/types/src/css/border-radius.d.ts +20 -0
  197. package/dist/types/src/css/border-radius.d.ts.map +1 -0
  198. package/dist/types/src/css/border.d.ts +31 -0
  199. package/dist/types/src/css/border.d.ts.map +1 -0
  200. package/dist/types/src/css/length-percentage.d.ts +10 -0
  201. package/dist/types/src/css/length-percentage.d.ts.map +1 -0
  202. package/dist/types/src/css/length.d.ts +14 -0
  203. package/dist/types/src/css/length.d.ts.map +1 -0
  204. package/dist/types/src/css/margin.d.ts +20 -0
  205. package/dist/types/src/css/margin.d.ts.map +1 -0
  206. package/dist/types/src/css/padding.d.ts +20 -0
  207. package/dist/types/src/css/padding.d.ts.map +1 -0
  208. package/dist/types/src/next/document.d.ts.map +1 -1
  209. package/dist/types/src/prop-controllers/descriptors.d.ts +96 -33
  210. package/dist/types/src/prop-controllers/descriptors.d.ts.map +1 -1
  211. package/dist/types/src/runtimes/react/controls/style.d.ts.map +1 -1
  212. package/dist/types/src/runtimes/react/controls.d.ts +10 -2
  213. package/dist/types/src/runtimes/react/controls.d.ts.map +1 -1
  214. package/dist/types/src/runtimes/react/use-global-style.d.ts +3 -0
  215. package/dist/types/src/runtimes/react/use-global-style.d.ts.map +1 -0
  216. package/dist/types/src/state/actions.d.ts +13 -1
  217. package/dist/types/src/state/actions.d.ts.map +1 -1
  218. package/dist/types/src/state/react-builder-preview.d.ts.map +1 -1
  219. package/dist/useMediaQuery.es.js +1 -1
  220. package/package.json +1 -3
  221. package/dist/cssMediaRules.cjs.js +0 -210
  222. package/dist/cssMediaRules.cjs.js.map +0 -1
  223. package/dist/cssMediaRules.es.js +0 -201
  224. package/dist/cssMediaRules.es.js.map +0 -1
  225. package/dist/index.cjs4.js +0 -18
  226. package/dist/index.cjs4.js.map +0 -1
  227. package/dist/index.es4.js +0 -13
  228. package/dist/index.es4.js.map +0 -1
  229. package/dist/types/src/components/builtin/Form/components/Field/services/cssField.d.ts.map +0 -1
  230. package/dist/types/src/components/utils/cssMediaRules.d.ts +0 -69
  231. package/dist/types/src/components/utils/cssMediaRules.d.ts.map +0 -1
  232. package/dist/useBoxShadow.cjs.js +0 -78
  233. package/dist/useBoxShadow.cjs.js.map +0 -1
  234. package/dist/useBoxShadow.es.js +0 -77
  235. package/dist/useBoxShadow.es.js.map +0 -1
package/dist/Form.es.js CHANGED
@@ -31,14 +31,13 @@ var __objRest = (source, exclude) => {
31
31
  };
32
32
  import * as React from "react";
33
33
  import { forwardRef, useRef, useImperativeHandle, useState, useEffect, useMemo } from "react";
34
- import styled, { css, keyframes } from "styled-components";
35
34
  import { Field as Field$1, getIn, Formik } from "formik";
36
- import { c as cssMediaRules, a as cssWidth, b as cssMargin, i as cssTextStyle, h as cssGridItem } from "./cssMediaRules.es.js";
37
- import { r as Shapes, s as Sizes, C as Contrasts, p as colorToString, t as useFormContext, u as useIsInBuilder, v as useQuery, T as TABLE_BY_ID, w as useMutation, x as Provider, A as Alignments } from "./index.es.js";
35
+ import { cx, keyframes } from "@emotion/css";
36
+ import { r as responsiveStyle, x as Shapes, y as Sizes, C as Contrasts, v as colorToString, z as useFormContext, q as useStyle, t as responsiveTextStyle, u as useIsInBuilder, A as responsiveGridItem, B as useQuery, T as TABLE_BY_ID, F as useMutation, G as Provider, H as Alignments } from "./index.es.js";
38
37
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
39
38
  import ColorHelper from "color";
40
39
  import Button$1 from "./Button.es.js";
41
- import { L as Link } from "./index.es3.js";
40
+ import { L as Link } from "./index.es2.js";
42
41
  import { g as getBox } from "./box-models.es.js";
43
42
  import { gql } from "@apollo/client";
44
43
  import "use-sync-external-store/shim/with-selector";
@@ -54,7 +53,6 @@ import "slate";
54
53
  import "./graphql.es.js";
55
54
  import "./text-input.es.js";
56
55
  import "./combobox.es.js";
57
- import "@emotion/css";
58
56
  import "scroll-into-view-if-needed";
59
57
  import "react-dom";
60
58
  import "html-react-parser";
@@ -184,36 +182,32 @@ function getContrastPlaceholderColor(contrast) {
184
182
  throw new Error(`Invalid form contrast "${contrast}"`);
185
183
  }
186
184
  }
187
- function cssField() {
188
- return css`
189
- display: block;
190
- width: 100%;
191
- outline: none;
192
- border-width: 1px;
193
- border-style: solid;
194
- transition: border-color 200ms;
195
- ${(props) => cssMediaRules([props.shape, props.size, props.contrast, props.brandColor], ([
185
+ function responsiveField(props) {
186
+ return __spreadValues({
187
+ display: "block",
188
+ width: "100%",
189
+ outline: "none",
190
+ borderWidth: 1,
191
+ borderStyle: "solid",
192
+ transition: "border-color 200ms"
193
+ }, responsiveStyle([props.shape, props.size, props.contrast, props.brandColor], ([
196
194
  shape = Shapes.ROUNDED,
197
195
  size = Sizes.MEDIUM,
198
196
  contrast = Contrasts.LIGHT,
199
197
  brandColor = { swatch: { hue: 0, saturation: 0, lightness: 0 }, alpha: 1 }
200
- ]) => css`
201
- padding: ${getSizeVerticalPadding(size)}px ${getSizeHorizontalPadding(size)}px;
202
- border-radius: ${getShapeBorderRadius(shape)}px;
203
- border-color: ${getContrastBorderColor(contrast, props.error)};
204
- color: ${getContrastColor$1(contrast)};
205
- background-color: ${getContrastBackgroundColor(contrast)};
206
-
207
- :focus,
208
- :focus-within {
209
- border-color: ${colorToString(brandColor)};
210
- }
211
-
212
- ::placeholder {
213
- color: ${getContrastPlaceholderColor(contrast)};
214
- }
215
- `)}
216
- `;
198
+ ]) => ({
199
+ padding: `${getSizeVerticalPadding(size)}px ${getSizeHorizontalPadding(size)}px`,
200
+ borderRadius: getShapeBorderRadius(shape),
201
+ borderColor: getContrastBorderColor(contrast, props.error),
202
+ color: getContrastColor$1(contrast),
203
+ backgroundColor: getContrastBackgroundColor(contrast),
204
+ ":focus, :focus-within": {
205
+ borderColor: colorToString(brandColor)
206
+ },
207
+ "::placeholder": {
208
+ color: getContrastPlaceholderColor(contrast)
209
+ }
210
+ })));
217
211
  }
218
212
  function getSizeHeight$1(size) {
219
213
  switch (size) {
@@ -227,22 +221,15 @@ function getSizeHeight$1(size) {
227
221
  throw new Error(`Invalid form size "${size}"`);
228
222
  }
229
223
  }
230
- const Base$2 = styled.input.withConfig({
231
- shouldForwardProp: (prop, defaultValidator) => !["shape", "size", "contrast", "brandColor", "error"].includes(prop.toString()) && defaultValidator(prop)
232
- })`
233
- ${cssField()}
234
- ${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
235
- min-height: ${getSizeHeight$1(size)}px;
236
- max-height: ${getSizeHeight$1(size)}px;
237
- `)}
238
- `;
239
224
  var Input$2 = forwardRef(function Input(_a, ref) {
240
225
  var _b = _a, {
241
226
  error = false,
242
- form
227
+ form,
228
+ className
243
229
  } = _b, restOfProps = __objRest(_b, [
244
230
  "error",
245
- "form"
231
+ "form",
232
+ "className"
246
233
  ]);
247
234
  const {
248
235
  shape,
@@ -250,58 +237,68 @@ var Input$2 = forwardRef(function Input(_a, ref) {
250
237
  contrast,
251
238
  brandColor
252
239
  } = useFormContext();
253
- return /* @__PURE__ */ jsx(Base$2, __spreadProps(__spreadValues({}, restOfProps), {
240
+ return /* @__PURE__ */ jsx("input", __spreadProps(__spreadValues({}, restOfProps), {
254
241
  ref,
255
- error,
256
- shape,
257
- size,
258
- contrast,
259
- brandColor
242
+ className: cx(useStyle(responsiveField({
243
+ shape,
244
+ size,
245
+ contrast,
246
+ brandColor,
247
+ error
248
+ })), useStyle(responsiveStyle([size], ([size2 = Sizes.MEDIUM]) => ({
249
+ minHeight: getSizeHeight$1(size2),
250
+ maxHeight: getSizeHeight$1(size2)
251
+ }))), className)
260
252
  }));
261
253
  });
262
- const Container$3 = styled.div.withConfig({
263
- shouldForwardProp: (prop) => !["width", "margin"].includes(prop.toString())
264
- })`
265
- display: flex;
266
- flex-direction: column;
267
- ${cssWidth()};
268
- ${cssMargin()};
269
- `;
270
- const Label$2 = styled.div`
271
- max-width: 120px;
272
- min-width: 60px;
273
- height: 8px;
274
- border-radius: 2px;
275
- background-color: #a1a8c2;
276
- opacity: 0.4;
277
- margin-bottom: 8px;
278
- `;
279
- const Input$1 = styled.div`
280
- min-width: 80px;
281
- height: 32px;
282
- border-radius: 4px;
283
- border-width: 2px;
284
- border-style: solid;
285
- border-color: #a1a8c2;
286
- opacity: 0.4;
287
- `;
288
- const Button = styled.div`
289
- min-width: 140px;
290
- height: 32px;
291
- border-radius: 4px;
292
- background-color: #a1a8c2;
293
- opacity: 0.4;
294
- `;
254
+ function Label$2() {
255
+ return /* @__PURE__ */ jsx("div", {
256
+ className: useStyle({
257
+ maxWidth: 120,
258
+ minWidth: 60,
259
+ height: 8,
260
+ borderRadius: 2,
261
+ backgroundColor: "#a1a8c2",
262
+ opacity: 0.4,
263
+ marginBottom: 8
264
+ })
265
+ });
266
+ }
267
+ function Input$1() {
268
+ return /* @__PURE__ */ jsx("div", {
269
+ className: useStyle({
270
+ minWidth: 80,
271
+ height: 32,
272
+ borderRadius: 4,
273
+ borderWidth: 2,
274
+ borderStyle: "solid",
275
+ borderColor: "#a1a8c2",
276
+ opacity: 0.4
277
+ })
278
+ });
279
+ }
280
+ function Button() {
281
+ return /* @__PURE__ */ jsx("div", {
282
+ className: useStyle({
283
+ minWidth: 140,
284
+ height: 32,
285
+ borderRadius: 4,
286
+ backgroundColor: "#a1a8c2",
287
+ opacity: 0.4
288
+ })
289
+ });
290
+ }
295
291
  var Placeholder = forwardRef(function Placeholder2({
296
292
  className,
297
293
  width,
298
294
  margin
299
295
  }, ref) {
300
- return /* @__PURE__ */ jsxs(Container$3, {
296
+ return /* @__PURE__ */ jsxs("div", {
301
297
  ref,
302
- className,
303
- width,
304
- margin,
298
+ className: cx(useStyle({
299
+ display: "flex",
300
+ flexDirection: "column"
301
+ }), width, margin, className),
305
302
  children: [/* @__PURE__ */ jsxs("div", {
306
303
  style: {
307
304
  display: "flex",
@@ -348,44 +345,46 @@ function getContrastColor(contrast) {
348
345
  throw new Error(`Invalid form contrast "${contrast}"`);
349
346
  }
350
347
  }
351
- const Base$1 = styled.label.withConfig({
352
- shouldForwardProp: (prop, defaultValidator) => !["contrast", "size", "textStyle", "textColor"].includes(prop.toString()) && defaultValidator(prop)
353
- })`
354
- display: block;
355
- margin: 0 0 0.25em 0;
356
- ${cssTextStyle()}
357
- ${(props) => cssMediaRules([props.size, props.contrast, props.textColor], ([size = Sizes.MEDIUM, contrast = Contrasts.LIGHT, textColor]) => css`
358
- min-height: ${getSizeHeight(size)}px;
359
- color: ${textColor == null ? getContrastColor(contrast) : colorToString(textColor)};
360
- `)}
361
- `;
362
- function Label$1(props) {
348
+ function Label$1(_c) {
349
+ var _d = _c, {
350
+ as,
351
+ className
352
+ } = _d, restOfProps = __objRest(_d, [
353
+ "as",
354
+ "className"
355
+ ]);
356
+ const Component = as != null ? as : "label";
363
357
  const {
364
358
  contrast,
365
359
  size,
366
360
  labelTextStyle,
367
361
  labelTextColor
368
362
  } = useFormContext();
369
- return /* @__PURE__ */ jsx(Base$1, __spreadProps(__spreadValues({}, props), {
370
- contrast,
371
- size,
372
- textStyle: labelTextStyle,
373
- textColor: labelTextColor
363
+ return /* @__PURE__ */ jsx(Component, __spreadProps(__spreadValues({}, restOfProps), {
364
+ className: cx(useStyle({
365
+ display: "block",
366
+ margin: "0 0 0.25em 0"
367
+ }), useStyle(responsiveTextStyle(labelTextStyle)), useStyle(responsiveStyle([size, contrast, labelTextColor], ([size2 = Sizes.MEDIUM, contrast2 = Contrasts.LIGHT, textColor]) => ({
368
+ minHeight: getSizeHeight(size2),
369
+ color: textColor == null ? getContrastColor(contrast2) : colorToString(textColor)
370
+ }))), className)
374
371
  }));
375
372
  }
376
- var SingleLineTextTableField = forwardRef(function SingleLineTextTableField2(_c, ref) {
377
- var _d = _c, {
373
+ var SingleLineTextTableField = forwardRef(function SingleLineTextTableField2(_e, ref) {
374
+ var _f = _e, {
378
375
  id,
379
376
  label = "",
380
377
  name,
381
378
  error,
382
- hideLabel = false
383
- } = _d, restOfProps = __objRest(_d, [
379
+ hideLabel = false,
380
+ tableColumn
381
+ } = _f, restOfProps = __objRest(_f, [
384
382
  "id",
385
383
  "label",
386
384
  "name",
387
385
  "error",
388
- "hideLabel"
386
+ "hideLabel",
387
+ "tableColumn"
389
388
  ]);
390
389
  return /* @__PURE__ */ jsxs(Fragment, {
391
390
  children: [!hideLabel && /* @__PURE__ */ jsx(Label$1, {
@@ -401,17 +400,11 @@ var SingleLineTextTableField = forwardRef(function SingleLineTextTableField2(_c,
401
400
  }))]
402
401
  });
403
402
  });
404
- const Base = styled.textarea.withConfig({
405
- shouldForwardProp: (prop, defaultValidator) => !["error", "shape", "size", "contrast", "brandColor"].includes(prop.toString()) && defaultValidator(prop)
406
- })`
407
- resize: vertical;
408
- ${cssField()}
409
- `;
410
- var TextArea = forwardRef(function TextArea2(_e, ref) {
411
- var _f = _e, {
403
+ var TextArea = forwardRef(function TextArea2(_g2, ref) {
404
+ var _h = _g2, {
412
405
  error = false,
413
406
  form
414
- } = _f, restOfProps = __objRest(_f, [
407
+ } = _h, restOfProps = __objRest(_h, [
415
408
  "error",
416
409
  "form"
417
410
  ]);
@@ -421,27 +414,33 @@ var TextArea = forwardRef(function TextArea2(_e, ref) {
421
414
  contrast,
422
415
  brandColor
423
416
  } = useFormContext();
424
- return /* @__PURE__ */ jsx(Base, __spreadProps(__spreadValues({}, restOfProps), {
417
+ return /* @__PURE__ */ jsx("textarea", __spreadProps(__spreadValues({}, restOfProps), {
425
418
  ref,
426
- rows: 4,
427
- error,
428
- shape,
429
- size,
430
- contrast,
431
- brandColor
419
+ className: cx(useStyle({
420
+ resize: "vertical"
421
+ }), useStyle(responsiveField({
422
+ error,
423
+ shape,
424
+ size,
425
+ contrast,
426
+ brandColor
427
+ }))),
428
+ rows: 4
432
429
  }));
433
430
  });
434
- var LongTextTableField = forwardRef(function LongTextTableField2(_g2, ref) {
435
- var _h = _g2, {
431
+ var LongTextTableField = forwardRef(function LongTextTableField2(_i, ref) {
432
+ var _j = _i, {
436
433
  id,
437
434
  label = "",
438
435
  error,
439
- hideLabel = false
440
- } = _h, restOfProps = __objRest(_h, [
436
+ hideLabel = false,
437
+ tableColumn
438
+ } = _j, restOfProps = __objRest(_j, [
441
439
  "id",
442
440
  "label",
443
441
  "error",
444
- "hideLabel"
442
+ "hideLabel",
443
+ "tableColumn"
445
444
  ]);
446
445
  return /* @__PURE__ */ jsxs(Fragment, {
447
446
  children: [!hideLabel && /* @__PURE__ */ jsx(Label$1, {
@@ -469,122 +468,124 @@ function getCheckmarkColor$1({
469
468
  l
470
469
  }).alpha(a).isLight() ? "rgba(0, 0, 0, 0.7)" : "rgba(255, 255, 255, 0.95)";
471
470
  }
472
- const Container$2 = styled.div.withConfig({
473
- shouldForwardProp: (prop) => !["size"].includes(prop)
474
- })`
475
- position: relative;
476
- ${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
477
- height: ${getSizeHeight(size)}px;
478
- width: ${getSizeHeight(size)}px;
479
- `)}
480
- `;
481
- const FakeCheckbox = styled.div.withConfig({
482
- shouldForwardProp: (prop) => !["contrast", "error"].includes(prop)
483
- })`
484
- position: absolute;
485
- width: 100%;
486
- height: 100%;
487
- border-style: solid;
488
- border-radius: 4px;
489
- pointer-events: none;
490
- border-width: 1px;
491
- ${(props) => cssMediaRules([props.contrast], ([contrast = Contrasts.LIGHT]) => css`
492
- border-color: ${getContrastBorderColor(contrast, props.error)};
493
- background-color: ${getContrastBackgroundColor(contrast)};
494
- `)}
495
- `;
496
- const HiddenCheckbox = styled.input.withConfig({
497
- shouldForwardProp: (prop, defaultValidator) => !["size", "brandColor", "contrast", "error"].includes(prop) && defaultValidator(prop)
498
- })`
499
- position: absolute;
500
- opacity: 0;
501
- width: 100%;
502
- height: 100%;
503
- cursor: pointer;
504
-
505
- &:disabled {
506
- cursor: no-drop;
507
-
508
- & ~ ${FakeCheckbox} {
509
- opacity: 0.5;
510
- }
511
- }
512
-
513
- &:checked ~ ${FakeCheckbox} {
514
- ${(props) => cssMediaRules([props.brandColor], ([{
515
- swatch = {
516
- hue: 0,
517
- saturation: 0,
518
- lightness: 0
519
- },
520
- alpha = 1
521
- } = {}]) => css`
522
- background-color: ${colorToString({
523
- swatch,
524
- alpha
525
- })};
526
- `)}
527
- border-color: transparent;
528
-
529
- &::after {
530
- content: '';
531
- position: absolute;
532
- box-sizing: content-box;
533
- width: 25%;
534
- height: 50%;
535
- ${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
536
- border-width: ${getSizeHeight(size) * 0.1}px;
537
- border-left: 0;
538
- border-top: 0;
539
- `)}
540
- border-style: solid;
541
- ${(props) => cssMediaRules([props.brandColor], ([{
542
- swatch = {
543
- hue: 0,
544
- saturation: 0,
545
- lightness: 0
546
- },
547
- alpha = 1
548
- } = {}]) => css`
549
- border-color: ${getCheckmarkColor$1({
550
- swatch,
551
- alpha
552
- })};
553
- `)}
554
- transform: rotate(45deg) translate3d(91%, -23%, 0);
555
- }
556
- }
557
-
558
- &:not(:disabled) {
559
- &:focus ~ ${FakeCheckbox} {
560
- ${(props) => cssMediaRules([props.brandColor], ([brandColor = {
561
- swatch: {
562
- hue: 0,
563
- saturation: 0,
564
- lightness: 0
565
- },
566
- alpha: 1
567
- }]) => css`
568
- border-color: ${colorToString(brandColor)};
569
- `)}
570
- }
571
- }
572
-
573
- &:not(:disabled):checked {
574
- &:focus ~ ${FakeCheckbox} {
575
- ${(props) => cssMediaRules([props.contrast], ([contrast = Contrasts.LIGHT]) => css`
576
- border-color: ${getContrastBorderColor(contrast, props.error)};
577
- `)}
578
- }
579
- }
580
- `;
581
- var Checkbox = forwardRef(function Checkbox2(_i, ref) {
582
- var _j = _i, {
471
+ const FAKE_CHECKBOX_CLASS_NAME = "fake-checkbox";
472
+ function FakeCheckbox({
473
+ className,
474
+ style,
475
+ contrast,
476
+ error
477
+ }) {
478
+ return /* @__PURE__ */ jsx("div", {
479
+ style,
480
+ className: cx(FAKE_CHECKBOX_CLASS_NAME, useStyle({
481
+ position: "absolute",
482
+ width: "100%",
483
+ height: "100%",
484
+ borderStyle: "solid",
485
+ borderRadius: 4,
486
+ pointerEvents: "none",
487
+ borderWidth: 1
488
+ }), useStyle(responsiveStyle([contrast], ([contrast2 = Contrasts.LIGHT]) => ({
489
+ borderColor: getContrastBorderColor(contrast2, error),
490
+ backgroundColor: getContrastBackgroundColor(contrast2)
491
+ }))), className)
492
+ });
493
+ }
494
+ const HiddenCheckbox = forwardRef(function HiddenCheckbox2(_k, ref) {
495
+ var _l = _k, {
496
+ size,
497
+ brandColor,
498
+ contrast,
499
+ error,
500
+ className
501
+ } = _l, restOfProps = __objRest(_l, [
502
+ "size",
503
+ "brandColor",
504
+ "contrast",
505
+ "error",
506
+ "className"
507
+ ]);
508
+ return /* @__PURE__ */ jsx("input", __spreadProps(__spreadValues({}, restOfProps), {
509
+ ref,
510
+ className: cx(useStyle({
511
+ position: "absolute",
512
+ opacity: 0,
513
+ width: "100%",
514
+ height: "100%",
515
+ cursor: "pointer",
516
+ "&:disabled": {
517
+ cursor: "no-drop",
518
+ [`& ~ .${FAKE_CHECKBOX_CLASS_NAME}`]: {
519
+ opacity: 0.5
520
+ }
521
+ },
522
+ [`&:checked ~ .${FAKE_CHECKBOX_CLASS_NAME}`]: __spreadProps(__spreadValues({}, responsiveStyle([brandColor], ([{
523
+ swatch = {
524
+ hue: 0,
525
+ saturation: 0,
526
+ lightness: 0
527
+ },
528
+ alpha = 1
529
+ } = {}]) => ({
530
+ backgroundColor: colorToString({
531
+ swatch,
532
+ alpha
533
+ })
534
+ }))), {
535
+ borderColor: "transparent",
536
+ "&::after": __spreadProps(__spreadValues({
537
+ content: '""',
538
+ position: "absolute",
539
+ boxSizing: "content-box",
540
+ width: "25%",
541
+ height: "50%",
542
+ borderStyle: "solid"
543
+ }, responsiveStyle([size, brandColor], ([size2 = Sizes.MEDIUM, {
544
+ swatch = {
545
+ hue: 0,
546
+ saturation: 0,
547
+ lightness: 0
548
+ },
549
+ alpha = 1
550
+ } = {}]) => ({
551
+ borderWidth: getSizeHeight(size2) * 0.1,
552
+ borderLeft: 0,
553
+ borderTop: 0,
554
+ borderColor: getCheckmarkColor$1({
555
+ swatch,
556
+ alpha
557
+ })
558
+ }))), {
559
+ transform: "rotate(45deg) translate3d(91%, -23%, 0)"
560
+ })
561
+ }),
562
+ "&:not(:disabled)": {
563
+ [`&:focus ~ .${FAKE_CHECKBOX_CLASS_NAME}`]: responsiveStyle([brandColor], ([brandColor2 = {
564
+ swatch: {
565
+ hue: 0,
566
+ saturation: 0,
567
+ lightness: 0
568
+ },
569
+ alpha: 1
570
+ }]) => ({
571
+ borderColor: colorToString(brandColor2)
572
+ }))
573
+ },
574
+ "&:not(:disabled):checked": {
575
+ [`&:focus ~ .${FAKE_CHECKBOX_CLASS_NAME}`]: responsiveStyle([contrast], ([contrast2 = Contrasts.LIGHT]) => ({
576
+ borderColor: getContrastBorderColor(contrast2, error)
577
+ }))
578
+ }
579
+ }), className)
580
+ }));
581
+ });
582
+ var Checkbox = forwardRef(function Checkbox2(_m, ref) {
583
+ var _n = _m, {
583
584
  error,
584
585
  className,
585
586
  style,
586
587
  form
587
- } = _j, restOfProps = __objRest(_j, [
588
+ } = _n, restOfProps = __objRest(_n, [
588
589
  "error",
589
590
  "className",
590
591
  "style",
@@ -595,8 +596,13 @@ var Checkbox = forwardRef(function Checkbox2(_i, ref) {
595
596
  contrast,
596
597
  brandColor
597
598
  } = useFormContext();
598
- return /* @__PURE__ */ jsxs(Container$2, {
599
- size,
599
+ return /* @__PURE__ */ jsxs("div", {
600
+ className: cx(useStyle({
601
+ position: "relative"
602
+ }), useStyle(responsiveStyle([size], ([size2 = Sizes.MEDIUM]) => ({
603
+ height: getSizeHeight(size2),
604
+ width: getSizeHeight(size2)
605
+ })))),
600
606
  children: [/* @__PURE__ */ jsx(HiddenCheckbox, __spreadProps(__spreadValues({}, restOfProps), {
601
607
  type: "checkbox",
602
608
  ref,
@@ -612,33 +618,25 @@ var Checkbox = forwardRef(function Checkbox2(_i, ref) {
612
618
  })]
613
619
  });
614
620
  });
615
- const StyledLabel$2 = styled(Label$1)`
616
- display: flex;
617
- align-items: center;
618
- margin: 0;
619
- ${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
620
- min-height: ${getSizeHeight$1(size)}px;
621
- max-height: ${getSizeHeight$1(size)}px;
622
- `)}
623
- `;
624
- const CheckboxContainer$1 = styled.span`
625
- margin-right: 8px;
626
- `;
627
- var CheckboxTableField = forwardRef(function CheckboxTableField2(_k, ref) {
628
- var _l = _k, {
621
+ var CheckboxTableField = forwardRef(function CheckboxTableField2(_o, ref) {
622
+ var _p = _o, {
629
623
  form,
630
624
  id,
631
625
  name,
632
626
  label = "",
633
627
  value = false,
634
- error
635
- } = _l, restOfProps = __objRest(_l, [
628
+ error,
629
+ hideLabel,
630
+ tableColumn
631
+ } = _p, restOfProps = __objRest(_p, [
636
632
  "form",
637
633
  "id",
638
634
  "name",
639
635
  "label",
640
636
  "value",
641
- "error"
637
+ "error",
638
+ "hideLabel",
639
+ "tableColumn"
642
640
  ]);
643
641
  const {
644
642
  size
@@ -646,10 +644,20 @@ var CheckboxTableField = forwardRef(function CheckboxTableField2(_k, ref) {
646
644
  function handleChange(event) {
647
645
  form.setFieldValue(name, event.currentTarget.checked);
648
646
  }
649
- return /* @__PURE__ */ jsxs(StyledLabel$2, {
647
+ return /* @__PURE__ */ jsxs(Label$1, {
648
+ className: cx(useStyle({
649
+ display: "flex",
650
+ alignItems: "center",
651
+ margin: 0
652
+ }), useStyle(responsiveStyle([size], ([size2 = Sizes.MEDIUM]) => ({
653
+ minHeight: getSizeHeight$1(size2),
654
+ maxHeight: getSizeHeight$1(size2)
655
+ })))),
650
656
  htmlFor: id,
651
- size,
652
- children: [/* @__PURE__ */ jsx(CheckboxContainer$1, {
657
+ children: [/* @__PURE__ */ jsx("span", {
658
+ className: useStyle({
659
+ marginRight: 8
660
+ }),
653
661
  children: /* @__PURE__ */ jsx(Checkbox, __spreadProps(__spreadValues({}, restOfProps), {
654
662
  "aria-label": label,
655
663
  checked: value,
@@ -661,30 +669,56 @@ var CheckboxTableField = forwardRef(function CheckboxTableField2(_k, ref) {
661
669
  }), label]
662
670
  });
663
671
  });
664
- const MainLabel = styled(Label$1)`
665
- margin: 0 0 4px 0;
666
- `;
667
- const StyledLabel$1 = styled(Label$1)`
668
- display: flex;
669
- align-items: center;
670
- margin: 8px 0;
671
-
672
- &:last-of-type {
673
- margin-bottom: 0;
674
- }
675
- `;
676
- const CheckboxContainer = styled.span`
677
- margin-right: 8px;
678
- `;
679
- var MultipleSelectTableField = forwardRef(function MultipleSelectTableField2(_m, ref) {
680
- var _n = _m, {
672
+ function MainLabel(_q) {
673
+ var _r = _q, {
674
+ className
675
+ } = _r, restOfProps = __objRest(_r, [
676
+ "className"
677
+ ]);
678
+ return /* @__PURE__ */ jsx(Label$1, __spreadProps(__spreadValues({}, restOfProps), {
679
+ className: cx(useStyle({
680
+ margin: "0 0 4px 0"
681
+ }), className)
682
+ }));
683
+ }
684
+ function StyledLabel$1(_s) {
685
+ var _t = _s, {
686
+ className
687
+ } = _t, restOfProps = __objRest(_t, [
688
+ "className"
689
+ ]);
690
+ return /* @__PURE__ */ jsx(Label$1, __spreadProps(__spreadValues({}, restOfProps), {
691
+ className: cx(useStyle({
692
+ display: "flex",
693
+ alignItems: "center",
694
+ margin: "8px 0",
695
+ "&:last-of-type": {
696
+ marginBottom: 0
697
+ }
698
+ }), className)
699
+ }));
700
+ }
701
+ function CheckboxContainer(_u) {
702
+ var _v = _u, {
703
+ className
704
+ } = _v, restOfProps = __objRest(_v, [
705
+ "className"
706
+ ]);
707
+ return /* @__PURE__ */ jsx("span", __spreadProps(__spreadValues({}, restOfProps), {
708
+ className: cx(useStyle({
709
+ marginRight: 8
710
+ }), className)
711
+ }));
712
+ }
713
+ var MultipleSelectTableField = forwardRef(function MultipleSelectTableField2(_w, ref) {
714
+ var _x = _w, {
681
715
  tableColumn,
682
716
  label = "",
683
717
  required,
684
718
  value = [],
685
719
  onChange,
686
720
  hideLabel = false
687
- } = _n, restOfProps = __objRest(_n, [
721
+ } = _x, restOfProps = __objRest(_x, [
688
722
  "tableColumn",
689
723
  "label",
690
724
  "required",
@@ -738,115 +772,130 @@ function getCheckmarkColor({
738
772
  l
739
773
  }).alpha(a).isLight() ? "rgba(0, 0, 0, 0.7)" : "rgba(255, 255, 255, 0.95)";
740
774
  }
741
- const Container$1 = styled.div.withConfig({
742
- shouldForwardProp: (prop) => !["size"].includes(prop.toString())
743
- })`
744
- position: relative;
745
- ${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
746
- height: ${getSizeHeight(size)}px;
747
- width: ${getSizeHeight(size)}px;
748
- `)}
749
- `;
750
- const FakeRadioButton = styled.div.withConfig({
751
- shouldForwardProp: (prop) => !["contrast", "error"].includes(prop.toString())
752
- })`
753
- position: absolute;
754
- width: 100%;
755
- height: 100%;
756
- border-style: solid;
757
- border-radius: 50%;
758
- pointer-events: none;
759
- border-width: 1px;
760
- ${(props) => cssMediaRules([props.contrast], ([contrast = Contrasts.LIGHT]) => css`
761
- border-color: ${getContrastBorderColor(contrast, props.error)};
762
- background-color: ${getContrastBackgroundColor(contrast)};
763
- `)}
764
- `;
765
- const HiddenRadioButton = styled.input.withConfig({
766
- shouldForwardProp: (prop) => !["brandColor", "contrast", "error"].includes(prop.toString())
767
- }).attrs({
768
- type: "radio"
769
- })`
770
- position: absolute;
771
- opacity: 0;
772
- width: 100%;
773
- height: 100%;
774
- cursor: pointer;
775
-
776
- &:disabled {
777
- cursor: no-drop;
778
-
779
- & ~ ${FakeRadioButton} {
780
- opacity: 0.5;
781
- }
782
- }
783
-
784
- &:checked ~ ${FakeRadioButton} {
785
- ${(props) => cssMediaRules([props.brandColor], ([brandColor = {
786
- swatch: {
787
- hue: 0,
788
- saturation: 0,
789
- lightness: 0
790
- },
791
- alpha: 1
792
- }]) => css`
793
- background-color: ${colorToString(brandColor)};
794
- `)}
795
- border-color: transparent;
796
-
797
- &::after {
798
- content: '';
799
- position: absolute;
800
- box-sizing: content-box;
801
- top: 50%;
802
- left: 50%;
803
- width: 50%;
804
- height: 50%;
805
- border-radius: 50%;
806
- transform: translate(-50%, -50%);
807
- ${(props) => cssMediaRules([props.brandColor], ([brandColor = {
808
- swatch: {
809
- hue: 0,
810
- saturation: 0,
811
- lightness: 0
812
- },
813
- alpha: 1
814
- }]) => css`
815
- background-color: ${getCheckmarkColor(brandColor)};
816
- `)}
817
- }
818
- }
819
-
820
- &:not(:disabled) {
821
- &:focus ~ ${FakeRadioButton} {
822
- ${(props) => cssMediaRules([props.brandColor], ([brandColor = {
823
- swatch: {
824
- hue: 0,
825
- saturation: 0,
826
- lightness: 0
827
- },
828
- alpha: 1
829
- }]) => css`
830
- border-color: ${colorToString(brandColor)};
831
- `)}
832
- }
833
- }
834
-
835
- &:not(:disabled):checked {
836
- &:focus ~ ${FakeRadioButton} {
837
- ${(props) => cssMediaRules([props.contrast], ([contrast = Contrasts.LIGHT]) => css`
838
- border-color: ${getContrastBorderColor(contrast, props.error)};
839
- `)}
840
- }
841
- }
842
- `;
843
- var RadioButton = forwardRef(function RadioButton2(_o, ref) {
844
- var _p = _o, {
775
+ function Container$1({
776
+ size
777
+ }) {
778
+ return /* @__PURE__ */ jsx("div", {
779
+ className: cx(useStyle({
780
+ position: "relative"
781
+ }), useStyle(responsiveStyle([size], ([size2 = Sizes.MEDIUM]) => ({
782
+ height: getSizeHeight(size2),
783
+ width: getSizeHeight(size2)
784
+ }))))
785
+ });
786
+ }
787
+ const FAKE_RADIO_BUTTON_CLASS_NAME = "fake-radio-button";
788
+ function FakeRadioButton(_y) {
789
+ var _z = _y, {
790
+ className,
791
+ contrast,
792
+ error
793
+ } = _z, restOfProps = __objRest(_z, [
794
+ "className",
795
+ "contrast",
796
+ "error"
797
+ ]);
798
+ return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({}, restOfProps), {
799
+ className: cx(FAKE_RADIO_BUTTON_CLASS_NAME, useStyle({
800
+ position: "absolute",
801
+ width: "100%",
802
+ height: "100%",
803
+ borderStyle: "solid",
804
+ borderRadius: "50%",
805
+ pointerEvents: "none",
806
+ borderWidth: 1
807
+ }), useStyle(responsiveStyle([contrast], ([contrast2 = Contrasts.LIGHT]) => ({
808
+ borderColor: getContrastBorderColor(contrast2, error),
809
+ backgroundColor: getContrastBackgroundColor(contrast2)
810
+ }))), className)
811
+ }));
812
+ }
813
+ const HiddenRadioButton = forwardRef(function HiddenRadioButton2(_A, ref) {
814
+ var _B = _A, {
815
+ className,
816
+ brandColor,
817
+ contrast,
818
+ error
819
+ } = _B, restOfProps = __objRest(_B, [
820
+ "className",
821
+ "brandColor",
822
+ "contrast",
823
+ "error"
824
+ ]);
825
+ return /* @__PURE__ */ jsx("input", __spreadProps(__spreadValues({}, restOfProps), {
826
+ type: "radio",
827
+ className: cx(useStyle({
828
+ position: "absolute",
829
+ opacity: 0,
830
+ width: "100%",
831
+ height: "100%",
832
+ cursor: "pointer",
833
+ "&:disabled": {
834
+ cursor: "no-drop",
835
+ [`& ~ .${FAKE_RADIO_BUTTON_CLASS_NAME}`]: {
836
+ opacity: 0.5
837
+ }
838
+ },
839
+ [`&:checked ~ .${FAKE_RADIO_BUTTON_CLASS_NAME}`]: __spreadProps(__spreadValues({}, responsiveStyle([brandColor], ([brandColor2 = {
840
+ swatch: {
841
+ hue: 0,
842
+ saturation: 0,
843
+ lightness: 0
844
+ },
845
+ alpha: 1
846
+ }]) => ({
847
+ backgroundColor: colorToString(brandColor2)
848
+ }))), {
849
+ borderColor: "transparent",
850
+ "&::after": __spreadValues({
851
+ content: '""',
852
+ position: "absolute",
853
+ boxSizing: "content-box",
854
+ top: "50%",
855
+ left: "50%",
856
+ width: "50%",
857
+ height: "50%",
858
+ borderRadius: "50%",
859
+ transform: "translate(-50%, -50%)"
860
+ }, responsiveStyle([brandColor], ([brandColor2 = {
861
+ swatch: {
862
+ hue: 0,
863
+ saturation: 0,
864
+ lightness: 0
865
+ },
866
+ alpha: 1
867
+ }]) => ({
868
+ backgroundColor: getCheckmarkColor(brandColor2)
869
+ })))
870
+ }),
871
+ "&:not(:disabled)": {
872
+ [`&:focus ~ .${FAKE_RADIO_BUTTON_CLASS_NAME}`]: responsiveStyle([brandColor], ([brandColor2 = {
873
+ swatch: {
874
+ hue: 0,
875
+ saturation: 0,
876
+ lightness: 0
877
+ },
878
+ alpha: 1
879
+ }]) => ({
880
+ borderColor: colorToString(brandColor2)
881
+ }))
882
+ },
883
+ "&:not(:disabled):checked": {
884
+ [`&:focus ~ .${FAKE_RADIO_BUTTON_CLASS_NAME}`]: responsiveStyle([contrast], ([contrast2 = Contrasts.LIGHT]) => ({
885
+ borderColor: getContrastBorderColor(contrast2, error)
886
+ }))
887
+ }
888
+ }), className),
889
+ ref
890
+ }));
891
+ });
892
+ var RadioButton = forwardRef(function RadioButton2(_C, ref) {
893
+ var _D = _C, {
845
894
  error,
846
895
  className,
847
896
  style,
848
897
  form
849
- } = _p, restOfProps = __objRest(_p, [
898
+ } = _D, restOfProps = __objRest(_D, [
850
899
  "error",
851
900
  "className",
852
901
  "style",
@@ -872,27 +921,44 @@ var RadioButton = forwardRef(function RadioButton2(_o, ref) {
872
921
  })]
873
922
  });
874
923
  });
875
- const StyledLabel = styled(Label$1)`
876
- display: flex;
877
- align-items: center;
878
- margin: 8px 0;
879
-
880
- &:last-of-type {
881
- margin-bottom: 0;
882
- }
883
- `;
884
- const RadioButtonContainer = styled.span`
885
- margin-right: 8px;
886
- `;
887
- var TableColumnRadioButtonGroup = forwardRef(function TableColumnRadioButtonGroup2(_q, ref) {
888
- var _r = _q, {
924
+ function StyledLabel(_E) {
925
+ var _F = _E, {
926
+ className
927
+ } = _F, restOfProps = __objRest(_F, [
928
+ "className"
929
+ ]);
930
+ return /* @__PURE__ */ jsx(Label$1, __spreadProps(__spreadValues({}, restOfProps), {
931
+ className: cx(useStyle({
932
+ display: "flex",
933
+ alignItems: "center",
934
+ margin: "8px 0",
935
+ "&:last-of-type": {
936
+ marginBottom: 0
937
+ }
938
+ }), className)
939
+ }));
940
+ }
941
+ function RadioButtonContainer(_G) {
942
+ var _H = _G, {
943
+ className
944
+ } = _H, restOfProps = __objRest(_H, [
945
+ "className"
946
+ ]);
947
+ return /* @__PURE__ */ jsx("span", __spreadProps(__spreadValues({}, restOfProps), {
948
+ className: cx(useStyle({
949
+ marginRight: 8
950
+ }), className)
951
+ }));
952
+ }
953
+ var TableColumnRadioButtonGroup = forwardRef(function TableColumnRadioButtonGroup2(_I, ref) {
954
+ var _J = _I, {
889
955
  tableColumn,
890
956
  label = "",
891
957
  value = "",
892
958
  required = false,
893
959
  hideLabel = false,
894
960
  onChange
895
- } = _r, restOfProps = __objRest(_r, [
961
+ } = _J, restOfProps = __objRest(_J, [
896
962
  "tableColumn",
897
963
  "label",
898
964
  "value",
@@ -929,47 +995,74 @@ var TableColumnRadioButtonGroup = forwardRef(function TableColumnRadioButtonGrou
929
995
  }, option.id))]
930
996
  });
931
997
  });
932
- const Container = styled.div.withConfig({
933
- shouldForwardProp: (prop) => !["error", "shape", "size", "contrast", "brandColor"].includes(prop.toString())
934
- })`
935
- ${cssField()}
936
- display: flex;
937
- align-items: center;
938
- position: relative;
939
- user-select: none;
940
- border-color: #f19eb9;
941
-
942
- &:focus,
943
- &:focus-within {
944
- border-color: #e54e7f;
945
- }
946
-
947
- ${(props) => cssMediaRules([props.size, props.contrast], ([size = Sizes.MEDIUM, contrast = Contrasts.LIGHT]) => css`
948
- min-height: ${getSizeHeight$2(size)}px;
949
- max-height: ${getSizeHeight$2(size)}px;
950
-
951
- &::after {
952
- content: '';
953
- position: absolute;
954
- right: ${getSizeHorizontalPadding(size)}px;
955
- top: 50%;
956
- transform: translate3d(0, -25%, 0);
957
- border: solid 0.35em transparent;
958
- border-top-color: ${getContrastColor$1(contrast)};
959
- }
960
- `)}
961
- `;
962
- const Select = styled.select`
963
- appearance: none;
964
- position: absolute;
965
- top: 0;
966
- left: 0;
967
- opacity: 0;
968
- width: 100%;
969
- height: 100%;
970
- `;
971
- var TableColumnSingleSelect = forwardRef(function TableColumnSingleSelect2(_s, ref) {
972
- var _t = _s, {
998
+ function Container(_K) {
999
+ var _L = _K, {
1000
+ shape,
1001
+ size,
1002
+ contrast,
1003
+ brandColor,
1004
+ error,
1005
+ className
1006
+ } = _L, restOfProps = __objRest(_L, [
1007
+ "shape",
1008
+ "size",
1009
+ "contrast",
1010
+ "brandColor",
1011
+ "error",
1012
+ "className"
1013
+ ]);
1014
+ return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({}, restOfProps), {
1015
+ className: cx(useStyle(responsiveField({
1016
+ shape,
1017
+ size,
1018
+ contrast,
1019
+ brandColor,
1020
+ error
1021
+ })), useStyle(__spreadValues({
1022
+ display: "flex",
1023
+ alignItems: "center",
1024
+ position: "relative",
1025
+ userSelect: "none",
1026
+ borderColor: "#f19eb9",
1027
+ "&:focus, &:focus-within": {
1028
+ borderColor: "#e54e7f"
1029
+ }
1030
+ }, responsiveStyle([size, contrast], ([size2 = Sizes.MEDIUM, contrast2 = Contrasts.LIGHT]) => ({
1031
+ minHeight: getSizeHeight$2(size2),
1032
+ maxHeight: getSizeHeight$2(size2),
1033
+ "&::after": {
1034
+ content: '""',
1035
+ position: "absolute",
1036
+ right: getSizeHorizontalPadding(size2),
1037
+ top: "50%",
1038
+ transform: "translate3d(0, -25%, 0)",
1039
+ border: "solid 0.35em transparent",
1040
+ borderTopColor: getContrastColor$1(contrast2)
1041
+ }
1042
+ })))), className)
1043
+ }));
1044
+ }
1045
+ const Select = forwardRef(function Select2(_M, ref) {
1046
+ var _N = _M, {
1047
+ className
1048
+ } = _N, restOfProps = __objRest(_N, [
1049
+ "className"
1050
+ ]);
1051
+ return /* @__PURE__ */ jsx("select", __spreadProps(__spreadValues({}, restOfProps), {
1052
+ ref,
1053
+ className: cx(useStyle({
1054
+ appearance: "none",
1055
+ position: "absolute",
1056
+ top: 0,
1057
+ left: 0,
1058
+ opacity: 0,
1059
+ width: "100%",
1060
+ height: "100%"
1061
+ }), className)
1062
+ }));
1063
+ });
1064
+ var TableColumnSingleSelect = forwardRef(function TableColumnSingleSelect2(_O, ref) {
1065
+ var _P = _O, {
973
1066
  id,
974
1067
  tableColumn,
975
1068
  value = "",
@@ -977,7 +1070,7 @@ var TableColumnSingleSelect = forwardRef(function TableColumnSingleSelect2(_s, r
977
1070
  error = false,
978
1071
  hideLabel = false,
979
1072
  form
980
- } = _t, restOfProps = __objRest(_t, [
1073
+ } = _P, restOfProps = __objRest(_P, [
981
1074
  "id",
982
1075
  "tableColumn",
983
1076
  "value",
@@ -1020,10 +1113,10 @@ var TableColumnSingleSelect = forwardRef(function TableColumnSingleSelect2(_s, r
1020
1113
  })]
1021
1114
  });
1022
1115
  });
1023
- var SingleSelectTableField = forwardRef(function SingleSelectTableField2(_u, ref) {
1024
- var _v = _u, {
1116
+ var SingleSelectTableField = forwardRef(function SingleSelectTableField2(_Q, ref) {
1117
+ var _R = _Q, {
1025
1118
  type
1026
- } = _v, restOfProps = __objRest(_v, [
1119
+ } = _R, restOfProps = __objRest(_R, [
1027
1120
  "type"
1028
1121
  ]);
1029
1122
  return type === "select" ? /* @__PURE__ */ jsx(TableColumnSingleSelect, __spreadProps(__spreadValues({}, restOfProps), {
@@ -1032,19 +1125,21 @@ var SingleSelectTableField = forwardRef(function SingleSelectTableField2(_u, ref
1032
1125
  ref
1033
1126
  }));
1034
1127
  });
1035
- var PhoneNumberTableField = forwardRef(function PhoneNumberTableField2(_w, ref) {
1036
- var _x = _w, {
1128
+ var PhoneNumberTableField = forwardRef(function PhoneNumberTableField2(_S, ref) {
1129
+ var _T = _S, {
1037
1130
  id,
1038
1131
  label = "",
1039
1132
  name,
1040
1133
  error,
1041
- hideLabel = false
1042
- } = _x, restOfProps = __objRest(_x, [
1134
+ hideLabel = false,
1135
+ tableColumn
1136
+ } = _T, restOfProps = __objRest(_T, [
1043
1137
  "id",
1044
1138
  "label",
1045
1139
  "name",
1046
1140
  "error",
1047
- "hideLabel"
1141
+ "hideLabel",
1142
+ "tableColumn"
1048
1143
  ]);
1049
1144
  return /* @__PURE__ */ jsxs(Fragment, {
1050
1145
  children: [!hideLabel && /* @__PURE__ */ jsx(Label$1, {
@@ -1060,19 +1155,21 @@ var PhoneNumberTableField = forwardRef(function PhoneNumberTableField2(_w, ref)
1060
1155
  }))]
1061
1156
  });
1062
1157
  });
1063
- var EmailTableField = forwardRef(function EmailTableField2(_y, ref) {
1064
- var _z = _y, {
1158
+ var EmailTableField = forwardRef(function EmailTableField2(_U, ref) {
1159
+ var _V = _U, {
1065
1160
  id,
1066
1161
  label = "",
1067
1162
  name,
1068
1163
  error,
1069
- hideLabel = false
1070
- } = _z, restOfProps = __objRest(_z, [
1164
+ hideLabel = false,
1165
+ tableColumn
1166
+ } = _V, restOfProps = __objRest(_V, [
1071
1167
  "id",
1072
1168
  "label",
1073
1169
  "name",
1074
1170
  "error",
1075
- "hideLabel"
1171
+ "hideLabel",
1172
+ "tableColumn"
1076
1173
  ]);
1077
1174
  return /* @__PURE__ */ jsxs(Fragment, {
1078
1175
  children: [!hideLabel && /* @__PURE__ */ jsx(Label$1, {
@@ -1088,19 +1185,21 @@ var EmailTableField = forwardRef(function EmailTableField2(_y, ref) {
1088
1185
  }))]
1089
1186
  });
1090
1187
  });
1091
- var URLTableField = forwardRef(function URLTableField2(_A, ref) {
1092
- var _B = _A, {
1188
+ var URLTableField = forwardRef(function URLTableField2(_W, ref) {
1189
+ var _X = _W, {
1093
1190
  id,
1094
1191
  label = "",
1095
1192
  name,
1096
1193
  error,
1097
- hideLabel = false
1098
- } = _B, restOfProps = __objRest(_B, [
1194
+ hideLabel = false,
1195
+ tableColumn
1196
+ } = _X, restOfProps = __objRest(_X, [
1099
1197
  "id",
1100
1198
  "label",
1101
1199
  "name",
1102
1200
  "error",
1103
- "hideLabel"
1201
+ "hideLabel",
1202
+ "tableColumn"
1104
1203
  ]);
1105
1204
  return /* @__PURE__ */ jsxs(Fragment, {
1106
1205
  children: [!hideLabel && /* @__PURE__ */ jsx(Label$1, {
@@ -1116,19 +1215,21 @@ var URLTableField = forwardRef(function URLTableField2(_A, ref) {
1116
1215
  }))]
1117
1216
  });
1118
1217
  });
1119
- var NumberTableField = forwardRef(function NumberTableField2(_C, ref) {
1120
- var _D = _C, {
1218
+ var NumberTableField = forwardRef(function NumberTableField2(_Y, ref) {
1219
+ var _Z = _Y, {
1121
1220
  id,
1122
1221
  label = "",
1123
1222
  name,
1124
1223
  error,
1125
- hideLabel = false
1126
- } = _D, restOfProps = __objRest(_D, [
1224
+ hideLabel = false,
1225
+ tableColumn
1226
+ } = _Z, restOfProps = __objRest(_Z, [
1127
1227
  "id",
1128
1228
  "label",
1129
1229
  "name",
1130
1230
  "error",
1131
- "hideLabel"
1231
+ "hideLabel",
1232
+ "tableColumn"
1132
1233
  ]);
1133
1234
  return /* @__PURE__ */ jsxs(Fragment, {
1134
1235
  children: [!hideLabel && /* @__PURE__ */ jsx(Label$1, {
@@ -1144,36 +1245,43 @@ var NumberTableField = forwardRef(function NumberTableField2(_C, ref) {
1144
1245
  }))]
1145
1246
  });
1146
1247
  });
1147
- const Label = styled.div.withConfig({
1148
- shouldForwardProp: (prop) => !["size"].includes(prop.toString())
1149
- })`
1150
- display: block;
1151
- max-width: 120px;
1152
- min-width: 60px;
1153
- border-radius: 2px;
1154
- background-color: #5f49f4;
1155
- opacity: 0.4;
1156
- ${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
1157
- margin: calc(0.25 * ${getSizeHeight(size)}px + 2px) 0;
1158
- min-height: ${0.5 * getSizeHeight(size)}px;
1159
- max-height: ${0.5 * getSizeHeight(size)}px;
1160
- `)}
1161
- `;
1162
- const Input2 = styled.div.withConfig({
1163
- shouldForwardProp: (prop) => !["shape", "size"].includes(prop.toString())
1164
- })`
1165
- display: block;
1166
- width: 100%;
1167
- border-width: 2px;
1168
- border-style: solid;
1169
- border-color: #5f49f4;
1170
- opacity: 0.4;
1171
- ${(props) => cssMediaRules([props.shape, props.size], ([shape = Shapes.ROUNDED, size = Sizes.MEDIUM]) => css`
1172
- min-height: ${getSizeHeight$1(size)}px;
1173
- max-height: ${getSizeHeight$1(size)}px;
1174
- border-radius: ${getShapeBorderRadius(shape)}px;
1175
- `)}
1176
- `;
1248
+ function Label({
1249
+ size
1250
+ }) {
1251
+ return /* @__PURE__ */ jsx("div", {
1252
+ className: cx(useStyle({
1253
+ display: "block",
1254
+ maxWidth: 120,
1255
+ minWidth: 60,
1256
+ borderRadius: 2,
1257
+ backgroundColor: "#5f49f4",
1258
+ opacity: 0.4
1259
+ }), useStyle(responsiveStyle([size], ([size2 = Sizes.MEDIUM]) => ({
1260
+ margin: `calc(0.25 * ${getSizeHeight(size2)}px + 2px) 0`,
1261
+ minHeight: 0.5 * getSizeHeight(size2),
1262
+ maxHeight: 0.5 * getSizeHeight(size2)
1263
+ }))))
1264
+ });
1265
+ }
1266
+ function Input2({
1267
+ shape,
1268
+ size
1269
+ }) {
1270
+ return /* @__PURE__ */ jsx("div", {
1271
+ className: cx(useStyle({
1272
+ display: "block",
1273
+ width: "100%",
1274
+ borderWidth: 2,
1275
+ borderStyle: "solid",
1276
+ borderColor: "#5f49f4",
1277
+ opacity: 0.4
1278
+ }), useStyle(responsiveStyle([shape, size], ([shape2 = Shapes.ROUNDED, size2 = Sizes.MEDIUM]) => ({
1279
+ minHeight: getSizeHeight$1(size2),
1280
+ maxHeight: getSizeHeight$1(size2),
1281
+ borderRadius: getShapeBorderRadius(shape2)
1282
+ }))))
1283
+ });
1284
+ }
1177
1285
  function PlaceholderTableField() {
1178
1286
  const {
1179
1287
  size,
@@ -1328,13 +1436,14 @@ const spin = keyframes`
1328
1436
  transform: rotate(360deg);
1329
1437
  }
1330
1438
  `;
1331
- const Icon = styled(SvgSpinner20)`
1332
- display: inline-flex;
1333
- animation: ${spin} 1s linear infinite;
1334
- stroke: currentColor;
1335
- `;
1336
1439
  function Spinner() {
1337
- return /* @__PURE__ */ jsx(Icon, {});
1440
+ return /* @__PURE__ */ jsx(SvgSpinner20, {
1441
+ className: useStyle({
1442
+ display: "inline-flex",
1443
+ animation: `${spin} 1s linear infinite`,
1444
+ stroke: "currentColor"
1445
+ })
1446
+ });
1338
1447
  }
1339
1448
  function useTableFormFieldRefs(propController, { fieldsCount }) {
1340
1449
  const [container, setContainer] = useState(null);
@@ -1378,25 +1487,52 @@ function getSizeFontSize(size) {
1378
1487
  throw new Error(`Invalid form size "${size}"`);
1379
1488
  }
1380
1489
  }
1381
- const GridForm = styled.form.withConfig({
1382
- shouldForwardProp: (prop) => !["size", "width", "margin"].includes(prop)
1383
- })`
1384
- display: flex;
1385
- flex-wrap: wrap;
1386
- width: 100%;
1387
- ${(props) => cssMediaRules([props.size], ([size = Sizes.MEDIUM]) => css`
1388
- font-size: ${getSizeFontSize(size)}px;
1389
- `)}
1390
- ${cssWidth()}
1391
- ${cssMargin()}
1392
- `;
1393
- const GridItem = styled.div.withConfig({
1394
- shouldForwardProp: (prop) => !["grid", "index", "rowGap", "columnGap"].includes(prop)
1395
- })`
1396
- align-self: flex-end;
1397
- flex-direction: column;
1398
- ${cssGridItem()}
1399
- `;
1490
+ const GridForm = forwardRef(function GridFrom(__, ref) {
1491
+ var _$ = __, {
1492
+ className,
1493
+ size
1494
+ } = _$, restOfProps = __objRest(_$, [
1495
+ "className",
1496
+ "size"
1497
+ ]);
1498
+ return /* @__PURE__ */ jsx("form", __spreadProps(__spreadValues({}, restOfProps), {
1499
+ ref,
1500
+ className: cx(useStyle({
1501
+ display: "flex",
1502
+ flexWrap: "wrap",
1503
+ width: "100%"
1504
+ }), useStyle(responsiveStyle([size], ([size2 = Sizes.MEDIUM]) => ({
1505
+ fontSize: getSizeFontSize(size2)
1506
+ }))), className)
1507
+ }));
1508
+ });
1509
+ const GridItem = forwardRef(function GridItem2(_aa, ref) {
1510
+ var _ba = _aa, {
1511
+ className,
1512
+ grid,
1513
+ index,
1514
+ rowGap,
1515
+ columnGap
1516
+ } = _ba, restOfProps = __objRest(_ba, [
1517
+ "className",
1518
+ "grid",
1519
+ "index",
1520
+ "rowGap",
1521
+ "columnGap"
1522
+ ]);
1523
+ return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({}, restOfProps), {
1524
+ ref,
1525
+ className: cx(useStyle({
1526
+ alignSelf: "flex-end",
1527
+ flexDirection: "column"
1528
+ }), useStyle(responsiveGridItem({
1529
+ grid,
1530
+ index,
1531
+ rowGap,
1532
+ columnGap
1533
+ })), className)
1534
+ }));
1535
+ });
1400
1536
  function getAlignmentMargin(alignment) {
1401
1537
  switch (alignment) {
1402
1538
  case Alignments.LEFT:
@@ -1407,36 +1543,72 @@ function getAlignmentMargin(alignment) {
1407
1543
  return "0 auto";
1408
1544
  }
1409
1545
  }
1410
- const StyledButton = styled((props) => /* @__PURE__ */ jsx(Button$1, __spreadProps(__spreadValues({}, props), {
1411
- as: "button"
1412
- }))).withConfig({
1413
- shouldForwardProp: (prop) => !["alignment"].includes(prop.toString())
1414
- })`
1415
- display: flex;
1416
- align-items: center;
1417
- justify-content: center;
1418
- ${(props) => cssMediaRules([props.size, props.alignment], ([size = Sizes.MEDIUM, alignment = Alignments.CENTER]) => css`
1419
- min-height: ${getSizeHeight$1(size)}px;
1420
- max-height: ${getSizeHeight$1(size)}px;
1421
- margin: ${getAlignmentMargin(alignment)};
1422
- padding-top: 0;
1423
- padding-bottom: 0;
1424
- `)}
1425
- `;
1426
- const ErrorContainer = styled.div`
1427
- padding: 8px 16px;
1428
- background-color: #f19eb9;
1429
- border-radius: 4px;
1430
- margin-top: 16px;
1431
- `;
1432
- const IconContainer = styled.div`
1433
- fill: currentColor;
1434
- `;
1435
- const ErrorMessage = styled.p`
1436
- font-size: 12px;
1437
- margin: 8px 0;
1438
- color: rgba(127, 0, 0, 0.95);
1439
- `;
1546
+ function StyledButton(_ca) {
1547
+ var _da = _ca, {
1548
+ className,
1549
+ size,
1550
+ alignment
1551
+ } = _da, restOfProps = __objRest(_da, [
1552
+ "className",
1553
+ "size",
1554
+ "alignment"
1555
+ ]);
1556
+ return /* @__PURE__ */ jsx(Button$1, __spreadProps(__spreadValues({}, restOfProps), {
1557
+ as: "button",
1558
+ className: cx(useStyle({
1559
+ display: "flex",
1560
+ alignItems: "center",
1561
+ justifyContent: "center"
1562
+ }), useStyle(responsiveStyle([size, alignment], ([size2 = Sizes.MEDIUM, alignment2 = Alignments.CENTER]) => ({
1563
+ minHeight: getSizeHeight$1(size2),
1564
+ maxHeight: getSizeHeight$1(size2),
1565
+ margin: getAlignmentMargin(alignment2),
1566
+ paddingTop: 0,
1567
+ paddingBottom: 0
1568
+ }))), className)
1569
+ }));
1570
+ }
1571
+ function ErrorContainer(_ea) {
1572
+ var _fa = _ea, {
1573
+ className
1574
+ } = _fa, restOfProps = __objRest(_fa, [
1575
+ "className"
1576
+ ]);
1577
+ return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({}, restOfProps), {
1578
+ className: cx(useStyle({
1579
+ padding: "8px 16px",
1580
+ backgroundColor: "#f19eb9",
1581
+ borderRadius: 4,
1582
+ marginTop: 16
1583
+ }), className)
1584
+ }));
1585
+ }
1586
+ function IconContainer(_ga) {
1587
+ var _ha = _ga, {
1588
+ className
1589
+ } = _ha, restOfProps = __objRest(_ha, [
1590
+ "className"
1591
+ ]);
1592
+ return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({}, restOfProps), {
1593
+ className: cx(useStyle({
1594
+ fill: "currentColor"
1595
+ }), className)
1596
+ }));
1597
+ }
1598
+ function ErrorMessage(_ia) {
1599
+ var _ja = _ia, {
1600
+ className
1601
+ } = _ja, restOfProps = __objRest(_ja, [
1602
+ "className"
1603
+ ]);
1604
+ return /* @__PURE__ */ jsx("p", __spreadProps(__spreadValues({}, restOfProps), {
1605
+ className: cx(useStyle({
1606
+ fontSize: 12,
1607
+ margin: "8px 0",
1608
+ color: "rgba(127, 0, 0, 0.95)"
1609
+ }), className)
1610
+ }));
1611
+ }
1440
1612
  function getTableColumnDefaultValue(tableColumn) {
1441
1613
  switch (tableColumn.__typename) {
1442
1614
  case "CheckboxTableColumn":
@@ -1645,8 +1817,7 @@ const Form = forwardRef(function Form2({
1645
1817
  children: [/* @__PURE__ */ jsxs(GridForm, {
1646
1818
  ref: setRefEl,
1647
1819
  id,
1648
- width,
1649
- margin,
1820
+ className: cx(width, margin),
1650
1821
  size,
1651
1822
  onSubmit: formik.handleSubmit,
1652
1823
  onReset: formik.handleReset,