@elliemae/ds-accordion 3.0.0-next.9 → 3.0.1

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 (72) hide show
  1. package/dist/cjs/DSAccordion.js +14 -21
  2. package/dist/cjs/DSAccordion.js.map +2 -2
  3. package/dist/cjs/DSAccordionCTX.js +10 -26
  4. package/dist/cjs/DSAccordionCTX.js.map +2 -2
  5. package/dist/cjs/config/useAccordion.js +11 -18
  6. package/dist/cjs/config/useAccordion.js.map +2 -2
  7. package/dist/cjs/config/useAccordionRefs.js +9 -16
  8. package/dist/cjs/config/useAccordionRefs.js.map +2 -2
  9. package/dist/cjs/defaultProps.js +13 -19
  10. package/dist/cjs/defaultProps.js.map +2 -2
  11. package/dist/cjs/exported-related/DSAccordionDatatestid.js +35 -0
  12. package/dist/cjs/{DSAccordionDatatestid.js.map → exported-related/DSAccordionDatatestid.js.map} +2 -2
  13. package/dist/cjs/exported-related/index.js +23 -0
  14. package/dist/cjs/exported-related/index.js.map +7 -0
  15. package/dist/cjs/exported-related/theming.js +47 -0
  16. package/dist/cjs/exported-related/theming.js.map +7 -0
  17. package/dist/cjs/index.js +13 -18
  18. package/dist/cjs/index.js.map +3 -3
  19. package/dist/cjs/parts/accordionContent/AccordionContent.js +30 -24
  20. package/dist/cjs/parts/accordionContent/AccordionContent.js.map +2 -2
  21. package/dist/cjs/parts/accordionContent/styles.js +38 -0
  22. package/dist/cjs/parts/accordionContent/styles.js.map +7 -0
  23. package/dist/cjs/parts/accordionItem/DSAccordionItem.js +70 -57
  24. package/dist/cjs/parts/accordionItem/DSAccordionItem.js.map +2 -2
  25. package/dist/cjs/parts/accordionItem/styles.js +101 -47
  26. package/dist/cjs/parts/accordionItem/styles.js.map +2 -2
  27. package/dist/cjs/parts/accordionItem/useAccordionItem.js +15 -16
  28. package/dist/cjs/parts/accordionItem/useAccordionItem.js.map +2 -2
  29. package/dist/cjs/propTypes.js +26 -33
  30. package/dist/cjs/propTypes.js.map +3 -3
  31. package/dist/cjs/react-desc-prop-types.js +67 -0
  32. package/dist/cjs/react-desc-prop-types.js.map +7 -0
  33. package/dist/cjs/sharedTypes.js +20 -0
  34. package/dist/cjs/sharedTypes.js.map +7 -0
  35. package/dist/esm/DSAccordion.js +3 -3
  36. package/dist/esm/DSAccordion.js.map +2 -2
  37. package/dist/esm/DSAccordionCTX.js +1 -10
  38. package/dist/esm/DSAccordionCTX.js.map +2 -2
  39. package/dist/esm/config/useAccordion.js +1 -1
  40. package/dist/esm/config/useAccordion.js.map +2 -2
  41. package/dist/esm/config/useAccordionRefs.js.map +2 -2
  42. package/dist/esm/defaultProps.js +4 -3
  43. package/dist/esm/defaultProps.js.map +2 -2
  44. package/dist/esm/{DSAccordionDatatestid.js → exported-related/DSAccordionDatatestid.js} +0 -0
  45. package/dist/esm/{DSAccordionDatatestid.js.map → exported-related/DSAccordionDatatestid.js.map} +2 -2
  46. package/dist/esm/exported-related/index.js +4 -0
  47. package/dist/esm/exported-related/index.js.map +7 -0
  48. package/dist/esm/exported-related/theming.js +25 -0
  49. package/dist/esm/exported-related/theming.js.map +7 -0
  50. package/dist/esm/index.js +1 -0
  51. package/dist/esm/index.js.map +3 -3
  52. package/dist/esm/parts/accordionContent/AccordionContent.js +21 -8
  53. package/dist/esm/parts/accordionContent/AccordionContent.js.map +2 -2
  54. package/dist/esm/parts/accordionContent/styles.js +16 -0
  55. package/dist/esm/parts/accordionContent/styles.js.map +7 -0
  56. package/dist/esm/parts/accordionItem/DSAccordionItem.js +66 -39
  57. package/dist/esm/parts/accordionItem/DSAccordionItem.js.map +2 -2
  58. package/dist/esm/parts/accordionItem/styles.js +92 -31
  59. package/dist/esm/parts/accordionItem/styles.js.map +2 -2
  60. package/dist/esm/parts/accordionItem/useAccordionItem.js +6 -0
  61. package/dist/esm/parts/accordionItem/useAccordionItem.js.map +2 -2
  62. package/dist/esm/propTypes.js +1 -1
  63. package/dist/esm/propTypes.js.map +3 -3
  64. package/dist/esm/react-desc-prop-types.js +47 -0
  65. package/dist/esm/react-desc-prop-types.js.map +7 -0
  66. package/dist/esm/sharedTypes.js +2 -0
  67. package/dist/esm/{DSAccordionTypes.js.map → sharedTypes.js.map} +0 -0
  68. package/package.json +19 -19
  69. package/dist/cjs/DSAccordionDatatestid.js +0 -42
  70. package/dist/cjs/DSAccordionTypes.js +0 -27
  71. package/dist/cjs/DSAccordionTypes.js.map +0 -7
  72. package/dist/esm/DSAccordionTypes.js +0 -2
@@ -4,27 +4,20 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
7
  var __export = (target, all) => {
9
8
  for (var name in all)
10
9
  __defProp(target, name, { get: all[name], enumerable: true });
11
10
  };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
16
  }
18
- return target;
17
+ return to;
19
18
  };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
21
  var styles_exports = {};
29
22
  __export(styles_exports, {
30
23
  StyledItemAddon: () => StyledItemAddon,
@@ -35,33 +28,53 @@ __export(styles_exports, {
35
28
  StyledItemHeaderContainer: () => StyledItemHeaderContainer,
36
29
  StyledItemTitles: () => StyledItemTitles,
37
30
  StyledPrimaryTitle: () => StyledPrimaryTitle,
38
- StyledSecondaryTitle: () => StyledSecondaryTitle
31
+ StyledSecondaryTitle: () => StyledSecondaryTitle,
32
+ StyledTooltipContent: () => StyledTooltipContent
39
33
  });
34
+ module.exports = __toCommonJS(styles_exports);
40
35
  var React = __toESM(require("react"));
41
- var import_styled_components = __toESM(require("styled-components"));
42
- const StyledItemContainer = import_styled_components.default.div`
36
+ var import_ds_system = require("@elliemae/ds-system");
37
+ var import_styled_components = require("@xstyled/styled-components");
38
+ var import_exported_related = require("../../exported-related");
39
+ const paddingSetter = ({ isDSMobile, withSecondaryTitle }) => {
40
+ if (isDSMobile)
41
+ return import_ds_system.css`
42
+ padding: 13px 0;
43
+ `;
44
+ if (withSecondaryTitle)
45
+ return import_ds_system.css`
46
+ padding: 6px 0;
47
+ `;
48
+ return import_ds_system.css`
49
+ padding: 7px 0;
50
+ `;
51
+ };
52
+ const StyledItemContainer = (0, import_ds_system.styled)("div", { name: import_exported_related.COMPONENT_NAME, slot: import_exported_related.slots.ITEM.CONTAINER })`
43
53
  display: grid;
44
54
  grid-template-rows: auto auto;
45
55
  border-bottom: 1px solid ${({ theme }) => theme.colors.neutral[200]};
46
56
  align-items: center;
57
+ min-width: 240px;
58
+ ${import_styled_components.layout}
59
+ ${import_styled_components.sizing}
60
+ ${import_styled_components.space}
47
61
  `;
48
- const StyledItemHeader = import_styled_components.default.button`
62
+ const StyledItemHeader = (0, import_ds_system.styled)("button", {
63
+ name: import_exported_related.COMPONENT_NAME,
64
+ slot: import_exported_related.slots.ITEM.HEADER.CONTAINER
65
+ })`
49
66
  display: flex;
50
- height: ${({ theme, withSecondaryTitle }) => withSecondaryTitle ? theme.space.m : theme.space.s};
67
+ min-height: ${({ theme, withSecondaryTitle, isDSMobile }) => isDSMobile ? `44px` : `${withSecondaryTitle ? theme.space.m : theme.space.s}`};
51
68
  width: 100%;
52
69
  align-items: center;
53
70
  border: none;
54
71
  outline: none;
55
72
  background: none;
56
-
57
73
  &:hover {
58
74
  cursor: ${({ disabled }) => disabled ? "not-allowed" : "pointer"};
59
75
  }
60
-
61
76
  padding: ${({ isDSMobile }) => isDSMobile ? `0 16px` : `0`};
62
-
63
77
  ${({ isDSMobile }) => isDSMobile ? `flex-direction: row-reverse;` : ``}
64
-
65
78
  &:focus {
66
79
  &:after {
67
80
  position: absolute;
@@ -76,14 +89,18 @@ const StyledItemHeader = import_styled_components.default.button`
76
89
  }
77
90
  }
78
91
  `;
79
- const StyledItemContent = import_styled_components.default.div`
80
- margin: ${({ isDSMobile }) => isDSMobile ? `16px 16px 24px 16px` : `16px 16px 16px 32px`};
92
+ const StyledItemContent = (0, import_ds_system.styled)("div", {
93
+ name: import_exported_related.COMPONENT_NAME,
94
+ slot: import_exported_related.slots.ITEM.CONTENT.CONTAINER
95
+ })`
96
+ margin: ${({ isDSMobile }) => isDSMobile ? `3px 16px 24px 16px` : "16px 20px"};
81
97
  grid-column: 1/2;
82
98
  `;
83
- const StyledItemAddon = import_styled_components.default.div`
84
- ${({ theme, isDSMobile }) => !isDSMobile ? `padding: 0 ${theme.space.xxs};` : ``}
99
+ const StyledItemAddon = (0, import_ds_system.styled)("div", {
100
+ name: import_exported_related.COMPONENT_NAME,
101
+ slot: import_exported_related.slots.ITEM.HEADER.ADDON
102
+ })`
85
103
  height: 100%;
86
- width: ${({ theme }) => theme.space.s};
87
104
  display: grid;
88
105
  place-items: center;
89
106
 
@@ -91,53 +108,90 @@ const StyledItemAddon = import_styled_components.default.div`
91
108
  fill: ${({ disabled, theme }) => disabled ? theme.colors.neutral[200] : theme.colors.brand[800]};
92
109
  }
93
110
  `;
94
- const StyledItemTitles = import_styled_components.default.div`
111
+ const StyledItemTitles = (0, import_ds_system.styled)("div", {
112
+ name: import_exported_related.COMPONENT_NAME,
113
+ slot: import_exported_related.slots.ITEM.HEADER.TITLE_CONTAINER
114
+ })`
95
115
  display: grid;
116
+ grid-gap: ${({ theme }) => theme.space.xxxs};
117
+ ${paddingSetter}
96
118
  grid-template-columns: 100%;
97
119
  width: 100%;
98
120
  align-content: center;
99
121
  `;
100
- const StyledPrimaryTitle = import_styled_components.default.div`
122
+ const StyledPrimaryTitle = (0, import_ds_system.styled)("div", {
123
+ name: import_exported_related.COMPONENT_NAME,
124
+ slot: import_exported_related.slots.ITEM.HEADER.PRIMARY_TITLE
125
+ })`
101
126
  margin: 0;
102
127
  font-size: 16px;
103
- color: ${({ disabled, theme }) => disabled ? theme.colors.neutral[200] : theme.colors.neutral[700]};
104
- font-weight: ${({ theme, isDSMobile }) => isDSMobile ? theme.fontWeights.regular : theme.fontWeights.regular};
128
+ line-height: 1.125;
129
+ text-align: left;
105
130
  text-overflow: ellipsis;
106
- overflow: hidden;
107
- height: ${({ theme }) => theme.space.xs};
131
+ min-height: ${({ theme }) => theme.space.xs};
132
+ color: ${({ disabled, theme }) => disabled ? theme.colors.neutral[500] : theme.colors.neutral[700]};
133
+ font-weight: ${({ theme, isDSMobile }) => isDSMobile ? theme.fontWeights.semibold : theme.fontWeights.regular};
134
+ ${({ selected }) => selected ? `word-break: break-word;` : `
135
+ overflow: hidden;
136
+ white-space: nowrap;
137
+ `};
108
138
  width: 100%;
109
- text-align: left;
110
139
  display: block;
111
- white-space: nowrap;
112
140
  `;
113
- const StyledSecondaryTitle = import_styled_components.default.span`
141
+ const StyledSecondaryTitle = (0, import_ds_system.styled)("span", {
142
+ name: import_exported_related.COMPONENT_NAME,
143
+ slot: import_exported_related.slots.ITEM.HEADER.SECONDARY_TITLE
144
+ })`
114
145
  margin: 0;
115
146
  font-size: ${({ theme }) => theme.fontSizes.label[200]};
147
+ line-height: 1.273;
116
148
  text-align: left;
117
- color: ${({ disabled, theme }) => disabled ? theme.colors.neutral[200] : theme.colors.neutral[500]};
149
+ min-height: 12px;
150
+ color: ${({ disabled, theme }) => disabled ? theme.colors.neutral[500] : theme.colors.neutral[700]};
118
151
  text-overflow: ellipsis;
152
+ ${({ selected }) => selected ? `word-break: break-word;` : `
119
153
  overflow: hidden;
120
- height: ${({ theme }) => theme.space.xs};
121
- width: 100%;
122
- text-align: left;
123
- display: block;
124
154
  white-space: nowrap;
155
+ width: 100%;
156
+ display: block;`}
125
157
  `;
126
- const StyledItemCustomActions = import_styled_components.default.div`
158
+ const StyledItemCustomActions = (0, import_ds_system.styled)("div", {
159
+ name: import_exported_related.COMPONENT_NAME,
160
+ slot: import_exported_related.slots.ITEM.HEADER.CUSTOM_ACTIONS_CONTAINER
161
+ })`
127
162
  display: grid;
128
163
  grid-auto-flow: column;
164
+ place-items: center;
129
165
  grid-gap: ${({ theme }) => theme.space.xxs};
130
- margin: 0 ${({ theme }) => theme.space.xs};
166
+ margin: ${({ theme, isDSMobile }) => isDSMobile ? `0 ${theme.space.xs}` : "0 20px 0 16px"};
131
167
  justify-content: flex-end;
168
+ height: 28px;
132
169
  `;
133
- const StyledItemHeaderContainer = import_styled_components.default.div`
170
+ const StyledItemHeaderContainer = (0, import_ds_system.styled)("div", {
171
+ name: import_exported_related.COMPONENT_NAME,
172
+ slot: import_exported_related.slots.ITEM.HEADER.CONTAINER
173
+ })`
134
174
  display: grid;
135
175
  grid-template-columns: auto max-content;
136
176
  place-items: center;
137
177
  position: relative;
178
+ border-radius: 2px;
138
179
  &:hover {
139
180
  ${({ disabled, theme }) => !disabled ? `background: ${theme.colors.brand[200]};` : ``}
140
181
  }
141
182
  `;
142
- module.exports = __toCommonJS(styles_exports);
183
+ const StyledTooltipContent = (0, import_ds_system.styled)("div", {
184
+ name: import_exported_related.COMPONENT_NAME,
185
+ slot: import_exported_related.slots.ITEM.HEADER.TOOLTIP
186
+ })`
187
+ padding: 8px;
188
+ width: 250px;
189
+ background: white;
190
+ display: grid;
191
+ gap: ${({ theme }) => theme.space.xxs};
192
+
193
+ p {
194
+ margin: 0;
195
+ }
196
+ `;
143
197
  //# sourceMappingURL=styles.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/parts/accordionItem/styles.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import styled from 'styled-components';\nimport type {\n StyledItemAddonPropsT,\n StyledItemHeaderPropsT,\n StyledItemTitlesPropsT,\n StyledPrimaryTitlePropsT,\n StyledSecondaryTitlePropsT,\n StyledItemContentPropsT,\n StyledItemHeaderContainerPropsT,\n} from '../../DSAccordionTypes';\n\nexport const StyledItemContainer = styled.div`\n display: grid;\n grid-template-rows: auto auto;\n border-bottom: 1px solid ${({ theme }) => theme.colors.neutral[200]};\n align-items: center;\n`;\n\nexport const StyledItemHeader = styled.button<StyledItemHeaderPropsT>`\n display: flex;\n height: ${({ theme, withSecondaryTitle }) => (withSecondaryTitle ? theme.space.m : theme.space.s)};\n width: 100%;\n align-items: center;\n border: none;\n outline: none;\n background: none;\n\n &:hover {\n cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')};\n }\n\n padding: ${({ isDSMobile }) => (isDSMobile ? `0 16px` : `0`)};\n\n ${({ isDSMobile }) => (isDSMobile ? `flex-direction: row-reverse;` : ``)}\n\n &:focus {\n &:after {\n position: absolute;\n content: '';\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n border-radius: 2px;\n border: 2px solid ${({ theme }) => theme.colors.brand[700]};\n pointer-events: none;\n }\n }\n`;\n\nexport const StyledItemContent = styled.div<StyledItemContentPropsT>`\n margin: ${({ isDSMobile }) => (isDSMobile ? `16px 16px 24px 16px` : `16px 16px 16px 32px`)};\n grid-column: 1/2;\n`;\n\nexport const StyledItemAddon = styled.div<StyledItemAddonPropsT>`\n ${({ theme, isDSMobile }) => (!isDSMobile ? `padding: 0 ${theme.space.xxs};` : ``)}\n height: 100%;\n width: ${({ theme }) => theme.space.s};\n display: grid;\n place-items: center;\n\n & .em-ds-icon svg {\n fill: ${({ disabled, theme }) => (disabled ? theme.colors.neutral[200] : theme.colors.brand[800])};\n }\n`;\n\nexport const StyledItemTitles = styled.div<StyledItemTitlesPropsT>`\n display: grid;\n grid-template-columns: 100%;\n width: 100%;\n align-content: center;\n`;\n\nexport const StyledPrimaryTitle = styled.div<StyledPrimaryTitlePropsT>`\n margin: 0;\n font-size: 16px;\n color: ${({ disabled, theme }) => (disabled ? theme.colors.neutral[200] : theme.colors.neutral[700])};\n font-weight: ${({ theme, isDSMobile }) => (isDSMobile ? theme.fontWeights.regular : theme.fontWeights.regular)};\n text-overflow: ellipsis;\n overflow: hidden;\n height: ${({ theme }) => theme.space.xs};\n width: 100%;\n text-align: left;\n display: block;\n white-space: nowrap;\n`;\n\nexport const StyledSecondaryTitle = styled.span<StyledSecondaryTitlePropsT>`\n margin: 0;\n font-size: ${({ theme }) => theme.fontSizes.label[200]};\n text-align: left;\n color: ${({ disabled, theme }) => (disabled ? theme.colors.neutral[200] : theme.colors.neutral[500])};\n text-overflow: ellipsis;\n overflow: hidden;\n height: ${({ theme }) => theme.space.xs};\n width: 100%;\n text-align: left;\n display: block;\n white-space: nowrap;\n`;\n\nexport const StyledItemCustomActions = styled.div`\n display: grid;\n grid-auto-flow: column;\n grid-gap: ${({ theme }) => theme.space.xxs};\n margin: 0 ${({ theme }) => theme.space.xs};\n justify-content: flex-end;\n`;\n\nexport const StyledItemHeaderContainer = styled.div<StyledItemHeaderContainerPropsT>`\n display: grid;\n grid-template-columns: auto max-content;\n place-items: center;\n position: relative;\n &:hover {\n ${({ disabled, theme }) => (!disabled ? `background: ${theme.colors.brand[200]};` : ``)}\n }\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAmB;AAWZ,MAAM,sBAAsB,iCAAO;AAAA;AAAA;AAAA,6BAGb,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA;AAAA;AAI1D,MAAM,mBAAmB,iCAAO;AAAA;AAAA,YAE3B,CAAC,EAAE,OAAO,yBAA0B,qBAAqB,MAAM,MAAM,IAAI,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAQnF,CAAC,EAAE,eAAgB,WAAW,gBAAgB;AAAA;AAAA;AAAA,aAG/C,CAAC,EAAE,iBAAkB,aAAa,WAAW;AAAA;AAAA,IAEtD,CAAC,EAAE,iBAAkB,aAAa,iCAAiC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAW7C,CAAC,EAAE,YAAY,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAMrD,MAAM,oBAAoB,iCAAO;AAAA,YAC5B,CAAC,EAAE,iBAAkB,aAAa,wBAAwB;AAAA;AAAA;AAI/D,MAAM,kBAAkB,iCAAO;AAAA,IAClC,CAAC,EAAE,OAAO,iBAAkB,CAAC,aAAa,cAAc,MAAM,MAAM,SAAS;AAAA;AAAA,WAEtE,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,YAK1B,CAAC,EAAE,UAAU,YAAa,WAAW,MAAM,OAAO,QAAQ,OAAO,MAAM,OAAO,MAAM;AAAA;AAAA;AAIzF,MAAM,mBAAmB,iCAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAOhC,MAAM,qBAAqB,iCAAO;AAAA;AAAA;AAAA,WAG9B,CAAC,EAAE,UAAU,YAAa,WAAW,MAAM,OAAO,QAAQ,OAAO,MAAM,OAAO,QAAQ;AAAA,iBAChF,CAAC,EAAE,OAAO,iBAAkB,aAAa,MAAM,YAAY,UAAU,MAAM,YAAY;AAAA;AAAA;AAAA,YAG5F,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAOhC,MAAM,uBAAuB,iCAAO;AAAA;AAAA,eAE5B,CAAC,EAAE,YAAY,MAAM,UAAU,MAAM;AAAA;AAAA,WAEzC,CAAC,EAAE,UAAU,YAAa,WAAW,MAAM,OAAO,QAAQ,OAAO,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA,YAGrF,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAOhC,MAAM,0BAA0B,iCAAO;AAAA;AAAA;AAAA,cAGhC,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA,cAC3B,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA;AAAA;AAIlC,MAAM,4BAA4B,iCAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAM1C,CAAC,EAAE,UAAU,YAAa,CAAC,WAAW,eAAe,MAAM,OAAO,MAAM,UAAU;AAAA;AAAA;",
4
+ "sourcesContent": ["import { styled, css } from '@elliemae/ds-system';\nimport { sizing, space, layout } from '@xstyled/styled-components';\nimport { COMPONENT_NAME, slots } from '../../exported-related';\ninterface StyledItemHeaderPropsT {\n withCustomActions: boolean;\n withSecondaryTitle?: string;\n isDSMobile: boolean;\n}\n\ninterface StyledItemTitlesPropsT {\n withSecondaryTitle?: string;\n isDSMobile: boolean;\n selected: boolean;\n}\n\ninterface StyledPrimaryTitlePropsT {\n disabled: boolean;\n isDSMobile: boolean;\n selected: boolean;\n withSecondaryTitle: boolean;\n}\n\ninterface StyledItemContentPropsT {\n isDSMobile: boolean;\n}\n\ninterface StyledSecondaryTitlePropsT {\n disabled: boolean;\n selected: boolean;\n}\n\ninterface StyledItemAddonPropsT {\n disabled: boolean;\n isDSMobile: boolean;\n}\n\ninterface StyledItemHeaderContainerPropsT {\n disabled: boolean;\n}\n\ninterface StyledItemCustomActionsPropsT {\n isDSMobile: boolean;\n}\n\ninterface PaddingSetterT {\n isDSMobile: boolean;\n withSecondaryTitle: boolean;\n}\n\nconst paddingSetter = ({ isDSMobile, withSecondaryTitle }: PaddingSetterT): string => {\n if (isDSMobile)\n return css`\n padding: 13px 0;\n `;\n if (withSecondaryTitle)\n return css`\n padding: 6px 0;\n `;\n return css`\n padding: 7px 0;\n `;\n};\n\nexport const StyledItemContainer = styled('div', { name: COMPONENT_NAME, slot: slots.ITEM.CONTAINER })`\n display: grid;\n grid-template-rows: auto auto;\n border-bottom: 1px solid ${({ theme }) => theme.colors.neutral[200]};\n align-items: center;\n min-width: 240px;\n ${layout}\n ${sizing}\n ${space}\n`;\n\nexport const StyledItemHeader = styled('button', {\n name: COMPONENT_NAME,\n slot: slots.ITEM.HEADER.CONTAINER,\n})<StyledItemHeaderPropsT>`\n display: flex;\n min-height: ${({ theme, withSecondaryTitle, isDSMobile }) =>\n isDSMobile ? `44px` : `${withSecondaryTitle ? theme.space.m : theme.space.s}`};\n width: 100%;\n align-items: center;\n border: none;\n outline: none;\n background: none;\n &:hover {\n cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')};\n }\n padding: ${({ isDSMobile }) => (isDSMobile ? `0 16px` : `0`)};\n ${({ isDSMobile }) => (isDSMobile ? `flex-direction: row-reverse;` : ``)}\n &:focus {\n &:after {\n position: absolute;\n content: '';\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n border-radius: 2px;\n border: 2px solid ${({ theme }) => theme.colors.brand[700]};\n pointer-events: none;\n }\n }\n`;\n\nexport const StyledItemContent = styled('div', {\n name: COMPONENT_NAME,\n slot: slots.ITEM.CONTENT.CONTAINER,\n})<StyledItemContentPropsT>`\n margin: ${({ isDSMobile }) => (isDSMobile ? `3px 16px 24px 16px` : '16px 20px')};\n grid-column: 1/2;\n`;\n\nexport const StyledItemAddon = styled('div', {\n name: COMPONENT_NAME,\n slot: slots.ITEM.HEADER.ADDON,\n})<StyledItemAddonPropsT>`\n height: 100%;\n display: grid;\n place-items: center;\n\n & .em-ds-icon svg {\n fill: ${({ disabled, theme }) => (disabled ? theme.colors.neutral[200] : theme.colors.brand[800])};\n }\n`;\n\nexport const StyledItemTitles = styled('div', {\n name: COMPONENT_NAME,\n slot: slots.ITEM.HEADER.TITLE_CONTAINER,\n})<StyledItemTitlesPropsT>`\n display: grid;\n grid-gap: ${({ theme }) => theme.space.xxxs};\n ${paddingSetter}\n grid-template-columns: 100%;\n width: 100%;\n align-content: center;\n`;\n\nexport const StyledPrimaryTitle = styled('div', {\n name: COMPONENT_NAME,\n slot: slots.ITEM.HEADER.PRIMARY_TITLE,\n})<StyledPrimaryTitlePropsT>`\n margin: 0;\n font-size: 16px;\n line-height: 1.125;\n text-align: left;\n text-overflow: ellipsis;\n min-height: ${({ theme }) => theme.space.xs};\n color: ${({ disabled, theme }) => (disabled ? theme.colors.neutral[500] : theme.colors.neutral[700])};\n font-weight: ${({ theme, isDSMobile }) => (isDSMobile ? theme.fontWeights.semibold : theme.fontWeights.regular)};\n ${({ selected }) =>\n selected\n ? `word-break: break-word;`\n : `\n overflow: hidden;\n white-space: nowrap;\n `};\n width: 100%;\n display: block;\n`;\n\nexport const StyledSecondaryTitle = styled('span', {\n name: COMPONENT_NAME,\n slot: slots.ITEM.HEADER.SECONDARY_TITLE,\n})<StyledSecondaryTitlePropsT>`\n margin: 0;\n font-size: ${({ theme }) => theme.fontSizes.label[200]};\n line-height: 1.273;\n text-align: left;\n min-height: 12px;\n color: ${({ disabled, theme }) => (disabled ? theme.colors.neutral[500] : theme.colors.neutral[700])};\n text-overflow: ellipsis;\n ${({ selected }) =>\n selected\n ? `word-break: break-word;`\n : `\n overflow: hidden;\n white-space: nowrap;\n width: 100%;\n display: block;`}\n`;\n\nexport const StyledItemCustomActions = styled('div', {\n name: COMPONENT_NAME,\n slot: slots.ITEM.HEADER.CUSTOM_ACTIONS_CONTAINER,\n})<StyledItemCustomActionsPropsT>`\n display: grid;\n grid-auto-flow: column;\n place-items: center;\n grid-gap: ${({ theme }) => theme.space.xxs};\n margin: ${({ theme, isDSMobile }) => (isDSMobile ? `0 ${theme.space.xs}` : '0 20px 0 16px')};\n justify-content: flex-end;\n height: 28px;\n`;\n\nexport const StyledItemHeaderContainer = styled('div', {\n name: COMPONENT_NAME,\n slot: slots.ITEM.HEADER.CONTAINER,\n})<StyledItemHeaderContainerPropsT>`\n display: grid;\n grid-template-columns: auto max-content;\n place-items: center;\n position: relative;\n border-radius: 2px;\n &:hover {\n ${({ disabled, theme }) => (!disabled ? `background: ${theme.colors.brand[200]};` : ``)}\n }\n`;\n\nexport const StyledTooltipContent = styled('div', {\n name: COMPONENT_NAME,\n slot: slots.ITEM.HEADER.TOOLTIP,\n})`\n padding: 8px;\n width: 250px;\n background: white;\n display: grid;\n gap: ${({ theme }) => theme.space.xxs};\n\n p {\n margin: 0;\n }\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAA4B;AAC5B,+BAAsC;AACtC,8BAAsC;AA+CtC,MAAM,gBAAgB,CAAC,EAAE,YAAY,yBAAiD;AACpF,MAAI;AACF,WAAO;AAAA;AAAA;AAGT,MAAI;AACF,WAAO;AAAA;AAAA;AAGT,SAAO;AAAA;AAAA;AAGT;AAEO,MAAM,sBAAsB,6BAAO,OAAO,EAAE,MAAM,wCAAgB,MAAM,8BAAM,KAAK,UAAU,CAAC;AAAA;AAAA;AAAA,6BAGxE,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA,IAG7D;AAAA,IACA;AAAA,IACA;AAAA;AAGG,MAAM,mBAAmB,6BAAO,UAAU;AAAA,EAC/C,MAAM;AAAA,EACN,MAAM,8BAAM,KAAK,OAAO;AAC1B,CAAC;AAAA;AAAA,gBAEe,CAAC,EAAE,OAAO,oBAAoB,iBAC1C,aAAa,SAAS,GAAG,qBAAqB,MAAM,MAAM,IAAI,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAOhE,CAAC,EAAE,eAAgB,WAAW,gBAAgB;AAAA;AAAA,aAE/C,CAAC,EAAE,iBAAkB,aAAa,WAAW;AAAA,IACtD,CAAC,EAAE,iBAAkB,aAAa,iCAAiC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAU7C,CAAC,EAAE,YAAY,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAMrD,MAAM,oBAAoB,6BAAO,OAAO;AAAA,EAC7C,MAAM;AAAA,EACN,MAAM,8BAAM,KAAK,QAAQ;AAC3B,CAAC;AAAA,YACW,CAAC,EAAE,iBAAkB,aAAa,uBAAuB;AAAA;AAAA;AAI9D,MAAM,kBAAkB,6BAAO,OAAO;AAAA,EAC3C,MAAM;AAAA,EACN,MAAM,8BAAM,KAAK,OAAO;AAC1B,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAMW,CAAC,EAAE,UAAU,YAAa,WAAW,MAAM,OAAO,QAAQ,OAAO,MAAM,OAAO,MAAM;AAAA;AAAA;AAIzF,MAAM,mBAAmB,6BAAO,OAAO;AAAA,EAC5C,MAAM;AAAA,EACN,MAAM,8BAAM,KAAK,OAAO;AAC1B,CAAC;AAAA;AAAA,cAEa,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA,IACrC;AAAA;AAAA;AAAA;AAAA;AAMG,MAAM,qBAAqB,6BAAO,OAAO;AAAA,EAC9C,MAAM;AAAA,EACN,MAAM,8BAAM,KAAK,OAAO;AAC1B,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAMe,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA,WAChC,CAAC,EAAE,UAAU,YAAa,WAAW,MAAM,OAAO,QAAQ,OAAO,MAAM,OAAO,QAAQ;AAAA,iBAChF,CAAC,EAAE,OAAO,iBAAkB,aAAa,MAAM,YAAY,WAAW,MAAM,YAAY;AAAA,IACrG,CAAC,EAAE,eACH,WACI,4BACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQD,MAAM,uBAAuB,6BAAO,QAAQ;AAAA,EACjD,MAAM;AAAA,EACN,MAAM,8BAAM,KAAK,OAAO;AAC1B,CAAC;AAAA;AAAA,eAEc,CAAC,EAAE,YAAY,MAAM,UAAU,MAAM;AAAA;AAAA;AAAA;AAAA,WAIzC,CAAC,EAAE,UAAU,YAAa,WAAW,MAAM,OAAO,QAAQ,OAAO,MAAM,OAAO,QAAQ;AAAA;AAAA,IAE7F,CAAC,EAAE,eACH,WACI,4BACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOD,MAAM,0BAA0B,6BAAO,OAAO;AAAA,EACnD,MAAM;AAAA,EACN,MAAM,8BAAM,KAAK,OAAO;AAC1B,CAAC;AAAA;AAAA;AAAA;AAAA,cAIa,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA,YAC7B,CAAC,EAAE,OAAO,iBAAkB,aAAa,KAAK,MAAM,MAAM,OAAO;AAAA;AAAA;AAAA;AAKtE,MAAM,4BAA4B,6BAAO,OAAO;AAAA,EACrD,MAAM;AAAA,EACN,MAAM,8BAAM,KAAK,OAAO;AAC1B,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAOK,CAAC,EAAE,UAAU,YAAa,CAAC,WAAW,eAAe,MAAM,OAAO,MAAM,UAAU;AAAA;AAAA;AAIjF,MAAM,uBAAuB,6BAAO,OAAO;AAAA,EAChD,MAAM;AAAA,EACN,MAAM,8BAAM,KAAK,OAAO;AAC1B,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,SAKQ,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -4,31 +4,25 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
7
  var __export = (target, all) => {
9
8
  for (var name in all)
10
9
  __defProp(target, name, { get: all[name], enumerable: true });
11
10
  };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
16
  }
18
- return target;
17
+ return to;
19
18
  };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
21
  var useAccordionItem_exports = {};
29
22
  __export(useAccordionItem_exports, {
30
23
  useAccordionItem: () => useAccordionItem
31
24
  });
25
+ module.exports = __toCommonJS(useAccordionItem_exports);
32
26
  var React = __toESM(require("react"));
33
27
  var import_react = require("react");
34
28
  var import_DSAccordionCTX = require("../../DSAccordionCTX");
@@ -49,11 +43,17 @@ const useAccordionItem = ({ value, disabled }) => {
49
43
  const currentIndex = focusableChildrenReferences.findIndex((item) => item.index === _dsIndex);
50
44
  if (focusableChildrenReferences[currentIndex + 1]?.ref?.current)
51
45
  focusableChildrenReferences[currentIndex + 1]?.ref?.current?.focus();
46
+ else if (currentIndex === focusableChildrenReferences.length - 1) {
47
+ focusableChildrenReferences[0]?.ref?.current?.focus();
48
+ }
52
49
  }
53
50
  if (!disabled && e.key === "ArrowUp") {
54
51
  const currentIndex = focusableChildrenReferences.findIndex((item) => item.index === _dsIndex);
55
52
  if (focusableChildrenReferences[currentIndex - 1]?.ref?.current)
56
53
  focusableChildrenReferences[currentIndex - 1]?.ref?.current?.focus();
54
+ else if (currentIndex === 0) {
55
+ focusableChildrenReferences[focusableChildrenReferences.length - 1]?.ref?.current?.focus();
56
+ }
57
57
  }
58
58
  }, [disabled, focusableChildrenReferences]);
59
59
  return {
@@ -62,5 +62,4 @@ const useAccordionItem = ({ value, disabled }) => {
62
62
  selected
63
63
  };
64
64
  };
65
- module.exports = __toCommonJS(useAccordionItem_exports);
66
65
  //# sourceMappingURL=useAccordionItem.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/parts/accordionItem/useAccordionItem.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useCallback, useContext, useMemo } from 'react';\nimport { DSAccordionContext } from '../../DSAccordionCTX';\nimport type { UseAccordionPropsT, UseAccordionItemReturnTypeT } from '../../DSAccordionTypes';\n\nexport const useAccordionItem = ({ value, disabled }: UseAccordionPropsT): UseAccordionItemReturnTypeT => {\n const { actualActiveValue, setActiveValues, focusableChildrenReferences } = useContext(DSAccordionContext);\n\n const selected = useMemo(() => {\n if (Array.isArray(actualActiveValue)) {\n return actualActiveValue.some((currentValue) => currentValue === value);\n }\n return value === actualActiveValue;\n }, [actualActiveValue, value]);\n\n const handleOnClick = useCallback(\n (e: React.MouseEvent) => {\n if (!disabled) setActiveValues(value, e);\n },\n [disabled, setActiveValues, value],\n );\n\n const handleOnKeyDown = useCallback(\n (e: React.KeyboardEvent, _dsIndex: number) => {\n if (!disabled && e.key === 'ArrowDown') {\n const currentIndex = focusableChildrenReferences.findIndex((item) => item.index === _dsIndex);\n if (focusableChildrenReferences[currentIndex + 1]?.ref?.current)\n focusableChildrenReferences[currentIndex + 1]?.ref?.current?.focus();\n }\n\n if (!disabled && e.key === 'ArrowUp') {\n const currentIndex = focusableChildrenReferences.findIndex((item) => item.index === _dsIndex);\n if (focusableChildrenReferences[currentIndex - 1]?.ref?.current)\n focusableChildrenReferences[currentIndex - 1]?.ref?.current?.focus();\n }\n },\n [disabled, focusableChildrenReferences],\n );\n\n return {\n handleOnClick,\n handleOnKeyDown,\n selected,\n };\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAwD;AACxD,4BAAmC;AAG5B,MAAM,mBAAmB,CAAC,EAAE,OAAO,eAAgE;AACxG,QAAM,EAAE,mBAAmB,iBAAiB,gCAAgC,6BAAW;AAEvF,QAAM,WAAW,0BAAQ,MAAM;AAC7B,QAAI,MAAM,QAAQ,oBAAoB;AACpC,aAAO,kBAAkB,KAAK,CAAC,iBAAiB,iBAAiB;AAAA;AAEnE,WAAO,UAAU;AAAA,KAChB,CAAC,mBAAmB;AAEvB,QAAM,gBAAgB,8BACpB,CAAC,MAAwB;AACvB,QAAI,CAAC;AAAU,sBAAgB,OAAO;AAAA,KAExC,CAAC,UAAU,iBAAiB;AAG9B,QAAM,kBAAkB,8BACtB,CAAC,GAAwB,aAAqB;AAC5C,QAAI,CAAC,YAAY,EAAE,QAAQ,aAAa;AACtC,YAAM,eAAe,4BAA4B,UAAU,CAAC,SAAS,KAAK,UAAU;AACpF,UAAI,4BAA4B,eAAe,IAAI,KAAK;AACtD,oCAA4B,eAAe,IAAI,KAAK,SAAS;AAAA;AAGjE,QAAI,CAAC,YAAY,EAAE,QAAQ,WAAW;AACpC,YAAM,eAAe,4BAA4B,UAAU,CAAC,SAAS,KAAK,UAAU;AACpF,UAAI,4BAA4B,eAAe,IAAI,KAAK;AACtD,oCAA4B,eAAe,IAAI,KAAK,SAAS;AAAA;AAAA,KAGnE,CAAC,UAAU;AAGb,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA;AAAA;",
4
+ "sourcesContent": ["import React, { useCallback, useContext, useMemo } from 'react';\nimport { DSAccordionContext } from '../../DSAccordionCTX';\n\nexport interface UseAccordionItemPropsT {\n value: string | number;\n disabled: boolean;\n}\n\ninterface UseAccordionItemReturnTypeT {\n handleOnClick: (e: React.MouseEvent) => void;\n handleOnKeyDown: (e: React.KeyboardEvent, dsIndex: number) => void;\n selected: boolean;\n}\n\nexport const useAccordionItem = ({ value, disabled }: UseAccordionItemPropsT): UseAccordionItemReturnTypeT => {\n const { actualActiveValue, setActiveValues, focusableChildrenReferences } = useContext(DSAccordionContext);\n\n const selected = useMemo(() => {\n if (Array.isArray(actualActiveValue)) {\n return actualActiveValue.some((currentValue) => currentValue === value);\n }\n return value === actualActiveValue;\n }, [actualActiveValue, value]);\n\n const handleOnClick = useCallback(\n (e: React.MouseEvent) => {\n if (!disabled) setActiveValues(value, e);\n },\n [disabled, setActiveValues, value],\n );\n\n const handleOnKeyDown = useCallback(\n (e: React.KeyboardEvent, _dsIndex: number) => {\n if (!disabled && e.key === 'ArrowDown') {\n const currentIndex = focusableChildrenReferences.findIndex((item) => item.index === _dsIndex);\n if (focusableChildrenReferences[currentIndex + 1]?.ref?.current)\n focusableChildrenReferences[currentIndex + 1]?.ref?.current?.focus();\n else if (currentIndex === focusableChildrenReferences.length - 1) {\n focusableChildrenReferences[0]?.ref?.current?.focus();\n }\n }\n\n if (!disabled && e.key === 'ArrowUp') {\n const currentIndex = focusableChildrenReferences.findIndex((item) => item.index === _dsIndex);\n if (focusableChildrenReferences[currentIndex - 1]?.ref?.current)\n focusableChildrenReferences[currentIndex - 1]?.ref?.current?.focus();\n else if (currentIndex === 0) {\n focusableChildrenReferences[focusableChildrenReferences.length - 1]?.ref?.current?.focus();\n }\n }\n },\n [disabled, focusableChildrenReferences],\n );\n\n return {\n handleOnClick,\n handleOnKeyDown,\n selected,\n };\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAwD;AACxD,4BAAmC;AAa5B,MAAM,mBAAmB,CAAC,EAAE,OAAO,eAAoE;AAC5G,QAAM,EAAE,mBAAmB,iBAAiB,gCAAgC,6BAAW,wCAAkB;AAEzG,QAAM,WAAW,0BAAQ,MAAM;AAC7B,QAAI,MAAM,QAAQ,iBAAiB,GAAG;AACpC,aAAO,kBAAkB,KAAK,CAAC,iBAAiB,iBAAiB,KAAK;AAAA,IACxE;AACA,WAAO,UAAU;AAAA,EACnB,GAAG,CAAC,mBAAmB,KAAK,CAAC;AAE7B,QAAM,gBAAgB,8BACpB,CAAC,MAAwB;AACvB,QAAI,CAAC;AAAU,sBAAgB,OAAO,CAAC;AAAA,EACzC,GACA,CAAC,UAAU,iBAAiB,KAAK,CACnC;AAEA,QAAM,kBAAkB,8BACtB,CAAC,GAAwB,aAAqB;AAC5C,QAAI,CAAC,YAAY,EAAE,QAAQ,aAAa;AACtC,YAAM,eAAe,4BAA4B,UAAU,CAAC,SAAS,KAAK,UAAU,QAAQ;AAC5F,UAAI,4BAA4B,eAAe,IAAI,KAAK;AACtD,oCAA4B,eAAe,IAAI,KAAK,SAAS,MAAM;AAAA,eAC5D,iBAAiB,4BAA4B,SAAS,GAAG;AAChE,oCAA4B,IAAI,KAAK,SAAS,MAAM;AAAA,MACtD;AAAA,IACF;AAEA,QAAI,CAAC,YAAY,EAAE,QAAQ,WAAW;AACpC,YAAM,eAAe,4BAA4B,UAAU,CAAC,SAAS,KAAK,UAAU,QAAQ;AAC5F,UAAI,4BAA4B,eAAe,IAAI,KAAK;AACtD,oCAA4B,eAAe,IAAI,KAAK,SAAS,MAAM;AAAA,eAC5D,iBAAiB,GAAG;AAC3B,oCAA4B,4BAA4B,SAAS,IAAI,KAAK,SAAS,MAAM;AAAA,MAC3F;AAAA,IACF;AAAA,EACF,GACA,CAAC,UAAU,2BAA2B,CACxC;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
6
6
  "names": []
7
7
  }
@@ -4,54 +4,47 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
7
  var __export = (target, all) => {
9
8
  for (var name in all)
10
9
  __defProp(target, name, { get: all[name], enumerable: true });
11
10
  };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
16
  }
18
- return target;
17
+ return to;
19
18
  };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
21
  var propTypes_exports = {};
29
22
  __export(propTypes_exports, {
30
23
  accordionItemPropTypes: () => accordionItemPropTypes,
31
24
  accordionPropTypes: () => accordionPropTypes
32
25
  });
26
+ module.exports = __toCommonJS(propTypes_exports);
33
27
  var React = __toESM(require("react"));
34
- var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
28
+ var import_ds_utilities = require("@elliemae/ds-utilities");
35
29
  const accordionItemPropTypes = {
36
- children: import_ds_props_helpers.PropTypes.node.description("Dimsum AccordionItem content.").isRequired,
37
- title: import_ds_props_helpers.PropTypes.string.description("Set a primary title."),
38
- value: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.string, import_ds_props_helpers.PropTypes.number]).description("Dimsum AccordionItem value, this value should be unique.").isRequired,
39
- iconClosed: import_ds_props_helpers.PropTypes.node.description("Custom Dimsum Icon when it is closed."),
40
- iconOpened: import_ds_props_helpers.PropTypes.node.description("Custom Dimsum Icon when it is open."),
41
- secondaryTitle: import_ds_props_helpers.PropTypes.string.description("Set a secondary title"),
42
- customActions: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.object).description("Set Dimsum AccordionItem custom actions.").deprecated({ version: "3.x" }),
43
- renderCustomActions: import_ds_props_helpers.PropTypes.func.description("This property will render any JSX in the custom actions area. You can access to all references and active values within the props.").deprecated({ version: "3.x" })
30
+ children: import_ds_utilities.PropTypes.node.description("Dimsum AccordionItem content.").isRequired,
31
+ title: import_ds_utilities.PropTypes.string.description("Set a primary title."),
32
+ value: import_ds_utilities.PropTypes.oneOfType([import_ds_utilities.PropTypes.string, import_ds_utilities.PropTypes.number]).description("Dimsum AccordionItem value, this value should be unique.").isRequired,
33
+ iconClosed: import_ds_utilities.PropTypes.node.description("Custom Dimsum Icon when it is closed."),
34
+ iconOpened: import_ds_utilities.PropTypes.node.description("Custom Dimsum Icon when it is open."),
35
+ secondaryTitle: import_ds_utilities.PropTypes.string.description("Set a secondary title"),
36
+ customActions: import_ds_utilities.PropTypes.arrayOf(import_ds_utilities.PropTypes.object).description("Set Dimsum AccordionItem custom actions.").deprecated({ version: "3.x" }),
37
+ renderCustomActions: import_ds_utilities.PropTypes.func.description("This property will render any JSX in the custom actions area. You can access to all references and active values within the props.").deprecated({ version: "3.x" })
44
38
  };
45
39
  const accordionPropTypes = {
46
- containerProps: import_ds_props_helpers.PropTypes.object.description("Adds props to the container."),
47
- activeValue: import_ds_props_helpers.PropTypes.oneOfType([
48
- import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.string, import_ds_props_helpers.PropTypes.number])),
49
- import_ds_props_helpers.PropTypes.string,
50
- import_ds_props_helpers.PropTypes.number
40
+ containerProps: import_ds_utilities.PropTypes.object.description("Adds props to the container."),
41
+ activeValue: import_ds_utilities.PropTypes.oneOfType([
42
+ import_ds_utilities.PropTypes.arrayOf(import_ds_utilities.PropTypes.oneOfType([import_ds_utilities.PropTypes.string, import_ds_utilities.PropTypes.number])),
43
+ import_ds_utilities.PropTypes.string,
44
+ import_ds_utilities.PropTypes.number
51
45
  ]).description("Selected active value. This property makes the component a controlled one."),
52
- children: import_ds_props_helpers.PropTypes.node.description("Dimsum AccordionItems to show."),
53
- allowMultipleOpen: import_ds_props_helpers.PropTypes.bool.description("Allows multiple Dimsum AccordionItems to be open at the same time."),
54
- onChange: import_ds_props_helpers.PropTypes.func.description("Callback function once the Dimsum Accordion changes.")
46
+ children: import_ds_utilities.PropTypes.node.description("Dimsum AccordionItems to show."),
47
+ allowMultipleOpen: import_ds_utilities.PropTypes.bool.description("Allows multiple Dimsum AccordionItems to be open at the same time."),
48
+ onChange: import_ds_utilities.PropTypes.func.description("Callback function once the Dimsum Accordion changes.")
55
49
  };
56
- module.exports = __toCommonJS(propTypes_exports);
57
50
  //# sourceMappingURL=propTypes.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/propTypes.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { PropTypes } from '@elliemae/ds-props-helpers';\n\nexport const accordionItemPropTypes = {\n children: PropTypes.node.description('Dimsum AccordionItem content.').isRequired,\n title: PropTypes.string.description('Set a primary title.'),\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description(\n 'Dimsum AccordionItem value, this value should be unique.',\n ).isRequired,\n iconClosed: PropTypes.node.description('Custom Dimsum Icon when it is closed.'),\n iconOpened: PropTypes.node.description('Custom Dimsum Icon when it is open.'),\n secondaryTitle: PropTypes.string.description('Set a secondary title'),\n customActions: PropTypes.arrayOf(PropTypes.object)\n .description('Set Dimsum AccordionItem custom actions.')\n .deprecated({ version: '3.x' }),\n renderCustomActions: PropTypes.func\n .description(\n 'This property will render any JSX in the custom actions area. You can access to all references and active values within the props.',\n )\n .deprecated({ version: '3.x' }),\n};\n\nexport const accordionPropTypes = {\n containerProps: PropTypes.object.description('Adds props to the container.'),\n activeValue: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),\n PropTypes.string,\n PropTypes.number,\n ]).description('Selected active value. This property makes the component a controlled one.'),\n children: PropTypes.node.description('Dimsum AccordionItems to show.'),\n allowMultipleOpen: PropTypes.bool.description('Allows multiple Dimsum AccordionItems to be open at the same time.'),\n onChange: PropTypes.func.description('Callback function once the Dimsum Accordion changes.'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA0B;AAEnB,MAAM,yBAAyB;AAAA,EACpC,UAAU,kCAAU,KAAK,YAAY,iCAAiC;AAAA,EACtE,OAAO,kCAAU,OAAO,YAAY;AAAA,EACpC,OAAO,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,SAAS,YAC/D,4DACA;AAAA,EACF,YAAY,kCAAU,KAAK,YAAY;AAAA,EACvC,YAAY,kCAAU,KAAK,YAAY;AAAA,EACvC,gBAAgB,kCAAU,OAAO,YAAY;AAAA,EAC7C,eAAe,kCAAU,QAAQ,kCAAU,QACxC,YAAY,4CACZ,WAAW,EAAE,SAAS;AAAA,EACzB,qBAAqB,kCAAU,KAC5B,YACC,sIAED,WAAW,EAAE,SAAS;AAAA;AAGpB,MAAM,qBAAqB;AAAA,EAChC,gBAAgB,kCAAU,OAAO,YAAY;AAAA,EAC7C,aAAa,kCAAU,UAAU;AAAA,IAC/B,kCAAU,QAAQ,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU;AAAA,IACnE,kCAAU;AAAA,IACV,kCAAU;AAAA,KACT,YAAY;AAAA,EACf,UAAU,kCAAU,KAAK,YAAY;AAAA,EACrC,mBAAmB,kCAAU,KAAK,YAAY;AAAA,EAC9C,UAAU,kCAAU,KAAK,YAAY;AAAA;",
3
+ "sources": ["../../src/propTypes.ts", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import { PropTypes } from '@elliemae/ds-utilities';\n\nexport const accordionItemPropTypes = {\n children: PropTypes.node.description('Dimsum AccordionItem content.').isRequired,\n title: PropTypes.string.description('Set a primary title.'),\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description(\n 'Dimsum AccordionItem value, this value should be unique.',\n ).isRequired,\n iconClosed: PropTypes.node.description('Custom Dimsum Icon when it is closed.'),\n iconOpened: PropTypes.node.description('Custom Dimsum Icon when it is open.'),\n secondaryTitle: PropTypes.string.description('Set a secondary title'),\n customActions: PropTypes.arrayOf(PropTypes.object)\n .description('Set Dimsum AccordionItem custom actions.')\n .deprecated({ version: '3.x' }),\n renderCustomActions: PropTypes.func\n .description(\n 'This property will render any JSX in the custom actions area. You can access to all references and active values within the props.',\n )\n .deprecated({ version: '3.x' }),\n};\n\nexport const accordionPropTypes = {\n containerProps: PropTypes.object.description('Adds props to the container.'),\n activeValue: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),\n PropTypes.string,\n PropTypes.number,\n ]).description('Selected active value. This property makes the component a controlled one.'),\n children: PropTypes.node.description('Dimsum AccordionItems to show.'),\n allowMultipleOpen: PropTypes.bool.description('Allows multiple Dimsum AccordionItems to be open at the same time.'),\n onChange: PropTypes.func.description('Callback function once the Dimsum Accordion changes.'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAA0B;AAEnB,MAAM,yBAAyB;AAAA,EACpC,UAAU,8BAAU,KAAK,YAAY,+BAA+B,EAAE;AAAA,EACtE,OAAO,8BAAU,OAAO,YAAY,sBAAsB;AAAA,EAC1D,OAAO,8BAAU,UAAU,CAAC,8BAAU,QAAQ,8BAAU,MAAM,CAAC,EAAE,YAC/D,0DACF,EAAE;AAAA,EACF,YAAY,8BAAU,KAAK,YAAY,uCAAuC;AAAA,EAC9E,YAAY,8BAAU,KAAK,YAAY,qCAAqC;AAAA,EAC5E,gBAAgB,8BAAU,OAAO,YAAY,uBAAuB;AAAA,EACpE,eAAe,8BAAU,QAAQ,8BAAU,MAAM,EAC9C,YAAY,0CAA0C,EACtD,WAAW,EAAE,SAAS,MAAM,CAAC;AAAA,EAChC,qBAAqB,8BAAU,KAC5B,YACC,oIACF,EACC,WAAW,EAAE,SAAS,MAAM,CAAC;AAClC;AAEO,MAAM,qBAAqB;AAAA,EAChC,gBAAgB,8BAAU,OAAO,YAAY,8BAA8B;AAAA,EAC3E,aAAa,8BAAU,UAAU;AAAA,IAC/B,8BAAU,QAAQ,8BAAU,UAAU,CAAC,8BAAU,QAAQ,8BAAU,MAAM,CAAC,CAAC;AAAA,IAC3E,8BAAU;AAAA,IACV,8BAAU;AAAA,EACZ,CAAC,EAAE,YAAY,4EAA4E;AAAA,EAC3F,UAAU,8BAAU,KAAK,YAAY,gCAAgC;AAAA,EACrE,mBAAmB,8BAAU,KAAK,YAAY,oEAAoE;AAAA,EAClH,UAAU,8BAAU,KAAK,YAAY,sDAAsD;AAC7F;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,67 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __defProps = Object.defineProperties;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
+ var __getProtoOf = Object.getPrototypeOf;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
+ var __spreadValues = (a, b) => {
13
+ for (var prop in b || (b = {}))
14
+ if (__hasOwnProp.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ if (__getOwnPropSymbols)
17
+ for (var prop of __getOwnPropSymbols(b)) {
18
+ if (__propIsEnum.call(b, prop))
19
+ __defNormalProp(a, prop, b[prop]);
20
+ }
21
+ return a;
22
+ };
23
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
24
+ var __export = (target, all) => {
25
+ for (var name in all)
26
+ __defProp(target, name, { get: all[name], enumerable: true });
27
+ };
28
+ var __copyProps = (to, from, except, desc) => {
29
+ if (from && typeof from === "object" || typeof from === "function") {
30
+ for (let key of __getOwnPropNames(from))
31
+ if (!__hasOwnProp.call(to, key) && key !== except)
32
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
33
+ }
34
+ return to;
35
+ };
36
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
37
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
38
+ var react_desc_prop_types_exports = {};
39
+ __export(react_desc_prop_types_exports, {
40
+ accordionItemPropTypes: () => accordionItemPropTypes,
41
+ accordionPropTypes: () => accordionPropTypes
42
+ });
43
+ module.exports = __toCommonJS(react_desc_prop_types_exports);
44
+ var React = __toESM(require("react"));
45
+ var import_ds_utilities = require("@elliemae/ds-utilities");
46
+ const accordionItemPropTypes = __spreadProps(__spreadValues(__spreadValues({}, import_ds_utilities.globalAttributesPropTypes), import_ds_utilities.xstyledPropTypes), {
47
+ children: import_ds_utilities.PropTypes.node.description("Dimsum AccordionItem content.").isRequired,
48
+ title: import_ds_utilities.PropTypes.string.description("Set a primary title."),
49
+ value: import_ds_utilities.PropTypes.oneOfType([import_ds_utilities.PropTypes.string, import_ds_utilities.PropTypes.number]).description("Dimsum AccordionItem value, this value should be unique.").isRequired,
50
+ iconClosed: import_ds_utilities.PropTypes.node.description("Custom Dimsum Icon when it is closed.").deprecated({ version: "3.x" }),
51
+ iconOpened: import_ds_utilities.PropTypes.node.description("Custom Dimsum Icon when it is open.").deprecated({ version: "3.x" }),
52
+ secondaryTitle: import_ds_utilities.PropTypes.string.description("Set a secondary title"),
53
+ customActions: import_ds_utilities.PropTypes.arrayOf(import_ds_utilities.PropTypes.object).description("Set Dimsum AccordionItem custom actions.").deprecated({ version: "3.x" }),
54
+ renderCustomActions: import_ds_utilities.PropTypes.func.description("This property will render any JSX in the header controls area. You can access to all references and active values within the props.")
55
+ });
56
+ const accordionPropTypes = __spreadProps(__spreadValues(__spreadValues({}, import_ds_utilities.globalAttributesPropTypes), import_ds_utilities.xstyledPropTypes), {
57
+ containerProps: import_ds_utilities.PropTypes.object.description("Adds props to the container."),
58
+ activeValue: import_ds_utilities.PropTypes.oneOfType([
59
+ import_ds_utilities.PropTypes.arrayOf(import_ds_utilities.PropTypes.oneOfType([import_ds_utilities.PropTypes.string, import_ds_utilities.PropTypes.number])),
60
+ import_ds_utilities.PropTypes.string,
61
+ import_ds_utilities.PropTypes.number
62
+ ]).description("Selected active value. This property makes the component a controlled one."),
63
+ children: import_ds_utilities.PropTypes.node.description("Dimsum AccordionItems to show."),
64
+ allowMultipleOpen: import_ds_utilities.PropTypes.bool.description("Allows multiple Dimsum AccordionItems to be open at the same time."),
65
+ onChange: import_ds_utilities.PropTypes.func.description("Callback function once the Dimsum Accordion changes.")
66
+ });
67
+ //# sourceMappingURL=react-desc-prop-types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/react-desc-prop-types.ts", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import React from 'react';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-utilities';\nimport type { DSAccordionInternalsT } from './sharedTypes';\n\nexport declare namespace DSAccordionT {\n export interface DefaultProps {\n containerProps: Record<string, unknown>;\n allowMultipleOpen: boolean;\n onChange: (value: (string | number)[] | string | number | null, e: React.MouseEvent | React.KeyboardEvent) => void;\n children: React.ReactElement<InternalItemProps>[];\n isDSMobile: boolean;\n }\n\n export interface OptionalProps {\n activeValue?: DSAccordionInternalsT.InternalActiveValue;\n }\n\n export interface RequiredProps {\n children: React.ReactElement<ItemProps>[];\n }\n\n export interface Props extends OptionalProps, Partial<Omit<DefaultProps, 'children'>>, RequiredProps {}\n\n export interface ItemDefaultProps {\n iconClosed: React.MemoExoticComponent<React.FunctionComponent<DSAccordionInternalsT.DefaultIconProps>>;\n iconOpened: React.MemoExoticComponent<React.FunctionComponent<DSAccordionInternalsT.DefaultIconProps>>;\n title: string;\n customActions: DSAccordionInternalsT.CustomActions[];\n disabled: boolean;\n }\n\n export interface ItemOptionalProps {\n secondaryTitle?: string;\n renderCustomActions?: (props: {\n allRefs: DSAccordionInternalsT.AllChildrenReferences;\n actualActiveValue: DSAccordionInternalsT.InternalActiveValue;\n }) => JSX.Element;\n }\n\n export interface ItemRequiredProps {\n children: React.ReactNode;\n value: string | number;\n }\n\n export interface ItemProps extends ItemRequiredProps, ItemOptionalProps, Partial<ItemDefaultProps> {}\n\n export interface InternalItemProps\n extends ItemRequiredProps,\n ItemOptionalProps,\n Omit<ItemDefaultProps, 'disabled' | 'customActions' | 'iconClosed' | 'iconOpened'> {\n dsIndex: number;\n disabled: boolean;\n customActions: DSAccordionInternalsT.CustomActions[];\n iconClosed: React.MemoExoticComponent<React.FunctionComponent<DSAccordionInternalsT.DefaultIconProps>>;\n iconOpened: React.MemoExoticComponent<React.FunctionComponent<DSAccordionInternalsT.DefaultIconProps>>;\n }\n\n export interface InternalProps\n extends OptionalProps,\n Partial<Omit<DefaultProps, 'children' | 'isDSMobile' | 'onChange'>> {\n children: React.ReactElement<InternalItemProps>[];\n isDSMobile: boolean;\n onChange: (value: (string | number)[] | string | number | null, e: React.MouseEvent | React.KeyboardEvent) => void;\n }\n}\n\nexport const accordionItemPropTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n children: PropTypes.node.description('Dimsum AccordionItem content.').isRequired,\n title: PropTypes.string.description('Set a primary title.'),\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description(\n 'Dimsum AccordionItem value, this value should be unique.',\n ).isRequired,\n iconClosed: PropTypes.node.description('Custom Dimsum Icon when it is closed.').deprecated({ version: '3.x' }),\n iconOpened: PropTypes.node.description('Custom Dimsum Icon when it is open.').deprecated({ version: '3.x' }),\n secondaryTitle: PropTypes.string.description('Set a secondary title'),\n customActions: PropTypes.arrayOf(PropTypes.object)\n .description('Set Dimsum AccordionItem custom actions.')\n .deprecated({ version: '3.x' }),\n renderCustomActions: PropTypes.func.description(\n 'This property will render any JSX in the header controls area. You can access to all references and active values within the props.',\n ),\n};\n\nexport const accordionPropTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n containerProps: PropTypes.object.description('Adds props to the container.'),\n activeValue: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),\n PropTypes.string,\n PropTypes.number,\n ]).description('Selected active value. This property makes the component a controlled one.'),\n children: PropTypes.node.description('Dimsum AccordionItems to show.'),\n allowMultipleOpen: PropTypes.bool.description('Allows multiple Dimsum AccordionItems to be open at the same time.'),\n onChange: PropTypes.func.description('Callback function once the Dimsum Accordion changes.'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,0BAAuE;AAiEhE,MAAM,yBAAyB,gDACjC,gDACA,uCAFiC;AAAA,EAGpC,UAAU,8BAAU,KAAK,YAAY,+BAA+B,EAAE;AAAA,EACtE,OAAO,8BAAU,OAAO,YAAY,sBAAsB;AAAA,EAC1D,OAAO,8BAAU,UAAU,CAAC,8BAAU,QAAQ,8BAAU,MAAM,CAAC,EAAE,YAC/D,0DACF,EAAE;AAAA,EACF,YAAY,8BAAU,KAAK,YAAY,uCAAuC,EAAE,WAAW,EAAE,SAAS,MAAM,CAAC;AAAA,EAC7G,YAAY,8BAAU,KAAK,YAAY,qCAAqC,EAAE,WAAW,EAAE,SAAS,MAAM,CAAC;AAAA,EAC3G,gBAAgB,8BAAU,OAAO,YAAY,uBAAuB;AAAA,EACpE,eAAe,8BAAU,QAAQ,8BAAU,MAAM,EAC9C,YAAY,0CAA0C,EACtD,WAAW,EAAE,SAAS,MAAM,CAAC;AAAA,EAChC,qBAAqB,8BAAU,KAAK,YAClC,qIACF;AACF;AAEO,MAAM,qBAAqB,gDAC7B,gDACA,uCAF6B;AAAA,EAGhC,gBAAgB,8BAAU,OAAO,YAAY,8BAA8B;AAAA,EAC3E,aAAa,8BAAU,UAAU;AAAA,IAC/B,8BAAU,QAAQ,8BAAU,UAAU,CAAC,8BAAU,QAAQ,8BAAU,MAAM,CAAC,CAAC;AAAA,IAC3E,8BAAU;AAAA,IACV,8BAAU;AAAA,EACZ,CAAC,EAAE,YAAY,4EAA4E;AAAA,EAC3F,UAAU,8BAAU,KAAK,YAAY,gCAAgC;AAAA,EACrE,mBAAmB,8BAAU,KAAK,YAAY,oEAAoE;AAAA,EAClH,UAAU,8BAAU,KAAK,YAAY,sDAAsD;AAC7F;",
6
+ "names": []
7
+ }
@@ -0,0 +1,20 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __copyProps = (to, from, except, desc) => {
8
+ if (from && typeof from === "object" || typeof from === "function") {
9
+ for (let key of __getOwnPropNames(from))
10
+ if (!__hasOwnProp.call(to, key) && key !== except)
11
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
+ }
13
+ return to;
14
+ };
15
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
16
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
17
+ var sharedTypes_exports = {};
18
+ module.exports = __toCommonJS(sharedTypes_exports);
19
+ var React = __toESM(require("react"));
20
+ //# sourceMappingURL=sharedTypes.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/sharedTypes.ts", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["export declare namespace DSAccordionInternalsT {\n export interface CustomActions {\n onClick: (e: React.MouseEvent) => void;\n id: string;\n }\n\n export interface DefaultIconProps {\n isDSMobile: boolean;\n }\n\n export interface FocusableChildrenReferences {\n index: number;\n value: string | number;\n ref: React.MutableRefObject<HTMLButtonElement | null>;\n }\n\n export interface AllChildrenReferences {\n [index: string]: React.MutableRefObject<HTMLButtonElement | null>;\n }\n\n export type InternalActiveValue = (string | number)[] | string | number | null | undefined;\n}\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;",
6
+ "names": []
7
+ }
@@ -1,17 +1,17 @@
1
1
  import * as React from "react";
2
2
  import React2 from "react";
3
- import { describe } from "@elliemae/ds-props-helpers";
3
+ import { describe } from "@elliemae/ds-utilities";
4
4
  import { AccordionContent } from "./parts/accordionContent/AccordionContent";
5
5
  import { useAccordion } from "./config/useAccordion";
6
6
  import { DSAccordionContext } from "./DSAccordionCTX";
7
- import { accordionPropTypes } from "./propTypes";
7
+ import { accordionPropTypes } from "./react-desc-prop-types";
8
8
  const DSAccordion = (props) => {
9
9
  const ctx = useAccordion(props);
10
10
  return /* @__PURE__ */ React2.createElement(DSAccordionContext.Provider, {
11
11
  value: ctx
12
12
  }, /* @__PURE__ */ React2.createElement(AccordionContent, null));
13
13
  };
14
- DSAccordion.propTypes = accordionPropTypes;
14
+ DSAccordion.displayName = "DSAccordion";
15
15
  const DSAccordionWithSchema = describe(DSAccordion);
16
16
  DSAccordionWithSchema.propTypes = accordionPropTypes;
17
17
  var DSAccordion_default = DSAccordion;