@lumx/vue 4.10.0 → 4.11.0-alpha.1

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 (49) hide show
  1. package/_internal/{BqMObS2T.js → BiLpoFMC.js} +49 -45
  2. package/_internal/BiLpoFMC.js.map +1 -0
  3. package/components/alert-dialog/AlertDialog.d.ts +44 -0
  4. package/components/alert-dialog/AlertDialog.stories.d.ts +104 -0
  5. package/components/alert-dialog/index.d.ts +1 -0
  6. package/components/avatar/Avatar.d.ts +1 -1
  7. package/components/chip/SelectionChipGroup.d.ts +30 -0
  8. package/components/chip/SelectionChipGroup.stories.d.ts +66 -0
  9. package/components/chip/Stories/CustomRender.vue.d.ts +2 -0
  10. package/components/chip/Stories/InTextField.vue.d.ts +2 -0
  11. package/components/chip/index.d.ts +1 -0
  12. package/components/combobox/Combobox.test.stories.d.ts +22 -0
  13. package/components/combobox/ComboboxInput.d.ts +30 -6
  14. package/components/combobox/ComboboxList.d.ts +1 -1
  15. package/components/combobox/ComboboxOption.d.ts +1 -1
  16. package/components/combobox/ComboboxOptionAction.d.ts +1 -1
  17. package/components/combobox/ComboboxPopover.d.ts +2 -2
  18. package/components/combobox/ComboboxSection.d.ts +1 -1
  19. package/components/combobox/index.d.ts +8 -7
  20. package/components/dialog/Dialog.d.ts +66 -0
  21. package/components/dialog/Dialog.stories.d.ts +106 -0
  22. package/components/dialog/index.d.ts +2 -0
  23. package/components/expansion-panel/ExpansionPanel.d.ts +1 -1
  24. package/components/flex-box/FlexBox.d.ts +0 -12
  25. package/components/generic-block/GenericBlock.d.ts +1 -1
  26. package/components/list/ListItem.d.ts +1 -1
  27. package/components/list/ListSection.d.ts +1 -1
  28. package/components/popover/Popover.d.ts +1 -1
  29. package/components/popover-dialog/PopoverDialog.d.ts +1 -1
  30. package/components/popover-dialog/PopoverDialog.test.stories.d.ts +1 -1
  31. package/components/thumbnail/Thumbnail.d.ts +1 -1
  32. package/components/toolbar/Toolbar.d.ts +1 -1
  33. package/composables/useAttrFallback.d.ts +28 -0
  34. package/composables/useClassName.d.ts +15 -0
  35. package/composables/useDisableBodyScroll.d.ts +8 -0
  36. package/composables/useRovingTabIndexContainer.d.ts +8 -1
  37. package/composables/useTransitionVisibility.d.ts +11 -0
  38. package/index.d.ts +2 -0
  39. package/index.js +6151 -5491
  40. package/index.js.map +1 -1
  41. package/package.json +5 -4
  42. package/utils/InfiniteScroll/InfiniteScroll.d.ts +7 -0
  43. package/utils/InfiniteScroll/InfiniteScroll.test.stories.d.ts +39 -0
  44. package/utils/InfiniteScroll/index.d.ts +1 -0
  45. package/utils/index.d.ts +1 -0
  46. package/utils/index.js +55 -18
  47. package/utils/index.js.map +1 -1
  48. package/utils/isComponentType.d.ts +6 -0
  49. package/_internal/BqMObS2T.js.map +0 -1
@@ -1,23 +1,13 @@
1
- import { inject as d, computed as p, unref as y, defineComponent as i, provide as f, ref as P, watch as b, onBeforeUnmount as v, createVNode as C, Teleport as R, isVNode as x, onMounted as L } from "vue";
1
+ import { defineComponent as i, provide as d, inject as s, ref as y, watch as P, onBeforeUnmount as p, createVNode as b, Teleport as C, isVNode as R, onMounted as x, computed as v, unref as L } from "vue";
2
2
  import { Theme as T } from "@lumx/core/js/constants";
3
- function S(e = { defaultTheme: T.light }) {
4
- const { defaultTheme: n } = e, o = d("theme", void 0);
5
- return p(() => y(o) || n);
6
- }
7
- const g = i(
8
- (e, { slots: n }) => (f(
9
- "theme",
10
- p(() => e.value)
11
- ), () => n.default?.()),
12
- {
13
- name: "LumxThemeProvider",
14
- props: { value: { type: String, default: void 0 } }
15
- }
3
+ const O = () => (...e) => e.reduce(
4
+ (n, o) => (n[o] = { required: !1 }, n),
5
+ {}
16
6
  ), h = /* @__PURE__ */ Symbol("LumxPortal"), A = () => ({
17
7
  container: "body"
18
- }), N = /* @__PURE__ */ i((e, {
8
+ }), S = /* @__PURE__ */ i((e, {
19
9
  slots: n
20
- }) => (f(h, e.value), () => n.default?.()), {
10
+ }) => (d(h, e.value), () => n.default?.()), {
21
11
  name: "LumxPortalProvider",
22
12
  props: {
23
13
  value: {
@@ -27,19 +17,19 @@ const g = i(
27
17
  }
28
18
  });
29
19
  function w(e) {
30
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !x(e);
20
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !R(e);
31
21
  }
32
- const O = /* @__PURE__ */ i((e, {
22
+ const g = /* @__PURE__ */ i((e, {
33
23
  slots: n
34
24
  }) => {
35
- const o = d(h, A), t = P(null), c = () => {
25
+ const o = s(h, A), t = y(null), u = () => {
36
26
  e.enabled ? t.value = o() : t.value = null;
37
27
  };
38
- return c(), b(() => e.enabled, c), v(() => {
28
+ return u(), P(() => e.enabled, u), p(() => {
39
29
  t.value?.teardown?.();
40
30
  }), () => {
41
31
  const a = n.default?.(), r = t.value?.container;
42
- return !e.enabled || !r ? a : C(R, {
32
+ return !e.enabled || !r ? a : b(C, {
43
33
  to: r
44
34
  }, w(a) ? a : {
45
35
  default: () => [a]
@@ -53,43 +43,43 @@ const O = /* @__PURE__ */ i((e, {
53
43
  default: !0
54
44
  }
55
45
  }
56
- }), s = ["mousedown", "touchstart"];
46
+ }), f = ["mousedown", "touchstart"];
57
47
  function E(e, n) {
58
48
  return !n.some((o) => o instanceof Node && e.some((t) => o.contains(t)));
59
49
  }
60
- function j(e, n) {
50
+ function k(e, n) {
61
51
  if (!n)
62
52
  return;
63
53
  const o = (t) => {
64
- const c = [t.composedPath?.()[0], t.target].filter((r) => r instanceof Node), a = e();
65
- E(c, a) && n(t);
54
+ const u = [t.composedPath?.()[0], t.target].filter((r) => r instanceof Node), a = e();
55
+ E(u, a) && n(t);
66
56
  };
67
- return s.forEach((t) => document.addEventListener(t, o)), () => {
68
- s.forEach((t) => document.removeEventListener(t, o));
57
+ return f.forEach((t) => document.addEventListener(t, o)), () => {
58
+ f.forEach((t) => document.removeEventListener(t, o));
69
59
  };
70
60
  }
71
- const m = /* @__PURE__ */ Symbol("LumxClickAway"), Y = /* @__PURE__ */ i((e, {
61
+ const m = /* @__PURE__ */ Symbol("LumxClickAway"), N = /* @__PURE__ */ i((e, {
72
62
  slots: n
73
63
  }) => {
74
- const o = d(m, null), t = [], c = {
64
+ const o = s(m, null), t = [], u = {
75
65
  childrenRefs: t,
76
66
  addRefs(...r) {
77
67
  for (const l of r) {
78
- const u = l.value;
79
- u && t.push(u);
68
+ const c = l.value;
69
+ c && t.push(c);
80
70
  }
81
71
  o && (o.addRefs(...r), e.parentRef && o.addRefs(e.parentRef));
82
72
  }
83
73
  };
84
- f(m, c);
74
+ d(m, u);
85
75
  let a;
86
- return L(() => {
76
+ return x(() => {
87
77
  const r = e.childrenRefs.value;
88
- r && c.addRefs(...r), a = j(() => t, (l) => {
89
- const u = e.callback;
90
- typeof u == "function" && u(l);
78
+ r && u.addRefs(...r), a = k(() => t, (l) => {
79
+ const c = e.callback;
80
+ typeof c == "function" && c(l);
91
81
  });
92
- }), v(() => {
82
+ }), p(() => {
93
83
  a?.();
94
84
  }), () => n.default?.();
95
85
  }, {
@@ -108,13 +98,27 @@ const m = /* @__PURE__ */ Symbol("LumxClickAway"), Y = /* @__PURE__ */ i((e, {
108
98
  default: void 0
109
99
  }
110
100
  }
111
- });
101
+ }), Y = i(
102
+ (e, { slots: n }) => (d(
103
+ "theme",
104
+ v(() => e.value)
105
+ ), () => n.default?.()),
106
+ {
107
+ name: "LumxThemeProvider",
108
+ props: { value: { type: String, default: void 0 } }
109
+ }
110
+ );
111
+ function I(e = { defaultTheme: T.light }) {
112
+ const { defaultTheme: n } = e, o = s("theme", void 0);
113
+ return v(() => L(o) || n);
114
+ }
112
115
  export {
113
- Y as C,
114
- O as P,
115
- g as T,
116
- N as a,
117
- j as s,
118
- S as u
116
+ N as C,
117
+ g as P,
118
+ Y as T,
119
+ S as a,
120
+ O as k,
121
+ k as s,
122
+ I as u
119
123
  };
120
- //# sourceMappingURL=BqMObS2T.js.map
124
+ //# sourceMappingURL=BiLpoFMC.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BiLpoFMC.js","sources":["../../src/utils/VueToJSX.ts","../../src/utils/Portal/PortalProvider.tsx","../../src/utils/Portal/Portal.tsx","../../../lumx-core/src/js/utils/ClickAway/index.ts","../../src/utils/ClickAway/ClickAwayProvider.tsx","../../src/utils/theme/ThemeProvider.ts","../../src/utils/theme/useTheme.ts"],"sourcesContent":["import { PropsToOverride } from '@lumx/core/js/types';\n/**\n * Props interface for components wrapped with VueToJSX.\n * It omits JSX-specific props like `children` and `className` and adds Vue's `class`.\n *\n * @template Props - The base props type\n * @template OmitProps - Additional props to omit beyond the defaults (children, className, ref)\n */\nexport type VueToJSXProps<Props, OmitProps extends keyof Props = never> = Omit<\n Props,\n PropsToOverride | 'children' | 'className' | OmitProps\n> & {\n /** Class name forwarded to the root element of the component. */\n class?: string;\n};\n\n/**\n * Hyphenated aria-* prop keys that must NOT be declared as Vue component props.\n * When declared, Vue normalizes them to camelCase (e.g. aria-haspopup → ariaHaspopup),\n * which breaks hyphenated key destructuring in core component templates.\n * By excluding them from props, they flow through `attrs` with their original hyphenated keys.\n */\nexport type HyphenatedAriaProps = 'aria-expanded' | 'aria-haspopup' | 'aria-label' | 'aria-pressed';\n\nexport const keysOf = <T>() => {\n return <K extends readonly (keyof T)[]>(\n ...keys: [keyof T] extends [K[number]]\n ? K\n : [Error: '❌ Missing keys in your list:', Exclude<keyof T, K[number]>]\n ) => {\n // Return an object with all props marked as optional (not required)\n // This ensures Vue's type system correctly infers props as optional\n return keys.reduce(\n (acc, key) => {\n acc[key as K[number]] = { required: false };\n return acc;\n },\n {} as Record<K[number], { required: false }>,\n );\n };\n};\n","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","/**\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) => element instanceof Node && 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].filter((t): t is HTMLElement => t instanceof Node);\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 a closure that always reads the latest callback prop.\n // This handles transitions like closeMode=\"hide\" where the callback changes\n // between open (handleClose) and closed (undefined) without re-creating the listener.\n teardown = setupClickAway(\n () => contextChildrenRefs,\n (event) => {\n const cb = props.callback;\n if (typeof cb === 'function') cb(event);\n },\n );\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 { computed, defineComponent, provide, type PropType } from 'vue';\nimport type { Theme } from '@lumx/core/js/constants';\n\n/**\n * ThemeProvider for Vue: wraps children with `provide('theme', value)` for theme isolation.\n * Vue's `provide()` requires a component boundary, so this is a component.\n */\nexport const ThemeProvider = defineComponent(\n (props: { value: Theme | undefined }, { slots }) => {\n provide(\n 'theme',\n computed(() => props.value),\n );\n return () => slots.default?.();\n },\n {\n name: 'LumxThemeProvider',\n props: { value: { type: String as PropType<Theme | undefined>, default: undefined } },\n },\n);\n","import { type ComputedRef, type Ref, computed, inject, unref } from 'vue';\n\nimport { Theme } from '@lumx/core/js/constants';\n\nexport interface UseTheme {\n defaultTheme?: Theme;\n}\n/**\n * Retrieves the globally applied theme.\n * @returns computed theme value (auto-updates when the provided theme changes)\n */\nexport function useTheme(options: UseTheme = { defaultTheme: Theme.light }): ComputedRef<Theme | undefined> {\n const { defaultTheme } = options;\n const injected = inject<Theme | Ref<Theme | undefined> | undefined>('theme', undefined);\n return computed(() => unref(injected) || defaultTheme);\n}\n"],"names":["keysOf","keys","acc","key","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","CLICK_AWAY_EVENT_TYPES","isClickAway","targets","elements","element","target","setupClickAway","getElements","callback","listener","evt","t","evtType","CLICK_AWAY_KEY","ClickAwayProvider","parentContext","contextChildrenRefs","currentContext","childrenRefs","addRefs","newChildrenRefs","newRef","el","push","parentRef","onMounted","refs","event","cb","undefined","ThemeProvider","defineComponent","computed","useTheme","options","Theme","defaultTheme","injected","unref"],"mappings":";;AAwBO,MAAMA,IAAS,MACX,IACAC,MAMIA,EAAK;AAAA,EACR,CAACC,GAAKC,OACFD,EAAIC,CAAgB,IAAI,EAAE,UAAU,GAAA,GAC7BD;AAAA,EAEX,CAAA;AAAC,GChCAE,IAAuCC,uBAAO,YAAY,GAE1DC,IAAgCA,OAAO;AAAA,EAAEC,WAAW;AAAO,IAK3DC,sBACT,CAACC,GAA4B;AAAA,EAAEC,OAAAA;AAAM,OACjCC,EAAQP,GAAYK,EAAMG,KAAK,GACxB,MA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,EAAMsC;AACjB,MAAI,OAAOoB,KAAO,cAAYA,EAAGD,CAAK;AAAA,IAC1C,CACJ;AAAA,EACJ,CAAC,GAEDjC,EAAgB,MAAM;AAClBC,IAAAA,IAAQ;AAAA,EACZ,CAAC,GAEM,MAAMxB,EAAMG,UAAO;AAC9B,GACA;AAAA,EACIC,MAAM;AAAA,EACNL,OAAO;AAAA,IACHsC,UAAU;AAAA,MACNhC,MAAM,CAACC,UAAUsB,SAAS8B,MAAS;AAAA,MACnCvD,SAASuD;AAAAA;IAEbX,cAAc;AAAA,MACV1C,MAAMK;AAAAA,MACNH,UAAU;AAAA;IAEd8C,WAAW;AAAA,MACPhD,MAAMK;AAAAA,MACNP,SAASuD;AAAAA,IACb;AAAA,EACJ;AACJ,CACJ,GC5FaC,IAAgBC;AAAA,EACzB,CAAC7D,GAAqC,EAAE,OAAAC,SACpCC;AAAA,IACI;AAAA,IACA4D,EAAS,MAAM9D,EAAM,KAAK;AAAA,EAAA,GAEvB,MAAMC,EAAM,UAAA;AAAA,EAEvB;AAAA,IACI,MAAM;AAAA,IACN,OAAO,EAAE,OAAO,EAAE,MAAM,QAAuC,SAAS,SAAU;AAAA,EAAE;AAE5F;ACRO,SAAS8D,EAASC,IAAoB,EAAE,cAAcC,EAAM,SAAyC;AACxG,QAAM,EAAE,cAAAC,MAAiBF,GACnBG,IAAWjD,EAAmD,SAAS,MAAS;AACtF,SAAO4C,EAAS,MAAMM,EAAMD,CAAQ,KAAKD,CAAY;AACzD;"}
@@ -0,0 +1,44 @@
1
+ import { BaseAlertDialogProps } from '@lumx/core/js/components/AlertDialog';
2
+ import { DialogSizes } from '@lumx/core/js/components/Dialog';
3
+ import { GenericProps } from '@lumx/core/js/types';
4
+ type ButtonActionProps = {
5
+ label: string;
6
+ onClick?: () => void;
7
+ [key: string]: any;
8
+ };
9
+ export interface AlertDialogProps extends Pick<BaseAlertDialogProps, 'kind' | 'title'> {
10
+ /** Additional class name. */
11
+ class?: string;
12
+ /** Size variant. */
13
+ size?: DialogSizes;
14
+ /** Whether the dialog is open. */
15
+ isOpen?: boolean;
16
+ /** Reference to the parent element that triggered modal opening. */
17
+ parentElement?: HTMLElement;
18
+ /** Additional props for the dialog container element. */
19
+ dialogProps?: GenericProps;
20
+ /** Props forwarded to the confirm button. */
21
+ confirmProps: ButtonActionProps;
22
+ /** Props forwarded to the cancel button. Will not render a cancel button if undefined. */
23
+ cancelProps?: ButtonActionProps;
24
+ /** Unique identifier for the dialog. Generated automatically if not provided. */
25
+ id?: string;
26
+ }
27
+ export declare const emitSchema: {
28
+ close: () => boolean;
29
+ };
30
+ /**
31
+ * AlertDialog component.
32
+ *
33
+ * An alert dialog is a modal dialog that interrupts the user's workflow to
34
+ * communicate an important message and acquire a response.
35
+ *
36
+ * It should not have a complex content.
37
+ * Children of this component should only be strings, paragraphs or links.
38
+ */
39
+ declare const AlertDialog: import('vue').DefineSetupFnComponent<AlertDialogProps, {
40
+ close: () => boolean;
41
+ }, {}, AlertDialogProps & {
42
+ onClose?: (() => any) | undefined;
43
+ }, import('vue').PublicProps>;
44
+ export default AlertDialog;
@@ -0,0 +1,104 @@
1
+ declare const _default: {
2
+ component: any;
3
+ render: any;
4
+ args: {
5
+ 'confirmProps.label': string;
6
+ confirmProps?: any;
7
+ cancelProps?: any;
8
+ dialogProps?: any;
9
+ ref?: import('../..').CommonRef;
10
+ cancelButtonRef?: import('../..').CommonRef;
11
+ confirmationButtonRef?: import('../..').CommonRef;
12
+ DescriptionElement?: any;
13
+ Dialog?: any;
14
+ Toolbar?: any;
15
+ Button?: any;
16
+ Icon?: any;
17
+ id?: string | undefined;
18
+ focusElement?: any;
19
+ className?: string | undefined;
20
+ kind?: import('../..').Kind | undefined;
21
+ title?: string | undefined;
22
+ children?: import('react').ReactNode;
23
+ size?: import('../..').DialogSizes | undefined;
24
+ };
25
+ argTypes: {
26
+ size: {
27
+ control: {
28
+ type: "select" | "inline-radio";
29
+ };
30
+ options: ("big" | "tiny" | "regular" | "huge")[];
31
+ mapping: Record<string, "big" | "tiny" | "regular" | "huge"> | undefined;
32
+ };
33
+ kind: {
34
+ control: {
35
+ type: "select" | "inline-radio";
36
+ };
37
+ options: ("info" | "success" | "warning" | "error")[];
38
+ mapping: Record<string, "info" | "success" | "warning" | "error"> | undefined;
39
+ };
40
+ 'confirmProps.onClick': {
41
+ action: boolean;
42
+ };
43
+ };
44
+ parameters: {
45
+ chromatic: {
46
+ pauseAnimationAtEnd: boolean;
47
+ delay: number;
48
+ };
49
+ };
50
+ decorators: ((story: any, context: any) => any)[];
51
+ title: string;
52
+ };
53
+ export default _default;
54
+ export declare const DefaultKind: {
55
+ args: {
56
+ title: string;
57
+ children: string;
58
+ };
59
+ };
60
+ export declare const Warning: {
61
+ args: {
62
+ kind: "warning";
63
+ title: string;
64
+ children: string;
65
+ };
66
+ };
67
+ export declare const Success: {
68
+ args: {
69
+ kind: "success";
70
+ title: string;
71
+ children: string;
72
+ };
73
+ };
74
+ export declare const Error: {
75
+ args: {
76
+ kind: "error";
77
+ title: string;
78
+ children: string;
79
+ };
80
+ };
81
+ export declare const WithCancel: {
82
+ argTypes: {
83
+ 'cancelProps.onClick': {
84
+ action: boolean;
85
+ };
86
+ };
87
+ args: {
88
+ title: string;
89
+ 'cancelProps.label': string;
90
+ children: string;
91
+ };
92
+ };
93
+ export declare const RichDescription: {
94
+ argTypes: {
95
+ children: {
96
+ control: boolean;
97
+ };
98
+ };
99
+ args: {
100
+ title: string;
101
+ children: string;
102
+ };
103
+ render: ({ children, ...args }: any) => any;
104
+ };
@@ -0,0 +1 @@
1
+ export { default as AlertDialog, type AlertDialogProps } from './AlertDialog';
@@ -15,7 +15,7 @@ export type AvatarProps = VueToJSXProps<UIProps, 'image' | 'actions' | 'badge'>
15
15
  /** Props to pass to the thumbnail (minus those already set by the Avatar props). */
16
16
  thumbnailProps?: Omit<ThumbnailProps, 'image' | 'alt' | 'size' | 'theme' | 'aspectRatio'>;
17
17
  };
18
- declare const Avatar: import('vue').DefineSetupFnComponent<AvatarProps, {}, {}, Omit<UIProps, "className" | "image" | import('@lumx/core/js/types').PropsToOverride | "actions" | "badge" | "children"> & {
18
+ declare const Avatar: import('vue').DefineSetupFnComponent<AvatarProps, {}, {}, Omit<UIProps, "className" | "image" | import('@lumx/core/js/types').PropsToOverride | "children" | "actions" | "badge"> & {
19
19
  class?: string;
20
20
  } & {
21
21
  /** Image URL. */
@@ -0,0 +1,30 @@
1
+ import { SelectionChipGroupProps as UIProps } from '@lumx/core/js/components/Chip/SelectionChipGroup';
2
+ import { VueToJSXProps } from '../../utils/VueToJSX';
3
+ /**
4
+ * Props omit 'ref' (handled internally).
5
+ * inputRef is added here for Vue (ref to an associated input element for backspace focus handling).
6
+ */
7
+ export type SelectionChipGroupProps = VueToJSXProps<UIProps<any>> & {
8
+ /** Ref to the associated input element (for focus restoration on backspace) */
9
+ inputRef?: HTMLInputElement | null;
10
+ };
11
+ export declare const emitSchema: {
12
+ change: (_newValue?: any[]) => boolean;
13
+ };
14
+ /**
15
+ * SelectionChipGroup component.
16
+ *
17
+ * @param props Component props.
18
+ * @return Vue element.
19
+ */
20
+ declare const SelectionChipGroup: import('vue').DefineSetupFnComponent<SelectionChipGroupProps, {
21
+ change: (_newValue?: any[]) => boolean;
22
+ }, {}, Omit<UIProps<any>, "className" | import('@lumx/core/js/types').PropsToOverride | "children"> & {
23
+ class?: string;
24
+ } & {
25
+ /** Ref to the associated input element (for focus restoration on backspace) */
26
+ inputRef?: HTMLInputElement | null;
27
+ } & {
28
+ onChange?: ((_newValue?: any[] | undefined) => any) | undefined;
29
+ }, import('vue').PublicProps>;
30
+ export default SelectionChipGroup;
@@ -0,0 +1,66 @@
1
+ declare const _default: {
2
+ component: any;
3
+ args: {
4
+ value: {
5
+ id: string;
6
+ name: string;
7
+ }[];
8
+ getOptionId: string;
9
+ getOptionName: string;
10
+ label: string;
11
+ chipRemoveLabel: string;
12
+ };
13
+ decorators: ((story: any, context: any) => any)[];
14
+ title: string;
15
+ };
16
+ export default _default;
17
+ export declare const Default: {};
18
+ export declare const Disabled: {
19
+ args: {
20
+ isDisabled: boolean;
21
+ };
22
+ };
23
+ export declare const IndividuallyDisabled: {
24
+ args: {
25
+ getChipProps: (option: {
26
+ id: string;
27
+ name: string;
28
+ }) => {
29
+ isDisabled: boolean;
30
+ };
31
+ };
32
+ };
33
+ export declare const Empty: {
34
+ args: {
35
+ value: never[];
36
+ };
37
+ };
38
+ export declare const ConstrainedSpace: {
39
+ decorators: ((story: any, context: any) => any)[];
40
+ args: {
41
+ value: ({
42
+ id: string;
43
+ name: string;
44
+ } | {
45
+ name: string;
46
+ })[];
47
+ };
48
+ };
49
+ /** Selection chip group with custom chip render */
50
+ export declare const CustomRender: {
51
+ render: () => {
52
+ components: {
53
+ StoryCustomRender: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
54
+ };
55
+ template: string;
56
+ };
57
+ };
58
+ /** Selection chip group inside a TextField chips slot with inputRef for keyboard navigation */
59
+ export declare const InTextField: {
60
+ render: () => {
61
+ components: {
62
+ StoryInTextField: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
63
+ };
64
+ template: string;
65
+ };
66
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -1,2 +1,3 @@
1
1
  export { default as Chip, type ChipProps } from './Chip';
2
2
  export { default as ChipGroup, type ChipGroupProps } from './ChipGroup';
3
+ export { default as SelectionChipGroup, type SelectionChipGroupProps } from './SelectionChipGroup';
@@ -9,6 +9,28 @@ declare const _default: {
9
9
  title: string;
10
10
  };
11
11
  export default _default;
12
+ export declare const AutoFilterOptions: {
13
+ play: ({ canvasElement }: any) => Promise<void>;
14
+ args: {
15
+ value: string;
16
+ };
17
+ decorators: ((story: any, context: any) => any)[];
18
+ render: ({ value, onChange, onSelect, }: {
19
+ value: string;
20
+ onChange: (v: string) => void;
21
+ onSelect?: (option: {
22
+ value: string;
23
+ }) => void;
24
+ }) => import("vue/jsx-runtime").JSX.Element;
25
+ };
26
+ export declare const FilterOffOpenOnFocus: {
27
+ play: ({ canvasElement }: any) => Promise<void>;
28
+ args: {
29
+ value: string;
30
+ };
31
+ decorators: ((story: any, context: any) => any)[];
32
+ render: ({ value, onChange, onSelect }: any) => import("vue/jsx-runtime").JSX.Element;
33
+ };
12
34
  export declare const SelectOptionUpdatesInput: {
13
35
  play: ({ canvasElement }: any) => Promise<void>;
14
36
  args: {
@@ -18,10 +18,22 @@ export type ComboboxInputProps = VueToJSXProps<TextFieldProps, 'inputRef' | 'tex
18
18
  value: string;
19
19
  }) => void;
20
20
  /**
21
- * When true (default), the combobox automatically filters options as the user types.
22
- * Set to false when you handle filtering yourself (e.g. async search).
21
+ * Controls how the combobox filters options as the user types.
22
+ *
23
+ * - `'auto'` (default) — Options are automatically filtered client-side.
24
+ * - `'manual'` — Filtering is the consumer's responsibility.
25
+ * - `'off'` — Like `'manual'`, but the input is rendered as `readOnly`
26
+ * and `openOnFocus` defaults to `true`.
23
27
  */
24
- autoFilter?: boolean;
28
+ filter?: 'auto' | 'manual' | 'off';
29
+ /**
30
+ * When true, the combobox opens automatically when the input receives focus.
31
+ * When false (default, unless `filter` is `'off'`), the combobox only opens
32
+ * on click, typing, or keyboard navigation.
33
+ *
34
+ * @default false (true when filter is 'off')
35
+ */
36
+ openOnFocus?: boolean;
25
37
  };
26
38
  /**
27
39
  * Combobox.Input component - wraps TextField with combobox ARIA attributes.
@@ -51,10 +63,22 @@ declare const ComboboxInput: import('vue').DefineSetupFnComponent<ComboboxInputP
51
63
  value: string;
52
64
  }) => void;
53
65
  /**
54
- * When true (default), the combobox automatically filters options as the user types.
55
- * Set to false when you handle filtering yourself (e.g. async search).
66
+ * Controls how the combobox filters options as the user types.
67
+ *
68
+ * - `'auto'` (default) — Options are automatically filtered client-side.
69
+ * - `'manual'` — Filtering is the consumer's responsibility.
70
+ * - `'off'` — Like `'manual'`, but the input is rendered as `readOnly`
71
+ * and `openOnFocus` defaults to `true`.
72
+ */
73
+ filter?: "auto" | "manual" | "off";
74
+ /**
75
+ * When true, the combobox opens automatically when the input receives focus.
76
+ * When false (default, unless `filter` is `'off'`), the combobox only opens
77
+ * on click, typing, or keyboard navigation.
78
+ *
79
+ * @default false (true when filter is 'off')
56
80
  */
57
- autoFilter?: boolean;
81
+ openOnFocus?: boolean;
58
82
  } & {
59
83
  onSelect?: ((option: {
60
84
  value: string;
@@ -8,7 +8,7 @@ export type ComboboxListProps = VueToJSXProps<UIProps, 'aria-label' | 'aria-busy
8
8
  * @param props Component props.
9
9
  * @return Vue element.
10
10
  */
11
- declare const ComboboxList: import('vue').DefineSetupFnComponent<ComboboxListProps, {}, {}, Omit<UIProps, "className" | import('@lumx/core/js/types').PropsToOverride | "children" | "aria-label" | "id" | "aria-busy"> & {
11
+ declare const ComboboxList: import('vue').DefineSetupFnComponent<ComboboxListProps, {}, {}, Omit<UIProps, "className" | import('@lumx/core/js/types').PropsToOverride | "id" | "children" | "aria-label" | "aria-busy"> & {
12
12
  class?: string;
13
13
  } & {}, import('vue').PublicProps>;
14
14
  export { COMPONENT_NAME, CLASSNAME };
@@ -15,7 +15,7 @@ export type ComboboxOptionProps = VueToJSXProps<UIProps, ComboboxOptionPropsToOv
15
15
  * @param props Component props.
16
16
  * @return Vue element.
17
17
  */
18
- declare const ComboboxOption: import('vue').DefineSetupFnComponent<ComboboxOptionProps, {}, {}, Omit<UIProps, "className" | import('@lumx/core/js/types').PropsToOverride | "hidden" | "id" | "descriptionId" | "isGrid" | ComboboxOptionPropsToOverride> & {
18
+ declare const ComboboxOption: import('vue').DefineSetupFnComponent<ComboboxOptionProps, {}, {}, Omit<UIProps, "className" | import('@lumx/core/js/types').PropsToOverride | "id" | "hidden" | "descriptionId" | "isGrid" | ComboboxOptionPropsToOverride> & {
19
19
  class?: string;
20
20
  } & {
21
21
  /** Props forwarded to a Tooltip wrapping the option trigger element. */
@@ -12,7 +12,7 @@ export type ComboboxOptionActionProps = Pick<VueToJSXProps<UIProps>, 'isDisabled
12
12
  * @param props Component props.
13
13
  * @return Vue element.
14
14
  */
15
- declare const ComboboxOptionAction: import('vue').DefineSetupFnComponent<ComboboxOptionActionProps, {}, {}, Pick<VueToJSXProps<UIProps>, "isDisabled" | "class"> & {
15
+ declare const ComboboxOptionAction: import('vue').DefineSetupFnComponent<ComboboxOptionActionProps, {}, {}, Pick<VueToJSXProps<UIProps>, "class" | "isDisabled"> & {
16
16
  /** On click callback. */
17
17
  onClick?: (evt: MouseEvent) => void;
18
18
  } & {}, import('vue').PublicProps>;
@@ -13,8 +13,8 @@ export type ComboboxPopoverProps = VueToJSXProps<UIProps, 'isOpen' | 'anchorRef'
13
13
  * @param props Component props.
14
14
  * @return Vue element.
15
15
  */
16
- declare const ComboboxPopover: import('vue').DefineSetupFnComponent<ComboboxPopoverProps, {}, {}, Omit<UIProps, "className" | import('@lumx/core/js/types').PropsToOverride | "children" | "isOpen" | "anchorRef"> & {
16
+ declare const ComboboxPopover: import('vue').DefineSetupFnComponent<ComboboxPopoverProps, {}, {}, Omit<UIProps, "className" | import('@lumx/core/js/types').PropsToOverride | "isOpen" | "children" | "anchorRef"> & {
17
17
  class?: string;
18
- } & Partial<Omit<PopoverProps, "class" | "isOpen" | "onClose" | "anchorRef">> & {}, import('vue').PublicProps>;
18
+ } & Partial<Omit<PopoverProps, "isOpen" | "class" | "onClose" | "anchorRef">> & {}, import('vue').PublicProps>;
19
19
  export { COMPONENT_NAME, CLASSNAME };
20
20
  export default ComboboxPopover;
@@ -7,7 +7,7 @@ export type ComboboxSectionProps = VueToJSXProps<UIProps, ComboboxSectionPropsTo
7
7
  * @param props Component props.
8
8
  * @return Vue element.
9
9
  */
10
- declare const ComboboxSection: import('vue').DefineSetupFnComponent<ComboboxSectionProps, {}, {}, Omit<UIProps, "className" | import('@lumx/core/js/types').PropsToOverride | "children" | "hidden" | "aria-hidden"> & {
10
+ declare const ComboboxSection: import('vue').DefineSetupFnComponent<ComboboxSectionProps, {}, {}, Omit<UIProps, "className" | import('@lumx/core/js/types').PropsToOverride | "children" | "aria-hidden" | "hidden"> & {
11
11
  class?: string;
12
12
  } & {}, import('vue').PublicProps>;
13
13
  export { COMPONENT_NAME, CLASSNAME };