@kubit-ui-web/react-components 2.0.0-alpha.1 → 2.0.0-alpha.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/dist/cjs/components/accordion/accordionStandAlone.js +1 -1
- package/dist/cjs/components/avatar/avatar.js +1 -1
- package/dist/cjs/components/avatar/avatarStandAlone.js +1 -1
- package/dist/cjs/components/calendar/calendarStandAlone.js +1 -1
- package/dist/cjs/components/calendar/header/header.js +1 -1
- package/dist/cjs/components/calendar/list/list.js +1 -1
- package/dist/cjs/components/calendar/selector/monthSelector/monthSelector.js +1 -1
- package/dist/cjs/components/calendar/selector/selector.js +1 -1
- package/dist/cjs/components/calendar/selector/yearSelector/yearSelector.js +1 -1
- package/dist/cjs/components/icon/icon.js +1 -1
- package/dist/cjs/components/icon/iconHost.js +1 -1
- package/dist/cjs/components/link/link.js +1 -1
- package/dist/cjs/components/link/linkAsButton/linkAsButton.js +1 -1
- package/dist/cjs/components/link/linkAsButton/linkAsButtonStandAlone.js +1 -1
- package/dist/cjs/components/link/linkStandAlone.js +1 -1
- package/dist/cjs/components/listOptions/listOptionsStandAlone.js +1 -1
- package/dist/cjs/components/option/option.js +1 -1
- package/dist/cjs/components/option/optionStandAlone.js +1 -1
- package/dist/cjs/components/pagination/paginationStandAlone.js +1 -1
- package/dist/cjs/components/popover/popoverStandAlone.js +1 -1
- package/dist/cjs/components/select/selectControlled.js +1 -1
- package/dist/cjs/components/select/selectStandAlone.js +1 -1
- package/dist/cjs/components/stepperNumber/stepperNumberStandAlone.js +1 -1
- package/dist/cjs/components/table/tableStandAlone.js +1 -1
- package/dist/cjs/components/tableBody/tableBodyStandAlone.js +1 -1
- package/dist/cjs/components/tableCaption/tableCaptionStandAlone.js +1 -1
- package/dist/cjs/components/tableCell/tableCellStandAlone.js +1 -1
- package/dist/cjs/components/tableDivider/tableDividerStandAlone.js +1 -1
- package/dist/cjs/components/tableFoot/tableFootStandAlone.js +1 -1
- package/dist/cjs/components/tableHead/tableHeadStandAlone.js +1 -1
- package/dist/cjs/components/tableRow/tableRowStandAlone.js +1 -1
- package/dist/cjs/components/tag/tagStandAlone.js +1 -1
- package/dist/cjs/components/text/textStandAlone.js +1 -1
- package/dist/cjs/components/toggle/toggleStandAlone.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/lib/components/itemRove/itemRove.js +1 -1
- package/dist/cjs/lib/provider/stylesProvider/stylesProvider.js +1 -1
- package/dist/esm/components/accordion/accordionStandAlone.js +2 -2
- package/dist/esm/components/avatar/avatar.js +1 -1
- package/dist/esm/components/avatar/avatarStandAlone.js +2 -2
- package/dist/esm/components/calendar/calendarStandAlone.js +2 -2
- package/dist/esm/components/calendar/header/header.js +2 -2
- package/dist/esm/components/calendar/list/list.js +3 -3
- package/dist/esm/components/calendar/selector/monthSelector/monthSelector.js +3 -3
- package/dist/esm/components/calendar/selector/selector.js +3 -3
- package/dist/esm/components/calendar/selector/yearSelector/yearSelector.js +3 -3
- package/dist/esm/components/icon/icon.js +1 -1
- package/dist/esm/components/icon/iconHost.js +1 -1
- package/dist/esm/components/link/link.js +1 -1
- package/dist/esm/components/link/linkAsButton/linkAsButton.js +1 -1
- package/dist/esm/components/link/linkAsButton/linkAsButtonStandAlone.js +2 -2
- package/dist/esm/components/link/linkStandAlone.js +2 -2
- package/dist/esm/components/listOptions/listOptionsStandAlone.js +2 -2
- package/dist/esm/components/option/option.js +1 -1
- package/dist/esm/components/option/optionStandAlone.js +2 -2
- package/dist/esm/components/pagination/paginationStandAlone.js +3 -3
- package/dist/esm/components/popover/popoverStandAlone.js +2 -2
- package/dist/esm/components/select/selectControlled.js +1 -1
- package/dist/esm/components/select/selectStandAlone.js +2 -2
- package/dist/esm/components/stepperNumber/stepperNumberStandAlone.js +3 -3
- package/dist/esm/components/table/tableStandAlone.js +2 -2
- package/dist/esm/components/tableBody/tableBodyStandAlone.js +2 -2
- package/dist/esm/components/tableCaption/tableCaptionStandAlone.js +2 -2
- package/dist/esm/components/tableCell/tableCellStandAlone.js +2 -2
- package/dist/esm/components/tableDivider/tableDividerStandAlone.js +2 -2
- package/dist/esm/components/tableFoot/tableFootStandAlone.js +2 -2
- package/dist/esm/components/tableHead/tableHeadStandAlone.js +2 -2
- package/dist/esm/components/tableRow/tableRowStandAlone.js +2 -2
- package/dist/esm/components/tag/tagStandAlone.js +2 -2
- package/dist/esm/components/text/textStandAlone.js +2 -2
- package/dist/esm/components/toggle/toggleStandAlone.js +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/lib/components/itemRove/itemRove.js +2 -2
- package/dist/esm/lib/provider/stylesProvider/stylesProvider.js +2 -2
- package/dist/types/index.d.ts +3 -3
- package/package.json +2 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return k("tbody",{ref:X,className:o?.tbody,"data-testid":"tbody-days-list",children:d(O).map((
|
|
3
|
-
return k("td",
|
|
1
|
+
import{pickCustomAttributes as e}from"../../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{useUtilsProvider as t}from"../../../lib/provider/utilsProvider/utilsProvider.js";import{CustomComponent as a}from"../../../lib/components/customComponent/customComponent.js";import{STATES as s}from"../../../lib/types/states/states.js";import{WEEK_DAYS as o}from"../constants/constants.js";import{useRoveFocus as r}from"../../../lib/hooks/useRoveFocus/useRoveFocus.js";import{getAllDaysInMonth as n}from"../utils/getAllDaysInMonth.js";import{getFirstDayOfMonth as i}from"../utils/getFirstDayOfMonth.js";import{getStateDay as l}from"../utils/getState.js";import{groupDaysByWeeks as d}from"../utils/groupDaysByWeeks.js";import{getDaysAndEmptyDaysUntilMaxDate as m,getFirstEmptyAndDisabledDays as c,handleKeyDownMove as u,handleKeyLeftMove as y,handleKeyPageDownMove as D,handleKeyPageUpMove as f,handleKeyRightMove as g,handleKeyTabMove as p,handleKeyUpMove as h}from"../utils/handleKeysmoves.js";import{useMemo as b,useState as v}from"react";import{jsx as k}from"react/jsx-runtime";var M="ddMMyyyy";const S=({cssClasses:o,currentDate:S,disabledDates:j=[],hasRange:w,maxDate:x,minDate:A,onDayClick:C,selectedDate:E,setSelectedDate:F,sundayFirst:R,...I})=>{const{dateHelpers:L,formatDate:N,transformDate:$}=t(),B=S.getMonth()+1,P=S.getFullYear(),T=N(/* @__PURE__ */new Date,M),U=n(B,P),z=i(P,B-1)-(R?0:1),O=[...new Array(z>=0?z:6),...U],q=O.filter(e=>void 0===e),[G,H]=v(0),[K,W]=v(0),Y=I["data-testid"]||"calendar",J={currentDate:S,dayList:O,daysAndEmptyDaysUntilMaxDate:m(q,x,S),firstEmptyAndDisabledDays:c(q,A,S),maxDate:x,minDate:A},[Q,V,X]=r(b(()=>({calendarBlankDaysSize:q.length,currentFocusSelected:(E[0]?E[0].getDate():/* @__PURE__ */(new Date).getDate())+q.length-1,keyDownMove:u(J),keyLeftMove:y(J),keyPageDownMove:D(J),keyPageUpMove:f(J),keyRightMove:g(J),keyTabMove:p,keyUpMove:h(J),size:O.length}),[q.length,O.length,S,A,x])),Z=e=>(e&&(Q<q.length&&V(q.length),Q>O.length&&V(O.length-1)),Q===e),_=e=>{if(K){if(K<E[0])return e>K&&e<E[0];if(K>E[0])return e<K&&e>E[0]}else{if(e>E[0])return e<E[1];if(e<E[0])return e>E[1]}return!1},ee=e=>{if(!w)return!1;const t=E?.findIndex(t=>t&&e&&N(t,M)===N(e,M));return 0===t&&K?K<e:0===t?e>E[1]:1===t&&e>E[0]},te=e=>{if(!w)return!1;const t=E?.findIndex(t=>t&&e&&N(t,M)===N(e,M));return 0===t&&K?K>e:0===t?e<E[1]:1===t&&e<E[0]};/* @__PURE__ */
|
|
2
|
+
return k("tbody",{ref:X,className:o?.tbody,"data-testid":"tbody-days-list",children:d(O).map((t,r)=>/* @__PURE__ */k("tr",{className:o?.tablerow,children:t.map((t,n)=>{const i=t||0;let d=!t||L.isBefore(t,A)||L.isAfter(t,$(N(x,M),M));d||(d=j.some(e=>t&&L.isDatesEqual(t,e,!1)));const m=l({dayFormatted:i,formatDate:N,hasRange:w,isGhostSelected:_,isSelectedToLeft:ee,isSelectedToRight:te,selectedDate:E,today:T}),c={"data-state":d?s.DISABLED:m};/* @__PURE__ */
|
|
3
|
+
return k("td",t?{"aria-selected":m===s.SELECTED||void 0,className:o?.listelementrove,style:{width:"calc(100% / 7)"},...e(c),children:/* @__PURE__ */k(a,{"aria-disabled":d,"aria-label":N(t,{day:"numeric",month:"long",weekday:"long",year:"numeric"}),className:o?.dayslist,component:"button","data-testid":`${Y}-${n+7*r}`,focus:Z(n+7*r),index:n+7*r,type:"button",onMouseOver:()=>{1===G&&W(i)},onSelectItem:()=>{d||(e=>{const[t,a]=E;w?t&&a||!t&&!a?(F([e,0]),H(1),e instanceof Date&&C?.(e.getDate().toString())):(F([t,e]),H(0),e instanceof Date&&C?.(e.getDate().toString())):(F([e]),e instanceof Date&&C?.(e.getDate().toString()))})(i)},...e(c),children:t.getDate()})}:{"aria-hidden":!0,"aria-label":"empty day",className:o?.listelementempty,style:{width:"calc(100% / 7)"}},`day${n+7*r}${i}`)})},`table-row-${r.toString()}`))})};export{S as List};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return h("ul",{ref:x,"aria-label":d?.monthSelectorAriaLabel,className:g?.monthslist,"data-testid":"tbody-months-list",children:y.getAllMonthName("long",v.locale).map((
|
|
3
|
-
return h("li",{"aria-selected":l===s.SELECTED||void 0,className:g?.monthlistitem,...
|
|
1
|
+
import{pickCustomAttributes as t}from"../../../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{useUtilsProvider as e}from"../../../../lib/provider/utilsProvider/utilsProvider.js";import{CustomComponent as o}from"../../../../lib/components/customComponent/customComponent.js";import{Text as r}from"../../../text/text2.js";import{STATES as s}from"../../../../lib/types/states/states.js";import{useRoveFocus as a}from"../../../../lib/hooks/useRoveFocus/useRoveFocus.js";import{setMonth as n}from"../../utils/setMonth.js";import{keyDownMove as l,keyLeftMove as i,keyRightMove as m,keyTabMove as c,keyUpMove as u}from"./utils/monthSelector.utils.js";import{useMemo as p}from"react";import{jsx as h}from"react/jsx-runtime";const d=({configAccesibility:d,cssClasses:g,currentDate:D,maxDate:b,minDate:M,onMonthClick:f,setCurrentDate:A,today:C,...v})=>{const{dateHelpers:y,transformDate:E}=e(),j=v["data-testid"]||"calendar",k={currentDate:D,maxDate:b,minDate:M},[S,,x]=a(p(()=>({currentFocusSelected:D?D.getMonth():/* @__PURE__ */(new Date).getMonth(),keyDownMove:l(k),keyLeftMove:i(k),keyRightMove:m(k),keyTabMove:c,keyUpMove:u(k),size:y.getAllMonthName("long").length}),[y.getAllMonthName("long").length,D])),F=t=>{const e=D?.getFullYear();return M?.getFullYear()===e&&M?.getMonth()>t||b?.getFullYear()===e&&b?.getMonth()<t};/* @__PURE__ */
|
|
2
|
+
return h("ul",{ref:x,"aria-label":d?.monthSelectorAriaLabel,className:g?.monthslist,"data-testid":"tbody-months-list",children:y.getAllMonthName("long",v.locale).map((e,a)=>{const l=((t,e,o)=>{let r;return r=t.getMonth()===e?s.SELECTED:e===C.getMonth()?s.CURRENT:o?s.DISABLED:s.DEFAULT,r})(D,a,F(a)),i={"data-state":F(a)?s.DISABLED:l};/* @__PURE__ */
|
|
3
|
+
return h("li",{"aria-selected":l===s.SELECTED||void 0,className:g?.monthlistitem,...t(i),children:/* @__PURE__ */h(o,{"aria-disabled":F(a),"aria-label":e.charAt(0).toUpperCase()+e.slice(1),className:g?.monthelement,component:"button",focus:S===a,index:a,type:"button",...t(i),onSelectItem:()=>{A(E(n(new Date(D),a))),f?.(e)},children:/* @__PURE__ */h(r,{component:"span","data-testid":j,children:e.charAt(0).toUpperCase()+e.slice(1)})})},e)})})};export{d as MonthSelector};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return a(r,{additionalSizeClasses:Y?void 0:s?.button_size,additionalVariantClasses:N?void 0:s?.button_variant,"aria-label":n,disabled:o,role:l,size:Y,variant:N,onClick:
|
|
1
|
+
import{useUtilsProvider as e}from"../../../lib/provider/utilsProvider/utilsProvider.js";import{Text as t}from"../../text/text2.js";import{ElementOrIcon as o}from"../../../lib/components/elementOrIcon/elementOrIcon.js";import{Button as r}from"../../button/button.js";import{jsx as a,jsxs as n}from"react/jsx-runtime";const l=({configAccesibility:l,configCalendar:i,cssClasses:s,currentDate:c,customBackText:d,maxDate:u,minDate:m,onDaySelectorClick:h,onLeftIconClick:b,onMonthSelectorClick:S,onRightIconClick:y,onYearSelectorClick:p,setCurrentDate:C,setShowDaySelector:g,setShowMonthSelector:v,setShowYearSelector:w,showDaySelector:f,showMonthSelector:k,showYearSelector:D,useDaySelector:x=!1})=>{const{dateHelpers:A,formatDate:M}=e(),{leftArrowIcon:j,rightArrowIcon:I,sizeSelectorButton:Y,variantSelectorButton:N}=i,z=e=>{C(e)},L=x,R=(k||D)&&!L,B=e=>!R&&e.getMonth()===c.getMonth()&&e.getFullYear()===c.getFullYear(),F=(e,o,n,l)=>{const i=()=>{switch(e){case"day":return c.getDate();case"month":return(t=M(c,{month:"long"})).charAt(0).toUpperCase()+t.slice(1);case"year":return c.getFullYear();default:return null}var t};/* @__PURE__ */
|
|
2
|
+
return a(r,{additionalSizeClasses:Y?void 0:s?.button_size,additionalVariantClasses:N?void 0:s?.button_variant,"aria-label":n,disabled:o,role:l,size:Y,variant:N,onClick:t=>{g("day"===e),v("month"===e),w("year"===e),"day"===e?h?.(i()?.toString(),t):"month"===e?S?.(i()?.toString(),t):p?.(i()?.toString(),t)},children:/* @__PURE__ */a(t,{component:"span",children:i()})})},O={"data-state":B(m)};/* @__PURE__ */
|
|
3
3
|
return n("div",{className:s?.selectorcontainer,style:{justifyContent:L?"center":"space-between"},children:[
|
|
4
|
-
/* @__PURE__ */n("button",{"aria-label":R?"":j["aria-label"],className:s?.selectoriconandbacktextcontainer,"data-testid":"previous-button",type:"button",onClick:e=>{(()=>{const e=new Date(c);R?w(!1):z(A.getSubMonths(e,1)),v(!1),g(!0)})(),j.onClick?.(e),b?.(e)},children:[/* @__PURE__ */a(o,{className:s?.leftarrow,customAttributes:O,disabled:B(m),...j,"aria-label":void 0}),R&&/* @__PURE__ */a(
|
|
4
|
+
/* @__PURE__ */n("button",{"aria-label":R?"":j["aria-label"],className:s?.selectoriconandbacktextcontainer,"data-testid":"previous-button",type:"button",onClick:e=>{(()=>{const e=new Date(c);R?w(!1):z(A.getSubMonths(e,1)),v(!1),g(!0)})(),j.onClick?.(e),b?.(e)},children:[/* @__PURE__ */a(o,{className:s?.leftarrow,customAttributes:O,disabled:B(m),...j,"aria-label":void 0}),R&&/* @__PURE__ */a(t,{additionalClasses:{text:s?.backtext},component:"span",children:d})]}),
|
|
5
5
|
/* @__PURE__ */n("div",{className:s?.selectoroptionscontainer,children:[L&&F("day",f,l?.daySelectorAriaLabel,l?.daySelectorRole),F("month",k,l?.monthSelectorAriaLabel,l?.monthSelectorRole),F("year",D,l?.yearSelectorAriaLabel,l?.yearSelectorRole)]}),
|
|
6
6
|
/* @__PURE__ */a("span",{style:{visibility:R?"hidden":"visible"},children:/* @__PURE__ */a(o,{className:s?.rightarrow,customAttributes:O,"data-testid":"next-button",disabled:B(u),onClick:e=>{z(A.getAddMonths(new Date(c),1)),I.onClick?.(e),y?.(e)},...I})})]})};export{l as Selector};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return p("ul",{ref:F,className:f?.yearslist,"data-testid":"tbody-years-list",children:i(g,b).map((
|
|
3
|
-
return p("li",{className:f?.yearlistitem,...
|
|
1
|
+
import{pickCustomAttributes as t}from"../../../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{useUtilsProvider as e}from"../../../../lib/provider/utilsProvider/utilsProvider.js";import{CustomComponent as r}from"../../../../lib/components/customComponent/customComponent.js";import{Text as o}from"../../../text/text2.js";import{useRoveFocus as s}from"../../../../lib/hooks/useRoveFocus/useRoveFocus.js";import{getYearList as i}from"../../utils/getYearList.js";import{setYear as a}from"../../utils/setYear.js";import{keyDownMove as l,keyLeftMove as n,keyRightMove as m,keyTabMove as u,keyUpMove as c}from"./utils/yearSelector.utils.js";import{useMemo as d}from"react";import{jsx as p}from"react/jsx-runtime";const f=({cssClasses:f,currentDate:y,maxDate:b,minDate:g,onYearClick:v,setCurrentDate:j,today:k,...h})=>{const{transformDate:x}=e(),C=h["data-testid"],[D,,F]=s(d(()=>({currentFocusSelected:i(g,b).indexOf(y?y.getFullYear():/* @__PURE__ */(new Date).getFullYear()),keyDownMove:l(i(g,b)),keyLeftMove:n(i(g,b)),keyRightMove:m(i(g,b)),keyTabMove:u,keyUpMove:c(i(g,b)),size:i(g,b).length}),[i(g,b).length,y,g,b]));/* @__PURE__ */
|
|
2
|
+
return p("ul",{ref:F,className:f?.yearslist,"data-testid":"tbody-years-list",children:i(g,b).map((e,s)=>{const i=((t,e)=>{let r;return r=t.getFullYear()===e?"selected":e===k.getFullYear()?"current":"default",r})(y,e),l={"data-state":i};/* @__PURE__ */
|
|
3
|
+
return p("li",{className:f?.yearlistitem,...t(l),children:/* @__PURE__ */p(r,{"aria-label":String(e),className:f?.yearelement,component:"button",focus:D===s,index:s,type:"button",...t(l),onSelectItem:()=>{j(x(a(new Date(y),e))),v?.(e.toString())},children:/* @__PURE__ */p(o,{additionalClasses:{text:f?.year},component:"span",customAttributes:l,"data-testid":C,children:e})})},String(e))})})};export{f as YearSelector};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{pickCustomAttributes as t}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{useClassName as e}from"../../lib/hooks/useClassName/useClassName.js";import{classNames as s}from"../../lib/utils/classNames/classNames.js";import{ScreenReaderOnly as i}from"../../lib/components/screen-reader-only/screenReaderOnly.js";import{IconStandAlone as a}from"./iconStandAlone.js";import{forwardRef as o}from"react";import{jsx as l,jsxs as r}from"react/jsx-runtime";const n=o(({className:o,color:n,height:c,icon:d,id:m,tabIndex:b,title:u,width:h,...p},f)=>{const{altText:C,disabled:N,onClick:j,screenReaderText:x,...k}=p,y=t(p),I=!(Object.keys(p).includes("color")&&!n||!n),g=e({component:"ICON"});return d?j?/* @__PURE__ */r("button",{"aria-disabled":N,"aria-label":p["aria-label"]||C,className:s(g.button,o),"data-testid":"button",disabled:N,id:m,style:{height:c,width:h},tabIndex:b,title:u||"",type:"button",onClick:j,...y,children:[/* @__PURE__ */l(i,{children:x}),/* @__PURE__ */l(a,{icon:d,...k,ref:f,"aria-label":void 0,className:o,cssClasses:g,"data-testid":void 0,height:c,id:void 0,linearIcon:I,width:h})]}):/* @__PURE__ */l(a,{icon:d,...k,ref:f,altText:C,className:o,cssClasses:g,"data-testid":"icon",height:c,linearIcon:I,width:h}):null});export{n as IconBasic};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{UtilsContext as r}from"../../lib/provider/utilsProvider/utilsProvider.js";import{StylesContext as o}from"../../lib/provider/stylesProvider/stylesProvider.js";import{IconBasic as i}from"./icon.js";import{isValidHttpUrl as s}from"../../lib/utils/is/isValidHttpUrl.js";import{forwardRef as t,useContext as e,useEffect as c,useState as n}from"react";import{jsx as a}from"react/jsx-runtime";const l=t(({fallbackIcon:t,icon:l,...m},f)=>{const p=e(r),d=e(o),b=s(l)?l:`${p?.assets?.baseHost}${d?.icons?.[l]}`,[v,j]=n(b);return c(()=>{if(t){const r=s(t)?t:`${p?.assets?.baseHost}${d?.icons?.[t]}`;(async()=>{try{if(!(await fetch(b,{cache:"no-store"})).ok)throw new Error("Error loading icon");j(b)}catch{j(r)}})()}else j(b)},[b,t,p,d]),/* @__PURE__ */a(i,{...m,ref:f,icon:v})});export{l as IconHost};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useGenericComponents as o}from"../../lib/provider/genericComponentsProvider/genericComponentsProvider.js";import{useClassName as e}from"../../lib/hooks/useClassName/useClassName.js";import{disabledLink as i}from"./helpers/disabled.js";import{LinkStandAlone as a}from"./linkStandAlone.js";import{forwardRef as n}from"react";import{jsx as r}from"react/jsx-runtime";const s=n(({action:n="navigation",additionalClasses:s,additionalTextClasses:t,alignCenter:l=!1,color:d,decoration:m="auto",disabled:c=!1,icon:p,role:C,textVariant:v,variant:f,weight:g,...b},u)=>{const{LINK:N}=o(),{role:j}=i(c,C),x=c||void 0,h=e({additionalClassNames:s,component:"LINK",variant:`${n}_${f}`}),T=e({additionalClassNames:t,component:"TEXT",variant:v});/* @__PURE__ */
|
|
2
2
|
return r(a,{...b,ref:u,action:n,alignCenter:l,"aria-disabled":x,color:d,component:N,cssClasses:h,cssTextClasses:T,decoration:"inline"===n?"underline":m,disabled:c,icon:p,role:j,weight:g})});export{s as Link};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useGenericComponents as s}from"../../../lib/provider/genericComponentsProvider/genericComponentsProvider.js";import{useClassName as e}from"../../../lib/hooks/useClassName/useClassName.js";import{STATES as a}from"../../../lib/types/states/states.js";import{useManageState as t}from"../../../lib/hooks/useManageState/useManageState.js";import{LinkAsButtonStandAlone as o}from"./linkAsButtonStandAlone.js";import{forwardRef as i}from"react";import{jsx as n}from"react/jsx-runtime";const r=i(({additionalSizeClasses:i,additionalVariantClasses:r,disabled:m,size:l,variant:d,...p},c)=>{const C=e({component:"LINK_AS_BUTTON"}),f=e({additionalClassNames:r,component:"BUTTON",variant:d}),u=e({additionalClassNames:i,component:"BUTTON",variant:l}),{LINK:N}=s(),{setRef:b}=t({disabled:m,ref:c,states:Object.values(a)});/* @__PURE__ */
|
|
2
2
|
return n(o,{...p,ref:b,component:N,cssLinkAsButtonClasses:C,cssSizeClasses:u,cssVariantClasses:f,disabled:m})});export{r as LinkAsButton};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return r("div",{className:d?.link_as_button,"data-kbt-full-width":f,"data-testid":N,...S,children:/* @__PURE__ */r(
|
|
1
|
+
import{pickCustomAttributes as t}from"../../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{CustomComponent as s}from"../../../lib/components/customComponent/customComponent.js";import{classNames as i}from"../../../lib/utils/classNames/classNames.js";import{STATES as e}from"../../../lib/types/states/states.js";import{POSITIONS as o}from"../../../lib/types/positions/positions.js";import{ButtonStandAlone as a}from"../../button/buttonStandAlone.js";import{forwardRef as l}from"react";import{jsx as r}from"react/jsx-runtime";const n=l(({"aria-label":l,"aria-labelledby":n,ariaLabelText:m,children:c,component:b,cssLinkAsButtonClasses:d,cssSizeClasses:u,cssVariantClasses:p,fullWidth:f,iconPosition:h,minWidth:k,onClick:C,rel:j,role:y,state:A,target:w,url:x,...D},L)=>{const N=D["data-testid"]||"link-as-button",S=t(D);/* @__PURE__ */
|
|
2
|
+
return r("div",{className:d?.link_as_button,"data-kbt-full-width":f,"data-testid":N,...S,children:/* @__PURE__ */r(s,{ref:L,"aria-label":l,"aria-labelledby":n,component:b,"data-testid":"link",decoration:"none",isDisabled:A===e.DISABLED,rel:j,role:y,target:w,url:x,onClick:C,children:/* @__PURE__ */r("span",{"aria-label":m,...D,className:i(u?.button,p?.button),style:{flexDirection:h===o.LEFT?"row":"row-reverse",minWidth:k,width:f?"100%":"auto"},children:/* @__PURE__ */r(a,{...D,children:c})})})})});export{n as LinkAsButtonStandAlone};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return n(
|
|
1
|
+
import{pickCustomAttributes as t}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{CustomComponent as o}from"../../lib/components/customComponent/customComponent.js";import{classNames as e}from"../../lib/utils/classNames/classNames.js";import{Text as r}from"../text/text2.js";import{ElementOrIcon as s}from"../../lib/components/elementOrIcon/elementOrIcon.js";import{forwardRef as i}from"react";import{jsx as n,jsxs as l}from"react/jsx-runtime";const c=i(({children:i,color:c,component:a=r,cssClasses:m,cssTextClasses:d,decoration:p,disabled:f,draggable:u,icon:b,iconPosition:g,id:x,onClick:C,rel:h,role:j,target:k,url:N,weight:v,...w},y)=>{const D=f?void 0:C,A=f?void 0:N,I=e(m?.link,d?.text),O={color:c,flexDirection:"left"===g?"row":"row-reverse",fontWeight:v,textDecoration:p},W={color:c,fontWeight:v,textDecoration:p},P=t(w);/* @__PURE__ */
|
|
2
|
+
return n(o,{ref:y,className:I,component:a,"data-testid":"link",disabled:f,draggable:u,id:x,rel:h,role:j,style:W,target:k,url:A,onClick:D,...P,children:b?/* @__PURE__ */l("span",{className:m?.labelandiconcontainer,style:O,children:[/* @__PURE__ */n(s,{className:m?.icon,...b},"icon"),i]}):/* @__PURE__ */n("span",{style:O,children:i})})});export{c as LinkStandAlone};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return v("div",{className:C?.list_options,"data-testid":H,...L,children:[!!I&&F.length>0&&/* @__PURE__ */h("div",{className:C?.titlecontainer,children:/* @__PURE__ */h(e,{additionalClasses:{text:C?.title},...i(I)})}),k,B&&/* @__PURE__ */h(
|
|
1
|
+
import{pickCustomAttributes as t}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{CustomComponent as o}from"../../lib/components/customComponent/customComponent.js";import{Text as e}from"../text/text2.js";import{processTextProp as i}from"../../lib/utils/process/processCommonProp.js";import{useRoveFocus as n}from"../../lib/hooks/useRoveFocus/useRoveFocus.js";import{Option as s}from"../option/option.js";import{getOptionVariant as l,isSelected as r,keyDownMove as c,keyUpMove as a}from"./utils/listOptions.utils.js";import{forwardRef as p,useId as m,useImperativeHandle as d,useMemo as u}from"react";import{jsx as h,jsxs as v}from"react/jsx-runtime";const g=p(({caseSensitive:p,charsHighlighted:g,checkedIcon:b,content:k,cssClasses:C,highlightedOptionVariant:f,id:$,index:j=0,listComponent:x,multiSelect:y,onOptionClick:S,options:F,optionsContainerArias:M,roveFocus:O,selectedValue:A,title:I,type:N="selection",...R},V)=>{const H=R["data-testid"]??"list-options",L=t(R),w=u(()=>({currentFocusSelected:-1,keyDownMove:c(F),keyLeftMove:0,keyRightMove:0,keyTabMove:null,keyUpMove:a,size:F.length}),[F]),[z,D,P]=n(O??w),T=m();d(V,()=>P.current,[P]);const U=$??T,_="selection"===N,q="navigation"===N,B=F&&F.length>0;/* @__PURE__ */
|
|
2
|
+
return v("div",{className:C?.list_options,"data-testid":H,...L,children:[!!I&&F.length>0&&/* @__PURE__ */h("div",{className:C?.titlecontainer,children:/* @__PURE__ */h(e,{additionalClasses:{text:C?.title},...i(I)})}),k,B&&/* @__PURE__ */h(o,{ref:P,"aria-label":M?.["aria-label"],"aria-labelledby":M?.["aria-labelledby"],className:C?.optionscontainer,component:x??"ul",id:U,role:_?"listbox":void 0,children:F.map((t,o)=>{const e=r(t,A,y,p),i=/* @__PURE__ */h(s,{"aria-current":q?e:void 0,"aria-selected":_?e:void 0,checkedIcon:b,component:_||q?"div":"li","data-testid":`${H}-section-${j}-option-${o}`,focus:z===o,labelCharsHighlighted:g,multiSelect:y,role:_?"option":void 0,selected:e,tabIndex:q?0:-1,variant:l(t.highlighted,f,R?.optionVariant),...t,onClick:e=>{D(o),S?.(t.value,e),t.onClick?.(e)},onFocus:e=>{o!==z&&D(o),t.onFocus?.(e)}},`${U}Option-${j.toString()}-${o.toString()}`);return"selection"===N?/* @__PURE__ */h("li",{children:i},`${U}LiOption-${j.toString()}-${o.toString()}`):i})})]})});export{g as ListOptionsStandAlone};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useGenericComponents as o}from"../../lib/provider/genericComponentsProvider/genericComponentsProvider.js";import{useClassName as r}from"../../lib/hooks/useClassName/useClassName.js";import{OptionStandAlone as e}from"./optionStandAlone.js";import{forwardRef as s,useEffect as n,useImperativeHandle as t,useRef as i,useState as a}from"react";import{jsx as m}from"react/jsx-runtime";const c=s(({additionalClasses:s,focus:c,onBlur:u,onFocus:l,variant:p,...f},d)=>{const v=r({additionalClassNames:s,component:"OPTION",variant:p}),{LINK:C}=o(),N=i(),[j,L]=a(!1),[P,b]=a(!1);return t(d,()=>N.current,[]),n(()=>{c&&N.current?.focus()},[c]),/* @__PURE__ */m(e,{...f,ref:N,componentLink:C,cssClasses:v,focus:P,hover:j,onBlur:o=>{u?.(o),b(!1)},onFocus:o=>{l?.(o),b(!0)},onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1)})});export{c as Option};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return g(
|
|
1
|
+
import{pickCustomAttributes as t}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{CustomComponent as e}from"../../lib/components/customComponent/customComponent.js";import{Text as s}from"../text/text2.js";import{processIconProp as o,processTextProp as i}from"../../lib/utils/process/processCommonProp.js";import{ElementOrIcon as n}from"../../lib/components/elementOrIcon/elementOrIcon.js";import{STATES as l}from"../../lib/types/states/states.js";import{ENTER as r,SPACE as a}from"../../lib/constants/keyboardKeys/keyboardKeys.js";import{isKeyPressed as c}from"../../lib/utils/keyboard/keyboard.js";import{OptionLabelSlice as m}from"./components.ts/optionLabelSlice.js";import{getHighlightedIndexes as d,getState as b}from"./utils/option.utils.js";import{forwardRef as u}from"react";import{Fragment as p,jsx as h,jsxs as g}from"react/jsx-runtime";const f=u(({checkedIcon:u,component:f,componentLink:C,cssClasses:E,disabled:k,extraContent:y,focus:L,hover:j,icon:A,label:x,labelCharsHighlighted:I,multiSelect:$,onBlur:v,onClick:D,onFocus:M,onMouseEnter:N,onMouseLeave:S,role:T,selected:H,sublabel:B,tabIndex:F,url:K,...O},P)=>{const _=b(k,L,H,$,j,!!I&&I?.length>0),w={"data-state":_},U=_===l.DISABLED,R=t({...O,customAttributes:w}),V=t(w),q=R["data-testid"]||"option",z=[l.MULTIPLE_SELECTED,l.MULTIPLE_SELECTED_HOVER,l.SELECTED].includes(_);let G,J,Q;if("string"==typeof x){const{firstHighlightedIndex:t,lastHighlightedIndex:e}=d(x,I);G=x.substring(0,t),J=x.substring(t,e),Q=x.substring(e)}/* @__PURE__ */
|
|
2
|
+
return g(e,{ref:P,"aria-disabled":U,className:E?.option,...R,component:K?C:f??"div","data-testid":q,role:T,tabIndex:F,url:K,onBlur:v,onClick:t=>{U||D?.(t)},onFocus:M,onKeyDown:t=>{!U&&c(t.key,r.key,a.key)&&D?.(t)},onMouseEnter:N,onMouseLeave:S,...V,children:[/* @__PURE__ */g("div",{className:E?.firstrowcontainer,children:[/* @__PURE__ */g("div",{className:E?.labeliconcontainer,...V,children:[
|
|
3
3
|
/* @__PURE__ */h(n,{className:E?.icon,customAttributes:w,...o(A)}),!!i(B).children&&/* @__PURE__ */h("div",{className:E?.sublabelcontainer,...V,children:/* @__PURE__ */h(s,{additionalClasses:{text:E?.sublabel},component:"span",customAttributes:w,...i(B)})}),
|
|
4
4
|
/* @__PURE__ */h("p",{children:"string"==typeof x?/* @__PURE__ */g(p,{children:[" ",
|
|
5
5
|
/* @__PURE__ */h(m,{component:"span",cssClasses:E?.label,customAttributes:w,"data-testid":`${q}-first-no-hightlighted-label`,children:G}),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{pickCustomAttributes as t}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{CustomComponent as o}from"../../lib/components/customComponent/customComponent.js";import{Text as s}from"../text/text2.js";import{STATES as n}from"../../lib/types/states/states.js";import{PaginationButtonControl as i}from"./fragments/paginationButtonControl.js";import{forwardRef as e}from"react";import{jsx as a,jsxs as r}from"react/jsx-runtime";const p=e(({cssClasses:e,leftDisabled:p,onStepClick:m,paginationLeftButtonControl:c,paginationRightButtonControl:l,rightDisabled:d,stepActive:u,stepsNumber:C,...g},b)=>{const f=g["data-testid"]||"pagination";/* @__PURE__ */
|
|
2
2
|
return r("div",{ref:b,className:e?.pagination,"data-testid":f,children:[
|
|
3
3
|
/* @__PURE__ */a(i,{cssClasses:e,disabled:p,paginationButtonControl:c}),
|
|
4
|
-
/* @__PURE__ */a("div",{className:e?.pagescontainer,"data-testid":`${f}-steps-content`,children:C.map((i,r)=>{const p="number"==typeof i,c={"data-clickable":p,"data-state":u===r?n.SELECTED:n.DEFAULT},l=
|
|
5
|
-
return a(
|
|
4
|
+
/* @__PURE__ */a("div",{className:e?.pagescontainer,"data-testid":`${f}-steps-content`,children:C.map((i,r)=>{const p="number"==typeof i,c={"data-clickable":p,"data-state":u===r?n.SELECTED:n.DEFAULT},l=t(g);/* @__PURE__ */
|
|
5
|
+
return a(o,{className:e?.pagecontainer,component:p?"button":void 0,type:p?"button":void 0,onClick:p?m?.(i-1):void 0,...l,children:/* @__PURE__ */a(s,{additionalClasses:{text:e?.page},component:"span",customAttributes:c,children:i})},`PaginationContent-${i}-${r.toString()}`)})}),
|
|
6
6
|
/* @__PURE__ */a(i,{cssClasses:e,disabled:d,paginationButtonControl:l,position:"right"})]})});export{p as PaginationStandAlone};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return i("div",{ref:j,"data-testid":x,id:b,children:k&&/* @__PURE__ */n(r,{children:[f,/* @__PURE__ */n(
|
|
1
|
+
import{pickCustomAttributes as t}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{CustomComponent as e}from"../../lib/components/customComponent/customComponent.js";import{classNames as o}from"../../lib/utils/classNames/classNames.js";/* empty css */import{getArrowBorderStyles as a}from"./utils/styling.utils.js";import{forwardRef as s}from"react";import{Fragment as r,jsx as i,jsxs as n}from"react/jsx-runtime";const m=s(({anchorElement:s,arrowStyles:m,children:l,component:d="div",cssClasses:p,disableAnimations:c,id:b,isClosing:u,isVisible:k,overlay:f,placement:v,popoverContainerRef:h,zIndex:y="auto",...C},j)=>{const{"data-testid":x="popover",...w}=t(C,!0);/* @__PURE__ */
|
|
2
|
+
return i("div",{ref:j,"data-testid":x,id:b,children:k&&/* @__PURE__ */n(r,{children:[f,/* @__PURE__ */n(e,{ref:h,...w,...C,className:o(p?.popover),component:d,"data-kbt-anchor-element":s,"data-kbt-closing":u,"data-kbt-disable-animations":c,"data-kbt-has-arrow":!!m,"data-kbt-id":"popover","data-kbt-placement":v,style:{zIndex:y||"auto"},children:[!!m&&/* @__PURE__ */i("div",{className:o(p?.arrow),"data-kbt-arrow-border":!!m,"data-kbt-id":"popover-arrow","data-kbt-placement":v,style:{...v?a(v,m):{},zIndex:"number"==typeof y?y+1:y}}),l]})]})})});export{m as PopoverStandAlone};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useGenericComponents as e}from"../../lib/provider/genericComponentsProvider/genericComponentsProvider.js";import{useClassName as o}from"../../lib/hooks/useClassName/useClassName.js";import{TAB as r}from"../../lib/constants/keyboardKeys/keyboardKeys.js";import{isKeyPressed as s}from"../../lib/utils/keyboard/keyboard.js";import{focusFirstDescendant as t}from"../../lib/utils/focusHandlers/focusHandlers.js";import{SelectStandAlone as n}from"./selectStandAlone.js";import{forwardRef as i,useEffect as l,useRef as a}from"react";import{jsx as m}from"react/jsx-runtime";const p=i(({additionalClasses:i,closePopoverOnScroll:p,listOptions:c,onClosePopover:d,open:u,url:f,variant:v,...y},C)=>{const{LINK:b}=e(),j=o({additionalClassNames:i,component:"SELECT",variant:v}),k=a(null);return l(()=>{if(p)return window.addEventListener("scroll",d),()=>{window.removeEventListener("scroll",d)}},[p,d]),/* @__PURE__ */m(n,{ref:C,component:f?b:"button",cssClasses:j,listOptions:c,listOptionsRef:k,open:u,onButtonKeyDown:e=>{u&&s(e.key,r.key)&&!e.shiftKey&&k.current&&("selection"===c.type?k.current.firstElementChild?.focus():t({element:k.current}),e.preventDefault())},onClosePopover:d,...y})});export{p as SelectControlled};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return b("div",{ref:I,className:f?.select,"data-testid":$,role:"combobox",onBlur:x,onFocus:j,onKeyDown:F,...L,"aria-controls":"select-list","aria-expanded":w,tabIndex:0,children:[/* @__PURE__ */b(
|
|
1
|
+
import{pickCustomAttributes as o}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{CustomComponent as e}from"../../lib/components/customComponent/customComponent.js";import{Text as t}from"../text/text2.js";import{processIconProp as n,processTextProp as s}from"../../lib/utils/process/processCommonProp.js";import{ElementOrIcon as i}from"../../lib/components/elementOrIcon/elementOrIcon.js";import{keyDownMove as r,keyUpMove as l}from"../listOptions/utils/listOptions.utils.js";import{ListOptions as a}from"../listOptions/listOptions.js";import{Popover as c}from"../popover/popover.js";import{forwardRef as p,useId as m,useMemo as u}from"react";import{jsx as d,jsxs as b}from"react/jsx-runtime";const v=p(({buttonOrLinkRef:p,component:v,cssClasses:f,icon:C,label:h,listOptions:k,listOptionsRef:y,onBlur:x,onButtonClick:O,onButtonKeyDown:g,onClosePopover:D,onFocus:j,onKeyDown:F,onOptionClick:M,open:w,optionSelected:A,popover:K,url:B,urlTarget:N,...E},I)=>{const R=`select-${m().replace(/:/g,"")}`,T=w?`${R}-list`:void 0,$=E["data-testid"]||"select",L=o(E),P=u(()=>{return{currentFocusSelected:-1,keyDownMove:r(k.options),keyLeftMove:0,keyRightMove:0,keyTabMove:(o=k.options,(e,t)=>{if(t?.shiftKey){const o=Math.max(e,0)-1;return o>=0&&t?.preventDefault(),Math.max(o,0)}const n=Math.max(e,0)+1;return n<=o.length-1&&t?.preventDefault(),Math.min(n,o.length-1)}),keyUpMove:l,size:k.options.length};var o},[k.options]);/* @__PURE__ */
|
|
2
|
+
return b("div",{ref:I,className:f?.select,"data-testid":$,role:"combobox",onBlur:x,onFocus:j,onKeyDown:F,...L,"aria-controls":"select-list","aria-expanded":w,tabIndex:0,children:[/* @__PURE__ */b(e,{ref:p,"aria-controls":T,"aria-expanded":w,"aria-haspopup":"listbox",className:f?.buttonorlinkcontainer,component:v,target:B?N:void 0,type:B?void 0:"button",url:B,onClick:O,onKeyDown:g,children:[/* @__PURE__ */d(t,{additionalClasses:{text:w?f?.labelopened:f?.labelclosed},component:"span",...s(h)}),/* @__PURE__ */d(i,{className:w?f?.iconopened:f?.iconclosed,rotate:w?"180deg":"0deg",transitionDuration:"0.2s",...n(C)})]}),!!K&&/* @__PURE__ */d(c,{anchorElement:p?.current,component:"div",disableAutoFocusFirstDescendant:!0,disableAutoFocusFirstDescendantAfterClose:!0,disableClickOverlayClose:!1,disableEscapeClose:!1,disableTrapFocus:!0,id:T,open:w,placement:"bottom",preventCloseOnClickElements:[p?.current],strategy:"absolute",...K,onClose:()=>{D(),K?.onClose?.()},children:/* @__PURE__ */d("div",{className:f?.listoptionscontainer,"data-testid":`${$}-list`,children:!!k.variant&&!!k.optionVariant&&/* @__PURE__ */d(a,{ref:y,roveFocus:"selection"===k.type?P:void 0,selectedValue:A,...k,onOptionClick:o=>{M(o),D()}})})})]})});export{v as SelectStandAlone};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return u("div",{ref:k,"aria-hidden":!A,"data-testid":S,children:[y?.content&&/* @__PURE__ */d(
|
|
3
|
-
return u("li",{"aria-current":o(f,y,C),"data-testid":`${S}-li-${y}`,style:{display:A?"flex":"block",width:!A&&O?"auto":x},children:[R&&/* @__PURE__ */d(a,{children:c(y,f,v.length,N,l.name,A)}),/* @__PURE__ */u("span",{"aria-hidden":!(A&&!R)||void 0,className:s(h?.stepcontainer,b?.stepcontainer),...k,children:[/* @__PURE__ */u("span",{className:b?.stepcirclecontainer,"data-testid":`${S}-step-${y}`,style:{flexDirection:"vertical"===C?"column":"row"},children:[/* @__PURE__ */d("span",{className:s(h?.stepcircle,b?.stepcircle),...k,children:l.state===i.COMPLETED?/* @__PURE__ */u(p,{children:[/* @__PURE__ */d(r,{className:s(h?.iconselected,b?.iconselected),customAttributes:T,...m}),/* @__PURE__ */d(a,{children:y+1})]}):/* @__PURE__ */d(n,{additionalClasses:{text:s(h?.stepindex,b?.stepindex)},component:"span",customAttributes:T,children:y+1})}),!O&&/* @__PURE__ */d("span",{className:s(h?.stepbar,b?.stepbar),...
|
|
1
|
+
import{pickCustomAttributes as e}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{CustomComponent as t}from"../../lib/components/customComponent/customComponent.js";import{classNames as s}from"../../lib/utils/classNames/classNames.js";import{Text as n}from"../text/text2.js";import{ScreenReaderOnly as a}from"../../lib/components/screen-reader-only/screenReaderOnly.js";import{ElementOrIcon as r}from"../../lib/components/elementOrIcon/elementOrIcon.js";import{STATES as i}from"../../lib/types/states/states.js";import{buildAriaCurrent as o}from"./helpers/aria.js";import{buildScreenReaderText as c}from"./helpers/screnReader.js";import{mapToStepState as l}from"./helpers/stepState.js";import{forwardRef as m}from"react";import{Fragment as p,jsx as d,jsxs as u}from"react/jsx-runtime";const h=m(({completedStepIcon:m,cssOrientationClasses:h,cssVariantClasses:b,currentStep:f=0,horizontalOrientationWidth:x,orientation:C,screenReaderCompletedStep:j,screenReaderTextBuilder:N,screenReaderTitle:y,stepMaxTruncatedLines:$,steps:O,...T},k)=>{const v=l(O,f),A="vertical"===C,R=Boolean(y),S=T["data-testid"]||"stepper-number";/* @__PURE__ */
|
|
2
|
+
return u("div",{ref:k,"aria-hidden":!A,"data-testid":S,children:[y?.content&&/* @__PURE__ */d(t,{className:"kbt-sr-only",component:y.component,children:y?.content}),/* @__PURE__ */d("ol",{className:s(h?.stepper_number,b?.stepper_number),"data-testid":`${S}-steps-container`,children:v.map((l,y)=>{const O=y===v.length-1,T={"data-state":l.state},k=e(T);/* @__PURE__ */
|
|
3
|
+
return u("li",{"aria-current":o(f,y,C),"data-testid":`${S}-li-${y}`,style:{display:A?"flex":"block",width:!A&&O?"auto":x},children:[R&&/* @__PURE__ */d(a,{children:c(y,f,v.length,N,l.name,A)}),/* @__PURE__ */u("span",{"aria-hidden":!(A&&!R)||void 0,className:s(h?.stepcontainer,b?.stepcontainer),...k,children:[/* @__PURE__ */u("span",{className:b?.stepcirclecontainer,"data-testid":`${S}-step-${y}`,style:{flexDirection:"vertical"===C?"column":"row"},children:[/* @__PURE__ */d("span",{className:s(h?.stepcircle,b?.stepcircle),...k,children:l.state===i.COMPLETED?/* @__PURE__ */u(p,{children:[/* @__PURE__ */d(r,{className:s(h?.iconselected,b?.iconselected),customAttributes:T,...m}),/* @__PURE__ */d(a,{children:y+1})]}):/* @__PURE__ */d(n,{additionalClasses:{text:s(h?.stepindex,b?.stepindex)},component:"span",customAttributes:T,children:y+1})}),!O&&/* @__PURE__ */d("span",{className:s(h?.stepbar,b?.stepbar),...e({"data-state":v[y+1].state})})]}),A&&/* @__PURE__ */u("span",{"aria-hidden":!!R||void 0,className:s(h?.stepnamecontainer,b?.stepnamecontainer),"data-islast":O,"data-testid":`${S}-step-description-${y}`,...k,children:[/* @__PURE__ */d(n,{additionalClasses:{text:s(h?.stepname,b?.stepname)},component:"span",customAttributes:T,maxTruncatedLines:$,children:l.name}),!R&&l.state===i.COMPLETED&&j?.content&&/* @__PURE__ */u(t,{className:"kbt-sr-only",component:j.component,"data-testid":j["data-testid"],children:[" ",j.content]})]})]})]},`stepContainer-${y.toString()}`)})})]})});export{h as StepperNumberStandAlone};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{pickCustomAttributes as a}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{CustomComponent as t}from"../../lib/components/customComponent/customComponent.js";import{forwardRef as e}from"react";import{jsx as o,jsxs as l}from"react/jsx-runtime";const i=e(({children:e,component:i="table",cssClasses:s,hasScroll:r,hasScrollDisabled:d,sticky:n,...c},b)=>{const m=a(c),h=c["data-testid"]||"table-standalone";/* @__PURE__ */
|
|
2
2
|
return l("div",{ref:b,className:s?.table,"data-sticky":n,"data-testid":`${h}-wrapper`,children:[
|
|
3
|
-
/* @__PURE__ */o("div",{"aria-hidden":c["aria-hidden"],"aria-label":r?c["aria-label"]:void 0,"aria-labelledby":r?c["aria-labelledby"]:void 0,className:s?.scrollablecontainer,"data-table-scrollable-container":!0,"data-testid":`${h}-scrollable-container`,role:r?"region":void 0,style:{overflow:d?"visible":"auto"},...r?{tabIndex:0}:{},children:/* @__PURE__ */o(
|
|
3
|
+
/* @__PURE__ */o("div",{"aria-hidden":c["aria-hidden"],"aria-label":r?c["aria-label"]:void 0,"aria-labelledby":r?c["aria-labelledby"]:void 0,className:s?.scrollablecontainer,"data-table-scrollable-container":!0,"data-testid":`${h}-scrollable-container`,role:r?"region":void 0,style:{overflow:d?"visible":"auto"},...r?{tabIndex:0}:{},children:/* @__PURE__ */o(t,{className:s?.container,component:i,"data-testid":h,...m,children:e})}),
|
|
4
4
|
/* @__PURE__ */o("div",{className:s?.leftboxshadowcontainer,"data-table-left-shadow":!0}),
|
|
5
5
|
/* @__PURE__ */o("div",{className:s?.rightboxshadowcontainer,"data-table-right-shadow":!0})]})});export{i as TableStandAlone};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return e(
|
|
1
|
+
import{pickCustomAttributes as t}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{CustomComponent as o}from"../../lib/components/customComponent/customComponent.js";import{forwardRef as s}from"react";import{jsx as e}from"react/jsx-runtime";const m=s(({children:s,component:m="tbody",cssClasses:r,id:i,...n},c)=>{const p=t(n);/* @__PURE__ */
|
|
2
|
+
return e(o,{ref:c,className:r?.table_body,component:m,"data-testid":"table-body",...p,id:i,children:s})});export{m as TableBodyStandAlone};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return i(
|
|
1
|
+
import{pickCustomAttributes as t}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{CustomComponent as o}from"../../lib/components/customComponent/customComponent.js";import{forwardRef as e}from"react";import{jsx as i}from"react/jsx-runtime";const n=e(({children:e,component:n="caption",cssClasses:s,hidden:m,id:r,...c},p)=>{const a=t(c);/* @__PURE__ */
|
|
2
|
+
return i(o,{ref:p,className:s?.table_caption,component:n,"data-hidden":m,id:r,...a,children:e})});export{n as TableCaptionStandAlone};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return i(
|
|
1
|
+
import{pickCustomAttributes as t}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{CustomComponent as e}from"../../lib/components/customComponent/customComponent.js";import{forwardRef as o}from"react";import{jsx as i}from"react/jsx-runtime";const n=o(({alignItems:o,bottom:n,children:l,colSpan:a,component:s,cssClasses:d,height:r,hidden:c,id:m,justifyContent:p,left:h,maxWidth:u,minWidth:b,onClick:$,onMouseEnter:g,onMouseLeave:f,right:C,role:y,rowSpan:A,scope:k,sticky:x,textAlign:M,th:j,top:W,verticalAlign:v,width:S,...w},L)=>{const E=t(w),I=d?.dynamic_values({$tdAlignItems:o||"",$tdBottom:n||"",$tdHeight:r||"",$tdJustifyContent:p||"",$tdLeft:h||"",$tdMaxWidth:u||"",$tdMinWidth:b||"",$tdRight:C||"",$tdTextAlign:M||"",$tdTop:W||"",$tdVerticalAlign:v||"",$tdWidth:S||""}).object;/* @__PURE__ */
|
|
2
|
+
return i(e,{ref:L,"aria-label":w["aria-label"],"aria-labelledby":w["aria-labelledby"],className:d?.table_cell,colSpan:a,component:s||(j?"th":"td"),"data-hidden":c,"data-sticky":x,"data-testid":"table-cell",id:m,role:y,rowSpan:A,scope:k,style:I,onClick:$,onMouseEnter:g,onMouseLeave:f,...E,children:c?/* @__PURE__ */i("span",{children:l}):l})});export{n as TableCellStandAlone};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return i(
|
|
1
|
+
import{pickCustomAttributes as t}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{CustomComponent as o}from"../../lib/components/customComponent/customComponent.js";import{forwardRef as e}from"react";import{jsx as i}from"react/jsx-runtime";const r=e(({children:e,component:r="div",cssClasses:s,id:m,...n},c)=>{const d=t(n);/* @__PURE__ */
|
|
2
|
+
return i(o,{ref:c,className:s?.table_divider,component:r,"data-table-divider":!0,"data-testid":"table-divider",id:m,...d,children:e})});export{r as TableDividerStandAlone};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return e(
|
|
1
|
+
import{pickCustomAttributes as t}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{CustomComponent as o}from"../../lib/components/customComponent/customComponent.js";import{forwardRef as s}from"react";import{jsx as e}from"react/jsx-runtime";const m=s(({children:s,component:m="tfoot",cssClasses:r,id:i,...n},c)=>{const p=t(n);/* @__PURE__ */
|
|
2
|
+
return e(o,{ref:c,className:r?.table_foot,component:m,"data-testid":"table-foot",id:i,...p,children:s})});export{m as TableFootStandAlone};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return s(
|
|
1
|
+
import{pickCustomAttributes as t}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{CustomComponent as e}from"../../lib/components/customComponent/customComponent.js";import{forwardRef as o}from"react";import{jsx as s}from"react/jsx-runtime";const i=o(({children:o,component:i="thead",cssClasses:a,hidden:m,id:r,sticky:n,...c},d)=>{const p=t(c);/* @__PURE__ */
|
|
2
|
+
return s(e,{ref:d,className:a?.table_head,component:i,"data-hidden":m,"data-sticky":n,"data-table-head":!0,"data-testid":"table-head",id:r,...p,children:o})});export{i as TableHeadStandAlone};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return n(
|
|
1
|
+
import{pickCustomAttributes as o}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{CustomComponent as t}from"../../lib/components/customComponent/customComponent.js";import{forwardRef as e}from"react";import{jsx as n}from"react/jsx-runtime";const r=e(({active:e,children:r,component:s="tr",cssClasses:a,hoverable:i=!0,id:c,onClick:m,onKeyDown:l,onMouseEnter:u,onMouseLeave:p,...b},d)=>{const C=o(b);/* @__PURE__ */
|
|
2
|
+
return n(t,{ref:d,className:a?.table_row,component:s,"data-active":e,"data-hoverable":i,"data-table-row":!0,"data-testid":"table-row",id:c,onClick:m,onKeyDown:l,onMouseEnter:u,onMouseLeave:p,...C,children:r})});export{r as TableRowStandAlone};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return c(
|
|
1
|
+
import{pickCustomAttributes as t}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{CustomComponent as o}from"../../lib/components/customComponent/customComponent.js";import{Text as s}from"../text/text2.js";import{processIconProp as e,processTextProp as m}from"../../lib/utils/process/processCommonProp.js";import{ElementOrIcon as r}from"../../lib/components/elementOrIcon/elementOrIcon.js";import{forwardRef as n}from"react";import{Fragment as i,jsx as c,jsxs as p}from"react/jsx-runtime";const a=n(({component:n="div",cssClasses:a,icon:l,label:u,...b},f)=>{const d=t(b);/* @__PURE__ */
|
|
2
|
+
return c(o,{ref:f,className:a?.tag,component:n,"data-testid":"tag",...d,children:/* @__PURE__ */p(i,{children:[/* @__PURE__ */c(r,{className:a?.icon,...e(l)}),/* @__PURE__ */c(s,{additionalClasses:{text:a?.label},component:"span",...m(u)})]})})});export{a as TagStandAlone};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return s(
|
|
1
|
+
import{pickCustomAttributes as t}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{CustomComponent as r}from"../../lib/components/customComponent/customComponent.js";/* empty css */import{classNames as e}from"../../lib/utils/classNames/classNames.js";import{forwardRef as o}from"react";import{jsx as s}from"react/jsx-runtime";const i=o(({align:o,children:i,color:a,component:l,cssClasses:m,cursor:c,customAttributes:n,decoration:d,disabled:p,display:u,draggable:x,filter:b,htmlFor:f,id:g,maxTruncatedLines:k,onClick:j,role:C,target:h,textSizeAdjust:A,textWrap:w,transform:W,truncate:y,weight:N,wordBreak:z,wordWrap:B,...F},S)=>{const T=t({...F,...n}),D=e("kbt-text",m?.text,{"kbt-text--disabled":p??!1},{"kbt-text--truncate":y||!!k});/* @__PURE__ */
|
|
2
|
+
return s(r,{ref:S,className:D,component:l,"data-testid":"text",draggable:x,htmlFor:f,id:g,role:C,style:{color:a,cursor:c,display:u,filter:b,fontWeight:N,textAlign:o,textDecoration:d,textSizeAdjust:A,textTransform:W,textWrap:w,wordBreak:z,wordWrap:B},target:h,onClick:j,...T,children:i})});export{i as TextStandAlone};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return l(
|
|
1
|
+
import{pickCustomAttributes as e}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{CustomComponent as o}from"../../lib/components/customComponent/customComponent.js";import{processIconProp as t}from"../../lib/utils/process/processCommonProp.js";import{ElementOrIcon as a}from"../../lib/components/elementOrIcon/elementOrIcon.js";import{buildComponentProps as s}from"./utils/buildComponentProps.js";import{useToggleTransform as i}from"./utils/thumbTransformCalculations.js";import{forwardRef as n,useImperativeHandle as r,useRef as c}from"react";import{jsx as l,jsxs as d}from"react/jsx-runtime";var m=({checked:n=!1,component:m="button",cssClasses:u,dataTestId:b="toggle",disabled:p=!1,id:f,leftIcon:h,name:v,onBlur:y,onClick:k,onFocus:C,onKeyDown:j,onMouseEnter:I,onMouseLeave:N,rightIcon:g,tabIndex:w,value:x,...M},A)=>{const T=n&&!!g,B=!n&&!!h,D="button"!==m,E=c(null),F=c(null),{transform:K}=i({checked:n,thumbRef:F,trackRef:E});r(A,()=>E.current,[]);const L=e(M),O=s({"aria-describedby":M["aria-describedby"],"aria-label":M["aria-label"],"aria-labelledby":M["aria-labelledby"],checked:n,decorative:D,disabled:p,id:f,name:v,onBlur:y,onClick:k,onFocus:C,onKeyDown:j,onMouseEnter:I,onMouseLeave:N,tabIndex:w,value:x});/* @__PURE__ */
|
|
2
|
+
return l(o,{...L,...O,ref:E,className:u?.track,component:m,"data-checked":!!n||void 0,"data-disabled":!!p||void 0,"data-testid":b,children:/* @__PURE__ */d("span",{ref:F,className:u?.thumb,"data-checked":!!n||void 0,"data-disabled":!!p||void 0,style:{transform:K},children:[/* @__PURE__ */l("div",{className:u?.iconwrapper,"data-testid":`${b}-right-icon`,style:{opacity:T?1:0},children:/* @__PURE__ */l(a,{className:u?.icon,"data-disabled":!!p||void 0,...t(g)})}),/* @__PURE__ */l("div",{className:u?.iconwrapper,"data-testid":`${b}-left-icon`,style:{opacity:B?1:0},children:/* @__PURE__ */l(a,{className:u?.icon,"data-disabled":!!p||void 0,...t(h)})})]})})};m.displayName="ToggleStandAlone";const u=n(m);export{u as ToggleStandalone};
|
package/dist/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{formatDate as o,formatDateToUTC as t}from"./lib/utils/date/formatDate.js";import{transformDate as r}from"./lib/utils/date/transformDate.js";import{getAddDays as e,getAddMonths as n,getAddYears as m,getAllMonthNames as s,getAllWeekdayNames as p,getSubDays as i,getSubMonths as l,getSubYears as a,isAfter as c,isBefore as f,isDatesEqual as d}from"./lib/utils/date/date.js";import{defaultGenericComponents as j}from"./lib/provider/genericComponentsProvider/defaultGenericComponents.js";import{GenericComponentContext as b,GenericComponentsProvider as u,useGenericComponents as g}from"./lib/provider/genericComponentsProvider/genericComponentsProvider.js";import{UtilsContext as C,UtilsProvider as k,useUtilsProvider as v}from"./lib/provider/utilsProvider/utilsProvider.js";import{StylesContext as B,StylesProvider as x,useStylesContext as h}from"./lib/provider/stylesProvider/stylesProvider.js";import{AccordionControlled as y}from"./components/accordion/accordionControlled.js";import{AccordionUnControlled as S}from"./components/accordion/accordionUnControlled.js";import{Text as A}from"./components/text/text2.js";import{Alert as U}from"./components/alert/alertControlled.js";import{Dot as P}from"./components/dot/dot.js";import{IconBasic as D}from"./components/icon/icon.js";import{IconHost as F}from"./components/icon/iconHost.js";import{Avatar as T}from"./components/avatar/avatar.js";import{Badge as w}from"./components/badge/badge.js";import{Link as H}from"./components/link/link.js";import{STATES as M}from"./lib/types/states/states.js";import{BreadCrumbs as z}from"./components/breadcrumbs/breadcrumbs.js";import{MIRROR_POSITIONS as I,POSITIONS as K}from"./lib/types/positions/positions.js";import{Button as N}from"./components/button/button.js";import{Calendar as O}from"./components/calendar/calendar.js";import{CardStandAlone as R}from"./components/card/cardStandAlone.js";import{Card as G}from"./components/card/card.js";import{CAROUSEL_BUILD_SCREEN_READER_CURRENT_PAGE_KEY as L,CAROUSEL_BUILD_SCREEN_READER_NUM_PAGES_KEY as q}from"./components/carousel/types/carousel.js";import{Carousel as E}from"./components/carousel/carousel.js";import{CheckboxBaseControlled as J}from"./components/checkboxBase/checkboxBaseControlled.js";import{ErrorMessage as Q}from"./lib/components/errorMessage/errorMessage.js";import{LabelStandAlone as V}from"./components/label/labelStandAlone.js";import{CheckboxControlled as W}from"./components/checkbox/checkboxControlled.js";import{CheckboxUnControlled as X}from"./components/checkbox/checkboxUnControlled.js";import{CheckboxBaseUnControlled as Y}from"./components/checkboxBase/checkboxBaseUncontrolled.js";import{Chip as Z}from"./components/chip/chip.js";import{TableBody as $}from"./components/tableBody/tableBody.js";import{Table as _}from"./components/table/table.js";import{TableCaption as oo}from"./components/tableCaption/tableCaption.js";import{TableDivider as to}from"./components/tableDivider/tableDivider.js";import{TableCell as ro}from"./components/tableCell/tableCell.js";import{TableHead as eo}from"./components/tableHead/tableHead.js";import{TableRow as no}from"./components/tableRow/tableRow.js";import{DataTable as mo}from"./components/dataTable/dataTable.js";import{DEVICE_BREAKPOINTS as so,DeviceBreakpointsTypeUtils as po}from"./lib/types/breakpoints/breakpoints.js";import{Image as io}from"./components/image/image2.js";import{InputBase as lo}from"./components/inputBase/inputBase.js";import{InputDecoration as ao}from"./components/inputDecoration/inputDecoration.js";import{Input as co}from"./components/input/input.js";import{InputSignatureControlled as fo}from"./components/inputSignature/inputSignatureControlled.js";import{InputSignatureUnControlled as jo}from"./components/inputSignature/inputSignatureUncontrolled.js";import{LinkAsButton as bo}from"./components/link/linkAsButton/linkAsButton.js";import{Option as uo}from"./components/option/option.js";import{ListOptions as go}from"./components/listOptions/listOptions.js";import{Popover as Co}from"./components/popover/popover.js";import{ModalControlled as ko}from"./components/modal/modalControlled.js";import{ModalUnControlled as vo}from"./components/modal/modalUnControlled.js";import{PageControl as Bo}from"./components/pageControl/pageControl.js";import{Pagination as xo}from"./components/pagination/pagination.js";import{popoverMWArrow as ho,popoverMWAutoPlacement as yo,popoverMWFlip as So,popoverMWHide as Ao,popoverMWOffset as Uo,popoverMWShift as Po,popoverMWSize as Do}from"./components/popover/positioning/middlewares.js";import{ProgressBar as Fo}from"./components/progressBar/progressBar.js";import{RadioButtonStandAlone as To}from"./components/radioButton/radioButtonStandAlone.js";import{RadioButton as wo}from"./components/radioButton/radioButton.js";import{SelectControlled as Ho}from"./components/select/selectControlled.js";import{SelectUnControlled as Mo}from"./components/select/selectUncontrolled.js";import{SelectorBoxFile as zo}from"./components/selectorBoxFile/selectorBoxFile.js";import{Skeleton as Io}from"./components/skeleton/skeleton2.js";import{TooltipUnControlled as Ko}from"./components/tooltip/tooltipUnControlled.js";import{Slider as No}from"./components/slider/slider.js";import{Snackbar as Oo}from"./components/snackbar/snackbar.js";import{StepperNumber as Ro}from"./components/stepperNumber/stepperNumber.js";import{TableFoot as Go}from"./components/tableFoot/tableFoot.js";import{TabsControlled as Lo}from"./components/tabs/tabsControlled.js";import{TabsUnControlled as qo}from"./components/tabs/tabsUnControlled.js";import{Tag as Eo}from"./components/tag/tag.js";import{TextArea as Jo}from"./components/textArea/textArea.js";import{ToggleStandalone as Qo}from"./components/toggle/toggleStandAlone.js";import{ToggleControlled as Vo}from"./components/toggle/toggleControlled.js";import{ToggleUncontrolled as Wo}from"./components/toggle/toggleUnControlled.js";import{TooltipControlled as Xo}from"./components/tooltip/tooltipControlled.js";import{VirtualKeyboard as Yo}from"./components/virtualKeyboard/virtualKeyboard.js";import{SIZES as Zo}from"./lib/types/sizes/sizes.js";export{S as Accordion,y as AccordionControlled,U as Alert,T as Avatar,w as Badge,z as BreadCrumbs,N as Button,L as CAROUSEL_BUILD_SCREEN_READER_CURRENT_PAGE_KEY,q as CAROUSEL_BUILD_SCREEN_READER_NUM_PAGES_KEY,O as Calendar,G as Card,R as CardStandAlone,E as Carousel,X as Checkbox,Y as CheckboxBase,J as CheckboxBaseControlled,W as CheckboxControlled,Z as Chip,so as DEVICE_BREAKPOINTS,mo as DataTable,po as DeviceBreakpointsTypeUtils,P as Dot,Q as ErrorMessage,b as GenericComponentContext,u as GenericComponentsProvider,F as Icon,D as IconBasic,io as Image,co as Input,lo as InputBase,ao as InputDecoration,jo as InputSignature,fo as InputSignatureControlled,V as Label,H as Link,bo as LinkAsButton,go as ListOptions,I as MIRROR_POSITIONS,vo as Modal,ko as ModalControlled,uo as Option,K as POSITIONS,Bo as PageControl,xo as Pagination,Co as Popover,Fo as ProgressBar,wo as RadioButton,To as RadioButtonStandAlone,Zo as SIZES,M as STATES,Mo as Select,Ho as SelectControlled,zo as SelectorBoxFile,Io as Skeleton,No as Slider,Oo as Snackbar,Ro as StepperNumber,B as StylesContext,x as StylesProvider,_ as Table,$ as TableBody,oo as TableCaption,ro as TableCell,to as TableDivider,Go as TableFoot,eo as TableHead,no as TableRow,qo as Tabs,Lo as TabsControlled,Eo as Tag,A as Text,Jo as TextArea,Vo as ToggleControlled,Qo as ToggleStandalone,Wo as ToggleUncontrolled,Ko as Tooltip,Xo as TooltipControlled,C as UtilsContext,k as UtilsProvider,Yo as VirtualKeyboard,j as defaultGenericComponents,o as formatDate,t as formatDateToUTC,e as getAddDays,n as getAddMonths,m as getAddYears,s as getAllMonthNames,p as getAllWeekdayNames,i as getSubDays,l as getSubMonths,a as getSubYears,c as isAfter,f as isBefore,d as isDatesEqual,ho as popoverMWArrow,yo as popoverMWAutoPlacement,So as popoverMWFlip,Ao as popoverMWHide,Uo as popoverMWOffset,Po as popoverMWShift,Do as popoverMWSize,r as transformDate,g as useGenericComponents,h as useStylesContext,v as useUtilsProvider};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return i(
|
|
1
|
+
import{pickCustomAttributes as e}from"../../utils/pickCustomAttributes/pickCustomAttributes.js";import{useClassName as s}from"../../hooks/useClassName/useClassName.js";import{CustomComponent as t}from"../customComponent/customComponent.js";import{classNames as o}from"../../utils/classNames/classNames.js";import{useEffect as r,useRef as a}from"react";import{jsx as i}from"react/jsx-runtime";const n=({ariaControls:n,ariaDisabled:c=!1,ariaHidden:l=!1,ariaLabel:m,ariaSelected:u,asElement:d,checkIsFirstTime:p=!1,children:b,classNames:f,customAttributes:C,disabled:v=!1,disableKeys:N=!1,focus:h,id:j,index:k,onMouseOver:x,onSelectItem:y,preventScrollOnFocus:F=!1,role:I,setFocus:O,type:S,url:A,...E})=>{const M=a(null),D=a(p),K=s({component:"ITEM_ROVE"}),T=e({...E,...C});r(()=>{h&&!D.current?M.current?.focus({preventScroll:F}):D.current=!1},[h,F]);const _=e=>{N||(O?.(k),e&&y?.())};/* @__PURE__ */
|
|
2
|
+
return i(t,{ref:M,"aria-controls":n,"aria-disabled":c,"aria-hidden":l,"aria-label":m,"aria-selected":u,className:o(K.item_rove,f),component:d,"data-testid":"item-rove",disabled:v,id:j,role:I,tabIndex:h?0:-1,type:S,url:A,onClick:()=>_(!0),onFocus:x,onKeyDown:()=>_(!1),onMouseOver:x,...T,children:b})};export{n as ItemRove};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return a(
|
|
1
|
+
import{formatDate as e}from"../../utils/date/formatDate.js";import{transformDate as t}from"../../utils/date/transformDate.js";import{getAddDays as s,getAddMonths as r,getAddYears as o,getAllMonthNames as i,getAllWeekdayNames as a,getSubDays as n,getSubMonths as l,getSubYears as m,isAfter as d,isBefore as c,isDatesEqual as p}from"../../utils/date/date.js";import{defaultGenericComponents as h}from"../genericComponentsProvider/defaultGenericComponents.js";import{GenericComponentsProvider as u}from"../genericComponentsProvider/genericComponentsProvider.js";import{UtilsProvider as g}from"../utilsProvider/utilsProvider.js";import{createContext as v,useContext as f,useMemo as x,useState as b}from"react";import{jsx as y}from"react/jsx-runtime";const C=v(void 0),S=()=>{const e=f(C);if(!e)throw new Error("useStylesContext must be used within a StylesProvider");return e};var j={lg:992,md:768,sm:576,xl:1200};const w=({bernovaProvider:v,breakpoints:f=j,children:S,icons:w={},illustrations:D={},jsInCss:k=!0,linkId:P="kb-styled-provider",themeSelected:N})=>{const A=x(()=>(e=>({onlyDesktop:`(max-width: ${e.xl}px)`,onlyLargeDesktop:`(min-width: ${e.xl}px)`,onlyMobile:`(max-width: ${e.md-1}px)`,onlyTablet:`(min-width: ${e.md}px) and (max-width: ${e.lg-1}px)`}))(f),[f]),T=x(()=>new v({jsInCss:k,linkId:P}),[v,k,P]),[$,I]=b(N||T.themeSelected);T.themeSelected=$||"";const M=e=>{T.themeSelected=e,I(e)},E=({additionalClassNames:e,component:t,variant:s})=>T.getComponentStyles({additionalClassNames:e,component:t,variant:s||""}),Y=x(()=>({breakpoints:f,changeTheme:M,classes:[],currentTheme:$,getComponentStyles:E,icons:w,illustrations:D,mediaQueries:A,themeClassNames:T.classNames,themes:T.allThemes,themeVariables:T.variables}),[f,$,w,D,A,T.classNames,T.allThemes,T.variables]);/* @__PURE__ */
|
|
2
|
+
return y(g,{dateHelpers:{getAddDays:s,getAddMonths:r,getAddYears:o,getAllMonthName:(e,t)=>i("numeric"===e||"2-digit"===e?"long":e||"long",t),getAllWeekdayName:a,getSubDays:n,getSubMonths:l,getSubYears:m,isAfter:d,isBefore:c,isDatesEqual:p},formatDate:e,transformDate:t,children:/* @__PURE__ */y(u,{value:{...h},children:/* @__PURE__ */y(C.Provider,{value:Y,children:S})})})};export{C as StylesContext,w as StylesProvider,S as useStylesContext};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3153,11 +3153,11 @@ export declare const defaultGenericComponents: {
|
|
|
3153
3153
|
dataTestId?: string;
|
|
3154
3154
|
draggable?: boolean;
|
|
3155
3155
|
} & {
|
|
3156
|
-
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined | undefined;
|
|
3157
|
-
"aria-describedby"?: string | undefined | undefined;
|
|
3158
|
-
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
3159
3156
|
"aria-label"?: string | undefined | undefined;
|
|
3157
|
+
"aria-describedby"?: string | undefined | undefined;
|
|
3160
3158
|
"aria-labelledby"?: string | undefined | undefined;
|
|
3159
|
+
"aria-disabled"?: (boolean | "false" | "true") | undefined;
|
|
3160
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined | undefined;
|
|
3161
3161
|
} & DataAttributes & RefAttributes<unknown>>;
|
|
3162
3162
|
};
|
|
3163
3163
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubit-ui-web/react-components",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.2",
|
|
4
4
|
"description": "Kubit React Components is a customizable, accessible library of React web components, designed to enhance your application's user experience",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Kubit",
|
|
@@ -173,7 +173,7 @@
|
|
|
173
173
|
"vite-tsconfig-paths": "^6.0.4",
|
|
174
174
|
"vitest": "^4.0.17",
|
|
175
175
|
"vitest-axe": "^0.1.0",
|
|
176
|
-
"@kubit-ui-web/design-system": "2.0.0-
|
|
176
|
+
"@kubit-ui-web/design-system": "2.0.0-alpha.1"
|
|
177
177
|
},
|
|
178
178
|
"publishConfig": {
|
|
179
179
|
"access": "public",
|