@indielayer/ui 1.15.0 → 1.15.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 (36) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +1 -1
  3. package/docs/components/common/CodeSnippet.vue +4 -3
  4. package/lib/components/index.js +117 -116
  5. package/lib/components/popover/Popover.vue2.js +2 -3
  6. package/lib/components/popover/Popover.vue3.js +3 -2
  7. package/lib/components/select/Select.vue.js +1 -1
  8. package/lib/components/textarea/Textarea.vue.js +40 -36
  9. package/lib/components/tooltip/ToggleTip.vue.js +7 -7
  10. package/lib/components/tooltip/Tooltip.vue.d.ts +29 -9
  11. package/lib/components/tooltip/Tooltip.vue.js +114 -35
  12. package/lib/components/tooltip/index.d.ts +1 -1
  13. package/lib/components/tooltip/theme/Tooltip.base.theme.d.ts +3 -0
  14. package/lib/components/tooltip/theme/Tooltip.base.theme.js +8 -0
  15. package/lib/components/tooltip/theme/Tooltip.carbon.theme.d.ts +3 -0
  16. package/lib/components/tooltip/theme/Tooltip.carbon.theme.js +5 -0
  17. package/lib/index.js +1 -1
  18. package/lib/index.umd.js +4 -4
  19. package/lib/theme.d.ts +2 -1
  20. package/lib/themes/base/components.d.ts +1 -0
  21. package/lib/themes/base/components.js +12 -10
  22. package/lib/themes/carbon/components.d.ts +1 -0
  23. package/lib/themes/carbon/components.js +12 -10
  24. package/lib/version.d.ts +1 -1
  25. package/lib/version.js +1 -1
  26. package/package.json +2 -2
  27. package/src/components/textarea/Textarea.vue +7 -1
  28. package/src/components/tooltip/ToggleTip.vue +1 -1
  29. package/src/components/tooltip/Tooltip.vue +185 -15
  30. package/src/components/tooltip/index.ts +1 -1
  31. package/src/components/tooltip/theme/Tooltip.base.theme.ts +9 -0
  32. package/src/components/tooltip/theme/Tooltip.carbon.theme.ts +7 -0
  33. package/src/theme.ts +2 -0
  34. package/src/themes/base/components.ts +1 -0
  35. package/src/themes/carbon/components.ts +1 -0
  36. package/src/version.ts +1 -1
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 - Indielayer
3
+ Copyright (c) 2024-present - Indielayer
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -39,4 +39,4 @@ The documentation is located inside [/packages/ui/docs](./packages/ui/docs)
39
39
 
40
40
  [MIT](./LICENSE)
41
41
 
42
- Copyright (c) 2024, Indielayer
42
+ Copyright (c) 2024-present - Indielayer
@@ -1,10 +1,11 @@
1
1
  <script setup lang="ts">
2
2
  import { onMounted, ref } from 'vue'
3
- import { getHighlighter } from 'shiki'
3
+ import { createHighlighter } from 'shiki'
4
4
  import indielayerTheme from './Indielayer-theme.json'
5
5
 
6
- const highlighter = getHighlighter({
6
+ const highlighter = createHighlighter({
7
7
  langs: ['js', 'ts', 'vue-html', 'bash', 'vue'],
8
+ themes: [indielayerTheme as any],
8
9
  })
9
10
 
10
11
  const props = defineProps({
@@ -23,7 +24,7 @@ const highlighted = ref('')
23
24
 
24
25
  onMounted(async () => {
25
26
  await (await highlighter).loadTheme(indielayerTheme as any)
26
- highlighted.value = (await highlighter).codeToHtml(props.code, { lang: props.lang, theme: 'Indielayer' })
27
+ highlighted.value = (await highlighter).codeToHtml(props.code || '', { lang: props.lang, theme: 'Indielayer' })
27
28
  })
28
29
  </script>
29
30
 
@@ -1,119 +1,120 @@
1
- import { default as a } from "./accordion/Accordion.vue.js";
2
- import { default as f } from "./accordion/AccordionItem.vue.js";
3
- import { default as d } from "./badge/Badge.vue.js";
4
- import { default as u } from "./breadcrumbs/Breadcrumbs.vue.js";
5
- import { default as s } from "./card/Card.vue.js";
6
- import { default as X } from "./carousel/Carousel.vue.js";
7
- import { default as n } from "./container/Container.vue.js";
8
- import { default as c } from "./datepicker/Datepicker.vue.js";
1
+ import { default as t } from "./accordion/Accordion.vue.js";
2
+ import { default as l } from "./accordion/AccordionItem.vue.js";
3
+ import { default as p } from "./badge/Badge.vue.js";
4
+ import { default as m } from "./breadcrumbs/Breadcrumbs.vue.js";
5
+ import { default as x } from "./card/Card.vue.js";
6
+ import { default as i } from "./carousel/Carousel.vue.js";
7
+ import { default as T } from "./container/Container.vue.js";
8
+ import { default as b } from "./datepicker/Datepicker.vue.js";
9
9
  import "./datepicker/Datepicker.vue2.js";
10
- import { default as g } from "./divider/Divider.vue.js";
11
- import { default as S } from "./drawer/Drawer.vue.js";
12
- import { default as P } from "./form/Form.vue.js";
13
- import { default as B } from "./formGroup/FormGroup.vue.js";
14
- import { default as A } from "./image/Image.vue.js";
15
- import { default as F } from "./menu/Menu.vue.js";
16
- import { default as L } from "./modal/Modal.vue.js";
17
- import { default as h } from "./notifications/Notifications.vue.js";
18
- import { default as H } from "./pagination/Pagination.vue.js";
19
- import { default as y } from "./progress/Progress.vue.js";
20
- import { default as Q } from "./qrCode/QrCode.vue.js";
21
- import { default as j } from "./select/Select.vue.js";
22
- import { default as z } from "./skeleton/Skeleton.vue.js";
23
- import { default as J } from "./stepper/Stepper.vue.js";
24
- import { default as O } from "./tab/Tab.vue.js";
25
- import { default as W } from "./tab/TabGroup.vue.js";
26
- import { default as Z } from "./table/Table.vue.js";
27
- import { default as $ } from "./textarea/Textarea.vue.js";
28
- import { default as oe } from "./themeProvider/ThemeProvider.vue.js";
29
- import { default as ae } from "./toggle/Toggle.vue.js";
30
- import { default as fe } from "./upload/Upload.vue.js";
31
- import { default as de } from "./alert/Alert.vue.js";
32
- import { default as ue } from "./avatar/Avatar.vue.js";
33
- import { default as se } from "./button/Button.vue.js";
34
- import { default as Xe } from "./button/ButtonGroup.vue.js";
35
- import { default as ne } from "./carousel/CarouselSlide.vue.js";
36
- import { default as ce } from "./checkbox/Checkbox.vue.js";
37
- import { default as ge } from "./icon/Icon.vue.js";
38
- import { default as Se } from "./input/Input.vue.js";
39
- import { default as Pe } from "./inputFooter/InputFooter.vue.js";
40
- import { default as Be } from "./label/Label.vue.js";
41
- import { default as Ae } from "./link/Link.vue.js";
42
- import { default as Fe } from "./loader/Loader.vue.js";
43
- import { default as Le } from "./menu/MenuItem.vue.js";
44
- import { default as he } from "./pagination/PaginationItem.vue.js";
45
- import { default as He } from "./popover/Popover.vue.js";
46
- import { default as ye } from "./popover/PopoverContainer.vue.js";
47
- import { default as Qe } from "./radio/Radio.vue.js";
48
- import { default as je } from "./scroll/Scroll.vue.js";
49
- import { default as ze } from "./slider/Slider.vue.js";
50
- import { default as Je } from "./spacer/Spacer.js";
51
- import { default as Oe } from "./spinner/Spinner.vue.js";
52
- import { default as We } from "./table/TableBody.js";
53
- import { default as Ze } from "./table/TableCell.vue.js";
54
- import { default as $e } from "./table/TableHead.vue.js";
55
- import { default as oo } from "./table/TableHeader.vue.js";
56
- import { default as ao } from "./table/TableRow.vue.js";
57
- import { default as fo } from "./tag/Tag.vue.js";
58
- import { default as po } from "./tooltip/Tooltip.vue.js";
59
- import { default as mo } from "./tooltip/ToggleTip.vue.js";
10
+ import { default as C } from "./divider/Divider.vue.js";
11
+ import { default as I } from "./drawer/Drawer.vue.js";
12
+ import { default as v } from "./form/Form.vue.js";
13
+ import { default as k } from "./formGroup/FormGroup.vue.js";
14
+ import { default as D } from "./image/Image.vue.js";
15
+ import { default as G } from "./menu/Menu.vue.js";
16
+ import { default as M } from "./modal/Modal.vue.js";
17
+ import { default as w } from "./notifications/Notifications.vue.js";
18
+ import { default as R } from "./pagination/Pagination.vue.js";
19
+ import { default as N } from "./popover/Popover.vue.js";
20
+ import "./popover/Popover.vue2.js";
21
+ import { default as U } from "./popover/PopoverContainer.vue.js";
22
+ import { default as q } from "./progress/Progress.vue.js";
23
+ import { default as E } from "./qrCode/QrCode.vue.js";
24
+ import { default as K } from "./select/Select.vue.js";
25
+ import { default as V } from "./skeleton/Skeleton.vue.js";
26
+ import { default as Y } from "./stepper/Stepper.vue.js";
27
+ import { default as _ } from "./tab/Tab.vue.js";
28
+ import { default as ee } from "./tab/TabGroup.vue.js";
29
+ import { default as re } from "./table/Table.vue.js";
30
+ import { default as te } from "./textarea/Textarea.vue.js";
31
+ import { default as le } from "./themeProvider/ThemeProvider.vue.js";
32
+ import { default as pe } from "./toggle/Toggle.vue.js";
33
+ import { default as me } from "./upload/Upload.vue.js";
34
+ import { default as xe } from "./alert/Alert.vue.js";
35
+ import { default as ie } from "./avatar/Avatar.vue.js";
36
+ import { default as Te } from "./button/Button.vue.js";
37
+ import { default as be } from "./button/ButtonGroup.vue.js";
38
+ import { default as Ce } from "./carousel/CarouselSlide.vue.js";
39
+ import { default as Ie } from "./checkbox/Checkbox.vue.js";
40
+ import { default as ve } from "./icon/Icon.vue.js";
41
+ import { default as ke } from "./input/Input.vue.js";
42
+ import { default as De } from "./inputFooter/InputFooter.vue.js";
43
+ import { default as Ge } from "./label/Label.vue.js";
44
+ import { default as Me } from "./link/Link.vue.js";
45
+ import { default as we } from "./loader/Loader.vue.js";
46
+ import { default as Re } from "./menu/MenuItem.vue.js";
47
+ import { default as Ne } from "./pagination/PaginationItem.vue.js";
48
+ import { default as Ue } from "./radio/Radio.vue.js";
49
+ import { default as qe } from "./scroll/Scroll.vue.js";
50
+ import { default as Ee } from "./slider/Slider.vue.js";
51
+ import { default as Ke } from "./spacer/Spacer.js";
52
+ import { default as Ve } from "./spinner/Spinner.vue.js";
53
+ import { default as Ye } from "./table/TableBody.js";
54
+ import { default as _e } from "./table/TableCell.vue.js";
55
+ import { default as eo } from "./table/TableHead.vue.js";
56
+ import { default as ro } from "./table/TableHeader.vue.js";
57
+ import { default as to } from "./table/TableRow.vue.js";
58
+ import { default as lo } from "./tag/Tag.vue.js";
59
+ import { default as uo } from "./tooltip/Tooltip.vue.js";
60
+ import { default as so } from "./tooltip/ToggleTip.vue.js";
60
61
  export {
61
- a as XAccordion,
62
- f as XAccordionItem,
63
- de as XAlert,
64
- ue as XAvatar,
65
- d as XBadge,
66
- u as XBreadcrumbs,
67
- se as XButton,
68
- Xe as XButtonGroup,
69
- s as XCard,
70
- X as XCarousel,
71
- ne as XCarouselSlide,
72
- ce as XCheckbox,
73
- n as XContainer,
74
- c as XDatepicker,
75
- g as XDivider,
76
- S as XDrawer,
77
- P as XForm,
78
- B as XFormGroup,
79
- ge as XIcon,
80
- A as XImage,
81
- Se as XInput,
82
- Pe as XInputFooter,
83
- Be as XLabel,
84
- Ae as XLink,
85
- Fe as XLoader,
86
- F as XMenu,
87
- Le as XMenuItem,
88
- L as XModal,
89
- h as XNotifications,
90
- H as XPagination,
91
- he as XPaginationItem,
92
- He as XPopover,
93
- ye as XPopoverContainer,
94
- y as XProgress,
95
- Q as XQrCode,
96
- Qe as XRadio,
97
- je as XScroll,
98
- j as XSelect,
99
- z as XSkeleton,
100
- ze as XSlider,
101
- Je as XSpacer,
102
- Oe as XSpinner,
103
- J as XStepper,
104
- O as XTab,
105
- W as XTabGroup,
106
- Z as XTable,
107
- We as XTableBody,
108
- Ze as XTableCell,
109
- $e as XTableHead,
110
- oo as XTableHeader,
111
- ao as XTableRow,
112
- fo as XTag,
113
- $ as XTextarea,
114
- oe as XThemeProvider,
115
- ae as XToggle,
116
- mo as XToggleTip,
117
- po as XTooltip,
118
- fe as XUpload
62
+ t as XAccordion,
63
+ l as XAccordionItem,
64
+ xe as XAlert,
65
+ ie as XAvatar,
66
+ p as XBadge,
67
+ m as XBreadcrumbs,
68
+ Te as XButton,
69
+ be as XButtonGroup,
70
+ x as XCard,
71
+ i as XCarousel,
72
+ Ce as XCarouselSlide,
73
+ Ie as XCheckbox,
74
+ T as XContainer,
75
+ b as XDatepicker,
76
+ C as XDivider,
77
+ I as XDrawer,
78
+ v as XForm,
79
+ k as XFormGroup,
80
+ ve as XIcon,
81
+ D as XImage,
82
+ ke as XInput,
83
+ De as XInputFooter,
84
+ Ge as XLabel,
85
+ Me as XLink,
86
+ we as XLoader,
87
+ G as XMenu,
88
+ Re as XMenuItem,
89
+ M as XModal,
90
+ w as XNotifications,
91
+ R as XPagination,
92
+ Ne as XPaginationItem,
93
+ N as XPopover,
94
+ U as XPopoverContainer,
95
+ q as XProgress,
96
+ E as XQrCode,
97
+ Ue as XRadio,
98
+ qe as XScroll,
99
+ K as XSelect,
100
+ V as XSkeleton,
101
+ Ee as XSlider,
102
+ Ke as XSpacer,
103
+ Ve as XSpinner,
104
+ Y as XStepper,
105
+ _ as XTab,
106
+ ee as XTabGroup,
107
+ re as XTable,
108
+ Ye as XTableBody,
109
+ _e as XTableCell,
110
+ eo as XTableHead,
111
+ ro as XTableHeader,
112
+ to as XTableRow,
113
+ lo as XTag,
114
+ te as XTextarea,
115
+ le as XThemeProvider,
116
+ pe as XToggle,
117
+ so as XToggleTip,
118
+ uo as XTooltip,
119
+ me as XUpload
119
120
  };
@@ -1,5 +1,4 @@
1
- import o from "./Popover.vue.js";
2
- import "./Popover.vue3.js";
1
+ const e = "";
3
2
  export {
4
- o as default
3
+ e as default
5
4
  };
@@ -1,4 +1,5 @@
1
- const e = "";
1
+ import o from "./Popover.vue.js";
2
+ import "./Popover.vue2.js";
2
3
  export {
3
- e as default
4
+ o as default
4
5
  };
@@ -13,7 +13,7 @@ import me from "../icon/Icon.vue.js";
13
13
  import ll from "../menu/MenuItem.vue.js";
14
14
  import tl from "../spinner/Spinner.vue.js";
15
15
  import ye from "../popover/Popover.vue.js";
16
- import "../popover/Popover.vue3.js";
16
+ import "../popover/Popover.vue2.js";
17
17
  import be from "../popover/PopoverContainer.vue.js";
18
18
  import al from "../inputFooter/InputFooter.vue.js";
19
19
  import il from "../input/Input.vue.js";
@@ -1,16 +1,16 @@
1
- import { defineComponent as K, useAttrs as O, computed as i, ref as D, watch as W, openBlock as m, createBlock as u, normalizeStyle as X, unref as r, normalizeClass as h, withCtx as G, createElementVNode as b, renderSlot as g, mergeProps as J, toHandlers as M, withKeys as Q, createCommentVNode as v } from "vue";
2
- import { useResizeObserver as U, useEventListener as Y } from "../../node_modules/.pnpm/@vueuse_core@11.1.0_vue@3.5.10_typescript@5.2.2_/node_modules/@vueuse/core/index.js";
3
- import { useCSS as Z } from "../../composables/useCSS.js";
4
- import { useTheme as _ } from "../../composables/useTheme.js";
1
+ import { defineComponent as O, useAttrs as D, computed as i, ref as W, watch as X, openBlock as u, createBlock as m, normalizeStyle as G, unref as r, normalizeClass as h, withCtx as J, createElementVNode as b, renderSlot as g, mergeProps as M, toHandlers as Q, withKeys as U, createCommentVNode as v } from "vue";
2
+ import { useResizeObserver as Y, useEventListener as Z } from "../../node_modules/.pnpm/@vueuse_core@11.1.0_vue@3.5.10_typescript@5.2.2_/node_modules/@vueuse/core/index.js";
3
+ import { useCSS as _ } from "../../composables/useCSS.js";
4
+ import { useTheme as ee } from "../../composables/useTheme.js";
5
5
  import { useCommon as y } from "../../composables/useCommon.js";
6
- import { useColors as ee } from "../../composables/useColors.js";
6
+ import { useColors as re } from "../../composables/useColors.js";
7
7
  import { useInputtable as d } from "../../composables/useInputtable.js";
8
8
  import { useInteractive as w } from "../../composables/useInteractive.js";
9
- import re from "../label/Label.vue.js";
10
- import oe from "../inputFooter/InputFooter.vue.js";
11
- import te from "../icon/Icon.vue.js";
12
- import { closeIcon as ne } from "../../common/icons.js";
13
- const se = { class: "relative" }, le = ["id", "disabled", "max", "maxlength", "min", "dir", "rows", "minlength", "name", "placeholder", "readonly", "value"], ae = {
9
+ import oe from "../label/Label.vue.js";
10
+ import te from "../inputFooter/InputFooter.vue.js";
11
+ import ne from "../icon/Icon.vue.js";
12
+ import { closeIcon as se } from "../../common/icons.js";
13
+ const le = { class: "relative" }, ae = ["id", "disabled", "max", "maxlength", "min", "dir", "rows", "minlength", "name", "placeholder", "readonly", "value"], ie = {
14
14
  ...y.props(),
15
15
  ...w.props(),
16
16
  ...d.props(),
@@ -33,25 +33,25 @@ const se = { class: "relative" }, le = ["id", "disabled", "max", "maxlength", "m
33
33
  resizable: Boolean,
34
34
  showCounter: Boolean,
35
35
  clearable: Boolean
36
- }, ie = {
36
+ }, ue = {
37
37
  name: "XTextarea",
38
38
  validators: {
39
39
  ...y.validators()
40
40
  }
41
- }, ke = /* @__PURE__ */ K({
42
- ...ie,
43
- props: ae,
41
+ }, ze = /* @__PURE__ */ O({
42
+ ...ue,
43
+ props: ie,
44
44
  emits: d.emits(),
45
45
  setup(S, { expose: C, emit: k }) {
46
- const o = S, z = k, p = O(), B = i(() => Object.keys(p).reduce((e, n) => (n.startsWith("data-") && (e[n] = p[n]), e), {})), t = D(null);
47
- U(t, s), typeof window < "u" && Y(window, "resize", s), W([() => o.modelValue, () => o.size], () => {
46
+ const o = S, z = k, p = D(), B = i(() => Object.keys(p).reduce((e, n) => (n.startsWith("data-") && (e[n] = p[n]), e), {})), t = W(null);
47
+ Y(t, s), typeof window < "u" && Z(window, "resize", s), X([() => o.modelValue, () => o.size], () => {
48
48
  setTimeout(s);
49
49
  });
50
- const I = Z("textarea"), N = ee().getPalette("primary"), T = I.get("border", N[400]);
51
- function V() {
50
+ const I = _("textarea"), N = re().getPalette("primary"), T = I.get("border", N[400]);
51
+ function E() {
52
52
  s();
53
53
  }
54
- function E(e) {
54
+ function V(e) {
55
55
  o.preventEnter && e.preventDefault(), e.stopPropagation();
56
56
  }
57
57
  function s() {
@@ -68,24 +68,28 @@ const se = { class: "relative" }, le = ["id", "disabled", "max", "maxlength", "m
68
68
  } = d(o, { focus: c, emit: z }), R = i(() => {
69
69
  const e = o.modelValue;
70
70
  return e ? String(e).length : 0;
71
- }), A = i(() => o.clearable && o.modelValue !== ""), { styles: F, classes: a, className: H } = _("Textarea", {}, o, { errorInternal: l });
72
- return C({ focus: c, blur: $, reset: f, validate: q, setError: L }), (e, n) => (m(), u(re, {
73
- style: X(r(F)),
71
+ }), A = i(() => o.clearable && o.modelValue !== "");
72
+ function F(e) {
73
+ return typeof e > "u" || e === null;
74
+ }
75
+ const { styles: H, classes: a, className: K } = ee("Textarea", {}, o, { errorInternal: l });
76
+ return C({ focus: c, blur: $, reset: f, validate: q, setError: L }), (e, n) => (u(), m(oe, {
77
+ style: G(r(H)),
74
78
  block: e.block,
75
79
  disabled: e.disabled,
76
80
  required: e.required,
77
81
  "is-inside-form": r(P),
78
82
  label: e.label,
79
83
  class: h([
80
- r(H),
84
+ r(K),
81
85
  r(a).wrapper
82
86
  ]),
83
87
  tooltip: e.tooltip
84
88
  }, {
85
- default: G(() => [
86
- b("div", se, [
89
+ default: J(() => [
90
+ b("div", le, [
87
91
  g(e.$slots, "prefix"),
88
- b("textarea", J({
92
+ b("textarea", M({
89
93
  id: e.id,
90
94
  ref_key: "elRef",
91
95
  ref: t,
@@ -104,22 +108,22 @@ const se = { class: "relative" }, le = ["id", "disabled", "max", "maxlength", "m
104
108
  name: e.name,
105
109
  placeholder: e.placeholder,
106
110
  readonly: e.readonly,
107
- value: typeof e.modelValue < "u" ? String(e.modelValue) : ""
108
- }, B.value, M(r(j), !0), {
109
- onKeydown: Q(E, ["enter"]),
110
- onInput: V
111
- }), null, 16, le),
111
+ value: F(e.modelValue) ? "" : String(e.modelValue)
112
+ }, B.value, Q(r(j), !0), {
113
+ onKeydown: U(V, ["enter"]),
114
+ onInput: E
115
+ }), null, 16, ae),
112
116
  g(e.$slots, "suffix", {}, () => [
113
- A.value ? (m(), u(te, {
117
+ A.value ? (u(), m(ne, {
114
118
  key: 0,
115
119
  size: e.size,
116
- icon: r(ne),
120
+ icon: r(se),
117
121
  class: h(["right-2 cursor-pointer", r(a).icon]),
118
- onClick: n[0] || (n[0] = (ue) => r(f)())
122
+ onClick: n[0] || (n[0] = (de) => r(f)())
119
123
  }, null, 8, ["size", "icon", "class"])) : v("", !0)
120
124
  ])
121
125
  ]),
122
- r(x) ? v("", !0) : (m(), u(oe, {
126
+ r(x) ? v("", !0) : (u(), m(te, {
123
127
  key: 0,
124
128
  error: r(l),
125
129
  helper: e.helper,
@@ -133,5 +137,5 @@ const se = { class: "relative" }, le = ["id", "disabled", "max", "maxlength", "m
133
137
  }
134
138
  });
135
139
  export {
136
- ke as default
140
+ ze as default
137
141
  };
@@ -1,22 +1,22 @@
1
- import { defineComponent as r, computed as i, openBlock as p, createBlock as s, withCtx as o, createElementVNode as a, createVNode as m } from "vue";
1
+ import { defineComponent as r, computed as i, openBlock as s, createBlock as p, withCtx as o, createElementVNode as a, createVNode as m } from "vue";
2
2
  import l from "./Tooltip.vue.js";
3
3
  import _ from "../icon/Icon.vue.js";
4
4
  import { infoIcon as d } from "../../common/icons.js";
5
- const u = ["innerHTML"], f = {
5
+ const f = ["innerHTML"], u = {
6
6
  content: String,
7
7
  icon: String
8
8
  }, g = { name: "XToggleTip" }, y = /* @__PURE__ */ r({
9
9
  ...g,
10
- props: f,
10
+ props: u,
11
11
  setup(t) {
12
- const e = t, n = i(() => e.icon || d);
13
- return (c, T) => (p(), s(l, { placement: "auto" }, {
12
+ const n = t, e = i(() => n.icon || d);
13
+ return (c, T) => (s(), p(l, { position: "right" }, {
14
14
  tooltip: o(() => [
15
- a("div", { innerHTML: c.content }, null, 8, u)
15
+ a("div", { innerHTML: c.content }, null, 8, f)
16
16
  ]),
17
17
  default: o(() => [
18
18
  m(_, {
19
- icon: n.value,
19
+ icon: e.value,
20
20
  class: "text-secondary-500 dark:text-secondary-300 cursor-pointer"
21
21
  }, null, 8, ["icon"])
22
22
  ]),
@@ -1,28 +1,48 @@
1
1
  import type { ExtractPublicPropTypes, PropType } from 'vue';
2
- import { type Placement } from 'floating-vue';
2
+ import { type ThemeComponent } from '../../composables/useTheme';
3
3
  declare const tooltipProps: {
4
+ tag: {
5
+ type: StringConstructor;
6
+ default: string;
7
+ };
4
8
  tooltip: StringConstructor;
5
- placement: {
6
- type: PropType<Placement>;
9
+ disabled: BooleanConstructor;
10
+ position: {
11
+ type: PropType<TooltipPosition>;
7
12
  default: string;
8
13
  };
9
14
  };
10
- export type PopoverPlacement = Placement;
15
+ export type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';
11
16
  export type TooltipProps = ExtractPublicPropTypes<typeof tooltipProps>;
17
+ type InternalClasses = 'tooltip';
18
+ export interface TooltipTheme extends ThemeComponent<TooltipProps, InternalClasses> {
19
+ }
12
20
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
21
+ tag: {
22
+ type: StringConstructor;
23
+ default: string;
24
+ };
13
25
  tooltip: StringConstructor;
14
- placement: {
15
- type: PropType<Placement>;
26
+ disabled: BooleanConstructor;
27
+ position: {
28
+ type: PropType<TooltipPosition>;
16
29
  default: string;
17
30
  };
18
31
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
32
+ tag: {
33
+ type: StringConstructor;
34
+ default: string;
35
+ };
19
36
  tooltip: StringConstructor;
20
- placement: {
21
- type: PropType<Placement>;
37
+ disabled: BooleanConstructor;
38
+ position: {
39
+ type: PropType<TooltipPosition>;
22
40
  default: string;
23
41
  };
24
42
  }>> & Readonly<{}>, {
25
- placement: Placement;
43
+ disabled: boolean;
44
+ tag: string;
45
+ position: TooltipPosition;
26
46
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
27
47
  default?(_: {}): any;
28
48
  tooltip?(_: {}): any;