@wallarm-org/claude-design 0.0.0-stage → 4.9.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,977 @@
|
|
|
1
|
+
Turns a displayed value into its own editor, so a reader can correct one field without opening a form — reach for a form when several values change together. Every story composes it inside an `Attribute`, because that is what keeps the read and edit states the same height and stops the row jumping on toggle.
|
|
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
|
+
| `value` | `T \| undefined` | no | — | |
|
|
10
|
+
| `default-value` | `T \| undefined` | no | — | |
|
|
11
|
+
| `on-value-change` | `((value: T) => void) \| undefined` | no | — | |
|
|
12
|
+
| `on-value-commit` | `((value: T) => void \| Promise<unknown>) \| undefined` | no | — | |
|
|
13
|
+
| `on-value-revert` | `((value: T) => void) \| undefined` | no | — | |
|
|
14
|
+
| `on-before-value-commit` | `((value: T, committedValue: T) => boolean \| void \| Promise<boolean \| void>) \| undefined` | no | — | Commit guard. Called on every submit (Enter, blur, popover close, confirm button) before `onValueCommit`, with the draft to be committed and the current committed value. Only an explicit `false` (or a promise resolving to `false`) blocks the commit: the field silently stays in edit mode with the draft. Any other result — `true`, `undefined`, no return — lets the commit proceed. A rejection or a synchronous throw is treated like a commit failure: status `error`, message from the error, field stays in edit mode. While the guard's promise is pending the edit session is held: duplicate submits are suppressed, blur neither submits nor cancels, and the field shows no status (`idle` — the consumer's confirmation UI is the feedback). Escape still cancels; a late resolution after cancel is dropped. The value committed on `true` is exactly the `value` argument the guard received; if the draft changed while the guard was pending, the resolution is dropped and the field stays in edit mode. Guards must settle via non-blocking UI (a promise resolved by dialog buttons). Synchronous blocking dialogs (`window.confirm`) are unsupported with submitMode 'blur'/'both' (the queued blur re-prompts). The guard's owner never gets its consumer UI closed by the DS — treat the dialog's own buttons as the source of truth for closing it. |
|
|
15
|
+
| `edit` | `boolean \| undefined` | no | — | |
|
|
16
|
+
| `default-edit` | `boolean \| undefined` | no | `false` | |
|
|
17
|
+
| `on-edit-change` | `((editing: boolean) => void) \| undefined` | no | — | |
|
|
18
|
+
| `activation-mode` | `InlineEditActivationMode \| undefined` | no | `click` | |
|
|
19
|
+
| `submit-mode` | `InlineEditSubmitMode \| undefined` | no | `both` | |
|
|
20
|
+
| `select-on-focus` | `boolean \| undefined` | no | `true` | |
|
|
21
|
+
| `status` | `InlineEditStatus \| undefined` | no | — | |
|
|
22
|
+
| `saved-duration` | `number \| undefined` | no | `2000` | |
|
|
23
|
+
| `disabled` | `boolean \| undefined` | no | `false` | |
|
|
24
|
+
| `read-only` | `boolean \| undefined` | no | `false` | |
|
|
25
|
+
| `data-testid` | `string \| undefined` | no | — | |
|
|
26
|
+
|
|
27
|
+
## Sub-components
|
|
28
|
+
|
|
29
|
+
- `WallarmDS.InlineEditControl` — `InlineEditControlProps` in the declaration bundle.
|
|
30
|
+
- `WallarmDS.InlineEditDate` — `InlineEditDateProps` in the declaration bundle.
|
|
31
|
+
- `WallarmDS.InlineEditDateTime` — `InlineEditDateTimeProps` in the declaration bundle.
|
|
32
|
+
- `WallarmDS.InlineEditError` — `InlineEditErrorProps` in the declaration bundle.
|
|
33
|
+
- `WallarmDS.InlineEditInput` — `InlineEditInputProps` in the declaration bundle.
|
|
34
|
+
- `WallarmDS.InlineEditNumber` — `InlineEditNumberProps` in the declaration bundle.
|
|
35
|
+
- `WallarmDS.InlineEditPreview` — `InlineEditPreviewProps` in the declaration bundle.
|
|
36
|
+
- `WallarmDS.InlineEditPreviewIcon` — `InlineEditPreviewIconProps` in the declaration bundle.
|
|
37
|
+
- `WallarmDS.InlineEditPreviewValue` — `InlineEditPreviewValueProps` in the declaration bundle.
|
|
38
|
+
- `WallarmDS.InlineEditSelect` — `InlineEditSelectProps` in the declaration bundle.
|
|
39
|
+
- `WallarmDS.InlineEditTextarea` — `InlineEditTextareaProps` in the declaration bundle.
|
|
40
|
+
- `WallarmDS.InlineEditTime` — `InlineEditTimeProps` in the declaration bundle.
|
|
41
|
+
|
|
42
|
+
## Stories
|
|
43
|
+
|
|
44
|
+
### TextEditor
|
|
45
|
+
|
|
46
|
+
The default editor. Clicking the value swaps in an input of the same size, which is why the
|
|
47
|
+
row does not move.
|
|
48
|
+
|
|
49
|
+
Source: InlineEdit/InlineEdit.stories.tsx#TextEditor
|
|
50
|
+
|
|
51
|
+
### NumberEditor
|
|
52
|
+
|
|
53
|
+
`InlineEditNumber` for a numeric field, with the steppers available while editing and gone
|
|
54
|
+
again once committed.
|
|
55
|
+
|
|
56
|
+
Source: InlineEdit/InlineEdit.stories.tsx#NumberEditor
|
|
57
|
+
|
|
58
|
+
### TextareaEditor
|
|
59
|
+
|
|
60
|
+
For a value long enough to wrap. `lineClamp` on the preview keeps the row short in read mode
|
|
61
|
+
and lets the editor grow past it.
|
|
62
|
+
|
|
63
|
+
Source: InlineEdit/InlineEdit.stories.tsx#TextareaEditor
|
|
64
|
+
|
|
65
|
+
### SelectEditor
|
|
66
|
+
|
|
67
|
+
`InlineEditSelect` for a value from a known set. Its children are ordinary `Select` parts, so
|
|
68
|
+
the menu behaves exactly as it would standalone.
|
|
69
|
+
|
|
70
|
+
Source: InlineEdit/InlineEdit.stories.tsx#SelectEditor
|
|
71
|
+
|
|
72
|
+
### MultiSelectEditor
|
|
73
|
+
|
|
74
|
+
The same editor with `multiple`, for a value that is genuinely a list rather than one choice.
|
|
75
|
+
|
|
76
|
+
Source: InlineEdit/InlineEdit.stories.tsx#MultiSelectEditor
|
|
77
|
+
|
|
78
|
+
### TagsEditor
|
|
79
|
+
|
|
80
|
+
A multi-select whose committed value reads as `Tag` chips, which suits a list the reader
|
|
81
|
+
scans rather than one they read as a sentence.
|
|
82
|
+
|
|
83
|
+
Source: InlineEdit/InlineEdit.stories.tsx#TagsEditor
|
|
84
|
+
|
|
85
|
+
### DateEditor
|
|
86
|
+
|
|
87
|
+
`InlineEditDate` hosts a `Calendar`, so the editor is a popover rather than a field — the row
|
|
88
|
+
stays the same height while it is open.
|
|
89
|
+
|
|
90
|
+
Source: InlineEdit/InlineEdit.stories.tsx#DateEditor
|
|
91
|
+
|
|
92
|
+
### TimeEditor
|
|
93
|
+
|
|
94
|
+
`InlineEditTime` for a time of day, taking the same value objects as `TimeInput`.
|
|
95
|
+
|
|
96
|
+
Source: InlineEdit/InlineEdit.stories.tsx#TimeEditor
|
|
97
|
+
|
|
98
|
+
### DateTimeEditor
|
|
99
|
+
|
|
100
|
+
Date and time in one editor, for a value where the pair only makes sense together.
|
|
101
|
+
|
|
102
|
+
Source: InlineEdit/InlineEdit.stories.tsx#DateTimeEditor
|
|
103
|
+
|
|
104
|
+
### HorizontalLayout
|
|
105
|
+
|
|
106
|
+
`InlineEdit` inside a horizontal `Attribute` — label on the left, value/editor on the right.
|
|
107
|
+
The orientation belongs to `Attribute`, not here: `InlineEdit` has no orientation prop and
|
|
108
|
+
behaves identically either way.
|
|
109
|
+
|
|
110
|
+
Source: InlineEdit/InlineEdit.stories.tsx#HorizontalLayout
|
|
111
|
+
|
|
112
|
+
### States
|
|
113
|
+
|
|
114
|
+
The three async states side by side. `saved` is transient and clears itself after
|
|
115
|
+
`savedDuration`, so it is pinned here to be looked at.
|
|
116
|
+
|
|
117
|
+
Source: InlineEdit/InlineEdit.stories.tsx#States
|
|
118
|
+
|
|
119
|
+
### Async
|
|
120
|
+
|
|
121
|
+
A commit that returns a promise. The field stays in edit mode until it resolves, and a
|
|
122
|
+
rejection keeps the reader's text rather than discarding it.
|
|
123
|
+
|
|
124
|
+
Source: InlineEdit/InlineEdit.stories.tsx#Async
|
|
125
|
+
|
|
126
|
+
### NonEditable
|
|
127
|
+
|
|
128
|
+
`readOnly` and `disabled` are different answers: read-only shows the value plainly with no
|
|
129
|
+
affordance, disabled says there is a control here that you cannot use.
|
|
130
|
+
|
|
131
|
+
Source: InlineEdit/InlineEdit.stories.tsx#NonEditable
|
|
132
|
+
|
|
133
|
+
### ConfirmCommit
|
|
134
|
+
|
|
135
|
+
`onBeforeValueCommit` intercepts the commit — return `false`, or a promise of it, to hold
|
|
136
|
+
the field open. Use it where the change is consequential enough to confirm, not for validation,
|
|
137
|
+
and short-circuit unchanged values: the guard fires on every commit path, no-op submits included.
|
|
138
|
+
|
|
139
|
+
Source: InlineEdit/InlineEdit.stories.tsx#ConfirmCommit
|
|
140
|
+
|
|
141
|
+
## Story sources
|
|
142
|
+
|
|
143
|
+
### InlineEdit/InlineEdit.stories.tsx
|
|
144
|
+
|
|
145
|
+
```tsx
|
|
146
|
+
import { useRef, useState } from 'react';
|
|
147
|
+
import type { TimeValue } from '@react-aria/datepicker';
|
|
148
|
+
import { format } from 'date-fns';
|
|
149
|
+
import type { Meta, StoryFn } from 'storybook-react-rsbuild';
|
|
150
|
+
import { Calendar, ChevronDown, Clock } from '../../icons';
|
|
151
|
+
import type { DateValue } from '../../index';
|
|
152
|
+
import { CalendarDate, CalendarDateTime, Time } from '../../index';
|
|
153
|
+
import { useTestId } from '../../utils/testId';
|
|
154
|
+
import { Attribute, AttributeLabel, AttributeValue } from '../Attribute';
|
|
155
|
+
import { Button } from '../Button';
|
|
156
|
+
import {
|
|
157
|
+
CalendarBody,
|
|
158
|
+
CalendarContent,
|
|
159
|
+
CalendarGrids,
|
|
160
|
+
CalendarInputHeader,
|
|
161
|
+
CalendarTrigger,
|
|
162
|
+
} from '../Calendar';
|
|
163
|
+
import { DateFormatProvider } from '../DateFormatProvider';
|
|
164
|
+
import { DateInput } from '../DateInput';
|
|
165
|
+
import {
|
|
166
|
+
Dialog,
|
|
167
|
+
DialogBody,
|
|
168
|
+
DialogContent,
|
|
169
|
+
DialogFooter,
|
|
170
|
+
DialogFooterControls,
|
|
171
|
+
DialogHeader,
|
|
172
|
+
DialogTitle,
|
|
173
|
+
} from '../Dialog';
|
|
174
|
+
import { OverflowList } from '../OverflowList';
|
|
175
|
+
import {
|
|
176
|
+
SelectButton,
|
|
177
|
+
SelectContent,
|
|
178
|
+
type SelectDataItem,
|
|
179
|
+
SelectInput,
|
|
180
|
+
SelectOption,
|
|
181
|
+
SelectOptionIndicator,
|
|
182
|
+
SelectOptionText,
|
|
183
|
+
SelectPositioner,
|
|
184
|
+
} from '../Select';
|
|
185
|
+
import { Tag } from '../Tag';
|
|
186
|
+
import { Text } from '../Text';
|
|
187
|
+
import { toCalendarDateValue, toReactAriaDateValue, withMinuteGranularity } from './dateValueCast';
|
|
188
|
+
import { InlineEdit } from './InlineEdit';
|
|
189
|
+
import { useInlineEdit } from './InlineEditContext';
|
|
190
|
+
import { InlineEditControl } from './InlineEditControl';
|
|
191
|
+
import { InlineEditDate } from './InlineEditDate';
|
|
192
|
+
import { InlineEditDateTime } from './InlineEditDateTime';
|
|
193
|
+
import { InlineEditError } from './InlineEditError';
|
|
194
|
+
import { InlineEditInput } from './InlineEditInput';
|
|
195
|
+
import { InlineEditNumber } from './InlineEditNumber';
|
|
196
|
+
import { InlineEditPreview } from './InlineEditPreview';
|
|
197
|
+
import { InlineEditPreviewIcon } from './InlineEditPreviewIcon';
|
|
198
|
+
import { InlineEditPreviewValue } from './InlineEditPreviewValue';
|
|
199
|
+
import { InlineEditSelect } from './InlineEditSelect';
|
|
200
|
+
import { InlineEditTextarea } from './InlineEditTextarea';
|
|
201
|
+
import { InlineEditTime } from './InlineEditTime';
|
|
202
|
+
|
|
203
|
+
const DESCRIPTION = [
|
|
204
|
+
'Turns a displayed value into its own editor, so a reader can correct one field without opening a form — reach for a form when several values change together.',
|
|
205
|
+
'Every story composes it inside an `Attribute`, because that is what keeps the read and edit states the same height and stops the row jumping on toggle.',
|
|
206
|
+
].join(' ');
|
|
207
|
+
|
|
208
|
+
const meta = {
|
|
209
|
+
title: 'Inputs/InlineEdit',
|
|
210
|
+
component: InlineEdit,
|
|
211
|
+
subcomponents: {
|
|
212
|
+
InlineEditPreview,
|
|
213
|
+
InlineEditPreviewValue,
|
|
214
|
+
InlineEditPreviewIcon,
|
|
215
|
+
InlineEditControl,
|
|
216
|
+
InlineEditError,
|
|
217
|
+
InlineEditInput,
|
|
218
|
+
InlineEditNumber,
|
|
219
|
+
InlineEditTextarea,
|
|
220
|
+
InlineEditSelect,
|
|
221
|
+
InlineEditDate,
|
|
222
|
+
InlineEditDateTime,
|
|
223
|
+
InlineEditTime,
|
|
224
|
+
},
|
|
225
|
+
parameters: {
|
|
226
|
+
layout: 'centered',
|
|
227
|
+
docs: {
|
|
228
|
+
description: {
|
|
229
|
+
component: DESCRIPTION,
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
argTypes: {
|
|
234
|
+
status: {
|
|
235
|
+
control: 'select',
|
|
236
|
+
options: ['idle', 'loading', 'saved', 'error'],
|
|
237
|
+
description: 'Async-feedback status. Uncontrolled stories drive this internally.',
|
|
238
|
+
},
|
|
239
|
+
activationMode: {
|
|
240
|
+
control: 'select',
|
|
241
|
+
options: ['click', 'focus', 'none'],
|
|
242
|
+
description: 'How the preview enters edit mode.',
|
|
243
|
+
},
|
|
244
|
+
submitMode: {
|
|
245
|
+
control: 'select',
|
|
246
|
+
options: ['enter', 'blur', 'both', 'none'],
|
|
247
|
+
description: 'Which interactions commit the draft.',
|
|
248
|
+
},
|
|
249
|
+
disabled: {
|
|
250
|
+
control: 'boolean',
|
|
251
|
+
},
|
|
252
|
+
readOnly: {
|
|
253
|
+
control: 'boolean',
|
|
254
|
+
},
|
|
255
|
+
defaultEdit: {
|
|
256
|
+
control: 'boolean',
|
|
257
|
+
},
|
|
258
|
+
selectOnFocus: {
|
|
259
|
+
control: 'boolean',
|
|
260
|
+
},
|
|
261
|
+
savedDuration: {
|
|
262
|
+
control: 'number',
|
|
263
|
+
description: 'Milliseconds the `saved` status is shown before reverting to `idle`.',
|
|
264
|
+
},
|
|
265
|
+
value: { table: { disable: true } },
|
|
266
|
+
defaultValue: { table: { disable: true } },
|
|
267
|
+
onValueChange: { table: { disable: true } },
|
|
268
|
+
onValueCommit: { table: { disable: true } },
|
|
269
|
+
onValueRevert: { table: { disable: true } },
|
|
270
|
+
onBeforeValueCommit: { table: { disable: true } },
|
|
271
|
+
edit: { table: { disable: true } },
|
|
272
|
+
onEditChange: { table: { disable: true } },
|
|
273
|
+
children: { table: { disable: true } },
|
|
274
|
+
className: { table: { disable: true } },
|
|
275
|
+
ref: { table: { disable: true } },
|
|
276
|
+
},
|
|
277
|
+
} satisfies Meta<typeof InlineEdit>;
|
|
278
|
+
|
|
279
|
+
export default meta;
|
|
280
|
+
|
|
281
|
+
const roleItems: SelectDataItem[] = [
|
|
282
|
+
{ label: 'Admin', value: 'admin' },
|
|
283
|
+
{ label: 'Editor', value: 'editor' },
|
|
284
|
+
{ label: 'Viewer', value: 'viewer' },
|
|
285
|
+
{ label: 'Auditor', value: 'auditor' },
|
|
286
|
+
];
|
|
287
|
+
|
|
288
|
+
const tagItems: SelectDataItem[] = [
|
|
289
|
+
{ label: 'production', value: 'production' },
|
|
290
|
+
{ label: 'us-east-1', value: 'us-east-1' },
|
|
291
|
+
{ label: 'critical', value: 'critical' },
|
|
292
|
+
{ label: 'tier-1', value: 'tier-1' },
|
|
293
|
+
{ label: 'public', value: 'public' },
|
|
294
|
+
{ label: 'monitored', value: 'monitored' },
|
|
295
|
+
];
|
|
296
|
+
|
|
297
|
+
function renderSelectOptions(items: SelectDataItem[]) {
|
|
298
|
+
return items.map(item => (
|
|
299
|
+
<SelectOption key={item.value} item={item}>
|
|
300
|
+
<SelectOptionText>{item.label}</SelectOptionText>
|
|
301
|
+
<SelectOptionIndicator />
|
|
302
|
+
</SelectOption>
|
|
303
|
+
));
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
// SelectInput does not self-cascade its testid (unlike SelectButton) — derive
|
|
307
|
+
// it explicitly. Must be its own component: useTestId only resolves from a
|
|
308
|
+
// descendant of <InlineEdit>, not from the story function that renders it.
|
|
309
|
+
function SelectInputTrigger() {
|
|
310
|
+
const testId = useTestId('input');
|
|
311
|
+
return <SelectInput data-testid={testId} size='inline-edit' />;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
// SelectButton naturally cascades to the `button` slot, but this specific
|
|
315
|
+
// consumer (ConfirmCommit's Role row) needs to preserve the pre-existing
|
|
316
|
+
// `input` slot name that InlineEdit.e2e.ts depends on — same reasoning as
|
|
317
|
+
// SelectInputTrigger above, just for the single-select trigger.
|
|
318
|
+
function SelectButtonTrigger() {
|
|
319
|
+
const testId = useTestId('input');
|
|
320
|
+
return <SelectButton data-testid={testId} size='inline-edit' />;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
// `Calendar` never re-provides its own testid cascade, so this resolves
|
|
324
|
+
// straight from the ambient InlineEdit root — same reasoning as
|
|
325
|
+
// SelectInputTrigger above, just without needing a bridge.
|
|
326
|
+
function DateInputTrigger({ granularity }: { granularity: 'day' | 'minute' }) {
|
|
327
|
+
const testId = useTestId('input');
|
|
328
|
+
const { value, setValue } = useInlineEdit<DateValue | null>();
|
|
329
|
+
const resolvedValue =
|
|
330
|
+
granularity === 'minute' ? withMinuteGranularity(value ?? null) : (value ?? null);
|
|
331
|
+
return (
|
|
332
|
+
<DateInput
|
|
333
|
+
data-testid={testId}
|
|
334
|
+
value={toReactAriaDateValue(resolvedValue)}
|
|
335
|
+
onChange={v => setValue(toCalendarDateValue(v))}
|
|
336
|
+
granularity={granularity}
|
|
337
|
+
size='inline-edit'
|
|
338
|
+
showIcon={false}
|
|
339
|
+
/>
|
|
340
|
+
);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/** The default editor. Clicking the value swaps in an input of the same size, which is why the
|
|
344
|
+
* row does not move. */
|
|
345
|
+
export const TextEditor: StoryFn<typeof meta> = args => {
|
|
346
|
+
const [text, setText] = useState('Checkout API');
|
|
347
|
+
return (
|
|
348
|
+
<div className='w-[320px]'>
|
|
349
|
+
<Attribute>
|
|
350
|
+
<AttributeLabel>Name</AttributeLabel>
|
|
351
|
+
<AttributeValue>
|
|
352
|
+
<InlineEdit
|
|
353
|
+
{...args}
|
|
354
|
+
value={text}
|
|
355
|
+
onValueCommit={v => setText(v as string)}
|
|
356
|
+
data-testid='text'
|
|
357
|
+
>
|
|
358
|
+
<InlineEditPreview data-analytics-id='inline-edit-name'>{text}</InlineEditPreview>
|
|
359
|
+
<InlineEditControl>
|
|
360
|
+
<InlineEditInput data-analytics-id='inline-edit-name-input' aria-label='Name' />
|
|
361
|
+
</InlineEditControl>
|
|
362
|
+
<InlineEditError />
|
|
363
|
+
</InlineEdit>
|
|
364
|
+
</AttributeValue>
|
|
365
|
+
</Attribute>
|
|
366
|
+
</div>
|
|
367
|
+
);
|
|
368
|
+
};
|
|
369
|
+
|
|
370
|
+
/** `InlineEditNumber` for a numeric field, with the steppers available while editing and gone
|
|
371
|
+
* again once committed. */
|
|
372
|
+
export const NumberEditor: StoryFn<typeof meta> = args => {
|
|
373
|
+
const [port, setPort] = useState('8443');
|
|
374
|
+
return (
|
|
375
|
+
<div className='w-[320px]'>
|
|
376
|
+
<Attribute>
|
|
377
|
+
<AttributeLabel>Port</AttributeLabel>
|
|
378
|
+
<AttributeValue>
|
|
379
|
+
<InlineEdit
|
|
380
|
+
{...args}
|
|
381
|
+
value={port}
|
|
382
|
+
onValueCommit={v => setPort(v as string)}
|
|
383
|
+
data-testid='number'
|
|
384
|
+
>
|
|
385
|
+
<InlineEditPreview>{port}</InlineEditPreview>
|
|
386
|
+
<InlineEditControl>
|
|
387
|
+
<InlineEditNumber />
|
|
388
|
+
</InlineEditControl>
|
|
389
|
+
</InlineEdit>
|
|
390
|
+
</AttributeValue>
|
|
391
|
+
</Attribute>
|
|
392
|
+
</div>
|
|
393
|
+
);
|
|
394
|
+
};
|
|
395
|
+
|
|
396
|
+
/** For a value long enough to wrap. `lineClamp` on the preview keeps the row short in read mode
|
|
397
|
+
* and lets the editor grow past it. */
|
|
398
|
+
export const TextareaEditor: StoryFn<typeof meta> = args => {
|
|
399
|
+
const [about, setAbout] = useState(
|
|
400
|
+
'Displays a labeled value for a single object attribute. Used in detail panels, drawers and forms to present structured information.',
|
|
401
|
+
);
|
|
402
|
+
return (
|
|
403
|
+
<div className='w-[320px]'>
|
|
404
|
+
<Attribute>
|
|
405
|
+
<AttributeLabel>About</AttributeLabel>
|
|
406
|
+
<AttributeValue>
|
|
407
|
+
<InlineEdit
|
|
408
|
+
{...args}
|
|
409
|
+
value={about}
|
|
410
|
+
onValueCommit={v => setAbout(v as string)}
|
|
411
|
+
data-testid='textarea'
|
|
412
|
+
>
|
|
413
|
+
<InlineEditPreview lineClamp={3}>{about}</InlineEditPreview>
|
|
414
|
+
<InlineEditControl>
|
|
415
|
+
<InlineEditTextarea minRows={2} maxRows={6} />
|
|
416
|
+
</InlineEditControl>
|
|
417
|
+
<InlineEditError />
|
|
418
|
+
</InlineEdit>
|
|
419
|
+
</AttributeValue>
|
|
420
|
+
</Attribute>
|
|
421
|
+
</div>
|
|
422
|
+
);
|
|
423
|
+
};
|
|
424
|
+
|
|
425
|
+
/** `InlineEditSelect` for a value from a known set. Its children are ordinary `Select` parts, so
|
|
426
|
+
* the menu behaves exactly as it would standalone. */
|
|
427
|
+
export const SelectEditor: StoryFn<typeof meta> = args => {
|
|
428
|
+
const [role, setRole] = useState<string[]>(['editor']);
|
|
429
|
+
const roleLabel = roleItems.find(i => i.value === (role[0] ?? ''))?.label ?? '';
|
|
430
|
+
return (
|
|
431
|
+
<div className='w-[320px]'>
|
|
432
|
+
<Attribute>
|
|
433
|
+
<AttributeLabel>Role</AttributeLabel>
|
|
434
|
+
<AttributeValue>
|
|
435
|
+
<InlineEdit
|
|
436
|
+
{...args}
|
|
437
|
+
value={role}
|
|
438
|
+
onValueCommit={v => setRole(v as string[])}
|
|
439
|
+
data-testid='select'
|
|
440
|
+
>
|
|
441
|
+
<InlineEditPreview>
|
|
442
|
+
<InlineEditPreviewValue>{roleLabel}</InlineEditPreviewValue>
|
|
443
|
+
<InlineEditPreviewIcon>
|
|
444
|
+
<ChevronDown size='md' />
|
|
445
|
+
</InlineEditPreviewIcon>
|
|
446
|
+
</InlineEditPreview>
|
|
447
|
+
<InlineEditControl>
|
|
448
|
+
<InlineEditSelect items={roleItems}>
|
|
449
|
+
<SelectButton size='inline-edit' />
|
|
450
|
+
<SelectPositioner>
|
|
451
|
+
<SelectContent>{renderSelectOptions(roleItems)}</SelectContent>
|
|
452
|
+
</SelectPositioner>
|
|
453
|
+
</InlineEditSelect>
|
|
454
|
+
</InlineEditControl>
|
|
455
|
+
</InlineEdit>
|
|
456
|
+
</AttributeValue>
|
|
457
|
+
</Attribute>
|
|
458
|
+
</div>
|
|
459
|
+
);
|
|
460
|
+
};
|
|
461
|
+
|
|
462
|
+
/** The same editor with `multiple`, for a value that is genuinely a list rather than one choice. */
|
|
463
|
+
export const MultiSelectEditor: StoryFn<typeof meta> = args => {
|
|
464
|
+
const [roles, setRoles] = useState<string[]>(['editor', 'viewer']);
|
|
465
|
+
const rolesLabel = roles.map(v => roleItems.find(i => i.value === v)?.label ?? v).join(', ');
|
|
466
|
+
return (
|
|
467
|
+
<div className='w-[320px]'>
|
|
468
|
+
<Attribute>
|
|
469
|
+
<AttributeLabel>Roles</AttributeLabel>
|
|
470
|
+
<AttributeValue>
|
|
471
|
+
<InlineEdit
|
|
472
|
+
{...args}
|
|
473
|
+
value={roles}
|
|
474
|
+
onValueCommit={v => setRoles(v as string[])}
|
|
475
|
+
data-testid='multi-select'
|
|
476
|
+
>
|
|
477
|
+
<InlineEditPreview>
|
|
478
|
+
<InlineEditPreviewValue>{rolesLabel}</InlineEditPreviewValue>
|
|
479
|
+
<InlineEditPreviewIcon>
|
|
480
|
+
<ChevronDown size='md' />
|
|
481
|
+
</InlineEditPreviewIcon>
|
|
482
|
+
</InlineEditPreview>
|
|
483
|
+
<InlineEditControl>
|
|
484
|
+
<InlineEditSelect items={roleItems} multiple>
|
|
485
|
+
<SelectButton size='inline-edit' />
|
|
486
|
+
<SelectPositioner>
|
|
487
|
+
<SelectContent>{renderSelectOptions(roleItems)}</SelectContent>
|
|
488
|
+
</SelectPositioner>
|
|
489
|
+
</InlineEditSelect>
|
|
490
|
+
</InlineEditControl>
|
|
491
|
+
</InlineEdit>
|
|
492
|
+
</AttributeValue>
|
|
493
|
+
</Attribute>
|
|
494
|
+
</div>
|
|
495
|
+
);
|
|
496
|
+
};
|
|
497
|
+
|
|
498
|
+
/** A multi-select whose committed value reads as `Tag` chips, which suits a list the reader
|
|
499
|
+
* scans rather than one they read as a sentence. */
|
|
500
|
+
export const TagsEditor: StoryFn<typeof meta> = args => {
|
|
501
|
+
const [tags, setTags] = useState<string[]>(['production', 'critical']);
|
|
502
|
+
return (
|
|
503
|
+
<div className='w-[320px]'>
|
|
504
|
+
<Attribute>
|
|
505
|
+
<AttributeLabel>Tags</AttributeLabel>
|
|
506
|
+
<AttributeValue>
|
|
507
|
+
<InlineEdit
|
|
508
|
+
{...args}
|
|
509
|
+
value={tags}
|
|
510
|
+
onValueCommit={v => setTags(v as string[])}
|
|
511
|
+
data-testid='tags'
|
|
512
|
+
>
|
|
513
|
+
<InlineEditPreview>
|
|
514
|
+
<InlineEditPreviewValue>
|
|
515
|
+
<OverflowList
|
|
516
|
+
className='gap-4'
|
|
517
|
+
items={tags}
|
|
518
|
+
itemRenderer={tag => <Tag key={tag}>{tag}</Tag>}
|
|
519
|
+
/>
|
|
520
|
+
</InlineEditPreviewValue>
|
|
521
|
+
<InlineEditPreviewIcon>
|
|
522
|
+
<ChevronDown size='md' />
|
|
523
|
+
</InlineEditPreviewIcon>
|
|
524
|
+
</InlineEditPreview>
|
|
525
|
+
<InlineEditControl>
|
|
526
|
+
<InlineEditSelect items={tagItems} multiple>
|
|
527
|
+
<SelectInputTrigger />
|
|
528
|
+
<SelectPositioner>
|
|
529
|
+
<SelectContent>{renderSelectOptions(tagItems)}</SelectContent>
|
|
530
|
+
</SelectPositioner>
|
|
531
|
+
</InlineEditSelect>
|
|
532
|
+
</InlineEditControl>
|
|
533
|
+
</InlineEdit>
|
|
534
|
+
</AttributeValue>
|
|
535
|
+
</Attribute>
|
|
536
|
+
</div>
|
|
537
|
+
);
|
|
538
|
+
};
|
|
539
|
+
|
|
540
|
+
/** `InlineEditDate` hosts a `Calendar`, so the editor is a popover rather than a field — the row
|
|
541
|
+
* stays the same height while it is open. */
|
|
542
|
+
export const DateEditor: StoryFn<typeof meta> = args => {
|
|
543
|
+
const [date, setDate] = useState<DateValue | null>(new CalendarDate(2026, 6, 15));
|
|
544
|
+
const dateLabel = date
|
|
545
|
+
? format(new Date(date.year, date.month - 1, date.day), 'd MMM, yyyy')
|
|
546
|
+
: '—';
|
|
547
|
+
return (
|
|
548
|
+
<div className='w-[320px]'>
|
|
549
|
+
<DateFormatProvider order='day-first' hourCycle={24}>
|
|
550
|
+
<Attribute>
|
|
551
|
+
<AttributeLabel>Date</AttributeLabel>
|
|
552
|
+
<AttributeValue>
|
|
553
|
+
<InlineEdit
|
|
554
|
+
{...args}
|
|
555
|
+
value={date}
|
|
556
|
+
onValueCommit={v => setDate(v as DateValue | null)}
|
|
557
|
+
data-testid='date'
|
|
558
|
+
>
|
|
559
|
+
<InlineEditPreview>
|
|
560
|
+
<InlineEditPreviewValue>{dateLabel}</InlineEditPreviewValue>
|
|
561
|
+
<InlineEditPreviewIcon>
|
|
562
|
+
<Calendar size='md' />
|
|
563
|
+
</InlineEditPreviewIcon>
|
|
564
|
+
</InlineEditPreview>
|
|
565
|
+
<InlineEditControl>
|
|
566
|
+
<InlineEditDate>
|
|
567
|
+
<CalendarTrigger>
|
|
568
|
+
<DateInputTrigger granularity='day' />
|
|
569
|
+
</CalendarTrigger>
|
|
570
|
+
<CalendarContent>
|
|
571
|
+
<CalendarBody>
|
|
572
|
+
<CalendarGrids />
|
|
573
|
+
</CalendarBody>
|
|
574
|
+
</CalendarContent>
|
|
575
|
+
</InlineEditDate>
|
|
576
|
+
</InlineEditControl>
|
|
577
|
+
</InlineEdit>
|
|
578
|
+
</AttributeValue>
|
|
579
|
+
</Attribute>
|
|
580
|
+
</DateFormatProvider>
|
|
581
|
+
</div>
|
|
582
|
+
);
|
|
583
|
+
};
|
|
584
|
+
|
|
585
|
+
/** `InlineEditTime` for a time of day, taking the same value objects as `TimeInput`. */
|
|
586
|
+
export const TimeEditor: StoryFn<typeof meta> = args => {
|
|
587
|
+
const [time, setTime] = useState<TimeValue | null>(new Time(14, 30));
|
|
588
|
+
const timeLabel = time ? format(new Date(2000, 0, 1, time.hour, time.minute), 'h:mm a') : '—';
|
|
589
|
+
return (
|
|
590
|
+
<div className='w-[320px]'>
|
|
591
|
+
<DateFormatProvider order='day-first' hourCycle={12}>
|
|
592
|
+
<Attribute>
|
|
593
|
+
<AttributeLabel>Time</AttributeLabel>
|
|
594
|
+
<AttributeValue>
|
|
595
|
+
<InlineEdit
|
|
596
|
+
{...args}
|
|
597
|
+
value={time}
|
|
598
|
+
onValueCommit={v => setTime(v as TimeValue | null)}
|
|
599
|
+
data-testid='time'
|
|
600
|
+
>
|
|
601
|
+
<InlineEditPreview>
|
|
602
|
+
<InlineEditPreviewValue>{timeLabel}</InlineEditPreviewValue>
|
|
603
|
+
<InlineEditPreviewIcon>
|
|
604
|
+
<Clock size='md' />
|
|
605
|
+
</InlineEditPreviewIcon>
|
|
606
|
+
</InlineEditPreview>
|
|
607
|
+
<InlineEditControl>
|
|
608
|
+
<InlineEditTime />
|
|
609
|
+
</InlineEditControl>
|
|
610
|
+
</InlineEdit>
|
|
611
|
+
</AttributeValue>
|
|
612
|
+
</Attribute>
|
|
613
|
+
</DateFormatProvider>
|
|
614
|
+
</div>
|
|
615
|
+
);
|
|
616
|
+
};
|
|
617
|
+
|
|
618
|
+
/** Date and time in one editor, for a value where the pair only makes sense together. */
|
|
619
|
+
export const DateTimeEditor: StoryFn<typeof meta> = args => {
|
|
620
|
+
const [dateTime, setDateTime] = useState<CalendarDateTime | null>(
|
|
621
|
+
new CalendarDateTime(2026, 6, 15, 14, 30),
|
|
622
|
+
);
|
|
623
|
+
const dateTimeLabel = dateTime
|
|
624
|
+
? format(
|
|
625
|
+
new Date(dateTime.year, dateTime.month - 1, dateTime.day, dateTime.hour, dateTime.minute),
|
|
626
|
+
'd MMM, yyyy h:mm a',
|
|
627
|
+
)
|
|
628
|
+
: '—';
|
|
629
|
+
return (
|
|
630
|
+
<div className='w-[320px]'>
|
|
631
|
+
<DateFormatProvider order='day-first' hourCycle={12}>
|
|
632
|
+
<Attribute>
|
|
633
|
+
<AttributeLabel>Date & Time</AttributeLabel>
|
|
634
|
+
<AttributeValue>
|
|
635
|
+
<InlineEdit
|
|
636
|
+
{...args}
|
|
637
|
+
value={dateTime}
|
|
638
|
+
onValueCommit={v => setDateTime(v as CalendarDateTime | null)}
|
|
639
|
+
data-testid='datetime'
|
|
640
|
+
>
|
|
641
|
+
<InlineEditPreview>
|
|
642
|
+
<InlineEditPreviewValue>{dateTimeLabel}</InlineEditPreviewValue>
|
|
643
|
+
<InlineEditPreviewIcon>
|
|
644
|
+
<Calendar size='md' />
|
|
645
|
+
</InlineEditPreviewIcon>
|
|
646
|
+
</InlineEditPreview>
|
|
647
|
+
<InlineEditControl>
|
|
648
|
+
<InlineEditDateTime>
|
|
649
|
+
<CalendarTrigger>
|
|
650
|
+
<DateInputTrigger granularity='minute' />
|
|
651
|
+
</CalendarTrigger>
|
|
652
|
+
<CalendarContent>
|
|
653
|
+
<CalendarBody>
|
|
654
|
+
<CalendarInputHeader />
|
|
655
|
+
<CalendarGrids />
|
|
656
|
+
</CalendarBody>
|
|
657
|
+
</CalendarContent>
|
|
658
|
+
</InlineEditDateTime>
|
|
659
|
+
</InlineEditControl>
|
|
660
|
+
</InlineEdit>
|
|
661
|
+
</AttributeValue>
|
|
662
|
+
</Attribute>
|
|
663
|
+
</DateFormatProvider>
|
|
664
|
+
</div>
|
|
665
|
+
);
|
|
666
|
+
};
|
|
667
|
+
|
|
668
|
+
/**
|
|
669
|
+
* `InlineEdit` inside a horizontal `Attribute` — label on the left, value/editor on the right.
|
|
670
|
+
* The orientation belongs to `Attribute`, not here: `InlineEdit` has no orientation prop and
|
|
671
|
+
* behaves identically either way.
|
|
672
|
+
*/
|
|
673
|
+
export const HorizontalLayout: StoryFn<typeof meta> = args => {
|
|
674
|
+
const [name, setName] = useState('Checkout API');
|
|
675
|
+
const [role, setRole] = useState<string[]>(['editor']);
|
|
676
|
+
const roleLabel = roleItems.find(i => i.value === (role[0] ?? ''))?.label ?? '';
|
|
677
|
+
return (
|
|
678
|
+
<div className='flex w-[420px] flex-col gap-8'>
|
|
679
|
+
<Attribute orientation='horizontal'>
|
|
680
|
+
<AttributeLabel>Name</AttributeLabel>
|
|
681
|
+
<AttributeValue>
|
|
682
|
+
<InlineEdit
|
|
683
|
+
{...args}
|
|
684
|
+
value={name}
|
|
685
|
+
onValueCommit={v => setName(v as string)}
|
|
686
|
+
data-testid='horizontal-text'
|
|
687
|
+
>
|
|
688
|
+
<InlineEditPreview>{name}</InlineEditPreview>
|
|
689
|
+
<InlineEditControl>
|
|
690
|
+
<InlineEditInput aria-label='Name' />
|
|
691
|
+
</InlineEditControl>
|
|
692
|
+
<InlineEditError />
|
|
693
|
+
</InlineEdit>
|
|
694
|
+
</AttributeValue>
|
|
695
|
+
</Attribute>
|
|
696
|
+
|
|
697
|
+
<Attribute orientation='horizontal'>
|
|
698
|
+
<AttributeLabel>Role</AttributeLabel>
|
|
699
|
+
<AttributeValue>
|
|
700
|
+
<InlineEdit
|
|
701
|
+
{...args}
|
|
702
|
+
value={role}
|
|
703
|
+
onValueCommit={v => setRole(v as string[])}
|
|
704
|
+
data-testid='horizontal-select'
|
|
705
|
+
>
|
|
706
|
+
<InlineEditPreview>
|
|
707
|
+
<InlineEditPreviewValue>{roleLabel}</InlineEditPreviewValue>
|
|
708
|
+
<InlineEditPreviewIcon>
|
|
709
|
+
<ChevronDown size='md' />
|
|
710
|
+
</InlineEditPreviewIcon>
|
|
711
|
+
</InlineEditPreview>
|
|
712
|
+
<InlineEditControl>
|
|
713
|
+
<InlineEditSelect items={roleItems}>
|
|
714
|
+
<SelectButton size='inline-edit' />
|
|
715
|
+
<SelectPositioner>
|
|
716
|
+
<SelectContent>{renderSelectOptions(roleItems)}</SelectContent>
|
|
717
|
+
</SelectPositioner>
|
|
718
|
+
</InlineEditSelect>
|
|
719
|
+
</InlineEditControl>
|
|
720
|
+
</InlineEdit>
|
|
721
|
+
</AttributeValue>
|
|
722
|
+
</Attribute>
|
|
723
|
+
</div>
|
|
724
|
+
);
|
|
725
|
+
};
|
|
726
|
+
|
|
727
|
+
/** The three async states side by side. `saved` is transient and clears itself after
|
|
728
|
+
* `savedDuration`, so it is pinned here to be looked at. */
|
|
729
|
+
export const States: StoryFn<typeof meta> = args => (
|
|
730
|
+
<div className='flex w-[420px] flex-col gap-12'>
|
|
731
|
+
<Attribute>
|
|
732
|
+
<AttributeLabel>Name</AttributeLabel>
|
|
733
|
+
<AttributeValue>
|
|
734
|
+
<InlineEdit
|
|
735
|
+
{...args}
|
|
736
|
+
defaultValue='Checkout API and ABC'
|
|
737
|
+
status='loading'
|
|
738
|
+
data-testid='loading'
|
|
739
|
+
>
|
|
740
|
+
<InlineEditPreview>Checkout API and ABC</InlineEditPreview>
|
|
741
|
+
<InlineEditControl>
|
|
742
|
+
<InlineEditInput />
|
|
743
|
+
</InlineEditControl>
|
|
744
|
+
</InlineEdit>
|
|
745
|
+
</AttributeValue>
|
|
746
|
+
</Attribute>
|
|
747
|
+
|
|
748
|
+
<Attribute>
|
|
749
|
+
<AttributeLabel>Name</AttributeLabel>
|
|
750
|
+
<AttributeValue>
|
|
751
|
+
<InlineEdit
|
|
752
|
+
{...args}
|
|
753
|
+
defaultValue='Checkout API and ABC'
|
|
754
|
+
status='saved'
|
|
755
|
+
data-testid='saved'
|
|
756
|
+
>
|
|
757
|
+
<InlineEditPreview>Checkout API and ABC</InlineEditPreview>
|
|
758
|
+
<InlineEditControl>
|
|
759
|
+
<InlineEditInput />
|
|
760
|
+
</InlineEditControl>
|
|
761
|
+
</InlineEdit>
|
|
762
|
+
</AttributeValue>
|
|
763
|
+
</Attribute>
|
|
764
|
+
|
|
765
|
+
<Attribute>
|
|
766
|
+
<AttributeLabel>Name</AttributeLabel>
|
|
767
|
+
<AttributeValue>
|
|
768
|
+
<InlineEdit
|
|
769
|
+
{...args}
|
|
770
|
+
defaultValue='Checkout API and ABC'
|
|
771
|
+
defaultEdit
|
|
772
|
+
status='error'
|
|
773
|
+
data-testid='error'
|
|
774
|
+
>
|
|
775
|
+
<InlineEditPreview>Checkout API and ABC</InlineEditPreview>
|
|
776
|
+
<InlineEditControl>
|
|
777
|
+
<InlineEditInput />
|
|
778
|
+
</InlineEditControl>
|
|
779
|
+
<InlineEditError>An error message.</InlineEditError>
|
|
780
|
+
</InlineEdit>
|
|
781
|
+
</AttributeValue>
|
|
782
|
+
</Attribute>
|
|
783
|
+
</div>
|
|
784
|
+
);
|
|
785
|
+
|
|
786
|
+
/**
|
|
787
|
+
* A commit that returns a promise. The field stays in edit mode until it resolves, and a
|
|
788
|
+
* rejection keeps the reader's text rather than discarding it.
|
|
789
|
+
*/
|
|
790
|
+
export const Async: StoryFn<typeof meta> = args => {
|
|
791
|
+
const [value, setValue] = useState('Checkout API');
|
|
792
|
+
const save = (v: unknown) =>
|
|
793
|
+
new Promise<void>((resolve, reject) => {
|
|
794
|
+
setTimeout(() => {
|
|
795
|
+
if ((v as string).trim().length === 0) reject(new Error('Name is required.'));
|
|
796
|
+
else {
|
|
797
|
+
setValue(v as string);
|
|
798
|
+
resolve();
|
|
799
|
+
}
|
|
800
|
+
}, 1200);
|
|
801
|
+
});
|
|
802
|
+
return (
|
|
803
|
+
<div className='w-[320px]'>
|
|
804
|
+
<Attribute>
|
|
805
|
+
<AttributeLabel>Name</AttributeLabel>
|
|
806
|
+
<AttributeValue>
|
|
807
|
+
<InlineEdit {...args} value={value} onValueCommit={save} data-testid='attr'>
|
|
808
|
+
<InlineEditPreview>{value}</InlineEditPreview>
|
|
809
|
+
<InlineEditControl>
|
|
810
|
+
<InlineEditInput />
|
|
811
|
+
</InlineEditControl>
|
|
812
|
+
<InlineEditError />
|
|
813
|
+
</InlineEdit>
|
|
814
|
+
</AttributeValue>
|
|
815
|
+
</Attribute>
|
|
816
|
+
</div>
|
|
817
|
+
);
|
|
818
|
+
};
|
|
819
|
+
|
|
820
|
+
/**
|
|
821
|
+
* `readOnly` and `disabled` are different answers: read-only shows the value plainly with no
|
|
822
|
+
* affordance, disabled says there is a control here that you cannot use.
|
|
823
|
+
*/
|
|
824
|
+
export const NonEditable: StoryFn<typeof meta> = args => (
|
|
825
|
+
<div className='flex w-[320px] flex-col gap-8'>
|
|
826
|
+
<Attribute>
|
|
827
|
+
<AttributeLabel>Read only</AttributeLabel>
|
|
828
|
+
<AttributeValue>
|
|
829
|
+
<InlineEdit {...args} defaultValue='Locked value' readOnly data-testid='readonly'>
|
|
830
|
+
<InlineEditPreview>Locked value</InlineEditPreview>
|
|
831
|
+
<InlineEditControl>
|
|
832
|
+
<InlineEditInput />
|
|
833
|
+
</InlineEditControl>
|
|
834
|
+
</InlineEdit>
|
|
835
|
+
</AttributeValue>
|
|
836
|
+
</Attribute>
|
|
837
|
+
<Attribute>
|
|
838
|
+
<AttributeLabel>Disabled</AttributeLabel>
|
|
839
|
+
<AttributeValue>
|
|
840
|
+
<InlineEdit {...args} defaultValue='Disabled value' disabled data-testid='disabled'>
|
|
841
|
+
<InlineEditPreview>Disabled value</InlineEditPreview>
|
|
842
|
+
<InlineEditControl>
|
|
843
|
+
<InlineEditInput />
|
|
844
|
+
</InlineEditControl>
|
|
845
|
+
</InlineEdit>
|
|
846
|
+
</AttributeValue>
|
|
847
|
+
</Attribute>
|
|
848
|
+
</div>
|
|
849
|
+
);
|
|
850
|
+
|
|
851
|
+
/**
|
|
852
|
+
* `onBeforeValueCommit` intercepts the commit — return `false`, or a promise of it, to hold
|
|
853
|
+
* the field open. Use it where the change is consequential enough to confirm, not for validation,
|
|
854
|
+
* and short-circuit unchanged values: the guard fires on every commit path, no-op submits included.
|
|
855
|
+
*/
|
|
856
|
+
export const ConfirmCommit: StoryFn<typeof meta> = args => {
|
|
857
|
+
const [email, setEmail] = useState('dev@wallarm.com');
|
|
858
|
+
const [role, setRole] = useState<string[]>(['editor']);
|
|
859
|
+
const [pending, setPending] = useState<string | null>(null);
|
|
860
|
+
const resolverRef = useRef<((ok: boolean) => void) | null>(null);
|
|
861
|
+
|
|
862
|
+
// Promise-based confirm: the guard returns this promise and the dialog
|
|
863
|
+
// buttons settle it. The DS never closes the dialog — `settle` does.
|
|
864
|
+
const confirmChange = (message: string) =>
|
|
865
|
+
new Promise<boolean>(resolve => {
|
|
866
|
+
resolverRef.current = resolve;
|
|
867
|
+
setPending(message);
|
|
868
|
+
});
|
|
869
|
+
|
|
870
|
+
const settle = (ok: boolean) => {
|
|
871
|
+
resolverRef.current?.(ok);
|
|
872
|
+
resolverRef.current = null;
|
|
873
|
+
setPending(null);
|
|
874
|
+
};
|
|
875
|
+
|
|
876
|
+
const roleLabel = roleItems.find(i => i.value === (role[0] ?? ''))?.label ?? '';
|
|
877
|
+
|
|
878
|
+
return (
|
|
879
|
+
<div className='flex w-[320px] flex-col gap-8'>
|
|
880
|
+
<Attribute>
|
|
881
|
+
<AttributeLabel>Email</AttributeLabel>
|
|
882
|
+
<AttributeValue>
|
|
883
|
+
<InlineEdit
|
|
884
|
+
{...args}
|
|
885
|
+
value={email}
|
|
886
|
+
onBeforeValueCommit={(next, prev) =>
|
|
887
|
+
next === prev || confirmChange(`Change email to ${next as string}?`)
|
|
888
|
+
}
|
|
889
|
+
onValueCommit={v => setEmail(v as string)}
|
|
890
|
+
data-testid='confirm-email'
|
|
891
|
+
>
|
|
892
|
+
<InlineEditPreview>{email}</InlineEditPreview>
|
|
893
|
+
<InlineEditControl>
|
|
894
|
+
<InlineEditInput type='email' aria-label='Email' />
|
|
895
|
+
</InlineEditControl>
|
|
896
|
+
</InlineEdit>
|
|
897
|
+
</AttributeValue>
|
|
898
|
+
</Attribute>
|
|
899
|
+
|
|
900
|
+
<Attribute>
|
|
901
|
+
<AttributeLabel>Role</AttributeLabel>
|
|
902
|
+
<AttributeValue>
|
|
903
|
+
<InlineEdit
|
|
904
|
+
{...args}
|
|
905
|
+
value={role}
|
|
906
|
+
onBeforeValueCommit={(next, prev) => {
|
|
907
|
+
// The guard fires on every popover close, including no-op ones —
|
|
908
|
+
// short-circuit when nothing changed (for dates use `.compare()`).
|
|
909
|
+
const nextRole = (next as string[]).join();
|
|
910
|
+
if (nextRole === (prev as string[]).join()) return true;
|
|
911
|
+
const label =
|
|
912
|
+
roleItems.find(i => i.value === (next as string[])[0])?.label ?? nextRole;
|
|
913
|
+
return confirmChange(`Change role to ${label}?`);
|
|
914
|
+
}}
|
|
915
|
+
onValueCommit={v => setRole(v as string[])}
|
|
916
|
+
data-testid='confirm-role'
|
|
917
|
+
>
|
|
918
|
+
<InlineEditPreview>
|
|
919
|
+
<InlineEditPreviewValue>{roleLabel}</InlineEditPreviewValue>
|
|
920
|
+
<InlineEditPreviewIcon>
|
|
921
|
+
<ChevronDown size='md' />
|
|
922
|
+
</InlineEditPreviewIcon>
|
|
923
|
+
</InlineEditPreview>
|
|
924
|
+
<InlineEditControl>
|
|
925
|
+
<InlineEditSelect items={roleItems}>
|
|
926
|
+
<SelectButtonTrigger />
|
|
927
|
+
<SelectPositioner>
|
|
928
|
+
<SelectContent>{renderSelectOptions(roleItems)}</SelectContent>
|
|
929
|
+
</SelectPositioner>
|
|
930
|
+
</InlineEditSelect>
|
|
931
|
+
</InlineEditControl>
|
|
932
|
+
</InlineEdit>
|
|
933
|
+
</AttributeValue>
|
|
934
|
+
</Attribute>
|
|
935
|
+
|
|
936
|
+
<Dialog
|
|
937
|
+
open={pending !== null}
|
|
938
|
+
onOpenChange={open => {
|
|
939
|
+
if (!open) settle(false);
|
|
940
|
+
}}
|
|
941
|
+
data-testid='confirm-dialog'
|
|
942
|
+
>
|
|
943
|
+
<DialogContent>
|
|
944
|
+
<DialogHeader>
|
|
945
|
+
<DialogTitle>Confirm change</DialogTitle>
|
|
946
|
+
</DialogHeader>
|
|
947
|
+
<DialogBody>
|
|
948
|
+
<Text>{pending}</Text>
|
|
949
|
+
</DialogBody>
|
|
950
|
+
<DialogFooter>
|
|
951
|
+
<DialogFooterControls>
|
|
952
|
+
<Button
|
|
953
|
+
variant='ghost'
|
|
954
|
+
color='neutral'
|
|
955
|
+
size='large'
|
|
956
|
+
onClick={() => settle(false)}
|
|
957
|
+
data-testid='confirm-decline'
|
|
958
|
+
>
|
|
959
|
+
Cancel
|
|
960
|
+
</Button>
|
|
961
|
+
<Button
|
|
962
|
+
variant='primary'
|
|
963
|
+
color='brand'
|
|
964
|
+
size='large'
|
|
965
|
+
onClick={() => settle(true)}
|
|
966
|
+
data-testid='confirm-accept'
|
|
967
|
+
>
|
|
968
|
+
Change
|
|
969
|
+
</Button>
|
|
970
|
+
</DialogFooterControls>
|
|
971
|
+
</DialogFooter>
|
|
972
|
+
</DialogContent>
|
|
973
|
+
</Dialog>
|
|
974
|
+
</div>
|
|
975
|
+
);
|
|
976
|
+
};
|
|
977
|
+
```
|