@synerise/ds-card-select 0.7.29 → 0.8.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 +19 -0
- package/README.md +1 -0
- package/dist/CardSelect.d.ts +1 -0
- package/dist/CardSelect.js +11 -5
- package/dist/CardSelect.styles.d.ts +2 -0
- package/dist/CardSelect.styles.js +6 -6
- package/dist/CardSelect.types.d.ts +1 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
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.8.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card-select@0.8.0...@synerise/ds-card-select@0.8.1) (2025-01-15)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-card-select
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [0.8.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card-select@0.7.29...@synerise/ds-card-select@0.8.0) (2024-12-16)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* informational tooltip ([4af1bb4](https://github.com/Synerise/synerise-design/commit/4af1bb4efcc8c06046b62a6aa8aa65c63312f816))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [0.7.29](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card-select@0.7.28...@synerise/ds-card-select@0.7.29) (2024-12-13)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @synerise/ds-card-select
|
package/README.md
CHANGED
|
@@ -68,6 +68,7 @@ yarn add @synerise/ds-card-select
|
|
|
68
68
|
|
|
69
69
|
| tagProps | Defines a ribbon-style tag | `TagProps` | - |
|
|
70
70
|
| tagTooltipProps | Defines tooltip for the ribbon tag | `TooltipProps` | - |
|
|
71
|
+
| infoTooltipProps | Defines a tooltip with information about the purpose of the card | `TooltipProps` | - |
|
|
71
72
|
|
|
72
73
|
|
|
73
74
|
### TagProps
|
package/dist/CardSelect.d.ts
CHANGED
|
@@ -290,6 +290,7 @@ declare const _default: React.ForwardRefExoticComponent<{
|
|
|
290
290
|
dashed?: boolean | undefined;
|
|
291
291
|
} | undefined;
|
|
292
292
|
tagTooltipProps?: import("@synerise/ds-tooltip").TooltipProps | undefined;
|
|
293
|
+
infoTooltipProps?: import("@synerise/ds-tooltip").TooltipProps | undefined;
|
|
293
294
|
} & {
|
|
294
295
|
theme?: any;
|
|
295
296
|
}>;
|
package/dist/CardSelect.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
import React, { useState, useRef } from 'react';
|
|
3
3
|
import { withTheme } from 'styled-components';
|
|
4
|
-
import Icon, { Check3M } from '@synerise/ds-icon';
|
|
4
|
+
import Icon, { Check3M, InfoFillS } from '@synerise/ds-icon';
|
|
5
5
|
import { TagShape } from '@synerise/ds-tags';
|
|
6
6
|
import { useOnClickOutside } from '@synerise/ds-utils';
|
|
7
7
|
import Tooltip from '@synerise/ds-tooltip';
|
|
@@ -29,7 +29,8 @@ var CardSelect = function CardSelect(_ref) {
|
|
|
29
29
|
theme = _ref.theme,
|
|
30
30
|
error = _ref.error,
|
|
31
31
|
tagProps = _ref.tagProps,
|
|
32
|
-
tagTooltipProps = _ref.tagTooltipProps
|
|
32
|
+
tagTooltipProps = _ref.tagTooltipProps,
|
|
33
|
+
infoTooltipProps = _ref.infoTooltipProps;
|
|
33
34
|
var _useState = useState(false),
|
|
34
35
|
isPressed = _useState[0],
|
|
35
36
|
setIsPressed = _useState[1];
|
|
@@ -76,6 +77,8 @@ var CardSelect = function CardSelect(_ref) {
|
|
|
76
77
|
stretchToFit: stretchToFit
|
|
77
78
|
}, /*#__PURE__*/React.createElement(S.Aside, {
|
|
78
79
|
size: size,
|
|
80
|
+
elementsPosition: elementsPosition,
|
|
81
|
+
tickVisible: tickVisible,
|
|
79
82
|
tabIndex: disabled ? undefined : 0,
|
|
80
83
|
ref: tickIconRef
|
|
81
84
|
}, tickVisible && /*#__PURE__*/React.createElement(S.TickIcon, {
|
|
@@ -90,19 +93,22 @@ var CardSelect = function CardSelect(_ref) {
|
|
|
90
93
|
component: /*#__PURE__*/React.createElement(Check3M, null)
|
|
91
94
|
}) : /*#__PURE__*/React.createElement(S.RadioShape, {
|
|
92
95
|
size: size
|
|
96
|
+
})), infoTooltipProps && /*#__PURE__*/React.createElement(Tooltip, infoTooltipProps, /*#__PURE__*/React.createElement(Icon, {
|
|
97
|
+
component: /*#__PURE__*/React.createElement(InfoFillS, null),
|
|
98
|
+
color: theme.palette['grey-400']
|
|
93
99
|
}))), /*#__PURE__*/React.createElement(S.Main, null, icon && /*#__PURE__*/React.createElement(S.IconWrapper, {
|
|
94
100
|
size: size
|
|
95
101
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
96
102
|
component: icon,
|
|
97
103
|
size: realIconSize
|
|
98
|
-
})), title
|
|
104
|
+
})), title && /*#__PURE__*/React.createElement(S.Title, {
|
|
99
105
|
size: size,
|
|
100
106
|
hasIcon: !!icon
|
|
101
|
-
}, title)
|
|
107
|
+
}, title), description && size !== 'small' && /*#__PURE__*/React.createElement(S.Description, {
|
|
102
108
|
size: size,
|
|
103
109
|
hasTitle: !!title,
|
|
104
110
|
hasIcon: !!icon
|
|
105
|
-
}, description)
|
|
111
|
+
}, description)), customTickVisible && customTickVisibleComponent && /*#__PURE__*/React.createElement(S.Aside, {
|
|
106
112
|
size: size
|
|
107
113
|
}, customTickVisible && customTickVisibleComponent)));
|
|
108
114
|
};
|
|
@@ -18,6 +18,8 @@ export declare const IconWrapper: import("styled-components").StyledComponent<"d
|
|
|
18
18
|
}, never>;
|
|
19
19
|
export declare const Aside: import("styled-components").StyledComponent<"div", any, {
|
|
20
20
|
size?: CardSelectSizeType | undefined;
|
|
21
|
+
elementsPosition?: CardSelectAlignType | undefined;
|
|
22
|
+
tickVisible?: Boolean | undefined;
|
|
21
23
|
}, never>;
|
|
22
24
|
export declare const Container: import("styled-components").StyledComponent<"div", any, {
|
|
23
25
|
disabled?: boolean | undefined;
|
|
@@ -66,13 +66,17 @@ export var IconWrapper = styled.div.withConfig({
|
|
|
66
66
|
export var Aside = styled.div.withConfig({
|
|
67
67
|
displayName: "CardSelectstyles__Aside",
|
|
68
68
|
componentId: "tfmgtj-4"
|
|
69
|
-
})(["
|
|
69
|
+
})(["width:100%;justify-content:", ";top:0;left:0;display:flex;flex-direction:", ";position:absolute;padding:", ";"], function (props) {
|
|
70
|
+
return props.tickVisible ? 'space-between' : 'flex-end';
|
|
71
|
+
}, function (props) {
|
|
72
|
+
return props.elementsPosition === 'left' ? 'row-reverse' : 'row';
|
|
73
|
+
}, function (props) {
|
|
70
74
|
return sizeCondition('4px', '14px', props);
|
|
71
75
|
});
|
|
72
76
|
export var Container = styled.div.withConfig({
|
|
73
77
|
displayName: "CardSelectstyles__Container",
|
|
74
78
|
componentId: "tfmgtj-5"
|
|
75
|
-
})(["", " ", ";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:", ";}", "{
|
|
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) {
|
|
76
80
|
return props.theme.variable('@border-radius-base');
|
|
77
81
|
}, is('error')(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n &&, &&:hover {\n box-shadow: 0px 0px 0px 2px ", ";\n }\n "])), getVar('red-500')), function (props) {
|
|
78
82
|
return MAP_ELEMENTS_POSITION[props.elementsPosition];
|
|
@@ -80,10 +84,6 @@ export var Container = styled.div.withConfig({
|
|
|
80
84
|
return props.size === 'small' ? '16px' : '24px';
|
|
81
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) {
|
|
82
86
|
return props.elementsPosition;
|
|
83
|
-
}, Aside, function (props) {
|
|
84
|
-
return props.elementsPosition === 'left' ? 'right' : 'left';
|
|
85
|
-
}, function (props) {
|
|
86
|
-
return sizeCondition('4px', '14px', props);
|
|
87
87
|
}, IconWrapper, function (props) {
|
|
88
88
|
return props.elementsPosition === 'left' ? '-18px' : '0px';
|
|
89
89
|
}, function (props) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-card-select",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Card-Select UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
],
|
|
35
35
|
"types": "dist/index.d.ts",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@synerise/ds-icon": "^0.
|
|
38
|
-
"@synerise/ds-tags": "^0.10.
|
|
39
|
-
"@synerise/ds-tooltip": "^0.14.
|
|
37
|
+
"@synerise/ds-icon": "^0.69.1",
|
|
38
|
+
"@synerise/ds-tags": "^0.10.24",
|
|
39
|
+
"@synerise/ds-tooltip": "^0.14.54",
|
|
40
40
|
"@synerise/ds-utils": "^0.31.2",
|
|
41
41
|
"styled-is": "^1.3.0"
|
|
42
42
|
},
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"react": ">=16.9.0 <= 17.0.2",
|
|
47
47
|
"styled-components": "5.0.1"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "f591d14d24d6a14aab76edcb60f04aaadec8336d"
|
|
50
50
|
}
|