@elliemae/ds-side-panel-header 3.33.1 → 3.34.0-next.2
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/SidePanelHeader.js +3 -3
- package/dist/cjs/SidePanelHeader.js.map +2 -2
- package/dist/cjs/styled.js +10 -2
- package/dist/cjs/styled.js.map +2 -2
- package/dist/esm/SidePanelHeader.js +4 -4
- package/dist/esm/SidePanelHeader.js.map +2 -2
- package/dist/esm/styled.js +11 -3
- package/dist/esm/styled.js.map +2 -2
- package/dist/types/styled.d.ts +2 -5
- package/package.json +8 -8
|
@@ -51,9 +51,9 @@ const SidePanelHeader = (props) => {
|
|
|
51
51
|
const getOwnerProps = (0, import_react.useCallback)(() => propsWithDefaults, [propsWithDefaults]);
|
|
52
52
|
const getOwnerPropsArguments = (0, import_react.useCallback)(() => ({}), []);
|
|
53
53
|
const { title, additionalAction, onClose = noop, showClose = true, closeButtonRef = void 0 } = propsWithDefaults;
|
|
54
|
-
const separator = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
54
|
+
const separator = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledSeparatorWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledSeparator, { getOwnerProps, getOwnerPropsArguments }) });
|
|
55
55
|
const cols = ["1fr", "auto", "auto"];
|
|
56
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.Wrapper, { cols, alignItems: "
|
|
56
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.Wrapper, { cols, alignItems: "flex-start", width: "100%", ...globalAttributes, ...xStyledProps, children: [
|
|
57
57
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
58
58
|
import_styled.StyledTitle,
|
|
59
59
|
{
|
|
@@ -64,7 +64,7 @@ const SidePanelHeader = (props) => {
|
|
|
64
64
|
children: title
|
|
65
65
|
}
|
|
66
66
|
),
|
|
67
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, { ml: "xxs",
|
|
67
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, { ml: "xxs", cols: additionalAction ? ["auto", "auto", "auto"] : ["auto"], children: [
|
|
68
68
|
additionalAction && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_grid.Grid, { children: additionalAction }),
|
|
69
69
|
additionalAction && showClose && separator,
|
|
70
70
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_grid.Grid, { children: showClose && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/SidePanelHeader.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { useCallback } from 'react';\nimport {\n describe,\n useMemoMergePropsWithDefault,\n useGetGlobalAttributes,\n useGetXstyledProps,\n} from '@elliemae/ds-props-helpers';\nimport { CloseSmall } from '@elliemae/ds-icons';\nimport { type DSGridT, Grid } from '@elliemae/ds-grid';\nimport { type DSSidePanelHeaderT, defaultProps, propTypes } from './react-desc-prop-types.js';\n\nconst noop = () => {};\n\nimport { StyledSeparator, StyledTitle, Wrapper, StyledCloseButton } from './styled.js';\nconst SidePanelHeader = (props: DSSidePanelHeaderT.Props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault<DSSidePanelHeaderT.InternalProps>(props, defaultProps);\n\n const globalAttributes = useGetGlobalAttributes<DSSidePanelHeaderT.InternalProps, HTMLDivElement, DSGridT.Props>(\n propsWithDefaults,\n );\n const xStyledProps = useGetXstyledProps(propsWithDefaults);\n\n const getOwnerProps = useCallback(() => propsWithDefaults, [propsWithDefaults]);\n const getOwnerPropsArguments = useCallback(() => ({}), []);\n const { title, additionalAction, onClose = noop, showClose = true, closeButtonRef = undefined } = propsWithDefaults;\n const separator = (\n <
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD2BjB;AA3BN,mBAAmC;AACnC,8BAKO;AACP,sBAA2B;AAC3B,qBAAmC;AACnC,mCAAiE;AAIjE,
|
|
4
|
+
"sourcesContent": ["import React, { useCallback } from 'react';\nimport {\n describe,\n useMemoMergePropsWithDefault,\n useGetGlobalAttributes,\n useGetXstyledProps,\n} from '@elliemae/ds-props-helpers';\nimport { CloseSmall } from '@elliemae/ds-icons';\nimport { type DSGridT, Grid } from '@elliemae/ds-grid';\nimport { type DSSidePanelHeaderT, defaultProps, propTypes } from './react-desc-prop-types.js';\n\nconst noop = () => {};\n\nimport { StyledSeparatorWrapper, StyledSeparator, StyledTitle, Wrapper, StyledCloseButton } from './styled.js';\nconst SidePanelHeader = (props: DSSidePanelHeaderT.Props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault<DSSidePanelHeaderT.InternalProps>(props, defaultProps);\n\n const globalAttributes = useGetGlobalAttributes<DSSidePanelHeaderT.InternalProps, HTMLDivElement, DSGridT.Props>(\n propsWithDefaults,\n );\n const xStyledProps = useGetXstyledProps(propsWithDefaults);\n\n const getOwnerProps = useCallback(() => propsWithDefaults, [propsWithDefaults]);\n const getOwnerPropsArguments = useCallback(() => ({}), []);\n const { title, additionalAction, onClose = noop, showClose = true, closeButtonRef = undefined } = propsWithDefaults;\n const separator = (\n <StyledSeparatorWrapper>\n <StyledSeparator getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments} />\n </StyledSeparatorWrapper>\n );\n const cols = ['1fr', 'auto', 'auto'];\n return (\n <Wrapper cols={cols} alignItems=\"flex-start\" width=\"100%\" {...globalAttributes} {...xStyledProps}>\n <StyledTitle\n maxWidth=\"100%\"\n alignItems=\"center\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {title}\n </StyledTitle>\n <Grid ml=\"xxs\" cols={additionalAction ? ['auto', 'auto', 'auto'] : ['auto']}>\n {additionalAction && <Grid>{additionalAction}</Grid>}\n {additionalAction && showClose && separator}\n <Grid>\n {showClose && (\n <StyledCloseButton\n buttonType=\"icon\"\n innerRef={closeButtonRef}\n size=\"m\"\n onClick={onClose}\n data-testid=\"btn-close-slide-panel\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <CloseSmall />\n </StyledCloseButton>\n )}\n </Grid>\n </Grid>\n </Wrapper>\n );\n};\n\nSidePanelHeader.propTypes = propTypes;\nSidePanelHeader.displayName = 'SidePanelHeader';\nconst DSSidePanelHeaderWithSchema = describe(SidePanelHeader);\n\nDSSidePanelHeaderWithSchema.propTypes = propTypes;\n\nexport { SidePanelHeader, DSSidePanelHeaderWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD2BjB;AA3BN,mBAAmC;AACnC,8BAKO;AACP,sBAA2B;AAC3B,qBAAmC;AACnC,mCAAiE;AAIjE,oBAAiG;AAFjG,MAAM,OAAO,MAAM;AAAC;AAGpB,MAAM,kBAAkB,CAAC,UAAoC;AAC3D,QAAM,wBAAoB,sDAA+D,OAAO,yCAAY;AAE5G,QAAM,uBAAmB;AAAA,IACvB;AAAA,EACF;AACA,QAAM,mBAAe,4CAAmB,iBAAiB;AAEzD,QAAM,oBAAgB,0BAAY,MAAM,mBAAmB,CAAC,iBAAiB,CAAC;AAC9E,QAAM,6BAAyB,0BAAY,OAAO,CAAC,IAAI,CAAC,CAAC;AACzD,QAAM,EAAE,OAAO,kBAAkB,UAAU,MAAM,YAAY,MAAM,iBAAiB,OAAU,IAAI;AAClG,QAAM,YACJ,4CAAC,wCACC,sDAAC,iCAAgB,eAA8B,wBAAgD,GACjG;AAEF,QAAM,OAAO,CAAC,OAAO,QAAQ,MAAM;AACnC,SACE,6CAAC,yBAAQ,MAAY,YAAW,cAAa,OAAM,QAAQ,GAAG,kBAAmB,GAAG,cAClF;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,UAAS;AAAA,QACT,YAAW;AAAA,QACX;AAAA,QACA;AAAA,QAEC;AAAA;AAAA,IACH;AAAA,IACA,6CAAC,uBAAK,IAAG,OAAM,MAAM,mBAAmB,CAAC,QAAQ,QAAQ,MAAM,IAAI,CAAC,MAAM,GACvE;AAAA,0BAAoB,4CAAC,uBAAM,4BAAiB;AAAA,MAC5C,oBAAoB,aAAa;AAAA,MAClC,4CAAC,uBACE,uBACC;AAAA,QAAC;AAAA;AAAA,UACC,YAAW;AAAA,UACX,UAAU;AAAA,UACV,MAAK;AAAA,UACL,SAAS;AAAA,UACT,eAAY;AAAA,UACZ;AAAA,UACA;AAAA,UAEA,sDAAC,8BAAW;AAAA;AAAA,MACd,GAEJ;AAAA,OACF;AAAA,KACF;AAEJ;AAEA,gBAAgB,YAAY;AAC5B,gBAAgB,cAAc;AAC9B,MAAM,kCAA8B,kCAAS,eAAe;AAE5D,4BAA4B,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/styled.js
CHANGED
|
@@ -30,6 +30,7 @@ var styled_exports = {};
|
|
|
30
30
|
__export(styled_exports, {
|
|
31
31
|
StyledCloseButton: () => StyledCloseButton,
|
|
32
32
|
StyledSeparator: () => StyledSeparator,
|
|
33
|
+
StyledSeparatorWrapper: () => StyledSeparatorWrapper,
|
|
33
34
|
StyledTitle: () => StyledTitle,
|
|
34
35
|
Wrapper: () => Wrapper
|
|
35
36
|
});
|
|
@@ -47,16 +48,19 @@ const StyledTitle = (0, import_ds_system.styled)(import_ds_grid.Grid, {
|
|
|
47
48
|
font-size: 18px;
|
|
48
49
|
font-weight: ${(props) => props.theme.fontWeights.regular};
|
|
49
50
|
color: ${(props) => props.theme.colors.neutral["700"]};
|
|
50
|
-
|
|
51
|
+
word-break: break-word;
|
|
52
|
+
padding-top: 0.281rem;
|
|
53
|
+
margin-bottom: 0.562rem;
|
|
51
54
|
${import_ds_system.xStyledCommonProps}
|
|
52
55
|
`;
|
|
53
56
|
const Wrapper = (0, import_ds_system.styled)(import_ds_grid.Grid, {
|
|
54
57
|
name: import_SidePanelHeaderDefinitions.DSSidePanelHeaderName,
|
|
55
58
|
slot: import_SidePanelHeaderDefinitions.DSSidePanelHeaderSlots.WRAPPER
|
|
56
59
|
})`
|
|
60
|
+
padding-top: 0.73rem;
|
|
57
61
|
padding-right: ${(props) => props.theme.space.xs};
|
|
58
62
|
padding-left: ${(props) => props.theme.space.xs};
|
|
59
|
-
height: ${(props) => props.theme.space.m};
|
|
63
|
+
min-height: ${(props) => props.theme.space.m};
|
|
60
64
|
border-bottom: ${(props) => (0, import_ds_system.border)(props.theme.colors.neutral["300"])};
|
|
61
65
|
${import_ds_system.xStyledCommonProps}
|
|
62
66
|
`;
|
|
@@ -66,6 +70,10 @@ const StyledCloseButton = (0, import_ds_system.styled)(import_ds_button_v2.DSBut
|
|
|
66
70
|
})`
|
|
67
71
|
${import_ds_system.xStyledCommonProps}
|
|
68
72
|
`;
|
|
73
|
+
const StyledSeparatorWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid)`
|
|
74
|
+
height: 24px;
|
|
75
|
+
margin-top: 0.153rem;
|
|
76
|
+
`;
|
|
69
77
|
const StyledSeparator = import_ds_system.styled.div`
|
|
70
78
|
width: 0;
|
|
71
79
|
height: 100%;
|
package/dist/cjs/styled.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/styled.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { styled, border,
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,
|
|
4
|
+
"sourcesContent": ["import { styled, border, xStyledCommonProps } from '@elliemae/ds-system';\nimport { DSButtonV2 } from '@elliemae/ds-button-v2';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSSidePanelHeaderName, DSSidePanelHeaderSlots } from './SidePanelHeaderDefinitions.js';\n\nexport const StyledTitle = styled(Grid, {\n name: DSSidePanelHeaderName,\n slot: DSSidePanelHeaderSlots.TITLE,\n})`\n margin-right: ${(props) => props.theme.space.xs};\n font-size: 18px;\n font-weight: ${(props) => props.theme.fontWeights.regular};\n color: ${(props) => props.theme.colors.neutral['700']};\n word-break: break-word;\n padding-top: 0.281rem;\n margin-bottom: 0.562rem;\n ${xStyledCommonProps}\n`;\n\nexport const Wrapper = styled(Grid, {\n name: DSSidePanelHeaderName,\n slot: DSSidePanelHeaderSlots.WRAPPER,\n})`\n padding-top: 0.73rem;\n padding-right: ${(props) => props.theme.space.xs};\n padding-left: ${(props) => props.theme.space.xs};\n min-height: ${(props) => props.theme.space.m};\n border-bottom: ${(props) => border(props.theme.colors.neutral['300'])};\n ${xStyledCommonProps}\n`;\n\nexport const StyledCloseButton = styled(DSButtonV2, {\n name: DSSidePanelHeaderName,\n slot: DSSidePanelHeaderSlots.CLOSE_BUTTON,\n})`\n ${xStyledCommonProps}\n`;\n\nexport const StyledSeparatorWrapper = styled(Grid)`\n height: 24px;\n margin-top: 0.153rem;\n`;\n\nexport const StyledSeparator = styled.div`\n width: 0;\n height: 100%;\n margin: 0 ${(props) => props.theme.space.xxs};\n border-left: ${(props) => `${props.theme.colors.neutral[300]} 1px solid`};\n ${xStyledCommonProps}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAmD;AACnD,0BAA2B;AAC3B,qBAAqB;AACrB,wCAA8D;AAEvD,MAAM,kBAAc,yBAAO,qBAAM;AAAA,EACtC,MAAM;AAAA,EACN,MAAM,yDAAuB;AAC/B,CAAC;AAAA,kBACiB,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA,iBAE9B,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,WACzC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA;AAAA;AAAA,IAIlD;AAAA;AAGG,MAAM,cAAU,yBAAO,qBAAM;AAAA,EAClC,MAAM;AAAA,EACN,MAAM,yDAAuB;AAC/B,CAAC;AAAA;AAAA,mBAEkB,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA,kBAC9B,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA,gBAC/B,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA,mBAC1B,CAAC,cAAU,yBAAO,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,IAClE;AAAA;AAGG,MAAM,wBAAoB,yBAAO,gCAAY;AAAA,EAClD,MAAM;AAAA,EACN,MAAM,yDAAuB;AAC/B,CAAC;AAAA,IACG;AAAA;AAGG,MAAM,6BAAyB,yBAAO,mBAAI;AAAA;AAAA;AAAA;AAK1C,MAAM,kBAAkB,wBAAO;AAAA;AAAA;AAAA,cAGxB,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA,iBAC1B,CAAC,UAAU,GAAG,MAAM,MAAM,OAAO,QAAQ,GAAG;AAAA,IACzD;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -12,7 +12,7 @@ import { Grid } from "@elliemae/ds-grid";
|
|
|
12
12
|
import { defaultProps, propTypes } from "./react-desc-prop-types.js";
|
|
13
13
|
const noop = () => {
|
|
14
14
|
};
|
|
15
|
-
import { StyledSeparator, StyledTitle, Wrapper, StyledCloseButton } from "./styled.js";
|
|
15
|
+
import { StyledSeparatorWrapper, StyledSeparator, StyledTitle, Wrapper, StyledCloseButton } from "./styled.js";
|
|
16
16
|
const SidePanelHeader = (props) => {
|
|
17
17
|
const propsWithDefaults = useMemoMergePropsWithDefault(props, defaultProps);
|
|
18
18
|
const globalAttributes = useGetGlobalAttributes(
|
|
@@ -22,9 +22,9 @@ const SidePanelHeader = (props) => {
|
|
|
22
22
|
const getOwnerProps = useCallback(() => propsWithDefaults, [propsWithDefaults]);
|
|
23
23
|
const getOwnerPropsArguments = useCallback(() => ({}), []);
|
|
24
24
|
const { title, additionalAction, onClose = noop, showClose = true, closeButtonRef = void 0 } = propsWithDefaults;
|
|
25
|
-
const separator = /* @__PURE__ */ jsx(
|
|
25
|
+
const separator = /* @__PURE__ */ jsx(StyledSeparatorWrapper, { children: /* @__PURE__ */ jsx(StyledSeparator, { getOwnerProps, getOwnerPropsArguments }) });
|
|
26
26
|
const cols = ["1fr", "auto", "auto"];
|
|
27
|
-
return /* @__PURE__ */ jsxs(Wrapper, { cols, alignItems: "
|
|
27
|
+
return /* @__PURE__ */ jsxs(Wrapper, { cols, alignItems: "flex-start", width: "100%", ...globalAttributes, ...xStyledProps, children: [
|
|
28
28
|
/* @__PURE__ */ jsx(
|
|
29
29
|
StyledTitle,
|
|
30
30
|
{
|
|
@@ -35,7 +35,7 @@ const SidePanelHeader = (props) => {
|
|
|
35
35
|
children: title
|
|
36
36
|
}
|
|
37
37
|
),
|
|
38
|
-
/* @__PURE__ */ jsxs(Grid, { ml: "xxs",
|
|
38
|
+
/* @__PURE__ */ jsxs(Grid, { ml: "xxs", cols: additionalAction ? ["auto", "auto", "auto"] : ["auto"], children: [
|
|
39
39
|
additionalAction && /* @__PURE__ */ jsx(Grid, { children: additionalAction }),
|
|
40
40
|
additionalAction && showClose && separator,
|
|
41
41
|
/* @__PURE__ */ jsx(Grid, { children: showClose && /* @__PURE__ */ jsx(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/SidePanelHeader.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useCallback } from 'react';\nimport {\n describe,\n useMemoMergePropsWithDefault,\n useGetGlobalAttributes,\n useGetXstyledProps,\n} from '@elliemae/ds-props-helpers';\nimport { CloseSmall } from '@elliemae/ds-icons';\nimport { type DSGridT, Grid } from '@elliemae/ds-grid';\nimport { type DSSidePanelHeaderT, defaultProps, propTypes } from './react-desc-prop-types.js';\n\nconst noop = () => {};\n\nimport { StyledSeparator, StyledTitle, Wrapper, StyledCloseButton } from './styled.js';\nconst SidePanelHeader = (props: DSSidePanelHeaderT.Props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault<DSSidePanelHeaderT.InternalProps>(props, defaultProps);\n\n const globalAttributes = useGetGlobalAttributes<DSSidePanelHeaderT.InternalProps, HTMLDivElement, DSGridT.Props>(\n propsWithDefaults,\n );\n const xStyledProps = useGetXstyledProps(propsWithDefaults);\n\n const getOwnerProps = useCallback(() => propsWithDefaults, [propsWithDefaults]);\n const getOwnerPropsArguments = useCallback(() => ({}), []);\n const { title, additionalAction, onClose = noop, showClose = true, closeButtonRef = undefined } = propsWithDefaults;\n const separator = (\n <
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;AC2BjB,cAcA,YAdA;AA3BN,SAAgB,mBAAmB;AACnC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,kBAAkB;AAC3B,SAAuB,YAAY;AACnC,SAAkC,cAAc,iBAAiB;AAEjE,MAAM,OAAO,MAAM;AAAC;AAEpB,SAAS,iBAAiB,aAAa,SAAS,yBAAyB;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useCallback } from 'react';\nimport {\n describe,\n useMemoMergePropsWithDefault,\n useGetGlobalAttributes,\n useGetXstyledProps,\n} from '@elliemae/ds-props-helpers';\nimport { CloseSmall } from '@elliemae/ds-icons';\nimport { type DSGridT, Grid } from '@elliemae/ds-grid';\nimport { type DSSidePanelHeaderT, defaultProps, propTypes } from './react-desc-prop-types.js';\n\nconst noop = () => {};\n\nimport { StyledSeparatorWrapper, StyledSeparator, StyledTitle, Wrapper, StyledCloseButton } from './styled.js';\nconst SidePanelHeader = (props: DSSidePanelHeaderT.Props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault<DSSidePanelHeaderT.InternalProps>(props, defaultProps);\n\n const globalAttributes = useGetGlobalAttributes<DSSidePanelHeaderT.InternalProps, HTMLDivElement, DSGridT.Props>(\n propsWithDefaults,\n );\n const xStyledProps = useGetXstyledProps(propsWithDefaults);\n\n const getOwnerProps = useCallback(() => propsWithDefaults, [propsWithDefaults]);\n const getOwnerPropsArguments = useCallback(() => ({}), []);\n const { title, additionalAction, onClose = noop, showClose = true, closeButtonRef = undefined } = propsWithDefaults;\n const separator = (\n <StyledSeparatorWrapper>\n <StyledSeparator getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments} />\n </StyledSeparatorWrapper>\n );\n const cols = ['1fr', 'auto', 'auto'];\n return (\n <Wrapper cols={cols} alignItems=\"flex-start\" width=\"100%\" {...globalAttributes} {...xStyledProps}>\n <StyledTitle\n maxWidth=\"100%\"\n alignItems=\"center\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {title}\n </StyledTitle>\n <Grid ml=\"xxs\" cols={additionalAction ? ['auto', 'auto', 'auto'] : ['auto']}>\n {additionalAction && <Grid>{additionalAction}</Grid>}\n {additionalAction && showClose && separator}\n <Grid>\n {showClose && (\n <StyledCloseButton\n buttonType=\"icon\"\n innerRef={closeButtonRef}\n size=\"m\"\n onClick={onClose}\n data-testid=\"btn-close-slide-panel\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <CloseSmall />\n </StyledCloseButton>\n )}\n </Grid>\n </Grid>\n </Wrapper>\n );\n};\n\nSidePanelHeader.propTypes = propTypes;\nSidePanelHeader.displayName = 'SidePanelHeader';\nconst DSSidePanelHeaderWithSchema = describe(SidePanelHeader);\n\nDSSidePanelHeaderWithSchema.propTypes = propTypes;\n\nexport { SidePanelHeader, DSSidePanelHeaderWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC2BjB,cAcA,YAdA;AA3BN,SAAgB,mBAAmB;AACnC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,kBAAkB;AAC3B,SAAuB,YAAY;AACnC,SAAkC,cAAc,iBAAiB;AAEjE,MAAM,OAAO,MAAM;AAAC;AAEpB,SAAS,wBAAwB,iBAAiB,aAAa,SAAS,yBAAyB;AACjG,MAAM,kBAAkB,CAAC,UAAoC;AAC3D,QAAM,oBAAoB,6BAA+D,OAAO,YAAY;AAE5G,QAAM,mBAAmB;AAAA,IACvB;AAAA,EACF;AACA,QAAM,eAAe,mBAAmB,iBAAiB;AAEzD,QAAM,gBAAgB,YAAY,MAAM,mBAAmB,CAAC,iBAAiB,CAAC;AAC9E,QAAM,yBAAyB,YAAY,OAAO,CAAC,IAAI,CAAC,CAAC;AACzD,QAAM,EAAE,OAAO,kBAAkB,UAAU,MAAM,YAAY,MAAM,iBAAiB,OAAU,IAAI;AAClG,QAAM,YACJ,oBAAC,0BACC,8BAAC,mBAAgB,eAA8B,wBAAgD,GACjG;AAEF,QAAM,OAAO,CAAC,OAAO,QAAQ,MAAM;AACnC,SACE,qBAAC,WAAQ,MAAY,YAAW,cAAa,OAAM,QAAQ,GAAG,kBAAmB,GAAG,cAClF;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,UAAS;AAAA,QACT,YAAW;AAAA,QACX;AAAA,QACA;AAAA,QAEC;AAAA;AAAA,IACH;AAAA,IACA,qBAAC,QAAK,IAAG,OAAM,MAAM,mBAAmB,CAAC,QAAQ,QAAQ,MAAM,IAAI,CAAC,MAAM,GACvE;AAAA,0BAAoB,oBAAC,QAAM,4BAAiB;AAAA,MAC5C,oBAAoB,aAAa;AAAA,MAClC,oBAAC,QACE,uBACC;AAAA,QAAC;AAAA;AAAA,UACC,YAAW;AAAA,UACX,UAAU;AAAA,UACV,MAAK;AAAA,UACL,SAAS;AAAA,UACT,eAAY;AAAA,UACZ;AAAA,UACA;AAAA,UAEA,8BAAC,cAAW;AAAA;AAAA,MACd,GAEJ;AAAA,OACF;AAAA,KACF;AAEJ;AAEA,gBAAgB,YAAY;AAC5B,gBAAgB,cAAc;AAC9B,MAAM,8BAA8B,SAAS,eAAe;AAE5D,4BAA4B,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/styled.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { styled, border,
|
|
2
|
+
import { styled, border, xStyledCommonProps } from "@elliemae/ds-system";
|
|
3
3
|
import { DSButtonV2 } from "@elliemae/ds-button-v2";
|
|
4
4
|
import { Grid } from "@elliemae/ds-grid";
|
|
5
5
|
import { DSSidePanelHeaderName, DSSidePanelHeaderSlots } from "./SidePanelHeaderDefinitions.js";
|
|
@@ -11,16 +11,19 @@ const StyledTitle = styled(Grid, {
|
|
|
11
11
|
font-size: 18px;
|
|
12
12
|
font-weight: ${(props) => props.theme.fontWeights.regular};
|
|
13
13
|
color: ${(props) => props.theme.colors.neutral["700"]};
|
|
14
|
-
|
|
14
|
+
word-break: break-word;
|
|
15
|
+
padding-top: 0.281rem;
|
|
16
|
+
margin-bottom: 0.562rem;
|
|
15
17
|
${xStyledCommonProps}
|
|
16
18
|
`;
|
|
17
19
|
const Wrapper = styled(Grid, {
|
|
18
20
|
name: DSSidePanelHeaderName,
|
|
19
21
|
slot: DSSidePanelHeaderSlots.WRAPPER
|
|
20
22
|
})`
|
|
23
|
+
padding-top: 0.73rem;
|
|
21
24
|
padding-right: ${(props) => props.theme.space.xs};
|
|
22
25
|
padding-left: ${(props) => props.theme.space.xs};
|
|
23
|
-
height: ${(props) => props.theme.space.m};
|
|
26
|
+
min-height: ${(props) => props.theme.space.m};
|
|
24
27
|
border-bottom: ${(props) => border(props.theme.colors.neutral["300"])};
|
|
25
28
|
${xStyledCommonProps}
|
|
26
29
|
`;
|
|
@@ -30,6 +33,10 @@ const StyledCloseButton = styled(DSButtonV2, {
|
|
|
30
33
|
})`
|
|
31
34
|
${xStyledCommonProps}
|
|
32
35
|
`;
|
|
36
|
+
const StyledSeparatorWrapper = styled(Grid)`
|
|
37
|
+
height: 24px;
|
|
38
|
+
margin-top: 0.153rem;
|
|
39
|
+
`;
|
|
33
40
|
const StyledSeparator = styled.div`
|
|
34
41
|
width: 0;
|
|
35
42
|
height: 100%;
|
|
@@ -40,6 +47,7 @@ const StyledSeparator = styled.div`
|
|
|
40
47
|
export {
|
|
41
48
|
StyledCloseButton,
|
|
42
49
|
StyledSeparator,
|
|
50
|
+
StyledSeparatorWrapper,
|
|
43
51
|
StyledTitle,
|
|
44
52
|
Wrapper
|
|
45
53
|
};
|
package/dist/esm/styled.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/styled.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled, border,
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,QAAQ,QAAQ,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled, border, xStyledCommonProps } from '@elliemae/ds-system';\nimport { DSButtonV2 } from '@elliemae/ds-button-v2';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSSidePanelHeaderName, DSSidePanelHeaderSlots } from './SidePanelHeaderDefinitions.js';\n\nexport const StyledTitle = styled(Grid, {\n name: DSSidePanelHeaderName,\n slot: DSSidePanelHeaderSlots.TITLE,\n})`\n margin-right: ${(props) => props.theme.space.xs};\n font-size: 18px;\n font-weight: ${(props) => props.theme.fontWeights.regular};\n color: ${(props) => props.theme.colors.neutral['700']};\n word-break: break-word;\n padding-top: 0.281rem;\n margin-bottom: 0.562rem;\n ${xStyledCommonProps}\n`;\n\nexport const Wrapper = styled(Grid, {\n name: DSSidePanelHeaderName,\n slot: DSSidePanelHeaderSlots.WRAPPER,\n})`\n padding-top: 0.73rem;\n padding-right: ${(props) => props.theme.space.xs};\n padding-left: ${(props) => props.theme.space.xs};\n min-height: ${(props) => props.theme.space.m};\n border-bottom: ${(props) => border(props.theme.colors.neutral['300'])};\n ${xStyledCommonProps}\n`;\n\nexport const StyledCloseButton = styled(DSButtonV2, {\n name: DSSidePanelHeaderName,\n slot: DSSidePanelHeaderSlots.CLOSE_BUTTON,\n})`\n ${xStyledCommonProps}\n`;\n\nexport const StyledSeparatorWrapper = styled(Grid)`\n height: 24px;\n margin-top: 0.153rem;\n`;\n\nexport const StyledSeparator = styled.div`\n width: 0;\n height: 100%;\n margin: 0 ${(props) => props.theme.space.xxs};\n border-left: ${(props) => `${props.theme.colors.neutral[300]} 1px solid`};\n ${xStyledCommonProps}\n`;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,QAAQ,QAAQ,0BAA0B;AACnD,SAAS,kBAAkB;AAC3B,SAAS,YAAY;AACrB,SAAS,uBAAuB,8BAA8B;AAEvD,MAAM,cAAc,OAAO,MAAM;AAAA,EACtC,MAAM;AAAA,EACN,MAAM,uBAAuB;AAC/B,CAAC;AAAA,kBACiB,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA,iBAE9B,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,WACzC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA;AAAA;AAAA,IAIlD;AAAA;AAGG,MAAM,UAAU,OAAO,MAAM;AAAA,EAClC,MAAM;AAAA,EACN,MAAM,uBAAuB;AAC/B,CAAC;AAAA;AAAA,mBAEkB,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA,kBAC9B,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA,gBAC/B,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA,mBAC1B,CAAC,UAAU,OAAO,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,IAClE;AAAA;AAGG,MAAM,oBAAoB,OAAO,YAAY;AAAA,EAClD,MAAM;AAAA,EACN,MAAM,uBAAuB;AAC/B,CAAC;AAAA,IACG;AAAA;AAGG,MAAM,yBAAyB,OAAO,IAAI;AAAA;AAAA;AAAA;AAK1C,MAAM,kBAAkB,OAAO;AAAA;AAAA;AAAA,cAGxB,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA,iBAC1B,CAAC,UAAU,GAAG,MAAM,MAAM,OAAO,QAAQ,GAAG;AAAA,IACzD;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/types/styled.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const StyledTitle: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme,
|
|
3
|
-
width?: string | undefined;
|
|
4
|
-
} & {
|
|
5
|
-
theme: import("@elliemae/pui-theme").Theme;
|
|
6
|
-
} & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>>, never>;
|
|
2
|
+
export declare const StyledTitle: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, import("@xstyled/util").Props<import("@xstyled/system").Theme> & import("@xstyled/system").TypographyProps<import("@xstyled/system").Theme> & import("@elliemae/ds-system").BackgroundProps & import("@elliemae/ds-system").SpaceProps & import("@xstyled/system").BoxShadowProps<import("@xstyled/system").Theme> & import("@xstyled/system").FlexboxesProps<import("@xstyled/system").Theme> & import("@xstyled/system").LayoutProps<import("@xstyled/system").Theme> & import("@elliemae/ds-system").ColorProps & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>>, never>;
|
|
7
3
|
export declare const Wrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, import("@xstyled/util").Props<import("@xstyled/system").Theme> & import("@xstyled/system").TypographyProps<import("@xstyled/system").Theme> & import("@elliemae/ds-system").BackgroundProps & import("@elliemae/ds-system").SpaceProps & import("@xstyled/system").BoxShadowProps<import("@xstyled/system").Theme> & import("@xstyled/system").FlexboxesProps<import("@xstyled/system").Theme> & import("@xstyled/system").LayoutProps<import("@xstyled/system").Theme> & import("@elliemae/ds-system").ColorProps & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>>, never>;
|
|
8
4
|
export declare const StyledCloseButton: import("styled-components").StyledComponent<import("react").ComponentType<import("@elliemae/ds-button-v2").DSButtonV2T.Props>, import("@elliemae/ds-system").Theme, import("@xstyled/util").Props<import("@xstyled/system").Theme> & import("@xstyled/system").TypographyProps<import("@xstyled/system").Theme> & import("@elliemae/ds-system").BackgroundProps & import("@elliemae/ds-system").SpaceProps & import("@xstyled/system").BoxShadowProps<import("@xstyled/system").Theme> & import("@xstyled/system").FlexboxesProps<import("@xstyled/system").Theme> & import("@xstyled/system").LayoutProps<import("@xstyled/system").Theme> & import("@elliemae/ds-system").ColorProps & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ComponentType<import("@elliemae/ds-button-v2").DSButtonV2T.Props>>, never>;
|
|
5
|
+
export declare const StyledSeparatorWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>>, never>;
|
|
9
6
|
export declare const StyledSeparator: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, import("@xstyled/util").Props<import("@xstyled/system").Theme> & import("@xstyled/system").TypographyProps<import("@xstyled/system").Theme> & import("@elliemae/ds-system").BackgroundProps & import("@elliemae/ds-system").SpaceProps & import("@xstyled/system").BoxShadowProps<import("@xstyled/system").Theme> & import("@xstyled/system").FlexboxesProps<import("@xstyled/system").Theme> & import("@xstyled/system").LayoutProps<import("@xstyled/system").Theme> & import("@elliemae/ds-system").ColorProps & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-side-panel-header",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.34.0-next.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Side Panel Header",
|
|
6
6
|
"files": [
|
|
@@ -56,19 +56,19 @@
|
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@elliemae/pui-theme": "~2.9.3",
|
|
59
|
-
"@elliemae/ds-button-v2": "3.
|
|
60
|
-
"@elliemae/ds-grid": "3.
|
|
61
|
-
"@elliemae/ds-icons": "3.
|
|
62
|
-
"@elliemae/ds-props-helpers": "3.
|
|
63
|
-
"@elliemae/ds-system": "3.
|
|
64
|
-
"@elliemae/ds-utilities": "3.
|
|
59
|
+
"@elliemae/ds-button-v2": "3.34.0-next.2",
|
|
60
|
+
"@elliemae/ds-grid": "3.34.0-next.2",
|
|
61
|
+
"@elliemae/ds-icons": "3.34.0-next.2",
|
|
62
|
+
"@elliemae/ds-props-helpers": "3.34.0-next.2",
|
|
63
|
+
"@elliemae/ds-system": "3.34.0-next.2",
|
|
64
|
+
"@elliemae/ds-utilities": "3.34.0-next.2"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@elliemae/pui-cli": "~9.0.0-next.31",
|
|
68
68
|
"@xstyled/system": "3.7.0",
|
|
69
69
|
"@xstyled/util": "3.7.0",
|
|
70
70
|
"styled-components": "~5.3.9",
|
|
71
|
-
"@elliemae/ds-monorepo-devops": "3.
|
|
71
|
+
"@elliemae/ds-monorepo-devops": "3.34.0-next.2"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
74
|
"lodash": "^4.17.21",
|