aloha-vue 1.0.12 → 1.0.15

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 (35) hide show
  1. package/docs/package.json +1 -1
  2. package/docs/src/App/App.js +4 -0
  3. package/docs/src/App/App.pug +3 -0
  4. package/docs/src/components/TheMenu/TheMenu.js +25 -0
  5. package/docs/src/router/index.js +25 -0
  6. package/docs/src/views/PageCheckbox/PageCheckbox.js +35 -0
  7. package/docs/src/views/PageCheckbox/PageCheckbox.pug +78 -0
  8. package/docs/src/views/PageCheckbox/PageCheckbox.vue +2 -0
  9. package/docs/src/views/PageConfirm/PageConfirm.js +32 -0
  10. package/docs/src/views/PageConfirm/PageConfirm.pug +6 -0
  11. package/docs/src/views/PageConfirm/PageConfirm.vue +2 -0
  12. package/docs/src/views/PageModal/PageModal.js +22 -0
  13. package/docs/src/views/PageModal/PageModal.pug +11 -0
  14. package/docs/src/views/PageModal/PageModal.vue +2 -0
  15. package/docs/src/views/PageNotification/PageNotification.js +34 -0
  16. package/docs/src/views/PageNotification/PageNotification.pug +9 -0
  17. package/docs/src/views/PageNotification/PageNotification.vue +2 -0
  18. package/docs/src/views/PageRadio/PageRadio.js +31 -0
  19. package/docs/src/views/PageRadio/PageRadio.pug +54 -0
  20. package/docs/src/views/PageRadio/PageRadio.vue +2 -0
  21. package/package.json +1 -1
  22. package/src/AModal/AModal.js +416 -0
  23. package/src/AModalConfirm/AModalConfirm.js +35 -0
  24. package/src/ANotification/ANotification.js +46 -0
  25. package/src/compositionAPI/ANotificationAPI.js +51 -0
  26. package/src/compositionAPI/ConfirmAPI.js +52 -0
  27. package/src/ui/ACheckbox/ACheckbox.js +128 -0
  28. package/src/ui/ACheckbox/ACheckboxItem.js +135 -0
  29. package/src/ui/AOneCheckbox/AOneCheckbox.js +122 -0
  30. package/src/ui/ARadio/ARadio.js +128 -0
  31. package/src/ui/ARadio/ARadioItem.js +126 -0
  32. package/src/ui/compositionApi/UiAPI.js +8 -0
  33. package/src/ui/compositionApi/UiCheckboxRadioAPI.js +35 -0
  34. package/src/ui/compositionApi/UiCheckboxRadioIsWidthAutoAPI.js +18 -0
  35. package/src/ui/compositionApi/UiCheckboxRadioItem.js +34 -0
package/docs/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "build-css": "node-sass --include-path scss styles/styles.scss public/styles.css"
12
12
  },
13
13
  "dependencies": {
14
- "aloha-css": "1.0.10",
14
+ "aloha-css": "1.0.14",
15
15
  "lodash-es": "^4.17.21",
16
16
  "vue": "3.2.31",
17
17
  "vue-router": "4.0.14",
@@ -1,3 +1,5 @@
1
+ import AModalConfirm from "../../../src/AModalConfirm/AModalConfirm";
2
+ import ANotification from "../../../src/ANotification/ANotification";
1
3
  import TheMenu from "../components/TheMenu/TheMenu.vue";
2
4
  import TheNavbar from "../components/TheNavbar/TheNavbar.vue";
3
5
 
@@ -8,6 +10,8 @@ import {
8
10
 
9
11
  export default defineComponent({
10
12
  components: {
13
+ AModalConfirm,
14
+ ANotification,
11
15
  TheMenu,
12
16
  TheNavbar,
13
17
  },
@@ -8,3 +8,6 @@ div
8
8
  style="width: calc(100vw - 280px);"
9
9
  )
10
10
  router-view
11
+
12
+ a-modal-confirm
13
+ a-notification
@@ -48,6 +48,31 @@ export default {
48
48
  name: "PageAlert",
49
49
  label: "Alert",
50
50
  },
51
+ {
52
+ id: "modal",
53
+ name: "PageModal",
54
+ label: "Modal",
55
+ },
56
+ {
57
+ id: "confirm",
58
+ name: "PageConfirm",
59
+ label: "Confirm",
60
+ },
61
+ {
62
+ id: "notification",
63
+ name: "PageNotification",
64
+ label: "Notification",
65
+ },
66
+ {
67
+ id: "checkbox",
68
+ name: "PageCheckbox",
69
+ label: "Checkbox",
70
+ },
71
+ {
72
+ id: "radio",
73
+ name: "PageRadio",
74
+ label: "Radio",
75
+ },
51
76
  ],
52
77
  };
53
78
  },
@@ -59,6 +59,31 @@ const ROUTES = [
59
59
  name: "PageAlert",
60
60
  component: () => import(/* webpackChunkName: "PageAlert" */ "../views/PageAlert/PageAlert.vue"),
61
61
  },
62
+ {
63
+ path: "/modal",
64
+ name: "PageModal",
65
+ component: () => import(/* webpackChunkName: "PageModal" */ "../views/PageModal/PageModal.vue"),
66
+ },
67
+ {
68
+ path: "/confirm",
69
+ name: "PageConfirm",
70
+ component: () => import(/* webpackChunkName: "PageConfirm" */ "../views/PageConfirm/PageConfirm.vue"),
71
+ },
72
+ {
73
+ path: "/notification",
74
+ name: "PageNotification",
75
+ component: () => import(/* webpackChunkName: "PageNotification" */ "../views/PageNotification/PageNotification.vue"),
76
+ },
77
+ {
78
+ path: "/checkbox",
79
+ name: "PageCheckbox",
80
+ component: () => import(/* webpackChunkName: "PageCheckbox" */ "../views/PageCheckbox/PageCheckbox.vue"),
81
+ },
82
+ {
83
+ path: "/radio",
84
+ name: "PageRadio",
85
+ component: () => import(/* webpackChunkName: "PageRadio" */ "../views/PageRadio/PageRadio.vue"),
86
+ },
62
87
  {
63
88
  // If the routing configuration '*' reports an error, replace it with '/: catchAll(. *)'
64
89
  // caught Error: Catch all routes ("*") must now be defined using a param with a custom regexp
@@ -0,0 +1,35 @@
1
+ import ACheckbox from "../../../../src/ui/ACheckbox/ACheckbox";
2
+ import AOneCheckbox from "../../../../src/ui/AOneCheckbox/AOneCheckbox";
3
+
4
+ export default {
5
+ name: "PageCheckbox",
6
+ components: {
7
+ ACheckbox,
8
+ AOneCheckbox,
9
+ },
10
+ data() {
11
+ return {
12
+ model: false,
13
+ model1: false,
14
+ modelArr: undefined,
15
+ data: [
16
+ {
17
+ label: "Aloha 1",
18
+ id: "aloha_1",
19
+ },
20
+ {
21
+ label: "Aloha 2",
22
+ id: "aloha_2",
23
+ },
24
+ {
25
+ label: "Aloha 3",
26
+ id: "aloha_3",
27
+ },
28
+ {
29
+ label: "Aloha 4",
30
+ id: "aloha_4",
31
+ },
32
+ ],
33
+ };
34
+ },
35
+ };
@@ -0,0 +1,78 @@
1
+ div
2
+ h1 ACheckbox
3
+ a-one-checkbox(
4
+ v-model="model"
5
+ label="aloha one checkbox"
6
+ )
7
+ div model: {{ model }}
8
+ a-one-checkbox(
9
+ v-model="model1"
10
+ label="aloha one checkbox"
11
+ :is-width-auto="true"
12
+ )
13
+ div model1: {{ model1 }}
14
+ a-checkbox(
15
+ v-model="modelArr"
16
+ :data="data"
17
+ key-id="id"
18
+ key-label="label"
19
+ label="Test label"
20
+ )
21
+ div modelArr:
22
+ pre {{ modelArr }}
23
+
24
+ .a_custom_control.a_custom_checkbox
25
+ input.a_custom_control_input(
26
+ id="checkbox_0"
27
+ type="checkbox"
28
+ value="0"
29
+ )
30
+ label.a_custom_control_label(
31
+ for="checkbox_0"
32
+ ) Aloha
33
+
34
+ .a_custom_control.a_custom_checkbox
35
+ input.a_custom_control_input(
36
+ id="checkbox_1"
37
+ type="checkbox"
38
+ value="1"
39
+ :indeterminate="true"
40
+ )
41
+ label.a_custom_control_label(
42
+ for="checkbox_1"
43
+ ) Aloha indeterminate
44
+
45
+ .a_custom_control.a_custom_checkbox
46
+ input.a_custom_control_input(
47
+ id="checkbox_2"
48
+ type="checkbox"
49
+ value="1"
50
+ :disabled="true"
51
+ )
52
+ label.a_custom_control_label(
53
+ for="checkbox_2"
54
+ ) Aloha
55
+
56
+ .a_custom_control.a_custom_checkbox
57
+ input.a_custom_control_input(
58
+ id="checkbox_3"
59
+ type="checkbox"
60
+ value="1"
61
+ :checked="true"
62
+ :disabled="true"
63
+ )
64
+ label.a_custom_control_label(
65
+ for="checkbox_3"
66
+ ) Aloha
67
+
68
+ .a_custom_control.a_custom_checkbox
69
+ input.a_custom_control_input(
70
+ id="checkbox_4"
71
+ type="checkbox"
72
+ value="1"
73
+ :indeterminate="true"
74
+ :disabled="true"
75
+ )
76
+ label.a_custom_control_label(
77
+ for="checkbox_4"
78
+ ) Aloha
@@ -0,0 +1,2 @@
1
+ <template lang="pug" src="./PageCheckbox.pug"></template>
2
+ <script src="./PageCheckbox.js"></script>
@@ -0,0 +1,32 @@
1
+ import AModal from "../../../../src/AModal/AModal";
2
+
3
+ import ConfirmAPI from "../../../../src/compositionAPI/ConfirmAPI";
4
+
5
+ export default {
6
+ name: "PageConfirm",
7
+ components: {
8
+ AModal,
9
+ },
10
+ setup() {
11
+ const {
12
+ closeConfirm,
13
+ openConfirm,
14
+ } = ConfirmAPI();
15
+
16
+ const save = () => {
17
+ closeConfirm();
18
+ };
19
+
20
+ const openConfirmLocal = () => {
21
+ openConfirm({
22
+ headerText: "Aloha",
23
+ bodyHtml: "<div>Aloha <strong>Hola</strong></div>",
24
+ save: save,
25
+ });
26
+ };
27
+
28
+ return {
29
+ openConfirmLocal,
30
+ };
31
+ },
32
+ };
@@ -0,0 +1,6 @@
1
+ div
2
+ h1 AConfirm
3
+ button(
4
+ type="button"
5
+ @click="openConfirmLocal"
6
+ ) Open confirm
@@ -0,0 +1,2 @@
1
+ <template lang="pug" src="./PageConfirm.pug"></template>
2
+ <script src="./PageConfirm.js"></script>
@@ -0,0 +1,22 @@
1
+ import AModal from "../../../../src/AModal/AModal";
2
+
3
+ export default {
4
+ name: "PageModal",
5
+ components: {
6
+ AModal,
7
+ },
8
+ data() {
9
+ return {
10
+ isModalOpen: false,
11
+ };
12
+ },
13
+ methods: {
14
+ openModal() {
15
+ this.isModalOpen = true;
16
+ },
17
+
18
+ closeModal() {
19
+ this.isModalOpen = false;
20
+ },
21
+ },
22
+ };
@@ -0,0 +1,11 @@
1
+ div
2
+ h1 AModal
3
+ button(
4
+ type="button"
5
+ @click="openModal"
6
+ ) Open Modal
7
+
8
+ a-modal(
9
+ v-if="isModalOpen"
10
+ :close="closeModal"
11
+ )
@@ -0,0 +1,2 @@
1
+ <template lang="pug" src="./PageModal.pug"></template>
2
+ <script src="./PageModal.js"></script>
@@ -0,0 +1,34 @@
1
+ import ANotificationAPI from "../../../../src/compositionAPI/ANotificationAPI";
2
+
3
+ export default {
4
+ name: "PageNotification",
5
+ setup() {
6
+ const {
7
+ addNotification,
8
+ } = ANotificationAPI();
9
+
10
+ const addNotificationLocal = type => {
11
+ addNotification({
12
+ text: type,
13
+ type,
14
+ });
15
+ };
16
+
17
+ return {
18
+ addNotificationLocal,
19
+ };
20
+ },
21
+ data() {
22
+ return {
23
+ types: [
24
+ "primary",
25
+ "secondary",
26
+ "success",
27
+ "danger",
28
+ "warning",
29
+ "info",
30
+ "dark",
31
+ ],
32
+ };
33
+ },
34
+ };
@@ -0,0 +1,9 @@
1
+ div
2
+ h1 ANotification
3
+ button.a_btn.a_mr_2(
4
+ v-for="type in types"
5
+ :key="type"
6
+ :class="'a_btn_' + type"
7
+ type="button"
8
+ @click="addNotificationLocal(type)"
9
+ ) Add Notification {{ type }}
@@ -0,0 +1,2 @@
1
+ <template lang="pug" src="./PageNotification.pug"></template>
2
+ <script src="./PageNotification.js"></script>
@@ -0,0 +1,31 @@
1
+ import ARadio from "../../../../src/ui/ARadio/ARadio";
2
+
3
+ export default {
4
+ name: "PageRadio",
5
+ components: {
6
+ ARadio,
7
+ },
8
+ data() {
9
+ return {
10
+ model: undefined,
11
+ data: [
12
+ {
13
+ label: "Aloha 1",
14
+ id: "aloha_1",
15
+ },
16
+ {
17
+ label: "Aloha 2",
18
+ id: "aloha_2",
19
+ },
20
+ {
21
+ label: "Aloha 3",
22
+ id: "aloha_3",
23
+ },
24
+ {
25
+ label: "Aloha 4",
26
+ id: "aloha_4",
27
+ },
28
+ ],
29
+ };
30
+ },
31
+ };
@@ -0,0 +1,54 @@
1
+ div
2
+ h1 ARadio
3
+ a-radio(
4
+ v-model="model"
5
+ :data="data"
6
+ key-id="id"
7
+ key-label="label"
8
+ label="Test label"
9
+ )
10
+ div model: {{ model }}
11
+
12
+ .a_custom_control.a_custom_radio
13
+ input.a_custom_control_input(
14
+ id="checkbox_0"
15
+ type="radio"
16
+ value="0"
17
+ )
18
+ label.a_custom_control_label(
19
+ for="checkbox_0"
20
+ ) Aloha
21
+
22
+ .a_custom_control.a_custom_radio
23
+ input.a_custom_control_input(
24
+ id="checkbox_1"
25
+ type="radio"
26
+ value="0"
27
+ :checked="true"
28
+ )
29
+ label.a_custom_control_label(
30
+ for="checkbox_1"
31
+ ) Aloha
32
+
33
+ .a_custom_control.a_custom_radio
34
+ input.a_custom_control_input(
35
+ id="checkbox_2"
36
+ type="radio"
37
+ value="0"
38
+ :checked="true"
39
+ :disabled="true"
40
+ )
41
+ label.a_custom_control_label(
42
+ for="checkbox_2"
43
+ ) Aloha
44
+
45
+ .a_custom_control.a_custom_radio
46
+ input.a_custom_control_input(
47
+ id="checkbox_3"
48
+ type="radio"
49
+ value="0"
50
+ :disabled="true"
51
+ )
52
+ label.a_custom_control_label(
53
+ for="checkbox_3"
54
+ ) Aloha
@@ -0,0 +1,2 @@
1
+ <template lang="pug" src="./PageRadio.pug"></template>
2
+ <script src="./PageRadio.js"></script>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aloha-vue",
3
3
  "description": "Project aloha",
4
- "version": "1.0.12",
4
+ "version": "1.0.15",
5
5
  "author": "Ilia Brykin",
6
6
  "dependencies": {
7
7
  "@popperjs/core": "2.11.5",