carbon-react 105.1.1 → 106.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/esm/__internal__/tooltip-provider/index.d.ts +19 -24
  2. package/esm/__internal__/tooltip-provider/index.js +1 -11
  3. package/esm/__internal__/utils/helpers/browser/index.d.ts +15 -1
  4. package/esm/__internal__/utils/helpers/browser/index.js +33 -1
  5. package/esm/__internal__/utils/helpers/browser-type-check/index.d.ts +7 -1
  6. package/esm/__internal__/utils/helpers/browser-type-check/index.js +8 -1
  7. package/esm/__internal__/utils/helpers/events/composedPath.d.ts +1 -1
  8. package/esm/__internal__/utils/helpers/events/events.d.ts +132 -31
  9. package/esm/__internal__/utils/helpers/events/events.js +10 -125
  10. package/esm/__internal__/utils/helpers/guid/index.d.ts +5 -0
  11. package/esm/__internal__/utils/helpers/guid/{guid.js → index.js} +0 -2
  12. package/esm/__internal__/utils/helpers/tags/tags-specs/tags-specs.d.ts +4 -2
  13. package/esm/__internal__/utils/helpers/tags/tags-specs/tags-specs.js +2 -1
  14. package/esm/__internal__/utils/helpers/tags/tags.d.ts +10 -6
  15. package/esm/__internal__/utils/helpers/tags/tags.js +2 -6
  16. package/esm/__internal__/utils/helpers/useUniqueId/index.d.ts +2 -0
  17. package/esm/__internal__/utils/helpers/useUniqueId/index.js +7 -0
  18. package/esm/__internal__/utils/logger/index.d.ts +5 -1
  19. package/esm/__internal__/utils/logger/index.js +25 -1
  20. package/esm/__spec_helper__/mock-match-media.d.ts +3 -1
  21. package/esm/components/app-wrapper/app-wrapper.component.d.ts +4 -0
  22. package/esm/components/app-wrapper/app-wrapper.component.js +5 -3
  23. package/esm/components/badge/badge.style.d.ts +4 -2
  24. package/esm/components/button/button-types.style.d.ts +1 -2
  25. package/esm/components/button/button-types.style.js +3 -1
  26. package/esm/components/button/button.component.d.ts +67 -36
  27. package/esm/components/button/button.component.js +3314 -165
  28. package/esm/components/button/button.config.d.ts +4 -3
  29. package/esm/components/button/button.style.d.ts +6 -8
  30. package/esm/components/button/button.style.js +51 -95
  31. package/esm/components/button/index.d.ts +2 -2
  32. package/esm/components/confirm/confirm.component.js +1 -1
  33. package/esm/components/dialog/dialog.component.js +1 -1
  34. package/esm/components/dialog-full-screen/dialog-full-screen.component.js +1 -1
  35. package/esm/components/duelling-picklist/picklist-group/picklist-group.style.d.ts +1 -2
  36. package/esm/components/duelling-picklist/picklist-item/picklist-item.style.d.ts +1 -2
  37. package/esm/components/fieldset/fieldset.component.d.ts +6 -1
  38. package/esm/components/fieldset/fieldset.component.js +14 -15
  39. package/esm/components/heading/heading.component.d.ts +5 -0
  40. package/esm/components/icon/index.d.ts +1 -0
  41. package/esm/components/multi-action-button/multi-action-button.component.d.ts +3 -1
  42. package/esm/components/multi-action-button/multi-action-button.component.js +7 -5
  43. package/esm/components/multi-action-button/multi-action-button.d.ts +4 -2
  44. package/esm/components/multi-step-wizard/multi-step-wizard.d.ts +22 -0
  45. package/esm/components/multi-step-wizard/step/step.d.ts +6 -0
  46. package/esm/components/multi-step-wizard/step/step.style.d.ts +4 -2
  47. package/esm/components/portrait/portrait-initials.component.js +1 -1
  48. package/esm/components/radio-button/radio-button-svg.component.js +29 -16
  49. package/esm/components/scrollable-list/scrollable-list.component.d.ts +8 -0
  50. package/esm/components/select/option/index.d.ts +1 -1
  51. package/esm/components/select/select-list/select-list.component.js +1 -1
  52. package/esm/components/select/select-textbox/select-textbox.component.js +1 -1
  53. package/esm/components/split-button/split-button-toggle.style.d.ts +2 -6
  54. package/esm/components/split-button/split-button.component.d.ts +3 -1
  55. package/esm/components/split-button/split-button.component.js +7 -4
  56. package/esm/components/split-button/split-button.d.ts +5 -2
  57. package/esm/components/textbox/textbox.component.d.ts +1 -2
  58. package/esm/components/textbox/textbox.component.js +7 -6
  59. package/esm/components/tooltip/index.d.ts +2 -1
  60. package/esm/components/tooltip/tooltip-pointer.style.d.ts +10 -1
  61. package/esm/components/tooltip/tooltip-pointer.style.js +5 -12
  62. package/esm/components/tooltip/tooltip.component.d.ts +33 -2
  63. package/esm/components/tooltip/tooltip.component.js +255 -110
  64. package/esm/components/tooltip/tooltip.config.d.ts +2 -1
  65. package/esm/components/tooltip/tooltip.style.d.ts +7 -2
  66. package/esm/components/tooltip/tooltip.style.js +7 -21
  67. package/esm/components/typography/typography.component.d.ts +1 -1
  68. package/esm/hooks/__internal__/useCharacterCount/index.d.ts +1 -2
  69. package/esm/hooks/__internal__/useCharacterCount/index.js +1 -18
  70. package/esm/hooks/__internal__/useCharacterCount/useCharacterCount.d.ts +3 -0
  71. package/esm/hooks/__internal__/useCharacterCount/useCharacterCount.js +24 -0
  72. package/esm/hooks/__internal__/useInputAccessibility/index.d.ts +1 -24
  73. package/esm/hooks/__internal__/useInputAccessibility/useInputAccessibility.d.ts +11 -11
  74. package/esm/hooks/__internal__/useInputAccessibility/useInputAccessibility.js +1 -3
  75. package/esm/hooks/__internal__/useIsAboveBreakpoint/index.d.ts +1 -1
  76. package/esm/hooks/__internal__/useIsAboveBreakpoint/index.js +1 -6
  77. package/esm/hooks/__internal__/useIsAboveBreakpoint/useIsAboveBreakpoint.d.ts +1 -0
  78. package/esm/hooks/__internal__/useIsAboveBreakpoint/useIsAboveBreakpoint.js +6 -0
  79. package/esm/hooks/__internal__/useLocale/index.d.ts +1 -1
  80. package/esm/hooks/__internal__/useLocale/index.js +1 -5
  81. package/esm/hooks/__internal__/useLocale/useLocale.d.ts +1 -0
  82. package/esm/hooks/__internal__/useLocale/useLocale.js +5 -0
  83. package/esm/hooks/__internal__/useResizeObserver/index.d.ts +1 -10
  84. package/esm/hooks/__internal__/useResizeObserver/index.js +1 -23
  85. package/esm/hooks/__internal__/useResizeObserver/useResizeObserver.d.ts +8 -0
  86. package/esm/hooks/__internal__/useResizeObserver/useResizeObserver.js +29 -0
  87. package/esm/hooks/__internal__/useScrollBlock/index.d.ts +1 -4
  88. package/esm/hooks/__internal__/useScrollBlock/scroll-block-manager.d.ts +23 -9
  89. package/esm/hooks/__internal__/useScrollBlock/scroll-block-manager.js +24 -12
  90. package/esm/hooks/__internal__/useScrollBlock/useScrollBlock.d.ts +2 -2
  91. package/esm/hooks/__internal__/useScrollBlock/useScrollBlock.js +3 -5
  92. package/esm/hooks/useMediaQuery/index.d.ts +1 -1
  93. package/esm/hooks/useMediaQuery/index.js +1 -19
  94. package/esm/hooks/useMediaQuery/useMediaQuery.d.ts +1 -0
  95. package/esm/hooks/useMediaQuery/useMediaQuery.js +19 -0
  96. package/esm/locales/en-gb.d.ts +3 -5
  97. package/esm/locales/en-gb.js +5 -4
  98. package/esm/locales/index.d.ts +1 -1
  99. package/esm/locales/index.js +2 -0
  100. package/esm/locales/locale.d.ts +99 -105
  101. package/esm/locales/locale.js +1 -0
  102. package/esm/locales/pl-pl.d.ts +3 -5
  103. package/esm/locales/pl-pl.js +5 -4
  104. package/esm/style/{fonts → assets}/carbon-icons-webfont.woff +0 -0
  105. package/esm/style/fonts.css +30 -0
  106. package/esm/style/global-style.js +1 -1
  107. package/esm/style/themes/base/base-theme.config.d.ts +17 -8
  108. package/esm/style/themes/sage/index.d.ts +17 -8
  109. package/lib/__internal__/tooltip-provider/index.d.ts +19 -24
  110. package/lib/__internal__/tooltip-provider/index.js +2 -13
  111. package/lib/__internal__/utils/helpers/browser/index.d.ts +15 -1
  112. package/lib/__internal__/utils/helpers/browser/index.js +33 -8
  113. package/lib/__internal__/utils/helpers/browser-type-check/index.d.ts +7 -1
  114. package/lib/__internal__/utils/helpers/browser-type-check/index.js +10 -21
  115. package/lib/__internal__/utils/helpers/events/composedPath.d.ts +1 -1
  116. package/lib/__internal__/utils/helpers/events/events.d.ts +132 -31
  117. package/lib/__internal__/utils/helpers/events/events.js +10 -125
  118. package/lib/__internal__/utils/helpers/guid/index.d.ts +5 -0
  119. package/lib/__internal__/utils/helpers/guid/{guid.js → index.js} +0 -2
  120. package/lib/__internal__/utils/helpers/guid/package.json +5 -2
  121. package/lib/__internal__/utils/helpers/tags/tags-specs/tags-specs.d.ts +4 -2
  122. package/lib/__internal__/utils/helpers/tags/tags-specs/tags-specs.js +2 -1
  123. package/lib/__internal__/utils/helpers/tags/tags.d.ts +10 -6
  124. package/lib/__internal__/utils/helpers/tags/tags.js +2 -6
  125. package/lib/__internal__/utils/helpers/useUniqueId/index.d.ts +2 -0
  126. package/lib/__internal__/utils/helpers/useUniqueId/index.js +20 -0
  127. package/lib/__internal__/utils/helpers/useUniqueId/package.json +6 -0
  128. package/lib/__internal__/utils/logger/index.d.ts +5 -1
  129. package/lib/__internal__/utils/logger/index.js +26 -8
  130. package/lib/__spec_helper__/mock-match-media.d.ts +3 -1
  131. package/lib/components/app-wrapper/app-wrapper.component.d.ts +4 -0
  132. package/lib/components/app-wrapper/app-wrapper.component.js +5 -4
  133. package/lib/components/badge/badge.style.d.ts +4 -2
  134. package/lib/components/button/button-types.style.d.ts +1 -2
  135. package/lib/components/button/button-types.style.js +0 -1
  136. package/lib/components/button/button.component.d.ts +67 -36
  137. package/lib/components/button/button.component.js +3381 -172
  138. package/lib/components/button/button.config.d.ts +4 -3
  139. package/lib/components/button/button.style.d.ts +6 -8
  140. package/lib/components/button/button.style.js +52 -101
  141. package/lib/components/button/index.d.ts +2 -2
  142. package/lib/components/confirm/confirm.component.js +1 -1
  143. package/lib/components/dialog/dialog.component.js +1 -1
  144. package/lib/components/dialog-full-screen/dialog-full-screen.component.js +1 -1
  145. package/lib/components/duelling-picklist/picklist-group/picklist-group.style.d.ts +1 -2
  146. package/lib/components/duelling-picklist/picklist-item/picklist-item.style.d.ts +1 -2
  147. package/lib/components/fieldset/fieldset.component.d.ts +6 -1
  148. package/lib/components/fieldset/fieldset.component.js +14 -16
  149. package/lib/components/heading/heading.component.d.ts +5 -0
  150. package/lib/components/icon/index.d.ts +1 -0
  151. package/lib/components/multi-action-button/multi-action-button.component.d.ts +3 -1
  152. package/lib/components/multi-action-button/multi-action-button.component.js +6 -4
  153. package/lib/components/multi-action-button/multi-action-button.d.ts +4 -2
  154. package/lib/components/multi-step-wizard/multi-step-wizard.d.ts +22 -0
  155. package/lib/components/multi-step-wizard/step/step.d.ts +6 -0
  156. package/lib/components/multi-step-wizard/step/step.style.d.ts +4 -2
  157. package/lib/components/portrait/portrait-initials.component.js +1 -1
  158. package/lib/components/radio-button/radio-button-svg.component.js +38 -20
  159. package/lib/components/scrollable-list/scrollable-list.component.d.ts +8 -0
  160. package/lib/components/select/option/index.d.ts +1 -1
  161. package/lib/components/select/select-list/select-list.component.js +1 -1
  162. package/lib/components/select/select-textbox/select-textbox.component.js +1 -1
  163. package/lib/components/split-button/split-button-toggle.style.d.ts +2 -6
  164. package/lib/components/split-button/split-button.component.d.ts +3 -1
  165. package/lib/components/split-button/split-button.component.js +6 -3
  166. package/lib/components/split-button/split-button.d.ts +5 -2
  167. package/lib/components/textbox/textbox.component.d.ts +1 -2
  168. package/lib/components/textbox/textbox.component.js +7 -8
  169. package/lib/components/tooltip/index.d.ts +2 -1
  170. package/lib/components/tooltip/tooltip-pointer.style.d.ts +10 -1
  171. package/lib/components/tooltip/tooltip-pointer.style.js +7 -15
  172. package/lib/components/tooltip/tooltip.component.d.ts +33 -2
  173. package/lib/components/tooltip/tooltip.component.js +221 -130
  174. package/lib/components/tooltip/tooltip.config.d.ts +2 -1
  175. package/lib/components/tooltip/tooltip.style.d.ts +7 -2
  176. package/lib/components/tooltip/tooltip.style.js +7 -22
  177. package/lib/components/typography/typography.component.d.ts +1 -1
  178. package/lib/components/vertical-divider/vertical-divider.component.js +3 -0
  179. package/lib/hooks/__internal__/useCharacterCount/index.d.ts +1 -2
  180. package/lib/hooks/__internal__/useCharacterCount/index.js +8 -27
  181. package/lib/hooks/__internal__/useCharacterCount/useCharacterCount.d.ts +3 -0
  182. package/lib/hooks/__internal__/useCharacterCount/useCharacterCount.js +40 -0
  183. package/lib/hooks/__internal__/useInputAccessibility/index.d.ts +1 -24
  184. package/lib/hooks/__internal__/useInputAccessibility/useInputAccessibility.d.ts +11 -11
  185. package/lib/hooks/__internal__/useInputAccessibility/useInputAccessibility.js +1 -3
  186. package/lib/hooks/__internal__/useIsAboveBreakpoint/index.d.ts +1 -1
  187. package/lib/hooks/__internal__/useIsAboveBreakpoint/index.js +8 -9
  188. package/lib/hooks/__internal__/useIsAboveBreakpoint/useIsAboveBreakpoint.d.ts +1 -0
  189. package/lib/hooks/__internal__/useIsAboveBreakpoint/useIsAboveBreakpoint.js +16 -0
  190. package/lib/hooks/__internal__/useLocale/index.d.ts +1 -1
  191. package/lib/hooks/__internal__/useLocale/index.js +8 -9
  192. package/lib/hooks/__internal__/useLocale/useLocale.d.ts +1 -0
  193. package/lib/hooks/__internal__/useLocale/useLocale.js +16 -0
  194. package/lib/hooks/__internal__/useResizeObserver/index.d.ts +1 -10
  195. package/lib/hooks/__internal__/useResizeObserver/index.js +8 -24
  196. package/lib/hooks/__internal__/useResizeObserver/useResizeObserver.d.ts +8 -0
  197. package/lib/hooks/__internal__/useResizeObserver/useResizeObserver.js +37 -0
  198. package/lib/hooks/__internal__/useScrollBlock/index.d.ts +1 -4
  199. package/lib/hooks/__internal__/useScrollBlock/scroll-block-manager.d.ts +23 -9
  200. package/lib/hooks/__internal__/useScrollBlock/scroll-block-manager.js +24 -12
  201. package/lib/hooks/__internal__/useScrollBlock/useScrollBlock.d.ts +2 -2
  202. package/lib/hooks/__internal__/useScrollBlock/useScrollBlock.js +3 -5
  203. package/lib/hooks/useMediaQuery/index.d.ts +1 -1
  204. package/lib/hooks/useMediaQuery/index.js +8 -25
  205. package/lib/hooks/useMediaQuery/useMediaQuery.d.ts +1 -0
  206. package/lib/hooks/useMediaQuery/useMediaQuery.js +32 -0
  207. package/lib/locales/en-gb.d.ts +3 -5
  208. package/lib/locales/en-gb.js +2 -1
  209. package/lib/locales/index.d.ts +1 -1
  210. package/lib/locales/index.js +23 -0
  211. package/lib/locales/locale.d.ts +99 -105
  212. package/lib/locales/locale.js +5 -0
  213. package/lib/{__internal__/utils/ether → locales}/package.json +1 -1
  214. package/lib/locales/pl-pl.d.ts +3 -5
  215. package/lib/locales/pl-pl.js +2 -1
  216. package/lib/style/{fonts → assets}/carbon-icons-webfont.woff +0 -0
  217. package/lib/style/fonts.css +30 -0
  218. package/lib/style/global-style.js +1 -1
  219. package/lib/style/themes/base/base-theme.config.d.ts +17 -8
  220. package/lib/style/themes/sage/index.d.ts +17 -8
  221. package/package.json +10 -5
  222. package/esm/__internal__/utils/ether/ether.d.ts +0 -19
  223. package/esm/__internal__/utils/ether/ether.js +0 -29
  224. package/esm/__internal__/utils/ether/index.d.ts +0 -1
  225. package/esm/__internal__/utils/ether/index.js +0 -1
  226. package/esm/__internal__/utils/helpers/browser/browser.d.ts +0 -17
  227. package/esm/__internal__/utils/helpers/browser/browser.js +0 -198
  228. package/esm/__internal__/utils/helpers/browser-type-check/browser-type-check.d.ts +0 -7
  229. package/esm/__internal__/utils/helpers/browser-type-check/browser-type-check.js +0 -14
  230. package/esm/__internal__/utils/helpers/guid/__spec__.d.ts +0 -1
  231. package/esm/__internal__/utils/helpers/guid/__spec__.js +0 -10
  232. package/esm/__internal__/utils/helpers/guid/guid.d.ts +0 -2
  233. package/esm/__internal__/utils/helpers/guid/package.json +0 -3
  234. package/esm/__internal__/utils/helpers/immutable/__spec__.d.ts +0 -1
  235. package/esm/__internal__/utils/helpers/immutable/__spec__.js +0 -117
  236. package/esm/__internal__/utils/helpers/immutable/immutable.d.ts +0 -4
  237. package/esm/__internal__/utils/helpers/immutable/immutable.js +0 -36
  238. package/esm/__internal__/utils/helpers/immutable/package.json +0 -4
  239. package/esm/__internal__/utils/helpers/with-unique-id-props/index.d.ts +0 -1
  240. package/esm/__internal__/utils/helpers/with-unique-id-props/index.js +0 -1
  241. package/esm/__internal__/utils/helpers/with-unique-id-props/with-unique-id-props.hoc.d.ts +0 -7
  242. package/esm/__internal__/utils/helpers/with-unique-id-props/with-unique-id-props.hoc.js +0 -82
  243. package/esm/__internal__/utils/logger/logger.d.ts +0 -9
  244. package/esm/__internal__/utils/logger/logger.js +0 -71
  245. package/esm/components/button/button.d.ts +0 -85
  246. package/esm/components/tooltip/tooltip.d.ts +0 -40
  247. package/lib/__internal__/utils/ether/ether.d.ts +0 -19
  248. package/lib/__internal__/utils/ether/ether.js +0 -33
  249. package/lib/__internal__/utils/ether/index.d.ts +0 -1
  250. package/lib/__internal__/utils/ether/index.js +0 -18
  251. package/lib/__internal__/utils/helpers/browser/browser.d.ts +0 -17
  252. package/lib/__internal__/utils/helpers/browser/browser.js +0 -213
  253. package/lib/__internal__/utils/helpers/browser-type-check/browser-type-check.d.ts +0 -7
  254. package/lib/__internal__/utils/helpers/browser-type-check/browser-type-check.js +0 -26
  255. package/lib/__internal__/utils/helpers/guid/__spec__.d.ts +0 -1
  256. package/lib/__internal__/utils/helpers/guid/__spec__.js +0 -15
  257. package/lib/__internal__/utils/helpers/guid/guid.d.ts +0 -2
  258. package/lib/__internal__/utils/helpers/immutable/__spec__.d.ts +0 -1
  259. package/lib/__internal__/utils/helpers/immutable/__spec__.js +0 -135
  260. package/lib/__internal__/utils/helpers/immutable/immutable.d.ts +0 -4
  261. package/lib/__internal__/utils/helpers/immutable/immutable.js +0 -46
  262. package/lib/__internal__/utils/helpers/immutable/package.json +0 -4
  263. package/lib/__internal__/utils/helpers/with-unique-id-props/index.d.ts +0 -1
  264. package/lib/__internal__/utils/helpers/with-unique-id-props/index.js +0 -15
  265. package/lib/__internal__/utils/helpers/with-unique-id-props/package.json +0 -6
  266. package/lib/__internal__/utils/helpers/with-unique-id-props/with-unique-id-props.hoc.d.ts +0 -7
  267. package/lib/__internal__/utils/helpers/with-unique-id-props/with-unique-id-props.hoc.js +0 -96
  268. package/lib/__internal__/utils/logger/logger.d.ts +0 -9
  269. package/lib/__internal__/utils/logger/logger.js +0 -78
  270. package/lib/components/button/button.d.ts +0 -85
  271. package/lib/components/tooltip/tooltip.d.ts +0 -40
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = useMediaQuery;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+
12
+ function useMediaQuery(queryInput) {
13
+ const query = queryInput.replace(/^@media( ?)/m, "");
14
+
15
+ const [match, setMatch] = _react.default.useState(() => false);
16
+
17
+ _react.default.useEffect(() => {
18
+ const queryList = window.matchMedia(query);
19
+
20
+ const updateMatch = () => {
21
+ setMatch(queryList.matches);
22
+ };
23
+
24
+ updateMatch();
25
+ queryList.addListener(updateMatch);
26
+ return () => {
27
+ queryList.removeListener(updateMatch);
28
+ };
29
+ }, [query]);
30
+
31
+ return match;
32
+ }
@@ -1,5 +1,3 @@
1
- import Locale from ".";
2
-
3
- declare const EnGb: Locale;
4
-
5
- export default EnGb;
1
+ import Locale from "./locale";
2
+ declare const enGB: Locale;
3
+ export default enGB;
@@ -9,7 +9,7 @@ var _dateFnsLocales = require("./date-fns-locales");
9
9
 
10
10
  const isSingular = count => (typeof count === "string" ? parseInt(count) : count) === 1;
11
11
 
12
- var _default = {
12
+ const enGB = {
13
13
  locale: () => "en-GB",
14
14
  actions: {
15
15
  edit: () => "Edit",
@@ -136,4 +136,5 @@ var _default = {
136
136
  }
137
137
  }
138
138
  };
139
+ var _default = enGB;
139
140
  exports.default = _default;
@@ -1,3 +1,3 @@
1
- export { default } from "./locale";
1
+ export type { default } from "./locale";
2
2
  export { default as EnGb } from "./en-gb";
3
3
  export { default as PlPl } from "./pl-pl";
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "EnGb", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _enGb.default;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "PlPl", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _plPl.default;
16
+ }
17
+ });
18
+
19
+ var _enGb = _interopRequireDefault(require("./en-gb"));
20
+
21
+ var _plPl = _interopRequireDefault(require("./pl-pl"));
22
+
23
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -1,111 +1,105 @@
1
1
  import { Locale as DateFnsLocale } from "date-fns";
2
-
3
2
  interface Locale {
4
- locale: () => string;
5
- actions: {
6
- edit: () => string;
7
- delete: () => string;
8
- };
9
- actionPopover: {
10
- ariaLabel: () => string;
11
- };
12
- batchSelection: {
13
- selected: (count: number | string) => string;
14
- };
15
- confirm: {
16
- no: () => string;
17
- yes: () => string;
18
- };
19
- date: {
20
- dateFnsLocale: () => DateFnsLocale;
21
- };
22
- dialog: {
23
- ariaLabels: {
24
- close: () => string;
25
- };
26
- };
27
- dialogFullScreen: {
28
- ariaLabels: {
29
- close: () => string;
30
- };
31
- };
32
- errors: {
33
- messages: {
34
- formSummary: (
35
- errors: number,
36
- warnings: number,
37
- type: string
38
- ) => [string, string] | null;
39
- };
40
- };
41
- message: {
42
- closeButtonAriaLabel: () => string;
43
- };
44
- numeralDate: {
45
- validation: {
46
- day: () => string;
47
- month: () => string;
48
- year: () => string;
49
- };
50
- };
51
- pager: {
52
- show: () => string;
53
- records: (count: number | string, showNumber: boolean) => string;
54
- first: () => string;
55
- last: () => string;
56
- next: () => string;
57
- previous: () => string;
58
- pageX: () => string;
59
- ofY: (count: string | number) => string;
60
- };
61
- select: {
62
- actionButtonText: () => string;
63
- placeholder: () => string;
64
- noResultsForTerm: (term: string) => string;
65
- };
66
- link: {
67
- skipLinkLabel: () => string;
68
- };
69
- sidebar: {
70
- ariaLabels: {
71
- close: () => string;
72
- };
73
- };
74
- switch: {
75
- on: () => string;
76
- off: () => string;
77
- };
78
- textEditor: {
79
- tooltipMessages: {
80
- bold: () => string;
81
- italic: () => string;
82
- bulletList: () => string;
83
- numberList: () => string;
84
- };
85
- ariaLabels: {
86
- bold: () => string;
87
- italic: () => string;
88
- bulletList: () => string;
89
- numberList: () => string;
90
- };
91
- };
92
- tileSelect: {
93
- deselect: () => string;
94
- };
95
- toast: {
96
- ariaLabels: {
97
- close: () => string;
98
- };
99
- };
100
- wizards: {
101
- multiStep: {
102
- buttons: {
103
- submit: () => string;
3
+ locale: () => string;
4
+ actions: {
5
+ edit: () => string;
6
+ delete: () => string;
7
+ };
8
+ actionPopover: {
9
+ ariaLabel: () => string;
10
+ };
11
+ batchSelection: {
12
+ selected: (count: number | string) => string;
13
+ };
14
+ confirm: {
15
+ no: () => string;
16
+ yes: () => string;
17
+ };
18
+ date: {
19
+ dateFnsLocale: () => DateFnsLocale;
20
+ };
21
+ dialog: {
22
+ ariaLabels: {
23
+ close: () => string;
24
+ };
25
+ };
26
+ dialogFullScreen: {
27
+ ariaLabels: {
28
+ close: () => string;
29
+ };
30
+ };
31
+ errors: {
32
+ messages: {
33
+ formSummary: (errors: number, warnings: number, type: string) => [string, string] | null;
34
+ };
35
+ };
36
+ message: {
37
+ closeButtonAriaLabel: () => string;
38
+ };
39
+ numeralDate: {
40
+ validation: {
41
+ day: () => string;
42
+ month: () => string;
43
+ year: () => string;
44
+ };
45
+ };
46
+ pager: {
47
+ show: () => string;
48
+ records: (count: number | string, showNumber: boolean) => string;
49
+ first: () => string;
50
+ last: () => string;
104
51
  next: () => string;
105
- back: () => string;
106
- };
52
+ previous: () => string;
53
+ pageX: () => string;
54
+ ofY: (count: string | number) => string;
55
+ };
56
+ select: {
57
+ actionButtonText: () => string;
58
+ placeholder: () => string;
59
+ noResultsForTerm: (term: string) => string;
60
+ };
61
+ link: {
62
+ skipLinkLabel: () => string;
63
+ };
64
+ sidebar: {
65
+ ariaLabels: {
66
+ close: () => string;
67
+ };
68
+ };
69
+ switch: {
70
+ on: () => string;
71
+ off: () => string;
72
+ };
73
+ textEditor: {
74
+ tooltipMessages: {
75
+ bold: () => string;
76
+ italic: () => string;
77
+ bulletList: () => string;
78
+ numberList: () => string;
79
+ };
80
+ ariaLabels: {
81
+ bold: () => string;
82
+ italic: () => string;
83
+ bulletList: () => string;
84
+ numberList: () => string;
85
+ };
86
+ };
87
+ tileSelect: {
88
+ deselect: () => string;
89
+ };
90
+ toast: {
91
+ ariaLabels: {
92
+ close: () => string;
93
+ };
94
+ };
95
+ wizards: {
96
+ multiStep: {
97
+ buttons: {
98
+ submit: () => string;
99
+ next: () => string;
100
+ back: () => string;
101
+ };
102
+ };
107
103
  };
108
- };
109
104
  }
110
-
111
105
  export default Locale;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "sideEffects": false,
3
- "module": "../../../../esm/__internal__/utils/ether/index.js",
3
+ "module": "../../esm/locales/index.js",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts"
6
6
  }
@@ -1,5 +1,3 @@
1
- import Locale from ".";
2
-
3
- declare const PlPl: Locale;
4
-
5
- export default PlPl;
1
+ import Locale from "./locale";
2
+ declare const plPL: Locale;
3
+ export default plPL;
@@ -9,7 +9,7 @@ var _dateFnsLocales = require("./date-fns-locales");
9
9
 
10
10
  const isSingular = count => (typeof count === "string" ? parseInt(count) : count) === 1;
11
11
 
12
- var _default = {
12
+ const plPL = {
13
13
  locale: () => "pl-PL",
14
14
  actions: {
15
15
  edit: () => "Edytuj",
@@ -134,4 +134,5 @@ var _default = {
134
134
  }
135
135
  }
136
136
  };
137
+ var _default = plPL;
137
138
  exports.default = _default;
@@ -0,0 +1,30 @@
1
+ @font-face{
2
+ font-family: "Sage UI";
3
+ src: url('https://fonts.sage.com/Sage_UI-Regular.woff2') format("woff2"), url('https://fonts.sage.com/Sage_UI-Regular.woff') format("woff");
4
+ font-weight: 400;
5
+ font-style: normal;
6
+ font-display: swap;
7
+ }
8
+
9
+ @font-face{
10
+ font-family: "Sage UI";
11
+ src: url('https://fonts.sage.com/Sage_UI-Medium.woff2') format("woff2"), url('https://fonts.sage.com/Sage_UI-Medium.woff') format("woff");
12
+ font-weight: 700;
13
+ font-style: normal;
14
+ font-display: swap;
15
+ }
16
+
17
+ @font-face{
18
+ font-family: "Sage UI";
19
+ src: url('https://fonts.sage.com/Sage_UI-Bold.woff2') format("woff2"), url('https://fonts.sage.com/Sage_UI-Bold.woff') format("woff");
20
+ font-weight: 900;
21
+ font-style: normal;
22
+ font-display: swap;
23
+ }
24
+
25
+ @font-face {
26
+ font-family: "CarbonIcons";
27
+ src: url("./assets/carbon-icons-webfont.woff") format("woff");
28
+ font-weight: normal;
29
+ font-style: normal;
30
+ }
@@ -10,7 +10,7 @@ var _styledComponents = require("styled-components");
10
10
  const GlobalStyle = (0, _styledComponents.createGlobalStyle)`
11
11
  body {
12
12
  color: rgba(0, 0, 0, 0.9);
13
- font-family: 'Lato';
13
+ font-family: "Sage UI", sans-serif;
14
14
  font-size: 14px;
15
15
  margin: 0px;
16
16
  padding: 0px;
@@ -54,6 +54,7 @@ declare function _default(palette: any): {
54
54
  colorsYin075: string;
55
55
  colorsYin090: string;
56
56
  colorsYang100: string;
57
+ colorsYang030: string;
57
58
  colorsYang080: string;
58
59
  colorsGray850: string;
59
60
  colorsGray900: string;
@@ -138,6 +139,8 @@ declare function _default(palette: any): {
138
139
  colorsUtilityReadOnly400: string;
139
140
  colorsUtilityReadOnly500: string;
140
141
  colorsUtilityReadOnly600: string;
142
+ colorsActionMajor350: string;
143
+ colorsActionMajor450: string;
141
144
  colorsActionMajor700: string;
142
145
  colorsActionMajor025: string;
143
146
  colorsActionMajorTransparent: string;
@@ -146,6 +149,7 @@ declare function _default(palette: any): {
146
149
  colorsActionMajorYin065: string;
147
150
  colorsActionMajorYin090: string;
148
151
  colorsActionMajorYang100: string;
152
+ colorsActionMajorYang030: string;
149
153
  colorsActionMinor100: string;
150
154
  colorsActionMinor150: string;
151
155
  colorsActionMinor200: string;
@@ -305,16 +309,10 @@ declare function _default(palette: any): {
305
309
  typographyDatePickerCalendarDateM: string;
306
310
  typographyDatePickerCalendarDayM: string;
307
311
  typographyDatePickerCalendarMonthM: string;
308
- typographyDialogTitleXs: string;
309
- typographyDialogTitleS: string;
310
- typographyDialogTitleMs: string;
311
312
  typographyDialogTitleM: string;
312
- typographyDialogTitleMl: string;
313
- typographyDialogTitleL: string;
314
- typographyDialogTitleXl: string;
315
- typographyDialogParagraphXs: string;
316
- typographyDialogParagraphS: string;
313
+ typographyDialogParagraphM: string;
317
314
  typographyDrawerTitleM: string;
315
+ typographyDrawerParagraphM: string;
318
316
  typographyFlashTextM: string;
319
317
  typographyFlashTextL: string;
320
318
  typographyFormFieldLabelXs: string;
@@ -349,6 +347,7 @@ declare function _default(palette: any): {
349
347
  typographyFormFieldCharacterCountS: string;
350
348
  typographyFormFieldCharacterCountM: string;
351
349
  typographyFormFieldCharacterCountL: string;
350
+ typographyLinkTextS: string;
352
351
  typographyLinkTextM: string;
353
352
  typographyLinkTextL: string;
354
353
  typographyMenuLabelM: string;
@@ -358,6 +357,7 @@ declare function _default(palette: any): {
358
357
  typographyMessageTextM: string;
359
358
  typographyMessageTextL: string;
360
359
  typographyPaginationLabelM: string;
360
+ typographyTileParagraphM: string;
361
361
  typographyPillLabelS: string;
362
362
  typographyPillLabelM: string;
363
363
  typographyPillLabelL: string;
@@ -390,13 +390,22 @@ declare function _default(palette: any): {
390
390
  typographySidebarTitleS: string;
391
391
  typographySidebarTitleM: string;
392
392
  typographySidebarTitleL: string;
393
+ typographySidebarParagraphM: string;
393
394
  typographyStepFlowCompleteLabelM: string;
394
395
  typographyStepFlowCurrentLabelM: string;
395
396
  typographyStepFlowIncompleteLabelM: string;
396
397
  typographySwitchOptionLabelM: string;
397
398
  typographySwitchOptionLabelL: string;
399
+ typographyTableHeaderTextXs: string;
400
+ typographyTableHeaderTextS: string;
398
401
  typographyTableHeaderTextM: string;
402
+ typographyTableHeaderTextL: string;
403
+ typographyTableHeaderTextXl: string;
404
+ typographyTableCellTextXs: string;
405
+ typographyTableCellTextS: string;
399
406
  typographyTableCellTextM: string;
407
+ typographyTableCellTextL: string;
408
+ typographyTableCellTextXl: string;
400
409
  typographyTooltipTextM: string;
401
410
  typographyTooltipTextL: string;
402
411
  opacity300: string;
@@ -10,6 +10,7 @@ declare var _default: {
10
10
  colorsYin075: string;
11
11
  colorsYin090: string;
12
12
  colorsYang100: string;
13
+ colorsYang030: string;
13
14
  colorsYang080: string;
14
15
  colorsGray850: string;
15
16
  colorsGray900: string;
@@ -95,6 +96,8 @@ declare var _default: {
95
96
  colorsUtilityReadOnly500: string;
96
97
  colorsUtilityReadOnly600: string;
97
98
  colorsActionMajor150: string;
99
+ colorsActionMajor350: string;
100
+ colorsActionMajor450: string;
98
101
  colorsActionMajor500: string;
99
102
  colorsActionMajor600: string;
100
103
  colorsActionMajor700: string;
@@ -105,6 +108,7 @@ declare var _default: {
105
108
  colorsActionMajorYin065: string;
106
109
  colorsActionMajorYin090: string;
107
110
  colorsActionMajorYang100: string;
111
+ colorsActionMajorYang030: string;
108
112
  colorsActionMinor100: string;
109
113
  colorsActionMinor150: string;
110
114
  colorsActionMinor200: string;
@@ -270,16 +274,10 @@ declare var _default: {
270
274
  typographyDatePickerCalendarDateM: string;
271
275
  typographyDatePickerCalendarDayM: string;
272
276
  typographyDatePickerCalendarMonthM: string;
273
- typographyDialogTitleXs: string;
274
- typographyDialogTitleS: string;
275
- typographyDialogTitleMs: string;
276
277
  typographyDialogTitleM: string;
277
- typographyDialogTitleMl: string;
278
- typographyDialogTitleL: string;
279
- typographyDialogTitleXl: string;
280
- typographyDialogParagraphXs: string;
281
- typographyDialogParagraphS: string;
278
+ typographyDialogParagraphM: string;
282
279
  typographyDrawerTitleM: string;
280
+ typographyDrawerParagraphM: string;
283
281
  typographyFlashTextM: string;
284
282
  typographyFlashTextL: string;
285
283
  typographyFormFieldLabelXs: string;
@@ -314,6 +312,7 @@ declare var _default: {
314
312
  typographyFormFieldCharacterCountS: string;
315
313
  typographyFormFieldCharacterCountM: string;
316
314
  typographyFormFieldCharacterCountL: string;
315
+ typographyLinkTextS: string;
317
316
  typographyLinkTextM: string;
318
317
  typographyLinkTextL: string;
319
318
  typographyMenuLabelM: string;
@@ -323,6 +322,7 @@ declare var _default: {
323
322
  typographyMessageTextM: string;
324
323
  typographyMessageTextL: string;
325
324
  typographyPaginationLabelM: string;
325
+ typographyTileParagraphM: string;
326
326
  typographyPillLabelS: string;
327
327
  typographyPillLabelM: string;
328
328
  typographyPillLabelL: string;
@@ -355,13 +355,22 @@ declare var _default: {
355
355
  typographySidebarTitleS: string;
356
356
  typographySidebarTitleM: string;
357
357
  typographySidebarTitleL: string;
358
+ typographySidebarParagraphM: string;
358
359
  typographyStepFlowCompleteLabelM: string;
359
360
  typographyStepFlowCurrentLabelM: string;
360
361
  typographyStepFlowIncompleteLabelM: string;
361
362
  typographySwitchOptionLabelM: string;
362
363
  typographySwitchOptionLabelL: string;
364
+ typographyTableHeaderTextXs: string;
365
+ typographyTableHeaderTextS: string;
363
366
  typographyTableHeaderTextM: string;
367
+ typographyTableHeaderTextL: string;
368
+ typographyTableHeaderTextXl: string;
369
+ typographyTableCellTextXs: string;
370
+ typographyTableCellTextS: string;
364
371
  typographyTableCellTextM: string;
372
+ typographyTableCellTextL: string;
373
+ typographyTableCellTextXl: string;
365
374
  typographyTooltipTextM: string;
366
375
  typographyTooltipTextL: string;
367
376
  opacity300: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "105.1.1",
3
+ "version": "106.0.0",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "engineStrict": true,
6
6
  "engines": {
@@ -51,6 +51,7 @@
51
51
  },
52
52
  "homepage": "https://carbon.sage.com",
53
53
  "peerDependencies": {
54
+ "@sage/design-tokens": "^2.3.0",
54
55
  "draft-js": "^0.11.5",
55
56
  "react": "^16.14.0",
56
57
  "react-dom": "^16.14.0",
@@ -68,7 +69,8 @@
68
69
  "@commitlint/cli": "^11.0.0",
69
70
  "@commitlint/config-conventional": "^11.0.0",
70
71
  "@cypress/react": "^5.12.0",
71
- "@cypress/webpack-dev-server": "^1.8.0",
72
+ "@cypress/webpack-dev-server": "^1.8.4",
73
+ "@sage/design-tokens": "^2.3.0",
72
74
  "@semantic-release/changelog": "^6.0.1",
73
75
  "@semantic-release/exec": "^6.0.2",
74
76
  "@semantic-release/git": "^10.0.1",
@@ -88,10 +90,13 @@
88
90
  "@testing-library/react": "^12.1.3",
89
91
  "@types/enzyme": "^3.10.3",
90
92
  "@types/enzyme-adapter-react-16": "^1.0.5",
93
+ "@types/invariant": "^2.2.35",
91
94
  "@types/jest": "^26.0.19",
95
+ "@types/lodash": "^4.14.179",
92
96
  "@types/node": "10.12.18",
93
97
  "@types/react": "16.9.56",
94
98
  "@types/react-dom": "16.9.8",
99
+ "@types/react-test-renderer": "^17.0.1",
95
100
  "@types/styled-components": "^5.1.9",
96
101
  "@types/uuid": "^8.3.3",
97
102
  "@typescript-eslint/eslint-plugin": "^5.4.0",
@@ -151,15 +156,15 @@
151
156
  "sprintf-js": "^1.1.2",
152
157
  "styled-components": "^4.4.1",
153
158
  "ts-node": "^10.4.0",
154
- "typescript": "^4.3.5",
159
+ "typescript": "^4.6.2",
155
160
  "typescript-to-proptypes": "^2.2.1",
156
161
  "uuid": "^8.3.2",
157
- "webpack-dev-server": "^3.11.3"
162
+ "webfontloader": "^1.6.28",
163
+ "webpack-dev-server": "^4.0.0"
158
164
  },
159
165
  "dependencies": {
160
166
  "@octokit/rest": "^18.12.0",
161
167
  "@popperjs/core": "^2.11.2",
162
- "@sage/design-tokens": "^1.93.0",
163
168
  "@styled-system/prop-types": "^5.1.5",
164
169
  "@tippyjs/react": "^4.2.5",
165
170
  "@types/styled-system": "^5.1.11",
@@ -1,19 +0,0 @@
1
- /**
2
- * Ether
3
- *
4
- * Ether provides functional-like helper methods for Carbon specific tasks.
5
- * As we are dealing with stateful values (user input, browser state) Ether
6
- * does not provide pure functions in all cases.
7
- */
8
- /**
9
- * Returns the props that were passed to a component but excludes the props listed in propTypes
10
- *
11
- * Optionally includes the safeProps which can be defined as a static property on a Class or passed as the second
12
- * argument.
13
- *
14
- * @method validProps
15
- * @param {Object} instance
16
- * @param {Array?} safeProps
17
- * @return {Object} props
18
- */
19
- export function validProps(instance: Object, safeProps: any[] | null): Object;
@@ -1,29 +0,0 @@
1
- import { omit, difference } from "lodash";
2
- /**
3
- * Ether
4
- *
5
- * Ether provides functional-like helper methods for Carbon specific tasks.
6
- * As we are dealing with stateful values (user input, browser state) Ether
7
- * does not provide pure functions in all cases.
8
- */
9
-
10
- /**
11
- * Returns the props that were passed to a component but excludes the props listed in propTypes
12
- *
13
- * Optionally includes the safeProps which can be defined as a static property on a Class or passed as the second
14
- * argument.
15
- *
16
- * @method validProps
17
- * @param {Object} instance
18
- * @param {Array?} safeProps
19
- * @return {Object} props
20
- */
21
-
22
- function validProps(instance, safeProps) {
23
- const component = instance.isReactComponent ? instance.constructor : instance;
24
- const unsafeProps = difference(Object.keys(component.propTypes), safeProps || component.safeProps || []);
25
- return omit(instance.props, unsafeProps);
26
- } // eslint-disable-next-line import/prefer-default-export
27
-
28
-
29
- export { validProps };
@@ -1 +0,0 @@
1
- export * from "./ether";
@@ -1 +0,0 @@
1
- export * from "./ether";
@@ -1,17 +0,0 @@
1
- export default Browser;
2
- declare namespace Browser {
3
- function isDomAvailable(): boolean;
4
- function getWindow(): any;
5
- function getDocument(): Document;
6
- function getActiveElement(): Element | null;
7
- function redirectTo(url: any): void;
8
- function redirectAfter(url: any, seconds: any): NodeJS.Timeout;
9
- function reload(): void;
10
- function editFocus(ref: any): void;
11
- function setFocus(reactNode: any): void;
12
- function setInputFocus(inputComponent: any): void;
13
- function setCookie(name: any, value: any, options?: Object): void;
14
- function getCookie(name: string): string | null;
15
- function postToNewWindow(url: string, data: Object, target?: Object): void;
16
- function submitForm(form: any): void;
17
- }