@udixio/ui-react 2.7.0 → 2.8.0

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.
@@ -5,5 +5,5 @@ import { ReactProps } from '../utils/component';
5
5
  * @status beta
6
6
  * @category Action
7
7
  */
8
- export declare const FabMenu: ({ className, label, variant, size, href, type, icon, extended, ref, transition, children, open: openProp, defaultOpen, onOpenChange, ...restProps }: ReactProps<FabMenuInterface>) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const FabMenu: ({ className, label, variant, size, href, icon, extended, ref, transition, children, open: openProp, defaultOpen, onOpenChange, ...restProps }: ReactProps<FabMenuInterface>) => import("react/jsx-runtime").JSX.Element;
9
9
  //# sourceMappingURL=FabMenu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FabMenu.d.ts","sourceRoot":"","sources":["../../../src/lib/components/FabMenu.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAShD;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAAI,qJAgBrB,UAAU,CAAC,gBAAgB,CAAC,4CAmM9B,CAAC"}
1
+ {"version":3,"file":"FabMenu.d.ts","sourceRoot":"","sources":["../../../src/lib/components/FabMenu.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAShD;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAAI,+IAerB,UAAU,CAAC,gBAAgB,CAAC,4CAoM9B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"fab.style.d.ts","sourceRoot":"","sources":["../../../src/lib/styles/fab.style.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EAIxB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAoC3D,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8DAAoD,CAAC;AAE1E,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;6DAAsD,CAAC"}
1
+ {"version":3,"file":"fab.style.d.ts","sourceRoot":"","sources":["../../../src/lib/styles/fab.style.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EAIxB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAwC3D,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8DAAoD,CAAC;AAE1E,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;6DAAsD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@udixio/ui-react",
3
- "version": "2.7.0",
3
+ "version": "2.8.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -21,7 +21,6 @@ export const FabMenu = ({
21
21
  variant = 'primary',
22
22
  size = 'medium',
23
23
  href,
24
- type,
25
24
  icon,
26
25
  extended = false,
27
26
  ref,
@@ -105,6 +104,7 @@ export const FabMenu = ({
105
104
 
106
105
  const variants = {
107
106
  open: {
107
+ overflow: 'visible',
108
108
  opacity: 1,
109
109
  width: 'auto',
110
110
  transition: {
@@ -116,13 +116,14 @@ export const FabMenu = ({
116
116
  },
117
117
  },
118
118
  close: {
119
+ overflow: 'hidden',
119
120
  opacity: 0,
120
121
  width: 0,
121
122
  transition: {
122
123
  ...transition,
123
124
  delay,
124
125
  opacity: {
125
- duration: transition?.duration / 2,
126
+ duration: transition?.duration / 1.5,
126
127
  },
127
128
  },
128
129
  },
@@ -132,7 +133,6 @@ export const FabMenu = ({
132
133
  <motion.div
133
134
  initial={'close'}
134
135
  animate={'open'}
135
- className={'overflow-hidden'}
136
136
  variants={variants}
137
137
  transition={transition}
138
138
  exit={'close'}
@@ -14,14 +14,14 @@ const fabConfig: ClassNameComponent<FabInterface> = ({
14
14
  fab: classNames(
15
15
  'flex shadow-3 hover:shadow-4 group/fab overflow-hidden outline-none items-center cursor-pointer',
16
16
  {
17
- 'rounded-[12px]': size == 'small' && !extended,
18
- 'rounded-[16px]': size == 'medium' || extended,
19
- 'rounded-[28px]': size == 'large' && !extended,
17
+ 'rounded-[12px]': size == 'small',
18
+ 'rounded-[16px]': size == 'medium',
19
+ 'rounded-[28px]': size == 'large',
20
20
  },
21
21
  {
22
- 'p-2': size == 'small' && !extended,
23
- 'p-4': size == 'medium' || extended,
24
- 'p-[30px]': size == 'large' && !extended,
22
+ 'p-2': size == 'small',
23
+ 'p-4': size == 'medium',
24
+ 'p-[30px]': size == 'large',
25
25
  },
26
26
  variant === 'primary' && 'bg-primary text-on-primary',
27
27
  variant === 'secondary' && 'bg-secondary text-on-secondary',
@@ -34,10 +34,14 @@ const fabConfig: ClassNameComponent<FabInterface> = ({
34
34
  'bg-tertiary-container text-on-tertiary-container',
35
35
  ),
36
36
  icon: classNames({
37
- 'size-6': size == 'small' || size == 'medium' || extended,
38
- 'size-9': size == 'large' && !extended,
37
+ 'size-6': size == 'small' || size == 'medium',
38
+ 'size-9': size == 'large',
39
+ }),
40
+ label: classNames('text-nowrap', {
41
+ 'text-title-medium': size == 'small',
42
+ 'text-title-large': size == 'medium',
43
+ 'text-headline-small': size == 'large',
39
44
  }),
40
- label: classNames('text-title-medium text-nowrap'),
41
45
  });
42
46
 
43
47
  export const fabStyle = defaultClassNames<FabInterface>('fab', fabConfig);