@hazelcast/ui 4.0.1-canary.8 → 4.0.1

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 (284) hide show
  1. package/README.md +27 -175
  2. package/lib/components/Alert.js +3 -4
  3. package/lib/components/Alert.js.map +1 -1
  4. package/lib/components/Alert.module.css +111 -0
  5. package/lib/components/AppHeader/AppHeader.js +1 -1
  6. package/lib/components/AppHeader/AppHeader.js.map +1 -1
  7. package/lib/components/AppHeader/AppHeader.module.css +27 -0
  8. package/lib/components/AppHeader/AppHeaderLogo/AppHeaderLogo.js +1 -1
  9. package/lib/components/AppHeader/AppHeaderLogo/AppHeaderLogo.js.map +1 -1
  10. package/lib/components/AppHeader/AppHeaderLogo/{AppHeaderLogo.module.scss → AppHeaderLogo.module.css} +1 -4
  11. package/lib/components/AppHeader/AppHeaderMenu/AppHeaderMenu.js +1 -1
  12. package/lib/components/AppHeader/AppHeaderMenu/AppHeaderMenu.js.map +1 -1
  13. package/lib/components/AppHeader/AppHeaderMenu/AppHeaderMenu.module.css +18 -0
  14. package/lib/components/AppHeader/EnvironmentBadge/EnvironmentBadge.js +1 -1
  15. package/lib/components/AppHeader/EnvironmentBadge/EnvironmentBadge.js.map +1 -1
  16. package/lib/components/AppHeader/EnvironmentBadge/EnvironmentBadge.module.css +11 -0
  17. package/lib/components/AppHeader/SelectCluster/SelectCluster.js +1 -1
  18. package/lib/components/AppHeader/SelectCluster/SelectCluster.js.map +1 -1
  19. package/lib/components/AppHeader/SelectCluster/SelectCluster.module.css +75 -0
  20. package/lib/components/AppSidebar/AppSidebar.js +1 -1
  21. package/lib/components/AppSidebar/AppSidebar.js.map +1 -1
  22. package/lib/components/AppSidebar/{AppSidebar.module.scss → AppSidebar.module.css} +12 -18
  23. package/lib/components/AppSidebar/AppSidebarFavoriteButton/AppSidebarFavoriteButton.js +1 -1
  24. package/lib/components/AppSidebar/AppSidebarFavoriteButton/AppSidebarFavoriteButton.js.map +1 -1
  25. package/lib/components/AppSidebar/AppSidebarFavoriteButton/{AppSidebarFavoriteButton.module.scss → AppSidebarFavoriteButton.module.css} +3 -5
  26. package/lib/components/AppSidebar/AppSidebarFavorites/AppSidebarFavorites.js +1 -1
  27. package/lib/components/AppSidebar/AppSidebarFavorites/AppSidebarFavorites.js.map +1 -1
  28. package/lib/components/AppSidebar/AppSidebarFavorites/AppSidebarFavorites.module.css +11 -0
  29. package/lib/components/AppSidebar/AppSidebarItem/AppSidebarItem.js +1 -1
  30. package/lib/components/AppSidebar/AppSidebarItem/AppSidebarItem.js.map +1 -1
  31. package/lib/components/AppSidebar/AppSidebarItem/{AppSidebarItem.module.scss → AppSidebarItem.module.css} +18 -20
  32. package/lib/components/AppSidebar/AppSidebarMenuItemCounter/AppSidebarMenuItemCounter.js +1 -1
  33. package/lib/components/AppSidebar/AppSidebarMenuItemCounter/AppSidebarMenuItemCounter.js.map +1 -1
  34. package/lib/components/AppSidebar/AppSidebarMenuItemCounter/{AppSidebarMenuItemCounter.module.scss → AppSidebarMenuItemCounter.module.css} +5 -8
  35. package/lib/components/AppSidebar/AppSidebarSection/AppSidebarSection.js +1 -1
  36. package/lib/components/AppSidebar/AppSidebarSection/AppSidebarSection.js.map +1 -1
  37. package/lib/components/AppSidebar/AppSidebarSection/AppSidebarSection.module.css +53 -0
  38. package/lib/components/AppSidebar/AppSidebarSection/AppSidebarSectionExpandable.js +1 -1
  39. package/lib/components/AppSidebar/AppSidebarSection/AppSidebarSectionExpandable.js.map +1 -1
  40. package/lib/components/AutocompleteField.js +1 -1
  41. package/lib/components/AutocompleteField.js.map +1 -1
  42. package/lib/components/Badge.js +1 -1
  43. package/lib/components/Badge.js.map +1 -1
  44. package/lib/components/{Badge.module.scss → Badge.module.css} +7 -5
  45. package/lib/components/Button.d.ts +0 -2
  46. package/lib/components/Button.js +3 -7
  47. package/lib/components/Button.js.map +1 -1
  48. package/lib/components/Calendar/Calendar.d.ts +0 -2
  49. package/lib/components/Calendar/Calendar.js +3 -3
  50. package/lib/components/Calendar/Calendar.js.map +1 -1
  51. package/lib/components/Calendar/Calendar.module.css +321 -0
  52. package/lib/components/Calendar/CalendarRange.js +5 -5
  53. package/lib/components/Calendar/CalendarRange.js.map +1 -1
  54. package/lib/components/Calendar/CalendarRange.module.css +19 -0
  55. package/lib/components/Calendar/components/CalendarHeader.js +4 -4
  56. package/lib/components/Calendar/components/CalendarHeader.js.map +1 -1
  57. package/lib/components/Calendar/components/CalendarInput.d.ts +0 -2
  58. package/lib/components/Calendar/components/CalendarInput.js +1 -1
  59. package/lib/components/Calendar/components/CalendarInput.js.map +1 -1
  60. package/lib/components/Calendar/components/CalendarTime.js +2 -2
  61. package/lib/components/Calendar/components/CalendarTime.js.map +1 -1
  62. package/lib/components/Calendar/components/{CalendarTime.module.scss → CalendarTime.module.css} +16 -21
  63. package/lib/components/Card.js +1 -1
  64. package/lib/components/Card.js.map +1 -1
  65. package/lib/components/Card.module.css +97 -0
  66. package/lib/components/Carousel.js +3 -3
  67. package/lib/components/Carousel.js.map +1 -1
  68. package/lib/components/Carousel.module.css +53 -0
  69. package/lib/components/CenteredLoader.js +1 -1
  70. package/lib/components/CenteredLoader.js.map +1 -1
  71. package/lib/components/{CenteredLoader.module.scss → CenteredLoader.module.css} +1 -3
  72. package/lib/components/CircularProgressBar.js +1 -1
  73. package/lib/components/CircularProgressBar.js.map +1 -1
  74. package/lib/components/{CircularProgressBar.module.scss → CircularProgressBar.module.css} +8 -8
  75. package/lib/components/ContextMenu.js +1 -1
  76. package/lib/components/ContextMenu.js.map +1 -1
  77. package/lib/components/ContextMenu.module.css +34 -0
  78. package/lib/components/Dialog.js +1 -1
  79. package/lib/components/Dialog.js.map +1 -1
  80. package/lib/components/{Dialog.module.scss → Dialog.module.css} +11 -13
  81. package/lib/components/EmptyState.js +1 -1
  82. package/lib/components/EmptyState.js.map +1 -1
  83. package/lib/components/EmptyState.module.css +96 -0
  84. package/lib/components/Error.js +1 -1
  85. package/lib/components/Error.js.map +1 -1
  86. package/lib/components/Error.module.css +13 -0
  87. package/lib/components/FieldHeader.d.ts +0 -2
  88. package/lib/components/FieldHeader.js +3 -3
  89. package/lib/components/FieldHeader.js.map +1 -1
  90. package/lib/components/FieldHeader.module.css +22 -0
  91. package/lib/components/Help.js +3 -3
  92. package/lib/components/Help.js.map +1 -1
  93. package/lib/components/Help.module.css +7 -0
  94. package/lib/components/Icon.js +3 -3
  95. package/lib/components/Icon.js.map +1 -1
  96. package/lib/components/Icon.module.css +31 -0
  97. package/lib/components/IconButton.d.ts +1 -2
  98. package/lib/components/IconButton.js +3 -7
  99. package/lib/components/IconButton.js.map +1 -1
  100. package/lib/components/InteractiveList.d.ts +1 -1
  101. package/lib/components/InteractiveList.js +4 -4
  102. package/lib/components/InteractiveList.js.map +1 -1
  103. package/lib/components/InteractiveList.module.css +59 -0
  104. package/lib/components/InteractiveListFormik.js +1 -2
  105. package/lib/components/InteractiveListFormik.js.map +1 -1
  106. package/lib/components/Label.js +1 -1
  107. package/lib/components/Label.js.map +1 -1
  108. package/lib/components/Label.module.css +13 -0
  109. package/lib/components/Link.js +1 -1
  110. package/lib/components/Link.js.map +1 -1
  111. package/lib/components/Link.module.css +65 -0
  112. package/lib/components/Loader.js +1 -1
  113. package/lib/components/Loader.js.map +1 -1
  114. package/lib/components/Loader.module.css +91 -0
  115. package/lib/components/Modal.js +2 -2
  116. package/lib/components/Modal.js.map +1 -1
  117. package/lib/components/Notification.js +3 -3
  118. package/lib/components/Notification.js.map +1 -1
  119. package/lib/components/Notification.module.css +64 -0
  120. package/lib/components/NumberBadge.js +1 -1
  121. package/lib/components/NumberBadge.js.map +1 -1
  122. package/lib/components/NumberBadge.module.css +14 -0
  123. package/lib/components/NumberField.js +3 -3
  124. package/lib/components/NumberField.js.map +1 -1
  125. package/lib/components/Overlay.js +1 -1
  126. package/lib/components/Overlay.js.map +1 -1
  127. package/lib/components/Overlay.module.css +112 -0
  128. package/lib/components/Pagination.js +1 -1
  129. package/lib/components/Pagination.js.map +1 -1
  130. package/lib/components/Pagination.module.css +118 -0
  131. package/lib/components/PasswordField.js +3 -3
  132. package/lib/components/PasswordField.js.map +1 -1
  133. package/lib/components/{PasswordField.module.scss → PasswordField.module.css} +2 -7
  134. package/lib/components/Popover.js +1 -1
  135. package/lib/components/Popover.js.map +1 -1
  136. package/lib/components/Popover.module.css +8 -0
  137. package/lib/components/Radio.js +1 -1
  138. package/lib/components/Radio.js.map +1 -1
  139. package/lib/components/Radio.module.css +122 -0
  140. package/lib/components/RadioGroup.js +1 -1
  141. package/lib/components/RadioGroup.js.map +1 -1
  142. package/lib/components/RadioGroup.module.css +31 -0
  143. package/lib/components/SegmentedControl.d.ts +1 -3
  144. package/lib/components/SegmentedControl.js +7 -5
  145. package/lib/components/SegmentedControl.js.map +1 -1
  146. package/lib/components/SegmentedControl.module.css +94 -0
  147. package/lib/components/Select/CheckableSelectField.js +2 -2
  148. package/lib/components/Select/CheckableSelectField.js.map +1 -1
  149. package/lib/components/Select/MultiSelectField.js +1 -1
  150. package/lib/components/Select/MultiSelectField.js.map +1 -1
  151. package/lib/components/Select/SelectField.js +1 -1
  152. package/lib/components/Select/SelectField.js.map +1 -1
  153. package/lib/components/Slider.js +1 -1
  154. package/lib/components/Slider.js.map +1 -1
  155. package/lib/components/Slider.module.css +315 -0
  156. package/lib/components/Table/Cell.js +1 -1
  157. package/lib/components/Table/Cell.js.map +1 -1
  158. package/lib/components/Table/{Cell.module.scss → Cell.module.css} +12 -15
  159. package/lib/components/Table/EnhancedRenderers.js +1 -1
  160. package/lib/components/Table/EnhancedRenderers.js.map +1 -1
  161. package/lib/components/Table/Header.js +1 -1
  162. package/lib/components/Table/Header.js.map +1 -1
  163. package/lib/components/Table/Header.module.css +129 -0
  164. package/lib/components/Table/Row.js +1 -1
  165. package/lib/components/Table/Row.js.map +1 -1
  166. package/lib/components/Table/Row.module.css +76 -0
  167. package/lib/components/Table/Table.d.ts +2 -1
  168. package/lib/components/Table/Table.js +7 -7
  169. package/lib/components/Table/Table.js.map +1 -1
  170. package/lib/components/Table/Table.module.css +28 -0
  171. package/lib/components/Table/TableContent.js +1 -1
  172. package/lib/components/Table/TableContent.js.map +1 -1
  173. package/lib/components/Table/features/columnsSelection/CellCopyablePopover.js +1 -1
  174. package/lib/components/Table/features/columnsSelection/CellCopyablePopover.js.map +1 -1
  175. package/lib/components/Table/features/columnsSelection/{CellCopyablePopover.module.scss → CellCopyablePopover.module.css} +1 -3
  176. package/lib/components/Table/features/columnsSelection/ContextMenu/ContextMenu.js +1 -1
  177. package/lib/components/Table/features/columnsSelection/ContextMenu/ContextMenu.js.map +1 -1
  178. package/lib/components/Tabs/Tab.module.css +20 -11
  179. package/lib/components/Tabs/TabList.module.css +3 -6
  180. package/lib/components/Terminal.js +1 -1
  181. package/lib/components/Terminal.js.map +1 -1
  182. package/lib/components/Terminal.module.css +123 -0
  183. package/lib/components/TextArea.d.ts +0 -2
  184. package/lib/components/TextArea.js +2 -2
  185. package/lib/components/TextArea.js.map +1 -1
  186. package/lib/components/TextField.d.ts +0 -2
  187. package/lib/components/TextField.js +5 -6
  188. package/lib/components/TextField.js.map +1 -1
  189. package/lib/components/TextField.module.css +4 -0
  190. package/lib/components/TimeField.js +3 -3
  191. package/lib/components/TimeField.js.map +1 -1
  192. package/lib/components/Toast/Toast.d.ts +15 -0
  193. package/lib/components/Toast/Toast.js +28 -0
  194. package/lib/components/Toast/Toast.js.map +1 -0
  195. package/lib/components/Toast/Toast.module.css +98 -0
  196. package/lib/components/Toast/index.d.ts +4 -0
  197. package/lib/components/Toast/index.js +5 -0
  198. package/lib/components/Toast/index.js.map +1 -0
  199. package/lib/components/TruncatedText.js +1 -1
  200. package/lib/components/TruncatedText.js.map +1 -1
  201. package/lib/components/TruncatedText.module.css +14 -0
  202. package/lib/index.d.ts +2 -1
  203. package/lib/index.js +1 -1
  204. package/lib/index.js.map +1 -1
  205. package/lib/old/Alert.d.ts +33 -0
  206. package/lib/old/Alert.js +51 -0
  207. package/lib/old/Alert.js.map +1 -0
  208. package/lib/old/AutocompleteField.js +1 -1
  209. package/lib/old/AutocompleteField.js.map +1 -1
  210. package/lib/old/InteractiveList.d.ts +34 -0
  211. package/lib/old/InteractiveList.js +43 -0
  212. package/lib/old/InteractiveList.js.map +1 -0
  213. package/lib/old/InteractiveListFormik.d.ts +10 -0
  214. package/lib/old/InteractiveListFormik.js +75 -0
  215. package/lib/old/InteractiveListFormik.js.map +1 -0
  216. package/lib/old/Notification.d.ts +25 -0
  217. package/lib/old/Notification.js +39 -0
  218. package/lib/old/Notification.js.map +1 -0
  219. package/lib/old/NumberField.js +3 -3
  220. package/lib/old/NumberField.js.map +1 -1
  221. package/lib/old/PasswordField.d.ts +1 -2
  222. package/lib/old/PasswordField.js +1 -1
  223. package/lib/old/PasswordField.js.map +1 -1
  224. package/lib/old/Select/MultiSelectField.js +1 -3
  225. package/lib/old/Select/MultiSelectField.js.map +1 -1
  226. package/lib/old/Select/SelectField.js +1 -1
  227. package/lib/old/Select/SelectField.js.map +1 -1
  228. package/lib/old/TextArea.js +2 -2
  229. package/lib/old/TextArea.js.map +1 -1
  230. package/lib/old/TextField.js +2 -2
  231. package/lib/old/TextField.js.map +1 -1
  232. package/lib/{components → old}/Toast.js +3 -3
  233. package/lib/old/Toast.js.map +1 -0
  234. package/lib/old/index.d.ts +11 -0
  235. package/lib/old/index.js +6 -0
  236. package/lib/old/index.js.map +1 -1
  237. package/lib/utils/styleConstants.d.ts +13 -0
  238. package/lib/utils/styleConstants.js +14 -0
  239. package/lib/utils/styleConstants.js.map +1 -0
  240. package/package.json +2 -1
  241. package/styles/variables.css +24 -0
  242. package/lib/components/AppHeader/AppHeader.module.scss +0 -29
  243. package/lib/components/AppHeader/AppHeaderMenu/AppHeaderMenu.module.scss +0 -20
  244. package/lib/components/AppHeader/EnvironmentBadge/EnvironmentBadge.module.scss +0 -13
  245. package/lib/components/AppHeader/SelectCluster/SelectCluster.module.scss +0 -101
  246. package/lib/components/AppSidebar/AppSidebarFavorites/AppSidebarFavorites.module.scss +0 -13
  247. package/lib/components/AppSidebar/AppSidebarSection/AppSidebarSection.module.scss +0 -58
  248. package/lib/components/Calendar/Calendar.module.scss +0 -185
  249. package/lib/components/Calendar/CalendarRange.module.scss +0 -21
  250. package/lib/components/Card.module.scss +0 -92
  251. package/lib/components/Carousel.module.scss +0 -43
  252. package/lib/components/ContextMenu.module.scss +0 -37
  253. package/lib/components/EmptyState.module.scss +0 -87
  254. package/lib/components/Error.module.scss +0 -12
  255. package/lib/components/FieldHeader.module.scss +0 -20
  256. package/lib/components/Help.module.scss +0 -9
  257. package/lib/components/Icon.module.scss +0 -33
  258. package/lib/components/Label.module.scss +0 -12
  259. package/lib/components/Link.module.scss +0 -64
  260. package/lib/components/Loader.module.scss +0 -74
  261. package/lib/components/NumberBadge.module.scss +0 -13
  262. package/lib/components/Overlay.module.scss +0 -108
  263. package/lib/components/Pagination.module.scss +0 -117
  264. package/lib/components/Popover.module.scss +0 -12
  265. package/lib/components/Radio.module.scss +0 -112
  266. package/lib/components/RadioGroup.module.scss +0 -21
  267. package/lib/components/SegmentedControl.module.scss +0 -81
  268. package/lib/components/Slider.module.scss +0 -277
  269. package/lib/components/Table/Header.module.scss +0 -128
  270. package/lib/components/Table/Row.module.scss +0 -59
  271. package/lib/components/Table/Table.module.scss +0 -31
  272. package/lib/components/Terminal.module.scss +0 -109
  273. package/lib/components/Toast.js.map +0 -1
  274. package/lib/components/Tooltip.module.scss +0 -45
  275. package/lib/components/TruncatedText.module.scss +0 -9
  276. package/styles/constants/export.module.scss +0 -8
  277. /package/lib/components/Table/{TableContent.module.scss → TableContent.module.css} +0 -0
  278. /package/lib/components/Table/features/columnsSelection/ContextMenu/{ContextMenu.module.scss → ContextMenu.module.css} +0 -0
  279. /package/lib/components/{TimeField.module.scss → TimeField.module.css} +0 -0
  280. /package/lib/{components/Alert.module.scss → old/AlertLegacy.module.scss} +0 -0
  281. /package/lib/{components/InteractiveList.module.scss → old/InteractiveListLegacy.module.scss} +0 -0
  282. /package/lib/{components/Notification.module.scss → old/NotificationLegacy.module.scss} +0 -0
  283. /package/lib/{components → old}/Toast.d.ts +0 -0
  284. /package/lib/{components/Toast.module.scss → old/ToastLegacy.module.scss} +0 -0
@@ -1,117 +0,0 @@
1
- @use '../../styles/constants' as c;
2
- @use '../../styles/helpers' as h;
3
-
4
- .container {
5
- display: flex;
6
- justify-content: center;
7
- align-items: center;
8
-
9
- > *:not(:last-child) {
10
- margin-right: c.$grid * 4.5;
11
- }
12
-
13
- .rows {
14
- display: flex;
15
- align-items: flex-end;
16
-
17
- > *:first-child {
18
- margin-right: c.$grid * 5;
19
- }
20
- }
21
-
22
- .shownItems {
23
- @include c.typographyBodySmall;
24
-
25
- color: c.$colorTextSecondary;
26
- }
27
-
28
- .buttons {
29
- display: flex;
30
- align-items: center;
31
-
32
- > *:not(:last-child) {
33
- margin-right: c.$grid * 2;
34
- }
35
-
36
- // Override Button styles
37
- .button {
38
- color: c.$colorTextSecondary;
39
- background-color: c.$colorNeutralLighter;
40
- border: 1px solid;
41
- border-color: c.$colorNeutralLight;
42
- height: c.$inputHeightSmall;
43
- border-radius: c.$borderRadius;
44
-
45
- @include c.typographyBodySmall;
46
-
47
- .outline {
48
- display: none;
49
- }
50
-
51
- .body {
52
- padding: 0 c.$grid * 2.5;
53
- }
54
-
55
- &:hover,
56
- &:active,
57
- &.selected {
58
- color: c.$colorText;
59
- border-color: c.$colorPrimary;
60
- }
61
-
62
- &:focus-visible {
63
- color: c.$colorText;
64
- border-color: c.$colorAccessibilityOutline;
65
- }
66
- }
67
- }
68
-
69
- // Override IconButton styles
70
- .iconButton {
71
- display: flex;
72
- align-items: center;
73
- background-color: c.$colorNeutralLighter;
74
- border: 1px solid;
75
- border-color: c.$colorNeutralLight;
76
- height: c.$inputHeightSmall;
77
- padding: 0 c.$grid * 2;
78
-
79
- &:hover,
80
- &:active,
81
- &.selected {
82
- border-color: c.$colorPrimary;
83
- }
84
-
85
- &:focus,
86
- &:focus-visible {
87
- box-shadow: none;
88
- }
89
- }
90
-
91
- .pageJumpForm {
92
- display: flex;
93
- align-items: center;
94
-
95
- .inputContainer {
96
- // Comfortable to use with up to 4-digit numbers and small enough to not take much space
97
- // max-width: c.$grid * 14;
98
- // min-width: c.$grid * 14;
99
- width: c.$grid * 14;
100
- }
101
- }
102
-
103
- .rowsPerPage {
104
- display: flex;
105
- align-items: center;
106
-
107
- .label {
108
- margin-right: c.$grid * 2;
109
- margin-bottom: 0;
110
- }
111
-
112
- :global .hz-select-field__control {
113
- // Comfortable to use with up to 4-digit numbers and small enough to not take much space
114
- width: c.$grid * 22;
115
- }
116
- }
117
- }
@@ -1,12 +0,0 @@
1
- @use '../../styles/constants/index' as c;
2
-
3
- $contentBorderRadius: 3px;
4
-
5
- .root {
6
- display: flex;
7
- flex-direction: column;
8
- background: c.$colorNeutralWhite;
9
- border-bottom-left-radius: $contentBorderRadius;
10
- border-bottom-right-radius: $contentBorderRadius;
11
- box-shadow: 0 1px 3px 0 rgb(0 0 0 / 17%);
12
- }
@@ -1,112 +0,0 @@
1
- @use '../../styles/constants' as c;
2
- @use '../../styles/helpers' as h;
3
-
4
- .wrapper {
5
- display: inline-flex;
6
-
7
- // inline-flex changes vertical align compared to display: flex
8
- // setting vertical-align allows us to easily use radio button
9
- // inline e.g. next to the text
10
- // Most common use case will be still the usage in a form where parent
11
- // wrapper controls this.
12
- vertical-align: bottom;
13
- align-items: center;
14
- cursor: pointer;
15
-
16
- @include c.typographyBodySmall;
17
-
18
- // hide native checkbox
19
- input {
20
- @include h.visuallyHidden;
21
- }
22
-
23
- .helperText {
24
- margin-left: c.$grid * 0.5;
25
- }
26
-
27
- // default visible checkmark
28
- .checkmark {
29
- // using min-{size} because the circle can be broken in a flex wrapper
30
- min-width: c.$iconSizeSmall;
31
- min-height: c.$iconSizeSmall;
32
- border: c.$borderWidth solid c.$colorNeutralLight;
33
- border-radius: 50%;
34
-
35
- // because of ~ and + selectors used below, we need to keep the current order in DOM and
36
- // fix it visually with order property
37
- order: -1;
38
- display: flex;
39
- align-items: center;
40
- justify-content: center;
41
- }
42
-
43
- &.inline {
44
- .checkmark {
45
- // in case we have inline mode, we should have a padding like native radio button has
46
- margin-left: c.$grid;
47
- }
48
- }
49
-
50
- & > input:checked ~ .checkmark {
51
- background-color: c.$colorSuccess;
52
- border-color: c.$colorSuccess;
53
- }
54
-
55
- /**
56
- Hover
57
- */
58
- &:hover,
59
- &.hover {
60
- input ~ .checkmark {
61
- border-color: c.$colorPrimary;
62
- }
63
- }
64
-
65
- /* Style the indicator (dot/circle) */
66
- .checkmark::after {
67
- content: '';
68
- width: 1.5 * c.$grid;
69
- height: 1.5 * c.$grid;
70
- border-radius: 50%;
71
- background: transparent;
72
- }
73
-
74
- input:checked ~ .checkmark::after {
75
- background: c.$colorNeutralWhite;
76
- }
77
-
78
- .name {
79
- overflow: hidden;
80
- padding-left: c.$grid * 1.25;
81
- padding-right: c.$grid * 1.25;
82
- }
83
-
84
- &.disabled {
85
- cursor: not-allowed;
86
- color: c.$colorNeutralLight;
87
-
88
- input ~ .checkmark {
89
- border-color: c.$colorNeutralLight;
90
- }
91
-
92
- input:checked ~ .checkmark {
93
- background-color: c.$colorNeutral;
94
- }
95
- }
96
-
97
- // Error state
98
- &.error input:checked ~ .checkmark {
99
- border-color: c.$colorError;
100
- }
101
-
102
- // :checked, :not(:checked) is added here to make the specificity more important than the error's state
103
- // where we make the radio as error if and only if it's checked
104
- &.focus > input:not(:checked),
105
- &.focus > input:checked,
106
- input:focus:not(:checked),
107
- input:focus:checked {
108
- ~ .checkmark {
109
- @include h.outlineFormField;
110
- }
111
- }
112
- }
@@ -1,21 +0,0 @@
1
- @use '../../styles/constants' as c;
2
- @use '../../styles/helpers' as h;
3
- @include h.withError;
4
-
5
- .radioGroup {
6
- display: flex;
7
- flex-direction: column;
8
-
9
- &:not(.inline) > *:not(:last-child) {
10
- // we need to provide spacing between radios if they're in a vertical column
11
- margin-bottom: c.$grid;
12
- }
13
-
14
- &.inline {
15
- flex-direction: row;
16
-
17
- > *:not(:first-child) {
18
- margin-left: c.$grid;
19
- }
20
- }
21
- }
@@ -1,81 +0,0 @@
1
- @use '../../styles/constants' as c;
2
- @use '../../styles/helpers' as h;
3
-
4
- .group {
5
- display: flex;
6
-
7
- .groupLabel {
8
- @include h.visuallyHidden;
9
- }
10
-
11
- .option {
12
- position: relative;
13
- box-sizing: border-box;
14
- height: c.$inputHeight;
15
- min-width: c.$grid * 37.5;
16
- border: 1px solid c.$colorNeutralLight;
17
- border-bottom-width: 6px;
18
- background-color: c.$colorNeutralLighter;
19
- color: c.$colorTextSecondary;
20
- cursor: pointer;
21
-
22
- .label {
23
- display: flex;
24
- justify-content: center;
25
- align-items: center;
26
- height: 100%;
27
- padding-left: c.$grid * 2;
28
- padding-right: c.$grid * 2;
29
- cursor: pointer;
30
-
31
- @include c.typographyBodyNormal('bold');
32
- }
33
-
34
- &.checked {
35
- color: c.$colorText;
36
- border-bottom-color: c.$colorSuccess;
37
- }
38
-
39
- &:first-of-type {
40
- border-top-left-radius: c.$borderRadius;
41
- border-bottom-left-radius: c.$borderRadius;
42
- }
43
-
44
- &:last-of-type {
45
- border-top-right-radius: c.$borderRadius;
46
- border-bottom-right-radius: c.$borderRadius;
47
- }
48
-
49
- // Border collapse
50
- &:not(:first-of-type) {
51
- margin-left: -1px;
52
- }
53
-
54
- &:hover {
55
- color: c.$colorText;
56
- }
57
-
58
- &:focus-visible {
59
- // Do not remove outline for high-contrast modes
60
- // https://stackoverflow.com/a/52616313
61
- outline: c.$outlineWidth solid transparent;
62
- color: c.$colorText;
63
- position: relative;
64
- z-index: c.$zIndex200;
65
-
66
- @include h.outlineAround;
67
- }
68
- }
69
-
70
- &.small {
71
- .option {
72
- min-width: c.$grid * 28.125;
73
- height: c.$inputHeightSmall;
74
- border-bottom-width: 4px;
75
-
76
- .label {
77
- @include c.typographyBodySmall('bold');
78
- }
79
- }
80
- }
81
- }
@@ -1,277 +0,0 @@
1
- @use '../../styles/constants' as c;
2
- @use '../../styles/helpers' as h;
3
-
4
- // thumb width without a white border, let's make it the height of the slider
5
- $thumbWidth: c.$slideTrackHeight;
6
- $currentValueIndicatorHeight: c.$grid * 6;
7
-
8
- // We've double checked that everything works in IE11
9
- /* doiuse-disable calc */
10
- /* doiuse-disable multicolumn */
11
- /* doiuse-disable css-appearance */
12
-
13
- @mixin track() {
14
- background: none; // get rid of track background
15
- appearance: none;
16
-
17
- // it's important for these values to be 0 in order to be consistent across (Firefox/IE11) & Chrome
18
- margin: 0;
19
- padding: 0;
20
- border: 0;
21
- box-sizing: border-box;
22
- }
23
-
24
- @mixin thumb() {
25
- box-shadow: 0 c.$sliderThumbShadowSize c.$sliderThumbShadowBlur c.$colorShadow;
26
- background: c.$colorSuccess; // background will represent the dot inside
27
- border: c.$sliderThumbBorderSize solid c.$colorNeutralWhite; // the white part will be done by the border
28
- box-sizing: content-box; /* and because of all of this, we need content-box */
29
- border-radius: 50%;
30
- pointer-events: auto; /* catch clicks */
31
- width: $thumbWidth;
32
- height: $thumbWidth;
33
- }
34
-
35
- /**
36
- We can't combine these selectors with a comma, because they're invalid in different browsers.
37
- This helper will save us some code blocks.
38
- */
39
- @mixin styleThumb {
40
- &::-webkit-slider-thumb {
41
- @content;
42
- }
43
-
44
- &::-moz-range-thumb {
45
- @content;
46
- }
47
-
48
- &::-ms-thumb {
49
- @content;
50
- }
51
- }
52
-
53
- ul.markDescriptions {
54
- list-style-type: none;
55
- margin: 0;
56
- padding: 0;
57
- height: c.$grid * 8;
58
- position: relative;
59
- font-size: c.$fontSizeBodySmall;
60
- color: c.$colorTextSecondary;
61
-
62
- > li {
63
- position: absolute;
64
- bottom: c.$grid;
65
- transform: translateX(-50%);
66
- white-space: nowrap;
67
-
68
- &.activeMarkDescription {
69
- font-weight: c.$fontWeightTextBold;
70
- color: black;
71
- }
72
- }
73
- }
74
-
75
- .valueIndicators {
76
- padding: 0;
77
- height: $currentValueIndicatorHeight;
78
- position: relative;
79
- width: calc(100% - #{c.$sliderThumbBorderSize} - #{c.$sliderThumbShadowSize});
80
- margin: 0 auto;
81
-
82
- > span {
83
- position: absolute;
84
- top: c.$grid;
85
- transform: translateX(-50%);
86
- font-size: c.$fontSizeBodyNormal;
87
- font-weight: c.$fontWeightTextBold;
88
- white-space: nowrap;
89
- }
90
- }
91
-
92
- @include h.withError;
93
-
94
- .wrapper {
95
- display: flex;
96
-
97
- & * {
98
- box-sizing: border-box;
99
- }
100
-
101
- .innerWrapper {
102
- flex: 1;
103
- }
104
-
105
- .inputWrapper {
106
- @include c.typographyBodySmall;
107
-
108
- position: relative;
109
- height: c.$slideTrackHeight;
110
- flex: 1;
111
- margin: $thumbWidth 0;
112
-
113
- input[type='range'] {
114
- z-index: c.$zIndex100;
115
- outline: none;
116
- background: none;
117
- position: absolute;
118
- top: 0;
119
- bottom: 0;
120
- left: c.$sliderThumbBorderSize * -1;
121
- width: calc(100% + #{c.$sliderThumbBorderSize * 2});
122
- height: 100%;
123
- pointer-events: none; // ignore clicks on the actual inputs and let them pass to the handles
124
- min-height: c.$slideTrackHeight;
125
- padding: 0;
126
- margin: 0;
127
- justify-self: center;
128
-
129
- &::-webkit-slider-runnable-track,
130
- &::-webkit-slider-thumb,
131
- & {
132
- appearance: none;
133
- }
134
-
135
- // Style the track
136
- &::-webkit-slider-runnable-track {
137
- @include track;
138
- }
139
-
140
- &::-moz-range-track {
141
- @include track;
142
- }
143
-
144
- &::-ms-track {
145
- @include track;
146
-
147
- visibility: hidden; // IE11 specific rule to hide the default tick marks
148
- }
149
-
150
- @include styleThumb {
151
- @include thumb;
152
- }
153
-
154
- /**
155
- Hover
156
- */
157
- &:hover,
158
- &.hover {
159
- @include styleThumb {
160
- box-shadow: 0 0 0 c.$sliderThumbHoverBorderSize c.$colorPrimary;
161
- }
162
- }
163
-
164
- &.focus,
165
- &:focus-visible {
166
- @include styleThumb {
167
- box-shadow: 0 0 0 c.$outlineWidth c.$colorAccessibilityOutline;
168
- }
169
- }
170
-
171
- // don't show IE11's lower fill
172
- &::-ms-fill-lower {
173
- display: none;
174
- }
175
- }
176
-
177
- // see the javascript code for an explanation of this class
178
- input[type='range'].atTheBorder {
179
- @include styleThumb {
180
- pointer-events: none;
181
- }
182
- }
183
-
184
- .fillPlaceholder {
185
- pointer-events: none;
186
- height: c.$slideTrackHeight;
187
-
188
- // highlighted part covers the border
189
- box-sizing: border-box;
190
- background: c.$colorNeutral;
191
- border: c.$sliderFillBorderSize solid c.$colorNeutralLight;
192
- width: 100%;
193
- position: relative;
194
-
195
- // if the actual fill is very small the border is rounded, it can reach out of the wrapper
196
- overflow: hidden;
197
-
198
- // we ned to reserve space like this manually mostly because of IE11
199
- border-radius: c.$sliderTrackBorderRadius;
200
-
201
- .fill {
202
- pointer-events: none;
203
- height: 100%;
204
- background: c.$colorPrimaryLight;
205
-
206
- // width & marginLeft will be set by a Javascript
207
- }
208
-
209
- ul.marks {
210
- $markWidth: 2px;
211
-
212
- width: calc(100% - #{$markWidth}); // so that 0% & 100% marks are visible
213
- height: 100%;
214
- margin: 0;
215
- padding: 0;
216
- list-style-type: none;
217
- position: absolute;
218
- top: 0;
219
- pointer-events: none;
220
-
221
- > li {
222
- position: absolute;
223
- width: $markWidth;
224
- height: 100%;
225
- background-color: c.$colorTextSecondary;
226
-
227
- &.active {
228
- background-color: c.$colorNeutralWhite;
229
- }
230
- }
231
- }
232
- }
233
- }
234
-
235
- .helperText {
236
- margin-left: c.$sliderThumbBorderSize;
237
- align-self: flex-end;
238
- }
239
-
240
- &.disabled {
241
- cursor: not-allowed;
242
-
243
- .valueIndicators {
244
- color: c.$colorNeutralLight;
245
- }
246
-
247
- ul.markDescriptions {
248
- color: c.$colorNeutralLight;
249
- }
250
-
251
- .fillPlaceholder {
252
- background-color: c.$colorNeutral;
253
-
254
- .fill {
255
- background-color: c.$colorNeutralLight;
256
- }
257
-
258
- ul.marks {
259
- > li {
260
- background-color: c.$colorNeutralLight;
261
- }
262
- }
263
- }
264
-
265
- input[type='range']:disabled {
266
- @include styleThumb {
267
- box-shadow: 0 0 0 c.$sliderThumbHoverBorderSize c.$colorNeutral;
268
- background: c.$colorNeutralLight;
269
- cursor: not-allowed;
270
- }
271
- }
272
- }
273
- }
274
-
275
- /* doiuse-enable calc */
276
- /* doiuse-enable multicolumn */
277
- /* doiuse-enable css-appearance */