@lumx/vue 4.20.1-next.0 → 4.21.0-next.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/components/card/Card.d.ts +37 -0
- package/components/card/index.d.ts +2 -0
- package/index.d.ts +1 -0
- package/index.js +637 -597
- package/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { NativeElements, PublicProps } from 'vue';
|
|
2
|
+
import { CardProps as UIProps, DefaultCardTag } from '@lumx/core/js/components/Card';
|
|
3
|
+
import { VueToJSXProps } from '../../utils/VueToJSX';
|
|
4
|
+
/** Any intrinsic HTML/SVG tag name known to Vue's JSX. */
|
|
5
|
+
type CardTag = keyof NativeElements;
|
|
6
|
+
/** Public props: polymorphic on `as`, which also types the forwarded element attributes. */
|
|
7
|
+
export type CardProps<E extends CardTag = DefaultCardTag> = Omit<NativeElements[E], 'class'> & VueToJSXProps<UIProps, 'as'> & {
|
|
8
|
+
/** Customize the rendered root element (e.g. `div`, `article`, `section`, `li`, `aside`), defaults to `div`. */
|
|
9
|
+
as?: E;
|
|
10
|
+
};
|
|
11
|
+
/** Props actually declared at runtime (non-polymorphic subset). */
|
|
12
|
+
type CardOwnProps = VueToJSXProps<UIProps, 'as'> & {
|
|
13
|
+
as?: CardTag;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Card component.
|
|
17
|
+
*
|
|
18
|
+
* @param props Component props.
|
|
19
|
+
* @return Vue element.
|
|
20
|
+
*/
|
|
21
|
+
declare const Card: import('vue').DefineSetupFnComponent<CardOwnProps, {}, {}, Omit<UIProps, "className" | import('@lumx/core/js/types').PropsToOverride | "children" | "as"> & {
|
|
22
|
+
class?: import('../../utils/VueToJSX').ClassValue;
|
|
23
|
+
} & {
|
|
24
|
+
as?: CardTag;
|
|
25
|
+
} & {}, PublicProps>;
|
|
26
|
+
/**
|
|
27
|
+
* Vue's `defineComponent` setup-fn overload cannot carry an unbound generic from the setup
|
|
28
|
+
* signature to the resulting component constructor (it collapses as soon as a runtime `props`
|
|
29
|
+
* option is present), so the generic is layered on via cast
|
|
30
|
+
*/
|
|
31
|
+
interface CardConstructor {
|
|
32
|
+
new <E extends CardTag = DefaultCardTag>(props: CardProps<E> & PublicProps): {
|
|
33
|
+
$props: CardProps<E>;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
declare const _default: CardConstructor & typeof Card;
|
|
37
|
+
export default _default;
|
package/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export * from './components/avatar';
|
|
|
5
5
|
export * from './components/combobox';
|
|
6
6
|
export * from './components/badge';
|
|
7
7
|
export * from './components/button';
|
|
8
|
+
export * from './components/card';
|
|
8
9
|
export * from './components/checkbox';
|
|
9
10
|
export * from './components/chip';
|
|
10
11
|
export * from './components/dialog';
|