@wallarm-org/claude-design 0.0.0-stage → 4.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +114 -2
- package/bin/claude-design.js +347 -0
- package/dist/SETUP.md +130 -0
- package/dist/UPDATE.md +84 -0
- package/dist/assets/Icons/activity.svg +1 -0
- package/dist/assets/Icons/alt.svg +1 -0
- package/dist/assets/Icons/android-neutral.svg +1 -0
- package/dist/assets/Icons/android.svg +1 -0
- package/dist/assets/Icons/api.svg +1 -0
- package/dist/assets/Icons/apple-music-neutral.svg +1 -0
- package/dist/assets/Icons/apple-music.svg +1 -0
- package/dist/assets/Icons/apple-neutral.svg +1 -0
- package/dist/assets/Icons/apple-podcasts-neutral.svg +1 -0
- package/dist/assets/Icons/apple-podcasts.svg +1 -0
- package/dist/assets/Icons/apple.svg +1 -0
- package/dist/assets/Icons/archive.svg +1 -0
- package/dist/assets/Icons/arrow-big-up-dash.svg +1 -0
- package/dist/assets/Icons/arrow-big-up.svg +1 -0
- package/dist/assets/Icons/arrow-down-left.svg +1 -0
- package/dist/assets/Icons/arrow-down-right.svg +1 -0
- package/dist/assets/Icons/arrow-down.svg +1 -0
- package/dist/assets/Icons/arrow-left.svg +1 -0
- package/dist/assets/Icons/arrow-right-alt.svg +1 -0
- package/dist/assets/Icons/arrow-right.svg +1 -0
- package/dist/assets/Icons/arrow-up-down.svg +1 -0
- package/dist/assets/Icons/arrow-up-left.svg +1 -0
- package/dist/assets/Icons/arrow-up-right.svg +1 -0
- package/dist/assets/Icons/arrow-up.svg +1 -0
- package/dist/assets/Icons/artstation-neutral.svg +1 -0
- package/dist/assets/Icons/artstation.svg +1 -0
- package/dist/assets/Icons/asterisk.svg +1 -0
- package/dist/assets/Icons/audio-waveform.svg +1 -0
- package/dist/assets/Icons/aws-neutral.svg +1 -0
- package/dist/assets/Icons/aws.svg +1 -0
- package/dist/assets/Icons/badge-check.svg +1 -0
- package/dist/assets/Icons/baidu-neutral.svg +1 -0
- package/dist/assets/Icons/baidu.svg +1 -0
- package/dist/assets/Icons/bandage.svg +1 -0
- package/dist/assets/Icons/behance-neutral.svg +1 -0
- package/dist/assets/Icons/behance.svg +1 -0
- package/dist/assets/Icons/bell-cog.svg +1 -0
- package/dist/assets/Icons/bell.svg +1 -0
- package/dist/assets/Icons/binary.svg +1 -0
- package/dist/assets/Icons/book-open.svg +1 -0
- package/dist/assets/Icons/book.svg +1 -0
- package/dist/assets/Icons/boosty-neutral.svg +1 -0
- package/dist/assets/Icons/boosty.svg +1 -0
- package/dist/assets/Icons/bot.svg +1 -0
- package/dist/assets/Icons/brain.svg +1 -0
- package/dist/assets/Icons/braze-neutral.svg +1 -0
- package/dist/assets/Icons/braze.svg +1 -0
- package/dist/assets/Icons/brevo-neutral.svg +1 -0
- package/dist/assets/Icons/brevo.svg +1 -0
- package/dist/assets/Icons/bug-off.svg +1 -0
- package/dist/assets/Icons/bug-play.svg +1 -0
- package/dist/assets/Icons/bug.svg +1 -0
- package/dist/assets/Icons/building.svg +1 -0
- package/dist/assets/Icons/building2.svg +1 -0
- package/dist/assets/Icons/calendar-check.svg +1 -0
- package/dist/assets/Icons/calendar-check2.svg +1 -0
- package/dist/assets/Icons/calendar-clock.svg +1 -0
- package/dist/assets/Icons/calendar-cog.svg +1 -0
- package/dist/assets/Icons/calendar-days.svg +1 -0
- package/dist/assets/Icons/calendar-fold.svg +1 -0
- package/dist/assets/Icons/calendar-heart.svg +1 -0
- package/dist/assets/Icons/calendar-minus.svg +1 -0
- package/dist/assets/Icons/calendar-minus2.svg +1 -0
- package/dist/assets/Icons/calendar-off.svg +1 -0
- package/dist/assets/Icons/calendar-plus.svg +1 -0
- package/dist/assets/Icons/calendar-plus2.svg +1 -0
- package/dist/assets/Icons/calendar-range.svg +1 -0
- package/dist/assets/Icons/calendar-search.svg +1 -0
- package/dist/assets/Icons/calendar-x.svg +1 -0
- package/dist/assets/Icons/calendar-x2.svg +1 -0
- package/dist/assets/Icons/calendar.svg +1 -0
- package/dist/assets/Icons/chart-area.svg +1 -0
- package/dist/assets/Icons/chart-bar.svg +1 -0
- package/dist/assets/Icons/chart-column.svg +1 -0
- package/dist/assets/Icons/chart-no-axes-column.svg +1 -0
- package/dist/assets/Icons/check-check.svg +1 -0
- package/dist/assets/Icons/check.svg +1 -0
- package/dist/assets/Icons/checkbox-indeterminate.svg +1 -0
- package/dist/assets/Icons/chevron-down.svg +1 -0
- package/dist/assets/Icons/chevron-first.svg +1 -0
- package/dist/assets/Icons/chevron-last.svg +1 -0
- package/dist/assets/Icons/chevron-left.svg +1 -0
- package/dist/assets/Icons/chevron-right.svg +1 -0
- package/dist/assets/Icons/chevron-up-down.svg +1 -0
- package/dist/assets/Icons/chevron-up.svg +1 -0
- package/dist/assets/Icons/chevrons-down-up.svg +1 -0
- package/dist/assets/Icons/chevrons-down.svg +1 -0
- package/dist/assets/Icons/chevrons-left-right.svg +1 -0
- package/dist/assets/Icons/chevrons-left.svg +1 -0
- package/dist/assets/Icons/chevrons-right-left.svg +1 -0
- package/dist/assets/Icons/chevrons-right.svg +1 -0
- package/dist/assets/Icons/chevrons-up-down.svg +1 -0
- package/dist/assets/Icons/chevrons-up.svg +1 -0
- package/dist/assets/Icons/circle-arrow-down.svg +1 -0
- package/dist/assets/Icons/circle-arrow-left.svg +1 -0
- package/dist/assets/Icons/circle-arrow-out-down-left.svg +1 -0
- package/dist/assets/Icons/circle-arrow-out-down-right.svg +1 -0
- package/dist/assets/Icons/circle-arrow-out-up-left.svg +1 -0
- package/dist/assets/Icons/circle-arrow-out-up-right.svg +1 -0
- package/dist/assets/Icons/circle-arrow-right.svg +1 -0
- package/dist/assets/Icons/circle-arrow-up.svg +1 -0
- package/dist/assets/Icons/circle-check-big.svg +1 -0
- package/dist/assets/Icons/circle-check.svg +1 -0
- package/dist/assets/Icons/circle-chevron-down.svg +1 -0
- package/dist/assets/Icons/circle-chevron-left.svg +1 -0
- package/dist/assets/Icons/circle-chevron-right.svg +1 -0
- package/dist/assets/Icons/circle-chevron-up.svg +1 -0
- package/dist/assets/Icons/circle-dashed.svg +1 -0
- package/dist/assets/Icons/circle-dot-dashed.svg +1 -0
- package/dist/assets/Icons/circle-ellipsis.svg +1 -0
- package/dist/assets/Icons/circle-gauge.svg +1 -0
- package/dist/assets/Icons/circle-help.svg +1 -0
- package/dist/assets/Icons/circle-minus.svg +1 -0
- package/dist/assets/Icons/circle-plus.svg +1 -0
- package/dist/assets/Icons/circle-slash.svg +1 -0
- package/dist/assets/Icons/circle-slash2.svg +1 -0
- package/dist/assets/Icons/circle-stop.svg +1 -0
- package/dist/assets/Icons/circle.svg +1 -0
- package/dist/assets/Icons/clipboard-check.svg +1 -0
- package/dist/assets/Icons/clipboard-x.svg +1 -0
- package/dist/assets/Icons/clipboard.svg +1 -0
- package/dist/assets/Icons/clock-fading.svg +1 -0
- package/dist/assets/Icons/clock.svg +1 -0
- package/dist/assets/Icons/cloud-off.svg +1 -0
- package/dist/assets/Icons/cloud-sync.svg +1 -0
- package/dist/assets/Icons/cloud.svg +1 -0
- package/dist/assets/Icons/code.svg +1 -0
- package/dist/assets/Icons/collapse.svg +1 -0
- package/dist/assets/Icons/columns3-cog.svg +1 -0
- package/dist/assets/Icons/command.svg +1 -0
- package/dist/assets/Icons/compass.svg +1 -0
- package/dist/assets/Icons/copy-slash.svg +1 -0
- package/dist/assets/Icons/copy.svg +1 -0
- package/dist/assets/Icons/corner-down-left.svg +1 -0
- package/dist/assets/Icons/corner-down-right.svg +1 -0
- package/dist/assets/Icons/corner-left-down.svg +1 -0
- package/dist/assets/Icons/corner-left-up.svg +1 -0
- package/dist/assets/Icons/corner-right-down.svg +1 -0
- package/dist/assets/Icons/corner-right-up.svg +1 -0
- package/dist/assets/Icons/corner-up-left.svg +1 -0
- package/dist/assets/Icons/corner-up-right.svg +1 -0
- package/dist/assets/Icons/cpu.svg +1 -0
- package/dist/assets/Icons/credit-card.svg +1 -0
- package/dist/assets/Icons/crosshair.svg +1 -0
- package/dist/assets/Icons/ctrl.svg +1 -0
- package/dist/assets/Icons/database.svg +1 -0
- package/dist/assets/Icons/devianart-neutral.svg +1 -0
- package/dist/assets/Icons/devianart.svg +1 -0
- package/dist/assets/Icons/discord-neutral.svg +1 -0
- package/dist/assets/Icons/discord.svg +1 -0
- package/dist/assets/Icons/dollar-sign.svg +1 -0
- package/dist/assets/Icons/dot.svg +1 -0
- package/dist/assets/Icons/download.svg +1 -0
- package/dist/assets/Icons/dprofile-neutral.svg +1 -0
- package/dist/assets/Icons/dprofile.svg +1 -0
- package/dist/assets/Icons/dribbble-neutral.svg +1 -0
- package/dist/assets/Icons/dribbble.svg +1 -0
- package/dist/assets/Icons/droplet.svg +1 -0
- package/dist/assets/Icons/duplicate.svg +1 -0
- package/dist/assets/Icons/dzen-neutral.svg +1 -0
- package/dist/assets/Icons/dzen.svg +1 -0
- package/dist/assets/Icons/earth-lock.svg +1 -0
- package/dist/assets/Icons/earth.svg +1 -0
- package/dist/assets/Icons/ellipsis.svg +1 -0
- package/dist/assets/Icons/expand.svg +1 -0
- package/dist/assets/Icons/external-link.svg +1 -0
- package/dist/assets/Icons/eye-off.svg +1 -0
- package/dist/assets/Icons/eye.svg +1 -0
- package/dist/assets/Icons/facebook-neutral.svg +1 -0
- package/dist/assets/Icons/facebook.svg +1 -0
- package/dist/assets/Icons/fast-forward.svg +1 -0
- package/dist/assets/Icons/figma-neutral.svg +1 -0
- package/dist/assets/Icons/figma.svg +1 -0
- package/dist/assets/Icons/file-down.svg +1 -0
- package/dist/assets/Icons/file-plus.svg +1 -0
- package/dist/assets/Icons/file-text.svg +1 -0
- package/dist/assets/Icons/file.svg +1 -0
- package/dist/assets/Icons/film.svg +1 -0
- package/dist/assets/Icons/filter-x.svg +1 -0
- package/dist/assets/Icons/filter.svg +1 -0
- package/dist/assets/Icons/fingerprint-pattern.svg +1 -0
- package/dist/assets/Icons/flag.svg +1 -0
- package/dist/assets/Icons/flask-conical.svg +1 -0
- package/dist/assets/Icons/folder.svg +1 -0
- package/dist/assets/Icons/funnel-plus.svg +1 -0
- package/dist/assets/Icons/ghost.svg +1 -0
- package/dist/assets/Icons/git-branch.svg +1 -0
- package/dist/assets/Icons/git-commit-horizontal.svg +1 -0
- package/dist/assets/Icons/git-commit-vertical.svg +1 -0
- package/dist/assets/Icons/git-compare-arrows-alt.svg +1 -0
- package/dist/assets/Icons/git-compare-arrows.svg +1 -0
- package/dist/assets/Icons/git-compare.svg +1 -0
- package/dist/assets/Icons/git-fork.svg +1 -0
- package/dist/assets/Icons/git-graph.svg +1 -0
- package/dist/assets/Icons/git-merge.svg +1 -0
- package/dist/assets/Icons/git-pull-request-arrow.svg +1 -0
- package/dist/assets/Icons/git-pull-request-closed.svg +1 -0
- package/dist/assets/Icons/git-pull-request-create-arrow.svg +1 -0
- package/dist/assets/Icons/git-pull-request-create.svg +1 -0
- package/dist/assets/Icons/git-pull-request-draft.svg +1 -0
- package/dist/assets/Icons/git-pull-request.svg +1 -0
- package/dist/assets/Icons/github-neutral.svg +1 -0
- package/dist/assets/Icons/github.svg +1 -0
- package/dist/assets/Icons/globe-lock.svg +1 -0
- package/dist/assets/Icons/globe.svg +1 -0
- package/dist/assets/Icons/gmail-neutral.svg +1 -0
- package/dist/assets/Icons/gmail.svg +1 -0
- package/dist/assets/Icons/google-meet-neutral.svg +1 -0
- package/dist/assets/Icons/google-meet.svg +1 -0
- package/dist/assets/Icons/google-neutral.svg +1 -0
- package/dist/assets/Icons/google-play-neutral.svg +1 -0
- package/dist/assets/Icons/google-play.svg +1 -0
- package/dist/assets/Icons/google-podcast-neutral.svg +1 -0
- package/dist/assets/Icons/google-podcast.svg +1 -0
- package/dist/assets/Icons/google.svg +1 -0
- package/dist/assets/Icons/grip-horizontal.svg +1 -0
- package/dist/assets/Icons/grip-vertical.svg +1 -0
- package/dist/assets/Icons/hammer.svg +1 -0
- package/dist/assets/Icons/heart-pulse.svg +1 -0
- package/dist/assets/Icons/history.svg +1 -0
- package/dist/assets/Icons/home.svg +1 -0
- package/dist/assets/Icons/imo-neutral.svg +1 -0
- package/dist/assets/Icons/imo.svg +1 -0
- package/dist/assets/Icons/infinity.svg +1 -0
- package/dist/assets/Icons/info.svg +1 -0
- package/dist/assets/Icons/infobip-neutral.svg +1 -0
- package/dist/assets/Icons/infobip.svg +1 -0
- package/dist/assets/Icons/instagram-neutral.svg +1 -0
- package/dist/assets/Icons/instagram.svg +1 -0
- package/dist/assets/Icons/key-round.svg +1 -0
- package/dist/assets/Icons/key-square.svg +1 -0
- package/dist/assets/Icons/keyboard.svg +1 -0
- package/dist/assets/Icons/kickstarter-neutral.svg +1 -0
- package/dist/assets/Icons/kickstarter.svg +1 -0
- package/dist/assets/Icons/laptop.svg +1 -0
- package/dist/assets/Icons/layers.svg +1 -0
- package/dist/assets/Icons/layers2.svg +1 -0
- package/dist/assets/Icons/layers3.svg +1 -0
- package/dist/assets/Icons/layout-dashboard.svg +1 -0
- package/dist/assets/Icons/layout-grid.svg +1 -0
- package/dist/assets/Icons/layout-list.svg +1 -0
- package/dist/assets/Icons/layout-panel-left.svg +1 -0
- package/dist/assets/Icons/layout-panel-top.svg +1 -0
- package/dist/assets/Icons/layout-template.svg +1 -0
- package/dist/assets/Icons/library-big.svg +1 -0
- package/dist/assets/Icons/life-buoy.svg +1 -0
- package/dist/assets/Icons/lightbulb-off.svg +1 -0
- package/dist/assets/Icons/lightbulb.svg +1 -0
- package/dist/assets/Icons/line-neutral.svg +1 -0
- package/dist/assets/Icons/line.svg +1 -0
- package/dist/assets/Icons/link.svg +1 -0
- package/dist/assets/Icons/link2-off.svg +1 -0
- package/dist/assets/Icons/link2.svg +1 -0
- package/dist/assets/Icons/linkedin-neutral.svg +1 -0
- package/dist/assets/Icons/linkedin.svg +1 -0
- package/dist/assets/Icons/list-checks.svg +1 -0
- package/dist/assets/Icons/list-collapse.svg +1 -0
- package/dist/assets/Icons/list-filter.svg +1 -0
- package/dist/assets/Icons/list-minus.svg +1 -0
- package/dist/assets/Icons/list-ordered.svg +1 -0
- package/dist/assets/Icons/list-plus.svg +1 -0
- package/dist/assets/Icons/list-restart.svg +1 -0
- package/dist/assets/Icons/list-start.svg +1 -0
- package/dist/assets/Icons/list-todo.svg +1 -0
- package/dist/assets/Icons/list-tree.svg +1 -0
- package/dist/assets/Icons/list-video.svg +1 -0
- package/dist/assets/Icons/list-x.svg +1 -0
- package/dist/assets/Icons/list.svg +1 -0
- package/dist/assets/Icons/loader-circle.svg +1 -0
- package/dist/assets/Icons/loader.svg +1 -0
- package/dist/assets/Icons/lock-open.svg +1 -0
- package/dist/assets/Icons/lock.svg +1 -0
- package/dist/assets/Icons/log-in.svg +1 -0
- package/dist/assets/Icons/log-out.svg +1 -0
- package/dist/assets/Icons/mail-check.svg +1 -0
- package/dist/assets/Icons/mail-minus.svg +1 -0
- package/dist/assets/Icons/mail-open.svg +1 -0
- package/dist/assets/Icons/mail-plus.svg +1 -0
- package/dist/assets/Icons/mail-question.svg +1 -0
- package/dist/assets/Icons/mail-search.svg +1 -0
- package/dist/assets/Icons/mail-warning.svg +1 -0
- package/dist/assets/Icons/mail-x.svg +1 -0
- package/dist/assets/Icons/mail.svg +1 -0
- package/dist/assets/Icons/mailbox.svg +1 -0
- package/dist/assets/Icons/mailersend-neutral.svg +1 -0
- package/dist/assets/Icons/mailersend.svg +1 -0
- package/dist/assets/Icons/mailgun-neutral.svg +1 -0
- package/dist/assets/Icons/mailgun.svg +1 -0
- package/dist/assets/Icons/mailjet-neutral.svg +1 -0
- package/dist/assets/Icons/mailjet.svg +1 -0
- package/dist/assets/Icons/mails.svg +1 -0
- package/dist/assets/Icons/mailtrap-neutral.svg +1 -0
- package/dist/assets/Icons/mailtrap.svg +1 -0
- package/dist/assets/Icons/mandrill-neutral.svg +1 -0
- package/dist/assets/Icons/mandrill.svg +1 -0
- package/dist/assets/Icons/map-pin.svg +1 -0
- package/dist/assets/Icons/maqsam-neutral.svg +1 -0
- package/dist/assets/Icons/maqsam.svg +1 -0
- package/dist/assets/Icons/mattermost-neutral.svg +1 -0
- package/dist/assets/Icons/mattermost.svg +1 -0
- package/dist/assets/Icons/maximize.svg +1 -0
- package/dist/assets/Icons/maximize2.svg +1 -0
- package/dist/assets/Icons/medium-neutral.svg +1 -0
- package/dist/assets/Icons/medium.svg +1 -0
- package/dist/assets/Icons/megaphone-off.svg +1 -0
- package/dist/assets/Icons/megaphone.svg +1 -0
- package/dist/assets/Icons/menu.svg +1 -0
- package/dist/assets/Icons/merge.svg +1 -0
- package/dist/assets/Icons/message-square-code.svg +1 -0
- package/dist/assets/Icons/message-square-dashed.svg +1 -0
- package/dist/assets/Icons/message-square-diff.svg +1 -0
- package/dist/assets/Icons/message-square-dot.svg +1 -0
- package/dist/assets/Icons/message-square-heart.svg +1 -0
- package/dist/assets/Icons/message-square-off.svg +1 -0
- package/dist/assets/Icons/message-square-plus.svg +1 -0
- package/dist/assets/Icons/message-square-quote.svg +1 -0
- package/dist/assets/Icons/message-square-reply.svg +1 -0
- package/dist/assets/Icons/message-square-share.svg +1 -0
- package/dist/assets/Icons/message-square-text.svg +1 -0
- package/dist/assets/Icons/message-square-warning.svg +1 -0
- package/dist/assets/Icons/message-square-x.svg +1 -0
- package/dist/assets/Icons/message-square.svg +1 -0
- package/dist/assets/Icons/messages-square.svg +1 -0
- package/dist/assets/Icons/messenger-neutral.svg +1 -0
- package/dist/assets/Icons/messenger.svg +1 -0
- package/dist/assets/Icons/microsoft-neutral.svg +1 -0
- package/dist/assets/Icons/microsoft-teams-neutral.svg +1 -0
- package/dist/assets/Icons/microsoft-teams.svg +1 -0
- package/dist/assets/Icons/microsoft.svg +1 -0
- package/dist/assets/Icons/minimize.svg +1 -0
- package/dist/assets/Icons/minimize2.svg +1 -0
- package/dist/assets/Icons/minus.svg +1 -0
- package/dist/assets/Icons/moon.svg +1 -0
- package/dist/assets/Icons/mouse-pointer-ban.svg +1 -0
- package/dist/assets/Icons/mouse-pointer-click.svg +1 -0
- package/dist/assets/Icons/mouse-pointer.svg +1 -0
- package/dist/assets/Icons/mouse-pointer2.svg +1 -0
- package/dist/assets/Icons/mouse.svg +1 -0
- package/dist/assets/Icons/move-diagonal.svg +1 -0
- package/dist/assets/Icons/move-diagonal2.svg +1 -0
- package/dist/assets/Icons/move-down-left.svg +1 -0
- package/dist/assets/Icons/move-down-right.svg +1 -0
- package/dist/assets/Icons/move-down.svg +1 -0
- package/dist/assets/Icons/move-horizontal.svg +1 -0
- package/dist/assets/Icons/move-left.svg +1 -0
- package/dist/assets/Icons/move-right.svg +1 -0
- package/dist/assets/Icons/move-up-left.svg +1 -0
- package/dist/assets/Icons/move-up-right.svg +1 -0
- package/dist/assets/Icons/move-up.svg +1 -0
- package/dist/assets/Icons/move-vertical.svg +1 -0
- package/dist/assets/Icons/move3-d.svg +1 -0
- package/dist/assets/Icons/netcore-neutral.svg +1 -0
- package/dist/assets/Icons/netcore.svg +1 -0
- package/dist/assets/Icons/notebook-pen.svg +1 -0
- package/dist/assets/Icons/notebook-tabs.svg +1 -0
- package/dist/assets/Icons/notebook-text.svg +1 -0
- package/dist/assets/Icons/notebook.svg +1 -0
- package/dist/assets/Icons/notepad-text-dashed.svg +1 -0
- package/dist/assets/Icons/notepad-text.svg +1 -0
- package/dist/assets/Icons/notion-neutral.svg +1 -0
- package/dist/assets/Icons/notion.svg +1 -0
- package/dist/assets/Icons/octagon-alert.svg +1 -0
- package/dist/assets/Icons/octagon-pause.svg +1 -0
- package/dist/assets/Icons/octagon-x.svg +1 -0
- package/dist/assets/Icons/octagon.svg +1 -0
- package/dist/assets/Icons/ok-neutral.svg +1 -0
- package/dist/assets/Icons/ok-only-sign-neutral.svg +1 -0
- package/dist/assets/Icons/ok-only-sign.svg +1 -0
- package/dist/assets/Icons/ok.svg +1 -0
- package/dist/assets/Icons/onlyfans-neutral.svg +1 -0
- package/dist/assets/Icons/onlyfans.svg +1 -0
- package/dist/assets/Icons/option.svg +1 -0
- package/dist/assets/Icons/outlook365-neutral.svg +1 -0
- package/dist/assets/Icons/outlook365.svg +1 -0
- package/dist/assets/Icons/paintbrush.svg +1 -0
- package/dist/assets/Icons/panel-bottom-open.svg +1 -0
- package/dist/assets/Icons/panel-bottom.svg +1 -0
- package/dist/assets/Icons/panel-left-close.svg +1 -0
- package/dist/assets/Icons/panel-left-dashed.svg +1 -0
- package/dist/assets/Icons/panel-left-open.svg +1 -0
- package/dist/assets/Icons/panel-left.svg +1 -0
- package/dist/assets/Icons/panel-right-animated.svg +1 -0
- package/dist/assets/Icons/panel-right-close.svg +1 -0
- package/dist/assets/Icons/panel-right-dashed.svg +1 -0
- package/dist/assets/Icons/panel-right-open.svg +1 -0
- package/dist/assets/Icons/panel-right.svg +1 -0
- package/dist/assets/Icons/panel-top-bottom-dashed.svg +1 -0
- package/dist/assets/Icons/panel-top-close.svg +1 -0
- package/dist/assets/Icons/panel-top-open.svg +1 -0
- package/dist/assets/Icons/panel-top.svg +1 -0
- package/dist/assets/Icons/panels-left-bottom.svg +1 -0
- package/dist/assets/Icons/panels-right-bottom.svg +1 -0
- package/dist/assets/Icons/panels-top-left.svg +1 -0
- package/dist/assets/Icons/paperclip.svg +1 -0
- package/dist/assets/Icons/patreon-neutral.svg +1 -0
- package/dist/assets/Icons/patreon.svg +1 -0
- package/dist/assets/Icons/paypal-neutral.svg +1 -0
- package/dist/assets/Icons/paypal.svg +1 -0
- package/dist/assets/Icons/pen-line.svg +1 -0
- package/dist/assets/Icons/pen-off.svg +1 -0
- package/dist/assets/Icons/pen-tool.svg +1 -0
- package/dist/assets/Icons/pen.svg +1 -0
- package/dist/assets/Icons/pencil-line.svg +1 -0
- package/dist/assets/Icons/pencil-off.svg +1 -0
- package/dist/assets/Icons/pencil-ruler.svg +1 -0
- package/dist/assets/Icons/pencil.svg +1 -0
- package/dist/assets/Icons/pentagon.svg +1 -0
- package/dist/assets/Icons/percentage.svg +1 -0
- package/dist/assets/Icons/phone.svg +1 -0
- package/dist/assets/Icons/pin-off.svg +1 -0
- package/dist/assets/Icons/pin.svg +1 -0
- package/dist/assets/Icons/pinterest-neutral.svg +1 -0
- package/dist/assets/Icons/pinterest.svg +1 -0
- package/dist/assets/Icons/play.svg +1 -0
- package/dist/assets/Icons/plug.svg +1 -0
- package/dist/assets/Icons/plunk-neutral.svg +1 -0
- package/dist/assets/Icons/plunk.svg +1 -0
- package/dist/assets/Icons/plus.svg +1 -0
- package/dist/assets/Icons/postmark-neutral.svg +1 -0
- package/dist/assets/Icons/postmark.svg +1 -0
- package/dist/assets/Icons/product-hunt-neutral.svg +1 -0
- package/dist/assets/Icons/product-hunt.svg +1 -0
- package/dist/assets/Icons/quora-neutral.svg +1 -0
- package/dist/assets/Icons/quora.svg +1 -0
- package/dist/assets/Icons/quote.svg +1 -0
- package/dist/assets/Icons/radar.svg +1 -0
- package/dist/assets/Icons/reddit-neutral.svg +1 -0
- package/dist/assets/Icons/reddit.svg +1 -0
- package/dist/assets/Icons/redo-dot.svg +1 -0
- package/dist/assets/Icons/redo.svg +1 -0
- package/dist/assets/Icons/redo2.svg +1 -0
- package/dist/assets/Icons/refresh-ccw.svg +1 -0
- package/dist/assets/Icons/refresh-cw-off.svg +1 -0
- package/dist/assets/Icons/resend-neutral.svg +1 -0
- package/dist/assets/Icons/resend.svg +1 -0
- package/dist/assets/Icons/rss.svg +1 -0
- package/dist/assets/Icons/rules.svg +1 -0
- package/dist/assets/Icons/scan-line.svg +1 -0
- package/dist/assets/Icons/scroll-text.svg +1 -0
- package/dist/assets/Icons/search-hint.svg +1 -0
- package/dist/assets/Icons/search-x.svg +1 -0
- package/dist/assets/Icons/search.svg +1 -0
- package/dist/assets/Icons/sendgrid-neutral.svg +1 -0
- package/dist/assets/Icons/sendgrid.svg +1 -0
- package/dist/assets/Icons/server.svg +1 -0
- package/dist/assets/Icons/ses-neutral.svg +1 -0
- package/dist/assets/Icons/ses.svg +1 -0
- package/dist/assets/Icons/settings.svg +1 -0
- package/dist/assets/Icons/settings2.svg +1 -0
- package/dist/assets/Icons/shapes.svg +1 -0
- package/dist/assets/Icons/share.svg +1 -0
- package/dist/assets/Icons/sheet.svg +1 -0
- package/dist/assets/Icons/shield-alert.svg +1 -0
- package/dist/assets/Icons/shield-ban.svg +1 -0
- package/dist/assets/Icons/shield-check.svg +1 -0
- package/dist/assets/Icons/shield-ellipsis.svg +1 -0
- package/dist/assets/Icons/shield-half.svg +1 -0
- package/dist/assets/Icons/shield-minus.svg +1 -0
- package/dist/assets/Icons/shield-off.svg +1 -0
- package/dist/assets/Icons/shield-plus.svg +1 -0
- package/dist/assets/Icons/shield-question.svg +1 -0
- package/dist/assets/Icons/shield-user.svg +1 -0
- package/dist/assets/Icons/shield-x.svg +1 -0
- package/dist/assets/Icons/shield.svg +1 -0
- package/dist/assets/Icons/shift.svg +1 -0
- package/dist/assets/Icons/signal-neutral.svg +1 -0
- package/dist/assets/Icons/signal.svg +1 -0
- package/dist/assets/Icons/signpost.svg +1 -0
- package/dist/assets/Icons/sina-weibo-neutral.svg +1 -0
- package/dist/assets/Icons/sina-weibo.svg +1 -0
- package/dist/assets/Icons/skull.svg +1 -0
- package/dist/assets/Icons/skype-neutral.svg +1 -0
- package/dist/assets/Icons/skype.svg +1 -0
- package/dist/assets/Icons/slack-neutral.svg +1 -0
- package/dist/assets/Icons/slack.svg +1 -0
- package/dist/assets/Icons/sliders-horizontal.svg +1 -0
- package/dist/assets/Icons/sliders-vertical.svg +1 -0
- package/dist/assets/Icons/smtp-neutral.svg +1 -0
- package/dist/assets/Icons/smtp.svg +1 -0
- package/dist/assets/Icons/snapchat-neutral.svg +1 -0
- package/dist/assets/Icons/snapchat.svg +1 -0
- package/dist/assets/Icons/soundcloud-neutral.svg +1 -0
- package/dist/assets/Icons/soundcloud.svg +1 -0
- package/dist/assets/Icons/space.svg +1 -0
- package/dist/assets/Icons/sparkpost-neutral.svg +1 -0
- package/dist/assets/Icons/sparkpost.svg +1 -0
- package/dist/assets/Icons/speed.svg +1 -0
- package/dist/assets/Icons/split.svg +1 -0
- package/dist/assets/Icons/spotify-neutral.svg +1 -0
- package/dist/assets/Icons/spotify.svg +1 -0
- package/dist/assets/Icons/square-arrow-out-up-right.svg +1 -0
- package/dist/assets/Icons/square-minus.svg +1 -0
- package/dist/assets/Icons/square-pen.svg +1 -0
- package/dist/assets/Icons/square-plus.svg +1 -0
- package/dist/assets/Icons/square-user-round.svg +1 -0
- package/dist/assets/Icons/stack-overflow-neutral.svg +1 -0
- package/dist/assets/Icons/stack-overflow.svg +1 -0
- package/dist/assets/Icons/star.svg +1 -0
- package/dist/assets/Icons/sun.svg +1 -0
- package/dist/assets/Icons/syringe.svg +1 -0
- package/dist/assets/Icons/tag.svg +1 -0
- package/dist/assets/Icons/target.svg +1 -0
- package/dist/assets/Icons/teams-neutral.svg +1 -0
- package/dist/assets/Icons/teams.svg +1 -0
- package/dist/assets/Icons/telegram-neutral.svg +1 -0
- package/dist/assets/Icons/telegram-only-sign-neutral.svg +1 -0
- package/dist/assets/Icons/telegram-only-sign.svg +1 -0
- package/dist/assets/Icons/telegram.svg +1 -0
- package/dist/assets/Icons/terminal.svg +1 -0
- package/dist/assets/Icons/test-policies.svg +1 -0
- package/dist/assets/Icons/threads-neutral.svg +1 -0
- package/dist/assets/Icons/threads.svg +1 -0
- package/dist/assets/Icons/thumbs-down.svg +1 -0
- package/dist/assets/Icons/thumbs-up.svg +1 -0
- package/dist/assets/Icons/tiktok-neutral.svg +1 -0
- package/dist/assets/Icons/tiktok.svg +1 -0
- package/dist/assets/Icons/tinder-neutral.svg +1 -0
- package/dist/assets/Icons/tinder.svg +1 -0
- package/dist/assets/Icons/trash.svg +1 -0
- package/dist/assets/Icons/trash2.svg +1 -0
- package/dist/assets/Icons/triangle-alert.svg +1 -0
- package/dist/assets/Icons/tumblr-neutral.svg +1 -0
- package/dist/assets/Icons/tumblr.svg +1 -0
- package/dist/assets/Icons/twitch-neutral.svg +1 -0
- package/dist/assets/Icons/twitch.svg +1 -0
- package/dist/assets/Icons/undo-dot.svg +1 -0
- package/dist/assets/Icons/undo.svg +1 -0
- package/dist/assets/Icons/undo2.svg +1 -0
- package/dist/assets/Icons/unplug.svg +1 -0
- package/dist/assets/Icons/user-check.svg +1 -0
- package/dist/assets/Icons/user-minus.svg +1 -0
- package/dist/assets/Icons/user-plus.svg +1 -0
- package/dist/assets/Icons/user-round-x.svg +1 -0
- package/dist/assets/Icons/user-round.svg +1 -0
- package/dist/assets/Icons/user.svg +1 -0
- package/dist/assets/Icons/username.svg +1 -0
- package/dist/assets/Icons/users-round.svg +1 -0
- package/dist/assets/Icons/users.svg +1 -0
- package/dist/assets/Icons/viber-neutral.svg +1 -0
- package/dist/assets/Icons/viber.svg +1 -0
- package/dist/assets/Icons/video.svg +1 -0
- package/dist/assets/Icons/vimeo-neutral.svg +1 -0
- package/dist/assets/Icons/vimeo.svg +1 -0
- package/dist/assets/Icons/vk-music-neutral.svg +1 -0
- package/dist/assets/Icons/vk-music.svg +1 -0
- package/dist/assets/Icons/vk-neutral.svg +1 -0
- package/dist/assets/Icons/vk-only-sign-neutral.svg +1 -0
- package/dist/assets/Icons/vk-only-sign.svg +1 -0
- package/dist/assets/Icons/vk.svg +1 -0
- package/dist/assets/Icons/webhook-neutral.svg +1 -0
- package/dist/assets/Icons/webhook.svg +1 -0
- package/dist/assets/Icons/wechat-neutral.svg +1 -0
- package/dist/assets/Icons/wechat.svg +1 -0
- package/dist/assets/Icons/whatsapp-badge-neutral.svg +1 -0
- package/dist/assets/Icons/whatsapp-badge.svg +1 -0
- package/dist/assets/Icons/whatsapp-neutral.svg +1 -0
- package/dist/assets/Icons/whatsapp.svg +1 -0
- package/dist/assets/Icons/workflow.svg +1 -0
- package/dist/assets/Icons/wrap-text.svg +1 -0
- package/dist/assets/Icons/wrench.svg +1 -0
- package/dist/assets/Icons/x-ex-twitter-neutral.svg +1 -0
- package/dist/assets/Icons/x-ex-twitter.svg +1 -0
- package/dist/assets/Icons/x.svg +1 -0
- package/dist/assets/Icons/xing-neutral.svg +1 -0
- package/dist/assets/Icons/xing.svg +1 -0
- package/dist/assets/Icons/yandex-music-neutral.svg +1 -0
- package/dist/assets/Icons/yandex-music.svg +1 -0
- package/dist/assets/Icons/yelp-neutral.svg +1 -0
- package/dist/assets/Icons/yelp.svg +1 -0
- package/dist/assets/Icons/youtube-music-neutral.svg +1 -0
- package/dist/assets/Icons/youtube-music.svg +1 -0
- package/dist/assets/Icons/youtube-neutral.svg +1 -0
- package/dist/assets/Icons/youtube-shorts-neutral.svg +1 -0
- package/dist/assets/Icons/youtube-shorts.svg +1 -0
- package/dist/assets/Icons/youtube.svg +1 -0
- package/dist/assets/Icons/zap.svg +1 -0
- package/dist/assets/Icons/zoom-in.svg +1 -0
- package/dist/assets/Icons/zoom-neutral.svg +1 -0
- package/dist/assets/Icons/zoom-out.svg +1 -0
- package/dist/assets/Icons/zoom.svg +1 -0
- package/dist/assets/Icons/zulip-neutral.svg +1 -0
- package/dist/assets/Icons/zulip.svg +1 -0
- package/dist/assets/Logos/wallarm.svg +1 -0
- package/dist/assets.json +4666 -0
- package/dist/project/README.md +265 -0
- package/dist/project/components/Accordion/README.md +354 -0
- package/dist/project/components/Accordion/preview.html +2 -0
- package/dist/project/components/Accordion/stories.js +12 -0
- package/dist/project/components/AgentAvatar/README.md +127 -0
- package/dist/project/components/AgentAvatar/preview.html +2 -0
- package/dist/project/components/AgentAvatar/stories.js +12 -0
- package/dist/project/components/AgentAvatar/stories.md +1805 -0
- package/dist/project/components/AgentGlyph/README.md +1182 -0
- package/dist/project/components/AgentGlyph/preview.html +2 -0
- package/dist/project/components/AgentGlyph/stories.js +12 -0
- package/dist/project/components/AgentLookBuilder/README.md +269 -0
- package/dist/project/components/AgentLookBuilder/preview.html +2 -0
- package/dist/project/components/AgentLookBuilder/stories.js +12 -0
- package/dist/project/components/Alert/README.md +492 -0
- package/dist/project/components/Alert/preview.html +2 -0
- package/dist/project/components/Alert/stories.js +12 -0
- package/dist/project/components/AnimatedBackground/README.md +124 -0
- package/dist/project/components/AnimatedBackground/preview.html +2 -0
- package/dist/project/components/AnimatedBackground/stories.js +12 -0
- package/dist/project/components/AppShell/README.md +75 -0
- package/dist/project/components/AppShell/preview.html +2 -0
- package/dist/project/components/AppShell/stories.js +28 -0
- package/dist/project/components/AppShell/stories.md +2878 -0
- package/dist/project/components/ApprovalCard/README.md +353 -0
- package/dist/project/components/ApprovalCard/preview.html +2 -0
- package/dist/project/components/ApprovalCard/stories.js +12 -0
- package/dist/project/components/AreaChart/README.md +673 -0
- package/dist/project/components/AreaChart/preview.html +2 -0
- package/dist/project/components/AreaChart/stories.js +12 -0
- package/dist/project/components/AssistantMessage/README.md +724 -0
- package/dist/project/components/AssistantMessage/preview.html +2 -0
- package/dist/project/components/AssistantMessage/stories.js +55 -0
- package/dist/project/components/Attribute/README.md +1174 -0
- package/dist/project/components/Attribute/preview.html +2 -0
- package/dist/project/components/Attribute/stories.js +12 -0
- package/dist/project/components/Avatar/README.md +416 -0
- package/dist/project/components/Avatar/preview.html +2 -0
- package/dist/project/components/Avatar/stories.js +12 -0
- package/dist/project/components/Badge/README.md +853 -0
- package/dist/project/components/Badge/preview.html +2 -0
- package/dist/project/components/Badge/stories.js +12 -0
- package/dist/project/components/Banner/README.md +341 -0
- package/dist/project/components/Banner/preview.html +2 -0
- package/dist/project/components/Banner/stories.js +12 -0
- package/dist/project/components/BarList/README.md +757 -0
- package/dist/project/components/BarList/preview.html +2 -0
- package/dist/project/components/BarList/stories.js +12 -0
- package/dist/project/components/Breadcrumbs/README.md +274 -0
- package/dist/project/components/Breadcrumbs/preview.html +2 -0
- package/dist/project/components/Breadcrumbs/stories.js +12 -0
- package/dist/project/components/BulkBar/README.md +19 -0
- package/dist/project/components/Button/README.md +467 -0
- package/dist/project/components/Button/preview.html +2 -0
- package/dist/project/components/Button/stories.js +12 -0
- package/dist/project/components/Calendar/README.md +654 -0
- package/dist/project/components/Calendar/preview.html +2 -0
- package/dist/project/components/Calendar/stories.js +12 -0
- package/dist/project/components/Card/README.md +367 -0
- package/dist/project/components/Card/preview.html +2 -0
- package/dist/project/components/Card/stories.js +12 -0
- package/dist/project/components/ChainOfThought/README.md +412 -0
- package/dist/project/components/ChainOfThought/preview.html +2 -0
- package/dist/project/components/ChainOfThought/stories.js +12 -0
- package/dist/project/components/Chart/README.md +224 -0
- package/dist/project/components/Chart/preview.html +2 -0
- package/dist/project/components/Chart/stories.js +12 -0
- package/dist/project/components/Chat/README.md +1244 -0
- package/dist/project/components/Chat/preview.html +2 -0
- package/dist/project/components/Chat/stories.js +12 -0
- package/dist/project/components/ChatInput/README.md +378 -0
- package/dist/project/components/ChatInput/preview.html +2 -0
- package/dist/project/components/ChatInput/stories.js +12 -0
- package/dist/project/components/ChatPermissions/README.md +218 -0
- package/dist/project/components/ChatPermissions/preview.html +2 -0
- package/dist/project/components/ChatPermissions/stories.js +12 -0
- package/dist/project/components/Checkbox/README.md +367 -0
- package/dist/project/components/Checkbox/preview.html +2 -0
- package/dist/project/components/Checkbox/stories.js +12 -0
- package/dist/project/components/Code/README.md +243 -0
- package/dist/project/components/Code/preview.html +2 -0
- package/dist/project/components/Code/stories.js +12 -0
- package/dist/project/components/CodeEditor/README.md +280 -0
- package/dist/project/components/CodeEditor/preview.html +2 -0
- package/dist/project/components/CodeEditor/stories.js +162 -0
- package/dist/project/components/CodeEditor/stories.md +1533 -0
- package/dist/project/components/CodeSnippet/README.md +1352 -0
- package/dist/project/components/CodeSnippet/preview.html +2 -0
- package/dist/project/components/CodeSnippet/stories.js +156 -0
- package/dist/project/components/ColumnChart/README.md +521 -0
- package/dist/project/components/ColumnChart/preview.html +2 -0
- package/dist/project/components/ColumnChart/stories.js +12 -0
- package/dist/project/components/Conversation/README.md +314 -0
- package/dist/project/components/Conversation/preview.html +2 -0
- package/dist/project/components/Conversation/stories.js +12 -0
- package/dist/project/components/Copyable/README.md +406 -0
- package/dist/project/components/Copyable/preview.html +2 -0
- package/dist/project/components/Copyable/stories.js +12 -0
- package/dist/project/components/Country/README.md +226 -0
- package/dist/project/components/Country/preview.html +2 -0
- package/dist/project/components/Country/stories.js +12 -0
- package/dist/project/components/Cover/preview.html +43 -0
- package/dist/project/components/DateInput/README.md +458 -0
- package/dist/project/components/DateInput/preview.html +2 -0
- package/dist/project/components/DateInput/stories.js +12 -0
- package/dist/project/components/DateRangeInput/README.md +412 -0
- package/dist/project/components/DateRangeInput/preview.html +2 -0
- package/dist/project/components/DateRangeInput/stories.js +12 -0
- package/dist/project/components/Dialog/README.md +1140 -0
- package/dist/project/components/Dialog/preview.html +2 -0
- package/dist/project/components/Dialog/stories.js +12 -0
- package/dist/project/components/Drawer/README.md +1163 -0
- package/dist/project/components/Drawer/preview.html +2 -0
- package/dist/project/components/Drawer/stories.js +12 -0
- package/dist/project/components/DropdownMenu/README.md +678 -0
- package/dist/project/components/DropdownMenu/preview.html +2 -0
- package/dist/project/components/DropdownMenu/stories.js +12 -0
- package/dist/project/components/EmptyState/README.md +276 -0
- package/dist/project/components/EmptyState/preview.html +2 -0
- package/dist/project/components/EmptyState/stories.js +12 -0
- package/dist/project/components/FeedbackPulse/README.md +125 -0
- package/dist/project/components/FeedbackPulse/preview.html +2 -0
- package/dist/project/components/FeedbackPulse/stories.js +12 -0
- package/dist/project/components/Field/README.md +676 -0
- package/dist/project/components/Field/preview.html +2 -0
- package/dist/project/components/Field/stories.js +12 -0
- package/dist/project/components/FileUpload/README.md +544 -0
- package/dist/project/components/FileUpload/preview.html +2 -0
- package/dist/project/components/FileUpload/stories.js +12 -0
- package/dist/project/components/FilterCascade/README.md +348 -0
- package/dist/project/components/FilterCascade/preview.html +2 -0
- package/dist/project/components/FilterCascade/stories.js +12 -0
- package/dist/project/components/FilterDropdown/README.md +542 -0
- package/dist/project/components/FilterDropdown/preview.html +2 -0
- package/dist/project/components/FilterDropdown/stories.js +12 -0
- package/dist/project/components/FilterInput/README.md +416 -0
- package/dist/project/components/FilterInput/preview.html +2 -0
- package/dist/project/components/FilterInput/stories.js +12 -0
- package/dist/project/components/FilterInput/stories.md +6682 -0
- package/dist/project/components/Flex/README.md +225 -0
- package/dist/project/components/Flex/preview.html +2 -0
- package/dist/project/components/Flex/stories.js +12 -0
- package/dist/project/components/FormatDateTime/README.md +315 -0
- package/dist/project/components/FormatDateTime/preview.html +2 -0
- package/dist/project/components/FormatDateTime/stories.js +12 -0
- package/dist/project/components/FormatNumber/README.md +317 -0
- package/dist/project/components/FormatNumber/preview.html +2 -0
- package/dist/project/components/FormatNumber/stories.js +12 -0
- package/dist/project/components/Heading/README.md +240 -0
- package/dist/project/components/Heading/preview.html +2 -0
- package/dist/project/components/Heading/stories.js +12 -0
- package/dist/project/components/HorizontalBarStack/README.md +281 -0
- package/dist/project/components/HorizontalBarStack/preview.html +2 -0
- package/dist/project/components/HorizontalBarStack/stories.js +12 -0
- package/dist/project/components/HttpMethod/README.md +137 -0
- package/dist/project/components/HttpMethod/preview.html +2 -0
- package/dist/project/components/HttpMethod/stories.js +12 -0
- package/dist/project/components/ImageCropper/README.md +332 -0
- package/dist/project/components/ImageCropper/preview.html +2 -0
- package/dist/project/components/ImageCropper/stories.js +33 -0
- package/dist/project/components/Indicator/README.md +110 -0
- package/dist/project/components/Indicator/preview.html +2 -0
- package/dist/project/components/Indicator/stories.js +12 -0
- package/dist/project/components/InlineEdit/README.md +977 -0
- package/dist/project/components/InlineEdit/preview.html +2 -0
- package/dist/project/components/InlineEdit/stories.js +12 -0
- package/dist/project/components/Input/README.md +187 -0
- package/dist/project/components/Input/preview.html +2 -0
- package/dist/project/components/Input/stories.js +12 -0
- package/dist/project/components/InputGroup/README.md +423 -0
- package/dist/project/components/InputGroup/preview.html +2 -0
- package/dist/project/components/InputGroup/stories.js +12 -0
- package/dist/project/components/InputOTP/README.md +201 -0
- package/dist/project/components/InputOTP/preview.html +2 -0
- package/dist/project/components/InputOTP/stories.js +12 -0
- package/dist/project/components/Ip/README.md +226 -0
- package/dist/project/components/Ip/preview.html +2 -0
- package/dist/project/components/Ip/stories.js +12 -0
- package/dist/project/components/Kbd/README.md +126 -0
- package/dist/project/components/Kbd/preview.html +2 -0
- package/dist/project/components/Kbd/stories.js +12 -0
- package/dist/project/components/LineChart/README.md +1479 -0
- package/dist/project/components/LineChart/preview.html +2 -0
- package/dist/project/components/LineChart/stories.js +12 -0
- package/dist/project/components/Link/README.md +160 -0
- package/dist/project/components/Link/preview.html +2 -0
- package/dist/project/components/Link/stories.js +12 -0
- package/dist/project/components/List/README.md +181 -0
- package/dist/project/components/List/preview.html +2 -0
- package/dist/project/components/List/stories.js +12 -0
- package/dist/project/components/Loader/README.md +145 -0
- package/dist/project/components/Loader/preview.html +2 -0
- package/dist/project/components/Loader/stories.js +12 -0
- package/dist/project/components/Logo/README.md +183 -0
- package/dist/project/components/Logo/preview.html +2 -0
- package/dist/project/components/Logo/stories.js +12 -0
- package/dist/project/components/MessageActions/README.md +255 -0
- package/dist/project/components/MessageActions/preview.html +2 -0
- package/dist/project/components/MessageActions/stories.js +12 -0
- package/dist/project/components/Metric/README.md +324 -0
- package/dist/project/components/Metric/preview.html +2 -0
- package/dist/project/components/Metric/stories.js +12 -0
- package/dist/project/components/NavRail/README.md +25 -0
- package/dist/project/components/NotificationCenter/README.md +91 -0
- package/dist/project/components/NotificationCenter/preview.html +2 -0
- package/dist/project/components/NotificationCenter/stories.js +12 -0
- package/dist/project/components/NotificationCenter/stories.md +2170 -0
- package/dist/project/components/NumberInput/README.md +177 -0
- package/dist/project/components/NumberInput/preview.html +2 -0
- package/dist/project/components/NumberInput/stories.js +12 -0
- package/dist/project/components/NumericBadge/README.md +252 -0
- package/dist/project/components/NumericBadge/preview.html +2 -0
- package/dist/project/components/NumericBadge/stories.js +12 -0
- package/dist/project/components/OverflowList/README.md +324 -0
- package/dist/project/components/OverflowList/preview.html +2 -0
- package/dist/project/components/OverflowList/stories.js +12 -0
- package/dist/project/components/OverflowTooltip/README.md +421 -0
- package/dist/project/components/OverflowTooltip/preview.html +2 -0
- package/dist/project/components/OverflowTooltip/stories.js +12 -0
- package/dist/project/components/Overlay/README.md +95 -0
- package/dist/project/components/Overlay/preview.html +2 -0
- package/dist/project/components/Overlay/stories.js +12 -0
- package/dist/project/components/Overview/README.md +445 -0
- package/dist/project/components/Overview/preview.html +2 -0
- package/dist/project/components/Overview/stories.js +12 -0
- package/dist/project/components/Page/README.md +215 -0
- package/dist/project/components/Page/preview.html +2 -0
- package/dist/project/components/Page/stories.js +12 -0
- package/dist/project/components/Pagination/README.md +302 -0
- package/dist/project/components/Pagination/preview.html +2 -0
- package/dist/project/components/Pagination/stories.js +12 -0
- package/dist/project/components/ParameterPath/README.md +284 -0
- package/dist/project/components/ParameterPath/preview.html +2 -0
- package/dist/project/components/ParameterPath/stories.js +12 -0
- package/dist/project/components/PasswordComplexity/README.md +171 -0
- package/dist/project/components/PasswordComplexity/preview.html +2 -0
- package/dist/project/components/PasswordComplexity/stories.js +12 -0
- package/dist/project/components/PasswordInput/README.md +254 -0
- package/dist/project/components/PasswordInput/preview.html +2 -0
- package/dist/project/components/PasswordInput/stories.js +12 -0
- package/dist/project/components/PieChart/README.md +895 -0
- package/dist/project/components/PieChart/preview.html +2 -0
- package/dist/project/components/PieChart/stories.js +12 -0
- package/dist/project/components/Popover/README.md +282 -0
- package/dist/project/components/Popover/preview.html +2 -0
- package/dist/project/components/Popover/stories.js +12 -0
- package/dist/project/components/Progress/README.md +174 -0
- package/dist/project/components/Progress/preview.html +2 -0
- package/dist/project/components/Progress/stories.js +12 -0
- package/dist/project/components/Radio/README.md +264 -0
- package/dist/project/components/Radio/preview.html +2 -0
- package/dist/project/components/Radio/stories.js +12 -0
- package/dist/project/components/RemoteShell/README.md +1758 -0
- package/dist/project/components/RemoteShell/preview.html +2 -0
- package/dist/project/components/RemoteShell/stories.js +28 -0
- package/dist/project/components/Resizable/README.md +290 -0
- package/dist/project/components/Resizable/preview.html +2 -0
- package/dist/project/components/Resizable/stories.js +12 -0
- package/dist/project/components/ResponseCode/README.md +205 -0
- package/dist/project/components/ResponseCode/preview.html +2 -0
- package/dist/project/components/ResponseCode/stories.js +12 -0
- package/dist/project/components/ScrollArea/README.md +234 -0
- package/dist/project/components/ScrollArea/preview.html +2 -0
- package/dist/project/components/ScrollArea/stories.js +12 -0
- package/dist/project/components/SearchInput/README.md +158 -0
- package/dist/project/components/SearchInput/preview.html +2 -0
- package/dist/project/components/SearchInput/stories.js +12 -0
- package/dist/project/components/SearchModal/README.md +836 -0
- package/dist/project/components/SearchModal/preview.html +2 -0
- package/dist/project/components/SearchModal/stories.js +12 -0
- package/dist/project/components/SegmentedControl/README.md +382 -0
- package/dist/project/components/SegmentedControl/preview.html +2 -0
- package/dist/project/components/SegmentedControl/stories.js +12 -0
- package/dist/project/components/SegmentedTabs/README.md +390 -0
- package/dist/project/components/SegmentedTabs/preview.html +2 -0
- package/dist/project/components/SegmentedTabs/stories.js +12 -0
- package/dist/project/components/Select/README.md +1311 -0
- package/dist/project/components/Select/preview.html +2 -0
- package/dist/project/components/Select/stories.js +12 -0
- package/dist/project/components/Selection/README.md +648 -0
- package/dist/project/components/Selection/preview.html +2 -0
- package/dist/project/components/Selection/stories.js +12 -0
- package/dist/project/components/Separator/README.md +77 -0
- package/dist/project/components/Separator/preview.html +2 -0
- package/dist/project/components/Separator/stories.js +12 -0
- package/dist/project/components/Skeleton/README.md +358 -0
- package/dist/project/components/Skeleton/preview.html +2 -0
- package/dist/project/components/Skeleton/stories.js +12 -0
- package/dist/project/components/Slider/README.md +433 -0
- package/dist/project/components/Slider/preview.html +2 -0
- package/dist/project/components/Slider/stories.js +12 -0
- package/dist/project/components/SplashScreen/README.md +192 -0
- package/dist/project/components/SplashScreen/preview.html +2 -0
- package/dist/project/components/SplashScreen/stories.js +12 -0
- package/dist/project/components/SplitButton/README.md +402 -0
- package/dist/project/components/SplitButton/preview.html +2 -0
- package/dist/project/components/SplitButton/stories.js +12 -0
- package/dist/project/components/Stack/README.md +269 -0
- package/dist/project/components/Stack/preview.html +2 -0
- package/dist/project/components/Stack/stories.js +12 -0
- package/dist/project/components/Stepper/README.md +682 -0
- package/dist/project/components/Stepper/preview.html +2 -0
- package/dist/project/components/Stepper/stories.js +12 -0
- package/dist/project/components/Switch/README.md +236 -0
- package/dist/project/components/Switch/preview.html +2 -0
- package/dist/project/components/Switch/stories.js +12 -0
- package/dist/project/components/Table/README.md +471 -0
- package/dist/project/components/Table/preview.html +2 -0
- package/dist/project/components/Table/stories.js +12 -0
- package/dist/project/components/Table/stories.md +3697 -0
- package/dist/project/components/Tabs/README.md +443 -0
- package/dist/project/components/Tabs/preview.html +2 -0
- package/dist/project/components/Tabs/stories.js +12 -0
- package/dist/project/components/Tag/README.md +324 -0
- package/dist/project/components/Tag/preview.html +2 -0
- package/dist/project/components/Tag/stories.js +12 -0
- package/dist/project/components/Text/README.md +200 -0
- package/dist/project/components/Text/preview.html +2 -0
- package/dist/project/components/Text/stories.js +12 -0
- package/dist/project/components/Textarea/README.md +273 -0
- package/dist/project/components/Textarea/preview.html +2 -0
- package/dist/project/components/Textarea/stories.js +12 -0
- package/dist/project/components/TimeInput/README.md +359 -0
- package/dist/project/components/TimeInput/preview.html +2 -0
- package/dist/project/components/TimeInput/stories.js +12 -0
- package/dist/project/components/Timeline/README.md +204 -0
- package/dist/project/components/Timeline/preview.html +2 -0
- package/dist/project/components/Timeline/stories.js +12 -0
- package/dist/project/components/Toast/README.md +718 -0
- package/dist/project/components/Toast/preview.html +2 -0
- package/dist/project/components/Toast/stories.js +12 -0
- package/dist/project/components/ToggleButton/README.md +292 -0
- package/dist/project/components/ToggleButton/preview.html +2 -0
- package/dist/project/components/ToggleButton/stories.js +12 -0
- package/dist/project/components/Tooltip/README.md +199 -0
- package/dist/project/components/Tooltip/preview.html +2 -0
- package/dist/project/components/Tooltip/stories.js +12 -0
- package/dist/project/components/TopHeader/README.md +21 -0
- package/dist/project/components/Tour/README.md +532 -0
- package/dist/project/components/Tour/preview.html +2 -0
- package/dist/project/components/Tour/stories.js +12 -0
- package/dist/project/components/Tree/README.md +450 -0
- package/dist/project/components/Tree/preview.html +2 -0
- package/dist/project/components/Tree/stories.js +12 -0
- package/dist/project/components/TreeView/README.md +531 -0
- package/dist/project/components/TreeView/preview.html +2 -0
- package/dist/project/components/TreeView/stories.js +12 -0
- package/dist/project/components/UTILITIES.md +647 -0
- package/dist/project/components/UserMessage/README.md +166 -0
- package/dist/project/components/UserMessage/preview.html +2 -0
- package/dist/project/components/UserMessage/stories.js +12 -0
- package/dist/project/components/UtilityPage/README.md +147 -0
- package/dist/project/components/UtilityPage/preview.html +2 -0
- package/dist/project/components/UtilityPage/stories.js +12 -0
- package/dist/project/components/WallyAssistant/README.md +1380 -0
- package/dist/project/components/WallyAssistant/preview.html +2 -0
- package/dist/project/components/WallyAssistant/stories.js +12 -0
- package/dist/project/components/WallyIcon/README.md +130 -0
- package/dist/project/components/WallyIcon/preview.html +2 -0
- package/dist/project/components/WallyIcon/stories.js +12 -0
- package/dist/project/components/WallySkeleton/README.md +96 -0
- package/dist/project/components/WallySkeleton/preview.html +2 -0
- package/dist/project/components/WallySkeleton/stories.js +12 -0
- package/dist/project/components/bundle.css +18734 -0
- package/dist/project/components/bundle.js +167 -0
- package/dist/project/components/index.d.ts +27226 -0
- package/dist/project/design-system.json +35 -0
- package/dist/project/fonts/Geist-Variable.woff2 +0 -0
- package/dist/project/fonts/GeistMono-Variable.woff2 +0 -0
- package/dist/project/fonts/GeistPixel-Square.woff2 +0 -0
- package/dist/project/sampler.dc.html +238 -0
- package/dist/project/tokens.css +1395 -0
- package/dist/project/tokens.json +5235 -0
- package/dist/wallarm-sampler.dc.html +239 -0
- package/package.json +67 -3
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
Select part of an image by moving and zooming it inside a fixed frame, then export a Blob at the exact outputSize. The frame follows the output aspect ratio and preserves the source proportions. Compose Slider for zoom, FileUpload for choosing a file, and your own Save action through ImageCropperContext. All processing runs in the browser; the consumer owns uploading. Preview rounding is visual only: the saved image is rectangular. Remote images need crossOrigin="anonymous" on ImageCropperImage and server CORS permission for canvas export; local file/object URLs also work. Size the preview with width classes; CSS scale transforms on ancestors are not supported by the underlying crop geometry. Arrow keys pan, Shift accelerates, and +/− zoom.
|
|
2
|
+
|
|
3
|
+
## Props as canvas attributes
|
|
4
|
+
|
|
5
|
+
Use kebab-case attribute names. Pass non-string values through renderVals holes, including booleans. The full emitted API is in `components/index.d.ts`.
|
|
6
|
+
|
|
7
|
+
| Attribute | Type | Required | Default | Description |
|
|
8
|
+
| --- | --- | --- | --- | --- |
|
|
9
|
+
| `output-size` | `complex` | yes | — | Exact exported pixel dimensions; also determines the visible frame's aspect ratio. |
|
|
10
|
+
| `zoom` | `number \| undefined` | no | — | |
|
|
11
|
+
| `default-zoom` | `number \| undefined` | no | `1` | |
|
|
12
|
+
| `min-zoom` | `number \| undefined` | no | `1` | The minimum scale, relative to the image covering the frame. Must be at least 1. |
|
|
13
|
+
| `max-zoom` | `number \| undefined` | no | `5` | |
|
|
14
|
+
| `on-zoom-change` | `((zoom: number) => void) \| undefined` | no | — | |
|
|
15
|
+
| `default-checked` | `boolean \| undefined` | no | — | |
|
|
16
|
+
| `default-value` | `string \| number \| readonly string[] \| undefined` | no | — | |
|
|
17
|
+
| `auto-focus` | `boolean \| undefined` | no | — | |
|
|
18
|
+
| `id` | `string \| undefined` | no | — | |
|
|
19
|
+
| `tab-index` | `number \| undefined` | no | — | |
|
|
20
|
+
| `title` | `string \| undefined` | no | — | |
|
|
21
|
+
| `rel` | `string \| undefined` | no | — | |
|
|
22
|
+
| `on-change` | `ChangeEventHandler<T, Element> \| undefined` | no | — | |
|
|
23
|
+
| `data-testid` | `string \| undefined` | no | — | |
|
|
24
|
+
|
|
25
|
+
## Sub-components
|
|
26
|
+
|
|
27
|
+
- `WallarmDS.ImageCropperContext` — `ImageCropperContextProps` in the declaration bundle.
|
|
28
|
+
- `WallarmDS.ImageCropperGrid` — `ImageCropperGridProps` in the declaration bundle.
|
|
29
|
+
- `WallarmDS.ImageCropperImage` — `ImageCropperImageProps` in the declaration bundle.
|
|
30
|
+
- `WallarmDS.ImageCropperSelection` — `ImageCropperSelectionProps` in the declaration bundle.
|
|
31
|
+
- `WallarmDS.ImageCropperViewport` — `ImageCropperViewportProps` in the declaration bundle.
|
|
32
|
+
|
|
33
|
+
## Stories
|
|
34
|
+
|
|
35
|
+
### Avatar
|
|
36
|
+
|
|
37
|
+
A small rounded preview like the avatar design; the saved square is 256 × 256 pixels.
|
|
38
|
+
|
|
39
|
+
Source: ImageCropper/ImageCropper.stories.tsx#Avatar
|
|
40
|
+
|
|
41
|
+
### Landscape
|
|
42
|
+
|
|
43
|
+
Wide source and output: a 600 × 300 image is cropped to a 320 × 180 result.
|
|
44
|
+
|
|
45
|
+
Source: ImageCropper/ImageCropper.stories.tsx#Landscape
|
|
46
|
+
|
|
47
|
+
### WithFileUpload
|
|
48
|
+
|
|
49
|
+
FileUpload owns picking and validation; useFilePreviewUrl releases the local object URL.
|
|
50
|
+
|
|
51
|
+
Source: ImageCropper/ImageCropper.stories.tsx#WithFileUpload
|
|
52
|
+
|
|
53
|
+
### Controlled
|
|
54
|
+
|
|
55
|
+
The parent can accept or reject zoom changes; the image and external slider follow its value.
|
|
56
|
+
|
|
57
|
+
Source: ImageCropper/ImageCropper.stories.tsx#Controlled
|
|
58
|
+
|
|
59
|
+
### Geometry
|
|
60
|
+
|
|
61
|
+
Color bands make source proportions and the exact exported selection easy to verify.
|
|
62
|
+
|
|
63
|
+
Source: ImageCropper/ImageCropper.stories.tsx#Geometry
|
|
64
|
+
|
|
65
|
+
## Story sources
|
|
66
|
+
|
|
67
|
+
### ImageCropper/ImageCropper.stories.tsx
|
|
68
|
+
|
|
69
|
+
```tsx
|
|
70
|
+
import { useState } from 'react';
|
|
71
|
+
import type { Meta, StoryFn } from 'storybook-react-rsbuild';
|
|
72
|
+
import { Button } from '../Button';
|
|
73
|
+
import { FileUpload, FileUploadError, FileUploadTrigger, useFilePreviewUrl } from '../FileUpload';
|
|
74
|
+
import { Slider, SliderControl, SliderThumb } from '../Slider';
|
|
75
|
+
import {
|
|
76
|
+
ImageCropper,
|
|
77
|
+
ImageCropperContext,
|
|
78
|
+
ImageCropperGrid,
|
|
79
|
+
ImageCropperImage,
|
|
80
|
+
type ImageCropperProps,
|
|
81
|
+
ImageCropperSelection,
|
|
82
|
+
ImageCropperViewport,
|
|
83
|
+
} from '.';
|
|
84
|
+
import { LANDSCAPE, PORTRAIT, TALL_BANDS, WIDE_BANDS } from './stories/fixtures';
|
|
85
|
+
|
|
86
|
+
const meta = {
|
|
87
|
+
title: 'Inputs/ImageCropper',
|
|
88
|
+
component: ImageCropper,
|
|
89
|
+
parameters: {
|
|
90
|
+
layout: 'centered',
|
|
91
|
+
docs: {
|
|
92
|
+
description: {
|
|
93
|
+
component:
|
|
94
|
+
'Select part of an image by moving and zooming it inside a fixed frame, then export a Blob at the exact outputSize. The frame follows the output aspect ratio and preserves the source proportions. Compose Slider for zoom, FileUpload for choosing a file, and your own Save action through ImageCropperContext. All processing runs in the browser; the consumer owns uploading. Preview rounding is visual only: the saved image is rectangular. Remote images need crossOrigin="anonymous" on ImageCropperImage and server CORS permission for canvas export; local file/object URLs also work. Size the preview with width classes; CSS scale transforms on ancestors are not supported by the underlying crop geometry. Arrow keys pan, Shift accelerates, and +/− zoom.',
|
|
95
|
+
},
|
|
96
|
+
source: {
|
|
97
|
+
code: `<ImageCropper outputSize={{ width: 256, height: 256 }}>
|
|
98
|
+
<ImageCropperViewport className="w-[100px] rounded-[32px]">
|
|
99
|
+
<ImageCropperImage src={imageUrl} alt="Image to crop" />
|
|
100
|
+
<ImageCropperSelection aria-label="Position image">
|
|
101
|
+
<ImageCropperGrid />
|
|
102
|
+
</ImageCropperSelection>
|
|
103
|
+
</ImageCropperViewport>
|
|
104
|
+
<ImageCropperContext>
|
|
105
|
+
{api => (
|
|
106
|
+
<>
|
|
107
|
+
<Slider value={[api.zoom]} min={1} max={5} step={0.1}
|
|
108
|
+
onValueChange={([zoom]) => { if (zoom !== undefined) api.setZoom(zoom); }}>
|
|
109
|
+
<SliderControl><SliderThumb aria-label="Zoom image" /></SliderControl>
|
|
110
|
+
</Slider>
|
|
111
|
+
<Button disabled={!api.ready} onClick={async () => {
|
|
112
|
+
const blob = await api.getCroppedImage();
|
|
113
|
+
if (blob) saveImage(blob);
|
|
114
|
+
}}>Save</Button>
|
|
115
|
+
</>
|
|
116
|
+
)}
|
|
117
|
+
</ImageCropperContext>
|
|
118
|
+
</ImageCropper>`,
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
args: { outputSize: { width: 256, height: 256 }, minZoom: 1, maxZoom: 4 },
|
|
123
|
+
argTypes: {
|
|
124
|
+
outputSize: { control: 'object' },
|
|
125
|
+
minZoom: { control: 'number' },
|
|
126
|
+
maxZoom: { control: 'number' },
|
|
127
|
+
defaultZoom: { control: 'number' },
|
|
128
|
+
zoom: { control: false },
|
|
129
|
+
onZoomChange: { control: false },
|
|
130
|
+
children: { control: false },
|
|
131
|
+
ref: { control: false },
|
|
132
|
+
},
|
|
133
|
+
} satisfies Meta<typeof ImageCropper>;
|
|
134
|
+
|
|
135
|
+
export default meta;
|
|
136
|
+
|
|
137
|
+
interface ExampleProps extends ImageCropperProps {
|
|
138
|
+
source?: string;
|
|
139
|
+
compact?: boolean;
|
|
140
|
+
upload?: boolean;
|
|
141
|
+
geometry?: boolean;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const Example = ({
|
|
145
|
+
source = PORTRAIT,
|
|
146
|
+
compact = false,
|
|
147
|
+
upload = false,
|
|
148
|
+
geometry = false,
|
|
149
|
+
...args
|
|
150
|
+
}: ExampleProps) => {
|
|
151
|
+
const [files, setFiles] = useState<File[]>([]);
|
|
152
|
+
const [result, setResult] = useState<File | null>(null);
|
|
153
|
+
const [error, setError] = useState('');
|
|
154
|
+
const [alternate, setAlternate] = useState(false);
|
|
155
|
+
const src = useFilePreviewUrl(files[0]);
|
|
156
|
+
const resultUrl = useFilePreviewUrl(result);
|
|
157
|
+
|
|
158
|
+
return (
|
|
159
|
+
<div className='flex w-[304px] max-w-[calc(100vw-32px)] flex-col gap-24'>
|
|
160
|
+
<ImageCropper {...args} data-testid='cropper' className='flex flex-col items-center gap-24'>
|
|
161
|
+
<ImageCropperViewport
|
|
162
|
+
className={compact || geometry ? 'w-[100px] rounded-[32px]' : 'w-[280px] rounded-12'}
|
|
163
|
+
>
|
|
164
|
+
<ImageCropperImage
|
|
165
|
+
src={alternate ? TALL_BANDS : (src ?? source)}
|
|
166
|
+
alt='Image to crop'
|
|
167
|
+
onLoad={() => setError('')}
|
|
168
|
+
onError={() => setError('This image could not be opened. Choose another file.')}
|
|
169
|
+
/>
|
|
170
|
+
<ImageCropperSelection aria-label='Crop image'>
|
|
171
|
+
<ImageCropperGrid />
|
|
172
|
+
</ImageCropperSelection>
|
|
173
|
+
</ImageCropperViewport>
|
|
174
|
+
<ImageCropperContext>
|
|
175
|
+
{api => (
|
|
176
|
+
<>
|
|
177
|
+
<Slider
|
|
178
|
+
data-testid='cropper-zoom'
|
|
179
|
+
className='w-full'
|
|
180
|
+
value={[api.zoom]}
|
|
181
|
+
min={args.minZoom ?? 1}
|
|
182
|
+
max={args.maxZoom ?? 4}
|
|
183
|
+
step={0.1}
|
|
184
|
+
disabled={!api.ready}
|
|
185
|
+
onValueChange={([value]) => {
|
|
186
|
+
if (value !== undefined) api.setZoom(value);
|
|
187
|
+
}}
|
|
188
|
+
>
|
|
189
|
+
<SliderControl>
|
|
190
|
+
<SliderThumb aria-label='Zoom image' />
|
|
191
|
+
</SliderControl>
|
|
192
|
+
</Slider>
|
|
193
|
+
<div className='flex items-center gap-8'>
|
|
194
|
+
<Button
|
|
195
|
+
data-testid='cropper-save'
|
|
196
|
+
disabled={!api.ready}
|
|
197
|
+
onClick={async () => {
|
|
198
|
+
try {
|
|
199
|
+
const blob = await api.getCroppedImage();
|
|
200
|
+
if (blob) {
|
|
201
|
+
setResult(new File([blob], 'cropped-image.png', { type: blob.type }));
|
|
202
|
+
setError('');
|
|
203
|
+
} else {
|
|
204
|
+
setError('The image could not be exported. Try a local image file.');
|
|
205
|
+
}
|
|
206
|
+
} catch {
|
|
207
|
+
setError('The image could not be exported. Try a local image file.');
|
|
208
|
+
}
|
|
209
|
+
}}
|
|
210
|
+
>
|
|
211
|
+
Save image
|
|
212
|
+
</Button>
|
|
213
|
+
<Button variant='secondary' color='neutral' onClick={() => api.reset()}>
|
|
214
|
+
Reset
|
|
215
|
+
</Button>
|
|
216
|
+
</div>
|
|
217
|
+
</>
|
|
218
|
+
)}
|
|
219
|
+
</ImageCropperContext>
|
|
220
|
+
</ImageCropper>
|
|
221
|
+
{upload && (
|
|
222
|
+
<FileUpload
|
|
223
|
+
value={files}
|
|
224
|
+
onValueChange={next => {
|
|
225
|
+
setFiles(next);
|
|
226
|
+
setResult(null);
|
|
227
|
+
}}
|
|
228
|
+
accept='image/png,image/jpeg,image/webp'
|
|
229
|
+
maxFileSize={10 * 1024 * 1024}
|
|
230
|
+
data-testid='cropper-upload'
|
|
231
|
+
>
|
|
232
|
+
<FileUploadTrigger variant='secondary' color='neutral'>
|
|
233
|
+
Select file
|
|
234
|
+
</FileUploadTrigger>
|
|
235
|
+
<FileUploadError />
|
|
236
|
+
</FileUpload>
|
|
237
|
+
)}
|
|
238
|
+
{geometry && (
|
|
239
|
+
<Button data-testid='cropper-replace' onClick={() => setAlternate(value => !value)}>
|
|
240
|
+
Switch source orientation
|
|
241
|
+
</Button>
|
|
242
|
+
)}
|
|
243
|
+
{error && (
|
|
244
|
+
<p role='alert' className='text-sm text-text-danger'>
|
|
245
|
+
{error}
|
|
246
|
+
</p>
|
|
247
|
+
)}
|
|
248
|
+
{resultUrl && (
|
|
249
|
+
<div className='flex flex-col items-center gap-8'>
|
|
250
|
+
<img
|
|
251
|
+
data-testid='cropper-result'
|
|
252
|
+
src={resultUrl}
|
|
253
|
+
alt='Saved crop'
|
|
254
|
+
className='max-h-[200px] max-w-full object-contain'
|
|
255
|
+
/>
|
|
256
|
+
<a
|
|
257
|
+
href={resultUrl}
|
|
258
|
+
download='cropped-image.png'
|
|
259
|
+
className='text-sm text-text-link-default'
|
|
260
|
+
>
|
|
261
|
+
Download {args.outputSize.width} × {args.outputSize.height}
|
|
262
|
+
</a>
|
|
263
|
+
</div>
|
|
264
|
+
)}
|
|
265
|
+
</div>
|
|
266
|
+
);
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
/** A small rounded preview like the avatar design; the saved square is 256 × 256 pixels. */
|
|
270
|
+
export const Avatar: StoryFn<ImageCropperProps> = args => <Example {...args} compact />;
|
|
271
|
+
|
|
272
|
+
/** Wide source and output: a 600 × 300 image is cropped to a 320 × 180 result. */
|
|
273
|
+
export const Landscape: StoryFn<ImageCropperProps> = args => (
|
|
274
|
+
<Example {...args} source={LANDSCAPE} outputSize={{ width: 320, height: 180 }} />
|
|
275
|
+
);
|
|
276
|
+
|
|
277
|
+
/** FileUpload owns picking and validation; useFilePreviewUrl releases the local object URL. */
|
|
278
|
+
export const WithFileUpload: StoryFn<ImageCropperProps> = args => <Example {...args} upload />;
|
|
279
|
+
|
|
280
|
+
/** The parent can accept or reject zoom changes; the image and external slider follow its value. */
|
|
281
|
+
export const Controlled: StoryFn<ImageCropperProps> = args => {
|
|
282
|
+
const [zoom, setZoom] = useState(1.5);
|
|
283
|
+
const [locked, setLocked] = useState(false);
|
|
284
|
+
return (
|
|
285
|
+
<div className='flex flex-col items-center gap-16'>
|
|
286
|
+
<Example
|
|
287
|
+
{...args}
|
|
288
|
+
zoom={zoom}
|
|
289
|
+
onZoomChange={value => {
|
|
290
|
+
if (!locked) setZoom(value);
|
|
291
|
+
}}
|
|
292
|
+
/>
|
|
293
|
+
<Button
|
|
294
|
+
variant='secondary'
|
|
295
|
+
color='neutral'
|
|
296
|
+
data-testid='cropper-lock-zoom'
|
|
297
|
+
onClick={() => setLocked(value => !value)}
|
|
298
|
+
>
|
|
299
|
+
{locked ? 'Unlock zoom' : 'Lock zoom'}
|
|
300
|
+
</Button>
|
|
301
|
+
</div>
|
|
302
|
+
);
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
/** Color bands make source proportions and the exact exported selection easy to verify. */
|
|
306
|
+
export const Geometry: StoryFn<ImageCropperProps> = args => (
|
|
307
|
+
<Example {...args} source={WIDE_BANDS} outputSize={{ width: 64, height: 64 }} geometry />
|
|
308
|
+
);
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
### ImageCropper/stories/fixtures.ts
|
|
312
|
+
|
|
313
|
+
```tsx
|
|
314
|
+
const svgUrl = (svg: string) => `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svg)}`;
|
|
315
|
+
|
|
316
|
+
// Local deterministic illustrations keep the examples and export checks independent of network/CORS.
|
|
317
|
+
export const PORTRAIT = svgUrl(
|
|
318
|
+
'<svg xmlns="http://www.w3.org/2000/svg" width="200" height="300" viewBox="0 0 200 300"><rect width="200" height="300" fill="#c9d9ec"/><circle cx="100" cy="112" r="48" fill="#31344e"/><ellipse cx="100" cy="132" rx="35" ry="44" fill="#eec5a6"/><path d="M65 119q5-53 65-20l9 30q-31-4-44-30-9 18-30 20" fill="#31344e"/><path d="M30 300v-67q0-55 70-55t70 55v67" fill="#56749b"/><path d="m77 179 23 37 23-37" fill="#eec5a6"/></svg>',
|
|
319
|
+
);
|
|
320
|
+
|
|
321
|
+
export const LANDSCAPE = svgUrl(
|
|
322
|
+
'<svg xmlns="http://www.w3.org/2000/svg" width="600" height="300" viewBox="0 0 600 300"><rect width="600" height="300" fill="#d5e6ef"/><circle cx="430" cy="77" r="34" fill="#f4bc68"/><path d="m0 260 170-200 155 200z" fill="#829ca1"/><path d="m90 300 260-248 250 248" fill="#577a87"/><path d="m297 103 53-51 62 62-39-13-23 11-20-17z" fill="#f5f1e7"/><path d="M0 248q170-50 300 5t300-13v60H0" fill="#335d68"/></svg>',
|
|
323
|
+
);
|
|
324
|
+
|
|
325
|
+
export const WIDE_BANDS = svgUrl(
|
|
326
|
+
'<svg xmlns="http://www.w3.org/2000/svg" width="400" height="200"><path fill="#ff0000" d="M0 0h100v200H0z"/><path fill="#00ff00" d="M100 0h100v200H100z"/><path fill="#0000ff" d="M200 0h100v200H200z"/><path fill="#ffff00" d="M300 0h100v200H300z"/></svg>',
|
|
327
|
+
);
|
|
328
|
+
|
|
329
|
+
export const TALL_BANDS = svgUrl(
|
|
330
|
+
'<svg xmlns="http://www.w3.org/2000/svg" width="200" height="400"><path fill="#ff0000" d="M0 0h200v100H0z"/><path fill="#00ff00" d="M0 100h200v100H0z"/><path fill="#0000ff" d="M0 200h200v100H0z"/><path fill="#ffff00" d="M0 300h200v100H0z"/></svg>',
|
|
331
|
+
);
|
|
332
|
+
```
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var e={vD(e,t,r){let o,a;/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @lightSyntaxTransform
|
|
8
|
+
* @noflow
|
|
9
|
+
* @nolint
|
|
10
|
+
* @preventMunge
|
|
11
|
+
* @preserve-invariant-messages
|
|
12
|
+
*/var l,n,i=Object.create,c=Object.defineProperty,s=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,u=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty,d=(e,t,r,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of p(t))m.call(e,a)||a===r||c(e,a,{get:()=>t[a],enumerable:!(o=s(t,a))||o.enumerable});return e},f={},h={$dispatcherGuard:()=>N,$makeReadOnly:()=>I,$reset:()=>z,$structuralCheck:()=>T,c:()=>x,clearRenderCounterRegistry:()=>k,renderCounterRegistry:()=>M,useRenderCounter:()=>O};for(var g in h)c(f,g,{get:h[g],enumerable:!0});e.exports=d(c({},"__esModule",{value:!0}),f);var y=(a=null!=(o=r("C"))?i(u(o)):{},d(o&&o.__esModule?a:c(a,"default",{value:o,enumerable:!0}),o)),{useRef:w,useEffect:v,isValidElement:S}=y,b=null!=(l=y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)?l:y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,C=Symbol.for("react.memo_cache_sentinel"),x="function"==typeof(null==(n=y.__COMPILER_RUNTIME)?void 0:n.c)?y.__COMPILER_RUNTIME.c:function(e){return y.useMemo(()=>{let t=Array(e);for(let r=0;r<e;r++)t[r]=C;return t[C]=!0,t},[])},R={};["readContext","useCallback","useContext","useEffect","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useDebugValue","useDeferredValue","useTransition","useMutableSource","useSyncExternalStore","useId","unstable_isNewReconciler","getCacheSignal","getCacheForType","useCacheRefresh"].forEach(e=>{R[e]=()=>{throw Error(`[React] Unexpected React hook call (${e}) from a React compiled function. Check that all hooks are called directly and named according to convention ('use[A-Z]') `)}});var _=null;function E(e){return b.ReactCurrentDispatcher.current=e,b.ReactCurrentDispatcher.current}R.useMemoCache=e=>{if(null!=_)return _.useMemoCache(e);throw Error("React Compiler internal invariant violation: unexpected null dispatcher")};var $=[];function N(e){let t=b.ReactCurrentDispatcher.current;if(0===e){if($.push(t),1===$.length&&(_=t),t===R)throw Error("[React] Unexpected call to custom hook or component from a React compiled function. Check that (1) all hooks are called directly and named according to convention ('use[A-Z]') and (2) components are returned as JSX instead of being directly invoked.");E(R)}else if(1===e){let e=$.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");0===$.length&&(_=null),E(e)}else if(2===e)$.push(t),E(_);else if(3===e){let e=$.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");E(e)}else throw Error("React Compiler internal error: unreachable block"+e)}function z(e){for(let t=0;t<e.length;t++)e[t]=C}function I(){throw Error("TODO: implement $makeReadOnly in react-compiler-runtime")}var M=new Map;function k(){for(let e of M.values())e.forEach(e=>{e.count=0})}function O(e){let t=w(null);null!=t.current&&(t.current.count+=1),v(()=>{if(null==t.current){let r,o={count:0};null==(r=M.get(e))&&(r=new Set,M.set(e,r)),r.add(o),t.current=o}return()=>{var r;let o;null!==t.current&&(r=t.current,null!=(o=M.get(e))&&o.delete(r))}})}var D=new Set;function T(e,t,r,o,a,l){function n(e,t,n,i){let c=`${o}:${l} [${a}] ${r}${n} changed from ${e} to ${t} at depth ${i}`;D.has(c)||(D.add(c),console.error(c))}!function e(t,r,o,a){if(!(a>2)){if(t!==r)if(typeof t!=typeof r)n(`type ${typeof t}`,`type ${typeof r}`,o,a);else if("object"==typeof t){let l=Array.isArray(t),i=Array.isArray(r);if(null===t&&null!==r)n("null",`type ${typeof r}`,o,a);else if(null===r)n(`type ${typeof t}`,"null",o,a);else if(t instanceof Map)if(r instanceof Map)if(t.size!==r.size)n(`Map instance with size ${t.size}`,`Map instance with size ${r.size}`,o,a);else for(let[l,i]of t)r.has(l)?e(i,r.get(l),`${o}.get(${l})`,a+1):n(`Map instance with key ${l}`,`Map instance without key ${l}`,o,a);else n("Map instance","other value",o,a);else if(r instanceof Map)n("other value","Map instance",o,a);else if(t instanceof Set)if(r instanceof Set)if(t.size!==r.size)n(`Set instance with size ${t.size}`,`Set instance with size ${r.size}`,o,a);else for(let e of r)t.has(e)||n(`Set instance without element ${e}`,`Set instance with element ${e}`,o,a);else n("Set instance","other value",o,a);else if(r instanceof Set)n("other value","Set instance",o,a);else if(l||i)if(l!==i)n(`type ${l?"array":"object"}`,`type ${i?"array":"object"}`,o,a);else if(t.length!==r.length)n(`array with length ${t.length}`,`array with length ${r.length}`,o,a);else for(let l=0;l<t.length;l++)e(t[l],r[l],`${o}[${l}]`,a+1);else if(S(t)||S(r))S(t)!==S(r)?n(`type ${S(t)?"React element":"object"}`,`type ${S(r)?"React element":"object"}`,o,a):t.type!==r.type?n(`React element of type ${t.type}`,`React element of type ${r.type}`,o,a):e(t.props,r.props,`[props of ${o}]`,a+1);else{for(let e in r)e in t||n(`object without key ${e}`,`object with key ${e}`,o,a);for(let l in t)l in r?e(t[l],r[l],`${o}.${l}`,a+1):n(`object with key ${l}`,`object without key ${l}`,o,a)}}else{if("function"==typeof t)return;isNaN(t)||isNaN(r)?isNaN(t)!==isNaN(r)&&n(`${isNaN(t)?"NaN":"non-NaN value"}`,`${isNaN(r)?"NaN":"non-NaN value"}`,o,a):t!==r&&n(t,r,o,a)}}}(e,t,"",0)}},p(e,t,r){let o=new WeakMap,a=new WeakMap;function l(e,t,r){let l=t,n=r;if("object"==typeof l&&null!==l&&"$$typeof"in l&&l.$$typeof===Symbol.for("react.context")&&"Provider"in l&&(l=l.Provider),"function"==typeof l&&null!=n.ref&&!l.prototype?.isReactComponent){let t=l,r=o.get(e);r||(r=new WeakMap,o.set(e,r));let a=r.get(t);a||((a=e.forwardRef((e,r)=>t({...e,ref:r}))).displayName=t.displayName??t.name,r.set(t,a)),l=a}if("string"==typeof l&&"boolean"==typeof n.inert&&((n={...n}).inert?n.inert="":delete n.inert),"string"==typeof l)for(let[e,t]of[["fill-rule","fillRule"],["clip-rule","clipRule"]])e in n&&(n={...n,[t]:n[e]},delete n[e]);return"string"==typeof l&&null!=n.ref&&(l=function(e,t){let r=a.get(e);r||(r=new Map,a.set(e,r));let o=r.get(t);if(o)return o;let l=e.forwardRef((r,o)=>{let a=e.useRef(null);if(!a.current||a.current.original!==o){let e;a.current={original:o,callback:t=>{if(null==t&&e){let t=e;e=void 0,t();return}if("function"==typeof o){let r=o(t);e="function"==typeof r?r:void 0}else o&&(o.current=t)}}}return e.createElement(t,{...r,ref:a.current.callback})});return l.displayName=`CanvasHost(${t})`,r.set(t,l),l}(e,l)),{type:l,props:n}}function n(e){let t=(t,r,o)=>{let a=l(e,t,r??{});return e.createElement(a.type,void 0===o?a.props:{...a.props,key:o})};return{jsx:t,jsxs:(t,r,o)=>{let a=l(e,t,r??{}),{children:n,...i}=a.props;return e.createElement(a.type,void 0===o?i:{...i,key:o},...Array.isArray(n)?n:[n])},jsxDEV:t,Fragment:e.Fragment}}function i(e){return{...e,createElement:(t,r,...o)=>{let a=l(e,t,r??{});return e.createElement(a.type,a.props,...o)},cloneElement:(t,r,...o)=>{let a=e.cloneElement(t,r??void 0,...o),n=a.ref,i=l(e,a.type,{...a.props,ref:n});return i.type===a.type&&"string"!=typeof a.type?a:e.createElement(i.type,{...i.props,key:a.key})}}}r.d(t,{MA:()=>n,YJ:()=>i})},C(e,t,r){r.r(t);let o=(0,r("p").YJ)(window.React),{Children:a,Component:l,Fragment:n,Profiler:i,PureComponent:c,StrictMode:s,Suspense:p,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:u,act:m,cloneElement:d,createContext:f,createElement:h,createFactory:g,createRef:y,forwardRef:w,isValidElement:v,lazy:S,memo:b,startTransition:C,unstable_act:x,useCallback:R,useContext:_,useDebugValue:E,useDeferredValue:$,useEffect:N,useId:z,useImperativeHandle:I,useInsertionEffect:M,useLayoutEffect:k,useMemo:O,useReducer:D,useRef:T,useState:j,useSyncExternalStore:W,useTransition:U,version:A,use:P}=o;r.d(t,{},{Children:a,Component:l,Fragment:n,Profiler:i,PureComponent:c,StrictMode:s,Suspense:p,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:u,act:m,cloneElement:d,createContext:f,createElement:h,createFactory:g,createRef:y,default:o,forwardRef:w,isValidElement:v,lazy:S,memo:b,startTransition:C,unstable_act:x,use:P,useCallback:R,useContext:_,useDebugValue:E,useDeferredValue:$,useEffect:N,useId:z,useImperativeHandle:I,useInsertionEffect:M,useLayoutEffect:k,useMemo:O,useReducer:D,useRef:T,useState:j,useSyncExternalStore:W,useTransition:U,version:A})}},t={};function r(o){var a=t[o];if(void 0!==a)return a.exports;var l=t[o]={exports:{}};return e[o](l,l.exports,r),l.exports}r.d=(e,t,o)=>{var a=(t,o)=>{for(var a in t)r.o(t,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,[o]:t[a]})};a(t,"get"),a(o,"value")},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{let{jsx:e,jsxs:t,jsxDEV:o,Fragment:a}=(0,r("p").MA)(window.React);var l=r("vD"),n=r("C");let i=e=>`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`,c=i('<svg xmlns="http://www.w3.org/2000/svg" width="200" height="300" viewBox="0 0 200 300"><rect width="200" height="300" fill="#c9d9ec"/><circle cx="100" cy="112" r="48" fill="#31344e"/><ellipse cx="100" cy="132" rx="35" ry="44" fill="#eec5a6"/><path d="M65 119q5-53 65-20l9 30q-31-4-44-30-9 18-30 20" fill="#31344e"/><path d="M30 300v-67q0-55 70-55t70 55v67" fill="#56749b"/><path d="m77 179 23 37 23-37" fill="#eec5a6"/></svg>'),s=i('<svg xmlns="http://www.w3.org/2000/svg" width="600" height="300" viewBox="0 0 600 300"><rect width="600" height="300" fill="#d5e6ef"/><circle cx="430" cy="77" r="34" fill="#f4bc68"/><path d="m0 260 170-200 155 200z" fill="#829ca1"/><path d="m90 300 260-248 250 248" fill="#577a87"/><path d="m297 103 53-51 62 62-39-13-23 11-20-17z" fill="#f5f1e7"/><path d="M0 248q170-50 300 5t300-13v60H0" fill="#335d68"/></svg>'),p=i('<svg xmlns="http://www.w3.org/2000/svg" width="400" height="200"><path fill="#ff0000" d="M0 0h100v200H0z"/><path fill="#00ff00" d="M100 0h100v200H100z"/><path fill="#0000ff" d="M200 0h100v200H200z"/><path fill="#ffff00" d="M300 0h100v200H300z"/></svg>'),u=i('<svg xmlns="http://www.w3.org/2000/svg" width="200" height="400"><path fill="#ff0000" d="M0 0h200v100H0z"/><path fill="#00ff00" d="M0 100h200v100H0z"/><path fill="#0000ff" d="M0 200h200v100H0z"/><path fill="#ffff00" d="M0 300h200v100H0z"/></svg>'),m=window.WallarmDS.Button,d=window.WallarmDS.FileUpload,f=window.WallarmDS.FileUploadError,h=window.WallarmDS.FileUploadTrigger,g=window.WallarmDS.useFilePreviewUrl,y=window.WallarmDS.Slider,w=window.WallarmDS.SliderControl,v=window.WallarmDS.SliderThumb,S=window.WallarmDS.ImageCropper,b=window.WallarmDS.ImageCropperContext,C=window.WallarmDS.ImageCropperGrid,x=window.WallarmDS.ImageCropperImage,R=window.WallarmDS.ImageCropperSelection,_=window.WallarmDS.ImageCropperViewport,E={title:"Inputs/ImageCropper",component:S,parameters:{layout:"centered",docs:{description:{component:'Select part of an image by moving and zooming it inside a fixed frame, then export a Blob at the exact outputSize. The frame follows the output aspect ratio and preserves the source proportions. Compose Slider for zoom, FileUpload for choosing a file, and your own Save action through ImageCropperContext. All processing runs in the browser; the consumer owns uploading. Preview rounding is visual only: the saved image is rectangular. Remote images need crossOrigin="anonymous" on ImageCropperImage and server CORS permission for canvas export; local file/object URLs also work. Size the preview with width classes; CSS scale transforms on ancestors are not supported by the underlying crop geometry. Arrow keys pan, Shift accelerates, and +/− zoom.'},source:{code:`<ImageCropper outputSize={{ width: 256, height: 256 }}>
|
|
13
|
+
<ImageCropperViewport className="w-[100px] rounded-[32px]">
|
|
14
|
+
<ImageCropperImage src={imageUrl} alt="Image to crop" />
|
|
15
|
+
<ImageCropperSelection aria-label="Position image">
|
|
16
|
+
<ImageCropperGrid />
|
|
17
|
+
</ImageCropperSelection>
|
|
18
|
+
</ImageCropperViewport>
|
|
19
|
+
<ImageCropperContext>
|
|
20
|
+
{api => (
|
|
21
|
+
<>
|
|
22
|
+
<Slider value={[api.zoom]} min={1} max={5} step={0.1}
|
|
23
|
+
onValueChange={([zoom]) => { if (zoom !== undefined) api.setZoom(zoom); }}>
|
|
24
|
+
<SliderControl><SliderThumb aria-label="Zoom image" /></SliderControl>
|
|
25
|
+
</Slider>
|
|
26
|
+
<Button disabled={!api.ready} onClick={async () => {
|
|
27
|
+
const blob = await api.getCroppedImage();
|
|
28
|
+
if (blob) saveImage(blob);
|
|
29
|
+
}}>Save</Button>
|
|
30
|
+
</>
|
|
31
|
+
)}
|
|
32
|
+
</ImageCropperContext>
|
|
33
|
+
</ImageCropper>`}}},args:{outputSize:{width:256,height:256},minZoom:1,maxZoom:4},argTypes:{outputSize:{control:"object"},minZoom:{control:"number"},maxZoom:{control:"number"},defaultZoom:{control:"number"},zoom:{control:!1},onZoomChange:{control:!1},children:{control:!1},ref:{control:!1}}},$=r=>{let o,i,s,p,E,$,z,I,M,k,O,D,T,j,W,U,A,P,Z=(0,l.c)(38);Z[0]!==r?({source:i,compact:s,upload:p,geometry:E,...o}=r,Z[0]=r,Z[1]=o,Z[2]=i,Z[3]=s,Z[4]=p,Z[5]=E):(o=Z[1],i=Z[2],s=Z[3],p=Z[4],E=Z[5]);let L=void 0===i?c:i,F=void 0!==s&&s,H=void 0!==p&&p,V=void 0!==E&&E;Z[6]===Symbol.for("react.memo_cache_sentinel")?($=[],Z[6]=$):$=Z[6];let[B,G]=(0,n.useState)($),[Y,q]=(0,n.useState)(null),[J,X]=(0,n.useState)(""),[K,Q]=(0,n.useState)(!1),ee=g(B[0]),et=g(Y),er=F||V?"w-[100px] rounded-[32px]":"w-[280px] rounded-12",eo=K?u:ee??L;return Z[7]===Symbol.for("react.memo_cache_sentinel")?(z=()=>X(""),I=()=>X("This image could not be opened. Choose another file."),Z[7]=z,Z[8]=I):(z=Z[7],I=Z[8]),Z[9]!==eo?(M=e(x,{src:eo,alt:"Image to crop",onLoad:z,onError:I}),Z[9]=eo,Z[10]=M):M=Z[10],Z[11]===Symbol.for("react.memo_cache_sentinel")?(k=e(R,{"aria-label":"Crop image",children:e(C,{})}),Z[11]=k):k=Z[11],Z[12]!==M||Z[13]!==er?(O=t(_,{className:er,children:[M,k]}),Z[12]=M,Z[13]=er,Z[14]=O):O=Z[14],Z[15]!==o.maxZoom||Z[16]!==o.minZoom?(D=e(b,{children:r=>t(a,{children:[e(y,{"data-testid":"cropper-zoom",className:"w-full",value:[r.zoom],min:o.minZoom??1,max:o.maxZoom??4,step:.1,disabled:!r.ready,onValueChange:e=>{let[t]=e;void 0!==t&&r.setZoom(t)},children:e(w,{children:e(v,{"aria-label":"Zoom image"})})}),t("div",{className:"flex items-center gap-8",children:[e(m,{"data-testid":"cropper-save",disabled:!r.ready,onClick:async()=>{try{let e=await r.getCroppedImage();e?(q(new File([e],"cropped-image.png",{type:e.type})),X("")):X("The image could not be exported. Try a local image file.")}catch{X("The image could not be exported. Try a local image file.")}},children:"Save image"}),e(m,{variant:"secondary",color:"neutral",onClick:()=>r.reset(),children:"Reset"})]})]})}),Z[15]=o.maxZoom,Z[16]=o.minZoom,Z[17]=D):D=Z[17],Z[18]!==o||Z[19]!==O||Z[20]!==D?(T=t(S,{...o,"data-testid":"cropper",className:"flex flex-col items-center gap-24",children:[O,D]}),Z[18]=o,Z[19]=O,Z[20]=D,Z[21]=T):T=Z[21],Z[22]!==B||Z[23]!==H?(j=H&&t(d,{value:B,onValueChange:e=>{G(e),q(null)},accept:"image/png,image/jpeg,image/webp",maxFileSize:0xa00000,"data-testid":"cropper-upload",children:[e(h,{variant:"secondary",color:"neutral",children:"Select file"}),e(f,{})]}),Z[22]=B,Z[23]=H,Z[24]=j):j=Z[24],Z[25]!==V?(W=V&&e(m,{"data-testid":"cropper-replace",onClick:()=>Q(N),children:"Switch source orientation"}),Z[25]=V,Z[26]=W):W=Z[26],Z[27]!==J?(U=J&&e("p",{role:"alert",className:"text-sm text-text-danger",children:J}),Z[27]=J,Z[28]=U):U=Z[28],Z[29]!==o.outputSize||Z[30]!==et?(A=et&&t("div",{className:"flex flex-col items-center gap-8",children:[e("img",{"data-testid":"cropper-result",src:et,alt:"Saved crop",className:"max-h-[200px] max-w-full object-contain"}),t("a",{href:et,download:"cropped-image.png",className:"text-sm text-text-link-default",children:["Download ",o.outputSize.width," × ",o.outputSize.height]})]}),Z[29]=o.outputSize,Z[30]=et,Z[31]=A):A=Z[31],Z[32]!==T||Z[33]!==j||Z[34]!==W||Z[35]!==U||Z[36]!==A?(P=t("div",{className:"flex w-[304px] max-w-[calc(100vw-32px)] flex-col gap-24",children:[T,j,W,U,A]}),Z[32]=T,Z[33]=j,Z[34]=W,Z[35]=U,Z[36]=A,Z[37]=P):P=Z[37],P};function N(e){return!e}function z(e){return!e}let I=[{name:"Avatar",story:t=>{let r,o=(0,l.c)(2);return o[0]!==t?(r=e($,{...t,compact:!0}),o[0]=t,o[1]=r):r=o[1],r},meta:E},{name:"Landscape",story:t=>{let r,o,a=(0,l.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r={width:320,height:180},a[0]=r):r=a[0],a[1]!==t?(o=e($,{...t,source:s,outputSize:r}),a[1]=t,a[2]=o):o=a[2],o},meta:E},{name:"WithFileUpload",story:t=>{let r,o=(0,l.c)(2);return o[0]!==t?(r=e($,{...t,upload:!0}),o[0]=t,o[1]=r):r=o[1],r},meta:E},{name:"Controlled",story:r=>{let o,a,i,c,s,p=(0,l.c)(12),[u,d]=(0,n.useState)(1.5),[f,h]=(0,n.useState)(!1);p[0]!==f?(o=e=>{f||d(e)},p[0]=f,p[1]=o):o=p[1],p[2]!==r||p[3]!==o||p[4]!==u?(a=e($,{...r,zoom:u,onZoomChange:o}),p[2]=r,p[3]=o,p[4]=u,p[5]=a):a=p[5],p[6]===Symbol.for("react.memo_cache_sentinel")?(i=()=>h(z),p[6]=i):i=p[6];let g=f?"Unlock zoom":"Lock zoom";return p[7]!==g?(c=e(m,{variant:"secondary",color:"neutral","data-testid":"cropper-lock-zoom",onClick:i,children:g}),p[7]=g,p[8]=c):c=p[8],p[9]!==a||p[10]!==c?(s=t("div",{className:"flex flex-col items-center gap-16",children:[a,c]}),p[9]=a,p[10]=c,p[11]=s):s=p[11],s},meta:E},{name:"Geometry",story:t=>{let r,o,a=(0,l.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r={width:64,height:64},a[0]=r):r=a[0],a[1]!==t?(o=e($,{...t,source:p,outputSize:r,geometry:!0}),a[1]=t,a[2]=o):o=a[2],o},meta:E}];function M({entry:e}){let{story:t,meta:r}=e,o={...r.args,...t.args},a="function"==typeof t||t.$$typeof?t:t.render||r.render||r.component,l=()=>n.default.createElement(a,o),i={args:o,globals:{theme:"light"},parameters:{...r.parameters,...t.parameters},viewMode:"story"};for(let e of[...r.decorators||[],...t.decorators||[]].reverse()){let t=l;l=()=>e(t,i)}return n.default.createElement("section",{"data-preview-story":e.name,className:"p-16"},n.default.createElement("h2",{className:"text-sm mb-12"},e.name),n.default.createElement(l))}window.WallarmPreview={mount(e){let t=window.ReactDOM.createRoot(e);return t.render(n.default.createElement(window.WallarmDS.Root,null,I.map((e,t)=>n.default.createElement(M,{key:t,entry:e})))),t}}})();
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
A coloured dot for a state next to something that already names it — a row, a tab, an item in a list. Reach for `Badge` when the state needs naming, since colour on its own carries nothing for a reader who cannot separate the hues.
|
|
2
|
+
|
|
3
|
+
## Props as canvas attributes
|
|
4
|
+
|
|
5
|
+
Use kebab-case attribute names. Pass non-string values through renderVals holes, including booleans. The full emitted API is in `components/index.d.ts`.
|
|
6
|
+
|
|
7
|
+
| Attribute | Type | Required | Default | Description |
|
|
8
|
+
| --- | --- | --- | --- | --- |
|
|
9
|
+
| `default-checked` | `boolean \| undefined` | no | — | |
|
|
10
|
+
| `default-value` | `string \| number \| readonly string[] \| undefined` | no | — | |
|
|
11
|
+
| `auto-focus` | `boolean \| undefined` | no | — | |
|
|
12
|
+
| `id` | `string \| undefined` | no | — | |
|
|
13
|
+
| `tab-index` | `number \| undefined` | no | — | |
|
|
14
|
+
| `title` | `string \| undefined` | no | — | |
|
|
15
|
+
| `rel` | `string \| undefined` | no | — | |
|
|
16
|
+
| `color` | `"info" \| "brand" \| "warning" \| "success" \| "ai" \| "danger"` | no | `info` | |
|
|
17
|
+
| `on-change` | `ChangeEventHandler<T, Element> \| undefined` | no | — | |
|
|
18
|
+
| `size` | `"sm" \| "md"` | no | `sm` | |
|
|
19
|
+
| `data-testid` | `string \| undefined` | no | — | |
|
|
20
|
+
|
|
21
|
+
## Stories
|
|
22
|
+
|
|
23
|
+
### Basic
|
|
24
|
+
|
|
25
|
+
The default dot. It only works where the thing beside it is already labelled — the dot
|
|
26
|
+
qualifies that label rather than replacing it.
|
|
27
|
+
|
|
28
|
+
Source: Indicator/Indicator.stories.tsx#Basic
|
|
29
|
+
|
|
30
|
+
### AllVariants
|
|
31
|
+
|
|
32
|
+
Both sizes against every colour. The colours mean what they mean everywhere else in the
|
|
33
|
+
system, so pick from meaning rather than from contrast.
|
|
34
|
+
|
|
35
|
+
Source: Indicator/Indicator.stories.tsx#AllVariants
|
|
36
|
+
|
|
37
|
+
## Story sources
|
|
38
|
+
|
|
39
|
+
### Indicator/Indicator.stories.tsx
|
|
40
|
+
|
|
41
|
+
```tsx
|
|
42
|
+
import type { Meta, StoryFn } from 'storybook-react-rsbuild';
|
|
43
|
+
import { HStack, VStack } from '../Stack';
|
|
44
|
+
import { Indicator } from './Indicator';
|
|
45
|
+
|
|
46
|
+
const colors = ['info', 'brand', 'danger', 'warning', 'success', 'ai'] as const;
|
|
47
|
+
|
|
48
|
+
const DESCRIPTION = [
|
|
49
|
+
'A coloured dot for a state next to something that already names it — a row, a tab, an item in a list.',
|
|
50
|
+
'Reach for `Badge` when the state needs naming, since colour on its own carries nothing for a reader who cannot separate the hues.',
|
|
51
|
+
].join(' ');
|
|
52
|
+
|
|
53
|
+
const meta = {
|
|
54
|
+
title: 'Status Indication/Indicator',
|
|
55
|
+
component: Indicator,
|
|
56
|
+
parameters: {
|
|
57
|
+
layout: 'centered',
|
|
58
|
+
docs: {
|
|
59
|
+
description: {
|
|
60
|
+
component: DESCRIPTION,
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
argTypes: {
|
|
65
|
+
size: {
|
|
66
|
+
control: 'select',
|
|
67
|
+
options: ['sm', 'md'],
|
|
68
|
+
},
|
|
69
|
+
color: {
|
|
70
|
+
control: 'select',
|
|
71
|
+
options: colors,
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
} satisfies Meta<typeof Indicator>;
|
|
75
|
+
|
|
76
|
+
export default meta;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* The default dot. It only works where the thing beside it is already labelled — the dot
|
|
80
|
+
* qualifies that label rather than replacing it.
|
|
81
|
+
*/
|
|
82
|
+
export const Basic: StoryFn<typeof meta> = ({ ...args }) => <Indicator {...args} />;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Both sizes against every colour. The colours mean what they mean everywhere else in the
|
|
86
|
+
* system, so pick from meaning rather than from contrast.
|
|
87
|
+
*/
|
|
88
|
+
export const AllVariants: StoryFn<typeof meta> = () => (
|
|
89
|
+
// Fixed-width cells so each size heading sits over its own column: the dots are 6 and 8px, far
|
|
90
|
+
// narrower than the words above them, so without a shared width nothing lines up.
|
|
91
|
+
<VStack gap={16} align='start'>
|
|
92
|
+
<HStack gap={24} align='center'>
|
|
93
|
+
<span className='sb-annotation w-32 text-center'>sm</span>
|
|
94
|
+
<span className='sb-annotation w-32 text-center'>md</span>
|
|
95
|
+
</HStack>
|
|
96
|
+
|
|
97
|
+
{colors.map(color => (
|
|
98
|
+
<HStack key={color} gap={24} align='center'>
|
|
99
|
+
<div className='flex w-32 justify-center'>
|
|
100
|
+
<Indicator size='sm' color={color} />
|
|
101
|
+
</div>
|
|
102
|
+
<div className='flex w-32 justify-center'>
|
|
103
|
+
<Indicator size='md' color={color} />
|
|
104
|
+
</div>
|
|
105
|
+
<span className='sb-annotation'>{color}</span>
|
|
106
|
+
</HStack>
|
|
107
|
+
))}
|
|
108
|
+
</VStack>
|
|
109
|
+
);
|
|
110
|
+
```
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
var e={vD(e,t,r){let n,a;/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @lightSyntaxTransform
|
|
8
|
+
* @noflow
|
|
9
|
+
* @nolint
|
|
10
|
+
* @preventMunge
|
|
11
|
+
* @preserve-invariant-messages
|
|
12
|
+
*/var o,l,i=Object.create,c=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u=Object.getOwnPropertyNames,f=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty,d=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of u(t))p.call(e,a)||a===r||c(e,a,{get:()=>t[a],enumerable:!(n=s(t,a))||n.enumerable});return e},m={},y={$dispatcherGuard:()=>O,$makeReadOnly:()=>k,$reset:()=>M,$structuralCheck:()=>T,c:()=>b,clearRenderCounterRegistry:()=>x,renderCounterRegistry:()=>j,useRenderCounter:()=>D};for(var h in y)c(m,h,{get:y[h],enumerable:!0});e.exports=d(c({},"__esModule",{value:!0}),m);var g=(a=null!=(n=r("C"))?i(f(n)):{},d(n&&n.__esModule?a:c(a,"default",{value:n,enumerable:!0}),n)),{useRef:w,useEffect:R,isValidElement:E}=g,$=null!=(o=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)?o:g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,v=Symbol.for("react.memo_cache_sentinel"),b="function"==typeof(null==(l=g.__COMPILER_RUNTIME)?void 0:l.c)?g.__COMPILER_RUNTIME.c:function(e){return g.useMemo(()=>{let t=Array(e);for(let r=0;r<e;r++)t[r]=v;return t[v]=!0,t},[])},_={};["readContext","useCallback","useContext","useEffect","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useDebugValue","useDeferredValue","useTransition","useMutableSource","useSyncExternalStore","useId","unstable_isNewReconciler","getCacheSignal","getCacheForType","useCacheRefresh"].forEach(e=>{_[e]=()=>{throw Error(`[React] Unexpected React hook call (${e}) from a React compiled function. Check that all hooks are called directly and named according to convention ('use[A-Z]') `)}});var N=null;function S(e){return $.ReactCurrentDispatcher.current=e,$.ReactCurrentDispatcher.current}_.useMemoCache=e=>{if(null!=N)return N.useMemoCache(e);throw Error("React Compiler internal invariant violation: unexpected null dispatcher")};var C=[];function O(e){let t=$.ReactCurrentDispatcher.current;if(0===e){if(C.push(t),1===C.length&&(N=t),t===_)throw Error("[React] Unexpected call to custom hook or component from a React compiled function. Check that (1) all hooks are called directly and named according to convention ('use[A-Z]') and (2) components are returned as JSX instead of being directly invoked.");S(_)}else if(1===e){let e=C.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");0===C.length&&(N=null),S(e)}else if(2===e)C.push(t),S(N);else if(3===e){let e=C.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");S(e)}else throw Error("React Compiler internal error: unreachable block"+e)}function M(e){for(let t=0;t<e.length;t++)e[t]=v}function k(){throw Error("TODO: implement $makeReadOnly in react-compiler-runtime")}var j=new Map;function x(){for(let e of j.values())e.forEach(e=>{e.count=0})}function D(e){let t=w(null);null!=t.current&&(t.current.count+=1),R(()=>{if(null==t.current){let r,n={count:0};null==(r=j.get(e))&&(r=new Set,j.set(e,r)),r.add(n),t.current=n}return()=>{var r;let n;null!==t.current&&(r=t.current,null!=(n=j.get(e))&&n.delete(r))}})}var I=new Set;function T(e,t,r,n,a,o){function l(e,t,l,i){let c=`${n}:${o} [${a}] ${r}${l} changed from ${e} to ${t} at depth ${i}`;I.has(c)||(I.add(c),console.error(c))}!function e(t,r,n,a){if(!(a>2)){if(t!==r)if(typeof t!=typeof r)l(`type ${typeof t}`,`type ${typeof r}`,n,a);else if("object"==typeof t){let o=Array.isArray(t),i=Array.isArray(r);if(null===t&&null!==r)l("null",`type ${typeof r}`,n,a);else if(null===r)l(`type ${typeof t}`,"null",n,a);else if(t instanceof Map)if(r instanceof Map)if(t.size!==r.size)l(`Map instance with size ${t.size}`,`Map instance with size ${r.size}`,n,a);else for(let[o,i]of t)r.has(o)?e(i,r.get(o),`${n}.get(${o})`,a+1):l(`Map instance with key ${o}`,`Map instance without key ${o}`,n,a);else l("Map instance","other value",n,a);else if(r instanceof Map)l("other value","Map instance",n,a);else if(t instanceof Set)if(r instanceof Set)if(t.size!==r.size)l(`Set instance with size ${t.size}`,`Set instance with size ${r.size}`,n,a);else for(let e of r)t.has(e)||l(`Set instance without element ${e}`,`Set instance with element ${e}`,n,a);else l("Set instance","other value",n,a);else if(r instanceof Set)l("other value","Set instance",n,a);else if(o||i)if(o!==i)l(`type ${o?"array":"object"}`,`type ${i?"array":"object"}`,n,a);else if(t.length!==r.length)l(`array with length ${t.length}`,`array with length ${r.length}`,n,a);else for(let o=0;o<t.length;o++)e(t[o],r[o],`${n}[${o}]`,a+1);else if(E(t)||E(r))E(t)!==E(r)?l(`type ${E(t)?"React element":"object"}`,`type ${E(r)?"React element":"object"}`,n,a):t.type!==r.type?l(`React element of type ${t.type}`,`React element of type ${r.type}`,n,a):e(t.props,r.props,`[props of ${n}]`,a+1);else{for(let e in r)e in t||l(`object without key ${e}`,`object with key ${e}`,n,a);for(let o in t)o in r?e(t[o],r[o],`${n}.${o}`,a+1):l(`object with key ${o}`,`object without key ${o}`,n,a)}}else{if("function"==typeof t)return;isNaN(t)||isNaN(r)?isNaN(t)!==isNaN(r)&&l(`${isNaN(t)?"NaN":"non-NaN value"}`,`${isNaN(r)?"NaN":"non-NaN value"}`,n,a):t!==r&&l(t,r,n,a)}}}(e,t,"",0)}},p(e,t,r){let n=new WeakMap,a=new WeakMap;function o(e,t,r){let o=t,l=r;if("object"==typeof o&&null!==o&&"$$typeof"in o&&o.$$typeof===Symbol.for("react.context")&&"Provider"in o&&(o=o.Provider),"function"==typeof o&&null!=l.ref&&!o.prototype?.isReactComponent){let t=o,r=n.get(e);r||(r=new WeakMap,n.set(e,r));let a=r.get(t);a||((a=e.forwardRef((e,r)=>t({...e,ref:r}))).displayName=t.displayName??t.name,r.set(t,a)),o=a}if("string"==typeof o&&"boolean"==typeof l.inert&&((l={...l}).inert?l.inert="":delete l.inert),"string"==typeof o)for(let[e,t]of[["fill-rule","fillRule"],["clip-rule","clipRule"]])e in l&&(l={...l,[t]:l[e]},delete l[e]);return"string"==typeof o&&null!=l.ref&&(o=function(e,t){let r=a.get(e);r||(r=new Map,a.set(e,r));let n=r.get(t);if(n)return n;let o=e.forwardRef((r,n)=>{let a=e.useRef(null);if(!a.current||a.current.original!==n){let e;a.current={original:n,callback:t=>{if(null==t&&e){let t=e;e=void 0,t();return}if("function"==typeof n){let r=n(t);e="function"==typeof r?r:void 0}else n&&(n.current=t)}}}return e.createElement(t,{...r,ref:a.current.callback})});return o.displayName=`CanvasHost(${t})`,r.set(t,o),o}(e,o)),{type:o,props:l}}function l(e){let t=(t,r,n)=>{let a=o(e,t,r??{});return e.createElement(a.type,void 0===n?a.props:{...a.props,key:n})};return{jsx:t,jsxs:(t,r,n)=>{let a=o(e,t,r??{}),{children:l,...i}=a.props;return e.createElement(a.type,void 0===n?i:{...i,key:n},...Array.isArray(l)?l:[l])},jsxDEV:t,Fragment:e.Fragment}}function i(e){return{...e,createElement:(t,r,...n)=>{let a=o(e,t,r??{});return e.createElement(a.type,a.props,...n)},cloneElement:(t,r,...n)=>{let a=e.cloneElement(t,r??void 0,...n),l=a.ref,i=o(e,a.type,{...a.props,ref:l});return i.type===a.type&&"string"!=typeof a.type?a:e.createElement(i.type,{...i.props,key:a.key})}}}r.d(t,{MA:()=>l,YJ:()=>i})},C(e,t,r){r.r(t);let n=(0,r("p").YJ)(window.React),{Children:a,Component:o,Fragment:l,Profiler:i,PureComponent:c,StrictMode:s,Suspense:u,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:f,act:p,cloneElement:d,createContext:m,createElement:y,createFactory:h,createRef:g,forwardRef:w,isValidElement:R,lazy:E,memo:$,startTransition:v,unstable_act:b,useCallback:_,useContext:N,useDebugValue:S,useDeferredValue:C,useEffect:O,useId:M,useImperativeHandle:k,useInsertionEffect:j,useLayoutEffect:x,useMemo:D,useReducer:I,useRef:T,useState:A,useSyncExternalStore:P,useTransition:z,version:L,use:U}=n;r.d(t,{},{Children:a,Component:o,Fragment:l,Profiler:i,PureComponent:c,StrictMode:s,Suspense:u,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:f,act:p,cloneElement:d,createContext:m,createElement:y,createFactory:h,createRef:g,default:n,forwardRef:w,isValidElement:R,lazy:E,memo:$,startTransition:v,unstable_act:b,use:U,useCallback:_,useContext:N,useDebugValue:S,useDeferredValue:C,useEffect:O,useId:M,useImperativeHandle:k,useInsertionEffect:j,useLayoutEffect:x,useMemo:D,useReducer:I,useRef:T,useState:A,useSyncExternalStore:P,useTransition:z,version:L})}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.d=(e,t,n)=>{var a=(t,n)=>{for(var a in t)r.o(t,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,[n]:t[a]})};a(t,"get"),a(n,"value")},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{let{jsx:e,jsxs:t,jsxDEV:n,Fragment:a}=(0,r("p").MA)(window.React);var o=r("vD");let l=window.WallarmDS.HStack,i=window.WallarmDS.VStack,c=window.WallarmDS.Indicator,s=["info","brand","danger","warning","success","ai"],u={title:"Status Indication/Indicator",component:c,parameters:{layout:"centered",docs:{description:{component:"A coloured dot for a state next to something that already names it — a row, a tab, an item in a list. Reach for `Badge` when the state needs naming, since colour on its own carries nothing for a reader who cannot separate the hues."}}},argTypes:{size:{control:"select",options:["sm","md"]},color:{control:"select",options:s}}};function f(r){return t(l,{gap:24,align:"center",children:[e("div",{className:"flex w-32 justify-center",children:e(c,{size:"sm",color:r})}),e("div",{className:"flex w-32 justify-center",children:e(c,{size:"md",color:r})}),e("span",{className:"sb-annotation",children:r})]},r)}var p=r("C");let d=[{name:"Basic",story:t=>{let r,n,a=(0,o.c)(4);return a[0]!==t?({...r}=t,a[0]=t,a[1]=r):r=a[1],a[2]!==r?(n=e(c,{...r}),a[2]=r,a[3]=n):n=a[3],n},meta:u},{name:"AllVariants",story:()=>{let r,n=(0,o.c)(1);return n[0]===Symbol.for("react.memo_cache_sentinel")?(r=t(i,{gap:16,align:"start",children:[t(l,{gap:24,align:"center",children:[e("span",{className:"sb-annotation w-32 text-center",children:"sm"}),e("span",{className:"sb-annotation w-32 text-center",children:"md"})]}),s.map(f)]}),n[0]=r):r=n[0],r},meta:u}];function m({entry:e}){let{story:t,meta:r}=e,n={...r.args,...t.args},a="function"==typeof t||t.$$typeof?t:t.render||r.render||r.component,o=()=>p.default.createElement(a,n),l={args:n,globals:{theme:"light"},parameters:{...r.parameters,...t.parameters},viewMode:"story"};for(let e of[...r.decorators||[],...t.decorators||[]].reverse()){let t=o;o=()=>e(t,l)}return p.default.createElement("section",{"data-preview-story":e.name,className:"p-16"},p.default.createElement("h2",{className:"text-sm mb-12"},e.name),p.default.createElement(o))}window.WallarmPreview={mount(e){let t=window.ReactDOM.createRoot(e);return t.render(p.default.createElement(window.WallarmDS.Root,null,d.map((e,t)=>p.default.createElement(m,{key:t,entry:e})))),t}}})();
|