@node-core/ui-components 1.0.1-c0bc4dd7eb49f97f35ce0983849d17702404c76a → 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.
@@ -73,4 +73,11 @@
73
73
  @apply bg-danger-700;
74
74
  }
75
75
  }
76
+
77
+ code {
78
+ /* Ignore the styles from `markdown.css` */
79
+ all: unset;
80
+
81
+ @apply font-ibm-plex-mono;
82
+ }
76
83
  }
@@ -6,6 +6,12 @@ import AlertBox from '#ui/Common/AlertBox';
6
6
  type Story = StoryObj<typeof AlertBox>;
7
7
  type Meta = MetaObj<typeof AlertBox>;
8
8
 
9
+ const withMain = (args: React.ComponentProps<typeof AlertBox>) => (
10
+ <main>
11
+ <AlertBox {...args} />
12
+ </main>
13
+ );
14
+
9
15
  export const Info: Story = {
10
16
  args: {
11
17
  level: 'info',
@@ -46,6 +52,23 @@ export const Danger: Story = {
46
52
  },
47
53
  };
48
54
 
55
+ export const InMarkdown: Story = {
56
+ args: {
57
+ level: 'danger',
58
+ title: '0',
59
+ children: (
60
+ <>
61
+ In a markdown component, <code>Code renders correctly,</code>{' '}
62
+ <a href="#">
63
+ <code>even when in a link</code>
64
+ </a>
65
+ </>
66
+ ),
67
+ size: 'default',
68
+ },
69
+ render: withMain,
70
+ };
71
+
49
72
  export const WithIcon: Story = {
50
73
  args: {
51
74
  level: 'info',
@@ -73,11 +73,14 @@
73
73
 
74
74
  &.secondary {
75
75
  @apply rounded-lg
76
+ border
77
+ border-neutral-200
76
78
  text-neutral-800
79
+ dark:border-neutral-900
77
80
  dark:text-neutral-200;
78
81
 
79
82
  &:hover:not([aria-disabled='true']) {
80
- @apply bg-neutral-100
83
+ @apply bg-neutral-200
81
84
  text-neutral-800
82
85
  dark:bg-neutral-900
83
86
  dark:text-neutral-200;
@@ -17,6 +17,7 @@
17
17
  w-full
18
18
  max-w-3xl
19
19
  flex-col
20
+ gap-2
20
21
  overflow-y-auto
21
22
  rounded
22
23
  border
@@ -47,8 +48,7 @@
47
48
  }
48
49
 
49
50
  .title {
50
- @apply mb-2
51
- text-3xl
51
+ @apply text-3xl
52
52
  font-semibold
53
53
  text-neutral-900
54
54
  dark:text-white;
@@ -56,7 +56,7 @@
56
56
 
57
57
  .description {
58
58
  @apply font-regular
59
- mb-4
59
+ mb-2
60
60
  text-lg
61
61
  text-neutral-800
62
62
  dark:text-neutral-200;
@@ -1,6 +1,6 @@
1
1
  import type { Meta as MetaObj, StoryObj } from '@storybook/react';
2
2
 
3
- import Modal from '#ui/Common/Modal';
3
+ import { Modal, Title, Description, Content } from '#ui/Common/Modal';
4
4
 
5
5
  type Story = StoryObj<typeof Modal>;
6
6
  type Meta = MetaObj<typeof Modal>;
@@ -8,10 +8,12 @@ type Meta = MetaObj<typeof Modal>;
8
8
  export const Default: Story = {
9
9
  args: {
10
10
  open: true,
11
- heading: 'Node.js Versions Information',
12
- subheading: 'Get all information about Node.js versions and their changes.',
13
11
  children: (
14
- <>
12
+ <Content>
13
+ <Title>Node.js Versions Information</Title>
14
+ <Description>
15
+ Get all information about Node.js versions and their changes.
16
+ </Description>
15
17
  <p>
16
18
  Lorem ipsum dolor sit amet consectetur adipisicing elit. Architecto
17
19
  atque sint doloremque, sapiente recusandae debitis libero nostrum
@@ -24,7 +26,7 @@ export const Default: Story = {
24
26
  amet minus sit architecto blanditiis hic sed odit cumque numquam
25
27
  dignissimos delectus.
26
28
  </p>
27
- </>
29
+ </Content>
28
30
  ),
29
31
  },
30
32
  };
@@ -7,15 +7,11 @@ import type { FC, PropsWithChildren } from 'react';
7
7
  import styles from './index.module.css';
8
8
 
9
9
  type ModalProps = PropsWithChildren<{
10
- heading: string;
11
- subheading?: string;
12
10
  open?: boolean;
13
11
  onOpenChange?: (open: boolean) => void;
14
12
  }>;
15
13
 
16
14
  const Modal: FC<ModalProps> = ({
17
- heading,
18
- subheading,
19
15
  children,
20
16
  open = false,
21
17
  onOpenChange = () => {},
@@ -28,15 +24,7 @@ const Modal: FC<ModalProps> = ({
28
24
  <XMarkIcon />
29
25
  </Dialog.Trigger>
30
26
 
31
- <Dialog.Title className={styles.title}>{heading}</Dialog.Title>
32
-
33
- {subheading && (
34
- <Dialog.Description className={styles.description}>
35
- {subheading}
36
- </Dialog.Description>
37
- )}
38
-
39
- <main className={styles.wrapper}>{children}</main>
27
+ {children}
40
28
 
41
29
  <Dialog.Close />
42
30
  </Dialog.Content>
@@ -45,4 +33,18 @@ const Modal: FC<ModalProps> = ({
45
33
  </Dialog.Root>
46
34
  );
47
35
 
48
- export default Modal;
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 };
@@ -72,7 +72,7 @@ const NodejsIcon: FC<NodeJsLogoProps> = ({
72
72
  />
73
73
 
74
74
  {variant === 'pride' ? (
75
- <g clip-path="url(#clip0_1_1661)">
75
+ <g clipPath="url(#clip0_1_1661)">
76
76
  <mask
77
77
  id="mask1_1_1661"
78
78
  style={{ maskType: 'alpha' }}
@@ -183,7 +183,7 @@ const NodejsIcon: FC<NodeJsLogoProps> = ({
183
183
  filterUnits="userSpaceOnUse"
184
184
  color-interpolation-filters="sRGB"
185
185
  >
186
- <feFlood flood-opacity="0" result="BackgroundImageFix" />
186
+ <feFlood floodOpacity="0" result="BackgroundImageFix" />
187
187
  <feColorMatrix
188
188
  in="SourceAlpha"
189
189
  type="matrix"
@@ -218,7 +218,7 @@ const NodejsIcon: FC<NodeJsLogoProps> = ({
218
218
  filterUnits="userSpaceOnUse"
219
219
  color-interpolation-filters="sRGB"
220
220
  >
221
- <feFlood flood-opacity="0" result="BackgroundImageFix" />
221
+ <feFlood floodOpacity="0" result="BackgroundImageFix" />
222
222
  <feColorMatrix
223
223
  in="SourceAlpha"
224
224
  type="matrix"
package/package.json CHANGED
@@ -74,7 +74,7 @@
74
74
  "engines": {
75
75
  "node": ">=20"
76
76
  },
77
- "version": "1.0.1-c0bc4dd7eb49f97f35ce0983849d17702404c76a",
77
+ "version": "1.0.1-cc5c2626b0639fe2088a736f54169ea3e10ed325",
78
78
  "scripts": {
79
79
  "lint": "turbo run lint:js lint:css",
80
80
  "lint:css": "stylelint \"**/*.css\" --allow-empty-input --cache --cache-strategy=content --cache-location=.stylelintcache",
@@ -157,7 +157,7 @@ main {
157
157
  @apply font-semibold;
158
158
  }
159
159
 
160
- tr:last-child td {
160
+ tr:last-child > td {
161
161
  @apply sm:border-b-0;
162
162
 
163
163
  &:last-child {