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.
- package/esm/__internal__/form-field/form-field.component.js +1 -1
- package/esm/__internal__/input-icon-toggle/input-icon-toggle.component.js +1 -1
- package/esm/__internal__/label/label.component.js +1 -1
- package/esm/components/action-popover/action-popover-item/action-popover-item.component.js +1 -1
- package/esm/components/action-popover/action-popover-menu-button/action-popover-menu-button.component.js +1 -1
- package/esm/components/button/button.component.js +3 -3
- package/esm/components/button-toggle/button-toggle-icon.component.js +1 -1
- package/esm/components/button-toggle/button-toggle.component.js +1 -1
- package/esm/components/decimal/decimal.component.js +1 -1
- package/esm/components/grouped-character/grouped-character.component.js +1 -1
- package/esm/components/help/help.component.js +1 -1
- package/esm/components/icon/fonts/carbon-icons-webfont.woff +0 -0
- package/esm/components/icon/icon-config.js +1 -1
- package/esm/components/icon/icon-type.d.ts +1 -1
- package/esm/components/icon/icon-unicodes.d.ts +3 -0
- package/esm/components/icon/icon-unicodes.js +5 -2
- package/esm/components/icon/icon.component.js +1 -1
- package/esm/components/link/link.component.js +1 -1
- package/esm/components/multi-action-button/multi-action-button.component.js +1 -1
- package/esm/components/note/__internal__/status-icon/index.d.ts +1 -0
- package/esm/components/note/__internal__/status-icon/index.js +1 -0
- package/esm/components/note/__internal__/status-icon/status-icon.component.d.ts +9 -0
- package/esm/components/note/__internal__/{status-with-tooltip/status.component.js → status-icon/status-icon.component.js} +4 -6
- package/esm/components/note/__internal__/status-icon/status-icon.style.d.ts +2 -0
- package/esm/components/note/__internal__/{status-with-tooltip/status.style.js → status-icon/status-icon.style.js} +0 -0
- package/esm/components/note/index.d.ts +2 -2
- package/esm/components/note/note.component.d.ts +28 -0
- package/esm/components/note/note.component.js +188 -46
- package/esm/components/note/note.style.d.ts +13 -0
- package/esm/components/note/note.style.js +0 -5
- package/esm/components/numeral-date/index.d.ts +2 -1
- package/esm/components/numeral-date/numeral-date.component.d.ts +81 -0
- package/esm/components/numeral-date/numeral-date.component.js +237 -128
- package/esm/components/numeral-date/numeral-date.style.d.ts +11 -0
- package/esm/components/portrait/portrait.component.js +1 -1
- package/esm/components/sidebar/sidebar.component.d.ts +2 -2
- package/esm/components/sidebar/sidebar.component.js +106 -2
- package/esm/components/sidebar/sidebar.style.d.ts +1 -6
- package/esm/components/sidebar/sidebar.style.js +7 -2
- package/esm/components/split-button/split-button.component.js +1 -1
- package/esm/components/text-editor/__internal__/decorators/index.d.ts +3 -0
- package/esm/components/text-editor/__internal__/decorators/link-decorator.d.ts +7 -0
- package/esm/components/text-editor/__internal__/utils/index.d.ts +1 -0
- package/esm/components/text-editor/__internal__/utils/utils.d.ts +28 -0
- package/esm/components/text-editor/text-editor.component.d.ts +8 -0
- package/esm/components/text-editor/text-editor.style.d.ts +3 -0
- package/esm/components/textbox/textbox.component.js +1 -1
- package/esm/style/assets/carbon-icons-webfont.woff +0 -0
- package/esm/style/utils/width.d.ts +1 -1
- package/lib/__internal__/form-field/form-field.component.js +1 -1
- package/lib/__internal__/input-icon-toggle/input-icon-toggle.component.js +1 -1
- package/lib/__internal__/label/label.component.js +1 -1
- package/lib/components/action-popover/action-popover-item/action-popover-item.component.js +1 -1
- package/lib/components/action-popover/action-popover-menu-button/action-popover-menu-button.component.js +1 -1
- package/lib/components/button/button.component.js +3 -3
- package/lib/components/button-toggle/button-toggle-icon.component.js +1 -1
- package/lib/components/button-toggle/button-toggle.component.js +1 -1
- package/lib/components/decimal/decimal.component.js +1 -1
- package/lib/components/grouped-character/grouped-character.component.js +1 -1
- package/lib/components/help/help.component.js +1 -1
- package/lib/components/icon/fonts/carbon-icons-webfont.woff +0 -0
- package/lib/components/icon/icon-config.js +1 -1
- package/lib/components/icon/icon-type.d.ts +1 -1
- package/lib/components/icon/icon-unicodes.d.ts +3 -0
- package/lib/components/icon/icon-unicodes.js +5 -2
- package/lib/components/icon/icon.component.js +1 -1
- package/lib/components/link/link.component.js +1 -1
- package/lib/components/multi-action-button/multi-action-button.component.js +1 -1
- package/lib/components/note/__internal__/status-icon/index.d.ts +1 -0
- package/lib/components/note/__internal__/{status-with-tooltip → status-icon}/index.js +2 -2
- package/lib/components/note/__internal__/{status-with-tooltip → status-icon}/package.json +1 -1
- package/lib/components/note/__internal__/status-icon/status-icon.component.d.ts +9 -0
- package/lib/components/note/__internal__/{status-with-tooltip/status.component.js → status-icon/status-icon.component.js} +5 -7
- package/lib/components/note/__internal__/status-icon/status-icon.style.d.ts +2 -0
- package/lib/components/note/__internal__/{status-with-tooltip/status.style.js → status-icon/status-icon.style.js} +0 -0
- package/lib/components/note/index.d.ts +2 -2
- package/lib/components/note/note.component.d.ts +28 -0
- package/lib/components/note/note.component.js +195 -55
- package/lib/components/note/note.style.d.ts +13 -0
- package/lib/components/note/note.style.js +0 -6
- package/lib/components/numeral-date/index.d.ts +2 -1
- package/lib/components/numeral-date/numeral-date.component.d.ts +81 -0
- package/lib/components/numeral-date/numeral-date.component.js +237 -128
- package/lib/components/numeral-date/numeral-date.style.d.ts +11 -0
- package/lib/components/portrait/portrait.component.js +1 -1
- package/lib/components/sidebar/sidebar.component.d.ts +2 -2
- package/lib/components/sidebar/sidebar.component.js +106 -2
- package/lib/components/sidebar/sidebar.style.d.ts +1 -6
- package/lib/components/sidebar/sidebar.style.js +8 -2
- package/lib/components/split-button/split-button.component.js +1 -1
- package/lib/components/text-editor/__internal__/decorators/index.d.ts +3 -0
- package/lib/components/text-editor/__internal__/decorators/link-decorator.d.ts +7 -0
- package/lib/components/text-editor/__internal__/utils/index.d.ts +1 -0
- package/lib/components/text-editor/__internal__/utils/utils.d.ts +28 -0
- package/lib/components/text-editor/text-editor.component.d.ts +8 -0
- package/lib/components/text-editor/text-editor.style.d.ts +3 -0
- package/lib/components/textbox/textbox.component.js +1 -1
- package/lib/style/assets/carbon-icons-webfont.woff +0 -0
- package/lib/style/utils/width.d.ts +1 -1
- package/package.json +3 -2
- package/esm/components/note/__internal__/status-with-tooltip/index.js +0 -1
- package/esm/components/note/note.d.ts +0 -30
- package/esm/components/numeral-date/numeral-date.d.ts +0 -97
- package/lib/components/note/note.d.ts +0 -30
- package/lib/components/numeral-date/numeral-date.d.ts +0 -97
|
@@ -32,7 +32,7 @@ const ICON_SIZES = ["extra-small", "small", "medium", "large", "extra-large"];
|
|
|
32
32
|
exports.ICON_SIZES = ICON_SIZES;
|
|
33
33
|
const ICON_FONT_SIZES = ["small", "medium", "large", "extra-large"];
|
|
34
34
|
exports.ICON_FONT_SIZES = ICON_FONT_SIZES;
|
|
35
|
-
const ICONS = ["add", "admin", "alert", "alert_on", "analysis", "arrow", "arrow_down", "arrow_left", "arrow_left_boxed", "arrow_left_right_small", "arrow_left_small", "arrow_right", "arrow_right_small", "arrow_up", "attach", "bank", "basket", "basket_with_squares", "bin", "blocked", "blocked_square", "block_arrow_right", "bold", "boxed_shapes", "bulk_destroy", "bullet_list", "bullet_list_dotted", "bullet_list_numbers", "business", "calendar", "calendar_today", "call", "camera", "card_view", "caret_down", "caret_left", "caret_right", "caret_up", "caret_large_down", "caret_large_left", "caret_large_right", "caret_large_up", "cart", "chat", "chart_bar", "chart_line", "chart_pie", "chat_notes", "chevron_down", "chevron_left", "chevron_right", "chevron_up", "chevron_down_thick", "chevron_left_thick", "chevron_right_thick", "chevron_up_thick", "circle_with_dots", "circles_connection", "clock", "close", "coins", "collaborate", "computer_clock", "connect", "contacts", "copy", "create", "credit_card", "credit_card_slash", "cross", "cross_circle", "csv", "delete", "delivery", "disconnect", "disputed", "document_right_align", "document_tick", "document_vertical_lines", "download", "drag", "drag_vertical", "draft", "dropdown", "duplicate", "edit", "edited", "email", "email_switch", "entry", "ellipsis_horizontal", "ellipsis_vertical", "envelope_dollar", "envelope_euro", "error", "error_square", "euro", "expand", "factory", "favourite", "favourite_lined", "fax", "feedback", "file_excel", "file_generic", "file_image", "file_pdf", "file_word", "files_leaning", "filter", "filter_new", "fit_height", "fit_width", "flag", "folder", "gift", "go", "graph", "grid", "help", "hide", "home", "image", "in_progress", "in_transit", "individual", "info", "italic", "key", "ledger", "ledger_arrow_left", "ledger_arrow_right", "lightbulb_off", "lightbulb_on", "link", "list_view", "locked", "location", "logout", "lookup", "marker", "message", "minus", "minus_large", "mobile", "money_bag", "none", "old_warning", "palm_tree", "pause", "pause_circle", "pdf", "people", "people_switch", "person", "person_info", "person_tick", "phone", "piggy_bank", "play", "play_circle", "plus", "plus_large", "pound", "print", "progress", "progressed", "question", "question_hollow", "question_mark", "refresh", "refresh_clock", "remove", "sage_coin", "save", "scan", "search", "services", "settings", "settings_old", "share", "shop", "sort_down", "sort_up", "spanner", "split", "split_container", "square_dot", "squares_nine", "stacked_boxes", "stacked_squares", "submitted", "sync", "tag", "talk", "three_boxes", "tick", "tick_circle", "tick_thick", "true_tick", "undo", "unlocked", "upload", "uploaded", "video", "view", "warning"];
|
|
35
|
+
const ICONS = ["add", "admin", "alert", "alert_on", "analysis", "arrow", "arrow_down", "arrow_left", "arrow_left_boxed", "arrow_left_right_small", "arrow_left_small", "arrow_right", "arrow_right_small", "arrow_up", "attach", "bank", "basket", "basket_with_squares", "bin", "blocked", "blocked_square", "block_arrow_right", "bold", "box_arrow_left", "boxed_shapes", "bulk_destroy", "bullet_list", "bullet_list_dotted", "bullet_list_numbers", "business", "calendar", "calendar_today", "call", "camera", "card_view", "caret_down", "caret_left", "caret_right", "caret_up", "caret_large_down", "caret_large_left", "caret_large_right", "caret_large_up", "cart", "chat", "chart_bar", "chart_line", "chart_pie", "chat_notes", "chevron_down", "chevron_left", "chevron_right", "chevron_up", "chevron_down_thick", "chevron_left_thick", "chevron_right_thick", "chevron_up_thick", "circle_with_dots", "circles_connection", "clock", "close", "coins", "collaborate", "computer_clock", "connect", "contacts", "copy", "create", "credit_card", "credit_card_slash", "cross", "cross_circle", "csv", "delete", "delivery", "disconnect", "disputed", "document_right_align", "document_tick", "document_vertical_lines", "download", "drag", "drag_vertical", "draft", "dropdown", "duplicate", "edit", "edited", "email", "email_switch", "entry", "ellipsis_horizontal", "ellipsis_vertical", "envelope_dollar", "envelope_euro", "error", "error_square", "euro", "expand", "factory", "favourite", "favourite_lined", "fax", "feedback", "file_excel", "file_generic", "file_image", "file_pdf", "file_word", "files_leaning", "filter", "filter_new", "fit_height", "fit_width", "flag", "folder", "gift", "go", "graph", "grid", "help", "hide", "home", "image", "in_progress", "in_transit", "individual", "info", "italic", "key", "ledger", "ledger_arrow_left", "ledger_arrow_right", "lightbulb_off", "lightbulb_on", "link", "list_view", "locked", "location", "logout", "lookup", "marker", "message", "minus", "minus_large", "mobile", "money_bag", "none", "old_warning", "palm_tree", "pause", "pause_circle", "pdf", "people", "people_switch", "person", "person_info", "person_tick", "phone", "piggy_bank", "play", "play_circle", "plus", "plus_large", "pound", "print", "progress", "progressed", "question", "question_hollow", "question_mark", "refresh", "refresh_clock", "remove", "sage_coin", "save", "scan", "search", "services", "settings", "settings_old", "share", "shop", "sort_down", "sort_up", "spanner", "split", "split_container", "square_dot", "squares_nine", "stacked_boxes", "stacked_squares", "submitted", "sync", "tag", "talk", "three_boxes", "tick", "tick_circle", "tick_thick", "true_tick", "u_turn_left", "u_turn_right", "undo", "unlocked", "upload", "uploaded", "video", "view", "warning"];
|
|
36
36
|
exports.ICONS = ICONS;
|
|
37
37
|
var _default = dlsConfig;
|
|
38
38
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare type IconType = "add" | "admin" | "alert" | "alert_on" | "analysis" | "arrow" | "arrow_down" | "arrow_left" | "arrow_left_boxed" | "arrow_left_right_small" | "arrow_left_small" | "arrow_right" | "arrow_right_small" | "arrow_up" | "attach" | "bank" | "basket" | "basket_with_squares" | "bin" | "blocked" | "blocked_square" | "block_arrow_right" | "bold" | "boxed_shapes" | "bulk_destroy" | "bullet_list" | "bullet_list_dotted" | "bullet_list_numbers" | "business" | "calendar" | "calendar_today" | "call" | "camera" | "card_view" | "caret_down" | "caret_left" | "caret_right" | "caret_up" | "caret_large_down" | "caret_large_left" | "caret_large_right" | "caret_large_up" | "cart" | "chat" | "chart_bar" | "chart_line" | "chart_pie" | "chat_notes" | "chevron_down" | "chevron_left" | "chevron_right" | "chevron_up" | "chevron_down_thick" | "chevron_left_thick" | "chevron_right_thick" | "chevron_up_thick" | "circle_with_dots" | "circles_connection" | "clock" | "close" | "coins" | "collaborate" | "computer_clock" | "connect" | "contacts" | "copy" | "create" | "credit_card" | "credit_card_slash" | "cross" | "cross_circle" | "csv" | "delete" | "delivery" | "disputed" | "disconnect" | "document_right_align" | "document_tick" | "document_vertical_lines" | "download" | "drag" | "drag_vertical" | "draft" | "dropdown" | "duplicate" | "edit" | "edited" | "email" | "email_switch" | "entry" | "envelope_dollar" | "envelope_euro" | "ellipsis_horizontal" | "ellipsis_vertical" | "error" | "error_square" | "euro" | "expand" | "factory" | "favourite" | "favourite_lined" | "fax" | "feedback" | "file_excel" | "file_generic" | "file_image" | "file_pdf" | "file_word" | "files_leaning" | "filter" | "filter_new" | "fit_height" | "fit_width" | "flag" | "folder" | "gift" | "go" | "graph" | "grid" | "help" | "hide" | "home" | "image" | "in_progress" | "in_transit" | "individual" | "info" | "italic" | "key" | "ledger" | "ledger_arrow_left" | "ledger_arrow_right" | "link" | "lightbulb_off" | "lightbulb_on" | "list_view" | "locked" | "location" | "logout" | "lookup" | "marker" | "message" | "minus" | "minus_large" | "mobile" | "money_bag" | "none" | "old_warning" | "palm_tree" | "pause" | "pause_circle" | "pdf" | "people" | "people_switch" | "person" | "person_info" | "person_tick" | "phone" | "piggy_bank" | "play" | "play_circle" | "plus" | "plus_large" | "pound" | "print" | "progress" | "progressed" | "question" | "question_hollow" | "question_mark" | "refresh" | "refresh_clock" | "remove" | "sage_coin" | "save" | "scan" | "search" | "services" | "settings" | "settings_old" | "share" | "shop" | "sort_down" | "sort_up" | "spanner" | "split" | "split_container" | "square_dot" | "squares_nine" | "stacked_boxes" | "stacked_squares" | "submitted" | "sync" | "tag" | "talk" | "three_boxes" | "tick" | "tick_circle" | "tick_thick" | "true_tick" | "undo" | "unlocked" | "upload" | "uploaded" | "video" | "view" | "warning";
|
|
1
|
+
export declare type IconType = "add" | "admin" | "alert" | "alert_on" | "analysis" | "arrow" | "arrow_down" | "arrow_left" | "arrow_left_boxed" | "arrow_left_right_small" | "arrow_left_small" | "arrow_right" | "arrow_right_small" | "arrow_up" | "attach" | "bank" | "basket" | "basket_with_squares" | "bin" | "blocked" | "blocked_square" | "block_arrow_right" | "bold" | "box_arrow_left" | "boxed_shapes" | "bulk_destroy" | "bullet_list" | "bullet_list_dotted" | "bullet_list_numbers" | "business" | "calendar" | "calendar_today" | "call" | "camera" | "card_view" | "caret_down" | "caret_left" | "caret_right" | "caret_up" | "caret_large_down" | "caret_large_left" | "caret_large_right" | "caret_large_up" | "cart" | "chat" | "chart_bar" | "chart_line" | "chart_pie" | "chat_notes" | "chevron_down" | "chevron_left" | "chevron_right" | "chevron_up" | "chevron_down_thick" | "chevron_left_thick" | "chevron_right_thick" | "chevron_up_thick" | "circle_with_dots" | "circles_connection" | "clock" | "close" | "coins" | "collaborate" | "computer_clock" | "connect" | "contacts" | "copy" | "create" | "credit_card" | "credit_card_slash" | "cross" | "cross_circle" | "csv" | "delete" | "delivery" | "disputed" | "disconnect" | "document_right_align" | "document_tick" | "document_vertical_lines" | "download" | "drag" | "drag_vertical" | "draft" | "dropdown" | "duplicate" | "edit" | "edited" | "email" | "email_switch" | "entry" | "envelope_dollar" | "envelope_euro" | "ellipsis_horizontal" | "ellipsis_vertical" | "error" | "error_square" | "euro" | "expand" | "factory" | "favourite" | "favourite_lined" | "fax" | "feedback" | "file_excel" | "file_generic" | "file_image" | "file_pdf" | "file_word" | "files_leaning" | "filter" | "filter_new" | "fit_height" | "fit_width" | "flag" | "folder" | "gift" | "go" | "graph" | "grid" | "help" | "hide" | "home" | "image" | "in_progress" | "in_transit" | "individual" | "info" | "italic" | "key" | "ledger" | "ledger_arrow_left" | "ledger_arrow_right" | "link" | "lightbulb_off" | "lightbulb_on" | "list_view" | "locked" | "location" | "logout" | "lookup" | "marker" | "message" | "minus" | "minus_large" | "mobile" | "money_bag" | "none" | "old_warning" | "palm_tree" | "pause" | "pause_circle" | "pdf" | "people" | "people_switch" | "person" | "person_info" | "person_tick" | "phone" | "piggy_bank" | "play" | "play_circle" | "plus" | "plus_large" | "pound" | "print" | "progress" | "progressed" | "question" | "question_hollow" | "question_mark" | "refresh" | "refresh_clock" | "remove" | "sage_coin" | "save" | "scan" | "search" | "services" | "settings" | "settings_old" | "share" | "shop" | "sort_down" | "sort_up" | "spanner" | "split" | "split_container" | "square_dot" | "squares_nine" | "stacked_boxes" | "stacked_squares" | "submitted" | "sync" | "tag" | "talk" | "three_boxes" | "tick" | "tick_circle" | "tick_thick" | "true_tick" | "u_turn_left" | "u_turn_right" | "undo" | "unlocked" | "upload" | "uploaded" | "video" | "view" | "warning";
|
|
@@ -144,6 +144,8 @@ declare namespace iconUnicodes {
|
|
|
144
144
|
export const fit_width: string;
|
|
145
145
|
export const ellipsis_horizontal: string;
|
|
146
146
|
export const ellipsis_vertical: string;
|
|
147
|
+
export const u_turn_left: string;
|
|
148
|
+
export const u_turn_right: string;
|
|
147
149
|
export const cart: string;
|
|
148
150
|
export const basket_with_squares: string;
|
|
149
151
|
const _delete: string;
|
|
@@ -216,6 +218,7 @@ declare namespace iconUnicodes {
|
|
|
216
218
|
export const bold: string;
|
|
217
219
|
export const italic: string;
|
|
218
220
|
export const undo: string;
|
|
221
|
+
export const box_arrow_left: string;
|
|
219
222
|
export const home: string;
|
|
220
223
|
export const settings: string;
|
|
221
224
|
export const search: string;
|
|
@@ -95,7 +95,8 @@ const actions = {
|
|
|
95
95
|
lookup: "\\e96f",
|
|
96
96
|
bold: "\\e98c",
|
|
97
97
|
italic: "\\e98b",
|
|
98
|
-
undo: "\\e9aa"
|
|
98
|
+
undo: "\\e9aa",
|
|
99
|
+
box_arrow_left: "\\f006"
|
|
99
100
|
};
|
|
100
101
|
const batchActions = {
|
|
101
102
|
cart: "\\e90a",
|
|
@@ -134,7 +135,9 @@ const navigation = {
|
|
|
134
135
|
fit_height: "\\e909",
|
|
135
136
|
fit_width: "\\e908",
|
|
136
137
|
ellipsis_horizontal: "\\e960",
|
|
137
|
-
ellipsis_vertical: "\\e961"
|
|
138
|
+
ellipsis_vertical: "\\e961",
|
|
139
|
+
u_turn_left: "\\f004",
|
|
140
|
+
u_turn_right: "\\f005"
|
|
138
141
|
};
|
|
139
142
|
const statusSymbols = {
|
|
140
143
|
error: "\\e923",
|
|
@@ -332,7 +332,7 @@ Icon.propTypes = {
|
|
|
332
332
|
"tooltipMessage": _propTypes.default.node,
|
|
333
333
|
"tooltipPosition": _propTypes.default.oneOf(["bottom", "left", "right", "top"]),
|
|
334
334
|
"tooltipVisible": _propTypes.default.bool,
|
|
335
|
-
"type": _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", "maintenance", "marker", "message", "messages", "minus_large", "minus", "mobile", "money_bag", "new", "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", "success", "sync", "tag", "talk", "three_boxes", "tick_circle", "tick_thick", "tick", "true_tick", "undo", "unlocked", "upload", "uploaded", "video", "view", "warning"]).isRequired
|
|
335
|
+
"type": _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", "maintenance", "marker", "message", "messages", "minus_large", "minus", "mobile", "money_bag", "new", "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", "success", "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"]).isRequired
|
|
336
336
|
};
|
|
337
337
|
Icon.displayName = "Icon";
|
|
338
338
|
var _default = Icon;
|
|
@@ -175,7 +175,7 @@ Link.propTypes = {
|
|
|
175
175
|
"className": _propTypes.default.string,
|
|
176
176
|
"disabled": _propTypes.default.bool,
|
|
177
177
|
"href": _propTypes.default.string,
|
|
178
|
-
"icon": _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"]),
|
|
178
|
+
"icon": _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"]),
|
|
179
179
|
"iconAlign": _propTypes.default.oneOf(["left", "right"]),
|
|
180
180
|
"isDarkBackground": _propTypes.default.bool,
|
|
181
181
|
"isSkipLink": _propTypes.default.bool,
|
|
@@ -244,7 +244,7 @@ MultiActionButton.propTypes = {
|
|
|
244
244
|
"formTarget": _propTypes.default.string,
|
|
245
245
|
"hidden": _propTypes.default.bool,
|
|
246
246
|
"iconPosition": _propTypes.default.oneOf(["after", "before"]),
|
|
247
|
-
"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"]),
|
|
247
|
+
"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"]),
|
|
248
248
|
"id": _propTypes.default.string,
|
|
249
249
|
"inlist": _propTypes.default.any,
|
|
250
250
|
"inputMode": _propTypes.default.oneOf(["decimal", "email", "none", "numeric", "search", "tel", "text", "url"]),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./status-icon.component";
|
|
@@ -6,10 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "default", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function () {
|
|
9
|
-
return
|
|
9
|
+
return _statusIcon.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _statusIcon = _interopRequireDefault(require("./status-icon.component"));
|
|
14
14
|
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface StatusIconProps {
|
|
3
|
+
/** renders a control for the Note */
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
/** Content for the tooltip */
|
|
6
|
+
tooltipMessage: string;
|
|
7
|
+
}
|
|
8
|
+
declare const StatusIcon: React.ForwardRefExoticComponent<StatusIconProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export default StatusIcon;
|
|
@@ -9,7 +9,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _statusIcon = _interopRequireDefault(require("./status-icon.style"));
|
|
13
13
|
|
|
14
14
|
var _tooltip = _interopRequireDefault(require("../../../tooltip"));
|
|
15
15
|
|
|
@@ -21,18 +21,16 @@ const StatusIcon = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
21
21
|
}, ref) => {
|
|
22
22
|
return /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
23
23
|
message: tooltipMessage
|
|
24
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
24
|
+
}, /*#__PURE__*/_react.default.createElement(_statusIcon.default, {
|
|
25
25
|
"data-component": "status-with-tooltip",
|
|
26
26
|
ref: ref
|
|
27
27
|
}, children));
|
|
28
28
|
});
|
|
29
29
|
|
|
30
30
|
StatusIcon.propTypes = {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
/** Content for the tooltip */
|
|
35
|
-
tooltipMessage: _propTypes.default.string.isRequired
|
|
31
|
+
"children": _propTypes.default.node,
|
|
32
|
+
"tooltipMessage": _propTypes.default.string.isRequired
|
|
36
33
|
};
|
|
34
|
+
StatusIcon.displayName = "StatusIcon";
|
|
37
35
|
var _default = StatusIcon;
|
|
38
36
|
exports.default = _default;
|
|
File without changes
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from "./note";
|
|
2
|
-
export
|
|
1
|
+
export { default } from "./note.component";
|
|
2
|
+
export type { NoteProps } from "./note.component";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { EditorState } from "draft-js";
|
|
3
|
+
import { MarginProps } from "styled-system";
|
|
4
|
+
export interface NoteProps extends MarginProps {
|
|
5
|
+
/** Adds a created on date to the Note footer */
|
|
6
|
+
createdDate: string;
|
|
7
|
+
/** renders a control for the Note */
|
|
8
|
+
inlineControl?: React.ReactNode;
|
|
9
|
+
/** Adds a name to the Note footer */
|
|
10
|
+
name?: string;
|
|
11
|
+
/** The rich text content to display in the Note */
|
|
12
|
+
noteContent: EditorState;
|
|
13
|
+
/** Callback to report a url when a link is added */
|
|
14
|
+
onLinkAdded?: (url: string) => void;
|
|
15
|
+
/** The previews to display of any links added to the Editor */
|
|
16
|
+
previews?: React.ReactNode;
|
|
17
|
+
/** Adds a status and tooltip to the Note footer */
|
|
18
|
+
status?: {
|
|
19
|
+
text: string;
|
|
20
|
+
timeStamp: string;
|
|
21
|
+
};
|
|
22
|
+
/** Adds a Title to the Note */
|
|
23
|
+
title?: string;
|
|
24
|
+
/** Set a percentage-based width for the whole Note component, relative to its parent. */
|
|
25
|
+
width?: number;
|
|
26
|
+
}
|
|
27
|
+
export declare const Note: ({ createdDate, inlineControl, name, noteContent, onLinkAdded, previews, status, title, width, ...rest }: NoteProps) => JSX.Element;
|
|
28
|
+
export default Note;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = void 0;
|
|
6
|
+
exports.default = exports.Note = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -11,38 +11,38 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
|
|
12
12
|
var _draftJs = require("draft-js");
|
|
13
13
|
|
|
14
|
-
var _propTypes2 = _interopRequireDefault(require("@styled-system/prop-types"));
|
|
15
|
-
|
|
16
14
|
var _invariant = _interopRequireDefault(require("invariant"));
|
|
17
15
|
|
|
18
|
-
var
|
|
16
|
+
var _note = require("./note.style");
|
|
19
17
|
|
|
20
|
-
var
|
|
18
|
+
var _statusIcon = _interopRequireDefault(require("./__internal__/status-icon"));
|
|
21
19
|
|
|
22
20
|
var _actionPopover = require("../action-popover");
|
|
23
21
|
|
|
24
|
-
var _utils = require("
|
|
25
|
-
|
|
26
|
-
var _utils2 = require("../text-editor/__internal__/utils");
|
|
22
|
+
var _utils = require("../text-editor/__internal__/utils");
|
|
27
23
|
|
|
28
24
|
var _textEditor = require("../text-editor/text-editor.component");
|
|
29
25
|
|
|
26
|
+
var _linkPreview = _interopRequireDefault(require("../link-preview"));
|
|
27
|
+
|
|
30
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
29
|
|
|
32
30
|
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); }
|
|
33
31
|
|
|
34
|
-
|
|
32
|
+
function hasExpectedDisplayName(child, displayName) {
|
|
33
|
+
return child.type.displayName === displayName;
|
|
34
|
+
}
|
|
35
35
|
|
|
36
36
|
const Note = ({
|
|
37
|
-
|
|
38
|
-
width = 100,
|
|
37
|
+
createdDate,
|
|
39
38
|
inlineControl,
|
|
40
|
-
title,
|
|
41
39
|
name,
|
|
42
|
-
|
|
43
|
-
status,
|
|
44
|
-
previews,
|
|
40
|
+
noteContent,
|
|
45
41
|
onLinkAdded,
|
|
42
|
+
previews,
|
|
43
|
+
status,
|
|
44
|
+
title,
|
|
45
|
+
width = 100,
|
|
46
46
|
...rest
|
|
47
47
|
}) => {
|
|
48
48
|
!(width > 0) ? process.env.NODE_ENV !== "production" ? (0, _invariant.default)(false, "<Note> width must be greater than 0") : (0, _invariant.default)(false) : void 0;
|
|
@@ -50,7 +50,7 @@ const Note = ({
|
|
|
50
50
|
!noteContent ? process.env.NODE_ENV !== "production" ? (0, _invariant.default)(false, "<Note> noteContent is required") : (0, _invariant.default)(false) : void 0;
|
|
51
51
|
!(!status || status.text) ? process.env.NODE_ENV !== "production" ? (0, _invariant.default)(false, "<Note> status.text is required") : (0, _invariant.default)(false) : void 0;
|
|
52
52
|
!(!status || status.timeStamp) ? process.env.NODE_ENV !== "production" ? (0, _invariant.default)(false, "<Note> status.timeStamp is required") : (0, _invariant.default)(false) : void 0;
|
|
53
|
-
!(!inlineControl || inlineControl.type === _actionPopover.ActionPopover) ? process.env.NODE_ENV !== "production" ? (0, _invariant.default)(false, "<Note> inlineControl must be an instance of <ActionPopover>") : (0, _invariant.default)(false) : void 0;
|
|
53
|
+
!(!inlineControl || /*#__PURE__*/_react.default.isValidElement(inlineControl) && inlineControl.type === _actionPopover.ActionPopover) ? process.env.NODE_ENV !== "production" ? (0, _invariant.default)(false, "<Note> inlineControl must be an instance of <ActionPopover>") : (0, _invariant.default)(false) : void 0;
|
|
54
54
|
|
|
55
55
|
const renderStatus = () => {
|
|
56
56
|
if (!status) {
|
|
@@ -61,10 +61,10 @@ const Note = ({
|
|
|
61
61
|
text,
|
|
62
62
|
timeStamp
|
|
63
63
|
} = status;
|
|
64
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
64
|
+
return /*#__PURE__*/_react.default.createElement(_note.StyledFooterContent, {
|
|
65
65
|
hasName: !!name,
|
|
66
66
|
"data-component": "note-status"
|
|
67
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
67
|
+
}, /*#__PURE__*/_react.default.createElement(_statusIcon.default, {
|
|
68
68
|
tooltipMessage: timeStamp
|
|
69
69
|
}, text));
|
|
70
70
|
};
|
|
@@ -74,56 +74,196 @@ const Note = ({
|
|
|
74
74
|
onLinkAdded,
|
|
75
75
|
editMode: false
|
|
76
76
|
}
|
|
77
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
77
|
+
}, /*#__PURE__*/_react.default.createElement(_note.StyledNote, _extends({
|
|
78
78
|
width: width
|
|
79
79
|
}, rest, {
|
|
80
80
|
"data-component": "note"
|
|
81
|
-
}), title && /*#__PURE__*/_react.default.createElement(
|
|
81
|
+
}), title && /*#__PURE__*/_react.default.createElement(_note.StyledTitle, null, title), inlineControl && /*#__PURE__*/_react.default.createElement(_note.StyledInlineControl, null, inlineControl), /*#__PURE__*/_react.default.createElement(_note.StyledNoteContent, null, /*#__PURE__*/_react.default.createElement(_draftJs.Editor, {
|
|
82
82
|
readOnly: true,
|
|
83
|
-
editorState: (0,
|
|
84
|
-
|
|
83
|
+
editorState: (0, _utils.getDecoratedValue)(noteContent),
|
|
84
|
+
onChange:
|
|
85
|
+
/* istanbul ignore next */
|
|
86
|
+
() => {}
|
|
87
|
+
})), _react.default.Children.map(previews, preview => /*#__PURE__*/_react.default.isValidElement(preview) && hasExpectedDisplayName(preview, _linkPreview.default.displayName) ? /*#__PURE__*/_react.default.cloneElement(preview, {
|
|
85
88
|
as: "a",
|
|
86
89
|
onClose: undefined
|
|
87
|
-
})), createdDate && /*#__PURE__*/_react.default.createElement(
|
|
90
|
+
}) : preview), createdDate && /*#__PURE__*/_react.default.createElement(_note.StyledNoteContent, {
|
|
88
91
|
hasPreview: !!_react.default.Children.count(previews)
|
|
89
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
92
|
+
}, /*#__PURE__*/_react.default.createElement(_note.StyledFooter, null, name && /*#__PURE__*/_react.default.createElement(_note.StyledFooterContent, {
|
|
90
93
|
hasName: !!name
|
|
91
|
-
}, name), /*#__PURE__*/_react.default.createElement(
|
|
94
|
+
}, name), /*#__PURE__*/_react.default.createElement(_note.StyledFooterContent, {
|
|
92
95
|
hasName: !!name
|
|
93
96
|
}, createdDate), renderStatus()))));
|
|
94
97
|
};
|
|
95
98
|
|
|
96
|
-
Note
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
99
|
+
exports.Note = Note;
|
|
100
|
+
Note.propTypes = {
|
|
101
|
+
"createdDate": _propTypes.default.string.isRequired,
|
|
102
|
+
"inlineControl": _propTypes.default.node,
|
|
103
|
+
"m": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
|
|
104
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
105
|
+
"description": _propTypes.default.string,
|
|
106
|
+
"toString": _propTypes.default.func.isRequired,
|
|
107
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
108
|
+
}), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
109
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
110
|
+
"description": _propTypes.default.string,
|
|
111
|
+
"toString": _propTypes.default.func.isRequired,
|
|
112
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
113
|
+
}), _propTypes.default.string]),
|
|
114
|
+
"margin": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
|
|
115
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
116
|
+
"description": _propTypes.default.string,
|
|
117
|
+
"toString": _propTypes.default.func.isRequired,
|
|
118
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
119
|
+
}), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
120
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
121
|
+
"description": _propTypes.default.string,
|
|
122
|
+
"toString": _propTypes.default.func.isRequired,
|
|
123
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
124
|
+
}), _propTypes.default.string]),
|
|
125
|
+
"marginBottom": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
|
|
126
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
127
|
+
"description": _propTypes.default.string,
|
|
128
|
+
"toString": _propTypes.default.func.isRequired,
|
|
129
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
130
|
+
}), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
131
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
132
|
+
"description": _propTypes.default.string,
|
|
133
|
+
"toString": _propTypes.default.func.isRequired,
|
|
134
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
135
|
+
}), _propTypes.default.string]),
|
|
136
|
+
"marginLeft": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
|
|
137
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
138
|
+
"description": _propTypes.default.string,
|
|
139
|
+
"toString": _propTypes.default.func.isRequired,
|
|
140
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
141
|
+
}), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
142
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
143
|
+
"description": _propTypes.default.string,
|
|
144
|
+
"toString": _propTypes.default.func.isRequired,
|
|
145
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
146
|
+
}), _propTypes.default.string]),
|
|
147
|
+
"marginRight": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
|
|
148
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
149
|
+
"description": _propTypes.default.string,
|
|
150
|
+
"toString": _propTypes.default.func.isRequired,
|
|
151
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
152
|
+
}), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
153
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
154
|
+
"description": _propTypes.default.string,
|
|
155
|
+
"toString": _propTypes.default.func.isRequired,
|
|
156
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
157
|
+
}), _propTypes.default.string]),
|
|
158
|
+
"marginTop": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
|
|
159
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
160
|
+
"description": _propTypes.default.string,
|
|
161
|
+
"toString": _propTypes.default.func.isRequired,
|
|
162
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
163
|
+
}), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
164
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
165
|
+
"description": _propTypes.default.string,
|
|
166
|
+
"toString": _propTypes.default.func.isRequired,
|
|
167
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
168
|
+
}), _propTypes.default.string]),
|
|
169
|
+
"marginX": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
|
|
170
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
171
|
+
"description": _propTypes.default.string,
|
|
172
|
+
"toString": _propTypes.default.func.isRequired,
|
|
173
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
174
|
+
}), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
175
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
176
|
+
"description": _propTypes.default.string,
|
|
177
|
+
"toString": _propTypes.default.func.isRequired,
|
|
178
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
179
|
+
}), _propTypes.default.string]),
|
|
180
|
+
"marginY": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
|
|
181
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
182
|
+
"description": _propTypes.default.string,
|
|
183
|
+
"toString": _propTypes.default.func.isRequired,
|
|
184
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
185
|
+
}), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
186
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
187
|
+
"description": _propTypes.default.string,
|
|
188
|
+
"toString": _propTypes.default.func.isRequired,
|
|
189
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
190
|
+
}), _propTypes.default.string]),
|
|
191
|
+
"mb": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
|
|
192
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
193
|
+
"description": _propTypes.default.string,
|
|
194
|
+
"toString": _propTypes.default.func.isRequired,
|
|
195
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
196
|
+
}), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
197
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
198
|
+
"description": _propTypes.default.string,
|
|
199
|
+
"toString": _propTypes.default.func.isRequired,
|
|
200
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
201
|
+
}), _propTypes.default.string]),
|
|
202
|
+
"ml": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
|
|
203
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
204
|
+
"description": _propTypes.default.string,
|
|
205
|
+
"toString": _propTypes.default.func.isRequired,
|
|
206
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
207
|
+
}), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
208
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
209
|
+
"description": _propTypes.default.string,
|
|
210
|
+
"toString": _propTypes.default.func.isRequired,
|
|
211
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
212
|
+
}), _propTypes.default.string]),
|
|
213
|
+
"mr": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
|
|
214
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
215
|
+
"description": _propTypes.default.string,
|
|
216
|
+
"toString": _propTypes.default.func.isRequired,
|
|
217
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
218
|
+
}), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
219
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
220
|
+
"description": _propTypes.default.string,
|
|
221
|
+
"toString": _propTypes.default.func.isRequired,
|
|
222
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
223
|
+
}), _propTypes.default.string]),
|
|
224
|
+
"mt": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
|
|
225
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
226
|
+
"description": _propTypes.default.string,
|
|
227
|
+
"toString": _propTypes.default.func.isRequired,
|
|
228
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
229
|
+
}), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
230
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
231
|
+
"description": _propTypes.default.string,
|
|
232
|
+
"toString": _propTypes.default.func.isRequired,
|
|
233
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
234
|
+
}), _propTypes.default.string]),
|
|
235
|
+
"mx": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
|
|
236
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
237
|
+
"description": _propTypes.default.string,
|
|
238
|
+
"toString": _propTypes.default.func.isRequired,
|
|
239
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
240
|
+
}), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
241
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
242
|
+
"description": _propTypes.default.string,
|
|
243
|
+
"toString": _propTypes.default.func.isRequired,
|
|
244
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
245
|
+
}), _propTypes.default.string]),
|
|
246
|
+
"my": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
|
|
247
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
248
|
+
"description": _propTypes.default.string,
|
|
249
|
+
"toString": _propTypes.default.func.isRequired,
|
|
250
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
251
|
+
}), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
|
|
252
|
+
"__@toStringTag": _propTypes.default.string.isRequired,
|
|
253
|
+
"description": _propTypes.default.string,
|
|
254
|
+
"toString": _propTypes.default.func.isRequired,
|
|
255
|
+
"valueOf": _propTypes.default.func.isRequired
|
|
256
|
+
}), _propTypes.default.string]),
|
|
257
|
+
"name": _propTypes.default.string,
|
|
258
|
+
"noteContent": _propTypes.default.object.isRequired,
|
|
259
|
+
"onLinkAdded": _propTypes.default.func,
|
|
260
|
+
"previews": _propTypes.default.node,
|
|
261
|
+
"status": _propTypes.default.shape({
|
|
262
|
+
"text": _propTypes.default.string.isRequired,
|
|
263
|
+
"timeStamp": _propTypes.default.string.isRequired
|
|
120
264
|
}),
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
previews: _propTypes.default.arrayOf(_propTypes.default.node),
|
|
124
|
-
|
|
125
|
-
/** Callback to report a url when a link is added */
|
|
126
|
-
onLinkAdded: _propTypes.default.func
|
|
265
|
+
"title": _propTypes.default.string,
|
|
266
|
+
"width": _propTypes.default.number
|
|
127
267
|
};
|
|
128
268
|
var _default = Note;
|
|
129
269
|
exports.default = _default;
|