quasar-ui-sellmate-ui-kit 3.9.4 → 3.9.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quasar-ui-sellmate-ui-kit",
3
- "version": "3.9.4",
3
+ "version": "3.9.6",
4
4
  "author": "Sellmate Dev Team <dev@sellmate.co.kr>",
5
5
  "description": "Sellmate UI Kit",
6
6
  "license": "MIT",
@@ -0,0 +1,156 @@
1
+ <template>
2
+ <q-badge
3
+ class="s-tag"
4
+ :class="{
5
+ 's-tag__sm': size === 'sm',
6
+ 's-tag__md': size === 'md',
7
+ 's-tag__lg': size === 'lg',
8
+ 's-tag__rounded': rounded === true,
9
+ }"
10
+ :color="computedColor"
11
+ :text-color="computedTextColor"
12
+ >
13
+ <q-icon
14
+ v-if="$attrs.icon && size === 'lg'"
15
+ :name="$attrs.icon"
16
+ size="32px"
17
+ class="q-mr-sm"
18
+ />
19
+ <span v-html="label" :class="textClass"></span>
20
+ </q-badge>
21
+ </template>
22
+
23
+ <script>
24
+ import { defineComponent, computed } from 'vue';
25
+ import { QBadge, QIcon } from 'quasar';
26
+
27
+ const colorStatusList = {
28
+ Grey: {
29
+ color: 'Grey_Lighten-4',
30
+ textColor: 'Grey_Darken-1',
31
+ },
32
+ Red: {
33
+ color: 'Red_Lighten-6',
34
+ textColor: 'Red_Lighten-1',
35
+ },
36
+ Orange: {
37
+ color: 'Orange_Lighten-6',
38
+ textColor: 'Orange_Default',
39
+ },
40
+ Yellow: {
41
+ color: 'Yellow_Lighten-5',
42
+ textColor: 'Yellow_Darken-2',
43
+ },
44
+ Green: {
45
+ color: 'Green_Lighten-6',
46
+ textColor: 'Green_Lighten-1',
47
+ },
48
+ Blue: {
49
+ color: 'Blue_C_Lighten-6',
50
+ textColor: 'positive',
51
+ },
52
+ Darkblue: {
53
+ color: 'Blue_B_Lighten-6',
54
+ textColor: 'Blue_B_Lighten-1',
55
+ },
56
+ Indigo: {
57
+ color: 'Blue_C_Lighten-7',
58
+ textColor: 'Blue_C_Darken-2',
59
+ },
60
+ };
61
+
62
+ export default defineComponent({
63
+ name: 'STag',
64
+ components: { QBadge, QIcon },
65
+ props: {
66
+ label: String,
67
+ size: {
68
+ /**
69
+ * @type {'sm' | 'md' | 'lg'} type
70
+ */
71
+ type: String,
72
+ default: 'md',
73
+ },
74
+ color: {
75
+ type: String,
76
+ default: 'Blue_C_Lighten-6',
77
+ },
78
+ textColor: {
79
+ type: String,
80
+ default: 'positive',
81
+ },
82
+ colorStatus: {
83
+ /**
84
+ * @type {'Grey' | 'Red' | 'Orange' | 'Yellow' | 'Green' | 'Blue' | 'Darkblue' | 'Indigo'} type
85
+ */
86
+ type: String,
87
+ default: '',
88
+ },
89
+ textClass: {
90
+ type: String,
91
+ default: '',
92
+ },
93
+ rounded: {
94
+ type: Boolean,
95
+ default: false,
96
+ },
97
+ },
98
+ setup(props) {
99
+ const computedColor = computed(() =>
100
+ props.colorStatus ? colorStatusList[props.colorStatus].color : props.color,
101
+ );
102
+
103
+ const computedTextColor = computed(() =>
104
+ props.colorStatus ? colorStatusList[props.colorStatus].textColor : props.textColor,
105
+ );
106
+ return {
107
+ colorStatusList,
108
+ computedColor,
109
+ computedTextColor,
110
+ };
111
+ },
112
+ });
113
+ </script>
114
+
115
+ <style scoped lang="scss">
116
+ .s-tag {
117
+ border-radius: 4px;
118
+ box-sizing: border-box;
119
+ &__sm {
120
+ padding: 1px 6px;
121
+ height: 20px;
122
+ > span {
123
+ line-height: 18px;
124
+ font: {
125
+ size: 11px;
126
+ weight: 400;
127
+ }
128
+ }
129
+ }
130
+ &__md {
131
+ padding: 2px 8px;
132
+ height: 24px;
133
+ > span {
134
+ line-height: 20px;
135
+ font: {
136
+ size: 12px;
137
+ weight: 700;
138
+ }
139
+ }
140
+ }
141
+ &__lg {
142
+ padding: 4px 16px;
143
+ height: 48px;
144
+ > span {
145
+ line-height: 40px;
146
+ font: {
147
+ size: 24px;
148
+ weight: 700;
149
+ }
150
+ }
151
+ }
152
+ &__rounded {
153
+ border-radius: 20px;
154
+ }
155
+ }
156
+ </style>
@@ -32,7 +32,7 @@ $Orange_Lighten-2: #ffa452;
32
32
  $Orange_Lighten-3: #ffbb96;
33
33
  $Orange_Lighten-4: #ffbc81;
34
34
  $Orange_Lighten-5: #ffd5af;
35
- $Orange_Lighten-6: #ffead7;
35
+ $Orange_Lighten-6: #fef1ea;
36
36
 
37
37
  $Header_Alert: #ff7a00; // header alert
38
38
 
@@ -68,7 +68,7 @@ $Green_Darken-3: #00461c;
68
68
  $Green_Darken-2: #006629;
69
69
  $Green_Darken-1: #007b31;
70
70
  $Green_Default: #00973c;
71
- $Green_Lighten-1: #01BB4B;
71
+ $Green_Lighten-1: #01bb4b;
72
72
  $Green_Lighten-2: #05d358;
73
73
  $Green_Lighten-3: #3ee882;
74
74
  $Green_Lighten-4: #87edb0;
@@ -149,7 +149,6 @@ $button-with-icon-padding-xs: 2px 12px 2px 10px !important;
149
149
  $button-with-icon-padding-sm: 4px 12px 4px 10px !important;
150
150
  $button-with-icon-padding-md: 4px 20px 4px 16px !important;
151
151
 
152
-
153
152
  // 12px 기준
154
153
  $default-font: 12px;
155
154
  $default-font-weight: 400;
package/src/vue-plugin.js CHANGED
@@ -40,6 +40,7 @@ import SDateAutoRangePicker from './components/SDateAutoRangePicker.vue';
40
40
  import SYearMonthPicker from './components/SYearMonthPicker.vue';
41
41
  import Directive from './directives/Directive';
42
42
  import SBadge from './components/SBadge.vue';
43
+ import STag from './components/STag.vue';
43
44
 
44
45
  const version = __UI_VERSION__;
45
46
 
@@ -75,6 +76,7 @@ function install(app) {
75
76
  app.component('s-tabs', STabs);
76
77
  app.component('s-table', STable);
77
78
  app.component('s-time-picker', STimePicker);
79
+ app.component('s-tag', STag);
78
80
  app.component('s-date-time-picker', SDateTimePicker);
79
81
  app.component('s-toggle', SToggle);
80
82
  app.component('s-tooltip', STooltip);