@cloud-ru/ds-uikit-product-card-predefined 3.0.9 → 3.0.10-preview-1030ded1.0

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.
@@ -32,5 +32,5 @@ function CardActionsSurface({ actionsVisibility = constants_1.VISIBILITY_STRATEG
32
32
  const { buttonRef: tooltipButtonRef, 'data-test-id': tooltipTestId, ...tooltipProps } = tooltip ?? {};
33
33
  return (
34
34
  // eslint-disable-next-line jsx-a11y/no-static-element-interactions
35
- (0, jsx_runtime_1.jsxs)("div", { onClick: utils_1.preventEventDefaultAndPropagation, className: (0, classnames_1.default)(styles_module_scss_1.default.root, className), "data-actions-visibility": actionsVisibility, children: [tooltip && ((0, jsx_runtime_1.jsx)(tooltip_1.Tooltip, { ...tooltipProps, tip: tooltip.tip, trigger: tooltipTrigger, triggerClassName: styles_module_scss_1.default.tooltipTrigger, children: (0, jsx_runtime_1.jsx)(button_1.Button, { as: 'span', role: 'button', "aria-label": t('actions.info'), size: actionsSize, appearance: 'neutral', view: 'simple', icon: (0, jsx_runtime_1.jsx)(product_1.InfoOutlineSVG, {}), tabIndex: -1, onClick: utils_1.preventEventDefault, innerRef: tooltipButtonRef, "data-test-id": tooltipTestId }) })), favorite?.enabled && ((0, jsx_runtime_1.jsx)(button_1.Button, { as: 'span', role: 'button', "aria-label": favorite.checked ? t('actions.favoriteRemove') : t('actions.favoriteAdd'), "aria-pressed": Boolean(favorite.checked), size: actionsSize, appearance: 'neutral', view: 'simple', icon: favorite.checked ? (0, jsx_runtime_1.jsx)(system_1.StarFilledSVG, {}) : (0, jsx_runtime_1.jsx)(system_1.StarSVG, {}), onClick: handleFavoriteClick, className: styles_module_scss_1.default.favorite, innerRef: favorite.buttonRef, tabIndex: -1, "data-test-id": favorite['data-test-id'], "data-checked": favorite.checked || undefined })), expandable && ((0, jsx_runtime_1.jsx)(button_1.Button, { as: 'span', role: 'button', "aria-label": expandable.value ? t('actions.collapse') : t('actions.expand'), "aria-expanded": expandable.value, size: actionsSize, appearance: 'neutral', view: 'simple', icon: expandable.value ? (0, jsx_runtime_1.jsx)(system_1.CollapseVerticalSVG, {}) : (0, jsx_runtime_1.jsx)(system_1.ExpandVerticalSVG, {}), onClick: handleExpandButtonClick, className: styles_module_scss_1.default.expandButton, innerRef: expandable.buttonRef, tabIndex: -1 }))] }));
35
+ (0, jsx_runtime_1.jsxs)("div", { onClick: utils_1.preventEventDefaultAndPropagation, className: (0, classnames_1.default)(styles_module_scss_1.default.root, className), "data-actions-visibility": actionsVisibility, children: [tooltip && ((0, jsx_runtime_1.jsx)(tooltip_1.Tooltip, { ...tooltipProps, tip: tooltip.tip, trigger: tooltipTrigger, triggerClassName: styles_module_scss_1.default.tooltipTrigger, children: (0, jsx_runtime_1.jsx)(button_1.Button, { as: 'span', role: 'button', "aria-label": t('actions.info'), size: actionsSize, appearance: 'neutral', view: 'simple', icon: (0, jsx_runtime_1.jsx)(product_1.InfoOutlineSVG, {}), tabIndex: -1, onClick: utils_1.preventEventDefault, innerRef: tooltipButtonRef, "data-test-id": tooltipTestId }) })), favorite?.enabled && ((0, jsx_runtime_1.jsx)(tooltip_1.Tooltip, { tip: favorite.checked ? t('actions.favoriteRemove') : t('actions.favoriteAdd'), trigger: tooltipTrigger, triggerClassName: styles_module_scss_1.default.tooltipTrigger, children: (0, jsx_runtime_1.jsx)(button_1.Button, { as: 'span', role: 'button', "aria-pressed": Boolean(favorite.checked), size: actionsSize, appearance: 'neutral', view: 'simple', icon: favorite.checked ? (0, jsx_runtime_1.jsx)(system_1.StarFilledSVG, {}) : (0, jsx_runtime_1.jsx)(system_1.StarSVG, {}), onClick: handleFavoriteClick, className: styles_module_scss_1.default.favorite, innerRef: favorite.buttonRef, tabIndex: -1, "data-test-id": favorite['data-test-id'], "data-checked": favorite.checked || undefined }) })), expandable && ((0, jsx_runtime_1.jsx)(tooltip_1.Tooltip, { tip: expandable.value ? t('actions.collapse') : t('actions.expand'), trigger: tooltipTrigger, triggerClassName: styles_module_scss_1.default.tooltipTrigger, children: (0, jsx_runtime_1.jsx)(button_1.Button, { as: 'span', role: 'button', "aria-expanded": expandable.value, size: actionsSize, appearance: 'neutral', view: 'simple', icon: expandable.value ? (0, jsx_runtime_1.jsx)(system_1.CollapseVerticalSVG, {}) : (0, jsx_runtime_1.jsx)(system_1.ExpandVerticalSVG, {}), onClick: handleExpandButtonClick, className: styles_module_scss_1.default.expandButton, innerRef: expandable.buttonRef, tabIndex: -1 }) }))] }));
36
36
  }
@@ -7,15 +7,12 @@
7
7
  position:absolute;
8
8
  top:var(--card-actions-surface-inset-top, 0);
9
9
  right:var(--card-actions-surface-inset-right, 0);
10
- transform:translateX(10%);
11
10
  border-radius:var(--sn-density-radius-3xs, var(--sn-primitive-dimension-2, 2px));
12
11
  visibility:hidden;
13
12
  background-color:var(--sn-theme-color-neutral-background2Level, var(--sn-brand-color-neutral-99, var(--sn-primitive-color-gray-99, #ffffff)));
14
13
  box-shadow:var(--sn-boxShadow-elevation-level2, var(--sn-theme-effect-shadow-level2-layer1-positionX, 0) var(--sn-theme-effect-shadow-level2-layer1-positionY, 0) var(--sn-theme-effect-shadow-level2-layer1-blur, 4px) var(--sn-theme-effect-shadow-level2-layer1-speed, 0) var(--sn-theme-effect-shadow-layer1Color, rgba(0, 0, 0, 0.0784313725)), var(--sn-theme-effect-shadow-level2-layer2-positionX, 0) var(--sn-theme-effect-shadow-level2-layer2-positionY, 4px) var(--sn-theme-effect-shadow-level2-layer2-blur, 8px) var(--sn-theme-effect-shadow-level2-layer2-speed, 2px) var(--sn-theme-effect-shadow-layer2Color, rgba(0, 0, 0, 0.0784313725)));
15
- transition:visibility 100ms ease-in-out, transform 150ms ease-in-out;
16
14
  }
17
15
  .root[data-actions-visibility=hover]:has(*:focus-visible){
18
- transform:translateX(0);
19
16
  visibility:visible;
20
17
  }
21
18
 
@@ -2,8 +2,8 @@ declare const CARD_PREDEFINED_MESSAGES: {
2
2
  readonly 'en-GB': {
3
3
  readonly actions: {
4
4
  readonly info: "Details";
5
- readonly favoriteAdd: "Add to favourites";
6
- readonly favoriteRemove: "Remove from favourites";
5
+ readonly favoriteAdd: "Add to favorites";
6
+ readonly favoriteRemove: "Remove from favorites";
7
7
  readonly expand: "Expand";
8
8
  readonly collapse: "Collapse";
9
9
  };
@@ -24,8 +24,8 @@ export declare const cardPredefinedLocale: import("@cloud-ru/ds-locale").Defined
24
24
  readonly 'en-GB': {
25
25
  readonly actions: {
26
26
  readonly info: "Details";
27
- readonly favoriteAdd: "Add to favourites";
28
- readonly favoriteRemove: "Remove from favourites";
27
+ readonly favoriteAdd: "Add to favorites";
28
+ readonly favoriteRemove: "Remove from favorites";
29
29
  readonly expand: "Expand";
30
30
  readonly collapse: "Collapse";
31
31
  };
@@ -6,8 +6,8 @@ const CARD_PREDEFINED_MESSAGES = (0, locale_1.defineMessages)({
6
6
  'en-GB': {
7
7
  actions: {
8
8
  info: 'Details',
9
- favoriteAdd: 'Add to favourites',
10
- favoriteRemove: 'Remove from favourites',
9
+ favoriteAdd: 'Add to favorites',
10
+ favoriteRemove: 'Remove from favorites',
11
11
  expand: 'Expand',
12
12
  collapse: 'Collapse',
13
13
  },
@@ -680,15 +680,12 @@
680
680
  position:absolute;
681
681
  top:var(--card-actions-surface-inset-top, 0);
682
682
  right:var(--card-actions-surface-inset-right, 0);
683
- transform:translateX(10%);
684
683
  border-radius:var(--sn-density-radius-3xs, var(--sn-primitive-dimension-2, 2px));
685
684
  visibility:hidden;
686
685
  background-color:var(--sn-theme-color-neutral-background2Level, var(--sn-brand-color-neutral-99, var(--sn-primitive-color-gray-99, #ffffff)));
687
686
  box-shadow:var(--sn-boxShadow-elevation-level2, var(--sn-theme-effect-shadow-level2-layer1-positionX, 0) var(--sn-theme-effect-shadow-level2-layer1-positionY, 0) var(--sn-theme-effect-shadow-level2-layer1-blur, 4px) var(--sn-theme-effect-shadow-level2-layer1-speed, 0) var(--sn-theme-effect-shadow-layer1Color, rgba(0, 0, 0, 0.0784313725)), var(--sn-theme-effect-shadow-level2-layer2-positionX, 0) var(--sn-theme-effect-shadow-level2-layer2-positionY, 4px) var(--sn-theme-effect-shadow-level2-layer2-blur, 8px) var(--sn-theme-effect-shadow-level2-layer2-speed, 2px) var(--sn-theme-effect-shadow-layer2Color, rgba(0, 0, 0, 0.0784313725)));
688
- transition:visibility 100ms ease-in-out, transform 150ms ease-in-out;
689
687
  }
690
688
  .root[data-actions-visibility=hover]:has(*:focus-visible){
691
- transform:translateX(0);
692
689
  visibility:visible;
693
690
  }
694
691
 
@@ -26,5 +26,5 @@ export function CardActionsSurface({ actionsVisibility = VISIBILITY_STRATEGY.hov
26
26
  const { buttonRef: tooltipButtonRef, 'data-test-id': tooltipTestId, ...tooltipProps } = tooltip ?? {};
27
27
  return (
28
28
  // eslint-disable-next-line jsx-a11y/no-static-element-interactions
29
- _jsxs("div", { onClick: preventEventDefaultAndPropagation, className: cn(styles.root, className), "data-actions-visibility": actionsVisibility, children: [tooltip && (_jsx(Tooltip, { ...tooltipProps, tip: tooltip.tip, trigger: tooltipTrigger, triggerClassName: styles.tooltipTrigger, children: _jsx(Button, { as: 'span', role: 'button', "aria-label": t('actions.info'), size: actionsSize, appearance: 'neutral', view: 'simple', icon: _jsx(InfoOutlineSVG, {}), tabIndex: -1, onClick: preventEventDefault, innerRef: tooltipButtonRef, "data-test-id": tooltipTestId }) })), favorite?.enabled && (_jsx(Button, { as: 'span', role: 'button', "aria-label": favorite.checked ? t('actions.favoriteRemove') : t('actions.favoriteAdd'), "aria-pressed": Boolean(favorite.checked), size: actionsSize, appearance: 'neutral', view: 'simple', icon: favorite.checked ? _jsx(StarFilledSVG, {}) : _jsx(StarSVG, {}), onClick: handleFavoriteClick, className: styles.favorite, innerRef: favorite.buttonRef, tabIndex: -1, "data-test-id": favorite['data-test-id'], "data-checked": favorite.checked || undefined })), expandable && (_jsx(Button, { as: 'span', role: 'button', "aria-label": expandable.value ? t('actions.collapse') : t('actions.expand'), "aria-expanded": expandable.value, size: actionsSize, appearance: 'neutral', view: 'simple', icon: expandable.value ? _jsx(CollapseVerticalSVG, {}) : _jsx(ExpandVerticalSVG, {}), onClick: handleExpandButtonClick, className: styles.expandButton, innerRef: expandable.buttonRef, tabIndex: -1 }))] }));
29
+ _jsxs("div", { onClick: preventEventDefaultAndPropagation, className: cn(styles.root, className), "data-actions-visibility": actionsVisibility, children: [tooltip && (_jsx(Tooltip, { ...tooltipProps, tip: tooltip.tip, trigger: tooltipTrigger, triggerClassName: styles.tooltipTrigger, children: _jsx(Button, { as: 'span', role: 'button', "aria-label": t('actions.info'), size: actionsSize, appearance: 'neutral', view: 'simple', icon: _jsx(InfoOutlineSVG, {}), tabIndex: -1, onClick: preventEventDefault, innerRef: tooltipButtonRef, "data-test-id": tooltipTestId }) })), favorite?.enabled && (_jsx(Tooltip, { tip: favorite.checked ? t('actions.favoriteRemove') : t('actions.favoriteAdd'), trigger: tooltipTrigger, triggerClassName: styles.tooltipTrigger, children: _jsx(Button, { as: 'span', role: 'button', "aria-pressed": Boolean(favorite.checked), size: actionsSize, appearance: 'neutral', view: 'simple', icon: favorite.checked ? _jsx(StarFilledSVG, {}) : _jsx(StarSVG, {}), onClick: handleFavoriteClick, className: styles.favorite, innerRef: favorite.buttonRef, tabIndex: -1, "data-test-id": favorite['data-test-id'], "data-checked": favorite.checked || undefined }) })), expandable && (_jsx(Tooltip, { tip: expandable.value ? t('actions.collapse') : t('actions.expand'), trigger: tooltipTrigger, triggerClassName: styles.tooltipTrigger, children: _jsx(Button, { as: 'span', role: 'button', "aria-expanded": expandable.value, size: actionsSize, appearance: 'neutral', view: 'simple', icon: expandable.value ? _jsx(CollapseVerticalSVG, {}) : _jsx(ExpandVerticalSVG, {}), onClick: handleExpandButtonClick, className: styles.expandButton, innerRef: expandable.buttonRef, tabIndex: -1 }) }))] }));
30
30
  }
@@ -7,15 +7,12 @@
7
7
  position:absolute;
8
8
  top:var(--card-actions-surface-inset-top, 0);
9
9
  right:var(--card-actions-surface-inset-right, 0);
10
- transform:translateX(10%);
11
10
  border-radius:var(--sn-density-radius-3xs, var(--sn-primitive-dimension-2, 2px));
12
11
  visibility:hidden;
13
12
  background-color:var(--sn-theme-color-neutral-background2Level, var(--sn-brand-color-neutral-99, var(--sn-primitive-color-gray-99, #ffffff)));
14
13
  box-shadow:var(--sn-boxShadow-elevation-level2, var(--sn-theme-effect-shadow-level2-layer1-positionX, 0) var(--sn-theme-effect-shadow-level2-layer1-positionY, 0) var(--sn-theme-effect-shadow-level2-layer1-blur, 4px) var(--sn-theme-effect-shadow-level2-layer1-speed, 0) var(--sn-theme-effect-shadow-layer1Color, rgba(0, 0, 0, 0.0784313725)), var(--sn-theme-effect-shadow-level2-layer2-positionX, 0) var(--sn-theme-effect-shadow-level2-layer2-positionY, 4px) var(--sn-theme-effect-shadow-level2-layer2-blur, 8px) var(--sn-theme-effect-shadow-level2-layer2-speed, 2px) var(--sn-theme-effect-shadow-layer2Color, rgba(0, 0, 0, 0.0784313725)));
15
- transition:visibility 100ms ease-in-out, transform 150ms ease-in-out;
16
14
  }
17
15
  .root[data-actions-visibility=hover]:has(*:focus-visible){
18
- transform:translateX(0);
19
16
  visibility:visible;
20
17
  }
21
18
 
@@ -2,8 +2,8 @@ declare const CARD_PREDEFINED_MESSAGES: {
2
2
  readonly 'en-GB': {
3
3
  readonly actions: {
4
4
  readonly info: "Details";
5
- readonly favoriteAdd: "Add to favourites";
6
- readonly favoriteRemove: "Remove from favourites";
5
+ readonly favoriteAdd: "Add to favorites";
6
+ readonly favoriteRemove: "Remove from favorites";
7
7
  readonly expand: "Expand";
8
8
  readonly collapse: "Collapse";
9
9
  };
@@ -24,8 +24,8 @@ export declare const cardPredefinedLocale: import("@cloud-ru/ds-locale").Defined
24
24
  readonly 'en-GB': {
25
25
  readonly actions: {
26
26
  readonly info: "Details";
27
- readonly favoriteAdd: "Add to favourites";
28
- readonly favoriteRemove: "Remove from favourites";
27
+ readonly favoriteAdd: "Add to favorites";
28
+ readonly favoriteRemove: "Remove from favorites";
29
29
  readonly expand: "Expand";
30
30
  readonly collapse: "Collapse";
31
31
  };
@@ -3,8 +3,8 @@ const CARD_PREDEFINED_MESSAGES = defineMessages({
3
3
  'en-GB': {
4
4
  actions: {
5
5
  info: 'Details',
6
- favoriteAdd: 'Add to favourites',
7
- favoriteRemove: 'Remove from favourites',
6
+ favoriteAdd: 'Add to favorites',
7
+ favoriteRemove: 'Remove from favorites',
8
8
  expand: 'Expand',
9
9
  collapse: 'Collapse',
10
10
  },
@@ -680,15 +680,12 @@
680
680
  position:absolute;
681
681
  top:var(--card-actions-surface-inset-top, 0);
682
682
  right:var(--card-actions-surface-inset-right, 0);
683
- transform:translateX(10%);
684
683
  border-radius:var(--sn-density-radius-3xs, var(--sn-primitive-dimension-2, 2px));
685
684
  visibility:hidden;
686
685
  background-color:var(--sn-theme-color-neutral-background2Level, var(--sn-brand-color-neutral-99, var(--sn-primitive-color-gray-99, #ffffff)));
687
686
  box-shadow:var(--sn-boxShadow-elevation-level2, var(--sn-theme-effect-shadow-level2-layer1-positionX, 0) var(--sn-theme-effect-shadow-level2-layer1-positionY, 0) var(--sn-theme-effect-shadow-level2-layer1-blur, 4px) var(--sn-theme-effect-shadow-level2-layer1-speed, 0) var(--sn-theme-effect-shadow-layer1Color, rgba(0, 0, 0, 0.0784313725)), var(--sn-theme-effect-shadow-level2-layer2-positionX, 0) var(--sn-theme-effect-shadow-level2-layer2-positionY, 4px) var(--sn-theme-effect-shadow-level2-layer2-blur, 8px) var(--sn-theme-effect-shadow-level2-layer2-speed, 2px) var(--sn-theme-effect-shadow-layer2Color, rgba(0, 0, 0, 0.0784313725)));
688
- transition:visibility 100ms ease-in-out, transform 150ms ease-in-out;
689
687
  }
690
688
  .root[data-actions-visibility=hover]:has(*:focus-visible){
691
- transform:translateX(0);
692
689
  visibility:visible;
693
690
  }
694
691