@veracity/vui 2.8.2-rc.0 → 2.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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;;;;;;;;;;;;;;;;SAatB,CAAA;AACD;;;;;;GAMG;AACH,eAAO,MAAM,MAAM;UAoHX,iBAAiB;UACjB,iBAAiB;CACxB,CAAA;AAKD,eAAe,MAAM,CAAA"}
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;;;;;;;;;;;;;;;;SAatB,CAAA;AAMD;;;;;;GAMG;AACH,eAAO,MAAM,MAAM;UAqHX,iBAAiB;UACjB,iBAAiB;CACxB,CAAA;AAKD,eAAe,MAAM,CAAA"}
@@ -71,6 +71,9 @@ exports.ButtonBase = core_1.styled.buttonBox `
71
71
  user-select: none;
72
72
  width: fit-content;
73
73
  `;
74
+ const ariaProps = {
75
+ 'aria-label': 'button'
76
+ };
74
77
  /**
75
78
  * Triggers given actions on click. Supports multiple states, sizes and variants.
76
79
  *
@@ -123,7 +126,7 @@ exports.Button = (0, core_1.vui)((props, ref) => {
123
126
  w: isFullWidth ? '100%' : undefined
124
127
  });
125
128
  return (react_1.default.createElement(context_2.ButtonProvider, { value: context },
126
- 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),
129
+ 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 }, ariaProps, buttonStyles, disabledProps, aliasedProps, rest),
127
130
  hasState && (react_1.default.createElement(StateWrapper, Object.assign({ onClick: (e) => e.stopPropagation() }, stateProps),
128
131
  react_1.default.createElement(buttonIcon_1.default, Object.assign({ m: "auto" }, stateIconProps)))),
129
132
  react_1.default.createElement(Content, null,
@@ -1,10 +1,7 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.ellipsisOverflow = exports.HSLToRGBA = exports.vuiColorToRGBA = exports.hexToRGBA = exports.parseHSL = exports.cs = void 0;
7
- const colors_1 = __importDefault(require("../theme/foundations/colors"));
4
+ const theme_1 = require("../theme");
8
5
  /** Concatenates individual className arguments and returns a single string. */
9
6
  function cs(...classNames) {
10
7
  return classNames.filter(Boolean).join(' ');
@@ -40,7 +37,7 @@ function vuiColorToRGBA(color, alpha) {
40
37
  const [colorName, shade] = color.split('.');
41
38
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
42
39
  // @ts-ignore
43
- const x = parseHSL(colors_1.default[colorName][shade]);
40
+ const x = parseHSL(theme_1.colors[colorName][shade]);
44
41
  return HSLToRGBA(x.h, x.s, x.l, alpha || shade === 'main' ? 1 : parseInt(shade));
45
42
  }
46
43
  exports.vuiColorToRGBA = vuiColorToRGBA;
@@ -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;;;;;;;;;;;;;;;;SAatB,CAAA;AACD;;;;;;GAMG;AACH,eAAO,MAAM,MAAM;UAoHX,iBAAiB;UACjB,iBAAiB;CACxB,CAAA;AAKD,eAAe,MAAM,CAAA"}
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;;;;;;;;;;;;;;;;SAatB,CAAA;AAMD;;;;;;GAMG;AACH,eAAO,MAAM,MAAM;UAqHX,iBAAiB;UACjB,iBAAiB;CACxB,CAAA;AAKD,eAAe,MAAM,CAAA"}
@@ -31,6 +31,9 @@ export const ButtonBase = styled.buttonBox `
31
31
  user-select: none;
32
32
  width: fit-content;
33
33
  `;
34
+ const ariaProps = {
35
+ 'aria-label': 'button'
36
+ };
34
37
  /**
35
38
  * Triggers given actions on click. Supports multiple states, sizes and variants.
36
39
  *
@@ -82,7 +85,7 @@ export const Button = vui((props, ref) => {
82
85
  w: isFullWidth ? '100%' : undefined
83
86
  });
84
87
  return (React.createElement(ButtonProvider, { value: context },
85
- 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 },
88
+ 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, ...ariaProps, ...buttonStyles, ...disabledProps, ...aliasedProps, ...rest },
86
89
  hasState && (React.createElement(StateWrapper, { onClick: (e) => e.stopPropagation(), ...stateProps },
87
90
  React.createElement(ButtonIcon, { m: "auto", ...stateIconProps }))),
88
91
  React.createElement(Content, null,
@@ -1,4 +1,4 @@
1
- import colors from '../theme/foundations/colors';
1
+ import { colors } from '../theme';
2
2
  /** Concatenates individual className arguments and returns a single string. */
3
3
  export function cs(...classNames) {
4
4
  return classNames.filter(Boolean).join(' ');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veracity/vui",
3
- "version": "2.8.2-rc.0",
3
+ "version": "2.8.2",
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",
@@ -36,6 +36,11 @@ export const ButtonBase = styled.buttonBox<ButtonProps>`
36
36
  user-select: none;
37
37
  width: fit-content;
38
38
  `
39
+
40
+ const ariaProps = {
41
+ 'aria-label': 'button'
42
+ }
43
+
39
44
  /**
40
45
  * Triggers given actions on click. Supports multiple states, sizes and variants.
41
46
  *
@@ -131,6 +136,7 @@ export const Button = vui<'button', ButtonProps>((props, ref) => {
131
136
  ref={ref}
132
137
  type="button"
133
138
  variant={variant}
139
+ {...ariaProps}
134
140
  {...buttonStyles}
135
141
  {...disabledProps}
136
142
  {...aliasedProps}
@@ -1,6 +1,6 @@
1
1
  import { Property } from 'csstype'
2
2
 
3
- import colors from '../theme/foundations/colors'
3
+ import { colors } from '../theme'
4
4
 
5
5
  /** Concatenates individual className arguments and returns a single string. */
6
6
  export function cs(...classNames: any[]) {