@anmed/mui-selection 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,7 +7,7 @@ export let keyCode = 'value';
7
7
  export let keyText = 'text';
8
8
  export let convertText;
9
9
  export let label;
10
- export let readOnly = false;
10
+ export let readonly = false;
11
11
  export let required = false;
12
12
  export let error;
13
13
  export let options;
@@ -26,7 +26,7 @@ const getDisplayText = (item) => {
26
26
  return text;
27
27
  };
28
28
  const onCardItemClick = (item) => {
29
- if (!readOnly) {
29
+ if (!readonly) {
30
30
  value = item;
31
31
  }
32
32
  };
@@ -41,7 +41,7 @@ $: {
41
41
  }
42
42
  $: above = focused || displayText.toString().length != 0 || isCardSelection;
43
43
  const handlerClick = () => {
44
- if (!readOnly && !isCardSelection) {
44
+ if (!readonly && !isCardSelection) {
45
45
  dispatcher('action', value);
46
46
  }
47
47
  };
@@ -60,9 +60,13 @@ const handlerClick = () => {
60
60
  </CommonField>
61
61
  {:else }
62
62
  <CommonField {label} {required} bind:focused {above} {error}>
63
- <span class="mui-select-field-text">{displayText}</span>
64
- <div slot="trailing-icon">
65
- <span class="triangle-down"></span>
63
+ <span class="mui-field-text">{displayText}</span>
64
+ <div slot="trailing-icon" class="mui-field-trailing-icon">
65
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
66
+ <g id="Frame">
67
+ <path id="Vector" d="M7.0835 5L12.0835 10L7.0835 15" stroke="#333333" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
68
+ </g>
69
+ </svg>
66
70
  </div>
67
71
  </CommonField>
68
72
  {/if}
@@ -7,7 +7,7 @@ declare const __propDef: {
7
7
  keyText?: string | undefined;
8
8
  convertText: (item: any) => string;
9
9
  label: string | null;
10
- readOnly?: boolean | undefined;
10
+ readonly?: boolean | undefined;
11
11
  required?: boolean | undefined;
12
12
  error: any;
13
13
  options: any;
@@ -1,4 +1,3 @@
1
- @charset "UTF-8";
2
1
  * {
3
2
  margin: 0;
4
3
  padding: 0;
@@ -57,17 +56,6 @@ li {
57
56
  text-align: center;
58
57
  }
59
58
 
60
- /*CSS小三角*/
61
- span.triangle-down {
62
- display: inline-block;
63
- width: 0;
64
- height: 0;
65
- margin: auto;
66
- border-left: 5px solid transparent;
67
- border-right: 5px solid transparent;
68
- border-top: 5px solid #666;
69
- }
70
-
71
59
  .mui-select-field-text {
72
60
  color: var(mui-select-field-text-color, #999);
73
61
  font-size: var(mui-select-field-text-font-size, 16px);
@@ -107,6 +95,9 @@ span.triangle-down {
107
95
  .card-select-box {
108
96
  display: flex;
109
97
  justify-content: space-around;
98
+ padding: 0 12px;
99
+ text-align: center;
100
+ height: 30px;
110
101
  }
111
102
  .card-select-box .select-item-base, .card-select-box .card-select-item-selected, .card-select-box .card-select-item-normal {
112
103
  width: 100%;
@@ -56,17 +56,6 @@ li {
56
56
  text-align: center;
57
57
  }
58
58
 
59
- /*CSS小三角*/
60
- span.triangle-down {
61
- display: inline-block;
62
- width: 0;
63
- height: 0;
64
- margin: auto;
65
- border-left: 5px solid transparent;
66
- border-right: 5px solid transparent;
67
- border-top: 5px solid #666;
68
- }
69
-
70
59
  .mui-select-field-text {
71
60
  color: var(mui-select-field-text-color, #999);
72
61
  font-size: var(mui-select-field-text-font-size, 16px);;
@@ -107,6 +96,9 @@ span.triangle-down {
107
96
  .card-select-box {
108
97
  display: flex;
109
98
  justify-content: space-around;
99
+ padding: 0 12px;
100
+ text-align: center;
101
+ height: 30px;
110
102
 
111
103
  .select-item-base {
112
104
  width: 100%;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anmed/mui-selection",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "index.js",