lilact 0.1.0 → 0.2.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/README.md +9 -0
- package/dist/lilact.development.min.js +9657 -2
- package/dist/lilact.development.min.js.map +1 -1
- package/dist/lilact.production.min.js +1 -1
- package/dist/lilact.production.min.js.map +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/accessories.ErrorBoundary.html +11 -10
- package/docs/classes/accessories.Suspense.html +12 -22
- package/docs/classes/components.Component.html +11 -10
- package/docs/classes/components.HTMLComponent.html +11 -10
- package/docs/classes/components.RootComponent.html +11 -10
- package/docs/functions/accessories.Spinner.html +1 -1
- package/docs/functions/components.createComponent.html +1 -1
- package/docs/functions/components.createRoot.html +1 -1
- package/docs/functions/components.render.html +1 -1
- package/docs/functions/hooks.createContext.html +1 -1
- package/docs/functions/hooks.forwardRef.html +4 -0
- package/docs/functions/hooks.useActionState.html +1 -1
- package/docs/functions/hooks.useImperativeHandle.html +7 -0
- package/docs/functions/hooks.useReducer.html +1 -1
- package/docs/functions/hooks.useState.html +2 -2
- package/docs/functions/hooks.useTransition.html +1 -1
- package/docs/functions/jsx.transpileJSX.html +1 -1
- package/docs/functions/run.lazy.html +7 -15
- package/docs/functions/run.runScripts.html +1 -1
- package/docs/functions/run.traceError.html +1 -1
- package/docs/functions/transition.CSSTransition.html +1 -1
- package/docs/functions/transition.Transition.html +15 -0
- package/docs/functions/transition.TransitionGroup.html +1 -1
- package/docs/index.html +5 -0
- package/docs/modules/hooks.html +1 -1
- package/docs/modules/jsx.html +1 -1
- package/docs/modules/transition.html +1 -1
- package/docs/static/demos/actionstate.jsx +4 -6
- package/docs/static/demos/context.jsx +1 -3
- package/docs/static/demos/lazy.jsx +5 -7
- package/docs/static/demos/modal.jsx +13 -15
- package/docs/static/demos/proptypes.jsx +5 -8
- package/docs/static/demos/reducer.jsx +21 -23
- package/docs/static/demos/suspense.jsx +4 -6
- package/docs/static/demos/transition.jsx +25 -25
- package/docs/static/demos/usetransition.jsx +1 -3
- package/docs/static/lilact.development.min.js +9657 -2
- package/docs/static/lilact.production.min.js +1 -1
- package/package.json +2 -1
- package/root/demos/actionstate.jsx +4 -6
- package/root/demos/context.jsx +1 -3
- package/root/demos/lazy.jsx +5 -7
- package/root/demos/modal.jsx +13 -15
- package/root/demos/proptypes.jsx +5 -8
- package/root/demos/reducer.jsx +21 -23
- package/root/demos/suspense.jsx +4 -6
- package/root/demos/transition.jsx +25 -25
- package/root/demos/usetransition.jsx +1 -3
- package/root/lilact.development.min.js +9657 -2
- package/root/lilact.production.min.js +1 -1
- package/src/accessories.jsx +12 -11
- package/src/components.jsx +9 -4
- package/src/hooks.jsx +47 -6
- package/src/jsx.js +1 -0
- package/src/lilact.jsx +5 -7
- package/src/pane.jsx +287 -0
- package/src/run.jsx +3 -17
- package/src/transition.jsx +32 -21
- package/webpack.config.js +1 -1
- package/docs/classes/transition.Transition.html +0 -31
- package/docs/variables/jsx.transpilerConfig.html +0 -1
|
@@ -8,33 +8,33 @@ function Demo() {
|
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
return <>
|
|
11
|
-
|
|
12
|
-
<div>
|
|
13
|
-
<button onClick={toggleVisibility}>
|
|
14
|
-
{inProp ? 'Hide Component' : 'Show Component'}
|
|
15
|
-
</button>
|
|
16
|
-
<Transition
|
|
17
|
-
in={inProp}
|
|
18
|
-
timeout={1000}
|
|
19
|
-
mountOnEnter={false}
|
|
20
|
-
onEnter={() => console.log('Enter')}
|
|
21
|
-
onExit={() => console.log('Exit')}
|
|
22
|
-
onEntering={() => console.log('Entering')}
|
|
23
|
-
onExiting={() => console.log('Exiting')}
|
|
24
|
-
onEntered={() => console.log('Entered')}
|
|
25
|
-
onExited={() => console.log('Exited')}
|
|
26
|
-
>
|
|
27
|
-
{(state) => (
|
|
11
|
+
<p>See the console for logs.</p>
|
|
28
12
|
<div>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
13
|
+
<button onClick={toggleVisibility}>
|
|
14
|
+
{inProp ? 'Hide Component' : 'Show Component'}
|
|
15
|
+
</button>
|
|
16
|
+
<Transition
|
|
17
|
+
in={inProp}
|
|
18
|
+
timeout={1000}
|
|
19
|
+
mountOnEnter={false}
|
|
20
|
+
onEnter={() => console.log('Enter')}
|
|
21
|
+
onExit={() => console.log('Exit')}
|
|
22
|
+
onEntering={() => console.log('Entering')}
|
|
23
|
+
onExiting={() => console.log('Exiting')}
|
|
24
|
+
onEntered={() => console.log('Entered')}
|
|
25
|
+
onExited={() => console.log('Exited')}
|
|
26
|
+
>
|
|
27
|
+
{(state) => (
|
|
28
|
+
<div>
|
|
29
|
+
{state === 'entering' && <p>Hello, World! (Entering)</p>}
|
|
30
|
+
{state === 'exiting' && <p>Hello, World! (Exiting)</p>}
|
|
31
|
+
{state === 'entered' && <p>Hello, World! (Visible)</p>}
|
|
32
|
+
{state === 'exited' && <p>Hello, World! (Hidden)</p>}
|
|
33
|
+
</div>
|
|
34
|
+
)}
|
|
35
|
+
</Transition>
|
|
33
36
|
</div>
|
|
34
|
-
|
|
35
|
-
</Transition>
|
|
36
|
-
</div>
|
|
37
|
-
</>;
|
|
37
|
+
</>;
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
module.exports = Demo;
|
|
@@ -24,13 +24,11 @@ const Demo = ()=>{
|
|
|
24
24
|
} )
|
|
25
25
|
}, [] );
|
|
26
26
|
return (
|
|
27
|
-
|
|
28
27
|
<div className={css({background:bg})}>
|
|
29
|
-
|
|
28
|
+
<h4>{id}</h4>
|
|
30
29
|
{isPending? <b>PENDING...</b> : <i>NOT PENDING</i>}
|
|
31
30
|
<button onclick={startCB}>START CB</button>
|
|
32
31
|
</div>
|
|
33
|
-
|
|
34
32
|
);
|
|
35
33
|
};
|
|
36
34
|
|