nuance-ui 0.2.7 → 0.2.8
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/dist/module.json +1 -1
- package/dist/runtime/components/action-icon/action-icon.d.vue.ts +1 -1
- package/dist/runtime/components/action-icon/action-icon.vue +23 -23
- package/dist/runtime/components/action-icon/action-icon.vue.d.ts +1 -1
- package/dist/runtime/components/box.vue +3 -3
- package/dist/runtime/components/button/button.d.vue.ts +5 -3
- package/dist/runtime/components/button/button.vue +43 -39
- package/dist/runtime/components/button/button.vue.d.ts +5 -3
- package/dist/runtime/components/calendar/calendar.d.vue.ts +1 -1
- package/dist/runtime/components/calendar/calendar.vue +60 -60
- package/dist/runtime/components/calendar/calendar.vue.d.ts +1 -1
- package/dist/runtime/components/calendar/types.d.ts +4 -3
- package/dist/runtime/components/calendar/ui/core/calendar-header.d.vue.ts +7 -1
- package/dist/runtime/components/calendar/ui/core/calendar-header.vue.d.ts +7 -1
- package/dist/runtime/components/calendar/ui/levels/calendar-decade.d.vue.ts +3 -1
- package/dist/runtime/components/calendar/ui/levels/calendar-decade.vue.d.ts +3 -1
- package/dist/runtime/components/calendar/ui/levels/calendar-month.d.vue.ts +2 -1
- package/dist/runtime/components/calendar/ui/levels/calendar-month.vue +77 -77
- package/dist/runtime/components/calendar/ui/levels/calendar-month.vue.d.ts +2 -1
- package/dist/runtime/components/calendar/ui/levels/calendar-year.d.vue.ts +3 -1
- package/dist/runtime/components/calendar/ui/levels/calendar-year.vue.d.ts +3 -1
- package/dist/runtime/components/card/card-section.d.vue.ts +2 -1
- package/dist/runtime/components/card/card-section.vue.d.ts +2 -1
- package/dist/runtime/components/card/card.d.vue.ts +1 -0
- package/dist/runtime/components/card/card.vue.d.ts +1 -0
- package/dist/runtime/components/checkbox/checkbox-card.d.vue.ts +4 -1
- package/dist/runtime/components/checkbox/checkbox-card.vue +37 -37
- package/dist/runtime/components/checkbox/checkbox-card.vue.d.ts +4 -1
- package/dist/runtime/components/checkbox/checkbox-indicator.d.vue.ts +6 -0
- package/dist/runtime/components/checkbox/checkbox-indicator.vue.d.ts +6 -0
- package/dist/runtime/components/checkbox/checkbox.d.vue.ts +12 -2
- package/dist/runtime/components/checkbox/checkbox.vue +139 -139
- package/dist/runtime/components/checkbox/checkbox.vue.d.ts +12 -2
- package/dist/runtime/components/chip/chip-group.d.vue.ts +3 -0
- package/dist/runtime/components/chip/chip-group.vue.d.ts +3 -0
- package/dist/runtime/components/chip/chip.d.vue.ts +9 -0
- package/dist/runtime/components/chip/chip.vue +200 -200
- package/dist/runtime/components/chip/chip.vue.d.ts +9 -0
- package/dist/runtime/components/combobox/combobox-group.d.vue.ts +1 -0
- package/dist/runtime/components/combobox/combobox-group.vue.d.ts +1 -0
- package/dist/runtime/components/combobox/combobox-option.d.vue.ts +3 -0
- package/dist/runtime/components/combobox/combobox-option.vue.d.ts +3 -0
- package/dist/runtime/components/combobox/combobox-options-dropdown.d.vue.ts +10 -0
- package/dist/runtime/components/combobox/combobox-options-dropdown.vue +29 -29
- package/dist/runtime/components/combobox/combobox-options-dropdown.vue.d.ts +10 -0
- package/dist/runtime/components/combobox/combobox-root.d.vue.ts +8 -4
- package/dist/runtime/components/combobox/combobox-root.vue.d.ts +8 -4
- package/dist/runtime/components/combobox/types.d.ts +11 -0
- package/dist/runtime/components/container.d.vue.ts +2 -0
- package/dist/runtime/components/container.vue.d.ts +2 -0
- package/dist/runtime/components/dialog/types.d.ts +1 -0
- package/dist/runtime/components/files/file-upload-button.d.vue.ts +4 -2
- package/dist/runtime/components/files/file-upload-button.vue +12 -12
- package/dist/runtime/components/files/file-upload-button.vue.d.ts +4 -2
- package/dist/runtime/components/files/file-upload-icon.d.vue.ts +4 -2
- package/dist/runtime/components/files/file-upload-icon.vue +1 -1
- package/dist/runtime/components/files/file-upload-icon.vue.d.ts +4 -2
- package/dist/runtime/components/input/email-input.d.vue.ts +5 -5
- package/dist/runtime/components/input/email-input.vue +5 -6
- package/dist/runtime/components/input/email-input.vue.d.ts +5 -5
- package/dist/runtime/components/input/lib/input-wrapper.context.d.ts +8 -2
- package/dist/runtime/components/input/number-input.d.vue.ts +7 -5
- package/dist/runtime/components/input/number-input.vue +6 -2
- package/dist/runtime/components/input/number-input.vue.d.ts +7 -5
- package/dist/runtime/components/input/password-input.vue +1 -0
- package/dist/runtime/components/input/text-input.d.vue.ts +7 -5
- package/dist/runtime/components/input/text-input.vue +37 -34
- package/dist/runtime/components/input/text-input.vue.d.ts +7 -5
- package/dist/runtime/components/input/ui/input-inline.d.vue.ts +7 -3
- package/dist/runtime/components/input/ui/input-inline.vue +105 -105
- package/dist/runtime/components/input/ui/input-inline.vue.d.ts +7 -3
- package/dist/runtime/components/input/ui/input-wrapper.d.vue.ts +4 -1
- package/dist/runtime/components/input/ui/input-wrapper.vue +54 -54
- package/dist/runtime/components/input/ui/input-wrapper.vue.d.ts +4 -1
- package/dist/runtime/components/link/link-button.vue +1 -0
- package/dist/runtime/components/nav-link/nav-link.d.vue.ts +6 -4
- package/dist/runtime/components/nav-link/nav-link.vue +7 -3
- package/dist/runtime/components/nav-link/nav-link.vue.d.ts +6 -4
- package/dist/runtime/components/paper.d.vue.ts +3 -1
- package/dist/runtime/components/paper.vue +33 -33
- package/dist/runtime/components/paper.vue.d.ts +3 -1
- package/dist/runtime/components/progress/progress-section.d.vue.ts +1 -1
- package/dist/runtime/components/progress/progress-section.vue.d.ts +1 -1
- package/dist/runtime/components/select.d.vue.ts +2 -0
- package/dist/runtime/components/select.vue +63 -63
- package/dist/runtime/components/select.vue.d.ts +2 -0
- package/dist/runtime/components/table/types.d.ts +10 -1
- package/dist/runtime/components/table/ui/table-sortable-header.vue +1 -0
- package/dist/runtime/components/tabs/tabs-list.d.vue.ts +2 -0
- package/dist/runtime/components/tabs/tabs-list.vue.d.ts +2 -0
- package/dist/runtime/components/tabs/tabs-panel.d.vue.ts +1 -0
- package/dist/runtime/components/tabs/tabs-panel.vue.d.ts +1 -0
- package/dist/runtime/components/tabs/tabs-root.d.vue.ts +36 -9
- package/dist/runtime/components/tabs/tabs-root.vue.d.ts +36 -9
- package/dist/runtime/components/tabs/tabs-tab.d.vue.ts +7 -3
- package/dist/runtime/components/tabs/tabs-tab.vue +7 -4
- package/dist/runtime/components/tabs/tabs-tab.vue.d.ts +7 -3
- package/dist/runtime/components/text.d.vue.ts +6 -1
- package/dist/runtime/components/text.vue.d.ts +6 -1
- package/dist/runtime/components/textarea.d.vue.ts +7 -5
- package/dist/runtime/components/textarea.vue +6 -3
- package/dist/runtime/components/textarea.vue.d.ts +7 -5
- package/dist/runtime/components/title.d.vue.ts +5 -0
- package/dist/runtime/components/title.vue.d.ts +5 -0
- package/dist/runtime/components/transition.d.vue.ts +12 -2
- package/dist/runtime/components/transition.vue.d.ts +12 -2
- package/dist/runtime/components/tree/_ui/tree-item.d.vue.ts +1 -0
- package/dist/runtime/components/tree/_ui/tree-item.vue.d.ts +1 -0
- package/dist/runtime/components/tree/_ui/tree-root.d.vue.ts +8 -0
- package/dist/runtime/components/tree/_ui/tree-root.vue.d.ts +8 -0
- package/dist/runtime/components/tree/lib/context.d.ts +15 -0
- package/dist/runtime/components/tree/types.d.ts +9 -0
- package/dist/runtime/components/visually-hidden/visually-hidden-input.d.vue.ts +2 -0
- package/dist/runtime/components/visually-hidden/visually-hidden-input.vue +1 -1
- package/dist/runtime/components/visually-hidden/visually-hidden-input.vue.d.ts +2 -0
- package/dist/runtime/components/visually-hidden/visually-hidden.d.vue.ts +1 -0
- package/dist/runtime/components/visually-hidden/visually-hidden.vue.d.ts +1 -0
- package/package.json +1 -1
|
@@ -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>
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { DateInput } from '@formkit/tempo';
|
|
2
2
|
import type { NuanceSize } from '@nui/types';
|
|
3
3
|
export interface CalendarMonthProps {
|
|
4
|
+
/** ISO string of the month to render */
|
|
4
5
|
month: string;
|
|
5
6
|
/** Detects the presence of spaces between cells. @default `true` */
|
|
6
7
|
withCellSpacing?: boolean;
|
|
7
|
-
/**
|
|
8
|
+
/** Component size */
|
|
8
9
|
size?: NuanceSize | string;
|
|
9
10
|
/** Determines whether week numbers should be displayed @default `false` */
|
|
10
11
|
withWeekNumbers?: boolean;
|
|
@@ -2,9 +2,11 @@ import type { DateInput } from '@formkit/tempo';
|
|
|
2
2
|
import type { NuanceSize } from '@nui/types';
|
|
3
3
|
import type { CalendarCellProps } from '../core/index.js';
|
|
4
4
|
export interface CalendarYearProps extends CalendarCellProps {
|
|
5
|
+
/** Year date used to generate the month grid */
|
|
5
6
|
year: DateInput;
|
|
6
|
-
/**
|
|
7
|
+
/** Component size */
|
|
7
8
|
size?: NuanceSize | string;
|
|
9
|
+
/** Allows selecting a month as the final value without drilling down */
|
|
8
10
|
selectable?: boolean;
|
|
9
11
|
}
|
|
10
12
|
declare const __VLS_export: import("vue").DefineComponent<CalendarYearProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -2,9 +2,11 @@ import type { DateInput } from '@formkit/tempo';
|
|
|
2
2
|
import type { NuanceSize } from '@nui/types';
|
|
3
3
|
import type { CalendarCellProps } from '../core/index.js';
|
|
4
4
|
export interface CalendarYearProps extends CalendarCellProps {
|
|
5
|
+
/** Year date used to generate the month grid */
|
|
5
6
|
year: DateInput;
|
|
6
|
-
/**
|
|
7
|
+
/** Component size */
|
|
7
8
|
size?: NuanceSize | string;
|
|
9
|
+
/** Allows selecting a month as the final value without drilling down */
|
|
8
10
|
selectable?: boolean;
|
|
9
11
|
}
|
|
10
12
|
declare const __VLS_export: import("vue").DefineComponent<CalendarYearProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { BoxProps } from '../box.vue.js';
|
|
2
2
|
export interface CardSectionProps extends BoxProps {
|
|
3
|
+
/** Shows a top border */
|
|
3
4
|
withBorder?: boolean;
|
|
4
|
-
/**
|
|
5
|
+
/** Inherits horizontal padding from the parent card */
|
|
5
6
|
inheritPadding?: boolean;
|
|
6
7
|
}
|
|
7
8
|
declare var __VLS_8: {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { BoxProps } from '../box.vue.js';
|
|
2
2
|
export interface CardSectionProps extends BoxProps {
|
|
3
|
+
/** Shows a top border */
|
|
3
4
|
withBorder?: boolean;
|
|
4
|
-
/**
|
|
5
|
+
/** Inherits horizontal padding from the parent card */
|
|
5
6
|
inheritPadding?: boolean;
|
|
6
7
|
}
|
|
7
8
|
declare var __VLS_8: {};
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import type { NuanceRadius } from '@nui/types';
|
|
2
2
|
import type { Mod } from '@nui/utils';
|
|
3
3
|
export interface CheckboxCardProps {
|
|
4
|
+
/** Element modifiers transformed into `data-` attributes, falsy values are removed */
|
|
4
5
|
mod?: Mod | Mod[];
|
|
6
|
+
/** Shows a border around the card */
|
|
5
7
|
withBorder?: boolean;
|
|
6
8
|
/** Border radius */
|
|
7
9
|
radius?: NuanceRadius;
|
|
8
|
-
/**
|
|
10
|
+
/** Disables the component */
|
|
9
11
|
disabled?: boolean | undefined;
|
|
12
|
+
/** Value used in checkbox group context */
|
|
10
13
|
value?: string;
|
|
11
14
|
}
|
|
12
15
|
type __VLS_Props = CheckboxCardProps;
|
|
@@ -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>
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import type { NuanceRadius } from '@nui/types';
|
|
2
2
|
import type { Mod } from '@nui/utils';
|
|
3
3
|
export interface CheckboxCardProps {
|
|
4
|
+
/** Element modifiers transformed into `data-` attributes, falsy values are removed */
|
|
4
5
|
mod?: Mod | Mod[];
|
|
6
|
+
/** Shows a border around the card */
|
|
5
7
|
withBorder?: boolean;
|
|
6
8
|
/** Border radius */
|
|
7
9
|
radius?: NuanceRadius;
|
|
8
|
-
/**
|
|
10
|
+
/** Disables the component */
|
|
9
11
|
disabled?: boolean | undefined;
|
|
12
|
+
/** Value used in checkbox group context */
|
|
10
13
|
value?: string;
|
|
11
14
|
}
|
|
12
15
|
type __VLS_Props = CheckboxCardProps;
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import type { NuanceColor, NuanceSize } from '@nui/types';
|
|
2
2
|
export interface CheckboxIndicatorProps {
|
|
3
|
+
/** Color from theme */
|
|
3
4
|
color?: NuanceColor;
|
|
5
|
+
/** Icon color */
|
|
4
6
|
iconColor?: NuanceColor;
|
|
7
|
+
/** Visual variant */
|
|
5
8
|
variant?: 'filled' | 'outline';
|
|
9
|
+
/** Border radius */
|
|
6
10
|
radius?: NuanceSize;
|
|
11
|
+
/** Component size */
|
|
7
12
|
size?: NuanceSize;
|
|
13
|
+
/** Displays indeterminate icon */
|
|
8
14
|
indeterminate?: boolean;
|
|
9
15
|
}
|
|
10
16
|
type __VLS_Props = CheckboxIndicatorProps;
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import type { NuanceColor, NuanceSize } from '@nui/types';
|
|
2
2
|
export interface CheckboxIndicatorProps {
|
|
3
|
+
/** Color from theme */
|
|
3
4
|
color?: NuanceColor;
|
|
5
|
+
/** Icon color */
|
|
4
6
|
iconColor?: NuanceColor;
|
|
7
|
+
/** Visual variant */
|
|
5
8
|
variant?: 'filled' | 'outline';
|
|
9
|
+
/** Border radius */
|
|
6
10
|
radius?: NuanceSize;
|
|
11
|
+
/** Component size */
|
|
7
12
|
size?: NuanceSize;
|
|
13
|
+
/** Displays indeterminate icon */
|
|
8
14
|
indeterminate?: boolean;
|
|
9
15
|
}
|
|
10
16
|
type __VLS_Props = CheckboxIndicatorProps;
|
|
@@ -3,13 +3,23 @@ import type { InlineInputProps } from '../input/index.js';
|
|
|
3
3
|
export interface CheckboxProps extends Omit<InlineInputProps, 'id'> {
|
|
4
4
|
/** Id used to bind input and label, auto-generated if not provided */
|
|
5
5
|
id?: string;
|
|
6
|
+
/** Color from theme */
|
|
6
7
|
color?: NuanceColor;
|
|
8
|
+
/** Icon color */
|
|
7
9
|
iconColor?: NuanceColor;
|
|
8
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* Visual variant
|
|
12
|
+
* @default `'filled'`
|
|
13
|
+
*/
|
|
9
14
|
variant?: 'filled' | 'outline';
|
|
15
|
+
/** Border radius */
|
|
10
16
|
radius?: NuanceSize;
|
|
11
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* Component size
|
|
19
|
+
* @default `'sm'`
|
|
20
|
+
*/
|
|
12
21
|
size?: NuanceSize;
|
|
22
|
+
/** Value used in checkbox group context */
|
|
13
23
|
value?: string;
|
|
14
24
|
}
|
|
15
25
|
type __VLS_Props = CheckboxProps;
|