@una-ui/nuxt 1.0.0-alpha.1 → 1.0.0-alpha.10
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/module.json +3 -3
- package/dist/module.mjs +10 -8
- package/dist/runtime/components/alert-dialog/AlertDialog.vue.d.ts +1 -1
- package/dist/runtime/components/alert-dialog/AlertDialogAction.vue.d.ts +1 -1
- package/dist/runtime/components/alert-dialog/AlertDialogCancel.vue.d.ts +1 -1
- package/dist/runtime/components/alert-dialog/AlertDialogContent.vue +0 -1
- package/dist/runtime/components/aspect-ratio/AspectRatio.vue.d.ts +1 -1
- package/dist/runtime/components/combobox/Combobox.vue +3 -2
- package/dist/runtime/components/combobox/Combobox.vue.d.ts +19 -19
- package/dist/runtime/components/combobox/ComboboxInput.vue.d.ts +1 -1
- package/dist/runtime/components/combobox/ComboboxList.vue +3 -0
- package/dist/runtime/components/combobox/ComboboxTrigger.vue.d.ts +1 -1
- package/dist/runtime/components/data/table/Table.vue +6 -1
- package/dist/runtime/components/data/table/TableEmpty.vue +17 -9
- package/dist/runtime/components/data/table/TableEmpty.vue.d.ts +4 -0
- package/dist/runtime/components/drawer/Drawer.vue.d.ts +1 -1
- package/dist/runtime/components/drawer/DrawerContent.vue +0 -1
- package/dist/runtime/components/drawer/DrawerOverlay.vue +1 -0
- package/dist/runtime/components/elements/Accordion.vue.d.ts +3 -3
- package/dist/runtime/components/elements/Badge.vue.d.ts +1 -5
- package/dist/runtime/components/elements/Progress.vue.d.ts +1 -1
- package/dist/runtime/components/elements/Toggle.vue.d.ts +1 -1
- package/dist/runtime/components/elements/collapsible/Collapsible.vue.d.ts +2 -2
- package/dist/runtime/components/elements/collapsible/CollapsibleContent.vue +1 -0
- package/dist/runtime/components/elements/dialog/Dialog.vue.d.ts +1 -1
- package/dist/runtime/components/elements/dialog/DialogContent.vue +0 -1
- package/dist/runtime/components/elements/dialog/DialogDescription.vue +2 -1
- package/dist/runtime/components/elements/dialog/DialogScrollContent.vue +0 -1
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenu.vue.d.ts +4 -4
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuContent.vue +3 -1
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuSubContent.vue +3 -1
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +1 -1
- package/dist/runtime/components/elements/pagination/Pagination.vue.d.ts +2 -5
- package/dist/runtime/components/elements/pagination/PaginationListItem.vue.d.ts +1 -1
- package/dist/runtime/components/elements/popover/Popover.vue.d.ts +1 -1
- package/dist/runtime/components/elements/popover/PopoverContent.vue +3 -0
- package/dist/runtime/components/elements/tabs/Tabs.vue.d.ts +1 -1
- package/dist/runtime/components/elements/tabs/TabsTrigger.vue.d.ts +1 -1
- package/dist/runtime/components/elements/tooltip/TooltipContent.vue +1 -0
- package/dist/runtime/components/forms/Input.vue.d.ts +1 -13
- package/dist/runtime/components/forms/Switch.vue.d.ts +2 -2
- package/dist/runtime/components/forms/radio-group/RadioGroup.vue +1 -2
- package/dist/runtime/components/forms/radio-group/RadioGroup.vue.d.ts +5 -5
- package/dist/runtime/components/forms/radio-group/RadioGroupItem.vue +1 -1
- package/dist/runtime/components/forms/radio-group/RadioGroupItem.vue.d.ts +2 -1
- package/dist/runtime/components/forms/select/Select.vue +4 -6
- package/dist/runtime/components/forms/select/Select.vue.d.ts +18 -20
- package/dist/runtime/components/forms/select/SelectContent.vue +3 -0
- package/dist/runtime/components/hover-card/HoverCard.vue.d.ts +1 -1
- package/dist/runtime/components/hover-card/HoverCardContent.vue +3 -0
- package/dist/runtime/components/misc/ThemeSwitcher.vue +25 -19
- package/dist/runtime/components/misc/ThemeSwitcher.vue.d.ts +1 -1
- package/dist/runtime/components/navigation/breadcrumb/Breadcrumb.vue.d.ts +6 -16
- package/dist/runtime/components/navigation-menu/NavigationMenu.vue.d.ts +11 -11
- package/dist/runtime/components/navigation-menu/NavigationMenuIndicator.vue +1 -0
- package/dist/runtime/components/navigation-menu/NavigationMenuLink.vue.d.ts +1 -1
- package/dist/runtime/components/navigation-menu/NavigationMenuViewport.vue +1 -0
- package/dist/runtime/components/number-field/NumberField.vue +1 -0
- package/dist/runtime/components/overlays/Toaster.vue.d.ts +1 -1
- package/dist/runtime/components/overlays/toast/Toast.vue.d.ts +1 -1
- package/dist/runtime/components/overlays/toast/ToastAction.vue.d.ts +1 -1
- package/dist/runtime/components/pin-input/PinInput.vue +139 -0
- package/dist/runtime/components/pin-input/PinInput.vue.d.ts +33 -0
- package/dist/runtime/components/pin-input/PinInputGroup.vue +28 -0
- package/dist/runtime/components/pin-input/PinInputGroup.vue.d.ts +13 -0
- package/dist/runtime/components/pin-input/PinInputSeparator.vue +30 -0
- package/dist/runtime/components/pin-input/PinInputSeparator.vue.d.ts +15 -0
- package/dist/runtime/components/pin-input/PinInputSlot.vue +46 -0
- package/dist/runtime/components/pin-input/PinInputSlot.vue.d.ts +5 -0
- package/dist/runtime/components/resizable/ResizableHandle.vue +1 -0
- package/dist/runtime/components/resizable/ResizablePanel.vue.d.ts +1 -7
- package/dist/runtime/components/resizable/ResizablePanelGroup.vue.d.ts +1 -3
- package/dist/runtime/components/sheet/Sheet.vue.d.ts +1 -1
- package/dist/runtime/components/sheet/SheetContent.vue +6 -2
- package/dist/runtime/components/sheet/SheetOverlay.vue +6 -1
- package/dist/runtime/components/sidebar/SidebarMenu.vue.d.ts +1 -1
- package/dist/runtime/components/stepper/Stepper.vue +163 -0
- package/dist/runtime/components/stepper/Stepper.vue.d.ts +62 -0
- package/dist/runtime/components/stepper/StepperContainer.vue +21 -0
- package/dist/runtime/components/stepper/StepperContainer.vue.d.ts +15 -0
- package/dist/runtime/components/stepper/StepperDescription.vue +28 -0
- package/dist/runtime/components/stepper/StepperDescription.vue.d.ts +13 -0
- package/dist/runtime/components/stepper/StepperHeader.vue +21 -0
- package/dist/runtime/components/stepper/StepperHeader.vue.d.ts +15 -0
- package/dist/runtime/components/stepper/StepperIndicator.vue +34 -0
- package/dist/runtime/components/stepper/StepperIndicator.vue.d.ts +15 -0
- package/dist/runtime/components/stepper/StepperItem.vue +44 -0
- package/dist/runtime/components/stepper/StepperItem.vue.d.ts +15 -0
- package/dist/runtime/components/stepper/StepperSeparator.vue +29 -0
- package/dist/runtime/components/stepper/StepperSeparator.vue.d.ts +6 -0
- package/dist/runtime/components/stepper/StepperTitle.vue +27 -0
- package/dist/runtime/components/stepper/StepperTitle.vue.d.ts +13 -0
- package/dist/runtime/components/stepper/StepperTrigger.vue +29 -0
- package/dist/runtime/components/stepper/StepperTrigger.vue.d.ts +15 -0
- package/dist/runtime/components/stepper/StepperWrapper.vue +21 -0
- package/dist/runtime/components/stepper/StepperWrapper.vue.d.ts +15 -0
- package/dist/runtime/components/toggle-group/ToggleGroup.vue +70 -0
- package/dist/runtime/components/toggle-group/ToggleGroup.vue.d.ts +23 -0
- package/dist/runtime/components/toggle-group/ToggleGroupItem.vue +75 -0
- package/dist/runtime/components/toggle-group/ToggleGroupItem.vue.d.ts +18 -0
- package/dist/runtime/composables/useUnaSettings.js +6 -4
- package/dist/runtime/types/combobox.d.ts +3 -2
- package/dist/runtime/types/index.d.ts +6 -3
- package/dist/runtime/types/index.js +3 -0
- package/dist/runtime/types/pin-input.d.ts +88 -0
- package/dist/runtime/types/pin-input.js +0 -0
- package/dist/runtime/types/radio-group.d.ts +5 -3
- package/dist/runtime/types/select.d.ts +6 -3
- package/dist/runtime/types/stepper.d.ts +129 -0
- package/dist/runtime/types/stepper.js +0 -0
- package/dist/runtime/types/table.d.ts +16 -3
- package/dist/runtime/types/toggle-group.d.ts +39 -0
- package/dist/runtime/types/toggle-group.js +0 -0
- package/package.json +18 -17
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { PinInputInputProps, PinInputRootProps, PrimitiveProps } from 'reka-ui';
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
interface BaseExtensions {
|
|
4
|
+
/** CSS class for the component */
|
|
5
|
+
class?: HTMLAttributes['class'];
|
|
6
|
+
/** Size of the component */
|
|
7
|
+
size?: HTMLAttributes['class'];
|
|
8
|
+
}
|
|
9
|
+
export type PinInputType = 'text' | 'number';
|
|
10
|
+
export type PinInputValueType<T extends PinInputType> = T extends 'text' ? string : number;
|
|
11
|
+
export interface NPinInputProps<T extends PinInputType = 'text'> extends Omit<PinInputRootProps<T>, 'defaultValue'>, Pick<NPinInputSlotProps, 'pinInput' | 'status'>, BaseExtensions {
|
|
12
|
+
/**
|
|
13
|
+
* The default value of the pin input.
|
|
14
|
+
* @default []
|
|
15
|
+
*/
|
|
16
|
+
defaultValue?: PinInputValueType<T>[];
|
|
17
|
+
/**
|
|
18
|
+
* The maximum number of slots to render.
|
|
19
|
+
*/
|
|
20
|
+
maxLength?: number;
|
|
21
|
+
/**
|
|
22
|
+
* The icon to use as a separator between pin-input groups.
|
|
23
|
+
*/
|
|
24
|
+
separator?: boolean | string;
|
|
25
|
+
/**
|
|
26
|
+
* The number of slots to group together.
|
|
27
|
+
*
|
|
28
|
+
* @default 0
|
|
29
|
+
*/
|
|
30
|
+
groupBy?: number;
|
|
31
|
+
/** Props for the pin input group */
|
|
32
|
+
_pinInputGroup?: Partial<NPinInputGroupProps>;
|
|
33
|
+
/** Props for the pin input separator */
|
|
34
|
+
_pinInputSeparator?: Partial<NPinInputSeparatorProps>;
|
|
35
|
+
/** Props for the pin input slots */
|
|
36
|
+
_pinInputSlot?: Partial<NPinInputSlotProps>;
|
|
37
|
+
/**
|
|
38
|
+
* `UnaUI` preset configuration
|
|
39
|
+
*
|
|
40
|
+
* @see https://github.com/una-ui/una-ui/blob/main/packages/preset/src/_shortcuts/pin-input.ts
|
|
41
|
+
*/
|
|
42
|
+
una?: NPinInputUnaProps;
|
|
43
|
+
}
|
|
44
|
+
export interface NPinInputGroupProps extends PrimitiveProps, BaseExtensions {
|
|
45
|
+
/** Additional properties for the una component */
|
|
46
|
+
una?: Pick<NPinInputUnaProps, 'pinInputGroup'>;
|
|
47
|
+
}
|
|
48
|
+
export interface NPinInputSlotProps extends PinInputInputProps, Pick<NPinInputSeparatorProps, 'icon'>, BaseExtensions {
|
|
49
|
+
/**
|
|
50
|
+
* Allows you to add `UnaUI` pin-input preset properties,
|
|
51
|
+
* Think of it as a shortcut for adding options or variants to the preset if available.
|
|
52
|
+
*
|
|
53
|
+
* @see https://github.com/una-ui/una-ui/blob/main/packages/preset/src/_shortcuts/pin-input.ts
|
|
54
|
+
* @example
|
|
55
|
+
* pin-input="outline-indigo"
|
|
56
|
+
*/
|
|
57
|
+
pinInput?: HTMLAttributes['class'];
|
|
58
|
+
/**
|
|
59
|
+
* Update the pin input status.
|
|
60
|
+
* Useful for validations.
|
|
61
|
+
*
|
|
62
|
+
* @default null
|
|
63
|
+
*/
|
|
64
|
+
status?: 'info' | 'success' | 'warning' | 'error';
|
|
65
|
+
/** Additional properties for the una component */
|
|
66
|
+
una?: Pick<NPinInputUnaProps, 'pinInputSlot'>;
|
|
67
|
+
}
|
|
68
|
+
export interface NPinInputSeparatorProps extends PrimitiveProps, BaseExtensions {
|
|
69
|
+
/**
|
|
70
|
+
* The separator to use between pin input fields.
|
|
71
|
+
*@example
|
|
72
|
+
* 'i-lucide:dot'
|
|
73
|
+
*/
|
|
74
|
+
icon?: string;
|
|
75
|
+
/** Additional properties for the una component */
|
|
76
|
+
una?: Pick<NPinInputUnaProps, 'pinInputSeparator'>;
|
|
77
|
+
}
|
|
78
|
+
interface NPinInputUnaProps {
|
|
79
|
+
/** CSS class for the pin input root */
|
|
80
|
+
pinInput?: HTMLAttributes['class'];
|
|
81
|
+
/** CSS class for the pin input group */
|
|
82
|
+
pinInputGroup?: HTMLAttributes['class'];
|
|
83
|
+
/** CSS class for the pin input separator */
|
|
84
|
+
pinInputSeparator?: HTMLAttributes['class'];
|
|
85
|
+
/** CSS class for the pin input slots */
|
|
86
|
+
pinInputSlot?: HTMLAttributes['class'];
|
|
87
|
+
}
|
|
88
|
+
export {};
|
|
File without changes
|
|
@@ -22,11 +22,12 @@ interface BaseProps {
|
|
|
22
22
|
*/
|
|
23
23
|
icon?: HTMLAttributes['class'];
|
|
24
24
|
}
|
|
25
|
-
export interface NRadioGroupProps<T extends AcceptableValue
|
|
25
|
+
export interface NRadioGroupProps<T extends AcceptableValue, Item extends T | NRadioGroupItemProps<T>> extends BaseProps, RadioGroupRootProps {
|
|
26
|
+
modelValue: T;
|
|
26
27
|
/**
|
|
27
28
|
* The items to display in the radio group.
|
|
28
29
|
*/
|
|
29
|
-
items?:
|
|
30
|
+
items?: Item[];
|
|
30
31
|
/**
|
|
31
32
|
* The key name to use to display in the radio items.
|
|
32
33
|
*/
|
|
@@ -61,7 +62,8 @@ export interface NRadioGroupProps<T extends AcceptableValue> extends BaseProps,
|
|
|
61
62
|
*/
|
|
62
63
|
una?: NRadioGroupUnaProps;
|
|
63
64
|
}
|
|
64
|
-
export interface NRadioGroupItemProps extends BaseProps, RadioGroupItemProps {
|
|
65
|
+
export interface NRadioGroupItemProps<T extends AcceptableValue = any> extends BaseProps, RadioGroupItemProps {
|
|
66
|
+
value: T;
|
|
65
67
|
/**
|
|
66
68
|
* The label to display in the radio item.
|
|
67
69
|
*/
|
|
@@ -15,18 +15,18 @@ type ItemTextExtensions = SelectItemTextProps & BaseExtensions;
|
|
|
15
15
|
type GroupExtensions = SelectGroupProps & BaseExtensions;
|
|
16
16
|
type LabelExtensions = SelectLabelProps & BaseExtensions;
|
|
17
17
|
type SeparatorExtensions = SelectSeparatorProps & BaseExtensions;
|
|
18
|
-
type SelectExtensions = SelectRootProps & BaseExtensions & Pick<NSelectValueProps, 'placeholder'> & Pick<NSelectItemProps, 'selectItem'> & Pick<NSelectTriggerProps, 'status' | 'select' | 'id'>;
|
|
18
|
+
type SelectExtensions<T extends AcceptableValue> = SelectRootProps<T> & BaseExtensions & Pick<NSelectValueProps, 'placeholder'> & Pick<NSelectItemProps, 'selectItem'> & Pick<NSelectTriggerProps, 'status' | 'select' | 'id'>;
|
|
19
19
|
export interface SelectGroup<T extends AcceptableValue> {
|
|
20
20
|
label?: string;
|
|
21
21
|
items: T[];
|
|
22
22
|
_selectLabel?: Partial<NSelectLabelProps>;
|
|
23
23
|
_selectItem?: Partial<NSelectItemProps>;
|
|
24
24
|
}
|
|
25
|
-
export interface NSelectProps<T extends AcceptableValue> extends SelectExtensions {
|
|
25
|
+
export interface NSelectProps<T extends AcceptableValue, Items extends Array<T | SelectGroup<T>>, M extends boolean = false> extends SelectExtensions<T> {
|
|
26
26
|
/**
|
|
27
27
|
* The items to display in the select.
|
|
28
28
|
*/
|
|
29
|
-
items:
|
|
29
|
+
items: Items;
|
|
30
30
|
/**
|
|
31
31
|
* The key name to use to display in the select items.
|
|
32
32
|
*/
|
|
@@ -45,6 +45,9 @@ export interface NSelectProps<T extends AcceptableValue> extends SelectExtension
|
|
|
45
45
|
* @default false
|
|
46
46
|
*/
|
|
47
47
|
groupSeparator?: boolean;
|
|
48
|
+
defaultValue?: M extends true ? T[] : T;
|
|
49
|
+
modelValue?: M extends true ? T[] : T;
|
|
50
|
+
multiple?: M;
|
|
48
51
|
/**
|
|
49
52
|
* Sub-component configurations
|
|
50
53
|
*/
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import type { StepperDescriptionProps, StepperIndicatorProps, StepperItemProps, StepperRootEmits, StepperRootProps, StepperSeparatorProps, StepperTitleProps, StepperTriggerProps } from 'reka-ui';
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
interface BaseExtensions {
|
|
4
|
+
/** CSS class for the component */
|
|
5
|
+
class?: HTMLAttributes['class'];
|
|
6
|
+
/** Size of the component */
|
|
7
|
+
size?: HTMLAttributes['class'];
|
|
8
|
+
}
|
|
9
|
+
export interface NStepperProps<T> extends StepperRootProps, Pick<StepperItemProps, 'disabled'>, BaseExtensions {
|
|
10
|
+
/**
|
|
11
|
+
* The array of steps that is passed to the stepper.
|
|
12
|
+
*
|
|
13
|
+
* @default []
|
|
14
|
+
*/
|
|
15
|
+
items?: T[];
|
|
16
|
+
/**
|
|
17
|
+
* Allows you to add `UnaUI` stepper preset properties,
|
|
18
|
+
* Think of it as a shortcut for adding options or variants to the preset if available.
|
|
19
|
+
*
|
|
20
|
+
* @see https://github.com/una-ui/una-ui/blob/main/packages/preset/src/_shortcuts/stepper.ts
|
|
21
|
+
* @example
|
|
22
|
+
* stepper="solid-yellow"
|
|
23
|
+
*/
|
|
24
|
+
stepper?: string;
|
|
25
|
+
/** Props for the stepper item */
|
|
26
|
+
_stepperItem?: Partial<NStepperItemProps>;
|
|
27
|
+
/** Props for the stepper trigger */
|
|
28
|
+
_stepperTrigger?: Partial<NStepperTriggerProps>;
|
|
29
|
+
/** Props for the stepper separator */
|
|
30
|
+
_stepperSeparator?: Partial<NStepperSeparatorProps>;
|
|
31
|
+
/** Props for the stepper title */
|
|
32
|
+
_stepperTitle?: Partial<NStepperTitleProps>;
|
|
33
|
+
/** Props for the stepper description */
|
|
34
|
+
_stepperDescription?: Partial<NStepperDescriptionProps>;
|
|
35
|
+
/** Props for the stepper indicator */
|
|
36
|
+
_stepperIndicator?: Partial<NStepperIndicatorProps>;
|
|
37
|
+
/** Props for the stepper header */
|
|
38
|
+
_stepperHeader?: Partial<NStepperHeaderProps>;
|
|
39
|
+
/** Props for the stepper wrapper */
|
|
40
|
+
_stepperWrapper?: Partial<NStepperWrapperProps>;
|
|
41
|
+
/** Props for the stepper container */
|
|
42
|
+
_stepperContainer?: Partial<NStepperContainerProps>;
|
|
43
|
+
/**
|
|
44
|
+
* `UnaUI` preset configuration
|
|
45
|
+
*
|
|
46
|
+
* @see https://github.com/una-ui/una-ui/blob/main/packages/preset/src/_shortcuts/stepper.ts
|
|
47
|
+
*/
|
|
48
|
+
una?: NStepperUnaProps;
|
|
49
|
+
}
|
|
50
|
+
export type NStepperEmits<T> = StepperRootEmits & {
|
|
51
|
+
next: [payload: T];
|
|
52
|
+
prev: [payload: T];
|
|
53
|
+
};
|
|
54
|
+
export interface NStepperItemProps extends StepperItemProps, Pick<NStepperProps<NStepperItemProps>, 'orientation'>, BaseExtensions {
|
|
55
|
+
/** Slot of the stepper item */
|
|
56
|
+
slot?: string;
|
|
57
|
+
/** Title of the stepper item. */
|
|
58
|
+
title?: string;
|
|
59
|
+
/** Description of the stepper item. */
|
|
60
|
+
description?: string;
|
|
61
|
+
value?: string | number;
|
|
62
|
+
/**
|
|
63
|
+
* Icon name
|
|
64
|
+
* @see @IconifyIcon
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* 'i-heroicons-book-open-20-solid'
|
|
68
|
+
*/
|
|
69
|
+
icon?: string;
|
|
70
|
+
/** Additional properties for the una component */
|
|
71
|
+
una?: Pick<NStepperUnaProps, 'stepperItem'>;
|
|
72
|
+
}
|
|
73
|
+
export interface NStepperTriggerProps extends StepperTriggerProps, Pick<NStepperProps<StepperItemProps>, 'stepper'>, BaseExtensions {
|
|
74
|
+
/** Additional properties for the una component */
|
|
75
|
+
una?: Pick<NStepperUnaProps, 'stepperTrigger' | 'stepperMenuDefaultVariant'>;
|
|
76
|
+
}
|
|
77
|
+
export interface NStepperSeparatorProps extends StepperSeparatorProps, Pick<NStepperProps<StepperItemProps>, 'stepper'>, Pick<BaseExtensions, 'class'> {
|
|
78
|
+
/** Additional properties for the una component */
|
|
79
|
+
una?: Pick<NStepperUnaProps, 'stepperSeparator'>;
|
|
80
|
+
}
|
|
81
|
+
export interface NStepperIndicatorProps extends StepperIndicatorProps, Pick<NStepperProps<StepperItemProps>, 'stepper'>, BaseExtensions {
|
|
82
|
+
/** Additional properties for the una component */
|
|
83
|
+
una?: Pick<NStepperUnaProps, 'stepperIndicator'>;
|
|
84
|
+
}
|
|
85
|
+
export interface NStepperHeaderProps extends Pick<BaseExtensions, 'class'>, Pick<NStepperProps<StepperItemProps>, 'orientation'> {
|
|
86
|
+
/** Additional properties for the una component */
|
|
87
|
+
una?: Pick<NStepperUnaProps, 'stepperHeader'>;
|
|
88
|
+
}
|
|
89
|
+
export interface NStepperTitleProps extends StepperTitleProps, BaseExtensions {
|
|
90
|
+
/** Additional properties for the una component */
|
|
91
|
+
una?: Pick<NStepperUnaProps, 'stepperTitle'>;
|
|
92
|
+
}
|
|
93
|
+
export interface NStepperDescriptionProps extends StepperDescriptionProps, BaseExtensions {
|
|
94
|
+
/** Additional properties for the una component */
|
|
95
|
+
una?: Pick<NStepperUnaProps, 'stepperDescription'>;
|
|
96
|
+
}
|
|
97
|
+
export interface NStepperContainerProps extends Pick<BaseExtensions, 'class'>, Pick<NStepperProps<StepperItemProps>, 'orientation'> {
|
|
98
|
+
/** Additional properties for the una component */
|
|
99
|
+
una?: Pick<NStepperUnaProps, 'stepperContainer'>;
|
|
100
|
+
}
|
|
101
|
+
export interface NStepperWrapperProps extends Pick<BaseExtensions, 'class'>, Pick<NStepperProps<StepperItemProps>, 'orientation'> {
|
|
102
|
+
/** Additional properties for the una component */
|
|
103
|
+
una?: Pick<NStepperUnaProps, 'stepperWrapper'>;
|
|
104
|
+
}
|
|
105
|
+
interface NStepperUnaProps {
|
|
106
|
+
/** CSS class for the stepper */
|
|
107
|
+
stepper?: HTMLAttributes['class'];
|
|
108
|
+
/** CSS class for the stepper trigger */
|
|
109
|
+
stepperTrigger?: HTMLAttributes['class'];
|
|
110
|
+
/** CSS class for the stepper trigger default variant */
|
|
111
|
+
stepperMenuDefaultVariant?: HTMLAttributes['class'];
|
|
112
|
+
/** CSS class for the stepper item */
|
|
113
|
+
stepperItem?: HTMLAttributes['class'];
|
|
114
|
+
/** CSS class for the stepper title */
|
|
115
|
+
stepperTitle?: HTMLAttributes['class'];
|
|
116
|
+
/** CSS class for the stepper description */
|
|
117
|
+
stepperDescription?: HTMLAttributes['class'];
|
|
118
|
+
/** CSS class for the stepper indicator */
|
|
119
|
+
stepperIndicator?: HTMLAttributes['class'];
|
|
120
|
+
/** CSS class for the stepper separator */
|
|
121
|
+
stepperSeparator?: HTMLAttributes['class'];
|
|
122
|
+
/** CSS class for the stepper header */
|
|
123
|
+
stepperHeader?: HTMLAttributes['class'];
|
|
124
|
+
/** CSS class for the stepper container */
|
|
125
|
+
stepperContainer?: HTMLAttributes['class'];
|
|
126
|
+
/** CSS class for the stepper wrapper */
|
|
127
|
+
stepperWrapper?: HTMLAttributes['class'];
|
|
128
|
+
}
|
|
129
|
+
export {};
|
|
File without changes
|
|
@@ -3,7 +3,7 @@ import type { PrimitiveProps } from 'reka-ui';
|
|
|
3
3
|
import type { HTMLAttributes } from 'vue';
|
|
4
4
|
import type { NProgressProps } from './progress.js';
|
|
5
5
|
import type { NScrollAreaProps, NScrollAreaUnaProps } from './scroll-area.js';
|
|
6
|
-
export interface NTableProps<TData, TValue> extends Omit<CoreOptions<TData>, 'data' | 'columns' | 'getCoreRowModel' | 'state' | 'onStateChange' | 'renderFallbackValue'> {
|
|
6
|
+
export interface NTableProps<TData, TValue> extends Omit<CoreOptions<TData>, 'data' | 'columns' | 'getCoreRowModel' | 'state' | 'onStateChange' | 'renderFallbackValue'>, Pick<NTableEmptyProps, 'emptyText' | 'emptyIcon'> {
|
|
7
7
|
class?: HTMLAttributes['class'];
|
|
8
8
|
/**
|
|
9
9
|
* @see https://tanstack.com/table/latest/docs/api/core/table#state
|
|
@@ -115,6 +115,9 @@ export interface NTableProps<TData, TValue> extends Omit<CoreOptions<TData>, 'da
|
|
|
115
115
|
_tableEmpty?: NTableEmptyProps;
|
|
116
116
|
_tableLoading?: NTableLoadingProps;
|
|
117
117
|
_scrollArea?: NScrollAreaProps;
|
|
118
|
+
/**
|
|
119
|
+
* Whether the table is loading.
|
|
120
|
+
*/
|
|
118
121
|
loading?: boolean;
|
|
119
122
|
/**
|
|
120
123
|
* `UnaUI` preset configuration
|
|
@@ -159,9 +162,17 @@ export interface NTableEmptyProps {
|
|
|
159
162
|
[key: string]: any;
|
|
160
163
|
class?: HTMLAttributes['class'];
|
|
161
164
|
colspan?: number;
|
|
165
|
+
/**
|
|
166
|
+
* The text to display when the table is empty.
|
|
167
|
+
*/
|
|
168
|
+
emptyText?: string;
|
|
169
|
+
/**
|
|
170
|
+
* The icon to display when the table is empty.
|
|
171
|
+
*/
|
|
172
|
+
emptyIcon?: string;
|
|
162
173
|
_tableCell?: NTableCellProps;
|
|
163
174
|
_tableRow?: NTableRowProps;
|
|
164
|
-
una?: Pick<NTableUnaProps, 'tableEmpty' | 'tableRow' | 'tableCell'>;
|
|
175
|
+
una?: Pick<NTableUnaProps, 'tableEmpty' | 'tableRow' | 'tableCell' | 'tableEmptyText' | 'tableEmptyIcon'>;
|
|
165
176
|
}
|
|
166
177
|
export interface NTableLoadingProps {
|
|
167
178
|
[key: string]: any;
|
|
@@ -189,9 +200,11 @@ interface NTableUnaProps {
|
|
|
189
200
|
tableRow?: HTMLAttributes['class'];
|
|
190
201
|
tableCell?: HTMLAttributes['class'];
|
|
191
202
|
tableCaption?: HTMLAttributes['class'];
|
|
192
|
-
tableEmpty?: HTMLAttributes['class'];
|
|
193
203
|
tableLoading?: HTMLAttributes['class'];
|
|
194
204
|
tableLoadingRow?: HTMLAttributes['class'];
|
|
195
205
|
tableLoadingCell?: HTMLAttributes['class'];
|
|
206
|
+
tableEmpty?: HTMLAttributes['class'];
|
|
207
|
+
tableEmptyText?: HTMLAttributes['class'];
|
|
208
|
+
tableEmptyIcon?: HTMLAttributes['class'];
|
|
196
209
|
}
|
|
197
210
|
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ToggleGroupItemProps, ToggleGroupRootProps } from 'reka-ui';
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import type { NButtonProps } from './button.js';
|
|
4
|
+
import type { NToggleProps } from './toggle.js';
|
|
5
|
+
interface BaseExtensions {
|
|
6
|
+
/** CSS class for the component */
|
|
7
|
+
class?: HTMLAttributes['class'];
|
|
8
|
+
/** Size of the component */
|
|
9
|
+
size?: HTMLAttributes['class'];
|
|
10
|
+
}
|
|
11
|
+
export interface NToggleGroupProps<T> extends ToggleGroupRootProps, Pick<NToggleProps, 'toggleOff' | 'toggleOn'>, BaseExtensions {
|
|
12
|
+
/**
|
|
13
|
+
* The array of items that is passed to the toggle group.
|
|
14
|
+
*
|
|
15
|
+
* @default []
|
|
16
|
+
*/
|
|
17
|
+
items?: T;
|
|
18
|
+
/** Props for the toggle group item */
|
|
19
|
+
_toggleGroupItem?: Partial<NToggleGroupItemProps>;
|
|
20
|
+
/**
|
|
21
|
+
* `UnaUI` preset configuration
|
|
22
|
+
*
|
|
23
|
+
* @see https://github.com/una-ui/una-ui/blob/main/packages/preset/src/_shortcuts/toggle-group.ts
|
|
24
|
+
*/
|
|
25
|
+
una?: NToggleGroupUnaProps;
|
|
26
|
+
}
|
|
27
|
+
export interface NToggleGroupItemProps extends ToggleGroupItemProps, Omit<NToggleProps, 'una'>, Pick<BaseExtensions, 'class'> {
|
|
28
|
+
/** Slot of the toggle group item */
|
|
29
|
+
slot?: string;
|
|
30
|
+
/** Additional properties for the una component */
|
|
31
|
+
una?: Pick<NToggleGroupUnaProps, 'toggleGroupItem'> & NButtonProps['una'];
|
|
32
|
+
}
|
|
33
|
+
interface NToggleGroupUnaProps {
|
|
34
|
+
/** CSS class for the navigation menu */
|
|
35
|
+
toggleGroup?: HTMLAttributes['class'];
|
|
36
|
+
/** CSS class for the navigation menu content */
|
|
37
|
+
toggleGroupItem?: HTMLAttributes['class'];
|
|
38
|
+
}
|
|
39
|
+
export {};
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@una-ui/nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0-alpha.
|
|
4
|
+
"version": "1.0.0-alpha.10",
|
|
5
5
|
"description": "Nuxt module for @una-ui",
|
|
6
6
|
"author": "Phojie Rengel <phojrengel@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -38,13 +38,14 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@headlessui/vue": "^1.7.23",
|
|
40
40
|
"@iconify/utils": "^2.3.0",
|
|
41
|
-
"@nuxt/kit": "^3.
|
|
41
|
+
"@nuxt/kit": "^3.19.2",
|
|
42
42
|
"@nuxtjs/color-mode": "^3.5.2",
|
|
43
43
|
"@tanstack/vue-table": "^8.21.3",
|
|
44
|
-
"@unocss/core": "^66.
|
|
45
|
-
"@unocss/nuxt": "^66.
|
|
46
|
-
"@unocss/preset-attributify": "^66.
|
|
47
|
-
"@unocss/preset-icons": "^66.
|
|
44
|
+
"@unocss/core": "^66.5.1",
|
|
45
|
+
"@unocss/nuxt": "^66.5.1",
|
|
46
|
+
"@unocss/preset-attributify": "^66.5.1",
|
|
47
|
+
"@unocss/preset-icons": "^66.5.1",
|
|
48
|
+
"@unocss/reset": "^66.5.1",
|
|
48
49
|
"@vee-validate/nuxt": "^4.15.1",
|
|
49
50
|
"@vee-validate/zod": "^4.15.1",
|
|
50
51
|
"@vueuse/core": "^12.8.2",
|
|
@@ -53,22 +54,22 @@
|
|
|
53
54
|
"class-variance-authority": "^0.7.1",
|
|
54
55
|
"clsx": "^2.1.1",
|
|
55
56
|
"ohash": "^1.1.6",
|
|
56
|
-
"reka-ui": "^2.
|
|
57
|
+
"reka-ui": "^2.5.1",
|
|
57
58
|
"tailwind-merge": "^3.3.1",
|
|
58
|
-
"unocss": "^66.
|
|
59
|
+
"unocss": "^66.5.1",
|
|
59
60
|
"unocss-preset-animations": "^1.2.1",
|
|
60
61
|
"vaul-vue": "^0.4.1",
|
|
61
|
-
"@una-ui/
|
|
62
|
-
"@una-ui/
|
|
62
|
+
"@una-ui/extractor-vue-script": "^1.0.0-alpha.10",
|
|
63
|
+
"@una-ui/preset": "^1.0.0-alpha.10"
|
|
63
64
|
},
|
|
64
65
|
"devDependencies": {
|
|
65
|
-
"@iconify-json/lucide": "^1.2.
|
|
66
|
-
"@iconify-json/radix-icons": "^1.2.
|
|
67
|
-
"@iconify-json/tabler": "^1.2.
|
|
68
|
-
"@nuxt/module-builder": "^1.0.
|
|
69
|
-
"@nuxt/schema": "^3.
|
|
70
|
-
"nuxt": "^3.
|
|
71
|
-
"zod": "^3.25.
|
|
66
|
+
"@iconify-json/lucide": "^1.2.68",
|
|
67
|
+
"@iconify-json/radix-icons": "^1.2.5",
|
|
68
|
+
"@iconify-json/tabler": "^1.2.23",
|
|
69
|
+
"@nuxt/module-builder": "^1.0.2",
|
|
70
|
+
"@nuxt/schema": "^3.19.2",
|
|
71
|
+
"nuxt": "^3.19.2",
|
|
72
|
+
"zod": "^3.25.76"
|
|
72
73
|
},
|
|
73
74
|
"publishConfig": {
|
|
74
75
|
"access": "public"
|