@loomhq/lens 10.102.1 → 10.102.2
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/dist/hooks/use-prefer-reduced-motion.d.ts +1 -0
- package/dist/icons/account-circle.d.ts +2 -0
- package/dist/icons/account.d.ts +2 -0
- package/dist/icons/activity.d.ts +2 -0
- package/dist/icons/add-a-photo.d.ts +2 -0
- package/dist/icons/add-circle-outline.d.ts +2 -0
- package/dist/icons/add-photo.d.ts +2 -0
- package/dist/icons/add.d.ts +2 -0
- package/dist/icons/alarm-clock-complete.d.ts +2 -0
- package/dist/icons/alarm-clock.d.ts +2 -0
- package/dist/icons/alert-triangle.d.ts +2 -0
- package/dist/icons/align-bottom.d.ts +2 -0
- package/dist/icons/apple.d.ts +2 -0
- package/dist/icons/apps.d.ts +2 -0
- package/dist/icons/archive.d.ts +2 -0
- package/dist/icons/arrow-back.d.ts +2 -0
- package/dist/icons/arrow-downward.d.ts +2 -0
- package/dist/icons/arrow-drop-down.d.ts +2 -0
- package/dist/icons/arrow-drop-up.d.ts +2 -0
- package/dist/icons/arrow-forward.d.ts +2 -0
- package/dist/icons/arrow-left-alt.d.ts +2 -0
- package/dist/icons/arrow-left.d.ts +2 -0
- package/dist/icons/arrow-right-alt.d.ts +2 -0
- package/dist/icons/arrow-right.d.ts +2 -0
- package/dist/icons/arrow-upward.d.ts +2 -0
- package/dist/icons/at-mention.d.ts +2 -0
- package/dist/icons/auto-chapters.d.ts +2 -0
- package/dist/icons/auto-summaries.d.ts +2 -0
- package/dist/icons/auto-tasks.d.ts +2 -0
- package/dist/icons/auto-titles.d.ts +2 -0
- package/dist/icons/back.d.ts +2 -0
- package/dist/icons/back5.d.ts +2 -0
- package/dist/icons/bar-chart.d.ts +2 -0
- package/dist/icons/bell-off.d.ts +2 -0
- package/dist/icons/bell-ring.d.ts +2 -0
- package/dist/icons/bell.d.ts +2 -0
- package/dist/icons/blur.d.ts +2 -0
- package/dist/icons/book.d.ts +2 -0
- package/dist/icons/border-color.d.ts +2 -0
- package/dist/icons/bulb.d.ts +2 -0
- package/dist/icons/call-to-action.d.ts +2 -0
- package/dist/icons/cam-bubble-small.d.ts +2 -0
- package/dist/icons/cam-bubble.d.ts +2 -0
- package/dist/icons/canvas.d.ts +2 -0
- package/dist/icons/caret-folder.d.ts +2 -0
- package/dist/icons/cc-off.d.ts +2 -0
- package/dist/icons/cc-on.d.ts +2 -0
- package/dist/icons/chart.d.ts +2 -0
- package/dist/icons/check-circle-fill.d.ts +2 -0
- package/dist/icons/check-circle-outline.d.ts +2 -0
- package/dist/icons/check-circle.d.ts +2 -0
- package/dist/icons/check.d.ts +2 -0
- package/dist/icons/chevron-down.d.ts +2 -0
- package/dist/icons/chevron-left.d.ts +2 -0
- package/dist/icons/chevron-right.d.ts +2 -0
- package/dist/icons/chevron-small-down.d.ts +2 -0
- package/dist/icons/chevron-small-left.d.ts +2 -0
- package/dist/icons/chevron-small-right.d.ts +2 -0
- package/dist/icons/chevron-small-up.d.ts +2 -0
- package/dist/icons/chevron-up.d.ts +2 -0
- package/dist/icons/chevrons-left.d.ts +2 -0
- package/dist/icons/chevrons-right.d.ts +2 -0
- package/dist/icons/chrome-logo.d.ts +2 -0
- package/dist/icons/chrome.d.ts +2 -0
- package/dist/icons/clock.d.ts +2 -0
- package/dist/icons/close.d.ts +2 -0
- package/dist/icons/code.d.ts +2 -0
- package/dist/icons/collapse-replies.d.ts +2 -0
- package/dist/icons/collapse.d.ts +2 -0
- package/dist/icons/color-lens.d.ts +2 -0
- package/dist/icons/comment.d.ts +2 -0
- package/dist/icons/confetti.d.ts +2 -0
- package/dist/icons/contact-support.d.ts +2 -0
- package/dist/icons/copy.d.ts +2 -0
- package/dist/icons/create.d.ts +2 -0
- package/dist/icons/crop-16-9.d.ts +2 -0
- package/dist/icons/crop-5-4.d.ts +2 -0
- package/dist/icons/crop-7-5.d.ts +2 -0
- package/dist/icons/crop-expanded-16-9.d.ts +2 -0
- package/dist/icons/crop169-expanded.d.ts +2 -0
- package/dist/icons/crop169.d.ts +2 -0
- package/dist/icons/crop54.d.ts +2 -0
- package/dist/icons/crop75.d.ts +2 -0
- package/dist/icons/cut.d.ts +2 -0
- package/dist/icons/delete-forever.d.ts +2 -0
- package/dist/icons/delete.d.ts +2 -0
- package/dist/icons/desktop-mac.d.ts +2 -0
- package/dist/icons/domain.d.ts +2 -0
- package/dist/icons/download.d.ts +2 -0
- package/dist/icons/edge-logo.d.ts +2 -0
- package/dist/icons/edit-border.d.ts +2 -0
- package/dist/icons/edit.d.ts +2 -0
- package/dist/icons/exit-to-app.d.ts +2 -0
- package/dist/icons/expand-replies.d.ts +2 -0
- package/dist/icons/expand.d.ts +2 -0
- package/dist/icons/extension.d.ts +2 -0
- package/dist/icons/external-link.d.ts +2 -0
- package/dist/icons/eye-off.d.ts +2 -0
- package/dist/icons/eye.d.ts +2 -0
- package/dist/icons/fiber-manual-record.d.ts +2 -0
- package/dist/icons/filler-word-removal.d.ts +2 -0
- package/dist/icons/firefox-logo.d.ts +2 -0
- package/dist/icons/first-page.d.ts +2 -0
- package/dist/icons/folder-plus-deprecated.d.ts +2 -0
- package/dist/icons/folder-plus.d.ts +2 -0
- package/dist/icons/folder-shared.d.ts +2 -0
- package/dist/icons/folder.d.ts +2 -0
- package/dist/icons/forward-5.d.ts +2 -0
- package/dist/icons/forward.d.ts +2 -0
- package/dist/icons/forward5.d.ts +2 -0
- package/dist/icons/frown.d.ts +2 -0
- package/dist/icons/fullscreen-exit.d.ts +2 -0
- package/dist/icons/fullscreen.d.ts +2 -0
- package/dist/icons/google.d.ts +2 -0
- package/dist/icons/grid.d.ts +2 -0
- package/dist/icons/group-add.d.ts +2 -0
- package/dist/icons/help-circle.d.ts +2 -0
- package/dist/icons/help.d.ts +2 -0
- package/dist/icons/highlight-off.d.ts +2 -0
- package/dist/icons/home.d.ts +2 -0
- package/dist/icons/image.d.ts +2 -0
- package/dist/icons/image1.d.ts +2 -0
- package/dist/icons/image2.d.ts +2 -0
- package/dist/icons/import.d.ts +2 -0
- package/dist/icons/info-fill.d.ts +2 -0
- package/dist/icons/info-outline.d.ts +2 -0
- package/dist/icons/info.d.ts +2 -0
- package/dist/icons/keyboard-arrow-down.d.ts +2 -0
- package/dist/icons/keyboard-arrow-left.d.ts +2 -0
- package/dist/icons/keyboard-arrow-right.d.ts +2 -0
- package/dist/icons/keyboard-arrow-up.d.ts +2 -0
- package/dist/icons/launch.d.ts +2 -0
- package/dist/icons/lightbulb-outline.d.ts +2 -0
- package/dist/icons/link-off.d.ts +2 -0
- package/dist/icons/link.d.ts +2 -0
- package/dist/icons/linkedin.d.ts +2 -0
- package/dist/icons/list.d.ts +2 -0
- package/dist/icons/location.d.ts +2 -0
- package/dist/icons/lock-fill.d.ts +2 -0
- package/dist/icons/lock.d.ts +2 -0
- package/dist/icons/log-out.d.ts +2 -0
- package/dist/icons/mail.d.ts +2 -0
- package/dist/icons/maximize.d.ts +2 -0
- package/dist/icons/menu-hide.d.ts +2 -0
- package/dist/icons/menu-show.d.ts +2 -0
- package/dist/icons/menu.d.ts +2 -0
- package/dist/icons/mic-off.d.ts +2 -0
- package/dist/icons/mic.d.ts +2 -0
- package/dist/icons/minimize.d.ts +2 -0
- package/dist/icons/minus-circle.d.ts +2 -0
- package/dist/icons/mobile-devices.d.ts +2 -0
- package/dist/icons/money.d.ts +2 -0
- package/dist/icons/moon.d.ts +2 -0
- package/dist/icons/more-horiz.d.ts +2 -0
- package/dist/icons/movie-filter.d.ts +2 -0
- package/dist/icons/mute.d.ts +2 -0
- package/dist/icons/near-me.d.ts +2 -0
- package/dist/icons/notes.d.ts +2 -0
- package/dist/icons/notifications.d.ts +2 -0
- package/dist/icons/offline-bolt.d.ts +2 -0
- package/dist/icons/outlook.d.ts +2 -0
- package/dist/icons/palette.d.ts +2 -0
- package/dist/icons/pause.d.ts +2 -0
- package/dist/icons/people.d.ts +2 -0
- package/dist/icons/person.d.ts +2 -0
- package/dist/icons/phone-link-off.d.ts +2 -0
- package/dist/icons/phonelink-off.d.ts +2 -0
- package/dist/icons/photo-size-select-actual.d.ts +2 -0
- package/dist/icons/picture-in-picture-deprecated.d.ts +2 -0
- package/dist/icons/picture-in-picture.d.ts +2 -0
- package/dist/icons/pin-fill.d.ts +2 -0
- package/dist/icons/pin.d.ts +2 -0
- package/dist/icons/play-arrow.d.ts +2 -0
- package/dist/icons/play-circle-filled.d.ts +2 -0
- package/dist/icons/play-circle.d.ts +2 -0
- package/dist/icons/play.d.ts +2 -0
- package/dist/icons/plus-circle.d.ts +2 -0
- package/dist/icons/power.d.ts +2 -0
- package/dist/icons/present.d.ts +2 -0
- package/dist/icons/public-off.d.ts +2 -0
- package/dist/icons/public-on.d.ts +2 -0
- package/dist/icons/publicoff.d.ts +2 -0
- package/dist/icons/publicon.d.ts +2 -0
- package/dist/icons/quick-edit.d.ts +2 -0
- package/dist/icons/record.d.ts +2 -0
- package/dist/icons/redo.d.ts +2 -0
- package/dist/icons/refresh.d.ts +2 -0
- package/dist/icons/remove-circle-outline.d.ts +2 -0
- package/dist/icons/remove-red-eye.d.ts +2 -0
- package/dist/icons/repeat.d.ts +2 -0
- package/dist/icons/replay-5.d.ts +2 -0
- package/dist/icons/replay.d.ts +2 -0
- package/dist/icons/reply-left.d.ts +2 -0
- package/dist/icons/reply-right.d.ts +2 -0
- package/dist/icons/reply.d.ts +2 -0
- package/dist/icons/rewind.d.ts +2 -0
- package/dist/icons/rotate-left.d.ts +2 -0
- package/dist/icons/safari-logo.d.ts +2 -0
- package/dist/icons/salesforce-blk.d.ts +2 -0
- package/dist/icons/salesforce.d.ts +2 -0
- package/dist/icons/school.d.ts +2 -0
- package/dist/icons/scissors.d.ts +2 -0
- package/dist/icons/screen-cam.d.ts +2 -0
- package/dist/icons/search.d.ts +2 -0
- package/dist/icons/send.d.ts +2 -0
- package/dist/icons/sentiment-dissatisfied.d.ts +2 -0
- package/dist/icons/sentiment-satisfied.d.ts +2 -0
- package/dist/icons/settings.d.ts +2 -0
- package/dist/icons/share.d.ts +2 -0
- package/dist/icons/show-chart.d.ts +2 -0
- package/dist/icons/silence-removal.d.ts +2 -0
- package/dist/icons/skip-back.d.ts +2 -0
- package/dist/icons/slack.d.ts +2 -0
- package/dist/icons/smile-alt.d.ts +2 -0
- package/dist/icons/smile-select.d.ts +2 -0
- package/dist/icons/smile.d.ts +2 -0
- package/dist/icons/sparkle.d.ts +2 -0
- package/dist/icons/speed-fast.d.ts +2 -0
- package/dist/icons/speed-medium.d.ts +2 -0
- package/dist/icons/speed-slow.d.ts +2 -0
- package/dist/icons/speed-x-fast.d.ts +2 -0
- package/dist/icons/speed-x-slow.d.ts +2 -0
- package/dist/icons/split.d.ts +2 -0
- package/dist/icons/star-outline.d.ts +2 -0
- package/dist/icons/star.d.ts +2 -0
- package/dist/icons/stop.d.ts +2 -0
- package/dist/icons/sun.d.ts +2 -0
- package/dist/icons/tag-faces.d.ts +2 -0
- package/dist/icons/task.d.ts +2 -0
- package/dist/icons/text.d.ts +2 -0
- package/dist/icons/timeline-editor.d.ts +2 -0
- package/dist/icons/timer.d.ts +2 -0
- package/dist/icons/touch-app.d.ts +2 -0
- package/dist/icons/transcript.d.ts +2 -0
- package/dist/icons/trash-forever.d.ts +2 -0
- package/dist/icons/trash.d.ts +2 -0
- package/dist/icons/tune.d.ts +2 -0
- package/dist/icons/unarchive.d.ts +2 -0
- package/dist/icons/undo.d.ts +2 -0
- package/dist/icons/upload.d.ts +2 -0
- package/dist/icons/user.d.ts +2 -0
- package/dist/icons/users-add.d.ts +2 -0
- package/dist/icons/users.d.ts +2 -0
- package/dist/icons/variables.d.ts +2 -0
- package/dist/icons/vertical-align-bottom.d.ts +2 -0
- package/dist/icons/video-cam.d.ts +2 -0
- package/dist/icons/video-library.d.ts +2 -0
- package/dist/icons/video-off.d.ts +2 -0
- package/dist/icons/videocam-off.d.ts +2 -0
- package/dist/icons/videocam.d.ts +2 -0
- package/dist/icons/view-list.d.ts +2 -0
- package/dist/icons/volume-down.d.ts +2 -0
- package/dist/icons/volume-mute.d.ts +2 -0
- package/dist/icons/volume-off.d.ts +2 -0
- package/dist/icons/volume-up.d.ts +2 -0
- package/dist/icons/volume-x.d.ts +2 -0
- package/dist/icons/volume1.d.ts +2 -0
- package/dist/icons/volume2.d.ts +2 -0
- package/dist/icons/warning-alert.d.ts +2 -0
- package/dist/icons/warning-amber.d.ts +2 -0
- package/dist/icons/watch-later-add.d.ts +2 -0
- package/dist/icons/watch-later-added.d.ts +2 -0
- package/dist/icons/watch-later-remove.d.ts +2 -0
- package/dist/icons/watch-later.d.ts +2 -0
- package/dist/icons/windows.d.ts +2 -0
- package/dist/icons/x-circle.d.ts +2 -0
- package/dist/icons/zap-outline.d.ts +2 -0
- package/dist/icons/zap.d.ts +2 -0
- package/package.json +10 -6
- package/dist/colors.js +0 -151
- package/dist/components/align/align.js +0 -60
- package/dist/components/arrange/arrange.js +0 -51
- package/dist/components/avatar/avatar.js +0 -114
- package/dist/components/backdrop/backdrop.js +0 -42
- package/dist/components/base-styles/base-styles.js +0 -40
- package/dist/components/button/button.js +0 -192
- package/dist/components/checkbox/checkbox.js +0 -97
- package/dist/components/color-picker/color-picker.js +0 -151
- package/dist/components/container/container.js +0 -76
- package/dist/components/distribute/distribute.js +0 -82
- package/dist/components/dropdown/dropdown.js +0 -60
- package/dist/components/error-container/error-container.js +0 -35
- package/dist/components/form-field/form-field.js +0 -56
- package/dist/components/icon/available-icons/account-circle.js +0 -3
- package/dist/components/icon/available-icons/account.js +0 -7
- package/dist/components/icon/available-icons/activity.js +0 -3
- package/dist/components/icon/available-icons/add-a-photo.js +0 -3
- package/dist/components/icon/available-icons/add-circle-outline.js +0 -3
- package/dist/components/icon/available-icons/add-photo.js +0 -7
- package/dist/components/icon/available-icons/add.js +0 -3
- package/dist/components/icon/available-icons/alarm-clock-complete.js +0 -5
- package/dist/components/icon/available-icons/alarm-clock.js +0 -5
- package/dist/components/icon/available-icons/alert-triangle.js +0 -5
- package/dist/components/icon/available-icons/align-bottom.js +0 -6
- package/dist/components/icon/available-icons/apple.js +0 -5
- package/dist/components/icon/available-icons/apps.js +0 -3
- package/dist/components/icon/available-icons/archive.js +0 -7
- package/dist/components/icon/available-icons/arrow-back.js +0 -3
- package/dist/components/icon/available-icons/arrow-downward.js +0 -3
- package/dist/components/icon/available-icons/arrow-drop-down.js +0 -3
- package/dist/components/icon/available-icons/arrow-drop-up.js +0 -3
- package/dist/components/icon/available-icons/arrow-forward.js +0 -3
- package/dist/components/icon/available-icons/arrow-left-alt.js +0 -6
- package/dist/components/icon/available-icons/arrow-left.js +0 -6
- package/dist/components/icon/available-icons/arrow-right-alt.js +0 -6
- package/dist/components/icon/available-icons/arrow-right.js +0 -6
- package/dist/components/icon/available-icons/arrow-upward.js +0 -3
- package/dist/components/icon/available-icons/at-mention.js +0 -5
- package/dist/components/icon/available-icons/auto-chapters.js +0 -6
- package/dist/components/icon/available-icons/auto-summaries.js +0 -9
- package/dist/components/icon/available-icons/auto-tasks.js +0 -7
- package/dist/components/icon/available-icons/auto-titles.js +0 -12
- package/dist/components/icon/available-icons/back.js +0 -4
- package/dist/components/icon/available-icons/back5.js +0 -8
- package/dist/components/icon/available-icons/bar-chart.js +0 -5
- package/dist/components/icon/available-icons/bell-off.js +0 -6
- package/dist/components/icon/available-icons/bell-ring.js +0 -8
- package/dist/components/icon/available-icons/bell.js +0 -5
- package/dist/components/icon/available-icons/blur.js +0 -16
- package/dist/components/icon/available-icons/book.js +0 -5
- package/dist/components/icon/available-icons/border-color.js +0 -3
- package/dist/components/icon/available-icons/bulb.js +0 -5
- package/dist/components/icon/available-icons/call-to-action.js +0 -6
- package/dist/components/icon/available-icons/cam-bubble-small.js +0 -5
- package/dist/components/icon/available-icons/cam-bubble.js +0 -5
- package/dist/components/icon/available-icons/canvas.js +0 -4
- package/dist/components/icon/available-icons/caret-folder.js +0 -6
- package/dist/components/icon/available-icons/cc-off.js +0 -5
- package/dist/components/icon/available-icons/cc-on.js +0 -5
- package/dist/components/icon/available-icons/chart.js +0 -5
- package/dist/components/icon/available-icons/check-circle-fill.js +0 -6
- package/dist/components/icon/available-icons/check-circle-outline.js +0 -3
- package/dist/components/icon/available-icons/check-circle.js +0 -6
- package/dist/components/icon/available-icons/check.js +0 -5
- package/dist/components/icon/available-icons/chevron-down.js +0 -5
- package/dist/components/icon/available-icons/chevron-left.js +0 -5
- package/dist/components/icon/available-icons/chevron-right.js +0 -5
- package/dist/components/icon/available-icons/chevron-small-down.js +0 -5
- package/dist/components/icon/available-icons/chevron-small-left.js +0 -5
- package/dist/components/icon/available-icons/chevron-small-right.js +0 -5
- package/dist/components/icon/available-icons/chevron-small-up.js +0 -5
- package/dist/components/icon/available-icons/chevron-up.js +0 -5
- package/dist/components/icon/available-icons/chevrons-left.js +0 -6
- package/dist/components/icon/available-icons/chevrons-right.js +0 -6
- package/dist/components/icon/available-icons/chrome-logo.js +0 -13
- package/dist/components/icon/available-icons/chrome.js +0 -5
- package/dist/components/icon/available-icons/clock.js +0 -6
- package/dist/components/icon/available-icons/close.js +0 -5
- package/dist/components/icon/available-icons/code.js +0 -6
- package/dist/components/icon/available-icons/collapse-replies.js +0 -4
- package/dist/components/icon/available-icons/collapse.js +0 -3
- package/dist/components/icon/available-icons/color-lens.js +0 -3
- package/dist/components/icon/available-icons/comment.js +0 -5
- package/dist/components/icon/available-icons/confetti.js +0 -12
- package/dist/components/icon/available-icons/contact-support.js +0 -7
- package/dist/components/icon/available-icons/copy.js +0 -6
- package/dist/components/icon/available-icons/create.js +0 -3
- package/dist/components/icon/available-icons/crop-16-9.js +0 -3
- package/dist/components/icon/available-icons/crop-5-4.js +0 -5
- package/dist/components/icon/available-icons/crop-7-5.js +0 -5
- package/dist/components/icon/available-icons/crop-expanded-16-9.js +0 -3
- package/dist/components/icon/available-icons/crop169-expanded.js +0 -5
- package/dist/components/icon/available-icons/crop169.js +0 -5
- package/dist/components/icon/available-icons/crop54.js +0 -5
- package/dist/components/icon/available-icons/crop75.js +0 -5
- package/dist/components/icon/available-icons/cut.js +0 -3
- package/dist/components/icon/available-icons/delete-forever.js +0 -3
- package/dist/components/icon/available-icons/delete.js +0 -3
- package/dist/components/icon/available-icons/desktop-mac.js +0 -7
- package/dist/components/icon/available-icons/domain.js +0 -6
- package/dist/components/icon/available-icons/download.js +0 -5
- package/dist/components/icon/available-icons/edge-logo.js +0 -39
- package/dist/components/icon/available-icons/edit-border.js +0 -7
- package/dist/components/icon/available-icons/edit.js +0 -5
- package/dist/components/icon/available-icons/exit-to-app.js +0 -3
- package/dist/components/icon/available-icons/expand-replies.js +0 -4
- package/dist/components/icon/available-icons/expand.js +0 -3
- package/dist/components/icon/available-icons/extension.js +0 -5
- package/dist/components/icon/available-icons/external-link.js +0 -6
- package/dist/components/icon/available-icons/eye-off.js +0 -7
- package/dist/components/icon/available-icons/eye.js +0 -6
- package/dist/components/icon/available-icons/fiber-manual-record.js +0 -3
- package/dist/components/icon/available-icons/filler-word-removal.js +0 -9
- package/dist/components/icon/available-icons/firefox-logo.js +0 -125
- package/dist/components/icon/available-icons/first-page.js +0 -3
- package/dist/components/icon/available-icons/folder-plus-deprecated.js +0 -6
- package/dist/components/icon/available-icons/folder-plus.js +0 -6
- package/dist/components/icon/available-icons/folder-shared.js +0 -7
- package/dist/components/icon/available-icons/folder.js +0 -5
- package/dist/components/icon/available-icons/forward-5.js +0 -8
- package/dist/components/icon/available-icons/forward.js +0 -4
- package/dist/components/icon/available-icons/forward5.js +0 -5
- package/dist/components/icon/available-icons/frown.js +0 -6
- package/dist/components/icon/available-icons/fullscreen-exit.js +0 -3
- package/dist/components/icon/available-icons/fullscreen.js +0 -3
- package/dist/components/icon/available-icons/google.js +0 -8
- package/dist/components/icon/available-icons/grid.js +0 -5
- package/dist/components/icon/available-icons/group-add.js +0 -3
- package/dist/components/icon/available-icons/help-circle.js +0 -6
- package/dist/components/icon/available-icons/help.js +0 -3
- package/dist/components/icon/available-icons/highlight-off.js +0 -3
- package/dist/components/icon/available-icons/home.js +0 -3
- package/dist/components/icon/available-icons/image.js +0 -3
- package/dist/components/icon/available-icons/image1.js +0 -6
- package/dist/components/icon/available-icons/image2.js +0 -6
- package/dist/components/icon/available-icons/import.js +0 -7
- package/dist/components/icon/available-icons/info-fill.js +0 -5
- package/dist/components/icon/available-icons/info-outline.js +0 -3
- package/dist/components/icon/available-icons/info.js +0 -6
- package/dist/components/icon/available-icons/keyboard-arrow-down.js +0 -3
- package/dist/components/icon/available-icons/keyboard-arrow-left.js +0 -3
- package/dist/components/icon/available-icons/keyboard-arrow-right.js +0 -3
- package/dist/components/icon/available-icons/keyboard-arrow-up.js +0 -3
- package/dist/components/icon/available-icons/launch.js +0 -3
- package/dist/components/icon/available-icons/lightbulb-outline.js +0 -3
- package/dist/components/icon/available-icons/link-off.js +0 -5
- package/dist/components/icon/available-icons/link.js +0 -7
- package/dist/components/icon/available-icons/linkedin.js +0 -3
- package/dist/components/icon/available-icons/list.js +0 -5
- package/dist/components/icon/available-icons/location.js +0 -5
- package/dist/components/icon/available-icons/lock-fill.js +0 -7
- package/dist/components/icon/available-icons/lock.js +0 -6
- package/dist/components/icon/available-icons/log-out.js +0 -6
- package/dist/components/icon/available-icons/mail.js +0 -5
- package/dist/components/icon/available-icons/maximize.js +0 -5
- package/dist/components/icon/available-icons/menu-hide.js +0 -5
- package/dist/components/icon/available-icons/menu-show.js +0 -5
- package/dist/components/icon/available-icons/menu.js +0 -5
- package/dist/components/icon/available-icons/mic-off.js +0 -5
- package/dist/components/icon/available-icons/mic.js +0 -8
- package/dist/components/icon/available-icons/minimize.js +0 -5
- package/dist/components/icon/available-icons/minus-circle.js +0 -6
- package/dist/components/icon/available-icons/mobile-devices.js +0 -5
- package/dist/components/icon/available-icons/money.js +0 -6
- package/dist/components/icon/available-icons/moon.js +0 -6
- package/dist/components/icon/available-icons/more-horiz.js +0 -5
- package/dist/components/icon/available-icons/movie-filter.js +0 -5
- package/dist/components/icon/available-icons/mute.js +0 -5
- package/dist/components/icon/available-icons/near-me.js +0 -3
- package/dist/components/icon/available-icons/notes.js +0 -3
- package/dist/components/icon/available-icons/notifications.js +0 -3
- package/dist/components/icon/available-icons/offline-bolt.js +0 -3
- package/dist/components/icon/available-icons/outlook.js +0 -8
- package/dist/components/icon/available-icons/palette.js +0 -6
- package/dist/components/icon/available-icons/pause.js +0 -5
- package/dist/components/icon/available-icons/people.js +0 -3
- package/dist/components/icon/available-icons/person.js +0 -3
- package/dist/components/icon/available-icons/phone-link-off.js +0 -7
- package/dist/components/icon/available-icons/phonelink-off.js +0 -3
- package/dist/components/icon/available-icons/photo-size-select-actual.js +0 -3
- package/dist/components/icon/available-icons/picture-in-picture-deprecated.js +0 -6
- package/dist/components/icon/available-icons/picture-in-picture.js +0 -6
- package/dist/components/icon/available-icons/pin-fill.js +0 -5
- package/dist/components/icon/available-icons/pin.js +0 -5
- package/dist/components/icon/available-icons/play-arrow.js +0 -3
- package/dist/components/icon/available-icons/play-circle-filled.js +0 -3
- package/dist/components/icon/available-icons/play-circle.js +0 -6
- package/dist/components/icon/available-icons/play.js +0 -5
- package/dist/components/icon/available-icons/plus-circle.js +0 -5
- package/dist/components/icon/available-icons/power.js +0 -4
- package/dist/components/icon/available-icons/present.js +0 -5
- package/dist/components/icon/available-icons/public-off.js +0 -5
- package/dist/components/icon/available-icons/public-on.js +0 -5
- package/dist/components/icon/available-icons/publicoff.js +0 -3
- package/dist/components/icon/available-icons/publicon.js +0 -3
- package/dist/components/icon/available-icons/quick-edit.js +0 -10
- package/dist/components/icon/available-icons/record.js +0 -5
- package/dist/components/icon/available-icons/redo.js +0 -4
- package/dist/components/icon/available-icons/refresh.js +0 -6
- package/dist/components/icon/available-icons/remove-circle-outline.js +0 -3
- package/dist/components/icon/available-icons/remove-red-eye.js +0 -3
- package/dist/components/icon/available-icons/repeat.js +0 -6
- package/dist/components/icon/available-icons/replay-5.js +0 -6
- package/dist/components/icon/available-icons/replay.js +0 -3
- package/dist/components/icon/available-icons/reply-left.js +0 -5
- package/dist/components/icon/available-icons/reply-right.js +0 -5
- package/dist/components/icon/available-icons/reply.js +0 -3
- package/dist/components/icon/available-icons/rewind.js +0 -8
- package/dist/components/icon/available-icons/rotate-left.js +0 -3
- package/dist/components/icon/available-icons/safari-logo.js +0 -35
- package/dist/components/icon/available-icons/salesforce-blk.js +0 -7
- package/dist/components/icon/available-icons/salesforce.js +0 -7
- package/dist/components/icon/available-icons/school.js +0 -3
- package/dist/components/icon/available-icons/scissors.js +0 -7
- package/dist/components/icon/available-icons/screen-cam.js +0 -7
- package/dist/components/icon/available-icons/search.js +0 -6
- package/dist/components/icon/available-icons/send.js +0 -6
- package/dist/components/icon/available-icons/sentiment-dissatisfied.js +0 -3
- package/dist/components/icon/available-icons/sentiment-satisfied.js +0 -3
- package/dist/components/icon/available-icons/settings.js +0 -6
- package/dist/components/icon/available-icons/share.js +0 -5
- package/dist/components/icon/available-icons/show-chart.js +0 -3
- package/dist/components/icon/available-icons/silence-removal.js +0 -9
- package/dist/components/icon/available-icons/skip-back.js +0 -5
- package/dist/components/icon/available-icons/slack.js +0 -8
- package/dist/components/icon/available-icons/smile-alt.js +0 -6
- package/dist/components/icon/available-icons/smile-select.js +0 -5
- package/dist/components/icon/available-icons/smile.js +0 -6
- package/dist/components/icon/available-icons/sparkle.js +0 -3
- package/dist/components/icon/available-icons/speed-fast.js +0 -5
- package/dist/components/icon/available-icons/speed-medium.js +0 -5
- package/dist/components/icon/available-icons/speed-slow.js +0 -5
- package/dist/components/icon/available-icons/speed-x-fast.js +0 -5
- package/dist/components/icon/available-icons/speed-x-slow.js +0 -5
- package/dist/components/icon/available-icons/split.js +0 -5
- package/dist/components/icon/available-icons/star-outline.js +0 -5
- package/dist/components/icon/available-icons/star.js +0 -5
- package/dist/components/icon/available-icons/stop.js +0 -5
- package/dist/components/icon/available-icons/sun.js +0 -14
- package/dist/components/icon/available-icons/tag-faces.js +0 -3
- package/dist/components/icon/available-icons/task.js +0 -6
- package/dist/components/icon/available-icons/text.js +0 -5
- package/dist/components/icon/available-icons/timeline-editor.js +0 -7
- package/dist/components/icon/available-icons/timer.js +0 -5
- package/dist/components/icon/available-icons/touch-app.js +0 -3
- package/dist/components/icon/available-icons/transcript.js +0 -3
- package/dist/components/icon/available-icons/trash-forever.js +0 -8
- package/dist/components/icon/available-icons/trash.js +0 -7
- package/dist/components/icon/available-icons/tune.js +0 -3
- package/dist/components/icon/available-icons/unarchive.js +0 -7
- package/dist/components/icon/available-icons/undo.js +0 -6
- package/dist/components/icon/available-icons/upload.js +0 -6
- package/dist/components/icon/available-icons/user.js +0 -5
- package/dist/components/icon/available-icons/users-add.js +0 -6
- package/dist/components/icon/available-icons/users.js +0 -5
- package/dist/components/icon/available-icons/variables.js +0 -5
- package/dist/components/icon/available-icons/vertical-align-bottom.js +0 -3
- package/dist/components/icon/available-icons/video-cam.js +0 -6
- package/dist/components/icon/available-icons/video-library.js +0 -7
- package/dist/components/icon/available-icons/video-off.js +0 -6
- package/dist/components/icon/available-icons/videocam-off.js +0 -3
- package/dist/components/icon/available-icons/videocam.js +0 -3
- package/dist/components/icon/available-icons/view-list.js +0 -3
- package/dist/components/icon/available-icons/volume-down.js +0 -3
- package/dist/components/icon/available-icons/volume-mute.js +0 -3
- package/dist/components/icon/available-icons/volume-off.js +0 -3
- package/dist/components/icon/available-icons/volume-up.js +0 -3
- package/dist/components/icon/available-icons/volume-x.js +0 -6
- package/dist/components/icon/available-icons/volume1.js +0 -5
- package/dist/components/icon/available-icons/volume2.js +0 -5
- package/dist/components/icon/available-icons/warning-alert.js +0 -3
- package/dist/components/icon/available-icons/warning-amber.js +0 -3
- package/dist/components/icon/available-icons/watch-later-add.js +0 -5
- package/dist/components/icon/available-icons/watch-later-added.js +0 -5
- package/dist/components/icon/available-icons/watch-later-remove.js +0 -5
- package/dist/components/icon/available-icons/watch-later.js +0 -5
- package/dist/components/icon/available-icons/windows.js +0 -5
- package/dist/components/icon/available-icons/x-circle.js +0 -7
- package/dist/components/icon/available-icons/zap-outline.js +0 -5
- package/dist/components/icon/available-icons/zap.js +0 -5
- package/dist/components/icon/icon.js +0 -45
- package/dist/components/icon-button/icon-button.js +0 -82
- package/dist/components/illustration/illustration.js +0 -31
- package/dist/components/index.js +0 -47
- package/dist/components/layout/layout.js +0 -48
- package/dist/components/link/link.js +0 -67
- package/dist/components/list/list.js +0 -103
- package/dist/components/loader/loader.js +0 -79
- package/dist/components/logo/logo.js +0 -113
- package/dist/components/logo-loader/logo-loader.js +0 -26
- package/dist/components/menu/menu.js +0 -82
- package/dist/components/modal/modal.js +0 -163
- package/dist/components/notification-bar/notification-bar.js +0 -96
- package/dist/components/notification-bar/types.js +0 -1
- package/dist/components/pill/pill.js +0 -40
- package/dist/components/popover/popover.js +0 -96
- package/dist/components/radio/radio.js +0 -86
- package/dist/components/select/select.js +0 -208
- package/dist/components/skeleton-text/skeleton-text.js +0 -32
- package/dist/components/spacer/spacer.js +0 -28
- package/dist/components/split/split.js +0 -67
- package/dist/components/switch/switch.js +0 -127
- package/dist/components/tabs/tabs.js +0 -192
- package/dist/components/text/text.js +0 -107
- package/dist/components/text-button/text-button.js +0 -88
- package/dist/components/text-input/text-input.js +0 -130
- package/dist/components/textarea/textarea.js +0 -67
- package/dist/components/toast/toast.js +0 -87
- package/dist/components/tooltip/tooltip.js +0 -157
- package/dist/console-messages.js +0 -5
- package/dist/constants/routes.js +0 -1
- package/dist/css-utilities/generate-utilities.js +0 -64
- package/dist/css-utilities/index.js +0 -2
- package/dist/css-utilities/rules.js +0 -449
- package/dist/css-variables/index.js +0 -136
- package/dist/hooks/index.js +0 -5
- package/dist/hooks/use-focused-element.js +0 -26
- package/dist/hooks/use-media.js +0 -23
- package/dist/hooks/use-on-click-outside.js +0 -17
- package/dist/hooks/use-prevent-scroll.js +0 -73
- package/dist/hooks/use-push-page-down.js +0 -24
- package/dist/illustrations/accounts-and-billing.js +0 -7
- package/dist/illustrations/archived.js +0 -7
- package/dist/illustrations/ask-for-more.js +0 -6
- package/dist/illustrations/business-plan.js +0 -6
- package/dist/illustrations/chrome-notifications-empty-state.js +0 -14
- package/dist/illustrations/collaborate-with-teammates.js +0 -6
- package/dist/illustrations/comments.js +0 -7
- package/dist/illustrations/community-alt.js +0 -6
- package/dist/illustrations/community.js +0 -6
- package/dist/illustrations/content-limit.js +0 -6
- package/dist/illustrations/custom-branding.js +0 -6
- package/dist/illustrations/desktop-app-and-chrome-extension.js +0 -9
- package/dist/illustrations/device-compatibility.js +0 -7
- package/dist/illustrations/downgrade.js +0 -6
- package/dist/illustrations/embrace-the-weird.js +0 -6
- package/dist/illustrations/enterprise-plan.js +0 -6
- package/dist/illustrations/faq-and-security.js +0 -8
- package/dist/illustrations/five-minute-limit.js +0 -6
- package/dist/illustrations/folders-empty-state-mobile.js +0 -7
- package/dist/illustrations/getting-started.js +0 -9
- package/dist/illustrations/growth-through-empathy.js +0 -12
- package/dist/illustrations/health-plans.js +0 -6
- package/dist/illustrations/help-ios.js +0 -7
- package/dist/illustrations/how-to-use-loom.js +0 -6
- package/dist/illustrations/index.js +0 -48
- package/dist/illustrations/invite-members.js +0 -6
- package/dist/illustrations/invite.js +0 -9
- package/dist/illustrations/lead-with-transparency.js +0 -6
- package/dist/illustrations/learning-and-development.js +0 -8
- package/dist/illustrations/loom-plans.js +0 -7
- package/dist/illustrations/my-videos-empty-state-mobile.js +0 -7
- package/dist/illustrations/option-grants.js +0 -6
- package/dist/illustrations/parental-leave.js +0 -6
- package/dist/illustrations/pto.js +0 -6
- package/dist/illustrations/recents-empty-state-mobile.js +0 -6
- package/dist/illustrations/record.js +0 -10
- package/dist/illustrations/remote-first.js +0 -8
- package/dist/illustrations/roadmap.js +0 -7
- package/dist/illustrations/screenshot.js +0 -6
- package/dist/illustrations/share-with-your-team.js +0 -11
- package/dist/illustrations/share.js +0 -8
- package/dist/illustrations/starred.js +0 -6
- package/dist/illustrations/starter-plus-plan.js +0 -6
- package/dist/illustrations/strong-upload-speed.js +0 -7
- package/dist/illustrations/troubleshooting.js +0 -9
- package/dist/illustrations/upgrade.js +0 -6
- package/dist/illustrations/upload-drag-and-drop.js +0 -6
- package/dist/illustrations/use-cases.js +0 -6
- package/dist/illustrations/wellness.js +0 -8
- package/dist/index.js +0 -10
- package/dist/types.js +0 -1
- package/dist/utilities/case.js +0 -6
- package/dist/utilities/color.js +0 -23
- package/dist/utilities/downshift.js +0 -24
- package/dist/utilities/index.js +0 -5
- package/dist/utilities/responsive.js +0 -101
- package/dist/utilities/size.js +0 -34
- package/dist/utilities/styles.js +0 -34
- package/dist/variables.js +0 -81
- /package/dist/{components/icon/available-icons/index.js → icons/index.d.ts} +0 -0
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import Menu, { MenuItem, menuPositions } from '../menu/menu';
|
|
13
|
-
import React, { useEffect, useState } from 'react';
|
|
14
|
-
import { getColorValue, getSize, u } from '../../utilities';
|
|
15
|
-
import Downshift from 'downshift';
|
|
16
|
-
import Icon from '../icon/icon';
|
|
17
|
-
import ResizeObserver from 'resize-observer-polyfill';
|
|
18
|
-
import { SvgChevronSmallDown } from '../icon/available-icons';
|
|
19
|
-
import Text from '../text/text';
|
|
20
|
-
import { getDownshiftEnvironment } from '../../utilities/downshift';
|
|
21
|
-
import styled from '@emotion/styled';
|
|
22
|
-
import { useLayer } from 'react-laag';
|
|
23
|
-
const SelectWrapper = styled.div `
|
|
24
|
-
position: relative;
|
|
25
|
-
`;
|
|
26
|
-
const SelectHeaderWrapper = styled.button `
|
|
27
|
-
appearance: none;
|
|
28
|
-
font: inherit;
|
|
29
|
-
text-align: left;
|
|
30
|
-
display: grid;
|
|
31
|
-
grid-auto-flow: column;
|
|
32
|
-
grid-template-columns: ${props => props.columns};
|
|
33
|
-
${getSize('grid-gap', 'small')};
|
|
34
|
-
align-items: center;
|
|
35
|
-
cursor: pointer;
|
|
36
|
-
width: 100%;
|
|
37
|
-
min-height: ${u(4.5)};
|
|
38
|
-
padding: 0 ${u(1.5)} 0 var(--lns-formFieldHorizontalPadding);
|
|
39
|
-
color: ${getColorValue('body')};
|
|
40
|
-
border: none;
|
|
41
|
-
background-color: ${getColorValue('formFieldBackground')};
|
|
42
|
-
transition: 0.3s box-shadow;
|
|
43
|
-
border-radius: var(--lns-formFieldRadius);
|
|
44
|
-
box-shadow: inset 0 0 0 var(--lns-formFieldBorderWidth)
|
|
45
|
-
var(--lns-color-formFieldBorder);
|
|
46
|
-
|
|
47
|
-
&:hover:not(:disabled) {
|
|
48
|
-
box-shadow: inset 0 0 0 var(--lns-formFieldBorderWidthFocus)
|
|
49
|
-
var(--lns-color-blurple);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
&:focus {
|
|
53
|
-
outline: 1px solid transparent;
|
|
54
|
-
box-shadow: var(--lns-formFieldBorderShadowFocus);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
&:disabled {
|
|
58
|
-
color: ${getColorValue('disabledContent')};
|
|
59
|
-
background-color: ${getColorValue('disabledBackground')};
|
|
60
|
-
cursor: default;
|
|
61
|
-
}
|
|
62
|
-
`;
|
|
63
|
-
const getSelectedOptionObject = ({ options, selectedOptionValue }) => {
|
|
64
|
-
const selectedOptionArray = options.filter(option => option.value === selectedOptionValue);
|
|
65
|
-
return selectedOptionArray[0] || { icon: null, title: null };
|
|
66
|
-
};
|
|
67
|
-
const getIcon = ({ options, selectedItem, selectedOptionValue }) => {
|
|
68
|
-
if (selectedItem) {
|
|
69
|
-
return selectedItem.icon;
|
|
70
|
-
}
|
|
71
|
-
if (selectedOptionValue) {
|
|
72
|
-
return getSelectedOptionObject({ options, selectedOptionValue }).icon;
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
const getTitle = ({ options, selectedItem, selectedOptionValue, selectPlaceholder, }) => {
|
|
76
|
-
if (selectedItem) {
|
|
77
|
-
return selectedItem.title;
|
|
78
|
-
}
|
|
79
|
-
if (selectedOptionValue) {
|
|
80
|
-
return getSelectedOptionObject({ options, selectedOptionValue }).title;
|
|
81
|
-
}
|
|
82
|
-
return selectPlaceholder;
|
|
83
|
-
};
|
|
84
|
-
const SelectHeader = ({ getToggleButtonProps, inputValue, selectedItem, selectedOptionValue, selectPlaceholder, isDisabled, options, }) => {
|
|
85
|
-
const hasIcon = Boolean(getIcon({ options, selectedItem, selectedOptionValue }));
|
|
86
|
-
const hasPlaceholder = !selectedOptionValue && !selectedItem;
|
|
87
|
-
const iconColumn = hasIcon ? 'auto' : '';
|
|
88
|
-
const columns = `${iconColumn} 1fr auto`;
|
|
89
|
-
const color = isDisabled ? 'disabledContent' : undefined;
|
|
90
|
-
return (React.createElement(SelectHeaderWrapper, Object.assign({}, getToggleButtonProps({
|
|
91
|
-
onKeyDown: event => {
|
|
92
|
-
if (event.key === 'Escape') {
|
|
93
|
-
event.nativeEvent.preventDownshiftDefault = true;
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
}), { hasValue: inputValue || selectedOptionValue, disabled: isDisabled, columns: columns }),
|
|
97
|
-
hasIcon && (React.createElement(Icon, { icon: getIcon({ options, selectedItem, selectedOptionValue }), color: color })),
|
|
98
|
-
React.createElement(Text, { hasEllipsis: true, color: hasPlaceholder ? 'grey5' : 'inherit' }, getTitle({
|
|
99
|
-
options,
|
|
100
|
-
selectedItem,
|
|
101
|
-
selectedOptionValue,
|
|
102
|
-
selectPlaceholder,
|
|
103
|
-
})),
|
|
104
|
-
React.createElement(Icon, { icon: React.createElement(SvgChevronSmallDown, null), color: color })));
|
|
105
|
-
};
|
|
106
|
-
const CustomHeader = ({ selectedOptionValue, selectedItem, trigger, getToggleButtonProps, options, selectPlaceholder, isDisabled, }) => {
|
|
107
|
-
const buttonProps = () => {
|
|
108
|
-
return Object.assign({}, getToggleButtonProps({
|
|
109
|
-
onKeyDown: event => {
|
|
110
|
-
if (event.key === 'Escape') {
|
|
111
|
-
event.nativeEvent.preventDownshiftDefault = true;
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
}));
|
|
115
|
-
};
|
|
116
|
-
const getTriggerTitle = () => {
|
|
117
|
-
if (selectedItem) {
|
|
118
|
-
return selectedItem.title;
|
|
119
|
-
}
|
|
120
|
-
if (!selectedItem && selectedOptionValue) {
|
|
121
|
-
return getSelectedOptionObject({ options, selectedOptionValue }).title;
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
const getTriggerIcon = () => {
|
|
125
|
-
if (selectedItem && selectedItem.icon) {
|
|
126
|
-
return selectedItem.icon;
|
|
127
|
-
}
|
|
128
|
-
if (!selectedItem && selectedOptionValue) {
|
|
129
|
-
return getSelectedOptionObject({ options, selectedOptionValue }).icon;
|
|
130
|
-
}
|
|
131
|
-
};
|
|
132
|
-
const triggerContent = {
|
|
133
|
-
title: getTriggerTitle(),
|
|
134
|
-
placeholder: selectPlaceholder,
|
|
135
|
-
icon: getTriggerIcon(),
|
|
136
|
-
isDisabled,
|
|
137
|
-
};
|
|
138
|
-
return trigger(triggerContent, buttonProps());
|
|
139
|
-
};
|
|
140
|
-
const getSelectedOption = (value, options) => options.find(o => o.value === value);
|
|
141
|
-
const didSelectedOptionValueChange = (selectedOptionValue, prevSelectedItem) => {
|
|
142
|
-
return Boolean(prevSelectedItem && selectedOptionValue !== prevSelectedItem.value);
|
|
143
|
-
};
|
|
144
|
-
const Select = (_a) => {
|
|
145
|
-
var { container, onChange, menuZIndex = 1100, menuMaxWidth, menuMaxHeight = 34, menuMinWidth, selectedOptionValue, onOuterClick, options, placeholder, menuPosition = 'left', isDisabled, onOpenChange, trigger } = _a, props = __rest(_a, ["container", "onChange", "menuZIndex", "menuMaxWidth", "menuMaxHeight", "menuMinWidth", "selectedOptionValue", "onOuterClick", "options", "placeholder", "menuPosition", "isDisabled", "onOpenChange", "trigger"]);
|
|
146
|
-
const environment = getDownshiftEnvironment(container);
|
|
147
|
-
const [downshiftIsOpen, setDownshiftIsOpen] = useState(false);
|
|
148
|
-
const [prevSelectedItem, setPrevSelectedItem] = useState(getSelectedOption(selectedOptionValue, options));
|
|
149
|
-
const [selectedItem, setSelectedItem] = useState(prevSelectedItem);
|
|
150
|
-
const onDownshiftChange = item => {
|
|
151
|
-
setSelectedItem(item);
|
|
152
|
-
onChange && onChange(item ? item : '');
|
|
153
|
-
};
|
|
154
|
-
const downshiftProps = {
|
|
155
|
-
itemToString: item => (item ? item.value : ''),
|
|
156
|
-
onChange: onDownshiftChange,
|
|
157
|
-
onOuterClick,
|
|
158
|
-
environment,
|
|
159
|
-
selectedItem,
|
|
160
|
-
};
|
|
161
|
-
if (environment) {
|
|
162
|
-
downshiftProps.environment = environment;
|
|
163
|
-
}
|
|
164
|
-
const { layerProps, triggerProps, renderLayer, triggerBounds } = useLayer({
|
|
165
|
-
isOpen: downshiftIsOpen,
|
|
166
|
-
container,
|
|
167
|
-
ResizeObserver,
|
|
168
|
-
placement: menuPositions[menuPosition],
|
|
169
|
-
auto: true,
|
|
170
|
-
snap: true,
|
|
171
|
-
});
|
|
172
|
-
useEffect(() => {
|
|
173
|
-
if (didSelectedOptionValueChange(selectedOptionValue, prevSelectedItem)) {
|
|
174
|
-
const selectedItem = getSelectedOption(selectedOptionValue, options);
|
|
175
|
-
setPrevSelectedItem(selectedItem);
|
|
176
|
-
setSelectedItem(selectedItem);
|
|
177
|
-
}
|
|
178
|
-
}, [selectedOptionValue, options, prevSelectedItem]);
|
|
179
|
-
useEffect(() => {
|
|
180
|
-
onOpenChange && onOpenChange(downshiftIsOpen);
|
|
181
|
-
}, [downshiftIsOpen, onOpenChange]);
|
|
182
|
-
const stateReducer = (state, changes) => {
|
|
183
|
-
if (changes.isOpen !== undefined) {
|
|
184
|
-
setDownshiftIsOpen(changes.isOpen);
|
|
185
|
-
}
|
|
186
|
-
return changes;
|
|
187
|
-
};
|
|
188
|
-
return (React.createElement(SelectWrapper, Object.assign({}, props),
|
|
189
|
-
React.createElement(Downshift, Object.assign({}, downshiftProps, { stateReducer: stateReducer }), ({ getItemProps, getMenuProps, getToggleButtonProps, isOpen, inputValue, highlightedIndex, selectedItem, }) => {
|
|
190
|
-
return (React.createElement("div", null,
|
|
191
|
-
React.createElement("div", Object.assign({}, triggerProps), trigger ? (React.createElement(CustomHeader, { getToggleButtonProps: getToggleButtonProps, selectedItem: selectedItem, selectedOptionValue: selectedOptionValue, selectPlaceholder: placeholder, isDisabled: isDisabled, options: options, trigger: trigger })) : (React.createElement(SelectHeader, { getToggleButtonProps: getToggleButtonProps, selectedItem: selectedItem, selectedOptionValue: selectedOptionValue, selectPlaceholder: placeholder, options: options, inputValue: inputValue, isDisabled: isDisabled }))),
|
|
192
|
-
downshiftIsOpen &&
|
|
193
|
-
isOpen &&
|
|
194
|
-
renderLayer(React.createElement("div", Object.assign({}, layerProps, { style: Object.assign(Object.assign({}, layerProps.style), { zIndex: menuZIndex, width: menuMinWidth ? 'auto' : triggerBounds === null || triggerBounds === void 0 ? void 0 : triggerBounds.width }) }),
|
|
195
|
-
React.createElement(Menu, { position: menuPosition, downshiftMenuProps: getMenuProps, maxWidth: menuMaxWidth, maxHeight: menuMaxHeight, minWidth: menuMinWidth }, options.map((item, index) => {
|
|
196
|
-
return (React.createElement(MenuItem, Object.assign({ key: index, getItemProps: getItemProps, icon: item.icon, hidden: item.hidden }, getItemProps({
|
|
197
|
-
key: `${item.value}-${index}`,
|
|
198
|
-
index,
|
|
199
|
-
item,
|
|
200
|
-
disabled: item.isDisabled,
|
|
201
|
-
}), { isDisabled: item.isDisabled, hasDivider: item.hasDivider, isHighlighted: highlightedIndex === index, isSelected: (!selectedItem &&
|
|
202
|
-
item.value === selectedOptionValue) ||
|
|
203
|
-
(selectedItem &&
|
|
204
|
-
selectedItem.value === item.value) }), item.title));
|
|
205
|
-
}))))));
|
|
206
|
-
})));
|
|
207
|
-
};
|
|
208
|
-
export default Select;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import styled from '@emotion/styled';
|
|
3
|
-
import { getTextSize } from '../../utilities';
|
|
4
|
-
const SkeletonTextWrapper = styled.div `
|
|
5
|
-
${props => getTextSize(props.size)};
|
|
6
|
-
color: transparent;
|
|
7
|
-
position: relative;
|
|
8
|
-
&::after {
|
|
9
|
-
content '';
|
|
10
|
-
position: absolute;
|
|
11
|
-
background-color: var(--lns-color-disabledBackground);
|
|
12
|
-
border-radius: var(--lns-radius-full);
|
|
13
|
-
width: 100%;
|
|
14
|
-
display: block;
|
|
15
|
-
height: 71.45%;
|
|
16
|
-
top: .2em;
|
|
17
|
-
}
|
|
18
|
-
${props => props.lines > 1 &&
|
|
19
|
-
`
|
|
20
|
-
&:nth-of-type(3n+1) {
|
|
21
|
-
width: calc(100% - 2.25rem);
|
|
22
|
-
}
|
|
23
|
-
&:nth-of-type(3n) {
|
|
24
|
-
width: calc(100% - 4.125rem);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
`};
|
|
28
|
-
`;
|
|
29
|
-
const SkeletonText = ({ size = 'body-md', lines = 1, }) => {
|
|
30
|
-
return (React.createElement(React.Fragment, null, [...Array(lines)].map((_, i) => (React.createElement(SkeletonTextWrapper, { key: i, size: size, lines: lines }, "Loading")))));
|
|
31
|
-
};
|
|
32
|
-
export default SkeletonText;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import React from 'react';
|
|
13
|
-
import styled from '@emotion/styled';
|
|
14
|
-
import { getSize } from '../../utilities';
|
|
15
|
-
const SpacerWrapper = styled.div `
|
|
16
|
-
display: ${props => (props.isInline ? 'inline-block' : 'block')};
|
|
17
|
-
vertical-align: middle;
|
|
18
|
-
${props => getSize('padding', props.all)};
|
|
19
|
-
${props => getSize('padding-top', props.top)};
|
|
20
|
-
${props => getSize('padding-right', props.right)};
|
|
21
|
-
${props => getSize('padding-bottom', props.bottom)};
|
|
22
|
-
${props => getSize('padding-left', props.left)};
|
|
23
|
-
`;
|
|
24
|
-
const Spacer = (_a) => {
|
|
25
|
-
var { children, all, y, x, top, right, bottom, left, isInline } = _a, props = __rest(_a, ["children", "all", "y", "x", "top", "right", "bottom", "left", "isInline"]);
|
|
26
|
-
return (React.createElement(SpacerWrapper, Object.assign({ all: all, top: y || top, bottom: y || bottom, right: x || right, left: x || left, isInline: isInline }, props), children));
|
|
27
|
-
};
|
|
28
|
-
export default Spacer;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { customStylesWarning, splitComponentChildren, } from '../../console-messages';
|
|
13
|
-
import { getResponsiveNumber, getResponsiveOneOf, getSize, } from '../../utilities';
|
|
14
|
-
import React from 'react';
|
|
15
|
-
import { css } from '@emotion/core';
|
|
16
|
-
import styled from '@emotion/styled';
|
|
17
|
-
const getSizeStyles = props => css `
|
|
18
|
-
${getSize('width', props.width)};
|
|
19
|
-
${getSize('height', props.height)};
|
|
20
|
-
${getSize('min-width', props.minWidth)};
|
|
21
|
-
${getSize('min-height', props.minHeight)};
|
|
22
|
-
${getSize('max-width', props.maxWidth)};
|
|
23
|
-
${getSize('max-height', props.maxHeight)};
|
|
24
|
-
`;
|
|
25
|
-
const SplitWrapper = styled.div `
|
|
26
|
-
display: flex;
|
|
27
|
-
${props => getResponsiveOneOf('align-items', props.alignItems)};
|
|
28
|
-
${props => props.justifyContent &&
|
|
29
|
-
getResponsiveOneOf('justify-content', props.justifyContent)};
|
|
30
|
-
${props => props.alignContent &&
|
|
31
|
-
getResponsiveOneOf('align-content', props.alignContent)};
|
|
32
|
-
${props => getResponsiveOneOf('flex-wrap', props.wrap)};
|
|
33
|
-
${props => props.direction && getResponsiveOneOf('flex-direction', props.direction)};
|
|
34
|
-
${props => props.gap && getSize('--gap', props.gap)};
|
|
35
|
-
margin-right: calc(-1 * var(--gap));
|
|
36
|
-
margin-bottom: calc(-1 * var(--gap));
|
|
37
|
-
${props => getSizeStyles(props)};
|
|
38
|
-
`;
|
|
39
|
-
const SplitSectionWrapper = styled.div `
|
|
40
|
-
${props => getResponsiveNumber('flex-grow', props.grow)};
|
|
41
|
-
${props => getResponsiveNumber('flex-shrink', props.shrink)};
|
|
42
|
-
${props => props.basis && getSize('flex-basis', props.basis)};
|
|
43
|
-
margin-right: var(--gap);
|
|
44
|
-
margin-bottom: var(--gap);
|
|
45
|
-
${props => getSizeStyles(props)};
|
|
46
|
-
`;
|
|
47
|
-
export const SplitSection = (_a) => {
|
|
48
|
-
var { children, grow, shrink, basis, width, height, minWidth, minHeight, maxWidth, maxHeight, className, style } = _a, props = __rest(_a, ["children", "grow", "shrink", "basis", "width", "height", "minWidth", "minHeight", "maxWidth", "maxHeight", "className", "style"]);
|
|
49
|
-
if (className || style) {
|
|
50
|
-
console.warn(customStylesWarning);
|
|
51
|
-
}
|
|
52
|
-
return (React.createElement(SplitSectionWrapper, Object.assign({ grow: grow, shrink: shrink, basis: basis, width: width, height: height, minWidth: minWidth, minHeight: minHeight, maxWidth: maxWidth, maxHeight: maxHeight }, props), children));
|
|
53
|
-
};
|
|
54
|
-
const Split = (_a) => {
|
|
55
|
-
var { children, gap = 'initial', alignItems = 'center', justifyContent, alignContent, wrap = 'wrap', width, height, minWidth, minHeight, maxWidth, maxHeight, className, style } = _a, props = __rest(_a, ["children", "gap", "alignItems", "justifyContent", "alignContent", "wrap", "width", "height", "minWidth", "minHeight", "maxWidth", "maxHeight", "className", "style"]);
|
|
56
|
-
React.Children.forEach(children, child => {
|
|
57
|
-
if ((child && !React.isValidElement(child)) ||
|
|
58
|
-
(React.isValidElement(child) && child.type !== SplitSection)) {
|
|
59
|
-
throw new Error(splitComponentChildren);
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
if (className || style) {
|
|
63
|
-
console.warn(customStylesWarning);
|
|
64
|
-
}
|
|
65
|
-
return (React.createElement(SplitWrapper, Object.assign({ gap: gap, alignItems: alignItems, justifyContent: justifyContent, alignContent: alignContent, wrap: wrap, width: width, height: height, minWidth: minWidth, minHeight: minHeight, maxWidth: maxWidth, maxHeight: maxHeight }, props), children));
|
|
66
|
-
};
|
|
67
|
-
export default Split;
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { getColorValue, getFocusRing } from '../../utilities';
|
|
13
|
-
import React from 'react';
|
|
14
|
-
import styled from '@emotion/styled';
|
|
15
|
-
const sizes = {
|
|
16
|
-
medium: {
|
|
17
|
-
switchHeight: 16,
|
|
18
|
-
switchWidth: 32,
|
|
19
|
-
knobOffset: 2,
|
|
20
|
-
},
|
|
21
|
-
large: {
|
|
22
|
-
switchHeight: 28,
|
|
23
|
-
switchWidth: 56,
|
|
24
|
-
knobOffset: 4,
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
const colorStyles = {
|
|
28
|
-
knob: {
|
|
29
|
-
active: {
|
|
30
|
-
enabled: getColorValue('white'),
|
|
31
|
-
disabled: getColorValue('disabledContent'),
|
|
32
|
-
},
|
|
33
|
-
inactive: {
|
|
34
|
-
enabled: getColorValue('white'),
|
|
35
|
-
disabled: getColorValue('disabledContent'),
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
track: {
|
|
39
|
-
active: {
|
|
40
|
-
enabled: getColorValue('blurple'),
|
|
41
|
-
disabled: getColorValue('disabledBackground'),
|
|
42
|
-
},
|
|
43
|
-
inactive: {
|
|
44
|
-
enabled: getColorValue('grey6'),
|
|
45
|
-
disabled: getColorValue('disabledBackground'),
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
const getKnobTravel = props => {
|
|
50
|
-
return (sizes[props.switchSize].switchWidth - sizes[props.switchSize].switchHeight);
|
|
51
|
-
};
|
|
52
|
-
const getKnobSize = props => {
|
|
53
|
-
return (sizes[props.switchSize].switchHeight -
|
|
54
|
-
sizes[props.switchSize].knobOffset * 2);
|
|
55
|
-
};
|
|
56
|
-
const SwitchLabel = styled.label `
|
|
57
|
-
display: block;
|
|
58
|
-
position: relative;
|
|
59
|
-
`;
|
|
60
|
-
const SwitchInput = styled.input `
|
|
61
|
-
position: absolute;
|
|
62
|
-
opacity: 0;
|
|
63
|
-
cursor: pointer;
|
|
64
|
-
|
|
65
|
-
// to overlap SwitchBox and occupy the same space
|
|
66
|
-
z-index: 1;
|
|
67
|
-
margin: 0;
|
|
68
|
-
width: ${props => sizes[props.switchSize].switchWidth}px;
|
|
69
|
-
height: ${props => sizes[props.switchSize].switchHeight}px;
|
|
70
|
-
|
|
71
|
-
&:focus-visible ~ .SwitchBox {
|
|
72
|
-
${getFocusRing()};
|
|
73
|
-
}
|
|
74
|
-
&:not(:checked) {
|
|
75
|
-
& + .SwitchBox {
|
|
76
|
-
background-color: ${colorStyles.track.inactive.enabled};
|
|
77
|
-
}
|
|
78
|
-
&:disabled + .SwitchBox {
|
|
79
|
-
background-color: ${colorStyles.track.inactive.disabled};
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
&:checked {
|
|
83
|
-
& + .SwitchBox {
|
|
84
|
-
background-color: ${colorStyles.track.active.enabled};
|
|
85
|
-
}
|
|
86
|
-
&:disabled + .SwitchBox {
|
|
87
|
-
background-color: ${colorStyles.track.active.disabled};
|
|
88
|
-
}
|
|
89
|
-
& + .SwitchBox:after {
|
|
90
|
-
transform: translateX(${props => getKnobTravel(props)}px);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
&:disabled {
|
|
94
|
-
pointer-events: none;
|
|
95
|
-
}
|
|
96
|
-
`;
|
|
97
|
-
const SwitchBox = styled.div `
|
|
98
|
-
width: ${props => sizes[props.switchSize].switchWidth}px;
|
|
99
|
-
height: ${props => sizes[props.switchSize].switchHeight}px;
|
|
100
|
-
position: relative;
|
|
101
|
-
border-radius: var(--lns-radius-full);
|
|
102
|
-
transition: 0.2s;
|
|
103
|
-
cursor: ${props => (props.isDisabled ? 'default' : 'pointer')};
|
|
104
|
-
&:after {
|
|
105
|
-
content: '';
|
|
106
|
-
position: absolute;
|
|
107
|
-
top: ${props => sizes[props.switchSize].knobOffset}px;
|
|
108
|
-
left: ${props => sizes[props.switchSize].knobOffset}px;
|
|
109
|
-
width: ${props => getKnobSize(props)}px;
|
|
110
|
-
height: ${props => getKnobSize(props)}px;
|
|
111
|
-
border-radius: var(--lns-radius-full);
|
|
112
|
-
transition: 0.15s;
|
|
113
|
-
background-color: ${props => props.isDisabled
|
|
114
|
-
? colorStyles.knob.active.disabled
|
|
115
|
-
: colorStyles.knob.active.enabled};
|
|
116
|
-
}
|
|
117
|
-
`;
|
|
118
|
-
const Switch = (_a) => {
|
|
119
|
-
var { isActive, isDisabled, onChange, size = 'medium', ariaLabelledby, ariaLabel } = _a, props = __rest(_a, ["isActive", "isDisabled", "onChange", "size", "ariaLabelledby", "ariaLabel"]);
|
|
120
|
-
if (ariaLabelledby && ariaLabel) {
|
|
121
|
-
throw new Error('ariaLabelledby and ariaLabel serve the same purpose and therefore cannot be used at the same time. Choose the one that best suites your needs.');
|
|
122
|
-
}
|
|
123
|
-
return (React.createElement(SwitchLabel, null,
|
|
124
|
-
React.createElement(SwitchInput, Object.assign({}, props, { checked: isActive, disabled: isDisabled, onChange: onChange, type: "checkbox", switchSize: size, "aria-labelledby": ariaLabelledby, "aria-label": ariaLabel, "aria-checked": isActive })),
|
|
125
|
-
React.createElement(SwitchBox, { className: "SwitchBox", isDisabled: isDisabled, isActive: isActive, switchSize: size })));
|
|
126
|
-
};
|
|
127
|
-
export default Switch;
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { getColorValue, getFocusRing, getFontWeight, getRadius, getSize, getSizeValue, u, } from '../../utilities';
|
|
13
|
-
import Container from '../container/container';
|
|
14
|
-
import Icon from '../icon/icon';
|
|
15
|
-
import React from 'react';
|
|
16
|
-
import styled from '@emotion/styled';
|
|
17
|
-
const TabsContext = React.createContext({});
|
|
18
|
-
const negativeScrollOffset = scrollOffset => `calc(-1 * ${getSizeValue(scrollOffset)})`;
|
|
19
|
-
const Wrapper = styled.div `
|
|
20
|
-
${props => props.scrollOffset &&
|
|
21
|
-
`margin: 0 ${negativeScrollOffset(props.scrollOffset)};
|
|
22
|
-
`};
|
|
23
|
-
`;
|
|
24
|
-
const TabsNav = styled.nav `
|
|
25
|
-
--activeIndicatorHeight: 3px;
|
|
26
|
-
|
|
27
|
-
display: flex;
|
|
28
|
-
overflow: auto;
|
|
29
|
-
-ms-overflow-style: none;
|
|
30
|
-
scrollbar-width: none;
|
|
31
|
-
|
|
32
|
-
${props => props.scrollOffset && getSize('padding-left', props.scrollOffset)};
|
|
33
|
-
|
|
34
|
-
&::-webkit-scrollbar {
|
|
35
|
-
display: none;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
& > * {
|
|
39
|
-
${props => props.hasFullTabs && `flex: 1 0`};
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
& > * + * {
|
|
43
|
-
margin-left: ${u(2)};
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
&:after {
|
|
47
|
-
content: '';
|
|
48
|
-
flex-shrink: 0;
|
|
49
|
-
${props => props.scrollOffset && getSize('width', props.scrollOffset)};
|
|
50
|
-
}
|
|
51
|
-
`;
|
|
52
|
-
const TabsNavPilled = styled.nav `
|
|
53
|
-
${getRadius('full')};
|
|
54
|
-
background-color: var(--lns-color-backgroundSecondary);
|
|
55
|
-
|
|
56
|
-
padding: var(--lns-space-xsmall);
|
|
57
|
-
|
|
58
|
-
display: flex;
|
|
59
|
-
overflow: auto;
|
|
60
|
-
-ms-overflow-style: none;
|
|
61
|
-
scrollbar-width: none;
|
|
62
|
-
${props => props.scrollOffset && getSize('padding-left', props.scrollOffset)};
|
|
63
|
-
|
|
64
|
-
&::-webkit-scrollbar {
|
|
65
|
-
display: none;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
& > * {
|
|
69
|
-
flex: 1 0;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
& > * + * {
|
|
73
|
-
margin-left: ${u(2)};
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
&:after {
|
|
77
|
-
content: '';
|
|
78
|
-
flex-shrink: 0;
|
|
79
|
-
${props => props.scrollOffset && getSize('width', props.scrollOffset)};
|
|
80
|
-
}
|
|
81
|
-
`;
|
|
82
|
-
const TabWrapper = styled.button `
|
|
83
|
-
appearance: none;
|
|
84
|
-
font: inherit;
|
|
85
|
-
background: transparent;
|
|
86
|
-
border: none;
|
|
87
|
-
${getRadius('medium')};
|
|
88
|
-
cursor: pointer;
|
|
89
|
-
display: inline-flex;
|
|
90
|
-
align-items: center;
|
|
91
|
-
justify-content: center;
|
|
92
|
-
vertical-align: middle;
|
|
93
|
-
padding: 0 0 calc(var(--lns-space-small) + var(--activeIndicatorHeight)) 0;
|
|
94
|
-
position: relative;
|
|
95
|
-
color: inherit;
|
|
96
|
-
text-decoration: none;
|
|
97
|
-
flex-shrink: 0;
|
|
98
|
-
${getFontWeight('bold')};
|
|
99
|
-
transition: 0.6s color;
|
|
100
|
-
white-space: nowrap;
|
|
101
|
-
color: ${props => getColorValue(props.isActive ? 'body' : 'bodyDimmed')};
|
|
102
|
-
${props => props.isActive &&
|
|
103
|
-
`border-color: ${getColorValue('primary')};
|
|
104
|
-
`};
|
|
105
|
-
|
|
106
|
-
&:focus,
|
|
107
|
-
&:focus-visible {
|
|
108
|
-
outline: 1px solid transparent;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
&:focus-visible {
|
|
112
|
-
${getFocusRing(undefined, 'inset')};
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
&:hover {
|
|
116
|
-
color: ${getColorValue('body')};
|
|
117
|
-
transition: 0.3s color;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
&::after {
|
|
121
|
-
bottom: 0;
|
|
122
|
-
${getRadius('medium')};
|
|
123
|
-
content: '';
|
|
124
|
-
height: var(--activeIndicatorHeight);
|
|
125
|
-
position: absolute;
|
|
126
|
-
width: 100%;
|
|
127
|
-
${props => props.isActive && `background-color: ${getColorValue('primary')}`};
|
|
128
|
-
}
|
|
129
|
-
`;
|
|
130
|
-
const TabWrapperPilled = styled.button `
|
|
131
|
-
padding: ${u(1)} 0;
|
|
132
|
-
|
|
133
|
-
appearance: none;
|
|
134
|
-
font: inherit;
|
|
135
|
-
background: transparent;
|
|
136
|
-
border: none;
|
|
137
|
-
${getRadius('full')};
|
|
138
|
-
cursor: pointer;
|
|
139
|
-
display: inline-flex;
|
|
140
|
-
align-items: center;
|
|
141
|
-
justify-content: center;
|
|
142
|
-
vertical-align: middle;
|
|
143
|
-
position: relative;
|
|
144
|
-
color: inherit;
|
|
145
|
-
text-decoration: none;
|
|
146
|
-
flex-shrink: 0;
|
|
147
|
-
${getFontWeight('bold')};
|
|
148
|
-
|
|
149
|
-
transition: 0.6s color;
|
|
150
|
-
white-space: nowrap;
|
|
151
|
-
${props => props.isActive &&
|
|
152
|
-
`background-color: ${getColorValue('background')};
|
|
153
|
-
color: ${getColorValue('primary')};
|
|
154
|
-
`};
|
|
155
|
-
|
|
156
|
-
&:focus,
|
|
157
|
-
&:focus-visible {
|
|
158
|
-
outline: 1px solid transparent;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
&:focus-visible {
|
|
162
|
-
${getFocusRing(undefined, 'inset')};
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
&:hover {
|
|
166
|
-
color: ${getColorValue('primary')};
|
|
167
|
-
transition: 0.3s color;
|
|
168
|
-
}
|
|
169
|
-
`;
|
|
170
|
-
export const Tab = (_a) => {
|
|
171
|
-
var { children, isActive, htmlTag = 'button', icon } = _a, props = __rest(_a, ["children", "isActive", "htmlTag", "icon"]);
|
|
172
|
-
const { isPilledDesign } = React.useContext(TabsContext);
|
|
173
|
-
if (isPilledDesign) {
|
|
174
|
-
return (React.createElement(TabWrapperPilled, Object.assign({ as: htmlTag, isActive: isActive, icon: icon }, props),
|
|
175
|
-
icon && (React.createElement(Container, { htmlTag: "span", paddingRight: children && 'small' },
|
|
176
|
-
React.createElement(Icon, { icon: icon, color: "currentColor", hasWidthOffset: true }))),
|
|
177
|
-
children));
|
|
178
|
-
}
|
|
179
|
-
return (React.createElement(TabWrapper, Object.assign({ as: htmlTag, isActive: isActive, icon: icon }, props),
|
|
180
|
-
icon && (React.createElement(Container, { htmlTag: "span", paddingRight: children && 'small' },
|
|
181
|
-
React.createElement(Icon, { icon: icon, color: "currentColor", hasWidthOffset: true }))),
|
|
182
|
-
children));
|
|
183
|
-
};
|
|
184
|
-
const Tabs = (_a) => {
|
|
185
|
-
var { children, scrollOffset, hasFullTabs, isPilledDesign } = _a, props = __rest(_a, ["children", "scrollOffset", "hasFullTabs", "isPilledDesign"]);
|
|
186
|
-
const tabsContent = isPilledDesign ? (React.createElement(TabsNavPilled, Object.assign({ hasFullTabs: hasFullTabs, scrollOffset: scrollOffset }, props), children)) : (React.createElement(TabsNav, Object.assign({ hasFullTabs: hasFullTabs, scrollOffset: scrollOffset }, props), children));
|
|
187
|
-
if (scrollOffset) {
|
|
188
|
-
return React.createElement(Wrapper, { scrollOffset: scrollOffset }, tabsContent);
|
|
189
|
-
}
|
|
190
|
-
return (React.createElement(TabsContext.Provider, { value: { isPilledDesign } }, tabsContent));
|
|
191
|
-
};
|
|
192
|
-
export default Tabs;
|