@devalok/shilp-sutra 0.36.1 → 0.37.0-next.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/MIGRATION.md +346 -0
- package/README.md +26 -29
- package/dist/_chunks/badge-group.js +42 -42
- package/dist/_chunks/badge-group.js.map +1 -1
- package/dist/_chunks/chat.js +324 -327
- package/dist/_chunks/chat.js.map +1 -1
- package/dist/_chunks/date-picker.js +245 -245
- package/dist/_chunks/date-picker.js.map +1 -1
- package/dist/_chunks/document-preview.js +33 -33
- package/dist/_chunks/document-preview.js.map +1 -1
- package/dist/_chunks/file-preview.js +264 -264
- package/dist/_chunks/file-preview.js.map +1 -1
- package/dist/_chunks/image-preview.js +45 -45
- package/dist/_chunks/image-preview.js.map +1 -1
- package/dist/_chunks/mention-suggestion.js +85 -85
- package/dist/_chunks/mention-suggestion.js.map +1 -1
- package/dist/_chunks/motion-provider.js +13 -13
- package/dist/_chunks/motion-provider.js.map +1 -1
- package/dist/_chunks/popover.js +36 -36
- package/dist/_chunks/popover.js.map +1 -1
- package/dist/_chunks/primitives.js +489 -489
- package/dist/_chunks/primitives.js.map +1 -1
- package/dist/_chunks/rich-chat-input.js +1065 -1065
- package/dist/_chunks/rich-chat-input.js.map +1 -1
- package/dist/_chunks/shared.js +43 -43
- package/dist/_chunks/shared.js.map +1 -1
- package/dist/_chunks/text.js +432 -0
- package/dist/_chunks/text.js.map +1 -0
- package/dist/_chunks/tiptap.js +6053 -6187
- package/dist/_chunks/tiptap.js.map +1 -1
- package/dist/_chunks/tree-view.js +97 -97
- package/dist/_chunks/tree-view.js.map +1 -1
- package/dist/_chunks/use-calendar.js.map +1 -1
- package/dist/ai/ai-command-provider.d.ts.map +1 -1
- package/dist/ai/ai-command-provider.js.map +1 -1
- package/dist/ai/block-renderer.d.ts.map +1 -1
- package/dist/ai/block-renderer.js +43 -43
- package/dist/ai/block-renderer.js.map +1 -1
- package/dist/ai/blocks/block-table.d.ts.map +1 -1
- package/dist/ai/blocks/confirm.d.ts.map +1 -1
- package/dist/ai/blocks/divider.d.ts.map +1 -1
- package/dist/ai/blocks/error.d.ts.map +1 -1
- package/dist/ai/blocks/index.d.ts +5 -5
- package/dist/ai/blocks/index.d.ts.map +1 -1
- package/dist/ai/blocks/index.js +2 -2
- package/dist/ai/blocks/info.d.ts.map +1 -1
- package/dist/ai/blocks/loading.d.ts.map +1 -1
- package/dist/ai/blocks/stat-row.d.ts.map +1 -1
- package/dist/ai/blocks/success.d.ts.map +1 -1
- package/dist/ai/blocks/text.d.ts.map +1 -1
- package/dist/ai/command-bar.d.ts +0 -11
- package/dist/ai/command-bar.d.ts.map +1 -1
- package/dist/ai/command-bar.js +128 -128
- package/dist/ai/command-bar.js.map +1 -1
- package/dist/ai/conversation.d.ts +1 -1
- package/dist/ai/conversation.d.ts.map +1 -1
- package/dist/ai/conversation.js +76 -76
- package/dist/ai/conversation.js.map +1 -1
- package/dist/ai/devadoot-icon.d.ts +0 -12
- package/dist/ai/devadoot-icon.d.ts.map +1 -1
- package/dist/ai/index.d.ts +11 -11
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/ai/index.js +44 -44
- package/dist/ai/index.js.map +1 -1
- package/dist/composed/activity-feed.d.ts.map +1 -1
- package/dist/composed/activity-feed.js +93 -93
- package/dist/composed/activity-feed.js.map +1 -1
- package/dist/composed/avatar-group.d.ts.map +1 -1
- package/dist/composed/avatar-group.js +50 -50
- package/dist/composed/avatar-group.js.map +1 -1
- package/dist/composed/bulk-action-bar.d.ts.map +1 -1
- package/dist/composed/bulk-action-bar.js +40 -40
- package/dist/composed/bulk-action-bar.js.map +1 -1
- package/dist/composed/command-palette.d.ts +0 -6
- package/dist/composed/command-palette.d.ts.map +1 -1
- package/dist/composed/command-palette.js +131 -131
- package/dist/composed/command-palette.js.map +1 -1
- package/dist/composed/confirm-dialog.d.ts.map +1 -1
- package/dist/composed/confirm-dialog.js.map +1 -1
- package/dist/composed/content-card.d.ts.map +1 -1
- package/dist/composed/content-card.js.map +1 -1
- package/dist/composed/date-picker/calendar-grid.d.ts.map +1 -1
- package/dist/composed/date-picker/date-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/date-range-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/date-time-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/index.d.ts +11 -11
- package/dist/composed/date-picker/index.d.ts.map +1 -1
- package/dist/composed/date-picker/index.js +1 -1
- package/dist/composed/date-picker/month-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/presets.d.ts.map +1 -1
- package/dist/composed/date-picker/time-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/year-picker.d.ts.map +1 -1
- package/dist/composed/deadline-indicator.d.ts.map +1 -1
- package/dist/composed/deadline-indicator.js +25 -25
- package/dist/composed/deadline-indicator.js.map +1 -1
- package/dist/composed/emoji-picker.d.ts.map +1 -1
- package/dist/composed/emoji-picker.js +37 -37
- package/dist/composed/emoji-picker.js.map +1 -1
- package/dist/composed/empty-state.d.ts.map +1 -1
- package/dist/composed/empty-state.js +21 -21
- package/dist/composed/empty-state.js.map +1 -1
- package/dist/composed/error-boundary.d.ts +1 -1
- package/dist/composed/error-boundary.d.ts.map +1 -1
- package/dist/composed/error-boundary.js.map +1 -1
- package/dist/composed/extensions/emoji-node.d.ts.map +1 -1
- package/dist/composed/extensions/emoji-suggestion.d.ts.map +1 -1
- package/dist/composed/extensions/file-attachment.d.ts.map +1 -1
- package/dist/composed/extensions/mention-suggestion.d.ts +1 -1
- package/dist/composed/extensions/mention-suggestion.d.ts.map +1 -1
- package/dist/composed/extensions/slash-command.d.ts +1 -1
- package/dist/composed/extensions/slash-command.d.ts.map +1 -1
- package/dist/composed/file-preview/audio-preview.d.ts.map +1 -1
- package/dist/composed/file-preview/document-preview.d.ts.map +1 -1
- package/dist/composed/file-preview/embed-preview.d.ts.map +1 -1
- package/dist/composed/file-preview/image-preview.d.ts.map +1 -1
- package/dist/composed/file-preview/shared.d.ts.map +1 -1
- package/dist/composed/file-preview/video-preview.d.ts.map +1 -1
- package/dist/composed/file-preview.d.ts.map +1 -1
- package/dist/composed/filter-bar.d.ts +1 -1
- package/dist/composed/filter-bar.d.ts.map +1 -1
- package/dist/composed/filter-bar.js +54 -54
- package/dist/composed/filter-bar.js.map +1 -1
- package/dist/composed/form-section.d.ts.map +1 -1
- package/dist/composed/form-section.js +26 -26
- package/dist/composed/form-section.js.map +1 -1
- package/dist/composed/global-loading.d.ts.map +1 -1
- package/dist/composed/global-loading.js.map +1 -1
- package/dist/composed/index.d.ts +55 -55
- package/dist/composed/index.d.ts.map +1 -1
- package/dist/composed/index.js +17 -17
- package/dist/composed/inline-edit.d.ts.map +1 -1
- package/dist/composed/inline-edit.js.map +1 -1
- package/dist/composed/loading-skeleton.d.ts +1 -1
- package/dist/composed/loading-skeleton.d.ts.map +1 -1
- package/dist/composed/loading-skeleton.js.map +1 -1
- package/dist/composed/markdown-viewer.d.ts.map +1 -1
- package/dist/composed/markdown-viewer.js +3 -3
- package/dist/composed/markdown-viewer.js.map +1 -1
- package/dist/composed/master-detail.d.ts.map +1 -1
- package/dist/composed/master-detail.js +42 -42
- package/dist/composed/master-detail.js.map +1 -1
- package/dist/composed/member-picker.d.ts.map +1 -1
- package/dist/composed/member-picker.js.map +1 -1
- package/dist/composed/multi-select-popover.d.ts.map +1 -1
- package/dist/composed/multi-select-popover.js +55 -55
- package/dist/composed/multi-select-popover.js.map +1 -1
- package/dist/composed/page-header.d.ts.map +1 -1
- package/dist/composed/page-header.js.map +1 -1
- package/dist/composed/page-skeletons.d.ts.map +1 -1
- package/dist/composed/page-skeletons.js.map +1 -1
- package/dist/composed/priority-indicator.d.ts.map +1 -1
- package/dist/composed/priority-indicator.js +34 -34
- package/dist/composed/priority-indicator.js.map +1 -1
- package/dist/composed/responsive-overlay.d.ts.map +1 -1
- package/dist/composed/responsive-overlay.js.map +1 -1
- package/dist/composed/rich-chat-input/attachment-strip.d.ts.map +1 -1
- package/dist/composed/rich-chat-input/audio-player.d.ts.map +1 -1
- package/dist/composed/rich-chat-input/audio-waveform.d.ts.map +1 -1
- package/dist/composed/rich-chat-input/chat-toolbar.d.ts.map +1 -1
- package/dist/composed/rich-chat-input/recording-overlay.d.ts.map +1 -1
- package/dist/composed/rich-chat-input/reply-banner.d.ts.map +1 -1
- package/dist/composed/rich-chat-input/schedule-send.d.ts.map +1 -1
- package/dist/composed/rich-chat-input.d.ts +6 -6
- package/dist/composed/rich-chat-input.d.ts.map +1 -1
- package/dist/composed/rich-chat-input.js +1 -1
- package/dist/composed/rich-text-editor.d.ts.map +1 -1
- package/dist/composed/rich-text-editor.js +24 -24
- package/dist/composed/rich-text-editor.js.map +1 -1
- package/dist/composed/schedule-view.d.ts.map +1 -1
- package/dist/composed/schedule-view.js +53 -53
- package/dist/composed/schedule-view.js.map +1 -1
- package/dist/composed/simple-tooltip.d.ts.map +1 -1
- package/dist/composed/simple-tooltip.js.map +1 -1
- package/dist/composed/status-badge.d.ts +1 -1
- package/dist/composed/status-badge.d.ts.map +1 -1
- package/dist/composed/status-badge.js +30 -30
- package/dist/composed/status-badge.js.map +1 -1
- package/dist/hooks/index.d.ts +3 -3
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/use-color-mode.js.map +1 -1
- package/dist/hooks/use-toast.d.ts +1 -1
- package/dist/hooks/use-toast.d.ts.map +1 -1
- package/dist/motion/index.d.ts +2 -2
- package/dist/motion/index.d.ts.map +1 -1
- package/dist/motion/index.js.map +1 -1
- package/dist/motion/motion-provider.d.ts +1 -1
- package/dist/motion/motion-provider.d.ts.map +1 -1
- package/dist/motion/primitives-index.d.ts +1 -1
- package/dist/motion/primitives-index.d.ts.map +1 -1
- package/dist/motion/primitives-index.js +40 -40
- package/dist/motion/primitives-index.js.map +1 -1
- package/dist/motion/primitives.d.ts +1 -1
- package/dist/motion/primitives.d.ts.map +1 -1
- package/dist/shell/app-command-palette.d.ts +0 -8
- package/dist/shell/app-command-palette.d.ts.map +1 -1
- package/dist/shell/app-command-palette.js.map +1 -1
- package/dist/shell/bottom-navbar.d.ts +0 -6
- package/dist/shell/bottom-navbar.d.ts.map +1 -1
- package/dist/shell/bottom-navbar.js +62 -62
- package/dist/shell/bottom-navbar.js.map +1 -1
- package/dist/shell/index.d.ts +8 -8
- package/dist/shell/index.d.ts.map +1 -1
- package/dist/shell/index.js +5 -5
- package/dist/shell/link-context.d.ts +1 -1
- package/dist/shell/link-context.d.ts.map +1 -1
- package/dist/shell/notification-center.d.ts +0 -6
- package/dist/shell/notification-center.d.ts.map +1 -1
- package/dist/shell/notification-center.js +54 -54
- package/dist/shell/notification-center.js.map +1 -1
- package/dist/shell/notification-preferences.d.ts +0 -6
- package/dist/shell/notification-preferences.d.ts.map +1 -1
- package/dist/shell/notification-preferences.js +22 -22
- package/dist/shell/notification-preferences.js.map +1 -1
- package/dist/shell/sidebar.d.ts.map +1 -1
- package/dist/shell/sidebar.js.map +1 -1
- package/dist/shell/top-bar.d.ts +0 -6
- package/dist/shell/top-bar.d.ts.map +1 -1
- package/dist/shell/top-bar.js.map +1 -1
- package/dist/tailwind/index.cjs +15 -499
- package/dist/tailwind/preset.d.ts +21 -0
- package/dist/tailwind/preset.d.ts.map +1 -1
- package/dist/tailwind/preset.js +14 -489
- package/dist/tailwind/preset.js.map +1 -1
- package/dist/tokens/animations.css +17 -0
- package/dist/tokens/base.css +26 -0
- package/dist/tokens/index.css +22 -0
- package/dist/tokens/semantic.css +436 -464
- package/dist/tokens/shilp-sutra.css +41 -0
- package/dist/tokens/typography-semantic.css +48 -41
- package/dist/tokens/utilities.css +276 -0
- package/dist/tokens/variants.css +14 -0
- package/dist/ui/accordion.d.ts +2 -2
- package/dist/ui/accordion.d.ts.map +1 -1
- package/dist/ui/accordion.js +23 -23
- package/dist/ui/accordion.js.map +1 -1
- package/dist/ui/alert-dialog.d.ts +2 -2
- package/dist/ui/alert-dialog.d.ts.map +1 -1
- package/dist/ui/alert-dialog.js +37 -37
- package/dist/ui/alert-dialog.js.map +1 -1
- package/dist/ui/alert.d.ts.map +1 -1
- package/dist/ui/alert.js +36 -36
- package/dist/ui/alert.js.map +1 -1
- package/dist/ui/aspect-ratio.d.ts +1 -1
- package/dist/ui/aspect-ratio.d.ts.map +1 -1
- package/dist/ui/aspect-ratio.js.map +1 -1
- package/dist/ui/autocomplete.d.ts +1 -1
- package/dist/ui/autocomplete.d.ts.map +1 -1
- package/dist/ui/autocomplete.js +27 -27
- package/dist/ui/autocomplete.js.map +1 -1
- package/dist/ui/avatar.d.ts +2 -2
- package/dist/ui/avatar.d.ts.map +1 -1
- package/dist/ui/avatar.js +41 -41
- package/dist/ui/avatar.js.map +1 -1
- package/dist/ui/badge-group.d.ts.map +1 -1
- package/dist/ui/badge-indicator.d.ts.map +1 -1
- package/dist/ui/badge-indicator.js +10 -10
- package/dist/ui/badge-indicator.js.map +1 -1
- package/dist/ui/badge.d.ts +2 -2
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/banner.d.ts.map +1 -1
- package/dist/ui/banner.js +28 -28
- package/dist/ui/banner.js.map +1 -1
- package/dist/ui/breadcrumb.d.ts +1 -1
- package/dist/ui/breadcrumb.d.ts.map +1 -1
- package/dist/ui/breadcrumb.js.map +1 -1
- package/dist/ui/button-group.d.ts.map +1 -1
- package/dist/ui/button-group.js.map +1 -1
- package/dist/ui/button-processing.d.ts.map +1 -1
- package/dist/ui/button-processing.js +15 -15
- package/dist/ui/button-processing.js.map +1 -1
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +84 -84
- package/dist/ui/button.js.map +1 -1
- package/dist/ui/card.d.ts +1 -1
- package/dist/ui/card.d.ts.map +1 -1
- package/dist/ui/card.js +28 -28
- package/dist/ui/card.js.map +1 -1
- package/dist/ui/charts/_internal/axes.d.ts +1 -1
- package/dist/ui/charts/_internal/axes.d.ts.map +1 -1
- package/dist/ui/charts/_internal/grid-lines.d.ts.map +1 -1
- package/dist/ui/charts/_internal/legend.d.ts.map +1 -1
- package/dist/ui/charts/_internal/tooltip.d.ts +1 -1
- package/dist/ui/charts/_internal/tooltip.d.ts.map +1 -1
- package/dist/ui/charts/area-chart.d.ts.map +1 -1
- package/dist/ui/charts/bar-chart.d.ts +1 -1
- package/dist/ui/charts/bar-chart.d.ts.map +1 -1
- package/dist/ui/charts/chart-container.d.ts.map +1 -1
- package/dist/ui/charts/gauge-chart.d.ts.map +1 -1
- package/dist/ui/charts/index.d.ts +5 -5
- package/dist/ui/charts/index.d.ts.map +1 -1
- package/dist/ui/charts/index.js +616 -616
- package/dist/ui/charts/index.js.map +1 -1
- package/dist/ui/charts/line-chart.d.ts.map +1 -1
- package/dist/ui/charts/pie-chart.d.ts.map +1 -1
- package/dist/ui/charts/radar-chart.d.ts.map +1 -1
- package/dist/ui/charts/sparkline.d.ts.map +1 -1
- package/dist/ui/chat/date-separator.d.ts.map +1 -1
- package/dist/ui/chat/index.d.ts +4 -4
- package/dist/ui/chat/index.d.ts.map +1 -1
- package/dist/ui/chat/index.js +1 -1
- package/dist/ui/chat/message-input.d.ts.map +1 -1
- package/dist/ui/chat/message-list.d.ts.map +1 -1
- package/dist/ui/chat/message.d.ts +1 -1
- package/dist/ui/chat/message.d.ts.map +1 -1
- package/dist/ui/chat/system-message.d.ts.map +1 -1
- package/dist/ui/chat/typing-indicator.d.ts.map +1 -1
- package/dist/ui/chat/unread-separator.d.ts.map +1 -1
- package/dist/ui/checkbox.d.ts.map +1 -1
- package/dist/ui/checkbox.js +18 -18
- package/dist/ui/checkbox.js.map +1 -1
- package/dist/ui/code.d.ts.map +1 -1
- package/dist/ui/code.js.map +1 -1
- package/dist/ui/collapsible.d.ts +2 -2
- package/dist/ui/collapsible.d.ts.map +1 -1
- package/dist/ui/collapsible.js +10 -10
- package/dist/ui/collapsible.js.map +1 -1
- package/dist/ui/color-input.d.ts.map +1 -1
- package/dist/ui/color-input.js +85 -85
- package/dist/ui/color-input.js.map +1 -1
- package/dist/ui/color-swatch.d.ts.map +1 -1
- package/dist/ui/color-swatch.js.map +1 -1
- package/dist/ui/combobox.d.ts.map +1 -1
- package/dist/ui/combobox.js +58 -58
- package/dist/ui/combobox.js.map +1 -1
- package/dist/ui/container.d.ts.map +1 -1
- package/dist/ui/container.js.map +1 -1
- package/dist/ui/context-menu.d.ts +2 -2
- package/dist/ui/context-menu.d.ts.map +1 -1
- package/dist/ui/context-menu.js +47 -47
- package/dist/ui/context-menu.js.map +1 -1
- package/dist/ui/data-table-body.d.ts +1 -1
- package/dist/ui/data-table-body.d.ts.map +1 -1
- package/dist/ui/data-table-body.js +43 -43
- package/dist/ui/data-table-body.js.map +1 -1
- package/dist/ui/data-table-bulk-actions.js.map +1 -1
- package/dist/ui/data-table-card.d.ts.map +1 -1
- package/dist/ui/data-table-card.js +7 -7
- package/dist/ui/data-table-card.js.map +1 -1
- package/dist/ui/data-table-context.d.ts +1 -1
- package/dist/ui/data-table-context.d.ts.map +1 -1
- package/dist/ui/data-table-context.js.map +1 -1
- package/dist/ui/data-table-header.js +38 -38
- package/dist/ui/data-table-header.js.map +1 -1
- package/dist/ui/data-table-pagination.js.map +1 -1
- package/dist/ui/data-table-toolbar.d.ts.map +1 -1
- package/dist/ui/data-table-toolbar.js.map +1 -1
- package/dist/ui/data-table.d.ts +2 -2
- package/dist/ui/data-table.d.ts.map +1 -1
- package/dist/ui/data-table.js +5 -5
- package/dist/ui/data-table.js.map +1 -1
- package/dist/ui/devalok-grain.js +8 -8
- package/dist/ui/devalok-grain.js.map +1 -1
- package/dist/ui/dialog.d.ts +2 -2
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +41 -41
- package/dist/ui/dialog.js.map +1 -1
- package/dist/ui/dropdown-menu.d.ts +2 -2
- package/dist/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/ui/dropdown-menu.js +46 -46
- package/dist/ui/dropdown-menu.js.map +1 -1
- package/dist/ui/file-upload.d.ts.map +1 -1
- package/dist/ui/file-upload.js +54 -54
- package/dist/ui/file-upload.js.map +1 -1
- package/dist/ui/form.d.ts.map +1 -1
- package/dist/ui/form.js +17 -17
- package/dist/ui/form.js.map +1 -1
- package/dist/ui/hover-card.d.ts +2 -2
- package/dist/ui/hover-card.d.ts.map +1 -1
- package/dist/ui/hover-card.js +19 -19
- package/dist/ui/hover-card.js.map +1 -1
- package/dist/ui/icon-button.d.ts.map +1 -1
- package/dist/ui/icon-button.js.map +1 -1
- package/dist/ui/icon-group.d.ts.map +1 -1
- package/dist/ui/icon-group.js +4 -4
- package/dist/ui/icon-group.js.map +1 -1
- package/dist/ui/icon.d.ts.map +1 -1
- package/dist/ui/icon.js +32 -32
- package/dist/ui/icon.js.map +1 -1
- package/dist/ui/index.d.ts +57 -57
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +27 -27
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/input-otp.d.ts +1 -1
- package/dist/ui/input-otp.d.ts.map +1 -1
- package/dist/ui/input-otp.js.map +1 -1
- package/dist/ui/input.d.ts.map +1 -1
- package/dist/ui/input.js +14 -14
- package/dist/ui/input.js.map +1 -1
- package/dist/ui/label.d.ts +1 -1
- package/dist/ui/label.d.ts.map +1 -1
- package/dist/ui/label.js.map +1 -1
- package/dist/ui/lib/bottom-sheet.d.ts.map +1 -1
- package/dist/ui/lib/index.d.ts +4 -4
- package/dist/ui/lib/index.d.ts.map +1 -1
- package/dist/ui/lib/slot.d.ts +1 -1
- package/dist/ui/lib/slot.d.ts.map +1 -1
- package/dist/ui/lib/utils.d.ts.map +1 -1
- package/dist/ui/lib/utils.js.map +1 -1
- package/dist/ui/link.d.ts.map +1 -1
- package/dist/ui/link.js.map +1 -1
- package/dist/ui/menubar.d.ts +2 -2
- package/dist/ui/menubar.d.ts.map +1 -1
- package/dist/ui/menubar.js +64 -64
- package/dist/ui/menubar.js.map +1 -1
- package/dist/ui/navigation-menu.d.ts +2 -2
- package/dist/ui/navigation-menu.d.ts.map +1 -1
- package/dist/ui/navigation-menu.js +72 -72
- package/dist/ui/navigation-menu.js.map +1 -1
- package/dist/ui/number-input.d.ts.map +1 -1
- package/dist/ui/number-input.js.map +1 -1
- package/dist/ui/pagination.d.ts +1 -1
- package/dist/ui/pagination.d.ts.map +1 -1
- package/dist/ui/pagination.js.map +1 -1
- package/dist/ui/popover.d.ts +2 -2
- package/dist/ui/popover.d.ts.map +1 -1
- package/dist/ui/progress-ring.d.ts +1 -1
- package/dist/ui/progress-ring.d.ts.map +1 -1
- package/dist/ui/progress-ring.js +33 -33
- package/dist/ui/progress-ring.js.map +1 -1
- package/dist/ui/progress.d.ts +2 -2
- package/dist/ui/progress.d.ts.map +1 -1
- package/dist/ui/progress.js +23 -23
- package/dist/ui/progress.js.map +1 -1
- package/dist/ui/radio.d.ts.map +1 -1
- package/dist/ui/radio.js +19 -19
- package/dist/ui/radio.js.map +1 -1
- package/dist/ui/search-input.d.ts.map +1 -1
- package/dist/ui/search-input.js +17 -17
- package/dist/ui/search-input.js.map +1 -1
- package/dist/ui/segmented-control.d.ts.map +1 -1
- package/dist/ui/segmented-control.js +18 -18
- package/dist/ui/segmented-control.js.map +1 -1
- package/dist/ui/select.d.ts +2 -2
- package/dist/ui/select.d.ts.map +1 -1
- package/dist/ui/select.js +68 -68
- package/dist/ui/select.js.map +1 -1
- package/dist/ui/separator.d.ts +1 -1
- package/dist/ui/separator.d.ts.map +1 -1
- package/dist/ui/separator.js.map +1 -1
- package/dist/ui/sheet.d.ts +2 -2
- package/dist/ui/sheet.d.ts.map +1 -1
- package/dist/ui/sheet.js +44 -44
- package/dist/ui/sheet.js.map +1 -1
- package/dist/ui/sidebar.d.ts +1 -1
- package/dist/ui/sidebar.d.ts.map +1 -1
- package/dist/ui/sidebar.js +155 -155
- package/dist/ui/sidebar.js.map +1 -1
- package/dist/ui/skeleton.d.ts +1 -1
- package/dist/ui/skeleton.d.ts.map +1 -1
- package/dist/ui/skeleton.js +2 -2
- package/dist/ui/skeleton.js.map +1 -1
- package/dist/ui/slider.d.ts +2 -2
- package/dist/ui/slider.d.ts.map +1 -1
- package/dist/ui/slider.js +5 -5
- package/dist/ui/slider.js.map +1 -1
- package/dist/ui/spinner.d.ts.map +1 -1
- package/dist/ui/spinner.js +21 -21
- package/dist/ui/spinner.js.map +1 -1
- package/dist/ui/split-button.d.ts +1 -1
- package/dist/ui/split-button.d.ts.map +1 -1
- package/dist/ui/split-button.js +28 -28
- package/dist/ui/split-button.js.map +1 -1
- package/dist/ui/stack.d.ts +1 -1
- package/dist/ui/stack.d.ts.map +1 -1
- package/dist/ui/stack.js.map +1 -1
- package/dist/ui/stat-card.d.ts.map +1 -1
- package/dist/ui/stat-card.js +73 -73
- package/dist/ui/stat-card.js.map +1 -1
- package/dist/ui/status-dot.d.ts.map +1 -1
- package/dist/ui/status-dot.js.map +1 -1
- package/dist/ui/stepper.d.ts +1 -1
- package/dist/ui/stepper.d.ts.map +1 -1
- package/dist/ui/stepper.js +48 -48
- package/dist/ui/stepper.js.map +1 -1
- package/dist/ui/switch.d.ts +1 -1
- package/dist/ui/switch.d.ts.map +1 -1
- package/dist/ui/switch.js +15 -15
- package/dist/ui/switch.js.map +1 -1
- package/dist/ui/table.d.ts +1 -1
- package/dist/ui/table.d.ts.map +1 -1
- package/dist/ui/table.js.map +1 -1
- package/dist/ui/tabs.d.ts +2 -2
- package/dist/ui/tabs.d.ts.map +1 -1
- package/dist/ui/tabs.js +52 -52
- package/dist/ui/tabs.js.map +1 -1
- package/dist/ui/text.d.ts +1 -1
- package/dist/ui/text.d.ts.map +1 -1
- package/dist/ui/text.js.map +1 -1
- package/dist/ui/textarea.d.ts.map +1 -1
- package/dist/ui/textarea.js +13 -13
- package/dist/ui/textarea.js.map +1 -1
- package/dist/ui/toast-registry.js.map +1 -1
- package/dist/ui/toast.d.ts +3 -3
- package/dist/ui/toast.d.ts.map +1 -1
- package/dist/ui/toast.js +164 -164
- package/dist/ui/toast.js.map +1 -1
- package/dist/ui/toaster.d.ts.map +1 -1
- package/dist/ui/toaster.js +6 -6
- package/dist/ui/toaster.js.map +1 -1
- package/dist/ui/toggle-group.d.ts +1 -1
- package/dist/ui/toggle-group.d.ts.map +1 -1
- package/dist/ui/toggle-group.js.map +1 -1
- package/dist/ui/toggle.d.ts +1 -1
- package/dist/ui/toggle.d.ts.map +1 -1
- package/dist/ui/toggle.js +14 -14
- package/dist/ui/toggle.js.map +1 -1
- package/dist/ui/tooltip.d.ts +2 -2
- package/dist/ui/tooltip.d.ts.map +1 -1
- package/dist/ui/tooltip.js +26 -26
- package/dist/ui/tooltip.js.map +1 -1
- package/dist/ui/tree-view/index.d.ts +2 -2
- package/dist/ui/tree-view/index.d.ts.map +1 -1
- package/dist/ui/tree-view/index.js +1 -1
- package/dist/ui/tree-view/tree-view.d.ts +1 -1
- package/dist/ui/tree-view/tree-view.d.ts.map +1 -1
- package/dist/ui/visually-hidden.d.ts.map +1 -1
- package/dist/ui/visually-hidden.js.map +1 -1
- package/docs/components/_header.md +96 -0
- package/docs/rollback.md +179 -0
- package/llms-full.txt +97 -1
- package/llms.txt +24 -2
- package/package.json +296 -277
- package/dist/_chunks/framer.js +0 -5604
- package/dist/_chunks/framer.js.map +0 -1
- package/dist/_chunks/rolldown-runtime.js +0 -21
- package/dist/_chunks/sonner.js +0 -616
- package/dist/_chunks/sonner.js.map +0 -1
- package/dist/_chunks/stat-row.js +0 -432
- package/dist/_chunks/stat-row.js.map +0 -1
package/MIGRATION.md
ADDED
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
# Migration Guide
|
|
2
|
+
|
|
3
|
+
This page indexes all breaking changes across `@devalok/shilp-sutra` versions. For the full changelog, see [CHANGELOG.md](./CHANGELOG.md).
|
|
4
|
+
|
|
5
|
+
> **Upgrading from < 0.36?** Start here, then read each intermediate version section. Breaking changes stack — skipping versions means stacking migrations.
|
|
6
|
+
|
|
7
|
+
## v0.37.0 — Tailwind 4 CSS-first migration
|
|
8
|
+
|
|
9
|
+
0.37 completes the Tailwind 3 → 4 migration that started in 0.34. The JS preset is gone. Tokens now ship as `@theme` CSS variables that TW4 consumes directly. **This is a breaking setup change; component APIs are unchanged.**
|
|
10
|
+
|
|
11
|
+
> **During the RC window, 0.37 lives on the `@next` dist-tag.** Use `@devalok/shilp-sutra@next` in the commands below. Once stable promotes to `@latest`, plain `@devalok/shilp-sutra` or `@latest` resolves to 0.37.x too. Pin via `@0.37.0` only after the stable release announcement.
|
|
12
|
+
|
|
13
|
+
### Before you start — two constraints inherited from Tailwind 4 itself
|
|
14
|
+
|
|
15
|
+
- **Browser support.** Tailwind 4 requires **Safari 16.4+, Chrome 111+, Firefox 128+**. Consumer apps that must support older browsers should stay on 0.36 (via the `latest-0.36` dist-tag) until they can drop those targets.
|
|
16
|
+
- **PostCSS plugin rename.** If your app had a TW3-style `postcss.config.js` like this:
|
|
17
|
+
```js
|
|
18
|
+
// TW3 — no longer works in v4
|
|
19
|
+
module.exports = { plugins: { tailwindcss: {}, autoprefixer: {} } }
|
|
20
|
+
```
|
|
21
|
+
update to the v4 plugin:
|
|
22
|
+
```js
|
|
23
|
+
// TW4 — required
|
|
24
|
+
module.exports = { plugins: { '@tailwindcss/postcss': {} } }
|
|
25
|
+
```
|
|
26
|
+
Install: `pnpm add -D @tailwindcss/postcss`. Next.js 15+ / Vite users whose build already handles this transparently can skip this step.
|
|
27
|
+
|
|
28
|
+
### Quick migration checklist
|
|
29
|
+
|
|
30
|
+
1. Install the new required peers:
|
|
31
|
+
```sh
|
|
32
|
+
pnpm add framer-motion @devalok/shilp-sutra@next
|
|
33
|
+
# if you use toasts:
|
|
34
|
+
pnpm add sonner
|
|
35
|
+
```
|
|
36
|
+
2. Rewrite `app/globals.css`:
|
|
37
|
+
```diff
|
|
38
|
+
- @import "tailwindcss";
|
|
39
|
+
- @config "./tailwind.config.ts";
|
|
40
|
+
+ @import "tailwindcss";
|
|
41
|
+
+ @import "@devalok/shilp-sutra/css";
|
|
42
|
+
```
|
|
43
|
+
3. **Delete `tailwind.config.ts`** — unless you have your own plugins (see "Keeping your own plugins" below).
|
|
44
|
+
4. Verify `next.config.ts` transpiles BOTH packages:
|
|
45
|
+
```ts
|
|
46
|
+
transpilePackages: ['@devalok/shilp-sutra', '@devalok/shilp-sutra-brand'],
|
|
47
|
+
```
|
|
48
|
+
5. Run `pnpm why framer-motion` and confirm **a single version** (see "Framer-motion single-copy check").
|
|
49
|
+
6. Run a dark-mode sanity check (see below).
|
|
50
|
+
7. `pnpm build` — should succeed with no warnings mentioning shilp-sutra.
|
|
51
|
+
|
|
52
|
+
### Before / after: globals.css
|
|
53
|
+
|
|
54
|
+
**Before (0.36.x):**
|
|
55
|
+
```css
|
|
56
|
+
@import "tailwindcss";
|
|
57
|
+
@config "./tailwind.config.ts";
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**After (0.37.0):**
|
|
61
|
+
```css
|
|
62
|
+
@import "tailwindcss";
|
|
63
|
+
@import "@devalok/shilp-sutra/css";
|
|
64
|
+
|
|
65
|
+
/* Optional — your own plugins or content globs go here */
|
|
66
|
+
@plugin "@tailwindcss/typography";
|
|
67
|
+
@source "./app/**/*.{ts,tsx}";
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
`@import "@devalok/shilp-sutra/css"` pulls in our full token set (`@theme` blocks for color, spacing-ds, text-ds, leading-ds, radius, shadow, ease, duration, breakpoints, z-layers, animate), custom utilities (typography composites, focus-ring, touch-target, safe-area insets, z-layer utilities), the dark-mode `@custom-variant`, and a `@source` directive that scans our compiled classes.
|
|
71
|
+
|
|
72
|
+
### Delete tailwind.config.ts
|
|
73
|
+
|
|
74
|
+
You **no longer need** `tailwind.config.ts` for shilp-sutra. TW4 config is CSS-first via `@theme`. Delete it if that was its only purpose.
|
|
75
|
+
|
|
76
|
+
### Keeping your own plugins
|
|
77
|
+
|
|
78
|
+
If you had TW plugins of your own (e.g., `@tailwindcss/typography`, `@tailwindcss/forms`), keep them with the TW4 CSS directive:
|
|
79
|
+
|
|
80
|
+
```css
|
|
81
|
+
@plugin "@tailwindcss/typography";
|
|
82
|
+
@plugin "@tailwindcss/forms";
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
No JS config file required. If you had custom theme extensions, translate them to `@theme` blocks inside your `globals.css`.
|
|
86
|
+
|
|
87
|
+
### Legacy TW3 config APIs removed in v4
|
|
88
|
+
|
|
89
|
+
If your old `tailwind.config.ts` used any of these, they no longer exist:
|
|
90
|
+
|
|
91
|
+
| Removed API | Replacement |
|
|
92
|
+
|---|---|
|
|
93
|
+
| `corePlugins: { … }` | Omit utilities you don't want by not including them; use `@source not "..."` or custom variants to exclude patterns |
|
|
94
|
+
| `safelist: [...]` | `@source inline("bg-red-500 text-lg")` in globals.css |
|
|
95
|
+
| `separator: ':'` | Not configurable; always `:` |
|
|
96
|
+
| `prefix: 'tw-'` | `@import "tailwindcss" prefix(tw);` at top of globals.css |
|
|
97
|
+
| `resolveConfig()` / `defaultTheme` helpers | Read `@theme` CSS vars at runtime via `getComputedStyle(document.documentElement)` |
|
|
98
|
+
| `content: [...]` | `@source "./app/**/*.{ts,tsx}"` in globals.css |
|
|
99
|
+
| `darkMode: 'class'` | `@custom-variant dark (&:where(.dark, .dark *));` (already included in our `/css` bundle) |
|
|
100
|
+
|
|
101
|
+
If you relied on `resolveConfig()` for runtime theme access in TypeScript (e.g., to pull brand colors into framer-motion variants), migrate to reading CSS custom properties directly — they're all declared on `:root` / `.dark` by the `/css` import.
|
|
102
|
+
|
|
103
|
+
### Peer dependency changes
|
|
104
|
+
|
|
105
|
+
| Dep | 0.36.x | 0.37.0 |
|
|
106
|
+
|---|---|---|
|
|
107
|
+
| `framer-motion` | bundled | **required peer** (`^12.0.0`) |
|
|
108
|
+
| `sonner` | bundled | **optional peer** (`^2.0.0`) — only if you render a `<Toaster />` |
|
|
109
|
+
| `tailwindcss` | `^3.4.0 \|\| ^4.0.0` | **`^4.0.0` only** |
|
|
110
|
+
| `use-sync-external-store` | optional peer | now in `dependencies` (auto-installed) |
|
|
111
|
+
|
|
112
|
+
**Why framer-motion moved to peer:** module-scoped React contexts (`MotionConfig`, `AnimatePresence`, `LayoutGroup`) fail silently if two copies resolve. Making it a peer means *you* pin the version and pnpm dedupes it.
|
|
113
|
+
|
|
114
|
+
### Framer-motion single-copy check
|
|
115
|
+
|
|
116
|
+
Run:
|
|
117
|
+
```sh
|
|
118
|
+
pnpm why framer-motion
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**Expected:** one version, one instance. If you see two different versions, run:
|
|
122
|
+
```sh
|
|
123
|
+
pnpm dedupe
|
|
124
|
+
```
|
|
125
|
+
If dedupe doesn't collapse them (version ranges don't overlap), pin `framer-motion` at the top of your app's `package.json` `dependencies`, then `pnpm install`.
|
|
126
|
+
|
|
127
|
+
> **Note:** `pnpm why` reports what the lockfile resolved. Under strict-hoist, two copies can still coexist if they satisfy different peer ranges. If animations feel "stuck" or `AnimatePresence` exits don't fire, check `pnpm list framer-motion --depth=Infinity` as a second-level verification.
|
|
128
|
+
|
|
129
|
+
### Dark mode sanity check
|
|
130
|
+
|
|
131
|
+
Our `.dark` variant now uses `@custom-variant dark (&:where(.dark *))`. After upgrading, render a representative screen with `.dark` toggled on `<html>` (or your usual ancestor) and verify:
|
|
132
|
+
|
|
133
|
+
- Card backgrounds re-theme (not stuck on light)
|
|
134
|
+
- Solid buttons keep contrast
|
|
135
|
+
- Input borders are visible in dark
|
|
136
|
+
- Toast colors invert correctly
|
|
137
|
+
- Any surface shadows still appear (check `shadow-raised`, `shadow-overlay`)
|
|
138
|
+
|
|
139
|
+
If any of these is stuck on light, the `.dark` class isn't on an ancestor — add it to `<html>` (recommended) or `<body>`.
|
|
140
|
+
|
|
141
|
+
### Token collisions
|
|
142
|
+
|
|
143
|
+
Our spacing scale is namespaced `--spacing-ds-*` (→ `p-ds-03`, `gap-ds-04` etc.) to avoid colliding with TW4's default numeric spacing (`p-4`, `gap-6`). **If you define your own `--spacing-4` in `@theme`, it wins** — our utilities are `p-ds-04` not `p-4`. Typography uses `--text-ds-*`, `--leading-ds-*`. Radius is unprefixed (`--radius`, `--radius-ds-*`) because bare `rounded` / `rounded-ds-md` are the common idiom.
|
|
144
|
+
|
|
145
|
+
### Source class changes (in consumer code too)
|
|
146
|
+
|
|
147
|
+
If your own app code used any of these TW3-era patterns, update:
|
|
148
|
+
|
|
149
|
+
| TW3 (dead in TW4) | TW4 |
|
|
150
|
+
|---|---|
|
|
151
|
+
| `w-[--my-var]` | `w-(--my-var)` |
|
|
152
|
+
| `theme(spacing.4)` inside `w-[…]` | literal value (e.g., `1rem`) |
|
|
153
|
+
| `bg-gradient-to-r` | `bg-linear-to-r` |
|
|
154
|
+
| bare `shadow` | `shadow-sm`, `shadow-raised`, etc. |
|
|
155
|
+
| `outline-none` | `outline-hidden` |
|
|
156
|
+
| `rounded-sm` | `rounded-xs` |
|
|
157
|
+
| `!prefix` | `suffix!` |
|
|
158
|
+
|
|
159
|
+
Quick grep in your repo:
|
|
160
|
+
```sh
|
|
161
|
+
grep -rn 'w-\[--\|bg-gradient-to-\|theme(spacing' src/
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Troubleshooting
|
|
165
|
+
|
|
166
|
+
| Symptom | Cause | Fix |
|
|
167
|
+
|---|---|---|
|
|
168
|
+
| `Module not found: Can't resolve 'framer-motion'` on `next build` | framer-motion moved to peer, not installed | `pnpm add framer-motion` |
|
|
169
|
+
| `Module not found: Can't resolve 'sonner'` on `next build` | You import `Toaster`/`toast` from shilp-sutra but sonner isn't installed (optional peer) | `pnpm add sonner` |
|
|
170
|
+
| Toasts render without styling / `toast()` no-ops in dev | Same as above, but you didn't notice the build warning | `pnpm add sonner` |
|
|
171
|
+
| Classes like `p-ds-03` produce no CSS | missing `@import "@devalok/shilp-sutra/css"` in globals.css | add it |
|
|
172
|
+
| Classes like `p-ds-03` produce no CSS (import present) | pnpm strict-hoist hiding our dist from `@source` | verify `node_modules/.pnpm/@devalok+shilp-sutra@0.37.0/node_modules/@devalok/shilp-sutra/dist/` exists |
|
|
173
|
+
| Dark mode not switching | `.dark` not on an ancestor of the component | add `.dark` to `<html>` via `next-themes` or your color-mode hook |
|
|
174
|
+
| Animations feel broken / exits don't fire | two framer-motion copies | see "Framer-motion single-copy check" |
|
|
175
|
+
| `@config` warning on build | legacy config import in your CSS | remove `@config "..."` and use `@import "@devalok/shilp-sutra/css"` |
|
|
176
|
+
| `Unknown at-rule @theme` / `Unknown at-rule @utility` | PostCSS config still references `tailwindcss` + `autoprefixer` (TW3 style). TW4 uses a single plugin. | Install `@tailwindcss/postcss` and replace both plugins with `'@tailwindcss/postcss': {}` in `postcss.config.js`. See "Before you start" above. |
|
|
177
|
+
| `[@devalok/shilp-sutra] DEPRECATION: The JS preset at "./tailwind"...` notice on build | your `tailwind.config.ts` still has `presets: [shilpSutra]`, or a dependency's does | delete that line AND add `@import "@devalok/shilp-sutra/css"` to globals.css (both steps — the preset is a no-op stub in 0.37, removed in 0.38) |
|
|
178
|
+
| **App renders unstyled after upgrade; no build error** | You upgraded the package but did not add `@import "@devalok/shilp-sutra/css"` to `globals.css`. TW4 silently drops unknown utilities, so every `bg-surface-raised`/`p-ds-*`/`shadow-raised` class is emitting zero CSS. | Add the `@import` per step 2 above. If you see the DEPRECATION notice in your build output, heed it — that's the signal for exactly this scenario. |
|
|
179
|
+
| Dark mode no longer switches (worked on 0.36) | Same as above — the `@custom-variant dark` declaration lives in the DS `/css` bundle. Without the import, `dark:*` utilities also silently no-op. | Add `@import "@devalok/shilp-sutra/css"` to globals.css. |
|
|
180
|
+
|
|
181
|
+
### Upgrading from < 0.36
|
|
182
|
+
|
|
183
|
+
Read the intermediate sections below (0.34, 0.33, 0.32, 0.30, 0.29, 0.23, 0.9) in order. Each has component-level breakage you'll need to resolve before 0.37's setup-level breakage matters.
|
|
184
|
+
|
|
185
|
+
### Need to pin 0.36 temporarily?
|
|
186
|
+
|
|
187
|
+
Use the `latest-0.36` dist-tag:
|
|
188
|
+
```sh
|
|
189
|
+
pnpm add @devalok/shilp-sutra@latest-0.36
|
|
190
|
+
```
|
|
191
|
+
This keeps you on the last TW3-compatible minor. We will backport critical security fixes to the `latest-0.36` line through at least 2026-10-01.
|
|
192
|
+
|
|
193
|
+
### Rollback recipe (for maintainers)
|
|
194
|
+
|
|
195
|
+
See [`docs/rollback.md`](./docs/rollback.md) for the executable playbook.
|
|
196
|
+
|
|
197
|
+
## v0.34.0 (Tailwind 4 + Toolchain)
|
|
198
|
+
|
|
199
|
+
**Tailwind CSS 3 → 4:**
|
|
200
|
+
- `outline-none` → `outline-hidden`
|
|
201
|
+
- `rounded-sm` → `rounded-xs`
|
|
202
|
+
- `backdrop-blur-sm` → `backdrop-blur-xs`
|
|
203
|
+
- `!prefix` → `suffix!` important syntax
|
|
204
|
+
- Replace `darkMode: 'class'` with `@variant dark (&:is(.dark *))` in CSS
|
|
205
|
+
- Add `@import "tailwindcss"` + `@config` to your CSS entry point
|
|
206
|
+
- Peer dep accepts both `^3.4.0 || ^4.0.0`
|
|
207
|
+
|
|
208
|
+
**Other toolchain:**
|
|
209
|
+
- `tailwind-merge` 3.0 → 3.5 (required for TW4 class recognition)
|
|
210
|
+
- TypeScript 5.7 → 6.0.2 (`types` defaults to `[]` — add `"types": ["node"]` to tsconfig if needed)
|
|
211
|
+
- ESLint 9 → 10 (config lookup starts from linted file directory, not CWD)
|
|
212
|
+
- `react-zoom-pan-pinch` 3 → 4 (`onTransformed` → `onTransform`)
|
|
213
|
+
|
|
214
|
+
## v0.33.0
|
|
215
|
+
|
|
216
|
+
**2 breaking changes:**
|
|
217
|
+
|
|
218
|
+
### EmojiSuggestion factory pattern
|
|
219
|
+
|
|
220
|
+
```diff
|
|
221
|
+
- import { EmojiSuggestion } from '@devalok/shilp-sutra/composed'
|
|
222
|
+
+ import { createEmojiSuggestion } from '@devalok/shilp-sutra/composed'
|
|
223
|
+
+ const EmojiSuggestion = createEmojiSuggestion() // or createEmojiSuggestion('apple')
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### Emoji HTML output changed
|
|
227
|
+
|
|
228
|
+
Non-native `emojiSet` renders emoji as `<span data-emoji-id="..." role="img">` nodes, not raw Unicode. `plainText` still returns Unicode.
|
|
229
|
+
|
|
230
|
+
## v0.32.0
|
|
231
|
+
|
|
232
|
+
**6 breaking changes:**
|
|
233
|
+
|
|
234
|
+
### Button variant/color rename
|
|
235
|
+
|
|
236
|
+
```diff
|
|
237
|
+
- <Button variant="default"> → <Button variant="solid">
|
|
238
|
+
- <Button variant="destructive"> → <Button variant="solid" color="error">
|
|
239
|
+
- <Button color="default"> → <Button color="accent">
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### Chip removed — use Badge
|
|
243
|
+
|
|
244
|
+
```diff
|
|
245
|
+
- import { Chip } from '@devalok/shilp-sutra/ui'
|
|
246
|
+
+ import { Badge } from '@devalok/shilp-sutra/ui'
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### SegmentedControl rewritten
|
|
250
|
+
|
|
251
|
+
```diff
|
|
252
|
+
- <SegmentedControl variant="filled"> → <SegmentedControl variant="accent">
|
|
253
|
+
- <SegmentedControl variant="tonal"> → <SegmentedControl variant="default">
|
|
254
|
+
- <SegmentedControlItem> → (no longer exported — use options array)
|
|
255
|
+
- size="small|medium|big" → size="sm|md|lg"
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### TopBar renders as `<header>`
|
|
259
|
+
|
|
260
|
+
Was `<div>`, now `<header>`. If you had a wrapping `<header>`, remove it to avoid nested landmarks.
|
|
261
|
+
|
|
262
|
+
### Surface token rename
|
|
263
|
+
|
|
264
|
+
```diff
|
|
265
|
+
- bg-surface-1 → bg-surface-base
|
|
266
|
+
- bg-surface-2 → bg-surface-raised
|
|
267
|
+
- bg-surface-3 → bg-surface-raised-hover
|
|
268
|
+
- bg-surface-4 → bg-surface-raised-active
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### Shadow token rename
|
|
272
|
+
|
|
273
|
+
```diff
|
|
274
|
+
- shadow-01 → shadow-raised
|
|
275
|
+
- shadow-02 → shadow-raised-hover
|
|
276
|
+
- shadow-03 → shadow-floating
|
|
277
|
+
- shadow-04 → shadow-overlay
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
## v0.30.0
|
|
281
|
+
|
|
282
|
+
- **`@devalok/shilp-sutra-karm` removed** — Domain components moved to Karm app repo. The npm package is deprecated at v0.9.0.
|
|
283
|
+
|
|
284
|
+
No component API breakage. Drop-in upgrade from 0.29.0.
|
|
285
|
+
|
|
286
|
+
## v0.29.0
|
|
287
|
+
|
|
288
|
+
**4 breaking changes:**
|
|
289
|
+
|
|
290
|
+
### Warning color remapped (yellow → amber-bright)
|
|
291
|
+
|
|
292
|
+
`warning-*` tokens now use warm amber (OKLCH hue 65-70) instead of yellow (hue 85). If you hardcoded any `--yellow-*` primitives for warning states, switch to `--amber-bright-*` or the semantic `warning-*` tokens.
|
|
293
|
+
|
|
294
|
+
### Button icon API change
|
|
295
|
+
|
|
296
|
+
```tsx
|
|
297
|
+
// Before (0.28.x)
|
|
298
|
+
<Button startIcon={<IconPlus />}>Add</Button>
|
|
299
|
+
|
|
300
|
+
// After (0.29.0)
|
|
301
|
+
<Button startIcon={<Icon icon={IconPlus} />}>Add</Button>
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
### Badge rewrite
|
|
305
|
+
|
|
306
|
+
```tsx
|
|
307
|
+
// Before (0.28.x)
|
|
308
|
+
<Badge variant="secondary">Tag</Badge>
|
|
309
|
+
<Badge variant="destructive">Error</Badge>
|
|
310
|
+
|
|
311
|
+
// After (0.29.0)
|
|
312
|
+
<Badge variant="subtle">Tag</Badge>
|
|
313
|
+
<Badge variant="solid" color="error">Error</Badge>
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
Removed: `variant="secondary"`, `variant="destructive"`, `color="brand"`.
|
|
317
|
+
Added: `variant="soft"`, `color="custom"`, interactive props, `Badge.Indicator`, `Badge.Group`.
|
|
318
|
+
|
|
319
|
+
### Chip deprecated
|
|
320
|
+
|
|
321
|
+
```tsx
|
|
322
|
+
// Before
|
|
323
|
+
<Chip label="Tag" onDelete={fn} />
|
|
324
|
+
|
|
325
|
+
// After
|
|
326
|
+
<Badge onClick={fn} onDismiss={fn}>Tag</Badge>
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
## v0.23.0
|
|
330
|
+
|
|
331
|
+
**Surface and shadow token migration.** See the detailed guide: [plans/2026-03-16-surface-shadow-consistency-design.md](plans/2026-03-16-surface-shadow-consistency-design.md).
|
|
332
|
+
|
|
333
|
+
Key renames:
|
|
334
|
+
- `bg-surface-1` → `bg-surface-base`
|
|
335
|
+
- `bg-surface-2` → `bg-surface-raised`
|
|
336
|
+
- `bg-surface-3` → `bg-surface-raised-hover`
|
|
337
|
+
- `bg-surface-4` → `bg-surface-raised-active`
|
|
338
|
+
- `shadow-01` through `shadow-05` → `shadow-raised`, `shadow-raised-hover`, `shadow-floating`, `shadow-overlay`
|
|
339
|
+
|
|
340
|
+
## v0.9.0
|
|
341
|
+
|
|
342
|
+
**Dependency bundling.** All runtime deps now bundled into dist. Only React + peer deps stay external. Fixes React #527 in Next.js + pnpm. No API changes, but consumers should add to `next.config.js`:
|
|
343
|
+
|
|
344
|
+
```js
|
|
345
|
+
transpilePackages: ["@devalok/shilp-sutra", "@devalok/shilp-sutra-brand"]
|
|
346
|
+
```
|
package/README.md
CHANGED
|
@@ -11,42 +11,45 @@ For full documentation, setup guides, and architecture details, see the [monorep
|
|
|
11
11
|
## Install
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
pnpm add @devalok/shilp-sutra
|
|
14
|
+
pnpm add @devalok/shilp-sutra framer-motion
|
|
15
|
+
# Only if you render a <Toaster />:
|
|
16
|
+
pnpm add sonner
|
|
15
17
|
```
|
|
16
18
|
|
|
19
|
+
> **Upgrading from < 0.37?** 0.37 is a Tailwind 4 CSS-first release — the setup has changed. Read [MIGRATION.md](https://github.com/devalok-design/shilp-sutra/blob/main/MIGRATION.md#v0370--tailwind-4-css-first-migration).
|
|
20
|
+
|
|
17
21
|
## Quick Start
|
|
18
22
|
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
import
|
|
23
|
+
```css
|
|
24
|
+
/* app/globals.css */
|
|
25
|
+
@import "tailwindcss";
|
|
26
|
+
@import "@devalok/shilp-sutra/css";
|
|
27
|
+
```
|
|
22
28
|
|
|
29
|
+
```ts
|
|
30
|
+
// next.config.ts
|
|
23
31
|
export default {
|
|
24
|
-
|
|
25
|
-
content: [
|
|
26
|
-
'./app/**/*.{ts,tsx}',
|
|
27
|
-
'./node_modules/@devalok/shilp-sutra/dist/**/*.js',
|
|
28
|
-
],
|
|
32
|
+
transpilePackages: ['@devalok/shilp-sutra', '@devalok/shilp-sutra-brand'],
|
|
29
33
|
}
|
|
30
34
|
```
|
|
31
35
|
|
|
32
|
-
```tsx
|
|
33
|
-
// app/layout.tsx
|
|
34
|
-
import '@devalok/shilp-sutra/tokens'
|
|
35
|
-
```
|
|
36
|
-
|
|
37
36
|
```tsx
|
|
38
37
|
// Any component
|
|
39
38
|
import { Button } from '@devalok/shilp-sutra/ui/button'
|
|
40
39
|
```
|
|
41
40
|
|
|
41
|
+
No `tailwind.config.ts` required from us. Your own plugins or content globs go in `globals.css` via TW4 directives (`@plugin`, `@source`, `@theme`).
|
|
42
|
+
|
|
42
43
|
## Peer Dependencies
|
|
43
44
|
|
|
44
45
|
### Required
|
|
45
46
|
|
|
46
|
-
| Package | Version |
|
|
47
|
-
|
|
48
|
-
| `react` | `^18 \|\| ^19` |
|
|
49
|
-
| `react-dom` | `^18 \|\| ^19` |
|
|
47
|
+
| Package | Version | Why |
|
|
48
|
+
|---|---|---|
|
|
49
|
+
| `react` | `^18 \|\| ^19` | |
|
|
50
|
+
| `react-dom` | `^18 \|\| ^19` | |
|
|
51
|
+
| `tailwindcss` | `^4.0.0` | We ship TW4 `@theme` CSS; TW3 is not supported |
|
|
52
|
+
| `framer-motion` | `^12.0.0` | Shared-state motion contexts must be single-copy |
|
|
50
53
|
|
|
51
54
|
### Optional
|
|
52
55
|
|
|
@@ -54,28 +57,22 @@ Install only what you use:
|
|
|
54
57
|
|
|
55
58
|
| Feature | Packages |
|
|
56
59
|
|---------|----------|
|
|
60
|
+
| Toasts (`./ui/toaster`, `./ui/toast`) | `sonner` |
|
|
57
61
|
| Charts (`./ui/charts`) | `d3-array`, `d3-axis`, `d3-format`, `d3-interpolate`, `d3-scale`, `d3-selection`, `d3-shape`, `d3-time-format`, `d3-transition` |
|
|
58
|
-
| Rich Text Editor (`./composed/rich-text-editor`) | `@tiptap/react`, `@tiptap/starter-kit
|
|
62
|
+
| Rich Text Editor (`./composed/rich-text-editor`) | `@tiptap/react`, `@tiptap/starter-kit` |
|
|
59
63
|
| DataTable (`./ui/data-table`) | `@tanstack/react-table`, `@tanstack/react-virtual` |
|
|
60
64
|
| Icons | `@tabler/icons-react` |
|
|
61
65
|
| Date components (`./composed/date-picker`) | `date-fns` |
|
|
62
66
|
| OTP Input (`./ui/input-otp`) | `input-otp` |
|
|
63
|
-
| Markdown rendering | `react-markdown` |
|
|
64
|
-
|
|
65
|
-
## Next.js
|
|
66
|
-
|
|
67
|
-
Add to `next.config.js`:
|
|
68
|
-
|
|
69
|
-
```js
|
|
70
|
-
transpilePackages: ["@devalok/shilp-sutra", "@devalok/shilp-sutra-brand"]
|
|
71
|
-
```
|
|
67
|
+
| Markdown rendering | `react-markdown`, `remark-gfm` |
|
|
68
|
+
| PDF preview (`./composed/file-preview`) | `react-pdf`, `react-zoom-pan-pinch` |
|
|
72
69
|
|
|
73
70
|
## Links
|
|
74
71
|
|
|
75
72
|
- [Storybook](https://devalok-design.github.io/shilp-sutra/) -- interactive component docs
|
|
76
73
|
- [Monorepo README](https://github.com/devalok-design/shilp-sutra#readme) -- full docs, architecture, component list
|
|
77
74
|
- [Changelog](https://github.com/devalok-design/shilp-sutra/blob/main/CHANGELOG.md)
|
|
78
|
-
- [Migration Guide](https://github.com/devalok-design/shilp-sutra/blob/main/
|
|
75
|
+
- [Migration Guide](https://github.com/devalok-design/shilp-sutra/blob/main/MIGRATION.md)
|
|
79
76
|
|
|
80
77
|
## License
|
|
81
78
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Hn as e } from "./primitives.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
3
|
+
import { durations as t, springs as n } from "../ui/lib/motion.js";
|
|
4
|
+
import { t as r } from "./vendor-utils.js";
|
|
5
|
+
import { cn as i } from "../ui/lib/utils.js";
|
|
6
|
+
import { Icon as a } from "../ui/icon.js";
|
|
7
|
+
import { BadgeIndicator as o } from "../ui/badge-indicator.js";
|
|
8
|
+
import * as s from "react";
|
|
9
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
10
|
+
import { IconCheck as u, IconX as d } from "@tabler/icons-react";
|
|
11
|
+
import { AnimatePresence as f, motion as p, useReducedMotion as m } from "framer-motion";
|
|
12
12
|
//#region src/ui/badge.tsx
|
|
13
13
|
var h = {
|
|
14
14
|
default: {
|
|
@@ -114,13 +114,13 @@ function g(e, t) {
|
|
|
114
114
|
if (t === "custom") return "";
|
|
115
115
|
let n = h[t];
|
|
116
116
|
switch (e) {
|
|
117
|
-
case "subtle": return
|
|
118
|
-
case "solid": return
|
|
119
|
-
case "outline": return
|
|
120
|
-
case "soft": return
|
|
117
|
+
case "subtle": return i(n.bg, n.fg, n.border);
|
|
118
|
+
case "solid": return i(n.solid, n.solidFg, "border-transparent");
|
|
119
|
+
case "outline": return i("bg-transparent", n.fg, n.border);
|
|
120
|
+
case "soft": return i(n.bg, n.fg, "border-transparent");
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
var _ =
|
|
123
|
+
var _ = r("relative inline-flex items-center rounded-full font-sans font-medium overflow-hidden isolate transition-[color,background-color,border-color,padding] duration-fast-02 ease-productive-standard select-none [&>span:not([data-grain])]:relative [&>span:not([data-grain])]:z-[2]", {
|
|
124
124
|
variants: {
|
|
125
125
|
variant: {
|
|
126
126
|
subtle: "border",
|
|
@@ -154,8 +154,8 @@ var _ = o("relative inline-flex items-center rounded-full font-sans font-medium
|
|
|
154
154
|
sm: "pr-ds-02",
|
|
155
155
|
md: "pr-ds-02",
|
|
156
156
|
lg: "pr-ds-02b"
|
|
157
|
-
}, x =
|
|
158
|
-
let I =
|
|
157
|
+
}, x = s.forwardRef(({ className: r, variant: o, color: s, size: h, asChild: x, startIcon: S, endIcon: C, dot: w, onDismiss: T, onClick: E, selected: D, disabled: O, maxWidth: k, truncate: A, circle: j, children: M, style: N, ...P }, F) => {
|
|
158
|
+
let I = m(), L = o ?? "subtle", R = s ?? "default", z = h ?? "md", B = x ? e : E && T ? "div" : E ? "button" : "span", V = R === "custom" ? {
|
|
159
159
|
...L === "subtle" && {
|
|
160
160
|
backgroundColor: "color-mix(in oklch, var(--badge-color) 15%, transparent)",
|
|
161
161
|
color: "var(--badge-color)",
|
|
@@ -179,12 +179,12 @@ var _ = o("relative inline-flex items-center rounded-full font-sans font-medium
|
|
|
179
179
|
} : void 0, H = E && T ? (e) => {
|
|
180
180
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), O || E(e)), P.onKeyDown?.(e);
|
|
181
181
|
} : P.onKeyDown, U = !!(w || S || E && D && !S && !w), W = !!(T || C);
|
|
182
|
-
return /* @__PURE__ */
|
|
182
|
+
return /* @__PURE__ */ l(B, {
|
|
183
183
|
ref: F,
|
|
184
|
-
className:
|
|
184
|
+
className: i(_({
|
|
185
185
|
variant: L,
|
|
186
186
|
size: z
|
|
187
|
-
}), g(L, R), U && y[z], W && b[z], E && "cursor-pointer hover:brightness-[0.97] focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-1 transition-[color,background-color,border-color,transform,filter] duration-moderate-01 ease-productive-exit hover:duration-fast-02 hover:ease-productive-entrance active:scale-[0.95] active:brightness-[0.92] active:duration-[0ms]", D && "ring-1 ring-current/20 transition-shadow duration-fast-02", O && "opacity-action-disabled pointer-events-none saturate-[0.3]", j && "justify-center px-0 aspect-square",
|
|
187
|
+
}), g(L, R), U && y[z], W && b[z], E && "cursor-pointer hover:brightness-[0.97] focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-1 transition-[color,background-color,border-color,transform,filter] duration-moderate-01 ease-productive-exit hover:duration-fast-02 hover:ease-productive-entrance active:scale-[0.95] active:brightness-[0.92] active:duration-[0ms]", D && "ring-1 ring-current/20 transition-shadow duration-fast-02", O && "opacity-action-disabled pointer-events-none saturate-[0.3]", j && "justify-center px-0 aspect-square", r),
|
|
188
188
|
style: {
|
|
189
189
|
...N,
|
|
190
190
|
...V,
|
|
@@ -200,14 +200,14 @@ var _ = o("relative inline-flex items-center rounded-full font-sans font-medium
|
|
|
200
200
|
} : {},
|
|
201
201
|
...P,
|
|
202
202
|
children: [
|
|
203
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ c(f, { children: w && /* @__PURE__ */ l(p.span, {
|
|
204
204
|
initial: { scale: 0 },
|
|
205
205
|
animate: { scale: 1 },
|
|
206
206
|
exit: { scale: 0 },
|
|
207
|
-
transition:
|
|
207
|
+
transition: n.snappy,
|
|
208
208
|
className: "relative inline-flex h-1.5 w-1.5 shrink-0",
|
|
209
209
|
"aria-hidden": "true",
|
|
210
|
-
children: [/* @__PURE__ */
|
|
210
|
+
children: [/* @__PURE__ */ c(p.span, {
|
|
211
211
|
className: "absolute inset-0 rounded-full bg-current",
|
|
212
212
|
animate: I ? void 0 : {
|
|
213
213
|
scale: [1, 2.5],
|
|
@@ -224,9 +224,9 @@ var _ = o("relative inline-flex items-center rounded-full font-sans font-medium
|
|
|
224
224
|
1
|
|
225
225
|
]
|
|
226
226
|
}
|
|
227
|
-
}), /* @__PURE__ */
|
|
227
|
+
}), /* @__PURE__ */ c("span", { className: "relative h-1.5 w-1.5 rounded-full bg-current" })]
|
|
228
228
|
}, "dot") }),
|
|
229
|
-
E && !S && !w && /* @__PURE__ */
|
|
229
|
+
E && !S && !w && /* @__PURE__ */ c(p.span, {
|
|
230
230
|
initial: !1,
|
|
231
231
|
animate: D ? {
|
|
232
232
|
opacity: 1,
|
|
@@ -241,7 +241,7 @@ var _ = o("relative inline-flex items-center rounded-full font-sans font-medium
|
|
|
241
241
|
},
|
|
242
242
|
transition: {
|
|
243
243
|
type: "tween",
|
|
244
|
-
duration:
|
|
244
|
+
duration: t.moderate01,
|
|
245
245
|
ease: [
|
|
246
246
|
.2,
|
|
247
247
|
0,
|
|
@@ -251,33 +251,33 @@ var _ = o("relative inline-flex items-center rounded-full font-sans font-medium
|
|
|
251
251
|
},
|
|
252
252
|
className: "inline-flex shrink-0 overflow-hidden",
|
|
253
253
|
"aria-hidden": !D,
|
|
254
|
-
children: /* @__PURE__ */
|
|
255
|
-
icon:
|
|
254
|
+
children: /* @__PURE__ */ c(a, {
|
|
255
|
+
icon: u,
|
|
256
256
|
size: "xs"
|
|
257
257
|
})
|
|
258
258
|
}),
|
|
259
|
-
S && /* @__PURE__ */
|
|
260
|
-
className:
|
|
259
|
+
S && /* @__PURE__ */ c("span", {
|
|
260
|
+
className: i("shrink-0", v[z]),
|
|
261
261
|
children: S
|
|
262
262
|
}),
|
|
263
|
-
A || k ? /* @__PURE__ */
|
|
263
|
+
A || k ? /* @__PURE__ */ c("span", {
|
|
264
264
|
className: "truncate",
|
|
265
265
|
title: typeof M == "string" ? M : void 0,
|
|
266
266
|
children: M
|
|
267
267
|
}) : M,
|
|
268
|
-
C && /* @__PURE__ */
|
|
269
|
-
className:
|
|
268
|
+
C && /* @__PURE__ */ c("span", {
|
|
269
|
+
className: i("shrink-0", v[z]),
|
|
270
270
|
children: C
|
|
271
271
|
}),
|
|
272
|
-
T && /* @__PURE__ */
|
|
272
|
+
T && /* @__PURE__ */ c("button", {
|
|
273
273
|
type: "button",
|
|
274
274
|
onClick: (e) => {
|
|
275
275
|
e.stopPropagation(), T();
|
|
276
276
|
},
|
|
277
|
-
className:
|
|
277
|
+
className: i("shrink-0 rounded-full text-current/60 hover:text-current hover:bg-current/10 transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-accent-9", z === "xs" ? "p-0 -mr-0.5 min-w-[16px] min-h-[16px]" : "p-px"),
|
|
278
278
|
"aria-label": `Remove ${typeof M == "string" ? M : ""}`.trim() || "Remove",
|
|
279
|
-
children: /* @__PURE__ */
|
|
280
|
-
icon:
|
|
279
|
+
children: /* @__PURE__ */ c(a, {
|
|
280
|
+
icon: d,
|
|
281
281
|
size: "xs"
|
|
282
282
|
})
|
|
283
283
|
})
|
|
@@ -286,18 +286,18 @@ var _ = o("relative inline-flex items-center rounded-full font-sans font-medium
|
|
|
286
286
|
});
|
|
287
287
|
x.displayName = "Badge";
|
|
288
288
|
var S = Object.assign(x, {
|
|
289
|
-
Indicator:
|
|
289
|
+
Indicator: o,
|
|
290
290
|
Group: w
|
|
291
291
|
}), C = {
|
|
292
292
|
tight: "gap-1",
|
|
293
293
|
default: "gap-1.5",
|
|
294
294
|
loose: "gap-2"
|
|
295
295
|
};
|
|
296
|
-
function w({ max: e, gap: t = "default", size: n, onOverflowClick: r, className:
|
|
297
|
-
let
|
|
298
|
-
return /* @__PURE__ */
|
|
299
|
-
className:
|
|
300
|
-
children: [
|
|
296
|
+
function w({ max: e, gap: t = "default", size: n, onOverflowClick: r, className: a, children: o }) {
|
|
297
|
+
let c = s.Children.toArray(o), u = c.length, d = e !== void 0 && u > e, f = d ? c.slice(0, e) : c, p = d ? u - e : 0;
|
|
298
|
+
return /* @__PURE__ */ l("div", {
|
|
299
|
+
className: i("flex flex-wrap items-center", C[t], a),
|
|
300
|
+
children: [f, d && /* @__PURE__ */ l(S, {
|
|
301
301
|
variant: "outline",
|
|
302
302
|
color: "neutral",
|
|
303
303
|
size: n ?? "sm",
|