@appmax_npm/ds-prime 1.0.0-alpha.45 → 1.0.0-alpha.47
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/amtext/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { DefineComponent } from
|
|
1
|
+
import type { DefineComponent, GlobalComponentConstructor, EmitFn } from '@primevue/core';
|
|
2
|
+
import { VNode } from 'vue';
|
|
2
3
|
|
|
3
4
|
export interface AmTextProps {
|
|
4
5
|
as?: string;
|
|
@@ -8,6 +9,31 @@ export interface AmTextProps {
|
|
|
8
9
|
class?: string;
|
|
9
10
|
}
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
export interface AmTextSlots {
|
|
13
|
+
default: () => VNode[],
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export interface AmTextEmitsOptions {};
|
|
17
|
+
|
|
18
|
+
declare type AmTextEmits = EmitFn<AmTextEmitsOptions>;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* **DS Prime - AmText**
|
|
22
|
+
*
|
|
23
|
+
* AmText é um componente de texto customizado para o DS Prime.
|
|
24
|
+
*
|
|
25
|
+
* [Live Demo](https://appmax-space.bitbucket.io/ds-prime/componentes/AmText.html)
|
|
26
|
+
*
|
|
27
|
+
* @group Component
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
declare const AmText: DefineComponent<AmTextProps, AmTextSlots, AmTextEmits>;
|
|
32
|
+
|
|
33
|
+
declare module 'vue' {
|
|
34
|
+
export interface GlobalComponents {
|
|
35
|
+
AmText: GlobalComponentConstructor<AmTextProps, AmTextSlots, AmTextEmits>;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
12
38
|
|
|
13
39
|
export default AmText;
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
-
declare const amTextVariants: (props?: ({
|
|
3
|
-
variant?: "caption" | "body" | "subtitle" | "title" | "display" | null | undefined;
|
|
4
|
-
isStrong?: boolean | null | undefined;
|
|
5
|
-
size?: "small" | "medium" | "large" | null | undefined;
|
|
6
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
|
-
export interface AmTextVariants extends VariantProps<typeof amTextVariants> {
|
|
8
|
-
}
|
|
9
|
-
export declare const amText: (variants: AmTextVariants, className?: string) => string;
|
|
10
|
-
export {};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { cva } from 'class-variance-authority';
|
|
2
|
-
import { twMerge } from 'tailwind-merge';
|
|
3
|
-
const amTextVariants = cva('am-text font-normal text-color text-base [&strong]:font-bold [&>strong]:font-bold', {
|
|
4
|
-
variants: {
|
|
5
|
-
variant: {
|
|
6
|
-
caption: 'text-xs text-muted-color font-medium',
|
|
7
|
-
body: 'text-sm [&strong]:font-medium [&>strong]:font-medium [&p]text-base',
|
|
8
|
-
subtitle: '',
|
|
9
|
-
title: 'text-2xl',
|
|
10
|
-
display: 'text-5xl [&strong]:font-semibold [&>strong]:font-semibold'
|
|
11
|
-
},
|
|
12
|
-
isStrong: { false: '', true: '' },
|
|
13
|
-
size: { small: '', medium: '', large: '' }
|
|
14
|
-
},
|
|
15
|
-
compoundVariants: [
|
|
16
|
-
// caption
|
|
17
|
-
{ variant: 'caption', isStrong: true, class: 'font-bold' },
|
|
18
|
-
// body
|
|
19
|
-
{ variant: 'body', isStrong: true, class: 'font-medium' },
|
|
20
|
-
// subtitle
|
|
21
|
-
{ variant: 'subtitle', isStrong: true, class: 'font-bold' },
|
|
22
|
-
// title
|
|
23
|
-
{ variant: 'title', size: 'small', class: 'text-lg' },
|
|
24
|
-
// { variant: 'title', size: 'medium', class: 'text-2xl' },
|
|
25
|
-
{ variant: 'title', size: 'large', class: 'text-3xl' },
|
|
26
|
-
{ variant: 'title', isStrong: true, class: 'font-bold' },
|
|
27
|
-
// display
|
|
28
|
-
{ variant: 'display', size: 'small', class: 'text-4xl' },
|
|
29
|
-
// { variant: 'display', size: 'medium', class: 'text-5xl' }
|
|
30
|
-
{ variant: 'display', isStrong: true, class: 'font-bold' }
|
|
31
|
-
]
|
|
32
|
-
});
|
|
33
|
-
export const amText = (variants, className) => twMerge(amTextVariants(variants), className);
|