@node-core/ui-components 1.0.1-bc3f4a79ab5f54e7ed1ee525005e7e9f1030495c → 1.0.1-cc5c2626b0639fe2088a736f54169ea3e10ed325

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 (266) hide show
  1. package/Common/AlertBox/index.module.css +50 -44
  2. package/Common/AlertBox/index.stories.tsx +96 -0
  3. package/Common/AlertBox/index.tsx +24 -0
  4. package/Common/AvatarGroup/Avatar/index.module.css +30 -50
  5. package/Common/AvatarGroup/Avatar/index.stories.tsx +22 -0
  6. package/Common/AvatarGroup/Avatar/index.tsx +67 -0
  7. package/Common/AvatarGroup/Overlay/index.module.css +21 -28
  8. package/Common/AvatarGroup/Overlay/index.stories.tsx +33 -0
  9. package/Common/AvatarGroup/Overlay/index.tsx +37 -0
  10. package/Common/AvatarGroup/__tests__/index.test.jsx +55 -0
  11. package/Common/AvatarGroup/index.module.css +11 -12
  12. package/Common/AvatarGroup/index.stories.tsx +56 -0
  13. package/Common/AvatarGroup/index.tsx +83 -0
  14. package/Common/Badge/index.module.css +26 -34
  15. package/Common/Badge/index.stories.tsx +38 -0
  16. package/Common/Badge/index.tsx +35 -0
  17. package/Common/BadgeGroup/index.module.css +51 -75
  18. package/Common/BadgeGroup/index.stories.tsx +35 -0
  19. package/Common/BadgeGroup/index.tsx +35 -0
  20. package/Common/Banner/index.module.css +27 -30
  21. package/Common/Banner/index.stories.tsx +29 -0
  22. package/Common/Banner/index.tsx +18 -0
  23. package/Common/BaseActiveLink/__tests__/index.test.jsx +52 -0
  24. package/Common/BaseActiveLink/index.tsx +34 -0
  25. package/Common/BaseButton/index.module.css +105 -332
  26. package/Common/BaseButton/index.stories.tsx +67 -0
  27. package/Common/BaseButton/index.tsx +59 -0
  28. package/Common/BaseCodeBox/index.module.css +58 -76
  29. package/Common/BaseCodeBox/index.stories.tsx +39 -0
  30. package/Common/BaseCodeBox/index.tsx +122 -0
  31. package/Common/BaseCrossLink/index.module.css +39 -57
  32. package/Common/BaseCrossLink/index.stories.tsx +38 -0
  33. package/Common/BaseCrossLink/index.tsx +46 -0
  34. package/Common/BaseLinkTabs/index.module.css +33 -67
  35. package/Common/BaseLinkTabs/index.stories.tsx +34 -0
  36. package/Common/BaseLinkTabs/index.tsx +53 -0
  37. package/Common/BasePagination/Ellipsis/index.module.css +8 -14
  38. package/Common/BasePagination/Ellipsis/index.stories.tsx +10 -0
  39. package/Common/BasePagination/Ellipsis/index.tsx +11 -0
  40. package/Common/BasePagination/PaginationListItem/__tests__/index.test.jsx +58 -0
  41. package/Common/BasePagination/PaginationListItem/index.module.css +21 -36
  42. package/Common/BasePagination/PaginationListItem/index.stories.tsx +40 -0
  43. package/Common/BasePagination/PaginationListItem/index.tsx +39 -0
  44. package/Common/BasePagination/PrevNextArrow.tsx +15 -0
  45. package/Common/BasePagination/__tests__/index.test.jsx +180 -0
  46. package/Common/BasePagination/index.module.css +26 -27
  47. package/Common/BasePagination/index.stories.tsx +67 -0
  48. package/Common/BasePagination/index.tsx +77 -0
  49. package/Common/BasePagination/useGetPageElements.tsx +132 -0
  50. package/Common/Blockquote/index.module.css +23 -44
  51. package/Common/Blockquote/index.stories.tsx +45 -0
  52. package/Common/Blockquote/index.tsx +11 -0
  53. package/Common/Breadcrumbs/BreadcrumbHomeLink/index.module.css +3 -3
  54. package/Common/Breadcrumbs/BreadcrumbHomeLink/index.tsx +30 -0
  55. package/Common/Breadcrumbs/BreadcrumbItem/index.module.css +27 -38
  56. package/Common/Breadcrumbs/BreadcrumbItem/index.tsx +42 -0
  57. package/Common/Breadcrumbs/BreadcrumbLink/index.module.css +16 -26
  58. package/Common/Breadcrumbs/BreadcrumbLink/index.tsx +37 -0
  59. package/Common/Breadcrumbs/BreadcrumbRoot/index.module.css +7 -8
  60. package/Common/Breadcrumbs/BreadcrumbRoot/index.tsx +20 -0
  61. package/Common/Breadcrumbs/BreadcrumbTruncatedItem/index.tsx +9 -0
  62. package/Common/Breadcrumbs/index.stories.tsx +94 -0
  63. package/Common/Breadcrumbs/index.tsx +81 -0
  64. package/Common/ChangeHistory/index.module.css +66 -181
  65. package/Common/ChangeHistory/index.stories.tsx +130 -0
  66. package/Common/ChangeHistory/index.tsx +67 -0
  67. package/Common/CodeTabs/index.module.css +36 -47
  68. package/Common/CodeTabs/index.stories.tsx +73 -0
  69. package/Common/CodeTabs/index.tsx +16 -0
  70. package/Common/DataTag/index.module.css +32 -30
  71. package/Common/DataTag/index.stories.tsx +40 -0
  72. package/Common/DataTag/index.tsx +39 -0
  73. package/Common/GlowingBackdrop/index.module.css +28 -126
  74. package/Common/GlowingBackdrop/index.stories.tsx +10 -0
  75. package/Common/GlowingBackdrop/index.tsx +13 -0
  76. package/Common/LanguageDropDown/index.module.css +42 -140
  77. package/Common/LanguageDropDown/index.stories.tsx +19 -0
  78. package/Common/LanguageDropDown/index.tsx +56 -0
  79. package/Common/Modal/index.module.css +62 -217
  80. package/Common/Modal/index.stories.tsx +34 -0
  81. package/Common/Modal/index.tsx +50 -0
  82. package/Common/NodejsLogo/index.module.css +4 -3
  83. package/Common/NodejsLogo/index.stories.tsx +14 -0
  84. package/Common/NodejsLogo/index.tsx +26 -0
  85. package/Common/Notification/index.module.css +17 -101
  86. package/Common/Notification/index.stories.tsx +36 -0
  87. package/Common/Notification/index.tsx +34 -0
  88. package/Common/Preview/index.module.css +65 -269
  89. package/Common/Preview/index.stories.tsx +44 -0
  90. package/Common/Preview/index.tsx +25 -0
  91. package/Common/Select/__tests__/index.test.jsx +67 -0
  92. package/Common/Select/index.module.css +127 -294
  93. package/Common/Select/index.stories.tsx +111 -0
  94. package/Common/Select/index.tsx +187 -0
  95. package/Common/Separator/index.module.css +10 -7
  96. package/Common/Separator/index.stories.tsx +32 -0
  97. package/Common/Separator/index.tsx +27 -0
  98. package/Common/Skeleton/index.module.css +21 -118
  99. package/Common/Skeleton/index.tsx +39 -0
  100. package/Common/Tabs/__tests__/index.test.jsx +52 -0
  101. package/Common/Tabs/index.module.css +40 -58
  102. package/Common/Tabs/index.stories.tsx +50 -0
  103. package/Common/Tabs/index.tsx +54 -0
  104. package/Common/ThemeToggle/__tests__/index.test.jsx +35 -0
  105. package/Common/ThemeToggle/index.module.css +11 -18
  106. package/Common/ThemeToggle/index.stories.tsx +10 -0
  107. package/Common/ThemeToggle/index.tsx +15 -0
  108. package/Common/Tooltip/index.module.css +29 -119
  109. package/Common/Tooltip/index.stories.tsx +73 -0
  110. package/Common/Tooltip/index.tsx +48 -0
  111. package/Containers/Article/index.module.css +58 -127
  112. package/Containers/Article/index.stories.tsx +39 -0
  113. package/Containers/Article/index.tsx +9 -0
  114. package/Containers/DocSideBar/index.tsx +0 -0
  115. package/Containers/Footer/index.module.css +36 -51
  116. package/Containers/Footer/index.stories.tsx +27 -0
  117. package/Containers/Footer/index.tsx +95 -0
  118. package/Containers/MetaBar/__tests__/index.test.jsx +63 -0
  119. package/Containers/MetaBar/index.module.css +69 -101
  120. package/Containers/MetaBar/index.stories.tsx +80 -0
  121. package/Containers/MetaBar/index.tsx +72 -0
  122. package/Containers/NavBar/NavItem/index.module.css +36 -50
  123. package/Containers/NavBar/NavItem/index.stories.tsx +38 -0
  124. package/Containers/NavBar/NavItem/index.tsx +44 -0
  125. package/Containers/NavBar/index.module.css +96 -176
  126. package/Containers/NavBar/index.stories.tsx +45 -0
  127. package/Containers/NavBar/index.tsx +94 -0
  128. package/Containers/Sidebar/ProgressionIcon/index.tsx +16 -0
  129. package/Containers/Sidebar/SidebarGroup/index.module.css +52 -180
  130. package/Containers/Sidebar/SidebarGroup/index.stories.tsx +36 -0
  131. package/Containers/Sidebar/SidebarGroup/index.tsx +49 -0
  132. package/Containers/Sidebar/SidebarItem/index.module.css +38 -49
  133. package/Containers/Sidebar/SidebarItem/index.stories.tsx +15 -0
  134. package/Containers/Sidebar/SidebarItem/index.tsx +43 -0
  135. package/Containers/Sidebar/index.module.css +24 -42
  136. package/Containers/Sidebar/index.stories.tsx +88 -0
  137. package/Containers/Sidebar/index.tsx +70 -0
  138. package/Icons/HexagonGrid.stories.tsx +10 -0
  139. package/Icons/HexagonGrid.tsx +1434 -0
  140. package/Icons/InstallationMethod/Choco.tsx +78 -0
  141. package/Icons/InstallationMethod/Devbox.tsx +21 -0
  142. package/Icons/InstallationMethod/Docker.tsx +20 -0
  143. package/Icons/InstallationMethod/FNM.tsx +132 -0
  144. package/Icons/InstallationMethod/Homebrew.tsx +69 -0
  145. package/Icons/InstallationMethod/N.tsx +32 -0
  146. package/Icons/InstallationMethod/NVM.tsx +63 -0
  147. package/Icons/InstallationMethod/Volta.tsx +34 -0
  148. package/Icons/InstallationMethod/{index.js → index.ts} +1 -0
  149. package/Icons/Logos/JsGreen.tsx +24 -0
  150. package/Icons/Logos/JsWhite.tsx +37 -0
  151. package/Icons/Logos/Nodejs.tsx +372 -0
  152. package/Icons/Logos/NodejsStackedBlack.tsx +98 -0
  153. package/Icons/Logos/NodejsStackedDark.tsx +124 -0
  154. package/Icons/Logos/NodejsStackedLight.tsx +123 -0
  155. package/Icons/Logos/NodejsStackedWhite.tsx +98 -0
  156. package/Icons/Logos/{index.js → index.ts} +10 -1
  157. package/Icons/OperatingSystem/AIX.tsx +46 -0
  158. package/Icons/OperatingSystem/Apple.tsx +23 -0
  159. package/Icons/OperatingSystem/Linux.tsx +969 -0
  160. package/Icons/OperatingSystem/Microsoft.tsx +19 -0
  161. package/Icons/OperatingSystem/{index.js → index.ts} +1 -0
  162. package/Icons/PackageManager/Npm.tsx +21 -0
  163. package/Icons/PackageManager/Pnpm.tsx +22 -0
  164. package/Icons/PackageManager/Yarn.tsx +22 -0
  165. package/Icons/PackageManager/{index.js → index.ts} +1 -0
  166. package/Icons/Social/Bluesky.tsx +19 -0
  167. package/Icons/Social/Discord.tsx +20 -0
  168. package/Icons/Social/GitHub.tsx +16 -0
  169. package/Icons/Social/LinkedIn.tsx +16 -0
  170. package/Icons/Social/Mastodon.tsx +36 -0
  171. package/Icons/Social/Slack.tsx +31 -0
  172. package/Icons/Social/X.tsx +16 -0
  173. package/Icons/Social/{index.js → index.ts} +1 -0
  174. package/MDX/CodeTabs.tsx +47 -0
  175. package/package.json +54 -6
  176. package/stylelint/__tests__/index.test.mjs +80 -0
  177. package/stylelint/one-utility-class-per-line.mjs +50 -34
  178. package/stylelint/utils.mjs +25 -19
  179. package/styles/animations.css +47 -0
  180. package/styles/base.css +17 -0
  181. package/styles/effects.css +12 -0
  182. package/styles/index.css +26 -1127
  183. package/styles/markdown.css +173 -0
  184. package/styles/theme.css +175 -0
  185. package/types.ts +25 -0
  186. package/Common/AlertBox/index.js +0 -5
  187. package/Common/AvatarGroup/Avatar/index.js +0 -11
  188. package/Common/AvatarGroup/Overlay/index.js +0 -6
  189. package/Common/AvatarGroup/index.js +0 -21
  190. package/Common/Badge/index.js +0 -7
  191. package/Common/BadgeGroup/index.js +0 -6
  192. package/Common/Banner/index.js +0 -4
  193. package/Common/BaseActiveLink/index.js +0 -14
  194. package/Common/BaseButton/index.js +0 -10
  195. package/Common/BaseCodeBox/index.js +0 -50
  196. package/Common/BaseCrossLink/index.js +0 -12
  197. package/Common/BaseLinkTabs/index.js +0 -5
  198. package/Common/BasePagination/Ellipsis/index.js +0 -4
  199. package/Common/BasePagination/PaginationListItem/index.js +0 -6
  200. package/Common/BasePagination/PrevNextArrow.js +0 -7
  201. package/Common/BasePagination/index.js +0 -10
  202. package/Common/BasePagination/useGetPageElements.js +0 -77
  203. package/Common/Blockquote/index.js +0 -4
  204. package/Common/Breadcrumbs/BreadcrumbHomeLink/index.js +0 -9
  205. package/Common/Breadcrumbs/BreadcrumbItem/index.js +0 -6
  206. package/Common/Breadcrumbs/BreadcrumbLink/index.js +0 -5
  207. package/Common/Breadcrumbs/BreadcrumbRoot/index.js +0 -4
  208. package/Common/Breadcrumbs/BreadcrumbTruncatedItem/index.js +0 -4
  209. package/Common/Breadcrumbs/index.js +0 -22
  210. package/Common/ChangeHistory/index.js +0 -9
  211. package/Common/CodeTabs/index.js +0 -5
  212. package/Common/DataTag/index.js +0 -18
  213. package/Common/GlowingBackdrop/index.js +0 -5
  214. package/Common/LanguageDropDown/index.js +0 -11
  215. package/Common/Modal/index.js +0 -10
  216. package/Common/NodejsLogo/index.js +0 -7
  217. package/Common/Notification/index.js +0 -6
  218. package/Common/Preview/index.js +0 -7
  219. package/Common/Select/index.js +0 -46
  220. package/Common/Separator/index.js +0 -7
  221. package/Common/Skeleton/index.js +0 -18
  222. package/Common/Tabs/index.js +0 -6
  223. package/Common/ThemeToggle/index.js +0 -7
  224. package/Common/Tooltip/index.js +0 -8
  225. package/Containers/Article/index.js +0 -4
  226. package/Containers/DocSideBar/index.js +0 -1
  227. package/Containers/Footer/index.js +0 -22
  228. package/Containers/MetaBar/index.js +0 -12
  229. package/Containers/NavBar/NavItem/index.js +0 -7
  230. package/Containers/NavBar/index.js +0 -18
  231. package/Containers/Sidebar/ProgressionIcon/index.js +0 -3
  232. package/Containers/Sidebar/SidebarGroup/index.js +0 -9
  233. package/Containers/Sidebar/SidebarItem/index.js +0 -11
  234. package/Containers/Sidebar/index.js +0 -15
  235. package/Icons/HexagonGrid.js +0 -3
  236. package/Icons/InstallationMethod/Choco.js +0 -3
  237. package/Icons/InstallationMethod/Devbox.js +0 -3
  238. package/Icons/InstallationMethod/Docker.js +0 -3
  239. package/Icons/InstallationMethod/FNM.js +0 -3
  240. package/Icons/InstallationMethod/Homebrew.js +0 -3
  241. package/Icons/InstallationMethod/N.js +0 -5
  242. package/Icons/InstallationMethod/NVM.js +0 -3
  243. package/Icons/InstallationMethod/Volta.js +0 -3
  244. package/Icons/Logos/JsGreen.js +0 -3
  245. package/Icons/Logos/JsWhite.js +0 -3
  246. package/Icons/Logos/Nodejs.js +0 -6
  247. package/Icons/Logos/NodejsStackedBlack.js +0 -3
  248. package/Icons/Logos/NodejsStackedDark.js +0 -3
  249. package/Icons/Logos/NodejsStackedLight.js +0 -3
  250. package/Icons/Logos/NodejsStackedWhite.js +0 -3
  251. package/Icons/OperatingSystem/AIX.js +0 -3
  252. package/Icons/OperatingSystem/Apple.js +0 -3
  253. package/Icons/OperatingSystem/Linux.js +0 -3
  254. package/Icons/OperatingSystem/Microsoft.js +0 -3
  255. package/Icons/PackageManager/Npm.js +0 -3
  256. package/Icons/PackageManager/Pnpm.js +0 -3
  257. package/Icons/PackageManager/Yarn.js +0 -3
  258. package/Icons/Social/Bluesky.js +0 -3
  259. package/Icons/Social/Discord.js +0 -3
  260. package/Icons/Social/GitHub.js +0 -3
  261. package/Icons/Social/LinkedIn.js +0 -3
  262. package/Icons/Social/Mastodon.js +0 -3
  263. package/Icons/Social/Slack.js +0 -3
  264. package/Icons/Social/X.js +0 -3
  265. package/MDX/CodeTabs.js +0 -16
  266. package/types.js +0 -1
@@ -1,151 +1,53 @@
1
- /*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */
1
+ @reference "../../styles/index.css";
2
+
2
3
  .languageDropdown {
3
- height: calc(var(--spacing, 0.25rem)*9);
4
- width: calc(var(--spacing, 0.25rem)*9);
5
- border-radius: var(--radius-md, 0.375rem);
6
- padding: calc(var(--spacing, 0.25rem)*2);
7
- color: var(--color-neutral-700, #6e7b83);
8
- @media (prefers-reduced-motion: no-preference) {
9
- transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
10
- transition-timing-function: var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(0.4, 0, 0.2, 1)));
11
- transition-duration: var(--tw-duration, var(--default-transition-duration, 150ms));
12
- }
13
- &:where([data-theme=dark], [data-theme=dark] *) {
14
- color: var(--color-neutral-300, #d9e1e4);
15
- }
4
+ @apply h-9
5
+ w-9
6
+ rounded-md
7
+ p-2
8
+ text-neutral-700
9
+ motion-safe:transition-colors
10
+ dark:text-neutral-300;
11
+
16
12
  &:hover {
17
- background-color: var(--color-neutral-100, #f6f7f9);
18
- &:where([data-theme=dark], [data-theme=dark] *) {
19
- background-color: var(--color-neutral-900, #2c3437);
20
- }
13
+ @apply bg-neutral-100
14
+ dark:bg-neutral-900;
21
15
  }
22
16
  }
17
+
23
18
  .dropDownContent {
24
- max-height: calc(var(--spacing, 0.25rem)*80);
25
- width: calc(var(--spacing, 0.25rem)*48);
26
- overflow: hidden;
27
- border-radius: var(--radius-sm, 0.25rem);
28
- border-style: var(--tw-border-style);
29
- border-width: 1px;
30
- border-color: var(--color-neutral-200, #e9edf0);
31
- background-color: var(--color-white, #fff);
32
- --tw-shadow: 0px 4px 6px -2px var(--tw-shadow-color, color-mix(in srgb, #101828 3%, transparent)), 0px 12px 16px -4px var(--tw-shadow-color, color-mix(in srgb, #101828 8%, transparent));
33
- @supports (color: color-mix(in lab, red, red)) {
34
- --tw-shadow: 0px 4px 6px -2px var(--tw-shadow-color, color-mix(in oklab, var(--color-shadow, #101828) 3%, transparent)), 0px 12px 16px -4px var(--tw-shadow-color, color-mix(in oklab, var(--color-shadow, #101828) 8%, transparent));
35
- }
36
- box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
37
- &:where([data-theme=dark], [data-theme=dark] *) {
38
- border-color: var(--color-neutral-900, #2c3437);
39
- }
40
- &:where([data-theme=dark], [data-theme=dark] *) {
41
- background-color: var(--color-neutral-950, #0d121c);
42
- }
19
+ @apply max-h-80
20
+ w-48
21
+ overflow-hidden
22
+ rounded-sm
23
+ border
24
+ border-neutral-200
25
+ bg-white
26
+ shadow-lg
27
+ dark:border-neutral-900
28
+ dark:bg-neutral-950;
29
+
43
30
  > div {
44
- max-height: calc(var(--spacing, 0.25rem)*80);
45
- width: calc(var(--spacing, 0.25rem)*48);
46
- overflow-y: auto;
31
+ @apply max-h-80
32
+ w-48
33
+ overflow-y-auto;
47
34
  }
48
35
  }
36
+
49
37
  .dropDownItem {
50
- cursor: pointer;
51
- padding-inline: calc(var(--spacing, 0.25rem)*2.5);
52
- padding-block: calc(var(--spacing, 0.25rem)*1.5);
53
- font-size: var(--text-sm, 0.875rem);
54
- line-height: var(--tw-leading, var(--text-sm--line-height, 1.42857));
55
- --tw-font-weight: var(--font-weight-medium, 500);
56
- font-weight: var(--font-weight-medium, 500);
57
- color: var(--color-neutral-800, #556066);
58
- --tw-outline-style: none;
59
- outline-style: none;
60
- @media (forced-colors: active) {
61
- outline: 2px solid transparent;
62
- outline-offset: 2px;
63
- }
64
- &[data-highlighted] {
65
- background-color: var(--color-green-600, #417e38);
66
- }
67
- &[data-highlighted] {
68
- color: var(--color-white, #fff);
69
- }
70
- &:where([data-theme=dark], [data-theme=dark] *) {
71
- color: var(--color-white, #fff);
72
- }
73
- }
38
+ @apply outline-hidden
39
+ cursor-pointer
40
+ px-2.5
41
+ py-1.5
42
+ text-sm
43
+ font-medium
44
+ text-neutral-800
45
+ data-[highlighted]:bg-green-600
46
+ data-[highlighted]:text-white
47
+ dark:text-white;
48
+ }
49
+
74
50
  .currentDropDown {
75
- background-color: var(--color-green-600, #417e38);
76
- color: var(--color-white, #fff);
77
- }
78
- @property --tw-border-style {
79
- syntax: "*";
80
- inherits: false;
81
- initial-value: solid;
82
- }
83
- @property --tw-shadow {
84
- syntax: "*";
85
- inherits: false;
86
- initial-value: 0 0 #0000;
87
- }
88
- @property --tw-shadow-color {
89
- syntax: "*";
90
- inherits: false;
91
- }
92
- @property --tw-shadow-alpha {
93
- syntax: "<percentage>";
94
- inherits: false;
95
- initial-value: 100%;
96
- }
97
- @property --tw-inset-shadow {
98
- syntax: "*";
99
- inherits: false;
100
- initial-value: 0 0 #0000;
101
- }
102
- @property --tw-inset-shadow-color {
103
- syntax: "*";
104
- inherits: false;
105
- }
106
- @property --tw-inset-shadow-alpha {
107
- syntax: "<percentage>";
108
- inherits: false;
109
- initial-value: 100%;
110
- }
111
- @property --tw-ring-color {
112
- syntax: "*";
113
- inherits: false;
114
- }
115
- @property --tw-ring-shadow {
116
- syntax: "*";
117
- inherits: false;
118
- initial-value: 0 0 #0000;
119
- }
120
- @property --tw-inset-ring-color {
121
- syntax: "*";
122
- inherits: false;
123
- }
124
- @property --tw-inset-ring-shadow {
125
- syntax: "*";
126
- inherits: false;
127
- initial-value: 0 0 #0000;
128
- }
129
- @property --tw-ring-inset {
130
- syntax: "*";
131
- inherits: false;
132
- }
133
- @property --tw-ring-offset-width {
134
- syntax: "<length>";
135
- inherits: false;
136
- initial-value: 0px;
137
- }
138
- @property --tw-ring-offset-color {
139
- syntax: "*";
140
- inherits: false;
141
- initial-value: #fff;
142
- }
143
- @property --tw-ring-offset-shadow {
144
- syntax: "*";
145
- inherits: false;
146
- initial-value: 0 0 #0000;
147
- }
148
- @property --tw-font-weight {
149
- syntax: "*";
150
- inherits: false;
51
+ @apply bg-green-600
52
+ text-white;
151
53
  }
@@ -0,0 +1,19 @@
1
+ import type { Meta as MetaObj, StoryObj } from '@storybook/react';
2
+
3
+ import LanguageDropDown from '#ui/Common/LanguageDropDown';
4
+
5
+ type Story = StoryObj<typeof LanguageDropDown>;
6
+ type Meta = MetaObj<typeof LanguageDropDown>;
7
+
8
+ export const Default: Story = {
9
+ args: {
10
+ availableLanguages: [
11
+ { name: 'English', code: 'en', localName: 'English' },
12
+ { name: 'French', code: 'fr', localName: 'Français' },
13
+ { name: 'Spanish', code: 'es', localName: 'Español' },
14
+ ],
15
+ currentLanguage: 'en',
16
+ },
17
+ };
18
+
19
+ export default { component: LanguageDropDown } as Meta;
@@ -0,0 +1,56 @@
1
+ import { LanguageIcon } from '@heroicons/react/24/outline';
2
+ import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
3
+ import classNames from 'classnames';
4
+ import type { FC } from 'react';
5
+
6
+ import type { SimpleLocaleConfig } from '#ui/types';
7
+
8
+ import styles from './index.module.css';
9
+
10
+ type LanguageDropDownProps = {
11
+ onChange?: (newLocale: SimpleLocaleConfig) => void;
12
+ currentLanguage: string;
13
+ availableLanguages: Array<SimpleLocaleConfig>;
14
+ ariaLabel: string;
15
+ };
16
+
17
+ const LanguageDropdown: FC<LanguageDropDownProps> = ({
18
+ onChange = () => {},
19
+ currentLanguage,
20
+ availableLanguages,
21
+ ariaLabel,
22
+ }) => {
23
+ return (
24
+ <DropdownMenu.Root>
25
+ <DropdownMenu.Trigger asChild>
26
+ <button className={styles.languageDropdown} aria-label={ariaLabel}>
27
+ <LanguageIcon height="20" />
28
+ </button>
29
+ </DropdownMenu.Trigger>
30
+
31
+ <DropdownMenu.Portal>
32
+ <DropdownMenu.Content
33
+ align="start"
34
+ className={styles.dropDownContent}
35
+ sideOffset={5}
36
+ >
37
+ <div>
38
+ {availableLanguages.map(({ name, code, localName }) => (
39
+ <DropdownMenu.Item
40
+ key={code}
41
+ onClick={() => onChange({ name, code, localName })}
42
+ className={classNames(styles.dropDownItem, {
43
+ [styles.currentDropDown]: code === currentLanguage,
44
+ })}
45
+ >
46
+ {localName}
47
+ </DropdownMenu.Item>
48
+ ))}
49
+ </div>
50
+ </DropdownMenu.Content>
51
+ </DropdownMenu.Portal>
52
+ </DropdownMenu.Root>
53
+ );
54
+ };
55
+
56
+ export default LanguageDropdown;
@@ -1,234 +1,79 @@
1
- /*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */
1
+ @reference "../../styles/index.css";
2
+
2
3
  .overlay {
3
- position: fixed;
4
- inset: calc(var(--spacing, 0.25rem)*0);
5
- display: flex;
6
- justify-content: center;
7
- background-color: color-mix(in srgb, #fff 40%, transparent);
8
- @supports (color: color-mix(in lab, red, red)) {
9
- background-color: color-mix(in oklab, var(--color-white, #fff) 40%, transparent);
10
- }
11
- --tw-backdrop-blur: blur(2px);
12
- -webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
13
- backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
14
- &:where([data-theme=dark], [data-theme=dark] *) {
15
- background-color: color-mix(in srgb, #0d121c 40%, transparent);
16
- @supports (color: color-mix(in lab, red, red)) {
17
- background-color: color-mix(in oklab, var(--color-neutral-950, #0d121c) 40%, transparent);
18
- }
19
- }
4
+ @apply fixed
5
+ inset-0
6
+ flex
7
+ justify-center
8
+ bg-white/40
9
+ backdrop-blur-[2px]
10
+ dark:bg-neutral-950/40;
11
+
20
12
  .content {
21
- position: relative;
22
- margin: calc(var(--spacing, 0.25rem)*4);
23
- display: inline-flex;
24
- width: 100%;
25
- max-width: var(--container-3xl, 48rem);
26
- flex-direction: column;
27
- gap: calc(var(--spacing, 0.25rem)*2);
28
- overflow-y: auto;
29
- border-radius: 0.25rem;
30
- border-style: var(--tw-border-style);
31
- border-width: 1px;
32
- border-color: var(--color-neutral-200, #e9edf0);
33
- background-color: var(--color-white, #fff);
34
- padding: calc(var(--spacing, 0.25rem)*8);
35
- &:focus {
36
- --tw-outline-style: none;
37
- outline-style: none;
38
- }
39
- @media (width >= 670px) {
40
- padding: calc(var(--spacing, 0.25rem)*6);
41
- }
42
- @media (width >= 40rem) {
43
- margin-block: calc(var(--spacing, 0.25rem)*20);
44
- }
45
- @media (width >= 80rem) {
46
- padding: calc(var(--spacing, 0.25rem)*12);
47
- }
48
- &:where([data-theme=dark], [data-theme=dark] *) {
49
- background-color: var(--color-neutral-950, #0d121c);
50
- }
13
+ @apply xs:p-6
14
+ relative
15
+ m-4
16
+ inline-flex
17
+ w-full
18
+ max-w-3xl
19
+ flex-col
20
+ gap-2
21
+ overflow-y-auto
22
+ rounded
23
+ border
24
+ border-neutral-200
25
+ bg-white
26
+ p-8
27
+ focus:outline-none
28
+ sm:my-20
29
+ xl:p-12
30
+ dark:bg-neutral-950;
51
31
  }
32
+
52
33
  .close {
53
- position: absolute;
54
- top: calc(var(--spacing, 0.25rem)*3);
55
- right: calc(var(--spacing, 0.25rem)*3);
56
- display: block;
57
- width: calc(var(--spacing, 0.25rem)*7);
58
- height: calc(var(--spacing, 0.25rem)*7);
59
- cursor: pointer;
60
- border-radius: var(--radius-sm, 0.25rem);
61
- padding: calc(var(--spacing, 0.25rem)*1);
62
- &:hover {
63
- @media (hover: hover) {
64
- background-color: var(--color-neutral-100, #f6f7f9);
65
- }
66
- }
67
- &:focus {
68
- --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
69
- box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
70
- }
71
- &:focus {
72
- --tw-ring-color: var(--color-neutral-200, #e9edf0);
73
- }
74
- &:focus {
75
- --tw-outline-style: none;
76
- outline-style: none;
77
- }
78
- &:where([data-theme=dark], [data-theme=dark] *) {
79
- &:hover {
80
- @media (hover: hover) {
81
- background-color: var(--color-neutral-900, #2c3437);
82
- }
83
- }
84
- }
85
- &:where([data-theme=dark], [data-theme=dark] *) {
86
- &:focus {
87
- --tw-ring-color: var(--color-neutral-900, #2c3437);
88
- }
89
- }
34
+ @apply absolute
35
+ right-3
36
+ top-3
37
+ block
38
+ size-7
39
+ cursor-pointer
40
+ rounded-sm
41
+ p-1
42
+ hover:bg-neutral-100
43
+ focus:outline-none
44
+ focus:ring-2
45
+ focus:ring-neutral-200
46
+ dark:hover:bg-neutral-900
47
+ dark:focus:ring-neutral-900;
90
48
  }
49
+
91
50
  .title {
92
- font-size: var(--text-3xl, 1.875rem);
93
- line-height: var(--tw-leading, var(--text-3xl--line-height, 1.2));
94
- --tw-font-weight: var(--font-weight-semibold, 600);
95
- font-weight: var(--font-weight-semibold, 600);
96
- color: var(--color-neutral-900, #2c3437);
97
- &:where([data-theme=dark], [data-theme=dark] *) {
98
- color: var(--color-white, #fff);
99
- }
51
+ @apply text-3xl
52
+ font-semibold
53
+ text-neutral-900
54
+ dark:text-white;
100
55
  }
56
+
101
57
  .description {
102
- margin-bottom: calc(var(--spacing, 0.25rem)*2);
103
- font-size: var(--text-lg, 1.125rem);
104
- line-height: var(--tw-leading, var(--text-lg--line-height, 1.55556));
105
- --tw-font-weight: var(--font-weight-regular, 400);
106
- font-weight: var(--font-weight-regular, 400);
107
- color: var(--color-neutral-800, #556066);
108
- &:where([data-theme=dark], [data-theme=dark] *) {
109
- color: var(--color-neutral-200, #e9edf0);
110
- }
58
+ @apply font-regular
59
+ mb-2
60
+ text-lg
61
+ text-neutral-800
62
+ dark:text-neutral-200;
111
63
  }
64
+
112
65
  .wrapper {
113
- display: flex;
114
- flex-direction: column;
115
- gap: calc(var(--spacing, 0.25rem)*4);
66
+ @apply flex
67
+ flex-col
68
+ gap-4;
69
+
116
70
  pre {
117
- overflow: auto;
71
+ @apply overflow-auto;
118
72
  }
73
+
119
74
  code,
120
75
  a {
121
- overflow-wrap: break-word;
76
+ @apply break-words;
122
77
  }
123
78
  }
124
79
  }
125
- @property --tw-backdrop-blur {
126
- syntax: "*";
127
- inherits: false;
128
- }
129
- @property --tw-backdrop-brightness {
130
- syntax: "*";
131
- inherits: false;
132
- }
133
- @property --tw-backdrop-contrast {
134
- syntax: "*";
135
- inherits: false;
136
- }
137
- @property --tw-backdrop-grayscale {
138
- syntax: "*";
139
- inherits: false;
140
- }
141
- @property --tw-backdrop-hue-rotate {
142
- syntax: "*";
143
- inherits: false;
144
- }
145
- @property --tw-backdrop-invert {
146
- syntax: "*";
147
- inherits: false;
148
- }
149
- @property --tw-backdrop-opacity {
150
- syntax: "*";
151
- inherits: false;
152
- }
153
- @property --tw-backdrop-saturate {
154
- syntax: "*";
155
- inherits: false;
156
- }
157
- @property --tw-backdrop-sepia {
158
- syntax: "*";
159
- inherits: false;
160
- }
161
- @property --tw-border-style {
162
- syntax: "*";
163
- inherits: false;
164
- initial-value: solid;
165
- }
166
- @property --tw-shadow {
167
- syntax: "*";
168
- inherits: false;
169
- initial-value: 0 0 #0000;
170
- }
171
- @property --tw-shadow-color {
172
- syntax: "*";
173
- inherits: false;
174
- }
175
- @property --tw-shadow-alpha {
176
- syntax: "<percentage>";
177
- inherits: false;
178
- initial-value: 100%;
179
- }
180
- @property --tw-inset-shadow {
181
- syntax: "*";
182
- inherits: false;
183
- initial-value: 0 0 #0000;
184
- }
185
- @property --tw-inset-shadow-color {
186
- syntax: "*";
187
- inherits: false;
188
- }
189
- @property --tw-inset-shadow-alpha {
190
- syntax: "<percentage>";
191
- inherits: false;
192
- initial-value: 100%;
193
- }
194
- @property --tw-ring-color {
195
- syntax: "*";
196
- inherits: false;
197
- }
198
- @property --tw-ring-shadow {
199
- syntax: "*";
200
- inherits: false;
201
- initial-value: 0 0 #0000;
202
- }
203
- @property --tw-inset-ring-color {
204
- syntax: "*";
205
- inherits: false;
206
- }
207
- @property --tw-inset-ring-shadow {
208
- syntax: "*";
209
- inherits: false;
210
- initial-value: 0 0 #0000;
211
- }
212
- @property --tw-ring-inset {
213
- syntax: "*";
214
- inherits: false;
215
- }
216
- @property --tw-ring-offset-width {
217
- syntax: "<length>";
218
- inherits: false;
219
- initial-value: 0px;
220
- }
221
- @property --tw-ring-offset-color {
222
- syntax: "*";
223
- inherits: false;
224
- initial-value: #fff;
225
- }
226
- @property --tw-ring-offset-shadow {
227
- syntax: "*";
228
- inherits: false;
229
- initial-value: 0 0 #0000;
230
- }
231
- @property --tw-font-weight {
232
- syntax: "*";
233
- inherits: false;
234
- }
@@ -0,0 +1,34 @@
1
+ import type { Meta as MetaObj, StoryObj } from '@storybook/react';
2
+
3
+ import { Modal, Title, Description, Content } from '#ui/Common/Modal';
4
+
5
+ type Story = StoryObj<typeof Modal>;
6
+ type Meta = MetaObj<typeof Modal>;
7
+
8
+ export const Default: Story = {
9
+ args: {
10
+ open: true,
11
+ children: (
12
+ <Content>
13
+ <Title>Node.js Versions Information</Title>
14
+ <Description>
15
+ Get all information about Node.js versions and their changes.
16
+ </Description>
17
+ <p>
18
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Architecto
19
+ atque sint doloremque, sapiente recusandae debitis libero nostrum
20
+ repudiandae explicabo suscipit ipsam eos dolorem, necessitatibus odit
21
+ quos delectus natus sunt sit!
22
+ </p>
23
+ <p>
24
+ Lorem ipsum dolor sit amet consectetur, adipisicing elit. Earum
25
+ asperiores corporis tempore neque, officiis fuga est facere deserunt
26
+ amet minus sit architecto blanditiis hic sed odit cumque numquam
27
+ dignissimos delectus.
28
+ </p>
29
+ </Content>
30
+ ),
31
+ },
32
+ };
33
+
34
+ export default { component: Modal } as Meta;
@@ -0,0 +1,50 @@
1
+ 'use client';
2
+
3
+ import { XMarkIcon } from '@heroicons/react/24/outline';
4
+ import * as Dialog from '@radix-ui/react-dialog';
5
+ import type { FC, PropsWithChildren } from 'react';
6
+
7
+ import styles from './index.module.css';
8
+
9
+ type ModalProps = PropsWithChildren<{
10
+ open?: boolean;
11
+ onOpenChange?: (open: boolean) => void;
12
+ }>;
13
+
14
+ const Modal: FC<ModalProps> = ({
15
+ children,
16
+ open = false,
17
+ onOpenChange = () => {},
18
+ }) => (
19
+ <Dialog.Root open={open} onOpenChange={onOpenChange}>
20
+ <Dialog.Portal>
21
+ <Dialog.Overlay className={styles.overlay}>
22
+ <Dialog.Content className={styles.content}>
23
+ <Dialog.Trigger className={styles.close}>
24
+ <XMarkIcon />
25
+ </Dialog.Trigger>
26
+
27
+ {children}
28
+
29
+ <Dialog.Close />
30
+ </Dialog.Content>
31
+ </Dialog.Overlay>
32
+ </Dialog.Portal>
33
+ </Dialog.Root>
34
+ );
35
+
36
+ const Title = ({ children }: PropsWithChildren) => (
37
+ <Dialog.Title className={styles.title}>{children}</Dialog.Title>
38
+ );
39
+
40
+ const Description = ({ children }: PropsWithChildren) => (
41
+ <Dialog.Description className={styles.description}>
42
+ {children}
43
+ </Dialog.Description>
44
+ );
45
+
46
+ const Content = ({ children }: PropsWithChildren) => (
47
+ <main className={styles.wrapper}>{children}</main>
48
+ );
49
+
50
+ export { Modal, Title, Description, Content };
@@ -1,5 +1,6 @@
1
- /*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */
1
+ @reference "../../styles/index.css";
2
+
2
3
  .nodejsLogo {
3
- height: calc(var(--spacing, 0.25rem)*6);
4
- width: calc(var(--spacing, 0.25rem)*20);
4
+ @apply h-6
5
+ w-20;
5
6
  }
@@ -0,0 +1,14 @@
1
+ import type { Meta as MetaObj, StoryObj } from '@storybook/react';
2
+
3
+ import NodejsLogo from '#ui/Common/NodejsLogo';
4
+
5
+ type Story = StoryObj<typeof NodejsLogo>;
6
+ type Meta = MetaObj<typeof NodejsLogo>;
7
+
8
+ export const Default: Story = {};
9
+
10
+ export const WithPride: Story = {
11
+ args: { variant: 'pride' },
12
+ };
13
+
14
+ export default { component: NodejsLogo } as Meta;