@wireapp/react-ui-kit 9.8.1 → 9.9.0

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.
@@ -6,7 +6,8 @@ export declare enum ButtonVariant {
6
6
  SECONDARY = "secondary",
7
7
  TERTIARY = "tertiary",
8
8
  QUATERNARY = "quaternary",
9
- SEND = "send"
9
+ SEND = "send",
10
+ CANCEL = "cancel"
10
11
  }
11
12
  export interface ButtonProps<T = HTMLButtonElement> extends TextProps<T> {
12
13
  variant?: ButtonVariant;
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/Form/Button.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAIzC,OAAO,EAAC,KAAK,EAAC,MAAM,WAAW,CAAC;AAEhC,OAAO,EAAC,SAAS,EAA6B,MAAM,SAAS,CAAC;AAG9D,oBAAY,aAAa;IACvB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,UAAU,eAAe;IACzB,IAAI,SAAS;CACd;AAED,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,iBAAiB,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IACtE,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,WAAW,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,SAsJpE,CAAC;AAEH,eAAO,MAAM,MAAM,sDAAmE,WAAW,qDAIhG,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAAW,WAAW,WAEnD,CAAC"}
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/Form/Button.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAIzC,OAAO,EAAC,KAAK,EAAC,MAAM,WAAW,CAAC;AAEhC,OAAO,EAAC,SAAS,EAA6B,MAAM,SAAS,CAAC;AAG9D,oBAAY,aAAa;IACvB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,UAAU,eAAe;IACzB,IAAI,SAAS;IACb,MAAM,WAAW;CAClB;AAED,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,iBAAiB,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IACtE,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,WAAW,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,SAsKpE,CAAC;AAEH,eAAO,MAAM,MAAM,sDAAmE,WAAW,qDAIhG,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAAW,WAAW,WAEnD,CAAC"}
@@ -25,10 +25,11 @@ var ButtonVariant;
25
25
  ButtonVariant["TERTIARY"] = "tertiary";
26
26
  ButtonVariant["QUATERNARY"] = "quaternary";
27
27
  ButtonVariant["SEND"] = "send";
28
+ ButtonVariant["CANCEL"] = "cancel";
28
29
  })(ButtonVariant || (exports.ButtonVariant = ButtonVariant = {}));
29
30
  const buttonStyle = (theme, _a) => {
30
31
  var { variant = ButtonVariant.PRIMARY, backgroundColor, block = false, disabled = false, noCapital = false, bold = true, center = true, color = Identity_1.COLOR.WHITE, fontSize = theme.fontSizes.base, noWrap = true, textTransform = 'none', truncate = true } = _a, props = __rest(_a, ["variant", "backgroundColor", "block", "disabled", "noCapital", "bold", "center", "color", "fontSize", "noWrap", "textTransform", "truncate"]);
31
- return (Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0, Text_1.textStyle)(theme, Object.assign({ block,
32
+ return (Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0, Text_1.textStyle)(theme, Object.assign({ block,
32
33
  bold,
33
34
  center,
34
35
  disabled,
@@ -92,6 +93,16 @@ const buttonStyle = (theme, _a) => {
92
93
  '&:active': {
93
94
  backgroundColor: Identity_1.COLOR_V2.GREEN_LIGHT_700,
94
95
  },
96
+ })))), (variant === ButtonVariant.CANCEL && Object.assign({ backgroundColor: backgroundColor || (disabled ? Identity_1.COLOR_V2.GRAY_50 : Identity_1.COLOR_V2.RED), color: disabled ? Identity_1.COLOR_V2.GRAY_80 : Identity_1.COLOR_V2.WHITE, lineHeight: '1.5rem' }, (!disabled && {
97
+ '&:hover, &:focus': {
98
+ backgroundColor: Identity_1.COLOR_V2.RED_LIGHT_600,
99
+ },
100
+ '&:focus': {
101
+ border: `1px solid ${Identity_1.COLOR_V2.RED_LIGHT_700}`,
102
+ },
103
+ '&:active': {
104
+ backgroundColor: Identity_1.COLOR_V2.RED_LIGHT_700,
105
+ },
95
106
  })))), (variant === ButtonVariant.SEND && Object.assign({ backgroundColor: backgroundColor || (disabled ? Identity_1.COLOR_V2.GRAY_70 : Identity_1.COLOR_V2.BLUE), width: '40px' }, (!disabled && {
96
107
  '&:hover, &:focus': {
97
108
  backgroundColor: Identity_1.COLOR_V2.BLUE_LIGHT_600,
package/package.json CHANGED
@@ -16,10 +16,10 @@
16
16
  },
17
17
  "devDependencies": {
18
18
  "@babel/cli": "7.22.10",
19
- "@babel/core": "7.22.10",
19
+ "@babel/core": "7.22.11",
20
20
  "@babel/preset-env": "7.22.10",
21
21
  "@babel/preset-react": "7.22.5",
22
- "@babel/preset-typescript": "7.22.5",
22
+ "@babel/preset-typescript": "7.22.11",
23
23
  "@emotion/babel-preset-css-prop": "^11.10.0",
24
24
  "@emotion/jest": "11.11.0",
25
25
  "@emotion/react": "^11.10.4",
@@ -35,7 +35,7 @@
35
35
  "@types/react-dom": "^18.0.8",
36
36
  "@types/rimraf": "^3.0.2",
37
37
  "@types/webpack-env": "1.18.1",
38
- "babel-jest": "29.6.2",
38
+ "babel-jest": "29.6.4",
39
39
  "babel-loader": "9.1.3",
40
40
  "jest": "^29.2.1",
41
41
  "react": "18.2.0",
@@ -70,6 +70,6 @@
70
70
  "test:watch": "jest --watch",
71
71
  "test:update": "jest --updateSnapshot"
72
72
  },
73
- "version": "9.8.1",
74
- "gitHead": "c134249fb524943318eae5b5126a0c714dd58147"
73
+ "version": "9.9.0",
74
+ "gitHead": "77a22f1d8925f96e02290df29198c5a49d7b650f"
75
75
  }