quasar 2.16.0 → 2.16.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 (125) hide show
  1. package/dist/api/QInput.json +1 -1
  2. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  3. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  4. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  5. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  6. package/dist/icon-set/fontawesome-v6-pro.umd.prod.js +1 -1
  7. package/dist/icon-set/fontawesome-v6.umd.prod.js +1 -1
  8. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  9. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  10. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  11. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  12. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  13. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  14. package/dist/icon-set/material-symbols-outlined.umd.prod.js +1 -1
  15. package/dist/icon-set/material-symbols-rounded.umd.prod.js +1 -1
  16. package/dist/icon-set/material-symbols-sharp.umd.prod.js +1 -1
  17. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  18. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  19. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  20. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  21. package/dist/icon-set/mdi-v7.umd.prod.js +1 -1
  22. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  23. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  24. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  25. package/dist/icon-set/svg-fontawesome-v6.umd.prod.js +1 -1
  26. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  27. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  28. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  29. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  30. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  31. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  32. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  33. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  34. package/dist/icon-set/svg-material-symbols-outlined.umd.prod.js +1 -1
  35. package/dist/icon-set/svg-material-symbols-rounded.umd.prod.js +1 -1
  36. package/dist/icon-set/svg-material-symbols-sharp.umd.prod.js +1 -1
  37. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  38. package/dist/icon-set/svg-mdi-v7.umd.prod.js +1 -1
  39. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  40. package/dist/icon-set/themify.umd.prod.js +1 -1
  41. package/dist/lang/ar-TN.umd.prod.js +1 -1
  42. package/dist/lang/ar.umd.prod.js +1 -1
  43. package/dist/lang/az-Latn.umd.prod.js +1 -1
  44. package/dist/lang/bg.umd.prod.js +1 -1
  45. package/dist/lang/bn.umd.prod.js +1 -1
  46. package/dist/lang/ca.umd.prod.js +1 -1
  47. package/dist/lang/cs.umd.prod.js +1 -1
  48. package/dist/lang/da.umd.prod.js +1 -1
  49. package/dist/lang/de-CH.umd.prod.js +1 -1
  50. package/dist/lang/de-DE.umd.prod.js +1 -1
  51. package/dist/lang/de.umd.prod.js +1 -1
  52. package/dist/lang/el.umd.prod.js +1 -1
  53. package/dist/lang/en-GB.umd.prod.js +1 -1
  54. package/dist/lang/en-US.umd.prod.js +1 -1
  55. package/dist/lang/eo.umd.prod.js +1 -1
  56. package/dist/lang/es.umd.prod.js +1 -1
  57. package/dist/lang/et.umd.prod.js +1 -1
  58. package/dist/lang/eu.umd.prod.js +1 -1
  59. package/dist/lang/fa-IR.umd.prod.js +1 -1
  60. package/dist/lang/fa.umd.prod.js +1 -1
  61. package/dist/lang/fi.umd.prod.js +1 -1
  62. package/dist/lang/fr.umd.prod.js +1 -1
  63. package/dist/lang/gn.umd.prod.js +1 -1
  64. package/dist/lang/he.umd.prod.js +1 -1
  65. package/dist/lang/hi.umd.prod.js +1 -1
  66. package/dist/lang/hr.umd.prod.js +1 -1
  67. package/dist/lang/hu.umd.prod.js +1 -1
  68. package/dist/lang/id.umd.prod.js +1 -1
  69. package/dist/lang/is.umd.prod.js +1 -1
  70. package/dist/lang/it.umd.prod.js +1 -1
  71. package/dist/lang/ja.umd.prod.js +1 -1
  72. package/dist/lang/kk.umd.prod.js +1 -1
  73. package/dist/lang/km.umd.prod.js +1 -1
  74. package/dist/lang/ko-KR.umd.prod.js +1 -1
  75. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  76. package/dist/lang/lt.umd.prod.js +1 -1
  77. package/dist/lang/lu.umd.prod.js +1 -1
  78. package/dist/lang/lv.umd.prod.js +1 -1
  79. package/dist/lang/mk.umd.prod.js +1 -1
  80. package/dist/lang/ml.umd.prod.js +1 -1
  81. package/dist/lang/mm.umd.prod.js +1 -1
  82. package/dist/lang/ms-MY.umd.prod.js +1 -1
  83. package/dist/lang/ms.umd.prod.js +1 -1
  84. package/dist/lang/my.umd.prod.js +1 -1
  85. package/dist/lang/nb-NO.umd.prod.js +1 -1
  86. package/dist/lang/nl.umd.prod.js +1 -1
  87. package/dist/lang/pl.umd.prod.js +1 -1
  88. package/dist/lang/pt-BR.umd.prod.js +1 -1
  89. package/dist/lang/pt.umd.prod.js +1 -1
  90. package/dist/lang/ro.umd.prod.js +1 -1
  91. package/dist/lang/ru.umd.prod.js +1 -1
  92. package/dist/lang/sk.umd.prod.js +1 -1
  93. package/dist/lang/sl.umd.prod.js +1 -1
  94. package/dist/lang/sm.umd.prod.js +1 -1
  95. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  96. package/dist/lang/sr.umd.prod.js +1 -1
  97. package/dist/lang/sv.umd.prod.js +1 -1
  98. package/dist/lang/ta.umd.prod.js +1 -1
  99. package/dist/lang/th.umd.prod.js +1 -1
  100. package/dist/lang/tl.umd.prod.js +1 -1
  101. package/dist/lang/tr.umd.prod.js +1 -1
  102. package/dist/lang/ug.umd.prod.js +1 -1
  103. package/dist/lang/uk.umd.prod.js +1 -1
  104. package/dist/lang/uz-Cyrl.umd.prod.js +1 -1
  105. package/dist/lang/uz-Latn.umd.prod.js +1 -1
  106. package/dist/lang/vi.umd.prod.js +1 -1
  107. package/dist/lang/zh-CN.umd.prod.js +1 -1
  108. package/dist/lang/zh-TW.umd.prod.js +1 -1
  109. package/dist/quasar.client.js +35 -17
  110. package/dist/quasar.sass +1 -1
  111. package/dist/quasar.server.prod.cjs +11 -11
  112. package/dist/quasar.server.prod.js +11 -11
  113. package/dist/quasar.umd.js +16 -15
  114. package/dist/quasar.umd.prod.js +11 -11
  115. package/dist/types/index.d.ts +1 -1
  116. package/dist/vetur/quasar-attributes.json +1 -1
  117. package/dist/web-types/web-types.json +1 -1
  118. package/package.json +2 -1
  119. package/src/components/field/QField.js +1 -4
  120. package/src/components/input/QInput.js +4 -2
  121. package/src/components/input/QInput.json +1 -1
  122. package/src/composables/private.use-field/use-field.js +10 -5
  123. package/src/flags.dev.js +37 -0
  124. package/src/index.dev.js +2 -0
  125. package/src/index.prod.js +0 -37
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quasar",
3
- "version": "2.16.0",
3
+ "version": "2.16.2",
4
4
  "description": "Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time",
5
5
  "type": "module",
6
6
  "unpkg": "dist/quasar.umd.prod.js",
@@ -15,6 +15,7 @@
15
15
  ],
16
16
  "exports": {
17
17
  ".": {
18
+ "types": "./dist/types/index.d.ts",
18
19
  "require": "./dist/quasar.server.prod.cjs",
19
20
  "node": "./dist/quasar.server.prod.js",
20
21
  "import": "./dist/quasar.client.js"
@@ -20,10 +20,7 @@ export default createComponent({
20
20
 
21
21
  setup () {
22
22
  return useField(
23
- useFieldState({
24
- requiredForAttr: false,
25
- tagProp: true
26
- })
23
+ useFieldState({ tagProp: true })
27
24
  )
28
25
  }
29
26
  })
@@ -22,7 +22,9 @@ export default createComponent({
22
22
  ...useFormProps,
23
23
 
24
24
  // override of useFieldProps > modelValue
25
- modelValue: [ String, Number ],
25
+ modelValue: __QUASAR_SSR_SERVER__
26
+ ? {} // SSR does not know about FileList
27
+ : [ String, Number, FileList ],
26
28
 
27
29
  shadowText: String,
28
30
 
@@ -69,7 +71,7 @@ export default createComponent({
69
71
 
70
72
  const onComposition = useKeyComposition(onInput)
71
73
 
72
- const state = useFieldState()
74
+ const state = useFieldState({ changeEvent: true })
73
75
 
74
76
  const isTextarea = computed(() =>
75
77
  props.type === 'textarea' || props.autogrow === true
@@ -8,7 +8,7 @@
8
8
  "props": {
9
9
  "model-value": {
10
10
  "extends": "model-value",
11
- "type": [ "String", "Number", "null", "undefined" ],
11
+ "type": [ "String", "Number", "FileList", "null", "undefined" ],
12
12
  "desc": "Model of the component; Either use this property (along with a listener for 'update:modelValue' event) OR use v-model directive",
13
13
  "examples": [ "# v-model=\"myText\"" ]
14
14
  },
@@ -71,7 +71,7 @@ export const useFieldProps = {
71
71
 
72
72
  export const useFieldEmits = [ 'update:modelValue', 'clear', 'focus', 'blur' ]
73
73
 
74
- export function useFieldState ({ requiredForAttr = true, tagProp } = {}) {
74
+ export function useFieldState ({ requiredForAttr = true, tagProp, changeEvent = false } = {}) {
75
75
  const { props, proxy } = getCurrentInstance()
76
76
 
77
77
  const isDark = useDark(props, proxy.$q)
@@ -82,6 +82,7 @@ export function useFieldState ({ requiredForAttr = true, tagProp } = {}) {
82
82
 
83
83
  return {
84
84
  requiredForAttr,
85
+ changeEvent,
85
86
  tag: tagProp === true
86
87
  ? computed(() => props.tag)
87
88
  : { value: 'label' },
@@ -343,6 +344,7 @@ export default function (state) {
343
344
  }
344
345
 
345
346
  emit('update:modelValue', null)
347
+ state.changeEvent === true && emit('change', null)
346
348
  emit('clear', props.modelValue)
347
349
 
348
350
  nextTick(() => {
@@ -352,6 +354,10 @@ export default function (state) {
352
354
  })
353
355
  }
354
356
 
357
+ function onClearableKeyup (evt) {
358
+ [ 13, 32 ].includes(evt.keyCode) && clearValue(evt)
359
+ }
360
+
355
361
  function getContent () {
356
362
  const node = []
357
363
 
@@ -390,12 +396,11 @@ export default function (state) {
390
396
  getInnerAppendNode('inner-clearable-append', [
391
397
  h(QIcon, {
392
398
  class: 'q-field__focusable-action',
393
- tag: 'button',
394
399
  name: props.clearIcon || $q.iconSet.field.clear,
395
400
  tabindex: 0,
396
- type: 'button',
397
- 'aria-hidden': null,
398
- role: null,
401
+ role: 'button',
402
+ 'aria-label': $q.lang.label.clear,
403
+ onKeyup: onClearableKeyup,
399
404
  onClick: clearValue
400
405
  })
401
406
  ])
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Quasar runtime flags are needed only if NOT using
3
+ * Quasar CLI or @quasar/vite-plugin or vue-cli-plugin-quasar
4
+ */
5
+
6
+ let attachPoint = null
7
+
8
+ function getAttachPoint () {
9
+ if (attachPoint !== null) return attachPoint
10
+ return (
11
+ attachPoint = typeof globalThis !== 'undefined'
12
+ ? globalThis
13
+ : (
14
+ typeof self !== 'undefined'
15
+ ? self
16
+ : (
17
+ typeof window !== 'undefined'
18
+ ? window
19
+ : (
20
+ typeof global !== 'undefined'
21
+ ? global
22
+ : {}
23
+ )
24
+ )
25
+ )
26
+ )
27
+ }
28
+
29
+ if (typeof __QUASAR_SSR__ !== 'boolean') {
30
+ getAttachPoint().__QUASAR_SSR__ = false
31
+ }
32
+ if (typeof __QUASAR_SSR_CLIENT__ !== 'boolean') {
33
+ getAttachPoint().__QUASAR_SSR_CLIENT__ = false
34
+ }
35
+ if (typeof __QUASAR_SSR_PWA__ !== 'boolean') {
36
+ getAttachPoint().__QUASAR_SSR_PWA__ = false
37
+ }
package/src/index.dev.js CHANGED
@@ -1,7 +1,9 @@
1
1
  /**
2
2
  * client entry-point used by @quasar/vite-plugin for DEV only
3
+ * but also pointed to as entry-point in package.json
3
4
  */
4
5
 
6
+ import './flags.dev.js'
5
7
  import installQuasar from './install-quasar.js'
6
8
  import Lang from './plugins/lang/Lang.js'
7
9
  import IconSet from './plugins/icon-set/IconSet.js'
package/src/index.prod.js DELETED
@@ -1,37 +0,0 @@
1
- /**
2
- * client prod entry-point that is not used by Quasar CLI,
3
- * but pointed to in package.json > module
4
- */
5
-
6
- import installQuasar from './install-quasar.js'
7
- import Lang from './plugins/lang/Lang.js'
8
- import IconSet from './plugins/icon-set/IconSet.js'
9
-
10
- import * as components from './components.js'
11
- import * as directives from './directives.js'
12
-
13
- export * from './components.js'
14
- export * from './directives.js'
15
- export * from './plugins.js'
16
- export * from './composables.js'
17
- export * from './utils.js'
18
-
19
- export const Quasar = {
20
- version: __QUASAR_VERSION__,
21
-
22
- install (app, opts, ssrContext) {
23
- installQuasar(
24
- app,
25
- { components, directives, ...opts },
26
- ssrContext
27
- )
28
- },
29
-
30
- // TODO: remove in Qv3 (should only be used through the plugin)
31
- // We provide a deprecated fallback here
32
- lang: Lang,
33
-
34
- // TODO: remove in Qv3 (should only be used through the plugin)
35
- // We provide a deprecated fallback here
36
- iconSet: IconSet
37
- }