@xy-planning-network/trees 0.13.2 → 0.13.3-dev-2

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 (70) hide show
  1. package/dist/trees.es.js +1842 -1834
  2. package/dist/trees.umd.js +12 -12
  3. package/package.json +1 -1
  4. package/src/lib-components/overlays/Modal.vue +61 -38
  5. package/types/api/base.d.ts +0 -0
  6. package/types/api/client.d.ts +0 -0
  7. package/types/composables/date.d.ts +0 -0
  8. package/types/composables/forms.d.ts +0 -0
  9. package/types/composables/index.d.ts +0 -0
  10. package/types/composables/list.d.ts +0 -0
  11. package/types/composables/nav.d.ts +0 -0
  12. package/types/composables/overlay.d.ts +0 -0
  13. package/types/composables/table.d.ts +0 -0
  14. package/types/composables/useActionItems.d.ts +0 -0
  15. package/types/composables/useBaseAPI.d.ts +0 -0
  16. package/types/composables/useBulkTable.d.ts +0 -0
  17. package/types/composables/useFlashes.d.ts +0 -0
  18. package/types/composables/useSpinner.d.ts +0 -0
  19. package/types/composables/useTable.d.ts +0 -0
  20. package/types/composables/user.d.ts +0 -0
  21. package/types/entry.d.ts +0 -0
  22. package/types/helpers/Debounce.d.ts +0 -0
  23. package/types/helpers/Throttle.d.ts +0 -0
  24. package/types/helpers/Uniques.d.ts +0 -0
  25. package/types/lib-components/forms/BaseInput.vue.d.ts +0 -0
  26. package/types/lib-components/forms/Checkbox.vue.d.ts +0 -0
  27. package/types/lib-components/forms/DateRangePicker.vue.d.ts +0 -0
  28. package/types/lib-components/forms/DateTimeInput.vue.d.ts +0 -0
  29. package/types/lib-components/forms/FieldsetLegend.vue.d.ts +0 -0
  30. package/types/lib-components/forms/InputError.vue.d.ts +0 -0
  31. package/types/lib-components/forms/InputHelp.vue.d.ts +0 -0
  32. package/types/lib-components/forms/InputLabel.vue.d.ts +0 -0
  33. package/types/lib-components/forms/MultiCheckboxes.vue.d.ts +0 -0
  34. package/types/lib-components/forms/NumberInput.vue.d.ts +0 -0
  35. package/types/lib-components/forms/Radio.vue.d.ts +0 -0
  36. package/types/lib-components/forms/RadioCards.vue.d.ts +0 -0
  37. package/types/lib-components/forms/Select.vue.d.ts +0 -0
  38. package/types/lib-components/forms/TextArea.vue.d.ts +0 -0
  39. package/types/lib-components/forms/Toggle.vue.d.ts +0 -0
  40. package/types/lib-components/forms/YesOrNoRadio.vue.d.ts +0 -0
  41. package/types/lib-components/index.d.ts +0 -0
  42. package/types/lib-components/indicators/AppIcon.vue.d.ts +24 -0
  43. package/types/lib-components/indicators/InlineAlert.vue.d.ts +0 -0
  44. package/types/lib-components/indicators/ProgressCircles.vue.d.ts +0 -0
  45. package/types/lib-components/indicators/ProgressCirclesLabeled.vue.d.ts +0 -0
  46. package/types/lib-components/indicators/XYSpinner.vue.d.ts +0 -0
  47. package/types/lib-components/layout/DateFilter.vue.d.ts +0 -0
  48. package/types/lib-components/layout/SidebarLayout.vue.d.ts +0 -0
  49. package/types/lib-components/layout/StackedLayout.vue.d.ts +0 -0
  50. package/types/lib-components/layout/UserMenu.vue.d.ts +8 -0
  51. package/types/lib-components/lists/Cards.vue.d.ts +0 -0
  52. package/types/lib-components/lists/DataTable.vue.d.ts +0 -0
  53. package/types/lib-components/lists/DetailList.vue.d.ts +0 -0
  54. package/types/lib-components/lists/DownloadCell.vue.d.ts +0 -0
  55. package/types/lib-components/lists/DynamicTable.vue.d.ts +0 -0
  56. package/types/lib-components/lists/TableActionButtons.vue.d.ts +0 -0
  57. package/types/lib-components/navigation/ActionsDropdown.vue.d.ts +0 -0
  58. package/types/lib-components/navigation/Paginator.vue.d.ts +0 -0
  59. package/types/lib-components/navigation/Steps.vue.d.ts +0 -0
  60. package/types/lib-components/navigation/TablePaginator.vue.d.ts +0 -0
  61. package/types/lib-components/navigation/Tabs.vue.d.ts +0 -0
  62. package/types/lib-components/overlays/ContentModal.vue.d.ts +0 -0
  63. package/types/lib-components/overlays/Flash.vue.d.ts +0 -0
  64. package/types/lib-components/overlays/Modal.vue.d.ts +0 -0
  65. package/types/lib-components/overlays/Popover/Popover.vue.d.ts +0 -0
  66. package/types/lib-components/overlays/Popover/PopoverContent.vue.d.ts +0 -0
  67. package/types/lib-components/overlays/Slideover.vue.d.ts +0 -0
  68. package/types/lib-components/overlays/Spinner.vue.d.ts +0 -0
  69. package/types/lib-components/overlays/Tooltip.vue.d.ts +0 -0
  70. package/types/lib-components/overlays/TooltipWrapper.vue.d.ts +18 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xy-planning-network/trees",
3
- "version": "0.13.2",
3
+ "version": "0.13.3-dev-2",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "repository": "github:xy-planning-network/trees",
@@ -7,9 +7,9 @@ import {
7
7
  TransitionRoot,
8
8
  } from "@headlessui/vue"
9
9
  import { XIcon } from "@heroicons/vue/outline"
10
- import { watch } from "vue"
10
+ import { computed, useSlots, watch } from "vue"
11
11
 
12
- withDefaults(
12
+ const props = withDefaults(
13
13
  defineProps<{
14
14
  destructive?: boolean
15
15
  disabled?: boolean
@@ -37,6 +37,12 @@ const submit = () => {
37
37
  emit("submit")
38
38
  }
39
39
 
40
+ const slots = useSlots()
41
+
42
+ const hasButtons = computed(() => {
43
+ return props.submitText || slots.buttons
44
+ })
45
+
40
46
  watch(open, (isOpen) => {
41
47
  if (!isOpen) {
42
48
  emit("close")
@@ -85,52 +91,69 @@ watch(open, (isOpen) => {
85
91
  leave-to="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
86
92
  >
87
93
  <div
88
- class="inline-block align-bottom bg-white rounded-xy text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:rounded-xy-lg w-full"
94
+ class="inline-block align-bottom text-left overflow-y-visible transform transition-all w-full sm:my-8 sm:align-middle"
89
95
  :class="wide ? 'sm:max-w-6xl' : 'sm:max-w-2xl'"
90
96
  >
91
- <div class="block absolute top-0 right-0 pt-4 pr-4 sm:pt-6 sm:pr-8">
92
- <button
93
- type="button"
94
- class="bg-white rounded-md text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"
95
- @click="open = false"
97
+ <div
98
+ class="bg-white rounded-t-xy sm:rounded-t-xy-lg"
99
+ :class="
100
+ !hasButtons && 'rounded-b-xy sm:rounded-b-xy-lg shadow-xl'
101
+ "
102
+ >
103
+ <!--Close Button-->
104
+ <div
105
+ class="block absolute top-0 right-0 pt-4 pr-4 sm:pt-6 sm:pr-8"
96
106
  >
97
- <span class="sr-only">Close</span>
98
- <XIcon class="h-6 w-6" aria-hidden="true" />
99
- </button>
100
- </div>
101
- <div class="bg-white px-4 pt-5 pb-4 sm:p-8 sm:pb-6">
102
- <div class="mt-3 sm:mt-0 sm:text-left">
103
- <DialogTitle
104
- as="h3"
105
- class="text-center text-lg leading-6 font-medium text-gray-900"
106
- >{{ title }}</DialogTitle
107
+ <button
108
+ type="button"
109
+ class="bg-white rounded-md text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"
110
+ @click="open = false"
107
111
  >
108
- <div class="mt-2">
109
- <slot></slot>
112
+ <span class="sr-only">Close</span>
113
+ <XIcon class="h-6 w-6" aria-hidden="true" />
114
+ </button>
115
+ </div>
116
+
117
+ <!--Content-->
118
+ <div class="px-4 pt-5 pb-4 sm:p-8 sm:pb-6">
119
+ <div class="mt-3 sm:mt-0 sm:text-left">
120
+ <DialogTitle
121
+ as="h3"
122
+ class="text-center text-lg leading-6 font-medium text-gray-900"
123
+ >{{ title }}</DialogTitle
124
+ >
125
+ <div class="mt-2">
126
+ <slot></slot>
127
+ </div>
110
128
  </div>
111
129
  </div>
112
130
  </div>
131
+
132
+ <!--Button-->
113
133
  <div
114
- v-if="submitText"
115
- class="bg-gray-50 px-4 py-3 sm:py-4 sm:px-8 sm:flex sm:flex-row-reverse"
134
+ v-if="hasButtons"
135
+ class="bg-gray-50 flex flex-col gap-3 px-4 py-3 rounded-b-xy shadow-xl sm:py-4 sm:px-8 sm:flex sm:flex-row-reverse sm:rounded-b-xy-lg"
116
136
  >
117
- <button
118
- type="button"
119
- class="xy-btn w-full sm:ml-3 sm:w-auto sm:text-sm"
120
- :class="[destructive ? 'xy-btn-red' : 'xy-btn']"
121
- :disabled="disabled"
122
- @click="submit()"
123
- v-text="submitText"
124
- ></button>
125
- <button
126
- type="button"
127
- class="xy-btn-neutral mt-3 w-full sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
128
- @click="open = false"
129
- >
130
- Cancel
131
- </button>
137
+ <template v-if="submitText">
138
+ <button
139
+ type="button"
140
+ :class="[destructive ? 'xy-btn-red' : 'xy-btn']"
141
+ :disabled="disabled"
142
+ @click="submit()"
143
+ >
144
+ {{ submitText }}
145
+ </button>
146
+ <button
147
+ type="button"
148
+ class="xy-btn-neutral"
149
+ @click="open = false"
150
+ >
151
+ Cancel
152
+ </button>
153
+ </template>
154
+
155
+ <slot name="buttons" />
132
156
  </div>
133
- <slot name="buttons"></slot>
134
157
  </div>
135
158
  </TransitionChild>
136
159
  </div>
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/types/entry.d.ts CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,24 @@
1
+ import type { Component, FunctionalComponent, RenderFunction } from "vue";
2
+ type __VLS_Props = {
3
+ bgColor?: `bg-${string}`;
4
+ iconColor?: `text-${string}`;
5
+ icon: FunctionalComponent | Component | RenderFunction;
6
+ indicator?: string | number | boolean;
7
+ size?: "xs" | "sm" | "base" | "lg" | "xl";
8
+ type?: "circle" | "square";
9
+ };
10
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
11
+ type: "circle" | "square";
12
+ size: "base" | "xs" | "sm" | "lg" | "xl";
13
+ bgColor: `bg-${string}`;
14
+ iconColor: `text-${string}`;
15
+ indicator: string | number | boolean;
16
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>, {
17
+ default?(_: {}): any;
18
+ }>;
19
+ export default _default;
20
+ type __VLS_WithTemplateSlots<T, S> = T & {
21
+ new (): {
22
+ $slots: S;
23
+ };
24
+ };
File without changes
@@ -0,0 +1,8 @@
1
+ import { UserMenuItem } from "../../composables/nav";
2
+ type __VLS_Props = {
3
+ menu?: UserMenuItem[];
4
+ };
5
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
6
+ menu: UserMenuItem[];
7
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ export default _default;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,18 @@
1
+ import { type Placement } from "@floating-ui/vue";
2
+ type __VLS_Props = {
3
+ as?: string;
4
+ position?: Placement | "auto";
5
+ tooltip: string;
6
+ };
7
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
8
+ as: string;
9
+ position: Placement | "auto";
10
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
11
+ default?(_: {}): any;
12
+ }>;
13
+ export default _default;
14
+ type __VLS_WithTemplateSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };