@vinicunca/taman-ui 0.1.0 → 0.1.2

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 (103) hide show
  1. package/README.md +2 -2
  2. package/dist/components/auth/index.mjs +1 -2
  3. package/dist/components/back-to-top/index.mjs +1 -2
  4. package/dist/components/button/taman-button-check-group.mjs +1 -1
  5. package/dist/components/button/taman-button-check-group.types.d.ts +5 -6
  6. package/dist/components/button/taman-button-check-group.vue.d.ts +1 -1
  7. package/dist/components/descriptions/taman-description.types.d.ts +12 -13
  8. package/dist/components/file-upload/index.mjs +1 -2
  9. package/dist/components/file-upload/taman-file-upload.mjs +1 -0
  10. package/dist/components/file-upload/taman-file-upload.types.d.ts +2 -3
  11. package/dist/components/full-screen/index.mjs +1 -2
  12. package/dist/components/icon/index.mjs +1 -2
  13. package/dist/components/input/password-strength.d.ts +5 -6
  14. package/dist/components/input/taman-input-currency.types.d.ts +2 -3
  15. package/dist/components/input-date/index.mjs +1 -2
  16. package/dist/components/input-date/taman-input-date.types.d.ts +5 -6
  17. package/dist/components/loading/index.mjs +1 -2
  18. package/dist/components/loading/types.d.ts +3 -4
  19. package/dist/components/logo/index.mjs +1 -2
  20. package/dist/components/render-content/index.mjs +1 -2
  21. package/dist/components/scrollbar/index.mjs +1 -2
  22. package/dist/components/scrollbar/scrollbar.vue.d.ts +2 -2
  23. package/dist/form/components/form-actions.mjs +1 -1
  24. package/dist/form/components/form-field-array.types.d.ts +2 -3
  25. package/dist/form/form-render/index.mjs +1 -2
  26. package/dist/form/form.api.d.ts +2 -2
  27. package/dist/form/form.api.mjs +2 -0
  28. package/dist/form/form.built-ins.d.ts +3 -4
  29. package/dist/form/form.built-ins.mjs +1 -0
  30. package/dist/form/form.codec.d.ts +7 -7
  31. package/dist/form/form.config.d.ts +2 -3
  32. package/dist/form/form.empty-value.d.ts +2 -3
  33. package/dist/form/form.types.d.ts +48 -48
  34. package/dist/form/form.use-taman-form.d.ts +3 -3
  35. package/dist/layout/components/taman-core-button-fixed.mjs +19 -2
  36. package/dist/layout/components/taman-core-layout-sidebar.mjs +51 -19
  37. package/dist/layout/index.mjs +1 -2
  38. package/dist/layout/taman-core-layout.mjs +1 -1
  39. package/dist/menu/components/collapse-transition.mjs +2 -2
  40. package/dist/menu/components/normal-menu/index.mjs +1 -2
  41. package/dist/menu/components/normal-menu/normal-menu.vue.d.ts +1 -1
  42. package/dist/menu/components/taman-menu-badge.mjs +1 -1
  43. package/dist/popup/alert/alert-builder.d.ts +5 -6
  44. package/dist/popup/alert/alert.d.ts +7 -8
  45. package/dist/popup/alert/alert.vue.d.ts +1 -1
  46. package/dist/popup/alert/alert2.mjs +1 -1
  47. package/dist/popup/dialog/dialog.api.d.ts +2 -3
  48. package/dist/popup/dialog/dialog.api.mjs +2 -0
  49. package/dist/popup/dialog/dialog.types.d.ts +6 -6
  50. package/dist/popup/dialog/dialog.vue.d.ts +12 -12
  51. package/dist/popup/dialog/use-taman-dialog.d.ts +4 -4
  52. package/dist/popup/drawer/drawer.api.d.ts +2 -3
  53. package/dist/popup/drawer/drawer.api.mjs +1 -0
  54. package/dist/popup/drawer/drawer.types.d.ts +8 -8
  55. package/dist/popup/drawer/drawer.vue.d.ts +14 -14
  56. package/dist/popup/drawer/use-taman-drawer.d.ts +4 -4
  57. package/dist/tabs/components/index.mjs +1 -2
  58. package/dist/tabs/components/taman-tabs.mjs +1 -1
  59. package/dist/tabs/components/widgets/tool-more.mjs +1 -1
  60. package/dist/tabs/components/widgets/tool-refresh.mjs +1 -1
  61. package/dist/tabs/components/widgets/tool-screen.mjs +1 -1
  62. package/dist/tabs/strict-context-menu.d.ts +2 -2
  63. package/dist/tabs/tabs.types.d.ts +4 -5
  64. package/dist/tabs/taman-tabs-view.mjs +2 -2
  65. package/dist/ui/alert-dialog/alert-dialog-action.vue.d.ts +2 -2
  66. package/dist/ui/alert-dialog/alert-dialog-cancel.vue.d.ts +2 -2
  67. package/dist/ui/alert-dialog/alert-dialog-content.mjs +1 -1
  68. package/dist/ui/alert-dialog/alert-dialog-content.vue.d.ts +2 -2
  69. package/dist/ui/alert-dialog/alert-dialog-description.vue.d.ts +2 -2
  70. package/dist/ui/alert-dialog/alert-dialog-overlay.mjs +1 -1
  71. package/dist/ui/alert-dialog/alert-dialog-root.vue.d.ts +2 -2
  72. package/dist/ui/alert-dialog/alert-dialog-title.vue.d.ts +2 -2
  73. package/dist/ui/alert-dialog/alert-dialog-trigger.vue.d.ts +2 -2
  74. package/dist/ui/dialog/dialog-close.vue.d.ts +2 -2
  75. package/dist/ui/dialog/dialog-content.mjs +1 -1
  76. package/dist/ui/dialog/dialog-content.vue.d.ts +3 -3
  77. package/dist/ui/dialog/dialog-description.vue.d.ts +2 -2
  78. package/dist/ui/dialog/dialog-footer.mjs +1 -1
  79. package/dist/ui/dialog/dialog-overlay.mjs +1 -1
  80. package/dist/ui/dialog/dialog-overlay.vue.d.ts +1 -1
  81. package/dist/ui/dialog/dialog-root.vue.d.ts +2 -2
  82. package/dist/ui/dialog/dialog-title.vue.d.ts +2 -2
  83. package/dist/ui/dialog/dialog-trigger.vue.d.ts +2 -2
  84. package/dist/ui/form/form-control.vue.d.ts +2 -2
  85. package/dist/ui/form/form-field.vue.d.ts +1 -1
  86. package/dist/ui/form/form-label.vue.d.ts +2 -2
  87. package/dist/ui/form/injection-keys.d.ts +4 -5
  88. package/dist/ui/label/index.mjs +1 -2
  89. package/dist/ui/label/label.mjs +1 -1
  90. package/dist/ui/label/label.vue.d.ts +2 -2
  91. package/dist/ui/scroll-area/scroll-area.vue.d.ts +2 -2
  92. package/dist/ui/scroll-area/scroll-bar.vue.d.ts +1 -1
  93. package/dist/ui/sheet/sheet-close.vue.d.ts +2 -2
  94. package/dist/ui/sheet/sheet-content.mjs +1 -1
  95. package/dist/ui/sheet/sheet-content.vue.d.ts +3 -3
  96. package/dist/ui/sheet/sheet-description.vue.d.ts +2 -2
  97. package/dist/ui/sheet/sheet-root.vue.d.ts +2 -2
  98. package/dist/ui/sheet/sheet-title.vue.d.ts +2 -2
  99. package/dist/ui/sheet/sheet.variants.d.ts +17 -18
  100. package/dist/ui/sheet/sheet.variants.mjs +3 -2
  101. package/dist/unocss/content.d.ts +2 -3
  102. package/dist/unocss/index.mjs +1 -2
  103. package/package.json +11 -10
@@ -6,32 +6,32 @@ import { AnyFieldApi } from "@tanstack/vue-form";
6
6
  import { MaybeComputedRef } from "@vinicunca/taman-core/typings";
7
7
  import { ButtonProps } from "pohon-ui";
8
8
  //#region src/form/form.types.d.ts
9
- type FormValues = Record<string, any>;
10
- type FormValuePatch<T> = T extends ((...args: Array<any>) => unknown) | Date | ReadonlyArray<unknown> ? T : T extends object ? { [K in keyof T]?: FormValuePatch<T[K]>; } : T;
11
- interface FormCodec<TFormValues extends FormValues = FormValues, TSubmitValues extends FormValues = TFormValues> {
9
+ export type FormValues = Record<string, any>;
10
+ export type FormValuePatch<T> = T extends ((...args: Array<any>) => unknown) | Date | ReadonlyArray<unknown> ? T : T extends object ? { [K in keyof T]?: FormValuePatch<T[K]>; } : T;
11
+ export interface FormCodec<TFormValues extends FormValues = FormValues, TSubmitValues extends FormValues = TFormValues> {
12
12
  decode: (values: Readonly<TSubmitValues>) => TFormValues;
13
13
  encode: (values: Readonly<TFormValues>) => TSubmitValues;
14
14
  }
15
- type FormFieldName<TValues extends FormValues = FormValues> = Extract<keyof TValues, string> | (Record<never, never> & string);
16
- type FormFieldValue<TValues extends FormValues, TFieldName extends string> = TFieldName extends keyof TValues ? TValues[TFieldName] : unknown;
17
- type FormBaseComponentType = BuiltInFormComponentType | (Record<never, never> & string);
15
+ export type FormFieldName<TValues extends FormValues = FormValues> = Extract<keyof TValues, string> | (Record<never, never> & string);
16
+ export type FormFieldValue<TValues extends FormValues, TFieldName extends string> = TFieldName extends keyof TValues ? TValues[TFieldName] : unknown;
17
+ export type FormBaseComponentType = BuiltInFormComponentType | (Record<never, never> & string);
18
18
  type Breakpoints = '2xl:' | '3xl:' | '' | 'lg:' | 'md:' | 'sm:' | 'xl:';
19
19
  type GridCols = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13;
20
20
  type WrapperClassType = `${Breakpoints}grid-cols-${GridCols}` | (Record<never, never> & string);
21
- type FormItemClassType = `${Breakpoints}cols-end-${'auto' | GridCols}` | `${Breakpoints}cols-span-${'auto' | 'full' | GridCols}` | `${Breakpoints}cols-start-${'auto' | GridCols}` | (Record<never, never> & string) | WrapperClassType;
22
- interface FormFieldOptions {
21
+ export type FormItemClassType = `${Breakpoints}cols-end-${'auto' | GridCols}` | `${Breakpoints}cols-span-${'auto' | 'full' | GridCols}` | `${Breakpoints}cols-start-${'auto' | GridCols}` | (Record<never, never> & string) | WrapperClassType;
22
+ export interface FormFieldOptions {
23
23
  asyncDebounceMs?: number;
24
24
  validators?: NonNullable<AnyFieldApi['options']['validators']>;
25
25
  validateOn?: ReadonlyArray<FormValidationTrigger>;
26
26
  }
27
- type FormValidationTrigger = 'blur' | 'change';
28
- interface FormShape {
27
+ export type FormValidationTrigger = 'blur' | 'change';
28
+ export interface FormShape {
29
29
  default?: any;
30
30
  fieldName: string;
31
31
  required?: boolean;
32
32
  rules?: ZodType;
33
33
  }
34
- interface FormRuntimeField<TValue = unknown> {
34
+ export interface FormRuntimeField<TValue = unknown> {
35
35
  handleBlur: () => void;
36
36
  handleChange: (value: TValue) => void;
37
37
  setErrorMap: (errorMap: Record<string, unknown>) => void;
@@ -46,7 +46,7 @@ interface FormRuntimeField<TValue = unknown> {
46
46
  value: TValue;
47
47
  };
48
48
  }
49
- interface FormComponentField<TValue = unknown, TFieldName extends string = string> {
49
+ export interface FormComponentField<TValue = unknown, TFieldName extends string = string> {
50
50
  'modelValue': TValue;
51
51
  'name': TFieldName;
52
52
  'onBlur': () => void;
@@ -54,35 +54,35 @@ interface FormComponentField<TValue = unknown, TFieldName extends string = strin
54
54
  'onInput': (value: TValue) => void;
55
55
  'onUpdate:modelValue': (value: TValue) => void;
56
56
  }
57
- type MaybeComponentPropKey = 'options' | 'placeholder' | 'title' | keyof HtmlHTMLAttributes | (Record<never, never> & string);
58
- type MaybeComponentProps = { [K in MaybeComponentPropKey]?: any; };
59
- interface FormMeta {
57
+ export type MaybeComponentPropKey = 'options' | 'placeholder' | 'title' | keyof HtmlHTMLAttributes | (Record<never, never> & string);
58
+ export type MaybeComponentProps = { [K in MaybeComponentPropKey]?: any; };
59
+ export interface FormMeta {
60
60
  dirty: boolean;
61
61
  submitting: boolean;
62
62
  valid: boolean;
63
63
  validating: boolean;
64
64
  }
65
- interface FormRuntimeState<TValues extends FormValues = FormValues> {
65
+ export interface FormRuntimeState<TValues extends FormValues = FormValues> {
66
66
  errors: Record<string, string>;
67
67
  meta: FormMeta;
68
68
  values: TValues;
69
69
  }
70
- interface FormValidationResult {
70
+ export interface FormValidationResult {
71
71
  errors: Record<string, string>;
72
72
  valid: boolean;
73
73
  }
74
- interface FormValueSnapshot<TFormValues extends FormValues = FormValues, TSubmitValues extends FormValues = TFormValues> {
74
+ export interface FormValueSnapshot<TFormValues extends FormValues = FormValues, TSubmitValues extends FormValues = TFormValues> {
75
75
  rawValues: Readonly<TFormValues>;
76
76
  values: TSubmitValues;
77
77
  }
78
- interface FormResetState<TValues extends FormValues = FormValues> {
78
+ export interface FormResetState<TValues extends FormValues = FormValues> {
79
79
  values?: Partial<TValues>;
80
80
  }
81
- interface FormResetOptions {
81
+ export interface FormResetOptions {
82
82
  force?: boolean;
83
83
  keepDefaultValues?: boolean;
84
84
  }
85
- interface FormActions<TValues extends FormValues = FormValues> {
85
+ export interface FormActions<TValues extends FormValues = FormValues> {
86
86
  clearValidation: (fieldNames?: FormFieldName<TValues> | Array<FormFieldName<TValues>>) => void;
87
87
  readonly errors: Record<string, string>;
88
88
  readonly fieldComponent: Component;
@@ -110,14 +110,14 @@ interface FormActions<TValues extends FormValues = FormValues> {
110
110
  }
111
111
  type ReservedFormSlotName = 'default' | 'expand-after' | 'expand-before' | 'reset-before' | 'submit-before';
112
112
  type FormKnownFieldName<TValues extends FormValues> = string extends Extract<keyof TValues, string> ? never : Exclude<Extract<keyof TValues, string>, ReservedFormSlotName>;
113
- interface TamanFormActionSlotProps<TValues extends FormValues = FormValues, T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>, TSubmitValues extends FormValues = TValues> {
113
+ export interface TamanFormActionSlotProps<TValues extends FormValues = FormValues, T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>, TSubmitValues extends FormValues = TValues> {
114
114
  formApi: ExtendedFormApi<TValues, T, P, TSubmitValues>;
115
115
  values: TValues;
116
116
  }
117
- interface TamanFormDefaultSlotProps<TValues extends FormValues = FormValues, T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>, TSubmitValues extends FormValues = TValues> extends TamanFormActionSlotProps<TValues, T, P, TSubmitValues> {
117
+ export interface TamanFormDefaultSlotProps<TValues extends FormValues = FormValues, T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>, TSubmitValues extends FormValues = TValues> extends TamanFormActionSlotProps<TValues, T, P, TSubmitValues> {
118
118
  shapes: Array<FormShape>;
119
119
  }
120
- interface TamanFormFieldSlotProps<TValues extends FormValues = FormValues, TFieldName extends FormFieldName<TValues> = FormFieldName<TValues>, T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>, TSubmitValues extends FormValues = TValues> extends TamanFormActionSlotProps<TValues, T, P, TSubmitValues> {
120
+ export interface TamanFormFieldSlotProps<TValues extends FormValues = FormValues, TFieldName extends FormFieldName<TValues> = FormFieldName<TValues>, T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>, TSubmitValues extends FormValues = TValues> extends TamanFormActionSlotProps<TValues, T, P, TSubmitValues> {
121
121
  componentField: FormComponentField<FormFieldValue<TValues, TFieldName>, TFieldName>;
122
122
  componentProps: TamanFormResolvedComponentProps<FormFieldValue<TValues, TFieldName>, TFieldName>;
123
123
  disabled: boolean;
@@ -131,25 +131,25 @@ interface TamanFormFieldSlotProps<TValues extends FormValues = FormValues, TFiel
131
131
  modelValue: FormFieldValue<TValues, TFieldName>;
132
132
  name: TFieldName;
133
133
  }
134
- type TamanFormResolvedComponentProps<TValue = unknown, TFieldName extends string = string> = MaybeComponentProps & {
134
+ export type TamanFormResolvedComponentProps<TValue = unknown, TFieldName extends string = string> = MaybeComponentProps & {
135
135
  'disabled': boolean;
136
136
  'modelValue'?: TValue;
137
137
  'name': TFieldName;
138
138
  'onUpdate:modelValue'?: (value: TValue) => void;
139
139
  };
140
140
  type TamanFormFieldSlots<TValues extends FormValues, T extends FormBaseComponentType, P extends Record<string, any>, TSubmitValues extends FormValues> = string extends Extract<keyof TValues, string> ? Record<string, ((props: TamanFormFieldSlotProps<TValues, FormFieldName<TValues>, T, P, TSubmitValues>) => any) | undefined> : { [TFieldName in FormKnownFieldName<TValues>]?: (props: TamanFormFieldSlotProps<TValues, TFieldName, T, P, TSubmitValues>) => any; };
141
- type TamanFormSlots<TValues extends FormValues = FormValues, T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>, TSubmitValues extends FormValues = TValues> = TamanFormFieldSlots<TValues, T, P, TSubmitValues> & {
141
+ export type TamanFormSlots<TValues extends FormValues = FormValues, T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>, TSubmitValues extends FormValues = TValues> = TamanFormFieldSlots<TValues, T, P, TSubmitValues> & {
142
142
  'default'?: (props: TamanFormDefaultSlotProps<TValues, T, P, TSubmitValues>) => any;
143
143
  'expand-after'?: (props: TamanFormActionSlotProps<TValues, T, P, TSubmitValues>) => any;
144
144
  'expand-before'?: (props: TamanFormActionSlotProps<TValues, T, P, TSubmitValues>) => any;
145
145
  'reset-before'?: (props: TamanFormActionSlotProps<TValues, T, P, TSubmitValues>) => any;
146
146
  'submit-before'?: (props: TamanFormActionSlotProps<TValues, T, P, TSubmitValues>) => any;
147
147
  };
148
- type TamanFormComponent<TValues extends FormValues = FormValues, T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>, TSubmitValues extends FormValues = TValues> = new () => {
148
+ export type TamanFormComponent<TValues extends FormValues = FormValues, T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>, TSubmitValues extends FormValues = TValues> = new () => {
149
149
  $props: TamanFormProps<T, P, TValues, TSubmitValues>;
150
150
  $slots: TamanFormSlots<TValues, T, P, TSubmitValues>;
151
151
  };
152
- interface FormSchemaContext<TValues extends FormValues = FormValues> {
152
+ export interface FormSchemaContext<TValues extends FormValues = FormValues> {
153
153
  arrayField?: string;
154
154
  fieldName?: string;
155
155
  originalFieldName?: string;
@@ -158,19 +158,19 @@ interface FormSchemaContext<TValues extends FormValues = FormValues> {
158
158
  rowIndex?: number;
159
159
  rowPath?: string;
160
160
  }
161
- type FormCustomRenderType = (() => Component | string) | string;
161
+ export type FormCustomRenderType = (() => Component | string) | string;
162
162
  type CustomParamsRenderType<TValues extends FormValues = FormValues> = ((ctx: FormSchemaContext<TValues>) => Component | string) | string;
163
- type FormSchemaRuleType = 'required' | 'selectRequired' | null | (Record<never, never> & string) | ZodType;
163
+ export type FormSchemaRuleType = 'required' | 'selectRequired' | null | (Record<never, never> & string) | ZodType;
164
164
  interface FormItemDependenciesBase {
165
165
  triggerFields: Array<string>;
166
166
  }
167
- interface FormDependenciesResolveContext<TValues extends FormValues = FormValues> {
167
+ export interface FormDependenciesResolveContext<TValues extends FormValues = FormValues> {
168
168
  actions: FormActions<TValues>;
169
169
  controller: ExtendedFormApi<TValues>;
170
170
  schema: FormSchemaContext<TValues>;
171
171
  values: Readonly<TValues>;
172
172
  }
173
- interface FormDependenciesResolvedState {
173
+ export interface FormDependenciesResolvedState {
174
174
  componentProps?: MaybeComponentProps;
175
175
  disabled?: boolean;
176
176
  help?: FormCustomRenderType;
@@ -180,12 +180,12 @@ interface FormDependenciesResolvedState {
180
180
  rules?: FormSchemaRuleType;
181
181
  show?: boolean;
182
182
  }
183
- interface FormItemDependenciesResolve<TValues extends FormValues = FormValues> extends FormItemDependenciesBase {
183
+ export interface FormItemDependenciesResolve<TValues extends FormValues = FormValues> extends FormItemDependenciesBase {
184
184
  resolve: (context: FormDependenciesResolveContext<TValues>) => FormDependenciesResolvedState | PromiseLike<FormDependenciesResolvedState | undefined> | undefined;
185
185
  }
186
- type FormItemDependencies<TValues extends FormValues = FormValues> = FormItemDependenciesResolve<TValues>;
186
+ export type FormItemDependencies<TValues extends FormValues = FormValues> = FormItemDependenciesResolve<TValues>;
187
187
  type ComponentProps<TValues extends FormValues = FormValues> = ((ctx: FormSchemaContext<TValues>) => MaybeComponentProps) | MaybeComponentProps;
188
- interface FormCommonConfig<TValues extends FormValues = FormValues> {
188
+ export interface FormCommonConfig<TValues extends FormValues = FormValues> {
189
189
  collapsible?: boolean;
190
190
  componentProps?: ComponentProps<TValues>;
191
191
  controlClass?: string;
@@ -230,7 +230,7 @@ type FormArraySchema<T extends FormBaseComponentType, P extends Record<string, a
230
230
  componentProps?: ComponentProps<TValues>;
231
231
  type: 'array';
232
232
  } & FormSchemaBody<TValues>;
233
- interface FormGroupSchema<T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>, TValues extends FormValues = FormValues> {
233
+ export interface FormGroupSchema<T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>, TValues extends FormValues = FormValues> {
234
234
  children: Array<FormFieldSchema<T, P, TValues>>;
235
235
  collapsed?: boolean;
236
236
  collapsible?: boolean;
@@ -245,9 +245,9 @@ interface FormGroupSchema<T extends FormBaseComponentType = FormBaseComponentTyp
245
245
  type: 'group';
246
246
  wrapperClass?: WrapperClassType;
247
247
  }
248
- type FormFieldSchema<T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>, TValues extends FormValues = FormValues> = FormArraySchema<T, P, TValues> | FormSchemaDiscriminated<T, P, TValues> | FormSchemaFallback<T, P, TValues>;
249
- type FormSchema<T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>, TValues extends FormValues = FormValues> = FormFieldSchema<T, P, TValues> | FormGroupSchema<T, P, TValues>;
250
- interface TamanFormFieldArrayProps<T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>, TValues extends FormValues = FormValues> {
248
+ export type FormFieldSchema<T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>, TValues extends FormValues = FormValues> = FormArraySchema<T, P, TValues> | FormSchemaDiscriminated<T, P, TValues> | FormSchemaFallback<T, P, TValues>;
249
+ export type FormSchema<T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>, TValues extends FormValues = FormValues> = FormFieldSchema<T, P, TValues> | FormGroupSchema<T, P, TValues>;
250
+ export interface TamanFormFieldArrayProps<T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>, TValues extends FormValues = FormValues> {
251
251
  actionText?: string;
252
252
  addButtonText?: string;
253
253
  commonConfig?: FormCommonConfig<TValues>;
@@ -261,9 +261,9 @@ interface TamanFormFieldArrayProps<T extends FormBaseComponentType = FormBaseCom
261
261
  schema?: Array<FormFieldSchema<T, P, TValues>>;
262
262
  showIndex?: boolean;
263
263
  }
264
- type FormHandleSubmitFn<TFormValues extends FormValues = FormValues, TSubmitValues extends FormValues = TFormValues> = (values: NoInfer<TSubmitValues>, rawValues: Readonly<TFormValues>) => Promise<void> | void;
265
- type FormHandleResetFn<TSubmitValues extends FormValues = FormValues> = (values: TSubmitValues) => Promise<void> | void;
266
- interface FormRenderProps<T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>, TValues extends FormValues = FormValues> {
264
+ export type FormHandleSubmitFn<TFormValues extends FormValues = FormValues, TSubmitValues extends FormValues = TFormValues> = (values: NoInfer<TSubmitValues>, rawValues: Readonly<TFormValues>) => Promise<void> | void;
265
+ export type FormHandleResetFn<TSubmitValues extends FormValues = FormValues> = (values: TSubmitValues) => Promise<void> | void;
266
+ export interface FormRenderProps<T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>, TValues extends FormValues = FormValues> {
267
267
  collapsed?: boolean;
268
268
  collapseTriggerResize?: boolean;
269
269
  commonConfig?: FormCommonConfig<TValues>;
@@ -278,7 +278,7 @@ interface ActionButtonOptions extends ButtonProps {
278
278
  content?: MaybeComputedRef<string>;
279
279
  show?: boolean;
280
280
  }
281
- interface TamanFormProps<T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>, TValues extends FormValues = FormValues, TSubmitValues extends FormValues = TValues> extends Omit<FormRenderProps<T, P, TValues>, 'componentMap' | 'form'> {
281
+ export interface TamanFormProps<T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>, TValues extends FormValues = FormValues, TSubmitValues extends FormValues = TValues> extends Omit<FormRenderProps<T, P, TValues>, 'componentMap' | 'form'> {
282
282
  actionButtonsReverse?: boolean;
283
283
  actionLayout?: 'inline' | 'newLine' | 'rowEnd';
284
284
  actionPosition?: 'center' | 'left' | 'right';
@@ -296,13 +296,13 @@ interface TamanFormProps<T extends FormBaseComponentType = FormBaseComponentType
296
296
  submitOnChange?: boolean;
297
297
  submitOnEnter?: boolean;
298
298
  }
299
- type ExtendedFormApi<TValues extends FormValues = FormValues, T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>, TSubmitValues extends FormValues = TValues> = FormApi<TValues, T, P, TSubmitValues> & {
299
+ export type ExtendedFormApi<TValues extends FormValues = FormValues, T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>, TSubmitValues extends FormValues = TValues> = FormApi<TValues, T, P, TSubmitValues> & {
300
300
  useStore: <TResult = NoInfer<TamanFormProps<T, P, TValues, TSubmitValues>>>(selector?: (state: NoInfer<TamanFormProps<T, P, TValues, TSubmitValues>>) => TResult) => Readonly<Ref<TResult>>;
301
301
  };
302
- interface TamanFormAdapterOptions {
302
+ export interface TamanFormAdapterOptions {
303
303
  rules?: Partial<Record<string, FormRuleValidator>>;
304
304
  }
305
- interface FormRuleContext {
305
+ export interface FormRuleContext {
306
306
  field: {
307
307
  label?: string;
308
308
  name: string;
@@ -310,6 +310,6 @@ interface FormRuleContext {
310
310
  label?: string;
311
311
  name: string;
312
312
  }
313
- type FormRuleValidator = (value: any, params: any, context: FormRuleContext) => boolean | string;
313
+ export type FormRuleValidator = (value: any, params: any, context: FormRuleContext) => boolean | string;
314
314
  //#endregion
315
- export { type BuiltInFormComponentPropsMap, type BuiltInFormComponentType, ExtendedFormApi, FormActions, FormBaseComponentType, FormCodec, FormCommonConfig, FormComponentField, FormCustomRenderType, FormDependenciesResolveContext, FormDependenciesResolvedState, FormFieldName, FormFieldOptions, FormFieldSchema, FormFieldValue, FormGroupSchema, FormHandleResetFn, FormHandleSubmitFn, FormItemClassType, FormItemDependencies, FormItemDependenciesResolve, FormMeta, FormRenderProps, FormResetOptions, FormResetState, FormRuleContext, FormRuleValidator, FormRuntimeField, FormRuntimeState, FormSchema, FormSchemaContext, FormSchemaRuleType, FormShape, FormValidationResult, FormValidationTrigger, FormValuePatch, FormValueSnapshot, FormValues, MaybeComponentPropKey, MaybeComponentProps, TamanFormActionSlotProps, TamanFormAdapterOptions, TamanFormComponent, TamanFormDefaultSlotProps, TamanFormFieldArrayProps, TamanFormFieldSlotProps, TamanFormProps, TamanFormResolvedComponentProps, TamanFormSlots };
315
+ export type { BuiltInFormComponentPropsMap, BuiltInFormComponentType };
@@ -1,7 +1,7 @@
1
1
  import { ExtendedFormApi, FormBaseComponentType, FormValues, TamanFormComponent, TamanFormProps } from "./form.types.js";
2
2
  //#region src/form/form.use-taman-form.d.ts
3
3
  type UseTamanFormReturn<TValues extends FormValues, T extends FormBaseComponentType, P extends Record<string, any>, TSubmitValues extends FormValues = TValues> = readonly [TamanFormComponent<TValues, T, P, TSubmitValues>, ExtendedFormApi<TValues, T, P, TSubmitValues>];
4
- declare function useTamanForm<T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>>(options: TamanFormProps<T, P>): UseTamanFormReturn<FormValues, T, P>;
5
- declare function useTamanForm<TValues extends FormValues, T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>, TSubmitValues extends FormValues = TValues>(options: TamanFormProps<T, P, TValues, TSubmitValues>): UseTamanFormReturn<TValues, T, P, TSubmitValues>;
4
+ export declare function useTamanForm<T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>>(options: TamanFormProps<T, P>): UseTamanFormReturn<FormValues, T, P>;
5
+ export declare function useTamanForm<TValues extends FormValues, T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>, TSubmitValues extends FormValues = TValues>(options: TamanFormProps<T, P, TValues, TSubmitValues>): UseTamanFormReturn<TValues, T, P, TSubmitValues>;
6
6
  //#endregion
7
- export { useTamanForm };
7
+ export {};
@@ -5,13 +5,30 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
5
5
  __name: "taman-core-button-fixed",
6
6
  props: {
7
7
  "expandOnHover": { type: Boolean },
8
- "expandOnHoverModifiers": {}
8
+ "expandOnHoverModifiers": {},
9
+ "expandOnHovering": { type: Boolean },
10
+ "expandOnHoveringModifiers": {},
11
+ "collapse": { type: Boolean },
12
+ "collapseModifiers": {},
13
+ "extraVisible": { type: Boolean },
14
+ "extraVisibleModifiers": {}
9
15
  },
10
- emits: ["update:expandOnHover"],
16
+ emits: [
17
+ "update:expandOnHover",
18
+ "update:expandOnHovering",
19
+ "update:collapse",
20
+ "update:extraVisible"
21
+ ],
11
22
  setup(__props) {
12
23
  const expandOnHover = useModel(__props, "expandOnHover");
24
+ const expandOnHovering = useModel(__props, "expandOnHovering");
25
+ const collapse = useModel(__props, "collapse");
26
+ const extraVisible = useModel(__props, "extraVisible");
13
27
  function toggleFixed() {
14
28
  expandOnHover.value = !expandOnHover.value;
29
+ collapse.value = false;
30
+ extraVisible.value = true;
31
+ if (!expandOnHover.value) expandOnHovering.value = true;
15
32
  }
16
33
  return (_ctx, _cache) => {
17
34
  return openBlock(), createBlock(PButton, {
@@ -3,7 +3,7 @@ import "../../index.mjs";
3
3
  import { useSidebarDrag } from "../composables/use-sidebar-drag.mjs";
4
4
  import _sfc_main$2 from "./taman-core-button-collapse.mjs";
5
5
  import _sfc_main$3 from "./taman-core-button-fixed.mjs";
6
- import { Fragment, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeModels, normalizeClass, normalizeStyle, onUnmounted, openBlock, renderSlot, shallowRef, unref, useModel, useSlots, watchEffect, withCtx } from "vue";
6
+ import { Fragment, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeModels, normalizeClass, normalizeStyle, onUnmounted, openBlock, renderSlot, shallowRef, unref, useModel, useSlots, withCtx } from "vue";
7
7
  import { useScrollLock } from "@vueuse/core";
8
8
  //#region src/layout/components/taman-core-layout-sidebar.vue
9
9
  const _hoisted_1 = ["inert"];
@@ -102,22 +102,29 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
102
102
  const currentWidth = Number.parseFloat(getMenuWidthValue(false));
103
103
  return { right: `${Math.max(0, sidebarVisualWidth.value - currentWidth)}px` };
104
104
  });
105
+ /**
106
+ * Panel visibility and reserved width must share this condition: when they diverge the panel
107
+ * floats over the content (taman-core-layout offsets the header by extraVisible only).
108
+ * fixedExtra and expandOnHover are bound to the same preference by taman-core-layout, but as a
109
+ * public component API callers may pass only one of them.
110
+ */
111
+ const extraPanelExpanded = computed(() => props.isSidebarMixed && props.show && !collapse.value && !!extraVisible.value && (props.fixedExtra || expandOnHover.value || expandOnHovering.value));
105
112
  const style = computed(() => {
106
- const { isSidebarMixed, marginTop, paddingTop, zIndex } = props;
113
+ const { marginTop, paddingTop, zIndex } = props;
107
114
  return {
108
115
  ...calcMenuWidthStyle(),
109
116
  height: `calc(100% - ${marginTop}px)`,
110
117
  marginTop: `${marginTop}px`,
111
118
  paddingTop: `${paddingTop}px`,
112
119
  zIndex,
113
- ...isSidebarMixed && extraVisible.value ? { transition: "none" } : {}
120
+ ...extraPanelExpanded.value ? { transition: "none" } : {}
114
121
  };
115
122
  });
116
123
  const extraStyle = computed(() => {
117
- const { extraWidth, show, width, zIndex } = props;
124
+ const { extraWidth, width, zIndex } = props;
118
125
  return {
119
126
  left: `${width}px`,
120
- width: extraVisible.value && show ? `${extraWidth}px` : 0,
127
+ width: extraPanelExpanded.value ? `${extraWidth}px` : 0,
121
128
  zIndex
122
129
  };
123
130
  });
@@ -156,12 +163,9 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
156
163
  const collapseStyle = computed(() => {
157
164
  return { height: `${props.collapseHeight}px` };
158
165
  });
159
- watchEffect(() => {
160
- extraVisible.value = props.fixedExtra ? true : extraVisible.value;
161
- });
162
166
  function getMenuWidthValue(isHiddenDom) {
163
- const { collapseWidth, extraWidth, mixedWidth, fixedExtra, isSidebarMixed, width } = props;
164
- let widthValue = width === 0 ? "0px" : `${width + (isSidebarMixed && fixedExtra && extraVisible.value ? extraWidth : 0)}px`;
167
+ const { collapseWidth, extraWidth, mixedWidth, isSidebarMixed, width } = props;
168
+ let widthValue = width === 0 ? "0px" : `${width + (extraPanelExpanded.value ? extraWidth : 0)}px`;
165
169
  if (isHiddenDom && expandOnHovering.value && !expandOnHover.value) widthValue = isSidebarMixed ? `${mixedWidth}px` : `${collapseWidth}px`;
166
170
  return widthValue;
167
171
  }
@@ -183,9 +187,15 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
183
187
  function handleMouseenter(event) {
184
188
  if (props.isMobile) return;
185
189
  if (event?.offsetX < 10) return;
186
- if (expandOnHover.value) return;
190
+ if (expandOnHover.value) {
191
+ if (props.isSidebarMixed) extraVisible.value = true;
192
+ return;
193
+ }
187
194
  if (!expandOnHovering.value) collapse.value = false;
188
- if (props.isSidebarMixed) isLocked.value = true;
195
+ if (props.isSidebarMixed) {
196
+ isLocked.value = true;
197
+ extraVisible.value = true;
198
+ }
189
199
  expandOnHovering.value = true;
190
200
  }
191
201
  function handleMouseleave() {
@@ -249,9 +259,20 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
249
259
  }, [
250
260
  !collapse.value && !__props.isSidebarMixed && __props.showFixedButton ? (openBlock(), createBlock(_sfc_main$3, {
251
261
  key: 0,
262
+ collapse: collapse.value,
263
+ "onUpdate:collapse": _cache[0] || (_cache[0] = ($event) => collapse.value = $event),
252
264
  "expand-on-hover": expandOnHover.value,
253
- "onUpdate:expandOnHover": _cache[0] || (_cache[0] = ($event) => expandOnHover.value = $event)
254
- }, null, 8, ["expand-on-hover"])) : createCommentVNode("v-if", true),
265
+ "onUpdate:expandOnHover": _cache[1] || (_cache[1] = ($event) => expandOnHover.value = $event),
266
+ "expand-on-hovering": expandOnHovering.value,
267
+ "onUpdate:expandOnHovering": _cache[2] || (_cache[2] = ($event) => expandOnHovering.value = $event),
268
+ "extra-visible": extraVisible.value,
269
+ "onUpdate:extraVisible": _cache[3] || (_cache[3] = ($event) => extraVisible.value = $event)
270
+ }, null, 8, [
271
+ "collapse",
272
+ "expand-on-hover",
273
+ "expand-on-hovering",
274
+ "extra-visible"
275
+ ])) : createCommentVNode("v-if", true),
255
276
  unref(slots).logo ? (openBlock(), createElementBlock("div", {
256
277
  key: 1,
257
278
  style: normalizeStyle(headerStyle.value)
@@ -268,24 +289,35 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
268
289
  __props.showCollapseButton && !__props.isSidebarMixed ? (openBlock(), createBlock(_sfc_main$2, {
269
290
  key: 2,
270
291
  collapsed: collapse.value,
271
- "onUpdate:collapsed": _cache[1] || (_cache[1] = ($event) => collapse.value = $event)
292
+ "onUpdate:collapsed": _cache[4] || (_cache[4] = ($event) => collapse.value = $event)
272
293
  }, null, 8, ["collapsed"])) : createCommentVNode("v-if", true)
273
294
  ], 6),
274
295
  __props.isSidebarMixed ? (openBlock(), createElementBlock("div", {
275
296
  key: 0,
276
- class: normalizeClass([[__props.themeSub, { "border-l": extraVisible.value }], "border-r border-border bg-background-sidebar h-full transition-[left,width]-300 ease-out top-0 fixed overflow-hidden"]),
297
+ class: normalizeClass([[__props.themeSub, { "border-l": extraPanelExpanded.value }], "border-r border-border bg-background-sidebar h-full transition-[left,width]-300 ease-out top-0 fixed overflow-hidden"]),
277
298
  style: normalizeStyle(extraStyle.value)
278
299
  }, [
279
300
  __props.isSidebarMixed && expandOnHover.value ? (openBlock(), createBlock(_sfc_main$2, {
280
301
  key: 0,
281
302
  collapsed: extraCollapse.value,
282
- "onUpdate:collapsed": _cache[2] || (_cache[2] = ($event) => extraCollapse.value = $event)
303
+ "onUpdate:collapsed": _cache[5] || (_cache[5] = ($event) => extraCollapse.value = $event)
283
304
  }, null, 8, ["collapsed"])) : createCommentVNode("v-if", true),
284
305
  !extraCollapse.value ? (openBlock(), createBlock(_sfc_main$3, {
285
306
  key: 1,
307
+ collapse: collapse.value,
308
+ "onUpdate:collapse": _cache[6] || (_cache[6] = ($event) => collapse.value = $event),
286
309
  "expand-on-hover": expandOnHover.value,
287
- "onUpdate:expandOnHover": _cache[3] || (_cache[3] = ($event) => expandOnHover.value = $event)
288
- }, null, 8, ["expand-on-hover"])) : createCommentVNode("v-if", true),
310
+ "onUpdate:expandOnHover": _cache[7] || (_cache[7] = ($event) => expandOnHover.value = $event),
311
+ "expand-on-hovering": expandOnHovering.value,
312
+ "onUpdate:expandOnHovering": _cache[8] || (_cache[8] = ($event) => expandOnHovering.value = $event),
313
+ "extra-visible": extraVisible.value,
314
+ "onUpdate:extraVisible": _cache[9] || (_cache[9] = ($event) => extraVisible.value = $event)
315
+ }, null, 8, [
316
+ "collapse",
317
+ "expand-on-hover",
318
+ "expand-on-hovering",
319
+ "extra-visible"
320
+ ])) : createCommentVNode("v-if", true),
289
321
  !extraCollapse.value ? (openBlock(), createElementBlock("div", {
290
322
  key: 2,
291
323
  style: normalizeStyle(extraTitleStyle.value),
@@ -1,2 +1 @@
1
- import _sfc_main from "./taman-core-layout.mjs";
2
- export { _sfc_main as TamanCoreLayout };
1
+ export { default as TamanCoreLayout } from "./taman-core-layout.mjs";
@@ -234,7 +234,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
234
234
  let width = "100%";
235
235
  let sidebarAndExtraWidth = "unset";
236
236
  if (headerFixed.value && currentLayout.value !== "header-nav" && currentLayout.value !== "mixed-nav" && currentLayout.value !== "header-sidebar-nav" && showSidebar.value && !props.isMobile) {
237
- if ((isSidebarMixedNav.value || isHeaderMixedNav.value) && sidebarExpandOnHover.value && sidebarExtraVisible.value) {
237
+ if ((isSidebarMixedNav.value || isHeaderMixedNav.value) && sidebarExpandOnHover.value && sidebarExtraVisible.value && !activeSidebarCollapse.value) {
238
238
  sidebarAndExtraWidth = `${props.sidebarMixedWidth + (sidebarExtraCollapse.value ? props.sidebarExtraCollapsedWidth : props.sidebarWidth)}px`;
239
239
  width = `calc(100% - ${sidebarAndExtraWidth})`;
240
240
  } else {
@@ -4,12 +4,12 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
4
4
  name: "CollapseTransition",
5
5
  __name: "collapse-transition",
6
6
  setup(__props) {
7
- const reset = (el) => {
7
+ function reset(el) {
8
8
  el.style.maxHeight = "";
9
9
  el.style.overflow = el.dataset.oldOverflow;
10
10
  el.style.paddingTop = el.dataset.oldPaddingTop;
11
11
  el.style.paddingBottom = el.dataset.oldPaddingBottom;
12
- };
12
+ }
13
13
  const on = {
14
14
  afterEnter(el) {
15
15
  el.style.maxHeight = "";
@@ -1,2 +1 @@
1
- import _sfc_main from "./normal-menu.mjs";
2
- export { _sfc_main as NormalMenu };
1
+ export { default as NormalMenu } from "./normal-menu.mjs";
@@ -9,7 +9,7 @@ declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {},
9
9
  onSelect?: ((args_0: TamanMenuRecordRaw) => any) | undefined;
10
10
  onEnter?: ((args_0: TamanMenuRecordRaw) => any) | undefined;
11
11
  }>, {
12
- menus: Array<TamanMenuRecordRaw>;
12
+ menus: TamanMenuRecordRaw[];
13
13
  collapse: boolean;
14
14
  theme: "dark" | "light";
15
15
  activePath: string;
@@ -39,7 +39,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
39
39
  "dot-style": badgeStyle.value
40
40
  }, null, 8, ["dot-class", "dot-style"])) : (openBlock(), createElementBlock("div", {
41
41
  key: 1,
42
- class: normalizeClass([badgeClass.value, "text-primary-foreground text-[10px] px-1.5 py-0.5 rounded-xl flex-center"]),
42
+ class: normalizeClass([badgeClass.value, "text-[10px] text-primary-foreground px-1.5 py-0.5 rounded-xl flex-center"]),
43
43
  style: normalizeStyle(badgeStyle.value)
44
44
  }, toDisplayString(__props.badge), 7))], 2)) : createCommentVNode("v-if", true);
45
45
  };
@@ -1,8 +1,7 @@
1
1
  import { AlertPromptProps, TamanAlertProps } from "./alert.js";
2
2
  //#region src/popup/alert/alert-builder.d.ts
3
- declare function tamanAlert(options: TamanAlertProps): Promise<void>;
4
- declare function tamanConfirm(options: TamanAlertProps): Promise<void>;
5
- declare function tamanPrompt<T = any>(options: AlertPromptProps<T>): Promise<T | undefined>;
6
- declare function clearAllAlerts(): void;
7
- //#endregion
8
- export { clearAllAlerts, tamanAlert, tamanConfirm, tamanPrompt };
3
+ export declare function tamanAlert(options: TamanAlertProps): Promise<void>;
4
+ export declare function tamanConfirm(options: TamanAlertProps): Promise<void>;
5
+ export declare function tamanPrompt<T = any>(options: AlertPromptProps<T>): Promise<T | undefined>;
6
+ export declare function clearAllAlerts(): void;
7
+ //#endregion
@@ -1,11 +1,11 @@
1
1
  import { Component, VNode, VNodeArrayChildren } from "vue";
2
2
  import { Recordable } from "@vinicunca/taman-core/typings";
3
3
  //#region src/popup/alert/alert.d.ts
4
- type IconType = 'error' | 'info' | 'question' | 'success' | 'warning';
5
- interface AlertBeforeCloseScope {
4
+ export type IconType = 'error' | 'info' | 'question' | 'success' | 'warning';
5
+ export interface AlertBeforeCloseScope {
6
6
  isConfirm: boolean;
7
7
  }
8
- interface TamanAlertProps {
8
+ export interface TamanAlertProps {
9
9
  beforeClose?: (scope: AlertBeforeCloseScope) => boolean | Promise<boolean | undefined> | undefined;
10
10
  bordered?: boolean;
11
11
  buttonAlign?: 'center' | 'end' | 'start';
@@ -23,7 +23,7 @@ interface TamanAlertProps {
23
23
  showCancel?: boolean;
24
24
  title?: string;
25
25
  }
26
- type AlertPromptProps<T = any> = {
26
+ export type AlertPromptProps<T = any> = {
27
27
  beforeClose?: (scope: {
28
28
  isConfirm: boolean;
29
29
  value: T | undefined;
@@ -34,10 +34,9 @@ type AlertPromptProps<T = any> = {
34
34
  defaultValue?: T;
35
35
  modelPropName?: string;
36
36
  } & Omit<TamanAlertProps, 'beforeClose'>;
37
- interface AlertContext {
37
+ export interface AlertContext {
38
38
  doCancel: () => void;
39
39
  doConfirm: () => void;
40
40
  }
41
- declare function useAlertContext(): AlertContext;
42
- //#endregion
43
- export { AlertBeforeCloseScope, AlertContext, AlertPromptProps, IconType, TamanAlertProps, useAlertContext };
41
+ export declare function useAlertContext(): AlertContext;
42
+ //#endregion
@@ -18,7 +18,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
18
18
  }>, {
19
19
  bordered: boolean;
20
20
  centered: boolean;
21
- buttonAlign: "center" | "end" | "start";
21
+ buttonAlign: "end" | "center" | "start";
22
22
  escapeKeyClose: boolean;
23
23
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
24
  declare const _default: typeof __VLS_export;
@@ -155,7 +155,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
155
155
  centered: __props.centered,
156
156
  "overlay-blur": __props.overlayBlur,
157
157
  "z-index": unref(zIndex),
158
- class: normalizeClass(["flex flex-col max-h-[80%] inset-x-0 sm:(rounded-$taman-radius max-w-[80%] w-130)", [__props.containerClass, {
158
+ class: normalizeClass(["flex flex-col max-h-[80%] inset-x-0 sm:rounded-$taman-radius sm:max-w-[80%] sm:w-130", [__props.containerClass, {
159
159
  "border border-border": __props.bordered,
160
160
  "shadow-3xl": !__props.bordered
161
161
  }]]),
@@ -1,7 +1,7 @@
1
1
  import { DialogApiOptions, DialogState } from "./dialog.types.js";
2
2
  import { Store } from "@vinicunca/taman-core/store";
3
3
  //#region src/popup/dialog/dialog.api.d.ts
4
- declare class DialogApi<TData = unknown> {
4
+ export declare class DialogApi<TData = unknown> {
5
5
  sharedData: Record<'payload', TData | undefined>;
6
6
  store: Store<DialogState>;
7
7
  private api;
@@ -19,5 +19,4 @@ declare class DialogApi<TData = unknown> {
19
19
  setState(stateOrFn: ((prev: DialogState) => Partial<DialogState>) | Partial<DialogState>): this;
20
20
  unlock(): this;
21
21
  }
22
- //#endregion
23
- export { DialogApi };
22
+ //#endregion
@@ -2,9 +2,11 @@ import { bindMethods, isFunction } from "@vinicunca/taman-core/utils";
2
2
  import { Store } from "@vinicunca/taman-core/store";
3
3
  //#region src/popup/dialog/dialog.api.ts
4
4
  var DialogApi = class {
5
+ /** Shared data */
5
6
  sharedData = { payload: void 0 };
6
7
  store;
7
8
  api;
9
+ /** private prevState!: DialogState; */
8
10
  state;
9
11
  constructor(options = {}) {
10
12
  const { connectedComponent: _, onBeforeClose, onCancel, onClosed, onConfirm, onOpenChange, onOpened, ...storeState } = options;