nuance-ui 0.2.2 → 0.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/LICENSE.md +9 -9
- package/README.md +75 -75
- package/dist/module.json +1 -1
- package/dist/runtime/components/action-icon/action-icon-section.vue +3 -3
- package/dist/runtime/components/action-icon/action-icon.vue +22 -22
- package/dist/runtime/components/alert.vue +128 -128
- package/dist/runtime/components/app-shell/app-shell-aside.vue +30 -30
- package/dist/runtime/components/app-shell/app-shell-footer.vue +29 -29
- package/dist/runtime/components/app-shell/app-shell-header.vue +30 -30
- package/dist/runtime/components/app-shell/app-shell-navbar.vue +34 -34
- package/dist/runtime/components/app-shell/app-shell-section.vue +10 -10
- package/dist/runtime/components/app-shell/app-shell.vue +34 -34
- package/dist/runtime/components/avatar/avatar-group.vue +3 -3
- package/dist/runtime/components/avatar/avatar.vue +14 -14
- package/dist/runtime/components/background-image.vue +18 -18
- package/dist/runtime/components/badge.vue +159 -160
- package/dist/runtime/components/box.vue +3 -3
- package/dist/runtime/components/breadcrumbs.vue +78 -78
- package/dist/runtime/components/button/button-group.vue +3 -3
- package/dist/runtime/components/button/button.vue +37 -37
- package/dist/runtime/components/button/unstyled-button.vue +23 -23
- package/dist/runtime/components/calendar/calendar.vue +60 -60
- package/dist/runtime/components/calendar/ui/core/calendar-cell.vue +115 -115
- package/dist/runtime/components/calendar/ui/core/calendar-header.vue +95 -95
- package/dist/runtime/components/calendar/ui/core/calendar-root.vue +3 -3
- package/dist/runtime/components/calendar/ui/levels/calendar-decade.vue +40 -40
- package/dist/runtime/components/calendar/ui/levels/calendar-month.vue +77 -77
- package/dist/runtime/components/calendar/ui/levels/calendar-year.vue +40 -40
- package/dist/runtime/components/card/card-section.vue +3 -3
- package/dist/runtime/components/card/card.vue +3 -3
- package/dist/runtime/components/checkbox/checkbox-card.vue +36 -36
- package/dist/runtime/components/checkbox/checkbox-group.vue +16 -16
- package/dist/runtime/components/checkbox/checkbox-indicator.vue +116 -116
- package/dist/runtime/components/checkbox/checkbox.vue +140 -140
- package/dist/runtime/components/chip/chip-group.vue +2 -2
- package/dist/runtime/components/chip/chip.vue +200 -200
- package/dist/runtime/components/combobox/combobox-dropdown.vue +14 -14
- package/dist/runtime/components/combobox/combobox-empty.vue +3 -3
- package/dist/runtime/components/combobox/combobox-group.vue +21 -21
- package/dist/runtime/components/combobox/combobox-option-list.vue +3 -3
- package/dist/runtime/components/combobox/combobox-option.vue +26 -26
- package/dist/runtime/components/combobox/combobox-options-dropdown.vue +28 -28
- package/dist/runtime/components/combobox/combobox-root.vue +3 -3
- package/dist/runtime/components/combobox/combobox-target.vue +3 -3
- package/dist/runtime/components/container.vue +8 -8
- package/dist/runtime/components/date-time-picker.vue +65 -65
- package/dist/runtime/components/dialog/ui/dialog-close-button.vue +11 -11
- package/dist/runtime/components/dialog/ui/dialog-header.vue +5 -5
- package/dist/runtime/components/dialog/ui/dialog-root.vue +20 -20
- package/dist/runtime/components/dialog/ui/dialog-title.vue +5 -5
- package/dist/runtime/components/drawer/drawer-close-button.vue +3 -3
- package/dist/runtime/components/drawer/drawer-header.vue +3 -3
- package/dist/runtime/components/drawer/drawer-root.vue +15 -15
- package/dist/runtime/components/drawer/drawer-title.vue +3 -3
- package/dist/runtime/components/files/file-upload-button.vue +12 -12
- package/dist/runtime/components/files/file-upload-icon.vue +1 -1
- package/dist/runtime/components/input/date-picker.vue +85 -85
- package/dist/runtime/components/input/email-input.vue +21 -21
- package/dist/runtime/components/input/number-input.vue +132 -132
- package/dist/runtime/components/input/password-input.vue +28 -28
- package/dist/runtime/components/input/text-input.vue +33 -33
- package/dist/runtime/components/input/ui/button-input.vue +64 -64
- package/dist/runtime/components/input/ui/input-base.vue +283 -283
- package/dist/runtime/components/input/ui/input-inline.vue +105 -105
- package/dist/runtime/components/input/ui/input-label.vue +4 -4
- package/dist/runtime/components/input/ui/input-wrapper.vue +54 -54
- package/dist/runtime/components/input/ui/spin-input.vue +69 -69
- package/dist/runtime/components/link/link-button.vue +16 -16
- package/dist/runtime/components/link/link.vue +10 -10
- package/dist/runtime/components/loader/_loaders/bars-loader.vue +5 -5
- package/dist/runtime/components/loader/_loaders/dots-loader.vue +5 -5
- package/dist/runtime/components/loader/_loaders/oval-loader.vue +1 -1
- package/dist/runtime/components/loader/loader.vue +1 -1
- package/dist/runtime/components/modal/modal-close-button.vue +3 -3
- package/dist/runtime/components/modal/modal-header.vue +3 -3
- package/dist/runtime/components/modal/modal-root.vue +13 -13
- package/dist/runtime/components/modal/modal-title.vue +3 -3
- package/dist/runtime/components/nav-link/nav-icon-link.vue +15 -15
- package/dist/runtime/components/nav-link/nav-link.vue +130 -130
- package/dist/runtime/components/paper.vue +33 -33
- package/dist/runtime/components/popover/popover-dropdown.vue +69 -70
- package/dist/runtime/components/popover/popover-target.vue +8 -8
- package/dist/runtime/components/popover/popover.vue +1 -1
- package/dist/runtime/components/progress/progress-label.vue +3 -3
- package/dist/runtime/components/progress/progress-root.vue +3 -3
- package/dist/runtime/components/progress/progress-section.vue +8 -8
- package/dist/runtime/components/progress/progress.vue +9 -9
- package/dist/runtime/components/renderless/renderless.vue +3 -3
- package/dist/runtime/components/roving-focus/roving-focus-item.vue +14 -14
- package/dist/runtime/components/roving-focus/roving-focus.vue +3 -3
- package/dist/runtime/components/select/select.vue +59 -59
- package/dist/runtime/components/table/table.d.ts +30 -30
- package/dist/runtime/components/table/ui/table-sort-icon.vue +1 -1
- package/dist/runtime/components/table/ui/table-sortable-header.vue +11 -11
- package/dist/runtime/components/table/ui/table.vue +295 -295
- package/dist/runtime/components/tabs/tabs-list.vue +10 -10
- package/dist/runtime/components/tabs/tabs-panel.vue +11 -11
- package/dist/runtime/components/tabs/tabs-root.vue +8 -8
- package/dist/runtime/components/tabs/tabs-tab.vue +20 -20
- package/dist/runtime/components/text.vue +67 -67
- package/dist/runtime/components/textarea.vue +34 -34
- package/dist/runtime/components/time-picker/time-picker.vue +230 -230
- package/dist/runtime/components/title.vue +14 -14
- package/dist/runtime/components/transition/transition.vue +3 -3
- package/dist/runtime/components/tree/_ui/tree-item.vue +128 -129
- package/dist/runtime/components/tree/_ui/tree-root.vue +21 -21
- package/dist/runtime/components/tree/tree.vue +20 -20
- package/dist/runtime/components/visually-hidden/visually-hidden-input.vue +1 -1
- package/dist/runtime/components/visually-hidden/visually-hidden.vue +9 -9
- package/dist/runtime/modals/_confirm-modal/confirm-modal.vue +31 -31
- package/dist/runtime/modals/modals-provider.vue +10 -10
- package/dist/runtime/styles/dark-theme.css +1 -1
- package/package.json +9 -48
|
@@ -7,37 +7,37 @@ const { mod } = defineProps({
|
|
|
7
7
|
</script>
|
|
8
8
|
|
|
9
9
|
<template>
|
|
10
|
-
<Box is='header' :mod :class='$style.root'>
|
|
11
|
-
<slot />
|
|
12
|
-
</Box>
|
|
10
|
+
<Box is='header' :mod :class='$style.root'>
|
|
11
|
+
<slot />
|
|
12
|
+
</Box>
|
|
13
13
|
</template>
|
|
14
14
|
|
|
15
15
|
<style module lang="postcss">
|
|
16
|
-
.root {
|
|
17
|
-
position: fixed;
|
|
18
|
-
z-index: 2;
|
|
19
|
-
top: 0;
|
|
20
|
-
inset-inline: 0;
|
|
21
|
-
transform: var(--app-shell-header-transform);
|
|
22
|
-
|
|
23
|
-
display: flex;
|
|
24
|
-
|
|
25
|
-
height: var(--app-shell-header-height);
|
|
26
|
-
padding-block: var(--app-shell-element-padding);
|
|
27
|
-
padding-inline: 1rem;
|
|
28
|
-
|
|
29
|
-
background-color: var(--color-header);
|
|
30
|
-
|
|
31
|
-
transition-timing-function: var(--app-shell-transition-timing-function);
|
|
32
|
-
transition-duration: var(--app-shell-transition-duration);
|
|
33
|
-
transition-property: transform, left, right;
|
|
34
|
-
|
|
35
|
-
:where([data-with-border]) > & {
|
|
36
|
-
border-bottom: 1px solid var(--app-shell-border-color);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
:where([data-layout='alt']) > & {
|
|
40
|
-
inset-inline-start: var(--app-shell-navbar-offset, 0rem);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
16
|
+
.root {
|
|
17
|
+
position: fixed;
|
|
18
|
+
z-index: 2;
|
|
19
|
+
top: 0;
|
|
20
|
+
inset-inline: 0;
|
|
21
|
+
transform: var(--app-shell-header-transform);
|
|
22
|
+
|
|
23
|
+
display: flex;
|
|
24
|
+
|
|
25
|
+
height: var(--app-shell-header-height);
|
|
26
|
+
padding-block: var(--app-shell-element-padding);
|
|
27
|
+
padding-inline: 1rem;
|
|
28
|
+
|
|
29
|
+
background-color: var(--color-header);
|
|
30
|
+
|
|
31
|
+
transition-timing-function: var(--app-shell-transition-timing-function);
|
|
32
|
+
transition-duration: var(--app-shell-transition-duration);
|
|
33
|
+
transition-property: transform, left, right;
|
|
34
|
+
|
|
35
|
+
:where([data-with-border]) > & {
|
|
36
|
+
border-bottom: 1px solid var(--app-shell-border-color);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:where([data-layout='alt']) > & {
|
|
40
|
+
inset-inline-start: var(--app-shell-navbar-offset, 0rem);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
43
|
</style>
|
|
@@ -7,41 +7,41 @@ const { mod } = defineProps({
|
|
|
7
7
|
</script>
|
|
8
8
|
|
|
9
9
|
<template>
|
|
10
|
-
<Box is='nav' :mod :class='$style.root'>
|
|
11
|
-
<slot />
|
|
12
|
-
</Box>
|
|
10
|
+
<Box is='nav' :mod :class='$style.root'>
|
|
11
|
+
<slot />
|
|
12
|
+
</Box>
|
|
13
13
|
</template>
|
|
14
14
|
|
|
15
15
|
<style module lang="postcss">
|
|
16
|
-
.root {
|
|
17
|
-
position: fixed;
|
|
18
|
-
|
|
19
|
-
z-index: 1;
|
|
20
|
-
top: var(--app-shell-header-offset, 0rem);
|
|
21
|
-
inset-inline-start: 0;
|
|
22
|
-
transform: var(--app-shell-navbar-transform);
|
|
23
|
-
|
|
24
|
-
display: flex;
|
|
25
|
-
flex-direction: column;
|
|
26
|
-
|
|
27
|
-
width: var(--app-shell-navbar-width);
|
|
28
|
-
height: calc(100dvh - var(--app-shell-header-offset, 0rem) - var(--app-shell-footer-offset, 0rem));
|
|
29
|
-
padding-block: var(--app-shell-element-padding);
|
|
30
|
-
|
|
31
|
-
background-color: var(--color-aside);
|
|
32
|
-
|
|
33
|
-
transition-timing-function: var(--app-shell-transition-timing-function);
|
|
34
|
-
transition-duration: var(--app-shell-transition-duration);
|
|
35
|
-
transition-property: transform, top, height;
|
|
36
|
-
|
|
37
|
-
:where([data-layout='alt']) > & {
|
|
38
|
-
top: 0;
|
|
39
|
-
|
|
40
|
-
height: 100dvh;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
:where([data-with-border]) > & {
|
|
44
|
-
border-inline-end: 1px solid var(--app-shell-border-color);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
16
|
+
.root {
|
|
17
|
+
position: fixed;
|
|
18
|
+
|
|
19
|
+
z-index: 1;
|
|
20
|
+
top: var(--app-shell-header-offset, 0rem);
|
|
21
|
+
inset-inline-start: 0;
|
|
22
|
+
transform: var(--app-shell-navbar-transform);
|
|
23
|
+
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
|
|
27
|
+
width: var(--app-shell-navbar-width);
|
|
28
|
+
height: calc(100dvh - var(--app-shell-header-offset, 0rem) - var(--app-shell-footer-offset, 0rem));
|
|
29
|
+
padding-block: var(--app-shell-element-padding);
|
|
30
|
+
|
|
31
|
+
background-color: var(--color-aside);
|
|
32
|
+
|
|
33
|
+
transition-timing-function: var(--app-shell-transition-timing-function);
|
|
34
|
+
transition-duration: var(--app-shell-transition-duration);
|
|
35
|
+
transition-property: transform, top, height;
|
|
36
|
+
|
|
37
|
+
:where([data-layout='alt']) > & {
|
|
38
|
+
top: 0;
|
|
39
|
+
|
|
40
|
+
height: 100dvh;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:where([data-with-border]) > & {
|
|
44
|
+
border-inline-end: 1px solid var(--app-shell-border-color);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
47
|
</style>
|
|
@@ -8,17 +8,17 @@ const { is = "section", mod, grow } = defineProps({
|
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
10
|
<template>
|
|
11
|
-
<Box :is :class='$style.root' :mod='[mod, { grow }]'>
|
|
12
|
-
<slot />
|
|
13
|
-
</Box>
|
|
11
|
+
<Box :is :class='$style.root' :mod='[mod, { grow }]'>
|
|
12
|
+
<slot />
|
|
13
|
+
</Box>
|
|
14
14
|
</template>
|
|
15
15
|
|
|
16
16
|
<style module lang="postcss">
|
|
17
|
-
.root {
|
|
18
|
-
flex-grow: 0;
|
|
19
|
-
|
|
20
|
-
&:where([data-grow]) {
|
|
21
|
-
flex-grow: 1;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
17
|
+
.root {
|
|
18
|
+
flex-grow: 0;
|
|
19
|
+
|
|
20
|
+
&:where([data-grow]) {
|
|
21
|
+
flex-grow: 1;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
24
|
</style>
|
|
@@ -35,41 +35,41 @@ const style = computed(() => ({
|
|
|
35
35
|
</script>
|
|
36
36
|
|
|
37
37
|
<template>
|
|
38
|
-
<Box :is :style :class='$style.root' :mod='[mod, { layout, "with-border": withBorder }]'>
|
|
39
|
-
<slot />
|
|
40
|
-
</Box>
|
|
38
|
+
<Box :is :style :class='$style.root' :mod='[mod, { layout, "with-border": withBorder }]'>
|
|
39
|
+
<slot />
|
|
40
|
+
</Box>
|
|
41
41
|
</template>
|
|
42
42
|
|
|
43
43
|
<style module lang="postcss">
|
|
44
|
-
.root {
|
|
45
|
-
--app-shell-padding: var(--spacing-sm);
|
|
46
|
-
--app-shell-element-padding: .25rem;
|
|
47
|
-
|
|
48
|
-
--app-shell-transition-duration: 200ms;
|
|
49
|
-
--app-shell-transition-timing-function: ease;
|
|
50
|
-
|
|
51
|
-
--app-shell-navbar-width: rem(56px);
|
|
52
|
-
--app-shell-navbar-offset: var(--app-shell-navbar-width);
|
|
53
|
-
--app-shell-navbar-transform: none;
|
|
54
|
-
|
|
55
|
-
--app-shell-aside-width: rem(56px);
|
|
56
|
-
--app-shell-aside-offset: var(--app-shell-aside-width);
|
|
57
|
-
--app-shell-aside-transform: none;
|
|
58
|
-
|
|
59
|
-
--app-shell-header-height: rem(56px);
|
|
60
|
-
--app-shell-header-offset: var(--app-shell-header-height);
|
|
61
|
-
--app-shell-header-transform: none;
|
|
62
|
-
|
|
63
|
-
--app-shell-footer-height: rem(100px);
|
|
64
|
-
--app-shell-footer-offset: var(--app-shell-footer-height);
|
|
65
|
-
--app-shell-footer-transform: none;
|
|
66
|
-
|
|
67
|
-
@mixin light {
|
|
68
|
-
--app-shell-border-color: var(--color-gray-3);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
@mixin dark {
|
|
72
|
-
--app-shell-border-color: var(--color-slate-8);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
44
|
+
.root {
|
|
45
|
+
--app-shell-padding: var(--spacing-sm);
|
|
46
|
+
--app-shell-element-padding: .25rem;
|
|
47
|
+
|
|
48
|
+
--app-shell-transition-duration: 200ms;
|
|
49
|
+
--app-shell-transition-timing-function: ease;
|
|
50
|
+
|
|
51
|
+
--app-shell-navbar-width: rem(56px);
|
|
52
|
+
--app-shell-navbar-offset: var(--app-shell-navbar-width);
|
|
53
|
+
--app-shell-navbar-transform: none;
|
|
54
|
+
|
|
55
|
+
--app-shell-aside-width: rem(56px);
|
|
56
|
+
--app-shell-aside-offset: var(--app-shell-aside-width);
|
|
57
|
+
--app-shell-aside-transform: none;
|
|
58
|
+
|
|
59
|
+
--app-shell-header-height: rem(56px);
|
|
60
|
+
--app-shell-header-offset: var(--app-shell-header-height);
|
|
61
|
+
--app-shell-header-transform: none;
|
|
62
|
+
|
|
63
|
+
--app-shell-footer-height: rem(100px);
|
|
64
|
+
--app-shell-footer-offset: var(--app-shell-footer-height);
|
|
65
|
+
--app-shell-footer-transform: none;
|
|
66
|
+
|
|
67
|
+
@mixin light {
|
|
68
|
+
--app-shell-border-color: var(--color-gray-3);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@mixin dark {
|
|
72
|
+
--app-shell-border-color: var(--color-slate-8);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
75
|
</style>
|
|
@@ -54,18 +54,18 @@ const style = computed(() => useStyleResolver((theme) => {
|
|
|
54
54
|
</script>
|
|
55
55
|
|
|
56
56
|
<template>
|
|
57
|
-
<Box :style :class='css.root' :mod='[{ "within-group": ctx?.withinGroup }, mod]'>
|
|
58
|
-
<span v-if='!src' :class='css.placeholder' :title='alt'>
|
|
59
|
-
<slot>
|
|
60
|
-
<Icon v-if='!src && !name' :name='placeholder' />
|
|
61
|
-
{{ initials }}
|
|
62
|
-
</slot>
|
|
63
|
-
</span>
|
|
64
|
-
<NuxtImg
|
|
65
|
-
v-else
|
|
66
|
-
:src
|
|
67
|
-
:alt
|
|
68
|
-
:class='css.image'
|
|
69
|
-
/>
|
|
70
|
-
</Box>
|
|
57
|
+
<Box :style :class='css.root' :mod='[{ "within-group": ctx?.withinGroup }, mod]'>
|
|
58
|
+
<span v-if='!src' :class='css.placeholder' :title='alt'>
|
|
59
|
+
<slot>
|
|
60
|
+
<Icon v-if='!src && !name' :name='placeholder' />
|
|
61
|
+
{{ initials }}
|
|
62
|
+
</slot>
|
|
63
|
+
</span>
|
|
64
|
+
<NuxtImg
|
|
65
|
+
v-else
|
|
66
|
+
:src
|
|
67
|
+
:alt
|
|
68
|
+
:class='css.image'
|
|
69
|
+
/>
|
|
70
|
+
</Box>
|
|
71
71
|
</template>
|
|
@@ -15,25 +15,25 @@ const style = computed(() => ({
|
|
|
15
15
|
</script>
|
|
16
16
|
|
|
17
17
|
<template>
|
|
18
|
-
<Box :style :class='$style.root' v-bind='rest' />
|
|
18
|
+
<Box :style :class='$style.root' v-bind='rest' />
|
|
19
19
|
</template>
|
|
20
20
|
|
|
21
21
|
<style module lang="postcss">
|
|
22
|
-
.root {
|
|
23
|
-
--bi-radius: 0rem;
|
|
24
|
-
|
|
25
|
-
position: absolute;
|
|
26
|
-
inset: 0;
|
|
27
|
-
|
|
28
|
-
display: block;
|
|
29
|
-
|
|
30
|
-
width: 100%;
|
|
31
|
-
border: 0;
|
|
32
|
-
border-radius: var(--bi-radius, 0);
|
|
33
|
-
|
|
34
|
-
text-decoration: none;
|
|
35
|
-
|
|
36
|
-
background-position: center;
|
|
37
|
-
background-size: cover;
|
|
38
|
-
}
|
|
22
|
+
.root {
|
|
23
|
+
--bi-radius: 0rem;
|
|
24
|
+
|
|
25
|
+
position: absolute;
|
|
26
|
+
inset: 0;
|
|
27
|
+
|
|
28
|
+
display: block;
|
|
29
|
+
|
|
30
|
+
width: 100%;
|
|
31
|
+
border: 0;
|
|
32
|
+
border-radius: var(--bi-radius, 0);
|
|
33
|
+
|
|
34
|
+
text-decoration: none;
|
|
35
|
+
|
|
36
|
+
background-position: center;
|
|
37
|
+
background-size: cover;
|
|
38
|
+
}
|
|
39
39
|
</style>
|
|
@@ -43,9 +43,9 @@ const style = computed(() => useStyleResolver((theme) => {
|
|
|
43
43
|
</script>
|
|
44
44
|
|
|
45
45
|
<template>
|
|
46
|
-
<Box
|
|
47
|
-
:style
|
|
48
|
-
:class='$style.root'
|
|
46
|
+
<Box
|
|
47
|
+
:style
|
|
48
|
+
:class='$style.root'
|
|
49
49
|
:mod='[
|
|
50
50
|
{
|
|
51
51
|
"block": fullWidth,
|
|
@@ -55,164 +55,163 @@ const style = computed(() => useStyleResolver((theme) => {
|
|
|
55
55
|
"with-right-section": !!$slots.rightSection
|
|
56
56
|
},
|
|
57
57
|
mod
|
|
58
|
-
]'
|
|
59
|
-
>
|
|
60
|
-
<span v-if='variant === "dot"' :class='$style.dot' />
|
|
61
|
-
|
|
62
|
-
<span v-else-if='$slots.leftSection || !!icon' :class='$style.section' data-position='left'>
|
|
63
|
-
<slot name='leftSection'>
|
|
64
|
-
<Icon v-if='!!icon' :name='icon' />
|
|
65
|
-
</slot>
|
|
66
|
-
</span>
|
|
67
|
-
|
|
68
|
-
<span :class='$style.label'>
|
|
69
|
-
<slot />
|
|
70
|
-
</span>
|
|
71
|
-
|
|
72
|
-
<span v-if='$slots.rightSection' :class='$style.section' data-position='right'>
|
|
73
|
-
<slot name='rightSection' />
|
|
74
|
-
</span>
|
|
75
|
-
</Box>
|
|
58
|
+
]'
|
|
59
|
+
>
|
|
60
|
+
<span v-if='variant === "dot"' :class='$style.dot' />
|
|
61
|
+
|
|
62
|
+
<span v-else-if='$slots.leftSection || !!icon' :class='$style.section' data-position='left'>
|
|
63
|
+
<slot name='leftSection'>
|
|
64
|
+
<Icon v-if='!!icon' :name='icon' />
|
|
65
|
+
</slot>
|
|
66
|
+
</span>
|
|
67
|
+
|
|
68
|
+
<span :class='$style.label'>
|
|
69
|
+
<slot />
|
|
70
|
+
</span>
|
|
71
|
+
|
|
72
|
+
<span v-if='$slots.rightSection' :class='$style.section' data-position='right'>
|
|
73
|
+
<slot name='rightSection' />
|
|
74
|
+
</span>
|
|
75
|
+
</Box>
|
|
76
76
|
</template>
|
|
77
77
|
|
|
78
78
|
<style lang="postcss" module>
|
|
79
|
-
.root {
|
|
80
|
-
--badge-height-xs: rem(16px);
|
|
81
|
-
--badge-height-sm: rem(18px);
|
|
82
|
-
--badge-height-md: rem(20px);
|
|
83
|
-
--badge-height-lg: rem(26px);
|
|
84
|
-
--badge-height-xl: rem(32px);
|
|
85
|
-
|
|
86
|
-
--badge-fz-xs: rem(8px);
|
|
87
|
-
--badge-fz-sm: rem(10px);
|
|
88
|
-
--badge-fz-md: rem(12px);
|
|
89
|
-
--badge-fz-lg: rem(14px);
|
|
90
|
-
--badge-fz-xl: rem(16px);
|
|
91
|
-
|
|
92
|
-
--badge-padding-x-xs: rem(6px);
|
|
93
|
-
--badge-padding-x-sm: rem(8px);
|
|
94
|
-
--badge-padding-x-md: rem(10px);
|
|
95
|
-
--badge-padding-x-lg: rem(12px);
|
|
96
|
-
--badge-padding-x-xl: rem(16px);
|
|
97
|
-
|
|
98
|
-
--badge-height: var(--badge-height-md);
|
|
99
|
-
--badge-fz: var(--badge-fz-md);
|
|
100
|
-
--badge-padding-x: var(--badge-padding-x-md);
|
|
101
|
-
--badge-radius: 100%;
|
|
102
|
-
--badge-lh: calc(var(--badge-height) - rem(2px));
|
|
103
|
-
--badge-color: var(--color-white);
|
|
104
|
-
--badge-bg: var(--color-primary-filled);
|
|
105
|
-
--badge-border-width: 1px;
|
|
106
|
-
--badge-bd: var(--badge-border-width) solid transparent;
|
|
107
|
-
|
|
108
|
-
cursor: default;
|
|
109
|
-
|
|
110
|
-
overflow: hidden;
|
|
111
|
-
display: inline-grid;
|
|
112
|
-
align-items: center;
|
|
113
|
-
justify-content: center;
|
|
114
|
-
|
|
115
|
-
width: fit-content;
|
|
116
|
-
height: var(--badge-height);
|
|
117
|
-
padding: 0 var(--badge-padding-x);
|
|
118
|
-
border: var(--badge-bd);
|
|
119
|
-
border-radius: var(--badge-radius);
|
|
120
|
-
|
|
121
|
-
font-size: var(--badge-fz);
|
|
122
|
-
font-weight: 700;
|
|
123
|
-
line-height: var(--badge-lh);
|
|
124
|
-
color: var(--badge-color);
|
|
125
|
-
text-decoration: none;
|
|
126
|
-
text-overflow: ellipsis;
|
|
127
|
-
text-transform: uppercase;
|
|
128
|
-
letter-spacing: 0.25px;
|
|
129
|
-
|
|
130
|
-
background: var(--badge-bg);
|
|
131
|
-
|
|
132
|
-
-webkit-tap-highlight-color: transparent;
|
|
133
|
-
|
|
134
|
-
&:where([data-with-left-section], [data-variant='dot']) {
|
|
135
|
-
grid-template-columns: auto 1fr;
|
|
136
|
-
|
|
137
|
-
padding-left: calc(var(--badge-padding-x) - calc(var(--spacing-xs) / 2));
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
&:where([data-with-right-section]) {
|
|
141
|
-
grid-template-columns: 1fr auto;
|
|
142
|
-
|
|
143
|
-
padding-right: calc(var(--badge-padding-x) - calc(var(--spacing-xs) / 2));
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
&:where([data-with-left-section][data-with-right-section],
|
|
147
|
-
[data-variant='dot'][data-with-right-section]) {
|
|
148
|
-
grid-template-columns: auto 1fr auto;
|
|
149
|
-
|
|
150
|
-
padding: 0 calc(var(--spacing-xs) / 2);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
&:where([data-block]) {
|
|
154
|
-
display: flex;
|
|
155
|
-
|
|
156
|
-
width: 100%;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
&:where([data-circle]) {
|
|
160
|
-
display: flex;
|
|
161
|
-
|
|
162
|
-
width: var(--badge-height);
|
|
163
|
-
padding-inline: 2px;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
&:where([data-variant='dot']) {
|
|
167
|
-
@mixin where-light {
|
|
168
|
-
--badge-color: var(--color-black);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
@mixin where-dark {
|
|
172
|
-
--badge-color: var(--color-white);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.dot {
|
|
178
|
-
--badge-dot-size: calc(var(--badge-height) / 2);
|
|
179
|
-
|
|
180
|
-
display: block;
|
|
181
|
-
|
|
182
|
-
width: var(--badge-dot-size);
|
|
183
|
-
height: var(--badge-dot-size);
|
|
184
|
-
margin-inline-end: calc(var(--badge-dot-size) / 2);
|
|
185
|
-
border-radius: var(--badge-dot-size);
|
|
186
|
-
|
|
187
|
-
background-color: var(--badge-dot-color, var(--badge-color));
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
text-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
}
|
|
79
|
+
.root {
|
|
80
|
+
--badge-height-xs: rem(16px);
|
|
81
|
+
--badge-height-sm: rem(18px);
|
|
82
|
+
--badge-height-md: rem(20px);
|
|
83
|
+
--badge-height-lg: rem(26px);
|
|
84
|
+
--badge-height-xl: rem(32px);
|
|
85
|
+
|
|
86
|
+
--badge-fz-xs: rem(8px);
|
|
87
|
+
--badge-fz-sm: rem(10px);
|
|
88
|
+
--badge-fz-md: rem(12px);
|
|
89
|
+
--badge-fz-lg: rem(14px);
|
|
90
|
+
--badge-fz-xl: rem(16px);
|
|
91
|
+
|
|
92
|
+
--badge-padding-x-xs: rem(6px);
|
|
93
|
+
--badge-padding-x-sm: rem(8px);
|
|
94
|
+
--badge-padding-x-md: rem(10px);
|
|
95
|
+
--badge-padding-x-lg: rem(12px);
|
|
96
|
+
--badge-padding-x-xl: rem(16px);
|
|
97
|
+
|
|
98
|
+
--badge-height: var(--badge-height-md);
|
|
99
|
+
--badge-fz: var(--badge-fz-md);
|
|
100
|
+
--badge-padding-x: var(--badge-padding-x-md);
|
|
101
|
+
--badge-radius: 100%;
|
|
102
|
+
--badge-lh: calc(var(--badge-height) - rem(2px));
|
|
103
|
+
--badge-color: var(--color-white);
|
|
104
|
+
--badge-bg: var(--color-primary-filled);
|
|
105
|
+
--badge-border-width: 1px;
|
|
106
|
+
--badge-bd: var(--badge-border-width) solid transparent;
|
|
107
|
+
|
|
108
|
+
cursor: default;
|
|
109
|
+
|
|
110
|
+
overflow: hidden;
|
|
111
|
+
display: inline-grid;
|
|
112
|
+
align-items: center;
|
|
113
|
+
justify-content: center;
|
|
114
|
+
|
|
115
|
+
width: fit-content;
|
|
116
|
+
height: var(--badge-height);
|
|
117
|
+
padding: 0 var(--badge-padding-x);
|
|
118
|
+
border: var(--badge-bd);
|
|
119
|
+
border-radius: var(--badge-radius);
|
|
120
|
+
|
|
121
|
+
font-size: var(--badge-fz);
|
|
122
|
+
font-weight: 700;
|
|
123
|
+
line-height: var(--badge-lh);
|
|
124
|
+
color: var(--badge-color);
|
|
125
|
+
text-decoration: none;
|
|
126
|
+
text-overflow: ellipsis;
|
|
127
|
+
text-transform: uppercase;
|
|
128
|
+
letter-spacing: 0.25px;
|
|
129
|
+
|
|
130
|
+
background: var(--badge-bg);
|
|
131
|
+
|
|
132
|
+
-webkit-tap-highlight-color: transparent;
|
|
133
|
+
|
|
134
|
+
&:where([data-with-left-section], [data-variant='dot']) {
|
|
135
|
+
grid-template-columns: auto 1fr;
|
|
136
|
+
|
|
137
|
+
padding-left: calc(var(--badge-padding-x) - calc(var(--spacing-xs) / 2));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
&:where([data-with-right-section]) {
|
|
141
|
+
grid-template-columns: 1fr auto;
|
|
142
|
+
|
|
143
|
+
padding-right: calc(var(--badge-padding-x) - calc(var(--spacing-xs) / 2));
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&:where([data-with-left-section][data-with-right-section],
|
|
147
|
+
[data-variant='dot'][data-with-right-section]) {
|
|
148
|
+
grid-template-columns: auto 1fr auto;
|
|
149
|
+
|
|
150
|
+
padding: 0 calc(var(--spacing-xs) / 2);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
&:where([data-block]) {
|
|
154
|
+
display: flex;
|
|
155
|
+
|
|
156
|
+
width: 100%;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&:where([data-circle]) {
|
|
160
|
+
display: flex;
|
|
161
|
+
|
|
162
|
+
width: var(--badge-height);
|
|
163
|
+
padding-inline: 2px;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
&:where([data-variant='dot']) {
|
|
167
|
+
@mixin where-light {
|
|
168
|
+
--badge-color: var(--color-black);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
@mixin where-dark {
|
|
172
|
+
--badge-color: var(--color-white);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.dot {
|
|
178
|
+
--badge-dot-size: calc(var(--badge-height) / 2);
|
|
179
|
+
|
|
180
|
+
display: block;
|
|
181
|
+
|
|
182
|
+
width: var(--badge-dot-size);
|
|
183
|
+
height: var(--badge-dot-size);
|
|
184
|
+
margin-inline-end: calc(var(--badge-dot-size) / 2);
|
|
185
|
+
border-radius: var(--badge-dot-size);
|
|
186
|
+
|
|
187
|
+
background-color: var(--badge-dot-color, var(--badge-color));
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.label {
|
|
191
|
+
cursor: inherit;
|
|
192
|
+
|
|
193
|
+
overflow: hidden;
|
|
194
|
+
|
|
195
|
+
text-align: center;
|
|
196
|
+
text-overflow: ellipsis;
|
|
197
|
+
white-space: nowrap;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.section {
|
|
201
|
+
--badge-section-margin: calc(var(--spacing-xs) / 2);
|
|
202
|
+
|
|
203
|
+
display: inline-flex;
|
|
204
|
+
align-items: center;
|
|
205
|
+
justify-content: center;
|
|
206
|
+
|
|
207
|
+
max-height: calc(var(--badge-height) - var(--badge-border-width) * 2);
|
|
208
|
+
|
|
209
|
+
&:where([data-position='left']) {
|
|
210
|
+
margin-inline-end: var(--badge-section-margin);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
&:where([data-position='right']) {
|
|
214
|
+
margin-inline-start: var(--badge-section-margin);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
218
217
|
</style>
|