@ziyarago/ui 0.14.0 → 0.15.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.
Files changed (69) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +5 -5
  3. package/dist/llms-full.txt +3 -3
  4. package/dist/llms.txt +2 -2
  5. package/dist/manifest.json +316 -2
  6. package/docs/INTEGRATION.md +3 -0
  7. package/package.json +10 -25
  8. package/src/core/components.js +0 -11
  9. package/src/core/components2.js +1 -71
  10. package/src/core/components3.js +2 -44
  11. package/src/core/components4.js +0 -38
  12. package/src/core/components6.js +0 -50
  13. package/src/core/components7.js +0 -34
  14. package/src/core/pages.js +2 -36
  15. package/src/i18n/components/index.js +0 -72
  16. package/src/internal.js +10 -0
  17. package/src/meta/index.js +2 -0
  18. package/src/meta/pages.js +1 -1
  19. package/src/react/index.js +0 -106
  20. package/src/vue/index.js +1 -1
  21. package/types/internal.d.ts +30 -0
  22. package/types/meta.d.ts +5 -0
  23. package/types/react.d.ts +136 -4143
  24. package/types/vue-global.d.ts +0 -106
  25. package/types/vue.d.ts +145 -3598
  26. package/docs/MIGRATION.md +0 -455
  27. package/src/compat/index.js +0 -469
  28. package/src/compat/map.js +0 -282
  29. package/src/compat/resolver.js +0 -22
  30. package/src/compat/vite.js +0 -29
  31. package/src/i18n/components/ActionCard.js +0 -5
  32. package/src/i18n/components/Actionsheet.js +0 -5
  33. package/src/i18n/components/CallCard.js +0 -5
  34. package/src/i18n/components/CallRow.js +0 -5
  35. package/src/i18n/components/Carousel.js +0 -5
  36. package/src/i18n/components/ChartCard.js +0 -5
  37. package/src/i18n/components/ChatAi.js +0 -5
  38. package/src/i18n/components/ChipInput.js +0 -5
  39. package/src/i18n/components/ContactPanel.js +0 -5
  40. package/src/i18n/components/DataGroup.js +0 -5
  41. package/src/i18n/components/DealCard.js +0 -5
  42. package/src/i18n/components/FullscreenDialog.js +0 -5
  43. package/src/i18n/components/Gallery.js +0 -5
  44. package/src/i18n/components/GuestCard.js +0 -5
  45. package/src/i18n/components/ImageUpload.js +0 -5
  46. package/src/i18n/components/ImageViewer.js +0 -5
  47. package/src/i18n/components/IncomingCall.js +0 -5
  48. package/src/i18n/components/InlineEdit.js +0 -5
  49. package/src/i18n/components/IntegrationCard.js +0 -5
  50. package/src/i18n/components/Map.js +0 -5
  51. package/src/i18n/components/NotificationBell.js +0 -5
  52. package/src/i18n/components/PricingCard.js +0 -5
  53. package/src/i18n/components/QiblaCompass.js +0 -5
  54. package/src/i18n/components/RamadanTracker.js +0 -5
  55. package/src/i18n/components/RangeCalendar.js +0 -5
  56. package/src/i18n/components/RangeSlider.js +0 -5
  57. package/src/i18n/components/RichEditor.js +0 -5
  58. package/src/i18n/components/Screensaver.js +0 -5
  59. package/src/i18n/components/Sortable.js +0 -5
  60. package/src/i18n/components/StepDialog.js +0 -5
  61. package/src/i18n/components/StepForm.js +0 -5
  62. package/src/i18n/components/TabTiles.js +0 -5
  63. package/src/i18n/components/Tour.js +0 -5
  64. package/src/i18n/components/TourCard.js +0 -5
  65. package/src/i18n/components/TourPopover.js +0 -5
  66. package/src/i18n/components/TreeSelect.js +0 -5
  67. package/types/compat-resolver.d.ts +0 -12
  68. package/types/compat-vite.d.ts +0 -11
  69. package/types/compat.d.ts +0 -176
package/types/compat.d.ts DELETED
@@ -1,176 +0,0 @@
1
- // Types for @ziyarago/ui/compat (hand-written; scripts/types.mjs only generates the vue and react entries).
2
- // Prop interfaces use the OLD glass-ui-kit names so existing templates keep type-checking.
3
- import type { Component, DefineComponent, Ref, ComputedRef, App } from 'vue';
4
-
5
- type Any = Record<string, any>;
6
- type OldSize3 = 'md' | 'lg' | 'xl';
7
- type OldTone = 'success' | 'warning' | 'danger' | 'info' | 'neutral';
8
-
9
- export interface SelectOption { label: string; value: string | number | null; disabled?: boolean }
10
- export interface TableColumn<TRow = Record<string, unknown>> {
11
- key: string;
12
- label: string;
13
- accessor?: (row: TRow) => unknown;
14
- sortable?: boolean;
15
- align?: 'left' | 'center' | 'right';
16
- /** Tailwind width class such as "w-32" or "w-[120px]"; converted to a CSS width. */
17
- width?: string;
18
- }
19
- export type TableVariant = 'default' | 'striped' | 'bordered';
20
- export type TableDensity = 'comfortable' | 'compact';
21
- export interface SubNavItem { path: string; label: string; icon?: Component; badge?: number | string }
22
- export interface SegmentedOption<V extends string | number = string | number> { label: string; value: V; icon?: Component; disabled?: boolean }
23
- export interface BreadcrumbItem { label: string; href?: string }
24
- export interface DateRange { start: Date | null; end: Date | null }
25
- export type MultilangLang = 'ru' | 'uz' | 'en';
26
- export interface MultilangValue { ru?: string; uz?: string; en?: string }
27
-
28
- export type ToastTone = 'success' | 'info' | 'warning' | 'danger' | 'default';
29
- export interface ToastInput { tone?: ToastTone; title?: string; message: string; duration?: number; action?: { label: string; onClick: () => void } }
30
- export interface Toast { id: string; tone: ToastTone; title?: string; message: string; duration: number; action?: { label: string; onClick: () => void } }
31
- export function useToast(): {
32
- toasts: Ref<Toast[]>;
33
- push(input: ToastInput): string;
34
- dismiss(id: string): void;
35
- clear(): void;
36
- success(message: string, options?: Partial<Omit<ToastInput, 'message' | 'tone'>>): string;
37
- info(message: string, options?: Partial<Omit<ToastInput, 'message' | 'tone'>>): string;
38
- warning(message: string, options?: Partial<Omit<ToastInput, 'message' | 'tone'>>): string;
39
- danger(message: string, options?: Partial<Omit<ToastInput, 'message' | 'tone'>>): string;
40
- };
41
-
42
- export interface Command {
43
- id: string;
44
- label: string;
45
- description?: string;
46
- icon?: Component | string;
47
- shortcut?: string;
48
- group?: string;
49
- keywords?: string[];
50
- action: () => void | Promise<void>;
51
- }
52
- export function useCommandPalette(): {
53
- commands: Ref<Command[]>;
54
- isOpen: Ref<boolean>;
55
- register(command: Command): void;
56
- unregister(id: string): void;
57
- clear(): void;
58
- open(): void;
59
- close(): void;
60
- toggle(): void;
61
- };
62
-
63
- export type Theme = 'light' | 'dark';
64
- /** Old useTheme(): also toggles the .dark class next to the new data-theme attribute. */
65
- export function useTheme(): { theme: Readonly<Ref<Theme>>; setTheme(value: Theme): void; toggleTheme(): void };
66
-
67
- export interface CompatConfig {
68
- /** 'height' (default) keeps old pixel heights (old md 48px -> new lg); 'name' maps sm/md/lg/xl to the same names. */
69
- sizes: 'height' | 'name';
70
- /** Dev warnings for props the new kit cannot honour. */
71
- warn: boolean;
72
- /** i18n bridge: (key, fallback) => string. Default: the host vue-i18n ($t) when the key exists, else the fallback. */
73
- t: ((key: string, fallback: string) => string) | null;
74
- /** Rename the 9 lucide icons that lucide-static@0.460 knows under an older name. Set false after setIconBase to a newer lucide-static. */
75
- legacyIcons: boolean;
76
- /** 'inverse' renders the old primary button (the black pill in qrbon) with the new inverse variant instead of the brand-colored primary. */
77
- primary: 'primary' | 'inverse';
78
- }
79
- export function configureCompat(options: Partial<CompatConfig>): CompatConfig;
80
- /** Lucide component (lucide-vue-next) or string -> kebab-case icon name of the new kit. */
81
- export function iconName(icon: unknown): string | undefined;
82
- export function translate(name: string, attrs?: Any, cfg?: CompatConfig): { component: string; props: Any; dropped: string[]; src: Any } | null;
83
- export const SPECS: Record<string, Any>;
84
- export const COMPAT_NAMES: string[];
85
- export const COMPAT_COMPONENTS: string[];
86
- export function mapSize(profile: 'control' | 'shift' | 'same', size: string | undefined, cfg?: CompatConfig): string | undefined;
87
- export const compatComponents: Record<string, Component>;
88
-
89
- export interface UiButtonProps { variant?: 'primary' | 'glass' | 'ghost' | 'danger' | 'gradient' | 'ink'; size?: OldSize3; iconOnly?: boolean; block?: boolean; loading?: boolean; disabled?: boolean; type?: 'button' | 'submit' | 'reset'; title?: string; onClick?: (e: MouseEvent) => void }
90
- export interface UiInputProps { modelValue?: string | number | null; label?: string; hint?: string; help?: string; error?: string | boolean; size?: 'sm' | OldSize3; type?: string; placeholder?: string; disabled?: boolean; required?: boolean; readonly?: boolean; autocomplete?: string; name?: string; id?: string; min?: number | string; max?: number | string; step?: number | string; maxlength?: number | string; minlength?: number | string; inputmode?: string; pattern?: string; spellcheck?: boolean; autofocus?: boolean }
91
- export interface UiTextareaProps { modelValue?: string | null; label?: string; hint?: string; error?: string | boolean; size?: OldSize3; rows?: number; placeholder?: string; disabled?: boolean; required?: boolean; readonly?: boolean; autoResize?: boolean; resize?: boolean; maxlength?: number; showCount?: boolean; name?: string; id?: string }
92
- export interface UiSelectProps { modelValue?: string | number | null; options: SelectOption[]; label?: string; hint?: string; error?: string | boolean; placeholder?: string; size?: OldSize3; disabled?: boolean; required?: boolean; name?: string; id?: string }
93
- export interface UiComboboxProps { modelValue?: string | number | null; options: SelectOption[]; label?: string; placeholder?: string; hint?: string; error?: string; disabled?: boolean; required?: boolean; size?: OldSize3; clearable?: boolean; filter?: (option: SelectOption, query: string) => boolean; emptyText?: string }
94
- export interface UiCheckboxProps { modelValue?: boolean; indeterminate?: boolean; label?: string; hint?: string; error?: string | boolean; disabled?: boolean; size?: 'sm' | 'md' | 'lg'; name?: string; value?: string | number; id?: string }
95
- export interface UiSwitchProps { modelValue?: boolean; label?: string; hint?: string; error?: string | boolean; disabled?: boolean; size?: 'sm' | 'md' | 'lg'; labelLeft?: boolean; name?: string; id?: string }
96
- export interface UiBadgeProps { tone?: 'sunshine' | 'cobalt' | 'petrol' | 'ink' | 'glass' | OldTone; size?: 'sm' | 'md' | 'lg'; shape?: 'pill' | 'square'; dot?: boolean }
97
- export interface UiAlertProps { tone?: OldTone | 'glass'; title?: string; closable?: boolean; hideIcon?: boolean }
98
- export interface UiCardProps { variant?: 'glass' | 'gradient' | 'solid' | 'outline' | 'block'; tone?: 'cobalt' | 'sunshine' | 'petrol' | 'ink' | 'none'; padding?: 'none' | 'sm' | 'md' | 'lg' | 'xl'; interactive?: boolean; as?: string; onClick?: (e: MouseEvent) => void }
99
- export interface UiModalProps { open: boolean; size?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl'; title?: string; closable?: boolean; closeOnBackdrop?: boolean; closeOnEsc?: boolean }
100
- export interface UiConfirmModalProps { open: boolean; title?: string; message?: string; confirmLabel?: string; confirmVariant?: 'danger' | 'primary' | 'glass'; loading?: boolean }
101
- export interface UiTableProps<T = any> { rows: T[]; columns: TableColumn<T>[]; rowKey?: (row: T, index: number) => string | number; density?: TableDensity; variant?: TableVariant; loading?: boolean; skeletonRows?: number; hoverable?: boolean }
102
- export interface UiPaginationProps { current: number; total: number; siblings?: number; hideArrows?: boolean }
103
- export interface UiProgressProps { value?: number; max?: number; size?: 'sm' | 'md' | 'lg'; tone?: 'ink' | 'cobalt' | 'sunshine' | 'petrol' | OldTone; showValue?: boolean; label?: string }
104
- export interface UiAvatarProps { src?: string; alt?: string; initials?: string; size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'; shape?: 'circle' | 'squircle'; tone?: 'cobalt' | 'sunshine' | 'petrol' | 'pink' | 'ink'; ring?: boolean; status?: 'online' | 'offline' | 'away' | 'busy' }
105
- export interface UiTooltipProps { text?: string; placement?: 'top' | 'bottom' | 'left' | 'right'; tone?: 'ink' | 'glass'; delay?: number; disabled?: boolean }
106
- export interface UiBreadcrumbsProps { items: BreadcrumbItem[]; separator?: 'chevron' | 'slash' | 'dot' }
107
- export interface UiStatsCardProps { label: string; value: string | number; delta?: { value: string | number; trend?: 'up' | 'down' | 'flat'; sublabel?: string }; icon?: Component; variant?: 'glass' | 'block'; tone?: 'cobalt' | 'sunshine' | 'petrol' | 'ink' }
108
- export interface UiSegmentedControlProps<V extends string | number = string | number> { modelValue: V; options: SegmentedOption<V>[]; size?: 'sm' | 'md' | 'lg'; block?: boolean; iconOnly?: boolean; ariaLabel?: string }
109
- export interface UiDatePickerProps { modelValue?: Date | DateRange | null; range?: boolean; label?: string; placeholder?: string; hint?: string; error?: string; disabled?: boolean; required?: boolean; size?: OldSize3; clearable?: boolean; locale?: string; weekStartsOn?: 0 | 1 }
110
- export interface UiDateTimePickerProps { modelValue?: string | null; label?: string; hint?: string; error?: string; disabled?: boolean; defaultTime?: string }
111
- export interface UiDropdownProps { open?: boolean; placement?: string; offset?: number; closeOnOutsideClick?: boolean; closeOnEsc?: boolean }
112
- export interface UiSidebarProps { collapsed?: boolean; defaultCollapsed?: boolean; open?: boolean; storageKey?: string }
113
- export interface UiSubNavProps { items: SubNavItem[]; title?: string; titleIcon?: Component; matchExact?: boolean }
114
- export interface UiFileUploadProps { modelValue?: File[] | null; label?: string; hint?: string; error?: string | boolean; multiple?: boolean; accept?: string; maxSize?: number; disabled?: boolean }
115
- export interface UiMultilangInputProps { modelValue: MultilangValue; label?: string; placeholder?: string; required?: boolean; error?: string | boolean; disabled?: boolean }
116
-
117
- export const UiButton: DefineComponent<UiButtonProps>;
118
- export const UiInput: DefineComponent<UiInputProps>;
119
- export const UiTextarea: DefineComponent<UiTextareaProps>;
120
- export const UiSelect: DefineComponent<UiSelectProps>;
121
- export const UiCombobox: DefineComponent<UiComboboxProps>;
122
- export const UiCheckbox: DefineComponent<UiCheckboxProps>;
123
- export const UiSwitch: DefineComponent<UiSwitchProps>;
124
- export const UiBadge: DefineComponent<UiBadgeProps>;
125
- export const UiAlert: DefineComponent<UiAlertProps>;
126
- export const UiCard: DefineComponent<UiCardProps>;
127
- export const UiModal: DefineComponent<UiModalProps>;
128
- export const UiConfirmModal: DefineComponent<UiConfirmModalProps>;
129
- export const UiTable: DefineComponent<UiTableProps>;
130
- export const UiPagination: DefineComponent<UiPaginationProps>;
131
- export const UiProgress: DefineComponent<UiProgressProps>;
132
- export const UiAvatar: DefineComponent<UiAvatarProps>;
133
- export const UiTooltip: DefineComponent<UiTooltipProps>;
134
- export const UiBreadcrumbs: DefineComponent<UiBreadcrumbsProps>;
135
- export const UiStatsCard: DefineComponent<UiStatsCardProps>;
136
- export const UiSegmentedControl: DefineComponent<UiSegmentedControlProps>;
137
- export const UiDatePicker: DefineComponent<UiDatePickerProps>;
138
- export const UiDateTimePicker: DefineComponent<UiDateTimePickerProps>;
139
- export const UiDropdown: DefineComponent<UiDropdownProps>;
140
- export const UiSidebar: DefineComponent<UiSidebarProps>;
141
- export const UiSubNav: DefineComponent<UiSubNavProps>;
142
- export const UiFileUpload: DefineComponent<UiFileUploadProps>;
143
- export const UiMultilangInput: DefineComponent<UiMultilangInputProps>;
144
- export const MultilangInput: DefineComponent<UiMultilangInputProps>;
145
- export const UiSkeleton: DefineComponent<{ variant?: 'text' | 'rect' | 'circle' | 'line'; size?: 'sm' | 'md' | 'lg'; lines?: number; lastLineWidth?: string }>;
146
- export const UiAvatarGroup: DefineComponent<{ spacing?: 'tight' | 'normal' | 'loose'; reverse?: boolean }>;
147
- export const UiTabs: DefineComponent<{ modelValue?: string | number | null; variant?: 'pill' | 'underline' }>;
148
- export const UiTabsList: DefineComponent<Any>;
149
- export const UiTab: DefineComponent<{ value: string | number; disabled?: boolean }>;
150
- export const UiTabPanel: DefineComponent<{ value: string | number }>;
151
- export const UiRadioGroup: DefineComponent<{ modelValue?: string | number | boolean | null; label?: string; hint?: string; error?: string | boolean; name?: string; size?: 'sm' | 'md' | 'lg'; disabled?: boolean; orientation?: 'vertical' | 'horizontal' }>;
152
- export const UiRadio: DefineComponent<{ modelValue?: string | number | boolean | null; value: string | number | boolean; label?: string; hint?: string; disabled?: boolean; size?: 'sm' | 'md' | 'lg' }>;
153
- export const UiMenu: DefineComponent<{ minWidth?: string; autofocus?: boolean }>;
154
- export const UiMenuItem: DefineComponent<{ disabled?: boolean; tone?: 'default' | 'danger'; closeOnClick?: boolean }>;
155
- export const UiMenuSeparator: DefineComponent<{ label?: string }>;
156
- export const UiSidebarSection: DefineComponent<{ label?: string }>;
157
- export const UiSidebarItem: DefineComponent<{ label: string; icon?: Component; active?: boolean; badge?: number | string; href?: string; disabled?: boolean }>;
158
- export const UiNavbar: DefineComponent<{ variant?: 'glass' | 'solid' | 'minimal'; size?: 'md' | 'lg'; sticky?: boolean }>;
159
- export const UiToastContainer: DefineComponent<{ position?: 'top-right' | 'top-center' | 'top-left' | 'bottom-right' | 'bottom-center' | 'bottom-left' }>;
160
- export const UiCommandPalette: DefineComponent<{ shortcutKey?: string; disableShortcut?: boolean; emptyText?: string; placeholder?: string }>;
161
- export const UiCalendar: DefineComponent<{ modelValue?: Date | null; locale?: string; weekStartsOn?: 0 | 1 }>;
162
- export const UiForm: DefineComponent<{ novalidate?: boolean }>;
163
- // Names from the published glass-ui-kit that are not part of the local component copies.
164
- export const UiSpinner: DefineComponent<Any>;
165
- export const UiDivider: DefineComponent<Any>;
166
- export const UiBanner: DefineComponent<Any>;
167
- export const UiEmptyState: DefineComponent<Any>;
168
- export const UiDrawer: DefineComponent<Any>;
169
- export const UiTag: DefineComponent<Any>;
170
- export const UiOtpInput: DefineComponent<Any>;
171
- export const UiKpiCard: DefineComponent<Any>;
172
- export const UiFormField: DefineComponent<Any>;
173
-
174
- export function install(app: App): void;
175
- declare const _default: { install: typeof install };
176
- export default _default;