@wireapp/react-ui-kit 9.2.2 → 9.3.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.
@@ -1 +1 @@
1
- {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../src/Form/Select.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,YAAY,EAAC,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAC,SAAS,EAAW,MAAM,gBAAgB,CAAC;AAEnD,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,iDAAiD,CAAC;AAevF,MAAM,MAAM,MAAM,GAAG;IACnB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,UAAU,WAAW,CAAC,OAAO,SAAS,OAAO,CAAE,SAAQ,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC;IACvF,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,MAAM,qOAyElB,CAAC"}
1
+ {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../src/Form/Select.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,YAAY,EAAC,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAC,SAAS,EAAW,MAAM,gBAAgB,CAAC;AAEnD,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,iDAAiD,CAAC;AAgBvF,MAAM,MAAM,MAAM,GAAG;IACnB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,UAAU,WAAW,CAAC,OAAO,SAAS,OAAO,CAAE,SAAQ,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC;IACvF,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,MAAM,qOAyElB,CAAC"}
@@ -21,6 +21,7 @@ const react_select_1 = __importDefault(require("react-select"));
21
21
  const InputLabel_1 = require("./InputLabel");
22
22
  const SelectComponents_1 = require("./SelectComponents");
23
23
  const SelectStyles_1 = require("./SelectStyles");
24
+ const enums_1 = require("../types/enums");
24
25
  const Select = (_a) => {
25
26
  var { id, label, error, helperText, disabled = false, dataUieName, options, isMulti, wrapperCSS = {}, markInvalid = false, required = false } = _a, props = __rest(_a, ["id", "label", "error", "helperText", "disabled", "dataUieName", "options", "isMulti", "wrapperCSS", "markInvalid", "required"]);
26
27
  const theme = (0, react_1.useTheme)();
@@ -34,7 +35,7 @@ const Select = (_a) => {
34
35
  Menu: (0, SelectComponents_1.Menu)(dataUieName),
35
36
  ValueContainer: SelectComponents_1.ValueContainer,
36
37
  IndicatorsContainer: SelectComponents_1.IndicatorsContainer,
37
- }, tabIndex: -1, isDisabled: disabled, hideSelectedOptions: false, isSearchable: false, isClearable: false, closeMenuOnSelect: !isMulti, isMulti: isMulti, options: options }, props)), !hasError && helperText && ((0, jsx_runtime_1.jsx)("p", Object.assign({ css: (theme) => ({
38
+ }, tabIndex: enums_1.TabIndex.UNFOCUSABLE, isDisabled: disabled, hideSelectedOptions: false, isSearchable: false, isClearable: false, closeMenuOnSelect: !isMulti, isMulti: isMulti, options: options }, props)), !hasError && helperText && ((0, jsx_runtime_1.jsx)("p", Object.assign({ css: (theme) => ({
38
39
  fontSize: theme.fontSizes.small,
39
40
  fontWeight: 400,
40
41
  color: theme.Input.labelColor,
@@ -1 +1 @@
1
- {"version":3,"file":"SelectComponents.d.ts","sourceRoot":"","sources":["../../src/Form/SelectComponents.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAEL,cAAc,EACd,sBAAsB,EACtB,WAAW,EACX,mBAAmB,EACnB,wBAAwB,EACxB,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAKhC,eAAO,MAAM,eAAe,UAAW,cAAc,qDAMpD,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAAW,sBAAsB,qDAS9D,CAAC;AAGF,eAAO,MAAM,YAAY,gBAAiB,MAAM,aAAa,YAAY,MAAM,CAAC,qDA+C/E,CAAC;AAGF,eAAO,MAAM,IAAI,gBAAiB,MAAM,aAAa,SAAS,qDAc7D,CAAC;AAEF,eAAO,MAAM,WAAW,qBAqBvB,CAAC;AAEF,eAAO,MAAM,cAAc,+BAA8B,oBAAoB,MAAM,CAAC,qDAInF,CAAC;AAEF,eAAO,MAAM,mBAAmB,+BAA8B,yBAAyB,MAAM,CAAC,qDAW7F,CAAC"}
1
+ {"version":3,"file":"SelectComponents.d.ts","sourceRoot":"","sources":["../../src/Form/SelectComponents.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAEL,cAAc,EACd,sBAAsB,EACtB,WAAW,EACX,mBAAmB,EACnB,wBAAwB,EACxB,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAMhC,eAAO,MAAM,eAAe,UAAW,cAAc,qDAMpD,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAAW,sBAAsB,qDAS9D,CAAC;AAGF,eAAO,MAAM,YAAY,gBAAiB,MAAM,aAAa,YAAY,MAAM,CAAC,qDA+C/E,CAAC;AAGF,eAAO,MAAM,IAAI,gBAAiB,MAAM,aAAa,SAAS,qDAc7D,CAAC;AAEF,eAAO,MAAM,WAAW,qBAqBvB,CAAC;AAEF,eAAO,MAAM,cAAc,+BAA8B,oBAAoB,MAAM,CAAC,qDAInF,CAAC;AAEF,eAAO,MAAM,mBAAmB,+BAA8B,yBAAyB,MAAM,CAAC,qDAW7F,CAAC"}
@@ -33,9 +33,10 @@ const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
33
33
  */
34
34
  const react_select_1 = require("react-select");
35
35
  const ArrowDown_1 = require("../Icon/ArrowDown");
36
+ const enums_1 = require("../types/enums");
36
37
  // SelectContainer
37
38
  const SelectContainer = (props) => {
38
- return ((0, jsx_runtime_1.jsx)(react_select_1.components.SelectContainer, Object.assign({}, props, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ tabIndex: 0 }, { children: props.children })) })));
39
+ return ((0, jsx_runtime_1.jsx)(react_select_1.components.SelectContainer, Object.assign({}, props, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ tabIndex: enums_1.TabIndex.FOCUSABLE }, { children: props.children })) })));
39
40
  };
40
41
  exports.SelectContainer = SelectContainer;
41
42
  const DropdownIndicator = (props) => {
@@ -21,16 +21,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
21
21
  exports.useTimeout = void 0;
22
22
  const react_1 = require("react");
23
23
  const useTimeout = (onTimeoutStop, duration) => {
24
- const [timerId, setTimerId] = (0, react_1.useState)(null);
24
+ const timerRef = (0, react_1.useRef)(null);
25
25
  const removeTimeout = () => {
26
- if (timerId) {
27
- window.clearTimeout(timerId);
28
- setTimerId(null);
26
+ if (timerRef.current) {
27
+ window.clearTimeout(timerRef.current);
28
+ timerRef.current = null;
29
29
  }
30
30
  };
31
31
  const start = () => {
32
32
  removeTimeout();
33
- setTimerId(window.setTimeout(onStop, duration));
33
+ timerRef.current = window.setTimeout(onStop, duration);
34
34
  };
35
35
  const onStop = () => {
36
36
  removeTimeout();
@@ -1,3 +1,4 @@
1
+ import { ReactNode } from 'react';
1
2
  import { CSSObject } from '@emotion/react';
2
3
  import { TextProps } from './Text';
3
4
  import { Theme } from '../Layout';
@@ -8,6 +9,7 @@ export declare enum LinkVariant {
8
9
  export interface LinkProps<T = HTMLAnchorElement> extends TextProps<T> {
9
10
  variant?: LinkVariant;
10
11
  targetBlank?: Boolean;
12
+ children?: ReactNode;
11
13
  }
12
14
  export declare const linkStyle: <T>(theme: Theme, props: LinkProps<T>) => CSSObject;
13
15
  export declare const filterLinkProps: (props: LinkProps) => Object;
@@ -1 +1 @@
1
- {"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../src/Text/Link.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAAC,SAAS,EAA6B,MAAM,QAAQ,CAAC;AAG7D,OAAO,EAAC,KAAK,EAAC,MAAM,WAAW,CAAC;AAGhC,oBAAY,WAAW;IACrB,OAAO,YAAY;IACnB,SAAS,cAAc;CACxB;AAED,MAAM,WAAW,SAAS,CAAC,CAAC,GAAG,iBAAiB,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IACpE,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,SAAS,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,KAAK,SAoCjE,CAAC;AAEF,eAAO,MAAM,eAAe,UAAW,SAAS,WAAyD,CAAC;AAE1G,eAAO,MAAM,IAAI,8BAA6B,SAAS,qDAWtD,CAAC"}
1
+ {"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../src/Text/Link.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAAC,SAAS,EAA6B,MAAM,QAAQ,CAAC;AAG7D,OAAO,EAAC,KAAK,EAAC,MAAM,WAAW,CAAC;AAGhC,oBAAY,WAAW;IACrB,OAAO,YAAY;IACnB,SAAS,cAAc;CACxB;AAED,MAAM,WAAW,SAAS,CAAC,CAAC,GAAG,iBAAiB,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IACpE,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,eAAO,MAAM,SAAS,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,KAAK,SAoCjE,CAAC;AAEF,eAAO,MAAM,eAAe,UAAW,SAAS,WAAyD,CAAC;AAE1G,eAAO,MAAM,IAAI,8BAA6B,SAAS,qDAWtD,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare enum TabIndex {
2
+ FOCUSABLE = 0,
3
+ UNFOCUSABLE = -1
4
+ }
5
+ //# sourceMappingURL=enums.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../src/types/enums.ts"],"names":[],"mappings":"AAmBA,oBAAY,QAAQ;IAClB,SAAS,IAAI;IACb,WAAW,KAAK;CACjB"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ /*
3
+ * Wire
4
+ * Copyright (C) 2022 Wire Swiss GmbH
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU General Public License as published by
8
+ * the Free Software Foundation, either version 3 of the License, or
9
+ * (at your option) any later version.
10
+ *
11
+ * This program is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU General Public License
17
+ * along with this program. If not, see http://www.gnu.org/licenses/.
18
+ *
19
+ */
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ exports.TabIndex = void 0;
22
+ var TabIndex;
23
+ (function (TabIndex) {
24
+ TabIndex[TabIndex["FOCUSABLE"] = 0] = "FOCUSABLE";
25
+ TabIndex[TabIndex["UNFOCUSABLE"] = -1] = "UNFOCUSABLE";
26
+ })(TabIndex = exports.TabIndex || (exports.TabIndex = {}));
package/package.json CHANGED
@@ -69,6 +69,6 @@
69
69
  "test:watch": "jest --watch",
70
70
  "test:update": "jest --updateSnapshot"
71
71
  },
72
- "version": "9.2.2",
73
- "gitHead": "57e5149578976f872fb6f1fa4088aaea1f04a2c9"
72
+ "version": "9.3.0",
73
+ "gitHead": "c41187db5aa17a8eec601f8121422f220c9c99f0"
74
74
  }