@ndla/primitives 1.0.129-alpha.0 → 1.0.132-alpha.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 (227) hide show
  1. package/dist/panda.buildinfo.json +25 -1
  2. package/dist/styles.css +100 -4
  3. package/es/Accordion.mjs +1 -1
  4. package/es/Accordion.mjs.map +1 -1
  5. package/es/ArticleLists.mjs +1 -1
  6. package/es/ArticleLists.mjs.map +1 -1
  7. package/es/Badge.mjs +1 -1
  8. package/es/Badge.mjs.map +1 -1
  9. package/es/BlockQuote.mjs +1 -1
  10. package/es/BlockQuote.mjs.map +1 -1
  11. package/es/Button.mjs +1 -1
  12. package/es/Button.mjs.map +1 -1
  13. package/es/Card/Card.mjs +1 -1
  14. package/es/Card/Card.mjs.map +1 -1
  15. package/es/Checkbox.mjs +2 -1
  16. package/es/Checkbox.mjs.map +1 -1
  17. package/es/Combobox.mjs +1 -1
  18. package/es/Combobox.mjs.map +1 -1
  19. package/es/DatePicker.mjs +1 -1
  20. package/es/DatePicker.mjs.map +1 -1
  21. package/es/Dialog.mjs +1 -1
  22. package/es/Dialog.mjs.map +1 -1
  23. package/es/ErrorMessage/ErrorMessage.mjs +1 -1
  24. package/es/ErrorMessage/ErrorMessage.mjs.map +1 -1
  25. package/es/ExpandableBox.mjs +1 -1
  26. package/es/ExpandableBox.mjs.map +1 -1
  27. package/es/Field.mjs +2 -1
  28. package/es/Field.mjs.map +1 -1
  29. package/es/FieldErrorMessage.mjs +2 -1
  30. package/es/FieldErrorMessage.mjs.map +1 -1
  31. package/es/FieldHelper.mjs +2 -1
  32. package/es/FieldHelper.mjs.map +1 -1
  33. package/es/Figure.mjs +1 -1
  34. package/es/Figure.mjs.map +1 -1
  35. package/es/FileUpload.mjs +1 -1
  36. package/es/FileUpload.mjs.map +1 -1
  37. package/es/FramedContent.mjs +1 -1
  38. package/es/FramedContent.mjs.map +1 -1
  39. package/es/Hero.mjs +1 -1
  40. package/es/Hero.mjs.map +1 -1
  41. package/es/Image.mjs +1 -1
  42. package/es/Image.mjs.map +1 -1
  43. package/es/Input.mjs +2 -1
  44. package/es/Input.mjs.map +1 -1
  45. package/es/Label.mjs +3 -1
  46. package/es/Label.mjs.map +1 -1
  47. package/es/Layout/PageContainer.mjs +1 -1
  48. package/es/Layout/PageContainer.mjs.map +1 -1
  49. package/es/Layout/PageContent.mjs +1 -1
  50. package/es/Layout/PageContent.mjs.map +1 -1
  51. package/es/ListItem/ListItem.mjs +1 -1
  52. package/es/ListItem/ListItem.mjs.map +1 -1
  53. package/es/Menu.mjs +1 -1
  54. package/es/Menu.mjs.map +1 -1
  55. package/es/MessageBox.mjs +1 -1
  56. package/es/MessageBox.mjs.map +1 -1
  57. package/es/NdlaLogo.mjs.map +1 -1
  58. package/es/Pagination.mjs +1 -1
  59. package/es/Pagination.mjs.map +1 -1
  60. package/es/Popover.mjs +1 -1
  61. package/es/Popover.mjs.map +1 -1
  62. package/es/RadioGroup.mjs +3 -2
  63. package/es/RadioGroup.mjs.map +1 -1
  64. package/es/RainbowSpinner.mjs +66 -0
  65. package/es/RainbowSpinner.mjs.map +1 -0
  66. package/es/Select.mjs +1 -1
  67. package/es/Select.mjs.map +1 -1
  68. package/es/Skeleton.mjs +1 -1
  69. package/es/Skeleton.mjs.map +1 -1
  70. package/es/Slider.mjs +1 -1
  71. package/es/Slider.mjs.map +1 -1
  72. package/es/Spinner.mjs +1 -1
  73. package/es/Spinner.mjs.map +1 -1
  74. package/es/Switch.mjs +1 -1
  75. package/es/Switch.mjs.map +1 -1
  76. package/es/Table.mjs +1 -1
  77. package/es/Table.mjs.map +1 -1
  78. package/es/Tabs.mjs +1 -1
  79. package/es/Tabs.mjs.map +1 -1
  80. package/es/TagsInput.mjs +1 -1
  81. package/es/TagsInput.mjs.map +1 -1
  82. package/es/Text.mjs +1 -1
  83. package/es/Text.mjs.map +1 -1
  84. package/es/Toast.mjs +1 -1
  85. package/es/Toast.mjs.map +1 -1
  86. package/es/ToggleGroup.mjs +1 -1
  87. package/es/ToggleGroup.mjs.map +1 -1
  88. package/es/Tooltip.mjs +1 -1
  89. package/es/Tooltip.mjs.map +1 -1
  90. package/es/Tree/Tree.mjs +1 -1
  91. package/es/Tree/Tree.mjs.map +1 -1
  92. package/es/index.mjs +3 -2
  93. package/lib/Accordion.d.ts +1 -1
  94. package/lib/Accordion.js +7 -7
  95. package/lib/Accordion.js.map +1 -1
  96. package/lib/ArticleLists.d.ts +1 -1
  97. package/lib/ArticleLists.js +2 -2
  98. package/lib/ArticleLists.js.map +1 -1
  99. package/lib/Badge.d.ts +1 -1
  100. package/lib/Badge.js +2 -2
  101. package/lib/Badge.js.map +1 -1
  102. package/lib/BlockQuote.d.ts +1 -1
  103. package/lib/BlockQuote.js +2 -2
  104. package/lib/BlockQuote.js.map +1 -1
  105. package/lib/Button.d.ts +1 -1
  106. package/lib/Button.js +2 -2
  107. package/lib/Button.js.map +1 -1
  108. package/lib/Card/Card.d.ts +3 -3
  109. package/lib/Card/Card.js +3 -3
  110. package/lib/Card/Card.js.map +1 -1
  111. package/lib/Checkbox.d.ts +2 -1
  112. package/lib/Checkbox.js +9 -8
  113. package/lib/Checkbox.js.map +1 -1
  114. package/lib/Combobox.d.ts +1 -1
  115. package/lib/Combobox.js +16 -16
  116. package/lib/Combobox.js.map +1 -1
  117. package/lib/DatePicker.d.ts +2 -2
  118. package/lib/DatePicker.js +26 -26
  119. package/lib/DatePicker.js.map +1 -1
  120. package/lib/Dialog.d.ts +2 -2
  121. package/lib/Dialog.js +12 -12
  122. package/lib/Dialog.js.map +1 -1
  123. package/lib/ErrorMessage/ErrorMessage.d.ts +4 -4
  124. package/lib/ErrorMessage/ErrorMessage.js +4 -4
  125. package/lib/ErrorMessage/ErrorMessage.js.map +1 -1
  126. package/lib/ExpandableBox.d.ts +1 -1
  127. package/lib/ExpandableBox.js +3 -3
  128. package/lib/ExpandableBox.js.map +1 -1
  129. package/lib/Field.d.ts +2 -1
  130. package/lib/Field.js +4 -3
  131. package/lib/Field.js.map +1 -1
  132. package/lib/FieldErrorMessage.d.ts +2 -1
  133. package/lib/FieldErrorMessage.js +4 -3
  134. package/lib/FieldErrorMessage.js.map +1 -1
  135. package/lib/FieldHelper.d.ts +2 -1
  136. package/lib/FieldHelper.js +4 -3
  137. package/lib/FieldHelper.js.map +1 -1
  138. package/lib/Figure.d.ts +1 -1
  139. package/lib/Figure.js +2 -2
  140. package/lib/Figure.js.map +1 -1
  141. package/lib/FileUpload.d.ts +1 -1
  142. package/lib/FileUpload.js +15 -15
  143. package/lib/FileUpload.js.map +1 -1
  144. package/lib/FramedContent.d.ts +1 -1
  145. package/lib/FramedContent.js +2 -2
  146. package/lib/FramedContent.js.map +1 -1
  147. package/lib/Hero.d.ts +4 -4
  148. package/lib/Hero.js +6 -5
  149. package/lib/Hero.js.map +1 -1
  150. package/lib/Image.js +2 -2
  151. package/lib/Image.js.map +1 -1
  152. package/lib/Input.d.ts +1 -1
  153. package/lib/Input.js +7 -6
  154. package/lib/Input.js.map +1 -1
  155. package/lib/Label.d.ts +2 -1
  156. package/lib/Label.js +7 -5
  157. package/lib/Label.js.map +1 -1
  158. package/lib/Layout/PageContainer.d.ts +1 -1
  159. package/lib/Layout/PageContainer.js +1 -1
  160. package/lib/Layout/PageContainer.js.map +1 -1
  161. package/lib/Layout/PageContent.d.ts +2 -2
  162. package/lib/Layout/PageContent.js +3 -3
  163. package/lib/Layout/PageContent.js.map +1 -1
  164. package/lib/ListItem/ListItem.d.ts +3 -3
  165. package/lib/ListItem/ListItem.js +3 -3
  166. package/lib/ListItem/ListItem.js.map +1 -1
  167. package/lib/Menu.d.ts +1 -1
  168. package/lib/Menu.js +12 -12
  169. package/lib/Menu.js.map +1 -1
  170. package/lib/MessageBox.d.ts +1 -1
  171. package/lib/MessageBox.js +2 -2
  172. package/lib/MessageBox.js.map +1 -1
  173. package/lib/NdlaLogo.js.map +1 -1
  174. package/lib/Pagination.d.ts +1 -1
  175. package/lib/Pagination.js +10 -9
  176. package/lib/Pagination.js.map +1 -1
  177. package/lib/Popover.d.ts +2 -2
  178. package/lib/Popover.js +15 -15
  179. package/lib/Popover.js.map +1 -1
  180. package/lib/RadioGroup.d.ts +1 -1
  181. package/lib/RadioGroup.js +13 -12
  182. package/lib/RadioGroup.js.map +1 -1
  183. package/lib/RainbowSpinner.d.ts +26 -0
  184. package/lib/RainbowSpinner.js +66 -0
  185. package/lib/RainbowSpinner.js.map +1 -0
  186. package/lib/Select.d.ts +1 -1
  187. package/lib/Select.js +18 -18
  188. package/lib/Select.js.map +1 -1
  189. package/lib/Skeleton.d.ts +2 -2
  190. package/lib/Skeleton.js +3 -2
  191. package/lib/Skeleton.js.map +1 -1
  192. package/lib/Slider.d.ts +1 -1
  193. package/lib/Slider.js +9 -9
  194. package/lib/Slider.js.map +1 -1
  195. package/lib/Spinner.d.ts +1 -1
  196. package/lib/Spinner.js +2 -2
  197. package/lib/Spinner.js.map +1 -1
  198. package/lib/Switch.d.ts +1 -1
  199. package/lib/Switch.js +7 -7
  200. package/lib/Switch.js.map +1 -1
  201. package/lib/Table.d.ts +2 -2
  202. package/lib/Table.js +3 -2
  203. package/lib/Table.js.map +1 -1
  204. package/lib/Tabs.d.ts +1 -1
  205. package/lib/Tabs.js +6 -6
  206. package/lib/Tabs.js.map +1 -1
  207. package/lib/TagsInput.d.ts +1 -1
  208. package/lib/TagsInput.js +12 -12
  209. package/lib/TagsInput.js.map +1 -1
  210. package/lib/Text.d.ts +1 -1
  211. package/lib/Text.js +3 -3
  212. package/lib/Text.js.map +1 -1
  213. package/lib/Toast.d.ts +1 -1
  214. package/lib/Toast.js +7 -7
  215. package/lib/Toast.js.map +1 -1
  216. package/lib/ToggleGroup.d.ts +1 -1
  217. package/lib/ToggleGroup.js +6 -5
  218. package/lib/ToggleGroup.js.map +1 -1
  219. package/lib/Tooltip.d.ts +1 -1
  220. package/lib/Tooltip.js +8 -8
  221. package/lib/Tooltip.js.map +1 -1
  222. package/lib/Tree/Tree.d.ts +2 -2
  223. package/lib/Tree/Tree.js +19 -19
  224. package/lib/Tree/Tree.js.map +1 -1
  225. package/lib/index.d.ts +2 -1
  226. package/lib/index.js +6 -3
  227. package/package.json +5 -5
@@ -5,12 +5,12 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  */
8
- import { type HTMLArkProps } from "@ark-ui/react";
8
+ import { type HTMLArkProps } from "@ark-ui/react/factory";
9
9
  import type { StyledProps } from "@ndla/styled-system/types";
10
10
  import { type TextProps } from "../Text";
11
- export declare const ErrorMessageRoot: import("@ndla/styled-system/jsx").StyleContextProvider<import("react").ForwardRefExoticComponent<import("react").ClassAttributes<HTMLElement> & import("react").HTMLAttributes<HTMLElement> & import("@ark-ui/react").PolymorphicProps>, import("@ndla/styled-system/types").SlotRecipeRuntimeFn<"root" | "content" | "title" | "description" | "actions", import("@ndla/styled-system/types").SlotRecipeVariantRecord<"root" | "content" | "title" | "description" | "actions">>>;
12
- export declare const ErrorMessageContent: import("@ndla/styled-system/jsx").StyleContextConsumer<import("react").ForwardRefExoticComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@ark-ui/react").PolymorphicProps>>;
13
- export declare const ErrorMessageActions: import("@ndla/styled-system/jsx").StyleContextConsumer<import("react").ForwardRefExoticComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@ark-ui/react").PolymorphicProps>>;
11
+ export declare const ErrorMessageRoot: import("@ndla/styled-system/jsx").StyleContextProvider<import("react").ForwardRefExoticComponent<import("react").ClassAttributes<HTMLElement> & import("react").HTMLAttributes<HTMLElement> & import("@ark-ui/react/factory").PolymorphicProps>, import("@ndla/styled-system/types").SlotRecipeRuntimeFn<"root" | "content" | "title" | "description" | "actions", import("@ndla/styled-system/types").SlotRecipeVariantRecord<"root" | "content" | "title" | "description" | "actions">>>;
12
+ export declare const ErrorMessageContent: import("@ndla/styled-system/jsx").StyleContextConsumer<import("react").ForwardRefExoticComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@ark-ui/react/factory").PolymorphicProps>>;
13
+ export declare const ErrorMessageActions: import("@ndla/styled-system/jsx").StyleContextConsumer<import("react").ForwardRefExoticComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@ark-ui/react/factory").PolymorphicProps>>;
14
14
  interface ErrorMessageTitleProps extends Omit<HTMLArkProps<"h1">, "color">, StyledProps, TextProps {
15
15
  }
16
16
  export declare const ErrorMessageTitle: import("@ndla/styled-system/jsx").StyleContextConsumer<import("react").ForwardRefExoticComponent<ErrorMessageTitleProps & import("react").RefAttributes<HTMLHeadingElement>>>;
@@ -1,8 +1,8 @@
1
1
  const require_Text = require("../Text.js");
2
- let _ark_ui_react = require("@ark-ui/react");
3
2
  let _ndla_styled_system_css = require("@ndla/styled-system/css");
4
3
  let _ndla_styled_system_jsx = require("@ndla/styled-system/jsx");
5
4
  let react_jsx_runtime = require("react/jsx-runtime");
5
+ let _ark_ui_react_factory = require("@ark-ui/react/factory");
6
6
  let react = require("react");
7
7
  //#region src/ErrorMessage/ErrorMessage.tsx
8
8
  /**
@@ -43,9 +43,9 @@ const { withProvider, withContext } = (0, _ndla_styled_system_jsx.createStyleCon
43
43
  description: { textAlign: "center" }
44
44
  }
45
45
  }));
46
- const ErrorMessageRoot = withProvider(_ark_ui_react.ark.article, "root", { baseComponent: true });
47
- const ErrorMessageContent = withContext(_ark_ui_react.ark.div, "content", { baseComponent: true });
48
- const ErrorMessageActions = withContext(_ark_ui_react.ark.div, "actions", { baseComponent: true });
46
+ const ErrorMessageRoot = withProvider(_ark_ui_react_factory.ark.article, "root", { baseComponent: true });
47
+ const ErrorMessageContent = withContext(_ark_ui_react_factory.ark.div, "content", { baseComponent: true });
48
+ const ErrorMessageActions = withContext(_ark_ui_react_factory.ark.div, "actions", { baseComponent: true });
49
49
  const ErrorMessageTitle = withContext((0, react.forwardRef)(({ textStyle = "heading.small", ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Text.Heading, {
50
50
  textStyle,
51
51
  ...props,
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorMessage.js","names":["ark","Heading","Text"],"sources":["../../src/ErrorMessage/ErrorMessage.tsx"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { type HTMLArkProps, ark } from \"@ark-ui/react\";\nimport { sva } from \"@ndla/styled-system/css\";\nimport { createStyleContext } from \"@ndla/styled-system/jsx\";\nimport type { StyledProps } from \"@ndla/styled-system/types\";\nimport { forwardRef } from \"react\";\nimport { Heading, Text, type TextProps } from \"../Text\";\n\nconst errorMessageRecipe = sva({\n slots: [\"root\", \"content\", \"actions\", \"title\", \"description\"],\n base: {\n root: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"xxlarge\",\n alignItems: \"center\",\n },\n content: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"medium\",\n alignItems: \"center\",\n },\n actions: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"xsmall\",\n alignItems: \"center\",\n },\n title: {\n textAlign: \"center\",\n },\n description: {\n textAlign: \"center\",\n },\n },\n});\n\nconst { withProvider, withContext } = createStyleContext(errorMessageRecipe);\n\nexport const ErrorMessageRoot = withProvider(ark.article, \"root\", { baseComponent: true });\n\nexport const ErrorMessageContent = withContext(ark.div, \"content\", { baseComponent: true });\n\nexport const ErrorMessageActions = withContext(ark.div, \"actions\", { baseComponent: true });\n\ninterface ErrorMessageTitleProps extends Omit<HTMLArkProps<\"h1\">, \"color\">, StyledProps, TextProps {}\n\nconst InternalErrorMessageTitle = forwardRef<HTMLHeadingElement, ErrorMessageTitleProps>(\n ({ textStyle = \"heading.small\", ...props }, ref) => <Heading textStyle={textStyle} {...props} ref={ref} />,\n);\n\nexport const ErrorMessageTitle = withContext(InternalErrorMessageTitle, \"title\");\n\ninterface ErrorMessageDescriptionProps extends Omit<HTMLArkProps<\"p\">, \"color\">, StyledProps, TextProps {}\n\nconst InternalErrorMessageDescription = forwardRef<HTMLParagraphElement, ErrorMessageDescriptionProps>(\n ({ textStyle = \"body.xlarge\", ...props }, ref) => <Text textStyle={textStyle} {...props} ref={ref} />,\n);\n\nexport const ErrorMessageDescription = withContext(InternalErrorMessageDescription, \"description\");\n"],"mappings":";;;;;;;;;;;;;;AA6CA,MAAM,EAAE,cAAc,iBAAA,GAAA,wBAAA,qBAAA,GAAA,wBAAA,KA9BS;CAC7B,OAAO;EAAC;EAAQ;EAAW;EAAW;EAAS;EAAc;CAC7D,MAAM;EACJ,MAAM;GACJ,SAAS;GACT,eAAe;GACf,KAAK;GACL,YAAY;GACb;EACD,SAAS;GACP,SAAS;GACT,eAAe;GACf,KAAK;GACL,YAAY;GACb;EACD,SAAS;GACP,SAAS;GACT,eAAe;GACf,KAAK;GACL,YAAY;GACb;EACD,OAAO,EACL,WAAW,UACZ;EACD,aAAa,EACX,WAAW,UACZ;EACF;CACF,CAE0E,CAAC;AAE5E,MAAa,mBAAmB,aAAaA,cAAAA,IAAI,SAAS,QAAQ,EAAE,eAAe,MAAM,CAAC;AAE1F,MAAa,sBAAsB,YAAYA,cAAAA,IAAI,KAAK,WAAW,EAAE,eAAe,MAAM,CAAC;AAE3F,MAAa,sBAAsB,YAAYA,cAAAA,IAAI,KAAK,WAAW,EAAE,eAAe,MAAM,CAAC;AAQ3F,MAAa,oBAAoB,aAJ3B,GAAA,MAAA,aACH,EAAE,YAAY,iBAAiB,GAAG,SAAS,QAAQ,iBAAA,GAAA,kBAAA,KAACC,aAAAA,SAAD;CAAoB;CAAW,GAAI;CAAY;CAAO,CAAA,CAG/D,EAA2B,QAAQ;AAQhF,MAAa,0BAA0B,aAJjC,GAAA,MAAA,aACH,EAAE,YAAY,eAAe,GAAG,SAAS,QAAQ,iBAAA,GAAA,kBAAA,KAACC,aAAAA,MAAD;CAAiB;CAAW,GAAI;CAAY;CAAO,CAAA,CAGpD,EAAiC,cAAc"}
1
+ {"version":3,"file":"ErrorMessage.js","names":["ark","Heading","Text"],"sources":["../../src/ErrorMessage/ErrorMessage.tsx"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { type HTMLArkProps, ark } from \"@ark-ui/react/factory\";\nimport { sva } from \"@ndla/styled-system/css\";\nimport { createStyleContext } from \"@ndla/styled-system/jsx\";\nimport type { StyledProps } from \"@ndla/styled-system/types\";\nimport { forwardRef } from \"react\";\nimport { Heading, Text, type TextProps } from \"../Text\";\n\nconst errorMessageRecipe = sva({\n slots: [\"root\", \"content\", \"actions\", \"title\", \"description\"],\n base: {\n root: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"xxlarge\",\n alignItems: \"center\",\n },\n content: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"medium\",\n alignItems: \"center\",\n },\n actions: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"xsmall\",\n alignItems: \"center\",\n },\n title: {\n textAlign: \"center\",\n },\n description: {\n textAlign: \"center\",\n },\n },\n});\n\nconst { withProvider, withContext } = createStyleContext(errorMessageRecipe);\n\nexport const ErrorMessageRoot = withProvider(ark.article, \"root\", { baseComponent: true });\n\nexport const ErrorMessageContent = withContext(ark.div, \"content\", { baseComponent: true });\n\nexport const ErrorMessageActions = withContext(ark.div, \"actions\", { baseComponent: true });\n\ninterface ErrorMessageTitleProps extends Omit<HTMLArkProps<\"h1\">, \"color\">, StyledProps, TextProps {}\n\nconst InternalErrorMessageTitle = forwardRef<HTMLHeadingElement, ErrorMessageTitleProps>(\n ({ textStyle = \"heading.small\", ...props }, ref) => <Heading textStyle={textStyle} {...props} ref={ref} />,\n);\n\nexport const ErrorMessageTitle = withContext(InternalErrorMessageTitle, \"title\");\n\ninterface ErrorMessageDescriptionProps extends Omit<HTMLArkProps<\"p\">, \"color\">, StyledProps, TextProps {}\n\nconst InternalErrorMessageDescription = forwardRef<HTMLParagraphElement, ErrorMessageDescriptionProps>(\n ({ textStyle = \"body.xlarge\", ...props }, ref) => <Text textStyle={textStyle} {...props} ref={ref} />,\n);\n\nexport const ErrorMessageDescription = withContext(InternalErrorMessageDescription, \"description\");\n"],"mappings":";;;;;;;;;;;;;;AA6CA,MAAM,EAAE,cAAc,iBAAA,GAAA,wBAAA,qBAAA,GAAA,wBAAA,KA9BS;CAC7B,OAAO;EAAC;EAAQ;EAAW;EAAW;EAAS;CAAa;CAC5D,MAAM;EACJ,MAAM;GACJ,SAAS;GACT,eAAe;GACf,KAAK;GACL,YAAY;EACd;EACA,SAAS;GACP,SAAS;GACT,eAAe;GACf,KAAK;GACL,YAAY;EACd;EACA,SAAS;GACP,SAAS;GACT,eAAe;GACf,KAAK;GACL,YAAY;EACd;EACA,OAAO,EACL,WAAW,SACb;EACA,aAAa,EACX,WAAW,SACb;CACF;AACF,CAE0E,CAAC;AAE3E,MAAa,mBAAmB,aAAaA,sBAAAA,IAAI,SAAS,QAAQ,EAAE,eAAe,KAAK,CAAC;AAEzF,MAAa,sBAAsB,YAAYA,sBAAAA,IAAI,KAAK,WAAW,EAAE,eAAe,KAAK,CAAC;AAE1F,MAAa,sBAAsB,YAAYA,sBAAAA,IAAI,KAAK,WAAW,EAAE,eAAe,KAAK,CAAC;AAQ1F,MAAa,oBAAoB,aAJ3B,GAAA,MAAA,aACH,EAAE,YAAY,iBAAiB,GAAG,SAAS,QAAQ,iBAAA,GAAA,kBAAA,KAACC,aAAAA,SAAD;CAAoB;CAAW,GAAI;CAAY;AAAM,CAAA,CAG9D,GAA2B,OAAO;AAQ/E,MAAa,0BAA0B,aAJjC,GAAA,MAAA,aACH,EAAE,YAAY,eAAe,GAAG,SAAS,QAAQ,iBAAA,GAAA,kBAAA,KAACC,aAAAA,MAAD;CAAiB;CAAW,GAAI;CAAY;AAAM,CAAA,CAGnD,GAAiC,aAAa"}
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  */
8
- import { type HTMLArkProps } from "@ark-ui/react";
8
+ import { type HTMLArkProps } from "@ark-ui/react/factory";
9
9
  import type { StyledProps } from "@ndla/styled-system/types";
10
10
  export interface ExpandableBoxProps extends HTMLArkProps<"details">, StyledProps {
11
11
  }
@@ -1,6 +1,6 @@
1
- let _ark_ui_react = require("@ark-ui/react");
2
1
  let _ndla_styled_system_jsx = require("@ndla/styled-system/jsx");
3
2
  let react_jsx_runtime = require("react/jsx-runtime");
3
+ let _ark_ui_react_factory = require("@ark-ui/react/factory");
4
4
  let react = require("react");
5
5
  //#region src/ExpandableBox.tsx
6
6
  /**
@@ -10,7 +10,7 @@ let react = require("react");
10
10
  * LICENSE file in the root directory of this source tree.
11
11
  *
12
12
  */
13
- const StyledExpandableBox = (0, _ndla_styled_system_jsx.styled)(_ark_ui_react.ark.details, { base: {
13
+ const StyledExpandableBox = (0, _ndla_styled_system_jsx.styled)(_ark_ui_react_factory.ark.details, { base: {
14
14
  transitionDuration: "fast",
15
15
  width: "100%",
16
16
  position: "relative",
@@ -54,7 +54,7 @@ const ExpandableBox = (0, react.forwardRef)((props, ref) => {
54
54
  ref
55
55
  });
56
56
  });
57
- const StyledExpandableBoxSummary = (0, _ndla_styled_system_jsx.styled)(_ark_ui_react.ark.summary, { base: {
57
+ const StyledExpandableBoxSummary = (0, _ndla_styled_system_jsx.styled)(_ark_ui_react_factory.ark.summary, { base: {
58
58
  cursor: "pointer",
59
59
  margin: "-medium",
60
60
  padding: "medium",
@@ -1 +1 @@
1
- {"version":3,"file":"ExpandableBox.js","names":["ark"],"sources":["../src/ExpandableBox.tsx"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { type HTMLArkProps, ark } from \"@ark-ui/react\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { StyledProps } from \"@ndla/styled-system/types\";\nimport { forwardRef, useEffect } from \"react\";\n\nexport interface ExpandableBoxProps extends HTMLArkProps<\"details\">, StyledProps {}\n\nconst StyledExpandableBox = styled(\n ark.details,\n {\n base: {\n transitionDuration: \"fast\",\n width: \"100%\",\n position: \"relative\",\n border: \"1px solid\",\n borderRadius: \"xsmall\",\n borderColor: \"stroke.subtle\",\n padding: \"medium\",\n clear: \"both\",\n overflow: \"hidden\",\n _open: {\n padding: \"medium\",\n \"& summary, [data-embed-type='expandable-box-summary']\": {\n marginBlockEnd: \"-xxsmall\",\n },\n },\n },\n },\n { baseComponent: true },\n);\n\nconst onBeforePrint = (_: Event) => {\n const detailsElements = document.querySelectorAll(\"details\");\n detailsElements.forEach((details) => {\n if (!details.hasAttribute(\"open\")) {\n details.setAttribute(\"data-print-open\", \"true\");\n details.setAttribute(\"open\", \"true\");\n }\n });\n};\n\nconst onAfterPrint = (_: Event) => {\n const detailsElements = document.querySelectorAll(\"details[data-print-open]\");\n detailsElements.forEach((details) => {\n details.removeAttribute(\"data-print-open\");\n details.removeAttribute(\"open\");\n });\n};\n\nexport const ExpandableBox = forwardRef<HTMLDetailsElement, ExpandableBoxProps>((props, ref) => {\n useEffect(() => {\n window.addEventListener(\"beforeprint\", onBeforePrint);\n window.addEventListener(\"afterprint\", onAfterPrint);\n return () => {\n window.removeEventListener(\"beforeprint\", onBeforePrint);\n window.removeEventListener(\"afterprint\", onAfterPrint);\n };\n }, []);\n return <StyledExpandableBox {...props} data-embed-type=\"expandable-box\" ref={ref} />;\n});\n\nexport interface ExpandableBoxSummaryProps extends HTMLArkProps<\"summary\">, StyledProps {}\n\nconst StyledExpandableBoxSummary = styled(\n ark.summary,\n {\n base: {\n cursor: \"pointer\",\n margin: \"-medium\",\n padding: \"medium\",\n textStyle: \"label.large!\",\n _hover: {\n color: \"text.action\",\n },\n \"& > *\": {\n display: \"inline!\",\n textStyle: \"label.large!\",\n },\n },\n },\n { baseComponent: true },\n);\n\nexport const ExpandableBoxSummary = forwardRef<HTMLElement, ExpandableBoxSummaryProps>((props, ref) => (\n <StyledExpandableBoxSummary {...props} data-embed-type=\"expandable-box-summary\" ref={ref} />\n));\n"],"mappings":";;;;;;;;;;;;AAeA,MAAM,uBAAA,GAAA,wBAAA,QACJA,cAAAA,IAAI,SACJ,EACE,MAAM;CACJ,oBAAoB;CACpB,OAAO;CACP,UAAU;CACV,QAAQ;CACR,cAAc;CACd,aAAa;CACb,SAAS;CACT,OAAO;CACP,UAAU;CACV,OAAO;EACL,SAAS;EACT,yDAAyD,EACvD,gBAAgB,YACjB;EACF;CACF,EACF,EACD,EAAE,eAAe,MAAM,CACxB;AAED,MAAM,iBAAiB,MAAa;AACV,UAAS,iBAAiB,UACnC,CAAC,SAAS,YAAY;AACnC,MAAI,CAAC,QAAQ,aAAa,OAAO,EAAE;AACjC,WAAQ,aAAa,mBAAmB,OAAO;AAC/C,WAAQ,aAAa,QAAQ,OAAO;;GAEtC;;AAGJ,MAAM,gBAAgB,MAAa;AACT,UAAS,iBAAiB,2BACnC,CAAC,SAAS,YAAY;AACnC,UAAQ,gBAAgB,kBAAkB;AAC1C,UAAQ,gBAAgB,OAAO;GAC/B;;AAGJ,MAAa,iBAAA,GAAA,MAAA,aAAoE,OAAO,QAAQ;AAC9F,EAAA,GAAA,MAAA,iBAAgB;AACd,SAAO,iBAAiB,eAAe,cAAc;AACrD,SAAO,iBAAiB,cAAc,aAAa;AACnD,eAAa;AACX,UAAO,oBAAoB,eAAe,cAAc;AACxD,UAAO,oBAAoB,cAAc,aAAa;;IAEvD,EAAE,CAAC;AACN,QAAO,iBAAA,GAAA,kBAAA,KAAC,qBAAD;EAAqB,GAAI;EAAO,mBAAgB;EAAsB;EAAO,CAAA;EACpF;AAIF,MAAM,8BAAA,GAAA,wBAAA,QACJA,cAAAA,IAAI,SACJ,EACE,MAAM;CACJ,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,WAAW;CACX,QAAQ,EACN,OAAO,eACR;CACD,SAAS;EACP,SAAS;EACT,WAAW;EACZ;CACF,EACF,EACD,EAAE,eAAe,MAAM,CACxB;AAED,MAAa,wBAAA,GAAA,MAAA,aAA2E,OAAO,QAC7F,iBAAA,GAAA,kBAAA,KAAC,4BAAD;CAA4B,GAAI;CAAO,mBAAgB;CAA8B;CAAO,CAAA,CAC5F"}
1
+ {"version":3,"file":"ExpandableBox.js","names":["ark"],"sources":["../src/ExpandableBox.tsx"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { type HTMLArkProps, ark } from \"@ark-ui/react/factory\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { StyledProps } from \"@ndla/styled-system/types\";\nimport { forwardRef, useEffect } from \"react\";\n\nexport interface ExpandableBoxProps extends HTMLArkProps<\"details\">, StyledProps {}\n\nconst StyledExpandableBox = styled(\n ark.details,\n {\n base: {\n transitionDuration: \"fast\",\n width: \"100%\",\n position: \"relative\",\n border: \"1px solid\",\n borderRadius: \"xsmall\",\n borderColor: \"stroke.subtle\",\n padding: \"medium\",\n clear: \"both\",\n overflow: \"hidden\",\n _open: {\n padding: \"medium\",\n \"& summary, [data-embed-type='expandable-box-summary']\": {\n marginBlockEnd: \"-xxsmall\",\n },\n },\n },\n },\n { baseComponent: true },\n);\n\nconst onBeforePrint = (_: Event) => {\n const detailsElements = document.querySelectorAll(\"details\");\n detailsElements.forEach((details) => {\n if (!details.hasAttribute(\"open\")) {\n details.setAttribute(\"data-print-open\", \"true\");\n details.setAttribute(\"open\", \"true\");\n }\n });\n};\n\nconst onAfterPrint = (_: Event) => {\n const detailsElements = document.querySelectorAll(\"details[data-print-open]\");\n detailsElements.forEach((details) => {\n details.removeAttribute(\"data-print-open\");\n details.removeAttribute(\"open\");\n });\n};\n\nexport const ExpandableBox = forwardRef<HTMLDetailsElement, ExpandableBoxProps>((props, ref) => {\n useEffect(() => {\n window.addEventListener(\"beforeprint\", onBeforePrint);\n window.addEventListener(\"afterprint\", onAfterPrint);\n return () => {\n window.removeEventListener(\"beforeprint\", onBeforePrint);\n window.removeEventListener(\"afterprint\", onAfterPrint);\n };\n }, []);\n return <StyledExpandableBox {...props} data-embed-type=\"expandable-box\" ref={ref} />;\n});\n\nexport interface ExpandableBoxSummaryProps extends HTMLArkProps<\"summary\">, StyledProps {}\n\nconst StyledExpandableBoxSummary = styled(\n ark.summary,\n {\n base: {\n cursor: \"pointer\",\n margin: \"-medium\",\n padding: \"medium\",\n textStyle: \"label.large!\",\n _hover: {\n color: \"text.action\",\n },\n \"& > *\": {\n display: \"inline!\",\n textStyle: \"label.large!\",\n },\n },\n },\n { baseComponent: true },\n);\n\nexport const ExpandableBoxSummary = forwardRef<HTMLElement, ExpandableBoxSummaryProps>((props, ref) => (\n <StyledExpandableBoxSummary {...props} data-embed-type=\"expandable-box-summary\" ref={ref} />\n));\n"],"mappings":";;;;;;;;;;;;AAeA,MAAM,uBAAA,GAAA,wBAAA,QACJA,sBAAAA,IAAI,SACJ,EACE,MAAM;CACJ,oBAAoB;CACpB,OAAO;CACP,UAAU;CACV,QAAQ;CACR,cAAc;CACd,aAAa;CACb,SAAS;CACT,OAAO;CACP,UAAU;CACV,OAAO;EACL,SAAS;EACT,yDAAyD,EACvD,gBAAgB,WAClB;CACF;AACF,EACF,GACA,EAAE,eAAe,KAAK,CACxB;AAEA,MAAM,iBAAiB,MAAa;CAElC,SADiC,iBAAiB,SACpC,EAAE,SAAS,YAAY;EACnC,IAAI,CAAC,QAAQ,aAAa,MAAM,GAAG;GACjC,QAAQ,aAAa,mBAAmB,MAAM;GAC9C,QAAQ,aAAa,QAAQ,MAAM;EACrC;CACF,CAAC;AACH;AAEA,MAAM,gBAAgB,MAAa;CAEjC,SADiC,iBAAiB,0BACpC,EAAE,SAAS,YAAY;EACnC,QAAQ,gBAAgB,iBAAiB;EACzC,QAAQ,gBAAgB,MAAM;CAChC,CAAC;AACH;AAEA,MAAa,iBAAA,GAAA,MAAA,aAAoE,OAAO,QAAQ;CAC9F,CAAA,GAAA,MAAA,iBAAgB;EACd,OAAO,iBAAiB,eAAe,aAAa;EACpD,OAAO,iBAAiB,cAAc,YAAY;EAClD,aAAa;GACX,OAAO,oBAAoB,eAAe,aAAa;GACvD,OAAO,oBAAoB,cAAc,YAAY;EACvD;CACF,GAAG,CAAC,CAAC;CACL,OAAO,iBAAA,GAAA,kBAAA,KAAC,qBAAD;EAAqB,GAAI;EAAO,mBAAgB;EAAsB;CAAM,CAAA;AACrF,CAAC;AAID,MAAM,8BAAA,GAAA,wBAAA,QACJA,sBAAAA,IAAI,SACJ,EACE,MAAM;CACJ,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,WAAW;CACX,QAAQ,EACN,OAAO,cACT;CACA,SAAS;EACP,SAAS;EACT,WAAW;CACb;AACF,EACF,GACA,EAAE,eAAe,KAAK,CACxB;AAEA,MAAa,wBAAA,GAAA,MAAA,aAA2E,OAAO,QAC7F,iBAAA,GAAA,kBAAA,KAAC,4BAAD;CAA4B,GAAI;CAAO,mBAAgB;CAA8B;AAAM,CAAA,CAC5F"}
package/lib/Field.d.ts CHANGED
@@ -5,6 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  */
8
- import { Field, Fieldset } from "@ark-ui/react";
8
+ import { Field } from "@ark-ui/react/field";
9
+ import { Fieldset } from "@ark-ui/react/fieldset";
9
10
  export declare const FieldRoot: import("@ndla/styled-system/types").StyledComponent<import("react").ForwardRefExoticComponent<Field.RootProps & import("react").RefAttributes<HTMLDivElement>>, {}>;
10
11
  export declare const FieldsetRoot: import("@ndla/styled-system/types").StyledComponent<import("react").ForwardRefExoticComponent<Fieldset.RootProps & import("react").RefAttributes<HTMLFieldSetElement>>, {}>;
package/lib/Field.js CHANGED
@@ -1,5 +1,6 @@
1
- let _ark_ui_react = require("@ark-ui/react");
2
1
  let _ndla_styled_system_jsx = require("@ndla/styled-system/jsx");
2
+ let _ark_ui_react_field = require("@ark-ui/react/field");
3
+ let _ark_ui_react_fieldset = require("@ark-ui/react/fieldset");
3
4
  //#region src/Field.tsx
4
5
  /**
5
6
  * Copyright (c) 2024-present, NDLA.
@@ -13,8 +14,8 @@ const rootStyle = {
13
14
  flexDirection: "column",
14
15
  gap: "3xsmall"
15
16
  };
16
- const FieldRoot = (0, _ndla_styled_system_jsx.styled)(_ark_ui_react.Field.Root, { base: rootStyle }, { baseComponent: true });
17
- const FieldsetRoot = (0, _ndla_styled_system_jsx.styled)(_ark_ui_react.Fieldset.Root, { base: rootStyle }, { baseComponent: true });
17
+ const FieldRoot = (0, _ndla_styled_system_jsx.styled)(_ark_ui_react_field.Field.Root, { base: rootStyle }, { baseComponent: true });
18
+ const FieldsetRoot = (0, _ndla_styled_system_jsx.styled)(_ark_ui_react_fieldset.Fieldset.Root, { base: rootStyle }, { baseComponent: true });
18
19
  //#endregion
19
20
  exports.FieldRoot = FieldRoot;
20
21
  exports.FieldsetRoot = FieldsetRoot;
package/lib/Field.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Field.js","names":["Field","Fieldset"],"sources":["../src/Field.tsx"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { Field, Fieldset } from \"@ark-ui/react\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { SystemStyleObject } from \"@ndla/styled-system/types\";\n\nconst rootStyle: SystemStyleObject = {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"3xsmall\",\n};\n\nexport const FieldRoot = styled(Field.Root, { base: rootStyle }, { baseComponent: true });\n\nexport const FieldsetRoot = styled(Fieldset.Root, { base: rootStyle }, { baseComponent: true });\n"],"mappings":";;;;;;;;;;AAYA,MAAM,YAA+B;CACnC,SAAS;CACT,eAAe;CACf,KAAK;CACN;AAED,MAAa,aAAA,GAAA,wBAAA,QAAmBA,cAAAA,MAAM,MAAM,EAAE,MAAM,WAAW,EAAE,EAAE,eAAe,MAAM,CAAC;AAEzF,MAAa,gBAAA,GAAA,wBAAA,QAAsBC,cAAAA,SAAS,MAAM,EAAE,MAAM,WAAW,EAAE,EAAE,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Field.js","names":["Field","Fieldset"],"sources":["../src/Field.tsx"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { Field } from \"@ark-ui/react/field\";\nimport { Fieldset } from \"@ark-ui/react/fieldset\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { SystemStyleObject } from \"@ndla/styled-system/types\";\n\nconst rootStyle: SystemStyleObject = {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"3xsmall\",\n};\n\nexport const FieldRoot = styled(Field.Root, { base: rootStyle }, { baseComponent: true });\n\nexport const FieldsetRoot = styled(Fieldset.Root, { base: rootStyle }, { baseComponent: true });\n"],"mappings":";;;;;;;;;;;AAaA,MAAM,YAA+B;CACnC,SAAS;CACT,eAAe;CACf,KAAK;AACP;AAEA,MAAa,aAAA,GAAA,wBAAA,QAAmBA,oBAAAA,MAAM,MAAM,EAAE,MAAM,UAAU,GAAG,EAAE,eAAe,KAAK,CAAC;AAExF,MAAa,gBAAA,GAAA,wBAAA,QAAsBC,uBAAAA,SAAS,MAAM,EAAE,MAAM,UAAU,GAAG,EAAE,eAAe,KAAK,CAAC"}
@@ -5,7 +5,8 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  */
8
- import { Field, Fieldset } from "@ark-ui/react";
8
+ import { Field } from "@ark-ui/react/field";
9
+ import { Fieldset } from "@ark-ui/react/fieldset";
9
10
  import type { StyledProps } from "@ndla/styled-system/types";
10
11
  import type { TextProps } from "./Text";
11
12
  export interface FieldErrorMessageProps extends Omit<Field.ErrorTextProps, "color">, TextProps, StyledProps {
@@ -1,8 +1,9 @@
1
- let _ark_ui_react = require("@ark-ui/react");
2
1
  let _ndla_styled_system_css = require("@ndla/styled-system/css");
3
2
  let _ndla_styled_system_jsx = require("@ndla/styled-system/jsx");
4
3
  let react_jsx_runtime = require("react/jsx-runtime");
5
4
  let react = require("react");
5
+ let _ark_ui_react_field = require("@ark-ui/react/field");
6
+ let _ark_ui_react_fieldset = require("@ark-ui/react/fieldset");
6
7
  //#region src/FieldErrorMessage.tsx
7
8
  /**
8
9
  * Copyright (c) 2024-present, NDLA.
@@ -16,7 +17,7 @@ const errorTextStyling = {
16
17
  whiteSpace: "pre-line",
17
18
  justifyContent: "center"
18
19
  };
19
- const StyledFieldErrorText = (0, _ndla_styled_system_jsx.styled)(_ark_ui_react.Field.ErrorText, { base: errorTextStyling }, { baseComponent: true });
20
+ const StyledFieldErrorText = (0, _ndla_styled_system_jsx.styled)(_ark_ui_react_field.Field.ErrorText, { base: errorTextStyling }, { baseComponent: true });
20
21
  const FieldErrorMessage = (0, react.forwardRef)(({ textStyle = "label.small", fontWeight, css: cssProp, color, srOnly, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledFieldErrorText, {
21
22
  css: _ndla_styled_system_css.css.raw({
22
23
  textStyle,
@@ -27,7 +28,7 @@ const FieldErrorMessage = (0, react.forwardRef)(({ textStyle = "label.small", fo
27
28
  ...props,
28
29
  ref
29
30
  }));
30
- const StyledFieldsetErrorText = (0, _ndla_styled_system_jsx.styled)(_ark_ui_react.Fieldset.ErrorText, { base: errorTextStyling }, { baseComponent: true });
31
+ const StyledFieldsetErrorText = (0, _ndla_styled_system_jsx.styled)(_ark_ui_react_fieldset.Fieldset.ErrorText, { base: errorTextStyling }, { baseComponent: true });
31
32
  const FieldsetErrorText = (0, react.forwardRef)(({ textStyle = "label.small", fontWeight, css: cssProp, color, srOnly, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledFieldsetErrorText, {
32
33
  css: _ndla_styled_system_css.css.raw({
33
34
  textStyle,
@@ -1 +1 @@
1
- {"version":3,"file":"FieldErrorMessage.js","names":["Field","css","Fieldset"],"sources":["../src/FieldErrorMessage.tsx"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { Field, Fieldset } from \"@ark-ui/react\";\nimport { css } from \"@ndla/styled-system/css\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { StyledProps, SystemStyleObject } from \"@ndla/styled-system/types\";\nimport { forwardRef } from \"react\";\nimport type { TextProps } from \"./Text\";\n\nconst errorTextStyling: SystemStyleObject = {\n color: \"text.error\",\n whiteSpace: \"pre-line\",\n justifyContent: \"center\",\n};\n\nconst StyledFieldErrorText = styled(\n Field.ErrorText,\n {\n base: errorTextStyling,\n },\n { baseComponent: true },\n);\n\nexport interface FieldErrorMessageProps extends Omit<Field.ErrorTextProps, \"color\">, TextProps, StyledProps {}\n\nexport const FieldErrorMessage = forwardRef<HTMLSpanElement, FieldErrorMessageProps>(\n ({ textStyle = \"label.small\", fontWeight, css: cssProp, color, srOnly, ...props }, ref) => (\n <StyledFieldErrorText css={css.raw({ textStyle, fontWeight, color, srOnly }, cssProp)} {...props} ref={ref} />\n ),\n);\n\nconst StyledFieldsetErrorText = styled(\n Fieldset.ErrorText,\n {\n base: errorTextStyling,\n },\n { baseComponent: true },\n);\n\nexport interface FieldsetErrorTextProps extends Omit<Fieldset.ErrorTextProps, \"color\">, TextProps, StyledProps {}\n\nexport const FieldsetErrorText = forwardRef<HTMLSpanElement, FieldsetErrorTextProps>(\n ({ textStyle = \"label.small\", fontWeight, css: cssProp, color, srOnly, ...props }, ref) => (\n <StyledFieldsetErrorText css={css.raw({ textStyle, fontWeight, color, srOnly }, cssProp)} {...props} ref={ref} />\n ),\n);\n"],"mappings":";;;;;;;;;;;;;AAeA,MAAM,mBAAsC;CAC1C,OAAO;CACP,YAAY;CACZ,gBAAgB;CACjB;AAED,MAAM,wBAAA,GAAA,wBAAA,QACJA,cAAAA,MAAM,WACN,EACE,MAAM,kBACP,EACD,EAAE,eAAe,MAAM,CACxB;AAID,MAAa,qBAAA,GAAA,MAAA,aACV,EAAE,YAAY,eAAe,YAAY,KAAK,SAAS,OAAO,QAAQ,GAAG,SAAS,QACjF,iBAAA,GAAA,kBAAA,KAAC,sBAAD;CAAsB,KAAKC,wBAAAA,IAAI,IAAI;EAAE;EAAW;EAAY;EAAO;EAAQ,EAAE,QAAQ;CAAE,GAAI;CAAY;CAAO,CAAA,CAEjH;AAED,MAAM,2BAAA,GAAA,wBAAA,QACJC,cAAAA,SAAS,WACT,EACE,MAAM,kBACP,EACD,EAAE,eAAe,MAAM,CACxB;AAID,MAAa,qBAAA,GAAA,MAAA,aACV,EAAE,YAAY,eAAe,YAAY,KAAK,SAAS,OAAO,QAAQ,GAAG,SAAS,QACjF,iBAAA,GAAA,kBAAA,KAAC,yBAAD;CAAyB,KAAKD,wBAAAA,IAAI,IAAI;EAAE;EAAW;EAAY;EAAO;EAAQ,EAAE,QAAQ;CAAE,GAAI;CAAY;CAAO,CAAA,CAEpH"}
1
+ {"version":3,"file":"FieldErrorMessage.js","names":["Field","css","Fieldset"],"sources":["../src/FieldErrorMessage.tsx"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { Field } from \"@ark-ui/react/field\";\nimport { Fieldset } from \"@ark-ui/react/fieldset\";\nimport { css } from \"@ndla/styled-system/css\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { StyledProps, SystemStyleObject } from \"@ndla/styled-system/types\";\nimport { forwardRef } from \"react\";\nimport type { TextProps } from \"./Text\";\n\nconst errorTextStyling: SystemStyleObject = {\n color: \"text.error\",\n whiteSpace: \"pre-line\",\n justifyContent: \"center\",\n};\n\nconst StyledFieldErrorText = styled(\n Field.ErrorText,\n {\n base: errorTextStyling,\n },\n { baseComponent: true },\n);\n\nexport interface FieldErrorMessageProps extends Omit<Field.ErrorTextProps, \"color\">, TextProps, StyledProps {}\n\nexport const FieldErrorMessage = forwardRef<HTMLSpanElement, FieldErrorMessageProps>(\n ({ textStyle = \"label.small\", fontWeight, css: cssProp, color, srOnly, ...props }, ref) => (\n <StyledFieldErrorText css={css.raw({ textStyle, fontWeight, color, srOnly }, cssProp)} {...props} ref={ref} />\n ),\n);\n\nconst StyledFieldsetErrorText = styled(\n Fieldset.ErrorText,\n {\n base: errorTextStyling,\n },\n { baseComponent: true },\n);\n\nexport interface FieldsetErrorTextProps extends Omit<Fieldset.ErrorTextProps, \"color\">, TextProps, StyledProps {}\n\nexport const FieldsetErrorText = forwardRef<HTMLSpanElement, FieldsetErrorTextProps>(\n ({ textStyle = \"label.small\", fontWeight, css: cssProp, color, srOnly, ...props }, ref) => (\n <StyledFieldsetErrorText css={css.raw({ textStyle, fontWeight, color, srOnly }, cssProp)} {...props} ref={ref} />\n ),\n);\n"],"mappings":";;;;;;;;;;;;;;AAgBA,MAAM,mBAAsC;CAC1C,OAAO;CACP,YAAY;CACZ,gBAAgB;AAClB;AAEA,MAAM,wBAAA,GAAA,wBAAA,QACJA,oBAAAA,MAAM,WACN,EACE,MAAM,iBACR,GACA,EAAE,eAAe,KAAK,CACxB;AAIA,MAAa,qBAAA,GAAA,MAAA,aACV,EAAE,YAAY,eAAe,YAAY,KAAK,SAAS,OAAO,QAAQ,GAAG,SAAS,QACjF,iBAAA,GAAA,kBAAA,KAAC,sBAAD;CAAsB,KAAKC,wBAAAA,IAAI,IAAI;EAAE;EAAW;EAAY;EAAO;CAAO,GAAG,OAAO;CAAG,GAAI;CAAY;AAAM,CAAA,CAEjH;AAEA,MAAM,2BAAA,GAAA,wBAAA,QACJC,uBAAAA,SAAS,WACT,EACE,MAAM,iBACR,GACA,EAAE,eAAe,KAAK,CACxB;AAIA,MAAa,qBAAA,GAAA,MAAA,aACV,EAAE,YAAY,eAAe,YAAY,KAAK,SAAS,OAAO,QAAQ,GAAG,SAAS,QACjF,iBAAA,GAAA,kBAAA,KAAC,yBAAD;CAAyB,KAAKD,wBAAAA,IAAI,IAAI;EAAE;EAAW;EAAY;EAAO;CAAO,GAAG,OAAO;CAAG,GAAI;CAAY;AAAM,CAAA,CAEpH"}
@@ -5,7 +5,8 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  */
8
- import { Field, Fieldset } from "@ark-ui/react";
8
+ import { Field } from "@ark-ui/react/field";
9
+ import { Fieldset } from "@ark-ui/react/fieldset";
9
10
  import type { StyledProps } from "@ndla/styled-system/types";
10
11
  import type { TextProps } from "./Text";
11
12
  export interface FieldHelperProps extends Omit<Field.HelperTextProps, "color">, TextProps, StyledProps {
@@ -1,8 +1,9 @@
1
- let _ark_ui_react = require("@ark-ui/react");
2
1
  let _ndla_styled_system_css = require("@ndla/styled-system/css");
3
2
  let _ndla_styled_system_jsx = require("@ndla/styled-system/jsx");
4
3
  let react_jsx_runtime = require("react/jsx-runtime");
5
4
  let react = require("react");
5
+ let _ark_ui_react_field = require("@ark-ui/react/field");
6
+ let _ark_ui_react_fieldset = require("@ark-ui/react/fieldset");
6
7
  //#region src/FieldHelper.tsx
7
8
  /**
8
9
  * Copyright (c) 2025-present, NDLA.
@@ -11,7 +12,7 @@ let react = require("react");
11
12
  * LICENSE file in the root directory of this source tree.
12
13
  *
13
14
  */
14
- const StyledFieldHelper = (0, _ndla_styled_system_jsx.styled)(_ark_ui_react.Field.HelperText, {}, { baseComponent: true });
15
+ const StyledFieldHelper = (0, _ndla_styled_system_jsx.styled)(_ark_ui_react_field.Field.HelperText, {}, { baseComponent: true });
15
16
  const FieldHelper = (0, react.forwardRef)(({ textStyle = "label.small", fontWeight, color, srOnly, css: cssProp, ...props }, ref) => {
16
17
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledFieldHelper, {
17
18
  css: _ndla_styled_system_css.css.raw({
@@ -24,7 +25,7 @@ const FieldHelper = (0, react.forwardRef)(({ textStyle = "label.small", fontWeig
24
25
  ref
25
26
  });
26
27
  });
27
- const StyledFieldsetHelper = (0, _ndla_styled_system_jsx.styled)(_ark_ui_react.Fieldset.HelperText, {}, { baseComponent: true });
28
+ const StyledFieldsetHelper = (0, _ndla_styled_system_jsx.styled)(_ark_ui_react_fieldset.Fieldset.HelperText, {}, { baseComponent: true });
28
29
  const FieldsetHelper = (0, react.forwardRef)(({ textStyle = "label.small", fontWeight, color, srOnly, css: cssProp, ...props }, ref) => {
29
30
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledFieldsetHelper, {
30
31
  css: _ndla_styled_system_css.css.raw({
@@ -1 +1 @@
1
- {"version":3,"file":"FieldHelper.js","names":["Field","css","Fieldset"],"sources":["../src/FieldHelper.tsx"],"sourcesContent":["/**\n * Copyright (c) 2025-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { Field, Fieldset } from \"@ark-ui/react\";\nimport { css } from \"@ndla/styled-system/css\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { StyledProps } from \"@ndla/styled-system/types\";\nimport { forwardRef } from \"react\";\nimport type { TextProps } from \"./Text\";\n\nconst StyledFieldHelper = styled(Field.HelperText, {}, { baseComponent: true });\n\nexport interface FieldHelperProps extends Omit<Field.HelperTextProps, \"color\">, TextProps, StyledProps {}\n\nexport const FieldHelper = forwardRef<HTMLSpanElement, FieldHelperProps>(\n ({ textStyle = \"label.small\", fontWeight, color, srOnly, css: cssProp, ...props }, ref) => {\n return <StyledFieldHelper css={css.raw({ textStyle, fontWeight, color, srOnly }, cssProp)} {...props} ref={ref} />;\n },\n);\n\nconst StyledFieldsetHelper = styled(Fieldset.HelperText, {}, { baseComponent: true });\n\nexport interface FieldsetHelperProps extends Omit<Fieldset.HelperTextProps, \"color\">, TextProps, StyledProps {}\n\nexport const FieldsetHelper = forwardRef<HTMLSpanElement, FieldsetHelperProps>(\n ({ textStyle = \"label.small\", fontWeight, color, srOnly, css: cssProp, ...props }, ref) => {\n return (\n <StyledFieldsetHelper css={css.raw({ textStyle, fontWeight, color, srOnly }, cssProp)} {...props} ref={ref} />\n );\n },\n);\n"],"mappings":";;;;;;;;;;;;;AAeA,MAAM,qBAAA,GAAA,wBAAA,QAA2BA,cAAAA,MAAM,YAAY,EAAE,EAAE,EAAE,eAAe,MAAM,CAAC;AAI/E,MAAa,eAAA,GAAA,MAAA,aACV,EAAE,YAAY,eAAe,YAAY,OAAO,QAAQ,KAAK,SAAS,GAAG,SAAS,QAAQ;AACzF,QAAO,iBAAA,GAAA,kBAAA,KAAC,mBAAD;EAAmB,KAAKC,wBAAAA,IAAI,IAAI;GAAE;GAAW;GAAY;GAAO;GAAQ,EAAE,QAAQ;EAAE,GAAI;EAAY;EAAO,CAAA;EAErH;AAED,MAAM,wBAAA,GAAA,wBAAA,QAA8BC,cAAAA,SAAS,YAAY,EAAE,EAAE,EAAE,eAAe,MAAM,CAAC;AAIrF,MAAa,kBAAA,GAAA,MAAA,aACV,EAAE,YAAY,eAAe,YAAY,OAAO,QAAQ,KAAK,SAAS,GAAG,SAAS,QAAQ;AACzF,QACE,iBAAA,GAAA,kBAAA,KAAC,sBAAD;EAAsB,KAAKD,wBAAAA,IAAI,IAAI;GAAE;GAAW;GAAY;GAAO;GAAQ,EAAE,QAAQ;EAAE,GAAI;EAAY;EAAO,CAAA;EAGnH"}
1
+ {"version":3,"file":"FieldHelper.js","names":["Field","css","Fieldset"],"sources":["../src/FieldHelper.tsx"],"sourcesContent":["/**\n * Copyright (c) 2025-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { Field } from \"@ark-ui/react/field\";\nimport { Fieldset } from \"@ark-ui/react/fieldset\";\nimport { css } from \"@ndla/styled-system/css\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { StyledProps } from \"@ndla/styled-system/types\";\nimport { forwardRef } from \"react\";\nimport type { TextProps } from \"./Text\";\n\nconst StyledFieldHelper = styled(Field.HelperText, {}, { baseComponent: true });\n\nexport interface FieldHelperProps extends Omit<Field.HelperTextProps, \"color\">, TextProps, StyledProps {}\n\nexport const FieldHelper = forwardRef<HTMLSpanElement, FieldHelperProps>(\n ({ textStyle = \"label.small\", fontWeight, color, srOnly, css: cssProp, ...props }, ref) => {\n return <StyledFieldHelper css={css.raw({ textStyle, fontWeight, color, srOnly }, cssProp)} {...props} ref={ref} />;\n },\n);\n\nconst StyledFieldsetHelper = styled(Fieldset.HelperText, {}, { baseComponent: true });\n\nexport interface FieldsetHelperProps extends Omit<Fieldset.HelperTextProps, \"color\">, TextProps, StyledProps {}\n\nexport const FieldsetHelper = forwardRef<HTMLSpanElement, FieldsetHelperProps>(\n ({ textStyle = \"label.small\", fontWeight, color, srOnly, css: cssProp, ...props }, ref) => {\n return (\n <StyledFieldsetHelper css={css.raw({ textStyle, fontWeight, color, srOnly }, cssProp)} {...props} ref={ref} />\n );\n },\n);\n"],"mappings":";;;;;;;;;;;;;;AAgBA,MAAM,qBAAA,GAAA,wBAAA,QAA2BA,oBAAAA,MAAM,YAAY,CAAC,GAAG,EAAE,eAAe,KAAK,CAAC;AAI9E,MAAa,eAAA,GAAA,MAAA,aACV,EAAE,YAAY,eAAe,YAAY,OAAO,QAAQ,KAAK,SAAS,GAAG,SAAS,QAAQ;CACzF,OAAO,iBAAA,GAAA,kBAAA,KAAC,mBAAD;EAAmB,KAAKC,wBAAAA,IAAI,IAAI;GAAE;GAAW;GAAY;GAAO;EAAO,GAAG,OAAO;EAAG,GAAI;EAAY;CAAM,CAAA;AACnH,CACF;AAEA,MAAM,wBAAA,GAAA,wBAAA,QAA8BC,uBAAAA,SAAS,YAAY,CAAC,GAAG,EAAE,eAAe,KAAK,CAAC;AAIpF,MAAa,kBAAA,GAAA,MAAA,aACV,EAAE,YAAY,eAAe,YAAY,OAAO,QAAQ,KAAK,SAAS,GAAG,SAAS,QAAQ;CACzF,OACE,iBAAA,GAAA,kBAAA,KAAC,sBAAD;EAAsB,KAAKD,wBAAAA,IAAI,IAAI;GAAE;GAAW;GAAY;GAAO;EAAO,GAAG,OAAO;EAAG,GAAI;EAAY;CAAM,CAAA;AAEjH,CACF"}
package/lib/Figure.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  */
8
- import { type HTMLArkProps } from "@ark-ui/react";
8
+ import { type HTMLArkProps } from "@ark-ui/react/factory";
9
9
  import { type RecipeVariantProps } from "@ndla/styled-system/css";
10
10
  import type { RecipeVariant, StyledProps } from "@ndla/styled-system/types";
11
11
  declare const figureRecipe: import("@ndla/styled-system/types").RecipeRuntimeFn<{
package/lib/Figure.js CHANGED
@@ -1,7 +1,7 @@
1
- let _ark_ui_react = require("@ark-ui/react");
2
1
  let _ndla_styled_system_css = require("@ndla/styled-system/css");
3
2
  let _ndla_styled_system_jsx = require("@ndla/styled-system/jsx");
4
3
  let react_jsx_runtime = require("react/jsx-runtime");
4
+ let _ark_ui_react_factory = require("@ark-ui/react/factory");
5
5
  let react = require("react");
6
6
  //#region src/Figure.tsx
7
7
  /**
@@ -111,7 +111,7 @@ const figureRecipe = (0, _ndla_styled_system_css.cva)({
111
111
  }
112
112
  ]
113
113
  });
114
- const StyledFigure = (0, _ndla_styled_system_jsx.styled)(_ark_ui_react.ark.figure, {}, { baseComponent: true });
114
+ const StyledFigure = (0, _ndla_styled_system_jsx.styled)(_ark_ui_react_factory.ark.figure, {}, { baseComponent: true });
115
115
  const Figure = (0, react.forwardRef)(({ size, float, css: cssProp, ...props }, ref) => {
116
116
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledFigure, {
117
117
  css: _ndla_styled_system_css.css.raw(figureRecipe.raw({
package/lib/Figure.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Figure.js","names":["ark","css"],"sources":["../src/Figure.tsx"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { type HTMLArkProps, ark } from \"@ark-ui/react\";\nimport { type RecipeVariantProps, css, cva } from \"@ndla/styled-system/css\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { RecipeVariant, StyledProps } from \"@ndla/styled-system/types\";\nimport { forwardRef } from \"react\";\n\nconst figureRecipe = cva({\n base: {\n position: \"relative\",\n transitionDuration: \"normal\",\n transitionProperty: \"transform, width, height\",\n transitionTimingFunction: \"default\",\n _motionReduce: {\n transition: \"none\",\n transitionDuration: \"0s\",\n },\n },\n variants: {\n size: {\n full: {\n width: \"100%\",\n _print: {\n width: \"60%\",\n },\n },\n medium: {\n tablet: {\n width: \"50%\",\n },\n desktop: {\n width: \"65%\",\n },\n _print: {\n width: \"65%\",\n },\n },\n small: {\n tablet: {\n width: \"35%\",\n },\n desktop: {\n width: \"50%\",\n },\n _print: {\n width: \"50%\",\n },\n },\n xsmall: {\n tablet: {\n width: \"25%\",\n },\n desktop: {\n width: \"35%\",\n },\n _print: {\n width: \"35%\",\n },\n },\n },\n float: {\n left: {\n tablet: {\n float: \"left\",\n clear: \"left\",\n },\n _print: {\n float: \"left\",\n clear: \"left\",\n },\n },\n right: {\n tablet: {\n float: \"right\",\n clear: \"right\",\n },\n _print: {\n float: \"right\",\n clear: \"right\",\n },\n },\n },\n },\n defaultVariants: {\n size: \"full\",\n },\n compoundVariants: [\n {\n float: [\"left\", \"right\"],\n css: {\n zIndex: \"base\",\n left: \"auto\",\n marginBlock: \"xsmall\",\n },\n },\n {\n float: \"left\",\n size: [\"medium\", \"small\", \"xsmall\"],\n css: {\n marginInlineEnd: \"medium\",\n tabletDown: { marginInlineEnd: \"0\" },\n },\n },\n {\n float: \"right\",\n size: [\"medium\", \"small\", \"xsmall\"],\n css: {\n marginInlineStart: \"medium\",\n tabletDown: { marginInlineStart: \"0\" },\n },\n },\n {\n float: [\"left\", \"right\"],\n size: [\"full\"],\n css: {\n marginInlineStart: \"0\",\n marginInlineEnd: \"0\",\n },\n },\n ],\n});\n\nexport type FigureVariantProps = NonNullable<RecipeVariantProps<typeof figureRecipe>>;\n\nexport type FigureSize = RecipeVariant<typeof figureRecipe>[\"size\"];\n\nexport type FigureFloat = RecipeVariant<typeof figureRecipe>[\"float\"];\n\nexport interface FigureProps extends HTMLArkProps<\"figure\">, StyledProps, FigureVariantProps {}\n\nconst StyledFigure = styled(ark.figure, {}, { baseComponent: true });\n\nexport const Figure = forwardRef<HTMLElement, FigureProps>(({ size, float, css: cssProp, ...props }, ref) => {\n return <StyledFigure css={css.raw(figureRecipe.raw({ size, float }), cssProp)} {...props} ref={ref} />;\n});\n"],"mappings":";;;;;;;;;;;;;AAcA,MAAM,gBAAA,GAAA,wBAAA,KAAmB;CACvB,MAAM;EACJ,UAAU;EACV,oBAAoB;EACpB,oBAAoB;EACpB,0BAA0B;EAC1B,eAAe;GACb,YAAY;GACZ,oBAAoB;GACrB;EACF;CACD,UAAU;EACR,MAAM;GACJ,MAAM;IACJ,OAAO;IACP,QAAQ,EACN,OAAO,OACR;IACF;GACD,QAAQ;IACN,QAAQ,EACN,OAAO,OACR;IACD,SAAS,EACP,OAAO,OACR;IACD,QAAQ,EACN,OAAO,OACR;IACF;GACD,OAAO;IACL,QAAQ,EACN,OAAO,OACR;IACD,SAAS,EACP,OAAO,OACR;IACD,QAAQ,EACN,OAAO,OACR;IACF;GACD,QAAQ;IACN,QAAQ,EACN,OAAO,OACR;IACD,SAAS,EACP,OAAO,OACR;IACD,QAAQ,EACN,OAAO,OACR;IACF;GACF;EACD,OAAO;GACL,MAAM;IACJ,QAAQ;KACN,OAAO;KACP,OAAO;KACR;IACD,QAAQ;KACN,OAAO;KACP,OAAO;KACR;IACF;GACD,OAAO;IACL,QAAQ;KACN,OAAO;KACP,OAAO;KACR;IACD,QAAQ;KACN,OAAO;KACP,OAAO;KACR;IACF;GACF;EACF;CACD,iBAAiB,EACf,MAAM,QACP;CACD,kBAAkB;EAChB;GACE,OAAO,CAAC,QAAQ,QAAQ;GACxB,KAAK;IACH,QAAQ;IACR,MAAM;IACN,aAAa;IACd;GACF;EACD;GACE,OAAO;GACP,MAAM;IAAC;IAAU;IAAS;IAAS;GACnC,KAAK;IACH,iBAAiB;IACjB,YAAY,EAAE,iBAAiB,KAAK;IACrC;GACF;EACD;GACE,OAAO;GACP,MAAM;IAAC;IAAU;IAAS;IAAS;GACnC,KAAK;IACH,mBAAmB;IACnB,YAAY,EAAE,mBAAmB,KAAK;IACvC;GACF;EACD;GACE,OAAO,CAAC,QAAQ,QAAQ;GACxB,MAAM,CAAC,OAAO;GACd,KAAK;IACH,mBAAmB;IACnB,iBAAiB;IAClB;GACF;EACF;CACF,CAAC;AAUF,MAAM,gBAAA,GAAA,wBAAA,QAAsBA,cAAAA,IAAI,QAAQ,EAAE,EAAE,EAAE,eAAe,MAAM,CAAC;AAEpE,MAAa,UAAA,GAAA,MAAA,aAA+C,EAAE,MAAM,OAAO,KAAK,SAAS,GAAG,SAAS,QAAQ;AAC3G,QAAO,iBAAA,GAAA,kBAAA,KAAC,cAAD;EAAc,KAAKC,wBAAAA,IAAI,IAAI,aAAa,IAAI;GAAE;GAAM;GAAO,CAAC,EAAE,QAAQ;EAAE,GAAI;EAAY;EAAO,CAAA;EACtG"}
1
+ {"version":3,"file":"Figure.js","names":["ark","css"],"sources":["../src/Figure.tsx"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { type HTMLArkProps, ark } from \"@ark-ui/react/factory\";\nimport { type RecipeVariantProps, css, cva } from \"@ndla/styled-system/css\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { RecipeVariant, StyledProps } from \"@ndla/styled-system/types\";\nimport { forwardRef } from \"react\";\n\nconst figureRecipe = cva({\n base: {\n position: \"relative\",\n transitionDuration: \"normal\",\n transitionProperty: \"transform, width, height\",\n transitionTimingFunction: \"default\",\n _motionReduce: {\n transition: \"none\",\n transitionDuration: \"0s\",\n },\n },\n variants: {\n size: {\n full: {\n width: \"100%\",\n _print: {\n width: \"60%\",\n },\n },\n medium: {\n tablet: {\n width: \"50%\",\n },\n desktop: {\n width: \"65%\",\n },\n _print: {\n width: \"65%\",\n },\n },\n small: {\n tablet: {\n width: \"35%\",\n },\n desktop: {\n width: \"50%\",\n },\n _print: {\n width: \"50%\",\n },\n },\n xsmall: {\n tablet: {\n width: \"25%\",\n },\n desktop: {\n width: \"35%\",\n },\n _print: {\n width: \"35%\",\n },\n },\n },\n float: {\n left: {\n tablet: {\n float: \"left\",\n clear: \"left\",\n },\n _print: {\n float: \"left\",\n clear: \"left\",\n },\n },\n right: {\n tablet: {\n float: \"right\",\n clear: \"right\",\n },\n _print: {\n float: \"right\",\n clear: \"right\",\n },\n },\n },\n },\n defaultVariants: {\n size: \"full\",\n },\n compoundVariants: [\n {\n float: [\"left\", \"right\"],\n css: {\n zIndex: \"base\",\n left: \"auto\",\n marginBlock: \"xsmall\",\n },\n },\n {\n float: \"left\",\n size: [\"medium\", \"small\", \"xsmall\"],\n css: {\n marginInlineEnd: \"medium\",\n tabletDown: { marginInlineEnd: \"0\" },\n },\n },\n {\n float: \"right\",\n size: [\"medium\", \"small\", \"xsmall\"],\n css: {\n marginInlineStart: \"medium\",\n tabletDown: { marginInlineStart: \"0\" },\n },\n },\n {\n float: [\"left\", \"right\"],\n size: [\"full\"],\n css: {\n marginInlineStart: \"0\",\n marginInlineEnd: \"0\",\n },\n },\n ],\n});\n\nexport type FigureVariantProps = NonNullable<RecipeVariantProps<typeof figureRecipe>>;\n\nexport type FigureSize = RecipeVariant<typeof figureRecipe>[\"size\"];\n\nexport type FigureFloat = RecipeVariant<typeof figureRecipe>[\"float\"];\n\nexport interface FigureProps extends HTMLArkProps<\"figure\">, StyledProps, FigureVariantProps {}\n\nconst StyledFigure = styled(ark.figure, {}, { baseComponent: true });\n\nexport const Figure = forwardRef<HTMLElement, FigureProps>(({ size, float, css: cssProp, ...props }, ref) => {\n return <StyledFigure css={css.raw(figureRecipe.raw({ size, float }), cssProp)} {...props} ref={ref} />;\n});\n"],"mappings":";;;;;;;;;;;;;AAcA,MAAM,gBAAA,GAAA,wBAAA,KAAmB;CACvB,MAAM;EACJ,UAAU;EACV,oBAAoB;EACpB,oBAAoB;EACpB,0BAA0B;EAC1B,eAAe;GACb,YAAY;GACZ,oBAAoB;EACtB;CACF;CACA,UAAU;EACR,MAAM;GACJ,MAAM;IACJ,OAAO;IACP,QAAQ,EACN,OAAO,MACT;GACF;GACA,QAAQ;IACN,QAAQ,EACN,OAAO,MACT;IACA,SAAS,EACP,OAAO,MACT;IACA,QAAQ,EACN,OAAO,MACT;GACF;GACA,OAAO;IACL,QAAQ,EACN,OAAO,MACT;IACA,SAAS,EACP,OAAO,MACT;IACA,QAAQ,EACN,OAAO,MACT;GACF;GACA,QAAQ;IACN,QAAQ,EACN,OAAO,MACT;IACA,SAAS,EACP,OAAO,MACT;IACA,QAAQ,EACN,OAAO,MACT;GACF;EACF;EACA,OAAO;GACL,MAAM;IACJ,QAAQ;KACN,OAAO;KACP,OAAO;IACT;IACA,QAAQ;KACN,OAAO;KACP,OAAO;IACT;GACF;GACA,OAAO;IACL,QAAQ;KACN,OAAO;KACP,OAAO;IACT;IACA,QAAQ;KACN,OAAO;KACP,OAAO;IACT;GACF;EACF;CACF;CACA,iBAAiB,EACf,MAAM,OACR;CACA,kBAAkB;EAChB;GACE,OAAO,CAAC,QAAQ,OAAO;GACvB,KAAK;IACH,QAAQ;IACR,MAAM;IACN,aAAa;GACf;EACF;EACA;GACE,OAAO;GACP,MAAM;IAAC;IAAU;IAAS;GAAQ;GAClC,KAAK;IACH,iBAAiB;IACjB,YAAY,EAAE,iBAAiB,IAAI;GACrC;EACF;EACA;GACE,OAAO;GACP,MAAM;IAAC;IAAU;IAAS;GAAQ;GAClC,KAAK;IACH,mBAAmB;IACnB,YAAY,EAAE,mBAAmB,IAAI;GACvC;EACF;EACA;GACE,OAAO,CAAC,QAAQ,OAAO;GACvB,MAAM,CAAC,MAAM;GACb,KAAK;IACH,mBAAmB;IACnB,iBAAiB;GACnB;EACF;CACF;AACF,CAAC;AAUD,MAAM,gBAAA,GAAA,wBAAA,QAAsBA,sBAAAA,IAAI,QAAQ,CAAC,GAAG,EAAE,eAAe,KAAK,CAAC;AAEnE,MAAa,UAAA,GAAA,MAAA,aAA+C,EAAE,MAAM,OAAO,KAAK,SAAS,GAAG,SAAS,QAAQ;CAC3G,OAAO,iBAAA,GAAA,kBAAA,KAAC,cAAD;EAAc,KAAKC,wBAAAA,IAAI,IAAI,aAAa,IAAI;GAAE;GAAM;EAAM,CAAC,GAAG,OAAO;EAAG,GAAI;EAAY;CAAM,CAAA;AACvG,CAAC"}
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  */
8
- import { FileUpload } from "@ark-ui/react";
8
+ import { FileUpload } from "@ark-ui/react/file-upload";
9
9
  import { type RecipeVariantProps } from "@ndla/styled-system/css";
10
10
  import type { StyledProps } from "@ndla/styled-system/types";
11
11
  import { type RefAttributes } from "react";
package/lib/FileUpload.js CHANGED
@@ -1,10 +1,10 @@
1
1
  const require_Text = require("./Text.js");
2
2
  const require_Label = require("./Label.js");
3
- let _ark_ui_react = require("@ark-ui/react");
4
3
  let _ndla_styled_system_css = require("@ndla/styled-system/css");
5
4
  let _ndla_styled_system_jsx = require("@ndla/styled-system/jsx");
6
5
  let react_jsx_runtime = require("react/jsx-runtime");
7
6
  let react = require("react");
7
+ let _ark_ui_react_file_upload = require("@ark-ui/react/file-upload");
8
8
  //#region src/FileUpload.tsx
9
9
  /**
10
10
  * Copyright (c) 2024-present, NDLA.
@@ -14,7 +14,7 @@ let react = require("react");
14
14
  *
15
15
  */
16
16
  const { withProvider, withContext } = (0, _ndla_styled_system_jsx.createStyleContext)((0, _ndla_styled_system_css.sva)({
17
- slots: _ark_ui_react.fileUploadAnatomy.keys(),
17
+ slots: _ark_ui_react_file_upload.fileUploadAnatomy.keys(),
18
18
  base: {
19
19
  root: {
20
20
  display: "flex",
@@ -89,17 +89,17 @@ const { withProvider, withContext } = (0, _ndla_styled_system_jsx.createStyleCon
89
89
  }
90
90
  }
91
91
  }));
92
- const FileUploadHiddenInput = _ark_ui_react.FileUpload.HiddenInput;
93
- const FileUploadContext = _ark_ui_react.FileUpload.Context;
94
- const FileUploadRoot = withProvider(_ark_ui_react.FileUpload.Root, "root", { baseComponent: true });
95
- const FileUploadDropzone = withContext(_ark_ui_react.FileUpload.Dropzone, "dropzone", { baseComponent: true });
96
- const FileUploadTrigger = withContext(_ark_ui_react.FileUpload.Trigger, "trigger", { baseComponent: true });
97
- const FileUploadItemGroup = withContext(_ark_ui_react.FileUpload.ItemGroup, "itemGroup", { baseComponent: true });
98
- const FileUploadItemPreview = withContext(_ark_ui_react.FileUpload.ItemPreview, "itemPreview", { baseComponent: true });
99
- const FileUploadItem = withContext(_ark_ui_react.FileUpload.Item, "item", { baseComponent: true });
100
- const FileUploadItemDeleteTrigger = withContext(_ark_ui_react.FileUpload.ItemDeleteTrigger, "itemDeleteTrigger", { baseComponent: true });
101
- const FileUploadItemPreviewImage = withContext(_ark_ui_react.FileUpload.ItemPreviewImage, "itemPreviewImage", { baseComponent: true });
102
- const InternalFileUploadItemName = withContext(_ark_ui_react.FileUpload.ItemName, "itemName", { baseComponent: true });
92
+ const FileUploadHiddenInput = _ark_ui_react_file_upload.FileUpload.HiddenInput;
93
+ const FileUploadContext = _ark_ui_react_file_upload.FileUpload.Context;
94
+ const FileUploadRoot = withProvider(_ark_ui_react_file_upload.FileUpload.Root, "root", { baseComponent: true });
95
+ const FileUploadDropzone = withContext(_ark_ui_react_file_upload.FileUpload.Dropzone, "dropzone", { baseComponent: true });
96
+ const FileUploadTrigger = withContext(_ark_ui_react_file_upload.FileUpload.Trigger, "trigger", { baseComponent: true });
97
+ const FileUploadItemGroup = withContext(_ark_ui_react_file_upload.FileUpload.ItemGroup, "itemGroup", { baseComponent: true });
98
+ const FileUploadItemPreview = withContext(_ark_ui_react_file_upload.FileUpload.ItemPreview, "itemPreview", { baseComponent: true });
99
+ const FileUploadItem = withContext(_ark_ui_react_file_upload.FileUpload.Item, "item", { baseComponent: true });
100
+ const FileUploadItemDeleteTrigger = withContext(_ark_ui_react_file_upload.FileUpload.ItemDeleteTrigger, "itemDeleteTrigger", { baseComponent: true });
101
+ const FileUploadItemPreviewImage = withContext(_ark_ui_react_file_upload.FileUpload.ItemPreviewImage, "itemPreviewImage", { baseComponent: true });
102
+ const InternalFileUploadItemName = withContext(_ark_ui_react_file_upload.FileUpload.ItemName, "itemName", { baseComponent: true });
103
103
  const FileUploadItemName = (0, react.forwardRef)(({ textStyle = "label.medium", fontWeight = "bold", ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Text.Text, {
104
104
  textStyle,
105
105
  fontWeight,
@@ -108,7 +108,7 @@ const FileUploadItemName = (0, react.forwardRef)(({ textStyle = "label.medium",
108
108
  ref,
109
109
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InternalFileUploadItemName, {})
110
110
  }));
111
- const InternalFileUploadItemSizeText = withContext(_ark_ui_react.FileUpload.ItemSizeText, "itemSizeText", { baseComponent: true });
111
+ const InternalFileUploadItemSizeText = withContext(_ark_ui_react_file_upload.FileUpload.ItemSizeText, "itemSizeText", { baseComponent: true });
112
112
  const FileUploadItemSizeText = (0, react.forwardRef)(({ textStyle = "label.small", ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Text.Text, {
113
113
  textStyle,
114
114
  ref,
@@ -116,7 +116,7 @@ const FileUploadItemSizeText = (0, react.forwardRef)(({ textStyle = "label.small
116
116
  ...props,
117
117
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InternalFileUploadItemSizeText, {})
118
118
  }));
119
- const InternalFileUploadLabel = withContext(_ark_ui_react.FileUpload.Label, "label");
119
+ const InternalFileUploadLabel = withContext(_ark_ui_react_file_upload.FileUpload.Label, "label");
120
120
  const FileUploadLabel = (0, react.forwardRef)(({ textStyle = "label.medium", fontWeight = "light", children, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InternalFileUploadLabel, {
121
121
  ref,
122
122
  asChild: true,
@@ -1 +1 @@
1
- {"version":3,"file":"FileUpload.js","names":["fileUploadAnatomy","FileUpload","Text","Label"],"sources":["../src/FileUpload.tsx"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { FileUpload, fileUploadAnatomy } from \"@ark-ui/react\";\nimport { type RecipeVariantProps, sva } from \"@ndla/styled-system/css\";\nimport { createStyleContext } from \"@ndla/styled-system/jsx\";\nimport type { StyledProps } from \"@ndla/styled-system/types\";\nimport { forwardRef, type RefAttributes } from \"react\";\nimport { Label } from \"./Label\";\nimport { type TextProps, Text } from \"./Text\";\n\nconst fileUploadRecipe = sva({\n slots: fileUploadAnatomy.keys(),\n base: {\n root: {\n display: \"flex\",\n flexDirection: \"column\",\n minHeight: \"100%\",\n },\n dropzone: {\n display: \"flex\",\n gap: \"small\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n padding: \"4xlarge\",\n borderRadius: \"xsmall\",\n border: \"1px solid\",\n borderColor: \"stroke.subtle\",\n transitionProperty: \"border, border-color\",\n transitionTimingFunction: \"default\",\n transitionDuration: \"normal\",\n _hover: {\n borderStyle: \"dashed\",\n borderColor: \"stroke.hover\",\n _disabled: {\n borderStyle: \"solid\",\n borderColor: \"stroke.subtle\",\n },\n },\n },\n itemGroup: {\n paddingBlockStart: \"medium\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"xsmall\",\n },\n item: {\n width: \"100%\",\n display: \"grid\",\n gridTemplateAreas: `\n \"preview name delete\" \n \"preview size delete\"`,\n gridTemplateColumns: \"auto 1fr auto\",\n gridColumnGap: \"small\",\n border: \"1px solid\",\n borderColor: \"stroke.subtle\",\n borderRadius: \"xsmall\",\n padding: \"xsmall\",\n },\n itemPreview: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n width: \"xxlarge\",\n height: \"xxlarge\",\n gridArea: \"preview\",\n },\n itemName: {\n gridArea: \"name\",\n whiteSpace: \"nowrap\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n },\n itemSizeText: {\n gridArea: \"size\",\n },\n itemDeleteTrigger: {\n gridArea: \"delete\",\n alignSelf: \"center\",\n },\n itemPreviewImage: {\n borderRadius: \"xsmall\",\n objectFit: \"cover\",\n width: \"100%\",\n height: \"100%\",\n },\n },\n});\n\nconst { withProvider, withContext } = createStyleContext(fileUploadRecipe);\n\nexport type FileUploadVariantProps = NonNullable<RecipeVariantProps<typeof fileUploadRecipe>>;\n\nexport interface FileUploadRootProps extends FileUpload.RootProps, FileUploadVariantProps {}\n\nexport const FileUploadHiddenInput = FileUpload.HiddenInput;\nexport const FileUploadContext = FileUpload.Context;\n\nexport const FileUploadRoot = withProvider(FileUpload.Root, \"root\", { baseComponent: true });\n\nexport const FileUploadDropzone = withContext(FileUpload.Dropzone, \"dropzone\", { baseComponent: true });\n\nexport const FileUploadTrigger = withContext(FileUpload.Trigger, \"trigger\", { baseComponent: true });\n\nexport const FileUploadItemGroup = withContext(FileUpload.ItemGroup, \"itemGroup\", { baseComponent: true });\n\nexport const FileUploadItemPreview = withContext(FileUpload.ItemPreview, \"itemPreview\", { baseComponent: true });\n\nexport const FileUploadItem = withContext(FileUpload.Item, \"item\", { baseComponent: true });\n\nexport const FileUploadItemDeleteTrigger = withContext(FileUpload.ItemDeleteTrigger, \"itemDeleteTrigger\", {\n baseComponent: true,\n});\n\nexport const FileUploadItemPreviewImage = withContext(FileUpload.ItemPreviewImage, \"itemPreviewImage\", {\n baseComponent: true,\n});\n\nconst InternalFileUploadItemName = withContext(FileUpload.ItemName, \"itemName\", { baseComponent: true });\n\ninterface FileUploadItemNameProps\n extends Omit<FileUpload.ItemNameProps, \"color\">, TextProps, StyledProps, RefAttributes<HTMLParagraphElement> {}\n\nexport const FileUploadItemName = forwardRef<HTMLDivElement, FileUploadItemNameProps>(\n ({ textStyle = \"label.medium\", fontWeight = \"bold\", ...props }, ref) => (\n <Text textStyle={textStyle} fontWeight={fontWeight} asChild {...props} ref={ref}>\n {/* Do not use children here whatsoever. The component falls back to the file name only if no children are passed in. It should be up to the consumer if they want to pass in children. */}\n <InternalFileUploadItemName />\n </Text>\n ),\n);\n\nconst InternalFileUploadItemSizeText = withContext(FileUpload.ItemSizeText, \"itemSizeText\", { baseComponent: true });\n\ninterface FileUploadItemSizeTextProps\n extends Omit<FileUpload.ItemSizeTextProps, \"color\">, TextProps, StyledProps, RefAttributes<HTMLParagraphElement> {}\n\nexport const FileUploadItemSizeText = forwardRef<HTMLDivElement, FileUploadItemSizeTextProps>(\n ({ textStyle = \"label.small\", ...props }, ref) => (\n <Text textStyle={textStyle} ref={ref} asChild {...props}>\n <InternalFileUploadItemSizeText />\n </Text>\n ),\n);\n\nconst InternalFileUploadLabel = withContext(FileUpload.Label, \"label\");\n\ninterface FileUploadLabelProps\n extends Omit<FileUpload.LabelProps, \"color\">, StyledProps, TextProps, RefAttributes<HTMLLabelElement> {}\n\nexport const FileUploadLabel = forwardRef<HTMLLabelElement, FileUploadLabelProps>(\n ({ textStyle = \"label.medium\", fontWeight = \"light\", children, ...props }, ref) => (\n <InternalFileUploadLabel ref={ref} asChild>\n <Label textStyle={textStyle} fontWeight={fontWeight} {...props}>\n {children}\n </Label>\n </InternalFileUploadLabel>\n ),\n);\n"],"mappings":"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"}
1
+ {"version":3,"file":"FileUpload.js","names":["fileUploadAnatomy","FileUpload","Text","Label"],"sources":["../src/FileUpload.tsx"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { FileUpload, fileUploadAnatomy } from \"@ark-ui/react/file-upload\";\nimport { type RecipeVariantProps, sva } from \"@ndla/styled-system/css\";\nimport { createStyleContext } from \"@ndla/styled-system/jsx\";\nimport type { StyledProps } from \"@ndla/styled-system/types\";\nimport { forwardRef, type RefAttributes } from \"react\";\nimport { Label } from \"./Label\";\nimport { type TextProps, Text } from \"./Text\";\n\nconst fileUploadRecipe = sva({\n slots: fileUploadAnatomy.keys(),\n base: {\n root: {\n display: \"flex\",\n flexDirection: \"column\",\n minHeight: \"100%\",\n },\n dropzone: {\n display: \"flex\",\n gap: \"small\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n padding: \"4xlarge\",\n borderRadius: \"xsmall\",\n border: \"1px solid\",\n borderColor: \"stroke.subtle\",\n transitionProperty: \"border, border-color\",\n transitionTimingFunction: \"default\",\n transitionDuration: \"normal\",\n _hover: {\n borderStyle: \"dashed\",\n borderColor: \"stroke.hover\",\n _disabled: {\n borderStyle: \"solid\",\n borderColor: \"stroke.subtle\",\n },\n },\n },\n itemGroup: {\n paddingBlockStart: \"medium\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"xsmall\",\n },\n item: {\n width: \"100%\",\n display: \"grid\",\n gridTemplateAreas: `\n \"preview name delete\" \n \"preview size delete\"`,\n gridTemplateColumns: \"auto 1fr auto\",\n gridColumnGap: \"small\",\n border: \"1px solid\",\n borderColor: \"stroke.subtle\",\n borderRadius: \"xsmall\",\n padding: \"xsmall\",\n },\n itemPreview: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n width: \"xxlarge\",\n height: \"xxlarge\",\n gridArea: \"preview\",\n },\n itemName: {\n gridArea: \"name\",\n whiteSpace: \"nowrap\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n },\n itemSizeText: {\n gridArea: \"size\",\n },\n itemDeleteTrigger: {\n gridArea: \"delete\",\n alignSelf: \"center\",\n },\n itemPreviewImage: {\n borderRadius: \"xsmall\",\n objectFit: \"cover\",\n width: \"100%\",\n height: \"100%\",\n },\n },\n});\n\nconst { withProvider, withContext } = createStyleContext(fileUploadRecipe);\n\nexport type FileUploadVariantProps = NonNullable<RecipeVariantProps<typeof fileUploadRecipe>>;\n\nexport interface FileUploadRootProps extends FileUpload.RootProps, FileUploadVariantProps {}\n\nexport const FileUploadHiddenInput = FileUpload.HiddenInput;\nexport const FileUploadContext = FileUpload.Context;\n\nexport const FileUploadRoot = withProvider(FileUpload.Root, \"root\", { baseComponent: true });\n\nexport const FileUploadDropzone = withContext(FileUpload.Dropzone, \"dropzone\", { baseComponent: true });\n\nexport const FileUploadTrigger = withContext(FileUpload.Trigger, \"trigger\", { baseComponent: true });\n\nexport const FileUploadItemGroup = withContext(FileUpload.ItemGroup, \"itemGroup\", { baseComponent: true });\n\nexport const FileUploadItemPreview = withContext(FileUpload.ItemPreview, \"itemPreview\", { baseComponent: true });\n\nexport const FileUploadItem = withContext(FileUpload.Item, \"item\", { baseComponent: true });\n\nexport const FileUploadItemDeleteTrigger = withContext(FileUpload.ItemDeleteTrigger, \"itemDeleteTrigger\", {\n baseComponent: true,\n});\n\nexport const FileUploadItemPreviewImage = withContext(FileUpload.ItemPreviewImage, \"itemPreviewImage\", {\n baseComponent: true,\n});\n\nconst InternalFileUploadItemName = withContext(FileUpload.ItemName, \"itemName\", { baseComponent: true });\n\ninterface FileUploadItemNameProps\n extends Omit<FileUpload.ItemNameProps, \"color\">, TextProps, StyledProps, RefAttributes<HTMLParagraphElement> {}\n\nexport const FileUploadItemName = forwardRef<HTMLDivElement, FileUploadItemNameProps>(\n ({ textStyle = \"label.medium\", fontWeight = \"bold\", ...props }, ref) => (\n <Text textStyle={textStyle} fontWeight={fontWeight} asChild {...props} ref={ref}>\n {/* Do not use children here whatsoever. The component falls back to the file name only if no children are passed in. It should be up to the consumer if they want to pass in children. */}\n <InternalFileUploadItemName />\n </Text>\n ),\n);\n\nconst InternalFileUploadItemSizeText = withContext(FileUpload.ItemSizeText, \"itemSizeText\", { baseComponent: true });\n\ninterface FileUploadItemSizeTextProps\n extends Omit<FileUpload.ItemSizeTextProps, \"color\">, TextProps, StyledProps, RefAttributes<HTMLParagraphElement> {}\n\nexport const FileUploadItemSizeText = forwardRef<HTMLDivElement, FileUploadItemSizeTextProps>(\n ({ textStyle = \"label.small\", ...props }, ref) => (\n <Text textStyle={textStyle} ref={ref} asChild {...props}>\n <InternalFileUploadItemSizeText />\n </Text>\n ),\n);\n\nconst InternalFileUploadLabel = withContext(FileUpload.Label, \"label\");\n\ninterface FileUploadLabelProps\n extends Omit<FileUpload.LabelProps, \"color\">, StyledProps, TextProps, RefAttributes<HTMLLabelElement> {}\n\nexport const FileUploadLabel = forwardRef<HTMLLabelElement, FileUploadLabelProps>(\n ({ textStyle = \"label.medium\", fontWeight = \"light\", children, ...props }, ref) => (\n <InternalFileUploadLabel ref={ref} asChild>\n <Label textStyle={textStyle} fontWeight={fontWeight} {...props}>\n {children}\n </Label>\n </InternalFileUploadLabel>\n ),\n);\n"],"mappings":"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"}
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  */
8
- import { type HTMLArkProps } from "@ark-ui/react";
8
+ import { type HTMLArkProps } from "@ark-ui/react/factory";
9
9
  import type { StyledProps, RecipeVariantProps } from "@ndla/styled-system/types";
10
10
  declare const framedContentRecipe: import("@ndla/styled-system/types").RecipeRuntimeFn<{
11
11
  colorTheme: {
@@ -1,7 +1,7 @@
1
- let _ark_ui_react = require("@ark-ui/react");
2
1
  let _ndla_styled_system_css = require("@ndla/styled-system/css");
3
2
  let _ndla_styled_system_jsx = require("@ndla/styled-system/jsx");
4
3
  let react_jsx_runtime = require("react/jsx-runtime");
4
+ let _ark_ui_react_factory = require("@ark-ui/react/factory");
5
5
  let react = require("react");
6
6
  //#region src/FramedContent.tsx
7
7
  /**
@@ -35,7 +35,7 @@ const framedContentRecipe = (0, _ndla_styled_system_css.cva)({
35
35
  } },
36
36
  defaultVariants: { colorTheme: "neutral" }
37
37
  });
38
- const StyledFramedContent = (0, _ndla_styled_system_jsx.styled)(_ark_ui_react.ark.div, {}, { baseComponent: true });
38
+ const StyledFramedContent = (0, _ndla_styled_system_jsx.styled)(_ark_ui_react_factory.ark.div, {}, { baseComponent: true });
39
39
  const FramedContent = (0, react.forwardRef)(({ colorTheme, css: cssProp, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledFramedContent, {
40
40
  "data-embed-type": "framed-content",
41
41
  css: _ndla_styled_system_css.css.raw(framedContentRecipe.raw({ colorTheme }), cssProp),
@@ -1 +1 @@
1
- {"version":3,"file":"FramedContent.js","names":["ark","css"],"sources":["../src/FramedContent.tsx"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { type HTMLArkProps, ark } from \"@ark-ui/react\";\nimport { css, cva } from \"@ndla/styled-system/css\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { StyledProps, RecipeVariantProps } from \"@ndla/styled-system/types\";\nimport { forwardRef } from \"react\";\n\nconst framedContentRecipe = cva({\n base: {\n padding: \"medium\",\n border: \"1px solid\",\n borderRadius: \"small\",\n clear: \"both\",\n overflow: \"hidden\",\n },\n variants: {\n colorTheme: {\n neutral: {\n backgroundColor: \"surface.default\",\n borderColor: \"stroke.subtle\",\n },\n brand1: {\n backgroundColor: \"surface.brand.1.subtle\",\n borderColor: \"surface.brand.1.strong\",\n },\n brand2: {\n backgroundColor: \"surface.brand.2.subtle\",\n borderColor: \"surface.brand.2.strong\",\n },\n },\n },\n defaultVariants: {\n colorTheme: \"neutral\",\n },\n});\n\nexport type FramedContentVariantProps = NonNullable<RecipeVariantProps<typeof framedContentRecipe>>;\n\nexport interface FramedContentProps extends HTMLArkProps<\"div\">, StyledProps, FramedContentVariantProps {}\n\nconst StyledFramedContent = styled(ark.div, {}, { baseComponent: true });\n\nexport const FramedContent = forwardRef<HTMLDivElement, FramedContentProps>(\n ({ colorTheme, css: cssProp, ...props }, ref) => (\n <StyledFramedContent\n data-embed-type=\"framed-content\"\n css={css.raw(framedContentRecipe.raw({ colorTheme }), cssProp)}\n {...props}\n ref={ref}\n />\n ),\n);\n"],"mappings":";;;;;;;;;;;;;AAcA,MAAM,uBAAA,GAAA,wBAAA,KAA0B;CAC9B,MAAM;EACJ,SAAS;EACT,QAAQ;EACR,cAAc;EACd,OAAO;EACP,UAAU;EACX;CACD,UAAU,EACR,YAAY;EACV,SAAS;GACP,iBAAiB;GACjB,aAAa;GACd;EACD,QAAQ;GACN,iBAAiB;GACjB,aAAa;GACd;EACD,QAAQ;GACN,iBAAiB;GACjB,aAAa;GACd;EACF,EACF;CACD,iBAAiB,EACf,YAAY,WACb;CACF,CAAC;AAMF,MAAM,uBAAA,GAAA,wBAAA,QAA6BA,cAAAA,IAAI,KAAK,EAAE,EAAE,EAAE,eAAe,MAAM,CAAC;AAExE,MAAa,iBAAA,GAAA,MAAA,aACV,EAAE,YAAY,KAAK,SAAS,GAAG,SAAS,QACvC,iBAAA,GAAA,kBAAA,KAAC,qBAAD;CACE,mBAAgB;CAChB,KAAKC,wBAAAA,IAAI,IAAI,oBAAoB,IAAI,EAAE,YAAY,CAAC,EAAE,QAAQ;CAC9D,GAAI;CACC;CACL,CAAA,CAEL"}
1
+ {"version":3,"file":"FramedContent.js","names":["ark","css"],"sources":["../src/FramedContent.tsx"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { type HTMLArkProps, ark } from \"@ark-ui/react/factory\";\nimport { css, cva } from \"@ndla/styled-system/css\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { StyledProps, RecipeVariantProps } from \"@ndla/styled-system/types\";\nimport { forwardRef } from \"react\";\n\nconst framedContentRecipe = cva({\n base: {\n padding: \"medium\",\n border: \"1px solid\",\n borderRadius: \"small\",\n clear: \"both\",\n overflow: \"hidden\",\n },\n variants: {\n colorTheme: {\n neutral: {\n backgroundColor: \"surface.default\",\n borderColor: \"stroke.subtle\",\n },\n brand1: {\n backgroundColor: \"surface.brand.1.subtle\",\n borderColor: \"surface.brand.1.strong\",\n },\n brand2: {\n backgroundColor: \"surface.brand.2.subtle\",\n borderColor: \"surface.brand.2.strong\",\n },\n },\n },\n defaultVariants: {\n colorTheme: \"neutral\",\n },\n});\n\nexport type FramedContentVariantProps = NonNullable<RecipeVariantProps<typeof framedContentRecipe>>;\n\nexport interface FramedContentProps extends HTMLArkProps<\"div\">, StyledProps, FramedContentVariantProps {}\n\nconst StyledFramedContent = styled(ark.div, {}, { baseComponent: true });\n\nexport const FramedContent = forwardRef<HTMLDivElement, FramedContentProps>(\n ({ colorTheme, css: cssProp, ...props }, ref) => (\n <StyledFramedContent\n data-embed-type=\"framed-content\"\n css={css.raw(framedContentRecipe.raw({ colorTheme }), cssProp)}\n {...props}\n ref={ref}\n />\n ),\n);\n"],"mappings":";;;;;;;;;;;;;AAcA,MAAM,uBAAA,GAAA,wBAAA,KAA0B;CAC9B,MAAM;EACJ,SAAS;EACT,QAAQ;EACR,cAAc;EACd,OAAO;EACP,UAAU;CACZ;CACA,UAAU,EACR,YAAY;EACV,SAAS;GACP,iBAAiB;GACjB,aAAa;EACf;EACA,QAAQ;GACN,iBAAiB;GACjB,aAAa;EACf;EACA,QAAQ;GACN,iBAAiB;GACjB,aAAa;EACf;CACF,EACF;CACA,iBAAiB,EACf,YAAY,UACd;AACF,CAAC;AAMD,MAAM,uBAAA,GAAA,wBAAA,QAA6BA,sBAAAA,IAAI,KAAK,CAAC,GAAG,EAAE,eAAe,KAAK,CAAC;AAEvE,MAAa,iBAAA,GAAA,MAAA,aACV,EAAE,YAAY,KAAK,SAAS,GAAG,SAAS,QACvC,iBAAA,GAAA,kBAAA,KAAC,qBAAD;CACE,mBAAgB;CAChB,KAAKC,wBAAAA,IAAI,IAAI,oBAAoB,IAAI,EAAE,WAAW,CAAC,GAAG,OAAO;CAC7D,GAAI;CACC;AACN,CAAA,CAEL"}
package/lib/Hero.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  */
8
- import { type HTMLArkProps } from "@ark-ui/react";
8
+ import { type HTMLArkProps } from "@ark-ui/react/factory";
9
9
  import { type RecipeVariantProps } from "@ndla/styled-system/css";
10
10
  import type { StyledProps } from "@ndla/styled-system/types";
11
11
  declare const heroRecipe: import("@ndla/styled-system/types").SlotRecipeRuntimeFn<"root" | "background" | "content", {
@@ -88,7 +88,7 @@ export type HeroVariantProps = NonNullable<RecipeVariantProps<typeof heroRecipe>
88
88
  export type HeroVariant = NonNullable<HeroVariantProps>["variant"];
89
89
  export interface HeroProps extends HTMLArkProps<"div">, StyledProps, HeroVariantProps {
90
90
  }
91
- export declare const Hero: import("@ndla/styled-system/jsx").StyleContextProvider<import("react").ForwardRefExoticComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@ark-ui/react").PolymorphicProps>, import("@ndla/styled-system/types").SlotRecipeRuntimeFn<"root" | "background" | "content", {
91
+ export declare const Hero: import("@ndla/styled-system/jsx").StyleContextProvider<import("react").ForwardRefExoticComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@ark-ui/react/factory").PolymorphicProps>, import("@ndla/styled-system/types").SlotRecipeRuntimeFn<"root" | "background" | "content", {
92
92
  absolute: {
93
93
  true: {
94
94
  background: {
@@ -166,8 +166,8 @@ export declare const Hero: import("@ndla/styled-system/jsx").StyleContextProvide
166
166
  }>>;
167
167
  export interface HeroBackgroundProps extends HTMLArkProps<"div">, StyledProps {
168
168
  }
169
- export declare const HeroBackground: import("@ndla/styled-system/jsx").StyleContextConsumer<import("react").ForwardRefExoticComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@ark-ui/react").PolymorphicProps>>;
169
+ export declare const HeroBackground: import("@ndla/styled-system/jsx").StyleContextConsumer<import("react").ForwardRefExoticComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@ark-ui/react/factory").PolymorphicProps>>;
170
170
  export interface HeroContentProps extends HTMLArkProps<"div">, StyledProps {
171
171
  }
172
- export declare const HeroContent: import("@ndla/styled-system/jsx").StyleContextConsumer<import("react").ForwardRefExoticComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@ark-ui/react").PolymorphicProps>>;
172
+ export declare const HeroContent: import("@ndla/styled-system/jsx").StyleContextConsumer<import("react").ForwardRefExoticComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@ark-ui/react/factory").PolymorphicProps>>;
173
173
  export {};
package/lib/Hero.js CHANGED
@@ -1,5 +1,6 @@
1
- let _ark_ui_react = require("@ark-ui/react");
2
1
  let _ndla_styled_system_css = require("@ndla/styled-system/css");
2
+ let _ndla_styled_system_jsx = require("@ndla/styled-system/jsx");
3
+ let _ark_ui_react_factory = require("@ark-ui/react/factory");
3
4
  //#region src/Hero.tsx
4
5
  /**
5
6
  * Copyright (c) 2024-present, NDLA.
@@ -8,7 +9,7 @@ let _ndla_styled_system_css = require("@ndla/styled-system/css");
8
9
  * LICENSE file in the root directory of this source tree.
9
10
  *
10
11
  */
11
- const { withProvider, withContext } = (0, require("@ndla/styled-system/jsx").createStyleContext)((0, _ndla_styled_system_css.sva)({
12
+ const { withProvider, withContext } = (0, _ndla_styled_system_jsx.createStyleContext)((0, _ndla_styled_system_css.sva)({
12
13
  slots: [
13
14
  "root",
14
15
  "background",
@@ -62,9 +63,9 @@ const { withProvider, withContext } = (0, require("@ndla/styled-system/jsx").cre
62
63
  }
63
64
  }
64
65
  }));
65
- const Hero = withProvider(_ark_ui_react.ark.div, "root", { baseComponent: true });
66
- const HeroBackground = withContext(_ark_ui_react.ark.div, "background", { baseComponent: true });
67
- const HeroContent = withContext(_ark_ui_react.ark.div, "content", { baseComponent: true });
66
+ const Hero = withProvider(_ark_ui_react_factory.ark.div, "root", { baseComponent: true });
67
+ const HeroBackground = withContext(_ark_ui_react_factory.ark.div, "background", { baseComponent: true });
68
+ const HeroContent = withContext(_ark_ui_react_factory.ark.div, "content", { baseComponent: true });
68
69
  //#endregion
69
70
  exports.Hero = Hero;
70
71
  exports.HeroBackground = HeroBackground;