@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
package/README.md
CHANGED
|
@@ -6,12 +6,11 @@ See the github pages link for a storybook instance of components.
|
|
|
6
6
|
## Workflow
|
|
7
7
|
|
|
8
8
|
**Storybook**: This repository has branched-based deployments for the storybook instance. To update
|
|
9
|
-
storybook, merge in a feature branch to the `
|
|
9
|
+
storybook, merge in a feature branch to the `main` branch.
|
|
10
10
|
|
|
11
|
-
**NPM**: Components will be published to NPM when creating a new release. To release the components
|
|
12
|
-
on the dev branch:
|
|
11
|
+
**NPM**: Components will be published to NPM when creating a new release. To release the components:
|
|
13
12
|
|
|
14
|
-
1. Merge
|
|
13
|
+
1. Merge your feature branch into `main`. This will automatically bump the package version based on the commits and generate a tag for the release.
|
|
15
14
|
2. Create a new [release](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository) using the generated tag.
|
|
16
15
|
|
|
17
16
|
## Adding Components
|
package/dist/cjs/index.js
CHANGED
|
@@ -3892,14 +3892,16 @@ const ActionsContainer = styled.div `
|
|
|
3892
3892
|
color: ${SECONDARY_BLUE};
|
|
3893
3893
|
& span {
|
|
3894
3894
|
cursor: pointer;
|
|
3895
|
+
text-decoration: underline;
|
|
3895
3896
|
}
|
|
3896
3897
|
`;
|
|
3897
3898
|
const Divider = styled.span `
|
|
3898
3899
|
border-right: 1px solid black;
|
|
3899
|
-
|
|
3900
|
+
height: 1em;
|
|
3901
|
+
margin: auto 0.5em;
|
|
3900
3902
|
`;
|
|
3901
|
-
function Accordion({ children }) {
|
|
3902
|
-
const [allOpen, setAllOpen] = React.useState(
|
|
3903
|
+
function Accordion({ children, open = false }) {
|
|
3904
|
+
const [allOpen, setAllOpen] = React.useState(open);
|
|
3903
3905
|
console.log(LANDING_HEADER_FONT);
|
|
3904
3906
|
const handleClose = () => {
|
|
3905
3907
|
setAllOpen(false);
|
|
@@ -3935,31 +3937,28 @@ const Line = styled.div `
|
|
|
3935
3937
|
border-left: 1px solid #bcbcbc;
|
|
3936
3938
|
margin-left: calc(${(props) => props.circleDiameter} / 2);
|
|
3937
3939
|
`;
|
|
3938
|
-
const
|
|
3939
|
-
|
|
3940
|
-
|
|
3940
|
+
const Title = styled.h2 `
|
|
3941
|
+
margin: auto 0;
|
|
3942
|
+
color: ${(props) => (props.variant === 'primary' ? 'black' : '#777777')};
|
|
3943
|
+
font-size: ${(props) => (props.variant === 'primary' ? '22px' : '18px')};
|
|
3941
3944
|
`;
|
|
3942
|
-
const
|
|
3943
|
-
display:
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
& h2 {
|
|
3948
|
-
margin: 0;
|
|
3949
|
-
color: ${(props) => (props.variant === 'primary' ? 'black' : '#777777')};
|
|
3950
|
-
font-size: ${(props) => (props.variant === 'primary' ? '22px' : '18px')};
|
|
3951
|
-
}
|
|
3945
|
+
const Grid = styled.div `
|
|
3946
|
+
display: grid;
|
|
3947
|
+
grid-template-columns: ${(props) => props.numberedSectionWidth} 1fr;
|
|
3948
|
+
grid-template-rows: ${(props) => props.numberedSectionHeight} 1fr;
|
|
3952
3949
|
`;
|
|
3953
|
-
function NumberedContents({ number, title, children, showLine = true, circleDiameter = '40px', circleMargin = '
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
React__default["default"].createElement(
|
|
3961
|
-
|
|
3962
|
-
|
|
3950
|
+
function NumberedContents({ number, title, children, showLine = true, circleDiameter = '40px', circleMargin = '5px', variant = 'primary', }) {
|
|
3951
|
+
const circleDiameterInt = Number(circleDiameter.slice(0, -2));
|
|
3952
|
+
const circleMarginInt = Number(circleMargin.slice(0, -2));
|
|
3953
|
+
const numberedSectionWidth = `${circleDiameterInt + circleMarginInt * 2}px`;
|
|
3954
|
+
const numberedSectionHeight = `${circleDiameterInt + circleMarginInt * 2}px`;
|
|
3955
|
+
return (React__default["default"].createElement(Grid, { numberedSectionWidth: numberedSectionWidth, numberedSectionHeight: numberedSectionHeight },
|
|
3956
|
+
React__default["default"].createElement(Circle, { variant: variant, circleDiameter: circleDiameter, circleMargin: circleMargin }, number),
|
|
3957
|
+
React__default["default"].createElement(Title, { variant: variant },
|
|
3958
|
+
title,
|
|
3959
|
+
"\u00A0"),
|
|
3960
|
+
showLine ? React__default["default"].createElement(Line, { circleDiameter: circleDiameter }) : React__default["default"].createElement("span", null),
|
|
3961
|
+
React__default["default"].createElement("div", null, children)));
|
|
3963
3962
|
}
|
|
3964
3963
|
|
|
3965
3964
|
var Button$2 = {};
|
|
@@ -3973,8 +3972,7 @@ function _interopRequireDefault(obj) {
|
|
|
3973
3972
|
};
|
|
3974
3973
|
}
|
|
3975
3974
|
|
|
3976
|
-
module.exports = _interopRequireDefault;
|
|
3977
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
3975
|
+
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
3978
3976
|
}(interopRequireDefault));
|
|
3979
3977
|
|
|
3980
3978
|
function _extends() {
|
|
@@ -8353,7 +8351,7 @@ const styles$1 = {
|
|
|
8353
8351
|
},
|
|
8354
8352
|
secondary: {
|
|
8355
8353
|
button: `
|
|
8356
|
-
|
|
8354
|
+
box-shadow: 0px 0px 0px 3px #1a4dff inset;
|
|
8357
8355
|
color: #1a4dff;
|
|
8358
8356
|
background-color: #ffffff;
|
|
8359
8357
|
|
|
@@ -8383,25 +8381,14 @@ var _typeof = {exports: {}};
|
|
|
8383
8381
|
function _typeof(obj) {
|
|
8384
8382
|
"@babel/helpers - typeof";
|
|
8385
8383
|
|
|
8386
|
-
|
|
8387
|
-
|
|
8388
|
-
|
|
8389
|
-
|
|
8390
|
-
|
|
8391
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
8392
|
-
} else {
|
|
8393
|
-
module.exports = _typeof = function _typeof(obj) {
|
|
8394
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
8395
|
-
};
|
|
8396
|
-
|
|
8397
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
8398
|
-
}
|
|
8399
|
-
|
|
8400
|
-
return _typeof(obj);
|
|
8384
|
+
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
8385
|
+
return typeof obj;
|
|
8386
|
+
} : function (obj) {
|
|
8387
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
8388
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
|
|
8401
8389
|
}
|
|
8402
8390
|
|
|
8403
|
-
module.exports = _typeof;
|
|
8404
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
8391
|
+
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
8405
8392
|
}(_typeof));
|
|
8406
8393
|
|
|
8407
8394
|
(function (module) {
|
|
@@ -8457,8 +8444,7 @@ function _interopRequireWildcard(obj, nodeInterop) {
|
|
|
8457
8444
|
return newObj;
|
|
8458
8445
|
}
|
|
8459
8446
|
|
|
8460
|
-
module.exports = _interopRequireWildcard;
|
|
8461
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
8447
|
+
module.exports = _interopRequireWildcard, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
8462
8448
|
}(interopRequireWildcard));
|
|
8463
8449
|
|
|
8464
8450
|
var _interopRequireDefault = interopRequireDefault.exports;
|
|
@@ -8650,12 +8636,12 @@ const styles = {
|
|
|
8650
8636
|
variant: {
|
|
8651
8637
|
danger: {
|
|
8652
8638
|
container: `
|
|
8653
|
-
background-color: #
|
|
8639
|
+
background-color: #EAC2C1;
|
|
8654
8640
|
`,
|
|
8655
8641
|
},
|
|
8656
8642
|
success: {
|
|
8657
8643
|
container: `
|
|
8658
|
-
background-color: #
|
|
8644
|
+
background-color: #C4D8CF;
|
|
8659
8645
|
`,
|
|
8660
8646
|
},
|
|
8661
8647
|
},
|