quasar-ui-sellmate-ui-kit 3.11.1 → 3.11.2

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 (84) hide show
  1. package/.eslintrc.cjs +104 -104
  2. package/.prettierrc +25 -25
  3. package/README.md +156 -156
  4. package/dist/index.common.js +2 -2
  5. package/dist/index.css +1 -1
  6. package/dist/index.esm.js +2 -2
  7. package/dist/index.min.css +1 -1
  8. package/dist/index.rtl.css +1 -1
  9. package/dist/index.rtl.min.css +1 -1
  10. package/dist/index.umd.js +4417 -4405
  11. package/dist/index.umd.min.js +2 -2
  12. package/html/assets/index-iPSQW1bz.css +1 -1
  13. package/html/assets/index-pzCGhZhc.js +35 -35
  14. package/html/favicon.svg +5 -5
  15. package/html/index.html +26 -26
  16. package/package.json +95 -95
  17. package/src/assets/icons.js +63 -63
  18. package/src/components/SBadge.vue +75 -75
  19. package/src/components/SButton.vue +206 -206
  20. package/src/components/SButtonGroup.vue +41 -41
  21. package/src/components/SButtonToggle.vue +200 -200
  22. package/src/components/SCaution.vue +143 -143
  23. package/src/components/SCheckbox.vue +123 -123
  24. package/src/components/SChip.vue +99 -99
  25. package/src/components/SDate.vue +664 -664
  26. package/src/components/SDateAutoRangePicker.vue +311 -311
  27. package/src/components/SDatePicker.vue +465 -465
  28. package/src/components/SDateRange.vue +382 -382
  29. package/src/components/SDateRangePicker.vue +582 -582
  30. package/src/components/SDateTimePicker.vue +259 -259
  31. package/src/components/SDialog.vue +250 -250
  32. package/src/components/SDropdown.vue +273 -273
  33. package/src/components/SEditor.vue +590 -590
  34. package/src/components/SFilePicker.vue +207 -207
  35. package/src/components/SHelp.vue +126 -126
  36. package/src/components/SHelpMessage.vue +57 -57
  37. package/src/components/SInput.vue +379 -379
  38. package/src/components/SInputCounter.vue +46 -46
  39. package/src/components/SInputNumber.vue +194 -194
  40. package/src/components/SList.vue +29 -29
  41. package/src/components/SMarkupTable.vue +142 -142
  42. package/src/components/SPagination.vue +345 -345
  43. package/src/components/SRadio.vue +78 -78
  44. package/src/components/SRouteTab.vue +67 -67
  45. package/src/components/SSelect.vue +299 -299
  46. package/src/components/SSelectCheckbox.vue +238 -238
  47. package/src/components/SSelectCustom.vue +189 -189
  48. package/src/components/SSelectGroupCheckbox.vue +372 -372
  49. package/src/components/SSelectSearchAutoComplete.vue +172 -172
  50. package/src/components/SSelectSearchCheckbox.vue +360 -360
  51. package/src/components/SStringToInput.vue +66 -66
  52. package/src/components/STab.vue +147 -147
  53. package/src/components/STable.vue +21 -9
  54. package/src/components/STableTree.vue +502 -502
  55. package/src/components/STabs.vue +32 -32
  56. package/src/components/STag.vue +152 -152
  57. package/src/components/STimePicker.vue +186 -186
  58. package/src/components/SToggle.vue +68 -68
  59. package/src/components/STooltip.vue +209 -209
  60. package/src/components/SYearMonthPicker.vue +211 -211
  61. package/src/components/SelelctItem.vue +21 -21
  62. package/src/components/TableTreeNode.vue +177 -177
  63. package/src/components/TimePickerCard.vue +393 -393
  64. package/src/components/__tests__/SButton.test.js +18 -18
  65. package/src/components/__tests__/SInput.test.js +42 -42
  66. package/src/components/__tests__/SInputCounter.test.js +30 -30
  67. package/src/components/__tests__/SInputNumber.test.js +32 -32
  68. package/src/components/__tests__/STimePicker.spec.js +78 -78
  69. package/src/composables/date.js +11 -11
  70. package/src/composables/modelBinder.js +13 -13
  71. package/src/composables/resizable.js +55 -55
  72. package/src/composables/table/use-navigator.js +110 -110
  73. package/src/composables/table/use-resizable-tree.js +96 -96
  74. package/src/composables/table/use-resizable.js +187 -187
  75. package/src/constants/locale.js +102 -102
  76. package/src/css/app.scss +106 -106
  77. package/src/css/default.scss +393 -393
  78. package/src/css/extends.scss +177 -177
  79. package/src/css/quasar.variables.scss +187 -187
  80. package/src/directives/Directive.js +7 -7
  81. package/src/index.scss +3 -3
  82. package/src/vue-plugin.js +93 -93
  83. package/tsconfig.json +35 -35
  84. package/vitest.config.ts +31 -31
@@ -1,177 +1,177 @@
1
- <template>
2
- <div class="table-tree-node" :class="nodeName" ref="childTableNode">
3
- <table>
4
- <tbody>
5
- <tr class="level" :class="levelClass">
6
- <template v-for="(column, i) in columns" :key="i">
7
- <td
8
- :class="{
9
- 'bg-white': i === 0 && !isLastDepth,
10
- 'bg-Grey_Lighten-5': isLastDepth,
11
- [`td-${i + 1} text-${column.align}`]: i >= 0,
12
- }"
13
- :style="[i === 0 && `padding-left: ${row.leftPadding}px`, `width: ${column.width}px`]"
14
- >
15
- <slot :name="`body-cell-${column.name}`">
16
- <div>
17
- <s-button
18
- v-if="!isLastDepth && i === 0"
19
- :icon="row.isExpand ? minusIcon10 : addIcon10"
20
- outline
21
- round
22
- :color="row.isExpand ? 'Blue_C_Lighten-3' : 'Grey_Default'"
23
- class="expand-btn q-mr-sm"
24
- :class="{ 'not-expand-btn': !row.isExpand }"
25
- @click="handleExpand(row)"
26
- />
27
-
28
- <span class="cell-content" :class="{ 'is-root': isRoot }">
29
- <span v-if="column.prefix" class="q-mr-xs">{{ column.prefix }}</span>
30
- {{ row[column.name] }}
31
- <span v-if="column.suffix" class="q-ml-xs">{{ column.suffix }}</span>
32
- </span>
33
- </div>
34
- </slot>
35
- </td>
36
- </template>
37
- </tr>
38
- </tbody>
39
- </table>
40
-
41
- <div v-if="row.isExpand">
42
- <table-tree-node
43
- v-for="(childRow, childRowIdx) in row.children"
44
- :key="`child_node${childRowIdx}`"
45
- :nodeName="`child_node${childRowIdx}`"
46
- :row="childRow"
47
- :columns="columns"
48
- :colspan="colspan"
49
- :resizedWidths="resizedWidths"
50
- @handleExpand="handleExpand"
51
- :is-root="false"
52
- >
53
- <template
54
- v-for="column in columns"
55
- :key="column.name"
56
- #[`body-cell-${column.name}`]="childRow"
57
- >
58
- <slot :name="`body-cell-${column.name}`" v-bind="childRow"></slot>
59
- </template>
60
- </table-tree-node>
61
- </div>
62
- </div>
63
- </template>
64
-
65
- <script>
66
- import { defineComponent, computed, ref } from 'vue';
67
- import { addIcon10, minusIcon10 } from '../assets/icons';
68
-
69
- export default defineComponent({
70
- name: 'TableTreeNode',
71
- props: {
72
- row: Object,
73
- nodeName: String,
74
- columns: {
75
- type: Array,
76
- default: () => [],
77
- },
78
- isRoot: {
79
- type: Boolean,
80
- default: true,
81
- },
82
- colspan: Number,
83
- resizedWidths: Object,
84
- },
85
- setup(props, { emit }) {
86
- const levelClass = computed(() => `level-${props.row.level}` || '');
87
- const isLastDepth = computed(() => props.row.meta.isLastDepth);
88
- const childTableNode = ref(null);
89
-
90
- function handleExpand(row) {
91
- emit('handleExpand', row);
92
- }
93
-
94
- return {
95
- levelClass,
96
- isLastDepth,
97
- handleExpand,
98
- childTableNode,
99
- addIcon10,
100
- minusIcon10,
101
- };
102
- },
103
- });
104
- </script>
105
-
106
- <style scoped lang="scss">
107
- @import '../css/quasar.variables.scss';
108
- @import '../css/extends.scss';
109
-
110
- .table-tree-node {
111
- border-top: 1px solid $Grey_Lighten-3 !important;
112
- box-sizing: border-box;
113
-
114
- &.root_node_0 {
115
- border-top: 0 !important;
116
- }
117
- .tr {
118
- vertical-align: middle;
119
- td {
120
- height: 48px;
121
- padding: 0 16px;
122
- }
123
- }
124
- td,
125
- th {
126
- width: 100%;
127
- &:not(:first-of-type) {
128
- word-break: keep-all;
129
- white-space: nowrap;
130
- overflow: hidden;
131
- text-overflow: ellipsis;
132
- }
133
- }
134
- table {
135
- width: 100%;
136
- table-layout: fixed;
137
- border-collapse: collapse;
138
- tbody {
139
- tr {
140
- td {
141
- height: 44px;
142
- padding: 0 16px;
143
- font-weight: 400;
144
-
145
- .expand-btn {
146
- min-width: 20px;
147
- min-height: 20px;
148
- padding: 0 !important;
149
- &.not-expand-btn {
150
- &:before {
151
- border-color: $Grey_Lighten-3;
152
- }
153
- }
154
- &.s-button-sm.q-btn {
155
- height: 20px;
156
- }
157
- :deep(.q-btn__content) {
158
- .q-icon {
159
- font-size: 12px;
160
- }
161
- }
162
- }
163
- .cell-content {
164
- display: inline-block;
165
- }
166
- }
167
- }
168
- }
169
- .td-1 .is-root {
170
- font-weight: 700;
171
- }
172
- .td-1 :not(.is-root) {
173
- font-weight: 400;
174
- }
175
- }
176
- }
177
- </style>
1
+ <template>
2
+ <div class="table-tree-node" :class="nodeName" ref="childTableNode">
3
+ <table>
4
+ <tbody>
5
+ <tr class="level" :class="levelClass">
6
+ <template v-for="(column, i) in columns" :key="i">
7
+ <td
8
+ :class="{
9
+ 'bg-white': i === 0 && !isLastDepth,
10
+ 'bg-Grey_Lighten-5': isLastDepth,
11
+ [`td-${i + 1} text-${column.align}`]: i >= 0,
12
+ }"
13
+ :style="[i === 0 && `padding-left: ${row.leftPadding}px`, `width: ${column.width}px`]"
14
+ >
15
+ <slot :name="`body-cell-${column.name}`">
16
+ <div>
17
+ <s-button
18
+ v-if="!isLastDepth && i === 0"
19
+ :icon="row.isExpand ? minusIcon10 : addIcon10"
20
+ outline
21
+ round
22
+ :color="row.isExpand ? 'Blue_C_Lighten-3' : 'Grey_Default'"
23
+ class="expand-btn q-mr-sm"
24
+ :class="{ 'not-expand-btn': !row.isExpand }"
25
+ @click="handleExpand(row)"
26
+ />
27
+
28
+ <span class="cell-content" :class="{ 'is-root': isRoot }">
29
+ <span v-if="column.prefix" class="q-mr-xs">{{ column.prefix }}</span>
30
+ {{ row[column.name] }}
31
+ <span v-if="column.suffix" class="q-ml-xs">{{ column.suffix }}</span>
32
+ </span>
33
+ </div>
34
+ </slot>
35
+ </td>
36
+ </template>
37
+ </tr>
38
+ </tbody>
39
+ </table>
40
+
41
+ <div v-if="row.isExpand">
42
+ <table-tree-node
43
+ v-for="(childRow, childRowIdx) in row.children"
44
+ :key="`child_node${childRowIdx}`"
45
+ :nodeName="`child_node${childRowIdx}`"
46
+ :row="childRow"
47
+ :columns="columns"
48
+ :colspan="colspan"
49
+ :resizedWidths="resizedWidths"
50
+ @handleExpand="handleExpand"
51
+ :is-root="false"
52
+ >
53
+ <template
54
+ v-for="column in columns"
55
+ :key="column.name"
56
+ #[`body-cell-${column.name}`]="childRow"
57
+ >
58
+ <slot :name="`body-cell-${column.name}`" v-bind="childRow"></slot>
59
+ </template>
60
+ </table-tree-node>
61
+ </div>
62
+ </div>
63
+ </template>
64
+
65
+ <script>
66
+ import { defineComponent, computed, ref } from 'vue';
67
+ import { addIcon10, minusIcon10 } from '../assets/icons';
68
+
69
+ export default defineComponent({
70
+ name: 'TableTreeNode',
71
+ props: {
72
+ row: Object,
73
+ nodeName: String,
74
+ columns: {
75
+ type: Array,
76
+ default: () => [],
77
+ },
78
+ isRoot: {
79
+ type: Boolean,
80
+ default: true,
81
+ },
82
+ colspan: Number,
83
+ resizedWidths: Object,
84
+ },
85
+ setup(props, { emit }) {
86
+ const levelClass = computed(() => `level-${props.row.level}` || '');
87
+ const isLastDepth = computed(() => props.row.meta.isLastDepth);
88
+ const childTableNode = ref(null);
89
+
90
+ function handleExpand(row) {
91
+ emit('handleExpand', row);
92
+ }
93
+
94
+ return {
95
+ levelClass,
96
+ isLastDepth,
97
+ handleExpand,
98
+ childTableNode,
99
+ addIcon10,
100
+ minusIcon10,
101
+ };
102
+ },
103
+ });
104
+ </script>
105
+
106
+ <style scoped lang="scss">
107
+ @import '../css/quasar.variables.scss';
108
+ @import '../css/extends.scss';
109
+
110
+ .table-tree-node {
111
+ border-top: 1px solid $Grey_Lighten-3 !important;
112
+ box-sizing: border-box;
113
+
114
+ &.root_node_0 {
115
+ border-top: 0 !important;
116
+ }
117
+ .tr {
118
+ vertical-align: middle;
119
+ td {
120
+ height: 48px;
121
+ padding: 0 16px;
122
+ }
123
+ }
124
+ td,
125
+ th {
126
+ width: 100%;
127
+ &:not(:first-of-type) {
128
+ word-break: keep-all;
129
+ white-space: nowrap;
130
+ overflow: hidden;
131
+ text-overflow: ellipsis;
132
+ }
133
+ }
134
+ table {
135
+ width: 100%;
136
+ table-layout: fixed;
137
+ border-collapse: collapse;
138
+ tbody {
139
+ tr {
140
+ td {
141
+ height: 44px;
142
+ padding: 0 16px;
143
+ font-weight: 400;
144
+
145
+ .expand-btn {
146
+ min-width: 20px;
147
+ min-height: 20px;
148
+ padding: 0 !important;
149
+ &.not-expand-btn {
150
+ &:before {
151
+ border-color: $Grey_Lighten-3;
152
+ }
153
+ }
154
+ &.s-button-sm.q-btn {
155
+ height: 20px;
156
+ }
157
+ :deep(.q-btn__content) {
158
+ .q-icon {
159
+ font-size: 12px;
160
+ }
161
+ }
162
+ }
163
+ .cell-content {
164
+ display: inline-block;
165
+ }
166
+ }
167
+ }
168
+ }
169
+ .td-1 .is-root {
170
+ font-weight: 700;
171
+ }
172
+ .td-1 :not(.is-root) {
173
+ font-weight: 400;
174
+ }
175
+ }
176
+ }
177
+ </style>