@constructive-io/ui 0.1.1 → 0.2.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/components/alert-dialog.js.map +1 -1
- package/dist/components/autocomplete.js +11 -3
- package/dist/components/autocomplete.js.map +1 -1
- package/dist/components/avatar.js.map +1 -1
- package/dist/components/breadcrumb.js.map +1 -1
- package/dist/components/combobox.d.ts +1 -1
- package/dist/components/combobox.js +49 -13
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/command.d.ts +16 -35
- package/dist/components/command.js +72 -508
- package/dist/components/command.js.map +1 -1
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/drawer.js +1 -1
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/form-control.js.map +1 -1
- package/dist/components/form.js.map +1 -1
- package/dist/components/input-group.js +2 -2
- package/dist/components/input-group.js.map +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/input.js.map +1 -1
- package/dist/components/json-input.js.map +1 -1
- package/dist/components/multi-select.js.map +1 -1
- package/dist/components/pagination.js.map +1 -1
- package/dist/components/popover.js.map +1 -1
- package/dist/components/portal.js.map +1 -1
- package/dist/components/record-picker.js +1 -1
- package/dist/components/record-picker.js.map +1 -1
- package/dist/components/resizable.js.map +1 -1
- package/dist/components/responsive-diagram.js +6 -4
- package/dist/components/responsive-diagram.js.map +1 -1
- package/dist/components/select.d.ts +2 -2
- package/dist/components/select.js +3 -3
- package/dist/components/select.js.map +1 -1
- package/dist/components/sheet.js.map +1 -1
- package/dist/components/sidebar.js +1 -1
- package/dist/components/sidebar.js.map +1 -1
- package/dist/components/stack/index.d.ts +11 -0
- package/dist/components/stack/index.js +33 -6
- package/dist/components/stack/index.js.map +1 -1
- package/dist/components/stepper.js.map +1 -1
- package/dist/components/table.js.map +1 -1
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/tags.d.ts +1 -3
- package/dist/components/tags.js +107 -388
- package/dist/components/tags.js.map +1 -1
- package/dist/components/textarea.js +1 -1
- package/dist/components/textarea.js.map +1 -1
- package/dist/components/tooltip.js.map +1 -1
- package/dist/index.cjs +348 -363
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -24
- package/dist/index.d.ts +22 -24
- package/dist/index.js +235 -250
- package/dist/index.js.map +1 -1
- package/package.json +2 -6
- package/src/styles/globals.css +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -31,7 +31,8 @@ import * as _base_ui_react_scroll_area from '@base-ui/react/scroll-area';
|
|
|
31
31
|
import { ScrollArea as ScrollArea$1 } from '@base-ui/react/scroll-area';
|
|
32
32
|
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
33
33
|
import { Avatar as Avatar$1 } from '@base-ui/react/avatar';
|
|
34
|
-
import { Autocomplete as Autocomplete$1
|
|
34
|
+
import { Autocomplete as Autocomplete$1 } from '@base-ui/react/autocomplete';
|
|
35
|
+
import { Command as Command$1 } from 'cmdk';
|
|
35
36
|
import { Combobox as Combobox$1 } from '@base-ui/react/combobox';
|
|
36
37
|
import { Calendar as Calendar$1, RangeCalendar as RangeCalendar$1 } from 'react-aria-components';
|
|
37
38
|
import { ToasterProps } from 'sonner';
|
|
@@ -393,8 +394,8 @@ type SelectPopupProps = Select$1.Popup.Props & {
|
|
|
393
394
|
declare function SelectPopup({ className, children, sideOffset, alignItemWithTrigger, position: _position, ...props }: SelectPopupProps): react_jsx_runtime.JSX.Element;
|
|
394
395
|
declare function SelectItem({ className, children, ...props }: Select$1.Item.Props): react_jsx_runtime.JSX.Element;
|
|
395
396
|
declare function SelectSeparator({ className, ...props }: Select$1.Separator.Props): react_jsx_runtime.JSX.Element;
|
|
396
|
-
declare function SelectGroup(props: Select$1.Group.Props): react_jsx_runtime.JSX.Element;
|
|
397
|
-
declare function SelectGroupLabel(props: Select$1.GroupLabel.Props): react_jsx_runtime.JSX.Element;
|
|
397
|
+
declare function SelectGroup({ ...props }: Select$1.Group.Props): react_jsx_runtime.JSX.Element;
|
|
398
|
+
declare function SelectGroupLabel({ ...props }: Select$1.GroupLabel.Props): react_jsx_runtime.JSX.Element;
|
|
398
399
|
type SelectRichItemProps = Select$1.Item.Props & {
|
|
399
400
|
/** Main label text */
|
|
400
401
|
label?: React$1.ReactNode;
|
|
@@ -816,30 +817,16 @@ declare function AutocompletePopup({ className, children, sideOffset, ...props }
|
|
|
816
817
|
}): react_jsx_runtime.JSX.Element;
|
|
817
818
|
declare function AutocompleteItem({ className, children, ...props }: Autocomplete$1.Item.Props): react_jsx_runtime.JSX.Element;
|
|
818
819
|
declare function AutocompleteSeparator({ className, ...props }: Autocomplete$1.Separator.Props): react_jsx_runtime.JSX.Element;
|
|
819
|
-
declare function AutocompleteGroup({ className, ...props }: Autocomplete$1.Group.Props): react_jsx_runtime.JSX.Element;
|
|
820
820
|
declare function AutocompleteEmpty({ className, ...props }: Autocomplete$1.Empty.Props): react_jsx_runtime.JSX.Element;
|
|
821
|
-
declare function AutocompleteList({ className, ...props }: Autocomplete$1.List.Props): react_jsx_runtime.JSX.Element;
|
|
822
821
|
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
};
|
|
829
|
-
declare function Command<ItemValue>({ autoHighlight, keepHighlight, open, ...props }: CommandProps<ItemValue>): react_jsx_runtime.JSX.Element;
|
|
830
|
-
type CommandInputProps = Omit<React$1.ComponentProps<typeof AutocompleteInput>, "onChange"> & {
|
|
831
|
-
value?: string;
|
|
832
|
-
onValueChange?: (value: string) => void;
|
|
833
|
-
};
|
|
834
|
-
declare function CommandInput({ className, placeholder, value, onValueChange, ...props }: CommandInputProps): react_jsx_runtime.JSX.Element;
|
|
835
|
-
declare function CommandList({ className, ...props }: React$1.ComponentProps<typeof AutocompleteList>): react_jsx_runtime.JSX.Element;
|
|
836
|
-
declare function CommandEmpty({ className, ...props }: React$1.ComponentProps<typeof AutocompleteEmpty>): react_jsx_runtime.JSX.Element;
|
|
837
|
-
type CommandGroupProps = React$1.ComponentProps<typeof AutocompleteGroup> & {
|
|
838
|
-
/** Group heading label */
|
|
822
|
+
declare function Command({ className, ...props }: React$1.ComponentProps<typeof Command$1>): react_jsx_runtime.JSX.Element;
|
|
823
|
+
declare function CommandInput({ className, placeholder, ...props }: React$1.ComponentProps<typeof Command$1.Input>): react_jsx_runtime.JSX.Element;
|
|
824
|
+
declare function CommandList({ className, ...props }: React$1.ComponentProps<typeof Command$1.List>): react_jsx_runtime.JSX.Element;
|
|
825
|
+
declare function CommandEmpty({ className, ...props }: React$1.ComponentProps<typeof Command$1.Empty>): react_jsx_runtime.JSX.Element;
|
|
826
|
+
declare function CommandGroup({ className, heading, children, ...props }: React$1.ComponentProps<typeof Command$1.Group> & {
|
|
839
827
|
heading?: React$1.ReactNode;
|
|
840
|
-
};
|
|
841
|
-
declare function
|
|
842
|
-
declare function CommandItem({ className, ...props }: React$1.ComponentProps<typeof AutocompleteItem>): react_jsx_runtime.JSX.Element;
|
|
828
|
+
}): react_jsx_runtime.JSX.Element;
|
|
829
|
+
declare function CommandItem({ className, ...props }: React$1.ComponentProps<typeof Command$1.Item>): react_jsx_runtime.JSX.Element;
|
|
843
830
|
|
|
844
831
|
declare function Combobox<ItemValue, Multiple extends boolean | undefined = false>(props: Combobox$1.Root.Props<ItemValue, Multiple>): react_jsx_runtime.JSX.Element;
|
|
845
832
|
declare function ComboboxInput({ className, showTrigger, showClear, startAddon, size, ...props }: Omit<Combobox$1.Input.Props, "size"> & {
|
|
@@ -1473,6 +1460,7 @@ type CardInjectedProps = {
|
|
|
1473
1460
|
setTitle: (title?: string) => void;
|
|
1474
1461
|
setDescription: (description?: string) => void;
|
|
1475
1462
|
setWidth: (width?: string | number) => void;
|
|
1463
|
+
setDismissable: (dismissable: boolean) => void;
|
|
1476
1464
|
updateProps: <P>(patch: Partial<P> | ((prev: P) => P)) => void;
|
|
1477
1465
|
};
|
|
1478
1466
|
};
|
|
@@ -1506,6 +1494,9 @@ type CardSpec<P = unknown> = {
|
|
|
1506
1494
|
* Pass an object to configure blur and styling.
|
|
1507
1495
|
*/
|
|
1508
1496
|
backdrop?: boolean | BackdropConfig;
|
|
1497
|
+
/** Whether user interactions (close button, Escape, backdrop click, gestures) can dismiss this card.
|
|
1498
|
+
* Programmatic dismissal via card.close() / api.dismiss() always works. Default: true */
|
|
1499
|
+
dismissable?: boolean;
|
|
1509
1500
|
/**
|
|
1510
1501
|
* Callback fired when this card is removed from the stack.
|
|
1511
1502
|
* Fires regardless of how the card was closed (swipe, backdrop, escape, api.dismiss, etc.)
|
|
@@ -1596,6 +1587,8 @@ type CardStackApi = {
|
|
|
1596
1587
|
setDescription: (id: CardId, description?: string) => void;
|
|
1597
1588
|
/** Update the width for a specific card */
|
|
1598
1589
|
setWidth: (id: CardId, width?: string | number) => void;
|
|
1590
|
+
/** Update the dismissable state for a specific card */
|
|
1591
|
+
setDismissable: (id: CardId, dismissable: boolean) => void;
|
|
1599
1592
|
/**
|
|
1600
1593
|
* Remove a card from the stack.
|
|
1601
1594
|
* By default (cascade: true), also removes all cards above it.
|
|
@@ -1720,6 +1713,10 @@ type StackAction = {
|
|
|
1720
1713
|
type: 'SET_WIDTH';
|
|
1721
1714
|
id: CardId;
|
|
1722
1715
|
width?: string | number;
|
|
1716
|
+
} | {
|
|
1717
|
+
type: 'SET_DISMISSABLE';
|
|
1718
|
+
id: CardId;
|
|
1719
|
+
dismissable: boolean;
|
|
1723
1720
|
} | {
|
|
1724
1721
|
type: 'DISMISS';
|
|
1725
1722
|
id: CardId;
|
|
@@ -1763,6 +1760,7 @@ declare function useCardInjectedProps(id: CardId): {
|
|
|
1763
1760
|
setTitle: (title?: string) => void;
|
|
1764
1761
|
setDescription: (description?: string) => void;
|
|
1765
1762
|
setWidth: (width?: string | number) => void;
|
|
1763
|
+
setDismissable: (dismissable: boolean) => void;
|
|
1766
1764
|
updateProps: <P>(patch: Partial<P> | ((prev: P) => P)) => void;
|
|
1767
1765
|
};
|
|
1768
1766
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -31,7 +31,8 @@ import * as _base_ui_react_scroll_area from '@base-ui/react/scroll-area';
|
|
|
31
31
|
import { ScrollArea as ScrollArea$1 } from '@base-ui/react/scroll-area';
|
|
32
32
|
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
33
33
|
import { Avatar as Avatar$1 } from '@base-ui/react/avatar';
|
|
34
|
-
import { Autocomplete as Autocomplete$1
|
|
34
|
+
import { Autocomplete as Autocomplete$1 } from '@base-ui/react/autocomplete';
|
|
35
|
+
import { Command as Command$1 } from 'cmdk';
|
|
35
36
|
import { Combobox as Combobox$1 } from '@base-ui/react/combobox';
|
|
36
37
|
import { Calendar as Calendar$1, RangeCalendar as RangeCalendar$1 } from 'react-aria-components';
|
|
37
38
|
import { ToasterProps } from 'sonner';
|
|
@@ -393,8 +394,8 @@ type SelectPopupProps = Select$1.Popup.Props & {
|
|
|
393
394
|
declare function SelectPopup({ className, children, sideOffset, alignItemWithTrigger, position: _position, ...props }: SelectPopupProps): react_jsx_runtime.JSX.Element;
|
|
394
395
|
declare function SelectItem({ className, children, ...props }: Select$1.Item.Props): react_jsx_runtime.JSX.Element;
|
|
395
396
|
declare function SelectSeparator({ className, ...props }: Select$1.Separator.Props): react_jsx_runtime.JSX.Element;
|
|
396
|
-
declare function SelectGroup(props: Select$1.Group.Props): react_jsx_runtime.JSX.Element;
|
|
397
|
-
declare function SelectGroupLabel(props: Select$1.GroupLabel.Props): react_jsx_runtime.JSX.Element;
|
|
397
|
+
declare function SelectGroup({ ...props }: Select$1.Group.Props): react_jsx_runtime.JSX.Element;
|
|
398
|
+
declare function SelectGroupLabel({ ...props }: Select$1.GroupLabel.Props): react_jsx_runtime.JSX.Element;
|
|
398
399
|
type SelectRichItemProps = Select$1.Item.Props & {
|
|
399
400
|
/** Main label text */
|
|
400
401
|
label?: React$1.ReactNode;
|
|
@@ -816,30 +817,16 @@ declare function AutocompletePopup({ className, children, sideOffset, ...props }
|
|
|
816
817
|
}): react_jsx_runtime.JSX.Element;
|
|
817
818
|
declare function AutocompleteItem({ className, children, ...props }: Autocomplete$1.Item.Props): react_jsx_runtime.JSX.Element;
|
|
818
819
|
declare function AutocompleteSeparator({ className, ...props }: Autocomplete$1.Separator.Props): react_jsx_runtime.JSX.Element;
|
|
819
|
-
declare function AutocompleteGroup({ className, ...props }: Autocomplete$1.Group.Props): react_jsx_runtime.JSX.Element;
|
|
820
820
|
declare function AutocompleteEmpty({ className, ...props }: Autocomplete$1.Empty.Props): react_jsx_runtime.JSX.Element;
|
|
821
|
-
declare function AutocompleteList({ className, ...props }: Autocomplete$1.List.Props): react_jsx_runtime.JSX.Element;
|
|
822
821
|
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
};
|
|
829
|
-
declare function Command<ItemValue>({ autoHighlight, keepHighlight, open, ...props }: CommandProps<ItemValue>): react_jsx_runtime.JSX.Element;
|
|
830
|
-
type CommandInputProps = Omit<React$1.ComponentProps<typeof AutocompleteInput>, "onChange"> & {
|
|
831
|
-
value?: string;
|
|
832
|
-
onValueChange?: (value: string) => void;
|
|
833
|
-
};
|
|
834
|
-
declare function CommandInput({ className, placeholder, value, onValueChange, ...props }: CommandInputProps): react_jsx_runtime.JSX.Element;
|
|
835
|
-
declare function CommandList({ className, ...props }: React$1.ComponentProps<typeof AutocompleteList>): react_jsx_runtime.JSX.Element;
|
|
836
|
-
declare function CommandEmpty({ className, ...props }: React$1.ComponentProps<typeof AutocompleteEmpty>): react_jsx_runtime.JSX.Element;
|
|
837
|
-
type CommandGroupProps = React$1.ComponentProps<typeof AutocompleteGroup> & {
|
|
838
|
-
/** Group heading label */
|
|
822
|
+
declare function Command({ className, ...props }: React$1.ComponentProps<typeof Command$1>): react_jsx_runtime.JSX.Element;
|
|
823
|
+
declare function CommandInput({ className, placeholder, ...props }: React$1.ComponentProps<typeof Command$1.Input>): react_jsx_runtime.JSX.Element;
|
|
824
|
+
declare function CommandList({ className, ...props }: React$1.ComponentProps<typeof Command$1.List>): react_jsx_runtime.JSX.Element;
|
|
825
|
+
declare function CommandEmpty({ className, ...props }: React$1.ComponentProps<typeof Command$1.Empty>): react_jsx_runtime.JSX.Element;
|
|
826
|
+
declare function CommandGroup({ className, heading, children, ...props }: React$1.ComponentProps<typeof Command$1.Group> & {
|
|
839
827
|
heading?: React$1.ReactNode;
|
|
840
|
-
};
|
|
841
|
-
declare function
|
|
842
|
-
declare function CommandItem({ className, ...props }: React$1.ComponentProps<typeof AutocompleteItem>): react_jsx_runtime.JSX.Element;
|
|
828
|
+
}): react_jsx_runtime.JSX.Element;
|
|
829
|
+
declare function CommandItem({ className, ...props }: React$1.ComponentProps<typeof Command$1.Item>): react_jsx_runtime.JSX.Element;
|
|
843
830
|
|
|
844
831
|
declare function Combobox<ItemValue, Multiple extends boolean | undefined = false>(props: Combobox$1.Root.Props<ItemValue, Multiple>): react_jsx_runtime.JSX.Element;
|
|
845
832
|
declare function ComboboxInput({ className, showTrigger, showClear, startAddon, size, ...props }: Omit<Combobox$1.Input.Props, "size"> & {
|
|
@@ -1473,6 +1460,7 @@ type CardInjectedProps = {
|
|
|
1473
1460
|
setTitle: (title?: string) => void;
|
|
1474
1461
|
setDescription: (description?: string) => void;
|
|
1475
1462
|
setWidth: (width?: string | number) => void;
|
|
1463
|
+
setDismissable: (dismissable: boolean) => void;
|
|
1476
1464
|
updateProps: <P>(patch: Partial<P> | ((prev: P) => P)) => void;
|
|
1477
1465
|
};
|
|
1478
1466
|
};
|
|
@@ -1506,6 +1494,9 @@ type CardSpec<P = unknown> = {
|
|
|
1506
1494
|
* Pass an object to configure blur and styling.
|
|
1507
1495
|
*/
|
|
1508
1496
|
backdrop?: boolean | BackdropConfig;
|
|
1497
|
+
/** Whether user interactions (close button, Escape, backdrop click, gestures) can dismiss this card.
|
|
1498
|
+
* Programmatic dismissal via card.close() / api.dismiss() always works. Default: true */
|
|
1499
|
+
dismissable?: boolean;
|
|
1509
1500
|
/**
|
|
1510
1501
|
* Callback fired when this card is removed from the stack.
|
|
1511
1502
|
* Fires regardless of how the card was closed (swipe, backdrop, escape, api.dismiss, etc.)
|
|
@@ -1596,6 +1587,8 @@ type CardStackApi = {
|
|
|
1596
1587
|
setDescription: (id: CardId, description?: string) => void;
|
|
1597
1588
|
/** Update the width for a specific card */
|
|
1598
1589
|
setWidth: (id: CardId, width?: string | number) => void;
|
|
1590
|
+
/** Update the dismissable state for a specific card */
|
|
1591
|
+
setDismissable: (id: CardId, dismissable: boolean) => void;
|
|
1599
1592
|
/**
|
|
1600
1593
|
* Remove a card from the stack.
|
|
1601
1594
|
* By default (cascade: true), also removes all cards above it.
|
|
@@ -1720,6 +1713,10 @@ type StackAction = {
|
|
|
1720
1713
|
type: 'SET_WIDTH';
|
|
1721
1714
|
id: CardId;
|
|
1722
1715
|
width?: string | number;
|
|
1716
|
+
} | {
|
|
1717
|
+
type: 'SET_DISMISSABLE';
|
|
1718
|
+
id: CardId;
|
|
1719
|
+
dismissable: boolean;
|
|
1723
1720
|
} | {
|
|
1724
1721
|
type: 'DISMISS';
|
|
1725
1722
|
id: CardId;
|
|
@@ -1763,6 +1760,7 @@ declare function useCardInjectedProps(id: CardId): {
|
|
|
1763
1760
|
setTitle: (title?: string) => void;
|
|
1764
1761
|
setDescription: (description?: string) => void;
|
|
1765
1762
|
setWidth: (width?: string | number) => void;
|
|
1763
|
+
setDismissable: (dismissable: boolean) => void;
|
|
1766
1764
|
updateProps: <P>(patch: Partial<P> | ((prev: P) => P)) => void;
|
|
1767
1765
|
};
|
|
1768
1766
|
};
|