@symbo.ls/uikit 1.2.2 → 1.2.6

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.
Files changed (92) hide show
  1. package/README.md +1 -1
  2. package/{packages/uikit/index.js → index.js} +0 -0
  3. package/package.json +32 -35
  4. package/.babelrc.json +0 -3
  5. package/.eslintrc.js +0 -16
  6. package/components/Atoms/Animation.js +0 -53
  7. package/components/Atoms/Block.js +0 -151
  8. package/components/Atoms/Collection.js +0 -82
  9. package/components/Atoms/Direction.js +0 -10
  10. package/components/Atoms/Flex.js +0 -17
  11. package/components/Atoms/Form.js +0 -11
  12. package/components/Atoms/Grid.js +0 -30
  13. package/components/Atoms/Iframe.js +0 -16
  14. package/components/Atoms/Img.js +0 -17
  15. package/components/Atoms/Interaction.js +0 -9
  16. package/components/Atoms/InteractiveComponent.js +0 -78
  17. package/components/Atoms/Media.js +0 -164
  18. package/components/Atoms/Overflow.js +0 -7
  19. package/components/Atoms/Picture.js +0 -31
  20. package/components/Atoms/Position.js +0 -21
  21. package/components/Atoms/Pseudo.js +0 -7
  22. package/components/Atoms/SVG.js +0 -16
  23. package/components/Atoms/Shape/index.js +0 -42
  24. package/components/Atoms/Shape/style.js +0 -204
  25. package/components/Atoms/Text.js +0 -40
  26. package/components/Atoms/Theme.js +0 -136
  27. package/components/Atoms/Timing.js +0 -55
  28. package/components/Atoms/Transform.js +0 -8
  29. package/components/Atoms/XYZ.js +0 -7
  30. package/components/Atoms/index.js +0 -25
  31. package/components/Atoms/package.json +0 -13
  32. package/components/Avatar/index.js +0 -32
  33. package/components/Avatar/package.json +0 -12
  34. package/components/Avatar/style.js +0 -19
  35. package/components/Banner/index.js +0 -22
  36. package/components/Banner/package.json +0 -12
  37. package/components/Banner/style.js +0 -27
  38. package/components/Box/index.js +0 -44
  39. package/components/Box/package.json +0 -10
  40. package/components/Button/README.md +0 -11
  41. package/components/Button/index.js +0 -48
  42. package/components/Button/package.json +0 -12
  43. package/components/ButtonSet/index.js +0 -10
  44. package/components/ButtonSet/package.json +0 -12
  45. package/components/Datepicker/index.js +0 -156
  46. package/components/Datepicker/package.json +0 -13
  47. package/components/Datepicker/style.js +0 -18
  48. package/components/Dropdown/index.js +0 -52
  49. package/components/Dropdown/package.json +0 -12
  50. package/components/Field/index.js +0 -43
  51. package/components/Field/package.json +0 -13
  52. package/components/Field/style.js +0 -30
  53. package/components/Icon/index.js +0 -50
  54. package/components/Icon/package.json +0 -11
  55. package/components/Icon/style.js +0 -8
  56. package/components/IconText/index.js +0 -16
  57. package/components/IconText/package.json +0 -14
  58. package/components/Input/index.js +0 -32
  59. package/components/Input/package.json +0 -11
  60. package/components/Label/index.js +0 -25
  61. package/components/Label/package.json +0 -13
  62. package/components/Link/index.js +0 -38
  63. package/components/Link/package.json +0 -12
  64. package/components/Notification/index.js +0 -47
  65. package/components/Notification/package.json +0 -16
  66. package/components/Pills/index.js +0 -25
  67. package/components/Pills/package.json +0 -11
  68. package/components/Range/index.js +0 -131
  69. package/components/Range/package.json +0 -13
  70. package/components/Select/index.js +0 -36
  71. package/components/Select/package.json +0 -11
  72. package/components/Sidebar/index.js +0 -24
  73. package/components/Sidebar/package.json +0 -12
  74. package/components/Slider/index.js +0 -105
  75. package/components/Slider/package.json +0 -13
  76. package/components/Slider/style.js +0 -19
  77. package/components/TextArea/index.js +0 -15
  78. package/components/TextArea/package.json +0 -11
  79. package/components/Tooltip/index.js +0 -37
  80. package/components/Tooltip/package.json +0 -11
  81. package/components/Tooltip/style.js +0 -12
  82. package/lerna.json +0 -9
  83. package/packages/react/index.js +0 -5
  84. package/packages/react/package.json +0 -16
  85. package/packages/uikit/README.md +0 -38
  86. package/packages/uikit/package.json +0 -40
  87. package/react/box/README.md +0 -114
  88. package/react/box/index.d.ts +0 -3
  89. package/react/box/index.js +0 -63
  90. package/react/box/package.json +0 -33
  91. package/svgSprite.config.js +0 -7
  92. package/watch.js +0 -12
@@ -1,105 +0,0 @@
1
- 'use strict'
2
-
3
- import style from './style'
4
-
5
- import { set, opacify } from '@symbo.ls/scratch'
6
- import { isFunction } from '@domql/utils'
7
-
8
- import { SquareButton } from '@symbo.ls/button'
9
-
10
- set({
11
- theme: {
12
- sliderThumb: {
13
- background: 'white 0.2',
14
-
15
- '&::-webkit-slider-thumb': {
16
- background: '#232526',
17
- borderColor: opacify('#454646', 0.75)
18
- },
19
-
20
- '&:hover': {
21
- '&::-webkit-slider-thumb': {
22
- borderColor: opacify('#fff', 0.35)
23
- }
24
- },
25
-
26
- '&:focus, &:active': {
27
- '&::-webkit-slider-thumb': {
28
- borderColor: '#3C6AC0'
29
- }
30
- }
31
- }
32
- }
33
- })
34
-
35
- export const RangeSlider = {
36
- style,
37
- props: {
38
- theme: 'sliderThumb'
39
- },
40
-
41
- tag: 'input',
42
- attr: { type: 'range' }
43
- }
44
-
45
- const listenProp = (el, prop, def) => {
46
- const val = el.props && el.props[prop]
47
- const r = (isFunction(val) ? val() : val) || (def !== undefined ? def : 50)
48
- // if (prop === 'value') console.log(r)
49
- return r
50
- }
51
-
52
- export const Slider = {
53
- button0: {
54
- extend: [SquareButton],
55
- props: {
56
- icon: 'minus'
57
- },
58
- on: {
59
- click: (ev, el, s) => {
60
- el.props && isFunction(el.props.click) && el.props.click(ev, el, s)
61
- const input = el.parent.input
62
- const props = input.props
63
- const value = isFunction(props.value) ? props.value() : props.value
64
- input.node.value = value
65
- }
66
- }
67
- },
68
- value: {
69
- style: { width: '4ch' },
70
- tag: 'span',
71
- text: (el, s) => {
72
- const value = listenProp(el.parent.input, 'value')
73
- const unit = listenProp(el.parent.input, 'unit', '')
74
- return '' + value + unit
75
- }
76
- },
77
- range: {
78
- extend: RangeSlider,
79
- attr: {
80
- value: (el, s) => listenProp(el, 'value', 50),
81
- min: (el, s) => listenProp(el, 'min', 0),
82
- max: (el, s) => listenProp(el, 'max', 100),
83
- step: (el, s) => listenProp(el, 'step', 1)
84
- },
85
- on: {
86
- input: (ev, el, s) => el.props && isFunction(el.props.input) && el.props.input(ev, el, s),
87
- change: (ev, el, s) => el.props && isFunction(el.props.change) && el.props.change(ev, el, s)
88
- }
89
- },
90
- button1: {
91
- extend: [SquareButton],
92
- props: {
93
- icon: 'plus'
94
- },
95
- on: {
96
- click: (ev, el, s) => {
97
- el.props && isFunction(el.props.click) && el.props.click(ev, el, s)
98
- const input = el.parent.input
99
- const props = input.props
100
- const value = isFunction(props.value) ? props.value() : props.value
101
- input.node.value = value
102
- }
103
- }
104
- }
105
- }
@@ -1,13 +0,0 @@
1
- {
2
- "name": "@symbo.ls/slider",
3
- "version": "1.2.0",
4
- "main": "index.js",
5
- "license": "MIT",
6
- "gitHead": "54fa6500c697604b3f48ba33a573545d7bff35fa",
7
- "dependencies": {
8
- "@domql/utils": "latest",
9
- "@symbo.ls/button": "latest",
10
- "@symbo.ls/scratch": "latest"
11
- },
12
- "source": "src/index.js"
13
- }
@@ -1,19 +0,0 @@
1
- 'use strict'
2
-
3
- export default {
4
- appearance: 'none',
5
- width: '100%',
6
- height: '2px',
7
- outline: 'none',
8
- flex: 1,
9
- '&::-webkit-slider-thumb': {
10
- boxSizing: 'content-box',
11
- appearance: 'none',
12
- width: '8px',
13
- height: '8px',
14
- borderWidth: '2px',
15
- borderStyle: 'solid',
16
- borderRadius: '100%',
17
- opacity: '.8'
18
- }
19
- }
@@ -1,15 +0,0 @@
1
- 'use strict'
2
-
3
- import { Input } from '@symbo.ls/atoms'
4
-
5
- const props = {
6
- height: 'E',
7
- lineHeight: 1.4,
8
- style: { resize: 'none' }
9
- }
10
-
11
- export const TextArea = {
12
- extend: [Input],
13
- props,
14
- tag: 'textarea'
15
- }
@@ -1,11 +0,0 @@
1
- {
2
- "name": "@symbo.ls/textarea",
3
- "version": "1.2.1",
4
- "main": "index.js",
5
- "license": "MIT",
6
- "gitHead": "54fa6500c697604b3f48ba33a573545d7bff35fa",
7
- "dependencies": {
8
- "@symbo.ls/atoms": "latest"
9
- },
10
- "source": "src/index.js"
11
- }
@@ -1,37 +0,0 @@
1
- 'use strict'
2
-
3
- import { Flex } from '@symbo.ls/atoms'
4
-
5
- export const Tooltip = {
6
- extend: Flex,
7
- props: {
8
- background: 'black',
9
- color: 'white',
10
- flow: 'column',
11
- shape: 'tooltip',
12
- shapeDirection: 'top',
13
- padding: 'Z1 A',
14
- round: 'Y2',
15
- minWidth: 'D2',
16
- gap: 'X',
17
- textAlign: 'center',
18
-
19
- title: {
20
- fontWeight: 500,
21
- color: 'gray12',
22
- text: 'And tooltip is coming'
23
- },
24
- p: {
25
- fontSize: 'Z2',
26
- margin: '0',
27
- color: 'gray6',
28
- text: 'and winter too',
29
- fontWeight: '400'
30
- }
31
- },
32
-
33
- attr: { tooltip: true },
34
-
35
- title: {},
36
- p: {}
37
- }
@@ -1,11 +0,0 @@
1
- {
2
- "name": "@symbo.ls/tooltip",
3
- "version": "1.2.0",
4
- "main": "index.js",
5
- "license": "MIT",
6
- "gitHead": "54fa6500c697604b3f48ba33a573545d7bff35fa",
7
- "dependencies": {
8
- "@symbo.ls/atoms": "latest"
9
- },
10
- "source": "src/index.js"
11
- }
@@ -1,12 +0,0 @@
1
- 'use strict'
2
-
3
- export default {
4
- textAlign: 'center',
5
- padding: '1.2em',
6
- caption: {
7
- whiteSpace: 'nowrap'
8
- },
9
- span: {
10
- opacity: '.5'
11
- }
12
- }
package/lerna.json DELETED
@@ -1,9 +0,0 @@
1
- {
2
- "packages": [
3
- "components/*",
4
- "react/*",
5
- "packages/*"
6
- ],
7
- "npmClient": "yarn",
8
- "version": "1.2.4"
9
- }
@@ -1,5 +0,0 @@
1
- 'use strict'
2
-
3
-
4
- export * from '@symbo.ls/atoms'
5
- export * from '@symbo.ls/react-box'
@@ -1,16 +0,0 @@
1
- {
2
- "name": "@symbo.ls/react",
3
- "version": "1.2.0",
4
- "main": "index.js",
5
- "license": "MIT",
6
- "gitHead": "6378f05ba88065ef932810a1582f45e0384feafc",
7
- "dependencies": {
8
- "@symbo.ls/atoms": "latest",
9
- "@symbo.ls/convert": "latest",
10
- "@symbo.ls/react-box": "latest"
11
- },
12
- "peerDependencies": {
13
- "domql": "latest"
14
- },
15
- "source": "src/index.js"
16
- }
@@ -1,38 +0,0 @@
1
- # Symbols
2
-
3
- UI Library in composition of [Scratch](https://github.com/symbo.ls/scratch) and [DOMQL](https://github.com/symbo.ls/domql) or [DOMQL](https://github.com/symbo-ls/smbls/tree/main/packages/all/packages/react)
4
-
5
- Check out the [documentation page](https://docs.symbols.app/).
6
-
7
- [![npm version](https://badge.fury.io/js/smbls.svg)](https://badge.fury.io/js/smbls)
8
-
9
- ### UI Components
10
-
11
- Library consists with packages. Components can be invoked individually.
12
-
13
-
14
- ### Setup
15
-
16
- 1. Installation
17
- ```
18
- yarn add 'smbls'
19
- ```
20
-
21
- 2. Import the component from Symbols
22
- ```
23
- import { Box } from 'smbls'
24
- ```
25
-
26
- 3. Use it inside your DOMQL code
27
- ### DOMQL
28
- ```javascript
29
- const Header = {
30
- proto: Box,
31
- // ...Other Properties
32
- }
33
- ```
34
-
35
- ### React
36
- ```javascript
37
- <Box {...props} />
38
- ```
@@ -1,40 +0,0 @@
1
- {
2
- "name": "@symbo.ls/uikit",
3
- "description": "UI Library built on Scratch and DOMQL",
4
- "version": "1.2.1",
5
- "author": "symbo.ls",
6
- "repository": "https://github.com/symbo-ls/smbls",
7
- "main": "index.js",
8
- "files": [
9
- "index.js",
10
- "react.js"
11
- ],
12
- "publishConfig": {
13
- "registry": "https://registry.npmjs.org"
14
- },
15
- "dependencies": {
16
- "@symbo.ls/atoms": "latest",
17
- "@symbo.ls/avatar": "latest",
18
- "@symbo.ls/banner": "latest",
19
- "@symbo.ls/box": "latest",
20
- "@symbo.ls/button": "latest",
21
- "@symbo.ls/buttonset": "latest",
22
- "@symbo.ls/datepicker": "latest",
23
- "@symbo.ls/dropdown": "latest",
24
- "@symbo.ls/field": "latest",
25
- "@symbo.ls/icon": "latest",
26
- "@symbo.ls/img": "latest",
27
- "@symbo.ls/input": "latest",
28
- "@symbo.ls/label": "latest",
29
- "@symbo.ls/link": "latest",
30
- "@symbo.ls/notification": "latest",
31
- "@symbo.ls/pills": "latest",
32
- "@symbo.ls/select": "latest",
33
- "@symbo.ls/slider": "latest",
34
- "@symbo.ls/textarea": "latest",
35
- "@symbo.ls/tooltip": "latest"
36
- },
37
- "browserslist": "> 0.5%, last 2 versions, not dead",
38
- "gitHead": "6378f05ba88065ef932810a1582f45e0384feafc",
39
- "source": "src/index.js"
40
- }
@@ -1,114 +0,0 @@
1
- # react-box
2
-
3
- React Box
4
-
5
-
6
- ## Table of Contents
7
-
8
- * [Installation](#installation)
9
- * [API documentation](#api-documentation)
10
- * [Examples](#examples)
11
- * [Properties](#props)
12
-
13
- <!-- ## Browsers support -->
14
-
15
- <!-- | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Opera |
16
- | --------- | --------- | --------- | --------- | --------- |
17
- | IE 8 + ✔ | Firefox 31.0+ ✔ | Chrome 31.0+ ✔ | Safari 7.0+ ✔ | Opera 30.0+ ✔ | -->
18
-
19
-
20
- ## Install
21
-
22
- To install, you can use [npm](https://npmjs.org/) or [yarn](https://yarnpkg.com):
23
-
24
- $ npm install --save @symbo.ls/react-box
25
- $ yarn add @symbo.ls/react-box
26
-
27
-
28
- ## Usage
29
-
30
- Box element which can be used with
31
-
32
-
33
- ## Examples
34
- ```javascript
35
- import { Box } from '@symbo.ls/react'
36
-
37
- // example 1
38
- const buttonProps = {
39
- theme: 'primary',
40
- size: 'A',
41
- padding: 'B Z'
42
- }
43
-
44
- const Button2 = () => <Box tag="button" ...buttonProps />
45
-
46
- // example 2
47
- const buttonConf = {
48
- tag: 'button',
49
- props: {
50
- theme: 'primary',
51
- size: 'A',
52
- padding: 'B Z'
53
- }
54
- }
55
-
56
- const Button3 = () => <Box ...buttonConf />
57
- ```
58
-
59
- ## API
60
- The primary documentation for react-box is the reference book, which describes the API and gives examples of its usage.
61
-
62
- ### Props
63
-
64
- Properties:
65
- className
66
- ref
67
- href - link destination of the element
68
- target - link target
69
- src - Source path (eg Link) of the image
70
- alt - Alternative text in case image does not load
71
- title - Title when hovering the image
72
- ariaLabel
73
-
74
-
75
- style properties:
76
- `width` - Width of the element
77
- `height` - Height of the element
78
- `boxSize` - [`width`, `heigh`]
79
-
80
- `maxWidth` - Max width of the box
81
- `minWidth` - Min width of the box
82
- `widthRange` - Min and Max width range of the box
83
-
84
- `maxHeight` - Max height of the box
85
- `minHeight` - Min height of the box
86
- `heightRange` - Min and Max height range of the box
87
-
88
- `aspectRatio` - Aspect ratio of the box (1/3, 3/7…)
89
- `padding` - Inner space of the element
90
- `margin` - Outer space of the element
91
- `gap` - Space between children inside the element
92
-
93
- `flexFlow` -
94
- `flexAlign` - `display: flex`, `alignItems` and `justifyContent`
95
-
96
- `flow`
97
- `flexDirection`
98
- `alignItems`
99
- `justifyContent`
100
- `gap`
101
-
102
- `text` - Text value in the element
103
- `size` - Text size of the element
104
-
105
- `direction` - Language direction of the component
106
-
107
- values: `ltr`, `rtl`
108
- ## Important Note
109
-
110
-
111
-
112
- ## License
113
-
114
- `@symbo.ls/react-box` is released under the MIT license.
@@ -1,3 +0,0 @@
1
- import { Box } from './';
2
-
3
- export { Box };
@@ -1,63 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
- import _typeof from "@babel/runtime/helpers/esm/typeof";
3
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
- import * as React from "react";
6
- import { useRef, useImperativeHandle, forwardRef } from "react";
7
- import { transformClassname, transformEmotion } from 'css-in-props'
8
-
9
-
10
- var Box = function Box(props, ref) {
11
- var className = props.className,
12
- tag = props.tag,
13
- href = props.href,
14
- target = props.target,
15
- ariaLabel = props.ariaLabel,
16
- src = props.src,
17
- alt = props.alt,
18
- title = props.title,
19
- type = props.type,
20
- name = props.name,
21
- checked = props.checked,
22
- id = props.id,
23
- onClick = props.onClick,
24
- restProps = _objectWithoutProperties(props, ["tag", "className"]);
25
-
26
- var domRef = useRef(null);
27
- useImperativeHandle(ref, function () {
28
- return domRef.current;
29
- });
30
-
31
- var extraProps = _objectSpread({}, restProps, restProps.props);
32
-
33
- var tag = props.tag || extraProps.tag || "div";
34
-
35
- var children = props.text ? props.text : props.children;
36
-
37
- const propsClass = transformEmotion(transformClassname(props))
38
-
39
- const style = { ...props.style };
40
-
41
- return /*#DOMQL GOES HERE*/ React.createElement(
42
- tag,
43
- _extends({
44
- className: `${className ?? ""} ${propsClass}` ,
45
- ref: domRef,
46
- style: style,
47
- href,
48
- target,
49
- src,
50
- alt,
51
- type,
52
- name,
53
- checked,
54
- id,
55
- onClick,
56
- title,
57
- "aria-label": ariaLabel,
58
- }),
59
- children
60
- );
61
- };
62
-
63
- export default /*#__PURE__*/ forwardRef(Box);
@@ -1,33 +0,0 @@
1
- {
2
- "name": "@symbo.ls/react-box",
3
- "version": "1.2.0",
4
- "description": "React Box",
5
- "keywords": [
6
- "@symbo.ls/react-box"
7
- ],
8
- "homepage": "https://docs.symbols.app/box",
9
- "repository": {
10
- "type": "git",
11
- "url": ""
12
- },
13
- "license": "MIT",
14
- "files": [
15
- "dist",
16
- "lib"
17
- ],
18
- "main": "index.js",
19
- "module": "index.js",
20
- "dependencies": {
21
- "@babel/runtime": "^7.11.2",
22
- "css-in-props": "latest"
23
- },
24
- "peerDependencies": {
25
- "react": ">=16.9.0",
26
- "react-dom": ">=16.9.0"
27
- },
28
- "browserslist": [
29
- ">0.2%",
30
- "not dead",
31
- "not op_mini all"
32
- ]
33
- }
@@ -1,7 +0,0 @@
1
- const path = require('path')
2
-
3
- module.exports = {
4
- getSymbolId: (filePath, fileContent, fileHash) => {
5
- return path.basename(filePath, '.svg')
6
- }
7
- }
package/watch.js DELETED
@@ -1,12 +0,0 @@
1
- const fs = require('fs')
2
-
3
- const oldPath = '../react-starter-kit/package.json'
4
- const tempPath = '../react-starter-kit/package1.json'
5
-
6
- fs.rename(oldPath, tempPath, function (err) {
7
- if (err) throw err
8
- fs.rename(tempPath, oldPath, function (err) {
9
- if (err) throw err
10
- console.log('Successfully renamed - AKA moved!')
11
- })
12
- })