UNPKG

@mskcc/carbon-react

Version:

Carbon react components for the MSKCC DSM

68 lines (60 loc) 8.04 kB
/** * MSKCC 2021, 2024 */ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js'); var React = require('react'); var cx = require('classnames'); var PropTypes = require('prop-types'); function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } var React__default = /*#__PURE__*/_interopDefaultLegacy(React); var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx); var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes); const IconSizes = ['default', 'sm', 'md', 'lg', 'xl', 'xxl']; const IconColors = ['default', 'black', 'white', 'blue', 'warm-gray', 'gray', 'cool-gray', 'cyan', 'green', 'magenta', 'orange', 'purple', 'red', 'teal', 'yellow']; const Icon = props => { const { icon = 'schedule', className, size = 'default', color = 'inherit', lowContrast, ...rest } = props; const classNameIcons = cx__default["default"]('msk-icon', className, { [`msk-icon--${size}`]: size !== 'default', [`msk-icon--${color}`]: color, 'msk-icon--low-contrast': lowContrast }); return /*#__PURE__*/React__default["default"].createElement("span", _rollupPluginBabelHelpers["extends"]({}, rest, { className: classNameIcons }), icon); }; Icon.displayName = 'Icon'; Icon.propTypes = { /** * Specify an optional className to be applied to the <Icon> node */ className: PropTypes__default["default"].string, /** * Specify the color of the icon. */ color: PropTypes__default["default"].oneOf(['default', 'black', 'white', 'blue', 'warm-gray', 'gray', 'cool-gray', 'cyan', 'green', 'magenta', 'orange', 'purple', 'red', 'teal', 'yellow']), /** * Specify the icon to use. */ icon: PropTypes__default["default"].oneOf(['a_positive', 'ab_negative', 'ab_positive', 'ac_unit', 'access_time_filled', 'accessibility_new', 'accessible_forward', 'accessible', 'account_box', 'account_circle', 'add_alert', 'add_location', 'add', 'airline_seat_flat_angled', 'airline_seat_flat', 'airline_seat_individual_suite', 'alarm_add', 'alarm_off', 'alarm_on', 'alarm', 'alternate_email', 'android', 'apartment', 'apple', 'apps', 'arrow_circle_down', 'arrow_circle_left', 'arrow_circle_right', 'arrow_circle_up', 'arrow_drop_down', 'arrow_drop_up', 'arrow_left', 'arrow_right', 'attach_file', 'auto_stories', 'autorenew', 'b_negative', 'b_positive', 'baby_changing_station', 'backspace', 'bar_chart', 'biotech', 'block', 'bluetooth', 'bolt', 'bookmark_add', 'bookmark_added', 'bookmark_border', 'bookmark', 'bookmarks', 'bottle', 'brightness_4', 'bug_report', 'build', 'business_center', 'calendar_today', 'call_end', 'camera_alt', 'campaign', 'cancel', 'car_rental', 'cards', 'chat_bubble_outline', 'chat_bubble', 'chat', 'check_circle_outline', 'check_circle', 'check', 'chevron_left', 'chevron_right', 'child_friendly', 'church', 'clean_hands', 'clear', 'clipboard_heart', 'closed_caption_disabled', 'closed_caption', 'code', 'coffee', 'comment', 'commute', 'contact_page', 'contact_support', 'content_copy', 'content_cut', 'content_paste', 'cookie', 'coronavirus', 'create_new_folder', 'credit_card', 'data_array', 'data_object', 'delete_outline', 'delete', 'description', 'desktop_access_disabled', 'desktop_windows', 'device_thermostat', 'directions_bike', 'directions_bus', 'directions_car', 'directions_run', 'directions_transit', 'directions_walk', 'directions', 'docx', 'download', 'drafts', 'drag_indicator', 'drive_folder_upload', 'east', 'edit_off', 'edit', 'elderly', 'elevator', 'email', 'emergency', 'emoji_food_beverage', 'emoji_people', 'error_outline', 'error', 'escalator_warning', 'event_available', 'event_busy', 'expand_less', 'expand_more', 'explore', 'extension', 'facebook', 'family_restroom', 'fast_forward', 'fast_rewind', 'favorite_border', 'favorite', 'female', 'file_copy', 'file_present', 'filter_alt_off', 'filter_alt', 'fingerprint', 'first_page', 'fitbit', 'fitness_center', 'flag', 'flight', 'folder_open', 'folder_special', 'folder_zip', 'folder', 'format_align_justify', 'format_align_left', 'format_align_right', 'format_bold', 'format_italic', 'format_list_bulleted', 'format_list_numbered', 'format_quote', 'format_underlined', 'forum', 'forward', 'front_hand', 'gift', 'gpp_bad', 'gps_fixed', 'group_add', 'group_off', 'group_remove', 'groups', 'headset_mic', 'healing', 'hearing_disabled', 'hearing', 'help_center', 'help_outline', 'help', 'herbal', 'highlight_off', 'hiking', 'history', 'home', 'hourglass_empty', 'hourglass_full', 'icecream', 'import_contacts', 'info', 'insert_drive_file', 'instagram', 'inventory_2', 'jpg', 'keyboard_capslock', 'keyboard_command_key', 'keyboard_double_arrow_down', 'keyboard_double_arrow_left', 'keyboard_double_arrow_right', 'keyboard_double_arrow_up', 'keyboard_option_key', 'keyboard_return', 'label_important', 'label', 'language', 'laptop', 'last_page', 'library_books', 'lightbulb', 'link', 'linkedin', 'local_bar', 'local_cafe', 'local_fire_department', 'local_florist', 'local_grocery_store', 'local_hospital', 'local_library', 'local_parking', 'local_pharmacy', 'local_police', 'local_taxi', 'location_on', 'lock_open_outline', 'lock_open', 'lock_outline', 'lock', 'login', 'logout', 'lunch_dining', 'mail_outline', 'male', 'man', 'map', 'masks', 'medical_record', 'medical_services', 'menu_book', 'menu', 'mic_off', 'mic', 'miscellaneous_services', 'mode_comment', 'monitor_heart', 'monitor_weight', 'more_horiz', 'more_vert', 'msk', 'mp3', 'mp4', 'navigation', 'near_me_disabled', 'near_me', 'no_drinks', 'no_food', 'no_meals', 'north', 'note_add', 'notifications_none', 'notifications_off', 'notifications', 'o_negative', 'o_positive', 'open_in_browser', 'open_in_new', 'open_quote', 'orbital', 'outlined_flag', 'pan_tool', 'pause_circle_filled', 'pdf', 'pedal_bike', 'people', 'person_add_alt', 'person_remove', 'person', 'pets', 'phone', 'pills', 'pinch', 'play_arrow', 'play_circle_filled', 'play_circle_outline', 'png', 'pool', 'pptx', 'pregnant_woman', 'print', 'priority_high', 'psychology', 'public', 'publish', 'push_pin', 'quiet_space', 'recycling', 'redo', 'refresh', 'remove_moderator', 'remove', 'replay', 'reply_all', 'reply', 'report', 'restaurant', 'rss_feed', 'rule', 'sanitizer', 'save_alt', 'save', 'schedule', 'school', 'science', 'screen_share', 'search', 'security', 'self_improvement', 'sell', 'send', 'sentiment_dissatisfied', 'sentiment_satisfied', 'settings', 'share', 'sheets_outline', 'shield', 'show_chart', 'signal_wifi_0_bar', 'signal_wifi_4_bar', 'signal_wifi_off', 'skip_next', 'skip_previous', 'smartphone', 'smoke_free', 'smoking_rooms', 'soap', 'social_distance', 'sort_by_alpha', 'sort', 'south', 'sports_handball', 'star_border', 'star', 'stethoscope', 'stop_screen_share', 'stop', 'subway', 'supervisor_account', 'support', 'swipe_down', 'swipe_left', 'swipe_right', 'swipe_up', 'swipe_vertical', 'swipe', 'sync_alt', 'syringe', 'tablet_android', 'task', 'text_decrease', 'text_fields', 'text_increase', 'thumb_down', 'thumb_up', 'thumbs_up_down', 'today', 'topic', 'touch_app', 'transgender', 'translate', 'trending_down', 'trending_up', 'tune', 'twitter', 'undo', 'unfold_less', 'unfold_more', 'update', 'upload_file', 'vaccines', 'verified_user', 'verified', 'videocam_off', 'videocam', 'visibility_off', 'visibility', 'voicemail', 'volume_down', 'volume_mute', 'volume_off', 'volume_up', 'volunteer_activism', 'vpn_key', 'warning_amber', 'warning', 'wash', 'watch', 'water_drop', 'water', 'wc', 'west', 'woman', 'work', 'workspace_premium', 'xlsx', 'youtube', 'zoom_in', 'zoom_out']), /** * Specify whether you are using the low contrast variant of the icon. */ lowContrast: PropTypes__default["default"].bool, /** * Specify the size of the icon. 'md' is default. */ size: PropTypes__default["default"].oneOf(['sm', 'md', 'lg', 'xl', 'xxl']) }; exports.Icon = Icon; exports.IconColors = IconColors; exports.IconSizes = IconSizes; exports["default"] = Icon;