@krrli/cm-designsystem 1.32.0 → 1.32.2

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 (179) 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.js +29 -11
  4. package/dist/components/avatar/Avatar.js +91 -65
  5. package/dist/components/branding/BrandingGallery.js +212 -145
  6. package/dist/components/branding/app-icon-gradient.svg.js +4 -0
  7. package/dist/components/branding/app-icon-white.svg.js +4 -0
  8. package/dist/components/branding/hover-logo-default.svg.js +4 -0
  9. package/dist/components/branding/hover-logo-hovered.svg.js +4 -0
  10. package/dist/components/branding/logo-inline-gradient.svg.js +4 -0
  11. package/dist/components/branding/logo-inline-violet.svg.js +4 -0
  12. package/dist/components/branding/logo-inline-white.svg.js +4 -0
  13. package/dist/components/branding/logo-stacked-gradient.svg.js +4 -0
  14. package/dist/components/branding/logo-stacked-violet.svg.js +4 -0
  15. package/dist/components/branding/logo-stacked-white.svg.js +4 -0
  16. package/dist/components/branding/superzeichen.svg.js +4 -0
  17. package/dist/components/button/Button.js +61 -55
  18. package/dist/components/color/ColorDoc.js +26 -7
  19. package/dist/components/file-upload/FileUpload.js +129 -66
  20. package/dist/components/form/Form.js +33 -26
  21. package/dist/components/icon-button/IconButton.js +33 -29
  22. package/dist/components/icons/IconBase.js +21 -6
  23. package/dist/components/icons/generated/ArrowDown.js +15 -4
  24. package/dist/components/icons/generated/ArrowLeft.js +15 -4
  25. package/dist/components/icons/generated/ArrowRight.js +15 -4
  26. package/dist/components/icons/generated/ArrowUp.js +15 -4
  27. package/dist/components/icons/generated/Calendar.js +15 -4
  28. package/dist/components/icons/generated/Cancel.js +12 -4
  29. package/dist/components/icons/generated/Checkmark.js +12 -4
  30. package/dist/components/icons/generated/Edit.js +9 -4
  31. package/dist/components/icons/generated/Eye.js +15 -4
  32. package/dist/components/icons/generated/Fullscreen.js +9 -4
  33. package/dist/components/icons/generated/HeartFilled.js +15 -4
  34. package/dist/components/icons/generated/HeartOutline.js +15 -4
  35. package/dist/components/icons/generated/Location.js +15 -4
  36. package/dist/components/icons/generated/LogOut.js +12 -4
  37. package/dist/components/icons/generated/Mumble.js +13 -4
  38. package/dist/components/icons/generated/Profile.js +12 -4
  39. package/dist/components/icons/generated/ReplyFilled.js +15 -4
  40. package/dist/components/icons/generated/ReplyOutline.js +15 -4
  41. package/dist/components/icons/generated/Repost.js +15 -4
  42. package/dist/components/icons/generated/Send.js +15 -4
  43. package/dist/components/icons/generated/Settings.js +15 -4
  44. package/dist/components/icons/generated/Share.js +12 -4
  45. package/dist/components/icons/generated/Time.js +12 -4
  46. package/dist/components/icons/generated/Upload.js +21 -4
  47. package/dist/components/input/Input.js +67 -41
  48. package/dist/components/like-toggle/LikeToggle.js +203 -176
  49. package/dist/components/logo-link/LogoLink.js +56 -34
  50. package/dist/components/modal/Modal.js +66 -50
  51. package/dist/components/navi-button/NaviButton.js +42 -30
  52. package/dist/components/navi-user-button/NaviUserButton.js +39 -29
  53. package/dist/components/round-button/RoundButton.js +39 -29
  54. package/dist/components/tabs/TabItem.js +11 -8
  55. package/dist/components/tabs/Tabs.js +74 -59
  56. package/dist/components/text-link/TextLink.js +14 -11
  57. package/dist/components/textarea/Textarea.js +57 -41
  58. package/dist/components/timed-button/TimedButton.js +116 -102
  59. package/dist/components/toggle/Toggle.js +91 -62
  60. package/dist/components/typography/AccessibleTypography.js +12 -9
  61. package/dist/components/typography/Heading.js +13 -9
  62. package/dist/components/typography/Label.js +13 -9
  63. package/dist/components/typography/Paragraph.js +13 -9
  64. package/dist/components/typography/Placeholder.js +13 -9
  65. package/dist/components/typography/ValidationMessage.js +14 -9
  66. package/dist/components/typography/styles.js +53 -46
  67. package/dist/compositions/image-banner/ImageBanner.js +53 -45
  68. package/dist/compositions/image-upload-modal/ImageUploadModal.js +44 -20
  69. package/dist/compositions/post/Post.js +81 -26
  70. package/dist/compositions/post-base/PostBase.js +23 -24
  71. package/dist/compositions/post-creator/PostCreator.js +72 -24
  72. package/dist/compositions/profile-banner/ProfileBanner.js +71 -21
  73. package/dist/compositions/profile-banner-image/ProfileBannerImage.js +60 -52
  74. package/dist/compositions/profile-banner-info/ProfileBannerInfo.js +72 -40
  75. package/dist/compositions/response/Response.js +63 -19
  76. package/dist/compositions/response-creator/ResponseCreator.js +67 -23
  77. package/dist/compositions/user-info/UserInfo.js +71 -52
  78. package/dist/compositions/user-recommendation/UserRecommendation.js +58 -30
  79. package/dist/index.js +129 -4
  80. package/package.json +14 -11
  81. package/dist/components/accessible-button/AccessibleButton.d.ts +0 -32
  82. package/dist/components/accessible-button/AccessibleButton.test.d.ts +0 -1
  83. package/dist/components/accessible-button/AccessibleButton.test.js +0 -28
  84. package/dist/components/avatar/Avatar.d.ts +0 -118
  85. package/dist/components/branding/BrandingGallery.d.ts +0 -1
  86. package/dist/components/button/Button.d.ts +0 -66
  87. package/dist/components/button/Button.test.d.ts +0 -1
  88. package/dist/components/button/Button.test.js +0 -30
  89. package/dist/components/color/ColorDoc.d.ts +0 -4
  90. package/dist/components/file-upload/FileUpload.d.ts +0 -83
  91. package/dist/components/form/Form.d.ts +0 -54
  92. package/dist/components/icon-button/IconButton.d.ts +0 -69
  93. package/dist/components/icon-button/IconButton.test.d.ts +0 -1
  94. package/dist/components/icon-button/IconButton.test.js +0 -22
  95. package/dist/components/icons/IconBase.d.ts +0 -5
  96. package/dist/components/icons/generated/ArrowDown.d.ts +0 -3
  97. package/dist/components/icons/generated/ArrowLeft.d.ts +0 -3
  98. package/dist/components/icons/generated/ArrowRight.d.ts +0 -3
  99. package/dist/components/icons/generated/ArrowUp.d.ts +0 -3
  100. package/dist/components/icons/generated/Calendar.d.ts +0 -3
  101. package/dist/components/icons/generated/Cancel.d.ts +0 -3
  102. package/dist/components/icons/generated/Checkmark.d.ts +0 -3
  103. package/dist/components/icons/generated/Edit.d.ts +0 -3
  104. package/dist/components/icons/generated/Eye.d.ts +0 -3
  105. package/dist/components/icons/generated/Fullscreen.d.ts +0 -3
  106. package/dist/components/icons/generated/HeartFilled.d.ts +0 -3
  107. package/dist/components/icons/generated/HeartOutline.d.ts +0 -3
  108. package/dist/components/icons/generated/Location.d.ts +0 -3
  109. package/dist/components/icons/generated/LogOut.d.ts +0 -3
  110. package/dist/components/icons/generated/Mumble.d.ts +0 -3
  111. package/dist/components/icons/generated/Profile.d.ts +0 -3
  112. package/dist/components/icons/generated/ReplyFilled.d.ts +0 -3
  113. package/dist/components/icons/generated/ReplyOutline.d.ts +0 -3
  114. package/dist/components/icons/generated/Repost.d.ts +0 -3
  115. package/dist/components/icons/generated/Send.d.ts +0 -3
  116. package/dist/components/icons/generated/Settings.d.ts +0 -3
  117. package/dist/components/icons/generated/Share.d.ts +0 -3
  118. package/dist/components/icons/generated/Time.d.ts +0 -3
  119. package/dist/components/icons/generated/Upload.d.ts +0 -3
  120. package/dist/components/icons/generated/index.d.ts +0 -24
  121. package/dist/components/icons/generated/index.js +0 -24
  122. package/dist/components/index.d.ts +0 -27
  123. package/dist/components/index.js +0 -27
  124. package/dist/components/input/Input.d.ts +0 -61
  125. package/dist/components/like-toggle/LikeToggle.d.ts +0 -97
  126. package/dist/components/like-toggle/LikeToggle.test.d.ts +0 -1
  127. package/dist/components/like-toggle/LikeToggle.test.js +0 -35
  128. package/dist/components/logo-link/LogoLink.d.ts +0 -11
  129. package/dist/components/modal/Modal.d.ts +0 -75
  130. package/dist/components/modal/Modal.test.d.ts +0 -1
  131. package/dist/components/modal/Modal.test.js +0 -24
  132. package/dist/components/navi-button/NaviButton.d.ts +0 -49
  133. package/dist/components/navi-button/NaviButton.test.d.ts +0 -1
  134. package/dist/components/navi-button/NaviButton.test.js +0 -22
  135. package/dist/components/navi-user-button/NaviUserButton.d.ts +0 -44
  136. package/dist/components/round-button/RoundButton.d.ts +0 -44
  137. package/dist/components/round-button/RoundButton.test.d.ts +0 -1
  138. package/dist/components/round-button/RoundButton.test.js +0 -22
  139. package/dist/components/tabs/TabItem.d.ts +0 -11
  140. package/dist/components/tabs/Tabs.d.ts +0 -67
  141. package/dist/components/tabs/Tabs.test.d.ts +0 -1
  142. package/dist/components/tabs/Tabs.test.js +0 -61
  143. package/dist/components/text-link/TextLink.d.ts +0 -9
  144. package/dist/components/text-link/TextLink.test.d.ts +0 -1
  145. package/dist/components/text-link/TextLink.test.js +0 -14
  146. package/dist/components/textarea/Textarea.d.ts +0 -48
  147. package/dist/components/timed-button/TimedButton.d.ts +0 -79
  148. package/dist/components/timed-button/TimedButton.test.d.ts +0 -1
  149. package/dist/components/timed-button/TimedButton.test.js +0 -36
  150. package/dist/components/toggle/Toggle.d.ts +0 -62
  151. package/dist/components/toggle/Toggle.test.d.ts +0 -1
  152. package/dist/components/toggle/Toggle.test.js +0 -93
  153. package/dist/components/typography/AccessibleTypography.d.ts +0 -33
  154. package/dist/components/typography/Heading.d.ts +0 -24
  155. package/dist/components/typography/Label.d.ts +0 -22
  156. package/dist/components/typography/Paragraph.d.ts +0 -22
  157. package/dist/components/typography/Placeholder.d.ts +0 -17
  158. package/dist/components/typography/ValidationMessage.d.ts +0 -22
  159. package/dist/components/typography/styles.d.ts +0 -74
  160. package/dist/compositions/image-banner/ImageBanner.d.ts +0 -54
  161. package/dist/compositions/image-upload-modal/ImageUploadModal.d.ts +0 -15
  162. package/dist/compositions/index.d.ts +0 -11
  163. package/dist/compositions/index.js +0 -11
  164. package/dist/compositions/post/Post.d.ts +0 -75
  165. package/dist/compositions/post-base/PostBase.d.ts +0 -41
  166. package/dist/compositions/post-creator/PostCreator.d.ts +0 -69
  167. package/dist/compositions/profile-banner/ProfileBanner.d.ts +0 -82
  168. package/dist/compositions/profile-banner-image/ProfileBannerImage.d.ts +0 -54
  169. package/dist/compositions/profile-banner-info/ProfileBannerInfo.d.ts +0 -92
  170. package/dist/compositions/response/Response.d.ts +0 -75
  171. package/dist/compositions/response-creator/ResponseCreator.d.ts +0 -63
  172. package/dist/compositions/user-info/UserInfo.d.ts +0 -75
  173. package/dist/compositions/user-recommendation/UserRecommendation.d.ts +0 -63
  174. package/dist/favicon.svg +0 -18
  175. package/dist/index.d.ts +0 -3
  176. package/dist/index.es.js +0 -8343
  177. package/dist/logo-inline-gradient.svg +0 -43
  178. package/dist/setupTests.d.ts +0 -1
  179. package/dist/setupTests.js +0 -7
@@ -1,62 +1,78 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import * as RadixDialog from "@radix-ui/react-dialog";
3
3
  import React from "react";
4
4
  import { tv } from "tailwind-variants";
5
- import { Cancel } from "../icons/generated";
6
- import { Heading } from "../typography/Heading";
5
+ import { Heading } from "../typography/Heading.js";
6
+ import { Cancel } from "../icons/generated/Cancel.js";
7
7
  const modalStyles = tv({
8
- slots: {
9
- overlay: ["fixed", "inset-0", "bg-black/20"],
10
- content: [
11
- "fixed",
12
- "top-1/2",
13
- "left-1/2",
14
- "w-123",
15
- "-translate-x-1/2",
16
- "-translate-y-1/2",
17
- "rounded-2xl",
18
- "bg-white",
19
- ],
20
- title: [
21
- "flex",
22
- "justify-between",
23
- "rounded-t-2xl",
24
- "bg-violet-600",
25
- "pt-6",
26
- "pr-8",
27
- "pb-6",
28
- "pl-8",
29
- "text-white",
30
- ],
31
- container: ["flex", "flex-col", "items-center", "gap-12", "p-8"],
32
- actions: ["flex", "items-center", "gap-4", "w-full"],
33
- },
8
+ slots: {
9
+ overlay: ["fixed", "inset-0", "bg-black/20"],
10
+ content: [
11
+ "fixed",
12
+ "top-1/2",
13
+ "left-1/2",
14
+ "w-123",
15
+ "-translate-x-1/2",
16
+ "-translate-y-1/2",
17
+ "rounded-2xl",
18
+ "bg-white"
19
+ ],
20
+ title: [
21
+ "flex",
22
+ "justify-between",
23
+ "rounded-t-2xl",
24
+ "bg-violet-600",
25
+ "pt-6",
26
+ "pr-8",
27
+ "pb-6",
28
+ "pl-8",
29
+ "text-white"
30
+ ],
31
+ container: ["flex", "flex-col", "items-center", "gap-12", "p-8"],
32
+ actions: ["flex", "items-center", "gap-4", "w-full"]
33
+ }
34
34
  });
35
- export const Modal = (props) => {
36
- let modalBody = null;
37
- let modalActions = null;
38
- React.Children.forEach(props.children, (child) => {
39
- if (!React.isValidElement(child))
40
- return;
41
- switch (child.type) {
42
- case ModalBody:
43
- modalBody = child;
44
- break;
45
- case ModalActions:
46
- modalActions = child;
47
- break;
48
- }
49
- });
50
- const { overlay, content, title, container, actions } = modalStyles(props);
51
- return (_jsx(RadixDialog.Root, { open: props.open, onOpenChange: props.onOpenChange, children: _jsxs(RadixDialog.Portal, { children: [_jsx(RadixDialog.Overlay, { className: overlay() }), _jsxs(RadixDialog.Content, { className: content(), children: [_jsxs(RadixDialog.Title, { className: title(), children: [_jsx(Heading, { as: "span", size: "3", children: props.title }), _jsx(RadixDialog.Close, { children: _jsx(Cancel, {}) })] }), _jsxs("div", { className: container(), children: [modalBody, _jsx("div", { className: actions(), children: modalActions })] })] })] }) }));
35
+ const Modal = (props) => {
36
+ let modalBody = null;
37
+ let modalActions = null;
38
+ React.Children.forEach(props.children, (child) => {
39
+ if (!React.isValidElement(child)) return;
40
+ switch (child.type) {
41
+ case ModalBody:
42
+ modalBody = child;
43
+ break;
44
+ case ModalActions:
45
+ modalActions = child;
46
+ break;
47
+ }
48
+ });
49
+ const { overlay, content, title, container, actions } = modalStyles(props);
50
+ return /* @__PURE__ */ jsx(RadixDialog.Root, { open: props.open, onOpenChange: props.onOpenChange, children: /* @__PURE__ */ jsxs(RadixDialog.Portal, { children: [
51
+ /* @__PURE__ */ jsx(RadixDialog.Overlay, { className: overlay() }),
52
+ /* @__PURE__ */ jsxs(RadixDialog.Content, { className: content(), children: [
53
+ /* @__PURE__ */ jsxs(RadixDialog.Title, { className: title(), children: [
54
+ /* @__PURE__ */ jsx(Heading, { as: "span", size: "3", children: props.title }),
55
+ /* @__PURE__ */ jsx(RadixDialog.Close, { children: /* @__PURE__ */ jsx(Cancel, {}) })
56
+ ] }),
57
+ /* @__PURE__ */ jsxs("div", { className: container(), children: [
58
+ modalBody,
59
+ /* @__PURE__ */ jsx("div", { className: actions(), children: modalActions })
60
+ ] })
61
+ ] })
62
+ ] }) });
52
63
  };
53
64
  ModalBody.displayName = "ModalBody";
54
- export function ModalBody({ children }) {
55
- return children;
65
+ function ModalBody({ children }) {
66
+ return children;
56
67
  }
57
68
  ModalActions.displayName = "ModalActions";
58
- export function ModalActions({ children }) {
59
- return children;
69
+ function ModalActions({ children }) {
70
+ return children;
60
71
  }
61
72
  Modal.Body = ModalBody;
62
73
  Modal.Actions = ModalActions;
74
+ export {
75
+ Modal,
76
+ ModalActions,
77
+ ModalBody
78
+ };
@@ -1,34 +1,46 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React from "react";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
3
2
  import { cn, tv } from "tailwind-variants";
4
- import { AccessibleButton, } from "../accessible-button/AccessibleButton";
5
- import { Label } from "../typography/Label";
3
+ import { AccessibleButton } from "../accessible-button/AccessibleButton.js";
4
+ import { Label } from "../typography/Label.js";
6
5
  const naviButtonStyles = tv({
7
- base: [
8
- "flex",
9
- "flex-col",
10
- "gap-1",
11
- "transition",
12
- "duration-300",
13
- "ease-in-out",
14
- "text-white",
15
- "rounded-lg",
16
- "items-center",
17
- "pt-3",
18
- "pb-3",
19
- "pl-2",
20
- "pr-2",
21
- ],
22
- variants: {
23
- intent: {
24
- secondary: ["bg-violet-600", "hover:bg-violet-700"],
25
- },
26
- },
6
+ base: [
7
+ "flex",
8
+ "flex-col",
9
+ "gap-1",
10
+ "transition",
11
+ "duration-300",
12
+ "ease-in-out",
13
+ "text-white",
14
+ "rounded-lg",
15
+ "items-center",
16
+ "pt-3",
17
+ "pb-3",
18
+ "pl-2",
19
+ "pr-2"
20
+ ],
21
+ variants: {
22
+ intent: {
23
+ secondary: ["bg-violet-600", "hover:bg-violet-700"]
24
+ }
25
+ }
27
26
  });
28
- /**
29
- * A navigation-style button component that combines an accessible,
30
- * keyboard-friendly button foundation with variant-based styling.
31
- */
32
- export const NaviButton = ({ intent = "secondary", className, ...props }) => {
33
- return (_jsxs(AccessibleButton, { className: cn(naviButtonStyles({ intent, ...props }), className), ...props, children: [props.icon && _jsx(props.icon, { className: props.iconClassName }), _jsx(Label, { as: "span", size: "md", children: props.children })] }));
27
+ const NaviButton = ({
28
+ intent = "secondary",
29
+ className,
30
+ ...props
31
+ }) => {
32
+ return /* @__PURE__ */ jsxs(
33
+ AccessibleButton,
34
+ {
35
+ className: cn(naviButtonStyles({ intent, ...props }), className),
36
+ ...props,
37
+ children: [
38
+ props.icon && /* @__PURE__ */ jsx(props.icon, { className: props.iconClassName }),
39
+ /* @__PURE__ */ jsx(Label, { as: "span", size: "md", children: props.children })
40
+ ]
41
+ }
42
+ );
43
+ };
44
+ export {
45
+ NaviButton
34
46
  };
@@ -1,33 +1,43 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { cn, tv } from "tailwind-variants";
3
- import { AccessibleButton, } from "../accessible-button/AccessibleButton";
4
- import { Avatar } from "../avatar/Avatar";
3
+ import { AccessibleButton } from "../accessible-button/AccessibleButton.js";
4
+ import { Avatar } from "../avatar/Avatar.js";
5
5
  const naviUserButtonStyles = tv({
6
- base: [
7
- "flex",
8
- "flex-col",
9
- "gap-1",
10
- "transition",
11
- "duration-300",
12
- "ease-in-out",
13
- "text-white",
14
- "rounded-lg",
15
- "items-center",
16
- "pt-3",
17
- "pb-3",
18
- "pl-2",
19
- "pr-2",
20
- ],
21
- variants: {
22
- intent: {
23
- secondary: ["bg-violet-600", "hover:bg-violet-700"],
24
- },
25
- },
6
+ base: [
7
+ "flex",
8
+ "flex-col",
9
+ "gap-1",
10
+ "transition",
11
+ "duration-300",
12
+ "ease-in-out",
13
+ "text-white",
14
+ "rounded-lg",
15
+ "items-center",
16
+ "pt-3",
17
+ "pb-3",
18
+ "pl-2",
19
+ "pr-2"
20
+ ],
21
+ variants: {
22
+ intent: {
23
+ secondary: ["bg-violet-600", "hover:bg-violet-700"]
24
+ }
25
+ }
26
26
  });
27
- /**
28
- * A user-focused navigation button that displays a user avatar and behaves
29
- * like an accessible, keyboard-friendly button.
30
- */
31
- export const NaviUserButton = ({ intent = "secondary", className, ...props }) => {
32
- return (_jsx(AccessibleButton, { className: cn(naviUserButtonStyles({ intent, ...props }), className), ...props, children: _jsx(Avatar, { alt: props.alt, size: "sm", src: props.src }) }));
27
+ const NaviUserButton = ({
28
+ intent = "secondary",
29
+ className,
30
+ ...props
31
+ }) => {
32
+ return /* @__PURE__ */ jsx(
33
+ AccessibleButton,
34
+ {
35
+ className: cn(naviUserButtonStyles({ intent, ...props }), className),
36
+ ...props,
37
+ children: /* @__PURE__ */ jsx(Avatar, { alt: props.alt, size: "sm", src: props.src })
38
+ }
39
+ );
40
+ };
41
+ export {
42
+ NaviUserButton
33
43
  };
@@ -1,33 +1,43 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { cn, tv } from "tailwind-variants";
3
- import { AccessibleButton, } from "../accessible-button/AccessibleButton";
3
+ import { AccessibleButton } from "../accessible-button/AccessibleButton.js";
4
4
  const roundButtonStyles = tv({
5
- base: [
6
- "text-white",
7
- "rounded-full",
8
- "hover:ring-3",
9
- "active:ring-4",
10
- "transition",
11
- "duration-350",
12
- "active:duration-300",
13
- "ease-in-out",
14
- "p-4",
15
- ],
16
- variants: {
17
- intent: {
18
- primary: [
19
- "bg-slate-600",
20
- "hover:bg-slate-700",
21
- "hover:ring-slate-100",
22
- "active:ring-violet-200",
23
- ],
24
- },
25
- },
5
+ base: [
6
+ "text-white",
7
+ "rounded-full",
8
+ "hover:ring-3",
9
+ "active:ring-4",
10
+ "transition",
11
+ "duration-350",
12
+ "active:duration-300",
13
+ "ease-in-out",
14
+ "p-4"
15
+ ],
16
+ variants: {
17
+ intent: {
18
+ primary: [
19
+ "bg-slate-600",
20
+ "hover:bg-slate-700",
21
+ "hover:ring-slate-100",
22
+ "active:ring-violet-200"
23
+ ]
24
+ }
25
+ }
26
26
  });
27
- /**
28
- * A circular, icon-only button component that provides full accessibility,
29
- * keyboard interaction, and visual feedback through hover and active states.
30
- */
31
- export const RoundButton = ({ intent = "primary", className, ...props }) => {
32
- return (_jsx(AccessibleButton, { className: cn(roundButtonStyles({ intent }), className), ...props, children: _jsx(props.icon, {}) }));
27
+ const RoundButton = ({
28
+ intent = "primary",
29
+ className,
30
+ ...props
31
+ }) => {
32
+ return /* @__PURE__ */ jsx(
33
+ AccessibleButton,
34
+ {
35
+ className: cn(roundButtonStyles({ intent }), className),
36
+ ...props,
37
+ children: /* @__PURE__ */ jsx(props.icon, {})
38
+ }
39
+ );
40
+ };
41
+ export {
42
+ RoundButton
33
43
  };
@@ -1,13 +1,16 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { 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
5
  const tabItemStyles = tv({});
6
- export const TabItem = (props) => {
7
- return (_jsx(RadixTabs.Content, { value: props.value, className: tabItemStyles(props), children: React.Children.map(props.children, (child, index) => {
8
- if (React.isValidElement(child)) {
9
- return React.cloneElement(child, { key: props.value || index });
10
- }
11
- return child;
12
- }) }));
6
+ const TabItem = (props) => {
7
+ return /* @__PURE__ */ jsx(RadixTabs.Content, { value: props.value, className: tabItemStyles(props), children: React.Children.map(props.children, (child, index) => {
8
+ if (React.isValidElement(child)) {
9
+ return React.cloneElement(child, { key: props.value || index });
10
+ }
11
+ return child;
12
+ }) });
13
+ };
14
+ export {
15
+ TabItem
13
16
  };
@@ -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,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
  };