quasar-ui-sellmate-ui-kit 3.0.3 → 3.0.5

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 +3829 -3829
  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,222 +1,222 @@
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-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 #option="{ itemProps, opt, selected, toggleOption }">
28
- <q-item v-bind="itemProps" class="custom-select-options">
29
- <q-item-section side v-if="!opt.disable">
30
- <s-checkbox :modelValue="selected" @update:modelValue="toggleOption(opt)" />
31
- </q-item-section>
32
- <q-item-section v-if="opt[optionGroup]" class="text-Grey_Darken-4 group-title">
33
- {{ opt[optionGroup] }}
34
- </q-item-section>
35
- <q-item-section avatar v-if="opt.logo">
36
- <q-img class="q-pa-none bg-grey-11" :src="opt.logo" width="60px" height="22px" />
37
- </q-item-section>
38
- <q-item-section>
39
- {{ opt[optionLabel] }}
40
- </q-item-section>
41
- </q-item>
42
- </template>
43
- <template #selected v-if="useAll && model.length === options.filter(v => !v.category).length">
44
- <div>
45
- {{ allPlaceholder }}
46
- </div>
47
- </template>
48
- </q-select>
49
- </template>
50
-
51
- <script>
52
- import { defineComponent, onBeforeMount, ref, nextTick, watch } from 'vue';
53
- import { QSelect, QItem, QItemSection, QImg } from 'quasar';
54
- import { selectDownArrowIcon } from '../assets/icons.js';
55
-
56
- export default defineComponent({
57
- name: 'SSelectCheckbox',
58
- emits: ['update:modelValue'],
59
- components: {
60
- QSelect,
61
- QItem,
62
- QItemSection,
63
- QImg,
64
- },
65
- props: {
66
- options: {
67
- type: Array,
68
- required: true,
69
- },
70
- modelValue: {
71
- type: Array,
72
- required: true,
73
- },
74
- optionLabel: {
75
- type: [String, Function],
76
- default: 'label',
77
- },
78
- optionValue: {
79
- type: String,
80
- default: 'value',
81
- },
82
- optionGroup: {
83
- type: String,
84
- default: 'group',
85
- },
86
- useAll: {
87
- type: Boolean,
88
- default: false,
89
- },
90
- allPlaceholder: {
91
- type: String,
92
- default: '전체',
93
- },
94
- popupContentClass: {
95
- default: () => '',
96
- type: String,
97
- },
98
- },
99
- setup(props, { emit }) {
100
- const model = ref(props.modelValue);
101
- const isDisable = props.options.find(v => Boolean(v.disable));
102
- function onRemoveChecked(detail) {
103
- const idx = model.value.findIndex(v => v[props.optionValue] === '');
104
- if (detail.value[props.optionValue] === '') {
105
- nextTick(() => {
106
- model.value = [];
107
- });
108
- } else if (idx >= 0) {
109
- nextTick(() => {
110
- model.value.splice(idx, 1);
111
- });
112
- }
113
- }
114
- function onAddChecked(detail) {
115
- if (detail.value === '') {
116
- nextTick(() => {
117
- model.value = props.options.filter(v => !v.category);
118
- });
119
- } else {
120
- nextTick(() => {
121
- if (model.value.length === props.options.length - 1) {
122
- model.value = props.options.filter(v => !v.category);
123
- }
124
- });
125
- }
126
- }
127
-
128
- function checkEmptyValue(value) {
129
- if (typeof value === 'object') {
130
- return value.value !== 0 && !value.value;
131
- }
132
-
133
- return value !== 0 && !value;
134
- }
135
-
136
- watch(
137
- () => props.modelValue,
138
- newModelValue => {
139
- if (props.useAll && newModelValue.length === 1 && checkEmptyValue(newModelValue[0])) {
140
- model.value = props.options.filter(v => !v.category);
141
- return;
142
- }
143
- model.value = newModelValue;
144
- },
145
- );
146
-
147
- watch(
148
- () => props.options,
149
- newOptionValue => {
150
- if (props.useAll) {
151
- model.value = newOptionValue.filter(v => !v.category);
152
- }
153
- },
154
- );
155
-
156
- watch(model, () => {
157
- emit('update:modelValue', model.value);
158
- });
159
-
160
- onBeforeMount(() => {
161
- if (props.useAll && props.modelValue.length === 1 && checkEmptyValue(props.modelValue[0])) {
162
- model.value = props.options.filter(v => !v.category);
163
- }
164
- });
165
-
166
- return {
167
- model,
168
- selectDownArrowIcon,
169
- onRemoveChecked,
170
- onAddChecked,
171
- isDisable,
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-checkbox-opts {
204
- @extend %select-menu-list;
205
- > .q-virtual-scroll__content {
206
- > .q-item.disabled {
207
- border: none;
208
- color: $Grey_Darken-4 !important;
209
- opacity: 1 !important;
210
- background: $Grey_Lighten-5 !important;
211
- border-top: 1px solid $Grey_Lighten-3 !important;
212
- &:not(.q-manual-focusable):first-of-type {
213
- border-top: none !important;
214
- }
215
- }
216
- }
217
- }
218
-
219
- .custom-select-options {
220
- height: $default-height;
221
- }
222
- </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-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 #option="{ itemProps, opt, selected, toggleOption }">
28
+ <q-item v-bind="itemProps" class="custom-select-options">
29
+ <q-item-section side v-if="!opt.disable">
30
+ <s-checkbox :modelValue="selected" @update:modelValue="toggleOption(opt)" />
31
+ </q-item-section>
32
+ <q-item-section v-if="opt[optionGroup]" class="text-Grey_Darken-4 group-title">
33
+ {{ opt[optionGroup] }}
34
+ </q-item-section>
35
+ <q-item-section avatar v-if="opt.logo">
36
+ <q-img class="q-pa-none bg-grey-11" :src="opt.logo" width="60px" height="22px" />
37
+ </q-item-section>
38
+ <q-item-section>
39
+ {{ opt[optionLabel] }}
40
+ </q-item-section>
41
+ </q-item>
42
+ </template>
43
+ <template #selected v-if="useAll && model.length === options.filter(v => !v.category).length">
44
+ <div>
45
+ {{ allPlaceholder }}
46
+ </div>
47
+ </template>
48
+ </q-select>
49
+ </template>
50
+
51
+ <script>
52
+ import { defineComponent, onBeforeMount, ref, nextTick, watch } from 'vue';
53
+ import { QSelect, QItem, QItemSection, QImg } from 'quasar';
54
+ import { selectDownArrowIcon } from '../assets/icons.js';
55
+
56
+ export default defineComponent({
57
+ name: 'SSelectCheckbox',
58
+ emits: ['update:modelValue'],
59
+ components: {
60
+ QSelect,
61
+ QItem,
62
+ QItemSection,
63
+ QImg,
64
+ },
65
+ props: {
66
+ options: {
67
+ type: Array,
68
+ required: true,
69
+ },
70
+ modelValue: {
71
+ type: Array,
72
+ required: true,
73
+ },
74
+ optionLabel: {
75
+ type: [String, Function],
76
+ default: 'label',
77
+ },
78
+ optionValue: {
79
+ type: String,
80
+ default: 'value',
81
+ },
82
+ optionGroup: {
83
+ type: String,
84
+ default: 'group',
85
+ },
86
+ useAll: {
87
+ type: Boolean,
88
+ default: false,
89
+ },
90
+ allPlaceholder: {
91
+ type: String,
92
+ default: '전체',
93
+ },
94
+ popupContentClass: {
95
+ default: () => '',
96
+ type: String,
97
+ },
98
+ },
99
+ setup(props, { emit }) {
100
+ const model = ref(props.modelValue);
101
+ const isDisable = props.options.find(v => Boolean(v.disable));
102
+ function onRemoveChecked(detail) {
103
+ const idx = model.value.findIndex(v => v[props.optionValue] === '');
104
+ if (detail.value[props.optionValue] === '') {
105
+ nextTick(() => {
106
+ model.value = [];
107
+ });
108
+ } else if (idx >= 0) {
109
+ nextTick(() => {
110
+ model.value.splice(idx, 1);
111
+ });
112
+ }
113
+ }
114
+ function onAddChecked(detail) {
115
+ if (detail.value === '') {
116
+ nextTick(() => {
117
+ model.value = props.options.filter(v => !v.category);
118
+ });
119
+ } else {
120
+ nextTick(() => {
121
+ if (model.value.length === props.options.length - 1) {
122
+ model.value = props.options.filter(v => !v.category);
123
+ }
124
+ });
125
+ }
126
+ }
127
+
128
+ function checkEmptyValue(value) {
129
+ if (typeof value === 'object') {
130
+ return value.value !== 0 && !value.value;
131
+ }
132
+
133
+ return value !== 0 && !value;
134
+ }
135
+
136
+ watch(
137
+ () => props.modelValue,
138
+ newModelValue => {
139
+ if (props.useAll && newModelValue.length === 1 && checkEmptyValue(newModelValue[0])) {
140
+ model.value = props.options.filter(v => !v.category);
141
+ return;
142
+ }
143
+ model.value = newModelValue;
144
+ },
145
+ );
146
+
147
+ watch(
148
+ () => props.options,
149
+ newOptionValue => {
150
+ if (props.useAll) {
151
+ model.value = newOptionValue.filter(v => !v.category);
152
+ }
153
+ },
154
+ );
155
+
156
+ watch(model, () => {
157
+ emit('update:modelValue', model.value);
158
+ });
159
+
160
+ onBeforeMount(() => {
161
+ if (props.useAll && props.modelValue.length === 1 && checkEmptyValue(props.modelValue[0])) {
162
+ model.value = props.options.filter(v => !v.category);
163
+ }
164
+ });
165
+
166
+ return {
167
+ model,
168
+ selectDownArrowIcon,
169
+ onRemoveChecked,
170
+ onAddChecked,
171
+ isDisable,
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-checkbox-opts {
204
+ @extend %select-menu-list;
205
+ > .q-virtual-scroll__content {
206
+ > .q-item.disabled {
207
+ border: none;
208
+ color: $Grey_Darken-4 !important;
209
+ opacity: 1 !important;
210
+ background: $Grey_Lighten-5 !important;
211
+ border-top: 1px solid $Grey_Lighten-3 !important;
212
+ &:not(.q-manual-focusable):first-of-type {
213
+ border-top: none !important;
214
+ }
215
+ }
216
+ }
217
+ }
218
+
219
+ .custom-select-options {
220
+ height: $default-height;
221
+ }
222
+ </style>