@veritree/ui 0.44.0 → 0.46.0

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.
package/index.js CHANGED
@@ -31,11 +31,14 @@ import VTInputIcon from './src/components/Form/VTInputIcon.vue';
31
31
  import VTInputPassword from './src/components/Form/VTInputPassword.vue';
32
32
  import VTListbox from './src/components/Listbox/VTListbox.vue';
33
33
  import VTListboxContent from './src/components/Listbox/VTListboxContent.vue';
34
+ import VTListboxDivider from './src/components/Listbox/VTListboxDivider.vue';
35
+ import VTListboxGroup from './src/components/Listbox/VTListboxGroup.vue';
34
36
  import VTListboxItem from './src/components/Listbox/VTListboxItem.vue';
35
37
  import VTListboxLabel from './src/components/Listbox/VTListboxLabel.vue';
36
38
  import VTListboxList from './src/components/Listbox/VTListboxList.vue';
37
39
  import VTListboxSearch from './src/components/Listbox/VTListboxSearch.vue';
38
40
  import VTListboxTrigger from './src/components/Listbox/VTListboxTrigger.vue';
41
+ import VTListboxViewport from './src/components/Listbox/VTListboxViewport.vue';
39
42
  import VTListboxPlaceholder from './src/components/Listbox/VTListboxPlaceholder.vue';
40
43
  import VTSpinner from './src/components/Spinner/VTSpinner.vue';
41
44
  import VTInputDate from './src/components/Input/VTInputDate.vue';
@@ -104,12 +107,15 @@ export {
104
107
  VTLegend,
105
108
  VTListbox,
106
109
  VTListboxContent,
110
+ VTListboxDivider,
111
+ VTListboxGroup,
107
112
  VTListboxItem,
108
113
  VTListboxLabel,
109
114
  VTListboxList,
110
115
  VTListboxSearch,
111
116
  VTListboxTrigger,
112
117
  VTListboxPlaceholder,
118
+ VTListboxViewport,
113
119
  VTButton,
114
120
  VTInput,
115
121
  VTInputIcon,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veritree/ui",
3
- "version": "0.44.0",
3
+ "version": "0.46.0",
4
4
  "description": "veritree ui library",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -22,6 +22,6 @@
22
22
  "devDependencies": {
23
23
  "prettier": "^2.7.1",
24
24
  "prettier-plugin-tailwindcss": "^0.1.13",
25
- "tailwindcss": "^3.2.4"
25
+ "tailwindcss": "^3.3.2"
26
26
  }
27
27
  }
@@ -14,7 +14,7 @@
14
14
  :class="
15
15
  headless
16
16
  ? 'dialog-content'
17
- : `relative m-auto flex flex-col overflow-auto rounded bg-white p-4 focus:outline-none lg:p-6 ${classes}`
17
+ : `relative m-auto flex flex-col overflow-auto rounded bg-white px-4 focus:outline-none lg:px-6 ${classes}`
18
18
  "
19
19
  tabindex="-1"
20
20
  @keydown.esc.stop="onEsc"
@@ -4,7 +4,7 @@
4
4
  :class="[
5
5
  headless
6
6
  ? 'dialog-footer'
7
- : '-mx-4 -mb-4 flex items-center justify-between gap-x-3 p-4 md:-mx-6 md:-mb-6 md:p-6',
7
+ : '-mx-4 flex items-center justify-between gap-x-3 p-4 md:-mx-6 md:px-6 md:py-5',
8
8
  ]"
9
9
  >
10
10
  <slot></slot>
@@ -5,7 +5,7 @@
5
5
  :class="[
6
6
  headless
7
7
  ? 'dialog-header'
8
- : '-mx-4 -mt-4 flex items-center justify-between gap-x-3 p-4 md:-mx-6 md:-mt-6 md:p-6',
8
+ : '-mx-4 flex items-center justify-between gap-x-3 p-4 md:-mx-6 md:px-6 md:py-5',
9
9
  ]"
10
10
  @click.stop
11
11
  >
@@ -2,7 +2,11 @@
2
2
  <component
3
3
  :is="as"
4
4
  :id="id"
5
- :class="[headless ? 'dialog-body' : 'h-full flex-1']"
5
+ :class="[
6
+ headless
7
+ ? 'dialog-body'
8
+ : '-mx-4 flex-1 overflow-y-auto p-4 md:-mx-6 md:px-6 md:py-5',
9
+ ]"
6
10
  >
7
11
  <slot></slot>
8
12
  </component>
@@ -0,0 +1,21 @@
1
+ <template>
2
+ <div
3
+ :class="{
4
+ 'listbox-divider': headless,
5
+ 'mx-3 my-0.5 h-[1px] bg-gray-200': !headless,
6
+ }"
7
+ ></div>
8
+ </template>
9
+
10
+ <script>
11
+ export default {
12
+ name: 'VTListboxDivider',
13
+
14
+ props: {
15
+ headless: {
16
+ type: Boolean,
17
+ default: false,
18
+ },
19
+ },
20
+ };
21
+ </script>
@@ -0,0 +1,9 @@
1
+ <template>
2
+ <div role="group"><slot></slot></div>
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ name: 'VTListboxGroup',
8
+ };
9
+ </script>
@@ -2,7 +2,9 @@
2
2
  <component
3
3
  :is="as"
4
4
  :class="[
5
- headless ? 'listbox-label' : 'mb-2 block text-xs font-normal uppercase',
5
+ headless
6
+ ? 'listbox-label'
7
+ : 'mb-0.5 block px-3 text-xs font-normal uppercase text-gray-600',
6
8
  ]"
7
9
  >
8
10
  <slot></slot>
@@ -1,12 +1,5 @@
1
1
  <template>
2
- <ul
3
- :id="id"
4
- :class="[
5
- headless
6
- ? 'listbox-list'
7
- : '-mx-3 max-h-[160px] w-auto overflow-y-auto scroll-auto',
8
- ]"
9
- >
2
+ <ul :id="id" :class="[headless ? 'listbox-list' : null]">
10
3
  <slot></slot>
11
4
  </ul>
12
5
  </template>
@@ -0,0 +1,33 @@
1
+ <template>
2
+ <div
3
+ :id="id"
4
+ :class="[
5
+ headless
6
+ ? 'listbox-viewport'
7
+ : '-mx-3 max-h-[200px] w-auto overflow-y-auto scroll-auto',
8
+ ]"
9
+ >
10
+ <slot></slot>
11
+ </div>
12
+ </template>
13
+
14
+ <script>
15
+ export default {
16
+ name: 'VTListboxViewport',
17
+
18
+ inject: ['apiListbox'],
19
+
20
+ props: {
21
+ headless: {
22
+ type: Boolean,
23
+ default: false,
24
+ },
25
+ },
26
+
27
+ computed: {
28
+ id() {
29
+ return `listbox-viewport-${this.apiListbox().id}`;
30
+ },
31
+ },
32
+ };
33
+ </script>