@openmrs/esm-styleguide 3.3.2-pre.9 → 4.0.0-pre.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 (203) hide show
  1. package/.turbo/turbo-build.log +38 -140
  2. package/.turbo/turbo-lint.log +2 -0
  3. package/.turbo/turbo-test.log +14 -0
  4. package/dist/022d7839fbf0b01f1279.woff2 +0 -0
  5. package/dist/02e1d2dbd3774a8f5658.woff2 +0 -0
  6. package/dist/066f70960ee0bd4c07f5.woff +0 -0
  7. package/dist/0755d9c25fe86099a1fb.woff2 +0 -0
  8. package/dist/091d3a63042974d54d8a.woff +0 -0
  9. package/dist/0befeb0f9f061f052717.woff +0 -0
  10. package/dist/0c7e37865f4bb741d719.woff2 +0 -0
  11. package/dist/0e49dbb9071356a97aa7.woff +0 -0
  12. package/dist/0e5132569fd3eaea21cc.woff +0 -0
  13. package/dist/0eb6e423b08540bb2757.woff2 +0 -0
  14. package/dist/1223fdf597c1c7a57096.woff +0 -0
  15. package/dist/13aa346ec359eaa168e2.woff +0 -0
  16. package/dist/144035d867f964f2c13d.woff2 +0 -0
  17. package/dist/160c450b41a6dfc1bebe.woff2 +0 -0
  18. package/dist/164bc7c64a15028f6b19.woff +0 -0
  19. package/dist/178f507500fb1dabcf4e.woff +0 -0
  20. package/dist/189265eddd933218a2c4.woff2 +0 -0
  21. package/dist/19239848cb5cdf02953e.woff2 +0 -0
  22. package/dist/1ac9d0b721a47c618f27.woff2 +0 -0
  23. package/dist/1b3c2f1d45dbb745b4cf.woff +0 -0
  24. package/dist/2034d12242df27d980b8.woff +0 -0
  25. package/dist/22f2f7f20d522f25d8ec.woff2 +0 -0
  26. package/dist/257967d345c4d73a616e.woff +0 -0
  27. package/dist/27626c129fe4aa22e2e6.woff2 +0 -0
  28. package/dist/2861a6629748147a32ea.woff2 +0 -0
  29. package/dist/2b531494817a7008521c.woff +0 -0
  30. package/dist/2d855afa565d0006f5fa.woff2 +0 -0
  31. package/dist/2e0b1ce3e5a1765917d0.woff2 +0 -0
  32. package/dist/3028d912b8189a439418.woff2 +0 -0
  33. package/dist/32a6fcddf51918f011f5.woff2 +0 -0
  34. package/dist/332d509af7965c98d5af.woff +0 -0
  35. package/dist/347e5ea493b441f06459.woff2 +0 -0
  36. package/dist/34ca7aaefd825bca9d62.woff +0 -0
  37. package/dist/362a779400aac0be5a12.woff2 +0 -0
  38. package/dist/3647330588ae297a0bd4.woff +0 -0
  39. package/dist/390315031483cbc78b20.woff +0 -0
  40. package/dist/3afa7954e621de8a516a.woff +0 -0
  41. package/dist/3f0da7edcbb8d01dcb97.woff +0 -0
  42. package/dist/3f4766bc8c4721b8d7a6.woff +0 -0
  43. package/dist/3fb99cf388da08c31bd7.woff2 +0 -0
  44. package/dist/404c0909c893f95ee0dc.woff2 +0 -0
  45. package/dist/40e1012bdd73a02c83f8.woff +0 -0
  46. package/dist/422493740da495c4413f.woff2 +0 -0
  47. package/dist/42423f4a1cfd745854a5.woff +0 -0
  48. package/dist/42c5469340604f5e79d5.woff2 +0 -0
  49. package/dist/42df6ba8755c7591afbe.woff2 +0 -0
  50. package/dist/44c432e4a678791737ca.woff2 +0 -0
  51. package/dist/452cc78a1baf50168631.woff +0 -0
  52. package/dist/4882dd164789ce7f44fe.woff2 +0 -0
  53. package/dist/49290aeb66b58f856f84.woff +0 -0
  54. package/dist/49b97d3a9224cb6bd5ac.woff +0 -0
  55. package/dist/4c3ed2a3f44451a96594.woff2 +0 -0
  56. package/dist/4f0c4a9ba045ef843752.woff +0 -0
  57. package/dist/4f746f1bbc05d6e9497f.woff2 +0 -0
  58. package/dist/5192df154d7f8cb9b76c.woff +0 -0
  59. package/dist/54028f60020ee6ac16c1.woff +0 -0
  60. package/dist/5687219882cd972495e6.woff +0 -0
  61. package/dist/56c52b5b71ff7d0decad.woff +0 -0
  62. package/dist/578aae4082fb12898fe3.woff2 +0 -0
  63. package/dist/5a07c14cd7519e0fa02d.woff +0 -0
  64. package/dist/5d3700da8be3c5172b76.woff2 +0 -0
  65. package/dist/5e1440da12d78046c31a.woff2 +0 -0
  66. package/dist/608bff2bb28ccfd74ca0.woff +0 -0
  67. package/dist/62f5f45b32f0702031ad.woff2 +0 -0
  68. package/dist/62fd670eebf4976bb6df.woff2 +0 -0
  69. package/dist/6305238484fd3cc045b0.woff2 +0 -0
  70. package/dist/64e1054a50262b9083ab.woff2 +0 -0
  71. package/dist/6557a3c33c4218db6066.woff2 +0 -0
  72. package/dist/66e70aaa5d9c7be2b7d9.woff +0 -0
  73. package/dist/68c556c669c532459374.woff2 +0 -0
  74. package/dist/6956fe0f5e625049f7e2.woff2 +0 -0
  75. package/dist/6bdf3ec568a6634a4aea.woff2 +0 -0
  76. package/dist/6d9b6411704ee0e26f31.woff2 +0 -0
  77. package/dist/6dc1395379557355e28d.woff2 +0 -0
  78. package/dist/6fcf28e2972af1d72ef8.woff +0 -0
  79. package/dist/723a4b364f38da1e93e0.woff2 +0 -0
  80. package/dist/729e5174c878b0a30035.woff2 +0 -0
  81. package/dist/74025371289e2bab9590.woff2 +0 -0
  82. package/dist/762888d30d179075ea6c.woff +0 -0
  83. package/dist/784d3444a92b4f1b77bc.woff +0 -0
  84. package/dist/794699869c58056513c7.woff +0 -0
  85. package/dist/79752c5c990ac51471f4.woff2 +0 -0
  86. package/dist/7984062acac19d00de83.woff2 +0 -0
  87. package/dist/79bc83792898f002dfc0.woff +0 -0
  88. package/dist/7d46ea83f372f13d40a0.woff +0 -0
  89. package/dist/7f15c4783287134ac710.woff +0 -0
  90. package/dist/8000079133e696898c7e.woff2 +0 -0
  91. package/dist/806a7a7745e7bd864174.woff +0 -0
  92. package/dist/8212ca4bb829a5d9f858.woff2 +0 -0
  93. package/dist/86c57595c1697937314b.woff +0 -0
  94. package/dist/88cb07ee53507d19f992.woff2 +0 -0
  95. package/dist/8a014da16bb5df1e9830.woff2 +0 -0
  96. package/dist/8af6b3d1e1a4ac4fdd49.woff2 +0 -0
  97. package/dist/8bbf2e3b118b1732ea16.woff2 +0 -0
  98. package/dist/8cd3fae70878b55de45b.woff +0 -0
  99. package/dist/8e05df04c42299bc9c31.woff +0 -0
  100. package/dist/9022078be982e16dc192.woff2 +0 -0
  101. package/dist/907c442ef0bf7886cbbc.woff2 +0 -0
  102. package/dist/90822629c9f43acb1cf8.woff2 +0 -0
  103. package/dist/92086fc1b9953ba20acd.woff +0 -0
  104. package/dist/92f1cafa16c646cffd37.woff2 +0 -0
  105. package/dist/9326d3d6ca3411249fd4.woff2 +0 -0
  106. package/dist/9340a047e2c400a8eff4.woff +0 -0
  107. package/dist/951b1b92a4b8315c27a1.woff +0 -0
  108. package/dist/957995d81ad3284f963f.woff2 +0 -0
  109. package/dist/95b38dc2556a6c46dc6c.woff2 +0 -0
  110. package/dist/95db32b85d6efe3f0c92.woff2 +0 -0
  111. package/dist/962cfb135eb81a80c239.woff +0 -0
  112. package/dist/96a9036ba12617504616.woff +0 -0
  113. package/dist/983c50a737da66c0bd02.woff2 +0 -0
  114. package/dist/987d18f198bd7d9fa265.woff2 +0 -0
  115. package/dist/9924e57202230ba397b0.woff2 +0 -0
  116. package/dist/9b6742916c10378bb045.woff +0 -0
  117. package/dist/9df11ababf0dd515e6a3.woff +0 -0
  118. package/dist/9e3f7d82b48ac62c7cb5.woff2 +0 -0
  119. package/dist/a07b795a96fa2b6691d1.woff +0 -0
  120. package/dist/a1c1f2f0c32534ae4785.woff2 +0 -0
  121. package/dist/a1f7181f7c86baf1c351.woff2 +0 -0
  122. package/dist/a32f901b42b9ddcc6e85.woff +0 -0
  123. package/dist/a34802c95c44f5903e18.woff2 +0 -0
  124. package/dist/a7c1ee99b038bc0777e0.woff +0 -0
  125. package/dist/a81d5c10cd640839a4b8.woff2 +0 -0
  126. package/dist/aa343b4fcab1658acc56.woff2 +0 -0
  127. package/dist/ab33fa58a6e7146d03f0.woff +0 -0
  128. package/dist/abeb6d68a7f128eaa1cd.woff +0 -0
  129. package/dist/aec9738277936824e421.woff +0 -0
  130. package/dist/b02a06390388409ab8cd.woff +0 -0
  131. package/dist/b0afed71b45a7f38e794.woff +0 -0
  132. package/dist/b0ec1af29941e0f52305.woff2 +0 -0
  133. package/dist/b3bbe4705c54760ade6b.woff +0 -0
  134. package/dist/b55f8f00b5929160ed27.woff +0 -0
  135. package/dist/b649469b999b248dbb70.woff +0 -0
  136. package/dist/b691d8c0c5110ea3659e.woff +0 -0
  137. package/dist/b729b57f022eb1d859fc.woff +0 -0
  138. package/dist/b8020bf5b1afb9556569.woff +0 -0
  139. package/dist/bb730844c9185c864437.woff2 +0 -0
  140. package/dist/bbae2f8ceda944a1ecd5.woff +0 -0
  141. package/dist/bfefc1c5dd4c689b4f0f.woff2 +0 -0
  142. package/dist/c204ba906a18b66bed05.woff +0 -0
  143. package/dist/c25bc2c3e5c0f0b089a2.woff +0 -0
  144. package/dist/c26797e2920f701bf68f.woff2 +0 -0
  145. package/dist/c32b0c98c77e458414dc.woff +0 -0
  146. package/dist/c3a84513ace37e633e6c.woff +0 -0
  147. package/dist/c6dd22ce106021638df7.woff2 +0 -0
  148. package/dist/c781dd3e68cf4db696e2.woff2 +0 -0
  149. package/dist/c81d3db94f7270abbebf.woff +0 -0
  150. package/dist/c8298f275f960d821949.woff +0 -0
  151. package/dist/c89e876b0e1fd2a0c661.woff2 +0 -0
  152. package/dist/c8cf918de7d9deffd15c.woff2 +0 -0
  153. package/dist/cacfd1d7dbd14067b970.woff2 +0 -0
  154. package/dist/cc33f663568d938071a0.woff +0 -0
  155. package/dist/cc628a3da5e5810acebe.woff +0 -0
  156. package/dist/cd9a0204454ff0e22880.woff2 +0 -0
  157. package/dist/cdb54c58914c803c9ed6.woff +0 -0
  158. package/dist/cf8cdfc9a1ead9d332f5.woff2 +0 -0
  159. package/dist/d55e14dce62503dcad5f.woff +0 -0
  160. package/dist/d69d5111a1f16e74d2fb.woff2 +0 -0
  161. package/dist/d6f3290223965413af92.woff +0 -0
  162. package/dist/d96e5a614e96c351c453.woff +0 -0
  163. package/dist/dacaf9bef27fac67fb17.woff2 +0 -0
  164. package/dist/dd406a41dc851acc7615.woff +0 -0
  165. package/dist/e0d279d30dd9df7831ce.woff2 +0 -0
  166. package/dist/e26dfdb6948e56dcf16c.woff +0 -0
  167. package/dist/e5317022888823405337.woff2 +0 -0
  168. package/dist/e589f9b7ff20e7e011ee.woff2 +0 -0
  169. package/dist/e5b7f5835bf8b91304bf.woff +0 -0
  170. package/dist/e655f59b8f3ed3b7c9fe.woff2 +0 -0
  171. package/dist/e7c487ed0bd3af889f66.woff2 +0 -0
  172. package/dist/eb36767a3caa8dfc71e8.woff2 +0 -0
  173. package/dist/efbc47072be0090327f8.woff +0 -0
  174. package/dist/f064c7d4889d1db43518.woff +0 -0
  175. package/dist/f31b6425f37c2b71c3fc.woff2 +0 -0
  176. package/dist/f3938458fa6048e8a833.woff +0 -0
  177. package/dist/f4031df8380579c41ed7.woff +0 -0
  178. package/dist/f432bafd941d9016122c.woff +0 -0
  179. package/dist/f4367aaef942e4cbea24.woff +0 -0
  180. package/dist/f5b2fe58c9057281ea3f.woff +0 -0
  181. package/dist/f5be008474d38b4cf15a.woff +0 -0
  182. package/dist/f968050d6a8297e66619.woff2 +0 -0
  183. package/dist/fdef8ecc502e23149bcc.woff +0 -0
  184. package/dist/openmrs-esm-styleguide.css +1 -1
  185. package/dist/openmrs-esm-styleguide.css.map +1 -1
  186. package/dist/openmrs-esm-styleguide.js +1 -1
  187. package/dist/openmrs-esm-styleguide.js.map +1 -1
  188. package/jest.config.js +9 -0
  189. package/package.json +14 -19
  190. package/src/_all.scss +1 -2
  191. package/src/_overrides.scss +150 -114
  192. package/src/_vars.scss +5 -14
  193. package/src/breakpoints/index.ts +28 -5
  194. package/src/components/_general.scss +1 -1
  195. package/src/components/_main-content.scss +3 -3
  196. package/src/left-nav/index.tsx +1 -1
  197. package/src/left-nav/left-nav.module.scss +2 -3
  198. package/src/modals/index.tsx +2 -2
  199. package/src/notifications/index.tsx +3 -4
  200. package/src/notifications/notification.component.tsx +1 -1
  201. package/src/spinner/_spinner.scss +1 -1
  202. package/src/toasts/index.tsx +3 -2
  203. package/src/toasts/toast.component.tsx +1 -1
@@ -1,100 +1,189 @@
1
- .bx--data-table,
2
- .bx--data-table-header,
3
- .bx--table-toolbar,
4
- .bx--data-table tbody {
1
+ @use "@carbon/styles/scss/spacing";
2
+
3
+ /* UI Shell Header */
4
+ .cds--header {
5
+ @include brand-01(background-color);
6
+ border-bottom: none;
7
+ }
8
+
9
+ .cds--header__action:hover {
10
+ @include brand-02(background-color);
11
+ }
12
+
13
+ .cds--header__action--active {
14
+ @include brand-02(background-color);
15
+ @include brand-02(border-color);
16
+ }
17
+
18
+ .cds--header-panel {
19
+ @include brand-02(background-color);
20
+ }
21
+
22
+ .cds--header__menu-trigger > svg,
23
+ .cds--header__menu-trigger:hover > svg,
24
+ .cds--btn.cds--btn--icon-only.cds--header__action svg,
25
+ .cds--btn.cds--btn--icon-only.cds--header__action:hover svg {
26
+ fill: white;
27
+ }
28
+
29
+ .cds--header-panel--expanded {
30
+ border-left: none;
31
+ border-right: none;
32
+ }
33
+
34
+ /* Content Switcher */
35
+ .cds--content-switcher-btn {
36
+ background-color: $ui-02;
37
+ border-top: 1px solid #a6c8ff;
38
+ border-bottom: 1px solid #a6c8ff;
39
+ color: $text-02;
40
+
41
+ &:first-child,
42
+ &:last-child {
43
+ border-left: 0.0625rem solid #a6c8ff;
44
+ border-right: 0.0625rem solid #a6c8ff;
45
+ }
46
+
47
+ &::after {
48
+ background-color: transparent;
49
+ }
50
+
51
+ &.cds--content-switcher--selected {
52
+ background-color: $color-blue-10;
53
+ border: 1px solid $interactive-01;
54
+ color: $interactive-01;
55
+
56
+ &:active {
57
+ background-color: $color-blue-10;
58
+ }
59
+
60
+ &::after {
61
+ background-color: $color-blue-10;
62
+ }
63
+ }
64
+
65
+ &:first-of-type[aria-selected="false"] {
66
+ border-right: 0;
67
+ }
68
+
69
+ &:last-of-type[aria-selected="false"] {
70
+ border-left: 0;
71
+ }
72
+
73
+ &:focus,
74
+ &:hover {
75
+ background-color: $ui-01;
76
+ color: $interactive-01;
77
+ }
78
+ }
79
+
80
+ .cds--content-switcher-btn:before {
81
+ display: none;
82
+ }
83
+
84
+ /* Tabs */
85
+ .cds--tabs--scrollable
86
+ .cds--tabs--scrollable__nav-item--selected
87
+ .cds--tabs--scrollable__nav-link,
88
+ .cds--tabs--scrollable
89
+ .cds--tabs--scrollable__nav-item--selected
90
+ .cds--tabs--scrollable__nav-link:active,
91
+ .cds--tabs--scrollable
92
+ .cds--tabs--scrollable__nav-item--selected
93
+ .cds--tabs--scrollable__nav-link:focus {
94
+ border-bottom: 2px solid var(--brand-03);
95
+ }
96
+
97
+ .cds--tabs--scrollable.cds--tabs--scrollable--container
98
+ .cds--tabs--scrollable__nav-item--selected
99
+ .cds--tabs--scrollable__nav-link {
100
+ box-shadow: inset 0 2px 0 0 var(--brand-03);
101
+ }
102
+
103
+ .cds--tabs--scrollable .cds--tabs--scrollable__nav-link:active,
104
+ .cds--tabs--scrollable .cds--tabs--scrollable__nav-link:focus {
105
+ outline: 2px solid var(--brand-03);
106
+ }
107
+
108
+ /* DataTables */
109
+ .cds--data-table,
110
+ .cds--data-table-header,
111
+ .cds--table-toolbar,
112
+ .cds--data-table tbody {
5
113
  background: transparent;
6
114
  }
7
115
 
8
- .bx--data-table-container {
116
+ .cds--data-table-container {
9
117
  background: $ui-02;
10
118
  position: relative;
11
119
  }
12
120
 
13
- .bx--table-toolbar {
121
+ .cds--table-toolbar {
14
122
  position: absolute;
15
123
  top: 2px;
16
124
  }
17
125
 
18
- .bx--data-table-header {
19
- padding: $spacing-04;
126
+ .cds--data-table-header {
127
+ padding: spacing.$spacing-04;
20
128
  text-align: start;
21
129
  }
22
130
 
23
- .bx--data-table-header__title {
24
- font-size: $spacing-05;
131
+ .cds--data-table-header__title {
132
+ font-size: spacing.$spacing-05;
25
133
  font-weight: 600;
26
134
  color: $text-02;
27
135
  }
28
136
 
29
- .bx--data-table thead,
30
- .bx--data-table tr,
31
- .bx--data-table td,
32
- .bx--data-table--sort th,
33
- .bx--data-table--sort th .bx--table-sort__flex {
34
- height: $spacing-07;
137
+ .cds--data-table thead,
138
+ .cds--data-table tr,
139
+ .cds--data-table td,
140
+ .cds--data-table--sort th,
141
+ .cds--data-table--sort th .cds--table-sort__flex {
142
+ height: spacing.$spacing-07;
35
143
  min-height: unset;
36
144
  color: $text-02;
37
145
  }
38
146
 
39
- .bx--btn--primary,
40
- .bx--btn--primary:active,
41
- .bx--btn--tertiary:hover,
42
- .bx--btn--tertiary:active,
43
- .bx--btn--tertiary:focus {
44
- @include brand-03(background-color);
147
+ /* Misc */
148
+ .cds--btn--primary,
149
+ .cds--btn--primary:active,
150
+ .cds--btn--tertiary:hover,
151
+ .cds--btn--tertiary:active,
152
+ .cds--btn--tertiary:focus {
153
+ @include brand-01(background-color);
45
154
  }
46
155
 
47
- .bx--btn--primary:hover {
48
- @include brand-01(background-color);
156
+ .cds--btn--primary:hover {
157
+ @include brand-02(background-color);
49
158
  }
50
159
 
51
- .bx--btn--tertiary {
160
+ .cds--btn--tertiary {
52
161
  @include brand-03(color);
53
162
  }
54
163
 
55
- .bx--btn--tertiary,
56
- .bx--btn--primary:focus,
57
- .bx--btn--tertiary:focus {
164
+ .cds--btn--tertiary,
165
+ .cds--btn--primary:focus,
166
+ .cds--btn--tertiary:focus {
58
167
  @include brand-03(border-color);
59
168
  }
60
169
 
61
- .bx--btn--tertiary:hover,
62
- .bx--btn--tertiary:active,
63
- .bx--btn--tertiary:focus {
170
+ .cds--btn--tertiary:hover,
171
+ .cds--btn--tertiary:active,
172
+ .cds--btn--tertiary:focus {
64
173
  color: $ui-02;
65
174
  }
66
175
 
67
- /* UI Shell header */
68
-
69
- .bx--header {
70
- @include brand-01(background-color);
71
- @include brand-02(border-bottom);
72
- }
73
-
74
- .bx--header__action:hover {
75
- @include brand-02(background-color);
76
- }
77
-
78
- .bx--header-panel {
79
- @include brand-02(background-color);
80
- }
81
-
82
- .bx--header__action--active {
83
- @include brand-02(background-color);
84
- @include brand-02(border-color);
85
- }
86
-
87
- .bx--overflow-menu--flip {
88
- &.bx--overflow-menu-options {
176
+ .cds--overflow-menu--flip {
177
+ &.cds--overflow-menu-options {
89
178
  background-color: $openmrs-background-grey;
90
179
  left: -6.025rem;
91
180
  min-width: 12.5rem;
92
- top: $spacing-09;
181
+ top: spacing.$spacing-09;
93
182
  }
94
183
  }
95
184
 
96
- .bx--overflow-menu--flip {
97
- &.bx--overflow-menu-options[data-floating-menu-direction="bottom"] {
185
+ .cds--overflow-menu--flip {
186
+ &.cds--overflow-menu-options[data-floating-menu-direction="bottom"] {
98
187
  &::after {
99
188
  top: 0;
100
189
  height: 0;
@@ -104,70 +193,17 @@
104
193
  }
105
194
  }
106
195
 
107
- .bx--pagination-nav__page:not(.bx--pagination-nav__page--direction) {
196
+ .cds--pagination-nav__page:not(.cds--pagination-nav__page--direction) {
108
197
  &::after {
109
198
  @include brand-03(background-color);
110
199
  }
111
200
  }
112
201
 
113
- .bx--pagination-nav__page .bx--pagination-nav__page--active,
114
- .bx--pagination-nav__page:focus {
202
+ .cds--pagination-nav__page .cds--pagination-nav__page--active,
203
+ .cds--pagination-nav__page:focus {
115
204
  outline: 2px solid var(--brand-03);
116
205
  }
117
206
 
118
- /* Content Switcher */
119
-
120
- .bx--content-switcher-btn {
121
- background-color: $ui-02;
122
- border: 1px solid #a6c8ff;
123
- color: $text-02;
124
-
125
- &:first-of-type[aria-selected="false"] {
126
- border-right: 0;
127
- }
128
-
129
- &:last-of-type[aria-selected="false"] {
130
- border-left: 0;
131
- }
132
-
133
- &:focus,
134
- &:hover {
135
- background-color: $color-blue-10;
136
- color: $interactive-01;
137
- }
138
-
139
- &.bx--content-switcher--selected {
140
- background-color: $color-blue-10;
141
- border: 1px solid $interactive-01;
142
- color: $interactive-01;
143
- }
144
- }
145
-
146
- .bx--content-switcher-btn:before {
147
- display: none;
148
- }
149
-
150
- /* Tabs Overrides */
151
-
152
- .bx--tabs--scrollable
153
- .bx--tabs--scrollable__nav-item--selected
154
- .bx--tabs--scrollable__nav-link,
155
- .bx--tabs--scrollable
156
- .bx--tabs--scrollable__nav-item--selected
157
- .bx--tabs--scrollable__nav-link:active,
158
- .bx--tabs--scrollable
159
- .bx--tabs--scrollable__nav-item--selected
160
- .bx--tabs--scrollable__nav-link:focus {
161
- border-bottom: 2px solid var(--brand-03);
162
- }
163
-
164
- .bx--tabs--scrollable.bx--tabs--scrollable--container
165
- .bx--tabs--scrollable__nav-item--selected
166
- .bx--tabs--scrollable__nav-link {
167
- box-shadow: inset 0 2px 0 0 var(--brand-03);
168
- }
169
-
170
- .bx--tabs--scrollable .bx--tabs--scrollable__nav-link:active,
171
- .bx--tabs--scrollable .bx--tabs--scrollable__nav-link:focus {
172
- outline: 2px solid var(--brand-03);
207
+ .cds--side-nav {
208
+ background-color: transparent;
173
209
  }
package/src/_vars.scss CHANGED
@@ -24,17 +24,6 @@ $field-01: #f4f4f4;
24
24
  $grey-2: #e0e0e0;
25
25
  $labeldropdown: #c6c6c6;
26
26
 
27
- $brand-primary-10: #d9fbfb;
28
- $brand-primary-20: #9ef0f0;
29
- $brand-primary-30: #3ddbd9;
30
- $brand-primary-40: #08bdba;
31
- $brand-primary-50: #009d9a;
32
-
33
- /* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */
34
-
35
- $brand-primary-90: #022b30;
36
- $brand-primary-100: #081a1c;
37
-
38
27
  @mixin brand-01($property) {
39
28
  #{$property}: #005d5d;
40
29
  #{$property}: var(--brand-01);
@@ -59,9 +48,11 @@ $brand-primary-100: #081a1c;
59
48
  $breakpoint-phone-min: 0px;
60
49
  $breakpoint-phone-max: 600px;
61
50
  $breakpoint-tablet-min: 601px;
62
- $breakpoint-tablet-max: 1200px;
63
- $breakpoint-desktop-min: 1201px;
64
- $breakpoint-desktop-max: 99999999px;
51
+ $breakpoint-tablet-max: 1023px;
52
+ $breakpoint-small-desktop-min: 1024px;
53
+ $breakpoint-small-desktop-max: 1439px;
54
+ $breakpoint-large-desktop-min: 1440px;
55
+ $breakpoint-large-desktop-max: 99999999px;
65
56
 
66
57
  /* These color variables will be removed in a future release */
67
58
  $brand-teal-01: #007d79;
@@ -1,19 +1,42 @@
1
+ export const Breakpoint = {
2
+ PHONE_MIN: 0,
3
+ PHONE_MAX: 600,
4
+ TABLET_MIN: 601,
5
+ TABLET_MAX: 1023,
6
+ SMALL_DESKTOP_MIN: 1024,
7
+ SMALL_DESKTOP_MAX: 1439,
8
+ LARGE_DESKTOP_MIN: 1440,
9
+ LARGE_DESKTOP_MAX: Number.MAX_SAFE_INTEGER,
10
+ } as const;
11
+
1
12
  function setBodyCssClasses() {
2
13
  document.body.classList.toggle(
3
14
  "omrs-breakpoint-lt-tablet",
4
- window.innerWidth < 600
15
+ window.innerWidth < Breakpoint.TABLET_MIN
5
16
  );
6
17
  document.body.classList.toggle(
7
18
  "omrs-breakpoint-gt-phone",
8
- window.innerWidth >= 600
19
+ window.innerWidth > Breakpoint.PHONE_MAX
20
+ );
21
+ document.body.classList.toggle(
22
+ "omrs-breakpoint-gt-tablet",
23
+ window.innerWidth > Breakpoint.TABLET_MAX
9
24
  );
10
25
  document.body.classList.toggle(
11
26
  "omrs-breakpoint-lt-desktop",
12
- window.innerWidth < 1200
27
+ window.innerWidth < Breakpoint.SMALL_DESKTOP_MIN
13
28
  );
14
29
  document.body.classList.toggle(
15
- "omrs-breakpoint-gt-tablet",
16
- window.innerWidth >= 1200
30
+ "omrs-breakpoint-lt-small-desktop",
31
+ window.innerWidth < Breakpoint.SMALL_DESKTOP_MIN
32
+ );
33
+ document.body.classList.toggle(
34
+ "omrs-breakpoint-lt-large-desktop",
35
+ window.innerWidth < Breakpoint.LARGE_DESKTOP_MIN
36
+ );
37
+ document.body.classList.toggle(
38
+ "omrs-breakpoint-gt-small-desktop",
39
+ window.innerWidth > Breakpoint.SMALL_DESKTOP_MAX
17
40
  );
18
41
  }
19
42
 
@@ -24,7 +24,7 @@ body {
24
24
  margin: 1.5em 0;
25
25
  }
26
26
 
27
- .bx--snippet {
27
+ .cds--snippet {
28
28
  margin-top: 1.5em;
29
29
  }
30
30
  }
@@ -14,9 +14,9 @@
14
14
  --omrs-offline-banner-height: 1.5rem;
15
15
  --omrs-topnav-height: 4.5rem;
16
16
 
17
- .bx--side-nav,
18
- .bx--header-panel--expanded,
19
- .bx--side-nav__overlay {
17
+ .cds--side-nav,
18
+ .cds--header-panel--expanded,
19
+ .cds--side-nav__overlay {
20
20
  top: var(--omrs-topnav-height);
21
21
  }
22
22
  }
@@ -2,7 +2,7 @@
2
2
  import React from "react";
3
3
  import { ExtensionSlot, useStore } from "@openmrs/esm-react-utils";
4
4
  import { createGlobalStore } from "@openmrs/esm-state";
5
- import { SideNav, SideNavProps } from "carbon-components-react";
5
+ import { SideNav, SideNavProps } from "@carbon/react";
6
6
  import styles from "./left-nav.module.scss";
7
7
 
8
8
  interface LeftNavStore {
@@ -1,13 +1,12 @@
1
+ @use "@carbon/styles/scss/type";
1
2
  @import "../vars";
2
- @import "carbon-components/scss/globals/scss/typography.scss";
3
- @import "~carbon-components/scss/globals/scss/_spacing.scss";
4
3
 
5
4
  .link > div a:nth-child(1) {
6
5
  height: 3rem;
7
6
  padding: 1.5rem 0 1.5rem 1.2rem;
8
7
  color: $ui-04;
9
8
  border-left: 0.25rem solid transparent;
10
- @include carbon--type-style("productive-heading-01");
9
+ @include type.type-style("heading-compact-01");
11
10
  }
12
11
 
13
12
  :global(.omrs-breakpoint-gt-tablet) .link > div {
@@ -33,7 +33,7 @@ function createModalFrame() {
33
33
  const closeButton = htmlToElement(
34
34
  `
35
35
  <button
36
- class="bx--modal-close"
36
+ class="cds--modal-close"
37
37
  type="button">
38
38
  <svg id="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><defs><style>.cls-1{fill:#000000;}.cls-2{fill:none;}</style></defs><title>close</title><polygon class="cls-1" points="24 9.4 22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4"/><rect class="cls-2" width="32" height="32"/></svg>
39
39
  </button>`.trim()
@@ -41,7 +41,7 @@ function createModalFrame() {
41
41
 
42
42
  closeButton.addEventListener("click", closeHighestInstance);
43
43
  const outer = document.createElement("div");
44
- outer.className = "bx--modal-container";
44
+ outer.className = "cds--modal-container";
45
45
  const contentContainer = document.createElement("div");
46
46
 
47
47
  outer.append(closeButton);
@@ -8,6 +8,7 @@ import {
8
8
  } from "./notification.component";
9
9
  import ActiveNotifications from "./active-notifications.component";
10
10
  import isEmpty from "lodash-es/isEmpty";
11
+ import { createRoot } from "react-dom/client";
11
12
 
12
13
  const inlineNotificationsSubject = new Subject<InlineNotificationMeta>();
13
14
  let notificationId = 0;
@@ -19,10 +20,8 @@ let notificationId = 0;
19
20
  */
20
21
  export function renderInlineNotifications(target: HTMLElement | null) {
21
22
  if (target) {
22
- render(
23
- <ActiveNotifications subject={inlineNotificationsSubject} />,
24
- target
25
- );
23
+ const root = createRoot(target);
24
+ root.render(<ActiveNotifications subject={inlineNotificationsSubject} />);
26
25
  }
27
26
  }
28
27
 
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { InlineNotification } from "carbon-components-react";
2
+ import { InlineNotification } from "@carbon/react";
3
3
  /** @module @category UI */
4
4
 
5
5
  export interface NotificationProps {
@@ -4,7 +4,7 @@
4
4
  align-items: center;
5
5
  justify-content: center;
6
6
 
7
- > .bx--inline-loading {
7
+ > .cds--inline-loading {
8
8
  width: auto;
9
9
  }
10
10
  }
@@ -1,6 +1,6 @@
1
1
  /** @module @category UI */
2
2
  import React from "react";
3
- import { render } from "react-dom";
3
+ import { createRoot } from "react-dom/client";
4
4
  import { Subject } from "rxjs";
5
5
  import { ToastDescriptor, ToastNotificationMeta } from "./toast.component";
6
6
  import ActiveToasts from "./active-toasts.component";
@@ -16,7 +16,8 @@ let toastId = 0;
16
16
  */
17
17
  export function renderToasts(target: HTMLElement | null) {
18
18
  if (target) {
19
- render(<ActiveToasts subject={toastsSubject} />, target);
19
+ const root = createRoot(target);
20
+ root.render(<ActiveToasts subject={toastsSubject} />);
20
21
  }
21
22
  }
22
23
 
@@ -1,6 +1,6 @@
1
1
  /** @module @category UI */
2
2
  import React, { useEffect, useState } from "react";
3
- import { ToastNotification } from "carbon-components-react";
3
+ import { ToastNotification } from "@carbon/react";
4
4
 
5
5
  const defaultOptions = {
6
6
  millis: 5000,