@helpdice/ui 2.1.5 → 2.1.9
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 +2158 -17
- package/dist/button/button.d.ts +1 -1
- package/dist/button/index.js +73 -16
- package/dist/button/styles.d.ts +1 -0
- package/dist/carousal/index.js +73 -16
- package/dist/container/box.d.ts +42 -0
- package/dist/container/index.d.ts +2 -0
- package/dist/container/index.js +948 -0
- package/dist/copy-to-clipboard/clipboard.d.ts +14 -0
- package/dist/copy-to-clipboard/copy.d.ts +2 -0
- package/dist/copy-to-clipboard/index.d.ts +2 -0
- package/dist/copy-to-clipboard/index.js +1702 -0
- package/dist/copy-to-clipboard/toggle-selection.d.ts +1 -0
- package/dist/grid/index.d.ts +2 -3
- package/dist/grid/index.js +0 -1
- package/dist/html-renderer/index.js +35 -12
- package/dist/index.d.ts +6 -6
- package/dist/index.js +15776 -15418
- package/dist/input/index.d.ts +4 -0
- package/dist/input/index.js +2162 -18
- package/dist/input/input-props.d.ts +1 -0
- package/dist/input/phone-input/phone.d.ts +13 -0
- package/dist/modal/index.js +73 -16
- package/dist/notetip/index.js +690 -0
- package/{esm/notetip/index.d.ts → dist/notetip/note-tip.d.ts} +2 -2
- package/dist/placeholder/index.js +643 -8
- package/dist/table/index.js +4370 -2163
- package/dist/text/child.d.ts +1 -0
- package/dist/text/index.js +686 -8
- package/dist/text/text.d.ts +1 -0
- package/esm/button/button.d.ts +1 -1
- package/esm/button/button.js +51 -5
- package/esm/button/styles.d.ts +1 -0
- package/esm/button/styles.js +22 -11
- package/esm/container/box.d.ts +42 -0
- package/esm/container/box.js +39 -0
- package/esm/container/index.d.ts +2 -0
- package/esm/container/index.js +2 -0
- package/esm/copy-to-clipboard/clipboard.d.ts +14 -0
- package/esm/copy-to-clipboard/clipboard.js +91 -0
- package/esm/copy-to-clipboard/copy.d.ts +2 -0
- package/esm/copy-to-clipboard/copy.js +105 -0
- package/esm/copy-to-clipboard/index.d.ts +2 -0
- package/esm/copy-to-clipboard/index.js +2 -0
- package/esm/copy-to-clipboard/toggle-selection.d.ts +1 -0
- package/esm/copy-to-clipboard/toggle-selection.js +31 -0
- package/esm/grid/index.d.ts +2 -3
- package/esm/grid/index.js +5 -3
- package/esm/index.d.ts +6 -6
- package/esm/index.js +7 -5
- package/esm/input/index.d.ts +4 -0
- package/esm/input/index.js +4 -0
- package/esm/input/input-field.js +12 -10
- package/esm/input/input-props.d.ts +1 -0
- package/esm/input/phone-input/phone.d.ts +13 -0
- package/esm/input/phone-input/phone.js +166 -0
- package/esm/notetip/index.js +2 -97
- package/{dist/notetip/index.d.ts → esm/notetip/note-tip.d.ts} +2 -2
- package/esm/notetip/note-tip.js +97 -0
- package/esm/table/table-body.js +2 -2
- package/esm/table/table-cell.js +1 -1
- package/esm/table/table-head.js +4 -2
- package/esm/table/table.js +0 -1
- package/esm/text/child.d.ts +1 -0
- package/esm/text/text.d.ts +1 -0
- package/esm/text/text.js +25 -3
- package/package.json +19 -19
- package/dist/currency-input/index.js +0 -862
- package/dist/phone-input/index.js +0 -2033
- package/dist/phone-input/phone.d.ts +0 -11
- package/esm/phone-input/phone.d.ts +0 -11
- package/esm/phone-input/phone.js +0 -161
- /package/dist/{currency-input → input/currency-input}/components/CurrencyInput.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/CurrencyInputProps.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/cleanValue.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/escapeRegExp.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/fixedDecimalValue.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/formatValue.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/getLocaleConfig.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/getSuffix.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/index.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/isNumber.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/padTrimValue.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/parseAbbrValue.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/removeInvalidChars.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/removeSeparators.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/repositionCursor.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/index.d.ts +0 -0
- /package/dist/{phone-input → input/phone-input}/index.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/CurrencyInput.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/CurrencyInput.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/CurrencyInputProps.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/CurrencyInputProps.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/addSeparators.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/cleanValue.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/cleanValue.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/escapeRegExp.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/escapeRegExp.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/fixedDecimalValue.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/fixedDecimalValue.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/formatValue.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/formatValue.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/getLocaleConfig.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/getLocaleConfig.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/getSuffix.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/getSuffix.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/index.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/index.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/isNumber.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/isNumber.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/padTrimValue.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/padTrimValue.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/parseAbbrValue.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/parseAbbrValue.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/removeInvalidChars.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/removeInvalidChars.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/removeSeparators.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/removeSeparators.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/repositionCursor.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/repositionCursor.js +0 -0
- /package/esm/{currency-input → input/currency-input}/index.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/index.js +0 -0
- /package/esm/{phone-input → input/phone-input}/index.d.ts +0 -0
- /package/esm/{phone-input → input/phone-input}/index.js +0 -0
package/esm/text/child.d.ts
CHANGED
package/esm/text/text.d.ts
CHANGED
package/esm/text/text.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["h1", "h2", "h3", "h4", "h5", "h6", "p", "b", "small", "i", "span", "del", "em", "blockquote", "noWrap", "children", "className"];
|
|
4
|
+
var _excluded = ["h1", "h2", "h3", "h4", "h5", "h6", "p", "b", "small", "i", "span", "del", "em", "blockquote", "noWrap", "collapse", "children", "className"];
|
|
4
5
|
/* "use client" */;
|
|
5
|
-
import React, { useMemo } from 'react';
|
|
6
|
+
import React, { useMemo, useState } from 'react';
|
|
6
7
|
import TextChild from './child';
|
|
7
8
|
import { withScale } from '../use-scale';
|
|
9
|
+
import Button from '../button';
|
|
8
10
|
var _getModifierChild = function getModifierChild(tags, children) {
|
|
9
11
|
if (!tags.length) return children;
|
|
10
12
|
var nextTag = tags.slice(1, tags.length);
|
|
@@ -43,6 +45,8 @@ var TextComponent = function TextComponent(_ref) {
|
|
|
43
45
|
blockquote = _ref$blockquote === void 0 ? false : _ref$blockquote,
|
|
44
46
|
_ref$noWrap = _ref.noWrap,
|
|
45
47
|
noWrap = _ref$noWrap === void 0 ? false : _ref$noWrap,
|
|
48
|
+
_ref$collapse = _ref.collapse,
|
|
49
|
+
collapse = _ref$collapse === void 0 ? 0 : _ref$collapse,
|
|
46
50
|
children = _ref.children,
|
|
47
51
|
_ref$className = _ref.className,
|
|
48
52
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
@@ -82,6 +86,10 @@ var TextComponent = function TextComponent(_ref) {
|
|
|
82
86
|
*
|
|
83
87
|
*/
|
|
84
88
|
|
|
89
|
+
var _useState = useState(false),
|
|
90
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
91
|
+
expand = _useState2[0],
|
|
92
|
+
setExpand = _useState2[1];
|
|
85
93
|
var tag = useMemo(function () {
|
|
86
94
|
if (names[0]) return names[0];
|
|
87
95
|
if (inlineNames[0]) return inlineNames[0];
|
|
@@ -100,7 +108,21 @@ var TextComponent = function TextComponent(_ref) {
|
|
|
100
108
|
},
|
|
101
109
|
className: "".concat(className, " ").concat(noWrap ? 'no-wrap' : ''),
|
|
102
110
|
tag: tag
|
|
103
|
-
}, props), modifers)
|
|
111
|
+
}, props), typeof children === 'string' && collapse > 50 ? /*#__PURE__*/React.createElement(React.Fragment, null, expand ? modifers : (modifers === null || modifers === void 0 ? void 0 : modifers.toString().substring(0, collapse)) + '...', /*#__PURE__*/React.createElement(Button, {
|
|
112
|
+
margin: 0,
|
|
113
|
+
onClick: function onClick() {
|
|
114
|
+
return setExpand(!expand);
|
|
115
|
+
},
|
|
116
|
+
style: {
|
|
117
|
+
textTransform: 'lowercase'
|
|
118
|
+
},
|
|
119
|
+
effect: false,
|
|
120
|
+
color: "abort",
|
|
121
|
+
scale: 2 / 3,
|
|
122
|
+
px: 0.2,
|
|
123
|
+
py: 0,
|
|
124
|
+
auto: true
|
|
125
|
+
}, /*#__PURE__*/React.createElement("b", null, expand ? 'less' : 'more'))) : modifers);
|
|
104
126
|
};
|
|
105
127
|
TextComponent.displayName = 'Text';
|
|
106
128
|
var Text = withScale(TextComponent);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@helpdice/ui",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.9",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "esm/index.d.ts",
|
|
6
6
|
"unpkg": "dist/index.min.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"build:types": "tsc -p ./scripts & tsc -p ./scripts --outDir ./esm",
|
|
27
27
|
"build:package": "yarn build:rollup && yarn build:babel && yarn build:types && yarn build:after",
|
|
28
28
|
"release": "yarn publish --access public --non-interactive",
|
|
29
|
-
"release:github": "
|
|
29
|
+
"release:github": "npm publish --registry=https://npm.pkg.github.com"
|
|
30
30
|
},
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"description": "Modern React UI library.",
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"@babel/preset-typescript": "^7.14.5",
|
|
64
64
|
"@babel/standalone": "^7.28.3",
|
|
65
65
|
"@helpdice/icons": "^1.2.5",
|
|
66
|
-
"@helpdice/
|
|
67
|
-
"@helpdice/
|
|
66
|
+
"@helpdice/sdk": "^0.2.9",
|
|
67
|
+
"@helpdice/utils": "^0.1.4",
|
|
68
68
|
"@mapbox/rehype-prism": "^0.9.0",
|
|
69
69
|
"@mdx-js/loader": "^3.1.0",
|
|
70
70
|
"@mdx-js/react": "^3.1.0",
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"tslib": "^2.8.1"
|
|
140
140
|
},
|
|
141
141
|
"peerDependencies": {
|
|
142
|
-
"@helpdice/theme": "^1.0.
|
|
142
|
+
"@helpdice/theme": "^1.0.9",
|
|
143
143
|
"react": "^19.2.0",
|
|
144
144
|
"react-dom": "^19.2.0"
|
|
145
145
|
},
|
|
@@ -215,9 +215,13 @@
|
|
|
215
215
|
"import": "./dist/collapse/index.js",
|
|
216
216
|
"types": "./dist/collapse/index.d.ts"
|
|
217
217
|
},
|
|
218
|
-
"./
|
|
219
|
-
"import": "./dist/
|
|
220
|
-
"types": "./dist/
|
|
218
|
+
"./Container": {
|
|
219
|
+
"import": "./dist/container/index.js",
|
|
220
|
+
"types": "./dist/container/index.d.ts"
|
|
221
|
+
},
|
|
222
|
+
"./CopyToClipboard": {
|
|
223
|
+
"import": "./dist/copy-to-clipboard/index.js",
|
|
224
|
+
"types": "./dist/copy-to-clipboard/index.d.ts"
|
|
221
225
|
},
|
|
222
226
|
"./Description": {
|
|
223
227
|
"import": "./dist/description/index.js",
|
|
@@ -303,10 +307,6 @@
|
|
|
303
307
|
"import": "./dist/pagination/index.js",
|
|
304
308
|
"types": "./dist/pagination/index.d.ts"
|
|
305
309
|
},
|
|
306
|
-
"./PhoneInput": {
|
|
307
|
-
"import": "./dist/phone-input/index.js",
|
|
308
|
-
"types": "./dist/phone-input/index.d.ts"
|
|
309
|
-
},
|
|
310
310
|
"./Placeholder": {
|
|
311
311
|
"import": "./dist/placeholder/index.js",
|
|
312
312
|
"types": "./dist/placeholder/index.d.ts"
|
|
@@ -427,7 +427,7 @@
|
|
|
427
427
|
"import": "./dist/use-toasts/index.js",
|
|
428
428
|
"types": "./dist/use-toasts/index.d.ts"
|
|
429
429
|
},
|
|
430
|
-
"./
|
|
430
|
+
"./user": {
|
|
431
431
|
"import": "./dist/user/index.js",
|
|
432
432
|
"types": "./dist/user/index.d.ts"
|
|
433
433
|
}
|
|
@@ -476,8 +476,11 @@
|
|
|
476
476
|
"Collapse": [
|
|
477
477
|
"dist/collapse/index.d.ts"
|
|
478
478
|
],
|
|
479
|
-
"
|
|
480
|
-
"dist/
|
|
479
|
+
"Container": [
|
|
480
|
+
"dist/container/index.d.ts"
|
|
481
|
+
],
|
|
482
|
+
"CopyToClipboard": [
|
|
483
|
+
"dist/copy-to-clipboard/index.d.ts"
|
|
481
484
|
],
|
|
482
485
|
"Description": [
|
|
483
486
|
"dist/description/index.d.ts"
|
|
@@ -542,9 +545,6 @@
|
|
|
542
545
|
"Pagination": [
|
|
543
546
|
"dist/pagination/index.d.ts"
|
|
544
547
|
],
|
|
545
|
-
"PhoneInput": [
|
|
546
|
-
"dist/phone-input/index.d.ts"
|
|
547
|
-
],
|
|
548
548
|
"Placeholder": [
|
|
549
549
|
"dist/placeholder/index.d.ts"
|
|
550
550
|
],
|
|
@@ -635,7 +635,7 @@
|
|
|
635
635
|
"useToasts": [
|
|
636
636
|
"dist/use-toasts/index.d.ts"
|
|
637
637
|
],
|
|
638
|
-
"
|
|
638
|
+
"user": [
|
|
639
639
|
"dist/user/index.d.ts"
|
|
640
640
|
]
|
|
641
641
|
}
|