prismify-ui 0.1.0-alpha.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.
Files changed (169) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/CODE_OF_CONDUCT.md +79 -0
  3. package/LICENSE +21 -0
  4. package/README.md +38 -0
  5. package/dist/components/dashboard/PfDashboardGroup/index.vue.d.ts +42 -0
  6. package/dist/components/dashboard/PfDashboardNavbar/index.vue.d.ts +57 -0
  7. package/dist/components/dashboard/PfDashboardPanel/index.vue.d.ts +47 -0
  8. package/dist/components/dashboard/PfDashboardResizeHandle/index.vue.d.ts +28 -0
  9. package/dist/components/dashboard/PfDashboardSearch/index.vue.d.ts +99 -0
  10. package/dist/components/dashboard/PfDashboardSearchButton/index.vue.d.ts +71 -0
  11. package/dist/components/dashboard/PfDashboardSidebar/index.vue.d.ts +121 -0
  12. package/dist/components/dashboard/PfDashboardSidebarCollapse/index.vue.d.ts +65 -0
  13. package/dist/components/dashboard/PfDashboardSidebarToggle/index.vue.d.ts +65 -0
  14. package/dist/components/dashboard/PfDashboardToolbar/index.vue.d.ts +32 -0
  15. package/dist/components/dashboard/shared/injection.d.ts +30 -0
  16. package/dist/components/dashboard/shared/resize.d.ts +5 -0
  17. package/dist/components/dashboard/shared/storage.d.ts +10 -0
  18. package/dist/components/data/PfAccordion/index.vue.d.ts +167 -0
  19. package/dist/components/data/PfEmpty/index.vue.d.ts +83 -0
  20. package/dist/components/data/PfMarquee/index.vue.d.ts +97 -0
  21. package/dist/components/data/PfScrollArea/index.vue.d.ts +58 -0
  22. package/dist/components/data/PfTable/index.vue.d.ts +166 -0
  23. package/dist/components/data/PfTimeline/index.vue.d.ts +105 -0
  24. package/dist/components/data/PfTree/PfTreeBranch.vue.d.ts +78 -0
  25. package/dist/components/data/PfTree/PfTreeRow.vue.d.ts +107 -0
  26. package/dist/components/data/PfTree/index.vue.d.ts +222 -0
  27. package/dist/components/data/PfTree/treeContext.d.ts +19 -0
  28. package/dist/components/data/PfTree/treeItemDisplay.d.ts +5 -0
  29. package/dist/components/data/PfTree/treeTypes.d.ts +58 -0
  30. package/dist/components/data/PfUser/index.vue.d.ts +65 -0
  31. package/dist/components/editor/PfEditor/PfEditorImageUploadNode.vue.d.ts +3 -0
  32. package/dist/components/editor/PfEditor/imageUploadExtension.d.ts +10 -0
  33. package/dist/components/editor/PfEditor/index.vue.d.ts +47 -0
  34. package/dist/components/editor/PfEditorDragHandle/index.vue.d.ts +95 -0
  35. package/dist/components/editor/PfEditorEmojiMenu/index.vue.d.ts +43 -0
  36. package/dist/components/editor/PfEditorMentionMenu/index.vue.d.ts +53 -0
  37. package/dist/components/editor/PfEditorSuggestionMenu/index.vue.d.ts +49 -0
  38. package/dist/components/editor/PfEditorToolbar/index.vue.d.ts +67 -0
  39. package/dist/components/editor/utils/handlers.d.ts +7 -0
  40. package/dist/components/editor/utils/injection.d.ts +8 -0
  41. package/dist/components/editor/utils/mapEditorItems.d.ts +7 -0
  42. package/dist/components/editor/utils/types.d.ts +98 -0
  43. package/dist/components/editor/utils/useEditorMenu.d.ts +31 -0
  44. package/dist/components/element/PfAlert/index.vue.d.ts +98 -0
  45. package/dist/components/element/PfAvatar/index.vue.d.ts +43 -0
  46. package/dist/components/element/PfAvatarGroup/index.vue.d.ts +52 -0
  47. package/dist/components/element/PfAvatarGroup/injection.d.ts +6 -0
  48. package/dist/components/element/PfBadge/index.vue.d.ts +64 -0
  49. package/dist/components/element/PfBanner/index.vue.d.ts +67 -0
  50. package/dist/components/element/PfButton/index.vue.d.ts +108 -0
  51. package/dist/components/element/PfCard/index.vue.d.ts +34 -0
  52. package/dist/components/element/PfChip/index.vue.d.ts +49 -0
  53. package/dist/components/element/PfCollapsible/index.vue.d.ts +82 -0
  54. package/dist/components/element/PfContentSearchButton/index.vue.d.ts +75 -0
  55. package/dist/components/element/PfFieldGroup/index.vue.d.ts +48 -0
  56. package/dist/components/element/PfFieldGroup/injection.d.ts +6 -0
  57. package/dist/components/element/PfIcon/iconSizes.d.ts +3 -0
  58. package/dist/components/element/PfIcon/index.vue.d.ts +10 -0
  59. package/dist/components/element/PfIcon/paths.d.ts +14 -0
  60. package/dist/components/element/PfKbd/index.vue.d.ts +36 -0
  61. package/dist/components/element/PfProgress/index.vue.d.ts +69 -0
  62. package/dist/components/element/PfSeparator/index.vue.d.ts +58 -0
  63. package/dist/components/element/PfSkeleton/index.vue.d.ts +31 -0
  64. package/dist/components/form/PfCalendar/calendarGrid.d.ts +12 -0
  65. package/dist/components/form/PfCalendar/calendarSelection.d.ts +30 -0
  66. package/dist/components/form/PfCalendar/index.vue.d.ts +137 -0
  67. package/dist/components/form/PfCheckbox/index.vue.d.ts +84 -0
  68. package/dist/components/form/PfCheckboxGroup/index.vue.d.ts +82 -0
  69. package/dist/components/form/PfColorPicker/colorPicker.d.ts +46 -0
  70. package/dist/components/form/PfColorPicker/index.vue.d.ts +54 -0
  71. package/dist/components/form/PfFileUpload/index.vue.d.ts +258 -0
  72. package/dist/components/form/PfForm/index.vue.d.ts +75 -0
  73. package/dist/components/form/PfForm/injection.d.ts +32 -0
  74. package/dist/components/form/PfForm/validation.d.ts +9 -0
  75. package/dist/components/form/PfFormField/index.vue.d.ts +59 -0
  76. package/dist/components/form/PfInput/index.vue.d.ts +97 -0
  77. package/dist/components/form/PfInputDate/index.vue.d.ts +109 -0
  78. package/dist/components/form/PfInputDate/inputDateSegments.d.ts +36 -0
  79. package/dist/components/form/PfInputMenu/index.vue.d.ts +1410 -0
  80. package/dist/components/form/PfInputNumber/index.vue.d.ts +498 -0
  81. package/dist/components/form/PfInputTags/index.vue.d.ts +482 -0
  82. package/dist/components/form/PfInputTime/index.vue.d.ts +108 -0
  83. package/dist/components/form/PfInputTime/inputTimeSegments.d.ts +36 -0
  84. package/dist/components/form/PfPinInput/index.vue.d.ts +56 -0
  85. package/dist/components/form/PfRadio/index.vue.d.ts +76 -0
  86. package/dist/components/form/PfRadioGroup/index.vue.d.ts +74 -0
  87. package/dist/components/form/PfSelect/index.vue.d.ts +209 -0
  88. package/dist/components/form/PfSelectMenu/index.vue.d.ts +1034 -0
  89. package/dist/components/form/PfSlider/index.vue.d.ts +54 -0
  90. package/dist/components/form/PfSwitch/index.vue.d.ts +83 -0
  91. package/dist/components/form/PfTextarea/index.vue.d.ts +111 -0
  92. package/dist/components/form/groupItems.d.ts +36 -0
  93. package/dist/components/layout/PfApp/index.vue.d.ts +45 -0
  94. package/dist/components/layout/PfApp/injection.d.ts +43 -0
  95. package/dist/components/layout/PfContainer/index.vue.d.ts +27 -0
  96. package/dist/components/layout/PfError/index.vue.d.ts +113 -0
  97. package/dist/components/layout/PfFooter/index.vue.d.ts +38 -0
  98. package/dist/components/layout/PfHeader/index.vue.d.ts +132 -0
  99. package/dist/components/layout/PfMain/index.vue.d.ts +27 -0
  100. package/dist/components/navigation/PfBreadcrumb/index.vue.d.ts +156 -0
  101. package/dist/components/navigation/PfContentNavigation/index.vue.d.ts +196 -0
  102. package/dist/components/navigation/PfContentSurround/index.vue.d.ts +86 -0
  103. package/dist/components/navigation/PfContentToc/index.vue.d.ts +165 -0
  104. package/dist/components/navigation/PfFooterColumns/index.vue.d.ts +145 -0
  105. package/dist/components/navigation/PfLink/index.vue.d.ts +80 -0
  106. package/dist/components/navigation/PfNavigationMenu/index.vue.d.ts +187 -0
  107. package/dist/components/navigation/PfPagination/index.vue.d.ts +103 -0
  108. package/dist/components/navigation/PfStepper/index.vue.d.ts +107 -0
  109. package/dist/components/navigation/PfTabs/index.vue.d.ts +131 -0
  110. package/dist/components/overlay/PfContentSearch/index.vue.d.ts +181 -0
  111. package/dist/components/overlay/PfContextMenu/PfContextMenuItems.vue.d.ts +10 -0
  112. package/dist/components/overlay/PfContextMenu/index.vue.d.ts +57 -0
  113. package/dist/components/overlay/PfContextMenu/types.d.ts +40 -0
  114. package/dist/components/overlay/PfDrawer/index.vue.d.ts +106 -0
  115. package/dist/components/overlay/PfDropdownMenu/PfDropdownMenuItems.vue.d.ts +10 -0
  116. package/dist/components/overlay/PfDropdownMenu/index.vue.d.ts +74 -0
  117. package/dist/components/overlay/PfDropdownMenu/types.d.ts +58 -0
  118. package/dist/components/overlay/PfModal/index.vue.d.ts +138 -0
  119. package/dist/components/overlay/PfToast/index.vue.d.ts +128 -0
  120. package/dist/components/overlay/PfToaster/index.vue.d.ts +11 -0
  121. package/dist/components/overlay/PfTooltip/index.vue.d.ts +85 -0
  122. package/dist/composables/pfScrollAreaVirtual.d.ts +21 -0
  123. package/dist/composables/usePfApp.d.ts +7 -0
  124. package/dist/composables/usePfContentSearch.d.ts +11 -0
  125. package/dist/composables/usePfKbd.d.ts +14 -0
  126. package/dist/composables/usePfToast.d.ts +137 -0
  127. package/dist/composables/usePfVModelBound.d.ts +5 -0
  128. package/dist/index.d.ts +184 -0
  129. package/dist/prismify-ui.cjs +3 -0
  130. package/dist/prismify-ui.cjs.map +1 -0
  131. package/dist/prismify-ui.js +26967 -0
  132. package/dist/prismify-ui.js.map +1 -0
  133. package/dist/style.css +1 -0
  134. package/dist/utils/editor.d.ts +2 -0
  135. package/dist/utils/pfLinkQuery.d.ts +8 -0
  136. package/docs/README.md +17 -0
  137. package/docs/installation.md +120 -0
  138. package/docs/library-development.md +57 -0
  139. package/docs/theming.md +334 -0
  140. package/llms.txt +220 -0
  141. package/package.json +146 -0
  142. package/src/styles/_variables.scss +25 -0
  143. package/src/styles/index.scss +1 -0
  144. package/src/styles/mixins/_input-tag-pill.scss +72 -0
  145. package/src/styles/variables/_accordion.scss +15 -0
  146. package/src/styles/variables/_animation.scss +25 -0
  147. package/src/styles/variables/_breadcrumb.scss +11 -0
  148. package/src/styles/variables/_colors.scss +37 -0
  149. package/src/styles/variables/_contextMenu.scss +31 -0
  150. package/src/styles/variables/_dashboard.scss +8 -0
  151. package/src/styles/variables/_drawer.scss +34 -0
  152. package/src/styles/variables/_editor.scss +34 -0
  153. package/src/styles/variables/_effects.scss +6 -0
  154. package/src/styles/variables/_empty.scss +12 -0
  155. package/src/styles/variables/_fileUpload.scss +21 -0
  156. package/src/styles/variables/_footerColumns.scss +17 -0
  157. package/src/styles/variables/_layout.scss +294 -0
  158. package/src/styles/variables/_link.scss +8 -0
  159. package/src/styles/variables/_marquee.scss +6 -0
  160. package/src/styles/variables/_modal.scss +26 -0
  161. package/src/styles/variables/_navigationMenu.scss +46 -0
  162. package/src/styles/variables/_stepper.scss +15 -0
  163. package/src/styles/variables/_table.scss +29 -0
  164. package/src/styles/variables/_tabs.scss +18 -0
  165. package/src/styles/variables/_timeline.scss +11 -0
  166. package/src/styles/variables/_toast.scss +14 -0
  167. package/src/styles/variables/_tooltip.scss +16 -0
  168. package/src/styles/variables/_tree.scss +29 -0
  169. package/src/styles/variables/_typography.scss +19 -0
@@ -0,0 +1,258 @@
1
+ import { PfIconName } from '../../element/PfIcon/paths';
2
+ export type PfFileUploadColor = 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
3
+ export type PfFileUploadUi = Partial<{
4
+ root: string;
5
+ base: string;
6
+ wrapper: string;
7
+ icon: string;
8
+ avatar: string;
9
+ label: string;
10
+ description: string;
11
+ actions: string;
12
+ files: string;
13
+ file: string;
14
+ fileLeadingAvatar: string;
15
+ fileWrapper: string;
16
+ fileName: string;
17
+ fileSize: string;
18
+ fileTrailingButton: string;
19
+ }>;
20
+ export type PfFileUploadFileDeleteConfig = {
21
+ color?: PfFileUploadColor;
22
+ variant?: 'solid' | 'outline' | 'soft' | 'subtle' | 'ghost' | 'link';
23
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
24
+ iconOnly?: boolean;
25
+ };
26
+ export type PfFileUploadInvalidCode = 'accept' | 'maxSize';
27
+ export type PfFileUploadInvalidPayload = {
28
+ code: PfFileUploadInvalidCode;
29
+ file: File;
30
+ message: string;
31
+ };
32
+ type __VLS_Props = {
33
+ as?: string | Record<string, unknown>;
34
+ id?: string;
35
+ name?: string;
36
+ label?: string;
37
+ description?: string;
38
+ color?: PfFileUploadColor;
39
+ /** `button` only when `multiple === false`. */
40
+ variant?: 'button' | 'area';
41
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
42
+ /** Only when `variant="area"`. */
43
+ layout?: 'list' | 'grid';
44
+ /** Only when `variant="area"` and `layout="list"`. */
45
+ position?: 'inside' | 'outside';
46
+ highlight?: boolean;
47
+ /** Max file size in kibibytes (KiB, 1 KiB = 1024 bytes). */
48
+ maxSize?: number;
49
+ /** External error text (overrides internal). */
50
+ error?: string;
51
+ /** Custom wrong-type error template: `{name}`, `{accept}` available. */
52
+ acceptErrorText?: string;
53
+ /** Custom max-size error template: `{name}`, `{max}` (human-readable limit). */
54
+ maxSizeErrorText?: string;
55
+ accept?: string;
56
+ multiple?: boolean;
57
+ /** Reset `<input>` value before opening the dialog (same file again). */
58
+ reset?: boolean;
59
+ dropzone?: boolean;
60
+ interactive?: boolean;
61
+ required?: boolean;
62
+ disabled?: boolean;
63
+ /** Zone (area) / button icon. */
64
+ icon?: PfIconName;
65
+ /** Icon in file row (list) or when preview is off. */
66
+ fileIcon?: PfIconName;
67
+ /** Show `<img>` for images in preview. */
68
+ fileImage?: boolean;
69
+ /** `false` — hide the component file list/grid. */
70
+ preview?: boolean;
71
+ /** File delete: `true` / `false` or `PfButton` settings. */
72
+ fileDelete?: boolean | PfFileUploadFileDeleteConfig;
73
+ fileDeleteIcon?: PfIconName;
74
+ modelValue?: File | File[] | null;
75
+ defaultValue?: File | File[] | null;
76
+ ui?: PfFileUploadUi;
77
+ form?: string;
78
+ formaction?: string;
79
+ formenctype?: string;
80
+ formmethod?: string;
81
+ formnovalidate?: boolean;
82
+ formtarget?: string;
83
+ };
84
+ declare function open(): void;
85
+ declare function removeFile(file?: File): void;
86
+ declare function __VLS_template(): {
87
+ attrs: Partial<{}>;
88
+ slots: {
89
+ default?(_: {
90
+ open: typeof open;
91
+ removeFile: typeof removeFile;
92
+ files: File[];
93
+ }): any;
94
+ actions?(_: {
95
+ open: typeof open;
96
+ }): any;
97
+ actions?(_: {
98
+ open: typeof open;
99
+ }): any;
100
+ leading?(_: {}): any;
101
+ leading?(_: {}): any;
102
+ file?(_: {
103
+ file: File;
104
+ index: number;
105
+ removeFile: typeof removeFile;
106
+ }): any;
107
+ file?(_: {
108
+ file: File;
109
+ index: number;
110
+ removeFile: typeof removeFile;
111
+ }): any;
112
+ file?(_: {
113
+ file: File;
114
+ index: number;
115
+ removeFile: typeof removeFile;
116
+ }): any;
117
+ file?(_: {
118
+ file: File;
119
+ index: number;
120
+ removeFile: typeof removeFile;
121
+ }): any;
122
+ file?(_: {
123
+ file: File;
124
+ index: number;
125
+ removeFile: typeof removeFile;
126
+ }): any;
127
+ 'file-leading'?(_: {
128
+ file: File;
129
+ }): any;
130
+ 'file-leading'?(_: {
131
+ file: File;
132
+ }): any;
133
+ 'file-leading'?(_: {
134
+ file: File;
135
+ }): any;
136
+ 'file-leading'?(_: {
137
+ file: File;
138
+ }): any;
139
+ 'file-leading'?(_: {
140
+ file: File;
141
+ }): any;
142
+ 'file-name'?(_: {
143
+ file: File;
144
+ }): any;
145
+ 'file-name'?(_: {
146
+ file: File;
147
+ }): any;
148
+ 'file-name'?(_: {
149
+ file: File;
150
+ }): any;
151
+ 'file-size'?(_: {
152
+ file: File;
153
+ }): any;
154
+ 'file-size'?(_: {
155
+ file: File;
156
+ }): any;
157
+ 'file-size'?(_: {
158
+ file: File;
159
+ }): any;
160
+ 'file-trailing'?(_: {
161
+ file: File;
162
+ removeFile: typeof removeFile;
163
+ }): any;
164
+ 'file-trailing'?(_: {
165
+ file: File;
166
+ removeFile: typeof removeFile;
167
+ }): any;
168
+ 'file-trailing'?(_: {
169
+ file: File;
170
+ removeFile: typeof removeFile;
171
+ }): any;
172
+ 'file-trailing'?(_: {
173
+ file: File;
174
+ removeFile: typeof removeFile;
175
+ }): any;
176
+ 'file-trailing'?(_: {
177
+ file: File;
178
+ removeFile: typeof removeFile;
179
+ }): any;
180
+ 'files-top'?(_: {
181
+ open: typeof open;
182
+ files: File[];
183
+ }): any;
184
+ files?(_: {
185
+ files: File[];
186
+ open: typeof open;
187
+ removeFile: typeof removeFile;
188
+ }): any;
189
+ files?(_: {
190
+ files: File[];
191
+ open: typeof open;
192
+ removeFile: typeof removeFile;
193
+ }): any;
194
+ files?(_: {
195
+ files: File[];
196
+ open: typeof open;
197
+ removeFile: typeof removeFile;
198
+ }): any;
199
+ files?(_: {
200
+ files: File[];
201
+ open: typeof open;
202
+ removeFile: typeof removeFile;
203
+ }): any;
204
+ label?(_: {}): any;
205
+ description?(_: {}): any;
206
+ 'files-bottom'?(_: {
207
+ open: typeof open;
208
+ removeFile: typeof removeFile;
209
+ files: File[];
210
+ }): any;
211
+ };
212
+ refs: {
213
+ dropzoneRef: unknown;
214
+ inputRef: HTMLInputElement;
215
+ };
216
+ rootEl: any;
217
+ };
218
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
219
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
220
+ inputRef: import('vue').Ref<HTMLInputElement | null, HTMLInputElement | null>;
221
+ dropzoneRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
222
+ open: typeof open;
223
+ removeFile: typeof removeFile;
224
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
225
+ change: (event: Event) => any;
226
+ invalid: (payload: PfFileUploadInvalidPayload) => any;
227
+ "update:modelValue": (value: File | File[] | null) => any;
228
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
229
+ onChange?: ((event: Event) => any) | undefined;
230
+ onInvalid?: ((payload: PfFileUploadInvalidPayload) => any) | undefined;
231
+ "onUpdate:modelValue"?: ((value: File | File[] | null) => any) | undefined;
232
+ }>, {
233
+ fileDelete: boolean | PfFileUploadFileDeleteConfig;
234
+ interactive: boolean;
235
+ size: "xs" | "sm" | "md" | "lg" | "xl";
236
+ color: PfFileUploadColor;
237
+ reset: boolean;
238
+ variant: "button" | "area";
239
+ position: "inside" | "outside";
240
+ multiple: boolean;
241
+ highlight: boolean;
242
+ layout: "list" | "grid";
243
+ accept: string;
244
+ dropzone: boolean;
245
+ fileImage: boolean;
246
+ preview: boolean;
247
+ fileDeleteIcon: PfIconName;
248
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
249
+ dropzoneRef: unknown;
250
+ inputRef: HTMLInputElement;
251
+ }, any>;
252
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
253
+ export default _default;
254
+ type __VLS_WithTemplateSlots<T, S> = T & {
255
+ new (): {
256
+ $slots: S;
257
+ };
258
+ };
@@ -0,0 +1,75 @@
1
+ import { PfFormError, PfFormInputEvent, PfFormValidateOptions } from './injection';
2
+ export type PfFormSubmitEvent<T = unknown> = {
3
+ data: T;
4
+ };
5
+ export type PfFormErrorEvent = {
6
+ errors: PfFormError[];
7
+ };
8
+ export type PfFormUi = Partial<{
9
+ base: string;
10
+ }>;
11
+ type __VLS_Props = {
12
+ id?: string | number;
13
+ schema?: unknown;
14
+ state?: Record<string, unknown>;
15
+ validate?: ((state: Record<string, unknown>) => PfFormError[] | Promise<PfFormError[]>) | undefined;
16
+ validateOn?: PfFormInputEvent[];
17
+ disabled?: boolean;
18
+ name?: string;
19
+ validateOnInputDelay?: number;
20
+ transform?: boolean;
21
+ nested?: boolean;
22
+ loadingAuto?: boolean;
23
+ ui?: PfFormUi;
24
+ };
25
+ declare function setErrors(nextErrors: PfFormError[], path?: string | RegExp): void;
26
+ declare function clear(path?: string | RegExp): void;
27
+ declare function getErrors(path?: string | RegExp): PfFormError[];
28
+ declare function runValidation(opts?: PfFormValidateOptions): Promise<unknown>;
29
+ declare function submit(): Promise<void>;
30
+ declare function __VLS_template(): {
31
+ attrs: Partial<{}>;
32
+ slots: {
33
+ default?(_: {}): any;
34
+ };
35
+ refs: {
36
+ rootRef: unknown;
37
+ };
38
+ rootEl: any;
39
+ };
40
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
41
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
42
+ submit: typeof submit;
43
+ validate: typeof runValidation;
44
+ clear: typeof clear;
45
+ getErrors: typeof getErrors;
46
+ setErrors: typeof setErrors;
47
+ errors: Readonly<import('vue').Ref<readonly PfFormError<string>[], readonly PfFormError<string>[]>>;
48
+ disabled: Readonly<import('vue').Ref<boolean, boolean>>;
49
+ dirty: import('vue').ComputedRef<boolean>;
50
+ dirtyFields: Readonly<import('vue').Ref<ReadonlySet<string>, ReadonlySet<string>>>;
51
+ touchedFields: Readonly<import('vue').Ref<ReadonlySet<string>, ReadonlySet<string>>>;
52
+ blurredFields: Readonly<import('vue').Ref<ReadonlySet<string>, ReadonlySet<string>>>;
53
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
54
+ error: (event: PfFormErrorEvent) => any;
55
+ submit: (event: PfFormSubmitEvent<unknown>) => any;
56
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
57
+ onError?: ((event: PfFormErrorEvent) => any) | undefined;
58
+ onSubmit?: ((event: PfFormSubmitEvent<unknown>) => any) | undefined;
59
+ }>, {
60
+ transform: boolean;
61
+ disabled: boolean;
62
+ loadingAuto: boolean;
63
+ validateOn: PfFormInputEvent[];
64
+ validateOnInputDelay: number;
65
+ nested: boolean;
66
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
67
+ rootRef: unknown;
68
+ }, any>;
69
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
70
+ export default _default;
71
+ type __VLS_WithTemplateSlots<T, S> = T & {
72
+ new (): {
73
+ $slots: S;
74
+ };
75
+ };
@@ -0,0 +1,32 @@
1
+ import { Ref, InjectionKey } from 'vue';
2
+ export type PfFormInputEvent = 'input' | 'change' | 'blur';
3
+ export type PfFormError<TName extends string = string> = {
4
+ id?: string;
5
+ name: TName;
6
+ message: string;
7
+ };
8
+ export type PfFormValidateOptions = {
9
+ name?: string | string[];
10
+ silent?: boolean;
11
+ nested?: boolean;
12
+ transform?: boolean;
13
+ };
14
+ export type PfFormContextValue = {
15
+ pathPrefix: string;
16
+ state: Readonly<Ref<unknown>>;
17
+ errors: Ref<PfFormError[]>;
18
+ disabled: Ref<boolean>;
19
+ getError: (name?: string, pattern?: RegExp) => PfFormError | undefined;
20
+ clear: (path?: string | RegExp) => void;
21
+ markFieldInteraction: (name: string, event: PfFormInputEvent) => void;
22
+ validate: (opts?: PfFormValidateOptions) => Promise<unknown>;
23
+ registerNested: (entry: {
24
+ validate: (opts?: PfFormValidateOptions) => Promise<unknown>;
25
+ clear: (path?: string | RegExp) => void;
26
+ }) => void;
27
+ unregisterNested: (entry: {
28
+ validate: (opts?: PfFormValidateOptions) => Promise<unknown>;
29
+ clear: (path?: string | RegExp) => void;
30
+ }) => void;
31
+ };
32
+ export declare const PF_FORM_INJECTION_KEY: InjectionKey<PfFormContextValue>;
@@ -0,0 +1,9 @@
1
+ import { PfFormError } from './injection';
2
+ type ValidationResult = {
3
+ data: unknown;
4
+ errors: PfFormError[];
5
+ };
6
+ export declare function filterErrorsByName(errors: PfFormError[], name?: string | string[]): PfFormError[];
7
+ export declare function runSchemaValidation(schema: unknown, data: unknown): Promise<ValidationResult>;
8
+ export declare function runCustomValidation(validate: ((state: Record<string, unknown>) => PfFormError[] | Promise<PfFormError[]>) | undefined, data: Record<string, unknown>): Promise<PfFormError[]>;
9
+ export {};
@@ -0,0 +1,59 @@
1
+ import { Component } from 'vue';
2
+ export type PfFormFieldSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
3
+ export type PfFormFieldOrientation = 'vertical' | 'horizontal';
4
+ export type PfFormFieldUi = Partial<{
5
+ root: string;
6
+ wrapper: string;
7
+ labelWrapper: string;
8
+ label: string;
9
+ container: string;
10
+ description: string;
11
+ error: string;
12
+ hint: string;
13
+ help: string;
14
+ }>;
15
+ type __VLS_Props = {
16
+ as?: string | Component;
17
+ name?: string;
18
+ errorPattern?: RegExp;
19
+ label?: string;
20
+ description?: string;
21
+ help?: string;
22
+ error?: string | boolean;
23
+ hint?: string;
24
+ size?: PfFormFieldSize;
25
+ required?: boolean;
26
+ eagerValidation?: boolean;
27
+ validateOnInputDelay?: number;
28
+ orientation?: PfFormFieldOrientation;
29
+ ui?: PfFormFieldUi;
30
+ };
31
+ declare function __VLS_template(): {
32
+ attrs: Partial<{}>;
33
+ slots: {
34
+ label?(_: {}): any;
35
+ hint?(_: {}): any;
36
+ description?(_: {}): any;
37
+ error?(_: {}): any;
38
+ help?(_: {}): any;
39
+ };
40
+ refs: {};
41
+ rootEl: any;
42
+ };
43
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
44
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
45
+ size: PfFormFieldSize;
46
+ required: boolean;
47
+ error: string | boolean;
48
+ as: string | Component;
49
+ orientation: PfFormFieldOrientation;
50
+ validateOnInputDelay: number;
51
+ eagerValidation: boolean;
52
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
53
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
54
+ export default _default;
55
+ type __VLS_WithTemplateSlots<T, S> = T & {
56
+ new (): {
57
+ $slots: S;
58
+ };
59
+ };
@@ -0,0 +1,97 @@
1
+ import { PfButtonAvatarProps } from '../../element/PfButton/index.vue';
2
+ import { PfIconName } from '../../element/PfIcon/paths';
3
+ export type PfInputColor = 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
4
+ export type PfInputVariant = 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
5
+ export type PfInputUi = Partial<{
6
+ root: string;
7
+ base: string;
8
+ valueCell: string;
9
+ leading: string;
10
+ leadingIcon: string;
11
+ leadingAvatar: string;
12
+ trailing: string;
13
+ trailingIcon: string;
14
+ }>;
15
+ type __VLS_Props = {
16
+ id?: string;
17
+ name?: string;
18
+ type?: string;
19
+ placeholder?: string;
20
+ color?: PfInputColor;
21
+ variant?: PfInputVariant;
22
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
23
+ required?: boolean;
24
+ autocomplete?: string;
25
+ autofocus?: boolean;
26
+ disabled?: boolean;
27
+ readonly?: boolean;
28
+ highlight?: boolean;
29
+ /** If `false`, font size steps down slightly on wide viewports (Nuxt UI `fixed: false` style). */
30
+ fixed?: boolean;
31
+ /** Smooth character appear and “drop” on delete (text types only). On by default. */
32
+ animatedText?: boolean;
33
+ ui?: PfInputUi;
34
+ icon?: PfIconName;
35
+ avatar?: PfButtonAvatarProps;
36
+ leading?: boolean;
37
+ leadingIcon?: PfIconName;
38
+ trailing?: boolean;
39
+ trailingIcon?: PfIconName;
40
+ loading?: boolean;
41
+ loadingIcon?: PfIconName;
42
+ maxlength?: number;
43
+ minlength?: number;
44
+ pattern?: string;
45
+ list?: string;
46
+ form?: string;
47
+ enterKeyHint?: 'search' | 'enter' | 'done' | 'go' | 'next' | 'previous' | 'send';
48
+ };
49
+ type __VLS_PublicProps = {
50
+ modelValue?: string;
51
+ } & __VLS_Props;
52
+ declare function __VLS_template(): {
53
+ attrs: Partial<{}>;
54
+ slots: {
55
+ leading?(_: {}): any;
56
+ default?(_: {}): any;
57
+ trailing?(_: {}): any;
58
+ };
59
+ refs: {
60
+ valueCellRef: HTMLDivElement;
61
+ inputRef: HTMLInputElement;
62
+ };
63
+ rootEl: any;
64
+ };
65
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
66
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {
67
+ inputRef: import('vue').Ref<HTMLInputElement | null, HTMLInputElement | null>;
68
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
69
+ blur: (event: FocusEvent) => any;
70
+ change: (event: Event) => any;
71
+ "update:modelValue": (value: string) => any;
72
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
73
+ onBlur?: ((event: FocusEvent) => any) | undefined;
74
+ onChange?: ((event: Event) => any) | undefined;
75
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
76
+ }>, {
77
+ fixed: boolean;
78
+ type: string;
79
+ loading: boolean;
80
+ color: PfInputColor;
81
+ variant: PfInputVariant;
82
+ disabled: boolean;
83
+ readonly: boolean;
84
+ autocomplete: string;
85
+ highlight: boolean;
86
+ animatedText: boolean;
87
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
88
+ valueCellRef: HTMLDivElement;
89
+ inputRef: HTMLInputElement;
90
+ }, any>;
91
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
92
+ export default _default;
93
+ type __VLS_WithTemplateSlots<T, S> = T & {
94
+ new (): {
95
+ $slots: S;
96
+ };
97
+ };
@@ -0,0 +1,109 @@
1
+ import { Component } from 'vue';
2
+ import { DateValue } from '@internationalized/date';
3
+ import { PfButtonAvatarProps } from '../../element/PfButton/index.vue';
4
+ import { PfIconName } from '../../element/PfIcon/paths';
5
+ import { PfCalendarDateRange, PfCalendarMatcher } from '../PfCalendar/calendarSelection';
6
+ import { PfInputDateGranularity, PfInputDateHourCycle } from './inputDateSegments';
7
+ export type PfInputDateColor = 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral';
8
+ export type PfInputDateVariant = 'outline' | 'soft' | 'subtle' | 'ghost' | 'none';
9
+ export type PfInputDateUi = Partial<{
10
+ root: string;
11
+ base: string;
12
+ leading: string;
13
+ leadingIcon: string;
14
+ leadingAvatar: string;
15
+ trailing: string;
16
+ trailingIcon: string;
17
+ segment: string;
18
+ separatorIcon: string;
19
+ }>;
20
+ export type PfInputDateModel = DateValue | null | PfCalendarDateRange;
21
+ type __VLS_Props = {
22
+ as?: string | Component;
23
+ id?: string;
24
+ name?: string;
25
+ color?: PfInputDateColor;
26
+ variant?: PfInputDateVariant;
27
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
28
+ highlight?: boolean;
29
+ fixed?: boolean;
30
+ autofocus?: boolean;
31
+ autofocusDelay?: number;
32
+ range?: boolean;
33
+ locale?: string;
34
+ disabled?: boolean;
35
+ readonly?: boolean;
36
+ required?: boolean;
37
+ minValue?: DateValue | null;
38
+ maxValue?: DateValue | null;
39
+ isDateUnavailable?: PfCalendarMatcher;
40
+ defaultValue?: PfInputDateModel | null;
41
+ placeholder?: DateValue | null;
42
+ defaultPlaceholder?: DateValue | null;
43
+ granularity?: PfInputDateGranularity;
44
+ hourCycle?: PfInputDateHourCycle;
45
+ hideTimeZone?: boolean;
46
+ step?: number;
47
+ icon?: PfIconName;
48
+ avatar?: PfButtonAvatarProps;
49
+ leading?: boolean;
50
+ leadingIcon?: PfIconName;
51
+ trailing?: boolean;
52
+ trailingIcon?: PfIconName;
53
+ loading?: boolean;
54
+ loadingIcon?: PfIconName;
55
+ separatorIcon?: PfIconName;
56
+ ui?: PfInputDateUi;
57
+ };
58
+ type __VLS_PublicProps = {
59
+ modelValue?: PfInputDateModel | null;
60
+ } & __VLS_Props;
61
+ declare function __VLS_template(): {
62
+ attrs: Partial<{}>;
63
+ slots: {
64
+ leading?(_: {}): any;
65
+ separator?(_: {}): any;
66
+ trailing?(_: {}): any;
67
+ };
68
+ refs: {};
69
+ rootEl: any;
70
+ };
71
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
72
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {
73
+ inputsRef: import('vue').Ref<(HTMLInputElement | null)[], (HTMLInputElement | null)[]>;
74
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
75
+ blur: (event: FocusEvent) => any;
76
+ change: (event: Event) => any;
77
+ focus: (event: FocusEvent) => any;
78
+ "update:modelValue": (...args: unknown[]) => any;
79
+ "update:placeholder": (value: DateValue) => any;
80
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
81
+ onBlur?: ((event: FocusEvent) => any) | undefined;
82
+ onChange?: ((event: Event) => any) | undefined;
83
+ onFocus?: ((event: FocusEvent) => any) | undefined;
84
+ "onUpdate:modelValue"?: ((...args: unknown[]) => any) | undefined;
85
+ "onUpdate:placeholder"?: ((value: DateValue) => any) | undefined;
86
+ }>, {
87
+ fixed: boolean;
88
+ required: boolean;
89
+ as: string | Component;
90
+ loading: boolean;
91
+ color: PfInputDateColor;
92
+ variant: PfInputDateVariant;
93
+ disabled: boolean;
94
+ step: number;
95
+ range: boolean;
96
+ readonly: boolean;
97
+ autofocus: boolean;
98
+ highlight: boolean;
99
+ autofocusDelay: number;
100
+ hideTimeZone: boolean;
101
+ separatorIcon: PfIconName;
102
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
103
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
104
+ export default _default;
105
+ type __VLS_WithTemplateSlots<T, S> = T & {
106
+ new (): {
107
+ $slots: S;
108
+ };
109
+ };
@@ -0,0 +1,36 @@
1
+ import { DateValue, CalendarDate, DateFormatter, ZonedDateTime } from '@internationalized/date';
2
+ export type PfInputDateGranularity = 'day' | 'hour' | 'minute' | 'second';
3
+ export type PfInputDateHourCycle = 'h11' | 'h12' | 'h23' | 'h24';
4
+ export type PfInputDateLayoutToken = {
5
+ kind: 'literal';
6
+ text: string;
7
+ } | {
8
+ kind: 'field';
9
+ partType: Intl.DateTimeFormatPart['type'];
10
+ key: string;
11
+ };
12
+ export declare function buildIntlDateOptions(granularity: PfInputDateGranularity, hourCycle: PfInputDateHourCycle | undefined, hideTimeZone: boolean): Intl.DateTimeFormatOptions;
13
+ export declare function inferGranularity(value: DateValue | null | undefined, explicit: PfInputDateGranularity | undefined): PfInputDateGranularity;
14
+ export declare function dateValueToJsDate(value: DateValue, timeZone: string): Date;
15
+ export declare function layoutAndTextsFromDate(formatter: DateFormatter, jsDate: Date): {
16
+ layout: PfInputDateLayoutToken[];
17
+ texts: Record<string, string>;
18
+ };
19
+ export type ComposeResult = {
20
+ value: DateValue | null;
21
+ /** All editable fields filled (digits); value may still be invalid for the calendar. */
22
+ segmentsComplete: boolean;
23
+ /** Value assembled and passed constrain. */
24
+ valid: boolean;
25
+ };
26
+ export declare function tryComposeFromTexts(layout: PfInputDateLayoutToken[], texts: Record<string, string>, granularity: PfInputDateGranularity, timeZone: string, priorZoned: ZonedDateTime | null): ComposeResult;
27
+ export declare function toComparableCalendarDate(v: DateValue | null): CalendarDate | null;
28
+ export declare function withSameTimeZone(next: DateValue, previous: DateValue | null): DateValue;
29
+ /**
30
+ * Shifts one date/time field (up/down arrows). Day/month/year — via `add`, not cycling within the month.
31
+ */
32
+ export declare function nudgeDateSegment(base: DateValue, partType: string, direction: 1 | -1, options: {
33
+ granularity: PfInputDateGranularity;
34
+ step: number;
35
+ }): DateValue | null;
36
+ export declare function finalizeNudgedValue(next: DateValue, original: DateValue, granularity: PfInputDateGranularity): DateValue;