rbro-tat-uds 2.2.13 → 2.2.15

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.
Files changed (34) hide show
  1. package/build/cjs/assets/icons/face-neutral.svg.cjs +39 -0
  2. package/build/cjs/assets/icons/face-sad.svg.cjs +39 -0
  3. package/build/cjs/components/Button/Button.cjs +2 -0
  4. package/build/cjs/components/FeedbackCard/FeedbackCard.cjs +80 -0
  5. package/build/cjs/components/FeedbackCard/index.cjs +12 -0
  6. package/build/cjs/components/Icon/IconsList.cjs +5 -1
  7. package/build/cjs/components/IconButton/IconButton.cjs +2 -0
  8. package/build/cjs/components/PageMessage/PageMessage.cjs +2 -0
  9. package/build/cjs/components/TextInput/TextInput.cjs +2 -0
  10. package/build/cjs/components/Textarea/Textarea.cjs +64 -0
  11. package/build/cjs/components/Textarea/index.cjs +12 -0
  12. package/build/cjs/components/index.cjs +4 -0
  13. package/build/cjs/index.cjs +810 -659
  14. package/build/esm/assets/icons/face-neutral.svg.js +18 -0
  15. package/build/esm/assets/icons/face-sad.svg.js +18 -0
  16. package/build/esm/components/Button/Button.js +2 -0
  17. package/build/esm/components/FeedbackCard/FeedbackCard.js +76 -0
  18. package/build/esm/components/FeedbackCard/index.js +8 -0
  19. package/build/esm/components/Icon/IconsList.js +5 -1
  20. package/build/esm/components/IconButton/IconButton.js +2 -0
  21. package/build/esm/components/PageMessage/PageMessage.js +2 -0
  22. package/build/esm/components/TextInput/TextInput.js +2 -0
  23. package/build/esm/components/Textarea/Textarea.js +60 -0
  24. package/build/esm/components/Textarea/index.js +8 -0
  25. package/build/esm/components/index.js +2 -0
  26. package/build/esm/index.js +809 -660
  27. package/build/types/components/FeedbackCard/FeedbackCard.d.ts +11 -0
  28. package/build/types/components/FeedbackCard/index.d.ts +6 -0
  29. package/build/types/components/Icon/Icon.types.d.ts +1 -1
  30. package/build/types/components/Icon/IconsList.d.ts +2 -0
  31. package/build/types/components/Textarea/Textarea.d.ts +16 -0
  32. package/build/types/components/Textarea/index.d.ts +6 -0
  33. package/build/types/index.d.ts +2 -0
  34. package/package.json +1 -1
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+
3
+ var _path, _path2;
4
+ 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); }
5
+ var SvgFaceNeutral = function SvgFaceNeutral(props) {
6
+ return /*#__PURE__*/React.createElement("svg", _extends({
7
+ xmlns: "http://www.w3.org/2000/svg",
8
+ viewBox: "0 0 24 24"
9
+ }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
10
+ d: "M15.5 12a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3M10 10.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M8 14v2h8v-2z"
11
+ })), _path2 || (_path2 = /*#__PURE__*/React.createElement("path", {
12
+ fillRule: "evenodd",
13
+ d: "M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2M4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0",
14
+ clipRule: "evenodd"
15
+ })));
16
+ };
17
+
18
+ export { SvgFaceNeutral as default };
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+
3
+ var _path, _path2;
4
+ 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); }
5
+ var SvgFaceSad = function SvgFaceSad(props) {
6
+ return /*#__PURE__*/React.createElement("svg", _extends({
7
+ xmlns: "http://www.w3.org/2000/svg",
8
+ viewBox: "0 0 24 24"
9
+ }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
10
+ d: "M10 10.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M15.5 12a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3M12 16a3.99 3.99 0 0 0-2.94 1.287L7.59 15.93A5.99 5.99 0 0 1 12 14c1.743 0 3.313.745 4.408 1.93l-1.469 1.357A3.99 3.99 0 0 0 11.999 16"
11
+ })), _path2 || (_path2 = /*#__PURE__*/React.createElement("path", {
12
+ fillRule: "evenodd",
13
+ d: "M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12m10-8a8 8 0 1 0 0 16 8 8 0 0 0 0-16",
14
+ clipRule: "evenodd"
15
+ })));
16
+ };
17
+
18
+ export { SvgFaceSad as default };
@@ -149,6 +149,8 @@ import '../../assets/icons/star-reward.svg.js';
149
149
  import '../../assets/icons/brand-logo.svg.js';
150
150
  import '../../assets/icons/house-wap.svg.js';
151
151
  import '../../assets/icons/bulb.svg.js';
152
+ import '../../assets/icons/face-neutral.svg.js';
153
+ import '../../assets/icons/face-sad.svg.js';
152
154
  import Icon from '../Icon/Icon.js';
153
155
  import Spinner from '../Spinner/Spinner.js';
154
156
  import { colors } from '../../utils';
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ "use client";
3
+
4
+ import { jsxs, jsx } from 'react/jsx-runtime';
5
+ import 'react';
6
+ import styled, { css } from 'styled-components';
7
+ import { colors } from '../../utils';
8
+ import Icon from '../Icon/Icon.js';
9
+
10
+ const _constraint_colors = {
11
+ "face-happy": colors.success_500,
12
+ "face-neutral": colors.warning_500,
13
+ "face-sad": colors.danger_500
14
+ };
15
+ const FeedbackCardStyled = styled.button`
16
+ border: none;
17
+ cursor: ${({ $feedbackView }) => $feedbackView ? "default" : "pointer"};
18
+ display: flex;
19
+ flex-direction: column;
20
+ gap: 4px;
21
+ padding: ${({ $feedbackView }) => $feedbackView ? "18px 15px" : "18px 12px"};
22
+ justify-content: center;
23
+ align-items: center;
24
+ background-color: ${({ $selected, $faceIcon }) => $selected ? _constraint_colors[$faceIcon] : colors.white};
25
+ height: 90px;
26
+ border-radius: ${({ $feedbackView }) => $feedbackView ? "4px" : "0px"};
27
+
28
+ & > span {
29
+ font-size: 14px;
30
+ font-weight: 500;
31
+ color: ${({ $selected }) => $selected ? colors.white : colors.gray_950};
32
+ }
33
+
34
+ ${({ $feedbackView }) => !$feedbackView && css`
35
+ &:hover {
36
+ background-color: ${({ $selected, $faceIcon }) => $selected ? _constraint_colors[$faceIcon] : colors.info_100};
37
+ }
38
+ `}
39
+ `;
40
+ const FeedbackCard = ({
41
+ rate = 1,
42
+ feedbackView = false,
43
+ selected = false,
44
+ ...rest
45
+ }) => {
46
+ const getFaceIcon = (rate2) => {
47
+ if (rate2 === 0 || rate2 === 1 || rate2 === 2 || rate2 === 3 || rate2 === 4 || rate2 === 5 || rate2 === 6)
48
+ return "face-sad";
49
+ if (rate2 === 7 || rate2 === 8) return "face-neutral";
50
+ if (rate2 === 9 || rate2 === 10) return "face-happy";
51
+ return "face-neutral";
52
+ };
53
+ return /* @__PURE__ */ jsxs(
54
+ FeedbackCardStyled,
55
+ {
56
+ type: "button",
57
+ $selected: feedbackView ? true : selected,
58
+ $faceIcon: getFaceIcon(rate),
59
+ $feedbackView: feedbackView,
60
+ ...rest,
61
+ children: [
62
+ /* @__PURE__ */ jsx(
63
+ Icon,
64
+ {
65
+ icon: getFaceIcon(rate),
66
+ color: feedbackView ? colors.white : selected ? colors.white : getFaceIcon(rate) === "face-happy" ? colors.success_500 : getFaceIcon(rate) === "face-neutral" ? colors.warning_500 : colors.danger_500,
67
+ size: 32
68
+ }
69
+ ),
70
+ /* @__PURE__ */ jsx("span", { children: rate })
71
+ ]
72
+ }
73
+ );
74
+ };
75
+
76
+ export { FeedbackCard as default };
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ "use client";
3
+
4
+ import FeedbackCard from './FeedbackCard.js';
5
+
6
+
7
+
8
+ export { FeedbackCard as default };
@@ -146,6 +146,8 @@ import StarRewardIcon from '../../assets/icons/star-reward.svg.js';
146
146
  import BrandLogoIcon from '../../assets/icons/brand-logo.svg.js';
147
147
  import HouseWapIcon from '../../assets/icons/house-wap.svg.js';
148
148
  import BulbIcon from '../../assets/icons/bulb.svg.js';
149
+ import FaceNeutralIcon from '../../assets/icons/face-neutral.svg.js';
150
+ import FaceSadIcon from '../../assets/icons/face-sad.svg.js';
149
151
 
150
152
  const IconsList = {
151
153
  asterix: AsterixIcon,
@@ -292,7 +294,9 @@ const IconsList = {
292
294
  "star-reward": StarRewardIcon,
293
295
  "brand-logo": BrandLogoIcon,
294
296
  "house-wap": HouseWapIcon,
295
- bulb: BulbIcon
297
+ bulb: BulbIcon,
298
+ "face-neutral": FaceNeutralIcon,
299
+ "face-sad": FaceSadIcon
296
300
  };
297
301
 
298
302
  export { IconsList as default };
@@ -148,6 +148,8 @@ import '../../assets/icons/star-reward.svg.js';
148
148
  import '../../assets/icons/brand-logo.svg.js';
149
149
  import '../../assets/icons/house-wap.svg.js';
150
150
  import '../../assets/icons/bulb.svg.js';
151
+ import '../../assets/icons/face-neutral.svg.js';
152
+ import '../../assets/icons/face-sad.svg.js';
151
153
  import styled, { css } from 'styled-components';
152
154
  import Icon from '../Icon/Icon.js';
153
155
  import Spinner from '../Spinner/Spinner.js';
@@ -148,6 +148,8 @@ import '../../assets/icons/star-reward.svg.js';
148
148
  import '../../assets/icons/brand-logo.svg.js';
149
149
  import '../../assets/icons/house-wap.svg.js';
150
150
  import '../../assets/icons/bulb.svg.js';
151
+ import '../../assets/icons/face-neutral.svg.js';
152
+ import '../../assets/icons/face-sad.svg.js';
151
153
  import styled from 'styled-components';
152
154
  import Icon from '../Icon/Icon.js';
153
155
  import { colors } from '../../utils';
@@ -149,6 +149,8 @@ import '../../assets/icons/star-reward.svg.js';
149
149
  import '../../assets/icons/brand-logo.svg.js';
150
150
  import '../../assets/icons/house-wap.svg.js';
151
151
  import '../../assets/icons/bulb.svg.js';
152
+ import '../../assets/icons/face-neutral.svg.js';
153
+ import '../../assets/icons/face-sad.svg.js';
152
154
  import { createPortal } from 'react-dom';
153
155
  import Icon from '../Icon/Icon.js';
154
156
  import Numpad from '../Numpad/Numpad.js';
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ "use client";
3
+
4
+ import { jsx } from 'react/jsx-runtime';
5
+ import React__default from 'react';
6
+ import styled from 'styled-components';
7
+ import { colors } from '../../utils';
8
+
9
+ const TextareaStyled = styled.textarea`
10
+ box-sizing: border-box;
11
+ background-color: ${({ $intent, $disabled }) => $disabled ? colors.gray_30 : $intent === "default_white" ? colors.white : colors.gray_100};
12
+ padding: 8px 12px;
13
+ flex: 1;
14
+ border-radius: 8px;
15
+ width: 100%;
16
+ color: ${(props) => props.disabled ? colors.gray_500 : colors.gray_950};
17
+ font-weight: 400;
18
+ outline: none;
19
+ border: none;
20
+ font-family: Amalia, sans-serif;
21
+ min-height: ${({ $size, $minHeight }) => $minHeight ? $minHeight : $size === "medium" ? "80px" : $size === "large" ? "120px" : "60px"};
22
+ font-size: ${(props) => props.$size && typeof props.$size === "string" && (props.$size === "medium" ? "16px" : props.$size === "large" ? "18px" : "14px")};
23
+ text-align: left;
24
+ resize: ${({ $resize }) => $resize};
25
+
26
+ &::placeholder {
27
+ color: ${(props) => props.disabled ? colors.gray_500 : colors.gray_600};
28
+ }
29
+ `;
30
+ const Textarea = React__default.forwardRef(
31
+ ({
32
+ id,
33
+ name,
34
+ value,
35
+ setValue,
36
+ size = "medium",
37
+ intent = "default",
38
+ resize = "none",
39
+ minHeight = "",
40
+ ...props
41
+ }, ref) => {
42
+ return /* @__PURE__ */ jsx(
43
+ TextareaStyled,
44
+ {
45
+ ref,
46
+ name,
47
+ id,
48
+ $size: size,
49
+ $intent: intent,
50
+ $disabled: props.disabled,
51
+ $resize: resize,
52
+ $minHeight: minHeight,
53
+ ...props
54
+ }
55
+ );
56
+ }
57
+ );
58
+ Textarea.displayName = "Textarea";
59
+
60
+ export { Textarea as default };
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ "use client";
3
+
4
+ import Textarea from './Textarea.js';
5
+
6
+
7
+
8
+ export { Textarea as default };
@@ -91,3 +91,5 @@ export { default as GraficContributieUnitlinked } from './GraficContributieUnitl
91
91
  export { default as SelectionAppCard } from './SelectionAppCard/SelectionAppCard.js';
92
92
  export { default as Accordion } from './Accordion/Accordion.js';
93
93
  export { default as PropunereAsigurareLocuinta } from './PropunereAsigurareLocuinta/PropunereAsigurareLocuinta.js';
94
+ export { default as Textarea } from './Textarea/Textarea.js';
95
+ export { default as FeedbackCard } from './FeedbackCard/FeedbackCard.js';