nuance-ui 0.2.1 → 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 +30 -10
|
@@ -40,19 +40,19 @@ const { link, rest } = pickLinkProps(etc);
|
|
|
40
40
|
</script>
|
|
41
41
|
|
|
42
42
|
<template>
|
|
43
|
-
<NuxtLink v-slot='{ href, navigate, isActive, ...linkProps }' v-bind='link' custom>
|
|
44
|
-
<ActionIcon
|
|
45
|
-
is='a'
|
|
46
|
-
v-bind='{ ...rest, ...$attrs }'
|
|
47
|
-
:href
|
|
48
|
-
:variant='isActive ? active : notActive'
|
|
49
|
-
:mod='[{ active: isActive }, mod]'
|
|
50
|
-
:aria-current="isActive ? 'page' : void 0"
|
|
51
|
-
:rel='"rel" in linkProps ? linkProps?.rel : void 0'
|
|
52
|
-
:target='"target" in linkProps ? linkProps?.target : void 0'
|
|
53
|
-
@click='navigate'
|
|
54
|
-
>
|
|
55
|
-
<slot />
|
|
56
|
-
</ActionIcon>
|
|
57
|
-
</NuxtLink>
|
|
43
|
+
<NuxtLink v-slot='{ href, navigate, isActive, ...linkProps }' v-bind='link' custom>
|
|
44
|
+
<ActionIcon
|
|
45
|
+
is='a'
|
|
46
|
+
v-bind='{ ...rest, ...$attrs }'
|
|
47
|
+
:href
|
|
48
|
+
:variant='isActive ? active : notActive'
|
|
49
|
+
:mod='[{ active: isActive }, mod]'
|
|
50
|
+
:aria-current="isActive ? 'page' : void 0"
|
|
51
|
+
:rel='"rel" in linkProps ? linkProps?.rel : void 0'
|
|
52
|
+
:target='"target" in linkProps ? linkProps?.target : void 0'
|
|
53
|
+
@click='navigate'
|
|
54
|
+
>
|
|
55
|
+
<slot />
|
|
56
|
+
</ActionIcon>
|
|
57
|
+
</NuxtLink>
|
|
58
58
|
</template>
|
|
@@ -55,137 +55,137 @@ const style = computed(() => useStyleResolver((theme) => {
|
|
|
55
55
|
</script>
|
|
56
56
|
|
|
57
57
|
<template>
|
|
58
|
-
<NuxtLink v-slot='{ href, navigate, isActive, ...linkProps }' v-bind='link' custom>
|
|
59
|
-
<UnstyledButton
|
|
60
|
-
is='a'
|
|
61
|
-
:href
|
|
62
|
-
:style
|
|
63
|
-
:class='$style.root'
|
|
64
|
-
:mod='[{ active: isActive, disabled }, mod]'
|
|
65
|
-
:aria-current="isActive ? 'page' : void 0"
|
|
66
|
-
:rel='"rel" in linkProps ? linkProps?.rel : void 0'
|
|
67
|
-
:target='"target" in linkProps ? linkProps?.target : void 0'
|
|
68
|
-
@click='navigate'
|
|
69
|
-
>
|
|
70
|
-
<span v-if='$slots.leftSection' :class='$style.section' data-position='left'>
|
|
71
|
-
<slot name='leftSection' />
|
|
72
|
-
</span>
|
|
73
|
-
|
|
74
|
-
<Box :class='$style.body' :mod='{ "no-wrap": noWrap }'>
|
|
75
|
-
<span :class='$style.label'>
|
|
76
|
-
<slot />
|
|
77
|
-
</span>
|
|
78
|
-
<Box :class='$style.description' :mod='{ active }'>
|
|
79
|
-
<slot name='description'>
|
|
80
|
-
{{ description }}
|
|
81
|
-
</slot>
|
|
82
|
-
</Box>
|
|
83
|
-
</Box>
|
|
84
|
-
|
|
85
|
-
<span v-if='$slots.rightSection' :class='$style.section' data-position='right'>
|
|
86
|
-
<slot name='rightSection' />
|
|
87
|
-
</span>
|
|
88
|
-
</UnstyledButton>
|
|
89
|
-
</NuxtLink>
|
|
58
|
+
<NuxtLink v-slot='{ href, navigate, isActive, ...linkProps }' v-bind='link' custom>
|
|
59
|
+
<UnstyledButton
|
|
60
|
+
is='a'
|
|
61
|
+
:href
|
|
62
|
+
:style
|
|
63
|
+
:class='$style.root'
|
|
64
|
+
:mod='[{ active: isActive, disabled }, mod]'
|
|
65
|
+
:aria-current="isActive ? 'page' : void 0"
|
|
66
|
+
:rel='"rel" in linkProps ? linkProps?.rel : void 0'
|
|
67
|
+
:target='"target" in linkProps ? linkProps?.target : void 0'
|
|
68
|
+
@click='navigate'
|
|
69
|
+
>
|
|
70
|
+
<span v-if='$slots.leftSection' :class='$style.section' data-position='left'>
|
|
71
|
+
<slot name='leftSection' />
|
|
72
|
+
</span>
|
|
73
|
+
|
|
74
|
+
<Box :class='$style.body' :mod='{ "no-wrap": noWrap }'>
|
|
75
|
+
<span :class='$style.label'>
|
|
76
|
+
<slot />
|
|
77
|
+
</span>
|
|
78
|
+
<Box :class='$style.description' :mod='{ active }'>
|
|
79
|
+
<slot name='description'>
|
|
80
|
+
{{ description }}
|
|
81
|
+
</slot>
|
|
82
|
+
</Box>
|
|
83
|
+
</Box>
|
|
84
|
+
|
|
85
|
+
<span v-if='$slots.rightSection' :class='$style.section' data-position='right'>
|
|
86
|
+
<slot name='rightSection' />
|
|
87
|
+
</span>
|
|
88
|
+
</UnstyledButton>
|
|
89
|
+
</NuxtLink>
|
|
90
90
|
</template>
|
|
91
91
|
|
|
92
92
|
<style module lang="postcss">
|
|
93
|
-
.root {
|
|
94
|
-
--nl-spacing-xs: .25rem;
|
|
95
|
-
--nl-spacing-sm: .5rem;
|
|
96
|
-
--nl-spacing-md: .75rem;
|
|
97
|
-
--nl-spacing-lg: 1rem;
|
|
98
|
-
--nl-spacing-xl: 1.25rem;
|
|
99
|
-
|
|
100
|
-
--nl-bg: var(--color-primary-light);
|
|
101
|
-
--nl-hover: var(--color-primary-light-hover);
|
|
102
|
-
--nl-color: var(--color-primary-light-color);
|
|
103
|
-
--nl-spacing: var(--nl-spacing-xs);
|
|
104
|
-
|
|
105
|
-
user-select: none;
|
|
106
|
-
|
|
107
|
-
display: flex;
|
|
108
|
-
gap: var(--nl-spacing);
|
|
109
|
-
align-items: center;
|
|
110
|
-
|
|
111
|
-
width: 100%;
|
|
112
|
-
padding: .25rem var(--spacing-sm);
|
|
113
|
-
border-radius: var(--radius-default);
|
|
114
|
-
|
|
115
|
-
&:where([data-disabled]) {
|
|
116
|
-
pointer-events: none;
|
|
117
|
-
|
|
118
|
-
opacity: 0.4;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
&:hover {
|
|
122
|
-
@mixin where-light {
|
|
123
|
-
background-color: var(--color-gray-0);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
@mixin where-dark {
|
|
127
|
-
background-color: var(--color-dark-6);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
&:where([data-active]) {
|
|
132
|
-
color: var(--nl-color);
|
|
133
|
-
|
|
134
|
-
background-color: var(--nl-bg);
|
|
135
|
-
|
|
136
|
-
.description {
|
|
137
|
-
--description-opacity: 0.9;
|
|
138
|
-
--description-color: var(--nl-color);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
&:hover {
|
|
142
|
-
background-color: var(--nl-hover);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.section {
|
|
148
|
-
display: flex;
|
|
149
|
-
align-items: center;
|
|
150
|
-
justify-content: center;
|
|
151
|
-
|
|
152
|
-
transition: transform 150ms ease;
|
|
153
|
-
|
|
154
|
-
&>svg {
|
|
155
|
-
display: block;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
&:where([data-rotate]) {
|
|
159
|
-
transform: rotate(90deg);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.label {
|
|
164
|
-
font-size: var(--font-size-sm);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.body {
|
|
168
|
-
overflow: hidden;
|
|
169
|
-
flex: 1;
|
|
170
|
-
|
|
171
|
-
text-overflow: ellipsis;
|
|
172
|
-
|
|
173
|
-
&:where([data-no-wrap]) {
|
|
174
|
-
white-space: nowrap;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
.description {
|
|
179
|
-
overflow: hidden;
|
|
180
|
-
|
|
181
|
-
font-size: var(--font-size-xs);
|
|
182
|
-
color: var(--description-color, var(--color-dimmed));
|
|
183
|
-
text-overflow: ellipsis;
|
|
184
|
-
|
|
185
|
-
opacity: var(--description-opacity, 1);
|
|
186
|
-
|
|
187
|
-
:where([data-no-wrap]) & {
|
|
188
|
-
white-space: nowrap;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
93
|
+
.root {
|
|
94
|
+
--nl-spacing-xs: .25rem;
|
|
95
|
+
--nl-spacing-sm: .5rem;
|
|
96
|
+
--nl-spacing-md: .75rem;
|
|
97
|
+
--nl-spacing-lg: 1rem;
|
|
98
|
+
--nl-spacing-xl: 1.25rem;
|
|
99
|
+
|
|
100
|
+
--nl-bg: var(--color-primary-light);
|
|
101
|
+
--nl-hover: var(--color-primary-light-hover);
|
|
102
|
+
--nl-color: var(--color-primary-light-color);
|
|
103
|
+
--nl-spacing: var(--nl-spacing-xs);
|
|
104
|
+
|
|
105
|
+
user-select: none;
|
|
106
|
+
|
|
107
|
+
display: flex;
|
|
108
|
+
gap: var(--nl-spacing);
|
|
109
|
+
align-items: center;
|
|
110
|
+
|
|
111
|
+
width: 100%;
|
|
112
|
+
padding: .25rem var(--spacing-sm);
|
|
113
|
+
border-radius: var(--radius-default);
|
|
114
|
+
|
|
115
|
+
&:where([data-disabled]) {
|
|
116
|
+
pointer-events: none;
|
|
117
|
+
|
|
118
|
+
opacity: 0.4;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&:hover {
|
|
122
|
+
@mixin where-light {
|
|
123
|
+
background-color: var(--color-gray-0);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@mixin where-dark {
|
|
127
|
+
background-color: var(--color-dark-6);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
&:where([data-active]) {
|
|
132
|
+
color: var(--nl-color);
|
|
133
|
+
|
|
134
|
+
background-color: var(--nl-bg);
|
|
135
|
+
|
|
136
|
+
.description {
|
|
137
|
+
--description-opacity: 0.9;
|
|
138
|
+
--description-color: var(--nl-color);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&:hover {
|
|
142
|
+
background-color: var(--nl-hover);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.section {
|
|
148
|
+
display: flex;
|
|
149
|
+
align-items: center;
|
|
150
|
+
justify-content: center;
|
|
151
|
+
|
|
152
|
+
transition: transform 150ms ease;
|
|
153
|
+
|
|
154
|
+
&>svg {
|
|
155
|
+
display: block;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
&:where([data-rotate]) {
|
|
159
|
+
transform: rotate(90deg);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.label {
|
|
164
|
+
font-size: var(--font-size-sm);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.body {
|
|
168
|
+
overflow: hidden;
|
|
169
|
+
flex: 1;
|
|
170
|
+
|
|
171
|
+
text-overflow: ellipsis;
|
|
172
|
+
|
|
173
|
+
&:where([data-no-wrap]) {
|
|
174
|
+
white-space: nowrap;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.description {
|
|
179
|
+
overflow: hidden;
|
|
180
|
+
|
|
181
|
+
font-size: var(--font-size-xs);
|
|
182
|
+
color: var(--description-color, var(--color-dimmed));
|
|
183
|
+
text-overflow: ellipsis;
|
|
184
|
+
|
|
185
|
+
opacity: var(--description-opacity, 1);
|
|
186
|
+
|
|
187
|
+
:where([data-no-wrap]) & {
|
|
188
|
+
white-space: nowrap;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
191
|
</style>
|
|
@@ -16,40 +16,40 @@ const style = computed(() => ({
|
|
|
16
16
|
</script>
|
|
17
17
|
|
|
18
18
|
<template>
|
|
19
|
-
<Box :is :style :class='$style.root' :mod='[mod, { "with-border": withBorder }]'>
|
|
20
|
-
<slot />
|
|
21
|
-
</Box>
|
|
19
|
+
<Box :is :style :class='$style.root' :mod='[mod, { "with-border": withBorder }]'>
|
|
20
|
+
<slot />
|
|
21
|
+
</Box>
|
|
22
22
|
</template>
|
|
23
23
|
|
|
24
24
|
<style module lang="postcss">
|
|
25
|
-
.root {
|
|
26
|
-
--paper-radius: var(--radius-default);
|
|
27
|
-
--paper-shadow: none;
|
|
28
|
-
|
|
29
|
-
touch-action: manipulation;
|
|
30
|
-
|
|
31
|
-
display: block;
|
|
32
|
-
|
|
33
|
-
border-radius: var(--paper-radius);
|
|
34
|
-
|
|
35
|
-
text-decoration: none;
|
|
36
|
-
|
|
37
|
-
background-color: var(--color-body);
|
|
38
|
-
|
|
39
|
-
outline: 0;
|
|
40
|
-
box-shadow: var(--paper-shadow);
|
|
41
|
-
-webkit-tap-highlight-color: transparent;
|
|
42
|
-
|
|
43
|
-
&:where([data-with-border]) {
|
|
44
|
-
border: rem(1px) solid var(--paper-border-color);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
@mixin light {
|
|
48
|
-
--paper-border-color: var(--color-gray-3);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
@mixin dark {
|
|
52
|
-
--paper-border-color: var(--color-slate-7);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
25
|
+
.root {
|
|
26
|
+
--paper-radius: var(--radius-default);
|
|
27
|
+
--paper-shadow: none;
|
|
28
|
+
|
|
29
|
+
touch-action: manipulation;
|
|
30
|
+
|
|
31
|
+
display: block;
|
|
32
|
+
|
|
33
|
+
border-radius: var(--paper-radius);
|
|
34
|
+
|
|
35
|
+
text-decoration: none;
|
|
36
|
+
|
|
37
|
+
background-color: var(--color-body);
|
|
38
|
+
|
|
39
|
+
outline: 0;
|
|
40
|
+
box-shadow: var(--paper-shadow);
|
|
41
|
+
-webkit-tap-highlight-color: transparent;
|
|
42
|
+
|
|
43
|
+
&:where([data-with-border]) {
|
|
44
|
+
border: rem(1px) solid var(--paper-border-color);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@mixin light {
|
|
48
|
+
--paper-border-color: var(--color-gray-3);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@mixin dark {
|
|
52
|
+
--paper-border-color: var(--color-slate-7);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
55
|
</style>
|
|
@@ -17,77 +17,76 @@ const style = computed(() => ({
|
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
19
|
<template>
|
|
20
|
-
<div
|
|
21
|
-
:id='id'
|
|
22
|
-
ref='dropdownRef'
|
|
23
|
-
popover
|
|
24
|
-
:style='{ ...floatingStyles, ...style }'
|
|
25
|
-
:class='$style.dropdown'
|
|
26
|
-
@toggle='onToggle'
|
|
27
|
-
>
|
|
28
|
-
<slot />
|
|
29
|
-
<span
|
|
30
|
-
v-if='withArrow'
|
|
31
|
-
ref='arrowRef'
|
|
32
|
-
:class='$style.arrow'
|
|
33
|
-
:style='arrowStyles'
|
|
34
|
-
/>
|
|
35
|
-
</div>
|
|
20
|
+
<div
|
|
21
|
+
:id='id'
|
|
22
|
+
ref='dropdownRef'
|
|
23
|
+
popover
|
|
24
|
+
:style='{ ...floatingStyles, ...style }'
|
|
25
|
+
:class='$style.dropdown'
|
|
26
|
+
@toggle='onToggle'
|
|
27
|
+
>
|
|
28
|
+
<slot />
|
|
29
|
+
<span
|
|
30
|
+
v-if='withArrow'
|
|
31
|
+
ref='arrowRef'
|
|
32
|
+
:class='$style.arrow'
|
|
33
|
+
:style='arrowStyles'
|
|
34
|
+
/>
|
|
35
|
+
</div>
|
|
36
36
|
</template>
|
|
37
37
|
|
|
38
38
|
<style module lang="postcss">
|
|
39
|
-
.dropdown {
|
|
40
|
-
--popover-radius: var(--radius-default);
|
|
41
|
-
--popover-shadow: none;
|
|
42
|
-
|
|
43
|
-
overflow: visible;
|
|
44
|
-
|
|
45
|
-
padding: var(--spacing-xs) var(--spacing-sm);
|
|
46
|
-
border: 1px solid var(--popover-border-color);
|
|
47
|
-
border-radius: var(--popover-radius);
|
|
48
|
-
|
|
49
|
-
color: var(--color-text);
|
|
50
|
-
|
|
51
|
-
opacity: 0;
|
|
52
|
-
box-shadow: var(--popover-shadow);
|
|
53
|
-
|
|
54
|
-
transition: opacity 0.2s, overlay 0.2s allow-discrete, display 0.2s allow-discrete;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
--arrow-
|
|
80
|
-
--arrow-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
39
|
+
.dropdown {
|
|
40
|
+
--popover-radius: var(--radius-default);
|
|
41
|
+
--popover-shadow: none;
|
|
42
|
+
|
|
43
|
+
overflow: visible;
|
|
44
|
+
|
|
45
|
+
padding: var(--spacing-xs) var(--spacing-sm);
|
|
46
|
+
border: 1px solid var(--popover-border-color);
|
|
47
|
+
border-radius: var(--popover-radius);
|
|
48
|
+
|
|
49
|
+
color: var(--color-text);
|
|
50
|
+
|
|
51
|
+
opacity: 0;
|
|
52
|
+
box-shadow: var(--popover-shadow);
|
|
53
|
+
|
|
54
|
+
transition: opacity 0.2s, overlay 0.2s allow-discrete, display 0.2s allow-discrete;
|
|
55
|
+
|
|
56
|
+
&:popover-open {
|
|
57
|
+
opacity: 1;
|
|
58
|
+
|
|
59
|
+
@starting-style {
|
|
60
|
+
opacity: 0;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@mixin where-light {
|
|
65
|
+
--popover-border-color: var(--color-gray-2);
|
|
66
|
+
|
|
67
|
+
background-color: var(--color-white);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@mixin where-dark {
|
|
71
|
+
--popover-border-color: var(--color-dark-4);
|
|
72
|
+
|
|
73
|
+
background-color: var(--color-dark-6);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.arrow {
|
|
78
|
+
--arrow-size: 7px;
|
|
79
|
+
--arrow-radius: 0px;
|
|
80
|
+
--arrow-placement: calc(var(--arrow-size) / 2 * -1);
|
|
81
|
+
|
|
82
|
+
position: absolute;
|
|
83
|
+
transform: rotate(45deg);
|
|
84
|
+
|
|
85
|
+
width: var(--arrow-size);
|
|
86
|
+
height: var(--arrow-size);
|
|
87
|
+
|
|
88
|
+
border: 1px solid var(--popover-border-color);
|
|
89
|
+
|
|
90
|
+
background-color: inherit;
|
|
91
|
+
}
|
|
93
92
|
</style>
|
|
@@ -8,12 +8,12 @@ const { id, store: { targetRef, opened }, disabled } = usePopoverState();
|
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
10
|
<template>
|
|
11
|
-
<Renderless
|
|
12
|
-
ref='targetRef'
|
|
13
|
-
:disabled
|
|
14
|
-
:popovertarget='id'
|
|
15
|
-
@click.stop.prevent='!disable && !disabled && (opened = !opened)'
|
|
16
|
-
>
|
|
17
|
-
<slot />
|
|
18
|
-
</Renderless>
|
|
11
|
+
<Renderless
|
|
12
|
+
ref='targetRef'
|
|
13
|
+
:disabled
|
|
14
|
+
:popovertarget='id'
|
|
15
|
+
@click.stop.prevent='!disable && !disabled && (opened = !opened)'
|
|
16
|
+
>
|
|
17
|
+
<slot />
|
|
18
|
+
</Renderless>
|
|
19
19
|
</template>
|
|
@@ -33,12 +33,12 @@ const style = computed(() => useStyleResolver((theme) => ({
|
|
|
33
33
|
</script>
|
|
34
34
|
|
|
35
35
|
<template>
|
|
36
|
-
<Box
|
|
37
|
-
:style
|
|
38
|
-
v-bind='ariaAttributes'
|
|
39
|
-
:class='css.section'
|
|
40
|
-
:mod='[{ striped: striped || animated, animated }, mod]'
|
|
41
|
-
>
|
|
42
|
-
<slot />
|
|
43
|
-
</Box>
|
|
36
|
+
<Box
|
|
37
|
+
:style
|
|
38
|
+
v-bind='ariaAttributes'
|
|
39
|
+
:class='css.section'
|
|
40
|
+
:mod='[{ striped: striped || animated, animated }, mod]'
|
|
41
|
+
>
|
|
42
|
+
<slot />
|
|
43
|
+
</Box>
|
|
44
44
|
</template>
|
|
@@ -27,13 +27,13 @@ const value = defineModel({ type: Number, ...{ required: true } });
|
|
|
27
27
|
</script>
|
|
28
28
|
|
|
29
29
|
<template>
|
|
30
|
-
<ProgressRoot :size :radius :orientation :transition-duration :mod>
|
|
31
|
-
<ProgressSection
|
|
32
|
-
v-model='value'
|
|
33
|
-
:striped
|
|
34
|
-
:animated
|
|
35
|
-
:color
|
|
36
|
-
:with-aria
|
|
37
|
-
/>
|
|
38
|
-
</ProgressRoot>
|
|
30
|
+
<ProgressRoot :size :radius :orientation :transition-duration :mod>
|
|
31
|
+
<ProgressSection
|
|
32
|
+
v-model='value'
|
|
33
|
+
:striped
|
|
34
|
+
:animated
|
|
35
|
+
:color
|
|
36
|
+
:with-aria
|
|
37
|
+
/>
|
|
38
|
+
</ProgressRoot>
|
|
39
39
|
</template>
|