@nordmanai/nif 0.2.2 → 0.2.4
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 +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.js +31353 -11545
- package/dist/styles.css +1 -1
- package/dist/ui/components/nm-ai/nm-ai.d.ts +4 -0
- package/dist/ui/components/nm-alert/nm-alert.d.ts +13 -0
- package/dist/ui/components/nm-button/nm-button.d.ts +4 -2
- package/dist/ui/components/nm-checkbox/nm-checkbox.d.ts +1 -1
- package/dist/ui/components/nm-chip/nm-chip.d.ts +5 -2
- package/dist/ui/components/nm-collapsible/nm-collapsible.d.ts +6 -0
- package/dist/ui/components/nm-combobox/nm-combobox.d.ts +1 -1
- package/dist/ui/components/nm-command/nm-command.d.ts +8 -1
- package/dist/ui/components/nm-composer/nm-composer.d.ts +47 -4
- package/dist/ui/components/nm-context-menu/nm-context-menu.d.ts +1 -1
- package/dist/ui/components/nm-dialog/nm-dialog.d.ts +1 -1
- package/dist/ui/components/nm-dropdown/nm-dropdown.d.ts +1 -1
- package/dist/ui/components/nm-dropdown-menu/nm-dropdown-menu.d.ts +11 -2
- package/dist/ui/components/nm-field/nm-field.d.ts +2 -0
- package/dist/ui/components/nm-hover-card/nm-hover-card.d.ts +1 -1
- package/dist/ui/components/nm-icon/animated/activity.d.ts +72 -0
- package/dist/ui/components/nm-icon/animated/archive.d.ts +31 -0
- package/dist/ui/components/nm-icon/animated/arrow-down.d.ts +128 -0
- package/dist/ui/components/nm-icon/animated/arrow-left.d.ts +128 -0
- package/dist/ui/components/nm-icon/animated/arrow-right.d.ts +128 -0
- package/dist/ui/components/nm-icon/animated/arrow-up-down.d.ts +119 -0
- package/dist/ui/components/nm-icon/animated/arrow-up.d.ts +128 -0
- package/dist/ui/components/nm-icon/animated/audio-lines.d.ts +99 -0
- package/dist/ui/components/nm-icon/animated/bookmark-plus.d.ts +35 -0
- package/dist/ui/components/nm-icon/animated/bookmark.d.ts +52 -0
- package/dist/ui/components/nm-icon/animated/bot.d.ts +90 -0
- package/dist/ui/components/nm-icon/animated/calendar-days.d.ts +87 -0
- package/dist/ui/components/nm-icon/animated/calendar.d.ts +36 -0
- package/dist/ui/components/nm-icon/animated/camera.d.ts +50 -0
- package/dist/ui/components/nm-icon/animated/chart-column-increasing.d.ts +37 -0
- package/dist/ui/components/nm-icon/animated/chart-column.d.ts +86 -0
- package/dist/ui/components/nm-icon/animated/chart-line.d.ts +51 -0
- package/dist/ui/components/nm-icon/animated/check-check.d.ts +50 -0
- package/dist/ui/components/nm-icon/animated/check.d.ts +25 -0
- package/dist/ui/components/nm-icon/animated/chevron-down.d.ts +39 -0
- package/dist/ui/components/nm-icon/animated/chevron-left.d.ts +39 -0
- package/dist/ui/components/nm-icon/animated/chevron-right.d.ts +39 -0
- package/dist/ui/components/nm-icon/animated/chevron-up.d.ts +39 -0
- package/dist/ui/components/nm-icon/animated/circle-alert.d.ts +23 -0
- package/dist/ui/components/nm-icon/animated/circle-check-big.d.ts +26 -0
- package/dist/ui/components/nm-icon/animated/circle-check.d.ts +26 -0
- package/dist/ui/components/nm-icon/animated/circle-plus.d.ts +44 -0
- package/dist/ui/components/nm-icon/animated/circle-question-mark.d.ts +22 -0
- package/dist/ui/components/nm-icon/animated/circle-x.d.ts +44 -0
- package/dist/ui/components/nm-icon/animated/clock-3.d.ts +44 -0
- package/dist/ui/components/nm-icon/animated/clock-4.d.ts +44 -0
- package/dist/ui/components/nm-icon/animated/clock.d.ts +44 -0
- package/dist/ui/components/nm-icon/animated/cloud-sun.d.ts +9 -0
- package/dist/ui/components/nm-icon/animated/cloud-upload.d.ts +45 -0
- package/dist/ui/components/nm-icon/animated/copy.d.ts +135 -0
- package/dist/ui/components/nm-icon/animated/download.d.ts +45 -0
- package/dist/ui/components/nm-icon/animated/ellipsis.d.ts +141 -0
- package/dist/ui/components/nm-icon/animated/external-link.d.ts +49 -0
- package/dist/ui/components/nm-icon/animated/eye-off.d.ts +23 -0
- package/dist/ui/components/nm-icon/animated/eye.d.ts +39 -0
- package/dist/ui/components/nm-icon/animated/fast-forward.d.ts +34 -0
- package/dist/ui/components/nm-icon/animated/file-clock.d.ts +48 -0
- package/dist/ui/components/nm-icon/animated/file-text.d.ts +56 -0
- package/dist/ui/components/nm-icon/animated/file.d.ts +67 -0
- package/dist/ui/components/nm-icon/animated/folder.d.ts +92 -0
- package/dist/ui/components/nm-icon/animated/gauge.d.ts +47 -0
- package/dist/ui/components/nm-icon/animated/globe.d.ts +21 -0
- package/dist/ui/components/nm-icon/animated/graduation-cap.d.ts +41 -0
- package/dist/ui/components/nm-icon/animated/headphones.d.ts +50 -0
- package/dist/ui/components/nm-icon/animated/image.d.ts +40 -0
- package/dist/ui/components/nm-icon/animated/index.d.ts +2 -0
- package/dist/ui/components/nm-icon/animated/info.d.ts +37 -0
- package/dist/ui/components/nm-icon/animated/key-round.d.ts +37 -0
- package/dist/ui/components/nm-icon/animated/layers.d.ts +61 -0
- package/dist/ui/components/nm-icon/animated/layout-dashboard.d.ts +131 -0
- package/dist/ui/components/nm-icon/animated/library-big.d.ts +29 -0
- package/dist/ui/components/nm-icon/animated/lightbulb.d.ts +51 -0
- package/dist/ui/components/nm-icon/animated/link.d.ts +193 -0
- package/dist/ui/components/nm-icon/animated/list-filter.d.ts +13 -0
- package/dist/ui/components/nm-icon/animated/list.d.ts +111 -0
- package/dist/ui/components/nm-icon/animated/loader-circle.d.ts +24 -0
- package/dist/ui/components/nm-icon/animated/lock.d.ts +94 -0
- package/dist/ui/components/nm-icon/animated/log-out.d.ts +45 -0
- package/dist/ui/components/nm-icon/animated/mail.d.ts +100 -0
- package/dist/ui/components/nm-icon/animated/map-pin.d.ts +67 -0
- package/dist/ui/components/nm-icon/animated/menu.d.ts +57 -0
- package/dist/ui/components/nm-icon/animated/message-circle-dashed.d.ts +34 -0
- package/dist/ui/components/nm-icon/animated/message-circle.d.ts +23 -0
- package/dist/ui/components/nm-icon/animated/message-square-plus.d.ts +49 -0
- package/dist/ui/components/nm-icon/animated/message-square-text.d.ts +104 -0
- package/dist/ui/components/nm-icon/animated/message-square.d.ts +23 -0
- package/dist/ui/components/nm-icon/animated/mic-off.d.ts +23 -0
- package/dist/ui/components/nm-icon/animated/mic.d.ts +37 -0
- package/dist/ui/components/nm-icon/animated/minimize.d.ts +139 -0
- package/dist/ui/components/nm-icon/animated/minus.d.ts +54 -0
- package/dist/ui/components/nm-icon/animated/moon.d.ts +62 -0
- package/dist/ui/components/nm-icon/animated/music.d.ts +22 -0
- package/dist/ui/components/nm-icon/animated/notebook-pen.d.ts +41 -0
- package/dist/ui/components/nm-icon/animated/panel-left.d.ts +29 -0
- package/dist/ui/components/nm-icon/animated/panel-right.d.ts +29 -0
- package/dist/ui/components/nm-icon/animated/paperclip.d.ts +49 -0
- package/dist/ui/components/nm-icon/animated/pause.d.ts +59 -0
- package/dist/ui/components/nm-icon/animated/pencil.d.ts +25 -0
- package/dist/ui/components/nm-icon/animated/pin-off.d.ts +44 -0
- package/dist/ui/components/nm-icon/animated/pin.d.ts +85 -0
- package/dist/ui/components/nm-icon/animated/plane-takeoff.d.ts +25 -0
- package/dist/ui/components/nm-icon/animated/play.d.ts +43 -0
- package/dist/ui/components/nm-icon/animated/plug-zap.d.ts +49 -0
- package/dist/ui/components/nm-icon/animated/plus.d.ts +95 -0
- package/dist/ui/components/nm-icon/animated/radio.d.ts +24 -0
- package/dist/ui/components/nm-icon/animated/refresh-cw.d.ts +55 -0
- package/dist/ui/components/nm-icon/animated/rocket.d.ts +48 -0
- package/dist/ui/components/nm-icon/animated/rotate-ccw.d.ts +51 -0
- package/dist/ui/components/nm-icon/animated/rotate-cw.d.ts +71 -0
- package/dist/ui/components/nm-icon/animated/save.d.ts +21 -0
- package/dist/ui/components/nm-icon/animated/search.d.ts +42 -0
- package/dist/ui/components/nm-icon/animated/send.d.ts +39 -0
- package/dist/ui/components/nm-icon/animated/settings.d.ts +39 -0
- package/dist/ui/components/nm-icon/animated/share-2.d.ts +122 -0
- package/dist/ui/components/nm-icon/animated/share.d.ts +40 -0
- package/dist/ui/components/nm-icon/animated/shield-check.d.ts +36 -0
- package/dist/ui/components/nm-icon/animated/shopping-bag.d.ts +35 -0
- package/dist/ui/components/nm-icon/animated/sliders-horizontal.d.ts +239 -0
- package/dist/ui/components/nm-icon/animated/sparkles.d.ts +205 -0
- package/dist/ui/components/nm-icon/animated/star.d.ts +48 -0
- package/dist/ui/components/nm-icon/animated/sun.d.ts +9 -0
- package/dist/ui/components/nm-icon/animated/terminal.d.ts +22 -0
- package/dist/ui/components/nm-icon/animated/trash-2.d.ts +61 -0
- package/dist/ui/components/nm-icon/animated/trash.d.ts +37 -0
- package/dist/ui/components/nm-icon/animated/trending-up.d.ts +40 -0
- package/dist/ui/components/nm-icon/animated/triangle-alert.d.ts +37 -0
- package/dist/ui/components/nm-icon/animated/trophy.d.ts +23 -0
- package/dist/ui/components/nm-icon/animated/type.d.ts +57 -0
- package/dist/ui/components/nm-icon/animated/upload.d.ts +49 -0
- package/dist/ui/components/nm-icon/animated/user-round.d.ts +33 -0
- package/dist/ui/components/nm-icon/animated/user.d.ts +33 -0
- package/dist/ui/components/nm-icon/animated/users-round.d.ts +93 -0
- package/dist/ui/components/nm-icon/animated/users.d.ts +93 -0
- package/dist/ui/components/nm-icon/animated/volume-2.d.ts +10 -0
- package/dist/ui/components/nm-icon/animated/wand-sparkles.d.ts +71 -0
- package/dist/ui/components/nm-icon/animated/x.d.ts +95 -0
- package/dist/ui/components/nm-icon/animated/zap.d.ts +65 -0
- package/dist/ui/components/nm-icon/animated/zoom-in.d.ts +35 -0
- package/dist/ui/components/nm-icon/animated/zoom-out.d.ts +53 -0
- package/dist/ui/components/nm-icon/nm-icon.d.ts +6 -3
- package/dist/ui/components/nm-icon/nm-lucide-extended.d.ts +3 -0
- package/dist/ui/components/nm-icon/nm-lucide.d.ts +7 -3
- package/dist/ui/components/nm-menubar/nm-menubar.d.ts +2 -2
- package/dist/ui/components/nm-panel/nm-panel.d.ts +5 -1
- package/dist/ui/components/nm-popover/nm-popover.d.ts +2 -2
- package/dist/ui/components/nm-progress/nm-progress.d.ts +1 -1
- package/dist/ui/components/nm-radio-group/nm-radio-group.d.ts +2 -2
- package/dist/ui/components/nm-select/nm-select.d.ts +1 -1
- package/dist/ui/components/nm-skeleton/nm-skeleton.d.ts +3 -0
- package/dist/ui/components/nm-slider/nm-slider.d.ts +1 -1
- package/dist/ui/components/nm-small-icon-button/nm-small-icon-button.d.ts +3 -3
- package/dist/ui/components/nm-spinner/nm-spinner.d.ts +3 -0
- package/dist/ui/components/nm-switch/nm-switch.d.ts +1 -1
- package/dist/ui/components/nm-tabs/nm-tabs.d.ts +6 -0
- package/dist/ui/components/nm-textarea/nm-textarea.d.ts +12 -2
- package/dist/ui/components/nm-toggle/nm-toggle.d.ts +1 -1
- package/dist/ui/components/nm-tooltip/nm-tooltip.d.ts +1 -1
- package/dist/ui/components/nm-voice-orb/nm-voice-orb.d.ts +18 -0
- package/dist/ui/components/nm-voice-orb/use-nm-voice-orb-theme.d.ts +2 -0
- package/dist/ui/config/nm-app-panel.d.ts +2 -0
- package/dist/ui/config/nm-button.d.ts +6 -0
- package/dist/ui/config/nm-composer.d.ts +11 -0
- package/dist/ui/config/nm-icons-extended.d.ts +1 -0
- package/dist/ui/config/nm-icons.d.ts +4 -1
- package/dist/ui/config/nm-voice-orb.d.ts +22 -0
- package/dist/ui/lib/nm-motion.d.ts +29 -0
- package/package.json +12 -8
- package/registry/index.json +5277 -73
- package/registry/ui/components/nm-ai/nm-ai.tsx +7 -4
- package/registry/ui/components/nm-alert/nm-alert.css +85 -0
- package/registry/ui/components/nm-alert/nm-alert.tsx +35 -0
- package/registry/ui/components/nm-button/nm-button.css +24 -0
- package/registry/ui/components/nm-button/nm-button.tsx +25 -11
- package/registry/ui/components/nm-checkbox/nm-checkbox.tsx +1 -1
- package/registry/ui/components/nm-chip/nm-chip.css +25 -0
- package/registry/ui/components/nm-chip/nm-chip.tsx +9 -3
- package/registry/ui/components/nm-collapsible/nm-collapsible.css +3 -0
- package/registry/ui/components/nm-collapsible/nm-collapsible.tsx +16 -0
- package/registry/ui/components/nm-combobox/nm-combobox.tsx +1 -1
- package/registry/ui/components/nm-command/nm-command.css +48 -0
- package/registry/ui/components/nm-command/nm-command.tsx +19 -5
- package/registry/ui/components/nm-composer/nm-composer.css +87 -3
- package/registry/ui/components/nm-composer/nm-composer.tsx +321 -33
- package/registry/ui/components/nm-context-menu/nm-context-menu.tsx +1 -1
- package/registry/ui/components/nm-dialog/nm-dialog.css +5 -6
- package/registry/ui/components/nm-dialog/nm-dialog.tsx +1 -1
- package/registry/ui/components/nm-dropdown/nm-dropdown.css +5 -0
- package/registry/ui/components/nm-dropdown/nm-dropdown.tsx +28 -249
- package/registry/ui/components/nm-dropdown-menu/nm-dropdown-menu.css +8 -0
- package/registry/ui/components/nm-dropdown-menu/nm-dropdown-menu.tsx +85 -6
- package/registry/ui/components/nm-field/nm-field.tsx +6 -1
- package/registry/ui/components/nm-hover-card/nm-hover-card.tsx +1 -1
- package/registry/ui/components/nm-icon/animated/activity.tsx +109 -0
- package/registry/ui/components/nm-icon/animated/archive.tsx +85 -0
- package/registry/ui/components/nm-icon/animated/arrow-down.tsx +149 -0
- package/registry/ui/components/nm-icon/animated/arrow-left.tsx +149 -0
- package/registry/ui/components/nm-icon/animated/arrow-right.tsx +149 -0
- package/registry/ui/components/nm-icon/animated/arrow-up-down.tsx +168 -0
- package/registry/ui/components/nm-icon/animated/arrow-up.tsx +149 -0
- package/registry/ui/components/nm-icon/animated/audio-lines.tsx +190 -0
- package/registry/ui/components/nm-icon/animated/bookmark-plus.tsx +65 -0
- package/registry/ui/components/nm-icon/animated/bookmark.tsx +77 -0
- package/registry/ui/components/nm-icon/animated/bot.tsx +167 -0
- package/registry/ui/components/nm-icon/animated/calendar-days.tsx +128 -0
- package/registry/ui/components/nm-icon/animated/calendar.tsx +83 -0
- package/registry/ui/components/nm-icon/animated/camera.tsx +85 -0
- package/registry/ui/components/nm-icon/animated/chart-column-increasing.tsx +150 -0
- package/registry/ui/components/nm-icon/animated/chart-column.tsx +179 -0
- package/registry/ui/components/nm-icon/animated/chart-line.tsx +88 -0
- package/registry/ui/components/nm-icon/animated/check-check.tsx +105 -0
- package/registry/ui/components/nm-icon/animated/check.tsx +70 -0
- package/registry/ui/components/nm-icon/animated/chevron-down.tsx +73 -0
- package/registry/ui/components/nm-icon/animated/chevron-left.tsx +73 -0
- package/registry/ui/components/nm-icon/animated/chevron-right.tsx +73 -0
- package/registry/ui/components/nm-icon/animated/chevron-up.tsx +73 -0
- package/registry/ui/components/nm-icon/animated/circle-alert.tsx +84 -0
- package/registry/ui/components/nm-icon/animated/circle-check-big.tsx +75 -0
- package/registry/ui/components/nm-icon/animated/circle-check.tsx +77 -0
- package/registry/ui/components/nm-icon/animated/circle-plus.tsx +93 -0
- package/registry/ui/components/nm-icon/animated/circle-question-mark.tsx +62 -0
- package/registry/ui/components/nm-icon/animated/circle-x.tsx +93 -0
- package/registry/ui/components/nm-icon/animated/clock-3.tsx +95 -0
- package/registry/ui/components/nm-icon/animated/clock-4.tsx +95 -0
- package/registry/ui/components/nm-icon/animated/clock.tsx +95 -0
- package/registry/ui/components/nm-icon/animated/cloud-sun.tsx +130 -0
- package/registry/ui/components/nm-icon/animated/cloud-upload.tsx +93 -0
- package/registry/ui/components/nm-icon/animated/copy.tsx +153 -0
- package/registry/ui/components/nm-icon/animated/download.tsx +93 -0
- package/registry/ui/components/nm-icon/animated/ellipsis.tsx +189 -0
- package/registry/ui/components/nm-icon/animated/external-link.tsx +97 -0
- package/registry/ui/components/nm-icon/animated/eye-off.tsx +63 -0
- package/registry/ui/components/nm-icon/animated/eye.tsx +82 -0
- package/registry/ui/components/nm-icon/animated/fast-forward.tsx +72 -0
- package/registry/ui/components/nm-icon/animated/file-clock.tsx +105 -0
- package/registry/ui/components/nm-icon/animated/file-text.tsx +102 -0
- package/registry/ui/components/nm-icon/animated/file.tsx +124 -0
- package/registry/ui/components/nm-icon/animated/folder.tsx +132 -0
- package/registry/ui/components/nm-icon/animated/gauge.tsx +84 -0
- package/registry/ui/components/nm-icon/animated/globe.tsx +61 -0
- package/registry/ui/components/nm-icon/animated/graduation-cap.tsx +92 -0
- package/registry/ui/components/nm-icon/animated/headphones.tsx +85 -0
- package/registry/ui/components/nm-icon/animated/image.tsx +88 -0
- package/registry/ui/components/nm-icon/animated/index.ts +251 -0
- package/registry/ui/components/nm-icon/animated/info.tsx +75 -0
- package/registry/ui/components/nm-icon/animated/key-round.tsx +67 -0
- package/registry/ui/components/nm-icon/animated/layers.tsx +116 -0
- package/registry/ui/components/nm-icon/animated/layout-dashboard.tsx +176 -0
- package/registry/ui/components/nm-icon/animated/library-big.tsx +89 -0
- package/registry/ui/components/nm-icon/animated/lightbulb.tsx +106 -0
- package/registry/ui/components/nm-icon/animated/link.tsx +210 -0
- package/registry/ui/components/nm-icon/animated/list-filter.tsx +78 -0
- package/registry/ui/components/nm-icon/animated/list.tsx +184 -0
- package/registry/ui/components/nm-icon/animated/loader-circle.tsx +68 -0
- package/registry/ui/components/nm-icon/animated/lock.tsx +152 -0
- package/registry/ui/components/nm-icon/animated/log-out.tsx +93 -0
- package/registry/ui/components/nm-icon/animated/mail.tsx +131 -0
- package/registry/ui/components/nm-icon/animated/map-pin.tsx +111 -0
- package/registry/ui/components/nm-icon/animated/menu.tsx +121 -0
- package/registry/ui/components/nm-icon/animated/message-circle-dashed.tsx +140 -0
- package/registry/ui/components/nm-icon/animated/message-circle.tsx +66 -0
- package/registry/ui/components/nm-icon/animated/message-square-plus.tsx +106 -0
- package/registry/ui/components/nm-icon/animated/message-square-text.tsx +153 -0
- package/registry/ui/components/nm-icon/animated/message-square.tsx +66 -0
- package/registry/ui/components/nm-icon/animated/mic-off.tsx +65 -0
- package/registry/ui/components/nm-icon/animated/mic.tsx +77 -0
- package/registry/ui/components/nm-icon/animated/minimize.tsx +164 -0
- package/registry/ui/components/nm-icon/animated/minus.tsx +84 -0
- package/registry/ui/components/nm-icon/animated/moon.tsx +98 -0
- package/registry/ui/components/nm-icon/animated/music.tsx +62 -0
- package/registry/ui/components/nm-icon/animated/notebook-pen.tsx +114 -0
- package/registry/ui/components/nm-icon/animated/panel-left.tsx +77 -0
- package/registry/ui/components/nm-icon/animated/panel-right.tsx +77 -0
- package/registry/ui/components/nm-icon/animated/paperclip.tsx +83 -0
- package/registry/ui/components/nm-icon/animated/pause.tsx +116 -0
- package/registry/ui/components/nm-icon/animated/pencil.tsx +70 -0
- package/registry/ui/components/nm-icon/animated/pin-off.tsx +102 -0
- package/registry/ui/components/nm-icon/animated/pin.tsx +124 -0
- package/registry/ui/components/nm-icon/animated/plane-takeoff.tsx +62 -0
- package/registry/ui/components/nm-icon/animated/play.tsx +74 -0
- package/registry/ui/components/nm-icon/animated/plug-zap.tsx +117 -0
- package/registry/ui/components/nm-icon/animated/plus.tsx +122 -0
- package/registry/ui/components/nm-icon/animated/radio.tsx +137 -0
- package/registry/ui/components/nm-icon/animated/refresh-cw.tsx +103 -0
- package/registry/ui/components/nm-icon/animated/rocket.tsx +93 -0
- package/registry/ui/components/nm-icon/animated/rotate-ccw.tsx +87 -0
- package/registry/ui/components/nm-icon/animated/rotate-cw.tsx +98 -0
- package/registry/ui/components/nm-icon/animated/save.tsx +58 -0
- package/registry/ui/components/nm-icon/animated/search.tsx +90 -0
- package/registry/ui/components/nm-icon/animated/send.tsx +87 -0
- package/registry/ui/components/nm-icon/animated/settings.tsx +92 -0
- package/registry/ui/components/nm-icon/animated/share-2.tsx +148 -0
- package/registry/ui/components/nm-icon/animated/share.tsx +76 -0
- package/registry/ui/components/nm-icon/animated/shield-check.tsx +70 -0
- package/registry/ui/components/nm-icon/animated/shopping-bag.tsx +71 -0
- package/registry/ui/components/nm-icon/animated/sliders-horizontal.tsx +243 -0
- package/registry/ui/components/nm-icon/animated/sparkles.tsx +227 -0
- package/registry/ui/components/nm-icon/animated/star.tsx +86 -0
- package/registry/ui/components/nm-icon/animated/sun.tsx +148 -0
- package/registry/ui/components/nm-icon/animated/terminal.tsx +71 -0
- package/registry/ui/components/nm-icon/animated/trash-2.tsx +136 -0
- package/registry/ui/components/nm-icon/animated/trash.tsx +94 -0
- package/registry/ui/components/nm-icon/animated/trending-up.tsx +75 -0
- package/registry/ui/components/nm-icon/animated/triangle-alert.tsx +75 -0
- package/registry/ui/components/nm-icon/animated/trophy.tsx +62 -0
- package/registry/ui/components/nm-icon/animated/type.tsx +106 -0
- package/registry/ui/components/nm-icon/animated/upload.tsx +94 -0
- package/registry/ui/components/nm-icon/animated/user-round.tsx +84 -0
- package/registry/ui/components/nm-icon/animated/user.tsx +84 -0
- package/registry/ui/components/nm-icon/animated/users-round.tsx +156 -0
- package/registry/ui/components/nm-icon/animated/users.tsx +156 -0
- package/registry/ui/components/nm-icon/animated/volume-2.tsx +119 -0
- package/registry/ui/components/nm-icon/animated/wand-sparkles.tsx +111 -0
- package/registry/ui/components/nm-icon/animated/x.tsx +122 -0
- package/registry/ui/components/nm-icon/animated/zap.tsx +86 -0
- package/registry/ui/components/nm-icon/animated/zoom-in.tsx +66 -0
- package/registry/ui/components/nm-icon/animated/zoom-out.tsx +85 -0
- package/registry/ui/components/nm-icon/nm-icon.css +0 -1
- package/registry/ui/components/nm-icon/nm-icon.tsx +20 -5
- package/registry/ui/components/nm-icon/nm-lucide-extended.tsx +284 -0
- package/registry/ui/components/nm-icon/nm-lucide.tsx +55 -5
- package/registry/ui/components/nm-input/nm-input.css +1 -0
- package/registry/ui/components/nm-menubar/nm-menubar.tsx +2 -2
- package/registry/ui/components/nm-panel/nm-panel.css +7 -0
- package/registry/ui/components/nm-panel/nm-panel.tsx +19 -2
- package/registry/ui/components/nm-popover/nm-popover.tsx +4 -3
- package/registry/ui/components/nm-progress/nm-progress.tsx +1 -1
- package/registry/ui/components/nm-radio-group/nm-radio-group.tsx +2 -2
- package/registry/ui/components/nm-select/nm-select.tsx +1 -1
- package/registry/ui/components/nm-skeleton/nm-skeleton.css +17 -0
- package/registry/ui/components/nm-skeleton/nm-skeleton.tsx +7 -0
- package/registry/ui/components/nm-slider/nm-slider.tsx +1 -1
- package/registry/ui/components/nm-small-icon-button/nm-small-icon-button.tsx +3 -3
- package/registry/ui/components/nm-spinner/nm-spinner.css +22 -0
- package/registry/ui/components/nm-spinner/nm-spinner.tsx +7 -0
- package/registry/ui/components/nm-switch/nm-switch.css +20 -3
- package/registry/ui/components/nm-switch/nm-switch.tsx +1 -1
- package/registry/ui/components/nm-tabs/nm-tabs.css +4 -0
- package/registry/ui/components/nm-tabs/nm-tabs.tsx +19 -0
- package/registry/ui/components/nm-textarea/nm-textarea.css +200 -0
- package/registry/ui/components/nm-textarea/nm-textarea.tsx +417 -3
- package/registry/ui/components/nm-toggle/nm-toggle.tsx +1 -1
- package/registry/ui/components/nm-toolbar/nm-toolbar.tsx +4 -1
- package/registry/ui/components/nm-tooltip/nm-tooltip.tsx +1 -1
- package/registry/ui/components/nm-voice-orb/nm-voice-orb.css +17 -0
- package/registry/ui/components/nm-voice-orb/nm-voice-orb.tsx +112 -0
- package/registry/ui/components/nm-voice-orb/use-nm-voice-orb-theme.ts +34 -0
- package/registry/ui/components/nordman-icon-button/nordman-icon-button.tsx +7 -3
- package/registry/ui/config/nm-button.ts +6 -0
- package/registry/ui/config/nm-composer.ts +12 -0
- package/registry/ui/config/nm-icons-extended.ts +141 -0
- package/registry/ui/config/nm-icons.ts +6 -2
- package/registry/ui/config/nm-voice-orb.ts +50 -0
- package/registry/ui/lib/nm-motion.ts +30 -0
- package/registry/ui/styles/tokens.css +7 -0
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
|
+
Archive,
|
|
3
|
+
Camera,
|
|
4
|
+
CloudUpload,
|
|
5
|
+
Download,
|
|
6
|
+
Lock,
|
|
7
|
+
LogOut,
|
|
8
|
+
Minimize,
|
|
9
|
+
Pencil,
|
|
10
|
+
Pin,
|
|
11
|
+
Share,
|
|
12
|
+
Trash2,
|
|
13
|
+
Volume2,
|
|
2
14
|
AppWindowMac,
|
|
3
15
|
ArrowLeft,
|
|
4
16
|
ArrowRight,
|
|
@@ -72,15 +84,29 @@ import {
|
|
|
72
84
|
X,
|
|
73
85
|
type LucideIcon,
|
|
74
86
|
} from 'lucide-react';
|
|
75
|
-
import type { ReactNode } from 'react';
|
|
87
|
+
import type { CSSProperties, ReactNode, SVGAttributes } from 'react';
|
|
88
|
+
import { NM_ANIMATED_ICONS } from './animated/index.ts';
|
|
89
|
+
import { NM_LUCIDE_EXTENDED } from './nm-lucide-extended.tsx';
|
|
76
90
|
import type { NmIconId } from '../../config/nm-icons.ts';
|
|
77
91
|
|
|
78
92
|
export const NM_LUCIDE_FILLED_IDS = new Set<string>(['stop']);
|
|
79
93
|
|
|
80
|
-
const
|
|
94
|
+
const LUCIDE_CORE: Partial<
|
|
81
95
|
Record<NmIconId | 'square-dashed-bottom-code' | 'layout-grid' | 'stop' | 'scan' | 'pause', LucideIcon>
|
|
82
96
|
> = {
|
|
83
97
|
plus: Plus,
|
|
98
|
+
volume: Volume2,
|
|
99
|
+
camera: Camera,
|
|
100
|
+
minimize: Minimize,
|
|
101
|
+
download: Download,
|
|
102
|
+
publish: CloudUpload,
|
|
103
|
+
share: Share,
|
|
104
|
+
pen: Pencil,
|
|
105
|
+
pin: Pin,
|
|
106
|
+
archive: Archive,
|
|
107
|
+
trash: Trash2,
|
|
108
|
+
logout: LogOut,
|
|
109
|
+
lock: Lock,
|
|
84
110
|
expand: Maximize2,
|
|
85
111
|
scan: Scan,
|
|
86
112
|
reload: RotateCcw,
|
|
@@ -156,25 +182,49 @@ const LUCIDE: Partial<
|
|
|
156
182
|
rows: Rows2,
|
|
157
183
|
};
|
|
158
184
|
|
|
185
|
+
const LUCIDE: Partial<Record<string, LucideIcon>> = { ...NM_LUCIDE_EXTENDED, ...LUCIDE_CORE };
|
|
186
|
+
|
|
187
|
+
/** True when the icon plays an animation on hover: a lucide icon Animate UI has an animation for. */
|
|
188
|
+
export function isNmIconAnimated(id: string): boolean {
|
|
189
|
+
const Icon = LUCIDE[id];
|
|
190
|
+
return Icon != null && !NM_LUCIDE_FILLED_IDS.has(id) && (Icon as { displayName?: string }).displayName! in NM_ANIMATED_ICONS;
|
|
191
|
+
}
|
|
192
|
+
|
|
159
193
|
export function hasNmLucide(id: string): boolean {
|
|
160
194
|
return id in LUCIDE;
|
|
161
195
|
}
|
|
162
196
|
|
|
163
|
-
|
|
164
|
-
|
|
197
|
+
function sized(size: number | string | undefined, style: CSSProperties | undefined): CSSProperties | undefined {
|
|
198
|
+
if (size == null) {
|
|
199
|
+
return style;
|
|
200
|
+
}
|
|
201
|
+
const length = typeof size === 'number' ? `${size}px` : size;
|
|
202
|
+
return { width: length, height: length, ...style };
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export function NmLucide({ id, className, size, style, ...rest }: { id: string; className?: string; size?: number | string; style?: CSSProperties } & Omit<SVGAttributes<SVGElement>, 'id' | 'className' | 'style'>): ReactNode {
|
|
206
|
+
const Icon = LUCIDE[id];
|
|
165
207
|
if (Icon == null) {
|
|
166
208
|
return null;
|
|
167
209
|
}
|
|
168
210
|
const filled = NM_LUCIDE_FILLED_IDS.has(id);
|
|
169
211
|
const baseClass = filled ? 'nm-icon nm-icon--filled' : 'nm-icon';
|
|
170
212
|
const iconClass = className == null ? baseClass : `${baseClass} ${className}`;
|
|
213
|
+
// An icon Animate UI has an animation for plays it when the control around it is hovered. The rest stay lucide.
|
|
214
|
+
const Animated = filled ? undefined : NM_ANIMATED_ICONS[(Icon as { displayName?: string }).displayName ?? ''];
|
|
215
|
+
if (Animated) {
|
|
216
|
+
return <Animated className={iconClass} data-icon={id} aria-hidden={rest['aria-label'] == null} focusable="false" size={typeof size === 'number' ? size : undefined} {...rest} style={sized(size, style)} />;
|
|
217
|
+
}
|
|
171
218
|
return (
|
|
172
219
|
<Icon
|
|
173
220
|
className={iconClass}
|
|
174
221
|
data-icon={id}
|
|
175
222
|
strokeWidth={filled ? undefined : 2}
|
|
176
|
-
aria-hidden
|
|
223
|
+
aria-hidden={rest['aria-label'] == null}
|
|
177
224
|
focusable="false"
|
|
225
|
+
size={typeof size === 'number' ? size : undefined}
|
|
226
|
+
{...(rest as object)}
|
|
227
|
+
style={sized(size, style)}
|
|
178
228
|
/>
|
|
179
229
|
);
|
|
180
230
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Menubar as MenubarPrimitive } from '
|
|
2
|
-
import { Menu as MenuPrimitive } from '
|
|
1
|
+
import { Menubar as MenubarPrimitive } from '../../lib/nm-motion.ts';
|
|
2
|
+
import { Menu as MenuPrimitive } from '../../lib/nm-motion.ts';
|
|
3
3
|
import { nmClass } from '../../lib/nm-class.ts';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -21,6 +21,13 @@
|
|
|
21
21
|
background: var(--nm-canvas);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
.nm-panel-region[data-measure='column'] {
|
|
25
|
+
width: var(--nm-width-column);
|
|
26
|
+
min-width: min(100%, var(--nm-width-column-min));
|
|
27
|
+
max-width: var(--nm-width-column-max);
|
|
28
|
+
margin-inline: auto;
|
|
29
|
+
}
|
|
30
|
+
|
|
24
31
|
.nm-panel-region__header {
|
|
25
32
|
display: flex;
|
|
26
33
|
flex-shrink: 0;
|
|
@@ -4,9 +4,26 @@ import { nmClass } from '../../lib/nm-class.ts';
|
|
|
4
4
|
export const NM_PANEL_VARIANTS = ['default', 'inset', 'plain'] as const;
|
|
5
5
|
export type NmPanelVariant = (typeof NM_PANEL_VARIANTS)[number];
|
|
6
6
|
|
|
7
|
+
/** `full` fills the room it is given. `column` is a centred share of it, held between a minimum and a maximum width. */
|
|
8
|
+
export const NM_PANEL_MEASURES = ['full', 'column'] as const;
|
|
9
|
+
export type NmPanelMeasure = (typeof NM_PANEL_MEASURES)[number];
|
|
10
|
+
|
|
7
11
|
/** A region of the app, such as an inspector or a side panel: a header, content that scrolls, and a footer. */
|
|
8
|
-
export function NmPanel({
|
|
9
|
-
|
|
12
|
+
export function NmPanel({
|
|
13
|
+
className,
|
|
14
|
+
variant = 'default',
|
|
15
|
+
measure = 'full',
|
|
16
|
+
...props
|
|
17
|
+
}: ComponentProps<'section'> & { variant?: NmPanelVariant; measure?: NmPanelMeasure }) {
|
|
18
|
+
return (
|
|
19
|
+
<section
|
|
20
|
+
data-slot="panel"
|
|
21
|
+
data-variant={variant}
|
|
22
|
+
data-measure={measure}
|
|
23
|
+
className={nmClass('nm-panel-region', className)}
|
|
24
|
+
{...props}
|
|
25
|
+
/>
|
|
26
|
+
);
|
|
10
27
|
}
|
|
11
28
|
|
|
12
29
|
export function NmPanelHeader({ className, ...props }: ComponentProps<'header'>) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentProps } from 'react';
|
|
2
|
-
import { Popover as PopoverPrimitive } from '
|
|
2
|
+
import { Popover as PopoverPrimitive } from '../../lib/nm-motion.ts';
|
|
3
3
|
import { nmClass } from '../../lib/nm-class.ts';
|
|
4
4
|
|
|
5
5
|
export function NmPopover(props: PopoverPrimitive.Root.Props) {
|
|
@@ -16,11 +16,12 @@ export function NmPopoverContent({
|
|
|
16
16
|
alignOffset = 0,
|
|
17
17
|
side = 'bottom',
|
|
18
18
|
sideOffset = 8,
|
|
19
|
+
anchor,
|
|
19
20
|
...props
|
|
20
|
-
}: PopoverPrimitive.Popup.Props & Pick<PopoverPrimitive.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset'>) {
|
|
21
|
+
}: PopoverPrimitive.Popup.Props & Pick<PopoverPrimitive.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset' | 'anchor'>) {
|
|
21
22
|
return (
|
|
22
23
|
<PopoverPrimitive.Portal>
|
|
23
|
-
<PopoverPrimitive.Positioner align={align} alignOffset={alignOffset} side={side} sideOffset={sideOffset} className="nm-popover__positioner">
|
|
24
|
+
<PopoverPrimitive.Positioner anchor={anchor} align={align} alignOffset={alignOffset} side={side} sideOffset={sideOffset} className="nm-popover__positioner">
|
|
24
25
|
<PopoverPrimitive.Popup data-slot="popover-content" className={nmClass('nm-popover', className as string)} {...props} />
|
|
25
26
|
</PopoverPrimitive.Positioner>
|
|
26
27
|
</PopoverPrimitive.Portal>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Progress as ProgressPrimitive } from '
|
|
1
|
+
import { Progress as ProgressPrimitive } from '../../lib/nm-motion.ts';
|
|
2
2
|
import { nmClass } from '../../lib/nm-class.ts';
|
|
3
3
|
|
|
4
4
|
/** Base UI Progress, in the shadcn composition, styled by NIF tokens. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Radio as RadioPrimitive } from '
|
|
2
|
-
import { RadioGroup as RadioGroupPrimitive } from '
|
|
1
|
+
import { Radio as RadioPrimitive } from '../../lib/nm-motion.ts';
|
|
2
|
+
import { RadioGroup as RadioGroupPrimitive } from '../../lib/nm-motion.ts';
|
|
3
3
|
import { nmClass } from '../../lib/nm-class.ts';
|
|
4
4
|
|
|
5
5
|
export function NmRadioGroup({ className, ...props }: RadioGroupPrimitive.Props) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import { Select as SelectPrimitive } from '
|
|
2
|
+
import { Select as SelectPrimitive } from '../../lib/nm-motion.ts';
|
|
3
3
|
import { nmClass } from '../../lib/nm-class.ts';
|
|
4
4
|
import { NmIcon } from '../nm-icon/nm-icon.tsx';
|
|
5
5
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.nm-skeleton {
|
|
2
|
+
border-radius: var(--nm-radius-md);
|
|
3
|
+
background: var(--nm-panel);
|
|
4
|
+
animation: nm-skeleton-pulse 1.6s ease-in-out infinite;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@keyframes nm-skeleton-pulse {
|
|
8
|
+
50% {
|
|
9
|
+
opacity: 0.5;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@media (prefers-reduced-motion: reduce) {
|
|
14
|
+
.nm-skeleton {
|
|
15
|
+
animation: none;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { nmClass } from '../../lib/nm-class.ts';
|
|
3
|
+
|
|
4
|
+
/** A pulsing placeholder in the shape of the content that is loading. Size it with a class. */
|
|
5
|
+
export function NmSkeleton({ className, ...props }: ComponentProps<'div'>): ReactNode {
|
|
6
|
+
return <div data-slot="skeleton" className={nmClass('nm-skeleton', className)} {...props} />;
|
|
7
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Slider as SliderPrimitive } from '
|
|
1
|
+
import { Slider as SliderPrimitive } from '../../lib/nm-motion.ts';
|
|
2
2
|
import { nmClass } from '../../lib/nm-class.ts';
|
|
3
3
|
|
|
4
4
|
/** `label` and `output` add a caption above the track, set like the caption of a Field. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { forwardRef, type ButtonHTMLAttributes, type ReactNode } from 'react';
|
|
1
|
+
import { forwardRef, type ButtonHTMLAttributes, type MouseEvent, type ReactNode } from 'react';
|
|
2
2
|
import type { NmIconId } from '../../config/nm-icons.ts';
|
|
3
3
|
import {
|
|
4
4
|
NM_SMALL_ICON_BUTTON_TONES,
|
|
@@ -22,7 +22,7 @@ export type NmSmallIconButtonProps = {
|
|
|
22
22
|
active?: boolean;
|
|
23
23
|
iconContent?: ReactNode;
|
|
24
24
|
testId?: string;
|
|
25
|
-
onClick?: () => void;
|
|
25
|
+
onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
26
26
|
} & Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'aria-label' | 'children'>;
|
|
27
27
|
|
|
28
28
|
export const NmSmallIconButton = forwardRef<HTMLButtonElement, NmSmallIconButtonProps>(
|
|
@@ -56,7 +56,7 @@ export const NmSmallIconButton = forwardRef<HTMLButtonElement, NmSmallIconButton
|
|
|
56
56
|
if (disabled === true) {
|
|
57
57
|
return;
|
|
58
58
|
}
|
|
59
|
-
onClick?.();
|
|
59
|
+
onClick?.(event);
|
|
60
60
|
}}
|
|
61
61
|
>
|
|
62
62
|
{iconContent}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.nm-spinner {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
width: var(--nm-icon);
|
|
5
|
+
height: var(--nm-icon);
|
|
6
|
+
border: 2px solid var(--nm-line-strong);
|
|
7
|
+
border-top-color: var(--nm-fg);
|
|
8
|
+
border-radius: 50%;
|
|
9
|
+
animation: nm-spinner-turn 0.8s linear infinite;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@keyframes nm-spinner-turn {
|
|
13
|
+
to {
|
|
14
|
+
transform: rotate(360deg);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@media (prefers-reduced-motion: reduce) {
|
|
19
|
+
.nm-spinner {
|
|
20
|
+
animation-duration: 2.4s;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { nmClass } from '../../lib/nm-class.ts';
|
|
3
|
+
|
|
4
|
+
/** A ring that turns while something loads. It is the themed icon size; a class or style sets another. */
|
|
5
|
+
export function NmSpinner({ className, ...props }: ComponentProps<'span'>): ReactNode {
|
|
6
|
+
return <span role="status" aria-live="polite" data-slot="spinner" className={nmClass('nm-spinner', className)} {...props} />;
|
|
7
|
+
}
|
|
@@ -7,11 +7,16 @@
|
|
|
7
7
|
width: calc(var(--nm-switch-thumb) * 2);
|
|
8
8
|
height: var(--nm-switch-thumb);
|
|
9
9
|
padding: var(--nm-space-2);
|
|
10
|
-
border:
|
|
10
|
+
border: var(--nm-rule) solid var(--nm-line-strong);
|
|
11
11
|
border-radius: var(--toggle-r);
|
|
12
12
|
background: var(--nm-panel);
|
|
13
13
|
cursor: pointer;
|
|
14
|
-
|
|
14
|
+
user-select: none;
|
|
15
|
+
-webkit-user-select: none;
|
|
16
|
+
touch-action: none;
|
|
17
|
+
transition:
|
|
18
|
+
background 0.15s,
|
|
19
|
+
border-color 0.15s;
|
|
15
20
|
}
|
|
16
21
|
|
|
17
22
|
.nm-switch:focus-visible {
|
|
@@ -20,6 +25,7 @@
|
|
|
20
25
|
}
|
|
21
26
|
|
|
22
27
|
.nm-switch[data-checked] {
|
|
28
|
+
border-color: var(--nm-fg);
|
|
23
29
|
background: var(--nm-fg);
|
|
24
30
|
}
|
|
25
31
|
|
|
@@ -30,12 +36,16 @@
|
|
|
30
36
|
|
|
31
37
|
.nm-switch__thumb {
|
|
32
38
|
display: block;
|
|
39
|
+
flex-shrink: 0;
|
|
40
|
+
pointer-events: none;
|
|
33
41
|
width: var(--nm-switch-thumb);
|
|
34
42
|
height: var(--nm-switch-thumb);
|
|
35
43
|
border-radius: 50%;
|
|
36
44
|
background: var(--nm-fg);
|
|
45
|
+
transform: translateX(0);
|
|
46
|
+
will-change: transform;
|
|
37
47
|
transition:
|
|
38
|
-
transform 0.15s,
|
|
48
|
+
transform 0.15s var(--ease, ease),
|
|
39
49
|
background 0.15s;
|
|
40
50
|
}
|
|
41
51
|
|
|
@@ -43,3 +53,10 @@
|
|
|
43
53
|
transform: translateX(var(--nm-switch-thumb));
|
|
44
54
|
background: var(--nm-canvas);
|
|
45
55
|
}
|
|
56
|
+
|
|
57
|
+
@media (prefers-reduced-motion: reduce) {
|
|
58
|
+
.nm-switch,
|
|
59
|
+
.nm-switch__thumb {
|
|
60
|
+
transition: none;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
+
import { Tabs as TabsPrimitive } from '../../lib/nm-motion.ts';
|
|
3
|
+
import { nmClass } from '../../lib/nm-class.ts';
|
|
2
4
|
import { NM_TABS_CLASSES, type NmTabItem } from '../../config/nm-tabs.ts';
|
|
3
5
|
import { createLogger } from '../../kit-logger.ts';
|
|
4
6
|
|
|
@@ -30,3 +32,20 @@ export function NmTabs(props: NmTabsProps): ReactNode {
|
|
|
30
32
|
</div>
|
|
31
33
|
);
|
|
32
34
|
}
|
|
35
|
+
|
|
36
|
+
/** The parts of a tab set, for a view that lays out its own list and panels. */
|
|
37
|
+
export function NmTabsRoot(props: TabsPrimitive.Root.Props): ReactNode {
|
|
38
|
+
return <TabsPrimitive.Root data-slot="tabs" {...props} />;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function NmTabsList({ className, ...props }: TabsPrimitive.List.Props): ReactNode {
|
|
42
|
+
return <TabsPrimitive.List data-slot="tabs-list" className={nmClass(NM_TABS_CLASSES.root, className as string)} {...props} />;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function NmTabsTrigger({ className, ...props }: TabsPrimitive.Tab.Props): ReactNode {
|
|
46
|
+
return <TabsPrimitive.Tab data-slot="tabs-trigger" className={nmClass(NM_TABS_CLASSES.item, className as string)} {...props} />;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function NmTabsContent({ className, ...props }: TabsPrimitive.Panel.Props): ReactNode {
|
|
50
|
+
return <TabsPrimitive.Panel data-slot="tabs-content" className={nmClass('nm-tabs__panel', className as string)} {...props} />;
|
|
51
|
+
}
|
|
@@ -39,3 +39,203 @@
|
|
|
39
39
|
.nm-textarea[aria-invalid='true'] {
|
|
40
40
|
border-color: var(--nm-destructive);
|
|
41
41
|
}
|
|
42
|
+
|
|
43
|
+
.nm-textarea-wrap {
|
|
44
|
+
position: relative;
|
|
45
|
+
display: block;
|
|
46
|
+
width: 100%;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.nm-textarea-wrap .nm-textarea {
|
|
50
|
+
padding-bottom: calc(var(--control-h) + var(--nm-space-4));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.nm-textarea__panel-trigger {
|
|
54
|
+
position: absolute;
|
|
55
|
+
right: var(--nm-space-8);
|
|
56
|
+
bottom: var(--nm-space-8);
|
|
57
|
+
display: inline-flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
justify-content: center;
|
|
60
|
+
width: var(--control-h);
|
|
61
|
+
height: var(--control-h);
|
|
62
|
+
padding: 0;
|
|
63
|
+
border: 0;
|
|
64
|
+
border-radius: var(--nm-control-r);
|
|
65
|
+
background: transparent;
|
|
66
|
+
color: var(--nm-fg-muted);
|
|
67
|
+
cursor: pointer;
|
|
68
|
+
transition: color 0.15s, background-color 0.15s;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.nm-textarea__panel-trigger:hover {
|
|
72
|
+
background: var(--nm-panel);
|
|
73
|
+
color: var(--nm-fg);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.nm-textarea__panel-trigger:focus-visible {
|
|
77
|
+
outline: var(--nm-rule) solid var(--nm-fg);
|
|
78
|
+
outline-offset: var(--nm-rule);
|
|
79
|
+
color: var(--nm-fg);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.nm-textarea__panel-trigger .nm-icon {
|
|
83
|
+
width: var(--nm-space-16);
|
|
84
|
+
height: var(--nm-space-16);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.nm-textarea-panel__backdrop {
|
|
88
|
+
position: fixed;
|
|
89
|
+
inset: 0;
|
|
90
|
+
z-index: var(--nm-menu-z);
|
|
91
|
+
background: rgb(var(--nm-canvas-rgb) / 0.6);
|
|
92
|
+
backdrop-filter: blur(4px);
|
|
93
|
+
-webkit-backdrop-filter: blur(4px);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.nm-textarea-panel {
|
|
97
|
+
position: fixed;
|
|
98
|
+
top: 0;
|
|
99
|
+
right: 0;
|
|
100
|
+
bottom: 0;
|
|
101
|
+
z-index: calc(var(--nm-menu-z) + 1);
|
|
102
|
+
display: flex;
|
|
103
|
+
flex-direction: column;
|
|
104
|
+
width: min(var(--nm-width-dialog), 100%);
|
|
105
|
+
border-left: var(--nm-rule) solid var(--nm-line-strong);
|
|
106
|
+
background: var(--nm-panel);
|
|
107
|
+
color: var(--nm-fg);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.nm-textarea-panel__header {
|
|
111
|
+
display: flex;
|
|
112
|
+
align-items: center;
|
|
113
|
+
justify-content: space-between;
|
|
114
|
+
padding: var(--nm-space-12) var(--nm-space-16);
|
|
115
|
+
border-bottom: var(--nm-rule) solid var(--nm-line-strong);
|
|
116
|
+
gap: var(--nm-space-12);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.nm-textarea-panel__title-group {
|
|
120
|
+
display: flex;
|
|
121
|
+
align-items: center;
|
|
122
|
+
gap: var(--nm-space-12);
|
|
123
|
+
min-width: 0;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.nm-textarea-panel__title {
|
|
127
|
+
margin: 0;
|
|
128
|
+
font-size: var(--nm-type-ui);
|
|
129
|
+
font-weight: var(--nm-weight-semibold);
|
|
130
|
+
color: var(--nm-fg);
|
|
131
|
+
white-space: nowrap;
|
|
132
|
+
overflow: hidden;
|
|
133
|
+
text-overflow: ellipsis;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.nm-textarea-panel__actions {
|
|
137
|
+
display: flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
gap: var(--nm-space-4);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.nm-textarea-panel__action-btn {
|
|
143
|
+
display: inline-flex;
|
|
144
|
+
align-items: center;
|
|
145
|
+
justify-content: center;
|
|
146
|
+
width: var(--control-h);
|
|
147
|
+
height: var(--control-h);
|
|
148
|
+
padding: 0;
|
|
149
|
+
border: 0;
|
|
150
|
+
border-radius: var(--nm-control-r);
|
|
151
|
+
background: transparent;
|
|
152
|
+
color: var(--nm-fg-muted);
|
|
153
|
+
cursor: pointer;
|
|
154
|
+
transition: color 0.15s, background-color 0.15s;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.nm-textarea-panel__action-btn:hover {
|
|
158
|
+
background: var(--nm-raised);
|
|
159
|
+
color: var(--nm-fg);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.nm-textarea-panel__action-btn:focus-visible {
|
|
163
|
+
outline: var(--nm-rule) solid var(--nm-fg);
|
|
164
|
+
outline-offset: var(--nm-rule);
|
|
165
|
+
color: var(--nm-fg);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.nm-textarea-panel__body {
|
|
169
|
+
flex: 1;
|
|
170
|
+
display: flex;
|
|
171
|
+
flex-direction: column;
|
|
172
|
+
overflow: auto;
|
|
173
|
+
min-height: 0;
|
|
174
|
+
background: var(--nm-canvas);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.nm-textarea-panel__editor {
|
|
178
|
+
box-sizing: border-box;
|
|
179
|
+
flex: 1;
|
|
180
|
+
width: 100%;
|
|
181
|
+
height: 100%;
|
|
182
|
+
min-height: 100%;
|
|
183
|
+
padding: var(--nm-space-16);
|
|
184
|
+
border: 0;
|
|
185
|
+
outline: none;
|
|
186
|
+
resize: none;
|
|
187
|
+
background: var(--nm-raised);
|
|
188
|
+
color: var(--nm-fg);
|
|
189
|
+
font-family: var(--nm-font-mono);
|
|
190
|
+
font-size: var(--control-fs);
|
|
191
|
+
font-weight: var(--nm-weight-regular);
|
|
192
|
+
line-height: var(--nm-leading-relaxed);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.nm-textarea-panel__preview {
|
|
196
|
+
box-sizing: border-box;
|
|
197
|
+
flex: 1;
|
|
198
|
+
padding: var(--nm-space-16);
|
|
199
|
+
overflow-y: auto;
|
|
200
|
+
background: var(--nm-canvas);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.nm-textarea-panel__empty {
|
|
204
|
+
margin: 0;
|
|
205
|
+
color: var(--nm-fg-subtle);
|
|
206
|
+
font-size: var(--nm-type-ui-sm);
|
|
207
|
+
font-style: italic;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.nm-textarea-panel__footer {
|
|
211
|
+
display: flex;
|
|
212
|
+
align-items: center;
|
|
213
|
+
justify-content: space-between;
|
|
214
|
+
padding: var(--nm-space-8) var(--nm-space-16);
|
|
215
|
+
border-top: var(--nm-rule) solid var(--nm-line-strong);
|
|
216
|
+
background: var(--nm-panel);
|
|
217
|
+
font-size: var(--nm-type-ui-sm);
|
|
218
|
+
color: var(--nm-fg-subtle);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.nm-textarea-panel__done {
|
|
222
|
+
display: inline-flex;
|
|
223
|
+
align-items: center;
|
|
224
|
+
justify-content: center;
|
|
225
|
+
height: var(--control-h);
|
|
226
|
+
padding: 0 var(--control-px);
|
|
227
|
+
border: var(--nm-rule) solid var(--nm-line-strong);
|
|
228
|
+
border-radius: var(--nm-control-r);
|
|
229
|
+
background: var(--nm-raised);
|
|
230
|
+
color: var(--nm-fg);
|
|
231
|
+
font-family: var(--nm-font);
|
|
232
|
+
font-size: var(--nm-type-ui-sm);
|
|
233
|
+
font-weight: var(--nm-weight-medium);
|
|
234
|
+
cursor: pointer;
|
|
235
|
+
transition: background-color 0.15s, border-color 0.15s;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.nm-textarea-panel__done:hover {
|
|
239
|
+
background: var(--nm-panel);
|
|
240
|
+
border-color: var(--nm-stroke);
|
|
241
|
+
}
|