@lumx/vue 4.5.0 → 4.5.2-alpha.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/package.json CHANGED
@@ -31,11 +31,11 @@
31
31
  }
32
32
  },
33
33
  "sideEffects": false,
34
- "version": "4.5.0",
34
+ "version": "4.5.2-alpha.0",
35
35
  "dependencies": {
36
36
  "@floating-ui/vue": "^1.1.10",
37
- "@lumx/core": "^4.5.0",
38
- "@lumx/icons": "^4.5.0",
37
+ "@lumx/core": "^4.5.2-alpha.0",
38
+ "@lumx/icons": "^4.5.2-alpha.0",
39
39
  "@vueuse/core": "^14.1.0"
40
40
  },
41
41
  "peerDependencies": {
@@ -67,5 +67,6 @@
67
67
  "vitest": "^4.0.18",
68
68
  "vue": "^3.5.27",
69
69
  "vue-tsc": "^3.2.4"
70
- }
70
+ },
71
+ "stableVersion": "4.5.1"
71
72
  }
package/utils/index.d.ts CHANGED
@@ -3,3 +3,4 @@
3
3
  */
4
4
  export { Portal, type PortalProps, type PortalInit, PortalProvider, type PortalProviderProps } from './Portal';
5
5
  export { ClickAwayProvider, useClickAway } from './ClickAway';
6
+ export { useTheme, ThemeProvider } from './theme';
package/utils/index.js CHANGED
@@ -1,73 +1,23 @@
1
- import { defineComponent as m, inject as C, provide as p, onMounted as E, onBeforeUnmount as d, watchEffect as R } from "vue";
2
- import { P as k, a as x } from "../_internal/CCjQX5wE.js";
3
- const s = ["mousedown", "touchstart"];
4
- function v(n, o) {
5
- return !o.some((t) => n.some((e) => t?.contains(e)));
6
- }
7
- function u(n, o) {
8
- if (!o)
9
- return;
10
- const t = (e) => {
11
- const r = [e.composedPath?.()[0], e.target], a = n();
12
- v(r, a) && o(e);
13
- };
14
- return s.forEach((e) => document.addEventListener(e, t)), () => {
15
- s.forEach((e) => document.removeEventListener(e, t));
16
- };
17
- }
18
- const i = /* @__PURE__ */ Symbol("LumxClickAway"), y = /* @__PURE__ */ m((n, {
19
- slots: o
20
- }) => {
21
- const t = C(i, null), e = [], r = {
22
- childrenRefs: e,
23
- addRefs(...c) {
24
- for (const l of c) {
25
- const f = l.value;
26
- f && e.push(f);
27
- }
28
- t && (t.addRefs(...c), n.parentRef && t.addRefs(n.parentRef));
29
- }
30
- };
31
- p(i, r);
32
- let a;
33
- return E(() => {
34
- const c = n.childrenRefs.value;
35
- c && r.addRefs(...c), a = u(() => e, n.callback);
36
- }), d(() => {
37
- a?.();
38
- }), () => o.default?.();
39
- }, {
40
- name: "LumxClickAwayProvider",
41
- props: {
42
- callback: {
43
- type: [Function, Boolean, void 0],
44
- default: void 0
45
- },
46
- childrenRefs: {
47
- type: Object,
48
- required: !0
49
- },
50
- parentRef: {
51
- type: Object,
52
- default: void 0
53
- }
54
- }
55
- });
56
- function A({ callback: n, childrenRefs: o }) {
57
- let t;
58
- R(() => {
59
- t?.(), t = u(() => {
1
+ import { s } from "../_internal/DCsEMm-b.js";
2
+ import { C as P, P as v, a as w, T as d, u as C } from "../_internal/DCsEMm-b.js";
3
+ import { watchEffect as n, onBeforeUnmount as l } from "vue";
4
+ function u({ callback: t, childrenRefs: o }) {
5
+ let e;
6
+ n(() => {
7
+ e?.(), e = s(() => {
60
8
  const r = o.value;
61
9
  return r ? r.map((a) => a?.value).filter(Boolean) : [];
62
- }, n);
63
- }), d(() => {
64
- t?.();
10
+ }, t);
11
+ }), l(() => {
12
+ e?.();
65
13
  });
66
14
  }
67
15
  export {
68
- y as ClickAwayProvider,
69
- k as Portal,
70
- x as PortalProvider,
71
- A as useClickAway
16
+ P as ClickAwayProvider,
17
+ v as Portal,
18
+ w as PortalProvider,
19
+ d as ThemeProvider,
20
+ u as useClickAway,
21
+ C as useTheme
72
22
  };
73
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../lumx-core/src/js/utils/ClickAway/index.ts","../../src/utils/ClickAway/ClickAwayProvider.tsx","../../src/utils/ClickAway/useClickAway.ts"],"sourcesContent":["/**\n * Shared types and logic for ClickAway detection.\n *\n * ClickAway detects clicks outside a set of elements and triggers a callback.\n * The core logic (event listening + target checking) is framework-agnostic.\n * Framework-specific wrappers (React hook, Vue composable) and context providers\n * (React context, Vue provide/inject) are implemented in each framework package.\n */\n\nimport type { Falsy } from '@lumx/core/js/types';\n\n/** Event types that trigger click away detection. */\nexport const CLICK_AWAY_EVENT_TYPES = ['mousedown', 'touchstart'] as const;\n\n/** Callback triggered when a click away is detected. */\nexport type ClickAwayCallback = EventListener | Falsy;\n\n/**\n * Check if the click event targets are outside all the given elements.\n *\n * @param targets - The event target elements (from `event.target` and `event.composedPath()`).\n * @param elements - The elements considered \"inside\" the click away context.\n * @returns `true` if the click is outside all elements (i.e. a click away).\n */\nexport function isClickAway(targets: HTMLElement[], elements: HTMLElement[]): boolean {\n return !elements.some((element) => targets.some((target) => element?.contains(target)));\n}\n\n/**\n * Imperative setup for click away detection.\n * Adds mousedown/touchstart listeners on `document` and calls the callback when a click\n * occurs outside the elements returned by `getElements`.\n *\n * Note: when `getElements` returns an empty array, any click is considered a click away.\n * Callers should guard against calling `setupClickAway` when no refs are registered.\n *\n * @param getElements - Getter returning the current list of elements considered \"inside\".\n * @param callback - Callback to invoke on click away.\n * @returns A teardown function that removes the event listeners.\n */\nexport function setupClickAway(\n getElements: () => HTMLElement[],\n callback: ClickAwayCallback,\n): (() => void) | undefined {\n if (!callback) {\n return undefined;\n }\n\n const listener: EventListener = (evt) => {\n const targets = [evt.composedPath?.()[0], evt.target] as HTMLElement[];\n const elements = getElements();\n if (isClickAway(targets, elements)) {\n callback(evt);\n }\n };\n\n CLICK_AWAY_EVENT_TYPES.forEach((evtType) => document.addEventListener(evtType, listener));\n return () => {\n CLICK_AWAY_EVENT_TYPES.forEach((evtType) => document.removeEventListener(evtType, listener));\n };\n}\n","import {\n defineComponent,\n inject,\n onBeforeUnmount,\n onMounted,\n provide,\n type InjectionKey,\n type PropType,\n type Ref,\n} from 'vue';\nimport { setupClickAway, type ClickAwayCallback } from '@lumx/core/js/utils/ClickAway';\n\ninterface ContextValue {\n childrenRefs: HTMLElement[];\n addRefs(...newChildrenRefs: Array<Ref<HTMLElement | undefined>>): void;\n}\n\nexport const CLICK_AWAY_KEY: InjectionKey<ContextValue> = Symbol('LumxClickAway');\n\n/**\n * Component combining click away detection with Vue's provide/inject to hook into the component tree\n * and take into account both the DOM tree and the component tree to detect click away.\n */\nexport const ClickAwayProvider = defineComponent(\n (\n props: {\n callback: ClickAwayCallback;\n childrenRefs: Ref<Array<Ref<HTMLElement | undefined>>>;\n parentRef?: Ref<HTMLElement | undefined>;\n },\n { slots },\n ) => {\n const parentContext = inject(CLICK_AWAY_KEY, null);\n\n const contextChildrenRefs: HTMLElement[] = [];\n\n const currentContext: ContextValue = {\n childrenRefs: contextChildrenRefs,\n addRefs(...newChildrenRefs) {\n for (const newRef of newChildrenRefs) {\n const el = newRef.value;\n if (el) {\n contextChildrenRefs.push(el);\n }\n }\n if (parentContext) {\n parentContext.addRefs(...newChildrenRefs);\n if (props.parentRef) {\n parentContext.addRefs(props.parentRef);\n }\n }\n },\n };\n\n provide(CLICK_AWAY_KEY, currentContext);\n\n let teardown: (() => void) | undefined;\n\n onMounted(() => {\n const refs = props.childrenRefs.value;\n if (refs) {\n currentContext.addRefs(...refs);\n }\n\n // Setup click away using the context's collected refs directly\n teardown = setupClickAway(() => contextChildrenRefs, props.callback);\n });\n\n onBeforeUnmount(() => {\n teardown?.();\n });\n\n return () => slots.default?.();\n },\n {\n name: 'LumxClickAwayProvider',\n props: {\n callback: {\n type: [Function, Boolean, undefined] as PropType<ClickAwayCallback>,\n default: undefined,\n },\n childrenRefs: {\n type: Object as PropType<Ref<Array<Ref<HTMLElement | undefined>>>>,\n required: true,\n },\n parentRef: {\n type: Object as PropType<Ref<HTMLElement | undefined>>,\n default: undefined,\n },\n },\n },\n);\n","import { onBeforeUnmount, watchEffect, type Ref } from 'vue';\nimport { setupClickAway, type ClickAwayCallback } from '@lumx/core/js/utils/ClickAway';\n\nexport interface ClickAwayParameters {\n /**\n * A callback function to call when the user clicks away from the elements.\n */\n callback: ClickAwayCallback;\n /**\n * Elements considered within the click away context (clicking outside them will trigger the click away callback).\n */\n childrenRefs: Ref<Array<Ref<HTMLElement | undefined>>>;\n}\n\n/**\n * Listen to clicks away from the given elements and callback the passed in function.\n *\n * Warning: If you need to detect click away on nested Vue portals, please use the `ClickAwayProvider` component.\n */\nexport function useClickAway({ callback, childrenRefs }: ClickAwayParameters): void {\n let teardown: (() => void) | undefined;\n\n watchEffect(() => {\n // Clean up previous listener\n teardown?.();\n\n const getElements = () => {\n const refs = childrenRefs.value;\n if (!refs) return [];\n return refs.map((ref) => ref?.value).filter(Boolean) as HTMLElement[];\n };\n\n teardown = setupClickAway(getElements, callback);\n });\n\n onBeforeUnmount(() => {\n teardown?.();\n });\n}\n"],"names":["CLICK_AWAY_EVENT_TYPES","isClickAway","targets","elements","element","target","setupClickAway","getElements","callback","listener","evt","evtType","CLICK_AWAY_KEY","Symbol","ClickAwayProvider","props","slots","parentContext","inject","contextChildrenRefs","currentContext","childrenRefs","addRefs","newChildrenRefs","newRef","el","value","push","parentRef","provide","teardown","onMounted","refs","onBeforeUnmount","default","name","type","Function","Boolean","undefined","Object","required","useClickAway","watchEffect","ref"],"mappings":";;AAYO,MAAMA,IAAyB,CAAC,aAAa,YAAY;AAYzD,SAASC,EAAYC,GAAwBC,GAAkC;AAClF,SAAO,CAACA,EAAS,KAAK,CAACC,MAAYF,EAAQ,KAAK,CAACG,MAAWD,GAAS,SAASC,CAAM,CAAC,CAAC;AAC1F;AAcO,SAASC,EACZC,GACAC,GACwB;AACxB,MAAI,CAACA;AACD;AAGJ,QAAMC,IAA0B,CAACC,MAAQ;AACrC,UAAMR,IAAU,CAACQ,EAAI,eAAA,EAAiB,CAAC,GAAGA,EAAI,MAAM,GAC9CP,IAAWI,EAAA;AACjB,IAAIN,EAAYC,GAASC,CAAQ,KAC7BK,EAASE,CAAG;AAAA,EAEpB;AAEA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SAASG,EAAa,EAAE,UAAAlC,GAAU,cAAAa,KAA2C;AAChF,MAAIS;AAEJ,EAAAa,EAAY,MAAM;AAEd,IAAAb,IAAA,GAQAA,IAAWxB,EANS,MAAM;AACtB,YAAM0B,IAAOX,EAAa;AAC1B,aAAKW,IACEA,EAAK,IAAI,CAACY,MAAQA,GAAK,KAAK,EAAE,OAAO,OAAO,IADjC,CAAA;AAAA,IAEtB,GAEuCpC,CAAQ;AAAA,EACnD,CAAC,GAEDyB,EAAgB,MAAM;AAClB,IAAAH,IAAA;AAAA,EACJ,CAAC;AACL;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/utils/ClickAway/useClickAway.ts"],"sourcesContent":["import { onBeforeUnmount, watchEffect, type Ref } from 'vue';\nimport { setupClickAway, type ClickAwayCallback } from '@lumx/core/js/utils/ClickAway';\n\nexport interface ClickAwayParameters {\n /**\n * A callback function to call when the user clicks away from the elements.\n */\n callback: ClickAwayCallback;\n /**\n * Elements considered within the click away context (clicking outside them will trigger the click away callback).\n */\n childrenRefs: Ref<Array<Ref<HTMLElement | undefined>>>;\n}\n\n/**\n * Listen to clicks away from the given elements and callback the passed in function.\n *\n * Warning: If you need to detect click away on nested Vue portals, please use the `ClickAwayProvider` component.\n */\nexport function useClickAway({ callback, childrenRefs }: ClickAwayParameters): void {\n let teardown: (() => void) | undefined;\n\n watchEffect(() => {\n // Clean up previous listener\n teardown?.();\n\n const getElements = () => {\n const refs = childrenRefs.value;\n if (!refs) return [];\n return refs.map((ref) => ref?.value).filter(Boolean) as HTMLElement[];\n };\n\n teardown = setupClickAway(getElements, callback);\n });\n\n onBeforeUnmount(() => {\n teardown?.();\n });\n}\n"],"names":["useClickAway","callback","childrenRefs","teardown","watchEffect","setupClickAway","refs","ref","onBeforeUnmount"],"mappings":";;;AAmBO,SAASA,EAAa,EAAE,UAAAC,GAAU,cAAAC,KAA2C;AAChF,MAAIC;AAEJ,EAAAC,EAAY,MAAM;AAEd,IAAAD,IAAA,GAQAA,IAAWE,EANS,MAAM;AACtB,YAAMC,IAAOJ,EAAa;AAC1B,aAAKI,IACEA,EAAK,IAAI,CAACC,MAAQA,GAAK,KAAK,EAAE,OAAO,OAAO,IADjC,CAAA;AAAA,IAEtB,GAEuCN,CAAQ;AAAA,EACnD,CAAC,GAEDO,EAAgB,MAAM;AAClB,IAAAL,IAAA;AAAA,EACJ,CAAC;AACL;"}
@@ -0,0 +1,10 @@
1
+ import { Theme } from '@lumx/core/js/constants';
2
+ /**
3
+ * ThemeProvider for Vue: wraps children with `provide('theme', value)` for theme isolation.
4
+ * Vue's `provide()` requires a component boundary, so this is a component.
5
+ */
6
+ export declare const ThemeProvider: import('vue').DefineSetupFnComponent<{
7
+ value: Theme | undefined;
8
+ }, {}, {}, {
9
+ value: Theme | undefined;
10
+ } & {}, import('vue').PublicProps>;
@@ -0,0 +1,3 @@
1
+ export { useTheme, type UseTheme } from './useTheme';
2
+ export { ThemeProvider } from './ThemeProvider';
3
+ export { ResetTheme } from './ResetTheme';
@@ -0,0 +1,10 @@
1
+ import { ComputedRef } from 'vue';
2
+ import { Theme } from '@lumx/core/js/constants';
3
+ export interface UseTheme {
4
+ defaultTheme?: Theme;
5
+ }
6
+ /**
7
+ * Retrieves the globally applied theme.
8
+ * @returns computed theme value (auto-updates when the provided theme changes)
9
+ */
10
+ export declare function useTheme(options?: UseTheme): ComputedRef<Theme | undefined>;
@@ -1,47 +0,0 @@
1
- import { defineComponent as l, provide as i, inject as d, ref as f, watch as s, onBeforeUnmount as p, createVNode as P, Teleport as m, isVNode as b } from "vue";
2
- const u = /* @__PURE__ */ Symbol("LumxPortal"), v = () => ({
3
- container: "body"
4
- }), j = /* @__PURE__ */ l((e, {
5
- slots: n
6
- }) => (i(u, e.value), () => n.default?.()), {
7
- name: "LumxPortalProvider",
8
- props: {
9
- value: {
10
- type: Function,
11
- required: !0
12
- }
13
- }
14
- });
15
- function y(e) {
16
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !b(e);
17
- }
18
- const L = /* @__PURE__ */ l((e, {
19
- slots: n
20
- }) => {
21
- const c = d(u, v), t = f(null), r = () => {
22
- e.enabled ? t.value = c() : t.value = null;
23
- };
24
- return r(), s(() => e.enabled, r), p(() => {
25
- t.value?.teardown?.();
26
- }), () => {
27
- const o = n.default?.(), a = t.value?.container;
28
- return !e.enabled || !a ? o : P(m, {
29
- to: a
30
- }, y(o) ? o : {
31
- default: () => [o]
32
- });
33
- };
34
- }, {
35
- name: "LumxPortal",
36
- props: {
37
- enabled: {
38
- type: Boolean,
39
- default: !0
40
- }
41
- }
42
- });
43
- export {
44
- L as P,
45
- j as a
46
- };
47
- //# sourceMappingURL=CCjQX5wE.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CCjQX5wE.js","sources":["../../src/utils/Portal/PortalProvider.tsx","../../src/utils/Portal/Portal.tsx"],"sourcesContent":["import { defineComponent, provide, type PropType, type InjectionKey } from 'vue';\n\nexport type { PortalInit, PortalProviderProps } from '@lumx/core/js/utils/Portal';\nimport type { PortalInit, PortalProviderProps } from '@lumx/core/js/utils/Portal';\n\nexport const PORTAL_KEY: InjectionKey<PortalInit> = Symbol('LumxPortal');\n\nexport const defaultPortalInit: PortalInit = () => ({ container: 'body' });\n\n/**\n * Customize where <Portal> wrapped elements render (tooltip, popover, dialog, etc.)\n */\nexport const PortalProvider = defineComponent(\n (props: PortalProviderProps, { slots }) => {\n provide(PORTAL_KEY, props.value);\n return () => slots.default?.();\n },\n {\n name: 'LumxPortalProvider',\n props: {\n value: {\n type: Function as PropType<PortalInit>,\n required: true,\n },\n },\n },\n);\n","import { defineComponent, inject, onBeforeUnmount, Teleport, ref, watch } from 'vue';\nimport { PORTAL_KEY, defaultPortalInit } from './PortalProvider';\n\nexport type { PortalProps } from '@lumx/core/js/utils/Portal';\nimport type { PortalProps } from '@lumx/core/js/utils/Portal';\n\n/**\n * Render children in a portal outside the current DOM position\n * (defaults to `document.body` but can be customized with the PortalProvider)\n */\nexport const Portal = defineComponent(\n (props: PortalProps, { slots }) => {\n const portalInit = inject(PORTAL_KEY, defaultPortalInit);\n const context = ref<ReturnType<typeof portalInit> | null>(null);\n\n // Initialize portal context when enabled\n const initializePortal = () => {\n if (props.enabled) {\n context.value = portalInit();\n } else {\n context.value = null;\n }\n };\n\n // Initialize on mount and when enabled changes\n initializePortal();\n watch(() => props.enabled, initializePortal);\n\n // Register teardown on unmount\n onBeforeUnmount(() => {\n context.value?.teardown?.();\n });\n\n return () => {\n const content = slots.default?.();\n const container = context.value?.container;\n\n // If disabled or no container, render inline\n if (!props.enabled || !container) {\n return content;\n }\n\n // Render in portal using Teleport\n return <Teleport to={container}>{content}</Teleport>;\n };\n },\n {\n name: 'LumxPortal',\n props: {\n enabled: {\n type: Boolean,\n default: true,\n },\n },\n },\n);\n"],"names":["PORTAL_KEY","Symbol","defaultPortalInit","container","PortalProvider","props","slots","provide","value","default","name","type","Function","required","_isSlot","s","Object","prototype","toString","call","_isVNode","Portal","portalInit","inject","context","ref","initializePortal","enabled","watch","onBeforeUnmount","teardown","content","_createVNode","Teleport","Boolean"],"mappings":";AAKO,MAAMA,IAAuCC,uBAAO,YAAY,GAE1DC,IAAgCA,OAAO;AAAA,EAAEC,WAAW;AAAO,IAK3DC,sBACT,CAACC,GAA4B;AAAA,EAAEC,OAAAA;AAAM,OACjCC,EAAQP,GAAYK,EAAMG,KAAK,GACxB,MAAMF,EAAMG,UAAO,IAE9B;AAAA,EACIC,MAAM;AAAA,EACNL,OAAO;AAAA,IACHG,OAAO;AAAA,MACHG,MAAMC;AAAAA,MACNC,UAAU;AAAA,IACd;AAAA,EACJ;AACJ,CACJ;ACzBiE,SAAAC,EAAAC,GAAA;AAAA,SAAA,OAAAA,KAAA,cAAAC,OAAAC,UAAAC,SAAAC,KAAAJ,CAAA,MAAA,qBAAA,CAAAK,EAAAL,CAAA;AAAA;MASpDM,sBACT,CAAChB,GAAoB;AAAA,EAAEC,OAAAA;AAAM,MAAM;AAC/B,QAAMgB,IAAaC,E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