nuance-ui 0.2.8 → 0.2.9
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-group.vue +3 -3
- package/dist/runtime/components/action-icon/action-icon.vue +23 -23
- 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-main.vue +18 -18
- 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/box.vue +3 -3
- package/dist/runtime/components/breadcrumbs.vue +78 -78
- package/dist/runtime/components/button/button.vue +40 -40
- 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-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 +37 -37
- package/dist/runtime/components/checkbox/checkbox-indicator.vue +117 -117
- package/dist/runtime/components/checkbox/checkbox.vue +139 -139
- 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 +22 -22
- package/dist/runtime/components/combobox/combobox-options-dropdown.vue +29 -29
- 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.d.vue.ts +3 -3
- package/dist/runtime/components/date-time-picker.vue +66 -66
- package/dist/runtime/components/date-time-picker.vue.d.ts +3 -3
- 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-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 +19 -19
- package/dist/runtime/components/input/number-input.vue +134 -134
- package/dist/runtime/components/input/password-input.vue +28 -28
- package/dist/runtime/components/input/text-input.vue +35 -35
- package/dist/runtime/components/input/ui/input-inline.vue +105 -105
- package/dist/runtime/components/input/ui/input-wrapper.vue +54 -54
- 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/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 +132 -132
- 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/select.vue +63 -63
- package/dist/runtime/components/switch/switch-group.vue +16 -16
- package/dist/runtime/components/table/table.d.ts +30 -30
- package/dist/runtime/components/table/ui/table-sortable-header.vue +11 -11
- 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 +22 -22
- package/dist/runtime/components/text.vue +67 -67
- package/dist/runtime/components/textarea.vue +36 -36
- package/dist/runtime/components/title.vue +14 -14
- package/dist/runtime/components/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/visually-hidden/visually-hidden-input.vue +1 -1
- package/dist/runtime/components/visually-hidden/visually-hidden.vue +9 -9
- package/dist/runtime/styles/dark-theme.css +1 -1
- package/package.json +1 -1
|
@@ -53,53 +53,53 @@ function handleSelect(year) {
|
|
|
53
53
|
</script>
|
|
54
54
|
|
|
55
55
|
<template>
|
|
56
|
-
<Box is='table' role='grid' tabindex='-1' :class='$style.table'>
|
|
57
|
-
<tbody>
|
|
58
|
-
<tr v-for='(years, yearsIx) in yearList' :key='`decade-${yearsIx}`'>
|
|
59
|
-
<td v-for='year in years' :key='year'>
|
|
60
|
-
<CalendarCell
|
|
61
|
-
:class='$style.year'
|
|
56
|
+
<Box is='table' role='grid' tabindex='-1' :class='$style.table'>
|
|
57
|
+
<tbody>
|
|
58
|
+
<tr v-for='(years, yearsIx) in yearList' :key='`decade-${yearsIx}`'>
|
|
59
|
+
<td v-for='year in years' :key='year'>
|
|
60
|
+
<CalendarCell
|
|
61
|
+
:class='$style.year'
|
|
62
62
|
:mod='{
|
|
63
63
|
"today": isToday(year),
|
|
64
64
|
"selected": isSelected(year),
|
|
65
65
|
"in-range": isInRange(year),
|
|
66
66
|
"first-in-range": isFirstInRange(year),
|
|
67
67
|
"last-in-range": isLastInRange(year)
|
|
68
|
-
}'
|
|
69
|
-
:disabled='isDisabled(year)'
|
|
70
|
-
:size
|
|
71
|
-
@click='handleSelect(year)'
|
|
72
|
-
>
|
|
73
|
-
{{ year }}
|
|
74
|
-
</CalendarCell>
|
|
75
|
-
</td>
|
|
76
|
-
</tr>
|
|
77
|
-
</tbody>
|
|
78
|
-
</Box>
|
|
68
|
+
}'
|
|
69
|
+
:disabled='isDisabled(year)'
|
|
70
|
+
:size
|
|
71
|
+
@click='handleSelect(year)'
|
|
72
|
+
>
|
|
73
|
+
{{ year }}
|
|
74
|
+
</CalendarCell>
|
|
75
|
+
</td>
|
|
76
|
+
</tr>
|
|
77
|
+
</tbody>
|
|
78
|
+
</Box>
|
|
79
79
|
</template>
|
|
80
80
|
|
|
81
81
|
<style lang="postcss" module>
|
|
82
|
-
.table {
|
|
83
|
-
table-layout: fixed;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.year {
|
|
87
|
-
--day-size-xs: 1.875rem;
|
|
88
|
-
--day-size-sm: 2.25rem;
|
|
89
|
-
--day-size-md: 2.625rem;
|
|
90
|
-
--day-size-lg: 3rem;
|
|
91
|
-
--day-size-xl: 3.375rem;
|
|
92
|
-
|
|
93
|
-
cursor: pointer;
|
|
94
|
-
|
|
95
|
-
display: flex;
|
|
96
|
-
align-items: center;
|
|
97
|
-
justify-content: center;
|
|
98
|
-
|
|
99
|
-
width: calc((var(--day-size) * 7) / 3 + .09375rem);
|
|
100
|
-
|
|
101
|
-
height: var(--day-size);
|
|
102
|
-
|
|
103
|
-
text-transform: capitalize;
|
|
104
|
-
}
|
|
82
|
+
.table {
|
|
83
|
+
table-layout: fixed;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.year {
|
|
87
|
+
--day-size-xs: 1.875rem;
|
|
88
|
+
--day-size-sm: 2.25rem;
|
|
89
|
+
--day-size-md: 2.625rem;
|
|
90
|
+
--day-size-lg: 3rem;
|
|
91
|
+
--day-size-xl: 3.375rem;
|
|
92
|
+
|
|
93
|
+
cursor: pointer;
|
|
94
|
+
|
|
95
|
+
display: flex;
|
|
96
|
+
align-items: center;
|
|
97
|
+
justify-content: center;
|
|
98
|
+
|
|
99
|
+
width: calc((var(--day-size) * 7) / 3 + .09375rem);
|
|
100
|
+
|
|
101
|
+
height: var(--day-size);
|
|
102
|
+
|
|
103
|
+
text-transform: capitalize;
|
|
104
|
+
}
|
|
105
105
|
</style>
|
|
@@ -46,41 +46,41 @@ function handleSelect(event) {
|
|
|
46
46
|
</script>
|
|
47
47
|
|
|
48
48
|
<template>
|
|
49
|
-
<table :class='$style.table' role='grid' tabindex='-1'>
|
|
50
|
-
<thead>
|
|
51
|
-
<tr>
|
|
52
|
-
<th v-if='withWeekNumbers' :class='$style.weekday'>
|
|
53
|
-
#
|
|
54
|
-
</th>
|
|
55
|
-
<th v-for='day in ctx.weekdays.value' :key='day' :class='$style.weekday'>
|
|
56
|
-
<slot name='weekday' :day='day'>
|
|
57
|
-
{{ day }}
|
|
58
|
-
</slot>
|
|
59
|
-
</th>
|
|
60
|
-
</tr>
|
|
61
|
-
</thead>
|
|
62
|
-
|
|
63
|
-
<tbody @click='handleSelect'>
|
|
64
|
-
<Box
|
|
65
|
-
is='tr'
|
|
66
|
-
v-for='(week, weekIx) in weeks'
|
|
67
|
-
:key='`week-${weekIx}`'
|
|
68
|
-
:class='$style.row'
|
|
69
|
-
:mod='{ selectable: selection.mode === "week" }'
|
|
70
|
-
>
|
|
71
|
-
<td v-if='withWeekNumbers' :class='$style.weeknumber'>
|
|
72
|
-
{{ getWeekNumber(week[0], 1) }}
|
|
73
|
-
</td>
|
|
74
|
-
<Box
|
|
75
|
-
is='td'
|
|
76
|
-
v-for='(day, dayIx) in week'
|
|
77
|
-
:key='`day-${dayIx}`'
|
|
78
|
-
:class='$style.cell'
|
|
79
|
-
role='gridcell'
|
|
80
|
-
:mod='{ "with-spacing": withCellSpacing }'
|
|
81
|
-
>
|
|
82
|
-
<CalendarCell
|
|
83
|
-
:size
|
|
49
|
+
<table :class='$style.table' role='grid' tabindex='-1'>
|
|
50
|
+
<thead>
|
|
51
|
+
<tr>
|
|
52
|
+
<th v-if='withWeekNumbers' :class='$style.weekday'>
|
|
53
|
+
#
|
|
54
|
+
</th>
|
|
55
|
+
<th v-for='day in ctx.weekdays.value' :key='day' :class='$style.weekday'>
|
|
56
|
+
<slot name='weekday' :day='day'>
|
|
57
|
+
{{ day }}
|
|
58
|
+
</slot>
|
|
59
|
+
</th>
|
|
60
|
+
</tr>
|
|
61
|
+
</thead>
|
|
62
|
+
|
|
63
|
+
<tbody @click='handleSelect'>
|
|
64
|
+
<Box
|
|
65
|
+
is='tr'
|
|
66
|
+
v-for='(week, weekIx) in weeks'
|
|
67
|
+
:key='`week-${weekIx}`'
|
|
68
|
+
:class='$style.row'
|
|
69
|
+
:mod='{ selectable: selection.mode === "week" }'
|
|
70
|
+
>
|
|
71
|
+
<td v-if='withWeekNumbers' :class='$style.weeknumber'>
|
|
72
|
+
{{ getWeekNumber(week[0], 1) }}
|
|
73
|
+
</td>
|
|
74
|
+
<Box
|
|
75
|
+
is='td'
|
|
76
|
+
v-for='(day, dayIx) in week'
|
|
77
|
+
:key='`day-${dayIx}`'
|
|
78
|
+
:class='$style.cell'
|
|
79
|
+
role='gridcell'
|
|
80
|
+
:mod='{ "with-spacing": withCellSpacing }'
|
|
81
|
+
>
|
|
82
|
+
<CalendarCell
|
|
83
|
+
:size
|
|
84
84
|
:mod='{
|
|
85
85
|
"value": day,
|
|
86
86
|
"today": isToday(day),
|
|
@@ -91,49 +91,49 @@ function handleSelect(event) {
|
|
|
91
91
|
"in-range": selection.isInRange(day),
|
|
92
92
|
"first-in-range": selection.isFirstInRange(day),
|
|
93
93
|
"last-in-range": selection.isLastInRange(day)
|
|
94
|
-
}'
|
|
95
|
-
:disabled='isDisabled(day)'
|
|
96
|
-
>
|
|
97
|
-
<slot>
|
|
98
|
-
{{ new Date(day).getDate() }}
|
|
99
|
-
</slot>
|
|
100
|
-
</CalendarCell>
|
|
101
|
-
</Box>
|
|
102
|
-
</Box>
|
|
103
|
-
</tbody>
|
|
104
|
-
</table>
|
|
94
|
+
}'
|
|
95
|
+
:disabled='isDisabled(day)'
|
|
96
|
+
>
|
|
97
|
+
<slot>
|
|
98
|
+
{{ new Date(day).getDate() }}
|
|
99
|
+
</slot>
|
|
100
|
+
</CalendarCell>
|
|
101
|
+
</Box>
|
|
102
|
+
</Box>
|
|
103
|
+
</tbody>
|
|
104
|
+
</table>
|
|
105
105
|
</template>
|
|
106
106
|
|
|
107
107
|
<style lang="postcss" module>
|
|
108
|
-
.table {
|
|
109
|
-
table-layout: fixed;
|
|
110
|
-
border-collapse: collapse;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.row:where([data-selectable]):hover {
|
|
114
|
-
@mixin light {
|
|
115
|
-
background-color: var(--color-gray-0);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
@mixin dark {
|
|
119
|
-
background-color: var(--color-dark-5);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.cell {
|
|
124
|
-
padding: 0;
|
|
125
|
-
|
|
126
|
-
&:where(&[data-with-spacing]) {
|
|
127
|
-
padding: var(--calendar-cell-spacing);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.weekday {
|
|
132
|
-
padding-bottom: calc(var(--wr-spacing, var(--spacing-sm)) / 2);
|
|
133
|
-
|
|
134
|
-
font-size: var(--wr-fz, var(--font-size-sm));
|
|
135
|
-
font-weight: normal;
|
|
136
|
-
color: var(--color-dimmed);
|
|
137
|
-
text-transform: capitalize;
|
|
138
|
-
}
|
|
108
|
+
.table {
|
|
109
|
+
table-layout: fixed;
|
|
110
|
+
border-collapse: collapse;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.row:where([data-selectable]):hover {
|
|
114
|
+
@mixin light {
|
|
115
|
+
background-color: var(--color-gray-0);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@mixin dark {
|
|
119
|
+
background-color: var(--color-dark-5);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.cell {
|
|
124
|
+
padding: 0;
|
|
125
|
+
|
|
126
|
+
&:where(&[data-with-spacing]) {
|
|
127
|
+
padding: var(--calendar-cell-spacing);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.weekday {
|
|
132
|
+
padding-bottom: calc(var(--wr-spacing, var(--spacing-sm)) / 2);
|
|
133
|
+
|
|
134
|
+
font-size: var(--wr-fz, var(--font-size-sm));
|
|
135
|
+
font-weight: normal;
|
|
136
|
+
color: var(--color-dimmed);
|
|
137
|
+
text-transform: capitalize;
|
|
138
|
+
}
|
|
139
139
|
</style>
|
|
@@ -48,53 +48,53 @@ function handleSelect(month) {
|
|
|
48
48
|
</script>
|
|
49
49
|
|
|
50
50
|
<template>
|
|
51
|
-
<Box is='table' role='grid' tabindex='-1' :class='$style.table'>
|
|
52
|
-
<tbody>
|
|
53
|
-
<tr v-for='(months, seasonIx) in monthList' :key='`${year}-${seasonIx}`'>
|
|
54
|
-
<td v-for='month in months' :key='`${year}-${month.ix}`'>
|
|
55
|
-
<CalendarCell
|
|
56
|
-
:class='$style.year'
|
|
51
|
+
<Box is='table' role='grid' tabindex='-1' :class='$style.table'>
|
|
52
|
+
<tbody>
|
|
53
|
+
<tr v-for='(months, seasonIx) in monthList' :key='`${year}-${seasonIx}`'>
|
|
54
|
+
<td v-for='month in months' :key='`${year}-${month.ix}`'>
|
|
55
|
+
<CalendarCell
|
|
56
|
+
:class='$style.year'
|
|
57
57
|
:mod='{
|
|
58
58
|
"today": isToday(month.ix),
|
|
59
59
|
"selected": isSelected(month.ix),
|
|
60
60
|
"in-range": isInRange(month.ix),
|
|
61
61
|
"first-in-range": isFirstInRange(month.ix),
|
|
62
62
|
"last-in-range": isLastInRange(month.ix)
|
|
63
|
-
}'
|
|
64
|
-
:disabled='isDisabled(month.ix)'
|
|
65
|
-
:size
|
|
66
|
-
@click='handleSelect(month.ix)'
|
|
67
|
-
>
|
|
68
|
-
{{ month.label }}
|
|
69
|
-
</CalendarCell>
|
|
70
|
-
</td>
|
|
71
|
-
</tr>
|
|
72
|
-
</tbody>
|
|
73
|
-
</Box>
|
|
63
|
+
}'
|
|
64
|
+
:disabled='isDisabled(month.ix)'
|
|
65
|
+
:size
|
|
66
|
+
@click='handleSelect(month.ix)'
|
|
67
|
+
>
|
|
68
|
+
{{ month.label }}
|
|
69
|
+
</CalendarCell>
|
|
70
|
+
</td>
|
|
71
|
+
</tr>
|
|
72
|
+
</tbody>
|
|
73
|
+
</Box>
|
|
74
74
|
</template>
|
|
75
75
|
|
|
76
76
|
<style lang="postcss" module>
|
|
77
|
-
.table {
|
|
78
|
-
table-layout: fixed;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.year {
|
|
82
|
-
--day-size-xs: 1.875rem;
|
|
83
|
-
--day-size-sm: 2.25rem;
|
|
84
|
-
--day-size-md: 2.625rem;
|
|
85
|
-
--day-size-lg: 3rem;
|
|
86
|
-
--day-size-xl: 3.375rem;
|
|
87
|
-
|
|
88
|
-
cursor: pointer;
|
|
89
|
-
|
|
90
|
-
display: flex;
|
|
91
|
-
align-items: center;
|
|
92
|
-
justify-content: center;
|
|
93
|
-
|
|
94
|
-
width: calc((var(--day-size) * 7) / 3 + .09375rem);
|
|
95
|
-
|
|
96
|
-
height: var(--day-size);
|
|
97
|
-
|
|
98
|
-
text-transform: capitalize;
|
|
99
|
-
}
|
|
77
|
+
.table {
|
|
78
|
+
table-layout: fixed;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.year {
|
|
82
|
+
--day-size-xs: 1.875rem;
|
|
83
|
+
--day-size-sm: 2.25rem;
|
|
84
|
+
--day-size-md: 2.625rem;
|
|
85
|
+
--day-size-lg: 3rem;
|
|
86
|
+
--day-size-xl: 3.375rem;
|
|
87
|
+
|
|
88
|
+
cursor: pointer;
|
|
89
|
+
|
|
90
|
+
display: flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
justify-content: center;
|
|
93
|
+
|
|
94
|
+
width: calc((var(--day-size) * 7) / 3 + .09375rem);
|
|
95
|
+
|
|
96
|
+
height: var(--day-size);
|
|
97
|
+
|
|
98
|
+
text-transform: capitalize;
|
|
99
|
+
}
|
|
100
100
|
</style>
|
|
@@ -10,7 +10,7 @@ const { is = "section", mod, inheritPadding, withBorder } = defineProps({
|
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
12
|
<template>
|
|
13
|
-
<Box :is :class='css.section' :mod='[mod, { "with-border": withBorder, "inherit-padding": inheritPadding }]'>
|
|
14
|
-
<slot />
|
|
15
|
-
</Box>
|
|
13
|
+
<Box :is :class='css.section' :mod='[mod, { "with-border": withBorder, "inherit-padding": inheritPadding }]'>
|
|
14
|
+
<slot />
|
|
15
|
+
</Box>
|
|
16
16
|
</template>
|
|
@@ -48,44 +48,44 @@ const style = computed(() => ({
|
|
|
48
48
|
</script>
|
|
49
49
|
|
|
50
50
|
<template>
|
|
51
|
-
<UnstyledButton
|
|
52
|
-
:mod='[{ checked, "with-border": withBorder }, mod]'
|
|
53
|
-
:value='checked'
|
|
54
|
-
:class='$style.root'
|
|
55
|
-
:style
|
|
56
|
-
:disabled
|
|
57
|
-
@click='checked = !checked'
|
|
58
|
-
>
|
|
59
|
-
<slot />
|
|
60
|
-
</UnstyledButton>
|
|
51
|
+
<UnstyledButton
|
|
52
|
+
:mod='[{ checked, "with-border": withBorder }, mod]'
|
|
53
|
+
:value='checked'
|
|
54
|
+
:class='$style.root'
|
|
55
|
+
:style
|
|
56
|
+
:disabled
|
|
57
|
+
@click='checked = !checked'
|
|
58
|
+
>
|
|
59
|
+
<slot />
|
|
60
|
+
</UnstyledButton>
|
|
61
61
|
</template>
|
|
62
62
|
|
|
63
63
|
<style module lang="postcss">
|
|
64
|
-
.root {
|
|
65
|
-
--card-radius: var(--radius-default);
|
|
66
|
-
|
|
67
|
-
cursor: pointer;
|
|
68
|
-
|
|
69
|
-
display: block;
|
|
70
|
-
|
|
71
|
-
width: 100%;
|
|
72
|
-
|
|
73
|
-
border-radius: var(--card-radius);
|
|
74
|
-
|
|
75
|
-
& :where(*) {
|
|
76
|
-
cursor: inherit;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
&:where([data-with-border]) {
|
|
80
|
-
border: 1px solid transparent;
|
|
81
|
-
|
|
82
|
-
@mixin where-light {
|
|
83
|
-
border-color: var(--color-gray-3);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
@mixin where-dark {
|
|
87
|
-
border-color: var(--color-dark-4);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
64
|
+
.root {
|
|
65
|
+
--card-radius: var(--radius-default);
|
|
66
|
+
|
|
67
|
+
cursor: pointer;
|
|
68
|
+
|
|
69
|
+
display: block;
|
|
70
|
+
|
|
71
|
+
width: 100%;
|
|
72
|
+
|
|
73
|
+
border-radius: var(--card-radius);
|
|
74
|
+
|
|
75
|
+
& :where(*) {
|
|
76
|
+
cursor: inherit;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&:where([data-with-border]) {
|
|
80
|
+
border: 1px solid transparent;
|
|
81
|
+
|
|
82
|
+
@mixin where-light {
|
|
83
|
+
border-color: var(--color-gray-3);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@mixin where-dark {
|
|
87
|
+
border-color: var(--color-dark-4);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
91
|
</style>
|