@a-type/ui 6.0.68 → 6.0.69
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/dist/components/typography/typography.d.ts +2 -1
- package/dist/components/typography/typography.js +2 -1
- package/dist/components/typography/typography.js.map +1 -1
- package/dist/components/typography/typography.module.css +10 -0
- package/package.json +1 -1
- package/src/components/typography/typography.module.css +10 -0
- package/src/components/typography/typography.tsx +3 -0
|
@@ -13,8 +13,9 @@ export interface TypographyProps extends useRender.ComponentProps<'span'> {
|
|
|
13
13
|
dim?: boolean;
|
|
14
14
|
color?: 'neutral' | 'main' | 'attention' | 'success';
|
|
15
15
|
wrap?: boolean;
|
|
16
|
+
align?: 'start' | 'center' | 'end';
|
|
16
17
|
}
|
|
17
|
-
export declare function Text({ emphasis, italic, underline, strikethrough, render, className, bold, thin, truncate, dim, color, normal, uppercase, wrap, ...rest }: TypographyProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
18
|
+
export declare function Text({ emphasis, italic, underline, strikethrough, render, className, bold, thin, truncate, dim, color, normal, uppercase, wrap, align, ...rest }: TypographyProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
18
19
|
export declare const Heading: (props: TypographyProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
20
|
export declare const HeroText: import("react").FunctionComponent<TypographyProps>;
|
|
20
21
|
export declare const P: (props: TypographyProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -16,7 +16,7 @@ import { withClassName } from '../../hooks/withClassName.js';
|
|
|
16
16
|
import { withProps } from '../../hooks/withProps.js';
|
|
17
17
|
import cls from './typography.module.css';
|
|
18
18
|
export function Text(_a) {
|
|
19
|
-
var { emphasis, italic, underline, strikethrough, render, className, bold, thin, truncate, dim, color, normal, uppercase, wrap } = _a, rest = __rest(_a, ["emphasis", "italic", "underline", "strikethrough", "render", "className", "bold", "thin", "truncate", "dim", "color", "normal", "uppercase", "wrap"]);
|
|
19
|
+
var { emphasis, italic, underline, strikethrough, render, className, bold, thin, truncate, dim, color, normal, uppercase, wrap, align } = _a, rest = __rest(_a, ["emphasis", "italic", "underline", "strikethrough", "render", "className", "bold", "thin", "truncate", "dim", "color", "normal", "uppercase", "wrap", "align"]);
|
|
20
20
|
return useRender({
|
|
21
21
|
render,
|
|
22
22
|
defaultTagName: 'span',
|
|
@@ -34,6 +34,7 @@ export function Text(_a) {
|
|
|
34
34
|
normal: normal ? true : undefined,
|
|
35
35
|
uppercase: uppercase ? true : undefined,
|
|
36
36
|
wrap,
|
|
37
|
+
align,
|
|
37
38
|
},
|
|
38
39
|
});
|
|
39
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typography.js","sourceRoot":"","sources":["../../../src/components/typography/typography.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,GAAG,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"typography.js","sourceRoot":"","sources":["../../../src/components/typography/typography.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,GAAG,MAAM,yBAAyB,CAAC;AAkB1C,MAAM,UAAU,IAAI,CAAC,EAiBH;QAjBG,EACpB,QAAQ,EACR,MAAM,EACN,SAAS,EACT,aAAa,EACb,MAAM,EACN,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,QAAQ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;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,aAAa,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;AAC1D,MAAM,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,aAAK,EAAE,CAAC,CAAC;AAEpD;;GAEG;AACH,MAAM,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC,OAAO,EAAE;IACpC,MAAM,EAAE,cAAM;IACd,QAAQ,EAAE,SAAS;CACnB,CAAC,CAAC;AACH;;GAEG;AACH,MAAM,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC,OAAO,EAAE;IACpC,MAAM,EAAE,cAAM;IACd,QAAQ,EAAE,WAAW;CACrB,CAAC,CAAC;AACH;;GAEG;AACH,MAAM,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC,OAAO,EAAE;IACpC,MAAM,EAAE,cAAM;IACd,QAAQ,EAAE,WAAW;CACrB,CAAC,CAAC;AACH;;GAEG;AACH,MAAM,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC,OAAO,EAAE;IACpC,MAAM,EAAE,cAAM;IACd,QAAQ,EAAE,SAAS;CACnB,CAAC,CAAC;AACH;;GAEG;AACH,MAAM,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC,OAAO,EAAE;IACpC,MAAM,EAAE,cAAM;IACd,QAAQ,EAAE,SAAS;CACnB,CAAC,CAAC;AAEH,MAAM,UAAU,QAAQ,CAAC,KAA4C;IACpE,OAAO,KAAC,IAAI,kBAAC,IAAI,QAAC,SAAS,QAAC,MAAM,EAAE,aAAK,IAAM,KAAK,EAAI,CAAC;AAC1D,CAAC"}
|
|
@@ -69,6 +69,16 @@
|
|
|
69
69
|
&[data-color='success'] {
|
|
70
70
|
@apply --mx-fg(var(--m-color-palette-success-heavy));
|
|
71
71
|
}
|
|
72
|
+
|
|
73
|
+
&[data-align='start'] {
|
|
74
|
+
text-align: start;
|
|
75
|
+
}
|
|
76
|
+
&[data-align='center'] {
|
|
77
|
+
text-align: center;
|
|
78
|
+
}
|
|
79
|
+
&[data-align='end'] {
|
|
80
|
+
text-align: end;
|
|
81
|
+
}
|
|
72
82
|
}
|
|
73
83
|
|
|
74
84
|
@layer components {
|
package/package.json
CHANGED
|
@@ -69,6 +69,16 @@
|
|
|
69
69
|
&[data-color='success'] {
|
|
70
70
|
@apply --mx-fg(var(--m-color-palette-success-heavy));
|
|
71
71
|
}
|
|
72
|
+
|
|
73
|
+
&[data-align='start'] {
|
|
74
|
+
text-align: start;
|
|
75
|
+
}
|
|
76
|
+
&[data-align='center'] {
|
|
77
|
+
text-align: center;
|
|
78
|
+
}
|
|
79
|
+
&[data-align='end'] {
|
|
80
|
+
text-align: end;
|
|
81
|
+
}
|
|
72
82
|
}
|
|
73
83
|
|
|
74
84
|
@layer components {
|
|
@@ -18,6 +18,7 @@ export interface TypographyProps extends useRender.ComponentProps<'span'> {
|
|
|
18
18
|
dim?: boolean;
|
|
19
19
|
color?: 'neutral' | 'main' | 'attention' | 'success';
|
|
20
20
|
wrap?: boolean;
|
|
21
|
+
align?: 'start' | 'center' | 'end';
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
export function Text({
|
|
@@ -35,6 +36,7 @@ export function Text({
|
|
|
35
36
|
normal,
|
|
36
37
|
uppercase,
|
|
37
38
|
wrap,
|
|
39
|
+
align,
|
|
38
40
|
...rest
|
|
39
41
|
}: TypographyProps) {
|
|
40
42
|
return useRender({
|
|
@@ -57,6 +59,7 @@ export function Text({
|
|
|
57
59
|
normal: normal ? true : undefined,
|
|
58
60
|
uppercase: uppercase ? true : undefined,
|
|
59
61
|
wrap,
|
|
62
|
+
align,
|
|
60
63
|
},
|
|
61
64
|
});
|
|
62
65
|
}
|