@veracity/vui 1.2.2 → 1.3.0-rc.1
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/cjs/button/button.d.ts +2 -1
- package/dist/cjs/button/button.d.ts.map +1 -1
- package/dist/cjs/button/button.js +3 -3
- package/dist/cjs/button/button.types.d.ts +4 -1
- package/dist/cjs/button/button.types.d.ts.map +1 -1
- package/dist/cjs/buttonGroup/buttonGroup.d.ts +1 -0
- package/dist/cjs/buttonGroup/buttonGroup.d.ts.map +1 -1
- package/dist/cjs/buttonGroup/buttonGroup.js +13 -3
- package/dist/cjs/buttonGroup/buttonGroup.types.d.ts +4 -1
- package/dist/cjs/buttonGroup/buttonGroup.types.d.ts.map +1 -1
- package/dist/cjs/buttonGroup/helpers.d.ts.map +1 -1
- package/dist/cjs/buttonToggleGroup/buttonToggleGroup.d.ts +7 -0
- package/dist/cjs/buttonToggleGroup/buttonToggleGroup.d.ts.map +1 -0
- package/dist/cjs/buttonToggleGroup/buttonToggleGroup.js +18 -0
- package/dist/cjs/buttonToggleGroup/buttonToggleGroup.types.d.ts +10 -0
- package/dist/cjs/buttonToggleGroup/buttonToggleGroup.types.d.ts.map +1 -0
- package/dist/cjs/buttonToggleGroup/buttonToggleGroup.types.js +2 -0
- package/dist/cjs/buttonToggleGroup/index.d.ts +4 -0
- package/dist/cjs/buttonToggleGroup/index.d.ts.map +1 -0
- package/dist/cjs/buttonToggleGroup/index.js +24 -0
- package/dist/cjs/index.d.ts +2 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/message/consts.d.ts +13 -0
- package/dist/cjs/message/consts.d.ts.map +1 -0
- package/dist/cjs/message/consts.js +15 -0
- package/dist/cjs/message/index.d.ts +4 -0
- package/dist/cjs/message/index.d.ts.map +1 -0
- package/dist/cjs/message/index.js +24 -0
- package/dist/cjs/message/message.d.ts +6 -0
- package/dist/cjs/message/message.d.ts.map +1 -0
- package/dist/cjs/message/message.js +37 -0
- package/dist/cjs/message/message.types.d.ts +8 -0
- package/dist/cjs/message/message.types.d.ts.map +1 -0
- package/dist/cjs/message/message.types.js +2 -0
- package/dist/cjs/message/theme.d.ts +36 -0
- package/dist/cjs/message/theme.d.ts.map +1 -0
- package/dist/cjs/message/theme.js +40 -0
- package/dist/cjs/theme/components.d.ts +34 -0
- package/dist/cjs/theme/components.d.ts.map +1 -1
- package/dist/cjs/theme/components.js +36 -34
- package/dist/cjs/theme/defaultTheme.d.ts +34 -0
- package/dist/cjs/theme/defaultTheme.d.ts.map +1 -1
- package/dist/cjs/tooltip/tooltip.js +1 -1
- package/dist/cjs/utils/consts.d.ts +3 -0
- package/dist/cjs/utils/consts.d.ts.map +1 -1
- package/dist/cjs/utils/consts.js +4 -1
- package/dist/esm/button/button.d.ts +2 -1
- package/dist/esm/button/button.d.ts.map +1 -1
- package/dist/esm/button/button.js +3 -3
- package/dist/esm/button/button.types.d.ts +4 -1
- package/dist/esm/button/button.types.d.ts.map +1 -1
- package/dist/esm/buttonGroup/buttonGroup.d.ts +1 -0
- package/dist/esm/buttonGroup/buttonGroup.d.ts.map +1 -1
- package/dist/esm/buttonGroup/buttonGroup.js +14 -4
- package/dist/esm/buttonGroup/buttonGroup.types.d.ts +4 -1
- package/dist/esm/buttonGroup/buttonGroup.types.d.ts.map +1 -1
- package/dist/esm/buttonGroup/helpers.d.ts.map +1 -1
- package/dist/esm/buttonToggleGroup/buttonToggleGroup.d.ts +7 -0
- package/dist/esm/buttonToggleGroup/buttonToggleGroup.d.ts.map +1 -0
- package/dist/esm/buttonToggleGroup/buttonToggleGroup.js +11 -0
- package/dist/esm/buttonToggleGroup/buttonToggleGroup.types.d.ts +10 -0
- package/dist/esm/buttonToggleGroup/buttonToggleGroup.types.d.ts.map +1 -0
- package/dist/esm/buttonToggleGroup/buttonToggleGroup.types.js +1 -0
- package/dist/esm/buttonToggleGroup/index.d.ts +4 -0
- package/dist/esm/buttonToggleGroup/index.d.ts.map +1 -0
- package/dist/esm/buttonToggleGroup/index.js +3 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +2 -0
- package/dist/esm/message/consts.d.ts +13 -0
- package/dist/esm/message/consts.d.ts.map +1 -0
- package/dist/esm/message/consts.js +12 -0
- package/dist/esm/message/index.d.ts +4 -0
- package/dist/esm/message/index.d.ts.map +1 -0
- package/dist/esm/message/index.js +3 -0
- package/dist/esm/message/message.d.ts +6 -0
- package/dist/esm/message/message.d.ts.map +1 -0
- package/dist/esm/message/message.js +20 -0
- package/dist/esm/message/message.types.d.ts +8 -0
- package/dist/esm/message/message.types.d.ts.map +1 -0
- package/dist/esm/message/message.types.js +1 -0
- package/dist/esm/message/theme.d.ts +36 -0
- package/dist/esm/message/theme.d.ts.map +1 -0
- package/dist/esm/message/theme.js +38 -0
- package/dist/esm/theme/components.d.ts +34 -0
- package/dist/esm/theme/components.d.ts.map +1 -1
- package/dist/esm/theme/components.js +2 -0
- package/dist/esm/theme/defaultTheme.d.ts +34 -0
- package/dist/esm/theme/defaultTheme.d.ts.map +1 -1
- package/dist/esm/tooltip/tooltip.js +1 -1
- package/dist/esm/utils/consts.d.ts +3 -0
- package/dist/esm/utils/consts.d.ts.map +1 -1
- package/dist/esm/utils/consts.js +3 -0
- package/package.json +1 -1
- package/src/button/button.tsx +3 -2
- package/src/button/button.types.ts +5 -1
- package/src/buttonGroup/buttonGroup.tsx +19 -6
- package/src/buttonGroup/buttonGroup.types.ts +4 -1
- package/src/buttonGroup/helpers.ts +1 -1
- package/src/buttonToggleGroup/buttonToggleGroup.tsx +24 -0
- package/src/buttonToggleGroup/buttonToggleGroup.types.ts +12 -0
- package/src/buttonToggleGroup/index.ts +3 -0
- package/src/index.ts +2 -0
- package/src/message/consts.ts +13 -0
- package/src/message/index.ts +3 -0
- package/src/message/message.tsx +30 -0
- package/src/message/message.types.ts +10 -0
- package/src/message/theme.ts +42 -0
- package/src/theme/components.ts +2 -0
- package/src/tooltip/tooltip.tsx +1 -1
- package/src/utils/consts.ts +6 -0
|
@@ -20,23 +20,24 @@ const theme_14 = __importDefault(require("../input/theme"));
|
|
|
20
20
|
const theme_15 = __importDefault(require("../link/theme"));
|
|
21
21
|
const theme_16 = __importDefault(require("../list/theme"));
|
|
22
22
|
const theme_17 = __importDefault(require("../menu/theme"));
|
|
23
|
-
const theme_18 = __importDefault(require("../
|
|
24
|
-
const theme_19 = __importDefault(require("../
|
|
25
|
-
const theme_20 = __importDefault(require("../
|
|
26
|
-
const theme_21 = __importDefault(require("../
|
|
27
|
-
const theme_22 = __importDefault(require("../
|
|
28
|
-
const theme_23 = __importDefault(require("../
|
|
29
|
-
const theme_24 = __importDefault(require("../
|
|
30
|
-
const theme_25 = __importDefault(require("../
|
|
31
|
-
const theme_26 = __importDefault(require("../
|
|
32
|
-
const theme_27 = __importDefault(require("../
|
|
33
|
-
const theme_28 = __importDefault(require("../
|
|
34
|
-
const theme_29 = __importDefault(require("../
|
|
35
|
-
const theme_30 = __importDefault(require("../
|
|
36
|
-
const theme_31 = __importDefault(require("../
|
|
37
|
-
const theme_32 = __importDefault(require("../
|
|
38
|
-
const theme_33 = __importDefault(require("../
|
|
39
|
-
const theme_34 = __importDefault(require("../
|
|
23
|
+
const theme_18 = __importDefault(require("../message/theme"));
|
|
24
|
+
const theme_19 = __importDefault(require("../modal/theme"));
|
|
25
|
+
const theme_20 = __importDefault(require("../notification/theme"));
|
|
26
|
+
const theme_21 = __importDefault(require("../p/theme"));
|
|
27
|
+
const theme_22 = __importDefault(require("../pagination/theme"));
|
|
28
|
+
const theme_23 = __importDefault(require("../panel/theme"));
|
|
29
|
+
const theme_24 = __importDefault(require("../popover/theme"));
|
|
30
|
+
const theme_25 = __importDefault(require("../progress/theme"));
|
|
31
|
+
const theme_26 = __importDefault(require("../radio/theme"));
|
|
32
|
+
const theme_27 = __importDefault(require("../select/theme"));
|
|
33
|
+
const theme_28 = __importDefault(require("../skeleton/theme"));
|
|
34
|
+
const theme_29 = __importDefault(require("../spinner/theme"));
|
|
35
|
+
const theme_30 = __importDefault(require("../switch/theme"));
|
|
36
|
+
const theme_31 = __importDefault(require("../t/theme"));
|
|
37
|
+
const theme_32 = __importDefault(require("../table/theme"));
|
|
38
|
+
const theme_33 = __importDefault(require("../tabs/theme"));
|
|
39
|
+
const theme_34 = __importDefault(require("../tag/theme"));
|
|
40
|
+
const theme_35 = __importDefault(require("../textarea/theme"));
|
|
40
41
|
exports.default = {
|
|
41
42
|
Avatar: theme_1.default,
|
|
42
43
|
Box: theme_2.default,
|
|
@@ -55,21 +56,22 @@ exports.default = {
|
|
|
55
56
|
Link: theme_15.default,
|
|
56
57
|
List: theme_16.default,
|
|
57
58
|
Menu: theme_17.default,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
59
|
+
Message: theme_18.default,
|
|
60
|
+
Modal: theme_19.default,
|
|
61
|
+
Notification: theme_20.default,
|
|
62
|
+
P: theme_21.default,
|
|
63
|
+
Pagination: theme_22.default,
|
|
64
|
+
Panel: theme_23.default,
|
|
65
|
+
Progress: theme_25.default,
|
|
66
|
+
Popover: theme_24.default,
|
|
67
|
+
Radio: theme_26.default,
|
|
68
|
+
Select: theme_27.default,
|
|
69
|
+
Skeleton: theme_28.default,
|
|
70
|
+
Spinner: theme_29.default,
|
|
71
|
+
Switch: theme_30.default,
|
|
72
|
+
T: theme_31.default,
|
|
73
|
+
Table: theme_32.default,
|
|
74
|
+
Tabs: theme_33.default,
|
|
75
|
+
Tag: theme_34.default,
|
|
76
|
+
Textarea: theme_35.default
|
|
75
77
|
};
|
|
@@ -804,6 +804,40 @@ declare const defaultTheme: {
|
|
|
804
804
|
};
|
|
805
805
|
variants: {};
|
|
806
806
|
};
|
|
807
|
+
Message: {
|
|
808
|
+
baseStyle: {};
|
|
809
|
+
defaultProps: {
|
|
810
|
+
variant: string;
|
|
811
|
+
};
|
|
812
|
+
sizes: {
|
|
813
|
+
xs: {
|
|
814
|
+
fontSize: string;
|
|
815
|
+
};
|
|
816
|
+
sm: {
|
|
817
|
+
fontSize: string;
|
|
818
|
+
};
|
|
819
|
+
md: {
|
|
820
|
+
fontSize: string;
|
|
821
|
+
};
|
|
822
|
+
lg: {
|
|
823
|
+
fontSize: string;
|
|
824
|
+
};
|
|
825
|
+
};
|
|
826
|
+
variants: {
|
|
827
|
+
info: {
|
|
828
|
+
color: string;
|
|
829
|
+
};
|
|
830
|
+
warning: {
|
|
831
|
+
color: string;
|
|
832
|
+
};
|
|
833
|
+
error: {
|
|
834
|
+
color: string;
|
|
835
|
+
};
|
|
836
|
+
success: {
|
|
837
|
+
color: string;
|
|
838
|
+
};
|
|
839
|
+
};
|
|
840
|
+
};
|
|
807
841
|
Modal: {
|
|
808
842
|
baseStyle: {};
|
|
809
843
|
defaultProps: {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultTheme.d.ts","sourceRoot":"","sources":["../../../src/theme/defaultTheme.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"defaultTheme.d.ts","sourceRoot":"","sources":["../../../src/theme/defaultTheme.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGjB,CAAA;AAED,eAAe,YAAY,CAAA"}
|
|
@@ -18,7 +18,7 @@ const tooltipContent_1 = require("./tooltipContent");
|
|
|
18
18
|
*
|
|
19
19
|
* */
|
|
20
20
|
const Tooltip = (props) => {
|
|
21
|
-
const { children, fontSize = '16px', linkText, linkProps, maxWidth = '400px', text = '
|
|
21
|
+
const { children, fontSize = '16px', linkText, linkProps, maxWidth = '400px', text = 'Tooltip', placement = 'top' } = props;
|
|
22
22
|
const isDesktop = (0, core_1.useUp)('md');
|
|
23
23
|
return (react_2.default.createElement(react_1.default, { content: react_2.default.createElement(tooltipContent_1.TooltipContent, { fontSize: fontSize, maxWidth: maxWidth },
|
|
24
24
|
isDesktop && (react_2.default.createElement(box_1.default, { bg: tooltip_setup_1.color, bottom: tooltip_setup_1.pointerPlacement[placement].bottom, h: `${tooltip_setup_1.pointerSize}px`, left: tooltip_setup_1.pointerPlacement[placement].left, position: "absolute", right: tooltip_setup_1.pointerPlacement[placement].right, top: tooltip_setup_1.pointerPlacement[placement].top, transform: `translate(${tooltip_setup_1.pointerPlacement[placement].translate}) rotate(45deg)`, w: `${tooltip_setup_1.pointerSize}px` })),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../../src/utils/consts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,SAAwC,CAAA"}
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../../src/utils/consts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,SAAwC,CAAA;AAE5D,eAAO,MAAM,eAAe,eAAe,CAAA;AAE3C,eAAO,MAAM,eAAe,KAAK,CAAA;AAEjC,eAAO,MAAM,iBAAiB,YAAY,CAAA"}
|
package/dist/cjs/utils/consts.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.__DEV__ = void 0;
|
|
3
|
+
exports.dimmedBorderColor = exports.activeItemShade = exports.activeClassName = exports.__DEV__ = void 0;
|
|
4
4
|
exports.__DEV__ = process.env.NODE_ENV !== 'production';
|
|
5
|
+
exports.activeClassName = 'vui-active';
|
|
6
|
+
exports.activeItemShade = 30;
|
|
7
|
+
exports.dimmedBorderColor = 'grey.40';
|
|
@@ -4,10 +4,11 @@ import { ButtonProps } from './button.types';
|
|
|
4
4
|
import ButtonIcon from './buttonIcon';
|
|
5
5
|
import ButtonText from './buttonText';
|
|
6
6
|
export declare const ButtonBase: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, import("..").AnimationProps & import("..").BackgroundColorProps & import("..").BorderProps & import("..").BorderTopProps & import("..").BorderRightProps & import("..").BorderBottomProps & import("..").BorderLeftProps & import("..").BorderColorProps & import("..").BorderTopColorProps & import("..").BorderRightColorProps & import("..").BorderBottomColorProps & import("..").BorderLeftColorProps & import("..").BorderWidthProps & import("..").BorderTopWidthProps & import("..").BorderRightWidthProps & import("..").BorderBottomWidthProps & import("..").BorderLeftWidthProps & import("..").BorderStyleProps & import("..").BorderRadiusProps & import("..").OutlineProps & import("..").OutlineColorProps & import("..").OutlineWidthProps & import("..").OutlineStyleProps & import("..").DivideXProps & import("..").DivideYProps & import("..").DivideXReverseProps & import("..").DivideYReverseProps & import("..").DivideColorProps & import("..").DivideStyleProps & import("..").RingProps & import("..").RingColorProps & import("..").OpacityProps & import("..").BoxShadowProps & import("..").TextShadowProps & import("..").DisplayProps & import("..").AlignItemsProps & import("..").AlignContentProps & import("..").JustifyContentProps & import("..").JustifyItemsProps & import("..").FlexWrapProps & import("..").FlexGrowProps & import("..").FlexShrinkProps & import("..").FlexBasisProps & import("..").FlexDirectionProps & import("..").FlexProps & import("..").JustifySelfProps & import("..").AlignSelfProps & import("..").OrderProps & import("../system/flexboxGrids").RowProps & import("../system/flexboxGrids").ColProps & import("../system/grids").GapProps & import("../system/grids").ColumnGapProps & import("../system/grids").RowGapProps & import("../system/grids").GridColumnProps & import("../system/grids").GridRowProps & import("../system/grids").GridAutoFlowProps & import("../system/grids").GridAutoColumnsProps & import("../system/grids").GridAutoRowsProps & import("../system/grids").GridTemplateColumnsProps & import("../system/grids").GridTemplateRowsProps & import("../system/grids").GridTemplateAreasProps & import("../system/grids").GridAreaProps & import("..").AppearanceProps & import("..").CursorProps & import("..").PointerEventsProps & import("..").ResizeProps & import("..").UserSelectProps & import("..").IsTruncatedProps & import("..").FloatProps & import("..").BoxSizingProps & import("..").OverflowProps & import("..").OverflowXProps & import("..").OverflowYProps & import("..").PositionProps & import("..").ZIndexProps & import("..").TopProps & import("..").RightProps & import("..").BottomProps & import("..").LeftProps & import("..").VisibilityProps & import("..").OverscrollBehaviorProps & import("..").ObjectFitProps & import("..").MaxLinesProps & import("..").WidthProps & import("..").HeightProps & import("..").MaxWidthProps & import("..").MaxHeightProps & import("..").MinWidthProps & import("..").MinHeightProps & import("..").MarginProps & import("..").MarginTopProps & import("..").MarginRightProps & import("..").MarginBottomProps & import("..").MarginLeftProps & import("..").MarginXProps & import("..").MarginYProps & import("..").PaddingProps & import("..").PaddingTopProps & import("..").PaddingRightProps & import("..").PaddingBottomProps & import("..").PaddingLeftProps & import("..").PaddingXProps & import("..").PaddingYProps & import("..").SpaceXProps & import("..").SpaceYProps & import("..").SpaceXReverseProps & import("..").SpaceYReverseProps & import("../system/tables").BorderCollapseProps & import("../system/tables").TableLayoutProps & import("..").TransformProps & import("..").TransformOriginProps & import("..").TranslateXProps & import("..").TranslateYProps & import("..").RotateProps & import("..").SkewXProps & import("..").SkewYProps & import("..").ScaleProps & import("..").ScaleXProps & import("..").ScaleYProps & import("..").TransitionProps & import("..").TransitionPropertyProps & import("..").TransitionDurationProps & import("..").TransitionTimingFunctionProps & import("..").TransitionDelayProps & import("..").FontFamilyProps & import("..").FontSizeProps & import("..").FontStyleProps & import("..").FontWeightProps & import("..").LineHeightProps & import("..").ColorProps & import("..").TextTransformProps & import("..").TextDecorationProps & import("..").TextAlignProps & import("..").VerticalAlignProps & import("..").LetterSpacingProps & import("..").WhiteSpaceProps & import("..").TextOverflowProps & import("..").ListStyleTypeProps & import("..").ListStylePositionProps & import("..").WordBreakProps & import("..").ThemingProps<"Button"> & {
|
|
7
|
-
colorScheme?: "
|
|
7
|
+
colorScheme?: import("./button.types").ButtonColorScheme | undefined;
|
|
8
8
|
icon?: JSX.Element | import("..").IconProp | undefined;
|
|
9
9
|
iconLeft?: JSX.Element | import("..").IconProp | undefined;
|
|
10
10
|
iconRight?: JSX.Element | import("..").IconProp | undefined;
|
|
11
|
+
isActive?: boolean | undefined;
|
|
11
12
|
isElevated?: boolean | undefined;
|
|
12
13
|
isFullWidth?: boolean | undefined;
|
|
13
14
|
isLoading?: boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAA;AAGtC,OAAO,EAA+B,YAAY,EAAE,MAAM,SAAS,CAAA;AAEnE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,UAAU,MAAM,cAAc,CAAA;AACrC,OAAO,UAAU,MAAM,cAAc,CAAA;AAiBrC,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAA;AAGtC,OAAO,EAA+B,YAAY,EAAE,MAAM,SAAS,CAAA;AAEnE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,UAAU,MAAM,cAAc,CAAA;AACrC,OAAO,UAAU,MAAM,cAAc,CAAA;AAiBrC,eAAO,MAAM,UAAU;;;;;;;;;;;;;;SAoBtB,CAAA;AACD;;;;;;GAMG;AACH,eAAO,MAAM,MAAM;UAoHX,iBAAiB;UACjB,iBAAiB;CACxB,CAAA;AAKD,eAAe,MAAM,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import { useButtonGroupContext } from '../buttonGroup/context';
|
|
3
3
|
import { styled, useStyleConfig, vui } from '../core';
|
|
4
|
-
import { cs, filterUndefined, isReactText, isString } from '../utils';
|
|
4
|
+
import { activeClassName, cs, filterUndefined, isReactText, isString } from '../utils';
|
|
5
5
|
import ButtonIcon from './buttonIcon';
|
|
6
6
|
import ButtonText from './buttonText';
|
|
7
7
|
import { buttonStateMapping } from './consts';
|
|
@@ -48,7 +48,7 @@ export const ButtonBase = styled.buttonBox `
|
|
|
48
48
|
export const Button = vui((props, ref) => {
|
|
49
49
|
const buttonGroupProps = useButtonGroupContext();
|
|
50
50
|
const mergedProps = { ...buttonGroupProps, ...props };
|
|
51
|
-
const { borderWidth: borderWidthProp, children, className, colorScheme: colorSchemeProp, disabled, icon, iconLeft, iconRight, isElevated, isFullWidth, isLoading, // eslint-disable-line
|
|
51
|
+
const { borderWidth: borderWidthProp, children, className, colorScheme: colorSchemeProp, disabled, icon, iconLeft, iconRight, isActive, isElevated, isFullWidth, isLoading, // eslint-disable-line
|
|
52
52
|
isRound, isSplit, isTruncated, size, state = props.isLoading ? 'loading' : '', stateMapping, text, variant, ...rest } = mergedProps;
|
|
53
53
|
const hasState = Boolean(state) && state !== 'idle';
|
|
54
54
|
const states = { ...buttonStateMapping, ...stateMapping };
|
|
@@ -89,7 +89,7 @@ export const Button = vui((props, ref) => {
|
|
|
89
89
|
w: isFullWidth ? '100%' : undefined
|
|
90
90
|
});
|
|
91
91
|
return (React.createElement(ButtonProvider, { value: context },
|
|
92
|
-
React.createElement(ButtonBase, { borderWidth: border, className: cs('vui-button', className), disabled: disabled, focusRing: 3, h: h, pl: pl, pr: pr, ref: ref, type: "button", variant: variant, ...buttonStyles, ...disabledProps, ...aliasedProps, ...rest },
|
|
92
|
+
React.createElement(ButtonBase, { borderWidth: border, className: cs('vui-button', className, isActive && activeClassName), disabled: disabled, focusRing: 3, h: h, pl: pl, pr: pr, ref: ref, type: "button", variant: variant, ...buttonStyles, ...disabledProps, ...aliasedProps, ...rest },
|
|
93
93
|
hasState && (React.createElement(StateWrapper, { onClick: (e) => e.stopPropagation(), ...stateProps },
|
|
94
94
|
React.createElement(ButtonIcon, { m: "auto", ...stateIconProps }))),
|
|
95
95
|
React.createElement(Content, null,
|
|
@@ -3,15 +3,18 @@ import { IconProp, IconProps } from '../icon';
|
|
|
3
3
|
import { SystemProps } from '../system';
|
|
4
4
|
import { ThemingProps } from '../theme';
|
|
5
5
|
import { AnyString } from '../utils';
|
|
6
|
+
export declare type ButtonColorScheme = 'blue' | 'green' | 'pink' | 'prussian' | 'red';
|
|
6
7
|
export declare type ButtonProps = SystemProps & ThemingProps<'Button'> & {
|
|
7
8
|
/** Available theme colors for this component. @default prussian */
|
|
8
|
-
colorScheme?:
|
|
9
|
+
colorScheme?: ButtonColorScheme;
|
|
9
10
|
/** Icon that replaces any other content. */
|
|
10
11
|
icon?: IconProp | JSX.Element;
|
|
11
12
|
/** Socket displaying icon on the left side. */
|
|
12
13
|
iconLeft?: IconProp | JSX.Element;
|
|
13
14
|
/** Socket displaying icon on the right side. */
|
|
14
15
|
iconRight?: IconProp | JSX.Element;
|
|
16
|
+
/** Adds an active class name for further handling. */
|
|
17
|
+
isActive?: boolean;
|
|
15
18
|
/** Adds box shadow style. @default false */
|
|
16
19
|
isElevated?: boolean;
|
|
17
20
|
/** Makes the button take full width of the container. @deprecated */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.types.d.ts","sourceRoot":"","sources":["../../../src/button/button.types.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAA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,yCAAyC;IACzC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,yDAAyD;IACzD,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,kEAAkE;IAClE,KAAK,CAAC,EAAE,WAAW,CAAA;IACnB,8DAA8D;IAC9D,YAAY,CAAC,EAAE,kBAAkB,CAAA;IACjC,sDAAsD;IACtD,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACvB,CAAA;AACH,oBAAY,WAAW,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAA;AAE9E,oBAAY,kBAAkB,GAAG,MAAM,CACrC,MAAM,EACN,WAAW,GAAG;IAAE,WAAW,EAAE,WAAW,CAAC,aAAa,CAAC,CAAC;IAAC,SAAS,EAAE,SAAS,CAAA;CAAE,CAChF,CAAA;AAED,wDAAwD;AACxD,oBAAY,eAAe,GAAG,IAAI,CAAC,WAAW,EAAE,UAAU,GAAG,WAAW,GAAG,MAAM,CAAC,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ButtonGroupProps } from './buttonGroup.types';
|
|
2
2
|
export declare const ButtonGroupBase: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, import("..").AnimationProps & import("..").BackgroundColorProps & import("..").BorderProps & import("..").BorderTopProps & import("..").BorderRightProps & import("..").BorderBottomProps & import("..").BorderLeftProps & import("..").BorderColorProps & import("..").BorderTopColorProps & import("..").BorderRightColorProps & import("..").BorderBottomColorProps & import("..").BorderLeftColorProps & import("..").BorderWidthProps & import("..").BorderTopWidthProps & import("..").BorderRightWidthProps & import("..").BorderBottomWidthProps & import("..").BorderLeftWidthProps & import("..").BorderStyleProps & import("..").BorderRadiusProps & import("..").OutlineProps & import("..").OutlineColorProps & import("..").OutlineWidthProps & import("..").OutlineStyleProps & import("..").DivideXProps & import("..").DivideYProps & import("..").DivideXReverseProps & import("..").DivideYReverseProps & import("..").DivideColorProps & import("..").DivideStyleProps & import("..").RingProps & import("..").RingColorProps & import("..").OpacityProps & import("..").BoxShadowProps & import("..").TextShadowProps & import("..").DisplayProps & import("..").AlignItemsProps & import("..").AlignContentProps & import("..").JustifyContentProps & import("..").JustifyItemsProps & import("..").FlexWrapProps & import("..").FlexGrowProps & import("..").FlexShrinkProps & import("..").FlexBasisProps & import("..").FlexDirectionProps & import("..").FlexProps & import("..").JustifySelfProps & import("..").AlignSelfProps & import("..").OrderProps & import("../system/flexboxGrids").RowProps & import("../system/flexboxGrids").ColProps & import("../system/grids").GapProps & import("../system/grids").ColumnGapProps & import("../system/grids").RowGapProps & import("../system/grids").GridColumnProps & import("../system/grids").GridRowProps & import("../system/grids").GridAutoFlowProps & import("../system/grids").GridAutoColumnsProps & import("../system/grids").GridAutoRowsProps & import("../system/grids").GridTemplateColumnsProps & import("../system/grids").GridTemplateRowsProps & import("../system/grids").GridTemplateAreasProps & import("../system/grids").GridAreaProps & import("..").AppearanceProps & import("..").CursorProps & import("..").PointerEventsProps & import("..").ResizeProps & import("..").UserSelectProps & import("..").IsTruncatedProps & import("..").FloatProps & import("..").BoxSizingProps & import("..").OverflowProps & import("..").OverflowXProps & import("..").OverflowYProps & import("..").PositionProps & import("..").ZIndexProps & import("..").TopProps & import("..").RightProps & import("..").BottomProps & import("..").LeftProps & import("..").VisibilityProps & import("..").OverscrollBehaviorProps & import("..").ObjectFitProps & import("..").MaxLinesProps & import("..").WidthProps & import("..").HeightProps & import("..").MaxWidthProps & import("..").MaxHeightProps & import("..").MinWidthProps & import("..").MinHeightProps & import("..").MarginProps & import("..").MarginTopProps & import("..").MarginRightProps & import("..").MarginBottomProps & import("..").MarginLeftProps & import("..").MarginXProps & import("..").MarginYProps & import("..").PaddingProps & import("..").PaddingTopProps & import("..").PaddingRightProps & import("..").PaddingBottomProps & import("..").PaddingLeftProps & import("..").PaddingXProps & import("..").PaddingYProps & import("..").SpaceXProps & import("..").SpaceYProps & import("..").SpaceXReverseProps & import("..").SpaceYReverseProps & import("../system/tables").BorderCollapseProps & import("../system/tables").TableLayoutProps & import("..").TransformProps & import("..").TransformOriginProps & import("..").TranslateXProps & import("..").TranslateYProps & import("..").RotateProps & import("..").SkewXProps & import("..").SkewYProps & import("..").ScaleProps & import("..").ScaleXProps & import("..").ScaleYProps & import("..").TransitionProps & import("..").TransitionPropertyProps & import("..").TransitionDurationProps & import("..").TransitionTimingFunctionProps & import("..").TransitionDelayProps & import("..").FontFamilyProps & import("..").FontSizeProps & import("..").FontStyleProps & import("..").FontWeightProps & import("..").LineHeightProps & import("..").ColorProps & import("..").TextTransformProps & import("..").TextDecorationProps & import("..").TextAlignProps & import("..").VerticalAlignProps & import("..").LetterSpacingProps & import("..").WhiteSpaceProps & import("..").TextOverflowProps & import("..").ListStyleTypeProps & import("..").ListStylePositionProps & import("..").WordBreakProps & {
|
|
3
|
+
colorScheme?: string | undefined;
|
|
3
4
|
innerBorderColor: string;
|
|
4
5
|
}, never>;
|
|
5
6
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buttonGroup.d.ts","sourceRoot":"","sources":["../../../src/buttonGroup/buttonGroup.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAItD,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"buttonGroup.d.ts","sourceRoot":"","sources":["../../../src/buttonGroup/buttonGroup.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAItD,eAAO,MAAM,eAAe;;sBAA2D,MAAM;SAuC5F,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,yDAiBtB,CAAA;AAEF,eAAe,WAAW,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import { styled, th, vui } from '../core';
|
|
3
|
-
import { cs, filterUndefined } from '../utils';
|
|
3
|
+
import { activeClassName, activeItemShade, cs, filterUndefined } from '../utils';
|
|
4
4
|
import { ButtonGroupProvider } from './context';
|
|
5
5
|
import { getInnerBorderColor } from './helpers';
|
|
6
6
|
export const ButtonGroupBase = styled.divBox `
|
|
@@ -31,16 +31,26 @@ export const ButtonGroupBase = styled.divBox `
|
|
|
31
31
|
border-left-width: 0px;
|
|
32
32
|
border-top-left-radius: 0;
|
|
33
33
|
}
|
|
34
|
+
|
|
35
|
+
// Border color
|
|
36
|
+
> *,
|
|
37
|
+
*:hover {
|
|
38
|
+
border-color: ${p => th.color(p.innerBorderColor)};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
//
|
|
42
|
+
> .${activeClassName} {
|
|
43
|
+
background-color: ${p => th.color(`${p.colorScheme}.${activeItemShade}`)};
|
|
44
|
+
}
|
|
34
45
|
`;
|
|
35
46
|
/**
|
|
36
47
|
* Organizes layout and display of multiple buttons. Controls border visual around and between the buttons.
|
|
37
48
|
* Exposes some props to the children via context.
|
|
38
49
|
*/
|
|
39
50
|
export const ButtonGroup = vui((props, ref) => {
|
|
40
|
-
const { className, colorScheme, disabled, size, variant, ...rest } = props;
|
|
41
|
-
const innerBorderColor = getInnerBorderColor(props);
|
|
51
|
+
const { className, colorScheme, disabled, innerBorderColor, size, variant, ...rest } = props;
|
|
42
52
|
const context = useMemo(() => filterUndefined({ colorScheme, disabled, size, variant }), [colorScheme, disabled, size, variant]);
|
|
43
53
|
return (React.createElement(ButtonGroupProvider, { value: context },
|
|
44
|
-
React.createElement(ButtonGroupBase, { className: cs('vui-buttonGroup', className), ...{ innerBorderColor, ref }, ...rest })));
|
|
54
|
+
React.createElement(ButtonGroupBase, { className: cs('vui-buttonGroup', className), ...{ colorScheme, innerBorderColor: innerBorderColor ? innerBorderColor : getInnerBorderColor(props), ref }, ...rest })));
|
|
45
55
|
});
|
|
46
56
|
export default ButtonGroup;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { ButtonColorScheme } from '../button/button.types';
|
|
1
2
|
import { SystemProps } from '../system';
|
|
2
3
|
import { ThemingProps } from '../theme';
|
|
3
4
|
export declare type ButtonGroupProps = SystemProps & ThemingProps<'ButtonGroup'> & {
|
|
4
5
|
/** Available theme colors for this component. */
|
|
5
|
-
colorScheme?:
|
|
6
|
+
colorScheme?: ButtonColorScheme;
|
|
6
7
|
/** Makes all wrapped buttons disabled. */
|
|
7
8
|
disabled?: boolean;
|
|
9
|
+
/** Border color between the buttons. */
|
|
10
|
+
innerBorderColor?: string;
|
|
8
11
|
};
|
|
9
12
|
//# sourceMappingURL=buttonGroup.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buttonGroup.types.d.ts","sourceRoot":"","sources":["../../../src/buttonGroup/buttonGroup.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAEvC,oBAAY,gBAAgB,GAAG,WAAW,GACxC,YAAY,CAAC,aAAa,CAAC,GAAG;IAC5B,iDAAiD;IACjD,WAAW,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"buttonGroup.types.d.ts","sourceRoot":"","sources":["../../../src/buttonGroup/buttonGroup.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAEvC,oBAAY,gBAAgB,GAAG,WAAW,GACxC,YAAY,CAAC,aAAa,CAAC,GAAG;IAC5B,iDAAiD;IACjD,WAAW,CAAC,EAAE,iBAAiB,CAAA;IAC/B,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,wCAAwC;IACxC,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/buttonGroup/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEtD,oEAAoE;AACpE,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/buttonGroup/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEtD,oEAAoE;AACpE,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAQnE"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ButtonToggleGroupProps } from './buttonToggleGroup.types';
|
|
2
|
+
/**
|
|
3
|
+
* Organizes layout and display of multiple buttons. Based on ButtonGroup and should be used to toggle options.
|
|
4
|
+
*/
|
|
5
|
+
export declare const ButtonToggleGroup: (props: ButtonToggleGroupProps) => JSX.Element;
|
|
6
|
+
export default ButtonToggleGroup;
|
|
7
|
+
//# sourceMappingURL=buttonToggleGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buttonToggleGroup.d.ts","sourceRoot":"","sources":["../../../src/buttonToggleGroup/buttonToggleGroup.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AAElE;;GAEG;AACH,eAAO,MAAM,iBAAiB,UAAW,sBAAsB,gBAY9D,CAAA;AAED,eAAe,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ButtonGroup from '../buttonGroup';
|
|
3
|
+
import { cs, dimmedBorderColor } from '../utils';
|
|
4
|
+
/**
|
|
5
|
+
* Organizes layout and display of multiple buttons. Based on ButtonGroup and should be used to toggle options.
|
|
6
|
+
*/
|
|
7
|
+
export const ButtonToggleGroup = (props) => {
|
|
8
|
+
const { className, isDimmedBorder } = props;
|
|
9
|
+
return (React.createElement(ButtonGroup, { className: cs('vui-buttonToggleGroup', className), colorScheme: "blue", innerBorderColor: isDimmedBorder ? dimmedBorderColor : '', variant: "outlined", ...props }));
|
|
10
|
+
};
|
|
11
|
+
export default ButtonToggleGroup;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ButtonGroupProps } from '../buttonGroup';
|
|
3
|
+
import { ThemingProps } from '../theme';
|
|
4
|
+
export declare type ButtonToggleGroupProps = ButtonGroupProps & ThemingProps<'ButtonToggleGroup'> & {
|
|
5
|
+
className?: string;
|
|
6
|
+
/** Sets dimmed borders to the buttons. */
|
|
7
|
+
isDimmedBorder?: boolean;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=buttonToggleGroup.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buttonToggleGroup.types.d.ts","sourceRoot":"","sources":["../../../src/buttonToggleGroup/buttonToggleGroup.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAEvC,oBAAY,sBAAsB,GAAG,gBAAgB,GACnD,YAAY,CAAC,mBAAmB,CAAC,GAAG;IAClC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,0CAA0C;IAC1C,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,QAAQ,EAAE,SAAS,CAAA;CACpB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/buttonToggleGroup/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAC7C,cAAc,2BAA2B,CAAA"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from './avatar';
|
|
|
2
2
|
export * from './box';
|
|
3
3
|
export * from './button';
|
|
4
4
|
export * from './buttonGroup';
|
|
5
|
+
export * from './buttonToggleGroup';
|
|
5
6
|
export * from './card';
|
|
6
7
|
export * from './checkbox';
|
|
7
8
|
export * from './core';
|
|
@@ -19,6 +20,7 @@ export * from './link';
|
|
|
19
20
|
export * from './list';
|
|
20
21
|
export * from './logo';
|
|
21
22
|
export * from './menu';
|
|
23
|
+
export * from './message';
|
|
22
24
|
export * from './modal';
|
|
23
25
|
export * from './notification';
|
|
24
26
|
export * from './p';
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,OAAO,CAAA;AACrB,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,QAAQ,CAAA;AACtB,cAAc,YAAY,CAAA;AAC1B,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,QAAQ,CAAA;AACtB,cAAc,QAAQ,CAAA;AACtB,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAA;AACvB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,KAAK,CAAA;AACnB,cAAc,cAAc,CAAA;AAC5B,cAA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,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,OAAO,CAAA;AACrB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,KAAK,CAAA;AACnB,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,OAAO,CAAA;AACrB,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA"}
|
package/dist/esm/index.js
CHANGED
|
@@ -2,6 +2,7 @@ export * from './avatar';
|
|
|
2
2
|
export * from './box';
|
|
3
3
|
export * from './button';
|
|
4
4
|
export * from './buttonGroup';
|
|
5
|
+
export * from './buttonToggleGroup';
|
|
5
6
|
export * from './card';
|
|
6
7
|
export * from './checkbox';
|
|
7
8
|
export * from './core';
|
|
@@ -19,6 +20,7 @@ export * from './link';
|
|
|
19
20
|
export * from './list';
|
|
20
21
|
export * from './logo';
|
|
21
22
|
export * from './menu';
|
|
23
|
+
export * from './message';
|
|
22
24
|
export * from './modal';
|
|
23
25
|
export * from './notification';
|
|
24
26
|
export * from './p';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const iconDictionary: {
|
|
2
|
+
info: string;
|
|
3
|
+
warning: string;
|
|
4
|
+
error: string;
|
|
5
|
+
success: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const spacingDictionary: {
|
|
8
|
+
md: number;
|
|
9
|
+
xs: number;
|
|
10
|
+
sm: number;
|
|
11
|
+
lg: number;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=consts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../../src/message/consts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;CAK1B,CAAA;AAED,eAAO,MAAM,iBAAiB;;;;;CAK7B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/message/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,cAAc,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MessageProps } from './message.types';
|
|
2
|
+
export declare const MessageBase: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, import("..").SystemProps, never>;
|
|
3
|
+
/** Displays a simple message text. */
|
|
4
|
+
export declare const Message: import("../core").VuiComponent<"span", MessageProps>;
|
|
5
|
+
export default Message;
|
|
6
|
+
//# sourceMappingURL=message.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../src/message/message.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE9C,eAAO,MAAM,WAAW,+HAEvB,CAAA;AAED,sCAAsC;AACtC,eAAO,MAAM,OAAO,sDAYlB,CAAA;AAEF,eAAe,OAAO,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Box } from '../box';
|
|
3
|
+
import { styled, useStyleConfig, vui } from '../core';
|
|
4
|
+
import { Icon } from '../icon';
|
|
5
|
+
import { T } from '../t';
|
|
6
|
+
import { cs } from '../utils';
|
|
7
|
+
import { iconDictionary, spacingDictionary } from './consts';
|
|
8
|
+
export const MessageBase = styled.divBox `
|
|
9
|
+
transition-duration: fast;
|
|
10
|
+
`;
|
|
11
|
+
/** Displays a simple message text. */
|
|
12
|
+
export const Message = vui((props, ref) => {
|
|
13
|
+
const { children, className, text, size = 'md', variant = 'info', ...rest } = props;
|
|
14
|
+
const styles = useStyleConfig('Message', props);
|
|
15
|
+
return (React.createElement(MessageBase, { className: cs('vui-message', className), ref: ref, ...styles, ...rest },
|
|
16
|
+
React.createElement(Box, null,
|
|
17
|
+
React.createElement(Icon, { mr: `${spacingDictionary[size]}px`, name: iconDictionary[variant], size: size }),
|
|
18
|
+
React.createElement(T, { size: size }, children ?? text))));
|
|
19
|
+
});
|
|
20
|
+
export default Message;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactText } from 'react';
|
|
2
|
+
import { SystemProps } from '../system';
|
|
3
|
+
import { ThemingProps } from '../theme';
|
|
4
|
+
export declare type MessageProps = SystemProps & ThemingProps<'Message'> & {
|
|
5
|
+
/** Displays given text if no children are provided. */
|
|
6
|
+
text?: ReactText;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=message.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message.types.d.ts","sourceRoot":"","sources":["../../../src/message/message.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAEvC,oBAAY,YAAY,GAAG,WAAW,GACpC,YAAY,CAAC,SAAS,CAAC,GAAG;IACxB,uDAAuD;IACvD,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
baseStyle: {};
|
|
3
|
+
defaultProps: {
|
|
4
|
+
variant: string;
|
|
5
|
+
};
|
|
6
|
+
sizes: {
|
|
7
|
+
xs: {
|
|
8
|
+
fontSize: string;
|
|
9
|
+
};
|
|
10
|
+
sm: {
|
|
11
|
+
fontSize: string;
|
|
12
|
+
};
|
|
13
|
+
md: {
|
|
14
|
+
fontSize: string;
|
|
15
|
+
};
|
|
16
|
+
lg: {
|
|
17
|
+
fontSize: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
variants: {
|
|
21
|
+
info: {
|
|
22
|
+
color: string;
|
|
23
|
+
};
|
|
24
|
+
warning: {
|
|
25
|
+
color: string;
|
|
26
|
+
};
|
|
27
|
+
error: {
|
|
28
|
+
color: string;
|
|
29
|
+
};
|
|
30
|
+
success: {
|
|
31
|
+
color: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export default _default;
|
|
36
|
+
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/message/theme.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,wBAKC"}
|