mui-collage-fab 0.1.0 → 0.1.1

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/README.md CHANGED
@@ -1,15 +1,17 @@
1
1
  # MUI CollageFab
2
2
 
3
+ **[Live demo →](https://www.radomir.dev/mui-collage-fab/)**
4
+
5
+ | Collapsed | Expanded |
6
+ | --- | --- |
7
+ | <img src="https://raw.githubusercontent.com/radomir-dev/mui-collage-fab/main/docs/collagefab-collapsed.png" alt="Three CollageFab buttons collapsed into a single stacked circle" width="400" /> | <img src="https://raw.githubusercontent.com/radomir-dev/mui-collage-fab/main/docs/collagefab-expanded.png" alt="Three CollageFab buttons fanned out into a horizontal row" width="560" /> |
8
+
3
9
  A Material UI floating action button that behaves like a collapsed stack of overlapping circles. Collapsed, a set of `Fab`s sits perfectly stacked and reads as a single button with soft gradient slices at the edges. On hover (mouse) or tap (touch), the parent expands its main-axis extent and the buttons fan out into a row while their CSS masks slide in lockstep with the movement — so the unfold reads as one continuous morph instead of a pop.
4
10
 
5
11
  The trick is that each child is a full circle clipped by a static linear-gradient mask. As the element translates along the main axis, the `mask-position` is translated back by the same amount, keeping the fade boundary fixed in container space. Because the fade is a gradient rather than a hard clip, the parent's `filter: drop-shadow(...)` traces the soft edges cleanly.
6
12
 
7
13
  Not affiliated with or endorsed by MUI.
8
14
 
9
- ## Requirements
10
-
11
- - Node.js 18 or newer.
12
-
13
15
  ## Install
14
16
 
15
17
  ```bash
@@ -19,46 +21,6 @@ npm install mui-collage-fab @mui/material @emotion/react @emotion/styled
19
21
  `react`, `react-dom`, `@mui/material` and the two emotion packages are peer
20
22
  dependencies, so the package never ships its own copy of React or MUI.
21
23
 
22
- ## Getting started
23
-
24
- ```bash
25
- npm install
26
- npm run dev
27
- ```
28
-
29
- ## Routes
30
-
31
- Routing is hash-based, so the built site works on any static host without a
32
- server-side fallback.
33
-
34
- | URL | Page |
35
- | --- | --- |
36
- | `/` | Demo — the component across button counts and directions. |
37
- | `#/docs` | Components API reference for `CollageFab`. |
38
- | anything else | Redirects to `#/`. |
39
-
40
- ## Deployment
41
-
42
- The demo and docs are published to GitHub Pages:
43
-
44
- 1. Demo — <https://www.radomir.dev/mui-collage-fab/>
45
- 2. Components API — <https://www.radomir.dev/mui-collage-fab/#/docs>
46
- 3. Playground — <https://www.radomir.dev/mui-collage-fab/#/playground>
47
-
48
- `.github/workflows/deploy.yml` builds the project and publishes `dist/` on every
49
- push to `main`. The production build uses a `/mui-collage-fab/` asset base while the
50
- dev server stays at the root, so the local URL is unchanged — see
51
- `vite.config.ts`.
52
-
53
- ## Scripts
54
-
55
- | Command | Description |
56
- | --- | --- |
57
- | `npm run dev` | Start the Vite dev server with HMR. |
58
- | `npm run build` | Type-check with `tsc --noEmit`, then build the demo to `dist/`. |
59
- | `npm run build:lib` | Build the publishable package to `dist-lib/` (ESM + CJS + types). |
60
- | `npm run preview` | Serve the production build locally. |
61
-
62
24
  ## Usage
63
25
 
64
26
  ```tsx
@@ -155,3 +117,46 @@ const theme = createTheme({
155
117
  5. **Collapsed slices are hidden from assistive technology.** While collapsed, the item wrappers are `aria-hidden` and made non-focusable, so they leave the tab order and the accessibility tree. The root stays focusable: Enter or Space opens the group, focus moves to the first item, and Escape closes it and returns focus to the root.
156
118
  6. **With a single child no mask is applied** — it behaves like a plain `Fab`.
157
119
  7. **`direction` is physical, not logical.** It is not mirrored under RTL; right-to-left layouts should set `direction="left"` explicitly.
120
+
121
+ ## Demo site
122
+
123
+ 1. Demo — <https://www.radomir.dev/mui-collage-fab/>
124
+ 2. Components API — <https://www.radomir.dev/mui-collage-fab/#/docs>
125
+ 3. Playground — <https://www.radomir.dev/mui-collage-fab/#/playground>
126
+
127
+ Routing is hash-based, so the built site works on any static host without a
128
+ server-side fallback.
129
+
130
+ | URL | Page |
131
+ | --- | --- |
132
+ | `/` | Demo — the component across button counts and directions. |
133
+ | `#/docs` | Components API reference for `CollageFab`. |
134
+ | anything else | Redirects to `#/`. |
135
+
136
+ ## Development
137
+
138
+ Requires Node.js 18 or newer.
139
+
140
+ ```bash
141
+ npm install
142
+ npm run dev
143
+ ```
144
+
145
+ | Command | Description |
146
+ | --- | --- |
147
+ | `npm run dev` | Start the Vite dev server with HMR. |
148
+ | `npm run build` | Type-check with `tsc --noEmit`, then build the demo to `dist/`. |
149
+ | `npm run build:lib` | Build the publishable package to `dist-lib/` (ESM + CJS + types). |
150
+ | `npm run preview` | Serve the production build locally. |
151
+
152
+ Deployment: `.github/workflows/deploy.yml` builds the demo on every push to
153
+ `main` and force-pushes `dist/` to the orphan `gh-pages` branch, which GitHub
154
+ Pages serves. The branch has no shared history with `main`, so it only ever
155
+ holds built files. `.github/workflows/publish.yml` runs `semantic-release` on
156
+ every push to `main`: conventional commit subjects decide the version (`fix:`
157
+ patch, `feat:` minor, `BREAKING CHANGE:` major), and a release publishes the
158
+ package, writes `CHANGELOG.md`, and commits the bump back with `[skip ci]`.
159
+ Pull request titles are linted to the same convention, which matters because
160
+ squash merges put the PR title in the commit subject. The production build uses a `/mui-collage-fab/` asset
161
+ base while the dev server stays at the root, so the local URL is unchanged —
162
+ see `vite.config.ts`.
File without changes
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("react/jsx-runtime"),te=require("react"),oe=require("@mui/material"),z=require("@mui/material/styles"),F=require("@mui/material/utils"),W=require("@mui/utils/useSlotProps"),ne=require("@mui/utils/composeClasses"),re=require("@mui/utils/generateUtilityClass");function se(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(o,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return o.default=t,Object.freeze(o)}const u=se(te),ae={small:40,medium:48,large:56},ie={circular:"50%",rounded:"25%",square:0},le=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");function ce(t){return typeof t=="number"?t:ae[t]}function M(t,o){return`${t}ms ${o}`}const ue=3.2;function pe(t,o){const{count:n,size:r,gap:i,fadeWidth:l,open:f,direction:c}=o,p=r+i,s=(n-1)*p+r+l,a=t*p,d=c==="left"||c==="up",b=c==="left"||c==="right",k=t===0?s:(n-t)*(r/n),y=t===0?-l/2:t*(r/n),R=f?a:0,h=d?k-s-l/2+R:y-s-l/2-R,E=d?`#000 0px, #000 ${s}px, transparent ${s+l}px, transparent ${2*s}px`:`transparent 0px, transparent ${s}px, #000 ${s+l}px, #000 ${2*s}px`,S=`${d?"-":""}${R}`;return{translate:b?`translateX(${S}px)`:`translateY(${S}px)`,maskImage:n>1?`linear-gradient(${b?"to right":"to bottom"}, ${E})`:"none",maskSize:b?`${2*s}px 100%`:`100% ${2*s}px`,maskPosition:b?`${h}px 0px`:`0px ${h}px`}}function fe(t){return re("MuiCollageFab",t)}const me=(t,o)=>ne({root:["root",t?"expanded":"collapsed"],item:["item"]},fe,o),de=z.styled("div",{name:"MuiCollageFab",slot:"root",overridesResolver:(t,o)=>o.root})(({ownerState:t})=>{const{open:o,direction:n,size:r,gap:i,count:l,transitionDuration:f,transitionEasing:c}=t,p=n==="left"||n==="right",s=n==="left"||n==="up",a=o?l*r+Math.max(l-1,0)*i:r;return{position:"relative",width:p?a:r,height:p?r:a,display:"flex",flexDirection:p?"row":"column",justifyContent:s?"flex-end":"flex-start",transition:`${p?"width":"height"} ${M(f,c)}`,filter:"drop-shadow(0px 6px 12px rgba(0,0,0,0.25))",cursor:o?"default":"pointer",WebkitTapHighlightColor:"transparent"}}),ge=z.styled("div",{name:"MuiCollageFab",slot:"item",overridesResolver:(t,o)=>o.item})(({ownerState:t})=>{const{direction:o,size:n,index:r,geometry:i,cornerRadius:l,transitionDuration:f,transitionEasing:c}=t,p=o==="left"||o==="right",s=o==="left"?{right:0}:o==="right"?{left:0}:o==="up"?{bottom:0}:{top:0},a=M(f,c),d=M(f*ue,c);return{position:"absolute",...s,...p?{top:0}:{left:0},width:n,height:n,borderRadius:l,overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",zIndex:r,transform:i.translate,WebkitMaskImage:i.maskImage,maskImage:i.maskImage,WebkitMaskSize:i.maskSize,maskSize:i.maskSize,WebkitMaskPosition:i.maskPosition,maskPosition:i.maskPosition,WebkitMaskRepeat:"no-repeat",maskRepeat:"no-repeat",transition:`transform ${a}, -webkit-mask-position ${d}, mask-position ${d}`,"& > *":{boxShadow:"none !important",borderRadius:"inherit !important",width:"100%",height:"100%",margin:0}}});function he(t){const{index:o,ownerState:n,geometry:r,className:i,component:l,inert:f,itemRefs:c,slotProps:p,children:s}=t,a=u.useMemo(()=>({...n,index:o,isAnchor:o===0,geometry:r}),[n,o,r]),d=u.useRef(null),b=u.useCallback(h=>{c.current[o]=h},[c,o]),k=F.useForkRef(b,d);u.useEffect(()=>{const h=d.current;!h||!("inert"in HTMLElement.prototype)||(h.inert=f)},[f]);const y=W({elementType:l,externalSlotProps:p,ownerState:a,additionalProps:{ref:k,className:i,"aria-hidden":f||void 0,children:s}}),R=l;return $.jsx(R,{...y})}const be=u.forwardRef(function(o,n){const r=z.useThemeProps({props:o,name:"MuiCollageFab"}),{children:i,direction:l="left",size:f="large",variant:c="circular",gap:p=16,fadeWidth:s=12,trigger:a="hover",open:d,defaultOpen:b=!1,onOpen:k,onClose:y,disableClickAway:R=!1,transitionDuration:h=400,transitionEasing:E="cubic-bezier(0.4, 0, 0.2, 1)",classes:S,slots:x,slotProps:P,className:U,...K}=r,[m,D]=F.useControlled({controlled:d,default:b,name:"CollageFab",state:"open"}),j=u.useMemo(()=>u.Children.toArray(i).filter(e=>u.isValidElement(e)),[i]),A=j.length,I={open:m,direction:l,trigger:a,size:ce(f),variant:c,cornerRadius:ie[c],gap:p,fadeWidth:s,count:A,transitionDuration:h,transitionEasing:E},O=me(m,S),_=u.useRef(null),q=u.useRef([]),w=u.useRef(!1),L=u.useRef("mouse"),T=u.useRef(!1),B=F.useForkRef(_,n),C=u.useCallback((e,g)=>{e!==m&&(D(e),e?k==null||k(g):y==null||y(g))},[m,D,k,y]),G=e=>{a!=="hover"||e.pointerType!=="mouse"||C(!0,e)},H=e=>{a!=="hover"||e.pointerType!=="mouse"||C(!1,e)},V=e=>{a!=="manual"&&(L.current=e.pointerType,w.current=!1,!(e.pointerType==="mouse"||m)&&(w.current=!0,C(!0,e)))},X=e=>{w.current&&(w.current=!1,e.stopPropagation(),e.preventDefault())},Y=e=>{if(a!=="manual"){if(a==="click"){C(!m,e);return}m&&L.current!=="mouse"&&C(!1,e)}},Z=e=>{var g;if(a!=="manual"){if(m){if(e.key!=="Escape")return;e.stopPropagation(),C(!1,e),(g=_.current)==null||g.focus();return}e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),T.current=!0,C(!0,e))}},J=e=>{C(!1,e)},N=(x==null?void 0:x.root)??de,Q=(x==null?void 0:x.item)??ge,ee=W({elementType:N,externalForwardedProps:K,externalSlotProps:P==null?void 0:P.root,ownerState:I,additionalProps:{ref:B,role:"group",tabIndex:!m&&a!=="manual"?0:-1,onPointerEnter:G,onPointerLeave:H,onPointerDown:V,onClick:Y,onClickCapture:X,onKeyDown:Z},className:[O.root,U]});if(u.useEffect(()=>{if(!m||!T.current)return;T.current=!1;const e=q.current[0];if(!e)return;(e.querySelector(le)??e).focus()},[m]),A===0)return null;const v=$.jsx(N,{...ee,children:j.map((e,g)=>$.jsx(he,{index:g,ownerState:I,geometry:pe(g,I),className:O.item,component:Q,inert:!m&&a!=="manual",itemRefs:q,slotProps:P==null?void 0:P.item,children:e},g))});return R||a==="manual"?v:$.jsx(oe.ClickAwayListener,{onClickAway:J,children:v})});exports.CollageFab=be;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("react/jsx-runtime"),te=require("react"),oe=require("@mui/material"),z=require("@mui/material/styles"),T=require("@mui/material/utils"),W=require("@mui/utils/useSlotProps"),ne=require("@mui/utils/composeClasses"),re=require("@mui/utils/generateUtilityClass");function se(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(o,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return o.default=t,Object.freeze(o)}const c=se(te),ae={small:40,medium:48,large:56},ie={circular:"50%",rounded:"25%",square:0},le=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");function ce(t){return typeof t=="number"?t:ae[t]}function L(t,o){return`${t}ms ${o}`}function ue(t,o){const{count:n,size:s,gap:i,fadeWidth:l,open:m,direction:u}=o,p=s+i,a=(n-1)*p+s+l,r=t*p,h=u==="left"||u==="up",b=u==="left"||u==="right",k=t===0?a:(n-t)*(s/n),y=t===0?-l/2:t*(s/n),R=m?r:0,g=h?k-a-l/2+R:y-a-l/2-R,E=h?`#000 0px, #000 ${a}px, transparent ${a+l}px, transparent ${2*a}px`:`transparent 0px, transparent ${a}px, #000 ${a+l}px, #000 ${2*a}px`,S=`${h?"-":""}${R}`;return{translate:b?`translateX(${S}px)`:`translateY(${S}px)`,maskImage:n>1?`linear-gradient(${b?"to right":"to bottom"}, ${E})`:"none",maskSize:b?`${2*a}px 100%`:`100% ${2*a}px`,maskPosition:b?`${g}px 0px`:`0px ${g}px`}}function pe(t){return re("MuiCollageFab",t)}const fe=(t,o)=>ne({root:["root",t?"expanded":"collapsed"],item:["item"]},pe,o),me=z.styled("div",{name:"MuiCollageFab",slot:"root",overridesResolver:(t,o)=>o.root})(({ownerState:t})=>{const{open:o,direction:n,size:s,gap:i,count:l,transitionDuration:m,transitionEasing:u}=t,p=n==="left"||n==="right",a=n==="left"||n==="up",r=o?l*s+Math.max(l-1,0)*i:s;return{position:"relative",width:p?r:s,height:p?s:r,display:"flex",flexDirection:p?"row":"column",justifyContent:a?"flex-end":"flex-start",transition:`${p?"width":"height"} ${L(m,u)}`,filter:"drop-shadow(0px 6px 12px rgba(0,0,0,0.25))",cursor:o?"default":"pointer",WebkitTapHighlightColor:"transparent"}}),de=z.styled("div",{name:"MuiCollageFab",slot:"item",overridesResolver:(t,o)=>o.item})(({ownerState:t})=>{const{direction:o,size:n,index:s,geometry:i,cornerRadius:l,transitionDuration:m,transitionEasing:u}=t,p=o==="left"||o==="right",a=o==="left"?{right:0}:o==="right"?{left:0}:o==="up"?{bottom:0}:{top:0},r=L(m,u);return{position:"absolute",...a,...p?{top:0}:{left:0},width:n,height:n,borderRadius:l,overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",zIndex:s,transform:i.translate,WebkitMaskImage:i.maskImage,maskImage:i.maskImage,WebkitMaskSize:i.maskSize,maskSize:i.maskSize,WebkitMaskPosition:i.maskPosition,maskPosition:i.maskPosition,WebkitMaskRepeat:"no-repeat",maskRepeat:"no-repeat",transition:`transform ${r}, -webkit-mask-position ${r}, mask-position ${r}`,"& > *":{boxShadow:"none !important",borderRadius:"inherit !important",width:"100%",height:"100%",margin:0}}});function ge(t){const{index:o,ownerState:n,geometry:s,className:i,component:l,inert:m,itemRefs:u,slotProps:p,children:a}=t,r=c.useMemo(()=>({...n,index:o,isAnchor:o===0,geometry:s}),[n,o,s]),h=c.useRef(null),b=c.useCallback(g=>{u.current[o]=g},[u,o]),k=T.useForkRef(b,h);c.useEffect(()=>{const g=h.current;!g||!("inert"in HTMLElement.prototype)||(g.inert=m)},[m]);const y=W({elementType:l,externalSlotProps:p,ownerState:r,additionalProps:{ref:k,className:i,"aria-hidden":m||void 0,children:a}}),R=l;return $.jsx(R,{...y})}const he=c.forwardRef(function(o,n){const s=z.useThemeProps({props:o,name:"MuiCollageFab"}),{children:i,direction:l="left",size:m="large",variant:u="circular",gap:p=16,fadeWidth:a=12,trigger:r="hover",open:h,defaultOpen:b=!1,onOpen:k,onClose:y,disableClickAway:R=!1,transitionDuration:g=400,transitionEasing:E="cubic-bezier(0.4, 0, 0.2, 1)",classes:S,slots:x,slotProps:P,className:U,...B}=s,[f,D]=T.useControlled({controlled:h,default:b,name:"CollageFab",state:"open"}),M=c.useMemo(()=>c.Children.toArray(i).filter(e=>c.isValidElement(e)),[i]),j=M.length,I={open:f,direction:l,trigger:r,size:ce(m),variant:u,cornerRadius:ie[u],gap:p,fadeWidth:a,count:j,transitionDuration:g,transitionEasing:E},O=fe(f,S),A=c.useRef(null),q=c.useRef([]),w=c.useRef(!1),_=c.useRef("mouse"),F=c.useRef(!1),H=T.useForkRef(A,n),C=c.useCallback((e,d)=>{e!==f&&(D(e),e?k==null||k(d):y==null||y(d))},[f,D,k,y]),K=e=>{r!=="hover"||e.pointerType!=="mouse"||C(!0,e)},G=e=>{r!=="hover"||e.pointerType!=="mouse"||C(!1,e)},V=e=>{r!=="manual"&&(_.current=e.pointerType,w.current=!1,!(e.pointerType==="mouse"||f)&&(w.current=!0,C(!0,e)))},X=e=>{w.current&&(w.current=!1,e.stopPropagation(),e.preventDefault())},Y=e=>{if(r!=="manual"){if(r==="click"){C(!f,e);return}f&&_.current!=="mouse"&&C(!1,e)}},Z=e=>{var d;if(r!=="manual"){if(f){if(e.key!=="Escape")return;e.stopPropagation(),C(!1,e),(d=A.current)==null||d.focus();return}e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),F.current=!0,C(!0,e))}},J=e=>{C(!1,e)},N=(x==null?void 0:x.root)??me,Q=(x==null?void 0:x.item)??de,ee=W({elementType:N,externalForwardedProps:B,externalSlotProps:P==null?void 0:P.root,ownerState:I,additionalProps:{ref:H,role:"group",tabIndex:!f&&r!=="manual"?0:-1,onPointerEnter:K,onPointerLeave:G,onPointerDown:V,onClick:Y,onClickCapture:X,onKeyDown:Z},className:[O.root,U]});if(c.useEffect(()=>{if(!f||!F.current)return;F.current=!1;const e=q.current[0];if(!e)return;(e.querySelector(le)??e).focus()},[f]),j===0)return null;const v=$.jsx(N,{...ee,children:M.map((e,d)=>$.jsx(ge,{index:d,ownerState:I,geometry:ue(d,I),className:O.item,component:Q,inert:!f&&r!=="manual",itemRefs:q,slotProps:P==null?void 0:P.item,children:e},d))});return R||r==="manual"?v:$.jsx(oe.ClickAwayListener,{onClickAway:J,children:v})});exports.CollageFab=he;
package/dist-lib/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { jsx as $ } from "react/jsx-runtime";
2
- import * as u from "react";
2
+ import * as c from "react";
3
3
  import { ClickAwayListener as et } from "@mui/material";
4
- import { styled as U, useThemeProps as ot } from "@mui/material/styles";
4
+ import { styled as _, useThemeProps as ot } from "@mui/material/styles";
5
5
  import { useControlled as nt, useForkRef as v } from "@mui/material/utils";
6
- import j from "@mui/utils/useSlotProps";
6
+ import U from "@mui/utils/useSlotProps";
7
7
  import rt from "@mui/utils/composeClasses";
8
- import st from "@mui/utils/generateUtilityClass";
9
- const at = {
8
+ import at from "@mui/utils/generateUtilityClass";
9
+ const st = {
10
10
  small: 40,
11
11
  medium: 48,
12
12
  large: 56
@@ -23,71 +23,67 @@ const at = {
23
23
  '[tabindex]:not([tabindex="-1"])'
24
24
  ].join(",");
25
25
  function ct(o) {
26
- return typeof o == "number" ? o : at[o];
26
+ return typeof o == "number" ? o : st[o];
27
27
  }
28
- function F(o, e) {
28
+ function j(o, e) {
29
29
  return `${o}ms ${e}`;
30
30
  }
31
- const ut = 3.2;
32
- function pt(o, e) {
33
- const { count: n, size: a, gap: i, fadeWidth: l, open: m, direction: c } = e, p = a + i, r = (n - 1) * p + a + l, s = o * p, d = c === "left" || c === "up", k = c === "left" || c === "right", C = o === 0 ? r : (n - o) * (a / n), b = o === 0 ? -l / 2 : o * (a / n), R = m ? s : 0, h = d ? C - r - l / 2 + R : b - r - l / 2 - R, E = d ? `#000 0px, #000 ${r}px, transparent ${r + l}px, transparent ${2 * r}px` : `transparent 0px, transparent ${r}px, #000 ${r + l}px, #000 ${2 * r}px`, w = `${d ? "-" : ""}${R}`;
31
+ function ut(o, e) {
32
+ const { count: r, size: s, gap: i, fadeWidth: l, open: f, direction: u } = e, p = s + i, a = (r - 1) * p + s + l, n = o * p, h = u === "left" || u === "up", k = u === "left" || u === "right", C = o === 0 ? a : (r - o) * (s / r), b = o === 0 ? -l / 2 : o * (s / r), R = f ? n : 0, g = h ? C - a - l / 2 + R : b - a - l / 2 - R, E = h ? `#000 0px, #000 ${a}px, transparent ${a + l}px, transparent ${2 * a}px` : `transparent 0px, transparent ${a}px, #000 ${a + l}px, #000 ${2 * a}px`, w = `${h ? "-" : ""}${R}`;
34
33
  return {
35
34
  translate: k ? `translateX(${w}px)` : `translateY(${w}px)`,
36
- maskImage: n > 1 ? `linear-gradient(${k ? "to right" : "to bottom"}, ${E})` : "none",
37
- maskSize: k ? `${2 * r}px 100%` : `100% ${2 * r}px`,
38
- maskPosition: k ? `${h}px 0px` : `0px ${h}px`
35
+ maskImage: r > 1 ? `linear-gradient(${k ? "to right" : "to bottom"}, ${E})` : "none",
36
+ maskSize: k ? `${2 * a}px 100%` : `100% ${2 * a}px`,
37
+ maskPosition: k ? `${g}px 0px` : `0px ${g}px`
39
38
  };
40
39
  }
41
- function mt(o) {
42
- return st("MuiCollageFab", o);
40
+ function pt(o) {
41
+ return at("MuiCollageFab", o);
43
42
  }
44
- const ft = (o, e) => rt({
43
+ const mt = (o, e) => rt({
45
44
  root: ["root", o ? "expanded" : "collapsed"],
46
45
  item: ["item"]
47
- }, mt, e), dt = U("div", {
46
+ }, pt, e), ft = _("div", {
48
47
  name: "MuiCollageFab",
49
48
  slot: "root",
50
49
  overridesResolver: (o, e) => e.root
51
50
  })(({ ownerState: o }) => {
52
- const { open: e, direction: n, size: a, gap: i, count: l, transitionDuration: m, transitionEasing: c } = o, p = n === "left" || n === "right", r = n === "left" || n === "up", s = e ? l * a + Math.max(l - 1, 0) * i : a;
51
+ const { open: e, direction: r, size: s, gap: i, count: l, transitionDuration: f, transitionEasing: u } = o, p = r === "left" || r === "right", a = r === "left" || r === "up", n = e ? l * s + Math.max(l - 1, 0) * i : s;
53
52
  return {
54
53
  position: "relative",
55
- width: p ? s : a,
56
- height: p ? a : s,
54
+ width: p ? n : s,
55
+ height: p ? s : n,
57
56
  display: "flex",
58
57
  flexDirection: p ? "row" : "column",
59
- justifyContent: r ? "flex-end" : "flex-start",
60
- transition: `${p ? "width" : "height"} ${F(
61
- m,
62
- c
58
+ justifyContent: a ? "flex-end" : "flex-start",
59
+ transition: `${p ? "width" : "height"} ${j(
60
+ f,
61
+ u
63
62
  )}`,
64
63
  // A filter traces the soft mask edges; a box-shadow would trace the wrapper rectangles.
65
64
  filter: "drop-shadow(0px 6px 12px rgba(0,0,0,0.25))",
66
65
  cursor: e ? "default" : "pointer",
67
66
  WebkitTapHighlightColor: "transparent"
68
67
  };
69
- }), gt = U("div", {
68
+ }), dt = _("div", {
70
69
  name: "MuiCollageFab",
71
70
  slot: "item",
72
71
  overridesResolver: (o, e) => e.item
73
72
  })(({ ownerState: o }) => {
74
- const { direction: e, size: n, index: a, geometry: i, cornerRadius: l, transitionDuration: m, transitionEasing: c } = o, p = e === "left" || e === "right", r = e === "left" ? { right: 0 } : e === "right" ? { left: 0 } : e === "up" ? { bottom: 0 } : { top: 0 }, s = F(m, c), d = F(
75
- m * ut,
76
- c
77
- );
73
+ const { direction: e, size: r, index: s, geometry: i, cornerRadius: l, transitionDuration: f, transitionEasing: u } = o, p = e === "left" || e === "right", a = e === "left" ? { right: 0 } : e === "right" ? { left: 0 } : e === "up" ? { bottom: 0 } : { top: 0 }, n = j(f, u);
78
74
  return {
79
75
  position: "absolute",
80
- ...r,
76
+ ...a,
81
77
  ...p ? { top: 0 } : { left: 0 },
82
- width: n,
83
- height: n,
78
+ width: r,
79
+ height: r,
84
80
  borderRadius: l,
85
81
  overflow: "hidden",
86
82
  display: "flex",
87
83
  alignItems: "center",
88
84
  justifyContent: "center",
89
85
  // The left-most slices have to stack on top of the right-ward ones.
90
- zIndex: a,
86
+ zIndex: s,
91
87
  // Always present, even collapsed: the transform is what makes this wrapper a
92
88
  // stacking context, which neutralizes the child's own z-index.
93
89
  transform: i.translate,
@@ -99,7 +95,7 @@ const ft = (o, e) => rt({
99
95
  maskPosition: i.maskPosition,
100
96
  WebkitMaskRepeat: "no-repeat",
101
97
  maskRepeat: "no-repeat",
102
- transition: `transform ${s}, -webkit-mask-position ${d}, mask-position ${d}`,
98
+ transition: `transform ${n}, -webkit-mask-position ${n}, mask-position ${n}`,
103
99
  // Strip arbitrary shadows from the children and make them inherit the wrapper's
104
100
  // silhouette, so the root controls the global 3D shape.
105
101
  "& > *": {
@@ -111,165 +107,165 @@ const ft = (o, e) => rt({
111
107
  }
112
108
  };
113
109
  });
114
- function ht(o) {
110
+ function gt(o) {
115
111
  const {
116
112
  index: e,
117
- ownerState: n,
118
- geometry: a,
113
+ ownerState: r,
114
+ geometry: s,
119
115
  className: i,
120
116
  component: l,
121
- inert: m,
122
- itemRefs: c,
117
+ inert: f,
118
+ itemRefs: u,
123
119
  slotProps: p,
124
- children: r
125
- } = o, s = u.useMemo(
126
- () => ({ ...n, index: e, isAnchor: e === 0, geometry: a }),
127
- [n, e, a]
128
- ), d = u.useRef(null), k = u.useCallback(
129
- (h) => {
130
- c.current[e] = h;
120
+ children: a
121
+ } = o, n = c.useMemo(
122
+ () => ({ ...r, index: e, isAnchor: e === 0, geometry: s }),
123
+ [r, e, s]
124
+ ), h = c.useRef(null), k = c.useCallback(
125
+ (g) => {
126
+ u.current[e] = g;
131
127
  },
132
- [c, e]
133
- ), C = v(k, d);
134
- u.useEffect(() => {
135
- const h = d.current;
136
- !h || !("inert" in HTMLElement.prototype) || (h.inert = m);
137
- }, [m]);
138
- const b = j({
128
+ [u, e]
129
+ ), C = v(k, h);
130
+ c.useEffect(() => {
131
+ const g = h.current;
132
+ !g || !("inert" in HTMLElement.prototype) || (g.inert = f);
133
+ }, [f]);
134
+ const b = U({
139
135
  elementType: l,
140
136
  externalSlotProps: p,
141
- ownerState: s,
137
+ ownerState: n,
142
138
  additionalProps: {
143
139
  ref: C,
144
140
  className: i,
145
- "aria-hidden": m || void 0,
146
- children: r
141
+ "aria-hidden": f || void 0,
142
+ children: a
147
143
  }
148
144
  });
149
145
  return /* @__PURE__ */ $(l, { ...b });
150
146
  }
151
- const wt = u.forwardRef(
152
- function(e, n) {
153
- const a = ot({ props: e, name: "MuiCollageFab" }), {
147
+ const Pt = c.forwardRef(
148
+ function(e, r) {
149
+ const s = ot({ props: e, name: "MuiCollageFab" }), {
154
150
  children: i,
155
151
  direction: l = "left",
156
- size: m = "large",
157
- variant: c = "circular",
152
+ size: f = "large",
153
+ variant: u = "circular",
158
154
  gap: p = 16,
159
- fadeWidth: r = 12,
160
- trigger: s = "hover",
161
- open: d,
155
+ fadeWidth: a = 12,
156
+ trigger: n = "hover",
157
+ open: h,
162
158
  defaultOpen: k = !1,
163
159
  onOpen: C,
164
160
  onClose: b,
165
161
  disableClickAway: R = !1,
166
- transitionDuration: h = 400,
162
+ transitionDuration: g = 400,
167
163
  transitionEasing: E = "cubic-bezier(0.4, 0, 0.2, 1)",
168
164
  classes: w,
169
165
  slots: x,
170
166
  slotProps: P,
171
- className: K,
172
- ...q
173
- } = a, [f, M] = nt({
174
- controlled: d,
167
+ className: q,
168
+ ...B
169
+ } = s, [m, z] = nt({
170
+ controlled: h,
175
171
  default: k,
176
172
  name: "CollageFab",
177
173
  state: "open"
178
- }), z = u.useMemo(
179
- () => u.Children.toArray(i).filter((t) => u.isValidElement(t)),
174
+ }), T = c.useMemo(
175
+ () => c.Children.toArray(i).filter((t) => c.isValidElement(t)),
180
176
  [i]
181
- ), A = z.length, I = {
182
- open: f,
177
+ ), D = T.length, I = {
178
+ open: m,
183
179
  direction: l,
184
- trigger: s,
185
- size: ct(m),
186
- variant: c,
187
- cornerRadius: it[c],
180
+ trigger: n,
181
+ size: ct(f),
182
+ variant: u,
183
+ cornerRadius: it[u],
188
184
  gap: p,
189
- fadeWidth: r,
190
- count: A,
191
- transitionDuration: h,
185
+ fadeWidth: a,
186
+ count: D,
187
+ transitionDuration: g,
192
188
  transitionEasing: E
193
- }, D = ft(f, w), L = u.useRef(null), _ = u.useRef([]), S = u.useRef(!1), N = u.useRef("mouse"), T = u.useRef(!1), B = v(L, n), y = u.useCallback(
194
- (t, g) => {
195
- t !== f && (M(t), t ? C == null || C(g) : b == null || b(g));
189
+ }, M = mt(m, w), A = c.useRef(null), N = c.useRef([]), S = c.useRef(!1), W = c.useRef("mouse"), F = c.useRef(!1), H = v(A, r), y = c.useCallback(
190
+ (t, d) => {
191
+ t !== m && (z(t), t ? C == null || C(d) : b == null || b(d));
196
192
  },
197
- [f, M, C, b]
198
- ), G = (t) => {
199
- s !== "hover" || t.pointerType !== "mouse" || y(!0, t);
200
- }, H = (t) => {
201
- s !== "hover" || t.pointerType !== "mouse" || y(!1, t);
193
+ [m, z, C, b]
194
+ ), K = (t) => {
195
+ n !== "hover" || t.pointerType !== "mouse" || y(!0, t);
196
+ }, G = (t) => {
197
+ n !== "hover" || t.pointerType !== "mouse" || y(!1, t);
202
198
  }, V = (t) => {
203
- s !== "manual" && (N.current = t.pointerType, S.current = !1, !(t.pointerType === "mouse" || f) && (S.current = !0, y(!0, t)));
199
+ n !== "manual" && (W.current = t.pointerType, S.current = !1, !(t.pointerType === "mouse" || m) && (S.current = !0, y(!0, t)));
204
200
  }, X = (t) => {
205
201
  S.current && (S.current = !1, t.stopPropagation(), t.preventDefault());
206
202
  }, Y = (t) => {
207
- if (s !== "manual") {
208
- if (s === "click") {
209
- y(!f, t);
203
+ if (n !== "manual") {
204
+ if (n === "click") {
205
+ y(!m, t);
210
206
  return;
211
207
  }
212
- f && N.current !== "mouse" && y(!1, t);
208
+ m && W.current !== "mouse" && y(!1, t);
213
209
  }
214
210
  }, Z = (t) => {
215
- var g;
216
- if (s !== "manual") {
217
- if (f) {
211
+ var d;
212
+ if (n !== "manual") {
213
+ if (m) {
218
214
  if (t.key !== "Escape")
219
215
  return;
220
- t.stopPropagation(), y(!1, t), (g = L.current) == null || g.focus();
216
+ t.stopPropagation(), y(!1, t), (d = A.current) == null || d.focus();
221
217
  return;
222
218
  }
223
- t.key !== "Enter" && t.key !== " " || (t.preventDefault(), T.current = !0, y(!0, t));
219
+ t.key !== "Enter" && t.key !== " " || (t.preventDefault(), F.current = !0, y(!0, t));
224
220
  }
225
221
  }, J = (t) => {
226
222
  y(!1, t);
227
- }, W = (x == null ? void 0 : x.root) ?? dt, Q = (x == null ? void 0 : x.item) ?? gt, tt = j({
228
- elementType: W,
229
- externalForwardedProps: q,
223
+ }, L = (x == null ? void 0 : x.root) ?? ft, Q = (x == null ? void 0 : x.item) ?? dt, tt = U({
224
+ elementType: L,
225
+ externalForwardedProps: B,
230
226
  externalSlotProps: P == null ? void 0 : P.root,
231
227
  ownerState: I,
232
228
  additionalProps: {
233
- ref: B,
229
+ ref: H,
234
230
  role: "group",
235
- tabIndex: !f && s !== "manual" ? 0 : -1,
236
- onPointerEnter: G,
237
- onPointerLeave: H,
231
+ tabIndex: !m && n !== "manual" ? 0 : -1,
232
+ onPointerEnter: K,
233
+ onPointerLeave: G,
238
234
  onPointerDown: V,
239
235
  onClick: Y,
240
236
  onClickCapture: X,
241
237
  onKeyDown: Z
242
238
  },
243
- className: [D.root, K]
239
+ className: [M.root, q]
244
240
  });
245
- if (u.useEffect(() => {
246
- if (!f || !T.current)
241
+ if (c.useEffect(() => {
242
+ if (!m || !F.current)
247
243
  return;
248
- T.current = !1;
249
- const t = _.current[0];
244
+ F.current = !1;
245
+ const t = N.current[0];
250
246
  if (!t)
251
247
  return;
252
248
  (t.querySelector(lt) ?? t).focus();
253
- }, [f]), A === 0)
249
+ }, [m]), D === 0)
254
250
  return null;
255
- const O = /* @__PURE__ */ $(W, { ...tt, children: z.map((t, g) => /* @__PURE__ */ $(
256
- ht,
251
+ const O = /* @__PURE__ */ $(L, { ...tt, children: T.map((t, d) => /* @__PURE__ */ $(
252
+ gt,
257
253
  {
258
- index: g,
254
+ index: d,
259
255
  ownerState: I,
260
- geometry: pt(g, I),
261
- className: D.item,
256
+ geometry: ut(d, I),
257
+ className: M.item,
262
258
  component: Q,
263
- inert: !f && s !== "manual",
264
- itemRefs: _,
259
+ inert: !m && n !== "manual",
260
+ itemRefs: N,
265
261
  slotProps: P == null ? void 0 : P.item,
266
262
  children: t
267
263
  },
268
- g
264
+ d
269
265
  )) });
270
- return R || s === "manual" ? O : /* @__PURE__ */ $(et, { onClickAway: J, children: O });
266
+ return R || n === "manual" ? O : /* @__PURE__ */ $(et, { onClickAway: J, children: O });
271
267
  }
272
268
  );
273
269
  export {
274
- wt as CollageFab
270
+ Pt as CollageFab
275
271
  };
@@ -112,10 +112,7 @@ export interface CollageFabProps extends Omit<React.HTMLAttributes<HTMLDivElemen
112
112
  */
113
113
  disableClickAway?: boolean;
114
114
  /**
115
- * Duration of the morph, in milliseconds. The mask that slices the buttons is
116
- * given a longer, internally derived duration so its cut line resolves late in
117
- * the morph rather than in the first quarter; passing `0` still disables all
118
- * animation.
115
+ * Duration of the morph, in milliseconds.
119
116
  * @default 400
120
117
  */
121
118
  transitionDuration?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"CollageFab.d.ts","sourceRoot":"","sources":["../../../src/components/CollageFab.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,KAAK,EAAE,uBAAuB,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAK9E,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,MAAM,CAAC;AAEnE,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE7D,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAEnE,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,CAAC;AAyBlE,MAAM,WAAW,iBAAiB;IAChC,IAAI,E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IAAI,CAAC;IAC/C;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,KAAK,IAAI,CAAC;IAChD;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;CACtC;AAsND,eAAO,MAAM,UAAU,wFA+NtB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mui-collage-fab",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Material UI floating action button that unfolds a stack of overlapping Fab circles into a row.",
5
5
  "license": "MIT",
6
6
  "author": "Radomir Wojtera",
@@ -39,7 +39,8 @@
39
39
  "./package.json": "./package.json"
40
40
  },
41
41
  "publishConfig": {
42
- "access": "public"
42
+ "access": "public",
43
+ "provenance": true
43
44
  },
44
45
  "engines": {
45
46
  "node": ">=18"
@@ -49,7 +50,8 @@
49
50
  "build": "tsc --noEmit && vite build",
50
51
  "build:lib": "vite build --config vite.lib.config.ts && tsc -p tsconfig.build.json",
51
52
  "prepublishOnly": "npm run build:lib",
52
- "preview": "vite preview"
53
+ "preview": "vite preview",
54
+ "release": "semantic-release"
53
55
  },
54
56
  "dependencies": {
55
57
  "@mui/utils": "^5.15.0"
@@ -66,12 +68,17 @@
66
68
  "@emotion/styled": "^11.13.0",
67
69
  "@mui/icons-material": "^5.16.7",
68
70
  "@mui/material": "^5.16.7",
71
+ "@semantic-release/changelog": "^7.0.0",
72
+ "@semantic-release/git": "^11.0.1",
73
+ "@semantic-release/github": "^12.0.11",
74
+ "@semantic-release/npm": "^13.2.0",
69
75
  "@types/react": "^18.3.12",
70
76
  "@types/react-dom": "^18.3.1",
71
77
  "@vitejs/plugin-react": "^4.3.3",
72
78
  "react": "^18.3.1",
73
79
  "react-dom": "^18.3.1",
74
80
  "react-router-dom": "^7.18.4",
81
+ "semantic-release": "^25.0.9",
75
82
  "typescript": "~5.6.3",
76
83
  "vite": "^5.4.10"
77
84
  }