@devalok/shilp-sutra 0.17.1 → 0.18.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/dist/_chunks/avatar.js +21 -19
- package/dist/_chunks/button-group.js +27 -0
- package/dist/_chunks/button.js +53 -35
- package/dist/_chunks/card.js +41 -31
- package/dist/_chunks/checkbox.js +11 -9
- package/dist/_chunks/date-utils.js +13 -0
- package/dist/_chunks/form.js +20 -20
- package/dist/_chunks/link-context.js +19 -0
- package/dist/_chunks/motion.js +1376 -0
- package/dist/_chunks/motion2.js +35 -0
- package/dist/_chunks/primitives.js +3499 -3920
- package/dist/_chunks/sidebar.js +225 -211
- package/dist/_chunks/spinner.js +58 -28
- package/dist/_chunks/tiptap.js +1 -1
- package/dist/_chunks/tooltip.js +27 -10
- package/dist/_chunks/tree-view.js +180 -178
- package/dist/_chunks/use-calendar.js +531 -515
- package/dist/_chunks/utils.js +3 -3
- package/dist/_chunks/vendor-client.js +1792 -1049
- package/dist/_chunks/vendor-utils.js +5123 -1169
- package/dist/composed/activity-feed.d.ts.map +1 -1
- package/dist/composed/activity-feed.js +71 -74
- package/dist/composed/avatar-group.js +36 -36
- package/dist/composed/command-palette.d.ts +1 -1
- package/dist/composed/command-palette.d.ts.map +1 -1
- package/dist/composed/command-palette.js +207 -158
- package/dist/composed/confirm-dialog.d.ts +3 -5
- package/dist/composed/confirm-dialog.d.ts.map +1 -1
- package/dist/composed/confirm-dialog.js +46 -41
- package/dist/composed/content-card.d.ts +1 -1
- package/dist/composed/content-card.js +29 -29
- package/dist/composed/date-picker/calendar-grid.d.ts +1 -1
- package/dist/composed/date-picker/calendar-grid.d.ts.map +1 -1
- package/dist/composed/date-picker/date-picker.d.ts +1 -1
- package/dist/composed/date-picker/date-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/date-range-picker.d.ts +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 +1 -1
- package/dist/composed/date-picker/date-time-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/month-picker.d.ts +1 -1
- package/dist/composed/date-picker/month-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/presets.d.ts +1 -1
- package/dist/composed/date-picker/presets.d.ts.map +1 -1
- package/dist/composed/date-picker/time-picker.d.ts +1 -1
- package/dist/composed/date-picker/time-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/year-picker.d.ts +1 -1
- package/dist/composed/date-picker/year-picker.d.ts.map +1 -1
- package/dist/composed/empty-state.d.ts +1 -0
- package/dist/composed/empty-state.d.ts.map +1 -1
- package/dist/composed/empty-state.js +51 -47
- 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 +48 -48
- package/dist/composed/extensions/mention-suggestion.d.ts +1 -1
- package/dist/composed/extensions/mention-suggestion.d.ts.map +1 -1
- package/dist/composed/global-loading.d.ts +1 -1
- package/dist/composed/global-loading.d.ts.map +1 -1
- package/dist/composed/global-loading.js +23 -20
- package/dist/composed/index.d.ts +2 -4
- package/dist/composed/index.d.ts.map +1 -1
- package/dist/composed/index.js +26 -29
- 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 +92 -87
- package/dist/composed/member-picker.d.ts +1 -1
- package/dist/composed/member-picker.d.ts.map +1 -1
- package/dist/composed/member-picker.js +47 -43
- package/dist/composed/page-header.js +36 -36
- package/dist/composed/page-skeletons.d.ts +9 -3
- package/dist/composed/page-skeletons.d.ts.map +1 -1
- package/dist/composed/page-skeletons.js +58 -58
- package/dist/composed/priority-indicator.js +19 -19
- package/dist/composed/rich-text-editor.d.ts +3 -3
- package/dist/composed/rich-text-editor.d.ts.map +1 -1
- package/dist/composed/rich-text-editor.js +316 -309
- package/dist/composed/schedule-view.js +88 -88
- package/dist/composed/simple-tooltip.d.ts +2 -5
- package/dist/composed/simple-tooltip.d.ts.map +1 -1
- package/dist/composed/simple-tooltip.js +19 -14
- package/dist/composed/status-badge.d.ts +2 -1
- package/dist/composed/status-badge.d.ts.map +1 -1
- package/dist/composed/status-badge.js +76 -63
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +3 -4
- package/dist/hooks/use-toast.d.ts +15 -45
- package/dist/hooks/use-toast.d.ts.map +1 -1
- package/dist/hooks/use-toast.js +2 -95
- package/dist/motion/index.d.ts +4 -0
- package/dist/motion/index.d.ts.map +1 -0
- package/dist/motion/index.js +10 -0
- package/dist/motion/motion-provider.d.ts +18 -0
- package/dist/motion/motion-provider.d.ts.map +1 -0
- package/dist/motion/motion-provider.js +24 -0
- package/dist/motion/primitives-index.d.ts +3 -0
- package/dist/motion/primitives-index.d.ts.map +1 -0
- package/dist/motion/primitives-index.js +11 -0
- package/dist/motion/primitives.d.ts +38 -0
- package/dist/motion/primitives.d.ts.map +1 -0
- package/dist/motion/primitives.js +187 -0
- package/dist/shell/app-command-palette.d.ts +14 -5
- package/dist/shell/app-command-palette.d.ts.map +1 -1
- package/dist/shell/app-command-palette.js +152 -130
- package/dist/shell/bottom-navbar.d.ts.map +1 -1
- package/dist/shell/bottom-navbar.js +90 -92
- package/dist/shell/command-registry.d.ts +23 -0
- package/dist/shell/command-registry.d.ts.map +1 -0
- package/dist/shell/command-registry.js +18 -0
- package/dist/shell/index.d.ts +2 -1
- package/dist/shell/index.d.ts.map +1 -1
- package/dist/shell/index.js +14 -11
- package/dist/shell/link-context.d.ts +6 -10
- package/dist/shell/link-context.d.ts.map +1 -1
- package/dist/shell/link-context.js +3 -16
- package/dist/shell/notification-center.d.ts.map +1 -1
- package/dist/shell/notification-center.js +137 -132
- package/dist/shell/notification-preferences.d.ts +10 -5
- package/dist/shell/notification-preferences.d.ts.map +1 -1
- package/dist/shell/notification-preferences.js +168 -164
- package/dist/shell/sidebar.js +119 -119
- package/dist/shell/top-bar.js +65 -65
- package/dist/tailwind/index.cjs +118 -297
- package/dist/tailwind/preset.d.ts.map +1 -1
- package/dist/tailwind/preset.js +118 -297
- package/dist/tokens/generate-scale.d.ts +86 -0
- package/dist/tokens/generate-scale.d.ts.map +1 -0
- package/dist/tokens/primitives.css +415 -187
- package/dist/tokens/semantic.css +244 -270
- package/dist/tokens/typography.css +6 -6
- package/dist/ui/accordion.d.ts.map +1 -1
- package/dist/ui/accordion.js +32 -22
- package/dist/ui/alert-dialog.d.ts +4 -1
- package/dist/ui/alert-dialog.d.ts.map +1 -1
- package/dist/ui/alert-dialog.js +114 -73
- package/dist/ui/alert.d.ts +6 -1
- package/dist/ui/alert.d.ts.map +1 -1
- package/dist/ui/alert.js +64 -49
- package/dist/ui/aspect-ratio.d.ts +2 -1
- package/dist/ui/aspect-ratio.d.ts.map +1 -1
- package/dist/ui/aspect-ratio.js +14 -4
- package/dist/ui/autocomplete.d.ts +11 -2
- package/dist/ui/autocomplete.d.ts.map +1 -1
- package/dist/ui/autocomplete.js +82 -57
- package/dist/ui/avatar.d.ts.map +1 -1
- package/dist/ui/avatar.js +45 -34
- package/dist/ui/badge.d.ts +1 -1
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/badge.js +70 -65
- package/dist/ui/banner.d.ts.map +1 -1
- package/dist/ui/banner.js +53 -39
- package/dist/ui/breadcrumb.d.ts +2 -0
- package/dist/ui/breadcrumb.d.ts.map +1 -1
- package/dist/ui/breadcrumb.js +21 -21
- package/dist/ui/button.d.ts +10 -1
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +103 -67
- package/dist/ui/card.d.ts +2 -2
- package/dist/ui/card.d.ts.map +1 -1
- package/dist/ui/card.js +61 -53
- package/dist/ui/charts/_internal/animation.d.ts +1 -1
- package/dist/ui/charts/_internal/animation.d.ts.map +1 -1
- package/dist/ui/charts/area-chart.d.ts +3 -5
- package/dist/ui/charts/area-chart.d.ts.map +1 -1
- package/dist/ui/charts/bar-chart.d.ts +3 -5
- package/dist/ui/charts/bar-chart.d.ts.map +1 -1
- package/dist/ui/charts/chart-container.d.ts +2 -5
- package/dist/ui/charts/chart-container.d.ts.map +1 -1
- package/dist/ui/charts/gauge-chart.d.ts +3 -5
- package/dist/ui/charts/gauge-chart.d.ts.map +1 -1
- package/dist/ui/charts/index.js +1204 -1095
- package/dist/ui/charts/line-chart.d.ts +3 -5
- package/dist/ui/charts/line-chart.d.ts.map +1 -1
- package/dist/ui/charts/pie-chart.d.ts +2 -5
- package/dist/ui/charts/pie-chart.d.ts.map +1 -1
- package/dist/ui/charts/radar-chart.d.ts +3 -5
- package/dist/ui/charts/radar-chart.d.ts.map +1 -1
- package/dist/ui/charts/sparkline.d.ts +5 -5
- package/dist/ui/charts/sparkline.d.ts.map +1 -1
- package/dist/ui/checkbox.d.ts.map +1 -1
- package/dist/ui/checkbox.js +31 -19
- package/dist/ui/chip.d.ts +3 -2
- package/dist/ui/chip.d.ts.map +1 -1
- package/dist/ui/chip.js +62 -54
- package/dist/ui/code.js +16 -16
- package/dist/ui/collapsible.d.ts.map +1 -1
- package/dist/ui/collapsible.js +23 -15
- package/dist/ui/color-input.d.ts +1 -1
- package/dist/ui/color-input.d.ts.map +1 -1
- package/dist/ui/color-input.js +27 -27
- package/dist/ui/combobox.d.ts +2 -0
- package/dist/ui/combobox.d.ts.map +1 -1
- package/dist/ui/combobox.js +177 -166
- package/dist/ui/context-menu.d.ts +4 -2
- package/dist/ui/context-menu.d.ts.map +1 -1
- package/dist/ui/context-menu.js +146 -86
- package/dist/ui/data-table-toolbar.d.ts +3 -2
- package/dist/ui/data-table-toolbar.d.ts.map +1 -1
- package/dist/ui/data-table-toolbar.js +61 -59
- package/dist/ui/data-table.d.ts.map +1 -1
- package/dist/ui/data-table.js +289 -254
- package/dist/ui/dialog.d.ts +3 -1
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +114 -74
- package/dist/ui/dropdown-menu.d.ts +5 -3
- package/dist/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/ui/dropdown-menu.js +150 -89
- package/dist/ui/file-upload.d.ts.map +1 -1
- package/dist/ui/file-upload.js +169 -127
- package/dist/ui/form.d.ts.map +1 -1
- package/dist/ui/form.js +29 -26
- package/dist/ui/hover-card.d.ts +1 -1
- package/dist/ui/hover-card.d.ts.map +1 -1
- package/dist/ui/hover-card.js +53 -21
- package/dist/ui/index.d.ts +18 -18
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +432 -448
- package/dist/ui/input-otp.d.ts +2 -0
- package/dist/ui/input-otp.d.ts.map +1 -1
- package/dist/ui/input-otp.js +7 -7
- package/dist/ui/input.d.ts.map +1 -1
- package/dist/ui/input.js +36 -34
- package/dist/ui/label.js +12 -12
- package/dist/ui/lib/date-utils.d.ts +6 -0
- package/dist/ui/lib/date-utils.d.ts.map +1 -0
- package/dist/ui/lib/index.d.ts +7 -0
- package/dist/ui/lib/index.d.ts.map +1 -0
- package/dist/ui/lib/link-context.d.ts +13 -0
- package/dist/ui/lib/link-context.d.ts.map +1 -0
- package/dist/ui/lib/motion.d.ts +44 -9
- package/dist/ui/lib/motion.d.ts.map +1 -1
- package/dist/ui/lib/use-ripple.d.ts.map +1 -1
- package/dist/ui/lib/utils.js +1 -1
- package/dist/ui/link.js +11 -11
- package/dist/ui/menubar.d.ts +4 -2
- package/dist/ui/menubar.d.ts.map +1 -1
- package/dist/ui/menubar.js +141 -97
- package/dist/ui/navigation-menu.d.ts +2 -0
- package/dist/ui/navigation-menu.d.ts.map +1 -1
- package/dist/ui/navigation-menu.js +176 -73
- package/dist/ui/number-input.d.ts.map +1 -1
- package/dist/ui/number-input.js +56 -49
- package/dist/ui/pagination.js +22 -22
- package/dist/ui/popover.d.ts +2 -1
- package/dist/ui/popover.d.ts.map +1 -1
- package/dist/ui/popover.js +54 -22
- package/dist/ui/progress.d.ts.map +1 -1
- package/dist/ui/progress.js +58 -42
- package/dist/ui/radio.js +19 -19
- package/dist/ui/search-input.d.ts.map +1 -1
- package/dist/ui/search-input.js +28 -33
- package/dist/ui/segmented-control.d.ts +2 -2
- package/dist/ui/segmented-control.d.ts.map +1 -1
- package/dist/ui/segmented-control.js +143 -124
- package/dist/ui/select.d.ts.map +1 -1
- package/dist/ui/select.js +72 -61
- package/dist/ui/separator.js +11 -11
- package/dist/ui/sheet.d.ts +1 -1
- package/dist/ui/sheet.d.ts.map +1 -1
- package/dist/ui/sheet.js +111 -75
- package/dist/ui/sidebar.d.ts +6 -1
- package/dist/ui/sidebar.d.ts.map +1 -1
- package/dist/ui/sidebar.js +27 -25
- package/dist/ui/skeleton.js +1 -1
- package/dist/ui/slider.d.ts +9 -0
- package/dist/ui/slider.d.ts.map +1 -1
- package/dist/ui/slider.js +33 -27
- package/dist/ui/spinner.d.ts +32 -25
- package/dist/ui/spinner.d.ts.map +1 -1
- package/dist/ui/spinner.js +199 -40
- package/dist/ui/stat-card.d.ts.map +1 -1
- package/dist/ui/stat-card.js +183 -116
- package/dist/ui/stepper.d.ts +22 -1
- package/dist/ui/stepper.d.ts.map +1 -1
- package/dist/ui/stepper.js +121 -43
- package/dist/ui/switch.d.ts.map +1 -1
- package/dist/ui/switch.js +39 -26
- package/dist/ui/table.d.ts +3 -0
- package/dist/ui/table.d.ts.map +1 -1
- package/dist/ui/table.js +47 -47
- package/dist/ui/tabs.d.ts +4 -1
- package/dist/ui/tabs.d.ts.map +1 -1
- package/dist/ui/tabs.js +94 -44
- package/dist/ui/text.d.ts +3 -3
- package/dist/ui/text.js +1 -1
- package/dist/ui/textarea.d.ts.map +1 -1
- package/dist/ui/textarea.js +29 -27
- package/dist/ui/toast-types.d.ts +43 -0
- package/dist/ui/toast-types.d.ts.map +1 -0
- package/dist/ui/toast-types.js +2 -0
- package/dist/ui/toast.d.ts +60 -26
- package/dist/ui/toast.d.ts.map +1 -1
- package/dist/ui/toast.js +535 -89
- package/dist/ui/toaster.d.ts +19 -23
- package/dist/ui/toaster.d.ts.map +1 -1
- package/dist/ui/toaster.js +31 -21
- package/dist/ui/toggle-group.d.ts +2 -2
- package/dist/ui/toggle-group.d.ts.map +1 -1
- package/dist/ui/toggle-group.js +29 -26
- package/dist/ui/toggle.d.ts +2 -2
- package/dist/ui/toggle.d.ts.map +1 -1
- package/dist/ui/toggle.js +21 -17
- package/dist/ui/tooltip.d.ts +2 -1
- package/dist/ui/tooltip.d.ts.map +1 -1
- package/dist/ui/tooltip.js +58 -21
- package/dist/ui/tree-view/tree-view.d.ts +1 -1
- package/dist/ui/tree-view/tree-view.d.ts.map +1 -1
- package/llms-full.txt +221 -102
- package/llms.txt +65 -12
- package/package.json +674 -656
- package/dist/composed/upload-progress.d.ts +0 -33
- package/dist/composed/upload-progress.d.ts.map +0 -1
- package/dist/composed/upload-progress.js +0 -386
- package/dist/ui/lib/use-reduced-motion.d.ts +0 -4
- package/dist/ui/lib/use-reduced-motion.d.ts.map +0 -1
- package/dist/ui/transitions.d.ts +0 -17
- package/dist/ui/transitions.d.ts.map +0 -1
- package/dist/ui/transitions.js +0 -111
package/dist/ui/toaster.d.ts
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import * as React from 'react';
|
|
2
3
|
/**
|
|
3
|
-
* Toaster —
|
|
4
|
-
*
|
|
5
|
-
* @see {@link useToast} for the hook-based API
|
|
6
|
-
* @see {@link toast} for the direct imperative function
|
|
4
|
+
* Toaster — mount once at your root layout to enable toast notifications.
|
|
7
5
|
*
|
|
8
6
|
* @example
|
|
9
|
-
* // 1. Mount Toaster once in your root layout (e.g. app/layout.tsx in Next.js):
|
|
10
7
|
* import { Toaster } from '@devalok/shilp-sutra'
|
|
8
|
+
*
|
|
11
9
|
* export default function RootLayout({ children }: { children: React.ReactNode }) {
|
|
12
10
|
* return (
|
|
13
11
|
* <html lang="en">
|
|
@@ -19,25 +17,23 @@
|
|
|
19
17
|
* )
|
|
20
18
|
* }
|
|
21
19
|
*
|
|
22
|
-
* //
|
|
23
|
-
* import { useToast } from '@devalok/shilp-sutra'
|
|
24
|
-
* function SaveButton() {
|
|
25
|
-
* const { toast } = useToast()
|
|
26
|
-
* return (
|
|
27
|
-
* <button onClick={() => toast({ title: 'Saved!', description: 'Changes saved.', color: 'success' })}>
|
|
28
|
-
* Save
|
|
29
|
-
* </button>
|
|
30
|
-
* )
|
|
31
|
-
* }
|
|
32
|
-
*
|
|
33
|
-
* // Or use the imperative function directly (no hook needed):
|
|
20
|
+
* // Then from any component:
|
|
34
21
|
* import { toast } from '@devalok/shilp-sutra'
|
|
35
|
-
* toast(
|
|
36
|
-
*
|
|
37
|
-
* // Valid colors: 'neutral' | 'success' | 'warning' | 'error' | 'info'
|
|
22
|
+
* toast.success('Saved!')
|
|
38
23
|
*/
|
|
39
|
-
export
|
|
40
|
-
|
|
41
|
-
|
|
24
|
+
export interface ToasterProps {
|
|
25
|
+
/** Toast position on screen. Default: 'bottom-right' */
|
|
26
|
+
position?: 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
27
|
+
/** Show close button on all toasts. Default: false */
|
|
28
|
+
closeButton?: boolean;
|
|
29
|
+
/** Default auto-dismiss duration in ms. Default: 5000 */
|
|
30
|
+
duration?: number;
|
|
31
|
+
/** Keyboard shortcut to focus toast region. Default: ['altKey', 'KeyT'] */
|
|
32
|
+
hotkey?: string[];
|
|
33
|
+
/** Max visible toasts before stacking. Default: 3 */
|
|
34
|
+
visibleToasts?: number;
|
|
35
|
+
/** Additional CSS class */
|
|
36
|
+
className?: string;
|
|
42
37
|
}
|
|
38
|
+
export declare const Toaster: React.ForwardRefExoticComponent<ToasterProps & React.RefAttributes<HTMLDivElement>>;
|
|
43
39
|
//# sourceMappingURL=toaster.d.ts.map
|
package/dist/ui/toaster.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toaster.d.ts","sourceRoot":"","sources":["../../src/ui/toaster.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"toaster.d.ts","sourceRoot":"","sources":["../../src/ui/toaster.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,YAAY;IAC3B,wDAAwD;IACxD,QAAQ,CAAC,EACL,UAAU,GACV,YAAY,GACZ,WAAW,GACX,aAAa,GACb,eAAe,GACf,cAAc,CAAA;IAClB,sDAAsD;IACtD,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB,qDAAqD;IACrD,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,OAAO,qFA8BnB,CAAA"}
|
package/dist/ui/toaster.js
CHANGED
|
@@ -1,24 +1,34 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import * as l from "react";
|
|
4
|
+
import { T as f } from "../_chunks/vendor-client.js";
|
|
5
|
+
import { c } from "../_chunks/utils.js";
|
|
6
|
+
const p = l.forwardRef(
|
|
7
|
+
({
|
|
8
|
+
position: o = "bottom-right",
|
|
9
|
+
closeButton: s = !1,
|
|
10
|
+
duration: a = 5e3,
|
|
11
|
+
hotkey: r = ["altKey", "KeyT"],
|
|
12
|
+
visibleToasts: e = 3,
|
|
13
|
+
className: m
|
|
14
|
+
}, i) => /* @__PURE__ */ t("div", { ref: i, className: c("z-toast", m), children: /* @__PURE__ */ t(
|
|
15
|
+
f,
|
|
16
|
+
{
|
|
17
|
+
position: o,
|
|
18
|
+
closeButton: s,
|
|
19
|
+
duration: a,
|
|
20
|
+
hotkey: r,
|
|
21
|
+
visibleToasts: e,
|
|
22
|
+
toastOptions: {
|
|
23
|
+
unstyled: !0,
|
|
24
|
+
classNames: {
|
|
25
|
+
toast: "w-full"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
) })
|
|
30
|
+
);
|
|
31
|
+
p.displayName = "Toaster";
|
|
22
32
|
export {
|
|
23
|
-
|
|
33
|
+
p as Toaster
|
|
24
34
|
};
|
|
@@ -4,11 +4,11 @@ import { toggleVariants } from './toggle';
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import * as ToggleGroupPrimitive from '../primitives/react-toggle-group';
|
|
6
6
|
declare const ToggleGroup: React.ForwardRefExoticComponent<((Omit<ToggleGroupPrimitive.ToggleGroupSingleProps & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<ToggleGroupPrimitive.ToggleGroupMultipleProps & React.RefAttributes<HTMLDivElement>, "ref">) & VariantProps<(props?: ({
|
|
7
|
-
variant?: "
|
|
7
|
+
variant?: "outline" | "default" | null | undefined;
|
|
8
8
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
9
9
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string>) & React.RefAttributes<HTMLDivElement>>;
|
|
10
10
|
declare const ToggleGroupItem: React.ForwardRefExoticComponent<Omit<ToggleGroupPrimitive.ToggleGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
11
|
-
variant?: "
|
|
11
|
+
variant?: "outline" | "default" | null | undefined;
|
|
12
12
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
13
13
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string> & React.RefAttributes<HTMLButtonElement>>;
|
|
14
14
|
export type ToggleGroupProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root> & VariantProps<typeof toggleVariants>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-group.d.ts","sourceRoot":"","sources":["../../src/ui/toggle-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,oBAAoB,MAAM,gCAAgC,CAAA;AACtE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAG5D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AASzC,QAAA,MAAM,WAAW;;;
|
|
1
|
+
{"version":3,"file":"toggle-group.d.ts","sourceRoot":"","sources":["../../src/ui/toggle-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,oBAAoB,MAAM,gCAAgC,CAAA;AACtE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAG5D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AASzC,QAAA,MAAM,WAAW;;;uHAkBf,CAAA;AAGF,QAAA,MAAM,eAAe;;;yHAoBnB,CAAA;AAGF,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,GAC7F,YAAY,CAAC,OAAO,cAAc,CAAC,CAAA;AACrC,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,GACjG,YAAY,CAAC,OAAO,cAAc,CAAC,CAAA;AAErC,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,CAAA"}
|
package/dist/ui/toggle-group.js
CHANGED
|
@@ -1,34 +1,37 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import * as
|
|
4
|
-
import { aF as
|
|
5
|
-
import { c
|
|
6
|
-
import { toggleVariants as
|
|
7
|
-
const
|
|
2
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
+
import * as e from "react";
|
|
4
|
+
import { aF as i, aG as l } from "../_chunks/primitives.js";
|
|
5
|
+
import { c } from "../_chunks/utils.js";
|
|
6
|
+
import { toggleVariants as f } from "./toggle.js";
|
|
7
|
+
const p = e.createContext({
|
|
8
8
|
size: "md",
|
|
9
9
|
variant: "default"
|
|
10
|
-
}),
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
)
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
10
|
+
}), u = e.forwardRef(({ className: r, variant: t, size: o, children: s, ...m }, a) => {
|
|
11
|
+
const d = e.useMemo(() => ({ variant: t, size: o }), [t, o]);
|
|
12
|
+
return /* @__PURE__ */ n(
|
|
13
|
+
i,
|
|
14
|
+
{
|
|
15
|
+
ref: a,
|
|
16
|
+
className: c("inline-flex items-center gap-ds-02", r),
|
|
17
|
+
...m,
|
|
18
|
+
children: /* @__PURE__ */ n(p.Provider, { value: d, children: s })
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
});
|
|
22
|
+
u.displayName = i.displayName;
|
|
23
|
+
const g = e.forwardRef(({ className: r, variant: t, size: o, ...s }, m) => {
|
|
24
|
+
const a = e.useContext(p);
|
|
25
|
+
return /* @__PURE__ */ n(
|
|
23
26
|
l,
|
|
24
27
|
{
|
|
25
|
-
ref:
|
|
26
|
-
className:
|
|
27
|
-
|
|
28
|
-
variant:
|
|
29
|
-
size:
|
|
28
|
+
ref: m,
|
|
29
|
+
className: c(
|
|
30
|
+
f({
|
|
31
|
+
variant: t ?? a.variant,
|
|
32
|
+
size: o ?? a.size
|
|
30
33
|
}),
|
|
31
|
-
|
|
34
|
+
r
|
|
32
35
|
),
|
|
33
36
|
...s
|
|
34
37
|
}
|
|
@@ -36,6 +39,6 @@ const g = a.forwardRef(({ className: t, variant: o, size: r, ...s }, i) => {
|
|
|
36
39
|
});
|
|
37
40
|
g.displayName = l.displayName;
|
|
38
41
|
export {
|
|
39
|
-
|
|
42
|
+
u as ToggleGroup,
|
|
40
43
|
g as ToggleGroupItem
|
|
41
44
|
};
|
package/dist/ui/toggle.d.ts
CHANGED
|
@@ -3,11 +3,11 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import * as TogglePrimitive from '../primitives/react-toggle';
|
|
5
5
|
declare const toggleVariants: (props?: ({
|
|
6
|
-
variant?: "
|
|
6
|
+
variant?: "outline" | "default" | null | undefined;
|
|
7
7
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
8
8
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
9
|
declare const Toggle: React.ForwardRefExoticComponent<Omit<TogglePrimitive.ToggleProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
10
|
-
variant?: "
|
|
10
|
+
variant?: "outline" | "default" | null | undefined;
|
|
11
11
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
12
12
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string> & React.RefAttributes<HTMLButtonElement>>;
|
|
13
13
|
export type ToggleProps = React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>;
|
package/dist/ui/toggle.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../src/ui/toggle.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../src/ui/toggle.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAQjE,QAAA,MAAM,cAAc;;;8EAqBnB,CAAA;AAED,QAAA,MAAM,MAAM;;;yHAYV,CAAA;AAGF,MAAM,MAAM,WAAW,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,GACnF,YAAY,CAAC,OAAO,cAAc,CAAC,CAAA;AAErC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
|
package/dist/ui/toggle.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import * as
|
|
4
|
-
import { aE as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
import { aE as s } from "../_chunks/primitives.js";
|
|
5
|
+
import { ag as d } from "../_chunks/vendor-utils.js";
|
|
6
|
+
import { s as m, m as c } from "../_chunks/motion2.js";
|
|
7
|
+
import { c as f } from "../_chunks/utils.js";
|
|
8
|
+
import { m as l } from "../_chunks/motion.js";
|
|
9
|
+
const p = l.create(s), g = d(
|
|
10
|
+
"inline-flex items-center justify-center gap-ds-03 rounded-ds-md font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-action-disabled data-[state=on]:bg-accent-2 data-[state=on]:text-accent-11",
|
|
9
11
|
{
|
|
10
12
|
variants: {
|
|
11
13
|
variant: {
|
|
12
|
-
default: "bg-transparent hover:bg-
|
|
13
|
-
outline: "border border-border bg-transparent hover:bg-
|
|
14
|
+
default: "bg-transparent hover:bg-surface-3 text-surface-fg-muted",
|
|
15
|
+
outline: "border border-surface-border-strong bg-transparent hover:bg-surface-3"
|
|
14
16
|
},
|
|
15
17
|
size: {
|
|
16
18
|
sm: "h-ds-sm px-ds-03 text-ds-sm",
|
|
@@ -23,16 +25,18 @@ const m = n(
|
|
|
23
25
|
size: "md"
|
|
24
26
|
}
|
|
25
27
|
}
|
|
26
|
-
),
|
|
27
|
-
|
|
28
|
+
), u = n.forwardRef(({ className: t, variant: e, size: a, ...o }, r) => /* @__PURE__ */ i(
|
|
29
|
+
p,
|
|
28
30
|
{
|
|
29
|
-
ref:
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
ref: r,
|
|
32
|
+
whileTap: { scale: 0.95 },
|
|
33
|
+
transition: m.snappy,
|
|
34
|
+
className: f(g({ variant: e, size: a }), t),
|
|
35
|
+
...c(o)
|
|
32
36
|
}
|
|
33
37
|
));
|
|
34
|
-
|
|
38
|
+
u.displayName = s.displayName;
|
|
35
39
|
export {
|
|
36
|
-
|
|
37
|
-
|
|
40
|
+
u as Toggle,
|
|
41
|
+
g as toggleVariants
|
|
38
42
|
};
|
package/dist/ui/tooltip.d.ts
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import * as TooltipPrimitive from '../primitives/react-tooltip';
|
|
4
4
|
declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
5
|
-
declare const Tooltip: React.FC<TooltipPrimitive.
|
|
5
|
+
declare const Tooltip: React.FC<React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Root>>;
|
|
6
6
|
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
7
|
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export type TooltipContentProps = React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>;
|
|
8
9
|
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
9
10
|
//# sourceMappingURL=tooltip.d.ts.map
|
package/dist/ui/tooltip.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../src/ui/tooltip.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../src/ui/tooltip.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAA;AAM7D,QAAA,MAAM,eAAe,iDAA4B,CAAA;AAOjD,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,wBAAwB,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAyBnF,CAAA;AAGD,QAAA,MAAM,cAAc,gHAA2B,CAAA;AAW/C,QAAA,MAAM,cAAc,gKAkClB,CAAA;AAGF,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,CAAA;AAEjG,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,CAAA"}
|
package/dist/ui/tooltip.js
CHANGED
|
@@ -1,24 +1,61 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
import { c as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import * as s from "react";
|
|
4
|
+
import { aK as x, aL as p, aH as y, aI as T, aJ as v } from "../_chunks/primitives.js";
|
|
5
|
+
import { c as g } from "../_chunks/utils.js";
|
|
6
|
+
import { t as h, s as C } from "../_chunks/motion2.js";
|
|
7
|
+
import { A as b, m as w } from "../_chunks/motion.js";
|
|
8
|
+
const z = y, f = s.createContext({ open: !1 }), N = ({
|
|
9
|
+
open: a,
|
|
10
|
+
defaultOpen: i,
|
|
11
|
+
onOpenChange: t,
|
|
12
|
+
...r
|
|
13
|
+
}) => {
|
|
14
|
+
const [n, c] = s.useState(i ?? !1), o = a !== void 0, l = o ? a : n, m = s.useCallback(
|
|
15
|
+
(d) => {
|
|
16
|
+
o || c(d), t == null || t(d);
|
|
17
|
+
},
|
|
18
|
+
[o, t]
|
|
19
|
+
), u = s.useMemo(() => ({ open: l }), [l]);
|
|
20
|
+
return /* @__PURE__ */ e(f.Provider, { value: u, children: /* @__PURE__ */ e(v, { open: l, onOpenChange: m, ...r }) });
|
|
21
|
+
};
|
|
22
|
+
N.displayName = "Tooltip";
|
|
23
|
+
const H = T, P = {
|
|
24
|
+
top: { y: 4 },
|
|
25
|
+
bottom: { y: -4 },
|
|
26
|
+
left: { x: 4 },
|
|
27
|
+
right: { x: -4 }
|
|
28
|
+
}, I = s.forwardRef(({ className: a, sideOffset: i = 4, side: t = "top", ...r }, n) => {
|
|
29
|
+
const { open: c } = s.useContext(f), o = P[t] ?? {};
|
|
30
|
+
return /* @__PURE__ */ e(b, { children: c && /* @__PURE__ */ e(x, { forceMount: !0, children: /* @__PURE__ */ e(
|
|
31
|
+
p,
|
|
32
|
+
{
|
|
33
|
+
ref: n,
|
|
34
|
+
forceMount: !0,
|
|
35
|
+
asChild: !0,
|
|
36
|
+
sideOffset: i,
|
|
37
|
+
side: t,
|
|
38
|
+
...r,
|
|
39
|
+
children: /* @__PURE__ */ e(
|
|
40
|
+
w.div,
|
|
41
|
+
{
|
|
42
|
+
initial: { opacity: 0, scale: 0.95, ...o },
|
|
43
|
+
animate: { opacity: 1, scale: 1, x: 0, y: 0 },
|
|
44
|
+
exit: { opacity: 0, scale: 0.95, ...o },
|
|
45
|
+
transition: { ...C.snappy, opacity: h.fade },
|
|
46
|
+
className: g(
|
|
47
|
+
"z-tooltip overflow-hidden rounded-ds-md bg-surface-fg px-ds-04 py-ds-02b text-ds-sm text-accent-fg shadow-02",
|
|
48
|
+
a
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
) }) });
|
|
54
|
+
});
|
|
55
|
+
I.displayName = p.displayName;
|
|
19
56
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
57
|
+
N as Tooltip,
|
|
58
|
+
I as TooltipContent,
|
|
59
|
+
z as TooltipProvider,
|
|
60
|
+
H as TooltipTrigger
|
|
24
61
|
};
|
|
@@ -6,7 +6,7 @@ interface TreeContextValue {
|
|
|
6
6
|
checkboxes: boolean;
|
|
7
7
|
}
|
|
8
8
|
export declare function useTreeContext(): TreeContextValue;
|
|
9
|
-
export interface TreeViewProps {
|
|
9
|
+
export interface TreeViewProps extends Omit<React.HTMLAttributes<HTMLUListElement>, 'onSelect'> {
|
|
10
10
|
/** Data-driven mode: pass items array */
|
|
11
11
|
items?: TreeNode[];
|
|
12
12
|
/** Initially expanded node IDs */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree-view.d.ts","sourceRoot":"","sources":["../../../src/ui/tree-view/tree-view.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EAAE,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAA;AAInD,UAAU,gBAAgB;IACxB,IAAI,EAAE,UAAU,CAAC,OAAO,OAAO,CAAC,CAAA;IAChC,UAAU,EAAE,OAAO,CAAA;CACpB;AAID,wBAAgB,cAAc,qBAM7B;AAGD,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"tree-view.d.ts","sourceRoot":"","sources":["../../../src/ui/tree-view/tree-view.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EAAE,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAA;AAInD,UAAU,gBAAgB;IACxB,IAAI,EAAE,UAAU,CAAC,OAAO,OAAO,CAAC,CAAA;IAChC,UAAU,EAAE,OAAO,CAAA;CACpB;AAID,wBAAgB,cAAc,qBAM7B;AAGD,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAAE,UAAU,CAAC;IAC7F,yCAAyC;IACzC,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAA;IAClB,kCAAkC;IAClC,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;IAC1B,kCAAkC;IAClC,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;IAC1B,0BAA0B;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,uCAAuC;IACvC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;IAClC,oCAAoC;IACpC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;IAClC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B;AAyCD,QAAA,MAAM,QAAQ,wFAoHb,CAAA;AAGD,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|