@contentstudio/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/dist/index.d.ts CHANGED
@@ -1,187 +1,24 @@
1
+ import { default as Alert } from './Alert.vue';
2
+ import { default as Badge } from './components/Badge/Badge.vue';
3
+ import { default as Button } from './components/Button/Button.vue';
4
+ import { default as Checkbox } from './components/Checkbox/Checkbox.vue';
5
+ import { default as Chip } from './Chip.vue';
6
+ import { default as Collapse } from './Collapse.vue';
1
7
  import { Component } from 'vue';
2
- import { ComponentOptionsMixin } from 'vue';
3
- import { ComponentProvideOptions } from 'vue';
4
- import { DefineComponent } from 'vue';
5
- import { PublicProps } from 'vue';
6
-
7
- declare const __VLS_component: DefineComponent<ButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
8
- click: (event: MouseEvent) => any;
9
- }, string, PublicProps, Readonly<ButtonProps> & Readonly<{
10
- onClick?: ((event: MouseEvent) => any) | undefined;
11
- }>, {
12
- color: ThemeColor;
13
- size: ComponentSize;
14
- radius: ComponentRadius;
15
- disabled: boolean;
16
- variant: ButtonVariant;
17
- loading: boolean;
18
- fullWidth: boolean;
19
- type: "button" | "submit" | "reset";
20
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
21
-
22
- declare const __VLS_component_2: DefineComponent<BadgeProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<BadgeProps> & Readonly<{}>, {
23
- color: ThemeColor;
24
- size: ComponentSize;
25
- radius: ComponentRadius;
26
- variant: BadgeVariant;
27
- fullWidth: boolean;
28
- circle: boolean;
29
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
30
-
31
- declare const __VLS_component_3: DefineComponent<SelectProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
32
- "update:modelValue": (value: string | null) => any;
33
- change: (option: SelectOption | null) => any;
34
- }, string, PublicProps, Readonly<SelectProps> & Readonly<{
35
- "onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
36
- onChange?: ((option: SelectOption | null) => any) | undefined;
37
- }>, {
38
- color: "primary" | "secondary" | "success" | "warning" | "danger" | "info" | "dark" | "light";
39
- size: "xs" | "sm" | "md" | "lg" | "xl";
40
- radius: "xs" | "sm" | "md" | "lg" | "xl" | "none";
41
- disabled: boolean;
42
- variant: "filled" | "outline";
43
- loading: boolean;
44
- modelValue: string | null;
45
- error: boolean;
46
- placeholder: string;
47
- options: SelectOption[];
48
- searchable: boolean;
49
- clearable: boolean;
50
- withCheckIcon: boolean;
51
- checkIconPosition: "left" | "right";
52
- nothingFoundMessage: string;
53
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
54
-
55
- declare const __VLS_component_4: DefineComponent<RadioProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
56
- "update:modelValue": (value: any) => any;
57
- change: (value: any) => any;
58
- }, string, PublicProps, Readonly<RadioProps> & Readonly<{
59
- "onUpdate:modelValue"?: ((value: any) => any) | undefined;
60
- onChange?: ((value: any) => any) | undefined;
61
- }>, {
62
- color: ThemeColor;
63
- size: ComponentSize;
64
- disabled: boolean;
65
- label: string;
66
- modelValue: any;
67
- value: any;
68
- id: string;
69
- labelPosition: "left" | "right";
70
- description: string;
71
- error: string;
72
- iconColor: string;
73
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
74
-
75
- declare const __VLS_component_5: DefineComponent<AlertProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
76
- close: () => any;
77
- }, string, PublicProps, Readonly<AlertProps> & Readonly<{
78
- onClose?: (() => any) | undefined;
79
- }>, {
80
- color: ColorVariant;
81
- size: ComponentSize;
82
- disabled: boolean;
83
- variant: VariantType;
84
- loading: boolean;
85
- invalid: boolean;
86
- closable: boolean;
87
- valid: boolean;
88
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
89
-
90
- declare function __VLS_template(): {
91
- slots: {
92
- loader?(_: {}): any;
93
- default?(_: {}): any;
94
- };
95
- refs: {};
96
- attrs: Partial<{}>;
97
- };
98
-
99
- declare function __VLS_template_2(): {
100
- slots: {
101
- default?(_: {}): any;
102
- };
103
- refs: {};
104
- attrs: Partial<{}>;
105
- };
106
-
107
- declare function __VLS_template_3(): {
108
- slots: {
109
- loader?(_: {}): any;
110
- };
111
- refs: {
112
- selectRoot: HTMLDivElement;
113
- searchInput: HTMLInputElement;
114
- };
115
- attrs: Partial<{}>;
116
- };
117
-
118
- declare function __VLS_template_4(): {
119
- slots: {
120
- label?(_: {}): any;
121
- description?(_: {}): any;
122
- error?(_: {}): any;
123
- };
124
- refs: {
125
- radio: HTMLInputElement;
126
- };
127
- attrs: Partial<{}>;
128
- };
129
-
130
- declare function __VLS_template_5(): {
131
- slots: {
132
- default?(_: {}): any;
133
- };
134
- refs: {};
135
- attrs: Partial<{}>;
136
- };
137
-
138
- declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
139
-
140
- declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
141
-
142
- declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
143
-
144
- declare type __VLS_TemplateResult_4 = ReturnType<typeof __VLS_template_4>;
145
-
146
- declare type __VLS_TemplateResult_5 = ReturnType<typeof __VLS_template_5>;
147
-
148
- declare type __VLS_WithTemplateSlots<T, S> = T & {
149
- new (): {
150
- $slots: S;
151
- };
152
- };
153
-
154
- declare type __VLS_WithTemplateSlots_2<T, S> = T & {
155
- new (): {
156
- $slots: S;
157
- };
158
- };
159
-
160
- declare type __VLS_WithTemplateSlots_3<T, S> = T & {
161
- new (): {
162
- $slots: S;
163
- };
164
- };
165
-
166
- declare type __VLS_WithTemplateSlots_4<T, S> = T & {
167
- new (): {
168
- $slots: S;
169
- };
170
- };
171
-
172
- declare type __VLS_WithTemplateSlots_5<T, S> = T & {
173
- new (): {
174
- $slots: S;
175
- };
176
- };
177
-
178
- declare type __VLS_WithTemplateSlots_6<T, S> = T & {
179
- new (): {
180
- $slots: S;
181
- };
182
- };
183
-
184
- export declare const Alert: __VLS_WithTemplateSlots_6<typeof __VLS_component_5, __VLS_TemplateResult_5["slots"]>;
8
+ import { default as Dialog } from './Dialog.vue';
9
+ import { default as HoverCard } from './HoverCard.vue';
10
+ import { default as HoverCardTarget } from './HoverCardTarget.vue';
11
+ import { default as Indicator } from './Indicator.vue';
12
+ import { InjectionKey } from 'vue';
13
+ import { default as Loader } from './Loader.vue';
14
+ import { Placement } from '@floating-ui/vue';
15
+ import { default as Progress } from './Progress.vue';
16
+ import { default as Radio } from './components/Radio/Radio.vue';
17
+ import { Ref } from 'vue';
18
+ import { default as Select } from './components/Select/Select.vue';
19
+ import { default as TextInput } from './TextInput.vue';
20
+
21
+ export { Alert }
185
22
 
186
23
  export declare interface AlertProps {
187
24
  /** Title of the alert */
@@ -212,7 +49,7 @@ export declare interface AlertProps {
212
49
  class?: string;
213
50
  }
214
51
 
215
- export declare const Badge: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
52
+ export { Badge }
216
53
 
217
54
  export declare interface BadgeProps {
218
55
  /** Controls font-size, height and horizontal padding */
@@ -241,7 +78,7 @@ export declare interface BadgeProps {
241
78
 
242
79
  export declare type BadgeVariant = 'filled' | 'light' | 'outline' | 'dot' | 'transparent' | 'white' | 'default' | 'gradient';
243
80
 
244
- export declare const Button: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
81
+ export { Button }
245
82
 
246
83
  export declare type ButtonColor = NonNullable<ButtonProps['color']>;
247
84
 
@@ -281,25 +118,7 @@ export declare type ButtonSize = NonNullable<ButtonProps['size']>;
281
118
 
282
119
  declare type ButtonVariant = 'filled' | 'light' | 'outline' | 'subtle' | 'gradient' | 'white' | 'default';
283
120
 
284
- export declare const Checkbox: DefineComponent<CheckboxProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
285
- "update:modelValue": (value: boolean) => any;
286
- change: (value: boolean) => any;
287
- }, string, PublicProps, Readonly<CheckboxProps> & Readonly<{
288
- "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
289
- onChange?: ((value: boolean) => any) | undefined;
290
- }>, {
291
- color: ColorVariant;
292
- size: Size;
293
- radius: "sm" | "md" | "lg" | "full";
294
- disabled: boolean;
295
- label: string;
296
- modelValue: boolean | any[];
297
- labelPosition: "left" | "right";
298
- description: string;
299
- error: string;
300
- indeterminate: boolean;
301
- iconColor: ColorVariant;
302
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
121
+ export { Checkbox }
303
122
 
304
123
  export declare interface CheckboxProps {
305
124
  modelValue?: boolean | any[];
@@ -318,21 +137,7 @@ export declare interface CheckboxProps {
318
137
  autoContrast?: boolean;
319
138
  }
320
139
 
321
- export declare const Chip: DefineComponent<ChipProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
322
- "update:modelValue": (value: boolean) => any;
323
- }, string, PublicProps, Readonly<ChipProps> & Readonly<{
324
- "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
325
- }>, {
326
- color: ChipColor;
327
- size: ChipSize;
328
- disabled: boolean;
329
- variant: ChipVariant;
330
- loading: boolean;
331
- label: string;
332
- modelValue: boolean;
333
- withCheckIcon: boolean;
334
- allowDeselect: boolean;
335
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
140
+ export { Chip }
336
141
 
337
142
  declare type ChipColor = 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info' | 'dark' | 'light';
338
143
 
@@ -386,6 +191,23 @@ declare type ChipSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
386
191
 
387
192
  declare type ChipVariant = 'filled' | 'outline' | 'light';
388
193
 
194
+ export { Collapse }
195
+
196
+ export declare interface CollapseProps {
197
+ /** Whether the collapse is open */
198
+ open?: boolean;
199
+ /** Collapse content */
200
+ children?: any;
201
+ /** Animation duration in milliseconds */
202
+ duration?: number;
203
+ /** Custom class names */
204
+ class?: string;
205
+ /** Size of the collapse spacing */
206
+ size?: ComponentSize;
207
+ /** Whether to disable transitions */
208
+ disableTransition?: boolean;
209
+ }
210
+
389
211
  declare type ColorVariant = 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info' | 'dark' | 'light';
390
212
 
391
213
  declare type ComponentRadius = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
@@ -394,22 +216,90 @@ declare type ComponentSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
394
216
 
395
217
  export declare const composables: {};
396
218
 
397
- export declare const Indicator: __VLS_WithTemplateSlots_5<DefineComponent<IndicatorProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<IndicatorProps> & Readonly<{}>, {
398
- color: ThemeColor;
399
- size: ComponentSize;
400
- radius: ComponentRadius;
401
- disabled: boolean;
402
- variant: "filled" | "light" | "outline" | "default" | "subtle";
403
- label: string | number;
404
- position: Position;
405
- offset: number;
406
- inline: boolean;
407
- withBorder: boolean;
408
- processing: boolean;
409
- zIndex: number;
410
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>, {
411
- default?(_: {}): any;
412
- }>;
219
+ export { Dialog }
220
+
221
+ export declare interface DialogProps {
222
+ /** Dialog title */
223
+ title?: string;
224
+ /** Dialog content */
225
+ content?: string;
226
+ /** Whether the dialog is opened */
227
+ opened: boolean;
228
+ /** Dialog size */
229
+ size?: ComponentSize;
230
+ /** Whether to show close button */
231
+ withCloseButton?: boolean;
232
+ /** Called when close button is clicked */
233
+ onClose?: () => void;
234
+ /** Position of the dialog */
235
+ position?: {
236
+ top?: number | string;
237
+ right?: number | string;
238
+ bottom?: number | string;
239
+ left?: number | string;
240
+ };
241
+ /** Whether to keep the component mounted when hidden */
242
+ keepMounted?: boolean;
243
+ /** Color variant */
244
+ color?: ThemeColor;
245
+ /** z-index value */
246
+ zIndex?: number;
247
+ }
248
+
249
+ export { HoverCard }
250
+
251
+ export declare interface HoverCardContext {
252
+ isOpen: Ref<boolean>;
253
+ open: () => void;
254
+ close: () => void;
255
+ }
256
+
257
+ export declare interface HoverCardDropdownProps {
258
+ /** Additional classes for the dropdown */
259
+ class?: string;
260
+ }
261
+
262
+ export declare const hoverCardInjectionKey: InjectionKey<HoverCardContext>;
263
+
264
+ export declare interface HoverCardProps {
265
+ /** Initial opened state */
266
+ initiallyOpened?: boolean;
267
+ /** Open delay in ms */
268
+ openDelay?: number;
269
+ /** Close delay in ms */
270
+ closeDelay?: number;
271
+ /** Placement of the dropdown */
272
+ placement?: Placement;
273
+ /** Called when dropdown opens */
274
+ onOpen?: () => void;
275
+ /** Called when dropdown closes */
276
+ onClose?: () => void;
277
+ /** Offset from the target */
278
+ offset?: number;
279
+ /** Whether to disable the hover card */
280
+ disabled?: boolean;
281
+ /** Size of the hover card */
282
+ size?: ComponentSize;
283
+ /** Whether to show arrow */
284
+ withArrow?: boolean;
285
+ /** Arrow offset */
286
+ arrowOffset?: number;
287
+ /** Whether to trap focus inside dropdown */
288
+ trapFocus?: boolean;
289
+ /** z-index value */
290
+ zIndex?: number;
291
+ }
292
+
293
+ export { HoverCardTarget }
294
+
295
+ export declare interface HoverCardTargetProps {
296
+ /** Whether to use the wrapper div */
297
+ withWrapper?: boolean;
298
+ /** Additional classes for the wrapper */
299
+ wrapperClass?: string;
300
+ }
301
+
302
+ export { Indicator }
413
303
 
414
304
  export declare interface IndicatorProps {
415
305
  /** Position of the indicator relative to its container */
@@ -440,12 +330,16 @@ export declare interface IndicatorProps {
440
330
 
441
331
  export declare type JustifyContent = 'start' | 'center' | 'end' | 'space-between';
442
332
 
333
+ export { Loader }
334
+
443
335
  export declare interface LoaderProps {
444
336
  color?: MantineColor;
445
337
  size?: MantineSize | number;
446
338
  variant?: 'oval' | 'dots' | 'bars';
447
339
  }
448
340
 
341
+ export declare type LoaderVariant = 'oval' | 'dots' | 'bars';
342
+
449
343
  export declare type MantineColor = 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info' | 'dark' | 'light';
450
344
 
451
345
  export declare type MantineGradient = {
@@ -460,12 +354,7 @@ export declare type MantineSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
460
354
 
461
355
  declare type Position = 'top-start' | 'top-end' | 'top-center' | 'bottom-start' | 'bottom-end' | 'bottom-center' | 'middle-start' | 'middle-end' | 'middle-center';
462
356
 
463
- export declare const Progress: DefineComponent<ProgressProps_2, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ProgressProps_2> & Readonly<{}>, {
464
- size: Size;
465
- value: number;
466
- striped: boolean;
467
- animated: boolean;
468
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
357
+ export { Progress }
469
358
 
470
359
  export declare interface ProgressProps {
471
360
  /** Value of the progress (0-100) */
@@ -484,15 +373,6 @@ export declare interface ProgressProps {
484
373
  class?: string;
485
374
  }
486
375
 
487
- declare interface ProgressProps_2 {
488
- value?: number;
489
- size?: Size;
490
- color?: ColorVariant;
491
- label?: string;
492
- striped?: boolean;
493
- animated?: boolean;
494
- }
495
-
496
376
  export declare interface ProgressSectionProps {
497
377
  value: number;
498
378
  color?: string;
@@ -500,7 +380,7 @@ export declare interface ProgressSectionProps {
500
380
  animated?: boolean;
501
381
  }
502
382
 
503
- export declare const Radio: __VLS_WithTemplateSlots_4<typeof __VLS_component_4, __VLS_TemplateResult_4["slots"]>;
383
+ export { Radio }
504
384
 
505
385
  export declare interface RadioProps {
506
386
  /**
@@ -551,7 +431,7 @@ export declare interface RadioProps {
551
431
 
552
432
  declare type SectionProps = Record<string, any>;
553
433
 
554
- export declare const Select: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
434
+ export { Select }
555
435
 
556
436
  export declare interface SelectOption {
557
437
  value: string;
@@ -579,19 +459,7 @@ export declare interface SelectProps {
579
459
 
580
460
  declare type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
581
461
 
582
- export declare const TextInput: DefineComponent<TextInputProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
583
- "update:modelValue": (value: string) => any;
584
- }, string, PublicProps, Readonly<TextInputProps> & Readonly<{
585
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
586
- }>, {
587
- size: ComponentSize;
588
- radius: ComponentRadius;
589
- disabled: boolean;
590
- type: string;
591
- required: boolean;
592
- withAsterisk: boolean;
593
- withError: boolean;
594
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
462
+ export { TextInput }
595
463
 
596
464
  export declare interface TextInputProps {
597
465
  /** Input's id attribute */
@@ -642,6 +510,20 @@ export declare interface TextInputProps {
642
510
 
643
511
  declare type ThemeColor = 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info' | 'dark' | 'light';
644
512
 
645
- declare type VariantType = 'filled' | 'light' | 'outline' | 'default' | 'subtle' | 'gradient' | 'white' | 'dot';
513
+ export declare function useHoverCard(options?: UseHoverCardOptions): {
514
+ isOpen: Ref<boolean, boolean>;
515
+ open: () => void;
516
+ close: () => void;
517
+ };
518
+
519
+ declare interface UseHoverCardOptions {
520
+ openDelay?: number;
521
+ closeDelay?: number;
522
+ onOpen?: () => void;
523
+ onClose?: () => void;
524
+ initiallyOpened?: boolean;
525
+ }
526
+
527
+ declare type VariantType = 'filled' | 'light' | 'outline' | 'default' | 'subtle' | 'gradient' | 'white' | 'dot' | 'bordered' | 'bordered-transparent';
646
528
 
647
529
  export { }