@webority/ui-react 0.78.0 → 0.78.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/dist/components/AppButton.js +1 -1
- package/dist/components/AppChoiceCard.js +1 -1
- package/dist/components/AppConsentBanner.js +1 -1
- package/dist/components/AppFileAttachment.js +1 -1
- package/dist/components/AppSplitButton.js +1 -1
- package/dist/components/warnDeprecatedValue.js +1 -0
- package/dist/types/components/AppButton.d.ts +1 -0
- package/dist/types/components/AppChoiceCard.d.ts +3 -1
- package/dist/types/components/AppConsentBanner.d.ts +2 -2
- package/dist/types/components/AppSplitButton.d.ts +2 -2
- package/dist/types/components/warnDeprecatedValue.d.ts +10 -0
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import{shortcutAria as n,shortcutChip as r}from"../lib/shortcutChip.js";import i from"./withTooltip.js";import a from"./AppIcon.js";import{Button as
|
|
1
|
+
import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import{shortcutAria as n,shortcutChip as r}from"../lib/shortcutChip.js";import i from"./withTooltip.js";import a from"./AppIcon.js";import o from"./warnDeprecatedValue.js";import{Button as s}from"react-bootstrap";import{jsx as c,jsxs as l}from"react/jsx-runtime";var u={primary:`primary`,secondary:`secondary`,outline:`outline-primary`,ghost:`ghost`,text:`text`,danger:`danger`,success:`success`,"secondary-danger":`secondary-danger`,"outline-danger":`outline-danger`,light:`light`,warning:`warning`,neutral:`neutral`,"outline-light":`outline-light`,"outline-secondary":`outline-secondary`},d={subtle:{use:`neutral`,removeIn:`0.79.0`}};function f(e){return`btn-${u[d[e]?.use??e]??`primary`}`}var p={sm:14,md:16,lg:20},m=[`sheen`,`fill`,`expand`,`glow`,`roll`,`none`],h=[`rounded`,`pill`,`sharp`],g=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],_=e=>e===`pill`||e===`sharp`?`wui-btn-shape-${e}`:``;function v(e){return l(`span`,{className:`wui-btn-roll`,children:[c(`span`,{className:`wui-btn-roll__a`,children:e}),c(`span`,{className:`wui-btn-roll__b`,"aria-hidden":`true`,children:e})]})}function y(e,t,n,r){if(!e)return null;let i=n=>typeof e==`string`?c(a,{name:e,size:p[t]??p.md,variant:r,className:n}):c(`span`,{className:[`d-inline-flex`,n].filter(Boolean).join(` `),children:e});return l(`span`,{className:n?`wui-btn-roll-ico wui-btn-pin-icon`:`wui-btn-roll-ico ms-2`,"aria-hidden":`true`,children:[i(),i(`wui-btn-roll-ico__next`)]})}function b(e,t,n,r){if(!e)return null;let i=t===`left`?`me-2`:`ms-2`;return typeof e==`string`?c(a,{name:e,size:p[n]??p.md,variant:r,className:i}):c(`span`,{className:`d-inline-flex ${i}`,children:e})}function x(e,t,n){return e?c(`span`,{className:`wui-btn-pin-icon`,"aria-hidden":`true`,children:typeof e==`string`?c(a,{name:e,size:p[t]??p.md,variant:n}):e}):null}function S({children:a,variant:f=`primary`,size:S=`md`,type:C=`button`,loading:w=!1,disabled:T=!1,block:E=!1,leftIcon:D=null,rightIcon:O=null,href:k,static:A=!1,tooltip:j,tooltipPlacement:M,shortcut:N,animation:P,pinRightIcon:F=!1,shape:I=`rounded`,iconVariant:L,className:R=``,...z}){t(`AppButton`,z),P!==void 0&&e(`AppButton`,`animation`,P,m);let B=P===`roll`&&!A,V=F&&O!=null&&O!==``&&!A&&!w;o(`AppButton`,`variant`,f,d);let H=d[f]?.use??f;if(e(`AppButton`,`variant`,H,Object.keys(u)),e(`AppButton`,`size`,S,Object.keys(p)),e(`AppButton`,`shape`,I,h),L!==void 0&&e(`AppButton`,`iconVariant`,L,g),A)return i(l(`span`,{className:[`btn`,`btn-${u[H]??`primary`}`,S===`sm`?`btn-sm`:S===`lg`?`btn-lg`:``,E?`w-100`:``,_(I),`btn-static`,R].filter(Boolean).join(` `),...z,children:[b(D,`left`,S,L),a,b(O,`right`,S,L)]}),j,M);let U=[E?`w-100`:``,w?`is-loading`:``,P&&m.includes(P)?`btn-anim-${P}`:``,V?`wui-btn-pin-end`:``,_(I),R].filter(Boolean).join(` `),W=(z.as===void 0||z.as===`button`)&&k===void 0&&z.to===void 0,G=W?{}:{role:void 0,tabIndex:T||w?-1:void 0},K=j!=null&&j!==``;return i(l(s,{type:W?C:void 0,href:k,variant:u[H]??`primary`,size:S===`md`?void 0:S,disabled:T||w,"aria-busy":w||void 0,"aria-keyshortcuts":n(N),className:U||void 0,...G,...z,children:[w&&c(`span`,{className:`spinner-border spinner-border-sm me-2`,"aria-hidden":`true`}),!w&&b(D,`left`,S,L),B?v(a):a,!w&&(B?y(O,S,V,L):V?x(O,S,L):b(O,`right`,S,L)),!K&&r(N)]}),j,M,N)}export{f as buttonVariantClass,S as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";var o={sm:` wui-struct-card-sm`,md:``,lg:` wui-struct-card-lg`},s={inline:``,stacked:` wui-struct-card-stacked`},c={sm:16,md:18,lg:22};function l({name:l,multiple:u=!1,value:d,checked:f,onChange:p,icon:m,iconNode:h,iconSize:g,image:_,imageAlt:v=``,children:y,title:b,description:x,checkIcon:S=`check`,checkSize:C=18,hideCheck:w=!1,size:
|
|
1
|
+
import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";var o={sm:` wui-struct-card-sm`,md:``,lg:` wui-struct-card-lg`},s={inline:``,stacked:` wui-struct-card-stacked`},c={sm:16,md:18,lg:22};function l({name:l,multiple:u=!1,value:d,checked:f,onChange:p,icon:m,iconNode:h,iconSize:g,image:_,imageAlt:v=``,children:y,title:b,description:x,checkIcon:S=`check`,checkSize:C=18,hideCheck:w=!1,disabled:T=!1,size:E=`md`,layout:D=`inline`,className:O=``,...k}){t(`AppChoiceCard`,k),e(`AppChoiceCard`,`size`,E,Object.keys(o)),e(`AppChoiceCard`,`layout`,D,Object.keys(s));let A=o[E]??``,j=s[D]??``,M=g??c[E]??c.md;return a(`label`,{className:`struct-card${_?` struct-card-img-card`:``}${A}${j}${w?` wui-struct-card-no-check`:``}${f?` checked`:``}${O?` ${O}`:``}`,"aria-disabled":T||void 0,...k,children:[i(`input`,{type:u?`checkbox`:`radio`,name:l,value:d,className:`struct-card-input`,checked:f,onChange:p,disabled:T}),_?i(`span`,{className:`struct-card-media`,children:i(`img`,{className:`struct-card-img`,src:_,alt:v})}):h||m?i(`span`,{className:`struct-card-ic`,children:h||i(n,{name:m,size:M,variant:f?`bold`:void 0})}):null,i(`span`,{className:`struct-card-body`,children:y||a(r,{children:[b&&i(`span`,{className:`struct-card-title`,children:b}),x&&i(`span`,{className:`struct-card-desc`,children:x})]})}),!w&&i(`span`,{className:`struct-card-check`,children:i(n,{name:S,size:C})})]})}export{l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./useWuiControl.js";import{useEffect as r}from"react";import{jsx as i}from"react/jsx-runtime";import"@webority/ui-elements/elements/consent-banner";import{getConsent as a,saveConsent as o}from"@webority/analytics/site";var s=[`bottom-left`,`bottom-right`],c=[`analytics`,`functional`,`marketing`];function l({heading:l,description:u,policyHref:d,policyLabel:f,analyticsDescription:p,functionalDescription:m,marketingDescription:h,categories:g,position:_=`bottom-left`,standalone:v=!1,className:y=``,style:b,...x}){t(`AppConsentBanner`,x),e(`AppConsentBanner`,`position`,_,s);for(let t of g??[])e(`AppConsentBanner`,`categories`,t,c);let{setRef:S,innerRef:C}=n({on:{"wui-consent-save":e=>{o(e.detail),C.current&&(C.current.preferences=a())}}});return r(()=>{let e=C.current;if(!e)return;let t=a();e.preferences=t,t.decided||e.open()},[C]),i(`wui-consent-banner`,{ref:S,position:_,heading:l||void 0,description:u||void 0,"policy-href":d||void 0,"policy-label":f||void 0,"analytics-description":p||void 0,"functional-description":m||void 0,"marketing-description":h||void 0,categories:g?.length?g.join(` `):void 0,standalone:v||void 0,class:y||void 0,style:b,...x})}export{l as default};
|
|
1
|
+
import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./useWuiControl.js";import{useEffect as r}from"react";import{jsx as i}from"react/jsx-runtime";import"@webority/ui-elements/elements/consent-banner";import{getConsent as a,saveConsent as o}from"@webority/analytics/site";var s=[`bottom-left`,`bottom-right`,`bar`],c=[`analytics`,`functional`,`marketing`];function l({heading:l,description:u,policyHref:d,policyLabel:f,analyticsDescription:p,functionalDescription:m,marketingDescription:h,categories:g,position:_=`bottom-left`,standalone:v=!1,className:y=``,style:b,...x}){t(`AppConsentBanner`,x),e(`AppConsentBanner`,`position`,_,s);for(let t of g??[])e(`AppConsentBanner`,`categories`,t,c);let{setRef:S,innerRef:C}=n({on:{"wui-consent-save":e=>{o(e.detail),C.current&&(C.current.preferences=a())}}});return r(()=>{let e=C.current;if(!e)return;let t=a();e.preferences=t,t.decided||e.open()},[C]),i(`wui-consent-banner`,{ref:S,position:_,heading:l||void 0,description:u||void 0,"policy-href":d||void 0,"policy-label":f||void 0,"analytics-description":p||void 0,"functional-description":m||void 0,"marketing-description":h||void 0,categories:g?.length?g.join(` `):void 0,standalone:v||void 0,class:y||void 0,style:b,...x})}export{l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./warnUnknownProps.js";import t from"./AppIcon.js";import n from"../lib/FieldMessage.js";import{keyOf as r,nameOf as i,sizeLabelOf as a,useItemUrl as o}from"../lib/fileItem.js";import s from"../lib/FileItemRow.js";import{DEFAULT_IMAGE_ACCEPT as c,DEFAULT_MAX_SIZE_MB as l,acceptLabel as u,isImageFile as d,isImageOnlyAccept as f,validateFile as p}from"@webority/ui-elements/helpers";import{useId as m,useState as h}from"react";import{Fragment as g,jsx as _,jsxs as v}from"react/jsx-runtime";function y({label:i=`Attachment`,value:a,name:o,onChange:u,multiple:y=!1,accept:S=c,maxSizeMb:C=l,optional:w=!1,validate:T=!0,error:E,id:D,...O}){e(`AppFileAttachment`,O);let k=m(),A=D||k,[j,M]=h(``),N=y&&Array.isArray(a)?a:a?[a]:[],
|
|
1
|
+
import e from"./warnUnknownProps.js";import t from"./AppIcon.js";import n from"../lib/FieldMessage.js";import{keyOf as r,nameOf as i,sizeLabelOf as a,useItemUrl as o}from"../lib/fileItem.js";import s from"../lib/FileItemRow.js";import{DEFAULT_IMAGE_ACCEPT as c,DEFAULT_MAX_SIZE_MB as l,acceptLabel as u,isImageFile as d,isImageOnlyAccept as f,validateFile as p}from"@webority/ui-elements/helpers";import{useId as m,useState as h}from"react";import{Fragment as g,jsx as _,jsxs as v}from"react/jsx-runtime";function y({label:i=`Attachment`,value:a,name:o,onChange:u,multiple:y=!1,accept:S=c,maxSizeMb:C=l,optional:w=!1,validate:T=!0,error:E,id:D,...O}){e(`AppFileAttachment`,O);let k=m(),A=D||k,[j,M]=h(``),[N,P]=h(!1),F=y&&Array.isArray(a)?a:a?[a]:[],I=f(S),L=e=>e instanceof File?d(e):I||d(e),R=!y&&F.length===1&&L(F[0]),z=b(S,C);function B(e){if(!e.length)return;let t=[],n=``;for(let r of e){let e=T?p(r,{accept:S,maxSizeMb:C}):null;if(e){n||=e;continue}t.push(r)}if(M(n),t.length)if(y){let e=Array.isArray(a)?a:a?[a]:[],n=new Set(e.map(r));u(e.concat(t.filter(e=>!n.has(r(e)))))}else u(t[0])}function V(e){let t=Array.from(e.target.files||[]);e.target.value=``,B(t)}function H(e){M(``),u(y?F.filter((t,n)=>n!==e):null)}let U=E||j,W=U?`${A}-error`:void 0,G=y||F.length===0,K=I?`image`:`file`,q=y?`Add ${K}s`:`Add ${I?`an`:`a`} ${K}`;return v(`div`,{className:`field`,children:[v(`label`,{className:`label`,htmlFor:A,children:[i,w&&_(`span`,{className:`label-optional`,children:` (optional)`})]}),G&&v(g,{children:[v(`label`,{className:`attach-drop${N?` dragging`:``}`,htmlFor:A,onDragEnter:e=>{e.preventDefault(),O.disabled||P(!0)},onDragOver:e=>{e.preventDefault(),O.disabled||P(!0)},onDragLeave:e=>{e.preventDefault(),P(!1)},onDrop:e=>{e.preventDefault(),P(!1),!O.disabled&&B(Array.from(e.dataTransfer?.files||[]))},children:[_(`span`,{className:`attach-drop-icon`,children:_(t,{name:I?`image`:`file-text`,size:18})}),v(`span`,{className:`attach-drop-copy`,children:[_(`span`,{className:`attach-drop-title`,children:q}),z&&_(`span`,{className:`attach-drop-hint`,children:z})]}),_(`span`,{className:`attach-drop-cta`,children:`Browse`})]}),_(`input`,{id:A,type:`file`,className:`visually-hidden`,name:o,accept:S||void 0,multiple:y||void 0,"aria-describedby":W,onChange:V,...O})]}),R?_(x,{item:F[0],isImage:!0,onRemove:()=>H(0)}):F.length>0&&_(`div`,{className:`attach-list`,children:F.map((e,t)=>_(s,{item:e,isImage:L(e),onRemove:()=>H(t)},r(e)))}),_(n,{error:U,errorId:`${A}-error`})]})}function b(e,t){let n=e?.trim()?u(e):``,r=t>0?`up to ${t} MB`:``;return n&&r?`${n}, ${r}`:r?`Up to ${t} MB`:n}function x({item:e,isImage:n,onRemove:r}){let s=o(e,n),c=i(e),l=a(e);return v(`div`,{className:`attach-preview`,children:[v(`div`,{className:`attach-figure`,children:[_(`img`,{src:s,alt:c}),_(`button`,{type:`button`,className:`attach-remove`,"aria-label":`Remove attachment`,onClick:r,children:_(t,{name:`x`,size:18})})]}),v(`div`,{className:`attach-meta`,children:[_(`div`,{className:`attach-name`,children:c}),l&&_(`div`,{className:`attach-size`,children:l})]})]})}export{y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import r from"./AppButton.js";import
|
|
1
|
+
import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import r,{buttonVariantClass as i}from"./AppButton.js";import a from"./AppDropdown.js";import{jsx as o,jsxs as s}from"react/jsx-runtime";var c=[`sm`,`md`,`lg`],l=[`button`,`submit`,`reset`],u={sm:14,md:16,lg:20},d={sm:`btn-sm`,md:``,lg:`btn-lg`};function f({label:f,items:p=[],onClick:m,href:h,type:g=`button`,variant:_=`primary`,size:v=`md`,disabled:y=!1,loading:b=!1,leftIcon:x,shortcut:S,menuLabel:C=`More actions`,align:w=`end`,linkComponent:T,className:E=``,...D}){t(`AppSplitButton`,D),e(`AppSplitButton`,`size`,v,c),e(`AppSplitButton`,`type`,g,l);let O=[`btn`,i(_),d[v]??``,`wui-split-toggle`].filter(Boolean).join(` `),k=o(n,{name:`chevron-down`,size:u[v]??u.md}),A=y||b;return s(`div`,{role:`group`,"aria-label":f,className:[`wui-split-button`,E].filter(Boolean).join(` `),...D,children:[o(r,{variant:_,size:v,type:g,href:h,onClick:m,disabled:y,loading:b,leftIcon:x,shortcut:S,children:f}),A?o(`div`,{className:`wui-split-menu`,children:o(`button`,{type:`button`,className:O,disabled:!0,"aria-label":C,children:k})}):o(a,{className:`wui-split-menu`,trigger:k,toggleClassName:O,label:C,ariaLabel:C,align:w,items:p,linkComponent:T})]})}export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{devWarn as e}from"../lib/devWarn.js";var t=()=>{try{return process.env.NODE_ENV!==`production`}catch{return!0}},n=new Set;function r(r,i,a,o){if(!t()||a==null||!Object.hasOwn(o,a))return;let s=`${r}.${i}.${String(a)}`;if(n.has(s))return;n.add(s);let{use:c,removeIn:l}=o[a];e(`[@webority/ui-react] <${r}> ${i}="${String(a)}" is deprecated and is removed in ${l}. Use ${i}="${c}".`)}export{r as default};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export declare function buttonVariantClass(variant: any): string;
|
|
1
2
|
export default function AppButton({ children, variant, size, type, loading, disabled, block, leftIcon, rightIcon, href, static: isStatic, tooltip, tooltipPlacement, shortcut, animation, pinRightIcon, shape, iconVariant, className, ...rest }: {
|
|
2
3
|
[x: string]: any;
|
|
3
4
|
animation: any;
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
* @param {number} [props.checkSize=18]
|
|
21
21
|
* @param {boolean} [props.hideCheck=false] Render no selected tick. Selection then reads from the
|
|
22
22
|
* card's border and fill alone, and the card sheds the top/bottom room the tick needed.
|
|
23
|
+
* @param {boolean} [props.disabled=false] The card cannot change: no pointer, no hover, announced as disabled. A disabled parent fieldset does the same.
|
|
23
24
|
* @param {'sm'|'md'|'lg'} [props.size='md'] Card size: padding, gap, icon disc, type and the
|
|
24
25
|
* tick offset step together.
|
|
25
26
|
* @param {'inline'|'stacked'} [props.layout='inline'] `inline` puts the icon beside the text;
|
|
@@ -29,7 +30,7 @@
|
|
|
29
30
|
export default function AppChoiceCard({ name, multiple, value, checked, onChange, icon, iconNode, // custom icon element; overrides the `icon` name when provided
|
|
30
31
|
iconSize, image, // image URL — renders an image-forward card (overrides icon)
|
|
31
32
|
imageAlt, children, // custom body template — overrides title/description when provided
|
|
32
|
-
title, description, checkIcon, checkSize, hideCheck, size, layout, className, ...rest }: {
|
|
33
|
+
title, description, checkIcon, checkSize, hideCheck, disabled, size, layout, className, ...rest }: {
|
|
33
34
|
name: string;
|
|
34
35
|
multiple?: boolean;
|
|
35
36
|
value: string;
|
|
@@ -46,6 +47,7 @@ title, description, checkIcon, checkSize, hideCheck, size, layout, className, ..
|
|
|
46
47
|
checkIcon?: string;
|
|
47
48
|
checkSize?: number;
|
|
48
49
|
hideCheck?: boolean;
|
|
50
|
+
disabled?: boolean;
|
|
49
51
|
size?: 'sm' | 'md' | 'lg';
|
|
50
52
|
layout?: 'inline' | 'stacked';
|
|
51
53
|
className?: string;
|
|
@@ -31,7 +31,7 @@ import "@webority/ui-elements/elements/consent-banner";
|
|
|
31
31
|
* @param {string} [props.functionalDescription] What the functional category covers.
|
|
32
32
|
* @param {string} [props.marketingDescription] What the marketing category covers.
|
|
33
33
|
* @param {Array<"analytics"|"functional"|"marketing">} [props.categories=['analytics','functional','marketing']] The optional categories to show. Essential always shows. A category left out has no row, saves as off and is never granted by Accept all.
|
|
34
|
-
* @param {"bottom-left"|"bottom-right"} [props.position='bottom-left']
|
|
34
|
+
* @param {"bottom-left"|"bottom-right"|"bar"} [props.position='bottom-left'] The corner it pins to, or the full-width bar. bar is a slim full-width bar along the bottom at every width.
|
|
35
35
|
* @param {boolean} [props.standalone=false] Render sealed in a shadow root with bundled styles, for a page that does not load `@webority/theme`.
|
|
36
36
|
* @param {string} [props.className] Extra classes on the element.
|
|
37
37
|
* @param {import('react').CSSProperties} [props.style] Inline style; lands on the element with `className`.
|
|
@@ -45,7 +45,7 @@ export default function AppConsentBanner({ heading, description, policyHref, pol
|
|
|
45
45
|
functionalDescription?: string;
|
|
46
46
|
marketingDescription?: string;
|
|
47
47
|
categories?: Array<"analytics" | "functional" | "marketing">;
|
|
48
|
-
position?: "bottom-left" | "bottom-right";
|
|
48
|
+
position?: "bottom-left" | "bottom-right" | "bar";
|
|
49
49
|
standalone?: boolean;
|
|
50
50
|
className?: string;
|
|
51
51
|
style?: import('react').CSSProperties;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* @param {() => void} [props.onClick] Called when the main button is pressed.
|
|
14
14
|
* @param {string} [props.href] Make the main button a link.
|
|
15
15
|
* @param {'button'|'submit'|'reset'} [props.type='button'] The main button's type.
|
|
16
|
-
* @param {'primary'|'secondary'|'outline'|'ghost'|'danger'|'success'|'secondary-danger'|'outline-danger'|'light'|'warning'|'
|
|
16
|
+
* @param {'primary'|'secondary'|'outline'|'ghost'|'danger'|'success'|'secondary-danger'|'outline-danger'|'light'|'warning'|'neutral'|'outline-light'|'outline-secondary'|'text'|'subtle'} [props.variant='primary'] Both halves share it. subtle is deprecated (use neutral) and is removed in 0.79.0.
|
|
17
17
|
* @param {'sm'|'md'|'lg'} [props.size='md']
|
|
18
18
|
* @param {boolean} [props.disabled=false] Disables both halves.
|
|
19
19
|
* @param {boolean} [props.loading=false] Shows the spinner on the main button and disables both halves.
|
|
@@ -40,7 +40,7 @@ export default function AppSplitButton({ label, items, onClick, href, type, vari
|
|
|
40
40
|
onClick?: () => void;
|
|
41
41
|
href?: string;
|
|
42
42
|
type?: 'button' | 'submit' | 'reset';
|
|
43
|
-
variant?: 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger' | 'success' | 'secondary-danger' | 'outline-danger' | 'light' | 'warning' | '
|
|
43
|
+
variant?: 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger' | 'success' | 'secondary-danger' | 'outline-danger' | 'light' | 'warning' | 'neutral' | 'outline-light' | 'outline-secondary' | 'text' | 'subtle';
|
|
44
44
|
size?: 'sm' | 'md' | 'lg';
|
|
45
45
|
disabled?: boolean;
|
|
46
46
|
loading?: boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {string} component
|
|
3
|
+
* @param {string} prop
|
|
4
|
+
* @param {unknown} value the value the caller passed
|
|
5
|
+
* @param {Record<string, { use: string, removeIn: string }>} deprecated
|
|
6
|
+
*/
|
|
7
|
+
export default function warnDeprecatedValue(component: string, prop: string, value: unknown, deprecated: Record<string, {
|
|
8
|
+
use: string;
|
|
9
|
+
removeIn: string;
|
|
10
|
+
}>): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/ui-react",
|
|
3
|
-
"version": "0.78.
|
|
3
|
+
"version": "0.78.1",
|
|
4
4
|
"description": "Webority shared React component library — App* primitives on react-bootstrap + the @webority/theme design system.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
},
|
|
28
28
|
"sideEffects": false,
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@webority/theme": "0.78.
|
|
31
|
-
"@webority/ui-elements": "0.78.
|
|
30
|
+
"@webority/theme": "0.78.1",
|
|
31
|
+
"@webority/ui-elements": "0.78.1"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"@webority/analytics": "^0.23.0",
|