@synerise/ds-card-select 0.5.1 → 0.5.2
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 +8 -0
- package/dist/CardSelect.js +3 -16
- package/dist/CardSelect.styles.js +9 -9
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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.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)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-card-select
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [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)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @synerise/ds-card-select
|
package/dist/CardSelect.js
CHANGED
|
@@ -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
|
-
|
|
43
|
-
|
|
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 "
|
|
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
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
107
|
+
})(["", " ", " ", ""], is('selected')(_templateObject16 || (_templateObject16 = _taggedTemplateLiteralLoose(["\n transform: ", "; \n "])), function (props) {
|
|
108
108
|
return getTransformValues(props);
|
|
109
|
-
}), is('disabled')(_templateObject17 || (_templateObject17 =
|
|
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 =
|
|
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.
|
|
3
|
+
"version": "0.5.2",
|
|
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.
|
|
35
|
+
"@synerise/ds-icon": "^0.46.2",
|
|
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": "
|
|
48
|
+
"gitHead": "2468359677783819939fb9f1ef5acc36667ecd1a"
|
|
49
49
|
}
|