@moving-walls/design-system 1.0.3 → 1.0.4
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.
|
@@ -7,10 +7,11 @@ export interface DisplayProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
|
7
7
|
export declare function Display({ size, children, className, ...props }: DisplayProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
9
9
|
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
10
|
+
weight?: 'normal' | 'medium' | 'semibold' | 'bold';
|
|
10
11
|
children: React.ReactNode;
|
|
11
12
|
className?: string;
|
|
12
13
|
}
|
|
13
|
-
export declare function Heading({ level, children, className, ...props }: HeadingProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function Heading({ level, weight, children, className, ...props }: HeadingProps): import("react/jsx-runtime").JSX.Element;
|
|
14
15
|
type TextBaseProps = {
|
|
15
16
|
size?: '2xs' | 'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl';
|
|
16
17
|
variant?: 'primary' | 'secondary' | 'muted' | 'error' | 'success' | 'info' | 'warning';
|
package/dist/index.esm.js
CHANGED
|
@@ -43987,27 +43987,44 @@ function Display(_a) {
|
|
|
43987
43987
|
function Heading(_a) {
|
|
43988
43988
|
var _a$level = _a.level,
|
|
43989
43989
|
level = _a$level === void 0 ? 1 : _a$level,
|
|
43990
|
+
weight = _a.weight,
|
|
43990
43991
|
children = _a.children,
|
|
43991
43992
|
className = _a.className,
|
|
43992
|
-
props = __rest$1(_a, ["level", "children", "className"]);
|
|
43993
|
+
props = __rest$1(_a, ["level", "weight", "children", "className"]);
|
|
43993
43994
|
var Tag = "h".concat(level);
|
|
43994
43995
|
var sizeClasses = {
|
|
43995
|
-
1: 'text-4xl
|
|
43996
|
+
1: 'text-4xl leading-[3.5rem] text-mw-neutral-900 dark:text-white',
|
|
43996
43997
|
// 40px / 56px
|
|
43997
|
-
2: 'text-3xl
|
|
43998
|
+
2: 'text-3xl leading-[3rem] text-mw-neutral-900 dark:text-white',
|
|
43998
43999
|
// 32px / 48px
|
|
43999
|
-
3: 'text-2xl
|
|
44000
|
+
3: 'text-2xl leading-[2.5rem] text-mw-neutral-900 dark:text-white',
|
|
44000
44001
|
// 24px / 40px
|
|
44001
44002
|
// H4: Page titles - 20px font, 600 weight, 32px line-height (Figma: Creatives title)
|
|
44002
|
-
4: 'text-xl
|
|
44003
|
+
4: 'text-xl leading-[2rem] text-mw-neutral-900 dark:text-white',
|
|
44003
44004
|
// 20px / 32px
|
|
44004
|
-
5: 'text-lg
|
|
44005
|
+
5: 'text-lg leading-[1.5rem] text-mw-neutral-900 dark:text-white',
|
|
44005
44006
|
// 18px / 24px
|
|
44006
44007
|
// H6: Section headings - 16px font, 500 weight, 20px line-height (Figma: Folders/Recently Activity)
|
|
44007
|
-
6: 'text-base
|
|
44008
|
+
6: 'text-base leading-[1.25rem] text-mw-neutral-900 dark:text-white' // 16px / 20px
|
|
44008
44009
|
};
|
|
44010
|
+
var weightClasses = {
|
|
44011
|
+
normal: 'font-normal',
|
|
44012
|
+
medium: 'font-medium',
|
|
44013
|
+
semibold: 'font-semibold',
|
|
44014
|
+
bold: 'font-bold'
|
|
44015
|
+
};
|
|
44016
|
+
// Default weights based on level
|
|
44017
|
+
var defaultWeights = {
|
|
44018
|
+
1: 'semibold',
|
|
44019
|
+
2: 'semibold',
|
|
44020
|
+
3: 'semibold',
|
|
44021
|
+
4: 'semibold',
|
|
44022
|
+
5: 'semibold',
|
|
44023
|
+
6: 'medium'
|
|
44024
|
+
};
|
|
44025
|
+
var finalWeight = weight || defaultWeights[level];
|
|
44009
44026
|
return jsx(Tag, Object.assign({
|
|
44010
|
-
className: clsx(sizeClasses[level], className)
|
|
44027
|
+
className: clsx(sizeClasses[level], weightClasses[finalWeight], className)
|
|
44011
44028
|
}, props, {
|
|
44012
44029
|
children: children
|
|
44013
44030
|
}));
|