ywana-core8 0.0.407 → 0.0.408

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ywana-core8",
3
- "version": "0.0.407",
3
+ "version": "0.0.408",
4
4
  "description": "ywana-core8",
5
5
  "homepage": "https://ywana.github.io/workspace",
6
6
  "author": "Ernesto Roldan Garcia",
@@ -0,0 +1,35 @@
1
+ // preview.config.js
2
+
3
+ /** @type {import("@previewjs/config").PreviewConfig} */
4
+ module.exports = {
5
+ /**
6
+ * Configure custom aliases (auto-detected if you use TypeScript).
7
+ */
8
+ alias: {
9
+ foo: "src/foo"
10
+ },
11
+
12
+ /**
13
+ * Configure a public assets directory.
14
+ */
15
+ publicDir: "public",
16
+
17
+ /**
18
+ * Set up a custom component to wrap around previewed components.
19
+ *
20
+ * Useful to set up context providers and global CSS.
21
+ */
22
+ wrapper: {
23
+ path: "__previewjs__/Wrapper.tsx",
24
+ componentName: "Wrapper"
25
+ },
26
+
27
+ /**
28
+ * Specify a custom Vite configuration.
29
+ *
30
+ * See https://vitejs.dev/config.
31
+ */
32
+ vite: {
33
+
34
+ }
35
+ };
@@ -0,0 +1,11 @@
1
+ import React, { Fragment, useContext, useEffect, useState } from 'react'
2
+ import { Desktop } from './desktop'
3
+ import { Window } from './window'
4
+
5
+ const DesktopTest = (prop) => {
6
+ return (
7
+ <Desktop>
8
+ <Window id="w1" icon="folder" title="Window 1" />
9
+ </Desktop>
10
+ )
11
+ }
@@ -0,0 +1,6 @@
1
+ .desktop {
2
+ height: 100vh;
3
+ width: 100vw;
4
+ background-color: rgb(113, 102, 226);
5
+ position: relative;
6
+ }
@@ -0,0 +1,13 @@
1
+ import React from 'react'
2
+ import './desktop.css'
3
+
4
+ export const Desktop = (props) => {
5
+
6
+ const { children } = props
7
+
8
+ return (
9
+ <div className='desktop'>
10
+ { children }
11
+ </div>
12
+ )
13
+ }
@@ -0,0 +1,58 @@
1
+ .window {
2
+ position: absolute;
3
+ top: 1rem;
4
+ left: 1rem;
5
+ min-width: 20rem;
6
+ min-height: 15rem;
7
+ resize: both;
8
+ background-color: rgb(227, 227, 227);
9
+ display: grid;
10
+ overflow: hidden;
11
+ resize: both;
12
+ }
13
+
14
+ .window.normal {
15
+ grid-template-areas:
16
+ "header header header"
17
+ "nav nav nav"
18
+ "menu main aside"
19
+ "footer footer footer";
20
+ grid-template-columns: auto 1fr auto;
21
+ grid-template-rows: 2rem auto 1fr auto;
22
+ }
23
+
24
+ .window>header {
25
+ grid-area: header;
26
+ padding: .3rem .3rem 0 0;
27
+ display: flex;
28
+ align-items: center;
29
+ overflow: hidden;
30
+ }
31
+
32
+ .window>header>label {
33
+ flex: 1;
34
+ }
35
+
36
+ .window>nav {
37
+ grid-area: nav;
38
+ }
39
+
40
+ .window>menu {
41
+ grid-area: menu;
42
+ padding: 0;
43
+ }
44
+
45
+ .window>main {
46
+ grid-area: main;
47
+ padding: .5rem;
48
+ overflow: hidden;
49
+ border: solid 1px var(--divider-color);
50
+ }
51
+
52
+ .window>aside {
53
+ grid-area: aside;
54
+ }
55
+
56
+ .window>footer {
57
+ grid-area: footer;
58
+ }
@@ -0,0 +1,27 @@
1
+ import React from 'react'
2
+ import { Button, Icon } from '../html'
3
+ import './window.css'
4
+
5
+ export const Window = (props) => {
6
+
7
+ const { id, icon, title, children } = props
8
+
9
+ return (
10
+ <div className="window normal" draggable>
11
+ <header>
12
+ <Icon icon={icon} size="small" />
13
+ <label>{title}</label>
14
+ <Icon icon="close" clickable size="small" />
15
+ </header>
16
+ <nav>
17
+
18
+ </nav>
19
+ <menu></menu>
20
+ <main>
21
+ {children}x
22
+ </main>
23
+ <aside></aside>
24
+ <footer>x</footer>
25
+ </div>
26
+ )
27
+ }
@@ -272,7 +272,7 @@ const TableFilters = (props) => {
272
272
  }
273
273
  }
274
274
  }
275
- Object.values(filterSchema).forEach(field => field.section = null)
275
+ //Object.values(filterSchema).forEach(field => field.section = null)
276
276
  delete filterSchema.flows
277
277
  return filterSchema
278
278
  }, [schema])
@@ -1,37 +0,0 @@
1
- const reactpreview = require("@reactpreview/config");
2
-
3
- module.exports = reactpreview.config({
4
- /**
5
- * Configure custom aliases (auto-detected if you use TypeScript).
6
- */
7
- alias: {
8
- foo: "src/foo"
9
- },
10
-
11
- /**
12
- * Configure a public assets directory.
13
- */
14
- publicDir: "public",
15
-
16
- /**
17
- * Set up a custom component to wrap around previewed components.
18
- *
19
- * Useful to set up context providers and CSS dependencies.
20
- */
21
- wrapper: {
22
- path: "src/ReactPreviewWrapper.js",
23
- componentName: "Wrapper"
24
- },
25
-
26
- /**
27
- * Customise the exported React component name for SVG files.
28
- */
29
- svgr: {
30
- componentName: "default"
31
- },
32
-
33
- /**
34
- * Specify a custom Vite configuration.
35
- */
36
- vite: vite.UserConfig;
37
- });