@kubit-ui-web/react-components 2.0.0-beta.1 → 2.0.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +320 -46
- package/dist/cjs/components/accordion/accordionStandAlone.js +1 -1
- package/dist/cjs/components/avatar/fragments/drawContent.js +1 -1
- package/dist/cjs/components/badge/badgeStandAlone.js +1 -1
- package/dist/cjs/components/breadcrumbs/components/crumbStandAlone/crumbStandAlone.js +1 -1
- package/dist/cjs/components/button/buttonStandAlone.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/carousel/hooks/useCarousel.js +1 -1
- package/dist/cjs/components/carousel/hooks/useCarouselKeyNavigation.js +1 -1
- package/dist/cjs/components/carousel/hooks/useCarouselSwipe.js +1 -1
- package/dist/cjs/components/carousel/hooks/utils/calc.utils.js +1 -1
- package/dist/cjs/components/carousel/hooks/utils/dom.utils.js +1 -1
- package/dist/cjs/components/checkbox/checkboxStandAlone.js +1 -1
- package/dist/cjs/components/checkboxBase/checkboxBaseStandAlone.js +1 -1
- package/dist/cjs/components/chip/chipStandAlone.js +1 -1
- package/dist/cjs/components/dataTable/dataTableStandAlone.js +1 -1
- package/dist/cjs/components/dropdownSelected/dropdownSelectedStandAlone.js +1 -1
- package/dist/cjs/components/image/image.css +1 -38
- package/dist/cjs/components/input/input.js +1 -1
- package/dist/cjs/components/input/inputStandAlone.js +1 -1
- package/dist/cjs/components/inputBase/inputBase.js +1 -1
- package/dist/cjs/components/inputDecoration/inputDecorationStandAlone.js +1 -1
- package/dist/cjs/components/inputSignature/inputSignatureStandAlone.js +1 -1
- package/dist/cjs/components/label/labelStandAlone.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/message/messageStandAlone.js +1 -1
- package/dist/cjs/components/modal/fragments/modalHeader.js +1 -1
- package/dist/cjs/components/modal/modalControlled.js +1 -1
- package/dist/cjs/components/modal/modalStandAlone.js +1 -1
- package/dist/cjs/components/option/optionStandAlone.js +1 -1
- package/dist/cjs/components/pageControl/components/arrowControlStandAlone.js +1 -1
- package/dist/cjs/components/pageControl/components/controls.js +1 -1
- package/dist/cjs/components/pageControl/pageControlStandAlone.js +1 -1
- package/dist/cjs/components/pagination/fragments/paginationButtonControl.js +1 -1
- package/dist/cjs/components/popover/hooks/positioning/middlewareUtils.js +1 -1
- package/dist/cjs/components/popover/hooks/usePopoverLifecycle.js +1 -1
- package/dist/cjs/components/popover/hooks/usePopoverPositioning.js +1 -1
- package/dist/cjs/components/popover/popover.js +1 -1
- package/dist/cjs/components/popover/styles/index.css +1 -10
- package/dist/cjs/components/popover/styles/keyframes.css +1 -421
- package/dist/cjs/components/popover/styles/popover-arrow.css +1 -42
- package/dist/cjs/components/popover/styles/popover.css +1 -189
- package/dist/cjs/components/radioButton/radioButtonStandAlone.js +1 -1
- package/dist/cjs/components/selectorBoxFile/components/selectorBoxFileAnimation.js +1 -1
- package/dist/cjs/components/selectorBoxFile/components/selectorBoxFileContainerBox.js +1 -1
- package/dist/cjs/components/selectorBoxFile/components/selectorBoxFileErrorMessage.js +1 -1
- package/dist/cjs/components/selectorBoxFile/components/selectorBoxFileHeader.js +1 -1
- package/dist/cjs/components/selectorBoxFile/components/selectorBoxFileTooltip.js +1 -1
- package/dist/cjs/components/selectorBoxFile/selectorBoxFileStandAlone.js +1 -1
- package/dist/cjs/components/skeleton/skeleton.css +1 -20
- package/dist/cjs/components/slider/components/sliderHelperTextStandAlone.js +1 -1
- package/dist/cjs/components/slider/components/sliderScaleStandAlone.js +1 -1
- package/dist/cjs/components/slider/components/sliderThumbStandAlone.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/__stories__/css/table.css +1 -7
- package/dist/cjs/components/tabs/tabsStandAlone.js +1 -1
- package/dist/cjs/components/tag/tagStandAlone.js +1 -1
- package/dist/cjs/components/text/text.css +1 -14
- package/dist/cjs/components/text/textStandAlone.js +1 -1
- package/dist/cjs/components/textArea/components/errorStandAlone.js +1 -1
- package/dist/cjs/components/textArea/textAreaStandAlone.js +1 -1
- package/dist/cjs/components/toggle/toggleStandAlone.js +1 -1
- package/dist/cjs/components/tooltip/hooks/useTooltip.js +1 -1
- package/dist/cjs/components/tooltip/tooltip.css +1 -69
- package/dist/cjs/components/tooltip/tooltipControlled.js +1 -1
- package/dist/cjs/components/tooltip/tooltipStandAlone.js +1 -1
- package/dist/cjs/components/tooltip/tooltipUnControlled.js +1 -1
- package/dist/cjs/components/virtualKeyboard/virtualKeyboardStandAlone.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/lib/components/customComponent/customComponent.js +1 -1
- package/dist/cjs/lib/components/elementOrIcon/elementOrIcon.js +1 -0
- package/dist/cjs/lib/components/errorMessage/errorMessageStandAlone.js +1 -1
- package/dist/cjs/lib/components/itemRove/itemRove.js +1 -0
- package/dist/cjs/lib/components/overlay/overlay.js +1 -0
- package/dist/cjs/lib/components/overlay/overlayStandAlone.js +1 -0
- package/dist/cjs/lib/hooks/useClickOutside/useClickOutside.js +1 -1
- package/dist/cjs/lib/hooks/useContentVisibility/useContentVisibility.js +1 -1
- package/dist/cjs/lib/hooks/useManageState/useManageState.js +1 -1
- package/dist/cjs/lib/hooks/useScrollDetection/useScrollDetection.js +1 -0
- package/dist/cjs/lib/hooks/useScrollEffect/useScrollEffect.js +1 -1
- package/dist/cjs/lib/hooks/useSwipeDown/useSwipeDown.js +1 -1
- package/dist/cjs/lib/provider/cssProvider/provider.js +1 -1
- package/dist/cjs/lib/provider/cssProvider/stats/stats.js +1 -1641
- package/dist/cjs/lib/provider/stylesProvider/stylesProvider.js +1 -1
- package/dist/cjs/lib/utils/process/processIcon/processIcon.js +1 -1
- package/dist/cjs/lib/utils/process/processText/processText.js +1 -1
- package/dist/esm/components/accordion/accordionStandAlone.js +4 -4
- package/dist/esm/components/avatar/fragments/drawContent.js +1 -4
- package/dist/esm/components/badge/badgeStandAlone.js +7 -9
- package/dist/esm/components/breadcrumbs/components/crumbStandAlone/crumbStandAlone.js +3 -6
- package/dist/esm/components/button/buttonStandAlone.js +3 -5
- package/dist/esm/components/calendar/list/list.js +1 -1
- package/dist/esm/components/calendar/selector/monthSelector/monthSelector.js +1 -1
- package/dist/esm/components/calendar/selector/selector.js +7 -9
- package/dist/esm/components/carousel/hooks/useCarousel.js +1 -1
- package/dist/esm/components/carousel/hooks/useCarouselKeyNavigation.js +1 -1
- package/dist/esm/components/carousel/hooks/useCarouselSwipe.js +1 -1
- package/dist/esm/components/carousel/hooks/utils/calc.utils.js +1 -1
- package/dist/esm/components/carousel/hooks/utils/dom.utils.js +1 -1
- package/dist/esm/components/checkbox/checkboxStandAlone.js +5 -7
- package/dist/esm/components/checkboxBase/checkboxBaseStandAlone.js +4 -4
- package/dist/esm/components/chip/chipStandAlone.js +8 -9
- package/dist/esm/components/dataTable/dataTableStandAlone.js +10 -14
- package/dist/esm/components/dropdownSelected/dropdownSelectedStandAlone.js +5 -6
- package/dist/esm/components/image/image.css +1 -38
- package/dist/esm/components/input/input.js +2 -2
- package/dist/esm/components/input/inputStandAlone.js +3 -5
- package/dist/esm/components/inputBase/inputBase.js +2 -2
- package/dist/esm/components/inputDecoration/inputDecorationStandAlone.js +2 -2
- package/dist/esm/components/inputSignature/inputSignatureStandAlone.js +3 -4
- package/dist/esm/components/label/labelStandAlone.js +2 -3
- package/dist/esm/components/link/linkStandAlone.js +3 -3
- package/dist/esm/components/listOptions/listOptionsStandAlone.js +2 -4
- package/dist/esm/components/message/messageStandAlone.js +5 -10
- package/dist/esm/components/modal/fragments/modalHeader.js +3 -9
- package/dist/esm/components/modal/modalControlled.js +1 -1
- package/dist/esm/components/modal/modalStandAlone.js +4 -5
- package/dist/esm/components/option/optionStandAlone.js +9 -12
- package/dist/esm/components/pageControl/components/arrowControlStandAlone.js +2 -2
- package/dist/esm/components/pageControl/components/controls.js +2 -4
- package/dist/esm/components/pageControl/pageControlStandAlone.js +6 -8
- package/dist/esm/components/pagination/fragments/paginationButtonControl.js +2 -2
- package/dist/esm/components/popover/hooks/positioning/middlewareUtils.js +1 -1
- package/dist/esm/components/popover/hooks/usePopoverLifecycle.js +1 -1
- package/dist/esm/components/popover/hooks/usePopoverPositioning.js +1 -1
- package/dist/esm/components/popover/popover.js +1 -1
- package/dist/esm/components/popover/styles/index.css +1 -10
- package/dist/esm/components/popover/styles/keyframes.css +1 -421
- package/dist/esm/components/popover/styles/popover-arrow.css +1 -42
- package/dist/esm/components/popover/styles/popover.css +1 -189
- package/dist/esm/components/radioButton/radioButtonStandAlone.js +4 -8
- package/dist/esm/components/selectorBoxFile/components/selectorBoxFileAnimation.js +3 -7
- package/dist/esm/components/selectorBoxFile/components/selectorBoxFileContainerBox.js +9 -13
- package/dist/esm/components/selectorBoxFile/components/selectorBoxFileErrorMessage.js +3 -3
- package/dist/esm/components/selectorBoxFile/components/selectorBoxFileHeader.js +5 -9
- package/dist/esm/components/selectorBoxFile/components/selectorBoxFileTooltip.js +1 -1
- package/dist/esm/components/selectorBoxFile/selectorBoxFileStandAlone.js +7 -8
- package/dist/esm/components/skeleton/skeleton.css +1 -20
- package/dist/esm/components/slider/components/sliderHelperTextStandAlone.js +1 -3
- package/dist/esm/components/slider/components/sliderScaleStandAlone.js +2 -2
- package/dist/esm/components/slider/components/sliderThumbStandAlone.js +1 -1
- package/dist/esm/components/slider/sliderStandAlone.js +17 -19
- package/dist/esm/components/stepperNumber/stepperNumberStandAlone.js +8 -8
- package/dist/esm/components/table/__stories__/css/table.css +1 -7
- package/dist/esm/components/tabs/tabsStandAlone.js +5 -6
- package/dist/esm/components/tag/tagStandAlone.js +4 -4
- package/dist/esm/components/text/text.css +1 -14
- package/dist/esm/components/text/textStandAlone.js +1 -1
- package/dist/esm/components/textArea/components/errorStandAlone.js +3 -3
- package/dist/esm/components/textArea/textAreaStandAlone.js +11 -12
- package/dist/esm/components/toggle/toggleStandAlone.js +4 -4
- package/dist/esm/components/tooltip/hooks/useTooltip.js +1 -1
- package/dist/esm/components/tooltip/tooltip.css +1 -69
- package/dist/esm/components/tooltip/tooltipControlled.js +1 -1
- package/dist/esm/components/tooltip/tooltipStandAlone.js +8 -10
- package/dist/esm/components/tooltip/tooltipUnControlled.js +1 -1
- package/dist/esm/components/virtualKeyboard/virtualKeyboardStandAlone.js +4 -4
- package/dist/esm/index.js +1 -1
- package/dist/esm/lib/components/customComponent/customComponent.js +2 -2
- package/dist/esm/lib/components/elementOrIcon/elementOrIcon.js +1 -0
- package/dist/esm/lib/components/errorMessage/errorMessageStandAlone.js +3 -3
- package/dist/esm/lib/components/itemRove/itemRove.js +2 -0
- package/dist/esm/lib/components/overlay/overlay.js +2 -0
- package/dist/esm/lib/components/overlay/overlayStandAlone.js +2 -0
- package/dist/esm/lib/hooks/useClickOutside/useClickOutside.js +1 -1
- package/dist/esm/lib/hooks/useContentVisibility/useContentVisibility.js +1 -1
- package/dist/esm/lib/hooks/useManageState/useManageState.js +1 -1
- package/dist/esm/lib/hooks/useScrollDetection/useScrollDetection.js +1 -0
- package/dist/esm/lib/hooks/useScrollEffect/useScrollEffect.js +1 -1
- package/dist/esm/lib/hooks/useSwipeDown/useSwipeDown.js +1 -1
- package/dist/esm/lib/provider/cssProvider/provider.js +1 -1
- package/dist/esm/lib/provider/cssProvider/stats/stats.js +1 -1641
- package/dist/esm/lib/provider/stylesProvider/stylesProvider.js +2 -2
- package/dist/esm/lib/utils/process/processIcon/processIcon.js +1 -1
- package/dist/esm/lib/utils/process/processText/processText.js +1 -1
- package/dist/styles/kubit/css/kubit.css +1 -1
- package/dist/types/index.d.ts +310 -31
- package/package.json +48 -23
- package/dist/cjs/components/elementOrIcon/elementOrIcon.js +0 -1
- package/dist/cjs/components/elementOrIcon/index.js +0 -2
- package/dist/cjs/components/itemRove/index.js +0 -2
- package/dist/cjs/components/itemRove/itemRove.js +0 -1
- package/dist/cjs/components/overlay/index.js +0 -1
- package/dist/cjs/components/overlay/overlay.js +0 -1
- package/dist/cjs/components/overlay/overlayStandAlone.js +0 -1
- package/dist/cjs/components/renderIf/renderIf.js +0 -1
- package/dist/cjs/lib/designSystem/kubit/css/kubit.css +0 -1683
- package/dist/cjs/lib/designSystem/kubit/css/kubit.min.css +0 -1
- package/dist/cjs/lib/hooks/useContentVisibilityDetection/useContentVisibilityDetection.js +0 -1
- package/dist/cjs/lib/hooks/useId/useId.js +0 -1
- package/dist/cjs/lib/hooks/useScrollDetectionWithAutoFocus/useScrollDetectionWithAutoFocus.js +0 -1
- package/dist/cjs/lib/utils/changeCssProperty/changeCssProperty.js +0 -1
- package/dist/cjs/lib/utils/is/isReactNode.js +0 -1
- package/dist/cjs/lib/utils/is/isString.js +0 -1
- package/dist/cjs/node_modules/react/cjs/react-jsx-runtime.production.min.js +0 -1
- package/dist/cjs/node_modules/react/jsx-runtime.js +0 -1
- package/dist/esm/components/elementOrIcon/elementOrIcon.js +0 -1
- package/dist/esm/components/elementOrIcon/index.js +0 -1
- package/dist/esm/components/itemRove/index.js +0 -1
- package/dist/esm/components/itemRove/itemRove.js +0 -2
- package/dist/esm/components/overlay/index.js +0 -1
- package/dist/esm/components/overlay/overlay.js +0 -2
- package/dist/esm/components/overlay/overlayStandAlone.js +0 -2
- package/dist/esm/components/renderIf/renderIf.js +0 -1
- package/dist/esm/lib/designSystem/kubit/css/kubit.css +0 -1683
- package/dist/esm/lib/designSystem/kubit/css/kubit.min.css +0 -1
- package/dist/esm/lib/hooks/useContentVisibilityDetection/useContentVisibilityDetection.js +0 -1
- package/dist/esm/lib/hooks/useId/useId.js +0 -1
- package/dist/esm/lib/hooks/useScrollDetectionWithAutoFocus/useScrollDetectionWithAutoFocus.js +0 -1
- package/dist/esm/lib/utils/changeCssProperty/changeCssProperty.js +0 -1
- package/dist/esm/lib/utils/is/isReactNode.js +0 -1
- package/dist/esm/lib/utils/is/isString.js +0 -1
- package/dist/esm/node_modules/react/cjs/react-jsx-runtime.production.min.js +0 -1
- package/dist/esm/node_modules/react/jsx-runtime.js +0 -1
- /package/dist/cjs/lib/hooks/{useContentVisibilityDetection → useContentVisibility}/utils/contentVisibility.js +0 -0
- /package/dist/esm/lib/hooks/{useContentVisibilityDetection → useContentVisibility}/utils/contentVisibility.js +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as e}from"../../../_virtual/jsx-runtime.js";import{createContext as t,useContext as s,useMemo as r,useState as n}from"react";import{Provider as i}from"../cssProvider/provider.js";const o=t(void 0),a=()=>{const e=s(o);if(!e)throw new Error("useStylesContext must be used within a StylesProvider");return e},l={lg:992,md:768,sm:576,xl:1200},m=({breakpoints:
|
|
2
|
-
return e.jsx(o.Provider,{value:{breakpoints:x,changeTheme:e=>{try{b.themeSelected=e,C(e)}catch(t){}},classes:[],currentTheme:w,getComponentStyles:({additionalClassNames:e,component:t,variant:s})=>{try{return b.getComponentStyles({additionalClassNames:e,component:t,variant:s||""})}catch(r){return{}}},icons:v,illustrations:y,mediaQueries:u,themeClassNames:b.classNames,themes:b.allThemes,themeVariables:b.variables},children:
|
|
1
|
+
import{j as e}from"../../../_virtual/jsx-runtime.js";import{createContext as t,useContext as s,useMemo as r,useState as n}from"react";import{Provider as i}from"../cssProvider/provider.js";const o=t(void 0),a=()=>{const e=s(o);if(!e)throw new Error("useStylesContext must be used within a StylesProvider");return e},l={lg:992,md:768,sm:576,xl:1200},m=({bernovaProvider:t,breakpoints:s=l,children:a,icons:m={},illustrations:d={},jsInCss:c=!0,linkId:h="kb-styled-provider",themeSelected:p})=>{const x=s,u=(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)`}))(s),v=m,y=d,b=r(()=>new(t||i)({jsInCss:c,linkId:h}),[]),[w,C]=n(p||b.themeSelected);b.themeSelected=w||"";/* @__PURE__ */
|
|
2
|
+
return e.jsx(o.Provider,{value:{breakpoints:x,changeTheme:e=>{try{b.themeSelected=e,C(e)}catch(t){}},classes:[],currentTheme:w,getComponentStyles:({additionalClassNames:e,component:t,variant:s})=>{try{return b.getComponentStyles({additionalClassNames:e,component:t,variant:s||""})}catch(r){return{}}},icons:v,illustrations:y,mediaQueries:u,themeClassNames:b.classNames,themes:b.allThemes,themeVariables:b.variables},children:a})};export{o as StylesContext,m as StylesProvider,a as useStylesContext};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const o=o=>o?"string"==typeof o?{icon:o}:o:{};export{o as processIcon};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{isValidElement as t}from"react";const e=(e,n)=>{if(!e)return{children:null};let r;return"string"==typeof e||t(e)?r="string"==typeof e?e:void 0:"object"==typeof e&&"content"in e&&(r=e.content),n&&r&&(r=r.substring(0,n)),t(e)?{children:e}:"object"==typeof e?{children:r,...e}:{children:r}};export{e as processText};
|
|
@@ -738,7 +738,7 @@ body *:focus-visible { box-shadow: 0 0 0 0.25rem #fff; outline-color: #2C71DB; o
|
|
|
738
738
|
.carousel__content[data-center-mode="true"] > *[data-highlighted] { transform: scale(1); }
|
|
739
739
|
.carousel__content[data-shifting="true"] { transition: left 0.5s ease-out; }
|
|
740
740
|
.carousel__content > * { flex-shrink: 0; }
|
|
741
|
-
.carousel__viewer { cursor: grab; overflow: hidden;
|
|
741
|
+
.carousel__viewer { cursor: grab; overflow: hidden; padding: 0.5rem; position: relative; }
|
|
742
742
|
.carousel__viewer[data-allow-modify-slice-width="false"] { width: 0px; }
|
|
743
743
|
.carousel__viewer[data-allow-modify-slice-width="true"] { width: 100%; }
|
|
744
744
|
.carousel__viewer[data-disabled="true"] { cursor: default; }
|
package/dist/types/index.d.ts
CHANGED
|
@@ -433,10 +433,18 @@ export declare type BreadcrumbsVariantStyles<Variant extends string> = Breadcrum
|
|
|
433
433
|
[key in Variant]: BreadcrumbsStyleProps;
|
|
434
434
|
};
|
|
435
435
|
|
|
436
|
+
/**
|
|
437
|
+
* Defines responsive breakpoints in pixels for different screen sizes.
|
|
438
|
+
* Used for creating media queries and responsive layouts.
|
|
439
|
+
*/
|
|
436
440
|
declare interface Breakpoints {
|
|
441
|
+
/** Small screen breakpoint (typically mobile landscape) - default: 576px */
|
|
437
442
|
sm: number;
|
|
443
|
+
/** Medium screen breakpoint (typically tablets) - default: 768px */
|
|
438
444
|
md: number;
|
|
445
|
+
/** Large screen breakpoint (typically desktops) - default: 992px */
|
|
439
446
|
lg: number;
|
|
447
|
+
/** Extra large screen breakpoint (typically large desktops) - default: 1200px */
|
|
440
448
|
xl: number;
|
|
441
449
|
}
|
|
442
450
|
|
|
@@ -3203,16 +3211,30 @@ export declare type DataTableVariantStyles<Variant extends string> = DataTableSt
|
|
|
3203
3211
|
[key in Variant]: DataTableStyleProps;
|
|
3204
3212
|
};
|
|
3205
3213
|
|
|
3214
|
+
/**
|
|
3215
|
+
* Options for formatting dates using Intl.DateTimeFormat.
|
|
3216
|
+
* Provides granular control over date/time display format.
|
|
3217
|
+
*/
|
|
3206
3218
|
declare interface DateFormatOptions {
|
|
3219
|
+
/** Representation of the weekday ('long', 'short', 'narrow') */
|
|
3207
3220
|
weekday?: Intl.DateTimeFormatOptions['weekday'];
|
|
3221
|
+
/** Representation of the year ('numeric', '2-digit') */
|
|
3208
3222
|
year?: Intl.DateTimeFormatOptions['year'];
|
|
3223
|
+
/** Representation of the month ('numeric', '2-digit', 'long', 'short', 'narrow') */
|
|
3209
3224
|
month?: Intl.DateTimeFormatOptions['month'];
|
|
3225
|
+
/** Representation of the day ('numeric', '2-digit') */
|
|
3210
3226
|
day?: Intl.DateTimeFormatOptions['day'];
|
|
3227
|
+
/** Representation of the hour ('numeric', '2-digit') */
|
|
3211
3228
|
hour?: Intl.DateTimeFormatOptions['hour'];
|
|
3229
|
+
/** Representation of the minute ('numeric', '2-digit') */
|
|
3212
3230
|
minute?: Intl.DateTimeFormatOptions['minute'];
|
|
3231
|
+
/** Representation of the second ('numeric', '2-digit') */
|
|
3213
3232
|
second?: Intl.DateTimeFormatOptions['second'];
|
|
3233
|
+
/** Representation of the time zone name ('long', 'short', etc.) */
|
|
3214
3234
|
timeZoneName?: Intl.DateTimeFormatOptions['timeZoneName'];
|
|
3235
|
+
/** Whether to use 12-hour time format (true) or 24-hour format (false) */
|
|
3215
3236
|
hour12?: Intl.DateTimeFormatOptions['hour12'];
|
|
3237
|
+
/** Hour cycle to use ('h11', 'h12', 'h23', 'h24') */
|
|
3216
3238
|
hourCycle?: Intl.DateTimeFormatOptions['hourCycle'];
|
|
3217
3239
|
}
|
|
3218
3240
|
|
|
@@ -3427,74 +3449,117 @@ declare interface ElementOrIconProps extends Omit<IconProps, 'icon'>, DataAttrib
|
|
|
3427
3449
|
|
|
3428
3450
|
declare type FormatDateType = 'd' | 'dd' | 'ddd' | 'dddd' | 'f' | 'ff' | 'fff' | 'F' | 'FF' | 'FFF' | 'ffff' | 'FFFF' | 't' | 'tt' | 'T' | 'TT' | 'ttt' | 'TTT' | 'tttt' | 'TTTT';
|
|
3429
3451
|
|
|
3452
|
+
/**
|
|
3453
|
+
* React Context for generic component implementations.
|
|
3454
|
+
* Provides access to custom Link and Image components throughout the application.
|
|
3455
|
+
*/
|
|
3430
3456
|
export declare const GenericComponentContext: Context<GenericComponentsType | null>;
|
|
3431
3457
|
|
|
3458
|
+
/**
|
|
3459
|
+
* Provider component for custom generic component implementations.
|
|
3460
|
+
* Allows applications to inject their own Link and Image components
|
|
3461
|
+
* (e.g., Next.js Link, React Router Link) to be used by all Kubit components.
|
|
3462
|
+
*
|
|
3463
|
+
* This is essential for integrating Kubit components with different routing libraries
|
|
3464
|
+
* or custom implementations while maintaining consistent behavior across the application.
|
|
3465
|
+
*
|
|
3466
|
+
* @param props - Provider props
|
|
3467
|
+
* @param props.children - React children to be wrapped by the provider
|
|
3468
|
+
* @param props.value - Custom generic components to be used throughout the application
|
|
3469
|
+
*
|
|
3470
|
+
* @returns The provider component wrapping all child components
|
|
3471
|
+
*
|
|
3472
|
+
* @example
|
|
3473
|
+
* ```tsx
|
|
3474
|
+
* import { Link } from 'react-router-dom';
|
|
3475
|
+
*
|
|
3476
|
+
* const customComponents = {
|
|
3477
|
+
* LINK: Link,
|
|
3478
|
+
* IMAGE: CustomImage,
|
|
3479
|
+
* };
|
|
3480
|
+
*
|
|
3481
|
+
* <GenericComponentsProvider value={customComponents}>
|
|
3482
|
+
* <App />
|
|
3483
|
+
* </GenericComponentsProvider>
|
|
3484
|
+
* ```
|
|
3485
|
+
*/
|
|
3432
3486
|
export declare const GenericComponentsProvider: ({ children, value, }: PropsWithChildren<GenericComponentsProviderProps>) => JSX.Element;
|
|
3433
3487
|
|
|
3434
3488
|
/**
|
|
3435
|
-
*
|
|
3436
|
-
*
|
|
3489
|
+
* Props for the GenericComponentsProvider.
|
|
3490
|
+
* Wraps the application with custom component implementations.
|
|
3437
3491
|
*/
|
|
3438
3492
|
declare interface GenericComponentsProviderProps {
|
|
3493
|
+
/** The custom generic components to be made available to child components */
|
|
3439
3494
|
value: GenericComponentsType;
|
|
3440
3495
|
}
|
|
3441
3496
|
|
|
3442
3497
|
/**
|
|
3443
|
-
*
|
|
3498
|
+
* Collection of generic component implementations.
|
|
3499
|
+
* Allows customization of primitive components used throughout the library.
|
|
3444
3500
|
*/
|
|
3445
3501
|
declare interface GenericComponentsType {
|
|
3502
|
+
/** Link component implementation (required) */
|
|
3446
3503
|
LINK: GenericLinkType;
|
|
3504
|
+
/** Image component implementation (optional) */
|
|
3447
3505
|
IMAGE?: GenericImageType;
|
|
3448
3506
|
}
|
|
3449
3507
|
|
|
3450
3508
|
/**
|
|
3451
|
-
*
|
|
3509
|
+
* Props for a generic image component.
|
|
3510
|
+
* Inherits all standard HTML image attributes.
|
|
3452
3511
|
*/
|
|
3453
3512
|
declare type GenericImageProps = ImgHTMLAttributes<HTMLImageElement>;
|
|
3454
3513
|
|
|
3455
3514
|
/**
|
|
3456
|
-
*
|
|
3515
|
+
* Type definition for a generic image component.
|
|
3516
|
+
* Can be either a functional component or a forward ref component to support refs.
|
|
3457
3517
|
*/
|
|
3458
3518
|
declare type GenericImageType = ((props: GenericImageProps) => JSX.Element) | ForwardRefExoticComponent<GenericImageProps & RefAttributes<unknown>>;
|
|
3459
3519
|
|
|
3520
|
+
/**
|
|
3521
|
+
* Subset of ARIA attributes applicable to link elements.
|
|
3522
|
+
* Ensures proper accessibility for navigation components.
|
|
3523
|
+
*/
|
|
3460
3524
|
declare type GenericLinkAriaAttributes = Pick<AriaAttributes, 'aria-label' | 'aria-describedby' | 'aria-labelledby' | 'aria-disabled' | 'aria-current'>;
|
|
3461
3525
|
|
|
3462
3526
|
/**
|
|
3463
|
-
*
|
|
3464
|
-
*
|
|
3465
|
-
*
|
|
3466
|
-
* @property {string} [className] - Optional CSS class for styling.
|
|
3467
|
-
* @property {string} [target] - Specifies where to open the linked document.
|
|
3468
|
-
* @property {boolean} [aria-disabled] - Indicates that the element is perceivable but disabled.
|
|
3469
|
-
* @property {string} [aria-label] - Defines a string value that labels the current element.
|
|
3470
|
-
* @property {string} [aria-describedby] - Defines a string value that labels the current element.
|
|
3471
|
-
* @property {string} [aria-current] - Defines value for the current element.
|
|
3472
|
-
* @property {() => void} [onClick] - Function to call when the link is clicked.
|
|
3473
|
-
* @property {() => void} [onFocus] - Function to call when the link is focused.
|
|
3474
|
-
* @property {() => void} [onMouseEnter] - Function to call when the mouse enters the link area.
|
|
3475
|
-
* @property {() => void} [onMouseLeave] - Function to call when the mouse leaves the link area.
|
|
3476
|
-
* @property {ROLES} [role] - ARIA role to describe the link's type.
|
|
3477
|
-
* @property {string} [dataTestId] - Test ID for testing purposes.
|
|
3478
|
-
* @property {boolean} [draggable] - Indicates whether the element can be dragged.
|
|
3527
|
+
* Props for a generic link component.
|
|
3528
|
+
* Provides a flexible interface for custom link implementations that can be used
|
|
3529
|
+
* throughout the component library (e.g., for React Router, Next.js Link, etc.).
|
|
3479
3530
|
*/
|
|
3480
3531
|
declare type GenericLinkProps = {
|
|
3532
|
+
/** The destination URL for the link */
|
|
3481
3533
|
url: string;
|
|
3534
|
+
/** Optional unique identifier for the link element */
|
|
3482
3535
|
id?: string;
|
|
3536
|
+
/** Content to be displayed inside the link */
|
|
3483
3537
|
children: string | JSX.Element;
|
|
3538
|
+
/** Optional CSS class name(s) for styling */
|
|
3484
3539
|
className?: string;
|
|
3540
|
+
/** Specifies where to open the linked document ('_blank', '_self', '_parent', '_top') */
|
|
3485
3541
|
target?: string;
|
|
3542
|
+
/** Callback function invoked when the link is clicked */
|
|
3486
3543
|
onClick?: () => void;
|
|
3544
|
+
/** Callback function invoked when the link receives focus */
|
|
3487
3545
|
onFocus?: () => void;
|
|
3546
|
+
/** Callback function invoked when the mouse pointer enters the link area */
|
|
3488
3547
|
onMouseEnter?: () => void;
|
|
3548
|
+
/** Callback function invoked when the mouse pointer leaves the link area */
|
|
3489
3549
|
onMouseLeave?: () => void;
|
|
3550
|
+
/** Relationship between the current document and the linked document */
|
|
3490
3551
|
rel?: string;
|
|
3552
|
+
/** ARIA role to override the default link role if needed */
|
|
3491
3553
|
role?: AriaRole;
|
|
3554
|
+
/** Test ID for automated testing purposes */
|
|
3492
3555
|
dataTestId?: string;
|
|
3556
|
+
/** Whether the element can be dragged */
|
|
3493
3557
|
draggable?: boolean;
|
|
3494
3558
|
} & GenericLinkAriaAttributes & DataAttributes;
|
|
3495
3559
|
|
|
3496
3560
|
/**
|
|
3497
|
-
*
|
|
3561
|
+
* Type definition for a generic link component.
|
|
3562
|
+
* Can be either a functional component or a forward ref component to support refs.
|
|
3498
3563
|
*/
|
|
3499
3564
|
declare type GenericLinkType = ((props: GenericLinkProps) => JSX.Element) | ForwardRefExoticComponent<GenericLinkProps & RefAttributes<unknown>>;
|
|
3500
3565
|
|
|
@@ -4043,14 +4108,63 @@ export declare interface ISnackbarV2 extends Omit<ISnackbarStandAlone, 'onMouseE
|
|
|
4043
4108
|
|
|
4044
4109
|
declare type keyMoveType = number | ((previous: number, e?: KeyboardEvent) => number) | null;
|
|
4045
4110
|
|
|
4111
|
+
/**
|
|
4112
|
+
* Main provider component for the Kubit component library.
|
|
4113
|
+
* Orchestrates all sub-providers (Utils, Styles, and GenericComponents) and provides
|
|
4114
|
+
* a single entry point for configuring the entire component library context.
|
|
4115
|
+
*
|
|
4116
|
+
* This provider wraps the application and supplies:
|
|
4117
|
+
* - Date manipulation and formatting utilities
|
|
4118
|
+
* - Theme and styling configuration
|
|
4119
|
+
* - Custom generic components (Link, Image)
|
|
4120
|
+
*
|
|
4121
|
+
* @param props - Configuration props for the provider
|
|
4122
|
+
* @param props.children - React children to be wrapped by the provider
|
|
4123
|
+
* @param props.genericComponentsProvider - Custom implementations of generic components (Link, Image).
|
|
4124
|
+
* Defaults to library's built-in components if not provided
|
|
4125
|
+
* @param props.utilsConfig - Optional configuration to override default utility functions
|
|
4126
|
+
* (date helpers, formatters, asset paths)
|
|
4127
|
+
*
|
|
4128
|
+
* @returns The provider component wrapping all child components
|
|
4129
|
+
*
|
|
4130
|
+
* @example
|
|
4131
|
+
* ```tsx
|
|
4132
|
+
* import { KubitProvider } from '@kubit/react-components';
|
|
4133
|
+
*
|
|
4134
|
+
* function App() {
|
|
4135
|
+
* return (
|
|
4136
|
+
* <KubitProvider
|
|
4137
|
+
* genericComponentsProvider={{
|
|
4138
|
+
* LINK: CustomLink,
|
|
4139
|
+
* IMAGE: CustomImage,
|
|
4140
|
+
* }}
|
|
4141
|
+
* >
|
|
4142
|
+
* <YourApp />
|
|
4143
|
+
* </KubitProvider>
|
|
4144
|
+
* );
|
|
4145
|
+
* }
|
|
4146
|
+
* ```
|
|
4147
|
+
*/
|
|
4046
4148
|
export declare const KubitProvider: ({ children, genericComponentsProvider, utilsConfig, }: KubitProviderProps) => JSX.Element;
|
|
4047
4149
|
|
|
4150
|
+
/**
|
|
4151
|
+
* Props for the KubitProvider component.
|
|
4152
|
+
* Provides configuration for the entire Kubit component library context.
|
|
4153
|
+
*/
|
|
4048
4154
|
declare interface KubitProviderProps {
|
|
4155
|
+
/**
|
|
4156
|
+
* The React children to be wrapped by the provider.
|
|
4157
|
+
*/
|
|
4049
4158
|
children?: React.ReactNode;
|
|
4159
|
+
/**
|
|
4160
|
+
* Custom generic components (like Link and Image) to be used throughout the application.
|
|
4161
|
+
* Defaults to the library's default generic components if not provided.
|
|
4162
|
+
*/
|
|
4050
4163
|
genericComponentsProvider?: GenericComponentsType;
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4164
|
+
/**
|
|
4165
|
+
* Configuration for utility functions like date helpers, formatting, and assets.
|
|
4166
|
+
* Allows overriding the default utility configurations.
|
|
4167
|
+
*/
|
|
4054
4168
|
utilsConfig?: UtilsContextType;
|
|
4055
4169
|
}
|
|
4056
4170
|
|
|
@@ -4252,10 +4366,18 @@ export declare type ListOptionsVariantStyles<Variant extends string> = ListOptio
|
|
|
4252
4366
|
[key in Variant]: ListOptionsStyleProps;
|
|
4253
4367
|
};
|
|
4254
4368
|
|
|
4369
|
+
/**
|
|
4370
|
+
* Media query strings for targeting specific screen size ranges.
|
|
4371
|
+
* Built from the provided breakpoints configuration.
|
|
4372
|
+
*/
|
|
4255
4373
|
declare interface MediaQueries {
|
|
4374
|
+
/** Media query for mobile devices only (below md breakpoint) */
|
|
4256
4375
|
onlyMobile: string;
|
|
4376
|
+
/** Media query for tablets only (between md and lg breakpoints) */
|
|
4257
4377
|
onlyTablet: string;
|
|
4378
|
+
/** Media query for desktops (below xl breakpoint) */
|
|
4258
4379
|
onlyDesktop: string;
|
|
4380
|
+
/** Media query for large desktops (xl breakpoint and above) */
|
|
4259
4381
|
onlyLargeDesktop: string;
|
|
4260
4382
|
}
|
|
4261
4383
|
|
|
@@ -5340,35 +5462,97 @@ export declare interface StepStateProps {
|
|
|
5340
5462
|
['aria-label']?: string;
|
|
5341
5463
|
}
|
|
5342
5464
|
|
|
5465
|
+
/**
|
|
5466
|
+
* React Context for styles and theming.
|
|
5467
|
+
* Provides access to styling utilities, theme management, and responsive breakpoints.
|
|
5468
|
+
*/
|
|
5343
5469
|
export declare const StylesContext: Context<StylesContextProps | undefined>;
|
|
5344
5470
|
|
|
5471
|
+
/**
|
|
5472
|
+
* Context value provided by StylesProvider.
|
|
5473
|
+
* Contains all styling-related data and utilities available to child components.
|
|
5474
|
+
*/
|
|
5345
5475
|
declare interface StylesContextProps {
|
|
5476
|
+
/** Current responsive breakpoints configuration */
|
|
5346
5477
|
breakpoints: Breakpoints;
|
|
5478
|
+
/** Array of CSS class names or null */
|
|
5347
5479
|
classes: string[] | null;
|
|
5480
|
+
/** Pre-built media query strings for responsive design */
|
|
5348
5481
|
mediaQueries: MediaQueries;
|
|
5482
|
+
/** Map of available icons */
|
|
5349
5483
|
icons: Record<string, string>;
|
|
5484
|
+
/** Map of available illustrations */
|
|
5350
5485
|
illustrations: Record<string, string>;
|
|
5486
|
+
/** Currently active theme name, or null if no theme is selected */
|
|
5351
5487
|
currentTheme: string | null;
|
|
5488
|
+
/** Function to retrieve styles for a specific component and variant */
|
|
5352
5489
|
getComponentStyles: RecoverComponentStyles;
|
|
5490
|
+
/** Function to change the active theme */
|
|
5353
5491
|
changeTheme: (themeName: string) => void;
|
|
5492
|
+
/** Array of CSS class names for the current theme */
|
|
5354
5493
|
themeClassNames: string[];
|
|
5494
|
+
/** Map of all available themes */
|
|
5355
5495
|
themes: Record<string, string>;
|
|
5496
|
+
/** Map of CSS custom properties (variables) for the current theme */
|
|
5356
5497
|
themeVariables: Record<string, string>;
|
|
5357
5498
|
}
|
|
5358
5499
|
|
|
5359
5500
|
/**
|
|
5360
|
-
* Provider component
|
|
5501
|
+
* Provider component for styles, theming, and responsive design utilities.
|
|
5502
|
+
* Manages theme selection, CSS class generation, and provides styling context to child components.
|
|
5503
|
+
*
|
|
5504
|
+
* Features:
|
|
5505
|
+
* - Theme management with dynamic theme switching
|
|
5506
|
+
* - Responsive breakpoints and media queries
|
|
5507
|
+
* - Icon and illustration asset management
|
|
5508
|
+
* - Component-specific style retrieval
|
|
5509
|
+
* - CSS-in-JS support via Bernova provider
|
|
5510
|
+
*
|
|
5511
|
+
* @param props - Configuration props for the styles provider
|
|
5512
|
+
* @param props.children - React children to be wrapped by the provider
|
|
5513
|
+
* @param props.breakpoints - Custom responsive breakpoints (defaults to standard breakpoints if not provided)
|
|
5514
|
+
* @param props.icons - Map of icon names to URLs or base64 strings
|
|
5515
|
+
* @param props.illustrations - Map of illustration names to URLs or base64 strings
|
|
5516
|
+
* @param props.themeSelected - Initial theme to apply
|
|
5517
|
+
* @param props.bernovaProvider - Custom Bernova provider instance for advanced styling control
|
|
5518
|
+
* @param props.linkId - ID for the style link element in the DOM (default: 'kb-styled-provider')
|
|
5519
|
+
* @param props.jsInCss - Whether to inject CSS directly into JavaScript (default: true)
|
|
5520
|
+
*
|
|
5521
|
+
* @returns The styled provider component wrapping all child components
|
|
5522
|
+
*
|
|
5523
|
+
* @example
|
|
5524
|
+
* ```tsx
|
|
5525
|
+
* <StylesProvider
|
|
5526
|
+
* themeSelected="dark"
|
|
5527
|
+
* breakpoints={{ sm: 576, md: 768, lg: 992, xl: 1200 }}
|
|
5528
|
+
* icons={{ home: '/icons/home.svg' }}
|
|
5529
|
+
* >
|
|
5530
|
+
* <App />
|
|
5531
|
+
* </StylesProvider>
|
|
5532
|
+
* ```
|
|
5361
5533
|
*/
|
|
5362
5534
|
export declare const StylesProvider: FC<StylesProviderProps>;
|
|
5363
5535
|
|
|
5536
|
+
/**
|
|
5537
|
+
* Props for the StylesProvider component.
|
|
5538
|
+
* Configures the styling system including themes, breakpoints, and assets.
|
|
5539
|
+
*/
|
|
5364
5540
|
declare interface StylesProviderProps {
|
|
5541
|
+
/** The React children to be wrapped by the provider */
|
|
5365
5542
|
children: React.ReactNode;
|
|
5543
|
+
/** Custom breakpoints for responsive design. If not provided, uses default breakpoints */
|
|
5366
5544
|
breakpoints?: Breakpoints;
|
|
5545
|
+
/** Map of icon names to their corresponding URLs or base64 strings */
|
|
5367
5546
|
icons?: Record<string, string>;
|
|
5547
|
+
/** Map of illustration names to their corresponding URLs or base64 strings */
|
|
5368
5548
|
illustrations?: Record<string, string>;
|
|
5549
|
+
/** The initial theme to be applied. If not provided, uses the provider's default theme */
|
|
5369
5550
|
themeSelected?: string;
|
|
5551
|
+
/** Custom Bernova provider instance for advanced styling control */
|
|
5370
5552
|
bernovaProvider?: typeof Provider;
|
|
5553
|
+
/** ID for the style link element in the DOM. Default: 'kb-styled-provider' */
|
|
5371
5554
|
linkId?: string;
|
|
5555
|
+
/** Whether to inject CSS directly into JavaScript. Default: true */
|
|
5372
5556
|
jsInCss?: boolean;
|
|
5373
5557
|
}
|
|
5374
5558
|
|
|
@@ -5376,19 +5560,27 @@ export declare const Table: ForwardRefExoticComponent<TableProps & {
|
|
|
5376
5560
|
children?: ReactNode | undefined;
|
|
5377
5561
|
} & RefAttributes<HTMLDivElement>>;
|
|
5378
5562
|
|
|
5563
|
+
export declare const TableBody: ForwardRefExoticComponent<TableBodyProps & {
|
|
5564
|
+
children?: ReactNode | undefined;
|
|
5565
|
+
} & RefAttributes<HTMLTableSectionElement>>;
|
|
5566
|
+
|
|
5379
5567
|
declare type TableBodyCssClasses = ComponentSelected<ComponentsTypesComponents['TABLE_BODY']>;
|
|
5380
5568
|
|
|
5381
|
-
declare interface TableBodyProps extends TableBodyStandAloneProps {
|
|
5569
|
+
export declare interface TableBodyProps extends TableBodyStandAloneProps {
|
|
5382
5570
|
variant?: string;
|
|
5383
5571
|
additionalClasses?: Partial<TableBodyCssClasses>;
|
|
5384
5572
|
}
|
|
5385
5573
|
|
|
5386
|
-
declare interface TableBodyStandAloneProps extends DataAttributes {
|
|
5574
|
+
export declare interface TableBodyStandAloneProps extends DataAttributes {
|
|
5387
5575
|
cssClasses?: TableBodyCssClasses;
|
|
5388
5576
|
id?: string;
|
|
5389
5577
|
component?: string | React.ComponentType<any>;
|
|
5390
5578
|
}
|
|
5391
5579
|
|
|
5580
|
+
export declare type TableBodyVariantStyles<Variant extends string> = CssLibPropsType & {
|
|
5581
|
+
[key in Variant]: CssLibPropsType;
|
|
5582
|
+
};
|
|
5583
|
+
|
|
5392
5584
|
export declare const TableCaption: ForwardRefExoticComponent<TableCaptionProps & {
|
|
5393
5585
|
children?: ReactNode | undefined;
|
|
5394
5586
|
} & RefAttributes<HTMLTableSectionElement>>;
|
|
@@ -6141,6 +6333,24 @@ export declare type TooltipVariantStyles<Variant extends string> = TooltipStyleP
|
|
|
6141
6333
|
[key in Variant]?: TooltipStyleProps;
|
|
6142
6334
|
};
|
|
6143
6335
|
|
|
6336
|
+
/**
|
|
6337
|
+
* Custom hook to access the generic components context.
|
|
6338
|
+
* Provides access to the custom Link and Image components configured in the provider.
|
|
6339
|
+
*
|
|
6340
|
+
* @throws {Error} If used outside of a GenericComponentsProvider or with invalid value
|
|
6341
|
+
* @returns The generic components (LINK, IMAGE) from the context
|
|
6342
|
+
*
|
|
6343
|
+
* @example
|
|
6344
|
+
* ```tsx
|
|
6345
|
+
* const { LINK, IMAGE } = useGenericComponents();
|
|
6346
|
+
*
|
|
6347
|
+
* return (
|
|
6348
|
+
* <LINK url="/home">
|
|
6349
|
+
* <IMAGE src="/logo.png" alt="Logo" />
|
|
6350
|
+
* </LINK>
|
|
6351
|
+
* );
|
|
6352
|
+
* ```
|
|
6353
|
+
*/
|
|
6144
6354
|
export declare const useGenericComponents: () => GenericComponentsType;
|
|
6145
6355
|
|
|
6146
6356
|
declare interface UseRoveFocusProps {
|
|
@@ -6156,10 +6366,17 @@ declare interface UseRoveFocusProps {
|
|
|
6156
6366
|
}
|
|
6157
6367
|
|
|
6158
6368
|
/**
|
|
6159
|
-
* Custom hook to access the
|
|
6369
|
+
* Custom hook to access the StylesContext.
|
|
6370
|
+
* Provides styling utilities including theme management, breakpoints, and component styles.
|
|
6160
6371
|
*
|
|
6161
|
-
* @throws
|
|
6162
|
-
* @returns The current
|
|
6372
|
+
* @throws {Error} If used outside of a StylesProvider
|
|
6373
|
+
* @returns The current styles context value
|
|
6374
|
+
*
|
|
6375
|
+
* @example
|
|
6376
|
+
* ```tsx
|
|
6377
|
+
* const { currentTheme, changeTheme, getComponentStyles } = useStylesContext();
|
|
6378
|
+
* const styles = getComponentStyles({ component: 'button', variant: 'primary' });
|
|
6379
|
+
* ```
|
|
6163
6380
|
*/
|
|
6164
6381
|
export declare const useStylesContext: () => StylesContextProps;
|
|
6165
6382
|
|
|
@@ -6184,27 +6401,84 @@ export declare const useUtilsProvider: () => UtilsContextType;
|
|
|
6184
6401
|
*/
|
|
6185
6402
|
export declare const UtilsContext: Context<UtilsContextType | null>;
|
|
6186
6403
|
|
|
6404
|
+
/**
|
|
6405
|
+
* Context type for utility functions and configurations.
|
|
6406
|
+
* Provides date manipulation, formatting, and asset management utilities.
|
|
6407
|
+
*/
|
|
6187
6408
|
declare interface UtilsContextType {
|
|
6409
|
+
/**
|
|
6410
|
+
* Base URLs for different types of assets.
|
|
6411
|
+
* Used to construct full paths for icons, illustrations, images, and animations.
|
|
6412
|
+
*/
|
|
6188
6413
|
assets?: {
|
|
6414
|
+
/** Base URL for all assets */
|
|
6189
6415
|
baseHost: string;
|
|
6416
|
+
/** Specific base URL for icon assets */
|
|
6190
6417
|
iconsBaseHost?: string;
|
|
6418
|
+
/** Specific base URL for illustration assets */
|
|
6191
6419
|
illutrationsBaseHost?: string;
|
|
6420
|
+
/** Specific base URL for image assets */
|
|
6192
6421
|
imagesBaseHost?: string;
|
|
6422
|
+
/** Specific base URL for animation assets */
|
|
6193
6423
|
animationsBaseHost?: string;
|
|
6194
6424
|
};
|
|
6425
|
+
/**
|
|
6426
|
+
* Formats a Date object into a string representation.
|
|
6427
|
+
* @param date - The date to format
|
|
6428
|
+
* @param format - Format string or options object (e.g., 'dd/MM/yyyy', 'd', etc.)
|
|
6429
|
+
* @param locale - Optional locale string (e.g., 'en-US', 'es-ES')
|
|
6430
|
+
* @returns Formatted date string
|
|
6431
|
+
*/
|
|
6195
6432
|
formatDate: (date: Date, format: DateFormatOptions | FormatDateType | string, locale?: string) => string;
|
|
6433
|
+
/**
|
|
6434
|
+
* Transforms a string or number into a Date object.
|
|
6435
|
+
* @param date - The date value to transform (timestamp or date string)
|
|
6436
|
+
* @param format - Optional format string to parse the date
|
|
6437
|
+
* @returns Parsed Date object
|
|
6438
|
+
*/
|
|
6196
6439
|
transformDate: (date: string | number, format?: string) => Date;
|
|
6440
|
+
/**
|
|
6441
|
+
* Collection of date manipulation and comparison utilities.
|
|
6442
|
+
*/
|
|
6197
6443
|
dateHelpers: {
|
|
6444
|
+
/** Subtracts a specified number of days from a date */
|
|
6198
6445
|
getSubDays: (date: Date, amount: number) => Date;
|
|
6446
|
+
/** Subtracts a specified number of months from a date */
|
|
6199
6447
|
getSubMonths: (date: Date, amount: number) => Date;
|
|
6448
|
+
/** Subtracts a specified number of years from a date */
|
|
6200
6449
|
getSubYears: (date: Date, amount: number) => Date;
|
|
6450
|
+
/** Adds a specified number of months to a date */
|
|
6201
6451
|
getAddMonths: (date: Date, amount: number) => Date;
|
|
6452
|
+
/** Adds a specified number of days to a date */
|
|
6202
6453
|
getAddDays: (date: Date, amount: number) => Date;
|
|
6454
|
+
/** Adds a specified number of years to a date */
|
|
6203
6455
|
getAddYears: (date: Date, years: number) => Date;
|
|
6456
|
+
/**
|
|
6457
|
+
* Gets all month names in the specified format and locale.
|
|
6458
|
+
* @param monthFormat - Format for month names ('long', 'short', 'narrow')
|
|
6459
|
+
* @param locale - Optional locale string
|
|
6460
|
+
* @returns Array of month names
|
|
6461
|
+
*/
|
|
6204
6462
|
getAllMonthName: (monthFormat: Intl.DateTimeFormatOptions['month'], locale?: string) => Array<string>;
|
|
6463
|
+
/**
|
|
6464
|
+
* Gets all weekday names in the specified format and locale.
|
|
6465
|
+
* @param weekdayFormat - Format for weekday names ('long', 'short', 'narrow')
|
|
6466
|
+
* @param isSundayFirst - Whether Sunday should be the first day of the week
|
|
6467
|
+
* @param locale - Optional locale string
|
|
6468
|
+
* @returns Array of weekday names
|
|
6469
|
+
*/
|
|
6205
6470
|
getAllWeekdayName: (weekdayFormat: Intl.DateTimeFormatOptions['weekday'], isSundayFirst: boolean, locale?: string) => Array<string>;
|
|
6471
|
+
/** Checks if the first date is before the second date */
|
|
6206
6472
|
isBefore: (date1: Date, date2: Date) => boolean;
|
|
6473
|
+
/** Checks if the first date is after the second date */
|
|
6207
6474
|
isAfter: (date1: Date, date2: Date) => boolean;
|
|
6475
|
+
/**
|
|
6476
|
+
* Checks if two dates are equal.
|
|
6477
|
+
* @param firstDate - First date to compare
|
|
6478
|
+
* @param secondDate - Second date to compare
|
|
6479
|
+
* @param shouldCompareTime - Whether to include time in comparison
|
|
6480
|
+
* @returns True if dates are equal
|
|
6481
|
+
*/
|
|
6208
6482
|
isDatesEqual: (firstDate: Date | number | string, secondDate: Date | number | string, shouldCompareTime: boolean) => boolean;
|
|
6209
6483
|
};
|
|
6210
6484
|
}
|
|
@@ -6235,7 +6509,12 @@ declare interface UtilsContextType {
|
|
|
6235
6509
|
*/
|
|
6236
6510
|
export declare const UtilsProvider: (props: UtilsProviderProps) => JSX_2.Element;
|
|
6237
6511
|
|
|
6512
|
+
/**
|
|
6513
|
+
* Props for the UtilsProvider component.
|
|
6514
|
+
* Extends UtilsContextType with required children prop.
|
|
6515
|
+
*/
|
|
6238
6516
|
declare type UtilsProviderProps = UtilsContextType & {
|
|
6517
|
+
/** The React children to be wrapped by the provider */
|
|
6239
6518
|
children: ReactElement;
|
|
6240
6519
|
};
|
|
6241
6520
|
|