@infonomic/uikit 2.15.0 → 3.1.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 (74) hide show
  1. package/README.md +48 -6
  2. package/dist/components/badge/badge_module.css +49 -80
  3. package/dist/components/button/button_module.css +133 -227
  4. package/dist/components/button/control-buttons_module.css +2 -11
  5. package/dist/components/button/copy-button.d.ts.map +1 -1
  6. package/dist/components/button/copy-button.js +14 -7
  7. package/dist/components/button/copy-button.module.js +5 -5
  8. package/dist/components/button/copy-button_module.css +31 -12
  9. package/dist/components/dropdown/dropdown_module.css +8 -13
  10. package/dist/components/input/checkbox_module.css +42 -91
  11. package/dist/components/input/help-text_module.css +1 -5
  12. package/dist/components/input/input_module.css +42 -109
  13. package/dist/components/input/radio-group_module.css +14 -49
  14. package/dist/components/input/select_module.css +10 -17
  15. package/dist/components/notifications/alert_module.css +0 -4
  16. package/dist/components/pager/pagination_module.css +7 -18
  17. package/dist/components/scroll-area/scroll-area_module.css +4 -20
  18. package/dist/components/tooltip/tooltip_module.css +4 -14
  19. package/dist/icons/close-icon.js +1 -1
  20. package/dist/icons/copy-icon.d.ts.map +1 -1
  21. package/dist/icons/copy-icon.js +1 -1
  22. package/dist/react.d.ts +1 -1
  23. package/dist/react.d.ts.map +1 -1
  24. package/dist/react.js +1 -1
  25. package/dist/styles/styles.css +1 -1
  26. package/dist/widgets/datepicker/datepicker_module.css +2 -2
  27. package/dist/widgets/drawer/drawer_module.css +1 -5
  28. package/dist/widgets/modal/modal_module.css +1 -5
  29. package/dist/widgets/timeline/timeline.d.ts.map +1 -0
  30. package/dist/widgets/timeline/timeline.module.js +17 -0
  31. package/dist/{components → widgets}/timeline/timeline_module.css +10 -10
  32. package/package.json +8 -8
  33. package/src/components/badge/badge.module.css +38 -68
  34. package/src/components/button/button-intents.stories.tsx +1 -1
  35. package/src/components/button/button-overrides.stories.tsx +43 -0
  36. package/src/components/button/button-variants.stories.tsx +1 -1
  37. package/src/components/button/button.module.css +135 -230
  38. package/src/components/button/control-buttons.module.css +5 -17
  39. package/src/components/button/control-buttons.stories.tsx +1 -1
  40. package/src/components/button/copy-button.module.css +32 -14
  41. package/src/components/button/copy-button.stories.tsx +6 -6
  42. package/src/components/button/copy-button.tsx +16 -12
  43. package/src/components/calendar/calendar.stories.tsx +1 -1
  44. package/src/components/dropdown/dropdown.module.css +9 -24
  45. package/src/components/input/checkbox.module.css +43 -99
  46. package/src/components/input/help-text.module.css +1 -12
  47. package/src/components/input/input.module.css +44 -119
  48. package/src/components/input/input.stories.tsx +1 -1
  49. package/src/components/input/radio-group.module.css +16 -72
  50. package/src/components/input/radio-group.stories.tsx +1 -1
  51. package/src/components/input/select.module.css +10 -17
  52. package/src/components/input/select.stories.tsx +1 -1
  53. package/src/components/notifications/alert.module.css +0 -4
  54. package/src/components/pager/pagination.module.css +7 -23
  55. package/src/components/scroll-area/scroll-area.module.css +4 -20
  56. package/src/components/tooltip/tooltip.module.css +6 -16
  57. package/src/icons/close-icon.tsx +1 -1
  58. package/src/icons/copy-icon.tsx +1 -2
  59. package/src/icons/icons.module.css +1 -0
  60. package/src/react.ts +1 -1
  61. package/src/styles/theme/theme.css +6 -4
  62. package/src/styles/theme/tokens.css +670 -0
  63. package/src/widgets/datepicker/datepicker.module.css +2 -2
  64. package/src/widgets/drawer/drawer.module.css +1 -5
  65. package/src/widgets/drawer/drawer.stories.tsx +1 -34
  66. package/src/widgets/modal/modal.module.css +1 -5
  67. package/src/{components → widgets}/timeline/timeline.stories.tsx +2 -2
  68. package/dist/components/timeline/timeline.d.ts.map +0 -1
  69. package/dist/components/timeline/timeline.module.js +0 -17
  70. /package/dist/{components → widgets}/timeline/timeline.d.ts +0 -0
  71. /package/dist/{components → widgets}/timeline/timeline.js +0 -0
  72. /package/src/components/button/{button-icon.stories.tsx → icon-button.stories.tsx} +0 -0
  73. /package/src/{components → widgets}/timeline/timeline.module.css +0 -0
  74. /package/src/{components → widgets}/timeline/timeline.tsx +0 -0
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@infonomic/uikit",
3
3
  "private": false,
4
4
  "license": "MIT",
5
- "version": "2.15.0",
5
+ "version": "3.1.0",
6
6
  "type": "module",
7
7
  "description": "Infonomic UI kit is a collection of reusable UI components and utilities for React and Astro.",
8
8
  "keywords": [
@@ -72,11 +72,11 @@
72
72
  "@biomejs/biome": "2.3.2",
73
73
  "@rsbuild/plugin-react": "^1.4.1",
74
74
  "@rslib/core": "^0.17.0",
75
- "@storybook/addon-a11y": "^10.0.2",
76
- "@storybook/addon-docs": "^10.0.2",
77
- "@storybook/addon-links": "^10.0.2",
78
- "@storybook/addon-themes": "^10.0.2",
79
- "@storybook/react-vite": "^10.0.2",
75
+ "@storybook/addon-a11y": "^10.0.6",
76
+ "@storybook/addon-docs": "^10.0.6",
77
+ "@storybook/addon-links": "^10.0.6",
78
+ "@storybook/addon-themes": "^10.0.6",
79
+ "@storybook/react-vite": "^10.0.6",
80
80
  "@types/lodash": "^4.17.20",
81
81
  "@types/node": "^24.9.2",
82
82
  "@types/react": "19.2.2",
@@ -84,11 +84,11 @@
84
84
  "@vitejs/plugin-react": "^5.1.0",
85
85
  "astro": "5.15.3",
86
86
  "chokidar": "^4.0.3",
87
- "eslint-plugin-storybook": "^10.0.2",
87
+ "eslint-plugin-storybook": "^10.0.6",
88
88
  "lightningcss": "^1.30.2",
89
89
  "lightningcss-cli": "^1.30.2",
90
90
  "rimraf": "^6.1.0",
91
- "storybook": "^10.0.2",
91
+ "storybook": "^10.0.6",
92
92
  "typescript": "5.9.3",
93
93
  "typescript-plugin-css-modules": "^5.2.0",
94
94
  "vite": "^7.1.12",
@@ -1,83 +1,53 @@
1
- .badge {
2
- display: inline-block;
3
- padding: 0.25em 0.4em;
4
- font-size: var(--font-size-sm);
5
- font-weight: 400;
6
- line-height: 1;
7
- text-align: center;
8
- white-space: nowrap;
9
- vertical-align: baseline;
10
- border-radius: var(--border-radius-sm);
11
- }
12
-
13
- .primary {
14
- color: white;
15
- background-color: var(--primary-500);
16
- }
17
-
18
- .secondary {
19
- color: black;
20
- background-color: var(--secondary-500);
21
- }
22
-
23
- .noeffect {
24
- color: black;
25
- background-color: var(--gray-100);
26
- }
27
-
28
- .success {
29
- color: white;
30
- background-color: var(--green-500);
31
- }
32
-
33
- .info {
34
- color: white;
35
- background-color: var(--blue-300);
36
- }
37
-
38
- .warning {
39
- color: var(--foreground);
40
- background-color: var(--yellow-300);
41
- }
42
-
43
- .danger {
44
- color: white;
45
- background-color: var(--red-500);
46
- }
1
+ @layer infonomic-base, infonomic-utilities, infonomic-theme, infonomic-typography, infonomic-components;
2
+
3
+ @layer infonomic-components {
4
+ .badge {
5
+ display: inline-block;
6
+ padding: 0.25em 0.4em;
7
+ font-size: var(--font-size-sm);
8
+ font-weight: 400;
9
+ line-height: 1;
10
+ text-align: center;
11
+ white-space: nowrap;
12
+ vertical-align: baseline;
13
+ border-radius: var(--border-radius-sm);
14
+ }
47
15
 
48
- :global(.dark) {
49
- .primary:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
50
- color: white;
51
- background-color: var(--primary-400);
16
+ .primary {
17
+ color: var(--text-on-primary);
18
+ background-color: var(--fill-primary-strong);
52
19
  }
53
20
 
54
- .secondary:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
55
- color: black;;
56
- background-color: var(--secondary-400);
21
+ .secondary {
22
+ color: var(--text-on-secondary);
23
+ background-color: var(--fill-secondary-strong);
57
24
  }
58
25
 
59
- .noeffect:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
60
- color: white;
61
- background-color: var(--gray-700);
26
+ .noeffect {
27
+ color: var(--text-on-noeffect);
28
+ background-color: var(--fill-noeffect-strong);
62
29
  }
63
30
 
64
- .success:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
65
- color: white;
66
- background-color: var(--green-400);
31
+ .success {
32
+ color: var(--text-on-success);
33
+ background-color: var(--fill-success-strong);
67
34
  }
68
35
 
69
- .info:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
70
- color: white;
71
- background-color: var(--blue-400);
36
+ .info {
37
+ color: var(--text-on-info);
38
+ background-color: var(--fill-info-strong);
72
39
  }
73
40
 
74
- .warning:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
75
- color: black;
76
- background-color: var(--yellow-400);
41
+ .warning {
42
+ color: var(--text-on-warning);
43
+ background-color: var(--fill-warning-strong);
77
44
  }
78
45
 
79
- .danger:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
80
- color: white;
81
- background-color: var(--red-400);
46
+ .danger {
47
+ color: var(--text-on-danger);
48
+ background-color: var(--fill-danger-strong);
82
49
  }
50
+
51
+ /* Dark mode - All intents now handled by semantic tokens in theme layer */
52
+ /* No overrides needed! Tokens automatically switch in .dark and respect .not-dark */
83
53
  }
@@ -34,7 +34,7 @@ const AllIntents = (): React.JSX.Element => {
34
34
  )
35
35
  }
36
36
 
37
- export const Intents: Story = {
37
+ export const ButtonIntents: Story = {
38
38
  render: () => <AllIntents />,
39
39
  }
40
40
 
@@ -0,0 +1,43 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ import type React from 'react'
3
+
4
+ import type { Meta, StoryObj } from '@storybook/react-vite'
5
+ import { capitalize } from '../../utils/capitalize.js'
6
+
7
+ import { size } from '../@types/shared.js'
8
+ import { variant } from './@types/button.js'
9
+ import { Button } from './button.js'
10
+
11
+ type Story = StoryObj<typeof Button>
12
+
13
+ const AllOverrides = (): React.JSX.Element => {
14
+ return (
15
+ <>
16
+ <div style={{ maxWidth: '600px', margin: '2rem auto' }}>
17
+ <div style={{ width: '300px', padding: '1rem', borderRadius: '8px', border: '1px solid var(--stroke-primary)', backgroundColor: 'var(--gray-25)' }}>
18
+ <Button className="not-dark" variant="filled" size="sm" style={{ marginRight: '1rem' }}>Force Light</Button>
19
+ </div>
20
+ </div>
21
+ <div className="dark" style={{ maxWidth: '600px', margin: '2rem auto' }} >
22
+ <div style={{ width: '300px', padding: '1rem', borderRadius: '8px', border: '1px solid var(--stroke-primary)', backgroundColor: 'var(--canvas-800)' }}>
23
+ <Button variant="filled" size="sm" style={{ marginRight: '1rem' }}>Force Dark</Button>
24
+ </div>
25
+ </div>
26
+ </>
27
+ )
28
+ }
29
+
30
+ export const ButtonOverrides: Story = {
31
+ render: () => <AllOverrides />,
32
+ }
33
+
34
+ const meta: Meta<typeof Button> = {
35
+ /* 👇 The title prop is optional.
36
+ * See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
37
+ * to learn how to generate automatic titles
38
+ */
39
+ title: 'Components/Button',
40
+ component: Button,
41
+ }
42
+
43
+ export default meta
@@ -44,7 +44,7 @@ const AllVariants = (): React.JSX.Element => {
44
44
  )
45
45
  }
46
46
 
47
- export const Variants: Story = {
47
+ export const ButtonVariants: Story = {
48
48
  render: () => <AllVariants />,
49
49
  }
50
50