baseui 10.12.1 → 11.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 (271) hide show
  1. package/README.md +3 -3
  2. package/accordion/accordion.js +60 -13
  3. package/accordion/accordion.js.flow +49 -12
  4. package/accordion/index.d.ts +0 -3
  5. package/accordion/panel.js +7 -6
  6. package/accordion/panel.js.flow +20 -20
  7. package/accordion/stateless-accordion.js +2 -4
  8. package/accordion/stateless-accordion.js.flow +0 -2
  9. package/accordion/types.js.flow +0 -5
  10. package/button/constants.js +1 -2
  11. package/button/constants.js.flow +0 -1
  12. package/button/index.d.ts +0 -1
  13. package/button/styled-components.js +2 -29
  14. package/button/styled-components.js.flow +2 -30
  15. package/checkbox/checkbox.js +6 -30
  16. package/checkbox/checkbox.js.flow +7 -38
  17. package/checkbox/constants.js +2 -1
  18. package/checkbox/constants.js.flow +2 -1
  19. package/checkbox/index.d.ts +4 -6
  20. package/checkbox/index.js +0 -6
  21. package/checkbox/index.js.flow +0 -1
  22. package/checkbox/styled-components.js +52 -149
  23. package/checkbox/styled-components.js.flow +59 -165
  24. package/checkbox/types.js.flow +0 -5
  25. package/data-table/column-categorical.js +1 -1
  26. package/data-table/column-categorical.js.flow +1 -1
  27. package/data-table/column-datetime.js +1 -1
  28. package/data-table/column-datetime.js.flow +3 -1
  29. package/data-table/column.js +6 -2
  30. package/data-table/column.js.flow +9 -7
  31. package/data-table/data-table.js +1 -1
  32. package/data-table/data-table.js.flow +1 -1
  33. package/data-table/header-cell.js +3 -0
  34. package/data-table/header-cell.js.flow +1 -1
  35. package/datepicker/calendar.js +15 -7
  36. package/datepicker/calendar.js.flow +23 -9
  37. package/datepicker/constants.js +12 -2
  38. package/datepicker/constants.js.flow +10 -0
  39. package/datepicker/datepicker.js +61 -30
  40. package/datepicker/datepicker.js.flow +77 -37
  41. package/datepicker/day.js +85 -34
  42. package/datepicker/day.js.flow +118 -54
  43. package/datepicker/locale.js.flow +0 -1
  44. package/datepicker/month.js +3 -1
  45. package/datepicker/month.js.flow +2 -0
  46. package/datepicker/stateful-container.js.flow +2 -1
  47. package/datepicker/styled-components.js +23 -1
  48. package/datepicker/styled-components.js.flow +12 -2
  49. package/datepicker/types.js.flow +35 -10
  50. package/datepicker/utils/date-helpers.js +30 -0
  51. package/datepicker/utils/date-helpers.js.flow +12 -0
  52. package/datepicker/week.js +3 -1
  53. package/datepicker/week.js.flow +2 -0
  54. package/es/accordion/accordion.js +52 -12
  55. package/es/accordion/panel.js +7 -5
  56. package/es/accordion/stateless-accordion.js +2 -4
  57. package/es/button/constants.js +1 -2
  58. package/es/button/styled-components.js +2 -29
  59. package/es/checkbox/checkbox.js +7 -32
  60. package/es/checkbox/constants.js +2 -1
  61. package/es/checkbox/index.js +1 -1
  62. package/es/checkbox/styled-components.js +51 -146
  63. package/es/data-table/column-categorical.js +1 -1
  64. package/es/data-table/column-datetime.js +1 -1
  65. package/es/data-table/column.js +6 -2
  66. package/es/data-table/data-table.js +1 -1
  67. package/es/data-table/header-cell.js +3 -0
  68. package/es/datepicker/calendar.js +15 -7
  69. package/es/datepicker/constants.js +8 -0
  70. package/es/datepicker/datepicker.js +56 -29
  71. package/es/datepicker/day.js +77 -34
  72. package/es/datepicker/month.js +3 -1
  73. package/es/datepicker/styled-components.js +8 -2
  74. package/es/datepicker/types.js +1 -1
  75. package/es/datepicker/utils/date-helpers.js +16 -0
  76. package/es/datepicker/week.js +3 -1
  77. package/es/file-uploader/file-uploader.js +4 -4
  78. package/es/header-navigation/styled-components.js +3 -3
  79. package/es/helpers/overrides.js +1 -2
  80. package/es/input/styled-components.js +4 -4
  81. package/es/layer/layer.js +4 -4
  82. package/es/locale/index.js +0 -7
  83. package/es/menu/stateful-container.js +0 -1
  84. package/es/menu/styled-components.js +1 -1
  85. package/es/modal/index.js +1 -1
  86. package/es/modal/modal.js +19 -65
  87. package/es/modal/styled-components.js +12 -48
  88. package/es/phone-input/default-props.js +1 -1
  89. package/es/phone-input/index.js +0 -4
  90. package/es/phone-input/phone-input-lite.js +55 -31
  91. package/es/radio/radio.js +1 -7
  92. package/es/radio/radiogroup.js +3 -28
  93. package/es/radio/styled-components.js +4 -5
  94. package/es/rating/styled-components.js +3 -3
  95. package/es/select/index.js +1 -2
  96. package/es/select/select-component.js +4 -8
  97. package/es/select/styled-components.js +4 -4
  98. package/es/snackbar/styled-components.js +2 -2
  99. package/es/spinner/index.js +3 -9
  100. package/es/spinner/styled-components.js +2 -32
  101. package/es/table/filter.js +3 -3
  102. package/es/tag/styled-components.js +1 -1
  103. package/es/themes/dark-theme/color-component-tokens.js +0 -38
  104. package/es/themes/dark-theme/color-tokens.js +0 -2
  105. package/es/themes/dark-theme/create-dark-theme.js +0 -2
  106. package/es/themes/dark-theme/dark-theme.js +0 -2
  107. package/es/themes/light-theme/color-component-tokens.js +0 -38
  108. package/es/themes/light-theme/color-tokens.js +0 -2
  109. package/es/themes/light-theme/create-light-theme.js +0 -2
  110. package/es/themes/light-theme/light-theme.js +0 -2
  111. package/es/timepicker/timepicker.js +1 -8
  112. package/es/typography/index.js +1 -31
  113. package/esm/accordion/accordion.js +60 -13
  114. package/esm/accordion/panel.js +7 -6
  115. package/esm/accordion/stateless-accordion.js +2 -4
  116. package/esm/button/constants.js +1 -2
  117. package/esm/button/styled-components.js +2 -29
  118. package/esm/checkbox/checkbox.js +7 -30
  119. package/esm/checkbox/constants.js +2 -1
  120. package/esm/checkbox/index.js +1 -1
  121. package/esm/checkbox/styled-components.js +52 -147
  122. package/esm/data-table/column-categorical.js +1 -1
  123. package/esm/data-table/column-datetime.js +1 -1
  124. package/esm/data-table/column.js +6 -2
  125. package/esm/data-table/data-table.js +1 -1
  126. package/esm/data-table/header-cell.js +3 -0
  127. package/esm/datepicker/calendar.js +15 -7
  128. package/esm/datepicker/constants.js +8 -0
  129. package/esm/datepicker/datepicker.js +60 -30
  130. package/esm/datepicker/day.js +84 -34
  131. package/esm/datepicker/month.js +3 -1
  132. package/esm/datepicker/styled-components.js +24 -2
  133. package/esm/datepicker/types.js +1 -1
  134. package/esm/datepicker/utils/date-helpers.js +30 -0
  135. package/esm/datepicker/week.js +3 -1
  136. package/esm/file-uploader/file-uploader.js +4 -4
  137. package/esm/header-navigation/styled-components.js +3 -3
  138. package/esm/helpers/overrides.js +1 -2
  139. package/esm/input/styled-components.js +4 -4
  140. package/esm/layer/layer.js +4 -4
  141. package/esm/locale/index.js +0 -7
  142. package/esm/menu/stateful-container.js +0 -1
  143. package/esm/menu/styled-components.js +1 -1
  144. package/esm/modal/index.js +1 -1
  145. package/esm/modal/modal.js +28 -71
  146. package/esm/modal/styled-components.js +6 -38
  147. package/esm/phone-input/default-props.js +1 -1
  148. package/esm/phone-input/index.js +0 -4
  149. package/esm/phone-input/phone-input-lite.js +60 -37
  150. package/esm/radio/radio.js +1 -7
  151. package/esm/radio/radiogroup.js +3 -28
  152. package/esm/radio/styled-components.js +4 -5
  153. package/esm/rating/styled-components.js +3 -3
  154. package/esm/select/index.js +1 -2
  155. package/esm/select/select-component.js +4 -8
  156. package/esm/select/styled-components.js +4 -4
  157. package/esm/snackbar/styled-components.js +2 -2
  158. package/esm/spinner/index.js +3 -9
  159. package/esm/spinner/styled-components.js +2 -40
  160. package/esm/table/filter.js +3 -3
  161. package/esm/tag/styled-components.js +1 -1
  162. package/esm/themes/dark-theme/color-component-tokens.js +0 -38
  163. package/esm/themes/dark-theme/color-tokens.js +0 -2
  164. package/esm/themes/dark-theme/create-dark-theme.js +1 -2
  165. package/esm/themes/dark-theme/dark-theme.js +1 -2
  166. package/esm/themes/light-theme/color-component-tokens.js +0 -38
  167. package/esm/themes/light-theme/color-tokens.js +0 -2
  168. package/esm/themes/light-theme/create-light-theme.js +1 -2
  169. package/esm/themes/light-theme/light-theme.js +1 -2
  170. package/esm/timepicker/timepicker.js +1 -8
  171. package/esm/typography/index.js +1 -35
  172. package/file-uploader/file-uploader.js +3 -3
  173. package/file-uploader/file-uploader.js.flow +4 -4
  174. package/header-navigation/styled-components.js +3 -3
  175. package/header-navigation/styled-components.js.flow +3 -3
  176. package/helpers/overrides.js +1 -2
  177. package/helpers/overrides.js.flow +1 -1
  178. package/input/index.d.ts +5 -9
  179. package/input/styled-components.js +4 -4
  180. package/input/styled-components.js.flow +4 -4
  181. package/layer/layer.js +4 -4
  182. package/layer/layer.js.flow +4 -3
  183. package/locale/index.js +0 -7
  184. package/locale/index.js.flow +0 -7
  185. package/locale.ts +0 -1
  186. package/menu/index.d.ts +1 -3
  187. package/menu/stateful-container.js +0 -1
  188. package/menu/stateful-container.js.flow +0 -1
  189. package/menu/styled-components.js +1 -1
  190. package/menu/styled-components.js.flow +1 -1
  191. package/modal/index.d.ts +4 -6
  192. package/modal/index.js +0 -6
  193. package/modal/index.js.flow +0 -1
  194. package/modal/modal.js +27 -70
  195. package/modal/modal.js.flow +17 -83
  196. package/modal/styled-components.js +7 -40
  197. package/modal/styled-components.js.flow +12 -44
  198. package/modal/types.js.flow +1 -10
  199. package/package.json +2 -2
  200. package/phone-input/default-props.js +1 -1
  201. package/phone-input/default-props.js.flow +1 -1
  202. package/phone-input/index.d.ts +0 -1
  203. package/phone-input/index.js +0 -36
  204. package/phone-input/index.js.flow +0 -4
  205. package/phone-input/phone-input-lite.js +63 -38
  206. package/phone-input/phone-input-lite.js.flow +66 -44
  207. package/radio/index.d.ts +4 -9
  208. package/radio/radio.js +1 -7
  209. package/radio/radio.js.flow +1 -8
  210. package/radio/radiogroup.js +3 -28
  211. package/radio/radiogroup.js.flow +2 -26
  212. package/radio/styled-components.js +4 -5
  213. package/radio/styled-components.js.flow +3 -4
  214. package/radio/types.js.flow +4 -15
  215. package/rating/styled-components.js +3 -3
  216. package/rating/styled-components.js.flow +3 -3
  217. package/select/index.d.ts +0 -2
  218. package/select/index.js +0 -6
  219. package/select/index.js.flow +0 -2
  220. package/select/select-component.js +4 -8
  221. package/select/select-component.js.flow +2 -3
  222. package/select/styled-components.js +4 -4
  223. package/select/styled-components.js.flow +4 -4
  224. package/snackbar/styled-components.js +1 -1
  225. package/snackbar/styled-components.js.flow +11 -11
  226. package/spinner/index.d.ts +5 -18
  227. package/spinner/index.js +2 -68
  228. package/spinner/index.js.flow +2 -27
  229. package/spinner/styled-components.js +9 -45
  230. package/spinner/styled-components.js.flow +2 -34
  231. package/spinner/types.js.flow +1 -19
  232. package/styles/types.js.flow +0 -2
  233. package/table/filter.js +3 -3
  234. package/table/filter.js.flow +3 -3
  235. package/tag/styled-components.js +1 -1
  236. package/tag/styled-components.js.flow +1 -1
  237. package/theme.ts +0 -81
  238. package/themes/dark-theme/color-component-tokens.js +0 -38
  239. package/themes/dark-theme/color-component-tokens.js.flow +0 -42
  240. package/themes/dark-theme/color-tokens.js +0 -2
  241. package/themes/dark-theme/color-tokens.js.flow +0 -2
  242. package/themes/dark-theme/create-dark-theme.js +1 -3
  243. package/themes/dark-theme/create-dark-theme.js.flow +0 -2
  244. package/themes/dark-theme/dark-theme.js +1 -3
  245. package/themes/dark-theme/dark-theme.js.flow +0 -2
  246. package/themes/light-theme/color-component-tokens.js +0 -38
  247. package/themes/light-theme/color-component-tokens.js.flow +0 -43
  248. package/themes/light-theme/color-tokens.js +0 -2
  249. package/themes/light-theme/color-tokens.js.flow +0 -2
  250. package/themes/light-theme/create-light-theme.js +1 -3
  251. package/themes/light-theme/create-light-theme.js.flow +0 -2
  252. package/themes/light-theme/light-theme.js +1 -3
  253. package/themes/light-theme/light-theme.js.flow +0 -2
  254. package/themes/types.js.flow +0 -68
  255. package/timepicker/timepicker.js +1 -8
  256. package/timepicker/timepicker.js.flow +4 -10
  257. package/typography/index.d.ts +0 -23
  258. package/typography/index.js +2 -57
  259. package/typography/index.js.flow +0 -31
  260. package/es/spinner/spinner.js +0 -68
  261. package/es/themes/dark-theme/color-deprecated-semantic-tokens.js +0 -35
  262. package/es/themes/light-theme/color-deprecated-semantic-tokens.js +0 -35
  263. package/esm/spinner/spinner.js +0 -125
  264. package/esm/themes/dark-theme/color-deprecated-semantic-tokens.js +0 -38
  265. package/esm/themes/light-theme/color-deprecated-semantic-tokens.js +0 -38
  266. package/spinner/spinner.js +0 -136
  267. package/spinner/spinner.js.flow +0 -75
  268. package/themes/dark-theme/color-deprecated-semantic-tokens.js +0 -50
  269. package/themes/dark-theme/color-deprecated-semantic-tokens.js.flow +0 -42
  270. package/themes/light-theme/color-deprecated-semantic-tokens.js +0 -50
  271. package/themes/light-theme/color-deprecated-semantic-tokens.js.flow +0 -42
@@ -40,14 +40,6 @@ export default ((themePrimitives = colorTokens) => ({
40
40
  buttonTertiaryDisabledActiveText: themePrimitives.mono300,
41
41
  buttonTertiarySpinnerForeground: themePrimitives.primary50,
42
42
  buttonTertiarySpinnerBackground: themePrimitives.primary500,
43
- buttonMinimalFill: 'transparent',
44
- buttonMinimalText: themePrimitives.primary,
45
- buttonMinimalHover: themePrimitives.primary700,
46
- buttonMinimalActive: themePrimitives.primary600,
47
- buttonMinimalSelectedText: themePrimitives.primary,
48
- buttonMinimalSelectedFill: themePrimitives.primary600,
49
- buttonMinimalSpinnerForeground: themePrimitives.primary50,
50
- buttonMinimalSpinnerBackground: themePrimitives.primary500,
51
43
  buttonDisabledFill: themePrimitives.mono600,
52
44
  buttonDisabledText: themePrimitives.mono300,
53
45
  buttonDisabledActiveFill: themePrimitives.mono200,
@@ -58,12 +50,6 @@ export default ((themePrimitives = colorTokens) => ({
58
50
  breadcrumbsText: themePrimitives.mono100,
59
51
  breadcrumbsSeparatorFill: themePrimitives.mono200,
60
52
  // Datepicker
61
- datepickerBackground: themePrimitives.mono600,
62
- datepickerDayFont: themePrimitives.white,
63
- datepickerDayFontDisabled: themePrimitives.mono100,
64
- datepickerDayPseudoSelected: themePrimitives.mono500,
65
- datepickerDayPseudoHighlighted: themePrimitives.mono600,
66
- // Calendar
67
53
  calendarBackground: themePrimitives.mono800,
68
54
  calendarForeground: themePrimitives.white,
69
55
  calendarForegroundDisabled: themePrimitives.mono300,
@@ -71,7 +57,6 @@ export default ((themePrimitives = colorTokens) => ({
71
57
  calendarHeaderForeground: themePrimitives.primary,
72
58
  calendarHeaderBackgroundActive: themePrimitives.primary600,
73
59
  calendarHeaderForegroundDisabled: themePrimitives.primary500,
74
- calendarDayBackgroundPseudoSelected: themePrimitives.primary700,
75
60
  calendarDayForegroundPseudoSelected: themePrimitives.primary,
76
61
  calendarDayBackgroundPseudoSelectedHighlighted: themePrimitives.primary600,
77
62
  calendarDayForegroundPseudoSelectedHighlighted: themePrimitives.primary,
@@ -96,21 +81,16 @@ export default ((themePrimitives = colorTokens) => ({
96
81
  // List
97
82
  listHeaderFill: themePrimitives.mono600,
98
83
  listBodyFill: themePrimitives.mono800,
99
- listIconFill: themePrimitives.mono100,
100
- listBorder: themePrimitives.mono500,
101
84
  // ProgressSteps
102
85
  progressStepsCompletedText: themePrimitives.black,
103
86
  progressStepsCompletedFill: themePrimitives.primary,
104
87
  progressStepsActiveText: themePrimitives.black,
105
88
  progressStepsActiveFill: themePrimitives.primary,
106
- progressStepsIconActiveFill: themePrimitives.primary,
107
89
  // Modal
108
90
  modalCloseColor: themePrimitives.mono300,
109
91
  modalCloseColorHover: themePrimitives.mono400,
110
92
  modalCloseColorFocus: themePrimitives.mono400,
111
93
  // Notification
112
- notificationPrimaryBackground: themePrimitives.primary700,
113
- notificationPrimaryText: themePrimitives.primaryA,
114
94
  notificationInfoBackground: themePrimitives.accent700,
115
95
  notificationInfoText: themePrimitives.primaryA,
116
96
  notificationPositiveBackground: themePrimitives.positive700,
@@ -122,7 +102,6 @@ export default ((themePrimitives = colorTokens) => ({
122
102
  // Tag
123
103
  // Custom ramps
124
104
  tagFontDisabledRampUnit: '600',
125
- tagOutlinedDisabledRampUnit: '700',
126
105
  tagSolidFontRampUnit: '0',
127
106
  tagSolidRampUnit: '500',
128
107
  tagOutlinedFontRampUnit: '500',
@@ -135,7 +114,6 @@ export default ((themePrimitives = colorTokens) => ({
135
114
  tagLightRampUnit: '700',
136
115
  tagLightHoverRampUnit: '700',
137
116
  tagLightActiveRampUnit: '600',
138
- tagLightDisabledRampUnit: '700',
139
117
  tagLightFontRampUnit: '100',
140
118
  tagLightFontHoverRampUnit: '100',
141
119
  tagOutlinedActiveRampUnit: '300',
@@ -278,7 +256,6 @@ export default ((themePrimitives = colorTokens) => ({
278
256
  tableFilterFooterBackground: themePrimitives.mono800,
279
257
  // Toast
280
258
  toastText: themePrimitives.white,
281
- toastPrimaryBackground: themePrimitives.primary400,
282
259
  toastPrimaryText: themePrimitives.white,
283
260
  toastInfoBackground: themePrimitives.accent400,
284
261
  toastInfoText: themePrimitives.white,
@@ -318,23 +295,12 @@ export default ((themePrimitives = colorTokens) => ({
318
295
  sliderHandleFill: themePrimitives.primaryA,
319
296
  sliderHandleFillDisabled: themePrimitives.primary500,
320
297
  sliderHandleInnerFill: themePrimitives.primaryA,
321
- sliderHandleFillHover: themePrimitives.mono300,
322
- sliderHandleFillActive: themePrimitives.mono300,
323
- sliderHandleFillSelected: themePrimitives.primary500,
324
- sliderHandleFillSelectedHover: themePrimitives.primary600,
325
- sliderHandleFillSelectedActive: themePrimitives.primary700,
326
298
  sliderTrackFillHover: themePrimitives.mono500,
327
299
  sliderTrackFillActive: themePrimitives.mono400,
328
- sliderTrackFillSelected: themePrimitives.primary500,
329
- sliderTrackFillSelectedActive: themePrimitives.primary600,
330
- sliderTrackFillSelectedHover: themePrimitives.primary700,
331
300
  sliderTrackFillDisabled: themePrimitives.mono700,
332
301
  sliderHandleInnerFillDisabled: themePrimitives.mono500,
333
302
  sliderHandleInnerFillSelectedHover: themePrimitives.primary600,
334
303
  sliderHandleInnerFillSelectedActive: themePrimitives.primary700,
335
- sliderBorder: themePrimitives.white,
336
- sliderBorderHover: themePrimitives.white,
337
- sliderBorderDisabled: themePrimitives.mono400,
338
304
  // Input
339
305
  inputBorder: themePrimitives.mono600,
340
306
  inputFill: themePrimitives.mono600,
@@ -357,10 +323,6 @@ export default ((themePrimitives = colorTokens) => ({
357
323
  menuFontDisabled: themePrimitives.mono400,
358
324
  menuFontHighlighted: themePrimitives.white,
359
325
  menuFontSelected: themePrimitives.white,
360
- // Pagination
361
- paginationTriangleDown: themePrimitives.mono100,
362
- // Header navigation
363
- headerNavigationFill: themePrimitives.mono700,
364
326
  // Tab
365
327
  tabBarFill: themePrimitives.mono1000,
366
328
  tabColor: themePrimitives.mono300,
@@ -74,8 +74,6 @@ export const darkColorTokens = {
74
74
  mono900: '#111111',
75
75
  mono1000: colors.black,
76
76
  // Rating Palette,
77
- rating200: colors.yellow200,
78
- rating400: colors.yellow400,
79
77
  ratingInactiveFill: colors.gray500,
80
78
  ratingStroke: colors.gray700
81
79
  };
@@ -10,7 +10,6 @@ import breakpoints from '../shared/breakpoints.js';
10
10
  import deepMerge from '../../utils/deep-merge.js';
11
11
  import defaultColorTokens from './color-tokens.js';
12
12
  import getComponentColorTokens from './color-component-tokens.js';
13
- import getDeprecatedSemanticColorTokens from './color-deprecated-semantic-tokens.js';
14
13
  import getSemanticColorTokens from './color-semantic-tokens.js';
15
14
  import getTypography from '../shared/typography.js';
16
15
  import grid from '../shared/grid.js';
@@ -35,7 +34,6 @@ overrides) {
35
34
  breakpoints,
36
35
  colors: { ...colorTokens,
37
36
  ...getComponentColorTokens(colorTokens),
38
- ...getDeprecatedSemanticColorTokens(colorTokens),
39
37
  ...getSemanticColorTokens(colorTokens)
40
38
  },
41
39
  direction: 'auto',
@@ -7,7 +7,6 @@ LICENSE file in the root directory of this source tree.
7
7
  import colorTokens from './color-tokens.js';
8
8
  import getSemanticColorTokens from './color-semantic-tokens.js';
9
9
  import getComponentColorTokens from './color-component-tokens.js';
10
- import getDeprecatedSemanticColorTokens from './color-deprecated-semantic-tokens.js';
11
10
  import borders from './borders.js';
12
11
  import lighting from '../shared/lighting.js';
13
12
  import getTypography from '../shared/typography.js';
@@ -20,7 +19,6 @@ export const DarkTheme = {
20
19
  name: 'dark-theme',
21
20
  colors: { ...colorTokens,
22
21
  ...getComponentColorTokens(),
23
- ...getDeprecatedSemanticColorTokens(),
24
22
  ...getSemanticColorTokens()
25
23
  },
26
24
  animation,
@@ -40,14 +40,6 @@ export default ((themePrimitives = colorTokens) => ({
40
40
  buttonTertiaryDisabledActiveText: themePrimitives.mono600,
41
41
  buttonTertiarySpinnerForeground: themePrimitives.accent,
42
42
  buttonTertiarySpinnerBackground: themePrimitives.primary100,
43
- buttonMinimalFill: 'transparent',
44
- buttonMinimalText: themePrimitives.primary,
45
- buttonMinimalHover: themePrimitives.primary50,
46
- buttonMinimalActive: themePrimitives.primary100,
47
- buttonMinimalSelectedFill: themePrimitives.primary100,
48
- buttonMinimalSelectedText: themePrimitives.primary,
49
- buttonMinimalSpinnerForeground: themePrimitives.accent,
50
- buttonMinimalSpinnerBackground: themePrimitives.primary100,
51
43
  buttonDisabledFill: themePrimitives.mono200,
52
44
  buttonDisabledText: themePrimitives.mono600,
53
45
  buttonDisabledActiveFill: themePrimitives.mono700,
@@ -58,12 +50,6 @@ export default ((themePrimitives = colorTokens) => ({
58
50
  breadcrumbsText: themePrimitives.mono900,
59
51
  breadcrumbsSeparatorFill: themePrimitives.mono700,
60
52
  // Datepicker
61
- datepickerBackground: themePrimitives.mono100,
62
- datepickerDayFont: themePrimitives.mono1000,
63
- datepickerDayFontDisabled: themePrimitives.mono500,
64
- datepickerDayPseudoSelected: themePrimitives.primary100,
65
- datepickerDayPseudoHighlighted: themePrimitives.primary200,
66
- // Calendar
67
53
  calendarBackground: themePrimitives.mono100,
68
54
  calendarForeground: themePrimitives.mono1000,
69
55
  calendarForegroundDisabled: themePrimitives.mono500,
@@ -71,7 +57,6 @@ export default ((themePrimitives = colorTokens) => ({
71
57
  calendarHeaderForeground: themePrimitives.primary,
72
58
  calendarHeaderBackgroundActive: themePrimitives.primary700,
73
59
  calendarHeaderForegroundDisabled: themePrimitives.primary500,
74
- calendarDayBackgroundPseudoSelected: themePrimitives.primary100,
75
60
  calendarDayForegroundPseudoSelected: themePrimitives.mono1000,
76
61
  calendarDayBackgroundPseudoSelectedHighlighted: themePrimitives.primary200,
77
62
  calendarDayForegroundPseudoSelectedHighlighted: themePrimitives.mono1000,
@@ -96,14 +81,11 @@ export default ((themePrimitives = colorTokens) => ({
96
81
  // List
97
82
  listHeaderFill: themePrimitives.white,
98
83
  listBodyFill: themePrimitives.white,
99
- listIconFill: themePrimitives.mono500,
100
- listBorder: themePrimitives.mono500,
101
84
  // ProgressSteps
102
85
  progressStepsCompletedText: themePrimitives.white,
103
86
  progressStepsCompletedFill: themePrimitives.primary,
104
87
  progressStepsActiveText: themePrimitives.white,
105
88
  progressStepsActiveFill: themePrimitives.primary,
106
- progressStepsIconActiveFill: themePrimitives.primary,
107
89
  // Toggle
108
90
  toggleFill: themePrimitives.white,
109
91
  toggleFillChecked: themePrimitives.primary,
@@ -136,21 +118,10 @@ export default ((themePrimitives = colorTokens) => ({
136
118
  sliderHandleInnerFill: themePrimitives.primaryA,
137
119
  sliderTrackFillHover: themePrimitives.mono500,
138
120
  sliderTrackFillActive: themePrimitives.mono600,
139
- sliderTrackFillSelected: themePrimitives.primary,
140
- sliderTrackFillSelectedHover: themePrimitives.primary,
141
- sliderTrackFillSelectedActive: themePrimitives.primary500,
142
121
  sliderTrackFillDisabled: themePrimitives.mono300,
143
- sliderHandleFillHover: themePrimitives.white,
144
- sliderHandleFillActive: themePrimitives.white,
145
- sliderHandleFillSelected: themePrimitives.white,
146
- sliderHandleFillSelectedHover: themePrimitives.white,
147
- sliderHandleFillSelectedActive: themePrimitives.white,
148
122
  sliderHandleInnerFillDisabled: themePrimitives.mono400,
149
123
  sliderHandleInnerFillSelectedHover: themePrimitives.primary,
150
124
  sliderHandleInnerFillSelectedActive: themePrimitives.primary500,
151
- sliderBorder: themePrimitives.mono500,
152
- sliderBorderHover: themePrimitives.primary,
153
- sliderBorderDisabled: themePrimitives.mono600,
154
125
  // Inputs
155
126
  inputBorder: themePrimitives.mono300,
156
127
  inputFill: themePrimitives.mono300,
@@ -177,16 +148,10 @@ export default ((themePrimitives = colorTokens) => ({
177
148
  modalCloseColor: themePrimitives.mono1000,
178
149
  modalCloseColorHover: themePrimitives.mono800,
179
150
  modalCloseColorFocus: themePrimitives.mono800,
180
- // Pagination
181
- paginationTriangleDown: themePrimitives.mono800,
182
- // Header navigation
183
- headerNavigationFill: 'transparent',
184
151
  // Tab
185
152
  tabBarFill: themePrimitives.mono200,
186
153
  tabColor: themePrimitives.mono800,
187
154
  // Notification
188
- notificationPrimaryBackground: themePrimitives.primary50,
189
- notificationPrimaryText: themePrimitives.primaryA,
190
155
  notificationInfoBackground: themePrimitives.accent50,
191
156
  notificationInfoText: themePrimitives.primaryA,
192
157
  notificationPositiveBackground: themePrimitives.positive50,
@@ -198,7 +163,6 @@ export default ((themePrimitives = colorTokens) => ({
198
163
  // Tag
199
164
  // Custom ramps
200
165
  tagFontDisabledRampUnit: '100',
201
- tagOutlinedDisabledRampUnit: '200',
202
166
  tagSolidFontRampUnit: '0',
203
167
  tagSolidRampUnit: '400',
204
168
  tagOutlinedFontRampUnit: '400',
@@ -211,7 +175,6 @@ export default ((themePrimitives = colorTokens) => ({
211
175
  tagLightRampUnit: '50',
212
176
  tagLightHoverRampUnit: '100',
213
177
  tagLightActiveRampUnit: '100',
214
- tagLightDisabledRampUnit: '50',
215
178
  tagLightFontRampUnit: '500',
216
179
  tagLightFontHoverRampUnit: '500',
217
180
  tagOutlinedHoverRampUnit: '50',
@@ -353,7 +316,6 @@ export default ((themePrimitives = colorTokens) => ({
353
316
  tableFilterFooterBackground: themePrimitives.mono200,
354
317
  // Toast
355
318
  toastText: themePrimitives.white,
356
- toastPrimaryBackground: themePrimitives.primary400,
357
319
  toastPrimaryText: themePrimitives.white,
358
320
  toastInfoBackground: themePrimitives.accent400,
359
321
  toastInfoText: themePrimitives.white,
@@ -73,8 +73,6 @@ const lightColorTokens = {
73
73
  mono900: colors.gray700,
74
74
  mono1000: colors.black,
75
75
  // Rating Palette,
76
- rating200: colors.yellow200,
77
- rating400: colors.yellow400,
78
76
  ratingInactiveFill: colors.gray100,
79
77
  ratingStroke: colors.gray300
80
78
  };
@@ -10,7 +10,6 @@ import breakpoints from '../shared/breakpoints.js';
10
10
  import deepMerge from '../../utils/deep-merge.js';
11
11
  import defaultColorTokens from './color-tokens.js';
12
12
  import getComponentColorTokens from './color-component-tokens.js';
13
- import getDeprecatedSemanticColorTokens from './color-deprecated-semantic-tokens.js';
14
13
  import getSemanticColorTokens from './color-semantic-tokens.js';
15
14
  import getTypography from '../shared/typography.js';
16
15
  import grid from '../shared/grid.js';
@@ -35,7 +34,6 @@ overrides) {
35
34
  breakpoints,
36
35
  colors: { ...colorTokens,
37
36
  ...getComponentColorTokens(colorTokens),
38
- ...getDeprecatedSemanticColorTokens(colorTokens),
39
37
  ...getSemanticColorTokens(colorTokens)
40
38
  },
41
39
  direction: 'auto',
@@ -7,7 +7,6 @@ LICENSE file in the root directory of this source tree.
7
7
  import colorTokens from './color-tokens.js';
8
8
  import getSemanticColorTokens from './color-semantic-tokens.js';
9
9
  import getComponentColorTokens from './color-component-tokens.js';
10
- import getDeprecatedSemanticColorTokens from './color-deprecated-semantic-tokens.js';
11
10
  import borders from '../shared/borders.js';
12
11
  import lighting from '../shared/lighting.js';
13
12
  import getTypography from '../shared/typography.js';
@@ -20,7 +19,6 @@ export const LightTheme = {
20
19
  name: 'light-theme',
21
20
  colors: { ...colorTokens,
22
21
  ...getComponentColorTokens(),
23
- ...getDeprecatedSemanticColorTokens(),
24
22
  ...getSemanticColorTokens()
25
23
  },
26
24
  animation,
@@ -303,14 +303,7 @@ class TimePicker extends React.Component {
303
303
  }, selectProps.overrides);
304
304
  const value = this.props.value && adapter.isValid(this.props.value) ? this.buildSelectedOption(this.props.value, this.props.format) : this.state.value;
305
305
  return /*#__PURE__*/React.createElement(LocaleContext.Consumer, null, locale => {
306
- let ariaLabel;
307
-
308
- if (locale.datepicker.timePickerAriaLabel) {
309
- ariaLabel = locale.datepicker.timePickerAriaLabel;
310
- } else {
311
- ariaLabel = format === '12' ? locale.datepicker.timePickerAriaLabel12Hour : locale.datepicker.timePickerAriaLabel24Hour;
312
- }
313
-
306
+ const ariaLabel = format === '12' ? locale.datepicker.timePickerAriaLabel12Hour : locale.datepicker.timePickerAriaLabel24Hour;
314
307
  return /*#__PURE__*/React.createElement(OverriddenSelect, _extends({
315
308
  "aria-label": ariaLabel,
316
309
  disabled: this.props.disabled,
@@ -423,34 +423,4 @@ React.createElement(Block, _extends({
423
423
  color: props.color || 'contentPrimary',
424
424
  ref: ref
425
425
  })));
426
- MonoParagraphXSmall.displayName = 'MonoParagraphXSmall'; // TODO(v11): remove
427
- // Aliases for backwards compatibility
428
-
429
- export const Display = DisplayLarge;
430
- export const Display1 = DisplayLarge;
431
- export const Display2 = DisplayMedium;
432
- export const Display3 = DisplaySmall;
433
- export const Display4 = DisplayXSmall;
434
- export const H1 = HeadingXXLarge;
435
- export const H2 = HeadingXLarge;
436
- export const H3 = HeadingLarge;
437
- export const H4 = HeadingMedium;
438
- export const H5 = HeadingSmall;
439
- export const H6 = HeadingXSmall;
440
- export const Paragraph1 = ParagraphLarge;
441
- export const Paragraph2 = ParagraphMedium;
442
- export const Paragraph3 = ParagraphSmall;
443
- export const Paragraph4 = ParagraphXSmall;
444
- export const Label1 = LabelLarge;
445
- export const Label2 = LabelMedium;
446
- export const Label3 = LabelSmall;
447
- export const Label4 = LabelXSmall;
448
- export const Caption1 = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement(Paragraph4, _extends({}, props, {
449
- color: props.color || 'contentSecondary',
450
- ref: ref
451
- })));
452
- Caption1.displayName = 'Caption1';
453
- export const Caption2 = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement(Label4, _extends({}, props, {
454
- color: props.color || 'contentSecondary'
455
- })));
456
- Caption2.displayName = 'Caption2';
426
+ MonoParagraphXSmall.displayName = 'MonoParagraphXSmall';
@@ -81,6 +81,8 @@ var Accordion = /*#__PURE__*/function (_React$Component) {
81
81
  expanded: []
82
82
  }, _this.props.initialState));
83
83
 
84
+ _defineProperty(_assertThisInitialized(_this), "itemRefs", []);
85
+
84
86
  return _this;
85
87
  }
86
88
 
@@ -127,6 +129,56 @@ var Accordion = /*#__PURE__*/function (_React$Component) {
127
129
  this.setState(newState);
128
130
  typeof onChange === 'function' && onChange(newState);
129
131
  }
132
+ }, {
133
+ key: "handleKeyDown",
134
+ value: function handleKeyDown(e) {
135
+ if (this.props.disabled) {
136
+ return;
137
+ }
138
+
139
+ var itemRefs = this.itemRefs;
140
+ var HOME = 36;
141
+ var END = 35;
142
+ var ARROW_UP = 38;
143
+ var ARROW_DOWN = 40;
144
+
145
+ if (e.keyCode === HOME) {
146
+ e.preventDefault();
147
+ var firstItem = itemRefs[0];
148
+ firstItem.current && firstItem.current.focus();
149
+ }
150
+
151
+ if (e.keyCode === END) {
152
+ e.preventDefault();
153
+ var lastItem = itemRefs[itemRefs.length - 1];
154
+ lastItem.current && lastItem.current.focus();
155
+ }
156
+
157
+ if (e.keyCode === ARROW_UP) {
158
+ e.preventDefault();
159
+ var activeItemIdx = itemRefs.findIndex(function (item) {
160
+ return item.current === document.activeElement;
161
+ });
162
+
163
+ if (activeItemIdx > 0) {
164
+ var prevItem = itemRefs[activeItemIdx - 1];
165
+ prevItem.current && prevItem.current.focus();
166
+ }
167
+ }
168
+
169
+ if (e.keyCode === ARROW_DOWN) {
170
+ e.preventDefault();
171
+
172
+ var _activeItemIdx = itemRefs.findIndex(function (item) {
173
+ return item.current === document.activeElement;
174
+ });
175
+
176
+ if (_activeItemIdx < itemRefs.length - 1) {
177
+ var nextItem = itemRefs[_activeItemIdx + 1];
178
+ nextItem.current && nextItem.current.focus();
179
+ }
180
+ }
181
+ }
130
182
  }, {
131
183
  key: "getItems",
132
184
  value: function getItems() {
@@ -137,12 +189,15 @@ var Accordion = /*#__PURE__*/function (_React$Component) {
137
189
  accordion = _this$props2.accordion,
138
190
  disabled = _this$props2.disabled,
139
191
  children = _this$props2.children,
140
- renderPanelContent = _this$props2.renderPanelContent,
141
192
  renderAll = _this$props2.renderAll,
142
193
  overrides = _this$props2.overrides; // flowlint-next-line unclear-type:off
143
194
 
144
195
  return React.Children.map(children, function (child, index) {
145
- if (!child) return; // If there is no key provided use the panel order as a default key
196
+ if (!child) return;
197
+ var itemRef = /*#__PURE__*/React.createRef();
198
+
199
+ _this2.itemRefs.push(itemRef); // If there is no key provided use the panel order as a default key
200
+
146
201
 
147
202
  var key = child.key || String(index);
148
203
  var isExpanded = false;
@@ -155,9 +210,9 @@ var Accordion = /*#__PURE__*/function (_React$Component) {
155
210
 
156
211
  var props = {
157
212
  key: key,
213
+ ref: itemRef,
158
214
  expanded: isExpanded || child.props.expanded,
159
215
  accordion: accordion,
160
- renderPanelContent: renderPanelContent,
161
216
  renderAll: renderAll,
162
217
  overrides: child.props.overrides || overrides,
163
218
  disabled: child.props.disabled || disabled,
@@ -172,14 +227,6 @@ var Accordion = /*#__PURE__*/function (_React$Component) {
172
227
  return /*#__PURE__*/React.cloneElement(child, props);
173
228
  });
174
229
  }
175
- }, {
176
- key: "componentDidMount",
177
- value: function componentDidMount() {
178
- // TODO(v11)
179
- if (process.env.NODE_ENV !== "production" && this.props.renderPanelContent) {
180
- console.warn('baseui:Accordion The `renderPanelContent` prop is deprecated. Please update your code to use `renderAll`.');
181
- }
182
- }
183
230
  }, {
184
231
  key: "render",
185
232
  value: function render() {
@@ -195,7 +242,8 @@ var Accordion = /*#__PURE__*/function (_React$Component) {
195
242
  return /*#__PURE__*/React.createElement(Root, _extends({
196
243
  "data-baseweb": "accordion",
197
244
  $disabled: this.props.disabled,
198
- $isFocusVisible: false
245
+ $isFocusVisible: false,
246
+ onKeyDown: this.handleKeyDown.bind(this)
199
247
  }, rootProps), this.getItems());
200
248
  }
201
249
  }]);
@@ -212,7 +260,6 @@ _defineProperty(Accordion, "defaultProps", {
212
260
  onChange: function onChange() {},
213
261
  overrides: {},
214
262
  renderAll: false,
215
- renderPanelContent: false,
216
263
  stateReducer: function stateReducer(type, newState) {
217
264
  return newState;
218
265
  }
@@ -30,7 +30,7 @@ import { getOverrides } from '../helpers/overrides.js';
30
30
  import { PanelContainer as StyledPanelContainer, Header as StyledHeader, Content as StyledContent, ToggleIcon as StyledToggleIcon, ToggleIconGroup as StyledToggleIconGroup, ContentAnimationContainer as StyledContentAnimationContainer } from './styled-components.js';
31
31
  import { isFocusVisible, forkFocus, forkBlur } from '../utils/focusVisible.js';
32
32
 
33
- var Panel = function Panel(_ref) {
33
+ var Panel = function Panel(_ref, ref) {
34
34
  var ariaControls = _ref['aria-controls'],
35
35
  children = _ref.children,
36
36
  _ref$disabled = _ref.disabled,
@@ -47,8 +47,6 @@ var Panel = function Panel(_ref) {
47
47
  overrides = _ref$overrides === void 0 ? {} : _ref$overrides,
48
48
  _ref$title = _ref.title,
49
49
  title = _ref$title === void 0 ? '' : _ref$title,
50
- _ref$renderPanelConte = _ref.renderPanelContent,
51
- renderPanelContent = _ref$renderPanelConte === void 0 ? false : _ref$renderPanelConte,
52
50
  _ref$renderAll = _ref.renderAll,
53
51
  renderAll = _ref$renderAll === void 0 ? false : _ref$renderAll;
54
52
 
@@ -203,7 +201,8 @@ var Panel = function Panel(_ref) {
203
201
  onClick: handleClick,
204
202
  onKeyDown: handleKeyDown,
205
203
  onFocus: forkFocus(headerProps, handleFocus),
206
- onBlur: forkBlur(headerProps, handleBlur)
204
+ onBlur: forkBlur(headerProps, handleBlur),
205
+ ref: ref
207
206
  }), title, /*#__PURE__*/React.createElement(ToggleIcon, _extends({
208
207
  viewBox: "0 0 24 24",
209
208
  title: localState.expanded ? locale.accordion.collapse : locale.accordion.expand,
@@ -229,8 +228,10 @@ var Panel = function Panel(_ref) {
229
228
  ref: _animateRef
230
229
  }, sharedProps, contentProps, ariaControls ? {
231
230
  id: ariaControls
232
- } : {}), localState.expanded || renderAll || renderPanelContent || localState.animationInProgress ? children : null)));
231
+ } : {}), localState.expanded || renderAll || localState.animationInProgress ? children : null)));
233
232
  });
234
233
  };
235
234
 
236
- export default Panel;
235
+ var ForwardedPanel = /*#__PURE__*/React.forwardRef(Panel);
236
+ ForwardedPanel.displayName = 'Panel';
237
+ export default ForwardedPanel;
@@ -43,8 +43,7 @@ function StatelessAccordion(_ref) {
43
43
  onChange = _ref.onChange,
44
44
  _ref$overrides = _ref.overrides,
45
45
  overrides = _ref$overrides === void 0 ? {} : _ref$overrides,
46
- renderAll = _ref.renderAll,
47
- renderPanelContent = _ref.renderPanelContent;
46
+ renderAll = _ref.renderAll;
48
47
 
49
48
  var RootOverrides = overrides.Root,
50
49
  PanelOverrides = _objectWithoutProperties(overrides, ["Root"]);
@@ -88,8 +87,7 @@ function StatelessAccordion(_ref) {
88
87
  });
89
88
  } : onChange,
90
89
  overrides: child.props.overrides || PanelOverrides,
91
- renderAll: renderAll,
92
- renderPanelContent: renderPanelContent
90
+ renderAll: renderAll
93
91
  });
94
92
  }));
95
93
  }
@@ -7,8 +7,7 @@ LICENSE file in the root directory of this source tree.
7
7
  export var KIND = {
8
8
  primary: 'primary',
9
9
  secondary: 'secondary',
10
- tertiary: 'tertiary',
11
- minimal: 'minimal'
10
+ tertiary: 'tertiary'
12
11
  };
13
12
  export var SHAPE = {
14
13
  default: 'default',
@@ -207,14 +207,6 @@ function getLoadingSpinnerColors(_ref8) {
207
207
  };
208
208
  }
209
209
 
210
- case KIND.minimal:
211
- {
212
- return {
213
- foreground: $theme.colors.buttonMinimalSpinnerForeground,
214
- background: $theme.colors.buttonMinimalSpinnerBackground
215
- };
216
- }
217
-
218
210
  case KIND.primary:
219
211
  default:
220
212
  {
@@ -283,7 +275,7 @@ function getDisabledStyles(_ref11) {
283
275
  color: $theme.colors.buttonDisabledActiveText,
284
276
  backgroundColor: $theme.colors.buttonDisabledActiveFill
285
277
  };
286
- } else if ($kind === KIND.minimal || $kind === KIND.tertiary) {
278
+ } else if ($kind === KIND.tertiary) {
287
279
  return {
288
280
  backgroundColor: $theme.colors.buttonTertiaryDisabledActiveFill,
289
281
  color: $theme.colors.buttonTertiaryDisabledActiveText
@@ -292,7 +284,7 @@ function getDisabledStyles(_ref11) {
292
284
  }
293
285
 
294
286
  return {
295
- backgroundColor: $kind === KIND.minimal || $kind === KIND.tertiary ? 'transparent' : $theme.colors.buttonDisabledFill,
287
+ backgroundColor: $kind === KIND.tertiary ? 'transparent' : $theme.colors.buttonDisabledFill,
296
288
  color: $theme.colors.buttonDisabledText
297
289
  };
298
290
  }
@@ -421,25 +413,6 @@ function getColorStyles(_ref13) {
421
413
  }
422
414
  };
423
415
 
424
- case KIND.minimal:
425
- if ($isSelected) {
426
- return {
427
- color: $theme.colors.buttonMinimalSelectedText,
428
- backgroundColor: $theme.colors.buttonMinimalSelectedFill
429
- };
430
- }
431
-
432
- return {
433
- color: $theme.colors.buttonMinimalText,
434
- backgroundColor: $theme.colors.buttonMinimalFill,
435
- ':hover': {
436
- backgroundColor: $isLoading ? $theme.colors.buttonMinimalActive : $theme.colors.buttonMinimalHover
437
- },
438
- ':active': {
439
- backgroundColor: $theme.colors.buttonMinimalActive
440
- }
441
- };
442
-
443
416
  default:
444
417
  return Object.freeze({});
445
418
  }