smbls 2.6.0 → 2.6.2

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 CHANGED
@@ -1,14 +1,21 @@
1
1
  # Symbols
2
2
 
3
- UI Library in composition of [Scratch](https://github.com/smbo-ls/scratch) and [DOMQL](https://github.com/domql/domql)
3
+ UI Library in composition of [Scratch](https://github.com/symbo.ls/scratch) and [DOMQL](https://github.com/symbo.ls/domql) or [React](https://github.com/symbo-ls/smbls/tree/main/packages/all/react.js)
4
+
5
+ Check out the [documentation page](https://docs.symbols.app/).
4
6
 
5
7
  [![npm version](https://badge.fury.io/js/smbls.svg)](https://badge.fury.io/js/smbls)
6
8
 
9
+ ### UI Components
10
+
11
+ Library consists with packages. Components can be invoked individually.
12
+
13
+
7
14
  ### Setup
8
15
 
9
16
  1. Installation
10
17
  ```
11
- yarn add smbls
18
+ yarn add smbls@^1.1.1
12
19
  ```
13
20
 
14
21
  2. Import the component from Symbols
@@ -17,9 +24,12 @@ import { Box } from 'smbls'
17
24
  ```
18
25
 
19
26
  3. Use it inside your DOMQL code
27
+ ### DOMQL
28
+ ```javascript
29
+ const Header = { props }
20
30
  ```
21
- const Header = {
22
- extend: Box,
23
- // ...Other Properties
24
- }
31
+
32
+ ### React
33
+ ```javascript
34
+ <Box {...props} />
25
35
  ```
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "UI Library built on Scratch and DOMQL",
4
4
  "private": false,
5
5
  "author": "symbo.ls",
6
- "version": "2.6.0",
6
+ "version": "2.6.2",
7
7
  "repository": "https://github.com/symbo-ls/smbls",
8
8
  "main": "src/index.js",
9
9
  "files": [
@@ -17,16 +17,15 @@
17
17
  "build": "parcel build showcase/index.html --public-url .",
18
18
  "deploy": "yarn build && gh-pages -d dist",
19
19
  "clean": "rm yarn.lock && rm -rf node_modules && rm -rf dist && rm -rf .cache",
20
- "reinstall": "rm yarn.lock && rm -rf node_modules/rackai && yarn",
21
- "bump": "npx np"
20
+ "reinstall": "rm yarn.lock && rm -rf node_modules/rackai && yarn"
22
21
  },
23
22
  "dependencies": {
24
23
  "@domql/utils": "latest",
25
- "@symbo.ls/cli": "latest",
26
- "@symbo.ls/socket": "latest",
27
24
  "@symbo.ls/init": "latest",
28
25
  "@symbo.ls/scratch": "latest",
29
- "@symbo.ls/utils": "latest"
26
+ "@symbo.ls/utils": "latest",
27
+ "@symbo.ls/cli": "latest",
28
+ "@symbo.ls/socket": "latest"
30
29
  },
31
30
  "devDependencies": {
32
31
  "@babel/core": "^7.11.5",
@@ -1,11 +1,10 @@
1
1
  'use strict'
2
2
 
3
- import { Shape, Img, Icon } from '../'
3
+ import { styleParentMode } from './style'
4
4
 
5
+ import { Shape, Icon } from '..'
5
6
  import { UserBundle } from '../User'
6
7
 
7
- import { styleParentMode } from './style'
8
-
9
8
  export const ParentMode = {
10
9
  extend: Shape,
11
10
  round: 10,
@@ -19,6 +18,6 @@ export const ParentMode = {
19
18
  description: {
20
19
  extend: UserBundle,
21
20
  users: { ...[{}, {}, {}] },
22
- span: 'Youll now be able to chat with tutor privately. No other participants will see the messages.'
21
+ span: 'You\'ll now be able to chat with tutor privately. No other participants will see the messages.'
23
22
  }
24
23
  }
package/src/ButtonSet.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict'
2
2
 
3
- import { SquareButton, Flex } from './'
3
+ import { SquareButton, Flex } from '.'
4
4
 
5
5
  export const ButtonSet = {
6
6
  tag: 'nav',
@@ -2,7 +2,7 @@
2
2
 
3
3
  import style from './style'
4
4
 
5
- import { SquareButton, Flex, Button, Grid } from '../'
5
+ import { SquareButton, Flex, Button, Grid } from '..'
6
6
 
7
7
  const buttonProps = {
8
8
  theme: 'transparent',
package/src/Input.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict'
2
2
 
3
- import { Focusable } from './'
3
+ import { Focusable } from '.'
4
4
 
5
5
  export const Input = {
6
6
  extend: [Focusable],
@@ -17,6 +17,9 @@ export const Input = {
17
17
  },
18
18
 
19
19
  attr: {
20
+ pattern: ({ props }) => props.pattern,
21
+ minlength: ({ props }) => props.minlength,
22
+ maxlength: ({ props }) => props.maxlength,
20
23
  name: ({ props }) => props.name,
21
24
  placeholder: ({ props }) => props.placeholder,
22
25
  value: ({ props }) => props.value,
package/src/Pills.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict'
2
2
 
3
- import { Flex } from './'
3
+ import { Flex } from '.'
4
4
 
5
5
  export const Pills = {
6
6
  extend: Flex,
package/src/Tooltip.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict'
2
2
 
3
- import { Flex } from './'
3
+ import { Flex } from '.'
4
4
 
5
5
  export const Tooltip = {
6
6
  extend: Flex,
@@ -2,6 +2,10 @@
2
2
 
3
3
  import { getSpacingBasedOnRatio, getSpacingByKey } from '@symbo.ls/scratch'
4
4
 
5
+ const transformGap = gap => ({
6
+ gap: gap.split(' ').map(v => getSpacingByKey(v, 'gap').gap).join(' ')
7
+ })
8
+
5
9
  export const Block = {
6
10
  class: {
7
11
  boxSizing: ({ props }) => props.boxSizing ? ({ boxSizing: props.boxSizing }) : {
@@ -95,7 +99,7 @@ export const Block = {
95
99
  marginBlockStart: ({ props }) => props.marginBlockStart ? getSpacingBasedOnRatio(props, 'marginBlockStart') : null,
96
100
  marginBlockEnd: ({ props }) => props.marginBlockEnd ? getSpacingBasedOnRatio(props, 'marginBlockEnd') : null,
97
101
 
98
- gap: ({ props }) => props.gap ? getSpacingBasedOnRatio(props, 'gap') : null,
102
+ gap: ({ props }) => props.gap ? transformGap(props.gap) : null,
99
103
  gridArea: ({ props }) => props.gridArea && ({ gridArea: props.gridArea }),
100
104
 
101
105
  flex: ({ props }) => props.flex && ({ flex: props.flex }),
@@ -148,8 +148,6 @@ export const initUpdate = element => {
148
148
  themeModifier: globalTheme
149
149
  }, { preventRecursive: true, ignoreInitUpdate: true })
150
150
  } else if (key === 'true') applyTrueProps(props[key], CLASS_NAMES, element)
151
- if (key === 'true') console.log(key)
152
-
153
151
  if (setter) setter(key, props[key], CLASS_NAMES, element)
154
152
  }
155
153