@elliemae/ds-banner 3.80.0-next.30 → 3.80.0-next.35

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.
Files changed (42) hide show
  1. package/dist/cjs/DSBanner.js +15 -13
  2. package/dist/cjs/DSBanner.js.map +2 -2
  3. package/dist/cjs/DSBannerContent.js +7 -5
  4. package/dist/cjs/DSBannerContent.js.map +2 -2
  5. package/dist/cjs/{exported-related → constants}/index.js +3 -3
  6. package/dist/cjs/constants/index.js.map +7 -0
  7. package/dist/cjs/index.js +5 -5
  8. package/dist/cjs/index.js.map +2 -2
  9. package/dist/cjs/react-desc-prop-types.js +11 -6
  10. package/dist/cjs/react-desc-prop-types.js.map +2 -2
  11. package/dist/cjs/styles.js +23 -23
  12. package/dist/cjs/styles.js.map +2 -2
  13. package/dist/cjs/typescript-testing/slot-props.js.map +1 -1
  14. package/dist/cjs/typescript-testing/typescript-banner-valid.js +2 -1
  15. package/dist/cjs/typescript-testing/typescript-banner-valid.js.map +2 -2
  16. package/dist/cjs/usePageNotice.js +53 -0
  17. package/dist/cjs/usePageNotice.js.map +7 -0
  18. package/dist/esm/DSBanner.js +10 -8
  19. package/dist/esm/DSBanner.js.map +2 -2
  20. package/dist/esm/DSBannerContent.js +5 -3
  21. package/dist/esm/DSBannerContent.js.map +2 -2
  22. package/dist/esm/constants/index.js.map +7 -0
  23. package/dist/esm/index.js +1 -1
  24. package/dist/esm/index.js.map +1 -1
  25. package/dist/esm/react-desc-prop-types.js +8 -3
  26. package/dist/esm/react-desc-prop-types.js.map +2 -2
  27. package/dist/esm/styles.js +2 -2
  28. package/dist/esm/styles.js.map +1 -1
  29. package/dist/esm/typescript-testing/slot-props.js.map +1 -1
  30. package/dist/esm/typescript-testing/typescript-banner-valid.js +2 -1
  31. package/dist/esm/typescript-testing/typescript-banner-valid.js.map +2 -2
  32. package/dist/esm/usePageNotice.js +23 -0
  33. package/dist/esm/usePageNotice.js.map +7 -0
  34. package/dist/types/DSBannerContent.d.ts +2 -0
  35. package/dist/types/{exported-related → constants}/index.d.ts +6 -0
  36. package/dist/types/index.d.ts +1 -1
  37. package/dist/types/react-desc-prop-types.d.ts +2 -1
  38. package/dist/types/usePageNotice.d.ts +11 -0
  39. package/package.json +10 -10
  40. package/dist/cjs/exported-related/index.js.map +0 -7
  41. package/dist/esm/exported-related/index.js.map +0 -7
  42. /package/dist/esm/{exported-related → constants}/index.js +0 -0
@@ -1,7 +1,7 @@
1
1
  import type { MutableRefObject, RefCallback } from 'react';
2
2
  import type { XstyledProps, DSPropTypesSchema, ValidationMap } from '@elliemae/ds-props-helpers';
3
3
  import { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';
4
- import { BANNER_TYPES, DSBannerName, DSBannerSlots } from './exported-related/index.js';
4
+ import { BANNER_TYPES, DSBannerName, DSBannerSlots } from './constants/index.js';
5
5
  export declare namespace DSBannerT {
6
6
  interface ActionRef {
7
7
  focusOnWrapper?: () => void;
@@ -31,6 +31,7 @@ export declare namespace DSBannerT {
31
31
  CustomBody?: React.ComponentType<Record<string, unknown>>;
32
32
  closeBtnRef?: React.MutableRefObject<HTMLButtonElement | null> | RefCallback<HTMLButtonElement>;
33
33
  actionRef?: MutableRefObject<ActionRef>;
34
+ bannerId?: string;
34
35
  }
35
36
  type SlotFunctionArguments = {
36
37
  dsBannerContainer: () => object;
@@ -0,0 +1,11 @@
1
+ import type { DSBannerT } from './react-desc-prop-types.js';
2
+ type AnyAttrs = Record<string, unknown> | null | undefined;
3
+ export declare const usePageNotice: (propsWithDefaults: DSBannerT.InternalProps, originalProps: DSBannerT.Props, globalAttrs: AnyAttrs) => {
4
+ baseId: string;
5
+ contentIds: {
6
+ titleId: string;
7
+ bodyId: string;
8
+ };
9
+ pageNoticeNameProps: Record<string, string>;
10
+ };
11
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-banner",
3
- "version": "3.80.0-next.30",
3
+ "version": "3.80.0-next.35",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Banner",
6
6
  "files": [
@@ -36,18 +36,18 @@
36
36
  "indent": 4
37
37
  },
38
38
  "dependencies": {
39
- "@elliemae/ds-button-v2": "3.80.0-next.30",
40
- "@elliemae/ds-grid": "3.80.0-next.30",
41
- "@elliemae/ds-icons": "3.80.0-next.30",
42
- "@elliemae/ds-props-helpers": "3.80.0-next.30",
43
- "@elliemae/ds-system": "3.80.0-next.30",
44
- "@elliemae/ds-typescript-helpers": "3.80.0-next.30",
45
- "@elliemae/ds-typography": "3.80.0-next.30",
39
+ "@elliemae/ds-button-v2": "3.80.0-next.35",
40
+ "@elliemae/ds-grid": "3.80.0-next.35",
41
+ "@elliemae/ds-icons": "3.80.0-next.35",
42
+ "@elliemae/ds-props-helpers": "3.80.0-next.35",
43
+ "@elliemae/ds-system": "3.80.0-next.35",
44
+ "@elliemae/ds-typescript-helpers": "3.80.0-next.35",
45
+ "@elliemae/ds-typography": "3.80.0-next.35",
46
46
  "uid": "^2.0.2"
47
47
  },
48
48
  "devDependencies": {
49
- "@elliemae/ds-monorepo-devops": "3.80.0-next.30",
50
- "@elliemae/ds-test-utils": "3.80.0-next.30",
49
+ "@elliemae/ds-monorepo-devops": "3.80.0-next.35",
50
+ "@elliemae/ds-test-utils": "3.80.0-next.35",
51
51
  "jest": "^30.0.0",
52
52
  "styled-components": "~5.3.11"
53
53
  },
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/exported-related/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSBannerName = 'DSBanner';\nexport const BANNER_TYPES = {\n INFO: 'info',\n SUCCESS: 'success',\n WARNING: 'warning',\n DANGER: 'danger',\n} as const;\n\nexport const BANNER_BODY_ID = 'ds-banner-body';\n\n// previously this was the exported data-testid object\n// the one marked as // ok are the one that works with the slots convention and works with the slotObjectToDataTestIds function\n// the rest are not compatible and needs manual handling\n// export const DSBannerDatatestid = {\n// CONTAINER: 'ds-banner-container', // ok\n// CUSTOM_CONTAINER: 'ds-banner-custom-container', // ok\n// ACTION_LINK: 'ds-banner-action-link', // ok\n// CLOSE_BUTTON: 'ds-banner-close-button', // ok\n// // From here down are not compatible with the slotObjectToDataTestIds function.\n// INNER_CONTAINER: 'ds-banner',\n// ICON_CONTAINER: 'ds-banner-icon',\n// // from here they were not present but they had an asigned Slot.\n// // TITLE\n// // SUBTITLE\n// };\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\n\nexport const DSBannerSlots = {\n CONTAINER: 'container',\n INNER_CONTAINER: 'inner-container',\n // reserved slot: declared but never rendered. It is part of the public surface (DSBannerDatatestid, dsBannerCustomContainer slot prop)\n // and pinned by DSBanner.data-testid.test.js, so removing it is a breaking change. See KNOWN_INTENTIONAL_DEVIATIONS.md\n CUSTOM_CONTAINER: 'custom-container',\n BODY: 'body',\n TITLE: 'title',\n SUBTITLE: 'subtitle',\n ICON_CONTAINER: 'icon-container',\n ACTION_LINK: 'action-link',\n CLOSE_BUTTON: 'close-button',\n LAYOUT: 'layout',\n LIVE_REGION_PORTAL: 'live-region-portal',\n} as const;\n\n// we are naming this with the ${component_name}_data_testid convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const DSBannerDatatestid = {\n ...(slotObjectToDataTestIds(DSBannerName, DSBannerSlots) as Record<keyof typeof DSBannerSlots, string>),\n // handling the rest of the data-testids that are not compatible with the slotObjectToDataTestIds function manually to avoid breaking changes\n INNER_CONTAINER: 'ds-banner',\n ICON_CONTAINER: 'ds-banner-icon',\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,eAAe;AACrB,MAAM,eAAe;AAAA,EAC1B,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AACV;AAEO,MAAM,iBAAiB;AAoBvB,MAAM,gBAAgB;AAAA,EAC3B,WAAW;AAAA,EACX,iBAAiB;AAAA;AAAA;AAAA,EAGjB,kBAAkB;AAAA,EAClB,MAAM;AAAA,EACN,OAAO;AAAA,EACP,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,oBAAoB;AACtB;AAGO,MAAM,qBAAqB;AAAA,EAChC,OAAI,0CAAwB,cAAc,aAAa;AAAA;AAAA,EAEvD,iBAAiB;AAAA,EACjB,gBAAgB;AAClB;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/exported-related/index.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSBannerName = 'DSBanner';\nexport const BANNER_TYPES = {\n INFO: 'info',\n SUCCESS: 'success',\n WARNING: 'warning',\n DANGER: 'danger',\n} as const;\n\nexport const BANNER_BODY_ID = 'ds-banner-body';\n\n// previously this was the exported data-testid object\n// the one marked as // ok are the one that works with the slots convention and works with the slotObjectToDataTestIds function\n// the rest are not compatible and needs manual handling\n// export const DSBannerDatatestid = {\n// CONTAINER: 'ds-banner-container', // ok\n// CUSTOM_CONTAINER: 'ds-banner-custom-container', // ok\n// ACTION_LINK: 'ds-banner-action-link', // ok\n// CLOSE_BUTTON: 'ds-banner-close-button', // ok\n// // From here down are not compatible with the slotObjectToDataTestIds function.\n// INNER_CONTAINER: 'ds-banner',\n// ICON_CONTAINER: 'ds-banner-icon',\n// // from here they were not present but they had an asigned Slot.\n// // TITLE\n// // SUBTITLE\n// };\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\n\nexport const DSBannerSlots = {\n CONTAINER: 'container',\n INNER_CONTAINER: 'inner-container',\n // reserved slot: declared but never rendered. It is part of the public surface (DSBannerDatatestid, dsBannerCustomContainer slot prop)\n // and pinned by DSBanner.data-testid.test.js, so removing it is a breaking change. See KNOWN_INTENTIONAL_DEVIATIONS.md\n CUSTOM_CONTAINER: 'custom-container',\n BODY: 'body',\n TITLE: 'title',\n SUBTITLE: 'subtitle',\n ICON_CONTAINER: 'icon-container',\n ACTION_LINK: 'action-link',\n CLOSE_BUTTON: 'close-button',\n LAYOUT: 'layout',\n LIVE_REGION_PORTAL: 'live-region-portal',\n} as const;\n\n// we are naming this with the ${component_name}_data_testid convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const DSBannerDatatestid = {\n ...(slotObjectToDataTestIds(DSBannerName, DSBannerSlots) as Record<keyof typeof DSBannerSlots, string>),\n // handling the rest of the data-testids that are not compatible with the slotObjectToDataTestIds function manually to avoid breaking changes\n INNER_CONTAINER: 'ds-banner',\n ICON_CONTAINER: 'ds-banner-icon',\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AAEjC,MAAM,eAAe;AACrB,MAAM,eAAe;AAAA,EAC1B,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AACV;AAEO,MAAM,iBAAiB;AAoBvB,MAAM,gBAAgB;AAAA,EAC3B,WAAW;AAAA,EACX,iBAAiB;AAAA;AAAA;AAAA,EAGjB,kBAAkB;AAAA,EAClB,MAAM;AAAA,EACN,OAAO;AAAA,EACP,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,oBAAoB;AACtB;AAGO,MAAM,qBAAqB;AAAA,EAChC,GAAI,wBAAwB,cAAc,aAAa;AAAA;AAAA,EAEvD,iBAAiB;AAAA,EACjB,gBAAgB;AAClB;",
6
- "names": []
7
- }