nuance-ui 0.2.1 → 0.2.5

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 (113) 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 +14 -14
  15. package/dist/runtime/components/background-image.vue +18 -18
  16. package/dist/runtime/components/badge.vue +159 -160
  17. package/dist/runtime/components/box.vue +3 -3
  18. package/dist/runtime/components/breadcrumbs.vue +78 -78
  19. package/dist/runtime/components/button/button-group.vue +3 -3
  20. package/dist/runtime/components/button/button.vue +37 -37
  21. package/dist/runtime/components/button/unstyled-button.vue +23 -23
  22. package/dist/runtime/components/calendar/calendar.vue +60 -60
  23. package/dist/runtime/components/calendar/ui/core/calendar-cell.vue +115 -115
  24. package/dist/runtime/components/calendar/ui/core/calendar-header.vue +95 -95
  25. package/dist/runtime/components/calendar/ui/core/calendar-root.vue +3 -3
  26. package/dist/runtime/components/calendar/ui/levels/calendar-decade.vue +40 -40
  27. package/dist/runtime/components/calendar/ui/levels/calendar-month.vue +77 -77
  28. package/dist/runtime/components/calendar/ui/levels/calendar-year.vue +40 -40
  29. package/dist/runtime/components/card/card-section.vue +3 -3
  30. package/dist/runtime/components/card/card.vue +3 -3
  31. package/dist/runtime/components/checkbox/checkbox-card.vue +36 -36
  32. package/dist/runtime/components/checkbox/checkbox-group.vue +16 -16
  33. package/dist/runtime/components/checkbox/checkbox-indicator.vue +116 -116
  34. package/dist/runtime/components/checkbox/checkbox.vue +140 -140
  35. package/dist/runtime/components/chip/chip-group.vue +2 -2
  36. package/dist/runtime/components/chip/chip.vue +200 -200
  37. package/dist/runtime/components/combobox/combobox-dropdown.vue +14 -14
  38. package/dist/runtime/components/combobox/combobox-empty.vue +3 -3
  39. package/dist/runtime/components/combobox/combobox-group.vue +21 -21
  40. package/dist/runtime/components/combobox/combobox-option-list.vue +3 -3
  41. package/dist/runtime/components/combobox/combobox-option.vue +26 -26
  42. package/dist/runtime/components/combobox/combobox-options-dropdown.vue +28 -28
  43. package/dist/runtime/components/combobox/combobox-root.vue +3 -3
  44. package/dist/runtime/components/combobox/combobox-target.vue +3 -3
  45. package/dist/runtime/components/container.vue +8 -8
  46. package/dist/runtime/components/date-time-picker.vue +65 -65
  47. package/dist/runtime/components/dialog/ui/dialog-close-button.vue +11 -11
  48. package/dist/runtime/components/dialog/ui/dialog-header.vue +5 -5
  49. package/dist/runtime/components/dialog/ui/dialog-root.vue +20 -20
  50. package/dist/runtime/components/dialog/ui/dialog-title.vue +5 -5
  51. package/dist/runtime/components/drawer/drawer-close-button.vue +3 -3
  52. package/dist/runtime/components/drawer/drawer-header.vue +3 -3
  53. package/dist/runtime/components/drawer/drawer-root.vue +15 -15
  54. package/dist/runtime/components/drawer/drawer-title.vue +3 -3
  55. package/dist/runtime/components/files/file-upload-button.vue +12 -12
  56. package/dist/runtime/components/files/file-upload-icon.vue +1 -1
  57. package/dist/runtime/components/input/date-picker.vue +85 -85
  58. package/dist/runtime/components/input/email-input.vue +21 -21
  59. package/dist/runtime/components/input/number-input.vue +132 -132
  60. package/dist/runtime/components/input/password-input.vue +28 -28
  61. package/dist/runtime/components/input/text-input.vue +33 -33
  62. package/dist/runtime/components/input/ui/button-input.vue +64 -64
  63. package/dist/runtime/components/input/ui/input-base.vue +283 -283
  64. package/dist/runtime/components/input/ui/input-inline.vue +105 -105
  65. package/dist/runtime/components/input/ui/input-label.vue +4 -4
  66. package/dist/runtime/components/input/ui/input-wrapper.vue +54 -54
  67. package/dist/runtime/components/input/ui/spin-input.vue +69 -69
  68. package/dist/runtime/components/link/link-button.vue +16 -16
  69. package/dist/runtime/components/link/link.vue +10 -10
  70. package/dist/runtime/components/loader/_loaders/bars-loader.vue +5 -5
  71. package/dist/runtime/components/loader/_loaders/dots-loader.vue +5 -5
  72. package/dist/runtime/components/loader/_loaders/oval-loader.vue +1 -1
  73. package/dist/runtime/components/loader/loader.vue +1 -1
  74. package/dist/runtime/components/modal/modal-close-button.vue +3 -3
  75. package/dist/runtime/components/modal/modal-header.vue +3 -3
  76. package/dist/runtime/components/modal/modal-root.vue +13 -13
  77. package/dist/runtime/components/modal/modal-title.vue +3 -3
  78. package/dist/runtime/components/nav-link/nav-icon-link.vue +15 -15
  79. package/dist/runtime/components/nav-link/nav-link.vue +130 -130
  80. package/dist/runtime/components/paper.vue +33 -33
  81. package/dist/runtime/components/popover/popover-dropdown.vue +69 -70
  82. package/dist/runtime/components/popover/popover-target.vue +8 -8
  83. package/dist/runtime/components/popover/popover.vue +1 -1
  84. package/dist/runtime/components/progress/progress-label.vue +3 -3
  85. package/dist/runtime/components/progress/progress-root.vue +3 -3
  86. package/dist/runtime/components/progress/progress-section.vue +8 -8
  87. package/dist/runtime/components/progress/progress.vue +9 -9
  88. package/dist/runtime/components/renderless/renderless.vue +3 -3
  89. package/dist/runtime/components/roving-focus/roving-focus-item.vue +14 -14
  90. package/dist/runtime/components/roving-focus/roving-focus.vue +3 -3
  91. package/dist/runtime/components/select/select.vue +59 -59
  92. package/dist/runtime/components/table/table.d.ts +30 -30
  93. package/dist/runtime/components/table/ui/table-sort-icon.vue +1 -1
  94. package/dist/runtime/components/table/ui/table-sortable-header.vue +11 -11
  95. package/dist/runtime/components/table/ui/table.vue +295 -295
  96. package/dist/runtime/components/tabs/tabs-list.vue +10 -10
  97. package/dist/runtime/components/tabs/tabs-panel.vue +11 -11
  98. package/dist/runtime/components/tabs/tabs-root.vue +8 -8
  99. package/dist/runtime/components/tabs/tabs-tab.vue +20 -20
  100. package/dist/runtime/components/text.vue +67 -67
  101. package/dist/runtime/components/textarea.vue +34 -34
  102. package/dist/runtime/components/time-picker/time-picker.vue +230 -230
  103. package/dist/runtime/components/title.vue +14 -14
  104. package/dist/runtime/components/transition/transition.vue +3 -3
  105. package/dist/runtime/components/tree/_ui/tree-item.vue +128 -129
  106. package/dist/runtime/components/tree/_ui/tree-root.vue +21 -21
  107. package/dist/runtime/components/tree/tree.vue +20 -20
  108. package/dist/runtime/components/visually-hidden/visually-hidden-input.vue +1 -1
  109. package/dist/runtime/components/visually-hidden/visually-hidden.vue +9 -9
  110. package/dist/runtime/modals/_confirm-modal/confirm-modal.vue +31 -31
  111. package/dist/runtime/modals/modals-provider.vue +10 -10
  112. package/dist/runtime/styles/dark-theme.css +1 -1
  113. package/package.json +30 -10
@@ -51,147 +51,147 @@ const style = computed(() => useStyleResolver((theme) => {
51
51
  </script>
52
52
 
53
53
  <template>
54
- <InputInline v-bind='rest' :id :class='$style.root' :style :size>
55
- <Box :class='$style.inner' :mod='{ "label-position": rest?.labelPosition }'>
56
- <input
57
- :id
58
- :checked
59
- type='checkbox'
60
- :class='$style.input'
61
- :disabled='rest.disabled'
62
- @change='() => value && ctx ? ctx.onUpdate(value) : toggle()'
63
- >
64
-
65
- <slot name='icon' :indeterminate='modelValue === "indeterminate"' :class='$style.icon'>
66
- <Icon v-if='modelValue !== "indeterminate"' name='gravity-ui:check' :class='$style.icon' />
67
- <Icon v-else name='gravity-ui:minus' :class='$style.icon' />
68
- </slot>
69
- </Box>
70
- </InputInline>
54
+ <InputInline v-bind='rest' :id :class='$style.root' :style :size>
55
+ <Box :class='$style.inner' :mod='{ "label-position": rest?.labelPosition }'>
56
+ <input
57
+ :id
58
+ :checked
59
+ type='checkbox'
60
+ :class='$style.input'
61
+ :disabled='rest.disabled'
62
+ @change='() => value && ctx ? ctx.onUpdate(value) : toggle()'
63
+ >
64
+
65
+ <slot name='icon' :indeterminate='modelValue === "indeterminate"' :class='$style.icon'>
66
+ <Icon v-if='modelValue !== "indeterminate"' name='gravity-ui:check' :class='$style.icon' />
67
+ <Icon v-else name='gravity-ui:minus' :class='$style.icon' />
68
+ </slot>
69
+ </Box>
70
+ </InputInline>
71
71
  </template>
72
72
 
73
73
  <style module lang="postcss">
74
- .root {
75
- --checkbox-size-xs: rem(16px);
76
- --checkbox-size-sm: rem(20px);
77
- --checkbox-size-md: rem(24px);
78
- --checkbox-size-lg: rem(30px);
79
- --checkbox-size-xl: rem(36px);
80
-
81
- --checkbox-size: var(--checkbox-size-sm);
82
- --checkbox-color: var(--color-primary-filled);
83
- --checkbox-icon-color: var(--color-white);
84
- }
85
-
86
- .inner {
87
- position: relative;
88
-
89
- order: 1;
90
-
91
- width: var(--checkbox-size);
92
- height: var(--checkbox-size);
93
-
94
- &:where([data-label-position='right']) {
95
- order: 2;
96
- }
97
- }
98
-
99
- .input {
100
- cursor: pointer;
101
-
102
- display: block;
103
-
104
- width: var(--checkbox-size);
105
- height: var(--checkbox-size);
106
- margin: 0;
107
- padding: 0;
108
- border: 1px solid transparent;
109
- border-radius: var(--checkbox-radius, var(--radius-default));
110
-
111
- appearance: none;
112
-
113
- transition: border-color 100ms ease,
114
- background-color 100ms ease;
115
- -webkit-tap-highlight-color: transparent;
116
-
117
- &:where([data-error]) {
118
- border-color: var(--color-error);
119
- }
120
-
121
- &[data-indeterminate],
122
- &:checked {
123
- border-color: var(--checkbox-color);
124
-
125
- background-color: var(--checkbox-color);
126
-
127
- & + .icon {
128
- transform: none;
129
-
130
- opacity: 1;
131
- }
132
- }
133
-
134
- &:disabled {
135
- cursor: not-allowed;
136
-
137
- border-color: var(--color-disabled-border);
138
-
139
- background-color: var(--color-disabled);
140
-
141
- & + .icon {
142
- color: var(--color-disabled);
143
- }
144
- }
145
-
146
- @mixin where-light {
147
- border-color: var(--color-gray-4);
148
-
149
- background-color: var(--color-white);
150
- }
151
-
152
- @mixin where-dark {
153
- border-color: var(--color-dark-4);
154
-
155
- background-color: var(--color-dark-6);
156
- }
157
- }
158
-
159
- .input[data-variant='outline'] {
160
- & + .icon {
161
- color: var(--checkbox-color);
162
- }
163
-
164
- &[data-indeterminate]:not(:disabled),
165
- &:checked:not(:disabled) {
166
- border-color: var(--checkbox-color);
167
-
168
- background-color: transparent;
169
-
170
- & + .icon {
171
- transform: none;
172
-
173
- color: var(--checkbox-color);
174
-
175
- opacity: 1;
176
- }
177
- }
178
- }
179
-
180
- .icon {
181
- pointer-events: none;
182
-
183
- position: absolute;
184
- inset: 0;
185
- transform: translateY(.25rem) scale(0.5);
186
-
187
- width: 80%;
188
- margin: auto;
189
-
190
- color: var(--checkbox-icon-color);
191
-
192
- opacity: 0;
193
-
194
- transition: transform 100ms ease,
195
- opacity 100ms ease;
196
- }
74
+ .root {
75
+ --checkbox-size-xs: rem(16px);
76
+ --checkbox-size-sm: rem(20px);
77
+ --checkbox-size-md: rem(24px);
78
+ --checkbox-size-lg: rem(30px);
79
+ --checkbox-size-xl: rem(36px);
80
+
81
+ --checkbox-size: var(--checkbox-size-sm);
82
+ --checkbox-color: var(--color-primary-filled);
83
+ --checkbox-icon-color: var(--color-white);
84
+ }
85
+
86
+ .inner {
87
+ position: relative;
88
+
89
+ order: 1;
90
+
91
+ width: var(--checkbox-size);
92
+ height: var(--checkbox-size);
93
+
94
+ &:where([data-label-position='right']) {
95
+ order: 2;
96
+ }
97
+ }
98
+
99
+ .input {
100
+ cursor: pointer;
101
+
102
+ display: block;
103
+
104
+ width: var(--checkbox-size);
105
+ height: var(--checkbox-size);
106
+ margin: 0;
107
+ padding: 0;
108
+ border: 1px solid transparent;
109
+ border-radius: var(--checkbox-radius, var(--radius-default));
110
+
111
+ appearance: none;
112
+
113
+ transition: border-color 100ms ease,
114
+ background-color 100ms ease;
115
+ -webkit-tap-highlight-color: transparent;
116
+
117
+ &:where([data-error]) {
118
+ border-color: var(--color-error);
119
+ }
120
+
121
+ &[data-indeterminate],
122
+ &:checked {
123
+ border-color: var(--checkbox-color);
124
+
125
+ background-color: var(--checkbox-color);
126
+
127
+ & + .icon {
128
+ transform: none;
129
+
130
+ opacity: 1;
131
+ }
132
+ }
133
+
134
+ &:disabled {
135
+ cursor: not-allowed;
136
+
137
+ border-color: var(--color-disabled-border);
138
+
139
+ background-color: var(--color-disabled);
140
+
141
+ & + .icon {
142
+ color: var(--color-disabled);
143
+ }
144
+ }
145
+
146
+ @mixin where-light {
147
+ border-color: var(--color-gray-4);
148
+
149
+ background-color: var(--color-white);
150
+ }
151
+
152
+ @mixin where-dark {
153
+ border-color: var(--color-dark-4);
154
+
155
+ background-color: var(--color-dark-6);
156
+ }
157
+ }
158
+
159
+ .input[data-variant='outline'] {
160
+ & + .icon {
161
+ color: var(--checkbox-color);
162
+ }
163
+
164
+ &[data-indeterminate]:not(:disabled),
165
+ &:checked:not(:disabled) {
166
+ border-color: var(--checkbox-color);
167
+
168
+ background-color: transparent;
169
+
170
+ & + .icon {
171
+ transform: none;
172
+
173
+ color: var(--checkbox-color);
174
+
175
+ opacity: 1;
176
+ }
177
+ }
178
+ }
179
+
180
+ .icon {
181
+ pointer-events: none;
182
+
183
+ position: absolute;
184
+ inset: 0;
185
+ transform: translateY(.25rem) scale(0.5);
186
+
187
+ width: 80%;
188
+ margin: auto;
189
+
190
+ color: var(--checkbox-icon-color);
191
+
192
+ opacity: 0;
193
+
194
+ transition: transform 100ms ease,
195
+ opacity 100ms ease;
196
+ }
197
197
  </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>