carbon-react 111.9.1 → 111.11.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 (105) hide show
  1. package/esm/__internal__/form-field/form-field.component.js +1 -1
  2. package/esm/__internal__/input-icon-toggle/input-icon-toggle.component.js +1 -1
  3. package/esm/__internal__/label/label.component.js +1 -1
  4. package/esm/components/action-popover/action-popover-item/action-popover-item.component.js +1 -1
  5. package/esm/components/action-popover/action-popover-menu-button/action-popover-menu-button.component.js +1 -1
  6. package/esm/components/button/button.component.js +3 -3
  7. package/esm/components/button-toggle/button-toggle-icon.component.js +1 -1
  8. package/esm/components/button-toggle/button-toggle.component.js +1 -1
  9. package/esm/components/decimal/decimal.component.js +1 -1
  10. package/esm/components/grouped-character/grouped-character.component.js +1 -1
  11. package/esm/components/help/help.component.js +1 -1
  12. package/esm/components/icon/fonts/carbon-icons-webfont.woff +0 -0
  13. package/esm/components/icon/icon-config.js +1 -1
  14. package/esm/components/icon/icon-type.d.ts +1 -1
  15. package/esm/components/icon/icon-unicodes.d.ts +3 -0
  16. package/esm/components/icon/icon-unicodes.js +5 -2
  17. package/esm/components/icon/icon.component.js +1 -1
  18. package/esm/components/link/link.component.js +1 -1
  19. package/esm/components/multi-action-button/multi-action-button.component.js +1 -1
  20. package/esm/components/note/__internal__/status-icon/index.d.ts +1 -0
  21. package/esm/components/note/__internal__/status-icon/index.js +1 -0
  22. package/esm/components/note/__internal__/status-icon/status-icon.component.d.ts +9 -0
  23. package/esm/components/note/__internal__/{status-with-tooltip/status.component.js → status-icon/status-icon.component.js} +4 -6
  24. package/esm/components/note/__internal__/status-icon/status-icon.style.d.ts +2 -0
  25. package/esm/components/note/__internal__/{status-with-tooltip/status.style.js → status-icon/status-icon.style.js} +0 -0
  26. package/esm/components/note/index.d.ts +2 -2
  27. package/esm/components/note/note.component.d.ts +28 -0
  28. package/esm/components/note/note.component.js +188 -46
  29. package/esm/components/note/note.style.d.ts +13 -0
  30. package/esm/components/note/note.style.js +0 -5
  31. package/esm/components/numeral-date/index.d.ts +2 -1
  32. package/esm/components/numeral-date/numeral-date.component.d.ts +81 -0
  33. package/esm/components/numeral-date/numeral-date.component.js +237 -128
  34. package/esm/components/numeral-date/numeral-date.style.d.ts +11 -0
  35. package/esm/components/portrait/portrait.component.js +1 -1
  36. package/esm/components/sidebar/sidebar.component.d.ts +2 -2
  37. package/esm/components/sidebar/sidebar.component.js +106 -2
  38. package/esm/components/sidebar/sidebar.style.d.ts +1 -6
  39. package/esm/components/sidebar/sidebar.style.js +7 -2
  40. package/esm/components/split-button/split-button.component.js +1 -1
  41. package/esm/components/text-editor/__internal__/decorators/index.d.ts +3 -0
  42. package/esm/components/text-editor/__internal__/decorators/link-decorator.d.ts +7 -0
  43. package/esm/components/text-editor/__internal__/utils/index.d.ts +1 -0
  44. package/esm/components/text-editor/__internal__/utils/utils.d.ts +28 -0
  45. package/esm/components/text-editor/text-editor.component.d.ts +8 -0
  46. package/esm/components/text-editor/text-editor.style.d.ts +3 -0
  47. package/esm/components/textbox/textbox.component.js +1 -1
  48. package/esm/style/assets/carbon-icons-webfont.woff +0 -0
  49. package/esm/style/utils/width.d.ts +1 -1
  50. package/lib/__internal__/form-field/form-field.component.js +1 -1
  51. package/lib/__internal__/input-icon-toggle/input-icon-toggle.component.js +1 -1
  52. package/lib/__internal__/label/label.component.js +1 -1
  53. package/lib/components/action-popover/action-popover-item/action-popover-item.component.js +1 -1
  54. package/lib/components/action-popover/action-popover-menu-button/action-popover-menu-button.component.js +1 -1
  55. package/lib/components/button/button.component.js +3 -3
  56. package/lib/components/button-toggle/button-toggle-icon.component.js +1 -1
  57. package/lib/components/button-toggle/button-toggle.component.js +1 -1
  58. package/lib/components/decimal/decimal.component.js +1 -1
  59. package/lib/components/grouped-character/grouped-character.component.js +1 -1
  60. package/lib/components/help/help.component.js +1 -1
  61. package/lib/components/icon/fonts/carbon-icons-webfont.woff +0 -0
  62. package/lib/components/icon/icon-config.js +1 -1
  63. package/lib/components/icon/icon-type.d.ts +1 -1
  64. package/lib/components/icon/icon-unicodes.d.ts +3 -0
  65. package/lib/components/icon/icon-unicodes.js +5 -2
  66. package/lib/components/icon/icon.component.js +1 -1
  67. package/lib/components/link/link.component.js +1 -1
  68. package/lib/components/multi-action-button/multi-action-button.component.js +1 -1
  69. package/lib/components/note/__internal__/status-icon/index.d.ts +1 -0
  70. package/lib/components/note/__internal__/{status-with-tooltip → status-icon}/index.js +2 -2
  71. package/lib/components/note/__internal__/{status-with-tooltip → status-icon}/package.json +1 -1
  72. package/lib/components/note/__internal__/status-icon/status-icon.component.d.ts +9 -0
  73. package/lib/components/note/__internal__/{status-with-tooltip/status.component.js → status-icon/status-icon.component.js} +5 -7
  74. package/lib/components/note/__internal__/status-icon/status-icon.style.d.ts +2 -0
  75. package/lib/components/note/__internal__/{status-with-tooltip/status.style.js → status-icon/status-icon.style.js} +0 -0
  76. package/lib/components/note/index.d.ts +2 -2
  77. package/lib/components/note/note.component.d.ts +28 -0
  78. package/lib/components/note/note.component.js +195 -55
  79. package/lib/components/note/note.style.d.ts +13 -0
  80. package/lib/components/note/note.style.js +0 -6
  81. package/lib/components/numeral-date/index.d.ts +2 -1
  82. package/lib/components/numeral-date/numeral-date.component.d.ts +81 -0
  83. package/lib/components/numeral-date/numeral-date.component.js +237 -128
  84. package/lib/components/numeral-date/numeral-date.style.d.ts +11 -0
  85. package/lib/components/portrait/portrait.component.js +1 -1
  86. package/lib/components/sidebar/sidebar.component.d.ts +2 -2
  87. package/lib/components/sidebar/sidebar.component.js +106 -2
  88. package/lib/components/sidebar/sidebar.style.d.ts +1 -6
  89. package/lib/components/sidebar/sidebar.style.js +8 -2
  90. package/lib/components/split-button/split-button.component.js +1 -1
  91. package/lib/components/text-editor/__internal__/decorators/index.d.ts +3 -0
  92. package/lib/components/text-editor/__internal__/decorators/link-decorator.d.ts +7 -0
  93. package/lib/components/text-editor/__internal__/utils/index.d.ts +1 -0
  94. package/lib/components/text-editor/__internal__/utils/utils.d.ts +28 -0
  95. package/lib/components/text-editor/text-editor.component.d.ts +8 -0
  96. package/lib/components/text-editor/text-editor.style.d.ts +3 -0
  97. package/lib/components/textbox/textbox.component.js +1 -1
  98. package/lib/style/assets/carbon-icons-webfont.woff +0 -0
  99. package/lib/style/utils/width.d.ts +1 -1
  100. package/package.json +3 -2
  101. package/esm/components/note/__internal__/status-with-tooltip/index.js +0 -1
  102. package/esm/components/note/note.d.ts +0 -30
  103. package/esm/components/numeral-date/numeral-date.d.ts +0 -97
  104. package/lib/components/note/note.d.ts +0 -30
  105. package/lib/components/numeral-date/numeral-date.d.ts +0 -97
@@ -60,6 +60,7 @@ const Sidebar = /*#__PURE__*/_react.default.forwardRef(({
60
60
  role = "dialog",
61
61
  focusableContainers,
62
62
  focusableSelectors,
63
+ width,
63
64
  ...rest
64
65
  }, ref) => {
65
66
  const locale = (0, _useLocale.default)();
@@ -106,7 +107,9 @@ const Sidebar = /*#__PURE__*/_react.default.forwardRef(({
106
107
  "data-element": "sidebar",
107
108
  onCancel: onCancel,
108
109
  role: role
109
- }, (0, _utils.filterStyledSystemPaddingProps)(rest)), header && /*#__PURE__*/_react.default.createElement(_sidebarHeader.default, {
110
+ }, (0, _utils.filterStyledSystemPaddingProps)(rest), {
111
+ width: width
112
+ }), header && /*#__PURE__*/_react.default.createElement(_sidebarHeader.default, {
110
113
  id: headerId
111
114
  }, header), closeIcon(), /*#__PURE__*/_react.default.createElement(_box.default, _extends({
112
115
  "data-element": "sidebar-content",
@@ -316,7 +319,108 @@ Sidebar.propTypes = {
316
319
  "valueOf": _propTypes.default.func.isRequired
317
320
  }), _propTypes.default.string]),
318
321
  "role": _propTypes.default.string,
319
- "size": _propTypes.default.oneOf(["extra-large", "extra-small", "large", "medium-large", "medium-small", "medium", "small"])
322
+ "size": _propTypes.default.oneOf(["extra-large", "extra-small", "large", "medium-large", "medium-small", "medium", "small"]),
323
+ "width": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
324
+ "__@iterator": _propTypes.default.func.isRequired,
325
+ "anchor": _propTypes.default.func.isRequired,
326
+ "at": _propTypes.default.func.isRequired,
327
+ "big": _propTypes.default.func.isRequired,
328
+ "blink": _propTypes.default.func.isRequired,
329
+ "bold": _propTypes.default.func.isRequired,
330
+ "charAt": _propTypes.default.func.isRequired,
331
+ "charCodeAt": _propTypes.default.func.isRequired,
332
+ "codePointAt": _propTypes.default.func.isRequired,
333
+ "concat": _propTypes.default.func.isRequired,
334
+ "endsWith": _propTypes.default.func.isRequired,
335
+ "fixed": _propTypes.default.func.isRequired,
336
+ "fontcolor": _propTypes.default.func.isRequired,
337
+ "fontsize": _propTypes.default.func.isRequired,
338
+ "includes": _propTypes.default.func.isRequired,
339
+ "indexOf": _propTypes.default.func.isRequired,
340
+ "italics": _propTypes.default.func.isRequired,
341
+ "lastIndexOf": _propTypes.default.func.isRequired,
342
+ "length": _propTypes.default.number.isRequired,
343
+ "link": _propTypes.default.func.isRequired,
344
+ "localeCompare": _propTypes.default.func.isRequired,
345
+ "match": _propTypes.default.func.isRequired,
346
+ "matchAll": _propTypes.default.func.isRequired,
347
+ "normalize": _propTypes.default.func.isRequired,
348
+ "padEnd": _propTypes.default.func.isRequired,
349
+ "padStart": _propTypes.default.func.isRequired,
350
+ "repeat": _propTypes.default.func.isRequired,
351
+ "replace": _propTypes.default.func.isRequired,
352
+ "search": _propTypes.default.func.isRequired,
353
+ "slice": _propTypes.default.func.isRequired,
354
+ "small": _propTypes.default.func.isRequired,
355
+ "split": _propTypes.default.func.isRequired,
356
+ "startsWith": _propTypes.default.func.isRequired,
357
+ "strike": _propTypes.default.func.isRequired,
358
+ "sub": _propTypes.default.func.isRequired,
359
+ "substr": _propTypes.default.func.isRequired,
360
+ "substring": _propTypes.default.func.isRequired,
361
+ "sup": _propTypes.default.func.isRequired,
362
+ "toLocaleLowerCase": _propTypes.default.func.isRequired,
363
+ "toLocaleUpperCase": _propTypes.default.func.isRequired,
364
+ "toLowerCase": _propTypes.default.func.isRequired,
365
+ "toString": _propTypes.default.func.isRequired,
366
+ "toUpperCase": _propTypes.default.func.isRequired,
367
+ "trim": _propTypes.default.func.isRequired,
368
+ "trimEnd": _propTypes.default.func.isRequired,
369
+ "trimLeft": _propTypes.default.func.isRequired,
370
+ "trimRight": _propTypes.default.func.isRequired,
371
+ "trimStart": _propTypes.default.func.isRequired,
372
+ "valueOf": _propTypes.default.func.isRequired
373
+ }), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
374
+ "__@iterator": _propTypes.default.func.isRequired,
375
+ "anchor": _propTypes.default.func.isRequired,
376
+ "at": _propTypes.default.func.isRequired,
377
+ "big": _propTypes.default.func.isRequired,
378
+ "blink": _propTypes.default.func.isRequired,
379
+ "bold": _propTypes.default.func.isRequired,
380
+ "charAt": _propTypes.default.func.isRequired,
381
+ "charCodeAt": _propTypes.default.func.isRequired,
382
+ "codePointAt": _propTypes.default.func.isRequired,
383
+ "concat": _propTypes.default.func.isRequired,
384
+ "endsWith": _propTypes.default.func.isRequired,
385
+ "fixed": _propTypes.default.func.isRequired,
386
+ "fontcolor": _propTypes.default.func.isRequired,
387
+ "fontsize": _propTypes.default.func.isRequired,
388
+ "includes": _propTypes.default.func.isRequired,
389
+ "indexOf": _propTypes.default.func.isRequired,
390
+ "italics": _propTypes.default.func.isRequired,
391
+ "lastIndexOf": _propTypes.default.func.isRequired,
392
+ "length": _propTypes.default.number.isRequired,
393
+ "link": _propTypes.default.func.isRequired,
394
+ "localeCompare": _propTypes.default.func.isRequired,
395
+ "match": _propTypes.default.func.isRequired,
396
+ "matchAll": _propTypes.default.func.isRequired,
397
+ "normalize": _propTypes.default.func.isRequired,
398
+ "padEnd": _propTypes.default.func.isRequired,
399
+ "padStart": _propTypes.default.func.isRequired,
400
+ "repeat": _propTypes.default.func.isRequired,
401
+ "replace": _propTypes.default.func.isRequired,
402
+ "search": _propTypes.default.func.isRequired,
403
+ "slice": _propTypes.default.func.isRequired,
404
+ "small": _propTypes.default.func.isRequired,
405
+ "split": _propTypes.default.func.isRequired,
406
+ "startsWith": _propTypes.default.func.isRequired,
407
+ "strike": _propTypes.default.func.isRequired,
408
+ "sub": _propTypes.default.func.isRequired,
409
+ "substr": _propTypes.default.func.isRequired,
410
+ "substring": _propTypes.default.func.isRequired,
411
+ "sup": _propTypes.default.func.isRequired,
412
+ "toLocaleLowerCase": _propTypes.default.func.isRequired,
413
+ "toLocaleUpperCase": _propTypes.default.func.isRequired,
414
+ "toLowerCase": _propTypes.default.func.isRequired,
415
+ "toString": _propTypes.default.func.isRequired,
416
+ "toUpperCase": _propTypes.default.func.isRequired,
417
+ "trim": _propTypes.default.func.isRequired,
418
+ "trimEnd": _propTypes.default.func.isRequired,
419
+ "trimLeft": _propTypes.default.func.isRequired,
420
+ "trimRight": _propTypes.default.func.isRequired,
421
+ "trimStart": _propTypes.default.func.isRequired,
422
+ "valueOf": _propTypes.default.func.isRequired
423
+ }), _propTypes.default.string])
320
424
  };
321
425
  Sidebar.displayName = "Sidebar";
322
426
  var _default = Sidebar;
@@ -1,9 +1,4 @@
1
1
  import { PaddingProps } from "styled-system";
2
2
  import { SidebarProps } from "./sidebar.component";
3
- declare type StyledSidebarProps = {
4
- onCancel?: SidebarProps["onCancel"];
5
- position?: SidebarProps["position"];
6
- size?: SidebarProps["size"];
7
- };
8
- declare const StyledSidebar: import("styled-components").StyledComponent<"div", any, StyledSidebarProps & PaddingProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>>, never>;
3
+ declare const StyledSidebar: import("styled-components").StyledComponent<"div", any, Pick<SidebarProps, "width" | "onCancel" | "size" | "position"> & PaddingProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>>, never>;
9
4
  export default StyledSidebar;
@@ -7,6 +7,8 @@ exports.default = void 0;
7
7
 
8
8
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
9
9
 
10
+ var _width = _interopRequireDefault(require("../../style/utils/width"));
11
+
10
12
  var _base = _interopRequireDefault(require("../../style/themes/base"));
11
13
 
12
14
  var _iconButton = _interopRequireDefault(require("../icon-button/icon-button.style"));
@@ -42,7 +44,8 @@ const StyledSidebar = _styledComponents.default.div`
42
44
  onCancel,
43
45
  position,
44
46
  size,
45
- theme
47
+ theme,
48
+ width
46
49
  }) => (0, _styledComponents.css)`
47
50
  background: var(--colorsUtilityMajor025);
48
51
  border-radius: 1px;
@@ -53,9 +56,12 @@ const StyledSidebar = _styledComponents.default.div`
53
56
  top: 0;
54
57
  z-index: ${theme.zIndex.fullScreenModal};
55
58
 
56
- ${size && (0, _styledComponents.css)`
59
+ ${!width && size && (0, _styledComponents.css)`
57
60
  width: ${_sidebar.SIDEBAR_SIZES_CSS[size]};
58
61
  `}
62
+ ${width && (0, _width.default)({
63
+ width
64
+ })}
59
65
 
60
66
  ${position && (0, _styledComponents.css)`
61
67
  box-shadow: var(--boxShadow300);
@@ -295,7 +295,7 @@ SplitButton.propTypes = {
295
295
  "formTarget": _propTypes.default.string,
296
296
  "hidden": _propTypes.default.bool,
297
297
  "iconPosition": _propTypes.default.oneOf(["after", "before"]),
298
- "iconType": _propTypes.default.oneOf(["add", "admin", "alert_on", "alert", "analysis", "arrow_down", "arrow_left_boxed", "arrow_left_right_small", "arrow_left_small", "arrow_left", "arrow_right_small", "arrow_right", "arrow_up", "arrow", "attach", "bank", "basket_with_squares", "basket", "bin", "block_arrow_right", "blocked_square", "blocked", "bold", "boxed_shapes", "bulk_destroy", "bullet_list_dotted", "bullet_list_numbers", "bullet_list", "business", "calendar_today", "calendar", "call", "camera", "card_view", "caret_down", "caret_large_down", "caret_large_left", "caret_large_right", "caret_large_up", "caret_left", "caret_right", "caret_up", "cart", "chart_bar", "chart_line", "chart_pie", "chat_notes", "chat", "chevron_down_thick", "chevron_down", "chevron_left_thick", "chevron_left", "chevron_right_thick", "chevron_right", "chevron_up_thick", "chevron_up", "circle_with_dots", "circles_connection", "clock", "close", "coins", "collaborate", "computer_clock", "connect", "contacts", "copy", "create", "credit_card_slash", "credit_card", "cross_circle", "cross", "csv", "delete", "delivery", "disconnect", "disputed", "document_right_align", "document_tick", "document_vertical_lines", "download", "draft", "drag_vertical", "drag", "dropdown", "duplicate", "edit", "edited", "ellipsis_horizontal", "ellipsis_vertical", "email_switch", "email", "entry", "envelope_dollar", "envelope_euro", "error_square", "error", "euro", "expand", "factory", "favourite_lined", "favourite", "fax", "feedback", "file_excel", "file_generic", "file_image", "file_pdf", "file_word", "files_leaning", "filter_new", "filter", "fit_height", "fit_width", "flag", "folder", "gift", "go", "graph", "grid", "help", "hide", "home", "image", "in_progress", "in_transit", "individual", "info", "italic", "key", "ledger_arrow_left", "ledger_arrow_right", "ledger", "lightbulb_off", "lightbulb_on", "link", "list_view", "location", "locked", "logout", "lookup", "marker", "message", "minus_large", "minus", "mobile", "money_bag", "none", "old_warning", "palm_tree", "pause_circle", "pause", "pdf", "people_switch", "people", "person_info", "person_tick", "person", "phone", "piggy_bank", "play_circle", "play", "plus_large", "plus", "pound", "print", "progress", "progressed", "question_hollow", "question_mark", "question", "refresh_clock", "refresh", "remove", "sage_coin", "save", "scan", "search", "services", "settings_old", "settings", "share", "shop", "sort_down", "sort_up", "spanner", "split_container", "split", "square_dot", "squares_nine", "stacked_boxes", "stacked_squares", "submitted", "sync", "tag", "talk", "three_boxes", "tick_circle", "tick_thick", "tick", "true_tick", "undo", "unlocked", "upload", "uploaded", "video", "view", "warning"]),
298
+ "iconType": _propTypes.default.oneOf(["add", "admin", "alert_on", "alert", "analysis", "arrow_down", "arrow_left_boxed", "arrow_left_right_small", "arrow_left_small", "arrow_left", "arrow_right_small", "arrow_right", "arrow_up", "arrow", "attach", "bank", "basket_with_squares", "basket", "bin", "block_arrow_right", "blocked_square", "blocked", "bold", "box_arrow_left", "boxed_shapes", "bulk_destroy", "bullet_list_dotted", "bullet_list_numbers", "bullet_list", "business", "calendar_today", "calendar", "call", "camera", "card_view", "caret_down", "caret_large_down", "caret_large_left", "caret_large_right", "caret_large_up", "caret_left", "caret_right", "caret_up", "cart", "chart_bar", "chart_line", "chart_pie", "chat_notes", "chat", "chevron_down_thick", "chevron_down", "chevron_left_thick", "chevron_left", "chevron_right_thick", "chevron_right", "chevron_up_thick", "chevron_up", "circle_with_dots", "circles_connection", "clock", "close", "coins", "collaborate", "computer_clock", "connect", "contacts", "copy", "create", "credit_card_slash", "credit_card", "cross_circle", "cross", "csv", "delete", "delivery", "disconnect", "disputed", "document_right_align", "document_tick", "document_vertical_lines", "download", "draft", "drag_vertical", "drag", "dropdown", "duplicate", "edit", "edited", "ellipsis_horizontal", "ellipsis_vertical", "email_switch", "email", "entry", "envelope_dollar", "envelope_euro", "error_square", "error", "euro", "expand", "factory", "favourite_lined", "favourite", "fax", "feedback", "file_excel", "file_generic", "file_image", "file_pdf", "file_word", "files_leaning", "filter_new", "filter", "fit_height", "fit_width", "flag", "folder", "gift", "go", "graph", "grid", "help", "hide", "home", "image", "in_progress", "in_transit", "individual", "info", "italic", "key", "ledger_arrow_left", "ledger_arrow_right", "ledger", "lightbulb_off", "lightbulb_on", "link", "list_view", "location", "locked", "logout", "lookup", "marker", "message", "minus_large", "minus", "mobile", "money_bag", "none", "old_warning", "palm_tree", "pause_circle", "pause", "pdf", "people_switch", "people", "person_info", "person_tick", "person", "phone", "piggy_bank", "play_circle", "play", "plus_large", "plus", "pound", "print", "progress", "progressed", "question_hollow", "question_mark", "question", "refresh_clock", "refresh", "remove", "sage_coin", "save", "scan", "search", "services", "settings_old", "settings", "share", "shop", "sort_down", "sort_up", "spanner", "split_container", "split", "square_dot", "squares_nine", "stacked_boxes", "stacked_squares", "submitted", "sync", "tag", "talk", "three_boxes", "tick_circle", "tick_thick", "tick", "true_tick", "u_turn_left", "u_turn_right", "undo", "unlocked", "upload", "uploaded", "video", "view", "warning"]),
299
299
  "id": _propTypes.default.string,
300
300
  "inlist": _propTypes.default.any,
301
301
  "inputMode": _propTypes.default.oneOf(["decimal", "email", "none", "numeric", "search", "tel", "text", "url"]),
@@ -0,0 +1,3 @@
1
+ declare var _default: CompositeDecorator;
2
+ export default _default;
3
+ import { CompositeDecorator } from "draft-js";
@@ -0,0 +1,7 @@
1
+ declare namespace _default {
2
+ export { linkStrategy as strategy };
3
+ export { EditorLink as component };
4
+ }
5
+ export default _default;
6
+ declare function linkStrategy(contentBlock: any, callback: any): void;
7
+ import EditorLink from "../editor-link";
@@ -0,0 +1 @@
1
+ export { computeBlockType, getContent, getContentInfo, getDecoratedValue, getSelection, getSelectionInfo, getSelectedLength, moveSelectionToEnd, resetBlockType, isASCIIChar, replaceText, hasBlockStyle, hasInlineStyle, blockStyleFn } from "./utils";
@@ -0,0 +1,28 @@
1
+ export function blockStyleFn(block: any): "" | "text-editor-block-unordered" | "text-editor-block-ordered";
2
+ export function hasBlockStyle(value: any, type: any): boolean;
3
+ export function hasInlineStyle(value: any, style: any): any;
4
+ export function isASCIIChar(str: any): boolean;
5
+ export function replaceText(editorState: any, text: any, inlineStyle: any, forceSelection: any): EditorState;
6
+ export function computeBlockType(char: any, type: any): "ordered-list-item" | "unordered-list-item" | "unstyled";
7
+ export function resetBlockType(value: any, newType?: string): EditorState;
8
+ export function getDecoratedValue(value: any): EditorState;
9
+ export function getContent(value: any): any;
10
+ export function getSelection(value: any): any;
11
+ export function getContentInfo(value: any): {
12
+ content: any;
13
+ currentBlock: any;
14
+ blockType: any;
15
+ blockLength: any;
16
+ blockText: any;
17
+ blockMap: any;
18
+ };
19
+ export function getSelectionInfo(value: any): {
20
+ selection: any;
21
+ startKey: any;
22
+ endKey: any;
23
+ startOffset: any;
24
+ endOffset: any;
25
+ };
26
+ export function moveSelectionToEnd(value: any): EditorState;
27
+ export function getSelectedLength(value: any): number;
28
+ import { EditorState } from "draft-js";
@@ -0,0 +1,8 @@
1
+ export const EditorContext: React.Context<{}>;
2
+ export const TextEditorState: typeof EditorState;
3
+ export const TextEditorContentState: typeof ContentState;
4
+ export default TextEditor;
5
+ import React from "react";
6
+ import { EditorState } from "draft-js";
7
+ import { ContentState } from "draft-js";
8
+ declare const TextEditor: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
@@ -0,0 +1,3 @@
1
+ export const StyledEditorWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export const StyledEditorContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
3
+ export const StyledEditorOutline: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -319,7 +319,7 @@ Textbox.propTypes = {
319
319
  "id": _propTypes.default.string,
320
320
  "info": _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.bool]),
321
321
  "inlist": _propTypes.default.any,
322
- "inputIcon": _propTypes.default.oneOf(["add", "admin", "alert_on", "alert", "analysis", "arrow_down", "arrow_left_boxed", "arrow_left_right_small", "arrow_left_small", "arrow_left", "arrow_right_small", "arrow_right", "arrow_up", "arrow", "attach", "bank", "basket_with_squares", "basket", "bin", "block_arrow_right", "blocked_square", "blocked", "bold", "boxed_shapes", "bulk_destroy", "bullet_list_dotted", "bullet_list_numbers", "bullet_list", "business", "calendar_today", "calendar", "call", "camera", "card_view", "caret_down", "caret_large_down", "caret_large_left", "caret_large_right", "caret_large_up", "caret_left", "caret_right", "caret_up", "cart", "chart_bar", "chart_line", "chart_pie", "chat_notes", "chat", "chevron_down_thick", "chevron_down", "chevron_left_thick", "chevron_left", "chevron_right_thick", "chevron_right", "chevron_up_thick", "chevron_up", "circle_with_dots", "circles_connection", "clock", "close", "coins", "collaborate", "computer_clock", "connect", "contacts", "copy", "create", "credit_card_slash", "credit_card", "cross_circle", "cross", "csv", "delete", "delivery", "disconnect", "disputed", "document_right_align", "document_tick", "document_vertical_lines", "download", "draft", "drag_vertical", "drag", "dropdown", "duplicate", "edit", "edited", "ellipsis_horizontal", "ellipsis_vertical", "email_switch", "email", "entry", "envelope_dollar", "envelope_euro", "error_square", "error", "euro", "expand", "factory", "favourite_lined", "favourite", "fax", "feedback", "file_excel", "file_generic", "file_image", "file_pdf", "file_word", "files_leaning", "filter_new", "filter", "fit_height", "fit_width", "flag", "folder", "gift", "go", "graph", "grid", "help", "hide", "home", "image", "in_progress", "in_transit", "individual", "info", "italic", "key", "ledger_arrow_left", "ledger_arrow_right", "ledger", "lightbulb_off", "lightbulb_on", "link", "list_view", "location", "locked", "logout", "lookup", "marker", "message", "minus_large", "minus", "mobile", "money_bag", "none", "old_warning", "palm_tree", "pause_circle", "pause", "pdf", "people_switch", "people", "person_info", "person_tick", "person", "phone", "piggy_bank", "play_circle", "play", "plus_large", "plus", "pound", "print", "progress", "progressed", "question_hollow", "question_mark", "question", "refresh_clock", "refresh", "remove", "sage_coin", "save", "scan", "search", "services", "settings_old", "settings", "share", "shop", "sort_down", "sort_up", "spanner", "split_container", "split", "square_dot", "squares_nine", "stacked_boxes", "stacked_squares", "submitted", "sync", "tag", "talk", "three_boxes", "tick_circle", "tick_thick", "tick", "true_tick", "undo", "unlocked", "upload", "uploaded", "video", "view", "warning"]),
322
+ "inputIcon": _propTypes.default.oneOf(["add", "admin", "alert_on", "alert", "analysis", "arrow_down", "arrow_left_boxed", "arrow_left_right_small", "arrow_left_small", "arrow_left", "arrow_right_small", "arrow_right", "arrow_up", "arrow", "attach", "bank", "basket_with_squares", "basket", "bin", "block_arrow_right", "blocked_square", "blocked", "bold", "box_arrow_left", "boxed_shapes", "bulk_destroy", "bullet_list_dotted", "bullet_list_numbers", "bullet_list", "business", "calendar_today", "calendar", "call", "camera", "card_view", "caret_down", "caret_large_down", "caret_large_left", "caret_large_right", "caret_large_up", "caret_left", "caret_right", "caret_up", "cart", "chart_bar", "chart_line", "chart_pie", "chat_notes", "chat", "chevron_down_thick", "chevron_down", "chevron_left_thick", "chevron_left", "chevron_right_thick", "chevron_right", "chevron_up_thick", "chevron_up", "circle_with_dots", "circles_connection", "clock", "close", "coins", "collaborate", "computer_clock", "connect", "contacts", "copy", "create", "credit_card_slash", "credit_card", "cross_circle", "cross", "csv", "delete", "delivery", "disconnect", "disputed", "document_right_align", "document_tick", "document_vertical_lines", "download", "draft", "drag_vertical", "drag", "dropdown", "duplicate", "edit", "edited", "ellipsis_horizontal", "ellipsis_vertical", "email_switch", "email", "entry", "envelope_dollar", "envelope_euro", "error_square", "error", "euro", "expand", "factory", "favourite_lined", "favourite", "fax", "feedback", "file_excel", "file_generic", "file_image", "file_pdf", "file_word", "files_leaning", "filter_new", "filter", "fit_height", "fit_width", "flag", "folder", "gift", "go", "graph", "grid", "help", "hide", "home", "image", "in_progress", "in_transit", "individual", "info", "italic", "key", "ledger_arrow_left", "ledger_arrow_right", "ledger", "lightbulb_off", "lightbulb_on", "link", "list_view", "location", "locked", "logout", "lookup", "marker", "message", "minus_large", "minus", "mobile", "money_bag", "none", "old_warning", "palm_tree", "pause_circle", "pause", "pdf", "people_switch", "people", "person_info", "person_tick", "person", "phone", "piggy_bank", "play_circle", "play", "plus_large", "plus", "pound", "print", "progress", "progressed", "question_hollow", "question_mark", "question", "refresh_clock", "refresh", "remove", "sage_coin", "save", "scan", "search", "services", "settings_old", "settings", "share", "shop", "sort_down", "sort_up", "spanner", "split_container", "split", "square_dot", "squares_nine", "stacked_boxes", "stacked_squares", "submitted", "sync", "tag", "talk", "three_boxes", "tick_circle", "tick_thick", "tick", "true_tick", "u_turn_left", "u_turn_right", "undo", "unlocked", "upload", "uploaded", "video", "view", "warning"]),
323
323
  "inputMode": _propTypes.default.oneOf(["decimal", "email", "none", "numeric", "search", "tel", "text", "url"]),
324
324
  "inputRef": _propTypes.default.func,
325
325
  "inputWidth": _propTypes.default.number,
@@ -1,3 +1,3 @@
1
1
  import { styleFn } from "styled-system";
2
- declare const _default: ({ width }: Record<string, string>) => styleFn;
2
+ declare const _default: ({ width }: Record<string, unknown>) => styleFn;
3
3
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "111.9.1",
3
+ "version": "111.11.0",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "files": [
6
6
  "lib",
@@ -138,8 +138,9 @@
138
138
  "file-loader": "^6.2.0",
139
139
  "fs-extra": "^10.0.0",
140
140
  "husky": "^4.3.6",
141
- "jest": "^26.6.3",
141
+ "jest": "^27.5.1",
142
142
  "jest-canvas-mock": "^2.3.1",
143
+ "jest-environment-jsdom": "^27.5.1",
143
144
  "jest-fetch-mock": "^3.0.3",
144
145
  "jest-styled-components": "^6.3.1",
145
146
  "lint-staged": "^10.5.3",
@@ -1 +0,0 @@
1
- export { default } from "./status.component";
@@ -1,30 +0,0 @@
1
- import * as React from "react";
2
- import { MarginProps } from "styled-system";
3
-
4
- export interface NoteProps extends MarginProps {
5
- /** The rich text content to display in the Note */
6
- noteContent: Record<string, unknown>;
7
- /** Set a percentage-based width for the whole Note component, relative to its parent. */
8
- width?: number;
9
- /** renders a control for the Note */
10
- inlineControl?: React.ReactNode;
11
- /** Adds a Title to the Note */
12
- title?: string;
13
- /** Adds a name to the Note footer */
14
- name?: string;
15
- /** Adds a created on date to the Note footer */
16
- createdDate: string;
17
- /** Adds a status and tooltip to the Note footer */
18
- status?: {
19
- text: string;
20
- timeStamp: string;
21
- };
22
- /** The previews to display of any links added to the Editor */
23
- previews?: React.ReactNode[];
24
- /** Callback to report a url when a link is added */
25
- onLinkAdded?: (url: string) => void;
26
- }
27
-
28
- declare function Note(props: NoteProps): JSX.Element;
29
-
30
- export default Note;
@@ -1,97 +0,0 @@
1
- import * as React from "react";
2
- import { MarginProps } from "styled-system";
3
- import { ValidationProps } from "../../__internal__/validations";
4
-
5
- interface DayMonthDate {
6
- dd: string;
7
- mm: string;
8
- }
9
-
10
- interface MonthYearDate {
11
- mm: string;
12
- yyyy: string;
13
- }
14
-
15
- interface FullDate extends DayMonthDate {
16
- yyyy: string;
17
- }
18
-
19
- interface NumeralDateEvent {
20
- target: {
21
- name: string;
22
- id: string;
23
- value: DayMonthDate | MonthYearDate | FullDate;
24
- };
25
- }
26
-
27
- export interface NumeralDateProps extends ValidationProps, MarginProps {
28
- /** Identifier used for testing purposes, applied to the root element of the component. */
29
- "data-component"?: string;
30
- /** Identifier used for testing purposes, applied to the root element of the component. */
31
- "data-element"?: string;
32
- /** Identifier used for testing purposes, applied to the root element of the component. */
33
- "data-role"?: string;
34
- /** If true, the component will be disabled */
35
- disabled?: boolean;
36
- /** If true, the component will be read-only */
37
- readOnly?: boolean;
38
- /** Breakpoint for adaptive label (inline labels change to top aligned). Enables the adaptive behaviour when set */
39
- adaptiveLabelBreakpoint?: number;
40
- /* Array of strings to define custom input layout.
41
- Allowed formats:
42
- ['dd', 'mm', 'yyyy'],
43
- ['mm', 'dd', 'yyyy'],
44
- ['dd', 'mm'],
45
- ['mm', 'dd'],
46
- ['mm', 'yyyy'] */
47
- dateFormat?:
48
- | ["dd", "mm", "yyyy"]
49
- | ["mm", "dd", "yyyy"]
50
- | ["dd", "mm"]
51
- | ["mm", "dd"]
52
- | ["mm", "yyyy"];
53
- /** Default value for use in uncontrolled mode */
54
- defaultValue?: DayMonthDate | MonthYearDate | FullDate;
55
- /** Value for use in controlled mode */
56
- value?: DayMonthDate | MonthYearDate | FullDate;
57
- /** When true, enables the internal errors to be displayed */
58
- enableInternalError?: boolean;
59
- /** When true, enables the internal warnings to be displayed */
60
- enableInternalWarning?: boolean;
61
- /** Help content to be displayed under an input */
62
- fieldHelp?: React.ReactNode;
63
- /** `id` for events */
64
- id?: string;
65
- /** `name` for events */
66
- name?: string;
67
- /** Label */
68
- label?: string;
69
- /** Label alignment. Works only when labelInline is true */
70
- labelAlign?: "left" | "right";
71
- /** Text applied to label help tooltip */
72
- labelHelp?: React.ReactNode;
73
- /** When true, label is placed in line with an input */
74
- labelInline?: boolean;
75
- /** Label width */
76
- labelWidth?: number;
77
- /** Spacing between label and a field for inline label, given number will be multiplied by base spacing unit (8) */
78
- labelSpacing?: 1 | 2;
79
- /** Blur event handler */
80
- onBlur?: (ev: NumeralDateEvent) => void;
81
- /** Change event handler */
82
- onChange?: (ev: NumeralDateEvent) => void;
83
- /** Flag to configure component as mandatory */
84
- required?: boolean;
85
- /** Size of an input */
86
- size?: "small" | "medium" | "large";
87
- /** When true, validation icons will be placed on labels instead of being placed on the inputs */
88
- validationOnLabel?: boolean;
89
- /** Overrides the default tooltip position */
90
- tooltipPosition?: "top" | "bottom" | "left" | "right";
91
- /** Aria label for rendered help component */
92
- helpAriaLabel?: string;
93
- }
94
-
95
- declare function NumeralDate(props: NumeralDateProps): JSX.Element;
96
-
97
- export default NumeralDate;
@@ -1,30 +0,0 @@
1
- import * as React from "react";
2
- import { MarginProps } from "styled-system";
3
-
4
- export interface NoteProps extends MarginProps {
5
- /** The rich text content to display in the Note */
6
- noteContent: Record<string, unknown>;
7
- /** Set a percentage-based width for the whole Note component, relative to its parent. */
8
- width?: number;
9
- /** renders a control for the Note */
10
- inlineControl?: React.ReactNode;
11
- /** Adds a Title to the Note */
12
- title?: string;
13
- /** Adds a name to the Note footer */
14
- name?: string;
15
- /** Adds a created on date to the Note footer */
16
- createdDate: string;
17
- /** Adds a status and tooltip to the Note footer */
18
- status?: {
19
- text: string;
20
- timeStamp: string;
21
- };
22
- /** The previews to display of any links added to the Editor */
23
- previews?: React.ReactNode[];
24
- /** Callback to report a url when a link is added */
25
- onLinkAdded?: (url: string) => void;
26
- }
27
-
28
- declare function Note(props: NoteProps): JSX.Element;
29
-
30
- export default Note;
@@ -1,97 +0,0 @@
1
- import * as React from "react";
2
- import { MarginProps } from "styled-system";
3
- import { ValidationProps } from "../../__internal__/validations";
4
-
5
- interface DayMonthDate {
6
- dd: string;
7
- mm: string;
8
- }
9
-
10
- interface MonthYearDate {
11
- mm: string;
12
- yyyy: string;
13
- }
14
-
15
- interface FullDate extends DayMonthDate {
16
- yyyy: string;
17
- }
18
-
19
- interface NumeralDateEvent {
20
- target: {
21
- name: string;
22
- id: string;
23
- value: DayMonthDate | MonthYearDate | FullDate;
24
- };
25
- }
26
-
27
- export interface NumeralDateProps extends ValidationProps, MarginProps {
28
- /** Identifier used for testing purposes, applied to the root element of the component. */
29
- "data-component"?: string;
30
- /** Identifier used for testing purposes, applied to the root element of the component. */
31
- "data-element"?: string;
32
- /** Identifier used for testing purposes, applied to the root element of the component. */
33
- "data-role"?: string;
34
- /** If true, the component will be disabled */
35
- disabled?: boolean;
36
- /** If true, the component will be read-only */
37
- readOnly?: boolean;
38
- /** Breakpoint for adaptive label (inline labels change to top aligned). Enables the adaptive behaviour when set */
39
- adaptiveLabelBreakpoint?: number;
40
- /* Array of strings to define custom input layout.
41
- Allowed formats:
42
- ['dd', 'mm', 'yyyy'],
43
- ['mm', 'dd', 'yyyy'],
44
- ['dd', 'mm'],
45
- ['mm', 'dd'],
46
- ['mm', 'yyyy'] */
47
- dateFormat?:
48
- | ["dd", "mm", "yyyy"]
49
- | ["mm", "dd", "yyyy"]
50
- | ["dd", "mm"]
51
- | ["mm", "dd"]
52
- | ["mm", "yyyy"];
53
- /** Default value for use in uncontrolled mode */
54
- defaultValue?: DayMonthDate | MonthYearDate | FullDate;
55
- /** Value for use in controlled mode */
56
- value?: DayMonthDate | MonthYearDate | FullDate;
57
- /** When true, enables the internal errors to be displayed */
58
- enableInternalError?: boolean;
59
- /** When true, enables the internal warnings to be displayed */
60
- enableInternalWarning?: boolean;
61
- /** Help content to be displayed under an input */
62
- fieldHelp?: React.ReactNode;
63
- /** `id` for events */
64
- id?: string;
65
- /** `name` for events */
66
- name?: string;
67
- /** Label */
68
- label?: string;
69
- /** Label alignment. Works only when labelInline is true */
70
- labelAlign?: "left" | "right";
71
- /** Text applied to label help tooltip */
72
- labelHelp?: React.ReactNode;
73
- /** When true, label is placed in line with an input */
74
- labelInline?: boolean;
75
- /** Label width */
76
- labelWidth?: number;
77
- /** Spacing between label and a field for inline label, given number will be multiplied by base spacing unit (8) */
78
- labelSpacing?: 1 | 2;
79
- /** Blur event handler */
80
- onBlur?: (ev: NumeralDateEvent) => void;
81
- /** Change event handler */
82
- onChange?: (ev: NumeralDateEvent) => void;
83
- /** Flag to configure component as mandatory */
84
- required?: boolean;
85
- /** Size of an input */
86
- size?: "small" | "medium" | "large";
87
- /** When true, validation icons will be placed on labels instead of being placed on the inputs */
88
- validationOnLabel?: boolean;
89
- /** Overrides the default tooltip position */
90
- tooltipPosition?: "top" | "bottom" | "left" | "right";
91
- /** Aria label for rendered help component */
92
- helpAriaLabel?: string;
93
- }
94
-
95
- declare function NumeralDate(props: NumeralDateProps): JSX.Element;
96
-
97
- export default NumeralDate;