quasar 2.4.13 → 2.5.0

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 (163) hide show
  1. package/dist/api/QCheckbox.json +27 -0
  2. package/dist/api/QRadio.json +18 -0
  3. package/dist/api/QTime.json +8 -2
  4. package/dist/api/QToggle.json +24 -24
  5. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  6. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  7. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  8. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  9. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  10. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  11. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  12. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  13. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  14. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  15. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  16. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  17. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  18. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  19. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  20. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  21. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  22. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  23. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  24. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  25. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  26. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  27. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  28. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  29. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  30. package/dist/icon-set/svg-mdi-v4.umd.prod.js +1 -1
  31. package/dist/icon-set/svg-mdi-v5.umd.prod.js +1 -1
  32. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  33. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  34. package/dist/icon-set/themify.umd.prod.js +1 -1
  35. package/dist/lang/ar.umd.prod.js +1 -1
  36. package/dist/lang/az-Latn.umd.prod.js +1 -1
  37. package/dist/lang/bg.umd.prod.js +1 -1
  38. package/dist/lang/bn.umd.prod.js +1 -1
  39. package/dist/lang/ca.umd.prod.js +1 -1
  40. package/dist/lang/cs.umd.prod.js +1 -1
  41. package/dist/lang/da.umd.prod.js +1 -1
  42. package/dist/lang/de.umd.prod.js +1 -1
  43. package/dist/lang/el.umd.prod.js +1 -1
  44. package/dist/lang/en-GB.umd.prod.js +1 -1
  45. package/dist/lang/en-US.umd.prod.js +1 -1
  46. package/dist/lang/eo.umd.prod.js +1 -1
  47. package/dist/lang/es.umd.prod.js +1 -1
  48. package/dist/lang/et.umd.prod.js +1 -1
  49. package/dist/lang/fa-IR.umd.prod.js +1 -1
  50. package/dist/lang/fa.umd.prod.js +1 -1
  51. package/dist/lang/fi.umd.prod.js +1 -1
  52. package/dist/lang/fr.umd.prod.js +1 -1
  53. package/dist/lang/gn.umd.prod.js +1 -1
  54. package/dist/lang/he.umd.prod.js +1 -1
  55. package/dist/lang/hr.umd.prod.js +1 -1
  56. package/dist/lang/hu.umd.prod.js +1 -1
  57. package/dist/lang/id.umd.prod.js +1 -1
  58. package/dist/lang/is.umd.prod.js +1 -1
  59. package/dist/lang/it.umd.prod.js +1 -1
  60. package/dist/lang/ja.umd.prod.js +1 -1
  61. package/dist/lang/km.umd.prod.js +1 -1
  62. package/dist/lang/ko-KR.umd.prod.js +1 -1
  63. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  64. package/dist/lang/lt.umd.prod.js +1 -1
  65. package/dist/lang/lu.umd.prod.js +1 -1
  66. package/dist/lang/lv.umd.prod.js +1 -1
  67. package/dist/lang/ml.umd.prod.js +1 -1
  68. package/dist/lang/ms.umd.prod.js +1 -1
  69. package/dist/lang/my.umd.prod.js +1 -1
  70. package/dist/lang/nb-NO.umd.prod.js +1 -1
  71. package/dist/lang/nl.umd.prod.js +1 -1
  72. package/dist/lang/pl.umd.prod.js +1 -1
  73. package/dist/lang/pt-BR.umd.prod.js +1 -1
  74. package/dist/lang/pt.umd.prod.js +1 -1
  75. package/dist/lang/ro.umd.prod.js +1 -1
  76. package/dist/lang/ru.umd.prod.js +1 -1
  77. package/dist/lang/sk.umd.prod.js +1 -1
  78. package/dist/lang/sl.umd.prod.js +1 -1
  79. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  80. package/dist/lang/sr.umd.prod.js +1 -1
  81. package/dist/lang/sv.umd.prod.js +1 -1
  82. package/dist/lang/ta.umd.prod.js +1 -1
  83. package/dist/lang/th.umd.prod.js +1 -1
  84. package/dist/lang/tr.umd.prod.js +1 -1
  85. package/dist/lang/ug.umd.prod.js +1 -1
  86. package/dist/lang/uk.umd.prod.js +1 -1
  87. package/dist/lang/vi.umd.prod.js +1 -1
  88. package/dist/lang/zh-CN.umd.prod.js +1 -1
  89. package/dist/lang/zh-TW.umd.prod.js +1 -1
  90. package/dist/quasar.cjs.prod.js +2 -2
  91. package/dist/quasar.css +34 -10
  92. package/dist/quasar.esm.prod.js +2 -2
  93. package/dist/quasar.prod.css +1 -1
  94. package/dist/quasar.rtl.css +51 -23
  95. package/dist/quasar.rtl.prod.css +1 -1
  96. package/dist/quasar.sass +29 -11
  97. package/dist/quasar.umd.js +119 -49
  98. package/dist/quasar.umd.prod.js +2 -2
  99. package/dist/ssr-directives/Morph.js +1 -1
  100. package/dist/transforms/auto-import.json +39 -3
  101. package/dist/transforms/import-map.json +18 -0
  102. package/dist/types/index.d.ts +35 -13
  103. package/dist/vetur/quasar-attributes.json +32 -12
  104. package/dist/vetur/quasar-tags.json +8 -3
  105. package/dist/web-types/web-types.json +73 -28
  106. package/package.json +13 -3
  107. package/src/components/avatar/__tests__/QAvatar.spec.js +121 -0
  108. package/src/components/badge/__tests__/QBadge.spec.js +74 -0
  109. package/src/components/breadcrumbs/QBreadcrumbs.js +1 -1
  110. package/src/components/btn/__tests__/QBtn.spec.js +55 -0
  111. package/src/components/btn/__tests__/use-btn.spec.js +189 -0
  112. package/src/components/checkbox/QCheckbox.js +34 -3
  113. package/src/components/checkbox/QCheckbox.json +17 -0
  114. package/src/components/checkbox/QCheckbox.sass +17 -5
  115. package/src/components/checkbox/use-checkbox.js +4 -0
  116. package/src/components/checkbox/use-checkbox.json +18 -0
  117. package/src/components/chip/__tests__/QChip.spec.js +155 -0
  118. package/src/components/date/__tests__/QDate.spec.js +189 -0
  119. package/src/components/date/__tests__/use-datetime.spec.js +83 -0
  120. package/src/components/dialog/__tests__/QDialog.spec.js +129 -0
  121. package/src/components/editor/__tests__/QEditor.spec.js +195 -0
  122. package/src/components/input/QInput.js +9 -0
  123. package/src/components/input/__tests__/QInput.spec.js +105 -0
  124. package/src/components/input/__tests__/use-mask.spec.js +29 -0
  125. package/src/components/menu/__tests__/QMenu.spec.js +610 -0
  126. package/src/components/menu/__tests__/WrapperOne.vue +51 -0
  127. package/src/components/menu/__tests__/WrapperTwo.vue +38 -0
  128. package/src/components/radio/QRadio.js +26 -1
  129. package/src/components/radio/QRadio.json +16 -0
  130. package/src/components/radio/QRadio.sass +17 -6
  131. package/src/components/select/QSelect.js +1 -1
  132. package/src/components/select/__tests__/QSelect.spec.js +2003 -0
  133. package/src/components/select/__tests__/WrapperOne.vue +28 -0
  134. package/src/components/table/__tests__/QTable.spec.js +635 -0
  135. package/src/components/table/__tests__/QTd.spec.js +35 -0
  136. package/src/components/table/__tests__/QTh.spec.js +27 -0
  137. package/src/components/table/__tests__/QTr.spec.js +27 -0
  138. package/src/components/tabs/__tests__/QRouteTab.spec.js +9 -0
  139. package/src/components/tabs/__tests__/QTab.spec.js +79 -0
  140. package/src/components/tabs/__tests__/QTabs.spec.js +147 -0
  141. package/src/components/time/QTime.json +2 -2
  142. package/src/components/toggle/QToggle.js +5 -13
  143. package/src/components/toggle/QToggle.json +3 -12
  144. package/src/components/uploader/__tests__/QUploader.spec.js +161 -0
  145. package/src/composables/private/__tests__/FieldWrapper.vue +39 -0
  146. package/src/composables/private/__tests__/use-anchor.spec.js +99 -0
  147. package/src/composables/private/__tests__/use-field.spec.js +351 -0
  148. package/src/composables/private/__tests__/use-file.spec.js +69 -0
  149. package/src/composables/private/__tests__/use-form.spec.js +11 -0
  150. package/src/composables/private/__tests__/use-fullscreen.spec.js +37 -0
  151. package/src/composables/private/__tests__/use-model-toggle.spec.js +306 -0
  152. package/src/composables/private/__tests__/use-portal.spec.js +4 -0
  153. package/src/composables/private/__tests__/use-router-link.spec.js +55 -0
  154. package/src/composables/private/__tests__/use-size.spec.js +37 -0
  155. package/src/composables/private/__tests__/use-transition.spec.js +108 -0
  156. package/src/composables/private/__tests__/use-validate.spec.js +111 -0
  157. package/src/composables/private/use-fullscreen.js +1 -1
  158. package/src/composables/private/use-model-toggle.js +1 -1
  159. package/src/composables/private/use-validate.js +9 -5
  160. package/src/plugins/Meta.js +1 -1
  161. package/src/plugins/Screen.js +11 -8
  162. package/src/utils/date.js +5 -5
  163. package/src/utils/private/vm.js +14 -8
@@ -0,0 +1,121 @@
1
+ import { mount } from '@cypress/vue'
2
+ import QAvatar from '../QAvatar'
3
+
4
+ describe('Avatar API', () => {
5
+ describe('Props', () => {
6
+ describe('Category: content', () => {
7
+ describe('(prop): icon', () => {
8
+ it('should render an icon', () => {
9
+ const icon = 'bug_report'
10
+ mount(QAvatar, {
11
+ props: {
12
+ icon,
13
+ color: 'grey'
14
+ }
15
+ })
16
+
17
+ cy.get('.q-avatar')
18
+ .get('.q-icon')
19
+ .should('have.text', `${ icon }`)
20
+ })
21
+ })
22
+ })
23
+
24
+ describe('Category: style', () => {
25
+ describe('(prop): font-size', () => {
26
+ it('should set the font-size', () => {
27
+ const size = '40px'
28
+ // Doing em/rem units here does not work
29
+ // Cypress looks at actual computed values in the browser
30
+ const fontSize = '32px'
31
+ mount(QAvatar, {
32
+ props: {
33
+ size,
34
+ fontSize,
35
+ color: 'grey'
36
+ }
37
+ })
38
+
39
+ cy.get('.q-avatar')
40
+ .should('have.css', 'font-size', size)
41
+ .get('.q-avatar__content')
42
+ .should('have.css', 'font-size', fontSize)
43
+ })
44
+ })
45
+
46
+ describe('(prop): color', () => {
47
+ it('should set a background color', () => {
48
+ const color = 'red'
49
+ mount(QAvatar, {
50
+ props: {
51
+ color
52
+ }
53
+ })
54
+
55
+ cy.get('.q-avatar')
56
+ .should('have.class', `bg-${ color }`)
57
+ })
58
+ })
59
+
60
+ describe('(prop): text-color', () => {
61
+ it('should set a text color', () => {
62
+ const textColor = 'red'
63
+ mount(QAvatar, {
64
+ props: {
65
+ textColor
66
+ }
67
+ })
68
+
69
+ cy.get('.q-avatar')
70
+ .should('have.class', `text-${ textColor }`)
71
+ })
72
+ })
73
+
74
+ describe('(prop): square', () => {
75
+ it('should create a square avatar', () => {
76
+ mount(QAvatar, {
77
+ props: {
78
+ square: true,
79
+ color: 'grey'
80
+ }
81
+ })
82
+
83
+ cy.get('.q-avatar')
84
+ .should('have.class', 'q-avatar--square')
85
+ .should('have.css', 'border-radius', '0px')
86
+ })
87
+ })
88
+
89
+ describe('(prop): rounded', () => {
90
+ it('should create a rounded avatar', () => {
91
+ mount(QAvatar, {
92
+ props: {
93
+ rounded: true,
94
+ color: 'grey'
95
+ }
96
+ })
97
+
98
+ cy.get('.q-avatar')
99
+ .should('have.class', 'rounded-borders')
100
+ })
101
+ })
102
+ })
103
+ })
104
+
105
+ describe('Slots', () => {
106
+ describe('(slot): default', () => {
107
+ it('render the text in the default slot', () => {
108
+ const text = 'QQ'
109
+ mount(QAvatar, {
110
+ slots: {
111
+ // Using only a string here results in an error, this is a workaround
112
+ default: () => text
113
+ }
114
+ })
115
+
116
+ cy.get('.q-avatar')
117
+ .should('have.text', text)
118
+ })
119
+ })
120
+ })
121
+ })
@@ -0,0 +1,74 @@
1
+ // import { mount } from '@cypress/vue'
2
+ // import QBadge from '../QBadge'
3
+
4
+ // const snapshotOptions = { customSnapshotsDir: '../src/components/badge/__tests__' }
5
+
6
+ describe('Badge API', () => {
7
+ describe('Props', () => {
8
+ describe('Category: content', () => {
9
+ describe('(prop): floating', () => {
10
+ it.skip(' ', () => {
11
+ //
12
+ })
13
+ })
14
+
15
+ describe('(prop): multi-line', () => {
16
+ it.skip(' ', () => {
17
+ //
18
+ })
19
+ })
20
+
21
+ describe('(prop): label', () => {
22
+ it.skip(' ', () => {
23
+ //
24
+ })
25
+ })
26
+
27
+ describe('(prop): align', () => {
28
+ it.skip(' ', () => {
29
+ //
30
+ })
31
+ })
32
+ })
33
+
34
+ describe('Category: style', () => {
35
+ describe('(prop): color', () => {
36
+ it.skip(' ', () => {
37
+ //
38
+ })
39
+ })
40
+
41
+ describe('(prop): text-color', () => {
42
+ it.skip(' ', () => {
43
+ //
44
+ })
45
+ })
46
+
47
+ describe('(prop): transparent', () => {
48
+ it.skip(' ', () => {
49
+ //
50
+ })
51
+ })
52
+
53
+ describe('(prop): outline', () => {
54
+ it.skip(' ', () => {
55
+ //
56
+ })
57
+ })
58
+
59
+ describe('(prop): rounded', () => {
60
+ it.skip(' ', () => {
61
+ //
62
+ })
63
+ })
64
+ })
65
+ })
66
+
67
+ describe('Slots', () => {
68
+ describe('(slot): default', () => {
69
+ it.skip(' ', () => {
70
+ //
71
+ })
72
+ })
73
+ })
74
+ })
@@ -47,7 +47,7 @@ export default createComponent({
47
47
  hSlot(slots.default)
48
48
  )
49
49
 
50
- if (vnodes === void 0) { return }
50
+ if (vnodes.length === 0) { return }
51
51
 
52
52
  let els = 1
53
53
 
@@ -0,0 +1,55 @@
1
+ describe('Btn API', () => {
2
+ describe('Props', () => {
3
+ describe('Category: behavior', () => {
4
+ describe('(prop): percentage', () => {
5
+ it.skip(' ', () => {
6
+ //
7
+ })
8
+ })
9
+
10
+ describe('(prop): dark-percentage', () => {
11
+ it.skip(' ', () => {
12
+ //
13
+ })
14
+ })
15
+ })
16
+
17
+ describe('Category: style', () => {
18
+ describe('(prop): round', () => {
19
+ it.skip(' ', () => {
20
+ //
21
+ })
22
+ })
23
+ })
24
+ })
25
+
26
+ describe('Slots', () => {
27
+ describe('(slot): default', () => {
28
+ it.skip(' ', () => {
29
+ //
30
+ })
31
+ })
32
+
33
+ describe('(slot): loading', () => {
34
+ it.skip(' ', () => {
35
+ //
36
+ })
37
+ })
38
+ })
39
+
40
+ describe('Events', () => {
41
+ describe('(event): click', () => {
42
+ it.skip(' ', () => {
43
+ //
44
+ })
45
+ })
46
+ })
47
+
48
+ describe('Methods', () => {
49
+ describe('(method): click', () => {
50
+ it.skip(' ', () => {
51
+ //
52
+ })
53
+ })
54
+ })
55
+ })
@@ -0,0 +1,189 @@
1
+ describe('use-btn API', () => {
2
+ describe('Props', () => {
3
+ describe('Category: behavior|state', () => {
4
+ describe('(prop): loading', () => {
5
+ it.skip(' ', () => {
6
+ //
7
+ })
8
+ })
9
+ })
10
+
11
+ describe('Category: content', () => {
12
+ describe('(prop): label', () => {
13
+ it.skip(' ', () => {
14
+ //
15
+ })
16
+ })
17
+
18
+ describe('(prop): icon', () => {
19
+ it.skip(' ', () => {
20
+ //
21
+ })
22
+ })
23
+
24
+ describe('(prop): icon-right', () => {
25
+ it.skip(' ', () => {
26
+ //
27
+ })
28
+ })
29
+
30
+ describe('(prop): no-caps', () => {
31
+ it.skip(' ', () => {
32
+ //
33
+ })
34
+ })
35
+
36
+ describe('(prop): no-wrap', () => {
37
+ it.skip(' ', () => {
38
+ //
39
+ })
40
+ })
41
+
42
+ describe('(prop): align', () => {
43
+ it.skip(' ', () => {
44
+ //
45
+ })
46
+ })
47
+
48
+ describe('(prop): stack', () => {
49
+ it.skip(' ', () => {
50
+ //
51
+ })
52
+ })
53
+
54
+ describe('(prop): stretch', () => {
55
+ it.skip(' ', () => {
56
+ //
57
+ })
58
+ })
59
+ })
60
+
61
+ describe('Category: general', () => {
62
+ describe('(prop): type', () => {
63
+ it.skip(' ', () => {
64
+ //
65
+ })
66
+ })
67
+
68
+ describe('(prop): tabindex', () => {
69
+ it.skip(' ', () => {
70
+ //
71
+ })
72
+ })
73
+ })
74
+
75
+ describe('Category: navigation', () => {
76
+ describe('(prop): to', () => {
77
+ it.skip(' ', () => {
78
+ //
79
+ })
80
+ })
81
+
82
+ describe('(prop): replace', () => {
83
+ it.skip(' ', () => {
84
+ //
85
+ })
86
+ })
87
+
88
+ describe('(prop): href', () => {
89
+ it.skip(' ', () => {
90
+ //
91
+ })
92
+ })
93
+
94
+ describe('(prop): target', () => {
95
+ it.skip(' ', () => {
96
+ //
97
+ })
98
+ })
99
+ })
100
+
101
+ describe('Category: state', () => {
102
+ describe('(prop): disable', () => {
103
+ it.skip(' ', () => {
104
+ //
105
+ })
106
+ })
107
+ })
108
+
109
+ describe('Category: style', () => {
110
+ describe('(prop): outline', () => {
111
+ it.skip(' ', () => {
112
+ //
113
+ })
114
+ })
115
+
116
+ describe('(prop): flat', () => {
117
+ it.skip(' ', () => {
118
+ //
119
+ })
120
+ })
121
+
122
+ describe('(prop): unelevated', () => {
123
+ it.skip(' ', () => {
124
+ //
125
+ })
126
+ })
127
+
128
+ describe('(prop): rounded', () => {
129
+ it.skip(' ', () => {
130
+ //
131
+ })
132
+ })
133
+
134
+ describe('(prop): push', () => {
135
+ it.skip(' ', () => {
136
+ //
137
+ })
138
+ })
139
+
140
+ describe('(prop): glossy', () => {
141
+ it.skip(' ', () => {
142
+ //
143
+ })
144
+ })
145
+
146
+ describe('(prop): fab', () => {
147
+ it.skip(' ', () => {
148
+ //
149
+ })
150
+ })
151
+
152
+ describe('(prop): fab-mini', () => {
153
+ it.skip(' ', () => {
154
+ //
155
+ })
156
+ })
157
+
158
+ describe('(prop): padding', () => {
159
+ it.skip(' ', () => {
160
+ //
161
+ })
162
+ })
163
+
164
+ describe('(prop): color', () => {
165
+ it.skip(' ', () => {
166
+ //
167
+ })
168
+ })
169
+
170
+ describe('(prop): text-color', () => {
171
+ it.skip(' ', () => {
172
+ //
173
+ })
174
+ })
175
+
176
+ describe('(prop): dense', () => {
177
+ it.skip(' ', () => {
178
+ //
179
+ })
180
+ })
181
+
182
+ describe('(prop): ripple', () => {
183
+ it.skip(' ', () => {
184
+ //
185
+ })
186
+ })
187
+ })
188
+ })
189
+ })
@@ -1,9 +1,12 @@
1
- import { h } from 'vue'
1
+ import { h, computed } from 'vue'
2
+
3
+ import QIcon from '../icon/QIcon.js'
2
4
 
3
5
  import { createComponent } from '../../utils/private/create.js'
4
6
  import useCheckbox, { useCheckboxProps, useCheckboxEmits } from './use-checkbox.js'
5
7
 
6
8
  const bgNode = h('div', {
9
+ key: 'svg',
7
10
  class: 'q-checkbox__bg absolute'
8
11
  }, [
9
12
  h('svg', {
@@ -30,7 +33,35 @@ export default createComponent({
30
33
  props: useCheckboxProps,
31
34
  emits: useCheckboxEmits,
32
35
 
33
- setup () {
34
- return useCheckbox('checkbox', () => () => [ bgNode ])
36
+ setup (props) {
37
+ function getInner (isTrue, isIndeterminate) {
38
+ const icon = computed(() =>
39
+ (isTrue.value === true
40
+ ? props.checkedIcon
41
+ : (isIndeterminate.value === true
42
+ ? props.indeterminateIcon
43
+ : props.uncheckedIcon
44
+ )
45
+ ) || null
46
+ )
47
+
48
+ return () => (
49
+ icon.value !== null
50
+ ? [
51
+ h('div', {
52
+ key: 'icon',
53
+ class: 'q-checkbox__icon-container absolute flex flex-center no-wrap'
54
+ }, [
55
+ h(QIcon, {
56
+ class: 'q-checkbox__icon',
57
+ name: icon.value
58
+ })
59
+ ])
60
+ ]
61
+ : [ bgNode ]
62
+ )
63
+ }
64
+
65
+ return useCheckbox('checkbox', getInner)
35
66
  }
36
67
  })
@@ -3,5 +3,22 @@
3
3
 
4
4
  "meta": {
5
5
  "docsUrl": "https://v2.quasar.dev/vue-components/checkbox"
6
+ },
7
+
8
+ "props": {
9
+ "checked-icon": {
10
+ "desc": "The icon to be used when the model is truthy (instead of the default design)",
11
+ "addedIn": "v2.5"
12
+ },
13
+
14
+ "unchecked-icon": {
15
+ "desc": "The icon to be used when the toggle is falsy (instead of the default design)",
16
+ "addedIn": "v2.5"
17
+ },
18
+
19
+ "indeterminate-icon": {
20
+ "desc": "The icon to be used when the model is indeterminate (instead of the default design)",
21
+ "addedIn": "v2.5"
22
+ }
6
23
  }
7
24
  }
@@ -3,19 +3,27 @@ $checkbox-transition: .22s cubic-bezier(0,0,.2,1) 0ms
3
3
  .q-checkbox
4
4
  vertical-align: middle
5
5
 
6
- &__bg
6
+ &__native
7
+ width: 1px
8
+ height: 1px
9
+
10
+ &__bg,
11
+ &__icon-container
7
12
  top: 25%
8
13
  left: 25%
9
14
  width: 50%
10
15
  height: 50%
16
+ user-select: none
17
+
18
+ &__bg
11
19
  border: 2px solid currentColor
12
20
  border-radius: 2px
13
21
  transition: background $checkbox-transition
14
22
  -webkit-print-color-adjust: exact
15
23
 
16
- &__native
17
- width: 1px
18
- height: 1px
24
+ &__icon
25
+ color: currentColor
26
+ font-size: .6em
19
27
 
20
28
  &__svg
21
29
  color: #fff
@@ -68,12 +76,16 @@ $checkbox-transition: .22s cubic-bezier(0,0,.2,1) 0ms
68
76
 
69
77
  &--dense
70
78
 
79
+ .q-checkbox__icon
80
+ font-size: .6em
81
+
71
82
  .q-checkbox__inner
72
83
  width: .5em
73
84
  min-width: .5em
74
85
  height: .5em
75
86
 
76
- .q-checkbox__bg
87
+ .q-checkbox__bg,
88
+ .q-checkbox__icon-container
77
89
  left: 5%
78
90
  top: 5%
79
91
  width: 90%
@@ -24,6 +24,10 @@ export const useCheckboxProps = {
24
24
  falseValue: { default: false },
25
25
  indeterminateValue: { default: null },
26
26
 
27
+ checkedIcon: String,
28
+ uncheckedIcon: String,
29
+ indeterminateIcon: String,
30
+
27
31
  toggleOrder: {
28
32
  type: String,
29
33
  validator: v => v === 'tf' || v === 'ft'
@@ -66,6 +66,24 @@
66
66
  "category": "label"
67
67
  },
68
68
 
69
+ "checked-icon": {
70
+ "type": "String",
71
+ "examples": [ "visibility" ],
72
+ "category": "icons"
73
+ },
74
+
75
+ "unchecked-icon": {
76
+ "type": "String",
77
+ "examples": [ "visibility_off" ],
78
+ "category": "icons"
79
+ },
80
+
81
+ "indeterminate-icon": {
82
+ "type": "String",
83
+ "examples": [ "help" ],
84
+ "category": "icons"
85
+ },
86
+
69
87
  "color": {
70
88
  "extends": "color"
71
89
  },