@ultraviolet/plus 0.6.1 → 0.6.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/dist/index.d.ts CHANGED
@@ -329,24 +329,24 @@ declare const EstimateCost: {
329
329
 
330
330
  declare const ratings: readonly [{
331
331
  readonly value: 1;
332
- readonly imgSelected: keyof JSX.IntrinsicElements;
333
- readonly imgNotSelected: keyof JSX.IntrinsicElements;
332
+ readonly imgSelected: string;
333
+ readonly imgNotSelected: string;
334
334
  }, {
335
335
  readonly value: 2;
336
- readonly imgSelected: keyof JSX.IntrinsicElements;
337
- readonly imgNotSelected: keyof JSX.IntrinsicElements;
336
+ readonly imgSelected: string;
337
+ readonly imgNotSelected: string;
338
338
  }, {
339
339
  readonly value: 3;
340
- readonly imgSelected: keyof JSX.IntrinsicElements;
341
- readonly imgNotSelected: keyof JSX.IntrinsicElements;
340
+ readonly imgSelected: string;
341
+ readonly imgNotSelected: string;
342
342
  }, {
343
343
  readonly value: 4;
344
- readonly imgSelected: keyof JSX.IntrinsicElements;
345
- readonly imgNotSelected: keyof JSX.IntrinsicElements;
344
+ readonly imgSelected: string;
345
+ readonly imgNotSelected: string;
346
346
  }, {
347
347
  readonly value: 5;
348
- readonly imgSelected: keyof JSX.IntrinsicElements;
349
- readonly imgNotSelected: keyof JSX.IntrinsicElements;
348
+ readonly imgSelected: string;
349
+ readonly imgNotSelected: string;
350
350
  }];
351
351
  type Value = (typeof ratings)[number]['value'];
352
352
  type CustomerSatisfactionProps = {
@@ -1,7 +1,7 @@
1
1
  import _styled from '@emotion/styled/base';
2
2
  import { css } from '@emotion/react';
3
3
  import { Stack, Text, Icon } from '@ultraviolet/ui';
4
- import { forwardRef, useState, useMemo, useEffect, createRef } from 'react';
4
+ import { forwardRef, useRef, useState, useMemo, useEffect } from 'react';
5
5
  import { Skeleton } from './Skeleton.js';
6
6
  import { jsx, jsxs } from '@emotion/react/jsx-runtime';
7
7
 
@@ -87,7 +87,7 @@ const ContentCard = /*#__PURE__*/forwardRef(({
87
87
  loading,
88
88
  className
89
89
  }, ref) => {
90
- const subContainerRef = /*#__PURE__*/createRef();
90
+ const subContainerRef = useRef(null);
91
91
  const [subContainerHeight, setSubContainerHeight] = useState(subContainerRef?.current?.offsetHeight);
92
92
  const Container = useMemo(() => {
93
93
  if (href) {
@@ -81,7 +81,7 @@ const scaled = process.env.NODE_ENV === "production" ? {
81
81
  styles: "transform:scale(1.2)",
82
82
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
83
83
  };
84
- const StyledImage = component => /*#__PURE__*/_styled(component, {
84
+ const Image = /*#__PURE__*/_styled("img", {
85
85
  target: "epmg9lb0"
86
86
  })("height:88px;width:88px;cursor:pointer;transition:transform 1s cubic-bezier(0.19, 1, 0.22, 1);&:hover,&:focus{", scaled, ";}", ({
87
87
  isHovered,
@@ -107,11 +107,11 @@ const CustomerSatisfaction = ({
107
107
  const isSelected = rating.value === value;
108
108
  const isHovered = rating.value === hoveredValue;
109
109
  const isOverfly = rating.value <= hoveredValue;
110
- const Image = StyledImage(isSelected || isOverfly || rating.value <= value ? rating.imgSelected : rating.imgNotSelected);
111
110
  return jsx(Image, {
112
111
  isHappy: isHappy,
113
112
  isHovered: isHovered,
114
113
  isSelected: isSelected,
114
+ src: isSelected || isOverfly || rating.value <= value ? rating.imgSelected : rating.imgNotSelected,
115
115
  onClick: () => {
116
116
  onChange(rating.value);
117
117
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultraviolet/plus",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "Ultraviolet Plus",
5
5
  "homepage": "https://github.com/scaleway/ultraviolet#readme",
6
6
  "repository": {
@@ -47,7 +47,7 @@
47
47
  "@types/react-dom": "18.2.18",
48
48
  "react": "18.2.0",
49
49
  "react-dom": "18.2.0",
50
- "@ultraviolet/icons": "2.7.7"
50
+ "@ultraviolet/icons": "2.8.0"
51
51
  },
52
52
  "dependencies": {
53
53
  "@uiw/codemirror-extensions-langs": "4.21.21",
@@ -56,7 +56,7 @@
56
56
  "react-flatten-children": "1.1.2",
57
57
  "react-intersection-observer": "9.5.3",
58
58
  "@ultraviolet/themes": "1.7.0",
59
- "@ultraviolet/ui": "1.31.0"
59
+ "@ultraviolet/ui": "1.31.1"
60
60
  },
61
61
  "scripts": {
62
62
  "build": "rollup -c ../../rollup.config.mjs",