@synerise/ds-card-select 1.1.40 → 1.1.42

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,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
+ ## [1.1.42](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card-select@1.1.41...@synerise/ds-card-select@1.1.42) (2026-03-24)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-card-select
9
+
10
+ ## [1.1.41](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card-select@1.1.40...@synerise/ds-card-select@1.1.41) (2026-03-20)
11
+
12
+ **Note:** Version bump only for package @synerise/ds-card-select
13
+
6
14
  ## [1.1.40](https://github.com/Synerise/synerise-design/compare/@synerise/ds-card-select@1.1.39...@synerise/ds-card-select@1.1.40) (2026-03-09)
7
15
 
8
16
  **Note:** Version bump only for package @synerise/ds-card-select
package/README.md CHANGED
@@ -53,16 +53,17 @@ yarn add @synerise/ds-card-select
53
53
  | size | The size of the card | `small` / `medium` | `medium` |
54
54
  | raised | Defines border style | boolean | - |
55
55
  | icon | Defines the icon | ReactNode | - |
56
- | iconSize | Overwrites the predefined (82px for `medium` size, 48px for `small` size) size of the icon | number | - |
56
+ | iconSize | Overwrites the predefined (96px for `medium` size, 48px for `small` size) size of the icon | number | - |
57
57
  | title | Defines the title of the card | `ReactNode` | - |
58
58
  | description | Defines the description of the card (not available for `small` size) | `ReactNode` | - |
59
59
  | value | Defines if the card is selected by a user | boolean | `false` |
60
60
  | tickVisible | Defines the display of the checkbox | boolean | `true` |
61
- | disabled | Defines if the card is disabled (`onChange` still fires) | boolean | - |
61
+ | disabled | Defines if the card is disabled (pointer-events disabled, `onChange` will not fire) | boolean | - |
62
62
  | customTickVisible | Defines if the checkbox is custom | boolean | - |
63
63
  | customTickVisibleComponent | Custom checkbox component | ReactNode | - |
64
64
  | stretchToFit | Aligns the height of each card | boolean | - |
65
- | theme | Palette of colors | string | - |
65
+ | theme | **@deprecated** injected by styled-components `withTheme`, do not pass manually | object | - |
66
+ | error | Shows a red outline on the card | boolean | - |
66
67
  | elementsPosition | Defines the position of the elements on the card | `left` / `right` / `center` | `center` |
67
68
 
68
69
  | tagProps | Defines a ribbon-style tag | `TagProps` | - |
@@ -82,7 +83,7 @@ Omit<TagProps, 'shape' | 'removable' | 'asPill' | 'onRemove' | 'image' | 'texts'
82
83
  | Property | Description | Type | Default |
83
84
  | --------- | --------------------------------------------------------------------------------------------- | ---------------------------------------- | --------------------------------------- |
84
85
  | className | The name of the container | string | - |
85
- | columns | Defines the number of columns. Defaults to 2, set to null to render all items in a single row | number / null | - |
86
+ | columns | Defines the number of columns. Set to null to render all items in a single row | number / null | `2` |
86
87
  | children | Deprecated. Use items prop instead | ReactNode | - |
87
88
  | items | Array of CardSelect props to render CardSelect child elements | CardSelectProps & { key: string / numer} | - |
88
89
  | width | Defines the size of the gap between items. Deprecated, use size prop | `small` / `large` | 16px for `small`, 24px for `large` size |
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
2
  declare const _default: React.ForwardRefExoticComponent<{
3
3
  className?: string | undefined;
4
4
  title?: React.ReactNode;
@@ -7,18 +7,18 @@ declare const _default: React.ForwardRefExoticComponent<{
7
7
  disabled?: boolean | undefined;
8
8
  key?: React.Key | undefined;
9
9
  value?: boolean | undefined;
10
- size?: import("./CardSelect.types").CardSelectSizeType | undefined;
10
+ size?: import('./CardSelect.types').CardSelectSizeType | undefined;
11
11
  stretchToFit?: boolean | undefined;
12
12
  error?: boolean | undefined;
13
13
  raised?: boolean | undefined;
14
+ elementsPosition?: import('./CardSelect.types').CardSelectAlignType | undefined;
15
+ tickVisible?: boolean | undefined;
14
16
  description?: React.ReactNode;
15
17
  customTickVisible?: boolean | undefined;
16
18
  customTickVisibleComponent?: React.ReactNode;
17
- tickVisible?: boolean | undefined;
18
19
  icon?: React.ReactNode;
19
20
  iconSize?: number | undefined;
20
21
  tickSize?: number | undefined;
21
- elementsPosition?: import("./CardSelect.types").CardSelectAlignType | undefined;
22
22
  tagProps?: {
23
23
  [x: `data-${string}`]: string;
24
24
  defaultChecked?: boolean | undefined | undefined;
@@ -293,10 +293,10 @@ declare const _default: React.ForwardRefExoticComponent<{
293
293
  prefixel?: React.ReactNode;
294
294
  suffixel?: React.ReactNode;
295
295
  dashed?: boolean | undefined;
296
- tooltipProps?: import("@synerise/ds-tooltip").TooltipProps | undefined;
296
+ tooltipProps?: import('@synerise/ds-tooltip').TooltipProps | undefined;
297
297
  } | undefined;
298
- tagTooltipProps?: import("@synerise/ds-tooltip").TooltipProps | undefined;
299
- infoTooltipProps?: import("@synerise/ds-tooltip").TooltipProps | undefined;
298
+ tagTooltipProps?: import('@synerise/ds-tooltip').TooltipProps | undefined;
299
+ infoTooltipProps?: import('@synerise/ds-tooltip').TooltipProps | undefined;
300
300
  } & {
301
301
  theme?: any;
302
302
  }>;
@@ -1,118 +1,71 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- import React, { useRef, useState } from 'react';
3
- import { withTheme } from 'styled-components';
4
- import { useTheme } from '@synerise/ds-core';
5
- import Icon, { Check3M, InfoFillS } from '@synerise/ds-icon';
6
- import { TagShape } from '@synerise/ds-tag';
7
- import Tooltip from '@synerise/ds-tooltip';
8
- import { useOnClickOutside } from '@synerise/ds-utils';
9
- import * as S from './CardSelect.styles';
10
- import { DEFAULT_ICON_SIZE_LARGE, DEFAULT_ICON_SIZE_SMALL, DEFAULT_TICK_SIZE_LARGE, DEFAULT_TICK_SIZE_SMALL } from './constants';
11
- var CardSelect = function CardSelect(_ref) {
12
- var title = _ref.title,
13
- description = _ref.description,
14
- customTickVisible = _ref.customTickVisible,
15
- customTickVisibleComponent = _ref.customTickVisibleComponent,
16
- _ref$tickVisible = _ref.tickVisible,
17
- tickVisible = _ref$tickVisible === void 0 ? true : _ref$tickVisible,
18
- stretchToFit = _ref.stretchToFit,
19
- raised = _ref.raised,
20
- _ref$value = _ref.value,
21
- value = _ref$value === void 0 ? false : _ref$value,
22
- _ref$size = _ref.size,
23
- size = _ref$size === void 0 ? 'medium' : _ref$size,
24
- disabled = _ref.disabled,
25
- onChange = _ref.onChange,
26
- icon = _ref.icon,
27
- iconSize = _ref.iconSize,
28
- tickSize = _ref.tickSize,
29
- _ref$elementsPosition = _ref.elementsPosition,
30
- elementsPosition = _ref$elementsPosition === void 0 ? 'center' : _ref$elementsPosition,
31
- className = _ref.className,
32
- onClick = _ref.onClick,
33
- error = _ref.error,
34
- tagProps = _ref.tagProps,
35
- tagTooltipProps = _ref.tagTooltipProps,
36
- infoTooltipProps = _ref.infoTooltipProps;
37
- var _useState = useState(false),
38
- isPressed = _useState[0],
39
- setIsPressed = _useState[1];
40
- var theme = useTheme();
41
- var wrapperRef = useRef(null);
42
- var tickIconRef = useRef(null);
43
- var handleClick = function handleClick() {
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { useState, useRef } from "react";
3
+ import { withTheme } from "styled-components";
4
+ import { useTheme } from "@synerise/ds-core";
5
+ import Icon, { Check3M, InfoFillS } from "@synerise/ds-icon";
6
+ import { TagShape } from "@synerise/ds-tag";
7
+ import Tooltip from "@synerise/ds-tooltip";
8
+ import { useOnClickOutside } from "@synerise/ds-utils";
9
+ import { TagRibbonAnchor, TagRibbon, CardWrapper, Container, Aside, TickIcon, RadioShape, Main, IconWrapper, Title, Description } from "./CardSelect.styles.js";
10
+ import { DEFAULT_TICK_SIZE_SMALL, DEFAULT_TICK_SIZE_LARGE, DEFAULT_ICON_SIZE_SMALL, DEFAULT_ICON_SIZE_LARGE } from "./constants.js";
11
+ const CardSelect = ({
12
+ title,
13
+ description,
14
+ customTickVisible,
15
+ customTickVisibleComponent,
16
+ tickVisible = true,
17
+ stretchToFit,
18
+ raised,
19
+ value = false,
20
+ size = "medium",
21
+ disabled,
22
+ onChange,
23
+ icon,
24
+ iconSize,
25
+ tickSize,
26
+ elementsPosition = "center",
27
+ className,
28
+ onClick,
29
+ error,
30
+ tagProps,
31
+ tagTooltipProps,
32
+ infoTooltipProps
33
+ }) => {
34
+ const [isPressed, setIsPressed] = useState(false);
35
+ const theme = useTheme();
36
+ const wrapperRef = useRef(null);
37
+ const tickIconRef = useRef(null);
38
+ const handleClick = () => {
44
39
  onClick ? onClick() : onChange && onChange(!value);
45
40
  setIsPressed(true);
46
- setTimeout(function () {
47
- var _tickIconRef$current;
48
- (_tickIconRef$current = tickIconRef.current) == null || _tickIconRef$current.blur();
41
+ setTimeout(() => {
42
+ tickIconRef.current?.blur();
49
43
  });
50
44
  };
51
- var realIconSize = iconSize || (size === 'small' ? DEFAULT_ICON_SIZE_SMALL : DEFAULT_ICON_SIZE_LARGE);
52
- var realTickSize = tickSize || (size === 'small' ? DEFAULT_TICK_SIZE_SMALL : DEFAULT_TICK_SIZE_LARGE);
53
- var tagElement = tagProps && /*#__PURE__*/React.createElement(S.TagRibbonAnchor, null, /*#__PURE__*/React.createElement(S.TagRibbon, _extends({}, tagProps, {
54
- shape: TagShape.DEFAULT_SQUARE,
55
- asPill: true
56
- })));
57
- var tagElementWithTooltip = tagTooltipProps ? /*#__PURE__*/React.createElement(Tooltip, tagTooltipProps, tagElement) : tagElement;
58
- useOnClickOutside(wrapperRef, function () {
45
+ const realIconSize = iconSize || (size === "small" ? DEFAULT_ICON_SIZE_SMALL : DEFAULT_ICON_SIZE_LARGE);
46
+ const realTickSize = tickSize || (size === "small" ? DEFAULT_TICK_SIZE_SMALL : DEFAULT_TICK_SIZE_LARGE);
47
+ const tagElement = tagProps && /* @__PURE__ */ jsx(TagRibbonAnchor, { children: /* @__PURE__ */ jsx(TagRibbon, { ...tagProps, shape: TagShape.DEFAULT_SQUARE, asPill: true }) });
48
+ const tagElementWithTooltip = tagTooltipProps ? /* @__PURE__ */ jsx(Tooltip, { ...tagTooltipProps, children: tagElement }) : tagElement;
49
+ useOnClickOutside(wrapperRef, () => {
59
50
  isPressed && setIsPressed(false);
60
51
  });
61
- return /*#__PURE__*/React.createElement(S.CardWrapper, {
62
- size: size,
63
- className: "ds-card-select-wrapper",
64
- disabled: disabled,
65
- stretchToFit: stretchToFit,
66
- hasTick: tickVisible || customTickVisible,
67
- hasIcon: !!icon,
68
- elementsPosition: elementsPosition
69
- }, tagElementWithTooltip, /*#__PURE__*/React.createElement(S.Container, {
70
- error: !!error,
71
- ref: wrapperRef,
72
- pressed: isPressed,
73
- raised: raised,
74
- disabled: disabled,
75
- value: value,
76
- size: size,
77
- onClick: handleClick,
78
- className: "ds-card-select " + (className || ''),
79
- elementsPosition: elementsPosition,
80
- stretchToFit: stretchToFit
81
- }, /*#__PURE__*/React.createElement(S.Aside, {
82
- size: size,
83
- elementsPosition: elementsPosition,
84
- tickVisible: tickVisible,
85
- tabIndex: disabled ? undefined : 0,
86
- ref: tickIconRef
87
- }, tickVisible && /*#__PURE__*/React.createElement(S.TickIcon, {
88
- className: "ds-card-select-tick",
89
- disabled: disabled,
90
- elementsPosition: elementsPosition,
91
- selected: value && !disabled,
92
- size: size
93
- }, value ? /*#__PURE__*/React.createElement(Icon, {
94
- size: realTickSize,
95
- color: value ? theme.palette['green-600'] : theme.palette['grey-400'],
96
- component: /*#__PURE__*/React.createElement(Check3M, null)
97
- }) : /*#__PURE__*/React.createElement(S.RadioShape, {
98
- size: size
99
- })), infoTooltipProps && /*#__PURE__*/React.createElement(Tooltip, infoTooltipProps, /*#__PURE__*/React.createElement(Icon, {
100
- component: /*#__PURE__*/React.createElement(InfoFillS, null),
101
- color: theme.palette['grey-400']
102
- }))), /*#__PURE__*/React.createElement(S.Main, null, icon && /*#__PURE__*/React.createElement(S.IconWrapper, {
103
- size: size
104
- }, /*#__PURE__*/React.createElement(Icon, {
105
- component: icon,
106
- size: realIconSize
107
- })), title && /*#__PURE__*/React.createElement(S.Title, {
108
- size: size,
109
- hasIcon: !!icon
110
- }, title), description && size !== 'small' && /*#__PURE__*/React.createElement(S.Description, {
111
- size: size,
112
- hasTitle: !!title,
113
- hasIcon: !!icon
114
- }, description)), customTickVisible && customTickVisibleComponent && /*#__PURE__*/React.createElement(S.Aside, {
115
- size: size
116
- }, customTickVisible && customTickVisibleComponent)));
52
+ return /* @__PURE__ */ jsxs(CardWrapper, { size, className: "ds-card-select-wrapper", disabled, stretchToFit, hasTick: tickVisible || customTickVisible, hasIcon: !!icon, elementsPosition, children: [
53
+ tagElementWithTooltip,
54
+ /* @__PURE__ */ jsxs(Container, { error: !!error, ref: wrapperRef, pressed: isPressed, raised, disabled, value, size, onClick: handleClick, className: `ds-card-select ${className || ""}`, elementsPosition, stretchToFit, children: [
55
+ /* @__PURE__ */ jsxs(Aside, { size, elementsPosition, tickVisible, tabIndex: disabled ? void 0 : 0, ref: tickIconRef, children: [
56
+ tickVisible && /* @__PURE__ */ jsx(TickIcon, { className: "ds-card-select-tick", disabled, elementsPosition, selected: value && !disabled, size, children: value ? /* @__PURE__ */ jsx(Icon, { size: realTickSize, color: value ? theme.palette["green-600"] : theme.palette["grey-400"], component: /* @__PURE__ */ jsx(Check3M, {}) }) : /* @__PURE__ */ jsx(RadioShape, { size }) }),
57
+ infoTooltipProps && /* @__PURE__ */ jsx(Tooltip, { ...infoTooltipProps, children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(InfoFillS, {}), color: theme.palette["grey-400"] }) })
58
+ ] }),
59
+ /* @__PURE__ */ jsxs(Main, { children: [
60
+ icon && /* @__PURE__ */ jsx(IconWrapper, { size, children: /* @__PURE__ */ jsx(Icon, { component: icon, size: realIconSize }) }),
61
+ title && /* @__PURE__ */ jsx(Title, { size, hasIcon: !!icon, children: title }),
62
+ description && size !== "small" && /* @__PURE__ */ jsx(Description, { size, hasTitle: !!title, hasIcon: !!icon, children: description })
63
+ ] }),
64
+ customTickVisible && customTickVisibleComponent && /* @__PURE__ */ jsx(Aside, { size, children: customTickVisible && customTickVisibleComponent })
65
+ ] })
66
+ ] });
67
+ };
68
+ const CardSelect$1 = withTheme(CardSelect);
69
+ export {
70
+ CardSelect$1 as default
117
71
  };
118
- export default withTheme(CardSelect);
@@ -1,27 +1,27 @@
1
- import type React from 'react';
2
- import { type ThemeProps } from '@synerise/ds-core';
3
- import { type CardSelectAlignType, type CardSelectSizeType } from './CardSelect.types';
4
- export declare const RadioShape: import("styled-components").StyledComponent<"div", any, {
1
+ import { default as React } from 'react';
2
+ import { ThemeProps } from '@synerise/ds-core';
3
+ import { CardSelectAlignType, CardSelectSizeType } from './CardSelect.types';
4
+ export declare const RadioShape: import('styled-components').StyledComponent<"div", any, {
5
5
  size?: CardSelectSizeType;
6
6
  }, never>;
7
- export declare const Title: import("styled-components").StyledComponent<"div", any, {
7
+ export declare const Title: import('styled-components').StyledComponent<"div", any, {
8
8
  hasIcon: boolean;
9
9
  size?: CardSelectSizeType;
10
10
  }, never>;
11
- export declare const Description: import("styled-components").StyledComponent<"div", any, {
11
+ export declare const Description: import('styled-components').StyledComponent<"div", any, {
12
12
  hasTitle?: boolean;
13
13
  hasIcon?: boolean;
14
14
  size?: CardSelectSizeType;
15
15
  }, never>;
16
- export declare const IconWrapper: import("styled-components").StyledComponent<"div", any, {
16
+ export declare const IconWrapper: import('styled-components').StyledComponent<"div", any, {
17
17
  size?: CardSelectSizeType;
18
18
  }, never>;
19
- export declare const Aside: import("styled-components").StyledComponent<"div", any, {
19
+ export declare const Aside: import('styled-components').StyledComponent<"div", any, {
20
20
  size?: CardSelectSizeType;
21
21
  elementsPosition?: CardSelectAlignType;
22
22
  tickVisible?: boolean;
23
23
  }, never>;
24
- export declare const Container: import("styled-components").StyledComponent<"div", any, {
24
+ export declare const Container: import('styled-components').StyledComponent<"div", any, {
25
25
  disabled?: boolean;
26
26
  raised?: boolean;
27
27
  value?: boolean;
@@ -32,14 +32,14 @@ export declare const Container: import("styled-components").StyledComponent<"div
32
32
  stretchToFit?: boolean;
33
33
  error?: boolean;
34
34
  } & ThemeProps, never>;
35
- export declare const TagRibbonAnchor: import("styled-components").StyledComponent<"div", any, {}, never>;
36
- export declare const TagRibbon: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<{
35
+ export declare const TagRibbonAnchor: import('styled-components').StyledComponent<"div", any, {}, never>;
36
+ export declare const TagRibbon: import('styled-components').StyledComponent<React.ForwardRefExoticComponent<{
37
37
  id?: string | number;
38
38
  name?: string;
39
39
  textColor?: string;
40
40
  color?: string;
41
41
  image?: string;
42
- shape?: import("@synerise/ds-tag").TagShape;
42
+ shape?: import('@synerise/ds-tag').TagShape;
43
43
  removable?: boolean;
44
44
  className?: string;
45
45
  disabled?: boolean;
@@ -47,19 +47,19 @@ export declare const TagRibbon: import("styled-components").StyledComponent<Reac
47
47
  onRemove?: (tag: string | number) => void;
48
48
  prefixel?: React.ReactNode;
49
49
  suffixel?: React.ReactNode;
50
- texts?: import("@synerise/ds-tag").TagTexts;
50
+ texts?: import('@synerise/ds-tag').TagTexts;
51
51
  asPill?: boolean;
52
52
  dashed?: boolean;
53
- tooltipProps?: import("@synerise/ds-tooltip").TooltipProps;
54
- } & Omit<React.HTMLAttributes<HTMLDivElement>, "className" | "id" | "color" | "onClick" | "name" | "textColor" | "image" | "shape" | "removable" | "disabled" | "onRemove" | "prefixel" | "suffixel" | "texts" | "asPill" | "dashed" | "tooltipProps"> & import("@synerise/ds-utils").DataAttributes & React.RefAttributes<HTMLDivElement>>, any, {}, never>;
55
- export declare const Main: import("styled-components").StyledComponent<"div", any, {}, never>;
56
- export declare const TickIcon: import("styled-components").StyledComponent<"div", any, {
53
+ tooltipProps?: import('@synerise/ds-tooltip').TooltipProps;
54
+ } & Omit<React.HTMLAttributes<HTMLDivElement>, "className" | "id" | "color" | "onClick" | "name" | "textColor" | "image" | "shape" | "removable" | "disabled" | "onRemove" | "prefixel" | "suffixel" | "texts" | "asPill" | "dashed" | "tooltipProps"> & import('@synerise/ds-utils').DataAttributes & React.RefAttributes<HTMLDivElement>>, any, {}, never>;
55
+ export declare const Main: import('styled-components').StyledComponent<"div", any, {}, never>;
56
+ export declare const TickIcon: import('styled-components').StyledComponent<"div", any, {
57
57
  size?: CardSelectSizeType;
58
58
  disabled?: boolean;
59
59
  selected?: boolean;
60
60
  elementsPosition: CardSelectAlignType;
61
61
  }, never>;
62
- export declare const CardWrapper: import("styled-components").StyledComponent<"div", any, {
62
+ export declare const CardWrapper: import('styled-components').StyledComponent<"div", any, {
63
63
  size?: CardSelectSizeType;
64
64
  disabled?: boolean;
65
65
  stretchToFit?: boolean;
@@ -1,128 +1,156 @@
1
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject0, _templateObject1, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18;
2
- function _taggedTemplateLiteralLoose(e, t) { return t || (t = e.slice(0)), e.raw = t, e; }
3
- import styled, { css } from 'styled-components';
4
- import is, { isNot } from 'styled-is';
5
- import Tag from '@synerise/ds-tag';
6
- var TRANSITION = "\n TRANSITION-timing-function: ease-in-out;\n transition-duration: 0.2s;\n transition-property: border-color, background-color;\n";
7
- var MAIN_PADDING = 8;
8
- var RADIO_WIDTH = 20;
9
- var RADIO_SMALL_WIDTH = 16;
10
- var RADIO_BORDER_WIDTH = 1;
11
- var TAG_LEFT_OFFSET = 32;
12
- var TAG_LEFT_OFFSET_TICK_SMALL = 44;
13
- var TAG_LEFT_OFFSET_TICK_LARGE = 68;
14
- var MAP_ELEMENTS_POSITION = {
15
- left: 'flex-start',
16
- right: 'flex-end',
17
- center: 'center'
1
+ import styled, { css } from "styled-components";
2
+ import is, { isNot } from "styled-is";
3
+ import Tag from "@synerise/ds-tag";
4
+ const TRANSITION = `
5
+ TRANSITION-timing-function: ease-in-out;
6
+ transition-duration: 0.2s;
7
+ transition-property: border-color, background-color;
8
+ `;
9
+ const MAIN_PADDING = 8;
10
+ const RADIO_WIDTH = 20;
11
+ const RADIO_SMALL_WIDTH = 16;
12
+ const RADIO_BORDER_WIDTH = 1;
13
+ const TAG_LEFT_OFFSET = 32;
14
+ const TAG_LEFT_OFFSET_TICK_SMALL = 44;
15
+ const TAG_LEFT_OFFSET_TICK_LARGE = 68;
16
+ const MAP_ELEMENTS_POSITION = {
17
+ left: "flex-start",
18
+ right: "flex-end",
19
+ center: "center"
18
20
  };
19
- var getVar = function getVar(name) {
20
- return function (props) {
21
- return props.theme.palette[name];
22
- };
23
- };
24
- var getTransformValues = function getTransformValues(props) {
25
- if (props.size === 'small') {
26
- return 'translate(-2px,-2px)';
21
+ const getVar = (name) => (props) => props.theme.palette[name];
22
+ const getTransformValues = (props) => {
23
+ if (props.size === "small") {
24
+ return "translate(-2px,-2px)";
27
25
  }
28
- if (props.elementsPosition === 'left') {
29
- return 'translate(3px,-3px)';
26
+ if (props.elementsPosition === "left") {
27
+ return "translate(3px,-3px)";
30
28
  }
31
- return 'translate( -3px, -3px)';
32
- };
33
- var sizeCondition = function sizeCondition(smallValue, mediumValue, props) {
34
- return props.size === 'small' ? smallValue : mediumValue;
29
+ return "translate( -3px, -3px)";
35
30
  };
36
- export var RadioShape = styled.div.withConfig({
31
+ const sizeCondition = (smallValue, mediumValue, props) => props.size === "small" ? smallValue : mediumValue;
32
+ const RadioShape = /* @__PURE__ */ styled.div.withConfig({
37
33
  displayName: "CardSelectstyles__RadioShape",
38
34
  componentId: "sc-tfmgtj-0"
39
- })(["", ";width:", "px;height:", "px;border-radius:50%;border-width:", "px;border-style:solid;border-color:", ";margin:2px;&:hover{border-color:", ";}"], TRANSITION, function (props) {
40
- return sizeCondition(RADIO_SMALL_WIDTH, RADIO_WIDTH, props);
41
- }, function (props) {
42
- return sizeCondition(RADIO_SMALL_WIDTH, RADIO_WIDTH, props);
43
- }, RADIO_BORDER_WIDTH, getVar('grey-300'), getVar('grey-400'));
44
- export var Title = styled.div.withConfig({
35
+ })(["", ";width:", "px;height:", "px;border-radius:50%;border-width:", "px;border-style:solid;border-color:", ";margin:2px;&:hover{border-color:", ";}"], TRANSITION, (props) => sizeCondition(RADIO_SMALL_WIDTH, RADIO_WIDTH, props), (props) => sizeCondition(RADIO_SMALL_WIDTH, RADIO_WIDTH, props), RADIO_BORDER_WIDTH, getVar("grey-300"), getVar("grey-400"));
36
+ const Title = /* @__PURE__ */ styled.div.withConfig({
45
37
  displayName: "CardSelectstyles__Title",
46
38
  componentId: "sc-tfmgtj-1"
47
- })(["text-align:center;color:", ";font-weight:", ";width:100%;font-size:", ";", ""], getVar('grey-800'), function (props) {
48
- return sizeCondition('400', '500', props);
49
- }, function (props) {
50
- return sizeCondition('13px', '14px', props);
51
- }, function (props) {
52
- return props.size === 'small' && props.hasIcon && css(["margin-top:4px;"]);
53
- });
54
- export var Description = styled.div.withConfig({
39
+ })(["text-align:center;color:", ";font-weight:", ";width:100%;font-size:", ";", ""], getVar("grey-800"), (props) => sizeCondition("400", "500", props), (props) => sizeCondition("13px", "14px", props), (props) => props.size === "small" && props.hasIcon && css(["margin-top:4px;"]));
40
+ const Description = /* @__PURE__ */ styled.div.withConfig({
55
41
  displayName: "CardSelectstyles__Description",
56
42
  componentId: "sc-tfmgtj-2"
57
- })(["&&{font-size:13px;text-align:center;max-width:176px;word-wrap:break-word;overflow-wrap:break-word;flex-grow:1;", ";}"], function (props) {
58
- return props.hasTitle && css(["margin-top:8px;"]);
59
- });
60
- export var IconWrapper = styled.div.withConfig({
43
+ })(["&&{font-size:13px;text-align:center;max-width:176px;word-wrap:break-word;overflow-wrap:break-word;flex-grow:1;", ";}"], (props) => props.hasTitle && css(["margin-top:8px;"]));
44
+ const IconWrapper = /* @__PURE__ */ styled.div.withConfig({
61
45
  displayName: "CardSelectstyles__IconWrapper",
62
46
  componentId: "sc-tfmgtj-3"
63
- })(["margin-bottom:", "px;text-align:center;width:100%;"], function (props) {
64
- return sizeCondition(0, MAIN_PADDING, props);
65
- });
66
- export var Aside = styled.div.withConfig({
47
+ })(["margin-bottom:", "px;text-align:center;width:100%;"], (props) => sizeCondition(0, MAIN_PADDING, props));
48
+ const Aside = /* @__PURE__ */ styled.div.withConfig({
67
49
  displayName: "CardSelectstyles__Aside",
68
50
  componentId: "sc-tfmgtj-4"
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) {
74
- return sizeCondition('4px', '14px', props);
75
- });
76
- export var Container = styled.div.withConfig({
51
+ })(["width:100%;justify-content:", ";top:0;left:0;display:flex;flex-direction:", ";position:absolute;padding:", ";"], (props) => props.tickVisible ? "space-between" : "flex-end", (props) => props.elementsPosition === "left" ? "row-reverse" : "row", (props) => sizeCondition("4px", "14px", props));
52
+ const Container = /* @__PURE__ */ styled.div.withConfig({
77
53
  displayName: "CardSelectstyles__Container",
78
54
  componentId: "sc-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 = _taggedTemplateLiteralLoose(["\n height: 100%;\n "]))), TRANSITION, getVar('white'), function (props) {
80
- return props.theme.variable('@border-radius-base');
81
- }, is('error')(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n &&, &&:hover {\n box-shadow: 0px 0px 0px 2px ", ";\n }\n "])), getVar('red-500')), function (props) {
82
- return MAP_ELEMENTS_POSITION[props.elementsPosition];
83
- }, getVar('white'), function (props) {
84
- return props.size === 'small' ? '16px' : '24px';
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
- return props.elementsPosition;
87
- }, IconWrapper, function (props) {
88
- return props.elementsPosition === 'left' ? '-18px' : '0px';
89
- }, function (props) {
90
- return props.elementsPosition === 'right' ? '-18px' : '0px';
91
- }, 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')(_templateObject0 || (_templateObject0 = _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')(_templateObject1 || (_templateObject1 = _taggedTemplateLiteralLoose(["\n ", "\n \n "])), isNot('value')(_templateObject10 || (_templateObject10 = _taggedTemplateLiteralLoose(["\n box-shadow: ", ";\n \n &:hover, &:active {\n box-shadow: ", ";\n }\n "])), function (props) {
92
- return props.theme.variable('@box-shadow-base') || 'none';
93
- }, function (props) {
94
- return props.theme.variable('@box-shadow-active') || 'none';
95
- }))), is('disabled')(_templateObject11 || (_templateObject11 = _taggedTemplateLiteralLoose(["\n opacity: 0.4;\n pointer-events:none;\n\n ", "\n \n "])), isNot('raised')(_templateObject12 || (_templateObject12 = _taggedTemplateLiteralLoose(["\n\n ", "\n "])), isNot('value')(_templateObject13 || (_templateObject13 = _taggedTemplateLiteralLoose(["\n box-shadow: 0px 0px 0px 1px ", ";\n "])), getVar('grey-200')))));
96
- export var TagRibbonAnchor = styled.div.withConfig({
55
+ })(["", " ", ";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")`
56
+ height: 100%;
57
+ `, TRANSITION, getVar("white"), (props) => props.theme.variable("@border-radius-base"), is("error")`
58
+ &&, &&:hover {
59
+ box-shadow: 0px 0px 0px 2px ${getVar("red-500")};
60
+ }
61
+ `, (props) => MAP_ELEMENTS_POSITION[props.elementsPosition], getVar("white"), (props) => props.size === "small" ? "16px" : "24px", getVar("blue-600"), isNot("pressed") && isNot("value")`box-shadow: 0px 0px 0px 1px ${getVar("grey-300")};`, is("value")`
62
+ box-shadow: 0px 0px 0px 2px ${getVar("blue-600")};
63
+ `, is("value") && is("pressed")` box-shadow: 0px 0px 0px 2px ${getVar("blue-600")};`, is("value") && is("raised")`
64
+ box-shadow: 0px 0px 0px 2px ${getVar("blue-600")};
65
+ `, is("value") && is("pressed")` box-shadow: 0px 0px 0px 2px ${getVar("blue-600")};`, Title, Description, IconWrapper, (props) => props.elementsPosition, IconWrapper, (props) => props.elementsPosition === "left" ? "-18px" : "0px", (props) => props.elementsPosition === "right" ? "-18px" : "0px", isNot("disabled")`
66
+
67
+
68
+ &:hover {
69
+ ${RadioShape} {
70
+ border-color: ${getVar("grey-400")};
71
+ }
72
+ }
73
+
74
+ ${isNot("raised")`
75
+ ${isNot("value")`
76
+ box-shadow: 0px 0px 0px 1px ${getVar("grey-300")};
77
+
78
+ &:hover, &:active {
79
+ box-shadow: 0px 0px 0px 1px ${getVar("grey-400")};
80
+ }
81
+ `};
82
+ `};
83
+
84
+ ${is("raised")`
85
+ ${isNot("value")`
86
+ box-shadow: ${(props) => props.theme.variable("@box-shadow-base") || "none"};
87
+
88
+ &:hover, &:active {
89
+ box-shadow: ${(props) => props.theme.variable("@box-shadow-active") || "none"};
90
+ }
91
+ `}
92
+
93
+ `}
94
+ `, is("disabled")`
95
+ opacity: 0.4;
96
+ pointer-events:none;
97
+
98
+ ${isNot("raised")`
99
+
100
+ ${isNot("value")`
101
+ box-shadow: 0px 0px 0px 1px ${getVar("grey-200")};
102
+ `}
103
+ `}
104
+
105
+ `);
106
+ const TagRibbonAnchor = /* @__PURE__ */ styled.div.withConfig({
97
107
  displayName: "CardSelectstyles__TagRibbonAnchor",
98
108
  componentId: "sc-tfmgtj-6"
99
109
  })(["display:flex;height:0;overflow:visible;"]);
100
- export var TagRibbon = styled(Tag).withConfig({
110
+ const TagRibbon = /* @__PURE__ */ styled(Tag).withConfig({
101
111
  displayName: "CardSelectstyles__TagRibbon",
102
112
  componentId: "sc-tfmgtj-7"
103
113
  })(["position:relative;z-index:1;top:-12px;margin:0;"]);
104
- export var Main = styled.div.withConfig({
114
+ const Main = /* @__PURE__ */ styled.div.withConfig({
105
115
  displayName: "CardSelectstyles__Main",
106
116
  componentId: "sc-tfmgtj-8"
107
117
  })(["display:flex;flex-direction:column;flex-wrap:wrap;align-items:center;justify-content:flex-start;"]);
108
- export var TickIcon = styled.div.withConfig({
118
+ const TickIcon = /* @__PURE__ */ styled.div.withConfig({
109
119
  displayName: "CardSelectstyles__TickIcon",
110
120
  componentId: "sc-tfmgtj-9"
111
- })(["", " ", " ", ""], is('selected')(_templateObject14 || (_templateObject14 = _taggedTemplateLiteralLoose(["\n transform: ", "; \n "])), function (props) {
112
- return getTransformValues(props);
113
- }), is('disabled')(_templateObject15 || (_templateObject15 = _taggedTemplateLiteralLoose(["\n ", " {\n background-color: ", ";\n border-color: ", ";\n }\n "])), RadioShape, getVar('grey-050'), getVar('grey-200')), isNot('disabled')(_templateObject16 || (_templateObject16 = _taggedTemplateLiteralLoose(["\n ", " {\n cursor: pointer;\n }\n "])), RadioShape));
114
- export var CardWrapper = styled.div.withConfig({
121
+ })(["", " ", " ", ""], is("selected")`
122
+ transform: ${(props) => getTransformValues(props)};
123
+ `, is("disabled")`
124
+ ${RadioShape} {
125
+ background-color: ${getVar("grey-050")};
126
+ border-color: ${getVar("grey-200")};
127
+ }
128
+ `, isNot("disabled")`
129
+ ${RadioShape} {
130
+ cursor: pointer;
131
+ }
132
+ `);
133
+ const CardWrapper = /* @__PURE__ */ styled.div.withConfig({
115
134
  displayName: "CardSelectstyles__CardWrapper",
116
135
  componentId: "sc-tfmgtj-10"
117
- })(["position:relative;", " ", " ", "{", "}", "{justify-content:", ";padding-", ":", "px;}", "{", ":16px;}"], is('disabled')(_templateObject17 || (_templateObject17 = _taggedTemplateLiteralLoose(["\n cursor:not-allowed;\n "]))), is('stretchToFit')(_templateObject18 || (_templateObject18 = _taggedTemplateLiteralLoose(["\n height: 100%;\n "]))), Title, function (props) {
118
- return props.hasTick && !props.hasIcon && css(["padding:0 24px;"]);
119
- }, TagRibbonAnchor, function (props) {
120
- return props.elementsPosition === 'right' ? 'flex-start' : 'flex-end';
121
- }, function (props) {
122
- return props.elementsPosition === 'left' ? 'right' : 'left';
123
- }, function (props) {
124
- var withTickOffset = props.size === 'small' ? TAG_LEFT_OFFSET_TICK_SMALL : TAG_LEFT_OFFSET_TICK_LARGE;
136
+ })(["position:relative;", " ", " ", "{", "}", "{justify-content:", ";padding-", ":", "px;}", "{", ":16px;}"], is("disabled")`
137
+ cursor:not-allowed;
138
+ `, is("stretchToFit")`
139
+ height: 100%;
140
+ `, Title, (props) => props.hasTick && !props.hasIcon && css(["padding:0 24px;"]), TagRibbonAnchor, (props) => props.elementsPosition === "right" ? "flex-start" : "flex-end", (props) => props.elementsPosition === "left" ? "right" : "left", (props) => {
141
+ const withTickOffset = props.size === "small" ? TAG_LEFT_OFFSET_TICK_SMALL : TAG_LEFT_OFFSET_TICK_LARGE;
125
142
  return props.hasTick ? withTickOffset : TAG_LEFT_OFFSET;
126
- }, TagRibbon, function (props) {
127
- return props.elementsPosition === 'left' ? 'left' : 'right';
128
- });
143
+ }, TagRibbon, (props) => props.elementsPosition === "left" ? "left" : "right");
144
+ export {
145
+ Aside,
146
+ CardWrapper,
147
+ Container,
148
+ Description,
149
+ IconWrapper,
150
+ Main,
151
+ RadioShape,
152
+ TagRibbon,
153
+ TagRibbonAnchor,
154
+ TickIcon,
155
+ Title
156
+ };
@@ -1,6 +1,6 @@
1
- import type { Key, ReactNode } from 'react';
2
- import type { TagProps } from '@synerise/ds-tag';
3
- import type { TooltipProps } from '@synerise/ds-tooltip';
1
+ import { Key, ReactNode } from 'react';
2
+ import { TagProps } from '@synerise/ds-tag';
3
+ import { TooltipProps } from '@synerise/ds-tooltip';
4
4
  type CardSelectTagProps = Omit<TagProps, 'shape' | 'removable' | 'asPill' | 'onRemove' | 'image' | 'texts'>;
5
5
  export type CardSelectAlignType = 'left' | 'center' | 'right';
6
6
  export type CardSelectSizeType = 'small' | 'medium';
@@ -1 +1 @@
1
- export {};
1
+
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
- import { type CardSelectGroupProps } from './CardSelectGroup.types';
1
+ import { default as React } from 'react';
2
+ import { CardSelectGroupProps } from './CardSelectGroup.types';
3
3
  declare const CardSelectGroup: ({ className, children, items, size, width, columns, }: CardSelectGroupProps) => React.JSX.Element;
4
4
  export default CardSelectGroup;
@@ -1,29 +1,20 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- import React, { Children } from 'react';
3
- import CardSelect from '../CardSelect';
4
- import * as S from './CardSelectGroup.styles';
5
- var DEFAULT_COLUMNS = 2;
6
- var DEFAULT_SIZE = 'large';
7
- var CardSelectGroup = function CardSelectGroup(_ref) {
8
- var className = _ref.className,
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;
16
- var cardsCount = (items == null ? void 0 : items.length) || Children.toArray(children).length;
17
- return /*#__PURE__*/React.createElement(S.CardSelectGroupWrapper, {
18
- className: className,
19
- size: size || width,
20
- columns: columns,
21
- itemsCount: cardsCount
22
- }, items ? items.map(function (item) {
23
- return /*#__PURE__*/React.createElement(CardSelect, _extends({}, item, {
24
- key: item.key,
25
- size: size || item.size
26
- }));
27
- }) : children);
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Children, createElement } from "react";
3
+ import CardSelect from "../CardSelect.js";
4
+ import { CardSelectGroupWrapper } from "./CardSelectGroup.styles.js";
5
+ const DEFAULT_COLUMNS = 2;
6
+ const DEFAULT_SIZE = "large";
7
+ const CardSelectGroup = ({
8
+ className,
9
+ children,
10
+ items,
11
+ size,
12
+ width = DEFAULT_SIZE,
13
+ columns = DEFAULT_COLUMNS
14
+ }) => {
15
+ const cardsCount = items?.length || Children.toArray(children).length;
16
+ return /* @__PURE__ */ jsx(CardSelectGroupWrapper, { className, size: size || width, columns, itemsCount: cardsCount, children: items ? items.map((item) => /* @__PURE__ */ createElement(CardSelect, { ...item, key: item.key, size: size || item.size })) : children });
17
+ };
18
+ export {
19
+ CardSelectGroup as default
28
20
  };
29
- export default CardSelectGroup;
@@ -1,9 +1,9 @@
1
- export declare const CardSelectGroupWrapper: import("styled-components").StyledComponent<"div", any, {
1
+ export declare const CardSelectGroupWrapper: import('styled-components').StyledComponent<"div", any, {
2
2
  itemsCount?: number;
3
3
  size: "small" | "medium" | "large";
4
4
  columns: number | null;
5
5
  }, never>;
6
- export declare const CardGroup: import("styled-components").StyledComponent<"div", any, {
6
+ export declare const CardGroup: import('styled-components').StyledComponent<"div", any, {
7
7
  itemsCount?: number;
8
8
  size: "small" | "medium" | "large";
9
9
  columns: number | null;
@@ -1,12 +1,10 @@
1
- import styled from 'styled-components';
2
- export var CardSelectGroupWrapper = styled.div.withConfig({
1
+ import styled from "styled-components";
2
+ const CardSelectGroupWrapper = /* @__PURE__ */ styled.div.withConfig({
3
3
  displayName: "CardSelectGroupstyles__CardSelectGroupWrapper",
4
4
  componentId: "sc-1xnksbf-0"
5
- })(["padding:24px;display:grid;grid-template-columns:", ";gap:", ";"], function (props) {
6
- return new Array(props.columns || props.itemsCount).fill('1fr').join(' ');
7
- }, function (props) {
8
- return props.size === 'small' ? '16px' : '24px';
9
- });
10
-
11
- // @deprecated - use CardSelectGroupWrapper instead
12
- export var CardGroup = CardSelectGroupWrapper;
5
+ })(["padding:24px;display:grid;grid-template-columns:", ";gap:", ";"], (props) => new Array(props.columns || props.itemsCount).fill("1fr").join(" "), (props) => props.size === "small" ? "16px" : "24px");
6
+ const CardGroup = CardSelectGroupWrapper;
7
+ export {
8
+ CardGroup,
9
+ CardSelectGroupWrapper
10
+ };
@@ -1,5 +1,5 @@
1
- import type { Key, ReactNode } from 'react';
2
- import { type CardSelectProps } from '../CardSelect.types';
1
+ import { Key, ReactNode } from 'react';
2
+ import { CardSelectProps } from '../CardSelect.types';
3
3
  type CardSelectPropsWithKey = Omit<CardSelectProps, 'key'> & {
4
4
  key: Key;
5
5
  };
@@ -1 +1 @@
1
- export {};
1
+
package/dist/constants.js CHANGED
@@ -1,4 +1,10 @@
1
- export var DEFAULT_TICK_SIZE_SMALL = 24;
2
- export var DEFAULT_TICK_SIZE_LARGE = 30;
3
- export var DEFAULT_ICON_SIZE_SMALL = 48;
4
- export var DEFAULT_ICON_SIZE_LARGE = 96;
1
+ const DEFAULT_TICK_SIZE_SMALL = 24;
2
+ const DEFAULT_TICK_SIZE_LARGE = 30;
3
+ const DEFAULT_ICON_SIZE_SMALL = 48;
4
+ const DEFAULT_ICON_SIZE_LARGE = 96;
5
+ export {
6
+ DEFAULT_ICON_SIZE_LARGE,
7
+ DEFAULT_ICON_SIZE_SMALL,
8
+ DEFAULT_TICK_SIZE_LARGE,
9
+ DEFAULT_TICK_SIZE_SMALL
10
+ };
package/dist/index.js CHANGED
@@ -1,2 +1,6 @@
1
- export { default } from './CardSelect';
2
- export { default as CardSelectGroup } from './CardSelectGroup/CardSelectGroup';
1
+ import { default as default2 } from "./CardSelect.js";
2
+ import { default as default3 } from "./CardSelectGroup/CardSelectGroup.js";
3
+ export {
4
+ default3 as CardSelectGroup,
5
+ default2 as default
6
+ };
package/dist/modules.d.js CHANGED
@@ -0,0 +1 @@
1
+
@@ -0,0 +1 @@
1
+ declare module 'styled-is';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-card-select",
3
- "version": "1.1.40",
3
+ "version": "1.1.42",
4
4
  "description": "Card-Select UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -16,15 +16,15 @@
16
16
  "access": "public"
17
17
  },
18
18
  "scripts": {
19
- "build": "pnpm run build:js && pnpm run build:css && pnpm run defs",
19
+ "build": "vite build",
20
20
  "build:css": "node ../../../scripts/style/less.js",
21
21
  "build:js": "babel --delete-dir-on-start --root-mode upward src --out-dir dist --extensions '.js,.ts,.tsx'",
22
- "build:watch": "pnpm run build:js -- --watch",
22
+ "build:watch": "vite build --watch",
23
23
  "defs": "tsc --declaration --outDir dist/ --emitDeclarationOnly",
24
24
  "pack:ci": "pnpm pack --pack-destination ../../storybook/storybook-static/static",
25
25
  "prepublish": "pnpm run build",
26
- "test": "vitest",
27
- "test:watch": "pnpm run test -- --watch",
26
+ "test": "vitest run",
27
+ "test:watch": "vitest",
28
28
  "types": "tsc --noEmit",
29
29
  "check:circular-dependencies": "madge --circular --extensions ts,tsx,js,jsx --ts-config tsconfig.json src/ --exclude '/dist/'",
30
30
  "upgrade:ds": "ncu -f \"@synerise/ds-*\" -u"
@@ -35,10 +35,10 @@
35
35
  ],
36
36
  "types": "dist/index.d.ts",
37
37
  "dependencies": {
38
- "@synerise/ds-icon": "^1.14.1",
39
- "@synerise/ds-tag": "^1.4.16",
40
- "@synerise/ds-tooltip": "^1.4.8",
41
- "@synerise/ds-utils": "^1.6.0",
38
+ "@synerise/ds-icon": "^1.15.1",
39
+ "@synerise/ds-tag": "^1.4.18",
40
+ "@synerise/ds-tooltip": "^1.4.10",
41
+ "@synerise/ds-utils": "^1.7.1",
42
42
  "styled-is": "^1.3.0"
43
43
  },
44
44
  "peerDependencies": {
@@ -48,5 +48,5 @@
48
48
  "styled-components": "^5.3.3",
49
49
  "vitest": "4"
50
50
  },
51
- "gitHead": "8dfafc5d7278f09d430f1e7499782d05c76b47c0"
51
+ "gitHead": "e4ecca8944fc9b41c1b9d59c8bcad5e5e2013225"
52
52
  }