@symbo.ls/uikit 1.2.2 → 1.2.5

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,55 +0,0 @@
1
- 'use strict'
2
-
3
- import { isString } from '@domql/utils'
4
- import { getTimingByKey, getTimingFunction } from '@symbo.ls/scratch'
5
-
6
- export const transformTransition = transition => {
7
- const arr = transition.split(' ')
8
-
9
- if (!arr.length) return transition
10
-
11
- return arr.map(v => {
12
- if (v.slice(0, 2) === '--') return `var(${v})`
13
- if (v.length < 3 || v.includes('ms')) {
14
- const mapWithSequence = getTimingByKey(v)
15
- return mapWithSequence.timing || v
16
- }
17
- if (getTimingFunction(v)) return getTimingFunction(v)
18
- return v
19
- }).join(' ')
20
- }
21
-
22
- export const transformDuration = (duration, props, propertyName) => {
23
- if (!isString(duration)) return
24
- return duration.split(',').map(v => getTimingByKey(v).timing || v).join(',')
25
- }
26
-
27
- export const splitTransition = transition => {
28
- const arr = transition.split(',')
29
- if (!arr.length) return
30
- return arr.map(transformTransition).join(',')
31
- }
32
-
33
- export const Timing = {
34
- class: {
35
- transition: ({ props }) => props.transition && ({
36
- transition: splitTransition(props.transition)
37
- }),
38
- willChange: ({ props }) => props.willChange && ({
39
- willChange: props.willChange
40
- }),
41
- transitionDuration: ({ props }) => props.transitionDuration && ({
42
- transitionDuration: transformDuration(props.transitionDuration)
43
- }),
44
- transitionDelay: ({ props }) => props.transitionDelay && ({
45
- transitionDelay: transformDuration(props.transitionDelay)
46
- }),
47
- transitionTimingFunction: ({ props }) => props.transitionTimingFunction && ({
48
- transitionTimingFunction: getTimingFunction(props.transitionTimingFunction)
49
- }),
50
- transitionProperty: ({ props }) => props.transitionProperty && ({
51
- transitionProperty: props.transitionProperty,
52
- willChange: props.transitionProperty
53
- })
54
- }
55
- }
@@ -1,8 +0,0 @@
1
- 'use strict'
2
-
3
- export const Transform = {
4
- class: {
5
- transform: ({ props }) => props.transform && ({ transform: props.transform }),
6
- transformOrigin: ({ props }) => props.transformOrigin && ({ transformOrigin: props.transformOrigin })
7
- }
8
- }
@@ -1,7 +0,0 @@
1
- 'use strict'
2
-
3
- export const XYZ = {
4
- class: {
5
- zIndex: ({ props }) => props.zIndex && ({ zIndex: props.zIndex })
6
- }
7
- }
@@ -1,25 +0,0 @@
1
- 'use strict'
2
-
3
- export * from './Block'
4
- export * from './Direction'
5
- export * from './Flex'
6
- export * from './Grid'
7
- export * from './Img'
8
- export * from './Form'
9
- export * from './Media'
10
- export * from './Iframe'
11
- export * from './Interaction'
12
- export * from './InteractiveComponent'
13
- export * from './Overflow'
14
- export * from './Collection'
15
- export * from './Position'
16
- export * from './Picture'
17
- export * from './Pseudo'
18
- export * from './SVG'
19
- export * from './Shape'
20
- export * from './Theme'
21
- export * from './Text'
22
- export * from './Timing'
23
- export * from './Transform'
24
- export * from './XYZ'
25
- export * from './Animation'
@@ -1,13 +0,0 @@
1
- {
2
- "name": "@symbo.ls/atoms",
3
- "version": "1.2.4",
4
- "main": "index.js",
5
- "license": "MIT",
6
- "gitHead": "54fa6500c697604b3f48ba33a573545d7bff35fa",
7
- "dependencies": {
8
- "@domql/utils": "latest",
9
- "@symbo.ls/create-emotion": "latest",
10
- "@symbo.ls/scratch": "latest"
11
- },
12
- "source": "src/index.js"
13
- }
@@ -1,32 +0,0 @@
1
- 'use strict'
2
-
3
- import { Img, Flex } from '.'
4
-
5
- export const Avatar = {
6
- extend: Img,
7
- key: 'nikoloza',
8
- props: {
9
- display: 'block',
10
- avatarType: 'initials',
11
- borderRadius: '100%',
12
- boxSize: 'B',
13
- cursor: 'pointer'
14
- },
15
- attr: {
16
- src: ({ key, props }) => props.src || `https://avatars.dicebear.com/api/${props.avatarType || 'adventurer-neutral'}/${props.key || key}.svg`
17
- }
18
- }
19
-
20
- export const AvatarBundle = {
21
- extend: Flex,
22
- childExtend: {
23
- extend: Avatar,
24
- props: {
25
- boxSize: 'B1',
26
- border: '0.1312em, black .85, solid',
27
- ':not(:last-child)': {
28
- margin: '0 -Y2 0 0'
29
- }
30
- }
31
- }
32
- }
@@ -1,12 +0,0 @@
1
- {
2
- "name": "@symbo.ls/avatar",
3
- "version": "1.2.3",
4
- "main": "index.js",
5
- "license": "MIT",
6
- "gitHead": "54fa6500c697604b3f48ba33a573545d7bff35fa",
7
- "dependencies": {
8
- "@symbo.ls/flex": "latest",
9
- "@symbo.ls/img": "latest"
10
- },
11
- "source": "src/index.js"
12
- }
@@ -1,19 +0,0 @@
1
- 'use strict'
2
-
3
- export const styleUser = {
4
- cursor: 'pointer',
5
- borderRadius: '100%'
6
- }
7
-
8
- export const styleUserBundle = {
9
- display: 'flex',
10
- alignItems: 'center',
11
- textTransform: 'capitalize',
12
- '> div': {
13
- display: 'flex',
14
- marginRight: '1em',
15
- '> img': {
16
- marginRight: '-0.5em'
17
- }
18
- }
19
- }
@@ -1,22 +0,0 @@
1
- 'use strict'
2
-
3
- import { Icon } from '@symbo.ls/icon'
4
- import { AvatarBundle } from '@symbo.ls/avatar'
5
-
6
- import { styleParentMode } from './style'
7
-
8
- export const ParentMode = {
9
- round: 10,
10
- theme: 'purple',
11
- style: styleParentMode,
12
- icon: {
13
- extend: Icon,
14
- props: { icon: 'checkMedium' }
15
- },
16
- h2: 'Welcome to parent Mode',
17
- description: {
18
- extend: AvatarBundle,
19
- users: { ...[{}, {}, {}] },
20
- span: 'You\'ll now be able to chat with tutor privately. No other participants will see the messages.'
21
- }
22
- }
@@ -1,12 +0,0 @@
1
- {
2
- "name": "@symbo.ls/banner",
3
- "version": "1.2.0",
4
- "main": "index.js",
5
- "license": "MIT",
6
- "gitHead": "54fa6500c697604b3f48ba33a573545d7bff35fa",
7
- "dependencies": {
8
- "@symbo.ls/avatar": "latest",
9
- "@symbo.ls/icon": "latest"
10
- },
11
- "source": "src/index.js"
12
- }
@@ -1,27 +0,0 @@
1
- 'use strict'
2
-
3
- export const styleParentMode = {
4
- boxSizing: 'border-box',
5
- padding: '3.6em 1.6em 4em 3.6em',
6
- position: 'relative',
7
- display: 'block',
8
- width: '700px',
9
- '> svg': {
10
- position: 'absolute',
11
- top: '1.2em',
12
- right: '1.2em',
13
- color: 'rgba(215, 100, 185, .2)'
14
- },
15
- '> div': {
16
- alignItems: 'flex-start',
17
- '> div': { marginTop: '4px' }
18
- },
19
- h2: {
20
- margin: 0,
21
- marginBottom: '10px'
22
- },
23
- span: {
24
- maxWidth: `${314 / 14}em`,
25
- lineHeight: '22px'
26
- }
27
- }
@@ -1,44 +0,0 @@
1
- 'use strict'
2
-
3
- import {
4
- Shape,
5
- Position,
6
- Theme,
7
- Block,
8
- Text,
9
- Overflow,
10
- Timing,
11
- Transform,
12
- Media,
13
- Interaction,
14
- XYZ,
15
- Animation
16
- } from '@symbo.ls/atoms'
17
-
18
- const PropsCSS = {
19
- class: {
20
- style: ({ props }) => props && props.style
21
- }
22
- }
23
-
24
- export const Box = {
25
- extend: [
26
- PropsCSS,
27
- Shape,
28
- Position,
29
- Theme,
30
- Block,
31
- Text,
32
- Overflow,
33
- Timing,
34
- Transform,
35
- Media,
36
- Interaction,
37
- XYZ,
38
- Animation
39
- ],
40
- attr: {
41
- id: ({ props }) => props.id
42
- }
43
- }
44
-
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@symbo.ls/box",
3
- "version": "1.2.0",
4
- "main": "index.js",
5
- "license": "MIT",
6
- "dependencies": {
7
- "@symbo.ls/atoms": "latest"
8
- },
9
- "source": "src/index.js"
10
- }
@@ -1,11 +0,0 @@
1
- # `Button`
2
-
3
- > TODO: description
4
-
5
- ## Usage
6
-
7
- ```
8
- const button = require('Button');
9
-
10
- // TODO: DEMONSTRATE API
11
- ```
@@ -1,48 +0,0 @@
1
- 'use strict'
2
-
3
- import { FocusableComponent } from '@symbo.ls/atoms'
4
- import { IconText } from '@symbo.ls/icon'
5
-
6
- export const Button = {
7
- extend: [FocusableComponent, IconText],
8
- tag: 'button',
9
- props: {
10
- fontSize: 'A',
11
- type: 'button',
12
- border: 'none',
13
- display: 'inline-flex',
14
- align: 'center center',
15
- textDecoration: 'none',
16
- lineHeight: '1',
17
- whiteSpace: 'nowrap',
18
- padding: 'Z A1',
19
- fontFamily: 'inherit',
20
- round: 'C2'
21
- },
22
- attr: {
23
- type: ({ props }) => props.type
24
- }
25
- }
26
-
27
- export const SquareButton = {
28
- extend: Button,
29
- props: {
30
- fontSize: 'A',
31
- width: 'A',
32
- padding: 'Z',
33
- aspectRatio: '1 / 1',
34
- justifyContent: 'center',
35
- round: 'Z',
36
- style: { boxSizing: 'content-box' }
37
- }
38
- }
39
-
40
- export const CircleButton = {
41
- extend: SquareButton,
42
- props: { round: 'C' }
43
- }
44
-
45
- export const KangorooButton = {
46
- extend: Button,
47
- childExtend: IconText
48
- }
@@ -1,12 +0,0 @@
1
- {
2
- "name": "@symbo.ls/button",
3
- "version": "1.2.0",
4
- "main": "index.js",
5
- "license": "MIT",
6
- "gitHead": "54fa6500c697604b3f48ba33a573545d7bff35fa",
7
- "dependencies": {
8
- "@symbo.ls/atoms": "latest",
9
- "@symbo.ls/icon": "latest"
10
- },
11
- "source": "src/index.js"
12
- }
@@ -1,10 +0,0 @@
1
- 'use strict'
2
-
3
- import { Flex } from '@symbo.ls/atoms'
4
- import { SquareButton } from '@symbo.ls/button'
5
-
6
- export const ButtonSet = {
7
- tag: 'nav',
8
- extend: Flex,
9
- childExtend: SquareButton
10
- }
@@ -1,12 +0,0 @@
1
- {
2
- "name": "@symbo.ls/buttonset",
3
- "version": "1.2.0",
4
- "main": "index.js",
5
- "license": "MIT",
6
- "gitHead": "54fa6500c697604b3f48ba33a573545d7bff35fa",
7
- "dependencies": {
8
- "@symbo.ls/atoms": "latest",
9
- "@symbo.ls/button": "latest"
10
- },
11
- "source": "src/index.js"
12
- }
@@ -1,156 +0,0 @@
1
- 'use strict'
2
-
3
- import style from './style'
4
-
5
- import { SquareButton, Button } from '@symbo.ls/button'
6
- import { Flex, Grid } from '@symbo.ls/atoms'
7
-
8
- const buttonProps = {
9
- theme: 'transparent',
10
- color: '--theme-quinary-dark-color',
11
- ':hover': {
12
- theme: 'quinary .child'
13
- }
14
- }
15
-
16
- const aside = {
17
- props: {
18
- gap: 'X2',
19
- margin: '-Z - -Z -X2',
20
- padding: 'Z - Z X2',
21
- minHeight: '100%',
22
- height: '100%',
23
- width: '--spacing-D'
24
- },
25
-
26
- cnt: {
27
- extend: Flex,
28
- props: {
29
- flow: 'column',
30
- overflow: 'hidden auto',
31
- boxSize: '100% --spacing-D',
32
- top: '0',
33
- position: 'absolute',
34
- maxHeight: '100%',
35
- justifyContent: 'flex-end'
36
- },
37
-
38
- childExtend: {
39
- extend: Button,
40
- props: {
41
- ...buttonProps,
42
- fontSize: 'Z1'
43
- },
44
- text: ({ state }) => state.value
45
- }
46
- }
47
-
48
- }
49
-
50
- const main = {
51
- extend: Flex,
52
-
53
- props: {
54
- flex: 1,
55
- gap: 'X2',
56
- flow: 'column',
57
-
58
- header: {
59
- align: 'center space-between'
60
- }
61
- },
62
-
63
- header: {
64
- extend: Flex,
65
- left: {
66
- extend: SquareButton,
67
- props: {
68
- ...buttonProps,
69
- round: 'C',
70
- icon: 'arrowAngleLeft'
71
- }
72
- },
73
- month: {
74
- tag: 'span',
75
- text: 'December'
76
- },
77
- right: {
78
- extend: SquareButton,
79
- props: {
80
- ...buttonProps,
81
- round: 'C',
82
- icon: 'arrowAngleRight'
83
- }
84
- }
85
- },
86
- days: {
87
- extend: Flex,
88
- props: {
89
- flow: 'column',
90
- gap: 'X2'
91
- },
92
- childExtend: {
93
- extend: Grid,
94
- props: {
95
- columns: 'repeat(7, 1fr)',
96
- gap: 'X2'
97
- }
98
- },
99
- weekDays: {
100
- childExtend: {
101
- extend: Button,
102
- props: {
103
- ...buttonProps,
104
- fontSize: 'Z1',
105
- padding: 'X2'
106
- }
107
- },
108
- ...[
109
- { text: 'Mo' },
110
- { text: 'Tu' },
111
- { text: 'We' },
112
- { text: 'Th' },
113
- { text: 'Fr' },
114
- { text: 'Sa' },
115
- { text: 'Su' }
116
- ]
117
- },
118
-
119
- cnt: {
120
- childExtend: {
121
- extend: SquareButton,
122
-
123
- props: ({ key, state }) => ({
124
- ...buttonProps,
125
- theme: 'quaternary',
126
- active: key === '18',
127
- '.active': {
128
- theme: 'quinary'
129
- }
130
- })
131
- },
132
-
133
- ...new Array(31).fill(undefined).map((_, i) => ({ text: i + 1 }))
134
- }
135
- }
136
- }
137
-
138
- export const DatePicker = {
139
- style,
140
- extend: Flex,
141
-
142
- props: {
143
- position: 'relative',
144
- theme: 'quinary',
145
- transition: 'A all',
146
- round: 'Z',
147
- padding: 'Z Z2 Z X2',
148
- gap: 'X2',
149
- depth: 16,
150
- minHeight: '0',
151
- align: 'stretch center'
152
- },
153
-
154
- aside,
155
- main
156
- }
@@ -1,13 +0,0 @@
1
- {
2
- "name": "@symbo.ls/datepicker",
3
- "version": "1.2.2",
4
- "main": "index.js",
5
- "license": "MIT",
6
- "gitHead": "54fa6500c697604b3f48ba33a573545d7bff35fa",
7
- "dependencies": {
8
- "@symbo.ls/block": "latest",
9
- "@symbo.ls/icon": "latest",
10
- "@symbo.ls/shape": "latest"
11
- },
12
- "source": "src/index.js"
13
- }
@@ -1,18 +0,0 @@
1
- 'use strict'
2
-
3
- export default {
4
- main: {
5
- 'section > header span:nth-child(6)': {
6
- opacity: 0.5
7
- },
8
- 'section > header span:nth-child(7)': {
9
- opacity: 0.5
10
- },
11
- 'section > div button:nth-child(7n)': {
12
- opacity: 0.5
13
- },
14
- 'section > div button:nth-child(7n - 1)': {
15
- opacity: 0.5
16
- }
17
- }
18
- }
@@ -1,52 +0,0 @@
1
- 'use strict'
2
-
3
- import { Flex } from '@symbo.ls/atoms'
4
- import { Button } from '@symbo.ls/button'
5
-
6
- export const DropdownList = {
7
- extend: Flex,
8
-
9
- props: {
10
- padding: '0 Y',
11
- maxHeight: 'G',
12
- flow: 'column',
13
- theme: 'quaternary',
14
- overflow: 'hidden auto',
15
- style: { listStyleType: 'none' }
16
- },
17
-
18
- childExtend: {
19
- extend: Button,
20
-
21
- props: (el, s) => ({
22
- active: s.active === el.key,
23
- position: 'relative',
24
- round: '0',
25
- align: 'center flex-end',
26
- flow: 'row-reverse',
27
- padding: 'Z2 C Z2 Y2',
28
- margin: '0',
29
- gap: 'Y2',
30
- theme: 'quaternary .child',
31
-
32
- ':hover': {
33
- style: {
34
- svg: { opacity: '0.5' }
35
- }
36
- },
37
-
38
- icon: {
39
- active: s.active === el.key,
40
- name: 'checkmark',
41
- opacity: '0.1',
42
- '.active': { opacity: '1' }
43
- },
44
-
45
- ':not(:first-child)': {
46
- '@dark': { border: 'gray4 .65, solid' },
47
- '@light': { border: 'gray11, solid' },
48
- borderWidth: '1px 0 0'
49
- }
50
- })
51
- }
52
- }
@@ -1,12 +0,0 @@
1
- {
2
- "name": "@symbo.ls/dropdown",
3
- "version": "1.2.0",
4
- "main": "index.js",
5
- "license": "MIT",
6
- "gitHead": "54fa6500c697604b3f48ba33a573545d7bff35fa",
7
- "dependencies": {
8
- "@symbo.ls/atoms": "latest",
9
- "@symbo.ls/button": "latest"
10
- },
11
- "source": "src/index.js"
12
- }