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
@@ -1,35 +0,0 @@
1
- /*
2
- Copyright (c) Uber Technologies, Inc.
3
-
4
- This source code is licensed under the MIT license found in the
5
- LICENSE file in the root directory of this source tree.
6
- */
7
- import colorTokens from './color-tokens.js';
8
-
9
- /* ---- DEPRECATED ---- */
10
- export default ((themePrimitives = colorTokens) => ({
11
- // TODO(#2318) Remove Legacy Semantic Colors values in the next v11 major
12
- // since it's not used in the component specific tokens
13
- // and we ship semantic tokens separately
14
-
15
- /* ---- Legacy Semantic Colors ---- */
16
- // Font Color
17
- colorPrimary: themePrimitives.black,
18
- colorSecondary: themePrimitives.mono800,
19
- // Background
20
- background: themePrimitives.white,
21
- backgroundAlt: themePrimitives.white,
22
- backgroundInv: themePrimitives.primary,
23
- // Foreground
24
- foreground: themePrimitives.black,
25
- foregroundAlt: themePrimitives.mono800,
26
- foregroundInv: themePrimitives.white,
27
- // Borders
28
- border: themePrimitives.mono500,
29
- borderAlt: themePrimitives.mono600,
30
- borderFocus: themePrimitives.primary,
31
- borderError: themePrimitives.negative,
32
- // Shadow
33
- shadowFocus: 'rgba(39, 110, 241, 0.32)',
34
- shadowError: 'rgba(229, 73, 55, 0.32)'
35
- }));
@@ -1,125 +0,0 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
2
-
3
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
-
5
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
6
-
7
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
8
-
9
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
10
-
11
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
12
-
13
- function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
14
-
15
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
-
17
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
18
-
19
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
20
-
21
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
22
-
23
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
24
-
25
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
26
-
27
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
28
-
29
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
30
-
31
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
32
-
33
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
34
-
35
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
36
-
37
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
38
-
39
- /*
40
- Copyright (c) Uber Technologies, Inc.
41
-
42
- This source code is licensed under the MIT license found in the
43
- LICENSE file in the root directory of this source tree.
44
- */
45
- import * as React from 'react';
46
- import { mergeOverrides, getOverrides } from '../helpers/overrides.js';
47
- import Icon from '../icon/icon.js';
48
- import { Svg as StyledSvg, StyledActivePath, StyledTrackPath } from './styled-components.js';
49
-
50
- var Spinner = /*#__PURE__*/function (_React$Component) {
51
- _inherits(Spinner, _React$Component);
52
-
53
- var _super = _createSuper(Spinner);
54
-
55
- function Spinner() {
56
- _classCallCheck(this, Spinner);
57
-
58
- return _super.apply(this, arguments);
59
- }
60
-
61
- _createClass(Spinner, [{
62
- key: "componentDidMount",
63
- value: function componentDidMount() {
64
- // TODO(v11): remove warning when switching default Spinner
65
- if (process.env.NODE_ENV !== "production") {
66
- if (!this.props.$silenceV11DeprecationWarning) {
67
- console.warn("\u2756 [baseui] Please consider using \"StyledSpinnerNext\" instead of \"Spinner\". " + "In v11, \"StyledSpinnerNext\" will become the default \"Spinner\"" + " and the current SVG based implementation will be deprecated.");
68
- }
69
- }
70
- }
71
- }, {
72
- key: "render",
73
- value: function render() {
74
- var _this$props$overrides = this.props.overrides,
75
- overrides = _this$props$overrides === void 0 ? {} : _this$props$overrides;
76
- var mergedOverrides = mergeOverrides({
77
- Svg: StyledSvg
78
- }, overrides);
79
-
80
- var _getOverrides = getOverrides(overrides.TrackPath, StyledTrackPath),
81
- _getOverrides2 = _slicedToArray(_getOverrides, 2),
82
- TrackPath = _getOverrides2[0],
83
- trackPathProps = _getOverrides2[1];
84
-
85
- var _getOverrides3 = getOverrides(overrides.ActivePath, StyledActivePath),
86
- _getOverrides4 = _slicedToArray(_getOverrides3, 2),
87
- ActivePath = _getOverrides4[0],
88
- activePathProps = _getOverrides4[1];
89
-
90
- return (
91
- /*#__PURE__*/
92
- // $FlowExpectedError[cannot-spread-inexact]
93
- React.createElement(Icon, _extends({
94
- "aria-label": 'Loading',
95
- "data-baseweb": "spinner",
96
- title: "Spinner",
97
- viewBox: "3 3 18 18"
98
- }, this.props, {
99
- overrides: mergedOverrides
100
- }), /*#__PURE__*/React.createElement(TrackPath, _extends({
101
- fillRule: "evenodd",
102
- clipRule: "evenodd",
103
- d: "M12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5ZM3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12Z",
104
- $color: this.props.color
105
- }, trackPathProps)), /*#__PURE__*/React.createElement(ActivePath, _extends({
106
- fillRule: "evenodd",
107
- clipRule: "evenodd",
108
- d: "M16.9497 7.05015C14.2161 4.31648 9.78392 4.31648 7.05025 7.05015C6.65973 7.44067 6.02656 7.44067 5.63604 7.05015C5.24551 6.65962 5.24551 6.02646 5.63604 5.63593C9.15076 2.12121 14.8492 2.12121 18.364 5.63593C18.7545 6.02646 18.7545 6.65962 18.364 7.05015C17.9734 7.44067 17.3403 7.44067 16.9497 7.05015Z",
109
- $color: this.props.color
110
- }, activePathProps)))
111
- );
112
- }
113
- }]);
114
-
115
- return Spinner;
116
- }(React.Component);
117
-
118
- _defineProperty(Spinner, "defaultProps", {
119
- color: '',
120
- size: 44,
121
- title: 'Loading',
122
- overrides: {}
123
- });
124
-
125
- export default Spinner;
@@ -1,38 +0,0 @@
1
- /*
2
- Copyright (c) Uber Technologies, Inc.
3
-
4
- This source code is licensed under the MIT license found in the
5
- LICENSE file in the root directory of this source tree.
6
- */
7
- import colorTokens from './color-tokens.js';
8
-
9
- /* ---- DEPRECATED ---- */
10
- export default (function () {
11
- var themePrimitives = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : colorTokens;
12
- return {
13
- // TODO(#2318) Remove Legacy Semantic Colors values in the next v11 major
14
- // since it's not used in the component specific tokens
15
- // and we ship semantic tokens separately
16
-
17
- /* ---- Legacy Semantic Colors ---- */
18
- // Font Color
19
- colorPrimary: themePrimitives.mono100,
20
- colorSecondary: themePrimitives.mono200,
21
- // Background
22
- background: themePrimitives.mono1000,
23
- backgroundAlt: themePrimitives.mono700,
24
- backgroundInv: themePrimitives.mono100,
25
- // Foreground
26
- foreground: themePrimitives.mono100,
27
- foregroundAlt: themePrimitives.mono300,
28
- foregroundInv: themePrimitives.mono1000,
29
- // Borders
30
- border: themePrimitives.mono600,
31
- borderAlt: themePrimitives.mono700,
32
- borderFocus: themePrimitives.primary,
33
- borderError: themePrimitives.negative,
34
- // Shadow
35
- shadowFocus: 'rgba(39, 110, 241, 0.32)',
36
- shadowError: 'rgba(229, 73, 55, 0.32)'
37
- };
38
- });
@@ -1,38 +0,0 @@
1
- /*
2
- Copyright (c) Uber Technologies, Inc.
3
-
4
- This source code is licensed under the MIT license found in the
5
- LICENSE file in the root directory of this source tree.
6
- */
7
- import colorTokens from './color-tokens.js';
8
-
9
- /* ---- DEPRECATED ---- */
10
- export default (function () {
11
- var themePrimitives = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : colorTokens;
12
- return {
13
- // TODO(#2318) Remove Legacy Semantic Colors values in the next v11 major
14
- // since it's not used in the component specific tokens
15
- // and we ship semantic tokens separately
16
-
17
- /* ---- Legacy Semantic Colors ---- */
18
- // Font Color
19
- colorPrimary: themePrimitives.black,
20
- colorSecondary: themePrimitives.mono800,
21
- // Background
22
- background: themePrimitives.white,
23
- backgroundAlt: themePrimitives.white,
24
- backgroundInv: themePrimitives.primary,
25
- // Foreground
26
- foreground: themePrimitives.black,
27
- foregroundAlt: themePrimitives.mono800,
28
- foregroundInv: themePrimitives.white,
29
- // Borders
30
- border: themePrimitives.mono500,
31
- borderAlt: themePrimitives.mono600,
32
- borderFocus: themePrimitives.primary,
33
- borderError: themePrimitives.negative,
34
- // Shadow
35
- shadowFocus: 'rgba(39, 110, 241, 0.32)',
36
- shadowError: 'rgba(229, 73, 55, 0.32)'
37
- };
38
- });
@@ -1,136 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
-
10
- var React = _interopRequireWildcard(require("react"));
11
-
12
- var _overrides = require("../helpers/overrides.js");
13
-
14
- var _icon = _interopRequireDefault(require("../icon/icon.js"));
15
-
16
- var _styledComponents = require("./styled-components.js");
17
-
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
-
20
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
21
-
22
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
-
24
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
25
-
26
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
27
-
28
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
29
-
30
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
31
-
32
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
33
-
34
- function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
35
-
36
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
37
-
38
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
39
-
40
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
41
-
42
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
43
-
44
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
45
-
46
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
47
-
48
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
49
-
50
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
51
-
52
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
53
-
54
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
55
-
56
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
57
-
58
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
59
-
60
- var Spinner = /*#__PURE__*/function (_React$Component) {
61
- _inherits(Spinner, _React$Component);
62
-
63
- var _super = _createSuper(Spinner);
64
-
65
- function Spinner() {
66
- _classCallCheck(this, Spinner);
67
-
68
- return _super.apply(this, arguments);
69
- }
70
-
71
- _createClass(Spinner, [{
72
- key: "componentDidMount",
73
- value: function componentDidMount() {
74
- // TODO(v11): remove warning when switching default Spinner
75
- if (process.env.NODE_ENV !== "production") {
76
- if (!this.props.$silenceV11DeprecationWarning) {
77
- console.warn("\u2756 [baseui] Please consider using \"StyledSpinnerNext\" instead of \"Spinner\". " + "In v11, \"StyledSpinnerNext\" will become the default \"Spinner\"" + " and the current SVG based implementation will be deprecated.");
78
- }
79
- }
80
- }
81
- }, {
82
- key: "render",
83
- value: function render() {
84
- var _this$props$overrides = this.props.overrides,
85
- overrides = _this$props$overrides === void 0 ? {} : _this$props$overrides;
86
- var mergedOverrides = (0, _overrides.mergeOverrides)({
87
- Svg: _styledComponents.Svg
88
- }, overrides);
89
-
90
- var _getOverrides = (0, _overrides.getOverrides)(overrides.TrackPath, _styledComponents.StyledTrackPath),
91
- _getOverrides2 = _slicedToArray(_getOverrides, 2),
92
- TrackPath = _getOverrides2[0],
93
- trackPathProps = _getOverrides2[1];
94
-
95
- var _getOverrides3 = (0, _overrides.getOverrides)(overrides.ActivePath, _styledComponents.StyledActivePath),
96
- _getOverrides4 = _slicedToArray(_getOverrides3, 2),
97
- ActivePath = _getOverrides4[0],
98
- activePathProps = _getOverrides4[1];
99
-
100
- return (
101
- /*#__PURE__*/
102
- // $FlowExpectedError[cannot-spread-inexact]
103
- React.createElement(_icon.default, _extends({
104
- "aria-label": 'Loading',
105
- "data-baseweb": "spinner",
106
- title: "Spinner",
107
- viewBox: "3 3 18 18"
108
- }, this.props, {
109
- overrides: mergedOverrides
110
- }), /*#__PURE__*/React.createElement(TrackPath, _extends({
111
- fillRule: "evenodd",
112
- clipRule: "evenodd",
113
- d: "M12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5ZM3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12Z",
114
- $color: this.props.color
115
- }, trackPathProps)), /*#__PURE__*/React.createElement(ActivePath, _extends({
116
- fillRule: "evenodd",
117
- clipRule: "evenodd",
118
- d: "M16.9497 7.05015C14.2161 4.31648 9.78392 4.31648 7.05025 7.05015C6.65973 7.44067 6.02656 7.44067 5.63604 7.05015C5.24551 6.65962 5.24551 6.02646 5.63604 5.63593C9.15076 2.12121 14.8492 2.12121 18.364 5.63593C18.7545 6.02646 18.7545 6.65962 18.364 7.05015C17.9734 7.44067 17.3403 7.44067 16.9497 7.05015Z",
119
- $color: this.props.color
120
- }, activePathProps)))
121
- );
122
- }
123
- }]);
124
-
125
- return Spinner;
126
- }(React.Component);
127
-
128
- _defineProperty(Spinner, "defaultProps", {
129
- color: '',
130
- size: 44,
131
- title: 'Loading',
132
- overrides: {}
133
- });
134
-
135
- var _default = Spinner;
136
- exports.default = _default;
@@ -1,75 +0,0 @@
1
- /*
2
- Copyright (c) Uber Technologies, Inc.
3
-
4
- This source code is licensed under the MIT license found in the
5
- LICENSE file in the root directory of this source tree.
6
- */
7
- // @flow
8
- import * as React from 'react';
9
-
10
- import { mergeOverrides, getOverrides } from '../helpers/overrides.js';
11
- import Icon from '../icon/icon.js';
12
-
13
- import { Svg as StyledSvg, StyledActivePath, StyledTrackPath } from './styled-components.js';
14
- import type { SpinnerPropsT } from './types.js';
15
-
16
- class Spinner extends React.Component<SpinnerPropsT> {
17
- static defaultProps: $Shape<SpinnerPropsT> = {
18
- color: '',
19
- size: 44,
20
- title: 'Loading',
21
- overrides: {},
22
- };
23
-
24
- componentDidMount() {
25
- // TODO(v11): remove warning when switching default Spinner
26
- if (__DEV__) {
27
- if (!this.props.$silenceV11DeprecationWarning) {
28
- console.warn(
29
- `❖ [baseui] Please consider using "StyledSpinnerNext" instead of "Spinner". ` +
30
- `In v11, "StyledSpinnerNext" will become the default "Spinner"` +
31
- ` and the current SVG based implementation will be deprecated.`
32
- );
33
- }
34
- }
35
- }
36
-
37
- render() {
38
- const { overrides = {} } = this.props;
39
- const mergedOverrides = mergeOverrides({ Svg: StyledSvg }, overrides);
40
- const [TrackPath, trackPathProps] = getOverrides(overrides.TrackPath, StyledTrackPath);
41
- const [ActivePath, activePathProps] = getOverrides(overrides.ActivePath, StyledActivePath);
42
- return (
43
- // $FlowExpectedError[cannot-spread-inexact]
44
- <Icon
45
- aria-label={'Loading'}
46
- data-baseweb="spinner"
47
- title="Spinner"
48
- viewBox="3 3 18 18"
49
- {...this.props}
50
- overrides={mergedOverrides}
51
- >
52
- <TrackPath
53
- fillRule="evenodd"
54
- clipRule="evenodd"
55
- d="M12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5ZM3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12Z"
56
- $color={this.props.color}
57
- {...trackPathProps}
58
- />
59
- <ActivePath
60
- fillRule="evenodd"
61
- clipRule="evenodd"
62
- d="M16.9497 7.05015C14.2161 4.31648 9.78392 4.31648 7.05025 7.05015C6.65973 7.44067 6.02656 7.44067 5.63604 7.05015C5.24551 6.65962 5.24551 6.02646 5.63604 5.63593C9.15076 2.12121 14.8492 2.12121 18.364 5.63593C18.7545 6.02646 18.7545 6.65962 18.364 7.05015C17.9734 7.44067 17.3403 7.44067 16.9497 7.05015Z"
63
- $color={this.props.color}
64
- {...activePathProps}
65
- />
66
- </Icon>
67
- );
68
- }
69
- }
70
-
71
- export default Spinner;
72
-
73
- declare var __DEV__: boolean;
74
- declare var __NODE__: boolean;
75
- declare var __BROWSER__: boolean;
@@ -1,50 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _colorTokens = _interopRequireDefault(require("./color-tokens.js"));
9
-
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
-
12
- /*
13
- Copyright (c) Uber Technologies, Inc.
14
-
15
- This source code is licensed under the MIT license found in the
16
- LICENSE file in the root directory of this source tree.
17
- */
18
-
19
- /* ---- DEPRECATED ---- */
20
- var _default = function _default() {
21
- var themePrimitives = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _colorTokens.default;
22
- return {
23
- // TODO(#2318) Remove Legacy Semantic Colors values in the next v11 major
24
- // since it's not used in the component specific tokens
25
- // and we ship semantic tokens separately
26
-
27
- /* ---- Legacy Semantic Colors ---- */
28
- // Font Color
29
- colorPrimary: themePrimitives.mono100,
30
- colorSecondary: themePrimitives.mono200,
31
- // Background
32
- background: themePrimitives.mono1000,
33
- backgroundAlt: themePrimitives.mono700,
34
- backgroundInv: themePrimitives.mono100,
35
- // Foreground
36
- foreground: themePrimitives.mono100,
37
- foregroundAlt: themePrimitives.mono300,
38
- foregroundInv: themePrimitives.mono1000,
39
- // Borders
40
- border: themePrimitives.mono600,
41
- borderAlt: themePrimitives.mono700,
42
- borderFocus: themePrimitives.primary,
43
- borderError: themePrimitives.negative,
44
- // Shadow
45
- shadowFocus: 'rgba(39, 110, 241, 0.32)',
46
- shadowError: 'rgba(229, 73, 55, 0.32)'
47
- };
48
- };
49
-
50
- exports.default = _default;
@@ -1,42 +0,0 @@
1
- /*
2
- Copyright (c) Uber Technologies, Inc.
3
-
4
- This source code is licensed under the MIT license found in the
5
- LICENSE file in the root directory of this source tree.
6
- */
7
- // @flow
8
- import colorTokens from './color-tokens.js';
9
- import type { ColorTokensT } from '../types.js';
10
-
11
- /* ---- DEPRECATED ---- */
12
- export default (themePrimitives: ColorTokensT = colorTokens) => ({
13
- // TODO(#2318) Remove Legacy Semantic Colors values in the next v11 major
14
- // since it's not used in the component specific tokens
15
- // and we ship semantic tokens separately
16
-
17
- /* ---- Legacy Semantic Colors ---- */
18
-
19
- // Font Color
20
- colorPrimary: themePrimitives.mono100,
21
- colorSecondary: themePrimitives.mono200,
22
- // Background
23
- background: themePrimitives.mono1000,
24
- backgroundAlt: themePrimitives.mono700,
25
- backgroundInv: themePrimitives.mono100,
26
- // Foreground
27
- foreground: themePrimitives.mono100,
28
- foregroundAlt: themePrimitives.mono300,
29
- foregroundInv: themePrimitives.mono1000,
30
- // Borders
31
- border: themePrimitives.mono600,
32
- borderAlt: themePrimitives.mono700,
33
- borderFocus: themePrimitives.primary,
34
- borderError: themePrimitives.negative,
35
- // Shadow
36
- shadowFocus: 'rgba(39, 110, 241, 0.32)',
37
- shadowError: 'rgba(229, 73, 55, 0.32)',
38
- });
39
-
40
- declare var __DEV__: boolean;
41
- declare var __NODE__: boolean;
42
- declare var __BROWSER__: boolean;
@@ -1,50 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _colorTokens = _interopRequireDefault(require("./color-tokens.js"));
9
-
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
-
12
- /*
13
- Copyright (c) Uber Technologies, Inc.
14
-
15
- This source code is licensed under the MIT license found in the
16
- LICENSE file in the root directory of this source tree.
17
- */
18
-
19
- /* ---- DEPRECATED ---- */
20
- var _default = function _default() {
21
- var themePrimitives = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _colorTokens.default;
22
- return {
23
- // TODO(#2318) Remove Legacy Semantic Colors values in the next v11 major
24
- // since it's not used in the component specific tokens
25
- // and we ship semantic tokens separately
26
-
27
- /* ---- Legacy Semantic Colors ---- */
28
- // Font Color
29
- colorPrimary: themePrimitives.black,
30
- colorSecondary: themePrimitives.mono800,
31
- // Background
32
- background: themePrimitives.white,
33
- backgroundAlt: themePrimitives.white,
34
- backgroundInv: themePrimitives.primary,
35
- // Foreground
36
- foreground: themePrimitives.black,
37
- foregroundAlt: themePrimitives.mono800,
38
- foregroundInv: themePrimitives.white,
39
- // Borders
40
- border: themePrimitives.mono500,
41
- borderAlt: themePrimitives.mono600,
42
- borderFocus: themePrimitives.primary,
43
- borderError: themePrimitives.negative,
44
- // Shadow
45
- shadowFocus: 'rgba(39, 110, 241, 0.32)',
46
- shadowError: 'rgba(229, 73, 55, 0.32)'
47
- };
48
- };
49
-
50
- exports.default = _default;
@@ -1,42 +0,0 @@
1
- /*
2
- Copyright (c) Uber Technologies, Inc.
3
-
4
- This source code is licensed under the MIT license found in the
5
- LICENSE file in the root directory of this source tree.
6
- */
7
- // @flow
8
- import colorTokens from './color-tokens.js';
9
- import type { ColorTokensT, DeprecatedSemanticColorTokensT } from '../types.js';
10
-
11
- /* ---- DEPRECATED ---- */
12
- export default (themePrimitives: ColorTokensT = colorTokens): DeprecatedSemanticColorTokensT => ({
13
- // TODO(#2318) Remove Legacy Semantic Colors values in the next v11 major
14
- // since it's not used in the component specific tokens
15
- // and we ship semantic tokens separately
16
-
17
- /* ---- Legacy Semantic Colors ---- */
18
-
19
- // Font Color
20
- colorPrimary: themePrimitives.black,
21
- colorSecondary: themePrimitives.mono800,
22
- // Background
23
- background: themePrimitives.white,
24
- backgroundAlt: themePrimitives.white,
25
- backgroundInv: themePrimitives.primary,
26
- // Foreground
27
- foreground: themePrimitives.black,
28
- foregroundAlt: themePrimitives.mono800,
29
- foregroundInv: themePrimitives.white,
30
- // Borders
31
- border: themePrimitives.mono500,
32
- borderAlt: themePrimitives.mono600,
33
- borderFocus: themePrimitives.primary,
34
- borderError: themePrimitives.negative,
35
- // Shadow
36
- shadowFocus: 'rgba(39, 110, 241, 0.32)',
37
- shadowError: 'rgba(229, 73, 55, 0.32)',
38
- });
39
-
40
- declare var __DEV__: boolean;
41
- declare var __NODE__: boolean;
42
- declare var __BROWSER__: boolean;