@helpdice/ui 2.5.3 → 2.5.8-beta.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/dist/auto-complete/index.js +913 -102
- package/dist/avatar/index.js +11 -9
- package/dist/button/button.icon.d.ts +0 -1
- package/dist/button/button.small.d.ts +0 -1
- package/dist/button/index.js +7 -9
- package/dist/carousal/index.js +7 -9
- package/dist/container/index.js +7 -9
- package/dist/copy-to-clipboard/index.js +7 -9
- package/dist/index.js +3047 -2977
- package/dist/input/index.js +906 -47
- package/dist/modal/index.js +5 -5
- package/dist/pagination/index.js +6 -6
- package/dist/placeholder/index.js +16 -11
- package/dist/select/index.js +912 -14
- package/dist/select/select.d.ts +2 -0
- package/dist/table/index.js +21629 -21561
- package/dist/table/table-body.d.ts +1 -2
- package/dist/table/table.d.ts +1 -0
- package/dist/text/index.js +16 -11
- package/dist/text/text.d.ts +3 -0
- package/dist/textarea/index.js +881 -7
- package/dist/textarea/textarea.d.ts +3 -0
- package/dist/tooltip/index.d.ts +6 -1
- package/dist/tooltip/index.js +12 -0
- package/dist/tooltip/tooltip-small.d.ts +4 -0
- package/dist/user/index.js +11 -9
- package/esm/avatar/avatar.js +8 -6
- package/esm/button/button.icon.d.ts +0 -1
- package/esm/button/button.js +5 -5
- package/esm/button/button.small.d.ts +0 -1
- package/esm/button/button.small.js +2 -4
- package/esm/input/input-field.js +11 -9
- package/esm/pagination/pagination-item.js +6 -6
- package/esm/select/select.d.ts +2 -0
- package/esm/select/select.js +15 -2
- package/esm/table/table-body.d.ts +1 -2
- package/esm/table/table-body.js +16 -11
- package/esm/table/table.d.ts +1 -0
- package/esm/table/table.js +45 -25
- package/esm/text/text.d.ts +3 -0
- package/esm/text/text.js +9 -2
- package/esm/textarea/textarea.d.ts +3 -0
- package/esm/textarea/textarea.js +19 -2
- package/esm/tooltip/index.d.ts +6 -1
- package/esm/tooltip/index.js +2 -0
- package/esm/tooltip/tooltip-small.d.ts +4 -0
- package/esm/tooltip/tooltip-small.js +12 -0
- package/package.json +2 -2
package/esm/table/table.js
CHANGED
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["children", "data", "initialData", "hover", "emptyText", "rowDraggable", "readOnly", "cursorPagination", "previousCursor", "nextCursor", "hasMore", "onNextPage", "onPreviousPage", "onRow", "onCell", "onChange", "onFilters", "onPageChange", "showFilters", "stickyHeader", "textPlaceholder", "onSelected", "dataLength", "viewLength", "className", "rowClassName"];
|
|
5
|
+
var _excluded = ["children", "data", "initialData", "hover", "emptyText", "rowDraggable", "readOnly", "cursorPagination", "previousCursor", "nextCursor", "hasMore", "onNextPage", "onPreviousPage", "onRow", "onCell", "onChange", "onFilters", "onPageChange", "showFilters", "stickyHeader", "textPlaceholder", "onSelected", "dataLength", "viewLength", "className", "containerStyle", "rowClassName"];
|
|
6
6
|
import _JSXStyle from "../styled-jsx.es.js";
|
|
7
7
|
/* "use client" */
|
|
8
8
|
|
|
@@ -18,6 +18,8 @@ import { ChevronLeft, ChevronRight } from '@helpdice/icons';
|
|
|
18
18
|
import Pagination from '../pagination';
|
|
19
19
|
import Button from '../button';
|
|
20
20
|
import Tooltip from '../tooltip';
|
|
21
|
+
import Placeholder from '../placeholder';
|
|
22
|
+
import { useTheme } from '@helpdice/theme';
|
|
21
23
|
function TableComponent(tableProps) {
|
|
22
24
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
23
25
|
var _ref = tableProps,
|
|
@@ -57,6 +59,7 @@ function TableComponent(tableProps) {
|
|
|
57
59
|
viewLength = _ref.viewLength,
|
|
58
60
|
_ref$className = _ref.className,
|
|
59
61
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
62
|
+
containerStyle = _ref.containerStyle,
|
|
60
63
|
_ref$rowClassName = _ref.rowClassName,
|
|
61
64
|
rowClassName = _ref$rowClassName === void 0 ? function () {
|
|
62
65
|
return '';
|
|
@@ -65,6 +68,7 @@ function TableComponent(tableProps) {
|
|
|
65
68
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
66
69
|
var _useScale = useScale(),
|
|
67
70
|
SCALES = _useScale.SCALES;
|
|
71
|
+
var theme = useTheme();
|
|
68
72
|
var ref = useRef(null);
|
|
69
73
|
var _useRealShape = useRealShape(ref),
|
|
70
74
|
_useRealShape2 = _slicedToArray(_useRealShape, 2),
|
|
@@ -115,10 +119,25 @@ function TableComponent(tableProps) {
|
|
|
115
119
|
};
|
|
116
120
|
return /*#__PURE__*/React.createElement(TableContext.Provider, {
|
|
117
121
|
value: contextValue
|
|
122
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
123
|
+
style: {
|
|
124
|
+
position: 'relative',
|
|
125
|
+
display: 'flex',
|
|
126
|
+
flexDirection: 'column',
|
|
127
|
+
borderBottom: "1px solid ".concat(theme.palette.border),
|
|
128
|
+
borderBottomLeftRadius: '5px',
|
|
129
|
+
borderBottomRightRadius: '5px'
|
|
130
|
+
},
|
|
131
|
+
className: _JSXStyle.dynamic([["1809040460", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.background]]])
|
|
132
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
133
|
+
style: _extends({
|
|
134
|
+
overflow: 'auto'
|
|
135
|
+
}, containerStyle),
|
|
136
|
+
className: _JSXStyle.dynamic([["1809040460", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.background]]])
|
|
118
137
|
}, /*#__PURE__*/React.createElement("table", _extends({
|
|
119
138
|
ref: ref
|
|
120
139
|
}, props, {
|
|
121
|
-
className: _JSXStyle.dynamic([["
|
|
140
|
+
className: _JSXStyle.dynamic([["1809040460", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.background]]]) + " " + (props && props.className != null && props.className || className || "")
|
|
122
141
|
}), /*#__PURE__*/React.createElement(TableHead, {
|
|
123
142
|
stickyHeader: stickyHeader,
|
|
124
143
|
onFilters: onFilters,
|
|
@@ -130,26 +149,30 @@ function TableComponent(tableProps) {
|
|
|
130
149
|
hover: hover,
|
|
131
150
|
emptyText: emptyText,
|
|
132
151
|
onRow: onRow,
|
|
133
|
-
onCell: onCell
|
|
134
|
-
|
|
152
|
+
onCell: onCell
|
|
153
|
+
// textPlaceholder={textPlaceholder}
|
|
154
|
+
,
|
|
135
155
|
rowClassName: rowClassName,
|
|
136
156
|
rowDraggable: rowDraggable,
|
|
137
157
|
readOnly: readOnly,
|
|
138
158
|
onSelected: onSelected
|
|
139
|
-
}), children,
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
159
|
+
}), children), data.length == 0 && /*#__PURE__*/React.createElement(Placeholder, {
|
|
160
|
+
empty: true,
|
|
161
|
+
textOnly: textPlaceholder,
|
|
162
|
+
msg: "No Data to show"
|
|
163
|
+
})), cursorPagination || viewLength ? /*#__PURE__*/React.createElement("div", {
|
|
164
|
+
className: _JSXStyle.dynamic([["1809040460", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.background]]]) + " " + "table-footer"
|
|
165
|
+
}, cursorPagination ? /*#__PURE__*/React.createElement("div", {
|
|
145
166
|
style: {
|
|
146
167
|
display: 'flex',
|
|
147
168
|
gap: 10,
|
|
148
169
|
margin: '10px'
|
|
149
170
|
},
|
|
150
|
-
className: _JSXStyle.dynamic([["
|
|
151
|
-
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
152
|
-
text: "Previous"
|
|
171
|
+
className: _JSXStyle.dynamic([["1809040460", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.background]]])
|
|
172
|
+
}, /*#__PURE__*/React.createElement(Tooltip.Small, {
|
|
173
|
+
text: "Previous",
|
|
174
|
+
placement: "bottom",
|
|
175
|
+
type: "dark"
|
|
153
176
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
154
177
|
disabled: !previousCursor,
|
|
155
178
|
onClick: function onClick() {
|
|
@@ -159,8 +182,10 @@ function TableComponent(tableProps) {
|
|
|
159
182
|
px: 0.6,
|
|
160
183
|
scale: 2 / 3,
|
|
161
184
|
iconRight: /*#__PURE__*/React.createElement(ChevronLeft, null)
|
|
162
|
-
})), /*#__PURE__*/React.createElement(Tooltip, {
|
|
163
|
-
text: "Next"
|
|
185
|
+
})), /*#__PURE__*/React.createElement(Tooltip.Small, {
|
|
186
|
+
text: "Next",
|
|
187
|
+
placement: "bottom",
|
|
188
|
+
type: "dark"
|
|
164
189
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
165
190
|
disabled: !nextCursor,
|
|
166
191
|
onClick: function onClick() {
|
|
@@ -170,12 +195,7 @@ function TableComponent(tableProps) {
|
|
|
170
195
|
px: 0.6,
|
|
171
196
|
scale: 2 / 3,
|
|
172
197
|
iconRight: /*#__PURE__*/React.createElement(ChevronRight, null)
|
|
173
|
-
})))
|
|
174
|
-
className: _JSXStyle.dynamic([["2040515329", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]]])
|
|
175
|
-
}, /*#__PURE__*/React.createElement("td", {
|
|
176
|
-
colSpan: columns === null || columns === void 0 ? void 0 : columns.length,
|
|
177
|
-
className: _JSXStyle.dynamic([["2040515329", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]]])
|
|
178
|
-
}, /*#__PURE__*/React.createElement(Pagination, {
|
|
198
|
+
}))) : dataLength && viewLength && onPageChange ? /*#__PURE__*/React.createElement(Pagination, {
|
|
179
199
|
style: {
|
|
180
200
|
marginLeft: '10px',
|
|
181
201
|
marginRight: '10px',
|
|
@@ -190,10 +210,10 @@ function TableComponent(tableProps) {
|
|
|
190
210
|
},
|
|
191
211
|
limit: 5,
|
|
192
212
|
count: Number(dataLength / viewLength)
|
|
193
|
-
}, /*#__PURE__*/React.createElement(Pagination.Next, null, /*#__PURE__*/React.createElement(ChevronRight, null)), /*#__PURE__*/React.createElement(Pagination.Previous, null, /*#__PURE__*/React.createElement(ChevronLeft, null))))
|
|
194
|
-
id: "
|
|
195
|
-
dynamic: [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]
|
|
196
|
-
}, "table.__jsx-style-dynamic-selector{border-collapse:separate;border-spacing:0;--table-font-size:".concat(SCALES.font(1), ";font-size:var(--table-font-size);width:").concat(SCALES.width(1, '100%'), ";height:").concat(SCALES.height(1, 'auto'), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}
|
|
213
|
+
}, /*#__PURE__*/React.createElement(Pagination.Next, null, /*#__PURE__*/React.createElement(ChevronRight, null)), /*#__PURE__*/React.createElement(Pagination.Previous, null, /*#__PURE__*/React.createElement(ChevronLeft, null))) : null) : null, /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
214
|
+
id: "1809040460",
|
|
215
|
+
dynamic: [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.background]
|
|
216
|
+
}, "table.__jsx-style-dynamic-selector{border-collapse:separate;border-spacing:0;--table-font-size:".concat(SCALES.font(1), ";font-size:var(--table-font-size);width:").concat(SCALES.width(1, '100%'), ";height:").concat(SCALES.height(1, 'auto'), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.table-footer.__jsx-style-dynamic-selector{background-color:").concat(theme.palette.background, ";width:100%;bottom:0;}"))));
|
|
197
217
|
}
|
|
198
218
|
TableComponent.displayName = 'Table';
|
|
199
219
|
TableComponent.Column = TableColumn;
|
package/esm/text/text.d.ts
CHANGED
|
@@ -19,7 +19,10 @@ interface Props {
|
|
|
19
19
|
blockquote?: boolean;
|
|
20
20
|
noWrap?: boolean;
|
|
21
21
|
className?: string;
|
|
22
|
+
display?: string;
|
|
22
23
|
color?: TextTypes;
|
|
24
|
+
alignItems?: string;
|
|
25
|
+
justify?: string;
|
|
23
26
|
align?: 'center' | 'right' | 'left';
|
|
24
27
|
}
|
|
25
28
|
type NativeAttrs = Omit<React.HTMLAttributes<any>, keyof Props>;
|
package/esm/text/text.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["h1", "h2", "h3", "h4", "h5", "h6", "p", "b", "small", "i", "span", "del", "em", "blockquote", "noWrap", "collapse", "children", "className"];
|
|
4
|
+
var _excluded = ["h1", "h2", "h3", "h4", "h5", "h6", "p", "b", "small", "i", "span", "del", "em", "blockquote", "noWrap", "collapse", "children", "className", "display", "alignItems", "justify"];
|
|
5
5
|
/* "use client" */;
|
|
6
6
|
import React, { useMemo, useState } from 'react';
|
|
7
7
|
import TextChild from './child';
|
|
@@ -50,6 +50,10 @@ var TextComponent = function TextComponent(_ref) {
|
|
|
50
50
|
children = _ref.children,
|
|
51
51
|
_ref$className = _ref.className,
|
|
52
52
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
53
|
+
_ref$display = _ref.display,
|
|
54
|
+
display = _ref$display === void 0 ? 'block' : _ref$display,
|
|
55
|
+
alignItems = _ref.alignItems,
|
|
56
|
+
justify = _ref.justify,
|
|
53
57
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
54
58
|
var elements = {
|
|
55
59
|
h1: h1,
|
|
@@ -104,7 +108,10 @@ var TextComponent = function TextComponent(_ref) {
|
|
|
104
108
|
}, [renderableChildElements, children]);
|
|
105
109
|
return /*#__PURE__*/React.createElement(TextChild, _extends({
|
|
106
110
|
style: {
|
|
107
|
-
textAlign: props.align
|
|
111
|
+
textAlign: props.align,
|
|
112
|
+
display: display,
|
|
113
|
+
alignItems: alignItems,
|
|
114
|
+
justifyContent: justify
|
|
108
115
|
},
|
|
109
116
|
className: "".concat(className, " ").concat(noWrap ? 'no-wrap' : ''),
|
|
110
117
|
tag: tag
|
|
@@ -14,6 +14,9 @@ interface Props {
|
|
|
14
14
|
onFocus?: (e: React.FocusEvent<HTMLTextAreaElement>) => void;
|
|
15
15
|
onBlur?: (e: React.FocusEvent<HTMLTextAreaElement>) => void;
|
|
16
16
|
className?: string;
|
|
17
|
+
error?: boolean;
|
|
18
|
+
helperText?: string;
|
|
19
|
+
label?: string;
|
|
17
20
|
resize?: TextareaResizes;
|
|
18
21
|
}
|
|
19
22
|
type NativeAttrs = Omit<React.TextareaHTMLAttributes<any>, keyof Props>;
|
package/esm/textarea/textarea.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["type", "disabled", "readOnly", "onFocus", "onBlur", "className", "initialValue", "onChange", "value", "placeholder", "resize"];
|
|
4
|
+
var _excluded = ["type", "disabled", "readOnly", "onFocus", "onBlur", "className", "initialValue", "onChange", "value", "placeholder", "helperText", "error", "label", "resize"];
|
|
5
5
|
import _JSXStyle from "../styled-jsx.es.js";
|
|
6
6
|
/* "use client" */
|
|
7
7
|
|
|
@@ -10,6 +10,8 @@ import { useTheme, useClasses } from '@helpdice/theme';
|
|
|
10
10
|
import { tuple } from '../utils/prop-types';
|
|
11
11
|
import { getColors } from '../input/styles';
|
|
12
12
|
import useScale, { withScale } from '../use-scale';
|
|
13
|
+
import Text from '../text';
|
|
14
|
+
import InputBlockLabel from '../input/input-block-label';
|
|
13
15
|
var resizeTypes = tuple('none', 'both', 'horizontal', 'vertical', 'initial', 'inherit');
|
|
14
16
|
var TextareaComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
15
17
|
var _ref$type = _ref.type,
|
|
@@ -27,6 +29,9 @@ var TextareaComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
27
29
|
onChange = _ref.onChange,
|
|
28
30
|
value = _ref.value,
|
|
29
31
|
placeholder = _ref.placeholder,
|
|
32
|
+
helperText = _ref.helperText,
|
|
33
|
+
error = _ref.error,
|
|
34
|
+
label = _ref.label,
|
|
30
35
|
_ref$resize = _ref.resize,
|
|
31
36
|
resize = _ref$resize === void 0 ? 'none' : _ref$resize,
|
|
32
37
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -83,6 +88,8 @@ var TextareaComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
83
88
|
};
|
|
84
89
|
var textareaProps = _extends({}, props, controlledValue);
|
|
85
90
|
return /*#__PURE__*/React.createElement("div", {
|
|
91
|
+
className: "with-label"
|
|
92
|
+
}, label && /*#__PURE__*/React.createElement(InputBlockLabel, null, label), /*#__PURE__*/React.createElement("div", {
|
|
86
93
|
className: _JSXStyle.dynamic([["12276481", [theme.layout.radius, borderColor, color, SCALES.font(0.875), SCALES.height(1, 'auto'), SCALES.width(1, 'initial'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverBorder, theme.palette.accents_1, theme.palette.accents_2, theme.font.sans, SCALES.pt(0.5), SCALES.pr(0.5), SCALES.pb(0.5), SCALES.pl(0.5), resize, theme.palette.background]]]) + " " + (classes || "")
|
|
87
94
|
}, /*#__PURE__*/React.createElement("textarea", _extends({
|
|
88
95
|
ref: textareaRef,
|
|
@@ -97,7 +104,17 @@ var TextareaComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
97
104
|
})), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
98
105
|
id: "12276481",
|
|
99
106
|
dynamic: [theme.layout.radius, borderColor, color, SCALES.font(0.875), SCALES.height(1, 'auto'), SCALES.width(1, 'initial'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverBorder, theme.palette.accents_1, theme.palette.accents_2, theme.font.sans, SCALES.pt(0.5), SCALES.pr(0.5), SCALES.pb(0.5), SCALES.pl(0.5), resize, theme.palette.background]
|
|
100
|
-
}, ".wrapper.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:".concat(theme.layout.radius, ";border:1px solid ").concat(borderColor, ";color:").concat(color, ";-webkit-transition:border 0.2s ease 0s,color 0.2s ease 0s;transition:border 0.2s ease 0s,color 0.2s ease 0s;min-width:12.5rem;max-width:95vw;--textarea-font-size:").concat(SCALES.font(0.875), ";--textarea-height:").concat(SCALES.height(1, 'auto'), ";width:").concat(SCALES.width(1, 'initial'), ";height:var(--textarea-height);margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.wrapper.hover.__jsx-style-dynamic-selector{border-color:").concat(hoverBorder, ";}.wrapper.disabled.__jsx-style-dynamic-selector{background-color:").concat(theme.palette.accents_1, ";border-color:").concat(theme.palette.accents_2, ";cursor:not-allowed;}textarea.__jsx-style-dynamic-selector{background-color:transparent;box-shadow:none;display:block;font-family:").concat(theme.font.sans, ";font-size:var(--textarea-font-size);width:100%;height:var(--textarea-height);border:none;outline:none;padding:").concat(SCALES.pt(0.5), " ").concat(SCALES.pr(0.5), " ").concat(SCALES.pb(0.5), " ").concat(SCALES.pl(0.5), ";resize:").concat(resize, ";}.disabled.__jsx-style-dynamic-selector>textarea.__jsx-style-dynamic-selector{cursor:not-allowed;}textarea.__jsx-style-dynamic-selector:-webkit-autofill,textarea.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:hover,textarea.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:active,textarea.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:focus{-webkit-box-shadow:0 0 0 30px ").concat(theme.palette.background, " inset !important;}")))
|
|
107
|
+
}, ".wrapper.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:".concat(theme.layout.radius, ";border:1px solid ").concat(borderColor, ";color:").concat(color, ";-webkit-transition:border 0.2s ease 0s,color 0.2s ease 0s;transition:border 0.2s ease 0s,color 0.2s ease 0s;min-width:12.5rem;max-width:95vw;--textarea-font-size:").concat(SCALES.font(0.875), ";--textarea-height:").concat(SCALES.height(1, 'auto'), ";width:").concat(SCALES.width(1, 'initial'), ";height:var(--textarea-height);margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.wrapper.hover.__jsx-style-dynamic-selector{border-color:").concat(hoverBorder, ";}.wrapper.disabled.__jsx-style-dynamic-selector{background-color:").concat(theme.palette.accents_1, ";border-color:").concat(theme.palette.accents_2, ";cursor:not-allowed;}textarea.__jsx-style-dynamic-selector{background-color:transparent;box-shadow:none;display:block;font-family:").concat(theme.font.sans, ";font-size:var(--textarea-font-size);width:100%;height:var(--textarea-height);border:none;outline:none;padding:").concat(SCALES.pt(0.5), " ").concat(SCALES.pr(0.5), " ").concat(SCALES.pb(0.5), " ").concat(SCALES.pl(0.5), ";resize:").concat(resize, ";}.disabled.__jsx-style-dynamic-selector>textarea.__jsx-style-dynamic-selector{cursor:not-allowed;}textarea.__jsx-style-dynamic-selector:-webkit-autofill,textarea.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:hover,textarea.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:active,textarea.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:focus{-webkit-box-shadow:0 0 0 30px ").concat(theme.palette.background, " inset !important;}"))), helperText && /*#__PURE__*/React.createElement(Text, {
|
|
108
|
+
font: 0.8,
|
|
109
|
+
style: {
|
|
110
|
+
marginTop: 0.4,
|
|
111
|
+
marginRight: 0,
|
|
112
|
+
marginLeft: 0,
|
|
113
|
+
marginBottom: '0.4rem',
|
|
114
|
+
textAlign: 'left'
|
|
115
|
+
},
|
|
116
|
+
color: error ? "error" : 'default'
|
|
117
|
+
}, "\xA0", helperText));
|
|
101
118
|
});
|
|
102
119
|
TextareaComponent.displayName = 'Textarea';
|
|
103
120
|
var Textarea = withScale(TextareaComponent);
|
package/esm/tooltip/index.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import Tooltip from './tooltip';
|
|
2
2
|
export type { TooltipProps, TooltipOnVisibleChange, TooltipTypes, TooltipTriggers, TooltipPlacement, } from './tooltip';
|
|
3
|
-
|
|
3
|
+
import SmallTooltip from './tooltip-small';
|
|
4
|
+
export type TooltipComponentType = typeof Tooltip & {
|
|
5
|
+
Small: typeof SmallTooltip;
|
|
6
|
+
};
|
|
7
|
+
declare const _default: TooltipComponentType;
|
|
8
|
+
export default _default;
|
package/esm/tooltip/index.js
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import React, { memo } from 'react';
|
|
3
|
+
import Tooltip from './tooltip';
|
|
4
|
+
var SmallTooltip = function SmallTooltip(props) {
|
|
5
|
+
return /*#__PURE__*/React.createElement(Tooltip, _extends({
|
|
6
|
+
font: 0.8,
|
|
7
|
+
px: 0.6,
|
|
8
|
+
py: 0.4
|
|
9
|
+
}, props), props.children);
|
|
10
|
+
};
|
|
11
|
+
SmallTooltip.displayName = 'Tooltip.Small';
|
|
12
|
+
export default /*#__PURE__*/memo(SmallTooltip);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@helpdice/ui",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.8-beta.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "esm/index.d.ts",
|
|
6
6
|
"unpkg": "dist/index.min.js",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"@helpdice/icons": "^1.2.5",
|
|
66
66
|
"@helpdice/sdk": "^0.4.3",
|
|
67
67
|
"@helpdice/utils": "^0.1.4",
|
|
68
|
-
"@helpdice/pro": "2.1.
|
|
68
|
+
"@helpdice/pro": "2.1.1",
|
|
69
69
|
"@mapbox/rehype-prism": "^0.9.0",
|
|
70
70
|
"@mdx-js/loader": "^3.1.0",
|
|
71
71
|
"@mdx-js/react": "^3.1.0",
|