@veracity/vui 0.3.0 → 0.3.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.d.ts +2 -2
- package/avatar/avatar.js +9 -29
- package/avatar/avatar.types.d.ts +9 -2
- package/avatar/helpers.d.ts +2 -0
- package/avatar/helpers.js +26 -0
- package/avatar/index.d.ts +1 -1
- package/avatar/index.js +1 -1
- package/avatar/theme.d.ts +1 -0
- package/avatar/theme.js +7 -0
- package/box/box.d.ts +2 -2
- package/box/box.js +9 -8
- package/box/box.types.d.ts +13 -2
- package/box/index.d.ts +1 -1
- package/box/index.js +1 -1
- package/box/theme.d.ts +1 -0
- package/box/theme.js +2 -0
- package/button/button.d.ts +7 -3
- package/button/button.js +24 -14
- package/button/button.types.d.ts +12 -30
- package/button/buttonIcon.d.ts +1 -0
- package/button/buttonIcon.js +3 -5
- package/button/buttonText.d.ts +1 -0
- package/button/buttonText.js +3 -5
- package/button/buttons.js +1 -1
- package/button/index.d.ts +2 -2
- package/button/index.js +3 -3
- package/button/theme.d.ts +1 -0
- package/button/theme.js +5 -3
- package/buttonGroup/buttonGroup.d.ts +5 -2
- package/buttonGroup/buttonGroup.js +12 -8
- package/buttonGroup/buttonGroup.types.d.ts +4 -2
- package/buttonGroup/helpers.d.ts +1 -1
- package/buttonGroup/helpers.js +1 -1
- package/buttonGroup/index.d.ts +1 -1
- package/buttonGroup/index.js +2 -2
- package/card/card.d.ts +4 -0
- package/card/card.js +8 -0
- package/card/card.types.d.ts +3 -2
- package/card/index.d.ts +1 -1
- package/card/index.js +1 -1
- package/card/theme.d.ts +1 -0
- package/card/theme.js +2 -0
- package/checkbox/checkbox.d.ts +5 -4
- package/checkbox/checkbox.js +20 -10
- package/checkbox/checkbox.types.d.ts +21 -4
- package/checkbox/checkboxGroup.d.ts +5 -2
- package/checkbox/checkboxGroup.js +11 -7
- package/checkbox/checkboxGroup.types.d.ts +9 -2
- package/checkbox/index.d.ts +1 -1
- package/checkbox/index.js +2 -2
- package/checkbox/theme.d.ts +1 -0
- package/checkbox/theme.js +2 -0
- package/core/index.d.ts +4 -5
- package/core/index.js +4 -12
- package/core/media.d.ts +38 -0
- package/core/media.js +79 -0
- package/core/styled.d.ts +3 -0
- package/core/styled.js +21 -3
- package/core/theme.d.ts +41 -0
- package/core/theme.js +94 -0
- package/core/vui.d.ts +31 -0
- package/core/vui.js +20 -0
- package/core/vuiProvider/fontFaces.js +4 -0
- package/core/{globalStyle.d.ts → vuiProvider/globalStyle.d.ts} +7 -0
- package/core/{globalStyle.js → vuiProvider/globalStyle.js} +17 -9
- package/core/vuiProvider/index.d.ts +5 -0
- package/{styles → core/vuiProvider}/index.js +8 -2
- package/core/vuiProvider/resetCSS.d.ts +3 -0
- package/core/{resetCSS.js → vuiProvider/resetCSS.js} +2 -1
- package/core/vuiProvider/vuiProvider.d.ts +13 -0
- package/core/{vuiProvider.js → vuiProvider/vuiProvider.js} +4 -1
- package/divider/divider.d.ts +2 -2
- package/divider/divider.js +5 -4
- package/divider/divider.types.d.ts +5 -2
- package/divider/index.d.ts +1 -1
- package/divider/index.js +1 -1
- package/divider/theme.d.ts +1 -0
- package/divider/theme.js +2 -0
- package/footer/consts.d.ts +3 -0
- package/footer/consts.js +3 -0
- package/footer/footer.d.ts +3 -1
- package/footer/footer.js +21 -10
- package/footer/footer.types.d.ts +5 -0
- package/footer/footerColumn.d.ts +122 -121
- package/footer/footerColumn.js +1 -0
- package/footer/footerHeading.d.ts +1 -0
- package/footer/footerHeading.js +1 -0
- package/footer/footerLink.d.ts +1 -0
- package/footer/footerLink.js +1 -0
- package/footer/footerRow.d.ts +1 -0
- package/footer/footerRow.js +1 -0
- package/footer/footerSection.d.ts +1 -0
- package/footer/footerSection.js +2 -1
- package/footer/footerTrademark.d.ts +1 -0
- package/footer/footerTrademark.js +1 -0
- package/footer/index.d.ts +2 -1
- package/footer/index.js +2 -2
- package/footer/theme.d.ts +1 -0
- package/footer/theme.js +2 -0
- package/header/context.d.ts +4 -0
- package/header/context.js +23 -0
- package/header/header.d.ts +34 -0
- package/header/header.js +118 -0
- package/header/header.types.d.ts +84 -0
- package/header/headerContent.d.ts +4 -0
- package/header/headerContent.js +28 -0
- package/header/headerCreateAccount.d.ts +4 -0
- package/header/headerCreateAccount.js +44 -0
- package/header/headerDivider.d.ts +4 -0
- package/header/headerDivider.js +28 -0
- package/header/headerLink.d.ts +4 -0
- package/header/headerLink.js +43 -0
- package/header/headerLinks.d.ts +4 -0
- package/header/headerLinks.js +41 -0
- package/header/headerLogo.d.ts +4 -0
- package/header/headerLogo.js +48 -0
- package/header/headerMobileContent.d.ts +4 -0
- package/header/headerMobileContent.js +30 -0
- package/header/headerMobileToggle.d.ts +4 -0
- package/header/headerMobileToggle.js +34 -0
- package/header/headerNotifications.d.ts +4 -0
- package/header/headerNotifications.js +52 -0
- package/header/headerProfile.d.ts +4 -0
- package/header/headerProfile.js +101 -0
- package/header/headerProfile.types.d.ts +35 -0
- package/header/headerServices.d.ts +4 -0
- package/header/headerServices.js +51 -0
- package/header/headerSignIn.d.ts +4 -0
- package/header/headerSignIn.js +40 -0
- package/header/index.d.ts +17 -0
- package/header/index.js +34 -0
- package/header/loggedInHeader.d.ts +4 -0
- package/header/loggedInHeader.js +53 -0
- package/header/loggedOutHeader.d.ts +4 -0
- package/header/loggedOutHeader.js +54 -0
- package/header/theme.d.ts +32 -0
- package/header/theme.js +52 -0
- package/heading/heading.d.ts +2 -2
- package/heading/heading.js +5 -4
- package/heading/heading.types.d.ts +7 -2
- package/heading/headings.js +1 -1
- package/heading/index.d.ts +1 -1
- package/heading/index.js +2 -2
- package/heading/theme.d.ts +1 -0
- package/heading/theme.js +2 -0
- package/icon/helpers.js +2 -2
- package/icon/icon.d.ts +1 -0
- package/icon/icon.js +2 -2
- package/icon/icon.types.d.ts +7 -4
- package/icon/index.d.ts +1 -1
- package/icon/index.js +1 -1
- package/icon/theme.d.ts +1 -0
- package/icon/theme.js +2 -0
- package/icons/baseIcons/fal/falFileInvoiceDollar.d.ts +3 -0
- package/icons/baseIcons/fal/falFileInvoiceDollar.js +7 -0
- package/icons/baseIcons/icons.d.ts +1 -0
- package/icons/baseIcons/icons.js +5 -3
- package/icons/baseIcons/types.d.ts +1 -1
- package/icons/cache.d.ts +15 -0
- package/icons/{library.js → cache.js} +10 -6
- package/icons/index.d.ts +1 -1
- package/icons/index.js +3 -3
- package/icons/types.d.ts +10 -3
- package/image/image.d.ts +2 -0
- package/image/image.js +11 -2
- package/image/image.types.d.ts +3 -2
- package/image/index.d.ts +1 -1
- package/image/index.js +1 -1
- package/image/theme.d.ts +1 -0
- package/image/theme.js +2 -0
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/input/helpers.d.ts +1 -0
- package/input/helpers.js +1 -0
- package/input/index.d.ts +1 -1
- package/input/index.js +2 -2
- package/input/input.d.ts +7 -3
- package/input/input.js +17 -7
- package/input/input.types.d.ts +33 -4
- package/input/inputIcon.d.ts +1 -0
- package/input/inputIcon.js +2 -1
- package/input/inputInput.d.ts +2 -2
- package/input/inputInput.js +10 -5
- package/input/theme.d.ts +1 -0
- package/input/theme.js +2 -0
- package/link/index.d.ts +1 -1
- package/link/index.js +2 -2
- package/link/link.d.ts +6 -3
- package/link/link.js +15 -9
- package/link/link.types.d.ts +12 -4
- package/link/linkIcon.d.ts +1 -0
- package/link/linkIcon.js +3 -5
- package/link/linkText.d.ts +1 -0
- package/link/linkText.js +3 -5
- package/link/theme.d.ts +6 -0
- package/link/theme.js +9 -1
- package/list/index.d.ts +1 -1
- package/list/index.js +2 -2
- package/list/list.d.ts +3 -3
- package/list/list.js +13 -8
- package/list/list.types.d.ts +29 -8
- package/list/listDivider.d.ts +1 -0
- package/list/listDivider.js +3 -5
- package/list/listHeading.d.ts +1 -0
- package/list/listHeading.js +4 -6
- package/list/listIcon.d.ts +1 -0
- package/list/listIcon.js +3 -5
- package/list/listItem.d.ts +5 -2
- package/list/listItem.js +52 -19
- package/list/listText.d.ts +1 -0
- package/list/listText.js +3 -5
- package/list/theme.d.ts +1 -0
- package/list/theme.js +5 -2
- package/menu/menu.d.ts +1 -0
- package/menu/menu.js +1 -0
- package/menu/menu.types.d.ts +3 -0
- package/menu/menuButton.d.ts +1 -0
- package/menu/menuButton.js +3 -4
- package/menu/menuItem.d.ts +1 -0
- package/menu/menuItem.js +2 -1
- package/menu/menuList.d.ts +1 -0
- package/menu/menuList.js +3 -4
- package/menu/theme.d.ts +16 -2
- package/menu/theme.js +18 -3
- package/notification/index.d.ts +2 -2
- package/notification/index.js +3 -3
- package/notification/notification.d.ts +5 -1
- package/notification/notification.js +12 -27
- package/notification/notification.types.d.ts +10 -2
- package/notification/notificationButton.d.ts +1 -0
- package/notification/notificationButton.js +4 -5
- package/notification/notificationIcon.d.ts +1 -0
- package/notification/notificationIcon.js +7 -7
- package/notification/notificationText.d.ts +1 -0
- package/notification/notificationText.js +3 -5
- package/notification/notificationTitle.d.ts +1 -0
- package/notification/notificationTitle.js +3 -5
- package/notification/theme.d.ts +1 -0
- package/notification/theme.js +2 -0
- package/p/index.d.ts +1 -1
- package/p/index.js +1 -1
- package/p/p.d.ts +2 -2
- package/p/p.js +5 -4
- package/p/p.types.d.ts +7 -2
- package/p/theme.d.ts +1 -0
- package/p/theme.js +2 -0
- package/package.json +1 -1
- package/panel/index.d.ts +1 -1
- package/panel/index.js +1 -1
- package/panel/panel.d.ts +4 -0
- package/panel/panel.js +4 -0
- package/panel/panel.types.d.ts +1 -2
- package/panel/theme.d.ts +1 -0
- package/panel/theme.js +2 -0
- package/popover/consts.d.ts +6 -0
- package/popover/consts.js +42 -0
- package/popover/index.d.ts +2 -1
- package/popover/index.js +4 -2
- package/popover/popover.d.ts +5 -2
- package/popover/popover.js +16 -2
- package/popover/popover.types.d.ts +4 -1
- package/popover/popoverContent.d.ts +2 -1
- package/popover/popoverContent.js +6 -1
- package/popover/popoverStyle.js +9 -0
- package/popover/popoverTrigger.d.ts +4 -0
- package/popover/popoverTrigger.js +4 -0
- package/popover/theme.d.ts +1 -0
- package/popover/theme.js +2 -0
- package/popover/usePopover.d.ts +5 -0
- package/popover/usePopover.js +21 -11
- package/popover/usePopover.types.d.ts +17 -6
- package/radio/index.d.ts +1 -1
- package/radio/index.js +2 -2
- package/radio/radio.d.ts +5 -4
- package/radio/radio.js +20 -10
- package/radio/radio.types.d.ts +19 -4
- package/radio/radioGroup.d.ts +5 -2
- package/radio/radioGroup.js +11 -7
- package/radio/radioGroup.types.d.ts +10 -2
- package/radio/theme.d.ts +1 -0
- package/radio/theme.js +2 -0
- package/skeleton/index.d.ts +1 -1
- package/skeleton/index.js +1 -1
- package/skeleton/skeleton.d.ts +2 -2
- package/skeleton/skeleton.js +4 -3
- package/skeleton/skeleton.types.d.ts +5 -2
- package/skeleton/theme.d.ts +1 -0
- package/skeleton/theme.js +2 -0
- package/spinner/index.d.ts +1 -1
- package/spinner/index.js +1 -1
- package/spinner/spinner.d.ts +6 -2
- package/spinner/spinner.js +12 -5
- package/spinner/spinner.types.d.ts +10 -6
- package/spinner/theme.d.ts +1 -0
- package/spinner/theme.js +2 -0
- package/svg/helpers.d.ts +1 -1
- package/svg/index.d.ts +1 -1
- package/svg/index.js +1 -1
- package/svg/svg.d.ts +6 -1
- package/svg/svg.js +14 -5
- package/svg/svg.types.d.ts +6 -4
- package/switch/context.d.ts +2 -2
- package/switch/index.d.ts +1 -1
- package/switch/index.js +2 -2
- package/switch/switch.d.ts +6 -3
- package/switch/switch.js +15 -12
- package/switch/switch.types.d.ts +37 -4
- package/switch/switchButton.d.ts +5 -5
- package/switch/switchButton.js +34 -26
- package/switch/switchLabel.d.ts +1 -0
- package/switch/switchLabel.js +3 -5
- package/switch/theme.d.ts +1 -0
- package/switch/theme.js +2 -0
- package/system/animations.d.ts +3 -4
- package/system/backgrounds.d.ts +4 -5
- package/system/borders.d.ts +60 -61
- package/system/custom.d.ts +4 -4
- package/system/effects.d.ts +7 -8
- package/system/flexboxGrids.d.ts +5 -6
- package/system/flexboxes.d.ts +28 -29
- package/system/grids.d.ts +25 -26
- package/system/index.d.ts +0 -1
- package/system/index.js +0 -6
- package/system/interactivity.d.ts +11 -12
- package/system/layout.d.ts +31 -32
- package/system/sizing.d.ts +13 -14
- package/system/space.d.ts +37 -38
- package/system/system.d.ts +4 -5
- package/system/system.js +3 -1
- package/system/tables.d.ts +5 -6
- package/system/transforms.d.ts +22 -23
- package/system/transitions.d.ts +11 -12
- package/system/typography.d.ts +33 -34
- package/t/index.d.ts +1 -1
- package/t/index.js +1 -1
- package/t/t.d.ts +2 -2
- package/t/t.js +5 -4
- package/t/t.types.d.ts +8 -2
- package/t/theme.d.ts +1 -0
- package/t/theme.js +2 -0
- package/tag/index.d.ts +1 -1
- package/tag/index.js +2 -2
- package/tag/tag.d.ts +6 -3
- package/tag/tag.js +14 -7
- package/tag/tag.types.d.ts +16 -2
- package/tag/tagButton.d.ts +1 -0
- package/tag/tagButton.js +4 -16
- package/tag/tagIcon.d.ts +1 -0
- package/tag/tagIcon.js +3 -5
- package/tag/tagText.d.ts +1 -0
- package/tag/tagText.js +3 -5
- package/tag/theme.d.ts +1 -0
- package/tag/theme.js +8 -0
- package/textarea/helpers.d.ts +1 -0
- package/textarea/helpers.js +1 -0
- package/textarea/index.d.ts +1 -1
- package/textarea/index.js +1 -1
- package/textarea/textarea.d.ts +5 -3
- package/textarea/textarea.js +23 -10
- package/textarea/textarea.types.d.ts +22 -2
- package/textarea/theme.d.ts +1 -0
- package/textarea/theme.js +2 -0
- package/theme/components.d.ts +76 -2
- package/theme/components.js +38 -36
- package/theme/defaultTheme.d.ts +81 -2
- package/theme/foundations/colors.d.ts +10 -0
- package/theme/foundations/colors.js +8 -2
- package/theme/foundations/index.d.ts +5 -0
- package/theme/foundations/shadows.js +3 -3
- package/theme/foundations/transformers.js +3 -2
- package/theme/index.d.ts +1 -3
- package/theme/index.js +4 -5
- package/theme/types.d.ts +3 -2
- package/utils/assertion.d.ts +5 -5
- package/utils/assertion.js +8 -4
- package/utils/object.d.ts +2 -2
- package/utils/object.js +3 -1
- package/utils/styles.d.ts +2 -2
- package/utils/styles.js +4 -4
- package/utils/types.d.ts +8 -3
- package/core/types/component.d.ts +0 -25
- package/core/types/index.d.ts +0 -2
- package/core/types/index.js +0 -14
- package/core/types/themeGet.d.ts +0 -24
- package/core/utils.d.ts +0 -56
- package/core/utils.js +0 -194
- package/core/vuiProvider.d.ts +0 -20
- package/icons/library.d.ts +0 -11
- package/popover/plugins.d.ts +0 -3
- package/popover/plugins.js +0 -24
- package/styles/fontFaces.js +0 -4
- package/styles/helpers.d.ts +0 -4
- package/styles/helpers.js +0 -8
- package/styles/index.d.ts +0 -3
- /package/{styles → core/vuiProvider}/animations.d.ts +0 -0
- /package/{styles → core/vuiProvider}/animations.js +0 -0
- /package/{styles → core/vuiProvider}/fontFaces.d.ts +0 -0
- /package/{core/types/component.js → header/header.types.js} +0 -0
- /package/{core/types/themeGet.js → header/headerProfile.types.js} +0 -0
- /package/{core/resetCSS.d.ts → popover/popoverStyle.d.ts} +0 -0
package/list/listText.js
CHANGED
|
@@ -16,14 +16,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.ListText = void 0;
|
|
18
18
|
var react_1 = __importDefault(require("react"));
|
|
19
|
-
var context_1 = require("./context");
|
|
20
19
|
var core_1 = require("../core");
|
|
21
20
|
var t_1 = __importDefault(require("../t"));
|
|
21
|
+
var context_1 = require("./context");
|
|
22
|
+
/** Displays text within the ListItem. */
|
|
22
23
|
exports.ListText = (0, core_1.vui)(function (props, ref) {
|
|
23
|
-
var
|
|
24
|
-
var listProps = (_a = (0, context_1.useList)()) !== null && _a !== void 0 ? _a : {};
|
|
25
|
-
var mergedProps = __assign(__assign({}, listProps), props);
|
|
26
|
-
var styles = (0, core_1.useStyleConfig)('List', mergedProps);
|
|
24
|
+
var styles = (0, core_1.useStyleConfig)('List', __assign(__assign({}, (0, context_1.useList)()), props));
|
|
27
25
|
return react_1.default.createElement(t_1.default, __assign({ className: "vui-listText", fontSize: "inherit", ref: ref }, styles.text, props));
|
|
28
26
|
});
|
|
29
27
|
exports.ListText.displayName = 'ListText';
|
package/list/theme.d.ts
CHANGED
package/list/theme.js
CHANGED
|
@@ -4,11 +4,13 @@ function variantDefault(props) {
|
|
|
4
4
|
var c = props.colorScheme;
|
|
5
5
|
var item = {
|
|
6
6
|
activeBg: c + ".30",
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
hoverBg: c + ".20",
|
|
8
|
+
selectedBg: c + ".10",
|
|
9
|
+
px: 2
|
|
9
10
|
};
|
|
10
11
|
return { item: item };
|
|
11
12
|
}
|
|
13
|
+
var baseStyle = {};
|
|
12
14
|
var defaultProps = {
|
|
13
15
|
colorScheme: 'blue',
|
|
14
16
|
size: 'md',
|
|
@@ -81,6 +83,7 @@ var variants = {
|
|
|
81
83
|
}
|
|
82
84
|
};
|
|
83
85
|
exports.default = {
|
|
86
|
+
baseStyle: baseStyle,
|
|
84
87
|
defaultProps: defaultProps,
|
|
85
88
|
parts: parts,
|
|
86
89
|
sizes: sizes,
|
package/menu/menu.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { MenuProps } from './menu.types';
|
|
3
|
+
/** Wraps Popover component and exposes some props to the children via context. */
|
|
3
4
|
declare function Menu(props: MenuProps): JSX.Element;
|
|
4
5
|
declare namespace Menu {
|
|
5
6
|
var Button: import("..").VuiComponent<"button", import("..").ButtonProps>;
|
package/menu/menu.js
CHANGED
|
@@ -51,6 +51,7 @@ var context_1 = require("./context");
|
|
|
51
51
|
var menuButton_1 = __importDefault(require("./menuButton"));
|
|
52
52
|
var menuItem_1 = __importDefault(require("./menuItem"));
|
|
53
53
|
var menuList_1 = __importDefault(require("./menuList"));
|
|
54
|
+
/** Wraps Popover component and exposes some props to the children via context. */
|
|
54
55
|
function Menu(props) {
|
|
55
56
|
var _a = props.closeOnSelect, closeOnSelect = _a === void 0 ? true : _a, size = props.size, variant = props.variant, rest = __rest(props, ["closeOnSelect", "size", "variant"]);
|
|
56
57
|
var context = (0, react_1.useMemo)(function () { return (0, utils_1.filterUndefined)({ closeOnSelect: closeOnSelect, size: size, variant: variant }); }, [closeOnSelect, size, variant]);
|
package/menu/menu.types.d.ts
CHANGED
|
@@ -3,9 +3,12 @@ import { ListProps } from '../list';
|
|
|
3
3
|
import { PopoverContentProps, PopoverProps } from '../popover';
|
|
4
4
|
import { ThemingProps } from '../theme';
|
|
5
5
|
export declare type MenuListProps = ListProps & {
|
|
6
|
+
/** Props object passed to the inner PopoverContent. */
|
|
6
7
|
contentProps?: PopoverContentProps;
|
|
8
|
+
/** Ref passed to the inner PopoverContent. */
|
|
7
9
|
contentRef?: RefObject<HTMLDivElement>;
|
|
8
10
|
};
|
|
9
11
|
export declare type MenuProps = ThemingProps<'Menu'> & PopoverProps & {
|
|
12
|
+
/** Content closes when clicking on a list item. */
|
|
10
13
|
closeOnSelect?: boolean;
|
|
11
14
|
};
|
package/menu/menuButton.d.ts
CHANGED
package/menu/menuButton.js
CHANGED
|
@@ -20,11 +20,10 @@ var button_1 = require("../button");
|
|
|
20
20
|
var core_1 = require("../core");
|
|
21
21
|
var popover_1 = require("../popover");
|
|
22
22
|
var context_1 = require("./context");
|
|
23
|
+
/** Displays PopoverTrigger as a button. */
|
|
23
24
|
exports.MenuButton = (0, core_1.vui)(function (props, ref) {
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
var styles = (0, core_1.useStyleConfig)('Menu', __assign(__assign({}, menuProps), props));
|
|
27
|
-
return react_1.default.createElement(popover_1.PopoverTrigger, __assign({ as: button_1.AppButton, className: "vui-menuButton", ref: ref }, styles.button, props));
|
|
25
|
+
var styles = (0, core_1.useStyleConfig)('Menu', __assign(__assign({}, (0, context_1.useMenuContext)()), props));
|
|
26
|
+
return react_1.default.createElement(popover_1.PopoverTrigger, __assign({ as: button_1.TextButton, className: "vui-menuButton", ref: ref }, styles.button, props));
|
|
28
27
|
});
|
|
29
28
|
exports.MenuButton.displayName = 'MenuButton';
|
|
30
29
|
exports.default = exports.MenuButton;
|
package/menu/menuItem.d.ts
CHANGED
package/menu/menuItem.js
CHANGED
|
@@ -43,10 +43,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
43
43
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
44
44
|
exports.MenuItem = void 0;
|
|
45
45
|
var react_1 = __importStar(require("react"));
|
|
46
|
-
var context_1 = require("./context");
|
|
47
46
|
var core_1 = require("../core");
|
|
48
47
|
var list_1 = require("../list");
|
|
49
48
|
var popover_1 = require("../popover");
|
|
49
|
+
var context_1 = require("./context");
|
|
50
|
+
/** Displays a list item and by default closes the menu on click. */
|
|
50
51
|
exports.MenuItem = (0, core_1.vui)(function (props, ref) {
|
|
51
52
|
var _a, _b;
|
|
52
53
|
var onClickProp = props.onClick, rest = __rest(props, ["onClick"]);
|
package/menu/menuList.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { VuiComponent } from '../core';
|
|
2
2
|
import List from '../list';
|
|
3
3
|
import { MenuListProps } from './menu.types';
|
|
4
|
+
/** Displays a list of menu items in a popover content element. */
|
|
4
5
|
export declare const MenuList: VuiComponent<"ul", MenuListProps> & {
|
|
5
6
|
Divider: typeof List.Divider;
|
|
6
7
|
Heading: typeof List.Heading;
|
package/menu/menuList.js
CHANGED
|
@@ -31,13 +31,12 @@ var core_1 = require("../core");
|
|
|
31
31
|
var list_1 = __importDefault(require("../list"));
|
|
32
32
|
var popover_1 = require("../popover");
|
|
33
33
|
var context_1 = require("./context");
|
|
34
|
+
/** Displays a list of menu items in a popover content element. */
|
|
34
35
|
exports.MenuList = (0, core_1.vui)(function (props, ref) {
|
|
35
|
-
var _a;
|
|
36
36
|
var contentProps = props.contentProps, contentRef = props.contentRef, rest = __rest(props, ["contentProps", "contentRef"]);
|
|
37
|
-
var
|
|
38
|
-
var styles = (0, core_1.useStyleConfig)('Menu', __assign(__assign({}, menuProps), props));
|
|
37
|
+
var styles = (0, core_1.useStyleConfig)('Menu', __assign(__assign({}, (0, context_1.useMenuContext)()), props));
|
|
39
38
|
return (react_1.default.createElement(popover_1.PopoverContent, __assign({ ref: contentRef }, contentProps),
|
|
40
|
-
react_1.default.createElement(list_1.default, __assign({ className: "vui-menuList",
|
|
39
|
+
react_1.default.createElement(list_1.default, __assign({ className: "vui-menuList", py: 1, ref: ref }, styles.list, rest))));
|
|
41
40
|
});
|
|
42
41
|
exports.MenuList.displayName = 'MenuList';
|
|
43
42
|
exports.MenuList.Divider = list_1.default.Divider;
|
package/menu/theme.d.ts
CHANGED
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
|
|
2
|
+
baseStyle: {};
|
|
3
|
+
defaultProps: {
|
|
4
|
+
size: string;
|
|
5
|
+
};
|
|
3
6
|
parts: string[];
|
|
4
|
-
sizes: {
|
|
7
|
+
sizes: {
|
|
8
|
+
md: {
|
|
9
|
+
list: {
|
|
10
|
+
size: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
lg: {
|
|
14
|
+
list: {
|
|
15
|
+
size: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
5
19
|
variants: {};
|
|
6
20
|
};
|
|
7
21
|
export default _default;
|
package/menu/theme.js
CHANGED
|
@@ -1,10 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
|
|
3
|
+
var baseStyle = {};
|
|
4
|
+
var defaultProps = {
|
|
5
|
+
size: 'md'
|
|
6
|
+
};
|
|
7
|
+
var parts = ['button', 'item', 'list'];
|
|
8
|
+
var sizes = {
|
|
9
|
+
md: {
|
|
10
|
+
list: {
|
|
11
|
+
size: 'sm'
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
lg: {
|
|
15
|
+
list: {
|
|
16
|
+
size: 'md'
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
};
|
|
6
20
|
var variants = {};
|
|
7
21
|
exports.default = {
|
|
22
|
+
baseStyle: baseStyle,
|
|
8
23
|
defaultProps: defaultProps,
|
|
9
24
|
parts: parts,
|
|
10
25
|
sizes: sizes,
|
package/notification/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
export * from './context';
|
|
1
2
|
export * from './notification';
|
|
3
|
+
export { default } from './notification';
|
|
2
4
|
export * from './notification.types';
|
|
3
5
|
export * from './notificationButton';
|
|
4
6
|
export * from './notificationIcon';
|
|
5
7
|
export * from './notificationText';
|
|
6
8
|
export * from './notificationTitle';
|
|
7
|
-
export * from './context';
|
|
8
|
-
export { default } from './notification';
|
package/notification/index.js
CHANGED
|
@@ -14,12 +14,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
};
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.default = void 0;
|
|
17
|
+
__exportStar(require("./context"), exports);
|
|
17
18
|
__exportStar(require("./notification"), exports);
|
|
19
|
+
var notification_1 = require("./notification");
|
|
20
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(notification_1).default; } });
|
|
18
21
|
__exportStar(require("./notification.types"), exports);
|
|
19
22
|
__exportStar(require("./notificationButton"), exports);
|
|
20
23
|
__exportStar(require("./notificationIcon"), exports);
|
|
21
24
|
__exportStar(require("./notificationText"), exports);
|
|
22
25
|
__exportStar(require("./notificationTitle"), exports);
|
|
23
|
-
__exportStar(require("./context"), exports);
|
|
24
|
-
var notification_1 = require("./notification");
|
|
25
|
-
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(notification_1).default; } });
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
import { VuiComponent } from '../core';
|
|
1
2
|
import { NotificationProps } from './notification.types';
|
|
2
3
|
import NotificationButton from './notificationButton';
|
|
3
4
|
import NotificationIcon from './notificationIcon';
|
|
4
5
|
import NotificationText from './notificationText';
|
|
5
6
|
import NotificationTitle from './notificationTitle';
|
|
6
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Displays informational content, like text and icon with optional action buttons.
|
|
9
|
+
* Handles multiple states, like info, error or loading.
|
|
10
|
+
*/
|
|
7
11
|
export declare const Notification: VuiComponent<"div", NotificationProps> & {
|
|
8
12
|
Button: typeof NotificationButton;
|
|
9
13
|
Icon: typeof NotificationIcon;
|
|
@@ -10,25 +10,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
16
|
-
}) : (function(o, m, k, k2) {
|
|
17
|
-
if (k2 === undefined) k2 = k;
|
|
18
|
-
o[k2] = m[k];
|
|
19
|
-
}));
|
|
20
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
-
}) : function(o, v) {
|
|
23
|
-
o["default"] = v;
|
|
24
|
-
});
|
|
25
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
26
|
-
if (mod && mod.__esModule) return mod;
|
|
27
|
-
var result = {};
|
|
28
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
29
|
-
__setModuleDefault(result, mod);
|
|
30
|
-
return result;
|
|
31
|
-
};
|
|
32
13
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
33
14
|
var t = {};
|
|
34
15
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -45,24 +26,28 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
45
26
|
};
|
|
46
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
28
|
exports.Notification = void 0;
|
|
48
|
-
var react_1 =
|
|
29
|
+
var react_1 = __importDefault(require("react"));
|
|
30
|
+
var box_1 = __importDefault(require("../box"));
|
|
31
|
+
var core_1 = require("../core");
|
|
32
|
+
var utils_1 = require("../utils");
|
|
49
33
|
var consts_1 = require("./consts");
|
|
50
34
|
var context_1 = require("./context");
|
|
51
35
|
var notificationButton_1 = __importDefault(require("./notificationButton"));
|
|
52
36
|
var notificationIcon_1 = __importDefault(require("./notificationIcon"));
|
|
53
37
|
var notificationText_1 = __importDefault(require("./notificationText"));
|
|
54
38
|
var notificationTitle_1 = __importDefault(require("./notificationTitle"));
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
39
|
+
/**
|
|
40
|
+
* Displays informational content, like text and icon with optional action buttons.
|
|
41
|
+
* Handles multiple states, like info, error or loading.
|
|
42
|
+
*/
|
|
58
43
|
exports.Notification = (0, core_1.vui)(function (props, ref) {
|
|
59
44
|
var _a, _b, _c;
|
|
60
|
-
var action = props.action, children = props.children, className = props.className, _d = props.colorScheme, colorSchemeProp = _d === void 0 ? 'blue' : _d, icon = props.icon, onClose = props.onClose, size = props.size,
|
|
45
|
+
var action = props.action, children = props.children, className = props.className, _d = props.colorScheme, colorSchemeProp = _d === void 0 ? 'blue' : _d, icon = props.icon, onClose = props.onClose, size = props.size, status = props.status, statusMapping = props.statusMapping, text = props.text, title = props.title, variant = props.variant, rest = __rest(props, ["action", "children", "className", "colorScheme", "icon", "onClose", "size", "status", "statusMapping", "text", "title", "variant"]);
|
|
61
46
|
var statuses = __assign(__assign({}, consts_1.notificationStatusMapping), statusMapping);
|
|
62
|
-
var
|
|
47
|
+
var _e = ((_a = statuses[status !== null && status !== void 0 ? status : '']) !== null && _a !== void 0 ? _a : {}).colorScheme, colorScheme = _e === void 0 ? colorSchemeProp : _e;
|
|
63
48
|
var styles = (0, core_1.useStyleConfig)('Notification', __assign({ colorScheme: colorScheme }, props));
|
|
64
|
-
var iconName = (0, utils_1.isString)(icon) ? icon : (_c = (_b = statuses[status]) === null || _b === void 0 ? void 0 : _b.iconProps) === null || _c === void 0 ? void 0 : _c.name;
|
|
65
|
-
var context = (0,
|
|
49
|
+
var iconName = (0, utils_1.isString)(icon) ? icon : (_c = (_b = statuses[status !== null && status !== void 0 ? status : '']) === null || _b === void 0 ? void 0 : _b.iconProps) === null || _c === void 0 ? void 0 : _c.name;
|
|
50
|
+
var context = (0, utils_1.filterUndefined)({ colorScheme: colorScheme, size: size, status: status, variant: variant });
|
|
66
51
|
return (react_1.default.createElement(context_1.NotificationProvider, { value: context },
|
|
67
52
|
react_1.default.createElement(box_1.default, __assign({ borderRadius: "md", className: (0, utils_1.cs)('vui-notification', className), px: 1.5, py: 1, ref: ref, w: "fit-content" }, styles.container, rest),
|
|
68
53
|
iconName ? react_1.default.createElement(notificationIcon_1.default, { name: iconName }) : icon, children !== null && children !== void 0 ? children : (react_1.default.createElement(notificationText_1.default, null,
|
|
@@ -3,16 +3,24 @@ import { BoxProps } from '../box';
|
|
|
3
3
|
import { IconProp, IconProps } from '../icon';
|
|
4
4
|
import { ThemingProps } from '../theme';
|
|
5
5
|
import { AnyElement } from '../utils';
|
|
6
|
-
export
|
|
6
|
+
export declare type NotificationProps = Omit<BoxProps, 'size' | 'variant'> & ThemingProps<'Notification'> & {
|
|
7
|
+
/** Socket displaying a button on the right. */
|
|
7
8
|
action?: ReactNode;
|
|
9
|
+
/** Available theme colors for this component. @default blue */
|
|
8
10
|
colorScheme?: 'blue' | 'green' | 'red' | 'yellow';
|
|
11
|
+
/** Socket displaying an icon on the left. */
|
|
9
12
|
icon?: IconProp | AnyElement;
|
|
13
|
+
/** If provided, displays a close button with this function as onClick. */
|
|
10
14
|
onClose?: () => void;
|
|
15
|
+
/** Modifies Notification style and content based on the given status. */
|
|
11
16
|
status?: NotificationStatus;
|
|
17
|
+
/** Object definition of styles and content for each status. */
|
|
12
18
|
statusMapping?: NotificationStatusMapping;
|
|
19
|
+
/** Socket displaying text in the middle. */
|
|
13
20
|
text?: ReactNode;
|
|
21
|
+
/** Socket displaying title in the middle. */
|
|
14
22
|
title?: ReactNode;
|
|
15
|
-
}
|
|
23
|
+
};
|
|
16
24
|
export declare type NotificationStatus = 'error' | 'info' | 'loading' | 'success' | 'warning';
|
|
17
25
|
export declare type NotificationStatusMapping = Record<string, {
|
|
18
26
|
colorScheme?: NotificationProps['colorScheme'];
|
|
@@ -16,13 +16,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.NotificationButton = void 0;
|
|
18
18
|
var react_1 = __importDefault(require("react"));
|
|
19
|
-
var context_1 = require("./context");
|
|
20
|
-
var core_1 = require("../core");
|
|
21
19
|
var button_1 = __importDefault(require("../button"));
|
|
20
|
+
var core_1 = require("../core");
|
|
21
|
+
var context_1 = require("./context");
|
|
22
|
+
/** Displays an action button within the Notification. */
|
|
22
23
|
exports.NotificationButton = (0, core_1.vui)(function (props, ref) {
|
|
23
|
-
var
|
|
24
|
-
var notificationProps = (_a = (0, context_1.useNotification)()) !== null && _a !== void 0 ? _a : {};
|
|
25
|
-
var mergedProps = __assign(__assign({}, notificationProps), props);
|
|
24
|
+
var mergedProps = __assign(__assign({}, (0, context_1.useNotification)()), props);
|
|
26
25
|
var styles = (0, core_1.useStyleConfig)('Notification', mergedProps);
|
|
27
26
|
return (react_1.default.createElement(button_1.default, __assign({ className: "vui-notificationButton", colorScheme: mergedProps.colorScheme, ml: 1, mr: -0.5, ref: ref, size: "sm", variant: "text" }, styles.button, props)));
|
|
28
27
|
});
|
|
@@ -16,17 +16,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.NotificationIcon = void 0;
|
|
18
18
|
var react_1 = __importDefault(require("react"));
|
|
19
|
-
var consts_1 = require("./consts");
|
|
20
|
-
var context_1 = require("./context");
|
|
21
19
|
var core_1 = require("../core");
|
|
22
20
|
var icon_1 = __importDefault(require("../icon"));
|
|
21
|
+
var consts_1 = require("./consts");
|
|
22
|
+
var context_1 = require("./context");
|
|
23
|
+
/** Displays an icon based on the status within the Notification. */
|
|
23
24
|
exports.NotificationIcon = (0, core_1.vui)(function (props, ref) {
|
|
24
|
-
var _a
|
|
25
|
-
var
|
|
26
|
-
var mergedProps = __assign(__assign({}, notificationProps), props);
|
|
25
|
+
var _a;
|
|
26
|
+
var mergedProps = __assign(__assign({}, (0, context_1.useNotification)()), props);
|
|
27
27
|
var styles = (0, core_1.useStyleConfig)('Notification', mergedProps);
|
|
28
|
-
var
|
|
29
|
-
var iconProps = ((
|
|
28
|
+
var _b = mergedProps.status, status = _b === void 0 ? '' : _b;
|
|
29
|
+
var iconProps = ((_a = consts_1.notificationStatusMapping[status]) !== null && _a !== void 0 ? _a : {}).iconProps;
|
|
30
30
|
return (react_1.default.createElement(icon_1.default, __assign({ className: "vui-notificationIcon", mr: 1, my: 0.5, ref: ref, size: "md" }, styles.icon, iconProps, props)));
|
|
31
31
|
});
|
|
32
32
|
exports.NotificationIcon.displayName = 'NotificationIcon';
|
|
@@ -16,14 +16,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.NotificationText = void 0;
|
|
18
18
|
var react_1 = __importDefault(require("react"));
|
|
19
|
-
var context_1 = require("./context");
|
|
20
19
|
var core_1 = require("../core");
|
|
21
20
|
var t_1 = __importDefault(require("../t"));
|
|
21
|
+
var context_1 = require("./context");
|
|
22
|
+
/** Displays text within the Notification. */
|
|
22
23
|
exports.NotificationText = (0, core_1.vui)(function (props, ref) {
|
|
23
|
-
var
|
|
24
|
-
var notificationProps = (_a = (0, context_1.useNotification)()) !== null && _a !== void 0 ? _a : {};
|
|
25
|
-
var mergedProps = __assign(__assign({}, notificationProps), props);
|
|
26
|
-
var styles = (0, core_1.useStyleConfig)('Notification', mergedProps);
|
|
24
|
+
var styles = (0, core_1.useStyleConfig)('Notification', __assign(__assign({}, (0, context_1.useNotification)()), props));
|
|
27
25
|
return (react_1.default.createElement(t_1.default, __assign({ className: "vui-notificationText", flex: "1", lineHeight: "24px", minW: 0, py: 0.5, ref: ref }, styles.text, props)));
|
|
28
26
|
});
|
|
29
27
|
exports.NotificationText.displayName = 'NotificationText';
|
|
@@ -16,14 +16,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.NotificationTitle = void 0;
|
|
18
18
|
var react_1 = __importDefault(require("react"));
|
|
19
|
-
var context_1 = require("./context");
|
|
20
19
|
var core_1 = require("../core");
|
|
21
20
|
var heading_1 = require("../heading");
|
|
21
|
+
var context_1 = require("./context");
|
|
22
|
+
/** Displays a title within the Notification. */
|
|
22
23
|
exports.NotificationTitle = (0, core_1.vui)(function (props, ref) {
|
|
23
|
-
var
|
|
24
|
-
var notificationProps = (_a = (0, context_1.useNotification)()) !== null && _a !== void 0 ? _a : {};
|
|
25
|
-
var mergedProps = __assign(__assign({}, notificationProps), props);
|
|
26
|
-
var styles = (0, core_1.useStyleConfig)('Notification', mergedProps);
|
|
24
|
+
var styles = (0, core_1.useStyleConfig)('Notification', __assign(__assign({}, (0, context_1.useNotification)()), props));
|
|
27
25
|
return react_1.default.createElement(heading_1.H6, __assign({ className: "vui-notificationTitle", display: "inline-flex", ref: ref }, styles.title, props));
|
|
28
26
|
});
|
|
29
27
|
exports.NotificationTitle.displayName = 'NotificationTitle';
|
package/notification/theme.d.ts
CHANGED
package/notification/theme.js
CHANGED
|
@@ -23,6 +23,7 @@ function variantSubtle(props) {
|
|
|
23
23
|
}
|
|
24
24
|
return { container: container, button: button };
|
|
25
25
|
}
|
|
26
|
+
var baseStyle = {};
|
|
26
27
|
var defaultProps = {
|
|
27
28
|
colorScheme: 'blue',
|
|
28
29
|
variant: 'subtle'
|
|
@@ -33,6 +34,7 @@ var variants = {
|
|
|
33
34
|
subtle: variantSubtle
|
|
34
35
|
};
|
|
35
36
|
exports.default = {
|
|
37
|
+
baseStyle: baseStyle,
|
|
36
38
|
defaultProps: defaultProps,
|
|
37
39
|
parts: parts,
|
|
38
40
|
sizes: sizes,
|
package/p/index.d.ts
CHANGED
package/p/index.js
CHANGED
|
@@ -15,6 +15,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.default = void 0;
|
|
17
17
|
__exportStar(require("./p"), exports);
|
|
18
|
-
__exportStar(require("./p.types"), exports);
|
|
19
18
|
var p_1 = require("./p");
|
|
20
19
|
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(p_1).default; } });
|
|
20
|
+
__exportStar(require("./p.types"), exports);
|
package/p/p.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PProps } from './p.types';
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
export declare const PBase: import("styled-components").StyledComponent<"p", import("styled-components").DefaultTheme, import("..").SystemProps, never>;
|
|
3
|
+
/** Displays a paragraph of text. */
|
|
4
4
|
export declare const P: import("../core").VuiComponent<"p", PProps>;
|
|
5
5
|
export default P;
|
package/p/p.js
CHANGED
|
@@ -31,11 +31,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
31
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
32
|
exports.P = exports.PBase = void 0;
|
|
33
33
|
var react_1 = __importDefault(require("react"));
|
|
34
|
-
var styled_components_1 = __importDefault(require("styled-components"));
|
|
35
34
|
var core_1 = require("../core");
|
|
36
|
-
var system_1 = require("../system");
|
|
37
35
|
var utils_1 = require("../utils");
|
|
38
|
-
exports.PBase =
|
|
36
|
+
exports.PBase = core_1.styled.pBox(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\ttransition-duration: fast;\n"], ["\n\ttransition-duration: fast;\n"
|
|
37
|
+
/** Displays a paragraph of text. */
|
|
38
|
+
])));
|
|
39
|
+
/** Displays a paragraph of text. */
|
|
39
40
|
exports.P = (0, core_1.vui)(function (props, ref) {
|
|
40
41
|
var _a = (0, core_1.omitThemingProps)(props), align = _a.align, casing = _a.casing, children = _a.children, className = _a.className, decoration = _a.decoration, text = _a.text, weight = _a.weight, rest = __rest(_a, ["align", "casing", "children", "className", "decoration", "text", "weight"]);
|
|
41
42
|
var styles = (0, core_1.useStyleConfig)('P', props);
|
|
@@ -45,7 +46,7 @@ exports.P = (0, core_1.vui)(function (props, ref) {
|
|
|
45
46
|
textDecoration: decoration,
|
|
46
47
|
textTransform: casing
|
|
47
48
|
});
|
|
48
|
-
return (react_1.default.createElement(exports.PBase, __assign({ className: (0, utils_1.cs)('vui-p', className), ref: ref
|
|
49
|
+
return (react_1.default.createElement(exports.PBase, __assign({ className: (0, utils_1.cs)('vui-p', className), ref: ref }, styles, aliasedProps, rest), children !== null && children !== void 0 ? children : text));
|
|
49
50
|
});
|
|
50
51
|
exports.P.displayName = 'P';
|
|
51
52
|
exports.default = exports.P;
|
package/p/p.types.d.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { SystemProps, TypographyProps } from '../system';
|
|
2
2
|
import { ThemingProps } from '../theme';
|
|
3
|
-
export
|
|
3
|
+
export declare type PProps = SystemProps & ThemingProps<'P'> & {
|
|
4
|
+
/** Alias for textAlign prop. @deprecated */
|
|
4
5
|
align?: TypographyProps['textAlign'];
|
|
6
|
+
/** Alias for textTransform prop. @deprecated */
|
|
5
7
|
casing?: TypographyProps['textTransform'];
|
|
8
|
+
/** Alias for textDecoration prop. @deprecated */
|
|
6
9
|
decoration?: TypographyProps['textDecoration'];
|
|
10
|
+
/** Displays given text if no children are provided. */
|
|
7
11
|
text?: number | string;
|
|
12
|
+
/** Alias for fontWeight prop. @deprecated */
|
|
8
13
|
weight?: TypographyProps['fontWeight'];
|
|
9
|
-
}
|
|
14
|
+
};
|
package/p/theme.d.ts
CHANGED
package/p/theme.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var baseStyle = {};
|
|
3
4
|
var defaultProps = {
|
|
4
5
|
size: 'md'
|
|
5
6
|
};
|
|
@@ -27,6 +28,7 @@ var sizes = {
|
|
|
27
28
|
};
|
|
28
29
|
var variants = {};
|
|
29
30
|
exports.default = {
|
|
31
|
+
baseStyle: baseStyle,
|
|
30
32
|
defaultProps: defaultProps,
|
|
31
33
|
sizes: sizes,
|
|
32
34
|
variants: variants
|
package/package.json
CHANGED
package/panel/index.d.ts
CHANGED
package/panel/index.js
CHANGED
|
@@ -15,6 +15,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.default = void 0;
|
|
17
17
|
__exportStar(require("./panel"), exports);
|
|
18
|
-
__exportStar(require("./panel.types"), exports);
|
|
19
18
|
var panel_1 = require("./panel");
|
|
20
19
|
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(panel_1).default; } });
|
|
20
|
+
__exportStar(require("./panel.types"), exports);
|
package/panel/panel.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { PanelProps } from './panel.types';
|
|
2
|
+
/**
|
|
3
|
+
* Displays static or partially interactive content, such as text, images or buttons.
|
|
4
|
+
* Supports use cases of showing multiple segments of a page, each focusing on different data type or context.
|
|
5
|
+
*/
|
|
2
6
|
export declare const Panel: import("../core").VuiComponent<"div", PanelProps>;
|
|
3
7
|
export default Panel;
|
package/panel/panel.js
CHANGED
|
@@ -30,6 +30,10 @@ var react_1 = __importDefault(require("react"));
|
|
|
30
30
|
var box_1 = __importDefault(require("../box"));
|
|
31
31
|
var core_1 = require("../core");
|
|
32
32
|
var utils_1 = require("../utils");
|
|
33
|
+
/**
|
|
34
|
+
* Displays static or partially interactive content, such as text, images or buttons.
|
|
35
|
+
* Supports use cases of showing multiple segments of a page, each focusing on different data type or context.
|
|
36
|
+
*/
|
|
33
37
|
exports.Panel = (0, core_1.vui)(function (props, ref) {
|
|
34
38
|
var _a = (0, core_1.omitThemingProps)(props), className = _a.className, rest = __rest(_a, ["className"]);
|
|
35
39
|
var styles = (0, core_1.useStyleConfig)('Panel', props);
|