quasar 2.12.3 → 2.12.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 (207) hide show
  1. package/dist/api/Dialog.json +4 -0
  2. package/dist/api/Loading.json +18 -0
  3. package/dist/api/Notify.json +48 -2
  4. package/dist/api/QAjaxBar.json +2 -0
  5. package/dist/api/QAvatar.json +4 -0
  6. package/dist/api/QBadge.json +4 -0
  7. package/dist/api/QBreadcrumbs.json +4 -0
  8. package/dist/api/QBtn.json +4 -0
  9. package/dist/api/QBtnDropdown.json +4 -0
  10. package/dist/api/QBtnToggle.json +8 -0
  11. package/dist/api/QCarousel.json +4 -0
  12. package/dist/api/QChatMessage.json +4 -0
  13. package/dist/api/QCheckbox.json +2 -0
  14. package/dist/api/QChip.json +4 -0
  15. package/dist/api/QCircularProgress.json +6 -0
  16. package/dist/api/QDate.json +4 -0
  17. package/dist/api/QEditor.json +4 -0
  18. package/dist/api/QFab.json +4 -0
  19. package/dist/api/QFabAction.json +4 -0
  20. package/dist/api/QField.json +6 -0
  21. package/dist/api/QFile.json +6 -0
  22. package/dist/api/QIcon.json +2 -0
  23. package/dist/api/QImg.json +2 -0
  24. package/dist/api/QInnerLoading.json +2 -0
  25. package/dist/api/QInput.json +6 -0
  26. package/dist/api/QKnob.json +6 -0
  27. package/dist/api/QLinearProgress.json +4 -0
  28. package/dist/api/QOptionGroup.json +2 -0
  29. package/dist/api/QPagination.json +8 -0
  30. package/dist/api/QPopupEdit.json +2 -0
  31. package/dist/api/QPullToRefresh.json +4 -0
  32. package/dist/api/QRadio.json +2 -0
  33. package/dist/api/QRange.json +26 -0
  34. package/dist/api/QRating.json +6 -0
  35. package/dist/api/QSelect.json +6 -0
  36. package/dist/api/QSeparator.json +2 -0
  37. package/dist/api/QSlideItem.json +8 -0
  38. package/dist/api/QSlider.json +14 -0
  39. package/dist/api/QSpinner.json +2 -0
  40. package/dist/api/QSpinnerAudio.json +2 -0
  41. package/dist/api/QSpinnerBall.json +2 -0
  42. package/dist/api/QSpinnerBars.json +2 -0
  43. package/dist/api/QSpinnerBox.json +2 -0
  44. package/dist/api/QSpinnerClock.json +2 -0
  45. package/dist/api/QSpinnerComment.json +2 -0
  46. package/dist/api/QSpinnerCube.json +2 -0
  47. package/dist/api/QSpinnerDots.json +2 -0
  48. package/dist/api/QSpinnerFacebook.json +2 -0
  49. package/dist/api/QSpinnerGears.json +2 -0
  50. package/dist/api/QSpinnerGrid.json +2 -0
  51. package/dist/api/QSpinnerHearts.json +2 -0
  52. package/dist/api/QSpinnerHourglass.json +2 -0
  53. package/dist/api/QSpinnerInfinity.json +2 -0
  54. package/dist/api/QSpinnerIos.json +2 -0
  55. package/dist/api/QSpinnerOrbit.json +2 -0
  56. package/dist/api/QSpinnerOval.json +2 -0
  57. package/dist/api/QSpinnerPie.json +2 -0
  58. package/dist/api/QSpinnerPuff.json +2 -0
  59. package/dist/api/QSpinnerRadio.json +2 -0
  60. package/dist/api/QSpinnerRings.json +2 -0
  61. package/dist/api/QSpinnerTail.json +2 -0
  62. package/dist/api/QStep.json +8 -0
  63. package/dist/api/QStepper.json +8 -0
  64. package/dist/api/QTable.json +20 -0
  65. package/dist/api/QTabs.json +6 -0
  66. package/dist/api/QTime.json +4 -0
  67. package/dist/api/QTimeline.json +2 -0
  68. package/dist/api/QTimelineEntry.json +2 -0
  69. package/dist/api/QToggle.json +4 -0
  70. package/dist/api/QTree.json +8 -0
  71. package/dist/api/QUploader.json +4 -0
  72. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  73. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  74. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  75. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  76. package/dist/icon-set/fontawesome-v6-pro.umd.prod.js +1 -1
  77. package/dist/icon-set/fontawesome-v6.umd.prod.js +1 -1
  78. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  79. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  80. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  81. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  82. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  83. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  84. package/dist/icon-set/material-symbols-outlined.umd.prod.js +1 -1
  85. package/dist/icon-set/material-symbols-rounded.umd.prod.js +1 -1
  86. package/dist/icon-set/material-symbols-sharp.umd.prod.js +1 -1
  87. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  88. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  89. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  90. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  91. package/dist/icon-set/mdi-v7.umd.prod.js +1 -1
  92. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  93. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  94. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  95. package/dist/icon-set/svg-fontawesome-v6.umd.prod.js +1 -1
  96. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  97. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  98. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  99. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  100. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  101. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  102. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  103. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  104. package/dist/icon-set/svg-material-symbols-outlined.umd.prod.js +1 -1
  105. package/dist/icon-set/svg-material-symbols-rounded.umd.prod.js +1 -1
  106. package/dist/icon-set/svg-material-symbols-sharp.umd.prod.js +1 -1
  107. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  108. package/dist/icon-set/svg-mdi-v7.umd.prod.js +1 -1
  109. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  110. package/dist/icon-set/themify.umd.prod.js +1 -1
  111. package/dist/lang/ar-TN.umd.prod.js +1 -1
  112. package/dist/lang/ar.umd.prod.js +1 -1
  113. package/dist/lang/az-Latn.umd.prod.js +1 -1
  114. package/dist/lang/bg.umd.prod.js +1 -1
  115. package/dist/lang/bn.umd.prod.js +1 -1
  116. package/dist/lang/ca.umd.prod.js +1 -1
  117. package/dist/lang/cs.umd.prod.js +1 -1
  118. package/dist/lang/da.umd.prod.js +1 -1
  119. package/dist/lang/de.umd.prod.js +1 -1
  120. package/dist/lang/el.umd.prod.js +1 -1
  121. package/dist/lang/en-GB.umd.prod.js +1 -1
  122. package/dist/lang/en-US.umd.prod.js +1 -1
  123. package/dist/lang/eo.umd.prod.js +1 -1
  124. package/dist/lang/es.umd.prod.js +1 -1
  125. package/dist/lang/et.umd.prod.js +1 -1
  126. package/dist/lang/eu.umd.prod.js +1 -1
  127. package/dist/lang/fa-IR.umd.prod.js +1 -1
  128. package/dist/lang/fa.umd.prod.js +1 -1
  129. package/dist/lang/fi.umd.prod.js +1 -1
  130. package/dist/lang/fr.umd.prod.js +1 -1
  131. package/dist/lang/gn.umd.prod.js +1 -1
  132. package/dist/lang/he.umd.prod.js +1 -1
  133. package/dist/lang/hi.umd.prod.js +6 -0
  134. package/dist/lang/hr.umd.prod.js +1 -1
  135. package/dist/lang/hu.umd.prod.js +1 -1
  136. package/dist/lang/id.umd.prod.js +1 -1
  137. package/dist/lang/is.umd.prod.js +1 -1
  138. package/dist/lang/it.umd.prod.js +1 -1
  139. package/dist/lang/ja.umd.prod.js +1 -1
  140. package/dist/lang/kk.umd.prod.js +1 -1
  141. package/dist/lang/km.umd.prod.js +1 -1
  142. package/dist/lang/ko-KR.umd.prod.js +1 -1
  143. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  144. package/dist/lang/lt.umd.prod.js +1 -1
  145. package/dist/lang/lu.umd.prod.js +1 -1
  146. package/dist/lang/lv.umd.prod.js +1 -1
  147. package/dist/lang/mk.umd.prod.js +1 -1
  148. package/dist/lang/ml.umd.prod.js +1 -1
  149. package/dist/lang/mm.umd.prod.js +1 -1
  150. package/dist/lang/ms.umd.prod.js +1 -1
  151. package/dist/lang/my.umd.prod.js +1 -1
  152. package/dist/lang/nb-NO.umd.prod.js +1 -1
  153. package/dist/lang/nl.umd.prod.js +1 -1
  154. package/dist/lang/pl.umd.prod.js +1 -1
  155. package/dist/lang/pt-BR.umd.prod.js +1 -1
  156. package/dist/lang/pt.umd.prod.js +1 -1
  157. package/dist/lang/ro.umd.prod.js +1 -1
  158. package/dist/lang/ru.umd.prod.js +1 -1
  159. package/dist/lang/sk.umd.prod.js +1 -1
  160. package/dist/lang/sl.umd.prod.js +1 -1
  161. package/dist/lang/sm.umd.prod.js +1 -1
  162. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  163. package/dist/lang/sr.umd.prod.js +1 -1
  164. package/dist/lang/sv.umd.prod.js +1 -1
  165. package/dist/lang/ta.umd.prod.js +1 -1
  166. package/dist/lang/th.umd.prod.js +1 -1
  167. package/dist/lang/tr.umd.prod.js +1 -1
  168. package/dist/lang/ug.umd.prod.js +1 -1
  169. package/dist/lang/uk.umd.prod.js +1 -1
  170. package/dist/lang/uz-Cyrl.umd.prod.js +1 -1
  171. package/dist/lang/uz-Latn.umd.prod.js +1 -1
  172. package/dist/lang/vi.umd.prod.js +1 -1
  173. package/dist/lang/zh-CN.umd.prod.js +1 -1
  174. package/dist/lang/zh-TW.umd.prod.js +1 -1
  175. package/dist/quasar.cjs.prod.js +2 -2
  176. package/dist/quasar.css +5 -8
  177. package/dist/quasar.esm.js +20 -17
  178. package/dist/quasar.esm.prod.js +2 -2
  179. package/dist/quasar.prod.css +1 -1
  180. package/dist/quasar.rtl.css +5 -8
  181. package/dist/quasar.rtl.prod.css +1 -1
  182. package/dist/quasar.sass +5 -4
  183. package/dist/quasar.umd.js +20 -17
  184. package/dist/quasar.umd.prod.js +2 -2
  185. package/dist/transforms/api-list.json +2 -2
  186. package/dist/types/api/color.d.ts +51 -0
  187. package/dist/types/api.d.ts +1 -0
  188. package/dist/types/index.d.ts +221 -215
  189. package/dist/types/utils/colors.d.ts +5 -3
  190. package/dist/types/utils/patterns.d.ts +10 -0
  191. package/dist/types/utils.d.ts +8 -3
  192. package/dist/web-types/web-types.json +138 -138
  193. package/lang/hi.js +98 -0
  194. package/lang/hi.mjs +93 -0
  195. package/lang/index.json +4 -0
  196. package/package.json +2 -2
  197. package/src/api.extends.json +4 -2
  198. package/src/components/input/__tests__/QInput.cy.js +707 -26
  199. package/src/components/input/__tests__/use-mask.cy.js +101 -6
  200. package/src/components/input/use-mask.js +4 -1
  201. package/src/components/select/QSelect.js +2 -2
  202. package/src/components/spinner/QSpinnerComment.js +1 -1
  203. package/src/components/spinner/QSpinnerCube.js +5 -5
  204. package/src/components/spinner/QSpinnerFacebook.js +3 -3
  205. package/src/components/spinner/QSpinnerHourglass.js +2 -2
  206. package/src/css/normalize.sass +5 -9
  207. package/src/plugins/Notify.json +22 -2
@@ -1,21 +1,116 @@
1
+ import QInput from '../QInput'
2
+
3
+ function getHostElement () {
4
+ return cy.get('.q-field')
5
+ }
6
+
7
+ function mountQInput (options) {
8
+ return cy.mount(QInput, options)
9
+ }
10
+
1
11
  describe('use-mask API', () => {
2
12
  describe('Props', () => {
3
13
  describe('Category: behavior', () => {
4
14
  describe('(prop): mask', () => {
5
- it.skip(' ', () => {
6
- //
15
+ const masks = [
16
+ {
17
+ mask: 'card',
18
+ value: '4242424242424242',
19
+ valueWithMask: '4242 4242 4242 4242'
20
+ },
21
+ {
22
+ mask: 'phone',
23
+ value: '2374234234',
24
+ valueWithMask: '(237) 423 - 4234'
25
+ },
26
+ {
27
+ mask: '###@#*#',
28
+ value: '22222',
29
+ valueWithMask: '222@2*2'
30
+ },
31
+ {
32
+ mask: 'fulltime',
33
+ value: '222222',
34
+ valueWithMask: '22:22:22'
35
+ },
36
+ {
37
+ mask: 'time',
38
+ value: '222222',
39
+ valueWithMask: '22:22'
40
+ },
41
+ {
42
+ mask: 'date',
43
+ value: '20230501',
44
+ valueWithMask: '2023/05/01'
45
+ },
46
+ {
47
+ mask: 'datetime',
48
+ value: '2023050106:33',
49
+ valueWithMask: '2023/05/01 06:33'
50
+ }
51
+ ]
52
+ masks.forEach(({ value, valueWithMask, ...props }) => {
53
+ it(`should enforce a '${ props.mask }' mask`, () => {
54
+ mountQInput({
55
+ props
56
+ })
57
+
58
+ getHostElement().get('input').type(value)
59
+
60
+ getHostElement().get('input')
61
+ .should('not.have.value', value)
62
+ .should('have.value', valueWithMask)
63
+ })
7
64
  })
8
65
  })
9
66
 
10
67
  describe('(prop): fill-mask', () => {
11
- it.skip(' ', () => {
12
- //
68
+ it('should use a default fill mask if one is not set', () => {
69
+ mountQInput({
70
+ props: {
71
+ fillMask: true,
72
+ mask: '###-###'
73
+ }
74
+ })
75
+
76
+ getHostElement().get('input').type('222')
77
+
78
+ getHostElement().get('input')
79
+ .should('not.have.value', '222')
80
+ .should('have.value', '222-___')
81
+ })
82
+
83
+ it('should use a default fill mask if one is not set', () => {
84
+ mountQInput({
85
+ props: {
86
+ fillMask: '@',
87
+ mask: '###-###'
88
+ }
89
+ })
90
+
91
+ getHostElement().get('input').type('222')
92
+
93
+ getHostElement().get('input')
94
+ .should('not.have.value', '222')
95
+ .should('have.value', '222-@@@')
13
96
  })
14
97
  })
15
98
 
16
99
  describe('(prop): reverse-fill-mask', () => {
17
- it.skip(' ', () => {
18
- //
100
+ it('should enforce a reverse-fill-mask', () => {
101
+ mountQInput({
102
+ props: {
103
+ fillMask: true,
104
+ reverseFillMask: true,
105
+ mask: '###-###'
106
+ }
107
+ })
108
+
109
+ getHostElement().get('input').type('12345')
110
+
111
+ getHostElement().get('input')
112
+ .should('not.have.value', '12345')
113
+ .should('have.value', '_12-345')
19
114
  })
20
115
  })
21
116
 
@@ -430,7 +430,10 @@ export default function (props, emit, emitValue, inputRef) {
430
430
  function onMaskedKeydown (e) {
431
431
  emit('keydown', e)
432
432
 
433
- if (shouldIgnoreKey(e) === true) {
433
+ if (
434
+ shouldIgnoreKey(e) === true
435
+ || e.altKey === true // let browser handle these
436
+ ) {
434
437
  return
435
438
  }
436
439
 
@@ -872,12 +872,12 @@ export default createComponent({
872
872
  mode = props.newValueMode
873
873
  }
874
874
 
875
+ updateInputValue('', props.multiple !== true, true)
876
+
875
877
  if (val === void 0 || val === null) {
876
878
  return
877
879
  }
878
880
 
879
- updateInputValue('', props.multiple !== true, true)
880
-
881
881
  const fn = mode === 'toggle' ? toggleOption : add
882
882
  fn(val, mode === 'add-unique')
883
883
 
@@ -8,7 +8,7 @@ const svg = [
8
8
  h('rect', {
9
9
  x: '0',
10
10
  y: '0',
11
- width: ' 100',
11
+ width: '100',
12
12
  height: '100',
13
13
  fill: 'none'
14
14
  }),
@@ -8,7 +8,7 @@ const svg = [
8
8
  h('rect', {
9
9
  x: '0',
10
10
  y: '0',
11
- width: ' 100',
11
+ width: '100',
12
12
  height: '100',
13
13
  fill: 'none'
14
14
  }),
@@ -18,7 +18,7 @@ const svg = [
18
18
  h('rect', {
19
19
  x: '-20',
20
20
  y: '-20',
21
- width: ' 40',
21
+ width: '40',
22
22
  height: '40',
23
23
  fill: 'currentColor',
24
24
  opacity: '0.9'
@@ -43,7 +43,7 @@ const svg = [
43
43
  h('rect', {
44
44
  x: '-20',
45
45
  y: '-20',
46
- width: ' 40',
46
+ width: '40',
47
47
  height: '40',
48
48
  fill: 'currentColor',
49
49
  opacity: '0.8'
@@ -68,7 +68,7 @@ const svg = [
68
68
  h('rect', {
69
69
  x: '-20',
70
70
  y: '-20',
71
- width: ' 40',
71
+ width: '40',
72
72
  height: '40',
73
73
  fill: 'currentColor',
74
74
  opacity: '0.7'
@@ -93,7 +93,7 @@ const svg = [
93
93
  h('rect', {
94
94
  x: '-20',
95
95
  y: '-20',
96
- width: ' 40',
96
+ width: '40',
97
97
  height: '40',
98
98
  fill: 'currentColor',
99
99
  opacity: '0.6'
@@ -11,7 +11,7 @@ const svg = [
11
11
  h('rect', {
12
12
  x: '-10',
13
13
  y: '-30',
14
- width: ' 20',
14
+ width: '20',
15
15
  height: '60',
16
16
  fill: 'currentColor',
17
17
  opacity: '0.6'
@@ -37,7 +37,7 @@ const svg = [
37
37
  h('rect', {
38
38
  x: '-10',
39
39
  y: '-30',
40
- width: ' 20',
40
+ width: '20',
41
41
  height: '60',
42
42
  fill: 'currentColor',
43
43
  opacity: '0.8'
@@ -63,7 +63,7 @@ const svg = [
63
63
  h('rect', {
64
64
  x: '-10',
65
65
  y: '-30',
66
- width: ' 20',
66
+ width: '20',
67
67
  height: '60',
68
68
  fill: 'currentColor',
69
69
  opacity: '0.9'
@@ -19,7 +19,7 @@ const svg = [
19
19
  h('rect', {
20
20
  x: '15',
21
21
  y: '20',
22
- width: ' 70',
22
+ width: '70',
23
23
  height: '25'
24
24
  }, [
25
25
  h('animate', {
@@ -48,7 +48,7 @@ const svg = [
48
48
  h('rect', {
49
49
  x: '15',
50
50
  y: '55',
51
- width: ' 70',
51
+ width: '70',
52
52
  height: '25'
53
53
  }, [
54
54
  h('animate', {
@@ -49,19 +49,15 @@ abbr[title]
49
49
  img
50
50
  border-style: none
51
51
 
52
- /*
53
- * Hide the overflow in IE.
54
- */
55
-
56
- svg:not(:root)
57
- overflow: hidden
58
-
59
52
  /*
60
53
  * line 1: Correct the inheritance and scaling of font size in all browsers.
61
54
  * line 2: Correct the odd `em` font sizing in all browsers.
62
55
  */
63
56
 
64
- code, kbd, pre, samp
57
+ code,
58
+ kbd,
59
+ pre,
60
+ samp
65
61
  font-family: monospace, monospace
66
62
  font-size: 1em
67
63
 
@@ -154,7 +150,7 @@ progress
154
150
  vertical-align: baseline
155
151
 
156
152
  /*
157
- * Remove the default vertical scrollbar in IE.
153
+ * Remove the default vertical scrollbar in IE 10+.
158
154
  */
159
155
 
160
156
  textarea
@@ -20,7 +20,7 @@
20
20
  },
21
21
 
22
22
  "textColor": {
23
- "extends": "color"
23
+ "extends": "text-color"
24
24
  },
25
25
 
26
26
  "message": {
@@ -169,6 +169,26 @@
169
169
  "default": 5000
170
170
  },
171
171
 
172
+ "actions": {
173
+ "type": "Array",
174
+ "tsType": "QNotifyAction",
175
+ "desc": "Notification actions (buttons); Unless 'noDismiss' is true, clicking/tapping on the button will close the notification; Also check 'closeBtn' convenience prop",
176
+ "definition": {
177
+ "noDismiss": {
178
+ "type": "Boolean",
179
+ "desc": "Do not dismiss the notification when the button is clicked/tapped"
180
+ },
181
+ "...": {
182
+ "type": "Any",
183
+ "desc": "Any other QBtn prop expect 'onClick' (use 'handler' instead)",
184
+ "examples": [ "label: 'Learn more'", "color: 'primary'" ]
185
+ }
186
+ },
187
+ "examples": [
188
+ "[ { label: 'Show', handler: () => {}, 'aria-label': 'Button label' }, { icon: 'map', handler: () => {}, color: 'yellow' }, { label: 'Learn more', noDismiss: true, handler: () => {} } ]"
189
+ ]
190
+ },
191
+
172
192
  "closeBtn": {
173
193
  "type": [ "Boolean", "String" ],
174
194
  "desc": "Convenient way to add a dismiss button with a specific label, without using the 'actions' prop; If set to true, it uses a label according to the current Quasar language",
@@ -205,7 +225,7 @@
205
225
  },
206
226
 
207
227
  "textColor": {
208
- "extends": "color"
228
+ "extends": "text-color"
209
229
  },
210
230
 
211
231
  "message": {