@300codes/design-system 1.2.3 → 1.2.5
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/package.json
CHANGED
|
@@ -29,10 +29,11 @@ const emit = defineEmits<{
|
|
|
29
29
|
'relative inline-flex',
|
|
30
30
|
]"
|
|
31
31
|
>
|
|
32
|
-
<div :class="['baseTooltip__body', 'flex items-
|
|
32
|
+
<div :class="['baseTooltip__body', 'flex items-start']">
|
|
33
33
|
<div class="baseTooltip__text">
|
|
34
34
|
<slot />
|
|
35
35
|
</div>
|
|
36
|
+
|
|
36
37
|
<button
|
|
37
38
|
v-if="closeSize"
|
|
38
39
|
:class="[
|
|
@@ -40,7 +41,7 @@ const emit = defineEmits<{
|
|
|
40
41
|
'bg-transparent border-0 p-0 cursor-pointer inline-flex items-center justify-center shrink-0',
|
|
41
42
|
]"
|
|
42
43
|
type="button"
|
|
43
|
-
aria-label="
|
|
44
|
+
aria-label="Zamknij"
|
|
44
45
|
@click="emit('close')"
|
|
45
46
|
>
|
|
46
47
|
<BaseIcon
|
|
@@ -49,6 +50,7 @@ const emit = defineEmits<{
|
|
|
49
50
|
/>
|
|
50
51
|
</button>
|
|
51
52
|
</div>
|
|
53
|
+
|
|
52
54
|
<span
|
|
53
55
|
aria-hidden="true"
|
|
54
56
|
class="baseTooltip__arrow absolute w-0 h-0"
|
|
@@ -67,7 +69,7 @@ const emit = defineEmits<{
|
|
|
67
69
|
color: var(--baseTooltip-fg, #ffffff);
|
|
68
70
|
border-radius: var(--baseTooltip-radius, 0.5rem);
|
|
69
71
|
max-width: var(--baseTooltip-max-w, 12.25rem);
|
|
70
|
-
padding: var(--baseTooltip-py,
|
|
72
|
+
padding: var(--baseTooltip-py, 0.75rem) var(--baseTooltip-px, 0.75rem);
|
|
71
73
|
font-size: var(--baseTooltip-font-size, 0.75rem);
|
|
72
74
|
}
|
|
73
75
|
|
|
@@ -24,7 +24,7 @@ const props = withDefaults(defineProps<TabsListProps>(), {
|
|
|
24
24
|
|
|
25
25
|
const model = defineModel<string>({ default: '' });
|
|
26
26
|
|
|
27
|
-
const listRef = ref<
|
|
27
|
+
const listRef = ref<HTMLDivElement | null>(null);
|
|
28
28
|
const focusedIndex = ref<number>(-1);
|
|
29
29
|
|
|
30
30
|
const activeIndex = computed<number>(() => {
|
|
@@ -71,50 +71,46 @@ watch(model, () => {
|
|
|
71
71
|
</script>
|
|
72
72
|
|
|
73
73
|
<template>
|
|
74
|
-
<
|
|
74
|
+
<div
|
|
75
75
|
ref="listRef"
|
|
76
76
|
role="tablist"
|
|
77
77
|
:class="[
|
|
78
78
|
'tabsList',
|
|
79
79
|
`tabsList--${size}`,
|
|
80
80
|
{ 'tabsList--vertical': vertical },
|
|
81
|
-
'flex flex-nowrap items-center overflow-x-auto
|
|
81
|
+
'flex flex-nowrap items-center overflow-x-auto m-0 p-0',
|
|
82
82
|
]"
|
|
83
83
|
@focusout="handleFocusOut"
|
|
84
84
|
>
|
|
85
|
-
<
|
|
85
|
+
<button
|
|
86
86
|
v-for="(item, index) in items"
|
|
87
87
|
:key="item.value"
|
|
88
|
-
role="
|
|
89
|
-
|
|
88
|
+
role="tab"
|
|
89
|
+
type="button"
|
|
90
|
+
:class="[
|
|
91
|
+
'tabsList__tab',
|
|
92
|
+
{
|
|
93
|
+
'tabsList__tab--active': model === item.value,
|
|
94
|
+
'tabsList__tab--disabled': item.disabled,
|
|
95
|
+
},
|
|
96
|
+
'shrink-0 inline-flex items-center justify-center whitespace-nowrap cursor-pointer border-0',
|
|
97
|
+
]"
|
|
98
|
+
:tabindex="getTabIndex(index)"
|
|
99
|
+
:aria-selected="model === item.value"
|
|
100
|
+
:disabled="item.disabled"
|
|
101
|
+
@click="model = item.value"
|
|
102
|
+
@keydown="handleKeydown($event, index)"
|
|
90
103
|
>
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
:tabindex="getTabIndex(index)"
|
|
102
|
-
:aria-selected="model === item.value"
|
|
103
|
-
:disabled="item.disabled"
|
|
104
|
-
@click="model = item.value"
|
|
105
|
-
@keydown="handleKeydown($event, index)"
|
|
106
|
-
>
|
|
107
|
-
{{ item.label }}
|
|
108
|
-
|
|
109
|
-
<BaseIcon
|
|
110
|
-
v-if="item.icon"
|
|
111
|
-
:name="item.icon"
|
|
112
|
-
:icon-path="iconPath"
|
|
113
|
-
size="md"
|
|
114
|
-
/>
|
|
115
|
-
</button>
|
|
116
|
-
</li>
|
|
117
|
-
</ul>
|
|
104
|
+
{{ item.label }}
|
|
105
|
+
|
|
106
|
+
<BaseIcon
|
|
107
|
+
v-if="item.icon"
|
|
108
|
+
:name="item.icon"
|
|
109
|
+
:icon-path="iconPath"
|
|
110
|
+
size="md"
|
|
111
|
+
/>
|
|
112
|
+
</button>
|
|
113
|
+
</div>
|
|
118
114
|
</template>
|
|
119
115
|
|
|
120
116
|
<style scoped>
|
|
@@ -157,22 +153,14 @@ watch(model, () => {
|
|
|
157
153
|
@apply cursor-not-allowed pointer-events-none opacity-50;
|
|
158
154
|
}
|
|
159
155
|
|
|
160
|
-
/* ── vertical (md breakpoint and up) ── */
|
|
161
|
-
|
|
162
156
|
.tabsList--vertical {
|
|
163
157
|
@apply md:flex-col;
|
|
164
158
|
}
|
|
165
159
|
|
|
166
|
-
.tabsList--vertical > li {
|
|
167
|
-
@apply md:w-full;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
160
|
.tabsList--vertical .tabsList__tab {
|
|
171
161
|
@apply md:w-full md:justify-between;
|
|
172
162
|
}
|
|
173
163
|
|
|
174
|
-
/* ── lg ── */
|
|
175
|
-
|
|
176
164
|
.tabsList--lg {
|
|
177
165
|
gap: var(--tabsList-lg-gap, 1rem);
|
|
178
166
|
}
|
package/src/css/tokens.css
CHANGED
|
@@ -364,8 +364,8 @@
|
|
|
364
364
|
--baseTooltip-fg: theme(--color-white);
|
|
365
365
|
--baseTooltip-radius: theme(--radius-lg); /* 8px */
|
|
366
366
|
--baseTooltip-max-w: 12.25rem; /* 196px */
|
|
367
|
-
--baseTooltip-px: theme(--spacing-
|
|
368
|
-
--baseTooltip-py: theme(--spacing-
|
|
367
|
+
--baseTooltip-px: theme(--spacing-3); /* 12px */
|
|
368
|
+
--baseTooltip-py: theme(--spacing-3); /* 12px */
|
|
369
369
|
--baseTooltip-gap: theme(--spacing-4); /* 16px — text↔close */
|
|
370
370
|
--baseTooltip-font-size: theme(--text-xs); /* md 12px */
|
|
371
371
|
--baseTooltip-lg-font-size: theme(--text-sm); /* lg 14px */
|