quasar-ui-sellmate-ui-kit 3.0.3 → 3.0.4

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 (67) hide show
  1. package/.prettierrc +25 -25
  2. package/README.md +156 -156
  3. package/dist/index.common.js +2 -2
  4. package/dist/index.css +1 -1
  5. package/dist/index.esm.js +2 -2
  6. package/dist/index.min.css +1 -1
  7. package/dist/index.rtl.css +1 -1
  8. package/dist/index.rtl.min.css +1 -1
  9. package/dist/index.umd.js +3826 -3826
  10. package/dist/index.umd.min.js +2 -2
  11. package/package.json +83 -83
  12. package/src/assets/icons.js +28 -28
  13. package/src/components/SBreadcrumbs.vue +55 -55
  14. package/src/components/SButton.vue +206 -206
  15. package/src/components/SButtonGroup.vue +41 -41
  16. package/src/components/SButtonToggle.vue +200 -200
  17. package/src/components/SCaution.vue +102 -102
  18. package/src/components/SCheckbox.vue +123 -123
  19. package/src/components/SChip.vue +99 -99
  20. package/src/components/SDate.vue +717 -717
  21. package/src/components/SDateAutoRangePicker.vue +341 -341
  22. package/src/components/SDatePicker.vue +472 -472
  23. package/src/components/SDateRange.vue +470 -470
  24. package/src/components/SDateRangePicker.vue +660 -660
  25. package/src/components/SDateTimePicker.vue +349 -349
  26. package/src/components/SDialog.vue +250 -250
  27. package/src/components/SDropdown.vue +216 -216
  28. package/src/components/SEditor.vue +490 -490
  29. package/src/components/SFilePicker.vue +207 -207
  30. package/src/components/SHelp.vue +146 -146
  31. package/src/components/SInput.vue +343 -343
  32. package/src/components/SInputCounter.vue +46 -46
  33. package/src/components/SInputNumber.vue +179 -179
  34. package/src/components/SList.vue +29 -29
  35. package/src/components/SMarkupTable.vue +141 -141
  36. package/src/components/SPagination.vue +266 -266
  37. package/src/components/SRadio.vue +78 -78
  38. package/src/components/SRouteTab.vue +67 -67
  39. package/src/components/SSelect.vue +294 -294
  40. package/src/components/SSelectCheckbox.vue +222 -222
  41. package/src/components/SSelectCustom.vue +189 -189
  42. package/src/components/SSelectGroupCheckbox.vue +235 -235
  43. package/src/components/SSelectSearch.vue +261 -261
  44. package/src/components/SSelectSearchAutoComplete.vue +172 -172
  45. package/src/components/SSelectSearchCheckbox.vue +356 -356
  46. package/src/components/SStringToInput.vue +66 -66
  47. package/src/components/STab.vue +77 -77
  48. package/src/components/STable.vue +425 -425
  49. package/src/components/STableTree.vue +210 -210
  50. package/src/components/STabs.vue +32 -32
  51. package/src/components/STimePicker.vue +159 -159
  52. package/src/components/SToggle.vue +68 -68
  53. package/src/components/STooltip.vue +209 -209
  54. package/src/components/SelelctItem.vue +21 -21
  55. package/src/components/TimePickerCard.vue +352 -352
  56. package/src/composables/date.js +11 -11
  57. package/src/composables/modelBinder.js +13 -13
  58. package/src/composables/table/use-navigator.js +110 -110
  59. package/src/composables/table/use-resizable.js +80 -80
  60. package/src/css/app.scss +90 -90
  61. package/src/css/default.scss +875 -875
  62. package/src/css/extends.scss +154 -154
  63. package/src/css/quasar.variables.scss +189 -189
  64. package/src/directives/Directive.js +7 -7
  65. package/src/index.scss +3 -3
  66. package/src/vue-plugin.js +91 -91
  67. package/tsconfig.json +35 -35
@@ -1,235 +1,235 @@
1
- <template>
2
- <q-select
3
- outlined
4
- dense
5
- options-dense
6
- :dropdown-icon="selectDownArrowIcon"
7
- v-model="model"
8
- :options="options"
9
- multiple
10
- emit-value
11
- map-options
12
- color="positive"
13
- :popup-content-class="['s-select-group-checkbox-opts', popupContentClass].join(' ')"
14
- class="s-select-checkbox"
15
- :option-label="optionLabel"
16
- :option-value="optionValue"
17
- :option-group="optionGroup"
18
- @add="onAddChecked"
19
- @remove="onRemoveChecked"
20
- :menu-offset="[0, 4]"
21
- menu-self="top left"
22
- menu-anchor="bottom start"
23
- no-error-icon
24
- hide-bottom-space
25
- ref="sSelectRef"
26
- >
27
- <template v-slot:option="{ itemProps, opt, selected, toggleOption }">
28
- <q-item v-bind="itemProps" class="flex column grouping-opt">
29
- <q-item-section class="s-px-sm s-py-xxs row justify-start text-Grey_Darken-4 group-title">
30
- <s-checkbox
31
- class="s-mr-xs"
32
- :modelValue="selected"
33
- @update:modelValue="toggleOption(opt.optionLabel)"
34
- />
35
- {{ opt[optionLabel] }}
36
- </q-item-section>
37
- <template v-for="groupOpt in opt.options" :key="groupOpt.optionValue">
38
- <q-item-section class="group-content full-width">
39
- <s-checkbox
40
- class="s-mr-xs"
41
- :modelValue="selected"
42
- @update:modelValue="toggleOption(opt.optionLabel)"
43
- />
44
- <q-img
45
- class="q-pa-none inline-block bg-Grey_Lighten-5
46
- s-border-Grey_Lighten-7 s-border-radius-xxs q-mr-sm"
47
- :src="groupOpt.logo"
48
- width="60px"
49
- height="22px"
50
- v-if="groupOpt.logo"
51
- />
52
- {{ groupOpt[optionLabel] }}
53
- </q-item-section>
54
- </template>
55
- </q-item>
56
- </template>
57
- <template
58
- v-if="useAll && model.length === options.filter(v => !v.category).length"
59
- v-slot:selected
60
- >
61
- <div>
62
- {{ allPlaceholder }}
63
- </div>
64
- </template>
65
- </q-select>
66
- </template>
67
-
68
- <script>
69
- import { defineComponent, onBeforeMount, ref, nextTick, watch } from 'vue';
70
- import { QSelect, QItem, QItemSection, QImg } from 'quasar';
71
- import { selectDownArrowIcon } from '../assets/icons.js';
72
-
73
- export default defineComponent({
74
- name: 'SSelectGroupCheckbox',
75
- emits: ['update:modelValue'],
76
- components: {
77
- QSelect,
78
- QItem,
79
- QItemSection,
80
- QImg,
81
- },
82
- props: {
83
- options: {
84
- type: Array,
85
- required: true,
86
- },
87
- modelValue: {
88
- type: Array,
89
- required: true,
90
- },
91
- optionLabel: {
92
- type: [String, Function],
93
- default: 'label',
94
- },
95
- optionValue: {
96
- type: String,
97
- default: 'value',
98
- },
99
- optionGroup: {
100
- type: String,
101
- default: 'group',
102
- },
103
- useAll: {
104
- type: Boolean,
105
- default: false,
106
- },
107
- allPlaceholder: {
108
- type: String,
109
- default: '전체',
110
- },
111
- popupContentClass: {
112
- default: () => '',
113
- type: String,
114
- },
115
- },
116
- // TODO: 기능 미완성
117
- setup(props, { emit }) {
118
- const model = ref(props.modelValue);
119
- function onRemoveChecked(detail) {
120
- const idx = model.value.findIndex(v => v[props.optionValue] === '');
121
- if ([detail.value[props.optionValue]].includes('all')) {
122
- nextTick(() => {
123
- model.value = [];
124
- });
125
- return;
126
- }
127
- if (detail.value[props.optionValue] === '') {
128
- nextTick(() => {
129
- model.value = [];
130
- });
131
- } else if (idx >= 0) {
132
- nextTick(() => {
133
- model.value.splice(idx, 1);
134
- });
135
- }
136
- }
137
- function onAddChecked(detail) {
138
- if (detail.value === '') {
139
- nextTick(() => {
140
- model.value = props.options;
141
- });
142
- } else {
143
- nextTick(() => {
144
- if (model.value.length === props.options.length - 1) {
145
- model.value = props.options;
146
- }
147
- });
148
- }
149
- }
150
-
151
- watch(
152
- () => props.modelValue,
153
- () => {
154
- model.value = props.modelValue;
155
- },
156
- );
157
- watch(model, () => {
158
- emit('update:modelValue', model.value);
159
- });
160
-
161
- onBeforeMount(() => {
162
- if (props.useAll && model.value.length === 1 && !props.modelValue[0].value) {
163
- model.value = props.options.filter(v => !v.category);
164
- }
165
- });
166
-
167
- return {
168
- model,
169
- selectDownArrowIcon,
170
- onRemoveChecked,
171
- onAddChecked,
172
- sSelectRef: ref(null),
173
- };
174
- },
175
- });
176
- </script>
177
-
178
- <style lang="scss">
179
- @import '../css/quasar.variables.scss';
180
- @import '../css/extends.scss';
181
-
182
- .s-select-checkbox {
183
- @extend %select;
184
- .q-field__native {
185
- display: block;
186
- min-height: 0;
187
- height: $default-height;
188
- width: 100%;
189
- padding: $select-padding !important;
190
- color: $Grey_Darken-4;
191
- white-space: nowrap;
192
- overflow: hidden;
193
- text-overflow: ellipsis;
194
- > span {
195
- max-height: $default-height;
196
- }
197
- > .s-checkbox {
198
- margin-right: $default-icon-margin;
199
- }
200
- }
201
- }
202
-
203
- .s-select-group-checkbox-opts {
204
- @extend %select-menu-list;
205
- > .q-virtual-scroll__content {
206
- > .q-item.grouping-opt {
207
- border: none;
208
- color: $Grey_Darken-4 !important;
209
- opacity: 1 !important;
210
- height: auto;
211
- padding: 0;
212
- background-color: white;
213
- > .group-title,
214
- .group-content {
215
- flex-direction: row !important;
216
- justify-content: flex-start !important;
217
- > .s-checkbox {
218
- margin-right: 10px;
219
- }
220
- }
221
- > .group-title {
222
- background-color: $Grey_Lighten-5;
223
- border-top: 1px solid $Grey_Lighten-3 !important;
224
- &:first-of-type {
225
- border-top: none !important;
226
- }
227
- }
228
- > .group-content {
229
- margin: 0;
230
- padding: 4px 12px 4px 16px;
231
- }
232
- }
233
- }
234
- }
235
- </style>
1
+ <template>
2
+ <q-select
3
+ outlined
4
+ dense
5
+ options-dense
6
+ :dropdown-icon="selectDownArrowIcon"
7
+ v-model="model"
8
+ :options="options"
9
+ multiple
10
+ emit-value
11
+ map-options
12
+ color="positive"
13
+ :popup-content-class="['s-select-group-checkbox-opts', popupContentClass].join(' ')"
14
+ class="s-select-checkbox"
15
+ :option-label="optionLabel"
16
+ :option-value="optionValue"
17
+ :option-group="optionGroup"
18
+ @add="onAddChecked"
19
+ @remove="onRemoveChecked"
20
+ :menu-offset="[0, 4]"
21
+ menu-self="top left"
22
+ menu-anchor="bottom start"
23
+ no-error-icon
24
+ hide-bottom-space
25
+ ref="sSelectRef"
26
+ >
27
+ <template v-slot:option="{ itemProps, opt, selected, toggleOption }">
28
+ <q-item v-bind="itemProps" class="flex column grouping-opt">
29
+ <q-item-section class="s-px-sm s-py-xxs row justify-start text-Grey_Darken-4 group-title">
30
+ <s-checkbox
31
+ class="s-mr-xs"
32
+ :modelValue="selected"
33
+ @update:modelValue="toggleOption(opt.optionLabel)"
34
+ />
35
+ {{ opt[optionLabel] }}
36
+ </q-item-section>
37
+ <template v-for="groupOpt in opt.options" :key="groupOpt.optionValue">
38
+ <q-item-section class="group-content full-width">
39
+ <s-checkbox
40
+ class="s-mr-xs"
41
+ :modelValue="selected"
42
+ @update:modelValue="toggleOption(opt.optionLabel)"
43
+ />
44
+ <q-img
45
+ class="q-pa-none inline-block bg-Grey_Lighten-5
46
+ s-border-Grey_Lighten-7 s-border-radius-xxs q-mr-sm"
47
+ :src="groupOpt.logo"
48
+ width="60px"
49
+ height="22px"
50
+ v-if="groupOpt.logo"
51
+ />
52
+ {{ groupOpt[optionLabel] }}
53
+ </q-item-section>
54
+ </template>
55
+ </q-item>
56
+ </template>
57
+ <template
58
+ v-if="useAll && model.length === options.filter(v => !v.category).length"
59
+ v-slot:selected
60
+ >
61
+ <div>
62
+ {{ allPlaceholder }}
63
+ </div>
64
+ </template>
65
+ </q-select>
66
+ </template>
67
+
68
+ <script>
69
+ import { defineComponent, onBeforeMount, ref, nextTick, watch } from 'vue';
70
+ import { QSelect, QItem, QItemSection, QImg } from 'quasar';
71
+ import { selectDownArrowIcon } from '../assets/icons.js';
72
+
73
+ export default defineComponent({
74
+ name: 'SSelectGroupCheckbox',
75
+ emits: ['update:modelValue'],
76
+ components: {
77
+ QSelect,
78
+ QItem,
79
+ QItemSection,
80
+ QImg,
81
+ },
82
+ props: {
83
+ options: {
84
+ type: Array,
85
+ required: true,
86
+ },
87
+ modelValue: {
88
+ type: Array,
89
+ required: true,
90
+ },
91
+ optionLabel: {
92
+ type: [String, Function],
93
+ default: 'label',
94
+ },
95
+ optionValue: {
96
+ type: String,
97
+ default: 'value',
98
+ },
99
+ optionGroup: {
100
+ type: String,
101
+ default: 'group',
102
+ },
103
+ useAll: {
104
+ type: Boolean,
105
+ default: false,
106
+ },
107
+ allPlaceholder: {
108
+ type: String,
109
+ default: '전체',
110
+ },
111
+ popupContentClass: {
112
+ default: () => '',
113
+ type: String,
114
+ },
115
+ },
116
+ // TODO: 기능 미완성
117
+ setup(props, { emit }) {
118
+ const model = ref(props.modelValue);
119
+ function onRemoveChecked(detail) {
120
+ const idx = model.value.findIndex(v => v[props.optionValue] === '');
121
+ if ([detail.value[props.optionValue]].includes('all')) {
122
+ nextTick(() => {
123
+ model.value = [];
124
+ });
125
+ return;
126
+ }
127
+ if (detail.value[props.optionValue] === '') {
128
+ nextTick(() => {
129
+ model.value = [];
130
+ });
131
+ } else if (idx >= 0) {
132
+ nextTick(() => {
133
+ model.value.splice(idx, 1);
134
+ });
135
+ }
136
+ }
137
+ function onAddChecked(detail) {
138
+ if (detail.value === '') {
139
+ nextTick(() => {
140
+ model.value = props.options;
141
+ });
142
+ } else {
143
+ nextTick(() => {
144
+ if (model.value.length === props.options.length - 1) {
145
+ model.value = props.options;
146
+ }
147
+ });
148
+ }
149
+ }
150
+
151
+ watch(
152
+ () => props.modelValue,
153
+ () => {
154
+ model.value = props.modelValue;
155
+ },
156
+ );
157
+ watch(model, () => {
158
+ emit('update:modelValue', model.value);
159
+ });
160
+
161
+ onBeforeMount(() => {
162
+ if (props.useAll && model.value.length === 1 && !props.modelValue[0].value) {
163
+ model.value = props.options.filter(v => !v.category);
164
+ }
165
+ });
166
+
167
+ return {
168
+ model,
169
+ selectDownArrowIcon,
170
+ onRemoveChecked,
171
+ onAddChecked,
172
+ sSelectRef: ref(null),
173
+ };
174
+ },
175
+ });
176
+ </script>
177
+
178
+ <style lang="scss">
179
+ @import '../css/quasar.variables.scss';
180
+ @import '../css/extends.scss';
181
+
182
+ .s-select-checkbox {
183
+ @extend %select;
184
+ .q-field__native {
185
+ display: block;
186
+ min-height: 0;
187
+ height: $default-height;
188
+ width: 100%;
189
+ padding: $select-padding !important;
190
+ color: $Grey_Darken-4;
191
+ white-space: nowrap;
192
+ overflow: hidden;
193
+ text-overflow: ellipsis;
194
+ > span {
195
+ max-height: $default-height;
196
+ }
197
+ > .s-checkbox {
198
+ margin-right: $default-icon-margin;
199
+ }
200
+ }
201
+ }
202
+
203
+ .s-select-group-checkbox-opts {
204
+ @extend %select-menu-list;
205
+ > .q-virtual-scroll__content {
206
+ > .q-item.grouping-opt {
207
+ border: none;
208
+ color: $Grey_Darken-4 !important;
209
+ opacity: 1 !important;
210
+ height: auto;
211
+ padding: 0;
212
+ background-color: white;
213
+ > .group-title,
214
+ .group-content {
215
+ flex-direction: row !important;
216
+ justify-content: flex-start !important;
217
+ > .s-checkbox {
218
+ margin-right: 10px;
219
+ }
220
+ }
221
+ > .group-title {
222
+ background-color: $Grey_Lighten-5;
223
+ border-top: 1px solid $Grey_Lighten-3 !important;
224
+ &:first-of-type {
225
+ border-top: none !important;
226
+ }
227
+ }
228
+ > .group-content {
229
+ margin: 0;
230
+ padding: 4px 12px 4px 16px;
231
+ }
232
+ }
233
+ }
234
+ }
235
+ </style>