aloha-vue 1.0.346 → 1.0.348

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 (32) hide show
  1. package/README.md +1 -0
  2. package/docs/package.json +32 -30
  3. package/docs/src/components/TheMenu/TheMenu.vue +1 -1
  4. package/docs/src/views/PageAlert/PageAlertTypes/PageAlertTypes.pug +5 -0
  5. package/docs/src/views/PageAlert/PageAlertTypes/compositionAPI/HtmlAPI.js +6 -0
  6. package/docs/src/views/PageButton/PageButton.js +5 -3
  7. package/docs/src/views/PageButton/PageButton.pug +2 -0
  8. package/docs/src/views/PageButton/PageButtonAriaDisabled/PageButtonAriaDisabled.pug +27 -2
  9. package/docs/src/views/PageButton/PageButtonAriaDisabled/compositionAPI/HtmlAPI.js +30 -4
  10. package/docs/src/views/PageButton/PageButtonBasic/PageButtonBasic.pug +50 -47
  11. package/docs/src/views/PageButton/PageButtonBasic/compositionAPI/HtmlAPI.js +6 -0
  12. package/docs/src/views/PageButton/PageButtonDisabled/PageButtonDisabled.pug +27 -2
  13. package/docs/src/views/PageButton/PageButtonDisabled/compositionAPI/HtmlAPI.js +30 -4
  14. package/docs/src/views/PageButton/PageButtonOutline/PageButtonOutline.pug +5 -0
  15. package/docs/src/views/PageButton/PageButtonOutline/compositionAPI/HtmlAPI.js +6 -0
  16. package/docs/src/views/PageButton/PageButtonSwitch/PageButtonSwitch.js +39 -0
  17. package/docs/src/views/PageButton/PageButtonSwitch/PageButtonSwitch.pug +12 -0
  18. package/docs/src/views/PageButton/PageButtonSwitch/PageButtonSwitch.vue +2 -0
  19. package/docs/src/views/PageButton/PageButtonSwitch/compositionAPI/HtmlAPI.js +12 -0
  20. package/docs/src/views/PageButton/PageButtonSwitch/compositionAPI/JsAPI.js +30 -0
  21. package/docs/src/views/PageLink/PageLinkClass/PageLinkClass.pug +5 -0
  22. package/docs/src/views/PageLink/PageLinkClass/compositionAPI/HtmlAPI.js +6 -0
  23. package/docs/src/views/PageLink/PageLinkDisabled/PageLinkDisabled.pug +12 -0
  24. package/docs/src/views/PageLink/PageLinkDisabled/compositionAPI/HtmlAPI.js +14 -0
  25. package/docs/src/views/PageLink/PageLinkOutline/PageLinkOutline.pug +5 -0
  26. package/docs/src/views/PageLink/PageLinkOutline/compositionAPI/HtmlAPI.js +6 -0
  27. package/docs/webpack.config.js +6 -1
  28. package/package.json +1 -1
  29. package/src/AButton/AButton.js +21 -1
  30. package/src/AButton/comositionAPI/SwitchAPI.js +33 -0
  31. package/src/ADropdown/ADropdown.js +1 -1
  32. package/src/ATable/compositionAPI/ScrollControlAPI.js +8 -2
package/README.md CHANGED
@@ -24,6 +24,7 @@ $ npm install aloha-vue
24
24
  ``` bash
25
25
  # at aloha/docs
26
26
  # serve with hot reloading at localhost:9000
27
+ # node v18.16
27
28
  $ npm run serve
28
29
  ```
29
30
 
package/docs/package.json CHANGED
@@ -11,46 +11,48 @@
11
11
  "build-css": "node-sass --include-path scss styles/styles.scss public/styles.css"
12
12
  },
13
13
  "dependencies": {
14
- "@popperjs/core": "2.11.7",
15
- "aloha-css": "1.0.98",
16
- "dompurify": "2.4.1",
17
- "fecha": "^4.2.3",
14
+ "@popperjs/core": "2.11.8",
15
+ "axios": "1.4.0",
16
+ "aloha-css": "1.0.103",
17
+ "dompurify": "3.0.3",
18
+ "fecha": "4.2.3",
18
19
  "highlight.js": "11.8.0",
19
- "lodash-es": "^4.17.21",
20
+ "lodash-es": "4.17.21",
21
+ "moment": "2.29.4",
20
22
  "tiny-emitter": "2.1.0",
21
- "tinymce": "6.2.0",
23
+ "tinymce": "6.5.1",
22
24
  "vue": "3.3.4",
23
- "vue-router": "4.2.0"
25
+ "vue-router": "4.2.2"
24
26
  },
25
27
  "devDependencies": {
26
- "@babel/core": "7.17.10",
27
- "@babel/eslint-parser": "7.17.0",
28
+ "@babel/core": "7.22.5",
29
+ "@babel/eslint-parser": "7.22.5",
28
30
  "@babel/plugin-syntax-dynamic-import": "7.8.3",
29
- "@webpack-cli/generators": "2.4.2",
30
- "acorn": "8.7.0",
31
+ "@webpack-cli/generators": "3.0.7",
32
+ "acorn": "8.9.0",
31
33
  "acorn-jsx": "5.3.2",
32
- "babel-loader": "8.2.4",
34
+ "babel-loader": "9.1.2",
33
35
  "clean-webpack-plugin": "4.0.0",
34
- "copy-webpack-plugin": "10.2.4",
35
- "css-loader": "6.7.1",
36
- "eslint": "8.13.0",
37
- "eslint-plugin-vue": "8.6.0",
38
- "eslint-webpack-plugin": "3.1.1",
36
+ "copy-webpack-plugin": "11.0.0",
37
+ "css-loader": "6.8.1",
38
+ "eslint": "8.43.0",
39
+ "eslint-plugin-vue": "9.15.0",
40
+ "eslint-webpack-plugin": "4.0.1",
39
41
  "file-loader": "6.2.0",
40
- "html-webpack-plugin": "5.5.0",
41
- "loader-utils": "3.2.0",
42
- "node-sass": "7.0.1",
42
+ "html-webpack-plugin": "5.5.3",
43
+ "loader-utils": "3.2.1",
44
+ "node-sass": "8.0.0",
43
45
  "null-loader": "4.0.1",
44
46
  "pug": "3.0.2",
45
- "regenerator-runtime": "0.13.9",
46
- "sass-loader": "12.6.0",
47
- "source-map-loader": "3.0.1",
48
- "style-loader": "3.3.1",
49
- "vue-eslint-parser": "8.3.0",
50
- "vue-loader": "17.0.0",
51
- "vue-pug-loader": "1.1.26",
52
- "webpack": "5.73.0",
53
- "webpack-cli": "4.10.0",
54
- "webpack-dev-server": "4.9.3"
47
+ "regenerator-runtime": "0.13.11",
48
+ "sass-loader": "13.3.2",
49
+ "source-map-loader": "4.0.1",
50
+ "style-loader": "3.3.3",
51
+ "vue-eslint-parser": "9.3.1",
52
+ "vue-loader": "17.2.2",
53
+ "vue-pug-loader": "1.1.29",
54
+ "webpack": "5.87.0",
55
+ "webpack-cli": "5.1.4",
56
+ "webpack-dev-server": "4.15.1"
55
57
  }
56
58
  }
@@ -1,3 +1,3 @@
1
1
  <template lang="pug" src="./TheMenu.pug"></template>
2
2
  <script src="./TheMenu.js"></script>
3
- <style lang="scss" src="./TheMenu.scss"></style>
3
+ <!--<style lang="scss" src="./TheMenu.scss"></style>-->
@@ -35,6 +35,11 @@ aloha-example(
35
35
  :is-visible="true"
36
36
  type="secondary"
37
37
  )
38
+ a-alert(
39
+ html="Alert tertiary"
40
+ :is-visible="true"
41
+ type="tertiary"
42
+ )
38
43
  a-alert(
39
44
  html="Alert dark"
40
45
  :is-visible="true"
@@ -35,6 +35,12 @@ export default function HtmlAPI() {
35
35
  type="secondary"
36
36
  >
37
37
  </a-alert>
38
+ <a-alert
39
+ html="Alert tertiary"
40
+ :is-visible="true"
41
+ type="tertiary"
42
+ >
43
+ </a-alert>
38
44
  <a-alert
39
45
  html="Alert dark"
40
46
  :is-visible="true"
@@ -15,14 +15,15 @@ import PageButtonLoading from "./PageButtonLoading/PageButtonLoading.vue";
15
15
  import PageButtonOutline from "./PageButtonOutline/PageButtonOutline.vue";
16
16
  import PageButtonSafeHtml from "./PageButtonSafeHtml/PageButtonSafeHtml.vue";
17
17
  import PageButtonSizes from "./PageButtonSizes/PageButtonSizes.vue";
18
+ import PageButtonSlotAppend from "./PageButtonSlotAppend/PageButtonSlotAppend.vue";
18
19
  import PageButtonSlotDefault from "./PageButtonSlotDefault/PageButtonSlotDefault.vue";
20
+ import PageButtonSlotPrepend from "./PageButtonSlotPrepend/PageButtonSlotPrepend.vue";
21
+ import PageButtonSlotTitle from "./PageButtonSlotTitle/PageButtonSlotTitle.vue";
22
+ import PageButtonSwitch from "./PageButtonSwitch/PageButtonSwitch.vue";
19
23
  import PageButtonTextAfterBefore from "./PageButtonTextAfterBefore/PageButtonTextAfterBefore.vue";
20
24
  import PageButtonTextObject from "./PageButtonTextObject/PageButtonTextObject.vue";
21
25
  import PageButtonTitleArray from "./PageButtonTitleArray/PageButtonTitleArray.vue";
22
26
  import PageButtonTitleHtml from "./PageButtonTitleHtml/PageButtonTitleHtml.vue";
23
- import PageButtonSlotPrepend from "./PageButtonSlotPrepend/PageButtonSlotPrepend.vue";
24
- import PageButtonSlotAppend from "./PageButtonSlotAppend/PageButtonSlotAppend.vue";
25
- import PageButtonSlotTitle from "./PageButtonSlotTitle/PageButtonSlotTitle.vue";
26
27
 
27
28
  import ExposesAPI from "./compositionAPI/ExposesAPI";
28
29
  import EventsAPI from "./compositionAPI/EventsAPI";
@@ -51,6 +52,7 @@ export default {
51
52
  PageButtonSafeHtml,
52
53
  PageButtonSizes,
53
54
  PageButtonSlotDefault,
55
+ PageButtonSwitch,
54
56
  PageButtonTextAfterBefore,
55
57
  PageButtonTextObject,
56
58
  PageButtonTitleArray,
@@ -51,6 +51,8 @@ aloha-page(
51
51
 
52
52
  page-button-slot-title
53
53
 
54
+ page-button-switch
55
+
54
56
  page-button-complex
55
57
 
56
58
  aloha-table-props(
@@ -16,6 +16,12 @@ aloha-example(
16
16
  :aria-disabled="true"
17
17
  @click="onAlert('secondary')"
18
18
  )
19
+ a-button(
20
+ class="a_btn a_btn_tertiary a_ml_2"
21
+ text="tertiary"
22
+ :aria-disabled="true"
23
+ @click="onAlert('tertiary')"
24
+ )
19
25
  a-button(
20
26
  class="a_btn a_btn_success a_ml_2"
21
27
  text="success"
@@ -35,7 +41,7 @@ aloha-example(
35
41
  @click="onAlert('warning')"
36
42
  )
37
43
  a-button(
38
- class="a_btn a_btn__danger a_ml_2"
44
+ class="a_btn a_btn_danger a_ml_2"
39
45
  text="danger"
40
46
  :aria-disabled="true"
41
47
  @click="onAlert('danger')"
@@ -47,11 +53,24 @@ aloha-example(
47
53
  @click="onAlert('dark')"
48
54
  )
49
55
  a-button(
50
- class="a_btn a_btn__light a_ml_2"
56
+ class="a_btn a_btn_light a_ml_2"
51
57
  text="light"
52
58
  :aria-disabled="true"
53
59
  @click="onAlert('light')"
54
60
  )
61
+ a-button(
62
+ class="a_ml_2"
63
+ text="switch"
64
+ :is-switch="true"
65
+ :aria-disabled="true"
66
+ )
67
+ a-button(
68
+ class="a_ml_2"
69
+ text="switch active"
70
+ :is-switch="true"
71
+ :model-switch="true"
72
+ :aria-disabled="true"
73
+ )
55
74
  a-button(
56
75
  class="a_btn a_btn_outline_primary a_ml_2"
57
76
  text="outline-primary"
@@ -64,6 +83,12 @@ aloha-example(
64
83
  :aria-disabled="true"
65
84
  @click="onAlert('outline-secondary')"
66
85
  )
86
+ a-button(
87
+ class="a_btn a_btn_outline_tertiary a_ml_2"
88
+ text="outline-tertiary"
89
+ :aria-disabled="true"
90
+ @click="onAlert('outline-tertiary')"
91
+ )
67
92
  a-button(
68
93
  class="a_btn a_btn_outline_success a_ml_2"
69
94
  text="outline-success"
@@ -13,6 +13,13 @@ export default function HtmlAPI() {
13
13
  @click="onAlert('secondary')"
14
14
  >
15
15
  </a-button>
16
+ <a-button
17
+ class="a_btn a_btn_tertiary a_ml_2"
18
+ text="tertiary"
19
+ :aria-disabled="true"
20
+ @click="onAlert('tertiary')"
21
+ >
22
+ </a-button>
16
23
  <a-button
17
24
  class="a_btn a_btn_success a_ml_2"
18
25
  text="success"
@@ -35,7 +42,7 @@ export default function HtmlAPI() {
35
42
  >
36
43
  </a-button>
37
44
  <a-button
38
- class="a_btn a_btn__danger a_ml_2"
45
+ class="a_btn a_btn_danger a_ml_2"
39
46
  text="danger"
40
47
  :aria-disabled="true"
41
48
  @click="onAlert('danger')"
@@ -49,12 +56,24 @@ export default function HtmlAPI() {
49
56
  >
50
57
  </a-button>
51
58
  <a-button
52
- class="a_btn a_btn__light a_ml_2"
59
+ class="a_btn a_btn_light a_ml_2"
53
60
  text="light"
54
61
  :aria-disabled="true"
55
62
  @click="onAlert('light')"
56
- >
57
- </a-button>
63
+ ></a-button>
64
+ <a-button
65
+ class="a_ml_2"
66
+ text="switch"
67
+ :is-switch="true"
68
+ :aria-disabled="true"
69
+ ></a-button>
70
+ <a-button
71
+ class="a_ml_2"
72
+ text="switch active"
73
+ :is-switch="true"
74
+ :model-switch="true"
75
+ :aria-disabled="true"
76
+ ></a-button>
58
77
  <a-button
59
78
  class="a_btn a_btn_outline_primary a_ml_2"
60
79
  text="outline-primary"
@@ -69,6 +88,13 @@ export default function HtmlAPI() {
69
88
  @click="onAlert('outline-secondary')"
70
89
  >
71
90
  </a-button>
91
+ <a-button
92
+ class="a_btn a_btn_outline_tertiary a_ml_2"
93
+ text="outline-tertiary"
94
+ :aria-disabled="true"
95
+ @click="onAlert('outline-tertiary')"
96
+ >
97
+ </a-button>
72
98
  <a-button
73
99
  class="a_btn a_btn_outline_success a_ml_2"
74
100
  text="outline-success"
@@ -4,50 +4,53 @@ aloha-example(
4
4
  header="_A_BASIC_USAGE_"
5
5
  description="_A_BUTTON_GROUP_BASIC_DESCRIPTION_"
6
6
  )
7
- .a_columns.a_columns_count_12
8
- .a_column.a_column_4.a_column_12_tablet
9
- a-button(
10
- class="a_btn a_btn_link"
11
- text="link"
12
- @click="onAlert('link')"
13
- )
14
- a-button(
15
- class="a_btn a_btn_primary a_ml_2"
16
- text="primary"
17
- @click="onAlert('primary')"
18
- )
19
- a-button(
20
- class="a_btn a_btn_secondary a_ml_2"
21
- text="secondary"
22
- @click="onAlert('secondary')"
23
- )
24
- a-button(
25
- class="a_btn a_btn_success a_ml_2"
26
- text="success"
27
- @click="onAlert('success')"
28
- )
29
- a-button(
30
- class="a_btn a_btn_info a_ml_2"
31
- text="info"
32
- @click="onAlert('info')"
33
- )
34
- a-button(
35
- class="a_btn a_btn_warning a_ml_2"
36
- text="warning"
37
- @click="onAlert('warning')"
38
- )
39
- a-button(
40
- class="a_btn a_btn_danger a_ml_2"
41
- text="danger"
42
- @click="onAlert('danger')"
43
- )
44
- a-button(
45
- class="a_btn a_btn_dark a_ml_2"
46
- text="dark"
47
- @click="onAlert('dark')"
48
- )
49
- a-button(
50
- class="a_btn a_btn_light a_ml_2"
51
- text="light"
52
- @click="onAlert('light')"
53
- )
7
+ a-button(
8
+ class="a_btn a_btn_link"
9
+ text="link"
10
+ @click="onAlert('link')"
11
+ )
12
+ a-button(
13
+ class="a_btn a_btn_primary a_ml_2"
14
+ text="primary"
15
+ @click="onAlert('primary')"
16
+ )
17
+ a-button(
18
+ class="a_btn a_btn_secondary a_ml_2"
19
+ text="secondary"
20
+ @click="onAlert('secondary')"
21
+ )
22
+ a-button(
23
+ class="a_btn a_btn_tertiary a_ml_2"
24
+ text="tertiary"
25
+ @click="onAlert('tertiary')"
26
+ )
27
+ a-button(
28
+ class="a_btn a_btn_success a_ml_2"
29
+ text="success"
30
+ @click="onAlert('success')"
31
+ )
32
+ a-button(
33
+ class="a_btn a_btn_info a_ml_2"
34
+ text="info"
35
+ @click="onAlert('info')"
36
+ )
37
+ a-button(
38
+ class="a_btn a_btn_warning a_ml_2"
39
+ text="warning"
40
+ @click="onAlert('warning')"
41
+ )
42
+ a-button(
43
+ class="a_btn a_btn_danger a_ml_2"
44
+ text="danger"
45
+ @click="onAlert('danger')"
46
+ )
47
+ a-button(
48
+ class="a_btn a_btn_dark a_ml_2"
49
+ text="dark"
50
+ @click="onAlert('dark')"
51
+ )
52
+ a-button(
53
+ class="a_btn a_btn_light a_ml_2"
54
+ text="light"
55
+ @click="onAlert('light')"
56
+ )
@@ -17,6 +17,12 @@ export default function HtmlAPI() {
17
17
  @click="onAlert('secondary')"
18
18
  >
19
19
  </a-button>
20
+ <a-button
21
+ class="a_btn a_btn_tertiary a_ml_2"
22
+ text="tertiary"
23
+ @click="onAlert('tertiary')"
24
+ >
25
+ </a-button>
20
26
  <a-button
21
27
  class="a_btn a_btn_success a_ml_2"
22
28
  text="success"
@@ -16,6 +16,12 @@ aloha-example(
16
16
  :disabled="true"
17
17
  @click="onAlert('secondary')"
18
18
  )
19
+ a-button(
20
+ class="a_btn a_btn_tertiary a_ml_2"
21
+ text="tertiary"
22
+ :disabled="true"
23
+ @click="onAlert('tertiary')"
24
+ )
19
25
  a-button(
20
26
  class="a_btn a_btn_success a_ml_2"
21
27
  text="success"
@@ -35,7 +41,7 @@ aloha-example(
35
41
  @click="onAlert('warning')"
36
42
  )
37
43
  a-button(
38
- class="a_btn a_btn__danger a_ml_2"
44
+ class="a_btn a_btn_danger a_ml_2"
39
45
  text="danger"
40
46
  :disabled="true"
41
47
  @click="onAlert('danger')"
@@ -47,11 +53,24 @@ aloha-example(
47
53
  @click="onAlert('dark')"
48
54
  )
49
55
  a-button(
50
- class="a_btn a_btn__light a_ml_2"
56
+ class="a_btn a_btn_light a_ml_2"
51
57
  text="light"
52
58
  :disabled="true"
53
59
  @click="onAlert('light')"
54
60
  )
61
+ a-button(
62
+ class="a_ml_2"
63
+ text="switch"
64
+ :is-switch="true"
65
+ :disabled="true"
66
+ )
67
+ a-button(
68
+ class="a_ml_2"
69
+ text="switch active"
70
+ :is-switch="true"
71
+ :model-switch="true"
72
+ :disabled="true"
73
+ )
55
74
  a-button(
56
75
  class="a_btn a_btn_outline_primary a_ml_2"
57
76
  text="outline-primary"
@@ -64,6 +83,12 @@ aloha-example(
64
83
  :disabled="true"
65
84
  @click="onAlert('outline-secondary')"
66
85
  )
86
+ a-button(
87
+ class="a_btn a_btn_outline_tertiary a_ml_2"
88
+ text="outline-tertiary"
89
+ :disabled="true"
90
+ @click="onAlert('outline-tertiary')"
91
+ )
67
92
  a-button(
68
93
  class="a_btn a_btn_outline_success a_ml_2"
69
94
  text="outline-success"
@@ -13,6 +13,13 @@ export default function HtmlAPI() {
13
13
  @click="onAlert('secondary')"
14
14
  >
15
15
  </a-button>
16
+ <a-button
17
+ class="a_btn a_btn_tertiary a_ml_2"
18
+ text="tertiary"
19
+ :disabled="true"
20
+ @click="onAlert('tertiary')"
21
+ >
22
+ </a-button>
16
23
  <a-button
17
24
  class="a_btn a_btn_success a_ml_2"
18
25
  text="success"
@@ -35,7 +42,7 @@ export default function HtmlAPI() {
35
42
  >
36
43
  </a-button>
37
44
  <a-button
38
- class="a_btn a_btn__danger a_ml_2"
45
+ class="a_btn a_btn_danger a_ml_2"
39
46
  text="danger"
40
47
  :disabled="true"
41
48
  @click="onAlert('danger')"
@@ -49,12 +56,24 @@ export default function HtmlAPI() {
49
56
  >
50
57
  </a-button>
51
58
  <a-button
52
- class="a_btn a_btn__light a_ml_2"
59
+ class="a_btn a_btn_light a_ml_2"
53
60
  text="light"
54
61
  :disabled="true"
55
62
  @click="onAlert('light')"
56
- >
57
- </a-button>
63
+ ></a-button>
64
+ <a-button
65
+ class="a_ml_2"
66
+ text="switch"
67
+ :is-switch="true"
68
+ :disabled="true"
69
+ ></a-button>
70
+ <a-button
71
+ class="a_ml_2"
72
+ text="switch active"
73
+ :is-switch="true"
74
+ :model-switch="true"
75
+ :disabled="true"
76
+ ></a-button>
58
77
  <a-button
59
78
  class="a_btn a_btn_outline_primary a_ml_2"
60
79
  text="outline-primary"
@@ -69,6 +88,13 @@ export default function HtmlAPI() {
69
88
  @click="onAlert('outline-secondary')"
70
89
  >
71
90
  </a-button>
91
+ <a-button
92
+ class="a_btn a_btn_outline_tertiary a_ml_2"
93
+ text="outline-tertiary"
94
+ :disabled="true"
95
+ @click="onAlert('outline-tertiary')"
96
+ >
97
+ </a-button>
72
98
  <a-button
73
99
  class="a_btn a_btn_outline_success a_ml_2"
74
100
  text="outline-success"
@@ -14,6 +14,11 @@ aloha-example(
14
14
  text="outline-secondary"
15
15
  @click="onAlert('outline-secondary')"
16
16
  )
17
+ a-button(
18
+ class="a_btn a_btn_outline_tertiary a_ml_2"
19
+ text="outline-tertiary"
20
+ @click="onAlert('outline-tertiary')"
21
+ )
17
22
  a-button(
18
23
  class="a_btn a_btn_outline_success a_ml_2"
19
24
  text="outline-success"
@@ -11,6 +11,12 @@ export default function HtmlAPI() {
11
11
  @click="onAlert('outline-secondary')"
12
12
  >
13
13
  </a-button>
14
+ <a-button
15
+ class="a_btn a_btn_outline_tertiary a_ml_2"
16
+ text="outline-tertiary"
17
+ @click="onAlert('outline-tertiary')"
18
+ >
19
+ </a-button>
14
20
  <a-button
15
21
  class="a_btn a_btn_outline_success a_ml_2"
16
22
  text="outline-success"
@@ -0,0 +1,39 @@
1
+ import {
2
+ ref,
3
+ } from "vue";
4
+
5
+ import AButton from "../../../../../src/AButton/AButton";
6
+ import AlohaExample from "../../../global/components/AlohaExample/AlohaExample.vue";
7
+
8
+ import HtmlAPI from "./compositionAPI/HtmlAPI";
9
+ import JsAPI from "./compositionAPI/JsAPI";
10
+
11
+ export default {
12
+ name: "PageButtonSwitch",
13
+ components: {
14
+ AButton,
15
+ AlohaExample,
16
+ },
17
+ setup() {
18
+ const {
19
+ codeHtml,
20
+ } = HtmlAPI();
21
+
22
+ const {
23
+ codeJs,
24
+ } = JsAPI();
25
+
26
+ const modelSwitch = ref(false);
27
+
28
+ const toggleModelSwitch = () => {
29
+ modelSwitch.value = !modelSwitch.value;
30
+ };
31
+
32
+ return {
33
+ codeHtml,
34
+ codeJs,
35
+ modelSwitch,
36
+ toggleModelSwitch,
37
+ };
38
+ },
39
+ };
@@ -0,0 +1,12 @@
1
+ aloha-example(
2
+ :code-html="codeHtml"
3
+ :code-js="codeJs"
4
+ header="_A_BUTTON_GROUP_SWITCH_HEADER_"
5
+ description="_A_BUTTON_GROUP_SWITCH_DESCRIPTION_"
6
+ )
7
+ a-button(
8
+ :is-switch="true"
9
+ :model-switch="modelSwitch"
10
+ text="(***)"
11
+ @click="toggleModelSwitch"
12
+ )
@@ -0,0 +1,2 @@
1
+ <template lang="pug" src="./PageButtonSwitch.pug"></template>
2
+ <script src="./PageButtonSwitch.js"></script>
@@ -0,0 +1,12 @@
1
+ export default function HtmlAPI() {
2
+ const codeHtml = `<a-button
3
+ :is-switch="true"
4
+ :model-switch="modelSwitch"
5
+ text="(***)"
6
+ @click="toggleModelSwitch"
7
+ ></a-button>`;
8
+
9
+ return {
10
+ codeHtml,
11
+ };
12
+ }
@@ -0,0 +1,30 @@
1
+ export default function JsAPI() {
2
+ const codeJs = `import {
3
+ ref,
4
+ } from "vue";
5
+
6
+ import AButton from "aloha-vue/src/AButton/AButton";
7
+
8
+ export default {
9
+ name: "PageButtonSwitch",
10
+ components: {
11
+ AButton,
12
+ },
13
+ setup() {
14
+ const modelSwitch = ref(false);
15
+
16
+ const toggleModelSwitch = () => {
17
+ modelSwitch.value = !modelSwitch.value;
18
+ };
19
+
20
+ return {
21
+ modelSwitch,
22
+ toggleModelSwitch,
23
+ };
24
+ },
25
+ };`;
26
+
27
+ return {
28
+ codeJs,
29
+ };
30
+ }
@@ -20,6 +20,11 @@ aloha-example(
20
20
  text="secondary"
21
21
  href="https://github.com/"
22
22
  )
23
+ a-link(
24
+ class="a_btn a_btn_tertiary a_ml_2"
25
+ text="tertiary"
26
+ href="https://github.com/"
27
+ )
23
28
  a-link(
24
29
  class="a_btn a_btn_success a_ml_2"
25
30
  text="success"
@@ -17,6 +17,12 @@ export default function HtmlAPI() {
17
17
  href="https://github.com/"
18
18
  >
19
19
  </a-link>
20
+ <a-link
21
+ class="a_btn a_btn_tertiary a_ml_2"
22
+ text="tertiary"
23
+ href="https://github.com/"
24
+ >
25
+ </a-link>
20
26
  <a-link
21
27
  class="a_btn a_btn_success a_ml_2"
22
28
  text="success"
@@ -23,6 +23,12 @@ aloha-example(
23
23
  :disabled="true"
24
24
  href="https://github.com/"
25
25
  )
26
+ a-link(
27
+ class="a_btn a_btn_tertiary a_ml_2"
28
+ text="tertiary"
29
+ :disabled="true"
30
+ href="https://github.com/"
31
+ )
26
32
  a-link(
27
33
  class="a_btn a_btn_success a_ml_2"
28
34
  text="success"
@@ -71,6 +77,12 @@ aloha-example(
71
77
  :disabled="true"
72
78
  href="https://github.com/"
73
79
  )
80
+ a-link(
81
+ class="a_btn a_btn_outline_tertiary a_ml_2"
82
+ text="outline-tertiary"
83
+ :disabled="true"
84
+ href="https://github.com/"
85
+ )
74
86
  a-link(
75
87
  class="a_btn a_btn_outline_success a_ml_2"
76
88
  text="outline-success"
@@ -20,6 +20,13 @@ export default function HtmlAPI() {
20
20
  href="https://github.com/"
21
21
  >
22
22
  </a-link>
23
+ <a-link
24
+ class="a_btn a_btn_tertiary a_ml_2"
25
+ text="tertiary"
26
+ :disabled="true"
27
+ href="https://github.com/"
28
+ >
29
+ </a-link>
23
30
  <a-link
24
31
  class="a_btn a_btn_success a_ml_2"
25
32
  text="success"
@@ -76,6 +83,13 @@ export default function HtmlAPI() {
76
83
  href="https://github.com/"
77
84
  >
78
85
  </a-link>
86
+ <a-link
87
+ class="a_btn a_btn_outline_tertiary a_ml_2"
88
+ text="outline-tertiary"
89
+ :disabled="true"
90
+ href="https://github.com/"
91
+ >
92
+ </a-link>
79
93
  <a-link
80
94
  class="a_btn a_btn_outline_success a_ml_2"
81
95
  text="outline-success"
@@ -15,6 +15,11 @@ aloha-example(
15
15
  text="outline-secondary"
16
16
  href="https://github.com/"
17
17
  )
18
+ a-link(
19
+ class="a_btn a_btn_outline_tertiary a_ml_2"
20
+ text="outline-tertiary"
21
+ href="https://github.com/"
22
+ )
18
23
  a-link(
19
24
  class="a_btn a_btn_outline_success a_ml_2"
20
25
  text="outline-success"
@@ -11,6 +11,12 @@ export default function HtmlAPI() {
11
11
  href="https://github.com/"
12
12
  >
13
13
  </a-link>
14
+ <a-link
15
+ class="a_btn a_btn_outline_tertiary a_ml_2"
16
+ text="outline-tertiary"
17
+ href="https://github.com/"
18
+ >
19
+ </a-link>
14
20
  <a-link
15
21
  class="a_btn a_btn_outline_success a_ml_2"
16
22
  text="outline-success"
@@ -177,7 +177,10 @@ module.exports = (env, options) => {
177
177
  },
178
178
  compress: true,
179
179
  port: 9000,
180
- onBeforeSetupMiddleware: function (devServer) {
180
+ client: {
181
+ overlay: false
182
+ },
183
+ setupMiddlewares: function (middlewares, devServer) {
181
184
  if (!devServer) {
182
185
  throw new Error('webpack-dev-server is not defined');
183
186
  }
@@ -187,6 +190,8 @@ module.exports = (env, options) => {
187
190
  res.json({ custom: "response" });
188
191
  }, 3000);
189
192
  });
193
+
194
+ return middlewares;
190
195
  },
191
196
  },
192
197
  ignoreWarnings: [/Failed to parse source map/],
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "Vue.js"
15
15
  ],
16
16
  "homepage": "https://github.com/ilia-brykin/aloha/#README.md",
17
- "version": "1.0.346",
17
+ "version": "1.0.348",
18
18
  "author": {
19
19
  "name": "Ilia Brykin",
20
20
  "email": "brykin.ilia@gmail.com"
@@ -11,6 +11,7 @@ import ClickAPI from "./comositionAPI/ClickAPI";
11
11
  import ComponentLocalAPI from "./comositionAPI/ComponentLocalAPI";
12
12
  import HtmlTitleAPI from "./comositionAPI/HtmlTitleAPI";
13
13
  import LoadingAPI from "./comositionAPI/LoadingAPI";
14
+ import SwitchAPI from "./comositionAPI/SwitchAPI";
14
15
  import TextAPI from "./comositionAPI/TextAPI";
15
16
  import TitleAPI from "./comositionAPI/TitleAPI";
16
17
 
@@ -98,6 +99,11 @@ export default {
98
99
  required: false,
99
100
  default: () => uniqueId("a_btn_"),
100
101
  },
102
+ isSwitch: {
103
+ type: Boolean,
104
+ required: false,
105
+ default: undefined,
106
+ },
101
107
  isTitleHtml: {
102
108
  type: Boolean,
103
109
  required: false,
@@ -119,6 +125,11 @@ export default {
119
125
  required: false,
120
126
  default: "a_spinner_small",
121
127
  },
128
+ modelSwitch: {
129
+ type: Boolean,
130
+ required: false,
131
+ default: undefined,
132
+ },
122
133
  prevent: {
123
134
  type: Boolean,
124
135
  required: false,
@@ -232,6 +243,11 @@ export default {
232
243
  ariaLabelAttributes,
233
244
  } = AriaLabelAPI(props);
234
245
 
246
+ const {
247
+ isSwitchActive,
248
+ switchClass,
249
+ } = SwitchAPI(props);
250
+
235
251
  return {
236
252
  ariaLabelAttributes,
237
253
  buttonRef,
@@ -239,10 +255,12 @@ export default {
239
255
  htmlTitleAttributes,
240
256
  isLoadingLeft,
241
257
  isLoadingRight,
242
- isTextOrHtmlVisible,
258
+ isSwitchActive,
243
259
  isTextOrHtmlScreenReaderVisible,
260
+ isTextOrHtmlVisible,
244
261
  isTitleVisible,
245
262
  onClick,
263
+ switchClass,
246
264
  };
247
265
  },
248
266
  render() {
@@ -255,6 +273,7 @@ export default {
255
273
  id: this.id,
256
274
  class: [
257
275
  "aloha_btn",
276
+ this.switchClass,
258
277
  this.class,
259
278
  {
260
279
  inactive: this.ariaDisabled,
@@ -264,6 +283,7 @@ export default {
264
283
  tabindex: this.tabindex,
265
284
  disabled: this.disabled,
266
285
  ariaDisabled: this.ariaDisabled,
286
+ "aria-pressed": this.isSwitchActive,
267
287
  // TODO: ATable
268
288
  isAllRowsSelected: undefined,
269
289
  onClick: this.onClick,
@@ -0,0 +1,33 @@
1
+ import {
2
+ computed,
3
+ toRef,
4
+ } from "vue";
5
+
6
+ const SWITCH_CLASS = "a_btn a_btn_switch";
7
+
8
+ export default function SwitchAPI(props) {
9
+ const isSwitch = toRef(props, "isSwitch");
10
+ const modelSwitch = toRef(props, "modelSwitch");
11
+
12
+ const isSwitchActive = computed(() => {
13
+ if (isSwitch.value) {
14
+ return !!modelSwitch.value;
15
+ }
16
+ return undefined;
17
+ });
18
+
19
+ const switchClass = computed(() => {
20
+ if (isSwitch.value) {
21
+ if (modelSwitch.value) {
22
+ return `${ SWITCH_CLASS } a_btn_switch_active`;
23
+ }
24
+ return SWITCH_CLASS;
25
+ }
26
+ return undefined;
27
+ });
28
+
29
+ return {
30
+ isSwitchActive,
31
+ switchClass,
32
+ };
33
+ }
@@ -71,7 +71,7 @@ export default {
71
71
  buttonClass: {
72
72
  type: [String, Object],
73
73
  required: false,
74
- default: "a_btn a_btn_secondary dropdown_button",
74
+ default: "a_btn a_btn_secondary",
75
75
  },
76
76
  buttonTag: {
77
77
  type: String,
@@ -22,6 +22,8 @@ export default function ScrollControlAPI(props, { emit }, {
22
22
  const columnActionsWidth = toRef(props, "columnActionsWidth");
23
23
  const isActionColumnVisible = toRef(props, "isActionColumnVisible");
24
24
 
25
+ let changingTableWidth = false;
26
+
25
27
  const isColumnVisible = ({ column }) => {
26
28
  if (column.isRender === false) {
27
29
  return false;
@@ -156,8 +158,12 @@ export default function ScrollControlAPI(props, { emit }, {
156
158
  // since we are observing only a single element, so we access the first element in entries array
157
159
  const RECT = entries[0].contentRect;
158
160
  if (tableWidth.value !== RECT.width) {
159
- tableWidth.value = RECT.width;
160
- checkVisibleColumns();
161
+ if (!changingTableWidth) {
162
+ changingTableWidth = true;
163
+ tableWidth.value = RECT.width;
164
+ checkVisibleColumns();
165
+ changingTableWidth = false;
166
+ }
161
167
  }
162
168
  });
163
169