allaw-ui 5.3.9 → 5.4.1

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.
@@ -9,6 +9,7 @@ export interface SelectableListItemProps {
9
9
  onClick: () => void;
10
10
  icon?: string;
11
11
  testIdKey?: string | number;
12
+ durationSize?: "standard" | "large";
12
13
  }
13
14
  declare const SelectableListItem: React.FC<SelectableListItemProps>;
14
15
  export default SelectableListItem;
@@ -4,7 +4,7 @@ import "../../../styles/icons.css";
4
4
  import { slugify } from "../../../utils/utils";
5
5
  import styles from "./SelectableListItem.module.css";
6
6
  var SelectableListItem = function (_a) {
7
- var label = _a.label, duration = _a.duration, price = _a.price, isActive = _a.isActive, onClick = _a.onClick, icon = _a.icon, testIdKey = _a.testIdKey;
7
+ var label = _a.label, duration = _a.duration, price = _a.price, isActive = _a.isActive, onClick = _a.onClick, icon = _a.icon, testIdKey = _a.testIdKey, _b = _a.durationSize, durationSize = _b === void 0 ? "standard" : _b;
8
8
  var hasIcon = icon && icon.length > 0;
9
9
  var hasContent = (duration && duration.trim()) || (price && price.trim());
10
10
  return (React.createElement("button", { className: "".concat(styles.container, " ").concat(isActive ? styles.active : "", " ").concat(hasIcon ? styles.withIcon : "", " ").concat(!hasContent ? styles.noContent : ""), onClick: onClick, "data-testid": "item-".concat(testIdKey !== undefined ? testIdKey : slugify(label)) },
@@ -14,7 +14,8 @@ var SelectableListItem = function (_a) {
14
14
  React.createElement("div", { className: styles.content },
15
15
  React.createElement("span", { className: styles.label }, label)),
16
16
  hasContent && (React.createElement("div", { className: styles.columnsWrapper },
17
- duration && React.createElement("span", { className: styles.duration }, duration),
17
+ duration && (React.createElement("span", { className: "".concat(styles.duration, " ").concat(durationSize === "large" ? styles.durationLarge : "") }, duration)),
18
18
  price && React.createElement("span", { className: styles.price }, price)))));
19
19
  };
20
+ // test
20
21
  export default SelectableListItem;
@@ -105,6 +105,10 @@
105
105
  width: 80px;
106
106
  }
107
107
 
108
+ .durationLarge {
109
+ width: 110px;
110
+ }
111
+
108
112
  .price {
109
113
  color: var(--noir, #171e25);
110
114
  font-weight: 700;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allaw-ui",
3
- "version": "5.3.9",
3
+ "version": "5.4.1",
4
4
  "description": "Composants UI pour l'application Allaw",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",