@everchron/ec-shards 3.1.5 → 3.3.0

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/dist/ec-shards.common.js +1985 -946
  2. package/dist/ec-shards.common.js.map +1 -1
  3. package/dist/ec-shards.css +1 -1
  4. package/dist/ec-shards.umd.js +1985 -946
  5. package/dist/ec-shards.umd.js.map +1 -1
  6. package/dist/ec-shards.umd.min.js +2 -2
  7. package/dist/ec-shards.umd.min.js.map +1 -1
  8. package/dist/img/EU.d180ac2d.svg +1 -0
  9. package/dist/img/login-email-mfa.33936706.svg +1 -0
  10. package/dist/img/login-email.4b81db3a.svg +1 -0
  11. package/dist/img/login-sso-azure.a49f3fe4.svg +1 -0
  12. package/dist/img/login-sso-okta.55de1bbd.svg +1 -0
  13. package/package.json +1 -1
  14. package/src/assets/icons/login-key.svg +7 -0
  15. package/src/assets/images/fill-icons/login-email-mfa.svg +1 -0
  16. package/src/assets/images/fill-icons/login-email.svg +1 -0
  17. package/src/assets/images/fill-icons/login-sso-azure.svg +1 -0
  18. package/src/assets/images/fill-icons/login-sso-okta.svg +1 -0
  19. package/src/assets/images/flags/EU.svg +1 -0
  20. package/src/components/fill-icon/fill-icon.vue +59 -0
  21. package/src/components/flag/flag.vue +5 -0
  22. package/src/components/index.js +4 -0
  23. package/src/components/pagination/pagination.vue +133 -140
  24. package/src/components/select/select.vue +24 -3
  25. package/src/components/separator/separator.vue +93 -0
  26. package/src/stories/Changelog.stories.mdx +16 -0
  27. package/src/stories/fill-icon/fill-icon.stories.js +24 -0
  28. package/src/stories/flag/flag.stories.js +6 -1
  29. package/src/stories/pagination/pagination.stories.js +0 -30
  30. package/src/stories/select/select.stories.js +16 -0
  31. package/src/stories/separator/.DS_Store +0 -0
  32. package/src/stories/separator/separator.stories.js +33 -0
@@ -0,0 +1,93 @@
1
+ <template>
2
+ <div class="ecs-separator" :class="classes" :style="{margin: marginStyles, width: width, height: height}" />
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ props: {
8
+ /** Determines if the separator line is horinzontally or vertically shown. */
9
+ type: {
10
+ type: String,
11
+ default: 'horizontal',
12
+ validator: v => ['horizontal', 'vertical'].includes(v)
13
+ },
14
+ /** Determines the color strength of the line. */
15
+ strength: {
16
+ type: String,
17
+ default: 'medium',
18
+ validator: v => ['soft', 'medium', 'strong'].includes(v)
19
+ },
20
+ /** Determines to margin (top/bottom for horizontal, left/right for vertical). If a `Number` is passed, the margin will used for both top/bottom or left/right. If an `Array` is passed (eg. `[8, 16]`), you can set individual margins for each side (CSS shorthand syntax). */
21
+ margin: {
22
+ type: [Number, Array],
23
+ default: 0
24
+ },
25
+ /** Determines the width of the separator. Any valid css (px, %) value possible. */
26
+ width: {
27
+ type: String
28
+ },
29
+ /** Determines the height of the separator. Any valid css (px, %) value possible. Vertical separators typically require a pixel value height. */
30
+ height: {
31
+ type: String
32
+ }
33
+ },
34
+
35
+ computed: {
36
+ classes(){
37
+ return 'ecs-separator-' + this.type + ' ecs-separator-' + this.strength
38
+ },
39
+
40
+ marginStyles(){
41
+ if(typeof(this.margin) === 'number') {
42
+ if(this.type === 'horizontal')
43
+ return this.margin + 'px 0 ' + this.margin + 'px 0'
44
+ else
45
+ return '0 ' + this.margin + 'px 0 ' + this.margin + 'px'
46
+ } else if(typeof(this.margin) === 'object') {
47
+ const iterator = this.margin.values()
48
+ let margins
49
+ let iteration = 0
50
+ for (const value of iterator) {
51
+ if(iteration == 0)
52
+ margins = value + 'px '
53
+ else
54
+ margins = margins + value + 'px '
55
+ iteration++
56
+ }
57
+ return margins
58
+ }
59
+ }
60
+ }
61
+ };
62
+ </script>
63
+
64
+ <style lang="scss" scoped>
65
+ @import "../../tokens/build/scss/tokens.scss";
66
+
67
+ .ecs-separator{
68
+ border-radius: 1px;
69
+
70
+ &-soft{
71
+ background-color: $color-gray-2;
72
+ }
73
+
74
+ &-medium{
75
+ background-color: $color-gray-3;
76
+ }
77
+
78
+ &-strong{
79
+ background-color: $color-gray-4;
80
+ }
81
+
82
+ &-horizontal{
83
+ width: 100%;
84
+ height: 1px;
85
+ }
86
+
87
+ &-vertical{
88
+ height: 100%;
89
+ width: 1px;
90
+ }
91
+ }
92
+ </style>
93
+
@@ -6,6 +6,22 @@ import { Meta } from '@storybook/addon-docs/blocks';
6
6
  Changelog
7
7
  </h1>
8
8
 
9
+ ## Version 3.3.0 (12 January 2023)
10
+
11
+ ### Features
12
+
13
+ - Added new EcsFillIcon component
14
+ - Added `login-key` icon
15
+ - Added EU flag icon
16
+ - Added new `placeholder` prop support for EcsSelect component
17
+ - Added new EcsSeparator component
18
+
19
+ ## Version 3.2.0 (11 January 2023)
20
+
21
+ ### Fixes
22
+
23
+ Reverted all EcsPagination updates and moved these changes to the @next branch, until infinite scroll feature can be implemented. This means 3.2.0 can be used again as a stable release for current application development.
24
+
9
25
  ## Version 3.1.5 (undefined)
10
26
 
11
27
  ### Features
@@ -0,0 +1,24 @@
1
+ import EcsFillIcon from '@components/fill-icon/fill-icon';
2
+
3
+ export default {
4
+ title: 'Icons/Fill Icon',
5
+ component: EcsFillIcon
6
+ };
7
+
8
+ export const fillIcon = () => ({
9
+ components: { EcsFillIcon },
10
+ template: `<main>
11
+ <ecs-fill-icon type="login-sso-azure" />
12
+ <ecs-fill-icon type="login-sso-okta" />
13
+ <ecs-fill-icon type="login-email" />
14
+ <ecs-fill-icon type="login-email-mfa" :width="23" />
15
+ </main>`,
16
+ });
17
+
18
+ export const fillIconSizes = () => ({
19
+ components: { EcsFillIcon },
20
+ template: `<main>
21
+ <ecs-fill-icon type="login-sso-azure" :width="40" />
22
+ <ecs-fill-icon type="login-sso-azure" :height="40" :width="40" />
23
+ </main>`,
24
+ });
@@ -7,5 +7,10 @@ export default {
7
7
 
8
8
  export const flag = () => ({
9
9
  components: { EcsFlag },
10
- template: `<ecs-flag code="us" />`,
10
+ template: `<main>
11
+ <ecs-flag code="us" />
12
+ <ecs-flag code="eu" />
13
+ <ecs-flag code="gb" />
14
+ <ecs-flag code="au" />
15
+ </main>`,
11
16
  });
@@ -35,33 +35,3 @@ export const tabPagination = () => ({
35
35
  </ecs-pagination>
36
36
  </div>`,
37
37
  });
38
-
39
- export const infiniteScroll = () => ({
40
- components: { EcsPagination, EcsTabBar, EcsTabButton },
41
- template: `<div style="display:flex;flex-direction:column;height: 200px;justify-content: flex-end;">
42
- <ecs-pagination type="infinite" :current-page="2" :total-pages="10">
43
- <template slot="tabs">
44
- <ecs-tab-bar type="sheet">
45
- <ecs-tab-button show>Settings</ecs-tab-button>
46
- <ecs-tab-button>Calendar</ecs-tab-button>
47
- <ecs-tab-button>Versions</ecs-tab-button>
48
- </ecs-tab-bar>
49
- </template>
50
- </ecs-pagination>
51
- </div>`,
52
- });
53
-
54
- export const infiniteScrollRange = () => ({
55
- components: { EcsPagination, EcsTabBar, EcsTabButton },
56
- template: `<div style="display:flex;flex-direction:column;height: 200px;justify-content: flex-end;">
57
- <ecs-pagination type="infinite" :current-page="2" :total-pages="10" :itemRangeFrom="1" :itemRangeTo="10" :itemRangeTotal="90">
58
- <template slot="tabs">
59
- <ecs-tab-bar type="sheet">
60
- <ecs-tab-button>Settings</ecs-tab-button>
61
- <ecs-tab-button show>Calendar</ecs-tab-button>
62
- <ecs-tab-button>Versions</ecs-tab-button>
63
- </ecs-tab-bar>
64
- </template>
65
- </ecs-pagination>
66
- </div>`,
67
- });
@@ -89,3 +89,19 @@ export const selectNaked = () => ({
89
89
  </ecs-select>
90
90
  </div>`,
91
91
  });
92
+
93
+ export const selectPlaceholders = () => ({
94
+ components: { EcsSelect },
95
+ template: `<div>
96
+ <ecs-select placeholder="Placeholder" class="mb-4">
97
+ <option value="admin">Admin</option>
98
+ <option value="basic">Basic</option>
99
+ <option value="guest">Guest</option>
100
+ </ecs-select>
101
+ <ecs-select placeholder="Placeholder" subtle>
102
+ <option value="admin">Admin</option>
103
+ <option value="basic">Basic</option>
104
+ <option value="guest">Guest</option>
105
+ </ecs-select>
106
+ </div>`,
107
+ });
Binary file
@@ -0,0 +1,33 @@
1
+ import EcsSeparator from '@components/separator/separator';
2
+
3
+ export default {
4
+ title: 'Layout/Separator',
5
+ component: EcsSeparator
6
+ };
7
+
8
+ export const separator = () => ({
9
+ components: { EcsSeparator },
10
+ template: `<div>
11
+ <ecs-separator :margin="20" />
12
+ <ecs-separator type="vertical" height="24px" />
13
+ </div>`,
14
+ });
15
+
16
+ export const separatorStrengths = () => ({
17
+ components: { EcsSeparator },
18
+ template: `<div>
19
+ <ecs-separator strength="soft" :margin="20" />
20
+ <ecs-separator strength="medium" :margin="20" />
21
+ <ecs-separator strength="strong" :margin="20" />
22
+ </div>`,
23
+ });
24
+
25
+ export const separatorMargins = () => ({
26
+ components: { EcsSeparator },
27
+ template: `<div>
28
+ <ecs-separator :margin="20" />
29
+ <ecs-separator type="vertical" :margin="20" height="24px" />
30
+ <ecs-separator :margin="[20, 40]" />
31
+ <ecs-separator type="vertical" :margin="[8, 16, 12, 20]" height="24px" />
32
+ </div>`,
33
+ });