@vacano/ui 1.15.1 → 1.15.2
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 +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +194 -193
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
</p>
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
|
-
<img src="https://img.shields.io/badge/version-1.15.
|
|
10
|
+
<img src="https://img.shields.io/badge/version-1.15.2-blue" />
|
|
11
11
|
<a href="https://www.npmjs.com/package/@vacano/ui"><img src="https://img.shields.io/npm/v/@vacano/ui" alt="npm version" /></a>
|
|
12
12
|
<a href="https://github.com/vacano-house/vacano-ui/blob/master/LICENSE.md"><img src="https://img.shields.io/npm/l/@vacano/ui" alt="license" /></a>
|
|
13
13
|
</p>
|
package/dist/index.cjs
CHANGED
|
@@ -125,13 +125,13 @@
|
|
|
125
125
|
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
126
126
|
font-size: 14px;
|
|
127
127
|
font-weight: 600;
|
|
128
|
-
color: ${n.COLORS.black};
|
|
128
|
+
color: ${({$expanded:e})=>e?n.COLORS.black:n.COLORS["iron-grey"]};
|
|
129
129
|
text-align: left;
|
|
130
130
|
outline: none;
|
|
131
131
|
transition: color 0.2s ease;
|
|
132
132
|
|
|
133
133
|
&:hover {
|
|
134
|
-
color: ${n.COLORS
|
|
134
|
+
color: ${n.COLORS.black};
|
|
135
135
|
}
|
|
136
136
|
`,It=d.styled.span`
|
|
137
137
|
display: flex;
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
font-size: 14px;
|
|
155
155
|
line-height: 1.5;
|
|
156
156
|
color: ${n.COLORS["iron-grey"]};
|
|
157
|
-
`,ne=C.newClassNameGetter("accordion"),Mt=()=>l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:l.jsx("polyline",{points:"6 9 12 15 18 9"})}),Ft=({className:e,classnames:t,defaultValue:o=[],items:r,multiple:i=!1,onChange:a,ref:c,value:s,variant:p="outlined",...x})=>{const[g,h]=u.useState(o),y=s!==void 0,f=y?s:g,S=u.useCallback(b=>{const $=f.includes(b);let m;i?m=$?f.filter(O=>O!==b):[...f,b]:m=$?[]:[b],y||h(m),a==null||a(m)},[f,y,i,a]);return l.jsx(zt,{...x,ref:c,$variant:p,className:ne("container",e),role:"region",children:r.map(b=>{const $=f.includes(b.value);return l.jsxs(Nt,{$variant:p,$disabled:!!b.disabled,className:ne("item",t==null?void 0:t.item),children:[l.jsxs(Tt,{type:"button","aria-expanded":$,$disabled:!!b.disabled
|
|
157
|
+
`,ne=C.newClassNameGetter("accordion"),Mt=()=>l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:l.jsx("polyline",{points:"6 9 12 15 18 9"})}),Ft=({className:e,classnames:t,defaultValue:o=[],items:r,multiple:i=!1,onChange:a,ref:c,value:s,variant:p="outlined",...x})=>{const[g,h]=u.useState(o),y=s!==void 0,f=y?s:g,S=u.useCallback(b=>{const $=f.includes(b);let m;i?m=$?f.filter(O=>O!==b):[...f,b]:m=$?[]:[b],y||h(m),a==null||a(m)},[f,y,i,a]);return l.jsx(zt,{...x,ref:c,$variant:p,className:ne("container",e),role:"region",children:r.map(b=>{const $=f.includes(b.value);return l.jsxs(Nt,{$variant:p,$disabled:!!b.disabled,className:ne("item",t==null?void 0:t.item),children:[l.jsxs(Tt,{type:"button","aria-expanded":$,$disabled:!!b.disabled,$expanded:$,disabled:b.disabled,onClick:()=>S(b.value),className:ne("trigger",t==null?void 0:t.trigger),children:[b.title,l.jsx(It,{$expanded:$,className:ne("icon",t==null?void 0:t.icon),children:l.jsx(Mt,{})})]}),l.jsx(At,{$expanded:$,children:l.jsx(Pt,{children:l.jsx(Bt,{className:ne("content",t==null?void 0:t.content),children:b.content})})})]},b.value)})})},_t={none:"0",sm:"8px",md:"12px",lg:"16px",full:"9999px"},Dt={normal:n.COLORS.black,success:n.COLORS.green,warning:n.COLORS.yellow,danger:n.COLORS.red},Gt=d.styled.div`
|
|
158
158
|
display: flex;
|
|
159
159
|
align-items: ${({$center:e})=>e?"center":"flex-start"};
|
|
160
160
|
gap: 12px;
|
|
@@ -1947,7 +1947,7 @@
|
|
|
1947
1947
|
color: ${n.COLORS["iron-grey"]};
|
|
1948
1948
|
margin-top: 8px;
|
|
1949
1949
|
line-height: 1.5;
|
|
1950
|
-
`,V=C.newClassNameGetter("timeline"),Fa=({className:e,classnames:t,items:o,ref:r,...i})=>l.jsx(Ea,{...i,ref:r,className:V("container",e),children:o.map((a,c)=>{const s=c===o.length-1;return l.jsxs(za,{className:V("item",t==null?void 0:t.item),children:[l.jsxs(Na,{$last:s,children:[l.jsx(Ta,{className:V("dot",t==null?void 0:t.dot)}),l.jsx(Ia,{className:V("line",t==null?void 0:t.line),$last:s})]}),l.jsxs(Aa,{className:V("content",t==null?void 0:t.content),$last:s,children:[l.jsx(Pa,{className:V("title",t==null?void 0:t.title),children:a.title}),a.description&&l.jsx(Ba,{className:V("description",t==null?void 0:t.description),children:a.description}),a.
|
|
1950
|
+
`,V=C.newClassNameGetter("timeline"),Fa=({className:e,classnames:t,items:o,ref:r,...i})=>l.jsx(Ea,{...i,ref:r,className:V("container",e),children:o.map((a,c)=>{const s=c===o.length-1;return l.jsxs(za,{className:V("item",t==null?void 0:t.item),children:[l.jsxs(Na,{$last:s,children:[l.jsx(Ta,{className:V("dot",t==null?void 0:t.dot)}),l.jsx(Ia,{className:V("line",t==null?void 0:t.line),$last:s})]}),l.jsxs(Aa,{className:V("content",t==null?void 0:t.content),$last:s,children:[l.jsx(Pa,{className:V("title",t==null?void 0:t.title),children:a.title}),a.description&&l.jsx(Ba,{className:V("description",t==null?void 0:t.description),children:a.description}),a.content&&l.jsx(Ma,{className:V("body",t==null?void 0:t.body),children:a.content})]})]},c)})}),Rt=u.createContext(null),Pe=3,ct={default:{background:"#374151",text:n.COLORS.white,border:"#374151"},success:{background:n.COLORS.green,text:n.COLORS.white,border:n.COLORS.green},warning:{background:n.COLORS.yellow,text:n.COLORS.white,border:n.COLORS.yellow},danger:{background:n.COLORS.red,text:n.COLORS.white,border:n.COLORS.red}},_a=(e,t)=>{switch(t.type){case"ADD_TOAST":{const o=t.payload;return e.toasts.length<Pe?{...e,toasts:[...e.toasts,o]}:{...e,queue:[...e.queue,o]}}case"REMOVE_TOAST":{const o=t.payload,r=e.toasts.filter(a=>a.id!==o),i=e.queue[0];return i&&r.length<Pe?{toasts:[...r,i],queue:e.queue.slice(1)}:{...e,toasts:r}}case"SHOW_NEXT_FROM_QUEUE":{const o=e.queue[0];return!o||e.toasts.length>=Pe?e:{toasts:[...e.toasts,o],queue:e.queue.slice(1)}}default:return e}},Da={toasts:[],queue:[]},Be=e=>ct[e]??ct.default,Ga=d.styled.div`
|
|
1951
1951
|
position: fixed;
|
|
1952
1952
|
bottom: 24px;
|
|
1953
1953
|
left: 24px;
|