maglevcms 1.4.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. checksums.yaml +4 -4
  2. data/app/components/maglev/content/image.rb +1 -1
  3. data/app/controllers/maglev/api/assets_controller.rb +3 -3
  4. data/app/controllers/maglev/application_controller.rb +5 -0
  5. data/app/controllers/maglev/assets_controller.rb +1 -1
  6. data/app/controllers/maglev/editor_controller.rb +12 -3
  7. data/app/frontend/admin/controllers/screenshot_controller.js +5 -1
  8. data/app/frontend/editor/App.vue +1 -1
  9. data/app/frontend/editor/components/dynamic-form/dynamic-input.vue +17 -18
  10. data/app/frontend/editor/components/dynamic-form/index.vue +1 -1
  11. data/app/frontend/editor/components/header-nav/device-toggler.vue +1 -1
  12. data/app/frontend/editor/components/header-nav/index.vue +3 -3
  13. data/app/frontend/editor/components/header-nav/locale-toggler/index.vue +4 -4
  14. data/app/frontend/editor/components/header-nav/preview-toggler.vue +3 -3
  15. data/app/frontend/editor/components/header-nav/publish-button.vue +3 -3
  16. data/app/frontend/editor/components/header-nav/save-button.vue +1 -1
  17. data/app/frontend/editor/components/icon-library/index.vue +1 -1
  18. data/app/frontend/editor/components/image-library/index.vue +2 -2
  19. data/app/frontend/editor/components/image-library/list-item.vue +1 -1
  20. data/app/frontend/editor/components/image-library/uploader.vue +1 -1
  21. data/app/frontend/editor/components/kit/accordion.vue +8 -3
  22. data/app/frontend/editor/components/kit/checkbox-input.vue +1 -1
  23. data/app/frontend/editor/components/kit/collection-item-input.vue +7 -4
  24. data/app/frontend/editor/components/kit/color-input/core-input.vue +17 -12
  25. data/app/frontend/editor/components/kit/color-input/preset-button.vue +14 -10
  26. data/app/frontend/editor/components/kit/color-input/preset-dropdown.vue +8 -7
  27. data/app/frontend/editor/components/kit/color-input.vue +2 -4
  28. data/app/frontend/editor/components/kit/confirmation-button.vue +3 -3
  29. data/app/frontend/editor/components/kit/divider.vue +4 -4
  30. data/app/frontend/editor/components/kit/dropdown.vue +1 -1
  31. data/app/frontend/editor/components/kit/hint.vue +3 -3
  32. data/app/frontend/editor/components/kit/icon-input.vue +4 -4
  33. data/app/frontend/editor/components/kit/icon.vue +7 -2
  34. data/app/frontend/editor/components/kit/image-input.vue +5 -5
  35. data/app/frontend/editor/components/kit/index.js +25 -25
  36. data/app/frontend/editor/components/kit/link-input.vue +6 -6
  37. data/app/frontend/editor/components/kit/list-item-button.vue +2 -2
  38. data/app/frontend/editor/components/kit/modal-root.vue +3 -3
  39. data/app/frontend/editor/components/kit/modal.vue +2 -2
  40. data/app/frontend/editor/components/kit/page-icon.vue +2 -2
  41. data/app/frontend/editor/components/kit/pagination/index.vue +3 -3
  42. data/app/frontend/editor/components/kit/rich-text-input/block-button.vue +10 -10
  43. data/app/frontend/editor/components/kit/rich-text-input/menu-button.vue +1 -1
  44. data/app/frontend/editor/components/kit/rich-text-input/table-button.vue +18 -12
  45. data/app/frontend/editor/components/kit/rich-text-input.vue +1 -1
  46. data/app/frontend/editor/components/kit/search-input.vue +3 -3
  47. data/app/frontend/editor/components/kit/select-input.vue +19 -5
  48. data/app/frontend/editor/components/kit/simple-select.vue +1 -1
  49. data/app/frontend/editor/components/kit/submit-button.vue +4 -4
  50. data/app/frontend/editor/components/kit/tabs.vue +2 -2
  51. data/app/frontend/editor/components/kit/text-input.vue +1 -1
  52. data/app/frontend/editor/components/kit/textarea-input.vue +1 -1
  53. data/app/frontend/editor/components/link-picker/email.vue +1 -1
  54. data/app/frontend/editor/components/link-picker/index.vue +1 -1
  55. data/app/frontend/editor/components/link-picker/page.vue +5 -5
  56. data/app/frontend/editor/components/link-picker/url.vue +2 -2
  57. data/app/frontend/editor/components/page/edit.vue +3 -3
  58. data/app/frontend/editor/components/page/form/main.vue +3 -3
  59. data/app/frontend/editor/components/page/form/seo.vue +5 -5
  60. data/app/frontend/editor/components/page/list/list-item.vue +12 -12
  61. data/app/frontend/editor/components/page/new.vue +3 -3
  62. data/app/frontend/editor/components/section-block-pane/index.vue +1 -1
  63. data/app/frontend/editor/components/section-block-pane/setting-list.vue +1 -1
  64. data/app/frontend/editor/components/section-highlighter/bottom-actions.vue +1 -1
  65. data/app/frontend/editor/components/section-highlighter/top-left-actions.vue +7 -3
  66. data/app/frontend/editor/components/section-highlighter/top-right-actions.vue +9 -6
  67. data/app/frontend/editor/components/section-list/list-item.vue +12 -5
  68. data/app/frontend/editor/components/section-pane/block-list/list-item.vue +3 -3
  69. data/app/frontend/editor/components/section-pane/block-list/new-block-button.vue +4 -4
  70. data/app/frontend/editor/components/section-pane/block-tree/new-nested-block-button.vue +4 -4
  71. data/app/frontend/editor/components/section-pane/block-tree/tree-node.vue +2 -2
  72. data/app/frontend/editor/components/section-pane/index.vue +2 -2
  73. data/app/frontend/editor/components/section-pane/setting-list.vue +1 -1
  74. data/app/frontend/editor/components/sidebar-nav.vue +5 -5
  75. data/app/frontend/editor/components/style-pane/index.vue +1 -1
  76. data/app/frontend/editor/components/theme-section-list/index.vue +2 -2
  77. data/app/frontend/editor/components/theme-section-list/list-item.vue +1 -1
  78. data/app/frontend/editor/layouts/slide-pane.vue +1 -1
  79. data/app/frontend/editor/locales/index.js +5 -2
  80. data/app/frontend/editor/misc/utils.js +10 -7
  81. data/app/frontend/editor/mixins/global.js +1 -1
  82. data/app/frontend/editor/services/api.js +2 -2
  83. data/app/frontend/editor/services/image.js +6 -2
  84. data/app/frontend/editor/services/section.js +1 -0
  85. data/app/frontend/editor/store/actions/page.js +1 -1
  86. data/app/frontend/editor/store/getters.js +1 -1
  87. data/app/frontend/editor/views/content-pane.vue +9 -5
  88. data/app/frontend/editor/views/page-preview.vue +5 -1
  89. data/app/frontend/editor/views/pages/index.vue +1 -1
  90. data/app/frontend/live-preview-client/rails.js +1 -1
  91. data/app/frontend/live-preview-client/run-scripts.js +22 -24
  92. data/app/models/maglev/asset.rb +14 -0
  93. data/app/models/maglev/page/search_concern.rb +2 -1
  94. data/app/models/maglev/page.rb +18 -0
  95. data/app/models/maglev/page_path.rb +17 -0
  96. data/app/models/maglev/site.rb +24 -0
  97. data/db/migrate/20200824085207_create_maglev_sites.rb +2 -1
  98. data/db/migrate/20200824104648_create_maglev_pages.rb +2 -1
  99. data/db/migrate/20201206172020_create_maglev_assets.rb +2 -1
  100. data/db/migrate/20210830085101_create_maglev_page_paths.rb +3 -2
  101. data/lib/maglev/engine.rb +1 -0
  102. data/lib/maglev/migration.rb +20 -0
  103. data/lib/maglev/version.rb +1 -1
  104. data/lib/maglev.rb +7 -0
  105. data/lib/tasks/maglev_tasks.rake +1 -1
  106. data/package.json +21 -17
  107. data/{postcss.config.js → postcss.config.cjs} +1 -1
  108. data/yarn.lock +1171 -1009
  109. metadata +23 -9
  110. data/.eslintrc.js +0 -49
@@ -12,12 +12,10 @@
12
12
  </template>
13
13
 
14
14
  <script>
15
- import { hexToRgb } from '@/misc/utils'
16
-
17
15
  import CoreInput from '@/components/kit/color-input/core-input.vue'
18
16
 
19
17
  export default {
20
- name: 'ColorInput',
18
+ name: 'UIKitColorInput',
21
19
  components: { CoreInput },
22
20
  props: {
23
21
  label: { type: String, default: 'Label' },
@@ -27,7 +25,7 @@ export default {
27
25
  default: () => [],
28
26
  },
29
27
  value: { type: String },
30
- showLabel: { type: Boolean, default: true }
28
+ showLabel: { type: Boolean, default: true },
31
29
  },
32
30
  computed: {
33
31
  updatableValue: {
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <dropdown
2
+ <uikit-dropdown
3
3
  :placement="placement"
4
4
  v-on="$listeners"
5
5
  class="relative"
@@ -33,12 +33,12 @@
33
33
  </div>
34
34
  </div>
35
35
  </template>
36
- </dropdown>
36
+ </uikit-dropdown>
37
37
  </template>
38
38
 
39
39
  <script>
40
40
  export default {
41
- name: 'ConfirmationButton',
41
+ name: 'UIKitConfirmationButton',
42
42
  props: {
43
43
  placement: { type: String, default: 'bottom' },
44
44
  text: { type: String, default: null },
@@ -13,10 +13,10 @@
13
13
 
14
14
  <script>
15
15
  export default {
16
- name: 'Divider',
16
+ name: 'UIKitDivider',
17
17
  props: {
18
18
  text: { type: String, default: 'Text goes here' },
19
- withHint: { type: Boolean, default: false }
20
- }
19
+ withHint: { type: Boolean, default: false },
20
+ },
21
21
  }
22
- </script>
22
+ </script>
@@ -24,7 +24,7 @@
24
24
  import { ModalBus } from '@/plugins/event-bus'
25
25
 
26
26
  export default {
27
- name: 'Dropdown',
27
+ name: 'UIKitDropdown',
28
28
  props: {
29
29
  placement: {
30
30
  type: String,
@@ -4,9 +4,9 @@
4
4
 
5
5
  <script>
6
6
  export default {
7
- name: 'Hint',
7
+ name: 'UIKitHint',
8
8
  props: {
9
9
  text: { type: String, default: 'Hint goes here' },
10
- }
10
+ },
11
11
  }
12
- </script>
12
+ </script>
@@ -12,7 +12,7 @@
12
12
  class="flex items-center justify-center flex-col"
13
13
  @click="openIconPickerModal"
14
14
  >
15
- <icon name="ri-book-line" />
15
+ <uikit-icon name="ri-book-line" />
16
16
  <p class="uppercase text-xs mt-1">{{ $t('iconInput.addButton') }}</p>
17
17
  </button>
18
18
  </div>
@@ -32,7 +32,7 @@
32
32
  class="flex items-center justify-center flex-col mr-4"
33
33
  @click="openIconPickerModal"
34
34
  >
35
- <icon name="ri-book-line" />
35
+ <uikit-icon name="ri-book-line" />
36
36
  <p class="uppercase text-xs mt-1">
37
37
  {{ $t('iconInput.replaceButton') }}
38
38
  </p>
@@ -42,7 +42,7 @@
42
42
  class="flex items-center justify-center flex-col"
43
43
  @click="removeIcon"
44
44
  >
45
- <icon name="delete-bin-line" />
45
+ <uikit-icon name="delete-bin-line" />
46
46
  <p class="uppercase text-xs mt-1">
47
47
  {{ $t('iconInput.clearButton') }}
48
48
  </p>
@@ -60,7 +60,7 @@ import FocusedInputMixin from '@/mixins/focused-input'
60
60
  import IconLibrary from '@/components/icon-library/index.vue'
61
61
 
62
62
  export default {
63
- name: 'IconInput',
63
+ name: 'UIKitIconInput',
64
64
  mixins: [FocusedInputMixin],
65
65
  props: {
66
66
  label: { type: String, default: 'Label' },
@@ -13,7 +13,7 @@
13
13
  import { defineAsyncComponent } from 'vue'
14
14
 
15
15
  export default {
16
- name: 'MaglevIcon',
16
+ name: 'UIKitIcon',
17
17
  props: {
18
18
  name: { type: String },
19
19
  size: { type: String, default: '1.25rem' },
@@ -21,10 +21,15 @@ export default {
21
21
  bounce: { type: Boolean, default: false },
22
22
  library: { type: String, default: 'remixicons' },
23
23
  },
24
+ data() {
25
+ return {
26
+ icons: import.meta.glob(`../../assets/**/*.svg`),
27
+ }
28
+ },
24
29
  computed: {
25
30
  icon() {
26
31
  return defineAsyncComponent(() =>
27
- import(`../../assets/${this.library}/${this.name}.svg`),
32
+ this.icons[`../../assets/${this.library}/${this.name}.svg`](),
28
33
  )
29
34
  },
30
35
  },
@@ -12,7 +12,7 @@
12
12
  class="flex items-center justify-center flex-col"
13
13
  @click="openImagePickerModal"
14
14
  >
15
- <icon name="camera-line" />
15
+ <uikit-icon name="camera-line" />
16
16
  <p class="uppercase text-xs mt-1">{{ $t('imageInput.addButton') }}</p>
17
17
  </button>
18
18
  </div>
@@ -37,7 +37,7 @@
37
37
  class="flex items-center justify-center flex-col mr-4"
38
38
  @click="openImagePickerModal"
39
39
  >
40
- <icon name="camera-line" />
40
+ <uikit-icon name="camera-line" />
41
41
  <p class="uppercase text-xs mt-1">
42
42
  {{ $t('imageInput.replaceButton') }}
43
43
  </p>
@@ -47,7 +47,7 @@
47
47
  class="flex items-center justify-center flex-col"
48
48
  @click="removeImage"
49
49
  >
50
- <icon name="delete-bin-line" />
50
+ <uikit-icon name="delete-bin-line" />
51
51
  <p class="uppercase text-xs mt-1">
52
52
  {{ $t('imageInput.clearButton') }}
53
53
  </p>
@@ -56,7 +56,7 @@
56
56
  </transition>
57
57
  </div>
58
58
 
59
- <text-input
59
+ <uikit-text-input
60
60
  class="mt-2"
61
61
  :showLabel="false"
62
62
  :placeholder="$t('imageInput.altTextPlaceholder')"
@@ -73,7 +73,7 @@ import FocusedInputMixin from '@/mixins/focused-input'
73
73
  import ImageLibrary from '@/components/image-library/index.vue'
74
74
 
75
75
  export default {
76
- name: 'ImageInput',
76
+ name: 'UIKitImageInput',
77
77
  mixins: [FocusedInputMixin],
78
78
  props: {
79
79
  label: { type: String, default: 'Label' },
@@ -26,29 +26,29 @@ import ListItemButton from './list-item-button.vue'
26
26
  import Divider from './divider.vue'
27
27
  import Hint from './hint.vue'
28
28
 
29
- Vue.component('icon', Icon)
30
29
  Vue.component('v-popoper', VPopover)
31
- Vue.component('dropdown', Dropdown)
32
- Vue.component('modal-root', ModalRoot)
33
- Vue.component('modal', Modal)
34
- Vue.component('tabs', Tabs)
35
- Vue.component('accordion', Accordion)
36
- Vue.component('confirmation-button', ConfirmationButton)
37
- Vue.component('submit-button', SubmitButton)
38
- Vue.component('image-input', ImageInput)
39
- Vue.component('icon-input', IconInput)
40
- Vue.component('link-input', LinkInput)
41
- Vue.component('select-input', SelectInput)
42
- Vue.component('textarea-input', TextAreaInput)
43
- Vue.component('text-input', TextInput)
44
- Vue.component('rich-text-input', RichTextInput)
45
- Vue.component('checkbox-input', CheckboxInput)
46
- Vue.component('search-input', SearchInput)
47
- Vue.component('pagination', Pagination)
48
- Vue.component('page-icon', PageIcon)
49
- Vue.component('color-input', ColorInput)
50
- Vue.component('simple-select', SimpleSelect)
51
- Vue.component('collection-item-input', CollectionItemInput)
52
- Vue.component('list-item-button', ListItemButton)
53
- Vue.component('divider', Divider)
54
- Vue.component('hint', Hint)
30
+ Vue.component('uikit-icon', Icon)
31
+ Vue.component('uikit-dropdown', Dropdown)
32
+ Vue.component('uikit-modal-root', ModalRoot)
33
+ Vue.component('uikit-modal', Modal)
34
+ Vue.component('uikit-tabs', Tabs)
35
+ Vue.component('uikit-accordion', Accordion)
36
+ Vue.component('uikit-confirmation-button', ConfirmationButton)
37
+ Vue.component('uikit-submit-button', SubmitButton)
38
+ Vue.component('uikit-image-input', ImageInput)
39
+ Vue.component('uikit-icon-input', IconInput)
40
+ Vue.component('uikit-link-input', LinkInput)
41
+ Vue.component('uikit-select-input', SelectInput)
42
+ Vue.component('uikit-textarea-input', TextAreaInput)
43
+ Vue.component('uikit-text-input', TextInput)
44
+ Vue.component('uikit-rich-text-input', RichTextInput)
45
+ Vue.component('uikit-checkbox-input', CheckboxInput)
46
+ Vue.component('uikit-search-input', SearchInput)
47
+ Vue.component('uikit-pagination', Pagination)
48
+ Vue.component('uikit-page-icon', PageIcon)
49
+ Vue.component('uikit-color-input', ColorInput)
50
+ Vue.component('uikit-simple-select', SimpleSelect)
51
+ Vue.component('uikit-collection-item-input', CollectionItemInput)
52
+ Vue.component('uikit-list-item-button', ListItemButton)
53
+ Vue.component('uikit-divider', Divider)
54
+ Vue.component('uikit-hint', Hint)
@@ -4,7 +4,7 @@
4
4
  {{ label }}
5
5
  </label>
6
6
 
7
- <text-input
7
+ <uikit-text-input
8
8
  v-model="textInput"
9
9
  :showLabel="false"
10
10
  :placeholder="$t('linkInput.nestedTextPlaceholder')"
@@ -18,15 +18,15 @@
18
18
  @click="openLinkPickerModal"
19
19
  >
20
20
  <div class="flex-1 flex items-center overflow-hidden" v-if="isPage">
21
- <page-icon :page="{ path: value.href }" class="flex-shrink-0" />
21
+ <uikit-page-icon :page="{ path: value.href }" class="flex-shrink-0" />
22
22
  <span class="ml-3">{{ value.linkLabel }}</span>
23
23
  </div>
24
24
  <div class="flex-1 flex items-center overflow-hidden" v-if="isUrl">
25
- <icon name="ri-external-link-line" class="flex-shrink-0" />
25
+ <uikit-icon name="ri-external-link-line" class="flex-shrink-0" />
26
26
  <span class="ml-3 shrink">{{ value.href }}</span>
27
27
  </div>
28
28
  <div class="flex-1 flex items-center overflow-hidden" v-if="isEmail">
29
- <icon name="ri-mail-line" class="flex-shrink-0" />
29
+ <uikit-icon name="ri-mail-line" class="flex-shrink-0" />
30
30
  <span class="ml-3">{{ value.email }}</span>
31
31
  </div>
32
32
 
@@ -38,7 +38,7 @@
38
38
  </div>
39
39
 
40
40
  <button class="ml-3" @click.prevent.stop="clear" v-if="!isBlank(value)">
41
- <icon name="ri-close-line" />
41
+ <uikit-icon name="ri-close-line" />
42
42
  </button>
43
43
  </div>
44
44
  </div>
@@ -49,7 +49,7 @@ import LinkPicker from '@/components/link-picker/index.vue'
49
49
  import { pick } from '@/misc/utils'
50
50
 
51
51
  export default {
52
- name: 'LinkInput',
52
+ name: 'UIKitLinkInput',
53
53
  props: {
54
54
  label: { type: String, default: 'Label' },
55
55
  name: { type: String, default: 'image' },
@@ -2,13 +2,13 @@
2
2
  <button
3
3
  class="px-1 py-1 rounded-full bg-gray-600 bg-opacity-0 hover:text-gray-900 text-gray-600 focus:outline-none hover:bg-opacity-10 transition-colors duration-200"
4
4
  >
5
- <icon :name="iconName" size="1.25rem" />
5
+ <uikit-icon :name="iconName" size="1.25rem" />
6
6
  </button>
7
7
  </template>
8
8
 
9
9
  <script>
10
10
  export default {
11
- name: 'ListItemButton',
11
+ name: 'UIKitListItemButton',
12
12
  props: {
13
13
  iconName: { type: String, required: true },
14
14
  },
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <modal
2
+ <uikit-modal
3
3
  :isOpen="!!currentModal"
4
4
  :title="title"
5
5
  :containerClass="containerClass"
@@ -14,14 +14,14 @@
14
14
  v-on="modal.listeners"
15
15
  v-show="index === stack.length - 1"
16
16
  />
17
- </modal>
17
+ </uikit-modal>
18
18
  </template>
19
19
 
20
20
  <script>
21
21
  import { ModalBus } from '@/plugins/event-bus'
22
22
 
23
23
  export default {
24
- name: 'ModalRoot',
24
+ name: 'UIKitModalRoot',
25
25
  data() {
26
26
  return {
27
27
  stack: [], // NOTE: we stack modals!
@@ -14,7 +14,7 @@
14
14
  type="button"
15
15
  @click="$emit('on-close', true)"
16
16
  >
17
- <icon name="ri-close-circle-line" />
17
+ <uikit-icon name="ri-close-circle-line" />
18
18
  </button>
19
19
  </div>
20
20
 
@@ -29,7 +29,7 @@
29
29
 
30
30
  <script>
31
31
  export default {
32
- name: 'Modal',
32
+ name: 'UIKitModal',
33
33
  props: {
34
34
  isOpen: Boolean,
35
35
  title: { type: String, default: 'Modal' },
@@ -1,10 +1,10 @@
1
1
  <template>
2
- <icon :name="iconName" />
2
+ <uikit-icon :name="iconName" />
3
3
  </template>
4
4
 
5
5
  <script>
6
6
  export default {
7
- name: 'PageIcon',
7
+ name: 'UIKitPageIcon',
8
8
  props: {
9
9
  page: { type: Object, required: true },
10
10
  size: { type: String, default: '1.25rem' },
@@ -10,7 +10,7 @@
10
10
  </div>
11
11
  <div class="flex items-center" v-if="visible">
12
12
  <page-button :page="activePage - 1" @click="change" class="mr-1">
13
- <icon name="arrow-drop-left" />
13
+ <uikit-icon name="arrow-drop-left" />
14
14
  </page-button>
15
15
 
16
16
  <page-button
@@ -37,7 +37,7 @@
37
37
  />
38
38
 
39
39
  <page-button :page="activePage + 1" @click="change">
40
- <icon name="arrow-drop-right" />
40
+ <uikit-icon name="arrow-drop-right" />
41
41
  </page-button>
42
42
  </div>
43
43
  </div>
@@ -48,7 +48,7 @@
48
48
  import PageButton from './button.vue'
49
49
 
50
50
  export default {
51
- name: 'Pagination',
51
+ name: 'UIKitPagination',
52
52
  components: { PageButton },
53
53
  props: {
54
54
  labelI18nKey: { type: String, default: 'pagination.defaultLabel' },
@@ -1,52 +1,52 @@
1
1
  <template>
2
- <dropdown placement="left" ref="dropdown">
2
+ <uikit-dropdown placement="left" ref="dropdown">
3
3
  <template v-slot:button>
4
4
  <button
5
5
  class="rounded-sm px-2 py-2 bg-gray-100 hover:bg-gray-200 flex items-center focus:outline-none focus:ring"
6
6
  >
7
- <icon :name="iconName" class="w-4 h-4 text-dark" />
8
- <icon name="arrow-down-s-line" class="ml-1" />
7
+ <uikit-icon :name="iconName" class="w-4 h-4 text-dark" />
8
+ <uikit-icon name="arrow-down-s-line" class="ml-1" />
9
9
  </button>
10
10
  </template>
11
11
 
12
12
  <template v-slot:content>
13
13
  <div class="w-full flex">
14
14
  <button class="py-2 px-3 hover:bg-gray-200" @click="commands.paragraph">
15
- <icon name="format-paragraph" />
15
+ <uikit-icon name="format-paragraph" />
16
16
  </button>
17
17
  <button
18
18
  class="py-2 px-3 hover:bg-gray-200"
19
19
  @click="commands.heading({ level: 2 })"
20
20
  >
21
- <icon name="format-heading-2" />
21
+ <uikit-icon name="format-heading-2" />
22
22
  </button>
23
23
  <button
24
24
  class="py-2 px-3 hover:bg-gray-200"
25
25
  @click="commands.heading({ level: 3 })"
26
26
  >
27
- <icon name="format-heading-3" />
27
+ <uikit-icon name="format-heading-3" />
28
28
  </button>
29
29
  <button
30
30
  class="py-2 px-3 hover:bg-gray-200"
31
31
  @click="commands.heading({ level: 4 })"
32
32
  >
33
- <icon name="format-heading-4" />
33
+ <uikit-icon name="format-heading-4" />
34
34
  </button>
35
35
  <button
36
36
  class="py-2 px-3 hover:bg-gray-200"
37
37
  @click="commands.blockquote"
38
38
  >
39
- <icon name="format-blockquote" />
39
+ <uikit-icon name="format-blockquote" />
40
40
  </button>
41
41
  <button
42
42
  class="py-2 px-3 hover:bg-gray-200"
43
43
  @click="commands.code_block"
44
44
  >
45
- <icon name="format-code" />
45
+ <uikit-icon name="format-code" />
46
46
  </button>
47
47
  </div>
48
48
  </template>
49
- </dropdown>
49
+ </uikit-dropdown>
50
50
  </template>
51
51
 
52
52
  <script>
@@ -7,7 +7,7 @@
7
7
  }"
8
8
  @click="$emit('click')"
9
9
  >
10
- <icon :name="iconName" class="w-4 h-4 text-dark" />
10
+ <uikit-icon :name="iconName" class="w-4 h-4 text-dark" />
11
11
  </button>
12
12
  </template>
13
13
 
@@ -5,16 +5,16 @@
5
5
  class="block h-full rounded-sm px-2 py-2 bg-gray-100 hover:bg-gray-200 flex items-center focus:outline-none focus:ring"
6
6
  @click="insertTable"
7
7
  >
8
- <icon name="ri-table-2" class="w-4 h-4 text-dark" />
8
+ <uikit-icon name="ri-table-2" class="w-4 h-4 text-dark" />
9
9
  </button>
10
10
 
11
- <dropdown placement="bottom" ref="dropdown" v-else>
11
+ <uikit-dropdown placement="bottom" ref="dropdown" v-else>
12
12
  <template v-slot:button>
13
13
  <button
14
14
  class="rounded-sm px-2 py-2 bg-gray-100 hover:bg-gray-200 flex items-center focus:outline-none focus:ring"
15
15
  >
16
- <icon name="ri-table-2" class="w-4 h-4 text-dark" />
17
- <icon name="arrow-down-s-line" class="ml-1" />
16
+ <uikit-icon name="ri-table-2" class="w-4 h-4 text-dark" />
17
+ <uikit-icon name="arrow-down-s-line" class="ml-1" />
18
18
  </button>
19
19
  </template>
20
20
 
@@ -24,47 +24,53 @@
24
24
  class="py-2 px-3 hover:bg-gray-200"
25
25
  @click="commands.deleteTable"
26
26
  >
27
- <icon name="delete-bin-line" class="w-4 h-4 text-dark" />
27
+ <uikit-icon name="delete-bin-line" class="w-4 h-4 text-dark" />
28
28
  </button>
29
29
  <button
30
30
  class="py-2 px-3 hover:bg-gray-200"
31
31
  @click="commands.addColumnBefore"
32
32
  >
33
- <icon name="ri-insert-column-left" class="w-4 h-4 text-dark" />
33
+ <uikit-icon
34
+ name="ri-insert-column-left"
35
+ class="w-4 h-4 text-dark"
36
+ />
34
37
  </button>
35
38
  <button
36
39
  class="py-2 px-3 hover:bg-gray-200"
37
40
  @click="commands.addColumnAfter"
38
41
  >
39
- <icon name="ri-insert-column-right" class="w-4 h-4 text-dark" />
42
+ <uikit-icon
43
+ name="ri-insert-column-right"
44
+ class="w-4 h-4 text-dark"
45
+ />
40
46
  </button>
41
47
  <button
42
48
  class="py-2 px-3 hover:bg-gray-200"
43
49
  @click="commands.deleteColumn"
44
50
  >
45
- <icon name="ri-delete-column" class="w-4 h-4 text-dark" />
51
+ <uikit-icon name="ri-delete-column" class="w-4 h-4 text-dark" />
46
52
  </button>
47
53
  <button
48
54
  class="py-2 px-3 hover:bg-gray-200"
49
55
  @click="commands.addRowBefore"
50
56
  >
51
- <icon name="ri-insert-row-top" class="w-4 h-4 text-dark" />
57
+ <uikit-icon name="ri-insert-row-top" class="w-4 h-4 text-dark" />
52
58
  </button>
53
59
  <button
54
60
  class="py-2 px-3 hover:bg-gray-200"
55
61
  @click="commands.addRowAfter"
56
62
  >
57
- <icon name="ri-insert-row-bottom" class="w-4 h-4 text-dark" />
63
+ <uikit-icon name="ri-insert-row-bottom" class="w-4 h-4 text-dark" />
58
64
  </button>
59
65
  <button
60
66
  class="py-2 px-3 hover:bg-gray-200"
61
67
  @click="commands.deleteRow"
62
68
  >
63
- <icon name="ri-delete-row" class="w-4 h-4 text-dark" />
69
+ <uikit-icon name="ri-delete-row" class="w-4 h-4 text-dark" />
64
70
  </button>
65
71
  </div>
66
72
  </template>
67
- </dropdown>
73
+ </uikit-dropdown>
68
74
  </div>
69
75
  </template>
70
76
 
@@ -81,7 +81,7 @@ import EditorLinkButtons from './rich-text-input/link-buttons.vue'
81
81
  import EditorTableButton from './rich-text-input/table-button.vue'
82
82
 
83
83
  export default {
84
- name: 'RichTextInput',
84
+ name: 'UIKitRichTextInput',
85
85
  mixins: [FocusedInputMixin],
86
86
  components: {
87
87
  EditorContent,
@@ -4,7 +4,7 @@
4
4
  class="flex items-center py-2 px-4 rounded bg-gray-100 text-gray-800 focus:outline-none focus:ring"
5
5
  >
6
6
  <button class="mr-2" type="submit">
7
- <icon name="search-line" class="text-gray-500" />
7
+ <uikit-icon name="search-line" class="text-gray-500" />
8
8
  </button>
9
9
 
10
10
  <input
@@ -21,14 +21,14 @@
21
21
  @click.stop.prevent="reset"
22
22
  type="button"
23
23
  >
24
- <icon name="close-line" />
24
+ <uikit-icon name="close-line" />
25
25
  </button>
26
26
  </form>
27
27
  </template>
28
28
 
29
29
  <script>
30
30
  export default {
31
- name: 'SearchInput',
31
+ name: 'UIKitSearchInput',
32
32
  props: {
33
33
  placeholder: { type: String, default: 'Type your query here' },
34
34
  },
@@ -22,11 +22,25 @@
22
22
  @click.stop.prevent="clear"
23
23
  v-if="canClear"
24
24
  >
25
- <icon name="ri-close-line" />
25
+ <uikit-icon name="ri-close-line" />
26
26
  </button>
27
- <div :class="{ 'flex-shrink-0': true, 'ml-1': canClear, 'ml-auto': !canClear }">
28
- <icon name="arrow-up-s-line" size="1.5rem" :class="{ 'hidden': !isOpen }" />
29
- <icon name="arrow-down-s-line" size="1.5rem" :class="{ 'hidden': isOpen }" />
27
+ <div
28
+ :class="{
29
+ 'flex-shrink-0': true,
30
+ 'ml-1': canClear,
31
+ 'ml-auto': !canClear,
32
+ }"
33
+ >
34
+ <uikit-icon
35
+ name="arrow-up-s-line"
36
+ size="1.5rem"
37
+ :class="{ hidden: !isOpen }"
38
+ />
39
+ <uikit-icon
40
+ name="arrow-down-s-line"
41
+ size="1.5rem"
42
+ :class="{ hidden: isOpen }"
43
+ />
30
44
  </div>
31
45
  </div>
32
46
  </button>
@@ -78,7 +92,7 @@
78
92
  import { debounce } from '@/misc/utils'
79
93
 
80
94
  export default {
81
- name: 'SelectInput',
95
+ name: 'UIKitSelectInput',
82
96
  props: {
83
97
  label: { type: String, default: 'Label' },
84
98
  name: { type: String, default: 'text' },
@@ -22,7 +22,7 @@
22
22
 
23
23
  <script>
24
24
  export default {
25
- name: 'Simple-Select',
25
+ name: 'UIKitSimpleSelect',
26
26
  props: {
27
27
  label: { type: String, default: 'Label' },
28
28
  name: { type: String, default: 'select' },