frappe-ui 0.1.51 → 0.1.53

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "frappe-ui",
3
- "version": "0.1.51",
3
+ "version": "0.1.53",
4
4
  "description": "A set of components and utilities for rapid UI development",
5
5
  "main": "./src/index.js",
6
6
  "scripts": {
package/readme.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <p align="center">
2
2
  <a href="https://github.com/frappe/frappe-ui">
3
- <img src="./docs/public/frappe-ui-logo.svg" width="250" />
3
+ <img src="./frappe-ui.svg" width="250" />
4
4
  </a>
5
5
  </p>
6
6
  <h1 style="font-size: 24px" align="center">Rapidly build modern frontends for Frappe apps</h1>
@@ -56,7 +56,7 @@ Now, you can import needed components and start using it:
56
56
 
57
57
  ```html
58
58
  <template>
59
- <Button>Click me</Button>
59
+ <button>Click me</button>
60
60
  </template>
61
61
  <script>
62
62
  import { Button } from 'frappe-ui'
@@ -51,7 +51,11 @@ export default {
51
51
  },
52
52
  },
53
53
  methods: {
54
- openFileSelector() {
54
+ openFileSelector(type) {
55
+ if (type) {
56
+ // change inputs filetype to accept the type of file you want to upload
57
+ this.$refs['input'].accept = type
58
+ }
55
59
  this.$refs['input'].click()
56
60
  },
57
61
  async onFileAdd(e) {
@@ -85,7 +85,7 @@ const changedIndex = computed({
85
85
 
86
86
  const tabRef = ref([])
87
87
  const indicator = ref(null)
88
- const tabsLength = ref(props.tabs?.length)
88
+ const tabsLength = computed(() => props.tabs?.length)
89
89
 
90
90
  const indicatorLeft = ref(props.options?.indicatorLeft)
91
91
  const transitionClass = ref('')
@@ -1,7 +1,7 @@
1
1
  import { watch } from 'vue'
2
2
 
3
3
  let faviconRef = document.querySelector('link[rel="icon"]')
4
- let defaultFavIcon = faviconRef.href
4
+ let defaultFavIcon = faviconRef?.href
5
5
 
6
6
  export function usePageMeta(fn) {
7
7
  watch(