nuance-ui 0.2.5 → 0.2.6

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.
Files changed (135) hide show
  1. package/LICENSE.md +9 -9
  2. package/README.md +75 -75
  3. package/dist/module.json +1 -1
  4. package/dist/runtime/components/action-icon/action-icon-section.vue +3 -3
  5. package/dist/runtime/components/action-icon/action-icon.vue +22 -22
  6. package/dist/runtime/components/alert.vue +128 -128
  7. package/dist/runtime/components/app-shell/app-shell-aside.vue +30 -30
  8. package/dist/runtime/components/app-shell/app-shell-footer.vue +29 -29
  9. package/dist/runtime/components/app-shell/app-shell-header.vue +30 -30
  10. package/dist/runtime/components/app-shell/app-shell-navbar.vue +34 -34
  11. package/dist/runtime/components/app-shell/app-shell-section.vue +10 -10
  12. package/dist/runtime/components/app-shell/app-shell.vue +34 -34
  13. package/dist/runtime/components/avatar/avatar-group.vue +3 -3
  14. package/dist/runtime/components/avatar/avatar.vue +1 -1
  15. package/dist/runtime/components/background-image.vue +18 -18
  16. package/dist/runtime/components/badge.vue +160 -159
  17. package/dist/runtime/components/breadcrumbs.vue +78 -78
  18. package/dist/runtime/components/button/button-group.vue +3 -3
  19. package/dist/runtime/components/button/button.vue +37 -37
  20. package/dist/runtime/components/button/unstyled-button.vue +23 -23
  21. package/dist/runtime/components/calendar/calendar.vue +60 -60
  22. package/dist/runtime/components/calendar/ui/core/calendar-cell.vue +115 -115
  23. package/dist/runtime/components/calendar/ui/core/calendar-header.vue +95 -95
  24. package/dist/runtime/components/calendar/ui/core/calendar-root.vue +3 -3
  25. package/dist/runtime/components/calendar/ui/levels/calendar-decade.vue +40 -40
  26. package/dist/runtime/components/calendar/ui/levels/calendar-month.vue +77 -77
  27. package/dist/runtime/components/calendar/ui/levels/calendar-year.vue +40 -40
  28. package/dist/runtime/components/card/card-section.vue +3 -3
  29. package/dist/runtime/components/card/card.vue +3 -3
  30. package/dist/runtime/components/checkbox/checkbox-card.vue +36 -36
  31. package/dist/runtime/components/checkbox/checkbox-group.vue +16 -16
  32. package/dist/runtime/components/checkbox/checkbox-indicator.vue +116 -116
  33. package/dist/runtime/components/checkbox/checkbox.vue +140 -140
  34. package/dist/runtime/components/chip/chip-group.vue +2 -2
  35. package/dist/runtime/components/chip/chip.vue +200 -200
  36. package/dist/runtime/components/combobox/combobox-dropdown.vue +1 -1
  37. package/dist/runtime/components/combobox/combobox-empty.vue +3 -3
  38. package/dist/runtime/components/combobox/combobox-group.d.vue.ts +5 -5
  39. package/dist/runtime/components/combobox/combobox-group.vue +2 -2
  40. package/dist/runtime/components/combobox/combobox-group.vue.d.ts +5 -5
  41. package/dist/runtime/components/combobox/combobox-option-list.vue +3 -3
  42. package/dist/runtime/components/combobox/combobox-option.vue +6 -11
  43. package/dist/runtime/components/combobox/combobox-options-dropdown.d.vue.ts +6 -8
  44. package/dist/runtime/components/combobox/combobox-options-dropdown.vue +6 -7
  45. package/dist/runtime/components/combobox/combobox-options-dropdown.vue.d.ts +6 -8
  46. package/dist/runtime/components/combobox/combobox-root.d.vue.ts +0 -2
  47. package/dist/runtime/components/combobox/combobox-root.vue +4 -6
  48. package/dist/runtime/components/combobox/combobox-root.vue.d.ts +0 -2
  49. package/dist/runtime/components/combobox/combobox-target.vue +3 -3
  50. package/dist/runtime/components/combobox/combobox.module.css +1 -1
  51. package/dist/runtime/components/combobox/lib/use-combobox/use-combobox.js +8 -1
  52. package/dist/runtime/components/combobox/lib/use-combobox-data/get-parsed-combobox-data.d.ts +2 -2
  53. package/dist/runtime/components/combobox/lib/use-combobox-data/get-parsed-combobox-data.js +2 -1
  54. package/dist/runtime/components/combobox/lib/use-combobox-data/use-combobox-data.d.ts +4 -4
  55. package/dist/runtime/components/combobox/lib/use-combobox-data/use-combobox-data.js +3 -2
  56. package/dist/runtime/components/combobox/lib/utils/default-option-filter.d.ts +3 -3
  57. package/dist/runtime/components/combobox/lib/utils/default-option-filter.js +1 -1
  58. package/dist/runtime/components/combobox/lib/utils/index.d.ts +2 -3
  59. package/dist/runtime/components/combobox/lib/utils/index.js +2 -2
  60. package/dist/runtime/components/combobox/lib/utils/is-empty-combobox-data.d.ts +2 -2
  61. package/dist/runtime/components/combobox/lib/utils/is-guards.d.ts +2 -0
  62. package/dist/runtime/components/combobox/types/item.d.ts +3 -8
  63. package/dist/runtime/components/container.vue +8 -8
  64. package/dist/runtime/components/date-time-picker.vue +65 -65
  65. package/dist/runtime/components/dialog/ui/dialog-close-button.vue +11 -11
  66. package/dist/runtime/components/dialog/ui/dialog-header.vue +5 -5
  67. package/dist/runtime/components/dialog/ui/dialog-root.vue +20 -20
  68. package/dist/runtime/components/dialog/ui/dialog-title.vue +5 -5
  69. package/dist/runtime/components/drawer/drawer-close-button.vue +3 -3
  70. package/dist/runtime/components/drawer/drawer-header.vue +3 -3
  71. package/dist/runtime/components/drawer/drawer-root.vue +15 -15
  72. package/dist/runtime/components/drawer/drawer-title.vue +3 -3
  73. package/dist/runtime/components/files/file-upload-button.vue +12 -12
  74. package/dist/runtime/components/files/file-upload-icon.vue +1 -1
  75. package/dist/runtime/components/input/date-picker.vue +85 -85
  76. package/dist/runtime/components/input/email-input.vue +21 -21
  77. package/dist/runtime/components/input/number-input.vue +132 -132
  78. package/dist/runtime/components/input/password-input.vue +28 -28
  79. package/dist/runtime/components/input/text-input.vue +33 -33
  80. package/dist/runtime/components/input/ui/button-input.vue +64 -64
  81. package/dist/runtime/components/input/ui/input-base.vue +283 -283
  82. package/dist/runtime/components/input/ui/input-inline.vue +105 -105
  83. package/dist/runtime/components/input/ui/input-label.vue +4 -4
  84. package/dist/runtime/components/input/ui/input-wrapper.vue +54 -54
  85. package/dist/runtime/components/input/ui/spin-input.vue +69 -69
  86. package/dist/runtime/components/link/link-button.vue +16 -16
  87. package/dist/runtime/components/link/link.vue +10 -10
  88. package/dist/runtime/components/loader/_loaders/bars-loader.vue +5 -5
  89. package/dist/runtime/components/loader/_loaders/dots-loader.vue +5 -5
  90. package/dist/runtime/components/loader/_loaders/oval-loader.vue +1 -1
  91. package/dist/runtime/components/loader/loader.vue +1 -1
  92. package/dist/runtime/components/modal/modal-close-button.vue +3 -3
  93. package/dist/runtime/components/modal/modal-header.vue +3 -3
  94. package/dist/runtime/components/modal/modal-root.vue +13 -13
  95. package/dist/runtime/components/modal/modal-title.vue +3 -3
  96. package/dist/runtime/components/nav-link/nav-icon-link.vue +15 -15
  97. package/dist/runtime/components/nav-link/nav-link.vue +130 -130
  98. package/dist/runtime/components/paper.vue +33 -33
  99. package/dist/runtime/components/popover/popover-dropdown.vue +70 -69
  100. package/dist/runtime/components/popover/popover-target.vue +8 -8
  101. package/dist/runtime/components/popover/popover.vue +1 -1
  102. package/dist/runtime/components/progress/progress-label.vue +3 -3
  103. package/dist/runtime/components/progress/progress-root.vue +3 -3
  104. package/dist/runtime/components/progress/progress-section.vue +8 -8
  105. package/dist/runtime/components/progress/progress.vue +9 -9
  106. package/dist/runtime/components/renderless/renderless.vue +3 -3
  107. package/dist/runtime/components/roving-focus/roving-focus-item.vue +14 -14
  108. package/dist/runtime/components/roving-focus/roving-focus.vue +3 -3
  109. package/dist/runtime/components/select/select.d.vue.ts +20 -7
  110. package/dist/runtime/components/select/select.vue +53 -19
  111. package/dist/runtime/components/select/select.vue.d.ts +20 -7
  112. package/dist/runtime/components/table/table.d.ts +30 -30
  113. package/dist/runtime/components/table/ui/table-sort-icon.vue +1 -1
  114. package/dist/runtime/components/table/ui/table-sortable-header.vue +11 -11
  115. package/dist/runtime/components/table/ui/table.vue +295 -295
  116. package/dist/runtime/components/tabs/tabs-list.vue +10 -10
  117. package/dist/runtime/components/tabs/tabs-panel.vue +11 -11
  118. package/dist/runtime/components/tabs/tabs-root.vue +8 -8
  119. package/dist/runtime/components/tabs/tabs-tab.vue +20 -20
  120. package/dist/runtime/components/text.vue +67 -67
  121. package/dist/runtime/components/textarea.vue +34 -34
  122. package/dist/runtime/components/time-picker/time-picker.vue +230 -230
  123. package/dist/runtime/components/title.vue +14 -14
  124. package/dist/runtime/components/transition/transition.vue +3 -3
  125. package/dist/runtime/components/tree/_ui/tree-item.vue +129 -128
  126. package/dist/runtime/components/tree/_ui/tree-root.vue +21 -21
  127. package/dist/runtime/components/tree/tree.vue +20 -20
  128. package/dist/runtime/components/visually-hidden/visually-hidden-input.vue +1 -1
  129. package/dist/runtime/components/visually-hidden/visually-hidden.vue +9 -9
  130. package/dist/runtime/modals/_confirm-modal/confirm-modal.vue +31 -31
  131. package/dist/runtime/modals/modals-provider.vue +10 -10
  132. package/dist/runtime/styles/dark-theme.css +1 -1
  133. package/package.json +2 -2
  134. package/dist/runtime/components/combobox/lib/utils/is-options-group.d.ts +0 -2
  135. /package/dist/runtime/components/combobox/lib/utils/{is-options-group.js → is-guards.js} +0 -0
@@ -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>
@@ -17,7 +17,7 @@ const style = computed(() => ({
17
17
  </script>
18
18
 
19
19
  <template>
20
- <Paper :is :style :class='css.root' v-bind='rest'>
21
- <slot />
22
- </Paper>
20
+ <Paper :is :style :class='css.root' v-bind='rest'>
21
+ <slot />
22
+ </Paper>
23
23
  </template>
@@ -34,43 +34,43 @@ const style = computed(() => ({
34
34
  </script>
35
35
 
36
36
  <template>
37
- <UnstyledButton
38
- :mod='[{ checked, "with-border": withBorder }, mod]'
39
- :value='_value'
40
- :class='$style.root'
41
- :style
42
- @click='onUpdate()'
43
- >
44
- <slot />
45
- </UnstyledButton>
37
+ <UnstyledButton
38
+ :mod='[{ checked, "with-border": withBorder }, mod]'
39
+ :value='_value'
40
+ :class='$style.root'
41
+ :style
42
+ @click='onUpdate()'
43
+ >
44
+ <slot />
45
+ </UnstyledButton>
46
46
  </template>
47
47
 
48
48
  <style module lang="postcss">
49
- .root {
50
- --card-radius: var(--radius-default);
51
-
52
- cursor: pointer;
53
-
54
- display: block;
55
-
56
- width: 100%;
57
-
58
- border-radius: var(--card-radius);
59
-
60
- & :where(*) {
61
- cursor: inherit;
62
- }
63
-
64
- &:where([data-with-border]) {
65
- border: 1px solid transparent;
66
-
67
- @mixin where-light {
68
- border-color: var(--color-gray-3);
69
- }
70
-
71
- @mixin where-dark {
72
- border-color: var(--color-dark-4);
73
- }
74
- }
75
- }
49
+ .root {
50
+ --card-radius: var(--radius-default);
51
+
52
+ cursor: pointer;
53
+
54
+ display: block;
55
+
56
+ width: 100%;
57
+
58
+ border-radius: var(--card-radius);
59
+
60
+ & :where(*) {
61
+ cursor: inherit;
62
+ }
63
+
64
+ &:where([data-with-border]) {
65
+ border: 1px solid transparent;
66
+
67
+ @mixin where-light {
68
+ border-color: var(--color-gray-3);
69
+ }
70
+
71
+ @mixin where-dark {
72
+ border-color: var(--color-dark-4);
73
+ }
74
+ }
75
+ }
76
76
  </style>
@@ -21,20 +21,20 @@ useProvideCheckboxGroup({ value, size });
21
21
  </script>
22
22
 
23
23
  <template>
24
- <InputWrapper :id v-bind='rest'>
25
- <template #label>
26
- <slot name='label' />
27
- </template>
28
-
29
- <slot />
30
-
31
- <template #description>
32
- <slot name='description' />
33
- </template>
34
- <template #error>
35
- <slot name='error' />
36
- </template>
37
-
38
- <VisuallyHiddenInput :id v-model='value' :name />
39
- </InputWrapper>
24
+ <InputWrapper :id v-bind='rest'>
25
+ <template #label>
26
+ <slot name='label' />
27
+ </template>
28
+
29
+ <slot />
30
+
31
+ <template #description>
32
+ <slot name='description' />
33
+ </template>
34
+ <template #error>
35
+ <slot name='error' />
36
+ </template>
37
+
38
+ <VisuallyHiddenInput :id v-model='value' :name />
39
+ </InputWrapper>
40
40
  </template>
@@ -39,123 +39,123 @@ 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
- &[data-indeterminate]:not([data-disabled]),
130
- &[data-checked]:not([data-disabled]) {
131
- border-color: var(--checkbox-color);
132
-
133
- background-color: transparent;
134
-
135
- & > .icon {
136
- transform: none;
137
-
138
- color: var(--checkbox-color);
139
-
140
- opacity: 1;
141
- }
142
- }
143
- }
144
-
145
- .icon {
146
- pointer-events: none;
147
-
148
- transform: translateY(.25rem) scale(0.5);
149
-
150
- display: block;
151
-
152
- width: 80%;
153
-
154
- color: transparent;
155
-
156
- opacity: 1;
157
-
158
- transition: transform 100ms ease,
159
- opacity 100ms ease;
160
- }
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
+ &[data-indeterminate]:not([data-disabled]),
130
+ &[data-checked]:not([data-disabled]) {
131
+ border-color: var(--checkbox-color);
132
+
133
+ background-color: transparent;
134
+
135
+ & > .icon {
136
+ transform: none;
137
+
138
+ color: var(--checkbox-color);
139
+
140
+ opacity: 1;
141
+ }
142
+ }
143
+ }
144
+
145
+ .icon {
146
+ pointer-events: none;
147
+
148
+ transform: translateY(.25rem) scale(0.5);
149
+
150
+ display: block;
151
+
152
+ width: 80%;
153
+
154
+ color: transparent;
155
+
156
+ opacity: 1;
157
+
158
+ transition: transform 100ms ease,
159
+ opacity 100ms ease;
160
+ }
161
161
  </style>