mywhy-ui 0.5.2 → 0.6.1
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/README.md +2 -1
- package/dist/index.cjs +55 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -1
- package/dist/index.d.ts +20 -1
- package/dist/index.js +55 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -154,6 +154,25 @@ interface FormControlProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
|
154
154
|
}
|
|
155
155
|
declare function FormControl({ label, description, error, required, helperText, children, className, ...props }: FormControlProps): react_jsx_runtime.JSX.Element;
|
|
156
156
|
|
|
157
|
+
interface NavbarItem {
|
|
158
|
+
label: React$1.ReactNode;
|
|
159
|
+
href?: string;
|
|
160
|
+
onClick?: () => void;
|
|
161
|
+
icon?: React$1.ReactNode;
|
|
162
|
+
disabled?: boolean;
|
|
163
|
+
}
|
|
164
|
+
interface NavbarProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
165
|
+
left?: React$1.ReactNode;
|
|
166
|
+
center?: React$1.ReactNode;
|
|
167
|
+
right?: React$1.ReactNode;
|
|
168
|
+
brand?: React$1.ReactNode;
|
|
169
|
+
items?: NavbarItem[];
|
|
170
|
+
sticky?: boolean;
|
|
171
|
+
bordered?: boolean;
|
|
172
|
+
className?: string;
|
|
173
|
+
}
|
|
174
|
+
declare function Navbar({ left, center, right, brand, items, sticky, bordered, className, ...props }: NavbarProps): react_jsx_runtime.JSX.Element;
|
|
175
|
+
|
|
157
176
|
interface TabItem {
|
|
158
177
|
label: React$1.ReactNode;
|
|
159
178
|
value: string;
|
|
@@ -514,4 +533,4 @@ declare function useToast(): {
|
|
|
514
533
|
removeToast: (id: string) => void;
|
|
515
534
|
};
|
|
516
535
|
|
|
517
|
-
export { Alert, type AlertProps, type AlertTheme, Avatar, type AvatarProps, type AvatarShape, type AvatarSize, type AvatarTheme, Badge, type BadgeProps, type BadgeTheme, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, type ButtonSize, type ButtonTheme, type ButtonVariant, Card, type CardProps, Checkbox, type CheckboxProps, CodeBlock, type CodeBlockLanguage, type CodeBlockProps, ConnectionIcon, ConnectionIndicator, type ConnectionIndicatorProps, DatePicker, type DatePickerProps, Dialog, type DialogProps, Dropdown, type DropdownItem, type DropdownProps, EmptyState, type EmptyStateProps, FileUploader, type FileUploaderProps, FormControl, type FormControlProps, Input, type InputProps, type InputSize, Kbd, type KbdProps, type KbdSize, type KbdTheme, Link, type LinkProps, MultiSelect, type MultiSelectOption, type MultiSelectProps, NumberInput, type NumberInputProps, type NumberInputSize, Pagination, type PaginationProps, Progress, type ProgressProps, ROS2Diagnostics, type ROS2DiagnosticsProps, Rating, type RatingProps, type RobotStatus, Select, type SelectOption, type SelectProps, type SelectSize, Sidebar, type SidebarItem, type SidebarProps, type SidebarSection, Slider, type SliderProps, Spinner, type SpinnerProps, StatusBadge, type StatusBadgeProps, Switch, type SwitchProps, type TabItem, Table, type TableColumn, type TableProps, Tabs, type TabsProps, Textarea, type TextareaProps, type TextareaSize, TimePicker, type TimePickerProps, Timeline, type TimelineItem, type TimelineProps, type TimelineStatus, Toast, ToastContainer, type ToastContainerProps, type ToastEntry, type ToastProps, type ToastType, Tooltip, type TooltipPlacement, type TooltipProps, type UseDisclosureReturn, useDisclosure, useToast };
|
|
536
|
+
export { Alert, type AlertProps, type AlertTheme, Avatar, type AvatarProps, type AvatarShape, type AvatarSize, type AvatarTheme, Badge, type BadgeProps, type BadgeTheme, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, type ButtonSize, type ButtonTheme, type ButtonVariant, Card, type CardProps, Checkbox, type CheckboxProps, CodeBlock, type CodeBlockLanguage, type CodeBlockProps, ConnectionIcon, ConnectionIndicator, type ConnectionIndicatorProps, DatePicker, type DatePickerProps, Dialog, type DialogProps, Dropdown, type DropdownItem, type DropdownProps, EmptyState, type EmptyStateProps, FileUploader, type FileUploaderProps, FormControl, type FormControlProps, Input, type InputProps, type InputSize, Kbd, type KbdProps, type KbdSize, type KbdTheme, Link, type LinkProps, MultiSelect, type MultiSelectOption, type MultiSelectProps, Navbar, type NavbarItem, type NavbarProps, NumberInput, type NumberInputProps, type NumberInputSize, Pagination, type PaginationProps, Progress, type ProgressProps, ROS2Diagnostics, type ROS2DiagnosticsProps, Rating, type RatingProps, type RobotStatus, Select, type SelectOption, type SelectProps, type SelectSize, Sidebar, type SidebarItem, type SidebarProps, type SidebarSection, Slider, type SliderProps, Spinner, type SpinnerProps, StatusBadge, type StatusBadgeProps, Switch, type SwitchProps, type TabItem, Table, type TableColumn, type TableProps, Tabs, type TabsProps, Textarea, type TextareaProps, type TextareaSize, TimePicker, type TimePickerProps, Timeline, type TimelineItem, type TimelineProps, type TimelineStatus, Toast, ToastContainer, type ToastContainerProps, type ToastEntry, type ToastProps, type ToastType, Tooltip, type TooltipPlacement, type TooltipProps, type UseDisclosureReturn, useDisclosure, useToast };
|
package/dist/index.d.ts
CHANGED
|
@@ -154,6 +154,25 @@ interface FormControlProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
|
154
154
|
}
|
|
155
155
|
declare function FormControl({ label, description, error, required, helperText, children, className, ...props }: FormControlProps): react_jsx_runtime.JSX.Element;
|
|
156
156
|
|
|
157
|
+
interface NavbarItem {
|
|
158
|
+
label: React$1.ReactNode;
|
|
159
|
+
href?: string;
|
|
160
|
+
onClick?: () => void;
|
|
161
|
+
icon?: React$1.ReactNode;
|
|
162
|
+
disabled?: boolean;
|
|
163
|
+
}
|
|
164
|
+
interface NavbarProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
165
|
+
left?: React$1.ReactNode;
|
|
166
|
+
center?: React$1.ReactNode;
|
|
167
|
+
right?: React$1.ReactNode;
|
|
168
|
+
brand?: React$1.ReactNode;
|
|
169
|
+
items?: NavbarItem[];
|
|
170
|
+
sticky?: boolean;
|
|
171
|
+
bordered?: boolean;
|
|
172
|
+
className?: string;
|
|
173
|
+
}
|
|
174
|
+
declare function Navbar({ left, center, right, brand, items, sticky, bordered, className, ...props }: NavbarProps): react_jsx_runtime.JSX.Element;
|
|
175
|
+
|
|
157
176
|
interface TabItem {
|
|
158
177
|
label: React$1.ReactNode;
|
|
159
178
|
value: string;
|
|
@@ -514,4 +533,4 @@ declare function useToast(): {
|
|
|
514
533
|
removeToast: (id: string) => void;
|
|
515
534
|
};
|
|
516
535
|
|
|
517
|
-
export { Alert, type AlertProps, type AlertTheme, Avatar, type AvatarProps, type AvatarShape, type AvatarSize, type AvatarTheme, Badge, type BadgeProps, type BadgeTheme, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, type ButtonSize, type ButtonTheme, type ButtonVariant, Card, type CardProps, Checkbox, type CheckboxProps, CodeBlock, type CodeBlockLanguage, type CodeBlockProps, ConnectionIcon, ConnectionIndicator, type ConnectionIndicatorProps, DatePicker, type DatePickerProps, Dialog, type DialogProps, Dropdown, type DropdownItem, type DropdownProps, EmptyState, type EmptyStateProps, FileUploader, type FileUploaderProps, FormControl, type FormControlProps, Input, type InputProps, type InputSize, Kbd, type KbdProps, type KbdSize, type KbdTheme, Link, type LinkProps, MultiSelect, type MultiSelectOption, type MultiSelectProps, NumberInput, type NumberInputProps, type NumberInputSize, Pagination, type PaginationProps, Progress, type ProgressProps, ROS2Diagnostics, type ROS2DiagnosticsProps, Rating, type RatingProps, type RobotStatus, Select, type SelectOption, type SelectProps, type SelectSize, Sidebar, type SidebarItem, type SidebarProps, type SidebarSection, Slider, type SliderProps, Spinner, type SpinnerProps, StatusBadge, type StatusBadgeProps, Switch, type SwitchProps, type TabItem, Table, type TableColumn, type TableProps, Tabs, type TabsProps, Textarea, type TextareaProps, type TextareaSize, TimePicker, type TimePickerProps, Timeline, type TimelineItem, type TimelineProps, type TimelineStatus, Toast, ToastContainer, type ToastContainerProps, type ToastEntry, type ToastProps, type ToastType, Tooltip, type TooltipPlacement, type TooltipProps, type UseDisclosureReturn, useDisclosure, useToast };
|
|
536
|
+
export { Alert, type AlertProps, type AlertTheme, Avatar, type AvatarProps, type AvatarShape, type AvatarSize, type AvatarTheme, Badge, type BadgeProps, type BadgeTheme, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, type ButtonSize, type ButtonTheme, type ButtonVariant, Card, type CardProps, Checkbox, type CheckboxProps, CodeBlock, type CodeBlockLanguage, type CodeBlockProps, ConnectionIcon, ConnectionIndicator, type ConnectionIndicatorProps, DatePicker, type DatePickerProps, Dialog, type DialogProps, Dropdown, type DropdownItem, type DropdownProps, EmptyState, type EmptyStateProps, FileUploader, type FileUploaderProps, FormControl, type FormControlProps, Input, type InputProps, type InputSize, Kbd, type KbdProps, type KbdSize, type KbdTheme, Link, type LinkProps, MultiSelect, type MultiSelectOption, type MultiSelectProps, Navbar, type NavbarItem, type NavbarProps, NumberInput, type NumberInputProps, type NumberInputSize, Pagination, type PaginationProps, Progress, type ProgressProps, ROS2Diagnostics, type ROS2DiagnosticsProps, Rating, type RatingProps, type RobotStatus, Select, type SelectOption, type SelectProps, type SelectSize, Sidebar, type SidebarItem, type SidebarProps, type SidebarSection, Slider, type SliderProps, Spinner, type SpinnerProps, StatusBadge, type StatusBadgeProps, Switch, type SwitchProps, type TabItem, Table, type TableColumn, type TableProps, Tabs, type TabsProps, Textarea, type TextareaProps, type TextareaSize, TimePicker, type TimePickerProps, Timeline, type TimelineItem, type TimelineProps, type TimelineStatus, Toast, ToastContainer, type ToastContainerProps, type ToastEntry, type ToastProps, type ToastType, Tooltip, type TooltipPlacement, type TooltipProps, type UseDisclosureReturn, useDisclosure, useToast };
|
package/dist/index.js
CHANGED
|
@@ -780,6 +780,60 @@ function FormControl({
|
|
|
780
780
|
helperText && !error && /* @__PURE__ */ jsx("p", { className: "text-xs text-ink-light", children: helperText })
|
|
781
781
|
] });
|
|
782
782
|
}
|
|
783
|
+
function Navbar({
|
|
784
|
+
left,
|
|
785
|
+
center,
|
|
786
|
+
right,
|
|
787
|
+
brand,
|
|
788
|
+
items,
|
|
789
|
+
sticky = false,
|
|
790
|
+
bordered = true,
|
|
791
|
+
className = "",
|
|
792
|
+
...props
|
|
793
|
+
}) {
|
|
794
|
+
const classes = [
|
|
795
|
+
"w-full",
|
|
796
|
+
"h-16",
|
|
797
|
+
"bg-white",
|
|
798
|
+
bordered ? "border-b border-gray-200" : "",
|
|
799
|
+
sticky ? "sticky top-0" : "",
|
|
800
|
+
"flex items-center px-8 gap-4",
|
|
801
|
+
"z-40",
|
|
802
|
+
className
|
|
803
|
+
].filter(Boolean).join(" ");
|
|
804
|
+
return /* @__PURE__ */ jsxs("nav", { className: classes, ...props, children: [
|
|
805
|
+
(brand || left) && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4 flex-shrink-0", children: [
|
|
806
|
+
brand && /* @__PURE__ */ jsx("div", { className: "text-lg font-semibold text-gray-900", children: brand }),
|
|
807
|
+
left && /* @__PURE__ */ jsx("div", { children: left })
|
|
808
|
+
] }),
|
|
809
|
+
center && /* @__PURE__ */ jsx("div", { className: "flex-1 flex items-center justify-center", children: center }),
|
|
810
|
+
items && items.length > 0 && !center && /* @__PURE__ */ jsx("div", { className: "flex-1 flex items-center gap-1", children: items.map((item, idx) => /* @__PURE__ */ jsx(NavbarItemComponent, { item }, idx)) }),
|
|
811
|
+
right && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-4 flex-shrink-0 ml-auto", children: right })
|
|
812
|
+
] });
|
|
813
|
+
}
|
|
814
|
+
function NavbarItemComponent({ item }) {
|
|
815
|
+
const classes = [
|
|
816
|
+
"px-4 py-2 rounded-md text-sm font-medium",
|
|
817
|
+
"transition-colors",
|
|
818
|
+
item.disabled ? "text-text-muted cursor-not-allowed" : "text-text-secondary hover:bg-surface-hover hover:text-text-primary cursor-pointer"
|
|
819
|
+
].join(" ");
|
|
820
|
+
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
821
|
+
item.icon && /* @__PURE__ */ jsx("span", { className: "mr-2", children: item.icon }),
|
|
822
|
+
item.label
|
|
823
|
+
] });
|
|
824
|
+
if (item.href) {
|
|
825
|
+
return /* @__PURE__ */ jsx("a", { href: item.href, className: classes, onClick: item.onClick, children: content });
|
|
826
|
+
}
|
|
827
|
+
return /* @__PURE__ */ jsx(
|
|
828
|
+
"button",
|
|
829
|
+
{
|
|
830
|
+
className: classes,
|
|
831
|
+
onClick: item.onClick,
|
|
832
|
+
disabled: item.disabled,
|
|
833
|
+
children: content
|
|
834
|
+
}
|
|
835
|
+
);
|
|
836
|
+
}
|
|
783
837
|
function Tabs({
|
|
784
838
|
tabs,
|
|
785
839
|
activeTab,
|
|
@@ -3260,6 +3314,6 @@ function useToast() {
|
|
|
3260
3314
|
return { toasts, addToast, removeToast };
|
|
3261
3315
|
}
|
|
3262
3316
|
|
|
3263
|
-
export { Alert, Avatar, Badge, Breadcrumbs, Button, Card, Checkbox, CodeBlock, ConnectionIcon, ConnectionIndicator, DatePicker, Dialog, Dropdown, EmptyState, FileUploader, FormControl, Input, Kbd, Link, MultiSelect, NumberInput, Pagination, Progress, ROS2Diagnostics, Rating, Select_default as Select, Sidebar, Slider, Spinner, StatusBadge, Switch, Table, Tabs, Textarea, TimePicker, Timeline, Toast, ToastContainer, Tooltip, useDisclosure, useToast };
|
|
3317
|
+
export { Alert, Avatar, Badge, Breadcrumbs, Button, Card, Checkbox, CodeBlock, ConnectionIcon, ConnectionIndicator, DatePicker, Dialog, Dropdown, EmptyState, FileUploader, FormControl, Input, Kbd, Link, MultiSelect, Navbar, NumberInput, Pagination, Progress, ROS2Diagnostics, Rating, Select_default as Select, Sidebar, Slider, Spinner, StatusBadge, Switch, Table, Tabs, Textarea, TimePicker, Timeline, Toast, ToastContainer, Tooltip, useDisclosure, useToast };
|
|
3264
3318
|
//# sourceMappingURL=index.js.map
|
|
3265
3319
|
//# sourceMappingURL=index.js.map
|