@getcortexlabs/mavis-web 0.1.0-alpha.10 → 0.1.0-alpha.11
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 +4 -4
- package/dist/components/ChartPlot.d.ts +65 -0
- package/dist/components/ChartPlot.d.ts.map +1 -0
- package/dist/components/ChartPlot.js +135 -0
- package/dist/components/ChartPlot.js.map +1 -0
- package/dist/components/DateCalendar.d.ts +16 -1
- package/dist/components/DateCalendar.d.ts.map +1 -1
- package/dist/components/DateCalendar.js +17 -8
- package/dist/components/DateCalendar.js.map +1 -1
- package/dist/components/MAccordion.d.ts +1 -1
- package/dist/components/MChip.d.ts +1 -1
- package/dist/components/MCombobox.d.ts +3 -3
- package/dist/components/MDatePicker.d.ts +16 -16
- package/dist/components/MDialog.d.ts +3 -3
- package/dist/components/MEmptyState.d.ts +1 -1
- package/dist/components/MFilePicker.d.ts +2 -2
- package/dist/components/MImage.d.ts +1 -1
- package/dist/components/MInput.d.ts +1 -1
- package/dist/components/MListItem.d.ts +1 -1
- package/dist/components/MRangeSlider.d.ts +104 -0
- package/dist/components/MRangeSlider.d.ts.map +1 -0
- package/dist/components/MRangeSlider.js +95 -0
- package/dist/components/MRangeSlider.js.map +1 -0
- package/dist/components/MReveal.d.ts +8 -8
- package/dist/components/MSelect.d.ts +2 -2
- package/dist/components/MSheet.d.ts +4 -4
- package/dist/components/MStack.d.ts +8 -8
- package/dist/components/MText.d.ts +1 -1
- package/dist/components/MTimePicker.d.ts +4 -4
- package/dist/components/MTooltip.d.ts +65 -0
- package/dist/components/MTooltip.d.ts.map +1 -0
- package/dist/components/MTooltip.js +259 -0
- package/dist/components/MTooltip.js.map +1 -0
- package/dist/components/configurator.d.ts +2 -2
- package/dist/components/discovery.d.ts +282 -0
- package/dist/components/discovery.d.ts.map +1 -0
- package/dist/components/discovery.js +113 -0
- package/dist/components/discovery.js.map +1 -0
- package/dist/components/layout.d.ts +24 -24
- package/dist/components/navigation.d.ts +1 -1
- package/dist/components/wayfinding.d.ts +441 -0
- package/dist/components/wayfinding.d.ts.map +1 -0
- package/dist/components/wayfinding.js +56 -0
- package/dist/components/wayfinding.js.map +1 -0
- package/dist/components/workflows.d.ts +2 -2
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/base.css +117 -0
- package/src/components/ChartPlot.ts +139 -0
- package/src/components/DateCalendar.ts +20 -8
- package/src/components/MRangeSlider.ts +115 -0
- package/src/components/MTooltip.ts +293 -0
- package/src/components/discovery.ts +163 -0
- package/src/components/wayfinding.ts +68 -0
- package/src/index.ts +34 -0
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import { defineComponent, h, markRaw, mergeProps, nextTick, onActivated, onBeforeUnmount, onDeactivated, onMounted, onScopeDispose, ref, shallowRef, Teleport, useId, watch, } from 'vue';
|
|
2
|
+
import { placePopover } from '@getcortexlabs/mavis-core';
|
|
3
|
+
import { createMotionSurface } from '@getcortexlabs/mavis-core/experimental';
|
|
4
|
+
import { tooltipProps, useMavisTheme } from '@getcortexlabs/mavis-core/vue';
|
|
5
|
+
import { MButton } from './MButton.js';
|
|
6
|
+
import { MBox } from './layout.js';
|
|
7
|
+
/** Non-interactive help. Focus remains on the trigger; touch users can toggle it. */
|
|
8
|
+
export const MTooltip = defineComponent({
|
|
9
|
+
name: 'MTooltip',
|
|
10
|
+
inheritAttrs: false,
|
|
11
|
+
props: tooltipProps,
|
|
12
|
+
setup(props, { attrs }) {
|
|
13
|
+
const { theme } = useMavisTheme();
|
|
14
|
+
const id = `m-tooltip-${useId()}`;
|
|
15
|
+
const trigger = ref();
|
|
16
|
+
const panel = ref();
|
|
17
|
+
const host = shallowRef();
|
|
18
|
+
const open = ref(false), ready = ref(false);
|
|
19
|
+
const position = ref({ x: 0, y: 0 });
|
|
20
|
+
let hovered = false, focused = false, pinned = false, suppressed = false;
|
|
21
|
+
let timer;
|
|
22
|
+
let observer;
|
|
23
|
+
let frame = 0, revision = 0;
|
|
24
|
+
let active = false;
|
|
25
|
+
const motion = markRaw(createMotionSurface());
|
|
26
|
+
onScopeDispose(motion.use(() => {
|
|
27
|
+
if (open.value)
|
|
28
|
+
motion.animate({ opacity: [0, 1], y: [3, 0] }, { duration: theme.value.motion.enterDuration });
|
|
29
|
+
}));
|
|
30
|
+
function clearTimer() {
|
|
31
|
+
if (timer)
|
|
32
|
+
clearTimeout(timer);
|
|
33
|
+
timer = undefined;
|
|
34
|
+
}
|
|
35
|
+
function close() {
|
|
36
|
+
clearTimer();
|
|
37
|
+
open.value = false;
|
|
38
|
+
pinned = false;
|
|
39
|
+
}
|
|
40
|
+
function place() {
|
|
41
|
+
frame = 0;
|
|
42
|
+
const anchor = trigger.value?.$el, popup = panel.value;
|
|
43
|
+
if (!active || !open.value || !anchor || !popup)
|
|
44
|
+
return;
|
|
45
|
+
const rect = anchor.getBoundingClientRect();
|
|
46
|
+
if (!anchor.isConnected || !rect.width || !rect.height) {
|
|
47
|
+
close();
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const viewport = window.visualViewport;
|
|
51
|
+
position.value = placePopover(rect, popup.getBoundingClientRect(), {
|
|
52
|
+
x: viewport?.offsetLeft ?? 0,
|
|
53
|
+
y: viewport?.offsetTop ?? 0,
|
|
54
|
+
width: viewport?.width ?? window.innerWidth,
|
|
55
|
+
height: viewport?.height ?? window.innerHeight,
|
|
56
|
+
}, props.placement, getComputedStyle(anchor).direction === 'rtl');
|
|
57
|
+
ready.value = true;
|
|
58
|
+
}
|
|
59
|
+
const schedule = () => {
|
|
60
|
+
if (open.value && !frame)
|
|
61
|
+
frame = requestAnimationFrame(place);
|
|
62
|
+
};
|
|
63
|
+
const escape = (event) => {
|
|
64
|
+
if (open.value && event.key === 'Escape') {
|
|
65
|
+
event.preventDefault();
|
|
66
|
+
event.stopPropagation();
|
|
67
|
+
suppressed = true;
|
|
68
|
+
close();
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
const outside = (event) => {
|
|
72
|
+
if (!trigger.value?.$el?.contains(event.target) &&
|
|
73
|
+
!panel.value?.contains(event.target))
|
|
74
|
+
close();
|
|
75
|
+
};
|
|
76
|
+
function detach() {
|
|
77
|
+
revision++;
|
|
78
|
+
observer?.disconnect();
|
|
79
|
+
observer = undefined;
|
|
80
|
+
if (typeof window === 'undefined')
|
|
81
|
+
return;
|
|
82
|
+
if (frame)
|
|
83
|
+
cancelAnimationFrame(frame);
|
|
84
|
+
frame = 0;
|
|
85
|
+
window.removeEventListener('resize', schedule);
|
|
86
|
+
document.removeEventListener('scroll', schedule, true);
|
|
87
|
+
document.removeEventListener('keydown', escape, true);
|
|
88
|
+
document.removeEventListener('pointerdown', outside, true);
|
|
89
|
+
window.visualViewport?.removeEventListener('resize', schedule);
|
|
90
|
+
window.visualViewport?.removeEventListener('scroll', schedule);
|
|
91
|
+
}
|
|
92
|
+
async function present() {
|
|
93
|
+
detach();
|
|
94
|
+
ready.value = false;
|
|
95
|
+
if (!active || !open.value || props.disabled)
|
|
96
|
+
return;
|
|
97
|
+
const token = revision;
|
|
98
|
+
host.value = trigger.value?.$el?.closest('dialog') ?? document.body;
|
|
99
|
+
await nextTick();
|
|
100
|
+
if (token !== revision || !active || !open.value)
|
|
101
|
+
return;
|
|
102
|
+
place();
|
|
103
|
+
observer = new ResizeObserver(schedule);
|
|
104
|
+
if (panel.value)
|
|
105
|
+
observer.observe(panel.value);
|
|
106
|
+
if (trigger.value?.$el)
|
|
107
|
+
observer.observe(trigger.value.$el);
|
|
108
|
+
window.addEventListener('resize', schedule);
|
|
109
|
+
document.addEventListener('scroll', schedule, true);
|
|
110
|
+
document.addEventListener('keydown', escape, true);
|
|
111
|
+
document.addEventListener('pointerdown', outside, true);
|
|
112
|
+
window.visualViewport?.addEventListener('resize', schedule);
|
|
113
|
+
window.visualViewport?.addEventListener('scroll', schedule);
|
|
114
|
+
if (motion.available)
|
|
115
|
+
motion.animate({ opacity: [0, 1], y: [3, 0] }, { duration: theme.value.motion.enterDuration });
|
|
116
|
+
}
|
|
117
|
+
function show(delay = 0) {
|
|
118
|
+
clearTimer();
|
|
119
|
+
if (props.disabled || suppressed || !active)
|
|
120
|
+
return;
|
|
121
|
+
if (delay)
|
|
122
|
+
timer = setTimeout(() => {
|
|
123
|
+
open.value = true;
|
|
124
|
+
}, delay);
|
|
125
|
+
else
|
|
126
|
+
open.value = true;
|
|
127
|
+
}
|
|
128
|
+
function leave() {
|
|
129
|
+
clearTimer();
|
|
130
|
+
if (!hovered && !focused && !pinned)
|
|
131
|
+
timer = setTimeout(close, 120);
|
|
132
|
+
}
|
|
133
|
+
watch(open, (value) => {
|
|
134
|
+
if (value)
|
|
135
|
+
void present();
|
|
136
|
+
else
|
|
137
|
+
detach();
|
|
138
|
+
});
|
|
139
|
+
watch(() => props.disabled, (value) => {
|
|
140
|
+
if (value)
|
|
141
|
+
close();
|
|
142
|
+
});
|
|
143
|
+
watch(() => props.placement, schedule);
|
|
144
|
+
onMounted(() => {
|
|
145
|
+
active = true;
|
|
146
|
+
host.value = trigger.value?.$el?.closest('dialog') ?? document.body;
|
|
147
|
+
});
|
|
148
|
+
onActivated(() => {
|
|
149
|
+
active = true;
|
|
150
|
+
});
|
|
151
|
+
onDeactivated(() => {
|
|
152
|
+
active = false;
|
|
153
|
+
close();
|
|
154
|
+
detach();
|
|
155
|
+
hovered = focused = pinned = false;
|
|
156
|
+
});
|
|
157
|
+
onBeforeUnmount(() => {
|
|
158
|
+
active = false;
|
|
159
|
+
clearTimer();
|
|
160
|
+
detach();
|
|
161
|
+
});
|
|
162
|
+
return () => {
|
|
163
|
+
if (!props.text.trim() || !props.triggerLabel.trim())
|
|
164
|
+
throw new TypeError('Tooltip requires text and a trigger label.');
|
|
165
|
+
if (!Number.isFinite(props.delay) || props.delay < 0)
|
|
166
|
+
throw new RangeError('Tooltip delay must be nonnegative and finite.');
|
|
167
|
+
const tooltipId = props.id ?? id;
|
|
168
|
+
const content = h('span', {
|
|
169
|
+
ref: panel,
|
|
170
|
+
id: tooltipId,
|
|
171
|
+
role: 'tooltip',
|
|
172
|
+
hidden: !open.value,
|
|
173
|
+
class: 'm-tooltip-content',
|
|
174
|
+
style: {
|
|
175
|
+
position: 'fixed',
|
|
176
|
+
zIndex: 1100,
|
|
177
|
+
left: `${position.value.x}px`,
|
|
178
|
+
top: `${position.value.y}px`,
|
|
179
|
+
width: 'max-content',
|
|
180
|
+
maxWidth: 'min(300px, calc(100vw - 16px))',
|
|
181
|
+
visibility: open.value && ready.value ? 'visible' : 'hidden',
|
|
182
|
+
},
|
|
183
|
+
onPointerenter: () => {
|
|
184
|
+
hovered = true;
|
|
185
|
+
clearTimer();
|
|
186
|
+
},
|
|
187
|
+
onPointerleave: () => {
|
|
188
|
+
hovered = false;
|
|
189
|
+
leave();
|
|
190
|
+
},
|
|
191
|
+
}, [
|
|
192
|
+
h(MBox, {
|
|
193
|
+
motionSurface: motion,
|
|
194
|
+
padding: 'sm',
|
|
195
|
+
radius: 'md',
|
|
196
|
+
backgroundColor: theme.value.colors.text,
|
|
197
|
+
style: {
|
|
198
|
+
color: theme.value.colors.background,
|
|
199
|
+
fontSize: '13px',
|
|
200
|
+
lineHeight: 1.5,
|
|
201
|
+
boxShadow: '0 6px 20px #0002',
|
|
202
|
+
overflowWrap: 'anywhere',
|
|
203
|
+
},
|
|
204
|
+
}, () => props.text),
|
|
205
|
+
]);
|
|
206
|
+
return h('span', mergeProps(attrs, {
|
|
207
|
+
class: 'm-tooltip',
|
|
208
|
+
style: { display: 'inline-flex', alignSelf: 'flex-start' },
|
|
209
|
+
}), [
|
|
210
|
+
h(MButton, {
|
|
211
|
+
ref: trigger,
|
|
212
|
+
icon: props.icon,
|
|
213
|
+
accessibilityLabel: props.triggerLabel,
|
|
214
|
+
variant: props.variant,
|
|
215
|
+
disabled: props.disabled,
|
|
216
|
+
'aria-describedby': tooltipId,
|
|
217
|
+
onPointerenter: (event) => {
|
|
218
|
+
if (event.pointerType === 'touch')
|
|
219
|
+
return;
|
|
220
|
+
hovered = true;
|
|
221
|
+
suppressed = false;
|
|
222
|
+
show(props.delay);
|
|
223
|
+
},
|
|
224
|
+
onPointerleave: () => {
|
|
225
|
+
hovered = false;
|
|
226
|
+
if (!focused)
|
|
227
|
+
suppressed = false;
|
|
228
|
+
leave();
|
|
229
|
+
},
|
|
230
|
+
onFocus: () => {
|
|
231
|
+
focused = true;
|
|
232
|
+
suppressed = false;
|
|
233
|
+
show();
|
|
234
|
+
},
|
|
235
|
+
onBlur: () => {
|
|
236
|
+
focused = false;
|
|
237
|
+
pinned = false;
|
|
238
|
+
leave();
|
|
239
|
+
},
|
|
240
|
+
onClick: () => {
|
|
241
|
+
if (props.disabled)
|
|
242
|
+
return;
|
|
243
|
+
if (pinned) {
|
|
244
|
+
suppressed = true;
|
|
245
|
+
close();
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
pinned = true;
|
|
249
|
+
suppressed = false;
|
|
250
|
+
show();
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
}),
|
|
254
|
+
host.value ? h(Teleport, { to: host.value }, content) : content,
|
|
255
|
+
]);
|
|
256
|
+
};
|
|
257
|
+
},
|
|
258
|
+
});
|
|
259
|
+
//# sourceMappingURL=MTooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MTooltip.js","sourceRoot":"","sources":["../../src/components/MTooltip.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,CAAC,EACD,OAAO,EACP,UAAU,EACV,QAAQ,EACR,WAAW,EACX,eAAe,EACf,aAAa,EACb,SAAS,EACT,cAAc,EACd,GAAG,EACH,UAAU,EACV,QAAQ,EACR,KAAK,EACL,KAAK,GACN,MAAM,KAAK,CAAA;AACZ,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CA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BACb,UAAU,GAAG,KAAK,CAAA;4BAClB,IAAI,EAAE,CAAA;wBACR,CAAC;oBACH,CAAC;iBACF,CAAC;gBACF,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO;aAChE,CACF,CAAA;QACH,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA"}
|
|
@@ -533,9 +533,9 @@ export declare const MNumberInput: {
|
|
|
533
533
|
helperText: string;
|
|
534
534
|
readonly: boolean;
|
|
535
535
|
closeLabel: string;
|
|
536
|
-
maxSelected: number;
|
|
537
|
-
searchLabel: string;
|
|
538
536
|
emptyLabel: string;
|
|
537
|
+
searchLabel: string;
|
|
538
|
+
maxSelected: number;
|
|
539
539
|
removeLabel: string;
|
|
540
540
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
541
541
|
//# sourceMappingURL=configurator.d.ts.map
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
export declare const MCalendar: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
id: StringConstructor;
|
|
3
|
+
label: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
required: true;
|
|
6
|
+
};
|
|
7
|
+
mode: {
|
|
8
|
+
type: import("vue").PropType<"single" | "range">;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
modelValue: {
|
|
12
|
+
type: import("vue").PropType<import("@getcortexlabs/mavis-core").CivilDate | import("@getcortexlabs/mavis-core").DateRange | null>;
|
|
13
|
+
default: null;
|
|
14
|
+
};
|
|
15
|
+
min: {
|
|
16
|
+
type: import("vue").PropType<import("@getcortexlabs/mavis-core").CivilDate>;
|
|
17
|
+
default: undefined;
|
|
18
|
+
};
|
|
19
|
+
max: {
|
|
20
|
+
type: import("vue").PropType<import("@getcortexlabs/mavis-core").CivilDate>;
|
|
21
|
+
default: undefined;
|
|
22
|
+
};
|
|
23
|
+
unavailableDates: {
|
|
24
|
+
type: import("vue").PropType<readonly import("@getcortexlabs/mavis-core").CivilDate[]>;
|
|
25
|
+
default: () => never[];
|
|
26
|
+
};
|
|
27
|
+
locale: {
|
|
28
|
+
type: import("vue").PropType<import("@getcortexlabs/mavis-core").DateLocale>;
|
|
29
|
+
default: "en-US";
|
|
30
|
+
};
|
|
31
|
+
firstDayOfWeek: {
|
|
32
|
+
type: NumberConstructor;
|
|
33
|
+
default: undefined;
|
|
34
|
+
};
|
|
35
|
+
initialMonth: {
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
default: string;
|
|
38
|
+
};
|
|
39
|
+
disabled: BooleanConstructor;
|
|
40
|
+
readonly: BooleanConstructor;
|
|
41
|
+
invalidRangeLabel: {
|
|
42
|
+
type: StringConstructor;
|
|
43
|
+
default: string;
|
|
44
|
+
};
|
|
45
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
46
|
+
[key: string]: any;
|
|
47
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
48
|
+
'update:modelValue': (_value: import("@getcortexlabs/mavis-core").CivilDate | import("@getcortexlabs/mavis-core").DateRange | null) => true;
|
|
49
|
+
invalid: () => true;
|
|
50
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
51
|
+
id: StringConstructor;
|
|
52
|
+
label: {
|
|
53
|
+
type: StringConstructor;
|
|
54
|
+
required: true;
|
|
55
|
+
};
|
|
56
|
+
mode: {
|
|
57
|
+
type: import("vue").PropType<"single" | "range">;
|
|
58
|
+
default: string;
|
|
59
|
+
};
|
|
60
|
+
modelValue: {
|
|
61
|
+
type: import("vue").PropType<import("@getcortexlabs/mavis-core").CivilDate | import("@getcortexlabs/mavis-core").DateRange | null>;
|
|
62
|
+
default: null;
|
|
63
|
+
};
|
|
64
|
+
min: {
|
|
65
|
+
type: import("vue").PropType<import("@getcortexlabs/mavis-core").CivilDate>;
|
|
66
|
+
default: undefined;
|
|
67
|
+
};
|
|
68
|
+
max: {
|
|
69
|
+
type: import("vue").PropType<import("@getcortexlabs/mavis-core").CivilDate>;
|
|
70
|
+
default: undefined;
|
|
71
|
+
};
|
|
72
|
+
unavailableDates: {
|
|
73
|
+
type: import("vue").PropType<readonly import("@getcortexlabs/mavis-core").CivilDate[]>;
|
|
74
|
+
default: () => never[];
|
|
75
|
+
};
|
|
76
|
+
locale: {
|
|
77
|
+
type: import("vue").PropType<import("@getcortexlabs/mavis-core").DateLocale>;
|
|
78
|
+
default: "en-US";
|
|
79
|
+
};
|
|
80
|
+
firstDayOfWeek: {
|
|
81
|
+
type: NumberConstructor;
|
|
82
|
+
default: undefined;
|
|
83
|
+
};
|
|
84
|
+
initialMonth: {
|
|
85
|
+
type: StringConstructor;
|
|
86
|
+
default: string;
|
|
87
|
+
};
|
|
88
|
+
disabled: BooleanConstructor;
|
|
89
|
+
readonly: BooleanConstructor;
|
|
90
|
+
invalidRangeLabel: {
|
|
91
|
+
type: StringConstructor;
|
|
92
|
+
default: string;
|
|
93
|
+
};
|
|
94
|
+
}>> & Readonly<{
|
|
95
|
+
onInvalid?: (() => any) | undefined;
|
|
96
|
+
"onUpdate:modelValue"?: ((_value: `${number}-${number}-${number}` | import("@getcortexlabs/mavis-core").DateRange | null) => any) | undefined;
|
|
97
|
+
}>, {
|
|
98
|
+
disabled: boolean;
|
|
99
|
+
modelValue: `${number}-${number}-${number}` | import("@getcortexlabs/mavis-core").DateRange | null;
|
|
100
|
+
readonly: boolean;
|
|
101
|
+
locale: import("@getcortexlabs/mavis-core").DateLocale;
|
|
102
|
+
min: `${number}-${number}-${number}`;
|
|
103
|
+
max: `${number}-${number}-${number}`;
|
|
104
|
+
initialMonth: string;
|
|
105
|
+
unavailableDates: readonly `${number}-${number}-${number}`[];
|
|
106
|
+
firstDayOfWeek: number;
|
|
107
|
+
mode: "range" | "single";
|
|
108
|
+
invalidRangeLabel: string;
|
|
109
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, MRating: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
110
|
+
label: {
|
|
111
|
+
type: StringConstructor;
|
|
112
|
+
required: true;
|
|
113
|
+
};
|
|
114
|
+
id: StringConstructor;
|
|
115
|
+
modelValue: {
|
|
116
|
+
type: NumberConstructor;
|
|
117
|
+
default: number;
|
|
118
|
+
};
|
|
119
|
+
max: {
|
|
120
|
+
type: NumberConstructor;
|
|
121
|
+
default: number;
|
|
122
|
+
};
|
|
123
|
+
step: {
|
|
124
|
+
type: import("vue").PropType<1 | 0.5>;
|
|
125
|
+
default: number;
|
|
126
|
+
};
|
|
127
|
+
disabled: BooleanConstructor;
|
|
128
|
+
readonly: BooleanConstructor;
|
|
129
|
+
clearable: {
|
|
130
|
+
type: BooleanConstructor;
|
|
131
|
+
default: boolean;
|
|
132
|
+
};
|
|
133
|
+
clearLabel: {
|
|
134
|
+
type: StringConstructor;
|
|
135
|
+
default: string;
|
|
136
|
+
};
|
|
137
|
+
formatValue: import("vue").PropType<(value: number, max: number) => string>;
|
|
138
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
139
|
+
[key: string]: any;
|
|
140
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
141
|
+
'update:modelValue': (_value: number) => true;
|
|
142
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
143
|
+
label: {
|
|
144
|
+
type: StringConstructor;
|
|
145
|
+
required: true;
|
|
146
|
+
};
|
|
147
|
+
id: StringConstructor;
|
|
148
|
+
modelValue: {
|
|
149
|
+
type: NumberConstructor;
|
|
150
|
+
default: number;
|
|
151
|
+
};
|
|
152
|
+
max: {
|
|
153
|
+
type: NumberConstructor;
|
|
154
|
+
default: number;
|
|
155
|
+
};
|
|
156
|
+
step: {
|
|
157
|
+
type: import("vue").PropType<1 | 0.5>;
|
|
158
|
+
default: number;
|
|
159
|
+
};
|
|
160
|
+
disabled: BooleanConstructor;
|
|
161
|
+
readonly: BooleanConstructor;
|
|
162
|
+
clearable: {
|
|
163
|
+
type: BooleanConstructor;
|
|
164
|
+
default: boolean;
|
|
165
|
+
};
|
|
166
|
+
clearLabel: {
|
|
167
|
+
type: StringConstructor;
|
|
168
|
+
default: string;
|
|
169
|
+
};
|
|
170
|
+
formatValue: import("vue").PropType<(value: number, max: number) => string>;
|
|
171
|
+
}>> & Readonly<{
|
|
172
|
+
"onUpdate:modelValue"?: ((_value: number) => any) | undefined;
|
|
173
|
+
}>, {
|
|
174
|
+
disabled: boolean;
|
|
175
|
+
modelValue: number;
|
|
176
|
+
readonly: boolean;
|
|
177
|
+
max: number;
|
|
178
|
+
step: 1 | 0.5;
|
|
179
|
+
clearable: boolean;
|
|
180
|
+
clearLabel: string;
|
|
181
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
182
|
+
export declare const MTreeView: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
183
|
+
id: StringConstructor;
|
|
184
|
+
label: {
|
|
185
|
+
type: StringConstructor;
|
|
186
|
+
required: true;
|
|
187
|
+
};
|
|
188
|
+
nodes: {
|
|
189
|
+
type: import("vue").PropType<readonly import("@getcortexlabs/mavis-core").TreeNode[]>;
|
|
190
|
+
required: true;
|
|
191
|
+
};
|
|
192
|
+
modelValue: {
|
|
193
|
+
type: import("vue").PropType<import("@getcortexlabs/mavis-core").ChoiceValue | null>;
|
|
194
|
+
default: null;
|
|
195
|
+
};
|
|
196
|
+
expanded: {
|
|
197
|
+
type: import("vue").PropType<readonly import("@getcortexlabs/mavis-core").ChoiceValue[]>;
|
|
198
|
+
default: () => never[];
|
|
199
|
+
};
|
|
200
|
+
loadingKeys: {
|
|
201
|
+
type: import("vue").PropType<readonly import("@getcortexlabs/mavis-core").ChoiceValue[]>;
|
|
202
|
+
default: () => never[];
|
|
203
|
+
};
|
|
204
|
+
disabled: BooleanConstructor;
|
|
205
|
+
emptyLabel: {
|
|
206
|
+
type: StringConstructor;
|
|
207
|
+
default: string;
|
|
208
|
+
};
|
|
209
|
+
loadingLabel: {
|
|
210
|
+
type: StringConstructor;
|
|
211
|
+
default: string;
|
|
212
|
+
};
|
|
213
|
+
expandedLabel: {
|
|
214
|
+
type: StringConstructor;
|
|
215
|
+
default: string;
|
|
216
|
+
};
|
|
217
|
+
collapsedLabel: {
|
|
218
|
+
type: StringConstructor;
|
|
219
|
+
default: string;
|
|
220
|
+
};
|
|
221
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
222
|
+
[key: string]: any;
|
|
223
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
224
|
+
'update:modelValue': (_key: import("@getcortexlabs/mavis-core").ChoiceValue) => true;
|
|
225
|
+
'update:expanded': (_keys: import("@getcortexlabs/mavis-core").ChoiceValue[]) => true;
|
|
226
|
+
load: (_node: import("@getcortexlabs/mavis-core").TreeNode) => true;
|
|
227
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
228
|
+
id: StringConstructor;
|
|
229
|
+
label: {
|
|
230
|
+
type: StringConstructor;
|
|
231
|
+
required: true;
|
|
232
|
+
};
|
|
233
|
+
nodes: {
|
|
234
|
+
type: import("vue").PropType<readonly import("@getcortexlabs/mavis-core").TreeNode[]>;
|
|
235
|
+
required: true;
|
|
236
|
+
};
|
|
237
|
+
modelValue: {
|
|
238
|
+
type: import("vue").PropType<import("@getcortexlabs/mavis-core").ChoiceValue | null>;
|
|
239
|
+
default: null;
|
|
240
|
+
};
|
|
241
|
+
expanded: {
|
|
242
|
+
type: import("vue").PropType<readonly import("@getcortexlabs/mavis-core").ChoiceValue[]>;
|
|
243
|
+
default: () => never[];
|
|
244
|
+
};
|
|
245
|
+
loadingKeys: {
|
|
246
|
+
type: import("vue").PropType<readonly import("@getcortexlabs/mavis-core").ChoiceValue[]>;
|
|
247
|
+
default: () => never[];
|
|
248
|
+
};
|
|
249
|
+
disabled: BooleanConstructor;
|
|
250
|
+
emptyLabel: {
|
|
251
|
+
type: StringConstructor;
|
|
252
|
+
default: string;
|
|
253
|
+
};
|
|
254
|
+
loadingLabel: {
|
|
255
|
+
type: StringConstructor;
|
|
256
|
+
default: string;
|
|
257
|
+
};
|
|
258
|
+
expandedLabel: {
|
|
259
|
+
type: StringConstructor;
|
|
260
|
+
default: string;
|
|
261
|
+
};
|
|
262
|
+
collapsedLabel: {
|
|
263
|
+
type: StringConstructor;
|
|
264
|
+
default: string;
|
|
265
|
+
};
|
|
266
|
+
}>> & Readonly<{
|
|
267
|
+
"onUpdate:modelValue"?: ((_key: import("@getcortexlabs/mavis-core").ChoiceValue) => any) | undefined;
|
|
268
|
+
onLoad?: ((_node: import("@getcortexlabs/mavis-core").TreeNode) => any) | undefined;
|
|
269
|
+
"onUpdate:expanded"?: ((_keys: import("@getcortexlabs/mavis-core").ChoiceValue[]) => any) | undefined;
|
|
270
|
+
}>, {
|
|
271
|
+
expandedLabel: string;
|
|
272
|
+
collapsedLabel: string;
|
|
273
|
+
disabled: boolean;
|
|
274
|
+
expanded: readonly import("@getcortexlabs/mavis-core").ChoiceValue[];
|
|
275
|
+
modelValue: import("@getcortexlabs/mavis-core").ChoiceValue | null;
|
|
276
|
+
loadingLabel: string;
|
|
277
|
+
emptyLabel: string;
|
|
278
|
+
loadingKeys: readonly import("@getcortexlabs/mavis-core").ChoiceValue[];
|
|
279
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
280
|
+
export declare const MCarousel: import("@getcortexlabs/mavis-core/vue").CarouselComponent;
|
|
281
|
+
export declare const MDataTable: import("@getcortexlabs/mavis-core/vue").DataTableComponent;
|
|
282
|
+
//# sourceMappingURL=discovery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../src/components/discovery.ts"],"names":[],"mappings":"AA+BA,eAAO,MAAQ,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EAAuC,CAAA;AACxE,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EAOrB,CAAA;AACD,eAAO,MAAM,SAAS,2DAoDrB,CAAA;AAGD,eAAO,MAAM,UAAU,4DAmEtB,CAAA"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { h } from 'vue';
|
|
2
|
+
import { createDiscoveryControls, createCarousel, createTreeView, createDataTable, } from '@getcortexlabs/mavis-core/vue';
|
|
3
|
+
import { MRow, MColumn, MBox } from './layout.js';
|
|
4
|
+
import { MText } from './MText.js';
|
|
5
|
+
import { MButton } from './MButton.js';
|
|
6
|
+
import { MIcon } from './MIcon.js';
|
|
7
|
+
import { MSlider } from './MSlider.js';
|
|
8
|
+
import { MCheckbox } from './MCheckbox.js';
|
|
9
|
+
import { MProgress } from './MProgress.js';
|
|
10
|
+
import { MReveal } from './MReveal.js';
|
|
11
|
+
import { DateCalendar } from './DateCalendar.js';
|
|
12
|
+
const ui = {
|
|
13
|
+
Row: MRow,
|
|
14
|
+
Column: MColumn,
|
|
15
|
+
Box: MBox,
|
|
16
|
+
Text: MText,
|
|
17
|
+
Button: MButton,
|
|
18
|
+
Icon: MIcon,
|
|
19
|
+
Slider: MSlider,
|
|
20
|
+
Checkbox: MCheckbox,
|
|
21
|
+
Progress: MProgress,
|
|
22
|
+
Reveal: MReveal,
|
|
23
|
+
Calendar: DateCalendar,
|
|
24
|
+
};
|
|
25
|
+
export const { MCalendar, MRating } = createDiscoveryControls(ui, 'web');
|
|
26
|
+
export const MTreeView = createTreeView({
|
|
27
|
+
...ui,
|
|
28
|
+
focus: (id) => document.getElementById(id)?.focus(),
|
|
29
|
+
containsFocus: (id) => !!document.getElementById(id)?.contains(document.activeElement),
|
|
30
|
+
}, 'web');
|
|
31
|
+
export const MCarousel = createCarousel({
|
|
32
|
+
...ui,
|
|
33
|
+
gestures: (move) => {
|
|
34
|
+
let start;
|
|
35
|
+
return {
|
|
36
|
+
tabindex: 0,
|
|
37
|
+
onKeydown: (event) => {
|
|
38
|
+
if (event.target !== event.currentTarget ||
|
|
39
|
+
event.altKey ||
|
|
40
|
+
event.ctrlKey ||
|
|
41
|
+
event.metaKey)
|
|
42
|
+
return;
|
|
43
|
+
const rtl = getComputedStyle(event.currentTarget).direction === 'rtl';
|
|
44
|
+
if (event.key === 'ArrowRight' || event.key === 'ArrowLeft') {
|
|
45
|
+
event.preventDefault();
|
|
46
|
+
move((event.key === 'ArrowRight' ? 1 : -1) * (rtl ? -1 : 1));
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
onPointerdown: (event) => {
|
|
50
|
+
start = undefined;
|
|
51
|
+
if (!event.isPrimary ||
|
|
52
|
+
event.button !== 0 ||
|
|
53
|
+
event.target.closest('button,a,input,textarea,select,[contenteditable]'))
|
|
54
|
+
return;
|
|
55
|
+
start = { x: event.clientX, y: event.clientY, id: event.pointerId };
|
|
56
|
+
event.currentTarget.setPointerCapture(event.pointerId);
|
|
57
|
+
},
|
|
58
|
+
onPointercancel: () => {
|
|
59
|
+
start = undefined;
|
|
60
|
+
},
|
|
61
|
+
onPointerup: (event) => {
|
|
62
|
+
const point = start;
|
|
63
|
+
start = undefined;
|
|
64
|
+
if (!point || point.id !== event.pointerId)
|
|
65
|
+
return;
|
|
66
|
+
const dx = event.clientX - point.x, dy = event.clientY - point.y;
|
|
67
|
+
if (Math.abs(dx) > 40 && Math.abs(dx) > Math.abs(dy) * 1.5) {
|
|
68
|
+
const rtl = getComputedStyle(event.currentTarget).direction === 'rtl';
|
|
69
|
+
move((dx < 0 ? 1 : -1) * (rtl ? -1 : 1));
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
},
|
|
74
|
+
}, 'web');
|
|
75
|
+
// Theme access must happen in setup, not in the render callback supplied to the factory.
|
|
76
|
+
export const MDataTable = createDataTable({
|
|
77
|
+
...ui,
|
|
78
|
+
table: (columns, header, rows, label, busy) => {
|
|
79
|
+
const cell = (column) => ({
|
|
80
|
+
padding: '12px 16px',
|
|
81
|
+
minWidth: `${column.width ?? 144}px`,
|
|
82
|
+
width: column.width ? `${column.width}px` : undefined,
|
|
83
|
+
textAlign: column.align === 'end' ? 'end' : 'start',
|
|
84
|
+
verticalAlign: 'middle',
|
|
85
|
+
});
|
|
86
|
+
return h('div', {
|
|
87
|
+
class: 'm-data-table-scroll',
|
|
88
|
+
tabindex: 0,
|
|
89
|
+
role: 'region',
|
|
90
|
+
'aria-label': label,
|
|
91
|
+
style: { overflowX: 'auto', borderRadius: 'inherit' },
|
|
92
|
+
}, [
|
|
93
|
+
h('table', {
|
|
94
|
+
'aria-label': label,
|
|
95
|
+
'aria-busy': busy,
|
|
96
|
+
style: { width: '100%', borderCollapse: 'collapse' },
|
|
97
|
+
}, [
|
|
98
|
+
h('thead', [
|
|
99
|
+
h('tr', columns.map((column, index) => h('th', {
|
|
100
|
+
key: column.key,
|
|
101
|
+
scope: 'col',
|
|
102
|
+
'aria-sort': column.sort,
|
|
103
|
+
style: cell(column),
|
|
104
|
+
}, [header[index]]))),
|
|
105
|
+
]),
|
|
106
|
+
h('tbody', rows.map((row) => h('tr', { key: row.key, 'data-selected': row.selected }, row.cells.map((content, index) => h('td', { key: columns[index].key, style: cell(columns[index]) }, [
|
|
107
|
+
content,
|
|
108
|
+
]))))),
|
|
109
|
+
]),
|
|
110
|
+
]);
|
|
111
|
+
},
|
|
112
|
+
}, 'web');
|
|
113
|
+
//# sourceMappingURL=discovery.js.map
|