@veracity/vui 1.7.0-beta.2 → 1.7.0-beta.3
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.
|
@@ -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;;;;;;;;;;;;;;;SAoBtB,CAAA;AACD;;;;;;GAMG;AACH,eAAO,MAAM,MAAM;
|
|
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;UAqHX,iBAAiB;UACjB,iBAAiB;CACxB,CAAA;AAKD,eAAe,MAAM,CAAA"}
|
|
@@ -130,15 +130,15 @@ exports.Button = (0, core_1.vui)((props, ref) => {
|
|
|
130
130
|
w: isFullWidth ? '100%' : undefined
|
|
131
131
|
});
|
|
132
132
|
return (react_1.default.createElement(context_2.ButtonProvider, { value: context },
|
|
133
|
-
react_1.default.createElement(exports.ButtonBase, Object.assign({ borderWidth: border, className: (0, utils_1.cs)('vui-button', className, isActive && utils_1.activeClassName), disabled: disabled, focusRing: 3, h: h, pl: pl, pr: pr, ref: ref, type: "button", variant: variant }, buttonStyles, disabledProps, aliasedProps, rest),
|
|
133
|
+
react_1.default.createElement(exports.ButtonBase, Object.assign({ borderWidth: border, className: (0, utils_1.cs)('vui-button', className, isActive && utils_1.activeClassName), disabled: disabled, focusRing: 3, h: h, pl: pl, pr: isDropDown ? 0 : pr, ref: ref, type: "button", variant: variant }, buttonStyles, disabledProps, aliasedProps, rest),
|
|
134
134
|
hasState && (react_1.default.createElement(StateWrapper, Object.assign({ onClick: (e) => e.stopPropagation() }, stateProps),
|
|
135
135
|
react_1.default.createElement(buttonIcon_1.default, Object.assign({ m: "auto" }, stateIconProps)))),
|
|
136
136
|
react_1.default.createElement(Content, null,
|
|
137
137
|
(0, utils_1.isString)(icon) ? react_1.default.createElement(buttonIcon_1.default, { name: icon }) : icon,
|
|
138
138
|
!icon && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
139
139
|
(0, utils_1.isString)(iconLeft) ? react_1.default.createElement(buttonIcon_1.default, { mr: isDropDown ? 0 : iconLeftMr, name: iconLeft }) : iconLeft, children !== null && children !== void 0 ? children : ((0, utils_1.isReactText)(text) ? react_1.default.createElement(buttonText_1.default, Object.assign({}, { isTruncated, text })) : text),
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
(0, utils_1.isString)(iconRight) ? react_1.default.createElement(buttonIcon_1.default, { ml: iconRightMl, name: iconRight }) : iconRight)),
|
|
141
|
+
isDropDown && react_1.default.createElement(buttonIcon_1.default, { name: "falAngleDown" })))));
|
|
142
142
|
});
|
|
143
143
|
exports.Button.Icon = buttonIcon_1.default;
|
|
144
144
|
exports.Button.Text = buttonText_1.default;
|
|
@@ -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;;;;;;;;;;;;;;;SAoBtB,CAAA;AACD;;;;;;GAMG;AACH,eAAO,MAAM,MAAM;
|
|
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;UAqHX,iBAAiB;UACjB,iBAAiB;CACxB,CAAA;AAKD,eAAe,MAAM,CAAA"}
|
|
@@ -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, isActive && activeClassName), 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: isDropDown ? 0 : 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,
|
|
@@ -97,8 +97,8 @@ export const Button = vui((props, ref) => {
|
|
|
97
97
|
!icon && (React.createElement(React.Fragment, null,
|
|
98
98
|
isString(iconLeft) ? React.createElement(ButtonIcon, { mr: isDropDown ? 0 : iconLeftMr, name: iconLeft }) : iconLeft,
|
|
99
99
|
children ?? (isReactText(text) ? React.createElement(ButtonText, { ...{ isTruncated, text } }) : text),
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
isString(iconRight) ? React.createElement(ButtonIcon, { ml: iconRightMl, name: iconRight }) : iconRight)),
|
|
101
|
+
isDropDown && React.createElement(ButtonIcon, { name: "falAngleDown" })))));
|
|
102
102
|
});
|
|
103
103
|
Button.Icon = ButtonIcon;
|
|
104
104
|
Button.Text = ButtonText;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veracity/vui",
|
|
3
|
-
"version": "1.7.0-beta.
|
|
3
|
+
"version": "1.7.0-beta.3",
|
|
4
4
|
"description": "Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.",
|
|
5
5
|
"module": "./dist/esm/index.js",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
package/src/button/button.tsx
CHANGED
|
@@ -135,7 +135,7 @@ export const Button = vui<'button', ButtonProps>((props, ref) => {
|
|
|
135
135
|
focusRing={3}
|
|
136
136
|
h={h}
|
|
137
137
|
pl={pl}
|
|
138
|
-
pr={pr}
|
|
138
|
+
pr={isDropDown ? 0 : pr}
|
|
139
139
|
ref={ref}
|
|
140
140
|
type="button"
|
|
141
141
|
variant={variant}
|
|
@@ -152,18 +152,16 @@ export const Button = vui<'button', ButtonProps>((props, ref) => {
|
|
|
152
152
|
|
|
153
153
|
<Content>
|
|
154
154
|
{isString(icon) ? <ButtonIcon name={icon} /> : icon}
|
|
155
|
-
|
|
156
155
|
{!icon && (
|
|
157
156
|
<>
|
|
158
157
|
{isString(iconLeft) ? <ButtonIcon mr={isDropDown ? 0 : iconLeftMr} name={iconLeft} /> : iconLeft}
|
|
159
158
|
|
|
160
159
|
{children ?? (isReactText(text) ? <ButtonText {...{ isTruncated, text }} /> : text)}
|
|
161
160
|
|
|
162
|
-
{isDropDown && <ButtonIcon name="falAngleDown" />}
|
|
163
|
-
|
|
164
161
|
{isString(iconRight) ? <ButtonIcon ml={iconRightMl} name={iconRight} /> : iconRight}
|
|
165
162
|
</>
|
|
166
163
|
)}
|
|
164
|
+
{isDropDown && <ButtonIcon name="falAngleDown" />}
|
|
167
165
|
</Content>
|
|
168
166
|
</ButtonBase>
|
|
169
167
|
</ButtonProvider>
|