@bigbinary/neeto-editor 0.1.15 → 0.2.1
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/index.js +37 -14
- package/package.json +18 -4
- package/src/App.js +5 -28
- package/src/Common/Avatar.js +168 -0
- package/src/Common/Button.js +95 -0
- package/src/Common/CodeBlock.js +11 -0
- package/src/Common/Description.js +8 -0
- package/src/Common/Dropdown/index.js +122 -0
- package/src/Common/Heading.js +13 -0
- package/src/Common/HighlightText.js +7 -0
- package/src/Common/Icons/HashtagFilled.js +59 -0
- package/src/Common/Icons/TextColor.js +35 -0
- package/src/Common/Icons/index.js +2 -0
- package/src/Common/Input.js +70 -0
- package/src/Common/Label.js +45 -0
- package/src/Common/ListItems.js +17 -0
- package/src/Common/Modal.js +91 -0
- package/src/Common/Tab.js +79 -0
- package/src/Common/ToolTip.js +37 -0
- package/src/Editor/CustomExtensions/BubbleMenu/index.js +33 -26
- package/src/Editor/CustomExtensions/Embeds.js +5 -3
- package/src/Editor/CustomExtensions/FixedMenu/FontSizeOption.js +32 -0
- package/src/Editor/CustomExtensions/FixedMenu/TextColorOption.js +29 -0
- package/src/Editor/CustomExtensions/FixedMenu/constants.js +3 -0
- package/src/Editor/CustomExtensions/FixedMenu/index.js +183 -0
- package/src/Editor/CustomExtensions/Image/LinkUploader/URLForm.js +39 -0
- package/src/Editor/CustomExtensions/Image/LocalUploader.js +21 -0
- package/src/Editor/CustomExtensions/Image/ProgressBar.js +34 -0
- package/src/Editor/CustomExtensions/Image/Uploader.js +72 -31
- package/src/Editor/CustomExtensions/Image/constants.js +5 -0
- package/src/Editor/CustomExtensions/Mention/ExtensionConfig.js +66 -0
- package/src/Editor/CustomExtensions/Mention/MentionList.js +96 -0
- package/src/Editor/CustomExtensions/Mention/helpers.js +23 -0
- package/src/Editor/CustomExtensions/Placeholder/ExtensionConfig.js +81 -0
- package/src/Editor/CustomExtensions/Placeholder/helpers.js +18 -0
- package/src/Editor/CustomExtensions/SlashCommands/Commands.js +5 -10
- package/src/Editor/CustomExtensions/SlashCommands/CommandsList.js +15 -16
- package/src/Editor/CustomExtensions/SlashCommands/ExtensionConfig.js +200 -155
- package/src/Editor/CustomExtensions/Variable/ExtensionConfig.js +208 -0
- package/src/Editor/CustomExtensions/Variable/VariableList.js +45 -0
- package/src/Editor/CustomExtensions/Variable/VariableSuggestion.js +20 -0
- package/src/Editor/CustomExtensions/Variable/helpers.js +31 -0
- package/src/Editor/CustomExtensions/Variable/index.js +35 -0
- package/src/Editor/CustomExtensions/useCustomExtensions.js +88 -0
- package/src/Editor/index.js +59 -41
- package/src/constants/regexp.js +1 -0
- package/src/examples/constants.js +95 -0
- package/src/examples/index.js +186 -0
- package/src/hooks/useOutsideClick.js +19 -0
- package/src/hooks/useTabBar.js +9 -0
- package/src/index.scss +32 -12
- package/src/styles/abstracts/_mixins.scss +20 -0
- package/src/styles/abstracts/_neeto-ui-variables.scss +107 -0
- package/src/styles/abstracts/_variables.scss +13 -0
- package/src/styles/components/_avatar.scss +105 -0
- package/src/styles/components/_button.scss +161 -0
- package/src/styles/components/_codeblock.scss +16 -0
- package/src/{Editor/styles/CommandsList.scss → styles/components/_command-list.scss} +12 -1
- package/src/styles/components/_dropdown.scss +69 -0
- package/src/styles/components/_editor-variables.scss +12 -0
- package/src/{Editor/styles/EditorStyles.scss → styles/components/_editor.scss} +33 -7
- package/src/styles/components/_fixed-menu.scss +17 -0
- package/src/styles/components/_image-uploader.scss +109 -0
- package/src/styles/components/_input.scss +165 -0
- package/src/styles/components/_tab.scss +74 -0
- package/src/styles/components/_tooltip.scss +152 -0
- package/src/utils/common.js +13 -0
- package/webpack.config.js +7 -0
- package/webpack.dev.config.js +7 -0
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/src/logo.svg +0 -1
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
.image-uploader__root {
|
|
2
|
+
$color-primary: $color-indigo;
|
|
3
|
+
|
|
4
|
+
.label--primary {
|
|
5
|
+
color: $neeto-ui-gray-700;
|
|
6
|
+
display: block;
|
|
7
|
+
margin-bottom: 5px;
|
|
8
|
+
font-size: $neeto-ui-text-sm;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.label--secondary {
|
|
12
|
+
color: $neeto-ui-gray-400;
|
|
13
|
+
font-size: $neeto-ui-text-xs;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
margin: 8px;
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
min-height: 176px;
|
|
20
|
+
width: 488px;
|
|
21
|
+
|
|
22
|
+
.image-uploader__content {
|
|
23
|
+
flex: 1;
|
|
24
|
+
display: flex;
|
|
25
|
+
margin-top: 10px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// ProgressBar
|
|
29
|
+
.progress-bar__root {
|
|
30
|
+
width: 100%;
|
|
31
|
+
max-width: 256px;
|
|
32
|
+
margin-top: 11px;
|
|
33
|
+
.progress-bar__indicator {
|
|
34
|
+
position: relative;
|
|
35
|
+
width: 100%;
|
|
36
|
+
height: 6px;
|
|
37
|
+
border-radius: 100px;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
background: rgba($color-primary, 0.2);
|
|
40
|
+
margin-top: 5px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.progress-bar__indicator-inner {
|
|
44
|
+
background: $color-primary;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.progress-bar__percent-text {
|
|
48
|
+
font-size: $neeto-ui-text-xs;
|
|
49
|
+
color: $neeto-ui-gray-800;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Local upload component related styles
|
|
54
|
+
.local-upload__root {
|
|
55
|
+
display: flex;
|
|
56
|
+
flex: 1;
|
|
57
|
+
border: 1px dashed $neeto-ui-gray-400;
|
|
58
|
+
box-sizing: border-box;
|
|
59
|
+
border-radius: 2px;
|
|
60
|
+
|
|
61
|
+
// DragDrop
|
|
62
|
+
.uppy-DragDrop-container {
|
|
63
|
+
width: 100%;
|
|
64
|
+
height: 100%;
|
|
65
|
+
background-color: $color-solid-white;
|
|
66
|
+
cursor: pointer;
|
|
67
|
+
|
|
68
|
+
// firefox fix: removes thin dotted outline
|
|
69
|
+
&::-moz-focus-inner {
|
|
70
|
+
border: 0;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.uppy-DragDrop-inner {
|
|
75
|
+
display: flex;
|
|
76
|
+
flex-direction: column;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
margin: 0;
|
|
79
|
+
line-height: 1.4;
|
|
80
|
+
text-align: center;
|
|
81
|
+
font-weight: $neeto-ui-font-normal;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.uppy-DragDrop-arrow {
|
|
85
|
+
visibility: hidden;
|
|
86
|
+
display: none;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.uppy-DragDrop--isDraggingOver {
|
|
90
|
+
background: $neeto-ui-gray-200;
|
|
91
|
+
border: 2px dashed $color-primary;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.uppy-DragDrop-label {
|
|
95
|
+
@extend .label--primary;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.uppy-DragDrop-browse {
|
|
99
|
+
color: $color-primary;
|
|
100
|
+
font-size: $font-size-lg;
|
|
101
|
+
font-weight: $neeto-ui-font-semibold;
|
|
102
|
+
cursor: pointer;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.uppy-DragDrop-note {
|
|
106
|
+
@extend .label--secondary;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
.neeto-ui-input__wrapper {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
justify-content: flex-start;
|
|
5
|
+
align-items: flex-start;
|
|
6
|
+
flex-grow: 1;
|
|
7
|
+
|
|
8
|
+
.neeto-ui-label {
|
|
9
|
+
margin-bottom: 4px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.neeto-ui-input {
|
|
13
|
+
width: 100%;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: row;
|
|
16
|
+
justify-content: flex-start;
|
|
17
|
+
align-items: center;
|
|
18
|
+
font-size: $neeto-ui-text-sm;
|
|
19
|
+
line-height: 1.6;
|
|
20
|
+
transition: $neeto-ui-transition;
|
|
21
|
+
border-radius: $neeto-ui-rounded-sm;
|
|
22
|
+
border: thin solid $neeto-ui-gray-400;
|
|
23
|
+
background-color: $neeto-ui-white;
|
|
24
|
+
color: $neeto-ui-gray-800;
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
|
|
27
|
+
&.neeto-ui-input--textarea {
|
|
28
|
+
padding: 8px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
input,
|
|
32
|
+
textarea {
|
|
33
|
+
width: 100%;
|
|
34
|
+
background-color: transparent;
|
|
35
|
+
color: inherit;
|
|
36
|
+
border: none;
|
|
37
|
+
font-size: inherit;
|
|
38
|
+
line-height: inherit;
|
|
39
|
+
box-shadow: none;
|
|
40
|
+
outline: none;
|
|
41
|
+
|
|
42
|
+
&::placeholder {
|
|
43
|
+
color: $neeto-ui-gray-400;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&:focus {
|
|
47
|
+
outline-color: transparent;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
input {
|
|
52
|
+
padding: 8px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
textarea {
|
|
56
|
+
padding: 0;
|
|
57
|
+
max-height: 224px;
|
|
58
|
+
overflow-y: auto;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&:focus-within:not(.neeto-ui-input--naked, .neeto-ui-input--error) {
|
|
62
|
+
border-color: $neeto-ui-gray-800;
|
|
63
|
+
box-shadow: $neeto-ui-shadow;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&:hover:not(.neeto-ui-input--naked, .neeto-ui-input--error, .neeto-ui-input--disabled) {
|
|
67
|
+
border-color: $neeto-ui-gray-700;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&.neeto-ui-input--error {
|
|
71
|
+
border-color: $neeto-ui-error;
|
|
72
|
+
|
|
73
|
+
&:focus-within:not(.neeto-ui-input--naked) {
|
|
74
|
+
box-shadow: 0 0 0 3px $neeto-ui-pastel-red;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
textarea {
|
|
78
|
+
resize: none;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&.neeto-ui-input--disabled {
|
|
83
|
+
background-color: $neeto-ui-gray-100;
|
|
84
|
+
cursor: not-allowed;
|
|
85
|
+
|
|
86
|
+
input {
|
|
87
|
+
cursor: not-allowed;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
textarea {
|
|
91
|
+
cursor: not-allowed;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&.neeto-ui-input--small {
|
|
96
|
+
input {
|
|
97
|
+
padding: 6px 8px;
|
|
98
|
+
line-height: 1.3;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&.neeto-ui-input--naked {
|
|
103
|
+
padding: 0;
|
|
104
|
+
border: none;
|
|
105
|
+
box-shadow: none;
|
|
106
|
+
|
|
107
|
+
.neeto-ui-input__prefix {
|
|
108
|
+
margin-left: 0;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.neeto-ui-input__suffix {
|
|
112
|
+
margin-right: 0;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.neeto-ui-input__prefix,
|
|
118
|
+
.neeto-ui-input__suffix {
|
|
119
|
+
display: flex;
|
|
120
|
+
flex-direction: row;
|
|
121
|
+
justify-content: flex-start;
|
|
122
|
+
align-items: center;
|
|
123
|
+
font-size: 14px;
|
|
124
|
+
color: $neeto-ui-gray-600;
|
|
125
|
+
svg {
|
|
126
|
+
width: 16px;
|
|
127
|
+
height: 16px;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.neeto-ui-input__prefix {
|
|
132
|
+
margin-left: 10px;
|
|
133
|
+
}
|
|
134
|
+
.neeto-ui-input__suffix {
|
|
135
|
+
margin-right: 10px;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.neeto-ui-input--block-add-on {
|
|
139
|
+
.neeto-ui-input__prefix,
|
|
140
|
+
.neeto-ui-input__suffix {
|
|
141
|
+
margin: 0;
|
|
142
|
+
padding: 8px 10px;
|
|
143
|
+
background-color: $neeto-ui-gray-100;
|
|
144
|
+
}
|
|
145
|
+
.neeto-ui-input__prefix {
|
|
146
|
+
border-right: thin solid $neeto-ui-gray-300;
|
|
147
|
+
}
|
|
148
|
+
.neeto-ui-input__suffix {
|
|
149
|
+
border-left: thin solid $neeto-ui-gray-300;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.neeto-ui-input__help-text {
|
|
155
|
+
margin-top: 8px;
|
|
156
|
+
font-size: $neeto-ui-text-xs;
|
|
157
|
+
color: $neeto-ui-gray-500;
|
|
158
|
+
line-height: 1.6;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.neeto-ui-input__error {
|
|
162
|
+
margin-top: 4px;
|
|
163
|
+
font-size: $neeto-ui-text-xs;
|
|
164
|
+
color: $neeto-ui-error;
|
|
165
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
.neeto-ui-tab__wrapper {
|
|
2
|
+
width: 100%;
|
|
3
|
+
border-bottom: 1px solid $neeto-ui-gray-300;
|
|
4
|
+
|
|
5
|
+
&--size-large {
|
|
6
|
+
.neeto-ui-tab {
|
|
7
|
+
font-size: $neeto-ui-text-xl;
|
|
8
|
+
padding-left: 12px;
|
|
9
|
+
padding-right: 12px;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
&--underline-none {
|
|
13
|
+
border-bottom: none;
|
|
14
|
+
.neeto-ui-tab {
|
|
15
|
+
&::before {
|
|
16
|
+
display: none;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.neeto-ui-tab {
|
|
23
|
+
color: $neeto-ui-gray-500;
|
|
24
|
+
font-weight: $neeto-ui-font-semibold;
|
|
25
|
+
font-size: $neeto-ui-text-sm;
|
|
26
|
+
line-height: 1;
|
|
27
|
+
padding: 12px 8px;
|
|
28
|
+
transition: $neeto-ui-transition;
|
|
29
|
+
position: relative;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
text-decoration: none;
|
|
32
|
+
outline: none;
|
|
33
|
+
|
|
34
|
+
&:hover,
|
|
35
|
+
&:focus,
|
|
36
|
+
&:focus-visible,
|
|
37
|
+
&:active {
|
|
38
|
+
text-decoration: none;
|
|
39
|
+
outline: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&__icon {
|
|
43
|
+
margin-right: 12px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
svg {
|
|
47
|
+
width: 16px;
|
|
48
|
+
height: 16px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&:hover {
|
|
52
|
+
color: $neeto-ui-gray-600;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&:before {
|
|
56
|
+
content: "";
|
|
57
|
+
position: absolute;
|
|
58
|
+
width: 100%;
|
|
59
|
+
height: 1px;
|
|
60
|
+
background-color: transparent;
|
|
61
|
+
left: 0;
|
|
62
|
+
right: 0;
|
|
63
|
+
bottom: -2px;
|
|
64
|
+
transition: $neeto-ui-transition;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&.active {
|
|
68
|
+
color: $neeto-ui-gray-800;
|
|
69
|
+
|
|
70
|
+
&:before {
|
|
71
|
+
background-color: $neeto-ui-gray-800;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
.tippy-box[data-animation="fade"][data-state="hidden"] {
|
|
2
|
+
opacity: 0;
|
|
3
|
+
}
|
|
4
|
+
[data-tippy-root] {
|
|
5
|
+
max-width: calc(100vw - 10px);
|
|
6
|
+
}
|
|
7
|
+
.tippy-box {
|
|
8
|
+
position: relative;
|
|
9
|
+
background-color: $neeto-ui-gray-800;
|
|
10
|
+
color: $neeto-ui-white;
|
|
11
|
+
border-radius: $neeto-ui-rounded-sm;
|
|
12
|
+
font-size: $neeto-ui-text-xs;
|
|
13
|
+
line-height: 1.4;
|
|
14
|
+
outline: 0;
|
|
15
|
+
transition-property: transform, visibility, opacity;
|
|
16
|
+
}
|
|
17
|
+
.tippy-box[data-placement^="top"] > .tippy-arrow {
|
|
18
|
+
bottom: 0;
|
|
19
|
+
}
|
|
20
|
+
.tippy-box[data-placement^="top"] > .tippy-arrow:before {
|
|
21
|
+
bottom: -7px;
|
|
22
|
+
left: 0;
|
|
23
|
+
border-width: 8px 8px 0;
|
|
24
|
+
border-top-color: initial;
|
|
25
|
+
transform-origin: center top;
|
|
26
|
+
}
|
|
27
|
+
.tippy-box[data-placement^="bottom"] > .tippy-arrow {
|
|
28
|
+
top: 0;
|
|
29
|
+
}
|
|
30
|
+
.tippy-box[data-placement^="bottom"] > .tippy-arrow:before {
|
|
31
|
+
top: -7px;
|
|
32
|
+
left: 0;
|
|
33
|
+
border-width: 0 8px 8px;
|
|
34
|
+
border-bottom-color: initial;
|
|
35
|
+
transform-origin: center bottom;
|
|
36
|
+
}
|
|
37
|
+
.tippy-box[data-placement^="left"] > .tippy-arrow {
|
|
38
|
+
right: 0;
|
|
39
|
+
}
|
|
40
|
+
.tippy-box[data-placement^="left"] > .tippy-arrow:before {
|
|
41
|
+
border-width: 8px 0 8px 8px;
|
|
42
|
+
border-left-color: initial;
|
|
43
|
+
right: -7px;
|
|
44
|
+
transform-origin: center left;
|
|
45
|
+
}
|
|
46
|
+
.tippy-box[data-placement^="right"] > .tippy-arrow {
|
|
47
|
+
left: 0;
|
|
48
|
+
}
|
|
49
|
+
.tippy-box[data-placement^="right"] > .tippy-arrow:before {
|
|
50
|
+
left: -7px;
|
|
51
|
+
border-width: 8px 8px 8px 0;
|
|
52
|
+
border-right-color: initial;
|
|
53
|
+
transform-origin: center right;
|
|
54
|
+
}
|
|
55
|
+
.tippy-box[data-inertia][data-state="visible"] {
|
|
56
|
+
transition-timing-function: cubic-bezier(0.54, 1.5, 0.38, 1.11);
|
|
57
|
+
}
|
|
58
|
+
.tippy-arrow {
|
|
59
|
+
width: 16px;
|
|
60
|
+
height: 16px;
|
|
61
|
+
color: $neeto-ui-gray-800;
|
|
62
|
+
}
|
|
63
|
+
.tippy-arrow:before {
|
|
64
|
+
content: "";
|
|
65
|
+
position: absolute;
|
|
66
|
+
border-color: transparent;
|
|
67
|
+
border-style: solid;
|
|
68
|
+
}
|
|
69
|
+
.tippy-content {
|
|
70
|
+
position: relative;
|
|
71
|
+
padding: 5px 9px;
|
|
72
|
+
z-index: 1;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// svg arrow
|
|
76
|
+
.tippy-box[data-placement^="top"] > .tippy-svg-arrow {
|
|
77
|
+
bottom: 0;
|
|
78
|
+
}
|
|
79
|
+
.tippy-box[data-placement^="top"] > .tippy-svg-arrow:after,
|
|
80
|
+
.tippy-box[data-placement^="top"] > .tippy-svg-arrow > svg {
|
|
81
|
+
top: 16px;
|
|
82
|
+
transform: rotate(180deg);
|
|
83
|
+
}
|
|
84
|
+
.tippy-box[data-placement^="bottom"] > .tippy-svg-arrow {
|
|
85
|
+
top: 0;
|
|
86
|
+
}
|
|
87
|
+
.tippy-box[data-placement^="bottom"] > .tippy-svg-arrow > svg {
|
|
88
|
+
bottom: 16px;
|
|
89
|
+
}
|
|
90
|
+
.tippy-box[data-placement^="left"] > .tippy-svg-arrow {
|
|
91
|
+
right: 0;
|
|
92
|
+
}
|
|
93
|
+
.tippy-box[data-placement^="left"] > .tippy-svg-arrow:after,
|
|
94
|
+
.tippy-box[data-placement^="left"] > .tippy-svg-arrow > svg {
|
|
95
|
+
transform: rotate(90deg);
|
|
96
|
+
top: calc(50% - 3px);
|
|
97
|
+
left: 13px;
|
|
98
|
+
}
|
|
99
|
+
.tippy-box[data-placement^="right"] > .tippy-svg-arrow {
|
|
100
|
+
left: 0;
|
|
101
|
+
}
|
|
102
|
+
.tippy-box[data-placement^="right"] > .tippy-svg-arrow:after,
|
|
103
|
+
.tippy-box[data-placement^="right"] > .tippy-svg-arrow > svg {
|
|
104
|
+
transform: rotate(-90deg);
|
|
105
|
+
top: calc(50% - 3px);
|
|
106
|
+
right: 13px;
|
|
107
|
+
}
|
|
108
|
+
.tippy-svg-arrow {
|
|
109
|
+
width: 16px;
|
|
110
|
+
height: 16px;
|
|
111
|
+
fill: $neeto-ui-gray-800;
|
|
112
|
+
text-align: initial;
|
|
113
|
+
}
|
|
114
|
+
.tippy-svg-arrow,
|
|
115
|
+
.tippy-svg-arrow > svg {
|
|
116
|
+
position: absolute;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.tippy-svg-arrow > svg > path {
|
|
120
|
+
fill: $neeto-ui-gray-800;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// light theme
|
|
124
|
+
.tippy-box[data-theme~="light"] .tippy-svg-arrow > svg > path {
|
|
125
|
+
fill: $neeto-ui-white;
|
|
126
|
+
}
|
|
127
|
+
.tippy-box[data-theme~="light"] {
|
|
128
|
+
color: $neeto-ui-gray-800;
|
|
129
|
+
box-shadow: 0 0 20px 4px rgba(154, 161, 177, 0.15),
|
|
130
|
+
0 4px 80px -8px rgba(36, 40, 47, 0.25),
|
|
131
|
+
0 4px 4px -2px rgba(91, 94, 105, 0.15);
|
|
132
|
+
background-color: $neeto-ui-white;
|
|
133
|
+
}
|
|
134
|
+
.tippy-box[data-theme~="light"][data-placement^="top"] > .tippy-arrow:before {
|
|
135
|
+
border-top-color: $neeto-ui-white;
|
|
136
|
+
}
|
|
137
|
+
.tippy-box[data-theme~="light"][data-placement^="bottom"]
|
|
138
|
+
> .tippy-arrow:before {
|
|
139
|
+
border-bottom-color: $neeto-ui-white;
|
|
140
|
+
}
|
|
141
|
+
.tippy-box[data-theme~="light"][data-placement^="left"] > .tippy-arrow:before {
|
|
142
|
+
border-left-color: $neeto-ui-white;
|
|
143
|
+
}
|
|
144
|
+
.tippy-box[data-theme~="light"][data-placement^="right"] > .tippy-arrow:before {
|
|
145
|
+
border-right-color: $neeto-ui-white;
|
|
146
|
+
}
|
|
147
|
+
.tippy-box[data-theme~="light"] > .tippy-backdrop {
|
|
148
|
+
background-color: $neeto-ui-white;
|
|
149
|
+
}
|
|
150
|
+
.tippy-box[data-theme~="light"] > .tippy-svg-arrow {
|
|
151
|
+
fill: $neeto-ui-white;
|
|
152
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const hyphenize = (string) => {
|
|
2
|
+
const fallbackString = "nui";
|
|
3
|
+
|
|
4
|
+
if (string && string.replace) {
|
|
5
|
+
return string
|
|
6
|
+
.replace(/[\s_]/g, "-")
|
|
7
|
+
.replace(/([a-z])([A-Z])/g, "$1-$2")
|
|
8
|
+
.replace(/-+/g, "-")
|
|
9
|
+
.toLowerCase();
|
|
10
|
+
} else {
|
|
11
|
+
return fallbackString;
|
|
12
|
+
}
|
|
13
|
+
};
|
package/webpack.config.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const PeerDepsExternalsPlugin = require("peer-deps-externals-webpack-plugin");
|
|
2
|
+
const path = require("path");
|
|
2
3
|
|
|
3
4
|
module.exports = {
|
|
4
5
|
entry: "./src/Editor/index.js",
|
|
@@ -40,4 +41,10 @@ module.exports = {
|
|
|
40
41
|
libraryTarget: "umd",
|
|
41
42
|
},
|
|
42
43
|
plugins: [new PeerDepsExternalsPlugin()],
|
|
44
|
+
resolve: {
|
|
45
|
+
alias: {
|
|
46
|
+
common: path.resolve(__dirname, "/src/Common"),
|
|
47
|
+
hooks: path.resolve(__dirname, "/src/hooks"),
|
|
48
|
+
},
|
|
49
|
+
},
|
|
43
50
|
};
|
package/webpack.dev.config.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const HtmlWebPackPlugin = require("html-webpack-plugin");
|
|
2
|
+
const path = require("path");
|
|
2
3
|
|
|
3
4
|
module.exports = {
|
|
4
5
|
entry: "./src/index.js",
|
|
@@ -58,4 +59,10 @@ module.exports = {
|
|
|
58
59
|
filename: "./index.html",
|
|
59
60
|
}),
|
|
60
61
|
],
|
|
62
|
+
resolve: {
|
|
63
|
+
alias: {
|
|
64
|
+
common: path.resolve(__dirname, "/src/Common"),
|
|
65
|
+
hooks: path.resolve(__dirname, "/src/hooks"),
|
|
66
|
+
},
|
|
67
|
+
},
|
|
61
68
|
};
|
package/public/logo192.png
DELETED
|
Binary file
|
package/public/logo512.png
DELETED
|
Binary file
|
package/src/logo.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3"><g fill="#61DAFB"><path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/><circle cx="420.9" cy="296.5" r="45.7"/><path d="M520.5 78.1z"/></g></svg>
|