@infonomic/uikit 3.10.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/components/badge/badge_module.css +8 -8
  2. package/dist/components/button/button-group_module.css +2 -2
  3. package/dist/components/button/button_module.css +44 -127
  4. package/dist/components/button/copy-button_module.css +7 -7
  5. package/dist/components/card/card.js +6 -6
  6. package/dist/components/card/card.module.js +12 -6
  7. package/dist/components/card/card_module.css +10 -10
  8. package/dist/components/container/container_module.css +4 -4
  9. package/dist/components/forms/error-text_module.css +2 -6
  10. package/dist/components/forms/help-text_module.css +1 -1
  11. package/dist/components/forms/input-adornment_module.css +3 -3
  12. package/dist/components/forms/input.js +6 -6
  13. package/dist/components/forms/input.module.js +14 -7
  14. package/dist/components/forms/input_module.css +71 -32
  15. package/dist/components/forms/label_module.css +4 -12
  16. package/dist/components/forms/text-area.js +1 -1
  17. package/dist/components/forms/text-area_module.css +1 -1
  18. package/dist/components/section/section_module.css +1 -1
  19. package/dist/styles/components-vanilla.css +1 -0
  20. package/dist/styles/styles.css +1 -1
  21. package/dist/styles/typography.css +1 -1
  22. package/package.json +6 -4
  23. package/src/components/badge/badge.module.css +16 -8
  24. package/src/components/button/button-group.module.css +4 -2
  25. package/src/components/button/button.module.css +136 -143
  26. package/src/components/button/copy-button.module.css +14 -7
  27. package/src/components/card/card-content.astro +1 -1
  28. package/src/components/card/card-description.astro +1 -1
  29. package/src/components/card/card-footer.astro +1 -1
  30. package/src/components/card/card-header.astro +1 -1
  31. package/src/components/card/card-title.astro +1 -1
  32. package/src/components/card/card.astro +2 -2
  33. package/src/components/card/card.module.css +20 -10
  34. package/src/components/card/card.tsx +6 -6
  35. package/src/components/container/container.module.css +8 -4
  36. package/src/components/forms/error-text.module.css +3 -13
  37. package/src/components/forms/help-text.module.css +2 -1
  38. package/src/components/forms/input-adornment.module.css +6 -3
  39. package/src/components/forms/input.astro +6 -6
  40. package/src/components/forms/input.module.css +82 -39
  41. package/src/components/forms/input.tsx +6 -6
  42. package/src/components/forms/label.module.css +6 -19
  43. package/src/components/forms/text-area.module.css +2 -1
  44. package/src/components/forms/text-area.tsx +1 -1
  45. package/src/components/section/section.module.css +2 -1
  46. package/src/styles/base/colors.stories.tsx +1 -1
  47. package/src/styles/functional/colors.css +0 -23
  48. package/src/styles/functional/surfaces.css +4 -4
  49. package/src/styles/functional/typography.css +3 -0
  50. package/src/styles/typography/article.stories.tsx +40 -0
  51. package/src/styles/typography/code.stories.tsx +1 -1
  52. package/src/styles/typography/prose.css +14 -12
  53. package/src/styles/typography/quote.stories.tsx +1 -1
@@ -602,28 +602,5 @@
602
602
  --gradient-danger-end: var(--red-700);
603
603
  --gradient-danger-foreground: white;
604
604
  --gradient-danger-disabled: oklch(from var(--red-700) calc(l * 1.2) calc(c * 0.85) h);
605
-
606
- /* SURFACE TOKENS (Force Light Mode)
607
- ----------------------------------------------------------------- */
608
-
609
- /* Panel/container backgrounds - identical to :root */
610
- --surface-panel: var(--canvas-25);
611
- --surface-panel-elevated: white;
612
- --surface-panel-border: var(--border-color);
613
-
614
- /* Item backgrounds */
615
- --surface-item: transparent;
616
- --surface-item-hover: var(--canvas-50);
617
- --surface-item-active: var(--canvas-100);
618
-
619
- /* Item text colors */
620
- --surface-item-text: var(--text);
621
- --surface-item-text-hover: var(--text);
622
- --surface-item-text-active: var(--text);
623
- --surface-item-text-disabled: var(--gray-400);
624
-
625
- /* Panel scrollers */
626
- --surface-panel-scrollbar: var(--gray-50);
627
- --surface-panel-scrollbar-thumb: var(--primary-100);
628
605
  }
629
606
  }
@@ -89,15 +89,15 @@
89
89
  --shadow: var(--shadow-md);
90
90
  --loader-color: var(--fill-primary-strong);
91
91
 
92
- /* SURFACE TOKENS (for panels, dropdowns, menus, lists)
92
+ /* SURFACE TOKENS (Force Light Mode)
93
93
  ----------------------------------------------------------------- */
94
94
 
95
- /* Panel/container backgrounds */
95
+ /* Panel/container backgrounds - identical to :root */
96
96
  --surface-panel: var(--canvas-25);
97
- --surface-panel-elevated: white; /* For dropdowns/popovers with shadow */
97
+ --surface-panel-elevated: white;
98
98
  --surface-panel-border: var(--border-color);
99
99
 
100
- /* Item backgrounds (default transparent, inherits panel) */
100
+ /* Item backgrounds */
101
101
  --surface-item: transparent;
102
102
  --surface-item-hover: var(--canvas-50);
103
103
  --surface-item-active: var(--canvas-100);
@@ -11,6 +11,7 @@
11
11
  --text: var(--gray-900);
12
12
  --headings: var(--primary-700);
13
13
  --muted: oklch(from var(--foreground) calc(l * 2) c h);
14
+ --error: var(--red-500);
14
15
  }
15
16
 
16
17
  /* 🌙 Dark via `.dark` class or [data-theme="dark"] attribute.
@@ -27,6 +28,7 @@
27
28
  --text: var(--gray-50);
28
29
  --headings: var(--gray-50);
29
30
  --muted: oklch(from var(--foreground) calc(l * 0.75) c h);
31
+ --error: var(--red-400);
30
32
  }
31
33
 
32
34
  /* ===================================================================
@@ -40,5 +42,6 @@
40
42
  --text: var(--gray-900);
41
43
  --headings: var(--primary-800);
42
44
  --muted: oklch(from var(--foreground) calc(l * 2) c h);
45
+ --error: var(--red-500);
43
46
  }
44
47
  }
@@ -0,0 +1,40 @@
1
+ import type { Meta } from '@storybook/react-vite'
2
+
3
+ export const Article = (): React.JSX.Element => {
4
+ return (
5
+ <>
6
+ <div style={{ marginBottom: '48px' }}>
7
+ <article style={{ maxWidth: '700px', margin: '2rem auto' }} className="prose">
8
+ <h1>An Article</h1>
9
+ <p>
10
+ This is text that that has been placed in an article element. Text in articles
11
+ as well as within .dynamic-text class selectors will automatically increase in size on
12
+ mobile devices for better readability. This is a paragraph of text that we&apos;ll
13
+ use for our typography storybook page. This is a paragraph of text that we&apos;ll
14
+ use for our typography storybook page.
15
+ </p>
16
+ <blockquote>This is some text inside a blockquote.
17
+ Note that we've used em to size text in the blockquote,
18
+ so that it also changes size in the article.</blockquote>
19
+ <p>
20
+ This is a paragraph of text that we&apos;ll use for our typography storybook page. This
21
+ is a paragraph of text that we&apos;ll use for our typography storybook page. This is a
22
+ paragraph of text that we&apos;ll use for our typography storybook page. This is a
23
+ paragraph of text that we&apos;ll use for our typography storybook page.
24
+ </p>
25
+ </article>
26
+ </div>
27
+ </>
28
+ )
29
+ }
30
+
31
+ const meta: Meta = {
32
+ /* 👇 The title prop is optional.
33
+ * See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
34
+ * to learn how to generate automatic titles
35
+ */
36
+ title: 'Typography',
37
+ component: Article,
38
+ }
39
+
40
+ export default meta
@@ -47,7 +47,7 @@ export const Code = (): React.JSX.Element => {
47
47
  <div style={{ maxWidth: '700px', margin: '2rem auto' }} className="prose">
48
48
  <h1>Heading 1</h1>
49
49
  <p>
50
- This is a <code>inline code here</code> of text that we&apos;ll use for our typography
50
+ This is an example of <code>inline code here</code> and text that we&apos;ll use for our typography
51
51
  and code storybook page. This is a paragraph of text that we&apos;ll use for our
52
52
  typography and code storybook page. Here is a code block...
53
53
  </p>
@@ -299,20 +299,29 @@
299
299
  }
300
300
 
301
301
  .prose :where(blockquote):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
302
- font-weight: bold;
302
+ font-weight: 600;
303
303
  font-style: normal;
304
304
  color: var(--prose-quotes);
305
305
  quotes: none;
306
- margin-top: 1.6em;
307
- margin-bottom: 1.6em;
306
+ margin-top: 1.3rem;
307
+ margin-bottom: 1.3rem;
308
308
  margin-right: 2rem;
309
- font-size: 1.5rem;
310
- line-height: 1.2;
309
+ /* Font size must be em - so that it changes in articles or text that has dynamic font sizes on smaller screens */
310
+ font-size: 1.2em;
311
+ line-height: 1.3;
311
312
  padding-inline-start: 1rem;
312
313
  border-inline-start-width: 0.25rem;
313
314
  border-inline-start-color: var(--prose-quote-borders);
314
315
  }
315
316
 
317
+ /* The same as above - for the moment */
318
+ @media (min-width: 48rem) {
319
+ .prose :where(blockquote):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
320
+ font-size: 1.2em;
321
+ line-height: 1.3;
322
+ }
323
+ }
324
+
316
325
  .prose :where(blockquote p:first-of-type):not( :where([class~="not-prose"], [class~="not-prose"] *))::before {
317
326
  content: open-quote;
318
327
  }
@@ -394,11 +403,4 @@
394
403
  padding-top: 0;
395
404
  padding-bottom: 0;
396
405
  }
397
-
398
- @media (min-width: 48rem) {
399
- .prose :where(blockquote):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
400
- font-size: 1.7rem;
401
- line-height: 1.2;
402
- }
403
- }
404
406
  }
@@ -12,7 +12,7 @@ export const Quote = (): React.JSX.Element => {
12
12
  paragraph of text that we&apos;ll use for our typography storybook page. This is a
13
13
  paragraph of text that we&apos;ll use for our typography storybook page.
14
14
  </p>
15
- <blockquote>This is some text inside a blockquote.</blockquote>
15
+ <blockquote>This is some text inside a blockquote. We&apos;ll make this a little longer to see how it looks when it wraps.</blockquote>
16
16
  <p>
17
17
  This is a paragraph of text that we&apos;ll use for our typography storybook page. This
18
18
  is a paragraph of text that we&apos;ll use for our typography storybook page. This is a