@enki-tek/fms-web-components 0.0.4 → 0.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 (30) hide show
  1. package/components/Accordion/Accordion.stories.d.ts +16 -6
  2. package/components/Accordion/Accordion.stories.js +5 -7
  3. package/components/Badge/Badge.stories.d.ts +1 -0
  4. package/components/Badge/Badge.stories.js +36 -35
  5. package/components/Badge/Badge.svelte +3 -4
  6. package/components/Breadcrumb/Breadcrumb.stories.js +1 -1
  7. package/components/Button/Button.scss +8 -1
  8. package/components/Button/Button.svelte +9 -3
  9. package/components/Button/Button.svelte.d.ts +4 -0
  10. package/components/Card/Card.stories.d.ts +1 -0
  11. package/components/Card/Card.stories.js +1 -0
  12. package/components/CardIcon/CardIcon.scss +95 -0
  13. package/components/CardIcon/CardIcon.stories.d.ts +129 -0
  14. package/components/CardIcon/CardIcon.stories.js +77 -0
  15. package/components/CardIcon/CardIcon.svelte +684 -0
  16. package/components/CardIcon/CardIcon.svelte.d.ts +25 -0
  17. package/components/CardIcon/CardIconConfig.d.ts +2 -0
  18. package/components/CardIcon/CardIconConfig.js +2 -0
  19. package/components/CheckBox/Checkbox.svelte.d.ts +2 -2
  20. package/components/ModalWindow/Modal.stories.d.ts +3 -0
  21. package/components/ModalWindow/Modal.stories.js +3 -0
  22. package/components/ModalWindow/Modal.svelte +11 -3
  23. package/components/ModalWindow/Modal.svelte.d.ts +3 -0
  24. package/components/Sidebar/Sidebar.scss +22 -19
  25. package/components/Sidebar/Sidebar.svelte +19 -20
  26. package/components/Table/Table.stories.d.ts +1 -0
  27. package/components/Table/Table.stories.js +1 -0
  28. package/components/textField/TextField.svelte.d.ts +2 -2
  29. package/components/variable.scss +4 -0
  30. package/package.json +5 -1
@@ -1,6 +1,7 @@
1
1
  declare namespace _default {
2
2
  export const title: string;
3
3
  export { Modal as component };
4
+ export const tags: string[];
4
5
  export namespace argTypes {
5
6
  namespace content {
6
7
  const control: string;
@@ -22,6 +23,8 @@ export namespace Default {
22
23
  export { content_1 as content };
23
24
  const header_1: string;
24
25
  export { header_1 as header };
26
+ export const closeBtn: string;
27
+ export const saveBtn: string;
25
28
  const open_1: boolean;
26
29
  export { open_1 as open };
27
30
  }
@@ -3,6 +3,7 @@ import Modal from './Modal.svelte';
3
3
  export default {
4
4
  title: 'FMS/Modal',
5
5
  component: Modal,
6
+ tags: ['autodocs'],
6
7
  argTypes: {
7
8
  content: { control: 'text' },
8
9
  header: { control: 'text' },
@@ -14,6 +15,8 @@ export const Default = {
14
15
  args: {
15
16
  content: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
16
17
  header: 'Modal Title',
18
+ closeBtn:"Close",
19
+ saveBtn:"Save Changes",
17
20
  open: true,
18
21
  }
19
22
  };
@@ -3,7 +3,9 @@ import { Modal, ModalBody, ModalFooter, ModalHeader } from "sveltestrap";
3
3
  import Icon from "../Icon/Icon.svelte";
4
4
  export let content = "";
5
5
  export let header = "";
6
- export let open = true;
6
+ export let closeBtn = "";
7
+ export let saveBtn = "";
8
+ export let open = false;
7
9
  export let toggle = () => open = !open;
8
10
  </script>
9
11
 
@@ -38,8 +40,14 @@ export let toggle = () => open = !open;
38
40
  </div>
39
41
  </ModalBody>
40
42
  <ModalFooter>
41
- <Button config="secondaryOutlineBtnMedium" on:click={toggle}>Close</Button>
42
- <Button config="successBtnMedium" on:click={toggle}>Save changes</Button>
43
+ <slot name="footer">
44
+ {#if closeBtn || saveBtn}
45
+ <Button config="secondaryOutlineBtnMedium" on:click={toggle}>{closeBtn}</Button>
46
+ <Button config="successBtnMedium" on:click={toggle}>{saveBtn}</Button>
47
+ {:else}
48
+ <slot />
49
+ {/if}
50
+ </slot>
43
51
  </ModalFooter>
44
52
  </Modal>
45
53
  </div>
@@ -3,6 +3,8 @@ declare const __propDef: {
3
3
  props: {
4
4
  content?: string | undefined;
5
5
  header?: string | undefined;
6
+ closeBtn?: string | undefined;
7
+ saveBtn?: string | undefined;
6
8
  open?: boolean | undefined;
7
9
  toggle?: (() => boolean) | undefined;
8
10
  };
@@ -13,6 +15,7 @@ declare const __propDef: {
13
15
  header: {};
14
16
  content: {};
15
17
  default: {};
18
+ footer: {};
16
19
  };
17
20
  };
18
21
  export type ModalProps = typeof __propDef.props;
@@ -5,6 +5,10 @@
5
5
  color: $white;
6
6
  }
7
7
 
8
+ %commom-background-line {
9
+ background: $white;
10
+ }
11
+
8
12
  %sidebar-styles {
9
13
  background: $primary-dark;
10
14
  }
@@ -14,8 +18,15 @@
14
18
  background: $blue-700;
15
19
  }
16
20
 
21
+ %common-li-styles {
22
+ display: flex;
23
+ padding: 15px 32px;
24
+ align-items: center;
25
+ gap: 8px;
26
+ }
27
+
17
28
  .row {
18
- --bs-gutter-x: 1rem;
29
+ --bs-gutter-x: 0rem;
19
30
  }
20
31
 
21
32
  .icon-sidebar {
@@ -30,24 +41,22 @@
30
41
  .line {
31
42
  width: 88px;
32
43
  height: 1px;
33
- background: $white;
34
- margin-left: -7px;
44
+ @extend %commom-background-line;
35
45
  }
36
46
 
37
47
  .icon-btn {
38
- padding: 20px;
48
+ padding: 20px 27px;
39
49
  }
40
50
 
41
51
  .icon-sidebar-content .toggle-button {
42
52
  @extend %common-styles;
43
53
  }
44
54
 
45
- .icon-sidebar-content ul {
46
- display: flex;
47
- align-items: center;
48
- padding: 20px;
55
+ .icon-sidebar-content ul li {
49
56
  @extend %common-styles;
50
- gap: 32px;
57
+ @extend %common-li-styles;
58
+ padding: 16px 32px;
59
+
51
60
  }
52
61
 
53
62
  .icon-sidebar-content ul .active {
@@ -71,11 +80,7 @@ ul {
71
80
  }
72
81
 
73
82
  .nav-item {
74
- display: flex;
75
- width: 274px;
76
- padding: 15px 32px;
77
- align-items: center;
78
- gap: 8px;
83
+ @extend %common-li-styles;
79
84
  }
80
85
 
81
86
  .nav-item .item-name {
@@ -93,7 +98,7 @@ ul {
93
98
  }
94
99
 
95
100
  .material-icons {
96
- font-size: 24px;
101
+ font-size: 16px;
97
102
  color: $white;
98
103
  }
99
104
 
@@ -109,7 +114,5 @@ ul {
109
114
  .line-open {
110
115
  width: 274px;
111
116
  height: 1px;
112
- @extend %common-styles;
113
- }
114
-
115
-
117
+ @extend %commom-background-line;
118
+ }
@@ -54,8 +54,10 @@
54
54
  data-bs-dismiss="offcanvas"
55
55
  aria-label="Close"
56
56
  on:click={() => (isOpen = false)}
57
- >
58
- <span class="material-icons">{'keyboard_double_arrow_left'}</span>
57
+ >
58
+ <span class="material-icons">
59
+ <Icon iconName='chevron-double-left'/>
60
+ </span>
59
61
  </button>
60
62
  </div>
61
63
  <div class="line-open" />
@@ -84,9 +86,12 @@
84
86
  @import url(https://fonts.googleapis.com/icon?family=Material+Icons);
85
87
  @import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");
86
88
  @import url("https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&display=swap");
87
- .line-open, ul, .icon-sidebar-content ul, .icon-sidebar-content .toggle-button {
89
+ ul, .icon-sidebar-content ul li, .icon-sidebar-content .toggle-button {
88
90
  color: #ffffff;
89
91
  }
92
+ .line-open, .line {
93
+ background: #ffffff;
94
+ }
90
95
  :global(.offcanvas-body) {
91
96
  background: #007FD8;
92
97
  }
@@ -94,8 +99,14 @@
94
99
  border-left: 2px solid #ffffff;
95
100
  background: #084298;
96
101
  }
102
+ .nav-item, .icon-sidebar-content ul li {
103
+ display: flex;
104
+ padding: 15px 32px;
105
+ align-items: center;
106
+ gap: 8px;
107
+ }
97
108
  .row {
98
- --bs-gutter-x: 1rem;
109
+ --bs-gutter-x: 0rem;
99
110
  }
100
111
  .icon-sidebar {
101
112
  position: fixed;
@@ -108,17 +119,12 @@
108
119
  .line {
109
120
  width: 88px;
110
121
  height: 1px;
111
- background: #ffffff;
112
- margin-left: -7px;
113
122
  }
114
123
  .icon-btn {
115
- padding: 20px;
124
+ padding: 20px 27px;
116
125
  }
117
- .icon-sidebar-content ul {
118
- display: flex;
119
- align-items: center;
120
- padding: 20px;
121
- gap: 32px;
126
+ .icon-sidebar-content ul li {
127
+ padding: 16px 32px;
122
128
  }
123
129
  :global(.offcanvas-body) {
124
130
  padding: 0rem 0rem;
@@ -127,13 +133,6 @@
127
133
  color: #ffffff;
128
134
  font-size: 28px;
129
135
  }
130
- .nav-item {
131
- display: flex;
132
- width: 274px;
133
- padding: 15px 32px;
134
- align-items: center;
135
- gap: 8px;
136
- }
137
136
  .nav-item .item-name {
138
137
  line-height: 22px;
139
138
  }
@@ -143,7 +142,7 @@
143
142
  cursor: pointer;
144
143
  }
145
144
  .material-icons {
146
- font-size: 24px;
145
+ font-size: 16px;
147
146
  color: #ffffff;
148
147
  }
149
148
  :global(.offcanvas.offcanvas-start) {
@@ -1,6 +1,7 @@
1
1
  declare namespace _default {
2
2
  export const title: string;
3
3
  export { Table as component };
4
+ export const tags: string[];
4
5
  export namespace argTypes {
5
6
  namespace header {
6
7
  const control: string;
@@ -2,6 +2,7 @@ import Table from './Table.svelte';
2
2
  export default {
3
3
  title: 'FMS/Table',
4
4
  component: Table,
5
+ tags:['autodocs'],
5
6
  argTypes: {
6
7
  header: { control: 'array' },
7
8
  tableData: { control: 'array' },
@@ -2,11 +2,11 @@
2
2
  /** @typedef {typeof __propDef.events} TextFieldEvents */
3
3
  /** @typedef {typeof __propDef.slots} TextFieldSlots */
4
4
  export default class TextField extends SvelteComponentTyped<{
5
+ disabled?: boolean | undefined;
5
6
  invalid?: boolean | undefined;
6
7
  type?: string | undefined;
7
8
  placeholder?: string | undefined;
8
9
  value?: string | undefined;
9
- disabled?: boolean | undefined;
10
10
  valid?: boolean | undefined;
11
11
  }, {
12
12
  [evt: string]: CustomEvent<any>;
@@ -18,11 +18,11 @@ export type TextFieldSlots = typeof __propDef.slots;
18
18
  import { SvelteComponentTyped } from "svelte";
19
19
  declare const __propDef: {
20
20
  props: {
21
+ disabled?: boolean | undefined;
21
22
  invalid?: boolean | undefined;
22
23
  type?: string | undefined;
23
24
  placeholder?: string | undefined;
24
25
  value?: string | undefined;
25
- disabled?: boolean | undefined;
26
26
  valid?: boolean | undefined;
27
27
  };
28
28
  events: {
@@ -96,6 +96,10 @@ $blue-500: rgba(13, 110, 253, 1);
96
96
 
97
97
  $Title-Color: #152536;
98
98
 
99
+ // cardicon color private
100
+ $gray-cardicon:#444;
101
+ $white-cardicon:#B8B8B8;
102
+
99
103
  $box-shadow-green: rgba(11, 235, 49, 0.25);
100
104
  //Button sizes
101
105
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enki-tek/fms-web-components",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "devDependencies": {
5
5
  "@storybook/addon-essentials": "^7.6.14",
6
6
  "@storybook/addon-interactions": "^7.6.14",
@@ -63,6 +63,10 @@
63
63
  "./components/Card/Card.scss": "./components/Card/Card.scss",
64
64
  "./components/Card/Card.stories": "./components/Card/Card.stories.js",
65
65
  "./components/Card/Card.svelte": "./components/Card/Card.svelte",
66
+ "./components/CardIcon/CardIcon.scss": "./components/CardIcon/CardIcon.scss",
67
+ "./components/CardIcon/CardIcon.stories": "./components/CardIcon/CardIcon.stories.js",
68
+ "./components/CardIcon/CardIcon.svelte": "./components/CardIcon/CardIcon.svelte",
69
+ "./components/CardIcon/CardIconConfig": "./components/CardIcon/CardIconConfig.js",
66
70
  "./components/CheckBox/Checkbox.scss": "./components/CheckBox/Checkbox.scss",
67
71
  "./components/CheckBox/Checkbox.stories": "./components/CheckBox/Checkbox.stories.js",
68
72
  "./components/CheckBox/Checkbox.svelte": "./components/CheckBox/Checkbox.svelte",