@tuspe/components 1.7.0 → 1.7.2
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/Checkbox.svelte +4 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -0
- package/package.json +1 -1
package/dist/Checkbox.svelte
CHANGED
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
accent-color: var(--color-primary);
|
|
26
26
|
border: 1px solid var(--color-border);
|
|
27
27
|
height: 20px;
|
|
28
|
-
margin-right: 10px;
|
|
29
28
|
outline: none;
|
|
30
29
|
vertical-align: middle;
|
|
31
30
|
width: 20px;
|
|
@@ -42,14 +41,12 @@
|
|
|
42
41
|
}
|
|
43
42
|
|
|
44
43
|
label {
|
|
45
|
-
display: flex;
|
|
46
44
|
align-items: center;
|
|
47
45
|
cursor: pointer;
|
|
48
|
-
|
|
46
|
+
display: grid;
|
|
49
47
|
font-size: 1rem;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
margin-top: 1px;
|
|
48
|
+
gap: 1rem;
|
|
49
|
+
grid-template-columns: 20px 1fr;
|
|
50
|
+
line-height: 1.25;
|
|
54
51
|
}
|
|
55
52
|
</style>
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -107,6 +107,9 @@ export const preventDefault = (fn) => {
|
|
|
107
107
|
* SUMMARY
|
|
108
108
|
*/
|
|
109
109
|
export const summary = (text, num = 160) => {
|
|
110
|
+
if (!text || typeof text !== 'string') {
|
|
111
|
+
return '';
|
|
112
|
+
}
|
|
110
113
|
// Remove HTML tags
|
|
111
114
|
let sum = text.replace(/<[^>]*>/g, '').trim();
|
|
112
115
|
// If the summary is within the limit, return it directly.
|