@kubit-ui-web/react-components 2.0.0-beta.72 → 2.0.0-beta.73
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/CHANGELOG.md +6 -0
- package/dist/cjs/components/accordion/accordionStandAlone.js +1 -1
- package/dist/cjs/components/avatar/fragments/drawContent.js +1 -1
- package/dist/cjs/components/calendar/calendarStandAlone.js +1 -1
- package/dist/cjs/components/checkboxBase/checkboxBaseControlled.js +1 -1
- package/dist/cjs/components/checkboxBase/checkboxBaseStandAlone.js +1 -1
- package/dist/cjs/components/dataTable/components/dataTableHead.js +1 -1
- package/dist/cjs/components/dataTable/components/hiddenDataTableHead.js +1 -1
- package/dist/cjs/components/dataTable/dataTableStandAlone.js +1 -1
- package/dist/cjs/components/label/labelStandAlone.js +1 -1
- package/dist/cjs/components/modal/fragments/modalHeader.js +1 -1
- package/dist/cjs/components/modal/modalStandAlone.js +1 -1
- package/dist/cjs/components/popover/popover.js +1 -1
- package/dist/cjs/components/popover/stories/demos/animationsDemo.js +3 -3
- package/dist/cjs/components/popover/stories/demos/popoverBodyPositionDemo.js +1 -1
- package/dist/cjs/components/popover/stories/demos/popoverScrollBehaviorDemo.js +1 -1
- package/dist/cjs/components/popover/styles/popover-arrow.css +1 -1
- package/dist/cjs/components/select/selectStandAlone.js +1 -1
- package/dist/cjs/components/slider/components/sliderScaleStandAlone.js +1 -1
- package/dist/cjs/components/slider/sliderStandAlone.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/tableDivider/tableDividerStandAlone.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/tabs/tabsStandAlone.js +1 -1
- package/dist/cjs/components/text/text.css +1 -1
- package/dist/cjs/components/textArea/components/textCount/textCountStandAlone.js +1 -1
- package/dist/cjs/components/tooltip/positioning/computePosition.js +1 -1
- package/dist/cjs/components/tooltip/tooltipStandAlone.js +1 -1
- package/dist/cjs/lib/components/overlay/overlayStandAlone.js +1 -1
- package/dist/esm/components/accordion/accordionStandAlone.mjs +1 -1
- package/dist/esm/components/accordion/index.mjs +1 -1
- package/dist/esm/components/alert/index.mjs +1 -1
- package/dist/esm/components/avatar/fragments/drawContent.mjs +1 -1
- package/dist/esm/components/avatar/index.mjs +1 -1
- package/dist/esm/components/badge/index.mjs +1 -1
- package/dist/esm/components/breadcrumbs/index.mjs +1 -1
- package/dist/esm/components/button/index.mjs +1 -1
- package/dist/esm/components/calendar/calendarStandAlone.mjs +1 -1
- package/dist/esm/components/calendar/header/index.mjs +1 -1
- package/dist/esm/components/calendar/index.mjs +1 -1
- package/dist/esm/components/calendar/selector/index.mjs +1 -1
- package/dist/esm/components/card/index.mjs +1 -1
- package/dist/esm/components/carousel/hooks/utils/calc.utils.mjs +1 -1
- package/dist/esm/components/carousel/hooks/utils/constants.mjs +1 -1
- package/dist/esm/components/carousel/hooks/utils/dom.utils.mjs +1 -1
- package/dist/esm/components/carousel/index.mjs +1 -1
- package/dist/esm/components/carousel/types/index.mjs +1 -1
- package/dist/esm/components/checkbox/index.mjs +1 -1
- package/dist/esm/components/checkboxBase/checkboxBaseControlled.mjs +1 -1
- package/dist/esm/components/checkboxBase/checkboxBaseStandAlone.mjs +1 -1
- package/dist/esm/components/checkboxBase/index.mjs +1 -1
- package/dist/esm/components/chip/index.mjs +1 -1
- package/dist/esm/components/dataTable/components/dataTableHead.mjs +1 -1
- package/dist/esm/components/dataTable/components/hiddenDataTableHead.mjs +1 -1
- package/dist/esm/components/dataTable/dataTableStandAlone.mjs +1 -1
- package/dist/esm/components/dataTable/index.mjs +1 -1
- package/dist/esm/components/dot/index.mjs +1 -1
- package/dist/esm/components/icon/index.mjs +1 -1
- package/dist/esm/components/image/index.mjs +1 -1
- package/dist/esm/components/input/index.mjs +1 -1
- package/dist/esm/components/inputBase/index.mjs +1 -1
- package/dist/esm/components/inputDecoration/index.mjs +1 -1
- package/dist/esm/components/inputSignature/hook/index.mjs +1 -1
- package/dist/esm/components/inputSignature/index.mjs +1 -1
- package/dist/esm/components/inputSignature/utils/index.mjs +1 -1
- package/dist/esm/components/label/index.mjs +1 -1
- package/dist/esm/components/label/labelStandAlone.mjs +1 -1
- package/dist/esm/components/link/index.mjs +1 -1
- package/dist/esm/components/listOptions/index.mjs +1 -1
- package/dist/esm/components/modal/fragments/index.mjs +1 -1
- package/dist/esm/components/modal/fragments/modalHeader.mjs +1 -1
- package/dist/esm/components/modal/index.mjs +1 -1
- package/dist/esm/components/modal/modalStandAlone.mjs +1 -1
- package/dist/esm/components/modal/utils/index.mjs +1 -1
- package/dist/esm/components/option/index.mjs +1 -1
- package/dist/esm/components/pageControl/index.mjs +1 -1
- package/dist/esm/components/pagination/index.mjs +1 -1
- package/dist/esm/components/popover/index.mjs +1 -1
- package/dist/esm/components/popover/popover.mjs +1 -1
- package/dist/esm/components/popover/positioning/middlewares.mjs +1 -1
- package/dist/esm/components/popover/stories/demos/animationsDemo.mjs +3 -3
- package/dist/esm/components/popover/stories/demos/popoverBodyPositionDemo.mjs +1 -1
- package/dist/esm/components/popover/stories/demos/popoverScrollBehaviorDemo.mjs +1 -1
- package/dist/esm/components/popover/styles/popover-arrow.css +1 -1
- package/dist/esm/components/popover/types/index.mjs +1 -1
- package/dist/esm/components/portal/index.mjs +1 -1
- package/dist/esm/components/progressBar/index.mjs +1 -1
- package/dist/esm/components/radioButton/index.mjs +1 -1
- package/dist/esm/components/select/index.mjs +1 -1
- package/dist/esm/components/select/selectStandAlone.mjs +1 -1
- package/dist/esm/components/select/utils/getState/getState.mjs +1 -1
- package/dist/esm/components/selectorBoxFile/index.mjs +1 -1
- package/dist/esm/components/skeleton/index.mjs +1 -1
- package/dist/esm/components/slider/components/sliderScaleStandAlone.mjs +1 -1
- package/dist/esm/components/slider/index.mjs +1 -1
- package/dist/esm/components/slider/sliderStandAlone.mjs +1 -1
- package/dist/esm/components/snackbar/hooks/index.mjs +1 -1
- package/dist/esm/components/stepperNumber/fixture/index.mjs +1 -1
- package/dist/esm/components/stepperNumber/index.mjs +1 -1
- package/dist/esm/components/stepperNumber/stepperNumberStandAlone.mjs +1 -1
- package/dist/esm/components/table/index.mjs +1 -1
- package/dist/esm/components/table/tableStandAlone.mjs +1 -1
- package/dist/esm/components/tableBody/index.mjs +1 -1
- package/dist/esm/components/tableCaption/index.mjs +1 -1
- package/dist/esm/components/tableCell/index.mjs +1 -1
- package/dist/esm/components/tableDivider/index.mjs +1 -1
- package/dist/esm/components/tableDivider/tableDividerStandAlone.mjs +1 -1
- package/dist/esm/components/tableFoot/index.mjs +1 -1
- package/dist/esm/components/tableHead/index.mjs +1 -1
- package/dist/esm/components/tableHead/tableHeadStandAlone.mjs +1 -1
- package/dist/esm/components/tableRow/index.mjs +1 -1
- package/dist/esm/components/tableRow/tableRowStandAlone.mjs +1 -1
- package/dist/esm/components/tabs/index.mjs +1 -1
- package/dist/esm/components/tabs/tabsStandAlone.mjs +1 -1
- package/dist/esm/components/tag/index.mjs +1 -1
- package/dist/esm/components/text/index.mjs +1 -1
- package/dist/esm/components/text/text.css +1 -1
- package/dist/esm/components/textArea/components/textCount/textCountStandAlone.mjs +1 -1
- package/dist/esm/components/textArea/index.mjs +1 -1
- package/dist/esm/components/toggle/index.mjs +1 -1
- package/dist/esm/components/tooltip/index.mjs +1 -1
- package/dist/esm/components/tooltip/positioning/computePosition.mjs +1 -1
- package/dist/esm/components/tooltip/tooltipStandAlone.mjs +1 -1
- package/dist/esm/components/virtualKeyboard/index.mjs +1 -1
- package/dist/esm/lib/components/elementOrIcon/index.mjs +1 -1
- package/dist/esm/lib/components/errorMessage/index.mjs +1 -1
- package/dist/esm/lib/components/itemRove/index.mjs +1 -1
- package/dist/esm/lib/components/overlay/overlayStandAlone.mjs +1 -1
- package/dist/esm/lib/components/screen-reader-only/index.mjs +1 -1
- package/dist/esm/lib/hooks/useClickOutside/clickOutsideHandler.mjs +1 -1
- package/dist/types/components/popover/types/index.d.ts +2 -2
- package/package.json +16 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useRef as o,useState as i}from"react";import{Button as n}from"../../../button/button.mjs";import{Text as r}from"../../../text/text.mjs";import{TextVariantType as d}from"@/lib/designSystem/kubit/components/text/variants";import{ButtonSizeType as a,ButtonVariantType as s}from"@/lib/designSystem/kubit/components/variants";import{useActiveBreakpoints as c}from"../../../../lib/hooks/useMediaDevice/useActiveBreakpoints.mjs";import{Popover as p}from"../../popover.mjs";const l=e=>{switch(e){case"center":return;case"top":return"top";case"right":return"right";case"left":return"left";case"bottom":return"bottom";default:return}};const h=h=>{const[g,f]=i(false);const[A,v]=i("center");const[m,E]=i({edgePadding:0,offsetDistance:[0,0]});const x=o(null);const P=()=>{f(false)};const u=e=>{v(e);f(true)};const D=()=>{E(e=>({...e,edgePadding:0===e.edgePadding?24:0}))};const{isMobile:b}=c();const{placement:R,...w}=h;const _=e=>{if(b&&"center"!==e)return{width:"100%"};switch(e){case"center":return{maxWidth:"500px",minWidth:"400px"};case"top":return{maxWidth:"90vw",minWidth:"300px"};case"right":return{maxWidth:"400px",minWidth:"300px"};case"left":return{maxWidth:"350px",minWidth:"250px"};case"bottom":return{maxWidth:"600px",minWidth:"200px"};default:return{}}};const y={bottom:"This popover is anchored to the bottom of the viewport. Perfect for action sheets, mobile menus, and keyboard-avoiding containers. (Width: 200px - 600px)",center:"This popover is centered in the viewport. This is the default positioning behavior and works well for dialogs and modals. (Width: 400px - 500px)",left:"This popover is anchored to the left edge of the viewport. Good for navigation menus or toolbars. (Width: 250px - 350px)",right:"This popover is anchored to the right edge of the viewport. Useful for side panels, contextual menus, or navigation drawers. (Width: 300px - 400px)",top:"This popover is anchored to the top of the viewport. Perfect for top notifications, banners, or alerts that need immediate attention. (Width: 300px - 90vw)"};return t("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[e(r,{variant:d.PARAGRAPH_MEDIUM_EXTENDED,weight:700,children:"Popover Body Positioning"}),e(r,{variant:d.PARAGRAPH_SMALL_EXTENDED,children:"Without a specific anchor element (body by default), the popover can be positioned in different ways relative to the viewport with placement property."}),e(r,{variant:d.PARAGRAPH_SMALL_EXTENDED,children:"Uses an overlay with backdrop (overlay property) that darkens the background, and can be configured with a optional directional arrow with hasArrow property."}),e(r,{variant:d.PARAGRAPH_SMALL_EXTENDED,children:"When using the body as anchor, the popover can be positioned in different ways (placement prop). Select one of the options below to see how each position works."}),t(r,{variant:d.PARAGRAPH_SMALL_EXTENDED,children:[e("strong",{children:"Edge Padding:"})," This demo also showcases the"," ",e("code",{children:"edgePadding"})," option, which maintains distance from viewport edges to prevent the popover from touching the screen boundaries."]}),t(r,{variant:d.PARAGRAPH_SMALL_EXTENDED,children:[e("strong",{children:"Width and Height Control:"})," Each position demonstrates different width constraints. The popover content controls its own dimensions instead of the popover container having fixed constraints. Notice how each position has different sizing to show the flexibility."]}),t(r,{variant:d.PARAGRAPH_SMALL_EXTENDED,children:["For more information, check the"," ",e("a",{href:"?path=/docs/components-resources-Popover--docs",rel:"noopener noreferrer",style:{color:"#0066cc",textDecoration:"underline"},target:"_blank",children:"Documentation section"})," ","in Storybook."]}),t(r,{variant:d.PARAGRAPH_SMALL_EXTENDED,children:[e("strong",{children:"Edge Padding Demo:"})," Use the controls below to see how"," ",e("code",{children:"edgePadding"})," affects popover positioning relative to viewport edges."]}),t("div",{style:{backgroundColor:"#e8f4fd",borderRadius:"8px",display:"flex",flexDirection:"column",gap:"16px",padding:"20px"},children:[e(r,{variant:d.PARAGRAPH_MEDIUM_EXTENDED,children:e("strong",{children:"
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useRef as o,useState as i}from"react";import{Button as n}from"../../../button/button.mjs";import{Text as r}from"../../../text/text.mjs";import{TextVariantType as d}from"@/lib/designSystem/kubit/components/text/variants";import{ButtonSizeType as a,ButtonVariantType as s}from"@/lib/designSystem/kubit/components/variants";import{useActiveBreakpoints as c}from"../../../../lib/hooks/useMediaDevice/useActiveBreakpoints.mjs";import{Popover as p}from"../../popover.mjs";const l=e=>{switch(e){case"center":return;case"top":return"top";case"right":return"right";case"left":return"left";case"bottom":return"bottom";default:return}};const h=h=>{const[g,f]=i(false);const[A,v]=i("center");const[m,E]=i({edgePadding:0,offsetDistance:[0,0]});const x=o(null);const P=()=>{f(false)};const u=e=>{v(e);f(true)};const D=()=>{E(e=>({...e,edgePadding:0===e.edgePadding?24:0}))};const{isMobile:b}=c();const{placement:R,...w}=h;const _=e=>{if(b&&"center"!==e)return{width:"100%"};switch(e){case"center":return{maxWidth:"500px",minWidth:"400px"};case"top":return{maxWidth:"90vw",minWidth:"300px"};case"right":return{maxWidth:"400px",minWidth:"300px"};case"left":return{maxWidth:"350px",minWidth:"250px"};case"bottom":return{maxWidth:"600px",minWidth:"200px"};default:return{}}};const y={bottom:"This popover is anchored to the bottom of the viewport. Perfect for action sheets, mobile menus, and keyboard-avoiding containers. (Width: 200px - 600px)",center:"This popover is centered in the viewport. This is the default positioning behavior and works well for dialogs and modals. (Width: 400px - 500px)",left:"This popover is anchored to the left edge of the viewport. Good for navigation menus or toolbars. (Width: 250px - 350px)",right:"This popover is anchored to the right edge of the viewport. Useful for side panels, contextual menus, or navigation drawers. (Width: 300px - 400px)",top:"This popover is anchored to the top of the viewport. Perfect for top notifications, banners, or alerts that need immediate attention. (Width: 300px - 90vw)"};return t("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[e(r,{variant:d.PARAGRAPH_MEDIUM_EXTENDED,weight:700,children:"Popover Body Positioning"}),e(r,{variant:d.PARAGRAPH_SMALL_EXTENDED,children:"Without a specific anchor element (body by default), the popover can be positioned in different ways relative to the viewport with placement property."}),e(r,{variant:d.PARAGRAPH_SMALL_EXTENDED,children:"Uses an overlay with backdrop (overlay property) that darkens the background, and can be configured with a optional directional arrow with hasArrow property."}),e(r,{variant:d.PARAGRAPH_SMALL_EXTENDED,children:"When using the body as anchor, the popover can be positioned in different ways (placement prop). Select one of the options below to see how each position works."}),t(r,{variant:d.PARAGRAPH_SMALL_EXTENDED,children:[e("strong",{children:"Edge Padding:"})," This demo also showcases the"," ",e("code",{children:"edgePadding"})," option, which maintains distance from viewport edges to prevent the popover from touching the screen boundaries."]}),t(r,{variant:d.PARAGRAPH_SMALL_EXTENDED,children:[e("strong",{children:"Width and Height Control:"})," Each position demonstrates different width constraints. The popover content controls its own dimensions instead of the popover container having fixed constraints. Notice how each position has different sizing to show the flexibility."]}),t(r,{variant:d.PARAGRAPH_SMALL_EXTENDED,children:["For more information, check the"," ",e("a",{href:"?path=/docs/components-resources-Popover--docs",rel:"noopener noreferrer",style:{color:"#0066cc",textDecoration:"underline"},target:"_blank",children:"Documentation section"})," ","in Storybook."]}),t(r,{variant:d.PARAGRAPH_SMALL_EXTENDED,children:[e("strong",{children:"Edge Padding Demo:"})," Use the controls below to see how"," ",e("code",{children:"edgePadding"})," affects popover positioning relative to viewport edges."]}),t("div",{style:{backgroundColor:"#e8f4fd",borderRadius:"8px",display:"flex",flexDirection:"column",gap:"16px",padding:"20px"},children:[e(r,{variant:d.PARAGRAPH_MEDIUM_EXTENDED,children:e("strong",{children:"🔧 Edge Padding Controls"})}),t("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[t("div",{style:{alignItems:"center",display:"flex",gap:"12px"},children:[e(r,{variant:d.PARAGRAPH_SMALL_EXTENDED,children:e("strong",{children:"Edge Padding:"})}),e(n,{size:a.SMALL,variant:m.edgePadding>0?s.PRIMARY:s.SECONDARY,onClick:D,children:m.edgePadding>0?"24px ON":"OFF"})]}),t(r,{variant:d.PARAGRAPH_SMALL_EXTENDED,children:["Current: ",m.edgePadding,"px -"," ",m.edgePadding>0?"✅ Maintains distance from viewport edges":"❌ Can touch viewport edges"]})]})]}),t("div",{style:{backgroundColor:"#fff9e6",border:"1px solid #ffd700",borderRadius:"8px",padding:"12px"},children:[e(r,{variant:d.PARAGRAPH_SMALL_EXTENDED,children:e("strong",{children:"🔍 How edge padding work:"})}),t(r,{variant:d.PARAGRAPH_SMALL_EXTENDED,children:["1. ",e("strong",{children:"Edge Padding:"})," Always works - maintains distance from viewport edges"]})]}),t("div",{style:{backgroundColor:"#f5f5f5",borderRadius:"8px",display:"flex",flexDirection:"column",gap:"8px",justifyContent:"center",padding:"20px"},children:[e("div",{children:t(r,{variant:d.PARAGRAPH_MEDIUM_EXTENDED,children:[e("strong",{children:"Current Position:"})," ",A]})}),e(r,{variant:d.PARAGRAPH_SMALL_EXTENDED,children:"center"===A?"The popover will be centered on the screen.":"top"===A?"The popover will be anchored to the top of the screen.":"right"===A?"The popover will be anchored to the right edge of the screen.":"left"===A?"The popover will be anchored to the left edge of the screen.":"The popover will be anchored to the bottom of the screen."}),e("div",{style:{display:"flex",flexWrap:"wrap",gap:"16px",justifyContent:"center"},children:["center","top","right","left","bottom"].map(t=>e(n,{ref:"center"===t?x:void 0,size:a.LARGE,type:"button",variant:A===t?s.PRIMARY:s.SECONDARY,onClick:()=>u(t),children:"center"===t?"Center (Default)":t.charAt(0).toUpperCase()+t.slice(1)},t))})]}),e(p,{...w,middlewareOptions:m,open:g,placement:l(A),zIndex:800,onClose:P,children:t("div",{style:{backgroundColor:"white",border:"1px solid #e8e8e8",borderRadius:"8px",boxShadow:"0 6px 16px rgba(0, 0, 0, 0.12)",height:b&&"center"!==A?"100vh":"auto",padding:"24px",..._(A)},children:[t(r,{variant:d.HEADING_H3_EXTENDED,children:[A.charAt(0).toUpperCase()+A.slice(1)," Position"]}),e("div",{style:{backgroundColor:"#f9f9f9",border:"1px solid #f0f0f0",borderRadius:"6px",marginBottom:"20px",marginTop:"12px",padding:"12px"},children:e(r,{variant:d.PARAGRAPH_MEDIUM_EXTENDED,children:y[A]})}),t("div",{style:{backgroundColor:"#f0f8ff",border:"1px solid #d0e7ff",borderRadius:"6px",marginBottom:"20px",padding:"12px"},children:[e(r,{variant:d.PARAGRAPH_MEDIUM_EXTENDED,children:e("strong",{children:"🔧 Current Edge Padding Configuration"})}),t("div",{style:{marginTop:"8px"},children:[t(r,{variant:d.PARAGRAPH_SMALL_EXTENDED,children:[e("strong",{children:"Edge Padding:"})," ",m.edgePadding,"px"," ",m.edgePadding>0?"✅ Active":"❌ Disabled"]}),e(r,{variant:d.PARAGRAPH_SMALL_EXTENDED,children:m.edgePadding>0?`• Maintains ${m.edgePadding}px distance from viewport edges`:"• Popover can touch viewport edges"}),t(r,{variant:d.PARAGRAPH_SMALL_EXTENDED,children:[e("strong",{children:"Current Position:"})," ",A]})]})]}),e("div",{style:{display:"flex",justifyContent:"flex-end"},children:e(n,{size:a.LARGE,variant:s.PRIMARY,onClick:P,children:"Close"})})]})})]})};export{h as BodyPositionsDemo};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as e,jsx as o,jsxs as l}from"react/jsx-runtime";import{flip as r,size as t}from"@floating-ui/dom";import{useRef as a,useState as n}from"react";import{Text as i}from"../../../text/text.mjs";import{ENTER as c,ESCAPE as s,SPACE as d}from"../../../../lib/constants/keyboardKeys/keyboardKeys.mjs";import{TextVariantType as p}from"@/lib/designSystem/kubit/components/text/variants";import{isKeyPressed as m}from"../../../../lib/utils/keyboard/keyboard.mjs";import{Popover as h}from"../../popover.mjs";const b=[{color:"#ef4444",label:"Red",value:"red"},{color:"#f97316",label:"Orange",value:"orange"},{color:"#eab308",label:"Yellow",value:"yellow"},{color:"#22c55e",label:"Green",value:"green"},{color:"#06b6d4",label:"Cyan",value:"cyan"},{color:"#3b82f6",label:"Blue",value:"blue"},{color:"#a855f7",label:"Purple",value:"purple"},{color:"#ec4899",label:"Pink",value:"pink"},{color:"#800000",label:"Maroon",value:"maroon"},{color:"#000000",label:"Black",value:"black"},{color:"#ffffff",label:"White",value:"white"}];const u={COLORS:{active:"#adb5bd",border:"#e9ecef",hover:"#f8f9fa",placeholder:"#6c757d",primary:"#f8f9fa",secondary:"#e9ecef",white:"white"},SIZES:{bottomBlock:"300px",contentBlock:"150px",dropdownMaxHeight:"320px",minSelectWidth:"100%"},SPACING:{large:"16px",medium:"12px",small:"8px",xlarge:"20px"}};const f=({children:e,height:l=u.SIZES.contentBlock})=>o("div",{style:{alignItems:"center",backgroundColor:u.COLORS.white,border:`1px solid ${u.COLORS.border}`,borderRadius:u.SPACING.medium,display:"flex",height:l,justifyContent:"center",padding:u.SPACING.medium},children:e});const g=({children:e,title:r})=>l("div",{children:[o(i,{variant:p.PARAGRAPH_MEDIUM_EXTENDED,weight:600,children:r}),o("div",{style:{backgroundColor:u.COLORS.primary,display:"flex",flexDirection:"column",gap:u.SPACING.small,height:"100%",justifyContent:"space-around",margin:`${u.SPACING.medium} 0`,padding:u.SPACING.xlarge},children:e})]});const S=({color:e})=>o("div",{style:{backgroundColor:e,border:"1px solid rgba(0, 0, 0, 0.2)",borderRadius:"50%",flexShrink:0,height:u.SPACING.large,width:u.SPACING.large}});const y=(e,o)=>{const l=l=>{if(m(l.key,c.key,d.key)){l.preventDefault();e()}if(m(l.key,...s.key))o()};const r=(e,o)=>{if(m(e.key,c.key,d.key)){e.preventDefault();o()}};return{handleOptionKeyDown:r,handleSelectKeyDown:l}};const v=c=>{const[s,d]=n(false);const[m,v]=n(null);const x=a(null);const C=()=>d(!s);const A=()=>d(false);const P=e=>{v(e);d(false)};const{handleOptionKeyDown:I,handleSelectKeyDown:k}=y(C,A);const w={alignItems:"center",backgroundColor:s?u.COLORS.secondary:u.COLORS.primary,borderColor:s?u.COLORS.active:u.COLORS.border,borderRadius:u.SPACING.small,borderStyle:"solid",borderWidth:"1px",cursor:"default",display:"flex",gap:u.SPACING.small,minWidth:u.SIZES.minSelectWidth,outline:"none",padding:`${u.SPACING.medium} ${u.SPACING.large}`,position:"relative",transition:"all 0.2s ease",userSelect:"none"};const R={alignItems:"center",borderRadius:"4px",cursor:"pointer",display:"flex",gap:u.SPACING.small,outline:"none",padding:`${u.SPACING.small} ${u.SPACING.medium}`,transition:"background-color 0.15s ease"};const E={fontSize:u.SPACING.medium,marginLeft:"auto",transform:s?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"};return l("div",{style:{display:"flex",flexDirection:"column",gap:u.SPACING.small},children:[l("div",{children:[o(i,{variant:p.PARAGRAPH_MEDIUM_EXTENDED,weight:700,children:"Popover Scroll Behavior Demo"}),o(i,{variant:p.PARAGRAPH_SMALL_EXTENDED,children:"This demo shows how the popover automatically repositions when there's not enough space below the trigger element. Try scrolling the page while the dropdown is open to see the behavior in action."})]}),o(g,{title:"Scroll down to test the behavior",children:o(f,{children:o(i,{variant:p.PARAGRAPH_SMALL_EXTENDED,children:"Content block - This content creates the scrollable area to demonstrate the popover repositioning behavior."})})}),l("div",{style:{alignItems:"center",display:"flex",flexDirection:"column",gap:u.SPACING.small,minHeight:"120px",padding:`${u.SPACING.xlarge} 0`},children:[o(i,{variant:p.PARAGRAPH_MEDIUM_EXTENDED,weight:600,children:"Select a color (the dropdown will reposition on scroll)"}),l("div",{ref:x,"aria-controls":"color-listbox","aria-expanded":s,"aria-haspopup":"listbox","aria-label":"Select a color",role:"combobox",style:w,tabIndex:0,onClick:C,onKeyDown:k,children:[m?l(e,{children:[o(S,{color:m.color}),o("span",{children:m.label})]}):o("span",{style:{color:u.COLORS.placeholder},children:"Select a color..."}),o("span",{style:E,children:"▼"})]}),o(h,{...c,anchorElement:x.current,
|
|
1
|
+
import{Fragment as e,jsx as o,jsxs as l}from"react/jsx-runtime";import{flip as r,size as t}from"@floating-ui/dom";import{useRef as a,useState as n}from"react";import{Text as i}from"../../../text/text.mjs";import{ENTER as c,ESCAPE as s,SPACE as d}from"../../../../lib/constants/keyboardKeys/keyboardKeys.mjs";import{TextVariantType as p}from"@/lib/designSystem/kubit/components/text/variants";import{isKeyPressed as m}from"../../../../lib/utils/keyboard/keyboard.mjs";import{Popover as h}from"../../popover.mjs";const b=[{color:"#ef4444",label:"Red",value:"red"},{color:"#f97316",label:"Orange",value:"orange"},{color:"#eab308",label:"Yellow",value:"yellow"},{color:"#22c55e",label:"Green",value:"green"},{color:"#06b6d4",label:"Cyan",value:"cyan"},{color:"#3b82f6",label:"Blue",value:"blue"},{color:"#a855f7",label:"Purple",value:"purple"},{color:"#ec4899",label:"Pink",value:"pink"},{color:"#800000",label:"Maroon",value:"maroon"},{color:"#000000",label:"Black",value:"black"},{color:"#ffffff",label:"White",value:"white"}];const u={COLORS:{active:"#adb5bd",border:"#e9ecef",hover:"#f8f9fa",placeholder:"#6c757d",primary:"#f8f9fa",secondary:"#e9ecef",white:"white"},SIZES:{bottomBlock:"300px",contentBlock:"150px",dropdownMaxHeight:"320px",minSelectWidth:"100%"},SPACING:{large:"16px",medium:"12px",small:"8px",xlarge:"20px"}};const f=({children:e,height:l=u.SIZES.contentBlock})=>o("div",{style:{alignItems:"center",backgroundColor:u.COLORS.white,border:`1px solid ${u.COLORS.border}`,borderRadius:u.SPACING.medium,display:"flex",height:l,justifyContent:"center",padding:u.SPACING.medium},children:e});const g=({children:e,title:r})=>l("div",{children:[o(i,{variant:p.PARAGRAPH_MEDIUM_EXTENDED,weight:600,children:r}),o("div",{style:{backgroundColor:u.COLORS.primary,display:"flex",flexDirection:"column",gap:u.SPACING.small,height:"100%",justifyContent:"space-around",margin:`${u.SPACING.medium} 0`,padding:u.SPACING.xlarge},children:e})]});const S=({color:e})=>o("div",{style:{backgroundColor:e,border:"1px solid rgba(0, 0, 0, 0.2)",borderRadius:"50%",flexShrink:0,height:u.SPACING.large,width:u.SPACING.large}});const y=(e,o)=>{const l=l=>{if(m(l.key,c.key,d.key)){l.preventDefault();e()}if(m(l.key,...s.key))o()};const r=(e,o)=>{if(m(e.key,c.key,d.key)){e.preventDefault();o()}};return{handleOptionKeyDown:r,handleSelectKeyDown:l}};const v=c=>{const[s,d]=n(false);const[m,v]=n(null);const x=a(null);const C=()=>d(!s);const A=()=>d(false);const P=e=>{v(e);d(false)};const{handleOptionKeyDown:I,handleSelectKeyDown:k}=y(C,A);const w={alignItems:"center",backgroundColor:s?u.COLORS.secondary:u.COLORS.primary,borderColor:s?u.COLORS.active:u.COLORS.border,borderRadius:u.SPACING.small,borderStyle:"solid",borderWidth:"1px",cursor:"default",display:"flex",gap:u.SPACING.small,minWidth:u.SIZES.minSelectWidth,outline:"none",padding:`${u.SPACING.medium} ${u.SPACING.large}`,position:"relative",transition:"all 0.2s ease",userSelect:"none"};const R={alignItems:"center",borderRadius:"4px",cursor:"pointer",display:"flex",gap:u.SPACING.small,outline:"none",padding:`${u.SPACING.small} ${u.SPACING.medium}`,transition:"background-color 0.15s ease"};const E={fontSize:u.SPACING.medium,marginLeft:"auto",transform:s?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"};return l("div",{style:{display:"flex",flexDirection:"column",gap:u.SPACING.small},children:[l("div",{children:[o(i,{variant:p.PARAGRAPH_MEDIUM_EXTENDED,weight:700,children:"Popover Scroll Behavior Demo"}),o(i,{variant:p.PARAGRAPH_SMALL_EXTENDED,children:"This demo shows how the popover automatically repositions when there's not enough space below the trigger element. Try scrolling the page while the dropdown is open to see the behavior in action."})]}),o(g,{title:"Scroll down to test the behavior",children:o(f,{children:o(i,{variant:p.PARAGRAPH_SMALL_EXTENDED,children:"Content block - This content creates the scrollable area to demonstrate the popover repositioning behavior."})})}),l("div",{style:{alignItems:"center",display:"flex",flexDirection:"column",gap:u.SPACING.small,minHeight:"120px",padding:`${u.SPACING.xlarge} 0`},children:[o(i,{variant:p.PARAGRAPH_MEDIUM_EXTENDED,weight:600,children:"Select a color (the dropdown will reposition on scroll)"}),l("div",{ref:x,"aria-controls":"color-listbox","aria-expanded":s,"aria-haspopup":"listbox","aria-label":"Select a color",role:"combobox",style:w,tabIndex:0,onClick:C,onKeyDown:k,children:[m?l(e,{children:[o(S,{color:m.color}),o("span",{children:m.label})]}):o("span",{style:{color:u.COLORS.placeholder},children:"Select a color..."}),o("span",{style:E,children:"▼"})]}),o(h,{...c,disableAnimations:true,anchorElement:x.current,middlewares:[t({apply({elements:e,rects:o}){Object.assign(e.floating.style,{minWidth:`${o.reference.width}px`})}}),r()],open:s,placement:"bottom-start",onClose:A,children:o("div",{"aria-label":"Color options",id:"color-listbox",role:"listbox",style:{backgroundColor:u.COLORS.white,border:`1px solid ${u.COLORS.border}`,borderRadius:u.SPACING.small,boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",maxHeight:u.SIZES.dropdownMaxHeight,overflowY:"auto",padding:"4px"},children:b.map(e=>{const r=m?.value===e.value;return l("div",{"aria-selected":r,className:"dropdown-option",role:"option",style:{...R,backgroundColor:r?u.COLORS.secondary:"transparent"},tabIndex:0,onClick:()=>P(e),onKeyDown:o=>I(o,()=>P(e)),onMouseDown:e=>e.preventDefault(),children:[o(S,{color:e.color}),o("span",{children:e.label}),r&&o("span",{style:{fontSize:"14px",marginLeft:"auto"},children:"✓"})]},e.value)})})})]}),o(g,{title:"More content below",children:o(f,{height:u.SIZES.bottomBlock,children:o(i,{variant:p.PARAGRAPH_SMALL_EXTENDED,children:"Bottom content block - Keep scrolling to see how the popover repositions itself when space becomes limited."})})})]})};export{v as ScrollBehaviorDemo};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[data-kbt-id=popover-arrow]{z-index:-1;position:absolute;transform:rotate(45deg)}[data-kbt-id=popover-arrow][data-kbt-placement^=top]{bottom:calc(-1*var(--arrow-size,8px)/2);left:50%;transform:translate(-50%)rotate(45deg)}[data-kbt-id=popover-arrow][data-kbt-placement^=bottom]{top:calc(-1*var(--arrow-size,8px)/2);left:50%;transform:translate(-50%)rotate(45deg)}[data-kbt-id=popover-arrow][data-kbt-placement^=left]{right:calc(-1*var(--arrow-size,8px)/2);top:50%;transform:translateY(-50%)rotate(45deg)}[data-kbt-id=popover-arrow][data-kbt-placement^=right]{left:calc(-1*var(--arrow-size,8px)/2);top:50%;transform:translateY(-50%)rotate(45deg)}[data-kbt-id=popover-arrow][data-kbt-placement=center]{top:calc(-1*var(--arrow-size,8px)/2);left:50%;transform:translate(-50%)rotate(45deg)}
|
|
1
|
+
[data-kbt-id=popover-arrow]{z-index:-1;position:absolute;transform:rotate(45deg)}[data-kbt-id=popover-arrow][data-kbt-placement^=top]{bottom:calc(-1 * var(--arrow-size,8px) / 2);left:50%;transform:translate(-50%)rotate(45deg)}[data-kbt-id=popover-arrow][data-kbt-placement^=bottom]{top:calc(-1 * var(--arrow-size,8px) / 2);left:50%;transform:translate(-50%)rotate(45deg)}[data-kbt-id=popover-arrow][data-kbt-placement^=left]{right:calc(-1 * var(--arrow-size,8px) / 2);top:50%;transform:translateY(-50%)rotate(45deg)}[data-kbt-id=popover-arrow][data-kbt-placement^=right]{left:calc(-1 * var(--arrow-size,8px) / 2);top:50%;transform:translateY(-50%)rotate(45deg)}[data-kbt-id=popover-arrow][data-kbt-placement=center]{top:calc(-1 * var(--arrow-size,8px) / 2);left:50%;transform:translate(-50%)rotate(45deg)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{ANIMATION_CONFIG_TYPES,ANIMATION_TYPES,PopoverAnimationTimingFunction as PopoverAnimationTimingFunctions}from"./animation.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{Portal}from"./portal.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{ProgressBar}from"./progressBar.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{RadioButton}from"./radioButton.mjs";export{RadioButtonStandAlone}from"./radioButtonStandAlone.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{SelectControlled}from"./selectControlled.mjs";export{Select}from"./selectUncontrolled.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{forwardRef as o,useId as s,useMemo as n}from"react";import{Text as i}from"../text/text.mjs";import{ElementOrIcon as r}from"../../lib/components/elementOrIcon/elementOrIcon.mjs";import{pickCustomAttributes as l}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.mjs";import{processIconProp as a,processTextProp as c}from"../../lib/utils/process/processCommonProp.mjs";import{CustomComponent as m}from"../../lib/components/customComponent/customComponent.mjs";import{ListOptions as p}from"../listOptions/listOptions.mjs";import{keyDownMove as d,keyUpMove as u}from"../listOptions/utils/listOptions.utils.mjs";import{Popover as f}from"../popover/popover.mjs";const b=o(({buttonOrLinkRef:o,component:b,cssClasses:v,icon:C,label:h,listOptions:x,listOptionsRef:k,onBlur:y,onButtonClick:g,onButtonKeyDown:j,onClosePopover:M,onFocus:O,onKeyDown:D,onOptionClick:F,open:A,optionSelected:N,popover:w,url:E,urlTarget:I,...K},S)=>{const $=s();const T=`select-${$.replace(/:/g,"")}`;const V=A?`${T}-list`:void 0;const z=K["data-testid"]||"select";const B=l(K);const L=t=>(e,o)=>{if(o?.shiftKey){const t=Math.max(e,0)-1;if(t>=0)o?.preventDefault();return Math.max(t,0)}const s=Math.max(e,0)+1;if(s<=t.length-1)o?.preventDefault();return Math.min(s,t.length-1)};const P=n(()=>({currentFocusSelected:-1,keyDownMove:d(x.options),keyLeftMove:0,keyRightMove:0,keyTabMove:L(x.options),keyUpMove:u,size:x.options.length}),[x.options]);return e("div",{ref:S,className:v?.select,"data-testid":z,role:"combobox",onBlur:y,onFocus:O,onKeyDown:D,...B,"aria-controls":"select-list","aria-expanded":A,tabIndex:0,children:[e(m,{ref:o,"aria-controls":V,"aria-expanded":A,"aria-haspopup":"listbox",className:v?.buttonorlinkcontainer,component:b,target:E?I:void 0,type:E?void 0:"button",url:E,onClick:g,onKeyDown:j,children:[t(i,{additionalClasses:{text:A?v?.labelopened:v?.labelclosed},component:"span",...c(h)}),t(r,{className:A?v?.iconopened:v?.iconclosed,rotate:A?"180deg":"0deg",transitionDuration:"0.2s",...a(C)})]}),!!w&&t(f,{anchorElement:o?.current,component:"div",
|
|
1
|
+
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{forwardRef as o,useId as s,useMemo as n}from"react";import{Text as i}from"../text/text.mjs";import{ElementOrIcon as r}from"../../lib/components/elementOrIcon/elementOrIcon.mjs";import{pickCustomAttributes as l}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.mjs";import{processIconProp as a,processTextProp as c}from"../../lib/utils/process/processCommonProp.mjs";import{CustomComponent as m}from"../../lib/components/customComponent/customComponent.mjs";import{ListOptions as p}from"../listOptions/listOptions.mjs";import{keyDownMove as d,keyUpMove as u}from"../listOptions/utils/listOptions.utils.mjs";import{Popover as f}from"../popover/popover.mjs";const b=o(({buttonOrLinkRef:o,component:b,cssClasses:v,icon:C,label:h,listOptions:x,listOptionsRef:k,onBlur:y,onButtonClick:g,onButtonKeyDown:j,onClosePopover:M,onFocus:O,onKeyDown:D,onOptionClick:F,open:A,optionSelected:N,popover:w,url:E,urlTarget:I,...K},S)=>{const $=s();const T=`select-${$.replace(/:/g,"")}`;const V=A?`${T}-list`:void 0;const z=K["data-testid"]||"select";const B=l(K);const L=t=>(e,o)=>{if(o?.shiftKey){const t=Math.max(e,0)-1;if(t>=0)o?.preventDefault();return Math.max(t,0)}const s=Math.max(e,0)+1;if(s<=t.length-1)o?.preventDefault();return Math.min(s,t.length-1)};const P=n(()=>({currentFocusSelected:-1,keyDownMove:d(x.options),keyLeftMove:0,keyRightMove:0,keyTabMove:L(x.options),keyUpMove:u,size:x.options.length}),[x.options]);return e("div",{ref:S,className:v?.select,"data-testid":z,role:"combobox",onBlur:y,onFocus:O,onKeyDown:D,...B,"aria-controls":"select-list","aria-expanded":A,tabIndex:0,children:[e(m,{ref:o,"aria-controls":V,"aria-expanded":A,"aria-haspopup":"listbox",className:v?.buttonorlinkcontainer,component:b,target:E?I:void 0,type:E?void 0:"button",url:E,onClick:g,onKeyDown:j,children:[t(i,{additionalClasses:{text:A?v?.labelopened:v?.labelclosed},component:"span",...c(h)}),t(r,{className:A?v?.iconopened:v?.iconclosed,rotate:A?"180deg":"0deg",transitionDuration:"0.2s",...a(C)})]}),!!w&&t(f,{disableAutoFocusFirstDescendant:true,disableAutoFocusFirstDescendantAfterClose:true,disableTrapFocus:true,anchorElement:o?.current,component:"div",disableClickOverlayClose:false,disableEscapeClose:false,id:V,open:A,placement:"bottom",preventCloseOnClickElements:[o?.current],strategy:"absolute",...w,onClose:()=>{M();w?.onClose?.()},children:t("div",{className:v?.listoptionscontainer,"data-testid":`${z}-list`,children:!!x.variant&&!!x.optionVariant&&t(p,{ref:k,roveFocus:"selection"===x.type?P:void 0,selectedValue:N,...x,onOptionClick:t=>{F(t);M()}})})})]})});export{b as SelectStandAlone};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{STATES as t}from"../../../../lib/types/states/states.mjs";function e({hover:
|
|
1
|
+
import{STATES as t}from"../../../../lib/types/states/states.mjs";function e({hover:s}){return s?t.HOVER:t.DEFAULT}export{e as getState};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{SelectorBoxFile}from"./selectorBoxFile.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{Skeleton}from"./skeleton.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{useEffect as r,useId as e,useRef as n,useState as c}from"react";import{pickCustomAttributes as s}from"../../../lib/utils/pickCustomAttributes/pickCustomAttributes.mjs";const i=({cssClasses:i,customAttributes:o,scaleOffsets:l,showScale:a})=>{const u=e();const m=`tickmarks-${u.replace(/:/g,"")}`;const[p,f]=c("0px");const d=n(null);r(()=>{if(d.current)f(`${d.current.offsetWidth}px`)},[
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{useEffect as r,useId as e,useRef as n,useState as c}from"react";import{pickCustomAttributes as s}from"../../../lib/utils/pickCustomAttributes/pickCustomAttributes.mjs";const i=({cssClasses:i,customAttributes:o,scaleOffsets:l,showScale:a})=>{const u=e();const m=`tickmarks-${u.replace(/:/g,"")}`;const[p,f]=c("0px");const d=n(null);r(()=>{if(d.current)f(`${d.current.offsetWidth}px`)},[]);if(!a)return null;if(!a)return null;return t("div",{className:i?.scalecontainer,id:m,...s(o),children:l.map((r,e)=>{const n={left:`calc(${r}% - ${p} / 2)`};return t("span",{className:i?.scaleoption,style:n},`${m}-${e.toString()}`)})})};export{i as SliderScaleStandAlone};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{Slider}from"./slider.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as t,jsx as e,jsxs as s}from"react/jsx-runtime";import{forwardRef as a,useId as r}from"react";import{classNames as i}from"../../lib/utils/classNames/classNames.mjs";import{pickCustomAttributes as l}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.mjs";import{processTextProp as o}from"../../lib/utils/process/processCommonProp.mjs";import{Text as c}from"../text/text.mjs";import{SliderButtonStandAlone as d}from"./components/sliderButtonStandAlone.mjs";import{SliderHelperTextStandAlone as n}from"./components/sliderHelperTextStandAlone.mjs";import{SliderScaleStandAlone as m}from"./components/sliderScaleStandAlone.mjs";import{SliderThumbStandAlone as u}from"./components/sliderThumbStandAlone.mjs";import{buildAriaDescribedBy as h}from"./utils/accessibility.utils.mjs";import{getState as p}from"./utils/state.utils.mjs";import{isActive as b}from"./utils/ui.utils.mjs";const v=a(({activePointer:a,ariaLabel:v,ariaLabelBy:f,containerRef:$,cssClasses:x,decrementButton:T,disabled:k,hover:y,incrementButton:g,label:A,leftHelperText:j,max:N,min:C,offset:S,offsetLeft:w,offsetRight:I,onChange:L,onKeyPress:B,onMouseDown:M,onTouchStart:D,pressed:H,range:O,rightAriaLabel:K,rightAriaLabelBy:F,rightHelperText:P,rightThumbIcon:R,rightTooltip:q,scaleOffsets:z,setHover:E,showScale:G,step:J,thumbIcon:Q,tooltip:U,value:V,...W},X)=>{const Y=r();const Z=`slider-${Y.replace(/:/g,"")}`;const _=p({disabled:k,hover:y,pressed:H});const tt={"data-state":_};const te=W["data-testid"]??"slider";const ts=l(tt);const ta=o(A).children&&!O?`${Z}Label`:void 0;const tr=`${Z}LeftHelperText`;const ti=`${Z}RightHelperText`;const tl=f??ta;return s("div",{ref:X,className:x?.slider,"data-disabled":k,"data-hover":y,"data-pressed":H,...ts,children:[e("div",{className:x?.labelcontainer,...ts,children:e(c,{additionalClasses:{text:x?.label},component:"label",customAttributes:tt,id:ta,...o(A)})}),e(m,{cssClasses:x,customAttributes:tt,scaleOffsets:z,showScale:G}),s("div",{className:x?.buttonstrackscontainer,children:[e(d,{...T,cssClasses:x,customAttributes:tt}),e("div",{className:x?.tracksthumbscontainer,children:s("div",{ref:$,className:x?.tracksthumbsinnercontainer,"data-testid":`${te}-container`,role:"button",tabIndex:0,onMouseDown:M,onTouchMove:L,onTouchStart:D,children:[O&&s(t,{children:[e("div",{className:i({[`${x?.activetrack}`]:false,[`${x?.inactivetrack}`]:true}),...ts,"data-disabled":k,"data-hover":y,"data-pressed":H,"data-testid":`${te}-inactive-left-track`,style:{left:0,width:`${w}%`}}),e("div",{className:i({[`${x?.activetrack}`]:true,[`${x?.inactivetrack}`]:false}),"data-disabled":k,"data-hover":y,"data-pressed":H,"data-testid":`${te}-active-track`,style:{left:`${w}%`,right:`${I}%`},...ts}),e("div",{className:i({[`${x?.activetrack}`]:false,[`${x?.inactivetrack}`]:true}),"data-disabled":k,"data-hover":y,"data-pressed":H,"data-testid":`${te}-inactive-right-track`,style:{right:0,width:`${I}%`},...ts}),e(u,{ariaDescribedBy:h([{helperText:j,helperTextId:tr},{helperText:P,helperTextId:ti}]),ariaLabel:v,ariaLabelBy:tl,cssClasses:x,customAttributes:tt,"data-testid":`${te}-left-thumb`,disabled:k,hover:b(y,a.current,"left"),icon:Q,max:V[1]-J,min:C,pressed:b(H,a.current,"left"),state:_,style:{left:`${w}%`},tooltip:U,value:V[0],onFocus:()=>a.current="left",onKeyDown:B,onMouseOut:()=>E(false),onMouseOver:()=>{E(true);a.current="left"},onTouchStart:()=>{a.current="left"}}),e(u,{ariaDescribedBy:h([{helperText:j,helperTextId:tr},{helperText:P,helperTextId:ti}]),ariaLabel:K,ariaLabelBy:F,cssClasses:x,customAttributes:tt,"data-testid":`${te}-right-thumb`,disabled:k,hover:b(y,a.current,"right"),icon:R,max:N,min:V[0]+J,pressed:b(H,a.current,"right"),
|
|
1
|
+
import{Fragment as t,jsx as e,jsxs as s}from"react/jsx-runtime";import{forwardRef as a,useId as r}from"react";import{classNames as i}from"../../lib/utils/classNames/classNames.mjs";import{pickCustomAttributes as l}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.mjs";import{processTextProp as o}from"../../lib/utils/process/processCommonProp.mjs";import{Text as c}from"../text/text.mjs";import{SliderButtonStandAlone as d}from"./components/sliderButtonStandAlone.mjs";import{SliderHelperTextStandAlone as n}from"./components/sliderHelperTextStandAlone.mjs";import{SliderScaleStandAlone as m}from"./components/sliderScaleStandAlone.mjs";import{SliderThumbStandAlone as u}from"./components/sliderThumbStandAlone.mjs";import{buildAriaDescribedBy as h}from"./utils/accessibility.utils.mjs";import{getState as p}from"./utils/state.utils.mjs";import{isActive as b}from"./utils/ui.utils.mjs";const v=a(({activePointer:a,ariaLabel:v,ariaLabelBy:f,containerRef:$,cssClasses:x,decrementButton:T,disabled:k,hover:y,incrementButton:g,label:A,leftHelperText:j,max:N,min:C,offset:S,offsetLeft:w,offsetRight:I,onChange:L,onKeyPress:B,onMouseDown:M,onTouchStart:D,pressed:H,range:O,rightAriaLabel:K,rightAriaLabelBy:F,rightHelperText:P,rightThumbIcon:R,rightTooltip:q,scaleOffsets:z,setHover:E,showScale:G,step:J,thumbIcon:Q,tooltip:U,value:V,...W},X)=>{const Y=r();const Z=`slider-${Y.replace(/:/g,"")}`;const _=p({disabled:k,hover:y,pressed:H});const tt={"data-state":_};const te=W["data-testid"]??"slider";const ts=l(tt);const ta=o(A).children&&!O?`${Z}Label`:void 0;const tr=`${Z}LeftHelperText`;const ti=`${Z}RightHelperText`;const tl=f??ta;return s("div",{ref:X,className:x?.slider,"data-disabled":k,"data-hover":y,"data-pressed":H,...ts,children:[e("div",{className:x?.labelcontainer,...ts,children:e(c,{additionalClasses:{text:x?.label},component:"label",customAttributes:tt,id:ta,...o(A)})}),e(m,{cssClasses:x,customAttributes:tt,scaleOffsets:z,showScale:G}),s("div",{className:x?.buttonstrackscontainer,children:[e(d,{...T,cssClasses:x,customAttributes:tt}),e("div",{className:x?.tracksthumbscontainer,children:s("div",{ref:$,className:x?.tracksthumbsinnercontainer,"data-testid":`${te}-container`,role:"button",tabIndex:0,onMouseDown:M,onTouchMove:L,onTouchStart:D,children:[O&&s(t,{children:[e("div",{className:i({[`${x?.activetrack}`]:false,[`${x?.inactivetrack}`]:true}),...ts,"data-disabled":k,"data-hover":y,"data-pressed":H,"data-testid":`${te}-inactive-left-track`,style:{left:0,width:`${w}%`}}),e("div",{className:i({[`${x?.activetrack}`]:true,[`${x?.inactivetrack}`]:false}),"data-disabled":k,"data-hover":y,"data-pressed":H,"data-testid":`${te}-active-track`,style:{left:`${w}%`,right:`${I}%`},...ts}),e("div",{className:i({[`${x?.activetrack}`]:false,[`${x?.inactivetrack}`]:true}),"data-disabled":k,"data-hover":y,"data-pressed":H,"data-testid":`${te}-inactive-right-track`,style:{right:0,width:`${I}%`},...ts}),e(u,{ariaDescribedBy:h([{helperText:j,helperTextId:tr},{helperText:P,helperTextId:ti}]),ariaLabel:v,ariaLabelBy:tl,cssClasses:x,customAttributes:tt,"data-testid":`${te}-left-thumb`,disabled:k,hover:b(y,a.current,"left"),icon:Q,max:V[1]-J,min:C,pressed:b(H,a.current,"left"),state:_,style:{left:`${w}%`},tooltip:U,value:V[0],onFocus:()=>a.current="left",onKeyDown:B,onMouseOut:()=>E(false),onMouseOver:()=>{E(true);a.current="left"},onTouchStart:()=>{a.current="left"}}),e(u,{rightThumb:true,ariaDescribedBy:h([{helperText:j,helperTextId:tr},{helperText:P,helperTextId:ti}]),ariaLabel:K,ariaLabelBy:F,cssClasses:x,customAttributes:tt,"data-testid":`${te}-right-thumb`,disabled:k,hover:b(y,a.current,"right"),icon:R,max:N,min:V[0]+J,pressed:b(H,a.current,"right"),state:_,style:{right:`${I}%`},tooltip:q,value:V[1],onFocus:()=>a.current="right",onKeyDown:B,onMouseOut:()=>E(false),onMouseOver:()=>{E(true);a.current="right"},onTouchStart:()=>{a.current="right"}})]}),!O&&s(t,{children:[e("div",{className:i({[`${x?.activetrack}`]:true,[`${x?.inactivetrack}`]:false}),"data-disabled":k,"data-hover":y,"data-pressed":H,"data-testid":`${te}-active-track`,style:{width:`${S}%`},...ts}),e("div",{className:i({[`${x?.activetrack}`]:false,[`${x?.inactivetrack}`]:true}),"data-disabled":k,"data-hover":y,"data-pressed":H,"data-testid":`${te}-inactive-track`,style:{right:0,width:`calc(${100-S}%)`},...ts}),e(u,{ariaDescribedBy:h([{helperText:j,helperTextId:tr},{helperText:P,helperTextId:ti}]),ariaLabel:v,ariaLabelBy:tl,cssClasses:x,customAttributes:tt,"data-testid":`${te}-thumb`,disabled:k,hover:y,icon:Q,max:N,min:C,pressed:H,state:_,style:{left:`${S}%`},tooltip:U,value:V,onKeyDown:B,onMouseOut:()=>E(false),onMouseOver:()=>E(true)})]})]})}),e(d,{...g,cssClasses:x,customAttributes:tt})]}),e(n,{cssClasses:x,customAttributes:tt,leftHelperText:j,leftHelperTextId:tr,rightHelperText:P,rightHelperTextId:ti})]})});export{v as SliderStandAlone};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{useSnackbarAutoClose}from"./useSnackbarAutoClose.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{StepperNumberSteps,ariaSteps}from"./ariaLabels.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export*from"./types/orientation.mjs";export{StepperNumber}from"./stepperNumber.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as t,jsx as e,jsxs as s}from"react/jsx-runtime";import{forwardRef as n}from"react";import{Text as a}from"../text/text.mjs";import{ElementOrIcon as r}from"../../lib/components/elementOrIcon/elementOrIcon.mjs";import{ScreenReaderOnly as o}from"../../lib/components/screen-reader-only/screenReaderOnly.mjs";import{STATES as i}from"../../lib/types/states/states.mjs";import{classNames as c}from"../../lib/utils/classNames/classNames.mjs";import{pickCustomAttributes as m}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.mjs";import{CustomComponent as l}from"../../lib/components/customComponent/customComponent.mjs";import{buildAriaCurrent as p}from"./helpers/aria.mjs";import{buildScreenReaderText as d}from"./helpers/screnReader.mjs";import{mapToStepState as u}from"./helpers/stepState.mjs";const h=0;const b=n(({completedStepIcon:n,cssOrientationClasses:b,cssVariantClasses:f,currentStep:N=h,horizontalOrientationWidth:j,orientation:x,screenReaderCompletedStep:C,screenReaderTextBuilder:y,screenReaderTitle:$,stepMaxTruncatedLines:A,steps:k,...v},O)=>{const E=u(k,N);const S="vertical"===x;const g=Boolean($);const D=v["data-testid"]||"stepper-number";return s("div",{ref:O,"aria-hidden":!S,"data-testid":D,children:[$?.content&&e(l,{className:"kbt-sr-only",component:$.component,children:$?.content}),e("ol",{className:c(b?.stepper_number,f?.stepper_number),"data-testid":`${D}-steps-container`,children:E.map((u,h)=>{const $=h===E.length-1;const k={"data-state":u.state};const v=m(k);return s("li",{"aria-current":p(N,h,x),"data-testid":`${D}-li-${h}`,style:{display:S?"flex":"block",width:!S&&$?"auto":j},children:[g&&e(o,{children:d(h,N,E.length,y,u.name,S)}),s("span",{"aria-hidden":!S||g?true:void 0,className:c(b?.stepcontainer,f?.stepcontainer),...v,children:[s("span",{className:f?.stepcirclecontainer,"data-testid":`${D}-step-${h}`,style:{flexDirection:"vertical"===x?"column":"row"},children:[e("span",{className:c(b?.stepcircle,f?.stepcircle),...v,children:u.state===i.COMPLETED?s(t,{children:[e(r,{className:c(b?.iconselected,f?.iconselected),customAttributes:k,...n}),e(o,{children:h+1})]}):e(a,{additionalClasses:{text:c(b?.stepindex,f?.stepindex)},component:"span",customAttributes:k,children:h+1})}),!$&&e("span",{className:c(b?.stepbar,f?.stepbar),...m({"data-state":E[h+1].state})})]}),S&&s("span",{"aria-hidden":g?true:void 0,className:c(b?.stepnamecontainer,f?.stepnamecontainer),"data-islast":$,"data-testid":`${D}-step-description-${h}`,...v,children:[e(a,{additionalClasses:{text:c(b?.stepname,f?.stepname)},component:"span",customAttributes:k,maxTruncatedLines:A,children:u.name}),!g&&u.state===i.COMPLETED&&C?.content&&s(l,{className:"kbt-sr-only",component:C.component,"data-testid":C["data-testid"],children:["
|
|
1
|
+
import{Fragment as t,jsx as e,jsxs as s}from"react/jsx-runtime";import{forwardRef as n}from"react";import{Text as a}from"../text/text.mjs";import{ElementOrIcon as r}from"../../lib/components/elementOrIcon/elementOrIcon.mjs";import{ScreenReaderOnly as o}from"../../lib/components/screen-reader-only/screenReaderOnly.mjs";import{STATES as i}from"../../lib/types/states/states.mjs";import{classNames as c}from"../../lib/utils/classNames/classNames.mjs";import{pickCustomAttributes as m}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.mjs";import{CustomComponent as l}from"../../lib/components/customComponent/customComponent.mjs";import{buildAriaCurrent as p}from"./helpers/aria.mjs";import{buildScreenReaderText as d}from"./helpers/screnReader.mjs";import{mapToStepState as u}from"./helpers/stepState.mjs";const h=0;const b=n(({completedStepIcon:n,cssOrientationClasses:b,cssVariantClasses:f,currentStep:N=h,horizontalOrientationWidth:j,orientation:x,screenReaderCompletedStep:C,screenReaderTextBuilder:y,screenReaderTitle:$,stepMaxTruncatedLines:A,steps:k,...v},O)=>{const E=u(k,N);const S="vertical"===x;const g=Boolean($);const D=v["data-testid"]||"stepper-number";return s("div",{ref:O,"aria-hidden":!S,"data-testid":D,children:[$?.content&&e(l,{className:"kbt-sr-only",component:$.component,children:$?.content}),e("ol",{className:c(b?.stepper_number,f?.stepper_number),"data-testid":`${D}-steps-container`,children:E.map((u,h)=>{const $=h===E.length-1;const k={"data-state":u.state};const v=m(k);return s("li",{"aria-current":p(N,h,x),"data-testid":`${D}-li-${h}`,style:{display:S?"flex":"block",width:!S&&$?"auto":j},children:[g&&e(o,{children:d(h,N,E.length,y,u.name,S)}),s("span",{"aria-hidden":!S||g?true:void 0,className:c(b?.stepcontainer,f?.stepcontainer),...v,children:[s("span",{className:f?.stepcirclecontainer,"data-testid":`${D}-step-${h}`,style:{flexDirection:"vertical"===x?"column":"row"},children:[e("span",{className:c(b?.stepcircle,f?.stepcircle),...v,children:u.state===i.COMPLETED?s(t,{children:[e(r,{className:c(b?.iconselected,f?.iconselected),customAttributes:k,...n}),e(o,{children:h+1})]}):e(a,{additionalClasses:{text:c(b?.stepindex,f?.stepindex)},component:"span",customAttributes:k,children:h+1})}),!$&&e("span",{className:c(b?.stepbar,f?.stepbar),...m({"data-state":E[h+1].state})})]}),S&&s("span",{"aria-hidden":g?true:void 0,className:c(b?.stepnamecontainer,f?.stepnamecontainer),"data-islast":$,"data-testid":`${D}-step-description-${h}`,...v,children:[e(a,{additionalClasses:{text:c(b?.stepname,f?.stepname)},component:"span",customAttributes:k,maxTruncatedLines:A,children:u.name}),!g&&u.state===i.COMPLETED&&C?.content&&s(l,{className:"kbt-sr-only",component:C.component,"data-testid":C["data-testid"],children:[" ",C.content]})]})]})]},`stepContainer-${h.toString()}`)})})]})});export{b as StepperNumberStandAlone};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{Table}from"./table.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as a,jsxs as t}from"react/jsx-runtime";import{forwardRef as e}from"react";import{pickCustomAttributes as o}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.mjs";import{CustomComponent as i}from"../../lib/components/customComponent/customComponent.mjs";const l=e(({children:e,component:l="table",cssClasses:r,hasScroll:s,hasScrollDisabled:n,sticky:d,...c},b)=>{const m=o(c);const p=c["data-testid"]||"table-standalone";return t("div",{ref:b,className:r?.table,"data-sticky":d,"data-testid":`${p}-wrapper`,children:[a("div",{"aria-hidden":c["aria-hidden"],"aria-label":s?c["aria-label"]:void 0,"aria-labelledby":s?c["aria-labelledby"]:void 0,className:r?.scrollablecontainer,"data-
|
|
1
|
+
import{jsx as a,jsxs as t}from"react/jsx-runtime";import{forwardRef as e}from"react";import{pickCustomAttributes as o}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.mjs";import{CustomComponent as i}from"../../lib/components/customComponent/customComponent.mjs";const l=e(({children:e,component:l="table",cssClasses:r,hasScroll:s,hasScrollDisabled:n,sticky:d,...c},b)=>{const m=o(c);const p=c["data-testid"]||"table-standalone";return t("div",{ref:b,className:r?.table,"data-sticky":d,"data-testid":`${p}-wrapper`,children:[a("div",{"data-table-scrollable-container":true,"aria-hidden":c["aria-hidden"],"aria-label":s?c["aria-label"]:void 0,"aria-labelledby":s?c["aria-labelledby"]:void 0,className:r?.scrollablecontainer,"data-testid":`${p}-scrollable-container`,role:s?"region":void 0,style:{overflow:n?"visible":"auto"},...s?{tabIndex:0}:{},children:a(i,{className:r?.container,component:l,"data-testid":p,...m,children:e})}),a("div",{"data-table-left-shadow":true,className:r?.leftboxshadowcontainer}),a("div",{"data-table-right-shadow":true,className:r?.rightboxshadowcontainer})]})});export{l as TableStandAlone};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{TableBody}from"./tableBody.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{TableCaption}from"./tableCaption.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{TableCell}from"./tableCell.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{TableDivider}from"./tableDivider.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{forwardRef as e}from"react";import{pickCustomAttributes as i}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.mjs";import{CustomComponent as o}from"../../lib/components/customComponent/customComponent.mjs";const r=e(({children:e,component:r="div",cssClasses:m,id:s,...n},d)=>{const a=i(n);return t(o,{ref:d,className:m?.table_divider,component:r,"data-
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{forwardRef as e}from"react";import{pickCustomAttributes as i}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.mjs";import{CustomComponent as o}from"../../lib/components/customComponent/customComponent.mjs";const r=e(({children:e,component:r="div",cssClasses:m,id:s,...n},d)=>{const a=i(n);return t(o,{ref:d,"data-table-divider":true,className:m?.table_divider,component:r,"data-testid":"table-divider",id:s,...a,children:e})});export{r as TableDividerStandAlone};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{TableFoot}from"./tableFoot.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{TableHead}from"./tableHead.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{forwardRef as e}from"react";import{pickCustomAttributes as o}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.mjs";import{CustomComponent as a}from"../../lib/components/customComponent/customComponent.mjs";const m=e(({children:e,component:m="thead",cssClasses:r,hidden:i,id:s,sticky:n,...d},c)=>{const p=o(d);return t(a,{ref:c,className:r?.table_head,component:m,"data-hidden":i,"data-sticky":n,"data-
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{forwardRef as e}from"react";import{pickCustomAttributes as o}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.mjs";import{CustomComponent as a}from"../../lib/components/customComponent/customComponent.mjs";const m=e(({children:e,component:m="thead",cssClasses:r,hidden:i,id:s,sticky:n,...d},c)=>{const p=o(d);return t(a,{ref:c,"data-table-head":true,className:r?.table_head,component:m,"data-hidden":i,"data-sticky":n,"data-testid":"table-head",id:s,...p,children:e})});export{m as TableHeadStandAlone};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{TableRow}from"./tableRow.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{forwardRef as o}from"react";import{pickCustomAttributes as e}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.mjs";import{CustomComponent as r}from"../../lib/components/customComponent/customComponent.mjs";const n=o(({active:o,children:n,component:a="tr",cssClasses:m,hoverable:s=true,id:i,onClick:c,onKeyDown:u,onMouseEnter:l,onMouseLeave:p,...b},d)=>{const f=e(b);return t(r,{ref:d,className:m?.table_row,component:a,"data-active":o,"data-hoverable":s,"data-
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{forwardRef as o}from"react";import{pickCustomAttributes as e}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.mjs";import{CustomComponent as r}from"../../lib/components/customComponent/customComponent.mjs";const n=o(({active:o,children:n,component:a="tr",cssClasses:m,hoverable:s=true,id:i,onClick:c,onKeyDown:u,onMouseEnter:l,onMouseLeave:p,...b},d)=>{const f=e(b);return t(r,{ref:d,"data-table-row":true,className:m?.table_row,component:a,"data-active":o,"data-hoverable":s,"data-testid":"table-row",id:i,onClick:c,onKeyDown:u,onMouseEnter:l,onMouseLeave:p,...f,children:n})});export{n as TableRowStandAlone};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{TabsControlled}from"./tabsControlled.mjs";export{Tabs}from"./tabsUnControlled.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{forwardRef as s,useId as a}from"react";import{Text as o}from"../text/text.mjs";import{ElementOrIcon as n}from"../../lib/components/elementOrIcon/elementOrIcon.mjs";import{ItemRove as i}from"../../lib/components/itemRove/itemRove.mjs";import{useActiveBreakpoints as r}from"../../lib/hooks/useMediaDevice/useActiveBreakpoints.mjs";import{STATES as l}from"../../lib/types/states/states.mjs";import{classNames as c}from"../../lib/utils/classNames/classNames.mjs";import{pickCustomAttributes as d}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.mjs";import{processTextProp as m}from"../../lib/utils/process/processCommonProp.mjs";import{useTabs as b}from"./hooks/useTabs/useTabs.mjs";const u=3;const p=s(({allowFocusTabPanel:s=true,autoWidth:p=false,content:$,cssClasses:h,device:f,hideLabelForSingleTab:N,leftControlAriaLabel:v,leftIcon:j,maxTabsInView:x=u,onSelectTab:k,rightControlAriaLabel:y,rightIcon:C,selectedTab:S,tabs:g,unMountContent:A=true,...E},I)=>{const{isMobile:T}=r();const D=a();const O=`tabs-${D.replace(/:/g,"")}`;const w=`${O}-tab-list`;const F=`${O}-tab-panel`;const L=g?.length??0;const M=Math.min(L,x);const{focus:R,handleClickIcon:B,handleClickTab:P,listEl:U,position:W}=b({numTabsInView:M,selectedTab:S,tabsLength:L});const q=0===W;const z=W>=L-M;const G=E["data-testid"]||"tabs";const H=d(E);const J=e=>{const s="left"===e;const a=s?q:z;const o=()=>{if(!a)B(!s)};return L>M?t("button",{"aria-label":s?v:y,className:h?.arrowiconcontainer,"data-position":s?"left":"right","data-testid":`${G}-icon-${e}`,disabled:a,tabIndex:0,type:"button",onClick:o,children:t(n,{className:h?.icon,customAttributes:{"data-disabled":a},"data-position":s?"left":"right",...s?j:C})}):null};const K=()=>{const e={role:"tabpanel",tabIndex:s?0:-1};if(A)return null!=S&&t("div",{"aria-labelledby":`${O}-tab-${S}`,className:h?.contentcontainer,...e,children:$?.[S]});return $?.map((s,a)=>t("div",{"aria-labelledby":`${O}-tab-${a}`,className:h?.contentcontainer,id:`${F}-${a}`,style:{display:S===a?"block":"none"},...e,children:s},`${O}-${a.toString()}-tab`))};return e("div",{ref:I,className:h?.tabs,"data-testid":G,...H,children:[e("div",{className:h?.container,children:[J("left"),t("div",{ref:U,className:h?.tabbuttonscontainer,id:w,role:"tablist",children:g?.map((e,s)=>{const a=S===s;const n=a?l.SELECTED:l.UNSELECTED;const r=s>=W&&s<W+M;const b={"data-state":n};return t("div",{className:h?.tabcontainer,"data-testid":`${G}-tab-${s}`,...d(b),style:{minWidth:T?`calc(100% / ${M})`:"auto",width:p?"auto":`calc(100% / ${L})`},children:L>1?t(i,{ariaDisabled:T&&!r||e.disabled,ariaSelected:a,asElement:"button",
|
|
1
|
+
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{forwardRef as s,useId as a}from"react";import{Text as o}from"../text/text.mjs";import{ElementOrIcon as n}from"../../lib/components/elementOrIcon/elementOrIcon.mjs";import{ItemRove as i}from"../../lib/components/itemRove/itemRove.mjs";import{useActiveBreakpoints as r}from"../../lib/hooks/useMediaDevice/useActiveBreakpoints.mjs";import{STATES as l}from"../../lib/types/states/states.mjs";import{classNames as c}from"../../lib/utils/classNames/classNames.mjs";import{pickCustomAttributes as d}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.mjs";import{processTextProp as m}from"../../lib/utils/process/processCommonProp.mjs";import{useTabs as b}from"./hooks/useTabs/useTabs.mjs";const u=3;const p=s(({allowFocusTabPanel:s=true,autoWidth:p=false,content:$,cssClasses:h,device:f,hideLabelForSingleTab:N,leftControlAriaLabel:v,leftIcon:j,maxTabsInView:x=u,onSelectTab:k,rightControlAriaLabel:y,rightIcon:C,selectedTab:S,tabs:g,unMountContent:A=true,...E},I)=>{const{isMobile:T}=r();const D=a();const O=`tabs-${D.replace(/:/g,"")}`;const w=`${O}-tab-list`;const F=`${O}-tab-panel`;const L=g?.length??0;const M=Math.min(L,x);const{focus:R,handleClickIcon:B,handleClickTab:P,listEl:U,position:W}=b({numTabsInView:M,selectedTab:S,tabsLength:L});const q=0===W;const z=W>=L-M;const G=E["data-testid"]||"tabs";const H=d(E);const J=e=>{const s="left"===e;const a=s?q:z;const o=()=>{if(!a)B(!s)};return L>M?t("button",{"aria-label":s?v:y,className:h?.arrowiconcontainer,"data-position":s?"left":"right","data-testid":`${G}-icon-${e}`,disabled:a,tabIndex:0,type:"button",onClick:o,children:t(n,{className:h?.icon,customAttributes:{"data-disabled":a},"data-position":s?"left":"right",...s?j:C})}):null};const K=()=>{const e={role:"tabpanel",tabIndex:s?0:-1};if(A)return null!=S&&t("div",{"aria-labelledby":`${O}-tab-${S}`,className:h?.contentcontainer,...e,children:$?.[S]});return $?.map((s,a)=>t("div",{"aria-labelledby":`${O}-tab-${a}`,className:h?.contentcontainer,id:`${F}-${a}`,style:{display:S===a?"block":"none"},...e,children:s},`${O}-${a.toString()}-tab`))};return e("div",{ref:I,className:h?.tabs,"data-testid":G,...H,children:[e("div",{className:h?.container,children:[J("left"),t("div",{ref:U,className:h?.tabbuttonscontainer,id:w,role:"tablist",children:g?.map((e,s)=>{const a=S===s;const n=a?l.SELECTED:l.UNSELECTED;const r=s>=W&&s<W+M;const b={"data-state":n};return t("div",{className:h?.tabcontainer,"data-testid":`${G}-tab-${s}`,...d(b),style:{minWidth:T?`calc(100% / ${M})`:"auto",width:p?"auto":`calc(100% / ${L})`},children:L>1?t(i,{checkIsFirstTime:true,preventScrollOnFocus:true,ariaDisabled:T&&!r||e.disabled,ariaSelected:a,asElement:"button",classNames:c(h?.tabbutton,{[`${h?.firsttabbutton}`]:0===s,[`${h?.lasttabbutton}`]:s===L-1}),customAttributes:b,disabled:T&&!r||e.disabled,focus:R===s,id:`${O}-tab-${s}`,index:s,role:"tab",type:"button",onSelectItem:()=>{k?.(s);P(s)},children:t(o,{additionalClasses:{text:h?.label},component:"span",customAttributes:b,"data-hidden":!!N,...m(e)})}):t("div",{className:c(h?.onetabcontainer,{[`${h?.tabbutton}`]:!!N}),id:`${O}-tab-${s}`,role:"tab",children:t(o,{additionalClasses:{text:h?.label},"data-hidden":!!N,...m(e),children:m(e).children})})},`${G}-tab-${s.toString()}`)})}),J("right")]}),K()]})});export{p as TabsStandAlone};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{Tag}from"./tag.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{Text}from"./text.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.kbt-text{text-size-adjust:100%}.kbt-text--disabled{pointer-events:none}.kbt-text--truncate{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
|
|
1
|
+
.kbt-text{-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}.kbt-text--disabled{pointer-events:none}.kbt-text--truncate{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{forwardRef as r}from"react";import{Text as i}from"../../../text/text.mjs";import{ScreenReaderOnly as o}from"../../../../lib/components/screen-reader-only/screenReaderOnly.mjs";import{pickCustomAttributes as n}from"../../../../lib/utils/pickCustomAttributes/pickCustomAttributes.mjs";const s=({cssClasses:r,currentCharacters:s,id:a,leftColor:c,leftWeight:l,marginTop:m,maxLength:d,rightColor:p,rightWeight:u,screenReaderText:x,textVariant:h,...f},C)=>{const b=()=>{if(0===s||s>=d)return"polite"};const j=n(f);return e("div",{ref:C,"aria-live":b(),className:r?.text_count,"data-testid":"text-count",style:{marginTop:m},...j,children:[t(o,{children:x},s),t(i,{additionalClasses:{text:r?.letftext},
|
|
1
|
+
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{forwardRef as r}from"react";import{Text as i}from"../../../text/text.mjs";import{ScreenReaderOnly as o}from"../../../../lib/components/screen-reader-only/screenReaderOnly.mjs";import{pickCustomAttributes as n}from"../../../../lib/utils/pickCustomAttributes/pickCustomAttributes.mjs";const s=({cssClasses:r,currentCharacters:s,id:a,leftColor:c,leftWeight:l,marginTop:m,maxLength:d,rightColor:p,rightWeight:u,screenReaderText:x,textVariant:h,...f},C)=>{const b=()=>{if(0===s||s>=d)return"polite"};const j=n(f);return e("div",{ref:C,"aria-live":b(),className:r?.text_count,"data-testid":"text-count",style:{marginTop:m},...j,children:[t(o,{children:x},s),t(i,{"aria-hidden":true,additionalClasses:{text:r?.letftext},color:c,component:"span",variant:h,weight:l,children:s}),t(i,{"aria-hidden":true,additionalClasses:{text:r?.righttext},color:p,component:"span",variant:h,weight:u,children:` / ${d}`})]})};const a=r(s);export{a as TextCountStandAlone};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{TextArea}from"./textArea.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export*from"./types/index.mjs";export{ToggleControlled}from"./toggleControlled.mjs";export{ToggleStandalone}from"./toggleStandAlone.mjs";export{ToggleUncontrolled}from"./toggleUnControlled.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{TooltipControlled}from"./tooltipControlled.mjs";export{Tooltip}from"./tooltipUnControlled.mjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*!
|
|
1
|
+
/*! LICENSE: computePosition.mjs.LICENSE.txt */
|
|
2
2
|
import{computePosition as t}from"@floating-ui/dom";const o=async(o,e,a)=>{const{middleware:n=[],placement:i="top",strategy:c="fixed"}=a;const s=i||"top";const m=await t(o,e,{middleware:n,placement:s,strategy:c});const p=m.placement||"top";return{middlewareData:m.middlewareData,placement:p,strategy:m.strategy,x:m.x,y:m.y}};export{o as computePosition};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o,jsxs as t}from"react/jsx-runtime";import"./tooltip.css";import{useId as e}from"react";import{Text as i}from"../text/text.mjs";import{useActiveBreakpoints as r}from"../../lib/hooks/useMediaDevice/useActiveBreakpoints.mjs";import{POSITIONS as a}from"../../lib/types/positions/positions.mjs";import{classNames as s}from"../../lib/utils/classNames/classNames.mjs";import{pickCustomAttributes as l}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.mjs";import{processTextProp as n}from"../../lib/utils/process/processCommonProp.mjs";import{Popover as d}from"../popover/popover.mjs";import{TooltipTrigger as c}from"./components/tooltipTrigger.mjs";import{getAriaDescriptorsBy as p}from"./utils/tooltip.utils.mjs";const m=({align:m,children:b,childrenAsButton:u=true,content:v,contentHasScroll:h,contentRef:f,contentScrollArias:g,cssClasses:k,disabled:y,labelRef:C,mediaDevice:j,onPopoverCloseInternally:N,onTooltipFocus:A,onTooltipKeyDown:w,onTriggerClick:x,onTriggerKeyDown:_,onTriggerMouseDown:D,onTriggerMouseUp:B,onWrapperMouseEnter:M,onWrapperMouseLeave:T,popover:F,popoverOpen:$,tooltipAriaLabel:E,tooltipAsModal:I,tooltipRef:K,triggerAsButton:O,...P})=>{const z=P["data-testid"]||"tooltip";const L=l(P);const S=e();const U=`tooltip-${S.replace(/:/g,"")}`;const q=`${U}-content`;const G=n(v);const H="string"==typeof G.children;const{isDesktop:J,isTablet:Q}=r();const R=J||Q;if(y)return o("div",{className:"kbt-tooltip","data-testid":z,children:o(c,{childrenAsButton:u,
|
|
1
|
+
import{jsx as o,jsxs as t}from"react/jsx-runtime";import"./tooltip.css";import{useId as e}from"react";import{Text as i}from"../text/text.mjs";import{useActiveBreakpoints as r}from"../../lib/hooks/useMediaDevice/useActiveBreakpoints.mjs";import{POSITIONS as a}from"../../lib/types/positions/positions.mjs";import{classNames as s}from"../../lib/utils/classNames/classNames.mjs";import{pickCustomAttributes as l}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.mjs";import{processTextProp as n}from"../../lib/utils/process/processCommonProp.mjs";import{Popover as d}from"../popover/popover.mjs";import{TooltipTrigger as c}from"./components/tooltipTrigger.mjs";import{getAriaDescriptorsBy as p}from"./utils/tooltip.utils.mjs";const m=({align:m,children:b,childrenAsButton:u=true,content:v,contentHasScroll:h,contentRef:f,contentScrollArias:g,cssClasses:k,disabled:y,labelRef:C,mediaDevice:j,onPopoverCloseInternally:N,onTooltipFocus:A,onTooltipKeyDown:w,onTriggerClick:x,onTriggerKeyDown:_,onTriggerMouseDown:D,onTriggerMouseUp:B,onWrapperMouseEnter:M,onWrapperMouseLeave:T,popover:F,popoverOpen:$,tooltipAriaLabel:E,tooltipAsModal:I,tooltipRef:K,triggerAsButton:O,...P})=>{const z=P["data-testid"]||"tooltip";const L=l(P);const S=e();const U=`tooltip-${S.replace(/:/g,"")}`;const q=`${U}-content`;const G=n(v);const H="string"==typeof G.children;const{isDesktop:J,isTablet:Q}=r();const R=J||Q;if(y)return o("div",{className:"kbt-tooltip","data-testid":z,children:o(c,{disabled:true,childrenAsButton:u,children:b})});const V=p({contentId:q,hasContent:!!v,hasTitle:false,titleId:""});const W={"data-align":m||a.TOP};const X=l(W);const Y=t("div",{ref:K,"aria-label":R?E:void 0,"aria-labelledby":R?void 0:void 0,"aria-modal":R&&I?true:void 0,className:s("kbt-tooltip__external-container",k?.tooltipexternalcontainer),"data-testid":`${z}-content`,id:U,role:R?I?"dialog":"tooltip":void 0,...R&&{onFocus:A,onKeyDown:w},...L,children:[o("div",{className:k?.tooltipinternalcontainer,children:o("div",{ref:f,"aria-label":h?g?.["aria-label"]:void 0,"aria-labelledby":h?g?.["aria-labelledby"]:void 0,className:"kbt-tooltip__inner-content",role:h?"region":void 0,...h&&{tabIndex:0},children:!!v&&o("div",{className:s("kbt-tooltip__paragraph",k?.paragraphcontainer),id:q,children:H?o(i,{additionalClasses:{text:k?.paragraph},...G}):G.children})})}),o("div",{...X,className:s("kbt-tooltip__arrow",k?.arrowsize,k?.tooltipalignstyles,k?.arrowcontainer),children:o("div",{className:k?.arrow})})]});return t("div",{ref:C,className:"kbt-tooltip","data-testid":z,children:[o(c,{ariaDescribedBy:!I&&(R||$)?V:void 0,childrenAsButton:u,triggerAsButton:O,onClick:x,onKeyDown:_,onMouseDown:D,onMouseEnter:M,onMouseLeave:T,onMouseUp:B,children:b}),R?Y:o(d,{disableAutoFocusFirstDescendantAfterClose:true,additionalClasses:k?.popover?{arrow:"",popover:k.popover.popover||""}:void 0,"aria-label":F?.["aria-label"]||E,"aria-labelledby":void 0,"aria-modal":I||void 0,component:"div",disableTrapFocus:false,open:$,preventCloseOnClickElements:[C?.current],role:I?"dialog":"tooltip",strategy:"absolute",onClose:N,...F,children:Y})]})};export{m as TooltipStandAlone};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{VirtualKeyboard}from"./virtualKeyboard.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{ElementOrIcon}from"./elementOrIcon.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export*from"./types/index.mjs";export{ErrorMessage}from"./errorMessage.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{ItemRove}from"./itemRove.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{forwardRef as r}from"react";import{pickCustomAttributes as e}from"../../utils/pickCustomAttributes/pickCustomAttributes.mjs";const o=r(({cssClasses:r,...o},s)=>{const i=e(o);return t("div",{ref:s,className:r?.overlay,"data-testid":"overlay",...o,...i
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{forwardRef as r}from"react";import{pickCustomAttributes as e}from"../../utils/pickCustomAttributes/pickCustomAttributes.mjs";const o=r(({cssClasses:r,...o},s)=>{const i=e(o);return t("div",{ref:s,className:r?.overlay,"data-testid":"overlay",...o,...i})});export{o as OverlayStandAlone};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{ScreenReaderOnly}from"./screenReaderOnly.mjs";export{ScreenReaderOnlyStandAlone}from"./screenReaderOnlyStandAlone.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e({element:
|
|
1
|
+
function e({element:t,onClickOutside:n,preventOnClickElements:o=[]}){if("u"<typeof window||!t)return{destroy:()=>{}};function r(e){if(t&&!t.contains(e.target)&&!o.some(t=>t?.contains(e.target)))n(e)}document.addEventListener("mouseup",r);return{destroy(){document.removeEventListener("mouseup",r)}}}export{e as createClickOutsideHandler};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { PopoverAnimationTimingFunction
|
|
1
|
+
export type { PopoverAnimationTimingFunction, AnimationConfigType as PopoverAnimationConfigTypes, AnimationType as PopoverAnimationTypes, } from './animation';
|
|
2
2
|
export { PopoverAnimationTimingFunction as PopoverAnimationTimingFunctions, ANIMATION_CONFIG_TYPES, ANIMATION_TYPES, } from './animation';
|
|
3
|
-
export type { IPopover
|
|
3
|
+
export type { IPopover, ArrowStyles, MiddlewareOptions, PopoverComponent, } from './popover';
|
|
4
4
|
export type { PopoverStyleProps } from './popoverTheme';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubit-ui-web/react-components",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.73",
|
|
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",
|
|
@@ -146,33 +146,31 @@
|
|
|
146
146
|
"@floating-ui/dom": "^1.7.6"
|
|
147
147
|
},
|
|
148
148
|
"devDependencies": {
|
|
149
|
-
"@rsbuild/plugin-react": "^1.4.
|
|
150
|
-
"@rslib/core": "^0.
|
|
149
|
+
"@rsbuild/plugin-react": "^1.4.6",
|
|
150
|
+
"@rslib/core": "^0.20.0",
|
|
151
151
|
"@testing-library/dom": "^10.4.1",
|
|
152
152
|
"@testing-library/jest-dom": "^6.9.1",
|
|
153
153
|
"@testing-library/react": "^16.3.2",
|
|
154
154
|
"@testing-library/user-event": "^14.6.1",
|
|
155
|
-
"@
|
|
156
|
-
"@types/node": "^25.
|
|
155
|
+
"@kubit-ui-web/eslint-plugin-kubit": "^0.0.5",
|
|
156
|
+
"@types/node": "^25.5.0",
|
|
157
157
|
"@types/react": "^19.2.14",
|
|
158
158
|
"@types/react-dom": "^19.2.3",
|
|
159
159
|
"@types/testing-library__jest-dom": "^6.0.0",
|
|
160
|
-
"@vitest/coverage-v8": "^4.0
|
|
161
|
-
"@vitest/ui": "^4.0
|
|
160
|
+
"@vitest/coverage-v8": "^4.1.0",
|
|
161
|
+
"@vitest/ui": "^4.1.0",
|
|
162
162
|
"bernova": "1.6.0",
|
|
163
|
-
"
|
|
164
|
-
"
|
|
163
|
+
"oxlint": "^1.54.0",
|
|
164
|
+
"oxfmt": "^0.39.0",
|
|
165
165
|
"glob": "^13.0.6",
|
|
166
|
-
"html-validate": "^10.11.
|
|
166
|
+
"html-validate": "^10.11.1",
|
|
167
167
|
"jsdom": "^28.1.0",
|
|
168
|
-
"prettier": "^3.8.1",
|
|
169
168
|
"react": "^19.2.4",
|
|
170
169
|
"react-dom": "^19.2.4",
|
|
171
170
|
"typescript": "^5.9.3",
|
|
172
|
-
"
|
|
173
|
-
"vitest": "^4.0.18",
|
|
171
|
+
"vitest": "^4.1.0",
|
|
174
172
|
"vitest-axe": "^0.1.0",
|
|
175
|
-
"@kubit-ui-web/design-system": "2.0.0-beta.
|
|
173
|
+
"@kubit-ui-web/design-system": "2.0.0-beta.33"
|
|
176
174
|
},
|
|
177
175
|
"publishConfig": {
|
|
178
176
|
"access": "public",
|
|
@@ -187,10 +185,10 @@
|
|
|
187
185
|
"scripts": {
|
|
188
186
|
"dev": "rslib build --watch",
|
|
189
187
|
"build": "rslib build",
|
|
190
|
-
"lint": "
|
|
191
|
-
"lint:fix": "
|
|
192
|
-
"format": "
|
|
193
|
-
"format:check": "
|
|
188
|
+
"lint": "oxlint src",
|
|
189
|
+
"lint:fix": "oxlint src --fix",
|
|
190
|
+
"format": "oxfmt src",
|
|
191
|
+
"format:check": "oxfmt --check src",
|
|
194
192
|
"test": "vitest --coverage.enabled=true --silent --run",
|
|
195
193
|
"test:watch": "vitest --watch",
|
|
196
194
|
"test:coverage": "vitest --coverage.enabled=true --run",
|