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
|
@@ -39,124 +39,124 @@ const style = computed(() => useStyleResolver((theme) => {
|
|
|
39
39
|
</script>
|
|
40
40
|
|
|
41
41
|
<template>
|
|
42
|
-
<Box :style :class='$style.indicator' :mod='{ checked }'>
|
|
43
|
-
<slot :indeterminate='indeterminate' :class='$style.icon' :mod='{ checked }'>
|
|
44
|
-
<Icon v-if='!indeterminate' name='gravity-ui:check' :class='$style.icon' :mod='{ checked }' />
|
|
45
|
-
<Icon v-else :class='$style.icon' name='gravity-ui:minus' :mod='{ checked }' />
|
|
46
|
-
</slot>
|
|
47
|
-
</Box>
|
|
42
|
+
<Box :style :class='$style.indicator' :mod='{ checked }'>
|
|
43
|
+
<slot :indeterminate='indeterminate' :class='$style.icon' :mod='{ checked }'>
|
|
44
|
+
<Icon v-if='!indeterminate' name='gravity-ui:check' :class='$style.icon' :mod='{ checked }' />
|
|
45
|
+
<Icon v-else :class='$style.icon' name='gravity-ui:minus' :mod='{ checked }' />
|
|
46
|
+
</slot>
|
|
47
|
+
</Box>
|
|
48
48
|
</template>
|
|
49
49
|
|
|
50
50
|
<style module lang="postcss">
|
|
51
|
-
.indicator {
|
|
52
|
-
--checkbox-size-xs: rem(16px);
|
|
53
|
-
--checkbox-size-sm: rem(20px);
|
|
54
|
-
--checkbox-size-md: rem(24px);
|
|
55
|
-
--checkbox-size-lg: rem(30px);
|
|
56
|
-
--checkbox-size-xl: rem(36px);
|
|
57
|
-
|
|
58
|
-
--checkbox-size: var(--checkbox-size-sm);
|
|
59
|
-
--checkbox-color: var(--color-primary-filled);
|
|
60
|
-
--checkbox-icon-color: var(--color-white);
|
|
61
|
-
|
|
62
|
-
--checkbox-radius: var(--radius-default);
|
|
63
|
-
|
|
64
|
-
position: relative;
|
|
65
|
-
|
|
66
|
-
display: flex;
|
|
67
|
-
align-items: center;
|
|
68
|
-
justify-content: center;
|
|
69
|
-
|
|
70
|
-
width: var(--checkbox-size);
|
|
71
|
-
min-width: var(--checkbox-size);
|
|
72
|
-
height: var(--checkbox-size);
|
|
73
|
-
min-height: var(--checkbox-size);
|
|
74
|
-
|
|
75
|
-
border: 1px solid transparent;
|
|
76
|
-
border-radius: var(--checkbox-radius);
|
|
77
|
-
|
|
78
|
-
transition: border-color 100ms ease,
|
|
79
|
-
background-color 100ms ease;
|
|
80
|
-
-webkit-tap-highlight-color: transparent;
|
|
81
|
-
|
|
82
|
-
&[data-indeterminate],
|
|
83
|
-
&[data-checked] {
|
|
84
|
-
border-color: var(--checkbox-color);
|
|
85
|
-
|
|
86
|
-
background-color: var(--checkbox-color);
|
|
87
|
-
|
|
88
|
-
&>.icon {
|
|
89
|
-
transform: none;
|
|
90
|
-
|
|
91
|
-
color: var(--checkbox-icon-color);
|
|
92
|
-
|
|
93
|
-
opacity: 1;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
&[data-disabled] {
|
|
98
|
-
cursor: not-allowed;
|
|
99
|
-
|
|
100
|
-
border-color: var(--color-disabled-border);
|
|
101
|
-
|
|
102
|
-
background-color: var(--color-disabled);
|
|
103
|
-
|
|
104
|
-
&[data-checked]>.icon {
|
|
105
|
-
@mixin light {
|
|
106
|
-
color: var(--color-gray-5);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
@mixin dark {
|
|
110
|
-
color: var(--color-dark-3);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
@mixin where-light {
|
|
116
|
-
border-color: var(--color-gray-4);
|
|
117
|
-
|
|
118
|
-
background-color: var(--color-white);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
@mixin where-dark {
|
|
122
|
-
border-color: var(--color-dark-4);
|
|
123
|
-
|
|
124
|
-
background-color: var(--color-dark-6);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.indicator[data-variant='outline'] {
|
|
129
|
-
|
|
130
|
-
&[data-indeterminate]:not([data-disabled]),
|
|
131
|
-
&[data-checked]:not([data-disabled]) {
|
|
132
|
-
border-color: var(--checkbox-color);
|
|
133
|
-
|
|
134
|
-
background-color: transparent;
|
|
135
|
-
|
|
136
|
-
&>.icon {
|
|
137
|
-
transform: none;
|
|
138
|
-
|
|
139
|
-
color: var(--checkbox-color);
|
|
140
|
-
|
|
141
|
-
opacity: 1;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.icon {
|
|
147
|
-
pointer-events: none;
|
|
148
|
-
|
|
149
|
-
transform: translateY(.25rem) scale(0.5);
|
|
150
|
-
|
|
151
|
-
display: block;
|
|
152
|
-
|
|
153
|
-
width: 80%;
|
|
154
|
-
|
|
155
|
-
color: transparent;
|
|
156
|
-
|
|
157
|
-
opacity: 1;
|
|
158
|
-
|
|
159
|
-
transition: transform 100ms ease,
|
|
160
|
-
opacity 100ms ease;
|
|
161
|
-
}
|
|
51
|
+
.indicator {
|
|
52
|
+
--checkbox-size-xs: rem(16px);
|
|
53
|
+
--checkbox-size-sm: rem(20px);
|
|
54
|
+
--checkbox-size-md: rem(24px);
|
|
55
|
+
--checkbox-size-lg: rem(30px);
|
|
56
|
+
--checkbox-size-xl: rem(36px);
|
|
57
|
+
|
|
58
|
+
--checkbox-size: var(--checkbox-size-sm);
|
|
59
|
+
--checkbox-color: var(--color-primary-filled);
|
|
60
|
+
--checkbox-icon-color: var(--color-white);
|
|
61
|
+
|
|
62
|
+
--checkbox-radius: var(--radius-default);
|
|
63
|
+
|
|
64
|
+
position: relative;
|
|
65
|
+
|
|
66
|
+
display: flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
justify-content: center;
|
|
69
|
+
|
|
70
|
+
width: var(--checkbox-size);
|
|
71
|
+
min-width: var(--checkbox-size);
|
|
72
|
+
height: var(--checkbox-size);
|
|
73
|
+
min-height: var(--checkbox-size);
|
|
74
|
+
|
|
75
|
+
border: 1px solid transparent;
|
|
76
|
+
border-radius: var(--checkbox-radius);
|
|
77
|
+
|
|
78
|
+
transition: border-color 100ms ease,
|
|
79
|
+
background-color 100ms ease;
|
|
80
|
+
-webkit-tap-highlight-color: transparent;
|
|
81
|
+
|
|
82
|
+
&[data-indeterminate],
|
|
83
|
+
&[data-checked] {
|
|
84
|
+
border-color: var(--checkbox-color);
|
|
85
|
+
|
|
86
|
+
background-color: var(--checkbox-color);
|
|
87
|
+
|
|
88
|
+
&>.icon {
|
|
89
|
+
transform: none;
|
|
90
|
+
|
|
91
|
+
color: var(--checkbox-icon-color);
|
|
92
|
+
|
|
93
|
+
opacity: 1;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&[data-disabled] {
|
|
98
|
+
cursor: not-allowed;
|
|
99
|
+
|
|
100
|
+
border-color: var(--color-disabled-border);
|
|
101
|
+
|
|
102
|
+
background-color: var(--color-disabled);
|
|
103
|
+
|
|
104
|
+
&[data-checked]>.icon {
|
|
105
|
+
@mixin light {
|
|
106
|
+
color: var(--color-gray-5);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@mixin dark {
|
|
110
|
+
color: var(--color-dark-3);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@mixin where-light {
|
|
116
|
+
border-color: var(--color-gray-4);
|
|
117
|
+
|
|
118
|
+
background-color: var(--color-white);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@mixin where-dark {
|
|
122
|
+
border-color: var(--color-dark-4);
|
|
123
|
+
|
|
124
|
+
background-color: var(--color-dark-6);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.indicator[data-variant='outline'] {
|
|
129
|
+
|
|
130
|
+
&[data-indeterminate]:not([data-disabled]),
|
|
131
|
+
&[data-checked]:not([data-disabled]) {
|
|
132
|
+
border-color: var(--checkbox-color);
|
|
133
|
+
|
|
134
|
+
background-color: transparent;
|
|
135
|
+
|
|
136
|
+
&>.icon {
|
|
137
|
+
transform: none;
|
|
138
|
+
|
|
139
|
+
color: var(--checkbox-color);
|
|
140
|
+
|
|
141
|
+
opacity: 1;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.icon {
|
|
147
|
+
pointer-events: none;
|
|
148
|
+
|
|
149
|
+
transform: translateY(.25rem) scale(0.5);
|
|
150
|
+
|
|
151
|
+
display: block;
|
|
152
|
+
|
|
153
|
+
width: 80%;
|
|
154
|
+
|
|
155
|
+
color: transparent;
|
|
156
|
+
|
|
157
|
+
opacity: 1;
|
|
158
|
+
|
|
159
|
+
transition: transform 100ms ease,
|
|
160
|
+
opacity 100ms ease;
|
|
161
|
+
}
|
|
162
162
|
</style>
|
|
@@ -69,146 +69,146 @@ const style = computed(() => useStyleResolver((theme) => {
|
|
|
69
69
|
</script>
|
|
70
70
|
|
|
71
71
|
<template>
|
|
72
|
-
<InputInline v-bind='rest' :id='uuid' :class='$style.root' :style :size>
|
|
73
|
-
<Box :class='$style.inner' :mod='{ "label-position": rest?.labelPosition }'>
|
|
74
|
-
<input
|
|
75
|
-
:id
|
|
76
|
-
v-model='checked'
|
|
77
|
-
type='checkbox'
|
|
78
|
-
:class='$style.input'
|
|
79
|
-
:disabled
|
|
80
|
-
>
|
|
81
|
-
|
|
82
|
-
<slot name='icon' :indeterminate='modelValue === "indeterminate"' :class='$style.icon'>
|
|
83
|
-
<Icon v-if='modelValue !== "indeterminate"' name='gravity-ui:check' :class='$style.icon' />
|
|
84
|
-
<Icon v-else name='gravity-ui:minus' :class='$style.icon' />
|
|
85
|
-
</slot>
|
|
86
|
-
</Box>
|
|
87
|
-
</InputInline>
|
|
72
|
+
<InputInline v-bind='rest' :id='uuid' :class='$style.root' :style :size>
|
|
73
|
+
<Box :class='$style.inner' :mod='{ "label-position": rest?.labelPosition }'>
|
|
74
|
+
<input
|
|
75
|
+
:id
|
|
76
|
+
v-model='checked'
|
|
77
|
+
type='checkbox'
|
|
78
|
+
:class='$style.input'
|
|
79
|
+
:disabled
|
|
80
|
+
>
|
|
81
|
+
|
|
82
|
+
<slot name='icon' :indeterminate='modelValue === "indeterminate"' :class='$style.icon'>
|
|
83
|
+
<Icon v-if='modelValue !== "indeterminate"' name='gravity-ui:check' :class='$style.icon' />
|
|
84
|
+
<Icon v-else name='gravity-ui:minus' :class='$style.icon' />
|
|
85
|
+
</slot>
|
|
86
|
+
</Box>
|
|
87
|
+
</InputInline>
|
|
88
88
|
</template>
|
|
89
89
|
|
|
90
90
|
<style module lang="postcss">
|
|
91
|
-
.root {
|
|
92
|
-
--checkbox-size-xs: rem(16px);
|
|
93
|
-
--checkbox-size-sm: rem(20px);
|
|
94
|
-
--checkbox-size-md: rem(24px);
|
|
95
|
-
--checkbox-size-lg: rem(30px);
|
|
96
|
-
--checkbox-size-xl: rem(36px);
|
|
97
|
-
|
|
98
|
-
--checkbox-size: var(--checkbox-size-sm);
|
|
99
|
-
--checkbox-color: var(--color-primary-filled);
|
|
100
|
-
--checkbox-icon-color: var(--color-white);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.inner {
|
|
104
|
-
position: relative;
|
|
105
|
-
|
|
106
|
-
order: 1;
|
|
107
|
-
|
|
108
|
-
width: var(--checkbox-size);
|
|
109
|
-
height: var(--checkbox-size);
|
|
110
|
-
|
|
111
|
-
&:where([data-label-position='right']) {
|
|
112
|
-
order: 2;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.input {
|
|
117
|
-
cursor: pointer;
|
|
118
|
-
|
|
119
|
-
display: block;
|
|
120
|
-
|
|
121
|
-
width: var(--checkbox-size);
|
|
122
|
-
height: var(--checkbox-size);
|
|
123
|
-
margin: 0;
|
|
124
|
-
padding: 0;
|
|
125
|
-
border: 1px solid transparent;
|
|
126
|
-
border-radius: var(--checkbox-radius, var(--radius-default));
|
|
127
|
-
|
|
128
|
-
appearance: none;
|
|
129
|
-
|
|
130
|
-
transition: border-color 100ms ease,
|
|
131
|
-
background-color 100ms ease;
|
|
132
|
-
-webkit-tap-highlight-color: transparent;
|
|
133
|
-
|
|
134
|
-
&:where([data-error]) {
|
|
135
|
-
border-color: var(--color-error);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
&[data-indeterminate],
|
|
139
|
-
&:checked {
|
|
140
|
-
border-color: var(--checkbox-color);
|
|
141
|
-
|
|
142
|
-
background-color: var(--checkbox-color);
|
|
143
|
-
|
|
144
|
-
&+.icon {
|
|
145
|
-
transform: none;
|
|
146
|
-
|
|
147
|
-
opacity: 1;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
&:disabled {
|
|
152
|
-
cursor: not-allowed;
|
|
153
|
-
|
|
154
|
-
border-color: var(--color-disabled-border);
|
|
155
|
-
|
|
156
|
-
background-color: var(--color-disabled);
|
|
157
|
-
|
|
158
|
-
&+.icon {
|
|
159
|
-
color: var(--color-disabled);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
@mixin where-light {
|
|
164
|
-
border-color: var(--color-gray-4);
|
|
165
|
-
|
|
166
|
-
background-color: var(--color-white);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
@mixin where-dark {
|
|
170
|
-
border-color: var(--color-dark-4);
|
|
171
|
-
|
|
172
|
-
background-color: var(--color-dark-6);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
.input[data-variant='outline'] {
|
|
177
|
-
&+.icon {
|
|
178
|
-
color: var(--checkbox-color);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
&[data-indeterminate]:not(:disabled),
|
|
182
|
-
&:checked:not(:disabled) {
|
|
183
|
-
border-color: var(--checkbox-color);
|
|
184
|
-
|
|
185
|
-
background-color: transparent;
|
|
186
|
-
|
|
187
|
-
&+.icon {
|
|
188
|
-
transform: none;
|
|
189
|
-
|
|
190
|
-
color: var(--checkbox-color);
|
|
191
|
-
|
|
192
|
-
opacity: 1;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.icon {
|
|
198
|
-
pointer-events: none;
|
|
199
|
-
|
|
200
|
-
position: absolute;
|
|
201
|
-
inset: 0;
|
|
202
|
-
transform: translateY(.25rem) scale(0.5);
|
|
203
|
-
|
|
204
|
-
width: 80%;
|
|
205
|
-
margin: auto;
|
|
206
|
-
|
|
207
|
-
color: var(--checkbox-icon-color);
|
|
208
|
-
|
|
209
|
-
opacity: 0;
|
|
210
|
-
|
|
211
|
-
transition: transform 100ms ease,
|
|
212
|
-
opacity 100ms ease;
|
|
213
|
-
}
|
|
91
|
+
.root {
|
|
92
|
+
--checkbox-size-xs: rem(16px);
|
|
93
|
+
--checkbox-size-sm: rem(20px);
|
|
94
|
+
--checkbox-size-md: rem(24px);
|
|
95
|
+
--checkbox-size-lg: rem(30px);
|
|
96
|
+
--checkbox-size-xl: rem(36px);
|
|
97
|
+
|
|
98
|
+
--checkbox-size: var(--checkbox-size-sm);
|
|
99
|
+
--checkbox-color: var(--color-primary-filled);
|
|
100
|
+
--checkbox-icon-color: var(--color-white);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.inner {
|
|
104
|
+
position: relative;
|
|
105
|
+
|
|
106
|
+
order: 1;
|
|
107
|
+
|
|
108
|
+
width: var(--checkbox-size);
|
|
109
|
+
height: var(--checkbox-size);
|
|
110
|
+
|
|
111
|
+
&:where([data-label-position='right']) {
|
|
112
|
+
order: 2;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.input {
|
|
117
|
+
cursor: pointer;
|
|
118
|
+
|
|
119
|
+
display: block;
|
|
120
|
+
|
|
121
|
+
width: var(--checkbox-size);
|
|
122
|
+
height: var(--checkbox-size);
|
|
123
|
+
margin: 0;
|
|
124
|
+
padding: 0;
|
|
125
|
+
border: 1px solid transparent;
|
|
126
|
+
border-radius: var(--checkbox-radius, var(--radius-default));
|
|
127
|
+
|
|
128
|
+
appearance: none;
|
|
129
|
+
|
|
130
|
+
transition: border-color 100ms ease,
|
|
131
|
+
background-color 100ms ease;
|
|
132
|
+
-webkit-tap-highlight-color: transparent;
|
|
133
|
+
|
|
134
|
+
&:where([data-error]) {
|
|
135
|
+
border-color: var(--color-error);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&[data-indeterminate],
|
|
139
|
+
&:checked {
|
|
140
|
+
border-color: var(--checkbox-color);
|
|
141
|
+
|
|
142
|
+
background-color: var(--checkbox-color);
|
|
143
|
+
|
|
144
|
+
&+.icon {
|
|
145
|
+
transform: none;
|
|
146
|
+
|
|
147
|
+
opacity: 1;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
&:disabled {
|
|
152
|
+
cursor: not-allowed;
|
|
153
|
+
|
|
154
|
+
border-color: var(--color-disabled-border);
|
|
155
|
+
|
|
156
|
+
background-color: var(--color-disabled);
|
|
157
|
+
|
|
158
|
+
&+.icon {
|
|
159
|
+
color: var(--color-disabled);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
@mixin where-light {
|
|
164
|
+
border-color: var(--color-gray-4);
|
|
165
|
+
|
|
166
|
+
background-color: var(--color-white);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
@mixin where-dark {
|
|
170
|
+
border-color: var(--color-dark-4);
|
|
171
|
+
|
|
172
|
+
background-color: var(--color-dark-6);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.input[data-variant='outline'] {
|
|
177
|
+
&+.icon {
|
|
178
|
+
color: var(--checkbox-color);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
&[data-indeterminate]:not(:disabled),
|
|
182
|
+
&:checked:not(:disabled) {
|
|
183
|
+
border-color: var(--checkbox-color);
|
|
184
|
+
|
|
185
|
+
background-color: transparent;
|
|
186
|
+
|
|
187
|
+
&+.icon {
|
|
188
|
+
transform: none;
|
|
189
|
+
|
|
190
|
+
color: var(--checkbox-color);
|
|
191
|
+
|
|
192
|
+
opacity: 1;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.icon {
|
|
198
|
+
pointer-events: none;
|
|
199
|
+
|
|
200
|
+
position: absolute;
|
|
201
|
+
inset: 0;
|
|
202
|
+
transform: translateY(.25rem) scale(0.5);
|
|
203
|
+
|
|
204
|
+
width: 80%;
|
|
205
|
+
margin: auto;
|
|
206
|
+
|
|
207
|
+
color: var(--checkbox-icon-color);
|
|
208
|
+
|
|
209
|
+
opacity: 0;
|
|
210
|
+
|
|
211
|
+
transition: transform 100ms ease,
|
|
212
|
+
opacity 100ms ease;
|
|
213
|
+
}
|
|
214
214
|
</style>
|