@atlaskit/icon 22.2.0 → 22.3.1
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/CHANGELOG.md +25 -0
- package/UNSAFE_base-new/package.json +15 -0
- package/afm-cc/tsconfig.json +3 -0
- package/afm-jira/tsconfig.json +28 -0
- package/build/index.tsx +79 -11
- package/codemods/21.2.0-metadata-entry.tsx +3 -2
- package/core/add.d.ts +9 -0
- package/core/add.js +26 -0
- package/core/ai-agent.d.ts +9 -0
- package/core/ai-agent.js +26 -0
- package/core/ai-chat.d.ts +9 -0
- package/core/ai-chat.js +26 -0
- package/core/alert.d.ts +9 -0
- package/core/alert.js +26 -0
- package/core/align-center.d.ts +9 -0
- package/core/align-center.js +26 -0
- package/core/align-left.d.ts +9 -0
- package/core/align-left.js +26 -0
- package/core/align-right.d.ts +9 -0
- package/core/align-right.js +26 -0
- package/core/angle-brackets.d.ts +9 -0
- package/core/angle-brackets.js +26 -0
- package/core/app.d.ts +9 -0
- package/core/app.js +26 -0
- package/core/apps.d.ts +9 -0
- package/core/apps.js +26 -0
- package/core/archive-box.d.ts +9 -0
- package/core/archive-box.js +26 -0
- package/core/arrow-down.d.ts +9 -0
- package/core/arrow-down.js +26 -0
- package/core/arrow-left.d.ts +9 -0
- package/core/arrow-left.js +26 -0
- package/core/arrow-right.d.ts +9 -0
- package/core/arrow-right.js +26 -0
- package/core/arrow-up-right.d.ts +9 -0
- package/core/arrow-up-right.js +26 -0
- package/core/arrow-up.d.ts +9 -0
- package/core/arrow-up.js +26 -0
- package/core/atlassian-intelligence.d.ts +9 -0
- package/core/atlassian-intelligence.js +26 -0
- package/core/attachment.d.ts +9 -0
- package/core/attachment.js +26 -0
- package/core/audio.d.ts +9 -0
- package/core/audio.js +25 -0
- package/core/automation.d.ts +9 -0
- package/core/automation.js +26 -0
- package/core/backlog.d.ts +9 -0
- package/core/backlog.js +26 -0
- package/core/board.d.ts +9 -0
- package/core/board.js +26 -0
- package/core/boards.d.ts +9 -0
- package/core/boards.js +26 -0
- package/core/book-with-bookmark.d.ts +9 -0
- package/core/book-with-bookmark.js +26 -0
- package/core/branch.d.ts +9 -0
- package/core/branch.js +26 -0
- package/core/briefcase.d.ts +9 -0
- package/core/briefcase.js +26 -0
- package/core/bug.d.ts +9 -0
- package/core/bug.js +26 -0
- package/core/bulleted-list.d.ts +9 -0
- package/core/bulleted-list.js +26 -0
- package/core/calendar.d.ts +9 -0
- package/core/calendar.js +26 -0
- package/core/camera.d.ts +9 -0
- package/core/camera.js +26 -0
- package/core/capture.d.ts +9 -0
- package/core/capture.js +25 -0
- package/core/changes.d.ts +9 -0
- package/core/changes.js +26 -0
- package/core/chart-bar.d.ts +9 -0
- package/core/chart-bar.js +26 -0
- package/core/chart-matrix.d.ts +9 -0
- package/core/chart-matrix.js +26 -0
- package/core/chart-pie.d.ts +9 -0
- package/core/chart-pie.js +26 -0
- package/core/chart-trend.d.ts +9 -0
- package/core/chart-trend.js +26 -0
- package/core/check-circle.d.ts +9 -0
- package/core/check-circle.js +26 -0
- package/core/check-mark.d.ts +9 -0
- package/core/check-mark.js +26 -0
- package/core/checkbox-checked.d.ts +9 -0
- package/core/checkbox-checked.js +26 -0
- package/core/checkbox-indeterminate.d.ts +9 -0
- package/core/checkbox-indeterminate.js +26 -0
- package/core/checkbox-unchecked.d.ts +9 -0
- package/core/checkbox-unchecked.js +26 -0
- package/core/child-issues.d.ts +9 -0
- package/core/child-issues.js +26 -0
- package/core/clock.d.ts +9 -0
- package/core/clock.js +26 -0
- package/core/close.d.ts +9 -0
- package/core/close.js +26 -0
- package/core/cloud-arrow-up.d.ts +9 -0
- package/core/cloud-arrow-up.js +26 -0
- package/core/collapse.d.ts +9 -0
- package/core/collapse.js +26 -0
- package/core/comment-add.d.ts +9 -0
- package/core/comment-add.js +26 -0
- package/core/comment.d.ts +9 -0
- package/core/comment.js +26 -0
- package/core/commit.d.ts +9 -0
- package/core/commit.js +26 -0
- package/core/compass.d.ts +9 -0
- package/core/compass.js +26 -0
- package/core/component.d.ts +9 -0
- package/core/component.js +26 -0
- package/core/copy.d.ts +9 -0
- package/core/copy.js +26 -0
- package/core/credit-card.d.ts +9 -0
- package/core/credit-card.js +26 -0
- package/core/cross-circle.d.ts +9 -0
- package/core/cross-circle.js +26 -0
- package/core/customize.d.ts +9 -0
- package/core/customize.js +26 -0
- package/core/dashboard.d.ts +9 -0
- package/core/dashboard.js +26 -0
- package/core/database.d.ts +9 -0
- package/core/database.js +26 -0
- package/core/decision.d.ts +9 -0
- package/core/decision.js +26 -0
- package/core/delete.d.ts +9 -0
- package/core/delete.js +26 -0
- package/core/department.d.ts +9 -0
- package/core/department.js +26 -0
- package/core/device-mobile.d.ts +9 -0
- package/core/device-mobile.js +26 -0
- package/core/download.d.ts +9 -0
- package/core/download.js +26 -0
- package/core/drag-handle.d.ts +9 -0
- package/core/drag-handle.js +26 -0
- package/core/edit.d.ts +9 -0
- package/core/edit.js +26 -0
- package/core/email.d.ts +9 -0
- package/core/email.js +26 -0
- package/core/emoji-add.d.ts +9 -0
- package/core/emoji-add.js +26 -0
- package/core/emoji.d.ts +9 -0
- package/core/emoji.js +26 -0
- package/core/epic.d.ts +9 -0
- package/core/epic.js +26 -0
- package/core/error.d.ts +9 -0
- package/core/error.js +26 -0
- package/core/expand.d.ts +9 -0
- package/core/expand.js +26 -0
- package/core/eye-open-filled.d.ts +9 -0
- package/core/eye-open-filled.js +26 -0
- package/core/eye-open.d.ts +9 -0
- package/core/eye-open.js +26 -0
- package/core/feed.d.ts +9 -0
- package/core/feed.js +26 -0
- package/core/feedback.d.ts +9 -0
- package/core/feedback.js +26 -0
- package/core/filter.d.ts +9 -0
- package/core/filter.js +26 -0
- package/core/flag.d.ts +9 -0
- package/core/flag.js +26 -0
- package/core/flask.d.ts +9 -0
- package/core/flask.js +26 -0
- package/core/folder-closed.d.ts +9 -0
- package/core/folder-closed.js +26 -0
- package/core/folder-open.d.ts +9 -0
- package/core/folder-open.js +26 -0
- package/core/fullscreen-enter.d.ts +9 -0
- package/core/fullscreen-enter.js +26 -0
- package/core/fullscreen-exit.d.ts +9 -0
- package/core/fullscreen-exit.js +26 -0
- package/core/globe.d.ts +9 -0
- package/core/globe.js +26 -0
- package/core/goal.d.ts +9 -0
- package/core/goal.js +26 -0
- package/core/grid.d.ts +9 -0
- package/core/grid.js +26 -0
- package/core/hashtag.d.ts +9 -0
- package/core/hashtag.js +26 -0
- package/core/heart.d.ts +9 -0
- package/core/heart.js +26 -0
- package/core/home.d.ts +9 -0
- package/core/home.js +26 -0
- package/core/image.d.ts +9 -0
- package/core/image.js +26 -0
- package/core/inbox.d.ts +9 -0
- package/core/inbox.js +26 -0
- package/core/incident.d.ts +9 -0
- package/core/incident.js +26 -0
- package/core/information.d.ts +9 -0
- package/core/information.js +26 -0
- package/core/issue.d.ts +9 -0
- package/core/issue.js +26 -0
- package/core/issues.d.ts +9 -0
- package/core/issues.js +26 -0
- package/core/lightbulb.d.ts +9 -0
- package/core/lightbulb.js +26 -0
- package/core/link-broken.d.ts +9 -0
- package/core/link-broken.js +26 -0
- package/core/link-external.d.ts +9 -0
- package/core/link-external.js +26 -0
- package/core/link.d.ts +9 -0
- package/core/link.js +26 -0
- package/core/lobby-bell.d.ts +9 -0
- package/core/lobby-bell.js +26 -0
- package/core/location.d.ts +9 -0
- package/core/location.js +26 -0
- package/core/lock-locked.d.ts +9 -0
- package/core/lock-locked.js +26 -0
- package/core/lock-unlocked.d.ts +9 -0
- package/core/lock-unlocked.js +26 -0
- package/core/log-in.d.ts +9 -0
- package/core/log-in.js +26 -0
- package/core/log-out.d.ts +9 -0
- package/core/log-out.js +26 -0
- package/core/marketplace.d.ts +9 -0
- package/core/marketplace.js +26 -0
- package/core/maximize.d.ts +9 -0
- package/core/maximize.js +26 -0
- package/core/megaphone.d.ts +9 -0
- package/core/megaphone.js +26 -0
- package/core/mention.d.ts +9 -0
- package/core/mention.js +26 -0
- package/core/microphone.d.ts +9 -0
- package/core/microphone.js +26 -0
- package/core/minimize.d.ts +9 -0
- package/core/minimize.js +26 -0
- package/core/node.d.ts +9 -0
- package/core/node.js +26 -0
- package/core/office-building.d.ts +9 -0
- package/core/office-building.js +26 -0
- package/core/page.d.ts +9 -0
- package/core/page.js +26 -0
- package/core/pages.d.ts +9 -0
- package/core/pages.js +26 -0
- package/core/person-add.d.ts +9 -0
- package/core/person-add.js +26 -0
- package/core/person-added.d.ts +9 -0
- package/core/person-added.js +26 -0
- package/core/person-avatar.d.ts +9 -0
- package/core/person-avatar.js +26 -0
- package/core/person-offboard.d.ts +9 -0
- package/core/person-offboard.js +25 -0
- package/core/person.d.ts +9 -0
- package/core/person.js +26 -0
- package/core/phone.d.ts +9 -0
- package/core/phone.js +26 -0
- package/core/pin-filled.d.ts +9 -0
- package/core/pin-filled.js +26 -0
- package/core/pin.d.ts +9 -0
- package/core/pin.js +26 -0
- package/core/power-plug.d.ts +9 -0
- package/core/power-plug.js +26 -0
- package/core/premium.d.ts +9 -0
- package/core/premium.js +26 -0
- package/core/presenter-mode.d.ts +9 -0
- package/core/presenter-mode.js +26 -0
- package/core/printer.d.ts +9 -0
- package/core/printer.js +26 -0
- package/core/priority-blocker.d.ts +9 -0
- package/core/priority-blocker.js +26 -0
- package/core/priority-critical.d.ts +9 -0
- package/core/priority-critical.js +26 -0
- package/core/priority-high.d.ts +9 -0
- package/core/priority-high.js +26 -0
- package/core/priority-highest.d.ts +9 -0
- package/core/priority-highest.js +26 -0
- package/core/priority-low.d.ts +9 -0
- package/core/priority-low.js +26 -0
- package/core/priority-lowest.d.ts +9 -0
- package/core/priority-lowest.js +26 -0
- package/core/priority-major.d.ts +9 -0
- package/core/priority-major.js +26 -0
- package/core/priority-medium.d.ts +9 -0
- package/core/priority-medium.js +26 -0
- package/core/priority-minor.d.ts +9 -0
- package/core/priority-minor.js +26 -0
- package/core/priority-trivial.d.ts +9 -0
- package/core/priority-trivial.js +26 -0
- package/core/problem.d.ts +9 -0
- package/core/problem.js +26 -0
- package/core/project.d.ts +9 -0
- package/core/project.js +26 -0
- package/core/pull-request.d.ts +9 -0
- package/core/pull-request.js +26 -0
- package/core/question-circle.d.ts +9 -0
- package/core/question-circle.js +26 -0
- package/core/quotation-mark.d.ts +9 -0
- package/core/quotation-mark.js +26 -0
- package/core/redo.d.ts +9 -0
- package/core/redo.js +26 -0
- package/core/release.d.ts +9 -0
- package/core/release.js +26 -0
- package/core/retry.d.ts +9 -0
- package/core/retry.js +26 -0
- package/core/roadmap.d.ts +9 -0
- package/core/roadmap.js +26 -0
- package/core/scorecard.d.ts +9 -0
- package/core/scorecard.js +26 -0
- package/core/screen.d.ts +9 -0
- package/core/screen.js +26 -0
- package/core/search.d.ts +9 -0
- package/core/search.js +26 -0
- package/core/send.d.ts +9 -0
- package/core/send.js +26 -0
- package/core/settings.d.ts +9 -0
- package/core/settings.js +26 -0
- package/core/shapes.d.ts +9 -0
- package/core/shapes.js +26 -0
- package/core/share.d.ts +9 -0
- package/core/share.js +26 -0
- package/core/shield.d.ts +9 -0
- package/core/shield.js +26 -0
- package/core/shortcut.d.ts +9 -0
- package/core/shortcut.js +26 -0
- package/core/show-more-horizontal.d.ts +9 -0
- package/core/show-more-horizontal.js +26 -0
- package/core/show-more-vertical.d.ts +9 -0
- package/core/show-more-vertical.js +26 -0
- package/core/sidebar-collapse.d.ts +9 -0
- package/core/sidebar-collapse.js +26 -0
- package/core/sidebar-expand.d.ts +9 -0
- package/core/sidebar-expand.js +26 -0
- package/core/snippet.d.ts +9 -0
- package/core/snippet.js +26 -0
- package/core/spreadsheet.d.ts +9 -0
- package/core/spreadsheet.js +26 -0
- package/core/sprint.d.ts +9 -0
- package/core/sprint.js +26 -0
- package/core/star-starred.d.ts +9 -0
- package/core/star-starred.js +26 -0
- package/core/star-unstarred.d.ts +9 -0
- package/core/star-unstarred.js +26 -0
- package/core/stopwatch.d.ts +9 -0
- package/core/stopwatch.js +26 -0
- package/core/story.d.ts +9 -0
- package/core/story.js +26 -0
- package/core/subtasks.d.ts +9 -0
- package/core/subtasks.js +26 -0
- package/core/tag.d.ts +9 -0
- package/core/tag.js +26 -0
- package/core/task.d.ts +9 -0
- package/core/task.js +26 -0
- package/core/tasks.d.ts +9 -0
- package/core/tasks.js +26 -0
- package/core/teams.d.ts +9 -0
- package/core/teams.js +26 -0
- package/core/text-style.d.ts +9 -0
- package/core/text-style.js +26 -0
- package/core/thumbs-down.d.ts +9 -0
- package/core/thumbs-down.js +26 -0
- package/core/thumbs-up.d.ts +9 -0
- package/core/thumbs-up.js +26 -0
- package/core/timeline.d.ts +9 -0
- package/core/timeline.js +26 -0
- package/core/transition.d.ts +9 -0
- package/core/transition.js +26 -0
- package/core/undo.d.ts +9 -0
- package/core/undo.js +26 -0
- package/core/upload.d.ts +9 -0
- package/core/upload.js +26 -0
- package/core/video-next.d.ts +9 -0
- package/core/video-next.js +26 -0
- package/core/video-pause.d.ts +9 -0
- package/core/video-pause.js +26 -0
- package/core/video-play.d.ts +9 -0
- package/core/video-play.js +26 -0
- package/core/video-previous.d.ts +9 -0
- package/core/video-previous.js +26 -0
- package/core/video.d.ts +9 -0
- package/core/video.js +26 -0
- package/core/volume-high.d.ts +9 -0
- package/core/volume-high.js +25 -0
- package/core/volume-low.d.ts +9 -0
- package/core/volume-low.js +25 -0
- package/core/volume-muted.d.ts +9 -0
- package/core/volume-muted.js +25 -0
- package/core/warning.d.ts +9 -0
- package/core/warning.js +26 -0
- package/core/whiteboard.d.ts +9 -0
- package/core/whiteboard.js +26 -0
- package/core/zoom-in.d.ts +9 -0
- package/core/zoom-in.js +26 -0
- package/core/zoom-out.d.ts +9 -0
- package/core/zoom-out.js +26 -0
- package/dist/cjs/components/icon-new.js +158 -0
- package/dist/cjs/components/icon-tile.js +155 -0
- package/dist/cjs/components/icon.js +4 -2
- package/dist/cjs/entry-points/base-new.js +21 -0
- package/dist/cjs/index.js +15 -1
- package/dist/cjs/metadata-core.js +2019 -0
- package/dist/cjs/metadata-utility.js +214 -0
- package/dist/es2019/components/icon-new.js +159 -0
- package/dist/es2019/components/icon-tile.js +149 -0
- package/dist/es2019/components/icon.js +4 -2
- package/dist/es2019/entry-points/base-new.js +1 -0
- package/dist/es2019/index.js +3 -1
- package/dist/es2019/metadata-core.js +2013 -0
- package/dist/es2019/metadata-utility.js +208 -0
- package/dist/esm/components/icon-new.js +152 -0
- package/dist/esm/components/icon-tile.js +149 -0
- package/dist/esm/components/icon.js +4 -2
- package/dist/esm/entry-points/base-new.js +1 -0
- package/dist/esm/index.js +3 -1
- package/dist/esm/metadata-core.js +2013 -0
- package/dist/esm/metadata-utility.js +208 -0
- package/dist/types/components/icon-new.d.ts +23 -0
- package/dist/types/components/icon-tile.d.ts +12 -0
- package/dist/types/components/styles.d.ts +1 -1
- package/dist/types/entry-points/base-new.d.ts +2 -0
- package/dist/types/entry-points/types.d.ts +1 -1
- package/dist/types/index.d.ts +3 -1
- package/dist/types/metadata-core.d.ts +22 -0
- package/dist/types/metadata-utility.d.ts +22 -0
- package/dist/types/types.d.ts +75 -6
- package/dist/types-ts4.5/components/icon-new.d.ts +23 -0
- package/dist/types-ts4.5/components/icon-tile.d.ts +12 -0
- package/dist/types-ts4.5/components/styles.d.ts +1 -1
- package/dist/types-ts4.5/entry-points/base-new.d.ts +2 -0
- package/dist/types-ts4.5/entry-points/types.d.ts +1 -1
- package/dist/types-ts4.5/index.d.ts +3 -1
- package/dist/types-ts4.5/metadata-core.d.ts +22 -0
- package/dist/types-ts4.5/metadata-utility.d.ts +22 -0
- package/dist/types-ts4.5/types.d.ts +75 -6
- package/package.json +17 -5
- package/utility/add.d.ts +9 -0
- package/utility/add.js +27 -0
- package/utility/check-circle.d.ts +9 -0
- package/utility/check-circle.js +27 -0
- package/utility/check-mark.d.ts +9 -0
- package/utility/check-mark.js +27 -0
- package/utility/chevron-down.d.ts +9 -0
- package/utility/chevron-down.js +27 -0
- package/utility/chevron-left.d.ts +9 -0
- package/utility/chevron-left.js +27 -0
- package/utility/chevron-right.d.ts +9 -0
- package/utility/chevron-right.js +27 -0
- package/utility/chevron-up.d.ts +9 -0
- package/utility/chevron-up.js +27 -0
- package/utility/cross-circle.d.ts +9 -0
- package/utility/cross-circle.js +27 -0
- package/utility/cross.d.ts +9 -0
- package/utility/cross.js +27 -0
- package/utility/error.d.ts +9 -0
- package/utility/error.js +27 -0
- package/utility/information.d.ts +9 -0
- package/utility/information.js +27 -0
- package/utility/link-external.d.ts +9 -0
- package/utility/link-external.js +27 -0
- package/utility/lock-locked.d.ts +9 -0
- package/utility/lock-locked.js +27 -0
- package/utility/lock-unlocked.d.ts +9 -0
- package/utility/lock-unlocked.js +27 -0
- package/utility/show-more-horizontal.d.ts +9 -0
- package/utility/show-more-horizontal.js +27 -0
- package/utility/show-more-vertical.d.ts +9 -0
- package/utility/show-more-vertical.js +27 -0
- package/utility/star-starred.d.ts +9 -0
- package/utility/star-starred.js +27 -0
- package/utility/star-unstarred.d.ts +9 -0
- package/utility/star-unstarred.js +27 -0
- package/utility/warning.d.ts +9 -0
- package/utility/warning.js +27 -0
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.Icon = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _react2 = require("@emotion/react");
|
|
9
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
|
+
/** @jsx jsx */
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* We are hiding this props from consumers as it's reserved
|
|
14
|
+
* for use by Icon Tile.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
var commonSVGStyles = (0, _react2.css)({
|
|
18
|
+
overflow: 'hidden',
|
|
19
|
+
pointerEvents: 'none',
|
|
20
|
+
/**
|
|
21
|
+
* Stop-color doesn't properly apply in chrome when the inherited/current color changes.
|
|
22
|
+
* We have to initially set stop-color to inherit (either via DOM attribute or an initial CSS
|
|
23
|
+
* rule) and then override it with currentColor for the color changes to be picked up.
|
|
24
|
+
*/
|
|
25
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
26
|
+
stop: {
|
|
27
|
+
stopColor: 'currentColor'
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
var svgStyles = (0, _react2.css)({
|
|
31
|
+
color: 'currentColor',
|
|
32
|
+
verticalAlign: 'bottom'
|
|
33
|
+
});
|
|
34
|
+
var iconStyles = (0, _react2.css)({
|
|
35
|
+
display: 'inline-block',
|
|
36
|
+
boxSizing: 'border-box',
|
|
37
|
+
flexShrink: 0,
|
|
38
|
+
lineHeight: 1,
|
|
39
|
+
paddingInlineEnd: 'var(--ds--button--new-icon-padding-end, 0)',
|
|
40
|
+
paddingInlineStart: 'var(--ds--button--new-icon-padding-start, 0)'
|
|
41
|
+
});
|
|
42
|
+
var utilityIconStyles = (0, _react2.css)({
|
|
43
|
+
lineHeight: "var(--ds-space-150, 12px)"
|
|
44
|
+
});
|
|
45
|
+
var scaleStyles = (0, _react2.css)({
|
|
46
|
+
width: 'inherit',
|
|
47
|
+
height: 'inherit'
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* For windows high contrast mode
|
|
52
|
+
*/
|
|
53
|
+
var baseHcmStyles = (0, _react2.css)({
|
|
54
|
+
'@media screen and (forced-colors: active)': {
|
|
55
|
+
color: 'CanvasText',
|
|
56
|
+
filter: 'grayscale(1)'
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
var sizeMap = {
|
|
60
|
+
scale: (0, _react2.css)({
|
|
61
|
+
width: 'inherit',
|
|
62
|
+
height: 'inherit'
|
|
63
|
+
}),
|
|
64
|
+
utility: (0, _react2.css)({
|
|
65
|
+
width: "var(--ds-space-150, 12px)",
|
|
66
|
+
height: "var(--ds-space-150, 12px)"
|
|
67
|
+
}),
|
|
68
|
+
none: (0, _react2.css)({
|
|
69
|
+
width: "var(--ds-space-200, 16px)",
|
|
70
|
+
height: "var(--ds-space-200, 16px)"
|
|
71
|
+
}),
|
|
72
|
+
spacious: (0, _react2.css)({
|
|
73
|
+
width: "var(--ds-space-300, 24px)",
|
|
74
|
+
height: "var(--ds-space-300, 24px)"
|
|
75
|
+
})
|
|
76
|
+
};
|
|
77
|
+
var baseSizeMap = {
|
|
78
|
+
global: 16,
|
|
79
|
+
utility: 12
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* __Icon__
|
|
84
|
+
*
|
|
85
|
+
* An icon is used as a visual representation of common actions and commands to provide context.
|
|
86
|
+
*
|
|
87
|
+
* - [Examples](https://atlaskit.atlassian.com/packages/design-system/icon)
|
|
88
|
+
* - [Code](https://atlaskit.atlassian.com/packages/design-system/icon/docs/custom-icons)
|
|
89
|
+
*/
|
|
90
|
+
var Icon = exports.Icon = /*#__PURE__*/(0, _react.memo)(function Icon(props) {
|
|
91
|
+
var _ref = props,
|
|
92
|
+
_ref$color = _ref.color,
|
|
93
|
+
color = _ref$color === void 0 ? "var(--ds-icon, #44546F)" : _ref$color,
|
|
94
|
+
_ref$spacing = _ref.spacing,
|
|
95
|
+
providedSpacing = _ref$spacing === void 0 ? 'none' : _ref$spacing,
|
|
96
|
+
testId = _ref.testId,
|
|
97
|
+
label = _ref.label,
|
|
98
|
+
LEGACY_secondaryColor = _ref.LEGACY_secondaryColor,
|
|
99
|
+
_ref$LEGACY_size = _ref.LEGACY_size,
|
|
100
|
+
LEGACY_size = _ref$LEGACY_size === void 0 ? 'medium' : _ref$LEGACY_size,
|
|
101
|
+
FallbackIcon = _ref.LEGACY_fallbackIcon,
|
|
102
|
+
_ref$type = _ref.type,
|
|
103
|
+
type = _ref$type === void 0 ? 'global' : _ref$type,
|
|
104
|
+
dangerouslySetGlyph = _ref.dangerouslySetGlyph,
|
|
105
|
+
shouldScale = _ref.shouldScale;
|
|
106
|
+
var dangerouslySetInnerHTML = dangerouslySetGlyph ? {
|
|
107
|
+
__html: dangerouslySetGlyph
|
|
108
|
+
} : undefined;
|
|
109
|
+
|
|
110
|
+
// Fall back to old icon
|
|
111
|
+
if (FallbackIcon && !(0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.enable-new-icons')) {
|
|
112
|
+
// parse out unnecessary props
|
|
113
|
+
return (0, _react2.jsx)(FallbackIcon, {
|
|
114
|
+
primaryColor: color,
|
|
115
|
+
secondaryColor: LEGACY_secondaryColor,
|
|
116
|
+
size: LEGACY_size,
|
|
117
|
+
label: label,
|
|
118
|
+
testId: testId
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Utility icons don't have 'spacing' as a type, but in case it's provided, we default to 'none'
|
|
123
|
+
var spacing = type === 'utility' ? 'none' : providedSpacing;
|
|
124
|
+
var baseSize = baseSizeMap[type];
|
|
125
|
+
var size = type === 'utility' ? 'utility' : shouldScale ? 'scale' : spacing;
|
|
126
|
+
var viewBoxPadding = spacing === 'spacious' ? 4 : 0;
|
|
127
|
+
var viewBoxSize = baseSize + 2 * viewBoxPadding;
|
|
128
|
+
|
|
129
|
+
// Workaround for the transparency in our disabled icon token.
|
|
130
|
+
// Because we have multiple strokes in icons, opacities overlap
|
|
131
|
+
// This filter has an impact on render performance, but this is
|
|
132
|
+
// acceptable as icons aren't commonly disabled en-masse
|
|
133
|
+
var iconColor = color;
|
|
134
|
+
if (dangerouslySetInnerHTML && color === "var(--ds-icon-disabled, #091E424F)") {
|
|
135
|
+
dangerouslySetInnerHTML.__html = "\n<filter id=\"ds-newIconOpacityFilter\">\n <feFlood flood-color=\"var(--ds-icon-disabled)\" />\n <feComposite in2=\"SourceGraphic\" operator=\"in\" />\n</filter>\n<g filter=\"url(#ds-newIconOpacityFilter)\">\n ".concat(dangerouslySetInnerHTML.__html, "\n</g>");
|
|
136
|
+
iconColor = "var(--ds-icon, #44546F)";
|
|
137
|
+
}
|
|
138
|
+
return (0, _react2.jsx)("span", {
|
|
139
|
+
"data-testid": testId,
|
|
140
|
+
role: label ? 'img' : undefined,
|
|
141
|
+
"aria-label": label ? label : undefined,
|
|
142
|
+
"aria-hidden": label ? undefined : true,
|
|
143
|
+
style: {
|
|
144
|
+
color: iconColor
|
|
145
|
+
},
|
|
146
|
+
css: [iconStyles, baseHcmStyles, shouldScale && scaleStyles, type === 'utility' && utilityIconStyles]
|
|
147
|
+
}, (0, _react2.jsx)("svg", {
|
|
148
|
+
fill: "none"
|
|
149
|
+
// Adjusting the viewBox allows the icon padding to scale with the contents of the SVG, which
|
|
150
|
+
// we want for Icon Tile
|
|
151
|
+
,
|
|
152
|
+
viewBox: "".concat(0 - viewBoxPadding, " ").concat(0 - viewBoxPadding, " ").concat(viewBoxSize, " ").concat(viewBoxSize),
|
|
153
|
+
role: "presentation",
|
|
154
|
+
css: [commonSVGStyles, svgStyles, sizeMap[size]],
|
|
155
|
+
dangerouslySetInnerHTML: dangerouslySetInnerHTML
|
|
156
|
+
}));
|
|
157
|
+
});
|
|
158
|
+
var _default = exports.default = Icon;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = IconTile;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
/** @jsx jsx */
|
|
9
|
+
|
|
10
|
+
var sizeMap = {
|
|
11
|
+
'16': (0, _react.css)({
|
|
12
|
+
width: '16px',
|
|
13
|
+
height: '16px'
|
|
14
|
+
}),
|
|
15
|
+
'24': (0, _react.css)({
|
|
16
|
+
width: '24px',
|
|
17
|
+
height: '24px'
|
|
18
|
+
}),
|
|
19
|
+
'32': (0, _react.css)({
|
|
20
|
+
width: '32px',
|
|
21
|
+
height: '32px'
|
|
22
|
+
}),
|
|
23
|
+
'40': (0, _react.css)({
|
|
24
|
+
width: '40px',
|
|
25
|
+
height: '40px'
|
|
26
|
+
}),
|
|
27
|
+
'48': (0, _react.css)({
|
|
28
|
+
width: '48px',
|
|
29
|
+
height: '48px'
|
|
30
|
+
})
|
|
31
|
+
};
|
|
32
|
+
var appearanceMap = {
|
|
33
|
+
grayBold: (0, _react.css)({
|
|
34
|
+
backgroundColor: "var(--ds-background-accent-gray-bolder, #626F86)",
|
|
35
|
+
color: "var(--ds-icon-inverse, #FFFFFF)"
|
|
36
|
+
}),
|
|
37
|
+
limeBold: (0, _react.css)({
|
|
38
|
+
backgroundColor: "var(--ds-background-accent-lime-bolder, #5B7F24)",
|
|
39
|
+
color: "var(--ds-icon-inverse, #FFFFFF)"
|
|
40
|
+
}),
|
|
41
|
+
greenBold: (0, _react.css)({
|
|
42
|
+
backgroundColor: "var(--ds-background-accent-green-bolder, #1F845A)",
|
|
43
|
+
color: "var(--ds-icon-inverse, #FFFFFF)"
|
|
44
|
+
}),
|
|
45
|
+
blueBold: (0, _react.css)({
|
|
46
|
+
backgroundColor: "var(--ds-background-accent-blue-bolder, #0C66E4)",
|
|
47
|
+
color: "var(--ds-icon-inverse, #FFFFFF)"
|
|
48
|
+
}),
|
|
49
|
+
redBold: (0, _react.css)({
|
|
50
|
+
backgroundColor: "var(--ds-background-accent-red-bolder, #C9372C)",
|
|
51
|
+
color: "var(--ds-icon-inverse, #FFFFFF)"
|
|
52
|
+
}),
|
|
53
|
+
purpleBold: (0, _react.css)({
|
|
54
|
+
backgroundColor: "var(--ds-background-accent-purple-bolder, #6E5DC6)",
|
|
55
|
+
color: "var(--ds-icon-inverse, #FFFFFF)"
|
|
56
|
+
}),
|
|
57
|
+
magentaBold: (0, _react.css)({
|
|
58
|
+
backgroundColor: "var(--ds-background-accent-magenta-bolder, #AE4787)",
|
|
59
|
+
color: "var(--ds-icon-inverse, #FFFFFF)"
|
|
60
|
+
}),
|
|
61
|
+
tealBold: (0, _react.css)({
|
|
62
|
+
backgroundColor: "var(--ds-background-accent-teal-bolder, #227D9B)",
|
|
63
|
+
color: "var(--ds-icon-inverse, #FFFFFF)"
|
|
64
|
+
}),
|
|
65
|
+
orangeBold: (0, _react.css)({
|
|
66
|
+
backgroundColor: "var(--ds-background-accent-orange-bolder, #C25100)",
|
|
67
|
+
color: "var(--ds-icon-inverse, #FFFFFF)"
|
|
68
|
+
}),
|
|
69
|
+
yellowBold: (0, _react.css)({
|
|
70
|
+
backgroundColor: "var(--ds-background-accent-yellow-bolder, #946F00)",
|
|
71
|
+
color: "var(--ds-icon-inverse, #FFFFFF)"
|
|
72
|
+
}),
|
|
73
|
+
gray: (0, _react.css)({
|
|
74
|
+
backgroundColor: "var(--ds-background-accent-gray-subtler, #DCDFE4)",
|
|
75
|
+
color: "var(--ds-icon-accent-gray, #758195)"
|
|
76
|
+
}),
|
|
77
|
+
lime: (0, _react.css)({
|
|
78
|
+
backgroundColor: "var(--ds-background-accent-lime-subtler, #D3F1A7)",
|
|
79
|
+
color: "var(--ds-icon-accent-lime, #6A9A23)"
|
|
80
|
+
}),
|
|
81
|
+
orange: (0, _react.css)({
|
|
82
|
+
backgroundColor: "var(--ds-background-accent-orange-subtler, #FEDEC8)",
|
|
83
|
+
color: "var(--ds-icon-accent-orange, #E56910)"
|
|
84
|
+
}),
|
|
85
|
+
magenta: (0, _react.css)({
|
|
86
|
+
backgroundColor: "var(--ds-background-accent-magenta-subtler, #FDD0EC)",
|
|
87
|
+
color: "var(--ds-icon-accent-magenta, #CD519D)"
|
|
88
|
+
}),
|
|
89
|
+
green: (0, _react.css)({
|
|
90
|
+
backgroundColor: "var(--ds-background-accent-green-subtler, #BAF3DB)",
|
|
91
|
+
color: "var(--ds-icon-accent-green, #22A06B)"
|
|
92
|
+
}),
|
|
93
|
+
blue: (0, _react.css)({
|
|
94
|
+
backgroundColor: "var(--ds-background-accent-blue-subtler, #CCE0FF)",
|
|
95
|
+
color: "var(--ds-icon-accent-blue, #1D7AFC)"
|
|
96
|
+
}),
|
|
97
|
+
red: (0, _react.css)({
|
|
98
|
+
backgroundColor: "var(--ds-background-accent-red-subtler, #FFD5D2)",
|
|
99
|
+
color: "var(--ds-icon-accent-red, #C9372C)"
|
|
100
|
+
}),
|
|
101
|
+
purple: (0, _react.css)({
|
|
102
|
+
backgroundColor: "var(--ds-background-accent-purple-subtler, #DFD8FD)",
|
|
103
|
+
color: "var(--ds-icon-accent-purple, #8270DB)"
|
|
104
|
+
}),
|
|
105
|
+
teal: (0, _react.css)({
|
|
106
|
+
backgroundColor: "var(--ds-background-accent-teal-subtler, #C6EDFB)",
|
|
107
|
+
color: "var(--ds-icon-accent-teal, #2898BD)"
|
|
108
|
+
}),
|
|
109
|
+
yellow: (0, _react.css)({
|
|
110
|
+
backgroundColor: "var(--ds-background-accent-yellow-subtler, #F8E6A0)",
|
|
111
|
+
color: "var(--ds-icon-accent-yellow, #B38600)"
|
|
112
|
+
})
|
|
113
|
+
};
|
|
114
|
+
var shapeMap = {
|
|
115
|
+
square: (0, _react.css)({
|
|
116
|
+
borderRadius: "var(--ds-border-radius-100, 4px)"
|
|
117
|
+
}),
|
|
118
|
+
circle: (0, _react.css)({
|
|
119
|
+
borderRadius: "var(--ds-border-radius-circle, 32032px)"
|
|
120
|
+
})
|
|
121
|
+
};
|
|
122
|
+
var iconTileStyles = (0, _react.css)({
|
|
123
|
+
display: 'inline-flex',
|
|
124
|
+
boxSizing: 'border-box',
|
|
125
|
+
alignItems: 'center',
|
|
126
|
+
justifyContent: 'center'
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* __IconTile__ -- ⚠️ Experimental ⚠️
|
|
131
|
+
*
|
|
132
|
+
* An icon tile is used to present an icon with a background color.
|
|
133
|
+
* Icon tiles, unlike standard icons, can scale up and down to provide greater emphasis.
|
|
134
|
+
*
|
|
135
|
+
* This component is currently in an experimental state and is subject to change in minor or patch releases.
|
|
136
|
+
*
|
|
137
|
+
*/
|
|
138
|
+
function IconTile(props) {
|
|
139
|
+
var Icon = props.icon,
|
|
140
|
+
label = props.label,
|
|
141
|
+
appearance = props.appearance,
|
|
142
|
+
_props$size = props.size,
|
|
143
|
+
size = _props$size === void 0 ? '24' : _props$size,
|
|
144
|
+
_props$shape = props.shape,
|
|
145
|
+
shape = _props$shape === void 0 ? 'square' : _props$shape;
|
|
146
|
+
var ExpandedIcon = Icon;
|
|
147
|
+
return (0, _react.jsx)("span", {
|
|
148
|
+
css: [iconTileStyles, appearanceMap[appearance], sizeMap[size], shapeMap[shape]]
|
|
149
|
+
}, (0, _react.jsx)(ExpandedIcon, {
|
|
150
|
+
color: "currentColor",
|
|
151
|
+
label: label,
|
|
152
|
+
spacing: "spacious",
|
|
153
|
+
shouldScale: true
|
|
154
|
+
}));
|
|
155
|
+
}
|
|
@@ -103,7 +103,9 @@ var Icon = exports.Icon = /*#__PURE__*/(0, _react.memo)(function Icon(props) {
|
|
|
103
103
|
"data-testid": testId,
|
|
104
104
|
role: label ? 'img' : undefined,
|
|
105
105
|
"aria-label": label ? label : undefined,
|
|
106
|
-
"aria-hidden": label ? undefined : true
|
|
106
|
+
"aria-hidden": label ? undefined : true
|
|
107
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
108
|
+
,
|
|
107
109
|
style: {
|
|
108
110
|
'--icon-primary-color': primaryColor,
|
|
109
111
|
'--icon-secondary-color': secondaryColor || (0, _utils.getBackground)()
|
|
@@ -111,7 +113,7 @@ var Icon = exports.Icon = /*#__PURE__*/(0, _react.memo)(function Icon(props) {
|
|
|
111
113
|
}, glyphProps, {
|
|
112
114
|
css: [iconStyles, baseHcmStyles, primaryColor === secondaryColor && primaryEqualsSecondaryHcmStyles, secondaryColor === 'transparent' && secondaryTransparentHcmStyles,
|
|
113
115
|
// NB: This can be resolved if this component, composes base SVG / and/or skeleton
|
|
114
|
-
// We could then simplify how common styles are dealt with simply by
|
|
116
|
+
// We could then simplify how common styles are dealt with simply by encapsulating them
|
|
115
117
|
// at their appropriate level and/or having a singular approach to css variables in the package
|
|
116
118
|
dimensions &&
|
|
117
119
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "Icon", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _iconNew.Icon;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "default", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function get() {
|
|
16
|
+
return _iconNew.default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
var _iconNew = _interopRequireWildcard(require("../components/icon-new"));
|
|
20
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
21
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
package/dist/cjs/index.js
CHANGED
|
@@ -4,6 +4,12 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
+
Object.defineProperty(exports, "IconTile", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _iconTile.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
7
13
|
Object.defineProperty(exports, "SVG", {
|
|
8
14
|
enumerable: true,
|
|
9
15
|
get: function get() {
|
|
@@ -16,6 +22,12 @@ Object.defineProperty(exports, "Skeleton", {
|
|
|
16
22
|
return _skeleton.default;
|
|
17
23
|
}
|
|
18
24
|
});
|
|
25
|
+
Object.defineProperty(exports, "UNSAFE_IconNew", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function get() {
|
|
28
|
+
return _iconNew.default;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
19
31
|
Object.defineProperty(exports, "default", {
|
|
20
32
|
enumerable: true,
|
|
21
33
|
get: function get() {
|
|
@@ -35,6 +47,8 @@ Object.defineProperty(exports, "sizes", {
|
|
|
35
47
|
}
|
|
36
48
|
});
|
|
37
49
|
var _icon = _interopRequireDefault(require("./components/icon"));
|
|
50
|
+
var _iconNew = _interopRequireDefault(require("./components/icon-new"));
|
|
38
51
|
var _svg = _interopRequireDefault(require("./components/svg"));
|
|
39
52
|
var _constants = require("./constants");
|
|
40
|
-
var _skeleton = _interopRequireDefault(require("./components/skeleton"));
|
|
53
|
+
var _skeleton = _interopRequireDefault(require("./components/skeleton"));
|
|
54
|
+
var _iconTile = _interopRequireDefault(require("./components/icon-tile"));
|