@robuust-digital/vue-components 2.7.0 → 3.0.0

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 (52) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/_shared/ButtonBase-DyeIkb-l.js +76 -0
  3. package/dist/_shared/ChevronDownIcon-Y_yqpwON.js +39 -0
  4. package/dist/_shared/FormInput-k0vAk3VU.js +69 -0
  5. package/dist/_shared/Modal-D0x_VHiB.js +188 -0
  6. package/dist/_shared/Tooltip-B5w_Ojie.js +85 -0
  7. package/dist/_shared/XMarkIcon-CBoWSM1l.js +17 -0
  8. package/dist/_shared/combobox-yh0YQ8_d.js +265 -0
  9. package/dist/_shared/core-C0o6izrz.js +854 -0
  10. package/dist/_shared/dialogs-SvdPsILD.js +179 -0
  11. package/dist/_shared/dropdown-BPUpLokN.js +134 -0
  12. package/dist/_shared/icon-spinner-D3Dhustt.js +23 -0
  13. package/dist/_shared/lightswitch-CpyX1iA_.js +38 -0
  14. package/dist/_shared/rich-text-editor-DkHKNS2n.js +226 -0
  15. package/dist/_shared/toast-DNxJDQWN.js +84 -0
  16. package/dist/combobox/index.js +2 -5
  17. package/dist/combobox.d.ts +3 -132
  18. package/dist/composables/useDialogContext.d.ts +19 -0
  19. package/dist/composables/useForm.d.ts +6 -0
  20. package/dist/core/file-upload.css +28 -1
  21. package/dist/core/index.js +5 -20
  22. package/dist/core.d.ts +15 -794
  23. package/dist/dialogs/index.js +3 -6
  24. package/dist/dialogs.d.ts +3 -300
  25. package/dist/dropdown/index.js +2 -5
  26. package/dist/dropdown.d.ts +3 -149
  27. package/dist/index/index.js +14 -36
  28. package/dist/index.d.ts +8 -1546
  29. package/dist/lightswitch/index.js +2 -5
  30. package/dist/lightswitch.d.ts +3 -39
  31. package/dist/rich-text-editor/index.js +2 -5
  32. package/dist/rich-text-editor.d.ts +3 -89
  33. package/dist/toast/index.js +2 -5
  34. package/dist/toast.d.ts +3 -66
  35. package/dist/tooltip/index.js +5 -5
  36. package/dist/tooltip.d.ts +3 -61
  37. package/dist/types/shared.d.ts +2 -0
  38. package/package.json +33 -36
  39. package/dist/_shared/ButtonBase.vue_vue_type_script_setup_true_lang-ZYVNEyNx.js +0 -60
  40. package/dist/_shared/ChevronDownIcon-BYWciGnh.js +0 -41
  41. package/dist/_shared/Combobox.vue_vue_type_script_setup_true_lang-BwTRzqr6.js +0 -256
  42. package/dist/_shared/Drawer.vue_vue_type_script_setup_true_lang-DeAu2U_2.js +0 -197
  43. package/dist/_shared/Dropdown.vue_vue_type_script_setup_true_lang-Cv3HwIyF.js +0 -150
  44. package/dist/_shared/FormInput.vue_vue_type_script_setup_true_lang-Bg7YPGyY.js +0 -74
  45. package/dist/_shared/Lightswitch.vue_vue_type_script_setup_true_lang-hiuDVfo5.js +0 -43
  46. package/dist/_shared/Modal.vue_vue_type_script_setup_true_lang-CdMsCCBi.js +0 -203
  47. package/dist/_shared/RichTextEditor.vue_vue_type_script_setup_true_lang-Miebq2nL.js +0 -247
  48. package/dist/_shared/Tabs.vue_vue_type_script_setup_true_lang-BaTWaeN3.js +0 -931
  49. package/dist/_shared/Toast.vue_vue_type_script_setup_true_lang-DS6keeu7.js +0 -78
  50. package/dist/_shared/Tooltip.vue_vue_type_script_setup_true_lang-B3MHy48T.js +0 -95
  51. package/dist/_shared/XMarkIcon-CPr_Rd8y.js +0 -19
  52. package/dist/_shared/icon-spinner-BYCMrTdL.js +0 -26
@@ -1,132 +1,3 @@
1
- import { ComponentOptionsMixin } from 'vue';
2
- import { ComponentProvideOptions } from 'vue';
3
- import { DefineComponent } from 'vue';
4
- import { FunctionalComponent } from 'vue';
5
- import { HTMLAttributes } from 'vue';
6
- import { PublicProps } from 'vue';
7
- import { SVGAttributes } from 'vue';
8
- import { VNodeProps } from 'vue';
9
-
10
- declare const __VLS_component: DefineComponent<ComboboxProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
11
- "update:modelValue": (value: ComboboxModelValue) => any;
12
- "update:requestParams": (value: Record<string, unknown>) => any;
13
- "combobox:noResults": (value: string | null) => any;
14
- "combobox:error": (error: unknown) => any;
15
- }, string, PublicProps, Readonly<ComboboxProps> & Readonly<{
16
- "onUpdate:modelValue"?: ((value: ComboboxModelValue) => any) | undefined;
17
- "onUpdate:requestParams"?: ((value: Record<string, unknown>) => any) | undefined;
18
- "onCombobox:noResults"?: ((value: string | null) => any) | undefined;
19
- "onCombobox:error"?: ((error: unknown) => any) | undefined;
20
- }>, {
21
- icon: Icon | null;
22
- size: ComboboxSize;
23
- modelValue: ComboboxModelValue;
24
- rootClass: string;
25
- prefixIcon: Icon | null;
26
- disabled: boolean;
27
- multiple: boolean;
28
- endpoint: string;
29
- requestParams: Record<string, unknown>;
30
- manualInput: boolean;
31
- responseData: (data: unknown) => unknown[];
32
- displayValue: (item: unknown) => string | null;
33
- optionText: (option: unknown) => string | null;
34
- minLength: number;
35
- itemKey: string;
36
- clearable: boolean;
37
- rootAttrs: Record<string, unknown>;
38
- onSearch: (value: string | null, params: Record<string, unknown>, endpoint?: string) => Promise<{
39
- data: unknown;
40
- error?: unknown;
41
- cancel?: () => void;
42
- }>;
43
- searchOnly: boolean;
44
- debounce: number;
45
- minLoadingTime: number;
46
- onCancel: (cancelToken: (() => void) | null) => void;
47
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
48
-
49
- declare function __VLS_template(): {
50
- attrs: Partial<{}>;
51
- slots: {
52
- prefixIcon?(_: {
53
- icon: Icon;
54
- }): any;
55
- spinner?(_: {
56
- spinning: true;
57
- }): any;
58
- icon?(_: {
59
- icon: Icon | null;
60
- }): any;
61
- clear?(_: {}): any;
62
- chip?(_: {
63
- optionText: string | null;
64
- option: any;
65
- removeOption: (option: Record<string, unknown>) => void;
66
- }): any;
67
- option?(_: {
68
- option: unknown;
69
- isActive: (value: number | string) => boolean;
70
- }): any;
71
- optionPrefix?(_: {
72
- option: unknown;
73
- isActive: (value: number | string) => boolean;
74
- }): any;
75
- optionSuffix?(_: {
76
- option: unknown;
77
- isActive: (value: number | string) => boolean;
78
- }): any;
79
- };
80
- refs: {};
81
- rootEl: any;
82
- };
83
-
84
- declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
85
-
86
- declare type __VLS_WithTemplateSlots<T, S> = T & {
87
- new (): {
88
- $slots: S;
89
- };
90
- };
91
-
92
- declare type ComboboxModelValue = object | Array<unknown> | null;
93
-
94
- declare interface ComboboxProps {
95
- id: string;
96
- rootClass?: string;
97
- modelValue?: ComboboxModelValue;
98
- endpoint?: string;
99
- requestParams?: Record<string, unknown>;
100
- manualInput?: boolean;
101
- responseData?: (data: unknown) => unknown[];
102
- displayValue?: (item: unknown) => string | null;
103
- optionText?: (option: unknown) => string | null;
104
- disabled?: boolean;
105
- minLength?: number;
106
- itemKey?: string;
107
- clearable?: boolean;
108
- rootAttrs?: Record<string, unknown>;
109
- multiple?: boolean;
110
- onSearch?: (value: string | null, params: Record<string, unknown>, endpoint?: string) => Promise<{
111
- data: unknown;
112
- error?: unknown;
113
- cancel?: () => void;
114
- }>;
115
- searchOnly?: boolean;
116
- icon?: Icon | null;
117
- prefixIcon?: Icon | null;
118
- size?: ComboboxSize;
119
- debounce?: number;
120
- minLoadingTime?: number;
121
- onCancel?: (cancelToken: (() => void) | null) => void;
122
- }
123
-
124
- declare type ComboboxSize = 'sm' | 'base';
125
-
126
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
127
- export { _default as Combobox }
128
- export default _default;
129
-
130
- declare type Icon = FunctionalComponent<SVGAttributes & HTMLAttributes & VNodeProps>;
131
-
132
- export { }
1
+ import { default as Combobox } from './components/Combobox.vue';
2
+ export { Combobox };
3
+ export default Combobox;
@@ -0,0 +1,19 @@
1
+ import { Component, Ref, ComputedRef } from 'vue';
2
+ type DialogAs = string | Component;
3
+ interface DialogProps {
4
+ as: DialogAs;
5
+ id: string;
6
+ }
7
+ interface DialogContext {
8
+ contentRef: Ref<HTMLElement | null>;
9
+ ready: Ref<boolean>;
10
+ isForm: ComputedRef<boolean>;
11
+ titleId: ComputedRef<string>;
12
+ descriptionId: ComputedRef<string>;
13
+ initialFocusElement: ComputedRef<HTMLElement | null>;
14
+ }
15
+ /**
16
+ * Dialog context composable
17
+ */
18
+ export default function useDialogContext(props: DialogProps): DialogContext;
19
+ export {};
@@ -0,0 +1,6 @@
1
+ import { ComputedRef } from 'vue';
2
+ interface UseFormReturn {
3
+ hasModelBinding: ComputedRef<boolean>;
4
+ }
5
+ declare const _default: () => UseFormReturn;
6
+ export default _default;
@@ -80,8 +80,25 @@
80
80
  }
81
81
  }
82
82
 
83
+ .rvc-file-upload-control {
84
+ display: inline-block;
85
+ position: relative;
86
+ }
87
+
88
+ .rvc-file-upload-variant-area .rvc-file-upload-control {
89
+ display: block;
90
+ width: 100%;
91
+ }
92
+
83
93
  .rvc-file-upload-input {
84
- display: none;
94
+ display: block;
95
+ position: absolute;
96
+ z-index: 0;
97
+ inset: 0;
98
+ width: 100%;
99
+ height: 100%;
100
+ opacity: 0;
101
+ pointer-events: none;
85
102
  }
86
103
 
87
104
  .rvc-file-upload-area {
@@ -111,6 +128,16 @@
111
128
  }
112
129
  }
113
130
 
131
+ .rvc-file-upload-trigger {
132
+ position: relative;
133
+ z-index: 1;
134
+ }
135
+
136
+ .rvc-file-upload-input:focus-visible + .rvc-file-upload-trigger {
137
+ outline: var(--rvc-base-focus-outline-color) var(--rvc-base-focus-outline-style) var(--rvc-base-focus-outline-width);
138
+ outline-offset: var(--rvc-base-focus-outline-offset);
139
+ }
140
+
114
141
  .rvc-file-upload:not(.rvc-file-upload-disabled) .rvc-file-upload-area:hover {
115
142
  border-color: var(--rvc-file-upload-area-border-color-hover);
116
143
  background-color: var(--rvc-file-upload-area-bg-color-hover);
@@ -1,20 +1,5 @@
1
- import { _ as e, a as s, b as t, c as r, d as m, e as p, f as i, g as x, h as c, i as d, j as f } from "../_shared/Tabs.vue_vue_type_script_setup_true_lang-BaTWaeN3.js";
2
- import { _ as n } from "../_shared/ChevronDownIcon-BYWciGnh.js";
3
- import { _ as F } from "../_shared/ButtonBase.vue_vue_type_script_setup_true_lang-ZYVNEyNx.js";
4
- import { _ as g } from "../_shared/FormInput.vue_vue_type_script_setup_true_lang-Bg7YPGyY.js";
5
- export {
6
- e as Accordion,
7
- s as Alert,
8
- n as Badge,
9
- F as ButtonBase,
10
- t as Checkbox,
11
- r as DataTable,
12
- m as EmptyState,
13
- p as FileUpload,
14
- g as FormInput,
15
- i as FormSelect,
16
- x as FormTextarea,
17
- c as Pagination,
18
- d as Radio,
19
- f as Tabs
20
- };
1
+ import { a as e, c as t, d as n, i as r, l as i, n as a, o, r as s, s as c, t as l, u } from "../_shared/core-C0o6izrz.js";
2
+ import { n as d } from "../_shared/ChevronDownIcon-Y_yqpwON.js";
3
+ import { t as f } from "../_shared/ButtonBase-DyeIkb-l.js";
4
+ import { t as p } from "../_shared/FormInput-k0vAk3VU.js";
5
+ export { n as Accordion, u as Alert, d as Badge, f as ButtonBase, i as Checkbox, o as DataTable, e as EmptyState, r as FileUpload, p as FormInput, t as FormSelect, s as FormTextarea, c as Pagination, a as Radio, l as Tabs };