@contentstudio/ui 0.1.1 → 0.1.3

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
@@ -3,10 +3,22 @@ import { default as Badge } from './components/Badge/Badge.vue';
3
3
  import { default as Button } from './components/Button/Button.vue';
4
4
  import { default as Checkbox } from './components/Checkbox/Checkbox.vue';
5
5
  import { default as Chip } from './Chip.vue';
6
+ import { default as Collapse } from './Collapse.vue';
7
+ import { default as Collapsible } from './components/Collapsible/Collapsible.vue';
6
8
  import { Component } from 'vue';
9
+ import { default as Dialog } from './Dialog.vue';
10
+ import { default as Dropdown } from './components/Dropdown/Dropdown.vue';
11
+ import { default as DropdownItem } from './components/Dropdown/DropdownItem.vue';
12
+ import { default as HoverCard } from './HoverCard.vue';
13
+ import { default as HoverCardTarget } from './HoverCardTarget.vue';
7
14
  import { default as Indicator } from './Indicator.vue';
15
+ import { InjectionKey } from 'vue';
16
+ import { default as ListItem } from './components/ListItem/ListItem.vue';
17
+ import { default as Loader } from './Loader.vue';
18
+ import { Placement } from '@floating-ui/vue';
8
19
  import { default as Progress } from './Progress.vue';
9
20
  import { default as Radio } from './components/Radio/Radio.vue';
21
+ import { Ref } from 'vue';
10
22
  import { default as Select } from './components/Select/Select.vue';
11
23
  import { default as TextInput } from './TextInput.vue';
12
24
 
@@ -74,6 +86,12 @@ export { Button }
74
86
 
75
87
  export declare type ButtonColor = NonNullable<ButtonProps['color']>;
76
88
 
89
+ export declare interface ButtonLoaderProps {
90
+ color?: MantineColor;
91
+ size?: MantineSize | number;
92
+ variant?: 'oval' | 'dots' | 'bars';
93
+ }
94
+
77
95
  export declare interface ButtonProps {
78
96
  /** Button variant */
79
97
  variant?: ButtonVariant;
@@ -127,8 +145,11 @@ export declare interface CheckboxProps {
127
145
  indeterminate?: boolean;
128
146
  iconColor?: ColorVariant;
129
147
  autoContrast?: boolean;
148
+ variant?: CheckboxVariant;
130
149
  }
131
150
 
151
+ export declare type CheckboxVariant = 'filled' | 'outlined';
152
+
132
153
  export { Chip }
133
154
 
134
155
  declare type ChipColor = 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info' | 'dark' | 'light';
@@ -183,6 +204,34 @@ declare type ChipSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
183
204
 
184
205
  declare type ChipVariant = 'filled' | 'outline' | 'light';
185
206
 
207
+ export { Collapse }
208
+
209
+ export declare interface CollapseProps {
210
+ /** Whether the collapse is open */
211
+ open?: boolean;
212
+ /** Collapse content */
213
+ children?: any;
214
+ /** Animation duration in milliseconds */
215
+ duration?: number;
216
+ /** Custom class names */
217
+ class?: string;
218
+ /** Size of the collapse spacing */
219
+ size?: ComponentSize;
220
+ /** Whether to disable transitions */
221
+ disableTransition?: boolean;
222
+ }
223
+
224
+ export { Collapsible }
225
+
226
+ export declare interface CollapsibleProps {
227
+ defaultOpen?: boolean;
228
+ disabled?: boolean;
229
+ class?: string;
230
+ hideArrow?: boolean;
231
+ buttonClass?: string;
232
+ selectedClass?: string;
233
+ }
234
+
186
235
  declare type ColorVariant = 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info' | 'dark' | 'light';
187
236
 
188
237
  declare type ComponentRadius = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
@@ -191,6 +240,129 @@ declare type ComponentSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
191
240
 
192
241
  export declare const composables: {};
193
242
 
243
+ export { Dialog }
244
+
245
+ export declare interface DialogProps {
246
+ /** Dialog title */
247
+ title?: string;
248
+ /** Dialog content */
249
+ content?: string;
250
+ /** Whether the dialog is opened */
251
+ opened: boolean;
252
+ /** Dialog size */
253
+ size?: ComponentSize;
254
+ /** Whether to show close button */
255
+ withCloseButton?: boolean;
256
+ /** Called when close button is clicked */
257
+ onClose?: () => void;
258
+ /** Position of the dialog */
259
+ position?: {
260
+ top?: number | string;
261
+ right?: number | string;
262
+ bottom?: number | string;
263
+ left?: number | string;
264
+ };
265
+ /** Whether to keep the component mounted when hidden */
266
+ keepMounted?: boolean;
267
+ /** Color variant */
268
+ color?: ThemeColor;
269
+ /** z-index value */
270
+ zIndex?: number;
271
+ }
272
+
273
+ export { Dropdown }
274
+
275
+ export { DropdownItem }
276
+
277
+ export declare interface DropdownItemProps {
278
+ /** Size of the dropdown item */
279
+ size?: ComponentSize;
280
+ /** Whether the item is disabled */
281
+ disabled?: boolean;
282
+ /** Whether to close dropdown on click */
283
+ closeOnClick?: boolean;
284
+ /** Custom classes for the item */
285
+ class?: string;
286
+ }
287
+
288
+ export declare interface DropdownProps {
289
+ /** Size of the dropdown */
290
+ size?: ComponentSize;
291
+ /** Border radius of the dropdown */
292
+ radius?: ComponentRadius;
293
+ /** Color theme of the dropdown */
294
+ color?: ThemeColor;
295
+ /** Whether the dropdown is open */
296
+ open?: boolean;
297
+ /** Whether the dropdown is disabled */
298
+ disabled?: boolean;
299
+ /** Text to show when dropdown is disabled */
300
+ disabledText?: string;
301
+ /** Custom classes for the dropdown button */
302
+ buttonClasses?: string;
303
+ /** Custom classes for the dropdown container */
304
+ dropdownClasses?: string;
305
+ /** Placement of the dropdown (top or bottom) */
306
+ placement?: 'top' | 'bottom';
307
+ /** Whether to show the dropdown arrow */
308
+ showArrow?: boolean;
309
+ /** Whether the parent should have relative positioning */
310
+ parentPositionRelative?: boolean;
311
+ }
312
+
313
+ export { HoverCard }
314
+
315
+ export declare interface HoverCardContext {
316
+ isOpen: Ref<boolean>;
317
+ open: () => void;
318
+ close: () => void;
319
+ }
320
+
321
+ export declare interface HoverCardDropdownProps {
322
+ /** Additional classes for the dropdown */
323
+ class?: string;
324
+ }
325
+
326
+ export declare const hoverCardInjectionKey: InjectionKey<HoverCardContext>;
327
+
328
+ export declare interface HoverCardProps {
329
+ /** Initial opened state */
330
+ initiallyOpened?: boolean;
331
+ /** Open delay in ms */
332
+ openDelay?: number;
333
+ /** Close delay in ms */
334
+ closeDelay?: number;
335
+ /** Placement of the dropdown */
336
+ placement?: Placement;
337
+ /** Called when dropdown opens */
338
+ onOpen?: () => void;
339
+ /** Called when dropdown closes */
340
+ onClose?: () => void;
341
+ /** Offset from the target */
342
+ offset?: number;
343
+ /** Whether to disable the hover card */
344
+ disabled?: boolean;
345
+ /** Size of the hover card */
346
+ size?: ComponentSize;
347
+ /** Whether to show arrow */
348
+ withArrow?: boolean;
349
+ /** Arrow offset */
350
+ arrowOffset?: number;
351
+ /** Whether to trap focus inside dropdown */
352
+ trapFocus?: boolean;
353
+ /** z-index value */
354
+ zIndex?: number;
355
+ }
356
+
357
+ export { HoverCardTarget }
358
+
359
+ export declare interface HoverCardTargetProps {
360
+ /** Whether to use the wrapper div */
361
+ withWrapper?: boolean;
362
+ /** Additional classes for the wrapper */
363
+ wrapperClass?: string;
364
+ }
365
+
194
366
  export { Indicator }
195
367
 
196
368
  export declare interface IndicatorProps {
@@ -222,12 +394,30 @@ export declare interface IndicatorProps {
222
394
 
223
395
  export declare type JustifyContent = 'start' | 'center' | 'end' | 'space-between';
224
396
 
397
+ export { ListItem }
398
+
399
+ export declare interface ListItemProps {
400
+ disabled?: boolean;
401
+ selected?: boolean;
402
+ class?: string;
403
+ selectedClass?: string;
404
+ }
405
+
406
+ export { Loader }
407
+
225
408
  export declare interface LoaderProps {
226
- color?: MantineColor;
227
- size?: MantineSize | number;
228
- variant?: 'oval' | 'dots' | 'bars';
409
+ /** Loader variant */
410
+ variant?: LoaderVariant;
411
+ /** Loader color */
412
+ color?: ThemeColor;
413
+ /** Loader size */
414
+ size?: ComponentSize;
415
+ /** Custom class names */
416
+ class?: string;
229
417
  }
230
418
 
419
+ export declare type LoaderVariant = 'oval' | 'dots' | 'bars';
420
+
231
421
  export declare type MantineColor = 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info' | 'dark' | 'light';
232
422
 
233
423
  export declare type MantineGradient = {
@@ -292,9 +482,9 @@ export declare interface RadioProps {
292
482
  */
293
483
  size?: ComponentSize;
294
484
  /**
295
- * Position of the label
485
+ * Whether the radio button is disabled
296
486
  */
297
- labelPosition?: 'left' | 'right';
487
+ disabled?: boolean;
298
488
  /**
299
489
  * Description text
300
490
  */
@@ -304,9 +494,14 @@ export declare interface RadioProps {
304
494
  */
305
495
  error?: string;
306
496
  /**
307
- * Disabled state
497
+ * Position of the label
308
498
  */
309
- disabled?: boolean;
499
+ labelPosition?: 'left' | 'right';
500
+ /**
501
+ * Visual variant of the radio button
502
+ * @default 'filled'
503
+ */
504
+ variant?: RadioVariant;
310
505
  /**
311
506
  * Custom color for the radio icon
312
507
  */
@@ -317,6 +512,8 @@ export declare interface RadioProps {
317
512
  id?: string;
318
513
  }
319
514
 
515
+ export declare type RadioVariant = 'filled' | 'outlined';
516
+
320
517
  declare type SectionProps = Record<string, any>;
321
518
 
322
519
  export { Select }
@@ -398,6 +595,20 @@ export declare interface TextInputProps {
398
595
 
399
596
  declare type ThemeColor = 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info' | 'dark' | 'light';
400
597
 
401
- declare type VariantType = 'filled' | 'light' | 'outline' | 'default' | 'subtle' | 'gradient' | 'white' | 'dot';
598
+ export declare function useHoverCard(options?: UseHoverCardOptions): {
599
+ isOpen: Ref<boolean, boolean>;
600
+ open: () => void;
601
+ close: () => void;
602
+ };
603
+
604
+ declare interface UseHoverCardOptions {
605
+ openDelay?: number;
606
+ closeDelay?: number;
607
+ onOpen?: () => void;
608
+ onClose?: () => void;
609
+ initiallyOpened?: boolean;
610
+ }
611
+
612
+ declare type VariantType = 'filled' | 'light' | 'outline' | 'default' | 'subtle' | 'gradient' | 'white' | 'dot' | 'bordered' | 'bordered-transparent' | 'text';
402
613
 
403
614
  export { }