@infonomic/uikit 2.14.0 → 3.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 (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/calendar/calendar.js +6 -6
  10. package/dist/components/input/checkbox-group.js +1 -1
  11. package/dist/components/input/checkbox.js +1 -1
  12. package/dist/components/input/checkbox_module.css +42 -91
  13. package/dist/components/input/errors.js +2 -3
  14. package/dist/components/input/input.js +1 -1
  15. package/dist/components/input/input_module.css +42 -109
  16. package/dist/components/input/radio-group_module.css +14 -49
  17. package/dist/components/input/select.js +1 -1
  18. package/dist/components/input/text-area.js +1 -1
  19. package/dist/components/input/utils.js +3 -4
  20. package/dist/components/notifications/alert_module.css +0 -4
  21. package/dist/components/overlay/overlay.js +1 -1
  22. package/dist/icons/close-icon.js +1 -1
  23. package/dist/icons/copy-icon.d.ts.map +1 -1
  24. package/dist/icons/copy-icon.js +1 -1
  25. package/dist/react.d.ts +1 -1
  26. package/dist/react.d.ts.map +1 -1
  27. package/dist/react.js +1 -1
  28. package/dist/styles/styles.css +1 -1
  29. package/dist/tsconfig.build.tsbuildinfo +1 -1
  30. package/dist/utils/findMatch.js +3 -3
  31. package/dist/utils/isTouchDevice.js +3 -3
  32. package/dist/utils/to-kebab-case.js +1 -4
  33. package/dist/widgets/datepicker/datepicker.js +1 -1
  34. package/dist/widgets/drawer/drawer.js +1 -1
  35. package/dist/widgets/modal/modal.js +1 -1
  36. package/dist/widgets/search/search.js +1 -1
  37. package/dist/widgets/timeline/timeline.d.ts.map +1 -0
  38. package/dist/widgets/timeline/timeline.module.js +17 -0
  39. package/dist/{components → widgets}/timeline/timeline_module.css +10 -10
  40. package/package.json +30 -30
  41. package/src/components/badge/badge.module.css +38 -68
  42. package/src/components/button/button-intents.stories.tsx +1 -1
  43. package/src/components/button/button-overrides.stories.tsx +43 -0
  44. package/src/components/button/button-variants.stories.tsx +1 -1
  45. package/src/components/button/button.module.css +135 -230
  46. package/src/components/button/control-buttons.module.css +5 -17
  47. package/src/components/button/control-buttons.stories.tsx +1 -1
  48. package/src/components/button/copy-button.module.css +32 -14
  49. package/src/components/button/copy-button.stories.tsx +6 -6
  50. package/src/components/button/copy-button.tsx +16 -12
  51. package/src/components/calendar/calendar.stories.tsx +1 -1
  52. package/src/components/input/checkbox.module.css +43 -99
  53. package/src/components/input/input.module.css +44 -119
  54. package/src/components/input/input.stories.tsx +1 -1
  55. package/src/components/input/radio-group.module.css +16 -72
  56. package/src/components/input/radio-group.stories.tsx +1 -1
  57. package/src/components/input/select.stories.tsx +1 -1
  58. package/src/components/notifications/alert.module.css +0 -4
  59. package/src/components/overlay/overlay.tsx +1 -1
  60. package/src/icons/close-icon.tsx +1 -1
  61. package/src/icons/copy-icon.tsx +1 -2
  62. package/src/icons/icons.module.css +1 -0
  63. package/src/react.ts +1 -1
  64. package/src/styles/theme/theme.css +6 -4
  65. package/src/styles/theme/tokens.css +600 -0
  66. package/src/widgets/drawer/drawer.stories.tsx +1 -34
  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
@@ -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