frappe-ui 0.1.15 → 0.1.16

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.15",
3
+ "version": "0.1.16",
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
@@ -52,9 +52,11 @@ module.exports = {
52
52
  }
53
53
  ```
54
54
 
55
+ Now, you can import needed components and start using it:
56
+
55
57
  ```html
56
58
  <template>
57
- <button>Click me</button>
59
+ <Button>Click me</Button>
58
60
  </template>
59
61
  <script>
60
62
  import { Button } from 'frappe-ui'
@@ -27,7 +27,8 @@
27
27
  </Tab>
28
28
  <div
29
29
  ref="indicator"
30
- class="absolute -bottom-px h-px bg-gray-900 transition-all duration-300 ease-in-out"
30
+ class="absolute -bottom-px h-px bg-gray-900"
31
+ :class="transitionClass"
31
32
  :style="{ left: `${indicatorLeft}px` }"
32
33
  />
33
34
  </TabList>
@@ -76,6 +77,7 @@ const indicator = ref(null)
76
77
  const tabsLength = ref(props.tabs?.length)
77
78
 
78
79
  const indicatorLeft = ref(props.options?.indicatorLeft)
80
+ const transitionClass = ref('')
79
81
 
80
82
  function moveIndicator(index) {
81
83
  if (index >= tabsLength.value) {
@@ -93,5 +95,10 @@ watch(changedIndex, (index) => {
93
95
  nextTick(() => moveIndicator(index))
94
96
  })
95
97
 
96
- onMounted(() => moveIndicator(changedIndex.value))
98
+ onMounted(() => {
99
+ moveIndicator(changedIndex.value)
100
+ nextTick(() => {
101
+ transitionClass.value = 'transition-all duration-300 ease-in-out'
102
+ })
103
+ })
97
104
  </script>