@bigbinary/neeto-editor 0.2.1 → 0.2.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.
Files changed (74) hide show
  1. package/index.js +8 -8
  2. package/package.json +1 -1
  3. package/webpack.config.js +4 -3
  4. package/webpack.dev.config.js +4 -3
  5. package/src/App.js +0 -8
  6. package/src/Common/Avatar.js +0 -168
  7. package/src/Common/Button.js +0 -95
  8. package/src/Common/CodeBlock.js +0 -11
  9. package/src/Common/Description.js +0 -8
  10. package/src/Common/Dropdown/index.js +0 -122
  11. package/src/Common/Heading.js +0 -13
  12. package/src/Common/HighlightText.js +0 -7
  13. package/src/Common/Icons/HashtagFilled.js +0 -59
  14. package/src/Common/Icons/TextColor.js +0 -35
  15. package/src/Common/Icons/index.js +0 -2
  16. package/src/Common/Input.js +0 -70
  17. package/src/Common/Label.js +0 -45
  18. package/src/Common/ListItems.js +0 -17
  19. package/src/Common/Modal.js +0 -91
  20. package/src/Common/Tab.js +0 -79
  21. package/src/Common/ToolTip.js +0 -37
  22. package/src/Editor/CustomExtensions/BubbleMenu/index.js +0 -92
  23. package/src/Editor/CustomExtensions/CodeBlock/CodeBlockComponent.js +0 -12
  24. package/src/Editor/CustomExtensions/CodeBlock/ExtensionConfig.js +0 -10
  25. package/src/Editor/CustomExtensions/Embeds.js +0 -72
  26. package/src/Editor/CustomExtensions/FixedMenu/FontSizeOption.js +0 -32
  27. package/src/Editor/CustomExtensions/FixedMenu/TextColorOption.js +0 -29
  28. package/src/Editor/CustomExtensions/FixedMenu/constants.js +0 -3
  29. package/src/Editor/CustomExtensions/FixedMenu/index.js +0 -183
  30. package/src/Editor/CustomExtensions/Image/ExtensionConfig.js +0 -47
  31. package/src/Editor/CustomExtensions/Image/LinkUploader/URLForm.js +0 -39
  32. package/src/Editor/CustomExtensions/Image/LocalUploader.js +0 -21
  33. package/src/Editor/CustomExtensions/Image/ProgressBar.js +0 -34
  34. package/src/Editor/CustomExtensions/Image/Uploader.js +0 -82
  35. package/src/Editor/CustomExtensions/Image/constants.js +0 -5
  36. package/src/Editor/CustomExtensions/Mention/ExtensionConfig.js +0 -66
  37. package/src/Editor/CustomExtensions/Mention/MentionList.js +0 -96
  38. package/src/Editor/CustomExtensions/Mention/helpers.js +0 -23
  39. package/src/Editor/CustomExtensions/Placeholder/ExtensionConfig.js +0 -81
  40. package/src/Editor/CustomExtensions/Placeholder/helpers.js +0 -18
  41. package/src/Editor/CustomExtensions/SlashCommands/Commands.js +0 -20
  42. package/src/Editor/CustomExtensions/SlashCommands/CommandsList.js +0 -109
  43. package/src/Editor/CustomExtensions/SlashCommands/ExtensionConfig.js +0 -209
  44. package/src/Editor/CustomExtensions/Variable/ExtensionConfig.js +0 -208
  45. package/src/Editor/CustomExtensions/Variable/VariableList.js +0 -45
  46. package/src/Editor/CustomExtensions/Variable/VariableSuggestion.js +0 -20
  47. package/src/Editor/CustomExtensions/Variable/helpers.js +0 -31
  48. package/src/Editor/CustomExtensions/Variable/index.js +0 -35
  49. package/src/Editor/CustomExtensions/useCustomExtensions.js +0 -88
  50. package/src/Editor/index.js +0 -104
  51. package/src/Editor/sharedState.js +0 -8
  52. package/src/constants/regexp.js +0 -1
  53. package/src/examples/constants.js +0 -95
  54. package/src/examples/index.js +0 -186
  55. package/src/hooks/useOutsideClick.js +0 -19
  56. package/src/hooks/useTabBar.js +0 -9
  57. package/src/index.js +0 -10
  58. package/src/index.scss +0 -46
  59. package/src/styles/abstracts/_mixins.scss +0 -20
  60. package/src/styles/abstracts/_neeto-ui-variables.scss +0 -107
  61. package/src/styles/abstracts/_variables.scss +0 -13
  62. package/src/styles/components/_avatar.scss +0 -105
  63. package/src/styles/components/_button.scss +0 -161
  64. package/src/styles/components/_codeblock.scss +0 -16
  65. package/src/styles/components/_command-list.scss +0 -19
  66. package/src/styles/components/_dropdown.scss +0 -69
  67. package/src/styles/components/_editor-variables.scss +0 -12
  68. package/src/styles/components/_editor.scss +0 -102
  69. package/src/styles/components/_fixed-menu.scss +0 -17
  70. package/src/styles/components/_image-uploader.scss +0 -109
  71. package/src/styles/components/_input.scss +0 -165
  72. package/src/styles/components/_tab.scss +0 -74
  73. package/src/styles/components/_tooltip.scss +0 -152
  74. package/src/utils/common.js +0 -13
@@ -1,109 +0,0 @@
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
- }
@@ -1,165 +0,0 @@
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
- }
@@ -1,74 +0,0 @@
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
- }
@@ -1,152 +0,0 @@
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
- }
@@ -1,13 +0,0 @@
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
- };