@ndla/primitives 1.0.124-alpha.0 → 1.0.126-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 (182) hide show
  1. package/dist/panda.buildinfo.json +8 -0
  2. package/dist/styles.css +119 -7
  3. package/es/Accordion.mjs +1 -2
  4. package/es/Accordion.mjs.map +1 -1
  5. package/es/ArticleLists.mjs +1 -2
  6. package/es/ArticleLists.mjs.map +1 -1
  7. package/es/Badge.mjs +1 -2
  8. package/es/Badge.mjs.map +1 -1
  9. package/es/BlockQuote.mjs +1 -2
  10. package/es/BlockQuote.mjs.map +1 -1
  11. package/es/Button.mjs +1 -2
  12. package/es/Button.mjs.map +1 -1
  13. package/es/Card/Card.mjs +3 -5
  14. package/es/Card/Card.mjs.map +1 -1
  15. package/es/Checkbox.mjs +1 -2
  16. package/es/Checkbox.mjs.map +1 -1
  17. package/es/Combobox.mjs +1 -2
  18. package/es/Combobox.mjs.map +1 -1
  19. package/es/DatePicker.mjs +1 -2
  20. package/es/DatePicker.mjs.map +1 -1
  21. package/es/Dialog.mjs +1 -2
  22. package/es/Dialog.mjs.map +1 -1
  23. package/es/ErrorMessage/ErrorMessage.mjs +5 -8
  24. package/es/ErrorMessage/ErrorMessage.mjs.map +1 -1
  25. package/es/ExpandableBox.mjs +1 -2
  26. package/es/ExpandableBox.mjs.map +1 -1
  27. package/es/Field.mjs +1 -2
  28. package/es/Field.mjs.map +1 -1
  29. package/es/FieldErrorMessage.mjs +1 -2
  30. package/es/FieldErrorMessage.mjs.map +1 -1
  31. package/es/FieldHelper.mjs +1 -2
  32. package/es/FieldHelper.mjs.map +1 -1
  33. package/es/Figure.mjs +31 -14
  34. package/es/Figure.mjs.map +1 -1
  35. package/es/FileUpload.mjs +1 -2
  36. package/es/FileUpload.mjs.map +1 -1
  37. package/es/FramedContent.mjs +1 -2
  38. package/es/FramedContent.mjs.map +1 -1
  39. package/es/Hero.mjs +1 -2
  40. package/es/Hero.mjs.map +1 -1
  41. package/es/Image.mjs +1 -2
  42. package/es/Image.mjs.map +1 -1
  43. package/es/Input.mjs +1 -2
  44. package/es/Input.mjs.map +1 -1
  45. package/es/Label.mjs +1 -2
  46. package/es/Label.mjs.map +1 -1
  47. package/es/Layout/PageContainer.mjs +1 -2
  48. package/es/Layout/PageContainer.mjs.map +1 -1
  49. package/es/Layout/PageContent.mjs +1 -2
  50. package/es/Layout/PageContent.mjs.map +1 -1
  51. package/es/ListItem/ListItem.mjs +5 -16
  52. package/es/ListItem/ListItem.mjs.map +1 -1
  53. package/es/Menu.mjs +1 -2
  54. package/es/Menu.mjs.map +1 -1
  55. package/es/MessageBox.mjs +1 -2
  56. package/es/MessageBox.mjs.map +1 -1
  57. package/es/NdlaLogo.mjs +1 -2
  58. package/es/NdlaLogo.mjs.map +1 -1
  59. package/es/Pagination.mjs +1 -2
  60. package/es/Pagination.mjs.map +1 -1
  61. package/es/Popover.mjs +1 -2
  62. package/es/Popover.mjs.map +1 -1
  63. package/es/RadioGroup.mjs +1 -2
  64. package/es/RadioGroup.mjs.map +1 -1
  65. package/es/Select.mjs +1 -2
  66. package/es/Select.mjs.map +1 -1
  67. package/es/Skeleton.mjs +1 -2
  68. package/es/Skeleton.mjs.map +1 -1
  69. package/es/Slider.mjs +1 -2
  70. package/es/Slider.mjs.map +1 -1
  71. package/es/Spinner.mjs +1 -2
  72. package/es/Spinner.mjs.map +1 -1
  73. package/es/Switch.mjs +1 -2
  74. package/es/Switch.mjs.map +1 -1
  75. package/es/Table.mjs +1 -2
  76. package/es/Table.mjs.map +1 -1
  77. package/es/Tabs.mjs +1 -2
  78. package/es/Tabs.mjs.map +1 -1
  79. package/es/TagsInput.mjs +1 -2
  80. package/es/TagsInput.mjs.map +1 -1
  81. package/es/Text.mjs +1 -2
  82. package/es/Text.mjs.map +1 -1
  83. package/es/Toast.mjs +1 -2
  84. package/es/Toast.mjs.map +1 -1
  85. package/es/ToggleGroup.mjs +1 -2
  86. package/es/ToggleGroup.mjs.map +1 -1
  87. package/es/Tooltip.mjs +1 -2
  88. package/es/Tooltip.mjs.map +1 -1
  89. package/es/Tree/Tree.mjs +1 -2
  90. package/es/Tree/Tree.mjs.map +1 -1
  91. package/es/index.mjs +1 -2
  92. package/lib/Accordion.js +1 -2
  93. package/lib/Accordion.js.map +1 -1
  94. package/lib/ArticleLists.js +1 -2
  95. package/lib/ArticleLists.js.map +1 -1
  96. package/lib/Badge.js +1 -2
  97. package/lib/Badge.js.map +1 -1
  98. package/lib/BlockQuote.js +1 -2
  99. package/lib/BlockQuote.js.map +1 -1
  100. package/lib/Button.js +2 -3
  101. package/lib/Button.js.map +1 -1
  102. package/lib/Card/Card.js +5 -7
  103. package/lib/Card/Card.js.map +1 -1
  104. package/lib/Checkbox.js +2 -3
  105. package/lib/Checkbox.js.map +1 -1
  106. package/lib/Combobox.js +3 -4
  107. package/lib/Combobox.js.map +1 -1
  108. package/lib/DatePicker.js +2 -3
  109. package/lib/DatePicker.js.map +1 -1
  110. package/lib/Dialog.js +2 -3
  111. package/lib/Dialog.js.map +1 -1
  112. package/lib/ErrorMessage/ErrorMessage.js +6 -9
  113. package/lib/ErrorMessage/ErrorMessage.js.map +1 -1
  114. package/lib/ExpandableBox.js +1 -2
  115. package/lib/ExpandableBox.js.map +1 -1
  116. package/lib/Field.js +1 -2
  117. package/lib/Field.js.map +1 -1
  118. package/lib/FieldErrorMessage.js +1 -2
  119. package/lib/FieldErrorMessage.js.map +1 -1
  120. package/lib/FieldHelper.js +1 -2
  121. package/lib/FieldHelper.js.map +1 -1
  122. package/lib/Figure.d.ts +20 -0
  123. package/lib/Figure.js +31 -14
  124. package/lib/Figure.js.map +1 -1
  125. package/lib/FileUpload.js +3 -4
  126. package/lib/FileUpload.js.map +1 -1
  127. package/lib/FramedContent.js +1 -2
  128. package/lib/FramedContent.js.map +1 -1
  129. package/lib/Hero.js +2 -4
  130. package/lib/Hero.js.map +1 -1
  131. package/lib/Image.js +1 -2
  132. package/lib/Image.js.map +1 -1
  133. package/lib/Input.js +1 -2
  134. package/lib/Input.js.map +1 -1
  135. package/lib/Label.js +1 -2
  136. package/lib/Label.js.map +1 -1
  137. package/lib/Layout/PageContainer.js +3 -4
  138. package/lib/Layout/PageContainer.js.map +1 -1
  139. package/lib/Layout/PageContent.js +1 -2
  140. package/lib/Layout/PageContent.js.map +1 -1
  141. package/lib/ListItem/ListItem.js +5 -7
  142. package/lib/ListItem/ListItem.js.map +1 -1
  143. package/lib/Menu.js +2 -3
  144. package/lib/Menu.js.map +1 -1
  145. package/lib/MessageBox.js +1 -2
  146. package/lib/MessageBox.js.map +1 -1
  147. package/lib/NdlaLogo.js +2 -3
  148. package/lib/NdlaLogo.js.map +1 -1
  149. package/lib/Pagination.js +2 -4
  150. package/lib/Pagination.js.map +1 -1
  151. package/lib/Popover.js +2 -3
  152. package/lib/Popover.js.map +1 -1
  153. package/lib/RadioGroup.js +2 -3
  154. package/lib/RadioGroup.js.map +1 -1
  155. package/lib/Select.js +2 -3
  156. package/lib/Select.js.map +1 -1
  157. package/lib/Skeleton.js +2 -4
  158. package/lib/Skeleton.js.map +1 -1
  159. package/lib/Slider.js +2 -3
  160. package/lib/Slider.js.map +1 -1
  161. package/lib/Spinner.js +1 -2
  162. package/lib/Spinner.js.map +1 -1
  163. package/lib/Switch.js +2 -3
  164. package/lib/Switch.js.map +1 -1
  165. package/lib/Table.js +2 -4
  166. package/lib/Table.js.map +1 -1
  167. package/lib/Tabs.js +1 -2
  168. package/lib/Tabs.js.map +1 -1
  169. package/lib/TagsInput.js +2 -3
  170. package/lib/TagsInput.js.map +1 -1
  171. package/lib/Text.js +1 -2
  172. package/lib/Text.js.map +1 -1
  173. package/lib/Toast.js +2 -3
  174. package/lib/Toast.js.map +1 -1
  175. package/lib/ToggleGroup.js +2 -4
  176. package/lib/ToggleGroup.js.map +1 -1
  177. package/lib/Tooltip.js +1 -2
  178. package/lib/Tooltip.js.map +1 -1
  179. package/lib/Tree/Tree.js +2 -3
  180. package/lib/Tree/Tree.js.map +1 -1
  181. package/lib/index.js +56 -57
  182. package/package.json +5 -5
package/es/Tabs.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.mjs","names":[],"sources":["../src/Tabs.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 { Tabs } from \"@ark-ui/react\";\nimport { type RecipeVariantProps, cx, sva } from \"@ndla/styled-system/css\";\nimport { createStyleContext } from \"@ndla/styled-system/jsx\";\nimport type { StyledProps } from \"@ndla/styled-system/types\";\nimport type { RefAttributes } from \"react\";\n\nconst tabsRecipe = sva({\n // TODO: This still doesn't work. Need to figure out why we need to pass keys manually.\n // slots: tabsAnatomy.keys(),\n slots: [\"root\", \"list\", \"trigger\", \"content\", \"indicator\"],\n base: {\n root: {\n position: \"relative\",\n display: \"flex\",\n width: \"100%\",\n _horizontal: {\n flexDirection: \"column\",\n },\n _vertical: {\n flexDirection: \"row\",\n },\n },\n list: {\n position: \"relative\",\n display: \"flex\",\n flexShrink: \"0\",\n flexWrap: \"wrap\",\n _horizontal: {\n flexDirection: \"row\",\n },\n _vertical: {\n flexDirection: \"column\",\n },\n },\n trigger: {\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n flexShrink: \"0\",\n cursor: \"pointer\",\n textStyle: \"label.small\",\n fontWeight: \"bold\",\n transitionDuration: \"normal\",\n transitionProperty: \"color, background, border-color\",\n transitionTimingFunction: \"default\",\n whiteSpace: \"nowrap\",\n paddingInline: \"small\",\n paddingBlock: \"3xsmall\",\n zIndex: \"1\",\n _hover: {\n color: \"text.action\",\n },\n _selected: {\n color: \"text.strong\",\n },\n _disabled: {\n color: \"text.subtle\",\n cursor: \"not-allowed\",\n _hover: {\n color: \"text.subtle\",\n },\n },\n _motionReduce: {\n transition: \"none\",\n transitionDuration: \"0s\",\n },\n },\n content: {\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"flex-start\",\n gap: \"xsmall\",\n },\n },\n defaultVariants: {\n variant: \"line\",\n },\n variants: {\n variant: {\n line: {\n trigger: {\n borderColor: \"stroke.default\",\n _hover: {\n borderColor: \"stroke.hover\",\n _focusVisible: {\n borderColor: \"stroke.default\",\n },\n },\n _horizontal: {\n borderBottom: \"1px solid\",\n },\n _disabled: {\n borderColor: \"stroke.default\",\n _hover: {\n borderColor: \"stroke.default\",\n },\n },\n _vertical: {\n borderLeft: \"1px solid\",\n justifyContent: \"flex-start\",\n },\n _focusVisible: {\n outline: \"none\",\n borderRadius: \"unset\",\n },\n },\n indicator: {\n background: \"stroke.default\",\n _peerFocusVisible: {\n height: \"var(--height)\",\n width: \"var(--width)\",\n outline: \"3px solid\",\n outlineOffset: \"-3px\",\n outlineColor: \"stroke.default\",\n background: \"transparent\",\n _horizontal: {\n borderTopRadius: \"xsmall\",\n },\n _vertical: {\n borderRightRadius: \"xsmall\",\n },\n },\n _horizontal: {\n top: \"calc(var(--top) + var(--height) - 6px)\",\n height: \"3\",\n width: \"var(--width)\",\n _peerFocusVisible: { top: \"var(--top)\" },\n },\n _vertical: {\n height: \"var(--height)\",\n left: \"0\",\n width: \"3\",\n },\n },\n content: {\n zIndex: \"1\",\n _horizontal: {\n paddingBlockStart: \"xsmall\",\n },\n _vertical: {\n paddingInlineStart: \"xsmall\",\n },\n _focusVisible: {\n outline: \"none\",\n boxShadow: \"0 0 0 3px var(--shadow-color)\",\n boxShadowColor: \"stroke.default\",\n },\n },\n },\n outline: {\n list: {\n _horizontal: {\n marginBlockEnd: \"-1px\",\n },\n _vertical: {\n marginInlineEnd: \"-1px\",\n },\n },\n trigger: {\n borderColor: \"transparent\",\n borderWidth: \"1px\",\n _horizontal: {\n borderTopRadius: \"xsmall\",\n },\n _vertical: {\n borderTopLeftRadius: \"xsmall\",\n borderBottomLeftRadius: \"xsmall\",\n },\n _selected: {\n background: \"surface.default\",\n borderColor: \"stroke.default\",\n _horizontal: {\n borderBottom: \"none\",\n },\n _vertical: {\n borderRight: \"none\",\n },\n },\n _focusVisible: {\n outline: \"3px solid\",\n outlineOffset: \"-3px\",\n outlineColor: \"stroke.default\",\n },\n },\n content: {\n borderWidth: \"1px\",\n borderColor: \"stroke.default\",\n background: \"surface.default\",\n width: \"100%\",\n padding: \"xsmall\",\n _vertical: {\n borderBottomRadius: \"xsmall\",\n borderRightRadius: \"xsmall\",\n },\n _horizontal: {\n borderRightRadius: \"xsmall\",\n borderBottomLeftRadius: \"xsmall\",\n },\n _focusVisible: {\n outline: \"3px solid\",\n outlineOffset: \"-3px\",\n outlineColor: \"stroke.default\",\n },\n },\n },\n },\n },\n});\n\nconst { withProvider, withContext } = createStyleContext(tabsRecipe);\n\nexport type TabsVariantProps = NonNullable<RecipeVariantProps<typeof tabsRecipe>>;\n\nexport interface TabsRootProps extends Tabs.RootProps, TabsVariantProps, StyledProps, RefAttributes<HTMLDivElement> {\n translations: Tabs.RootProps[\"translations\"];\n}\n\nconst InternalTabsRoot = withProvider(Tabs.Root, \"root\", { baseComponent: true });\n\nexport const TabsRoot = ({ lazyMount = true, unmountOnExit = true, ...props }: TabsRootProps) => (\n <InternalTabsRoot lazyMount={lazyMount} unmountOnExit={unmountOnExit} {...props} />\n);\n\nexport const TabsContent = withContext(Tabs.Content, \"content\", { baseComponent: true });\n\nexport const TabsIndicator = withContext(Tabs.Indicator, \"indicator\", { baseComponent: true });\n\nexport const TabsList = withContext(Tabs.List, \"list\", { baseComponent: true });\n\nconst InternalTabsTrigger = withContext(Tabs.Trigger, \"trigger\", { baseComponent: true });\n\ninterface TabsTriggerProps extends Tabs.TriggerProps, StyledProps, RefAttributes<HTMLButtonElement> {}\n\nexport const TabsTrigger = ({ className, ...props }: TabsTriggerProps) => (\n <InternalTabsTrigger className={cx(\"peer\", className)} {...props} />\n);\n"],"mappings":";;;;;;;;;;;;;AAyNA,MAAM,EAAE,cAAc,gBAAgB,mBA3MnB,IAAI;CAGrB,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eAAe,MAAM,CAAC;AAIzF,MAAa,eAAe,EAAE,WAAW,GAAG,YAC1C,oBAAC;CAAoB,WAAW,GAAG,QAAQ,UAAU;CAAE,GAAI;EAAS"}
1
+ {"version":3,"file":"Tabs.mjs","names":[],"sources":["../src/Tabs.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 { Tabs } from \"@ark-ui/react\";\nimport { type RecipeVariantProps, cx, sva } from \"@ndla/styled-system/css\";\nimport { createStyleContext } from \"@ndla/styled-system/jsx\";\nimport type { StyledProps } from \"@ndla/styled-system/types\";\nimport type { RefAttributes } from \"react\";\n\nconst tabsRecipe = sva({\n // TODO: This still doesn't work. Need to figure out why we need to pass keys manually.\n // slots: tabsAnatomy.keys(),\n slots: [\"root\", \"list\", \"trigger\", \"content\", \"indicator\"],\n base: {\n root: {\n position: \"relative\",\n display: \"flex\",\n width: \"100%\",\n _horizontal: {\n flexDirection: \"column\",\n },\n _vertical: {\n flexDirection: \"row\",\n },\n },\n list: {\n position: \"relative\",\n display: \"flex\",\n flexShrink: \"0\",\n flexWrap: \"wrap\",\n _horizontal: {\n flexDirection: \"row\",\n },\n _vertical: {\n flexDirection: \"column\",\n },\n },\n trigger: {\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n flexShrink: \"0\",\n cursor: \"pointer\",\n textStyle: \"label.small\",\n fontWeight: \"bold\",\n transitionDuration: \"normal\",\n transitionProperty: \"color, background, border-color\",\n transitionTimingFunction: \"default\",\n whiteSpace: \"nowrap\",\n paddingInline: \"small\",\n paddingBlock: \"3xsmall\",\n zIndex: \"1\",\n _hover: {\n color: \"text.action\",\n },\n _selected: {\n color: \"text.strong\",\n },\n _disabled: {\n color: \"text.subtle\",\n cursor: \"not-allowed\",\n _hover: {\n color: \"text.subtle\",\n },\n },\n _motionReduce: {\n transition: \"none\",\n transitionDuration: \"0s\",\n },\n },\n content: {\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"flex-start\",\n gap: \"xsmall\",\n },\n },\n defaultVariants: {\n variant: \"line\",\n },\n variants: {\n variant: {\n line: {\n trigger: {\n borderColor: \"stroke.default\",\n _hover: {\n borderColor: \"stroke.hover\",\n _focusVisible: {\n borderColor: \"stroke.default\",\n },\n },\n _horizontal: {\n borderBottom: \"1px solid\",\n },\n _disabled: {\n borderColor: \"stroke.default\",\n _hover: {\n borderColor: \"stroke.default\",\n },\n },\n _vertical: {\n borderLeft: \"1px solid\",\n justifyContent: \"flex-start\",\n },\n _focusVisible: {\n outline: \"none\",\n borderRadius: \"unset\",\n },\n },\n indicator: {\n background: \"stroke.default\",\n _peerFocusVisible: {\n height: \"var(--height)\",\n width: \"var(--width)\",\n outline: \"3px solid\",\n outlineOffset: \"-3px\",\n outlineColor: \"stroke.default\",\n background: \"transparent\",\n _horizontal: {\n borderTopRadius: \"xsmall\",\n },\n _vertical: {\n borderRightRadius: \"xsmall\",\n },\n },\n _horizontal: {\n top: \"calc(var(--top) + var(--height) - 6px)\",\n height: \"3\",\n width: \"var(--width)\",\n _peerFocusVisible: { top: \"var(--top)\" },\n },\n _vertical: {\n height: \"var(--height)\",\n left: \"0\",\n width: \"3\",\n },\n },\n content: {\n zIndex: \"1\",\n _horizontal: {\n paddingBlockStart: \"xsmall\",\n },\n _vertical: {\n paddingInlineStart: \"xsmall\",\n },\n _focusVisible: {\n outline: \"none\",\n boxShadow: \"0 0 0 3px var(--shadow-color)\",\n boxShadowColor: \"stroke.default\",\n },\n },\n },\n outline: {\n list: {\n _horizontal: {\n marginBlockEnd: \"-1px\",\n },\n _vertical: {\n marginInlineEnd: \"-1px\",\n },\n },\n trigger: {\n borderColor: \"transparent\",\n borderWidth: \"1px\",\n _horizontal: {\n borderTopRadius: \"xsmall\",\n },\n _vertical: {\n borderTopLeftRadius: \"xsmall\",\n borderBottomLeftRadius: \"xsmall\",\n },\n _selected: {\n background: \"surface.default\",\n borderColor: \"stroke.default\",\n _horizontal: {\n borderBottom: \"none\",\n },\n _vertical: {\n borderRight: \"none\",\n },\n },\n _focusVisible: {\n outline: \"3px solid\",\n outlineOffset: \"-3px\",\n outlineColor: \"stroke.default\",\n },\n },\n content: {\n borderWidth: \"1px\",\n borderColor: \"stroke.default\",\n background: \"surface.default\",\n width: \"100%\",\n padding: \"xsmall\",\n _vertical: {\n borderBottomRadius: \"xsmall\",\n borderRightRadius: \"xsmall\",\n },\n _horizontal: {\n borderRightRadius: \"xsmall\",\n borderBottomLeftRadius: \"xsmall\",\n },\n _focusVisible: {\n outline: \"3px solid\",\n outlineOffset: \"-3px\",\n outlineColor: \"stroke.default\",\n },\n },\n },\n },\n },\n});\n\nconst { withProvider, withContext } = createStyleContext(tabsRecipe);\n\nexport type TabsVariantProps = NonNullable<RecipeVariantProps<typeof tabsRecipe>>;\n\nexport interface TabsRootProps extends Tabs.RootProps, TabsVariantProps, StyledProps, RefAttributes<HTMLDivElement> {\n translations: Tabs.RootProps[\"translations\"];\n}\n\nconst InternalTabsRoot = withProvider(Tabs.Root, \"root\", { baseComponent: true });\n\nexport const TabsRoot = ({ lazyMount = true, unmountOnExit = true, ...props }: TabsRootProps) => (\n <InternalTabsRoot lazyMount={lazyMount} unmountOnExit={unmountOnExit} {...props} />\n);\n\nexport const TabsContent = withContext(Tabs.Content, \"content\", { baseComponent: true });\n\nexport const TabsIndicator = withContext(Tabs.Indicator, \"indicator\", { baseComponent: true });\n\nexport const TabsList = withContext(Tabs.List, \"list\", { baseComponent: true });\n\nconst InternalTabsTrigger = withContext(Tabs.Trigger, \"trigger\", { baseComponent: true });\n\ninterface TabsTriggerProps extends Tabs.TriggerProps, StyledProps, RefAttributes<HTMLButtonElement> {}\n\nexport const TabsTrigger = ({ className, ...props }: TabsTriggerProps) => (\n <InternalTabsTrigger className={cx(\"peer\", className)} {...props} />\n);\n"],"mappings":";;;;;;;;;;;;AAyNA,MAAM,EAAE,cAAc,gBAAgB,mBA3M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YAAY,KAAK,SAAS,WAAW,EAAE,eAAe,MAAM,CAAC;AAIzF,MAAa,eAAe,EAAE,WAAW,GAAG,YAC1C,oBAAC,qBAAD;CAAqB,WAAW,GAAG,QAAQ,UAAU;CAAE,GAAI;CAAS,CAAA"}
package/es/TagsInput.mjs CHANGED
@@ -4,7 +4,6 @@ import { sva } from "@ndla/styled-system/css";
4
4
  import { createStyleContext } from "@ndla/styled-system/jsx";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  import { forwardRef } from "react";
7
-
8
7
  //#region src/TagsInput.tsx
9
8
  /**
10
9
  * Copyright (c) 2024-present, NDLA.
@@ -103,7 +102,7 @@ const TagsInputLabel = forwardRef(({ children, ...props }, ref) => /* @__PURE__
103
102
  ...props,
104
103
  children: /* @__PURE__ */ jsx(Label, { children })
105
104
  }));
106
-
107
105
  //#endregion
108
106
  export { TagsInputClearTrigger, TagsInputControl, TagsInputInput, TagsInputItem, TagsInputItemDeleteTrigger, TagsInputItemInput, TagsInputItemPreview, TagsInputItemText, TagsInputLabel, TagsInputRoot };
107
+
109
108
  //# sourceMappingURL=TagsInput.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"TagsInput.mjs","names":[],"sources":["../src/TagsInput.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 { TagsInput, tagsInputAnatomy } 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, type RefAttributes } from \"react\";\nimport { Label } from \"./Label\";\nimport { type TextProps } from \"./Text\";\n\nconst tagsInputRecipe = sva({\n slots: tagsInputAnatomy.keys(),\n base: {\n root: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"xxsmall\",\n width: \"full\",\n },\n control: {\n display: \"inline-flex\",\n gap: \"xxsmall\",\n alignItems: \"center\",\n flexWrap: \"wrap\",\n },\n item: {\n paddingBlock: \"3xsmall\",\n },\n itemPreview: {\n display: \"flex\",\n gap: \"1\",\n paddingBlock: \"4xsmall\",\n paddingInlineEnd: \"3xsmall\",\n paddingInlineStart: \"xsmall\",\n cursor: \"initial\",\n borderRadius: \"large\",\n outline: \"1px solid\",\n outlineColor: \"transparent\",\n backgroundColor: \"surface.action.selected\",\n color: \"text.onAction\",\n transitionDuration: \"normal\",\n transitionProperty: \"background, outline-color, color\",\n transitionTimingFunction: \"default\",\n textStyle: \"label.medium\",\n _hover: {\n backgroundColor: \"surface.actionSubtle.hover\",\n outlineColor: \"stroke.hover\",\n color: \"text.default\",\n \"& svg\": {\n color: \"stroke.hover\",\n },\n _motionReduce: {\n transition: \"none\",\n transitionDuration: \"0s\",\n },\n },\n _highlighted: {\n backgroundColor: \"surface.actionSubtle.hover\",\n outlineWidth: \"3px\",\n outlineOffset: \"-1px\",\n outlineColor: \"stroke.hover\",\n color: \"text.default\",\n \"& svg\": {\n color: \"stroke.hover\",\n },\n _motionReduce: {\n transition: \"none\",\n transitionDuration: \"0s\",\n },\n },\n },\n input: {\n flex: \"1\",\n },\n itemDeleteTrigger: {\n paddingBottom: \"1\",\n cursor: \"pointer\",\n \"& span\": {\n display: \"inline-block\",\n },\n \"& svg\": {\n marginInline: \"0\",\n marginBlock: \"0\",\n width: \"medium\",\n height: \"medium\",\n },\n },\n itemText: {\n paddingBottom: \"1\",\n },\n itemInput: {\n outline: \"none\",\n background: \"transparent\",\n },\n },\n});\nconst { withProvider, withContext } = createStyleContext(tagsInputRecipe);\n\nexport interface TagsInputRootProps extends TagsInput.RootProps, StyledProps {\n translations: TagsInput.RootProps[\"translations\"];\n}\n\nexport const TagsInputRoot = withProvider(TagsInput.Root, \"root\", {\n baseComponent: true,\n});\n\nexport interface TagsInputClearTriggerProps extends TagsInput.ClearTriggerProps, StyledProps {}\n\nexport const TagsInputClearTrigger = withContext(TagsInput.ClearTrigger, \"clearTrigger\", { baseComponent: true });\n\nexport interface TagsInputControlProps extends TagsInput.ControlProps, StyledProps {}\n\nexport const TagsInputControl = withContext(TagsInput.Control, \"control\", { baseComponent: true });\n\nexport interface TagsInputInputProps extends TagsInput.InputProps, StyledProps {}\n\nexport const TagsInputInput = withContext(TagsInput.Input, \"input\", { baseComponent: true });\n\nexport interface TagsInputItemDeleteTriggerProps extends TagsInput.ItemDeleteTriggerProps, StyledProps {}\n\nexport const TagsInputItemDeleteTrigger = withContext(TagsInput.ItemDeleteTrigger, \"itemDeleteTrigger\", {\n baseComponent: true,\n});\n\nexport interface TagsInputItemInputProps extends TagsInput.ItemInputProps, StyledProps {}\n\nexport const TagsInputItemInput = withContext(TagsInput.ItemInput, \"itemInput\", { baseComponent: true });\n\nexport interface TagsInputItemPreviewProps extends TagsInput.ItemPreviewProps, StyledProps {}\n\nexport const TagsInputItemPreview = withContext(TagsInput.ItemPreview, \"itemPreview\", { baseComponent: true });\n\nexport interface TagsInputItemProps extends TagsInput.ItemProps, StyledProps {}\n\nexport const TagsInputItem = withContext(TagsInput.Item, \"item\", { baseComponent: true });\n\nexport interface TagsInputItemTextProps extends TagsInput.ItemTextProps, StyledProps {}\n\nexport const TagsInputItemText = withContext(TagsInput.ItemText, \"itemText\", { baseComponent: true });\n\nconst InternalTagsInputLabel = withContext(TagsInput.Label, \"label\");\n\nexport interface TagsInputLabelProps\n extends Omit<TagsInput.LabelProps, \"color\">, StyledProps, TextProps, RefAttributes<HTMLLabelElement> {}\n\nexport const TagsInputLabel = forwardRef<HTMLLabelElement, TagsInputLabelProps>(({ children, ...props }, ref) => (\n <InternalTagsInputLabel asChild ref={ref} {...props}>\n <Label>{children}</Label>\n </InternalTagsInputLabel>\n));\n"],"mappings":";;;;;;;;;;;;;;;AAsGA,MAAM,EAAE,cAAc,gBAAgB,mBAtFd,IAAI;CAC1B,OAAO,iBAAiB,MAAM;CAC9B,MAAM;EACJ,MAAM;GACJ,SAAS;GACT,eAAe;G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eAAe,MAAM,CAAC;AAIxG,MAAa,uBAAuB,YAAY,UAAU,aAAa,eAAe,EAAE,eAAe,MAAM,CAAC;AAI9G,MAAa,gBAAgB,YAAY,UAAU,MAAM,QAAQ,EAAE,eAAe,MAAM,CAAC;AAIzF,MAAa,oBAAoB,YAAY,UAAU,UAAU,YAAY,EAAE,eAAe,MAAM,CAAC;AAErG,MAAM,yBAAyB,YAAY,UAAU,OAAO,QAAQ;AAKpE,MAAa,iBAAiB,YAAmD,EAAE,UAAU,GAAG,SAAS,QACvG,oBAAC;CAAuB;CAAa;CAAK,GAAI;WAC5C,oBAAC,SAAO,WAAiB;EACF,CACzB"}
1
+ {"version":3,"file":"TagsInput.mjs","names":[],"sources":["../src/TagsInput.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 { TagsInput, tagsInputAnatomy } 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, type RefAttributes } from \"react\";\nimport { Label } from \"./Label\";\nimport { type TextProps } from \"./Text\";\n\nconst tagsInputRecipe = sva({\n slots: tagsInputAnatomy.keys(),\n base: {\n root: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"xxsmall\",\n width: \"full\",\n },\n control: {\n display: \"inline-flex\",\n gap: \"xxsmall\",\n alignItems: \"center\",\n flexWrap: \"wrap\",\n },\n item: {\n paddingBlock: \"3xsmall\",\n },\n itemPreview: {\n display: \"flex\",\n gap: \"1\",\n paddingBlock: \"4xsmall\",\n paddingInlineEnd: \"3xsmall\",\n paddingInlineStart: \"xsmall\",\n cursor: \"initial\",\n borderRadius: \"large\",\n outline: \"1px solid\",\n outlineColor: \"transparent\",\n backgroundColor: \"surface.action.selected\",\n color: \"text.onAction\",\n transitionDuration: \"normal\",\n transitionProperty: \"background, outline-color, color\",\n transitionTimingFunction: \"default\",\n textStyle: \"label.medium\",\n _hover: {\n backgroundColor: \"surface.actionSubtle.hover\",\n outlineColor: \"stroke.hover\",\n color: \"text.default\",\n \"& svg\": {\n color: \"stroke.hover\",\n },\n _motionReduce: {\n transition: \"none\",\n transitionDuration: \"0s\",\n },\n },\n _highlighted: {\n backgroundColor: \"surface.actionSubtle.hover\",\n outlineWidth: \"3px\",\n outlineOffset: \"-1px\",\n outlineColor: \"stroke.hover\",\n color: \"text.default\",\n \"& svg\": {\n color: \"stroke.hover\",\n },\n _motionReduce: {\n transition: \"none\",\n transitionDuration: \"0s\",\n },\n },\n },\n input: {\n flex: \"1\",\n },\n itemDeleteTrigger: {\n paddingBottom: \"1\",\n cursor: \"pointer\",\n \"& span\": {\n display: \"inline-block\",\n },\n \"& svg\": {\n marginInline: \"0\",\n marginBlock: \"0\",\n width: \"medium\",\n height: \"medium\",\n },\n },\n itemText: {\n paddingBottom: \"1\",\n },\n itemInput: {\n outline: \"none\",\n background: \"transparent\",\n },\n },\n});\nconst { withProvider, withContext } = createStyleContext(tagsInputRecipe);\n\nexport interface TagsInputRootProps extends TagsInput.RootProps, StyledProps {\n translations: TagsInput.RootProps[\"translations\"];\n}\n\nexport const TagsInputRoot = withProvider(TagsInput.Root, \"root\", {\n baseComponent: true,\n});\n\nexport interface TagsInputClearTriggerProps extends TagsInput.ClearTriggerProps, StyledProps {}\n\nexport const TagsInputClearTrigger = withContext(TagsInput.ClearTrigger, \"clearTrigger\", { baseComponent: true });\n\nexport interface TagsInputControlProps extends TagsInput.ControlProps, StyledProps {}\n\nexport const TagsInputControl = withContext(TagsInput.Control, \"control\", { baseComponent: true });\n\nexport interface TagsInputInputProps extends TagsInput.InputProps, StyledProps {}\n\nexport const TagsInputInput = withContext(TagsInput.Input, \"input\", { baseComponent: true });\n\nexport interface TagsInputItemDeleteTriggerProps extends TagsInput.ItemDeleteTriggerProps, StyledProps {}\n\nexport const TagsInputItemDeleteTrigger = withContext(TagsInput.ItemDeleteTrigger, \"itemDeleteTrigger\", {\n baseComponent: true,\n});\n\nexport interface TagsInputItemInputProps extends TagsInput.ItemInputProps, StyledProps {}\n\nexport const TagsInputItemInput = withContext(TagsInput.ItemInput, \"itemInput\", { baseComponent: true });\n\nexport interface TagsInputItemPreviewProps extends TagsInput.ItemPreviewProps, StyledProps {}\n\nexport const TagsInputItemPreview = withContext(TagsInput.ItemPreview, \"itemPreview\", { baseComponent: true });\n\nexport interface TagsInputItemProps extends TagsInput.ItemProps, StyledProps {}\n\nexport const TagsInputItem = withContext(TagsInput.Item, \"item\", { baseComponent: true });\n\nexport interface TagsInputItemTextProps extends TagsInput.ItemTextProps, StyledProps {}\n\nexport const TagsInputItemText = withContext(TagsInput.ItemText, \"itemText\", { baseComponent: true });\n\nconst InternalTagsInputLabel = withContext(TagsInput.Label, \"label\");\n\nexport interface TagsInputLabelProps\n extends Omit<TagsInput.LabelProps, \"color\">, StyledProps, TextProps, RefAttributes<HTMLLabelElement> {}\n\nexport const TagsInputLabel = forwardRef<HTMLLabelElement, TagsInputLabelProps>(({ children, ...props }, ref) => (\n <InternalTagsInputLabel asChild ref={ref} {...props}>\n <Label>{children}</Label>\n </InternalTagsInputLabel>\n));\n"],"mappings":";;;;;;;;;;;;;;AAsGA,MAAM,EAAE,cAAc,gBAAgB,mBAtFd,IAAI;CAC1B,OAAO,iBAAiB,MAAM;CAC9B,MAAM;EACJ,MAAM;GACJ,SAAS;GACT,eAAe;GACf,KAAK;GACL,OAAO;GACR;EACD,SAAS;GACP,SAAS;GACT,KAAK;GACL,YAAY;GACZ,UAAU;GACX;EACD,MAAM,EACJ,cAAc,WACf;EACD,aAAa;GACX,SAAS;GACT,KAAK;GACL,cAAc;GACd,kBAAkB;GAClB,oBAAoB;GACpB,QAAQ;GACR,cAAc;GACd,SAAS;GACT,cAAc;GACd,iBAAiB;GACjB,OAAO;GACP,oBAAoB;GACpB,oBAAoB;GACpB,0BAA0B;GAC1B,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AAE,UAAU,GAAG,SAAS,QACvG,oBAAC,wBAAD;CAAwB,SAAA;CAAa;CAAK,GAAI;WAC5C,oBAAC,OAAD,EAAQ,UAAiB,CAAA;CACF,CAAA,CACzB"}
package/es/Text.mjs CHANGED
@@ -3,7 +3,6 @@ import { css } from "@ndla/styled-system/css";
3
3
  import { styled } from "@ndla/styled-system/jsx";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  import { forwardRef } from "react";
6
-
7
6
  //#region src/Text.tsx
8
7
  /**
9
8
  * Copyright (c) 2024-present, NDLA.
@@ -34,7 +33,7 @@ const Heading = forwardRef(({ textStyle = "heading.medium", fontWeight, color, s
34
33
  ref,
35
34
  ...rest
36
35
  }));
37
-
38
36
  //#endregion
39
37
  export { Heading, Text };
38
+
40
39
  //# sourceMappingURL=Text.mjs.map
package/es/Text.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Text.mjs","names":[],"sources":["../src/Text.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 } from \"@ndla/styled-system/css\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { ColorToken, FontWeightToken } from \"@ndla/styled-system/tokens\";\nimport type { StyledProps, UtilityValues } from \"@ndla/styled-system/types\";\nimport { forwardRef } from \"react\";\n\nexport interface TextProps {\n textStyle?: UtilityValues[\"textStyle\"];\n fontWeight?: FontWeightToken;\n color?: ColorToken;\n srOnly?: boolean;\n}\n\nconst StyledP = styled(ark.p, {}, { baseComponent: true });\n\nexport interface TextComponentProps extends Omit<HTMLArkProps<\"p\">, \"color\">, StyledProps, TextProps {}\n\nexport const Text = forwardRef<HTMLParagraphElement, TextComponentProps>(\n ({ textStyle = \"body.medium\", fontWeight, color, srOnly, css: cssProp, ...rest }, ref) => (\n <StyledP css={css.raw({ textStyle, fontWeight, color, srOnly }, cssProp)} ref={ref} {...rest} />\n ),\n);\n\nconst StyledH1 = styled(ark.h1, {}, { baseComponent: true });\n\nexport interface HeadingComponentProps extends Omit<HTMLArkProps<\"h1\">, \"color\">, StyledProps, TextProps {}\n\nexport const Heading = forwardRef<HTMLHeadingElement, HeadingComponentProps>(\n ({ textStyle = \"heading.medium\", fontWeight, color, srOnly, css: cssProp, ...rest }, ref) => (\n <StyledH1 css={css.raw({ textStyle, fontWeight, color, srOnly }, cssProp)} ref={ref} {...rest} />\n ),\n);\n"],"mappings":";;;;;;;;;;;;;;AAsBA,MAAM,UAAU,OAAO,IAAI,GAAG,EAAE,EAAE,EAAE,eAAe,MAAM,CAAC;AAI1D,MAAa,OAAO,YACjB,EAAE,YAAY,eAAe,YAAY,OAAO,QAAQ,KAAK,SAAS,GAAG,QAAQ,QAChF,oBAAC;CAAQ,KAAK,IAAI,IAAI;EAAE;EAAW;EAAY;EAAO;EAAQ,EAAE,QAAQ;CAAO;CAAK,GAAI;EAAQ,CAEnG;AAED,MAAM,WAAW,OAAO,IAAI,IAAI,EAAE,EAAE,EAAE,eAAe,MAAM,CAAC;AAI5D,MAAa,UAAU,YACpB,EAAE,YAAY,kBAAkB,YAAY,OAAO,QAAQ,KAAK,SAAS,GAAG,QAAQ,QACnF,oBAAC;CAAS,KAAK,IAAI,IAAI;EAAE;EAAW;EAAY;EAAO;EAAQ,EAAE,QAAQ;CAAO;CAAK,GAAI;EAAQ,CAEpG"}
1
+ {"version":3,"file":"Text.mjs","names":[],"sources":["../src/Text.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 } from \"@ndla/styled-system/css\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { ColorToken, FontWeightToken } from \"@ndla/styled-system/tokens\";\nimport type { StyledProps, UtilityValues } from \"@ndla/styled-system/types\";\nimport { forwardRef } from \"react\";\n\nexport interface TextProps {\n textStyle?: UtilityValues[\"textStyle\"];\n fontWeight?: FontWeightToken;\n color?: ColorToken;\n srOnly?: boolean;\n}\n\nconst StyledP = styled(ark.p, {}, { baseComponent: true });\n\nexport interface TextComponentProps extends Omit<HTMLArkProps<\"p\">, \"color\">, StyledProps, TextProps {}\n\nexport const Text = forwardRef<HTMLParagraphElement, TextComponentProps>(\n ({ textStyle = \"body.medium\", fontWeight, color, srOnly, css: cssProp, ...rest }, ref) => (\n <StyledP css={css.raw({ textStyle, fontWeight, color, srOnly }, cssProp)} ref={ref} {...rest} />\n ),\n);\n\nconst StyledH1 = styled(ark.h1, {}, { baseComponent: true });\n\nexport interface HeadingComponentProps extends Omit<HTMLArkProps<\"h1\">, \"color\">, StyledProps, TextProps {}\n\nexport const Heading = forwardRef<HTMLHeadingElement, HeadingComponentProps>(\n ({ textStyle = \"heading.medium\", fontWeight, color, srOnly, css: cssProp, ...rest }, ref) => (\n <StyledH1 css={css.raw({ textStyle, fontWeight, color, srOnly }, cssProp)} ref={ref} {...rest} />\n ),\n);\n"],"mappings":";;;;;;;;;;;;;AAsBA,MAAM,UAAU,OAAO,IAAI,GAAG,EAAE,EAAE,EAAE,eAAe,MAAM,CAAC;AAI1D,MAAa,OAAO,YACjB,EAAE,YAAY,eAAe,YAAY,OAAO,QAAQ,KAAK,SAAS,GAAG,QAAQ,QAChF,oBAAC,SAAD;CAAS,KAAK,IAAI,IAAI;EAAE;EAAW;EAAY;EAAO;EAAQ,EAAE,QAAQ;CAAO;CAAK,GAAI;CAAQ,CAAA,CAEnG;AAED,MAAM,WAAW,OAAO,IAAI,IAAI,EAAE,EAAE,EAAE,eAAe,MAAM,CAAC;AAI5D,MAAa,UAAU,YACpB,EAAE,YAAY,kBAAkB,YAAY,OAAO,QAAQ,KAAK,SAAS,GAAG,QAAQ,QACnF,oBAAC,UAAD;CAAU,KAAK,IAAI,IAAI;EAAE;EAAW;EAAY;EAAO;EAAQ,EAAE,QAAQ;CAAO;CAAK,GAAI;CAAQ,CAAA,CAEpG"}
package/es/Toast.mjs CHANGED
@@ -3,7 +3,6 @@ import { Toast, toastAnatomy } from "@ark-ui/react";
3
3
  import { sva } from "@ndla/styled-system/css";
4
4
  import { createStyleContext } from "@ndla/styled-system/jsx";
5
5
  import { jsx } from "react/jsx-runtime";
6
-
7
6
  //#region src/Toast.tsx
8
7
  /**
9
8
  * Copyright (c) 2024-present, NDLA.
@@ -83,7 +82,7 @@ const ToastTitle = ({ textStyle = "label.medium", fontWeight = "semibold", child
83
82
  children: /* @__PURE__ */ jsx("div", { children })
84
83
  })
85
84
  });
86
-
87
85
  //#endregion
88
86
  export { ToastActionTrigger, ToastCloseTrigger, ToastDescription, ToastRoot, ToastTitle };
87
+
89
88
  //# sourceMappingURL=Toast.mjs.map
package/es/Toast.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.mjs","names":[],"sources":["../src/Toast.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 { Toast, toastAnatomy } from \"@ark-ui/react\";\nimport { sva } from \"@ndla/styled-system/css\";\nimport { createStyleContext } from \"@ndla/styled-system/jsx\";\nimport type { StyledProps, RecipeVariantProps } from \"@ndla/styled-system/types\";\nimport type { RefAttributes } from \"react\";\nimport { Text, type TextProps } from \"./Text\";\n\nconst toastRecipe = sva({\n slots: toastAnatomy.keys(),\n base: {\n root: {\n position: \"relative\",\n borderRadius: \"xsmall\",\n boxShadow: \"medium\",\n minWidth: \"20rem\",\n maxWidth: \"30rem\",\n height: \"var(--height)\",\n opacity: \"var(--opacity)\",\n overflowWrap: \"anywhere\",\n padding: \"small\",\n scale: \"var(--scale)\",\n translate: \"var(--x) var(--y) 0\",\n willChange: \"translate, scale, opacity, height\",\n zIndex: \"var(--z-index)\",\n transitionDuration: \"slow\",\n transitionProperty: \"translate, scale, opacity, height\",\n transitionTimingFunction: \"default\",\n _motionReduce: {\n transition: \"none\",\n transitionDuration: \"0s\",\n },\n },\n title: {\n paddingInlineEnd: \"xxlarge\",\n },\n closeTrigger: {\n position: \"absolute\",\n top: \"xxsmall\",\n right: \"xxsmall\",\n },\n description: {\n paddingInlineEnd: \"xxlarge\",\n },\n },\n defaultVariants: {\n variant: \"light\",\n },\n variants: {\n variant: {\n light: {\n root: {\n background: \"surface.brand.1.moderate\",\n color: \"text.default\",\n },\n },\n dark: {\n root: {\n background: \"surface.brand.1.strong\",\n color: \"text.onAction\",\n },\n },\n },\n },\n});\n\nconst { withProvider, withContext } = createStyleContext(toastRecipe);\n\nexport type ToastRootVariantProps = NonNullable<RecipeVariantProps<typeof toastRecipe>>;\n\nexport interface ToastRootProps extends Toast.RootProps, StyledProps, ToastRootVariantProps {}\nexport const ToastRoot = withProvider(Toast.Root, \"root\", { baseComponent: true });\n\nexport const ToastActionTrigger = withContext(Toast.ActionTrigger, \"actionTrigger\", { baseComponent: true });\n\nexport const ToastCloseTrigger = withContext(Toast.CloseTrigger, \"closeTrigger\", { baseComponent: true });\n\nconst InternalToastDescription = withContext(Toast.Description, \"description\");\n\ninterface ToastDescriptionProps\n extends Omit<Toast.DescriptionProps, \"color\">, TextProps, StyledProps, RefAttributes<HTMLDivElement> {}\n\nexport const ToastDescription = ({ textStyle = \"label.medium\", children, ...props }: ToastDescriptionProps) => (\n <InternalToastDescription asChild>\n <Text asChild consumeCss textStyle={textStyle} {...props}>\n <div>{children}</div>\n </Text>\n </InternalToastDescription>\n);\n\nconst InternalToastTitle = withContext(Toast.Title, \"title\");\n\ninterface ToastTitleProps\n extends Omit<Toast.TitleProps, \"color\">, TextProps, StyledProps, RefAttributes<HTMLDivElement> {}\n\nexport const ToastTitle = ({\n textStyle = \"label.medium\",\n fontWeight = \"semibold\",\n children,\n ...props\n}: ToastTitleProps) => (\n <InternalToastTitle asChild>\n <Text asChild consumeCss fontWeight={fontWeight} textStyle={textStyle} {...props}>\n <div>{children}</div>\n </Text>\n </InternalToastTitle>\n);\n"],"mappings":";;;;;;;;;;;;;;AAyEA,MAAM,EAAE,cAAc,gBAAgB,mBA1DlB,IAAI;CACtB,OAAO,aAAa,MAAM;CAC1B,MAAM;EACJ,MAAM;GACJ,UAAU;GACV,cAAc;GACd,WAAW;GACX,UAAU;GACV,UAAU;GACV,QAAQ;GACR,SAAS;GACT,cAAc;GACd,SAAS;GACT,OAAO;GACP,WAAW;GACX,YAAY;GACZ,QAAQ;GACR,oBAAoB;GACpB,oBAAoB;GACpB,0BAA0B;GAC1B,eAAe;IACb,YAAY;IACZ,oBAAoB;IACrB;GACF;EACD,OAAO,EACL,kBAAkB,WACnB;EACD,cAAc;GACZ,UAAU;GACV,KAAK;GACL,OAAO;GACR;EACD,aAAa,EACX,kBAAkB,WACnB;EACF;CACD,iBAAiB,EACf,SAAS,SACV;CACD,UAAU,EACR,SAAS;EACP,OAAO,EACL,MAAM;GACJ,YAAY;GACZ,OAAO;GACR,EACF;EACD,MAAM,EACJ,MAAM;GACJ,YAAY;GACZ,OAAO;GACR,EACF;EACF,EACF;CACF,CAAC,CAEmE;AAKrE,MAAa,YAAY,aAAa,MAAM,MAAM,QAAQ,EAAE,eAAe,MAAM,CAAC;AAElF,MAAa,qBAAqB,YAAY,MAAM,eAAe,iBAAiB,EAAE,eAAe,MAAM,CAAC;AAE5G,MAAa,oBAAoB,YAAY,MAAM,cAAc,gBAAgB,EAAE,eAAe,MAAM,CAAC;AAEzG,MAAM,2BAA2B,YAAY,MAAM,aAAa,cAAc;AAK9E,MAAa,oBAAoB,EAAE,YAAY,gBAAgB,UAAU,GAAG,YAC1E,oBAAC;CAAyB;WACxB,oBAAC;EAAK;EAAQ;EAAsB;EAAW,GAAI;YACjD,oBAAC,SAAK,WAAe;GAChB;EACkB;AAG7B,MAAM,qBAAqB,YAAY,MAAM,OAAO,QAAQ;AAK5D,MAAa,cAAc,EACzB,YAAY,gBACZ,aAAa,YACb,UACA,GAAG,YAEH,oBAAC;CAAmB;WAClB,oBAAC;EAAK;EAAQ;EAAuB;EAAuB;EAAW,GAAI;YACzE,oBAAC,SAAK,WAAe;GAChB;EACY"}
1
+ {"version":3,"file":"Toast.mjs","names":[],"sources":["../src/Toast.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 { Toast, toastAnatomy } from \"@ark-ui/react\";\nimport { sva } from \"@ndla/styled-system/css\";\nimport { createStyleContext } from \"@ndla/styled-system/jsx\";\nimport type { StyledProps, RecipeVariantProps } from \"@ndla/styled-system/types\";\nimport type { RefAttributes } from \"react\";\nimport { Text, type TextProps } from \"./Text\";\n\nconst toastRecipe = sva({\n slots: toastAnatomy.keys(),\n base: {\n root: {\n position: \"relative\",\n borderRadius: \"xsmall\",\n boxShadow: \"medium\",\n minWidth: \"20rem\",\n maxWidth: \"30rem\",\n height: \"var(--height)\",\n opacity: \"var(--opacity)\",\n overflowWrap: \"anywhere\",\n padding: \"small\",\n scale: \"var(--scale)\",\n translate: \"var(--x) var(--y) 0\",\n willChange: \"translate, scale, opacity, height\",\n zIndex: \"var(--z-index)\",\n transitionDuration: \"slow\",\n transitionProperty: \"translate, scale, opacity, height\",\n transitionTimingFunction: \"default\",\n _motionReduce: {\n transition: \"none\",\n transitionDuration: \"0s\",\n },\n },\n title: {\n paddingInlineEnd: \"xxlarge\",\n },\n closeTrigger: {\n position: \"absolute\",\n top: \"xxsmall\",\n right: \"xxsmall\",\n },\n description: {\n paddingInlineEnd: \"xxlarge\",\n },\n },\n defaultVariants: {\n variant: \"light\",\n },\n variants: {\n variant: {\n light: {\n root: {\n background: \"surface.brand.1.moderate\",\n color: \"text.default\",\n },\n },\n dark: {\n root: {\n background: \"surface.brand.1.strong\",\n color: \"text.onAction\",\n },\n },\n },\n },\n});\n\nconst { withProvider, withContext } = createStyleContext(toastRecipe);\n\nexport type ToastRootVariantProps = NonNullable<RecipeVariantProps<typeof toastRecipe>>;\n\nexport interface ToastRootProps extends Toast.RootProps, StyledProps, ToastRootVariantProps {}\nexport const ToastRoot = withProvider(Toast.Root, \"root\", { baseComponent: true });\n\nexport const ToastActionTrigger = withContext(Toast.ActionTrigger, \"actionTrigger\", { baseComponent: true });\n\nexport const ToastCloseTrigger = withContext(Toast.CloseTrigger, \"closeTrigger\", { baseComponent: true });\n\nconst InternalToastDescription = withContext(Toast.Description, \"description\");\n\ninterface ToastDescriptionProps\n extends Omit<Toast.DescriptionProps, \"color\">, TextProps, StyledProps, RefAttributes<HTMLDivElement> {}\n\nexport const ToastDescription = ({ textStyle = \"label.medium\", children, ...props }: ToastDescriptionProps) => (\n <InternalToastDescription asChild>\n <Text asChild consumeCss textStyle={textStyle} {...props}>\n <div>{children}</div>\n </Text>\n </InternalToastDescription>\n);\n\nconst InternalToastTitle = withContext(Toast.Title, \"title\");\n\ninterface ToastTitleProps\n extends Omit<Toast.TitleProps, \"color\">, TextProps, StyledProps, RefAttributes<HTMLDivElement> {}\n\nexport const ToastTitle = ({\n textStyle = \"label.medium\",\n fontWeight = \"semibold\",\n children,\n ...props\n}: ToastTitleProps) => (\n <InternalToastTitle asChild>\n <Text asChild consumeCss fontWeight={fontWeight} textStyle={textStyle} {...props}>\n <div>{children}</div>\n </Text>\n </InternalToastTitle>\n);\n"],"mappings":";;;;;;;;;;;;;AAyEA,MAAM,EAAE,cAAc,gBAAgB,mBA1DlB,IAAI;CACtB,OAAO,aAAa,MAAM;CAC1B,MAAM;EACJ,MAAM;GACJ,UAAU;GACV,cAAc;GACd,WAAW;GACX,UAAU;GACV,UAAU;GACV,QAAQ;GACR,SAAS;GACT,cAAc;GACd,SAAS;GACT,OAAO;GACP,WAAW;GACX,YAAY;GACZ,QAAQ;GACR,oBAAoB;GACpB,oBAAoB;GACpB,0BAA0B;GAC1B,eAAe;IACb,YAAY;IACZ,oBAAoB;IACrB;GACF;EACD,OAAO,EACL,kBAAkB,WACnB;EACD,cAAc;GACZ,UAAU;GACV,KAAK;GACL,OAAO;GACR;EACD,aAAa,EACX,kBAAkB,WACnB;EACF;CACD,iBAAiB,EACf,SAAS,SACV;CACD,UAAU,EACR,SAAS;EACP,OAAO,EACL,MAAM;GACJ,YAAY;GACZ,OAAO;GACR,EACF;EACD,MAAM,EACJ,MAAM;GACJ,YAAY;GACZ,OAAO;GACR,EACF;EACF,EACF;CACF,CAAC,CAEmE;AAKrE,MAAa,YAAY,aAAa,MAAM,MAAM,QAAQ,EAAE,eAAe,MAAM,CAAC;AAElF,MAAa,qBAAqB,YAAY,MAAM,eAAe,iBAAiB,EAAE,eAAe,MAAM,CAAC;AAE5G,MAAa,oBAAoB,YAAY,MAAM,cAAc,gBAAgB,EAAE,eAAe,MAAM,CAAC;AAEzG,MAAM,2BAA2B,YAAY,MAAM,aAAa,cAAc;AAK9E,MAAa,oBAAoB,EAAE,YAAY,gBAAgB,UAAU,GAAG,YAC1E,oBAAC,0BAAD;CAA0B,SAAA;WACxB,oBAAC,MAAD;EAAM,SAAA;EAAQ,YAAA;EAAsB;EAAW,GAAI;YACjD,oBAAC,OAAD,EAAM,UAAe,CAAA;EAChB,CAAA;CACkB,CAAA;AAG7B,MAAM,qBAAqB,YAAY,MAAM,OAAO,QAAQ;AAK5D,MAAa,cAAc,EACzB,YAAY,gBACZ,aAAa,YACb,UACA,GAAG,YAEH,oBAAC,oBAAD;CAAoB,SAAA;WAClB,oBAAC,MAAD;EAAM,SAAA;EAAQ,YAAA;EAAuB;EAAuB;EAAW,GAAI;YACzE,oBAAC,OAAD,EAAM,UAAe,CAAA;EAChB,CAAA;CACY,CAAA"}
@@ -1,7 +1,6 @@
1
1
  import { ToggleGroup, toggleGroupAnatomy } from "@ark-ui/react";
2
2
  import { sva } from "@ndla/styled-system/css";
3
3
  import { createStyleContext } from "@ndla/styled-system/jsx";
4
-
5
4
  //#region src/ToggleGroup.tsx
6
5
  /**
7
6
  * Copyright (c) 2024-present, NDLA.
@@ -20,7 +19,7 @@ const { withProvider, withContext } = createStyleContext(sva({
20
19
  }));
21
20
  const ToggleGroupRoot = withProvider(ToggleGroup.Root, "root", { baseComponent: true });
22
21
  const ToggleGroupItem = withContext(ToggleGroup.Item, "item", { baseComponent: true });
23
-
24
22
  //#endregion
25
23
  export { ToggleGroupItem, ToggleGroupRoot };
24
+
26
25
  //# sourceMappingURL=ToggleGroup.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ToggleGroup.mjs","names":[],"sources":["../src/ToggleGroup.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 { toggleGroupAnatomy, ToggleGroup } 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\";\n\nconst toggleGroupRecipe = sva({\n slots: toggleGroupAnatomy.keys(),\n base: {\n root: {\n display: \"flex\",\n flexDirection: \"row\",\n gap: \"4xsmall\",\n },\n },\n});\n\nconst { withProvider, withContext } = createStyleContext(toggleGroupRecipe);\n\nexport type ToggleGroupVariantProps = NonNullable<RecipeVariantProps<typeof toggleGroupRecipe>>;\nexport interface ToggleGroupRootProps extends ToggleGroup.RootProps, StyledProps, ToggleGroupVariantProps {}\n\nexport const ToggleGroupRoot = withProvider(ToggleGroup.Root, \"root\", { baseComponent: true });\n\nexport interface ToggleGroupItemProps extends ToggleGroup.ItemProps, StyledProps {}\n\nexport const ToggleGroupItem = withContext(ToggleGroup.Item, \"item\", { baseComponent: true });\n"],"mappings":";;;;;;;;;;;;AAwBA,MAAM,EAAE,cAAc,gBAAgB,mBAXZ,IAAI;CAC5B,OAAO,mBAAmB,MAAM;CAChC,MAAM,EACJ,MAAM;EACJ,SAAS;EACT,eAAe;EACf,KAAK;EACN,EACF;CACF,CAAC,CAEyE;AAK3E,MAAa,kBAAkB,aAAa,YAAY,MAAM,QAAQ,EAAE,eAAe,MAAM,CAAC;AAI9F,MAAa,kBAAkB,YAAY,YAAY,MAAM,QAAQ,EAAE,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"ToggleGroup.mjs","names":[],"sources":["../src/ToggleGroup.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 { toggleGroupAnatomy, ToggleGroup } 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\";\n\nconst toggleGroupRecipe = sva({\n slots: toggleGroupAnatomy.keys(),\n base: {\n root: {\n display: \"flex\",\n flexDirection: \"row\",\n gap: \"4xsmall\",\n },\n },\n});\n\nconst { withProvider, withContext } = createStyleContext(toggleGroupRecipe);\n\nexport type ToggleGroupVariantProps = NonNullable<RecipeVariantProps<typeof toggleGroupRecipe>>;\nexport interface ToggleGroupRootProps extends ToggleGroup.RootProps, StyledProps, ToggleGroupVariantProps {}\n\nexport const ToggleGroupRoot = withProvider(ToggleGroup.Root, \"root\", { baseComponent: true });\n\nexport interface ToggleGroupItemProps extends ToggleGroup.ItemProps, StyledProps {}\n\nexport const ToggleGroupItem = withContext(ToggleGroup.Item, \"item\", { baseComponent: true });\n"],"mappings":";;;;;;;;;;;AAwBA,MAAM,EAAE,cAAc,gBAAgB,mBAXZ,IAAI;CAC5B,OAAO,mBAAmB,MAAM;CAChC,MAAM,EACJ,MAAM;EACJ,SAAS;EACT,eAAe;EACf,KAAK;EACN,EACF;CACF,CAAC,CAEyE;AAK3E,MAAa,kBAAkB,aAAa,YAAY,MAAM,QAAQ,EAAE,eAAe,MAAM,CAAC;AAI9F,MAAa,kBAAkB,YAAY,YAAY,MAAM,QAAQ,EAAE,eAAe,MAAM,CAAC"}
package/es/Tooltip.mjs CHANGED
@@ -3,7 +3,6 @@ import { sva } from "@ndla/styled-system/css";
3
3
  import { createStyleContext } from "@ndla/styled-system/jsx";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  import { forwardRef } from "react";
6
-
7
6
  //#region src/Tooltip.tsx
8
7
  /**
9
8
  * Copyright (c) 2024-present, NDLA.
@@ -43,7 +42,7 @@ const TooltipContent = forwardRef(({ children, ...props }, ref) => /* @__PURE__
43
42
  }) }));
44
43
  const TooltipPositioner = withContext(Tooltip.Positioner, "positioner", { baseComponent: true });
45
44
  const TooltipTrigger = withContext(Tooltip.Trigger, "trigger", { baseComponent: true });
46
-
47
45
  //#endregion
48
46
  export { TooltipArrow, TooltipArrowTip, TooltipContent, TooltipContentStandalone, TooltipPositioner, TooltipRoot, TooltipTrigger };
47
+
49
48
  //# sourceMappingURL=Tooltip.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.mjs","names":[],"sources":["../src/Tooltip.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 { Tooltip, tooltipAnatomy } 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\";\n\nconst tooltipRecipe = sva({\n slots: tooltipAnatomy.keys(),\n base: {\n content: {\n background: \"surface.action\",\n textStyle: \"label.small\",\n color: \"text.onAction\",\n paddingInline: \"xxsmall\",\n paddingBlock: \"4xsmall\",\n \"--arrow-size\": \"spacing.xxsmall\",\n \"--arrow-background\": \"colors.surface.action\",\n _open: {\n animation: \"fade-shift-in 0.2s ease-out\",\n _motionReduce: {\n animation: \"none\",\n },\n },\n _closed: {\n animation: \"fade-shift-out 0.2s ease-out\",\n _motionReduce: {\n animation: \"none\",\n },\n },\n },\n },\n});\n\nconst { withRootProvider, withContext } = createStyleContext(tooltipRecipe);\n\nexport type TooltipRootProps = Tooltip.RootProps;\nexport const TooltipRoot = withRootProvider(Tooltip.Root);\n\nexport const TooltipArrow = withContext(Tooltip.Arrow, \"arrow\", { baseComponent: true });\n\nexport const TooltipArrowTip = withContext(Tooltip.ArrowTip, \"arrowTip\", { baseComponent: true });\n\nexport const TooltipContentStandalone = withContext(Tooltip.Content, \"content\", { baseComponent: true });\n\ninterface TooltipContentProps extends Tooltip.ContentProps, StyledProps {}\n\nexport const TooltipContent = forwardRef<HTMLDivElement, TooltipContentProps>(({ children, ...props }, ref) => (\n <TooltipPositioner>\n <TooltipContentStandalone {...props} ref={ref}>\n <TooltipArrow>\n <TooltipArrowTip />\n </TooltipArrow>\n {children}\n </TooltipContentStandalone>\n </TooltipPositioner>\n));\n\nexport const TooltipPositioner = withContext(Tooltip.Positioner, \"positioner\", { baseComponent: true });\n\nexport const TooltipTrigger = withContext(Tooltip.Trigger, \"trigger\", { baseComponent: true });\n"],"mappings":";;;;;;;;;;;;;;AAyCA,MAAM,EAAE,kBAAkB,gBAAgB,mBA3BpB,IAAI;CACxB,OAAO,eAAe,MAAM;CAC5B,MAAM,EACJ,SAAS;EACP,YAAY;EACZ,WAAW;EACX,OAAO;EACP,eAAe;EACf,cAAc;EACd,gBAAgB;EAChB,sBAAsB;EACtB,OAAO;GACL,WAAW;GACX,eAAe,EACb,WAAW,QACZ;GACF;EACD,SAAS;GACP,WAAW;GACX,eAAe,EACb,WAAW,QACZ;GACF;EACF,EACF;CACF,CAAC,CAEyE;AAG3E,MAAa,cAAc,iBAAiB,QAAQ,KAAK;AAEzD,MAAa,eAAe,YAAY,QAAQ,OAAO,SAAS,EAAE,eAAe,MAAM,CAAC;AAExF,MAAa,kBAAkB,YAAY,QAAQ,UAAU,YAAY,EAAE,eAAe,MAAM,CAAC;AAEjG,MAAa,2BAA2B,YAAY,QAAQ,SAAS,WAAW,EAAE,eAAe,MAAM,CAAC;AAIxG,MAAa,iBAAiB,YAAiD,EAAE,UAAU,GAAG,SAAS,QACrG,oBAAC,+BACC,qBAAC;CAAyB,GAAI;CAAY;YACxC,oBAAC,0BACC,oBAAC,oBAAkB,GACN,EACd;EACwB,GACT,CACpB;AAEF,MAAa,oBAAoB,YAAY,QAAQ,YAAY,cAAc,EAAE,eAAe,MAAM,CAAC;AAEvG,MAAa,iBAAiB,YAAY,QAAQ,SAAS,WAAW,EAAE,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Tooltip.mjs","names":[],"sources":["../src/Tooltip.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 { Tooltip, tooltipAnatomy } 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\";\n\nconst tooltipRecipe = sva({\n slots: tooltipAnatomy.keys(),\n base: {\n content: {\n background: \"surface.action\",\n textStyle: \"label.small\",\n color: \"text.onAction\",\n paddingInline: \"xxsmall\",\n paddingBlock: \"4xsmall\",\n \"--arrow-size\": \"spacing.xxsmall\",\n \"--arrow-background\": \"colors.surface.action\",\n _open: {\n animation: \"fade-shift-in 0.2s ease-out\",\n _motionReduce: {\n animation: \"none\",\n },\n },\n _closed: {\n animation: \"fade-shift-out 0.2s ease-out\",\n _motionReduce: {\n animation: \"none\",\n },\n },\n },\n },\n});\n\nconst { withRootProvider, withContext } = createStyleContext(tooltipRecipe);\n\nexport type TooltipRootProps = Tooltip.RootProps;\nexport const TooltipRoot = withRootProvider(Tooltip.Root);\n\nexport const TooltipArrow = withContext(Tooltip.Arrow, \"arrow\", { baseComponent: true });\n\nexport const TooltipArrowTip = withContext(Tooltip.ArrowTip, \"arrowTip\", { baseComponent: true });\n\nexport const TooltipContentStandalone = withContext(Tooltip.Content, \"content\", { baseComponent: true });\n\ninterface TooltipContentProps extends Tooltip.ContentProps, StyledProps {}\n\nexport const TooltipContent = forwardRef<HTMLDivElement, TooltipContentProps>(({ children, ...props }, ref) => (\n <TooltipPositioner>\n <TooltipContentStandalone {...props} ref={ref}>\n <TooltipArrow>\n <TooltipArrowTip />\n </TooltipArrow>\n {children}\n </TooltipContentStandalone>\n </TooltipPositioner>\n));\n\nexport const TooltipPositioner = withContext(Tooltip.Positioner, \"positioner\", { baseComponent: true });\n\nexport const TooltipTrigger = withContext(Tooltip.Trigger, \"trigger\", { baseComponent: true });\n"],"mappings":";;;;;;;;;;;;;AAyCA,MAAM,EAAE,kBAAkB,gBAAgB,mBA3BpB,IAAI;CACxB,OAAO,eAAe,MAAM;CAC5B,MAAM,EACJ,SAAS;EACP,YAAY;EACZ,WAAW;EACX,OAAO;EACP,eAAe;EACf,cAAc;EACd,gBAAgB;EAChB,sBAAsB;EACtB,OAAO;GACL,WAAW;GACX,eAAe,EACb,WAAW,QACZ;GACF;EACD,SAAS;GACP,WAAW;GACX,eAAe,EACb,WAAW,QACZ;GACF;EACF,EACF;CACF,CAAC,CAEyE;AAG3E,MAAa,cAAc,iBAAiB,QAAQ,KAAK;AAEzD,MAAa,eAAe,YAAY,QAAQ,OAAO,SAAS,EAAE,eAAe,MAAM,CAAC;AAExF,MAAa,kBAAkB,YAAY,QAAQ,UAAU,YAAY,EAAE,eAAe,MAAM,CAAC;AAEjG,MAAa,2BAA2B,YAAY,QAAQ,SAAS,WAAW,EAAE,eAAe,MAAM,CAAC;AAIxG,MAAa,iBAAiB,YAAiD,EAAE,UAAU,GAAG,SAAS,QACrG,oBAAC,mBAAD,EAAA,UACE,qBAAC,0BAAD;CAA0B,GAAI;CAAY;WAA1C,CACE,oBAAC,cAAD,EAAA,UACE,oBAAC,iBAAD,EAAmB,CAAA,EACN,CAAA,EACd,SACwB;IACT,CAAA,CACpB;AAEF,MAAa,oBAAoB,YAAY,QAAQ,YAAY,cAAc,EAAE,eAAe,MAAM,CAAC;AAEvG,MAAa,iBAAiB,YAAY,QAAQ,SAAS,WAAW,EAAE,eAAe,MAAM,CAAC"}
package/es/Tree/Tree.mjs CHANGED
@@ -4,7 +4,6 @@ import { sva } from "@ndla/styled-system/css";
4
4
  import { createStyleContext } from "@ndla/styled-system/jsx";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  import { forwardRef } from "react";
7
-
8
7
  //#region src/Tree/Tree.tsx
9
8
  /**
10
9
  * Copyright (c) 2024-present, NDLA.
@@ -142,7 +141,7 @@ const createTreeCollection$1 = createTreeCollection;
142
141
  const TreeNodeProvider = TreeView.NodeProvider;
143
142
  const TreeNodeContext = TreeView.NodeContext;
144
143
  const useTreeView$1 = useTreeView;
145
-
146
144
  //#endregion
147
145
  export { Tree, TreeBranch, TreeBranchContent, TreeBranchControl, TreeBranchIndicator, TreeBranchText, TreeBranchTrigger, TreeItem, TreeItemIndicator, TreeItemText, TreeLabel, TreeNodeContext, TreeNodeProvider, TreeRoot, TreeRootProvider, createTreeCollection$1 as createTreeCollection, useTreeView$1 as useTreeView };
146
+
148
147
  //# sourceMappingURL=Tree.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tree.mjs","names":["createTreeCollection","_createTreeCollection","useTreeView","_useTreeView"],"sources":["../../src/Tree/Tree.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 {\n TreeView,\n treeViewAnatomy,\n type TreeNode,\n createTreeCollection as _createTreeCollection,\n useTreeView as _useTreeView,\n} 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, type ElementType, type RefAttributes } from \"react\";\nimport { Text, type TextProps } from \"../Text\";\n\nconst treeRecipe = sva({\n slots: treeViewAnatomy.keys(),\n base: {\n root: {\n width: \"100%\",\n },\n branch: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"3xsmall\",\n },\n branchContent: {\n position: \"relative\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"3xsmall\",\n },\n branchControl: {\n display: \"flex\",\n alignItems: \"center\",\n gap: \"3xsmall\",\n borderRadius: \"xsmall\",\n height: \"xxlarge\",\n cursor: \"pointer\",\n paddingInlineStart: \"calc((var(--depth) - 1) * token(spacing.medium))\",\n paddingInlineEnd: \"xsmall\",\n paddingBlock: \"xsmall\",\n transitionDuration: \"normal\",\n transitionProperty: \"background, color\",\n transitionTimingFunction: \"default\",\n _hover: {\n background: \"surface.hover\",\n },\n _selected: {\n background: \"surface.selected\",\n },\n },\n branchIndicator: {\n transformOrigin: \"center\",\n transitionDuration: \"normal\",\n transitionProperty: \"transform\",\n transitionTimingFunction: \"default\",\n _open: {\n transform: \"rotate(90deg)\",\n },\n },\n item: {\n display: \"flex\",\n cursor: \"pointer\",\n position: \"relative\",\n borderRadius: \"xsmall\",\n justifyContent: \"space-between\",\n paddingBlock: \"xsmall\",\n paddingInlineEnd: \"xsmall\",\n paddingInlineStart:\n \"calc(((var(--depth) - 1) * token(spacing.medium)) + token(spacing.xxlarge) + token(spacing.3xsmall))\",\n transitionDuration: \"normal\",\n transitionProperty: \"background, color\",\n transitionTimingFunction: \"default\",\n height: \"xxlarge\",\n alignItems: \"center\",\n\n _hover: {\n background: \"surface.hover\",\n },\n _selected: {\n background: \"surface.selected\",\n _hover: {\n background: \"surface.hover\",\n },\n },\n },\n itemIndicator: {\n color: \"icon.strong\",\n },\n itemText: {\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n },\n branchText: {\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n },\n tree: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"3xsmall\",\n },\n },\n});\n\nconst { withProvider, withContext } = createStyleContext(treeRecipe);\n\nexport interface TreeRootProps<T extends TreeNode = TreeNode>\n extends TreeView.RootProps<T>, StyledProps, RefAttributes<HTMLDivElement> {}\n\nconst InternalTreeRoot = withProvider<ElementType<TreeRootProps>>(TreeView.Root, \"root\", { baseComponent: true });\n\nexport const TreeRoot = <T extends TreeNode = TreeNode>(props: TreeRootProps<T>) => <InternalTreeRoot {...props} />;\n\nexport interface TreeRootProviderProps<T extends TreeNode = TreeNode>\n extends TreeView.RootProviderProps<T>, StyledProps {}\n\nconst InternalTreeRootProvider = withProvider<ElementType<TreeRootProviderProps>>(TreeView.RootProvider, \"root\", {\n baseComponent: true,\n});\n\nexport const TreeRootProvider = <T extends TreeNode = TreeNode>(props: TreeRootProviderProps<T>) => (\n <InternalTreeRootProvider {...props} />\n);\n\nexport const TreeBranchContent = withContext(TreeView.BranchContent, \"branchContent\", { baseComponent: true });\n\nexport const TreeBranchControl = withContext(TreeView.BranchControl, \"branchControl\", { baseComponent: true });\n\nexport const TreeBranchIndicator = withContext(TreeView.BranchIndicator, \"branchIndicator\", { baseComponent: true });\n\nexport const TreeBranch = withContext(TreeView.Branch, \"branch\", {\n baseComponent: true,\n});\n\nconst InternalTreeBranchText = withContext(TreeView.BranchText, \"branchText\", { baseComponent: true });\n\ninterface TreeBranchTextProps\n extends Omit<TreeView.BranchTextProps, \"color\">, TextProps, StyledProps, RefAttributes<HTMLDivElement> {}\n\nexport const TreeBranchText = forwardRef<HTMLDivElement, TreeBranchTextProps>(\n ({ textStyle = \"label.medium\", fontWeight = \"bold\", children, ...props }, ref) => (\n <InternalTreeBranchText asChild {...props} ref={ref}>\n <Text textStyle={textStyle} fontWeight={fontWeight} asChild consumeCss>\n <div>{children}</div>\n </Text>\n </InternalTreeBranchText>\n ),\n);\n\nexport const TreeBranchTrigger = withContext(TreeView.BranchTrigger, \"branchTrigger\", { baseComponent: true });\n\nexport const TreeItemIndicator = withContext(TreeView.ItemIndicator, \"itemIndicator\", { baseComponent: true });\n\nexport const TreeItem = withContext(TreeView.Item, \"item\", { baseComponent: true });\n\nconst InternalTreeItemText = withContext(TreeView.ItemText, \"itemText\", { baseComponent: true });\n\ninterface TreeItemTextProps\n extends Omit<TreeView.ItemTextProps, \"color\">, TextProps, StyledProps, RefAttributes<HTMLDivElement> {}\n\nexport const TreeItemText = forwardRef<HTMLDivElement, TreeItemTextProps>(\n ({ textStyle = \"label.medium\", fontWeight = \"bold\", children, ...props }, ref) => (\n <InternalTreeItemText asChild {...props} ref={ref}>\n <Text textStyle={textStyle} fontWeight={fontWeight} asChild consumeCss>\n <div>{children}</div>\n </Text>\n </InternalTreeItemText>\n ),\n);\n\nconst InternalTreeLabel = withContext(TreeView.Label, \"label\", { baseComponent: true });\n\ninterface TreeLabelProps\n extends Omit<TreeView.LabelProps, \"color\">, TextProps, StyledProps, RefAttributes<HTMLDivElement> {}\n\nexport const TreeLabel = forwardRef<HTMLDivElement, TreeLabelProps>(\n ({ children, textStyle = \"label.medium\", fontWeight = \"bold\", ...props }, ref) => (\n <InternalTreeLabel asChild {...props} ref={ref}>\n <Text textStyle={textStyle} fontWeight={fontWeight} asChild consumeCss>\n <div>{children}</div>\n </Text>\n </InternalTreeLabel>\n ),\n);\n\nexport const Tree = withContext(TreeView.Tree, \"tree\", { baseComponent: true });\n\nexport const createTreeCollection = _createTreeCollection;\n\nexport const TreeNodeProvider = TreeView.NodeProvider;\nexport const TreeNodeContext = TreeView.NodeContext;\nexport const useTreeView = _useTreeView;\n"],"mappings":";;;;;;;;;;;;;;;AAgHA,MAAM,EAAE,cAAc,gBAAgB,mBA3FnB,IAAI;CACrB,OAAO,gBAAgB,MAAM;CAC7B,MAAM;EACJ,MAAM,EACJ,OAAO,QACR;EACD,QAAQ;GACN,SAAS;GACT,eAAe;GACf,KAAK;GACN;EACD,eAAe;GACb,UAAU;GACV,SAAS;GACT,eAAe;GACf,KAAK;GACN;EACD,eAAe;GACb,SAAS;GACT,YAAY;GACZ,KAAK;GACL,cAAc;GACd,QAAQ;GACR,QAAQ;GACR,oBAAoB;GAC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eCollection","useTreeView","_useTreeView"],"sources":["../../src/Tree/Tree.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 {\n TreeView,\n treeViewAnatomy,\n type TreeNode,\n createTreeCollection as _createTreeCollection,\n useTreeView as _useTreeView,\n} 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, type ElementType, type RefAttributes } from \"react\";\nimport { Text, type TextProps } from \"../Text\";\n\nconst treeRecipe = sva({\n slots: treeViewAnatomy.keys(),\n base: {\n root: {\n width: \"100%\",\n },\n branch: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"3xsmall\",\n },\n branchContent: {\n position: \"relative\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"3xsmall\",\n },\n branchControl: {\n display: \"flex\",\n alignItems: \"center\",\n gap: \"3xsmall\",\n borderRadius: \"xsmall\",\n height: \"xxlarge\",\n cursor: \"pointer\",\n paddingInlineStart: \"calc((var(--depth) - 1) * token(spacing.medium))\",\n paddingInlineEnd: \"xsmall\",\n paddingBlock: \"xsmall\",\n transitionDuration: \"normal\",\n transitionProperty: \"background, color\",\n transitionTimingFunction: \"default\",\n _hover: {\n background: \"surface.hover\",\n },\n _selected: {\n background: \"surface.selected\",\n },\n },\n branchIndicator: {\n transformOrigin: \"center\",\n transitionDuration: \"normal\",\n transitionProperty: \"transform\",\n transitionTimingFunction: \"default\",\n _open: {\n transform: \"rotate(90deg)\",\n },\n },\n item: {\n display: \"flex\",\n cursor: \"pointer\",\n position: \"relative\",\n borderRadius: \"xsmall\",\n justifyContent: \"space-between\",\n paddingBlock: \"xsmall\",\n paddingInlineEnd: \"xsmall\",\n paddingInlineStart:\n \"calc(((var(--depth) - 1) * token(spacing.medium)) + token(spacing.xxlarge) + token(spacing.3xsmall))\",\n transitionDuration: \"normal\",\n transitionProperty: \"background, color\",\n transitionTimingFunction: \"default\",\n height: \"xxlarge\",\n alignItems: \"center\",\n\n _hover: {\n background: \"surface.hover\",\n },\n _selected: {\n background: \"surface.selected\",\n _hover: {\n background: \"surface.hover\",\n },\n },\n },\n itemIndicator: {\n color: \"icon.strong\",\n },\n itemText: {\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n },\n branchText: {\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n },\n tree: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"3xsmall\",\n },\n },\n});\n\nconst { withProvider, withContext } = createStyleContext(treeRecipe);\n\nexport interface TreeRootProps<T extends TreeNode = TreeNode>\n extends TreeView.RootProps<T>, StyledProps, RefAttributes<HTMLDivElement> {}\n\nconst InternalTreeRoot = withProvider<ElementType<TreeRootProps>>(TreeView.Root, \"root\", { baseComponent: true });\n\nexport const TreeRoot = <T extends TreeNode = TreeNode>(props: TreeRootProps<T>) => <InternalTreeRoot {...props} />;\n\nexport interface TreeRootProviderProps<T extends TreeNode = TreeNode>\n extends TreeView.RootProviderProps<T>, StyledProps {}\n\nconst InternalTreeRootProvider = withProvider<ElementType<TreeRootProviderProps>>(TreeView.RootProvider, \"root\", {\n baseComponent: true,\n});\n\nexport const TreeRootProvider = <T extends TreeNode = TreeNode>(props: TreeRootProviderProps<T>) => (\n <InternalTreeRootProvider {...props} />\n);\n\nexport const TreeBranchContent = withContext(TreeView.BranchContent, \"branchContent\", { baseComponent: true });\n\nexport const TreeBranchControl = withContext(TreeView.BranchControl, \"branchControl\", { baseComponent: true });\n\nexport const TreeBranchIndicator = withContext(TreeView.BranchIndicator, \"branchIndicator\", { baseComponent: true });\n\nexport const TreeBranch = withContext(TreeView.Branch, \"branch\", {\n baseComponent: true,\n});\n\nconst InternalTreeBranchText = withContext(TreeView.BranchText, \"branchText\", { baseComponent: true });\n\ninterface TreeBranchTextProps\n extends Omit<TreeView.BranchTextProps, \"color\">, TextProps, StyledProps, RefAttributes<HTMLDivElement> {}\n\nexport const TreeBranchText = forwardRef<HTMLDivElement, TreeBranchTextProps>(\n ({ textStyle = \"label.medium\", fontWeight = \"bold\", children, ...props }, ref) => (\n <InternalTreeBranchText asChild {...props} ref={ref}>\n <Text textStyle={textStyle} fontWeight={fontWeight} asChild consumeCss>\n <div>{children}</div>\n </Text>\n </InternalTreeBranchText>\n ),\n);\n\nexport const TreeBranchTrigger = withContext(TreeView.BranchTrigger, \"branchTrigger\", { baseComponent: true });\n\nexport const TreeItemIndicator = withContext(TreeView.ItemIndicator, \"itemIndicator\", { baseComponent: true });\n\nexport const TreeItem = withContext(TreeView.Item, \"item\", { baseComponent: true });\n\nconst InternalTreeItemText = withContext(TreeView.ItemText, \"itemText\", { baseComponent: true });\n\ninterface TreeItemTextProps\n extends Omit<TreeView.ItemTextProps, \"color\">, TextProps, StyledProps, RefAttributes<HTMLDivElement> {}\n\nexport const TreeItemText = forwardRef<HTMLDivElement, TreeItemTextProps>(\n ({ textStyle = \"label.medium\", fontWeight = \"bold\", children, ...props }, ref) => (\n <InternalTreeItemText asChild {...props} ref={ref}>\n <Text textStyle={textStyle} fontWeight={fontWeight} asChild consumeCss>\n <div>{children}</div>\n </Text>\n </InternalTreeItemText>\n ),\n);\n\nconst InternalTreeLabel = withContext(TreeView.Label, \"label\", { baseComponent: true });\n\ninterface TreeLabelProps\n extends Omit<TreeView.LabelProps, \"color\">, TextProps, StyledProps, RefAttributes<HTMLDivElement> {}\n\nexport const TreeLabel = forwardRef<HTMLDivElement, TreeLabelProps>(\n ({ children, textStyle = \"label.medium\", fontWeight = \"bold\", ...props }, ref) => (\n <InternalTreeLabel asChild {...props} ref={ref}>\n <Text textStyle={textStyle} fontWeight={fontWeight} asChild consumeCss>\n <div>{children}</div>\n </Text>\n </InternalTreeLabel>\n ),\n);\n\nexport const Tree = withContext(TreeView.Tree, \"tree\", { baseComponent: true });\n\nexport const createTreeCollection = _createTreeCollection;\n\nexport const TreeNodeProvider = TreeView.NodeProvider;\nexport const TreeNodeContext = TreeView.NodeContext;\nexport const useTreeView = _useTreeView;\n"],"mappings":";;;;;;;;;;;;;;AAgHA,MAAM,EAAE,cAAc,gBAAgB,mBA3FnB,IAAI;CACrB,OAAO,gBAAgB,MAAM;CAC7B,MAAM;EACJ,MAAM,EACJ,OAAO,QACR;EACD,QAAQ;GACN,SAAS;GACT,eAAe;GACf,KAAK;GACN;EACD,eAAe;GACb,UAAU;GACV,SAAS;GACT,eAAe;GACf,KAAK;GACN;EACD,eAAe;GACb,SAAS;GACT,YAAY;GACZ,KAAK;GACL,cAAc;GACd,QAAQ;GACR,QAAQ;GACR,oBAAoB;GACpB,kBAAkB;GAClB,cAAc;GACd,oBAAoB;GACpB,oBAAoB;GACpB,0BAA0B;GAC1B,QAAQ,EACN,YAAY,iBACb;GACD,WAAW,EACT,YAAY,oBACb;GACF;EACD,iBAAiB;GACf,iBAAiB;GACjB,oBAAoB;GACpB,oBAAoB;GACpB,0BAA0B;GAC1B,OAAO,EACL,WAAW,iBACZ;GACF;EACD,MAAM;GACJ,SAAS;GACT,QAAQ;GACR,UAAU;GACV,cAAc;GACd,gBAAgB;GAChB,cAAc;GACd,kBAAkB;GAClB,oBACE;GACF,oBAAoB;GACpB,oBAAoB;GACpB,0BAA0B;GAC1B,QAAQ;GACR,YAAY;GAEZ,QAAQ,EACN,YAAY,iBACb;GACD,WAAW;IACT,YAAY;IACZ,QAAQ,EACN,YAAY,iBACb;IACF;GACF;EACD,eAAe,EACb,OAAO,eACR;EACD,UAAU;GACR,UAAU;GACV,cAAc;GACf;EACD,YAAY;GACV,UAAU;GACV,cAAc;GACf;EACD,MAAM;GACJ,SAAS;GACT,eAAe;GACf,KAAK;GACN;EACF;CACF,CAAC,CAEkE;AAKpE,MAAM,mBAAmB,aAAyC,SAAS,MAAM,QAAQ,EAAE,eAAe,MAAM,CAAC;AAEjH,MAAa,YAA2C,UAA4B,oBAAC,kBAAD,EAAkB,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AAA;EAAQ,YAAA;YAC1D,oBAAC,OAAD,EAAM,UAAe,CAAA;EAChB,CAAA;CACc,CAAA,CAE1B;AAED,MAAM,oBAAoB,YAAY,SAAS,OAAO,SAAS,EAAE,eAAe,MAAM,CAAC;AAKvF,MAAa,YAAY,YACtB,EAAE,UAAU,YAAY,gBAAgB,aAAa,QAAQ,GAAG,SAAS,QACxE,oBAAC,mBAAD;CAAmB,SAAA;CAAQ,GAAI;CAAY;WACzC,oBAAC,MAAD;EAAiB;EAAuB;EAAY,SAAA;EAAQ,YAAA;YAC1D,oBAAC,OAAD,EAAM,UAAe,CAAA;EAChB,CAAA;CACW,CAAA,CAEvB;AAED,MAAa,OAAO,YAAY,SAAS,MAAM,QAAQ,EAAE,eAAe,MAAM,CAAC;AAE/E,MAAaA,yBAAuBC;AAEpC,MAAa,mBAAmB,SAAS;AACzC,MAAa,kBAAkB,SAAS;AACxC,MAAaC,gBAAcC"}
package/es/index.mjs CHANGED
@@ -43,5 +43,4 @@ import { ToastActionTrigger, ToastCloseTrigger, ToastDescription, ToastRoot, Toa
43
43
  import { TooltipArrow, TooltipArrowTip, TooltipContent, TooltipContentStandalone, TooltipPositioner, TooltipRoot, TooltipTrigger } from "./Tooltip.mjs";
44
44
  import { Tree, TreeBranch, TreeBranchContent, TreeBranchControl, TreeBranchIndicator, TreeBranchText, TreeBranchTrigger, TreeItem, TreeItemIndicator, TreeItemText, TreeLabel, TreeNodeContext, TreeNodeProvider, TreeRoot, TreeRootProvider, createTreeCollection, useTreeView } from "./Tree/Tree.mjs";
45
45
  import { useFieldContext } from "@ark-ui/react";
46
-
47
- export { AccordionItem, AccordionItemContent, AccordionItemIndicator, AccordionItemTrigger, AccordionRoot, Badge, BleedPageContent, BlockQuote, Button, CardContent, CardHeading, CardImage, CardRoot, CheckboxControl, CheckboxGroup, CheckboxHiddenInput, CheckboxIndicator, CheckboxLabel, CheckboxRoot, ComboboxClearTrigger, ComboboxContent, ComboboxContentStandalone, ComboboxControl, ComboboxInput, ComboboxItem, ComboboxItemGroup, ComboboxItemGroupLabel, ComboboxItemIndicator, ComboboxItemText, ComboboxLabel, ComboboxList, ComboboxPositioner, ComboboxRoot, ComboboxTrigger, DatePickerClearTrigger, DatePickerContent, DatePickerContext, DatePickerControl, DatePickerInput, DatePickerLabel, DatePickerMonthSelect, DatePickerNextTrigger, DatePickerPositioner, DatePickerPresetTrigger, DatePickerPrevTrigger, DatePickerRangeText, DatePickerRoot, DatePickerStandaloneContent, DatePickerTable, DatePickerTableBody, DatePickerTableCell, DatePickerTableCellTrigger, DatePickerTableHead, DatePickerTableHeader, DatePickerTableRow, DatePickerTrigger, DatePickerView, DatePickerViewControl, DatePickerViewTrigger, DatePickerYearSelect, DefinitionList, DialogBackdrop, DialogBody, DialogCloseTrigger, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPositioner, DialogRoot, DialogRootProvider, DialogStandaloneContent, DialogTitle, DialogTrigger, ErrorMessageActions, ErrorMessageContent, ErrorMessageDescription, ErrorMessageRoot, ErrorMessageTitle, ExpandableBox, ExpandableBoxSummary, FieldErrorMessage, FieldHelper, FieldInput, FieldLabel, FieldRoot, FieldTextArea, FieldsetErrorText, FieldsetHelper, FieldsetLegend, FieldsetRoot, Figure, FileUploadContext, FileUploadDropzone, FileUploadHiddenInput, FileUploadItem, FileUploadItemDeleteTrigger, FileUploadItemGroup, FileUploadItemName, FileUploadItemPreview, FileUploadItemPreviewImage, FileUploadItemSizeText, FileUploadLabel, FileUploadRoot, FileUploadTrigger, FramedContent, Heading, Hero, HeroBackground, HeroContent, IconButton, Image, Img, Input, InputContainer, Label, Legend, ListItemContent, ListItemHeading, ListItemImage, ListItemRoot, MenuContent, MenuContentStandalone, MenuItem, MenuItemGroup, MenuItemGroupLabel, MenuItemText, MenuPositioner, MenuRoot, MenuSeparator, MenuTrigger, MenuTriggerItem, MessageBox, NdlaLogoEn, NdlaLogoNb, NdlaLogoText, OrderedList, PageContainer, PageContent, PaginationContext, PaginationEllipsis, PaginationItem, PaginationNextTrigger, PaginationPrevTrigger, PaginationRoot, Picture, PopoverAnchor, PopoverArrow, PopoverArrowStandalone, PopoverArrowTip, PopoverCloseTrigger, PopoverContent, PopoverContentStandalone, PopoverDescription, PopoverIndicator, PopoverPositioner, PopoverRoot, PopoverRootProvider, PopoverTitle, PopoverTrigger, RadioGroupIndicator, RadioGroupItem, RadioGroupItemControl, RadioGroupItemHiddenInput, RadioGroupItemText, RadioGroupLabel, RadioGroupRoot, SelectClearTrigger, SelectContent, SelectContentStandalone, SelectControl, SelectHiddenSelect, SelectIndicator, SelectItem, SelectItemGroup, SelectItemGroupLabel, SelectItemIndicator, SelectItemText, SelectLabel, SelectList, SelectPositioner, SelectRoot, SelectTrigger, SelectValueText, Skeleton, SliderControl, SliderHiddenInput, SliderLabel, SliderRange, SliderRoot, SliderThumb, SliderTrack, Spinner, SwitchControl, SwitchHiddenInput, SwitchLabel, SwitchRoot, SwitchThumb, Table, TabsContent, TabsIndicator, TabsList, TabsRoot, TabsTrigger, TagsInputClearTrigger, TagsInputControl, TagsInputInput, TagsInputItem, TagsInputItemDeleteTrigger, TagsInputItemInput, TagsInputItemPreview, TagsInputItemText, TagsInputLabel, TagsInputRoot, Text, TextArea, ToastActionTrigger, ToastCloseTrigger, ToastDescription, ToastRoot, ToastTitle, ToggleGroupItem, ToggleGroupRoot, TooltipArrow, TooltipArrowTip, TooltipContent, TooltipContentStandalone, TooltipPositioner, TooltipRoot, TooltipTrigger, Tree, TreeBranch, TreeBranchContent, TreeBranchControl, TreeBranchIndicator, TreeBranchText, TreeBranchTrigger, TreeItem, TreeItemIndicator, TreeItemText, TreeLabel, TreeNodeContext, TreeNodeProvider, TreeRoot, TreeRootProvider, UnOrderedList, buttonBaseRecipe, buttonRecipe, createTreeCollection, getSrcSet, iconButtonRecipe, makeSrcQueryString, useDialog, useFieldContext, usePopover, useTreeView };
46
+ export { AccordionItem, AccordionItemContent, AccordionItemIndicator, AccordionItemTrigger, AccordionRoot, Badge, BleedPageContent, BlockQuote, Button, CardContent, CardHeading, CardImage, CardRoot, CheckboxControl, CheckboxGroup, CheckboxHiddenInput, CheckboxIndicator, CheckboxLabel, CheckboxRoot, ComboboxClearTrigger, ComboboxContent, ComboboxContentStandalone, ComboboxControl, ComboboxInput, ComboboxItem, ComboboxItemGroup, ComboboxItemGroupLabel, ComboboxItemIndicator, ComboboxItemText, ComboboxLabel, ComboboxList, ComboboxPositioner, ComboboxRoot, ComboboxTrigger, DatePickerClearTrigger, DatePickerContent, DatePickerContext, DatePickerControl, DatePickerInput, DatePickerLabel, DatePickerMonthSelect, DatePickerNextTrigger, DatePickerPositioner, DatePickerPresetTrigger, DatePickerPrevTrigger, DatePickerRangeText, DatePickerRoot, DatePickerStandaloneContent, DatePickerTable, DatePickerTableBody, DatePickerTableCell, DatePickerTableCellTrigger, DatePickerTableHead, DatePickerTableHeader, DatePickerTableRow, DatePickerTrigger, DatePickerView, DatePickerViewControl, DatePickerViewTrigger, DatePickerYearSelect, DefinitionList, DialogBackdrop, DialogBody, DialogCloseTrigger, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPositioner, DialogRoot, DialogRootProvider, DialogStandaloneContent, DialogTitle, DialogTrigger, ErrorMessageActions, ErrorMessageContent, ErrorMessageDescription, ErrorMessageRoot, ErrorMessageTitle, ExpandableBox, ExpandableBoxSummary, FieldErrorMessage, FieldHelper, FieldInput, FieldLabel, FieldRoot, FieldTextArea, FieldsetErrorText, FieldsetHelper, FieldsetLegend, FieldsetRoot, Figure, FileUploadContext, FileUploadDropzone, FileUploadHiddenInput, FileUploadItem, FileUploadItemDeleteTrigger, FileUploadItemGroup, FileUploadItemName, FileUploadItemPreview, FileUploadItemPreviewImage, FileUploadItemSizeText, FileUploadLabel, FileUploadRoot, FileUploadTrigger, FramedContent, Heading, Hero, HeroBackground, HeroContent, IconButton, Image, Img, Input, InputContainer, Label, Legend, ListItemContent, ListItemHeading, ListItemImage, ListItemRoot, MenuContent, MenuContentStandalone, MenuItem, MenuItemGroup, MenuItemGroupLabel, MenuItemText, MenuPositioner, MenuRoot, MenuSeparator, MenuTrigger, MenuTriggerItem, MessageBox, NdlaLogoEn, NdlaLogoNb, NdlaLogoText, OrderedList, PageContainer, PageContent, PaginationContext, PaginationEllipsis, PaginationItem, PaginationNextTrigger, PaginationPrevTrigger, PaginationRoot, Picture, PopoverAnchor, PopoverArrow, PopoverArrowStandalone, PopoverArrowTip, PopoverCloseTrigger, PopoverContent, PopoverContentStandalone, PopoverDescription, PopoverIndicator, PopoverPositioner, PopoverRoot, PopoverRootProvider, PopoverTitle, PopoverTrigger, RadioGroupIndicator, RadioGroupItem, RadioGroupItemControl, RadioGroupItemHiddenInput, RadioGroupItemText, RadioGroupLabel, RadioGroupRoot, SelectClearTrigger, SelectContent, SelectContentStandalone, SelectControl, SelectHiddenSelect, SelectIndicator, SelectItem, SelectItemGroup, SelectItemGroupLabel, SelectItemIndicator, SelectItemText, SelectLabel, SelectList, SelectPositioner, SelectRoot, SelectTrigger, SelectValueText, Skeleton, SliderControl, SliderHiddenInput, SliderLabel, SliderRange, SliderRoot, SliderThumb, SliderTrack, Spinner, SwitchControl, SwitchHiddenInput, SwitchLabel, SwitchRoot, SwitchThumb, Table, TabsContent, TabsIndicator, TabsList, TabsRoot, TabsTrigger, TagsInputClearTrigger, TagsInputControl, TagsInputInput, TagsInputItem, TagsInputItemDeleteTrigger, TagsInputItemInput, TagsInputItemPreview, TagsInputItemText, TagsInputLabel, TagsInputRoot, Text, TextArea, ToastActionTrigger, ToastCloseTrigger, ToastDescription, ToastRoot, ToastTitle, ToggleGroupItem, ToggleGroupRoot, TooltipArrow, TooltipArrowTip, TooltipContent, TooltipContentStandalone, TooltipPositioner, TooltipRoot, TooltipTrigger, Tree, TreeBranch, TreeBranchContent, TreeBranchControl, TreeBranchIndicator, TreeBranchText, TreeBranchTrigger, TreeItem, TreeItemIndicator, TreeItemText, TreeLabel, TreeNodeContext, TreeNodeProvider, TreeRoot, TreeRootProvider, UnOrderedList, buttonBaseRecipe, buttonRecipe, createTreeCollection, getSrcSet, iconButtonRecipe, makeSrcQueryString, useDialog, useFieldContext, usePopover, useTreeView };
package/lib/Accordion.js CHANGED
@@ -2,7 +2,6 @@ let _ark_ui_react = require("@ark-ui/react");
2
2
  let _ndla_styled_system_css = require("@ndla/styled-system/css");
3
3
  let _ndla_styled_system_jsx = require("@ndla/styled-system/jsx");
4
4
  let react_jsx_runtime = require("react/jsx-runtime");
5
-
6
5
  //#region src/Accordion.tsx
7
6
  /**
8
7
  * Copyright (c) 2024-present, NDLA.
@@ -116,11 +115,11 @@ const AccordionItemContent = withContext(_ark_ui_react.Accordion.ItemContent, "i
116
115
  const AccordionItemIndicator = withContext(_ark_ui_react.Accordion.ItemIndicator, "itemIndicator", { baseComponent: true });
117
116
  const AccordionItem = withContext(_ark_ui_react.Accordion.Item, "item", { baseComponent: true });
118
117
  const AccordionItemTrigger = withContext(_ark_ui_react.Accordion.ItemTrigger, "itemTrigger", { baseComponent: true });
119
-
120
118
  //#endregion
121
119
  exports.AccordionItem = AccordionItem;
122
120
  exports.AccordionItemContent = AccordionItemContent;
123
121
  exports.AccordionItemIndicator = AccordionItemIndicator;
124
122
  exports.AccordionItemTrigger = AccordionItemTrigger;
125
123
  exports.AccordionRoot = AccordionRoot;
124
+
126
125
  //# sourceMappingURL=Accordion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.js","names":["accordionAnatomy","Accordion"],"sources":["../src/Accordion.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 { Accordion, accordionAnatomy } from \"@ark-ui/react\";\nimport { sva } from \"@ndla/styled-system/css\";\nimport { createStyleContext } from \"@ndla/styled-system/jsx\";\nimport type { RecipeVariantProps, StyledProps } from \"@ndla/styled-system/types\";\nimport type { RefAttributes } from \"react\";\n\nconst accordionRecipe = sva({\n slots: accordionAnatomy.keys(),\n base: {\n root: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"3xsmall\",\n },\n itemTrigger: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n background: \"surface.default\",\n cursor: \"pointer\",\n transitionDuration: \"fast\",\n transitionTimingFunction: \"default\",\n transitionProperty: \"background, border-color, border, border-radius\",\n _closed: {\n transitionProperty: \"background, border-color, border, border-radius\",\n },\n _disabled: {\n cursor: \"not-allowed\",\n background: \"surface.disabled.subtle\",\n boxShadowColor: \"stroke.disabled\",\n color: \"text.disabled\",\n _hover: {\n background: \"surface.disabled.subtle\",\n boxShadowColor: \"stroke.disabled\",\n color: \"text.disabled\",\n },\n },\n },\n itemIndicator: {\n color: \"icon.strong\",\n transformOrigin: \"center\",\n transitionDuration: \"normal\",\n transitionProperty: \"transform\",\n transitionTimingFunction: \"default\",\n _open: {\n transform: \"rotate(180deg)\",\n },\n _motionReduce: {\n transition: \"none\",\n transitionDuration: \"0s\",\n },\n },\n itemContent: {\n overflow: \"hidden\",\n // TODO: Is this needed?\n transitionProperty: \"padding-bottom\",\n transitionDuration: \"normal\",\n transitionTimingFunction: \"default\",\n paddingBlock: \"xsmall\",\n paddingInline: \"small\",\n _open: {\n animation: \"collapse-in\",\n _motionReduce: {\n animation: \"none\",\n },\n },\n _closed: {\n animation: \"collapse-out\",\n _motionReduce: {\n animation: \"none\",\n },\n },\n },\n item: {\n width: \"100%\",\n },\n },\n defaultVariants: {\n variant: \"bordered\",\n },\n variants: {\n variant: {\n clean: {},\n bordered: {\n itemTrigger: {\n paddingInline: \"medium\",\n paddingBlock: \"medium\",\n width: \"100%\",\n borderRadius: \"xsmall\",\n boxShadowColor: \"stroke.subtle\",\n boxShadow: \"inset 0 0 0 1px var(--shadow-color)\",\n _hover: {\n background: \"surface.actionSubtle.hover\",\n boxShadowColor: \"stroke.hover\",\n },\n _open: {\n background: \"surface.actionSubtle.active\",\n boxShadowColor: \"stroke.default\",\n borderBottomRadius: \"sharp\",\n },\n _focusVisible: {\n outline: \"none\",\n boxShadowColor: \"stroke.default\",\n boxShadow: \"inset 0 0 0 3px var(--shadow-color)\",\n },\n },\n itemContent: {\n borderBottomRadius: \"xsmall\",\n borderWidth: \"0 1px 1px\",\n borderStyle: \"solid\",\n borderColor: \"stroke.default\",\n },\n },\n },\n },\n});\n\nconst { withProvider, withContext } = createStyleContext(accordionRecipe);\n\nexport type AccordionVariantProps = NonNullable<RecipeVariantProps<typeof accordionRecipe>>;\n\nexport interface AccordionRootProps\n extends StyledProps, Accordion.RootProps, RefAttributes<HTMLDivElement>, AccordionVariantProps {}\n\nexport const InternalAccordionRoot = withProvider(Accordion.Root, \"root\", { baseComponent: true });\n\nexport const AccordionRoot = ({ lazyMount = true, unmountOnExit = true, ...props }: AccordionRootProps) => (\n <InternalAccordionRoot lazyMount={lazyMount} unmountOnExit={unmountOnExit} {...props} />\n);\n\nexport const AccordionItemContent = withContext(Accordion.ItemContent, \"itemContent\", { baseComponent: true });\n\nexport const AccordionItemIndicator = withContext(Accordion.ItemIndicator, \"itemIndicator\", { baseComponent: true });\n\nexport interface AccordionItemProps extends StyledProps, Accordion.ItemProps {}\n\nexport const AccordionItem = withContext(Accordion.Item, \"item\", { baseComponent: true });\n\nexport const AccordionItemTrigger = withContext(Accordion.ItemTrigger, \"itemTrigger\", { baseComponent: true });\n"],"mappings":";;;;;;;;;;;;;AA6HA,MAAM,EAAE,cAAc,iGA/GM;CAC1B,OAAOA,+BAAiB,MAAM;CAC9B,MAAM;EACJ,MAAM;GACJ,SAAS;GACT,eAAe;GACf,KAAK;GACN;EACD,aAAa;GACX,SAAS;GACT,YAAY;GACZ,gBAAgB;GAChB,YAAY;GACZ,QAAQ;GACR,oBAAoB;GACpB,0BAA0B;GAC1B,oBAAoB;GACpB,SAAS,EACP,oBAAoB,mDACrB;GACD,WAAW;IACT,QAAQ;IACR,YAAY;IACZ,gBAAgB;IAChB,OAAO;IACP,QAAQ;KACN,YAAY;KACZ,gBAAgB;KA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AAa,uBAAuB,YAAYA,wBAAU,aAAa,eAAe,EAAE,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Accordion.js","names":["accordionAnatomy","Accordion"],"sources":["../src/Accordion.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 { Accordion, accordionAnatomy } from \"@ark-ui/react\";\nimport { sva } from \"@ndla/styled-system/css\";\nimport { createStyleContext } from \"@ndla/styled-system/jsx\";\nimport type { RecipeVariantProps, StyledProps } from \"@ndla/styled-system/types\";\nimport type { RefAttributes } from \"react\";\n\nconst accordionRecipe = sva({\n slots: accordionAnatomy.keys(),\n base: {\n root: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"3xsmall\",\n },\n itemTrigger: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n background: \"surface.default\",\n cursor: \"pointer\",\n transitionDuration: \"fast\",\n transitionTimingFunction: \"default\",\n transitionProperty: \"background, border-color, border, border-radius\",\n _closed: {\n transitionProperty: \"background, border-color, border, border-radius\",\n },\n _disabled: {\n cursor: \"not-allowed\",\n background: \"surface.disabled.subtle\",\n boxShadowColor: \"stroke.disabled\",\n color: \"text.disabled\",\n _hover: {\n background: \"surface.disabled.subtle\",\n boxShadowColor: \"stroke.disabled\",\n color: \"text.disabled\",\n },\n },\n },\n itemIndicator: {\n color: \"icon.strong\",\n transformOrigin: \"center\",\n transitionDuration: \"normal\",\n transitionProperty: \"transform\",\n transitionTimingFunction: \"default\",\n _open: {\n transform: \"rotate(180deg)\",\n },\n _motionReduce: {\n transition: \"none\",\n transitionDuration: \"0s\",\n },\n },\n itemContent: {\n overflow: \"hidden\",\n // TODO: Is this needed?\n transitionProperty: \"padding-bottom\",\n transitionDuration: \"normal\",\n transitionTimingFunction: \"default\",\n paddingBlock: \"xsmall\",\n paddingInline: \"small\",\n _open: {\n animation: \"collapse-in\",\n _motionReduce: {\n animation: \"none\",\n },\n },\n _closed: {\n animation: \"collapse-out\",\n _motionReduce: {\n animation: \"none\",\n },\n },\n },\n item: {\n width: \"100%\",\n },\n },\n defaultVariants: {\n variant: \"bordered\",\n },\n variants: {\n variant: {\n clean: {},\n bordered: {\n itemTrigger: {\n paddingInline: \"medium\",\n paddingBlock: \"medium\",\n width: \"100%\",\n borderRadius: \"xsmall\",\n boxShadowColor: \"stroke.subtle\",\n boxShadow: \"inset 0 0 0 1px var(--shadow-color)\",\n _hover: {\n background: \"surface.actionSubtle.hover\",\n boxShadowColor: \"stroke.hover\",\n },\n _open: {\n background: \"surface.actionSubtle.active\",\n boxShadowColor: \"stroke.default\",\n borderBottomRadius: \"sharp\",\n },\n _focusVisible: {\n outline: \"none\",\n boxShadowColor: \"stroke.default\",\n boxShadow: \"inset 0 0 0 3px var(--shadow-color)\",\n },\n },\n itemContent: {\n borderBottomRadius: \"xsmall\",\n borderWidth: \"0 1px 1px\",\n borderStyle: \"solid\",\n borderColor: \"stroke.default\",\n },\n },\n },\n },\n});\n\nconst { withProvider, withContext } = createStyleContext(accordionRecipe);\n\nexport type AccordionVariantProps = NonNullable<RecipeVariantProps<typeof accordionRecipe>>;\n\nexport interface AccordionRootProps\n extends StyledProps, Accordion.RootProps, RefAttributes<HTMLDivElement>, AccordionVariantProps {}\n\nexport const InternalAccordionRoot = withProvider(Accordion.Root, \"root\", { baseComponent: true });\n\nexport const AccordionRoot = ({ lazyMount = true, unmountOnExit = true, ...props }: AccordionRootProps) => (\n <InternalAccordionRoot lazyMount={lazyMount} unmountOnExit={unmountOnExit} {...props} />\n);\n\nexport const AccordionItemContent = withContext(Accordion.ItemContent, \"itemContent\", { baseComponent: true });\n\nexport const AccordionItemIndicator = withContext(Accordion.ItemIndicator, \"itemIndicator\", { baseComponent: true });\n\nexport interface AccordionItemProps extends StyledProps, Accordion.ItemProps {}\n\nexport const AccordionItem = withContext(Accordion.Item, \"item\", { baseComponent: true });\n\nexport const AccordionItemTrigger = withContext(Accordion.ItemTrigger, \"itemTrigger\", { baseComponent: true });\n"],"mappings":";;;;;;;;;;;;AA6HA,MAAM,EAAE,cAAc,iBAAA,GAAA,wBAAA,qBAAA,GAAA,wBAAA,KA/GM;CAC1B,OAAOA,cAAAA,iBAAiB,MAAM;CAC9B,MAAM;EACJ,MAAM;GACJ,SAAS;GACT,eAAe;GACf,KAAK;GACN;EACD,aAAa;GACX,SAAS;GACT,YAAY;GACZ,gBAAgB;GAChB,YAAY;GACZ,QAAQ;GACR,oBAAoB;GACpB,0BAA0B;GAC1B,oBAAoB;GACpB,SAAS,EACP,oBAAoB,mDACrB;GACD,WAAW;IACT,QAAQ;IACR,YAAY;IACZ,gBAAgB;IAChB,OAAO;IACP,QAAQ;KACN,YAAY;KACZ,gBAAgB;KAChB,OAAO;KACR;IACF;GACF;EACD,eAAe;GACb,OAAO;GACP,iBAAiB;GACjB,oBAAoB;GACpB,oBAAoB;GACpB,0BAA0B;GAC1B,OAAO,EACL,WAAW,kBACZ;GACD,eAAe;IACb,YAAY;IACZ,oBAAoB;IACrB;GACF;EACD,aAAa;GACX,UAAU;GAEV,oBAAoB;GACpB,oBAAoB;GACpB,0BAA0B;GAC1B,cAAc;GACd,eAAe;GACf,OAAO;IACL,WAAW;IACX,eAAe,EACb,WAAW,QACZ;IACF;GACD,SAAS;IACP,WAAW;IACX,eAAe,EACb,WAAW,QACZ;IACF;GACF;EACD,MAAM,EACJ,OAAO,QACR;EACF;CACD,iBAAiB,EACf,SAAS,YACV;CACD,UAAU,EACR,SAAS;EACP,OAAO,EAAE;EACT,UAAU;GACR,aAAa;IACX,eAAe;IACf,cAAc;IACd,OAAO;IACP,cAAc;IACd,gBAAgB;IAChB,WAAW;IACX,QAAQ;KACN,YAAY;KACZ,gBAAgB;KACjB;IACD,OAAO;KACL,YAAY;KACZ,gBAAgB;KAChB,oBAAoB;KACrB;IACD,eAAe;KACb,SAAS;KACT,gBAAgB;KAChB,WAAW;KACZ;IACF;GACD,aAAa;IACX,oBAAoB;IACpB,aAAa;IACb,aAAa;IACb,aAAa;IACd;GACF;EACF,EACF;CACF,CAAC,CAEuE;AAOzE,MAAa,wBAAwB,aAAaC,cAAAA,UAAU,MAAM,QAAQ,EAAE,eAAe,MAAM,CAAC;AAElG,MAAa,iBAAiB,EAAE,YAAY,MAAM,gBAAgB,MAAM,GAAG,YACzE,iBAAA,GAAA,kBAAA,KAAC,uBAAD;CAAkC;CAA0B;CAAe,GAAI;CAAS,CAAA;AAG1F,MAAa,uBAAuB,YAAYA,cAAAA,UAAU,aAAa,eAAe,EAAE,eAAe,MAAM,CAAC;AAE9G,MAAa,yBAAyB,YAAYA,cAAAA,UAAU,eAAe,iBAAiB,EAAE,eAAe,MAAM,CAAC;AAIpH,MAAa,gBAAgB,YAAYA,cAAAA,UAAU,MAAM,QAAQ,EAAE,eAAe,MAAM,CAAC;AAEzF,MAAa,uBAAuB,YAAYA,cAAAA,UAAU,aAAa,eAAe,EAAE,eAAe,MAAM,CAAC"}
@@ -3,7 +3,6 @@ let _ndla_styled_system_css = require("@ndla/styled-system/css");
3
3
  let _ndla_styled_system_jsx = require("@ndla/styled-system/jsx");
4
4
  let react_jsx_runtime = require("react/jsx-runtime");
5
5
  let react = require("react");
6
-
7
6
  //#region src/ArticleLists.tsx
8
7
  /**
9
8
  * Copyright (c) 2024-present, NDLA.
@@ -114,9 +113,9 @@ const DefinitionList = (0, _ndla_styled_system_jsx.styled)("dl", { base: {
114
113
  "& dt": { fontWeight: "bold" },
115
114
  "& dd": { marginInlineStart: "medium" }
116
115
  } });
117
-
118
116
  //#endregion
119
117
  exports.DefinitionList = DefinitionList;
120
118
  exports.OrderedList = OrderedList;
121
119
  exports.UnOrderedList = UnOrderedList;
120
+
122
121
  //# sourceMappingURL=ArticleLists.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ArticleLists.js","names":["ark","css"],"sources":["../src/ArticleLists.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 { HTMLStyledProps, RecipeVariantProps, StyledProps } from \"@ndla/styled-system/types\";\nimport { createContext, type CSSProperties, forwardRef, useContext, useId, useMemo } from \"react\";\n\nconst orderedListRecipe = cva({\n base: {\n paddingInlineStart: \"large\",\n \"& > li\": {\n marginBlock: \"small\",\n _before: {\n position: \"absolute\",\n transform: \"translateX(calc(-100% - token(spacing.small)))\",\n fontVariantNumeric: \"tabular-nums\",\n },\n },\n },\n defaultVariants: {\n variant: \"numbers\",\n },\n variants: {\n variant: {\n numbers: {\n /** We utilize a CSS variable for the counter name to correctly reset counters when nested inside a letter list.\n * This way, the nested number list won't pick up on any other counters named \"numbers\" higher up in the DOM tree.\n * This fixes the following scenario\n * ol (numbers) -> 1.\n * ol(letters) -> A.\n * ol (numbers) -> 1. (Without the CSS variable, this would be 1.1)\n */\n counterReset: \"var(--counter-name) var(--start, 0)\",\n \"& > li\": {\n counterIncrement: \"var(--counter-name)\",\n _before: {\n content: `counters(var(--counter-name), \".\") \". \"`,\n },\n // If a nested OL is not a letters variant, it's a numbers variant. Keep increasing the margin to account for wider numbers.\n \"& > ol:not([data-variant='letters']) > li\": {\n paddingInlineStart: \"small\",\n \"& > ol:not([data-variant='letters']) > li\": {\n paddingInlineStart: \"large\",\n \"& > ol:not([data-variant='letters']) > li\": {\n paddingInlineStart: \"xxlarge\",\n },\n },\n },\n },\n },\n letters: {\n counterReset: \"letters var(--start, 0)\",\n \"& > li\": {\n counterIncrement: \"letters\",\n _before: {\n content: `counter(letters, upper-alpha) \". \"`,\n },\n \"& > ol[data-variant='letters'] > li\": {\n _before: {\n content: `counter(letters, lower-alpha) \". \"`,\n },\n \"& > ol[data-variant='letters'] > li\": {\n _before: {\n content: `counter(letters, lower-roman) \". \"`,\n },\n },\n },\n },\n },\n },\n },\n});\n\nexport type OrderedListVariantProps = NonNullable<RecipeVariantProps<typeof orderedListRecipe>>;\n\nexport interface OrderedListProps extends StyledProps, HTMLArkProps<\"ol\">, OrderedListVariantProps {}\n\nconst StyledOrderedList = styled(ark.ol, {}, { baseComponent: true });\n\nconst ListContext = createContext<\"numbers\" | \"letters\" | undefined>(undefined);\n\nconst useCurrentListContext = () => {\n const ctx = useContext(ListContext);\n return ctx;\n};\n\nexport const OrderedList = forwardRef<HTMLOListElement, OrderedListProps>(\n ({ variant = \"numbers\", css: cssProp, start, ...props }, ref) => {\n const counterId = useId();\n const currentContext = useCurrentListContext();\n\n const style = useMemo(() => {\n const css: Record<string, any> = { \"--start\": start ? start - 1 : 0 };\n if (variant !== currentContext) {\n css[\"--counter-name\"] = counterId;\n }\n return css as CSSProperties;\n }, [start, variant, currentContext, counterId]);\n\n return (\n <ListContext.Provider value={variant ?? \"numbers\"}>\n <StyledOrderedList\n data-embed-type=\"ordered-list\"\n data-variant={variant}\n start={start}\n type={variant === \"letters\" ? \"A\" : undefined}\n css={css.raw(orderedListRecipe.raw({ variant }), cssProp)}\n style={style}\n ref={ref}\n {...props}\n />\n </ListContext.Provider>\n );\n },\n);\n\nexport interface UnOrderedListProps extends StyledProps, HTMLArkProps<\"ul\"> {}\n\nexport const StyledUnOrderedList = styled(\"ul\", {\n base: {\n listStyle: \"revert\",\n marginInlineStart: \"medium\",\n paddingInlineStart: \"small\",\n \"& ul\": {\n marginInlineStart: \"0\",\n },\n \"& li\": {\n marginBlock: \"small\",\n paddingInlineStart: \"small\",\n _marker: {\n color: \"icon.strong\",\n },\n\n \"& > ol\": {\n marginInlineStart: \"0 !important\",\n },\n },\n\n listStyleType: \"disc\",\n \"& > li > ul\": {\n listStyleType: \"circle\",\n \"& > li > ul\": {\n listStyleType: \"square\",\n },\n },\n },\n});\n\nexport const UnOrderedList = forwardRef<HTMLUListElement, UnOrderedListProps>((props, ref) => {\n const counterId = useId();\n\n const style = useMemo(\n () =>\n ({\n \"--counter-name\": counterId,\n }) as CSSProperties,\n [counterId],\n );\n\n return <StyledUnOrderedList ref={ref} style={style} {...props} />;\n});\n\nexport const DefinitionList = styled(\"dl\", {\n base: {\n \"& dt\": {\n fontWeight: \"bold\",\n },\n \"& dd\": {\n marginInlineStart: \"medium\",\n },\n },\n});\n\nexport type DefinitionListProps = HTMLStyledProps<\"dl\">;\n"],"mappings":";;;;;;;;;;;;;;AAcA,MAAM,qDAAwB;CAC5B,MAAM;EACJ,oBAAoB;EACpB,UAAU;GACR,aAAa;GACb,SAAS;IACP,UAAU;IACV,WAAW;IACX,oBAAoB;IACrB;GACF;EACF;CACD,iBAAiB,EACf,SAAS,WACV;CACD,UAAU,EACR,SAAS;EACP,SAAS;GAQP,cAAc;GACd,UAAU;IACR,kBAAkB;IAClB,SAAS,EACP,SAAS,2CACV;IAED,6CAA6C;KAC3C,oBAAoB;KACpB,6CAA6C;MAC3C,oBAAoB;MACpB,6CAA6C,EAC3C,oBAAoB,WACrB;MACF;KACF;IACF;GACF;EACD,SAAS;GACP,cAAc;GACd,UAAU;IACR,kBAAkB;IAClB,SAAS,EACP,SAAS,sCACV;IACD,uCAAuC;KACrC,SAAS,EACP,SAAS,sCACV;KACD,uCAAuC,EACrC,SAAS,EACP,SAAS,sCACV,EACF;KACF;IACF;GACF;EACF,EACF;CACF,CAAC;AAMF,MAAM,wDAA2BA,kBAAI,IAAI,EAAE,EAAE,EAAE,eAAe,MAAM,CAAC;AAErE,MAAM,uCAA+D,OAAU;AAE/E,MAAM,8BAA8B;AAElC,8BADuB,YAAY;;AAIrC,MAAa,qCACV,EAAE,UAAU,WAAW,KAAK,SAAS,OAAO,GAAG,SAAS,QAAQ;CAC/D,MAAM,8BAAmB;CACzB,MAAM,iBAAiB,uBAAuB;CAE9C,MAAM,iCAAsB;EAC1B,MAAM,MAA2B,EAAE,WAAW,QAAQ,QAAQ,IAAI,GAAG;AACrE,MAAI,YAAY,eACd,KAAI,oBAAoB;AAE1B,SAAO;IACN;EAAC;EAAO;EAAS;EAAgB;EAAU,CAAC;AAE/C,QACE,2CAAC,YAAY;EAAS,OAAO,WAAW;YACtC,2CAAC;GACC,mBAAgB;GAChB,gBAAc;GACP;GACP,MAAM,YAAY,YAAY,MAAM;GACpC,KAAKC,4BAAI,IAAI,kBAAkB,IAAI,EAAE,SAAS,CAAC,EAAE,QAAQ;GAClD;GACF;GACL,GAAI;IACJ;GACmB;EAG5B;AAID,MAAa,0DAA6B,MAAM,EAC9C,MAAM;CACJ,WAAW;CACX,mBAAmB;CACnB,oBAAoB;CACpB,QAAQ,EACN,mBAAmB,KACpB;CACD,QAAQ;EACN,aAAa;EACb,oBAAoB;EACpB,SAAS,EACP,OAAO,eACR;EAED,UAAU,EACR,mBAAmB,gBACpB;EACF;CAED,eAAe;CACf,eAAe;EACb,eAAe;EACf,eAAe,EACb,eAAe,UAChB;EACF;CACF,EACF,CAAC;AAEF,MAAa,uCAAkE,OAAO,QAAQ;CAC5F,MAAM,8BAAmB;AAUzB,QAAO,2CAAC;EAAyB;EAAK,iCANjC,EACC,kBAAkB,WACnB,GACH,CAAC,UAAU,CACZ;EAEmD,GAAI;GAAS;EACjE;AAEF,MAAa,qDAAwB,MAAM,EACzC,MAAM;CACJ,QAAQ,EACN,YAAY,QACb;CACD,QAAQ,EACN,mBAAmB,UACpB;CACF,EACF,CAAC"}
1
+ {"version":3,"file":"ArticleLists.js","names":["ark","css"],"sources":["../src/ArticleLists.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 { HTMLStyledProps, RecipeVariantProps, StyledProps } from \"@ndla/styled-system/types\";\nimport { createContext, type CSSProperties, forwardRef, useContext, useId, useMemo } from \"react\";\n\nconst orderedListRecipe = cva({\n base: {\n paddingInlineStart: \"large\",\n \"& > li\": {\n marginBlock: \"small\",\n _before: {\n position: \"absolute\",\n transform: \"translateX(calc(-100% - token(spacing.small)))\",\n fontVariantNumeric: \"tabular-nums\",\n },\n },\n },\n defaultVariants: {\n variant: \"numbers\",\n },\n variants: {\n variant: {\n numbers: {\n /** We utilize a CSS variable for the counter name to correctly reset counters when nested inside a letter list.\n * This way, the nested number list won't pick up on any other counters named \"numbers\" higher up in the DOM tree.\n * This fixes the following scenario\n * ol (numbers) -> 1.\n * ol(letters) -> A.\n * ol (numbers) -> 1. (Without the CSS variable, this would be 1.1)\n */\n counterReset: \"var(--counter-name) var(--start, 0)\",\n \"& > li\": {\n counterIncrement: \"var(--counter-name)\",\n _before: {\n content: `counters(var(--counter-name), \".\") \". \"`,\n },\n // If a nested OL is not a letters variant, it's a numbers variant. Keep increasing the margin to account for wider numbers.\n \"& > ol:not([data-variant='letters']) > li\": {\n paddingInlineStart: \"small\",\n \"& > ol:not([data-variant='letters']) > li\": {\n paddingInlineStart: \"large\",\n \"& > ol:not([data-variant='letters']) > li\": {\n paddingInlineStart: \"xxlarge\",\n },\n },\n },\n },\n },\n letters: {\n counterReset: \"letters var(--start, 0)\",\n \"& > li\": {\n counterIncrement: \"letters\",\n _before: {\n content: `counter(letters, upper-alpha) \". \"`,\n },\n \"& > ol[data-variant='letters'] > li\": {\n _before: {\n content: `counter(letters, lower-alpha) \". \"`,\n },\n \"& > ol[data-variant='letters'] > li\": {\n _before: {\n content: `counter(letters, lower-roman) \". \"`,\n },\n },\n },\n },\n },\n },\n },\n});\n\nexport type OrderedListVariantProps = NonNullable<RecipeVariantProps<typeof orderedListRecipe>>;\n\nexport interface OrderedListProps extends StyledProps, HTMLArkProps<\"ol\">, OrderedListVariantProps {}\n\nconst StyledOrderedList = styled(ark.ol, {}, { baseComponent: true });\n\nconst ListContext = createContext<\"numbers\" | \"letters\" | undefined>(undefined);\n\nconst useCurrentListContext = () => {\n const ctx = useContext(ListContext);\n return ctx;\n};\n\nexport const OrderedList = forwardRef<HTMLOListElement, OrderedListProps>(\n ({ variant = \"numbers\", css: cssProp, start, ...props }, ref) => {\n const counterId = useId();\n const currentContext = useCurrentListContext();\n\n const style = useMemo(() => {\n const css: Record<string, any> = { \"--start\": start ? start - 1 : 0 };\n if (variant !== currentContext) {\n css[\"--counter-name\"] = counterId;\n }\n return css as CSSProperties;\n }, [start, variant, currentContext, counterId]);\n\n return (\n <ListContext.Provider value={variant ?? \"numbers\"}>\n <StyledOrderedList\n data-embed-type=\"ordered-list\"\n data-variant={variant}\n start={start}\n type={variant === \"letters\" ? \"A\" : undefined}\n css={css.raw(orderedListRecipe.raw({ variant }), cssProp)}\n style={style}\n ref={ref}\n {...props}\n />\n </ListContext.Provider>\n );\n },\n);\n\nexport interface UnOrderedListProps extends StyledProps, HTMLArkProps<\"ul\"> {}\n\nexport const StyledUnOrderedList = styled(\"ul\", {\n base: {\n listStyle: \"revert\",\n marginInlineStart: \"medium\",\n paddingInlineStart: \"small\",\n \"& ul\": {\n marginInlineStart: \"0\",\n },\n \"& li\": {\n marginBlock: \"small\",\n paddingInlineStart: \"small\",\n _marker: {\n color: \"icon.strong\",\n },\n\n \"& > ol\": {\n marginInlineStart: \"0 !important\",\n },\n },\n\n listStyleType: \"disc\",\n \"& > li > ul\": {\n listStyleType: \"circle\",\n \"& > li > ul\": {\n listStyleType: \"square\",\n },\n },\n },\n});\n\nexport const UnOrderedList = forwardRef<HTMLUListElement, UnOrderedListProps>((props, ref) => {\n const counterId = useId();\n\n const style = useMemo(\n () =>\n ({\n \"--counter-name\": counterId,\n }) as CSSProperties,\n [counterId],\n );\n\n return <StyledUnOrderedList ref={ref} style={style} {...props} />;\n});\n\nexport const DefinitionList = styled(\"dl\", {\n base: {\n \"& dt\": {\n fontWeight: \"bold\",\n },\n \"& dd\": {\n marginInlineStart: \"medium\",\n },\n },\n});\n\nexport type DefinitionListProps = HTMLStyledProps<\"dl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OAAO,WAAW;YACtC,iBAAA,GAAA,kBAAA,KAAC,mBAAD;GACE,mBAAgB;GAChB,gBAAc;GACP;GACP,MAAM,YAAY,YAAY,MAAM,KAAA;GACpC,KAAKC,wBAAAA,IAAI,IAAI,kBAAkB,IAAI,EAAE,SAAS,CAAC,EAAE,QAAQ;GAClD;GACF;GACL,GAAI;GACJ,CAAA;EACmB,CAAA;EAG5B;AAID,MAAa,uBAAA,GAAA,wBAAA,QAA6B,MAAM,EAC9C,MAAM;CACJ,WAAW;CACX,mBAAmB;CACnB,oBAAoB;CACpB,QAAQ,EACN,mBAAmB,KACpB;CACD,QAAQ;EACN,aAAa;EACb,oBAAoB;EACpB,SAAS,EACP,OAAO,eACR;EAED,UAAU,EACR,mBAAmB,gBACpB;EACF;CAED,eAAe;CACf,eAAe;EACb,eAAe;EACf,eAAe,EACb,eAAe,UAChB;EACF;CACF,EACF,CAAC;AAEF,MAAa,iBAAA,GAAA,MAAA,aAAkE,OAAO,QAAQ;CAC5F,MAAM,aAAA,GAAA,MAAA,QAAmB;AAUzB,QAAO,iBAAA,GAAA,kBAAA,KAAC,qBAAD;EAA0B;EAAK,QAAA,GAAA,MAAA,gBANjC,EACC,kBAAkB,WACnB,GACH,CAAC,UAAU,CACZ;EAEmD,GAAI;EAAS,CAAA;EACjE;AAEF,MAAa,kBAAA,GAAA,wBAAA,QAAwB,MAAM,EACzC,MAAM;CACJ,QAAQ,EACN,YAAY,QACb;CACD,QAAQ,EACN,mBAAmB,UACpB;CACF,EACF,CAAC"}
package/lib/Badge.js CHANGED
@@ -3,7 +3,6 @@ let _ndla_styled_system_css = require("@ndla/styled-system/css");
3
3
  let _ndla_styled_system_jsx = require("@ndla/styled-system/jsx");
4
4
  let react_jsx_runtime = require("react/jsx-runtime");
5
5
  let react = require("react");
6
-
7
6
  //#region src/Badge.tsx
8
7
  /**
9
8
  * Copyright (c) 2024-present, NDLA.
@@ -70,7 +69,7 @@ const Badge = (0, react.forwardRef)(({ colorTheme, size, css: cssProp, ...props
70
69
  ...props,
71
70
  ref
72
71
  }));
73
-
74
72
  //#endregion
75
73
  exports.Badge = Badge;
74
+
76
75
  //# sourceMappingURL=Badge.js.map
package/lib/Badge.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.js","names":["ark","css"],"sources":["../src/Badge.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 { StyledProps } from \"@ndla/styled-system/types\";\nimport { forwardRef } from \"react\";\n\nconst badgeRecipe = cva({\n base: {\n paddingInline: \"xsmall\",\n borderRadius: \"xsmall\",\n border: \"1px solid\",\n width: \"fit-content\",\n color: \"text.default\",\n },\n defaultVariants: {\n colorTheme: \"neutral\",\n size: \"medium\",\n },\n variants: {\n size: {\n small: {\n textStyle: \"label.small\",\n },\n medium: {\n textStyle: \"label.medium\",\n },\n },\n colorTheme: {\n brand1: {\n backgroundColor: \"surface.brand.1.moderate\",\n borderColor: \"surface.brand.1.strong\",\n },\n brand2: {\n backgroundColor: \"surface.brand.2.moderate\",\n borderColor: \"surface.brand.2.strong\",\n },\n brand3: {\n backgroundColor: \"surface.brand.3.subtle\",\n borderColor: \"surface.brand.3.strong\",\n },\n neutral: {\n backgroundColor: \"surface.infoSubtle\",\n borderColor: \"stroke.info\",\n },\n danger: {\n backgroundColor: \"surface.dangerSubtle\",\n borderColor: \"surface.danger\",\n },\n success: {\n backgroundColor: \"surface.successSubtle\",\n borderColor: \"surface.success\",\n },\n warning: {\n backgroundColor: \"surface.warningSubtle\",\n borderColor: \"surface.warning\",\n },\n },\n },\n});\n\nexport type BadgeVariantProps = NonNullable<RecipeVariantProps<typeof badgeRecipe>>;\n\nexport type BadgeVariant = NonNullable<BadgeVariantProps>[\"colorTheme\"];\n\nexport interface BadgeProps extends StyledProps, HTMLArkProps<\"div\">, BadgeVariantProps {}\n\nconst StyledBadge = styled(ark.div, {}, { baseComponent: true });\n\nexport const Badge = forwardRef<HTMLDivElement, BadgeProps>(({ colorTheme, size, css: cssProp, ...props }, ref) => (\n <StyledBadge css={css.raw(badgeRecipe.raw({ colorTheme, size }), cssProp)} {...props} ref={ref} />\n));\n"],"mappings":";;;;;;;;;;;;;;AAcA,MAAM,+CAAkB;CACtB,MAAM;EACJ,eAAe;EACf,cAAc;EACd,QAAQ;EACR,OAAO;EACP,OAAO;EACR;CACD,iBAAiB;EACf,YAAY;EACZ,MAAM;EACP;CACD,UAAU;EACR,MAAM;GACJ,OAAO,EACL,WAAW,eACZ;GACD,QAAQ,EACN,WAAW,gBACZ;GACF;EACD,YAAY;GACV,QAAQ;IACN,iBAAiB;IACjB,aAAa;IACd;GACD,QAAQ;IACN,iBAAiB;IACjB,aAAa;IACd;GACD,QAAQ;IACN,iBAAiB;IACjB,aAAa;IACd;GACD,SAAS;IACP,iBAAiB;IACjB,aAAa;IACd;GACD,QAAQ;IACN,iBAAiB;IACjB,aAAa;IACd;GACD,SAAS;IACP,iBAAiB;IACjB,aAAa;IACd;GACD,SAAS;IACP,iBAAiB;IACjB,aAAa;IACd;GACF;EACF;CACF,CAAC;AAQF,MAAM,kDAAqBA,kBAAI,KAAK,EAAE,EAAE,EAAE,eAAe,MAAM,CAAC;AAEhE,MAAa,+BAAgD,EAAE,YAAY,MAAM,KAAK,SAAS,GAAG,SAAS,QACzG,2CAAC;CAAY,KAAKC,4BAAI,IAAI,YAAY,IAAI;EAAE;EAAY;EAAM,CAAC,EAAE,QAAQ;CAAE,GAAI;CAAY;EAAO,CAClG"}
1
+ {"version":3,"file":"Badge.js","names":["ark","css"],"sources":["../src/Badge.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 { StyledProps } from \"@ndla/styled-system/types\";\nimport { forwardRef } from \"react\";\n\nconst badgeRecipe = cva({\n base: {\n paddingInline: \"xsmall\",\n borderRadius: \"xsmall\",\n border: \"1px solid\",\n width: \"fit-content\",\n color: \"text.default\",\n },\n defaultVariants: {\n colorTheme: \"neutral\",\n size: \"medium\",\n },\n variants: {\n size: {\n small: {\n textStyle: \"label.small\",\n },\n medium: {\n textStyle: \"label.medium\",\n },\n },\n colorTheme: {\n brand1: {\n backgroundColor: \"surface.brand.1.moderate\",\n borderColor: \"surface.brand.1.strong\",\n },\n brand2: {\n backgroundColor: \"surface.brand.2.moderate\",\n borderColor: \"surface.brand.2.strong\",\n },\n brand3: {\n backgroundColor: \"surface.brand.3.subtle\",\n borderColor: \"surface.brand.3.strong\",\n },\n neutral: {\n backgroundColor: \"surface.infoSubtle\",\n borderColor: \"stroke.info\",\n },\n danger: {\n backgroundColor: \"surface.dangerSubtle\",\n borderColor: \"surface.danger\",\n },\n success: {\n backgroundColor: \"surface.successSubtle\",\n borderColor: \"surface.success\",\n },\n warning: {\n backgroundColor: \"surface.warningSubtle\",\n borderColor: \"surface.warning\",\n },\n },\n },\n});\n\nexport type BadgeVariantProps = NonNullable<RecipeVariantProps<typeof badgeRecipe>>;\n\nexport type BadgeVariant = NonNullable<BadgeVariantProps>[\"colorTheme\"];\n\nexport interface BadgeProps extends StyledProps, HTMLArkProps<\"div\">, BadgeVariantProps {}\n\nconst StyledBadge = styled(ark.div, {}, { baseComponent: true });\n\nexport const Badge = forwardRef<HTMLDivElement, BadgeProps>(({ colorTheme, size, css: cssProp, ...props }, ref) => (\n <StyledBadge css={css.raw(badgeRecipe.raw({ colorTheme, size }), cssProp)} {...props} ref={ref} />\n));\n"],"mappings":";;;;;;;;;;;;;AAcA,MAAM,eAAA,GAAA,wBAAA,KAAkB;CACtB,MAAM;EACJ,eAAe;EACf,cAAc;EACd,QAAQ;EACR,OAAO;EACP,OAAO;EACR;CACD,iBAAiB;EACf,YAAY;EACZ,MAAM;EACP;CACD,UAAU;EACR,MAAM;GACJ,OAAO,EACL,WAAW,eACZ;GACD,QAAQ,EACN,WAAW,gBACZ;GACF;EACD,YAAY;GACV,QAAQ;IACN,iBAAiB;IACjB,aAAa;IACd;GACD,QAAQ;IACN,iBAAiB;IACjB,aAAa;IACd;GACD,QAAQ;IACN,iBAAiB;IACjB,aAAa;IACd;GACD,SAAS;IACP,iBAAiB;IACjB,aAAa;IACd;GACD,QAAQ;IACN,iBAAiB;IACjB,aAAa;IACd;GACD,SAAS;IACP,iBAAiB;IACjB,aAAa;IACd;GACD,SAAS;IACP,iBAAiB;IACjB,aAAa;IACd;GACF;EACF;CACF,CAAC;AAQF,MAAM,eAAA,GAAA,wBAAA,QAAqBA,cAAAA,IAAI,KAAK,EAAE,EAAE,EAAE,eAAe,MAAM,CAAC;AAEhE,MAAa,SAAA,GAAA,MAAA,aAAgD,EAAE,YAAY,MAAM,KAAK,SAAS,GAAG,SAAS,QACzG,iBAAA,GAAA,kBAAA,KAAC,aAAD;CAAa,KAAKC,wBAAAA,IAAI,IAAI,YAAY,IAAI;EAAE;EAAY;EAAM,CAAC,EAAE,QAAQ;CAAE,GAAI;CAAY;CAAO,CAAA,CAClG"}
package/lib/BlockQuote.js CHANGED
@@ -3,7 +3,6 @@ let _ndla_styled_system_css = require("@ndla/styled-system/css");
3
3
  let _ndla_styled_system_jsx = require("@ndla/styled-system/jsx");
4
4
  let react_jsx_runtime = require("react/jsx-runtime");
5
5
  let react = require("react");
6
-
7
6
  //#region src/BlockQuote.tsx
8
7
  /**
9
8
  * Copyright (c) 2024-present, NDLA.
@@ -39,7 +38,7 @@ const BlockQuote = (0, react.forwardRef)(({ variant, css: cssProp, ...props }, r
39
38
  ...props,
40
39
  ref
41
40
  }));
42
-
43
41
  //#endregion
44
42
  exports.BlockQuote = BlockQuote;
43
+
45
44
  //# sourceMappingURL=BlockQuote.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BlockQuote.js","names":["ark","css"],"sources":["../src/BlockQuote.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 { ark, type HTMLArkProps } from \"@ark-ui/react\";\nimport { type RecipeVariantProps, css, cva } from \"@ndla/styled-system/css\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { StyledProps } from \"@ndla/styled-system/types\";\nimport { forwardRef } from \"react\";\n\nconst blockQuoteRecipe = cva({\n base: {\n borderInlineStart: \"4px solid\",\n paddingInline: \"medium\",\n },\n variants: {\n variant: {\n neutral: {\n borderColor: \"stroke.subtle\",\n background: \"surface.default\",\n },\n brand1: {\n background: \"surface.brand.1.subtle\",\n borderColor: \"surface.brand.1.strong\",\n },\n brand2: {\n background: \"surface.brand.2.subtle\",\n borderColor: \"surface.brand.2.strong\",\n },\n },\n },\n defaultVariants: {\n variant: \"neutral\",\n },\n});\n\nexport type BlockQuoteVariantProps = NonNullable<RecipeVariantProps<typeof blockQuoteRecipe>>;\n\nexport interface BlockQuoteProps extends HTMLArkProps<\"blockquote\">, StyledProps, BlockQuoteVariantProps {}\n\nconst StyledBlockQuote = styled(ark.blockquote, {}, { baseComponent: true });\n\nexport const BlockQuote = forwardRef<HTMLQuoteElement, BlockQuoteProps>(({ variant, css: cssProp, ...props }, ref) => (\n <StyledBlockQuote css={css.raw(blockQuoteRecipe.raw({ variant }), cssProp)} {...props} ref={ref} />\n));\n"],"mappings":";;;;;;;;;;;;;;AAcA,MAAM,oDAAuB;CAC3B,MAAM;EACJ,mBAAmB;EACnB,eAAe;EAChB;CACD,UAAU,EACR,SAAS;EACP,SAAS;GACP,aAAa;GACb,YAAY;GACb;EACD,QAAQ;GACN,YAAY;GACZ,aAAa;GACd;EACD,QAAQ;GACN,YAAY;GACZ,aAAa;GACd;EACF,EACF;CACD,iBAAiB,EACf,SAAS,WACV;CACF,CAAC;AAMF,MAAM,uDAA0BA,kBAAI,YAAY,EAAE,EAAE,EAAE,eAAe,MAAM,CAAC;AAE5E,MAAa,oCAA4D,EAAE,SAAS,KAAK,SAAS,GAAG,SAAS,QAC5G,2CAAC;CAAiB,KAAKC,4BAAI,IAAI,iBAAiB,IAAI,EAAE,SAAS,CAAC,EAAE,QAAQ;CAAE,GAAI;CAAY;EAAO,CACnG"}
1
+ {"version":3,"file":"BlockQuote.js","names":["ark","css"],"sources":["../src/BlockQuote.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 { ark, type HTMLArkProps } from \"@ark-ui/react\";\nimport { type RecipeVariantProps, css, cva } from \"@ndla/styled-system/css\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { StyledProps } from \"@ndla/styled-system/types\";\nimport { forwardRef } from \"react\";\n\nconst blockQuoteRecipe = cva({\n base: {\n borderInlineStart: \"4px solid\",\n paddingInline: \"medium\",\n },\n variants: {\n variant: {\n neutral: {\n borderColor: \"stroke.subtle\",\n background: \"surface.default\",\n },\n brand1: {\n background: \"surface.brand.1.subtle\",\n borderColor: \"surface.brand.1.strong\",\n },\n brand2: {\n background: \"surface.brand.2.subtle\",\n borderColor: \"surface.brand.2.strong\",\n },\n },\n },\n defaultVariants: {\n variant: \"neutral\",\n },\n});\n\nexport type BlockQuoteVariantProps = NonNullable<RecipeVariantProps<typeof blockQuoteRecipe>>;\n\nexport interface BlockQuoteProps extends HTMLArkProps<\"blockquote\">, StyledProps, BlockQuoteVariantProps {}\n\nconst StyledBlockQuote = styled(ark.blockquote, {}, { baseComponent: true });\n\nexport const BlockQuote = forwardRef<HTMLQuoteElement, BlockQuoteProps>(({ variant, css: cssProp, ...props }, ref) => (\n <StyledBlockQuote css={css.raw(blockQuoteRecipe.raw({ variant }), cssProp)} {...props} ref={ref} />\n));\n"],"mappings":";;;;;;;;;;;;;AAcA,MAAM,oBAAA,GAAA,wBAAA,KAAuB;CAC3B,MAAM;EACJ,mBAAmB;EACnB,eAAe;EAChB;CACD,UAAU,EACR,SAAS;EACP,SAAS;GACP,aAAa;GACb,YAAY;GACb;EACD,QAAQ;GACN,YAAY;GACZ,aAAa;GACd;EACD,QAAQ;GACN,YAAY;GACZ,aAAa;GACd;EACF,EACF;CACD,iBAAiB,EACf,SAAS,WACV;CACF,CAAC;AAMF,MAAM,oBAAA,GAAA,wBAAA,QAA0BA,cAAAA,IAAI,YAAY,EAAE,EAAE,EAAE,eAAe,MAAM,CAAC;AAE5E,MAAa,cAAA,GAAA,MAAA,aAA4D,EAAE,SAAS,KAAK,SAAS,GAAG,SAAS,QAC5G,iBAAA,GAAA,kBAAA,KAAC,kBAAD;CAAkB,KAAKC,wBAAAA,IAAI,IAAI,iBAAiB,IAAI,EAAE,SAAS,CAAC,EAAE,QAAQ;CAAE,GAAI;CAAY;CAAO,CAAA,CACnG"}
package/lib/Button.js CHANGED
@@ -1,10 +1,9 @@
1
- const require_Spinner = require('./Spinner.js');
1
+ const require_Spinner = require("./Spinner.js");
2
2
  let _ark_ui_react = require("@ark-ui/react");
3
3
  let _ndla_styled_system_css = require("@ndla/styled-system/css");
4
4
  let _ndla_styled_system_jsx = require("@ndla/styled-system/jsx");
5
5
  let react_jsx_runtime = require("react/jsx-runtime");
6
6
  let react = require("react");
7
-
8
7
  //#region src/Button.tsx
9
8
  /**
10
9
  * Copyright (c) 2024-present, NDLA.
@@ -236,11 +235,11 @@ const IconButton = (0, react.forwardRef)(({ variant, css: cssProp, loadingConten
236
235
  replaceContent,
237
236
  ref
238
237
  }));
239
-
240
238
  //#endregion
241
239
  exports.Button = Button;
242
240
  exports.IconButton = IconButton;
243
241
  exports.buttonBaseRecipe = buttonBaseRecipe;
244
242
  exports.buttonRecipe = buttonRecipe;
245
243
  exports.iconButtonRecipe = iconButtonRecipe;
244
+
246
245
  //# sourceMappingURL=Button.js.map