@onsvisual/svelte-components 1.1.52 → 1.1.54
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.
|
@@ -6,6 +6,11 @@
|
|
|
6
6
|
* @type {number}
|
|
7
7
|
*/
|
|
8
8
|
export let colspan = 1;
|
|
9
|
+
/**
|
|
10
|
+
* (Optional) override column class
|
|
11
|
+
* @type {string|null}
|
|
12
|
+
*/
|
|
13
|
+
export let cls = null;
|
|
9
14
|
|
|
10
15
|
const classes = {
|
|
11
16
|
narrow: {
|
|
@@ -46,11 +51,13 @@
|
|
|
46
51
|
const width = getContext("width") || "wide";
|
|
47
52
|
const colWidth = getContext("colWidth") || null;
|
|
48
53
|
const rowHeight = getContext("rowHeight") || null;
|
|
49
|
-
const colClass =
|
|
50
|
-
?
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
+
const colClass = cls
|
|
55
|
+
? cls
|
|
56
|
+
: colWidth
|
|
57
|
+
? calcSpans(classes?.[width]?.[colWidth] || [], colspan)
|
|
58
|
+
.map((c) => `ons-col-${c}`)
|
|
59
|
+
.join(" ")
|
|
60
|
+
: "";
|
|
54
61
|
</script>
|
|
55
62
|
|
|
56
63
|
{#if colWidth}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
/** @typedef {typeof __propDef.events} GridCellEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} GridCellSlots */
|
|
4
4
|
export default class GridCell extends SvelteComponentTyped<{
|
|
5
|
+
cls?: string | null | undefined;
|
|
5
6
|
colspan?: number | undefined;
|
|
6
7
|
}, {
|
|
7
8
|
[evt: string]: CustomEvent<any>;
|
|
@@ -15,6 +16,7 @@ export type GridCellSlots = typeof __propDef.slots;
|
|
|
15
16
|
import { SvelteComponentTyped } from "svelte";
|
|
16
17
|
declare const __propDef: {
|
|
17
18
|
props: {
|
|
19
|
+
cls?: string | null | undefined;
|
|
18
20
|
colspan?: number | undefined;
|
|
19
21
|
};
|
|
20
22
|
events: {
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
export let width = null;
|
|
20
20
|
/**
|
|
21
21
|
* Set z-index of tooltip, to ensure it appears in front of other elements
|
|
22
|
-
* @type {number}
|
|
22
|
+
* @type {number|null}
|
|
23
23
|
*/
|
|
24
|
-
export let zIndex =
|
|
24
|
+
export let zIndex = null;
|
|
25
25
|
|
|
26
26
|
let wrapper, tooltip; // HTML element bindings
|
|
27
27
|
let showToolip = null;
|
|
@@ -85,7 +85,13 @@
|
|
|
85
85
|
<slot />
|
|
86
86
|
</div>
|
|
87
87
|
|
|
88
|
-
<div
|
|
88
|
+
<div
|
|
89
|
+
class="tooltip"
|
|
90
|
+
role="tooltip"
|
|
91
|
+
data-show={showToolip}
|
|
92
|
+
bind:this={tooltip}
|
|
93
|
+
style:z-index={zIndex}
|
|
94
|
+
>
|
|
89
95
|
{text}
|
|
90
96
|
<div class="tooltip-arrow" data-popper-arrow></div>
|
|
91
97
|
</div>
|
|
@@ -5,7 +5,7 @@ export default class Tooltip extends SvelteComponentTyped<{
|
|
|
5
5
|
width?: number | null | undefined;
|
|
6
6
|
text?: string | undefined;
|
|
7
7
|
position?: "top" | "bottom" | "left" | "right" | undefined;
|
|
8
|
-
zIndex?: number | undefined;
|
|
8
|
+
zIndex?: number | null | undefined;
|
|
9
9
|
}, {
|
|
10
10
|
[evt: string]: CustomEvent<any>;
|
|
11
11
|
}, {
|
|
@@ -21,7 +21,7 @@ declare const __propDef: {
|
|
|
21
21
|
width?: number | null | undefined;
|
|
22
22
|
text?: string | undefined;
|
|
23
23
|
position?: "top" | "bottom" | "left" | "right" | undefined;
|
|
24
|
-
zIndex?: number | undefined;
|
|
24
|
+
zIndex?: number | null | undefined;
|
|
25
25
|
};
|
|
26
26
|
events: {
|
|
27
27
|
[evt: string]: CustomEvent<any>;
|