@bcgov-sso/common-react-components 1.7.0 → 1.15.0
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 +3 -4
- package/dist/cjs/index.js +36 -50
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Accordion/Accordion.d.ts +2 -1
- package/dist/esm/index.js +36 -50
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Accordion/Accordion.d.ts +2 -1
- package/dist/index.d.ts +2 -1
- package/package.json +1 -1
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
declare function Accordionpanel({ title, allOpen, setAllOpen, children }: any): JSX.Element;
|
|
3
3
|
interface Props {
|
|
4
4
|
children: any;
|
|
5
|
+
open?: boolean;
|
|
5
6
|
}
|
|
6
|
-
declare function Accordion({ children }: Props): JSX.Element;
|
|
7
|
+
declare function Accordion({ children, open }: Props): JSX.Element;
|
|
7
8
|
declare namespace Accordion {
|
|
8
9
|
var Panel: typeof Accordionpanel;
|
|
9
10
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -3884,14 +3884,16 @@ const ActionsContainer = styled.div `
|
|
|
3884
3884
|
color: ${SECONDARY_BLUE};
|
|
3885
3885
|
& span {
|
|
3886
3886
|
cursor: pointer;
|
|
3887
|
+
text-decoration: underline;
|
|
3887
3888
|
}
|
|
3888
3889
|
`;
|
|
3889
3890
|
const Divider = styled.span `
|
|
3890
3891
|
border-right: 1px solid black;
|
|
3891
|
-
|
|
3892
|
+
height: 1em;
|
|
3893
|
+
margin: auto 0.5em;
|
|
3892
3894
|
`;
|
|
3893
|
-
function Accordion({ children }) {
|
|
3894
|
-
const [allOpen, setAllOpen] = useState(
|
|
3895
|
+
function Accordion({ children, open = false }) {
|
|
3896
|
+
const [allOpen, setAllOpen] = useState(open);
|
|
3895
3897
|
console.log(LANDING_HEADER_FONT);
|
|
3896
3898
|
const handleClose = () => {
|
|
3897
3899
|
setAllOpen(false);
|
|
@@ -3927,31 +3929,28 @@ const Line = styled.div `
|
|
|
3927
3929
|
border-left: 1px solid #bcbcbc;
|
|
3928
3930
|
margin-left: calc(${(props) => props.circleDiameter} / 2);
|
|
3929
3931
|
`;
|
|
3930
|
-
const
|
|
3931
|
-
|
|
3932
|
-
|
|
3932
|
+
const Title = styled.h2 `
|
|
3933
|
+
margin: auto 0;
|
|
3934
|
+
color: ${(props) => (props.variant === 'primary' ? 'black' : '#777777')};
|
|
3935
|
+
font-size: ${(props) => (props.variant === 'primary' ? '22px' : '18px')};
|
|
3933
3936
|
`;
|
|
3934
|
-
const
|
|
3935
|
-
display:
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
& h2 {
|
|
3940
|
-
margin: 0;
|
|
3941
|
-
color: ${(props) => (props.variant === 'primary' ? 'black' : '#777777')};
|
|
3942
|
-
font-size: ${(props) => (props.variant === 'primary' ? '22px' : '18px')};
|
|
3943
|
-
}
|
|
3937
|
+
const Grid = styled.div `
|
|
3938
|
+
display: grid;
|
|
3939
|
+
grid-template-columns: ${(props) => props.numberedSectionWidth} 1fr;
|
|
3940
|
+
grid-template-rows: ${(props) => props.numberedSectionHeight} 1fr;
|
|
3944
3941
|
`;
|
|
3945
|
-
function NumberedContents({ number, title, children, showLine = true, circleDiameter = '40px', circleMargin = '
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
React.createElement(
|
|
3953
|
-
|
|
3954
|
-
|
|
3942
|
+
function NumberedContents({ number, title, children, showLine = true, circleDiameter = '40px', circleMargin = '5px', variant = 'primary', }) {
|
|
3943
|
+
const circleDiameterInt = Number(circleDiameter.slice(0, -2));
|
|
3944
|
+
const circleMarginInt = Number(circleMargin.slice(0, -2));
|
|
3945
|
+
const numberedSectionWidth = `${circleDiameterInt + circleMarginInt * 2}px`;
|
|
3946
|
+
const numberedSectionHeight = `${circleDiameterInt + circleMarginInt * 2}px`;
|
|
3947
|
+
return (React.createElement(Grid, { numberedSectionWidth: numberedSectionWidth, numberedSectionHeight: numberedSectionHeight },
|
|
3948
|
+
React.createElement(Circle, { variant: variant, circleDiameter: circleDiameter, circleMargin: circleMargin }, number),
|
|
3949
|
+
React.createElement(Title, { variant: variant },
|
|
3950
|
+
title,
|
|
3951
|
+
"\u00A0"),
|
|
3952
|
+
showLine ? React.createElement(Line, { circleDiameter: circleDiameter }) : React.createElement("span", null),
|
|
3953
|
+
React.createElement("div", null, children)));
|
|
3955
3954
|
}
|
|
3956
3955
|
|
|
3957
3956
|
var Button$2 = {};
|
|
@@ -3965,8 +3964,7 @@ function _interopRequireDefault(obj) {
|
|
|
3965
3964
|
};
|
|
3966
3965
|
}
|
|
3967
3966
|
|
|
3968
|
-
module.exports = _interopRequireDefault;
|
|
3969
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
3967
|
+
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
3970
3968
|
}(interopRequireDefault));
|
|
3971
3969
|
|
|
3972
3970
|
function _extends() {
|
|
@@ -8345,7 +8343,7 @@ const styles$1 = {
|
|
|
8345
8343
|
},
|
|
8346
8344
|
secondary: {
|
|
8347
8345
|
button: `
|
|
8348
|
-
|
|
8346
|
+
box-shadow: 0px 0px 0px 3px #1a4dff inset;
|
|
8349
8347
|
color: #1a4dff;
|
|
8350
8348
|
background-color: #ffffff;
|
|
8351
8349
|
|
|
@@ -8375,25 +8373,14 @@ var _typeof = {exports: {}};
|
|
|
8375
8373
|
function _typeof(obj) {
|
|
8376
8374
|
"@babel/helpers - typeof";
|
|
8377
8375
|
|
|
8378
|
-
|
|
8379
|
-
|
|
8380
|
-
|
|
8381
|
-
|
|
8382
|
-
|
|
8383
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
8384
|
-
} else {
|
|
8385
|
-
module.exports = _typeof = function _typeof(obj) {
|
|
8386
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
8387
|
-
};
|
|
8388
|
-
|
|
8389
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
8390
|
-
}
|
|
8391
|
-
|
|
8392
|
-
return _typeof(obj);
|
|
8376
|
+
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
8377
|
+
return typeof obj;
|
|
8378
|
+
} : function (obj) {
|
|
8379
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
8380
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
|
|
8393
8381
|
}
|
|
8394
8382
|
|
|
8395
|
-
module.exports = _typeof;
|
|
8396
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
8383
|
+
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
8397
8384
|
}(_typeof));
|
|
8398
8385
|
|
|
8399
8386
|
(function (module) {
|
|
@@ -8449,8 +8436,7 @@ function _interopRequireWildcard(obj, nodeInterop) {
|
|
|
8449
8436
|
return newObj;
|
|
8450
8437
|
}
|
|
8451
8438
|
|
|
8452
|
-
module.exports = _interopRequireWildcard;
|
|
8453
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
8439
|
+
module.exports = _interopRequireWildcard, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
8454
8440
|
}(interopRequireWildcard));
|
|
8455
8441
|
|
|
8456
8442
|
var _interopRequireDefault = interopRequireDefault.exports;
|
|
@@ -8642,12 +8628,12 @@ const styles = {
|
|
|
8642
8628
|
variant: {
|
|
8643
8629
|
danger: {
|
|
8644
8630
|
container: `
|
|
8645
|
-
background-color: #
|
|
8631
|
+
background-color: #EAC2C1;
|
|
8646
8632
|
`,
|
|
8647
8633
|
},
|
|
8648
8634
|
success: {
|
|
8649
8635
|
container: `
|
|
8650
|
-
background-color: #
|
|
8636
|
+
background-color: #C4D8CF;
|
|
8651
8637
|
`,
|
|
8652
8638
|
},
|
|
8653
8639
|
},
|