@synerise/ds-card-select 0.7.24 → 0.7.26

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,22 @@
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.7.26](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card-select@0.7.25...@synerise/ds-card-select@0.7.26) (2024-11-28)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-card-select
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.7.25](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card-select@0.7.24...@synerise/ds-card-select@0.7.25) (2024-11-21)
15
+
16
+ **Note:** Version bump only for package @synerise/ds-card-select
17
+
18
+
19
+
20
+
21
+
6
22
  ## [0.7.24](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card-select@0.7.23...@synerise/ds-card-select@0.7.24) (2024-11-12)
7
23
 
8
24
  **Note:** Version bump only for package @synerise/ds-card-select
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
2
  declare const _default: React.ForwardRefExoticComponent<{
3
3
  className?: string | undefined;
4
- disabled?: boolean | undefined;
5
- onClick?: (() => void) | undefined;
6
4
  title?: React.ReactNode;
7
5
  onChange?: ((value: boolean) => void) | undefined;
6
+ onClick?: (() => void) | undefined;
7
+ disabled?: boolean | undefined;
8
8
  key?: React.Key | undefined;
9
9
  stretchToFit?: boolean | undefined;
10
10
  error?: boolean | undefined;
@@ -20,27 +20,21 @@ declare const _default: React.ForwardRefExoticComponent<{
20
20
  tickSize?: number | undefined;
21
21
  elementsPosition?: import("./CardSelect.types").CardSelectAlignType | undefined;
22
22
  tagProps?: {
23
- id?: string | undefined;
24
- name?: string | undefined;
25
- textColor?: string | undefined;
26
- color?: string | undefined;
27
- className?: string | undefined;
28
- disabled?: boolean | undefined;
29
- onClick?: ((() => void) & React.MouseEventHandler<HTMLDivElement>) | undefined;
30
- prefixel?: React.ReactNode;
31
- suffixel?: React.ReactNode;
32
- dashed?: boolean | undefined;
33
23
  defaultChecked?: boolean | undefined;
34
24
  defaultValue?: string | number | readonly string[] | undefined;
35
25
  suppressContentEditableWarning?: boolean | undefined;
36
26
  suppressHydrationWarning?: boolean | undefined;
37
27
  accessKey?: string | undefined;
28
+ autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters" | undefined;
38
29
  autoFocus?: boolean | undefined;
30
+ className?: string | undefined;
39
31
  contentEditable?: "inherit" | (boolean | "true" | "false") | undefined;
40
32
  contextMenu?: string | undefined;
41
33
  dir?: string | undefined;
42
34
  draggable?: (boolean | "true" | "false") | undefined;
35
+ enterKeyHint?: "search" | "enter" | "done" | "go" | "next" | "previous" | "send" | undefined;
43
36
  hidden?: boolean | undefined;
37
+ id?: string | number | undefined;
44
38
  lang?: string | undefined;
45
39
  nonce?: string | undefined;
46
40
  placeholder?: string | undefined;
@@ -63,9 +57,9 @@ declare const _default: React.ForwardRefExoticComponent<{
63
57
  rev?: string | undefined;
64
58
  typeof?: string | undefined;
65
59
  vocab?: string | undefined;
66
- autoCapitalize?: string | undefined;
67
60
  autoCorrect?: string | undefined;
68
61
  autoSave?: string | undefined;
62
+ color?: string | undefined;
69
63
  itemProp?: string | undefined;
70
64
  itemScope?: boolean | undefined;
71
65
  itemType?: string | undefined;
@@ -73,7 +67,7 @@ declare const _default: React.ForwardRefExoticComponent<{
73
67
  itemRef?: string | undefined;
74
68
  results?: number | undefined;
75
69
  security?: string | undefined;
76
- unselectable?: "on" | "off" | undefined;
70
+ unselectable?: "off" | "on" | undefined;
77
71
  inputMode?: "text" | "none" | "search" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
78
72
  is?: string | undefined;
79
73
  "aria-activedescendant"?: string | undefined;
@@ -212,6 +206,7 @@ declare const _default: React.ForwardRefExoticComponent<{
212
206
  onWaitingCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
213
207
  onAuxClick?: React.MouseEventHandler<HTMLDivElement> | undefined;
214
208
  onAuxClickCapture?: React.MouseEventHandler<HTMLDivElement> | undefined;
209
+ onClick?: (() => void) | undefined;
215
210
  onClickCapture?: React.MouseEventHandler<HTMLDivElement> | undefined;
216
211
  onContextMenu?: React.MouseEventHandler<HTMLDivElement> | undefined;
217
212
  onContextMenuCapture?: React.MouseEventHandler<HTMLDivElement> | undefined;
@@ -287,6 +282,12 @@ declare const _default: React.ForwardRefExoticComponent<{
287
282
  onAnimationIterationCapture?: React.AnimationEventHandler<HTMLDivElement> | undefined;
288
283
  onTransitionEnd?: React.TransitionEventHandler<HTMLDivElement> | undefined;
289
284
  onTransitionEndCapture?: React.TransitionEventHandler<HTMLDivElement> | undefined;
285
+ name?: string | undefined;
286
+ textColor?: string | undefined;
287
+ disabled?: boolean | undefined;
288
+ prefixel?: React.ReactNode;
289
+ suffixel?: React.ReactNode;
290
+ dashed?: boolean | undefined;
290
291
  } | undefined;
291
292
  tagTooltipProps?: import("@synerise/ds-tooltip").TooltipProps | undefined;
292
293
  } & {
@@ -1,5 +1,4 @@
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
-
3
2
  import React, { useState, useRef } from 'react';
4
3
  import { withTheme } from 'styled-components';
5
4
  import Icon, { Check3M } from '@synerise/ds-icon';
@@ -8,49 +7,43 @@ import { useOnClickOutside } from '@synerise/ds-utils';
8
7
  import Tooltip from '@synerise/ds-tooltip';
9
8
  import * as S from './CardSelect.styles';
10
9
  import { DEFAULT_ICON_SIZE_LARGE, DEFAULT_ICON_SIZE_SMALL, DEFAULT_TICK_SIZE_LARGE, DEFAULT_TICK_SIZE_SMALL } from './constants';
11
-
12
10
  var CardSelect = function CardSelect(_ref) {
13
11
  var title = _ref.title,
14
- description = _ref.description,
15
- customTickVisible = _ref.customTickVisible,
16
- customTickVisibleComponent = _ref.customTickVisibleComponent,
17
- tickVisible = _ref.tickVisible,
18
- stretchToFit = _ref.stretchToFit,
19
- raised = _ref.raised,
20
- value = _ref.value,
21
- size = _ref.size,
22
- disabled = _ref.disabled,
23
- onChange = _ref.onChange,
24
- icon = _ref.icon,
25
- iconSize = _ref.iconSize,
26
- tickSize = _ref.tickSize,
27
- _ref$elementsPosition = _ref.elementsPosition,
28
- elementsPosition = _ref$elementsPosition === void 0 ? 'center' : _ref$elementsPosition,
29
- className = _ref.className,
30
- onClick = _ref.onClick,
31
- theme = _ref.theme,
32
- error = _ref.error,
33
- tagProps = _ref.tagProps,
34
- tagTooltipProps = _ref.tagTooltipProps;
35
-
12
+ description = _ref.description,
13
+ customTickVisible = _ref.customTickVisible,
14
+ customTickVisibleComponent = _ref.customTickVisibleComponent,
15
+ tickVisible = _ref.tickVisible,
16
+ stretchToFit = _ref.stretchToFit,
17
+ raised = _ref.raised,
18
+ value = _ref.value,
19
+ size = _ref.size,
20
+ disabled = _ref.disabled,
21
+ onChange = _ref.onChange,
22
+ icon = _ref.icon,
23
+ iconSize = _ref.iconSize,
24
+ tickSize = _ref.tickSize,
25
+ _ref$elementsPosition = _ref.elementsPosition,
26
+ elementsPosition = _ref$elementsPosition === void 0 ? 'center' : _ref$elementsPosition,
27
+ className = _ref.className,
28
+ onClick = _ref.onClick,
29
+ theme = _ref.theme,
30
+ error = _ref.error,
31
+ tagProps = _ref.tagProps,
32
+ tagTooltipProps = _ref.tagTooltipProps;
36
33
  var _useState = useState(false),
37
- isPressed = _useState[0],
38
- setIsPressed = _useState[1];
39
-
34
+ isPressed = _useState[0],
35
+ setIsPressed = _useState[1];
40
36
  var wrapperRef = useRef(null);
41
37
  var tickIconRef = useRef(null);
42
-
43
38
  var handleClick = function handleClick() {
44
39
  onClick ? onClick() : onChange && onChange(!value);
45
40
  setIsPressed(true);
46
41
  setTimeout(function () {
47
42
  var _tickIconRef$current;
48
-
49
43
  // eslint-disable-next-line no-unused-expressions
50
44
  (_tickIconRef$current = tickIconRef.current) == null || _tickIconRef$current.blur();
51
45
  });
52
46
  };
53
-
54
47
  var realIconSize = iconSize || (size === 'small' ? DEFAULT_ICON_SIZE_SMALL : DEFAULT_ICON_SIZE_LARGE);
55
48
  var realTickSize = tickSize || (size === 'small' ? DEFAULT_TICK_SIZE_SMALL : DEFAULT_TICK_SIZE_LARGE);
56
49
  var tagElement = tagProps && /*#__PURE__*/React.createElement(S.TagRibbonAnchor, null, /*#__PURE__*/React.createElement(S.TagRibbon, _extends({}, tagProps, {
@@ -113,7 +106,6 @@ var CardSelect = function CardSelect(_ref) {
113
106
  size: size
114
107
  }, customTickVisible && customTickVisibleComponent)));
115
108
  };
116
-
117
109
  CardSelect.defaultProps = {
118
110
  tickVisible: true,
119
111
  value: false,
@@ -1,7 +1,5 @@
1
1
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20;
2
-
3
2
  function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
4
-
5
3
  import styled, { css } from 'styled-components';
6
4
  import is, { isNot } from 'styled-is';
7
5
  import { Tag } from '@synerise/ds-tags';
@@ -18,29 +16,23 @@ var MAP_ELEMENTS_POSITION = {
18
16
  right: 'flex-end',
19
17
  center: 'center'
20
18
  };
21
-
22
19
  var getVar = function getVar(name) {
23
20
  return function (props) {
24
21
  return props.theme.palette[name];
25
22
  };
26
23
  };
27
-
28
24
  var getTransformValues = function getTransformValues(props) {
29
25
  if (props.size === 'small') {
30
26
  return 'translate(-2px,-2px)';
31
27
  }
32
-
33
28
  if (props.elementsPosition === 'left') {
34
29
  return 'translate(3px,-3px)';
35
30
  }
36
-
37
31
  return 'translate( -3px, -3px)';
38
32
  };
39
-
40
33
  var sizeCondition = function sizeCondition(smallValue, mediumValue, props) {
41
34
  return props.size === 'small' ? smallValue : mediumValue;
42
35
  };
43
-
44
36
  export var RadioShape = styled.div.withConfig({
45
37
  displayName: "CardSelectstyles__RadioShape",
46
38
  componentId: "tfmgtj-0"
@@ -1,20 +1,18 @@
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
-
3
2
  import React, { Children } from 'react';
4
3
  import CardSelect from '../CardSelect';
5
4
  import * as S from './CardSelectGroup.styles';
6
5
  var DEFAULT_COLUMNS = 2;
7
6
  var DEFAULT_SIZE = 'large';
8
-
9
7
  var CardSelectGroup = function CardSelectGroup(_ref) {
10
8
  var className = _ref.className,
11
- children = _ref.children,
12
- items = _ref.items,
13
- size = _ref.size,
14
- _ref$width = _ref.width,
15
- width = _ref$width === void 0 ? DEFAULT_SIZE : _ref$width,
16
- _ref$columns = _ref.columns,
17
- columns = _ref$columns === void 0 ? DEFAULT_COLUMNS : _ref$columns;
9
+ children = _ref.children,
10
+ items = _ref.items,
11
+ size = _ref.size,
12
+ _ref$width = _ref.width,
13
+ width = _ref$width === void 0 ? DEFAULT_SIZE : _ref$width,
14
+ _ref$columns = _ref.columns,
15
+ columns = _ref$columns === void 0 ? DEFAULT_COLUMNS : _ref$columns;
18
16
  var cardsCount = (items == null ? void 0 : items.length) || Children.toArray(children).length;
19
17
  return /*#__PURE__*/React.createElement(S.CardSelectGroupWrapper, {
20
18
  className: className,
@@ -28,5 +26,4 @@ var CardSelectGroup = function CardSelectGroup(_ref) {
28
26
  }));
29
27
  }) : children);
30
28
  };
31
-
32
29
  export default CardSelectGroup;
@@ -6,6 +6,7 @@ export var CardSelectGroupWrapper = styled.div.withConfig({
6
6
  return new Array(props.columns || props.itemsCount).fill('1fr').join(' ');
7
7
  }, function (props) {
8
8
  return props.size === 'small' ? '16px' : '24px';
9
- }); // @deprecated - use CardSelectGroupWrapper instead
9
+ });
10
10
 
11
+ // @deprecated - use CardSelectGroupWrapper instead
11
12
  export var CardGroup = CardSelectGroupWrapper;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-card-select",
3
- "version": "0.7.24",
3
+ "version": "0.7.26",
4
4
  "description": "Card-Select UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -34,10 +34,10 @@
34
34
  ],
35
35
  "types": "dist/index.d.ts",
36
36
  "dependencies": {
37
- "@synerise/ds-icon": "^0.66.4",
38
- "@synerise/ds-tags": "^0.10.17",
39
- "@synerise/ds-tooltip": "^0.14.48",
40
- "@synerise/ds-utils": "^0.31.1",
37
+ "@synerise/ds-icon": "^0.67.1",
38
+ "@synerise/ds-tags": "^0.10.19",
39
+ "@synerise/ds-tooltip": "^0.14.50",
40
+ "@synerise/ds-utils": "^0.31.2",
41
41
  "styled-is": "^1.3.0"
42
42
  },
43
43
  "peerDependencies": {
@@ -46,5 +46,5 @@
46
46
  "react": ">=16.9.0 <= 17.0.2",
47
47
  "styled-components": "5.0.1"
48
48
  },
49
- "gitHead": "8d26191fc0475407e0691b9b183761ad3cd7c87d"
49
+ "gitHead": "4a56ee7ef816c22341ce704154dc7aa65b7d1dcc"
50
50
  }