@devalok/shilp-sutra 0.56.0 → 0.59.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 +198 -0
- package/dist/_chunks/badge-group.js +75 -174
- package/dist/_chunks/badge-group.js.map +1 -1
- package/dist/_chunks/chat.js +270 -253
- package/dist/_chunks/chat.js.map +1 -1
- package/dist/_chunks/document-preview.js +1 -1
- package/dist/_chunks/document-preview.js.map +1 -1
- package/dist/_chunks/emoji-suggestion.js +1 -1
- package/dist/_chunks/emoji-suggestion.js.map +1 -1
- package/dist/_chunks/image-preview.js +71 -70
- package/dist/_chunks/image-preview.js.map +1 -1
- package/dist/_chunks/mention-suggestion.js +2 -2
- package/dist/_chunks/mention-suggestion.js.map +1 -1
- package/dist/_chunks/motion-preference.js +15 -0
- package/dist/_chunks/motion-preference.js.map +1 -0
- package/dist/_chunks/motion-provider.js +1 -1
- package/dist/_chunks/motion-provider.js.map +1 -1
- package/dist/_chunks/oauth-button.js +1 -1
- package/dist/_chunks/oauth-button.js.map +1 -1
- package/dist/_chunks/popover.js +50 -49
- package/dist/_chunks/popover.js.map +1 -1
- package/dist/_chunks/primitives-internal.js +29 -29
- package/dist/_chunks/primitives-internal.js.map +1 -1
- package/dist/_chunks/shared.js +48 -47
- package/dist/_chunks/shared.js.map +1 -1
- package/dist/_chunks/success.js +36 -36
- package/dist/_chunks/success.js.map +1 -1
- package/dist/_chunks/tree-view.js +1 -1
- package/dist/_chunks/tree-view.js.map +1 -1
- package/dist/_chunks/use-calendar.js +4 -4
- package/dist/_chunks/use-calendar.js.map +1 -1
- package/dist/ai/block-renderer.js +8 -8
- package/dist/ai/blocks/text.js +1 -1
- package/dist/ai/blocks/text.js.map +1 -1
- package/dist/ai/command-bar.js +67 -67
- package/dist/ai/command-bar.js.map +1 -1
- package/dist/ai/conversation.js +35 -35
- package/dist/ai/conversation.js.map +1 -1
- package/dist/ai/index.js +4 -4
- package/dist/composed/activity-feed.d.ts.map +1 -1
- package/dist/composed/activity-feed.js +109 -108
- package/dist/composed/activity-feed.js.map +1 -1
- package/dist/composed/avatar-group.d.ts +7 -2
- package/dist/composed/avatar-group.d.ts.map +1 -1
- package/dist/composed/avatar-group.js +3 -3
- package/dist/composed/avatar-group.js.map +1 -1
- package/dist/composed/command-palette.js +137 -137
- package/dist/composed/command-palette.js.map +1 -1
- package/dist/composed/content-card.js +2 -2
- package/dist/composed/content-card.js.map +1 -1
- package/dist/composed/date-picker/index.js +9 -9
- package/dist/composed/date-picker/index.js.map +1 -1
- package/dist/composed/diff.d.ts +23 -2
- package/dist/composed/diff.d.ts.map +1 -1
- package/dist/composed/diff.js +341 -260
- package/dist/composed/diff.js.map +1 -1
- package/dist/composed/emoji-picker.js +3 -3
- package/dist/composed/emoji-picker.js.map +1 -1
- package/dist/composed/empty-state.js +4 -4
- package/dist/composed/error-boundary.js +2 -2
- package/dist/composed/error-boundary.js.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.js +152 -151
- package/dist/composed/file-preview.js.map +1 -1
- package/dist/composed/filter-bar.d.ts.map +1 -1
- package/dist/composed/filter-bar.js +53 -52
- 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 +38 -37
- package/dist/composed/form-section.js.map +1 -1
- package/dist/composed/inline-edit.js +1 -1
- package/dist/composed/inline-edit.js.map +1 -1
- package/dist/composed/loading-skeleton.js +3 -3
- package/dist/composed/loading-skeleton.js.map +1 -1
- package/dist/composed/master-detail.d.ts.map +1 -1
- package/dist/composed/master-detail.js +1 -1
- package/dist/composed/master-detail.js.map +1 -1
- package/dist/composed/member-picker.js +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 +109 -108
- package/dist/composed/multi-select-popover.js.map +1 -1
- package/dist/composed/page-skeletons.js +4 -4
- package/dist/composed/page-skeletons.js.map +1 -1
- package/dist/composed/responsive-modal.js +1 -1
- package/dist/composed/responsive-modal.js.map +1 -1
- package/dist/composed/rich-chat-input/attachment-strip.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.map +1 -1
- package/dist/composed/rich-chat-input.js +473 -472
- package/dist/composed/rich-chat-input.js.map +1 -1
- package/dist/composed/rich-text-editor.js +6 -6
- package/dist/composed/rich-text-editor.js.map +1 -1
- package/dist/composed/schedule-view.js +5 -5
- package/dist/composed/schedule-view.js.map +1 -1
- package/dist/composed/status-badge.d.ts.map +1 -1
- package/dist/composed/status-badge.js +29 -28
- package/dist/composed/status-badge.js.map +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +4 -3
- package/dist/hooks/use-container-size.d.ts +18 -0
- package/dist/hooks/use-container-size.d.ts.map +1 -0
- package/dist/hooks/use-container-size.js +28 -0
- package/dist/hooks/use-container-size.js.map +1 -0
- package/dist/motion/index.d.ts +1 -0
- package/dist/motion/index.d.ts.map +1 -1
- package/dist/motion/index.js +2 -15
- package/dist/motion/motion-preference.d.ts +36 -0
- package/dist/motion/motion-preference.d.ts.map +1 -0
- package/dist/motion/motion-provider.d.ts +2 -1
- package/dist/motion/motion-provider.d.ts.map +1 -1
- package/dist/motion/primitives-index.js +103 -102
- package/dist/motion/primitives-index.js.map +1 -1
- package/dist/motion/primitives.d.ts.map +1 -1
- package/dist/shell/app-shell.d.ts +101 -0
- package/dist/shell/app-shell.d.ts.map +1 -0
- package/dist/shell/app-shell.js +76 -0
- package/dist/shell/app-shell.js.map +1 -0
- package/dist/shell/bottom-navbar.js +21 -21
- package/dist/shell/bottom-navbar.js.map +1 -1
- package/dist/shell/index.d.ts +2 -1
- package/dist/shell/index.d.ts.map +1 -1
- package/dist/shell/index.js +6 -5
- package/dist/shell/notification-center.d.ts +17 -0
- package/dist/shell/notification-center.d.ts.map +1 -1
- package/dist/shell/notification-center.js +110 -105
- package/dist/shell/notification-center.js.map +1 -1
- package/dist/shell/notification-preferences.js +1 -1
- package/dist/shell/notification-preferences.js.map +1 -1
- package/dist/shell/top-bar.js +7 -7
- package/dist/shell/top-bar.js.map +1 -1
- package/dist/tokens/generate-scale.d.ts +49 -0
- package/dist/tokens/generate-scale.d.ts.map +1 -1
- package/dist/tokens/index.css +1 -0
- package/dist/tokens/palettes.css +292 -0
- package/dist/tokens/primitives.css +29 -26
- package/dist/tokens/semantic.css +170 -47
- package/dist/tokens/shilp-sutra.css +1 -0
- package/dist/tokens/utilities.css +10 -7
- package/dist/tokens/variants.css +1 -1
- package/dist/ui/accordion.d.ts.map +1 -1
- package/dist/ui/accordion.js +27 -26
- package/dist/ui/accordion.js.map +1 -1
- package/dist/ui/alert-dialog.d.ts.map +1 -1
- package/dist/ui/alert-dialog.js +60 -59
- package/dist/ui/alert-dialog.js.map +1 -1
- package/dist/ui/alert.d.ts.map +1 -1
- package/dist/ui/alert.js +55 -113
- package/dist/ui/alert.js.map +1 -1
- package/dist/ui/autocomplete.js +80 -80
- package/dist/ui/autocomplete.js.map +1 -1
- package/dist/ui/avatar.d.ts.map +1 -1
- package/dist/ui/avatar.js +71 -70
- package/dist/ui/avatar.js.map +1 -1
- package/dist/ui/badge-indicator.d.ts +4 -8
- package/dist/ui/badge-indicator.d.ts.map +1 -1
- package/dist/ui/badge-indicator.js +3 -8
- package/dist/ui/badge-indicator.js.map +1 -1
- package/dist/ui/badge.d.ts +55 -34
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/banner.d.ts.map +1 -1
- package/dist/ui/banner.js +43 -41
- package/dist/ui/banner.js.map +1 -1
- package/dist/ui/button-group.d.ts.map +1 -1
- package/dist/ui/button-group.js +3 -23
- package/dist/ui/button-group.js.map +1 -1
- package/dist/ui/button.d.ts +10 -1
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +79 -212
- package/dist/ui/button.js.map +1 -1
- package/dist/ui/card.d.ts.map +1 -1
- package/dist/ui/card.js +78 -75
- package/dist/ui/card.js.map +1 -1
- package/dist/ui/charts/radar-chart.d.ts.map +1 -1
- package/dist/ui/charts/radar-chart.js +1 -1
- package/dist/ui/charts/radar-chart.js.map +1 -1
- package/dist/ui/chat/date-separator.d.ts +8 -1
- package/dist/ui/chat/date-separator.d.ts.map +1 -1
- package/dist/ui/chat/message-list.d.ts.map +1 -1
- package/dist/ui/chat/message.d.ts.map +1 -1
- package/dist/ui/chat/typing-indicator.d.ts.map +1 -1
- package/dist/ui/checkbox.js +1 -1
- package/dist/ui/checkbox.js.map +1 -1
- package/dist/ui/code.js +2 -2
- package/dist/ui/code.js.map +1 -1
- package/dist/ui/color-input.d.ts.map +1 -1
- package/dist/ui/color-input.js +151 -150
- package/dist/ui/color-input.js.map +1 -1
- package/dist/ui/combobox.d.ts +14 -0
- package/dist/ui/combobox.d.ts.map +1 -1
- package/dist/ui/combobox.js +156 -152
- package/dist/ui/combobox.js.map +1 -1
- package/dist/ui/context-menu.d.ts.map +1 -1
- package/dist/ui/context-menu.js +70 -69
- package/dist/ui/context-menu.js.map +1 -1
- package/dist/ui/data-table-body.d.ts +3 -1
- package/dist/ui/data-table-body.d.ts.map +1 -1
- package/dist/ui/data-table-body.js +93 -92
- package/dist/ui/data-table-body.js.map +1 -1
- package/dist/ui/data-table-bulk-actions.d.ts +7 -1
- package/dist/ui/data-table-bulk-actions.d.ts.map +1 -1
- package/dist/ui/data-table-bulk-actions.js +14 -8
- 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 +66 -47
- package/dist/ui/data-table-card.js.map +1 -1
- package/dist/ui/data-table-context.d.ts +4 -0
- package/dist/ui/data-table-context.d.ts.map +1 -1
- package/dist/ui/data-table-context.js +2 -2
- package/dist/ui/data-table-context.js.map +1 -1
- package/dist/ui/data-table-header.d.ts.map +1 -1
- package/dist/ui/data-table-header.js +50 -46
- package/dist/ui/data-table-header.js.map +1 -1
- package/dist/ui/data-table-pagination.js +3 -3
- package/dist/ui/data-table-pagination.js.map +1 -1
- package/dist/ui/data-table-toolbar.d.ts +11 -1
- package/dist/ui/data-table-toolbar.d.ts.map +1 -1
- package/dist/ui/data-table-toolbar.js +7 -7
- package/dist/ui/data-table-toolbar.js.map +1 -1
- package/dist/ui/data-table.d.ts +52 -5
- package/dist/ui/data-table.d.ts.map +1 -1
- package/dist/ui/data-table.js +181 -169
- package/dist/ui/data-table.js.map +1 -1
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +62 -61
- package/dist/ui/dialog.js.map +1 -1
- package/dist/ui/dot.d.ts.map +1 -1
- package/dist/ui/dot.js +10 -41
- package/dist/ui/dot.js.map +1 -1
- package/dist/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/ui/dropdown-menu.js +79 -78
- 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 +117 -116
- package/dist/ui/file-upload.js.map +1 -1
- package/dist/ui/form.d.ts.map +1 -1
- package/dist/ui/form.js +27 -26
- package/dist/ui/form.js.map +1 -1
- package/dist/ui/hover-card.d.ts.map +1 -1
- package/dist/ui/hover-card.js +26 -25
- package/dist/ui/hover-card.js.map +1 -1
- package/dist/ui/icon.js +7 -7
- package/dist/ui/index.d.ts +2 -2
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +3 -3
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/input-otp.js +1 -1
- package/dist/ui/input-otp.js.map +1 -1
- package/dist/ui/input.js +8 -8
- package/dist/ui/input.js.map +1 -1
- package/dist/ui/menubar.d.ts.map +1 -1
- package/dist/ui/menubar.js +73 -72
- package/dist/ui/menubar.js.map +1 -1
- package/dist/ui/navigation-menu.d.ts.map +1 -1
- package/dist/ui/navigation-menu.js +80 -79
- package/dist/ui/navigation-menu.js.map +1 -1
- package/dist/ui/number-input.js +3 -3
- package/dist/ui/number-input.js.map +1 -1
- package/dist/ui/pagination.js +1 -1
- package/dist/ui/pagination.js.map +1 -1
- package/dist/ui/popover.d.ts.map +1 -1
- package/dist/ui/progress-ring.js +2 -2
- package/dist/ui/progress-ring.js.map +1 -1
- package/dist/ui/progress.d.ts.map +1 -1
- package/dist/ui/progress.js +82 -74
- package/dist/ui/progress.js.map +1 -1
- package/dist/ui/radio.d.ts.map +1 -1
- package/dist/ui/radio.js +32 -31
- package/dist/ui/radio.js.map +1 -1
- package/dist/ui/search-input.d.ts.map +1 -1
- package/dist/ui/search-input.js +28 -27
- package/dist/ui/search-input.js.map +1 -1
- package/dist/ui/select.d.ts.map +1 -1
- package/dist/ui/select.js +67 -66
- package/dist/ui/select.js.map +1 -1
- package/dist/ui/sheet.js +1 -1
- package/dist/ui/sheet.js.map +1 -1
- package/dist/ui/sidebar.d.ts.map +1 -1
- package/dist/ui/sidebar.js +14 -14
- package/dist/ui/sidebar.js.map +1 -1
- package/dist/ui/slider.d.ts +63 -9
- package/dist/ui/slider.d.ts.map +1 -1
- package/dist/ui/slider.js +75 -33
- package/dist/ui/slider.js.map +1 -1
- package/dist/ui/split-button.d.ts +8 -2
- package/dist/ui/split-button.d.ts.map +1 -1
- package/dist/ui/split-button.js +49 -95
- package/dist/ui/split-button.js.map +1 -1
- package/dist/ui/stat-card.d.ts.map +1 -1
- package/dist/ui/stat-card.js +89 -88
- package/dist/ui/stat-card.js.map +1 -1
- package/dist/ui/stat-flash.js +16 -16
- package/dist/ui/stepper.d.ts.map +1 -1
- package/dist/ui/stepper.js +63 -62
- package/dist/ui/stepper.js.map +1 -1
- package/dist/ui/surface.d.ts.map +1 -1
- package/dist/ui/surface.js +2 -2
- package/dist/ui/surface.js.map +1 -1
- package/dist/ui/switch.js +1 -1
- package/dist/ui/switch.js.map +1 -1
- package/dist/ui/table.js +3 -3
- package/dist/ui/table.js.map +1 -1
- package/dist/ui/tabs.d.ts.map +1 -1
- package/dist/ui/tabs.js +68 -67
- package/dist/ui/tabs.js.map +1 -1
- package/dist/ui/textarea.js +5 -5
- package/dist/ui/textarea.js.map +1 -1
- package/dist/ui/toast.d.ts.map +1 -1
- package/dist/ui/toast.js +196 -195
- package/dist/ui/toast.js.map +1 -1
- package/dist/ui/toggle.d.ts.map +1 -1
- package/dist/ui/toggle.js +26 -24
- package/dist/ui/toggle.js.map +1 -1
- package/dist/ui/tooltip.d.ts.map +1 -1
- package/dist/ui/tooltip.js +37 -36
- package/dist/ui/tooltip.js.map +1 -1
- package/dist/ui/tree-view/tree-item.d.ts.map +1 -1
- package/docs/components/composed/avatar-group.md +4 -4
- package/docs/components/composed/diff.md +10 -2
- package/docs/components/composed/schedule-view.md +1 -1
- package/docs/components/shell/app-shell.md +132 -0
- package/docs/components/ui/avatar.md +1 -1
- package/docs/components/ui/button.md +1 -1
- package/docs/components/ui/chat.md +7 -1
- package/docs/components/ui/color-swatch.md +1 -1
- package/docs/components/ui/data-table-toolbar.md +6 -2
- package/docs/components/ui/data-table.md +41 -7
- package/docs/components/ui/dot.md +1 -1
- package/docs/components/ui/progress.md +1 -0
- package/docs/components/ui/surface.md +3 -3
- package/docs/components/ui/table.md +2 -2
- package/docs/recipes/customize-brand.md +58 -0
- package/docs/recipes/install-astro.md +1 -0
- package/docs/recipes/install-next-app-router.md +1 -0
- package/docs/recipes/install-next-pages.md +22 -1
- package/docs/recipes/install-remix.md +1 -0
- package/docs/recipes/install-tanstack-start.md +1 -0
- package/docs/recipes/install-vite.md +2 -0
- package/docs/recipes/server-components.md +7 -4
- package/docs/recipes/troubleshoot.md +1 -0
- package/llms.txt +2 -1
- package/make-kit/Guidelines.md +2 -2
- package/make-kit/components/button.md +1 -1
- package/make-kit/components/card.md +6 -6
- package/make-kit/components/surface.md +4 -4
- package/make-kit/foundations/color.md +4 -4
- package/make-kit/foundations/dark-mode.md +1 -1
- package/make-kit/foundations/radius.md +1 -1
- package/make-kit/foundations/surfaces.md +9 -9
- package/mcp-manifest.json +358 -35
- package/package.json +8 -4
- package/skill/SKILL.md +12 -6
- package/skill/references/components.md +2 -1
- package/skill/references/customize-brand.md +58 -0
- package/skill/references/server-components.md +7 -4
- package/skill/references/setup-astro.md +1 -0
- package/skill/references/setup-next-app-router.md +1 -0
- package/skill/references/setup-next-pages.md +22 -1
- package/skill/references/setup-remix.md +1 -0
- package/skill/references/setup-tanstack-start.md +1 -0
- package/skill/references/setup-vite.md +2 -0
- package/skill/references/troubleshoot.md +1 -0
- package/dist/motion/check-motion-provider.d.ts +0 -2
- package/dist/motion/check-motion-provider.d.ts.map +0 -1
- package/dist/motion/index.js.map +0 -1
- package/dist/primitives/react-toast.d.ts +0 -120
- package/dist/ui/charts/_internal/scales.d.ts +0 -5
- package/dist/ui/charts/_internal/scales.d.ts.map +0 -1
- package/dist/ui/lib/slot.d.ts +0 -8
- package/dist/ui/lib/slot.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devalok/shilp-sutra",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.59.0",
|
|
4
4
|
"description": "Devalok Design System — accessible React components, OKLCH design tokens, and Tailwind 4 CSS-first setup. Ships with AI-agent setup recipes.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Devalok Design & Strategy Studios <shilp-sutra@devalok.in>",
|
|
@@ -688,6 +688,11 @@
|
|
|
688
688
|
"import": "./dist/shell/app-command-palette.js",
|
|
689
689
|
"default": "./dist/shell/app-command-palette.js"
|
|
690
690
|
},
|
|
691
|
+
"./shell/app-shell": {
|
|
692
|
+
"types": "./dist/shell/app-shell.d.ts",
|
|
693
|
+
"import": "./dist/shell/app-shell.js",
|
|
694
|
+
"default": "./dist/shell/app-shell.js"
|
|
695
|
+
},
|
|
691
696
|
"./shell/bottom-navbar": {
|
|
692
697
|
"types": "./dist/shell/bottom-navbar.d.ts",
|
|
693
698
|
"import": "./dist/shell/bottom-navbar.js",
|
|
@@ -991,7 +996,6 @@
|
|
|
991
996
|
},
|
|
992
997
|
"devDependencies": {
|
|
993
998
|
"@emoji-mart/data": "^1.2.1",
|
|
994
|
-
"@emoji-mart/react": "^1.1.1",
|
|
995
999
|
"@floating-ui/dom": "^1.8.0",
|
|
996
1000
|
"@floating-ui/react-dom": "^2.1.9",
|
|
997
1001
|
"@tabler/icons-react": "^3.45.0",
|
|
@@ -1022,7 +1026,6 @@
|
|
|
1022
1026
|
"d3-transition": "^3.0.1",
|
|
1023
1027
|
"date-fns": "^4.4.0",
|
|
1024
1028
|
"diff": "^9.0.0",
|
|
1025
|
-
"esbuild": "^0.28.1",
|
|
1026
1029
|
"framer-motion": "^12.42.2",
|
|
1027
1030
|
"frimousse": "^0.3.0",
|
|
1028
1031
|
"input-otp": "^1.4.2",
|
|
@@ -1046,6 +1049,7 @@
|
|
|
1046
1049
|
"typecheck": "tsc --noEmit",
|
|
1047
1050
|
"lint": "eslint src/",
|
|
1048
1051
|
"test": "vitest run",
|
|
1049
|
-
"test:coverage": "vitest run --coverage"
|
|
1052
|
+
"test:coverage": "vitest run --coverage",
|
|
1053
|
+
"typecheck:docs": "node scripts/typecheck-doc-snippets.mjs --check"
|
|
1050
1054
|
}
|
|
1051
1055
|
}
|
package/skill/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: shilp-sutra
|
|
|
3
3
|
description: Add, configure, and use components from Devalok's shilp-sutra design system (@devalok/shilp-sutra) — a Tailwind 4 + React 19 + CVA library with 110+ accessible components, OKLCH design tokens, framer-motion animations, and per-component RSC-safe entry points. Use this skill whenever the user mentions shilp-sutra, Devalok, the @devalok npm scope, or asks to install/add/style/theme UI in any React project that already depends on the package — even if they don't name it explicitly. Use it instead of generic shadcn/ui, MUI, or Chakra knowledge when shilp-sutra is in the project. Covers Next.js (App + Pages), Vite, Astro, Remix, TanStack Start setup playbooks; component API and variant reference; brand token customization; Server Component import patterns; and a troubleshoot tree for the thirteen most common breakages.
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.
|
|
6
|
+
version: "0.59.0"
|
|
7
7
|
author: Devalok Design & Strategy Studios
|
|
8
8
|
homepage: https://github.com/devalok-design/shilp-sutra
|
|
9
9
|
npm: https://www.npmjs.com/package/@devalok/shilp-sutra
|
|
@@ -77,15 +77,21 @@ The semantic surface names are the public API. The old numeric names (`surface-1
|
|
|
77
77
|
| Token | Use for |
|
|
78
78
|
| ------------------------------ | ---------------------------------------------------------------------------------- |
|
|
79
79
|
| `bg-surface-base` | Page background |
|
|
80
|
-
| `bg-surface-
|
|
81
|
-
| `bg-surface-sunken` |
|
|
80
|
+
| `bg-surface-panel` | Cards, widgets, panels — anything that sits **on** the page |
|
|
81
|
+
| `bg-surface-sunken` | Wells and recessed regions |
|
|
82
82
|
| `bg-surface-overlay` | Dialog, Sheet, Popover, Toast, Combobox menus, any floating overlay |
|
|
83
|
-
| `bg-surface-
|
|
84
|
-
| `bg-surface-
|
|
83
|
+
| `bg-surface-panel-hover` | Hover state on panels |
|
|
84
|
+
| `bg-surface-panel-active` | Active/pressed state on panels |
|
|
85
85
|
| `bg-surface-disabled` | Disabled surfaces (paired with `text-surface-fg-disabled`) |
|
|
86
86
|
| `bg-surface-inverted` | Inverted surfaces (dark on light themes, light on dark themes) |
|
|
87
87
|
|
|
88
|
-
Putting `bg-surface-base` on a card is a bug — cards belong on `surface-
|
|
88
|
+
Putting `bg-surface-base` on a card is a bug — cards belong on `surface-panel`. The pre-publish audit in the DS repo enforces this and blocks the old numeric aliases in component source files.
|
|
89
|
+
|
|
90
|
+
**In LIGHT, `base`, `panel` and `overlay` are the same white.** That is deliberate: an edge makes a card a card, not a fill. So **never paint an interaction state with a container value** — `hover:bg-surface-panel` is invisible. Use `bg-surface-panel-hover` / `-panel-active`. This applies to JS conditionals too (`isSelected ? 'bg-surface-panel' : …`), which no lint rule can see.
|
|
91
|
+
|
|
92
|
+
Borders come in two families: `surface-border-subtle` / `-border` / `-border-strong` are decorative and translucent; `surface-border-interactive` / `-interactive-strong` are solid control edges that carry WCAG 1.4.11. Form controls use the interactive pair.
|
|
93
|
+
|
|
94
|
+
`surface-raised` was renamed `surface-panel` in 0.57.0 and `surface-chrome` was removed. Old names still resolve; run `pnpm eslint . --fix` to migrate.
|
|
89
95
|
|
|
90
96
|
## Adding a component
|
|
91
97
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# @devalok/shilp-sutra
|
|
4
4
|
|
|
5
|
-
> Radix UI + Tailwind 4 (CSS-first) + CVA design system for Devalok apps, v0.
|
|
5
|
+
> Radix UI + Tailwind 4 (CSS-first) + CVA design system for Devalok apps, v0.59.0.
|
|
6
6
|
> Built on the same primitives as shadcn/ui but with DIFFERENT prop APIs — never guess from shadcn knowledge; verify every prop.
|
|
7
7
|
> This file is a ROUTER: it tells you what exists and where to get details. Do not look for prop tables here — fetch them per component (MCP tool or per-component doc file below).
|
|
8
8
|
|
|
@@ -154,6 +154,7 @@ Format: `[name](doc path): summary`. Import paths follow `@devalok/shilp-sutra/<
|
|
|
154
154
|
|
|
155
155
|
### shell
|
|
156
156
|
- [app-command-palette](docs/components/shell/app-command-palette.md)
|
|
157
|
+
- [app-shell](docs/components/shell/app-shell.md)
|
|
157
158
|
- [bottom-navbar](docs/components/shell/bottom-navbar.md)
|
|
158
159
|
- [command-registry](docs/components/shell/command-registry.md): Exports: CommandRegistryProvider, useCommandRegistry
|
|
159
160
|
- [link-context](docs/components/shell/link-context.md): Exports: LinkProvider, useLink
|
|
@@ -258,6 +258,64 @@ Every override should consider both modes. Pattern:
|
|
|
258
258
|
|
|
259
259
|
`.dark` is a regular class selector — its specificity is higher than `:root`/`@theme` body, so dark-mode overrides win when the class is active.
|
|
260
260
|
|
|
261
|
+
## High contrast (`[data-contrast]`)
|
|
262
|
+
|
|
263
|
+
WCAG 2.2 SC 1.4.11 asks for **3:1** between a control's edge and its background.
|
|
264
|
+
The default control edge here is **2.00:1** in light and **2.08:1** in dark — a
|
|
265
|
+
deliberately softer look, and deliberately under that bar. It is recorded as
|
|
266
|
+
`CONTROL-EDGE-BELOW-AA` in the deviations register.
|
|
267
|
+
|
|
268
|
+
Set `data-contrast="high"` to opt into edges that clear the threshold:
|
|
269
|
+
|
|
270
|
+
```html
|
|
271
|
+
<!-- whole app -->
|
|
272
|
+
<html data-contrast="high">
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
```tsx
|
|
276
|
+
{/* or one region — a data-entry screen inside an otherwise soft product */}
|
|
277
|
+
<div data-contrast="high">
|
|
278
|
+
<InvoiceForm />
|
|
279
|
+
</div>
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
| | control edge, light | control edge, dark |
|
|
283
|
+
|---|---|---|
|
|
284
|
+
| default | `#b7b7b7` — 2.00:1 | `#4c4c4c` — 2.08:1 |
|
|
285
|
+
| `data-contrast="high"` | `#868686` — **3.64:1** | `#767676` — **3.93:1** |
|
|
286
|
+
|
|
287
|
+
It affects Input, Textarea, Select, Combobox, Checkbox, Radio, Switch,
|
|
288
|
+
NumberInput and outlined Button — anything using the control-edge tier. It does
|
|
289
|
+
**not** touch decorative borders (card and panel hairlines stay soft), and it
|
|
290
|
+
does not touch the chromatic ramps, so an outlined Button on a colour is
|
|
291
|
+
unchanged.
|
|
292
|
+
|
|
293
|
+
Composes with everything else — it is a plain attribute, like `.dark` and
|
|
294
|
+
`data-shape`:
|
|
295
|
+
|
|
296
|
+
```html
|
|
297
|
+
<html class="dark" data-shape="sharp" data-contrast="high">
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
**Two things worth knowing.**
|
|
301
|
+
|
|
302
|
+
If you override the neutral ramp, high contrast follows automatically — the
|
|
303
|
+
block resolves `--neutral-8` / `--neutral-9` by name rather than hard-coding
|
|
304
|
+
hexes, so a rebrand gets a correctly-scaled high-contrast mode for free.
|
|
305
|
+
|
|
306
|
+
If you want the *opposite* — compliant edges everywhere, with no attribute to
|
|
307
|
+
remember — set the tokens directly and skip the attribute entirely:
|
|
308
|
+
|
|
309
|
+
```css
|
|
310
|
+
:root {
|
|
311
|
+
--color-surface-border-interactive: var(--neutral-8);
|
|
312
|
+
--color-surface-border-interactive-strong: var(--neutral-9);
|
|
313
|
+
}
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
That is worth considering. A default is what most products ship, so leaving the
|
|
317
|
+
attribute unset means shipping the edge that misses 1.4.11.
|
|
318
|
+
|
|
261
319
|
## Forced colors (Windows high-contrast)
|
|
262
320
|
|
|
263
321
|
If you override semantic colors, the `@media (forced-colors: active)` block in `semantic.css` continues to remap to system keywords. Your override is ignored when the user is in high-contrast mode — this is the correct behavior.
|
|
@@ -80,7 +80,7 @@ export function MyButton() {
|
|
|
80
80
|
|---|---|
|
|
81
81
|
| `ContentCard` | All other composed components become client islands when rendered |
|
|
82
82
|
| `PageHeader` | |
|
|
83
|
-
| `
|
|
83
|
+
| `CardSkeleton` / `TableSkeleton` / `BoardSkeleton` / `ListSkeleton` | |
|
|
84
84
|
| `PageSkeletons` | |
|
|
85
85
|
|
|
86
86
|
### `@devalok/shilp-sutra/shell`
|
|
@@ -129,20 +129,23 @@ All shilp-sutra components SSR cleanly. They have no client-only side effects at
|
|
|
129
129
|
|
|
130
130
|
Use `<Suspense>` boundaries normally:
|
|
131
131
|
|
|
132
|
+
<!-- typecheck-skip: ClientHeavyComponent is the reader's own component -->
|
|
132
133
|
```tsx
|
|
133
134
|
import { Suspense } from "react";
|
|
134
|
-
import {
|
|
135
|
+
import { CardSkeleton } from "@devalok/shilp-sutra/composed/loading-skeleton";
|
|
135
136
|
|
|
136
137
|
export default function Page() {
|
|
137
138
|
return (
|
|
138
|
-
<Suspense fallback={<
|
|
139
|
+
<Suspense fallback={<CardSkeleton />}>
|
|
139
140
|
<ClientHeavyComponent />
|
|
140
141
|
</Suspense>
|
|
141
142
|
);
|
|
142
143
|
}
|
|
143
144
|
```
|
|
144
145
|
|
|
145
|
-
Both `<Suspense>` and
|
|
146
|
+
Both `<Suspense>` and the skeletons are server-safe. The module exports
|
|
147
|
+
`CardSkeleton`, `TableSkeleton`, `BoardSkeleton` and `ListSkeleton` — pick the
|
|
148
|
+
one whose shape matches what is loading.
|
|
146
149
|
|
|
147
150
|
## Common RSC mistakes
|
|
148
151
|
|
|
@@ -38,6 +38,7 @@ Some components ship hard peers as optional. **Install BEFORE first import.**
|
|
|
38
38
|
| When you import… | Install |
|
|
39
39
|
|---|---|
|
|
40
40
|
| `@devalok/shilp-sutra/composed/date-picker` | `pnpm add date-fns` |
|
|
41
|
+
| `@devalok/shilp-sutra/composed/diff` | `pnpm add react-syntax-highlighter` |
|
|
41
42
|
| `@devalok/shilp-sutra/composed/file-preview` | `pnpm add react-pdf react-zoom-pan-pinch` |
|
|
42
43
|
| `@devalok/shilp-sutra/composed/markdown-viewer` | `pnpm add react-markdown react-syntax-highlighter remark-gfm` |
|
|
43
44
|
| `@devalok/shilp-sutra/composed/rich-chat-input` | `pnpm add @tiptap/core @tiptap/extension-highlight @tiptap/extension-image @tiptap/extension-list @tiptap/extension-mention @tiptap/extension-text-align @tiptap/extensions @tiptap/markdown @tiptap/pm @tiptap/react @tiptap/starter-kit @tiptap/suggestion date-fns` |
|
|
@@ -51,6 +51,7 @@ Some components depend on third-party libraries that ship as optional peers. **I
|
|
|
51
51
|
| When you import… | Install |
|
|
52
52
|
|---|---|
|
|
53
53
|
| `@devalok/shilp-sutra/composed/date-picker` | `pnpm add date-fns` |
|
|
54
|
+
| `@devalok/shilp-sutra/composed/diff` | `pnpm add react-syntax-highlighter` |
|
|
54
55
|
| `@devalok/shilp-sutra/composed/file-preview` | `pnpm add react-pdf react-zoom-pan-pinch` |
|
|
55
56
|
| `@devalok/shilp-sutra/composed/markdown-viewer` | `pnpm add react-markdown react-syntax-highlighter remark-gfm` |
|
|
56
57
|
| `@devalok/shilp-sutra/composed/rich-chat-input` | `pnpm add @tiptap/core @tiptap/extension-highlight @tiptap/extension-image @tiptap/extension-list @tiptap/extension-mention @tiptap/extension-text-align @tiptap/extensions @tiptap/markdown @tiptap/pm @tiptap/react @tiptap/starter-kit @tiptap/suggestion date-fns` |
|
|
@@ -18,7 +18,28 @@ If both `app/` and `pages/` exist, prefer [install-next-app-router.md](./install
|
|
|
18
18
|
|
|
19
19
|
Same dependencies as the App Router recipe — see [install-next-app-router.md § 2](./install-next-app-router.md#2-install-dependencies). Replace `next-themes`'s `attribute="class"` setup with the same on Pages Router (it works identically).
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
### 2a. Optional peer dependencies (install only when importing the matching subpath)
|
|
22
|
+
|
|
23
|
+
Some components depend on third-party libraries that ship as optional peers. **Install BEFORE first import** of the matching component, or `next build` will exit with `Module not found`. Skip entirely if you only use core components (`Button`, `Text`, `Stack`, `Dialog`, `Toast`, `Form*`, `Input`, `Card`, etc.).
|
|
24
|
+
|
|
25
|
+
| When you import… | Install |
|
|
26
|
+
|---|---|
|
|
27
|
+
| `@devalok/shilp-sutra/composed/date-picker` | `pnpm add date-fns` |
|
|
28
|
+
| `@devalok/shilp-sutra/composed/diff` | `pnpm add react-syntax-highlighter` |
|
|
29
|
+
| `@devalok/shilp-sutra/composed/file-preview` | `pnpm add react-pdf react-zoom-pan-pinch` |
|
|
30
|
+
| `@devalok/shilp-sutra/composed/markdown-viewer` | `pnpm add react-markdown react-syntax-highlighter remark-gfm` |
|
|
31
|
+
| `@devalok/shilp-sutra/composed/rich-chat-input` | `pnpm add @tiptap/core @tiptap/extension-highlight @tiptap/extension-image @tiptap/extension-list @tiptap/extension-mention @tiptap/extension-text-align @tiptap/extensions @tiptap/markdown @tiptap/pm @tiptap/react @tiptap/starter-kit @tiptap/suggestion date-fns` |
|
|
32
|
+
| `@devalok/shilp-sutra/composed/rich-text-editor` | `pnpm add @tiptap/core @tiptap/extension-highlight @tiptap/extension-image @tiptap/extension-list @tiptap/extension-mention @tiptap/extension-text-align @tiptap/extensions @tiptap/markdown @tiptap/pm @tiptap/react @tiptap/starter-kit @tiptap/suggestion` |
|
|
33
|
+
| `@devalok/shilp-sutra/composed/schedule-view` | `pnpm add date-fns` |
|
|
34
|
+
| `@devalok/shilp-sutra/ui/charts` | `pnpm add d3-axis d3-scale d3-selection d3-shape` |
|
|
35
|
+
| `@devalok/shilp-sutra/ui/data-table` | `pnpm add @tanstack/react-table @tanstack/react-virtual` |
|
|
36
|
+
| `@devalok/shilp-sutra/ui/data-table-toolbar` | `pnpm add @tanstack/react-table` |
|
|
37
|
+
| `@devalok/shilp-sutra/ui/input-otp` | `pnpm add input-otp` |
|
|
38
|
+
| `@devalok/shilp-sutra/ui/toast` | `pnpm add sonner` |
|
|
39
|
+
| `@devalok/shilp-sutra/ui/toaster` | `pnpm add sonner` |
|
|
40
|
+
| Any `Icon` / `IconButton` with Tabler icons (near-universal — most components use icons internally, so it is a base-install peer) | `pnpm add @tabler/icons-react` |
|
|
41
|
+
|
|
42
|
+
> These aren't in core deps so consumers who never render a chart, OTP input, or rich-text editor don't pay the install / bundle cost. One-time decision at install.
|
|
22
43
|
|
|
23
44
|
## 3. PostCSS
|
|
24
45
|
|
|
@@ -34,6 +34,7 @@ Some components ship hard peers as optional. **Install BEFORE first import.**
|
|
|
34
34
|
| When you import… | Install |
|
|
35
35
|
|---|---|
|
|
36
36
|
| `@devalok/shilp-sutra/composed/date-picker` | `pnpm add date-fns` |
|
|
37
|
+
| `@devalok/shilp-sutra/composed/diff` | `pnpm add react-syntax-highlighter` |
|
|
37
38
|
| `@devalok/shilp-sutra/composed/file-preview` | `pnpm add react-pdf react-zoom-pan-pinch` |
|
|
38
39
|
| `@devalok/shilp-sutra/composed/markdown-viewer` | `pnpm add react-markdown react-syntax-highlighter remark-gfm` |
|
|
39
40
|
| `@devalok/shilp-sutra/composed/rich-chat-input` | `pnpm add @tiptap/core @tiptap/extension-highlight @tiptap/extension-image @tiptap/extension-list @tiptap/extension-mention @tiptap/extension-text-align @tiptap/extensions @tiptap/markdown @tiptap/pm @tiptap/react @tiptap/starter-kit @tiptap/suggestion date-fns` |
|
|
@@ -43,6 +43,7 @@ Some components ship hard peers as optional. **Install BEFORE first import.**
|
|
|
43
43
|
| When you import… | Install |
|
|
44
44
|
|---|---|
|
|
45
45
|
| `@devalok/shilp-sutra/composed/date-picker` | `pnpm add date-fns` |
|
|
46
|
+
| `@devalok/shilp-sutra/composed/diff` | `pnpm add react-syntax-highlighter` |
|
|
46
47
|
| `@devalok/shilp-sutra/composed/file-preview` | `pnpm add react-pdf react-zoom-pan-pinch` |
|
|
47
48
|
| `@devalok/shilp-sutra/composed/markdown-viewer` | `pnpm add react-markdown react-syntax-highlighter remark-gfm` |
|
|
48
49
|
| `@devalok/shilp-sutra/composed/rich-chat-input` | `pnpm add @tiptap/core @tiptap/extension-highlight @tiptap/extension-image @tiptap/extension-list @tiptap/extension-mention @tiptap/extension-text-align @tiptap/extensions @tiptap/markdown @tiptap/pm @tiptap/react @tiptap/starter-kit @tiptap/suggestion date-fns` |
|
|
@@ -49,6 +49,7 @@ Some components ship hard peers as optional. **Install BEFORE first import.**
|
|
|
49
49
|
| When you import… | Install |
|
|
50
50
|
|---|---|
|
|
51
51
|
| `@devalok/shilp-sutra/composed/date-picker` | `pnpm add date-fns` |
|
|
52
|
+
| `@devalok/shilp-sutra/composed/diff` | `pnpm add react-syntax-highlighter` |
|
|
52
53
|
| `@devalok/shilp-sutra/composed/file-preview` | `pnpm add react-pdf react-zoom-pan-pinch` |
|
|
53
54
|
| `@devalok/shilp-sutra/composed/markdown-viewer` | `pnpm add react-markdown react-syntax-highlighter remark-gfm` |
|
|
54
55
|
| `@devalok/shilp-sutra/composed/rich-chat-input` | `pnpm add @tiptap/core @tiptap/extension-highlight @tiptap/extension-image @tiptap/extension-list @tiptap/extension-mention @tiptap/extension-text-align @tiptap/extensions @tiptap/markdown @tiptap/pm @tiptap/react @tiptap/starter-kit @tiptap/suggestion date-fns` |
|
|
@@ -138,6 +139,7 @@ export function ThemeToggle() {
|
|
|
138
139
|
|
|
139
140
|
If you installed `sonner`, mount the Toaster once near the app root:
|
|
140
141
|
|
|
142
|
+
<!-- typecheck-skip: imports the reader's own App entry -->
|
|
141
143
|
```tsx
|
|
142
144
|
// src/main.tsx
|
|
143
145
|
import { StrictMode } from "react";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"check-motion-provider.d.ts","sourceRoot":"","sources":["../../src/motion/check-motion-provider.ts"],"names":[],"mappings":"AAWA,wBAAgB,mBAAmB,IAAI,IAAI,CAiB1C"}
|
package/dist/motion/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/motion/check-motion-provider.ts","../../src/motion/index.ts"],"sourcesContent":["/**\n * Dev-mode hint for missing MotionProvider.\n *\n * If the consumer hasn't wrapped their app in <MotionProvider>, Framer Motion\n * animations still work but reduced-motion preferences won't propagate through\n * MotionConfig. This check emits a one-time console.info in dev mode.\n *\n * Only runs once, only in development, only in the browser.\n */\nlet checked = false\n\nexport function checkMotionProvider(): void {\n if (checked) return\n if (typeof window === 'undefined') return\n\n // Skip in production\n try {\n // @ts-expect-error -- import.meta.env is Vite-specific, not in base TS lib\n if (import.meta.env?.PROD) return\n } catch { /* not in Vite */ }\n\n checked = true\n\n // eslint-disable-next-line no-console\n console.info(\n '[shilp-sutra] Tip: Wrap your app in <MotionProvider> for reduced-motion support ' +\n 'across all shilp-sutra animations. See https://www.npmjs.com/package/@devalok/shilp-sutra',\n )\n}\n","export { motionProps, type SpringPreset, springs, stagger, type TweenPreset,tweens, withReducedMotion } from '../ui/lib/motion'\nexport { MotionProvider, type MotionProviderProps,useMotion } from './motion-provider'\n\nimport { checkMotionProvider } from './check-motion-provider'\ncheckMotionProvider()\n"],"mappings":";;;AASA,IAAI,IAAU;AAEd,SAAgB,IAA4B;CACtC,UACA,SAAO,SAAW,MAGtB;MAAI;GAEyB;EAC7B,QAAQ,CAAoB;EAK5B,AAHA,IAAU,IAGV,QAAQ,KACN,2KAEF;CAR4B;AAS9B;;;ACxBA,EAAoB"}
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import * as _radix_ui_react_context from './_internal/react-context.js';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import * as DismissableLayer from './_internal/react-dismissable-layer.js';
|
|
4
|
-
import { Primitive } from './_internal/react-primitive.js';
|
|
5
|
-
|
|
6
|
-
type SwipeDirection = 'up' | 'down' | 'left' | 'right';
|
|
7
|
-
declare const createToastScope: _radix_ui_react_context.CreateScope;
|
|
8
|
-
interface ToastProviderProps {
|
|
9
|
-
children?: React.ReactNode;
|
|
10
|
-
/**
|
|
11
|
-
* An author-localized label for each toast. Used to help screen reader users
|
|
12
|
-
* associate the interruption with a toast.
|
|
13
|
-
* @defaultValue 'Notification'
|
|
14
|
-
*/
|
|
15
|
-
label?: string;
|
|
16
|
-
/**
|
|
17
|
-
* Time in milliseconds that each toast should remain visible for.
|
|
18
|
-
* @defaultValue 5000
|
|
19
|
-
*/
|
|
20
|
-
duration?: number;
|
|
21
|
-
/**
|
|
22
|
-
* Direction of pointer swipe that should close the toast.
|
|
23
|
-
* @defaultValue 'right'
|
|
24
|
-
*/
|
|
25
|
-
swipeDirection?: SwipeDirection;
|
|
26
|
-
/**
|
|
27
|
-
* Distance in pixels that the swipe must pass before a close is triggered.
|
|
28
|
-
* @defaultValue 50
|
|
29
|
-
*/
|
|
30
|
-
swipeThreshold?: number;
|
|
31
|
-
}
|
|
32
|
-
declare const ToastProvider: React.FC<ToastProviderProps>;
|
|
33
|
-
type PrimitiveOrderedListProps = React.ComponentPropsWithoutRef<typeof Primitive.ol>;
|
|
34
|
-
interface ToastViewportProps extends PrimitiveOrderedListProps {
|
|
35
|
-
/**
|
|
36
|
-
* The keys to use as the keyboard shortcut that will move focus to the toast viewport.
|
|
37
|
-
* @defaultValue ['F8']
|
|
38
|
-
*/
|
|
39
|
-
hotkey?: string[];
|
|
40
|
-
/**
|
|
41
|
-
* An author-localized label for the toast viewport to provide context for screen reader users
|
|
42
|
-
* when navigating page landmarks. The available `{hotkey}` placeholder will be replaced for you.
|
|
43
|
-
* @defaultValue 'Notifications ({hotkey})'
|
|
44
|
-
*/
|
|
45
|
-
label?: string;
|
|
46
|
-
}
|
|
47
|
-
declare const ToastViewport: React.ForwardRefExoticComponent<ToastViewportProps & React.RefAttributes<HTMLOListElement>>;
|
|
48
|
-
type ToastElement = ToastImplElement;
|
|
49
|
-
interface ToastProps extends Omit<ToastImplProps, keyof ToastImplPrivateProps> {
|
|
50
|
-
open?: boolean;
|
|
51
|
-
defaultOpen?: boolean;
|
|
52
|
-
onOpenChange?(open: boolean): void;
|
|
53
|
-
/**
|
|
54
|
-
* Used to force mounting when more control is needed. Useful when
|
|
55
|
-
* controlling animation with React animation libraries.
|
|
56
|
-
*/
|
|
57
|
-
forceMount?: true;
|
|
58
|
-
}
|
|
59
|
-
declare const Toast: React.ForwardRefExoticComponent<ToastProps & React.RefAttributes<HTMLLIElement>>;
|
|
60
|
-
type SwipeEvent = {
|
|
61
|
-
currentTarget: EventTarget & ToastElement;
|
|
62
|
-
} & Omit<CustomEvent<{
|
|
63
|
-
originalEvent: React.PointerEvent;
|
|
64
|
-
delta: {
|
|
65
|
-
x: number;
|
|
66
|
-
y: number;
|
|
67
|
-
};
|
|
68
|
-
}>, 'currentTarget'>;
|
|
69
|
-
type ToastImplElement = React.ComponentRef<typeof Primitive.li>;
|
|
70
|
-
type DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer.Root>;
|
|
71
|
-
type ToastImplPrivateProps = {
|
|
72
|
-
open: boolean;
|
|
73
|
-
onClose(): void;
|
|
74
|
-
};
|
|
75
|
-
type PrimitiveListItemProps = React.ComponentPropsWithoutRef<typeof Primitive.li>;
|
|
76
|
-
interface ToastImplProps extends ToastImplPrivateProps, PrimitiveListItemProps {
|
|
77
|
-
type?: 'foreground' | 'background';
|
|
78
|
-
/**
|
|
79
|
-
* Time in milliseconds that toast should remain visible for. Overrides value
|
|
80
|
-
* given to `ToastProvider`.
|
|
81
|
-
*/
|
|
82
|
-
duration?: number;
|
|
83
|
-
onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown'];
|
|
84
|
-
onPause?(): void;
|
|
85
|
-
onResume?(): void;
|
|
86
|
-
onSwipeStart?(event: SwipeEvent): void;
|
|
87
|
-
onSwipeMove?(event: SwipeEvent): void;
|
|
88
|
-
onSwipeCancel?(event: SwipeEvent): void;
|
|
89
|
-
onSwipeEnd?(event: SwipeEvent): void;
|
|
90
|
-
}
|
|
91
|
-
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
92
|
-
interface ToastTitleProps extends PrimitiveDivProps {
|
|
93
|
-
}
|
|
94
|
-
declare const ToastTitle: React.ForwardRefExoticComponent<ToastTitleProps & React.RefAttributes<HTMLDivElement>>;
|
|
95
|
-
interface ToastDescriptionProps extends PrimitiveDivProps {
|
|
96
|
-
}
|
|
97
|
-
declare const ToastDescription: React.ForwardRefExoticComponent<ToastDescriptionProps & React.RefAttributes<HTMLDivElement>>;
|
|
98
|
-
interface ToastActionProps extends ToastCloseProps {
|
|
99
|
-
/**
|
|
100
|
-
* A short description for an alternate way to carry out the action. For screen reader users
|
|
101
|
-
* who will not be able to navigate to the button easily/quickly.
|
|
102
|
-
* @example <ToastAction altText="Goto account settings to upgrade">Upgrade</ToastAction>
|
|
103
|
-
* @example <ToastAction altText="Undo (Alt+U)">Undo</ToastAction>
|
|
104
|
-
*/
|
|
105
|
-
altText: string;
|
|
106
|
-
}
|
|
107
|
-
declare const ToastAction: React.ForwardRefExoticComponent<ToastActionProps & React.RefAttributes<HTMLButtonElement>>;
|
|
108
|
-
type PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;
|
|
109
|
-
interface ToastCloseProps extends PrimitiveButtonProps {
|
|
110
|
-
}
|
|
111
|
-
declare const ToastClose: React.ForwardRefExoticComponent<ToastCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
112
|
-
declare const Provider: React.FC<ToastProviderProps>;
|
|
113
|
-
declare const Viewport: React.ForwardRefExoticComponent<ToastViewportProps & React.RefAttributes<HTMLOListElement>>;
|
|
114
|
-
declare const Root: React.ForwardRefExoticComponent<ToastProps & React.RefAttributes<HTMLLIElement>>;
|
|
115
|
-
declare const Title: React.ForwardRefExoticComponent<ToastTitleProps & React.RefAttributes<HTMLDivElement>>;
|
|
116
|
-
declare const Description: React.ForwardRefExoticComponent<ToastDescriptionProps & React.RefAttributes<HTMLDivElement>>;
|
|
117
|
-
declare const Action: React.ForwardRefExoticComponent<ToastActionProps & React.RefAttributes<HTMLButtonElement>>;
|
|
118
|
-
declare const Close: React.ForwardRefExoticComponent<ToastCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
119
|
-
|
|
120
|
-
export { Action, Close, Description, Provider, Root, Title, Toast, ToastAction, type ToastActionProps, ToastClose, type ToastCloseProps, ToastDescription, type ToastDescriptionProps, type ToastProps, ToastProvider, type ToastProviderProps, ToastTitle, type ToastTitleProps, ToastViewport, type ToastViewportProps, Viewport, createToastScope };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare function createLinearScale(domain: [number, number], range: [number, number]): import('d3-scale').ScaleLinear<number, number, never>;
|
|
2
|
-
export declare function createBandScale(domain: string[], range: [number, number], padding?: number): import('d3-scale').ScaleBand<string>;
|
|
3
|
-
export declare function createTimeScale(domain: [Date, Date], range: [number, number]): import('d3-scale').ScaleTime<number, number, never>;
|
|
4
|
-
export declare function createOrdinalScale(domain: string[], colors: string[]): import('d3-scale').ScaleOrdinal<string, string, never>;
|
|
5
|
-
//# sourceMappingURL=scales.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scales.d.ts","sourceRoot":"","sources":["../../../../src/ui/charts/_internal/scales.ts"],"names":[],"mappings":"AAEA,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,yDAElF;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,SAAM,wCAEvF;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,uDAE5E;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,0DAEpE"}
|
package/dist/ui/lib/slot.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Re-export of Slot from vendored primitives.
|
|
3
|
-
* This provides a public API for the asChild pattern
|
|
4
|
-
* without requiring consumers to reach into primitives/_internal.
|
|
5
|
-
*/
|
|
6
|
-
export type { SlotProps } from '../../primitives/react-slot.js';
|
|
7
|
-
export { Slot, Slottable } from '../../primitives/react-slot.js';
|
|
8
|
-
//# sourceMappingURL=slot.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"slot.d.ts","sourceRoot":"","sources":["../../../src/ui/lib/slot.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AACvD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA"}
|