@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.
@@ -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
- line-height: 1.25;
46
+ display: grid;
49
47
  font-size: 1rem;
50
- }
51
-
52
- span {
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
@@ -58,4 +58,4 @@ export declare const preventDefault: (fn: Function) => (this: any, event: any) =
58
58
  /**
59
59
  * SUMMARY
60
60
  */
61
- export declare const summary: (text: string, num?: number) => string;
61
+ export declare const summary: (text: any, num?: number) => string;
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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuspe/components",
3
- "version": "1.7.0",
3
+ "version": "1.7.2",
4
4
  "description": "A reusable SvelteKit component library for form elements, breadcrumbs, prices and images.",
5
5
  "keywords": [
6
6
  "svelteKit",