@krrli/cm-designsystem 1.32.1 → 1.32.3

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 (250) hide show
  1. package/dist/assets/fallback.png.js +4 -0
  2. package/dist/cm-designsystem.css +1944 -1
  3. package/dist/components/accessible-button/AccessibleButton.d.ts +1 -0
  4. package/dist/components/accessible-button/AccessibleButton.d.ts.map +1 -0
  5. package/dist/components/accessible-button/AccessibleButton.js +29 -11
  6. package/dist/components/avatar/Avatar.d.ts +4 -3
  7. package/dist/components/avatar/Avatar.d.ts.map +1 -0
  8. package/dist/components/avatar/Avatar.js +91 -65
  9. package/dist/components/branding/BrandingGallery.d.ts +1 -0
  10. package/dist/components/branding/BrandingGallery.d.ts.map +1 -0
  11. package/dist/components/branding/BrandingGallery.js +212 -145
  12. package/dist/components/branding/app-icon-gradient.svg.js +4 -0
  13. package/dist/components/branding/app-icon-white.svg.js +4 -0
  14. package/dist/components/branding/hover-logo-default.svg.js +4 -0
  15. package/dist/components/branding/hover-logo-hovered.svg.js +4 -0
  16. package/dist/components/branding/logo-inline-gradient.svg.js +4 -0
  17. package/dist/components/branding/logo-inline-violet.svg.js +4 -0
  18. package/dist/components/branding/logo-inline-white.svg.js +4 -0
  19. package/dist/components/branding/logo-stacked-gradient.svg.js +4 -0
  20. package/dist/components/branding/logo-stacked-violet.svg.js +4 -0
  21. package/dist/components/branding/logo-stacked-white.svg.js +4 -0
  22. package/dist/components/branding/superzeichen.svg.js +4 -0
  23. package/dist/components/button/Button.d.ts +6 -5
  24. package/dist/components/button/Button.d.ts.map +1 -0
  25. package/dist/components/button/Button.js +61 -55
  26. package/dist/components/color/ColorDoc.d.ts +1 -0
  27. package/dist/components/color/ColorDoc.d.ts.map +1 -0
  28. package/dist/components/color/ColorDoc.js +26 -7
  29. package/dist/components/file-upload/FileUpload.d.ts +34 -33
  30. package/dist/components/file-upload/FileUpload.d.ts.map +1 -0
  31. package/dist/components/file-upload/FileUpload.js +129 -66
  32. package/dist/components/form/Form.d.ts +14 -13
  33. package/dist/components/form/Form.d.ts.map +1 -0
  34. package/dist/components/form/Form.js +33 -26
  35. package/dist/components/icon-button/IconButton.d.ts +7 -6
  36. package/dist/components/icon-button/IconButton.d.ts.map +1 -0
  37. package/dist/components/icon-button/IconButton.js +33 -29
  38. package/dist/components/icons/IconBase.d.ts +1 -0
  39. package/dist/components/icons/IconBase.d.ts.map +1 -0
  40. package/dist/components/icons/IconBase.js +21 -6
  41. package/dist/components/icons/generated/ArrowDown.d.ts +2 -1
  42. package/dist/components/icons/generated/ArrowDown.d.ts.map +1 -0
  43. package/dist/components/icons/generated/ArrowDown.js +15 -4
  44. package/dist/components/icons/generated/ArrowLeft.d.ts +2 -1
  45. package/dist/components/icons/generated/ArrowLeft.d.ts.map +1 -0
  46. package/dist/components/icons/generated/ArrowLeft.js +15 -4
  47. package/dist/components/icons/generated/ArrowRight.d.ts +2 -1
  48. package/dist/components/icons/generated/ArrowRight.d.ts.map +1 -0
  49. package/dist/components/icons/generated/ArrowRight.js +15 -4
  50. package/dist/components/icons/generated/ArrowUp.d.ts +2 -1
  51. package/dist/components/icons/generated/ArrowUp.d.ts.map +1 -0
  52. package/dist/components/icons/generated/ArrowUp.js +15 -4
  53. package/dist/components/icons/generated/Calendar.d.ts +2 -1
  54. package/dist/components/icons/generated/Calendar.d.ts.map +1 -0
  55. package/dist/components/icons/generated/Calendar.js +15 -4
  56. package/dist/components/icons/generated/Cancel.d.ts +2 -1
  57. package/dist/components/icons/generated/Cancel.d.ts.map +1 -0
  58. package/dist/components/icons/generated/Cancel.js +12 -4
  59. package/dist/components/icons/generated/Checkmark.d.ts +2 -1
  60. package/dist/components/icons/generated/Checkmark.d.ts.map +1 -0
  61. package/dist/components/icons/generated/Checkmark.js +12 -4
  62. package/dist/components/icons/generated/Edit.d.ts +2 -1
  63. package/dist/components/icons/generated/Edit.d.ts.map +1 -0
  64. package/dist/components/icons/generated/Edit.js +9 -4
  65. package/dist/components/icons/generated/Eye.d.ts +2 -1
  66. package/dist/components/icons/generated/Eye.d.ts.map +1 -0
  67. package/dist/components/icons/generated/Eye.js +15 -4
  68. package/dist/components/icons/generated/Fullscreen.d.ts +2 -1
  69. package/dist/components/icons/generated/Fullscreen.d.ts.map +1 -0
  70. package/dist/components/icons/generated/Fullscreen.js +9 -4
  71. package/dist/components/icons/generated/HeartFilled.d.ts +2 -1
  72. package/dist/components/icons/generated/HeartFilled.d.ts.map +1 -0
  73. package/dist/components/icons/generated/HeartFilled.js +15 -4
  74. package/dist/components/icons/generated/HeartOutline.d.ts +2 -1
  75. package/dist/components/icons/generated/HeartOutline.d.ts.map +1 -0
  76. package/dist/components/icons/generated/HeartOutline.js +15 -4
  77. package/dist/components/icons/generated/Location.d.ts +2 -1
  78. package/dist/components/icons/generated/Location.d.ts.map +1 -0
  79. package/dist/components/icons/generated/Location.js +15 -4
  80. package/dist/components/icons/generated/LogOut.d.ts +2 -1
  81. package/dist/components/icons/generated/LogOut.d.ts.map +1 -0
  82. package/dist/components/icons/generated/LogOut.js +12 -4
  83. package/dist/components/icons/generated/Mumble.d.ts +2 -1
  84. package/dist/components/icons/generated/Mumble.d.ts.map +1 -0
  85. package/dist/components/icons/generated/Mumble.js +13 -4
  86. package/dist/components/icons/generated/Profile.d.ts +2 -1
  87. package/dist/components/icons/generated/Profile.d.ts.map +1 -0
  88. package/dist/components/icons/generated/Profile.js +12 -4
  89. package/dist/components/icons/generated/ReplyFilled.d.ts +2 -1
  90. package/dist/components/icons/generated/ReplyFilled.d.ts.map +1 -0
  91. package/dist/components/icons/generated/ReplyFilled.js +15 -4
  92. package/dist/components/icons/generated/ReplyOutline.d.ts +2 -1
  93. package/dist/components/icons/generated/ReplyOutline.d.ts.map +1 -0
  94. package/dist/components/icons/generated/ReplyOutline.js +15 -4
  95. package/dist/components/icons/generated/Repost.d.ts +2 -1
  96. package/dist/components/icons/generated/Repost.d.ts.map +1 -0
  97. package/dist/components/icons/generated/Repost.js +15 -4
  98. package/dist/components/icons/generated/Send.d.ts +2 -1
  99. package/dist/components/icons/generated/Send.d.ts.map +1 -0
  100. package/dist/components/icons/generated/Send.js +15 -4
  101. package/dist/components/icons/generated/Settings.d.ts +2 -1
  102. package/dist/components/icons/generated/Settings.d.ts.map +1 -0
  103. package/dist/components/icons/generated/Settings.js +15 -4
  104. package/dist/components/icons/generated/Share.d.ts +2 -1
  105. package/dist/components/icons/generated/Share.d.ts.map +1 -0
  106. package/dist/components/icons/generated/Share.js +12 -4
  107. package/dist/components/icons/generated/Time.d.ts +2 -1
  108. package/dist/components/icons/generated/Time.d.ts.map +1 -0
  109. package/dist/components/icons/generated/Time.js +12 -4
  110. package/dist/components/icons/generated/Upload.d.ts +2 -1
  111. package/dist/components/icons/generated/Upload.d.ts.map +1 -0
  112. package/dist/components/icons/generated/Upload.js +21 -4
  113. package/dist/components/icons/generated/index.d.ts +25 -24
  114. package/dist/components/icons/generated/index.d.ts.map +1 -0
  115. package/dist/components/index.d.ts +28 -27
  116. package/dist/components/index.d.ts.map +1 -0
  117. package/dist/components/input/Input.d.ts +6 -5
  118. package/dist/components/input/Input.d.ts.map +1 -0
  119. package/dist/components/input/Input.js +67 -41
  120. package/dist/components/like-toggle/LikeToggle.d.ts +4 -3
  121. package/dist/components/like-toggle/LikeToggle.d.ts.map +1 -0
  122. package/dist/components/like-toggle/LikeToggle.js +203 -176
  123. package/dist/components/logo-link/LogoLink.d.ts +1 -0
  124. package/dist/components/logo-link/LogoLink.d.ts.map +1 -0
  125. package/dist/components/logo-link/LogoLink.js +56 -34
  126. package/dist/components/modal/Modal.d.ts +23 -22
  127. package/dist/components/modal/Modal.d.ts.map +1 -0
  128. package/dist/components/modal/Modal.js +66 -50
  129. package/dist/components/navi-button/NaviButton.d.ts +7 -6
  130. package/dist/components/navi-button/NaviButton.d.ts.map +1 -0
  131. package/dist/components/navi-button/NaviButton.js +42 -30
  132. package/dist/components/navi-user-button/NaviUserButton.d.ts +5 -4
  133. package/dist/components/navi-user-button/NaviUserButton.d.ts.map +1 -0
  134. package/dist/components/navi-user-button/NaviUserButton.js +39 -29
  135. package/dist/components/round-button/RoundButton.d.ts +6 -5
  136. package/dist/components/round-button/RoundButton.d.ts.map +1 -0
  137. package/dist/components/round-button/RoundButton.js +39 -29
  138. package/dist/components/tabs/TabItem.d.ts +4 -3
  139. package/dist/components/tabs/TabItem.d.ts.map +1 -0
  140. package/dist/components/tabs/TabItem.js +11 -8
  141. package/dist/components/tabs/Tabs.d.ts +6 -5
  142. package/dist/components/tabs/Tabs.d.ts.map +1 -0
  143. package/dist/components/tabs/Tabs.js +74 -59
  144. package/dist/components/text-link/TextLink.d.ts +3 -2
  145. package/dist/components/text-link/TextLink.d.ts.map +1 -0
  146. package/dist/components/text-link/TextLink.js +14 -11
  147. package/dist/components/textarea/Textarea.d.ts +16 -15
  148. package/dist/components/textarea/Textarea.d.ts.map +1 -0
  149. package/dist/components/textarea/Textarea.js +57 -41
  150. package/dist/components/timed-button/TimedButton.d.ts +6 -5
  151. package/dist/components/timed-button/TimedButton.d.ts.map +1 -0
  152. package/dist/components/timed-button/TimedButton.js +116 -102
  153. package/dist/components/toggle/Toggle.d.ts +4 -3
  154. package/dist/components/toggle/Toggle.d.ts.map +1 -0
  155. package/dist/components/toggle/Toggle.js +91 -62
  156. package/dist/components/typography/AccessibleTypography.d.ts +2 -1
  157. package/dist/components/typography/AccessibleTypography.d.ts.map +1 -0
  158. package/dist/components/typography/AccessibleTypography.js +12 -9
  159. package/dist/components/typography/Heading.d.ts +5 -4
  160. package/dist/components/typography/Heading.d.ts.map +1 -0
  161. package/dist/components/typography/Heading.js +13 -9
  162. package/dist/components/typography/Label.d.ts +4 -3
  163. package/dist/components/typography/Label.d.ts.map +1 -0
  164. package/dist/components/typography/Label.js +13 -9
  165. package/dist/components/typography/Paragraph.d.ts +4 -3
  166. package/dist/components/typography/Paragraph.d.ts.map +1 -0
  167. package/dist/components/typography/Paragraph.js +13 -9
  168. package/dist/components/typography/Placeholder.d.ts +4 -3
  169. package/dist/components/typography/Placeholder.d.ts.map +1 -0
  170. package/dist/components/typography/Placeholder.js +13 -9
  171. package/dist/components/typography/ValidationMessage.d.ts +4 -3
  172. package/dist/components/typography/ValidationMessage.d.ts.map +1 -0
  173. package/dist/components/typography/ValidationMessage.js +14 -9
  174. package/dist/components/typography/styles.d.ts +10 -9
  175. package/dist/components/typography/styles.d.ts.map +1 -0
  176. package/dist/components/typography/styles.js +53 -46
  177. package/dist/compositions/image-banner/ImageBanner.d.ts +4 -3
  178. package/dist/compositions/image-banner/ImageBanner.d.ts.map +1 -0
  179. package/dist/compositions/image-banner/ImageBanner.js +53 -45
  180. package/dist/compositions/image-upload-modal/ImageUploadModal.d.ts +2 -1
  181. package/dist/compositions/image-upload-modal/ImageUploadModal.d.ts.map +1 -0
  182. package/dist/compositions/image-upload-modal/ImageUploadModal.js +44 -20
  183. package/dist/compositions/index.d.ts +12 -11
  184. package/dist/compositions/index.d.ts.map +1 -0
  185. package/dist/compositions/post/Post.d.ts +4 -3
  186. package/dist/compositions/post/Post.d.ts.map +1 -0
  187. package/dist/compositions/post/Post.js +81 -26
  188. package/dist/compositions/post-base/PostBase.d.ts +10 -9
  189. package/dist/compositions/post-base/PostBase.d.ts.map +1 -0
  190. package/dist/compositions/post-base/PostBase.js +23 -24
  191. package/dist/compositions/post-creator/PostCreator.d.ts +22 -21
  192. package/dist/compositions/post-creator/PostCreator.d.ts.map +1 -0
  193. package/dist/compositions/post-creator/PostCreator.js +72 -24
  194. package/dist/compositions/profile-banner/ProfileBanner.d.ts +19 -18
  195. package/dist/compositions/profile-banner/ProfileBanner.d.ts.map +1 -0
  196. package/dist/compositions/profile-banner/ProfileBanner.js +71 -21
  197. package/dist/compositions/profile-banner-image/ProfileBannerImage.d.ts +4 -3
  198. package/dist/compositions/profile-banner-image/ProfileBannerImage.d.ts.map +1 -0
  199. package/dist/compositions/profile-banner-image/ProfileBannerImage.js +60 -52
  200. package/dist/compositions/profile-banner-info/ProfileBannerInfo.d.ts +25 -24
  201. package/dist/compositions/profile-banner-info/ProfileBannerInfo.d.ts.map +1 -0
  202. package/dist/compositions/profile-banner-info/ProfileBannerInfo.js +72 -40
  203. package/dist/compositions/response/Response.d.ts +19 -18
  204. package/dist/compositions/response/Response.d.ts.map +1 -0
  205. package/dist/compositions/response/Response.js +63 -19
  206. package/dist/compositions/response-creator/ResponseCreator.d.ts +16 -15
  207. package/dist/compositions/response-creator/ResponseCreator.d.ts.map +1 -0
  208. package/dist/compositions/response-creator/ResponseCreator.js +67 -23
  209. package/dist/compositions/user-info/UserInfo.d.ts +22 -21
  210. package/dist/compositions/user-info/UserInfo.d.ts.map +1 -0
  211. package/dist/compositions/user-info/UserInfo.js +71 -52
  212. package/dist/compositions/user-recommendation/UserRecommendation.d.ts +16 -15
  213. package/dist/compositions/user-recommendation/UserRecommendation.d.ts.map +1 -0
  214. package/dist/compositions/user-recommendation/UserRecommendation.js +58 -30
  215. package/dist/index.d.ts +3 -3
  216. package/dist/index.d.ts.map +1 -0
  217. package/dist/index.js +129 -4
  218. package/dist/setupTests.d.ts +1 -1
  219. package/dist/setupTests.d.ts.map +1 -0
  220. package/package.json +16 -14
  221. package/dist/components/accessible-button/AccessibleButton.test.d.ts +0 -1
  222. package/dist/components/accessible-button/AccessibleButton.test.js +0 -28
  223. package/dist/components/button/Button.test.d.ts +0 -1
  224. package/dist/components/button/Button.test.js +0 -30
  225. package/dist/components/icon-button/IconButton.test.d.ts +0 -1
  226. package/dist/components/icon-button/IconButton.test.js +0 -22
  227. package/dist/components/icons/generated/index.js +0 -24
  228. package/dist/components/index.js +0 -27
  229. package/dist/components/like-toggle/LikeToggle.test.d.ts +0 -1
  230. package/dist/components/like-toggle/LikeToggle.test.js +0 -35
  231. package/dist/components/modal/Modal.test.d.ts +0 -1
  232. package/dist/components/modal/Modal.test.js +0 -24
  233. package/dist/components/navi-button/NaviButton.test.d.ts +0 -1
  234. package/dist/components/navi-button/NaviButton.test.js +0 -22
  235. package/dist/components/round-button/RoundButton.test.d.ts +0 -1
  236. package/dist/components/round-button/RoundButton.test.js +0 -22
  237. package/dist/components/tabs/Tabs.test.d.ts +0 -1
  238. package/dist/components/tabs/Tabs.test.js +0 -61
  239. package/dist/components/text-link/TextLink.test.d.ts +0 -1
  240. package/dist/components/text-link/TextLink.test.js +0 -14
  241. package/dist/components/timed-button/TimedButton.test.d.ts +0 -1
  242. package/dist/components/timed-button/TimedButton.test.js +0 -36
  243. package/dist/components/toggle/Toggle.test.d.ts +0 -1
  244. package/dist/components/toggle/Toggle.test.js +0 -93
  245. package/dist/compositions/index.js +0 -11
  246. package/dist/favicon.svg +0 -18
  247. package/dist/index.cjs.js +0 -50
  248. package/dist/index.es.js +0 -8343
  249. package/dist/logo-inline-gradient.svg +0 -43
  250. package/dist/setupTests.js +0 -7
@@ -1,67 +1,82 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import * as RadixTabs from "@radix-ui/react-tabs";
3
3
  import React from "react";
4
4
  import { tv } from "tailwind-variants";
5
- import { Label } from "../typography/Label";
5
+ import { Label } from "../typography/Label.js";
6
6
  const tabStyles = tv({
7
- slots: {
8
- list: ["bg-slate-200", "rounded-lg", "p-1", "flex", "gap-2", "group"],
9
- trigger: ["pt-2", "pb-2", "pr-3", "pl-3", "rounded-md"],
7
+ slots: {
8
+ list: ["bg-slate-200", "rounded-lg", "p-1", "flex", "gap-2", "group"],
9
+ trigger: ["pt-2", "pb-2", "pr-3", "pl-3", "rounded-md"]
10
+ },
11
+ variants: {
12
+ selected: {
13
+ false: {
14
+ trigger: ["bg-slate-200", "group-hover:text-slate-800"]
15
+ },
16
+ true: {
17
+ trigger: ["bg-white", "text-violet-600"]
18
+ }
10
19
  },
11
- variants: {
12
- selected: {
13
- false: {
14
- trigger: ["bg-slate-200", "group-hover:text-slate-800"],
15
- },
16
- true: {
17
- trigger: ["bg-white", "text-violet-600"],
18
- },
19
- },
20
- effect: {
21
- first: {},
22
- middle: {},
23
- last: {},
24
- },
20
+ effect: {
21
+ first: {},
22
+ middle: {},
23
+ last: {}
24
+ }
25
+ },
26
+ compoundVariants: [
27
+ {
28
+ selected: true,
29
+ effect: "first",
30
+ class: {
31
+ trigger: ["group-hover:pr-6"]
32
+ }
25
33
  },
26
- compoundVariants: [
27
- {
28
- selected: true,
29
- effect: "first",
30
- class: {
31
- trigger: ["group-hover:pr-6"],
32
- },
33
- },
34
- {
35
- selected: true,
36
- effect: "middle",
37
- class: {
38
- trigger: ["group-hover:pr-6", "group-hover:pl-6"],
39
- },
40
- },
41
- {
42
- selected: true,
43
- effect: "last",
44
- class: {
45
- trigger: ["group-hover:pl-6"],
46
- },
47
- },
48
- ],
34
+ {
35
+ selected: true,
36
+ effect: "middle",
37
+ class: {
38
+ trigger: ["group-hover:pr-6", "group-hover:pl-6"]
39
+ }
40
+ },
41
+ {
42
+ selected: true,
43
+ effect: "last",
44
+ class: {
45
+ trigger: ["group-hover:pl-6"]
46
+ }
47
+ }
48
+ ]
49
49
  });
50
- export const Tabs = (props) => {
51
- const { list, trigger } = tabStyles(props);
52
- const [currentSelection, setSelection] = React.useState(props.value);
53
- const getEffectVariant = (index, max) => index === 0 ? "first" : max === index ? "last" : "middle";
54
- const onClick = (value) => {
55
- setSelection(value);
56
- props.onChange?.(value);
57
- };
58
- return (_jsxs(RadixTabs.Root, { defaultValue: props.value, children: [_jsx(RadixTabs.List, { className: list(), children: props.children.map((child, index) => (_jsx(RadixTabs.Trigger, { value: child.props.value, className: trigger({
59
- selected: child.props.value === currentSelection,
60
- effect: getEffectVariant(index, props.children.length - 1),
61
- }), onClick: () => onClick(child.props.value), children: _jsx(Label, { size: "lg", children: child.props.label }) }, child.props.value))) }), React.Children.map(props.children, (child, index) => {
62
- if (React.isValidElement(child)) {
63
- return React.cloneElement(child, { key: props.value || index });
64
- }
65
- return child;
66
- })] }));
50
+ const Tabs = (props) => {
51
+ const { list, trigger } = tabStyles(props);
52
+ const [currentSelection, setSelection] = React.useState(props.value);
53
+ const getEffectVariant = (index, max) => index === 0 ? "first" : max === index ? "last" : "middle";
54
+ const onClick = (value) => {
55
+ setSelection(value);
56
+ props.onChange?.(value);
57
+ };
58
+ return /* @__PURE__ */ jsxs(RadixTabs.Root, { defaultValue: props.value, children: [
59
+ /* @__PURE__ */ jsx(RadixTabs.List, { className: list(), children: props.children.map((child, index) => /* @__PURE__ */ jsx(
60
+ RadixTabs.Trigger,
61
+ {
62
+ value: child.props.value,
63
+ className: trigger({
64
+ selected: child.props.value === currentSelection,
65
+ effect: getEffectVariant(index, props.children.length - 1)
66
+ }),
67
+ onClick: () => onClick(child.props.value),
68
+ children: /* @__PURE__ */ jsx(Label, { size: "lg", children: child.props.label })
69
+ },
70
+ child.props.value
71
+ )) }),
72
+ React.Children.map(props.children, (child, index) => {
73
+ if (React.isValidElement(child)) {
74
+ return React.cloneElement(child, { key: props.value || index });
75
+ }
76
+ return child;
77
+ })
78
+ ] });
79
+ };
80
+ export {
81
+ Tabs
67
82
  };
@@ -1,5 +1,5 @@
1
- import { type VariantProps } from "tailwind-variants";
2
- declare const textLinkStyles: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, string[], {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, string[], unknown, unknown, undefined>>;
1
+ import { VariantProps } from 'tailwind-variants';
2
+ declare const textLinkStyles: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, string[], {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, string[], unknown, unknown, undefined>>;
3
3
  type TextLinkVariants = VariantProps<typeof textLinkStyles>;
4
4
  interface TextLinkProps extends TextLinkVariants {
5
5
  href: string;
@@ -7,3 +7,4 @@ interface TextLinkProps extends TextLinkVariants {
7
7
  }
8
8
  export declare const TextLink: (props: TextLinkProps) => import("react/jsx-runtime").JSX.Element;
9
9
  export {};
10
+ //# sourceMappingURL=TextLink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextLink.d.ts","sourceRoot":"","sources":["../../../src/components/text-link/TextLink.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAG1D,QAAA,MAAM,cAAc,sMAQlB,CAAC;AAEH,KAAK,gBAAgB,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D,UAAU,aAAc,SAAQ,gBAAgB;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,QAAQ,GAAI,OAAO,aAAa,4CAQ5C,CAAC"}
@@ -1,15 +1,18 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { tv } from "tailwind-variants";
3
- import { Label } from "../typography/Label";
3
+ import { Label } from "../typography/Label.js";
4
4
  const textLinkStyles = tv({
5
- base: [
6
- "text-violet-600",
7
- "underline",
8
- "decoration-violet-600",
9
- "underline-offset-2",
10
- "hover:decoration-violet-200",
11
- ],
5
+ base: [
6
+ "text-violet-600",
7
+ "underline",
8
+ "decoration-violet-600",
9
+ "underline-offset-2",
10
+ "hover:decoration-violet-200"
11
+ ]
12
12
  });
13
- export const TextLink = (props) => {
14
- return (_jsx(Label, { size: "sm", as: "span", children: _jsx("a", { href: props.href, className: textLinkStyles(props), children: props.children }) }));
13
+ const TextLink = (props) => {
14
+ return /* @__PURE__ */ jsx(Label, { size: "sm", as: "span", children: /* @__PURE__ */ jsx("a", { href: props.href, className: textLinkStyles(props), children: props.children }) });
15
+ };
16
+ export {
17
+ TextLink
15
18
  };
@@ -1,18 +1,18 @@
1
- import { type VariantProps } from "tailwind-variants";
2
- declare const textareaStyles: import("tailwind-variants").TVReturnType<{
1
+ import { VariantProps } from 'tailwind-variants';
2
+ declare const textareaStyles: import('tailwind-variants').TVReturnType<{
3
3
  [key: string]: {
4
- [key: string]: import("tailwind-merge").ClassNameValue | {
5
- base?: import("tailwind-merge").ClassNameValue;
6
- control?: import("tailwind-merge").ClassNameValue;
7
- message?: import("tailwind-merge").ClassNameValue;
4
+ [key: string]: import('tailwind-merge').ClassNameValue | {
5
+ base?: import('tailwind-merge').ClassNameValue;
6
+ control?: import('tailwind-merge').ClassNameValue;
7
+ message?: import('tailwind-merge').ClassNameValue;
8
8
  };
9
9
  };
10
10
  } | {
11
11
  [x: string]: {
12
- [x: string]: import("tailwind-merge").ClassNameValue | {
13
- base?: import("tailwind-merge").ClassNameValue;
14
- control?: import("tailwind-merge").ClassNameValue;
15
- message?: import("tailwind-merge").ClassNameValue;
12
+ [x: string]: import('tailwind-merge').ClassNameValue | {
13
+ base?: import('tailwind-merge').ClassNameValue;
14
+ control?: import('tailwind-merge').ClassNameValue;
15
+ message?: import('tailwind-merge').ClassNameValue;
16
16
  };
17
17
  };
18
18
  } | {}, {
@@ -21,17 +21,17 @@ declare const textareaStyles: import("tailwind-variants").TVReturnType<{
21
21
  message: string[];
22
22
  }, undefined, {
23
23
  [key: string]: {
24
- [key: string]: import("tailwind-merge").ClassNameValue | {
25
- base?: import("tailwind-merge").ClassNameValue;
26
- control?: import("tailwind-merge").ClassNameValue;
27
- message?: import("tailwind-merge").ClassNameValue;
24
+ [key: string]: import('tailwind-merge').ClassNameValue | {
25
+ base?: import('tailwind-merge').ClassNameValue;
26
+ control?: import('tailwind-merge').ClassNameValue;
27
+ message?: import('tailwind-merge').ClassNameValue;
28
28
  };
29
29
  };
30
30
  } | {}, {
31
31
  base: string[];
32
32
  control: string[];
33
33
  message: string[];
34
- }, import("tailwind-variants").TVReturnType<unknown, {
34
+ }, import('tailwind-variants').TVReturnType<unknown, {
35
35
  base: string[];
36
36
  control: string[];
37
37
  message: string[];
@@ -46,3 +46,4 @@ interface TextareaProps extends TextareaVariants {
46
46
  }
47
47
  export declare const Textarea: ({ isRequired, ...props }: TextareaProps) => import("react/jsx-runtime").JSX.Element;
48
48
  export {};
49
+ //# sourceMappingURL=Textarea.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/components/textarea/Textarea.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAI1D,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAiClB,CAAC;AAEH,KAAK,gBAAgB,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D,UAAU,aAAc,SAAQ,gBAAgB;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED,eAAO,MAAM,QAAQ,GAAI,0BAAkC,aAAa,4CAoCvE,CAAC"}
@@ -1,48 +1,64 @@
1
1
  "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsxs, jsx } from "react/jsx-runtime";
3
3
  import * as RadixForm from "@radix-ui/react-form";
4
4
  import { useState } from "react";
5
5
  import { tv } from "tailwind-variants";
6
- import { Label } from "../typography/Label";
7
- import { ValidationMessage } from "../typography/ValidationMessage";
6
+ import { Label } from "../typography/Label.js";
7
+ import { ValidationMessage } from "../typography/ValidationMessage.js";
8
8
  const textareaStyles = tv({
9
- slots: {
10
- base: ["flex", "flex-col", "gap-1", "w-full", "h-full"],
11
- control: [
12
- "w-full",
13
- "h-full",
14
- "ring",
15
- "hover:ring-2",
16
- "focus:ring-2",
17
- "ring-slate-200",
18
- "hover:ring-slate-300",
19
- "focus:ring-violet-600",
20
- "focus-visible:ring-violet-600",
21
- "focus-within:ring-violet-600",
22
- "focus-visible:outline-none",
23
- "bg-slate-100",
24
- "rounded-lg",
25
- "p-4",
26
- "transition",
27
- "duration-300",
28
- "ease-in-out",
29
- "font-medium",
30
- "text-slate-900",
31
- "text-[20px]/[135%]",
32
- "tracking-normal",
33
- "placeholder:font-medium",
34
- "placeholder:text-slate-500",
35
- "placeholder:text-[20px]/[135%]",
36
- "placeholder:tracking-normal",
37
- "resize-none",
38
- ],
39
- message: ["text-error"],
40
- },
9
+ slots: {
10
+ base: ["flex", "flex-col", "gap-1", "w-full", "h-full"],
11
+ control: [
12
+ "w-full",
13
+ "h-full",
14
+ "ring",
15
+ "hover:ring-2",
16
+ "focus:ring-2",
17
+ "ring-slate-200",
18
+ "hover:ring-slate-300",
19
+ "focus:ring-violet-600",
20
+ "focus-visible:ring-violet-600",
21
+ "focus-within:ring-violet-600",
22
+ "focus-visible:outline-none",
23
+ "bg-slate-100",
24
+ "rounded-lg",
25
+ "p-4",
26
+ "transition",
27
+ "duration-300",
28
+ "ease-in-out",
29
+ "font-medium",
30
+ "text-slate-900",
31
+ "text-[20px]/[135%]",
32
+ "tracking-normal",
33
+ "placeholder:font-medium",
34
+ "placeholder:text-slate-500",
35
+ "placeholder:text-[20px]/[135%]",
36
+ "placeholder:tracking-normal",
37
+ "resize-none"
38
+ ],
39
+ message: ["text-error"]
40
+ }
41
41
  });
42
- export const Textarea = ({ isRequired = false, ...props }) => {
43
- const { base, control, message } = textareaStyles({
44
- ...props,
45
- });
46
- const [value, setValue] = useState("");
47
- return (_jsxs(RadixForm.Field, { name: props.name, className: base(props), children: [props.label && (_jsx(RadixForm.Label, { children: _jsx(Label, { size: "md", children: props.label }) })), _jsx(RadixForm.Control, { asChild: true, children: _jsx("textarea", { className: control(props), required: isRequired, placeholder: props.placeholder, onChange: (e) => setValue(e.target.value), onBlur: () => props.onChange(value) }) }), _jsx("div", { className: message(props), children: isRequired && (_jsx(RadixForm.Message, { match: "valueMissing", children: _jsx(ValidationMessage, { children: `${props.name} is required` }) })) })] }));
42
+ const Textarea = ({ isRequired = false, ...props }) => {
43
+ const { base, control, message } = textareaStyles({
44
+ ...props
45
+ });
46
+ const [value, setValue] = useState("");
47
+ return /* @__PURE__ */ jsxs(RadixForm.Field, { name: props.name, className: base(props), children: [
48
+ props.label && /* @__PURE__ */ jsx(RadixForm.Label, { children: /* @__PURE__ */ jsx(Label, { size: "md", children: props.label }) }),
49
+ /* @__PURE__ */ jsx(RadixForm.Control, { asChild: true, children: /* @__PURE__ */ jsx(
50
+ "textarea",
51
+ {
52
+ className: control(props),
53
+ required: isRequired,
54
+ placeholder: props.placeholder,
55
+ onChange: (e) => setValue(e.target.value),
56
+ onBlur: () => props.onChange(value)
57
+ }
58
+ ) }),
59
+ /* @__PURE__ */ jsx("div", { className: message(props), children: isRequired && /* @__PURE__ */ jsx(RadixForm.Message, { match: "valueMissing", children: /* @__PURE__ */ jsx(ValidationMessage, { children: `${props.name} is required` }) }) })
60
+ ] });
61
+ };
62
+ export {
63
+ Textarea
48
64
  };
@@ -1,7 +1,7 @@
1
- import { type VariantProps } from "tailwind-variants";
2
- import { type BaseAccessibleButtonProps } from "../accessible-button/AccessibleButton";
3
- import type { IconBaseProps } from "../icons/IconBase";
4
- declare const timedButtonStyles: import("tailwind-variants").TVReturnType<{
1
+ import { VariantProps } from 'tailwind-variants';
2
+ import { BaseAccessibleButtonProps } from '../accessible-button/AccessibleButton';
3
+ import { IconBaseProps } from '../icons/IconBase';
4
+ declare const timedButtonStyles: import('tailwind-variants').TVReturnType<{
5
5
  pressed: {
6
6
  false: {};
7
7
  true: {
@@ -31,7 +31,7 @@ declare const timedButtonStyles: import("tailwind-variants").TVReturnType<{
31
31
  base: string[];
32
32
  icon: string[];
33
33
  label: string[];
34
- }, import("tailwind-variants").TVReturnType<{
34
+ }, import('tailwind-variants').TVReturnType<{
35
35
  pressed: {
36
36
  false: {};
37
37
  true: {
@@ -77,3 +77,4 @@ interface TimedButtonProps extends TimedButtonVariants, BaseAccessibleButtonProp
77
77
  */
78
78
  export declare const TimedButton: React.FC<TimedButtonProps>;
79
79
  export {};
80
+ //# sourceMappingURL=TimedButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TimedButton.d.ts","sourceRoot":"","sources":["../../../src/components/timed-button/TimedButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAAU,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,uCAAuC,CAAC;AAE/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAoErB,CAAC;AAEH,KAAK,mBAAmB,GAAG,YAAY,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE;;;;;GAKG;AACH,UAAU,gBACR,SAAQ,mBAAmB,EAAE,yBAAyB;IACtD;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;IAE1C;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAwDlD,CAAC"}
@@ -1,109 +1,123 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useEffect, useRef, useState } from "react";
3
- import { cn, tv } from "tailwind-variants";
4
- import { AccessibleButton, } from "../accessible-button/AccessibleButton";
5
- import { Label } from "../typography/Label";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { useState, useRef, useEffect } from "react";
3
+ import { tv, cn } from "tailwind-variants";
4
+ import { AccessibleButton } from "../accessible-button/AccessibleButton.js";
5
+ import { Label } from "../typography/Label.js";
6
6
  const timedButtonStyles = tv({
7
- slots: {
8
- base: [
9
- "inline-flex",
10
- "items-center",
11
- "justify-center",
12
- "gap-2",
13
- "h-8",
14
- "px-3",
15
- "py-2",
16
- "rounded-full",
17
- "focus-visible:outline-none",
18
- "focus-visible:ring-2",
19
- "focus-visible:ring-offset-2",
20
- "disabled:opacity-50",
21
- "disabled:pointer-events-none",
22
- "hover:bg-slate-100",
23
- "overflow-hidden",
24
- ],
25
- icon: ["w-4", "h-4", "inline-flex"],
26
- label: ["transition-opacity", "duration-350", "ease-in-out"],
7
+ slots: {
8
+ base: [
9
+ "inline-flex",
10
+ "items-center",
11
+ "justify-center",
12
+ "gap-2",
13
+ "h-8",
14
+ "px-3",
15
+ "py-2",
16
+ "rounded-full",
17
+ "focus-visible:outline-none",
18
+ "focus-visible:ring-2",
19
+ "focus-visible:ring-offset-2",
20
+ "disabled:opacity-50",
21
+ "disabled:pointer-events-none",
22
+ "hover:bg-slate-100",
23
+ "overflow-hidden"
24
+ ],
25
+ icon: ["w-4", "h-4", "inline-flex"],
26
+ label: ["transition-opacity", "duration-350", "ease-in-out"]
27
+ },
28
+ variants: {
29
+ pressed: {
30
+ false: {},
31
+ true: {
32
+ base: ["bg-slate-100"]
33
+ }
27
34
  },
28
- variants: {
29
- pressed: {
30
- false: {},
31
- true: {
32
- base: ["bg-slate-100"],
33
- },
34
- },
35
- animating: {
36
- true: {},
37
- false: {},
38
- },
35
+ animating: {
36
+ true: {},
37
+ false: {}
38
+ }
39
+ },
40
+ compoundVariants: [
41
+ {
42
+ pressed: true,
43
+ animating: true,
44
+ class: {
45
+ label: ["opacity-0"]
46
+ }
39
47
  },
40
- compoundVariants: [
41
- {
42
- pressed: true,
43
- animating: true,
44
- class: {
45
- label: ["opacity-0"],
46
- },
47
- },
48
- {
49
- pressed: true,
50
- animating: false,
51
- class: {
52
- label: ["opacity-100"],
53
- },
54
- },
55
- {
56
- pressed: false,
57
- animating: true,
58
- class: {
59
- label: ["opacity-0"],
60
- },
61
- },
62
- {
63
- pressed: false,
64
- animating: false,
65
- class: {
66
- label: ["opacity-100"],
67
- },
68
- },
69
- ],
70
- defaultVariants: {
71
- pressed: false,
72
- animating: false,
48
+ {
49
+ pressed: true,
50
+ animating: false,
51
+ class: {
52
+ label: ["opacity-100"]
53
+ }
73
54
  },
55
+ {
56
+ pressed: false,
57
+ animating: true,
58
+ class: {
59
+ label: ["opacity-0"]
60
+ }
61
+ },
62
+ {
63
+ pressed: false,
64
+ animating: false,
65
+ class: {
66
+ label: ["opacity-100"]
67
+ }
68
+ }
69
+ ],
70
+ defaultVariants: {
71
+ pressed: false,
72
+ animating: false
73
+ }
74
74
  });
75
- /**
76
- * A button component that temporarily changes its label when pressed.
77
- */
78
- export const TimedButton = ({ className, onClick, ...props }) => {
79
- const [pressed, setPressed] = useState(false);
80
- const [animating, setAnimating] = useState(false);
81
- const timeoutsRef = useRef([]);
82
- const { base, icon: iconClass, label: labelClass, } = timedButtonStyles({ pressed, animating });
83
- useEffect(() => {
84
- // Cleanup all timeouts when component unmounts
85
- return () => {
86
- timeoutsRef.current.forEach((timeout) => clearTimeout(timeout));
87
- timeoutsRef.current = [];
88
- };
89
- }, []);
90
- const handleClick = () => {
91
- // Klick -> Pressed
92
- setPressed(true);
93
- setAnimating(true);
94
- onClick?.();
95
- // Hover -> Pressed: Dissolve über 350ms
96
- const timeout1 = setTimeout(() => setAnimating(false), 350);
97
- timeoutsRef.current.push(timeout1);
98
- // Nach 1s Verzögerung -> zurück zu Default
99
- const timeout2 = setTimeout(() => {
100
- setPressed(false);
101
- setAnimating(true);
102
- // Dissolve zurück
103
- const timeout3 = setTimeout(() => setAnimating(false), 350);
104
- timeoutsRef.current.push(timeout3);
105
- }, 1000);
106
- timeoutsRef.current.push(timeout2);
75
+ const TimedButton = ({
76
+ className,
77
+ onClick,
78
+ ...props
79
+ }) => {
80
+ const [pressed, setPressed] = useState(false);
81
+ const [animating, setAnimating] = useState(false);
82
+ const timeoutsRef = useRef([]);
83
+ const {
84
+ base,
85
+ icon: iconClass,
86
+ label: labelClass
87
+ } = timedButtonStyles({ pressed, animating });
88
+ useEffect(() => {
89
+ return () => {
90
+ timeoutsRef.current.forEach((timeout) => clearTimeout(timeout));
91
+ timeoutsRef.current = [];
107
92
  };
108
- return (_jsxs(AccessibleButton, { className: cn(base(props), className), onClick: handleClick, ...props, children: [props.icon && _jsx(props.icon, { className: iconClass(), "aria-hidden": "true" }), _jsx(Label, { as: "span", size: "md", className: labelClass(), children: pressed ? props.labelActive : props.label })] }));
93
+ }, []);
94
+ const handleClick = () => {
95
+ setPressed(true);
96
+ setAnimating(true);
97
+ onClick?.();
98
+ const timeout1 = setTimeout(() => setAnimating(false), 350);
99
+ timeoutsRef.current.push(timeout1);
100
+ const timeout2 = setTimeout(() => {
101
+ setPressed(false);
102
+ setAnimating(true);
103
+ const timeout3 = setTimeout(() => setAnimating(false), 350);
104
+ timeoutsRef.current.push(timeout3);
105
+ }, 1e3);
106
+ timeoutsRef.current.push(timeout2);
107
+ };
108
+ return /* @__PURE__ */ jsxs(
109
+ AccessibleButton,
110
+ {
111
+ className: cn(base(props), className),
112
+ onClick: handleClick,
113
+ ...props,
114
+ children: [
115
+ props.icon && /* @__PURE__ */ jsx(props.icon, { className: iconClass(), "aria-hidden": "true" }),
116
+ /* @__PURE__ */ jsx(Label, { as: "span", size: "md", className: labelClass(), children: pressed ? props.labelActive : props.label })
117
+ ]
118
+ }
119
+ );
120
+ };
121
+ export {
122
+ TimedButton
109
123
  };
@@ -1,5 +1,5 @@
1
- import { type VariantProps } from "tailwind-variants";
2
- declare const toggleStyles: import("tailwind-variants").TVReturnType<{
1
+ import { VariantProps } from 'tailwind-variants';
2
+ declare const toggleStyles: import('tailwind-variants').TVReturnType<{
3
3
  pressed: {
4
4
  true: {
5
5
  base: string[];
@@ -33,7 +33,7 @@ declare const toggleStyles: import("tailwind-variants").TVReturnType<{
33
33
  base: string[];
34
34
  icon: string[];
35
35
  label: never[];
36
- }, import("tailwind-variants").TVReturnType<{
36
+ }, import('tailwind-variants').TVReturnType<{
37
37
  pressed: {
38
38
  true: {
39
39
  base: string[];
@@ -60,3 +60,4 @@ interface ToggleProps extends ToggleVariants {
60
60
  }
61
61
  export declare const Toggle: ({ ariaLabel, labelText, pressed, onToggle, }: ToggleProps) => import("react/jsx-runtime").JSX.Element;
62
62
  export {};
63
+ //# sourceMappingURL=Toggle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toggle.d.ts","sourceRoot":"","sources":["../../../src/components/toggle/Toggle.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAI1D,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CA0DhB,CAAC;AACH,KAAK,cAAc,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC;AAExD,UAAU,WAAY,SAAQ,cAAc;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CACtC;AAED,eAAO,MAAM,MAAM,GAAI,8CAKpB,WAAW,4CAwBb,CAAC"}