profinansy-ui-lib 3.1.63 → 3.1.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/uikit/Hint/Hint.d.ts +1 -1
- package/dist/components/uikit/Popup/Popup.d.ts +1 -1
- package/dist/components/uikit/SegmentControl/SegmentControl.d.ts +1 -1
- package/dist/components/uikit/SegmentControl/SegmentControl.stories.d.ts +1 -1
- package/dist/components/uikit/SegmentControl/SegmentControl.styled.d.ts +1 -0
- package/dist/components/uikit/SegmentControl/SegmentControl.typed.d.ts +2 -0
- package/dist/index.js +5 -2
- package/package.json +1 -1
|
@@ -43,7 +43,7 @@ export declare function useHint({ placement }?: HintOptions): {
|
|
|
43
43
|
};
|
|
44
44
|
getReferenceProps: (userProps?: React.HTMLProps<Element>) => Record<string, unknown>;
|
|
45
45
|
getFloatingProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
|
|
46
|
-
getItemProps: (userProps?: Omit<React.HTMLProps<HTMLElement>, "
|
|
46
|
+
getItemProps: (userProps?: Omit<React.HTMLProps<HTMLElement>, "active" | "selected"> & {
|
|
47
47
|
active?: boolean;
|
|
48
48
|
selected?: boolean;
|
|
49
49
|
}) => Record<string, unknown>;
|
|
@@ -47,7 +47,7 @@ export declare function usePopup({ placement, isHover }: {
|
|
|
47
47
|
};
|
|
48
48
|
getReferenceProps: (userProps?: React.HTMLProps<Element>) => Record<string, unknown>;
|
|
49
49
|
getFloatingProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
|
|
50
|
-
getItemProps: (userProps?: Omit<React.HTMLProps<HTMLElement>, "
|
|
50
|
+
getItemProps: (userProps?: Omit<React.HTMLProps<HTMLElement>, "active" | "selected"> & {
|
|
51
51
|
active?: boolean;
|
|
52
52
|
selected?: boolean;
|
|
53
53
|
}) => Record<string, unknown>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TSegmentControlProps } from './SegmentControl.typed';
|
|
2
|
-
declare const SegmentControl: ({ style, options, onChange, selectedValue, size, type, counterType }: TSegmentControlProps) => JSX.Element;
|
|
2
|
+
declare const SegmentControl: ({ style, options, onChange, selectedValue, size, type, counterType, isFullWidth }: TSegmentControlProps) => JSX.Element;
|
|
3
3
|
export { SegmentControl };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
title: string;
|
|
3
|
-
component: ({ style, options, onChange, selectedValue, size, type, counterType }: import("./SegmentControl.typed").TSegmentControlProps) => JSX.Element;
|
|
3
|
+
component: ({ style, options, onChange, selectedValue, size, type, counterType, isFullWidth }: import("./SegmentControl.typed").TSegmentControlProps) => JSX.Element;
|
|
4
4
|
tags: string[];
|
|
5
5
|
parameters: {
|
|
6
6
|
design: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { TSegmentControlSize, TSegmentControlType } from './SegmentControl.typed';
|
|
2
2
|
export declare const Container: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
3
3
|
mode: TSegmentControlType;
|
|
4
|
+
isFullWidth: boolean;
|
|
4
5
|
}, never>;
|
|
5
6
|
export declare const Selector: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
6
7
|
mode: TSegmentControlType;
|
|
@@ -26,6 +26,8 @@ export type TSegmentControlProps = {
|
|
|
26
26
|
type?: TSegmentControlType;
|
|
27
27
|
/** Тип Counter */
|
|
28
28
|
counterType?: TCounterType;
|
|
29
|
+
/** На всю ширину */
|
|
30
|
+
isFullWidth?: boolean;
|
|
29
31
|
/** Действие при нажатии на сегмент */
|
|
30
32
|
onChange?: (value: string, event: MouseEvent<HTMLButtonElement>) => void;
|
|
31
33
|
};
|
package/dist/index.js
CHANGED
|
@@ -2995,7 +2995,7 @@
|
|
|
2995
2995
|
gap: 4px;
|
|
2996
2996
|
border-radius: 8px;
|
|
2997
2997
|
background: ${e=>"primary"===e.mode?e.theme.interactiveControls.secondary:e.theme.interactiveControls.accent};
|
|
2998
|
-
width: fit-content;
|
|
2998
|
+
width: ${e=>e.isFullWidth?"100%":"fit-content"};
|
|
2999
2999
|
height: fit-content;
|
|
3000
3000
|
`,t.Selector=a.default.div`
|
|
3001
3001
|
height: calc(100% - 4px);
|
|
@@ -3020,8 +3020,10 @@
|
|
|
3020
3020
|
border: 0.5px solid transparent;
|
|
3021
3021
|
background: transparent;
|
|
3022
3022
|
color: ${e=>e.theme.text.primary};
|
|
3023
|
+
flex: 1 1 0;
|
|
3023
3024
|
display: flex;
|
|
3024
3025
|
align-items: center;
|
|
3026
|
+
justify-content: center;
|
|
3025
3027
|
outline: none;
|
|
3026
3028
|
-webkit-tap-highlight-color: transparent;
|
|
3027
3029
|
&:disabled {
|
|
@@ -3038,6 +3040,7 @@
|
|
|
3038
3040
|
position: relative;
|
|
3039
3041
|
z-index: 2;
|
|
3040
3042
|
cursor: pointer;
|
|
3043
|
+
text-align: center;
|
|
3041
3044
|
`,t.Icon=a.default.span`
|
|
3042
3045
|
width: 16px;
|
|
3043
3046
|
height: 16px;
|
|
@@ -3047,7 +3050,7 @@
|
|
|
3047
3050
|
margin-left: ${e=>e.isLabel?"4px":"0px"};
|
|
3048
3051
|
position: relative;
|
|
3049
3052
|
z-index: 2;
|
|
3050
|
-
`},2343:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentControl=void 0;const i=o(n(8156)),l=o(n(7760)),u=n(1197),c=n(1608),s=n(1899),d=n(7760),f=n(4103);t.SegmentControl=({style:e,options:t,onChange:n,selectedValue:r,size:a="S",type:o="primary",counterType:p})=>{const[
|
|
3053
|
+
`},2343:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentControl=void 0;const i=o(n(8156)),l=o(n(7760)),u=n(1197),c=n(1608),s=n(1899),d=n(7760),f=n(4103);t.SegmentControl=({style:e,options:t,onChange:n,selectedValue:r,size:a="S",type:o="primary",counterType:p,isFullWidth:h=!1})=>{const[m,v]=(0,i.useState)(0),[g,b]=(0,i.useState)({left:0,width:0}),y=(0,i.useRef)(null),{mode:w}=(0,u.useMode)();(0,i.useEffect)((()=>{if(r){const e=t.findIndex((e=>e.value===r));v(e),x(e)}}),[r]);const x=e=>{if(y.current){const t=y.current.querySelector(`[data-index="${e}"]`);if(t){const e=y.current.getBoundingClientRect(),n=t.getBoundingClientRect(),r=n.left-e.left,a=n.width;b({left:r,width:a})}}};return i.default.createElement(c.ThemeProvider,{theme:s.palette[w]},i.default.createElement(l.Container,{style:e,mode:o,isFullWidth:h,ref:y},t.map(((e,u)=>{const c=(e=>m===e||m-1===e||t.length-1===e)(u);return i.default.createElement(i.default.Fragment,{key:u},i.default.createElement(l.Item,{"data-index":u,size:a,mode:o,isActive:r===e.value,onClick:t=>((e,t,r)=>{v(r),n&&n(e,t)})(e.value,t,u)},!!e.label&&i.default.createElement(l.Text,{variant:"caption-Medium",tag:"span"},e.label),e.icon?i.default.createElement(l.Icon,{isLabel:!!e.label},e.icon):null,void 0!==e.dataCount&&i.default.createElement(f.Counter,{number:e.dataCount,type:p,style:{marginLeft:"4px",position:"relative",zIndex:2}})),t.length-1!==u?i.default.createElement(l.Divider,{isHide:c}):null)})),g.width?i.default.createElement(d.Selector,{mode:o,left:g.left,width:g.width}):null))}},9624:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentControl=void 0;var r=n(2343);Object.defineProperty(t,"SegmentControl",{enumerable:!0,get:function(){return r.SegmentControl}})},9540:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CloseButton=t.BottomContent=t.Content=t.Title=t.BackButton=t.LeftWrapper=t.Header=t.Sidebar=t.Layout=t.Wrapper=void 0;const i=o(n(1608)),l=n(1230),u=n(140),c=n(4542);t.Wrapper=i.default.div`
|
|
3051
3054
|
position: fixed;
|
|
3052
3055
|
top: 0;
|
|
3053
3056
|
left: 0;
|