@wonderflow/react-components 2.39.5-next.1 → 2.40.0-next.2
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/avatar/avatar.js +1 -0
- package/chip/chip.d.ts +10 -3
- package/chip/chip.js +1 -0
- package/circular-progress/circular-progress.js +1 -0
- package/core/typography.css +1 -6
- package/disclosure/disclosure.js +2 -1
- package/dropdown/dropdown-item.js +5 -3
- package/dropdown/dropdown-menu.d.ts +3 -3
- package/dropdown/dropdown-menu.js +1 -0
- package/dropdown/dropdown.js +1 -0
- package/grid/grid.js +1 -0
- package/info-state/info-state.d.ts +4 -2
- package/info-state/info-state.js +1 -0
- package/input-group/input-group.js +1 -0
- package/linear-progress/linear-progress.js +1 -0
- package/modal/modal-content.js +1 -0
- package/modal/modal.d.ts +2 -2
- package/modal/modal.js +1 -0
- package/package.json +14 -11
- package/select/select.js +1 -0
- package/selection-controls/checkbox.js +1 -0
- package/selection-controls/radio.js +1 -0
- package/selection-controls/toggle.js +1 -0
- package/separator/separator.js +1 -0
- package/slider/slider.js +1 -0
- package/spinner/spinner.js +1 -0
- package/tab/tab-item.js +1 -0
- package/tab/tab-list.js +1 -0
- package/tab/tab-panel.js +1 -0
- package/tab/tab.js +1 -0
- package/text/text.d.ts +0 -1
- package/text/text.js +2 -2
- package/text/text.module.css +13 -20
- package/textfield/textfield.js +1 -0
- package/themes/dark.css +1 -1
- package/themes/light.css +1 -1
- package/themes.css +3 -3
- package/title/title.d.ts +0 -1
- package/title/title.js +2 -2
- package/title/title.module.css +30 -33
package/avatar/avatar.js
CHANGED
|
@@ -8,3 +8,4 @@ export const Avatar = forwardRef(({ className, src, dimension = 'regular', ...ot
|
|
|
8
8
|
React.createElement("path", { d: "M8.4 9H3.6C1.612 9 0 10.575 0 12.531v5.126C1.814 18.517 3.85 19 6 19s4.186-.483 6-1.343v-5.126C12 10.581 10.394 9 8.4 9z", fill: "var(--highlight-blue-foreground)" })),
|
|
9
9
|
src && (React.createElement("img", { ref: forwardedRef, alt: "", src: src, ...otherProps }))));
|
|
10
10
|
});
|
|
11
|
+
Avatar.displayName = 'Avatar';
|
package/chip/chip.d.ts
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare type ChipProps = PropsWithClass & {
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
|
+
export declare type ChipProps = PropsWithChildren<PropsWithClass> & {
|
|
3
3
|
dimension?: 'small' | 'regular' | 'big';
|
|
4
4
|
color?: 'gray' | 'cyan' | 'green' | 'purple' | 'yellow' | 'red' | 'blue';
|
|
5
5
|
interactive?: boolean;
|
|
6
6
|
onDismissClick?(): void;
|
|
7
7
|
};
|
|
8
|
-
export declare const Chip:
|
|
8
|
+
export declare const Chip: React.ForwardRefExoticComponent<PropsWithClass & {
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
} & {
|
|
11
|
+
dimension?: "big" | "small" | "regular" | undefined;
|
|
12
|
+
color?: "gray" | "cyan" | "green" | "purple" | "yellow" | "red" | "blue" | undefined;
|
|
13
|
+
interactive?: boolean | undefined;
|
|
14
|
+
onDismissClick?(): void;
|
|
15
|
+
} & React.RefAttributes<HTMLSpanElement>>;
|
package/chip/chip.js
CHANGED
|
@@ -19,3 +19,4 @@ export const Chip = forwardRef(({ children, className, dimension = 'regular', co
|
|
|
19
19
|
interactive && (React.createElement("button", { onClick: interactive && onDismissClick, className: Action, type: "button" },
|
|
20
20
|
React.createElement(Icon, { name: "xmark", dimension: properties[dimension].iconSize })))));
|
|
21
21
|
});
|
|
22
|
+
Chip.displayName = 'Chip';
|
|
@@ -9,3 +9,4 @@ export const CircularProgress = forwardRef(({ className, value, max = 100, dimen
|
|
|
9
9
|
};
|
|
10
10
|
return (React.createElement("div", { ref: forwardedRef, role: "progressbar", "aria-valuenow": value, "aria-valuemin": 0, "aria-valuemax": max, className: clsx(CircularProgressClass, className), "data-circular-progress": clamp(getPercentage(), 0, 100), "data-circular-progress-dimension": dimension, "data-circular-progress-show-progress": showProgress, style: { ...dynamicStyle, ...style }, ...otherProps }));
|
|
11
11
|
});
|
|
12
|
+
CircularProgress.displayName = 'CircularProgress';
|
package/core/typography.css
CHANGED
package/disclosure/disclosure.js
CHANGED
|
@@ -25,8 +25,9 @@ export const Disclosure = forwardRef(({ children, open = false, padding = true,
|
|
|
25
25
|
};
|
|
26
26
|
const renderContent = useCallback(() => (React.createElement(motion.div, { className: Content, "data-disclosure-padding": padding, "data-disclosure-height": Boolean(contentMaxHeight), animate: isOpen ? { y: 5, opacity: 1 } : { y: 0, opacity: 0 }, transition: { ease: 'easeOut', duration: 0.1 }, initial: false }, children)), [children, contentMaxHeight, isOpen, padding]);
|
|
27
27
|
return (React.createElement("details", { style: { ...dynamicStyle, ...style }, className: clsx(DisclosureClass, className), "data-disclosure-icon-position": iconPosition, "data-disclosure-dimension": dimension, "data-disclosure-expandable": expandable, "aria-expanded": isOpen ? 'true' : 'false', open: isOpen, ref: forwardedRef, ...otherProps },
|
|
28
|
-
React.createElement(Text, { as: "summary", onClick: handleOpen(), className: Summary,
|
|
28
|
+
React.createElement(Text, { as: "summary", onClick: handleOpen(), className: Summary, "aria-expanded": isOpen, tabIndex: !expandable ? -1 : 0, size: dimension ? sizes[dimension].summary : undefined, weight: "bold" },
|
|
29
29
|
summary,
|
|
30
30
|
expandable && (React.createElement(Icon, { className: ExpandIcon, name: "chevron-right", dimension: dimension !== 'big' ? 16 : 24 }))),
|
|
31
31
|
renderContent()));
|
|
32
32
|
});
|
|
33
|
+
Disclosure.displayName = 'Disclosure';
|
|
@@ -3,7 +3,7 @@ import { useRovingTabIndex, useFocusEffect } from 'react-roving-tabindex';
|
|
|
3
3
|
import { DropdownItem as DropdownItemClass, Icon as IconClass } from './dropdown-item.module.css';
|
|
4
4
|
import { Tooltip, Stack, Icon } from '../';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
|
-
export const DropdownItem = forwardRef(({ className, children, onClick, icon, dimension = 'regular', as: Wrapper = 'button', iconPosition = 'left', description, padding = true, disabled = false, ...
|
|
6
|
+
export const DropdownItem = forwardRef(({ className, children, onClick, icon, dimension = 'regular', as: Wrapper = 'button', iconPosition = 'left', description, padding = true, disabled = false, ...props }, forwardedRef) => {
|
|
7
7
|
const itemRef = useRef(forwardedRef);
|
|
8
8
|
const [tabIndex, focused, handleKeyDown, handleClick] = useRovingTabIndex(itemRef, disabled);
|
|
9
9
|
const isIconRight = iconPosition === 'right';
|
|
@@ -17,8 +17,10 @@ export const DropdownItem = forwardRef(({ className, children, onClick, icon, di
|
|
|
17
17
|
const InnerContent = useMemo(() => (React.createElement(Stack, { direction: "row", as: "span", fill: false, horizontalAlign: isIconRight ? 'space-between' : 'start', verticalAlign: "center", columnGap: 8, horizontalPadding: 16, verticalPadding: 8, "data-dropdown-icon-right": isIconRight, "data-dropdown-has-icon": Boolean(icon), "data-dropdown-padding": padding, style: { inlineSize: '100%' } },
|
|
18
18
|
icon && (React.createElement(Icon, { className: IconClass, name: icon, dimension: dimension === 'small' ? 14 : 16 })),
|
|
19
19
|
children)), [children, dimension, icon, isIconRight, padding]);
|
|
20
|
-
return (React.createElement(Wrapper, { ref: itemRef, role: "menuitem", className: clsx(DropdownItemClass, className), onClick: disabled ? undefined : triggerClick, onKeyDown: disabled ? undefined : handleKeyDown, tabIndex: tabIndex, "aria-disabled": disabled, type: Wrapper === 'button' ? 'button' : undefined, "data-dropdown-item-dimension": dimension, ...
|
|
20
|
+
return (React.createElement(Wrapper, { ref: itemRef, role: "menuitem", className: clsx(DropdownItemClass, className), onClick: disabled ? undefined : triggerClick, onKeyDown: disabled ? undefined : handleKeyDown, tabIndex: tabIndex, "aria-disabled": disabled, type: Wrapper === 'button' ? 'button' : undefined, "data-dropdown-item-dimension": dimension, ...props }, description
|
|
21
21
|
? (React.createElement(Tooltip, { fill: true, show: focused, placement: "right-start", trigger: InnerContent }, description))
|
|
22
22
|
: InnerContent));
|
|
23
23
|
});
|
|
24
|
-
|
|
24
|
+
DropdownItem.displayName = 'Dropdown.Item';
|
|
25
|
+
export const DropdownItemCheckbox = forwardRef(({ children, checked, ...props }, forwardedRef) => React.createElement(DropdownItem, { role: "menuitemcheckbox", "aria-checked": checked, ref: forwardedRef, ...props }, children));
|
|
26
|
+
DropdownItemCheckbox.displayName = 'Dropdown.ItemCheckbox';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { ReactNode, HTMLAttributes } from 'react';
|
|
2
2
|
export declare type DropdownMenuProps = HTMLAttributes<HTMLUListElement> & {
|
|
3
|
-
children:
|
|
3
|
+
children: ReactNode;
|
|
4
4
|
};
|
|
5
5
|
export declare const DropdownMenu: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLUListElement> & {
|
|
6
|
-
children:
|
|
6
|
+
children: ReactNode;
|
|
7
7
|
} & React.RefAttributes<HTMLUListElement>>;
|
package/dropdown/dropdown.js
CHANGED
|
@@ -47,6 +47,7 @@ export const Dropdown = forwardRef(({ className, children, trigger, offset = 8,
|
|
|
47
47
|
'aria-labelledby': seedID('dropdown-trigger')
|
|
48
48
|
}))))))));
|
|
49
49
|
});
|
|
50
|
+
Dropdown.displayName = 'Dropdown';
|
|
50
51
|
Dropdown.Menu = DropdownMenu;
|
|
51
52
|
Dropdown.Item = DropdownItem;
|
|
52
53
|
Dropdown.ItemCheckbox = DropdownItemCheckbox;
|
package/grid/grid.js
CHANGED
|
@@ -14,4 +14,5 @@ export const Grid = forwardRef(({ className, children, columns, rows, rowGap = 8
|
|
|
14
14
|
};
|
|
15
15
|
return (React.createElement("ul", { className: clsx(GridClass, className), style: { ...computedStyle, ...style }, "data-grid-filling-type": filling, ref: forwardedRef, ...otherProps }, children));
|
|
16
16
|
});
|
|
17
|
+
Grid.displayName = 'Grid';
|
|
17
18
|
Grid.Item = GridItem;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
1
|
+
import React, { PropsWithChildren, ReactNode } from 'react';
|
|
2
2
|
import { IconNames } from '../icons/types';
|
|
3
3
|
import { StackProps } from '../';
|
|
4
|
-
export declare type InfoStateProps = PropsWithClass & {
|
|
4
|
+
export declare type InfoStateProps = PropsWithChildren<PropsWithClass> & {
|
|
5
5
|
title: ReactNode;
|
|
6
6
|
icon?: IconNames;
|
|
7
7
|
image?: string;
|
|
@@ -10,6 +10,8 @@ export declare type InfoStateProps = PropsWithClass & {
|
|
|
10
10
|
actions?: ReactNode;
|
|
11
11
|
};
|
|
12
12
|
export declare const InfoState: React.ForwardRefExoticComponent<PropsWithClass & {
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
} & {
|
|
13
15
|
title: ReactNode;
|
|
14
16
|
icon?: IconNames | undefined;
|
|
15
17
|
image?: string | undefined;
|
package/info-state/info-state.js
CHANGED
|
@@ -12,3 +12,4 @@ export const InfoState = forwardRef(({ className, children, title, icon, image,
|
|
|
12
12
|
React.createElement(Text, { maxWidth: "60ch", dimmed: 6, textAlign: isHorizontal ? 'start' : 'center' }, children),
|
|
13
13
|
actions && (React.createElement(Stack, { verticalPadding: 16, inline: true, direction: "row", columnGap: 16, rowGap: 16, wrap: true }, actions)))));
|
|
14
14
|
});
|
|
15
|
+
InfoState.displayName = 'InfoState';
|
|
@@ -12,3 +12,4 @@ export const LinearProgress = forwardRef(({ className, value, max = 100, dimensi
|
|
|
12
12
|
'--translation': value !== 0 ? '-100%' : '-50%'
|
|
13
13
|
}, weight: "bold", size: dimension === 'regular' ? 16 : 18 }, value && clamp(getPercentage(), 0, 100)))));
|
|
14
14
|
});
|
|
15
|
+
LinearProgress.displayName = 'LinearProgress';
|
package/modal/modal-content.js
CHANGED
|
@@ -12,3 +12,4 @@ export const ModalContent = forwardRef(({ children, className, title, ...otherPr
|
|
|
12
12
|
onClose && React.createElement(IconButton, { onClick: onClose, className: CloseButton, icon: "xmark", kind: "flat" })),
|
|
13
13
|
children)));
|
|
14
14
|
});
|
|
15
|
+
ModalContent.displayName = 'Modal.Content';
|
package/modal/modal.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import { ModalContentProps } from './modal-content';
|
|
3
|
-
export declare type ModalProps = PropsWithClass & {
|
|
3
|
+
export declare type ModalProps = PropsWithChildren<PropsWithClass> & {
|
|
4
4
|
visible?: boolean;
|
|
5
5
|
overlayColor?: 'light' | 'dark' | 'auto';
|
|
6
6
|
closeOnClickOutside?: boolean;
|
package/modal/modal.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wonderflow/react-components",
|
|
3
3
|
"description": "UI components from Wonderflow's Wanda design system",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.40.0-next.2",
|
|
5
5
|
"author": "Wonderflow",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "index.js",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
"access": "public"
|
|
10
10
|
},
|
|
11
11
|
"engines": {
|
|
12
|
-
"node": "
|
|
12
|
+
"node": ">=14.x.x",
|
|
13
|
+
"npm": ">=8.x.x"
|
|
13
14
|
},
|
|
14
15
|
"repository": {
|
|
15
16
|
"type": "git",
|
|
@@ -57,13 +58,13 @@
|
|
|
57
58
|
},
|
|
58
59
|
"dependencies": {
|
|
59
60
|
"@react-aria/interactions": "3.7.0",
|
|
60
|
-
"@wonderflow/eslint-config": "1.1.
|
|
61
|
-
"@wonderflow/stylelint-config": "1.1.
|
|
62
|
-
"@wonderflow/tokens": "1.3.
|
|
61
|
+
"@wonderflow/eslint-config": "1.1.7",
|
|
62
|
+
"@wonderflow/stylelint-config": "1.1.3",
|
|
63
|
+
"@wonderflow/tokens": "1.3.7",
|
|
63
64
|
"clsx": "1.1.1",
|
|
64
65
|
"flat": "5.0.2",
|
|
65
66
|
"framer-motion": "4.1.17",
|
|
66
|
-
"postcss": "8.4.5",
|
|
67
|
+
"postcss": "^8.4.5",
|
|
67
68
|
"react": ">=17.0.2",
|
|
68
69
|
"react-data-table-component": "7.4.5",
|
|
69
70
|
"react-dom": ">=17.0.2",
|
|
@@ -79,11 +80,12 @@
|
|
|
79
80
|
"type-fest": "2.8.0"
|
|
80
81
|
},
|
|
81
82
|
"peerDependencies": {
|
|
83
|
+
"postcss": "^8.4.5",
|
|
82
84
|
"react": ">=17.0.2",
|
|
83
85
|
"react-dom": ">=17.0.2"
|
|
84
86
|
},
|
|
85
87
|
"devDependencies": {
|
|
86
|
-
"@babel/core": "7.16.
|
|
88
|
+
"@babel/core": "7.16.5",
|
|
87
89
|
"@commitlint/cli": "15.0.0",
|
|
88
90
|
"@commitlint/config-conventional": "15.0.0",
|
|
89
91
|
"@semantic-release/exec": "6.0.2",
|
|
@@ -100,9 +102,9 @@
|
|
|
100
102
|
"@storybook/theming": "6.4.9",
|
|
101
103
|
"@types/flat": "5.0.2",
|
|
102
104
|
"@types/react-dom": "17.0.11",
|
|
103
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
104
|
-
"@typescript-eslint/parser": "5.
|
|
105
|
-
"@wonderflow/config": "1.6.
|
|
105
|
+
"@typescript-eslint/eslint-plugin": "5.7.0",
|
|
106
|
+
"@typescript-eslint/parser": "5.7.0",
|
|
107
|
+
"@wonderflow/config": "1.6.3",
|
|
106
108
|
"babel-loader": "8.2.3",
|
|
107
109
|
"commit-analyzer-fail-on-no-release": "1.0.0",
|
|
108
110
|
"commitizen": "4.2.4",
|
|
@@ -110,6 +112,7 @@
|
|
|
110
112
|
"cz-conventional-changelog": "3.3.0",
|
|
111
113
|
"directory-tree": "3.0.1",
|
|
112
114
|
"eslint": "7.32.0",
|
|
115
|
+
"eslint-plugin-react": "7.27.1",
|
|
113
116
|
"fs-extra": "10.0.0",
|
|
114
117
|
"husky": "7.0.4",
|
|
115
118
|
"is-ci": "3.0.1",
|
|
@@ -123,7 +126,7 @@
|
|
|
123
126
|
"stylelint": "14.1.0",
|
|
124
127
|
"svgo": "2.8.0",
|
|
125
128
|
"svgstore": "3.0.1",
|
|
126
|
-
"typescript": "4.5.
|
|
129
|
+
"typescript": "4.5.4",
|
|
127
130
|
"typescript-plugin-css-modules": "3.4.0",
|
|
128
131
|
"yargs": "17.3.0"
|
|
129
132
|
},
|
package/select/select.js
CHANGED
|
@@ -16,3 +16,4 @@ export const Select = forwardRef(({ children, className, disabled = false, icon
|
|
|
16
16
|
React.createElement("select", { disabled: disabled, className: Field, id: uid('select'), multiple: kind === 'multiple', onChange: onChange, ref: forwardedRef, ...otherProps }, children),
|
|
17
17
|
kind === 'single' && (React.createElement(Icon, { className: IconClass, name: icon, dimension: iconSizes[dimension] })))));
|
|
18
18
|
});
|
|
19
|
+
Select.displayName = 'Select';
|
|
@@ -4,3 +4,4 @@ import { Checkbox as CheckboxClass } from './selection-controls.module.css';
|
|
|
4
4
|
export const Checkbox = forwardRef(({ className, disabled, dimension = 'regular', onChange, indeterminate, ...otherProps }, forwardedRef) => {
|
|
5
5
|
return (React.createElement("input", { type: "checkbox", disabled: disabled, "aria-disabled": disabled, "data-control-dimension": dimension, "data-control-indeterminate": indeterminate, onChange: onChange, className: clsx(CheckboxClass, className), ref: forwardedRef, ...otherProps }));
|
|
6
6
|
});
|
|
7
|
+
Checkbox.displayName = 'Checkbox';
|
|
@@ -4,3 +4,4 @@ import { Radio as RadioClass } from './selection-controls.module.css';
|
|
|
4
4
|
export const Radio = forwardRef(({ className, disabled, dimension = 'regular', onChange, ...otherProps }, forwardedRef) => {
|
|
5
5
|
return (React.createElement("input", { type: "radio", disabled: disabled, "aria-disabled": disabled, "data-control-dimension": dimension, onChange: onChange, className: clsx(RadioClass, className), ref: forwardedRef, ...otherProps }));
|
|
6
6
|
});
|
|
7
|
+
Radio.displayName = 'Radio';
|
|
@@ -4,3 +4,4 @@ import { Toggle as ToggleClass } from './selection-controls.module.css';
|
|
|
4
4
|
export const Toggle = forwardRef(({ className, disabled, dimension = 'regular', onChange, ...otherProps }, forwardedRef) => {
|
|
5
5
|
return (React.createElement("input", { type: "checkbox", disabled: disabled, "aria-disabled": disabled, "data-control-dimension": dimension, onChange: onChange, className: clsx(ToggleClass, className), ref: forwardedRef, ...otherProps }));
|
|
6
6
|
});
|
|
7
|
+
Toggle.displayName = 'Toggle';
|
package/separator/separator.js
CHANGED
|
@@ -4,3 +4,4 @@ import { Separator as SeparatorClass } from './separator.module.css';
|
|
|
4
4
|
export const Separator = forwardRef(({ className, ...otherProps }, forwardedRef) => {
|
|
5
5
|
return (React.createElement("hr", { ref: forwardedRef, className: clsx(SeparatorClass, className), ...otherProps }));
|
|
6
6
|
});
|
|
7
|
+
Separator.displayName = 'Separator';
|
package/slider/slider.js
CHANGED
|
@@ -16,3 +16,4 @@ export const Slider = forwardRef(({ min = 0, max = 100, step, onInput, className
|
|
|
16
16
|
showValues && React.createElement(Text, { as: "span", size: isSmall ? 14 : 16, weight: "bold", className: Value }, max),
|
|
17
17
|
(iconMax && !showValues) && React.createElement(Icon, { name: iconMax, dimension: isSmall ? 16 : 24 })));
|
|
18
18
|
});
|
|
19
|
+
Slider.displayName = 'Slider';
|
package/spinner/spinner.js
CHANGED
|
@@ -23,3 +23,4 @@ export const Spinner = forwardRef(({ className, style, color, dimension = 'big'
|
|
|
23
23
|
React.createElement("path", { d: "M36 18c0-9.94-8.06-18-18-18" },
|
|
24
24
|
React.createElement("animateTransform", { attributeName: "transform", type: "rotate", from: "0 18 18", to: "360 18 18", dur: "1s", repeatCount: "indefinite" })))));
|
|
25
25
|
});
|
|
26
|
+
Spinner.displayName = 'Spinner';
|
package/tab/tab-item.js
CHANGED
package/tab/tab-list.js
CHANGED
|
@@ -4,3 +4,4 @@ import clsx from 'clsx';
|
|
|
4
4
|
import { TabList as TabListClass } from './tab.module.css';
|
|
5
5
|
export const TabList = forwardRef(({ children, className, ...otherProps }, forwardedRef) => (React.createElement("div", { ref: forwardedRef, role: "tablist", tabIndex: -1, className: clsx(TabListClass, className), ...otherProps },
|
|
6
6
|
React.createElement(RovingTabIndexProvider, null, children))));
|
|
7
|
+
TabList.displayName = 'Tab.List';
|
package/tab/tab-panel.js
CHANGED
package/tab/tab.js
CHANGED
package/text/text.d.ts
CHANGED
package/text/text.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import { Text as TextClass } from './text.module.css';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
-
export const Text = forwardRef(({ children, className, size, sentiment, dimmed, weight, maxWidth, textAlign = 'start', as: Wrapper = 'p',
|
|
4
|
+
export const Text = forwardRef(({ children, className, size, sentiment, dimmed, weight, maxWidth, textAlign = 'start', as: Wrapper = 'p', style, ...otherProps }, forwardedRef) => {
|
|
5
5
|
const dynamicStyle = {
|
|
6
6
|
'--maxW': maxWidth,
|
|
7
7
|
'--tAlign': textAlign
|
|
8
8
|
};
|
|
9
|
-
return (React.createElement(Wrapper, { ref: forwardedRef, "data-text-size": size, "data-text-weight": weight, "data-text-sentiment": sentiment, "data-text-dimmed": dimmed,
|
|
9
|
+
return (React.createElement(Wrapper, { ref: forwardedRef, "data-text-size": size, "data-text-weight": weight, "data-text-sentiment": sentiment, "data-text-dimmed": dimmed, className: clsx(TextClass, className), style: { ...dynamicStyle, ...style }, ...otherProps }, children));
|
|
10
10
|
});
|
package/text/text.module.css
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
+
@import '../core/media.css';
|
|
2
|
+
|
|
1
3
|
.Text {
|
|
2
4
|
line-height: 1.5;
|
|
3
5
|
min-block-size: 0.01vh;
|
|
4
|
-
font-size: var(--
|
|
6
|
+
font-size: var(--fs-min);
|
|
5
7
|
max-inline-size: var(--maxW, initial);
|
|
6
8
|
text-align: var(--tAlign);
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
font-size:
|
|
10
|
-
clamp(
|
|
11
|
-
var(--fluid-type-min, env(--font-size-16)),
|
|
12
|
-
var(--fluid-type-factor, calc(0.6rem + 0.92vw)),
|
|
13
|
-
var(--fluid-type-max, 1rem)
|
|
14
|
-
);
|
|
10
|
+
@media (--from-small) {
|
|
11
|
+
font-size: var(--fs-max);
|
|
15
12
|
}
|
|
16
13
|
|
|
17
14
|
/* Colors */
|
|
@@ -52,29 +49,25 @@
|
|
|
52
49
|
}
|
|
53
50
|
|
|
54
51
|
&[data-text-size='16'] {
|
|
55
|
-
--
|
|
56
|
-
--
|
|
57
|
-
--fluid-type-max: env(--font-size-16);
|
|
52
|
+
--fs-min: env(--font-size-14);
|
|
53
|
+
--fs-max: env(--font-size-16);
|
|
58
54
|
|
|
59
55
|
line-height: 1.2;
|
|
60
56
|
}
|
|
61
57
|
|
|
62
58
|
&[data-text-size='18'] {
|
|
63
|
-
--
|
|
64
|
-
--
|
|
65
|
-
--fluid-type-max: env(--font-size-18);
|
|
59
|
+
--fs-min: env(--font-size-16);
|
|
60
|
+
--fs-max: env(--font-size-18);
|
|
66
61
|
}
|
|
67
62
|
|
|
68
63
|
&[data-text-size='22'] {
|
|
69
|
-
--
|
|
70
|
-
--
|
|
71
|
-
--fluid-type-max: env(--font-size-22);
|
|
64
|
+
--fs-min: env(--font-size-18);
|
|
65
|
+
--fs-max: env(--font-size-22);
|
|
72
66
|
}
|
|
73
67
|
|
|
74
68
|
&[data-text-size='28'] {
|
|
75
|
-
--
|
|
76
|
-
--
|
|
77
|
-
--fluid-type-max: env(--font-size-28);
|
|
69
|
+
--fs-min: env(--font-size-22);
|
|
70
|
+
--fs-max: env(--font-size-28);
|
|
78
71
|
}
|
|
79
72
|
|
|
80
73
|
/* Weights */
|
package/textfield/textfield.js
CHANGED
|
@@ -36,3 +36,4 @@ export const Textfield = forwardRef(({ children, className, disabled = false, ic
|
|
|
36
36
|
isPassword && (React.createElement(IconButton, { className: IconButtonClass, dimension: actionSizes[dimension], onClick: handlePasswordVisibility, kind: "flat", "aria-label": "Reveal password", icon: passwordVisible ? 'eye-slash' : 'eye' })),
|
|
37
37
|
!textarea && icon && type !== 'password' && (React.createElement(Icon, { className: IconClass, name: icon, dimension: iconSizes[dimension] })))));
|
|
38
38
|
});
|
|
39
|
+
Textfield.displayName = 'Textfield';
|
package/themes/dark.css
CHANGED
package/themes/light.css
CHANGED
package/themes.css
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
color: var(--global-foreground);
|
|
5
5
|
/**
|
|
6
6
|
* Do not edit directly
|
|
7
|
-
* Generated on
|
|
7
|
+
* Generated on Tue, 14 Dec 2021 09:06:57 GMT
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
color: var(--global-foreground);
|
|
52
52
|
/**
|
|
53
53
|
* Do not edit directly
|
|
54
|
-
* Generated on
|
|
54
|
+
* Generated on Tue, 14 Dec 2021 09:06:57 GMT
|
|
55
55
|
*/
|
|
56
56
|
|
|
57
57
|
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
color: var(--global-foreground);
|
|
100
100
|
/**
|
|
101
101
|
* Do not edit directly
|
|
102
|
-
* Generated on
|
|
102
|
+
* Generated on Tue, 14 Dec 2021 09:06:57 GMT
|
|
103
103
|
*/
|
|
104
104
|
|
|
105
105
|
|
package/title/title.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ export declare type TitleProps = {
|
|
|
4
4
|
lineHeight?: 'none' | 'small' | 'large';
|
|
5
5
|
textAlign?: 'start' | 'center' | 'end';
|
|
6
6
|
maxWidth?: string;
|
|
7
|
-
fluid?: boolean;
|
|
8
7
|
};
|
|
9
8
|
declare type PolymorphicTitle = Polymorphic.ForwardRefComponent<'span', TitleProps>;
|
|
10
9
|
export declare const Title: PolymorphicTitle;
|
package/title/title.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import * as styles from './title.module.css';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
-
export const Title = forwardRef(({ children, className, as: Wrapper = 'span', lineHeight = 'small', level = '1',
|
|
4
|
+
export const Title = forwardRef(({ children, className, as: Wrapper = 'span', lineHeight = 'small', level = '1', textAlign = 'start', maxWidth, style, ...otherProps }, forwardedRef) => {
|
|
5
5
|
const computedLevel = level.match(/\d/g) ? `H${level}` : level.charAt(0).toUpperCase() + level.slice(1);
|
|
6
6
|
const dynamicStyle = {
|
|
7
7
|
'--maxW': maxWidth,
|
|
8
8
|
'--tAlign': textAlign
|
|
9
9
|
};
|
|
10
|
-
return (React.createElement(Wrapper, { ref: forwardedRef, "data-title-line-height": lineHeight,
|
|
10
|
+
return (React.createElement(Wrapper, { ref: forwardedRef, "data-title-line-height": lineHeight, className: clsx(styles.Title, styles[computedLevel], className), style: { ...dynamicStyle, ...style }, ...otherProps }, children));
|
|
11
11
|
});
|
package/title/title.module.css
CHANGED
|
@@ -1,84 +1,81 @@
|
|
|
1
|
+
@import '../core/media.css';
|
|
2
|
+
|
|
1
3
|
.Title {
|
|
2
4
|
&:is(.H1, .H2, .H3, .H4, .H5, .H6, .Display) {
|
|
5
|
+
--lh: 0.3;
|
|
6
|
+
|
|
3
7
|
display: block;
|
|
4
8
|
line-height: env(--font-lh-small);
|
|
5
9
|
color: var(--heading-foreground);
|
|
6
10
|
min-block-size: 0.01vh;
|
|
7
|
-
font-size: var(--
|
|
11
|
+
font-size: var(--fs-min);
|
|
8
12
|
max-inline-size: var(--maxW, initial);
|
|
9
13
|
text-align: var(--tAlign);
|
|
10
14
|
overflow-wrap: break-word;
|
|
11
15
|
|
|
12
|
-
|
|
13
|
-
font-size:
|
|
14
|
-
clamp(
|
|
15
|
-
var(--fluid-type-min, env(--font-size-16)),
|
|
16
|
-
var(--fluid-type-factor, calc(0.6rem + 0.92vw)),
|
|
17
|
-
var(--fluid-type-max, 1rem)
|
|
18
|
-
);
|
|
16
|
+
@media (--from-small) {
|
|
17
|
+
font-size: var(--fs-max);
|
|
19
18
|
}
|
|
20
19
|
|
|
21
|
-
&[data-title-line-height='none'] {
|
|
22
|
-
line-height: 0.3;
|
|
23
|
-
}
|
|
24
20
|
|
|
25
21
|
&[data-title-line-height='small'] {
|
|
26
|
-
|
|
22
|
+
--lh: 1.33;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&::before {
|
|
26
|
+
content: '';
|
|
27
|
+
display: block;
|
|
28
|
+
height: 0;
|
|
29
|
+
width: 0;
|
|
30
|
+
margin-top: calc((1 - var(--lh)) * 0.6em);
|
|
27
31
|
}
|
|
28
32
|
}
|
|
29
33
|
|
|
30
34
|
&:is(.H6) {
|
|
31
|
-
--
|
|
32
|
-
--
|
|
33
|
-
--fluid-type-max: env(--font-size-18);
|
|
35
|
+
--fs-min: env(--font-size-14);
|
|
36
|
+
--fs-max: env(--font-size-18);
|
|
34
37
|
|
|
35
38
|
font-weight: 700;
|
|
36
39
|
}
|
|
37
40
|
|
|
38
41
|
&:is(.H5) {
|
|
39
|
-
--
|
|
40
|
-
--
|
|
41
|
-
--fluid-type-max: 1.33rem;
|
|
42
|
+
--fs-min: 1rem;
|
|
43
|
+
--fs-max: 1.33rem;
|
|
42
44
|
|
|
43
45
|
font-weight: 700;
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
&:is(.H4) {
|
|
47
|
-
--
|
|
48
|
-
--
|
|
49
|
-
--fluid-type-max: 1.77rem;
|
|
49
|
+
--fs-min: 1.33rem;
|
|
50
|
+
--fs-max: 1.77rem;
|
|
50
51
|
|
|
51
52
|
font-weight: 700;
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
&:is(.H3) {
|
|
55
|
-
--
|
|
56
|
-
--
|
|
57
|
-
--fluid-type-max: 2.37rem;
|
|
56
|
+
--fs-min: 1.77rem;
|
|
57
|
+
--fs-max: 2.37rem;
|
|
58
58
|
|
|
59
59
|
font-weight: 800;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
&:is(.H2) {
|
|
63
|
-
--
|
|
64
|
-
--
|
|
65
|
-
--fluid-type-max: 3.16rem;
|
|
63
|
+
--fs-min: 2.37rem;
|
|
64
|
+
--fs-max: 3.16rem;
|
|
66
65
|
|
|
67
66
|
font-weight: 800;
|
|
68
67
|
}
|
|
69
68
|
|
|
70
69
|
&:is(.H1) {
|
|
71
|
-
--
|
|
72
|
-
--
|
|
73
|
-
--fluid-type-max: 4.2rem;
|
|
70
|
+
--fs-min: 3.16rem;
|
|
71
|
+
--fs-max: 4.2rem;
|
|
74
72
|
|
|
75
73
|
font-weight: 800;
|
|
76
74
|
}
|
|
77
75
|
|
|
78
76
|
&.Display {
|
|
79
|
-
--
|
|
80
|
-
--
|
|
81
|
-
--fluid-type-max: 5.6rem;
|
|
77
|
+
--fs-min: 4.2rem;
|
|
78
|
+
--fs-max: 5.6rem;
|
|
82
79
|
|
|
83
80
|
font-weight: 800;
|
|
84
81
|
}
|