@bikdotai/bik-component-library 0.0.13 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/fab-menu/FABMenu.d.ts +3 -1
- package/dist/cjs/components/fab-menu/FABMenu.js +1 -1
- package/dist/cjs/components/floating-action-button/FloatingActionButton.d.ts +3 -1
- package/dist/cjs/components/floating-action-button/FloatingActionButton.js +1 -1
- package/dist/cjs/components/floating-action-button/FloatingActionButton.styles.d.ts +12 -0
- package/dist/cjs/components/floating-action-button/FloatingActionButton.styles.js +11 -6
- package/dist/cjs/components/tooltips/CustomisedTooltip.d.ts +1 -0
- package/dist/cjs/components/tooltips/CustomisedTooltip.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/esm/components/fab-menu/FABMenu.d.ts +3 -1
- package/dist/esm/components/fab-menu/FABMenu.js +1 -1
- package/dist/esm/components/floating-action-button/FloatingActionButton.d.ts +3 -1
- package/dist/esm/components/floating-action-button/FloatingActionButton.js +1 -1
- package/dist/esm/components/floating-action-button/FloatingActionButton.styles.d.ts +12 -0
- package/dist/esm/components/floating-action-button/FloatingActionButton.styles.js +21 -16
- package/dist/esm/components/tooltips/CustomisedTooltip.d.ts +1 -0
- package/dist/esm/components/tooltips/CustomisedTooltip.js +1 -1
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DropdownOption, SingleOption } from '../dropdown/type';
|
|
3
|
-
import { FAB_POSITION } from '../floating-action-button/FloatingActionButton.styles';
|
|
3
|
+
import { DROP_POSITION, FAB_POSITION, MENU_ALIGNMENT } from '../floating-action-button/FloatingActionButton.styles';
|
|
4
4
|
import { TooltipPlacement } from '../tooltips';
|
|
5
5
|
export declare const FABMenu: React.FC<{
|
|
6
6
|
onSelect: (selected: SingleOption | SingleOption[]) => void;
|
|
@@ -18,4 +18,6 @@ export declare const FABMenu: React.FC<{
|
|
|
18
18
|
tooltipText?: string;
|
|
19
19
|
zIndex?: number;
|
|
20
20
|
isRound?: boolean;
|
|
21
|
+
dropPosition?: DROP_POSITION;
|
|
22
|
+
menuAligment?: MENU_ALIGNMENT;
|
|
21
23
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react/jsx-runtime"),o=require("../dropdown/opennedDropdown/components/OpennedDropdown.js"),n=require("../floating-action-button/FloatingActionButton.js");require("../floating-action-button/FloatingActionButton.styles.js");exports.FABMenu=e=>{const{onSelect:i,menuOptions:r,buttonWidth:d,buttonHeight:u,buttonColor:l,buttonPosition:s,menuWidth:c,menuHeight:a,buttonIcon:p,buttonPaddingHorizontal:g,buttonPaddingVertical:b,tooltipPlacement:h,tooltipText:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react/jsx-runtime"),o=require("../dropdown/opennedDropdown/components/OpennedDropdown.js"),n=require("../floating-action-button/FloatingActionButton.js");require("../floating-action-button/FloatingActionButton.styles.js");exports.FABMenu=e=>{const{onSelect:i,menuOptions:r,buttonWidth:d,buttonHeight:u,buttonColor:l,buttonPosition:s,menuWidth:c,menuHeight:a,buttonIcon:p,buttonPaddingHorizontal:g,buttonPaddingVertical:b,tooltipPlacement:h,tooltipText:m,zIndex:x,isRound:P,dropPosition:j,menuAligment:w}=e;return t.jsx("div",{children:t.jsx(n.FloatingActionButton,Object.assign({icon:p,width:d,height:u,color:l,position:s,buttonPaddingHorizontal:g,buttonPaddingVertical:b,tooltipPlacement:h,tooltipText:m,zIndex:x,isRound:P,dropPosition:j,menuAligment:w},{children:t.jsx(o.OpennedDropdown,{options:r,height:a||90,width:c,onSelect:i})}))})};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'bootstrap/dist/css/bootstrap.min.css';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { TooltipPlacement } from '../tooltips/CustomisedTooltip';
|
|
4
|
-
import { FAB_POSITION } from './FloatingActionButton.styles';
|
|
4
|
+
import { DROP_POSITION, FAB_POSITION, MENU_ALIGNMENT } from './FloatingActionButton.styles';
|
|
5
5
|
export declare const FloatingActionButton: React.FC<{
|
|
6
6
|
onClick?: () => void;
|
|
7
7
|
children?: React.ReactNode;
|
|
@@ -16,4 +16,6 @@ export declare const FloatingActionButton: React.FC<{
|
|
|
16
16
|
tooltipPlacement?: TooltipPlacement;
|
|
17
17
|
zIndex?: number;
|
|
18
18
|
isRound?: boolean;
|
|
19
|
+
dropPosition?: DROP_POSITION;
|
|
20
|
+
menuAligment?: MENU_ALIGNMENT;
|
|
19
21
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react/jsx-runtime"),o=require("react-bootstrap"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react/jsx-runtime"),o=require("react"),i=require("react-bootstrap"),n=require("../../constants/Theme.js"),e=require("../tooltips/CustomisedTooltip.js"),r=require("../../assets/icons/question-mark.svg.js"),s=require("./FloatingActionButton.styles.js");const l=o=>{const{width:i,height:n,color:l,onClick:c,icon:d,tooltipPlacement:a,tooltipText:h,isRound:u,isDropdownOpen:g}=o;return h?t.jsx(e.CustomisedTooltip,{isTooltipVisible:!g,tooltipContent:t.jsx(t.Fragment,{children:h}),tooltipTriggerContent:t.jsx(s.FloatingActionButtonContainer,Object.assign({width:i,height:n,color:l,onClick:c,isRound:u},{children:d||t.jsx(r.default,{width:22,height:22})})),tooltipPlacement:a,showOnHover:!0}):t.jsx(t.Fragment,{children:t.jsx(s.FloatingActionButtonContainer,Object.assign({width:i,height:n,color:l,onClick:c,isRound:u},{children:d||t.jsx(r.default,{width:22,height:22})}))})};exports.FloatingActionButton=r=>{const{icon:c,onClick:d,children:a,tooltipText:h,isRound:u=!0,width:g=48,height:p=48,color:j=n.COLORS.background.inverse,position:x=s.FAB_POSITION.TOP_LEFT,buttonPaddingHorizontal:O=20,buttonPaddingVertical:m=20,zIndex:T=1,tooltipPlacement:w=e.TooltipPlacement.Auto,dropPosition:P=s.DROP_POSITION.DOWN,menuAligment:C=s.MENU_ALIGNMENT.END}=r,[b,F]=o.useState(!1);return t.jsx(t.Fragment,{children:t.jsx(s.FloatingActionButtonOuterContainer,Object.assign({width:g,height:p,color:j,position:x,buttonPaddingHorizontal:O,buttonPaddingVertical:m,zIndex:T},{children:t.jsx(s.StyledDropdown,Object.assign({onToggle:(t,o)=>{F(t)},drop:P,align:C},{children:a?t.jsxs(t.Fragment,{children:[t.jsx(s.DropdownToggleContainer,Object.assign({drop:P},{children:t.jsx(l,{width:g,height:p,color:j,tooltipPlacement:w,onClick:d,tooltipText:h,icon:c,position:x,isRound:u,isDropdownOpen:b})})),t.jsx(i.Dropdown.Menu,{children:a})]}):t.jsx(l,{width:g,height:p,color:j,tooltipPlacement:w,onClick:d,tooltipText:h,icon:c,position:x,isRound:u,isDropdownOpen:b})}))}))})};
|
|
@@ -5,6 +5,18 @@ export declare enum FAB_POSITION {
|
|
|
5
5
|
BOTTOM_LEFT = "bottom left",
|
|
6
6
|
BOTTOM_RIGHT = "botton right"
|
|
7
7
|
}
|
|
8
|
+
export declare enum DROP_POSITION {
|
|
9
|
+
UP = "up",
|
|
10
|
+
UP_CENTERED = "up-centered",
|
|
11
|
+
START = "start",
|
|
12
|
+
END = "end",
|
|
13
|
+
DOWN = "down",
|
|
14
|
+
DOWN_CENTERED = "down-centered"
|
|
15
|
+
}
|
|
16
|
+
export declare enum MENU_ALIGNMENT {
|
|
17
|
+
START = "start",
|
|
18
|
+
END = "end"
|
|
19
|
+
}
|
|
8
20
|
export declare const FloatingActionButtonContainer: import("styled-components").StyledComponent<"div", any, {
|
|
9
21
|
width: number;
|
|
10
22
|
height: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react-bootstrap"),o=require("styled-components"),e=require("../../constants/Theme.js");function r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var i,n=r(o);exports.FAB_POSITION=void 0,(i=exports.FAB_POSITION||(exports.FAB_POSITION={})).TOP_LEFT="top left",i.TOP_RIGHT="top right",i.BOTTOM_LEFT="bottom left",i.BOTTOM_RIGHT="botton right";const
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react-bootstrap"),o=require("styled-components"),e=require("../../constants/Theme.js");function r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var i,n,d,p=r(o);exports.FAB_POSITION=void 0,(i=exports.FAB_POSITION||(exports.FAB_POSITION={})).TOP_LEFT="top left",i.TOP_RIGHT="top right",i.BOTTOM_LEFT="bottom left",i.BOTTOM_RIGHT="botton right",exports.DROP_POSITION=void 0,(n=exports.DROP_POSITION||(exports.DROP_POSITION={})).UP="up",n.UP_CENTERED="up-centered",n.START="start",n.END="end",n.DOWN="down",n.DOWN_CENTERED="down-centered",exports.MENU_ALIGNMENT=void 0,(d=exports.MENU_ALIGNMENT||(exports.MENU_ALIGNMENT={})).START="start",d.END="end";const a=p.default.div`
|
|
2
2
|
width: ${t=>t.width}px;
|
|
3
3
|
height: ${t=>t.height}px;
|
|
4
4
|
background: ${t=>t.color};
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
align-items: center;
|
|
8
8
|
cursor: pointer;
|
|
9
9
|
display: flex;
|
|
10
|
-
`,
|
|
10
|
+
`,s=p.default.div`
|
|
11
11
|
display: flex;
|
|
12
12
|
border-radius: 50%;
|
|
13
13
|
flex-direction: column;
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
height: ${t=>t.height}px;
|
|
18
18
|
z-index: ${t=>t.zIndex};
|
|
19
19
|
${t=>t.position===exports.FAB_POSITION.BOTTOM_RIGHT?`right: ${t.buttonPaddingHorizontal}px; bottom: ${t.buttonPaddingVertical}px`:t.position===exports.FAB_POSITION.BOTTOM_LEFT?`left: ${t.buttonPaddingHorizontal}px; bottom: ${t.buttonPaddingVertical}px`:t.position===exports.FAB_POSITION.TOP_LEFT?`left: ${t.buttonPaddingHorizontal}px; top: ${t.buttonPaddingVertical}px`:t.position===exports.FAB_POSITION.TOP_RIGHT?`right: ${t.buttonPaddingHorizontal}px; top: ${t.buttonPaddingVertical}px`:""};
|
|
20
|
-
`,p
|
|
20
|
+
`,l=p.default(t.Dropdown)`
|
|
21
21
|
.filter-container {
|
|
22
22
|
.single-row {
|
|
23
23
|
display: flex;
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
flex-direction: row;
|
|
42
42
|
align-items: center;
|
|
43
43
|
justify-content: space-between;
|
|
44
|
-
padding: 6px
|
|
44
|
+
padding: 6px 0px;
|
|
45
45
|
background: ${t=>"true"===t.active?e.COLORS.background.positive.light:e.COLORS.surface.standard};
|
|
46
46
|
color: ${t=>"true"===t.active?e.COLORS.content.positive:e.COLORS.content.primary};
|
|
47
47
|
}
|
|
@@ -64,6 +64,11 @@
|
|
|
64
64
|
border-top: 0.3em solid ${e.COLORS.content.primary};
|
|
65
65
|
display: none;
|
|
66
66
|
}
|
|
67
|
+
|
|
68
|
+
.dropdown-toggle::before {
|
|
69
|
+
border-top: 0.3em solid ${e.COLORS.content.primary};
|
|
70
|
+
display: none;
|
|
71
|
+
}
|
|
67
72
|
.dropdown-menu {
|
|
68
73
|
min-width: 12rem;
|
|
69
74
|
padding: 0 0;
|
|
@@ -74,7 +79,7 @@
|
|
|
74
79
|
text-decoration: none;
|
|
75
80
|
background-color: ${e.COLORS.background.positive.light};
|
|
76
81
|
}
|
|
77
|
-
`,
|
|
82
|
+
`,O=p.default(t.Dropdown.Toggle)`
|
|
78
83
|
border-radius: 4px;
|
|
79
84
|
display: flex;
|
|
80
85
|
flex-direction: row;
|
|
@@ -84,4 +89,4 @@
|
|
|
84
89
|
font-weight: 400;
|
|
85
90
|
font-size: 14px;
|
|
86
91
|
line-height: 20px;
|
|
87
|
-
`;exports.DropdownToggleContainer=
|
|
92
|
+
`;exports.DropdownToggleContainer=O,exports.FloatingActionButtonContainer=a,exports.FloatingActionButtonOuterContainer=s,exports.StyledDropdown=l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t,e=require("react/jsx-runtime"),o=require("react"),r=require("react-bootstrap");exports.TooltipPlacement=void 0,(t=exports.TooltipPlacement||(exports.TooltipPlacement={})).Top="top",t.Bottom="bottom",t.Right="right",t.Left="left",t.Auto_Start="auto-start",t.Auto="auto",t.Auto_end="auto-end",t.Top_Start="top-start",t.Top_End="top-end",t.Right_Start="right-start",t.Right_End="right-end",t.Bottom_End="bottom-end",t.Bottom_Start="bottom-start",t.Left_End="left-end",t.Left_Start="left-start";exports.CustomisedTooltip=t=>{const{tooltipContent:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t,e=require("react/jsx-runtime"),o=require("react"),r=require("react-bootstrap");exports.TooltipPlacement=void 0,(t=exports.TooltipPlacement||(exports.TooltipPlacement={})).Top="top",t.Bottom="bottom",t.Right="right",t.Left="left",t.Auto_Start="auto-start",t.Auto="auto",t.Auto_end="auto-end",t.Top_Start="top-start",t.Top_End="top-end",t.Right_Start="right-start",t.Right_End="right-end",t.Bottom_End="bottom-end",t.Bottom_Start="bottom-start",t.Left_End="left-end",t.Left_Start="left-start";exports.CustomisedTooltip=t=>{const{tooltipContent:i,tooltipPlacement:n,tooltipTriggerContent:s,showOnHover:a,isTooltipVisible:l=!0}=t,[p,u]=o.useState(!1),c=o.useRef(null);return e.jsx(r.OverlayTrigger,Object.assign({placement:n,target:c.current,show:p,overlay:l?e.jsx(r.Tooltip,Object.assign({id:`tooltip-${n}`},{children:i})):e.jsx(e.Fragment,{})},{children:e.jsx("div",Object.assign({ref:c,onMouseEnter:()=>{a&&u(!0)},onMouseLeave:()=>{a&&u(!1)},onClick:()=>{a||u(!p)}},{children:s}))}),n)};
|
package/dist/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./constants/Theme.js"),o=require("./components/checkBox/CheckBox.js"),t=require("./components/list-item/ListItem.js"),r=require("./components/pagination/Pagination.js"),n=require("./components/radioButton/RadioButton.js"),s=require("./components/toaster/Toaster.js"),i=require("./components/tooltips/Tooltip.js"),p=require("./components/tooltips/CustomisedTooltip.js"),a=require("./components/spinner/Spinner.js"),u=require("./components/stepper/Stepper.js"),c=require("./components/tag/Tag.js"),l=require("./components/icon-button/IconButton.js"),m=require("./components/fab-menu/FABMenu.js"),B=require("./components/floating-action-button/FloatingActionButton.js"),g=require("./components/floating-action-button/FloatingActionButton.styles.js"),x=require("./components/image-compress/ImageCompress.js"),d=require("./components/TypographyStyle.js"),T=require("./components/button/Button.js"),y=require("./components/progress-bar/ProgressBarComponent.js");exports.BASE_COLORS=e.BASE_COLORS,exports.COLORS=e.COLORS,exports.DEFAULT_THEME=e.DEFAULT_THEME,exports.FONTS=e.FONTS,exports.CheckBox=o.CheckBox,exports.ListItem=t.ListItem,exports.Pagination=r.Pagination,exports.RadioButton=n.RadioButton,exports.Toaster=s.Toaster,exports.Tooltip=i.Tooltip,exports.CustomisedTooltip=p.CustomisedTooltip,Object.defineProperty(exports,"TooltipPlacement",{enumerable:!0,get:function(){return p.TooltipPlacement}}),exports.Spinner=a.Spinner,exports.Stepper=u.Stepper,exports.Tag=c.Tag,exports.IconButton=l.IconButton,exports.FABMenu=m.FABMenu,exports.FloatingActionButton=B.FloatingActionButton,Object.defineProperty(exports,"DROP_POSITION",{enumerable:!0,get:function(){return g.DROP_POSITION}}),exports.DropdownToggleContainer=g.DropdownToggleContainer,Object.defineProperty(exports,"FAB_POSITION",{enumerable:!0,get:function(){return g.FAB_POSITION}}),exports.FloatingActionButtonContainer=g.FloatingActionButtonContainer,exports.FloatingActionButtonOuterContainer=g.FloatingActionButtonOuterContainer,Object.defineProperty(exports,"MENU_ALIGNMENT",{enumerable:!0,get:function(){return g.MENU_ALIGNMENT}}),exports.StyledDropdown=g.StyledDropdown,exports.ImageService=x.ImageService,exports.BodyCaption=d.BodyCaption,exports.BodyLarge=d.BodyLarge,exports.BodyPrimary=d.BodyPrimary,exports.BodyPrimaryLink=d.BodyPrimaryLink,exports.BodySecondary=d.BodySecondary,exports.BodySecondaryLink=d.BodySecondaryLink,exports.BodyTiny=d.BodyTiny,exports.ButtonLarge=d.ButtonLarge,exports.ButtonRegular=d.ButtonRegular,exports.Display=d.Display,exports.SubHeading=d.SubHeading,exports.TitleLarge=d.TitleLarge,exports.TitleMedium=d.TitleMedium,exports.TitleRegular=d.TitleRegular,exports.TitleSmall=d.TitleSmall,exports.Button=T.Button,exports.ProgressBarComponent=y.ProgressBarComponent,exports.ProgressCompletedBar=y.ProgressCompletedBar;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DropdownOption, SingleOption } from '../dropdown/type';
|
|
3
|
-
import { FAB_POSITION } from '../floating-action-button/FloatingActionButton.styles';
|
|
3
|
+
import { DROP_POSITION, FAB_POSITION, MENU_ALIGNMENT } from '../floating-action-button/FloatingActionButton.styles';
|
|
4
4
|
import { TooltipPlacement } from '../tooltips';
|
|
5
5
|
export declare const FABMenu: React.FC<{
|
|
6
6
|
onSelect: (selected: SingleOption | SingleOption[]) => void;
|
|
@@ -18,4 +18,6 @@ export declare const FABMenu: React.FC<{
|
|
|
18
18
|
tooltipText?: string;
|
|
19
19
|
zIndex?: number;
|
|
20
20
|
isRound?: boolean;
|
|
21
|
+
dropPosition?: DROP_POSITION;
|
|
22
|
+
menuAligment?: MENU_ALIGNMENT;
|
|
21
23
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{OpennedDropdown as o}from"../dropdown/opennedDropdown/components/OpennedDropdown.js";import{FloatingActionButton as n}from"../floating-action-button/FloatingActionButton.js";import"../floating-action-button/FloatingActionButton.styles.js";const i=i=>{const{onSelect:e,menuOptions:d,buttonWidth:r,buttonHeight:l,buttonColor:
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{OpennedDropdown as o}from"../dropdown/opennedDropdown/components/OpennedDropdown.js";import{FloatingActionButton as n}from"../floating-action-button/FloatingActionButton.js";import"../floating-action-button/FloatingActionButton.styles.js";const i=i=>{const{onSelect:e,menuOptions:d,buttonWidth:r,buttonHeight:l,buttonColor:u,buttonPosition:c,menuWidth:p,menuHeight:s,buttonIcon:a,buttonPaddingHorizontal:m,buttonPaddingVertical:g,tooltipPlacement:b,tooltipText:h,zIndex:P,isRound:x,dropPosition:f,menuAligment:j}=i;return t("div",{children:t(n,Object.assign({icon:a,width:r,height:l,color:u,position:c,buttonPaddingHorizontal:m,buttonPaddingVertical:g,tooltipPlacement:b,tooltipText:h,zIndex:P,isRound:x,dropPosition:f,menuAligment:j},{children:t(o,{options:d,height:s||90,width:p,onSelect:e})}))})};export{i as FABMenu};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'bootstrap/dist/css/bootstrap.min.css';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { TooltipPlacement } from '../tooltips/CustomisedTooltip';
|
|
4
|
-
import { FAB_POSITION } from './FloatingActionButton.styles';
|
|
4
|
+
import { DROP_POSITION, FAB_POSITION, MENU_ALIGNMENT } from './FloatingActionButton.styles';
|
|
5
5
|
export declare const FloatingActionButton: React.FC<{
|
|
6
6
|
onClick?: () => void;
|
|
7
7
|
children?: React.ReactNode;
|
|
@@ -16,4 +16,6 @@ export declare const FloatingActionButton: React.FC<{
|
|
|
16
16
|
tooltipPlacement?: TooltipPlacement;
|
|
17
17
|
zIndex?: number;
|
|
18
18
|
isRound?: boolean;
|
|
19
|
+
dropPosition?: DROP_POSITION;
|
|
20
|
+
menuAligment?: MENU_ALIGNMENT;
|
|
19
21
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o,Fragment as t,jsxs as i}from"react/jsx-runtime";import{
|
|
1
|
+
import{jsx as o,Fragment as t,jsxs as i}from"react/jsx-runtime";import{useState as n}from"react";import{Dropdown as e}from"react-bootstrap";import{COLORS as r}from"../../constants/Theme.js";import{TooltipPlacement as l,CustomisedTooltip as c}from"../tooltips/CustomisedTooltip.js";import s from"../../assets/icons/question-mark.svg.js";import{FAB_POSITION as d,DROP_POSITION as h,MENU_ALIGNMENT as p,FloatingActionButtonOuterContainer as a,StyledDropdown as g,DropdownToggleContainer as m,FloatingActionButtonContainer as u}from"./FloatingActionButton.styles.js";const w=i=>{const{width:n,height:e,color:r,onClick:l,icon:d,tooltipPlacement:h,tooltipText:p,isRound:a,isDropdownOpen:g}=i;return p?o(c,{isTooltipVisible:!g,tooltipContent:o(t,{children:p}),tooltipTriggerContent:o(u,Object.assign({width:n,height:e,color:r,onClick:l,isRound:a},{children:d||o(s,{width:22,height:22})})),tooltipPlacement:h,showOnHover:!0}):o(t,{children:o(u,Object.assign({width:n,height:e,color:r,onClick:l,isRound:a},{children:d||o(s,{width:22,height:22})}))})},b=c=>{const{icon:s,onClick:u,children:b,tooltipText:O,isRound:P=!0,width:T=48,height:j=48,color:C=r.background.inverse,position:k=d.TOP_LEFT,buttonPaddingHorizontal:x=20,buttonPaddingVertical:f=20,zIndex:R=1,tooltipPlacement:D=l.Auto,dropPosition:z=h.DOWN,menuAligment:v=p.END}=c,[A,H]=n(!1);return o(t,{children:o(a,Object.assign({width:T,height:j,color:C,position:k,buttonPaddingHorizontal:x,buttonPaddingVertical:f,zIndex:R},{children:o(g,Object.assign({onToggle:(o,t)=>{H(o)},drop:z,align:v},{children:b?i(t,{children:[o(m,Object.assign({drop:z},{children:o(w,{width:T,height:j,color:C,tooltipPlacement:D,onClick:u,tooltipText:O,icon:s,position:k,isRound:P,isDropdownOpen:A})})),o(e.Menu,{children:b})]}):o(w,{width:T,height:j,color:C,tooltipPlacement:D,onClick:u,tooltipText:O,icon:s,position:k,isRound:P,isDropdownOpen:A})}))}))})};export{b as FloatingActionButton};
|
|
@@ -5,6 +5,18 @@ export declare enum FAB_POSITION {
|
|
|
5
5
|
BOTTOM_LEFT = "bottom left",
|
|
6
6
|
BOTTOM_RIGHT = "botton right"
|
|
7
7
|
}
|
|
8
|
+
export declare enum DROP_POSITION {
|
|
9
|
+
UP = "up",
|
|
10
|
+
UP_CENTERED = "up-centered",
|
|
11
|
+
START = "start",
|
|
12
|
+
END = "end",
|
|
13
|
+
DOWN = "down",
|
|
14
|
+
DOWN_CENTERED = "down-centered"
|
|
15
|
+
}
|
|
16
|
+
export declare enum MENU_ALIGNMENT {
|
|
17
|
+
START = "start",
|
|
18
|
+
END = "end"
|
|
19
|
+
}
|
|
8
20
|
export declare const FloatingActionButtonContainer: import("styled-components").StyledComponent<"div", any, {
|
|
9
21
|
width: number;
|
|
10
22
|
height: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Dropdown as t}from"react-bootstrap";import o from"styled-components";import{COLORS as
|
|
1
|
+
import{Dropdown as t}from"react-bootstrap";import o from"styled-components";import{COLORS as e}from"../../constants/Theme.js";var i,r,n;!function(t){t.TOP_LEFT="top left",t.TOP_RIGHT="top right",t.BOTTOM_LEFT="bottom left",t.BOTTOM_RIGHT="botton right"}(i||(i={})),function(t){t.UP="up",t.UP_CENTERED="up-centered",t.START="start",t.END="end",t.DOWN="down",t.DOWN_CENTERED="down-centered"}(r||(r={})),function(t){t.START="start",t.END="end"}(n||(n={}));const d=o.div`
|
|
2
2
|
width: ${t=>t.width}px;
|
|
3
3
|
height: ${t=>t.height}px;
|
|
4
4
|
background: ${t=>t.color};
|
|
@@ -7,7 +7,7 @@ import{Dropdown as t}from"react-bootstrap";import o from"styled-components";impo
|
|
|
7
7
|
align-items: center;
|
|
8
8
|
cursor: pointer;
|
|
9
9
|
display: flex;
|
|
10
|
-
`,
|
|
10
|
+
`,a=o.div`
|
|
11
11
|
display: flex;
|
|
12
12
|
border-radius: 50%;
|
|
13
13
|
flex-direction: column;
|
|
@@ -16,8 +16,8 @@ import{Dropdown as t}from"react-bootstrap";import o from"styled-components";impo
|
|
|
16
16
|
width: ${t=>t.width}px;
|
|
17
17
|
height: ${t=>t.height}px;
|
|
18
18
|
z-index: ${t=>t.zIndex};
|
|
19
|
-
${t=>t.position===
|
|
20
|
-
`,
|
|
19
|
+
${t=>t.position===i.BOTTOM_RIGHT?`right: ${t.buttonPaddingHorizontal}px; bottom: ${t.buttonPaddingVertical}px`:t.position===i.BOTTOM_LEFT?`left: ${t.buttonPaddingHorizontal}px; bottom: ${t.buttonPaddingVertical}px`:t.position===i.TOP_LEFT?`left: ${t.buttonPaddingHorizontal}px; top: ${t.buttonPaddingVertical}px`:t.position===i.TOP_RIGHT?`right: ${t.buttonPaddingHorizontal}px; top: ${t.buttonPaddingVertical}px`:""};
|
|
20
|
+
`,p=o(t)`
|
|
21
21
|
.filter-container {
|
|
22
22
|
.single-row {
|
|
23
23
|
display: flex;
|
|
@@ -26,7 +26,7 @@ import{Dropdown as t}from"react-bootstrap";import o from"styled-components";impo
|
|
|
26
26
|
justify-content: flex-start;
|
|
27
27
|
gap: 8px;
|
|
28
28
|
padding: 14px;
|
|
29
|
-
border-bottom: 1px solid ${
|
|
29
|
+
border-bottom: 1px solid ${e.stroke.primary};
|
|
30
30
|
|
|
31
31
|
:last-child {
|
|
32
32
|
border-bottom: none !important;
|
|
@@ -35,15 +35,15 @@ import{Dropdown as t}from"react-bootstrap";import o from"styled-components";impo
|
|
|
35
35
|
}
|
|
36
36
|
button {
|
|
37
37
|
border: 1px solid
|
|
38
|
-
${t=>"true"===t.active?
|
|
38
|
+
${t=>"true"===t.active?e.stroke.positive.lightAlt:e.stroke.primary};
|
|
39
39
|
border-radius: 4px;
|
|
40
40
|
display: flex;
|
|
41
41
|
flex-direction: row;
|
|
42
42
|
align-items: center;
|
|
43
43
|
justify-content: space-between;
|
|
44
|
-
padding: 6px
|
|
45
|
-
background: ${t=>"true"===t.active?
|
|
46
|
-
color: ${t=>"true"===t.active?
|
|
44
|
+
padding: 6px 0px;
|
|
45
|
+
background: ${t=>"true"===t.active?e.background.positive.light:e.surface.standard};
|
|
46
|
+
color: ${t=>"true"===t.active?e.content.positive:e.content.primary};
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
.btn-primary:hover,
|
|
@@ -51,8 +51,8 @@ import{Dropdown as t}from"react-bootstrap";import o from"styled-components";impo
|
|
|
51
51
|
.btn-primary:focus,
|
|
52
52
|
.btn-primary.dropdown-toggle,
|
|
53
53
|
.show > .btn-primary.dropdown-toggle {
|
|
54
|
-
color: ${t=>"true"===t.active?
|
|
55
|
-
background-color: ${t=>"true"===t.active?
|
|
54
|
+
color: ${t=>"true"===t.active?e.content.positive:e.content.primary};
|
|
55
|
+
background-color: ${t=>"true"===t.active?e.background.positive.light:"transparent"};
|
|
56
56
|
border: none;
|
|
57
57
|
}
|
|
58
58
|
.btn:focus {
|
|
@@ -61,7 +61,12 @@ import{Dropdown as t}from"react-bootstrap";import o from"styled-components";impo
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
.dropdown-toggle::after {
|
|
64
|
-
border-top: 0.3em solid ${
|
|
64
|
+
border-top: 0.3em solid ${e.content.primary};
|
|
65
|
+
display: none;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.dropdown-toggle::before {
|
|
69
|
+
border-top: 0.3em solid ${e.content.primary};
|
|
65
70
|
display: none;
|
|
66
71
|
}
|
|
67
72
|
.dropdown-menu {
|
|
@@ -70,11 +75,11 @@ import{Dropdown as t}from"react-bootstrap";import o from"styled-components";impo
|
|
|
70
75
|
}
|
|
71
76
|
.dropdown-item:active,
|
|
72
77
|
.dropdown-item:hover {
|
|
73
|
-
color: ${
|
|
78
|
+
color: ${e.content.positive};
|
|
74
79
|
text-decoration: none;
|
|
75
|
-
background-color: ${
|
|
80
|
+
background-color: ${e.background.positive.light};
|
|
76
81
|
}
|
|
77
|
-
`,
|
|
82
|
+
`,s=o(t.Toggle)`
|
|
78
83
|
border-radius: 4px;
|
|
79
84
|
display: flex;
|
|
80
85
|
flex-direction: row;
|
|
@@ -84,4 +89,4 @@ import{Dropdown as t}from"react-bootstrap";import o from"styled-components";impo
|
|
|
84
89
|
font-weight: 400;
|
|
85
90
|
font-size: 14px;
|
|
86
91
|
line-height: 20px;
|
|
87
|
-
`;export{
|
|
92
|
+
`;export{r as DROP_POSITION,s as DropdownToggleContainer,i as FAB_POSITION,d as FloatingActionButtonContainer,a as FloatingActionButtonOuterContainer,n as MENU_ALIGNMENT,p as StyledDropdown};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{useState as
|
|
1
|
+
import{jsx as t,Fragment as o}from"react/jsx-runtime";import{useState as e,useRef as r}from"react";import{OverlayTrigger as n,Tooltip as i}from"react-bootstrap";var a;!function(t){t.Top="top",t.Bottom="bottom",t.Right="right",t.Left="left",t.Auto_Start="auto-start",t.Auto="auto",t.Auto_end="auto-end",t.Top_Start="top-start",t.Top_End="top-end",t.Right_Start="right-start",t.Right_End="right-end",t.Bottom_End="bottom-end",t.Bottom_Start="bottom-start",t.Left_End="left-end",t.Left_Start="left-start"}(a||(a={}));const s=a=>{const{tooltipContent:s,tooltipPlacement:l,tooltipTriggerContent:p,showOnHover:c,isTooltipVisible:d=!0}=a,[m,u]=e(!1),g=r(null);return t(n,Object.assign({placement:l,target:g.current,show:m,overlay:d?t(i,Object.assign({id:`tooltip-${l}`},{children:s})):t(o,{})},{children:t("div",Object.assign({ref:g,onMouseEnter:()=>{c&&u(!0)},onMouseLeave:()=>{c&&u(!1)},onClick:()=>{c||u(!m)}},{children:p}))}),l)};export{s as CustomisedTooltip,a as TooltipPlacement};
|
package/dist/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{BASE_COLORS,COLORS,DEFAULT_THEME,FONTS}from"./constants/Theme.js";export{CheckBox}from"./components/checkBox/CheckBox.js";export{ListItem}from"./components/list-item/ListItem.js";export{Pagination}from"./components/pagination/Pagination.js";export{RadioButton}from"./components/radioButton/RadioButton.js";export{Toaster}from"./components/toaster/Toaster.js";export{Tooltip}from"./components/tooltips/Tooltip.js";export{CustomisedTooltip,TooltipPlacement}from"./components/tooltips/CustomisedTooltip.js";export{Spinner}from"./components/spinner/Spinner.js";export{Stepper}from"./components/stepper/Stepper.js";export{Tag}from"./components/tag/Tag.js";export{IconButton}from"./components/icon-button/IconButton.js";export{FABMenu}from"./components/fab-menu/FABMenu.js";export{FloatingActionButton}from"./components/floating-action-button/FloatingActionButton.js";export{DropdownToggleContainer,FAB_POSITION,FloatingActionButtonContainer,FloatingActionButtonOuterContainer,StyledDropdown}from"./components/floating-action-button/FloatingActionButton.styles.js";export{ImageService}from"./components/image-compress/ImageCompress.js";export{BodyCaption,BodyLarge,BodyPrimary,BodyPrimaryLink,BodySecondary,BodySecondaryLink,BodyTiny,ButtonLarge,ButtonRegular,Display,SubHeading,TitleLarge,TitleMedium,TitleRegular,TitleSmall}from"./components/TypographyStyle.js";export{Button}from"./components/button/Button.js";export{ProgressBarComponent,ProgressCompletedBar}from"./components/progress-bar/ProgressBarComponent.js";
|
|
1
|
+
export{BASE_COLORS,COLORS,DEFAULT_THEME,FONTS}from"./constants/Theme.js";export{CheckBox}from"./components/checkBox/CheckBox.js";export{ListItem}from"./components/list-item/ListItem.js";export{Pagination}from"./components/pagination/Pagination.js";export{RadioButton}from"./components/radioButton/RadioButton.js";export{Toaster}from"./components/toaster/Toaster.js";export{Tooltip}from"./components/tooltips/Tooltip.js";export{CustomisedTooltip,TooltipPlacement}from"./components/tooltips/CustomisedTooltip.js";export{Spinner}from"./components/spinner/Spinner.js";export{Stepper}from"./components/stepper/Stepper.js";export{Tag}from"./components/tag/Tag.js";export{IconButton}from"./components/icon-button/IconButton.js";export{FABMenu}from"./components/fab-menu/FABMenu.js";export{FloatingActionButton}from"./components/floating-action-button/FloatingActionButton.js";export{DROP_POSITION,DropdownToggleContainer,FAB_POSITION,FloatingActionButtonContainer,FloatingActionButtonOuterContainer,MENU_ALIGNMENT,StyledDropdown}from"./components/floating-action-button/FloatingActionButton.styles.js";export{ImageService}from"./components/image-compress/ImageCompress.js";export{BodyCaption,BodyLarge,BodyPrimary,BodyPrimaryLink,BodySecondary,BodySecondaryLink,BodyTiny,ButtonLarge,ButtonRegular,Display,SubHeading,TitleLarge,TitleMedium,TitleRegular,TitleSmall}from"./components/TypographyStyle.js";export{Button}from"./components/button/Button.js";export{ProgressBarComponent,ProgressCompletedBar}from"./components/progress-bar/ProgressBarComponent.js";
|