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
@@ -16,40 +16,40 @@ const style = computed(() => ({
16
16
  </script>
17
17
 
18
18
  <template>
19
- <Box :is :style :class='$style.root' :mod='[mod, { "with-border": withBorder }]'>
20
- <slot />
21
- </Box>
19
+ <Box :is :style :class='$style.root' :mod='[mod, { "with-border": withBorder }]'>
20
+ <slot />
21
+ </Box>
22
22
  </template>
23
23
 
24
24
  <style module lang="postcss">
25
- .root {
26
- --paper-radius: var(--radius-default);
27
- --paper-shadow: none;
28
-
29
- touch-action: manipulation;
30
-
31
- display: block;
32
-
33
- border-radius: var(--paper-radius);
34
-
35
- text-decoration: none;
36
-
37
- background-color: var(--color-body);
38
-
39
- outline: 0;
40
- box-shadow: var(--paper-shadow);
41
- -webkit-tap-highlight-color: transparent;
42
-
43
- &:where([data-with-border]) {
44
- border: rem(1px) solid var(--paper-border-color);
45
- }
46
-
47
- @mixin light {
48
- --paper-border-color: var(--color-gray-3);
49
- }
50
-
51
- @mixin dark {
52
- --paper-border-color: var(--color-slate-7);
53
- }
54
- }
25
+ .root {
26
+ --paper-radius: var(--radius-default);
27
+ --paper-shadow: none;
28
+
29
+ touch-action: manipulation;
30
+
31
+ display: block;
32
+
33
+ border-radius: var(--paper-radius);
34
+
35
+ text-decoration: none;
36
+
37
+ background-color: var(--color-body);
38
+
39
+ outline: 0;
40
+ box-shadow: var(--paper-shadow);
41
+ -webkit-tap-highlight-color: transparent;
42
+
43
+ &:where([data-with-border]) {
44
+ border: rem(1px) solid var(--paper-border-color);
45
+ }
46
+
47
+ @mixin light {
48
+ --paper-border-color: var(--color-gray-3);
49
+ }
50
+
51
+ @mixin dark {
52
+ --paper-border-color: var(--color-slate-7);
53
+ }
54
+ }
55
55
  </style>
@@ -17,77 +17,76 @@ const style = computed(() => ({
17
17
  </script>
18
18
 
19
19
  <template>
20
- <div
21
- :id='id'
22
- ref='dropdownRef'
23
- popover
24
- :style='{ ...floatingStyles, ...style }'
25
- :class='$style.dropdown'
26
- @toggle='onToggle'
27
- >
28
- <slot />
29
- <span
30
- v-if='withArrow'
31
- ref='arrowRef'
32
- :class='$style.arrow'
33
- :style='arrowStyles'
34
- />
35
- </div>
20
+ <div
21
+ :id='id'
22
+ ref='dropdownRef'
23
+ popover
24
+ :style='{ ...floatingStyles, ...style }'
25
+ :class='$style.dropdown'
26
+ @toggle='onToggle'
27
+ >
28
+ <slot />
29
+ <span
30
+ v-if='withArrow'
31
+ ref='arrowRef'
32
+ :class='$style.arrow'
33
+ :style='arrowStyles'
34
+ />
35
+ </div>
36
36
  </template>
37
37
 
38
38
  <style module lang="postcss">
39
- .dropdown {
40
- --popover-radius: var(--radius-default);
41
- --popover-shadow: none;
42
-
43
- overflow: visible;
44
-
45
- padding: var(--spacing-xs) var(--spacing-sm);
46
- border: 1px solid var(--popover-border-color);
47
- border-radius: var(--popover-radius);
48
-
49
- color: var(--color-text);
50
-
51
- opacity: 0;
52
- box-shadow: var(--popover-shadow);
53
-
54
- transition: opacity 0.2s, overlay 0.2s allow-discrete, display 0.2s allow-discrete;
55
-
56
-
57
- &:popover-open {
58
- opacity: 1;
59
-
60
- @starting-style {
61
- opacity: 0;
62
- }
63
- }
64
-
65
- @mixin where-light {
66
- --popover-border-color: var(--color-gray-2);
67
-
68
- background-color: var(--color-white);
69
- }
70
-
71
- @mixin where-dark {
72
- --popover-border-color: var(--color-dark-4);
73
-
74
- background-color: var(--color-dark-6);
75
- }
76
- }
77
-
78
- .arrow {
79
- --arrow-size: 7px;
80
- --arrow-radius: 0px;
81
- --arrow-placement: calc(var(--arrow-size) / 2 * -1);
82
-
83
- position: absolute;
84
- transform: rotate(45deg);
85
-
86
- width: var(--arrow-size);
87
- height: var(--arrow-size);
88
-
89
- border: 1px solid var(--popover-border-color);
90
-
91
- background-color: inherit;
92
- }
39
+ .dropdown {
40
+ --popover-radius: var(--radius-default);
41
+ --popover-shadow: none;
42
+
43
+ overflow: visible;
44
+
45
+ padding: var(--spacing-xs) var(--spacing-sm);
46
+ border: 1px solid var(--popover-border-color);
47
+ border-radius: var(--popover-radius);
48
+
49
+ color: var(--color-text);
50
+
51
+ opacity: 0;
52
+ box-shadow: var(--popover-shadow);
53
+
54
+ transition: opacity 0.2s, overlay 0.2s allow-discrete, display 0.2s allow-discrete;
55
+
56
+ &:popover-open {
57
+ opacity: 1;
58
+
59
+ @starting-style {
60
+ opacity: 0;
61
+ }
62
+ }
63
+
64
+ @mixin where-light {
65
+ --popover-border-color: var(--color-gray-2);
66
+
67
+ background-color: var(--color-white);
68
+ }
69
+
70
+ @mixin where-dark {
71
+ --popover-border-color: var(--color-dark-4);
72
+
73
+ background-color: var(--color-dark-6);
74
+ }
75
+ }
76
+
77
+ .arrow {
78
+ --arrow-size: 7px;
79
+ --arrow-radius: 0px;
80
+ --arrow-placement: calc(var(--arrow-size) / 2 * -1);
81
+
82
+ position: absolute;
83
+ transform: rotate(45deg);
84
+
85
+ width: var(--arrow-size);
86
+ height: var(--arrow-size);
87
+
88
+ border: 1px solid var(--popover-border-color);
89
+
90
+ background-color: inherit;
91
+ }
93
92
  </style>
@@ -8,12 +8,12 @@ const { id, store: { targetRef, opened }, disabled } = usePopoverState();
8
8
  </script>
9
9
 
10
10
  <template>
11
- <Renderless
12
- ref='targetRef'
13
- :disabled
14
- :popovertarget='id'
15
- @click.stop.prevent='!disable && !disabled && (opened = !opened)'
16
- >
17
- <slot />
18
- </Renderless>
11
+ <Renderless
12
+ ref='targetRef'
13
+ :disabled
14
+ :popovertarget='id'
15
+ @click.stop.prevent='!disable && !disabled && (opened = !opened)'
16
+ >
17
+ <slot />
18
+ </Renderless>
19
19
  </template>
@@ -75,5 +75,5 @@ useProvidePopoverState({
75
75
  </script>
76
76
 
77
77
  <template>
78
- <slot />
78
+ <slot />
79
79
  </template>
@@ -8,7 +8,7 @@ const props = defineProps({
8
8
  </script>
9
9
 
10
10
  <template>
11
- <Box v-bind='props' :class='css.label'>
12
- <slot />
13
- </Box>
11
+ <Box v-bind='props' :class='css.label'>
12
+ <slot />
13
+ </Box>
14
14
  </template>
@@ -25,7 +25,7 @@ const style = computed(() => ({
25
25
  </script>
26
26
 
27
27
  <template>
28
- <Box :style :class='css.root' :mod='[{ orientation }, mod]'>
29
- <slot />
30
- </Box>
28
+ <Box :style :class='css.root' :mod='[{ orientation }, mod]'>
29
+ <slot />
30
+ </Box>
31
31
  </template>
@@ -33,12 +33,12 @@ const style = computed(() => useStyleResolver((theme) => ({
33
33
  </script>
34
34
 
35
35
  <template>
36
- <Box
37
- :style
38
- v-bind='ariaAttributes'
39
- :class='css.section'
40
- :mod='[{ striped: striped || animated, animated }, mod]'
41
- >
42
- <slot />
43
- </Box>
36
+ <Box
37
+ :style
38
+ v-bind='ariaAttributes'
39
+ :class='css.section'
40
+ :mod='[{ striped: striped || animated, animated }, mod]'
41
+ >
42
+ <slot />
43
+ </Box>
44
44
  </template>
@@ -27,13 +27,13 @@ const value = defineModel({ type: Number, ...{ required: true } });
27
27
  </script>
28
28
 
29
29
  <template>
30
- <ProgressRoot :size :radius :orientation :transition-duration :mod>
31
- <ProgressSection
32
- v-model='value'
33
- :striped
34
- :animated
35
- :color
36
- :with-aria
37
- />
38
- </ProgressRoot>
30
+ <ProgressRoot :size :radius :orientation :transition-duration :mod>
31
+ <ProgressSection
32
+ v-model='value'
33
+ :striped
34
+ :animated
35
+ :color
36
+ :with-aria
37
+ />
38
+ </ProgressRoot>
39
39
  </template>
@@ -6,7 +6,7 @@ defineOptions({
6
6
  </script>
7
7
 
8
8
  <template>
9
- <Slot v-bind='$attrs'>
10
- <slot />
11
- </Slot>
9
+ <Slot v-bind='$attrs'>
10
+ <slot />
11
+ </Slot>
12
12
  </template>
@@ -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>
@@ -103,73 +103,73 @@ function onSubmit(val) {
103
103
  </script>
104
104
 
105
105
  <template>
106
- <ComboboxRoot
107
- v-model:open='opened'
108
- width='target'
109
- :store
106
+ <ComboboxRoot
107
+ v-model:open='opened'
108
+ width='target'
109
+ :store
110
110
  @submit='(val, option) => {
111
111
  $emit("submit", val, option);
112
112
  onSubmit(val);
113
- }'
114
- >
115
- <ComboboxTarget :target-type='searchable ? "input" : "button"' :auto-complete>
116
- <component
117
- :is='searchable ? TextInput : ButtonInput'
118
- :id='store.listId'
119
- v-bind='{ ...rest, ...$attrs }'
120
- v-model='inputValue'
121
- :disabled
122
- :right-section-p-e
123
- :readonly='readonly || !searchable'
124
- :class='$style.input'
125
- @focus='focused = true'
126
- @blur='focused = false'
127
- @click.prevent.stop='() => searchable ? store.openDropdown() : store.toggleDropdown()'
128
- >
129
- <slot v-if='display' name='selection' :value='value' :display='display'>
130
- {{ display }}
131
- </slot>
132
-
133
- <template v-if='$slots?.label' #label>
134
- <slot name='label' />
135
- </template>
136
- <template v-if='$slots?.description' #description>
137
- <slot name='description' />
138
- </template>
139
- <template v-if='$slots?.error' #error>
140
- <slot name='error' />
141
- </template>
142
-
143
- <template v-if='$slots.leftSection || icon' #leftSection>
144
- <slot name='leftSection'>
145
- <Icon v-if='icon' :name='icon' />
146
- </slot>
147
- </template>
148
- <template #rightSection>
149
- <slot name='rightSection'>
150
- <Icon name='gravity-ui:chevrons-expand-vertical' />
151
- </slot>
152
- </template>
153
- </component>
154
- </ComboboxTarget>
155
- <ComboboxOptionsDropdown
156
- v-model='value'
157
- v-model:search='search'
158
- :data='parsed'
159
- :limit
160
- :with-check-icon
161
- :icon-position
162
- :nothing-found-message
163
- :aria-label='store.listId'
164
- :label-id='store.listId'
165
- />
166
- </ComboboxRoot>
113
+ }'
114
+ >
115
+ <ComboboxTarget :target-type='searchable ? "input" : "button"' :auto-complete>
116
+ <component
117
+ :is='searchable ? TextInput : ButtonInput'
118
+ :id='store.listId'
119
+ v-bind='{ ...rest, ...$attrs }'
120
+ v-model='inputValue'
121
+ :disabled
122
+ :right-section-p-e
123
+ :readonly='readonly || !searchable'
124
+ :class='$style.input'
125
+ @focus='focused = true'
126
+ @blur='focused = false'
127
+ @click.prevent.stop='() => searchable ? store.openDropdown() : store.toggleDropdown()'
128
+ >
129
+ <slot v-if='display' name='selection' :value='value' :display='display'>
130
+ {{ display }}
131
+ </slot>
132
+
133
+ <template v-if='$slots?.label' #label>
134
+ <slot name='label' />
135
+ </template>
136
+ <template v-if='$slots?.description' #description>
137
+ <slot name='description' />
138
+ </template>
139
+ <template v-if='$slots?.error' #error>
140
+ <slot name='error' />
141
+ </template>
142
+
143
+ <template v-if='$slots.leftSection || icon' #leftSection>
144
+ <slot name='leftSection'>
145
+ <Icon v-if='icon' :name='icon' />
146
+ </slot>
147
+ </template>
148
+ <template #rightSection>
149
+ <slot name='rightSection'>
150
+ <Icon name='gravity-ui:chevrons-expand-vertical' />
151
+ </slot>
152
+ </template>
153
+ </component>
154
+ </ComboboxTarget>
155
+ <ComboboxOptionsDropdown
156
+ v-model='value'
157
+ v-model:search='search'
158
+ :data='parsed'
159
+ :limit
160
+ :with-check-icon
161
+ :icon-position
162
+ :nothing-found-message
163
+ :aria-label='store.listId'
164
+ :label-id='store.listId'
165
+ />
166
+ </ComboboxRoot>
167
167
  </template>
168
168
 
169
169
  <style module lang="postcss">
170
- .input {
171
- :where([readonly]) {
172
- cursor: pointer;
173
- }
174
- }
170
+ .input {
171
+ :where([readonly]) {
172
+ cursor: pointer;
173
+ }
174
+ }
175
175
  </style>
@@ -31,20 +31,20 @@ useProvideSwitchGroup({ value, size, disabled, readOnly, maxSelectedValues });
31
31
  </script>
32
32
 
33
33
  <template>
34
- <InputWrapper :id v-bind='rest'>
35
- <template v-if='!!$slots.label' #label>
36
- <slot name='label' />
37
- </template>
38
-
39
- <slot />
40
-
41
- <template v-if='!!$slots.description' #description>
42
- <slot name='description' />
43
- </template>
44
- <template v-if='!!$slots.error' #error>
45
- <slot name='error' />
46
- </template>
47
-
48
- <VisuallyHiddenInput :id v-model='value' :name />
49
- </InputWrapper>
34
+ <InputWrapper :id v-bind='rest'>
35
+ <template v-if='!!$slots.label' #label>
36
+ <slot name='label' />
37
+ </template>
38
+
39
+ <slot />
40
+
41
+ <template v-if='!!$slots.description' #description>
42
+ <slot name='description' />
43
+ </template>
44
+ <template v-if='!!$slots.error' #error>
45
+ <slot name='error' />
46
+ </template>
47
+
48
+ <VisuallyHiddenInput :id v-model='value' :name />
49
+ </InputWrapper>
50
50
  </template>
@@ -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
+ }
@@ -23,6 +23,7 @@ const {
23
23
  icon: { type: String, required: false },
24
24
  rightSectionPE: { type: null, required: false },
25
25
  rightSectionProps: { type: Object, required: false },
26
+ justify: { type: null, required: false },
26
27
  is: { type: null, required: false },
27
28
  mod: { type: [Object, Array, null], required: false },
28
29
  column: { type: Object, required: true },
@@ -31,15 +32,15 @@ const {
31
32
  </script>
32
33
 
33
34
  <template>
34
- <Button :size :variant :color v-bind='rest'>
35
- <template #leftSection>
36
- <TableSortIcon :column :icons />
37
- </template>
38
- <slot>
39
- <FlexRender :render='column.columnDef.header' />
40
- </slot>
41
- <template v-if='!!$slots.rightSection' #rightSection>
42
- <slot name='rightSection' />
43
- </template>
44
- </Button>
35
+ <Button :size :variant :color v-bind='rest'>
36
+ <template #leftSection>
37
+ <TableSortIcon :column :icons />
38
+ </template>
39
+ <slot>
40
+ <FlexRender :render='column.columnDef.header' />
41
+ </slot>
42
+ <template v-if='!!$slots.rightSection' #rightSection>
43
+ <slot name='rightSection' />
44
+ </template>
45
+ </Button>
45
46
  </template>
@@ -14,20 +14,20 @@ const style = computed(() => ({ "--tabs-justify": justify }));
14
14
  </script>
15
15
 
16
16
  <template>
17
- <Box
18
- :is
19
- :style
20
- :class='css.list'
21
- role='tablist'
17
+ <Box
18
+ :is
19
+ :style
20
+ :class='css.list'
21
+ role='tablist'
22
22
  :mod='[mod, {
23
23
  variant: ctx?.variant,
24
24
  grow,
25
25
  orientation: ctx?.orientation,
26
26
  placement: ctx?.orientation === "vertical" && ctx.placement,
27
27
  inverted: ctx?.inverted
28
- }]'
29
- :aria-orientation='ctx?.orientation'
30
- >
31
- <slot />
32
- </Box>
28
+ }]'
29
+ :aria-orientation='ctx?.orientation'
30
+ >
31
+ <slot />
32
+ </Box>
33
33
  </template>