@hashtagcms/admin-ui-kit 1.0.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 (79) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +83 -0
  3. package/dist/admin-ui-kit.min.css +14 -0
  4. package/dist/admin-ui-kit.min.js +2 -0
  5. package/dist/admin-ui-kit.min.js.LICENSE.txt +175 -0
  6. package/package.json +53 -0
  7. package/packages/components/README.md +92 -0
  8. package/packages/components/package.json +28 -0
  9. package/packages/components/src/action-bar.vue +237 -0
  10. package/packages/components/src/category-platform.vue +97 -0
  11. package/packages/components/src/category-settings.vue +815 -0
  12. package/packages/components/src/cms-module-dropdown.vue +78 -0
  13. package/packages/components/src/downlods.vue +21 -0
  14. package/packages/components/src/file-uploader.vue +188 -0
  15. package/packages/components/src/frontend-module-creator.vue +599 -0
  16. package/packages/components/src/global-site-button.vue +94 -0
  17. package/packages/components/src/homepage.vue +1087 -0
  18. package/packages/components/src/html-slot.vue +23 -0
  19. package/packages/components/src/image-gallery.vue +144 -0
  20. package/packages/components/src/index.js +53 -0
  21. package/packages/components/src/info-boxes.vue +68 -0
  22. package/packages/components/src/info-popup.vue +121 -0
  23. package/packages/components/src/language-button.vue +80 -0
  24. package/packages/components/src/language-copier.vue +177 -0
  25. package/packages/components/src/left-nav.vue +159 -0
  26. package/packages/components/src/library/copy-paste.vue +186 -0
  27. package/packages/components/src/library/info-box.vue +102 -0
  28. package/packages/components/src/library/left-menu-show-hide.vue +47 -0
  29. package/packages/components/src/library/loader.vue +141 -0
  30. package/packages/components/src/library/modal-box.vue +136 -0
  31. package/packages/components/src/library/split-button.vue +127 -0
  32. package/packages/components/src/library/timer-button.vue +43 -0
  33. package/packages/components/src/library/toast-box.vue +53 -0
  34. package/packages/components/src/menu-sorter.vue +265 -0
  35. package/packages/components/src/module-creator.vue +650 -0
  36. package/packages/components/src/module-permission.vue +334 -0
  37. package/packages/components/src/pagination.vue +125 -0
  38. package/packages/components/src/platform-button.vue +118 -0
  39. package/packages/components/src/search-bar.vue +144 -0
  40. package/packages/components/src/site-button.vue +42 -0
  41. package/packages/components/src/site-cloner.vue +150 -0
  42. package/packages/components/src/sitewise-copier.vue +234 -0
  43. package/packages/components/src/sitewise-data.vue +347 -0
  44. package/packages/components/src/sorter.vue +239 -0
  45. package/packages/components/src/tabular-view.vue +824 -0
  46. package/packages/components/src/title-bar.vue +76 -0
  47. package/packages/components/src/top-nav.vue +96 -0
  48. package/packages/helpers/README.md +88 -0
  49. package/packages/helpers/package.json +20 -0
  50. package/packages/helpers/src/admin-config.js +9 -0
  51. package/packages/helpers/src/common.js +89 -0
  52. package/packages/helpers/src/dashboard.js +16 -0
  53. package/packages/helpers/src/editor.js +163 -0
  54. package/packages/helpers/src/error-message-handler.js +50 -0
  55. package/packages/helpers/src/event-bus.js +4 -0
  56. package/packages/helpers/src/form.js +4 -0
  57. package/packages/helpers/src/fx.js +106 -0
  58. package/packages/helpers/src/humanize.js +14 -0
  59. package/packages/helpers/src/map.js +3 -0
  60. package/packages/styles/README.md +37 -0
  61. package/packages/styles/package.json +15 -0
  62. package/packages/styles/src/_action-bar.scss +35 -0
  63. package/packages/styles/src/_admin.scss +22 -0
  64. package/packages/styles/src/_animate.scss +1579 -0
  65. package/packages/styles/src/_badges.scss +34 -0
  66. package/packages/styles/src/_category-list.scss +14 -0
  67. package/packages/styles/src/_common.scss +163 -0
  68. package/packages/styles/src/_info-box.scss +96 -0
  69. package/packages/styles/src/_left-nav.scss +59 -0
  70. package/packages/styles/src/_loader.scss +82 -0
  71. package/packages/styles/src/_menu-sorter.scss +39 -0
  72. package/packages/styles/src/_model-creator.scss +48 -0
  73. package/packages/styles/src/_module-permission.scss +25 -0
  74. package/packages/styles/src/_page-manager.scss +63 -0
  75. package/packages/styles/src/_popover-modal.scss +20 -0
  76. package/packages/styles/src/_table-grid.scss +39 -0
  77. package/packages/styles/src/_toast.scss +20 -0
  78. package/packages/styles/src/_variables.scss +37 -0
  79. package/packages/styles/src/app.scss +2 -0
@@ -0,0 +1,106 @@
1
+ import { animate, spring } from "motion";
2
+ export class Fx {
3
+ static come(div, cb) {
4
+ document.querySelectorAll(div).forEach((e) => {
5
+ e.style.display = "";
6
+ });
7
+ animate(div, { opacity: [0, 1] }, { duration: 1 }).finished.then(() => {
8
+ if (cb) {
9
+ cb.apply(this, arguments);
10
+ }
11
+ });
12
+ }
13
+
14
+ static out(div, cb) {
15
+ //div = (typeof div == "string") ? document.getElementById(div) : div;
16
+ animate(div, { opacity: [1, 0] }, { duration: 1 }).finished.then(() => {
17
+ document.querySelectorAll(div).forEach((e) => {
18
+ e.style.display = "none";
19
+ });
20
+ if (cb) {
21
+ cb.apply(this, arguments);
22
+ }
23
+ });
24
+ }
25
+
26
+ static highlight(div, cb) {
27
+ div = typeof div === "string" ? document.getElementById(div) : div;
28
+ let backgroundColor =
29
+ div.style.backgroundColor === "" ? "#fff" : div.style.backgroundColor;
30
+ if (div.nodeName === "TR") {
31
+ div = div.querySelectorAll("td");
32
+ }
33
+ animate(
34
+ div,
35
+ { "background-color": "#fff3cd" },
36
+ { duration: 0.5 },
37
+ ).finished.then(() => {
38
+ animate(
39
+ div,
40
+ { "background-color": backgroundColor },
41
+ { duration: 1 },
42
+ ).finished.then(() => {
43
+ if (cb) {
44
+ cb.apply(this, arguments);
45
+ }
46
+ });
47
+ });
48
+ }
49
+
50
+ static scrollWinTo(div, cb) {
51
+ let ele = document.querySelector(div);
52
+ if (ele) {
53
+ window.scrollTo({
54
+ top: ele.offsetTop,
55
+ behavior: "smooth",
56
+ });
57
+ setTimeout(() => {
58
+ if (cb) {
59
+ cb.apply(this, arguments);
60
+ }
61
+ }, 700);
62
+ }
63
+ }
64
+
65
+ static slideLeft(div, cb) {
66
+ div = document.querySelector(div);
67
+ let old = div.getBoundingClientRect();
68
+ div.oldProp = old;
69
+ animate(
70
+ div,
71
+ { x: 0 },
72
+ {
73
+ easing: spring({
74
+ velocity: -(window.outerWidth + div.getBoundingClientRect().width),
75
+ }),
76
+ },
77
+ ).finished.then(() => {
78
+ if (cb) {
79
+ cb.apply(this, arguments);
80
+ }
81
+ });
82
+ }
83
+
84
+ static slideRight(div, cb) {
85
+ div = document.querySelector(div);
86
+ animate(
87
+ div,
88
+ { x: 0 },
89
+ {
90
+ easing: spring({
91
+ velocity: window.outerWidth + div.getBoundingClientRect().width,
92
+ }),
93
+ },
94
+ ).finished.then(() => {
95
+ if (cb) {
96
+ cb.apply(this, arguments);
97
+ }
98
+ });
99
+ }
100
+
101
+ static cssAnimate(ele, css) {
102
+ ele = typeof ele === "string" ? document.querySelector(ele) : ele;
103
+ ele.classList.remove("animated", css);
104
+ ele.classList.add("animated", css);
105
+ }
106
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Humanize a string
3
+ * Replaces underscores and dashes with spaces and capitalizes the first letter
4
+ * Fallback implementation since generic SDK might miss it
5
+ */
6
+ export default function Humanize(str) {
7
+ if (typeof str !== 'string') return '';
8
+
9
+ return str
10
+ .replace(/[_-]+/g, ' ')
11
+ .replace(/\s+/g, ' ')
12
+ .trim()
13
+ .replace(/\b\w/g, (char) => char.toUpperCase());
14
+ }
@@ -0,0 +1,3 @@
1
+ import { MapAPI } from "@hashtagcms/admin-sdk";
2
+
3
+ export default MapAPI;
@@ -0,0 +1,37 @@
1
+ # @hashtagcms/styles
2
+
3
+ The core design system for HashtagCMS. This package contains the SASS/SCSS source files used to style the admin interface, compatible with the compiled CSS structure.
4
+
5
+ ## 📦 Installation
6
+
7
+ ```bash
8
+ npm install @hashtagcms/styles
9
+ ```
10
+
11
+ ## 🚀 Usage
12
+
13
+ For most projects, you will want to import the main standard entry point in your SCSS file:
14
+
15
+ ```scss
16
+ @import "~@hashtagcms/styles/app";
17
+ ```
18
+
19
+ ## 📂 Structure
20
+
21
+ - **`_variables.scss`**: Global SASS variables for colors, spacing, and typography.
22
+ - **`_admin.scss`**: Core layout styles for the dashboard shell.
23
+ - **`_table-grid.scss`**: Styles for the `TabularView` component.
24
+ - **`_loader.scss`**: Styles for the `Loader` component.
25
+ - **`_toast.scss`**: Styles for the `ToastBox` component.
26
+
27
+ ## 🎨 Customization
28
+
29
+ To override variables, import your custom variables _before_ importing this package:
30
+
31
+ ```scss
32
+ // Your overrides
33
+ $primary-color: #3498db;
34
+
35
+ // Import HashtagCMS styles
36
+ @import "~@hashtagcms/styles/app";
37
+ ```
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@hashtagcms/styles",
3
+ "version": "1.0.0",
4
+ "description": "Design system and styles for HashtagCMS",
5
+ "author": "HashtagCMS",
6
+ "license": "MIT",
7
+ "homepage": "https://hashtagcms.org",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/hashtagcms/admin-ui-kit.git"
11
+ },
12
+ "exports": {
13
+ "./*": "./src/*"
14
+ }
15
+ }
@@ -0,0 +1,35 @@
1
+ .actionToolbar {
2
+ * {
3
+ font-size: 12px;
4
+ }
5
+ .btn {
6
+ padding: 10px;
7
+ }
8
+ .dropdown-menu li:hover {
9
+ background: #f3f3f3;
10
+ color: $dropdown-link-color;
11
+ }
12
+ .dropdown {
13
+ a.lang {
14
+ border-top-right-radius: 0;
15
+ border-bottom-right-radius: 0;
16
+ }
17
+ }
18
+ }
19
+
20
+ .searchForm {
21
+ * {
22
+ font-size: 14px;
23
+ }
24
+ div.space-between {
25
+ padding: 5px 2px;
26
+ background: #f3f3f3;
27
+ }
28
+ div.space-between:first-child {
29
+ padding-left: 5px;
30
+ }
31
+ .btn-space {
32
+ margin-right: 2px;
33
+ margin-left: 2px;
34
+ }
35
+ }
@@ -0,0 +1,22 @@
1
+ @use "sass:math";
2
+
3
+ @mixin marginTop($value) {
4
+ margin-top: $value;
5
+ }
6
+
7
+ // @import "../css/animate.css";
8
+ @import "variables";
9
+ @import "left-nav";
10
+ @import "info-box";
11
+ @import "table-grid";
12
+ @import "action-bar";
13
+ @import "page-manager";
14
+ @import "loader";
15
+ @import "module-permission";
16
+ @import "menu-sorter";
17
+ @import "category-list";
18
+ @import "popover-modal";
19
+ @import "model-creator";
20
+ @import "toast";
21
+ @import "badges";
22
+ @import "common";