@bysages/solid 0.4.2 → 0.4.4
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/components/avatar/index.d.mts +16 -4
- package/dist/components/avatar/index.mjs +60 -3
- package/dist/components/banner/index.d.mts +17 -1
- package/dist/components/banner/index.mjs +78 -2
- package/dist/components/breadcrumb/index.d.mts +14 -1
- package/dist/components/breadcrumb/index.mjs +51 -2
- package/dist/components/color-picker/index.d.mts +4 -0
- package/dist/components/color-picker/index.mjs +65 -31
- package/dist/components/float-button/index.d.mts +24 -1
- package/dist/components/float-button/index.mjs +73 -2
- package/dist/components/tag/index.mjs +39 -26
- package/dist/components/user/index.mjs +8 -2
- package/dist/generative/index.d.mts +47 -0
- package/dist/generative/index.mjs +959 -0
- package/dist/index.d.mts +5 -5
- package/package.json +2 -2
|
@@ -4,8 +4,8 @@ import { delegateEvents, effect, insert, setAttribute, spread, template } from "
|
|
|
4
4
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
5
5
|
import { createMemo, createSignal, splitProps } from "solid-js";
|
|
6
6
|
//#region src/components/tag/index.tsx
|
|
7
|
-
var _tmpl$ = /* @__PURE__ */ template(`<
|
|
8
|
-
var _tmpl$2 = /* @__PURE__ */ template(`<button type=button data-scope=tag data-part=
|
|
7
|
+
var _tmpl$ = /* @__PURE__ */ template(`<button type=button data-scope=tag data-part=close aria-label=Remove>`);
|
|
8
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<span><button type=button data-scope=tag data-part=check>`);
|
|
9
9
|
var _tmpl$3 = /* @__PURE__ */ template(`<button><!><!>`);
|
|
10
10
|
var _tmpl$4 = /* @__PURE__ */ template(`<span><!><!>`);
|
|
11
11
|
const Tag = withSelfRoot(function Tag(props) {
|
|
@@ -45,29 +45,42 @@ const Tag = withSelfRoot(function Tag(props) {
|
|
|
45
45
|
...pressed() ? { "data-checked": "true" } : {},
|
|
46
46
|
...own.disabled ? { "data-disabled": "true" } : {}
|
|
47
47
|
});
|
|
48
|
-
const closeControl = own.closable ?
|
|
48
|
+
const closeControl = own.closable ? (() => {
|
|
49
49
|
var _el$ = _tmpl$();
|
|
50
50
|
_el$._$$click = dismiss;
|
|
51
51
|
insert(_el$, () => {
|
|
52
52
|
return iconNode("x");
|
|
53
53
|
});
|
|
54
|
+
effect(() => own.disabled, (_v$) => {
|
|
55
|
+
setAttribute(_el$, "disabled", _v$);
|
|
56
|
+
});
|
|
54
57
|
return _el$;
|
|
55
|
-
})() :
|
|
58
|
+
})() : null;
|
|
59
|
+
if (own.checkable && own.closable) {
|
|
56
60
|
var _el$2 = _tmpl$2();
|
|
57
|
-
_el$
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
var _el$3 = _el$2.firstChild;
|
|
62
|
+
spread(_el$2, [rest, rootAttrs], true);
|
|
63
|
+
_el$3._$$click = toggle;
|
|
64
|
+
insert(_el$3, () => {
|
|
65
|
+
return own.children;
|
|
60
66
|
});
|
|
61
|
-
|
|
62
|
-
|
|
67
|
+
insert(_el$2, closeControl, null);
|
|
68
|
+
effect(() => {
|
|
69
|
+
return {
|
|
70
|
+
e: checked(),
|
|
71
|
+
t: own.disabled
|
|
72
|
+
};
|
|
73
|
+
}, ({ e, t }, _p$) => {
|
|
74
|
+
e !== _p$?.e && setAttribute(_el$3, "aria-pressed", e);
|
|
75
|
+
t !== _p$?.t && setAttribute(_el$3, "disabled", t);
|
|
63
76
|
});
|
|
64
77
|
return _el$2;
|
|
65
|
-
}
|
|
78
|
+
}
|
|
66
79
|
if (own.checkable) {
|
|
67
|
-
var _el$
|
|
68
|
-
var _el$
|
|
69
|
-
var _el$
|
|
70
|
-
spread(_el$
|
|
80
|
+
var _el$4 = _tmpl$3();
|
|
81
|
+
var _el$5 = _el$4.firstChild;
|
|
82
|
+
var _el$6 = _el$5.nextSibling;
|
|
83
|
+
spread(_el$4, [
|
|
71
84
|
rest,
|
|
72
85
|
rootAttrs,
|
|
73
86
|
{
|
|
@@ -81,27 +94,27 @@ const Tag = withSelfRoot(function Tag(props) {
|
|
|
81
94
|
onclick: toggle
|
|
82
95
|
}
|
|
83
96
|
], true);
|
|
84
|
-
insert(_el$
|
|
97
|
+
insert(_el$4, () => {
|
|
85
98
|
return own.children;
|
|
86
|
-
}, _el$
|
|
87
|
-
insert(_el$
|
|
88
|
-
return _el$
|
|
99
|
+
}, _el$5);
|
|
100
|
+
insert(_el$4, closeControl, _el$6);
|
|
101
|
+
return _el$4;
|
|
89
102
|
}
|
|
90
|
-
var _el$
|
|
91
|
-
var _el$
|
|
92
|
-
var _el$
|
|
93
|
-
spread(_el$
|
|
103
|
+
var _el$7 = _tmpl$4();
|
|
104
|
+
var _el$8 = _el$7.firstChild;
|
|
105
|
+
var _el$9 = _el$8.nextSibling;
|
|
106
|
+
spread(_el$7, [
|
|
94
107
|
rest,
|
|
95
108
|
rootAttrs,
|
|
96
109
|
() => {
|
|
97
110
|
return own.disabled ? { "aria-disabled": "true" } : {};
|
|
98
111
|
}
|
|
99
112
|
], true);
|
|
100
|
-
insert(_el$
|
|
113
|
+
insert(_el$7, () => {
|
|
101
114
|
return own.children;
|
|
102
|
-
}, _el$
|
|
103
|
-
insert(_el$
|
|
104
|
-
return _el$
|
|
115
|
+
}, _el$8);
|
|
116
|
+
insert(_el$7, closeControl, _el$9);
|
|
117
|
+
return _el$7;
|
|
105
118
|
});
|
|
106
119
|
delegateEvents(["click"]);
|
|
107
120
|
//#endregion
|
|
@@ -43,9 +43,15 @@ const User = withSelfRoot(function User(props) {
|
|
|
43
43
|
return own.shape ?? "circle";
|
|
44
44
|
},
|
|
45
45
|
get children() {
|
|
46
|
-
return
|
|
46
|
+
return [memo(() => {
|
|
47
|
+
return memo(() => {
|
|
48
|
+
return !!own.src;
|
|
49
|
+
})() ? createComponent(Avatar.Image, { get src() {
|
|
50
|
+
return own.src;
|
|
51
|
+
} }) : null;
|
|
52
|
+
}), createComponent(Avatar.Fallback, { get children() {
|
|
47
53
|
return initials();
|
|
48
|
-
} });
|
|
54
|
+
} })];
|
|
49
55
|
}
|
|
50
56
|
}), _el$2);
|
|
51
57
|
insert(_el$3, () => {
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/generative/index.d.ts
|
|
3
|
+
export declare const catalog: import("@json-render/core").Catalog<{
|
|
4
|
+
spec: import("@json-render/core").SchemaType<"object", {
|
|
5
|
+
root: import("@json-render/core").SchemaType<"string", unknown>;
|
|
6
|
+
elements: import("@json-render/core").SchemaType<"record", import("@json-render/core").SchemaType<"object", {
|
|
7
|
+
type: import("@json-render/core").SchemaType<"ref", string>;
|
|
8
|
+
props: import("@json-render/core").SchemaType<"propsOf", string>;
|
|
9
|
+
children: import("@json-render/core").SchemaType<"array", import("@json-render/core").SchemaType<"string", unknown>>;
|
|
10
|
+
visible: {
|
|
11
|
+
optional: true;
|
|
12
|
+
kind: "any";
|
|
13
|
+
inner?: unknown;
|
|
14
|
+
};
|
|
15
|
+
repeat: {
|
|
16
|
+
optional: true;
|
|
17
|
+
kind: "any";
|
|
18
|
+
inner?: unknown;
|
|
19
|
+
};
|
|
20
|
+
}>>;
|
|
21
|
+
}>;
|
|
22
|
+
catalog: import("@json-render/core").SchemaType<"object", {
|
|
23
|
+
components: import("@json-render/core").SchemaType<"map", {
|
|
24
|
+
props: import("@json-render/core").SchemaType<"zod", unknown>;
|
|
25
|
+
slots: import("@json-render/core").SchemaType<"array", import("@json-render/core").SchemaType<"string", unknown>>;
|
|
26
|
+
description: import("@json-render/core").SchemaType<"string", unknown>;
|
|
27
|
+
example: import("@json-render/core").SchemaType<"any", unknown>;
|
|
28
|
+
}>;
|
|
29
|
+
actions: import("@json-render/core").SchemaType<"map", {
|
|
30
|
+
params: import("@json-render/core").SchemaType<"zod", unknown>;
|
|
31
|
+
description: import("@json-render/core").SchemaType<"string", unknown>;
|
|
32
|
+
}>;
|
|
33
|
+
}>;
|
|
34
|
+
}, {
|
|
35
|
+
components: Record<string, {
|
|
36
|
+
props: z.ZodObject;
|
|
37
|
+
description: string;
|
|
38
|
+
}>;
|
|
39
|
+
actions: {};
|
|
40
|
+
}>;
|
|
41
|
+
declare const registry: import("@json-render/solid").ComponentRegistry;
|
|
42
|
+
/** Which family each face came home from. A family may speak under
|
|
43
|
+
* several names - Layout plus its parts, Bento plus its cell - and the
|
|
44
|
+
* palette groups by provenance, never by guessing from the name. */
|
|
45
|
+
export declare const faceFamilies: Record<string, string>;
|
|
46
|
+
//#endregion
|
|
47
|
+
export { registry };
|