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
@@ -15,18 +15,18 @@ onBeforeUnmount(() => {
15
15
  </script>
16
16
 
17
17
  <template>
18
- <Renderless
19
- v-bind='attrs'
20
- ref='item'
21
- :tabindex='-1'
22
- @keydown.up.prevent='isVertical && focus?.("prev", $event.currentTarget)'
23
- @keydown.down.prevent='isVertical && focus?.("next", $event.currentTarget)'
24
- @keydown.left.prevent='isHorizontal && focus?.("prev", $event.currentTarget)'
25
- @keydown.right.prevent='isHorizontal && focus?.("next", $event.currentTarget)'
26
- @keydown.home.prevent='focus?.("first")'
27
- @keydown.end.prevent='focus?.("last")'
28
- @click.prevent='focusElement?.($event.currentTarget)'
29
- >
30
- <slot />
31
- </Renderless>
18
+ <Renderless
19
+ v-bind='attrs'
20
+ ref='item'
21
+ :tabindex='-1'
22
+ @keydown.up.prevent='isVertical && focus?.("prev", $event.currentTarget)'
23
+ @keydown.down.prevent='isVertical && focus?.("next", $event.currentTarget)'
24
+ @keydown.left.prevent='isHorizontal && focus?.("prev", $event.currentTarget)'
25
+ @keydown.right.prevent='isHorizontal && focus?.("next", $event.currentTarget)'
26
+ @keydown.home.prevent='focus?.("first")'
27
+ @keydown.end.prevent='focus?.("last")'
28
+ @click.prevent='focusElement?.($event.currentTarget)'
29
+ >
30
+ <slot />
31
+ </Renderless>
32
32
  </template>
@@ -17,7 +17,7 @@ onMounted(() => nextTick(() => init()));
17
17
  </script>
18
18
 
19
19
  <template>
20
- <Renderless ref='list'>
21
- <slot />
22
- </Renderless>
20
+ <Renderless ref='list'>
21
+ <slot />
22
+ </Renderless>
23
23
  </template>
@@ -66,10 +66,10 @@ watch(search, () => nextTick(() => store.resetSelectedOption()));
66
66
  </script>
67
67
 
68
68
  <template>
69
- <ComboboxRoot
70
- v-model:open='opened'
71
- width='target'
72
- :store
69
+ <ComboboxRoot
70
+ v-model:open='opened'
71
+ width='target'
72
+ :store
73
73
  @submit='(val, option) => {
74
74
  $emit("submit", val, option);
75
75
  const optionsLockup = allowDeselect ? options[val]?.value === value?.value ? null : options[val] : options[val];
@@ -77,65 +77,65 @@ watch(search, () => nextTick(() => store.resetSelectedOption()));
77
77
  value = nextValue;
78
78
  search = nextValue?.label ?? "";
79
79
  store.closeDropdown();
80
- }'
81
- >
82
- <ComboboxTarget :target-type='searchable ? "input" : "button"' :auto-complete>
83
- <component
84
- :is='searchable ? TextInput : ButtonInput'
85
- :id='store.listId'
86
- v-bind='{ ...rest, ...$attrs }'
87
- v-model='search'
88
- :disabled
89
- :right-section-p-e
90
- :readonly='readonly || !searchable'
91
- :class='$style.input'
80
+ }'
81
+ >
82
+ <ComboboxTarget :target-type='searchable ? "input" : "button"' :auto-complete>
83
+ <component
84
+ :is='searchable ? TextInput : ButtonInput'
85
+ :id='store.listId'
86
+ v-bind='{ ...rest, ...$attrs }'
87
+ v-model='search'
88
+ :disabled
89
+ :right-section-p-e
90
+ :readonly='readonly || !searchable'
91
+ :class='$style.input'
92
92
  @blur='() => {
93
93
  searchable && store.closeDropdown();
94
94
  search = value?.label ?? "";
95
- }'
96
- @click.prevent.stop='() => searchable ? store.openDropdown() : store.toggleDropdown()'
97
- >
98
- {{ value?.label ?? value?.value ?? null }}
99
-
100
- <template v-if='$slots?.label' #label>
101
- <slot name='label' />
102
- </template>
103
- <template v-if='$slots?.description' #description>
104
- <slot name='description' />
105
- </template>
106
- <template v-if='$slots?.error' #error>
107
- <slot name='error' />
108
- </template>
109
-
110
- <template v-if='$slots.leftSection || value?.icon' #leftSection>
111
- <slot name='leftSection'>
112
- <Icon v-if='value?.icon' :name='value?.icon' />
113
- </slot>
114
- </template>
115
- <template #rightSection>
116
- <slot name='rightSection'>
117
- <Icon name='gravity-ui:chevrons-expand-vertical' />
118
- </slot>
119
- </template>
120
- </component>
121
- </ComboboxTarget>
122
- <ComboboxOptionsDropdown
123
- v-model='value'
124
- :data='parsed'
125
- :limit
126
- :with-check-icon
127
- :icon-position
128
- :nothing-found-message
129
- :aria-label='store.listId'
130
- :label-id='store.listId'
131
- />
132
- </ComboboxRoot>
95
+ }'
96
+ @click.prevent.stop='() => searchable ? store.openDropdown() : store.toggleDropdown()'
97
+ >
98
+ {{ value?.label ?? value?.value ?? null }}
99
+
100
+ <template v-if='$slots?.label' #label>
101
+ <slot name='label' />
102
+ </template>
103
+ <template v-if='$slots?.description' #description>
104
+ <slot name='description' />
105
+ </template>
106
+ <template v-if='$slots?.error' #error>
107
+ <slot name='error' />
108
+ </template>
109
+
110
+ <template v-if='$slots.leftSection || value?.icon' #leftSection>
111
+ <slot name='leftSection'>
112
+ <Icon v-if='value?.icon' :name='value?.icon' />
113
+ </slot>
114
+ </template>
115
+ <template #rightSection>
116
+ <slot name='rightSection'>
117
+ <Icon name='gravity-ui:chevrons-expand-vertical' />
118
+ </slot>
119
+ </template>
120
+ </component>
121
+ </ComboboxTarget>
122
+ <ComboboxOptionsDropdown
123
+ v-model='value'
124
+ :data='parsed'
125
+ :limit
126
+ :with-check-icon
127
+ :icon-position
128
+ :nothing-found-message
129
+ :aria-label='store.listId'
130
+ :label-id='store.listId'
131
+ />
132
+ </ComboboxRoot>
133
133
  </template>
134
134
 
135
135
  <style module lang="postcss">
136
- .input {
137
- :where([readonly]) {
138
- cursor: pointer;
139
- }
140
- }
136
+ .input {
137
+ :where([readonly]) {
138
+ cursor: pointer;
139
+ }
140
+ }
141
141
  </style>
@@ -1,30 +1,30 @@
1
- import type { Cell, Header, RowData } from '@tanstack/vue-table'
2
-
3
-
4
- declare module '@tanstack/table-core' {
5
- interface ColumnMeta<TData extends RowData, TValue> {
6
- class?: {
7
- th?: string | ((cell: Header<TData, TValue>) => string)
8
- td?: string | ((cell: Cell<TData, TValue>) => string)
9
- }
10
- style?: {
11
- th?: string | Record<string, string> | ((cell: Header<TData, TValue>) => string | Record<string, string>)
12
- td?: string | Record<string, string> | ((cell: Cell<TData, TValue>) => string | Record<string, string>)
13
- }
14
- colspan?: {
15
- td?: string | ((cell: Cell<TData, TValue>) => string)
16
- }
17
- rowspan?: {
18
- td?: string | ((cell: Cell<TData, TValue>) => string)
19
- }
20
- }
21
-
22
- interface TableMeta<TData> {
23
- class?: {
24
- tr?: string | ((row: Row<TData>) => string)
25
- }
26
- style?: {
27
- tr?: string | Record<string, string> | ((row: Row<TData>) => string | Record<string, string>)
28
- }
29
- }
30
- }
1
+ import type { Cell, Header, RowData } from '@tanstack/vue-table'
2
+
3
+
4
+ declare module '@tanstack/table-core' {
5
+ interface ColumnMeta<TData extends RowData, TValue> {
6
+ class?: {
7
+ th?: string | ((cell: Header<TData, TValue>) => string)
8
+ td?: string | ((cell: Cell<TData, TValue>) => string)
9
+ }
10
+ style?: {
11
+ th?: string | Record<string, string> | ((cell: Header<TData, TValue>) => string | Record<string, string>)
12
+ td?: string | Record<string, string> | ((cell: Cell<TData, TValue>) => string | Record<string, string>)
13
+ }
14
+ colspan?: {
15
+ td?: string | ((cell: Cell<TData, TValue>) => string)
16
+ }
17
+ rowspan?: {
18
+ td?: string | ((cell: Cell<TData, TValue>) => string)
19
+ }
20
+ }
21
+
22
+ interface TableMeta<TData> {
23
+ class?: {
24
+ tr?: string | ((row: Row<TData>) => string)
25
+ }
26
+ style?: {
27
+ tr?: string | Record<string, string> | ((row: Row<TData>) => string | Record<string, string>)
28
+ }
29
+ }
30
+ }
@@ -14,5 +14,5 @@ const name = computed(() => column.getIsSorted() ? column.getIsSorted() === "asc
14
14
  </script>
15
15
 
16
16
  <template>
17
- <Icon :name />
17
+ <Icon :name />
18
18
  </template>
@@ -30,15 +30,15 @@ const {
30
30
  </script>
31
31
 
32
32
  <template>
33
- <Button :size :variant :color v-bind='rest'>
34
- <template #leftSection>
35
- <TableSortIcon :column :icons />
36
- </template>
37
- <slot>
38
- <FlexRender :render='column.columnDef.header' />
39
- </slot>
40
- <template v-if='!!$slots.rightSection' #rightSection>
41
- <slot name='rightSection' />
42
- </template>
43
- </Button>
33
+ <Button :size :variant :color v-bind='rest'>
34
+ <template #leftSection>
35
+ <TableSortIcon :column :icons />
36
+ </template>
37
+ <slot>
38
+ <FlexRender :render='column.columnDef.header' />
39
+ </slot>
40
+ <template v-if='!!$slots.rightSection' #rightSection>
41
+ <slot name='rightSection' />
42
+ </template>
43
+ </Button>
44
44
  </template>