@max-ts/svelte 1.11.0 → 1.12.1
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/assets/styles.css +82 -0
- package/dist/components/Description/Description.js +38 -0
- package/dist/components/Description/Description.svelte.d.ts +4 -0
- package/dist/components/Description/Name/Name.css +5 -0
- package/dist/components/Description/Name/Name.svelte.d.ts +4 -0
- package/dist/components/Description/Name/Name2.js +67 -0
- package/dist/components/Description/Name/index.d.ts +1 -0
- package/dist/components/Description/Name/styles.css.d.ts +3 -0
- package/dist/components/Description/Name/styles.css.js +6 -0
- package/dist/components/Description/Value/Value.js +149 -0
- package/dist/components/Description/Value/Value.svelte.d.ts +4 -0
- package/dist/components/Description/Value/index.d.ts +1 -0
- package/dist/components/Description/Value/styles.css.d.ts +4 -0
- package/dist/components/Description/Value/styles.css.js +7 -0
- package/dist/components/Description/context.d.ts +9 -0
- package/dist/components/Description/context.js +15 -0
- package/dist/components/Description/index.d.ts +6 -0
- package/dist/components/Description/index.js +11 -0
- package/dist/components/Description/styles.css.d.ts +3 -0
- package/dist/components/Description/styles.css.js +13 -0
- package/dist/components/Description/types.d.ts +58 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +2 -1
- package/dist/stories/Description.stories.svelte.d.ts +19 -0
- package/package.json +23 -22
package/dist/assets/styles.css
CHANGED
|
@@ -1254,6 +1254,88 @@ img, picture, video, canvas {
|
|
|
1254
1254
|
.styles_alignments_justify__1u2u0bp4 {
|
|
1255
1255
|
justify-content: space-between;
|
|
1256
1256
|
}
|
|
1257
|
+
.styles_wrapper__ufl9s00 {
|
|
1258
|
+
display: flex;
|
|
1259
|
+
height: max-content;
|
|
1260
|
+
margin: 0;
|
|
1261
|
+
}
|
|
1262
|
+
.styles_direction_default__ufl9s01 {
|
|
1263
|
+
flex-direction: row;
|
|
1264
|
+
}
|
|
1265
|
+
.styles_direction_column__ufl9s02 {
|
|
1266
|
+
flex-direction: column;
|
|
1267
|
+
}
|
|
1268
|
+
.styles_direction_row__ufl9s03 {
|
|
1269
|
+
flex-direction: row;
|
|
1270
|
+
align-items: center;
|
|
1271
|
+
}
|
|
1272
|
+
.styles_justify_start__ufl9s04 {
|
|
1273
|
+
justify-content: flex-start;
|
|
1274
|
+
}
|
|
1275
|
+
.styles_justify_space-between__ufl9s05 {
|
|
1276
|
+
justify-content: space-between;
|
|
1277
|
+
}
|
|
1278
|
+
@media (max-width: 600px) {
|
|
1279
|
+
.styles_direction_default__ufl9s01 {
|
|
1280
|
+
flex-direction: column;
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
.styles_wrapper__7g3abg0 {
|
|
1284
|
+
flex-shrink: 0;
|
|
1285
|
+
align-self: flex-start;
|
|
1286
|
+
margin-right: var(--spacing-2);
|
|
1287
|
+
max-width: calc(100% - 12px);
|
|
1288
|
+
}
|
|
1289
|
+
.styles_leader__7g3abg1 {
|
|
1290
|
+
max-width: calc(100% - 36px);
|
|
1291
|
+
}
|
|
1292
|
+
.styles_dashedSeparator__7g3abg2 {
|
|
1293
|
+
flex: 1;
|
|
1294
|
+
align-self: flex-end;
|
|
1295
|
+
min-width: 12px;
|
|
1296
|
+
height: 4px;
|
|
1297
|
+
margin-bottom: var(--spacing-1);
|
|
1298
|
+
margin-right: var(--spacing-2);
|
|
1299
|
+
border-bottom: 1px dashed var(--colors-border);
|
|
1300
|
+
}
|
|
1301
|
+
@media (max-width: 600px) {
|
|
1302
|
+
.styles_dashedSeparator__7g3abg2 {
|
|
1303
|
+
display: none;
|
|
1304
|
+
}
|
|
1305
|
+
}
|
|
1306
|
+
.styles_wrapper__bnvj4a0 {
|
|
1307
|
+
display: grid;
|
|
1308
|
+
grid-template-columns: auto 1fr auto;
|
|
1309
|
+
align-items: center;
|
|
1310
|
+
overflow: hidden;
|
|
1311
|
+
overflow-wrap: break-word;
|
|
1312
|
+
hyphens: auto;
|
|
1313
|
+
cursor: default;
|
|
1314
|
+
margin: 0;
|
|
1315
|
+
}
|
|
1316
|
+
.styles_canCopy__bnvj4a1 {
|
|
1317
|
+
cursor: pointer;
|
|
1318
|
+
}
|
|
1319
|
+
.styles_canCopy__bnvj4a1:hover {
|
|
1320
|
+
text-decoration: underline;
|
|
1321
|
+
}
|
|
1322
|
+
.styles_copyIcon__bnvj4a2 {
|
|
1323
|
+
color: var(--colors-text-secondary);
|
|
1324
|
+
cursor: pointer;
|
|
1325
|
+
}
|
|
1326
|
+
.styles_copyIcon__bnvj4a2:hover {
|
|
1327
|
+
color: var(--colors-primary);
|
|
1328
|
+
}
|
|
1329
|
+
.styles_copyIcon__bnvj4a2[data-position="left"] {
|
|
1330
|
+
margin-right: var(--spacing-1);
|
|
1331
|
+
}
|
|
1332
|
+
.styles_copyIcon__bnvj4a2[data-position="right"] {
|
|
1333
|
+
margin-left: var(--spacing-1);
|
|
1334
|
+
}
|
|
1335
|
+
.styles_hidePersonalData__bnvj4a3 {
|
|
1336
|
+
filter: blur(4px);
|
|
1337
|
+
user-select: none;
|
|
1338
|
+
}
|
|
1257
1339
|
@keyframes styles_fadeIn__oq9x4f0 {
|
|
1258
1340
|
from {
|
|
1259
1341
|
opacity: 0;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { setDescriptionContext } from "./context.js";
|
|
2
|
+
import { direction, justify, wrapper } from "./styles.css.js";
|
|
3
|
+
import "svelte/internal/disclose-version";
|
|
4
|
+
import * as $ from "svelte/internal/client";
|
|
5
|
+
//#region src/components/Description/Description.svelte
|
|
6
|
+
function Description($$anchor, $$props) {
|
|
7
|
+
$.push($$props, true);
|
|
8
|
+
let justifyContent = $.prop($$props, "justifyContent", 3, "start"), leader = $.prop($$props, "leader", 3, false), separator = $.prop($$props, "separator", 3, ":"), component = $.prop($$props, "component", 3, "dl"), direction$1 = $.prop($$props, "direction", 3, "default");
|
|
9
|
+
setDescriptionContext({
|
|
10
|
+
get leader() {
|
|
11
|
+
return leader();
|
|
12
|
+
},
|
|
13
|
+
get separator() {
|
|
14
|
+
return separator();
|
|
15
|
+
},
|
|
16
|
+
get direction() {
|
|
17
|
+
return direction$1();
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
var fragment = $.comment();
|
|
21
|
+
var node = $.first_child(fragment);
|
|
22
|
+
$.element(node, component, false, ($$element, $$anchor) => {
|
|
23
|
+
$.attribute_effect($$element, () => ({ class: [
|
|
24
|
+
wrapper,
|
|
25
|
+
direction[direction$1()],
|
|
26
|
+
justify[justifyContent()],
|
|
27
|
+
$$props.class
|
|
28
|
+
] }));
|
|
29
|
+
var fragment_1 = $.comment();
|
|
30
|
+
var node_1 = $.first_child(fragment_1);
|
|
31
|
+
$.snippet(node_1, () => $$props.children ?? $.noop);
|
|
32
|
+
$.append($$anchor, fragment_1);
|
|
33
|
+
});
|
|
34
|
+
$.append($$anchor, fragment);
|
|
35
|
+
$.pop();
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { Description as default };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import Typography from "../../Typography/Typography.js";
|
|
2
|
+
import { getDescriptionContext } from "../context.js";
|
|
3
|
+
import { dashedSeparator, leader, wrapper } from "./styles.css.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import "svelte/internal/disclose-version";
|
|
6
|
+
import * as $ from "svelte/internal/client";
|
|
7
|
+
//#region src/components/Description/Name/Name.svelte
|
|
8
|
+
var root_2 = $.from_html(`<span class="separator svelte-1j0s5xm"> </span>`);
|
|
9
|
+
var root_3 = $.from_html(`<div></div>`);
|
|
10
|
+
var root = $.from_html(`<dt><!> <!></dt> <!>`, 1);
|
|
11
|
+
function Name($$anchor, $$props) {
|
|
12
|
+
$.push($$props, true);
|
|
13
|
+
let color = $.prop($$props, "color", 3, "secondary"), variant = $.prop($$props, "variant", 3, "body2");
|
|
14
|
+
const context = getDescriptionContext();
|
|
15
|
+
const leader$1 = $.derived(() => context.leader);
|
|
16
|
+
const direction = $.derived(() => context.direction);
|
|
17
|
+
const showSeparator = $.derived(() => !$.get(leader$1) && $.get(direction) !== "column");
|
|
18
|
+
var fragment = root();
|
|
19
|
+
var dt = $.first_child(fragment);
|
|
20
|
+
var node = $.child(dt);
|
|
21
|
+
Typography(node, {
|
|
22
|
+
get color() {
|
|
23
|
+
return color();
|
|
24
|
+
},
|
|
25
|
+
get variant() {
|
|
26
|
+
return variant();
|
|
27
|
+
},
|
|
28
|
+
component: "span",
|
|
29
|
+
children: ($$anchor, $$slotProps) => {
|
|
30
|
+
var fragment_1 = $.comment();
|
|
31
|
+
var node_1 = $.first_child(fragment_1);
|
|
32
|
+
$.snippet(node_1, () => $$props.children ?? $.noop);
|
|
33
|
+
$.append($$anchor, fragment_1);
|
|
34
|
+
},
|
|
35
|
+
$$slots: { default: true }
|
|
36
|
+
});
|
|
37
|
+
var node_2 = $.sibling(node, 2);
|
|
38
|
+
var consequent = ($$anchor) => {
|
|
39
|
+
var span = root_2();
|
|
40
|
+
var text = $.child(span, true);
|
|
41
|
+
$.reset(span);
|
|
42
|
+
$.template_effect(() => $.set_text(text, context.separator));
|
|
43
|
+
$.append($$anchor, span);
|
|
44
|
+
};
|
|
45
|
+
$.if(node_2, ($$render) => {
|
|
46
|
+
if ($.get(showSeparator)) $$render(consequent);
|
|
47
|
+
});
|
|
48
|
+
$.reset(dt);
|
|
49
|
+
var node_3 = $.sibling(dt, 2);
|
|
50
|
+
var consequent_1 = ($$anchor) => {
|
|
51
|
+
var div = root_3();
|
|
52
|
+
$.template_effect(() => $.set_class(div, 1, $.clsx(dashedSeparator), "svelte-1j0s5xm"));
|
|
53
|
+
$.append($$anchor, div);
|
|
54
|
+
};
|
|
55
|
+
$.if(node_3, ($$render) => {
|
|
56
|
+
if ($.get(leader$1)) $$render(consequent_1);
|
|
57
|
+
});
|
|
58
|
+
$.template_effect(() => $.set_class(dt, 1, $.clsx([
|
|
59
|
+
wrapper,
|
|
60
|
+
{ [leader]: $.get(leader$1) },
|
|
61
|
+
$$props.class
|
|
62
|
+
]), "svelte-1j0s5xm"));
|
|
63
|
+
$.append($$anchor, fragment);
|
|
64
|
+
$.pop();
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
export { Name as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Name } from './Name.svelte';
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import Typography from "../../Typography/Typography.js";
|
|
2
|
+
import { getDescriptionContext } from "../context.js";
|
|
3
|
+
import { canCopy, copyIcon, hidePersonalData, wrapper } from "./styles.css.js";
|
|
4
|
+
import "svelte/internal/disclose-version";
|
|
5
|
+
import * as $ from "svelte/internal/client";
|
|
6
|
+
import { Check, Copy } from "@lucide/svelte";
|
|
7
|
+
//#region src/components/Description/Value/Value.svelte
|
|
8
|
+
var root = $.from_html(`<dd><!> <!> <!></dd>`);
|
|
9
|
+
function Value($$anchor, $$props) {
|
|
10
|
+
$.push($$props, true);
|
|
11
|
+
const copyIcon$1 = ($$anchor) => {
|
|
12
|
+
var fragment = $.comment();
|
|
13
|
+
var node = $.first_child(fragment);
|
|
14
|
+
var consequent = ($$anchor) => {
|
|
15
|
+
Check($$anchor, {
|
|
16
|
+
size: 16,
|
|
17
|
+
get class() {
|
|
18
|
+
return copyIcon;
|
|
19
|
+
},
|
|
20
|
+
"aria-label": "Copy",
|
|
21
|
+
get "data-position"() {
|
|
22
|
+
return copyPosition();
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var alternate = ($$anchor) => {
|
|
27
|
+
Copy($$anchor, {
|
|
28
|
+
size: 16,
|
|
29
|
+
get class() {
|
|
30
|
+
return copyIcon;
|
|
31
|
+
},
|
|
32
|
+
"aria-label": "Copy",
|
|
33
|
+
get "data-position"() {
|
|
34
|
+
return copyPosition();
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
$.if(node, ($$render) => {
|
|
39
|
+
if ($.get(copied)) $$render(consequent);
|
|
40
|
+
else $$render(alternate, -1);
|
|
41
|
+
});
|
|
42
|
+
$.append($$anchor, fragment);
|
|
43
|
+
};
|
|
44
|
+
let canCopy$1 = $.prop($$props, "canCopy", 3, false), copyPosition = $.prop($$props, "copyPosition", 3, "right"), isHidePersonalData = $.prop($$props, "isHidePersonalData", 3, false), color = $.prop($$props, "color", 3, "primary"), variant = $.prop($$props, "variant", 3, "body2");
|
|
45
|
+
const context = getDescriptionContext();
|
|
46
|
+
const align = $.derived(() => context.leader || context.direction === "row" ? "right" : "left");
|
|
47
|
+
let copied = $.state(false);
|
|
48
|
+
async function handleCopy(event) {
|
|
49
|
+
if (!canCopy$1()) return;
|
|
50
|
+
event.preventDefault();
|
|
51
|
+
let textToCopy = $$props.copyText;
|
|
52
|
+
if (!textToCopy && event.currentTarget instanceof HTMLElement) textToCopy = event.currentTarget.innerText;
|
|
53
|
+
if (textToCopy) try {
|
|
54
|
+
await navigator.clipboard.writeText(textToCopy);
|
|
55
|
+
$.set(copied, true);
|
|
56
|
+
setTimeout(() => {
|
|
57
|
+
$.set(copied, false);
|
|
58
|
+
}, 2e3);
|
|
59
|
+
} catch (err) {
|
|
60
|
+
console.error("Failed to copy text: ", err);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
var dd = root();
|
|
64
|
+
var node_1 = $.child(dd);
|
|
65
|
+
var consequent_1 = ($$anchor) => {
|
|
66
|
+
copyIcon$1($$anchor);
|
|
67
|
+
};
|
|
68
|
+
$.if(node_1, ($$render) => {
|
|
69
|
+
if (canCopy$1() && copyPosition() === "left") $$render(consequent_1);
|
|
70
|
+
});
|
|
71
|
+
var node_2 = $.sibling(node_1, 2);
|
|
72
|
+
Typography(node_2, {
|
|
73
|
+
get color() {
|
|
74
|
+
return color();
|
|
75
|
+
},
|
|
76
|
+
get variant() {
|
|
77
|
+
return variant();
|
|
78
|
+
},
|
|
79
|
+
get align() {
|
|
80
|
+
return $.get(align);
|
|
81
|
+
},
|
|
82
|
+
children: ($$anchor, $$slotProps) => {
|
|
83
|
+
var fragment_4 = $.comment();
|
|
84
|
+
var node_3 = $.first_child(fragment_4);
|
|
85
|
+
var consequent_2 = ($$anchor) => {
|
|
86
|
+
var fragment_5 = $.comment();
|
|
87
|
+
var node_4 = $.first_child(fragment_5);
|
|
88
|
+
$.snippet(node_4, () => $$props.children);
|
|
89
|
+
$.append($$anchor, fragment_5);
|
|
90
|
+
};
|
|
91
|
+
var consequent_4 = ($$anchor) => {
|
|
92
|
+
var fragment_6 = $.comment();
|
|
93
|
+
var node_5 = $.first_child(fragment_6);
|
|
94
|
+
var consequent_3 = ($$anchor) => {
|
|
95
|
+
var text = $.text();
|
|
96
|
+
$.template_effect(() => $.set_text(text, $$props.stub));
|
|
97
|
+
$.append($$anchor, text);
|
|
98
|
+
};
|
|
99
|
+
var alternate_1 = ($$anchor) => {
|
|
100
|
+
var fragment_8 = $.comment();
|
|
101
|
+
var node_6 = $.first_child(fragment_8);
|
|
102
|
+
$.snippet(node_6, () => $$props.stub);
|
|
103
|
+
$.append($$anchor, fragment_8);
|
|
104
|
+
};
|
|
105
|
+
$.if(node_5, ($$render) => {
|
|
106
|
+
if (typeof $$props.stub === "string") $$render(consequent_3);
|
|
107
|
+
else $$render(alternate_1, -1);
|
|
108
|
+
});
|
|
109
|
+
$.append($$anchor, fragment_6);
|
|
110
|
+
};
|
|
111
|
+
var alternate_2 = ($$anchor) => {
|
|
112
|
+
var text_1 = $.text("—");
|
|
113
|
+
$.append($$anchor, text_1);
|
|
114
|
+
};
|
|
115
|
+
$.if(node_3, ($$render) => {
|
|
116
|
+
if ($$props.children) $$render(consequent_2);
|
|
117
|
+
else if ($$props.stub) $$render(consequent_4, 1);
|
|
118
|
+
else $$render(alternate_2, -1);
|
|
119
|
+
});
|
|
120
|
+
$.append($$anchor, fragment_4);
|
|
121
|
+
},
|
|
122
|
+
$$slots: { default: true }
|
|
123
|
+
});
|
|
124
|
+
var node_7 = $.sibling(node_2, 2);
|
|
125
|
+
var consequent_5 = ($$anchor) => {
|
|
126
|
+
copyIcon$1($$anchor);
|
|
127
|
+
};
|
|
128
|
+
$.if(node_7, ($$render) => {
|
|
129
|
+
if (canCopy$1() && copyPosition() === "right") $$render(consequent_5);
|
|
130
|
+
});
|
|
131
|
+
$.reset(dd);
|
|
132
|
+
$.template_effect(() => {
|
|
133
|
+
$.set_attribute(dd, "data-hide-personal-data", isHidePersonalData() ? true : void 0);
|
|
134
|
+
$.set_class(dd, 1, $.clsx([
|
|
135
|
+
wrapper,
|
|
136
|
+
{
|
|
137
|
+
[canCopy]: canCopy$1(),
|
|
138
|
+
[hidePersonalData]: isHidePersonalData()
|
|
139
|
+
},
|
|
140
|
+
$$props.class
|
|
141
|
+
]));
|
|
142
|
+
});
|
|
143
|
+
$.delegated("click", dd, handleCopy);
|
|
144
|
+
$.append($$anchor, dd);
|
|
145
|
+
$.pop();
|
|
146
|
+
}
|
|
147
|
+
$.delegate(["click"]);
|
|
148
|
+
//#endregion
|
|
149
|
+
export { Value as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Value } from './Value.svelte';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//#region src/components/Description/Value/styles.css.ts
|
|
2
|
+
var canCopy = "styles_canCopy__bnvj4a1";
|
|
3
|
+
var copyIcon = "styles_copyIcon__bnvj4a2";
|
|
4
|
+
var hidePersonalData = "styles_hidePersonalData__bnvj4a3";
|
|
5
|
+
var wrapper = "styles_wrapper__bnvj4a0";
|
|
6
|
+
//#endregion
|
|
7
|
+
export { canCopy, copyIcon, hidePersonalData, wrapper };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DescriptionDirection } from './types';
|
|
2
|
+
export declare const DESCRIPTION_CONTEXT_KEY: unique symbol;
|
|
3
|
+
export type DescriptionContext = {
|
|
4
|
+
leader: boolean;
|
|
5
|
+
separator: string;
|
|
6
|
+
direction: DescriptionDirection;
|
|
7
|
+
};
|
|
8
|
+
export declare function setDescriptionContext(context: DescriptionContext): void;
|
|
9
|
+
export declare function getDescriptionContext(): DescriptionContext;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { getContext, setContext } from "svelte";
|
|
2
|
+
//#region src/components/Description/context.ts
|
|
3
|
+
const DESCRIPTION_CONTEXT_KEY = Symbol("DESCRIPTION_CONTEXT");
|
|
4
|
+
function setDescriptionContext(context) {
|
|
5
|
+
setContext(DESCRIPTION_CONTEXT_KEY, context);
|
|
6
|
+
}
|
|
7
|
+
function getDescriptionContext() {
|
|
8
|
+
return getContext(DESCRIPTION_CONTEXT_KEY) || {
|
|
9
|
+
leader: false,
|
|
10
|
+
separator: ":",
|
|
11
|
+
direction: "default"
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { getDescriptionContext, setDescriptionContext };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type { DescriptionDirection, DescriptionJustifyContent, DescriptionNameProps, DescriptionProps, DescriptionValueProps, } from './types';
|
|
2
|
+
export declare const Description: {
|
|
3
|
+
Root: import("svelte").Component<import("./types").DescriptionProps, {}, "">;
|
|
4
|
+
Name: import("svelte").Component<import("./types").DescriptionNameProps, {}, "">;
|
|
5
|
+
Value: import("svelte").Component<import("./types").DescriptionValueProps, {}, "">;
|
|
6
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Description$1 from "./Description.js";
|
|
2
|
+
import Name from "./Name/Name2.js";
|
|
3
|
+
import Value from "./Value/Value.js";
|
|
4
|
+
//#region src/components/Description/index.ts
|
|
5
|
+
const Description = {
|
|
6
|
+
Root: Description$1,
|
|
7
|
+
Name,
|
|
8
|
+
Value
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Description };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region src/components/Description/styles.css.ts
|
|
2
|
+
var direction = {
|
|
3
|
+
"default": "styles_direction_default__ufl9s01",
|
|
4
|
+
column: "styles_direction_column__ufl9s02",
|
|
5
|
+
row: "styles_direction_row__ufl9s03"
|
|
6
|
+
};
|
|
7
|
+
var justify = {
|
|
8
|
+
start: "styles_justify_start__ufl9s04",
|
|
9
|
+
"space-between": "styles_justify_space-between__ufl9s05"
|
|
10
|
+
};
|
|
11
|
+
var wrapper = "styles_wrapper__ufl9s00";
|
|
12
|
+
//#endregion
|
|
13
|
+
export { direction, justify, wrapper };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { TypographyColor, TypographyVariant } from '../Typography';
|
|
3
|
+
export type DescriptionDirection = 'default' | 'column' | 'row';
|
|
4
|
+
export type DescriptionJustifyContent = 'space-between' | 'start';
|
|
5
|
+
export type DescriptionProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Элементы DescriptionName и DescriptionValue
|
|
8
|
+
*/
|
|
9
|
+
children?: Snippet<[]>;
|
|
10
|
+
/**
|
|
11
|
+
* Позиционирует элементы либо по разным краям, либо по левому краю
|
|
12
|
+
*/
|
|
13
|
+
justifyContent?: DescriptionJustifyContent;
|
|
14
|
+
/**
|
|
15
|
+
* Добавляет dashed разделитель, заполняющего свободное пространство между Name и Value
|
|
16
|
+
*/
|
|
17
|
+
leader?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Определяет разделитель между Name и Value
|
|
20
|
+
* @default ':'
|
|
21
|
+
*/
|
|
22
|
+
separator?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Определяет тип корневого HTML-элемента
|
|
25
|
+
*/
|
|
26
|
+
component?: 'div' | 'dl';
|
|
27
|
+
/**
|
|
28
|
+
* Определяет перенос строк
|
|
29
|
+
* @default 'default'
|
|
30
|
+
*/
|
|
31
|
+
direction?: DescriptionDirection;
|
|
32
|
+
class?: string;
|
|
33
|
+
};
|
|
34
|
+
export type DescriptionNameProps = {
|
|
35
|
+
children?: Snippet<[]>;
|
|
36
|
+
color?: TypographyColor;
|
|
37
|
+
variant?: TypographyVariant;
|
|
38
|
+
class?: string;
|
|
39
|
+
};
|
|
40
|
+
export type DescriptionValueProps = {
|
|
41
|
+
children?: Snippet<[]>;
|
|
42
|
+
color?: TypographyColor;
|
|
43
|
+
variant?: TypographyVariant;
|
|
44
|
+
/**
|
|
45
|
+
* Заглушка, отображающаяся, если нет значения
|
|
46
|
+
*/
|
|
47
|
+
stub?: Snippet<[]> | string;
|
|
48
|
+
/**
|
|
49
|
+
* Символ-заглушка, если нет значения и stub
|
|
50
|
+
* @default '—'
|
|
51
|
+
*/
|
|
52
|
+
emptySymbol?: string;
|
|
53
|
+
canCopy?: boolean;
|
|
54
|
+
copyPosition?: 'left' | 'right';
|
|
55
|
+
copyText?: string;
|
|
56
|
+
isHidePersonalData?: boolean;
|
|
57
|
+
class?: string;
|
|
58
|
+
};
|
|
@@ -11,6 +11,7 @@ export { CircularProgress, type CircularProgressProps, } from './CircularProgres
|
|
|
11
11
|
export { ContentState, type ContentStateErrorProps, type ContentStateProps, } from './ContentState';
|
|
12
12
|
export { DataGrid, type DataGridColumn, type DataGridColumns, type DataGridProps, type DataGridState, } from './DataGrid';
|
|
13
13
|
export { DataGridSortHeader, type DataGridSortHeaderProps, type DataGridSorting, } from './DataGridSortHeader';
|
|
14
|
+
export { Description, type DescriptionDirection, type DescriptionJustifyContent, type DescriptionNameProps, type DescriptionProps, type DescriptionValueProps, } from './Description';
|
|
14
15
|
export { Dialog, type DialogCloseProps, type DialogContentProps, type DialogDescriptionProps, type DialogFooterProps, type DialogHeaderProps, type DialogProps, type DialogTitleProps, type DialogTriggerProps, } from './Dialog';
|
|
15
16
|
export { Drawer, type DrawerCloseProps, type DrawerContentProps, type DrawerDescriptionProps, type DrawerFooterProps, type DrawerHeaderProps, type DrawerOverlayProps, type DrawerPortalProps, type DrawerProps, type DrawerTitleProps, type DrawerTriggerProps, } from './Drawer';
|
|
16
17
|
export type { DropdownMenuProps } from './DropdownMenu';
|
package/dist/components/index.js
CHANGED
|
@@ -17,6 +17,7 @@ import Spinner from "./Spinner/Spinner.js";
|
|
|
17
17
|
import ContentState from "./ContentState/ContentState.js";
|
|
18
18
|
import DataGrid from "./DataGrid/DataGrid.js";
|
|
19
19
|
import DataGridSortHeader from "./DataGridSortHeader/DataGridSortHeader.js";
|
|
20
|
+
import { Description } from "./Description/index.js";
|
|
20
21
|
import { Dialog } from "./Dialog/index.js";
|
|
21
22
|
import { Drawer } from "./Drawer/index.js";
|
|
22
23
|
import { DropdownMenu_exports } from "./DropdownMenu/index.js";
|
|
@@ -35,4 +36,4 @@ import { Select } from "./Select/index.js";
|
|
|
35
36
|
import SliderInput from "./SliderInput/SliderInput.js";
|
|
36
37
|
import { Tabs } from "./Tabs/index.js";
|
|
37
38
|
import Tooltip from "./Tooltip/Tooltip.js";
|
|
38
|
-
export { Accordion, Alert, Badge, Button, ButtonGroup, Calendar, Card, Carousel, Checkbox, CircularProgress, ContentState, DataGrid, DataGridSortHeader, Dialog, Drawer, DropdownMenu_exports as DropdownMenu, Empty, Field, Input, InputGroup, Item, Label_1 as Label, Placeholder, Popover, Portal, RangeInput, ScalableContainer, Select, Separator, Slider, SliderInput, Spinner, Tabs, Tooltip, Typography, badgeVariants, buttonVariants };
|
|
39
|
+
export { Accordion, Alert, Badge, Button, ButtonGroup, Calendar, Card, Carousel, Checkbox, CircularProgress, ContentState, DataGrid, DataGridSortHeader, Description, Dialog, Drawer, DropdownMenu_exports as DropdownMenu, Empty, Field, Input, InputGroup, Item, Label_1 as Label, Placeholder, Popover, Portal, RangeInput, ScalableContainer, Select, Separator, Slider, SliderInput, Spinner, Tabs, Tooltip, Typography, badgeVariants, buttonVariants };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Description } from '../components';
|
|
2
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
3
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
+
$$bindings?: Bindings;
|
|
5
|
+
} & Exports;
|
|
6
|
+
(internal: unknown, props: {
|
|
7
|
+
$$events?: Events;
|
|
8
|
+
$$slots?: Slots;
|
|
9
|
+
}): Exports & {
|
|
10
|
+
$set?: any;
|
|
11
|
+
$on?: any;
|
|
12
|
+
};
|
|
13
|
+
z_$$bindings?: Bindings;
|
|
14
|
+
}
|
|
15
|
+
declare const Description: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
16
|
+
[evt: string]: CustomEvent<any>;
|
|
17
|
+
}, {}, {}, string>;
|
|
18
|
+
type Description = InstanceType<typeof Description>;
|
|
19
|
+
export default Description;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@max-ts/svelte",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Svelte component library.",
|
|
6
6
|
"author": "Tsepelev Maksim",
|
|
@@ -36,39 +36,40 @@
|
|
|
36
36
|
"svelte": "^5.53.5"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@biomejs/biome": "^2.4.
|
|
40
|
-
"@changesets/cli": "^2.
|
|
41
|
-
"@chromatic-com/storybook": "^5.1.
|
|
42
|
-
"@internationalized/date": "^3.12.
|
|
43
|
-
"@storybook/addon-a11y": "^10.3.
|
|
44
|
-
"@storybook/addon-docs": "^10.3.
|
|
39
|
+
"@biomejs/biome": "^2.4.14",
|
|
40
|
+
"@changesets/cli": "^2.31.0",
|
|
41
|
+
"@chromatic-com/storybook": "^5.1.2",
|
|
42
|
+
"@internationalized/date": "^3.12.1",
|
|
43
|
+
"@storybook/addon-a11y": "^10.3.6",
|
|
44
|
+
"@storybook/addon-docs": "^10.3.6",
|
|
45
45
|
"@storybook/addon-svelte-csf": "^5.1.2",
|
|
46
|
-
"@storybook/addon-vitest": "^10.3.
|
|
47
|
-
"@storybook/sveltekit": "^10.3.
|
|
46
|
+
"@storybook/addon-vitest": "^10.3.6",
|
|
47
|
+
"@storybook/sveltekit": "^10.3.6",
|
|
48
48
|
"@sveltejs/vite-plugin-svelte": "^7.0.0",
|
|
49
49
|
"@tsconfig/svelte": "^5.0.8",
|
|
50
|
-
"@
|
|
50
|
+
"@tsdown/css": "^0.21.10",
|
|
51
|
+
"@types/node": "^25.6.0",
|
|
51
52
|
"@vanilla-extract/css": "^1.20.1",
|
|
52
53
|
"@vanilla-extract/rollup-plugin": "^1.5.3",
|
|
53
54
|
"@vanilla-extract/vite-plugin": "^5.2.2",
|
|
54
|
-
"@vitest/browser-playwright": "^4.1.
|
|
55
|
+
"@vitest/browser-playwright": "^4.1.5",
|
|
55
56
|
"bumpp": "^11.0.1",
|
|
56
57
|
"rollup-plugin-svelte": "^7.2.3",
|
|
57
|
-
"storybook": "^10.3.
|
|
58
|
-
"svelte": "^5.55.
|
|
59
|
-
"svelte-check": "^4.4.
|
|
60
|
-
"svelte2tsx": "^0.7.
|
|
61
|
-
"tsdown": "0.21.
|
|
62
|
-
"typescript": "^6.0.
|
|
63
|
-
"vite": "^8.0.
|
|
58
|
+
"storybook": "^10.3.6",
|
|
59
|
+
"svelte": "^5.55.5",
|
|
60
|
+
"svelte-check": "^4.4.7",
|
|
61
|
+
"svelte2tsx": "^0.7.54",
|
|
62
|
+
"tsdown": "0.21.10",
|
|
63
|
+
"typescript": "^6.0.3",
|
|
64
|
+
"vite": "^8.0.10",
|
|
64
65
|
"vite-tsconfig-paths": "^6.1.1",
|
|
65
|
-
"vitest": "^4.1.
|
|
66
|
-
"vitest-browser-svelte": "^2.1.
|
|
66
|
+
"vitest": "^4.1.5",
|
|
67
|
+
"vitest-browser-svelte": "^2.1.1"
|
|
67
68
|
},
|
|
68
69
|
"dependencies": {
|
|
69
70
|
"@floating-ui/dom": "^1.7.6",
|
|
70
|
-
"@lucide/svelte": "^1.
|
|
71
|
-
"bits-ui": "^2.
|
|
71
|
+
"@lucide/svelte": "^1.14.0",
|
|
72
|
+
"bits-ui": "^2.18.1"
|
|
72
73
|
},
|
|
73
74
|
"scripts": {
|
|
74
75
|
"build": "tsdown",
|