@elliemae/ds-app-picker 2.3.0-alpha.6 → 2.3.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/cjs/AppPickerImpl.js +182 -0
  2. package/cjs/DSAppPicker.js +138 -0
  3. package/cjs/index.js +11 -0
  4. package/cjs/propTypes.js +25 -0
  5. package/cjs/styles.js +164 -0
  6. package/cjs/types/AppPickerTypes.js +2 -0
  7. package/cjs/utils.js +18 -0
  8. package/esm/AppPickerImpl.js +174 -0
  9. package/esm/DSAppPicker.js +126 -0
  10. package/esm/index.js +1 -0
  11. package/esm/propTypes.js +21 -0
  12. package/esm/styles.js +150 -0
  13. package/esm/types/AppPickerTypes.js +1 -0
  14. package/esm/utils.js +14 -0
  15. package/package.json +34 -38
  16. package/types/AppPickerImpl.d.ts +3 -0
  17. package/types/DSAppPicker.d.ts +11 -0
  18. package/types/index.d.ts +2 -0
  19. package/types/propTypes.d.ts +61 -0
  20. package/types/styles.d.ts +9 -0
  21. package/types/tests/AppPicker.test.d.ts +1 -0
  22. package/types/types/AppPickerTypes.d.ts +41 -0
  23. package/types/utils.d.ts +12 -0
  24. package/dist/cjs/AppPickerImpl.js +0 -152
  25. package/dist/cjs/AppPickerImpl.js.map +0 -7
  26. package/dist/cjs/DSAppPicker.js +0 -141
  27. package/dist/cjs/DSAppPicker.js.map +0 -7
  28. package/dist/cjs/index.js +0 -36
  29. package/dist/cjs/index.js.map +0 -7
  30. package/dist/cjs/propTypes.js +0 -50
  31. package/dist/cjs/propTypes.js.map +0 -7
  32. package/dist/cjs/styles.js +0 -190
  33. package/dist/cjs/styles.js.map +0 -7
  34. package/dist/cjs/types/AppPickerTypes.js +0 -27
  35. package/dist/cjs/types/AppPickerTypes.js.map +0 -7
  36. package/dist/cjs/utils.js +0 -46
  37. package/dist/cjs/utils.js.map +0 -7
  38. package/dist/esm/AppPickerImpl.js +0 -131
  39. package/dist/esm/AppPickerImpl.js.map +0 -7
  40. package/dist/esm/DSAppPicker.js +0 -112
  41. package/dist/esm/DSAppPicker.js.map +0 -7
  42. package/dist/esm/index.js +0 -7
  43. package/dist/esm/index.js.map +0 -7
  44. package/dist/esm/propTypes.js +0 -21
  45. package/dist/esm/propTypes.js.map +0 -7
  46. package/dist/esm/styles.js +0 -161
  47. package/dist/esm/styles.js.map +0 -7
  48. package/dist/esm/types/AppPickerTypes.js +0 -2
  49. package/dist/esm/types/AppPickerTypes.js.map +0 -7
  50. package/dist/esm/utils.js +0 -17
  51. package/dist/esm/utils.js.map +0 -7
@@ -1,161 +0,0 @@
1
- import * as React from "react";
2
- import { styled, css } from "@elliemae/ds-system";
3
- const StyledTitle = styled("h3", { name: "DS-AppPicker", slot: "title" })`
4
- color: ${({ theme }) => theme.colors.neutral[700]};
5
- font-size: ${({ theme }) => theme.fontSizes.value[400]};
6
- font-weight: ${({ theme }) => theme.fontWeights.semibold};
7
- margin: 12px 0 0 0;
8
- line-height: 1.38;
9
- text-transform: uppercase;
10
- `;
11
- const StyledWrapper = styled("ul", { name: "DS-AppPicker", slot: "root" })`
12
- align-items: center;
13
- min-width: 308px;
14
- min-height: 110px;
15
- max-height: 449px;
16
- width: 308px;
17
- overflow-y: auto;
18
- overflow-x: hidden;
19
- margin: 0;
20
- padding: ${({ isOverflow }) => isOverflow ? "0 0 0 16px" : "0 16px"};
21
- &:focus {
22
- outline: none;
23
- }
24
- `;
25
- const StyledGrid = styled("div", { name: "DS-AppPicker", slot: "grid" })`
26
- display: flex;
27
- flex-direction: column;
28
- justify-content: center;
29
- align-items: center;
30
- width: 100%;
31
- margin: 8px 0;
32
- `;
33
- const StyledRow = styled("div", { name: "DS-AppPicker", slot: "row" })`
34
- display: flex;
35
- width: 100%;
36
- `;
37
- const StyledChipLabel = styled("p", { name: "DS-AppPicker", slot: "chipLabel" })`
38
- font-size: ${({ theme }) => theme.fontSizes.label[200]};
39
- font-weight: ${({ theme }) => theme.fontWeights.semibold};
40
- word-wrap: break-word;
41
- margin: 0 6px;
42
- line-height: 1.45;
43
- width: 100%;
44
- z-index: 120;
45
-
46
- & span {
47
- padding-top: 6px;
48
- }
49
- `;
50
- const styledChipSelectedCss = css`
51
- color: ${({ theme }) => theme.colors.brand[800]};
52
- background-color: ${({ theme }) => theme.colors.brand[200]};
53
-
54
- .app-picker__icon {
55
- fill: ${({ theme }) => theme.colors.brand[800]};
56
- }
57
-
58
- &:before {
59
- border: 1px solid ${({ theme }) => theme.colors.brand[600]};
60
- }
61
-
62
- &:focus {
63
- &:before {
64
- border: 2px solid ${({ theme }) => theme.colors.brand[800]};
65
- }
66
- }
67
- `;
68
- const StyledChip = styled("button", { name: "DS-AppPicker", slot: "chip" })`
69
- position: relative;
70
- display: flex;
71
- flex-direction: column;
72
- align-items: center;
73
- justify-content: center;
74
- border: none;
75
- height: 68px;
76
- width: 92px;
77
- background-color: #fff;
78
- color: ${({ theme }) => theme.colors.brand[600]};
79
- cursor: pointer;
80
- outline: none;
81
-
82
- &:before {
83
- content: '';
84
- position: absolute;
85
- top: 0;
86
- left: 0;
87
- width: 100%;
88
- height: 100%;
89
- border-radius: 2px;
90
- border: 2px solid transparent;
91
- }
92
-
93
- & .app-picker__icon {
94
- fill: ${({ theme }) => theme.colors.brand[600]};
95
- height: 28px;
96
- width: 28px;
97
- }
98
-
99
- & .app-picker__icon svg {
100
- height: 28px;
101
- width: 28px;
102
- }
103
-
104
- &:hover {
105
- color: ${({ theme }) => theme.colors.brand[800]};
106
- background-color: ${({ theme }) => theme.colors.brand[200]};
107
- .app-picker__icon {
108
- fill: ${({ theme }) => theme.colors.brand[800]};
109
- }
110
- }
111
-
112
- &:focus {
113
- &:before {
114
- border-color: ${({ theme }) => theme.colors.brand[800]};
115
- }
116
- }
117
-
118
- &:disabled {
119
- color: ${({ theme }) => theme.colors.neutral[500]};
120
- cursor: not-allowed;
121
-
122
- .app-picker__icon {
123
- fill: ${({ theme }) => theme.colors.neutral[500]};
124
- }
125
-
126
- &:focus,
127
- &:hover {
128
- background-color: #fff;
129
- cursor: not-allowed;
130
- &:before {
131
- border-color: transparent;
132
- }
133
-
134
- ${StyledChipLabel} {
135
- color: ${({ theme }) => theme.colors.neutral[500]};
136
- }
137
- }
138
-
139
- &:hover .app-picker__icon {
140
- fill: ${({ theme }) => theme.colors.neutral[500]};
141
- }
142
- }
143
-
144
- ${({ selected }) => !selected ? "" : styledChipSelectedCss}
145
- `;
146
- const StyledSeparator = styled("hr", { name: "DS-AppPicker", slot: "separator" })`
147
- border-top: 1px solid ${({ theme }) => theme.colors.neutral[100]};
148
- border-bottom: none;
149
- width: 99%;
150
- margin: 0;
151
- `;
152
- export {
153
- StyledChip,
154
- StyledChipLabel,
155
- StyledGrid,
156
- StyledRow,
157
- StyledSeparator,
158
- StyledTitle,
159
- StyledWrapper
160
- };
161
- //# sourceMappingURL=styles.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/styles.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable max-lines */\nimport { styled, css } from '@elliemae/ds-system';\n\nexport const StyledTitle = styled('h3', { name: 'DS-AppPicker', slot: 'title' })`\n color: ${({ theme }) => theme.colors.neutral[700]};\n font-size: ${({ theme }) => theme.fontSizes.value[400]};\n font-weight: ${({ theme }) => theme.fontWeights.semibold};\n margin: 12px 0 0 0;\n line-height: 1.38;\n text-transform: uppercase;\n`;\n\nexport const StyledWrapper = styled('ul', { name: 'DS-AppPicker', slot: 'root' })`\n align-items: center;\n min-width: 308px;\n min-height: 110px;\n max-height: 449px;\n width: 308px;\n overflow-y: auto;\n overflow-x: hidden;\n margin: 0;\n padding: ${({ isOverflow }) => (isOverflow ? '0 0 0 16px' : '0 16px')};\n &:focus {\n outline: none;\n }\n`;\n\nexport const StyledGrid = styled('div', { name: 'DS-AppPicker', slot: 'grid' })`\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n margin: 8px 0;\n`;\n\nexport const StyledRow = styled('div', { name: 'DS-AppPicker', slot: 'row' })`\n display: flex;\n width: 100%;\n`;\n\nexport const StyledChipLabel = styled('p', { name: 'DS-AppPicker', slot: 'chipLabel' })`\n font-size: ${({ theme }) => theme.fontSizes.label[200]};\n font-weight: ${({ theme }) => theme.fontWeights.semibold};\n word-wrap: break-word;\n margin: 0 6px;\n line-height: 1.45;\n width: 100%;\n z-index: 120;\n\n & span {\n padding-top: 6px;\n }\n`;\n\nconst styledChipSelectedCss = css`\n color: ${({ theme }) => theme.colors.brand[800]};\n background-color: ${({ theme }) => theme.colors.brand[200]};\n\n .app-picker__icon {\n fill: ${({ theme }) => theme.colors.brand[800]};\n }\n\n &:before {\n border: 1px solid ${({ theme }) => theme.colors.brand[600]};\n }\n\n &:focus {\n &:before {\n border: 2px solid ${({ theme }) => theme.colors.brand[800]};\n }\n }\n`;\n\nexport const StyledChip = styled('button', { name: 'DS-AppPicker', slot: 'chip' })<{ selected: boolean | undefined }>`\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n border: none;\n height: 68px;\n width: 92px;\n background-color: #fff;\n color: ${({ theme }) => theme.colors.brand[600]};\n cursor: pointer;\n outline: none;\n\n &:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border-radius: 2px;\n border: 2px solid transparent;\n }\n\n & .app-picker__icon {\n fill: ${({ theme }) => theme.colors.brand[600]};\n height: 28px;\n width: 28px;\n }\n\n & .app-picker__icon svg {\n height: 28px;\n width: 28px;\n }\n\n &:hover {\n color: ${({ theme }) => theme.colors.brand[800]};\n background-color: ${({ theme }) => theme.colors.brand[200]};\n .app-picker__icon {\n fill: ${({ theme }) => theme.colors.brand[800]};\n }\n }\n\n &:focus {\n &:before {\n border-color: ${({ theme }) => theme.colors.brand[800]};\n }\n }\n\n &:disabled {\n color: ${({ theme }) => theme.colors.neutral[500]};\n cursor: not-allowed;\n\n .app-picker__icon {\n fill: ${({ theme }) => theme.colors.neutral[500]};\n }\n\n &:focus,\n &:hover {\n background-color: #fff;\n cursor: not-allowed;\n &:before {\n border-color: transparent;\n }\n\n ${StyledChipLabel} {\n color: ${({ theme }) => theme.colors.neutral[500]};\n }\n }\n\n &:hover .app-picker__icon {\n fill: ${({ theme }) => theme.colors.neutral[500]};\n }\n }\n\n ${({ selected }) => (!selected ? '' : styledChipSelectedCss)}\n`;\n\nexport const StyledSeparator = styled('hr', { name: 'DS-AppPicker', slot: 'separator' })`\n border-top: 1px solid ${({ theme }) => theme.colors.neutral[100]};\n border-bottom: none;\n width: 99%;\n margin: 0;\n`;\n"],
5
- "mappings": "AAAA;ACEA;AAEO,MAAM,cAAc,OAAO,MAAM,EAAE,MAAM,gBAAgB,MAAM;AAAA,WAC3D,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA,eAChC,CAAC,EAAE,YAAY,MAAM,UAAU,MAAM;AAAA,iBACnC,CAAC,EAAE,YAAY,MAAM,YAAY;AAAA;AAAA;AAAA;AAAA;AAM3C,MAAM,gBAAgB,OAAO,MAAM,EAAE,MAAM,gBAAgB,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAS3D,CAAC,EAAE,iBAAkB,aAAa,eAAe;AAAA;AAAA;AAAA;AAAA;AAMvD,MAAM,aAAa,OAAO,OAAO,EAAE,MAAM,gBAAgB,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS/D,MAAM,YAAY,OAAO,OAAO,EAAE,MAAM,gBAAgB,MAAM;AAAA;AAAA;AAAA;AAK9D,MAAM,kBAAkB,OAAO,KAAK,EAAE,MAAM,gBAAgB,MAAM;AAAA,eAC1D,CAAC,EAAE,YAAY,MAAM,UAAU,MAAM;AAAA,iBACnC,CAAC,EAAE,YAAY,MAAM,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;A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AAA;AAAA;AAAA;AAAA;AAAA,cAKvC,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA,IAI9C,CAAC,EAAE,eAAgB,CAAC,WAAW,KAAK;AAAA;AAGjC,MAAM,kBAAkB,OAAO,MAAM,EAAE,MAAM,gBAAgB,MAAM;AAAA,0BAChD,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;",
6
- "names": []
7
- }
@@ -1,2 +0,0 @@
1
- import * as React from "react";
2
- //# sourceMappingURL=AppPickerTypes.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n"],
5
- "mappings": "AAAA;",
6
- "names": []
7
- }
package/dist/esm/utils.js DELETED
@@ -1,17 +0,0 @@
1
- import * as React from "react";
2
- const keys = {
3
- LEFT: "ArrowLeft",
4
- UP: "ArrowUp",
5
- RIGHT: "ArrowRight",
6
- DOWN: "ArrowDown",
7
- ENTER: "Enter",
8
- SPACE: "",
9
- TAB: "Tab",
10
- ESC: "Escape",
11
- HOME: "Home",
12
- END: "End"
13
- };
14
- export {
15
- keys
16
- };
17
- //# sourceMappingURL=utils.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/utils.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const keys = {\n LEFT: 'ArrowLeft',\n UP: 'ArrowUp',\n RIGHT: 'ArrowRight',\n DOWN: 'ArrowDown',\n ENTER: 'Enter',\n SPACE: '',\n TAB: 'Tab',\n ESC: 'Escape',\n HOME: 'Home',\n END: 'End',\n};\n"],
5
- "mappings": "AAAA;ACAO,MAAM,OAAO;AAAA,EAClB,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO;AAAA,EACP,KAAK;AAAA,EACL,KAAK;AAAA,EACL,MAAM;AAAA,EACN,KAAK;AAAA;",
6
- "names": []
7
- }