solid-tiny-ui 0.4.0 → 0.5.0
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/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/buttons/basic-button/basic-button.js +1 -1
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/buttons/basic-button/basic-button.jsx +1 -1
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/time-picker/time-picker.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/time-picker/time-picker.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/visually-hidden/visually-hidden.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/visually-hidden/visually-hidden.jsx +5 -0
- package/dist/components/buttons/state-button/state-button.d.ts +2 -2
- package/dist/components/combobox/combobox.d.ts +2 -2
- package/dist/components/input/input.d.ts +2 -2
- package/dist/components/modal/index.d.ts +2 -2
- package/dist/components/popover/index.js +4 -3
- package/dist/components/popover/index.jsx +2 -1
- package/dist/components/progress/line-progress.d.ts +2 -2
- package/dist/components/progress/loading-bar.d.ts +2 -2
- package/dist/components/spin/spin-ring.d.ts +2 -2
- package/dist/components/time-picker/index.d.ts +18 -0
- package/dist/components/time-picker/index.js +90 -0
- package/dist/components/time-picker/index.jsx +39 -0
- package/dist/components/time-picker/panel.js +185 -0
- package/dist/components/time-picker/panel.jsx +108 -0
- package/dist/components/time-picker/trigger.js +64 -0
- package/dist/components/time-picker/trigger.jsx +37 -0
- package/dist/components/visually-hidden/index.js +17 -0
- package/dist/components/visually-hidden/index.jsx +11 -0
- package/dist/icons/check-line.d.ts +6 -0
- package/dist/icons/check-line.js +13 -0
- package/dist/icons/check-line.jsx +11 -0
- package/dist/icons/index.d.ts +2 -1
- package/dist/icons/index.js +2 -1
- package/dist/icons/index.jsx +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/index.jsx +2 -1
- package/dist/primitives/animated-group/context.d.ts +9 -9
- package/dist/primitives/animated-group/root.d.ts +2 -2
- package/dist/primitives/fake-scroll-list/context.js +30 -0
- package/dist/primitives/fake-scroll-list/context.jsx +30 -0
- package/dist/primitives/fake-scroll-list/index.d.ts +52 -0
- package/dist/primitives/fake-scroll-list/index.js +36 -0
- package/dist/primitives/fake-scroll-list/index.jsx +36 -0
- package/dist/primitives/fake-scroll-list/item.d.ts +11 -0
- package/dist/primitives/fake-scroll-list/item.js +30 -0
- package/dist/primitives/fake-scroll-list/item.jsx +13 -0
- package/dist/primitives/fake-scroll-list/listbox.d.ts +8 -0
- package/dist/primitives/fake-scroll-list/listbox.js +72 -0
- package/dist/primitives/fake-scroll-list/listbox.jsx +61 -0
- package/dist/primitives/fake-scroll-list/root.d.ts +15 -0
- package/dist/primitives/fake-scroll-list/root.js +52 -0
- package/dist/primitives/fake-scroll-list/root.jsx +40 -0
- package/dist/primitives/floating/context.d.ts +6 -6
- package/dist/primitives/floating/index.d.ts +2 -2
- package/dist/primitives/index.d.ts +2 -1
- package/dist/primitives/index.js +2 -1
- package/dist/primitives/index.jsx +2 -1
- package/dist/primitives/listbox/listbox.d.ts +3 -3
- package/dist/primitives/modal/content.d.ts +3 -3
- package/dist/primitives/modal/context.d.ts +9 -9
- package/dist/primitives/modal/root.d.ts +2 -2
- package/dist/root-provider/context.d.ts +9 -9
- package/package.json +7 -6
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { context } from "./context.js";
|
|
2
|
+
import { createComponent, effect, insert, setStyleProperty, template, use } from "solid-js/web";
|
|
3
|
+
import { For, createMemo, onMount } from "solid-js";
|
|
4
|
+
import { runAtNextAnimationFrame } from "solid-tiny-utils";
|
|
5
|
+
|
|
6
|
+
//#region src/primitives/fake-scroll-list/listbox.tsx
|
|
7
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
8
|
+
function Listbox(props) {
|
|
9
|
+
const [state, actions] = context.useContext();
|
|
10
|
+
const renderItems = createMemo(() => {
|
|
11
|
+
const keyedItems = state.items.map((item, index) => ({
|
|
12
|
+
item,
|
|
13
|
+
key: `${index}`
|
|
14
|
+
}));
|
|
15
|
+
if (state.shouldFake) {
|
|
16
|
+
const items = [
|
|
17
|
+
...keyedItems.map((k) => ({
|
|
18
|
+
item: k.item,
|
|
19
|
+
key: `${k.key}-pre`
|
|
20
|
+
})),
|
|
21
|
+
...keyedItems,
|
|
22
|
+
...keyedItems.map((k) => ({
|
|
23
|
+
item: k.item,
|
|
24
|
+
key: `${k.key}-post`
|
|
25
|
+
}))
|
|
26
|
+
];
|
|
27
|
+
const startIndex = state.items.length - state.overScan;
|
|
28
|
+
const endIndex = 2 * state.items.length + state.overScan;
|
|
29
|
+
return items.slice(startIndex, endIndex);
|
|
30
|
+
}
|
|
31
|
+
return keyedItems;
|
|
32
|
+
});
|
|
33
|
+
let ref;
|
|
34
|
+
onMount(() => {
|
|
35
|
+
runAtNextAnimationFrame(() => {
|
|
36
|
+
ref.style.transition = "transform 0.2s ease";
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
const checkPos = () => {
|
|
40
|
+
if (state.inViewIndex < 0 || state.inViewIndex >= state.items.length) {
|
|
41
|
+
ref.style.transition = "none";
|
|
42
|
+
actions.setState("inViewIndex", state.fixedInViewIndex);
|
|
43
|
+
runAtNextAnimationFrame(() => {
|
|
44
|
+
ref.style.transition = "transform 0.2s ease";
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const translateY = createMemo(() => {
|
|
49
|
+
const centerHeight = Math.floor(state.visibleItemsCount / 2) * state.itemHeight;
|
|
50
|
+
const overScanHeight = state.overScan * state.itemHeight;
|
|
51
|
+
return -state.inViewIndex * state.itemHeight + centerHeight - overScanHeight;
|
|
52
|
+
});
|
|
53
|
+
return (() => {
|
|
54
|
+
var _el$ = _tmpl$();
|
|
55
|
+
var _ref$ = ref;
|
|
56
|
+
typeof _ref$ === "function" ? use(_ref$, _el$) : ref = _el$;
|
|
57
|
+
_el$.addEventListener("transitionend", () => {
|
|
58
|
+
checkPos();
|
|
59
|
+
});
|
|
60
|
+
insert(_el$, createComponent(For, {
|
|
61
|
+
get each() {
|
|
62
|
+
return renderItems();
|
|
63
|
+
},
|
|
64
|
+
children: (item) => props.children(item.item, item.key)
|
|
65
|
+
}));
|
|
66
|
+
effect((_$p) => setStyleProperty(_el$, "transform", `translateY(${translateY()}px)`));
|
|
67
|
+
return _el$;
|
|
68
|
+
})();
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
//#endregion
|
|
72
|
+
export { Listbox };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { context } from "./context.jsx";
|
|
2
|
+
import { For, createMemo, onMount } from "solid-js";
|
|
3
|
+
import { runAtNextAnimationFrame } from "solid-tiny-utils";
|
|
4
|
+
|
|
5
|
+
//#region src/primitives/fake-scroll-list/listbox.tsx
|
|
6
|
+
function Listbox(props) {
|
|
7
|
+
const [state, actions] = context.useContext();
|
|
8
|
+
const renderItems = createMemo(() => {
|
|
9
|
+
const keyedItems = state.items.map((item, index) => ({
|
|
10
|
+
item,
|
|
11
|
+
key: `${index}`
|
|
12
|
+
}));
|
|
13
|
+
if (state.shouldFake) {
|
|
14
|
+
const items = [
|
|
15
|
+
...keyedItems.map((k) => ({
|
|
16
|
+
item: k.item,
|
|
17
|
+
key: `${k.key}-pre`
|
|
18
|
+
})),
|
|
19
|
+
...keyedItems,
|
|
20
|
+
...keyedItems.map((k) => ({
|
|
21
|
+
item: k.item,
|
|
22
|
+
key: `${k.key}-post`
|
|
23
|
+
}))
|
|
24
|
+
];
|
|
25
|
+
const startIndex = state.items.length - state.overScan;
|
|
26
|
+
const endIndex = 2 * state.items.length + state.overScan;
|
|
27
|
+
return items.slice(startIndex, endIndex);
|
|
28
|
+
}
|
|
29
|
+
return keyedItems;
|
|
30
|
+
});
|
|
31
|
+
let ref;
|
|
32
|
+
onMount(() => {
|
|
33
|
+
runAtNextAnimationFrame(() => {
|
|
34
|
+
ref.style.transition = "transform 0.2s ease";
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
const checkPos = () => {
|
|
38
|
+
if (state.inViewIndex < 0 || state.inViewIndex >= state.items.length) {
|
|
39
|
+
ref.style.transition = "none";
|
|
40
|
+
actions.setState("inViewIndex", state.fixedInViewIndex);
|
|
41
|
+
runAtNextAnimationFrame(() => {
|
|
42
|
+
ref.style.transition = "transform 0.2s ease";
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
const translateY = createMemo(() => {
|
|
47
|
+
const centerHeight = Math.floor(state.visibleItemsCount / 2) * state.itemHeight;
|
|
48
|
+
const overScanHeight = state.overScan * state.itemHeight;
|
|
49
|
+
return -state.inViewIndex * state.itemHeight + centerHeight - overScanHeight;
|
|
50
|
+
});
|
|
51
|
+
return <div onTransitionEnd={() => {
|
|
52
|
+
checkPos();
|
|
53
|
+
}} ref={ref} style={{ transform: `translateY(${translateY()}px)` }}>
|
|
54
|
+
<For each={renderItems()}>
|
|
55
|
+
{(item) => props.children(item.item, item.key)}
|
|
56
|
+
</For>
|
|
57
|
+
</div>;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
//#endregion
|
|
61
|
+
export { Listbox };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { JSX } from "solid-js";
|
|
2
|
+
|
|
3
|
+
//#region src/primitives/fake-scroll-list/root.d.ts
|
|
4
|
+
declare function Root(props: {
|
|
5
|
+
children: JSX.Element;
|
|
6
|
+
class?: string;
|
|
7
|
+
style?: JSX.CSSProperties | string;
|
|
8
|
+
items: string[];
|
|
9
|
+
visibleItemsCount: number;
|
|
10
|
+
itemHeight: number;
|
|
11
|
+
inViewIndex: number;
|
|
12
|
+
onInViewIndexChange: (index: number) => void;
|
|
13
|
+
}): JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { Root };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { context } from "./context.js";
|
|
2
|
+
import { className, createComponent, effect, insert, style, template } from "solid-js/web";
|
|
3
|
+
import { combineStyle, createWatch } from "solid-tiny-utils";
|
|
4
|
+
|
|
5
|
+
//#region src/primitives/fake-scroll-list/root.tsx
|
|
6
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
7
|
+
function Root(props) {
|
|
8
|
+
const Context = context.initial({
|
|
9
|
+
items: () => props.items,
|
|
10
|
+
visibleItemsCount: () => props.visibleItemsCount,
|
|
11
|
+
itemHeight: () => props.itemHeight
|
|
12
|
+
});
|
|
13
|
+
const [state, actions] = Context.value;
|
|
14
|
+
createWatch(() => props.inViewIndex, (index) => {
|
|
15
|
+
if (index !== state.fixedInViewIndex) actions.setState("inViewIndex", index);
|
|
16
|
+
});
|
|
17
|
+
createWatch(() => state.fixedInViewIndex, (inViewIndex) => {
|
|
18
|
+
if (inViewIndex !== props.inViewIndex) props.onInViewIndexChange(inViewIndex);
|
|
19
|
+
});
|
|
20
|
+
const handleOnWheel = (e) => {
|
|
21
|
+
e.preventDefault();
|
|
22
|
+
e.stopPropagation();
|
|
23
|
+
const { deltaY } = e;
|
|
24
|
+
const index = state.inViewIndex;
|
|
25
|
+
const newIndex = deltaY > 0 ? index + 1 : index - 1;
|
|
26
|
+
if (state.shouldFake) {
|
|
27
|
+
if (newIndex >= -state.overScan + 3 && newIndex < state.items.length + state.overScan - 3) actions.setState("inViewIndex", newIndex);
|
|
28
|
+
} else if (newIndex >= 0 && newIndex < state.items.length) actions.setState("inViewIndex", newIndex);
|
|
29
|
+
};
|
|
30
|
+
return createComponent(Context.Provider, { get children() {
|
|
31
|
+
var _el$ = _tmpl$();
|
|
32
|
+
_el$.addEventListener("wheel", handleOnWheel);
|
|
33
|
+
insert(_el$, () => props.children);
|
|
34
|
+
effect((_p$) => {
|
|
35
|
+
var _v$ = props.class, _v$2 = combineStyle({
|
|
36
|
+
height: `${props.itemHeight * props.visibleItemsCount}px`,
|
|
37
|
+
width: "100%",
|
|
38
|
+
overflow: "hidden"
|
|
39
|
+
}, props.style);
|
|
40
|
+
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
41
|
+
_p$.t = style(_el$, _v$2, _p$.t);
|
|
42
|
+
return _p$;
|
|
43
|
+
}, {
|
|
44
|
+
e: void 0,
|
|
45
|
+
t: void 0
|
|
46
|
+
});
|
|
47
|
+
return _el$;
|
|
48
|
+
} });
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
//#endregion
|
|
52
|
+
export { Root };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { context } from "./context.jsx";
|
|
2
|
+
import { combineStyle, createWatch } from "solid-tiny-utils";
|
|
3
|
+
|
|
4
|
+
//#region src/primitives/fake-scroll-list/root.tsx
|
|
5
|
+
function Root(props) {
|
|
6
|
+
const Context = context.initial({
|
|
7
|
+
items: () => props.items,
|
|
8
|
+
visibleItemsCount: () => props.visibleItemsCount,
|
|
9
|
+
itemHeight: () => props.itemHeight
|
|
10
|
+
});
|
|
11
|
+
const [state, actions] = Context.value;
|
|
12
|
+
createWatch(() => props.inViewIndex, (index) => {
|
|
13
|
+
if (index !== state.fixedInViewIndex) actions.setState("inViewIndex", index);
|
|
14
|
+
});
|
|
15
|
+
createWatch(() => state.fixedInViewIndex, (inViewIndex) => {
|
|
16
|
+
if (inViewIndex !== props.inViewIndex) props.onInViewIndexChange(inViewIndex);
|
|
17
|
+
});
|
|
18
|
+
const handleOnWheel = (e) => {
|
|
19
|
+
e.preventDefault();
|
|
20
|
+
e.stopPropagation();
|
|
21
|
+
const { deltaY } = e;
|
|
22
|
+
const index = state.inViewIndex;
|
|
23
|
+
const newIndex = deltaY > 0 ? index + 1 : index - 1;
|
|
24
|
+
if (state.shouldFake) {
|
|
25
|
+
if (newIndex >= -state.overScan + 3 && newIndex < state.items.length + state.overScan - 3) actions.setState("inViewIndex", newIndex);
|
|
26
|
+
} else if (newIndex >= 0 && newIndex < state.items.length) actions.setState("inViewIndex", newIndex);
|
|
27
|
+
};
|
|
28
|
+
return <Context.Provider>
|
|
29
|
+
<div class={props.class} onWheel={handleOnWheel} style={combineStyle({
|
|
30
|
+
height: `${props.itemHeight * props.visibleItemsCount}px`,
|
|
31
|
+
width: "100%",
|
|
32
|
+
overflow: "hidden"
|
|
33
|
+
}, props.style)}>
|
|
34
|
+
{props.children}
|
|
35
|
+
</div>
|
|
36
|
+
</Context.Provider>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
//#endregion
|
|
40
|
+
export { Root };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as solid_js23 from "solid-js";
|
|
2
2
|
import * as _floating_ui_dom23 from "@floating-ui/dom";
|
|
3
3
|
import { Derivable, OffsetOptions, Placement } from "@floating-ui/dom";
|
|
4
4
|
import * as solid_tiny_context5 from "solid-tiny-context";
|
|
5
|
-
import * as
|
|
5
|
+
import * as solid_js_store10 from "solid-js/store";
|
|
6
6
|
import * as _floating_ui_core75 from "@floating-ui/core";
|
|
7
7
|
|
|
8
8
|
//#region src/primitives/floating/context.d.ts
|
|
@@ -129,7 +129,7 @@ declare const context: {
|
|
|
129
129
|
_setOpen(open: boolean): void;
|
|
130
130
|
updatePos(): Promise<void>;
|
|
131
131
|
}, "setState"> & {
|
|
132
|
-
setState:
|
|
132
|
+
setState: solid_js_store10.SetStoreFunction<{
|
|
133
133
|
x: number;
|
|
134
134
|
y: number;
|
|
135
135
|
open: boolean;
|
|
@@ -369,8 +369,8 @@ declare const context: {
|
|
|
369
369
|
};
|
|
370
370
|
}>> | undefined): {
|
|
371
371
|
Provider(props: {
|
|
372
|
-
children?:
|
|
373
|
-
}):
|
|
372
|
+
children?: solid_js23.JSX.Element;
|
|
373
|
+
}): solid_js23.JSX.Element;
|
|
374
374
|
value: [Readonly<{
|
|
375
375
|
x: number;
|
|
376
376
|
y: number;
|
|
@@ -616,7 +616,7 @@ declare const context: {
|
|
|
616
616
|
_setOpen(open: boolean): void;
|
|
617
617
|
updatePos(): Promise<void>;
|
|
618
618
|
}>>, "setState"> & {
|
|
619
|
-
setState:
|
|
619
|
+
setState: solid_js_store10.SetStoreFunction<{
|
|
620
620
|
x: number;
|
|
621
621
|
y: number;
|
|
622
622
|
open: boolean;
|
|
@@ -3,7 +3,7 @@ import { Content } from "./content.js";
|
|
|
3
3
|
import { FloatingUiCoreProps, Placement as Placement$1 } from "./types.js";
|
|
4
4
|
import { Root } from "./root.js";
|
|
5
5
|
import * as _floating_ui_dom0 from "@floating-ui/dom";
|
|
6
|
-
import * as
|
|
6
|
+
import * as solid_js_store9 from "solid-js/store";
|
|
7
7
|
import * as _floating_ui_core0 from "@floating-ui/core";
|
|
8
8
|
|
|
9
9
|
//#region src/primitives/floating/index.d.ts
|
|
@@ -132,7 +132,7 @@ declare const FloatingUiCore: typeof Root & {
|
|
|
132
132
|
_setOpen(open: boolean): void;
|
|
133
133
|
updatePos(): Promise<void>;
|
|
134
134
|
}, "setState"> & {
|
|
135
|
-
setState:
|
|
135
|
+
setState: solid_js_store9.SetStoreFunction<{
|
|
136
136
|
x: number;
|
|
137
137
|
y: number;
|
|
138
138
|
open: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ModalCore } from "./modal/index.js";
|
|
2
2
|
import { AnimatedGroup } from "./animated-group/index.js";
|
|
3
|
+
import { FakeScrollListCore } from "./fake-scroll-list/index.js";
|
|
3
4
|
import { Listbox } from "./listbox/listbox.js";
|
|
4
5
|
import "./listbox/index.js";
|
|
5
|
-
export { AnimatedGroup, Listbox, ModalCore };
|
|
6
|
+
export { AnimatedGroup, FakeScrollListCore, Listbox, ModalCore };
|
package/dist/primitives/index.js
CHANGED
|
@@ -2,5 +2,6 @@ import { Listbox } from "./listbox/listbox.js";
|
|
|
2
2
|
import "./listbox/index.js";
|
|
3
3
|
import { ModalCore } from "./modal/index.js";
|
|
4
4
|
import { AnimatedGroup } from "./animated-group/index.js";
|
|
5
|
+
import { FakeScrollListCore } from "./fake-scroll-list/index.js";
|
|
5
6
|
|
|
6
|
-
export { AnimatedGroup, Listbox, ModalCore };
|
|
7
|
+
export { AnimatedGroup, FakeScrollListCore, Listbox, ModalCore };
|
|
@@ -2,5 +2,6 @@ import { Listbox } from "./listbox/listbox.jsx";
|
|
|
2
2
|
import "./listbox/index.jsx";
|
|
3
3
|
import { ModalCore } from "./modal/index.jsx";
|
|
4
4
|
import { AnimatedGroup } from "./animated-group/index.jsx";
|
|
5
|
+
import { FakeScrollListCore } from "./fake-scroll-list/index.jsx";
|
|
5
6
|
|
|
6
|
-
export { AnimatedGroup, Listbox, ModalCore };
|
|
7
|
+
export { AnimatedGroup, FakeScrollListCore, Listbox, ModalCore };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as solid_js9 from "solid-js";
|
|
2
2
|
import { ComponentProps } from "solid-js";
|
|
3
3
|
|
|
4
4
|
//#region src/primitives/listbox/listbox.d.ts
|
|
5
5
|
declare function Root(props: Omit<ComponentProps<"div">, "role" | "tabIndex" | "tabindex"> & {
|
|
6
6
|
autofocus?: boolean;
|
|
7
|
-
}):
|
|
7
|
+
}): solid_js9.JSX.Element;
|
|
8
8
|
declare function Item(props: Omit<ComponentProps<"div">, "role" | "tabIndex" | "tabindex"> & {
|
|
9
9
|
focus?: boolean;
|
|
10
10
|
disabled?: boolean;
|
|
11
|
-
}):
|
|
11
|
+
}): solid_js9.JSX.Element;
|
|
12
12
|
declare const Listbox: typeof Root & {
|
|
13
13
|
Item: typeof Item;
|
|
14
14
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as solid_js6 from "solid-js";
|
|
2
2
|
import { ComponentProps } from "solid-js";
|
|
3
3
|
|
|
4
4
|
//#region src/primitives/modal/content.d.ts
|
|
5
|
-
declare function ContentWrapper(props: ComponentProps<"div">):
|
|
6
|
-
declare function Content(props: ComponentProps<"div">):
|
|
5
|
+
declare function ContentWrapper(props: ComponentProps<"div">): solid_js6.JSX.Element;
|
|
6
|
+
declare function Content(props: ComponentProps<"div">): solid_js6.JSX.Element;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { Content, ContentWrapper };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
1
|
+
import * as solid_js11 from "solid-js";
|
|
2
|
+
import * as solid_tiny_context0 from "solid-tiny-context";
|
|
3
|
+
import * as solid_js_store3 from "solid-js/store";
|
|
4
4
|
|
|
5
5
|
//#region src/primitives/modal/context.d.ts
|
|
6
6
|
declare const context: {
|
|
@@ -12,7 +12,7 @@ declare const context: {
|
|
|
12
12
|
closeOnClickMask: boolean;
|
|
13
13
|
closeOnEsc: boolean;
|
|
14
14
|
} & {}>, Omit<{}, "setState"> & {
|
|
15
|
-
setState:
|
|
15
|
+
setState: solid_js_store3.SetStoreFunction<{
|
|
16
16
|
id: string;
|
|
17
17
|
open: boolean;
|
|
18
18
|
refContent: HTMLElement | null;
|
|
@@ -24,7 +24,7 @@ declare const context: {
|
|
|
24
24
|
shouldMount: () => boolean;
|
|
25
25
|
presenceState: () => string;
|
|
26
26
|
}];
|
|
27
|
-
initial(initialState?: Partial<
|
|
27
|
+
initial(initialState?: Partial<solid_tiny_context0.MaybeSignals<{
|
|
28
28
|
id: string;
|
|
29
29
|
open: boolean;
|
|
30
30
|
refContent: HTMLElement | null;
|
|
@@ -33,8 +33,8 @@ declare const context: {
|
|
|
33
33
|
closeOnEsc: boolean;
|
|
34
34
|
}>> | undefined): {
|
|
35
35
|
Provider(props: {
|
|
36
|
-
children?:
|
|
37
|
-
}):
|
|
36
|
+
children?: solid_js11.JSX.Element;
|
|
37
|
+
}): solid_js11.JSX.Element;
|
|
38
38
|
value: [Readonly<{
|
|
39
39
|
id: string;
|
|
40
40
|
open: boolean;
|
|
@@ -42,7 +42,7 @@ declare const context: {
|
|
|
42
42
|
preventScroll: boolean;
|
|
43
43
|
closeOnClickMask: boolean;
|
|
44
44
|
closeOnEsc: boolean;
|
|
45
|
-
} & {}>, Omit<ThisType<
|
|
45
|
+
} & {}>, Omit<ThisType<solid_tiny_context0.RealContextThis<{
|
|
46
46
|
id: string;
|
|
47
47
|
open: boolean;
|
|
48
48
|
refContent: HTMLElement | null;
|
|
@@ -53,7 +53,7 @@ declare const context: {
|
|
|
53
53
|
shouldMount: () => boolean;
|
|
54
54
|
presenceState: () => string;
|
|
55
55
|
}, {}, {}>>, "setState"> & {
|
|
56
|
-
setState:
|
|
56
|
+
setState: solid_js_store3.SetStoreFunction<{
|
|
57
57
|
id: string;
|
|
58
58
|
open: boolean;
|
|
59
59
|
refContent: HTMLElement | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { context } from "./context.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as solid_js5 from "solid-js";
|
|
3
3
|
import { MaybeCallableChild } from "solid-tiny-utils";
|
|
4
4
|
|
|
5
5
|
//#region src/primitives/modal/root.d.ts
|
|
@@ -10,6 +10,6 @@ declare function Root(props: {
|
|
|
10
10
|
preventScroll?: boolean;
|
|
11
11
|
closeOnClickMask?: boolean;
|
|
12
12
|
closeOnEsc?: boolean;
|
|
13
|
-
}):
|
|
13
|
+
}): solid_js5.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { Root };
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
1
|
+
import * as solid_js20 from "solid-js";
|
|
2
|
+
import * as solid_tiny_context3 from "solid-tiny-context";
|
|
3
|
+
import * as solid_js_store7 from "solid-js/store";
|
|
4
4
|
|
|
5
5
|
//#region src/root-provider/context.d.ts
|
|
6
6
|
declare const context: {
|
|
7
7
|
useContext: () => [Readonly<{
|
|
8
8
|
hue: number;
|
|
9
9
|
} & {}>, Omit<{}, "setState"> & {
|
|
10
|
-
setState:
|
|
10
|
+
setState: solid_js_store7.SetStoreFunction<{
|
|
11
11
|
hue: number;
|
|
12
12
|
}>;
|
|
13
13
|
}, {}];
|
|
14
|
-
initial(initialState?: Partial<
|
|
14
|
+
initial(initialState?: Partial<solid_tiny_context3.MaybeSignals<{
|
|
15
15
|
hue: number;
|
|
16
16
|
}>> | undefined): {
|
|
17
17
|
Provider(props: {
|
|
18
|
-
children?:
|
|
19
|
-
}):
|
|
18
|
+
children?: solid_js20.JSX.Element;
|
|
19
|
+
}): solid_js20.JSX.Element;
|
|
20
20
|
value: [Readonly<{
|
|
21
21
|
hue: number;
|
|
22
|
-
} & {}>, Omit<ThisType<
|
|
22
|
+
} & {}>, Omit<ThisType<solid_tiny_context3.RealContextThis<{
|
|
23
23
|
hue: number;
|
|
24
24
|
}, {}, {}, {}>>, "setState"> & {
|
|
25
|
-
setState:
|
|
25
|
+
setState: solid_js_store7.SetStoreFunction<{
|
|
26
26
|
hue: number;
|
|
27
27
|
}>;
|
|
28
28
|
}, {}];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "solid-tiny-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.5.0",
|
|
5
5
|
"description": "Core package for solid tiny UI library",
|
|
6
6
|
"author": "solid tiny",
|
|
7
7
|
"license": "MIT",
|
|
@@ -34,11 +34,12 @@
|
|
|
34
34
|
"solid-js": "^1.9.9"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
+
"@floating-ui/core": "^1.7.3",
|
|
38
|
+
"@floating-ui/dom": "^1.7.4",
|
|
39
|
+
"@solid-primitives/refs": "^1.1.2",
|
|
37
40
|
"solid-tiny-context": "0.2.3",
|
|
38
41
|
"solid-tiny-utils": "0.11.0",
|
|
39
|
-
"
|
|
40
|
-
"@floating-ui/core": "^1.7.3",
|
|
41
|
-
"@floating-ui/dom": "^1.7.4"
|
|
42
|
+
"time-core": "^0.1.0"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
|
44
45
|
"@iconify-json/ri": "^1.2.6",
|
|
@@ -48,14 +49,14 @@
|
|
|
48
49
|
"@vitest/browser-playwright": "^4.0.16",
|
|
49
50
|
"rolldown-plugin-solid": "^0.2.1",
|
|
50
51
|
"rollup-plugin-inline-import": "^0.3.0",
|
|
51
|
-
"vite-plugin-solid-pages": "^0.3.0",
|
|
52
52
|
"tsdown": "^0.18.3",
|
|
53
53
|
"typescript": "^5.9.3",
|
|
54
54
|
"unocss": "66.5.10",
|
|
55
55
|
"vite": "^7.1.10",
|
|
56
56
|
"vite-plugin-solid": "^2.11.10",
|
|
57
|
+
"vite-plugin-solid-pages": "^0.3.0",
|
|
57
58
|
"vitest": "^4.0.16",
|
|
58
|
-
"@solid-tiny-ui/unocss-preset": "0.
|
|
59
|
+
"@solid-tiny-ui/unocss-preset": "0.5.0"
|
|
59
60
|
},
|
|
60
61
|
"scripts": {
|
|
61
62
|
"build": "tsdown",
|