allaw-ui 5.3.8 → 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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "allaw-ui",
|
|
3
|
-
"version": "5.
|
|
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",
|
|
@@ -44,7 +44,6 @@
|
|
|
44
44
|
"@dnd-kit/modifiers": "^9.0.0",
|
|
45
45
|
"@dnd-kit/sortable": "^10.0.0",
|
|
46
46
|
"date-fns": "^4.1.0",
|
|
47
|
-
"next": "14.2.5",
|
|
48
47
|
"react": "^17.0.0 || ^18.0.0",
|
|
49
48
|
"react-datepicker": "^7.5.0",
|
|
50
49
|
"react-dom": "^17.0.0 || ^18.0.0",
|
|
@@ -71,7 +70,7 @@
|
|
|
71
70
|
"cloc": "^2.0.0-cloc",
|
|
72
71
|
"css-loader": "^7.1.2",
|
|
73
72
|
"eslint": "^8",
|
|
74
|
-
"eslint-config-next": "
|
|
73
|
+
"eslint-config-next": "15.4.8",
|
|
75
74
|
"eslint-plugin-storybook": "^0.11.1",
|
|
76
75
|
"storybook": "^8.4.6",
|
|
77
76
|
"storybook-css-modules": "^1.0.8",
|