@enki-tek/fms-web-components 0.0.7 → 0.0.9

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.
@@ -6,7 +6,7 @@
6
6
  display: flex;
7
7
  flex-direction: column;
8
8
  align-items: flex-start;
9
- gap: 10px;
9
+ gap: 0 !important;
10
10
  flex: 1 0 0;
11
11
  border-radius: 10px;
12
12
  border: 1px dashed $white-cardicon;
@@ -31,6 +31,7 @@
31
31
  @extend %common-fontstyle;
32
32
  line-height: 40px;
33
33
  padding: 10px;
34
+ margin-top: 10px;
34
35
  }
35
36
 
36
37
  :global(.cardicon-main .card-title) {
@@ -50,7 +51,9 @@
50
51
  font-size: 13px;
51
52
  @extend %common-fontstyle;
52
53
  }
53
-
54
+ :global(.card-body-modifier) {
55
+ padding: 0 1rem;
56
+ }
54
57
  %common-fontstyle {
55
58
  font-family: $bodyFonts;
56
59
  font-style: normal;
@@ -90,6 +93,6 @@
90
93
  justify-content: end !important;
91
94
  }
92
95
 
93
- .top {
96
+ .left {
94
97
  justify-content: start !important;
95
98
  }
@@ -3,7 +3,7 @@ import { locationConfig, slotLocationConfig } from "./CardIconConfig";
3
3
  export let title = "Card title";
4
4
  export let name = "bell";
5
5
  export let location = "bottom-right";
6
- export let slotPosition = "top";
6
+ export let subtitlePosition = "left";
7
7
  export let cardbody = "";
8
8
  export let cardsubtitle = "";
9
9
  let locationStyle = [`custom-card-style`];
@@ -11,8 +11,8 @@ if (locationConfig.includes(location)) {
11
11
  locationStyle.push(location);
12
12
  }
13
13
  let slotLocation = [`cardicon-content`];
14
- if (slotLocationConfig.includes(slotPosition)) {
15
- slotLocation.push(slotPosition);
14
+ if (slotLocationConfig.includes(subtitlePosition)) {
15
+ slotLocation.push(subtitlePosition);
16
16
  }
17
17
  </script>
18
18
 
@@ -22,27 +22,31 @@ if (slotLocationConfig.includes(slotPosition)) {
22
22
  <Icon {name} />
23
23
  </div>
24
24
 
25
- <div class={slotLocation.join(' ')}>
26
- <slot name="cardsubtitle">
27
- {#if cardsubtitle}
28
- {cardsubtitle}
29
- {:else}
30
- <slot />
31
- {/if}
32
- </slot>
33
- </div>
34
-
35
- <CardBody>
36
- <div class="custom-body-slot">
37
- <slot name="cardbody">
38
- {#if cardbody}
39
- {cardbody}
25
+ {#if $$slots.cardsubtitle || cardsubtitle}
26
+ <div class={slotLocation.join(' ')}>
27
+ <slot name="cardsubtitle">
28
+ {#if cardsubtitle}
29
+ {cardsubtitle}
40
30
  {:else}
41
31
  <slot />
42
32
  {/if}
43
33
  </slot>
44
34
  </div>
45
- </CardBody>
35
+ {/if}
36
+
37
+ {#if $$slots.cardbody || cardbody}
38
+ <CardBody class="card-body-modifier">
39
+ <div class="custom-body-slot">
40
+ <slot name="cardbody">
41
+ {#if cardbody}
42
+ {cardbody}
43
+ {:else}
44
+ <slot />
45
+ {/if}
46
+ </slot>
47
+ </div>
48
+ </CardBody>
49
+ {/if}
46
50
  </Card>
47
51
 
48
52
  <style>@import url(https://fonts.googleapis.com/icon?family=Material+Icons);
@@ -57,7 +61,7 @@ if (slotLocationConfig.includes(slotPosition)) {
57
61
  display: flex;
58
62
  flex-direction: column;
59
63
  align-items: flex-start;
60
- gap: 10px;
64
+ gap: 0 !important;
61
65
  flex: 1 0 0;
62
66
  border-radius: 10px;
63
67
  border: 1px dashed #B8B8B8;
@@ -79,6 +83,7 @@ if (slotLocationConfig.includes(slotPosition)) {
79
83
  font-size: 30px;
80
84
  line-height: 40px;
81
85
  padding: 10px;
86
+ margin-top: 10px;
82
87
  }
83
88
  :global(.cardicon-main .card-title) {
84
89
  color: #000000;
@@ -93,6 +98,9 @@ if (slotLocationConfig.includes(slotPosition)) {
93
98
  color: #000000;
94
99
  font-size: 13px;
95
100
  }
101
+ :global(.card-body-modifier) {
102
+ padding: 0 1rem;
103
+ }
96
104
  .cardicon-content, :global(.cardicon-main .card-title), .custom-body-slot {
97
105
  font-family: Roboto;
98
106
  font-style: normal;
@@ -117,7 +125,7 @@ if (slotLocationConfig.includes(slotPosition)) {
117
125
  .right {
118
126
  justify-content: end !important;
119
127
  }
120
- .top {
128
+ .left {
121
129
  justify-content: start !important;
122
130
  }
123
131
  :global(.ebg-none) {
@@ -4,7 +4,7 @@ declare const __propDef: {
4
4
  title?: string | undefined;
5
5
  name?: string | undefined;
6
6
  location?: string | undefined;
7
- slotPosition?: string | undefined;
7
+ subtitlePosition?: string | undefined;
8
8
  cardbody?: string | undefined;
9
9
  cardsubtitle?: string | undefined;
10
10
  };
@@ -1,32 +1,32 @@
1
1
  @import '../variable.scss';
2
2
 
3
3
  :global(.inp-checkbox .form-check-input:checked) {
4
- background-color: $secondary;
5
- border-color: $secondary;
6
- border: 1.8px solid $secondary !important;
4
+ background-color: $secondary;
5
+ border-color: $secondary;
6
+ border: 1.8px solid $secondary !important;
7
7
  }
8
8
 
9
9
  :global(.inp-checkbox .form-check-input:focus) {
10
- border-color: $secondary;
11
- outline: 0;
12
- box-shadow: none;
10
+ border-color: $secondary;
11
+ outline: 0;
12
+ box-shadow: none;
13
13
  }
14
14
 
15
- :global(.inp-checkbox .form-check-input[type=checkbox]) {
16
- border-radius: 3px;
17
- border: 1.8px solid $gray-500;
15
+ :global(.inp-checkbox .form-check-input[type='checkbox']) {
16
+ border-radius: 3px;
17
+ border: 1.8px solid $gray-500;
18
18
  }
19
19
 
20
20
  :global(.inp-checkbox .form-check-input:disabled:not(:checked)) {
21
- background-color: $gray-300;
22
- border-color: $gray-600;
21
+ background-color: $gray-300;
22
+ border-color: $gray-600;
23
23
  }
24
24
 
25
25
  :global(.form-check-label) {
26
- text-transform: capitalize;
27
- font-family: $bodyFonts;
28
- font-style: normal;
29
- font-size: 16px;
30
- font-weight: 400;
31
- line-height: 28px;
32
- }
26
+ text-transform: capitalize;
27
+ font-family: $bodyFonts;
28
+ font-style: normal;
29
+ font-size: 16px;
30
+ font-weight: 400;
31
+ line-height: 28px;
32
+ }
@@ -1,51 +1,50 @@
1
1
  import Checkbox from './Checkbox.svelte';
2
2
 
3
- export default{
4
- title: 'FMS/Checkbox',
5
- component: Checkbox,
6
- tags:['autodocs'],
7
- argTypes:{
8
- label:{control:{type:'text'}},
9
- disable: { control: { type: 'text' } },
10
- enable: { control: { type: 'text' } },
11
- size: { control: { type: 'select'},options:['lg','md'] },
12
- value:{control:{type:'text'}}
13
- }
3
+ export default {
4
+ title: 'FMS/Checkbox',
5
+ component: Checkbox,
6
+ tags: ['autodocs'],
7
+ argTypes: {
8
+ label: { control: { type: 'text' } },
9
+ disable: { control: { type: 'text' } },
10
+ enable: { control: { type: 'text' } },
11
+ size: { control: { type: 'select' }, options: ['lg', 'md'] },
12
+ value: { control: { type: 'text' } }
13
+ }
14
14
  };
15
15
 
16
-
17
16
  export const Default = {
18
- args:{
19
- label:'clicked',
20
- disable:'false',
21
- enable:'false',
22
- value:'arun'
23
- }
24
- }
17
+ args: {
18
+ label: 'clicked',
19
+ disable: 'false',
20
+ enable: 'false',
21
+ value: 'arun'
22
+ }
23
+ };
25
24
 
26
25
  export const enabledCheckBox = {
27
- args:{
28
- label:'clicked',
29
- disable:'false',
30
- enable:'true',
31
- value:'arun'
32
- }
33
- }
26
+ args: {
27
+ label: 'clicked',
28
+ disable: 'false',
29
+ enable: 'true',
30
+ value: 'arun'
31
+ }
32
+ };
34
33
 
35
34
  export const enabledWithDisabledCheckBox = {
36
- args:{
37
- label:'clicked',
38
- disable:'true',
39
- enable:'true',
40
- value:'arun'
41
- }
42
- }
35
+ args: {
36
+ label: 'clicked',
37
+ disable: 'true',
38
+ enable: 'true',
39
+ value: 'arun'
40
+ }
41
+ };
43
42
 
44
43
  export const diabledButNotEnabledCheckBox = {
45
- args:{
46
- label:'clicked',
47
- disable:'true',
48
- enable:'false',
49
- value:'arun'
50
- }
51
- }
44
+ args: {
45
+ label: 'clicked',
46
+ disable: 'true',
47
+ enable: 'false',
48
+ value: 'arun'
49
+ }
50
+ };
@@ -1,24 +1,28 @@
1
1
  <script>
2
- import { Input } from 'sveltestrap';
2
+ import { Input } from 'sveltestrap';
3
3
 
4
- export let label='my'
5
- export let value = 'name'
6
- export let disable;
7
- export let enable ;
8
- export let size = 'lg';
9
-
10
- </script>
11
-
12
- <Input type="checkbox"
13
- class='inp-checkbox'
14
- bsSize={size}
15
- label={label}
16
- bind:value={value}
17
- checked={enable === 'true'? true : enable ==='false'? false : false }
18
- disabled={disable === 'true'? true : disable ==='false'? false : false}
19
- />
4
+ export let label = 'my';
5
+ export let value = 'name';
6
+ export let disable;
7
+ export let enable;
8
+ export let size = 'lg';
9
+ export let name = 'checkboxname';
10
+ export let valid;
11
+ </script>
20
12
 
21
- <style>@import url(https://fonts.googleapis.com/icon?family=Material+Icons);
13
+ <Input
14
+ type="checkbox"
15
+ class="inp-checkbox"
16
+ {name}
17
+ bsSize={size}
18
+ {label}
19
+ bind:value
20
+ valid={enable === 'true' ? true : enable === 'false' ? false : false}
21
+ checked={enable === 'true' ? true : enable === 'false' ? false : false}
22
+ disabled={disable === 'true' ? true : disable === 'false' ? false : false}
23
+ />
24
+
25
+ <style>@import url(https://fonts.googleapis.com/icon?family=Material+Icons);
22
26
  @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");
23
27
  @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");
24
28
  @import url(https://fonts.googleapis.com/icon?family=Material+Icons);
@@ -34,7 +38,7 @@
34
38
  outline: 0;
35
39
  box-shadow: none;
36
40
  }
37
- :global(.inp-checkbox .form-check-input[type=checkbox]) {
41
+ :global(.inp-checkbox .form-check-input[type="checkbox"]) {
38
42
  border-radius: 3px;
39
43
  border: 1.8px solid #adb5bd;
40
44
  }
@@ -611,4 +615,4 @@
611
615
  font-style: normal;
612
616
  font-weight: 400;
613
617
  line-height: normal;
614
- }</style>
618
+ }</style>
@@ -2,11 +2,13 @@
2
2
  /** @typedef {typeof __propDef.events} CheckboxEvents */
3
3
  /** @typedef {typeof __propDef.slots} CheckboxSlots */
4
4
  export default class Checkbox extends SvelteComponentTyped<{
5
+ valid: any;
5
6
  disable: any;
6
7
  enable: any;
7
8
  label?: string | undefined;
8
9
  size?: string | undefined;
9
10
  value?: string | undefined;
11
+ name?: string | undefined;
10
12
  }, {
11
13
  [evt: string]: CustomEvent<any>;
12
14
  }, {}> {
@@ -17,11 +19,13 @@ export type CheckboxSlots = typeof __propDef.slots;
17
19
  import { SvelteComponentTyped } from "svelte";
18
20
  declare const __propDef: {
19
21
  props: {
22
+ valid: any;
20
23
  disable: any;
21
24
  enable: any;
22
25
  label?: string | undefined;
23
26
  size?: string | undefined;
24
27
  value?: string | undefined;
28
+ name?: string | undefined;
25
29
  };
26
30
  events: {
27
31
  [evt: string]: CustomEvent<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enki-tek/fms-web-components",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "devDependencies": {
5
5
  "@storybook/addon-essentials": "^7.6.14",
6
6
  "@storybook/addon-interactions": "^7.6.14",