@infonomic/uikit 3.7.0 → 3.9.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 (89) hide show
  1. package/dist/components/button/button-group_module.css +1 -1
  2. package/dist/components/container/container_module.css +8 -8
  3. package/dist/components/dropdown/dropdown.js +1 -1
  4. package/dist/components/dropdown/dropdown_module.css +1 -1
  5. package/dist/components/forms/calendar_module.css +13 -46
  6. package/dist/components/forms/radio-group_module.css +2 -2
  7. package/dist/components/notifications/alert_module.css +15 -15
  8. package/dist/components/notifications/toast_module.css +1 -1
  9. package/dist/components/pager/pagination_module.css +1 -1
  10. package/dist/components/table/table_module.css +2 -2
  11. package/dist/components/tabs/tabs_module.css +4 -5
  12. package/dist/icons/icon-element.d.ts.map +1 -1
  13. package/dist/icons/icon-element.js +2 -1
  14. package/dist/icons/icons.module.js +2 -0
  15. package/dist/icons/icons_module.css +7 -0
  16. package/dist/styles/styles.css +1 -1
  17. package/dist/styles/typography.css +1 -1
  18. package/dist/widgets/datepicker/datepicker.js +2 -2
  19. package/dist/widgets/datepicker/datepicker_module.css +13 -13
  20. package/dist/widgets/drawer/drawer_module.css +7 -7
  21. package/dist/widgets/modal/modal_module.css +13 -13
  22. package/dist/widgets/timeline/timeline_module.css +7 -7
  23. package/package.json +1 -1
  24. package/src/components/accordion/accordion.stories.tsx +2 -2
  25. package/src/components/avatar/avatar.stories.tsx +1 -1
  26. package/src/components/badge/badge.stories.tsx +1 -1
  27. package/src/components/button/button-group.module.css +1 -1
  28. package/src/components/button/button-group.stories.tsx +1 -1
  29. package/src/components/button/button-intents.stories.tsx +1 -1
  30. package/src/components/button/button-variants.stories.tsx +1 -1
  31. package/src/components/button/control-buttons.stories.tsx +2 -2
  32. package/src/components/button/icon-button.stories.tsx +2 -2
  33. package/src/components/card/card.stories.tsx +2 -2
  34. package/src/components/container/container.module.css +9 -8
  35. package/src/components/container/container.stories.tsx +2 -8
  36. package/src/components/dropdown/dropdown.module.css +1 -1
  37. package/src/components/dropdown/dropdown.stories.tsx +1 -1
  38. package/src/components/dropdown/dropdown.tsx +1 -1
  39. package/src/components/forms/calendar.module.css +13 -59
  40. package/src/components/forms/radio-group.module.css +2 -2
  41. package/src/components/notifications/alert.module.css +15 -15
  42. package/src/components/notifications/alert.stories.tsx +1 -1
  43. package/src/components/notifications/toast.module.css +1 -1
  44. package/src/components/pager/pagination.module.css +1 -1
  45. package/src/components/table/table.module.css +2 -2
  46. package/src/components/tabs/tabs.module.css +7 -5
  47. package/src/components/tabs/tabs.stories.tsx +1 -1
  48. package/src/icons/icon-element.tsx +3 -1
  49. package/src/icons/icons.module.css +7 -0
  50. package/src/loaders/loaders.stories.tsx +1 -1
  51. package/src/styles/base/base.css +12 -2
  52. package/src/styles/base/borders.css +30 -0
  53. package/src/styles/base/breakpoints.css +15 -0
  54. package/src/styles/base/opacity.css +12 -0
  55. package/src/styles/base/shadows.css +13 -0
  56. package/src/styles/base/size.css +24 -0
  57. package/src/styles/base/spacing.css +24 -0
  58. package/src/styles/base/transitions.css +7 -0
  59. package/src/styles/base/typography.css +47 -0
  60. package/src/styles/base/z-index.css +12 -0
  61. package/src/styles/components/components.css +1 -8
  62. package/src/styles/functional/borders.css +23 -0
  63. package/src/styles/functional/colors.css +51 -94
  64. package/src/styles/functional/functional.css +5 -1
  65. package/src/styles/functional/grid-flex.css +52 -0
  66. package/src/styles/functional/surfaces.css +115 -0
  67. package/src/styles/functional/typography.css +44 -0
  68. package/src/styles/theme/autofill.css +14 -5
  69. package/src/styles/theme/defaults.css +75 -0
  70. package/src/styles/theme/scrollers.css +4 -2
  71. package/src/styles/theme/theme.css +15 -130
  72. package/src/styles/theme/theme.stories.tsx +1 -1
  73. package/src/styles/typography/prose.css +2 -2
  74. package/src/styles/utils/utility-classes.css +202 -70
  75. package/src/widgets/datepicker/datepicker.module.css +13 -13
  76. package/src/widgets/datepicker/datepicker.tsx +2 -2
  77. package/src/widgets/drawer/drawer.module.css +7 -7
  78. package/src/widgets/modal/modal.module.css +13 -13
  79. package/src/widgets/timeline/timeline.module.css +7 -7
  80. package/src/styles/base/vars.css +0 -189
  81. package/src/styles/components/card.css +0 -20
  82. package/src/styles/components/checkbox.css +0 -55
  83. package/src/styles/components/directional-button.css +0 -92
  84. package/src/styles/components/dropdown.css +0 -19
  85. package/src/styles/components/icon-element.css +0 -10
  86. package/src/styles/components/list-checkbox.css +0 -60
  87. package/src/styles/components/popover.css +0 -15
  88. package/src/styles/components/toast.css +0 -18
  89. package/src/styles/theme/typography.css +0 -26
@@ -0,0 +1,75 @@
1
+ /**
2
+ * HTML ELEMENT DEFAULTS
3
+ *
4
+ * Opinionated starter styles for HTML elements to provide sensible defaults
5
+ * for new installations. These live in the infonomic-theme layer and are
6
+ * easily overridden by consuming applications.
7
+ */
8
+
9
+ @layer infonomic-theme {
10
+ html {
11
+ font-size: 1rem;
12
+ color: var(--text);
13
+ }
14
+
15
+ /* Redeclared here to change the specificity and scope of --prose-body */
16
+ html .not-dark {
17
+ color: var(--text);
18
+ }
19
+
20
+ /* Default (light mode) */
21
+ ::selection {
22
+ background-color: var(--theme-600);
23
+ color: white;
24
+ }
25
+
26
+ /* Dark mode */
27
+ .dark ::selection,
28
+ [data-theme="dark"] ::selection {
29
+ background-color: var(--theme-200);
30
+ color: var(--gray-900);
31
+ }
32
+
33
+ /* Headings */
34
+ h1 {
35
+ font-size: 1.75rem;
36
+ font-weight: 600;
37
+ line-height: 1.125;
38
+ }
39
+
40
+ h2 {
41
+ font-size: 1.5rem;
42
+ font-weight: 600;
43
+ line-height: 1.125;
44
+ }
45
+
46
+ h3 {
47
+ font-size: 1.25rem;
48
+ font-weight: 600;
49
+ line-height: 1.1;
50
+ }
51
+
52
+ h4 {
53
+ font-size: 1rem;
54
+ font-weight: 600;
55
+ line-height: 1.1;
56
+ }
57
+
58
+ /* External link indicator */
59
+ .external-link::after {
60
+ content: "";
61
+ display: inline-block;
62
+ background-image: url("/external-link-light.svg");
63
+ background-repeat: no-repeat;
64
+ background-position: 20% 50%;
65
+ background-size: 65% auto;
66
+ width: 1.1rem;
67
+ height: 1.1rem;
68
+ margin-right: -5px;
69
+ }
70
+
71
+ .dark .external-link::after,
72
+ [data-theme="dark"] .external-link::after {
73
+ background-image: url("/external-link-dark.svg");
74
+ }
75
+ }
@@ -5,7 +5,8 @@
5
5
  }
6
6
 
7
7
  /* rgb(44, 47, 86) = theme secondary 900 */
8
- :root.dark {
8
+ :root.dark,
9
+ :root[data-theme="dark"] {
9
10
  --scroll-bar-thumb: var(--canvas-700);
10
11
  --scroll-bar-track: var(--canvas-900);
11
12
  }
@@ -39,7 +40,8 @@
39
40
  --scroll-bar-track: var(--scroll-bar-track);
40
41
  }
41
42
 
42
- .dark .component--scroller {
43
+ .dark .component--scroller,
44
+ [data-theme="dark"] .component--scroller {
43
45
  --scroll-bar-thumb: var(--scroll-bar-thumb);
44
46
  --scroll-bar-track: var(--scroll-bar-track);
45
47
  }
@@ -1,132 +1,17 @@
1
+ /**
2
+ * THEME
3
+ *
4
+ * This file now primarily serves as a convenient import aggregator for
5
+ * theme-related concerns: autofill behavior, scrollbar styling, and
6
+ * HTML element defaults.
7
+ *
8
+ * CSS variable definitions have been moved to functional token files:
9
+ * - functional/surfaces.css (backgrounds, shadows, loader)
10
+ * - functional/typography-tokens.css (text, headings, muted)
11
+ * - functional/borders.css (border colors)
12
+ * - functional/colors.css (intent-based color tokens)
13
+ */
14
+
1
15
  @import "./autofill.css";
2
16
  @import "./scrollers.css";
3
- @import "./typography.css";
4
-
5
- @layer infonomic-theme {
6
- :root {
7
- --background: var(--canvas-25);
8
- --foreground: var(--gray-900);
9
- --text: var(--gray-900);
10
- --headings: var(--primary-700);
11
- --muted: oklch(from var(--foreground) calc(l * 2) c h);
12
- --border-color: var(--gray-100);
13
- --shadow: var(--shadow-md);
14
- --loader-color: var(--primary-500);
15
-
16
- --invert-background: var(--canvas-900);
17
- --invert-foreground: var(--gray-50);
18
- --invert-text: var(--gray-50);
19
- --invert-headings: var(--gray-50);
20
- --invert-muted: oklch(from var(--foreground) calc(l * 0.75) c h);
21
- --invert-border-color: var(--canvas-700);
22
- --invert-shadow: var(--shadow-lg);
23
- --invert-loader-color: var(--gray-50);
24
- }
25
-
26
- /* 🌙 Dark via `.dark` class. We rely on the consuming
27
- * application to detect a user's preferred color scheme
28
- * - either by header or cookie, and to set a root html
29
- * class accordingly
30
- */
31
- .dark {
32
- --background: var(--invert-background);
33
- --foreground: var(--invert-foreground);
34
- --text: var(--invert-text);
35
- --headings: var(--invert-headings);
36
- --border-color: var(--invert-border-color);
37
- --shadow: var(--invert-shadow);
38
- --muted: var(--invert-muted);
39
- --loader-color: var(--invert-loader-color);
40
- }
41
-
42
- /* .not-dark override: Forces light mode tokens by re-declaring :root values.
43
- * This duplication is intentional - it ensures .not-dark always wins over .dark
44
- * regardless of DOM order, without needing complex :not() selectors.
45
- * Alternative approaches (revert-layer, :not() patterns) would be more fragile.
46
- */
47
- .not-dark {
48
- --background: var(--canvas-25);
49
- --foreground: var(--gray-900);
50
- --text: var(--gray-900);
51
- --headings: var(--primary-800);
52
- --muted: oklch(from var(--foreground) calc(l * 2) c h);
53
- --border-color: var(--gray-100);
54
- --shadow: var(--shadow-md);
55
- --loader-color: var(--primary-500);
56
- }
57
-
58
- html {
59
- font-size: 1rem;
60
- color: var(--text);
61
- }
62
-
63
- /* Redeclared here to change the specificity and scope of --prose-body */
64
- html .not-dark {
65
- color: var(--text);
66
- }
67
-
68
- /* Default (light mode) */
69
- ::selection {
70
- background-color: var(--theme-600);
71
- color: white;
72
- }
73
-
74
- /* Dark mode */
75
- .dark ::selection {
76
- background-color: var(--theme-200);
77
- color: var(--gray-900);
78
- }
79
-
80
- .background {
81
- background-color: var(--background);
82
- }
83
-
84
- .foreground {
85
- color: var(--foreground);
86
- }
87
-
88
- .text {
89
- color: var(--text);
90
- }
91
-
92
- .headings {
93
- color: var(--headings);
94
- }
95
-
96
- .muted {
97
- font-size: 0.925rem;
98
- color: var(--muted);
99
- }
100
-
101
- .shadow {
102
- box-shadow: var(--shadow);
103
- }
104
-
105
- .border-color {
106
- border-color: var(--border-color);
107
- }
108
-
109
- .border {
110
- border-color: var(--border-color);
111
- border-width: var(--border-width-thin);
112
- border-style: var(--border-style-solid);
113
- border-radius: var(--border-radius-sm);
114
- }
115
-
116
- /* External link */
117
- .external-link::after {
118
- content: "";
119
- display: inline-block;
120
- background-image: url("/external-link-light.svg");
121
- background-repeat: no-repeat;
122
- background-position: 20% 50%;
123
- background-size: 65% auto;
124
- width: 1.1rem;
125
- height: 1.1rem;
126
- margin-right: -5px;
127
- }
128
-
129
- .dark .external-link::after {
130
- background-image: url("/external-link-dark.svg");
131
- }
132
- }
17
+ @import "./defaults.css";
@@ -5,7 +5,7 @@ export const Default = (): React.JSX.Element => {
5
5
  <>
6
6
  <div style={{ marginBottom: '48px' }}>
7
7
  <div style={{ maxWidth: '700px', margin: 'auto' }}>
8
- <div className="shadow p-3 border rounded">
8
+ <div className="p-5 shadow border-thin rounded">
9
9
  <h2>Heading 2</h2>
10
10
  <span className="muted">Muted text here.</span>
11
11
  <p>
@@ -125,7 +125,7 @@
125
125
  }
126
126
 
127
127
  /* medium breakpoint */
128
- @media screen and (min-width: 768px) {
128
+ @media screen and (min-width: 48rem) {
129
129
 
130
130
  article,
131
131
  .dynamic-text {
@@ -395,7 +395,7 @@
395
395
  padding-bottom: 0;
396
396
  }
397
397
 
398
- @media (min-width: 768px) {
398
+ @media (min-width: 48rem) {
399
399
  .prose :where(blockquote):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
400
400
  font-size: 1.7rem;
401
401
  line-height: 1.2;