@onsvisual/svelte-components 0.1.39 → 0.1.40
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.
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
|
|
21
21
|
const sections = getContext("sections");
|
|
22
22
|
const selected = getContext("selected");
|
|
23
|
-
const border = getContext("border");
|
|
24
23
|
|
|
25
24
|
let el;
|
|
26
25
|
|
|
@@ -43,17 +42,7 @@
|
|
|
43
42
|
class="ons-tabs__panel"
|
|
44
43
|
bind:this="{el}"
|
|
45
44
|
class:ons-tabs__panel--hidden="{$selected !== id}"
|
|
46
|
-
class:tab-border="{$border}"
|
|
47
45
|
>
|
|
48
46
|
<h2 id="{id}-content-title" class="ons-u-vh" class:ons-u-vh="{hideTitle}">{title}</h2>
|
|
49
47
|
<slot />
|
|
50
48
|
</section>
|
|
51
|
-
|
|
52
|
-
<style>
|
|
53
|
-
section.tab-border {
|
|
54
|
-
border: 1px solid var(--ons-color-borders);
|
|
55
|
-
border-radius: 4px;
|
|
56
|
-
border-top-left-radius: 0;
|
|
57
|
-
padding-left: 12px;
|
|
58
|
-
padding-right: 12px;
|
|
59
|
-
}</style>
|
|
@@ -18,9 +18,6 @@
|
|
|
18
18
|
const selected = writable(null);
|
|
19
19
|
setContext("selected", selected);
|
|
20
20
|
|
|
21
|
-
const _border = writable(border);
|
|
22
|
-
setContext("border", _border);
|
|
23
|
-
|
|
24
21
|
function showSection(id) {
|
|
25
22
|
$selected = id;
|
|
26
23
|
[...$sections].forEach(
|
|
@@ -31,9 +28,9 @@
|
|
|
31
28
|
}
|
|
32
29
|
</script>
|
|
33
30
|
|
|
34
|
-
<section class="ons-tabs">
|
|
31
|
+
<section class="ons-tabs" class:ons-tabs__border="{border}">
|
|
35
32
|
<h2 class="ons-tabs__title ons-u-fs-r--b ons-u-mt-no ons-u-vh">Contents</h2>
|
|
36
|
-
<div class="ons-tabs__container"
|
|
33
|
+
<div class="ons-tabs__container">
|
|
37
34
|
<ul class="ons-tabs__list ons-tabs__list--row" role="tablist">
|
|
38
35
|
{#each $sections as section}
|
|
39
36
|
<li
|
|
@@ -91,6 +88,13 @@
|
|
|
91
88
|
.ons-tab[aria-selected="true"]:not(:focus) {
|
|
92
89
|
background-color: var(--background, white);
|
|
93
90
|
}
|
|
94
|
-
.
|
|
91
|
+
.ons-tabs__border > .ons-tabs__container {
|
|
95
92
|
border: none;
|
|
93
|
+
}
|
|
94
|
+
.ons-tabs__border :global(.ons-tabs__panel) {
|
|
95
|
+
border: 1px solid var(--ons-color-borders);
|
|
96
|
+
border-radius: 4px;
|
|
97
|
+
border-top-left-radius: 0;
|
|
98
|
+
padding-left: 12px;
|
|
99
|
+
padding-right: 12px;
|
|
96
100
|
}</style>
|