allaw-ui 1.0.144 → 1.0.145

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.
@@ -6,7 +6,7 @@
6
6
  justify-content: space-between;
7
7
  align-items: center;
8
8
  height: 1.5rem;
9
- gap: 4rem;
9
+ gap: 2rem;
10
10
  padding-left: 0.7rem;
11
11
  }
12
12
 
@@ -8,9 +8,8 @@ var ProgressBar = function (_a) {
8
8
  var progressWidth = constrainedCurrentStep === 0 ? 0 : (constrainedCurrentStep / steps) * 100;
9
9
  var noIconsMargin = !startIcon && !endIcon ? "0px" : "0 10px";
10
10
  return (React.createElement("div", { className: "progress-bar-container" },
11
- startIcon && (React.createElement("div", { className: "progress-bar-icon-container" },
12
- React.createElement("button", { className: "progress-bar-chevron", onClick: onStartIconClick },
13
- React.createElement("i", { className: "allaw-icon-chevron-left" })))),
11
+ React.createElement("div", { className: "progress-bar-icon-container" }, startIcon && (React.createElement("button", { className: "progress-bar-chevron", onClick: onStartIconClick },
12
+ React.createElement("i", { className: "allaw-icon-chevron-left" })))),
14
13
  React.createElement("div", { className: "progress-bar-background ".concat(showProgressBar ? "" : "hidden-content"), style: {
15
14
  height: isWrapperProgressBar ? "6px" : "8px",
16
15
  width: startIcon ? "calc(100% - 32px)" : "100%",
@@ -1,9 +1,13 @@
1
1
  import React from "react";
2
2
  import "../../../styles/global.css";
3
3
  export interface SelectableListItemProps {
4
- label: string;
5
- column2?: string;
6
- column3?: string;
4
+ labels: {
5
+ label: string;
6
+ width?: string;
7
+ align?: string;
8
+ fontWeight?: "normal" | "bold";
9
+ color?: "mid-grey" | "dark-grey" | "noir" | "venom-grey-dark" | "actions-valid" | "actions-error";
10
+ }[];
7
11
  isActive: boolean;
8
12
  onClick: () => void;
9
13
  }
@@ -2,12 +2,22 @@ import React from "react";
2
2
  import styles from "./SelectableListItem.module.css";
3
3
  import "../../../styles/global.css";
4
4
  var SelectableListItem = function (_a) {
5
- var label = _a.label, column2 = _a.column2, column3 = _a.column3, isActive = _a.isActive, onClick = _a.onClick;
5
+ var labels = _a.labels, isActive = _a.isActive, onClick = _a.onClick;
6
6
  return (React.createElement("button", { className: "".concat(styles.selectableListItem, " ").concat(isActive ? styles.selectableListItemActive : ""), onClick: onClick },
7
- React.createElement("div", { className: styles.selectableListItemIcon }, isActive && React.createElement("span", { className: styles.selectableListItemIconInner })),
8
- React.createElement("span", { className: styles.selectableListItemLabel }, label),
9
- React.createElement("div", { className: styles.selectableListItemColumnsWrapper },
10
- column2 && (React.createElement("span", { className: styles.selectableListItemColumn2 }, column2)),
11
- column3 && (React.createElement("span", { className: styles.selectableListItemColumn3 }, column3)))));
7
+ React.createElement("span", { className: styles.selectableListItemIcon }, isActive && React.createElement("span", { className: styles.selectableListItemIconInner })),
8
+ React.createElement("div", { className: styles.selectableListItemLabels }, labels.map(function (label, index) {
9
+ var _a, _b;
10
+ return (React.createElement("span", { key: index, className: styles.selectableListItemLabel, style: {
11
+ width: ((_a = label.width) === null || _a === void 0 ? void 0 : _a.includes("%")) ? label.width : undefined,
12
+ minWidth: ((_b = label.width) === null || _b === void 0 ? void 0 : _b.includes("px")) ? label.width : undefined,
13
+ justifyContent: label.align === "start"
14
+ ? "flex-start"
15
+ : label.align === "end"
16
+ ? "flex-end"
17
+ : "center",
18
+ fontWeight: label.fontWeight === "bold" ? "bold" : "normal",
19
+ color: "var(--".concat(label.color, ", inherit)"),
20
+ } }, label.label));
21
+ }))));
12
22
  };
13
23
  export default SelectableListItem;
@@ -1,8 +1,7 @@
1
1
  .selectableListItem {
2
2
  display: flex;
3
- flex-direction: row;
4
3
  align-items: center;
5
- gap: 12px;
4
+ gap: 8px;
6
5
  border: none;
7
6
  background: none;
8
7
  cursor: pointer;
@@ -13,40 +12,6 @@
13
12
  width: 100%;
14
13
  }
15
14
 
16
- @media (max-width: 767px) {
17
- .selectableListItem {
18
- padding: 12px 16px;
19
- }
20
-
21
- .selectableListItemIcon {
22
- display: none;
23
- }
24
- }
25
-
26
- @media (max-width: 575px) {
27
- .selectableListItem {
28
- flex-direction: column;
29
- align-items: flex-start;
30
- padding: 12px;
31
- }
32
-
33
- .selectableListItemLabel {
34
- margin-bottom: 8px;
35
- }
36
-
37
- .selectableListItemColumnsWrapper {
38
- flex-direction: row;
39
- align-items: center;
40
- }
41
- }
42
-
43
- @media (max-width: 413px) {
44
- .selectableListItemColumnsWrapper {
45
- flex-direction: column;
46
- align-items: flex-start;
47
- }
48
- }
49
-
50
15
  .selectableListItem:hover {
51
16
  background-color: #e6edf5;
52
17
  }
@@ -68,12 +33,6 @@
68
33
  border: 1px solid #d1dce7;
69
34
  }
70
35
 
71
- @media (max-width: 767px) {
72
- .selectableListItemIcon {
73
- display: none;
74
- }
75
- }
76
-
77
36
  .selectableListItemActive .selectableListItemIcon {
78
37
  padding: 3px;
79
38
  border: 1px solid #d1dce7;
@@ -86,30 +45,13 @@
86
45
  background: #25beeb;
87
46
  }
88
47
 
89
- .selectableListItemLabel {
90
- flex-grow: 1;
91
- font-family: "Open Sans", sans-serif;
92
- font-size: 16px;
93
- font-style: normal;
94
- line-height: 1.2;
95
- display: -webkit-box;
96
- -webkit-box-orient: vertical;
97
- -webkit-line-clamp: 3;
98
- overflow: hidden;
99
- text-overflow: ellipsis;
100
- max-height: calc(16px * 1.2 * 3);
101
- text-align: left;
102
- }
103
-
104
- .selectableListItemColumnsWrapper {
48
+ .selectableListItemLabels {
105
49
  display: flex;
106
- gap: 12px;
50
+ flex-wrap: nowrap;
51
+ width: 100%;
107
52
  }
108
53
 
109
- .selectableListItemColumn2,
110
- .selectableListItemColumn3 {
111
- flex-shrink: 0;
112
- text-align: right;
54
+ .selectableListItemLabel {
113
55
  font-family: "Open Sans", sans-serif;
114
56
  font-size: 16px;
115
57
  font-style: normal;
@@ -117,27 +59,6 @@
117
59
  white-space: nowrap;
118
60
  overflow: hidden;
119
61
  text-overflow: ellipsis;
120
- }
121
-
122
- .selectableListItemColumn2 {
123
- color: var(--mid-grey, #728ea7);
124
- width: 80px;
125
- }
126
-
127
- @media (max-width: 575px) {
128
- .selectableListItemColumn2 {
129
- text-align: left;
130
- }
131
- }
132
-
133
- .selectableListItemColumn3 {
134
- color: var(--noir, #171e25);
135
- font-weight: 700;
136
- width: 80px;
137
- }
138
-
139
- @media (max-width: 413px) {
140
- .selectableListItemColumn3 {
141
- text-align: left;
142
- }
62
+ display: flex;
63
+ align-items: center;
143
64
  }
@@ -9,9 +9,13 @@ declare namespace _default {
9
9
  export let tags: string[];
10
10
  export let excludeStories: RegExp;
11
11
  export namespace args {
12
- let label: string;
13
- let column2: string;
14
- let column3: string;
12
+ let labels: {
13
+ label: string;
14
+ width: string;
15
+ align: string;
16
+ fontWeight: string;
17
+ color: string;
18
+ }[];
15
19
  let isActive: boolean;
16
20
  }
17
21
  export namespace parameters {
@@ -20,7 +20,29 @@ export default {
20
20
  component: SelectableListItem,
21
21
  tags: ["autodocs"],
22
22
  excludeStories: /.*Data$/,
23
- args: __assign(__assign({}, ActionsData), { label: "Consultation juridique personnalisée visant à analyser votre situation et à vous fournir des conseils adaptés à vos besoins. Cette prestation inclut l'étude des documents pertinents, une évaluation des solutions juridiques envisageables, et des recommandations pour défendre efficacement vos intérêts.", column2: "(35 min)", column3: "100 €", isActive: false }),
23
+ args: __assign(__assign({}, ActionsData), { labels: [
24
+ {
25
+ label: "Adoption",
26
+ width: "100%",
27
+ align: "start",
28
+ fontWeight: "normal",
29
+ color: "noir",
30
+ },
31
+ {
32
+ label: "(35 min)",
33
+ width: "100px",
34
+ align: "end",
35
+ fontWeight: "normal",
36
+ color: "mid-grey",
37
+ },
38
+ {
39
+ label: "100 €",
40
+ width: "80px",
41
+ align: "end",
42
+ fontWeight: "bold",
43
+ color: "noir",
44
+ },
45
+ ], isActive: false }),
24
46
  parameters: {
25
47
  backgrounds: {
26
48
  default: "light",
@@ -45,8 +67,28 @@ var Template = function (args) {
45
67
  export var Default = Template.bind({});
46
68
  export var Active = Template.bind({});
47
69
  Active.args = {
48
- label: "Adoption",
49
- column2: "(35 min)",
50
- column3: "100 €",
70
+ labels: [
71
+ {
72
+ label: "Adoption",
73
+ width: "100%",
74
+ align: "start",
75
+ fontWeight: "normal",
76
+ color: "noir",
77
+ },
78
+ {
79
+ label: "(35 min)",
80
+ width: "100px",
81
+ align: "end",
82
+ fontWeight: "normal",
83
+ color: "mid-grey",
84
+ },
85
+ {
86
+ label: "100 €",
87
+ width: "80px",
88
+ align: "end",
89
+ fontWeight: "bold",
90
+ color: "noir",
91
+ },
92
+ ],
51
93
  isActive: true,
52
94
  };
@@ -81,6 +81,9 @@
81
81
 
82
82
  .stepper-content {
83
83
  width: 100%;
84
+ max-height: 100%;
85
+ height: 90%;
86
+ overflow-y: scroll;
84
87
  display: flex;
85
88
  justify-content: center;
86
89
  align-items: center;
@@ -90,3 +93,14 @@
90
93
  line-height: 24px;
91
94
  letter-spacing: 0em;
92
95
  }
96
+
97
+
98
+ @media (max-width: 800px) {
99
+ .stepper-container {
100
+ height: 95vh;
101
+ position: fixed;
102
+ bottom: 0;
103
+ justify-content: start;
104
+ padding: 2rem;
105
+ }
106
+ }
@@ -7,9 +7,9 @@ declare const meta: {
7
7
  layout: string;
8
8
  };
9
9
  args: {
10
- onLogin: import("@vitest/spy").Mock<(...args: any[]) => any>;
11
- onLogout: import("@vitest/spy").Mock<(...args: any[]) => any>;
12
- onCreateAccount: import("@vitest/spy").Mock<(...args: any[]) => any>;
10
+ onLogin: import("@vitest/spy").Mock<[], void>;
11
+ onLogout: import("@vitest/spy").Mock<[], void>;
12
+ onCreateAccount: import("@vitest/spy").Mock<[], void>;
13
13
  };
14
14
  };
15
15
  export default meta;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allaw-ui",
3
- "version": "1.0.144",
3
+ "version": "1.0.145",
4
4
  "description": "Composants UI pour l'application Allaw",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",