nuance-ui 0.2.8 → 0.2.10

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 (104) 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-group.vue +3 -3
  5. package/dist/runtime/components/action-icon/action-icon.vue +23 -23
  6. package/dist/runtime/components/app-shell/app-shell-aside.vue +30 -30
  7. package/dist/runtime/components/app-shell/app-shell-footer.vue +29 -29
  8. package/dist/runtime/components/app-shell/app-shell-header.vue +30 -30
  9. package/dist/runtime/components/app-shell/app-shell-main.vue +18 -18
  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/box.vue +3 -3
  14. package/dist/runtime/components/breadcrumbs.vue +78 -78
  15. package/dist/runtime/components/button/button.d.vue.ts +5 -0
  16. package/dist/runtime/components/button/button.module.css +1 -1
  17. package/dist/runtime/components/button/button.vue +44 -41
  18. package/dist/runtime/components/button/button.vue.d.ts +5 -0
  19. package/dist/runtime/components/button/unstyled-button.vue +23 -23
  20. package/dist/runtime/components/calendar/calendar.vue +60 -60
  21. package/dist/runtime/components/calendar/ui/core/calendar-header.vue +95 -95
  22. package/dist/runtime/components/calendar/ui/core/calendar-root.vue +3 -3
  23. package/dist/runtime/components/calendar/ui/levels/calendar-decade.vue +40 -40
  24. package/dist/runtime/components/calendar/ui/levels/calendar-month.vue +77 -77
  25. package/dist/runtime/components/calendar/ui/levels/calendar-year.vue +40 -40
  26. package/dist/runtime/components/card/card-section.vue +3 -3
  27. package/dist/runtime/components/card/card.vue +3 -3
  28. package/dist/runtime/components/checkbox/checkbox-card.vue +37 -37
  29. package/dist/runtime/components/checkbox/checkbox-indicator.vue +117 -117
  30. package/dist/runtime/components/checkbox/checkbox.vue +139 -139
  31. package/dist/runtime/components/chip/chip-group.vue +2 -2
  32. package/dist/runtime/components/chip/chip.vue +200 -200
  33. package/dist/runtime/components/combobox/combobox-dropdown.vue +14 -14
  34. package/dist/runtime/components/combobox/combobox-empty.vue +3 -3
  35. package/dist/runtime/components/combobox/combobox-group.vue +21 -21
  36. package/dist/runtime/components/combobox/combobox-option-list.vue +3 -3
  37. package/dist/runtime/components/combobox/combobox-option.vue +22 -22
  38. package/dist/runtime/components/combobox/combobox-options-dropdown.vue +29 -29
  39. package/dist/runtime/components/combobox/combobox-root.vue +3 -3
  40. package/dist/runtime/components/combobox/combobox-target.vue +3 -3
  41. package/dist/runtime/components/container.vue +8 -8
  42. package/dist/runtime/components/date-time-picker.d.vue.ts +3 -3
  43. package/dist/runtime/components/date-time-picker.vue +66 -66
  44. package/dist/runtime/components/date-time-picker.vue.d.ts +3 -3
  45. package/dist/runtime/components/dialog/ui/dialog-close-button.vue +11 -11
  46. package/dist/runtime/components/dialog/ui/dialog-header.vue +5 -5
  47. package/dist/runtime/components/dialog/ui/dialog-title.vue +5 -5
  48. package/dist/runtime/components/drawer/drawer-close-button.vue +3 -3
  49. package/dist/runtime/components/drawer/drawer-header.vue +3 -3
  50. package/dist/runtime/components/drawer/drawer-root.vue +15 -15
  51. package/dist/runtime/components/drawer/drawer-title.vue +3 -3
  52. package/dist/runtime/components/files/file-upload-button.vue +13 -12
  53. package/dist/runtime/components/files/file-upload-icon.vue +1 -1
  54. package/dist/runtime/components/input/date-picker.vue +85 -85
  55. package/dist/runtime/components/input/email-input.vue +19 -19
  56. package/dist/runtime/components/input/number-input.vue +134 -134
  57. package/dist/runtime/components/input/password-input.vue +28 -28
  58. package/dist/runtime/components/input/text-input.vue +35 -35
  59. package/dist/runtime/components/input/ui/input-inline.vue +105 -105
  60. package/dist/runtime/components/input/ui/input-wrapper.vue +54 -54
  61. package/dist/runtime/components/link/link-button.vue +17 -16
  62. package/dist/runtime/components/link/link.vue +10 -10
  63. package/dist/runtime/components/loader/_loaders/bars-loader.vue +5 -5
  64. package/dist/runtime/components/loader/_loaders/dots-loader.vue +5 -5
  65. package/dist/runtime/components/loader/_loaders/oval-loader.vue +1 -1
  66. package/dist/runtime/components/modal/modal-close-button.vue +3 -3
  67. package/dist/runtime/components/modal/modal-header.vue +3 -3
  68. package/dist/runtime/components/modal/modal-root.vue +13 -13
  69. package/dist/runtime/components/modal/modal-title.vue +3 -3
  70. package/dist/runtime/components/nav-link/nav-icon-link.vue +15 -15
  71. package/dist/runtime/components/nav-link/nav-link.vue +132 -132
  72. package/dist/runtime/components/paper.vue +33 -33
  73. package/dist/runtime/components/popover/popover-dropdown.vue +69 -70
  74. package/dist/runtime/components/popover/popover-target.vue +8 -8
  75. package/dist/runtime/components/popover/popover.vue +1 -1
  76. package/dist/runtime/components/progress/progress-label.vue +3 -3
  77. package/dist/runtime/components/progress/progress-root.vue +3 -3
  78. package/dist/runtime/components/progress/progress-section.vue +8 -8
  79. package/dist/runtime/components/progress/progress.vue +9 -9
  80. package/dist/runtime/components/renderless/renderless.vue +3 -3
  81. package/dist/runtime/components/roving-focus/roving-focus-item.vue +14 -14
  82. package/dist/runtime/components/select.vue +63 -63
  83. package/dist/runtime/components/switch/switch-group.vue +16 -16
  84. package/dist/runtime/components/table/table.d.ts +30 -30
  85. package/dist/runtime/components/table/ui/table-sortable-header.vue +12 -11
  86. package/dist/runtime/components/tabs/tabs-list.vue +10 -10
  87. package/dist/runtime/components/tabs/tabs-panel.vue +11 -11
  88. package/dist/runtime/components/tabs/tabs-root.vue +8 -8
  89. package/dist/runtime/components/tabs/tabs-tab.vue +22 -22
  90. package/dist/runtime/components/text.vue +67 -67
  91. package/dist/runtime/components/textarea.vue +36 -36
  92. package/dist/runtime/components/title.vue +14 -14
  93. package/dist/runtime/components/transition.vue +3 -3
  94. package/dist/runtime/components/tree/_ui/tree-item.vue +128 -129
  95. package/dist/runtime/components/tree/_ui/tree-root.vue +21 -21
  96. package/dist/runtime/components/visually-hidden/visually-hidden-input.vue +1 -1
  97. package/dist/runtime/components/visually-hidden/visually-hidden.vue +9 -9
  98. package/dist/runtime/composables/use-style-resolver.d.ts +2 -3
  99. package/dist/runtime/styles/dark-theme.css +1 -1
  100. package/dist/runtime/types/index.d.ts +1 -0
  101. package/dist/runtime/types/styling.d.ts +4 -0
  102. package/dist/runtime/types/styling.js +0 -0
  103. package/dist/runtime/utils/color/parse-theme-color.d.ts +2 -2
  104. 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>
@@ -15,6 +15,6 @@ useProvideChipGroupState({ multiple, value, disabled });
15
15
  </script>
16
16
 
17
17
  <template>
18
- <slot />
19
- <VisuallyHiddenInput v-model='value' :name />
18
+ <slot />
19
+ <VisuallyHiddenInput v-model='value' :name />
20
20
  </template>