@skyscanner/backpack-web 38.14.0 → 38.15.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.
@@ -48,16 +48,16 @@ const BpkStar = ({
48
48
  const halfIconClassNames = getClassName('bpk-star', 'bpk-star--half', 'bpk-star--filled');
49
49
  let Icon = SmallIcon;
50
50
  let OutlineIcon = OutlineSmallIcon;
51
- let HalfIcon = HalfSmallIcon;
51
+ let HalfIcon = withRtlSupport(HalfSmallIcon);
52
52
  if (large) {
53
53
  Icon = LargeIcon;
54
54
  OutlineIcon = OutlineLargeIcon;
55
- HalfIcon = HalfLargeIcon;
55
+ HalfIcon = withRtlSupport(HalfLargeIcon);
56
56
  }
57
57
  if (extraLarge) {
58
58
  Icon = ExtraLargeIcon;
59
59
  OutlineIcon = OutlineExtraLargeIcon;
60
- HalfIcon = HalfExtraLargeIcon;
60
+ HalfIcon = withRtlSupport(HalfExtraLargeIcon);
61
61
  }
62
62
  if (type === STAR_TYPES.HALF) {
63
63
  return (
@@ -0,0 +1,4 @@
1
+ import BpkTextarea from './src/BpkTextarea';
2
+ import themeAttributes from './src/themeAttributes';
3
+ export default BpkTextarea;
4
+ export { themeAttributes };
@@ -14,7 +14,9 @@
14
14
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
- */import BpkTextarea from "./src/BpkTextarea";
17
+ */
18
+
19
+ import BpkTextarea from "./src/BpkTextarea";
18
20
  import themeAttributes from "./src/themeAttributes";
19
21
  export default BpkTextarea;
20
22
  export { themeAttributes };
@@ -0,0 +1,11 @@
1
+ import type { FC, TextareaHTMLAttributes } from 'react';
2
+ interface BpkTextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
3
+ id: string;
4
+ name: string;
5
+ value: string;
6
+ className?: string;
7
+ valid?: boolean;
8
+ large?: boolean;
9
+ }
10
+ declare const BpkTextarea: FC<BpkTextareaProps>;
11
+ export default BpkTextarea;
@@ -14,36 +14,25 @@
14
14
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
- */import PropTypes from 'prop-types';
17
+ */
18
+
18
19
  import { cssModules } from "../../bpk-react-utils";
19
20
  import STYLES from "./BpkTextarea.module.css";
20
21
  import { jsx as _jsx } from "react/jsx-runtime";
21
22
  const getClassName = cssModules(STYLES);
22
23
  const BpkTextarea = ({
23
- className = null,
24
+ className,
24
25
  large = false,
25
- valid = null,
26
+ valid,
26
27
  ...rest
27
28
  }) => {
28
29
  // Explicit check for false primitive value as undefined is
29
30
  // treated as neither valid nor invalid
30
31
  const isInvalid = valid === false;
31
- return (
32
- /*#__PURE__*/
33
- // $FlowFixMe[cannot-spread-inexact] - inexact rest. See decisions/flowfixme.md
34
- _jsx("textarea", {
35
- className: getClassName('bpk-textarea', isInvalid && 'bpk-textarea--invalid', large && 'bpk-textarea--large', className),
36
- "aria-invalid": isInvalid,
37
- ...rest
38
- })
39
- );
40
- };
41
- BpkTextarea.propTypes = {
42
- id: PropTypes.string.isRequired,
43
- name: PropTypes.string.isRequired,
44
- value: PropTypes.string.isRequired,
45
- className: PropTypes.string,
46
- valid: PropTypes.bool,
47
- large: PropTypes.bool
32
+ return /*#__PURE__*/_jsx("textarea", {
33
+ className: getClassName('bpk-textarea', isInvalid && 'bpk-textarea--invalid', large && 'bpk-textarea--large', className),
34
+ "aria-invalid": isInvalid,
35
+ ...rest
36
+ });
48
37
  };
49
38
  export default BpkTextarea;
@@ -0,0 +1,2 @@
1
+ declare const themeAttributes: string[];
2
+ export default themeAttributes;
@@ -14,4 +14,7 @@
14
14
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
- */export default ['textareaInvalidBorderColor'];
17
+ */
18
+
19
+ const themeAttributes = ['textareaInvalidBorderColor'];
20
+ export default themeAttributes;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyscanner/backpack-web",
3
- "version": "38.14.0",
3
+ "version": "38.15.0",
4
4
  "description": "Backpack Design System web library",
5
5
  "repository": {
6
6
  "type": "git",