@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
@@ -1,28 +1,46 @@
1
1
  import * as React from "react";
2
- import styled from "styled-components";
3
- const StyledItemContainer = styled.div`
2
+ import { styled, css } from "@elliemae/ds-system";
3
+ import { sizing, space, layout } from "@xstyled/styled-components";
4
+ import { COMPONENT_NAME, slots } from "../../exported-related";
5
+ const paddingSetter = ({ isDSMobile, withSecondaryTitle }) => {
6
+ if (isDSMobile)
7
+ return css`
8
+ padding: 13px 0;
9
+ `;
10
+ if (withSecondaryTitle)
11
+ return css`
12
+ padding: 6px 0;
13
+ `;
14
+ return css`
15
+ padding: 7px 0;
16
+ `;
17
+ };
18
+ const StyledItemContainer = styled("div", { name: COMPONENT_NAME, slot: slots.ITEM.CONTAINER })`
4
19
  display: grid;
5
20
  grid-template-rows: auto auto;
6
21
  border-bottom: 1px solid ${({ theme }) => theme.colors.neutral[200]};
7
22
  align-items: center;
23
+ min-width: 240px;
24
+ ${layout}
25
+ ${sizing}
26
+ ${space}
8
27
  `;
9
- const StyledItemHeader = styled.button`
28
+ const StyledItemHeader = styled("button", {
29
+ name: COMPONENT_NAME,
30
+ slot: slots.ITEM.HEADER.CONTAINER
31
+ })`
10
32
  display: flex;
11
- height: ${({ theme, withSecondaryTitle }) => withSecondaryTitle ? theme.space.m : theme.space.s};
33
+ min-height: ${({ theme, withSecondaryTitle, isDSMobile }) => isDSMobile ? `44px` : `${withSecondaryTitle ? theme.space.m : theme.space.s}`};
12
34
  width: 100%;
13
35
  align-items: center;
14
36
  border: none;
15
37
  outline: none;
16
38
  background: none;
17
-
18
39
  &:hover {
19
40
  cursor: ${({ disabled }) => disabled ? "not-allowed" : "pointer"};
20
41
  }
21
-
22
42
  padding: ${({ isDSMobile }) => isDSMobile ? `0 16px` : `0`};
23
-
24
43
  ${({ isDSMobile }) => isDSMobile ? `flex-direction: row-reverse;` : ``}
25
-
26
44
  &:focus {
27
45
  &:after {
28
46
  position: absolute;
@@ -37,14 +55,18 @@ const StyledItemHeader = styled.button`
37
55
  }
38
56
  }
39
57
  `;
40
- const StyledItemContent = styled.div`
41
- margin: ${({ isDSMobile }) => isDSMobile ? `16px 16px 24px 16px` : `16px 16px 16px 32px`};
58
+ const StyledItemContent = styled("div", {
59
+ name: COMPONENT_NAME,
60
+ slot: slots.ITEM.CONTENT.CONTAINER
61
+ })`
62
+ margin: ${({ isDSMobile }) => isDSMobile ? `3px 16px 24px 16px` : "16px 20px"};
42
63
  grid-column: 1/2;
43
64
  `;
44
- const StyledItemAddon = styled.div`
45
- ${({ theme, isDSMobile }) => !isDSMobile ? `padding: 0 ${theme.space.xxs};` : ``}
65
+ const StyledItemAddon = styled("div", {
66
+ name: COMPONENT_NAME,
67
+ slot: slots.ITEM.HEADER.ADDON
68
+ })`
46
69
  height: 100%;
47
- width: ${({ theme }) => theme.space.s};
48
70
  display: grid;
49
71
  place-items: center;
50
72
 
@@ -52,54 +74,92 @@ const StyledItemAddon = styled.div`
52
74
  fill: ${({ disabled, theme }) => disabled ? theme.colors.neutral[200] : theme.colors.brand[800]};
53
75
  }
54
76
  `;
55
- const StyledItemTitles = styled.div`
77
+ const StyledItemTitles = styled("div", {
78
+ name: COMPONENT_NAME,
79
+ slot: slots.ITEM.HEADER.TITLE_CONTAINER
80
+ })`
56
81
  display: grid;
82
+ grid-gap: ${({ theme }) => theme.space.xxxs};
83
+ ${paddingSetter}
57
84
  grid-template-columns: 100%;
58
85
  width: 100%;
59
86
  align-content: center;
60
87
  `;
61
- const StyledPrimaryTitle = styled.div`
88
+ const StyledPrimaryTitle = styled("div", {
89
+ name: COMPONENT_NAME,
90
+ slot: slots.ITEM.HEADER.PRIMARY_TITLE
91
+ })`
62
92
  margin: 0;
63
93
  font-size: 16px;
64
- color: ${({ disabled, theme }) => disabled ? theme.colors.neutral[200] : theme.colors.neutral[700]};
65
- font-weight: ${({ theme, isDSMobile }) => isDSMobile ? theme.fontWeights.regular : theme.fontWeights.regular};
94
+ line-height: 1.125;
95
+ text-align: left;
66
96
  text-overflow: ellipsis;
67
- overflow: hidden;
68
- height: ${({ theme }) => theme.space.xs};
97
+ min-height: ${({ theme }) => theme.space.xs};
98
+ color: ${({ disabled, theme }) => disabled ? theme.colors.neutral[500] : theme.colors.neutral[700]};
99
+ font-weight: ${({ theme, isDSMobile }) => isDSMobile ? theme.fontWeights.semibold : theme.fontWeights.regular};
100
+ ${({ selected }) => selected ? `word-break: break-word;` : `
101
+ overflow: hidden;
102
+ white-space: nowrap;
103
+ `};
69
104
  width: 100%;
70
- text-align: left;
71
105
  display: block;
72
- white-space: nowrap;
73
106
  `;
74
- const StyledSecondaryTitle = styled.span`
107
+ const StyledSecondaryTitle = styled("span", {
108
+ name: COMPONENT_NAME,
109
+ slot: slots.ITEM.HEADER.SECONDARY_TITLE
110
+ })`
75
111
  margin: 0;
76
112
  font-size: ${({ theme }) => theme.fontSizes.label[200]};
113
+ line-height: 1.273;
77
114
  text-align: left;
78
- color: ${({ disabled, theme }) => disabled ? theme.colors.neutral[200] : theme.colors.neutral[500]};
115
+ min-height: 12px;
116
+ color: ${({ disabled, theme }) => disabled ? theme.colors.neutral[500] : theme.colors.neutral[700]};
79
117
  text-overflow: ellipsis;
118
+ ${({ selected }) => selected ? `word-break: break-word;` : `
80
119
  overflow: hidden;
81
- height: ${({ theme }) => theme.space.xs};
82
- width: 100%;
83
- text-align: left;
84
- display: block;
85
120
  white-space: nowrap;
121
+ width: 100%;
122
+ display: block;`}
86
123
  `;
87
- const StyledItemCustomActions = styled.div`
124
+ const StyledItemCustomActions = styled("div", {
125
+ name: COMPONENT_NAME,
126
+ slot: slots.ITEM.HEADER.CUSTOM_ACTIONS_CONTAINER
127
+ })`
88
128
  display: grid;
89
129
  grid-auto-flow: column;
130
+ place-items: center;
90
131
  grid-gap: ${({ theme }) => theme.space.xxs};
91
- margin: 0 ${({ theme }) => theme.space.xs};
132
+ margin: ${({ theme, isDSMobile }) => isDSMobile ? `0 ${theme.space.xs}` : "0 20px 0 16px"};
92
133
  justify-content: flex-end;
134
+ height: 28px;
93
135
  `;
94
- const StyledItemHeaderContainer = styled.div`
136
+ const StyledItemHeaderContainer = styled("div", {
137
+ name: COMPONENT_NAME,
138
+ slot: slots.ITEM.HEADER.CONTAINER
139
+ })`
95
140
  display: grid;
96
141
  grid-template-columns: auto max-content;
97
142
  place-items: center;
98
143
  position: relative;
144
+ border-radius: 2px;
99
145
  &:hover {
100
146
  ${({ disabled, theme }) => !disabled ? `background: ${theme.colors.brand[200]};` : ``}
101
147
  }
102
148
  `;
149
+ const StyledTooltipContent = styled("div", {
150
+ name: COMPONENT_NAME,
151
+ slot: slots.ITEM.HEADER.TOOLTIP
152
+ })`
153
+ padding: 8px;
154
+ width: 250px;
155
+ background: white;
156
+ display: grid;
157
+ gap: ${({ theme }) => theme.space.xxs};
158
+
159
+ p {
160
+ margin: 0;
161
+ }
162
+ `;
103
163
  export {
104
164
  StyledItemAddon,
105
165
  StyledItemContainer,
@@ -109,6 +169,7 @@ export {
109
169
  StyledItemHeaderContainer,
110
170
  StyledItemTitles,
111
171
  StyledPrimaryTitle,
112
- StyledSecondaryTitle
172
+ StyledSecondaryTitle,
173
+ StyledTooltipContent
113
174
  };
114
175
  //# sourceMappingURL=styles.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/accordionItem/styles.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
5
- "mappings": "AAAA;ACAA;AAWO,MAAM,sBAAsB,OAAO;AAAA;AAAA;AAAA,6BAGb,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA;AAAA;AAI1D,MAAM,mBAAmB,OAAO;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,OAAO;AAAA,YAC5B,CAAC,EAAE,iBAAkB,aAAa,wBAAwB;AAAA;AAAA;AAI/D,MAAM,kBAAkB,OAAO;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,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAOhC,MAAM,qBAAqB,OAAO;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,OAAO;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,OAAO;AAAA;AAAA;AAAA,cAGhC,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA,cAC3B,CAAC,EAAE,YAAY,MAAM,MAAM;AAAA;AAAA;AAIlC,MAAM,4BAA4B,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAM1C,CAAC,EAAE,UAAU,YAAa,CAAC,WAAW,eAAe,MAAM,OAAO,MAAM,UAAU;AAAA;AAAA;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
5
+ "mappings": "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",
6
6
  "names": []
7
7
  }
@@ -18,11 +18,17 @@ const useAccordionItem = ({ value, disabled }) => {
18
18
  const currentIndex = focusableChildrenReferences.findIndex((item) => item.index === _dsIndex);
19
19
  if (focusableChildrenReferences[currentIndex + 1]?.ref?.current)
20
20
  focusableChildrenReferences[currentIndex + 1]?.ref?.current?.focus();
21
+ else if (currentIndex === focusableChildrenReferences.length - 1) {
22
+ focusableChildrenReferences[0]?.ref?.current?.focus();
23
+ }
21
24
  }
22
25
  if (!disabled && e.key === "ArrowUp") {
23
26
  const currentIndex = focusableChildrenReferences.findIndex((item) => item.index === _dsIndex);
24
27
  if (focusableChildrenReferences[currentIndex - 1]?.ref?.current)
25
28
  focusableChildrenReferences[currentIndex - 1]?.ref?.current?.focus();
29
+ else if (currentIndex === 0) {
30
+ focusableChildrenReferences[focusableChildrenReferences.length - 1]?.ref?.current?.focus();
31
+ }
26
32
  }
27
33
  }, [disabled, focusableChildrenReferences]);
28
34
  return {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/accordionItem/useAccordionItem.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
5
- "mappings": "AAAA;ACAA;AACA;AAGO,MAAM,mBAAmB,CAAC,EAAE,OAAO,eAAgE;AACxG,QAAM,EAAE,mBAAmB,iBAAiB,gCAAgC,WAAW;AAEvF,QAAM,WAAW,QAAQ,MAAM;AAC7B,QAAI,MAAM,QAAQ,oBAAoB;AACpC,aAAO,kBAAkB,KAAK,CAAC,iBAAiB,iBAAiB;AAAA;AAEnE,WAAO,UAAU;AAAA,KAChB,CAAC,mBAAmB;AAEvB,QAAM,gBAAgB,YACpB,CAAC,MAAwB;AACvB,QAAI,CAAC;AAAU,sBAAgB,OAAO;AAAA,KAExC,CAAC,UAAU,iBAAiB;AAG9B,QAAM,kBAAkB,YACtB,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 * as React from 'react';\nexport { React };\n", "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"],
5
+ "mappings": "AAAA;ACAA;AACA;AAaO,MAAM,mBAAmB,CAAC,EAAE,OAAO,eAAoE;AAC5G,QAAM,EAAE,mBAAmB,iBAAiB,gCAAgC,WAAW,kBAAkB;AAEzG,QAAM,WAAW,QAAQ,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,YACpB,CAAC,MAAwB;AACvB,QAAI,CAAC;AAAU,sBAAgB,OAAO,CAAC;AAAA,EACzC,GACA,CAAC,UAAU,iBAAiB,KAAK,CACnC;AAEA,QAAM,kBAAkB,YACtB,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
  }
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { PropTypes } from "@elliemae/ds-props-helpers";
2
+ import { PropTypes } from "@elliemae/ds-utilities";
3
3
  const accordionItemPropTypes = {
4
4
  children: PropTypes.node.description("Dimsum AccordionItem content.").isRequired,
5
5
  title: PropTypes.string.description("Set a primary title."),
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/propTypes.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
5
- "mappings": "AAAA;ACAA;AAEO,MAAM,yBAAyB;AAAA,EACpC,UAAU,UAAU,KAAK,YAAY,iCAAiC;AAAA,EACtE,OAAO,UAAU,OAAO,YAAY;AAAA,EACpC,OAAO,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,SAAS,YAC/D,4DACA;AAAA,EACF,YAAY,UAAU,KAAK,YAAY;AAAA,EACvC,YAAY,UAAU,KAAK,YAAY;AAAA,EACvC,gBAAgB,UAAU,OAAO,YAAY;AAAA,EAC7C,eAAe,UAAU,QAAQ,UAAU,QACxC,YAAY,4CACZ,WAAW,EAAE,SAAS;AAAA,EACzB,qBAAqB,UAAU,KAC5B,YACC,sIAED,WAAW,EAAE,SAAS;AAAA;AAGpB,MAAM,qBAAqB;AAAA,EAChC,gBAAgB,UAAU,OAAO,YAAY;AAAA,EAC7C,aAAa,UAAU,UAAU;AAAA,IAC/B,UAAU,QAAQ,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU;AAAA,IACnE,UAAU;AAAA,IACV,UAAU;AAAA,KACT,YAAY;AAAA,EACf,UAAU,UAAU,KAAK,YAAY;AAAA,EACrC,mBAAmB,UAAU,KAAK,YAAY;AAAA,EAC9C,UAAU,UAAU,KAAK,YAAY;AAAA;",
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/propTypes.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
5
+ "mappings": "AAAA;ACAA;AAEO,MAAM,yBAAyB;AAAA,EACpC,UAAU,UAAU,KAAK,YAAY,+BAA+B,EAAE;AAAA,EACtE,OAAO,UAAU,OAAO,YAAY,sBAAsB;AAAA,EAC1D,OAAO,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,EAAE,YAC/D,0DACF,EAAE;AAAA,EACF,YAAY,UAAU,KAAK,YAAY,uCAAuC;AAAA,EAC9E,YAAY,UAAU,KAAK,YAAY,qCAAqC;AAAA,EAC5E,gBAAgB,UAAU,OAAO,YAAY,uBAAuB;AAAA,EACpE,eAAe,UAAU,QAAQ,UAAU,MAAM,EAC9C,YAAY,0CAA0C,EACtD,WAAW,EAAE,SAAS,MAAM,CAAC;AAAA,EAChC,qBAAqB,UAAU,KAC5B,YACC,oIACF,EACC,WAAW,EAAE,SAAS,MAAM,CAAC;AAClC;AAEO,MAAM,qBAAqB;AAAA,EAChC,gBAAgB,UAAU,OAAO,YAAY,8BAA8B;AAAA,EAC3E,aAAa,UAAU,UAAU;AAAA,IAC/B,UAAU,QAAQ,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,CAAC;AAAA,IAC3E,UAAU;AAAA,IACV,UAAU;AAAA,EACZ,CAAC,EAAE,YAAY,4EAA4E;AAAA,EAC3F,UAAU,UAAU,KAAK,YAAY,gCAAgC;AAAA,EACrE,mBAAmB,UAAU,KAAK,YAAY,oEAAoE;AAAA,EAClH,UAAU,UAAU,KAAK,YAAY,sDAAsD;AAC7F;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,47 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ import * as React from "react";
21
+ import { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from "@elliemae/ds-utilities";
22
+ const accordionItemPropTypes = __spreadProps(__spreadValues(__spreadValues({}, globalAttributesPropTypes), xstyledPropTypes), {
23
+ children: PropTypes.node.description("Dimsum AccordionItem content.").isRequired,
24
+ title: PropTypes.string.description("Set a primary title."),
25
+ value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description("Dimsum AccordionItem value, this value should be unique.").isRequired,
26
+ iconClosed: PropTypes.node.description("Custom Dimsum Icon when it is closed.").deprecated({ version: "3.x" }),
27
+ iconOpened: PropTypes.node.description("Custom Dimsum Icon when it is open.").deprecated({ version: "3.x" }),
28
+ secondaryTitle: PropTypes.string.description("Set a secondary title"),
29
+ customActions: PropTypes.arrayOf(PropTypes.object).description("Set Dimsum AccordionItem custom actions.").deprecated({ version: "3.x" }),
30
+ renderCustomActions: 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.")
31
+ });
32
+ const accordionPropTypes = __spreadProps(__spreadValues(__spreadValues({}, globalAttributesPropTypes), xstyledPropTypes), {
33
+ containerProps: PropTypes.object.description("Adds props to the container."),
34
+ activeValue: PropTypes.oneOfType([
35
+ PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),
36
+ PropTypes.string,
37
+ PropTypes.number
38
+ ]).description("Selected active value. This property makes the component a controlled one."),
39
+ children: PropTypes.node.description("Dimsum AccordionItems to show."),
40
+ allowMultipleOpen: PropTypes.bool.description("Allows multiple Dimsum AccordionItems to be open at the same time."),
41
+ onChange: PropTypes.func.description("Callback function once the Dimsum Accordion changes.")
42
+ });
43
+ export {
44
+ accordionItemPropTypes,
45
+ accordionPropTypes
46
+ };
47
+ //# sourceMappingURL=react-desc-prop-types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACCA;AAiEO,MAAM,yBAAyB,gDACjC,4BACA,mBAFiC;AAAA,EAGpC,UAAU,UAAU,KAAK,YAAY,+BAA+B,EAAE;AAAA,EACtE,OAAO,UAAU,OAAO,YAAY,sBAAsB;AAAA,EAC1D,OAAO,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,EAAE,YAC/D,0DACF,EAAE;AAAA,EACF,YAAY,UAAU,KAAK,YAAY,uCAAuC,EAAE,WAAW,EAAE,SAAS,MAAM,CAAC;AAAA,EAC7G,YAAY,UAAU,KAAK,YAAY,qCAAqC,EAAE,WAAW,EAAE,SAAS,MAAM,CAAC;AAAA,EAC3G,gBAAgB,UAAU,OAAO,YAAY,uBAAuB;AAAA,EACpE,eAAe,UAAU,QAAQ,UAAU,MAAM,EAC9C,YAAY,0CAA0C,EACtD,WAAW,EAAE,SAAS,MAAM,CAAC;AAAA,EAChC,qBAAqB,UAAU,KAAK,YAClC,qIACF;AACF;AAEO,MAAM,qBAAqB,gDAC7B,4BACA,mBAF6B;AAAA,EAGhC,gBAAgB,UAAU,OAAO,YAAY,8BAA8B;AAAA,EAC3E,aAAa,UAAU,UAAU;AAAA,IAC/B,UAAU,QAAQ,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,CAAC;AAAA,IAC3E,UAAU;AAAA,IACV,UAAU;AAAA,EACZ,CAAC,EAAE,YAAY,4EAA4E;AAAA,EAC3F,UAAU,UAAU,KAAK,YAAY,gCAAgC;AAAA,EACrE,mBAAmB,UAAU,KAAK,YAAY,oEAAoE;AAAA,EAClH,UAAU,UAAU,KAAK,YAAY,sDAAsD;AAC7F;",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ import * as React from "react";
2
+ //# sourceMappingURL=sharedTypes.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-accordion",
3
- "version": "3.0.0-next.9",
3
+ "version": "3.0.1",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Accordion",
6
6
  "files": [
@@ -82,17 +82,24 @@
82
82
  "reportFile": "tests.xml",
83
83
  "indent": 4
84
84
  },
85
+ "scripts": {
86
+ "dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
87
+ "test": "node ../../scripts/testing/test.mjs",
88
+ "lint": "node ../../scripts/lint.mjs",
89
+ "dts": "node ../../scripts/dts.mjs",
90
+ "build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs"
91
+ },
85
92
  "dependencies": {
86
- "@elliemae/ds-button": "3.0.0-next.9",
87
- "@elliemae/ds-classnames": "3.0.0-next.9",
88
- "@elliemae/ds-icons": "3.0.0-next.9",
89
- "@elliemae/ds-popperjs": "3.0.0-next.9",
90
- "@elliemae/ds-props-helpers": "3.0.0-next.9",
91
- "@elliemae/ds-shared": "3.0.0-next.9",
92
- "@elliemae/ds-system": "3.0.0-next.9",
93
- "@elliemae/ds-truncated-tooltip-text": "3.0.0-next.9",
94
- "@elliemae/ds-utilities": "3.0.0-next.9",
95
- "react-desc": "^4.1.3"
93
+ "@elliemae/ds-button": "workspace:*",
94
+ "@elliemae/ds-classnames": "workspace:*",
95
+ "@elliemae/ds-icons": "workspace:*",
96
+ "@elliemae/ds-popperjs": "workspace:*",
97
+ "@elliemae/ds-shared": "workspace:*",
98
+ "@elliemae/ds-system": "workspace:*",
99
+ "@elliemae/ds-truncated-tooltip-text": "workspace:*",
100
+ "@elliemae/ds-utilities": "workspace:*",
101
+ "@xstyled/styled-components": "~3.1.2",
102
+ "react-desc": "~4.1.3"
96
103
  },
97
104
  "devDependencies": {
98
105
  "@testing-library/jest-dom": "~5.16.2",
@@ -107,12 +114,5 @@
107
114
  "publishConfig": {
108
115
  "access": "public",
109
116
  "typeSafety": false
110
- },
111
- "scripts": {
112
- "dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
113
- "test": "node ../../scripts/testing/test.mjs",
114
- "lint": "node ../../scripts/lint.mjs",
115
- "dts": "node ../../scripts/dts.mjs",
116
- "build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs"
117
117
  }
118
- }
118
+ }
@@ -1,42 +0,0 @@
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 __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
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 });
17
- }
18
- return target;
19
- };
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);
28
- var DSAccordionDatatestid_exports = {};
29
- __export(DSAccordionDatatestid_exports, {
30
- DSAccordionDataTestid: () => DSAccordionDataTestid
31
- });
32
- var React = __toESM(require("react"));
33
- const DSAccordionDataTestid = {
34
- ITEM: {
35
- CONTENT: "ds-accordion_item-content",
36
- HEADER: "ds-accordion_item-header",
37
- CONTAINER: "ds-accordion_item"
38
- },
39
- GROUP: "ds-accordion_group"
40
- };
41
- module.exports = __toCommonJS(DSAccordionDatatestid_exports);
42
- //# sourceMappingURL=DSAccordionDatatestid.js.map
@@ -1,27 +0,0 @@
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 __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
- var __reExport = (target, module2, copyDefault, desc) => {
9
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
10
- for (let key of __getOwnPropNames(module2))
11
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
12
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
13
- }
14
- return target;
15
- };
16
- var __toESM = (module2, isNodeMode) => {
17
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
18
- };
19
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
20
- return (module2, temp) => {
21
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
22
- };
23
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
24
- var DSAccordionTypes_exports = {};
25
- var React = __toESM(require("react"));
26
- module.exports = __toCommonJS(DSAccordionTypes_exports);
27
- //# sourceMappingURL=DSAccordionTypes.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/DSAccordionTypes.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\n\n/* ****************************************** Misc Types ********************************************** */\n\nexport type InternalActiveValueT = (string | number)[] | string | number | null | undefined;\n\nexport interface DefaultIconPropsT {\n isDSMobile: boolean;\n}\n\nexport interface CustomActionsT {\n onClick: (e: React.MouseEvent) => void;\n id: string;\n}\n\nexport interface FocusableChildrenReferences {\n index: number;\n value: string | number;\n ref: React.MutableRefObject<HTMLButtonElement | null>;\n}\n\nexport interface AllChildrenReferences {\n [index: string]: React.MutableRefObject<HTMLButtonElement | null>;\n}\n\n/* ****************************************** Component Types ********************************************** */\n\nexport interface DSAccordionPropsT {\n containerProps?: Record<string, unknown>;\n activeValue?: (string | number)[] | string | number | null;\n children?: React.ReactElement<DSAccordionItemPropsT>[];\n allowMultipleOpen?: boolean;\n contentExpandable?: boolean;\n onChange?: (value: (string | number)[] | string | number | null, e: React.MouseEvent | React.KeyboardEvent) => void;\n disabled?: boolean;\n isDSMobile?: boolean;\n}\n\nexport interface DSAccordionDefaultPropsT {\n containerProps: Record<string, unknown>;\n allowMultipleOpen: boolean;\n contentExpandable: boolean;\n onChange: (value: (string | number)[] | string | number | null, e: React.MouseEvent | React.KeyboardEvent) => void;\n children: React.ReactElement<DSAccordionItemPropsT>[];\n isDSMobile: boolean;\n}\n\nexport interface DSAccordionPropsWithDefaultsT {\n containerProps: Record<string, unknown>;\n activeValue?: (string | number)[] | string | number | null;\n children: React.ReactElement<DSAccordionItemPropsT>[];\n allowMultipleOpen: boolean;\n contentExpandable: boolean;\n onChange: (value: (string | number)[] | string | number | null, e: React.MouseEvent | React.KeyboardEvent) => void;\n isDSMobile: boolean;\n}\n\nexport interface DSAccordionItemPropsT {\n title?: string;\n value: string | number;\n iconClosed?: React.FunctionComponent<DefaultIconPropsT>;\n iconOpened?: React.FunctionComponent<DefaultIconPropsT>;\n children?: React.ReactNode;\n secondaryTitle?: string;\n customActions?: CustomActionsT[];\n disabled?: boolean;\n dsIndex: number;\n renderCustomActions?: (props: {\n allRefs: AllChildrenReferences;\n actualActiveValue: InternalActiveValueT;\n }) => JSX.Element;\n}\n\nexport interface DSAccordionItemDefaultPropsT {\n iconClosed: React.MemoExoticComponent<React.FunctionComponent<DefaultIconPropsT>>;\n iconOpened: React.MemoExoticComponent<React.FunctionComponent<DefaultIconPropsT>>;\n title: string;\n customActions: CustomActionsT[];\n disabled: boolean;\n}\n\nexport interface DSAccordionItemPropsWithDefaultsT {\n title: string;\n value: string | number;\n iconClosed:\n | React.MemoExoticComponent<React.FunctionComponent<DefaultIconPropsT>>\n | React.FunctionComponent<DefaultIconPropsT>;\n iconOpened:\n | React.MemoExoticComponent<React.FunctionComponent<DefaultIconPropsT>>\n | React.FunctionComponent<DefaultIconPropsT>;\n children?: React.ReactNode;\n secondaryTitle?: string;\n customActions: CustomActionsT[];\n disabled: boolean;\n dsIndex: number;\n renderCustomActions?: (props: {\n allRefs: AllChildrenReferences;\n actualActiveValue: InternalActiveValueT;\n }) => JSX.Element;\n}\n\n/* ****************************************** Context Types ********************************************** */\n\nexport interface DSAccordionContextT {\n props: DSAccordionPropsWithDefaultsT;\n actualActiveValue: InternalActiveValueT;\n setActiveValues: (value: string | number, e: React.MouseEvent | React.KeyboardEvent) => void;\n focusableChildrenReferences: FocusableChildrenReferences[];\n allChildrenReferences: AllChildrenReferences;\n}\nexport interface DSAccordionUseAccordionContextT {\n props: DSAccordionPropsWithDefaultsT;\n actualActiveValue: InternalActiveValueT;\n setActiveValues: (value: string | number, e: React.MouseEvent | React.KeyboardEvent) => void;\n focusableChildrenReferences: FocusableChildrenReferences[];\n allChildrenReferences: AllChildrenReferences;\n}\n\n/* ****************************************** Hooks Types ********************************************** */\n\nexport interface UseAccordionPropsT {\n value: string | number;\n disabled: boolean;\n}\n\nexport interface UseAccordionItemReturnTypeT {\n handleOnClick: (e: React.MouseEvent) => void;\n handleOnKeyDown: (e: React.KeyboardEvent, dsIndex: number) => void;\n selected: boolean;\n}\n\nexport interface UseAccordionRefsPropsT {\n children: React.ReactElement<DSAccordionItemPropsT>[];\n}\n\nexport interface UseAccordionRefsReturnTypeT {\n focusableChildrenReferences: FocusableChildrenReferences[];\n allChildrenReferences: AllChildrenReferences;\n}\n\n/* ****************************************** Styled Types ********************************************** */\n\nexport interface StyledItemHeaderPropsT {\n withCustomActions: boolean;\n withSecondaryTitle?: string;\n isDSMobile: boolean;\n}\n\nexport interface StyledItemTitlesPropsT {\n withSecondaryTitle?: string;\n isDSMobile: boolean;\n}\n\nexport interface StyledPrimaryTitlePropsT {\n disabled: boolean;\n isDSMobile: boolean;\n}\n\nexport interface StyledItemContentPropsT {\n isDSMobile: boolean;\n}\n\nexport interface StyledSecondaryTitlePropsT {\n disabled: boolean;\n}\n\nexport interface StyledItemAddonPropsT {\n disabled: boolean;\n isDSMobile: boolean;\n}\n\nexport interface StyledItemHeaderContainerPropsT {\n disabled: boolean;\n}\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA,YAAuB;",
6
- "names": []
7
- }
@@ -1,2 +0,0 @@
1
- import * as React from "react";
2
- //# sourceMappingURL=DSAccordionTypes.js.map