@wireapp/react-ui-kit 8.11.0 → 8.11.1

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/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [8.11.1](https://github.com/wireapp/wire-web-packages/tree/main/packages/react-ui-kit/compare/@wireapp/react-ui-kit@8.11.0...@wireapp/react-ui-kit@8.11.1) (2022-07-26)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **ui-kit:** revert small select change ([#4347](https://github.com/wireapp/wire-web-packages/tree/main/packages/react-ui-kit/issues/4347)) ([b0c1105](https://github.com/wireapp/wire-web-packages/tree/main/packages/react-ui-kit/commit/b0c11057b29e23c6588da02acc420659ba65a99d))
12
+
13
+
14
+
15
+
16
+
6
17
  # [8.11.0](https://github.com/wireapp/wire-web-packages/tree/main/packages/react-ui-kit/compare/@wireapp/react-ui-kit@8.10.0...@wireapp/react-ui-kit@8.11.0) (2022-07-25)
7
18
 
8
19
 
package/package.json CHANGED
@@ -70,6 +70,6 @@
70
70
  "test:update": "yarn test --updateSnapshot",
71
71
  "test:project": "yarn dist && yarn test"
72
72
  },
73
- "version": "8.11.0",
74
- "gitHead": "1ced13e856df4efbf53ae4be955db98ab7a25899"
73
+ "version": "8.11.1",
74
+ "gitHead": "8cc4ebf7220bf407dcc56cad0959c3083e3260a4"
75
75
  }
@@ -19,8 +19,6 @@ interface SelectProps extends StateManagerProps<Option> {
19
19
  markInvalid?: boolean;
20
20
  required?: boolean;
21
21
  isMulti?: boolean;
22
- /**In the multi-select case, onChange's value will be an array of all the currently selected values. */
23
- onChange?: (value: Option | Option[]) => void;
24
22
  }
25
23
  export declare const Select: FC<SelectProps>;
26
24
  export {};
@@ -1 +1 @@
1
- {"version":3,"sources":["Select.tsx"],"names":["Select","id","label","error","helperText","dataUieName","options","wrapperCSS","markInvalid","required","isMulti","props","theme","hasError","marginBottom","width","color","general","primaryColor","DropdownIndicator","Option","Menu","ValueContainer","IndicatorsContainer","fontSize","fontWeight","Input","labelColor","marginTop"],"mappings":";;;;;;;;;;;;;;;AAoBA;;AAEA;;AACA;;AAIA;;AACA;;AAEA;;;;;;;;AAwBO,IAAMA,MAAuB,GAAG,SAA1BA,MAA0B,OAYjC;AAAA,MAXJC,EAWI,QAXJA,EAWI;AAAA,MAVJC,KAUI,QAVJA,KAUI;AAAA,MATJC,KASI,QATJA,KASI;AAAA,MARJC,UAQI,QARJA,UAQI;AAAA,MAPJC,WAOI,QAPJA,WAOI;AAAA,MANJC,OAMI,QANJA,OAMI;AAAA,6BALJC,UAKI;AAAA,MALJA,UAKI,gCALS,EAKT;AAAA,8BAJJC,WAII;AAAA,MAJJA,WAII,iCAJU,KAIV;AAAA,2BAHJC,QAGI;AAAA,MAHJA,QAGI,8BAHO,KAGP;AAAA,0BAFJC,OAEI;AAAA,MAFJA,OAEI,6BAFM,KAEN;AAAA,MADDC,KACC;AACJ,MAAMC,KAAK,GAAG,sBAAd;AACA,MAAMC,QAAQ,GAAG,CAAC,CAACV,KAAnB;AAEA,SACE;AACE,IAAA,GAAG,EAAE,aAACS,KAAD;AAAA;AACHE,QAAAA,YAAY,EAAEN,WAAW,GAAG,KAAH,GAAW,MADjC;AAEHO,QAAAA,KAAK,EAAE,MAFJ;AAGH,gCAAwB;AACtBC,UAAAA,KAAK,EAAEJ,KAAK,CAACK,OAAN,CAAcC;AADC;AAHrB,SAMAX,UANA;AAAA,KADP;AASE,qBAAeF;AATjB,KAWGH,KAAK,IACJ,gBAAC,sBAAD;AAAY,IAAA,OAAO,EAAED,EAArB;AAAyB,IAAA,WAAW,EAAEO,WAAtC;AAAmD,IAAA,UAAU,EAAEC;AAA/D,KACGP,KADH,CAZJ,EAiBE,gBAAC,uBAAD;AACE,IAAA,EAAE,EAAED,EADN;AAEE,IAAA,MAAM,EAAE,gCAAaW,KAAb,EAA6BJ,WAA7B,CAFV;AAGE,IAAA,UAAU,EAAE;AACVW,MAAAA,iBAAiB,EAAjBA,mCADU;AAEVC,MAAAA,MAAM,EAAE,oCAAaf,WAAb,CAFE;AAGVgB,MAAAA,IAAI,EAAE,4BAAKhB,WAAL,CAHI;AAIViB,MAAAA,cAAc,EAAdA,gCAJU;AAKVC,MAAAA,mBAAmB,EAAnBA;AALU,KAHd;AAUE,IAAA,mBAAmB,EAAE,KAVvB;AAWE,IAAA,YAAY,EAAE,KAXhB;AAYE,IAAA,WAAW,EAAE,KAZf;AAaE,IAAA,iBAAiB,EAAE,CAACb,OAbtB;AAcE,IAAA,OAAO,EAAEA,OAdX;AAeE,IAAA,OAAO,EAAEJ;AAfX,KAgBMK,KAhBN,EAjBF,EAoCG,CAACE,QAAD,IAAaT,UAAb,IACC;AAAG,IAAA,GAAG,EAAE,aAACQ,KAAD;AAAA,aAAmB;AAACY,QAAAA,QAAQ,EAAE,MAAX;AAAmBC,QAAAA,UAAU,EAAE,GAA/B;AAAoCT,QAAAA,KAAK,EAAEJ,KAAK,CAACc,KAAN,CAAYC,UAAvD;AAAmEC,QAAAA,SAAS,EAAE;AAA9E,OAAnB;AAAA;AAAR,KACGxB,UADH,CArCJ,EA0CGD,KA1CH,CADF;AA8CD,CA9DM","sourcesContent":["/*\n * Wire\n * Copyright (C) 2018 Wire Swiss GmbH\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see http://www.gnu.org/licenses/.\n *\n */\n\n/** @jsx jsx */\nimport {CSSObject, jsx} from '@emotion/react';\nimport {useTheme} from '@emotion/react';\nimport React, {FC, ReactElement} from 'react';\nimport ReactSelect from 'react-select';\nimport {StylesConfig} from 'react-select/dist/declarations/src/styles';\nimport {StateManagerProps} from 'react-select/dist/declarations/src/useStateManager';\n\nimport {customStyles} from './SelectStyles';\nimport {CustomOption, DropdownIndicator, IndicatorsContainer, Menu, ValueContainer} from './SelectComponents';\nimport type {Theme} from '../Layout';\nimport InputLabel from './InputLabel';\n\nexport type Option = {\n value: string | number;\n label: string;\n description?: string;\n isDisabled?: boolean;\n};\n\ninterface SelectProps extends StateManagerProps<Option> {\n id: string;\n dataUieName: string;\n options: Option[];\n wrapperCSS?: CSSObject;\n label?: string;\n helperText?: string;\n error?: ReactElement;\n markInvalid?: boolean;\n required?: boolean;\n isMulti?: boolean;\n /**In the multi-select case, onChange's value will be an array of all the currently selected values. */\n onChange?: (value: Option | Option[]) => void;\n}\n\nexport const Select: FC<SelectProps> = ({\n id,\n label,\n error,\n helperText,\n dataUieName,\n options,\n wrapperCSS = {},\n markInvalid = false,\n required = false,\n isMulti = false,\n ...props\n}) => {\n const theme = useTheme();\n const hasError = !!error;\n\n return (\n <div\n css={(theme: Theme) => ({\n marginBottom: markInvalid ? '2px' : '20px',\n width: '100%',\n '&:focus-within label': {\n color: theme.general.primaryColor,\n },\n ...wrapperCSS,\n })}\n data-uie-name={dataUieName}\n >\n {label && (\n <InputLabel htmlFor={id} markInvalid={markInvalid} isRequired={required}>\n {label}\n </InputLabel>\n )}\n\n <ReactSelect\n id={id}\n styles={customStyles(theme as Theme, markInvalid) as StylesConfig}\n components={{\n DropdownIndicator,\n Option: CustomOption(dataUieName),\n Menu: Menu(dataUieName),\n ValueContainer,\n IndicatorsContainer,\n }}\n hideSelectedOptions={false}\n isSearchable={false}\n isClearable={false}\n closeMenuOnSelect={!isMulti}\n isMulti={isMulti}\n options={options}\n {...props}\n />\n\n {!hasError && helperText && (\n <p css={(theme: Theme) => ({fontSize: '12px', fontWeight: 400, color: theme.Input.labelColor, marginTop: 8})}>\n {helperText}\n </p>\n )}\n\n {error}\n </div>\n );\n};\n"],"file":"Select.js"}
1
+ {"version":3,"sources":["Select.tsx"],"names":["Select","id","label","error","helperText","dataUieName","options","wrapperCSS","markInvalid","required","isMulti","props","theme","hasError","marginBottom","width","color","general","primaryColor","DropdownIndicator","Option","Menu","ValueContainer","IndicatorsContainer","fontSize","fontWeight","Input","labelColor","marginTop"],"mappings":";;;;;;;;;;;;;;;AAoBA;;AAEA;;AACA;;AAIA;;AACA;;AAEA;;;;;;;;AAsBO,IAAMA,MAAuB,GAAG,SAA1BA,MAA0B,OAYjC;AAAA,MAXJC,EAWI,QAXJA,EAWI;AAAA,MAVJC,KAUI,QAVJA,KAUI;AAAA,MATJC,KASI,QATJA,KASI;AAAA,MARJC,UAQI,QARJA,UAQI;AAAA,MAPJC,WAOI,QAPJA,WAOI;AAAA,MANJC,OAMI,QANJA,OAMI;AAAA,6BALJC,UAKI;AAAA,MALJA,UAKI,gCALS,EAKT;AAAA,8BAJJC,WAII;AAAA,MAJJA,WAII,iCAJU,KAIV;AAAA,2BAHJC,QAGI;AAAA,MAHJA,QAGI,8BAHO,KAGP;AAAA,0BAFJC,OAEI;AAAA,MAFJA,OAEI,6BAFM,KAEN;AAAA,MADDC,KACC;AACJ,MAAMC,KAAK,GAAG,sBAAd;AACA,MAAMC,QAAQ,GAAG,CAAC,CAACV,KAAnB;AAEA,SACE;AACE,IAAA,GAAG,EAAE,aAACS,KAAD;AAAA;AACHE,QAAAA,YAAY,EAAEN,WAAW,GAAG,KAAH,GAAW,MADjC;AAEHO,QAAAA,KAAK,EAAE,MAFJ;AAGH,gCAAwB;AACtBC,UAAAA,KAAK,EAAEJ,KAAK,CAACK,OAAN,CAAcC;AADC;AAHrB,SAMAX,UANA;AAAA,KADP;AASE,qBAAeF;AATjB,KAWGH,KAAK,IACJ,gBAAC,sBAAD;AAAY,IAAA,OAAO,EAAED,EAArB;AAAyB,IAAA,WAAW,EAAEO,WAAtC;AAAmD,IAAA,UAAU,EAAEC;AAA/D,KACGP,KADH,CAZJ,EAiBE,gBAAC,uBAAD;AACE,IAAA,EAAE,EAAED,EADN;AAEE,IAAA,MAAM,EAAE,gCAAaW,KAAb,EAA6BJ,WAA7B,CAFV;AAGE,IAAA,UAAU,EAAE;AACVW,MAAAA,iBAAiB,EAAjBA,mCADU;AAEVC,MAAAA,MAAM,EAAE,oCAAaf,WAAb,CAFE;AAGVgB,MAAAA,IAAI,EAAE,4BAAKhB,WAAL,CAHI;AAIViB,MAAAA,cAAc,EAAdA,gCAJU;AAKVC,MAAAA,mBAAmB,EAAnBA;AALU,KAHd;AAUE,IAAA,mBAAmB,EAAE,KAVvB;AAWE,IAAA,YAAY,EAAE,KAXhB;AAYE,IAAA,WAAW,EAAE,KAZf;AAaE,IAAA,iBAAiB,EAAE,CAACb,OAbtB;AAcE,IAAA,OAAO,EAAEA,OAdX;AAeE,IAAA,OAAO,EAAEJ;AAfX,KAgBMK,KAhBN,EAjBF,EAoCG,CAACE,QAAD,IAAaT,UAAb,IACC;AAAG,IAAA,GAAG,EAAE,aAACQ,KAAD;AAAA,aAAmB;AAACY,QAAAA,QAAQ,EAAE,MAAX;AAAmBC,QAAAA,UAAU,EAAE,GAA/B;AAAoCT,QAAAA,KAAK,EAAEJ,KAAK,CAACc,KAAN,CAAYC,UAAvD;AAAmEC,QAAAA,SAAS,EAAE;AAA9E,OAAnB;AAAA;AAAR,KACGxB,UADH,CArCJ,EA0CGD,KA1CH,CADF;AA8CD,CA9DM","sourcesContent":["/*\n * Wire\n * Copyright (C) 2018 Wire Swiss GmbH\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see http://www.gnu.org/licenses/.\n *\n */\n\n/** @jsx jsx */\nimport {CSSObject, jsx} from '@emotion/react';\nimport {useTheme} from '@emotion/react';\nimport React, {FC, ReactElement} from 'react';\nimport ReactSelect from 'react-select';\nimport {StylesConfig} from 'react-select/dist/declarations/src/styles';\nimport {StateManagerProps} from 'react-select/dist/declarations/src/useStateManager';\n\nimport {customStyles} from './SelectStyles';\nimport {CustomOption, DropdownIndicator, IndicatorsContainer, Menu, ValueContainer} from './SelectComponents';\nimport type {Theme} from '../Layout';\nimport InputLabel from './InputLabel';\n\nexport type Option = {\n value: string | number;\n label: string;\n description?: string;\n isDisabled?: boolean;\n};\n\ninterface SelectProps extends StateManagerProps<Option> {\n id: string;\n dataUieName: string;\n options: Option[];\n wrapperCSS?: CSSObject;\n label?: string;\n helperText?: string;\n error?: ReactElement;\n markInvalid?: boolean;\n required?: boolean;\n isMulti?: boolean;\n}\n\nexport const Select: FC<SelectProps> = ({\n id,\n label,\n error,\n helperText,\n dataUieName,\n options,\n wrapperCSS = {},\n markInvalid = false,\n required = false,\n isMulti = false,\n ...props\n}) => {\n const theme = useTheme();\n const hasError = !!error;\n\n return (\n <div\n css={(theme: Theme) => ({\n marginBottom: markInvalid ? '2px' : '20px',\n width: '100%',\n '&:focus-within label': {\n color: theme.general.primaryColor,\n },\n ...wrapperCSS,\n })}\n data-uie-name={dataUieName}\n >\n {label && (\n <InputLabel htmlFor={id} markInvalid={markInvalid} isRequired={required}>\n {label}\n </InputLabel>\n )}\n\n <ReactSelect\n id={id}\n styles={customStyles(theme as Theme, markInvalid) as StylesConfig}\n components={{\n DropdownIndicator,\n Option: CustomOption(dataUieName),\n Menu: Menu(dataUieName),\n ValueContainer,\n IndicatorsContainer,\n }}\n hideSelectedOptions={false}\n isSearchable={false}\n isClearable={false}\n closeMenuOnSelect={!isMulti}\n isMulti={isMulti}\n options={options}\n {...props}\n />\n\n {!hasError && helperText && (\n <p css={(theme: Theme) => ({fontSize: '12px', fontWeight: 400, color: theme.Input.labelColor, marginTop: 8})}>\n {helperText}\n </p>\n )}\n\n {error}\n </div>\n );\n};\n"],"file":"Select.js"}