@synerise/ds-card-select 0.5.0 → 0.5.4

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,38 @@
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
+ ## [0.5.4](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card-select@0.5.3...@synerise/ds-card-select@0.5.4) (2022-02-03)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-card-select
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.5.3](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card-select@0.5.2...@synerise/ds-card-select@0.5.3) (2022-01-17)
15
+
16
+ **Note:** Version bump only for package @synerise/ds-card-select
17
+
18
+
19
+
20
+
21
+
22
+ ## [0.5.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card-select@0.5.1...@synerise/ds-card-select@0.5.2) (2021-11-22)
23
+
24
+ **Note:** Version bump only for package @synerise/ds-card-select
25
+
26
+
27
+
28
+
29
+
30
+ ## [0.5.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card-select@0.4.58...@synerise/ds-card-select@0.5.1) (2021-11-09)
31
+
32
+ **Note:** Version bump only for package @synerise/ds-card-select
33
+
34
+
35
+
36
+
37
+
6
38
  # [0.5.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card-select@0.4.58...@synerise/ds-card-select@0.5.0) (2021-11-09)
7
39
 
8
40
  **Note:** Version bump only for package @synerise/ds-card-select
@@ -1,15 +1,3 @@
1
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
-
3
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
-
5
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6
-
7
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
8
-
9
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
10
-
11
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
-
13
1
  import * as React from 'react';
14
2
  import { withTheme } from 'styled-components';
15
3
  import Icon, { Check3M } from '@synerise/ds-icon';
@@ -39,9 +27,8 @@ var CardSelect = function CardSelect(_ref) {
39
27
  error = _ref.error;
40
28
 
41
29
  var _React$useState = React.useState(false),
42
- _React$useState2 = _slicedToArray(_React$useState, 2),
43
- pressed = _React$useState2[0],
44
- setPressed = _React$useState2[1];
30
+ pressed = _React$useState[0],
31
+ setPressed = _React$useState[1];
45
32
 
46
33
  var wrapperRef = React.useRef(null);
47
34
  var tickIconRef = React.useRef(null);
@@ -81,7 +68,7 @@ var CardSelect = function CardSelect(_ref) {
81
68
  value: value,
82
69
  size: size,
83
70
  onClick: handleClick,
84
- className: "ds-card-select ".concat(className || ''),
71
+ className: "ds-card-select " + (className || ''),
85
72
  elementsPosition: elementsPosition,
86
73
  stretchToFit: stretchToFit
87
74
  }, /*#__PURE__*/React.createElement(S.Aside, {
@@ -1,6 +1,6 @@
1
1
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20;
2
2
 
3
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
+ function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
4
4
 
5
5
  import styled, { css } from 'styled-components';
6
6
  import is, { isNot } from 'styled-is';
@@ -76,13 +76,13 @@ export var Aside = styled.div.withConfig({
76
76
  export var Container = styled.div.withConfig({
77
77
  displayName: "CardSelectstyles__Container",
78
78
  componentId: "tfmgtj-5"
79
- })(["", " ", ";background-color:", ";border-radius:", ";", " display:flex;flex:1;justify-content:", ";border-color:", ";position:relative;padding:", ";cursor:pointer;&&:focus-within{box-shadow:0px 0px 0px 2px ", ";}", " ", " ", " ", " ", " ", ",", ",", "{text-align:", ";}", "{", ":", ";}", "{margin-left:", ";margin-right:", ";}", " ", ";"], is('stretchToFit')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: 100%;\n "]))), transition, getVar('white'), function (props) {
79
+ })(["", " ", ";background-color:", ";border-radius:", ";", " display:flex;flex:1;justify-content:", ";border-color:", ";position:relative;padding:", ";cursor:pointer;&&:focus-within{box-shadow:0px 0px 0px 2px ", ";}", " ", " ", " ", " ", " ", ",", ",", "{text-align:", ";}", "{", ":", ";}", "{margin-left:", ";margin-right:", ";}", " ", ";"], is('stretchToFit')(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n height: 100%;\n "]))), transition, getVar('white'), function (props) {
80
80
  return props.theme.variable('@border-radius-base');
81
- }, is('error')(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n &&, &&:hover {\n box-shadow: 0px 0px 0px 2px ", ";\n }\n "])), getVar('red-500')), function (props) {
81
+ }, is('error')(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n &&, &&:hover {\n box-shadow: 0px 0px 0px 2px ", ";\n }\n "])), getVar('red-500')), function (props) {
82
82
  return mapElementsPosition[props.elementsPosition];
83
83
  }, getVar('white'), function (props) {
84
84
  return props.size === 'small' ? '24px 16px 12px' : '24px';
85
- }, getVar('blue-600'), isNot('pressed') && isNot('value')(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["box-shadow: 0px 0px 0px 1px ", ";"])), getVar('grey-300')), is('value')(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n box-shadow: 0px 0px 0px 2px ", ";\n "])), getVar('blue-600')), is('value') && is('pressed')(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral([" box-shadow: 0px 0px 0px 2px ", ";"])), getVar('blue-600')), is('value') && is('raised')(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n box-shadow: 0px 0px 0px 2px ", ";\n "])), getVar('blue-600')), is('value') && is('pressed')(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral([" box-shadow: 0px 0px 0px 2px ", ";"])), getVar('blue-600')), Title, Description, IconWrapper, function (props) {
85
+ }, getVar('blue-600'), isNot('pressed') && isNot('value')(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["box-shadow: 0px 0px 0px 1px ", ";"])), getVar('grey-300')), is('value')(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n box-shadow: 0px 0px 0px 2px ", ";\n "])), getVar('blue-600')), is('value') && is('pressed')(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose([" box-shadow: 0px 0px 0px 2px ", ";"])), getVar('blue-600')), is('value') && is('raised')(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["\n box-shadow: 0px 0px 0px 2px ", ";\n "])), getVar('blue-600')), is('value') && is('pressed')(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose([" box-shadow: 0px 0px 0px 2px ", ";"])), getVar('blue-600')), Title, Description, IconWrapper, function (props) {
86
86
  return props.elementsPosition;
87
87
  }, Aside, function (props) {
88
88
  return props.elementsPosition === 'left' ? 'right' : 'left';
@@ -92,11 +92,11 @@ export var Container = styled.div.withConfig({
92
92
  return props.elementsPosition === 'left' ? '-18px' : '0px';
93
93
  }, function (props) {
94
94
  return props.elementsPosition === 'right' ? '-18px' : '0px';
95
- }, isNot('disabled')(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n \n\n &:hover {\n ", " {\n border-color: ", ";\n }\n }\n\n ", ";\n \n ", "\n "])), RadioShape, getVar('grey-400'), isNot('raised')(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n ", ";\n "])), isNot('value')(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n box-shadow: 0px 0px 0px 1px ", ";\n \n &:hover, &:active {\n box-shadow: 0px 0px 0px 1px ", ";\n }\n "])), getVar('grey-300'), getVar('grey-400'))), is('raised')(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n ", "\n \n "])), isNot('value')(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n box-shadow: ", ";\n \n &:hover, &:active {\n box-shadow: ", ";\n }\n "])), function (props) {
95
+ }, isNot('disabled')(_templateObject8 || (_templateObject8 = _taggedTemplateLiteralLoose(["\n \n\n &:hover {\n ", " {\n border-color: ", ";\n }\n }\n\n ", ";\n \n ", "\n "])), RadioShape, getVar('grey-400'), isNot('raised')(_templateObject9 || (_templateObject9 = _taggedTemplateLiteralLoose(["\n ", ";\n "])), isNot('value')(_templateObject10 || (_templateObject10 = _taggedTemplateLiteralLoose(["\n box-shadow: 0px 0px 0px 1px ", ";\n \n &:hover, &:active {\n box-shadow: 0px 0px 0px 1px ", ";\n }\n "])), getVar('grey-300'), getVar('grey-400'))), is('raised')(_templateObject11 || (_templateObject11 = _taggedTemplateLiteralLoose(["\n ", "\n \n "])), isNot('value')(_templateObject12 || (_templateObject12 = _taggedTemplateLiteralLoose(["\n box-shadow: ", ";\n \n &:hover, &:active {\n box-shadow: ", ";\n }\n "])), function (props) {
96
96
  return props.theme.variable('@box-shadow-base') || 'none';
97
97
  }, function (props) {
98
98
  return props.theme.variable('@box-shadow-active') || 'none';
99
- }))), is('disabled')(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n opacity: 0.4;\n pointer-events:none;\n\n ", "\n \n "])), isNot('raised')(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n\n ", "\n "])), isNot('value')(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n box-shadow: 0px 0px 0px 1px ", ";\n "])), getVar('grey-200')))));
99
+ }))), is('disabled')(_templateObject13 || (_templateObject13 = _taggedTemplateLiteralLoose(["\n opacity: 0.4;\n pointer-events:none;\n\n ", "\n \n "])), isNot('raised')(_templateObject14 || (_templateObject14 = _taggedTemplateLiteralLoose(["\n\n ", "\n "])), isNot('value')(_templateObject15 || (_templateObject15 = _taggedTemplateLiteralLoose(["\n box-shadow: 0px 0px 0px 1px ", ";\n "])), getVar('grey-200')))));
100
100
  export var Main = styled.div.withConfig({
101
101
  displayName: "CardSelectstyles__Main",
102
102
  componentId: "tfmgtj-6"
@@ -104,10 +104,10 @@ export var Main = styled.div.withConfig({
104
104
  export var TickIcon = styled.div.withConfig({
105
105
  displayName: "CardSelectstyles__TickIcon",
106
106
  componentId: "tfmgtj-7"
107
- })(["", " ", " ", ""], is('selected')(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n transform: ", "; \n "])), function (props) {
107
+ })(["", " ", " ", ""], is('selected')(_templateObject16 || (_templateObject16 = _taggedTemplateLiteralLoose(["\n transform: ", "; \n "])), function (props) {
108
108
  return getTransformValues(props);
109
- }), is('disabled')(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n ", " {\n background-color: ", ";\n border-color: ", ";\n }\n "])), RadioShape, getVar('grey-050'), getVar('grey-200')), isNot('disabled')(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n ", " {\n cursor: pointer;\n }\n "])), RadioShape));
109
+ }), is('disabled')(_templateObject17 || (_templateObject17 = _taggedTemplateLiteralLoose(["\n ", " {\n background-color: ", ";\n border-color: ", ";\n }\n "])), RadioShape, getVar('grey-050'), getVar('grey-200')), isNot('disabled')(_templateObject18 || (_templateObject18 = _taggedTemplateLiteralLoose(["\n ", " {\n cursor: pointer;\n }\n "])), RadioShape));
110
110
  export var CardWrapper = styled.div.withConfig({
111
111
  displayName: "CardSelectstyles__CardWrapper",
112
112
  componentId: "tfmgtj-8"
113
- })(["", " ", ""], is('disabled')(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n cursor:not-allowed;\n "]))), is('stretchToFit')(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n height: 100%;\n "]))));
113
+ })(["", " ", ""], is('disabled')(_templateObject19 || (_templateObject19 = _taggedTemplateLiteralLoose(["\n cursor:not-allowed;\n "]))), is('stretchToFit')(_templateObject20 || (_templateObject20 = _taggedTemplateLiteralLoose(["\n height: 100%;\n "]))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-card-select",
3
- "version": "0.5.0",
3
+ "version": "0.5.4",
4
4
  "description": "Card-Select UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -32,7 +32,7 @@
32
32
  ],
33
33
  "types": "dist/index.d.ts",
34
34
  "dependencies": {
35
- "@synerise/ds-icon": "^0.46.0",
35
+ "@synerise/ds-icon": "^0.47.1",
36
36
  "react-sortablejs": "^1.5.1",
37
37
  "sortablejs": "^1.10.0",
38
38
  "styled-is": "^1.3.0"
@@ -45,5 +45,5 @@
45
45
  "devDependencies": {
46
46
  "@synerise/ds-utils": "^0.19.0"
47
47
  },
48
- "gitHead": "a797e1d5e1233f121f8f7dfbeaf97b48a8195d25"
48
+ "gitHead": "27ef26e44f1814e7fc97b46668078e9a78e8f217"
49
49
  }