@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.
- package/README.md +2 -2
- package/dist/components/auth/index.mjs +1 -2
- package/dist/components/back-to-top/index.mjs +1 -2
- package/dist/components/button/taman-button-check-group.mjs +1 -1
- package/dist/components/button/taman-button-check-group.types.d.ts +5 -6
- package/dist/components/button/taman-button-check-group.vue.d.ts +1 -1
- package/dist/components/descriptions/taman-description.types.d.ts +12 -13
- package/dist/components/file-upload/index.mjs +1 -2
- package/dist/components/file-upload/taman-file-upload.mjs +1 -0
- package/dist/components/file-upload/taman-file-upload.types.d.ts +2 -3
- package/dist/components/full-screen/index.mjs +1 -2
- package/dist/components/icon/index.mjs +1 -2
- package/dist/components/input/password-strength.d.ts +5 -6
- package/dist/components/input/taman-input-currency.types.d.ts +2 -3
- package/dist/components/input-date/index.mjs +1 -2
- package/dist/components/input-date/taman-input-date.types.d.ts +5 -6
- package/dist/components/loading/index.mjs +1 -2
- package/dist/components/loading/types.d.ts +3 -4
- package/dist/components/logo/index.mjs +1 -2
- package/dist/components/render-content/index.mjs +1 -2
- package/dist/components/scrollbar/index.mjs +1 -2
- package/dist/components/scrollbar/scrollbar.vue.d.ts +2 -2
- package/dist/form/components/form-actions.mjs +1 -1
- package/dist/form/components/form-field-array.types.d.ts +2 -3
- package/dist/form/form-render/index.mjs +1 -2
- package/dist/form/form.api.d.ts +2 -2
- package/dist/form/form.api.mjs +2 -0
- package/dist/form/form.built-ins.d.ts +3 -4
- package/dist/form/form.built-ins.mjs +1 -0
- package/dist/form/form.codec.d.ts +7 -7
- package/dist/form/form.config.d.ts +2 -3
- package/dist/form/form.empty-value.d.ts +2 -3
- package/dist/form/form.types.d.ts +48 -48
- package/dist/form/form.use-taman-form.d.ts +3 -3
- package/dist/layout/components/taman-core-button-fixed.mjs +19 -2
- package/dist/layout/components/taman-core-layout-sidebar.mjs +51 -19
- package/dist/layout/index.mjs +1 -2
- package/dist/layout/taman-core-layout.mjs +1 -1
- package/dist/menu/components/collapse-transition.mjs +2 -2
- package/dist/menu/components/normal-menu/index.mjs +1 -2
- package/dist/menu/components/normal-menu/normal-menu.vue.d.ts +1 -1
- package/dist/menu/components/taman-menu-badge.mjs +1 -1
- package/dist/popup/alert/alert-builder.d.ts +5 -6
- package/dist/popup/alert/alert.d.ts +7 -8
- package/dist/popup/alert/alert.vue.d.ts +1 -1
- package/dist/popup/alert/alert2.mjs +1 -1
- package/dist/popup/dialog/dialog.api.d.ts +2 -3
- package/dist/popup/dialog/dialog.api.mjs +2 -0
- package/dist/popup/dialog/dialog.types.d.ts +6 -6
- package/dist/popup/dialog/dialog.vue.d.ts +12 -12
- package/dist/popup/dialog/use-taman-dialog.d.ts +4 -4
- package/dist/popup/drawer/drawer.api.d.ts +2 -3
- package/dist/popup/drawer/drawer.api.mjs +1 -0
- package/dist/popup/drawer/drawer.types.d.ts +8 -8
- package/dist/popup/drawer/drawer.vue.d.ts +14 -14
- package/dist/popup/drawer/use-taman-drawer.d.ts +4 -4
- package/dist/tabs/components/index.mjs +1 -2
- package/dist/tabs/components/taman-tabs.mjs +1 -1
- package/dist/tabs/components/widgets/tool-more.mjs +1 -1
- package/dist/tabs/components/widgets/tool-refresh.mjs +1 -1
- package/dist/tabs/components/widgets/tool-screen.mjs +1 -1
- package/dist/tabs/strict-context-menu.d.ts +2 -2
- package/dist/tabs/tabs.types.d.ts +4 -5
- package/dist/tabs/taman-tabs-view.mjs +2 -2
- package/dist/ui/alert-dialog/alert-dialog-action.vue.d.ts +2 -2
- package/dist/ui/alert-dialog/alert-dialog-cancel.vue.d.ts +2 -2
- package/dist/ui/alert-dialog/alert-dialog-content.mjs +1 -1
- package/dist/ui/alert-dialog/alert-dialog-content.vue.d.ts +2 -2
- package/dist/ui/alert-dialog/alert-dialog-description.vue.d.ts +2 -2
- package/dist/ui/alert-dialog/alert-dialog-overlay.mjs +1 -1
- package/dist/ui/alert-dialog/alert-dialog-root.vue.d.ts +2 -2
- package/dist/ui/alert-dialog/alert-dialog-title.vue.d.ts +2 -2
- package/dist/ui/alert-dialog/alert-dialog-trigger.vue.d.ts +2 -2
- package/dist/ui/dialog/dialog-close.vue.d.ts +2 -2
- package/dist/ui/dialog/dialog-content.mjs +1 -1
- package/dist/ui/dialog/dialog-content.vue.d.ts +3 -3
- package/dist/ui/dialog/dialog-description.vue.d.ts +2 -2
- package/dist/ui/dialog/dialog-footer.mjs +1 -1
- package/dist/ui/dialog/dialog-overlay.mjs +1 -1
- package/dist/ui/dialog/dialog-overlay.vue.d.ts +1 -1
- package/dist/ui/dialog/dialog-root.vue.d.ts +2 -2
- package/dist/ui/dialog/dialog-title.vue.d.ts +2 -2
- package/dist/ui/dialog/dialog-trigger.vue.d.ts +2 -2
- package/dist/ui/form/form-control.vue.d.ts +2 -2
- package/dist/ui/form/form-field.vue.d.ts +1 -1
- package/dist/ui/form/form-label.vue.d.ts +2 -2
- package/dist/ui/form/injection-keys.d.ts +4 -5
- package/dist/ui/label/index.mjs +1 -2
- package/dist/ui/label/label.mjs +1 -1
- package/dist/ui/label/label.vue.d.ts +2 -2
- package/dist/ui/scroll-area/scroll-area.vue.d.ts +2 -2
- package/dist/ui/scroll-area/scroll-bar.vue.d.ts +1 -1
- package/dist/ui/sheet/sheet-close.vue.d.ts +2 -2
- package/dist/ui/sheet/sheet-content.mjs +1 -1
- package/dist/ui/sheet/sheet-content.vue.d.ts +3 -3
- package/dist/ui/sheet/sheet-description.vue.d.ts +2 -2
- package/dist/ui/sheet/sheet-root.vue.d.ts +2 -2
- package/dist/ui/sheet/sheet-title.vue.d.ts +2 -2
- package/dist/ui/sheet/sheet.variants.d.ts +17 -18
- package/dist/ui/sheet/sheet.variants.mjs +3 -2
- package/dist/unocss/content.d.ts +2 -3
- package/dist/unocss/index.mjs +1 -2
- package/package.json +11 -10
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @vinicunca/taman-ui
|
|
2
2
|
|
|
3
|
-
Unstyled Vue components for Taman on [pohon-ui](https://vinicunca.dev
|
|
3
|
+
Unstyled Vue components for Taman on [pohon-ui](https://pohon.vinicunca.dev):
|
|
4
4
|
base components, dialogs and drawers, layout, menu, tabs and forms. Styling is
|
|
5
5
|
the consumer's job, the way shadcn works: the package ships no CSS, theme or
|
|
6
6
|
preset. ESM only; built for Vite.
|
|
@@ -52,7 +52,7 @@ components; without it they render with none of their own utilities.
|
|
|
52
52
|
Pick one:
|
|
53
53
|
|
|
54
54
|
- **pohon's default look** — leave pohon's `theme.unstyled` at its default
|
|
55
|
-
and follow pohon's [installation guide](https://vinicunca.dev/
|
|
55
|
+
and follow pohon's [installation guide](https://pohon.vinicunca.dev/docs/getting-started/installation/vue).
|
|
56
56
|
- **Your own design** — set `theme: { unstyled: true }` and pass your own
|
|
57
57
|
`ui` config to `vitePohon`. Taman's admin template (planned) ships its
|
|
58
58
|
design this way.
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { _sfc_main as TamanAuthForm };
|
|
1
|
+
export { default as TamanAuthForm } from "./taman-auth-form.mjs";
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { _sfc_main as TamanBackToTop };
|
|
1
|
+
export { default as TamanBackToTop } from "./taman-back-to-top.mjs";
|
|
@@ -87,7 +87,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
87
87
|
return openBlock(), createBlock(PButton, {
|
|
88
88
|
key: String(option.value),
|
|
89
89
|
type: "button",
|
|
90
|
-
class: "data-[active=true]:
|
|
90
|
+
class: "data-[active=true]:not-first:border-x-1 data-[active=true]:first:border-r-1",
|
|
91
91
|
color: "neutral",
|
|
92
92
|
variant: "outline",
|
|
93
93
|
"active-color": "primary",
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Component } from "vue";
|
|
2
2
|
import { FieldGroupProps } from "pohon-ui";
|
|
3
3
|
//#region src/components/button/taman-button-check-group.types.d.ts
|
|
4
|
-
type TamanButtonCheckGroupValue = boolean | number | string;
|
|
5
|
-
type TamanButtonCheckGroupModel = Array<TamanButtonCheckGroupValue> | TamanButtonCheckGroupValue | undefined;
|
|
6
|
-
interface TamanButtonCheckGroupOption {
|
|
4
|
+
export type TamanButtonCheckGroupValue = boolean | number | string;
|
|
5
|
+
export type TamanButtonCheckGroupModel = Array<TamanButtonCheckGroupValue> | TamanButtonCheckGroupValue | undefined;
|
|
6
|
+
export interface TamanButtonCheckGroupOption {
|
|
7
7
|
[key: string]: any;
|
|
8
8
|
label: (() => Component | string) | string;
|
|
9
9
|
value: TamanButtonCheckGroupValue;
|
|
10
10
|
}
|
|
11
|
-
interface TamanButtonCheckGroupProps {
|
|
11
|
+
export interface TamanButtonCheckGroupProps {
|
|
12
12
|
allowClear?: boolean;
|
|
13
13
|
beforeChange?: (value: TamanButtonCheckGroupValue, isChecked: boolean) => boolean | PromiseLike<boolean | undefined> | undefined;
|
|
14
14
|
disabled?: boolean;
|
|
@@ -18,5 +18,4 @@ interface TamanButtonCheckGroupProps {
|
|
|
18
18
|
showIcon?: boolean;
|
|
19
19
|
size?: FieldGroupProps['size'];
|
|
20
20
|
}
|
|
21
|
-
//#endregion
|
|
22
|
-
export { TamanButtonCheckGroupModel, TamanButtonCheckGroupOption, TamanButtonCheckGroupProps, TamanButtonCheckGroupValue };
|
|
21
|
+
//#endregion
|
|
@@ -28,7 +28,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
28
28
|
multiple: boolean;
|
|
29
29
|
allowClear: boolean;
|
|
30
30
|
maxCount: number;
|
|
31
|
-
options:
|
|
31
|
+
options: TamanButtonCheckGroupOption[];
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
33
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
34
34
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { CSSProperties, Component, HTMLAttributes } from "vue";
|
|
2
2
|
//#region src/components/descriptions/taman-description.types.d.ts
|
|
3
|
-
type TamanDescriptionsBreakpoint = 'lg' | 'md' | 'sm' | 'xl' | 'xs' | 'xxl' | 'xxxl';
|
|
4
|
-
type TamanScreenMap = Partial<Record<TamanDescriptionsBreakpoint, boolean>>;
|
|
5
|
-
type TamanDescriptionsLayout = 'horizontal' | 'vertical';
|
|
6
|
-
type TamanDescriptionsSize = 'large' | 'middle' | 'small';
|
|
7
|
-
type TamanDescriptionsColumn = number | Partial<Record<TamanDescriptionsBreakpoint, number>>;
|
|
8
|
-
type TamanDescriptionsItemSpan = 'filled' | number | Partial<Record<TamanDescriptionsBreakpoint, number>>;
|
|
9
|
-
type TamanDescriptionsRenderNode = (() => any) | Component | number | string;
|
|
10
|
-
interface TamanDescriptionsItemType {
|
|
3
|
+
export type TamanDescriptionsBreakpoint = 'lg' | 'md' | 'sm' | 'xl' | 'xs' | 'xxl' | 'xxxl';
|
|
4
|
+
export type TamanScreenMap = Partial<Record<TamanDescriptionsBreakpoint, boolean>>;
|
|
5
|
+
export type TamanDescriptionsLayout = 'horizontal' | 'vertical';
|
|
6
|
+
export type TamanDescriptionsSize = 'large' | 'middle' | 'small';
|
|
7
|
+
export type TamanDescriptionsColumn = number | Partial<Record<TamanDescriptionsBreakpoint, number>>;
|
|
8
|
+
export type TamanDescriptionsItemSpan = 'filled' | number | Partial<Record<TamanDescriptionsBreakpoint, number>>;
|
|
9
|
+
export type TamanDescriptionsRenderNode = (() => any) | Component | number | string;
|
|
10
|
+
export interface TamanDescriptionsItemType {
|
|
11
11
|
content?: TamanDescriptionsRenderNode;
|
|
12
12
|
contentStyle?: CSSProperties;
|
|
13
13
|
key?: number | string;
|
|
@@ -15,7 +15,7 @@ interface TamanDescriptionsItemType {
|
|
|
15
15
|
labelStyle?: CSSProperties;
|
|
16
16
|
span?: TamanDescriptionsItemSpan;
|
|
17
17
|
}
|
|
18
|
-
interface TamanDescriptionsProps {
|
|
18
|
+
export interface TamanDescriptionsProps {
|
|
19
19
|
bordered?: boolean;
|
|
20
20
|
class?: HTMLAttributes['class'];
|
|
21
21
|
colon?: boolean;
|
|
@@ -28,14 +28,14 @@ interface TamanDescriptionsProps {
|
|
|
28
28
|
size?: TamanDescriptionsSize;
|
|
29
29
|
title?: string;
|
|
30
30
|
}
|
|
31
|
-
interface TamanDescriptionsItemProps {
|
|
31
|
+
export interface TamanDescriptionsItemProps {
|
|
32
32
|
content?: TamanDescriptionsRenderNode;
|
|
33
33
|
contentStyle?: CSSProperties;
|
|
34
34
|
label?: TamanDescriptionsRenderNode;
|
|
35
35
|
labelStyle?: CSSProperties;
|
|
36
36
|
span?: TamanDescriptionsItemSpan;
|
|
37
37
|
}
|
|
38
|
-
interface TamanInternalDescriptionsItem {
|
|
38
|
+
export interface TamanInternalDescriptionsItem {
|
|
39
39
|
_index?: number;
|
|
40
40
|
class?: HTMLAttributes['class'];
|
|
41
41
|
content?: TamanDescriptionsRenderNode;
|
|
@@ -47,5 +47,4 @@ interface TamanInternalDescriptionsItem {
|
|
|
47
47
|
span?: number;
|
|
48
48
|
style?: CSSProperties;
|
|
49
49
|
}
|
|
50
|
-
//#endregion
|
|
51
|
-
export { TamanDescriptionsBreakpoint, TamanDescriptionsColumn, TamanDescriptionsItemProps, TamanDescriptionsItemSpan, TamanDescriptionsItemType, TamanDescriptionsLayout, TamanDescriptionsProps, TamanDescriptionsRenderNode, TamanDescriptionsSize, TamanInternalDescriptionsItem, TamanScreenMap };
|
|
50
|
+
//#endregion
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { _sfc_main as TamanFileUpload };
|
|
1
|
+
export { default as TamanFileUpload } from "./taman-file-upload.mjs";
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { FileUploadProps } from "pohon-ui";
|
|
2
2
|
//#region src/components/file-upload/taman-file-upload.types.d.ts
|
|
3
|
-
interface TamanFileUploadProps<Multiple extends boolean = false> extends FileUploadProps<Multiple> {
|
|
3
|
+
export interface TamanFileUploadProps<Multiple extends boolean = false> extends FileUploadProps<Multiple> {
|
|
4
4
|
label?: string;
|
|
5
5
|
labelActions?: string;
|
|
6
6
|
labelPreview?: string;
|
|
7
7
|
labelAddMore?: string;
|
|
8
8
|
}
|
|
9
|
-
//#endregion
|
|
10
|
-
export { TamanFileUploadProps };
|
|
9
|
+
//#endregion
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { _sfc_main as TamanFullScreen };
|
|
1
|
+
export { default as TamanFullScreen } from "./full-screen.mjs";
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { _sfc_main as TamanIcon };
|
|
1
|
+
export { default as TamanIcon } from "./icon.mjs";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
//#region src/components/input/password-strength.d.ts
|
|
2
|
-
declare const PASSWORD_STRENGTH_CHECKS: readonly [RegExp, RegExp, RegExp, RegExp, RegExp];
|
|
3
|
-
declare const PASSWORD_STRENGTH_MAX: 5;
|
|
4
|
-
declare function passwordStrengthScore(value?: string): number;
|
|
5
|
-
declare function isPasswordStrong(value?: string): boolean;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { PASSWORD_STRENGTH_CHECKS, PASSWORD_STRENGTH_MAX, isPasswordStrong, passwordStrengthScore };
|
|
2
|
+
export declare const PASSWORD_STRENGTH_CHECKS: readonly [RegExp, RegExp, RegExp, RegExp, RegExp];
|
|
3
|
+
export declare const PASSWORD_STRENGTH_MAX: 5;
|
|
4
|
+
export declare function passwordStrengthScore(value?: string): number;
|
|
5
|
+
export declare function isPasswordStrong(value?: string): boolean;
|
|
6
|
+
//#endregion
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { InputProps } from "pohon-ui";
|
|
2
2
|
//#region src/components/input/taman-input-currency.types.d.ts
|
|
3
|
-
interface TamanInputCurrencyProps extends Omit<InputProps, 'defaultValue'> {
|
|
3
|
+
export interface TamanInputCurrencyProps extends Omit<InputProps, 'defaultValue'> {
|
|
4
4
|
defaultValue?: NonNullable<InputProps['defaultValue']>;
|
|
5
5
|
formatOptions?: Intl.NumberFormatOptions;
|
|
6
6
|
}
|
|
7
|
-
//#endregion
|
|
8
|
-
export { TamanInputCurrencyProps };
|
|
7
|
+
//#endregion
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { _sfc_main as TamanInputDate };
|
|
1
|
+
export { default as TamanInputDate } from "./taman-input-date.mjs";
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { CalendarDate, CalendarDateTime, ZonedDateTime } from "@internationalized/date";
|
|
2
2
|
import { CalendarProps, InputDateProps } from "pohon-ui";
|
|
3
3
|
//#region src/components/input-date/taman-input-date.types.d.ts
|
|
4
|
-
type DateValue = CalendarDate | CalendarDateTime | ZonedDateTime;
|
|
5
|
-
interface DateRange {
|
|
4
|
+
export type DateValue = CalendarDate | CalendarDateTime | ZonedDateTime;
|
|
5
|
+
export interface DateRange {
|
|
6
6
|
start: DateValue | undefined;
|
|
7
7
|
end: DateValue | undefined;
|
|
8
8
|
}
|
|
9
|
-
type InputDateModelValue<R> = (R extends true ? DateRange : DateValue) | undefined;
|
|
10
|
-
interface TamanInputDateProps<R extends boolean = false> extends InputDateProps<R> {
|
|
9
|
+
export type InputDateModelValue<R> = (R extends true ? DateRange : DateValue) | undefined;
|
|
10
|
+
export interface TamanInputDateProps<R extends boolean = false> extends InputDateProps<R> {
|
|
11
11
|
type?: CalendarProps['type'];
|
|
12
12
|
}
|
|
13
|
-
//#endregion
|
|
14
|
-
export { DateRange, DateValue, InputDateModelValue, TamanInputDateProps };
|
|
13
|
+
//#endregion
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { _sfc_main as TamanLoading };
|
|
1
|
+
export { default as TamanLoading } from "./taman-loading.mjs";
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { HTMLAttributes } from "vue";
|
|
2
2
|
import { IconProps } from "pohon-ui";
|
|
3
3
|
//#region src/components/loading/types.d.ts
|
|
4
|
-
interface TamanLoadingIconProps {
|
|
4
|
+
export interface TamanLoadingIconProps {
|
|
5
5
|
name?: IconProps['name'];
|
|
6
6
|
mode?: IconProps['mode'];
|
|
7
7
|
size?: IconProps['size'];
|
|
8
8
|
customize?: IconProps['customize'];
|
|
9
9
|
class?: HTMLAttributes['class'];
|
|
10
10
|
}
|
|
11
|
-
type TamanLoadingIcon = string | TamanLoadingIconProps;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { TamanLoadingIcon, TamanLoadingIconProps };
|
|
11
|
+
export type TamanLoadingIcon = string | TamanLoadingIconProps;
|
|
12
|
+
//#endregion
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { _sfc_main as TamanLogo };
|
|
1
|
+
export { default as TamanLogo } from "./taman-logo.mjs";
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { _sfc_main as TamanRenderContent };
|
|
1
|
+
export { default as TamanRenderContent } from "./render-content.mjs";
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { _sfc_main as TamanScrollbar };
|
|
1
|
+
export { default as TamanScrollbar } from "./scrollbar.mjs";
|
|
@@ -11,9 +11,9 @@ interface Props {
|
|
|
11
11
|
shadowRight?: boolean;
|
|
12
12
|
shadowTop?: boolean;
|
|
13
13
|
}
|
|
14
|
-
declare var
|
|
14
|
+
declare var __VLS_7: {};
|
|
15
15
|
type __VLS_Slots = {} & {
|
|
16
|
-
default?: (props: typeof
|
|
16
|
+
default?: (props: typeof __VLS_7) => any;
|
|
17
17
|
};
|
|
18
18
|
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
19
|
scrollAt: (args_0: {
|
|
@@ -133,7 +133,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
133
133
|
hasCollapsibleFields.value ? (openBlock(), createElementBlock("button", {
|
|
134
134
|
key: 3,
|
|
135
135
|
type: "button",
|
|
136
|
-
class: "form-collapse-trigger text-sm color-primary
|
|
136
|
+
class: "form-collapse-trigger text-sm color-primary inline-flex gap-1 cursor-pointer items-center",
|
|
137
137
|
"aria-controls": props.gridId,
|
|
138
138
|
"aria-expanded": !collapsed.value,
|
|
139
139
|
onClick: _cache[0] || (_cache[0] = ($event) => collapsed.value = !collapsed.value)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FormCommonConfig, FormFieldSchema } from "../form.types.js";
|
|
2
2
|
//#region src/form/components/form-field-array.types.d.ts
|
|
3
|
-
interface TamanFormFieldArrayProps {
|
|
3
|
+
export interface TamanFormFieldArrayProps {
|
|
4
4
|
actionText?: string;
|
|
5
5
|
addButtonText?: string;
|
|
6
6
|
commonConfig?: FormCommonConfig;
|
|
@@ -14,5 +14,4 @@ interface TamanFormFieldArrayProps {
|
|
|
14
14
|
schema?: Array<FormFieldSchema>;
|
|
15
15
|
showIndex?: boolean;
|
|
16
16
|
}
|
|
17
|
-
//#endregion
|
|
18
|
-
export { TamanFormFieldArrayProps };
|
|
17
|
+
//#endregion
|
package/dist/form/form.api.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { Store } from "@vinicunca/taman-core/store";
|
|
|
5
5
|
//#region src/form/form.api.d.ts
|
|
6
6
|
type FormApiProps<TFormValues extends FormValues, T extends FormBaseComponentType, P extends Record<string, any>, TSubmitValues extends FormValues> = TamanFormProps<T, P, TFormValues, TSubmitValues>;
|
|
7
7
|
type FormApiFieldSchema<TValues extends FormValues, T extends FormBaseComponentType, P extends Record<string, any>> = FormFieldSchema<T, P, TValues>;
|
|
8
|
-
declare class FormApi<TFormValues extends FormValues = FormValues, T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>, TSubmitValues extends FormValues = TFormValues> {
|
|
8
|
+
export declare class FormApi<TFormValues extends FormValues = FormValues, T extends FormBaseComponentType = FormBaseComponentType, P extends Record<string, any> = Record<never, never>, TSubmitValues extends FormValues = TFormValues> {
|
|
9
9
|
form: FormActions<TFormValues>;
|
|
10
10
|
isMounted: boolean;
|
|
11
11
|
state: FormApiProps<TFormValues, T, P, TSubmitValues> | null;
|
|
@@ -51,4 +51,4 @@ declare class FormApi<TFormValues extends FormValues = FormValues, T extends For
|
|
|
51
51
|
private updateState;
|
|
52
52
|
}
|
|
53
53
|
//#endregion
|
|
54
|
-
export {
|
|
54
|
+
export {};
|
package/dist/form/form.api.mjs
CHANGED
|
@@ -50,6 +50,7 @@ function getDefaultState() {
|
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
52
|
var FormApi = class {
|
|
53
|
+
/** private api: Pick<TamanFormProps, 'handleReset' | 'handleSubmit'>; */
|
|
53
54
|
form = {};
|
|
54
55
|
isMounted = false;
|
|
55
56
|
state = null;
|
|
@@ -59,6 +60,7 @@ var FormApi = class {
|
|
|
59
60
|
* Component instance mapping
|
|
60
61
|
*/
|
|
61
62
|
componentRefMap = /* @__PURE__ */ new Map();
|
|
63
|
+
/** The last time the form was submitted */
|
|
62
64
|
latestSubmissionValues = null;
|
|
63
65
|
prevState = null;
|
|
64
66
|
constructor(options = {}) {
|
|
@@ -6,7 +6,7 @@ import { TamanFormFieldArrayProps } from "./components/form-field-array.types.js
|
|
|
6
6
|
import { Component } from "vue";
|
|
7
7
|
import { CheckboxGroupProps, CheckboxProps, InputMenuProps, InputNumberProps, InputProps, InputRatingProps, InputTagsProps, InputTimeProps, PinInputProps, RadioGroupProps, SelectMenuProps, SelectProps, SeparatorProps, SliderProps, SwitchProps, TextareaProps } from "pohon-ui";
|
|
8
8
|
//#region src/form/form.built-ins.d.ts
|
|
9
|
-
interface BuiltInFormComponentPropsMap {
|
|
9
|
+
export interface BuiltInFormComponentPropsMap {
|
|
10
10
|
Checkbox: CheckboxProps;
|
|
11
11
|
CheckboxGroup: CheckboxGroupProps;
|
|
12
12
|
FileUpload: TamanFileUploadProps<false> | TamanFileUploadProps<true>;
|
|
@@ -31,6 +31,5 @@ interface BuiltInFormComponentPropsMap {
|
|
|
31
31
|
Separator: SeparatorProps;
|
|
32
32
|
TamanFormFieldArray: TamanFormFieldArrayProps;
|
|
33
33
|
}
|
|
34
|
-
type BuiltInFormComponentType = keyof BuiltInFormComponentPropsMap;
|
|
35
|
-
//#endregion
|
|
36
|
-
export { BuiltInFormComponentPropsMap, BuiltInFormComponentType };
|
|
34
|
+
export type BuiltInFormComponentType = keyof BuiltInFormComponentPropsMap;
|
|
35
|
+
//#endregion
|
|
@@ -21,6 +21,7 @@ import PSlider from "pohon-ui/components/Slider.vue";
|
|
|
21
21
|
import PSwitch from "pohon-ui/components/Switch.vue";
|
|
22
22
|
import PTextarea from "pohon-ui/components/Textarea.vue";
|
|
23
23
|
//#region src/form/form.built-ins.ts
|
|
24
|
+
/** @keep-sorted */
|
|
24
25
|
const BUILT_IN_COMPONENT_MAP = {
|
|
25
26
|
Checkbox: PCheckbox,
|
|
26
27
|
CheckboxGroup: PCheckboxGroup,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { FormCodec } from "./form.types.js";
|
|
2
2
|
import { CalendarDateCodecOptions, CalendarDateCodecOptions as CalendarDateCodecOptions$1 } from "@vinicunca/taman-core/utils";
|
|
3
3
|
//#region src/form/form.codec.d.ts
|
|
4
|
-
type FormCodecPhase = 'decode' | 'encode';
|
|
5
|
-
declare class FormCodecError extends Error {
|
|
4
|
+
export type FormCodecPhase = 'decode' | 'encode';
|
|
5
|
+
export declare class FormCodecError extends Error {
|
|
6
6
|
readonly cause: unknown;
|
|
7
7
|
readonly phase: FormCodecPhase;
|
|
8
8
|
constructor(phase: FormCodecPhase, cause: unknown);
|
|
9
9
|
}
|
|
10
10
|
declare function createCalendarDateCodec$1(options?: CalendarDateCodecOptions): FormCodec;
|
|
11
11
|
declare function createTimeCodec$1(): FormCodec;
|
|
12
|
-
declare function createCalendarDateTimeCodec(options?: CalendarDateCodecOptions): FormCodec;
|
|
13
|
-
declare const calendarDateCodec: FormCodec;
|
|
14
|
-
declare const timeCodec: FormCodec;
|
|
15
|
-
declare const calendarDateTimeCodec: FormCodec;
|
|
12
|
+
export declare function createCalendarDateTimeCodec(options?: CalendarDateCodecOptions): FormCodec;
|
|
13
|
+
export declare const calendarDateCodec: FormCodec;
|
|
14
|
+
export declare const timeCodec: FormCodec;
|
|
15
|
+
export declare const calendarDateTimeCodec: FormCodec;
|
|
16
16
|
//#endregion
|
|
17
|
-
export { type CalendarDateCodecOptions$1 as CalendarDateCodecOptions,
|
|
17
|
+
export { type CalendarDateCodecOptions$1 as CalendarDateCodecOptions, createCalendarDateCodec$1 as createCalendarDateCodec, createTimeCodec$1 as createTimeCodec };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { TamanFormAdapterOptions } from "./form.types.js";
|
|
2
2
|
import { Component } from "vue";
|
|
3
3
|
//#region src/form/form.config.d.ts
|
|
4
|
-
declare function setupTamanForm(options: TamanFormAdapterOptions): void;
|
|
5
|
-
//#endregion
|
|
6
|
-
export { setupTamanForm };
|
|
4
|
+
export declare function setupTamanForm(options: TamanFormAdapterOptions): void;
|
|
5
|
+
//#endregion
|