@fiscozen/navbar 0.1.4 → 0.1.5

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": "@fiscozen/navbar",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Design System Navbar Component",
5
5
  "main": "src/index.ts",
6
6
  "type": "module",
@@ -9,7 +9,7 @@
9
9
  "peerDependencies": {
10
10
  "tailwindcss": "^3.4.1",
11
11
  "vue": "^3.4.13",
12
- "@fiscozen/button": "^0.1.8"
12
+ "@fiscozen/button": "^1.0.1-next.1"
13
13
  },
14
14
  "devDependencies": {
15
15
  "@rushstack/eslint-patch": "^1.3.3",
@@ -33,8 +33,8 @@
33
33
  },
34
34
  "license": "ISC",
35
35
  "dependencies": {
36
- "@fiscozen/composables": "^0.1.33",
37
- "@fiscozen/style": "^0.1.3"
36
+ "@fiscozen/style": "^0.1.8-next.0",
37
+ "@fiscozen/composables": "^0.1.38"
38
38
  },
39
39
  "scripts": {
40
40
  "coverage": "vitest run --coverage",
package/src/FzNavbar.vue CHANGED
@@ -1,26 +1,34 @@
1
1
  <script lang="ts" setup>
2
- import { ref, onBeforeMount, onMounted, onUnmounted, computed } from 'vue'
2
+ import { computed } from 'vue'
3
3
  import { FzIconButton } from '@fiscozen/button'
4
4
  import { FzNavbarEmits, FzNavbarProps } from './types'
5
- import {breakpoints} from '@fiscozen/style';
6
- import {useBreakpoints} from '@fiscozen/composables';
5
+ import { breakpoints } from '@fiscozen/style'
6
+ import { useBreakpoints } from '@fiscozen/composables'
7
7
 
8
8
  const props = withDefaults(defineProps<FzNavbarProps>(), {
9
- variant: 'horizontal'
9
+ variant: 'horizontal',
10
+ breakpoints: undefined
11
+ })
12
+
13
+ const computedBreakpoints = computed(() => {
14
+ return {
15
+ ...breakpoints,
16
+ ...(props.breakpoints ?? {})
17
+ }
10
18
  })
11
19
 
12
20
  const emit = defineEmits<FzNavbarEmits>()
13
21
 
14
- const {isGreater} = useBreakpoints(breakpoints);
15
- const isGreaterThanLg = isGreater('lg');
16
- const isMobile = computed(() => !isGreaterThanLg.value);
22
+ const { isGreater } = useBreakpoints(computedBreakpoints.value)
23
+ const isGreaterThanLg = isGreater('lg')
24
+ const isMobile = computed(() => !isGreaterThanLg.value)
17
25
  const isVertical = computed(() => Boolean(props.variant === 'vertical'))
18
26
  const isHorizontal = computed(() => Boolean(props.variant === 'horizontal'))
19
27
  </script>
20
28
 
21
29
  <template>
22
30
  <header
23
- class="flex p-12 shadow z-10"
31
+ class="z-10 flex p-12 shadow"
24
32
  :class="{
25
33
  'justify-between': isMobile,
26
34
  'h-full w-56 flex-col': isVertical && !isMobile,
package/src/types.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { Breakpoint } from '@fiscozen/style'
2
+
1
3
  export type FzNavbarVariant = 'horizontal' | 'vertical'
2
4
 
3
5
  interface FzNavbarProps {
@@ -9,6 +11,10 @@ interface FzNavbarProps {
9
11
  * Whether the main navigation menu is open (mobile)
10
12
  */
11
13
  isMenuOpen?: boolean
14
+ /**
15
+ * Override breakpoint for manage custom size inside navbar
16
+ */
17
+ breakpoints?: Partial<Record<Breakpoint, `${number}px`>>
12
18
  }
13
19
 
14
20
  type FzNavbarEmits = {
package/dist/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './src/index'