@veracity/vui 0.0.3 → 0.0.5
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/alert/alert.d.ts +15 -0
- package/alert/alert.js +87 -0
- package/alert/alert.types.d.ts +19 -0
- package/alert/alert.types.js +2 -0
- package/alert/alertButton.d.ts +3 -0
- package/alert/alertButton.js +30 -0
- package/alert/alertIcon.d.ts +3 -0
- package/alert/alertIcon.js +33 -0
- package/alert/alertMessage.d.ts +3 -0
- package/alert/alertMessage.js +31 -0
- package/alert/alertText.d.ts +3 -0
- package/alert/alertText.js +30 -0
- package/alert/alertTitle.d.ts +3 -0
- package/alert/alertTitle.js +30 -0
- package/alert/consts.d.ts +2 -0
- package/alert/consts.js +25 -0
- package/alert/context.d.ts +4 -0
- package/alert/context.js +23 -0
- package/alert/index.d.ts +9 -0
- package/alert/index.js +26 -0
- package/alert/theme.d.ts +46 -0
- package/alert/theme.js +62 -0
- package/avatar/avatar.d.ts +4 -4
- package/avatar/avatar.js +2 -5
- package/avatar/avatar.types.d.ts +1 -2
- package/box/box.d.ts +4 -4
- package/box/box.js +2 -4
- package/box/box.types.d.ts +10 -12
- package/button/button.d.ts +4 -4
- package/button/button.js +1 -3
- package/button/button.types.d.ts +2 -2
- package/button/buttonGroup.d.ts +2 -4
- package/button/buttonGroup.js +1 -3
- package/button/buttonGroup.types.d.ts +1 -2
- package/button/buttons.d.ts +5 -5
- package/checkbox/checkbox.d.ts +3 -7
- package/checkbox/checkbox.js +3 -7
- package/checkbox/checkbox.types.d.ts +6 -3
- package/checkbox/checkboxGroup.d.ts +2 -4
- package/checkbox/checkboxGroup.js +3 -12
- package/checkbox/checkboxGroup.types.d.ts +6 -4
- package/checkbox/theme.d.ts +0 -1
- package/checkbox/theme.js +0 -1
- package/core/globalStyle.js +1 -1
- package/core/index.d.ts +1 -0
- package/core/index.js +3 -1
- package/core/resetCSS.d.ts +2 -0
- package/core/resetCSS.js +9 -0
- package/core/types.d.ts +27 -2
- package/core/types.js +1 -0
- package/core/utils.d.ts +10 -5
- package/core/utils.js +17 -2
- package/core/vuiProvider.js +2 -1
- package/divider/divider.d.ts +2 -4
- package/divider/divider.js +7 -10
- package/divider/divider.types.d.ts +1 -2
- package/heading/heading.d.ts +4 -4
- package/heading/heading.js +1 -3
- package/heading/heading.types.d.ts +7 -9
- package/heading/headings.d.ts +6 -6
- package/icon/icon.d.ts +1 -1
- package/icon/icon.js +8 -4
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/input/consts.d.ts +2 -18
- package/input/consts.js +2 -2
- package/input/input.d.ts +5 -5
- package/input/input.js +6 -6
- package/input/input.types.d.ts +14 -7
- package/label/label.d.ts +4 -4
- package/label/label.js +1 -3
- package/label/label.types.d.ts +2 -2
- package/link/link.d.ts +4 -4
- package/link/link.js +1 -3
- package/link/link.types.d.ts +7 -9
- package/list/list.d.ts +8 -4
- package/list/list.js +6 -6
- package/list/list.types.d.ts +3 -4
- package/list/listIcon.d.ts +3 -0
- package/list/listIcon.js +30 -0
- package/list/listItem.d.ts +2 -4
- package/list/listItem.js +16 -9
- package/list/listItem.types.d.ts +8 -2
- package/list/theme.d.ts +37 -2
- package/list/theme.js +43 -14
- package/p/p.d.ts +4 -4
- package/p/p.js +1 -3
- package/p/p.types.d.ts +8 -11
- package/package.json +1 -1
- package/radio/radio.d.ts +3 -7
- package/radio/radio.js +4 -10
- package/radio/radio.types.d.ts +6 -3
- package/radio/radioGroup.d.ts +2 -4
- package/radio/radioGroup.js +5 -5
- package/radio/radioGroup.types.d.ts +6 -4
- package/radio/theme.d.ts +0 -1
- package/radio/theme.js +0 -1
- package/skeleton/skeleton.d.ts +2 -4
- package/skeleton/skeleton.js +1 -3
- package/skeleton/skeleton.types.d.ts +1 -2
- package/spinner/consts.d.ts +34 -0
- package/spinner/consts.js +21 -0
- package/spinner/index.d.ts +3 -0
- package/spinner/index.js +20 -0
- package/spinner/spinner.d.ts +4 -0
- package/spinner/spinner.js +60 -0
- package/spinner/spinner.types.d.ts +15 -0
- package/spinner/spinner.types.js +2 -0
- package/spinner/theme.d.ts +68 -0
- package/spinner/theme.js +74 -0
- package/styles/radii.d.ts +1 -0
- package/styles/radii.js +2 -1
- package/svg/helpers.d.ts +1 -1
- package/svg/helpers.js +1 -1
- package/svg/svg.d.ts +3 -5
- package/svg/svg.js +8 -5
- package/svg/svg.types.d.ts +8 -3
- package/switch/index.d.ts +1 -0
- package/switch/index.js +1 -0
- package/switch/switch.d.ts +8 -4
- package/switch/switch.js +26 -6
- package/switch/switch.types.d.ts +5 -2
- package/switch/switchButton.d.ts +4 -10
- package/switch/switchButton.js +3 -9
- package/switch/switchButton.types.d.ts +5 -4
- package/switch/switchLabel.d.ts +1 -1
- package/switch/switchLabel.js +1 -1
- package/system/colors.d.ts +3 -2
- package/system/transitions.d.ts +2 -1
- package/t/t.d.ts +4 -4
- package/t/t.js +1 -3
- package/t/t.types.d.ts +7 -9
- package/textarea/textarea.d.ts +4 -4
- package/textarea/textarea.js +1 -3
- package/textarea/textarea.types.d.ts +1 -2
- package/theme/components.d.ts +144 -4
- package/theme/components.js +40 -36
- package/theme/defaultTheme.d.ts +145 -4
- package/theme/foundations.d.ts +1 -0
- package/tile/tile.d.ts +1 -1
- package/tile/tile.js +2 -2
- package/tile/tile.types.d.ts +2 -2
package/index.js
CHANGED
|
@@ -10,6 +10,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./alert"), exports);
|
|
13
14
|
__exportStar(require("./avatar"), exports);
|
|
14
15
|
__exportStar(require("./box"), exports);
|
|
15
16
|
__exportStar(require("./button"), exports);
|
|
@@ -25,6 +26,7 @@ __exportStar(require("./list"), exports);
|
|
|
25
26
|
__exportStar(require("./p"), exports);
|
|
26
27
|
__exportStar(require("./radio"), exports);
|
|
27
28
|
__exportStar(require("./skeleton"), exports);
|
|
29
|
+
__exportStar(require("./spinner"), exports);
|
|
28
30
|
__exportStar(require("./styles"), exports);
|
|
29
31
|
__exportStar(require("./svg"), exports);
|
|
30
32
|
__exportStar(require("./switch"), exports);
|
package/input/consts.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { InputStateMapping } from './input.types';
|
|
1
2
|
export declare const inputLengths: {
|
|
2
3
|
fluid: string;
|
|
3
4
|
xs: number;
|
|
@@ -6,21 +7,4 @@ export declare const inputLengths: {
|
|
|
6
7
|
lg: number;
|
|
7
8
|
xl: number;
|
|
8
9
|
};
|
|
9
|
-
export declare const
|
|
10
|
-
default: {
|
|
11
|
-
colorScheme: string;
|
|
12
|
-
iconRight: string;
|
|
13
|
-
};
|
|
14
|
-
error: {
|
|
15
|
-
colorScheme: string;
|
|
16
|
-
iconRight: string;
|
|
17
|
-
};
|
|
18
|
-
loading: {
|
|
19
|
-
colorScheme: string;
|
|
20
|
-
iconRight: string;
|
|
21
|
-
};
|
|
22
|
-
success: {
|
|
23
|
-
colorScheme: string;
|
|
24
|
-
iconRight: string;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
10
|
+
export declare const inputStateMapping: InputStateMapping;
|
package/input/consts.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.inputStateMapping = exports.inputLengths = void 0;
|
|
4
4
|
exports.inputLengths = {
|
|
5
5
|
fluid: 'none',
|
|
6
6
|
xs: 104,
|
|
@@ -9,7 +9,7 @@ exports.inputLengths = {
|
|
|
9
9
|
lg: 320,
|
|
10
10
|
xl: 480
|
|
11
11
|
};
|
|
12
|
-
exports.
|
|
12
|
+
exports.inputStateMapping = {
|
|
13
13
|
default: {
|
|
14
14
|
colorScheme: 'grey',
|
|
15
15
|
iconRight: ''
|
package/input/input.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InputInputStyleProps, InputProps, InputStyleProps } from './input.types';
|
|
2
|
-
export declare const InputInput: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, InputInputStyleProps
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export declare const Input: import("
|
|
2
|
+
export declare const InputInput: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, InputInputStyleProps & {
|
|
3
|
+
color?: any;
|
|
4
|
+
}, never>;
|
|
5
|
+
export declare const InputBase: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, InputStyleProps, never>;
|
|
6
|
+
export declare const Input: import("../core").VuiComponent<"div", InputProps>;
|
|
7
7
|
export default Input;
|
package/input/input.js
CHANGED
|
@@ -39,14 +39,14 @@ var icon_1 = __importDefault(require("../icon"));
|
|
|
39
39
|
var utils_1 = require("../utils");
|
|
40
40
|
var generator = styled_components_1.compose(styled_components_1.backgroundColor, styled_components_1.borders, styled_components_1.flexboxes, styled_components_1.sizing, styled_components_1.space, styled_components_1.transitions);
|
|
41
41
|
exports.InputInput = styled_components_2.default.input(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\talign-self: stretch;\n\tbackground-color: transparent;\n\tborder: none;\n\tflex: 1;\n\tmargin: 0 8px;\n\tmin-width: 0;\n\toutline: none;\n\tpadding: 0;\n\n\t:disabled,\n\t:disabled::placeholder {\n\t\tcolor: var(--vui-colors-disabled-font);\n\t\tcursor: not-allowed;\n\t}\n\n\t", "\n"], ["\n\talign-self: stretch;\n\tbackground-color: transparent;\n\tborder: none;\n\tflex: 1;\n\tmargin: 0 8px;\n\tmin-width: 0;\n\toutline: none;\n\tpadding: 0;\n\n\t:disabled,\n\t:disabled::placeholder {\n\t\tcolor: var(--vui-colors-disabled-font);\n\t\tcursor: not-allowed;\n\t}\n\n\t", "\n"])), styled_components_1.compose(styled_components_1.color, styled_components_1.fontSize));
|
|
42
|
-
exports.InputBase = styled_components_2.default.div.withConfig({
|
|
43
|
-
shouldForwardProp: core_1.shouldForwardProp(generator.meta.props)
|
|
44
|
-
})(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n\talign-items: center;\n\tborder-width: 1px;\n\tdisplay: flex;\n\toutline: none;\n\ttransition: all 0s ease-in-out;\n\twidth: 100%;\n\n\t&.disabled {\n\t\tbackground-color: var(--vui-colors-disabled-bg);\n\t\tcolor: var(--vui-colors-disabled-font);\n\t\tcursor: not-allowed;\n\t}\n\n\t", "\n"], ["\n\talign-items: center;\n\tborder-width: 1px;\n\tdisplay: flex;\n\toutline: none;\n\ttransition: all 0s ease-in-out;\n\twidth: 100%;\n\n\t&.disabled {\n\t\tbackground-color: var(--vui-colors-disabled-bg);\n\t\tcolor: var(--vui-colors-disabled-font);\n\t\tcursor: not-allowed;\n\t}\n\n\t", "\n"])), generator);
|
|
42
|
+
exports.InputBase = styled_components_2.default.div.withConfig(core_1.forwardPropConfig(generator))(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n\talign-items: center;\n\tborder-width: 1px;\n\tdisplay: flex;\n\toutline: none;\n\twidth: 100%;\n\n\t&.disabled {\n\t\tbackground-color: var(--vui-colors-disabled-bg);\n\t\tcolor: var(--vui-colors-disabled-font);\n\t\tcursor: not-allowed;\n\t}\n\n\t", "\n"], ["\n\talign-items: center;\n\tborder-width: 1px;\n\tdisplay: flex;\n\toutline: none;\n\twidth: 100%;\n\n\t&.disabled {\n\t\tbackground-color: var(--vui-colors-disabled-bg);\n\t\tcolor: var(--vui-colors-disabled-font);\n\t\tcursor: not-allowed;\n\t}\n\n\t", "\n"])), generator);
|
|
45
43
|
exports.Input = core_1.forwardRef(function (props, ref) {
|
|
46
|
-
var _a
|
|
47
|
-
var
|
|
44
|
+
var _a;
|
|
45
|
+
var _b = core_1.omitThemingProps(props), autoComplete = _b.autoComplete, autoFocus = _b.autoFocus, className = _b.className, colorSchemeProp = _b.colorScheme, defaultValue = _b.defaultValue, disabled = _b.disabled, iconLeft = _b.iconLeft, iconRightProp = _b.iconRight, _c = _b.inputProps, inputProps = _c === void 0 ? {} : _c, inputRef = _b.inputRef, itemLeft = _b.itemLeft, itemRight = _b.itemRight, _d = _b.length, length = _d === void 0 ? 'fluid' : _d, name = _b.name, onBlur = _b.onBlur, onChange = _b.onChange, onFocus = _b.onFocus, placeholder = _b.placeholder, readOnly = _b.readOnly, required = _b.required, _e = _b.state, state = _e === void 0 ? 'default' : _e, stateMapping = _b.stateMapping, _f = _b.type, type = _f === void 0 ? 'text' : _f, value = _b.value, rest = __rest(_b, ["autoComplete", "autoFocus", "className", "colorScheme", "defaultValue", "disabled", "iconLeft", "iconRight", "inputProps", "inputRef", "itemLeft", "itemRight", "length", "name", "onBlur", "onChange", "onFocus", "placeholder", "readOnly", "required", "state", "stateMapping", "type", "value"]);
|
|
46
|
+
var states = __assign(__assign({}, consts_1.inputStateMapping), stateMapping);
|
|
47
|
+
var _g = (_a = states[state]) !== null && _a !== void 0 ? _a : {}, _h = _g.colorScheme, colorScheme = _h === void 0 ? colorSchemeProp : _h, _j = _g.iconRight, iconRight = _j === void 0 ? iconRightProp : _j;
|
|
48
|
+
var _k = core_1.useStyleConfig('Input', __assign({ colorScheme: colorScheme }, props)), borderColor = _k.borderColor, focusWithinRingColor = _k.focusWithinRingColor, fontSize = _k.fontSize, iconColorProp = _k.iconColor, iconSize = _k.iconSize, styles = __rest(_k, ["borderColor", "focusWithinRingColor", "fontSize", "iconColor", "iconSize"]);
|
|
48
49
|
var iconColor = !disabled ? iconColorProp : 'grey.50';
|
|
49
|
-
var iconRight = iconRightProp !== null && iconRightProp !== void 0 ? iconRightProp : consts_1.inputStates[state].iconRight;
|
|
50
50
|
var aliasedProps = utils_1.filterUndefined({
|
|
51
51
|
bg: readOnly ? 'grey.20' : undefined,
|
|
52
52
|
maxW: consts_1.inputLengths[length]
|
package/input/input.types.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
import { inputLengths
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { inputLengths } from './consts';
|
|
3
|
+
import { ChangeEventHandler, FocusEventHandler } from '../core';
|
|
3
4
|
import { IconProp } from '../icon';
|
|
4
5
|
import { BackgroundColorProps, BordersProps, ColorProps, EffectsProps, FontSizeProps, SizingProps, SpaceProps, TransitionsProps } from '../system';
|
|
5
6
|
import { ThemingProps } from '../theme';
|
|
6
|
-
export interface InputInputProps extends
|
|
7
|
-
color?: string;
|
|
7
|
+
export interface InputInputProps extends InputInputStyleProps {
|
|
8
8
|
}
|
|
9
9
|
export interface InputInputStyleProps extends ColorProps, FontSizeProps {
|
|
10
10
|
}
|
|
11
11
|
export declare type InputLength = keyof typeof inputLengths;
|
|
12
|
-
export interface InputProps extends
|
|
12
|
+
export interface InputProps extends InputStyleProps, ThemingProps<'Input'> {
|
|
13
13
|
autoComplete?: string;
|
|
14
14
|
autoFocus?: boolean;
|
|
15
15
|
colorScheme?: 'green' | 'grey' | 'red';
|
|
@@ -22,14 +22,21 @@ export interface InputProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'
|
|
|
22
22
|
itemRight?: React.ReactNode;
|
|
23
23
|
length?: InputLength;
|
|
24
24
|
name?: string;
|
|
25
|
-
|
|
25
|
+
onBlur?: FocusEventHandler;
|
|
26
|
+
onChange?: ChangeEventHandler;
|
|
27
|
+
onFocus?: FocusEventHandler;
|
|
26
28
|
placeholder?: string;
|
|
27
29
|
readOnly?: boolean;
|
|
28
30
|
required?: boolean;
|
|
29
31
|
state?: InputState;
|
|
32
|
+
stateMapping?: InputStateMapping;
|
|
30
33
|
type?: string;
|
|
31
34
|
value?: number | string;
|
|
32
35
|
}
|
|
33
|
-
export declare type InputState =
|
|
36
|
+
export declare type InputState = 'default' | 'error' | 'loading' | 'success';
|
|
37
|
+
export declare type InputStateMapping = Record<string, {
|
|
38
|
+
colorScheme?: InputProps['colorScheme'];
|
|
39
|
+
iconRight: InputProps['iconRight'];
|
|
40
|
+
}>;
|
|
34
41
|
export interface InputStyleProps extends BackgroundColorProps, BordersProps, EffectsProps, SizingProps, SpaceProps, TransitionsProps {
|
|
35
42
|
}
|
package/label/label.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LabelProps, LabelStyleProps } from './label.types';
|
|
2
|
-
export declare const LabelBase: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
export declare const Label: import("
|
|
2
|
+
export declare const LabelBase: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, LabelStyleProps & {
|
|
3
|
+
color?: any;
|
|
4
|
+
}, never>;
|
|
5
|
+
export declare const Label: import("../core").VuiComponent<"span", LabelProps>;
|
|
6
6
|
export default Label;
|
package/label/label.js
CHANGED
|
@@ -39,9 +39,7 @@ var system_1 = require("../system");
|
|
|
39
39
|
var utils_1 = require("../utils");
|
|
40
40
|
var generator = styled_components_1.compose(styled_components_1.backgroundColor, styled_components_1.borders, styled_components_1.effects, styled_components_1.flexboxes, styled_components_1.interactivity, system_1.isTruncated, styled_components_1.sizing, styled_components_1.space, styled_components_1.transitions, styled_components_1.typography);
|
|
41
41
|
var Text = styled_components_2.default.span(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\t", "\n"], ["\n\t", "\n"])), system_1.isTruncated);
|
|
42
|
-
exports.LabelBase = styled_components_2.default.span.withConfig({
|
|
43
|
-
shouldForwardProp: core_1.shouldForwardProp(generator.meta.props)
|
|
44
|
-
})(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n\talign-items: center;\n\tdisplay: flex;\n\tjustify-content: center;\n\tline-height: 1.1;\n\tmin-width: 0px;\n\tposition: relative;\n\ttransition: all 0s ease-in-out;\n\twidth: fit-content;\n\n\t&:focus {\n\t\tborder-color: transparent;\n\t\toutline: none;\n\t}\n\n\t", "\n"], ["\n\talign-items: center;\n\tdisplay: flex;\n\tjustify-content: center;\n\tline-height: 1.1;\n\tmin-width: 0px;\n\tposition: relative;\n\ttransition: all 0s ease-in-out;\n\twidth: fit-content;\n\n\t&:focus {\n\t\tborder-color: transparent;\n\t\toutline: none;\n\t}\n\n\t", "\n"])), generator);
|
|
42
|
+
exports.LabelBase = styled_components_2.default.span.withConfig(core_1.forwardPropConfig(generator))(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n\talign-items: center;\n\tdisplay: flex;\n\tjustify-content: center;\n\tline-height: normal;\n\tmin-width: 0px;\n\tposition: relative;\n\twidth: fit-content;\n\n\t&:focus {\n\t\tborder-color: transparent;\n\t\toutline: none;\n\t}\n\n\t", "\n"], ["\n\talign-items: center;\n\tdisplay: flex;\n\tjustify-content: center;\n\tline-height: normal;\n\tmin-width: 0px;\n\tposition: relative;\n\twidth: fit-content;\n\n\t&:focus {\n\t\tborder-color: transparent;\n\t\toutline: none;\n\t}\n\n\t", "\n"])), generator);
|
|
45
43
|
exports.Label = core_1.forwardRef(function (props, ref) {
|
|
46
44
|
var _a = core_1.omitThemingProps(props), casing = _a.casing, children = _a.children, className = _a.className, icon = _a.icon, iconLeft = _a.iconLeft, iconRight = _a.iconRight, isElevated = _a.isElevated, isFullWidth = _a.isFullWidth, _b = _a.isInteractive, isInteractive = _b === void 0 ? props.onClick !== undefined : _b, isLoading = _a.isLoading, isRound = _a.isRound, isSplit = _a.isSplit, _c = _a.isTruncated, isTruncated = _c === void 0 ? true : _c, itemLeft = _a.itemLeft, itemRight = _a.itemRight, text = _a.text, weight = _a.weight, rest = __rest(_a, ["casing", "children", "className", "icon", "iconLeft", "iconRight", "isElevated", "isFullWidth", "isInteractive", "isLoading", "isRound", "isSplit", "isTruncated", "itemLeft", "itemRight", "text", "weight"]);
|
|
47
45
|
var _d = core_1.useStyleConfig('Label', props), activeBg = _d.activeBg, h = _d.h, hoverBg = _d.hoverBg, _e = _d.iconSize, iconSize = _e === void 0 ? 'md' : _e, _f = _d.spaceX, spaceXBase = _f === void 0 ? 0 : _f, styles = __rest(_d, ["activeBg", "h", "hoverBg", "iconSize", "spaceX"]);
|
package/label/label.types.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { IconProp } from '../icon';
|
|
3
3
|
import { BackgroundColorProps, BordersProps, EffectsProps, InteractivityProps, IsTruncatedProps, SizingProps, SpaceProps, TransitionsProps, TypographyProps } from '../system';
|
|
4
4
|
import { ThemingProps } from '../theme';
|
|
5
|
-
export interface LabelProps extends
|
|
5
|
+
export interface LabelProps extends LabelStyleProps, ThemingProps<'Label'> {
|
|
6
6
|
casing?: TypographyProps['textTransform'];
|
|
7
7
|
colorScheme?: 'blue' | 'green' | 'grey' | 'prussian' | 'red' | 'yellow';
|
|
8
8
|
icon?: IconProp;
|
package/link/link.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LinkProps, LinkStyleProps } from './link.types';
|
|
2
|
-
export declare const LinkBase: import("styled-components").StyledComponent<"a", import("styled-components").DefaultTheme, {
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
export declare const Link: import("
|
|
2
|
+
export declare const LinkBase: import("styled-components").StyledComponent<"a", import("styled-components").DefaultTheme, LinkStyleProps & {
|
|
3
|
+
color?: any;
|
|
4
|
+
}, never>;
|
|
5
|
+
export declare const Link: import("../core").VuiComponent<"a", LinkProps>;
|
|
6
6
|
export default Link;
|
package/link/link.js
CHANGED
|
@@ -37,9 +37,7 @@ var core_1 = require("../core");
|
|
|
37
37
|
var system_1 = require("../system");
|
|
38
38
|
var utils_1 = require("../utils");
|
|
39
39
|
var generator = styled_components_1.compose(styled_components_1.borders, system_1.isTruncated, styled_components_1.sizing, styled_components_1.space, styled_components_1.transitions, styled_components_1.typography);
|
|
40
|
-
exports.LinkBase = styled_components_2.default.a.withConfig(
|
|
41
|
-
shouldForwardProp: core_1.shouldForwardProp(generator.meta.props)
|
|
42
|
-
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\talign-items: center;\n\tcursor: pointer;\n\tdisplay: inline-flex;\n\toutline: none;\n\ttext-decoration: none;\n\ttransition: all 0s ease-in-out;\n\twidth: fit-content;\n\n\t", "\n"], ["\n\talign-items: center;\n\tcursor: pointer;\n\tdisplay: inline-flex;\n\toutline: none;\n\ttext-decoration: none;\n\ttransition: all 0s ease-in-out;\n\twidth: fit-content;\n\n\t", "\n"])), generator);
|
|
40
|
+
exports.LinkBase = styled_components_2.default.a.withConfig(core_1.forwardPropConfig(generator))(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\talign-items: center;\n\tcursor: pointer;\n\tdisplay: inline-flex;\n\toutline: none;\n\ttext-decoration: none;\n\twidth: fit-content;\n\n\t", "\n"], ["\n\talign-items: center;\n\tcursor: pointer;\n\tdisplay: inline-flex;\n\toutline: none;\n\ttext-decoration: none;\n\twidth: fit-content;\n\n\t", "\n"])), generator);
|
|
43
41
|
exports.Link = core_1.forwardRef(function (props, ref) {
|
|
44
42
|
var _a = core_1.omitThemingProps(props), className = _a.className, decoration = _a.decoration, _b = _a.hoverDecoration, hoverDecoration = _b === void 0 ? 'underline' : _b, isExternal = _a.isExternal, weight = _a.weight, rest = __rest(_a, ["className", "decoration", "hoverDecoration", "isExternal", "weight"]);
|
|
45
43
|
var styles = core_1.useStyleConfig('Link', props);
|
package/link/link.types.d.ts
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { AnyString } from '../utils';
|
|
5
|
-
export interface LinkProps extends Omit<HTMLAttributes<HTMLAnchorElement>, 'color'>, LinkStyleProps, ThemingProps<'Link'> {
|
|
1
|
+
import { BordersProps, IsTruncatedProps, SizingProps, SpaceProps, TransitionsProps, TypographyProps } from '../system';
|
|
2
|
+
import { ThemingProps } from '../theme';
|
|
3
|
+
export interface LinkProps extends LinkStyleProps, ThemingProps<'Link'> {
|
|
6
4
|
colorScheme?: 'blue' | 'prussian';
|
|
7
|
-
decoration?:
|
|
8
|
-
hoverDecoration?:
|
|
5
|
+
decoration?: TypographyProps['textDecoration'];
|
|
6
|
+
hoverDecoration?: TypographyProps['textDecoration'];
|
|
9
7
|
isExternal?: boolean;
|
|
10
|
-
weight?:
|
|
8
|
+
weight?: TypographyProps['fontWeight'];
|
|
11
9
|
}
|
|
12
|
-
export interface LinkStyleProps extends BordersProps, IsTruncatedProps, SizingProps, SpaceProps, TransitionsProps, TypographyProps
|
|
10
|
+
export interface LinkStyleProps extends BordersProps, IsTruncatedProps, SizingProps, SpaceProps, TransitionsProps, TypographyProps {
|
|
13
11
|
}
|
package/list/list.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { ListProps, ListStyleProps } from './list.types';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
export declare const
|
|
2
|
+
import ListIcon from './listIcon';
|
|
3
|
+
import ListItem from './listItem';
|
|
4
|
+
import { VuiComponent } from '../core';
|
|
5
|
+
export declare const ListBase: import("styled-components").StyledComponent<"ul", import("styled-components").DefaultTheme, ListStyleProps, never>;
|
|
6
|
+
export declare const List: VuiComponent<"div", ListProps> & {
|
|
7
|
+
Icon: typeof ListIcon;
|
|
8
|
+
Item: typeof ListItem;
|
|
9
|
+
};
|
|
6
10
|
export default List;
|
package/list/list.js
CHANGED
|
@@ -53,13 +53,12 @@ var styled_components_1 = require("@xstyled/styled-components");
|
|
|
53
53
|
var react_1 = __importStar(require("react"));
|
|
54
54
|
var styled_components_2 = __importDefault(require("styled-components"));
|
|
55
55
|
var context_1 = require("./context");
|
|
56
|
+
var listIcon_1 = __importDefault(require("./listIcon"));
|
|
56
57
|
var listItem_1 = __importDefault(require("./listItem"));
|
|
57
58
|
var core_1 = require("../core");
|
|
58
59
|
var utils_1 = require("../utils");
|
|
59
|
-
var generator = styled_components_1.compose(styled_components_1.sizing, styled_components_1.space, styled_components_1.typography);
|
|
60
|
-
exports.ListBase = styled_components_2.default.ul.withConfig(
|
|
61
|
-
shouldForwardProp: core_1.shouldForwardProp(generator.meta.props)
|
|
62
|
-
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\t", "\n"], ["\n\t", "\n"])), generator);
|
|
60
|
+
var generator = styled_components_1.compose(styled_components_1.flexboxes, styled_components_1.sizing, styled_components_1.space, styled_components_1.typography);
|
|
61
|
+
exports.ListBase = styled_components_2.default.ul.withConfig(core_1.forwardPropConfig(generator))(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\t", "\n"], ["\n\t", "\n"])), generator);
|
|
63
62
|
exports.List = core_1.forwardRef(function (props, ref) {
|
|
64
63
|
var children = props.children, className = props.className, colorScheme = props.colorScheme, isInteractive = props.isInteractive, size = props.size, subheader = props.subheader, variant = props.variant, rest = __rest(props, ["children", "className", "colorScheme", "isInteractive", "size", "subheader", "variant"]);
|
|
65
64
|
var styles = core_1.useStyleConfig('List', props);
|
|
@@ -69,12 +68,13 @@ exports.List = core_1.forwardRef(function (props, ref) {
|
|
|
69
68
|
size,
|
|
70
69
|
variant
|
|
71
70
|
]);
|
|
72
|
-
var listStyleType = props.as === 'ol' ? 'decimal' : 'disc';
|
|
73
71
|
return (react_1.default.createElement(context_1.ListProvider, { value: context },
|
|
74
|
-
react_1.default.createElement(exports.ListBase, __assign({ className: utils_1.cs('vui-list', className),
|
|
72
|
+
react_1.default.createElement(exports.ListBase, __assign({ className: utils_1.cs('vui-list', className), ref: ref }, styles.container, rest),
|
|
75
73
|
subheader && (react_1.default.createElement(listItem_1.default, { className: "vui-listSubheader", color: "grey.80", fontSize: "sm", fontWeight: "medium" }, subheader)),
|
|
76
74
|
children)));
|
|
77
75
|
});
|
|
78
76
|
exports.List.displayName = 'List';
|
|
77
|
+
exports.List.Icon = listIcon_1.default;
|
|
78
|
+
exports.List.Item = listItem_1.default;
|
|
79
79
|
exports.default = exports.List;
|
|
80
80
|
var templateObject_1;
|
package/list/list.types.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SizingProps, SpaceProps, TransitionsProps, TypographyProps } from '../system';
|
|
1
|
+
import { FlexboxesProps, SizingProps, SpaceProps, TransitionsProps, TypographyProps } from '../system';
|
|
3
2
|
import { ThemingProps } from '../theme';
|
|
4
|
-
export interface ListProps extends
|
|
3
|
+
export interface ListProps extends ListStyleProps, ThemingProps<'List'> {
|
|
5
4
|
colorScheme?: 'blue' | 'grey';
|
|
6
5
|
disabled?: boolean;
|
|
7
6
|
isInteractive?: boolean;
|
|
8
7
|
subheader?: string;
|
|
9
8
|
}
|
|
10
|
-
export interface ListStyleProps extends SizingProps, SpaceProps, TransitionsProps, TypographyProps {
|
|
9
|
+
export interface ListStyleProps extends FlexboxesProps, SizingProps, SpaceProps, TransitionsProps, TypographyProps {
|
|
11
10
|
}
|
package/list/listIcon.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.ListIcon = void 0;
|
|
18
|
+
var react_1 = __importDefault(require("react"));
|
|
19
|
+
var context_1 = require("./context");
|
|
20
|
+
var core_1 = require("../core");
|
|
21
|
+
var icon_1 = __importDefault(require("../icon"));
|
|
22
|
+
exports.ListIcon = core_1.forwardRef(function (props, ref) {
|
|
23
|
+
var _a;
|
|
24
|
+
var listProps = (_a = context_1.useList()) !== null && _a !== void 0 ? _a : {};
|
|
25
|
+
var mergedProps = __assign(__assign({}, listProps), props);
|
|
26
|
+
var styles = core_1.useStyleConfig('List', mergedProps);
|
|
27
|
+
return react_1.default.createElement(icon_1.default, __assign({ ref: ref }, styles.icon, props));
|
|
28
|
+
});
|
|
29
|
+
exports.ListIcon.displayName = 'ListIcon';
|
|
30
|
+
exports.default = exports.ListIcon;
|
package/list/listItem.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { ListItemProps, ListItemStyleProps } from './listItem.types';
|
|
2
|
-
export declare const ListItemBase: import("styled-components").StyledComponent<"li", import("styled-components").DefaultTheme,
|
|
3
|
-
|
|
4
|
-
} & ListItemStyleProps, never>;
|
|
5
|
-
export declare const ListItem: import("styled-components").StyledComponent<"li", never, ListItemProps, never>;
|
|
2
|
+
export declare const ListItemBase: import("styled-components").StyledComponent<"li", import("styled-components").DefaultTheme, ListItemStyleProps, never>;
|
|
3
|
+
export declare const ListItem: import("../core").VuiComponent<"li", ListItemProps>;
|
|
6
4
|
export default ListItem;
|
package/list/listItem.js
CHANGED
|
@@ -34,34 +34,41 @@ var styled_components_1 = require("@xstyled/styled-components");
|
|
|
34
34
|
var react_1 = __importDefault(require("react"));
|
|
35
35
|
var styled_components_2 = __importDefault(require("styled-components"));
|
|
36
36
|
var context_1 = require("./context");
|
|
37
|
+
var listIcon_1 = __importDefault(require("./listIcon"));
|
|
37
38
|
var core_1 = require("../core");
|
|
38
39
|
var utils_1 = require("../utils");
|
|
39
40
|
var generator = styled_components_1.compose(styled_components_1.backgroundColor, styled_components_1.borders, styled_components_1.flexboxes, styled_components_1.interactivity, styled_components_1.sizing, styled_components_1.space, styled_components_1.transitions, styled_components_1.typography);
|
|
40
|
-
exports.ListItemBase = styled_components_2.default.li.withConfig({
|
|
41
|
-
shouldForwardProp: core_1.shouldForwardProp(generator.meta.props)
|
|
42
|
-
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\talign-items: center;\n\tdisplay: flex;\n\tline-height: 1.1;\n\toutline: none;\n\ttransition: all 0s ease-in-out;\n\n\t&.disabled {\n\t\tbackground-color: var(--vui-colors-disabled-bg);\n\t\tcolor: var(--vui-colors-disabled-font);\n\t\tcursor: not-allowed;\n\t\tuser-select: none;\n\t}\n\n\t", "\n"], ["\n\talign-items: center;\n\tdisplay: flex;\n\tline-height: 1.1;\n\toutline: none;\n\ttransition: all 0s ease-in-out;\n\n\t&.disabled {\n\t\tbackground-color: var(--vui-colors-disabled-bg);\n\t\tcolor: var(--vui-colors-disabled-font);\n\t\tcursor: not-allowed;\n\t\tuser-select: none;\n\t}\n\n\t", "\n"])), generator);
|
|
41
|
+
exports.ListItemBase = styled_components_2.default.li.withConfig(core_1.forwardPropConfig(generator))(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\tdisplay: flex;\n\tline-height: normal;\n\toutline: none;\n\n\t&[data-disabled='true'] {\n\t\tbackground-color: var(--vui-colors-disabled-bg);\n\t\tcolor: var(--vui-colors-disabled-font);\n\t\tcursor: not-allowed;\n\t\tuser-select: none;\n\t}\n\n\t", "\n"], ["\n\tdisplay: flex;\n\tline-height: normal;\n\toutline: none;\n\n\t&[data-disabled='true'] {\n\t\tbackground-color: var(--vui-colors-disabled-bg);\n\t\tcolor: var(--vui-colors-disabled-font);\n\t\tcursor: not-allowed;\n\t\tuser-select: none;\n\t}\n\n\t", "\n"])), generator);
|
|
43
42
|
exports.ListItem = core_1.forwardRef(function (props, ref) {
|
|
44
43
|
var listProps = context_1.useList();
|
|
45
44
|
var mergedProps = __assign(__assign({}, listProps), props);
|
|
46
|
-
var className = mergedProps.className, disabled = mergedProps.disabled,
|
|
45
|
+
var children = mergedProps.children, center = mergedProps.center, centerH = mergedProps.centerH, _a = mergedProps.centerV, centerV = _a === void 0 ? true : _a, className = mergedProps.className, column = mergedProps.column, disabled = mergedProps.disabled, iconRight = mergedProps.iconRight, iconLeft = mergedProps.iconLeft, _b = mergedProps.isInteractive, isInteractive = _b === void 0 ? props.onClick !== undefined : _b, isSelected = mergedProps.isSelected, onClick = mergedProps.onClick, rest = __rest(mergedProps, ["children", "center", "centerH", "centerV", "className", "column", "disabled", "iconRight", "iconLeft", "isInteractive", "isSelected", "onClick"]);
|
|
47
46
|
var styles = core_1.useStyleConfig('List', mergedProps);
|
|
48
|
-
var
|
|
47
|
+
var _c = styles.item, activeBg = _c.activeBg, hoverBg = _c.hoverBg, itemStyles = __rest(_c, ["activeBg", "hoverBg"]);
|
|
48
|
+
var alignItems = (center || (column ? centerH : centerV)) && 'center';
|
|
49
|
+
var flexDirection = column && 'column';
|
|
50
|
+
var justifyContent = (center || (column ? centerV : centerH)) && 'center';
|
|
49
51
|
var interactiveProps = !disabled && isInteractive
|
|
50
52
|
? {
|
|
51
53
|
cursor: 'pointer',
|
|
52
|
-
focusVisibleRing:
|
|
54
|
+
focusVisibleRing: 2,
|
|
53
55
|
hoverBg: hoverBg,
|
|
54
56
|
activeBg: activeBg,
|
|
55
|
-
hoverColor: hoverColor,
|
|
56
57
|
tabIndex: 0,
|
|
57
58
|
userSelect: 'none'
|
|
58
59
|
}
|
|
59
60
|
: {};
|
|
60
61
|
var aliasedProps = utils_1.filterUndefined({
|
|
62
|
+
alignItems: alignItems,
|
|
61
63
|
bg: isSelected ? hoverBg : undefined,
|
|
62
|
-
|
|
64
|
+
'data-disabled': disabled,
|
|
65
|
+
flexDirection: flexDirection,
|
|
66
|
+
justifyContent: justifyContent
|
|
63
67
|
});
|
|
64
|
-
return (react_1.default.createElement(exports.ListItemBase, __assign({ className: utils_1.cs('vui-listItem', className
|
|
68
|
+
return (react_1.default.createElement(exports.ListItemBase, __assign({ className: utils_1.cs('vui-listItem', className), onClick: !disabled ? onClick : undefined, px: 1, ref: ref, transitionDuration: "fast" }, itemStyles, interactiveProps, aliasedProps, rest),
|
|
69
|
+
iconLeft && react_1.default.createElement(listIcon_1.default, { icon: iconLeft, mr: 1 }),
|
|
70
|
+
children,
|
|
71
|
+
iconRight && react_1.default.createElement(listIcon_1.default, { icon: iconRight, ml: "auto" })));
|
|
65
72
|
});
|
|
66
73
|
exports.ListItem.displayName = 'ListItem';
|
|
67
74
|
exports.default = exports.ListItem;
|
package/list/listItem.types.d.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IconProp } from '../icon';
|
|
2
2
|
import { BackgroundColorProps, FlexboxesProps, InteractivityProps, SizingProps, SpaceProps, TransitionsProps, TypographyProps } from '../system';
|
|
3
3
|
import { ThemingProps } from '../theme';
|
|
4
|
-
export interface ListItemProps extends
|
|
4
|
+
export interface ListItemProps extends ListItemStyleProps, ThemingProps<'List'> {
|
|
5
|
+
center?: boolean;
|
|
6
|
+
centerH?: boolean;
|
|
7
|
+
centerV?: boolean;
|
|
5
8
|
colorScheme?: 'blue' | 'grey';
|
|
9
|
+
column?: boolean;
|
|
6
10
|
disabled?: boolean;
|
|
11
|
+
iconLeft?: IconProp;
|
|
12
|
+
iconRight?: IconProp;
|
|
7
13
|
isInteractive?: boolean;
|
|
8
14
|
isSelected?: boolean;
|
|
9
15
|
}
|
package/list/theme.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Dict } from '../utils';
|
|
2
2
|
declare function variantDefault(props: Dict): {
|
|
3
|
+
container: {};
|
|
4
|
+
icon: {};
|
|
3
5
|
item: Dict<any>;
|
|
4
6
|
};
|
|
5
7
|
declare const _default: {
|
|
@@ -11,18 +13,36 @@ declare const _default: {
|
|
|
11
13
|
parts: string[];
|
|
12
14
|
sizes: {
|
|
13
15
|
sm: {
|
|
16
|
+
icon: {
|
|
17
|
+
size: string;
|
|
18
|
+
};
|
|
14
19
|
item: {
|
|
15
20
|
fontSize: string;
|
|
16
21
|
h: number;
|
|
17
22
|
};
|
|
18
23
|
};
|
|
19
24
|
md: {
|
|
25
|
+
icon: {
|
|
26
|
+
size: string;
|
|
27
|
+
};
|
|
20
28
|
item: {
|
|
21
29
|
fontSize: string;
|
|
22
30
|
h: number;
|
|
23
31
|
};
|
|
24
32
|
};
|
|
25
33
|
lg: {
|
|
34
|
+
icon: {
|
|
35
|
+
size: string;
|
|
36
|
+
};
|
|
37
|
+
item: {
|
|
38
|
+
fontSize: string;
|
|
39
|
+
h: number;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
xl: {
|
|
43
|
+
icon: {
|
|
44
|
+
scale: number;
|
|
45
|
+
};
|
|
26
46
|
item: {
|
|
27
47
|
fontSize: string;
|
|
28
48
|
h: number;
|
|
@@ -31,14 +51,29 @@ declare const _default: {
|
|
|
31
51
|
};
|
|
32
52
|
variants: {
|
|
33
53
|
default: typeof variantDefault;
|
|
34
|
-
|
|
54
|
+
ordered: {
|
|
55
|
+
container: {
|
|
56
|
+
as: string;
|
|
57
|
+
listStyleType: string;
|
|
58
|
+
pl: number;
|
|
59
|
+
};
|
|
35
60
|
item: {
|
|
36
61
|
display: string;
|
|
37
62
|
h: undefined;
|
|
63
|
+
lineHeight: number;
|
|
38
64
|
};
|
|
39
|
-
|
|
65
|
+
};
|
|
66
|
+
unordered: {
|
|
67
|
+
container: {
|
|
68
|
+
as: string;
|
|
69
|
+
listStyleType: string;
|
|
40
70
|
pl: number;
|
|
41
71
|
};
|
|
72
|
+
item: {
|
|
73
|
+
display: string;
|
|
74
|
+
h: undefined;
|
|
75
|
+
lineHeight: number;
|
|
76
|
+
};
|
|
42
77
|
};
|
|
43
78
|
};
|
|
44
79
|
};
|
package/list/theme.js
CHANGED
|
@@ -2,54 +2,83 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
function variantDefault(props) {
|
|
4
4
|
var c = props.colorScheme;
|
|
5
|
-
var
|
|
5
|
+
var item = {
|
|
6
6
|
activeBg: c + ".30",
|
|
7
7
|
borderRadius: 'md',
|
|
8
8
|
hoverBg: c + ".20"
|
|
9
9
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
return {
|
|
15
|
-
item: itemStyles
|
|
16
|
-
};
|
|
10
|
+
var container = {};
|
|
11
|
+
var icon = {};
|
|
12
|
+
return { container: container, icon: icon, item: item };
|
|
17
13
|
}
|
|
18
14
|
var defaultProps = {
|
|
19
15
|
colorScheme: 'blue',
|
|
20
16
|
size: 'md',
|
|
21
17
|
variant: 'default'
|
|
22
18
|
};
|
|
23
|
-
var parts = ['
|
|
19
|
+
var parts = ['container', 'icon', 'item'];
|
|
24
20
|
var sizes = {
|
|
25
21
|
sm: {
|
|
22
|
+
icon: {
|
|
23
|
+
size: 'sm'
|
|
24
|
+
},
|
|
26
25
|
item: {
|
|
27
|
-
fontSize: '
|
|
26
|
+
fontSize: 'md',
|
|
28
27
|
h: 32
|
|
29
28
|
}
|
|
30
29
|
},
|
|
31
30
|
md: {
|
|
31
|
+
icon: {
|
|
32
|
+
size: 'md'
|
|
33
|
+
},
|
|
32
34
|
item: {
|
|
33
35
|
fontSize: 'md',
|
|
34
36
|
h: 40
|
|
35
37
|
}
|
|
36
38
|
},
|
|
37
39
|
lg: {
|
|
40
|
+
icon: {
|
|
41
|
+
size: 'lg'
|
|
42
|
+
},
|
|
38
43
|
item: {
|
|
39
44
|
fontSize: 'md',
|
|
40
45
|
h: 48
|
|
41
46
|
}
|
|
47
|
+
},
|
|
48
|
+
xl: {
|
|
49
|
+
icon: {
|
|
50
|
+
scale: 2
|
|
51
|
+
},
|
|
52
|
+
item: {
|
|
53
|
+
fontSize: 'lg',
|
|
54
|
+
h: 56
|
|
55
|
+
}
|
|
42
56
|
}
|
|
43
57
|
};
|
|
44
58
|
var variants = {
|
|
45
59
|
default: variantDefault,
|
|
46
|
-
|
|
60
|
+
ordered: {
|
|
61
|
+
container: {
|
|
62
|
+
as: 'ol',
|
|
63
|
+
listStyleType: 'decimal',
|
|
64
|
+
pl: 3
|
|
65
|
+
},
|
|
47
66
|
item: {
|
|
48
67
|
display: 'list-item',
|
|
49
|
-
h: undefined
|
|
50
|
-
|
|
51
|
-
|
|
68
|
+
h: undefined,
|
|
69
|
+
lineHeight: 1.5
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
unordered: {
|
|
73
|
+
container: {
|
|
74
|
+
as: 'ul',
|
|
75
|
+
listStyleType: 'disc',
|
|
52
76
|
pl: 3
|
|
77
|
+
},
|
|
78
|
+
item: {
|
|
79
|
+
display: 'list-item',
|
|
80
|
+
h: undefined,
|
|
81
|
+
lineHeight: 1.5
|
|
53
82
|
}
|
|
54
83
|
}
|
|
55
84
|
};
|
package/p/p.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PProps, PStyleProps } from './p.types';
|
|
2
|
-
export declare const PBase: import("styled-components").StyledComponent<"p", import("styled-components").DefaultTheme, {
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
export declare const P: import("
|
|
2
|
+
export declare const PBase: import("styled-components").StyledComponent<"p", import("styled-components").DefaultTheme, PStyleProps & {
|
|
3
|
+
color?: any;
|
|
4
|
+
}, never>;
|
|
5
|
+
export declare const P: import("../core").VuiComponent<"p", PProps>;
|
|
6
6
|
export default P;
|
package/p/p.js
CHANGED
|
@@ -37,9 +37,7 @@ var core_1 = require("../core");
|
|
|
37
37
|
var system_1 = require("../system");
|
|
38
38
|
var utils_1 = require("../utils");
|
|
39
39
|
var generator = styled_components_1.compose(system_1.isTruncated, system_1.maxLines, styled_components_1.sizing, styled_components_1.space, styled_components_1.transitions, styled_components_1.typography);
|
|
40
|
-
exports.PBase = styled_components_2.default.p.withConfig(
|
|
41
|
-
shouldForwardProp: core_1.shouldForwardProp(generator.meta.props)
|
|
42
|
-
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\ttransition: all 0s ease-in-out;\n\n\t", "\n"], ["\n\ttransition: all 0s ease-in-out;\n\n\t", "\n"])), generator);
|
|
40
|
+
exports.PBase = styled_components_2.default.p.withConfig(core_1.forwardPropConfig(generator))(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\t", "\n"], ["\n\t", "\n"])), generator);
|
|
43
41
|
exports.P = core_1.forwardRef(function (props, ref) {
|
|
44
42
|
var _a = core_1.omitThemingProps(props), align = _a.align, casing = _a.casing, className = _a.className, decoration = _a.decoration, weight = _a.weight, rest = __rest(_a, ["align", "casing", "className", "decoration", "weight"]);
|
|
45
43
|
var styles = core_1.useStyleConfig('P', props);
|