@xy-planning-network/trees 0.13.5-dev-1 → 0.13.6

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 (75) hide show
  1. package/dist/trees.es.js +6548 -5720
  2. package/dist/trees.umd.js +15 -14
  3. package/package.json +2 -2
  4. package/src/lib-components/forms/DateRangePicker.vue +1 -1
  5. package/src/lib-components/forms/RadioCards.vue +1 -15
  6. package/src/lib-components/forms/TextArea.vue +1 -0
  7. package/src/lib-components/overlays/Popover/Popover.vue +8 -15
  8. package/src/lib-components/overlays/Slideover.vue +34 -8
  9. package/src/lib-components/overlays/Tooltip.vue +3 -7
  10. package/types/api/base.d.ts +0 -0
  11. package/types/api/client.d.ts +0 -0
  12. package/types/composables/date.d.ts +0 -0
  13. package/types/composables/forms.d.ts +1 -0
  14. package/types/composables/index.d.ts +0 -0
  15. package/types/composables/list.d.ts +0 -0
  16. package/types/composables/nav.d.ts +0 -0
  17. package/types/composables/overlay.d.ts +0 -0
  18. package/types/composables/table.d.ts +0 -0
  19. package/types/composables/useActionItems.d.ts +0 -0
  20. package/types/composables/useBaseAPI.d.ts +0 -0
  21. package/types/composables/useFlashes.d.ts +0 -0
  22. package/types/composables/useSpinner.d.ts +0 -0
  23. package/types/composables/useTable.d.ts +0 -0
  24. package/types/composables/user.d.ts +0 -0
  25. package/types/entry.d.ts +0 -0
  26. package/types/helpers/Debounce.d.ts +0 -0
  27. package/types/helpers/Throttle.d.ts +0 -0
  28. package/types/helpers/Uniques.d.ts +0 -0
  29. package/types/lib-components/forms/BaseInput.vue.d.ts +0 -0
  30. package/types/lib-components/forms/Checkbox.vue.d.ts +0 -0
  31. package/types/lib-components/forms/DateRangePicker.vue.d.ts +0 -0
  32. package/types/lib-components/forms/DateTimeInput.vue.d.ts +0 -0
  33. package/types/lib-components/forms/FieldsetLegend.vue.d.ts +0 -0
  34. package/types/lib-components/forms/InputError.vue.d.ts +0 -0
  35. package/types/lib-components/forms/InputHelp.vue.d.ts +0 -0
  36. package/types/lib-components/forms/InputLabel.vue.d.ts +0 -0
  37. package/types/lib-components/forms/MultiCheckboxes.vue.d.ts +0 -0
  38. package/types/lib-components/forms/NumberInput.vue.d.ts +0 -0
  39. package/types/lib-components/forms/Radio.vue.d.ts +0 -0
  40. package/types/lib-components/forms/RadioCards.vue.d.ts +0 -3
  41. package/types/lib-components/forms/Select.vue.d.ts +0 -0
  42. package/types/lib-components/forms/TextArea.vue.d.ts +0 -0
  43. package/types/lib-components/forms/Toggle.vue.d.ts +0 -0
  44. package/types/lib-components/forms/YesOrNoRadio.vue.d.ts +0 -0
  45. package/types/lib-components/index.d.ts +0 -0
  46. package/types/lib-components/indicators/InlineAlert.vue.d.ts +0 -0
  47. package/types/lib-components/indicators/ProgressCircles.vue.d.ts +0 -0
  48. package/types/lib-components/indicators/ProgressCirclesLabeled.vue.d.ts +0 -0
  49. package/types/lib-components/indicators/XYSpinner.vue.d.ts +0 -0
  50. package/types/lib-components/layout/DateFilter.vue.d.ts +0 -0
  51. package/types/lib-components/layout/SidebarLayout.vue.d.ts +0 -0
  52. package/types/lib-components/layout/StackedLayout.vue.d.ts +0 -0
  53. package/types/lib-components/lists/Cards.vue.d.ts +0 -0
  54. package/types/lib-components/lists/DataTable.vue.d.ts +0 -0
  55. package/types/lib-components/lists/DetailList.vue.d.ts +0 -0
  56. package/types/lib-components/lists/DownloadCell.vue.d.ts +0 -0
  57. package/types/lib-components/lists/DynamicTable.vue.d.ts +0 -0
  58. package/types/lib-components/lists/TableActionButtons.vue.d.ts +0 -0
  59. package/types/lib-components/navigation/ActionsDropdown.vue.d.ts +0 -0
  60. package/types/lib-components/navigation/Paginator.vue.d.ts +0 -0
  61. package/types/lib-components/navigation/Steps.vue.d.ts +0 -0
  62. package/types/lib-components/navigation/TablePaginator.vue.d.ts +0 -0
  63. package/types/lib-components/navigation/Tabs.vue.d.ts +0 -0
  64. package/types/lib-components/overlays/ContentModal.vue.d.ts +0 -0
  65. package/types/lib-components/overlays/Flash.vue.d.ts +0 -0
  66. package/types/lib-components/overlays/Modal.vue.d.ts +0 -0
  67. package/types/lib-components/overlays/Popover/Popover.vue.d.ts +0 -0
  68. package/types/lib-components/overlays/Popover/PopoverContent.vue.d.ts +0 -0
  69. package/types/lib-components/overlays/Slideover.vue.d.ts +4 -1
  70. package/types/lib-components/overlays/Spinner.vue.d.ts +0 -0
  71. package/types/lib-components/overlays/Tooltip.vue.d.ts +0 -0
  72. package/types/composables/useBulkTable.d.ts +0 -0
  73. package/types/lib-components/indicators/AppIcon.vue.d.ts +0 -24
  74. package/types/lib-components/layout/UserMenu.vue.d.ts +0 -8
  75. package/types/lib-components/overlays/TooltipWrapper.vue.d.ts +0 -18
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xy-planning-network/trees",
3
- "version": "0.13.5-dev-1",
3
+ "version": "0.13.6",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "repository": "github:xy-planning-network/trees",
@@ -58,7 +58,7 @@
58
58
  },
59
59
  "dependencies": {
60
60
  "@floating-ui/vue": "^1.0.1",
61
- "@headlessui/vue": "^1.7.23",
61
+ "@headlessui/vue": "^1.4.2",
62
62
  "@heroicons/vue": "^1.0.5",
63
63
  "@maskito/core": "^3.5.0",
64
64
  "@maskito/kit": "^3.5.0",
@@ -11,7 +11,7 @@ import {
11
11
  useInputField,
12
12
  } from "@/composables/forms"
13
13
  import type { DateRangeInput } from "@/composables/forms"
14
- import type { Instance } from "flatpickr/dist/types/instance"
14
+ import { Instance } from "flatpickr/dist/types/instance"
15
15
  import { DateRange } from "@/composables/date"
16
16
 
17
17
  defineOptions({
@@ -38,21 +38,7 @@ const props = withDefaults(
38
38
  defineProps<RadioCards & ColumnedInput>(),
39
39
  defaultInputProps
40
40
  )
41
- const modelState = defineModel<
42
- RadioCards["modelValue"],
43
- "modelValue",
44
- string | number | undefined
45
- >({
46
- ...defaultModelOpts,
47
- get: (v) => {
48
- // NOTE(spk): HeadlessUI RadioGroup does not support "null" values
49
- if (v === null) {
50
- return undefined
51
- }
52
-
53
- return v
54
- },
55
- })
41
+ const modelState = defineModel<RadioCards["modelValue"]>(defaultModelOpts)
56
42
 
57
43
  const { aria, isDisabled, isRequired, nameAttr, errorState, onInvalid } =
58
44
  useInputField(props)
@@ -44,6 +44,7 @@ const { aria, inputID, isRequired, errorState, onInvalid, inputValidation } =
44
44
  : 'text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-xy-blue-500',
45
45
  ]"
46
46
  :placeholder="placeholder"
47
+ :rows="rows"
47
48
  v-bind="$attrs"
48
49
  @input="inputValidation"
49
50
  @invalid="onInvalid"
@@ -4,7 +4,7 @@ import {
4
4
  PopoverButton as HeadlessPopoverButton,
5
5
  PopoverPanel as HeadlessPopoverPanel,
6
6
  } from "@headlessui/vue"
7
- import { computed, onMounted, ref, useTemplateRef } from "vue"
7
+ import { computed, useTemplateRef } from "vue"
8
8
  import {
9
9
  useFloating,
10
10
  offset,
@@ -12,7 +12,7 @@ import {
12
12
  autoUpdate,
13
13
  shift,
14
14
  } from "@floating-ui/vue"
15
- import type { Placement, UseFloatingReturn } from "@floating-ui/vue"
15
+ import type { Placement } from "@floating-ui/vue"
16
16
 
17
17
  const props = withDefaults(
18
18
  defineProps<{
@@ -51,14 +51,11 @@ const placement = computed(() => {
51
51
  return props.position
52
52
  })
53
53
 
54
- const floating = ref<UseFloatingReturn | null>(null)
55
- onMounted(() => {
56
- floating.value = useFloating(triggerRef, wrapperRef, {
57
- middleware: middleware,
58
- placement: placement,
59
- strategy: "fixed",
60
- whileElementsMounted: autoUpdate,
61
- })
54
+ const { floatingStyles } = useFloating(triggerRef, wrapperRef, {
55
+ middleware: middleware,
56
+ placement: placement,
57
+ strategy: "fixed",
58
+ whileElementsMounted: autoUpdate,
62
59
  })
63
60
  </script>
64
61
 
@@ -68,11 +65,7 @@ onMounted(() => {
68
65
  <slot name="button" :open="open" :close="close"></slot>
69
66
  </HeadlessPopoverButton>
70
67
 
71
- <div
72
- ref="wrapper"
73
- class="z-[5]"
74
- :style="floating ? floating.floatingStyles : undefined"
75
- >
68
+ <div ref="wrapper" class="z-[5]" :style="floatingStyles">
76
69
  <HeadlessPopoverPanel>
77
70
  <slot :open="open" :close="close"></slot>
78
71
  </HeadlessPopoverPanel>
@@ -7,12 +7,38 @@ 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, watch } from "vue"
11
11
 
12
- defineProps<{
13
- header: string
14
- description: string
15
- }>()
12
+ const props = withDefaults(
13
+ defineProps<{
14
+ header: string
15
+ description: string
16
+ size?: "sm" | "md" | "lg"
17
+ }>(),
18
+ {
19
+ size: "sm",
20
+ }
21
+ )
22
+
23
+ const layout = computed(() => {
24
+ switch (props.size) {
25
+ case "lg":
26
+ return {
27
+ maxWidth: "max-w-6xl",
28
+ padding: "py-6 px-4 sm:px-20 sm:py-14",
29
+ }
30
+ case "md":
31
+ return {
32
+ maxWidth: "max-w-4xl",
33
+ padding: "py-6 px-4 sm:px-16 sm:py-12",
34
+ }
35
+ default: // span="sm"
36
+ return {
37
+ maxWidth: "max-w-md",
38
+ padding: "py-6 px-4 sm:px-6 sm:py-4",
39
+ }
40
+ }
41
+ })
16
42
 
17
43
  const open = defineModel<boolean>({ required: true })
18
44
 
@@ -48,11 +74,11 @@ watch(open, (isOpen) => {
48
74
  leave-from="translate-x-0"
49
75
  leave-to="translate-x-full"
50
76
  >
51
- <div class="w-screen max-w-md">
77
+ <div :class="['w-screen', layout.maxWidth]">
52
78
  <div
53
79
  class="h-full flex flex-col bg-white shadow-xl overflow-y-scroll"
54
80
  >
55
- <div class="py-6 px-4 bg-xy-blue-700 sm:px-6">
81
+ <div :class="['bg-xy-blue-700', layout.padding]">
56
82
  <div class="flex items-center justify-between">
57
83
  <DialogTitle as="h3" class="text-white">
58
84
  {{ header }}
@@ -74,7 +100,7 @@ watch(open, (isOpen) => {
74
100
  ></p>
75
101
  </div>
76
102
  </div>
77
- <div class="relative flex-1 py-6 px-4 sm:px-6">
103
+ <div :class="['relative flex-1', layout.padding]">
78
104
  <slot></slot>
79
105
  </div>
80
106
 
@@ -16,14 +16,10 @@ withDefaults(
16
16
  )
17
17
 
18
18
  // data
19
- let popoverHover: boolean = false
20
- let popoverTimeout: null | NodeJS.Timeout = null
19
+ var popoverHover = false
20
+ var popoverTimeout: null | NodeJS.Timeout = null
21
21
 
22
22
  // functions
23
- const openPopover = () => {
24
- popoverHover = true
25
- }
26
-
27
23
  const closePopover = (close: () => void): void => {
28
24
  popoverHover = false
29
25
  if (popoverTimeout) clearTimeout(popoverTimeout)
@@ -56,7 +52,7 @@ const hoverPopover = (e: MouseEvent, open: boolean): void => {
56
52
  <template #default="{ close }: { close: () => void }">
57
53
  <div
58
54
  class="sm:min-w-max bg-white rounded-xy px-3.5 py-2.5 border border-gray-100 drop-shadow-md text-xs text-gray-900 leading-snug font-medium"
59
- @mouseover.prevent="openPopover"
55
+ @mouseover.prevent="popoverHover = true"
60
56
  @mouseleave.prevent="closePopover(close)"
61
57
  >
62
58
  <div class="max-w-xs">
File without changes
File without changes
File without changes
@@ -47,6 +47,7 @@ export interface NumericInput extends Input {
47
47
  }
48
48
  export interface TextareaInput extends Input {
49
49
  modelValue?: string | number | null;
50
+ rows?: number;
50
51
  }
51
52
  export interface OptionsInput extends Input {
52
53
  modelValue?: string | number | null;
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
@@ -2,7 +2,6 @@ import type { InputOption } from "../../composables/forms";
2
2
  declare const _default: <T extends InputOption>(__VLS_props: {
3
3
  readonly "onUpdate:modelValue"?: ((value: string | number | null | undefined) => any) | undefined;
4
4
  modelValue?: string | number | null | undefined;
5
- modelModifiers?: Record<"modelValue", true> | undefined;
6
5
  options: T[];
7
6
  label?: string | undefined;
8
7
  help?: string | undefined;
@@ -23,7 +22,6 @@ declare const _default: <T extends InputOption>(__VLS_props: {
23
22
  props: {
24
23
  readonly "onUpdate:modelValue"?: ((value: string | number | null | undefined) => any) | undefined;
25
24
  modelValue?: string | number | null | undefined;
26
- modelModifiers?: Record<"modelValue", true> | undefined;
27
25
  options: T[];
28
26
  label?: string | undefined;
29
27
  help?: string | undefined;
@@ -48,7 +46,6 @@ declare const _default: <T extends InputOption>(__VLS_props: {
48
46
  props: {
49
47
  readonly "onUpdate:modelValue"?: ((value: string | number | null | undefined) => any) | undefined;
50
48
  modelValue?: string | number | null | undefined;
51
- modelModifiers?: Record<"modelValue", true> | undefined;
52
49
  options: T[];
53
50
  label?: string | undefined;
54
51
  help?: string | undefined;
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
@@ -1,6 +1,7 @@
1
1
  type __VLS_Props = {
2
2
  header: string;
3
3
  description: string;
4
+ size?: "sm" | "md" | "lg";
4
5
  };
5
6
  type __VLS_PublicProps = {
6
7
  modelValue: boolean;
@@ -12,7 +13,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
12
13
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
13
14
  onClose?: (() => any) | undefined;
14
15
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
15
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
16
+ }>, {
17
+ size: "sm" | "md" | "lg";
18
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
16
19
  default?(_: {}): any;
17
20
  footer?(_: {}): any;
18
21
  }>;
File without changes
File without changes
File without changes
@@ -1,24 +0,0 @@
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
- };
@@ -1,8 +0,0 @@
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;
@@ -1,18 +0,0 @@
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
- };