cozy-ui-plus 14.0.8 → 14.1.0
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/CHANGELOG.md +10 -0
- package/dist/AppTile/index.js +3 -3
- package/dist/ShortcutTile/index.js +2 -2
- package/dist/Tile/index.js +124 -0
- package/dist/src/Contacts/AddModal/ContactForm/TextFieldPhone/ButtonBase.d.ts +1 -1
- package/dist/src/Tile/index.d.ts +68 -0
- package/dist/stylesheet.css +122 -0
- package/package.json +4 -4
- package/src/AppTile/index.jsx +4 -4
- package/src/ShortcutTile/index.tsx +1 -1
- package/src/Tile/index.jsx +99 -0
- package/src/Tile/styles.styl +122 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [14.1.0](https://github.com/cozy/cozy-libs/compare/cozy-ui-plus@14.0.9...cozy-ui-plus@14.1.0) (2026-10-26)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **cozy-ui-plus:** Add Tile component ([fb7c819](https://github.com/cozy/cozy-libs/commit/fb7c81950bd57afbee2fe9b6d585b248d5cf2918))
|
|
11
|
+
|
|
12
|
+
## [14.0.9](https://github.com/cozy/cozy-libs/compare/cozy-ui-plus@14.0.8...cozy-ui-plus@14.0.9) (2026-10-26)
|
|
13
|
+
|
|
14
|
+
**Note:** Version bump only for package cozy-ui-plus
|
|
15
|
+
|
|
6
16
|
## [14.0.8](https://github.com/cozy/cozy-libs/compare/cozy-ui-plus@14.0.7...cozy-ui-plus@14.0.8) (2026-10-23)
|
|
7
17
|
|
|
8
18
|
**Note:** Version bump only for package cozy-ui-plus
|
package/dist/AppTile/index.js
CHANGED
|
@@ -11,18 +11,18 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
11
11
|
|
|
12
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
13
|
|
|
14
|
-
var _twakeIcons = require("@linagora/twake-icons");
|
|
15
|
-
|
|
16
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
15
|
|
|
18
16
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
19
17
|
|
|
20
18
|
var _react = _interopRequireDefault(require("react"));
|
|
21
19
|
|
|
22
|
-
var
|
|
20
|
+
var _twakeIcons = require("@linagora/twake-icons");
|
|
23
21
|
|
|
24
22
|
var _twakeI18n = require("twake-i18n");
|
|
25
23
|
|
|
24
|
+
var _Tile = _interopRequireWildcard(require("../Tile"));
|
|
25
|
+
|
|
26
26
|
var _helpers = require("./helpers");
|
|
27
27
|
|
|
28
28
|
var _AppIcon = _interopRequireDefault(require("../AppIcon"));
|
|
@@ -11,12 +11,12 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _helpers = require("cozy-ui/transpiled/react/Avatar/helpers");
|
|
13
13
|
|
|
14
|
-
var _Tile = require("cozy-ui/transpiled/react/Tile");
|
|
15
|
-
|
|
16
14
|
var _Typography = _interopRequireDefault(require("cozy-ui/transpiled/react/Typography"));
|
|
17
15
|
|
|
18
16
|
var _styles = require("cozy-ui/transpiled/react/styles");
|
|
19
17
|
|
|
18
|
+
var _Tile = require("../Tile");
|
|
19
|
+
|
|
20
20
|
var styles = {
|
|
21
21
|
"AppTile-icon": "styles__AppTile-icon___33KQ3",
|
|
22
22
|
"AppTile-icon--default": "styles__AppTile-icon--default___2wl2V",
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = exports.TileTitle = exports.TileSubtitle = exports.TileIcon = exports.TileFooter = exports.TileDescription = void 0;
|
|
9
|
+
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
12
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
|
+
|
|
14
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
15
|
+
|
|
16
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
|
+
|
|
18
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
19
|
+
|
|
20
|
+
var _react = _interopRequireDefault(require("react"));
|
|
21
|
+
|
|
22
|
+
var _Typography = _interopRequireDefault(require("cozy-ui/transpiled/react/Typography"));
|
|
23
|
+
|
|
24
|
+
var _excluded = ["children", "className", "tag", "isSecondary"];
|
|
25
|
+
var styles = {
|
|
26
|
+
"Tile": "styles__Tile___4gZAS",
|
|
27
|
+
"Tile-secondary": "styles__Tile-secondary___2yIqI",
|
|
28
|
+
"Tile-icon-wrapper": "styles__Tile-icon-wrapper___10WEt",
|
|
29
|
+
"Tile-desc": "styles__Tile-desc___22kdp",
|
|
30
|
+
"Tile-title": "styles__Tile-title___dAs3x",
|
|
31
|
+
"Tile-developer": "styles__Tile-developer___2Vz0_",
|
|
32
|
+
"Tile-status": "styles__Tile-status___TrJrd",
|
|
33
|
+
"Tile-title-multiline": "styles__Tile-title-multiline___qKg6k",
|
|
34
|
+
"Tile-status-accent": "styles__Tile-status-accent___G9cZV"
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
var Tile = function Tile(_ref) {
|
|
38
|
+
var children = _ref.children,
|
|
39
|
+
className = _ref.className,
|
|
40
|
+
Tag = _ref.tag,
|
|
41
|
+
isSecondary = _ref.isSecondary,
|
|
42
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
43
|
+
return /*#__PURE__*/_react.default.createElement(Tag, (0, _extends2.default)({
|
|
44
|
+
className: (0, _classnames.default)(styles.Tile, (0, _defineProperty2.default)({}, styles['Tile-secondary'], isSecondary), className)
|
|
45
|
+
}, props), children);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
var TileDescription = function TileDescription(_ref2) {
|
|
49
|
+
var children = _ref2.children,
|
|
50
|
+
className = _ref2.className;
|
|
51
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
52
|
+
className: (0, _classnames.default)(styles['Tile-desc'], className)
|
|
53
|
+
}, children);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
exports.TileDescription = TileDescription;
|
|
57
|
+
|
|
58
|
+
var TileTitle = function TileTitle(_ref3) {
|
|
59
|
+
var children = _ref3.children,
|
|
60
|
+
className = _ref3.className,
|
|
61
|
+
isMultiline = _ref3.isMultiline;
|
|
62
|
+
return /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
63
|
+
variant: "h6",
|
|
64
|
+
className: (0, _classnames.default)(styles['Tile-title'], (0, _defineProperty2.default)({}, styles['Tile-title-multiline'], isMultiline), className)
|
|
65
|
+
}, children);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
exports.TileTitle = TileTitle;
|
|
69
|
+
|
|
70
|
+
var TileSubtitle = function TileSubtitle(_ref4) {
|
|
71
|
+
var children = _ref4.children;
|
|
72
|
+
return /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
73
|
+
variant: "caption",
|
|
74
|
+
className: styles['Tile-developer']
|
|
75
|
+
}, children);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
exports.TileSubtitle = TileSubtitle;
|
|
79
|
+
|
|
80
|
+
var TileFooter = function TileFooter(_ref5) {
|
|
81
|
+
var children = _ref5.children,
|
|
82
|
+
className = _ref5.className,
|
|
83
|
+
isAccent = _ref5.isAccent;
|
|
84
|
+
return /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
85
|
+
variant: "caption",
|
|
86
|
+
className: (0, _classnames.default)(styles['Tile-status'], (0, _defineProperty2.default)({}, styles['Tile-status-accent'], isAccent), className)
|
|
87
|
+
}, children);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
exports.TileFooter = TileFooter;
|
|
91
|
+
|
|
92
|
+
var TileIcon = function TileIcon(_ref6) {
|
|
93
|
+
var children = _ref6.children;
|
|
94
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
95
|
+
className: styles['Tile-icon-wrapper']
|
|
96
|
+
}, children);
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
exports.TileIcon = TileIcon;
|
|
100
|
+
TileTitle.propTypes = {
|
|
101
|
+
className: _propTypes.default.string,
|
|
102
|
+
isMultiline: _propTypes.default.bool
|
|
103
|
+
};
|
|
104
|
+
TileTitle.defaultProps = {
|
|
105
|
+
isMultiline: false
|
|
106
|
+
};
|
|
107
|
+
TileFooter.propTypes = {
|
|
108
|
+
className: _propTypes.default.string,
|
|
109
|
+
isAccent: _propTypes.default.bool
|
|
110
|
+
};
|
|
111
|
+
TileFooter.defaultProps = {
|
|
112
|
+
isAccent: false
|
|
113
|
+
};
|
|
114
|
+
Tile.propTypes = {
|
|
115
|
+
className: _propTypes.default.string,
|
|
116
|
+
isSecondary: _propTypes.default.bool,
|
|
117
|
+
tag: _propTypes.default.string
|
|
118
|
+
};
|
|
119
|
+
Tile.defaultProps = {
|
|
120
|
+
isSecondary: false,
|
|
121
|
+
tag: 'div'
|
|
122
|
+
};
|
|
123
|
+
var _default = Tile;
|
|
124
|
+
exports.default = _default;
|
|
@@ -13,5 +13,5 @@ declare const _default: import("react").ComponentType<Pick<{
|
|
|
13
13
|
TouchRippleProps?: Partial<import("@material-ui/core/ButtonBase/TouchRipple").TouchRippleProps>;
|
|
14
14
|
} & import("@material-ui/core/OverridableComponent").CommonProps<import("@material-ui/core").ExtendButtonBaseTypeMap<import("@material-ui/core").ButtonBaseTypeMap<{}, "button">>> & Pick<Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement>> & {
|
|
15
15
|
ref?: import("react").Ref<HTMLButtonElement>;
|
|
16
|
-
}, "name" | "
|
|
16
|
+
}, "name" | "ref" | "form" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "type" | "value" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget">, "name" | "children" | "className" | "ref" | "form" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "disabled" | "type" | "value" | "innerRef" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "action" | "buttonRef" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "onFocusVisible" | "TouchRippleProps"> & import("@material-ui/styles/withStyles/withStyles").StyledComponentProps<"root">>;
|
|
17
17
|
export default _default;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export function TileDescription({ children, className }: {
|
|
2
|
+
children: any;
|
|
3
|
+
className: any;
|
|
4
|
+
}): JSX.Element;
|
|
5
|
+
export function TileTitle({ children, className, isMultiline }: {
|
|
6
|
+
children: any;
|
|
7
|
+
className: any;
|
|
8
|
+
isMultiline: any;
|
|
9
|
+
}): JSX.Element;
|
|
10
|
+
export namespace TileTitle {
|
|
11
|
+
namespace propTypes {
|
|
12
|
+
let className: PropTypes.Requireable<string>;
|
|
13
|
+
let isMultiline: PropTypes.Requireable<boolean>;
|
|
14
|
+
}
|
|
15
|
+
namespace defaultProps {
|
|
16
|
+
let isMultiline_1: boolean;
|
|
17
|
+
export { isMultiline_1 as isMultiline };
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export function TileSubtitle({ children }: {
|
|
21
|
+
children: any;
|
|
22
|
+
}): JSX.Element;
|
|
23
|
+
export function TileFooter({ children, className, isAccent }: {
|
|
24
|
+
children: any;
|
|
25
|
+
className: any;
|
|
26
|
+
isAccent: any;
|
|
27
|
+
}): JSX.Element;
|
|
28
|
+
export namespace TileFooter {
|
|
29
|
+
export namespace propTypes_1 {
|
|
30
|
+
let className_1: PropTypes.Requireable<string>;
|
|
31
|
+
export { className_1 as className };
|
|
32
|
+
export let isAccent: PropTypes.Requireable<boolean>;
|
|
33
|
+
}
|
|
34
|
+
export { propTypes_1 as propTypes };
|
|
35
|
+
export namespace defaultProps_1 {
|
|
36
|
+
let isAccent_1: boolean;
|
|
37
|
+
export { isAccent_1 as isAccent };
|
|
38
|
+
}
|
|
39
|
+
export { defaultProps_1 as defaultProps };
|
|
40
|
+
}
|
|
41
|
+
export function TileIcon({ children }: {
|
|
42
|
+
children: any;
|
|
43
|
+
}): JSX.Element;
|
|
44
|
+
export default Tile;
|
|
45
|
+
import PropTypes from 'prop-types';
|
|
46
|
+
declare function Tile({ children, className, tag: Tag, isSecondary, ...props }: {
|
|
47
|
+
[x: string]: any;
|
|
48
|
+
children: any;
|
|
49
|
+
className: any;
|
|
50
|
+
tag: any;
|
|
51
|
+
isSecondary: any;
|
|
52
|
+
}): JSX.Element;
|
|
53
|
+
declare namespace Tile {
|
|
54
|
+
export namespace propTypes_2 {
|
|
55
|
+
let className_2: PropTypes.Requireable<string>;
|
|
56
|
+
export { className_2 as className };
|
|
57
|
+
export let isSecondary: PropTypes.Requireable<boolean>;
|
|
58
|
+
export let tag: PropTypes.Requireable<string>;
|
|
59
|
+
}
|
|
60
|
+
export { propTypes_2 as propTypes };
|
|
61
|
+
export namespace defaultProps_2 {
|
|
62
|
+
let isSecondary_1: boolean;
|
|
63
|
+
export { isSecondary_1 as isSecondary };
|
|
64
|
+
let tag_1: string;
|
|
65
|
+
export { tag_1 as tag };
|
|
66
|
+
}
|
|
67
|
+
export { defaultProps_2 as defaultProps };
|
|
68
|
+
}
|
package/dist/stylesheet.css
CHANGED
|
@@ -637,3 +637,125 @@ iframe {
|
|
|
637
637
|
background-color: transparent;
|
|
638
638
|
}
|
|
639
639
|
}
|
|
640
|
+
/* imported from styles.styl */
|
|
641
|
+
|
|
642
|
+
.styles__Tile___4gZAS {
|
|
643
|
+
box-sizing: border-box;
|
|
644
|
+
position: relative;
|
|
645
|
+
display: flex;
|
|
646
|
+
flex-direction: column;
|
|
647
|
+
flex: 0 0 8.75rem;
|
|
648
|
+
width: 8.75rem;
|
|
649
|
+
height: 8.75rem;
|
|
650
|
+
align-items: center;
|
|
651
|
+
background: var(--paperBackgroundColor);
|
|
652
|
+
border-radius: 4px;
|
|
653
|
+
border: solid 1px var(--dividerColor);
|
|
654
|
+
padding: 0.375rem;
|
|
655
|
+
margin-bottom: 1rem;
|
|
656
|
+
margin-right: 0.75rem;
|
|
657
|
+
overflow: hidden;
|
|
658
|
+
transition: 0.15s ease all;
|
|
659
|
+
}
|
|
660
|
+
.styles__Tile___4gZAS.styles__Tile-secondary___2yIqI {
|
|
661
|
+
background: var(--contrastBackgroundColor);
|
|
662
|
+
border-color: var(--contrastBackgroundColor);
|
|
663
|
+
}
|
|
664
|
+
.styles__Tile___4gZAS:hover,
|
|
665
|
+
.styles__Tile___4gZAS:active,
|
|
666
|
+
.styles__Tile___4gZAS:focus {
|
|
667
|
+
box-shadow: 0 4px 12px 0 rgba(0,0,0,0.08);
|
|
668
|
+
cursor: pointer;
|
|
669
|
+
transform: scale(1.1);
|
|
670
|
+
}
|
|
671
|
+
@media (max-width: 48rem) {
|
|
672
|
+
.styles__Tile___4gZAS {
|
|
673
|
+
flex-basis: 100%;
|
|
674
|
+
flex-direction: row;
|
|
675
|
+
height: 3.75rem;
|
|
676
|
+
justify-content: flex-start;
|
|
677
|
+
margin-right: 0.5rem;
|
|
678
|
+
margin-bottom: 0.5rem;
|
|
679
|
+
padding-left: 0.5rem;
|
|
680
|
+
}
|
|
681
|
+
.styles__Tile___4gZAS:hover,
|
|
682
|
+
.styles__Tile___4gZAS:active,
|
|
683
|
+
.styles__Tile___4gZAS:focus {
|
|
684
|
+
transform: scale(1.01);
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
.styles__Tile-icon-wrapper___10WEt {
|
|
688
|
+
margin-top: 0.25rem;
|
|
689
|
+
margin-bottom: 0.25rem;
|
|
690
|
+
width: 3rem;
|
|
691
|
+
height: 3rem;
|
|
692
|
+
}
|
|
693
|
+
.styles__Tile-desc___22kdp {
|
|
694
|
+
display: flex;
|
|
695
|
+
flex-direction: column;
|
|
696
|
+
justify-content: flex-start;
|
|
697
|
+
align-items: center;
|
|
698
|
+
margin-top: 0.5rem;
|
|
699
|
+
text-align: center;
|
|
700
|
+
max-width: 100%;
|
|
701
|
+
}
|
|
702
|
+
.styles__Tile-title___dAs3x,
|
|
703
|
+
.styles__Tile-developer___2Vz0_,
|
|
704
|
+
.styles__Tile-status___TrJrd {
|
|
705
|
+
display: block;
|
|
706
|
+
margin: 0;
|
|
707
|
+
text-overflow: ellipsis;
|
|
708
|
+
white-space: nowrap;
|
|
709
|
+
overflow: hidden;
|
|
710
|
+
max-width: 100%;
|
|
711
|
+
}
|
|
712
|
+
.styles__Tile-title___dAs3x {
|
|
713
|
+
color: var(--black);
|
|
714
|
+
}
|
|
715
|
+
.styles__Tile-title___dAs3x.styles__Tile-title-multiline___qKg6k {
|
|
716
|
+
display: -webkit-box;
|
|
717
|
+
-webkit-line-clamp: 2;
|
|
718
|
+
-webkit-box-orient: vertical;
|
|
719
|
+
overflow: hidden;
|
|
720
|
+
white-space: normal;
|
|
721
|
+
}
|
|
722
|
+
.styles__Tile-developer___2Vz0_ {
|
|
723
|
+
height: 1rem;
|
|
724
|
+
}
|
|
725
|
+
.styles__Tile-status___TrJrd {
|
|
726
|
+
margin-top: 0.5rem;
|
|
727
|
+
height: 1rem;
|
|
728
|
+
}
|
|
729
|
+
.styles__Tile-status___TrJrd.styles__Tile-status-accent___G9cZV {
|
|
730
|
+
color: var(--primaryColor);
|
|
731
|
+
}
|
|
732
|
+
@media (max-width: 48rem) {
|
|
733
|
+
.styles__Tile-icon-wrapper___10WEt {
|
|
734
|
+
margin-top: 0;
|
|
735
|
+
margin-bottom: 0;
|
|
736
|
+
width: 3rem;
|
|
737
|
+
height: 2.5rem;
|
|
738
|
+
}
|
|
739
|
+
.styles__Tile-desc___22kdp {
|
|
740
|
+
margin-top: 0;
|
|
741
|
+
margin-left: 0.5rem;
|
|
742
|
+
text-align: left;
|
|
743
|
+
flex-grow: 1;
|
|
744
|
+
}
|
|
745
|
+
.styles__Tile-title___dAs3x {
|
|
746
|
+
height: 1rem;
|
|
747
|
+
font-weight: normal;
|
|
748
|
+
font-size: 0.75rem !important;
|
|
749
|
+
}
|
|
750
|
+
.styles__Tile-title___dAs3x,
|
|
751
|
+
.styles__Tile-developer___2Vz0_,
|
|
752
|
+
.styles__Tile-status___TrJrd {
|
|
753
|
+
width: 100%;
|
|
754
|
+
}
|
|
755
|
+
.styles__Tile-developer___2Vz0_ {
|
|
756
|
+
display: none;
|
|
757
|
+
}
|
|
758
|
+
.styles__Tile-status___TrJrd {
|
|
759
|
+
margin-top: 0.125rem;
|
|
760
|
+
}
|
|
761
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-ui-plus",
|
|
3
|
-
"version": "14.0
|
|
3
|
+
"version": "14.1.0",
|
|
4
4
|
"description": "Cozy-ui-plus is an extension of cozy-ui and provides components based on cozy-client",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"cozy-client": "^60.21.3",
|
|
37
37
|
"cozy-device-helper": "2.0.0",
|
|
38
38
|
"cozy-intent": "^2.31.1",
|
|
39
|
-
"cozy-interapp": "^0.22.
|
|
39
|
+
"cozy-interapp": "^0.22.1",
|
|
40
40
|
"cozy-logger": "^1.18.1",
|
|
41
|
-
"cozy-sharing": "^40.1.
|
|
41
|
+
"cozy-sharing": "^40.1.5",
|
|
42
42
|
"cozy-stack-client": "^60.21.1",
|
|
43
43
|
"cozy-ui": "^138.1.0",
|
|
44
44
|
"jest": "30.3.0",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"react-dom": "^16 || ^17 || ^18",
|
|
79
79
|
"twake-i18n": ">=0.3.0"
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "fb22a2e13f946de5ca2d391778115e2ee8238c76"
|
|
82
82
|
}
|
package/src/AppTile/index.jsx
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Icon, WrenchCircle } from '@linagora/twake-icons'
|
|
2
1
|
import cx from 'classnames'
|
|
3
2
|
import PropTypes from 'prop-types'
|
|
4
3
|
import React from 'react'
|
|
5
4
|
|
|
5
|
+
import { Icon, WrenchCircle } from '@linagora/twake-icons'
|
|
6
|
+
import { createUseI18n } from 'twake-i18n'
|
|
7
|
+
|
|
6
8
|
import Tile, {
|
|
7
9
|
TileTitle,
|
|
8
10
|
TileSubtitle,
|
|
9
11
|
TileFooter,
|
|
10
12
|
TileIcon,
|
|
11
13
|
TileDescription
|
|
12
|
-
} from '
|
|
13
|
-
import { createUseI18n } from 'twake-i18n'
|
|
14
|
-
|
|
14
|
+
} from '../Tile'
|
|
15
15
|
import { APP_STATUS, getCurrentStatusLabel } from './helpers'
|
|
16
16
|
import de from './locales/de.json'
|
|
17
17
|
import en from './locales/en.json'
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
|
|
3
3
|
import { nameToColor } from 'cozy-ui/transpiled/react/Avatar/helpers'
|
|
4
|
-
import { TileIcon } from 'cozy-ui/transpiled/react/Tile'
|
|
5
4
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
6
5
|
import { makeStyles } from 'cozy-ui/transpiled/react/styles'
|
|
7
6
|
|
|
8
7
|
import styles from '../AppTile/styles.styl'
|
|
8
|
+
import { TileIcon } from '../Tile'
|
|
9
9
|
|
|
10
10
|
interface ShortcutTileProps {
|
|
11
11
|
file: Partial<object> & {
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import cx from 'classnames'
|
|
2
|
+
import PropTypes from 'prop-types'
|
|
3
|
+
import React from 'react'
|
|
4
|
+
|
|
5
|
+
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
6
|
+
|
|
7
|
+
import styles from './styles.styl'
|
|
8
|
+
|
|
9
|
+
const Tile = ({ children, className, tag: Tag, isSecondary, ...props }) => {
|
|
10
|
+
return (
|
|
11
|
+
<Tag
|
|
12
|
+
className={cx(
|
|
13
|
+
styles.Tile,
|
|
14
|
+
{
|
|
15
|
+
[styles['Tile-secondary']]: isSecondary
|
|
16
|
+
},
|
|
17
|
+
className
|
|
18
|
+
)}
|
|
19
|
+
{...props}
|
|
20
|
+
>
|
|
21
|
+
{children}
|
|
22
|
+
</Tag>
|
|
23
|
+
)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const TileDescription = ({ children, className }) => {
|
|
27
|
+
return <div className={cx(styles['Tile-desc'], className)}>{children}</div>
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const TileTitle = ({ children, className, isMultiline }) => (
|
|
31
|
+
<Typography
|
|
32
|
+
variant="h6"
|
|
33
|
+
className={cx(
|
|
34
|
+
styles['Tile-title'],
|
|
35
|
+
{
|
|
36
|
+
[styles['Tile-title-multiline']]: isMultiline
|
|
37
|
+
},
|
|
38
|
+
className
|
|
39
|
+
)}
|
|
40
|
+
>
|
|
41
|
+
{children}
|
|
42
|
+
</Typography>
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
export const TileSubtitle = ({ children }) => (
|
|
46
|
+
<Typography variant="caption" className={styles['Tile-developer']}>
|
|
47
|
+
{children}
|
|
48
|
+
</Typography>
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
export const TileFooter = ({ children, className, isAccent }) => (
|
|
52
|
+
<Typography
|
|
53
|
+
variant="caption"
|
|
54
|
+
className={cx(
|
|
55
|
+
styles['Tile-status'],
|
|
56
|
+
{
|
|
57
|
+
[styles['Tile-status-accent']]: isAccent
|
|
58
|
+
},
|
|
59
|
+
className
|
|
60
|
+
)}
|
|
61
|
+
>
|
|
62
|
+
{children}
|
|
63
|
+
</Typography>
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
export const TileIcon = ({ children }) => {
|
|
67
|
+
return <div className={styles['Tile-icon-wrapper']}>{children}</div>
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
TileTitle.propTypes = {
|
|
71
|
+
className: PropTypes.string,
|
|
72
|
+
isMultiline: PropTypes.bool
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
TileTitle.defaultProps = {
|
|
76
|
+
isMultiline: false
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
TileFooter.propTypes = {
|
|
80
|
+
className: PropTypes.string,
|
|
81
|
+
isAccent: PropTypes.bool
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
TileFooter.defaultProps = {
|
|
85
|
+
isAccent: false
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
Tile.propTypes = {
|
|
89
|
+
className: PropTypes.string,
|
|
90
|
+
isSecondary: PropTypes.bool,
|
|
91
|
+
tag: PropTypes.string
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
Tile.defaultProps = {
|
|
95
|
+
isSecondary: false,
|
|
96
|
+
tag: 'div'
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export default Tile
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
@require 'settings/breakpoints.styl'
|
|
2
|
+
@require 'settings/shadows.styl'
|
|
3
|
+
@require 'settings/typography.styl'
|
|
4
|
+
|
|
5
|
+
$tileSize = 8.75rem
|
|
6
|
+
$tileMobileHeight = 3.75rem
|
|
7
|
+
|
|
8
|
+
.Tile
|
|
9
|
+
box-sizing border-box
|
|
10
|
+
position relative
|
|
11
|
+
display flex
|
|
12
|
+
flex-direction column
|
|
13
|
+
flex 0 0 $tileSize
|
|
14
|
+
width $tileSize
|
|
15
|
+
height $tileSize
|
|
16
|
+
align-items center
|
|
17
|
+
background var(--paperBackgroundColor)
|
|
18
|
+
border-radius 4px
|
|
19
|
+
border solid 1px var(--dividerColor)
|
|
20
|
+
padding .375rem
|
|
21
|
+
margin-bottom 1rem
|
|
22
|
+
margin-right .75rem
|
|
23
|
+
overflow hidden
|
|
24
|
+
transition .15s ease all
|
|
25
|
+
|
|
26
|
+
&.Tile-secondary
|
|
27
|
+
background var(--contrastBackgroundColor)
|
|
28
|
+
border-color var(--contrastBackgroundColor)
|
|
29
|
+
|
|
30
|
+
.Tile:hover,
|
|
31
|
+
.Tile:active,
|
|
32
|
+
.Tile:focus
|
|
33
|
+
box-shadow box-shadow-12
|
|
34
|
+
cursor pointer
|
|
35
|
+
transform scale(1.1)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
+small-screen()
|
|
39
|
+
.Tile
|
|
40
|
+
flex-basis 100%
|
|
41
|
+
flex-direction row
|
|
42
|
+
height $tileMobileHeight
|
|
43
|
+
justify-content flex-start
|
|
44
|
+
margin-right 0.5rem
|
|
45
|
+
margin-bottom .5rem
|
|
46
|
+
padding-left .5rem
|
|
47
|
+
|
|
48
|
+
.Tile:hover,
|
|
49
|
+
.Tile:active,
|
|
50
|
+
.Tile:focus
|
|
51
|
+
transform scale(1.01)
|
|
52
|
+
|
|
53
|
+
.Tile-icon-wrapper
|
|
54
|
+
margin-top .25rem
|
|
55
|
+
margin-bottom .25rem
|
|
56
|
+
width 3rem
|
|
57
|
+
height 3rem
|
|
58
|
+
|
|
59
|
+
.Tile-desc
|
|
60
|
+
display flex
|
|
61
|
+
flex-direction column
|
|
62
|
+
justify-content flex-start
|
|
63
|
+
align-items center
|
|
64
|
+
margin-top .5rem
|
|
65
|
+
text-align center
|
|
66
|
+
max-width 100%
|
|
67
|
+
|
|
68
|
+
.Tile-title, .Tile-developer, .Tile-status
|
|
69
|
+
display block
|
|
70
|
+
margin 0
|
|
71
|
+
text-overflow ellipsis
|
|
72
|
+
white-space nowrap
|
|
73
|
+
overflow hidden
|
|
74
|
+
max-width 100%
|
|
75
|
+
|
|
76
|
+
.Tile-title
|
|
77
|
+
color var(--black)
|
|
78
|
+
|
|
79
|
+
&.Tile-title-multiline
|
|
80
|
+
display -webkit-box
|
|
81
|
+
-webkit-line-clamp 2
|
|
82
|
+
-webkit-box-orient vertical
|
|
83
|
+
overflow hidden
|
|
84
|
+
white-space normal
|
|
85
|
+
|
|
86
|
+
.Tile-developer
|
|
87
|
+
height 1rem
|
|
88
|
+
|
|
89
|
+
.Tile-status
|
|
90
|
+
margin-top .5rem
|
|
91
|
+
height 1rem
|
|
92
|
+
|
|
93
|
+
&.Tile-status-accent
|
|
94
|
+
color var(--primaryColor)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
+small-screen()
|
|
98
|
+
.Tile-icon-wrapper
|
|
99
|
+
margin-top 0
|
|
100
|
+
margin-bottom 0
|
|
101
|
+
width 3rem
|
|
102
|
+
height 2.5rem
|
|
103
|
+
|
|
104
|
+
.Tile-desc
|
|
105
|
+
margin-top 0
|
|
106
|
+
margin-left .5rem
|
|
107
|
+
text-align left
|
|
108
|
+
flex-grow 1
|
|
109
|
+
|
|
110
|
+
.Tile-title
|
|
111
|
+
height 1rem
|
|
112
|
+
font-weight normal
|
|
113
|
+
font-size $subtitle-font-size !important //to remove m-ui h6 font size
|
|
114
|
+
|
|
115
|
+
.Tile-title, .Tile-developer, .Tile-status
|
|
116
|
+
width 100%
|
|
117
|
+
|
|
118
|
+
.Tile-developer
|
|
119
|
+
display none
|
|
120
|
+
|
|
121
|
+
.Tile-status
|
|
122
|
+
margin-top .125rem
|